aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2007-07-18 20:38:57 -0400
committerSteve French <sfrench@us.ibm.com>2007-07-18 20:38:57 -0400
commit1ff8392c32a2645d2665ca779ecb91bb29361c13 (patch)
tree860b95e9a499ade4060848740fc6ce1fbb4e4e8d /arch
parent70b315b0dd3879cb3ab8aadffb14f10b2d19b9c3 (diff)
parent5bae7ac9feba925fd0099057f6b23d7be80b7b41 (diff)
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: fs/cifs/export.c
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/Kconfig3
-rw-r--r--arch/alpha/kernel/pci_iommu.c32
-rw-r--r--arch/alpha/kernel/ptrace.c4
-rw-r--r--arch/alpha/kernel/smp.c6
-rw-r--r--arch/alpha/kernel/srmcons.c2
-rw-r--r--arch/alpha/kernel/sys_marvel.c2
-rw-r--r--arch/alpha/kernel/time.c2
-rw-r--r--arch/alpha/kernel/traps.c1
-rw-r--r--arch/alpha/lib/checksum.c1
-rw-r--r--arch/alpha/lib/csum_ipv6_magic.S51
-rw-r--r--arch/alpha/lib/ev6-csum_ipv6_magic.S42
-rw-r--r--arch/arm/Kconfig10
-rw-r--r--arch/arm/boot/.gitignore3
-rw-r--r--arch/arm/boot/compressed/.gitignore1
-rw-r--r--arch/arm/boot/compressed/Makefile13
-rw-r--r--arch/arm/boot/compressed/head-xscale.S5
-rw-r--r--arch/arm/boot/compressed/head.S94
-rw-r--r--arch/arm/common/locomo.c11
-rw-r--r--arch/arm/common/sa1111.c13
-rw-r--r--arch/arm/common/sharpsl_pm.c2
-rw-r--r--arch/arm/kernel/calls.S2
-rw-r--r--arch/arm/kernel/head-common.S40
-rw-r--r--arch/arm/kernel/head.S7
-rw-r--r--arch/arm/kernel/process.c69
-rw-r--r--arch/arm/kernel/ptrace.c15
-rw-r--r--arch/arm/kernel/setup.c6
-rw-r--r--arch/arm/kernel/sys_arm.c13
-rw-r--r--arch/arm/kernel/traps.c23
-rw-r--r--arch/arm/mach-at91/board-csb337.c10
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c130
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c64
-rw-r--r--arch/arm/mach-at91/pm.c4
-rw-r--r--arch/arm/mach-davinci/Makefile3
-rw-r--r--arch/arm/mach-davinci/board-evm.c2
-rw-r--r--arch/arm/mach-davinci/clock.c323
-rw-r--r--arch/arm/mach-davinci/clock.h33
-rw-r--r--arch/arm/mach-davinci/gpio.c286
-rw-r--r--arch/arm/mach-davinci/io.c6
-rw-r--r--arch/arm/mach-davinci/mux.c41
-rw-r--r--arch/arm/mach-davinci/psc.c87
-rw-r--r--arch/arm/mach-imx/generic.c118
-rw-r--r--arch/arm/mach-imx/time.c121
-rw-r--r--arch/arm/mach-iop13xx/setup.c217
-rw-r--r--arch/arm/mach-iop13xx/tpmi.c32
-rw-r--r--arch/arm/mach-iop32x/glantank.c2
-rw-r--r--arch/arm/mach-iop32x/iq31244.c5
-rw-r--r--arch/arm/mach-iop32x/iq80321.c3
-rw-r--r--arch/arm/mach-iop32x/n2100.c12
-rw-r--r--arch/arm/mach-iop33x/iq80331.c3
-rw-r--r--arch/arm/mach-iop33x/iq80332.c3
-rw-r--r--arch/arm/mach-ixp4xx/Kconfig16
-rw-r--r--arch/arm/mach-ixp4xx/Makefile4
-rw-r--r--arch/arm/mach-ixp4xx/gateway7001-pci.c63
-rw-r--r--arch/arm/mach-ixp4xx/gateway7001-setup.c108
-rw-r--r--arch/arm/mach-ixp4xx/gtwx5715-pci.c8
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-setup.c96
-rw-r--r--arch/arm/mach-ixp4xx/wg302v2-pci.c63
-rw-r--r--arch/arm/mach-ixp4xx/wg302v2-setup.c109
-rw-r--r--arch/arm/mach-ks8695/Makefile2
-rw-r--r--arch/arm/mach-ks8695/gpio.c218
-rw-r--r--arch/arm/mach-pxa/clock.c15
-rw-r--r--arch/arm/mach-pxa/corgi.c7
-rw-r--r--arch/arm/mach-pxa/devices.h11
-rw-r--r--arch/arm/mach-pxa/dma.c44
-rw-r--r--arch/arm/mach-pxa/generic.c93
-rw-r--r--arch/arm/mach-pxa/generic.h6
-rw-r--r--arch/arm/mach-pxa/idp.c3
-rw-r--r--arch/arm/mach-pxa/irq.c106
-rw-r--r--arch/arm/mach-pxa/lpd270.c3
-rw-r--r--arch/arm/mach-pxa/lubbock.c3
-rw-r--r--arch/arm/mach-pxa/mainstone.c3
-rw-r--r--arch/arm/mach-pxa/pm.c47
-rw-r--r--arch/arm/mach-pxa/poodle.c3
-rw-r--r--arch/arm/mach-pxa/pxa25x.c62
-rw-r--r--arch/arm/mach-pxa/pxa27x.c82
-rw-r--r--arch/arm/mach-pxa/spitz.c7
-rw-r--r--arch/arm/mach-pxa/time.c9
-rw-r--r--arch/arm/mach-pxa/tosa.c4
-rw-r--r--arch/arm/mach-pxa/trizeps4.c3
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c59
-rw-r--r--arch/arm/mach-s3c2440/mach-anubis.c141
-rw-r--r--arch/arm/mach-s3c2440/mach-osiris.c38
-rw-r--r--arch/arm/mach-sa1100/neponset.c15
-rw-r--r--arch/arm/mach-sa1100/pm.c9
-rw-r--r--arch/arm/mach-sa1100/time.c24
-rw-r--r--arch/arm/mach-versatile/pci.c5
-rw-r--r--arch/arm/mm/ioremap.c10
-rw-r--r--arch/arm/mm/mmu.c4
-rw-r--r--arch/arm/plat-iop/Makefile2
-rw-r--r--arch/arm/plat-iop/adma.c209
-rw-r--r--arch/arm26/Kconfig3
-rw-r--r--arch/arm26/defconfig1
-rw-r--r--arch/arm26/kernel/ptrace.c15
-rw-r--r--arch/arm26/kernel/traps.c1
-rw-r--r--arch/arm26/mm/init.c3
-rw-r--r--arch/avr32/Kconfig25
-rw-r--r--arch/avr32/boards/atngw100/setup.c3
-rw-r--r--arch/avr32/boards/atstk1000/Kconfig53
-rw-r--r--arch/avr32/boards/atstk1000/atstk1002.c50
-rw-r--r--arch/avr32/configs/atngw100_defconfig152
-rw-r--r--arch/avr32/configs/atstk1002_defconfig180
-rw-r--r--arch/avr32/kernel/ptrace.c13
-rw-r--r--arch/avr32/kernel/setup.c4
-rw-r--r--arch/avr32/kernel/traps.c3
-rw-r--r--arch/avr32/mach-at32ap/Makefile1
-rw-r--r--arch/avr32/mach-at32ap/at32ap.c31
-rw-r--r--arch/avr32/mach-at32ap/at32ap7000.c352
-rw-r--r--arch/avr32/mach-at32ap/cpufreq.c112
-rw-r--r--arch/avr32/mach-at32ap/extint.c200
-rw-r--r--arch/avr32/mach-at32ap/pm.h112
-rw-r--r--arch/avr32/mach-at32ap/sm.h242
-rw-r--r--arch/avr32/mm/cache.c14
-rw-r--r--arch/blackfin/Kconfig65
-rw-r--r--arch/blackfin/Makefile23
-rw-r--r--arch/blackfin/boot/Makefile3
-rw-r--r--arch/blackfin/configs/BF533-EZKIT_defconfig12
-rw-r--r--arch/blackfin/configs/BF533-STAMP_defconfig26
-rw-r--r--arch/blackfin/configs/BF537-STAMP_defconfig26
-rw-r--r--arch/blackfin/configs/BF548-EZKIT_defconfig1100
-rw-r--r--arch/blackfin/configs/BF561-EZKIT_defconfig12
-rw-r--r--arch/blackfin/configs/PNAV-10_defconfig13
-rw-r--r--arch/blackfin/kernel/Makefile7
-rw-r--r--arch/blackfin/kernel/asm-offsets.c7
-rw-r--r--arch/blackfin/kernel/bfin_dma_5xx.c251
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c11
-rw-r--r--arch/blackfin/kernel/bfin_ksyms.c5
-rw-r--r--arch/blackfin/kernel/cacheinit.c66
-rw-r--r--arch/blackfin/kernel/cplbinit.c433
-rw-r--r--arch/blackfin/kernel/dma-mapping.c13
-rw-r--r--arch/blackfin/kernel/dualcore_test.c6
-rw-r--r--arch/blackfin/kernel/fixed_code.S132
-rw-r--r--arch/blackfin/kernel/flat.c55
-rw-r--r--arch/blackfin/kernel/irqchip.c2
-rw-r--r--arch/blackfin/kernel/kgdb.c421
-rw-r--r--arch/blackfin/kernel/module.c32
-rw-r--r--arch/blackfin/kernel/process.c75
-rw-r--r--arch/blackfin/kernel/ptrace.c6
-rw-r--r--arch/blackfin/kernel/setup.c386
-rw-r--r--arch/blackfin/kernel/signal.c10
-rw-r--r--arch/blackfin/kernel/sys_bfin.c8
-rw-r--r--arch/blackfin/kernel/time.c4
-rw-r--r--arch/blackfin/kernel/traps.c65
-rw-r--r--arch/blackfin/kernel/vmlinux.lds.S12
-rw-r--r--arch/blackfin/lib/strcmp.c3
-rw-r--r--arch/blackfin/lib/strcpy.c3
-rw-r--r--arch/blackfin/lib/strncmp.c3
-rw-r--r--arch/blackfin/lib/strncpy.c3
-rw-r--r--arch/blackfin/mach-bf533/Makefile4
-rw-r--r--arch/blackfin/mach-bf533/boards/cm_bf533.c14
-rw-r--r--arch/blackfin/mach-bf533/boards/ezkit.c8
-rw-r--r--arch/blackfin/mach-bf533/boards/generic_board.c6
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c30
-rw-r--r--arch/blackfin/mach-bf533/cpu.c3
-rw-r--r--arch/blackfin/mach-bf533/dma.c95
-rw-r--r--arch/blackfin/mach-bf533/head.S5
-rw-r--r--arch/blackfin/mach-bf533/ints-priority.c2
-rw-r--r--arch/blackfin/mach-bf537/Makefile2
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537.c16
-rw-r--r--arch/blackfin/mach-bf537/boards/eth_mac.c5
-rw-r--r--arch/blackfin/mach-bf537/boards/generic_board.c36
-rw-r--r--arch/blackfin/mach-bf537/boards/pnav10.c54
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c77
-rw-r--r--arch/blackfin/mach-bf537/dma.c115
-rw-r--r--arch/blackfin/mach-bf537/head.S6
-rw-r--r--arch/blackfin/mach-bf537/ints-priority.c2
-rw-r--r--arch/blackfin/mach-bf548/Kconfig316
-rw-r--r--arch/blackfin/mach-bf548/Makefile9
-rw-r--r--arch/blackfin/mach-bf548/boards/Makefile5
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c114
-rw-r--r--arch/blackfin/mach-bf548/boards/led.S172
-rw-r--r--arch/blackfin/mach-bf548/cpu.c159
-rw-r--r--arch/blackfin/mach-bf548/dma.c156
-rw-r--r--arch/blackfin/mach-bf548/gpio.c323
-rw-r--r--arch/blackfin/mach-bf548/head.S512
-rw-r--r--arch/blackfin/mach-bf548/ints-priority.c137
-rw-r--r--arch/blackfin/mach-bf561/Makefile2
-rw-r--r--arch/blackfin/mach-bf561/boards/cm_bf561.c32
-rw-r--r--arch/blackfin/mach-bf561/boards/ezkit.c33
-rw-r--r--arch/blackfin/mach-bf561/boards/generic_board.c6
-rw-r--r--arch/blackfin/mach-bf561/boards/tepla.c6
-rw-r--r--arch/blackfin/mach-bf561/coreb.c18
-rw-r--r--arch/blackfin/mach-bf561/dma.c131
-rw-r--r--arch/blackfin/mach-bf561/head.S6
-rw-r--r--arch/blackfin/mach-bf561/ints-priority.c2
-rw-r--r--arch/blackfin/mach-common/Makefile4
-rw-r--r--arch/blackfin/mach-common/cacheinit.S89
-rw-r--r--arch/blackfin/mach-common/cplbinfo.c13
-rw-r--r--arch/blackfin/mach-common/entry.S76
-rw-r--r--arch/blackfin/mach-common/interrupt.S8
-rw-r--r--arch/blackfin/mach-common/ints-priority-dc.c13
-rw-r--r--arch/blackfin/mach-common/ints-priority-sc.c405
-rw-r--r--arch/blackfin/mach-common/pm.c4
-rw-r--r--arch/blackfin/mm/blackfin_sram.c4
-rw-r--r--arch/blackfin/mm/init.c47
-rw-r--r--arch/blackfin/oprofile/common.c6
-rw-r--r--arch/blackfin/oprofile/op_model_bf533.c6
-rw-r--r--arch/blackfin/oprofile/timer_int.c3
-rw-r--r--arch/cris/arch-v10/defconfig1
-rw-r--r--arch/cris/arch-v10/kernel/ptrace.c21
-rw-r--r--arch/cris/arch-v32/drivers/cryptocop.c8
-rw-r--r--arch/cris/arch-v32/drivers/i2c.c8
-rw-r--r--arch/cris/arch-v32/drivers/pcf8563.c8
-rw-r--r--arch/cris/arch-v32/kernel/ptrace.c7
-rw-r--r--arch/frv/kernel/entry.S4
-rw-r--r--arch/frv/kernel/gdb-stub.c12
-rw-r--r--arch/frv/kernel/ptrace.c16
-rw-r--r--arch/frv/kernel/setup.c17
-rw-r--r--arch/h8300/Kconfig3
-rw-r--r--arch/h8300/Makefile7
-rw-r--r--arch/h8300/boot/compressed/Makefile4
-rw-r--r--arch/h8300/boot/compressed/head.S2
-rw-r--r--arch/h8300/boot/compressed/vmlinux.lds32
-rw-r--r--arch/h8300/boot/compressed/vmlinux.scr9
-rw-r--r--arch/h8300/kernel/Makefile3
-rw-r--r--arch/h8300/kernel/entry.S (renamed from arch/h8300/platform/h8s/entry.S)302
-rw-r--r--arch/h8300/kernel/ints.c256
-rw-r--r--arch/h8300/kernel/ptrace.c7
-rw-r--r--arch/h8300/kernel/signal.c6
-rw-r--r--arch/h8300/platform/h8300h/Makefile2
-rw-r--r--arch/h8300/platform/h8300h/entry.S332
-rw-r--r--arch/h8300/platform/h8s/Makefile2
-rw-r--r--arch/i386/Kconfig19
-rw-r--r--arch/i386/Kconfig.cpu6
-rw-r--r--arch/i386/Makefile4
-rw-r--r--arch/i386/boot/Makefile48
-rw-r--r--arch/i386/boot/a20.c161
-rw-r--r--arch/i386/boot/apm.c97
-rw-r--r--arch/i386/boot/bitops.h45
-rw-r--r--arch/i386/boot/boot.h296
-rw-r--r--arch/i386/boot/bootsect.S98
-rw-r--r--arch/i386/boot/cmdline.c97
-rw-r--r--arch/i386/boot/code16gcc.h15
-rw-r--r--arch/i386/boot/compressed/Makefile7
-rw-r--r--arch/i386/boot/compressed/head.S6
-rw-r--r--arch/i386/boot/compressed/relocs.c2
-rw-r--r--arch/i386/boot/copy.S101
-rw-r--r--arch/i386/boot/cpu.c69
-rw-r--r--arch/i386/boot/cpucheck.c267
-rw-r--r--arch/i386/boot/edd.S231
-rw-r--r--arch/i386/boot/edd.c196
-rw-r--r--arch/i386/boot/header.S283
-rw-r--r--arch/i386/boot/main.c161
-rw-r--r--arch/i386/boot/mca.c43
-rw-r--r--arch/i386/boot/memory.c99
-rw-r--r--arch/i386/boot/pm.c170
-rw-r--r--arch/i386/boot/pmjump.S54
-rw-r--r--arch/i386/boot/printf.c307
-rw-r--r--arch/i386/boot/setup.S1075
-rw-r--r--arch/i386/boot/setup.ld54
-rw-r--r--arch/i386/boot/string.c52
-rw-r--r--arch/i386/boot/tools/build.c162
-rw-r--r--arch/i386/boot/tty.c112
-rw-r--r--arch/i386/boot/version.c23
-rw-r--r--arch/i386/boot/vesa.h79
-rw-r--r--arch/i386/boot/video-bios.c125
-rw-r--r--arch/i386/boot/video-vesa.c284
-rw-r--r--arch/i386/boot/video-vga.c260
-rw-r--r--arch/i386/boot/video.S2043
-rw-r--r--arch/i386/boot/video.c461
-rw-r--r--arch/i386/boot/video.h152
-rw-r--r--arch/i386/boot/voyager.c46
-rw-r--r--arch/i386/kernel/acpi/boot.c21
-rw-r--r--arch/i386/kernel/acpi/wakeup.S2
-rw-r--r--arch/i386/kernel/apm.c2
-rw-r--r--arch/i386/kernel/asm-offsets.c9
-rw-r--r--arch/i386/kernel/cpu/Makefile2
-rw-r--r--arch/i386/kernel/cpu/addon_cpuid_features.c50
-rw-r--r--arch/i386/kernel/cpu/common.c2
-rw-r--r--arch/i386/kernel/cpu/cpufreq/Kconfig31
-rw-r--r--arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c13
-rw-r--r--arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c6
-rw-r--r--arch/i386/kernel/cpu/cpufreq/gx-suspmod.c4
-rw-r--r--arch/i386/kernel/cpu/cpufreq/longhaul.c216
-rw-r--r--arch/i386/kernel/cpu/cpufreq/longhaul.h12
-rw-r--r--arch/i386/kernel/cpu/cpufreq/powernow-k8.c29
-rw-r--r--arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c276
-rw-r--r--arch/i386/kernel/cpu/cpufreq/speedstep-ich.c4
-rw-r--r--arch/i386/kernel/cpu/mcheck/therm_throt.c6
-rw-r--r--arch/i386/kernel/cpu/mtrr/cyrix.c4
-rw-r--r--arch/i386/kernel/cpu/mtrr/generic.c8
-rw-r--r--arch/i386/kernel/cpu/mtrr/main.c4
-rw-r--r--arch/i386/kernel/cpu/perfctr-watchdog.c35
-rw-r--r--arch/i386/kernel/cpu/proc.c21
-rw-r--r--arch/i386/kernel/e820.c2
-rw-r--r--arch/i386/kernel/efi.c2
-rw-r--r--arch/i386/kernel/entry.S95
-rw-r--r--arch/i386/kernel/head.S13
-rw-r--r--arch/i386/kernel/io_apic.c1
-rw-r--r--arch/i386/kernel/nmi.c8
-rw-r--r--arch/i386/kernel/paravirt.c37
-rw-r--r--arch/i386/kernel/process.c73
-rw-r--r--arch/i386/kernel/ptrace.c39
-rw-r--r--arch/i386/kernel/quirks.c5
-rw-r--r--arch/i386/kernel/reboot_fixups.c13
-rw-r--r--arch/i386/kernel/setup.c14
-rw-r--r--arch/i386/kernel/smp.c5
-rw-r--r--arch/i386/kernel/smpboot.c20
-rw-r--r--arch/i386/kernel/smpcommon.c8
-rw-r--r--arch/i386/kernel/syscall_table.S1
-rw-r--r--arch/i386/kernel/traps.c13
-rw-r--r--arch/i386/kernel/tsc.c32
-rw-r--r--arch/i386/kernel/verify_cpu.S94
-rw-r--r--arch/i386/kernel/vmi.c4
-rw-r--r--arch/i386/kernel/vmiclock.c6
-rw-r--r--arch/i386/kernel/vmlinux.lds.S1
-rw-r--r--arch/i386/kernel/vsyscall-note.S49
-rw-r--r--arch/i386/mach-es7000/es7000plat.c48
-rw-r--r--arch/i386/mach-visws/traps.c4
-rw-r--r--arch/i386/mach-voyager/voyager_thread.c2
-rw-r--r--arch/i386/mm/init.c3
-rw-r--r--arch/i386/mm/pageattr.c2
-rw-r--r--arch/i386/pci/fixup.c9
-rw-r--r--arch/i386/video/Makefile1
-rw-r--r--arch/i386/video/fbdev.c32
-rw-r--r--arch/i386/xen/Kconfig11
-rw-r--r--arch/i386/xen/Makefile4
-rw-r--r--arch/i386/xen/enlighten.c1144
-rw-r--r--arch/i386/xen/events.c590
-rw-r--r--arch/i386/xen/features.c29
-rw-r--r--arch/i386/xen/manage.c143
-rw-r--r--arch/i386/xen/mmu.c564
-rw-r--r--arch/i386/xen/mmu.h60
-rw-r--r--arch/i386/xen/multicalls.c90
-rw-r--r--arch/i386/xen/multicalls.h45
-rw-r--r--arch/i386/xen/setup.c96
-rw-r--r--arch/i386/xen/smp.c404
-rw-r--r--arch/i386/xen/time.c590
-rw-r--r--arch/i386/xen/xen-asm.S291
-rw-r--r--arch/i386/xen/xen-head.S36
-rw-r--r--arch/i386/xen/xen-ops.h71
-rw-r--r--arch/ia64/Kconfig10
-rw-r--r--arch/ia64/hp/common/sba_iommu.c20
-rw-r--r--arch/ia64/hp/sim/boot/fw-emu.c5
-rw-r--r--arch/ia64/hp/sim/simserial.c4
-rw-r--r--arch/ia64/ia32/binfmt_elf32.c2
-rw-r--r--arch/ia64/ia32/ia32_entry.S2
-rw-r--r--arch/ia64/kernel/efi.c1
-rw-r--r--arch/ia64/kernel/fsys.S4
-rw-r--r--arch/ia64/kernel/gate.S1
-rw-r--r--arch/ia64/kernel/mca.c60
-rw-r--r--arch/ia64/kernel/mca_asm.S12
-rw-r--r--arch/ia64/kernel/mca_drv_asm.S6
-rw-r--r--arch/ia64/kernel/process.c3
-rw-r--r--arch/ia64/kernel/setup.c10
-rw-r--r--arch/ia64/kernel/time.c1
-rw-r--r--arch/ia64/kernel/traps.c1
-rw-r--r--arch/ia64/kernel/unwind.c16
-rw-r--r--arch/ia64/lib/checksum.c1
-rw-r--r--arch/ia64/mm/hugetlbpage.c3
-rw-r--r--arch/ia64/mm/tlb.c2
-rw-r--r--arch/ia64/pci/pci.c22
-rw-r--r--arch/ia64/sn/kernel/io_acpi_init.c17
-rw-r--r--arch/ia64/sn/kernel/io_init.c20
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_hwperf.c3
-rw-r--r--arch/ia64/sn/kernel/tiocx.c2
-rw-r--r--arch/ia64/sn/kernel/xp_nofault.S3
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_provider.c9
-rw-r--r--arch/ia64/sn/pci/tioca_provider.c4
-rw-r--r--arch/ia64/sn/pci/tioce_provider.c4
-rw-r--r--arch/m32r/Kconfig3
-rw-r--r--arch/m32r/kernel/ptrace.c19
-rw-r--r--arch/m68k/kernel/ptrace.c8
-rw-r--r--arch/m68k/kernel/traps.c1
-rw-r--r--arch/m68k/lib/checksum.c1
-rw-r--r--arch/m68knommu/kernel/process.c2
-rw-r--r--arch/m68knommu/kernel/ptrace.c17
-rw-r--r--arch/m68knommu/kernel/setup.c65
-rw-r--r--arch/m68knommu/kernel/traps.c1
-rw-r--r--arch/m68knommu/mm/memory.c80
-rw-r--r--arch/mips/Kconfig224
-rw-r--r--arch/mips/Kconfig.debug2
-rw-r--r--arch/mips/Makefile84
-rw-r--r--arch/mips/au1000/common/gpio.c124
-rw-r--r--arch/mips/au1000/common/platform.c2
-rw-r--r--arch/mips/au1000/common/setup.c9
-rw-r--r--arch/mips/au1000/common/time.c29
-rw-r--r--arch/mips/au1000/pb1100/init.c2
-rw-r--r--arch/mips/au1000/pb1200/board_setup.c9
-rw-r--r--arch/mips/au1000/pb1500/board_setup.c2
-rw-r--r--arch/mips/basler/excite/excite_setup.c1
-rw-r--r--arch/mips/cobalt/pci.c1
-rw-r--r--arch/mips/configs/atlas_defconfig4
-rw-r--r--arch/mips/configs/bigsur_defconfig4
-rw-r--r--arch/mips/configs/capcella_defconfig4
-rw-r--r--arch/mips/configs/cobalt_defconfig502
-rw-r--r--arch/mips/configs/db1000_defconfig4
-rw-r--r--arch/mips/configs/db1100_defconfig4
-rw-r--r--arch/mips/configs/db1200_defconfig4
-rw-r--r--arch/mips/configs/db1500_defconfig4
-rw-r--r--arch/mips/configs/db1550_defconfig4
-rw-r--r--arch/mips/configs/ddb5477_defconfig4
-rw-r--r--arch/mips/configs/decstation_defconfig4
-rw-r--r--arch/mips/configs/e55_defconfig4
-rw-r--r--arch/mips/configs/emma2rh_defconfig7
-rw-r--r--arch/mips/configs/ev64120_defconfig985
-rw-r--r--arch/mips/configs/excite_defconfig4
-rw-r--r--arch/mips/configs/fulong_defconfig1765
-rw-r--r--arch/mips/configs/ip22_defconfig4
-rw-r--r--arch/mips/configs/ip27_defconfig4
-rw-r--r--arch/mips/configs/ip32_defconfig4
-rw-r--r--arch/mips/configs/jazz_defconfig6
-rw-r--r--arch/mips/configs/jmr3927_defconfig4
-rw-r--r--arch/mips/configs/lasat200_defconfig1118
-rw-r--r--arch/mips/configs/malta_defconfig4
-rw-r--r--arch/mips/configs/mipssim_defconfig37
-rw-r--r--arch/mips/configs/mpc30x_defconfig4
-rw-r--r--arch/mips/configs/msp71xx_defconfig (renamed from arch/mips/configs/ocelot_3_defconfig)972
-rw-r--r--arch/mips/configs/ocelot_c_defconfig982
-rw-r--r--arch/mips/configs/ocelot_defconfig4
-rw-r--r--arch/mips/configs/pb1100_defconfig4
-rw-r--r--arch/mips/configs/pb1500_defconfig4
-rw-r--r--arch/mips/configs/pb1550_defconfig4
-rw-r--r--arch/mips/configs/pnx8550-jbs_defconfig4
-rw-r--r--arch/mips/configs/pnx8550-stb810_defconfig4
-rw-r--r--arch/mips/configs/qemu_defconfig6
-rw-r--r--arch/mips/configs/rbhma4200_defconfig4
-rw-r--r--arch/mips/configs/rbhma4500_defconfig945
-rw-r--r--arch/mips/configs/rm200_defconfig6
-rw-r--r--arch/mips/configs/sb1250-swarm_defconfig4
-rw-r--r--arch/mips/configs/sead_defconfig4
-rw-r--r--arch/mips/configs/tb0219_defconfig4
-rw-r--r--arch/mips/configs/tb0226_defconfig4
-rw-r--r--arch/mips/configs/tb0287_defconfig4
-rw-r--r--arch/mips/configs/workpad_defconfig4
-rw-r--r--arch/mips/configs/wrppmc_defconfig4
-rw-r--r--arch/mips/configs/yosemite_defconfig6
-rw-r--r--arch/mips/ddb5xxx/ddb5477/Makefile3
-rw-r--r--arch/mips/ddb5xxx/ddb5477/ddb5477-platform.c49
-rw-r--r--arch/mips/dec/prom/console.c32
-rw-r--r--arch/mips/dec/prom/init.c5
-rw-r--r--arch/mips/dec/reset.c10
-rw-r--r--arch/mips/defconfig4
-rw-r--r--arch/mips/gt64120/ev64120/Kconfig3
-rw-r--r--arch/mips/gt64120/ev64120/Makefile9
-rw-r--r--arch/mips/gt64120/ev64120/irq.c116
-rw-r--r--arch/mips/gt64120/ev64120/promcon.c48
-rw-r--r--arch/mips/gt64120/ev64120/reset.c45
-rw-r--r--arch/mips/gt64120/ev64120/serialGT.c212
-rw-r--r--arch/mips/gt64120/ev64120/setup.c99
-rw-r--r--arch/mips/gt64120/momenco_ocelot/Makefile2
-rw-r--r--arch/mips/gt64120/momenco_ocelot/ocelot-platform.c46
-rw-r--r--arch/mips/gt64120/wrppmc/setup.c5
-rw-r--r--arch/mips/jazz/Makefile2
-rw-r--r--arch/mips/jazz/jazz-platform.c60
-rw-r--r--arch/mips/jazz/setup.c2
-rw-r--r--arch/mips/kernel/8250-platform.c47
-rw-r--r--arch/mips/kernel/Makefile19
-rw-r--r--arch/mips/kernel/branch.c5
-rw-r--r--arch/mips/kernel/cpu-probe.c57
-rw-r--r--arch/mips/kernel/entry.S2
-rw-r--r--arch/mips/kernel/genex.S2
-rw-r--r--arch/mips/kernel/head.S10
-rw-r--r--arch/mips/kernel/irq-mv6434x.c111
-rw-r--r--arch/mips/kernel/mips-mt-fpaff.c176
-rw-r--r--arch/mips/kernel/mips-mt.c205
-rw-r--r--arch/mips/kernel/pcspeaker.c (renamed from arch/mips/kernel/i8253.c)0
-rw-r--r--arch/mips/kernel/proc.c2
-rw-r--r--arch/mips/kernel/process.c4
-rw-r--r--arch/mips/kernel/ptrace.c18
-rw-r--r--arch/mips/kernel/r4k_switch.S7
-rw-r--r--arch/mips/kernel/setup.c16
-rw-r--r--arch/mips/kernel/signal32.c62
-rw-r--r--arch/mips/kernel/signal_n32.c6
-rw-r--r--arch/mips/kernel/smp-mt.c4
-rw-r--r--arch/mips/kernel/smp.c13
-rw-r--r--arch/mips/kernel/smtc.c4
-rw-r--r--arch/mips/kernel/syscall.c5
-rw-r--r--arch/mips/kernel/traps.c96
-rw-r--r--arch/mips/kernel/unaligned.c41
-rw-r--r--arch/mips/kernel/vpe.c4
-rw-r--r--arch/mips/lasat/Kconfig15
-rw-r--r--arch/mips/lasat/Makefile14
-rw-r--r--arch/mips/lasat/at93c.c148
-rw-r--r--arch/mips/lasat/at93c.h18
-rw-r--r--arch/mips/lasat/ds1603.c183
-rw-r--r--arch/mips/lasat/ds1603.h33
-rw-r--r--arch/mips/lasat/image/Makefile53
-rw-r--r--arch/mips/lasat/image/head.S31
-rw-r--r--arch/mips/lasat/image/romscript.normal23
-rw-r--r--arch/mips/lasat/interrupt.c130
-rw-r--r--arch/mips/lasat/lasat_board.c279
-rw-r--r--arch/mips/lasat/lasat_models.h63
-rw-r--r--arch/mips/lasat/picvue.c240
-rw-r--r--arch/mips/lasat/picvue.h48
-rw-r--r--arch/mips/lasat/picvue_proc.c186
-rw-r--r--arch/mips/lasat/prom.c117
-rw-r--r--arch/mips/lasat/prom.h5
-rw-r--r--arch/mips/lasat/reset.c69
-rw-r--r--arch/mips/lasat/setup.c182
-rw-r--r--arch/mips/lasat/sysctl.c441
-rw-r--r--arch/mips/lasat/sysctl.h24
-rw-r--r--arch/mips/lemote/lm2e/Makefile7
-rw-r--r--arch/mips/lemote/lm2e/bonito-irq.c74
-rw-r--r--arch/mips/lemote/lm2e/dbg_io.c146
-rw-r--r--arch/mips/lemote/lm2e/irq.c145
-rw-r--r--arch/mips/lemote/lm2e/mem.c23
-rw-r--r--arch/mips/lemote/lm2e/pci.c93
-rw-r--r--arch/mips/lemote/lm2e/prom.c104
-rw-r--r--arch/mips/lemote/lm2e/reset.c41
-rw-r--r--arch/mips/lemote/lm2e/setup.c134
-rw-r--r--arch/mips/lib-32/Makefile23
-rw-r--r--arch/mips/lib-32/dump_tlb.c242
-rw-r--r--arch/mips/lib-32/r3k_dump_tlb.c182
-rw-r--r--arch/mips/lib-32/watch.S60
-rw-r--r--arch/mips/lib-64/Makefile23
-rw-r--r--arch/mips/lib-64/dump_tlb.c216
-rw-r--r--arch/mips/lib-64/watch.S57
-rw-r--r--arch/mips/lib/Makefile21
-rw-r--r--arch/mips/lib/dump_tlb.c101
-rw-r--r--arch/mips/lib/r3k_dump_tlb.c63
-rw-r--r--arch/mips/lib/ucmpdi2.c2
-rw-r--r--arch/mips/lib/uncached.c1
-rw-r--r--arch/mips/math-emu/cp1emu.c53
-rw-r--r--arch/mips/math-emu/dsemul.c12
-rw-r--r--arch/mips/mips-boards/atlas/atlas_setup.c1
-rw-r--r--arch/mips/mips-boards/malta/Makefile3
-rw-r--r--arch/mips/mips-boards/malta/malta_platform.c65
-rw-r--r--arch/mips/mips-boards/sead/sead_setup.c1
-rw-r--r--arch/mips/mipssim/Makefile (renamed from arch/mips/mips-boards/sim/Makefile)0
-rw-r--r--arch/mips/mipssim/sim_cmdline.c (renamed from arch/mips/mips-boards/sim/sim_cmdline.c)0
-rw-r--r--arch/mips/mipssim/sim_console.c (renamed from arch/mips/mips-boards/sim/sim_console.c)2
-rw-r--r--arch/mips/mipssim/sim_int.c88
-rw-r--r--arch/mips/mipssim/sim_mem.c (renamed from arch/mips/mips-boards/sim/sim_mem.c)2
-rw-r--r--arch/mips/mipssim/sim_platform.c (renamed from arch/mips/mips-boards/sim/sim_platform.c)0
-rw-r--r--arch/mips/mipssim/sim_setup.c (renamed from arch/mips/mips-boards/sim/sim_setup.c)11
-rw-r--r--arch/mips/mipssim/sim_smp.c (renamed from arch/mips/mips-boards/sim/sim_smp.c)18
-rw-r--r--arch/mips/mipssim/sim_time.c (renamed from arch/mips/mips-boards/sim/sim_time.c)29
-rw-r--r--arch/mips/mm/Makefile1
-rw-r--r--arch/mips/mm/c-r4k.c54
-rw-r--r--arch/mips/mm/c-sb1.c2
-rw-r--r--arch/mips/mm/cache.c10
-rw-r--r--arch/mips/mm/tlb-r4k.c23
-rw-r--r--arch/mips/mm/tlbex.c8
-rw-r--r--arch/mips/momentum/ocelot_3/Makefile8
-rw-r--r--arch/mips/momentum/ocelot_3/irq.c109
-rw-r--r--arch/mips/momentum/ocelot_3/platform.c208
-rw-r--r--arch/mips/momentum/ocelot_3/prom.c189
-rw-r--r--arch/mips/momentum/ocelot_3/reset.c59
-rw-r--r--arch/mips/momentum/ocelot_3/setup.c398
-rw-r--r--arch/mips/momentum/ocelot_c/Makefile8
-rw-r--r--arch/mips/momentum/ocelot_c/cpci-irq.c100
-rw-r--r--arch/mips/momentum/ocelot_c/dbg_io.c121
-rw-r--r--arch/mips/momentum/ocelot_c/irq.c107
-rw-r--r--arch/mips/momentum/ocelot_c/platform.c183
-rw-r--r--arch/mips/momentum/ocelot_c/prom.c183
-rw-r--r--arch/mips/momentum/ocelot_c/reset.c58
-rw-r--r--arch/mips/momentum/ocelot_c/setup.c362
-rw-r--r--arch/mips/momentum/ocelot_c/uart-irq.c91
-rw-r--r--arch/mips/pci/Makefile12
-rw-r--r--arch/mips/pci/fixup-atlas.c2
-rw-r--r--arch/mips/pci/fixup-au1000.c2
-rw-r--r--arch/mips/pci/fixup-capcella.c2
-rw-r--r--arch/mips/pci/fixup-cobalt.c12
-rw-r--r--arch/mips/pci/fixup-emma2rh.c2
-rw-r--r--arch/mips/pci/fixup-excite.c2
-rw-r--r--arch/mips/pci/fixup-ip32.c2
-rw-r--r--arch/mips/pci/fixup-jmr3927.c2
-rw-r--r--arch/mips/pci/fixup-lm2e.c242
-rw-r--r--arch/mips/pci/fixup-malta.c2
-rw-r--r--arch/mips/pci/fixup-mpc30x.c2
-rw-r--r--arch/mips/pci/fixup-ocelot-c.c41
-rw-r--r--arch/mips/pci/fixup-ocelot3.c41
-rw-r--r--arch/mips/pci/fixup-pmcmsp.c216
-rw-r--r--arch/mips/pci/fixup-pnx8550.c2
-rw-r--r--arch/mips/pci/fixup-rbtx4927.c2
-rw-r--r--arch/mips/pci/fixup-sni.c2
-rw-r--r--arch/mips/pci/fixup-tb0219.c2
-rw-r--r--arch/mips/pci/fixup-tb0226.c2
-rw-r--r--arch/mips/pci/fixup-tb0287.c2
-rw-r--r--arch/mips/pci/fixup-tx4938.c2
-rw-r--r--arch/mips/pci/fixup-vr4133.c2
-rw-r--r--arch/mips/pci/fixup-wrppmc.c2
-rw-r--r--arch/mips/pci/fixup-yosemite.c2
-rw-r--r--arch/mips/pci/ops-bonito64.c88
-rw-r--r--arch/mips/pci/ops-marvell.c93
-rw-r--r--arch/mips/pci/ops-nile4.c147
-rw-r--r--arch/mips/pci/ops-pmcmsp.c994
-rw-r--r--arch/mips/pci/ops-tx4938.c80
-rw-r--r--arch/mips/pci/pci-bcm1480.c3
-rw-r--r--arch/mips/pci/pci-dac.c79
-rw-r--r--arch/mips/pci/pci-ddb5477.c2
-rw-r--r--arch/mips/pci/pci-ev64120.c22
-rw-r--r--arch/mips/pci/pci-ip27.c2
-rw-r--r--arch/mips/pci/pci-lasat.c91
-rw-r--r--arch/mips/pci/pci-ocelot-c.c145
-rw-r--r--arch/mips/pci/pci-sb1250.c2
-rw-r--r--arch/mips/pci/pci.c2
-rw-r--r--arch/mips/philips/pnx8550/common/platform.c2
-rw-r--r--arch/mips/philips/pnx8550/common/proc.c30
-rw-r--r--arch/mips/pmc-sierra/Kconfig46
-rw-r--r--arch/mips/pmc-sierra/msp71xx/Makefile11
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_elb.c (renamed from arch/mips/momentum/ocelot_c/ocelot_c_fpga.h)53
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_hwbutton.c179
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_irq.c124
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c134
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c109
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_pci.c (renamed from arch/mips/momentum/ocelot_3/ocelot_3_fpga.h)57
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_prom.c566
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_serial.c1
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_setup.c256
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_time.c94
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_usb.c150
-rw-r--r--arch/mips/pmc-sierra/yosemite/setup.c1
-rw-r--r--arch/mips/pmc-sierra/yosemite/smp.c2
-rw-r--r--arch/mips/sgi-ip22/ip22-reset.c6
-rw-r--r--arch/mips/sgi-ip27/ip27-berr.c1
-rw-r--r--arch/mips/sgi-ip32/ip32-platform.c52
-rw-r--r--arch/mips/sgi-ip32/ip32-setup.c36
-rw-r--r--arch/mips/sibyte/bcm1480/setup.c1
-rw-r--r--arch/mips/sibyte/cfe/setup.c6
-rw-r--r--arch/mips/sibyte/sb1250/setup.c1
-rw-r--r--arch/mips/sibyte/swarm/time.c244
-rw-r--r--arch/mips/sni/Makefile2
-rw-r--r--arch/mips/sni/a20r.c39
-rw-r--r--arch/mips/sni/ds1216.c81
-rw-r--r--arch/mips/sni/pcimt.c26
-rw-r--r--arch/mips/sni/pcit.c26
-rw-r--r--arch/mips/sni/rm200.c36
-rw-r--r--arch/mips/sni/sniprom.c5
-rw-r--r--arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c19
-rw-r--r--arch/mips/tx4938/common/Makefile2
-rw-r--r--arch/mips/tx4938/common/rtc_rx5c348.c192
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/Makefile2
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/irq.c6
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/setup.c306
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c261
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c164
-rw-r--r--arch/mips/vr41xx/common/Makefile2
-rw-r--r--arch/mips/vr41xx/common/giu.c122
-rw-r--r--arch/mips/vr41xx/common/rtc.c117
-rw-r--r--arch/mips/vr41xx/common/siu.c120
-rw-r--r--arch/parisc/kernel/ptrace.c13
-rw-r--r--arch/parisc/kernel/traps.c3
-rw-r--r--arch/parisc/kernel/unwind.c2
-rw-r--r--arch/powerpc/Kconfig280
-rw-r--r--arch/powerpc/Makefile2
-rw-r--r--arch/powerpc/boot/44x.c45
-rw-r--r--arch/powerpc/boot/44x.h3
-rw-r--r--arch/powerpc/boot/Makefile81
-rw-r--r--arch/powerpc/boot/cuboot-83xx.c13
-rw-r--r--arch/powerpc/boot/cuboot-85xx.c13
-rw-r--r--arch/powerpc/boot/cuboot-ebony.c16
-rw-r--r--arch/powerpc/boot/cuboot.c35
-rw-r--r--arch/powerpc/boot/cuboot.h14
-rw-r--r--arch/powerpc/boot/dcr.h37
-rw-r--r--arch/powerpc/boot/dts/ebony.dts12
-rw-r--r--arch/powerpc/boot/dts/holly.dts52
-rw-r--r--arch/powerpc/boot/dts/mpc7448hpc2.dts33
-rw-r--r--arch/powerpc/boot/dts/mpc8272ads.dts42
-rw-r--r--arch/powerpc/boot/dts/mpc832x_mds.dts16
-rw-r--r--arch/powerpc/boot/dts/mpc832x_rdb.dts16
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitx.dts10
-rw-r--r--arch/powerpc/boot/dts/mpc834x_mds.dts10
-rw-r--r--arch/powerpc/boot/dts/mpc836x_mds.dts16
-rw-r--r--arch/powerpc/boot/dts/mpc8540ads.dts147
-rw-r--r--arch/powerpc/boot/dts/mpc8541cds.dts90
-rw-r--r--arch/powerpc/boot/dts/mpc8544ds.dts18
-rw-r--r--arch/powerpc/boot/dts/mpc8548cds.dts108
-rw-r--r--arch/powerpc/boot/dts/mpc8555cds.dts90
-rw-r--r--arch/powerpc/boot/dts/mpc8560ads.dts148
-rw-r--r--arch/powerpc/boot/dts/mpc8568mds.dts66
-rw-r--r--arch/powerpc/boot/dts/mpc8641_hpcn.dts147
-rw-r--r--arch/powerpc/boot/dts/mpc866ads.dts31
-rw-r--r--arch/powerpc/boot/dts/mpc885ads.dts54
-rw-r--r--arch/powerpc/boot/dts/prpmc2800.dts2
-rw-r--r--arch/powerpc/boot/dts/ps3.dts68
-rw-r--r--arch/powerpc/boot/ebony.c19
-rw-r--r--arch/powerpc/boot/main.c2
-rw-r--r--arch/powerpc/boot/of.c212
-rw-r--r--arch/powerpc/boot/of.h21
-rw-r--r--arch/powerpc/boot/ofconsole.c45
-rw-r--r--arch/powerpc/boot/oflib.c202
-rw-r--r--arch/powerpc/boot/ops.h4
-rw-r--r--arch/powerpc/boot/ps3-head.S80
-rw-r--r--arch/powerpc/boot/ps3-hvcall.S184
-rw-r--r--arch/powerpc/boot/ps3.c161
-rw-r--r--arch/powerpc/boot/serial.c2
-rw-r--r--arch/powerpc/boot/stdio.c10
-rw-r--r--arch/powerpc/boot/types.h4
-rwxr-xr-xarch/powerpc/boot/wrapper55
-rw-r--r--arch/powerpc/boot/zImage.ps3.lds.S50
-rw-r--r--arch/powerpc/configs/cell_defconfig243
-rw-r--r--arch/powerpc/configs/celleb_defconfig169
-rw-r--r--arch/powerpc/configs/chrp32_defconfig353
-rw-r--r--arch/powerpc/configs/ebony_defconfig138
-rw-r--r--arch/powerpc/configs/g5_defconfig342
-rw-r--r--arch/powerpc/configs/holly_defconfig131
-rw-r--r--arch/powerpc/configs/iseries_defconfig36
-rw-r--r--arch/powerpc/configs/linkstation_defconfig384
-rw-r--r--arch/powerpc/configs/lite5200_defconfig182
-rw-r--r--arch/powerpc/configs/maple_defconfig248
-rw-r--r--arch/powerpc/configs/mpc7448_hpc2_defconfig212
-rw-r--r--arch/powerpc/configs/mpc8272_ads_defconfig293
-rw-r--r--arch/powerpc/configs/mpc8313_rdb_defconfig310
-rw-r--r--arch/powerpc/configs/mpc832x_mds_defconfig176
-rw-r--r--arch/powerpc/configs/mpc832x_rdb_defconfig229
-rw-r--r--arch/powerpc/configs/mpc834x_itx_defconfig265
-rw-r--r--arch/powerpc/configs/mpc834x_itxgp_defconfig232
-rw-r--r--arch/powerpc/configs/mpc834x_mds_defconfig195
-rw-r--r--arch/powerpc/configs/mpc836x_mds_defconfig176
-rw-r--r--arch/powerpc/configs/mpc8540_ads_defconfig201
-rw-r--r--arch/powerpc/configs/mpc8544_ds_defconfig193
-rw-r--r--arch/powerpc/configs/mpc8560_ads_defconfig201
-rw-r--r--arch/powerpc/configs/mpc8568mds_defconfig191
-rw-r--r--arch/powerpc/configs/mpc85xx_cds_defconfig206
-rw-r--r--arch/powerpc/configs/mpc8641_hpcn_defconfig200
-rw-r--r--arch/powerpc/configs/mpc866_ads_defconfig213
-rw-r--r--arch/powerpc/configs/mpc885_ads_defconfig222
-rw-r--r--arch/powerpc/configs/pasemi_defconfig58
-rw-r--r--arch/powerpc/configs/pmac32_defconfig375
-rw-r--r--arch/powerpc/configs/ppc64_defconfig460
-rw-r--r--arch/powerpc/configs/prpmc2800_defconfig98
-rw-r--r--arch/powerpc/configs/ps3_defconfig131
-rw-r--r--arch/powerpc/configs/pseries_defconfig387
-rw-r--r--arch/powerpc/kernel/Makefile7
-rw-r--r--arch/powerpc/kernel/cputable.c35
-rw-r--r--arch/powerpc/kernel/head_32.S122
-rw-r--r--arch/powerpc/kernel/head_64.S4
-rw-r--r--arch/powerpc/kernel/io.c12
-rw-r--r--arch/powerpc/kernel/irq.c66
-rw-r--r--arch/powerpc/kernel/isa-bridge.c271
-rw-r--r--arch/powerpc/kernel/misc_32.S10
-rw-r--r--arch/powerpc/kernel/misc_64.S26
-rw-r--r--arch/powerpc/kernel/of_platform.c8
-rw-r--r--arch/powerpc/kernel/pci-common.c457
-rw-r--r--arch/powerpc/kernel/pci_32.c510
-rw-r--r--arch/powerpc/kernel/pci_64.c752
-rw-r--r--arch/powerpc/kernel/ppc_ksyms.c5
-rw-r--r--arch/powerpc/kernel/process.c14
-rw-r--r--arch/powerpc/kernel/prom.c29
-rw-r--r--arch/powerpc/kernel/prom_init.c4
-rw-r--r--arch/powerpc/kernel/ptrace-common.h161
-rw-r--r--arch/powerpc/kernel/ptrace.c343
-rw-r--r--arch/powerpc/kernel/ptrace32.c239
-rw-r--r--arch/powerpc/kernel/rtas_pci.c7
-rw-r--r--arch/powerpc/kernel/setup-common.c21
-rw-r--r--arch/powerpc/kernel/setup_32.c12
-rw-r--r--arch/powerpc/kernel/signal.c180
-rw-r--r--arch/powerpc/kernel/signal.h55
-rw-r--r--arch/powerpc/kernel/signal_32.c191
-rw-r--r--arch/powerpc/kernel/signal_64.c192
-rw-r--r--arch/powerpc/kernel/sys_ppc32.c16
-rw-r--r--arch/powerpc/kernel/sysfs.c5
-rw-r--r--arch/powerpc/kernel/time.c65
-rw-r--r--arch/powerpc/kernel/traps.c3
-rw-r--r--arch/powerpc/kernel/vdso.c2
-rw-r--r--arch/powerpc/kernel/vdso32/gettimeofday.S4
-rw-r--r--arch/powerpc/kernel/vdso64/gettimeofday.S7
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S6
-rw-r--r--arch/powerpc/mm/44x_mmu.c1
-rw-r--r--arch/powerpc/mm/4xx_mmu.c1
-rw-r--r--arch/powerpc/mm/Makefile3
-rw-r--r--arch/powerpc/mm/fault.c2
-rw-r--r--arch/powerpc/mm/fsl_booke_mmu.c1
-rw-r--r--arch/powerpc/mm/hash_native_64.c27
-rw-r--r--arch/powerpc/mm/hash_utils_64.c2
-rw-r--r--arch/powerpc/mm/imalloc.c313
-rw-r--r--arch/powerpc/mm/init_32.c1
-rw-r--r--arch/powerpc/mm/init_64.c1
-rw-r--r--arch/powerpc/mm/mem.c3
-rw-r--r--arch/powerpc/mm/mmu_context_32.c1
-rw-r--r--arch/powerpc/mm/mmu_decl.h17
-rw-r--r--arch/powerpc/mm/pgtable_32.c123
-rw-r--r--arch/powerpc/mm/pgtable_64.c206
-rw-r--r--arch/powerpc/mm/ppc_mmu_32.c7
-rw-r--r--arch/powerpc/mm/stab.c4
-rw-r--r--arch/powerpc/mm/tlb_32.c1
-rw-r--r--arch/powerpc/mm/tlb_64.c57
-rw-r--r--arch/powerpc/oprofile/op_model_power4.c14
-rw-r--r--arch/powerpc/platforms/52xx/efika.c13
-rw-r--r--arch/powerpc/platforms/52xx/lite5200.c2
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pci.c18
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pm.c8
-rw-r--r--arch/powerpc/platforms/82xx/Kconfig2
-rw-r--r--arch/powerpc/platforms/82xx/mpc82xx_ads.c17
-rw-r--r--arch/powerpc/platforms/83xx/Kconfig2
-rw-r--r--arch/powerpc/platforms/83xx/Makefile2
-rw-r--r--arch/powerpc/platforms/83xx/mpc8313_rdb.c8
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_mds.c7
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_rdb.c7
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_itx.c9
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_mds.c56
-rw-r--r--arch/powerpc/platforms/83xx/mpc836x_mds.c7
-rw-r--r--arch/powerpc/platforms/83xx/mpc83xx.h34
-rw-r--r--arch/powerpc/platforms/83xx/pci.c18
-rw-r--r--arch/powerpc/platforms/83xx/usb.c181
-rw-r--r--arch/powerpc/platforms/85xx/misc.c32
-rw-r--r--arch/powerpc/platforms/85xx/mpc8544_ds.c15
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx.h2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c32
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c116
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c28
-rw-r--r--arch/powerpc/platforms/85xx/pci.c11
-rw-r--r--arch/powerpc/platforms/86xx/Kconfig2
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx.h11
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c27
-rw-r--r--arch/powerpc/platforms/86xx/pci.c67
-rw-r--r--arch/powerpc/platforms/8xx/m8xx_setup.c5
-rw-r--r--arch/powerpc/platforms/8xx/mpc885ads_setup.c188
-rw-r--r--arch/powerpc/platforms/Kconfig29
-rw-r--r--arch/powerpc/platforms/Kconfig.cputype221
-rw-r--r--arch/powerpc/platforms/apus/Kconfig130
-rw-r--r--arch/powerpc/platforms/cell/cbe_cpufreq.c15
-rw-r--r--arch/powerpc/platforms/cell/io-workarounds.c2
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c74
-rw-r--r--arch/powerpc/platforms/cell/spu_manage.c4
-rw-r--r--arch/powerpc/platforms/cell/spufs/backing_ops.c6
-rw-r--r--arch/powerpc/platforms/cell/spufs/context.c15
-rw-r--r--arch/powerpc/platforms/cell/spufs/fault.c29
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c149
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c10
-rw-r--r--arch/powerpc/platforms/cell/spufs/run.c45
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c476
-rw-r--r--arch/powerpc/platforms/cell/spufs/spu_restore.c2
-rw-r--r--arch/powerpc/platforms/cell/spufs/spu_save.c2
-rw-r--r--arch/powerpc/platforms/cell/spufs/spufs.h84
-rw-r--r--arch/powerpc/platforms/cell/spufs/switch.c18
-rw-r--r--arch/powerpc/platforms/chrp/Kconfig1
-rw-r--r--arch/powerpc/platforms/chrp/Makefile3
-rw-r--r--arch/powerpc/platforms/chrp/pci.c7
-rw-r--r--arch/powerpc/platforms/embedded6xx/Kconfig2
-rw-r--r--arch/powerpc/platforms/embedded6xx/holly.c2
-rw-r--r--arch/powerpc/platforms/embedded6xx/linkstation.c10
-rw-r--r--arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c9
-rw-r--r--arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h5
-rw-r--r--arch/powerpc/platforms/iseries/call_hpt.h9
-rw-r--r--arch/powerpc/platforms/iseries/htab.c8
-rw-r--r--arch/powerpc/platforms/iseries/pci.c7
-rw-r--r--arch/powerpc/platforms/iseries/setup.c6
-rw-r--r--arch/powerpc/platforms/maple/pci.c41
-rw-r--r--arch/powerpc/platforms/pasemi/Kconfig9
-rw-r--r--arch/powerpc/platforms/pasemi/Makefile1
-rw-r--r--arch/powerpc/platforms/pasemi/electra_ide.c96
-rw-r--r--arch/powerpc/platforms/pasemi/pci.c24
-rw-r--r--arch/powerpc/platforms/pasemi/setup.c2
-rw-r--r--arch/powerpc/platforms/powermac/Kconfig1
-rw-r--r--arch/powerpc/platforms/powermac/low_i2c.c23
-rw-r--r--arch/powerpc/platforms/powermac/pci.c46
-rw-r--r--arch/powerpc/platforms/ps3/Kconfig26
-rw-r--r--arch/powerpc/platforms/ps3/Makefile1
-rw-r--r--arch/powerpc/platforms/ps3/device-init.c785
-rw-r--r--arch/powerpc/platforms/ps3/htab.c31
-rw-r--r--arch/powerpc/platforms/ps3/interrupt.c272
-rw-r--r--arch/powerpc/platforms/ps3/mm.c632
-rw-r--r--arch/powerpc/platforms/ps3/os-area.c4
-rw-r--r--arch/powerpc/platforms/ps3/platform.h43
-rw-r--r--arch/powerpc/platforms/ps3/repository.c586
-rw-r--r--arch/powerpc/platforms/ps3/setup.c105
-rw-r--r--arch/powerpc/platforms/ps3/smp.c18
-rw-r--r--arch/powerpc/platforms/ps3/spu.c19
-rw-r--r--arch/powerpc/platforms/ps3/system-bus.c562
-rw-r--r--arch/powerpc/platforms/ps3/time.c2
-rw-r--r--arch/powerpc/platforms/pseries/Makefile2
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c19
-rw-r--r--arch/powerpc/platforms/pseries/eeh_cache.c5
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c6
-rw-r--r--arch/powerpc/platforms/pseries/eeh_sysfs.c87
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c17
-rw-r--r--arch/powerpc/platforms/pseries/pci_dlpar.c9
-rw-r--r--arch/powerpc/platforms/pseries/plpar_wrappers.h15
-rw-r--r--arch/powerpc/platforms/pseries/pseries.h2
-rw-r--r--arch/powerpc/platforms/pseries/reconfig.c2
-rw-r--r--arch/powerpc/platforms/pseries/setup.c4
-rw-r--r--arch/powerpc/platforms/pseries/xics.c53
-rw-r--r--arch/powerpc/sysdev/Makefile6
-rw-r--r--arch/powerpc/sysdev/fsl_pcie.c171
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c13
-rw-r--r--arch/powerpc/sysdev/indirect_pci.c44
-rw-r--r--arch/powerpc/sysdev/mpc8xx_pic.h11
-rw-r--r--arch/powerpc/sysdev/mv64x60_dev.c28
-rw-r--r--arch/powerpc/sysdev/mv64x60_pci.c7
-rw-r--r--arch/powerpc/sysdev/qe_lib/ucc.c2
-rw-r--r--arch/powerpc/sysdev/qe_lib/ucc_fast.c8
-rw-r--r--arch/powerpc/sysdev/rtc_cmos_setup.c49
-rw-r--r--arch/powerpc/sysdev/timer.c14
-rw-r--r--arch/powerpc/sysdev/tsi108_dev.c33
-rw-r--r--arch/powerpc/sysdev/tsi108_pci.c10
-rw-r--r--arch/powerpc/xmon/xmon.c2
-rw-r--r--arch/ppc/8260_io/enet.c4
-rw-r--r--arch/ppc/8260_io/fcc_enet.c4
-rw-r--r--arch/ppc/8xx_io/enet.c4
-rw-r--r--arch/ppc/8xx_io/fec.c2
-rw-r--r--arch/ppc/Kconfig6
-rw-r--r--arch/ppc/kernel/misc.S8
-rw-r--r--arch/ppc/kernel/pci.c6
-rw-r--r--arch/ppc/kernel/ppc_ksyms.c1
-rw-r--r--arch/ppc/kernel/setup.c2
-rw-r--r--arch/ppc/kernel/traps.c3
-rw-r--r--arch/ppc/mm/tlb.c1
-rw-r--r--arch/ppc/platforms/4xx/bamboo.c1
-rw-r--r--arch/ppc/platforms/4xx/bubinga.c1
-rw-r--r--arch/ppc/platforms/4xx/cpci405.c1
-rw-r--r--arch/ppc/platforms/4xx/ebony.c1
-rw-r--r--arch/ppc/platforms/4xx/luan.c1
-rw-r--r--arch/ppc/platforms/4xx/ocotea.c1
-rw-r--r--arch/ppc/platforms/4xx/taishan.c1
-rw-r--r--arch/ppc/platforms/4xx/yucca.c1
-rw-r--r--arch/ppc/platforms/85xx/sbc8560.c1
-rw-r--r--arch/ppc/platforms/chestnut.c1
-rw-r--r--arch/ppc/platforms/ev64260.c1
-rw-r--r--arch/ppc/platforms/prep_setup.c3
-rw-r--r--arch/ppc/platforms/radstone_ppc7d.c1
-rw-r--r--arch/ppc/platforms/spruce.c1
-rw-r--r--arch/ppc/syslib/Makefile1
-rw-r--r--arch/ppc/syslib/indirect_pci.c134
-rw-r--r--arch/ppc/syslib/mv64x60.c1
-rw-r--r--arch/ppc/syslib/virtex_devices.c38
-rw-r--r--arch/ppc/syslib/virtex_devices.h7
-rw-r--r--arch/s390/Makefile2
-rw-r--r--arch/s390/crypto/crypt_s390.h2
-rw-r--r--arch/s390/defconfig110
-rw-r--r--arch/s390/kernel/dis.c7
-rw-r--r--arch/s390/kernel/early.c45
-rw-r--r--arch/s390/kernel/entry.S7
-rw-r--r--arch/s390/kernel/entry64.S7
-rw-r--r--arch/s390/kernel/ipl.c29
-rw-r--r--arch/s390/kernel/process.c6
-rw-r--r--arch/s390/kernel/ptrace.c11
-rw-r--r--arch/s390/kernel/smp.c63
-rw-r--r--arch/s390/kernel/stacktrace.c26
-rw-r--r--arch/s390/kernel/time.c4
-rw-r--r--arch/s390/kernel/traps.c3
-rw-r--r--arch/s390/kernel/vtime.c4
-rw-r--r--arch/s390/lib/Makefile4
-rw-r--r--arch/sh/Kconfig441
-rw-r--r--arch/sh/Kconfig.debug5
-rw-r--r--arch/sh/Makefile104
-rw-r--r--arch/sh/boards/dreamcast/setup.c3
-rw-r--r--arch/sh/boards/hp6xx/mach.c46
-rw-r--r--arch/sh/boards/hp6xx/setup.c3
-rw-r--r--arch/sh/boards/landisk/setup.c3
-rw-r--r--arch/sh/boards/lboxre2/setup.c3
-rw-r--r--arch/sh/boards/mpc1211/setup.c3
-rw-r--r--arch/sh/boards/renesas/edosk7705/setup.c3
-rw-r--r--arch/sh/boards/renesas/hs7751rvoip/setup.c3
-rw-r--r--arch/sh/boards/renesas/r7780rp/Kconfig6
-rw-r--r--arch/sh/boards/renesas/r7780rp/setup.c3
-rw-r--r--arch/sh/boards/renesas/rts7751r2d/setup.c3
-rw-r--r--arch/sh/boards/renesas/sh7710voipgw/setup.c3
-rw-r--r--arch/sh/boards/renesas/systemh/setup.c3
-rw-r--r--arch/sh/boards/saturn/Makefile8
-rw-r--r--arch/sh/boards/saturn/io.c26
-rw-r--r--arch/sh/boards/saturn/irq.c118
-rw-r--r--arch/sh/boards/saturn/setup.c31
-rw-r--r--arch/sh/boards/saturn/smp.c68
-rw-r--r--arch/sh/boards/se/7206/setup.c3
-rw-r--r--arch/sh/boards/se/7300/setup.c3
-rw-r--r--arch/sh/boards/se/73180/setup.c3
-rw-r--r--arch/sh/boards/se/7343/setup.c3
-rw-r--r--arch/sh/boards/se/7619/setup.c3
-rw-r--r--arch/sh/boards/se/770x/irq.c124
-rw-r--r--arch/sh/boards/se/770x/setup.c3
-rw-r--r--arch/sh/boards/se/7722/irq.c15
-rw-r--r--arch/sh/boards/se/7722/setup.c3
-rw-r--r--arch/sh/boards/se/7751/irq.c59
-rw-r--r--arch/sh/boards/se/7751/setup.c3
-rw-r--r--arch/sh/boards/se/7780/irq.c45
-rw-r--r--arch/sh/boards/se/7780/setup.c3
-rw-r--r--arch/sh/boards/sh03/setup.c31
-rw-r--r--arch/sh/boards/shmin/setup.c33
-rw-r--r--arch/sh/boards/snapgear/setup.c31
-rw-r--r--arch/sh/boards/superh/microdev/setup.c3
-rw-r--r--arch/sh/boards/titan/setup.c25
-rw-r--r--arch/sh/boards/unknown/Makefile6
-rw-r--r--arch/sh/boards/unknown/setup.c21
-rw-r--r--arch/sh/cchips/Kconfig6
-rw-r--r--arch/sh/configs/dreamcast_defconfig338
-rw-r--r--arch/sh/configs/r7780mp_defconfig1223
-rw-r--r--arch/sh/configs/r7785rp_defconfig296
-rw-r--r--arch/sh/configs/se7206_defconfig272
-rw-r--r--arch/sh/configs/se7619_defconfig215
-rw-r--r--arch/sh/configs/se7722_defconfig287
-rw-r--r--arch/sh/configs/shx3_defconfig756
-rw-r--r--arch/sh/drivers/dma/Kconfig17
-rw-r--r--arch/sh/drivers/pci/Kconfig1
-rw-r--r--arch/sh/kernel/Makefile9
-rw-r--r--arch/sh/kernel/cf-enabler.c6
-rw-r--r--arch/sh/kernel/cpu/init.c15
-rw-r--r--arch/sh/kernel/cpu/irq/intc2.c63
-rw-r--r--arch/sh/kernel/cpu/irq/ipr.c59
-rw-r--r--arch/sh/kernel/cpu/sh2/entry.S1
-rw-r--r--arch/sh/kernel/cpu/sh2/probe.c13
-rw-r--r--arch/sh/kernel/cpu/sh2/setup-sh7619.c24
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-sh7206.c24
-rw-r--r--arch/sh/kernel/cpu/sh3/entry.S19
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7705.c40
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7709.c112
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7710.c42
-rw-r--r--arch/sh/kernel/cpu/sh4/Makefile4
-rw-r--r--arch/sh/kernel/cpu/sh4/probe.c8
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh7750.c58
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh7760.c45
-rw-r--r--arch/sh/kernel/cpu/sh4a/Makefile2
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-shx3.c135
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7722.c29
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7780.c15
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7785.c16
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-shx3.c85
-rw-r--r--arch/sh/kernel/irq.c8
-rw-r--r--arch/sh/kernel/machvec.c130
-rw-r--r--arch/sh/kernel/process.c18
-rw-r--r--arch/sh/kernel/ptrace.c24
-rw-r--r--arch/sh/kernel/setup.c210
-rw-r--r--arch/sh/kernel/sh_ksyms.c10
-rw-r--r--arch/sh/kernel/signal.c3
-rw-r--r--arch/sh/kernel/syscalls.S6
-rw-r--r--arch/sh/kernel/timers/timer-tmu.c7
-rw-r--r--arch/sh/kernel/topology.c49
-rw-r--r--arch/sh/kernel/traps.c8
-rw-r--r--arch/sh/kernel/vmlinux.lds.S20
-rw-r--r--arch/sh/lib/div64-generic.c9
-rw-r--r--arch/sh/lib/div64.S6
-rw-r--r--arch/sh/math-emu/math.c18
-rw-r--r--arch/sh/mm/Kconfig87
-rw-r--r--arch/sh/mm/Makefile5
-rw-r--r--arch/sh/mm/fault.c45
-rw-r--r--arch/sh/mm/init.c107
-rw-r--r--arch/sh/mm/numa.c92
-rw-r--r--arch/sh/mm/pg-dma.c95
-rw-r--r--arch/sh/tools/Makefile1
-rw-r--r--arch/sh/tools/mach-types2
-rw-r--r--arch/sh64/kernel/ptrace.c17
-rw-r--r--arch/sh64/lib/c-checksum.c1
-rw-r--r--arch/sparc/Kconfig9
-rw-r--r--arch/sparc/kernel/smp.c10
-rw-r--r--arch/sparc/kernel/traps.c1
-rw-r--r--arch/sparc/mm/srmmu.c4
-rw-r--r--arch/sparc/mm/sun4c.c6
-rw-r--r--arch/sparc64/Kconfig24
-rw-r--r--arch/sparc64/defconfig155
-rw-r--r--arch/sparc64/kernel/Makefile3
-rw-r--r--arch/sparc64/kernel/ds.c1187
-rw-r--r--arch/sparc64/kernel/hvtramp.S140
-rw-r--r--arch/sparc64/kernel/irq.c96
-rw-r--r--arch/sparc64/kernel/ldc.c2373
-rw-r--r--arch/sparc64/kernel/mdesc.c752
-rw-r--r--arch/sparc64/kernel/pci.c1
-rw-r--r--arch/sparc64/kernel/power.c54
-rw-r--r--arch/sparc64/kernel/process.c21
-rw-r--r--arch/sparc64/kernel/prom.c2
-rw-r--r--arch/sparc64/kernel/setup.c5
-rw-r--r--arch/sparc64/kernel/signal.c15
-rw-r--r--arch/sparc64/kernel/smp.c278
-rw-r--r--arch/sparc64/kernel/sparc64_ksyms.c16
-rw-r--r--arch/sparc64/kernel/sysfs.c2
-rw-r--r--arch/sparc64/kernel/time.c28
-rw-r--r--arch/sparc64/kernel/traps.c1
-rw-r--r--arch/sparc64/kernel/vio.c423
-rw-r--r--arch/sparc64/kernel/viohs.c822
-rw-r--r--arch/sparc64/lib/Makefile2
-rw-r--r--arch/sparc64/lib/delay.c46
-rw-r--r--arch/sparc64/prom/misc.c13
-rw-r--r--arch/sparc64/prom/p1275.c1
-rw-r--r--arch/sparc64/prom/tree.c13
-rw-r--r--arch/um/Kconfig.debug9
-rw-r--r--arch/um/config.release333
-rw-r--r--arch/um/defconfig3
-rw-r--r--arch/um/drivers/chan_kern.c23
-rw-r--r--arch/um/drivers/chan_user.c78
-rw-r--r--arch/um/drivers/cow_sys.h2
-rw-r--r--arch/um/drivers/daemon_user.c4
-rw-r--r--arch/um/drivers/fd.c2
-rw-r--r--arch/um/drivers/harddog_user.c2
-rw-r--r--arch/um/drivers/line.c65
-rw-r--r--arch/um/drivers/mcast_user.c2
-rw-r--r--arch/um/drivers/mconsole_user.c5
-rw-r--r--arch/um/drivers/net_user.c4
-rw-r--r--arch/um/drivers/pcap_user.c2
-rw-r--r--arch/um/drivers/port_user.c4
-rw-r--r--arch/um/drivers/pty.c78
-rw-r--r--arch/um/drivers/slip_user.c4
-rw-r--r--arch/um/drivers/slirp_user.c2
-rw-r--r--arch/um/drivers/ssl.c10
-rw-r--r--arch/um/drivers/stdio_console.c9
-rw-r--r--arch/um/drivers/tty.c2
-rw-r--r--arch/um/drivers/ubd_kern.c8
-rw-r--r--arch/um/drivers/ubd_user.c6
-rw-r--r--arch/um/drivers/xterm.c174
-rw-r--r--arch/um/drivers/xterm_kern.c49
-rw-r--r--arch/um/include/chan_kern.h2
-rw-r--r--arch/um/include/chan_user.h5
-rw-r--r--arch/um/include/common-offsets.h3
-rw-r--r--arch/um/include/os.h6
-rw-r--r--arch/um/include/um_malloc.h12
-rw-r--r--arch/um/kernel/irq.c1
-rw-r--r--arch/um/kernel/process.c16
-rw-r--r--arch/um/kernel/ptrace.c18
-rw-r--r--arch/um/os-Linux/aio.c11
-rw-r--r--arch/um/os-Linux/drivers/ethertap_user.c6
-rw-r--r--arch/um/os-Linux/drivers/tuntap_user.c2
-rw-r--r--arch/um/os-Linux/helper.c23
-rw-r--r--arch/um/os-Linux/main.c4
-rw-r--r--arch/um/os-Linux/sigio.c23
-rw-r--r--arch/um/os-Linux/skas/process.c2
-rw-r--r--arch/um/os-Linux/user_syms.c20
-rw-r--r--arch/v850/kernel/ptrace.c14
-rw-r--r--arch/x86_64/Kconfig8
-rw-r--r--arch/x86_64/boot/Makefile136
-rw-r--r--arch/x86_64/boot/bootsect.S98
-rw-r--r--arch/x86_64/boot/compressed/Makefile9
-rw-r--r--arch/x86_64/boot/compressed/head.S6
-rw-r--r--arch/x86_64/boot/install.sh2
-rw-r--r--arch/x86_64/boot/mtools.conf.in17
-rw-r--r--arch/x86_64/boot/setup.S826
-rw-r--r--arch/x86_64/boot/tools/build.c185
-rw-r--r--arch/x86_64/ia32/ia32entry.S3
-rw-r--r--arch/x86_64/ia32/sys_ia32.c8
-rw-r--r--arch/x86_64/kernel/Makefile2
-rw-r--r--arch/x86_64/kernel/cpufreq/Kconfig6
-rw-r--r--arch/x86_64/kernel/early_printk.c5
-rw-r--r--arch/x86_64/kernel/head.S15
-rw-r--r--arch/x86_64/kernel/io_apic.c1
-rw-r--r--arch/x86_64/kernel/irq.c32
-rw-r--r--arch/x86_64/kernel/mce.c8
-rw-r--r--arch/x86_64/kernel/nmi.c8
-rw-r--r--arch/x86_64/kernel/pci-dma.c3
-rw-r--r--arch/x86_64/kernel/ptrace.c40
-rw-r--r--arch/x86_64/kernel/setup.c21
-rw-r--r--arch/x86_64/kernel/smp.c12
-rw-r--r--arch/x86_64/kernel/traps.c4
-rw-r--r--arch/x86_64/kernel/verify_cpu.S22
-rw-r--r--arch/xtensa/kernel/ptrace.c17
-rw-r--r--arch/xtensa/kernel/traps.c1
1123 files changed, 50614 insertions, 35668 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 79c6e5a244..2a85dc3390 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -327,6 +327,9 @@ config PCI_DOMAINS
327 bool 327 bool
328 default y 328 default y
329 329
330config PCI_SYSCALL
331 def_bool PCI
332
330config ALPHA_CORE_AGP 333config ALPHA_CORE_AGP
331 bool 334 bool
332 depends on ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL 335 depends on ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c
index 28c84e55fe..6b07f89a72 100644
--- a/arch/alpha/kernel/pci_iommu.c
+++ b/arch/alpha/kernel/pci_iommu.c
@@ -207,6 +207,10 @@ iommu_arena_free(struct pci_iommu_arena *arena, long ofs, long n)
207 p[i] = 0; 207 p[i] = 0;
208} 208}
209 209
210/* True if the machine supports DAC addressing, and DEV can
211 make use of it given MASK. */
212static int pci_dac_dma_supported(struct pci_dev *hwdev, u64 mask);
213
210/* Map a single buffer of the indicated size for PCI DMA in streaming 214/* Map a single buffer of the indicated size for PCI DMA in streaming
211 mode. The 32-bit PCI bus mastering address to use is returned. 215 mode. The 32-bit PCI bus mastering address to use is returned.
212 Once the device is given the dma address, the device owns this memory 216 Once the device is given the dma address, the device owns this memory
@@ -897,7 +901,7 @@ iommu_unbind(struct pci_iommu_arena *arena, long pg_start, long pg_count)
897/* True if the machine supports DAC addressing, and DEV can 901/* True if the machine supports DAC addressing, and DEV can
898 make use of it given MASK. */ 902 make use of it given MASK. */
899 903
900int 904static int
901pci_dac_dma_supported(struct pci_dev *dev, u64 mask) 905pci_dac_dma_supported(struct pci_dev *dev, u64 mask)
902{ 906{
903 dma64_addr_t dac_offset = alpha_mv.pci_dac_offset; 907 dma64_addr_t dac_offset = alpha_mv.pci_dac_offset;
@@ -917,32 +921,6 @@ pci_dac_dma_supported(struct pci_dev *dev, u64 mask)
917 921
918 return ok; 922 return ok;
919} 923}
920EXPORT_SYMBOL(pci_dac_dma_supported);
921
922dma64_addr_t
923pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page,
924 unsigned long offset, int direction)
925{
926 return (alpha_mv.pci_dac_offset
927 + __pa(page_address(page))
928 + (dma64_addr_t) offset);
929}
930EXPORT_SYMBOL(pci_dac_page_to_dma);
931
932struct page *
933pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr)
934{
935 unsigned long paddr = (dma_addr & PAGE_MASK) - alpha_mv.pci_dac_offset;
936 return virt_to_page(__va(paddr));
937}
938EXPORT_SYMBOL(pci_dac_dma_to_page);
939
940unsigned long
941pci_dac_dma_to_offset(struct pci_dev *pdev, dma64_addr_t dma_addr)
942{
943 return (dma_addr & ~PAGE_MASK);
944}
945EXPORT_SYMBOL(pci_dac_dma_to_offset);
946 924
947/* Helper for generic DMA-mapping functions. */ 925/* Helper for generic DMA-mapping functions. */
948 926
diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c
index 0cd060598f..83a7818422 100644
--- a/arch/alpha/kernel/ptrace.c
+++ b/arch/alpha/kernel/ptrace.c
@@ -315,9 +315,7 @@ do_sys_ptrace(long request, long pid, long addr, long data,
315 /* When I and D space are separate, this will have to be fixed. */ 315 /* When I and D space are separate, this will have to be fixed. */
316 case PTRACE_POKETEXT: /* write the word at location addr. */ 316 case PTRACE_POKETEXT: /* write the word at location addr. */
317 case PTRACE_POKEDATA: 317 case PTRACE_POKEDATA:
318 tmp = data; 318 ret = generic_ptrace_pokedata(child, addr, data);
319 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 1);
320 ret = (copied == sizeof(tmp)) ? 0 : -EIO;
321 break; 319 break;
322 320
323 case PTRACE_POKEUSR: /* write the specified register */ 321 case PTRACE_POKEUSR: /* write the specified register */
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index 80cfb758ee..b28731437c 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -65,7 +65,7 @@ enum ipi_message_type {
65}; 65};
66 66
67/* Set to a secondary's cpuid when it comes online. */ 67/* Set to a secondary's cpuid when it comes online. */
68static int smp_secondary_alive __initdata = 0; 68static int smp_secondary_alive __devinitdata = 0;
69 69
70/* Which cpus ids came online. */ 70/* Which cpus ids came online. */
71cpumask_t cpu_online_map; 71cpumask_t cpu_online_map;
@@ -173,7 +173,7 @@ smp_callin(void)
173} 173}
174 174
175/* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */ 175/* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */
176static int __init 176static int __devinit
177wait_for_txrdy (unsigned long cpumask) 177wait_for_txrdy (unsigned long cpumask)
178{ 178{
179 unsigned long timeout; 179 unsigned long timeout;
@@ -358,7 +358,7 @@ secondary_cpu_start(int cpuid, struct task_struct *idle)
358/* 358/*
359 * Bring one cpu online. 359 * Bring one cpu online.
360 */ 360 */
361static int __init 361static int __devinit
362smp_boot_one_cpu(int cpuid) 362smp_boot_one_cpu(int cpuid)
363{ 363{
364 struct task_struct *idle; 364 struct task_struct *idle;
diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c
index 930cedc8be..783f4e50c1 100644
--- a/arch/alpha/kernel/srmcons.c
+++ b/arch/alpha/kernel/srmcons.c
@@ -289,7 +289,7 @@ srm_console_device(struct console *co, int *index)
289 return srmcons_driver; 289 return srmcons_driver;
290} 290}
291 291
292static int __init 292static int
293srm_console_setup(struct console *co, char *options) 293srm_console_setup(struct console *co, char *options)
294{ 294{
295 return 0; 295 return 0;
diff --git a/arch/alpha/kernel/sys_marvel.c b/arch/alpha/kernel/sys_marvel.c
index 0bcb968cb6..922143ea1c 100644
--- a/arch/alpha/kernel/sys_marvel.c
+++ b/arch/alpha/kernel/sys_marvel.c
@@ -420,7 +420,7 @@ marvel_init_pci(void)
420 io7_clear_errors(io7); 420 io7_clear_errors(io7);
421} 421}
422 422
423static void 423static void __init
424marvel_init_rtc(void) 424marvel_init_rtc(void)
425{ 425{
426 init_rtc_irq(); 426 init_rtc_irq();
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c
index 4748e14a28..1dd50d0769 100644
--- a/arch/alpha/kernel/time.c
+++ b/arch/alpha/kernel/time.c
@@ -144,7 +144,7 @@ irqreturn_t timer_interrupt(int irq, void *dev)
144 return IRQ_HANDLED; 144 return IRQ_HANDLED;
145} 145}
146 146
147void 147void __init
148common_init_rtc(void) 148common_init_rtc(void)
149{ 149{
150 unsigned char x; 150 unsigned char x;
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c
index d6e665d567..ec0f05e0d8 100644
--- a/arch/alpha/kernel/traps.c
+++ b/arch/alpha/kernel/traps.c
@@ -184,6 +184,7 @@ die_if_kernel(char * str, struct pt_regs *regs, long err, unsigned long *r9_15)
184#endif 184#endif
185 printk("%s(%d): %s %ld\n", current->comm, current->pid, str, err); 185 printk("%s(%d): %s %ld\n", current->comm, current->pid, str, err);
186 dik_show_regs(regs, r9_15); 186 dik_show_regs(regs, r9_15);
187 add_taint(TAINT_DIE);
187 dik_show_trace((unsigned long *)(regs+1)); 188 dik_show_trace((unsigned long *)(regs+1));
188 dik_show_code((unsigned int *)regs->pc); 189 dik_show_code((unsigned int *)regs->pc);
189 190
diff --git a/arch/alpha/lib/checksum.c b/arch/alpha/lib/checksum.c
index ab3761c437..8698e0746f 100644
--- a/arch/alpha/lib/checksum.c
+++ b/arch/alpha/lib/checksum.c
@@ -69,6 +69,7 @@ __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
69 result = (result & 0xffffffff) + (result >> 32); 69 result = (result & 0xffffffff) + (result >> 32);
70 return (__force __wsum)result; 70 return (__force __wsum)result;
71} 71}
72EXPORT_SYMBOL(csum_tcpudp_nofold);
72 73
73/* 74/*
74 * Do a 64-bit checksum on an arbitrary memory area.. 75 * Do a 64-bit checksum on an arbitrary memory area..
diff --git a/arch/alpha/lib/csum_ipv6_magic.S b/arch/alpha/lib/csum_ipv6_magic.S
index e09748dbf2..2c2acb96de 100644
--- a/arch/alpha/lib/csum_ipv6_magic.S
+++ b/arch/alpha/lib/csum_ipv6_magic.S
@@ -7,6 +7,9 @@
7 * __u32 len, 7 * __u32 len,
8 * unsigned short proto, 8 * unsigned short proto,
9 * unsigned int csum); 9 * unsigned int csum);
10 *
11 * Misalignment handling (which costs 16 instructions / 8 cycles)
12 * added by Ivan Kokshaysky <ink@jurassic.park.msu.ru>
10 */ 13 */
11 14
12 .globl csum_ipv6_magic 15 .globl csum_ipv6_magic
@@ -16,37 +19,57 @@
16csum_ipv6_magic: 19csum_ipv6_magic:
17 .prologue 0 20 .prologue 0
18 21
19 ldq $0,0($16) # e0 : load src & dst addr words 22 ldq_u $0,0($16) # e0 : load src & dst addr words
20 zapnot $20,15,$20 # .. e1 : zero extend incoming csum 23 zapnot $20,15,$20 # .. e1 : zero extend incoming csum
21 extqh $18,1,$4 # e0 : byte swap len & proto while we wait 24 extqh $18,1,$4 # e0 : byte swap len & proto while we wait
22 ldq $1,8($16) # .. e1 : 25 ldq_u $21,7($16) # .. e1 : handle misalignment
23 26
24 extbl $18,1,$5 # e0 : 27 extbl $18,1,$5 # e0 :
25 ldq $2,0($17) # .. e1 : 28 ldq_u $1,8($16) # .. e1 :
26 extbl $18,2,$6 # e0 : 29 extbl $18,2,$6 # e0 :
27 ldq $3,8($17) # .. e1 : 30 ldq_u $22,15($16) # .. e1 :
28 31
29 extbl $18,3,$18 # e0 : 32 extbl $18,3,$18 # e0 :
33 ldq_u $2,0($17) # .. e1 :
30 sra $4,32,$4 # e0 : 34 sra $4,32,$4 # e0 :
35 ldq_u $23,7($17) # .. e1 :
36
37 extql $0,$16,$0 # e0 :
38 ldq_u $3,8($17) # .. e1 :
39 extqh $21,$16,$21 # e0 :
40 ldq_u $24,15($17) # .. e1 :
41
31 sll $5,16,$5 # e0 : 42 sll $5,16,$5 # e0 :
43 or $0,$21,$0 # .. e1 : 1st src word complete
44 extql $1,$16,$1 # e0 :
32 addq $20,$0,$20 # .. e1 : begin summing the words 45 addq $20,$0,$20 # .. e1 : begin summing the words
33 46
34 sll $6,8,$6 # e0 : 47 extqh $22,$16,$22 # e0 :
35 cmpult $20,$0,$0 # .. e1 : 48 cmpult $20,$0,$0 # .. e1 :
36 extwh $19,7,$7 # e0 : 49 sll $6,8,$6 # e0 :
37 or $4,$18,$18 # .. e1 : 50 or $1,$22,$1 # .. e1 : 2nd src word complete
38 51
39 extbl $19,1,$19 # e0 : 52 extql $2,$17,$2 # e0 :
53 or $4,$18,$18 # .. e1 :
54 extqh $23,$17,$23 # e0 :
40 or $5,$6,$5 # .. e1 : 55 or $5,$6,$5 # .. e1 :
41 or $18,$5,$18 # e0 : len complete
42 or $19,$7,$19 # .. e1 :
43 56
44 sll $19,48,$19 # e0 : 57 extql $3,$17,$3 # e0 :
58 or $2,$23,$2 # .. e1 : 1st dst word complete
59 extqh $24,$17,$24 # e0 :
60 or $18,$5,$18 # .. e1 : len complete
61
62 extwh $19,7,$7 # e0 :
63 or $3,$24,$3 # .. e1 : 2nd dst word complete
64 extbl $19,1,$19 # e0 :
45 addq $20,$1,$20 # .. e1 : 65 addq $20,$1,$20 # .. e1 :
46 sra $19,32,$19 # e0 : proto complete 66
67 or $19,$7,$19 # e0 :
47 cmpult $20,$1,$1 # .. e1 : 68 cmpult $20,$1,$1 # .. e1 :
69 sll $19,48,$19 # e0 :
70 nop # .. e0 :
48 71
49 nop # e0 : 72 sra $19,32,$19 # e0 : proto complete
50 addq $20,$2,$20 # .. e1 : 73 addq $20,$2,$20 # .. e1 :
51 cmpult $20,$2,$2 # e0 : 74 cmpult $20,$2,$2 # e0 :
52 addq $20,$3,$20 # .. e1 : 75 addq $20,$3,$20 # .. e1 :
@@ -84,7 +107,7 @@ csum_ipv6_magic:
84 extwl $0,2,$1 # e0 : fold 17-bit value 107 extwl $0,2,$1 # e0 : fold 17-bit value
85 zapnot $0,3,$0 # .. e1 : 108 zapnot $0,3,$0 # .. e1 :
86 addq $0,$1,$0 # e0 : 109 addq $0,$1,$0 # e0 :
87 not $0,$0 # e1 : and complement. 110 not $0,$0 # .. e1 : and complement.
88 111
89 zapnot $0,3,$0 # e0 : 112 zapnot $0,3,$0 # e0 :
90 ret # .. e1 : 113 ret # .. e1 :
diff --git a/arch/alpha/lib/ev6-csum_ipv6_magic.S b/arch/alpha/lib/ev6-csum_ipv6_magic.S
index de1948a691..fc0bc399f8 100644
--- a/arch/alpha/lib/ev6-csum_ipv6_magic.S
+++ b/arch/alpha/lib/ev6-csum_ipv6_magic.S
@@ -46,6 +46,10 @@
46 * add the 3 low ushorts together, generating a uint 46 * add the 3 low ushorts together, generating a uint
47 * a final add of the 2 lower ushorts 47 * a final add of the 2 lower ushorts
48 * truncating the result. 48 * truncating the result.
49 *
50 * Misalignment handling added by Ivan Kokshaysky <ink@jurassic.park.msu.ru>
51 * The cost is 16 instructions (~8 cycles), including two extra loads which
52 * may cause additional delay in rare cases (load-load replay traps).
49 */ 53 */
50 54
51 .globl csum_ipv6_magic 55 .globl csum_ipv6_magic
@@ -55,25 +59,45 @@
55csum_ipv6_magic: 59csum_ipv6_magic:
56 .prologue 0 60 .prologue 0
57 61
58 ldq $0,0($16) # L : Latency: 3 62 ldq_u $0,0($16) # L : Latency: 3
59 inslh $18,7,$4 # U : 0000000000AABBCC 63 inslh $18,7,$4 # U : 0000000000AABBCC
60 ldq $1,8($16) # L : Latency: 3 64 ldq_u $1,8($16) # L : Latency: 3
61 sll $19,8,$7 # U : U L U L : 0x00000000 00aabb00 65 sll $19,8,$7 # U : U L U L : 0x00000000 00aabb00
62 66
67 and $16,7,$6 # E : src misalignment
68 ldq_u $5,15($16) # L : Latency: 3
63 zapnot $20,15,$20 # U : zero extend incoming csum 69 zapnot $20,15,$20 # U : zero extend incoming csum
64 ldq $2,0($17) # L : Latency: 3 70 ldq_u $2,0($17) # L : U L U L : Latency: 3
65 sll $19,24,$19 # U : U L L U : 0x000000aa bb000000 71
72 extql $0,$6,$0 # U :
73 extqh $1,$6,$22 # U :
74 ldq_u $3,8($17) # L : Latency: 3
75 sll $19,24,$19 # U : U U L U : 0x000000aa bb000000
76
77 cmoveq $6,$31,$22 # E : src aligned?
78 ldq_u $23,15($17) # L : Latency: 3
66 inswl $18,3,$18 # U : 000000CCDD000000 79 inswl $18,3,$18 # U : 000000CCDD000000
80 addl $19,$7,$19 # E : U L U L : <sign bits>bbaabb00
67 81
68 ldq $3,8($17) # L : Latency: 3 82 or $0,$22,$0 # E : 1st src word complete
69 bis $18,$4,$18 # E : 000000CCDDAABBCC 83 extql $1,$6,$1 # U :
70 addl $19,$7,$19 # E : <sign bits>bbaabb00 84 or $18,$4,$18 # E : 000000CCDDAABBCC
71 nop # E : U L U L 85 extqh $5,$6,$5 # U : L U L U
72 86
87 and $17,7,$6 # E : dst misalignment
88 extql $2,$6,$2 # U :
89 or $1,$5,$1 # E : 2nd src word complete
90 extqh $3,$6,$22 # U : L U L U :
91
92 cmoveq $6,$31,$22 # E : dst aligned?
93 extql $3,$6,$3 # U :
73 addq $20,$0,$20 # E : begin summing the words 94 addq $20,$0,$20 # E : begin summing the words
95 extqh $23,$6,$23 # U : L U L U :
96
74 srl $18,16,$4 # U : 0000000000CCDDAA 97 srl $18,16,$4 # U : 0000000000CCDDAA
98 or $2,$22,$2 # E : 1st dst word complete
75 zap $19,0x3,$19 # U : <sign bits>bbaa0000 99 zap $19,0x3,$19 # U : <sign bits>bbaa0000
76 nop # E : L U U L 100 or $3,$23,$3 # E : U L U L : 2nd dst word complete
77 101
78 cmpult $20,$0,$0 # E : 102 cmpult $20,$0,$0 # E :
79 addq $20,$1,$20 # E : 103 addq $20,$1,$20 # E :
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 50d9f3e4e0..a44c6da9bf 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -241,6 +241,9 @@ config ARCH_H720X
241 241
242config ARCH_IMX 242config ARCH_IMX
243 bool "IMX" 243 bool "IMX"
244 select GENERIC_GPIO
245 select GENERIC_TIME
246 select GENERIC_CLOCKEVENTS
244 help 247 help
245 Support for Motorola's i.MX family of processors (MX1, MXL). 248 Support for Motorola's i.MX family of processors (MX1, MXL).
246 249
@@ -308,6 +311,7 @@ config ARCH_L7200
308 311
309config ARCH_KS8695 312config ARCH_KS8695
310 bool "Micrel/Kendin KS8695" 313 bool "Micrel/Kendin KS8695"
314 select GENERIC_GPIO
311 help 315 help
312 Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based 316 Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based
313 System-on-Chip devices. 317 System-on-Chip devices.
@@ -384,6 +388,7 @@ config ARCH_DAVINCI
384 bool "TI DaVinci" 388 bool "TI DaVinci"
385 select GENERIC_TIME 389 select GENERIC_TIME
386 select GENERIC_CLOCKEVENTS 390 select GENERIC_CLOCKEVENTS
391 select GENERIC_GPIO
387 help 392 help
388 Support for TI's DaVinci platform. 393 Support for TI's DaVinci platform.
389 394
@@ -531,6 +536,9 @@ config PCI
531 information about which PCI hardware does work under Linux and which 536 information about which PCI hardware does work under Linux and which
532 doesn't. 537 doesn't.
533 538
539config PCI_SYSCALL
540 def_bool PCI
541
534# Select the host bridge type 542# Select the host bridge type
535config PCI_HOST_VIA82C505 543config PCI_HOST_VIA82C505
536 bool 544 bool
@@ -1034,6 +1042,8 @@ source "drivers/mmc/Kconfig"
1034 1042
1035source "drivers/rtc/Kconfig" 1043source "drivers/rtc/Kconfig"
1036 1044
1045source "drivers/dma/Kconfig"
1046
1037endmenu 1047endmenu
1038 1048
1039source "fs/Kconfig" 1049source "fs/Kconfig"
diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore
index 171a0853ca..ce1c5ff746 100644
--- a/arch/arm/boot/.gitignore
+++ b/arch/arm/boot/.gitignore
@@ -1,2 +1,5 @@
1Image 1Image
2zImage 2zImage
3xipImage
4bootpImage
5uImage
diff --git a/arch/arm/boot/compressed/.gitignore b/arch/arm/boot/compressed/.gitignore
index aefee20cbf..b15f927a59 100644
--- a/arch/arm/boot/compressed/.gitignore
+++ b/arch/arm/boot/compressed/.gitignore
@@ -1 +1,2 @@
1piggy.gz 1piggy.gz
2font.c
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index adddc71316..a1f1691b67 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -6,15 +6,13 @@
6 6
7HEAD = head.o 7HEAD = head.o
8OBJS = misc.o 8OBJS = misc.o
9FONTC = drivers/video/console/font_acorn_8x8.c 9FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c
10
11FONT = $(addprefix ../../../../drivers/video/console/, font_acorn_8x8.o)
12 10
13# 11#
14# Architecture dependencies 12# Architecture dependencies
15# 13#
16ifeq ($(CONFIG_ARCH_ACORN),y) 14ifeq ($(CONFIG_ARCH_ACORN),y)
17OBJS += ll_char_wr.o $(FONT) 15OBJS += ll_char_wr.o font.o
18endif 16endif
19 17
20ifeq ($(CONFIG_ARCH_SHARK),y) 18ifeq ($(CONFIG_ARCH_SHARK),y)
@@ -73,7 +71,7 @@ endif
73 71
74SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ 72SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
75 73
76targets := vmlinux vmlinux.lds piggy.gz piggy.o $(FONT) \ 74targets := vmlinux vmlinux.lds piggy.gz piggy.o font.o font.c \
77 head.o misc.o $(OBJS) 75 head.o misc.o $(OBJS)
78EXTRA_CFLAGS := -fpic 76EXTRA_CFLAGS := -fpic
79EXTRA_AFLAGS := 77EXTRA_AFLAGS :=
@@ -105,7 +103,10 @@ $(obj)/piggy.gz: $(obj)/../Image FORCE
105 103
106$(obj)/piggy.o: $(obj)/piggy.gz FORCE 104$(obj)/piggy.o: $(obj)/piggy.gz FORCE
107 105
108CFLAGS_font_acorn_8x8.o := -Dstatic= 106CFLAGS_font.o := -Dstatic=
107
108$(obj)/font.c: $(FONTC)
109 $(call cmd,shipped)
109 110
110$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile .config 111$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile .config
111 @sed "$(SEDFLAGS)" < $< > $@ 112 @sed "$(SEDFLAGS)" < $< > $@
diff --git a/arch/arm/boot/compressed/head-xscale.S b/arch/arm/boot/compressed/head-xscale.S
index 73c5d9e020..236bbe5783 100644
--- a/arch/arm/boot/compressed/head-xscale.S
+++ b/arch/arm/boot/compressed/head-xscale.S
@@ -41,11 +41,6 @@ __XScale_start:
41 mov r7, #MACH_TYPE_COTULLA_IDP 41 mov r7, #MACH_TYPE_COTULLA_IDP
42#endif 42#endif
43 43
44#ifdef CONFIG_MACH_GTWX5715
45 mov r7, #(MACH_TYPE_GTWX5715 & 0xff)
46 orr r7, r7, #(MACH_TYPE_GTWX5715 & 0xff00)
47#endif
48
49#ifdef CONFIG_ARCH_IXP2000 44#ifdef CONFIG_ARCH_IXP2000
50 mov r1, #-1 45 mov r1, #-1
51 mov r0, #0xd6000000 46 mov r0, #0xd6000000
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 23348e9561..d7fb5ee163 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -436,6 +436,28 @@ __armv4_mmu_cache_on:
436 mcr p15, 0, r0, c8, c7, 0 @ flush I,D TLBs 436 mcr p15, 0, r0, c8, c7, 0 @ flush I,D TLBs
437 mov pc, r12 437 mov pc, r12
438 438
439__armv7_mmu_cache_on:
440 mov r12, lr
441 mrc p15, 0, r11, c0, c1, 4 @ read ID_MMFR0
442 tst r11, #0xf @ VMSA
443 blne __setup_mmu
444 mov r0, #0
445 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
446 tst r11, #0xf @ VMSA
447 mcrne p15, 0, r0, c8, c7, 0 @ flush I,D TLBs
448 mrc p15, 0, r0, c1, c0, 0 @ read control reg
449 orr r0, r0, #0x5000 @ I-cache enable, RR cache replacement
450 orr r0, r0, #0x003c @ write buffer
451 orrne r0, r0, #1 @ MMU enabled
452 movne r1, #-1
453 mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer
454 mcrne p15, 0, r1, c3, c0, 0 @ load domain access control
455 mcr p15, 0, r0, c1, c0, 0 @ load control register
456 mrc p15, 0, r0, c1, c0, 0 @ and read it back
457 mov r0, #0
458 mcr p15, 0, r0, c7, c5, 4 @ ISB
459 mov pc, r12
460
439__arm6_mmu_cache_on: 461__arm6_mmu_cache_on:
440 mov r12, lr 462 mov r12, lr
441 bl __setup_mmu 463 bl __setup_mmu
@@ -622,11 +644,17 @@ proc_types:
622 b __armv4_mmu_cache_flush 644 b __armv4_mmu_cache_flush
623 645
624 .word 0x0007b000 @ ARMv6 646 .word 0x0007b000 @ ARMv6
625 .word 0x0007f000 647 .word 0x000ff000
626 b __armv4_mmu_cache_on 648 b __armv4_mmu_cache_on
627 b __armv4_mmu_cache_off 649 b __armv4_mmu_cache_off
628 b __armv6_mmu_cache_flush 650 b __armv6_mmu_cache_flush
629 651
652 .word 0x000f0000 @ new CPU Id
653 .word 0x000f0000
654 b __armv7_mmu_cache_on
655 b __armv7_mmu_cache_off
656 b __armv7_mmu_cache_flush
657
630 .word 0 @ unrecognised type 658 .word 0 @ unrecognised type
631 .word 0 659 .word 0
632 mov pc, lr 660 mov pc, lr
@@ -674,6 +702,16 @@ __armv4_mmu_cache_off:
674 mcr p15, 0, r0, c8, c7 @ invalidate whole TLB v4 702 mcr p15, 0, r0, c8, c7 @ invalidate whole TLB v4
675 mov pc, lr 703 mov pc, lr
676 704
705__armv7_mmu_cache_off:
706 mrc p15, 0, r0, c1, c0
707 bic r0, r0, #0x000d
708 mcr p15, 0, r0, c1, c0 @ turn MMU and cache off
709 mov r12, lr
710 bl __armv7_mmu_cache_flush
711 mov r0, #0
712 mcr p15, 0, r0, c8, c7, 0 @ invalidate whole TLB
713 mov pc, r12
714
677__arm6_mmu_cache_off: 715__arm6_mmu_cache_off:
678 mov r0, #0x00000030 @ ARM6 control reg. 716 mov r0, #0x00000030 @ ARM6 control reg.
679 b __armv3_mmu_cache_off 717 b __armv3_mmu_cache_off
@@ -730,6 +768,59 @@ __armv6_mmu_cache_flush:
730 mcr p15, 0, r1, c7, c10, 4 @ drain WB 768 mcr p15, 0, r1, c7, c10, 4 @ drain WB
731 mov pc, lr 769 mov pc, lr
732 770
771__armv7_mmu_cache_flush:
772 mrc p15, 0, r10, c0, c1, 5 @ read ID_MMFR1
773 tst r10, #0xf << 16 @ hierarchical cache (ARMv7)
774 beq hierarchical
775 mov r10, #0
776 mcr p15, 0, r10, c7, c14, 0 @ clean+invalidate D
777 b iflush
778hierarchical:
779 stmfd sp!, {r0-r5, r7, r9-r11}
780 mrc p15, 1, r0, c0, c0, 1 @ read clidr
781 ands r3, r0, #0x7000000 @ extract loc from clidr
782 mov r3, r3, lsr #23 @ left align loc bit field
783 beq finished @ if loc is 0, then no need to clean
784 mov r10, #0 @ start clean at cache level 0
785loop1:
786 add r2, r10, r10, lsr #1 @ work out 3x current cache level
787 mov r1, r0, lsr r2 @ extract cache type bits from clidr
788 and r1, r1, #7 @ mask of the bits for current cache only
789 cmp r1, #2 @ see what cache we have at this level
790 blt skip @ skip if no cache, or just i-cache
791 mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr
792 mcr p15, 0, r10, c7, c5, 4 @ isb to sych the new cssr&csidr
793 mrc p15, 1, r1, c0, c0, 0 @ read the new csidr
794 and r2, r1, #7 @ extract the length of the cache lines
795 add r2, r2, #4 @ add 4 (line length offset)
796 ldr r4, =0x3ff
797 ands r4, r4, r1, lsr #3 @ find maximum number on the way size
798 .word 0xe16f5f14 @ clz r5, r4 - find bit position of way size increment
799 ldr r7, =0x7fff
800 ands r7, r7, r1, lsr #13 @ extract max number of the index size
801loop2:
802 mov r9, r4 @ create working copy of max way size
803loop3:
804 orr r11, r10, r9, lsl r5 @ factor way and cache number into r11
805 orr r11, r11, r7, lsl r2 @ factor index number into r11
806 mcr p15, 0, r11, c7, c14, 2 @ clean & invalidate by set/way
807 subs r9, r9, #1 @ decrement the way
808 bge loop3
809 subs r7, r7, #1 @ decrement the index
810 bge loop2
811skip:
812 add r10, r10, #2 @ increment cache number
813 cmp r3, r10
814 bgt loop1
815finished:
816 mov r10, #0 @ swith back to cache level 0
817 mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr
818 ldmfd sp!, {r0-r5, r7, r9-r11}
819iflush:
820 mcr p15, 0, r10, c7, c5, 0 @ invalidate I+BTB
821 mcr p15, 0, r10, c7, c10, 4 @ drain WB
822 mov pc, lr
823
733__armv4_mmu_cache_flush: 824__armv4_mmu_cache_flush:
734 mov r2, #64*1024 @ default: 32K dcache size (*2) 825 mov r2, #64*1024 @ default: 32K dcache size (*2)
735 mov r11, #32 @ default: 32 byte line size 826 mov r11, #32 @ default: 32 byte line size
@@ -836,6 +927,7 @@ memdump: mov r12, r0
836 mov pc, r10 927 mov pc, r10
837#endif 928#endif
838 929
930 .ltorg
839reloc_end: 931reloc_end:
840 932
841 .align 933 .align
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index cfe6f4650b..ae21755872 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -60,6 +60,9 @@ struct locomo {
60 unsigned int irq; 60 unsigned int irq;
61 spinlock_t lock; 61 spinlock_t lock;
62 void __iomem *base; 62 void __iomem *base;
63#ifdef CONFIG_PM
64 void *saved_state;
65#endif
63}; 66};
64 67
65struct locomo_dev_info { 68struct locomo_dev_info {
@@ -565,7 +568,7 @@ static int locomo_suspend(struct platform_device *dev, pm_message_t state)
565 if (!save) 568 if (!save)
566 return -ENOMEM; 569 return -ENOMEM;
567 570
568 dev->dev.power.saved_state = (void *) save; 571 lchip->saved_state = save;
569 572
570 spin_lock_irqsave(&lchip->lock, flags); 573 spin_lock_irqsave(&lchip->lock, flags);
571 574
@@ -605,8 +608,8 @@ static int locomo_resume(struct platform_device *dev)
605 struct locomo_save_data *save; 608 struct locomo_save_data *save;
606 unsigned long r; 609 unsigned long r;
607 unsigned long flags; 610 unsigned long flags;
608 611
609 save = (struct locomo_save_data *) dev->dev.power.saved_state; 612 save = lchip->saved_state;
610 if (!save) 613 if (!save)
611 return 0; 614 return 0;
612 615
@@ -628,6 +631,8 @@ static int locomo_resume(struct platform_device *dev)
628 locomo_writel(0x1, lchip->base + LOCOMO_KEYBOARD + LOCOMO_KCMD); 631 locomo_writel(0x1, lchip->base + LOCOMO_KEYBOARD + LOCOMO_KCMD);
629 632
630 spin_unlock_irqrestore(&lchip->lock, flags); 633 spin_unlock_irqrestore(&lchip->lock, flags);
634
635 lchip->saved_state = NULL;
631 kfree(save); 636 kfree(save);
632 637
633 return 0; 638 return 0;
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 798bbfccaf..eb06d0b2cb 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -51,6 +51,9 @@ struct sa1111 {
51 int irq; 51 int irq;
52 spinlock_t lock; 52 spinlock_t lock;
53 void __iomem *base; 53 void __iomem *base;
54#ifdef CONFIG_PM
55 void *saved_state;
56#endif
54}; 57};
55 58
56/* 59/*
@@ -822,7 +825,7 @@ static int sa1111_suspend(struct platform_device *dev, pm_message_t state)
822 save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL); 825 save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL);
823 if (!save) 826 if (!save)
824 return -ENOMEM; 827 return -ENOMEM;
825 dev->dev.power.saved_state = save; 828 sachip->saved_state = save;
826 829
827 spin_lock_irqsave(&sachip->lock, flags); 830 spin_lock_irqsave(&sachip->lock, flags);
828 831
@@ -878,7 +881,7 @@ static int sa1111_resume(struct platform_device *dev)
878 unsigned long flags, id; 881 unsigned long flags, id;
879 void __iomem *base; 882 void __iomem *base;
880 883
881 save = (struct sa1111_save_data *)dev->dev.power.saved_state; 884 save = sachip->saved_state;
882 if (!save) 885 if (!save)
883 return 0; 886 return 0;
884 887
@@ -923,7 +926,7 @@ static int sa1111_resume(struct platform_device *dev)
923 926
924 spin_unlock_irqrestore(&sachip->lock, flags); 927 spin_unlock_irqrestore(&sachip->lock, flags);
925 928
926 dev->dev.power.saved_state = NULL; 929 sachip->saved_state = NULL;
927 kfree(save); 930 kfree(save);
928 931
929 return 0; 932 return 0;
@@ -958,8 +961,8 @@ static int sa1111_remove(struct platform_device *pdev)
958 platform_set_drvdata(pdev, NULL); 961 platform_set_drvdata(pdev, NULL);
959 962
960#ifdef CONFIG_PM 963#ifdef CONFIG_PM
961 kfree(pdev->dev.power.saved_state); 964 kfree(sachip->saved_state);
962 pdev->dev.power.saved_state = NULL; 965 sachip->saved_state = NULL;
963#endif 966#endif
964 } 967 }
965 968
diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c
index 3bf3a927ae..111a7fa5de 100644
--- a/arch/arm/common/sharpsl_pm.c
+++ b/arch/arm/common/sharpsl_pm.c
@@ -766,9 +766,7 @@ static void sharpsl_apm_get_power_status(struct apm_power_info *info)
766} 766}
767 767
768static struct pm_ops sharpsl_pm_ops = { 768static struct pm_ops sharpsl_pm_ops = {
769 .prepare = pxa_pm_prepare,
770 .enter = corgi_pxa_pm_enter, 769 .enter = corgi_pxa_pm_enter,
771 .finish = pxa_pm_finish,
772 .valid = pm_valid_only_mem, 770 .valid = pm_valid_only_mem,
773}; 771};
774 772
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index 19326d7cde..a98d0c933d 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -350,7 +350,7 @@
350 CALL(sys_set_robust_list) 350 CALL(sys_set_robust_list)
351 CALL(sys_get_robust_list) 351 CALL(sys_get_robust_list)
352/* 340 */ CALL(sys_splice) 352/* 340 */ CALL(sys_splice)
353 CALL(sys_arm_sync_file_range) 353 CALL(sys_sync_file_range2)
354 CALL(sys_tee) 354 CALL(sys_tee)
355 CALL(sys_vmsplice) 355 CALL(sys_vmsplice)
356 CALL(sys_move_pages) 356 CALL(sys_move_pages)
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
index a52da0ddb4..024a9cf469 100644
--- a/arch/arm/kernel/head-common.S
+++ b/arch/arm/kernel/head-common.S
@@ -20,7 +20,8 @@ __switch_data:
20 .long _end @ r7 20 .long _end @ r7
21 .long processor_id @ r4 21 .long processor_id @ r4
22 .long __machine_arch_type @ r5 22 .long __machine_arch_type @ r5
23 .long cr_alignment @ r6 23 .long __atags_pointer @ r6
24 .long cr_alignment @ r7
24 .long init_thread_union + THREAD_START_SP @ sp 25 .long init_thread_union + THREAD_START_SP @ sp
25 26
26/* 27/*
@@ -29,6 +30,7 @@ __switch_data:
29 * 30 *
30 * r0 = cp#15 control register 31 * r0 = cp#15 control register
31 * r1 = machine ID 32 * r1 = machine ID
33 * r2 = atags pointer
32 * r9 = processor ID 34 * r9 = processor ID
33 */ 35 */
34 .type __mmap_switched, %function 36 .type __mmap_switched, %function
@@ -47,11 +49,12 @@ __mmap_switched:
47 strcc fp, [r6],#4 49 strcc fp, [r6],#4
48 bcc 1b 50 bcc 1b
49 51
50 ldmia r3, {r4, r5, r6, sp} 52 ldmia r3, {r4, r5, r6, r7, sp}
51 str r9, [r4] @ Save processor ID 53 str r9, [r4] @ Save processor ID
52 str r1, [r5] @ Save machine type 54 str r1, [r5] @ Save machine type
55 str r2, [r6] @ Save atags pointer
53 bic r4, r0, #CR_A @ Clear 'A' bit 56 bic r4, r0, #CR_A @ Clear 'A' bit
54 stmia r6, {r0, r4} @ Save control register values 57 stmia r7, {r0, r4} @ Save control register values
55 b start_kernel 58 b start_kernel
56 59
57/* 60/*
@@ -215,3 +218,34 @@ ENTRY(lookup_machine_type)
215 bl __lookup_machine_type 218 bl __lookup_machine_type
216 mov r0, r5 219 mov r0, r5
217 ldmfd sp!, {r4 - r6, pc} 220 ldmfd sp!, {r4 - r6, pc}
221
222/* Determine validity of the r2 atags pointer. The heuristic requires
223 * that the pointer be aligned, in the first 16k of physical RAM and
224 * that the ATAG_CORE marker is first and present. Future revisions
225 * of this function may be more lenient with the physical address and
226 * may also be able to move the ATAGS block if necessary.
227 *
228 * r8 = machinfo
229 *
230 * Returns:
231 * r2 either valid atags pointer, or zero
232 * r5, r6 corrupted
233 */
234
235 .type __vet_atags, %function
236__vet_atags:
237 tst r2, #0x3 @ aligned?
238 bne 1f
239
240 ldr r5, [r2, #0] @ is first tag ATAG_CORE?
241 subs r5, r5, #ATAG_CORE_SIZE
242 bne 1f
243 ldr r5, [r2, #4]
244 ldr r6, =ATAG_CORE
245 cmp r5, r6
246 bne 1f
247
248 mov pc, lr @ atag pointer is ok
249
2501: mov r2, #0
251 mov pc, lr
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 41f98b4ba2..7898cbc986 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -29,6 +29,10 @@
29#define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET) 29#define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET)
30#define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET) 30#define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET)
31 31
32#define ATAG_CORE 0x54410001
33#define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2)
34
35
32/* 36/*
33 * swapper_pg_dir is the virtual address of the initial page table. 37 * swapper_pg_dir is the virtual address of the initial page table.
34 * We place the page tables 16K below KERNEL_RAM_VADDR. Therefore, we must 38 * We place the page tables 16K below KERNEL_RAM_VADDR. Therefore, we must
@@ -61,7 +65,7 @@
61 * 65 *
62 * This is normally called from the decompressor code. The requirements 66 * This is normally called from the decompressor code. The requirements
63 * are: MMU = off, D-cache = off, I-cache = dont care, r0 = 0, 67 * are: MMU = off, D-cache = off, I-cache = dont care, r0 = 0,
64 * r1 = machine nr. 68 * r1 = machine nr, r2 = atags pointer.
65 * 69 *
66 * This code is mostly position independent, so if you link the kernel at 70 * This code is mostly position independent, so if you link the kernel at
67 * 0xc0008000, you call this at __pa(0xc0008000). 71 * 0xc0008000, you call this at __pa(0xc0008000).
@@ -85,6 +89,7 @@ ENTRY(stext)
85 bl __lookup_machine_type @ r5=machinfo 89 bl __lookup_machine_type @ r5=machinfo
86 movs r8, r5 @ invalid machine (r5=0)? 90 movs r8, r5 @ invalid machine (r5=0)?
87 beq __error_a @ yes, error 'a' 91 beq __error_a @ yes, error 'a'
92 bl __vet_atags
88 bl __create_page_tables 93 bl __create_page_tables
89 94
90 /* 95 /*
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 5d6e652359..93b7f8e22d 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -28,6 +28,7 @@
28#include <linux/elfcore.h> 28#include <linux/elfcore.h>
29#include <linux/pm.h> 29#include <linux/pm.h>
30#include <linux/tick.h> 30#include <linux/tick.h>
31#include <linux/utsname.h>
31 32
32#include <asm/leds.h> 33#include <asm/leds.h>
33#include <asm/processor.h> 34#include <asm/processor.h>
@@ -43,6 +44,10 @@ static const char *processor_modes[] = {
43 "UK8_32" , "UK9_32" , "UK10_32", "UND_32" , "UK12_32", "UK13_32", "UK14_32", "SYS_32" 44 "UK8_32" , "UK9_32" , "UK10_32", "UND_32" , "UK12_32", "UK13_32", "UK14_32", "SYS_32"
44}; 45};
45 46
47static const char *isa_modes[] = {
48 "ARM" , "Thumb" , "Jazelle", "ThumbEE"
49};
50
46extern void setup_mm_for_reboot(char mode); 51extern void setup_mm_for_reboot(char mode);
47 52
48static volatile int hlt_counter; 53static volatile int hlt_counter;
@@ -199,16 +204,19 @@ void machine_restart(char * __unused)
199 204
200void __show_regs(struct pt_regs *regs) 205void __show_regs(struct pt_regs *regs)
201{ 206{
202 unsigned long flags = condition_codes(regs); 207 unsigned long flags;
208 char buf[64];
203 209
204 printk("CPU: %d\n", smp_processor_id()); 210 printk("CPU: %d %s (%s %.*s)\n",
211 smp_processor_id(), print_tainted(), init_utsname()->release,
212 (int)strcspn(init_utsname()->version, " "),
213 init_utsname()->version);
205 print_symbol("PC is at %s\n", instruction_pointer(regs)); 214 print_symbol("PC is at %s\n", instruction_pointer(regs));
206 print_symbol("LR is at %s\n", regs->ARM_lr); 215 print_symbol("LR is at %s\n", regs->ARM_lr);
207 printk("pc : [<%08lx>] lr : [<%08lx>] %s\n" 216 printk("pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n"
208 "sp : %08lx ip : %08lx fp : %08lx\n", 217 "sp : %08lx ip : %08lx fp : %08lx\n",
209 instruction_pointer(regs), 218 regs->ARM_pc, regs->ARM_lr, regs->ARM_cpsr,
210 regs->ARM_lr, print_tainted(), regs->ARM_sp, 219 regs->ARM_sp, regs->ARM_ip, regs->ARM_fp);
211 regs->ARM_ip, regs->ARM_fp);
212 printk("r10: %08lx r9 : %08lx r8 : %08lx\n", 220 printk("r10: %08lx r9 : %08lx r8 : %08lx\n",
213 regs->ARM_r10, regs->ARM_r9, 221 regs->ARM_r10, regs->ARM_r9,
214 regs->ARM_r8); 222 regs->ARM_r8);
@@ -218,36 +226,39 @@ void __show_regs(struct pt_regs *regs)
218 printk("r3 : %08lx r2 : %08lx r1 : %08lx r0 : %08lx\n", 226 printk("r3 : %08lx r2 : %08lx r1 : %08lx r0 : %08lx\n",
219 regs->ARM_r3, regs->ARM_r2, 227 regs->ARM_r3, regs->ARM_r2,
220 regs->ARM_r1, regs->ARM_r0); 228 regs->ARM_r1, regs->ARM_r0);
221 printk("Flags: %c%c%c%c", 229
222 flags & PSR_N_BIT ? 'N' : 'n', 230 flags = regs->ARM_cpsr;
223 flags & PSR_Z_BIT ? 'Z' : 'z', 231 buf[0] = flags & PSR_N_BIT ? 'N' : 'n';
224 flags & PSR_C_BIT ? 'C' : 'c', 232 buf[1] = flags & PSR_Z_BIT ? 'Z' : 'z';
225 flags & PSR_V_BIT ? 'V' : 'v'); 233 buf[2] = flags & PSR_C_BIT ? 'C' : 'c';
226 printk(" IRQs o%s FIQs o%s Mode %s%s Segment %s\n", 234 buf[3] = flags & PSR_V_BIT ? 'V' : 'v';
227 interrupts_enabled(regs) ? "n" : "ff", 235 buf[4] = '\0';
236
237 printk("Flags: %s IRQs o%s FIQs o%s Mode %s ISA %s Segment %s\n",
238 buf, interrupts_enabled(regs) ? "n" : "ff",
228 fast_interrupts_enabled(regs) ? "n" : "ff", 239 fast_interrupts_enabled(regs) ? "n" : "ff",
229 processor_modes[processor_mode(regs)], 240 processor_modes[processor_mode(regs)],
230 thumb_mode(regs) ? " (T)" : "", 241 isa_modes[isa_mode(regs)],
231 get_fs() == get_ds() ? "kernel" : "user"); 242 get_fs() == get_ds() ? "kernel" : "user");
232#if CONFIG_CPU_CP15 243#ifdef CONFIG_CPU_CP15
233 { 244 {
234 unsigned int ctrl; 245 unsigned int ctrl;
235 __asm__ ( 246
236 " mrc p15, 0, %0, c1, c0\n" 247 buf[0] = '\0';
237 : "=r" (ctrl));
238 printk("Control: %04X\n", ctrl);
239 }
240#ifdef CONFIG_CPU_CP15_MMU 248#ifdef CONFIG_CPU_CP15_MMU
241 { 249 {
242 unsigned int transbase, dac; 250 unsigned int transbase, dac;
243 __asm__ ( 251 asm("mrc p15, 0, %0, c2, c0\n\t"
244 " mrc p15, 0, %0, c2, c0\n" 252 "mrc p15, 0, %1, c3, c0\n"
245 " mrc p15, 0, %1, c3, c0\n" 253 : "=r" (transbase), "=r" (dac));
246 : "=r" (transbase), "=r" (dac)); 254 snprintf(buf, sizeof(buf), " Table: %08x DAC: %08x",
247 printk("Table: %08X DAC: %08X\n", 255 transbase, dac);
248 transbase, dac); 256 }
249 }
250#endif 257#endif
258 asm("mrc p15, 0, %0, c1, c0\n" : "=r" (ctrl));
259
260 printk("Control: %08x%s\n", ctrl, buf);
261 }
251#endif 262#endif
252} 263}
253 264
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index 6f2f46c2e4..78c9f1a3d4 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -657,7 +657,6 @@ static int ptrace_setcrunchregs(struct task_struct *tsk, void __user *ufp)
657 657
658long arch_ptrace(struct task_struct *child, long request, long addr, long data) 658long arch_ptrace(struct task_struct *child, long request, long addr, long data)
659{ 659{
660 unsigned long tmp;
661 int ret; 660 int ret;
662 661
663 switch (request) { 662 switch (request) {
@@ -666,12 +665,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
666 */ 665 */
667 case PTRACE_PEEKTEXT: 666 case PTRACE_PEEKTEXT:
668 case PTRACE_PEEKDATA: 667 case PTRACE_PEEKDATA:
669 ret = access_process_vm(child, addr, &tmp, 668 ret = generic_ptrace_peekdata(child, addr, data);
670 sizeof(unsigned long), 0);
671 if (ret == sizeof(unsigned long))
672 ret = put_user(tmp, (unsigned long __user *) data);
673 else
674 ret = -EIO;
675 break; 669 break;
676 670
677 case PTRACE_PEEKUSR: 671 case PTRACE_PEEKUSR:
@@ -683,12 +677,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
683 */ 677 */
684 case PTRACE_POKETEXT: 678 case PTRACE_POKETEXT:
685 case PTRACE_POKEDATA: 679 case PTRACE_POKEDATA:
686 ret = access_process_vm(child, addr, &data, 680 ret = generic_ptrace_pokedata(child, addr, data);
687 sizeof(unsigned long), 1);
688 if (ret == sizeof(unsigned long))
689 ret = 0;
690 else
691 ret = -EIO;
692 break; 681 break;
693 682
694 case PTRACE_POKEUSR: 683 case PTRACE_POKEUSR:
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 650eac1bc0..5be2e987b8 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -63,6 +63,8 @@ unsigned int processor_id;
63unsigned int __machine_arch_type; 63unsigned int __machine_arch_type;
64EXPORT_SYMBOL(__machine_arch_type); 64EXPORT_SYMBOL(__machine_arch_type);
65 65
66unsigned int __atags_pointer __initdata;
67
66unsigned int system_rev; 68unsigned int system_rev;
67EXPORT_SYMBOL(system_rev); 69EXPORT_SYMBOL(system_rev);
68 70
@@ -780,7 +782,9 @@ void __init setup_arch(char **cmdline_p)
780 if (mdesc->soft_reboot) 782 if (mdesc->soft_reboot)
781 reboot_setup("s"); 783 reboot_setup("s");
782 784
783 if (mdesc->boot_params) 785 if (__atags_pointer)
786 tags = phys_to_virt(__atags_pointer);
787 else if (mdesc->boot_params)
784 tags = phys_to_virt(mdesc->boot_params); 788 tags = phys_to_virt(mdesc->boot_params);
785 789
786 /* 790 /*
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c
index 1ca2d5174f..4d25e49a14 100644
--- a/arch/arm/kernel/sys_arm.c
+++ b/arch/arm/kernel/sys_arm.c
@@ -328,16 +328,3 @@ asmlinkage long sys_arm_fadvise64_64(int fd, int advice,
328{ 328{
329 return sys_fadvise64_64(fd, offset, len, advice); 329 return sys_fadvise64_64(fd, offset, len, advice);
330} 330}
331
332/*
333 * Yet more syscall fsckage - we can't fit sys_sync_file_range's
334 * arguments into the available registers with EABI. So, let's
335 * create an ARM specific syscall for this which has _sane_
336 * arguments. (This incidentally also has an ABI-independent
337 * argument layout.)
338 */
339asmlinkage long sys_arm_sync_file_range(int fd, unsigned int flags,
340 loff_t offset, loff_t nbytes)
341{
342 return sys_sync_file_range(fd, offset, nbytes, flags);
343}
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 10ff36e4e4..f2114bcf09 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -181,9 +181,7 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
181 181
182void dump_stack(void) 182void dump_stack(void)
183{ 183{
184#ifdef CONFIG_DEBUG_ERRORS
185 __backtrace(); 184 __backtrace();
186#endif
187} 185}
188 186
189EXPORT_SYMBOL(dump_stack); 187EXPORT_SYMBOL(dump_stack);
@@ -204,12 +202,24 @@ void show_stack(struct task_struct *tsk, unsigned long *sp)
204 barrier(); 202 barrier();
205} 203}
206 204
205#ifdef CONFIG_PREEMPT
206#define S_PREEMPT " PREEMPT"
207#else
208#define S_PREEMPT ""
209#endif
210#ifdef CONFIG_SMP
211#define S_SMP " SMP"
212#else
213#define S_SMP ""
214#endif
215
207static void __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs) 216static void __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs)
208{ 217{
209 struct task_struct *tsk = thread->task; 218 struct task_struct *tsk = thread->task;
210 static int die_counter; 219 static int die_counter;
211 220
212 printk("Internal error: %s: %x [#%d]\n", str, err, ++die_counter); 221 printk("Internal error: %s: %x [#%d]" S_PREEMPT S_SMP "\n",
222 str, err, ++die_counter);
213 print_modules(); 223 print_modules();
214 __show_regs(regs); 224 __show_regs(regs);
215 printk("Process %s (pid: %d, stack limit = 0x%p)\n", 225 printk("Process %s (pid: %d, stack limit = 0x%p)\n",
@@ -232,16 +242,23 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
232{ 242{
233 struct thread_info *thread = current_thread_info(); 243 struct thread_info *thread = current_thread_info();
234 244
245 oops_enter();
246
235 console_verbose(); 247 console_verbose();
236 spin_lock_irq(&die_lock); 248 spin_lock_irq(&die_lock);
237 bust_spinlocks(1); 249 bust_spinlocks(1);
238 __die(str, err, thread, regs); 250 __die(str, err, thread, regs);
239 bust_spinlocks(0); 251 bust_spinlocks(0);
252 add_taint(TAINT_DIE);
240 spin_unlock_irq(&die_lock); 253 spin_unlock_irq(&die_lock);
241 254
255 if (in_interrupt())
256 panic("Fatal exception in interrupt");
257
242 if (panic_on_oops) 258 if (panic_on_oops)
243 panic("Fatal exception"); 259 panic("Fatal exception");
244 260
261 oops_exit();
245 do_exit(SIGSEGV); 262 do_exit(SIGSEGV);
246} 263}
247 264
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c
index e18a41e61f..dde089922e 100644
--- a/arch/arm/mach-at91/board-csb337.c
+++ b/arch/arm/mach-at91/board-csb337.c
@@ -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/i2c.h>
26#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
27#include <linux/mtd/physmap.h> 28#include <linux/mtd/physmap.h>
28 29
@@ -83,6 +84,13 @@ static struct at91_udc_data __initdata csb337_udc_data = {
83 .pullup_pin = AT91_PIN_PA24, 84 .pullup_pin = AT91_PIN_PA24,
84}; 85};
85 86
87static struct i2c_board_info __initdata csb337_i2c_devices[] = {
88 { I2C_BOARD_INFO("rtc-ds1307", 0x68),
89 .type = "ds1307",
90 },
91};
92
93
86static struct at91_cf_data __initdata csb337_cf_data = { 94static struct at91_cf_data __initdata csb337_cf_data = {
87 /* 95 /*
88 * connector P4 on the CSB 337 mates to 96 * connector P4 on the CSB 337 mates to
@@ -161,6 +169,8 @@ static void __init csb337_board_init(void)
161 at91_add_device_udc(&csb337_udc_data); 169 at91_add_device_udc(&csb337_udc_data);
162 /* I2C */ 170 /* I2C */
163 at91_add_device_i2c(); 171 at91_add_device_i2c();
172 i2c_register_board_info(0, csb337_i2c_devices,
173 ARRAY_SIZE(csb337_i2c_devices));
164 /* Compact Flash */ 174 /* Compact Flash */
165 at91_set_gpio_input(AT91_PIN_PB22, 1); /* IOIS16 */ 175 at91_set_gpio_input(AT91_PIN_PB22, 1); /* IOIS16 */
166 at91_add_device_cf(&csb337_cf_data); 176 at91_add_device_cf(&csb337_cf_data);
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index 26ca8ab3f6..42e172cb0f 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -27,6 +27,11 @@
27#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
28#include <linux/spi/ads7846.h> 28#include <linux/spi/ads7846.h>
29#include <linux/dm9000.h> 29#include <linux/dm9000.h>
30#include <linux/fb.h>
31#include <linux/gpio_keys.h>
32#include <linux/input.h>
33
34#include <video/atmel_lcdc.h>
30 35
31#include <asm/hardware.h> 36#include <asm/hardware.h>
32#include <asm/setup.h> 37#include <asm/setup.h>
@@ -271,6 +276,127 @@ static struct spi_board_info ek_spi_devices[] = {
271}; 276};
272 277
273 278
279/*
280 * LCD Controller
281 */
282#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
283static struct fb_videomode at91_tft_vga_modes[] = {
284 {
285 .name = "TX09D50VM1CCA @ 60",
286 .refresh = 60,
287 .xres = 240, .yres = 320,
288 .pixclock = KHZ2PICOS(4965),
289
290 .left_margin = 1, .right_margin = 33,
291 .upper_margin = 1, .lower_margin = 0,
292 .hsync_len = 5, .vsync_len = 1,
293
294 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
295 .vmode = FB_VMODE_NONINTERLACED,
296 },
297};
298
299static struct fb_monspecs at91fb_default_monspecs = {
300 .manufacturer = "HIT",
301 .monitor = "TX09D50VM1CCA",
302
303 .modedb = at91_tft_vga_modes,
304 .modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
305 .hfmin = 15000,
306 .hfmax = 64000,
307 .vfmin = 50,
308 .vfmax = 150,
309};
310
311#define AT91SAM9261_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \
312 | ATMEL_LCDC_DISTYPE_TFT \
313 | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
314
315static void at91_lcdc_power_control(int on)
316{
317 if (on)
318 at91_set_gpio_value(AT91_PIN_PA12, 0); /* power up */
319 else
320 at91_set_gpio_value(AT91_PIN_PA12, 1); /* power down */
321}
322
323/* Driver datas */
324static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
325 .default_bpp = 16,
326 .default_dmacon = ATMEL_LCDC_DMAEN,
327 .default_lcdcon2 = AT91SAM9261_DEFAULT_LCDCON2,
328 .default_monspecs = &at91fb_default_monspecs,
329 .atmel_lcdfb_power_control = at91_lcdc_power_control,
330 .guard_time = 1,
331};
332
333#else
334static struct atmel_lcdfb_info __initdata ek_lcdc_data;
335#endif
336
337
338/*
339 * GPIO Buttons
340 */
341#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
342static struct gpio_keys_button ek_buttons[] = {
343 {
344 .gpio = AT91_PIN_PA27,
345 .keycode = BTN_0,
346 .desc = "Button 0",
347 .active_low = 1,
348 },
349 {
350 .gpio = AT91_PIN_PA26,
351 .keycode = BTN_1,
352 .desc = "Button 1",
353 .active_low = 1,
354 },
355 {
356 .gpio = AT91_PIN_PA25,
357 .keycode = BTN_2,
358 .desc = "Button 2",
359 .active_low = 1,
360 },
361 {
362 .gpio = AT91_PIN_PA24,
363 .keycode = BTN_3,
364 .desc = "Button 3",
365 .active_low = 1,
366 }
367};
368
369static struct gpio_keys_platform_data ek_button_data = {
370 .buttons = ek_buttons,
371 .nbuttons = ARRAY_SIZE(ek_buttons),
372};
373
374static struct platform_device ek_button_device = {
375 .name = "gpio-keys",
376 .id = -1,
377 .num_resources = 0,
378 .dev = {
379 .platform_data = &ek_button_data,
380 }
381};
382
383static void __init ek_add_device_buttons(void)
384{
385 at91_set_gpio_input(AT91_PIN_PB27, 0); /* btn0 */
386 at91_set_deglitch(AT91_PIN_PB27, 1);
387 at91_set_gpio_input(AT91_PIN_PB26, 0); /* btn1 */
388 at91_set_deglitch(AT91_PIN_PB26, 1);
389 at91_set_gpio_input(AT91_PIN_PB25, 0); /* btn2 */
390 at91_set_deglitch(AT91_PIN_PB25, 1);
391 at91_set_gpio_input(AT91_PIN_PB24, 0); /* btn3 */
392 at91_set_deglitch(AT91_PIN_PB24, 1);
393
394 platform_device_register(&ek_button_device);
395}
396#else
397static void __init ek_add_device_buttons(void) {}
398#endif
399
274static void __init ek_board_init(void) 400static void __init ek_board_init(void)
275{ 401{
276 /* Serial */ 402 /* Serial */
@@ -296,6 +422,10 @@ static void __init ek_board_init(void)
296 /* MMC */ 422 /* MMC */
297 at91_add_device_mmc(0, &ek_mmc_data); 423 at91_add_device_mmc(0, &ek_mmc_data);
298#endif 424#endif
425 /* LCD Controller */
426 at91_add_device_lcdc(&ek_lcdc_data);
427 /* Push Buttons */
428 ek_add_device_buttons();
299} 429}
300 430
301MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK") 431MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK")
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index c164c8e58a..2a1cc73390 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -26,6 +26,9 @@
26#include <linux/platform_device.h> 26#include <linux/platform_device.h>
27#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
28#include <linux/spi/ads7846.h> 28#include <linux/spi/ads7846.h>
29#include <linux/fb.h>
30
31#include <video/atmel_lcdc.h>
29 32
30#include <asm/hardware.h> 33#include <asm/hardware.h>
31#include <asm/setup.h> 34#include <asm/setup.h>
@@ -202,6 +205,65 @@ static struct at91_nand_data __initdata ek_nand_data = {
202 205
203 206
204/* 207/*
208 * LCD Controller
209 */
210#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
211static struct fb_videomode at91_tft_vga_modes[] = {
212 {
213 .name = "TX09D50VM1CCA @ 60",
214 .refresh = 60,
215 .xres = 240, .yres = 320,
216 .pixclock = KHZ2PICOS(4965),
217
218 .left_margin = 1, .right_margin = 33,
219 .upper_margin = 1, .lower_margin = 0,
220 .hsync_len = 5, .vsync_len = 1,
221
222 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
223 .vmode = FB_VMODE_NONINTERLACED,
224 },
225};
226
227static struct fb_monspecs at91fb_default_monspecs = {
228 .manufacturer = "HIT",
229 .monitor = "TX09D70VM1CCA",
230
231 .modedb = at91_tft_vga_modes,
232 .modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
233 .hfmin = 15000,
234 .hfmax = 64000,
235 .vfmin = 50,
236 .vfmax = 150,
237};
238
239#define AT91SAM9263_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \
240 | ATMEL_LCDC_DISTYPE_TFT \
241 | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
242
243static void at91_lcdc_power_control(int on)
244{
245 if (on)
246 at91_set_gpio_value(AT91_PIN_PD12, 0); /* power up */
247 else
248 at91_set_gpio_value(AT91_PIN_PD12, 1); /* power down */
249}
250
251/* Driver datas */
252static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
253 .default_bpp = 16,
254 .default_dmacon = ATMEL_LCDC_DMAEN,
255 .default_lcdcon2 = AT91SAM9263_DEFAULT_LCDCON2,
256 .default_monspecs = &at91fb_default_monspecs,
257 .atmel_lcdfb_power_control = at91_lcdc_power_control,
258 .guard_time = 1,
259};
260
261#else
262static struct atmel_lcdfb_info __initdata ek_lcdc_data;
263#endif
264
265
266/*
205 * AC97 267 * AC97
206 */ 268 */
207static struct atmel_ac97_data ek_ac97_data = { 269static struct atmel_ac97_data ek_ac97_data = {
@@ -230,6 +292,8 @@ static void __init ek_board_init(void)
230 at91_add_device_nand(&ek_nand_data); 292 at91_add_device_nand(&ek_nand_data);
231 /* I2C */ 293 /* I2C */
232 at91_add_device_i2c(); 294 at91_add_device_i2c();
295 /* LCD Controller */
296 at91_add_device_lcdc(&ek_lcdc_data);
233 /* AC97 */ 297 /* AC97 */
234 at91_add_device_ac97(&ek_ac97_data); 298 at91_add_device_ac97(&ek_ac97_data);
235} 299}
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 47ff676aca..ddf9184d56 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -53,7 +53,7 @@ static suspend_state_t target_state;
53/* 53/*
54 * Called after processes are frozen, but before we shutdown devices. 54 * Called after processes are frozen, but before we shutdown devices.
55 */ 55 */
56static int at91_pm_prepare(suspend_state_t state) 56static int at91_pm_set_target(suspend_state_t state)
57{ 57{
58 target_state = state; 58 target_state = state;
59 return 0; 59 return 0;
@@ -201,7 +201,7 @@ error:
201 201
202static struct pm_ops at91_pm_ops ={ 202static struct pm_ops at91_pm_ops ={
203 .valid = at91_pm_valid_state, 203 .valid = at91_pm_valid_state,
204 .prepare = at91_pm_prepare, 204 .set_target = at91_pm_set_target,
205 .enter = at91_pm_enter, 205 .enter = at91_pm_enter,
206}; 206};
207 207
diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile
index a8f88cd299..99ac2e5577 100644
--- a/arch/arm/mach-davinci/Makefile
+++ b/arch/arm/mach-davinci/Makefile
@@ -4,7 +4,8 @@
4# 4#
5 5
6# Common objects 6# Common objects
7obj-y := time.o irq.o serial.o io.o id.o psc.o 7obj-y := time.o irq.o clock.o serial.o io.o id.o psc.o \
8 gpio.o mux.o
8 9
9# Board specific 10# Board specific
10obj-$(CONFIG_MACH_DAVINCI_EVM) += board-evm.o 11obj-$(CONFIG_MACH_DAVINCI_EVM) += board-evm.o
diff --git a/arch/arm/mach-davinci/board-evm.c b/arch/arm/mach-davinci/board-evm.c
index 633c12e430..9e4024c496 100644
--- a/arch/arm/mach-davinci/board-evm.c
+++ b/arch/arm/mach-davinci/board-evm.c
@@ -32,6 +32,7 @@
32void __init davinci_psc_init(void); 32void __init davinci_psc_init(void);
33void __init davinci_irq_init(void); 33void __init davinci_irq_init(void);
34void __init davinci_map_common_io(void); 34void __init davinci_map_common_io(void);
35void __init davinci_init_common_hw(void);
35 36
36/* NOR Flash base address set to CS0 by default */ 37/* NOR Flash base address set to CS0 by default */
37#define NOR_FLASH_PHYS 0x02000000 38#define NOR_FLASH_PHYS 0x02000000
@@ -116,6 +117,7 @@ static __init void davinci_evm_init(void)
116 117
117static __init void davinci_evm_irq_init(void) 118static __init void davinci_evm_irq_init(void)
118{ 119{
120 davinci_init_common_hw();
119 davinci_irq_init(); 121 davinci_irq_init();
120} 122}
121 123
diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c
new file mode 100644
index 0000000000..139ceaa35e
--- /dev/null
+++ b/arch/arm/mach-davinci/clock.c
@@ -0,0 +1,323 @@
1/*
2 * TI DaVinci clock config file
3 *
4 * Copyright (C) 2006 Texas Instruments.
5 *
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 <linux/module.h>
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/errno.h>
16#include <linux/err.h>
17#include <linux/mutex.h>
18#include <linux/platform_device.h>
19
20#include <asm/hardware.h>
21#include <asm/io.h>
22
23#include <asm/arch/psc.h>
24#include "clock.h"
25
26/* PLL/Reset register offsets */
27#define PLLM 0x110
28
29static LIST_HEAD(clocks);
30static DEFINE_MUTEX(clocks_mutex);
31static DEFINE_SPINLOCK(clockfw_lock);
32
33static unsigned int commonrate;
34static unsigned int armrate;
35static unsigned int fixedrate = 27000000; /* 27 MHZ */
36
37extern void davinci_psc_config(unsigned int domain, unsigned int id, char enable);
38
39/*
40 * Returns a clock. Note that we first try to use device id on the bus
41 * and clock name. If this fails, we try to use clock name only.
42 */
43struct clk *clk_get(struct device *dev, const char *id)
44{
45 struct clk *p, *clk = ERR_PTR(-ENOENT);
46 int idno;
47
48 if (dev == NULL || dev->bus != &platform_bus_type)
49 idno = -1;
50 else
51 idno = to_platform_device(dev)->id;
52
53 mutex_lock(&clocks_mutex);
54
55 list_for_each_entry(p, &clocks, node) {
56 if (p->id == idno &&
57 strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
58 clk = p;
59 goto found;
60 }
61 }
62
63 list_for_each_entry(p, &clocks, node) {
64 if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
65 clk = p;
66 break;
67 }
68 }
69
70found:
71 mutex_unlock(&clocks_mutex);
72
73 return clk;
74}
75EXPORT_SYMBOL(clk_get);
76
77void clk_put(struct clk *clk)
78{
79 if (clk && !IS_ERR(clk))
80 module_put(clk->owner);
81}
82EXPORT_SYMBOL(clk_put);
83
84static int __clk_enable(struct clk *clk)
85{
86 if (clk->flags & ALWAYS_ENABLED)
87 return 0;
88
89 davinci_psc_config(DAVINCI_GPSC_ARMDOMAIN, clk->lpsc, 1);
90 return 0;
91}
92
93static void __clk_disable(struct clk *clk)
94{
95 if (clk->usecount)
96 return;
97
98 davinci_psc_config(DAVINCI_GPSC_ARMDOMAIN, clk->lpsc, 0);
99}
100
101int clk_enable(struct clk *clk)
102{
103 unsigned long flags;
104 int ret = 0;
105
106 if (clk == NULL || IS_ERR(clk))
107 return -EINVAL;
108
109 if (clk->usecount++ == 0) {
110 spin_lock_irqsave(&clockfw_lock, flags);
111 ret = __clk_enable(clk);
112 spin_unlock_irqrestore(&clockfw_lock, flags);
113 }
114
115 return ret;
116}
117EXPORT_SYMBOL(clk_enable);
118
119void clk_disable(struct clk *clk)
120{
121 unsigned long flags;
122
123 if (clk == NULL || IS_ERR(clk))
124 return;
125
126 if (clk->usecount > 0 && !(--clk->usecount)) {
127 spin_lock_irqsave(&clockfw_lock, flags);
128 __clk_disable(clk);
129 spin_unlock_irqrestore(&clockfw_lock, flags);
130 }
131}
132EXPORT_SYMBOL(clk_disable);
133
134unsigned long clk_get_rate(struct clk *clk)
135{
136 if (clk == NULL || IS_ERR(clk))
137 return -EINVAL;
138
139 return *(clk->rate);
140}
141EXPORT_SYMBOL(clk_get_rate);
142
143long clk_round_rate(struct clk *clk, unsigned long rate)
144{
145 if (clk == NULL || IS_ERR(clk))
146 return -EINVAL;
147
148 return *(clk->rate);
149}
150EXPORT_SYMBOL(clk_round_rate);
151
152int clk_set_rate(struct clk *clk, unsigned long rate)
153{
154 if (clk == NULL || IS_ERR(clk))
155 return -EINVAL;
156
157 /* changing the clk rate is not supported */
158 return -EINVAL;
159}
160EXPORT_SYMBOL(clk_set_rate);
161
162int clk_register(struct clk *clk)
163{
164 if (clk == NULL || IS_ERR(clk))
165 return -EINVAL;
166
167 mutex_lock(&clocks_mutex);
168 list_add(&clk->node, &clocks);
169 mutex_unlock(&clocks_mutex);
170
171 return 0;
172}
173EXPORT_SYMBOL(clk_register);
174
175void clk_unregister(struct clk *clk)
176{
177 if (clk == NULL || IS_ERR(clk))
178 return;
179
180 mutex_lock(&clocks_mutex);
181 list_del(&clk->node);
182 mutex_unlock(&clocks_mutex);
183}
184EXPORT_SYMBOL(clk_unregister);
185
186static struct clk davinci_clks[] = {
187 {
188 .name = "ARMCLK",
189 .rate = &armrate,
190 .lpsc = -1,
191 .flags = ALWAYS_ENABLED,
192 },
193 {
194 .name = "UART",
195 .rate = &fixedrate,
196 .lpsc = DAVINCI_LPSC_UART0,
197 },
198 {
199 .name = "EMACCLK",
200 .rate = &commonrate,
201 .lpsc = DAVINCI_LPSC_EMAC_WRAPPER,
202 },
203 {
204 .name = "I2CCLK",
205 .rate = &fixedrate,
206 .lpsc = DAVINCI_LPSC_I2C,
207 },
208 {
209 .name = "IDECLK",
210 .rate = &commonrate,
211 .lpsc = DAVINCI_LPSC_ATA,
212 },
213 {
214 .name = "McBSPCLK",
215 .rate = &commonrate,
216 .lpsc = DAVINCI_LPSC_McBSP,
217 },
218 {
219 .name = "MMCSDCLK",
220 .rate = &commonrate,
221 .lpsc = DAVINCI_LPSC_MMC_SD,
222 },
223 {
224 .name = "SPICLK",
225 .rate = &commonrate,
226 .lpsc = DAVINCI_LPSC_SPI,
227 },
228 {
229 .name = "gpio",
230 .rate = &commonrate,
231 .lpsc = DAVINCI_LPSC_GPIO,
232 },
233 {
234 .name = "AEMIFCLK",
235 .rate = &commonrate,
236 .lpsc = DAVINCI_LPSC_AEMIF,
237 .usecount = 1,
238 }
239};
240
241int __init davinci_clk_init(void)
242{
243 struct clk *clkp;
244 int count = 0;
245 u32 pll_mult;
246
247 pll_mult = davinci_readl(DAVINCI_PLL_CNTRL0_BASE + PLLM);
248 commonrate = ((pll_mult + 1) * 27000000) / 6;
249 armrate = ((pll_mult + 1) * 27000000) / 2;
250
251 for (clkp = davinci_clks; count < ARRAY_SIZE(davinci_clks);
252 count++, clkp++) {
253 clk_register(clkp);
254
255 /* Turn on clocks that have been enabled in the
256 * table above */
257 if (clkp->usecount)
258 clk_enable(clkp);
259 }
260
261 return 0;
262}
263
264#ifdef CONFIG_PROC_FS
265#include <linux/proc_fs.h>
266#include <linux/seq_file.h>
267
268static void *davinci_ck_start(struct seq_file *m, loff_t *pos)
269{
270 return *pos < 1 ? (void *)1 : NULL;
271}
272
273static void *davinci_ck_next(struct seq_file *m, void *v, loff_t *pos)
274{
275 ++*pos;
276 return NULL;
277}
278
279static void davinci_ck_stop(struct seq_file *m, void *v)
280{
281}
282
283static int davinci_ck_show(struct seq_file *m, void *v)
284{
285 struct clk *cp;
286
287 list_for_each_entry(cp, &clocks, node)
288 seq_printf(m,"%s %d %d\n", cp->name, *(cp->rate), cp->usecount);
289
290 return 0;
291}
292
293static struct seq_operations davinci_ck_op = {
294 .start = davinci_ck_start,
295 .next = davinci_ck_next,
296 .stop = davinci_ck_stop,
297 .show = davinci_ck_show
298};
299
300static int davinci_ck_open(struct inode *inode, struct file *file)
301{
302 return seq_open(file, &davinci_ck_op);
303}
304
305static struct file_operations proc_davinci_ck_operations = {
306 .open = davinci_ck_open,
307 .read = seq_read,
308 .llseek = seq_lseek,
309 .release = seq_release,
310};
311
312static int __init davinci_ck_proc_init(void)
313{
314 struct proc_dir_entry *entry;
315
316 entry = create_proc_entry("davinci_clocks", 0, NULL);
317 if (entry)
318 entry->proc_fops = &proc_davinci_ck_operations;
319 return 0;
320
321}
322__initcall(davinci_ck_proc_init);
323#endif /* CONFIG_DEBUG_PROC_FS */
diff --git a/arch/arm/mach-davinci/clock.h b/arch/arm/mach-davinci/clock.h
new file mode 100644
index 0000000000..ed47079a52
--- /dev/null
+++ b/arch/arm/mach-davinci/clock.h
@@ -0,0 +1,33 @@
1/*
2 * TI DaVinci clock definitions
3 *
4 * Copyright (C) 2006 Texas Instruments.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ARCH_ARM_DAVINCI_CLOCK_H
12#define __ARCH_ARM_DAVINCI_CLOCK_H
13
14struct clk {
15 struct list_head node;
16 struct module *owner;
17 const char *name;
18 unsigned int *rate;
19 int id;
20 __s8 usecount;
21 __u8 flags;
22 __u8 lpsc;
23};
24
25/* Clock flags */
26#define RATE_CKCTL 1
27#define RATE_FIXED 2
28#define RATE_PROPAGATES 4
29#define VIRTUAL_CLOCK 8
30#define ALWAYS_ENABLED 16
31#define ENABLE_REG_32BIT 32
32
33#endif
diff --git a/arch/arm/mach-davinci/gpio.c b/arch/arm/mach-davinci/gpio.c
new file mode 100644
index 0000000000..9c67886e71
--- /dev/null
+++ b/arch/arm/mach-davinci/gpio.c
@@ -0,0 +1,286 @@
1/*
2 * TI DaVinci GPIO Support
3 *
4 * Copyright (c) 2006 David Brownell
5 * Copyright (c) 2007, MontaVista Software, Inc. <source@mvista.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#include <linux/errno.h>
14#include <linux/kernel.h>
15#include <linux/list.h>
16#include <linux/module.h>
17#include <linux/clk.h>
18#include <linux/err.h>
19#include <linux/io.h>
20#include <linux/irq.h>
21#include <linux/bitops.h>
22
23#include <asm/arch/irqs.h>
24#include <asm/arch/hardware.h>
25#include <asm/arch/gpio.h>
26
27#include <asm/mach/irq.h>
28
29static DEFINE_SPINLOCK(gpio_lock);
30static DECLARE_BITMAP(gpio_in_use, DAVINCI_N_GPIO);
31
32int gpio_request(unsigned gpio, const char *tag)
33{
34 if (gpio >= DAVINCI_N_GPIO)
35 return -EINVAL;
36
37 if (test_and_set_bit(gpio, gpio_in_use))
38 return -EBUSY;
39
40 return 0;
41}
42EXPORT_SYMBOL(gpio_request);
43
44void gpio_free(unsigned gpio)
45{
46 if (gpio >= DAVINCI_N_GPIO)
47 return;
48
49 clear_bit(gpio, gpio_in_use);
50}
51EXPORT_SYMBOL(gpio_free);
52
53/* create a non-inlined version */
54static struct gpio_controller *__iomem gpio2controller(unsigned gpio)
55{
56 return __gpio_to_controller(gpio);
57}
58
59/*
60 * Assuming the pin is muxed as a gpio output, set its output value.
61 */
62void __gpio_set(unsigned gpio, int value)
63{
64 struct gpio_controller *__iomem g = gpio2controller(gpio);
65
66 __raw_writel(__gpio_mask(gpio), value ? &g->set_data : &g->clr_data);
67}
68EXPORT_SYMBOL(__gpio_set);
69
70
71/*
72 * Read the pin's value (works even if it's set up as output);
73 * returns zero/nonzero.
74 *
75 * Note that changes are synched to the GPIO clock, so reading values back
76 * right after you've set them may give old values.
77 */
78int __gpio_get(unsigned gpio)
79{
80 struct gpio_controller *__iomem g = gpio2controller(gpio);
81
82 return !!(__gpio_mask(gpio) & __raw_readl(&g->in_data));
83}
84EXPORT_SYMBOL(__gpio_get);
85
86
87/*--------------------------------------------------------------------------*/
88
89/*
90 * board setup code *MUST* set PINMUX0 and PINMUX1 as
91 * needed, and enable the GPIO clock.
92 */
93
94int gpio_direction_input(unsigned gpio)
95{
96 struct gpio_controller *__iomem g = gpio2controller(gpio);
97 u32 temp;
98 u32 mask;
99
100 if (!g)
101 return -EINVAL;
102
103 spin_lock(&gpio_lock);
104 mask = __gpio_mask(gpio);
105 temp = __raw_readl(&g->dir);
106 temp |= mask;
107 __raw_writel(temp, &g->dir);
108 spin_unlock(&gpio_lock);
109 return 0;
110}
111EXPORT_SYMBOL(gpio_direction_input);
112
113int gpio_direction_output(unsigned gpio, int value)
114{
115 struct gpio_controller *__iomem g = gpio2controller(gpio);
116 u32 temp;
117 u32 mask;
118
119 if (!g)
120 return -EINVAL;
121
122 spin_lock(&gpio_lock);
123 mask = __gpio_mask(gpio);
124 temp = __raw_readl(&g->dir);
125 temp &= ~mask;
126 __raw_writel(mask, value ? &g->set_data : &g->clr_data);
127 __raw_writel(temp, &g->dir);
128 spin_unlock(&gpio_lock);
129 return 0;
130}
131EXPORT_SYMBOL(gpio_direction_output);
132
133/*
134 * We expect irqs will normally be set up as input pins, but they can also be
135 * used as output pins ... which is convenient for testing.
136 *
137 * NOTE: GPIO0..GPIO7 also have direct INTC hookups, which work in addition
138 * to their GPIOBNK0 irq (but with a bit less overhead). But we don't have
139 * a good way to hook those up ...
140 *
141 * All those INTC hookups (GPIO0..GPIO7 plus five IRQ banks) can also
142 * serve as EDMA event triggers.
143 */
144
145static void gpio_irq_disable(unsigned irq)
146{
147 struct gpio_controller *__iomem g = get_irq_chip_data(irq);
148 u32 mask = __gpio_mask(irq_to_gpio(irq));
149
150 __raw_writel(mask, &g->clr_falling);
151 __raw_writel(mask, &g->clr_rising);
152}
153
154static void gpio_irq_enable(unsigned irq)
155{
156 struct gpio_controller *__iomem g = get_irq_chip_data(irq);
157 u32 mask = __gpio_mask(irq_to_gpio(irq));
158
159 if (irq_desc[irq].status & IRQ_TYPE_EDGE_FALLING)
160 __raw_writel(mask, &g->set_falling);
161 if (irq_desc[irq].status & IRQ_TYPE_EDGE_RISING)
162 __raw_writel(mask, &g->set_rising);
163}
164
165static int gpio_irq_type(unsigned irq, unsigned trigger)
166{
167 struct gpio_controller *__iomem g = get_irq_chip_data(irq);
168 u32 mask = __gpio_mask(irq_to_gpio(irq));
169
170 if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))
171 return -EINVAL;
172
173 irq_desc[irq].status &= ~IRQ_TYPE_SENSE_MASK;
174 irq_desc[irq].status |= trigger;
175
176 __raw_writel(mask, (trigger & IRQ_TYPE_EDGE_FALLING)
177 ? &g->set_falling : &g->clr_falling);
178 __raw_writel(mask, (trigger & IRQ_TYPE_EDGE_RISING)
179 ? &g->set_rising : &g->clr_rising);
180 return 0;
181}
182
183static struct irq_chip gpio_irqchip = {
184 .name = "GPIO",
185 .enable = gpio_irq_enable,
186 .disable = gpio_irq_disable,
187 .set_type = gpio_irq_type,
188};
189
190static void
191gpio_irq_handler(unsigned irq, struct irq_desc *desc)
192{
193 struct gpio_controller *__iomem g = get_irq_chip_data(irq);
194 u32 mask = 0xffff;
195
196 /* we only care about one bank */
197 if (irq & 1)
198 mask <<= 16;
199
200 /* temporarily mask (level sensitive) parent IRQ */
201 desc->chip->ack(irq);
202 while (1) {
203 u32 status;
204 struct irq_desc *gpio;
205 int n;
206 int res;
207
208 /* ack any irqs */
209 status = __raw_readl(&g->intstat) & mask;
210 if (!status)
211 break;
212 __raw_writel(status, &g->intstat);
213 if (irq & 1)
214 status >>= 16;
215
216 /* now demux them to the right lowlevel handler */
217 n = (int)get_irq_data(irq);
218 gpio = &irq_desc[n];
219 while (status) {
220 res = ffs(status);
221 n += res;
222 gpio += res;
223 desc_handle_irq(n - 1, gpio - 1);
224 status >>= res;
225 }
226 }
227 desc->chip->unmask(irq);
228 /* now it may re-trigger */
229}
230
231/*
232 * NOTE: for suspend/resume, probably best to make a sysdev (and class)
233 * with its suspend/resume calls hooking into the results of the set_wake()
234 * calls ... so if no gpios are wakeup events the clock can be disabled,
235 * with outputs left at previously set levels, and so that VDD3P3V.IOPWDN0
236 * can be set appropriately for GPIOV33 pins.
237 */
238
239static int __init davinci_gpio_irq_setup(void)
240{
241 unsigned gpio, irq, bank;
242 struct clk *clk;
243
244 clk = clk_get(NULL, "gpio");
245 if (IS_ERR(clk)) {
246 printk(KERN_ERR "Error %ld getting gpio clock?\n",
247 PTR_ERR(clk));
248 return 0;
249 }
250
251 clk_enable(clk);
252
253 for (gpio = 0, irq = gpio_to_irq(0), bank = IRQ_GPIOBNK0;
254 gpio < DAVINCI_N_GPIO; bank++) {
255 struct gpio_controller *__iomem g = gpio2controller(gpio);
256 unsigned i;
257
258 __raw_writel(~0, &g->clr_falling);
259 __raw_writel(~0, &g->clr_rising);
260
261 /* set up all irqs in this bank */
262 set_irq_chained_handler(bank, gpio_irq_handler);
263 set_irq_chip_data(bank, g);
264 set_irq_data(bank, (void *)irq);
265
266 for (i = 0; i < 16 && gpio < DAVINCI_N_GPIO;
267 i++, irq++, gpio++) {
268 set_irq_chip(irq, &gpio_irqchip);
269 set_irq_chip_data(irq, g);
270 set_irq_handler(irq, handle_simple_irq);
271 set_irq_flags(irq, IRQF_VALID);
272 }
273 }
274
275 /* BINTEN -- per-bank interrupt enable. genirq would also let these
276 * bits be set/cleared dynamically.
277 */
278 __raw_writel(0x1f, (void *__iomem)
279 IO_ADDRESS(DAVINCI_GPIO_BASE + 0x08));
280
281 printk(KERN_INFO "DaVinci: %d gpio irqs\n", irq - gpio_to_irq(0));
282
283 return 0;
284}
285
286arch_initcall(davinci_gpio_irq_setup);
diff --git a/arch/arm/mach-davinci/io.c b/arch/arm/mach-davinci/io.c
index 87fae6fb6e..47787ff84a 100644
--- a/arch/arm/mach-davinci/io.c
+++ b/arch/arm/mach-davinci/io.c
@@ -17,6 +17,7 @@
17#include <asm/memory.h> 17#include <asm/memory.h>
18 18
19#include <asm/mach/map.h> 19#include <asm/mach/map.h>
20#include <asm/arch/clock.h>
20 21
21extern void davinci_check_revision(void); 22extern void davinci_check_revision(void);
22 23
@@ -49,3 +50,8 @@ void __init davinci_map_common_io(void)
49 */ 50 */
50 davinci_check_revision(); 51 davinci_check_revision();
51} 52}
53
54void __init davinci_init_common_hw(void)
55{
56 davinci_clk_init();
57}
diff --git a/arch/arm/mach-davinci/mux.c b/arch/arm/mach-davinci/mux.c
new file mode 100644
index 0000000000..92d26bd305
--- /dev/null
+++ b/arch/arm/mach-davinci/mux.c
@@ -0,0 +1,41 @@
1/*
2 * DaVinci pin multiplexing configurations
3 *
4 * Author: Vladimir Barinov, MontaVista Software, Inc. <source@mvista.com>
5 *
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11#include <linux/io.h>
12#include <linux/spinlock.h>
13
14#include <asm/hardware.h>
15
16#include <asm/arch/mux.h>
17
18/* System control register offsets */
19#define PINMUX0 0x00
20#define PINMUX1 0x04
21
22static DEFINE_SPINLOCK(mux_lock);
23
24void davinci_mux_peripheral(unsigned int mux, unsigned int enable)
25{
26 u32 pinmux, muxreg = PINMUX0;
27
28 if (mux >= DAVINCI_MUX_LEVEL2) {
29 muxreg = PINMUX1;
30 mux -= DAVINCI_MUX_LEVEL2;
31 }
32
33 spin_lock(&mux_lock);
34 pinmux = davinci_readl(DAVINCI_SYSTEM_MODULE_BASE + muxreg);
35 if (enable)
36 pinmux |= (1 << mux);
37 else
38 pinmux &= ~(1 << mux);
39 davinci_writel(pinmux, DAVINCI_SYSTEM_MODULE_BASE + muxreg);
40 spin_unlock(&mux_lock);
41}
diff --git a/arch/arm/mach-davinci/psc.c b/arch/arm/mach-davinci/psc.c
index e1b0050283..1334416559 100644
--- a/arch/arm/mach-davinci/psc.c
+++ b/arch/arm/mach-davinci/psc.c
@@ -25,39 +25,40 @@
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/hardware.h> 26#include <asm/hardware.h>
27#include <asm/arch/psc.h> 27#include <asm/arch/psc.h>
28#include <asm/arch/mux.h>
28 29
29#define PTCMD __REG(0x01C41120) 30/* PSC register offsets */
30#define PDSTAT __REG(0x01C41200) 31#define EPCPR 0x070
31#define PDCTL1 __REG(0x01C41304) 32#define PTCMD 0x120
32#define EPCPR __REG(0x01C41070) 33#define PTSTAT 0x128
33#define PTSTAT __REG(0x01C41128) 34#define PDSTAT 0x200
35#define PDCTL1 0x304
36#define MDSTAT 0x800
37#define MDCTL 0xA00
34 38
35#define MDSTAT IO_ADDRESS(0x01C41800) 39/* System control register offsets */
36#define MDCTL IO_ADDRESS(0x01C41A00) 40#define VDD3P3V_PWDN 0x48
37
38#define PINMUX0 __REG(0x01c40000)
39#define PINMUX1 __REG(0x01c40004)
40#define VDD3P3V_PWDN __REG(0x01C40048)
41 41
42static void davinci_psc_mux(unsigned int id) 42static void davinci_psc_mux(unsigned int id)
43{ 43{
44 switch (id) { 44 switch (id) {
45 case DAVINCI_LPSC_ATA: 45 case DAVINCI_LPSC_ATA:
46 PINMUX0 |= (1 << 17) | (1 << 16); 46 davinci_mux_peripheral(DAVINCI_MUX_HDIREN, 1);
47 davinci_mux_peripheral(DAVINCI_MUX_ATAEN, 1);
47 break; 48 break;
48 case DAVINCI_LPSC_MMC_SD: 49 case DAVINCI_LPSC_MMC_SD:
49 /* VDD power manupulations are done in U-Boot for CPMAC 50 /* VDD power manupulations are done in U-Boot for CPMAC
50 * so applies to MMC as well 51 * so applies to MMC as well
51 */ 52 */
52 /*Set up the pull regiter for MMC */ 53 /*Set up the pull regiter for MMC */
53 VDD3P3V_PWDN = 0x0; 54 davinci_writel(0, DAVINCI_SYSTEM_MODULE_BASE + VDD3P3V_PWDN);
54 PINMUX1 &= (~(1 << 9)); 55 davinci_mux_peripheral(DAVINCI_MUX_MSTK, 0);
55 break; 56 break;
56 case DAVINCI_LPSC_I2C: 57 case DAVINCI_LPSC_I2C:
57 PINMUX1 |= (1 << 7); 58 davinci_mux_peripheral(DAVINCI_MUX_I2C, 1);
58 break; 59 break;
59 case DAVINCI_LPSC_McBSP: 60 case DAVINCI_LPSC_McBSP:
60 PINMUX1 |= (1 << 10); 61 davinci_mux_peripheral(DAVINCI_MUX_ASP, 1);
61 break; 62 break;
62 default: 63 default:
63 break; 64 break;
@@ -67,33 +68,59 @@ static void davinci_psc_mux(unsigned int id)
67/* Enable or disable a PSC domain */ 68/* Enable or disable a PSC domain */
68void davinci_psc_config(unsigned int domain, unsigned int id, char enable) 69void davinci_psc_config(unsigned int domain, unsigned int id, char enable)
69{ 70{
70 volatile unsigned int *mdstat = (unsigned int *)((int)MDSTAT + 4 * id); 71 u32 epcpr, ptcmd, ptstat, pdstat, pdctl1, mdstat, mdctl, mdstat_mask;
71 volatile unsigned int *mdctl = (unsigned int *)((int)MDCTL + 4 * id);
72 72
73 if (id < 0) 73 if (id < 0)
74 return; 74 return;
75 75
76 mdctl = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE + MDCTL + 4 * id);
76 if (enable) 77 if (enable)
77 *mdctl |= 0x00000003; /* Enable Module */ 78 mdctl |= 0x00000003; /* Enable Module */
78 else 79 else
79 *mdctl &= 0xFFFFFFF2; /* Disable Module */ 80 mdctl &= 0xFFFFFFF2; /* Disable Module */
81 davinci_writel(mdctl, DAVINCI_PWR_SLEEP_CNTRL_BASE + MDCTL + 4 * id);
82
83 pdstat = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE + PDSTAT);
84 if ((pdstat & 0x00000001) == 0) {
85 pdctl1 = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE + PDCTL1);
86 pdctl1 |= 0x1;
87 davinci_writel(pdctl1, DAVINCI_PWR_SLEEP_CNTRL_BASE + PDCTL1);
88
89 ptcmd = 1 << domain;
90 davinci_writel(ptcmd, DAVINCI_PWR_SLEEP_CNTRL_BASE + PTCMD);
80 91
81 if ((PDSTAT & 0x00000001) == 0) { 92 do {
82 PDCTL1 |= 0x1; 93 epcpr = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE +
83 PTCMD = (1 << domain); 94 EPCPR);
84 while ((((EPCPR >> domain) & 1) == 0)); 95 } while ((((epcpr >> domain) & 1) == 0));
85 96
86 PDCTL1 |= 0x100; 97 pdctl1 = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE + PDCTL1);
87 while (!(((PTSTAT >> domain) & 1) == 0)); 98 pdctl1 |= 0x100;
99 davinci_writel(pdctl1, DAVINCI_PWR_SLEEP_CNTRL_BASE + PDCTL1);
100
101 do {
102 ptstat = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE +
103 PTSTAT);
104 } while (!(((ptstat >> domain) & 1) == 0));
88 } else { 105 } else {
89 PTCMD = (1 << domain); 106 ptcmd = 1 << domain;
90 while (!(((PTSTAT >> domain) & 1) == 0)); 107 davinci_writel(ptcmd, DAVINCI_PWR_SLEEP_CNTRL_BASE + PTCMD);
108
109 do {
110 ptstat = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE +
111 PTSTAT);
112 } while (!(((ptstat >> domain) & 1) == 0));
91 } 113 }
92 114
93 if (enable) 115 if (enable)
94 while (!((*mdstat & 0x0000001F) == 0x3)); 116 mdstat_mask = 0x3;
95 else 117 else
96 while (!((*mdstat & 0x0000001F) == 0x2)); 118 mdstat_mask = 0x2;
119
120 do {
121 mdstat = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE +
122 MDSTAT + 4 * id);
123 } while (!((mdstat & 0x0000001F) == mdstat_mask));
97 124
98 if (enable) 125 if (enable)
99 davinci_psc_mux(id); 126 davinci_psc_mux(id);
diff --git a/arch/arm/mach-imx/generic.c b/arch/arm/mach-imx/generic.c
index 1c474cf709..a58b678006 100644
--- a/arch/arm/mach-imx/generic.c
+++ b/arch/arm/mach-imx/generic.c
@@ -28,12 +28,16 @@
28#include <linux/module.h> 28#include <linux/module.h>
29#include <linux/string.h> 29#include <linux/string.h>
30 30
31#include <asm/errno.h>
31#include <asm/arch/imxfb.h> 32#include <asm/arch/imxfb.h>
32#include <asm/hardware.h> 33#include <asm/hardware.h>
33#include <asm/arch/imx-regs.h> 34#include <asm/arch/imx-regs.h>
34 35
35#include <asm/mach/map.h> 36#include <asm/mach/map.h>
36#include <asm/arch/mmc.h> 37#include <asm/arch/mmc.h>
38#include <asm/arch/gpio.h>
39
40unsigned long imx_gpio_alloc_map[(GPIO_PORT_MAX + 1) * 32 / BITS_PER_LONG];
37 41
38void imx_gpio_mode(int gpio_mode) 42void imx_gpio_mode(int gpio_mode)
39{ 43{
@@ -95,6 +99,120 @@ void imx_gpio_mode(int gpio_mode)
95 99
96EXPORT_SYMBOL(imx_gpio_mode); 100EXPORT_SYMBOL(imx_gpio_mode);
97 101
102int imx_gpio_request(unsigned gpio, const char *label)
103{
104 if(gpio >= (GPIO_PORT_MAX + 1) * 32)
105 printk(KERN_ERR "imx_gpio: Attempt to request nonexistent GPIO %d for \"%s\"\n",
106 gpio, label ? label : "?");
107 return -EINVAL;
108
109 if(test_and_set_bit(gpio, imx_gpio_alloc_map)) {
110 printk(KERN_ERR "imx_gpio: GPIO %d already used. Allocation for \"%s\" failed\n",
111 gpio, label ? label : "?");
112 return -EBUSY;
113 }
114
115 return 0;
116}
117
118EXPORT_SYMBOL(imx_gpio_request);
119
120void imx_gpio_free(unsigned gpio)
121{
122 if(gpio >= (GPIO_PORT_MAX + 1) * 32)
123 return;
124
125 clear_bit(gpio, imx_gpio_alloc_map);
126}
127
128EXPORT_SYMBOL(imx_gpio_free);
129
130int imx_gpio_direction_input(unsigned gpio)
131{
132 imx_gpio_mode(gpio| GPIO_IN);
133 return 0;
134}
135
136EXPORT_SYMBOL(imx_gpio_direction_input);
137
138int imx_gpio_direction_output(unsigned gpio, int value)
139{
140 imx_gpio_set_value(gpio, value);
141 imx_gpio_mode(gpio| GPIO_OUT);
142 return 0;
143}
144
145EXPORT_SYMBOL(imx_gpio_direction_output);
146
147int imx_gpio_setup_multiple_pins(const int *pin_list, unsigned count,
148 int alloc_mode, const char *label)
149{
150 const int *p = pin_list;
151 int i;
152 unsigned gpio;
153 unsigned mode;
154
155 for (i = 0; i < count; i++) {
156 gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK);
157 mode = *p & ~(GPIO_PIN_MASK | GPIO_PORT_MASK);
158
159 if (gpio >= (GPIO_PORT_MAX + 1) * 32)
160 goto setup_error;
161
162 if (alloc_mode & IMX_GPIO_ALLOC_MODE_RELEASE)
163 imx_gpio_free(gpio);
164 else if (!(alloc_mode & IMX_GPIO_ALLOC_MODE_NO_ALLOC))
165 if (imx_gpio_request(gpio, label))
166 if (!(alloc_mode & IMX_GPIO_ALLOC_MODE_TRY_ALLOC))
167 goto setup_error;
168
169 if (!(alloc_mode & (IMX_GPIO_ALLOC_MODE_ALLOC_ONLY |
170 IMX_GPIO_ALLOC_MODE_RELEASE)))
171 imx_gpio_mode(gpio | mode);
172
173 p++;
174 }
175 return 0;
176
177setup_error:
178 if(alloc_mode & (IMX_GPIO_ALLOC_MODE_NO_ALLOC |
179 IMX_GPIO_ALLOC_MODE_TRY_ALLOC))
180 return -EINVAL;
181
182 while (p != pin_list) {
183 p--;
184 gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK);
185 imx_gpio_free(gpio);
186 }
187
188 return -EINVAL;
189}
190
191EXPORT_SYMBOL(imx_gpio_setup_multiple_pins);
192
193void __imx_gpio_set_value(unsigned gpio, int value)
194{
195 imx_gpio_set_value_inline(gpio, value);
196}
197
198EXPORT_SYMBOL(__imx_gpio_set_value);
199
200int imx_gpio_to_irq(unsigned gpio)
201{
202 return IRQ_GPIOA(0) + gpio;
203}
204
205EXPORT_SYMBOL(imx_gpio_to_irq);
206
207int imx_irq_to_gpio(unsigned irq)
208{
209 if (irq < IRQ_GPIOA(0))
210 return -EINVAL;
211 return irq - IRQ_GPIOA(0);
212}
213
214EXPORT_SYMBOL(imx_irq_to_gpio);
215
98/* 216/*
99 * get the system pll clock in Hz 217 * get the system pll clock in Hz
100 * 218 *
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c
index 6960a9d042..010f6fa984 100644
--- a/arch/arm/mach-imx/time.c
+++ b/arch/arm/mach-imx/time.c
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (C) 2000-2001 Deep Blue Solutions 4 * Copyright (C) 2000-2001 Deep Blue Solutions
5 * Copyright (C) 2002 Shane Nay (shane@minirl.com) 5 * Copyright (C) 2002 Shane Nay (shane@minirl.com)
6 * Copyright (C) 2006-2007 Pavel Pisa (ppisa@pikron.com)
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
@@ -15,6 +16,7 @@
15#include <linux/irq.h> 16#include <linux/irq.h>
16#include <linux/time.h> 17#include <linux/time.h>
17#include <linux/clocksource.h> 18#include <linux/clocksource.h>
19#include <linux/clockchips.h>
18 20
19#include <asm/hardware.h> 21#include <asm/hardware.h>
20#include <asm/io.h> 22#include <asm/io.h>
@@ -25,7 +27,8 @@
25/* Use timer 1 as system timer */ 27/* Use timer 1 as system timer */
26#define TIMER_BASE IMX_TIM1_BASE 28#define TIMER_BASE IMX_TIM1_BASE
27 29
28static unsigned long evt_diff; 30static struct clock_event_device clockevent_imx;
31static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED;
29 32
30/* 33/*
31 * IRQ handler for the timer 34 * IRQ handler for the timer
@@ -33,25 +36,20 @@ static unsigned long evt_diff;
33static irqreturn_t 36static irqreturn_t
34imx_timer_interrupt(int irq, void *dev_id) 37imx_timer_interrupt(int irq, void *dev_id)
35{ 38{
39 struct clock_event_device *evt = &clockevent_imx;
36 uint32_t tstat; 40 uint32_t tstat;
41 irqreturn_t ret = IRQ_NONE;
37 42
38 /* clear the interrupt */ 43 /* clear the interrupt */
39 tstat = IMX_TSTAT(TIMER_BASE); 44 tstat = IMX_TSTAT(TIMER_BASE);
40 IMX_TSTAT(TIMER_BASE) = 0; 45 IMX_TSTAT(TIMER_BASE) = 0;
41 46
42 if (tstat & TSTAT_COMP) { 47 if (tstat & TSTAT_COMP) {
43 do { 48 evt->event_handler(evt);
44 49 ret = IRQ_HANDLED;
45 write_seqlock(&xtime_lock);
46 timer_tick();
47 write_sequnlock(&xtime_lock);
48 IMX_TCMP(TIMER_BASE) += evt_diff;
49
50 } while (unlikely((int32_t)(IMX_TCMP(TIMER_BASE)
51 - IMX_TCN(TIMER_BASE)) < 0));
52 } 50 }
53 51
54 return IRQ_HANDLED; 52 return ret;
55} 53}
56 54
57static struct irqaction imx_timer_irq = { 55static struct irqaction imx_timer_irq = {
@@ -70,10 +68,8 @@ static void __init imx_timer_hardware_init(void)
70 */ 68 */
71 IMX_TCTL(TIMER_BASE) = 0; 69 IMX_TCTL(TIMER_BASE) = 0;
72 IMX_TPRER(TIMER_BASE) = 0; 70 IMX_TPRER(TIMER_BASE) = 0;
73 IMX_TCMP(TIMER_BASE) = LATCH - 1;
74 71
75 IMX_TCTL(TIMER_BASE) = TCTL_FRR | TCTL_CLK_PCLK1 | TCTL_IRQEN | TCTL_TEN; 72 IMX_TCTL(TIMER_BASE) = TCTL_FRR | TCTL_CLK_PCLK1 | TCTL_TEN;
76 evt_diff = LATCH;
77} 73}
78 74
79cycle_t imx_get_cycles(void) 75cycle_t imx_get_cycles(void)
@@ -99,11 +95,108 @@ static int __init imx_clocksource_init(void)
99 return 0; 95 return 0;
100} 96}
101 97
98static int imx_set_next_event(unsigned long evt,
99 struct clock_event_device *unused)
100{
101 unsigned long tcmp;
102
103 tcmp = IMX_TCN(TIMER_BASE) + evt;
104 IMX_TCMP(TIMER_BASE) = tcmp;
105
106 return (int32_t)(tcmp - IMX_TCN(TIMER_BASE)) < 0 ? -ETIME : 0;
107}
108
109#ifdef DEBUG
110static const char *clock_event_mode_label[]={
111 [CLOCK_EVT_MODE_PERIODIC] = "CLOCK_EVT_MODE_PERIODIC",
112 [CLOCK_EVT_MODE_ONESHOT] = "CLOCK_EVT_MODE_ONESHOT",
113 [CLOCK_EVT_MODE_SHUTDOWN] = "CLOCK_EVT_MODE_SHUTDOWN",
114 [CLOCK_EVT_MODE_UNUSED] = "CLOCK_EVT_MODE_UNUSED"
115};
116#endif /*DEBUG*/
117
118static void imx_set_mode(enum clock_event_mode mode, struct clock_event_device *evt)
119{
120 unsigned long flags;
121
122 /*
123 * The timer interrupt generation is disabled at least
124 * for enough time to call imx_set_next_event()
125 */
126 local_irq_save(flags);
127 /* Disable interrupt in GPT module */
128 IMX_TCTL(TIMER_BASE) &= ~TCTL_IRQEN;
129 if (mode != clockevent_mode) {
130 /* Set event time into far-far future */
131 IMX_TCMP(TIMER_BASE) = IMX_TCN(TIMER_BASE) - 3;
132 /* Clear pending interrupt */
133 IMX_TSTAT(TIMER_BASE) &= ~TSTAT_COMP;
134 }
135
136#ifdef DEBUG
137 printk(KERN_INFO "imx_set_mode: changing mode from %s to %s\n",
138 clock_event_mode_label[clockevent_mode], clock_event_mode_label[mode]);
139#endif /*DEBUG*/
140
141 /* Remember timer mode */
142 clockevent_mode = mode;
143 local_irq_restore(flags);
144
145 switch (mode) {
146 case CLOCK_EVT_MODE_PERIODIC:
147 printk(KERN_ERR "imx_set_mode: Periodic mode is not supported for i.MX\n");
148 break;
149 case CLOCK_EVT_MODE_ONESHOT:
150 /*
151 * Do not put overhead of interrupt enable/disable into
152 * imx_set_next_event(), the core has about 4 minutes
153 * to call imx_set_next_event() or shutdown clock after
154 * mode switching
155 */
156 local_irq_save(flags);
157 IMX_TCTL(TIMER_BASE) |= TCTL_IRQEN;
158 local_irq_restore(flags);
159 break;
160 case CLOCK_EVT_MODE_SHUTDOWN:
161 case CLOCK_EVT_MODE_UNUSED:
162 /* Left event sources disabled, no more interrupts appears */
163 break;
164 }
165}
166
167static struct clock_event_device clockevent_imx = {
168 .name = "imx_timer1",
169 .features = CLOCK_EVT_FEAT_ONESHOT,
170 .shift = 32,
171 .set_mode = imx_set_mode,
172 .set_next_event = imx_set_next_event,
173 .rating = 200,
174};
175
176static int __init imx_clockevent_init(void)
177{
178 clockevent_imx.mult = div_sc(imx_get_perclk1(), NSEC_PER_SEC,
179 clockevent_imx.shift);
180 clockevent_imx.max_delta_ns =
181 clockevent_delta2ns(0xfffffffe, &clockevent_imx);
182 clockevent_imx.min_delta_ns =
183 clockevent_delta2ns(0xf, &clockevent_imx);
184
185 clockevent_imx.cpumask = cpumask_of_cpu(0);
186
187 clockevents_register_device(&clockevent_imx);
188
189 return 0;
190}
191
192
102static void __init imx_timer_init(void) 193static void __init imx_timer_init(void)
103{ 194{
104 imx_timer_hardware_init(); 195 imx_timer_hardware_init();
105 imx_clocksource_init(); 196 imx_clocksource_init();
106 197
198 imx_clockevent_init();
199
107 /* 200 /*
108 * Make irqs happen for the system timer 201 * Make irqs happen for the system timer
109 */ 202 */
diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c
index bc4871553f..bfe0c87e33 100644
--- a/arch/arm/mach-iop13xx/setup.c
+++ b/arch/arm/mach-iop13xx/setup.c
@@ -25,6 +25,7 @@
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#include <asm/io.h>
28#include <asm/hardware/iop_adma.h>
28 29
29#define IOP13XX_UART_XTAL 33334000 30#define IOP13XX_UART_XTAL 33334000
30#define IOP13XX_SETUP_DEBUG 0 31#define IOP13XX_SETUP_DEBUG 0
@@ -236,19 +237,143 @@ static unsigned long iq8134x_probe_flash_size(void)
236} 237}
237#endif 238#endif
238 239
240/* ADMA Channels */
241static struct resource iop13xx_adma_0_resources[] = {
242 [0] = {
243 .start = IOP13XX_ADMA_PHYS_BASE(0),
244 .end = IOP13XX_ADMA_UPPER_PA(0),
245 .flags = IORESOURCE_MEM,
246 },
247 [1] = {
248 .start = IRQ_IOP13XX_ADMA0_EOT,
249 .end = IRQ_IOP13XX_ADMA0_EOT,
250 .flags = IORESOURCE_IRQ
251 },
252 [2] = {
253 .start = IRQ_IOP13XX_ADMA0_EOC,
254 .end = IRQ_IOP13XX_ADMA0_EOC,
255 .flags = IORESOURCE_IRQ
256 },
257 [3] = {
258 .start = IRQ_IOP13XX_ADMA0_ERR,
259 .end = IRQ_IOP13XX_ADMA0_ERR,
260 .flags = IORESOURCE_IRQ
261 }
262};
263
264static struct resource iop13xx_adma_1_resources[] = {
265 [0] = {
266 .start = IOP13XX_ADMA_PHYS_BASE(1),
267 .end = IOP13XX_ADMA_UPPER_PA(1),
268 .flags = IORESOURCE_MEM,
269 },
270 [1] = {
271 .start = IRQ_IOP13XX_ADMA1_EOT,
272 .end = IRQ_IOP13XX_ADMA1_EOT,
273 .flags = IORESOURCE_IRQ
274 },
275 [2] = {
276 .start = IRQ_IOP13XX_ADMA1_EOC,
277 .end = IRQ_IOP13XX_ADMA1_EOC,
278 .flags = IORESOURCE_IRQ
279 },
280 [3] = {
281 .start = IRQ_IOP13XX_ADMA1_ERR,
282 .end = IRQ_IOP13XX_ADMA1_ERR,
283 .flags = IORESOURCE_IRQ
284 }
285};
286
287static struct resource iop13xx_adma_2_resources[] = {
288 [0] = {
289 .start = IOP13XX_ADMA_PHYS_BASE(2),
290 .end = IOP13XX_ADMA_UPPER_PA(2),
291 .flags = IORESOURCE_MEM,
292 },
293 [1] = {
294 .start = IRQ_IOP13XX_ADMA2_EOT,
295 .end = IRQ_IOP13XX_ADMA2_EOT,
296 .flags = IORESOURCE_IRQ
297 },
298 [2] = {
299 .start = IRQ_IOP13XX_ADMA2_EOC,
300 .end = IRQ_IOP13XX_ADMA2_EOC,
301 .flags = IORESOURCE_IRQ
302 },
303 [3] = {
304 .start = IRQ_IOP13XX_ADMA2_ERR,
305 .end = IRQ_IOP13XX_ADMA2_ERR,
306 .flags = IORESOURCE_IRQ
307 }
308};
309
310static u64 iop13xx_adma_dmamask = DMA_64BIT_MASK;
311static struct iop_adma_platform_data iop13xx_adma_0_data = {
312 .hw_id = 0,
313 .pool_size = PAGE_SIZE,
314};
315
316static struct iop_adma_platform_data iop13xx_adma_1_data = {
317 .hw_id = 1,
318 .pool_size = PAGE_SIZE,
319};
320
321static struct iop_adma_platform_data iop13xx_adma_2_data = {
322 .hw_id = 2,
323 .pool_size = PAGE_SIZE,
324};
325
326/* The ids are fixed up later in iop13xx_platform_init */
327static struct platform_device iop13xx_adma_0_channel = {
328 .name = "iop-adma",
329 .id = 0,
330 .num_resources = 4,
331 .resource = iop13xx_adma_0_resources,
332 .dev = {
333 .dma_mask = &iop13xx_adma_dmamask,
334 .coherent_dma_mask = DMA_64BIT_MASK,
335 .platform_data = (void *) &iop13xx_adma_0_data,
336 },
337};
338
339static struct platform_device iop13xx_adma_1_channel = {
340 .name = "iop-adma",
341 .id = 0,
342 .num_resources = 4,
343 .resource = iop13xx_adma_1_resources,
344 .dev = {
345 .dma_mask = &iop13xx_adma_dmamask,
346 .coherent_dma_mask = DMA_64BIT_MASK,
347 .platform_data = (void *) &iop13xx_adma_1_data,
348 },
349};
350
351static struct platform_device iop13xx_adma_2_channel = {
352 .name = "iop-adma",
353 .id = 0,
354 .num_resources = 4,
355 .resource = iop13xx_adma_2_resources,
356 .dev = {
357 .dma_mask = &iop13xx_adma_dmamask,
358 .coherent_dma_mask = DMA_64BIT_MASK,
359 .platform_data = (void *) &iop13xx_adma_2_data,
360 },
361};
362
239void __init iop13xx_map_io(void) 363void __init iop13xx_map_io(void)
240{ 364{
241 /* Initialize the Static Page Table maps */ 365 /* Initialize the Static Page Table maps */
242 iotable_init(iop13xx_std_desc, ARRAY_SIZE(iop13xx_std_desc)); 366 iotable_init(iop13xx_std_desc, ARRAY_SIZE(iop13xx_std_desc));
243} 367}
244 368
245static int init_uart = 0; 369static int init_uart;
246static int init_i2c = 0; 370static int init_i2c;
371static int init_adma;
247 372
248void __init iop13xx_platform_init(void) 373void __init iop13xx_platform_init(void)
249{ 374{
250 int i; 375 int i;
251 u32 uart_idx, i2c_idx, plat_idx; 376 u32 uart_idx, i2c_idx, adma_idx, plat_idx;
252 struct platform_device *iop13xx_devices[IQ81340_MAX_PLAT_DEVICES]; 377 struct platform_device *iop13xx_devices[IQ81340_MAX_PLAT_DEVICES];
253 378
254 /* set the bases so we can read the device id */ 379 /* set the bases so we can read the device id */
@@ -294,6 +419,12 @@ void __init iop13xx_platform_init(void)
294 } 419 }
295 } 420 }
296 421
422 if (init_adma == IOP13XX_INIT_ADMA_DEFAULT) {
423 init_adma |= IOP13XX_INIT_ADMA_0;
424 init_adma |= IOP13XX_INIT_ADMA_1;
425 init_adma |= IOP13XX_INIT_ADMA_2;
426 }
427
297 plat_idx = 0; 428 plat_idx = 0;
298 uart_idx = 0; 429 uart_idx = 0;
299 i2c_idx = 0; 430 i2c_idx = 0;
@@ -332,6 +463,56 @@ void __init iop13xx_platform_init(void)
332 } 463 }
333 } 464 }
334 465
466 /* initialize adma channel ids and capabilities */
467 adma_idx = 0;
468 for (i = 0; i < IQ81340_NUM_ADMA; i++) {
469 struct iop_adma_platform_data *plat_data;
470 if ((init_adma & (1 << i)) && IOP13XX_SETUP_DEBUG)
471 printk(KERN_INFO
472 "Adding adma%d to platform device list\n", i);
473 switch (init_adma & (1 << i)) {
474 case IOP13XX_INIT_ADMA_0:
475 iop13xx_adma_0_channel.id = adma_idx++;
476 iop13xx_devices[plat_idx++] = &iop13xx_adma_0_channel;
477 plat_data = &iop13xx_adma_0_data;
478 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
479 dma_cap_set(DMA_XOR, plat_data->cap_mask);
480 dma_cap_set(DMA_DUAL_XOR, plat_data->cap_mask);
481 dma_cap_set(DMA_ZERO_SUM, plat_data->cap_mask);
482 dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
483 dma_cap_set(DMA_MEMCPY_CRC32C, plat_data->cap_mask);
484 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
485 break;
486 case IOP13XX_INIT_ADMA_1:
487 iop13xx_adma_1_channel.id = adma_idx++;
488 iop13xx_devices[plat_idx++] = &iop13xx_adma_1_channel;
489 plat_data = &iop13xx_adma_1_data;
490 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
491 dma_cap_set(DMA_XOR, plat_data->cap_mask);
492 dma_cap_set(DMA_DUAL_XOR, plat_data->cap_mask);
493 dma_cap_set(DMA_ZERO_SUM, plat_data->cap_mask);
494 dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
495 dma_cap_set(DMA_MEMCPY_CRC32C, plat_data->cap_mask);
496 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
497 break;
498 case IOP13XX_INIT_ADMA_2:
499 iop13xx_adma_2_channel.id = adma_idx++;
500 iop13xx_devices[plat_idx++] = &iop13xx_adma_2_channel;
501 plat_data = &iop13xx_adma_2_data;
502 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
503 dma_cap_set(DMA_XOR, plat_data->cap_mask);
504 dma_cap_set(DMA_DUAL_XOR, plat_data->cap_mask);
505 dma_cap_set(DMA_ZERO_SUM, plat_data->cap_mask);
506 dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
507 dma_cap_set(DMA_MEMCPY_CRC32C, plat_data->cap_mask);
508 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
509 dma_cap_set(DMA_PQ_XOR, plat_data->cap_mask);
510 dma_cap_set(DMA_PQ_UPDATE, plat_data->cap_mask);
511 dma_cap_set(DMA_PQ_ZERO_SUM, plat_data->cap_mask);
512 break;
513 }
514 }
515
335#ifdef CONFIG_MTD_PHYSMAP 516#ifdef CONFIG_MTD_PHYSMAP
336 iq8134x_flash_resource.end = iq8134x_flash_resource.start + 517 iq8134x_flash_resource.end = iq8134x_flash_resource.start +
337 iq8134x_probe_flash_size() - 1; 518 iq8134x_probe_flash_size() - 1;
@@ -399,5 +580,35 @@ static int __init iop13xx_init_i2c_setup(char *str)
399 return 1; 580 return 1;
400} 581}
401 582
583static int __init iop13xx_init_adma_setup(char *str)
584{
585 if (str) {
586 while (*str != '\0') {
587 switch (*str) {
588 case '0':
589 init_adma |= IOP13XX_INIT_ADMA_0;
590 break;
591 case '1':
592 init_adma |= IOP13XX_INIT_ADMA_1;
593 break;
594 case '2':
595 init_adma |= IOP13XX_INIT_ADMA_2;
596 break;
597 case ',':
598 case '=':
599 break;
600 default:
601 PRINTK("\"iop13xx_init_adma\" malformed"
602 " at character: \'%c\'", *str);
603 *(str + 1) = '\0';
604 init_adma = IOP13XX_INIT_ADMA_DEFAULT;
605 }
606 str++;
607 }
608 }
609 return 1;
610}
611
612__setup("iop13xx_init_adma", iop13xx_init_adma_setup);
402__setup("iop13xx_init_uart", iop13xx_init_uart_setup); 613__setup("iop13xx_init_uart", iop13xx_init_uart_setup);
403__setup("iop13xx_init_i2c", iop13xx_init_i2c_setup); 614__setup("iop13xx_init_i2c", iop13xx_init_i2c_setup);
diff --git a/arch/arm/mach-iop13xx/tpmi.c b/arch/arm/mach-iop13xx/tpmi.c
index d3dc278213..2476347ea6 100644
--- a/arch/arm/mach-iop13xx/tpmi.c
+++ b/arch/arm/mach-iop13xx/tpmi.c
@@ -29,13 +29,15 @@
29#define IOP13XX_TPMI_MMR(dev) IOP13XX_REG_ADDR32_PHYS(0x48000 + (dev << 12)) 29#define IOP13XX_TPMI_MMR(dev) IOP13XX_REG_ADDR32_PHYS(0x48000 + (dev << 12))
30#define IOP13XX_TPMI_MEM(dev) IOP13XX_REG_ADDR32_PHYS(0x60000 + (dev << 13)) 30#define IOP13XX_TPMI_MEM(dev) IOP13XX_REG_ADDR32_PHYS(0x60000 + (dev << 13))
31#define IOP13XX_TPMI_CTRL(dev) IOP13XX_REG_ADDR32_PHYS(0x50000 + (dev << 10)) 31#define IOP13XX_TPMI_CTRL(dev) IOP13XX_REG_ADDR32_PHYS(0x50000 + (dev << 10))
32#define IOP13XX_TPMI_IOP_CTRL(dev) (IOP13XX_TPMI_CTRL(dev) + 0x2000)
32#define IOP13XX_TPMI_MMR_SIZE (SZ_4K - 1) 33#define IOP13XX_TPMI_MMR_SIZE (SZ_4K - 1)
33#define IOP13XX_TPMI_MEM_SIZE (255) 34#define IOP13XX_TPMI_MEM_SIZE (255)
34#define IOP13XX_TPMI_MEM_CTRL (SZ_1K - 1) 35#define IOP13XX_TPMI_MEM_CTRL (SZ_1K - 1)
35#define IOP13XX_TPMI_RESOURCE_MMR 0 36#define IOP13XX_TPMI_RESOURCE_MMR 0
36#define IOP13XX_TPMI_RESOURCE_MEM 1 37#define IOP13XX_TPMI_RESOURCE_MEM 1
37#define IOP13XX_TPMI_RESOURCE_CTRL 2 38#define IOP13XX_TPMI_RESOURCE_CTRL 2
38#define IOP13XX_TPMI_RESOURCE_IRQ 3 39#define IOP13XX_TPMI_RESOURCE_IOP_CTRL 3
40#define IOP13XX_TPMI_RESOURCE_IRQ 4
39 41
40static struct resource iop13xx_tpmi_0_resources[] = { 42static struct resource iop13xx_tpmi_0_resources[] = {
41 [IOP13XX_TPMI_RESOURCE_MMR] = { 43 [IOP13XX_TPMI_RESOURCE_MMR] = {
@@ -53,6 +55,11 @@ static struct resource iop13xx_tpmi_0_resources[] = {
53 .end = IOP13XX_TPMI_CTRL(0) + IOP13XX_TPMI_MEM_CTRL, 55 .end = IOP13XX_TPMI_CTRL(0) + IOP13XX_TPMI_MEM_CTRL,
54 .flags = IORESOURCE_MEM, 56 .flags = IORESOURCE_MEM,
55 }, 57 },
58 [IOP13XX_TPMI_RESOURCE_IOP_CTRL] = {
59 .start = IOP13XX_TPMI_IOP_CTRL(0),
60 .end = IOP13XX_TPMI_IOP_CTRL(0) + IOP13XX_TPMI_MEM_CTRL,
61 .flags = IORESOURCE_MEM,
62 },
56 [IOP13XX_TPMI_RESOURCE_IRQ] = { 63 [IOP13XX_TPMI_RESOURCE_IRQ] = {
57 .start = IRQ_IOP13XX_TPMI0_OUT, 64 .start = IRQ_IOP13XX_TPMI0_OUT,
58 .end = IRQ_IOP13XX_TPMI0_OUT, 65 .end = IRQ_IOP13XX_TPMI0_OUT,
@@ -76,6 +83,11 @@ static struct resource iop13xx_tpmi_1_resources[] = {
76 .end = IOP13XX_TPMI_CTRL(1) + IOP13XX_TPMI_MEM_CTRL, 83 .end = IOP13XX_TPMI_CTRL(1) + IOP13XX_TPMI_MEM_CTRL,
77 .flags = IORESOURCE_MEM, 84 .flags = IORESOURCE_MEM,
78 }, 85 },
86 [IOP13XX_TPMI_RESOURCE_IOP_CTRL] = {
87 .start = IOP13XX_TPMI_IOP_CTRL(1),
88 .end = IOP13XX_TPMI_IOP_CTRL(1) + IOP13XX_TPMI_MEM_CTRL,
89 .flags = IORESOURCE_MEM,
90 },
79 [IOP13XX_TPMI_RESOURCE_IRQ] = { 91 [IOP13XX_TPMI_RESOURCE_IRQ] = {
80 .start = IRQ_IOP13XX_TPMI1_OUT, 92 .start = IRQ_IOP13XX_TPMI1_OUT,
81 .end = IRQ_IOP13XX_TPMI1_OUT, 93 .end = IRQ_IOP13XX_TPMI1_OUT,
@@ -99,6 +111,11 @@ static struct resource iop13xx_tpmi_2_resources[] = {
99 .end = IOP13XX_TPMI_CTRL(2) + IOP13XX_TPMI_MEM_CTRL, 111 .end = IOP13XX_TPMI_CTRL(2) + IOP13XX_TPMI_MEM_CTRL,
100 .flags = IORESOURCE_MEM, 112 .flags = IORESOURCE_MEM,
101 }, 113 },
114 [IOP13XX_TPMI_RESOURCE_IOP_CTRL] = {
115 .start = IOP13XX_TPMI_IOP_CTRL(2),
116 .end = IOP13XX_TPMI_IOP_CTRL(2) + IOP13XX_TPMI_MEM_CTRL,
117 .flags = IORESOURCE_MEM,
118 },
102 [IOP13XX_TPMI_RESOURCE_IRQ] = { 119 [IOP13XX_TPMI_RESOURCE_IRQ] = {
103 .start = IRQ_IOP13XX_TPMI2_OUT, 120 .start = IRQ_IOP13XX_TPMI2_OUT,
104 .end = IRQ_IOP13XX_TPMI2_OUT, 121 .end = IRQ_IOP13XX_TPMI2_OUT,
@@ -122,6 +139,11 @@ static struct resource iop13xx_tpmi_3_resources[] = {
122 .end = IOP13XX_TPMI_CTRL(3) + IOP13XX_TPMI_MEM_CTRL, 139 .end = IOP13XX_TPMI_CTRL(3) + IOP13XX_TPMI_MEM_CTRL,
123 .flags = IORESOURCE_MEM, 140 .flags = IORESOURCE_MEM,
124 }, 141 },
142 [IOP13XX_TPMI_RESOURCE_IOP_CTRL] = {
143 .start = IOP13XX_TPMI_IOP_CTRL(3),
144 .end = IOP13XX_TPMI_IOP_CTRL(3) + IOP13XX_TPMI_MEM_CTRL,
145 .flags = IORESOURCE_MEM,
146 },
125 [IOP13XX_TPMI_RESOURCE_IRQ] = { 147 [IOP13XX_TPMI_RESOURCE_IRQ] = {
126 .start = IRQ_IOP13XX_TPMI3_OUT, 148 .start = IRQ_IOP13XX_TPMI3_OUT,
127 .end = IRQ_IOP13XX_TPMI3_OUT, 149 .end = IRQ_IOP13XX_TPMI3_OUT,
@@ -133,7 +155,7 @@ u64 iop13xx_tpmi_mask = DMA_64BIT_MASK;
133static struct platform_device iop13xx_tpmi_0_device = { 155static struct platform_device iop13xx_tpmi_0_device = {
134 .name = "iop-tpmi", 156 .name = "iop-tpmi",
135 .id = 0, 157 .id = 0,
136 .num_resources = 4, 158 .num_resources = ARRAY_SIZE(iop13xx_tpmi_0_resources),
137 .resource = iop13xx_tpmi_0_resources, 159 .resource = iop13xx_tpmi_0_resources,
138 .dev = { 160 .dev = {
139 .dma_mask = &iop13xx_tpmi_mask, 161 .dma_mask = &iop13xx_tpmi_mask,
@@ -144,7 +166,7 @@ static struct platform_device iop13xx_tpmi_0_device = {
144static struct platform_device iop13xx_tpmi_1_device = { 166static struct platform_device iop13xx_tpmi_1_device = {
145 .name = "iop-tpmi", 167 .name = "iop-tpmi",
146 .id = 1, 168 .id = 1,
147 .num_resources = 4, 169 .num_resources = ARRAY_SIZE(iop13xx_tpmi_1_resources),
148 .resource = iop13xx_tpmi_1_resources, 170 .resource = iop13xx_tpmi_1_resources,
149 .dev = { 171 .dev = {
150 .dma_mask = &iop13xx_tpmi_mask, 172 .dma_mask = &iop13xx_tpmi_mask,
@@ -155,7 +177,7 @@ static struct platform_device iop13xx_tpmi_1_device = {
155static struct platform_device iop13xx_tpmi_2_device = { 177static struct platform_device iop13xx_tpmi_2_device = {
156 .name = "iop-tpmi", 178 .name = "iop-tpmi",
157 .id = 2, 179 .id = 2,
158 .num_resources = 4, 180 .num_resources = ARRAY_SIZE(iop13xx_tpmi_2_resources),
159 .resource = iop13xx_tpmi_2_resources, 181 .resource = iop13xx_tpmi_2_resources,
160 .dev = { 182 .dev = {
161 .dma_mask = &iop13xx_tpmi_mask, 183 .dma_mask = &iop13xx_tpmi_mask,
@@ -166,7 +188,7 @@ static struct platform_device iop13xx_tpmi_2_device = {
166static struct platform_device iop13xx_tpmi_3_device = { 188static struct platform_device iop13xx_tpmi_3_device = {
167 .name = "iop-tpmi", 189 .name = "iop-tpmi",
168 .id = 3, 190 .id = 3,
169 .num_resources = 4, 191 .num_resources = ARRAY_SIZE(iop13xx_tpmi_3_resources),
170 .resource = iop13xx_tpmi_3_resources, 192 .resource = iop13xx_tpmi_3_resources,
171 .dev = { 193 .dev = {
172 .dma_mask = &iop13xx_tpmi_mask, 194 .dma_mask = &iop13xx_tpmi_mask,
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c
index 5776fd8841..2b086ab266 100644
--- a/arch/arm/mach-iop32x/glantank.c
+++ b/arch/arm/mach-iop32x/glantank.c
@@ -180,6 +180,8 @@ static void __init glantank_init_machine(void)
180 platform_device_register(&iop3xx_i2c1_device); 180 platform_device_register(&iop3xx_i2c1_device);
181 platform_device_register(&glantank_flash_device); 181 platform_device_register(&glantank_flash_device);
182 platform_device_register(&glantank_serial_device); 182 platform_device_register(&glantank_serial_device);
183 platform_device_register(&iop3xx_dma_0_channel);
184 platform_device_register(&iop3xx_dma_1_channel);
183 185
184 pm_power_off = glantank_power_off; 186 pm_power_off = glantank_power_off;
185} 187}
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c
index d4eefbea1f..98cfa1cd6b 100644
--- a/arch/arm/mach-iop32x/iq31244.c
+++ b/arch/arm/mach-iop32x/iq31244.c
@@ -298,9 +298,14 @@ static void __init iq31244_init_machine(void)
298 platform_device_register(&iop3xx_i2c1_device); 298 platform_device_register(&iop3xx_i2c1_device);
299 platform_device_register(&iq31244_flash_device); 299 platform_device_register(&iq31244_flash_device);
300 platform_device_register(&iq31244_serial_device); 300 platform_device_register(&iq31244_serial_device);
301 platform_device_register(&iop3xx_dma_0_channel);
302 platform_device_register(&iop3xx_dma_1_channel);
301 303
302 if (is_ep80219()) 304 if (is_ep80219())
303 pm_power_off = ep80219_power_off; 305 pm_power_off = ep80219_power_off;
306
307 if (!is_80219())
308 platform_device_register(&iop3xx_aau_channel);
304} 309}
305 310
306static int __init force_ep80219_setup(char *str) 311static int __init force_ep80219_setup(char *str)
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c
index 8d9f49164a..18ad29f213 100644
--- a/arch/arm/mach-iop32x/iq80321.c
+++ b/arch/arm/mach-iop32x/iq80321.c
@@ -181,6 +181,9 @@ static void __init iq80321_init_machine(void)
181 platform_device_register(&iop3xx_i2c1_device); 181 platform_device_register(&iop3xx_i2c1_device);
182 platform_device_register(&iq80321_flash_device); 182 platform_device_register(&iq80321_flash_device);
183 platform_device_register(&iq80321_serial_device); 183 platform_device_register(&iq80321_serial_device);
184 platform_device_register(&iop3xx_dma_0_channel);
185 platform_device_register(&iop3xx_dma_1_channel);
186 platform_device_register(&iop3xx_aau_channel);
184} 187}
185 188
186MACHINE_START(IQ80321, "Intel IQ80321") 189MACHINE_START(IQ80321, "Intel IQ80321")
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
index d55005d647..1873bd8cd1 100644
--- a/arch/arm/mach-iop32x/n2100.c
+++ b/arch/arm/mach-iop32x/n2100.c
@@ -25,6 +25,7 @@
25#include <linux/serial_core.h> 25#include <linux/serial_core.h>
26#include <linux/serial_8250.h> 26#include <linux/serial_8250.h>
27#include <linux/mtd/physmap.h> 27#include <linux/mtd/physmap.h>
28#include <linux/i2c.h>
28#include <linux/platform_device.h> 29#include <linux/platform_device.h>
29#include <linux/reboot.h> 30#include <linux/reboot.h>
30#include <asm/hardware.h> 31#include <asm/hardware.h>
@@ -199,6 +200,12 @@ static struct platform_device n2100_serial_device = {
199 .resource = &n2100_uart_resource, 200 .resource = &n2100_uart_resource,
200}; 201};
201 202
203static struct i2c_board_info __initdata n2100_i2c_devices[] = {
204 {
205 I2C_BOARD_INFO("rtc-rs5c372", 0x32),
206 .type = "rs5c372b",
207 },
208};
202 209
203/* 210/*
204 * Pull PCA9532 GPIO #8 low to power off the machine. 211 * Pull PCA9532 GPIO #8 low to power off the machine.
@@ -245,6 +252,11 @@ static void __init n2100_init_machine(void)
245 platform_device_register(&iop3xx_i2c0_device); 252 platform_device_register(&iop3xx_i2c0_device);
246 platform_device_register(&n2100_flash_device); 253 platform_device_register(&n2100_flash_device);
247 platform_device_register(&n2100_serial_device); 254 platform_device_register(&n2100_serial_device);
255 platform_device_register(&iop3xx_dma_0_channel);
256 platform_device_register(&iop3xx_dma_1_channel);
257
258 i2c_register_board_info(0, n2100_i2c_devices,
259 ARRAY_SIZE(n2100_i2c_devices));
248 260
249 pm_power_off = n2100_power_off; 261 pm_power_off = n2100_power_off;
250 262
diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c
index 2b06318068..433188ebff 100644
--- a/arch/arm/mach-iop33x/iq80331.c
+++ b/arch/arm/mach-iop33x/iq80331.c
@@ -136,6 +136,9 @@ static void __init iq80331_init_machine(void)
136 platform_device_register(&iop33x_uart0_device); 136 platform_device_register(&iop33x_uart0_device);
137 platform_device_register(&iop33x_uart1_device); 137 platform_device_register(&iop33x_uart1_device);
138 platform_device_register(&iq80331_flash_device); 138 platform_device_register(&iq80331_flash_device);
139 platform_device_register(&iop3xx_dma_0_channel);
140 platform_device_register(&iop3xx_dma_1_channel);
141 platform_device_register(&iop3xx_aau_channel);
139} 142}
140 143
141MACHINE_START(IQ80331, "Intel IQ80331") 144MACHINE_START(IQ80331, "Intel IQ80331")
diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c
index 7889ce3cb0..416c09564c 100644
--- a/arch/arm/mach-iop33x/iq80332.c
+++ b/arch/arm/mach-iop33x/iq80332.c
@@ -136,6 +136,9 @@ static void __init iq80332_init_machine(void)
136 platform_device_register(&iop33x_uart0_device); 136 platform_device_register(&iop33x_uart0_device);
137 platform_device_register(&iop33x_uart1_device); 137 platform_device_register(&iop33x_uart1_device);
138 platform_device_register(&iq80332_flash_device); 138 platform_device_register(&iq80332_flash_device);
139 platform_device_register(&iop3xx_dma_0_channel);
140 platform_device_register(&iop3xx_dma_1_channel);
141 platform_device_register(&iop3xx_aau_channel);
139} 142}
140 143
141MACHINE_START(IQ80332, "Intel IQ80332") 144MACHINE_START(IQ80332, "Intel IQ80332")
diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig
index 060909870b..61b2dfcb89 100644
--- a/arch/arm/mach-ixp4xx/Kconfig
+++ b/arch/arm/mach-ixp4xx/Kconfig
@@ -41,6 +41,22 @@ config ARCH_ADI_COYOTE
41 Engineering Coyote Gateway Reference Platform. For more 41 Engineering Coyote Gateway Reference Platform. For more
42 information on this platform, see <file:Documentation/arm/IXP4xx>. 42 information on this platform, see <file:Documentation/arm/IXP4xx>.
43 43
44config MACH_GATEWAY7001
45 bool "Gateway 7001"
46 select PCI
47 help
48 Say 'Y' here if you want your kernel to support Gateway's
49 7001 Access Point. For more information on this platform,
50 see http://openwrt.org
51
52config MACH_WG302V2
53 bool "Netgear WG302 v2 / WAG302 v2"
54 select PCI
55 help
56 Say 'Y' here if you want your kernel to support Netgear's
57 WG302 v2 or WAG302 v2 Access Points. For more information
58 on this platform, see http://openwrt.org
59
44config ARCH_IXDP425 60config ARCH_IXDP425
45 bool "IXDP425" 61 bool "IXDP425"
46 help 62 help
diff --git a/arch/arm/mach-ixp4xx/Makefile b/arch/arm/mach-ixp4xx/Makefile
index 3b87c47e06..77e00ade55 100644
--- a/arch/arm/mach-ixp4xx/Makefile
+++ b/arch/arm/mach-ixp4xx/Makefile
@@ -13,6 +13,8 @@ obj-pci-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o
13obj-pci-$(CONFIG_MACH_NSLU2) += nslu2-pci.o 13obj-pci-$(CONFIG_MACH_NSLU2) += nslu2-pci.o
14obj-pci-$(CONFIG_MACH_NAS100D) += nas100d-pci.o 14obj-pci-$(CONFIG_MACH_NAS100D) += nas100d-pci.o
15obj-pci-$(CONFIG_MACH_DSMG600) += dsmg600-pci.o 15obj-pci-$(CONFIG_MACH_DSMG600) += dsmg600-pci.o
16obj-pci-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o
17obj-pci-$(CONFIG_MACH_WG302V2) += wg302v2-pci.o
16 18
17obj-y += common.o 19obj-y += common.o
18 20
@@ -24,5 +26,7 @@ obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-setup.o
24obj-$(CONFIG_MACH_NSLU2) += nslu2-setup.o nslu2-power.o 26obj-$(CONFIG_MACH_NSLU2) += nslu2-setup.o nslu2-power.o
25obj-$(CONFIG_MACH_NAS100D) += nas100d-setup.o nas100d-power.o 27obj-$(CONFIG_MACH_NAS100D) += nas100d-setup.o nas100d-power.o
26obj-$(CONFIG_MACH_DSMG600) += dsmg600-setup.o dsmg600-power.o 28obj-$(CONFIG_MACH_DSMG600) += dsmg600-setup.o dsmg600-power.o
29obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o
30obj-$(CONFIG_MACH_WG302V2) += wg302v2-setup.o
27 31
28obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o 32obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
diff --git a/arch/arm/mach-ixp4xx/gateway7001-pci.c b/arch/arm/mach-ixp4xx/gateway7001-pci.c
new file mode 100644
index 0000000000..6abf568322
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/gateway7001-pci.c
@@ -0,0 +1,63 @@
1/*
2 * arch/arch/mach-ixp4xx/gateway7001-pci.c
3 *
4 * PCI setup routines for Gateway 7001
5 *
6 * Copyright (C) 2007 Imre Kaloz <kaloz@openwrt.org>
7 *
8 * based on coyote-pci.c:
9 * Copyright (C) 2002 Jungo Software Technologies.
10 * Copyright (C) 2003 MontaVista Softwrae, Inc.
11 *
12 * Maintainer: Imre Kaloz <kaloz@openwrt.org>
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
25#include <asm/mach-types.h>
26#include <asm/hardware.h>
27
28#include <asm/mach/pci.h>
29
30void __init gateway7001_pci_preinit(void)
31{
32 set_irq_type(IRQ_IXP4XX_GPIO10, IRQT_LOW);
33 set_irq_type(IRQ_IXP4XX_GPIO11, IRQT_LOW);
34
35 ixp4xx_pci_preinit();
36}
37
38static int __init gateway7001_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
39{
40 if (slot == 1)
41 return IRQ_IXP4XX_GPIO11;
42 else if (slot == 2)
43 return IRQ_IXP4XX_GPIO10;
44 else return -1;
45}
46
47struct hw_pci gateway7001_pci __initdata = {
48 .nr_controllers = 1,
49 .preinit = gateway7001_pci_preinit,
50 .swizzle = pci_std_swizzle,
51 .setup = ixp4xx_setup,
52 .scan = ixp4xx_scan_bus,
53 .map_irq = gateway7001_map_irq,
54};
55
56int __init gateway7001_pci_init(void)
57{
58 if (machine_is_gateway7001())
59 pci_common_init(&gateway7001_pci);
60 return 0;
61}
62
63subsys_initcall(gateway7001_pci_init);
diff --git a/arch/arm/mach-ixp4xx/gateway7001-setup.c b/arch/arm/mach-ixp4xx/gateway7001-setup.c
new file mode 100644
index 0000000000..37876832e1
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/gateway7001-setup.c
@@ -0,0 +1,108 @@
1/*
2 * arch/arm/mach-ixp4xx/gateway7001-setup.c
3 *
4 * Board setup for the Gateway 7001 board
5 *
6 * Copyright (C) 2007 Imre Kaloz <kaloz@openwrt.org>
7 *
8 * based on coyote-setup.c:
9 * Copyright (C) 2003-2005 MontaVista Software, Inc.
10 *
11 * Author: Imre Kaloz <Kaloz@openwrt.org>
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/irq.h>
27#include <asm/mach-types.h>
28#include <asm/mach/arch.h>
29#include <asm/mach/flash.h>
30
31static struct flash_platform_data gateway7001_flash_data = {
32 .map_name = "cfi_probe",
33 .width = 2,
34};
35
36static struct resource gateway7001_flash_resource = {
37 .flags = IORESOURCE_MEM,
38};
39
40static struct platform_device gateway7001_flash = {
41 .name = "IXP4XX-Flash",
42 .id = 0,
43 .dev = {
44 .platform_data = &gateway7001_flash_data,
45 },
46 .num_resources = 1,
47 .resource = &gateway7001_flash_resource,
48};
49
50static struct resource gateway7001_uart_resource = {
51 .start = IXP4XX_UART2_BASE_PHYS,
52 .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
53 .flags = IORESOURCE_MEM,
54};
55
56static struct plat_serial8250_port gateway7001_uart_data[] = {
57 {
58 .mapbase = IXP4XX_UART2_BASE_PHYS,
59 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
60 .irq = IRQ_IXP4XX_UART2,
61 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
62 .iotype = UPIO_MEM,
63 .regshift = 2,
64 .uartclk = IXP4XX_UART_XTAL,
65 },
66 { },
67};
68
69static struct platform_device gateway7001_uart = {
70 .name = "serial8250",
71 .id = PLAT8250_DEV_PLATFORM,
72 .dev = {
73 .platform_data = gateway7001_uart_data,
74 },
75 .num_resources = 1,
76 .resource = &gateway7001_uart_resource,
77};
78
79static struct platform_device *gateway7001_devices[] __initdata = {
80 &gateway7001_flash,
81 &gateway7001_uart
82};
83
84static void __init gateway7001_init(void)
85{
86 ixp4xx_sys_init();
87
88 gateway7001_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
89 gateway7001_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1;
90
91 *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
92 *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
93
94 platform_add_devices(gateway7001_devices, ARRAY_SIZE(gateway7001_devices));
95}
96
97#ifdef CONFIG_MACH_GATEWAY7001
98MACHINE_START(GATEWAY7001, "Gateway 7001 AP")
99 /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
100 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
101 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
102 .map_io = ixp4xx_map_io,
103 .init_irq = ixp4xx_init_irq,
104 .timer = &ixp4xx_timer,
105 .boot_params = 0x0100,
106 .init_machine = gateway7001_init,
107MACHINE_END
108#endif
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-pci.c b/arch/arm/mach-ixp4xx/gtwx5715-pci.c
index a66484b63d..0d5a424558 100644
--- a/arch/arm/mach-ixp4xx/gtwx5715-pci.c
+++ b/arch/arm/mach-ixp4xx/gtwx5715-pci.c
@@ -25,17 +25,13 @@
25#include <linux/pci.h> 25#include <linux/pci.h>
26#include <linux/init.h> 26#include <linux/init.h>
27#include <linux/delay.h> 27#include <linux/delay.h>
28#include <linux/irq.h>
29
28#include <asm/mach-types.h> 30#include <asm/mach-types.h>
29#include <asm/hardware.h> 31#include <asm/hardware.h>
30#include <asm/irq.h>
31#include <asm/arch/gtwx5715.h> 32#include <asm/arch/gtwx5715.h>
32#include <asm/mach/pci.h> 33#include <asm/mach/pci.h>
33 34
34extern void ixp4xx_pci_preinit(void);
35extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
36extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys);
37
38
39/* 35/*
40 * The exact GPIO pins and IRQs are defined in arch-ixp4xx/gtwx5715.h 36 * The exact GPIO pins and IRQs are defined in arch-ixp4xx/gtwx5715.h
41 * Slot 0 isn't actually populated with a card connector but 37 * Slot 0 isn't actually populated with a card connector but
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index ec4f07950e..d5008d8fc9 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -15,6 +15,10 @@
15#include <linux/tty.h> 15#include <linux/tty.h>
16#include <linux/serial_8250.h> 16#include <linux/serial_8250.h>
17#include <linux/slab.h> 17#include <linux/slab.h>
18#include <linux/io.h>
19#include <linux/mtd/mtd.h>
20#include <linux/mtd/nand.h>
21#include <linux/mtd/partitions.h>
18 22
19#include <asm/types.h> 23#include <asm/types.h>
20#include <asm/setup.h> 24#include <asm/setup.h>
@@ -24,6 +28,7 @@
24#include <asm/irq.h> 28#include <asm/irq.h>
25#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
26#include <asm/mach/flash.h> 30#include <asm/mach/flash.h>
31#include <asm/delay.h>
27 32
28static struct flash_platform_data ixdp425_flash_data = { 33static struct flash_platform_data ixdp425_flash_data = {
29 .map_name = "cfi_probe", 34 .map_name = "cfi_probe",
@@ -44,6 +49,77 @@ static struct platform_device ixdp425_flash = {
44 .resource = &ixdp425_flash_resource, 49 .resource = &ixdp425_flash_resource,
45}; 50};
46 51
52#if defined(CONFIG_MTD_NAND_PLATFORM) || \
53 defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
54
55#ifdef CONFIG_MTD_PARTITIONS
56const char *part_probes[] = { "cmdlinepart", NULL };
57
58static struct mtd_partition ixdp425_partitions[] = {
59 {
60 .name = "ixp400 NAND FS 0",
61 .offset = 0,
62 .size = SZ_8M
63 }, {
64 .name = "ixp400 NAND FS 1",
65 .offset = MTDPART_OFS_APPEND,
66 .size = MTDPART_SIZ_FULL
67 },
68};
69#endif
70
71static void
72ixdp425_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
73{
74 struct nand_chip *this = mtd->priv;
75 int offset = (int)this->priv;
76
77 if (ctrl & NAND_CTRL_CHANGE) {
78 if (ctrl & NAND_NCE) {
79 gpio_line_set(IXDP425_NAND_NCE_PIN, IXP4XX_GPIO_LOW);
80 udelay(5);
81 } else
82 gpio_line_set(IXDP425_NAND_NCE_PIN, IXP4XX_GPIO_HIGH);
83
84 offset = (ctrl & NAND_CLE) ? IXDP425_NAND_CMD_BYTE : 0;
85 offset |= (ctrl & NAND_ALE) ? IXDP425_NAND_ADDR_BYTE : 0;
86 this->priv = (void *)offset;
87 }
88
89 if (cmd != NAND_CMD_NONE)
90 writeb(cmd, this->IO_ADDR_W + offset);
91}
92
93static struct platform_nand_data ixdp425_flash_nand_data = {
94 .chip = {
95 .chip_delay = 30,
96 .options = NAND_NO_AUTOINCR,
97#ifdef CONFIG_MTD_PARTITIONS
98 .part_probe_types = part_probes,
99 .partitions = ixdp425_partitions,
100 .nr_partitions = ARRAY_SIZE(ixdp425_partitions),
101#endif
102 },
103 .ctrl = {
104 .cmd_ctrl = ixdp425_flash_nand_cmd_ctrl
105 }
106};
107
108static struct resource ixdp425_flash_nand_resource = {
109 .flags = IORESOURCE_MEM,
110};
111
112static struct platform_device ixdp425_flash_nand = {
113 .name = "gen_nand",
114 .id = -1,
115 .dev = {
116 .platform_data = &ixdp425_flash_nand_data,
117 },
118 .num_resources = 1,
119 .resource = &ixdp425_flash_nand_resource,
120};
121#endif /* CONFIG_MTD_NAND_PLATFORM */
122
47static struct ixp4xx_i2c_pins ixdp425_i2c_gpio_pins = { 123static struct ixp4xx_i2c_pins ixdp425_i2c_gpio_pins = {
48 .sda_pin = IXDP425_SDA_PIN, 124 .sda_pin = IXDP425_SDA_PIN,
49 .scl_pin = IXDP425_SCL_PIN, 125 .scl_pin = IXDP425_SCL_PIN,
@@ -104,6 +180,10 @@ static struct platform_device ixdp425_uart = {
104static struct platform_device *ixdp425_devices[] __initdata = { 180static struct platform_device *ixdp425_devices[] __initdata = {
105 &ixdp425_i2c_controller, 181 &ixdp425_i2c_controller,
106 &ixdp425_flash, 182 &ixdp425_flash,
183#if defined(CONFIG_MTD_NAND_PLATFORM) || \
184 defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
185 &ixdp425_flash_nand,
186#endif
107 &ixdp425_uart 187 &ixdp425_uart
108}; 188};
109 189
@@ -115,6 +195,22 @@ static void __init ixdp425_init(void)
115 ixdp425_flash_resource.end = 195 ixdp425_flash_resource.end =
116 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; 196 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
117 197
198#if defined(CONFIG_MTD_NAND_PLATFORM) || \
199 defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
200 ixdp425_flash_nand_resource.start = IXP4XX_EXP_BUS_BASE(3),
201 ixdp425_flash_nand_resource.end = IXP4XX_EXP_BUS_BASE(3) + 0x10 - 1;
202
203 gpio_line_config(IXDP425_NAND_NCE_PIN, IXP4XX_GPIO_OUT);
204
205 /* Configure expansion bus for NAND Flash */
206 *IXP4XX_EXP_CS3 = IXP4XX_EXP_BUS_CS_EN |
207 IXP4XX_EXP_BUS_STROBE_T(1) | /* extend by 1 clock */
208 IXP4XX_EXP_BUS_CYCLES(0) | /* Intel cycles */
209 IXP4XX_EXP_BUS_SIZE(0) | /* 512bytes addr space*/
210 IXP4XX_EXP_BUS_WR_EN |
211 IXP4XX_EXP_BUS_BYTE_EN; /* 8 bit data bus */
212#endif
213
118 if (cpu_is_ixp43x()) { 214 if (cpu_is_ixp43x()) {
119 ixdp425_uart.num_resources = 1; 215 ixdp425_uart.num_resources = 1;
120 ixdp425_uart_data[1].flags = 0; 216 ixdp425_uart_data[1].flags = 0;
diff --git a/arch/arm/mach-ixp4xx/wg302v2-pci.c b/arch/arm/mach-ixp4xx/wg302v2-pci.c
new file mode 100644
index 0000000000..6588f2c758
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/wg302v2-pci.c
@@ -0,0 +1,63 @@
1/*
2 * arch/arch/mach-ixp4xx/wg302v2-pci.c
3 *
4 * PCI setup routines for the Netgear WG302 v2 and WAG302 v2
5 *
6 * Copyright (C) 2007 Imre Kaloz <kaloz@openwrt.org>
7 *
8 * based on coyote-pci.c:
9 * Copyright (C) 2002 Jungo Software Technologies.
10 * Copyright (C) 2003 MontaVista Software, Inc.
11 *
12 * Maintainer: Imre Kaloz <kaloz@openwrt.org>
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
25#include <asm/mach-types.h>
26#include <asm/hardware.h>
27
28#include <asm/mach/pci.h>
29
30void __init wg302v2_pci_preinit(void)
31{
32 set_irq_type(IRQ_IXP4XX_GPIO8, IRQT_LOW);
33 set_irq_type(IRQ_IXP4XX_GPIO9, IRQT_LOW);
34
35 ixp4xx_pci_preinit();
36}
37
38static int __init wg302v2_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
39{
40 if (slot == 1)
41 return IRQ_IXP4XX_GPIO8;
42 else if (slot == 2)
43 return IRQ_IXP4XX_GPIO9;
44 else return -1;
45}
46
47struct hw_pci wg302v2_pci __initdata = {
48 .nr_controllers = 1,
49 .preinit = wg302v2_pci_preinit,
50 .swizzle = pci_std_swizzle,
51 .setup = ixp4xx_setup,
52 .scan = ixp4xx_scan_bus,
53 .map_irq = wg302v2_map_irq,
54};
55
56int __init wg302v2_pci_init(void)
57{
58 if (machine_is_wg302v2())
59 pci_common_init(&wg302v2_pci);
60 return 0;
61}
62
63subsys_initcall(wg302v2_pci_init);
diff --git a/arch/arm/mach-ixp4xx/wg302v2-setup.c b/arch/arm/mach-ixp4xx/wg302v2-setup.c
new file mode 100644
index 0000000000..f7e09ad804
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/wg302v2-setup.c
@@ -0,0 +1,109 @@
1/*
2 * arch/arm/mach-ixp4xx/wg302-setup.c
3 *
4 * Board setup for the Netgear WG302 v2 and WAG302 v2
5 *
6 * Copyright (C) 2007 Imre Kaloz <Kaloz@openwrt.org>
7 *
8 * based on coyote-setup.c:
9 * Copyright (C) 2003-2005 MontaVista Software, Inc.
10 *
11 * Author: Imre Kaloz <kaloz@openwrt.org>
12 *
13 */
14
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/device.h>
18#include <linux/serial.h>
19#include <linux/tty.h>
20#include <linux/serial_8250.h>
21#include <linux/slab.h>
22
23#include <asm/types.h>
24#include <asm/setup.h>
25#include <asm/memory.h>
26#include <asm/hardware.h>
27#include <asm/irq.h>
28#include <asm/mach-types.h>
29#include <asm/mach/arch.h>
30#include <asm/mach/flash.h>
31
32static struct flash_platform_data wg302v2_flash_data = {
33 .map_name = "cfi_probe",
34 .width = 2,
35};
36
37static struct resource wg302v2_flash_resource = {
38 .flags = IORESOURCE_MEM,
39};
40
41static struct platform_device wg302v2_flash = {
42 .name = "IXP4XX-Flash",
43 .id = 0,
44 .dev = {
45 .platform_data = &wg302v2_flash_data,
46 },
47 .num_resources = 1,
48 .resource = &wg302v2_flash_resource,
49};
50
51static struct resource wg302v2_uart_resource = {
52 .start = IXP4XX_UART2_BASE_PHYS,
53 .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
54 .flags = IORESOURCE_MEM,
55};
56
57static struct plat_serial8250_port wg302v2_uart_data[] = {
58 {
59 .mapbase = IXP4XX_UART2_BASE_PHYS,
60 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
61 .irq = IRQ_IXP4XX_UART2,
62 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
63 .iotype = UPIO_MEM,
64 .regshift = 2,
65 .uartclk = IXP4XX_UART_XTAL,
66 },
67 { },
68};
69
70static struct platform_device wg302v2_uart = {
71 .name = "serial8250",
72 .id = PLAT8250_DEV_PLATFORM,
73 .dev = {
74 .platform_data = wg302v2_uart_data,
75 },
76 .num_resources = 1,
77 .resource = &wg302v2_uart_resource,
78};
79
80static struct platform_device *wg302v2_devices[] __initdata = {
81 &wg302v2_flash,
82 &wg302v2_uart,
83};
84
85static void __init wg302v2_init(void)
86{
87 ixp4xx_sys_init();
88
89 wg302v2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
90 wg302v2_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1;
91
92 *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
93 *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
94
95 platform_add_devices(wg302v2_devices, ARRAY_SIZE(wg302v2_devices));
96}
97
98#ifdef CONFIG_MACH_WG302V2
99MACHINE_START(WG302V2, "Netgear WG302 v2 / WAG302 v2")
100 /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
101 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
102 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
103 .map_io = ixp4xx_map_io,
104 .init_irq = ixp4xx_init_irq,
105 .timer = &ixp4xx_timer,
106 .boot_params = 0x0100,
107 .init_machine = wg302v2_init,
108MACHINE_END
109#endif
diff --git a/arch/arm/mach-ks8695/Makefile b/arch/arm/mach-ks8695/Makefile
index 56b7d33733..2a07a281fa 100644
--- a/arch/arm/mach-ks8695/Makefile
+++ b/arch/arm/mach-ks8695/Makefile
@@ -3,7 +3,7 @@
3# Makefile for KS8695 architecture support 3# Makefile for KS8695 architecture support
4# 4#
5 5
6obj-y := cpu.o irq.o time.o devices.o 6obj-y := cpu.o irq.o time.o gpio.o devices.o
7obj-m := 7obj-m :=
8obj-n := 8obj-n :=
9obj- := 9obj- :=
diff --git a/arch/arm/mach-ks8695/gpio.c b/arch/arm/mach-ks8695/gpio.c
new file mode 100644
index 0000000000..b1aa3cb3d4
--- /dev/null
+++ b/arch/arm/mach-ks8695/gpio.c
@@ -0,0 +1,218 @@
1/*
2 * arch/arm/mach-ks8695/gpio.c
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#include <linux/kernel.h>
21#include <linux/mm.h>
22#include <linux/init.h>
23#include <linux/module.h>
24
25#include <asm/io.h>
26#include <asm/hardware.h>
27#include <asm/mach/irq.h>
28
29#include <asm/arch/regs-gpio.h>
30#include <asm/arch/gpio.h>
31
32/*
33 * Configure a GPIO line for either GPIO function, or its internal
34 * function (Interrupt, Timer, etc).
35 */
36static void __init_or_module ks8695_gpio_mode(unsigned int pin, short gpio)
37{
38 unsigned int enable[] = { IOPC_IOEINT0EN, IOPC_IOEINT1EN, IOPC_IOEINT2EN, IOPC_IOEINT3EN, IOPC_IOTIM0EN, IOPC_IOTIM1EN };
39 unsigned long x, flags;
40
41 if (pin > KS8695_GPIO_5) /* only GPIO 0..5 have internal functions */
42 return;
43
44 local_irq_save(flags);
45
46 x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPC);
47 if (gpio) /* GPIO: set bit to 0 */
48 x &= ~enable[pin];
49 else /* Internal function: set bit to 1 */
50 x |= enable[pin];
51 __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPC);
52
53 local_irq_restore(flags);
54}
55
56
57static unsigned short gpio_irq[] = { KS8695_IRQ_EXTERN0, KS8695_IRQ_EXTERN1, KS8695_IRQ_EXTERN2, KS8695_IRQ_EXTERN3 };
58
59/*
60 * Configure GPIO pin as external interrupt source.
61 */
62int __init_or_module ks8695_gpio_interrupt(unsigned int pin, unsigned int type)
63{
64 unsigned long x, flags;
65
66 if (pin > KS8695_GPIO_3) /* only GPIO 0..3 can generate IRQ */
67 return -EINVAL;
68
69 local_irq_save(flags);
70
71 /* set pin as input */
72 x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM);
73 x &= ~IOPM_(pin);
74 __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM);
75
76 local_irq_restore(flags);
77
78 /* Set IRQ triggering type */
79 set_irq_type(gpio_irq[pin], type);
80
81 /* enable interrupt mode */
82 ks8695_gpio_mode(pin, 0);
83
84 return 0;
85}
86EXPORT_SYMBOL(ks8695_gpio_interrupt);
87
88
89
90/* .... Generic GPIO interface .............................................. */
91
92/*
93 * Configure the GPIO line as an input.
94 */
95int __init_or_module gpio_direction_input(unsigned int pin)
96{
97 unsigned long x, flags;
98
99 if (pin > KS8695_GPIO_15)
100 return -EINVAL;
101
102 /* set pin to GPIO mode */
103 ks8695_gpio_mode(pin, 1);
104
105 local_irq_save(flags);
106
107 /* set pin as input */
108 x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM);
109 x &= ~IOPM_(pin);
110 __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM);
111
112 local_irq_restore(flags);
113
114 return 0;
115}
116EXPORT_SYMBOL(gpio_direction_input);
117
118
119/*
120 * Configure the GPIO line as an output, with default state.
121 */
122int __init_or_module gpio_direction_output(unsigned int pin, unsigned int state)
123{
124 unsigned long x, flags;
125
126 if (pin > KS8695_GPIO_15)
127 return -EINVAL;
128
129 /* set pin to GPIO mode */
130 ks8695_gpio_mode(pin, 1);
131
132 local_irq_save(flags);
133
134 /* set line state */
135 x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD);
136 if (state)
137 x |= (1 << pin);
138 else
139 x &= ~(1 << pin);
140 __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPD);
141
142 /* set pin as output */
143 x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM);
144 x |= IOPM_(pin);
145 __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM);
146
147 local_irq_restore(flags);
148
149 return 0;
150}
151EXPORT_SYMBOL(gpio_direction_output);
152
153
154/*
155 * Set the state of an output GPIO line.
156 */
157void gpio_set_value(unsigned int pin, unsigned int state)
158{
159 unsigned long x, flags;
160
161 if (pin > KS8695_GPIO_15)
162 return;
163
164 local_irq_save(flags);
165
166 /* set output line state */
167 x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD);
168 if (state)
169 x |= (1 << pin);
170 else
171 x &= ~(1 << pin);
172 __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPD);
173
174 local_irq_restore(flags);
175}
176EXPORT_SYMBOL(gpio_set_value);
177
178
179/*
180 * Read the state of a GPIO line.
181 */
182int gpio_get_value(unsigned int pin)
183{
184 unsigned long x;
185
186 if (pin > KS8695_GPIO_15)
187 return -EINVAL;
188
189 x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD);
190 return (x & (1 << pin)) != 0;
191}
192EXPORT_SYMBOL(gpio_get_value);
193
194
195/*
196 * Map GPIO line to IRQ number.
197 */
198int gpio_to_irq(unsigned int pin)
199{
200 if (pin > KS8695_GPIO_3) /* only GPIO 0..3 can generate IRQ */
201 return -EINVAL;
202
203 return gpio_irq[pin];
204}
205EXPORT_SYMBOL(gpio_to_irq);
206
207
208/*
209 * Map IRQ number to GPIO line.
210 */
211int irq_to_gpio(unsigned int irq)
212{
213 if ((irq < KS8695_IRQ_EXTERN0) || (irq > KS8695_IRQ_EXTERN3))
214 return -EINVAL;
215
216 return (irq - KS8695_IRQ_EXTERN0);
217}
218EXPORT_SYMBOL(irq_to_gpio);
diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c
index 8f7c90a059..34a31caa6f 100644
--- a/arch/arm/mach-pxa/clock.c
+++ b/arch/arm/mach-pxa/clock.c
@@ -12,7 +12,6 @@
12 12
13#include <asm/arch/pxa-regs.h> 13#include <asm/arch/pxa-regs.h>
14#include <asm/hardware.h> 14#include <asm/hardware.h>
15#include <asm/semaphore.h>
16 15
17struct clk { 16struct clk {
18 struct list_head node; 17 struct list_head node;
@@ -25,21 +24,21 @@ struct clk {
25}; 24};
26 25
27static LIST_HEAD(clocks); 26static LIST_HEAD(clocks);
28static DECLARE_MUTEX(clocks_sem); 27static DEFINE_MUTEX(clocks_mutex);
29static DEFINE_SPINLOCK(clocks_lock); 28static DEFINE_SPINLOCK(clocks_lock);
30 29
31struct clk *clk_get(struct device *dev, const char *id) 30struct clk *clk_get(struct device *dev, const char *id)
32{ 31{
33 struct clk *p, *clk = ERR_PTR(-ENOENT); 32 struct clk *p, *clk = ERR_PTR(-ENOENT);
34 33
35 down(&clocks_sem); 34 mutex_lock(&clocks_mutex);
36 list_for_each_entry(p, &clocks, node) { 35 list_for_each_entry(p, &clocks, node) {
37 if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { 36 if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
38 clk = p; 37 clk = p;
39 break; 38 break;
40 } 39 }
41 } 40 }
42 up(&clocks_sem); 41 mutex_unlock(&clocks_mutex);
43 42
44 return clk; 43 return clk;
45} 44}
@@ -101,18 +100,18 @@ static struct clk clk_gpio27 = {
101 100
102int clk_register(struct clk *clk) 101int clk_register(struct clk *clk)
103{ 102{
104 down(&clocks_sem); 103 mutex_lock(&clocks_mutex);
105 list_add(&clk->node, &clocks); 104 list_add(&clk->node, &clocks);
106 up(&clocks_sem); 105 mutex_unlock(&clocks_mutex);
107 return 0; 106 return 0;
108} 107}
109EXPORT_SYMBOL(clk_register); 108EXPORT_SYMBOL(clk_register);
110 109
111void clk_unregister(struct clk *clk) 110void clk_unregister(struct clk *clk)
112{ 111{
113 down(&clocks_sem); 112 mutex_lock(&clocks_mutex);
114 list_del(&clk->node); 113 list_del(&clk->node);
115 up(&clocks_sem); 114 mutex_unlock(&clocks_mutex);
116} 115}
117EXPORT_SYMBOL(clk_unregister); 116EXPORT_SYMBOL(clk_unregister);
118 117
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index a1a900d166..aab27297b3 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -44,6 +44,7 @@
44#include <asm/hardware/scoop.h> 44#include <asm/hardware/scoop.h>
45 45
46#include "generic.h" 46#include "generic.h"
47#include "devices.h"
47#include "sharpsl.h" 48#include "sharpsl.h"
48 49
49 50
@@ -368,7 +369,7 @@ MACHINE_START(CORGI, "SHARP Corgi")
368 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 369 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
369 .fixup = fixup_corgi, 370 .fixup = fixup_corgi,
370 .map_io = pxa_map_io, 371 .map_io = pxa_map_io,
371 .init_irq = pxa_init_irq, 372 .init_irq = pxa25x_init_irq,
372 .init_machine = corgi_init, 373 .init_machine = corgi_init,
373 .timer = &pxa_timer, 374 .timer = &pxa_timer,
374MACHINE_END 375MACHINE_END
@@ -380,7 +381,7 @@ MACHINE_START(SHEPHERD, "SHARP Shepherd")
380 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 381 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
381 .fixup = fixup_corgi, 382 .fixup = fixup_corgi,
382 .map_io = pxa_map_io, 383 .map_io = pxa_map_io,
383 .init_irq = pxa_init_irq, 384 .init_irq = pxa25x_init_irq,
384 .init_machine = corgi_init, 385 .init_machine = corgi_init,
385 .timer = &pxa_timer, 386 .timer = &pxa_timer,
386MACHINE_END 387MACHINE_END
@@ -392,7 +393,7 @@ MACHINE_START(HUSKY, "SHARP Husky")
392 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 393 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
393 .fixup = fixup_corgi, 394 .fixup = fixup_corgi,
394 .map_io = pxa_map_io, 395 .map_io = pxa_map_io,
395 .init_irq = pxa_init_irq, 396 .init_irq = pxa25x_init_irq,
396 .init_machine = corgi_init, 397 .init_machine = corgi_init,
397 .timer = &pxa_timer, 398 .timer = &pxa_timer,
398MACHINE_END 399MACHINE_END
diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h
new file mode 100644
index 0000000000..9a6faff8e5
--- /dev/null
+++ b/arch/arm/mach-pxa/devices.h
@@ -0,0 +1,11 @@
1extern struct platform_device pxamci_device;
2extern struct platform_device pxaudc_device;
3extern struct platform_device pxafb_device;
4extern struct platform_device ffuart_device;
5extern struct platform_device btuart_device;
6extern struct platform_device stuart_device;
7extern struct platform_device hwuart_device;
8extern struct platform_device pxai2c_device;
9extern struct platform_device pxai2s_device;
10extern struct platform_device pxaficp_device;
11extern struct platform_device pxartc_device;
diff --git a/arch/arm/mach-pxa/dma.c b/arch/arm/mach-pxa/dma.c
index 4440babe7b..93c4f31f12 100644
--- a/arch/arm/mach-pxa/dma.c
+++ b/arch/arm/mach-pxa/dma.c
@@ -25,12 +25,15 @@
25 25
26#include <asm/arch/pxa-regs.h> 26#include <asm/arch/pxa-regs.h>
27 27
28static struct dma_channel { 28struct dma_channel {
29 char *name; 29 char *name;
30 pxa_dma_prio prio;
30 void (*irq_handler)(int, void *); 31 void (*irq_handler)(int, void *);
31 void *data; 32 void *data;
32} dma_channels[PXA_DMA_CHANNELS]; 33};
33 34
35static struct dma_channel *dma_channels;
36static int num_dma_channels;
34 37
35int pxa_request_dma (char *name, pxa_dma_prio prio, 38int pxa_request_dma (char *name, pxa_dma_prio prio,
36 void (*irq_handler)(int, void *), 39 void (*irq_handler)(int, void *),
@@ -47,8 +50,9 @@ int pxa_request_dma (char *name, pxa_dma_prio prio,
47 50
48 do { 51 do {
49 /* try grabbing a DMA channel with the requested priority */ 52 /* try grabbing a DMA channel with the requested priority */
50 pxa_for_each_dma_prio (i, prio) { 53 for (i = 0; i < num_dma_channels; i++) {
51 if (!dma_channels[i].name) { 54 if ((dma_channels[i].prio == prio) &&
55 !dma_channels[i].name) {
52 found = 1; 56 found = 1;
53 break; 57 break;
54 } 58 }
@@ -91,7 +95,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
91{ 95{
92 int i, dint = DINT; 96 int i, dint = DINT;
93 97
94 for (i = 0; i < PXA_DMA_CHANNELS; i++) { 98 for (i = 0; i < num_dma_channels; i++) {
95 if (dint & (1 << i)) { 99 if (dint & (1 << i)) {
96 struct dma_channel *channel = &dma_channels[i]; 100 struct dma_channel *channel = &dma_channels[i];
97 if (channel->name && channel->irq_handler) { 101 if (channel->name && channel->irq_handler) {
@@ -109,18 +113,32 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
109 return IRQ_HANDLED; 113 return IRQ_HANDLED;
110} 114}
111 115
112static int __init pxa_dma_init (void) 116int __init pxa_init_dma(int num_ch)
113{ 117{
114 int ret; 118 int i, ret;
115 119
116 ret = request_irq (IRQ_DMA, dma_irq_handler, 0, "DMA", NULL); 120 dma_channels = kzalloc(sizeof(struct dma_channel) * num_ch, GFP_KERNEL);
117 if (ret) 121 if (dma_channels == NULL)
122 return -ENOMEM;
123
124 ret = request_irq(IRQ_DMA, dma_irq_handler, IRQF_DISABLED, "DMA", NULL);
125 if (ret) {
118 printk (KERN_CRIT "Wow! Can't register IRQ for DMA\n"); 126 printk (KERN_CRIT "Wow! Can't register IRQ for DMA\n");
119 return ret; 127 kfree(dma_channels);
120} 128 return ret;
129 }
121 130
122arch_initcall(pxa_dma_init); 131 /* dma channel priorities on pxa2xx processors:
132 * ch 0 - 3, 16 - 19 <--> (0) DMA_PRIO_HIGH
133 * ch 4 - 7, 20 - 23 <--> (1) DMA_PRIO_MEDIUM
134 * ch 8 - 15, 24 - 31 <--> (2) DMA_PRIO_LOW
135 */
136 for (i = 0; i < num_ch; i++)
137 dma_channels[i].prio = min((i & 0xf) >> 2, DMA_PRIO_LOW);
138
139 num_dma_channels = num_ch;
140 return 0;
141}
123 142
124EXPORT_SYMBOL(pxa_request_dma); 143EXPORT_SYMBOL(pxa_request_dma);
125EXPORT_SYMBOL(pxa_free_dma); 144EXPORT_SYMBOL(pxa_free_dma);
126
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
index 64b08b744f..296539b635 100644
--- a/arch/arm/mach-pxa/generic.c
+++ b/arch/arm/mach-pxa/generic.c
@@ -43,6 +43,7 @@
43#include <asm/arch/irda.h> 43#include <asm/arch/irda.h>
44#include <asm/arch/i2c.h> 44#include <asm/arch/i2c.h>
45 45
46#include "devices.h"
46#include "generic.h" 47#include "generic.h"
47 48
48/* 49/*
@@ -242,7 +243,7 @@ static struct resource pxamci_resources[] = {
242 243
243static u64 pxamci_dmamask = 0xffffffffUL; 244static u64 pxamci_dmamask = 0xffffffffUL;
244 245
245static struct platform_device pxamci_device = { 246struct platform_device pxamci_device = {
246 .name = "pxa2xx-mci", 247 .name = "pxa2xx-mci",
247 .id = -1, 248 .id = -1,
248 .dev = { 249 .dev = {
@@ -281,7 +282,7 @@ static struct resource pxa2xx_udc_resources[] = {
281 282
282static u64 udc_dma_mask = ~(u32)0; 283static u64 udc_dma_mask = ~(u32)0;
283 284
284static struct platform_device udc_device = { 285struct platform_device pxaudc_device = {
285 .name = "pxa2xx-udc", 286 .name = "pxa2xx-udc",
286 .id = -1, 287 .id = -1,
287 .resource = pxa2xx_udc_resources, 288 .resource = pxa2xx_udc_resources,
@@ -307,7 +308,7 @@ static struct resource pxafb_resources[] = {
307 308
308static u64 fb_dma_mask = ~(u64)0; 309static u64 fb_dma_mask = ~(u64)0;
309 310
310static struct platform_device pxafb_device = { 311struct platform_device pxafb_device = {
311 .name = "pxa2xx-fb", 312 .name = "pxa2xx-fb",
312 .id = -1, 313 .id = -1,
313 .dev = { 314 .dev = {
@@ -328,24 +329,24 @@ void __init set_pxa_fb_parent(struct device *parent_dev)
328 pxafb_device.dev.parent = parent_dev; 329 pxafb_device.dev.parent = parent_dev;
329} 330}
330 331
331static struct platform_device ffuart_device = { 332struct platform_device ffuart_device = {
332 .name = "pxa2xx-uart", 333 .name = "pxa2xx-uart",
333 .id = 0, 334 .id = 0,
334}; 335};
335static struct platform_device btuart_device = { 336struct platform_device btuart_device = {
336 .name = "pxa2xx-uart", 337 .name = "pxa2xx-uart",
337 .id = 1, 338 .id = 1,
338}; 339};
339static struct platform_device stuart_device = { 340struct platform_device stuart_device = {
340 .name = "pxa2xx-uart", 341 .name = "pxa2xx-uart",
341 .id = 2, 342 .id = 2,
342}; 343};
343static struct platform_device hwuart_device = { 344struct platform_device hwuart_device = {
344 .name = "pxa2xx-uart", 345 .name = "pxa2xx-uart",
345 .id = 3, 346 .id = 3,
346}; 347};
347 348
348static struct resource i2c_resources[] = { 349static struct resource pxai2c_resources[] = {
349 { 350 {
350 .start = 0x40301680, 351 .start = 0x40301680,
351 .end = 0x403016a3, 352 .end = 0x403016a3,
@@ -357,40 +358,19 @@ static struct resource i2c_resources[] = {
357 }, 358 },
358}; 359};
359 360
360static struct platform_device i2c_device = { 361struct platform_device pxai2c_device = {
361 .name = "pxa2xx-i2c", 362 .name = "pxa2xx-i2c",
362 .id = 0, 363 .id = 0,
363 .resource = i2c_resources, 364 .resource = pxai2c_resources,
364 .num_resources = ARRAY_SIZE(i2c_resources), 365 .num_resources = ARRAY_SIZE(pxai2c_resources),
365}; 366};
366 367
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
388void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) 368void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info)
389{ 369{
390 i2c_device.dev.platform_data = info; 370 pxai2c_device.dev.platform_data = info;
391} 371}
392 372
393static struct resource i2s_resources[] = { 373static struct resource pxai2s_resources[] = {
394 { 374 {
395 .start = 0x40400000, 375 .start = 0x40400000,
396 .end = 0x40400083, 376 .end = 0x40400083,
@@ -402,16 +382,16 @@ static struct resource i2s_resources[] = {
402 }, 382 },
403}; 383};
404 384
405static struct platform_device i2s_device = { 385struct platform_device pxai2s_device = {
406 .name = "pxa2xx-i2s", 386 .name = "pxa2xx-i2s",
407 .id = -1, 387 .id = -1,
408 .resource = i2s_resources, 388 .resource = pxai2s_resources,
409 .num_resources = ARRAY_SIZE(i2s_resources), 389 .num_resources = ARRAY_SIZE(pxai2s_resources),
410}; 390};
411 391
412static u64 pxaficp_dmamask = ~(u32)0; 392static u64 pxaficp_dmamask = ~(u32)0;
413 393
414static struct platform_device pxaficp_device = { 394struct platform_device pxaficp_device = {
415 .name = "pxa2xx-ir", 395 .name = "pxa2xx-ir",
416 .id = -1, 396 .id = -1,
417 .dev = { 397 .dev = {
@@ -425,42 +405,7 @@ void __init pxa_set_ficp_info(struct pxaficp_platform_data *info)
425 pxaficp_device.dev.platform_data = info; 405 pxaficp_device.dev.platform_data = info;
426} 406}
427 407
428static struct platform_device pxartc_device = { 408struct platform_device pxartc_device = {
429 .name = "sa1100-rtc", 409 .name = "sa1100-rtc",
430 .id = -1, 410 .id = -1,
431}; 411};
432
433static struct platform_device *devices[] __initdata = {
434 &pxamci_device,
435 &udc_device,
436 &pxafb_device,
437 &ffuart_device,
438 &btuart_device,
439 &stuart_device,
440 &pxaficp_device,
441 &i2c_device,
442#ifdef CONFIG_PXA27x
443 &i2c_power_device,
444#endif
445 &i2s_device,
446 &pxartc_device,
447};
448
449static int __init pxa_init(void)
450{
451 int cpuid, ret;
452
453 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
454 if (ret)
455 return ret;
456
457 /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
458 cpuid = read_cpuid(CPUID_ID);
459 if (((cpuid >> 4) & 0xfff) == 0x2d0 ||
460 ((cpuid >> 4) & 0xfff) == 0x290)
461 ret = platform_device_register(&hwuart_device);
462
463 return ret;
464}
465
466subsys_initcall(pxa_init);
diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h
index e54a8dd63c..91ab2ad8b3 100644
--- a/arch/arm/mach-pxa/generic.h
+++ b/arch/arm/mach-pxa/generic.h
@@ -12,8 +12,12 @@
12struct sys_timer; 12struct sys_timer;
13 13
14extern struct sys_timer pxa_timer; 14extern struct sys_timer pxa_timer;
15extern void __init pxa_init_irq_low(void);
16extern void __init pxa_init_irq_high(void);
17extern void __init pxa_init_irq_gpio(int gpio_nr);
18extern void __init pxa25x_init_irq(void);
19extern void __init pxa27x_init_irq(void);
15extern void __init pxa_map_io(void); 20extern void __init pxa_map_io(void);
16extern void __init pxa_init_irq(void);
17 21
18extern unsigned int get_clk_frequency_khz(int info); 22extern unsigned int get_clk_frequency_khz(int info);
19 23
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
index 64df44043a..465108da28 100644
--- a/arch/arm/mach-pxa/idp.c
+++ b/arch/arm/mach-pxa/idp.c
@@ -38,6 +38,7 @@
38#include <asm/arch/mmc.h> 38#include <asm/arch/mmc.h>
39 39
40#include "generic.h" 40#include "generic.h"
41#include "devices.h"
41 42
42/* TODO: 43/* TODO:
43 * - add pxa2xx_audio_ops_t device structure 44 * - add pxa2xx_audio_ops_t device structure
@@ -152,7 +153,7 @@ static void __init idp_init(void)
152static void __init idp_init_irq(void) 153static void __init idp_init_irq(void)
153{ 154{
154 155
155 pxa_init_irq(); 156 pxa25x_init_irq();
156 157
157 set_irq_type(TOUCH_PANEL_IRQ, TOUCH_PANEL_IRQ_EDGE); 158 set_irq_type(TOUCH_PANEL_IRQ, TOUCH_PANEL_IRQ_EDGE);
158} 159}
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 4619d5fe60..4b867b0789 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -30,12 +30,12 @@
30 30
31static void pxa_mask_low_irq(unsigned int irq) 31static void pxa_mask_low_irq(unsigned int irq)
32{ 32{
33 ICMR &= ~(1 << (irq + PXA_IRQ_SKIP)); 33 ICMR &= ~(1 << irq);
34} 34}
35 35
36static void pxa_unmask_low_irq(unsigned int irq) 36static void pxa_unmask_low_irq(unsigned int irq)
37{ 37{
38 ICMR |= (1 << (irq + PXA_IRQ_SKIP)); 38 ICMR |= (1 << irq);
39} 39}
40 40
41static int pxa_set_wake(unsigned int irq, unsigned int on) 41static int pxa_set_wake(unsigned int irq, unsigned int on)
@@ -67,7 +67,27 @@ static struct irq_chip pxa_internal_chip_low = {
67 .set_wake = pxa_set_wake, 67 .set_wake = pxa_set_wake,
68}; 68};
69 69
70#if PXA_INTERNAL_IRQS > 32 70void __init pxa_init_irq_low(void)
71{
72 int irq;
73
74 /* disable all IRQs */
75 ICMR = 0;
76
77 /* all IRQs are IRQ, not FIQ */
78 ICLR = 0;
79
80 /* only unmasked interrupts kick us out of idle */
81 ICCR = 1;
82
83 for (irq = PXA_IRQ(0); irq <= PXA_IRQ(31); irq++) {
84 set_irq_chip(irq, &pxa_internal_chip_low);
85 set_irq_handler(irq, handle_level_irq);
86 set_irq_flags(irq, IRQF_VALID);
87 }
88}
89
90#ifdef CONFIG_PXA27x
71 91
72/* 92/*
73 * This is for the second set of internal IRQs as found on the PXA27x. 93 * This is for the second set of internal IRQs as found on the PXA27x.
@@ -75,12 +95,12 @@ static struct irq_chip pxa_internal_chip_low = {
75 95
76static void pxa_mask_high_irq(unsigned int irq) 96static void pxa_mask_high_irq(unsigned int irq)
77{ 97{
78 ICMR2 &= ~(1 << (irq - 32 + PXA_IRQ_SKIP)); 98 ICMR2 &= ~(1 << (irq - 32));
79} 99}
80 100
81static void pxa_unmask_high_irq(unsigned int irq) 101static void pxa_unmask_high_irq(unsigned int irq)
82{ 102{
83 ICMR2 |= (1 << (irq - 32 + PXA_IRQ_SKIP)); 103 ICMR2 |= (1 << (irq - 32));
84} 104}
85 105
86static struct irq_chip pxa_internal_chip_high = { 106static struct irq_chip pxa_internal_chip_high = {
@@ -90,6 +110,19 @@ static struct irq_chip pxa_internal_chip_high = {
90 .unmask = pxa_unmask_high_irq, 110 .unmask = pxa_unmask_high_irq,
91}; 111};
92 112
113void __init pxa_init_irq_high(void)
114{
115 int irq;
116
117 ICMR2 = 0;
118 ICLR2 = 0;
119
120 for (irq = PXA_IRQ(32); irq < PXA_IRQ(64); irq++) {
121 set_irq_chip(irq, &pxa_internal_chip_high);
122 set_irq_handler(irq, handle_level_irq);
123 set_irq_flags(irq, IRQF_VALID);
124 }
125}
93#endif 126#endif
94 127
95/* Note that if an input/irq line ever gets changed to an output during 128/* Note that if an input/irq line ever gets changed to an output during
@@ -217,7 +250,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
217 do { 250 do {
218 loop = 0; 251 loop = 0;
219 252
220 mask = GEDR0 & ~3; 253 mask = GEDR0 & GPIO_IRQ_mask[0] & ~3;
221 if (mask) { 254 if (mask) {
222 GEDR0 = mask; 255 GEDR0 = mask;
223 irq = IRQ_GPIO(2); 256 irq = IRQ_GPIO(2);
@@ -233,7 +266,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
233 loop = 1; 266 loop = 1;
234 } 267 }
235 268
236 mask = GEDR1; 269 mask = GEDR1 & GPIO_IRQ_mask[1];
237 if (mask) { 270 if (mask) {
238 GEDR1 = mask; 271 GEDR1 = mask;
239 irq = IRQ_GPIO(32); 272 irq = IRQ_GPIO(32);
@@ -248,7 +281,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
248 loop = 1; 281 loop = 1;
249 } 282 }
250 283
251 mask = GEDR2; 284 mask = GEDR2 & GPIO_IRQ_mask[2];
252 if (mask) { 285 if (mask) {
253 GEDR2 = mask; 286 GEDR2 = mask;
254 irq = IRQ_GPIO(64); 287 irq = IRQ_GPIO(64);
@@ -263,8 +296,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
263 loop = 1; 296 loop = 1;
264 } 297 }
265 298
266#if PXA_LAST_GPIO >= 96 299 mask = GEDR3 & GPIO_IRQ_mask[3];
267 mask = GEDR3;
268 if (mask) { 300 if (mask) {
269 GEDR3 = mask; 301 GEDR3 = mask;
270 irq = IRQ_GPIO(96); 302 irq = IRQ_GPIO(96);
@@ -278,7 +310,6 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
278 } while (mask); 310 } while (mask);
279 loop = 1; 311 loop = 1;
280 } 312 }
281#endif
282 } while (loop); 313 } while (loop);
283} 314}
284 315
@@ -314,64 +345,27 @@ static struct irq_chip pxa_muxed_gpio_chip = {
314 .set_wake = pxa_set_gpio_wake, 345 .set_wake = pxa_set_gpio_wake,
315}; 346};
316 347
317 348void __init pxa_init_irq_gpio(int gpio_nr)
318void __init pxa_init_irq(void)
319{ 349{
320 int irq; 350 int irq, i;
321
322 /* disable all IRQs */
323 ICMR = 0;
324
325 /* all IRQs are IRQ, not FIQ */
326 ICLR = 0;
327 351
328 /* clear all GPIO edge detects */ 352 /* clear all GPIO edge detects */
329 GFER0 = 0; 353 for (i = 0; i < gpio_nr; i += 32) {
330 GFER1 = 0; 354 GFER(i) = 0;
331 GFER2 = 0; 355 GRER(i) = 0;
332 GRER0 = 0; 356 GEDR(i) = GEDR(i);
333 GRER1 = 0; 357 }
334 GRER2 = 0;
335 GEDR0 = GEDR0;
336 GEDR1 = GEDR1;
337 GEDR2 = GEDR2;
338
339#ifdef CONFIG_PXA27x
340 /* And similarly for the extra regs on the PXA27x */
341 ICMR2 = 0;
342 ICLR2 = 0;
343 GFER3 = 0;
344 GRER3 = 0;
345 GEDR3 = GEDR3;
346#endif
347
348 /* only unmasked interrupts kick us out of idle */
349 ICCR = 1;
350 358
351 /* GPIO 0 and 1 must have their mask bit always set */ 359 /* GPIO 0 and 1 must have their mask bit always set */
352 GPIO_IRQ_mask[0] = 3; 360 GPIO_IRQ_mask[0] = 3;
353 361
354 for (irq = PXA_IRQ(PXA_IRQ_SKIP); irq <= PXA_IRQ(31); irq++) {
355 set_irq_chip(irq, &pxa_internal_chip_low);
356 set_irq_handler(irq, handle_level_irq);
357 set_irq_flags(irq, IRQF_VALID);
358 }
359
360#if PXA_INTERNAL_IRQS > 32
361 for (irq = PXA_IRQ(32); irq < PXA_IRQ(PXA_INTERNAL_IRQS); irq++) {
362 set_irq_chip(irq, &pxa_internal_chip_high);
363 set_irq_handler(irq, handle_level_irq);
364 set_irq_flags(irq, IRQF_VALID);
365 }
366#endif
367
368 for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) { 362 for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) {
369 set_irq_chip(irq, &pxa_low_gpio_chip); 363 set_irq_chip(irq, &pxa_low_gpio_chip);
370 set_irq_handler(irq, handle_edge_irq); 364 set_irq_handler(irq, handle_edge_irq);
371 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 365 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
372 } 366 }
373 367
374 for (irq = IRQ_GPIO(2); irq <= IRQ_GPIO(PXA_LAST_GPIO); irq++) { 368 for (irq = IRQ_GPIO(2); irq <= IRQ_GPIO(gpio_nr); irq++) {
375 set_irq_chip(irq, &pxa_muxed_gpio_chip); 369 set_irq_chip(irq, &pxa_muxed_gpio_chip);
376 set_irq_handler(irq, handle_edge_irq); 370 set_irq_handler(irq, handle_edge_irq);
377 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 371 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index e3097664ff..26116440a7 100644
--- a/arch/arm/mach-pxa/lpd270.c
+++ b/arch/arm/mach-pxa/lpd270.c
@@ -46,6 +46,7 @@
46#include <asm/arch/ohci.h> 46#include <asm/arch/ohci.h>
47 47
48#include "generic.h" 48#include "generic.h"
49#include "devices.h"
49 50
50 51
51static unsigned int lpd270_irq_enabled; 52static unsigned int lpd270_irq_enabled;
@@ -97,7 +98,7 @@ static void __init lpd270_init_irq(void)
97{ 98{
98 int irq; 99 int irq;
99 100
100 pxa_init_irq(); 101 pxa27x_init_irq();
101 102
102 __raw_writew(0, LPD270_INT_MASK); 103 __raw_writew(0, LPD270_INT_MASK);
103 __raw_writew(0, LPD270_INT_STATUS); 104 __raw_writew(0, LPD270_INT_STATUS);
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index 6377b2e29f..e70048fd00 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -48,6 +48,7 @@
48#include <asm/arch/mmc.h> 48#include <asm/arch/mmc.h>
49 49
50#include "generic.h" 50#include "generic.h"
51#include "devices.h"
51 52
52 53
53#define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080) 54#define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080)
@@ -103,7 +104,7 @@ static void __init lubbock_init_irq(void)
103{ 104{
104 int irq; 105 int irq;
105 106
106 pxa_init_irq(); 107 pxa25x_init_irq();
107 108
108 /* setup extra lubbock irqs */ 109 /* setup extra lubbock irqs */
109 for (irq = LUBBOCK_IRQ(0); irq <= LUBBOCK_LAST_IRQ; irq++) { 110 for (irq = LUBBOCK_IRQ(0); irq <= LUBBOCK_LAST_IRQ; irq++) {
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index ed99a81b98..b02c79c7e6 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -46,6 +46,7 @@
46#include <asm/arch/ohci.h> 46#include <asm/arch/ohci.h>
47 47
48#include "generic.h" 48#include "generic.h"
49#include "devices.h"
49 50
50 51
51static unsigned long mainstone_irq_enabled; 52static unsigned long mainstone_irq_enabled;
@@ -89,7 +90,7 @@ static void __init mainstone_init_irq(void)
89{ 90{
90 int irq; 91 int irq;
91 92
92 pxa_init_irq(); 93 pxa27x_init_irq();
93 94
94 /* setup extra Mainstone irqs */ 95 /* setup extra Mainstone irqs */
95 for(irq = MAINSTONE_IRQ(0); irq <= MAINSTONE_IRQ(15); irq++) { 96 for(irq = MAINSTONE_IRQ(0); irq <= MAINSTONE_IRQ(15); irq++) {
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
index 6bf15ae738..e66dbc26ad 100644
--- a/arch/arm/mach-pxa/pm.c
+++ b/arch/arm/mach-pxa/pm.c
@@ -77,7 +77,6 @@ int pxa_pm_enter(suspend_state_t state)
77{ 77{
78 unsigned long sleep_save[SLEEP_SAVE_SIZE]; 78 unsigned long sleep_save[SLEEP_SAVE_SIZE];
79 unsigned long checksum = 0; 79 unsigned long checksum = 0;
80 struct timespec delta, rtc;
81 int i; 80 int i;
82 extern void pxa_cpu_pm_enter(suspend_state_t state); 81 extern void pxa_cpu_pm_enter(suspend_state_t state);
83 82
@@ -87,11 +86,6 @@ int pxa_pm_enter(suspend_state_t state)
87 iwmmxt_task_disable(NULL); 86 iwmmxt_task_disable(NULL);
88#endif 87#endif
89 88
90 /* preserve current time */
91 rtc.tv_sec = RCNR;
92 rtc.tv_nsec = 0;
93 save_time_delta(&delta, &rtc);
94
95 SAVE(GPLR0); SAVE(GPLR1); SAVE(GPLR2); 89 SAVE(GPLR0); SAVE(GPLR1); SAVE(GPLR2);
96 SAVE(GPDR0); SAVE(GPDR1); SAVE(GPDR2); 90 SAVE(GPDR0); SAVE(GPDR1); SAVE(GPDR2);
97 SAVE(GRER0); SAVE(GRER1); SAVE(GRER2); 91 SAVE(GRER0); SAVE(GRER1); SAVE(GRER2);
@@ -183,10 +177,6 @@ int pxa_pm_enter(suspend_state_t state)
183 177
184 RESTORE(PSTR); 178 RESTORE(PSTR);
185 179
186 /* restore current time */
187 rtc.tv_sec = RCNR;
188 restore_time_delta(&delta, &rtc);
189
190#ifdef DEBUG 180#ifdef DEBUG
191 printk(KERN_DEBUG "*** made it back from resume\n"); 181 printk(KERN_DEBUG "*** made it back from resume\n");
192#endif 182#endif
@@ -200,40 +190,3 @@ unsigned long sleep_phys_sp(void *sp)
200{ 190{
201 return virt_to_phys(sp); 191 return virt_to_phys(sp);
202} 192}
203
204/*
205 * Called after processes are frozen, but before we shut down devices.
206 */
207int pxa_pm_prepare(suspend_state_t state)
208{
209 extern int pxa_cpu_pm_prepare(suspend_state_t state);
210
211 return pxa_cpu_pm_prepare(state);
212}
213
214EXPORT_SYMBOL_GPL(pxa_pm_prepare);
215
216/*
217 * Called after devices are re-setup, but before processes are thawed.
218 */
219int pxa_pm_finish(suspend_state_t state)
220{
221 return 0;
222}
223
224EXPORT_SYMBOL_GPL(pxa_pm_finish);
225
226static struct pm_ops pxa_pm_ops = {
227 .prepare = pxa_pm_prepare,
228 .enter = pxa_pm_enter,
229 .finish = pxa_pm_finish,
230 .valid = pm_valid_only_mem,
231};
232
233static int __init pxa_pm_init(void)
234{
235 pm_set_ops(&pxa_pm_ops);
236 return 0;
237}
238
239device_initcall(pxa_pm_init);
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 34fb80b370..655668d4d0 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -45,6 +45,7 @@
45#include <asm/mach/sharpsl_param.h> 45#include <asm/mach/sharpsl_param.h>
46 46
47#include "generic.h" 47#include "generic.h"
48#include "devices.h"
48#include "sharpsl.h" 49#include "sharpsl.h"
49 50
50static struct resource poodle_scoop_resources[] = { 51static struct resource poodle_scoop_resources[] = {
@@ -412,7 +413,7 @@ MACHINE_START(POODLE, "SHARP Poodle")
412 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 413 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
413 .fixup = fixup_poodle, 414 .fixup = fixup_poodle,
414 .map_io = pxa_map_io, 415 .map_io = pxa_map_io,
415 .init_irq = pxa_init_irq, 416 .init_irq = pxa25x_init_irq,
416 .timer = &pxa_timer, 417 .timer = &pxa_timer,
417 .init_machine = poodle_init, 418 .init_machine = poodle_init,
418MACHINE_END 419MACHINE_END
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index c1f21739bf..f36ca44833 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -19,12 +19,17 @@
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/kernel.h> 20#include <linux/kernel.h>
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/platform_device.h>
22#include <linux/pm.h> 23#include <linux/pm.h>
23 24
24#include <asm/hardware.h> 25#include <asm/hardware.h>
26#include <asm/arch/irqs.h>
25#include <asm/arch/pxa-regs.h> 27#include <asm/arch/pxa-regs.h>
28#include <asm/arch/pm.h>
29#include <asm/arch/dma.h>
26 30
27#include "generic.h" 31#include "generic.h"
32#include "devices.h"
28 33
29/* 34/*
30 * Various clock factors driven by the CCCR register. 35 * Various clock factors driven by the CCCR register.
@@ -105,18 +110,6 @@ EXPORT_SYMBOL(get_lcdclk_frequency_10khz);
105 110
106#ifdef CONFIG_PM 111#ifdef CONFIG_PM
107 112
108int pxa_cpu_pm_prepare(suspend_state_t state)
109{
110 switch (state) {
111 case PM_SUSPEND_MEM:
112 break;
113 default:
114 return -EINVAL;
115 }
116
117 return 0;
118}
119
120void pxa_cpu_pm_enter(suspend_state_t state) 113void pxa_cpu_pm_enter(suspend_state_t state)
121{ 114{
122 extern void pxa_cpu_suspend(unsigned int); 115 extern void pxa_cpu_suspend(unsigned int);
@@ -133,4 +126,49 @@ void pxa_cpu_pm_enter(suspend_state_t state)
133 } 126 }
134} 127}
135 128
129static struct pm_ops pxa25x_pm_ops = {
130 .enter = pxa_pm_enter,
131 .valid = pm_valid_only_mem,
132};
133#endif
134
135void __init pxa25x_init_irq(void)
136{
137 pxa_init_irq_low();
138 pxa_init_irq_gpio(85);
139}
140
141static struct platform_device *pxa25x_devices[] __initdata = {
142 &pxamci_device,
143 &pxaudc_device,
144 &pxafb_device,
145 &ffuart_device,
146 &btuart_device,
147 &stuart_device,
148 &pxai2c_device,
149 &pxai2s_device,
150 &pxaficp_device,
151 &pxartc_device,
152};
153
154static int __init pxa25x_init(void)
155{
156 int ret = 0;
157
158 if (cpu_is_pxa21x() || cpu_is_pxa25x()) {
159 if ((ret = pxa_init_dma(16)))
160 return ret;
161#ifdef CONFIG_PM
162 pm_set_ops(&pxa25x_pm_ops);
136#endif 163#endif
164 ret = platform_add_devices(pxa25x_devices,
165 ARRAY_SIZE(pxa25x_devices));
166 }
167 /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
168 if (cpu_is_pxa25x())
169 ret = platform_device_register(&hwuart_device);
170
171 return ret;
172}
173
174subsys_initcall(pxa25x_init);
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index c64bab49ef..aa5bb02c89 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -19,10 +19,14 @@
19 19
20#include <asm/hardware.h> 20#include <asm/hardware.h>
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/arch/irqs.h>
22#include <asm/arch/pxa-regs.h> 23#include <asm/arch/pxa-regs.h>
23#include <asm/arch/ohci.h> 24#include <asm/arch/ohci.h>
25#include <asm/arch/pm.h>
26#include <asm/arch/dma.h>
24 27
25#include "generic.h" 28#include "generic.h"
29#include "devices.h"
26 30
27/* Crystal clock: 13MHz */ 31/* Crystal clock: 13MHz */
28#define BASE_CLK 13000000 32#define BASE_CLK 13000000
@@ -122,17 +126,6 @@ EXPORT_SYMBOL(get_lcdclk_frequency_10khz);
122 126
123#ifdef CONFIG_PM 127#ifdef CONFIG_PM
124 128
125int pxa_cpu_pm_prepare(suspend_state_t state)
126{
127 switch (state) {
128 case PM_SUSPEND_MEM:
129 case PM_SUSPEND_STANDBY:
130 return 0;
131 default:
132 return -EINVAL;
133 }
134}
135
136void pxa_cpu_pm_enter(suspend_state_t state) 129void pxa_cpu_pm_enter(suspend_state_t state)
137{ 130{
138 extern void pxa_cpu_standby(void); 131 extern void pxa_cpu_standby(void);
@@ -140,9 +133,9 @@ void pxa_cpu_pm_enter(suspend_state_t state)
140 extern void pxa_cpu_resume(void); 133 extern void pxa_cpu_resume(void);
141 134
142 if (state == PM_SUSPEND_STANDBY) 135 if (state == PM_SUSPEND_STANDBY)
143 CKEN = CKEN_MEMC | CKEN_OSTIMER | CKEN_LCD | CKEN_PWM0; 136 CKEN = (1 << CKEN_MEMC) | (1 << CKEN_OSTIMER) | (1 << CKEN_LCD) | (1 << CKEN_PWM0);
144 else 137 else
145 CKEN = CKEN_MEMC | CKEN_OSTIMER; 138 CKEN = (1 << CKEN_MEMC) | (1 << CKEN_OSTIMER);
146 139
147 /* ensure voltage-change sequencer not initiated, which hangs */ 140 /* ensure voltage-change sequencer not initiated, which hangs */
148 PCFR &= ~PCFR_FVC; 141 PCFR &= ~PCFR_FVC;
@@ -162,6 +155,15 @@ void pxa_cpu_pm_enter(suspend_state_t state)
162 } 155 }
163} 156}
164 157
158static int pxa27x_pm_valid(suspend_state_t state)
159{
160 return state == PM_SUSPEND_MEM || state == PM_SUSPEND_STANDBY;
161}
162
163static struct pm_ops pxa27x_pm_ops = {
164 .enter = pxa_pm_enter,
165 .valid = pxa27x_pm_valid,
166};
165#endif 167#endif
166 168
167/* 169/*
@@ -183,7 +185,7 @@ static struct resource pxa27x_ohci_resources[] = {
183 }, 185 },
184}; 186};
185 187
186static struct platform_device ohci_device = { 188static struct platform_device pxaohci_device = {
187 .name = "pxa27x-ohci", 189 .name = "pxa27x-ohci",
188 .id = -1, 190 .id = -1,
189 .dev = { 191 .dev = {
@@ -196,16 +198,62 @@ static struct platform_device ohci_device = {
196 198
197void __init pxa_set_ohci_info(struct pxaohci_platform_data *info) 199void __init pxa_set_ohci_info(struct pxaohci_platform_data *info)
198{ 200{
199 ohci_device.dev.platform_data = info; 201 pxaohci_device.dev.platform_data = info;
200} 202}
201 203
204static struct resource i2c_power_resources[] = {
205 {
206 .start = 0x40f00180,
207 .end = 0x40f001a3,
208 .flags = IORESOURCE_MEM,
209 }, {
210 .start = IRQ_PWRI2C,
211 .end = IRQ_PWRI2C,
212 .flags = IORESOURCE_IRQ,
213 },
214};
215
216static struct platform_device pxai2c_power_device = {
217 .name = "pxa2xx-i2c",
218 .id = 1,
219 .resource = i2c_power_resources,
220 .num_resources = ARRAY_SIZE(i2c_power_resources),
221};
222
202static struct platform_device *devices[] __initdata = { 223static struct platform_device *devices[] __initdata = {
203 &ohci_device, 224 &pxamci_device,
225 &pxaudc_device,
226 &pxafb_device,
227 &ffuart_device,
228 &btuart_device,
229 &stuart_device,
230 &pxai2c_device,
231 &pxai2c_power_device,
232 &pxai2s_device,
233 &pxaficp_device,
234 &pxartc_device,
235 &pxaohci_device,
204}; 236};
205 237
238void __init pxa27x_init_irq(void)
239{
240 pxa_init_irq_low();
241 pxa_init_irq_high();
242 pxa_init_irq_gpio(128);
243}
244
206static int __init pxa27x_init(void) 245static int __init pxa27x_init(void)
207{ 246{
208 return platform_add_devices(devices, ARRAY_SIZE(devices)); 247 int ret = 0;
248 if (cpu_is_pxa27x()) {
249 if ((ret = pxa_init_dma(32)))
250 return ret;
251#ifdef CONFIG_PM
252 pm_set_ops(&pxa27x_pm_ops);
253#endif
254 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
255 }
256 return ret;
209} 257}
210 258
211subsys_initcall(pxa27x_init); 259subsys_initcall(pxa27x_init);
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 3cbac63bed..bae47e145d 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -48,6 +48,7 @@
48#include <asm/hardware/scoop.h> 48#include <asm/hardware/scoop.h>
49 49
50#include "generic.h" 50#include "generic.h"
51#include "devices.h"
51#include "sharpsl.h" 52#include "sharpsl.h"
52 53
53/* 54/*
@@ -560,7 +561,7 @@ MACHINE_START(SPITZ, "SHARP Spitz")
560 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 561 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
561 .fixup = fixup_spitz, 562 .fixup = fixup_spitz,
562 .map_io = pxa_map_io, 563 .map_io = pxa_map_io,
563 .init_irq = pxa_init_irq, 564 .init_irq = pxa27x_init_irq,
564 .init_machine = spitz_init, 565 .init_machine = spitz_init,
565 .timer = &pxa_timer, 566 .timer = &pxa_timer,
566MACHINE_END 567MACHINE_END
@@ -572,7 +573,7 @@ MACHINE_START(BORZOI, "SHARP Borzoi")
572 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 573 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
573 .fixup = fixup_spitz, 574 .fixup = fixup_spitz,
574 .map_io = pxa_map_io, 575 .map_io = pxa_map_io,
575 .init_irq = pxa_init_irq, 576 .init_irq = pxa27x_init_irq,
576 .init_machine = spitz_init, 577 .init_machine = spitz_init,
577 .timer = &pxa_timer, 578 .timer = &pxa_timer,
578MACHINE_END 579MACHINE_END
@@ -584,7 +585,7 @@ MACHINE_START(AKITA, "SHARP Akita")
584 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 585 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
585 .fixup = fixup_spitz, 586 .fixup = fixup_spitz,
586 .map_io = pxa_map_io, 587 .map_io = pxa_map_io,
587 .init_irq = pxa_init_irq, 588 .init_irq = pxa27x_init_irq,
588 .init_machine = akita_init, 589 .init_machine = akita_init,
589 .timer = &pxa_timer, 590 .timer = &pxa_timer,
590MACHINE_END 591MACHINE_END
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index 5248abe334..6f91fd2d06 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -30,11 +30,6 @@
30#include <asm/arch/pxa-regs.h> 30#include <asm/arch/pxa-regs.h>
31 31
32 32
33static inline unsigned long pxa_get_rtc_time(void)
34{
35 return RCNR;
36}
37
38static int pxa_set_rtc(void) 33static int pxa_set_rtc(void)
39{ 34{
40 unsigned long current_time = xtime.tv_sec; 35 unsigned long current_time = xtime.tv_sec;
@@ -122,10 +117,6 @@ static void __init pxa_timer_init(void)
122 117
123 set_rtc = pxa_set_rtc; 118 set_rtc = pxa_set_rtc;
124 119
125 tv.tv_nsec = 0;
126 tv.tv_sec = pxa_get_rtc_time();
127 do_settimeofday(&tv);
128
129 OIER = 0; /* disable any timer interrupts */ 120 OIER = 0; /* disable any timer interrupts */
130 OSSR = 0xf; /* clear status on all timers */ 121 OSSR = 0xf; /* clear status on all timers */
131 setup_irq(IRQ_OST0, &pxa_timer_irq); 122 setup_irq(IRQ_OST0, &pxa_timer_irq);
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index 72738771fb..240fd04208 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -42,7 +42,7 @@
42#include <asm/mach/sharpsl_param.h> 42#include <asm/mach/sharpsl_param.h>
43 43
44#include "generic.h" 44#include "generic.h"
45 45#include "devices.h"
46 46
47/* 47/*
48 * SCOOP Device 48 * SCOOP Device
@@ -332,7 +332,7 @@ MACHINE_START(TOSA, "SHARP Tosa")
332 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 332 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
333 .fixup = fixup_tosa, 333 .fixup = fixup_tosa,
334 .map_io = pxa_map_io, 334 .map_io = pxa_map_io,
335 .init_irq = pxa_init_irq, 335 .init_irq = pxa25x_init_irq,
336 .init_machine = tosa_init, 336 .init_machine = tosa_init,
337 .timer = &pxa_timer, 337 .timer = &pxa_timer,
338MACHINE_END 338MACHINE_END
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index 28c79bd0a3..e4ba43bdf8 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -49,6 +49,7 @@
49#include <asm/arch/ohci.h> 49#include <asm/arch/ohci.h>
50 50
51#include "generic.h" 51#include "generic.h"
52#include "devices.h"
52 53
53/******************************************************************************************** 54/********************************************************************************************
54 * ONBOARD FLASH 55 * ONBOARD FLASH
@@ -503,7 +504,7 @@ MACHINE_START(TRIZEPS4, "Keith und Koep Trizeps IV module")
503 .boot_params = TRIZEPS4_SDRAM_BASE + 0x100, 504 .boot_params = TRIZEPS4_SDRAM_BASE + 0x100,
504 .init_machine = trizeps4_init, 505 .init_machine = trizeps4_init,
505 .map_io = trizeps4_map_io, 506 .map_io = trizeps4_map_io,
506 .init_irq = pxa_init_irq, 507 .init_irq = pxa27x_init_irq,
507 .timer = &pxa_timer, 508 .timer = &pxa_timer,
508MACHINE_END 509MACHINE_END
509 510
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index f01de807b7..8b52ea95d4 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -20,6 +20,8 @@
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/dm9000.h> 21#include <linux/dm9000.h>
22 22
23#include <net/ax88796.h>
24
23#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
24#include <asm/mach/map.h> 26#include <asm/mach/map.h>
25#include <asm/mach/irq.h> 27#include <asm/mach/irq.h>
@@ -409,6 +411,61 @@ static struct s3c2410_platform_i2c bast_i2c_info = {
409 .max_freq = 130*1000, 411 .max_freq = 130*1000,
410}; 412};
411 413
414/* Asix AX88796 10/100 ethernet controller */
415
416static struct ax_plat_data bast_asix_platdata = {
417 .flags = AXFLG_MAC_FROMDEV,
418 .wordlength = 2,
419 .dcr_val = 0x48,
420 .rcr_val = 0x40,
421};
422
423static struct resource bast_asix_resource[] = {
424 [0] = {
425 .start = S3C2410_CS5 + BAST_PA_ASIXNET,
426 .end = S3C2410_CS5 + BAST_PA_ASIXNET + (0x18 * 0x20) - 1,
427 .flags = IORESOURCE_MEM,
428 },
429 [1] = {
430 .start = S3C2410_CS5 + BAST_PA_ASIXNET + (0x1f * 0x20),
431 .end = S3C2410_CS5 + BAST_PA_ASIXNET + (0x1f * 0x20),
432 .flags = IORESOURCE_MEM,
433 },
434 [2] = {
435 .start = IRQ_ASIX,
436 .end = IRQ_ASIX,
437 .flags = IORESOURCE_IRQ
438 }
439};
440
441static struct platform_device bast_device_asix = {
442 .name = "ax88796",
443 .id = 0,
444 .num_resources = ARRAY_SIZE(bast_asix_resource),
445 .resource = bast_asix_resource,
446 .dev = {
447 .platform_data = &bast_asix_platdata
448 }
449};
450
451/* Asix AX88796 10/100 ethernet controller parallel port */
452
453static struct resource bast_asixpp_resource[] = {
454 [0] = {
455 .start = S3C2410_CS5 + BAST_PA_ASIXNET + (0x18 * 0x20),
456 .end = S3C2410_CS5 + BAST_PA_ASIXNET + (0x1b * 0x20) - 1,
457 .flags = IORESOURCE_MEM,
458 }
459};
460
461static struct platform_device bast_device_axpp = {
462 .name = "ax88796-pp",
463 .id = 0,
464 .num_resources = ARRAY_SIZE(bast_asixpp_resource),
465 .resource = bast_asixpp_resource,
466};
467
468/* LCD/VGA controller */
412 469
413static struct s3c2410fb_mach_info __initdata bast_lcd_info = { 470static struct s3c2410fb_mach_info __initdata bast_lcd_info = {
414 .width = 640, 471 .width = 640,
@@ -453,6 +510,8 @@ static struct platform_device *bast_devices[] __initdata = {
453 &s3c_device_nand, 510 &s3c_device_nand,
454 &bast_device_nor, 511 &bast_device_nor,
455 &bast_device_dm9k, 512 &bast_device_dm9k,
513 &bast_device_asix,
514 &bast_device_axpp,
456 &bast_sio, 515 &bast_sio,
457}; 516};
458 517
diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c
index bff7ddd06a..29c163d300 100644
--- a/arch/arm/mach-s3c2440/mach-anubis.c
+++ b/arch/arm/mach-s3c2440/mach-anubis.c
@@ -18,6 +18,9 @@
18#include <linux/serial_core.h> 18#include <linux/serial_core.h>
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20 20
21#include <linux/sm501.h>
22#include <linux/sm501-regs.h>
23
21#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
22#include <asm/mach/map.h> 25#include <asm/mach/map.h>
23#include <asm/mach/irq.h> 26#include <asm/mach/irq.h>
@@ -42,6 +45,8 @@
42#include <linux/mtd/nand_ecc.h> 45#include <linux/mtd/nand_ecc.h>
43#include <linux/mtd/partitions.h> 46#include <linux/mtd/partitions.h>
44 47
48#include <net/ax88796.h>
49
45#include <asm/plat-s3c24xx/clock.h> 50#include <asm/plat-s3c24xx/clock.h>
46#include <asm/plat-s3c24xx/devs.h> 51#include <asm/plat-s3c24xx/devs.h>
47#include <asm/plat-s3c24xx/cpu.h> 52#include <asm/plat-s3c24xx/cpu.h>
@@ -153,6 +158,29 @@ static struct mtd_partition anubis_default_nand_part[] = {
153 } 158 }
154}; 159};
155 160
161static struct mtd_partition anubis_default_nand_part_large[] = {
162 [0] = {
163 .name = "Boot Agent",
164 .size = SZ_128K,
165 .offset = 0,
166 },
167 [1] = {
168 .name = "/boot",
169 .size = SZ_4M - SZ_128K,
170 .offset = SZ_128K,
171 },
172 [2] = {
173 .name = "user1",
174 .offset = SZ_4M,
175 .size = SZ_32M - SZ_4M,
176 },
177 [3] = {
178 .name = "user2",
179 .offset = SZ_32M,
180 .size = MTDPART_SIZ_FULL,
181 }
182};
183
156/* the Anubis has 3 selectable slots for nand-flash, the two 184/* the Anubis has 3 selectable slots for nand-flash, the two
157 * on-board chip areas, as well as the external slot. 185 * on-board chip areas, as well as the external slot.
158 * 186 *
@@ -260,6 +288,104 @@ static struct platform_device anubis_device_ide1 = {
260 .resource = anubis_ide1_resource, 288 .resource = anubis_ide1_resource,
261}; 289};
262 290
291/* Asix AX88796 10/100 ethernet controller */
292
293static struct ax_plat_data anubis_asix_platdata = {
294 .flags = AXFLG_MAC_FROMDEV,
295 .wordlength = 2,
296 .dcr_val = 0x48,
297 .rcr_val = 0x40,
298};
299
300static struct resource anubis_asix_resource[] = {
301 [0] = {
302 .start = S3C2410_CS5,
303 .end = S3C2410_CS5 + (0x20 * 0x20) -1,
304 .flags = IORESOURCE_MEM
305 },
306 [1] = {
307 .start = IRQ_ASIX,
308 .end = IRQ_ASIX,
309 .flags = IORESOURCE_IRQ
310 }
311};
312
313static struct platform_device anubis_device_asix = {
314 .name = "ax88796",
315 .id = 0,
316 .num_resources = ARRAY_SIZE(anubis_asix_resource),
317 .resource = anubis_asix_resource,
318 .dev = {
319 .platform_data = &anubis_asix_platdata,
320 }
321};
322
323/* SM501 */
324
325static struct resource anubis_sm501_resource[] = {
326 [0] = {
327 .start = S3C2410_CS2,
328 .end = S3C2410_CS2 + SZ_8M,
329 .flags = IORESOURCE_MEM,
330 },
331 [1] = {
332 .start = S3C2410_CS2 + SZ_64M - SZ_2M,
333 .end = S3C2410_CS2 + SZ_64M - 1,
334 .flags = IORESOURCE_MEM,
335 },
336 [2] = {
337 .start = IRQ_EINT0,
338 .end = IRQ_EINT0,
339 .flags = IORESOURCE_IRQ,
340 },
341};
342
343static struct sm501_initdata anubis_sm501_initdata = {
344 .gpio_high = {
345 .set = 0x3F000000, /* 24bit panel */
346 .mask = 0x0,
347 },
348 .misc_timing = {
349 .set = 0x010100, /* SDRAM timing */
350 .mask = 0x1F1F00,
351 },
352 .misc_control = {
353 .set = SM501_MISC_PNL_24BIT,
354 .mask = 0,
355 },
356
357 /* set the SDRAM and bus clocks */
358 .mclk = 72 * MHZ,
359 .m1xclk = 144 * MHZ,
360};
361
362static struct sm501_platdata_gpio_i2c anubis_sm501_gpio_i2c[] = {
363 [0] = {
364 .pin_scl = 44,
365 .pin_sda = 45,
366 },
367 [1] = {
368 .pin_scl = 40,
369 .pin_sda = 41,
370 },
371};
372
373static struct sm501_platdata anubis_sm501_platdata = {
374 .init = &anubis_sm501_initdata,
375 .gpio_i2c = anubis_sm501_gpio_i2c,
376 .gpio_i2c_nr = ARRAY_SIZE(anubis_sm501_gpio_i2c),
377};
378
379static struct platform_device anubis_device_sm501 = {
380 .name = "sm501",
381 .id = 0,
382 .num_resources = ARRAY_SIZE(anubis_sm501_resource),
383 .resource = anubis_sm501_resource,
384 .dev = {
385 .platform_data = &anubis_sm501_platdata,
386 },
387};
388
263/* Standard Anubis devices */ 389/* Standard Anubis devices */
264 390
265static struct platform_device *anubis_devices[] __initdata = { 391static struct platform_device *anubis_devices[] __initdata = {
@@ -271,6 +397,8 @@ static struct platform_device *anubis_devices[] __initdata = {
271 &s3c_device_nand, 397 &s3c_device_nand,
272 &anubis_device_ide0, 398 &anubis_device_ide0,
273 &anubis_device_ide1, 399 &anubis_device_ide1,
400 &anubis_device_asix,
401 &anubis_device_sm501,
274}; 402};
275 403
276static struct clk *anubis_clocks[] = { 404static struct clk *anubis_clocks[] = {
@@ -304,8 +432,17 @@ static void __init anubis_map_io(void)
304 s3c24xx_init_clocks(0); 432 s3c24xx_init_clocks(0);
305 s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs)); 433 s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs));
306 434
307 /* ensure that the GPIO is setup */ 435 /* check for the newer revision boards with large page nand */
308 s3c2410_gpio_setpin(S3C2410_GPA0, 1); 436
437 if ((__raw_readb(ANUBIS_VA_IDREG) & ANUBIS_IDREG_REVMASK) >= 4) {
438 printk(KERN_INFO "ANUBIS-B detected (revision %d)\n",
439 __raw_readb(ANUBIS_VA_IDREG) & ANUBIS_IDREG_REVMASK);
440 anubis_nand_sets[0].partitions = anubis_default_nand_part_large;
441 anubis_nand_sets[0].nr_partitions = ARRAY_SIZE(anubis_default_nand_part_large);
442 } else {
443 /* ensure that the GPIO is setup */
444 s3c2410_gpio_setpin(S3C2410_GPA0, 1);
445 }
309} 446}
310 447
311static void __init anubis_init(void) 448static void __init anubis_init(void)
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c
index 15811601f0..89f4c9c577 100644
--- a/arch/arm/mach-s3c2440/mach-osiris.c
+++ b/arch/arm/mach-s3c2440/mach-osiris.c
@@ -166,6 +166,29 @@ static struct mtd_partition osiris_default_nand_part[] = {
166 } 166 }
167}; 167};
168 168
169static struct mtd_partition osiris_default_nand_part_large[] = {
170 [0] = {
171 .name = "Boot Agent",
172 .size = SZ_128K,
173 .offset = 0,
174 },
175 [1] = {
176 .name = "/boot",
177 .size = SZ_4M - SZ_128K,
178 .offset = SZ_128K,
179 },
180 [2] = {
181 .name = "user1",
182 .offset = SZ_4M,
183 .size = SZ_32M - SZ_4M,
184 },
185 [3] = {
186 .name = "user2",
187 .offset = SZ_32M,
188 .size = MTDPART_SIZ_FULL,
189 }
190};
191
169/* the Osiris has 3 selectable slots for nand-flash, the two 192/* the Osiris has 3 selectable slots for nand-flash, the two
170 * on-board chip areas, as well as the external slot. 193 * on-board chip areas, as well as the external slot.
171 * 194 *
@@ -322,14 +345,23 @@ static void __init osiris_map_io(void)
322 s3c24xx_init_clocks(0); 345 s3c24xx_init_clocks(0);
323 s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs)); 346 s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs));
324 347
348 /* check for the newer revision boards with large page nand */
349
350 if ((__raw_readb(OSIRIS_VA_IDREG) & OSIRIS_ID_REVMASK) >= 4) {
351 printk(KERN_INFO "OSIRIS-B detected (revision %d)\n",
352 __raw_readb(OSIRIS_VA_IDREG) & OSIRIS_ID_REVMASK);
353 osiris_nand_sets[0].partitions = osiris_default_nand_part_large;
354 osiris_nand_sets[0].nr_partitions = ARRAY_SIZE(osiris_default_nand_part_large);
355 } else {
356 /* write-protect line to the NAND */
357 s3c2410_gpio_setpin(S3C2410_GPA0, 1);
358 }
359
325 /* fix bus configuration (nBE settings wrong on ABLE pre v2.20) */ 360 /* fix bus configuration (nBE settings wrong on ABLE pre v2.20) */
326 361
327 local_irq_save(flags); 362 local_irq_save(flags);
328 __raw_writel(__raw_readl(S3C2410_BWSCON) | S3C2410_BWSCON_ST1 | S3C2410_BWSCON_ST2 | S3C2410_BWSCON_ST3 | S3C2410_BWSCON_ST4 | S3C2410_BWSCON_ST5, S3C2410_BWSCON); 363 __raw_writel(__raw_readl(S3C2410_BWSCON) | S3C2410_BWSCON_ST1 | S3C2410_BWSCON_ST2 | S3C2410_BWSCON_ST3 | S3C2410_BWSCON_ST4 | S3C2410_BWSCON_ST5, S3C2410_BWSCON);
329 local_irq_restore(flags); 364 local_irq_restore(flags);
330
331 /* write-protect line to the NAND */
332 s3c2410_gpio_setpin(S3C2410_GPA0, 1);
333} 365}
334 366
335static void __init osiris_init(void) 367static void __init osiris_init(void)
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index 4cbf9468f6..3a0a1ee254 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -185,28 +185,21 @@ static int __devinit neponset_probe(struct platform_device *dev)
185/* 185/*
186 * LDM power management. 186 * LDM power management.
187 */ 187 */
188static unsigned int neponset_saved_state;
189
188static int neponset_suspend(struct platform_device *dev, pm_message_t state) 190static int neponset_suspend(struct platform_device *dev, pm_message_t state)
189{ 191{
190 /* 192 /*
191 * Save state. 193 * Save state.
192 */ 194 */
193 if (!dev->dev.power.saved_state) 195 neponset_saved_state = NCR_0;
194 dev->dev.power.saved_state = kmalloc(sizeof(unsigned int), GFP_KERNEL);
195 if (!dev->dev.power.saved_state)
196 return -ENOMEM;
197
198 *(unsigned int *)dev->dev.power.saved_state = NCR_0;
199 196
200 return 0; 197 return 0;
201} 198}
202 199
203static int neponset_resume(struct platform_device *dev) 200static int neponset_resume(struct platform_device *dev)
204{ 201{
205 if (dev->dev.power.saved_state) { 202 NCR_0 = neponset_saved_state;
206 NCR_0 = *(unsigned int *)dev->dev.power.saved_state;
207 kfree(dev->dev.power.saved_state);
208 dev->dev.power.saved_state = NULL;
209 }
210 203
211 return 0; 204 return 0;
212} 205}
diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c
index d674cf3431..01a37d3c07 100644
--- a/arch/arm/mach-sa1100/pm.c
+++ b/arch/arm/mach-sa1100/pm.c
@@ -57,12 +57,7 @@ enum { SLEEP_SAVE_SP = 0,
57static int sa11x0_pm_enter(suspend_state_t state) 57static int sa11x0_pm_enter(suspend_state_t state)
58{ 58{
59 unsigned long gpio, sleep_save[SLEEP_SAVE_SIZE]; 59 unsigned long gpio, sleep_save[SLEEP_SAVE_SIZE];
60 struct timespec delta, rtc;
61 60
62 /* preserve current time */
63 rtc.tv_sec = RCNR;
64 rtc.tv_nsec = 0;
65 save_time_delta(&delta, &rtc);
66 gpio = GPLR; 61 gpio = GPLR;
67 62
68 /* save vital registers */ 63 /* save vital registers */
@@ -119,10 +114,6 @@ static int sa11x0_pm_enter(suspend_state_t state)
119 */ 114 */
120 PSSR = PSSR_PH; 115 PSSR = PSSR_PH;
121 116
122 /* restore current time */
123 rtc.tv_sec = RCNR;
124 restore_time_delta(&delta, &rtc);
125
126 return 0; 117 return 0;
127} 118}
128 119
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c
index 29cb0c1604..fdf7b016e7 100644
--- a/arch/arm/mach-sa1100/time.c
+++ b/arch/arm/mach-sa1100/time.c
@@ -21,25 +21,6 @@
21#define RTC_DEF_DIVIDER (32768 - 1) 21#define RTC_DEF_DIVIDER (32768 - 1)
22#define RTC_DEF_TRIM 0 22#define RTC_DEF_TRIM 0
23 23
24static unsigned long __init sa1100_get_rtc_time(void)
25{
26 /*
27 * According to the manual we should be able to let RTTR be zero
28 * and then a default divisor for a 32.768KHz clock is used.
29 * Apparently this doesn't work, at least for my SA1110 rev 5.
30 * If the clock divider is uninitialized then reset it to the
31 * default value to get the 1Hz clock.
32 */
33 if (RTTR == 0) {
34 RTTR = RTC_DEF_DIVIDER + (RTC_DEF_TRIM << 16);
35 printk(KERN_WARNING "Warning: uninitialized Real Time Clock\n");
36 /* The current RTC value probably doesn't make sense either */
37 RCNR = 0;
38 return 0;
39 }
40 return RCNR;
41}
42
43static int sa1100_set_rtc(void) 24static int sa1100_set_rtc(void)
44{ 25{
45 unsigned long current_time = xtime.tv_sec; 26 unsigned long current_time = xtime.tv_sec;
@@ -117,15 +98,10 @@ static struct irqaction sa1100_timer_irq = {
117 98
118static void __init sa1100_timer_init(void) 99static void __init sa1100_timer_init(void)
119{ 100{
120 struct timespec tv;
121 unsigned long flags; 101 unsigned long flags;
122 102
123 set_rtc = sa1100_set_rtc; 103 set_rtc = sa1100_set_rtc;
124 104
125 tv.tv_nsec = 0;
126 tv.tv_sec = sa1100_get_rtc_time();
127 do_settimeofday(&tv);
128
129 OIER = 0; /* disable any timer interrupts */ 105 OIER = 0; /* disable any timer interrupts */
130 OSSR = 0xf; /* clear status on all timers */ 106 OSSR = 0xf; /* clear status on all timers */
131 setup_irq(IRQ_OST0, &sa1100_timer_irq); 107 setup_irq(IRQ_OST0, &sa1100_timer_irq);
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c
index ba58223f12..ca82901594 100644
--- a/arch/arm/mach-versatile/pci.c
+++ b/arch/arm/mach-versatile/pci.c
@@ -117,7 +117,10 @@ static int versatile_read_config(struct pci_bus *bus, unsigned int devfn, int wh
117 } else { 117 } else {
118 switch (size) { 118 switch (size) {
119 case 1: 119 case 1:
120 v = __raw_readb(addr); 120 v = __raw_readl(addr);
121 if (where & 2) v >>= 16;
122 if (where & 1) v >>= 8;
123 v &= 0xff;
121 break; 124 break;
122 125
123 case 2: 126 case 2:
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index f3ade18862..75952779ce 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -280,7 +280,10 @@ __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
280 if (!type) 280 if (!type)
281 return NULL; 281 return NULL;
282 282
283 size = PAGE_ALIGN(size); 283 /*
284 * Page align the mapping size, taking account of any offset.
285 */
286 size = PAGE_ALIGN(offset + size);
284 287
285 area = get_vm_area(size, VM_IOREMAP); 288 area = get_vm_area(size, VM_IOREMAP);
286 if (!area) 289 if (!area)
@@ -325,11 +328,6 @@ __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
325 if (!size || last_addr < phys_addr) 328 if (!size || last_addr < phys_addr)
326 return NULL; 329 return NULL;
327 330
328 /*
329 * Page align the mapping size
330 */
331 size = PAGE_ALIGN(last_addr + 1) - phys_addr;
332
333 return __arm_ioremap_pfn(pfn, offset, size, mtype); 331 return __arm_ioremap_pfn(pfn, offset, size, mtype);
334} 332}
335EXPORT_SYMBOL(__arm_ioremap); 333EXPORT_SYMBOL(__arm_ioremap);
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 02e050ae59..3b5e47dc0c 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -527,9 +527,9 @@ void __init create_mapping(struct map_desc *md)
527 return; 527 return;
528 } 528 }
529 529
530 addr = md->virtual; 530 addr = md->virtual & PAGE_MASK;
531 phys = (unsigned long)__pfn_to_phys(md->pfn); 531 phys = (unsigned long)__pfn_to_phys(md->pfn);
532 length = PAGE_ALIGN(md->length); 532 length = PAGE_ALIGN(md->length + (md->virtual & ~PAGE_MASK));
533 533
534 if (type->prot_l1 == 0 && ((addr | phys | length) & ~SECTION_MASK)) { 534 if (type->prot_l1 == 0 && ((addr | phys | length) & ~SECTION_MASK)) {
535 printk(KERN_WARNING "BUG: map for 0x%08lx at 0x%08lx can not " 535 printk(KERN_WARNING "BUG: map for 0x%08lx at 0x%08lx can not "
diff --git a/arch/arm/plat-iop/Makefile b/arch/arm/plat-iop/Makefile
index 4d2b1da3cd..36bff03259 100644
--- a/arch/arm/plat-iop/Makefile
+++ b/arch/arm/plat-iop/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_ARCH_IOP32X) += setup.o
12obj-$(CONFIG_ARCH_IOP32X) += time.o 12obj-$(CONFIG_ARCH_IOP32X) += time.o
13obj-$(CONFIG_ARCH_IOP32X) += io.o 13obj-$(CONFIG_ARCH_IOP32X) += io.o
14obj-$(CONFIG_ARCH_IOP32X) += cp6.o 14obj-$(CONFIG_ARCH_IOP32X) += cp6.o
15obj-$(CONFIG_ARCH_IOP32X) += adma.o
15 16
16# IOP33X 17# IOP33X
17obj-$(CONFIG_ARCH_IOP33X) += gpio.o 18obj-$(CONFIG_ARCH_IOP33X) += gpio.o
@@ -21,6 +22,7 @@ obj-$(CONFIG_ARCH_IOP33X) += setup.o
21obj-$(CONFIG_ARCH_IOP33X) += time.o 22obj-$(CONFIG_ARCH_IOP33X) += time.o
22obj-$(CONFIG_ARCH_IOP33X) += io.o 23obj-$(CONFIG_ARCH_IOP33X) += io.o
23obj-$(CONFIG_ARCH_IOP33X) += cp6.o 24obj-$(CONFIG_ARCH_IOP33X) += cp6.o
25obj-$(CONFIG_ARCH_IOP33X) += adma.o
24 26
25# IOP13XX 27# IOP13XX
26obj-$(CONFIG_ARCH_IOP13XX) += cp6.o 28obj-$(CONFIG_ARCH_IOP13XX) += cp6.o
diff --git a/arch/arm/plat-iop/adma.c b/arch/arm/plat-iop/adma.c
new file mode 100644
index 0000000000..53c5e9a52e
--- /dev/null
+++ b/arch/arm/plat-iop/adma.c
@@ -0,0 +1,209 @@
1/*
2 * platform device definitions for the iop3xx dma/xor engines
3 * Copyright © 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.,
16 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 */
19#include <linux/platform_device.h>
20#include <asm/hardware/iop3xx.h>
21#include <linux/dma-mapping.h>
22#include <asm/arch/adma.h>
23#include <asm/hardware/iop_adma.h>
24
25#ifdef CONFIG_ARCH_IOP32X
26#define IRQ_DMA0_EOT IRQ_IOP32X_DMA0_EOT
27#define IRQ_DMA0_EOC IRQ_IOP32X_DMA0_EOC
28#define IRQ_DMA0_ERR IRQ_IOP32X_DMA0_ERR
29
30#define IRQ_DMA1_EOT IRQ_IOP32X_DMA1_EOT
31#define IRQ_DMA1_EOC IRQ_IOP32X_DMA1_EOC
32#define IRQ_DMA1_ERR IRQ_IOP32X_DMA1_ERR
33
34#define IRQ_AA_EOT IRQ_IOP32X_AA_EOT
35#define IRQ_AA_EOC IRQ_IOP32X_AA_EOC
36#define IRQ_AA_ERR IRQ_IOP32X_AA_ERR
37#endif
38#ifdef CONFIG_ARCH_IOP33X
39#define IRQ_DMA0_EOT IRQ_IOP33X_DMA0_EOT
40#define IRQ_DMA0_EOC IRQ_IOP33X_DMA0_EOC
41#define IRQ_DMA0_ERR IRQ_IOP33X_DMA0_ERR
42
43#define IRQ_DMA1_EOT IRQ_IOP33X_DMA1_EOT
44#define IRQ_DMA1_EOC IRQ_IOP33X_DMA1_EOC
45#define IRQ_DMA1_ERR IRQ_IOP33X_DMA1_ERR
46
47#define IRQ_AA_EOT IRQ_IOP33X_AA_EOT
48#define IRQ_AA_EOC IRQ_IOP33X_AA_EOC
49#define IRQ_AA_ERR IRQ_IOP33X_AA_ERR
50#endif
51/* AAU and DMA Channels */
52static struct resource iop3xx_dma_0_resources[] = {
53 [0] = {
54 .start = IOP3XX_DMA_PHYS_BASE(0),
55 .end = IOP3XX_DMA_UPPER_PA(0),
56 .flags = IORESOURCE_MEM,
57 },
58 [1] = {
59 .start = IRQ_DMA0_EOT,
60 .end = IRQ_DMA0_EOT,
61 .flags = IORESOURCE_IRQ
62 },
63 [2] = {
64 .start = IRQ_DMA0_EOC,
65 .end = IRQ_DMA0_EOC,
66 .flags = IORESOURCE_IRQ
67 },
68 [3] = {
69 .start = IRQ_DMA0_ERR,
70 .end = IRQ_DMA0_ERR,
71 .flags = IORESOURCE_IRQ
72 }
73};
74
75static struct resource iop3xx_dma_1_resources[] = {
76 [0] = {
77 .start = IOP3XX_DMA_PHYS_BASE(1),
78 .end = IOP3XX_DMA_UPPER_PA(1),
79 .flags = IORESOURCE_MEM,
80 },
81 [1] = {
82 .start = IRQ_DMA1_EOT,
83 .end = IRQ_DMA1_EOT,
84 .flags = IORESOURCE_IRQ
85 },
86 [2] = {
87 .start = IRQ_DMA1_EOC,
88 .end = IRQ_DMA1_EOC,
89 .flags = IORESOURCE_IRQ
90 },
91 [3] = {
92 .start = IRQ_DMA1_ERR,
93 .end = IRQ_DMA1_ERR,
94 .flags = IORESOURCE_IRQ
95 }
96};
97
98
99static struct resource iop3xx_aau_resources[] = {
100 [0] = {
101 .start = IOP3XX_AAU_PHYS_BASE,
102 .end = IOP3XX_AAU_UPPER_PA,
103 .flags = IORESOURCE_MEM,
104 },
105 [1] = {
106 .start = IRQ_AA_EOT,
107 .end = IRQ_AA_EOT,
108 .flags = IORESOURCE_IRQ
109 },
110 [2] = {
111 .start = IRQ_AA_EOC,
112 .end = IRQ_AA_EOC,
113 .flags = IORESOURCE_IRQ
114 },
115 [3] = {
116 .start = IRQ_AA_ERR,
117 .end = IRQ_AA_ERR,
118 .flags = IORESOURCE_IRQ
119 }
120};
121
122static u64 iop3xx_adma_dmamask = DMA_32BIT_MASK;
123
124static struct iop_adma_platform_data iop3xx_dma_0_data = {
125 .hw_id = DMA0_ID,
126 .pool_size = PAGE_SIZE,
127};
128
129static struct iop_adma_platform_data iop3xx_dma_1_data = {
130 .hw_id = DMA1_ID,
131 .pool_size = PAGE_SIZE,
132};
133
134static struct iop_adma_platform_data iop3xx_aau_data = {
135 .hw_id = AAU_ID,
136 .pool_size = 3 * PAGE_SIZE,
137};
138
139struct platform_device iop3xx_dma_0_channel = {
140 .name = "iop-adma",
141 .id = 0,
142 .num_resources = 4,
143 .resource = iop3xx_dma_0_resources,
144 .dev = {
145 .dma_mask = &iop3xx_adma_dmamask,
146 .coherent_dma_mask = DMA_64BIT_MASK,
147 .platform_data = (void *) &iop3xx_dma_0_data,
148 },
149};
150
151struct platform_device iop3xx_dma_1_channel = {
152 .name = "iop-adma",
153 .id = 1,
154 .num_resources = 4,
155 .resource = iop3xx_dma_1_resources,
156 .dev = {
157 .dma_mask = &iop3xx_adma_dmamask,
158 .coherent_dma_mask = DMA_64BIT_MASK,
159 .platform_data = (void *) &iop3xx_dma_1_data,
160 },
161};
162
163struct platform_device iop3xx_aau_channel = {
164 .name = "iop-adma",
165 .id = 2,
166 .num_resources = 4,
167 .resource = iop3xx_aau_resources,
168 .dev = {
169 .dma_mask = &iop3xx_adma_dmamask,
170 .coherent_dma_mask = DMA_64BIT_MASK,
171 .platform_data = (void *) &iop3xx_aau_data,
172 },
173};
174
175static int __init iop3xx_adma_cap_init(void)
176{
177 #ifdef CONFIG_ARCH_IOP32X /* the 32x DMA does not perform CRC32C */
178 dma_cap_set(DMA_MEMCPY, iop3xx_dma_0_data.cap_mask);
179 dma_cap_set(DMA_INTERRUPT, iop3xx_dma_0_data.cap_mask);
180 #else
181 dma_cap_set(DMA_MEMCPY, iop3xx_dma_0_data.cap_mask);
182 dma_cap_set(DMA_MEMCPY_CRC32C, iop3xx_dma_0_data.cap_mask);
183 dma_cap_set(DMA_INTERRUPT, iop3xx_dma_0_data.cap_mask);
184 #endif
185
186 #ifdef CONFIG_ARCH_IOP32X /* the 32x DMA does not perform CRC32C */
187 dma_cap_set(DMA_MEMCPY, iop3xx_dma_1_data.cap_mask);
188 dma_cap_set(DMA_INTERRUPT, iop3xx_dma_1_data.cap_mask);
189 #else
190 dma_cap_set(DMA_MEMCPY, iop3xx_dma_1_data.cap_mask);
191 dma_cap_set(DMA_MEMCPY_CRC32C, iop3xx_dma_1_data.cap_mask);
192 dma_cap_set(DMA_INTERRUPT, iop3xx_dma_1_data.cap_mask);
193 #endif
194
195 #ifdef CONFIG_ARCH_IOP32X /* the 32x AAU does not perform zero sum */
196 dma_cap_set(DMA_XOR, iop3xx_aau_data.cap_mask);
197 dma_cap_set(DMA_MEMSET, iop3xx_aau_data.cap_mask);
198 dma_cap_set(DMA_INTERRUPT, iop3xx_aau_data.cap_mask);
199 #else
200 dma_cap_set(DMA_XOR, iop3xx_aau_data.cap_mask);
201 dma_cap_set(DMA_ZERO_SUM, iop3xx_aau_data.cap_mask);
202 dma_cap_set(DMA_MEMSET, iop3xx_aau_data.cap_mask);
203 dma_cap_set(DMA_INTERRUPT, iop3xx_aau_data.cap_mask);
204 #endif
205
206 return 0;
207}
208
209arch_initcall(iop3xx_adma_cap_init);
diff --git a/arch/arm26/Kconfig b/arch/arm26/Kconfig
index 20688bc13e..9044f33299 100644
--- a/arch/arm26/Kconfig
+++ b/arch/arm26/Kconfig
@@ -17,6 +17,9 @@ config MMU
17 bool 17 bool
18 default y 18 default y
19 19
20config NO_DMA
21 def_bool y
22
20config ARCH_ACORN 23config ARCH_ACORN
21 bool 24 bool
22 default y 25 default y
diff --git a/arch/arm26/defconfig b/arch/arm26/defconfig
index c4a89703c3..2b7d44bf49 100644
--- a/arch/arm26/defconfig
+++ b/arch/arm26/defconfig
@@ -248,7 +248,6 @@ CONFIG_I2C_CHARDEV=y
248# CONFIG_JBD_DEBUG is not set 248# CONFIG_JBD_DEBUG is not set
249# CONFIG_FAT_FS is not set 249# CONFIG_FAT_FS is not set
250# CONFIG_MSDOS_FS is not set 250# CONFIG_MSDOS_FS is not set
251# CONFIG_UMSDOS_FS is not set
252# CONFIG_VFAT_FS is not set 251# CONFIG_VFAT_FS is not set
253# CONFIG_EFS_FS is not set 252# CONFIG_EFS_FS is not set
254# CONFIG_JFFS_FS is not set 253# CONFIG_JFFS_FS is not set
diff --git a/arch/arm26/kernel/ptrace.c b/arch/arm26/kernel/ptrace.c
index 4169279567..0fefb86970 100644
--- a/arch/arm26/kernel/ptrace.c
+++ b/arch/arm26/kernel/ptrace.c
@@ -531,7 +531,6 @@ static int ptrace_setfpregs(struct task_struct *tsk, void *ufp)
531 531
532long arch_ptrace(struct task_struct *child, long request, long addr, long data) 532long arch_ptrace(struct task_struct *child, long request, long addr, long data)
533{ 533{
534 unsigned long tmp;
535 int ret; 534 int ret;
536 535
537 switch (request) { 536 switch (request) {
@@ -540,12 +539,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
540 */ 539 */
541 case PTRACE_PEEKTEXT: 540 case PTRACE_PEEKTEXT:
542 case PTRACE_PEEKDATA: 541 case PTRACE_PEEKDATA:
543 ret = access_process_vm(child, addr, &tmp, 542 ret = generic_ptrace_peekdata(child, addr, data);
544 sizeof(unsigned long), 0);
545 if (ret == sizeof(unsigned long))
546 ret = put_user(tmp, (unsigned long *) data);
547 else
548 ret = -EIO;
549 break; 543 break;
550 544
551 case PTRACE_PEEKUSR: 545 case PTRACE_PEEKUSR:
@@ -557,12 +551,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
557 */ 551 */
558 case PTRACE_POKETEXT: 552 case PTRACE_POKETEXT:
559 case PTRACE_POKEDATA: 553 case PTRACE_POKEDATA:
560 ret = access_process_vm(child, addr, &data, 554 ret = generic_ptrace_pokedata(child, addr, data);
561 sizeof(unsigned long), 1);
562 if (ret == sizeof(unsigned long))
563 ret = 0;
564 else
565 ret = -EIO;
566 break; 555 break;
567 556
568 case PTRACE_POKEUSR: 557 case PTRACE_POKEUSR:
diff --git a/arch/arm26/kernel/traps.c b/arch/arm26/kernel/traps.c
index d594fb59e9..2911e2eae8 100644
--- a/arch/arm26/kernel/traps.c
+++ b/arch/arm26/kernel/traps.c
@@ -185,6 +185,7 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
185 printk("Internal error: %s: %x\n", str, err); 185 printk("Internal error: %s: %x\n", str, err);
186 printk("CPU: %d\n", smp_processor_id()); 186 printk("CPU: %d\n", smp_processor_id());
187 show_regs(regs); 187 show_regs(regs);
188 add_taint(TAINT_DIE);
188 printk("Process %s (pid: %d, stack limit = 0x%p)\n", 189 printk("Process %s (pid: %d, stack limit = 0x%p)\n",
189 current->comm, current->pid, end_of_stack(tsk)); 190 current->comm, current->pid, end_of_stack(tsk));
190 191
diff --git a/arch/arm26/mm/init.c b/arch/arm26/mm/init.c
index 562fac12eb..36e7ee3f83 100644
--- a/arch/arm26/mm/init.c
+++ b/arch/arm26/mm/init.c
@@ -33,9 +33,6 @@
33 33
34#include <asm/map.h> 34#include <asm/map.h>
35 35
36
37#define TABLE_SIZE PTRS_PER_PTE * sizeof(pte_t))
38
39struct mmu_gather mmu_gathers[NR_CPUS]; 36struct mmu_gather mmu_gathers[NR_CPUS];
40 37
41extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; 38extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index 3ec7658687..d12346aaa8 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -113,6 +113,10 @@ config BOARD_ATNGW100
113 bool "ATNGW100 Network Gateway" 113 bool "ATNGW100 Network Gateway"
114endchoice 114endchoice
115 115
116if BOARD_ATSTK1000
117source "arch/avr32/boards/atstk1000/Kconfig"
118endif
119
116choice 120choice
117 prompt "Boot loader type" 121 prompt "Boot loader type"
118 default LOADER_U_BOOT 122 default LOADER_U_BOOT
@@ -185,6 +189,27 @@ config CMDLINE
185 189
186endmenu 190endmenu
187 191
192menu "Power managment options"
193
194menu "CPU Frequency scaling"
195
196source "drivers/cpufreq/Kconfig"
197
198config CPU_FREQ_AT32AP
199 bool "CPU frequency driver for AT32AP"
200 depends on CPU_FREQ && PLATFORM_AT32AP
201 default n
202 help
203 This enables the CPU frequency driver for AT32AP processors.
204
205 For details, take a look in <file:Documentation/cpu-freq>.
206
207 If in doubt, say N.
208
209endmenu
210
211endmenu
212
188menu "Bus options" 213menu "Bus options"
189 214
190config PCI 215config PCI
diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c
index 9bc37d4f66..6c4dc0a00e 100644
--- a/arch/avr32/boards/atngw100/setup.c
+++ b/arch/avr32/boards/atngw100/setup.c
@@ -94,9 +94,6 @@ static void __init set_hw_addr(struct platform_device *pdev)
94 clk_put(pclk); 94 clk_put(pclk);
95} 95}
96 96
97struct platform_device *at32_usart_map[1];
98unsigned int at32_nr_usarts = 1;
99
100void __init setup_board(void) 97void __init setup_board(void)
101{ 98{
102 at32_map_usart(1, 0); /* USART 1: /dev/ttyS0, DB9 */ 99 at32_map_usart(1, 0); /* USART 1: /dev/ttyS0, DB9 */
diff --git a/arch/avr32/boards/atstk1000/Kconfig b/arch/avr32/boards/atstk1000/Kconfig
new file mode 100644
index 0000000000..71bc7d364f
--- /dev/null
+++ b/arch/avr32/boards/atstk1000/Kconfig
@@ -0,0 +1,53 @@
1# STK1000 customization
2
3if BOARD_ATSTK1002
4
5config BOARD_ATSTK1002_CUSTOM
6 bool "Non-default STK-1002 jumper settings"
7 help
8 You will normally leave the jumpers on the CPU card at their
9 default settings. If you need to use certain peripherals,
10 you will need to change some of those jumpers.
11
12if BOARD_ATSTK1002_CUSTOM
13
14config BOARD_ATSTK1002_SW1_CUSTOM
15 bool "SW1: use SSC1 (not SPI0)"
16 help
17 This also prevents using the external DAC as an audio interface,
18 and means you can't initialize the on-board QVGA display.
19
20config BOARD_ATSTK1002_SW2_CUSTOM
21 bool "SW2: use IRDA or TIMER0 (not UART-A, MMC/SD, and PS2-A)"
22 help
23 If you change this you'll want an updated boot loader putting
24 the console on UART-C not UART-A.
25
26config BOARD_ATSTK1002_SW3_CUSTOM
27 bool "SW3: use TIMER1 (not SSC0 and GCLK)"
28 help
29 This also prevents using the external DAC as an audio interface.
30
31config BOARD_ATSTK1002_SW4_CUSTOM
32 bool "SW4: use ISI/Camera (not GPIOs, SPI1, and PS2-B)"
33 help
34 To use the camera interface you'll need a custom card (on the
35 PCI-format connector) connect a video sensor.
36
37config BOARD_ATSTK1002_SW5_CUSTOM
38 bool "SW5: use MACB1 (not LCDC)"
39
40config BOARD_ATSTK1002_SW6_CUSTOM
41 bool "SW6: more GPIOs (not MACB0)"
42
43endif # custom
44
45config BOARD_ATSTK1002_SPI1
46 bool "Configure SPI1 controller"
47 depends on !BOARD_ATSTK1002_SW4_CUSTOM
48 help
49 All the signals for the second SPI controller are available on
50 GPIO lines and accessed through the J1 jumper block. Say "y"
51 here to configure that SPI controller.
52
53endif # stk 1002
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c
index e253e86a1a..cb93eabb9c 100644
--- a/arch/avr32/boards/atstk1000/atstk1002.c
+++ b/arch/avr32/boards/atstk1000/atstk1002.c
@@ -27,15 +27,27 @@
27 27
28#include "atstk1000.h" 28#include "atstk1000.h"
29 29
30#define SW2_DEFAULT /* MMCI and UART_A available */
31 30
32struct eth_addr { 31struct eth_addr {
33 u8 addr[6]; 32 u8 addr[6];
34}; 33};
35 34
36static struct eth_addr __initdata hw_addr[2]; 35static struct eth_addr __initdata hw_addr[2];
37static struct eth_platform_data __initdata eth_data[2]; 36static struct eth_platform_data __initdata eth_data[2] = {
37 {
38 /*
39 * The MDIO pullups on STK1000 are a bit too weak for
40 * the autodetection to work properly, so we have to
41 * mask out everything but the correct address.
42 */
43 .phy_mask = ~(1U << 16),
44 },
45 {
46 .phy_mask = ~(1U << 17),
47 },
48};
38 49
50#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM
39static struct spi_board_info spi0_board_info[] __initdata = { 51static struct spi_board_info spi0_board_info[] __initdata = {
40 { 52 {
41 /* QVGA display */ 53 /* QVGA display */
@@ -45,6 +57,13 @@ static struct spi_board_info spi0_board_info[] __initdata = {
45 .mode = SPI_MODE_3, 57 .mode = SPI_MODE_3,
46 }, 58 },
47}; 59};
60#endif
61
62#ifdef CONFIG_BOARD_ATSTK1002_SPI1
63static struct spi_board_info spi1_board_info[] __initdata = { {
64 /* patch in custom entries here */
65} };
66#endif
48 67
49/* 68/*
50 * The next two functions should go away as the boot loader is 69 * The next two functions should go away as the boot loader is
@@ -103,10 +122,10 @@ static void __init set_hw_addr(struct platform_device *pdev)
103 122
104void __init setup_board(void) 123void __init setup_board(void)
105{ 124{
106#ifdef SW2_DEFAULT 125#ifdef CONFIG_BOARD_ATSTK1002_SW2_CUSTOM
107 at32_map_usart(1, 0); /* USART 1/A: /dev/ttyS0, DB9 */
108#else
109 at32_map_usart(0, 1); /* USART 0/B: /dev/ttyS1, IRDA */ 126 at32_map_usart(0, 1); /* USART 0/B: /dev/ttyS1, IRDA */
127#else
128 at32_map_usart(1, 0); /* USART 1/A: /dev/ttyS0, DB9 */
110#endif 129#endif
111 /* USART 2/unused: expansion connector */ 130 /* USART 2/unused: expansion connector */
112 at32_map_usart(3, 2); /* USART 3/C: /dev/ttyS2, DB9 */ 131 at32_map_usart(3, 2); /* USART 3/C: /dev/ttyS2, DB9 */
@@ -140,18 +159,31 @@ static int __init atstk1002_init(void)
140 159
141 at32_add_system_devices(); 160 at32_add_system_devices();
142 161
143#ifdef SW2_DEFAULT 162#ifdef CONFIG_BOARD_ATSTK1002_SW2_CUSTOM
144 at32_add_device_usart(0);
145#else
146 at32_add_device_usart(1); 163 at32_add_device_usart(1);
164#else
165 at32_add_device_usart(0);
147#endif 166#endif
148 at32_add_device_usart(2); 167 at32_add_device_usart(2);
149 168
169#ifndef CONFIG_BOARD_ATSTK1002_SW6_CUSTOM
150 set_hw_addr(at32_add_device_eth(0, &eth_data[0])); 170 set_hw_addr(at32_add_device_eth(0, &eth_data[0]));
151 171#endif
172#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM
152 at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info)); 173 at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info));
174#endif
175#ifdef CONFIG_BOARD_ATSTK1002_SPI1
176 at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info));
177#endif
178#ifdef CONFIG_BOARD_ATSTK1002_SW5_CUSTOM
179 set_hw_addr(at32_add_device_eth(1, &eth_data[1]));
180#else
153 at32_add_device_lcdc(0, &atstk1000_lcdc_data, 181 at32_add_device_lcdc(0, &atstk1000_lcdc_data,
154 fbmem_start, fbmem_size); 182 fbmem_start, fbmem_size);
183#endif
184#ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM
185 at32_add_device_ssc(0, ATMEL_SSC_TX);
186#endif
155 187
156 return 0; 188 return 0;
157} 189}
diff --git a/arch/avr32/configs/atngw100_defconfig b/arch/avr32/configs/atngw100_defconfig
index c254ffcfa4..49493ad3b5 100644
--- a/arch/avr32/configs/atngw100_defconfig
+++ b/arch/avr32/configs/atngw100_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21-rc6 3# Linux kernel version: 2.6.22-rc5
4# Thu Apr 12 16:35:07 2007 4# Sat Jun 23 15:40:05 2007
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y 7CONFIG_GENERIC_GPIO=y
@@ -40,6 +40,7 @@ CONFIG_BSD_PROCESS_ACCT_V3=y
40# CONFIG_UTS_NS is not set 40# CONFIG_UTS_NS is not set
41# CONFIG_AUDIT is not set 41# CONFIG_AUDIT is not set
42# CONFIG_IKCONFIG is not set 42# CONFIG_IKCONFIG is not set
43CONFIG_LOG_BUF_SHIFT=14
43CONFIG_SYSFS_DEPRECATED=y 44CONFIG_SYSFS_DEPRECATED=y
44# CONFIG_RELAY is not set 45# CONFIG_RELAY is not set
45CONFIG_BLK_DEV_INITRD=y 46CONFIG_BLK_DEV_INITRD=y
@@ -57,14 +58,20 @@ CONFIG_BUG=y
57CONFIG_ELF_CORE=y 58CONFIG_ELF_CORE=y
58# CONFIG_BASE_FULL is not set 59# CONFIG_BASE_FULL is not set
59CONFIG_FUTEX=y 60CONFIG_FUTEX=y
61CONFIG_ANON_INODES=y
60CONFIG_EPOLL=y 62CONFIG_EPOLL=y
63CONFIG_SIGNALFD=y
64CONFIG_TIMERFD=y
65CONFIG_EVENTFD=y
61CONFIG_SHMEM=y 66CONFIG_SHMEM=y
62CONFIG_SLAB=y
63CONFIG_VM_EVENT_COUNTERS=y 67CONFIG_VM_EVENT_COUNTERS=y
68# CONFIG_SLUB_DEBUG is not set
69# CONFIG_SLAB is not set
70CONFIG_SLUB=y
71# CONFIG_SLOB is not set
64CONFIG_RT_MUTEXES=y 72CONFIG_RT_MUTEXES=y
65# CONFIG_TINY_SHMEM is not set 73# CONFIG_TINY_SHMEM is not set
66CONFIG_BASE_SMALL=1 74CONFIG_BASE_SMALL=1
67# CONFIG_SLOB is not set
68 75
69# 76#
70# Loadable module support 77# Loadable module support
@@ -148,6 +155,7 @@ CONFIG_CMDLINE=""
148# 155#
149# Bus options 156# Bus options
150# 157#
158# CONFIG_ARCH_SUPPORTS_MSI is not set
151 159
152# 160#
153# PCCARD (PCMCIA/CardBus) support 161# PCCARD (PCMCIA/CardBus) support
@@ -168,7 +176,6 @@ CONFIG_NET=y
168# 176#
169# Networking options 177# Networking options
170# 178#
171# CONFIG_NETDEBUG is not set
172CONFIG_PACKET=y 179CONFIG_PACKET=y
173CONFIG_PACKET_MMAP=y 180CONFIG_PACKET_MMAP=y
174CONFIG_UNIX=y 181CONFIG_UNIX=y
@@ -212,14 +219,11 @@ CONFIG_INET_TCP_DIAG=y
212CONFIG_TCP_CONG_CUBIC=y 219CONFIG_TCP_CONG_CUBIC=y
213CONFIG_DEFAULT_TCP_CONG="cubic" 220CONFIG_DEFAULT_TCP_CONG="cubic"
214# CONFIG_TCP_MD5SIG is not set 221# CONFIG_TCP_MD5SIG is not set
215
216#
217# IP: Virtual Server Configuration
218#
219# CONFIG_IP_VS is not set 222# CONFIG_IP_VS is not set
220CONFIG_IPV6=y 223CONFIG_IPV6=y
221# CONFIG_IPV6_PRIVACY is not set 224# CONFIG_IPV6_PRIVACY is not set
222# CONFIG_IPV6_ROUTER_PREF is not set 225# CONFIG_IPV6_ROUTER_PREF is not set
226# CONFIG_IPV6_OPTIMISTIC_DAD is not set
223CONFIG_INET6_AH=y 227CONFIG_INET6_AH=y
224CONFIG_INET6_ESP=y 228CONFIG_INET6_ESP=y
225CONFIG_INET6_IPCOMP=y 229CONFIG_INET6_IPCOMP=y
@@ -242,8 +246,6 @@ CONFIG_NETFILTER=y
242# 246#
243# CONFIG_NETFILTER_NETLINK is not set 247# CONFIG_NETFILTER_NETLINK is not set
244CONFIG_NF_CONNTRACK_ENABLED=m 248CONFIG_NF_CONNTRACK_ENABLED=m
245CONFIG_NF_CONNTRACK_SUPPORT=y
246# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
247CONFIG_NF_CONNTRACK=m 249CONFIG_NF_CONNTRACK=m
248CONFIG_NF_CT_ACCT=y 250CONFIG_NF_CT_ACCT=y
249CONFIG_NF_CONNTRACK_MARK=y 251CONFIG_NF_CONNTRACK_MARK=y
@@ -357,20 +359,8 @@ CONFIG_IP6_NF_TARGET_REJECT=m
357CONFIG_IP6_NF_MANGLE=m 359CONFIG_IP6_NF_MANGLE=m
358CONFIG_IP6_NF_TARGET_HL=m 360CONFIG_IP6_NF_TARGET_HL=m
359CONFIG_IP6_NF_RAW=m 361CONFIG_IP6_NF_RAW=m
360
361#
362# DCCP Configuration (EXPERIMENTAL)
363#
364# CONFIG_IP_DCCP is not set 362# CONFIG_IP_DCCP is not set
365
366#
367# SCTP Configuration (EXPERIMENTAL)
368#
369# CONFIG_IP_SCTP is not set 363# CONFIG_IP_SCTP is not set
370
371#
372# TIPC Configuration (EXPERIMENTAL)
373#
374# CONFIG_TIPC is not set 364# CONFIG_TIPC is not set
375# CONFIG_ATM is not set 365# CONFIG_ATM is not set
376# CONFIG_BRIDGE is not set 366# CONFIG_BRIDGE is not set
@@ -397,7 +387,16 @@ CONFIG_NET_CLS_ROUTE=y
397# CONFIG_HAMRADIO is not set 387# CONFIG_HAMRADIO is not set
398# CONFIG_IRDA is not set 388# CONFIG_IRDA is not set
399# CONFIG_BT is not set 389# CONFIG_BT is not set
390# CONFIG_AF_RXRPC is not set
391
392#
393# Wireless
394#
395# CONFIG_CFG80211 is not set
396# CONFIG_WIRELESS_EXT is not set
397# CONFIG_MAC80211 is not set
400# CONFIG_IEEE80211 is not set 398# CONFIG_IEEE80211 is not set
399# CONFIG_RFKILL is not set
401 400
402# 401#
403# Device Drivers 402# Device Drivers
@@ -417,10 +416,6 @@ CONFIG_STANDALONE=y
417# Connector - unified userspace <-> kernelspace linker 416# Connector - unified userspace <-> kernelspace linker
418# 417#
419# CONFIG_CONNECTOR is not set 418# CONFIG_CONNECTOR is not set
420
421#
422# Memory Technology Devices (MTD)
423#
424CONFIG_MTD=y 419CONFIG_MTD=y
425# CONFIG_MTD_DEBUG is not set 420# CONFIG_MTD_DEBUG is not set
426# CONFIG_MTD_CONCAT is not set 421# CONFIG_MTD_CONCAT is not set
@@ -464,7 +459,6 @@ CONFIG_MTD_CFI_UTIL=y
464# CONFIG_MTD_RAM is not set 459# CONFIG_MTD_RAM is not set
465# CONFIG_MTD_ROM is not set 460# CONFIG_MTD_ROM is not set
466# CONFIG_MTD_ABSENT is not set 461# CONFIG_MTD_ABSENT is not set
467# CONFIG_MTD_OBSOLETE_CHIPS is not set
468 462
469# 463#
470# Mapping drivers for chip access 464# Mapping drivers for chip access
@@ -492,16 +486,13 @@ CONFIG_MTD_DATAFLASH=y
492# CONFIG_MTD_DOC2000 is not set 486# CONFIG_MTD_DOC2000 is not set
493# CONFIG_MTD_DOC2001 is not set 487# CONFIG_MTD_DOC2001 is not set
494# CONFIG_MTD_DOC2001PLUS is not set 488# CONFIG_MTD_DOC2001PLUS is not set
495
496#
497# NAND Flash Device Drivers
498#
499# CONFIG_MTD_NAND is not set 489# CONFIG_MTD_NAND is not set
490# CONFIG_MTD_ONENAND is not set
500 491
501# 492#
502# OneNAND Flash Device Drivers 493# UBI - Unsorted block images
503# 494#
504# CONFIG_MTD_ONENAND is not set 495# CONFIG_MTD_UBI is not set
505 496
506# 497#
507# Parallel port support 498# Parallel port support
@@ -530,10 +521,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
530# 521#
531# Misc devices 522# Misc devices
532# 523#
533 524# CONFIG_BLINK is not set
534#
535# ATA/ATAPI/MFM/RLL support
536#
537# CONFIG_IDE is not set 525# CONFIG_IDE is not set
538 526
539# 527#
@@ -542,10 +530,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
542# CONFIG_RAID_ATTRS is not set 530# CONFIG_RAID_ATTRS is not set
543# CONFIG_SCSI is not set 531# CONFIG_SCSI is not set
544# CONFIG_SCSI_NETLINK is not set 532# CONFIG_SCSI_NETLINK is not set
545
546#
547# Serial ATA (prod) and Parallel ATA (experimental) drivers
548#
549# CONFIG_ATA is not set 533# CONFIG_ATA is not set
550 534
551# 535#
@@ -554,19 +538,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
554# CONFIG_MD is not set 538# CONFIG_MD is not set
555 539
556# 540#
557# Fusion MPT device support
558#
559# CONFIG_FUSION is not set
560
561#
562# IEEE 1394 (FireWire) support
563#
564
565#
566# I2O device support
567#
568
569#
570# Network device support 541# Network device support
571# 542#
572CONFIG_NETDEVICES=y 543CONFIG_NETDEVICES=y
@@ -574,10 +545,6 @@ CONFIG_NETDEVICES=y
574# CONFIG_BONDING is not set 545# CONFIG_BONDING is not set
575# CONFIG_EQUALIZER is not set 546# CONFIG_EQUALIZER is not set
576CONFIG_TUN=m 547CONFIG_TUN=m
577
578#
579# PHY device support
580#
581# CONFIG_PHYLIB is not set 548# CONFIG_PHYLIB is not set
582 549
583# 550#
@@ -586,27 +553,14 @@ CONFIG_TUN=m
586CONFIG_NET_ETHERNET=y 553CONFIG_NET_ETHERNET=y
587CONFIG_MII=y 554CONFIG_MII=y
588CONFIG_MACB=y 555CONFIG_MACB=y
556# CONFIG_NETDEV_1000 is not set
557# CONFIG_NETDEV_10000 is not set
589 558
590# 559#
591# Ethernet (1000 Mbit) 560# Wireless LAN
592#
593
594#
595# Ethernet (10000 Mbit)
596#
597
598#
599# Token Ring devices
600#
601
602#
603# Wireless LAN (non-hamradio)
604#
605# CONFIG_NET_RADIO is not set
606
607#
608# Wan interfaces
609# 561#
562# CONFIG_WLAN_PRE80211 is not set
563# CONFIG_WLAN_80211 is not set
610# CONFIG_WAN is not set 564# CONFIG_WAN is not set
611CONFIG_PPP=m 565CONFIG_PPP=m
612# CONFIG_PPP_MULTILINK is not set 566# CONFIG_PPP_MULTILINK is not set
@@ -671,15 +625,10 @@ CONFIG_UNIX98_PTYS=y
671# IPMI 625# IPMI
672# 626#
673# CONFIG_IPMI_HANDLER is not set 627# CONFIG_IPMI_HANDLER is not set
674
675#
676# Watchdog Cards
677#
678# CONFIG_WATCHDOG is not set 628# CONFIG_WATCHDOG is not set
679# CONFIG_HW_RANDOM is not set 629# CONFIG_HW_RANDOM is not set
680# CONFIG_RTC is not set 630# CONFIG_RTC is not set
681# CONFIG_GEN_RTC is not set 631# CONFIG_GEN_RTC is not set
682# CONFIG_DTLK is not set
683# CONFIG_R3964 is not set 632# CONFIG_R3964 is not set
684# CONFIG_RAW_DRIVER is not set 633# CONFIG_RAW_DRIVER is not set
685 634
@@ -687,10 +636,6 @@ CONFIG_UNIX98_PTYS=y
687# TPM devices 636# TPM devices
688# 637#
689# CONFIG_TCG_TPM is not set 638# CONFIG_TCG_TPM is not set
690
691#
692# I2C support
693#
694# CONFIG_I2C is not set 639# CONFIG_I2C is not set
695 640
696# 641#
@@ -710,17 +655,13 @@ CONFIG_SPI_ATMEL=y
710# SPI Protocol Masters 655# SPI Protocol Masters
711# 656#
712# CONFIG_SPI_AT25 is not set 657# CONFIG_SPI_AT25 is not set
658# CONFIG_SPI_SPIDEV is not set
713 659
714# 660#
715# Dallas's 1-wire bus 661# Dallas's 1-wire bus
716# 662#
717# CONFIG_W1 is not set 663# CONFIG_W1 is not set
718
719#
720# Hardware Monitoring support
721#
722# CONFIG_HWMON is not set 664# CONFIG_HWMON is not set
723# CONFIG_HWMON_VID is not set
724 665
725# 666#
726# Multifunction device drivers 667# Multifunction device drivers
@@ -731,16 +672,19 @@ CONFIG_SPI_ATMEL=y
731# Multimedia devices 672# Multimedia devices
732# 673#
733# CONFIG_VIDEO_DEV is not set 674# CONFIG_VIDEO_DEV is not set
675# CONFIG_DVB_CORE is not set
676# CONFIG_DAB is not set
734 677
735# 678#
736# Digital Video Broadcasting Devices 679# Graphics support
737# 680#
738# CONFIG_DVB is not set 681# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
739 682
740# 683#
741# Graphics support 684# Display device support
742# 685#
743# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 686# CONFIG_DISPLAY_SUPPORT is not set
687# CONFIG_VGASTATE is not set
744# CONFIG_FB is not set 688# CONFIG_FB is not set
745 689
746# 690#
@@ -763,10 +707,6 @@ CONFIG_SPI_ATMEL=y
763# USB Gadget Support 707# USB Gadget Support
764# 708#
765# CONFIG_USB_GADGET is not set 709# CONFIG_USB_GADGET is not set
766
767#
768# MMC/SD Card support
769#
770# CONFIG_MMC is not set 710# CONFIG_MMC is not set
771 711
772# 712#
@@ -809,14 +749,6 @@ CONFIG_SPI_ATMEL=y
809# 749#
810 750
811# 751#
812# Auxiliary Display support
813#
814
815#
816# Virtualization
817#
818
819#
820# File systems 752# File systems
821# 753#
822CONFIG_EXT2_FS=y 754CONFIG_EXT2_FS=y
@@ -911,6 +843,7 @@ CONFIG_LOCKD=y
911CONFIG_LOCKD_V4=y 843CONFIG_LOCKD_V4=y
912CONFIG_NFS_COMMON=y 844CONFIG_NFS_COMMON=y
913CONFIG_SUNRPC=y 845CONFIG_SUNRPC=y
846# CONFIG_SUNRPC_BIND34 is not set
914# CONFIG_RPCSEC_GSS_KRB5 is not set 847# CONFIG_RPCSEC_GSS_KRB5 is not set
915# CONFIG_RPCSEC_GSS_SPKM3 is not set 848# CONFIG_RPCSEC_GSS_SPKM3 is not set
916CONFIG_SMB_FS=m 849CONFIG_SMB_FS=m
@@ -993,11 +926,9 @@ CONFIG_MAGIC_SYSRQ=y
993# CONFIG_HEADERS_CHECK is not set 926# CONFIG_HEADERS_CHECK is not set
994CONFIG_DEBUG_KERNEL=y 927CONFIG_DEBUG_KERNEL=y
995# CONFIG_DEBUG_SHIRQ is not set 928# CONFIG_DEBUG_SHIRQ is not set
996CONFIG_LOG_BUF_SHIFT=14
997CONFIG_DETECT_SOFTLOCKUP=y 929CONFIG_DETECT_SOFTLOCKUP=y
998# CONFIG_SCHEDSTATS is not set 930# CONFIG_SCHEDSTATS is not set
999# CONFIG_TIMER_STATS is not set 931# CONFIG_TIMER_STATS is not set
1000# CONFIG_DEBUG_SLAB is not set
1001# CONFIG_DEBUG_RT_MUTEXES is not set 932# CONFIG_DEBUG_RT_MUTEXES is not set
1002# CONFIG_RT_MUTEX_TESTER is not set 933# CONFIG_RT_MUTEX_TESTER is not set
1003# CONFIG_DEBUG_SPINLOCK is not set 934# CONFIG_DEBUG_SPINLOCK is not set
@@ -1044,6 +975,7 @@ CONFIG_CRYPTO_ECB=m
1044CONFIG_CRYPTO_CBC=y 975CONFIG_CRYPTO_CBC=y
1045CONFIG_CRYPTO_PCBC=m 976CONFIG_CRYPTO_PCBC=m
1046# CONFIG_CRYPTO_LRW is not set 977# CONFIG_CRYPTO_LRW is not set
978# CONFIG_CRYPTO_CRYPTD is not set
1047CONFIG_CRYPTO_DES=y 979CONFIG_CRYPTO_DES=y
1048# CONFIG_CRYPTO_FCRYPT is not set 980# CONFIG_CRYPTO_FCRYPT is not set
1049# CONFIG_CRYPTO_BLOWFISH is not set 981# CONFIG_CRYPTO_BLOWFISH is not set
@@ -1072,6 +1004,7 @@ CONFIG_CRYPTO_DEFLATE=y
1072CONFIG_BITREVERSE=y 1004CONFIG_BITREVERSE=y
1073CONFIG_CRC_CCITT=m 1005CONFIG_CRC_CCITT=m
1074# CONFIG_CRC16 is not set 1006# CONFIG_CRC16 is not set
1007# CONFIG_CRC_ITU_T is not set
1075CONFIG_CRC32=y 1008CONFIG_CRC32=y
1076# CONFIG_LIBCRC32C is not set 1009# CONFIG_LIBCRC32C is not set
1077CONFIG_ZLIB_INFLATE=y 1010CONFIG_ZLIB_INFLATE=y
@@ -1083,3 +1016,4 @@ CONFIG_TEXTSEARCH_FSM=m
1083CONFIG_PLIST=y 1016CONFIG_PLIST=y
1084CONFIG_HAS_IOMEM=y 1017CONFIG_HAS_IOMEM=y
1085CONFIG_HAS_IOPORT=y 1018CONFIG_HAS_IOPORT=y
1019CONFIG_HAS_DMA=y
diff --git a/arch/avr32/configs/atstk1002_defconfig b/arch/avr32/configs/atstk1002_defconfig
index 77dace9d54..3b977fdbaa 100644
--- a/arch/avr32/configs/atstk1002_defconfig
+++ b/arch/avr32/configs/atstk1002_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-rc6 3# Linux kernel version: 2.6.22-rc5
4# Fri Jan 26 13:12:59 2007 4# Sat Jun 23 15:32:08 2007
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y
7CONFIG_GENERIC_HARDIRQS=y 8CONFIG_GENERIC_HARDIRQS=y
8CONFIG_HARDIRQS_SW_RESEND=y 9CONFIG_HARDIRQS_SW_RESEND=y
9CONFIG_GENERIC_IRQ_PROBE=y 10CONFIG_GENERIC_IRQ_PROBE=y
@@ -13,6 +14,7 @@ CONFIG_GENERIC_TIME=y
13# CONFIG_ARCH_HAS_ILOG2_U64 is not set 14# CONFIG_ARCH_HAS_ILOG2_U64 is not set
14CONFIG_GENERIC_HWEIGHT=y 15CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 16CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_BUG=y
16CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 18CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
17 19
18# 20#
@@ -30,19 +32,22 @@ CONFIG_LOCALVERSION=""
30CONFIG_SWAP=y 32CONFIG_SWAP=y
31CONFIG_SYSVIPC=y 33CONFIG_SYSVIPC=y
32# CONFIG_IPC_NS is not set 34# CONFIG_IPC_NS is not set
35CONFIG_SYSVIPC_SYSCTL=y
33CONFIG_POSIX_MQUEUE=y 36CONFIG_POSIX_MQUEUE=y
34CONFIG_BSD_PROCESS_ACCT=y 37CONFIG_BSD_PROCESS_ACCT=y
35CONFIG_BSD_PROCESS_ACCT_V3=y 38CONFIG_BSD_PROCESS_ACCT_V3=y
36CONFIG_TASKSTATS=y 39CONFIG_TASKSTATS=y
37CONFIG_TASK_DELAY_ACCT=y 40CONFIG_TASK_DELAY_ACCT=y
41# CONFIG_TASK_XACCT is not set
38# CONFIG_UTS_NS is not set 42# CONFIG_UTS_NS is not set
39CONFIG_AUDIT=y 43CONFIG_AUDIT=y
40# CONFIG_IKCONFIG is not set 44# CONFIG_IKCONFIG is not set
45CONFIG_LOG_BUF_SHIFT=14
41CONFIG_SYSFS_DEPRECATED=y 46CONFIG_SYSFS_DEPRECATED=y
42CONFIG_RELAY=y 47CONFIG_RELAY=y
48CONFIG_BLK_DEV_INITRD=y
43CONFIG_INITRAMFS_SOURCE="" 49CONFIG_INITRAMFS_SOURCE=""
44CONFIG_CC_OPTIMIZE_FOR_SIZE=y 50CONFIG_CC_OPTIMIZE_FOR_SIZE=y
45# CONFIG_TASK_XACCT is not set
46CONFIG_SYSCTL=y 51CONFIG_SYSCTL=y
47CONFIG_EMBEDDED=y 52CONFIG_EMBEDDED=y
48# CONFIG_SYSCTL_SYSCALL is not set 53# CONFIG_SYSCTL_SYSCALL is not set
@@ -55,14 +60,20 @@ CONFIG_BUG=y
55CONFIG_ELF_CORE=y 60CONFIG_ELF_CORE=y
56# CONFIG_BASE_FULL is not set 61# CONFIG_BASE_FULL is not set
57CONFIG_FUTEX=y 62CONFIG_FUTEX=y
63CONFIG_ANON_INODES=y
58CONFIG_EPOLL=y 64CONFIG_EPOLL=y
65CONFIG_SIGNALFD=y
66CONFIG_TIMERFD=y
67CONFIG_EVENTFD=y
59CONFIG_SHMEM=y 68CONFIG_SHMEM=y
60CONFIG_SLAB=y
61CONFIG_VM_EVENT_COUNTERS=y 69CONFIG_VM_EVENT_COUNTERS=y
70# CONFIG_SLUB_DEBUG is not set
71# CONFIG_SLAB is not set
72CONFIG_SLUB=y
73# CONFIG_SLOB is not set
62CONFIG_RT_MUTEXES=y 74CONFIG_RT_MUTEXES=y
63# CONFIG_TINY_SHMEM is not set 75# CONFIG_TINY_SHMEM is not set
64CONFIG_BASE_SMALL=1 76CONFIG_BASE_SMALL=1
65# CONFIG_SLOB is not set
66 77
67# 78#
68# Loadable module support 79# Loadable module support
@@ -105,7 +116,15 @@ CONFIG_PLATFORM_AT32AP=y
105CONFIG_CPU_AT32AP7000=y 116CONFIG_CPU_AT32AP7000=y
106CONFIG_BOARD_ATSTK1002=y 117CONFIG_BOARD_ATSTK1002=y
107CONFIG_BOARD_ATSTK1000=y 118CONFIG_BOARD_ATSTK1000=y
119# CONFIG_BOARD_ATNGW100 is not set
108CONFIG_LOADER_U_BOOT=y 120CONFIG_LOADER_U_BOOT=y
121
122#
123# Atmel AVR32 AP options
124#
125# CONFIG_AP7000_32_BIT_SMC is not set
126CONFIG_AP7000_16_BIT_SMC=y
127# CONFIG_AP7000_8_BIT_SMC is not set
109CONFIG_LOAD_ADDRESS=0x10000000 128CONFIG_LOAD_ADDRESS=0x10000000
110CONFIG_ENTRY_ADDRESS=0x90000000 129CONFIG_ENTRY_ADDRESS=0x90000000
111CONFIG_PHYS_OFFSET=0x10000000 130CONFIG_PHYS_OFFSET=0x10000000
@@ -127,6 +146,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
127# CONFIG_SPARSEMEM_STATIC is not set 146# CONFIG_SPARSEMEM_STATIC is not set
128CONFIG_SPLIT_PTLOCK_CPUS=4 147CONFIG_SPLIT_PTLOCK_CPUS=4
129# CONFIG_RESOURCES_64BIT is not set 148# CONFIG_RESOURCES_64BIT is not set
149CONFIG_ZONE_DMA_FLAG=0
130# CONFIG_OWNERSHIP_TRACE is not set 150# CONFIG_OWNERSHIP_TRACE is not set
131# CONFIG_HZ_100 is not set 151# CONFIG_HZ_100 is not set
132CONFIG_HZ_250=y 152CONFIG_HZ_250=y
@@ -138,6 +158,7 @@ CONFIG_CMDLINE=""
138# 158#
139# Bus options 159# Bus options
140# 160#
161# CONFIG_ARCH_SUPPORTS_MSI is not set
141 162
142# 163#
143# PCCARD (PCMCIA/CardBus) support 164# PCCARD (PCMCIA/CardBus) support
@@ -158,7 +179,6 @@ CONFIG_NET=y
158# 179#
159# Networking options 180# Networking options
160# 181#
161# CONFIG_NETDEBUG is not set
162CONFIG_PACKET=y 182CONFIG_PACKET=y
163CONFIG_PACKET_MMAP=y 183CONFIG_PACKET_MMAP=y
164CONFIG_UNIX=y 184CONFIG_UNIX=y
@@ -194,20 +214,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
194# CONFIG_INET6_TUNNEL is not set 214# CONFIG_INET6_TUNNEL is not set
195# CONFIG_NETWORK_SECMARK is not set 215# CONFIG_NETWORK_SECMARK is not set
196# CONFIG_NETFILTER is not set 216# CONFIG_NETFILTER is not set
197
198#
199# DCCP Configuration (EXPERIMENTAL)
200#
201# CONFIG_IP_DCCP is not set 217# CONFIG_IP_DCCP is not set
202
203#
204# SCTP Configuration (EXPERIMENTAL)
205#
206# CONFIG_IP_SCTP is not set 218# CONFIG_IP_SCTP is not set
207
208#
209# TIPC Configuration (EXPERIMENTAL)
210#
211# CONFIG_TIPC is not set 219# CONFIG_TIPC is not set
212# CONFIG_ATM is not set 220# CONFIG_ATM is not set
213# CONFIG_BRIDGE is not set 221# CONFIG_BRIDGE is not set
@@ -233,7 +241,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
233# CONFIG_HAMRADIO is not set 241# CONFIG_HAMRADIO is not set
234# CONFIG_IRDA is not set 242# CONFIG_IRDA is not set
235# CONFIG_BT is not set 243# CONFIG_BT is not set
244# CONFIG_AF_RXRPC is not set
245
246#
247# Wireless
248#
249# CONFIG_CFG80211 is not set
250# CONFIG_WIRELESS_EXT is not set
251# CONFIG_MAC80211 is not set
236# CONFIG_IEEE80211 is not set 252# CONFIG_IEEE80211 is not set
253# CONFIG_RFKILL is not set
237 254
238# 255#
239# Device Drivers 256# Device Drivers
@@ -246,16 +263,13 @@ CONFIG_STANDALONE=y
246# CONFIG_PREVENT_FIRMWARE_BUILD is not set 263# CONFIG_PREVENT_FIRMWARE_BUILD is not set
247# CONFIG_FW_LOADER is not set 264# CONFIG_FW_LOADER is not set
248# CONFIG_DEBUG_DRIVER is not set 265# CONFIG_DEBUG_DRIVER is not set
266# CONFIG_DEBUG_DEVRES is not set
249# CONFIG_SYS_HYPERVISOR is not set 267# CONFIG_SYS_HYPERVISOR is not set
250 268
251# 269#
252# Connector - unified userspace <-> kernelspace linker 270# Connector - unified userspace <-> kernelspace linker
253# 271#
254# CONFIG_CONNECTOR is not set 272# CONFIG_CONNECTOR is not set
255
256#
257# Memory Technology Devices (MTD)
258#
259CONFIG_MTD=y 273CONFIG_MTD=y
260# CONFIG_MTD_DEBUG is not set 274# CONFIG_MTD_DEBUG is not set
261# CONFIG_MTD_CONCAT is not set 275# CONFIG_MTD_CONCAT is not set
@@ -299,7 +313,6 @@ CONFIG_MTD_CFI_UTIL=y
299# CONFIG_MTD_RAM is not set 313# CONFIG_MTD_RAM is not set
300# CONFIG_MTD_ROM is not set 314# CONFIG_MTD_ROM is not set
301# CONFIG_MTD_ABSENT is not set 315# CONFIG_MTD_ABSENT is not set
302# CONFIG_MTD_OBSOLETE_CHIPS is not set
303 316
304# 317#
305# Mapping drivers for chip access 318# Mapping drivers for chip access
@@ -325,16 +338,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
325# CONFIG_MTD_DOC2000 is not set 338# CONFIG_MTD_DOC2000 is not set
326# CONFIG_MTD_DOC2001 is not set 339# CONFIG_MTD_DOC2001 is not set
327# CONFIG_MTD_DOC2001PLUS is not set 340# CONFIG_MTD_DOC2001PLUS is not set
328
329#
330# NAND Flash Device Drivers
331#
332# CONFIG_MTD_NAND is not set 341# CONFIG_MTD_NAND is not set
342# CONFIG_MTD_ONENAND is not set
333 343
334# 344#
335# OneNAND Flash Device Drivers 345# UBI - Unsorted block images
336# 346#
337# CONFIG_MTD_ONENAND is not set 347# CONFIG_MTD_UBI is not set
338 348
339# 349#
340# Parallel port support 350# Parallel port support
@@ -344,6 +354,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
344# 354#
345# Plug and Play support 355# Plug and Play support
346# 356#
357# CONFIG_PNPACPI is not set
347 358
348# 359#
349# Block devices 360# Block devices
@@ -356,18 +367,13 @@ CONFIG_BLK_DEV_RAM=m
356CONFIG_BLK_DEV_RAM_COUNT=16 367CONFIG_BLK_DEV_RAM_COUNT=16
357CONFIG_BLK_DEV_RAM_SIZE=4096 368CONFIG_BLK_DEV_RAM_SIZE=4096
358CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 369CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
359CONFIG_BLK_DEV_INITRD=y
360# CONFIG_CDROM_PKTCDVD is not set 370# CONFIG_CDROM_PKTCDVD is not set
361# CONFIG_ATA_OVER_ETH is not set 371# CONFIG_ATA_OVER_ETH is not set
362 372
363# 373#
364# Misc devices 374# Misc devices
365# 375#
366# CONFIG_TIFM_CORE is not set 376# CONFIG_BLINK is not set
367
368#
369# ATA/ATAPI/MFM/RLL support
370#
371# CONFIG_IDE is not set 377# CONFIG_IDE is not set
372 378
373# 379#
@@ -376,10 +382,6 @@ CONFIG_BLK_DEV_INITRD=y
376# CONFIG_RAID_ATTRS is not set 382# CONFIG_RAID_ATTRS is not set
377# CONFIG_SCSI is not set 383# CONFIG_SCSI is not set
378# CONFIG_SCSI_NETLINK is not set 384# CONFIG_SCSI_NETLINK is not set
379
380#
381# Serial ATA (prod) and Parallel ATA (experimental) drivers
382#
383# CONFIG_ATA is not set 385# CONFIG_ATA is not set
384 386
385# 387#
@@ -388,19 +390,6 @@ CONFIG_BLK_DEV_INITRD=y
388# CONFIG_MD is not set 390# CONFIG_MD is not set
389 391
390# 392#
391# Fusion MPT device support
392#
393# CONFIG_FUSION is not set
394
395#
396# IEEE 1394 (FireWire) support
397#
398
399#
400# I2O device support
401#
402
403#
404# Network device support 393# Network device support
405# 394#
406CONFIG_NETDEVICES=y 395CONFIG_NETDEVICES=y
@@ -408,10 +397,6 @@ CONFIG_DUMMY=y
408# CONFIG_BONDING is not set 397# CONFIG_BONDING is not set
409# CONFIG_EQUALIZER is not set 398# CONFIG_EQUALIZER is not set
410CONFIG_TUN=m 399CONFIG_TUN=m
411
412#
413# PHY device support
414#
415# CONFIG_PHYLIB is not set 400# CONFIG_PHYLIB is not set
416 401
417# 402#
@@ -420,27 +405,14 @@ CONFIG_TUN=m
420CONFIG_NET_ETHERNET=y 405CONFIG_NET_ETHERNET=y
421CONFIG_MII=y 406CONFIG_MII=y
422CONFIG_MACB=y 407CONFIG_MACB=y
408# CONFIG_NETDEV_1000 is not set
409# CONFIG_NETDEV_10000 is not set
423 410
424# 411#
425# Ethernet (1000 Mbit) 412# Wireless LAN
426#
427
428#
429# Ethernet (10000 Mbit)
430#
431
432#
433# Token Ring devices
434#
435
436#
437# Wireless LAN (non-hamradio)
438#
439# CONFIG_NET_RADIO is not set
440
441#
442# Wan interfaces
443# 413#
414# CONFIG_WLAN_PRE80211 is not set
415# CONFIG_WLAN_80211 is not set
444# CONFIG_WAN is not set 416# CONFIG_WAN is not set
445CONFIG_PPP=m 417CONFIG_PPP=m
446# CONFIG_PPP_MULTILINK is not set 418# CONFIG_PPP_MULTILINK is not set
@@ -505,15 +477,10 @@ CONFIG_UNIX98_PTYS=y
505# IPMI 477# IPMI
506# 478#
507# CONFIG_IPMI_HANDLER is not set 479# CONFIG_IPMI_HANDLER is not set
508
509#
510# Watchdog Cards
511#
512# CONFIG_WATCHDOG is not set 480# CONFIG_WATCHDOG is not set
513# CONFIG_HW_RANDOM is not set 481# CONFIG_HW_RANDOM is not set
514# CONFIG_RTC is not set 482# CONFIG_RTC is not set
515# CONFIG_GEN_RTC is not set 483# CONFIG_GEN_RTC is not set
516# CONFIG_DTLK is not set
517# CONFIG_R3964 is not set 484# CONFIG_R3964 is not set
518# CONFIG_RAW_DRIVER is not set 485# CONFIG_RAW_DRIVER is not set
519 486
@@ -521,10 +488,6 @@ CONFIG_UNIX98_PTYS=y
521# TPM devices 488# TPM devices
522# 489#
523# CONFIG_TCG_TPM is not set 490# CONFIG_TCG_TPM is not set
524
525#
526# I2C support
527#
528# CONFIG_I2C is not set 491# CONFIG_I2C is not set
529 492
530# 493#
@@ -537,29 +500,31 @@ CONFIG_UNIX98_PTYS=y
537# Dallas's 1-wire bus 500# Dallas's 1-wire bus
538# 501#
539# CONFIG_W1 is not set 502# CONFIG_W1 is not set
503# CONFIG_HWMON is not set
540 504
541# 505#
542# Hardware Monitoring support 506# Multifunction device drivers
543# 507#
544# CONFIG_HWMON is not set 508# CONFIG_MFD_SM501 is not set
545# CONFIG_HWMON_VID is not set
546 509
547# 510#
548# Multimedia devices 511# Multimedia devices
549# 512#
550# CONFIG_VIDEO_DEV is not set 513# CONFIG_VIDEO_DEV is not set
514# CONFIG_DVB_CORE is not set
515# CONFIG_DAB is not set
551 516
552# 517#
553# Digital Video Broadcasting Devices 518# Graphics support
554# 519#
555# CONFIG_DVB is not set 520# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
556 521
557# 522#
558# Graphics support 523# Display device support
559# 524#
560# CONFIG_FIRMWARE_EDID is not set 525# CONFIG_DISPLAY_SUPPORT is not set
526# CONFIG_VGASTATE is not set
561# CONFIG_FB is not set 527# CONFIG_FB is not set
562# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
563 528
564# 529#
565# Sound 530# Sound
@@ -581,10 +546,6 @@ CONFIG_UNIX98_PTYS=y
581# USB Gadget Support 546# USB Gadget Support
582# 547#
583# CONFIG_USB_GADGET is not set 548# CONFIG_USB_GADGET is not set
584
585#
586# MMC/SD Card support
587#
588# CONFIG_MMC is not set 549# CONFIG_MMC is not set
589 550
590# 551#
@@ -627,10 +588,6 @@ CONFIG_UNIX98_PTYS=y
627# 588#
628 589
629# 590#
630# Virtualization
631#
632
633#
634# File systems 591# File systems
635# 592#
636CONFIG_EXT2_FS=m 593CONFIG_EXT2_FS=m
@@ -712,8 +669,20 @@ CONFIG_JFFS2_RTIME=y
712# 669#
713# Network File Systems 670# Network File Systems
714# 671#
715# CONFIG_NFS_FS is not set 672CONFIG_NFS_FS=y
673CONFIG_NFS_V3=y
674# CONFIG_NFS_V3_ACL is not set
675# CONFIG_NFS_V4 is not set
676# CONFIG_NFS_DIRECTIO is not set
716# CONFIG_NFSD is not set 677# CONFIG_NFSD is not set
678CONFIG_ROOT_NFS=y
679CONFIG_LOCKD=y
680CONFIG_LOCKD_V4=y
681CONFIG_NFS_COMMON=y
682CONFIG_SUNRPC=y
683# CONFIG_SUNRPC_BIND34 is not set
684# CONFIG_RPCSEC_GSS_KRB5 is not set
685# CONFIG_RPCSEC_GSS_SPKM3 is not set
717# CONFIG_SMB_FS is not set 686# CONFIG_SMB_FS is not set
718# CONFIG_CIFS is not set 687# CONFIG_CIFS is not set
719# CONFIG_NCP_FS is not set 688# CONFIG_NCP_FS is not set
@@ -787,15 +756,14 @@ CONFIG_MAGIC_SYSRQ=y
787CONFIG_DEBUG_FS=y 756CONFIG_DEBUG_FS=y
788# CONFIG_HEADERS_CHECK is not set 757# CONFIG_HEADERS_CHECK is not set
789CONFIG_DEBUG_KERNEL=y 758CONFIG_DEBUG_KERNEL=y
790CONFIG_LOG_BUF_SHIFT=14 759# CONFIG_DEBUG_SHIRQ is not set
791CONFIG_DETECT_SOFTLOCKUP=y 760CONFIG_DETECT_SOFTLOCKUP=y
792# CONFIG_SCHEDSTATS is not set 761# CONFIG_SCHEDSTATS is not set
793# CONFIG_DEBUG_SLAB is not set 762# CONFIG_TIMER_STATS is not set
794# CONFIG_DEBUG_RT_MUTEXES is not set 763# CONFIG_DEBUG_RT_MUTEXES is not set
795# CONFIG_RT_MUTEX_TESTER is not set 764# CONFIG_RT_MUTEX_TESTER is not set
796# CONFIG_DEBUG_SPINLOCK is not set 765# CONFIG_DEBUG_SPINLOCK is not set
797# CONFIG_DEBUG_MUTEXES is not set 766# CONFIG_DEBUG_MUTEXES is not set
798# CONFIG_DEBUG_RWSEMS is not set
799# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 767# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
800# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 768# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
801# CONFIG_DEBUG_KOBJECT is not set 769# CONFIG_DEBUG_KOBJECT is not set
@@ -806,6 +774,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
806CONFIG_FRAME_POINTER=y 774CONFIG_FRAME_POINTER=y
807CONFIG_FORCED_INLINING=y 775CONFIG_FORCED_INLINING=y
808# CONFIG_RCU_TORTURE_TEST is not set 776# CONFIG_RCU_TORTURE_TEST is not set
777# CONFIG_FAULT_INJECTION is not set
809# CONFIG_KPROBES is not set 778# CONFIG_KPROBES is not set
810 779
811# 780#
@@ -825,10 +794,13 @@ CONFIG_FORCED_INLINING=y
825CONFIG_BITREVERSE=y 794CONFIG_BITREVERSE=y
826CONFIG_CRC_CCITT=m 795CONFIG_CRC_CCITT=m
827# CONFIG_CRC16 is not set 796# CONFIG_CRC16 is not set
797# CONFIG_CRC_ITU_T is not set
828CONFIG_CRC32=y 798CONFIG_CRC32=y
829# CONFIG_LIBCRC32C is not set 799# CONFIG_LIBCRC32C is not set
830CONFIG_AUDIT_GENERIC=y 800CONFIG_AUDIT_GENERIC=y
831CONFIG_ZLIB_INFLATE=y 801CONFIG_ZLIB_INFLATE=y
832CONFIG_ZLIB_DEFLATE=y 802CONFIG_ZLIB_DEFLATE=y
833CONFIG_PLIST=y 803CONFIG_PLIST=y
834CONFIG_IOMAP_COPY=y 804CONFIG_HAS_IOMEM=y
805CONFIG_HAS_IOPORT=y
806CONFIG_HAS_DMA=y
diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c
index 3c36c2d161..39060cbeb2 100644
--- a/arch/avr32/kernel/ptrace.c
+++ b/arch/avr32/kernel/ptrace.c
@@ -153,7 +153,6 @@ static int ptrace_setregs(struct task_struct *tsk, const void __user *uregs)
153 153
154long arch_ptrace(struct task_struct *child, long request, long addr, long data) 154long arch_ptrace(struct task_struct *child, long request, long addr, long data)
155{ 155{
156 unsigned long tmp;
157 int ret; 156 int ret;
158 157
159 pr_debug("arch_ptrace(%ld, %d, %#lx, %#lx)\n", 158 pr_debug("arch_ptrace(%ld, %d, %#lx, %#lx)\n",
@@ -166,11 +165,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
166 /* Read the word at location addr in the child process */ 165 /* Read the word at location addr in the child process */
167 case PTRACE_PEEKTEXT: 166 case PTRACE_PEEKTEXT:
168 case PTRACE_PEEKDATA: 167 case PTRACE_PEEKDATA:
169 ret = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); 168 ret = generic_ptrace_peekdata(child, addr, data);
170 if (ret == sizeof(tmp))
171 ret = put_user(tmp, (unsigned long __user *)data);
172 else
173 ret = -EIO;
174 break; 169 break;
175 170
176 case PTRACE_PEEKUSR: 171 case PTRACE_PEEKUSR:
@@ -181,11 +176,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
181 /* Write the word in data at location addr */ 176 /* Write the word in data at location addr */
182 case PTRACE_POKETEXT: 177 case PTRACE_POKETEXT:
183 case PTRACE_POKEDATA: 178 case PTRACE_POKEDATA:
184 ret = access_process_vm(child, addr, &data, sizeof(data), 1); 179 ret = generic_ptrace_pokedata(child, addr, data);
185 if (ret == sizeof(data))
186 ret = 0;
187 else
188 ret = -EIO;
189 break; 180 break;
190 181
191 case PTRACE_POKEUSR: 182 case PTRACE_POKEUSR:
diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c
index b279d66acf..d08b0bc6b2 100644
--- a/arch/avr32/kernel/setup.c
+++ b/arch/avr32/kernel/setup.c
@@ -313,7 +313,7 @@ __tagtable(ATAG_MEM, parse_tag_mem);
313 313
314static int __init parse_tag_rdimg(struct tag *tag) 314static int __init parse_tag_rdimg(struct tag *tag)
315{ 315{
316#ifdef CONFIG_INITRD 316#ifdef CONFIG_BLK_DEV_INITRD
317 struct tag_mem_range *mem = &tag->u.mem_range; 317 struct tag_mem_range *mem = &tag->u.mem_range;
318 int ret; 318 int ret;
319 319
@@ -323,7 +323,7 @@ static int __init parse_tag_rdimg(struct tag *tag)
323 return 0; 323 return 0;
324 } 324 }
325 325
326 ret = add_reserved_region(mem->start, mem->start + mem->size - 1, 326 ret = add_reserved_region(mem->addr, mem->addr + mem->size - 1,
327 "initrd"); 327 "initrd");
328 if (ret) { 328 if (ret) {
329 printk(KERN_WARNING 329 printk(KERN_WARNING
diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c
index 86d107511d..9a73ce7eb5 100644
--- a/arch/avr32/kernel/traps.c
+++ b/arch/avr32/kernel/traps.c
@@ -56,6 +56,7 @@ void NORET_TYPE die(const char *str, struct pt_regs *regs, long err)
56 show_regs_log_lvl(regs, KERN_EMERG); 56 show_regs_log_lvl(regs, KERN_EMERG);
57 show_stack_log_lvl(current, regs->sp, regs, KERN_EMERG); 57 show_stack_log_lvl(current, regs->sp, regs, KERN_EMERG);
58 bust_spinlocks(0); 58 bust_spinlocks(0);
59 add_taint(TAINT_DIE);
59 spin_unlock_irq(&die_lock); 60 spin_unlock_irq(&die_lock);
60 61
61 if (in_interrupt()) 62 if (in_interrupt())
@@ -184,7 +185,7 @@ asmlinkage void do_illegal_opcode(unsigned long ecr, struct pt_regs *regs)
184 if (!user_mode(regs) && (ecr == ECR_ILLEGAL_OPCODE)) { 185 if (!user_mode(regs) && (ecr == ECR_ILLEGAL_OPCODE)) {
185 enum bug_trap_type type; 186 enum bug_trap_type type;
186 187
187 type = report_bug(regs->pc); 188 type = report_bug(regs->pc, regs);
188 switch (type) { 189 switch (type) {
189 case BUG_TRAP_TYPE_NONE: 190 case BUG_TRAP_TYPE_NONE:
190 break; 191 break;
diff --git a/arch/avr32/mach-at32ap/Makefile b/arch/avr32/mach-at32ap/Makefile
index f1d395724a..a8b445046e 100644
--- a/arch/avr32/mach-at32ap/Makefile
+++ b/arch/avr32/mach-at32ap/Makefile
@@ -1,3 +1,4 @@
1obj-y += at32ap.o clock.o intc.o extint.o pio.o hsmc.o 1obj-y += at32ap.o clock.o intc.o extint.o pio.o hsmc.o
2obj-$(CONFIG_CPU_AT32AP7000) += at32ap7000.o 2obj-$(CONFIG_CPU_AT32AP7000) += at32ap7000.o
3obj-$(CONFIG_CPU_AT32AP7000) += time-tc.o 3obj-$(CONFIG_CPU_AT32AP7000) += time-tc.o
4obj-$(CONFIG_CPU_FREQ_AT32AP) += cpufreq.o
diff --git a/arch/avr32/mach-at32ap/at32ap.c b/arch/avr32/mach-at32ap/at32ap.c
index 90f207e8e9..7c4987f328 100644
--- a/arch/avr32/mach-at32ap/at32ap.c
+++ b/arch/avr32/mach-at32ap/at32ap.c
@@ -11,41 +11,10 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/platform_device.h> 12#include <linux/platform_device.h>
13 13
14#include <asm/io.h>
15
16#include <asm/arch/init.h> 14#include <asm/arch/init.h>
17#include <asm/arch/sm.h>
18
19struct at32_sm system_manager;
20
21static int __init at32_sm_init(void)
22{
23 struct resource *regs;
24 struct at32_sm *sm = &system_manager;
25 int ret = -ENXIO;
26
27 regs = platform_get_resource(&at32_sm_device, IORESOURCE_MEM, 0);
28 if (!regs)
29 goto fail;
30
31 spin_lock_init(&sm->lock);
32 sm->pdev = &at32_sm_device;
33
34 ret = -ENOMEM;
35 sm->regs = ioremap(regs->start, regs->end - regs->start + 1);
36 if (!sm->regs)
37 goto fail;
38
39 return 0;
40
41fail:
42 printk(KERN_ERR "Failed to initialize System Manager: %d\n", ret);
43 return ret;
44}
45 15
46void __init setup_platform(void) 16void __init setup_platform(void)
47{ 17{
48 at32_sm_init();
49 at32_clock_init(); 18 at32_clock_init();
50 at32_portmux_init(); 19 at32_portmux_init();
51} 20}
diff --git a/arch/avr32/mach-at32ap/at32ap7000.c b/arch/avr32/mach-at32ap/at32ap7000.c
index 1d2bf347a1..64cc5583dd 100644
--- a/arch/avr32/mach-at32ap/at32ap7000.c
+++ b/arch/avr32/mach-at32ap/at32ap7000.c
@@ -9,6 +9,7 @@
9#include <linux/fb.h> 9#include <linux/fb.h>
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/platform_device.h> 11#include <linux/platform_device.h>
12#include <linux/dma-mapping.h>
12#include <linux/spi/spi.h> 13#include <linux/spi/spi.h>
13 14
14#include <asm/io.h> 15#include <asm/io.h>
@@ -16,14 +17,20 @@
16#include <asm/arch/at32ap7000.h> 17#include <asm/arch/at32ap7000.h>
17#include <asm/arch/board.h> 18#include <asm/arch/board.h>
18#include <asm/arch/portmux.h> 19#include <asm/arch/portmux.h>
19#include <asm/arch/sm.h>
20 20
21#include <video/atmel_lcdc.h> 21#include <video/atmel_lcdc.h>
22 22
23#include "clock.h" 23#include "clock.h"
24#include "hmatrix.h" 24#include "hmatrix.h"
25#include "pio.h" 25#include "pio.h"
26#include "sm.h" 26#include "pm.h"
27
28/*
29 * We can reduce the code size a bit by using a constant here. Since
30 * this file is completely chip-specific, it's safe to not use
31 * ioremap. Generic drivers should of course never do this.
32 */
33#define AT32_PM_BASE 0xfff00000
27 34
28#define PBMEM(base) \ 35#define PBMEM(base) \
29 { \ 36 { \
@@ -45,19 +52,30 @@
45 .flags = IORESOURCE_IRQ, \ 52 .flags = IORESOURCE_IRQ, \
46 } 53 }
47 54
55/* REVISIT these assume *every* device supports DMA, but several
56 * don't ... tc, smc, pio, rtc, watchdog, pwm, ps2, and more.
57 */
48#define DEFINE_DEV(_name, _id) \ 58#define DEFINE_DEV(_name, _id) \
59static u64 _name##_id##_dma_mask = DMA_32BIT_MASK; \
49static struct platform_device _name##_id##_device = { \ 60static struct platform_device _name##_id##_device = { \
50 .name = #_name, \ 61 .name = #_name, \
51 .id = _id, \ 62 .id = _id, \
63 .dev = { \
64 .dma_mask = &_name##_id##_dma_mask, \
65 .coherent_dma_mask = DMA_32BIT_MASK, \
66 }, \
52 .resource = _name##_id##_resource, \ 67 .resource = _name##_id##_resource, \
53 .num_resources = ARRAY_SIZE(_name##_id##_resource), \ 68 .num_resources = ARRAY_SIZE(_name##_id##_resource), \
54} 69}
55#define DEFINE_DEV_DATA(_name, _id) \ 70#define DEFINE_DEV_DATA(_name, _id) \
71static u64 _name##_id##_dma_mask = DMA_32BIT_MASK; \
56static struct platform_device _name##_id##_device = { \ 72static struct platform_device _name##_id##_device = { \
57 .name = #_name, \ 73 .name = #_name, \
58 .id = _id, \ 74 .id = _id, \
59 .dev = { \ 75 .dev = { \
76 .dma_mask = &_name##_id##_dma_mask, \
60 .platform_data = &_name##_id##_data, \ 77 .platform_data = &_name##_id##_data, \
78 .coherent_dma_mask = DMA_32BIT_MASK, \
61 }, \ 79 }, \
62 .resource = _name##_id##_resource, \ 80 .resource = _name##_id##_resource, \
63 .num_resources = ARRAY_SIZE(_name##_id##_resource), \ 81 .num_resources = ARRAY_SIZE(_name##_id##_resource), \
@@ -76,6 +94,8 @@ static struct clk devname##_##_name = { \
76 .index = _index, \ 94 .index = _index, \
77} 95}
78 96
97static DEFINE_SPINLOCK(pm_lock);
98
79unsigned long at32ap7000_osc_rates[3] = { 99unsigned long at32ap7000_osc_rates[3] = {
80 [0] = 32768, 100 [0] = 32768,
81 /* FIXME: these are ATSTK1002-specific */ 101 /* FIXME: these are ATSTK1002-specific */
@@ -92,11 +112,11 @@ static unsigned long pll_get_rate(struct clk *clk, unsigned long control)
92{ 112{
93 unsigned long div, mul, rate; 113 unsigned long div, mul, rate;
94 114
95 if (!(control & SM_BIT(PLLEN))) 115 if (!(control & PM_BIT(PLLEN)))
96 return 0; 116 return 0;
97 117
98 div = SM_BFEXT(PLLDIV, control) + 1; 118 div = PM_BFEXT(PLLDIV, control) + 1;
99 mul = SM_BFEXT(PLLMUL, control) + 1; 119 mul = PM_BFEXT(PLLMUL, control) + 1;
100 120
101 rate = clk->parent->get_rate(clk->parent); 121 rate = clk->parent->get_rate(clk->parent);
102 rate = (rate + div / 2) / div; 122 rate = (rate + div / 2) / div;
@@ -109,7 +129,7 @@ static unsigned long pll0_get_rate(struct clk *clk)
109{ 129{
110 u32 control; 130 u32 control;
111 131
112 control = sm_readl(&system_manager, PM_PLL0); 132 control = pm_readl(PLL0);
113 133
114 return pll_get_rate(clk, control); 134 return pll_get_rate(clk, control);
115} 135}
@@ -118,7 +138,7 @@ static unsigned long pll1_get_rate(struct clk *clk)
118{ 138{
119 u32 control; 139 u32 control;
120 140
121 control = sm_readl(&system_manager, PM_PLL1); 141 control = pm_readl(PLL1);
122 142
123 return pll_get_rate(clk, control); 143 return pll_get_rate(clk, control);
124} 144}
@@ -175,108 +195,139 @@ static unsigned long bus_clk_get_rate(struct clk *clk, unsigned int shift)
175 195
176static void cpu_clk_mode(struct clk *clk, int enabled) 196static void cpu_clk_mode(struct clk *clk, int enabled)
177{ 197{
178 struct at32_sm *sm = &system_manager;
179 unsigned long flags; 198 unsigned long flags;
180 u32 mask; 199 u32 mask;
181 200
182 spin_lock_irqsave(&sm->lock, flags); 201 spin_lock_irqsave(&pm_lock, flags);
183 mask = sm_readl(sm, PM_CPU_MASK); 202 mask = pm_readl(CPU_MASK);
184 if (enabled) 203 if (enabled)
185 mask |= 1 << clk->index; 204 mask |= 1 << clk->index;
186 else 205 else
187 mask &= ~(1 << clk->index); 206 mask &= ~(1 << clk->index);
188 sm_writel(sm, PM_CPU_MASK, mask); 207 pm_writel(CPU_MASK, mask);
189 spin_unlock_irqrestore(&sm->lock, flags); 208 spin_unlock_irqrestore(&pm_lock, flags);
190} 209}
191 210
192static unsigned long cpu_clk_get_rate(struct clk *clk) 211static unsigned long cpu_clk_get_rate(struct clk *clk)
193{ 212{
194 unsigned long cksel, shift = 0; 213 unsigned long cksel, shift = 0;
195 214
196 cksel = sm_readl(&system_manager, PM_CKSEL); 215 cksel = pm_readl(CKSEL);
197 if (cksel & SM_BIT(CPUDIV)) 216 if (cksel & PM_BIT(CPUDIV))
198 shift = SM_BFEXT(CPUSEL, cksel) + 1; 217 shift = PM_BFEXT(CPUSEL, cksel) + 1;
199 218
200 return bus_clk_get_rate(clk, shift); 219 return bus_clk_get_rate(clk, shift);
201} 220}
202 221
222static long cpu_clk_set_rate(struct clk *clk, unsigned long rate, int apply)
223{
224 u32 control;
225 unsigned long parent_rate, child_div, actual_rate, div;
226
227 parent_rate = clk->parent->get_rate(clk->parent);
228 control = pm_readl(CKSEL);
229
230 if (control & PM_BIT(HSBDIV))
231 child_div = 1 << (PM_BFEXT(HSBSEL, control) + 1);
232 else
233 child_div = 1;
234
235 if (rate > 3 * (parent_rate / 4) || child_div == 1) {
236 actual_rate = parent_rate;
237 control &= ~PM_BIT(CPUDIV);
238 } else {
239 unsigned int cpusel;
240 div = (parent_rate + rate / 2) / rate;
241 if (div > child_div)
242 div = child_div;
243 cpusel = (div > 1) ? (fls(div) - 2) : 0;
244 control = PM_BIT(CPUDIV) | PM_BFINS(CPUSEL, cpusel, control);
245 actual_rate = parent_rate / (1 << (cpusel + 1));
246 }
247
248 pr_debug("clk %s: new rate %lu (actual rate %lu)\n",
249 clk->name, rate, actual_rate);
250
251 if (apply)
252 pm_writel(CKSEL, control);
253
254 return actual_rate;
255}
256
203static void hsb_clk_mode(struct clk *clk, int enabled) 257static void hsb_clk_mode(struct clk *clk, int enabled)
204{ 258{
205 struct at32_sm *sm = &system_manager;
206 unsigned long flags; 259 unsigned long flags;
207 u32 mask; 260 u32 mask;
208 261
209 spin_lock_irqsave(&sm->lock, flags); 262 spin_lock_irqsave(&pm_lock, flags);
210 mask = sm_readl(sm, PM_HSB_MASK); 263 mask = pm_readl(HSB_MASK);
211 if (enabled) 264 if (enabled)
212 mask |= 1 << clk->index; 265 mask |= 1 << clk->index;
213 else 266 else
214 mask &= ~(1 << clk->index); 267 mask &= ~(1 << clk->index);
215 sm_writel(sm, PM_HSB_MASK, mask); 268 pm_writel(HSB_MASK, mask);
216 spin_unlock_irqrestore(&sm->lock, flags); 269 spin_unlock_irqrestore(&pm_lock, flags);
217} 270}
218 271
219static unsigned long hsb_clk_get_rate(struct clk *clk) 272static unsigned long hsb_clk_get_rate(struct clk *clk)
220{ 273{
221 unsigned long cksel, shift = 0; 274 unsigned long cksel, shift = 0;
222 275
223 cksel = sm_readl(&system_manager, PM_CKSEL); 276 cksel = pm_readl(CKSEL);
224 if (cksel & SM_BIT(HSBDIV)) 277 if (cksel & PM_BIT(HSBDIV))
225 shift = SM_BFEXT(HSBSEL, cksel) + 1; 278 shift = PM_BFEXT(HSBSEL, cksel) + 1;
226 279
227 return bus_clk_get_rate(clk, shift); 280 return bus_clk_get_rate(clk, shift);
228} 281}
229 282
230static void pba_clk_mode(struct clk *clk, int enabled) 283static void pba_clk_mode(struct clk *clk, int enabled)
231{ 284{
232 struct at32_sm *sm = &system_manager;
233 unsigned long flags; 285 unsigned long flags;
234 u32 mask; 286 u32 mask;
235 287
236 spin_lock_irqsave(&sm->lock, flags); 288 spin_lock_irqsave(&pm_lock, flags);
237 mask = sm_readl(sm, PM_PBA_MASK); 289 mask = pm_readl(PBA_MASK);
238 if (enabled) 290 if (enabled)
239 mask |= 1 << clk->index; 291 mask |= 1 << clk->index;
240 else 292 else
241 mask &= ~(1 << clk->index); 293 mask &= ~(1 << clk->index);
242 sm_writel(sm, PM_PBA_MASK, mask); 294 pm_writel(PBA_MASK, mask);
243 spin_unlock_irqrestore(&sm->lock, flags); 295 spin_unlock_irqrestore(&pm_lock, flags);
244} 296}
245 297
246static unsigned long pba_clk_get_rate(struct clk *clk) 298static unsigned long pba_clk_get_rate(struct clk *clk)
247{ 299{
248 unsigned long cksel, shift = 0; 300 unsigned long cksel, shift = 0;
249 301
250 cksel = sm_readl(&system_manager, PM_CKSEL); 302 cksel = pm_readl(CKSEL);
251 if (cksel & SM_BIT(PBADIV)) 303 if (cksel & PM_BIT(PBADIV))
252 shift = SM_BFEXT(PBASEL, cksel) + 1; 304 shift = PM_BFEXT(PBASEL, cksel) + 1;
253 305
254 return bus_clk_get_rate(clk, shift); 306 return bus_clk_get_rate(clk, shift);
255} 307}
256 308
257static void pbb_clk_mode(struct clk *clk, int enabled) 309static void pbb_clk_mode(struct clk *clk, int enabled)
258{ 310{
259 struct at32_sm *sm = &system_manager;
260 unsigned long flags; 311 unsigned long flags;
261 u32 mask; 312 u32 mask;
262 313
263 spin_lock_irqsave(&sm->lock, flags); 314 spin_lock_irqsave(&pm_lock, flags);
264 mask = sm_readl(sm, PM_PBB_MASK); 315 mask = pm_readl(PBB_MASK);
265 if (enabled) 316 if (enabled)
266 mask |= 1 << clk->index; 317 mask |= 1 << clk->index;
267 else 318 else
268 mask &= ~(1 << clk->index); 319 mask &= ~(1 << clk->index);
269 sm_writel(sm, PM_PBB_MASK, mask); 320 pm_writel(PBB_MASK, mask);
270 spin_unlock_irqrestore(&sm->lock, flags); 321 spin_unlock_irqrestore(&pm_lock, flags);
271} 322}
272 323
273static unsigned long pbb_clk_get_rate(struct clk *clk) 324static unsigned long pbb_clk_get_rate(struct clk *clk)
274{ 325{
275 unsigned long cksel, shift = 0; 326 unsigned long cksel, shift = 0;
276 327
277 cksel = sm_readl(&system_manager, PM_CKSEL); 328 cksel = pm_readl(CKSEL);
278 if (cksel & SM_BIT(PBBDIV)) 329 if (cksel & PM_BIT(PBBDIV))
279 shift = SM_BFEXT(PBBSEL, cksel) + 1; 330 shift = PM_BFEXT(PBBSEL, cksel) + 1;
280 331
281 return bus_clk_get_rate(clk, shift); 332 return bus_clk_get_rate(clk, shift);
282} 333}
@@ -284,6 +335,7 @@ static unsigned long pbb_clk_get_rate(struct clk *clk)
284static struct clk cpu_clk = { 335static struct clk cpu_clk = {
285 .name = "cpu", 336 .name = "cpu",
286 .get_rate = cpu_clk_get_rate, 337 .get_rate = cpu_clk_get_rate,
338 .set_rate = cpu_clk_set_rate,
287 .users = 1, 339 .users = 1,
288}; 340};
289static struct clk hsb_clk = { 341static struct clk hsb_clk = {
@@ -315,12 +367,12 @@ static void genclk_mode(struct clk *clk, int enabled)
315{ 367{
316 u32 control; 368 u32 control;
317 369
318 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); 370 control = pm_readl(GCCTRL(clk->index));
319 if (enabled) 371 if (enabled)
320 control |= SM_BIT(CEN); 372 control |= PM_BIT(CEN);
321 else 373 else
322 control &= ~SM_BIT(CEN); 374 control &= ~PM_BIT(CEN);
323 sm_writel(&system_manager, PM_GCCTRL + 4 * clk->index, control); 375 pm_writel(GCCTRL(clk->index), control);
324} 376}
325 377
326static unsigned long genclk_get_rate(struct clk *clk) 378static unsigned long genclk_get_rate(struct clk *clk)
@@ -328,9 +380,9 @@ static unsigned long genclk_get_rate(struct clk *clk)
328 u32 control; 380 u32 control;
329 unsigned long div = 1; 381 unsigned long div = 1;
330 382
331 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); 383 control = pm_readl(GCCTRL(clk->index));
332 if (control & SM_BIT(DIVEN)) 384 if (control & PM_BIT(DIVEN))
333 div = 2 * (SM_BFEXT(DIV, control) + 1); 385 div = 2 * (PM_BFEXT(DIV, control) + 1);
334 386
335 return clk->parent->get_rate(clk->parent) / div; 387 return clk->parent->get_rate(clk->parent) / div;
336} 388}
@@ -341,23 +393,22 @@ static long genclk_set_rate(struct clk *clk, unsigned long rate, int apply)
341 unsigned long parent_rate, actual_rate, div; 393 unsigned long parent_rate, actual_rate, div;
342 394
343 parent_rate = clk->parent->get_rate(clk->parent); 395 parent_rate = clk->parent->get_rate(clk->parent);
344 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); 396 control = pm_readl(GCCTRL(clk->index));
345 397
346 if (rate > 3 * parent_rate / 4) { 398 if (rate > 3 * parent_rate / 4) {
347 actual_rate = parent_rate; 399 actual_rate = parent_rate;
348 control &= ~SM_BIT(DIVEN); 400 control &= ~PM_BIT(DIVEN);
349 } else { 401 } else {
350 div = (parent_rate + rate) / (2 * rate) - 1; 402 div = (parent_rate + rate) / (2 * rate) - 1;
351 control = SM_BFINS(DIV, div, control) | SM_BIT(DIVEN); 403 control = PM_BFINS(DIV, div, control) | PM_BIT(DIVEN);
352 actual_rate = parent_rate / (2 * (div + 1)); 404 actual_rate = parent_rate / (2 * (div + 1));
353 } 405 }
354 406
355 printk("clk %s: new rate %lu (actual rate %lu)\n", 407 dev_dbg(clk->dev, "clk %s: new rate %lu (actual rate %lu)\n",
356 clk->name, rate, actual_rate); 408 clk->name, rate, actual_rate);
357 409
358 if (apply) 410 if (apply)
359 sm_writel(&system_manager, PM_GCCTRL + 4 * clk->index, 411 pm_writel(GCCTRL(clk->index), control);
360 control);
361 412
362 return actual_rate; 413 return actual_rate;
363} 414}
@@ -366,24 +417,24 @@ int genclk_set_parent(struct clk *clk, struct clk *parent)
366{ 417{
367 u32 control; 418 u32 control;
368 419
369 printk("clk %s: new parent %s (was %s)\n", 420 dev_dbg(clk->dev, "clk %s: new parent %s (was %s)\n",
370 clk->name, parent->name, clk->parent->name); 421 clk->name, parent->name, clk->parent->name);
371 422
372 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); 423 control = pm_readl(GCCTRL(clk->index));
373 424
374 if (parent == &osc1 || parent == &pll1) 425 if (parent == &osc1 || parent == &pll1)
375 control |= SM_BIT(OSCSEL); 426 control |= PM_BIT(OSCSEL);
376 else if (parent == &osc0 || parent == &pll0) 427 else if (parent == &osc0 || parent == &pll0)
377 control &= ~SM_BIT(OSCSEL); 428 control &= ~PM_BIT(OSCSEL);
378 else 429 else
379 return -EINVAL; 430 return -EINVAL;
380 431
381 if (parent == &pll0 || parent == &pll1) 432 if (parent == &pll0 || parent == &pll1)
382 control |= SM_BIT(PLLSEL); 433 control |= PM_BIT(PLLSEL);
383 else 434 else
384 control &= ~SM_BIT(PLLSEL); 435 control &= ~PM_BIT(PLLSEL);
385 436
386 sm_writel(&system_manager, PM_GCCTRL + 4 * clk->index, control); 437 pm_writel(GCCTRL(clk->index), control);
387 clk->parent = parent; 438 clk->parent = parent;
388 439
389 return 0; 440 return 0;
@@ -396,11 +447,11 @@ static void __init genclk_init_parent(struct clk *clk)
396 447
397 BUG_ON(clk->index > 7); 448 BUG_ON(clk->index > 7);
398 449
399 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); 450 control = pm_readl(GCCTRL(clk->index));
400 if (control & SM_BIT(OSCSEL)) 451 if (control & PM_BIT(OSCSEL))
401 parent = (control & SM_BIT(PLLSEL)) ? &pll1 : &osc1; 452 parent = (control & PM_BIT(PLLSEL)) ? &pll1 : &osc1;
402 else 453 else
403 parent = (control & SM_BIT(PLLSEL)) ? &pll0 : &osc0; 454 parent = (control & PM_BIT(PLLSEL)) ? &pll0 : &osc0;
404 455
405 clk->parent = parent; 456 clk->parent = parent;
406} 457}
@@ -408,21 +459,53 @@ static void __init genclk_init_parent(struct clk *clk)
408/* -------------------------------------------------------------------- 459/* --------------------------------------------------------------------
409 * System peripherals 460 * System peripherals
410 * -------------------------------------------------------------------- */ 461 * -------------------------------------------------------------------- */
411static struct resource sm_resource[] = { 462static struct resource at32_pm0_resource[] = {
412 PBMEM(0xfff00000), 463 {
413 NAMED_IRQ(19, "eim"), 464 .start = 0xfff00000,
414 NAMED_IRQ(20, "pm"), 465 .end = 0xfff0007f,
415 NAMED_IRQ(21, "rtc"), 466 .flags = IORESOURCE_MEM,
467 },
468 IRQ(20),
416}; 469};
417struct platform_device at32_sm_device = { 470
418 .name = "sm", 471static struct resource at32ap700x_rtc0_resource[] = {
419 .id = 0, 472 {
420 .resource = sm_resource, 473 .start = 0xfff00080,
421 .num_resources = ARRAY_SIZE(sm_resource), 474 .end = 0xfff000af,
475 .flags = IORESOURCE_MEM,
476 },
477 IRQ(21),
422}; 478};
423static struct clk at32_sm_pclk = { 479
480static struct resource at32_wdt0_resource[] = {
481 {
482 .start = 0xfff000b0,
483 .end = 0xfff000bf,
484 .flags = IORESOURCE_MEM,
485 },
486};
487
488static struct resource at32_eic0_resource[] = {
489 {
490 .start = 0xfff00100,
491 .end = 0xfff0013f,
492 .flags = IORESOURCE_MEM,
493 },
494 IRQ(19),
495};
496
497DEFINE_DEV(at32_pm, 0);
498DEFINE_DEV(at32ap700x_rtc, 0);
499DEFINE_DEV(at32_wdt, 0);
500DEFINE_DEV(at32_eic, 0);
501
502/*
503 * Peripheral clock for PM, RTC, WDT and EIC. PM will ensure that this
504 * is always running.
505 */
506static struct clk at32_pm_pclk = {
424 .name = "pclk", 507 .name = "pclk",
425 .dev = &at32_sm_device.dev, 508 .dev = &at32_pm0_device.dev,
426 .parent = &pbb_clk, 509 .parent = &pbb_clk,
427 .mode = pbb_clk_mode, 510 .mode = pbb_clk_mode,
428 .get_rate = pbb_clk_get_rate, 511 .get_rate = pbb_clk_get_rate,
@@ -571,10 +654,11 @@ DEV_CLK(mck, pio4, pba, 14);
571 654
572void __init at32_add_system_devices(void) 655void __init at32_add_system_devices(void)
573{ 656{
574 system_manager.eim_first_irq = EIM_IRQ_BASE; 657 platform_device_register(&at32_pm0_device);
575
576 platform_device_register(&at32_sm_device);
577 platform_device_register(&at32_intc0_device); 658 platform_device_register(&at32_intc0_device);
659 platform_device_register(&at32ap700x_rtc0_device);
660 platform_device_register(&at32_wdt0_device);
661 platform_device_register(&at32_eic0_device);
578 platform_device_register(&smc0_device); 662 platform_device_register(&smc0_device);
579 platform_device_register(&pdc_device); 663 platform_device_register(&pdc_device);
580 664
@@ -1001,6 +1085,89 @@ err_dup_modedb:
1001} 1085}
1002 1086
1003/* -------------------------------------------------------------------- 1087/* --------------------------------------------------------------------
1088 * SSC
1089 * -------------------------------------------------------------------- */
1090static struct resource ssc0_resource[] = {
1091 PBMEM(0xffe01c00),
1092 IRQ(10),
1093};
1094DEFINE_DEV(ssc, 0);
1095DEV_CLK(pclk, ssc0, pba, 7);
1096
1097static struct resource ssc1_resource[] = {
1098 PBMEM(0xffe02000),
1099 IRQ(11),
1100};
1101DEFINE_DEV(ssc, 1);
1102DEV_CLK(pclk, ssc1, pba, 8);
1103
1104static struct resource ssc2_resource[] = {
1105 PBMEM(0xffe02400),
1106 IRQ(12),
1107};
1108DEFINE_DEV(ssc, 2);
1109DEV_CLK(pclk, ssc2, pba, 9);
1110
1111struct platform_device *__init
1112at32_add_device_ssc(unsigned int id, unsigned int flags)
1113{
1114 struct platform_device *pdev;
1115
1116 switch (id) {
1117 case 0:
1118 pdev = &ssc0_device;
1119 if (flags & ATMEL_SSC_RF)
1120 select_peripheral(PA(21), PERIPH_A, 0); /* RF */
1121 if (flags & ATMEL_SSC_RK)
1122 select_peripheral(PA(22), PERIPH_A, 0); /* RK */
1123 if (flags & ATMEL_SSC_TK)
1124 select_peripheral(PA(23), PERIPH_A, 0); /* TK */
1125 if (flags & ATMEL_SSC_TF)
1126 select_peripheral(PA(24), PERIPH_A, 0); /* TF */
1127 if (flags & ATMEL_SSC_TD)
1128 select_peripheral(PA(25), PERIPH_A, 0); /* TD */
1129 if (flags & ATMEL_SSC_RD)
1130 select_peripheral(PA(26), PERIPH_A, 0); /* RD */
1131 break;
1132 case 1:
1133 pdev = &ssc1_device;
1134 if (flags & ATMEL_SSC_RF)
1135 select_peripheral(PA(0), PERIPH_B, 0); /* RF */
1136 if (flags & ATMEL_SSC_RK)
1137 select_peripheral(PA(1), PERIPH_B, 0); /* RK */
1138 if (flags & ATMEL_SSC_TK)
1139 select_peripheral(PA(2), PERIPH_B, 0); /* TK */
1140 if (flags & ATMEL_SSC_TF)
1141 select_peripheral(PA(3), PERIPH_B, 0); /* TF */
1142 if (flags & ATMEL_SSC_TD)
1143 select_peripheral(PA(4), PERIPH_B, 0); /* TD */
1144 if (flags & ATMEL_SSC_RD)
1145 select_peripheral(PA(5), PERIPH_B, 0); /* RD */
1146 break;
1147 case 2:
1148 pdev = &ssc2_device;
1149 if (flags & ATMEL_SSC_TD)
1150 select_peripheral(PB(13), PERIPH_A, 0); /* TD */
1151 if (flags & ATMEL_SSC_RD)
1152 select_peripheral(PB(14), PERIPH_A, 0); /* RD */
1153 if (flags & ATMEL_SSC_TK)
1154 select_peripheral(PB(15), PERIPH_A, 0); /* TK */
1155 if (flags & ATMEL_SSC_TF)
1156 select_peripheral(PB(16), PERIPH_A, 0); /* TF */
1157 if (flags & ATMEL_SSC_RF)
1158 select_peripheral(PB(17), PERIPH_A, 0); /* RF */
1159 if (flags & ATMEL_SSC_RK)
1160 select_peripheral(PB(18), PERIPH_A, 0); /* RK */
1161 break;
1162 default:
1163 return NULL;
1164 }
1165
1166 platform_device_register(pdev);
1167 return pdev;
1168}
1169
1170/* --------------------------------------------------------------------
1004 * GCLK 1171 * GCLK
1005 * -------------------------------------------------------------------- */ 1172 * -------------------------------------------------------------------- */
1006static struct clk gclk0 = { 1173static struct clk gclk0 = {
@@ -1054,7 +1221,7 @@ struct clk *at32_clock_list[] = {
1054 &hsb_clk, 1221 &hsb_clk,
1055 &pba_clk, 1222 &pba_clk,
1056 &pbb_clk, 1223 &pbb_clk,
1057 &at32_sm_pclk, 1224 &at32_pm_pclk,
1058 &at32_intc0_pclk, 1225 &at32_intc0_pclk,
1059 &hmatrix_clk, 1226 &hmatrix_clk,
1060 &ebi_clk, 1227 &ebi_clk,
@@ -1082,6 +1249,9 @@ struct clk *at32_clock_list[] = {
1082 &atmel_spi1_spi_clk, 1249 &atmel_spi1_spi_clk,
1083 &atmel_lcdfb0_hck1, 1250 &atmel_lcdfb0_hck1,
1084 &atmel_lcdfb0_pixclk, 1251 &atmel_lcdfb0_pixclk,
1252 &ssc0_pclk,
1253 &ssc1_pclk,
1254 &ssc2_pclk,
1085 &gclk0, 1255 &gclk0,
1086 &gclk1, 1256 &gclk1,
1087 &gclk2, 1257 &gclk2,
@@ -1101,18 +1271,20 @@ void __init at32_portmux_init(void)
1101 1271
1102void __init at32_clock_init(void) 1272void __init at32_clock_init(void)
1103{ 1273{
1104 struct at32_sm *sm = &system_manager;
1105 u32 cpu_mask = 0, hsb_mask = 0, pba_mask = 0, pbb_mask = 0; 1274 u32 cpu_mask = 0, hsb_mask = 0, pba_mask = 0, pbb_mask = 0;
1106 int i; 1275 int i;
1107 1276
1108 if (sm_readl(sm, PM_MCCTRL) & SM_BIT(PLLSEL)) 1277 if (pm_readl(MCCTRL) & PM_BIT(PLLSEL)) {
1109 main_clock = &pll0; 1278 main_clock = &pll0;
1110 else 1279 cpu_clk.parent = &pll0;
1280 } else {
1111 main_clock = &osc0; 1281 main_clock = &osc0;
1282 cpu_clk.parent = &osc0;
1283 }
1112 1284
1113 if (sm_readl(sm, PM_PLL0) & SM_BIT(PLLOSC)) 1285 if (pm_readl(PLL0) & PM_BIT(PLLOSC))
1114 pll0.parent = &osc1; 1286 pll0.parent = &osc1;
1115 if (sm_readl(sm, PM_PLL1) & SM_BIT(PLLOSC)) 1287 if (pm_readl(PLL1) & PM_BIT(PLLOSC))
1116 pll1.parent = &osc1; 1288 pll1.parent = &osc1;
1117 1289
1118 genclk_init_parent(&gclk0); 1290 genclk_init_parent(&gclk0);
@@ -1145,8 +1317,8 @@ void __init at32_clock_init(void)
1145 pbb_mask |= 1 << clk->index; 1317 pbb_mask |= 1 << clk->index;
1146 } 1318 }
1147 1319
1148 sm_writel(sm, PM_CPU_MASK, cpu_mask); 1320 pm_writel(CPU_MASK, cpu_mask);
1149 sm_writel(sm, PM_HSB_MASK, hsb_mask); 1321 pm_writel(HSB_MASK, hsb_mask);
1150 sm_writel(sm, PM_PBA_MASK, pba_mask); 1322 pm_writel(PBA_MASK, pba_mask);
1151 sm_writel(sm, PM_PBB_MASK, pbb_mask); 1323 pm_writel(PBB_MASK, pbb_mask);
1152} 1324}
diff --git a/arch/avr32/mach-at32ap/cpufreq.c b/arch/avr32/mach-at32ap/cpufreq.c
new file mode 100644
index 0000000000..235524b791
--- /dev/null
+++ b/arch/avr32/mach-at32ap/cpufreq.c
@@ -0,0 +1,112 @@
1/*
2 * Copyright (C) 2004-2007 Atmel Corporation
3 *
4 * Based on MIPS implementation arch/mips/kernel/time.c
5 * Copyright 2001 MontaVista Software Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12/*#define DEBUG*/
13
14#include <linux/kernel.h>
15#include <linux/types.h>
16#include <linux/init.h>
17#include <linux/cpufreq.h>
18#include <linux/io.h>
19#include <linux/clk.h>
20#include <linux/err.h>
21#include <asm/system.h>
22
23static struct clk *cpuclk;
24
25static int at32_verify_speed(struct cpufreq_policy *policy)
26{
27 if (policy->cpu != 0)
28 return -EINVAL;
29
30 cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
31 policy->cpuinfo.max_freq);
32 return 0;
33}
34
35static unsigned int at32_get_speed(unsigned int cpu)
36{
37 /* No SMP support */
38 if (cpu)
39 return 0;
40 return (unsigned int)((clk_get_rate(cpuclk) + 500) / 1000);
41}
42
43static int at32_set_target(struct cpufreq_policy *policy,
44 unsigned int target_freq,
45 unsigned int relation)
46{
47 struct cpufreq_freqs freqs;
48 long freq;
49
50 /* Convert target_freq from kHz to Hz */
51 freq = clk_round_rate(cpuclk, target_freq * 1000);
52
53 /* Check if policy->min <= new_freq <= policy->max */
54 if(freq < (policy->min * 1000) || freq > (policy->max * 1000))
55 return -EINVAL;
56
57 pr_debug("cpufreq: requested frequency %u Hz\n", target_freq * 1000);
58
59 freqs.old = at32_get_speed(0);
60 freqs.new = (freq + 500) / 1000;
61 freqs.cpu = 0;
62 freqs.flags = 0;
63
64 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
65 clk_set_rate(cpuclk, freq);
66 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
67
68 pr_debug("cpufreq: set frequency %lu Hz\n", freq);
69
70 return 0;
71}
72
73static int __init at32_cpufreq_driver_init(struct cpufreq_policy *policy)
74{
75 if (policy->cpu != 0)
76 return -EINVAL;
77
78 cpuclk = clk_get(NULL, "cpu");
79 if (IS_ERR(cpuclk)) {
80 pr_debug("cpufreq: could not get CPU clk\n");
81 return PTR_ERR(cpuclk);
82 }
83
84 policy->cpuinfo.min_freq = (clk_round_rate(cpuclk, 1) + 500) / 1000;
85 policy->cpuinfo.max_freq = (clk_round_rate(cpuclk, ~0UL) + 500) / 1000;
86 policy->cpuinfo.transition_latency = 0;
87 policy->cur = at32_get_speed(0);
88 policy->min = policy->cpuinfo.min_freq;
89 policy->max = policy->cpuinfo.max_freq;
90 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
91
92 printk("cpufreq: AT32AP CPU frequency driver\n");
93
94 return 0;
95}
96
97static struct cpufreq_driver at32_driver = {
98 .name = "at32ap",
99 .owner = THIS_MODULE,
100 .init = at32_cpufreq_driver_init,
101 .verify = at32_verify_speed,
102 .target = at32_set_target,
103 .get = at32_get_speed,
104 .flags = CPUFREQ_STICKY,
105};
106
107static int __init at32_cpufreq_init(void)
108{
109 return cpufreq_register_driver(&at32_driver);
110}
111
112arch_initcall(at32_cpufreq_init);
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c
index 4a60eccfeb..8acd010900 100644
--- a/arch/avr32/mach-at32ap/extint.c
+++ b/arch/avr32/mach-at32ap/extint.c
@@ -17,42 +17,83 @@
17 17
18#include <asm/io.h> 18#include <asm/io.h>
19 19
20#include <asm/arch/sm.h> 20/* EIC register offsets */
21 21#define EIC_IER 0x0000
22#include "sm.h" 22#define EIC_IDR 0x0004
23#define EIC_IMR 0x0008
24#define EIC_ISR 0x000c
25#define EIC_ICR 0x0010
26#define EIC_MODE 0x0014
27#define EIC_EDGE 0x0018
28#define EIC_LEVEL 0x001c
29#define EIC_TEST 0x0020
30#define EIC_NMIC 0x0024
31
32/* Bitfields in TEST */
33#define EIC_TESTEN_OFFSET 31
34#define EIC_TESTEN_SIZE 1
35
36/* Bitfields in NMIC */
37#define EIC_EN_OFFSET 0
38#define EIC_EN_SIZE 1
39
40/* Bit manipulation macros */
41#define EIC_BIT(name) \
42 (1 << EIC_##name##_OFFSET)
43#define EIC_BF(name,value) \
44 (((value) & ((1 << EIC_##name##_SIZE) - 1)) \
45 << EIC_##name##_OFFSET)
46#define EIC_BFEXT(name,value) \
47 (((value) >> EIC_##name##_OFFSET) \
48 & ((1 << EIC_##name##_SIZE) - 1))
49#define EIC_BFINS(name,value,old) \
50 (((old) & ~(((1 << EIC_##name##_SIZE) - 1) \
51 << EIC_##name##_OFFSET)) \
52 | EIC_BF(name,value))
53
54/* Register access macros */
55#define eic_readl(port,reg) \
56 __raw_readl((port)->regs + EIC_##reg)
57#define eic_writel(port,reg,value) \
58 __raw_writel((value), (port)->regs + EIC_##reg)
59
60struct eic {
61 void __iomem *regs;
62 struct irq_chip *chip;
63 unsigned int first_irq;
64};
23 65
24static void eim_ack_irq(unsigned int irq) 66static void eic_ack_irq(unsigned int irq)
25{ 67{
26 struct at32_sm *sm = get_irq_chip_data(irq); 68 struct eic *eic = get_irq_chip_data(irq);
27 sm_writel(sm, EIM_ICR, 1 << (irq - sm->eim_first_irq)); 69 eic_writel(eic, ICR, 1 << (irq - eic->first_irq));
28} 70}
29 71
30static void eim_mask_irq(unsigned int irq) 72static void eic_mask_irq(unsigned int irq)
31{ 73{
32 struct at32_sm *sm = get_irq_chip_data(irq); 74 struct eic *eic = get_irq_chip_data(irq);
33 sm_writel(sm, EIM_IDR, 1 << (irq - sm->eim_first_irq)); 75 eic_writel(eic, IDR, 1 << (irq - eic->first_irq));
34} 76}
35 77
36static void eim_mask_ack_irq(unsigned int irq) 78static void eic_mask_ack_irq(unsigned int irq)
37{ 79{
38 struct at32_sm *sm = get_irq_chip_data(irq); 80 struct eic *eic = get_irq_chip_data(irq);
39 sm_writel(sm, EIM_ICR, 1 << (irq - sm->eim_first_irq)); 81 eic_writel(eic, ICR, 1 << (irq - eic->first_irq));
40 sm_writel(sm, EIM_IDR, 1 << (irq - sm->eim_first_irq)); 82 eic_writel(eic, IDR, 1 << (irq - eic->first_irq));
41} 83}
42 84
43static void eim_unmask_irq(unsigned int irq) 85static void eic_unmask_irq(unsigned int irq)
44{ 86{
45 struct at32_sm *sm = get_irq_chip_data(irq); 87 struct eic *eic = get_irq_chip_data(irq);
46 sm_writel(sm, EIM_IER, 1 << (irq - sm->eim_first_irq)); 88 eic_writel(eic, IER, 1 << (irq - eic->first_irq));
47} 89}
48 90
49static int eim_set_irq_type(unsigned int irq, unsigned int flow_type) 91static int eic_set_irq_type(unsigned int irq, unsigned int flow_type)
50{ 92{
51 struct at32_sm *sm = get_irq_chip_data(irq); 93 struct eic *eic = get_irq_chip_data(irq);
52 struct irq_desc *desc; 94 struct irq_desc *desc;
53 unsigned int i = irq - sm->eim_first_irq; 95 unsigned int i = irq - eic->first_irq;
54 u32 mode, edge, level; 96 u32 mode, edge, level;
55 unsigned long flags;
56 int ret = 0; 97 int ret = 0;
57 98
58 flow_type &= IRQ_TYPE_SENSE_MASK; 99 flow_type &= IRQ_TYPE_SENSE_MASK;
@@ -60,11 +101,10 @@ static int eim_set_irq_type(unsigned int irq, unsigned int flow_type)
60 flow_type = IRQ_TYPE_LEVEL_LOW; 101 flow_type = IRQ_TYPE_LEVEL_LOW;
61 102
62 desc = &irq_desc[irq]; 103 desc = &irq_desc[irq];
63 spin_lock_irqsave(&sm->lock, flags);
64 104
65 mode = sm_readl(sm, EIM_MODE); 105 mode = eic_readl(eic, MODE);
66 edge = sm_readl(sm, EIM_EDGE); 106 edge = eic_readl(eic, EDGE);
67 level = sm_readl(sm, EIM_LEVEL); 107 level = eic_readl(eic, LEVEL);
68 108
69 switch (flow_type) { 109 switch (flow_type) {
70 case IRQ_TYPE_LEVEL_LOW: 110 case IRQ_TYPE_LEVEL_LOW:
@@ -89,9 +129,9 @@ static int eim_set_irq_type(unsigned int irq, unsigned int flow_type)
89 } 129 }
90 130
91 if (ret == 0) { 131 if (ret == 0) {
92 sm_writel(sm, EIM_MODE, mode); 132 eic_writel(eic, MODE, mode);
93 sm_writel(sm, EIM_EDGE, edge); 133 eic_writel(eic, EDGE, edge);
94 sm_writel(sm, EIM_LEVEL, level); 134 eic_writel(eic, LEVEL, level);
95 135
96 if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) 136 if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
97 flow_type |= IRQ_LEVEL; 137 flow_type |= IRQ_LEVEL;
@@ -99,35 +139,33 @@ static int eim_set_irq_type(unsigned int irq, unsigned int flow_type)
99 desc->status |= flow_type; 139 desc->status |= flow_type;
100 } 140 }
101 141
102 spin_unlock_irqrestore(&sm->lock, flags);
103
104 return ret; 142 return ret;
105} 143}
106 144
107struct irq_chip eim_chip = { 145struct irq_chip eic_chip = {
108 .name = "eim", 146 .name = "eic",
109 .ack = eim_ack_irq, 147 .ack = eic_ack_irq,
110 .mask = eim_mask_irq, 148 .mask = eic_mask_irq,
111 .mask_ack = eim_mask_ack_irq, 149 .mask_ack = eic_mask_ack_irq,
112 .unmask = eim_unmask_irq, 150 .unmask = eic_unmask_irq,
113 .set_type = eim_set_irq_type, 151 .set_type = eic_set_irq_type,
114}; 152};
115 153
116static void demux_eim_irq(unsigned int irq, struct irq_desc *desc) 154static void demux_eic_irq(unsigned int irq, struct irq_desc *desc)
117{ 155{
118 struct at32_sm *sm = desc->handler_data; 156 struct eic *eic = desc->handler_data;
119 struct irq_desc *ext_desc; 157 struct irq_desc *ext_desc;
120 unsigned long status, pending; 158 unsigned long status, pending;
121 unsigned int i, ext_irq; 159 unsigned int i, ext_irq;
122 160
123 status = sm_readl(sm, EIM_ISR); 161 status = eic_readl(eic, ISR);
124 pending = status & sm_readl(sm, EIM_IMR); 162 pending = status & eic_readl(eic, IMR);
125 163
126 while (pending) { 164 while (pending) {
127 i = fls(pending) - 1; 165 i = fls(pending) - 1;
128 pending &= ~(1 << i); 166 pending &= ~(1 << i);
129 167
130 ext_irq = i + sm->eim_first_irq; 168 ext_irq = i + eic->first_irq;
131 ext_desc = irq_desc + ext_irq; 169 ext_desc = irq_desc + ext_irq;
132 if (ext_desc->status & IRQ_LEVEL) 170 if (ext_desc->status & IRQ_LEVEL)
133 handle_level_irq(ext_irq, ext_desc); 171 handle_level_irq(ext_irq, ext_desc);
@@ -136,51 +174,85 @@ static void demux_eim_irq(unsigned int irq, struct irq_desc *desc)
136 } 174 }
137} 175}
138 176
139static int __init eim_init(void) 177static int __init eic_probe(struct platform_device *pdev)
140{ 178{
141 struct at32_sm *sm = &system_manager; 179 struct eic *eic;
180 struct resource *regs;
142 unsigned int i; 181 unsigned int i;
143 unsigned int nr_irqs; 182 unsigned int nr_irqs;
144 unsigned int int_irq; 183 unsigned int int_irq;
184 int ret;
145 u32 pattern; 185 u32 pattern;
146 186
147 /* 187 regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
148 * The EIM is really the same module as SM, so register 188 int_irq = platform_get_irq(pdev, 0);
149 * mapping, etc. has been taken care of already. 189 if (!regs || !int_irq) {
150 */ 190 dev_dbg(&pdev->dev, "missing regs and/or irq resource\n");
191 return -ENXIO;
192 }
193
194 ret = -ENOMEM;
195 eic = kzalloc(sizeof(struct eic), GFP_KERNEL);
196 if (!eic) {
197 dev_dbg(&pdev->dev, "no memory for eic structure\n");
198 goto err_kzalloc;
199 }
200
201 eic->first_irq = EIM_IRQ_BASE + 32 * pdev->id;
202 eic->regs = ioremap(regs->start, regs->end - regs->start + 1);
203 if (!eic->regs) {
204 dev_dbg(&pdev->dev, "failed to map regs\n");
205 goto err_ioremap;
206 }
151 207
152 /* 208 /*
153 * Find out how many interrupt lines that are actually 209 * Find out how many interrupt lines that are actually
154 * implemented in hardware. 210 * implemented in hardware.
155 */ 211 */
156 sm_writel(sm, EIM_IDR, ~0UL); 212 eic_writel(eic, IDR, ~0UL);
157 sm_writel(sm, EIM_MODE, ~0UL); 213 eic_writel(eic, MODE, ~0UL);
158 pattern = sm_readl(sm, EIM_MODE); 214 pattern = eic_readl(eic, MODE);
159 nr_irqs = fls(pattern); 215 nr_irqs = fls(pattern);
160 216
161 /* Trigger on falling edge unless overridden by driver */ 217 /* Trigger on falling edge unless overridden by driver */
162 sm_writel(sm, EIM_MODE, 0UL); 218 eic_writel(eic, MODE, 0UL);
163 sm_writel(sm, EIM_EDGE, 0UL); 219 eic_writel(eic, EDGE, 0UL);
164 220
165 sm->eim_chip = &eim_chip; 221 eic->chip = &eic_chip;
166 222
167 for (i = 0; i < nr_irqs; i++) { 223 for (i = 0; i < nr_irqs; i++) {
168 /* NOTE the handler we set here is ignored by the demux */ 224 /* NOTE the handler we set here is ignored by the demux */
169 set_irq_chip_and_handler(sm->eim_first_irq + i, &eim_chip, 225 set_irq_chip_and_handler(eic->first_irq + i, &eic_chip,
170 handle_level_irq); 226 handle_level_irq);
171 set_irq_chip_data(sm->eim_first_irq + i, sm); 227 set_irq_chip_data(eic->first_irq + i, eic);
172 } 228 }
173 229
174 int_irq = platform_get_irq_byname(sm->pdev, "eim"); 230 set_irq_chained_handler(int_irq, demux_eic_irq);
175 231 set_irq_data(int_irq, eic);
176 set_irq_chained_handler(int_irq, demux_eim_irq);
177 set_irq_data(int_irq, sm);
178 232
179 printk("EIM: External Interrupt Module at 0x%p, IRQ %u\n", 233 dev_info(&pdev->dev,
180 sm->regs, int_irq); 234 "External Interrupt Controller at 0x%p, IRQ %u\n",
181 printk("EIM: Handling %u external IRQs, starting with IRQ %u\n", 235 eic->regs, int_irq);
182 nr_irqs, sm->eim_first_irq); 236 dev_info(&pdev->dev,
237 "Handling %u external IRQs, starting with IRQ %u\n",
238 nr_irqs, eic->first_irq);
183 239
184 return 0; 240 return 0;
241
242err_ioremap:
243 kfree(eic);
244err_kzalloc:
245 return ret;
246}
247
248static struct platform_driver eic_driver = {
249 .driver = {
250 .name = "at32_eic",
251 },
252};
253
254static int __init eic_init(void)
255{
256 return platform_driver_probe(&eic_driver, eic_probe);
185} 257}
186arch_initcall(eim_init); 258arch_initcall(eic_init);
diff --git a/arch/avr32/mach-at32ap/pm.h b/arch/avr32/mach-at32ap/pm.h
new file mode 100644
index 0000000000..a1f8aced0a
--- /dev/null
+++ b/arch/avr32/mach-at32ap/pm.h
@@ -0,0 +1,112 @@
1/*
2 * Register definitions for the Power Manager (PM)
3 */
4#ifndef __ARCH_AVR32_MACH_AT32AP_PM_H__
5#define __ARCH_AVR32_MACH_AT32AP_PM_H__
6
7/* PM register offsets */
8#define PM_MCCTRL 0x0000
9#define PM_CKSEL 0x0004
10#define PM_CPU_MASK 0x0008
11#define PM_HSB_MASK 0x000c
12#define PM_PBA_MASK 0x0010
13#define PM_PBB_MASK 0x0014
14#define PM_PLL0 0x0020
15#define PM_PLL1 0x0024
16#define PM_IER 0x0040
17#define PM_IDR 0x0044
18#define PM_IMR 0x0048
19#define PM_ISR 0x004c
20#define PM_ICR 0x0050
21#define PM_GCCTRL(x) (0x0060 + 4 * (x))
22#define PM_RCAUSE 0x00c0
23
24/* Bitfields in CKSEL */
25#define PM_CPUSEL_OFFSET 0
26#define PM_CPUSEL_SIZE 3
27#define PM_CPUDIV_OFFSET 7
28#define PM_CPUDIV_SIZE 1
29#define PM_HSBSEL_OFFSET 8
30#define PM_HSBSEL_SIZE 3
31#define PM_HSBDIV_OFFSET 15
32#define PM_HSBDIV_SIZE 1
33#define PM_PBASEL_OFFSET 16
34#define PM_PBASEL_SIZE 3
35#define PM_PBADIV_OFFSET 23
36#define PM_PBADIV_SIZE 1
37#define PM_PBBSEL_OFFSET 24
38#define PM_PBBSEL_SIZE 3
39#define PM_PBBDIV_OFFSET 31
40#define PM_PBBDIV_SIZE 1
41
42/* Bitfields in PLL0 */
43#define PM_PLLEN_OFFSET 0
44#define PM_PLLEN_SIZE 1
45#define PM_PLLOSC_OFFSET 1
46#define PM_PLLOSC_SIZE 1
47#define PM_PLLOPT_OFFSET 2
48#define PM_PLLOPT_SIZE 3
49#define PM_PLLDIV_OFFSET 8
50#define PM_PLLDIV_SIZE 8
51#define PM_PLLMUL_OFFSET 16
52#define PM_PLLMUL_SIZE 8
53#define PM_PLLCOUNT_OFFSET 24
54#define PM_PLLCOUNT_SIZE 6
55#define PM_PLLTEST_OFFSET 31
56#define PM_PLLTEST_SIZE 1
57
58/* Bitfields in ICR */
59#define PM_LOCK0_OFFSET 0
60#define PM_LOCK0_SIZE 1
61#define PM_LOCK1_OFFSET 1
62#define PM_LOCK1_SIZE 1
63#define PM_WAKE_OFFSET 2
64#define PM_WAKE_SIZE 1
65#define PM_CKRDY_OFFSET 5
66#define PM_CKRDY_SIZE 1
67#define PM_MSKRDY_OFFSET 6
68#define PM_MSKRDY_SIZE 1
69
70/* Bitfields in GCCTRL0 */
71#define PM_OSCSEL_OFFSET 0
72#define PM_OSCSEL_SIZE 1
73#define PM_PLLSEL_OFFSET 1
74#define PM_PLLSEL_SIZE 1
75#define PM_CEN_OFFSET 2
76#define PM_CEN_SIZE 1
77#define PM_DIVEN_OFFSET 4
78#define PM_DIVEN_SIZE 1
79#define PM_DIV_OFFSET 8
80#define PM_DIV_SIZE 8
81
82/* Bitfields in RCAUSE */
83#define PM_POR_OFFSET 0
84#define PM_POR_SIZE 1
85#define PM_EXT_OFFSET 2
86#define PM_EXT_SIZE 1
87#define PM_WDT_OFFSET 3
88#define PM_WDT_SIZE 1
89#define PM_NTAE_OFFSET 4
90#define PM_NTAE_SIZE 1
91
92/* Bit manipulation macros */
93#define PM_BIT(name) \
94 (1 << PM_##name##_OFFSET)
95#define PM_BF(name,value) \
96 (((value) & ((1 << PM_##name##_SIZE) - 1)) \
97 << PM_##name##_OFFSET)
98#define PM_BFEXT(name,value) \
99 (((value) >> PM_##name##_OFFSET) \
100 & ((1 << PM_##name##_SIZE) - 1))
101#define PM_BFINS(name,value,old)\
102 (((old) & ~(((1 << PM_##name##_SIZE) - 1) \
103 << PM_##name##_OFFSET)) \
104 | PM_BF(name,value))
105
106/* Register access macros */
107#define pm_readl(reg) \
108 __raw_readl((void __iomem *)AT32_PM_BASE + PM_##reg)
109#define pm_writel(reg,value) \
110 __raw_writel((value), (void __iomem *)AT32_PM_BASE + PM_##reg)
111
112#endif /* __ARCH_AVR32_MACH_AT32AP_PM_H__ */
diff --git a/arch/avr32/mach-at32ap/sm.h b/arch/avr32/mach-at32ap/sm.h
deleted file mode 100644
index cad02b512b..0000000000
--- a/arch/avr32/mach-at32ap/sm.h
+++ /dev/null
@@ -1,242 +0,0 @@
1/*
2 * Register definitions for SM
3 *
4 * System Manager
5 */
6#ifndef __ASM_AVR32_SM_H__
7#define __ASM_AVR32_SM_H__
8
9/* SM register offsets */
10#define SM_PM_MCCTRL 0x0000
11#define SM_PM_CKSEL 0x0004
12#define SM_PM_CPU_MASK 0x0008
13#define SM_PM_HSB_MASK 0x000c
14#define SM_PM_PBA_MASK 0x0010
15#define SM_PM_PBB_MASK 0x0014
16#define SM_PM_PLL0 0x0020
17#define SM_PM_PLL1 0x0024
18#define SM_PM_VCTRL 0x0030
19#define SM_PM_VMREF 0x0034
20#define SM_PM_VMV 0x0038
21#define SM_PM_IER 0x0040
22#define SM_PM_IDR 0x0044
23#define SM_PM_IMR 0x0048
24#define SM_PM_ISR 0x004c
25#define SM_PM_ICR 0x0050
26#define SM_PM_GCCTRL 0x0060
27#define SM_RTC_CTRL 0x0080
28#define SM_RTC_VAL 0x0084
29#define SM_RTC_TOP 0x0088
30#define SM_RTC_IER 0x0090
31#define SM_RTC_IDR 0x0094
32#define SM_RTC_IMR 0x0098
33#define SM_RTC_ISR 0x009c
34#define SM_RTC_ICR 0x00a0
35#define SM_WDT_CTRL 0x00b0
36#define SM_WDT_CLR 0x00b4
37#define SM_WDT_EXT 0x00b8
38#define SM_RC_RCAUSE 0x00c0
39#define SM_EIM_IER 0x0100
40#define SM_EIM_IDR 0x0104
41#define SM_EIM_IMR 0x0108
42#define SM_EIM_ISR 0x010c
43#define SM_EIM_ICR 0x0110
44#define SM_EIM_MODE 0x0114
45#define SM_EIM_EDGE 0x0118
46#define SM_EIM_LEVEL 0x011c
47#define SM_EIM_TEST 0x0120
48#define SM_EIM_NMIC 0x0124
49
50/* Bitfields in PM_MCCTRL */
51
52/* Bitfields in PM_CKSEL */
53#define SM_CPUSEL_OFFSET 0
54#define SM_CPUSEL_SIZE 3
55#define SM_CPUDIV_OFFSET 7
56#define SM_CPUDIV_SIZE 1
57#define SM_HSBSEL_OFFSET 8
58#define SM_HSBSEL_SIZE 3
59#define SM_HSBDIV_OFFSET 15
60#define SM_HSBDIV_SIZE 1
61#define SM_PBASEL_OFFSET 16
62#define SM_PBASEL_SIZE 3
63#define SM_PBADIV_OFFSET 23
64#define SM_PBADIV_SIZE 1
65#define SM_PBBSEL_OFFSET 24
66#define SM_PBBSEL_SIZE 3
67#define SM_PBBDIV_OFFSET 31
68#define SM_PBBDIV_SIZE 1
69
70/* Bitfields in PM_CPU_MASK */
71
72/* Bitfields in PM_HSB_MASK */
73
74/* Bitfields in PM_PBA_MASK */
75
76/* Bitfields in PM_PBB_MASK */
77
78/* Bitfields in PM_PLL0 */
79#define SM_PLLEN_OFFSET 0
80#define SM_PLLEN_SIZE 1
81#define SM_PLLOSC_OFFSET 1
82#define SM_PLLOSC_SIZE 1
83#define SM_PLLOPT_OFFSET 2
84#define SM_PLLOPT_SIZE 3
85#define SM_PLLDIV_OFFSET 8
86#define SM_PLLDIV_SIZE 8
87#define SM_PLLMUL_OFFSET 16
88#define SM_PLLMUL_SIZE 8
89#define SM_PLLCOUNT_OFFSET 24
90#define SM_PLLCOUNT_SIZE 6
91#define SM_PLLTEST_OFFSET 31
92#define SM_PLLTEST_SIZE 1
93
94/* Bitfields in PM_PLL1 */
95
96/* Bitfields in PM_VCTRL */
97#define SM_VAUTO_OFFSET 0
98#define SM_VAUTO_SIZE 1
99#define SM_PM_VCTRL_VAL_OFFSET 8
100#define SM_PM_VCTRL_VAL_SIZE 7
101
102/* Bitfields in PM_VMREF */
103#define SM_REFSEL_OFFSET 0
104#define SM_REFSEL_SIZE 4
105
106/* Bitfields in PM_VMV */
107#define SM_PM_VMV_VAL_OFFSET 0
108#define SM_PM_VMV_VAL_SIZE 8
109
110/* Bitfields in PM_IER */
111
112/* Bitfields in PM_IDR */
113
114/* Bitfields in PM_IMR */
115
116/* Bitfields in PM_ISR */
117
118/* Bitfields in PM_ICR */
119#define SM_LOCK0_OFFSET 0
120#define SM_LOCK0_SIZE 1
121#define SM_LOCK1_OFFSET 1
122#define SM_LOCK1_SIZE 1
123#define SM_WAKE_OFFSET 2
124#define SM_WAKE_SIZE 1
125#define SM_VOK_OFFSET 3
126#define SM_VOK_SIZE 1
127#define SM_VMRDY_OFFSET 4
128#define SM_VMRDY_SIZE 1
129#define SM_CKRDY_OFFSET 5
130#define SM_CKRDY_SIZE 1
131
132/* Bitfields in PM_GCCTRL */
133#define SM_OSCSEL_OFFSET 0
134#define SM_OSCSEL_SIZE 1
135#define SM_PLLSEL_OFFSET 1
136#define SM_PLLSEL_SIZE 1
137#define SM_CEN_OFFSET 2
138#define SM_CEN_SIZE 1
139#define SM_CPC_OFFSET 3
140#define SM_CPC_SIZE 1
141#define SM_DIVEN_OFFSET 4
142#define SM_DIVEN_SIZE 1
143#define SM_DIV_OFFSET 8
144#define SM_DIV_SIZE 8
145
146/* Bitfields in RTC_CTRL */
147#define SM_PCLR_OFFSET 1
148#define SM_PCLR_SIZE 1
149#define SM_TOPEN_OFFSET 2
150#define SM_TOPEN_SIZE 1
151#define SM_CLKEN_OFFSET 3
152#define SM_CLKEN_SIZE 1
153#define SM_PSEL_OFFSET 8
154#define SM_PSEL_SIZE 16
155
156/* Bitfields in RTC_VAL */
157#define SM_RTC_VAL_VAL_OFFSET 0
158#define SM_RTC_VAL_VAL_SIZE 31
159
160/* Bitfields in RTC_TOP */
161#define SM_RTC_TOP_VAL_OFFSET 0
162#define SM_RTC_TOP_VAL_SIZE 32
163
164/* Bitfields in RTC_IER */
165
166/* Bitfields in RTC_IDR */
167
168/* Bitfields in RTC_IMR */
169
170/* Bitfields in RTC_ISR */
171
172/* Bitfields in RTC_ICR */
173#define SM_TOPI_OFFSET 0
174#define SM_TOPI_SIZE 1
175
176/* Bitfields in WDT_CTRL */
177#define SM_KEY_OFFSET 24
178#define SM_KEY_SIZE 8
179
180/* Bitfields in WDT_CLR */
181
182/* Bitfields in WDT_EXT */
183
184/* Bitfields in RC_RCAUSE */
185#define SM_POR_OFFSET 0
186#define SM_POR_SIZE 1
187#define SM_BOD_OFFSET 1
188#define SM_BOD_SIZE 1
189#define SM_EXT_OFFSET 2
190#define SM_EXT_SIZE 1
191#define SM_WDT_OFFSET 3
192#define SM_WDT_SIZE 1
193#define SM_NTAE_OFFSET 4
194#define SM_NTAE_SIZE 1
195#define SM_SERP_OFFSET 5
196#define SM_SERP_SIZE 1
197
198/* Bitfields in EIM_IER */
199
200/* Bitfields in EIM_IDR */
201
202/* Bitfields in EIM_IMR */
203
204/* Bitfields in EIM_ISR */
205
206/* Bitfields in EIM_ICR */
207
208/* Bitfields in EIM_MODE */
209
210/* Bitfields in EIM_EDGE */
211#define SM_INT0_OFFSET 0
212#define SM_INT0_SIZE 1
213#define SM_INT1_OFFSET 1
214#define SM_INT1_SIZE 1
215#define SM_INT2_OFFSET 2
216#define SM_INT2_SIZE 1
217#define SM_INT3_OFFSET 3
218#define SM_INT3_SIZE 1
219
220/* Bitfields in EIM_LEVEL */
221
222/* Bitfields in EIM_TEST */
223#define SM_TESTEN_OFFSET 31
224#define SM_TESTEN_SIZE 1
225
226/* Bitfields in EIM_NMIC */
227#define SM_EN_OFFSET 0
228#define SM_EN_SIZE 1
229
230/* Bit manipulation macros */
231#define SM_BIT(name) (1 << SM_##name##_OFFSET)
232#define SM_BF(name,value) (((value) & ((1 << SM_##name##_SIZE) - 1)) << SM_##name##_OFFSET)
233#define SM_BFEXT(name,value) (((value) >> SM_##name##_OFFSET) & ((1 << SM_##name##_SIZE) - 1))
234#define SM_BFINS(name,value,old) (((old) & ~(((1 << SM_##name##_SIZE) - 1) << SM_##name##_OFFSET)) | SM_BF(name,value))
235
236/* Register access macros */
237#define sm_readl(port,reg) \
238 __raw_readl((port)->regs + SM_##reg)
239#define sm_writel(port,reg,value) \
240 __raw_writel((value), (port)->regs + SM_##reg)
241
242#endif /* __ASM_AVR32_SM_H__ */
diff --git a/arch/avr32/mm/cache.c b/arch/avr32/mm/cache.c
index 8f7b1c3cd0..c1233c615e 100644
--- a/arch/avr32/mm/cache.c
+++ b/arch/avr32/mm/cache.c
@@ -23,7 +23,6 @@
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, mask; 25 unsigned long v, begin, end, linesz, mask;
26 int flush = 0;
27 26
28 linesz = boot_cpu_data.dcache.linesz; 27 linesz = boot_cpu_data.dcache.linesz;
29 mask = linesz - 1; 28 mask = linesz - 1;
@@ -32,24 +31,21 @@ void invalidate_dcache_region(void *start, size_t size)
32 * instead of invalidating ... never discard valid data! 31 * instead of invalidating ... never discard valid data!
33 */ 32 */
34 begin = (unsigned long)start; 33 begin = (unsigned long)start;
35 end = begin + size - 1; 34 end = begin + size;
36 35
37 if (begin & mask) { 36 if (begin & mask) {
38 flush_dcache_line(start); 37 flush_dcache_line(start);
39 begin += linesz; 38 begin += linesz;
40 flush = 1;
41 } 39 }
42 if ((end & mask) != mask) { 40 if (end & mask) {
43 flush_dcache_line((void *)end); 41 flush_dcache_line((void *)end);
44 end -= linesz; 42 end &= ~mask;
45 flush = 1;
46 } 43 }
47 44
48 /* remaining cachelines only need invalidation */ 45 /* remaining cachelines only need invalidation */
49 for (v = begin; v <= end; v += linesz) 46 for (v = begin; v < end; v += linesz)
50 invalidate_dcache_line((void *)v); 47 invalidate_dcache_line((void *)v);
51 if (flush) 48 flush_write_buffer();
52 flush_write_buffer();
53} 49}
54 50
55void clean_dcache_region(void *start, size_t size) 51void clean_dcache_region(void *start, size_t size)
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 1fad8560c7..017defaa52 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -71,6 +71,7 @@ config GENERIC_CALIBRATE_DELAY
71 71
72config IRQCHIP_DEMUX_GPIO 72config IRQCHIP_DEMUX_GPIO
73 bool 73 bool
74 depends on (BF53x || BF561 || BF54x)
74 default y 75 default y
75 76
76source "init/Kconfig" 77source "init/Kconfig"
@@ -114,6 +115,26 @@ config BF537
114 help 115 help
115 BF537 Processor Support. 116 BF537 Processor Support.
116 117
118config BF542
119 bool "BF542"
120 help
121 BF542 Processor Support.
122
123config BF544
124 bool "BF544"
125 help
126 BF544 Processor Support.
127
128config BF548
129 bool "BF548"
130 help
131 BF548 Processor Support.
132
133config BF549
134 bool "BF549"
135 help
136 BF549 Processor Support.
137
117config BF561 138config BF561
118 bool "BF561" 139 bool "BF561"
119 help 140 help
@@ -125,6 +146,11 @@ choice
125 prompt "Silicon Rev" 146 prompt "Silicon Rev"
126 default BF_REV_0_2 if BF537 147 default BF_REV_0_2 if BF537
127 default BF_REV_0_3 if BF533 148 default BF_REV_0_3 if BF533
149 default BF_REV_0_0 if BF549
150
151config BF_REV_0_0
152 bool "0.0"
153 depends on (BF549)
128 154
129config BF_REV_0_2 155config BF_REV_0_2
130 bool "0.2" 156 bool "0.2"
@@ -142,8 +168,24 @@ config BF_REV_0_5
142 bool "0.5" 168 bool "0.5"
143 depends on (BF561 || BF533 || BF532 || BF531) 169 depends on (BF561 || BF533 || BF532 || BF531)
144 170
171config BF_REV_ANY
172 bool "any"
173
174config BF_REV_NONE
175 bool "none"
176
145endchoice 177endchoice
146 178
179config BF53x
180 bool
181 depends on (BF531 || BF532 || BF533 || BF534 || BF536 || BF537)
182 default y
183
184config BF54x
185 bool
186 depends on (BF542 || BF544 || BF548 || BF549)
187 default y
188
147config BFIN_DUAL_CORE 189config BFIN_DUAL_CORE
148 bool 190 bool
149 depends on (BF561) 191 depends on (BF561)
@@ -192,6 +234,12 @@ config BFIN537_BLUETECHNIX_CM
192 help 234 help
193 CM-BF537 support for EVAL- and DEV-Board. 235 CM-BF537 support for EVAL- and DEV-Board.
194 236
237config BFIN548_EZKIT
238 bool "BF548-EZKIT"
239 depends on (BF548 || BF549)
240 help
241 BFIN548-EZKIT board Support.
242
195config BFIN561_BLUETECHNIX_CM 243config BFIN561_BLUETECHNIX_CM
196 bool "Bluetechnix CM-BF561" 244 bool "Bluetechnix CM-BF561"
197 depends on (BF561) 245 depends on (BF561)
@@ -259,6 +307,7 @@ config BFIN_SHARED_FLASH_ENET
259source "arch/blackfin/mach-bf533/Kconfig" 307source "arch/blackfin/mach-bf533/Kconfig"
260source "arch/blackfin/mach-bf561/Kconfig" 308source "arch/blackfin/mach-bf561/Kconfig"
261source "arch/blackfin/mach-bf537/Kconfig" 309source "arch/blackfin/mach-bf537/Kconfig"
310source "arch/blackfin/mach-bf548/Kconfig"
262 311
263menu "Board customizations" 312menu "Board customizations"
264 313
@@ -491,7 +540,8 @@ config IP_CHECKSUM_L1
491 540
492config CACHELINE_ALIGNED_L1 541config CACHELINE_ALIGNED_L1
493 bool "Locate cacheline_aligned data to L1 Data Memory" 542 bool "Locate cacheline_aligned data to L1 Data Memory"
494 default y 543 default y if !BF54x
544 default n if BF54x
495 depends on !BF531 545 depends on !BF531
496 help 546 help
497 If enabled cacheline_anligned data is linked 547 If enabled cacheline_anligned data is linked
@@ -535,9 +585,17 @@ endchoice
535 585
536source "mm/Kconfig" 586source "mm/Kconfig"
537 587
588config LARGE_ALLOCS
589 bool "Allow allocating large blocks (> 1MB) of memory"
590 help
591 Allow the slab memory allocator to keep chains for very large
592 memory sizes - upto 32MB. You may need this if your system has
593 a lot of RAM, and you need to able to allocate very large
594 contiguous chunks. If unsure, say N.
595
538config BFIN_DMA_5XX 596config BFIN_DMA_5XX
539 bool "Enable DMA Support" 597 bool "Enable DMA Support"
540 depends on (BF533 || BF532 || BF531 || BF537 || BF536 || BF534 || BF561) 598 depends on (BF533 || BF532 || BF531 || BF537 || BF536 || BF534 || BF561 || BF54x)
541 default y 599 default y
542 help 600 help
543 DMA driver for BF5xx. 601 DMA driver for BF5xx.
@@ -680,6 +738,7 @@ config C_AMCKEN
680 738
681config C_CDPRIO 739config C_CDPRIO
682 bool "DMA has priority over core for ext. accesses" 740 bool "DMA has priority over core for ext. accesses"
741 depends on !BF54x
683 default n 742 default n
684 743
685config C_B0PEN 744config C_B0PEN
@@ -833,7 +892,7 @@ endchoice
833 892
834endmenu 893endmenu
835 894
836if (BF537 || BF533) 895if (BF537 || BF533 || BF54x)
837 896
838menu "CPU Frequency scaling" 897menu "CPU Frequency scaling"
839 898
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile
index 75e89c3247..1b75672dfc 100644
--- a/arch/blackfin/Makefile
+++ b/arch/blackfin/Makefile
@@ -24,10 +24,33 @@ machine-$(CONFIG_BF533) := bf533
24machine-$(CONFIG_BF534) := bf537 24machine-$(CONFIG_BF534) := bf537
25machine-$(CONFIG_BF536) := bf537 25machine-$(CONFIG_BF536) := bf537
26machine-$(CONFIG_BF537) := bf537 26machine-$(CONFIG_BF537) := bf537
27machine-$(CONFIG_BF548) := bf548
28machine-$(CONFIG_BF549) := bf548
27machine-$(CONFIG_BF561) := bf561 29machine-$(CONFIG_BF561) := bf561
28MACHINE := $(machine-y) 30MACHINE := $(machine-y)
29export MACHINE 31export MACHINE
30 32
33cpu-$(CONFIG_BF531) := bf531
34cpu-$(CONFIG_BF532) := bf532
35cpu-$(CONFIG_BF533) := bf533
36cpu-$(CONFIG_BF534) := bf534
37cpu-$(CONFIG_BF536) := bf536
38cpu-$(CONFIG_BF537) := bf537
39cpu-$(CONFIG_BF548) := bf548
40cpu-$(CONFIG_BF549) := bf549
41cpu-$(CONFIG_BF561) := bf561
42
43rev-$(CONFIG_BF_REV_0_0) := 0.0
44rev-$(CONFIG_BF_REV_0_1) := 0.1
45rev-$(CONFIG_BF_REV_0_2) := 0.2
46rev-$(CONFIG_BF_REV_0_3) := 0.3
47rev-$(CONFIG_BF_REV_0_4) := 0.4
48rev-$(CONFIG_BF_REV_0_5) := 0.5
49rev-$(CONFIG_BF_REV_NONE) := none
50rev-$(CONFIG_BF_REV_ANY) := any
51
52CFLAGS += -mcpu=$(cpu-y)-$(rev-y)
53AFLAGS += -mcpu=$(cpu-y)-$(rev-y)
31 54
32head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o 55head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
33 56
diff --git a/arch/blackfin/boot/Makefile b/arch/blackfin/boot/Makefile
index 49e8098d4c..8cd33560e8 100644
--- a/arch/blackfin/boot/Makefile
+++ b/arch/blackfin/boot/Makefile
@@ -13,7 +13,8 @@ extra-y += vmlinux.bin vmlinux.gz
13 13
14quiet_cmd_uimage = UIMAGE $@ 14quiet_cmd_uimage = UIMAGE $@
15 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(ARCH) -O linux -T kernel \ 15 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(ARCH) -O linux -T kernel \
16 -C gzip -a $(CONFIG_BOOT_LOAD) -e $(CONFIG_BOOT_LOAD) -n 'Linux-$(KERNELRELEASE)' \ 16 -C gzip -n 'Linux-$(KERNELRELEASE)' -a $(CONFIG_BOOT_LOAD) \
17 -e $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}') \
17 -d $< $@ 18 -d $< $@
18 19
19$(obj)/vmlinux.bin: vmlinux FORCE 20$(obj)/vmlinux.bin: vmlinux FORCE
diff --git a/arch/blackfin/configs/BF533-EZKIT_defconfig b/arch/blackfin/configs/BF533-EZKIT_defconfig
index 90d58aabe6..1cf1ab28dc 100644
--- a/arch/blackfin/configs/BF533-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF533-EZKIT_defconfig
@@ -1,6 +1,6 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21.3 3# Linux kernel version: 2.6.21.5
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
@@ -115,17 +115,26 @@ CONFIG_BF533=y
115# CONFIG_BF534 is not set 115# CONFIG_BF534 is not set
116# CONFIG_BF536 is not set 116# CONFIG_BF536 is not set
117# CONFIG_BF537 is not set 117# CONFIG_BF537 is not set
118# CONFIG_BF542 is not set
119# CONFIG_BF544 is not set
120# CONFIG_BF548 is not set
121# CONFIG_BF549 is not set
118# CONFIG_BF561 is not set 122# CONFIG_BF561 is not set
123# CONFIG_BF_REV_0_0 is not set
119# CONFIG_BF_REV_0_2 is not set 124# CONFIG_BF_REV_0_2 is not set
120CONFIG_BF_REV_0_3=y 125CONFIG_BF_REV_0_3=y
121# CONFIG_BF_REV_0_4 is not set 126# CONFIG_BF_REV_0_4 is not set
122# CONFIG_BF_REV_0_5 is not set 127# CONFIG_BF_REV_0_5 is not set
128# CONFIG_BF_REV_ANY is not set
129# CONFIG_BF_REV_NONE is not set
130CONFIG_BF53x=y
123CONFIG_BFIN_SINGLE_CORE=y 131CONFIG_BFIN_SINGLE_CORE=y
124CONFIG_BFIN533_EZKIT=y 132CONFIG_BFIN533_EZKIT=y
125# CONFIG_BFIN533_STAMP is not set 133# CONFIG_BFIN533_STAMP is not set
126# CONFIG_BFIN537_STAMP is not set 134# CONFIG_BFIN537_STAMP is not set
127# CONFIG_BFIN533_BLUETECHNIX_CM is not set 135# CONFIG_BFIN533_BLUETECHNIX_CM is not set
128# CONFIG_BFIN537_BLUETECHNIX_CM is not set 136# CONFIG_BFIN537_BLUETECHNIX_CM is not set
137# CONFIG_BFIN548_EZKIT is not set
129# CONFIG_BFIN561_BLUETECHNIX_CM is not set 138# CONFIG_BFIN561_BLUETECHNIX_CM is not set
130# CONFIG_BFIN561_EZKIT is not set 139# CONFIG_BFIN561_EZKIT is not set
131# CONFIG_BFIN561_TEPLA is not set 140# CONFIG_BFIN561_TEPLA is not set
@@ -634,6 +643,7 @@ CONFIG_NETDEVICES=y
634CONFIG_NET_ETHERNET=y 643CONFIG_NET_ETHERNET=y
635CONFIG_MII=y 644CONFIG_MII=y
636CONFIG_SMC91X=y 645CONFIG_SMC91X=y
646# CONFIG_SMSC911X is not set
637 647
638# 648#
639# Ethernet (1000 Mbit) 649# Ethernet (1000 Mbit)
diff --git a/arch/blackfin/configs/BF533-STAMP_defconfig b/arch/blackfin/configs/BF533-STAMP_defconfig
index fee9189573..64b7f1b3b2 100644
--- a/arch/blackfin/configs/BF533-STAMP_defconfig
+++ b/arch/blackfin/configs/BF533-STAMP_defconfig
@@ -1,6 +1,6 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21.3 3# Linux kernel version: 2.6.21.5
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
@@ -115,17 +115,26 @@ CONFIG_BF533=y
115# CONFIG_BF534 is not set 115# CONFIG_BF534 is not set
116# CONFIG_BF536 is not set 116# CONFIG_BF536 is not set
117# CONFIG_BF537 is not set 117# CONFIG_BF537 is not set
118# CONFIG_BF542 is not set
119# CONFIG_BF544 is not set
120# CONFIG_BF548 is not set
121# CONFIG_BF549 is not set
118# CONFIG_BF561 is not set 122# CONFIG_BF561 is not set
123# CONFIG_BF_REV_0_0 is not set
119# CONFIG_BF_REV_0_2 is not set 124# CONFIG_BF_REV_0_2 is not set
120CONFIG_BF_REV_0_3=y 125CONFIG_BF_REV_0_3=y
121# CONFIG_BF_REV_0_4 is not set 126# CONFIG_BF_REV_0_4 is not set
122# CONFIG_BF_REV_0_5 is not set 127# CONFIG_BF_REV_0_5 is not set
128# CONFIG_BF_REV_ANY is not set
129# CONFIG_BF_REV_NONE is not set
130CONFIG_BF53x=y
123CONFIG_BFIN_SINGLE_CORE=y 131CONFIG_BFIN_SINGLE_CORE=y
124# CONFIG_BFIN533_EZKIT is not set 132# CONFIG_BFIN533_EZKIT is not set
125CONFIG_BFIN533_STAMP=y 133CONFIG_BFIN533_STAMP=y
126# CONFIG_BFIN537_STAMP is not set 134# CONFIG_BFIN537_STAMP is not set
127# CONFIG_BFIN533_BLUETECHNIX_CM is not set 135# CONFIG_BFIN533_BLUETECHNIX_CM is not set
128# CONFIG_BFIN537_BLUETECHNIX_CM is not set 136# CONFIG_BFIN537_BLUETECHNIX_CM is not set
137# CONFIG_BFIN548_EZKIT is not set
129# CONFIG_BFIN561_BLUETECHNIX_CM is not set 138# CONFIG_BFIN561_BLUETECHNIX_CM is not set
130# CONFIG_BFIN561_EZKIT is not set 139# CONFIG_BFIN561_EZKIT is not set
131# CONFIG_BFIN561_TEPLA is not set 140# CONFIG_BFIN561_TEPLA is not set
@@ -646,6 +655,7 @@ CONFIG_NETDEVICES=y
646CONFIG_NET_ETHERNET=y 655CONFIG_NET_ETHERNET=y
647CONFIG_MII=y 656CONFIG_MII=y
648CONFIG_SMC91X=y 657CONFIG_SMC91X=y
658# CONFIG_SMSC911X is not set
649 659
650# 660#
651# Ethernet (1000 Mbit) 661# Ethernet (1000 Mbit)
@@ -986,9 +996,17 @@ CONFIG_SND_VERBOSE_PROCFS=y
986# 996#
987# ALSA Blackfin devices 997# ALSA Blackfin devices
988# 998#
989# CONFIG_SND_BLACKFIN_AD1836 is not set 999CONFIG_SND_BLACKFIN_AD1836=m
990# CONFIG_SND_BLACKFIN_AD1981B is not set 1000CONFIG_SND_BLACKFIN_AD1836_TDM=y
991# CONFIG_SND_BFIN_AD73311 is not set 1001# CONFIG_SND_BLACKFIN_AD1836_I2S is not set
1002CONFIG_SND_BLACKFIN_AD1836_MULSUB=y
1003# CONFIG_SND_BLACKFIN_AD1836_5P1 is not set
1004CONFIG_SND_BLACKFIN_AD1981B=m
1005CONFIG_SND_BLACKFIN_SPORT=0
1006CONFIG_SND_BLACKFIN_SPI_PFBIT=4
1007CONFIG_SND_BFIN_AD73311=m
1008CONFIG_SND_BFIN_SPORT=0
1009CONFIG_SND_BFIN_AD73311_SE=4
992 1010
993# 1011#
994# SoC audio support 1012# SoC audio support
diff --git a/arch/blackfin/configs/BF537-STAMP_defconfig b/arch/blackfin/configs/BF537-STAMP_defconfig
index 37688bb55b..ccf09dc09a 100644
--- a/arch/blackfin/configs/BF537-STAMP_defconfig
+++ b/arch/blackfin/configs/BF537-STAMP_defconfig
@@ -1,6 +1,6 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21.3 3# Linux kernel version: 2.6.21.5
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
@@ -115,17 +115,26 @@ CONFIG_PREEMPT_VOLUNTARY=y
115# CONFIG_BF534 is not set 115# CONFIG_BF534 is not set
116# CONFIG_BF536 is not set 116# CONFIG_BF536 is not set
117CONFIG_BF537=y 117CONFIG_BF537=y
118# CONFIG_BF542 is not set
119# CONFIG_BF544 is not set
120# CONFIG_BF548 is not set
121# CONFIG_BF549 is not set
118# CONFIG_BF561 is not set 122# CONFIG_BF561 is not set
123# CONFIG_BF_REV_0_0 is not set
119CONFIG_BF_REV_0_2=y 124CONFIG_BF_REV_0_2=y
120# CONFIG_BF_REV_0_3 is not set 125# CONFIG_BF_REV_0_3 is not set
121# CONFIG_BF_REV_0_4 is not set 126# CONFIG_BF_REV_0_4 is not set
122# CONFIG_BF_REV_0_5 is not set 127# CONFIG_BF_REV_0_5 is not set
128# CONFIG_BF_REV_ANY is not set
129# CONFIG_BF_REV_NONE is not set
130CONFIG_BF53x=y
123CONFIG_BFIN_SINGLE_CORE=y 131CONFIG_BFIN_SINGLE_CORE=y
124# CONFIG_BFIN533_EZKIT is not set 132# CONFIG_BFIN533_EZKIT is not set
125# CONFIG_BFIN533_STAMP is not set 133# CONFIG_BFIN533_STAMP is not set
126CONFIG_BFIN537_STAMP=y 134CONFIG_BFIN537_STAMP=y
127# CONFIG_BFIN533_BLUETECHNIX_CM is not set 135# CONFIG_BFIN533_BLUETECHNIX_CM is not set
128# CONFIG_BFIN537_BLUETECHNIX_CM is not set 136# CONFIG_BFIN537_BLUETECHNIX_CM is not set
137# CONFIG_BFIN548_EZKIT is not set
129# CONFIG_BFIN561_BLUETECHNIX_CM is not set 138# CONFIG_BFIN561_BLUETECHNIX_CM is not set
130# CONFIG_BFIN561_EZKIT is not set 139# CONFIG_BFIN561_EZKIT is not set
131# CONFIG_BFIN561_TEPLA is not set 140# CONFIG_BFIN561_TEPLA is not set
@@ -664,6 +673,7 @@ CONFIG_BFIN_MAC_USE_L1=y
664CONFIG_BFIN_TX_DESC_NUM=10 673CONFIG_BFIN_TX_DESC_NUM=10
665CONFIG_BFIN_RX_DESC_NUM=20 674CONFIG_BFIN_RX_DESC_NUM=20
666# CONFIG_BFIN_MAC_RMII is not set 675# CONFIG_BFIN_MAC_RMII is not set
676# CONFIG_SMSC911X is not set
667 677
668# 678#
669# Ethernet (1000 Mbit) 679# Ethernet (1000 Mbit)
@@ -1020,9 +1030,17 @@ CONFIG_SND_VERBOSE_PROCFS=y
1020# 1030#
1021# ALSA Blackfin devices 1031# ALSA Blackfin devices
1022# 1032#
1023# CONFIG_SND_BLACKFIN_AD1836 is not set 1033CONFIG_SND_BLACKFIN_AD1836=m
1024# CONFIG_SND_BLACKFIN_AD1981B is not set 1034CONFIG_SND_BLACKFIN_AD1836_TDM=y
1025# CONFIG_SND_BFIN_AD73311 is not set 1035# CONFIG_SND_BLACKFIN_AD1836_I2S is not set
1036CONFIG_SND_BLACKFIN_AD1836_MULSUB=y
1037# CONFIG_SND_BLACKFIN_AD1836_5P1 is not set
1038CONFIG_SND_BLACKFIN_AD1981B=m
1039CONFIG_SND_BLACKFIN_SPORT=0
1040CONFIG_SND_BLACKFIN_SPI_PFBIT=4
1041CONFIG_SND_BFIN_AD73311=m
1042CONFIG_SND_BFIN_SPORT=0
1043CONFIG_SND_BFIN_AD73311_SE=4
1026 1044
1027# 1045#
1028# SoC audio support 1046# SoC audio support
diff --git a/arch/blackfin/configs/BF548-EZKIT_defconfig b/arch/blackfin/configs/BF548-EZKIT_defconfig
new file mode 100644
index 0000000000..ac8390fafa
--- /dev/null
+++ b/arch/blackfin/configs/BF548-EZKIT_defconfig
@@ -0,0 +1,1100 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21.5
4#
5# CONFIG_MMU is not set
6# CONFIG_FPU is not set
7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
9CONFIG_BLACKFIN=y
10CONFIG_ZONE_DMA=y
11CONFIG_BFIN=y
12CONFIG_SEMAPHORE_SLEEPERS=y
13CONFIG_GENERIC_FIND_NEXT_BIT=y
14CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_HARDIRQS=y
16CONFIG_GENERIC_IRQ_PROBE=y
17# CONFIG_GENERIC_TIME is not set
18CONFIG_GENERIC_CALIBRATE_DELAY=y
19CONFIG_FORCE_MAX_ZONEORDER=14
20CONFIG_IRQCHIP_DEMUX_GPIO=y
21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
22
23#
24# Code maturity level options
25#
26CONFIG_EXPERIMENTAL=y
27CONFIG_BROKEN_ON_SMP=y
28CONFIG_INIT_ENV_ARG_LIMIT=32
29
30#
31# General setup
32#
33CONFIG_LOCALVERSION=""
34CONFIG_LOCALVERSION_AUTO=y
35CONFIG_SYSVIPC=y
36# CONFIG_IPC_NS is not set
37CONFIG_SYSVIPC_SYSCTL=y
38# CONFIG_POSIX_MQUEUE is not set
39# CONFIG_BSD_PROCESS_ACCT is not set
40# CONFIG_TASKSTATS is not set
41# CONFIG_UTS_NS is not set
42# CONFIG_AUDIT is not set
43# CONFIG_IKCONFIG is not set
44CONFIG_SYSFS_DEPRECATED=y
45# CONFIG_RELAY is not set
46CONFIG_BLK_DEV_INITRD=y
47CONFIG_INITRAMFS_SOURCE=""
48# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
49CONFIG_SYSCTL=y
50CONFIG_EMBEDDED=y
51CONFIG_UID16=y
52CONFIG_SYSCTL_SYSCALL=y
53CONFIG_KALLSYMS=y
54# CONFIG_KALLSYMS_ALL is not set
55# CONFIG_KALLSYMS_EXTRA_PASS is not set
56CONFIG_HOTPLUG=y
57CONFIG_PRINTK=y
58CONFIG_BUG=y
59CONFIG_ELF_CORE=y
60CONFIG_BASE_FULL=y
61CONFIG_FUTEX=y
62CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3
63# CONFIG_NP2 is not set
64CONFIG_SLAB=y
65CONFIG_VM_EVENT_COUNTERS=y
66CONFIG_RT_MUTEXES=y
67CONFIG_TINY_SHMEM=y
68CONFIG_BASE_SMALL=0
69# CONFIG_SLOB is not set
70
71#
72# Loadable module support
73#
74CONFIG_MODULES=y
75CONFIG_MODULE_UNLOAD=y
76# CONFIG_MODULE_FORCE_UNLOAD is not set
77# CONFIG_MODVERSIONS is not set
78# CONFIG_MODULE_SRCVERSION_ALL is not set
79CONFIG_KMOD=y
80
81#
82# Block layer
83#
84CONFIG_BLOCK=y
85# CONFIG_LBD is not set
86# CONFIG_BLK_DEV_IO_TRACE is not set
87# CONFIG_LSF is not set
88
89#
90# IO Schedulers
91#
92CONFIG_IOSCHED_NOOP=y
93CONFIG_IOSCHED_AS=y
94# CONFIG_IOSCHED_DEADLINE is not set
95CONFIG_IOSCHED_CFQ=y
96CONFIG_DEFAULT_AS=y
97# CONFIG_DEFAULT_DEADLINE is not set
98# CONFIG_DEFAULT_CFQ is not set
99# CONFIG_DEFAULT_NOOP is not set
100CONFIG_DEFAULT_IOSCHED="anticipatory"
101# CONFIG_PREEMPT_NONE is not set
102CONFIG_PREEMPT_VOLUNTARY=y
103# CONFIG_PREEMPT is not set
104
105#
106# Blackfin Processor Options
107#
108
109#
110# Processor and Board Settings
111#
112# CONFIG_BF531 is not set
113# CONFIG_BF532 is not set
114# CONFIG_BF533 is not set
115# CONFIG_BF534 is not set
116# CONFIG_BF536 is not set
117# CONFIG_BF537 is not set
118# CONFIG_BF542 is not set
119# CONFIG_BF544 is not set
120# CONFIG_BF548 is not set
121CONFIG_BF549=y
122# CONFIG_BF561 is not set
123CONFIG_BF_REV_0_0=y
124# CONFIG_BF_REV_0_2 is not set
125# CONFIG_BF_REV_0_3 is not set
126# CONFIG_BF_REV_0_4 is not set
127# CONFIG_BF_REV_0_5 is not set
128# CONFIG_BF_REV_ANY is not set
129# CONFIG_BF_REV_NONE is not set
130CONFIG_BF54x=y
131CONFIG_BFIN_SINGLE_CORE=y
132# CONFIG_BFIN533_EZKIT is not set
133# CONFIG_BFIN533_STAMP is not set
134# CONFIG_BFIN537_STAMP is not set
135# CONFIG_BFIN533_BLUETECHNIX_CM is not set
136# CONFIG_BFIN537_BLUETECHNIX_CM is not set
137CONFIG_BFIN548_EZKIT=y
138# CONFIG_BFIN561_BLUETECHNIX_CM is not set
139# CONFIG_BFIN561_EZKIT is not set
140# CONFIG_BFIN561_TEPLA is not set
141# CONFIG_PNAV10 is not set
142# CONFIG_GENERIC_BOARD is not set
143CONFIG_IRQ_PLL_WAKEUP=7
144CONFIG_IRQ_TIMER0=11
145CONFIG_IRQ_TIMER1=11
146CONFIG_IRQ_TIMER2=11
147CONFIG_IRQ_TIMER3=11
148CONFIG_IRQ_TIMER4=11
149CONFIG_IRQ_TIMER5=11
150CONFIG_IRQ_TIMER6=11
151CONFIG_IRQ_TIMER7=11
152CONFIG_IRQ_TIMER8=11
153CONFIG_IRQ_TIMER9=11
154CONFIG_IRQ_TIMER10=11
155CONFIG_IRQ_RTC=8
156CONFIG_IRQ_SPORT0_RX=9
157CONFIG_IRQ_SPORT0_TX=9
158CONFIG_IRQ_SPORT1_RX=9
159CONFIG_IRQ_SPORT1_TX=9
160CONFIG_IRQ_UART0_RX=10
161CONFIG_IRQ_UART0_TX=10
162CONFIG_IRQ_UART1_RX=10
163CONFIG_IRQ_UART1_TX=10
164
165#
166# BF548 Specific Configuration
167#
168
169#
170# Interrupt Priority Assignment
171#
172
173#
174# Priority
175#
176CONFIG_IRQ_DMAC0_ERR=7
177CONFIG_IRQ_EPPI0_ERR=7
178CONFIG_IRQ_SPORT0_ERR=7
179CONFIG_IRQ_SPORT1_ERR=7
180CONFIG_IRQ_SPI0_ERR=7
181CONFIG_IRQ_UART0_ERR=7
182CONFIG_IRQ_EPPI0=8
183CONFIG_IRQ_SPI0=10
184CONFIG_IRQ_PINT0=12
185CONFIG_IRQ_PINT1=12
186CONFIG_IRQ_MDMAS0=13
187CONFIG_IRQ_MDMAS1=13
188CONFIG_IRQ_WATCHDOG=13
189CONFIG_IRQ_DMAC1_ERR=7
190CONFIG_IRQ_SPORT2_ERR=7
191CONFIG_IRQ_SPORT3_ERR=7
192CONFIG_IRQ_MXVR_DATA=7
193CONFIG_IRQ_SPI1_ERR=7
194CONFIG_IRQ_SPI2_ERR=7
195CONFIG_IRQ_UART1_ERR=7
196CONFIG_IRQ_UART2_ERR=7
197CONFIG_IRQ_CAN0_ERR=7
198CONFIG_IRQ_SPORT2_RX=9
199CONFIG_IRQ_SPORT2_TX=9
200CONFIG_IRQ_SPORT3_RX=9
201CONFIG_IRQ_SPORT3_TX=9
202CONFIG_IRQ_EPPI1=9
203CONFIG_IRQ_EPPI2=9
204CONFIG_IRQ_SPI1=10
205CONFIG_IRQ_SPI2=10
206CONFIG_IRQ_ATAPI_RX=10
207CONFIG_IRQ_ATAPI_TX=10
208CONFIG_IRQ_TWI0=11
209CONFIG_IRQ_TWI1=11
210CONFIG_IRQ_CAN0_RX=11
211CONFIG_IRQ_CAN0_TX=11
212CONFIG_IRQ_MDMAS2=13
213CONFIG_IRQ_MDMAS3=13
214CONFIG_IRQ_MXVR_ERR=11
215CONFIG_IRQ_MXVR_MSG=11
216CONFIG_IRQ_MXVR_PKT=11
217CONFIG_IRQ_EPPI1_ERR=7
218CONFIG_IRQ_EPPI2_ERR=7
219CONFIG_IRQ_UART3_ERR=7
220CONFIG_IRQ_HOST_ERR=7
221CONFIG_IRQ_PIXC_ERR=7
222CONFIG_IRQ_NFC_ERR=7
223CONFIG_IRQ_ATAPI_ERR=7
224CONFIG_IRQ_CAN1_ERR=7
225CONFIG_IRQ_HS_DMA_ERR=7
226CONFIG_IRQ_PIXC_IN0=8
227CONFIG_IRQ_PIXC_IN1=8
228CONFIG_IRQ_PIXC_OUT=8
229CONFIG_IRQ_SDH=8
230CONFIG_IRQ_CNT=8
231CONFIG_IRQ_KEY=8
232CONFIG_IRQ_CAN1_RX=11
233CONFIG_IRQ_CAN1_TX=11
234CONFIG_IRQ_SDH_MASK0=11
235CONFIG_IRQ_SDH_MASK1=11
236CONFIG_IRQ_USB_INT0=11
237CONFIG_IRQ_USB_INT1=11
238CONFIG_IRQ_USB_INT2=11
239CONFIG_IRQ_USB_DMA=11
240CONFIG_IRQ_OTPSEC=11
241CONFIG_IRQ_PINT2=11
242CONFIG_IRQ_PINT3=11
243
244#
245# Board customizations
246#
247# CONFIG_CMDLINE_BOOL is not set
248
249#
250# Board Setup
251#
252CONFIG_CLKIN_HZ=25000000
253CONFIG_MEM_SIZE=64
254CONFIG_MEM_ADD_WIDTH=10
255CONFIG_BOOT_LOAD=0x1000
256
257#
258# Blackfin Kernel Optimizations
259#
260
261#
262# Timer Tick
263#
264# CONFIG_HZ_100 is not set
265CONFIG_HZ_250=y
266# CONFIG_HZ_300 is not set
267# CONFIG_HZ_1000 is not set
268CONFIG_HZ=250
269
270#
271# Memory Optimizations
272#
273CONFIG_I_ENTRY_L1=y
274CONFIG_EXCPT_IRQ_SYSC_L1=y
275CONFIG_DO_IRQ_L1=y
276CONFIG_CORE_TIMER_IRQ_L1=y
277CONFIG_IDLE_L1=y
278CONFIG_SCHEDULE_L1=y
279CONFIG_ARITHMETIC_OPS_L1=y
280CONFIG_ACCESS_OK_L1=y
281CONFIG_MEMSET_L1=y
282CONFIG_MEMCPY_L1=y
283CONFIG_SYS_BFIN_SPINLOCK_L1=y
284# CONFIG_IP_CHECKSUM_L1 is not set
285CONFIG_CACHELINE_ALIGNED_L1=y
286# CONFIG_SYSCALL_TAB_L1 is not set
287# CONFIG_CPLB_SWITCH_TAB_L1 is not set
288CONFIG_RAMKERNEL=y
289# CONFIG_ROMKERNEL is not set
290CONFIG_SELECT_MEMORY_MODEL=y
291CONFIG_FLATMEM_MANUAL=y
292# CONFIG_DISCONTIGMEM_MANUAL is not set
293# CONFIG_SPARSEMEM_MANUAL is not set
294CONFIG_FLATMEM=y
295CONFIG_FLAT_NODE_MEM_MAP=y
296# CONFIG_SPARSEMEM_STATIC is not set
297CONFIG_SPLIT_PTLOCK_CPUS=4
298# CONFIG_RESOURCES_64BIT is not set
299CONFIG_ZONE_DMA_FLAG=1
300CONFIG_LARGE_ALLOCS=y
301CONFIG_BFIN_DMA_5XX=y
302# CONFIG_DMA_UNCACHED_2M is not set
303CONFIG_DMA_UNCACHED_1M=y
304# CONFIG_DMA_UNCACHED_NONE is not set
305
306#
307# Cache Support
308#
309CONFIG_BLKFIN_CACHE=y
310CONFIG_BLKFIN_DCACHE=y
311# CONFIG_BLKFIN_DCACHE_BANKA is not set
312# CONFIG_BLKFIN_CACHE_LOCK is not set
313# CONFIG_BLKFIN_WB is not set
314CONFIG_BLKFIN_WT=y
315CONFIG_L1_MAX_PIECE=16
316
317#
318# Clock Settings
319#
320# CONFIG_BFIN_KERNEL_CLOCK is not set
321
322#
323# Asynchonous Memory Configuration
324#
325
326#
327# EBIU_AMBCTL Global Control
328#
329CONFIG_C_AMCKEN=y
330CONFIG_C_CDPRIO=y
331# CONFIG_C_AMBEN is not set
332# CONFIG_C_AMBEN_B0 is not set
333# CONFIG_C_AMBEN_B0_B1 is not set
334# CONFIG_C_AMBEN_B0_B1_B2 is not set
335CONFIG_C_AMBEN_ALL=y
336
337#
338# EBIU_AMBCTL Control
339#
340CONFIG_BANK_0=0x7BB0
341CONFIG_BANK_1=0x7BB0
342CONFIG_BANK_2=0x7BB0
343CONFIG_BANK_3=0x99B3
344
345#
346# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
347#
348# CONFIG_PCI is not set
349
350#
351# PCCARD (PCMCIA/CardBus) support
352#
353# CONFIG_PCCARD is not set
354
355#
356# PCI Hotplug Support
357#
358
359#
360# Executable file formats
361#
362CONFIG_BINFMT_ELF_FDPIC=y
363CONFIG_BINFMT_FLAT=y
364CONFIG_BINFMT_ZFLAT=y
365# CONFIG_BINFMT_SHARED_FLAT is not set
366# CONFIG_BINFMT_MISC is not set
367
368#
369# Power management options
370#
371# CONFIG_PM is not set
372
373#
374# CPU Frequency scaling
375#
376# CONFIG_CPU_FREQ is not set
377
378#
379# Networking
380#
381CONFIG_NET=y
382
383#
384# Networking options
385#
386# CONFIG_NETDEBUG is not set
387CONFIG_PACKET=y
388# CONFIG_PACKET_MMAP is not set
389CONFIG_UNIX=y
390CONFIG_XFRM=y
391# CONFIG_XFRM_USER is not set
392# CONFIG_XFRM_SUB_POLICY is not set
393# CONFIG_XFRM_MIGRATE is not set
394# CONFIG_NET_KEY is not set
395CONFIG_INET=y
396# CONFIG_IP_MULTICAST is not set
397# CONFIG_IP_ADVANCED_ROUTER is not set
398CONFIG_IP_FIB_HASH=y
399CONFIG_IP_PNP=y
400# CONFIG_IP_PNP_DHCP is not set
401# CONFIG_IP_PNP_BOOTP is not set
402# CONFIG_IP_PNP_RARP is not set
403# CONFIG_NET_IPIP is not set
404# CONFIG_NET_IPGRE is not set
405# CONFIG_ARPD is not set
406CONFIG_SYN_COOKIES=y
407# CONFIG_INET_AH is not set
408# CONFIG_INET_ESP is not set
409# CONFIG_INET_IPCOMP is not set
410# CONFIG_INET_XFRM_TUNNEL is not set
411# CONFIG_INET_TUNNEL is not set
412CONFIG_INET_XFRM_MODE_TRANSPORT=y
413CONFIG_INET_XFRM_MODE_TUNNEL=y
414CONFIG_INET_XFRM_MODE_BEET=y
415CONFIG_INET_DIAG=y
416CONFIG_INET_TCP_DIAG=y
417# CONFIG_TCP_CONG_ADVANCED is not set
418CONFIG_TCP_CONG_CUBIC=y
419CONFIG_DEFAULT_TCP_CONG="cubic"
420# CONFIG_TCP_MD5SIG is not set
421# CONFIG_IPV6 is not set
422# CONFIG_INET6_XFRM_TUNNEL is not set
423# CONFIG_INET6_TUNNEL is not set
424# CONFIG_NETLABEL is not set
425# CONFIG_NETWORK_SECMARK is not set
426# CONFIG_NETFILTER is not set
427
428#
429# DCCP Configuration (EXPERIMENTAL)
430#
431# CONFIG_IP_DCCP is not set
432
433#
434# SCTP Configuration (EXPERIMENTAL)
435#
436# CONFIG_IP_SCTP is not set
437
438#
439# TIPC Configuration (EXPERIMENTAL)
440#
441# CONFIG_TIPC is not set
442# CONFIG_ATM is not set
443# CONFIG_BRIDGE is not set
444# CONFIG_VLAN_8021Q is not set
445# CONFIG_DECNET is not set
446# CONFIG_LLC2 is not set
447# CONFIG_IPX is not set
448# CONFIG_ATALK is not set
449# CONFIG_X25 is not set
450# CONFIG_LAPB is not set
451# CONFIG_ECONET is not set
452# CONFIG_WAN_ROUTER is not set
453
454#
455# QoS and/or fair queueing
456#
457# CONFIG_NET_SCHED is not set
458
459#
460# Network testing
461#
462# CONFIG_NET_PKTGEN is not set
463# CONFIG_HAMRADIO is not set
464# CONFIG_IRDA is not set
465# CONFIG_BT is not set
466# CONFIG_IEEE80211 is not set
467
468#
469# Device Drivers
470#
471
472#
473# Generic Driver Options
474#
475CONFIG_STANDALONE=y
476CONFIG_PREVENT_FIRMWARE_BUILD=y
477# CONFIG_FW_LOADER is not set
478# CONFIG_DEBUG_DRIVER is not set
479# CONFIG_DEBUG_DEVRES is not set
480# CONFIG_SYS_HYPERVISOR is not set
481
482#
483# Connector - unified userspace <-> kernelspace linker
484#
485# CONFIG_CONNECTOR is not set
486
487#
488# Memory Technology Devices (MTD)
489#
490CONFIG_MTD=y
491# CONFIG_MTD_DEBUG is not set
492# CONFIG_MTD_CONCAT is not set
493CONFIG_MTD_PARTITIONS=y
494# CONFIG_MTD_REDBOOT_PARTS is not set
495# CONFIG_MTD_CMDLINE_PARTS is not set
496
497#
498# User Modules And Translation Layers
499#
500# CONFIG_MTD_CHAR is not set
501CONFIG_MTD_BLKDEVS=y
502CONFIG_MTD_BLOCK=y
503# CONFIG_FTL is not set
504# CONFIG_NFTL is not set
505# CONFIG_INFTL is not set
506# CONFIG_RFD_FTL is not set
507# CONFIG_SSFDC is not set
508
509#
510# RAM/ROM/Flash chip drivers
511#
512# CONFIG_MTD_CFI is not set
513# CONFIG_MTD_JEDECPROBE is not set
514CONFIG_MTD_MAP_BANK_WIDTH_1=y
515CONFIG_MTD_MAP_BANK_WIDTH_2=y
516CONFIG_MTD_MAP_BANK_WIDTH_4=y
517# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
518# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
519# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
520CONFIG_MTD_CFI_I1=y
521CONFIG_MTD_CFI_I2=y
522# CONFIG_MTD_CFI_I4 is not set
523# CONFIG_MTD_CFI_I8 is not set
524CONFIG_MTD_RAM=y
525# CONFIG_MTD_ROM is not set
526# CONFIG_MTD_ABSENT is not set
527# CONFIG_MTD_OBSOLETE_CHIPS is not set
528
529#
530# Mapping drivers for chip access
531#
532CONFIG_MTD_COMPLEX_MAPPINGS=y
533# CONFIG_MTD_BF5xx is not set
534CONFIG_MTD_UCLINUX=y
535# CONFIG_MTD_PLATRAM is not set
536
537#
538# Self-contained MTD device drivers
539#
540# CONFIG_MTD_SLRAM is not set
541# CONFIG_MTD_PHRAM is not set
542# CONFIG_MTD_MTDRAM is not set
543# CONFIG_MTD_BLOCK2MTD is not set
544
545#
546# Disk-On-Chip Device Drivers
547#
548# CONFIG_MTD_DOC2000 is not set
549# CONFIG_MTD_DOC2001 is not set
550# CONFIG_MTD_DOC2001PLUS is not set
551
552#
553# NAND Flash Device Drivers
554#
555# CONFIG_MTD_NAND is not set
556
557#
558# OneNAND Flash Device Drivers
559#
560# CONFIG_MTD_ONENAND is not set
561
562#
563# Parallel port support
564#
565# CONFIG_PARPORT is not set
566
567#
568# Plug and Play support
569#
570# CONFIG_PNPACPI is not set
571
572#
573# Block devices
574#
575# CONFIG_BLK_DEV_COW_COMMON is not set
576# CONFIG_BLK_DEV_LOOP is not set
577# CONFIG_BLK_DEV_NBD is not set
578CONFIG_BLK_DEV_RAM=y
579CONFIG_BLK_DEV_RAM_COUNT=16
580CONFIG_BLK_DEV_RAM_SIZE=4096
581CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
582# CONFIG_CDROM_PKTCDVD is not set
583# CONFIG_ATA_OVER_ETH is not set
584
585#
586# Misc devices
587#
588
589#
590# ATA/ATAPI/MFM/RLL support
591#
592# CONFIG_IDE is not set
593
594#
595# SCSI device support
596#
597# CONFIG_RAID_ATTRS is not set
598# CONFIG_SCSI is not set
599# CONFIG_SCSI_NETLINK is not set
600
601#
602# Serial ATA (prod) and Parallel ATA (experimental) drivers
603#
604# CONFIG_ATA is not set
605
606#
607# Multi-device support (RAID and LVM)
608#
609# CONFIG_MD is not set
610
611#
612# Fusion MPT device support
613#
614# CONFIG_FUSION is not set
615
616#
617# IEEE 1394 (FireWire) support
618#
619
620#
621# I2O device support
622#
623
624#
625# Network device support
626#
627CONFIG_NETDEVICES=y
628# CONFIG_DUMMY is not set
629# CONFIG_BONDING is not set
630# CONFIG_EQUALIZER is not set
631# CONFIG_TUN is not set
632
633#
634# PHY device support
635#
636# CONFIG_PHYLIB is not set
637
638#
639# Ethernet (10 or 100Mbit)
640#
641CONFIG_NET_ETHERNET=y
642CONFIG_MII=y
643# CONFIG_SMC91X is not set
644# CONFIG_SMSC911X is not set
645
646#
647# Ethernet (1000 Mbit)
648#
649
650#
651# Ethernet (10000 Mbit)
652#
653
654#
655# Token Ring devices
656#
657
658#
659# Wireless LAN (non-hamradio)
660#
661# CONFIG_NET_RADIO is not set
662
663#
664# Wan interfaces
665#
666# CONFIG_WAN is not set
667# CONFIG_PPP is not set
668# CONFIG_SLIP is not set
669# CONFIG_SHAPER is not set
670# CONFIG_NETCONSOLE is not set
671# CONFIG_NETPOLL is not set
672# CONFIG_NET_POLL_CONTROLLER is not set
673
674#
675# ISDN subsystem
676#
677# CONFIG_ISDN is not set
678
679#
680# Telephony Support
681#
682# CONFIG_PHONE is not set
683
684#
685# Input device support
686#
687CONFIG_INPUT=y
688# CONFIG_INPUT_FF_MEMLESS is not set
689
690#
691# Userland interfaces
692#
693# CONFIG_INPUT_MOUSEDEV is not set
694# CONFIG_INPUT_JOYDEV is not set
695# CONFIG_INPUT_TSDEV is not set
696# CONFIG_INPUT_EVDEV is not set
697# CONFIG_INPUT_EVBUG is not set
698
699#
700# Input Device Drivers
701#
702# CONFIG_INPUT_KEYBOARD is not set
703# CONFIG_INPUT_MOUSE is not set
704# CONFIG_INPUT_JOYSTICK is not set
705# CONFIG_INPUT_TOUCHSCREEN is not set
706CONFIG_INPUT_MISC=y
707# CONFIG_INPUT_UINPUT is not set
708# CONFIG_BF53X_PFBUTTONS is not set
709
710#
711# Hardware I/O ports
712#
713# CONFIG_SERIO is not set
714# CONFIG_GAMEPORT is not set
715
716#
717# Character devices
718#
719# CONFIG_AD9960 is not set
720# CONFIG_SPI_ADC_BF533 is not set
721# CONFIG_BF5xx_PFLAGS is not set
722# CONFIG_BF5xx_PPIFCD is not set
723# CONFIG_BF5xx_TIMERS is not set
724# CONFIG_BF5xx_PPI is not set
725# CONFIG_BFIN_SPORT is not set
726# CONFIG_BFIN_TIMER_LATENCY is not set
727# CONFIG_BF5xx_FBDMA is not set
728# CONFIG_VT is not set
729# CONFIG_SERIAL_NONSTANDARD is not set
730
731#
732# Serial drivers
733#
734# CONFIG_SERIAL_8250 is not set
735
736#
737# Non-8250 serial port support
738#
739CONFIG_SERIAL_BFIN=y
740CONFIG_SERIAL_BFIN_CONSOLE=y
741# CONFIG_SERIAL_BFIN_DMA is not set
742CONFIG_SERIAL_BFIN_PIO=y
743# CONFIG_SERIAL_BFIN_UART0 is not set
744CONFIG_SERIAL_BFIN_UART1=y
745# CONFIG_BFIN_UART1_CTSRTS is not set
746# CONFIG_SERIAL_BFIN_UART2 is not set
747# CONFIG_SERIAL_BFIN_UART3 is not set
748CONFIG_SERIAL_CORE=y
749CONFIG_SERIAL_CORE_CONSOLE=y
750# CONFIG_SERIAL_BFIN_SPORT is not set
751CONFIG_UNIX98_PTYS=y
752# CONFIG_LEGACY_PTYS is not set
753
754#
755# CAN, the car bus and industrial fieldbus
756#
757# CONFIG_CAN4LINUX is not set
758
759#
760# IPMI
761#
762# CONFIG_IPMI_HANDLER is not set
763
764#
765# Watchdog Cards
766#
767# CONFIG_WATCHDOG is not set
768CONFIG_HW_RANDOM=y
769# CONFIG_GEN_RTC is not set
770# CONFIG_DTLK is not set
771# CONFIG_R3964 is not set
772# CONFIG_RAW_DRIVER is not set
773
774#
775# TPM devices
776#
777# CONFIG_TCG_TPM is not set
778
779#
780# I2C support
781#
782# CONFIG_I2C is not set
783
784#
785# SPI support
786#
787# CONFIG_SPI is not set
788# CONFIG_SPI_MASTER is not set
789
790#
791# Dallas's 1-wire bus
792#
793# CONFIG_W1 is not set
794
795#
796# Hardware Monitoring support
797#
798CONFIG_HWMON=y
799# CONFIG_HWMON_VID is not set
800# CONFIG_SENSORS_ABITUGURU is not set
801# CONFIG_SENSORS_F71805F is not set
802# CONFIG_SENSORS_PC87427 is not set
803# CONFIG_SENSORS_VT1211 is not set
804# CONFIG_HWMON_DEBUG_CHIP is not set
805
806#
807# Multifunction device drivers
808#
809# CONFIG_MFD_SM501 is not set
810
811#
812# Multimedia devices
813#
814# CONFIG_VIDEO_DEV is not set
815
816#
817# Digital Video Broadcasting Devices
818#
819# CONFIG_DVB is not set
820
821#
822# Graphics support
823#
824# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
825# CONFIG_FB is not set
826
827#
828# Sound
829#
830# CONFIG_SOUND is not set
831
832#
833# HID Devices
834#
835CONFIG_HID=y
836# CONFIG_HID_DEBUG is not set
837
838#
839# USB support
840#
841CONFIG_USB_ARCH_HAS_HCD=y
842# CONFIG_USB_ARCH_HAS_OHCI is not set
843# CONFIG_USB_ARCH_HAS_EHCI is not set
844# CONFIG_USB is not set
845
846#
847# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
848#
849
850#
851# USB Gadget Support
852#
853# CONFIG_USB_GADGET is not set
854
855#
856# MMC/SD Card support
857#
858# CONFIG_MMC is not set
859
860#
861# LED devices
862#
863# CONFIG_NEW_LEDS is not set
864
865#
866# LED drivers
867#
868
869#
870# LED Triggers
871#
872
873#
874# InfiniBand support
875#
876
877#
878# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
879#
880
881#
882# Real Time Clock
883#
884CONFIG_RTC_LIB=y
885CONFIG_RTC_CLASS=y
886CONFIG_RTC_HCTOSYS=y
887CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
888# CONFIG_RTC_DEBUG is not set
889
890#
891# RTC interfaces
892#
893CONFIG_RTC_INTF_SYSFS=y
894CONFIG_RTC_INTF_PROC=y
895CONFIG_RTC_INTF_DEV=y
896# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
897
898#
899# RTC drivers
900#
901# CONFIG_RTC_DRV_DS1553 is not set
902# CONFIG_RTC_DRV_DS1742 is not set
903# CONFIG_RTC_DRV_M48T86 is not set
904# CONFIG_RTC_DRV_TEST is not set
905# CONFIG_RTC_DRV_V3020 is not set
906CONFIG_RTC_DRV_BFIN=y
907
908#
909# DMA Engine support
910#
911# CONFIG_DMA_ENGINE is not set
912
913#
914# DMA Clients
915#
916
917#
918# DMA Devices
919#
920
921#
922# Auxiliary Display support
923#
924
925#
926# Virtualization
927#
928
929#
930# PBX support
931#
932# CONFIG_PBX is not set
933
934#
935# File systems
936#
937CONFIG_EXT2_FS=y
938CONFIG_EXT2_FS_XATTR=y
939# CONFIG_EXT2_FS_POSIX_ACL is not set
940# CONFIG_EXT2_FS_SECURITY is not set
941# CONFIG_EXT3_FS is not set
942# CONFIG_EXT4DEV_FS is not set
943CONFIG_FS_MBCACHE=y
944# CONFIG_REISERFS_FS is not set
945# CONFIG_JFS_FS is not set
946# CONFIG_FS_POSIX_ACL is not set
947# CONFIG_XFS_FS is not set
948# CONFIG_GFS2_FS is not set
949# CONFIG_OCFS2_FS is not set
950# CONFIG_MINIX_FS is not set
951# CONFIG_ROMFS_FS is not set
952CONFIG_INOTIFY=y
953CONFIG_INOTIFY_USER=y
954# CONFIG_QUOTA is not set
955CONFIG_DNOTIFY=y
956# CONFIG_AUTOFS_FS is not set
957# CONFIG_AUTOFS4_FS is not set
958# CONFIG_FUSE_FS is not set
959
960#
961# CD-ROM/DVD Filesystems
962#
963# CONFIG_ISO9660_FS is not set
964# CONFIG_UDF_FS is not set
965
966#
967# DOS/FAT/NT Filesystems
968#
969# CONFIG_MSDOS_FS is not set
970# CONFIG_VFAT_FS is not set
971# CONFIG_NTFS_FS is not set
972
973#
974# Pseudo filesystems
975#
976CONFIG_PROC_FS=y
977CONFIG_PROC_SYSCTL=y
978CONFIG_SYSFS=y
979# CONFIG_TMPFS is not set
980# CONFIG_HUGETLB_PAGE is not set
981CONFIG_RAMFS=y
982# CONFIG_CONFIGFS_FS is not set
983
984#
985# Miscellaneous filesystems
986#
987# CONFIG_ADFS_FS is not set
988# CONFIG_AFFS_FS is not set
989# CONFIG_HFS_FS is not set
990# CONFIG_HFSPLUS_FS is not set
991# CONFIG_BEFS_FS is not set
992# CONFIG_BFS_FS is not set
993# CONFIG_EFS_FS is not set
994# CONFIG_YAFFS_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#
1006# CONFIG_NFS_FS is not set
1007# CONFIG_NFSD is not set
1008# CONFIG_SMB_FS is not set
1009# CONFIG_CIFS is not set
1010# CONFIG_NCP_FS is not set
1011# CONFIG_CODA_FS is not set
1012# CONFIG_AFS_FS is not set
1013# CONFIG_9P_FS is not set
1014
1015#
1016# Partition Types
1017#
1018# CONFIG_PARTITION_ADVANCED is not set
1019CONFIG_MSDOS_PARTITION=y
1020
1021#
1022# Native Language Support
1023#
1024# CONFIG_NLS is not set
1025
1026#
1027# Distributed Lock Manager
1028#
1029# CONFIG_DLM is not set
1030
1031#
1032# Profiling support
1033#
1034# CONFIG_PROFILING is not set
1035
1036#
1037# Kernel hacking
1038#
1039# CONFIG_PRINTK_TIME is not set
1040CONFIG_ENABLE_MUST_CHECK=y
1041CONFIG_MAGIC_SYSRQ=y
1042# CONFIG_UNUSED_SYMBOLS is not set
1043# CONFIG_DEBUG_FS is not set
1044# CONFIG_HEADERS_CHECK is not set
1045CONFIG_DEBUG_KERNEL=y
1046# CONFIG_DEBUG_SHIRQ is not set
1047CONFIG_LOG_BUF_SHIFT=14
1048CONFIG_DETECT_SOFTLOCKUP=y
1049# CONFIG_SCHEDSTATS is not set
1050# CONFIG_TIMER_STATS is not set
1051# CONFIG_DEBUG_SLAB is not set
1052# CONFIG_DEBUG_RT_MUTEXES is not set
1053# CONFIG_RT_MUTEX_TESTER is not set
1054# CONFIG_DEBUG_SPINLOCK is not set
1055# CONFIG_DEBUG_MUTEXES is not set
1056# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1057# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1058# CONFIG_DEBUG_KOBJECT is not set
1059# CONFIG_DEBUG_BUGVERBOSE is not set
1060CONFIG_DEBUG_INFO=y
1061# CONFIG_DEBUG_VM is not set
1062# CONFIG_DEBUG_LIST is not set
1063CONFIG_FRAME_POINTER=y
1064CONFIG_FORCED_INLINING=y
1065# CONFIG_RCU_TORTURE_TEST is not set
1066# CONFIG_FAULT_INJECTION is not set
1067CONFIG_DEBUG_HWERR=y
1068# CONFIG_DEBUG_ICACHE_CHECK is not set
1069# CONFIG_DEBUG_KERNEL_START is not set
1070# CONFIG_DEBUG_SERIAL_EARLY_INIT is not set
1071CONFIG_DEBUG_HUNT_FOR_ZERO=y
1072# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
1073CONFIG_CPLB_INFO=y
1074CONFIG_ACCESS_CHECK=y
1075
1076#
1077# Security options
1078#
1079# CONFIG_KEYS is not set
1080CONFIG_SECURITY=y
1081# CONFIG_SECURITY_NETWORK is not set
1082CONFIG_SECURITY_CAPABILITIES=y
1083
1084#
1085# Cryptographic options
1086#
1087# CONFIG_CRYPTO is not set
1088
1089#
1090# Library routines
1091#
1092CONFIG_BITREVERSE=y
1093# CONFIG_CRC_CCITT is not set
1094# CONFIG_CRC16 is not set
1095CONFIG_CRC32=y
1096# CONFIG_LIBCRC32C is not set
1097CONFIG_ZLIB_INFLATE=y
1098CONFIG_PLIST=y
1099CONFIG_HAS_IOMEM=y
1100CONFIG_HAS_IOPORT=y
diff --git a/arch/blackfin/configs/BF561-EZKIT_defconfig b/arch/blackfin/configs/BF561-EZKIT_defconfig
index fe4e67deba..51c0b6f977 100644
--- a/arch/blackfin/configs/BF561-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF561-EZKIT_defconfig
@@ -1,6 +1,6 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21.3 3# Linux kernel version: 2.6.21.5
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
@@ -115,17 +115,25 @@ CONFIG_PREEMPT_VOLUNTARY=y
115# CONFIG_BF534 is not set 115# CONFIG_BF534 is not set
116# CONFIG_BF536 is not set 116# CONFIG_BF536 is not set
117# CONFIG_BF537 is not set 117# CONFIG_BF537 is not set
118# CONFIG_BF542 is not set
119# CONFIG_BF544 is not set
120# CONFIG_BF548 is not set
121# CONFIG_BF549 is not set
118CONFIG_BF561=y 122CONFIG_BF561=y
123# CONFIG_BF_REV_0_0 is not set
119# CONFIG_BF_REV_0_2 is not set 124# CONFIG_BF_REV_0_2 is not set
120CONFIG_BF_REV_0_3=y 125CONFIG_BF_REV_0_3=y
121# CONFIG_BF_REV_0_4 is not set 126# CONFIG_BF_REV_0_4 is not set
122# CONFIG_BF_REV_0_5 is not set 127# CONFIG_BF_REV_0_5 is not set
128# CONFIG_BF_REV_ANY is not set
129# CONFIG_BF_REV_NONE is not set
123CONFIG_BFIN_DUAL_CORE=y 130CONFIG_BFIN_DUAL_CORE=y
124# CONFIG_BFIN533_EZKIT is not set 131# CONFIG_BFIN533_EZKIT is not set
125# CONFIG_BFIN533_STAMP is not set 132# CONFIG_BFIN533_STAMP is not set
126# CONFIG_BFIN537_STAMP is not set 133# CONFIG_BFIN537_STAMP is not set
127# CONFIG_BFIN533_BLUETECHNIX_CM is not set 134# CONFIG_BFIN533_BLUETECHNIX_CM is not set
128# CONFIG_BFIN537_BLUETECHNIX_CM is not set 135# CONFIG_BFIN537_BLUETECHNIX_CM is not set
136# CONFIG_BFIN548_EZKIT is not set
129# CONFIG_BFIN561_BLUETECHNIX_CM is not set 137# CONFIG_BFIN561_BLUETECHNIX_CM is not set
130CONFIG_BFIN561_EZKIT=y 138CONFIG_BFIN561_EZKIT=y
131# CONFIG_BFIN561_TEPLA is not set 139# CONFIG_BFIN561_TEPLA is not set
@@ -673,6 +681,7 @@ CONFIG_NETDEVICES=y
673CONFIG_NET_ETHERNET=y 681CONFIG_NET_ETHERNET=y
674CONFIG_MII=y 682CONFIG_MII=y
675CONFIG_SMC91X=y 683CONFIG_SMC91X=y
684# CONFIG_SMSC911X is not set
676 685
677# 686#
678# Ethernet (1000 Mbit) 687# Ethernet (1000 Mbit)
@@ -801,7 +810,6 @@ CONFIG_WATCHDOG=y
801CONFIG_BFIN_WDT=y 810CONFIG_BFIN_WDT=y
802CONFIG_HW_RANDOM=y 811CONFIG_HW_RANDOM=y
803# CONFIG_GEN_RTC is not set 812# CONFIG_GEN_RTC is not set
804# CONFIG_BLACKFIN_DPMC is not set
805# CONFIG_DTLK is not set 813# CONFIG_DTLK is not set
806# CONFIG_R3964 is not set 814# CONFIG_R3964 is not set
807# CONFIG_RAW_DRIVER is not set 815# CONFIG_RAW_DRIVER is not set
diff --git a/arch/blackfin/configs/PNAV-10_defconfig b/arch/blackfin/configs/PNAV-10_defconfig
index a783ff69ac..983ed181c8 100644
--- a/arch/blackfin/configs/PNAV-10_defconfig
+++ b/arch/blackfin/configs/PNAV-10_defconfig
@@ -1,6 +1,6 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21.3 3# Linux kernel version: 2.6.21.5
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
@@ -114,17 +114,26 @@ CONFIG_PREEMPT_VOLUNTARY=y
114# CONFIG_BF534 is not set 114# CONFIG_BF534 is not set
115# CONFIG_BF536 is not set 115# CONFIG_BF536 is not set
116CONFIG_BF537=y 116CONFIG_BF537=y
117# CONFIG_BF542 is not set
118# CONFIG_BF544 is not set
119# CONFIG_BF548 is not set
120# CONFIG_BF549 is not set
117# CONFIG_BF561 is not set 121# CONFIG_BF561 is not set
122# CONFIG_BF_REV_0_0 is not set
118CONFIG_BF_REV_0_2=y 123CONFIG_BF_REV_0_2=y
119# CONFIG_BF_REV_0_3 is not set 124# CONFIG_BF_REV_0_3 is not set
120# CONFIG_BF_REV_0_4 is not set 125# CONFIG_BF_REV_0_4 is not set
121# CONFIG_BF_REV_0_5 is not set 126# CONFIG_BF_REV_0_5 is not set
127# CONFIG_BF_REV_ANY is not set
128# CONFIG_BF_REV_NONE is not set
129CONFIG_BF53x=y
122CONFIG_BFIN_SINGLE_CORE=y 130CONFIG_BFIN_SINGLE_CORE=y
123# CONFIG_BFIN533_EZKIT is not set 131# CONFIG_BFIN533_EZKIT is not set
124# CONFIG_BFIN533_STAMP is not set 132# CONFIG_BFIN533_STAMP is not set
125# CONFIG_BFIN537_STAMP is not set 133# CONFIG_BFIN537_STAMP is not set
126# CONFIG_BFIN533_BLUETECHNIX_CM is not set 134# CONFIG_BFIN533_BLUETECHNIX_CM is not set
127# CONFIG_BFIN537_BLUETECHNIX_CM is not set 135# CONFIG_BFIN537_BLUETECHNIX_CM is not set
136# CONFIG_BFIN548_EZKIT is not set
128# CONFIG_BFIN561_BLUETECHNIX_CM is not set 137# CONFIG_BFIN561_BLUETECHNIX_CM is not set
129# CONFIG_BFIN561_EZKIT is not set 138# CONFIG_BFIN561_EZKIT is not set
130# CONFIG_BFIN561_TEPLA is not set 139# CONFIG_BFIN561_TEPLA is not set
@@ -598,6 +607,7 @@ CONFIG_BFIN_MAC=y
598CONFIG_BFIN_TX_DESC_NUM=100 607CONFIG_BFIN_TX_DESC_NUM=100
599CONFIG_BFIN_RX_DESC_NUM=100 608CONFIG_BFIN_RX_DESC_NUM=100
600CONFIG_BFIN_MAC_RMII=y 609CONFIG_BFIN_MAC_RMII=y
610# CONFIG_SMSC911X is not set
601 611
602# 612#
603# Ethernet (1000 Mbit) 613# Ethernet (1000 Mbit)
@@ -746,7 +756,6 @@ CONFIG_CAN_BLACKFIN=m
746# CONFIG_WATCHDOG is not set 756# CONFIG_WATCHDOG is not set
747CONFIG_HW_RANDOM=y 757CONFIG_HW_RANDOM=y
748# CONFIG_GEN_RTC is not set 758# CONFIG_GEN_RTC is not set
749CONFIG_BLACKFIN_DPMC=y
750# CONFIG_DTLK is not set 759# CONFIG_DTLK is not set
751# CONFIG_R3964 is not set 760# CONFIG_R3964 is not set
752# CONFIG_RAW_DRIVER is not set 761# CONFIG_RAW_DRIVER is not set
diff --git a/arch/blackfin/kernel/Makefile b/arch/blackfin/kernel/Makefile
index f3b7d2f9d4..f429ebc3a9 100644
--- a/arch/blackfin/kernel/Makefile
+++ b/arch/blackfin/kernel/Makefile
@@ -6,9 +6,12 @@ extra-y := init_task.o vmlinux.lds
6 6
7obj-y := \ 7obj-y := \
8 entry.o process.o bfin_ksyms.o ptrace.o setup.o signal.o \ 8 entry.o process.o bfin_ksyms.o ptrace.o setup.o signal.o \
9 sys_bfin.o time.o traps.o irqchip.o dma-mapping.o bfin_gpio.o \ 9 sys_bfin.o time.o traps.o irqchip.o dma-mapping.o flat.o \
10 flat.o 10 fixed_code.o cplbinit.o cacheinit.o
11 11
12obj-$(CONFIG_BF53x) += bfin_gpio.o
13obj-$(CONFIG_BF561) += bfin_gpio.o
12obj-$(CONFIG_MODULES) += module.o 14obj-$(CONFIG_MODULES) += module.o
13obj-$(CONFIG_BFIN_DMA_5XX) += bfin_dma_5xx.o 15obj-$(CONFIG_BFIN_DMA_5XX) += bfin_dma_5xx.o
14obj-$(CONFIG_DUAL_CORE_TEST_MODULE) += dualcore_test.o 16obj-$(CONFIG_DUAL_CORE_TEST_MODULE) += dualcore_test.o
17obj-$(CONFIG_KGDB) += kgdb.o
diff --git a/arch/blackfin/kernel/asm-offsets.c b/arch/blackfin/kernel/asm-offsets.c
index e455f45045..b56b2741cd 100644
--- a/arch/blackfin/kernel/asm-offsets.c
+++ b/arch/blackfin/kernel/asm-offsets.c
@@ -32,11 +32,10 @@
32#include <linux/kernel_stat.h> 32#include <linux/kernel_stat.h>
33#include <linux/ptrace.h> 33#include <linux/ptrace.h>
34#include <linux/hardirq.h> 34#include <linux/hardirq.h>
35#include <asm/irq.h> 35#include <linux/irq.h>
36#include <asm/thread_info.h> 36#include <linux/thread_info.h>
37 37
38#define DEFINE(sym, val) \ 38#define DEFINE(sym, val) asm volatile("\n->" #sym " %0 " #val : : "i" (val))
39 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
40 39
41int main(void) 40int main(void)
42{ 41{
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c
index 069a896a8f..7cf02f02a1 100644
--- a/arch/blackfin/kernel/bfin_dma_5xx.c
+++ b/arch/blackfin/kernel/bfin_dma_5xx.c
@@ -34,6 +34,7 @@
34#include <linux/kernel.h> 34#include <linux/kernel.h>
35#include <linux/param.h> 35#include <linux/param.h>
36 36
37#include <asm/blackfin.h>
37#include <asm/dma.h> 38#include <asm/dma.h>
38#include <asm/cacheflush.h> 39#include <asm/cacheflush.h>
39 40
@@ -45,67 +46,6 @@
45***************************************************************************/ 46***************************************************************************/
46 47
47static struct dma_channel dma_ch[MAX_BLACKFIN_DMA_CHANNEL]; 48static struct dma_channel dma_ch[MAX_BLACKFIN_DMA_CHANNEL];
48#if defined (CONFIG_BF561)
49static struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
50 (struct dma_register *) DMA1_0_NEXT_DESC_PTR,
51 (struct dma_register *) DMA1_1_NEXT_DESC_PTR,
52 (struct dma_register *) DMA1_2_NEXT_DESC_PTR,
53 (struct dma_register *) DMA1_3_NEXT_DESC_PTR,
54 (struct dma_register *) DMA1_4_NEXT_DESC_PTR,
55 (struct dma_register *) DMA1_5_NEXT_DESC_PTR,
56 (struct dma_register *) DMA1_6_NEXT_DESC_PTR,
57 (struct dma_register *) DMA1_7_NEXT_DESC_PTR,
58 (struct dma_register *) DMA1_8_NEXT_DESC_PTR,
59 (struct dma_register *) DMA1_9_NEXT_DESC_PTR,
60 (struct dma_register *) DMA1_10_NEXT_DESC_PTR,
61 (struct dma_register *) DMA1_11_NEXT_DESC_PTR,
62 (struct dma_register *) DMA2_0_NEXT_DESC_PTR,
63 (struct dma_register *) DMA2_1_NEXT_DESC_PTR,
64 (struct dma_register *) DMA2_2_NEXT_DESC_PTR,
65 (struct dma_register *) DMA2_3_NEXT_DESC_PTR,
66 (struct dma_register *) DMA2_4_NEXT_DESC_PTR,
67 (struct dma_register *) DMA2_5_NEXT_DESC_PTR,
68 (struct dma_register *) DMA2_6_NEXT_DESC_PTR,
69 (struct dma_register *) DMA2_7_NEXT_DESC_PTR,
70 (struct dma_register *) DMA2_8_NEXT_DESC_PTR,
71 (struct dma_register *) DMA2_9_NEXT_DESC_PTR,
72 (struct dma_register *) DMA2_10_NEXT_DESC_PTR,
73 (struct dma_register *) DMA2_11_NEXT_DESC_PTR,
74 (struct dma_register *) MDMA1_D0_NEXT_DESC_PTR,
75 (struct dma_register *) MDMA1_S0_NEXT_DESC_PTR,
76 (struct dma_register *) MDMA1_D1_NEXT_DESC_PTR,
77 (struct dma_register *) MDMA1_S1_NEXT_DESC_PTR,
78 (struct dma_register *) MDMA2_D0_NEXT_DESC_PTR,
79 (struct dma_register *) MDMA2_S0_NEXT_DESC_PTR,
80 (struct dma_register *) MDMA2_D1_NEXT_DESC_PTR,
81 (struct dma_register *) MDMA2_S1_NEXT_DESC_PTR,
82 (struct dma_register *) IMDMA_D0_NEXT_DESC_PTR,
83 (struct dma_register *) IMDMA_S0_NEXT_DESC_PTR,
84 (struct dma_register *) IMDMA_D1_NEXT_DESC_PTR,
85 (struct dma_register *) IMDMA_S1_NEXT_DESC_PTR,
86};
87#else
88static struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
89 (struct dma_register *) DMA0_NEXT_DESC_PTR,
90 (struct dma_register *) DMA1_NEXT_DESC_PTR,
91 (struct dma_register *) DMA2_NEXT_DESC_PTR,
92 (struct dma_register *) DMA3_NEXT_DESC_PTR,
93 (struct dma_register *) DMA4_NEXT_DESC_PTR,
94 (struct dma_register *) DMA5_NEXT_DESC_PTR,
95 (struct dma_register *) DMA6_NEXT_DESC_PTR,
96 (struct dma_register *) DMA7_NEXT_DESC_PTR,
97#if (defined(CONFIG_BF537) || defined(CONFIG_BF534) || defined(CONFIG_BF536))
98 (struct dma_register *) DMA8_NEXT_DESC_PTR,
99 (struct dma_register *) DMA9_NEXT_DESC_PTR,
100 (struct dma_register *) DMA10_NEXT_DESC_PTR,
101 (struct dma_register *) DMA11_NEXT_DESC_PTR,
102#endif
103 (struct dma_register *) MDMA_D0_NEXT_DESC_PTR,
104 (struct dma_register *) MDMA_S0_NEXT_DESC_PTR,
105 (struct dma_register *) MDMA_D1_NEXT_DESC_PTR,
106 (struct dma_register *) MDMA_S1_NEXT_DESC_PTR,
107};
108#endif
109 49
110/*------------------------------------------------------------------------------ 50/*------------------------------------------------------------------------------
111 * Set the Buffer Clear bit in the Configuration register of specific DMA 51 * Set the Buffer Clear bit in the Configuration register of specific DMA
@@ -138,149 +78,6 @@ static int __init blackfin_dma_init(void)
138 78
139arch_initcall(blackfin_dma_init); 79arch_initcall(blackfin_dma_init);
140 80
141/*
142 * Form the channel find the irq number for that channel.
143 */
144#if !defined(CONFIG_BF561)
145
146static int bf533_channel2irq(unsigned int channel)
147{
148 int ret_irq = -1;
149
150 switch (channel) {
151 case CH_PPI:
152 ret_irq = IRQ_PPI;
153 break;
154
155#if (defined(CONFIG_BF537) || defined(CONFIG_BF534) || defined(CONFIG_BF536))
156 case CH_EMAC_RX:
157 ret_irq = IRQ_MAC_RX;
158 break;
159
160 case CH_EMAC_TX:
161 ret_irq = IRQ_MAC_TX;
162 break;
163
164 case CH_UART1_RX:
165 ret_irq = IRQ_UART1_RX;
166 break;
167
168 case CH_UART1_TX:
169 ret_irq = IRQ_UART1_TX;
170 break;
171#endif
172
173 case CH_SPORT0_RX:
174 ret_irq = IRQ_SPORT0_RX;
175 break;
176
177 case CH_SPORT0_TX:
178 ret_irq = IRQ_SPORT0_TX;
179 break;
180
181 case CH_SPORT1_RX:
182 ret_irq = IRQ_SPORT1_RX;
183 break;
184
185 case CH_SPORT1_TX:
186 ret_irq = IRQ_SPORT1_TX;
187 break;
188
189 case CH_SPI:
190 ret_irq = IRQ_SPI;
191 break;
192
193 case CH_UART_RX:
194 ret_irq = IRQ_UART_RX;
195 break;
196
197 case CH_UART_TX:
198 ret_irq = IRQ_UART_TX;
199 break;
200
201 case CH_MEM_STREAM0_SRC:
202 case CH_MEM_STREAM0_DEST:
203 ret_irq = IRQ_MEM_DMA0;
204 break;
205
206 case CH_MEM_STREAM1_SRC:
207 case CH_MEM_STREAM1_DEST:
208 ret_irq = IRQ_MEM_DMA1;
209 break;
210 }
211 return ret_irq;
212}
213
214# define channel2irq(channel) bf533_channel2irq(channel)
215
216#else
217
218static int bf561_channel2irq(unsigned int channel)
219{
220 int ret_irq = -1;
221
222 switch (channel) {
223 case CH_PPI0:
224 ret_irq = IRQ_PPI0;
225 break;
226 case CH_PPI1:
227 ret_irq = IRQ_PPI1;
228 break;
229 case CH_SPORT0_RX:
230 ret_irq = IRQ_SPORT0_RX;
231 break;
232 case CH_SPORT0_TX:
233 ret_irq = IRQ_SPORT0_TX;
234 break;
235 case CH_SPORT1_RX:
236 ret_irq = IRQ_SPORT1_RX;
237 break;
238 case CH_SPORT1_TX:
239 ret_irq = IRQ_SPORT1_TX;
240 break;
241 case CH_SPI:
242 ret_irq = IRQ_SPI;
243 break;
244 case CH_UART_RX:
245 ret_irq = IRQ_UART_RX;
246 break;
247 case CH_UART_TX:
248 ret_irq = IRQ_UART_TX;
249 break;
250
251 case CH_MEM_STREAM0_SRC:
252 case CH_MEM_STREAM0_DEST:
253 ret_irq = IRQ_MEM_DMA0;
254 break;
255 case CH_MEM_STREAM1_SRC:
256 case CH_MEM_STREAM1_DEST:
257 ret_irq = IRQ_MEM_DMA1;
258 break;
259 case CH_MEM_STREAM2_SRC:
260 case CH_MEM_STREAM2_DEST:
261 ret_irq = IRQ_MEM_DMA2;
262 break;
263 case CH_MEM_STREAM3_SRC:
264 case CH_MEM_STREAM3_DEST:
265 ret_irq = IRQ_MEM_DMA3;
266 break;
267
268 case CH_IMEM_STREAM0_SRC:
269 case CH_IMEM_STREAM0_DEST:
270 ret_irq = IRQ_IMEM_DMA0;
271 break;
272 case CH_IMEM_STREAM1_SRC:
273 case CH_IMEM_STREAM1_DEST:
274 ret_irq = IRQ_IMEM_DMA1;
275 break;
276 }
277 return ret_irq;
278}
279
280# define channel2irq(channel) bf561_channel2irq(channel)
281
282#endif
283
284/*------------------------------------------------------------------------------ 81/*------------------------------------------------------------------------------
285 * Request the specific DMA channel from the system. 82 * Request the specific DMA channel from the system.
286 *-----------------------------------------------------------------------------*/ 83 *-----------------------------------------------------------------------------*/
@@ -535,7 +332,7 @@ set_bfin_dma_config(char direction, char flow_mode,
535} 332}
536EXPORT_SYMBOL(set_bfin_dma_config); 333EXPORT_SYMBOL(set_bfin_dma_config);
537 334
538void set_dma_sg(unsigned int channel, struct dmasg * sg, int nr_sg) 335void set_dma_sg(unsigned int channel, struct dmasg *sg, int nr_sg)
539{ 336{
540 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE 337 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE
541 && channel < MAX_BLACKFIN_DMA_CHANNEL)); 338 && channel < MAX_BLACKFIN_DMA_CHANNEL));
@@ -604,7 +401,7 @@ static void *__dma_memcpy(void *dest, const void *src, size_t size)
604 401
605 if (size <= 0) 402 if (size <= 0)
606 return NULL; 403 return NULL;
607 404
608 local_irq_save(flags); 405 local_irq_save(flags);
609 406
610 if ((unsigned long)src < memory_end) 407 if ((unsigned long)src < memory_end)
@@ -748,7 +545,6 @@ void *dma_memcpy(void *dest, const void *src, size_t size)
748 addr = __dma_memcpy(dest+bulk, src+bulk, rest); 545 addr = __dma_memcpy(dest+bulk, src+bulk, rest);
749 return addr; 546 return addr;
750} 547}
751
752EXPORT_SYMBOL(dma_memcpy); 548EXPORT_SYMBOL(dma_memcpy);
753 549
754void *safe_dma_memcpy(void *dest, const void *src, size_t size) 550void *safe_dma_memcpy(void *dest, const void *src, size_t size)
@@ -761,14 +557,13 @@ EXPORT_SYMBOL(safe_dma_memcpy);
761 557
762void dma_outsb(void __iomem *addr, const void *buf, unsigned short len) 558void dma_outsb(void __iomem *addr, const void *buf, unsigned short len)
763{ 559{
764
765 unsigned long flags; 560 unsigned long flags;
766 561
767 local_irq_save(flags); 562 local_irq_save(flags);
768
769 blackfin_dcache_flush_range((unsigned int)buf,(unsigned int)(buf) + len);
770 563
771 bfin_write_MDMA_D0_START_ADDR(addr); 564 blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len);
565
566 bfin_write_MDMA_D0_START_ADDR(addr);
772 bfin_write_MDMA_D0_X_COUNT(len); 567 bfin_write_MDMA_D0_X_COUNT(len);
773 bfin_write_MDMA_D0_X_MODIFY(0); 568 bfin_write_MDMA_D0_X_MODIFY(0);
774 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 569 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -796,9 +591,9 @@ EXPORT_SYMBOL(dma_outsb);
796void dma_insb(const void __iomem *addr, void *buf, unsigned short len) 591void dma_insb(const void __iomem *addr, void *buf, unsigned short len)
797{ 592{
798 unsigned long flags; 593 unsigned long flags;
799 594
800 local_irq_save(flags); 595 local_irq_save(flags);
801 bfin_write_MDMA_D0_START_ADDR(buf); 596 bfin_write_MDMA_D0_START_ADDR(buf);
802 bfin_write_MDMA_D0_X_COUNT(len); 597 bfin_write_MDMA_D0_X_COUNT(len);
803 bfin_write_MDMA_D0_X_MODIFY(1); 598 bfin_write_MDMA_D0_X_MODIFY(1);
804 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 599 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -827,12 +622,12 @@ EXPORT_SYMBOL(dma_insb);
827void dma_outsw(void __iomem *addr, const void *buf, unsigned short len) 622void dma_outsw(void __iomem *addr, const void *buf, unsigned short len)
828{ 623{
829 unsigned long flags; 624 unsigned long flags;
830 625
831 local_irq_save(flags); 626 local_irq_save(flags);
832
833 blackfin_dcache_flush_range((unsigned int)buf,(unsigned int)(buf) + len);
834 627
835 bfin_write_MDMA_D0_START_ADDR(addr); 628 blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len);
629
630 bfin_write_MDMA_D0_START_ADDR(addr);
836 bfin_write_MDMA_D0_X_COUNT(len); 631 bfin_write_MDMA_D0_X_COUNT(len);
837 bfin_write_MDMA_D0_X_MODIFY(0); 632 bfin_write_MDMA_D0_X_MODIFY(0);
838 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 633 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -859,10 +654,10 @@ EXPORT_SYMBOL(dma_outsw);
859void dma_insw(const void __iomem *addr, void *buf, unsigned short len) 654void dma_insw(const void __iomem *addr, void *buf, unsigned short len)
860{ 655{
861 unsigned long flags; 656 unsigned long flags;
862 657
863 local_irq_save(flags); 658 local_irq_save(flags);
864 659
865 bfin_write_MDMA_D0_START_ADDR(buf); 660 bfin_write_MDMA_D0_START_ADDR(buf);
866 bfin_write_MDMA_D0_X_COUNT(len); 661 bfin_write_MDMA_D0_X_COUNT(len);
867 bfin_write_MDMA_D0_X_MODIFY(2); 662 bfin_write_MDMA_D0_X_MODIFY(2);
868 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 663 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -891,12 +686,12 @@ EXPORT_SYMBOL(dma_insw);
891void dma_outsl(void __iomem *addr, const void *buf, unsigned short len) 686void dma_outsl(void __iomem *addr, const void *buf, unsigned short len)
892{ 687{
893 unsigned long flags; 688 unsigned long flags;
894 689
895 local_irq_save(flags); 690 local_irq_save(flags);
896
897 blackfin_dcache_flush_range((unsigned int)buf,(unsigned int)(buf) + len);
898 691
899 bfin_write_MDMA_D0_START_ADDR(addr); 692 blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len);
693
694 bfin_write_MDMA_D0_START_ADDR(addr);
900 bfin_write_MDMA_D0_X_COUNT(len); 695 bfin_write_MDMA_D0_X_COUNT(len);
901 bfin_write_MDMA_D0_X_MODIFY(0); 696 bfin_write_MDMA_D0_X_MODIFY(0);
902 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 697 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -923,10 +718,10 @@ EXPORT_SYMBOL(dma_outsl);
923void dma_insl(const void __iomem *addr, void *buf, unsigned short len) 718void dma_insl(const void __iomem *addr, void *buf, unsigned short len)
924{ 719{
925 unsigned long flags; 720 unsigned long flags;
926 721
927 local_irq_save(flags); 722 local_irq_save(flags);
928 723
929 bfin_write_MDMA_D0_START_ADDR(buf); 724 bfin_write_MDMA_D0_START_ADDR(buf);
930 bfin_write_MDMA_D0_X_COUNT(len); 725 bfin_write_MDMA_D0_X_COUNT(len);
931 bfin_write_MDMA_D0_X_MODIFY(4); 726 bfin_write_MDMA_D0_X_MODIFY(4);
932 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 727 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index bb1f4fb246..bafcfa5214 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -162,7 +162,7 @@ static void port_setup(unsigned short gpio, unsigned short usage)
162 162
163static void default_gpio(unsigned short gpio) 163static void default_gpio(unsigned short gpio)
164{ 164{
165 unsigned short bank,bitmask; 165 unsigned short bank, bitmask;
166 166
167 bank = gpio_bank(gpio); 167 bank = gpio_bank(gpio);
168 bitmask = gpio_bit(gpio); 168 bitmask = gpio_bit(gpio);
@@ -183,7 +183,7 @@ static int __init bfin_gpio_init(void)
183 183
184 printk(KERN_INFO "Blackfin GPIO Controller\n"); 184 printk(KERN_INFO "Blackfin GPIO Controller\n");
185 185
186 for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=GPIO_BANKSIZE) 186 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE)
187 reserved_map[gpio_bank(i)] = 0; 187 reserved_map[gpio_bank(i)] = 0;
188 188
189#if defined(BF537_FAMILY) && (defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)) 189#if defined(BF537_FAMILY) && (defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE))
@@ -478,7 +478,7 @@ u32 gpio_pm_setup(void)
478 u32 sic_iwr = 0; 478 u32 sic_iwr = 0;
479 u16 bank, mask, i, gpio; 479 u16 bank, mask, i, gpio;
480 480
481 for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=GPIO_BANKSIZE) { 481 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) {
482 mask = wakeup_map[gpio_bank(i)]; 482 mask = wakeup_map[gpio_bank(i)];
483 bank = gpio_bank(i); 483 bank = gpio_bank(i);
484 484
@@ -522,12 +522,11 @@ u32 gpio_pm_setup(void)
522 return IWR_ENABLE_ALL; 522 return IWR_ENABLE_ALL;
523} 523}
524 524
525
526void gpio_pm_restore(void) 525void gpio_pm_restore(void)
527{ 526{
528 u16 bank, mask, i; 527 u16 bank, mask, i;
529 528
530 for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=GPIO_BANKSIZE) { 529 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) {
531 mask = wakeup_map[gpio_bank(i)]; 530 mask = wakeup_map[gpio_bank(i)];
532 bank = gpio_bank(i); 531 bank = gpio_bank(i);
533 532
@@ -591,7 +590,6 @@ int gpio_request(unsigned short gpio, const char *label)
591} 590}
592EXPORT_SYMBOL(gpio_request); 591EXPORT_SYMBOL(gpio_request);
593 592
594
595void gpio_free(unsigned short gpio) 593void gpio_free(unsigned short gpio)
596{ 594{
597 unsigned long flags; 595 unsigned long flags;
@@ -616,7 +614,6 @@ void gpio_free(unsigned short gpio)
616} 614}
617EXPORT_SYMBOL(gpio_free); 615EXPORT_SYMBOL(gpio_free);
618 616
619
620void gpio_direction_input(unsigned short gpio) 617void gpio_direction_input(unsigned short gpio)
621{ 618{
622 unsigned long flags; 619 unsigned long flags;
diff --git a/arch/blackfin/kernel/bfin_ksyms.c b/arch/blackfin/kernel/bfin_ksyms.c
index f64ecb638f..70455949cf 100644
--- a/arch/blackfin/kernel/bfin_ksyms.c
+++ b/arch/blackfin/kernel/bfin_ksyms.c
@@ -28,10 +28,11 @@
28 */ 28 */
29 29
30#include <linux/module.h> 30#include <linux/module.h>
31#include <asm/irq.h> 31#include <linux/irq.h>
32#include <linux/uaccess.h>
33
32#include <asm/checksum.h> 34#include <asm/checksum.h>
33#include <asm/cacheflush.h> 35#include <asm/cacheflush.h>
34#include <asm/uaccess.h>
35 36
36/* platform dependent support */ 37/* platform dependent support */
37 38
diff --git a/arch/blackfin/kernel/cacheinit.c b/arch/blackfin/kernel/cacheinit.c
new file mode 100644
index 0000000000..4d41a40e81
--- /dev/null
+++ b/arch/blackfin/kernel/cacheinit.c
@@ -0,0 +1,66 @@
1/*
2 * Copyright 2004-2007 Analog Devices Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see the file COPYING, or write
16 * to the Free Software Foundation, Inc.,
17 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#include <linux/cpu.h>
21
22#include <asm/cacheflush.h>
23#include <asm/blackfin.h>
24#include <asm/cplbinit.h>
25
26#if defined(CONFIG_BLKFIN_CACHE)
27void bfin_icache_init(void)
28{
29 unsigned long *table = icplb_table;
30 unsigned long ctrl;
31 int i;
32
33 for (i = 0; i < MAX_CPLBS; i++) {
34 unsigned long addr = *table++;
35 unsigned long data = *table++;
36 if (addr == (unsigned long)-1)
37 break;
38 bfin_write32(ICPLB_ADDR0 + i * 4, addr);
39 bfin_write32(ICPLB_DATA0 + i * 4, data);
40 }
41 ctrl = bfin_read_IMEM_CONTROL();
42 ctrl |= IMC | ENICPLB;
43 bfin_write_IMEM_CONTROL(ctrl);
44}
45#endif
46
47#if defined(CONFIG_BLKFIN_DCACHE)
48void bfin_dcache_init(void)
49{
50 unsigned long *table = dcplb_table;
51 unsigned long ctrl;
52 int i;
53
54 for (i = 0; i < MAX_CPLBS; i++) {
55 unsigned long addr = *table++;
56 unsigned long data = *table++;
57 if (addr == (unsigned long)-1)
58 break;
59 bfin_write32(DCPLB_ADDR0 + i * 4, addr);
60 bfin_write32(DCPLB_DATA0 + i * 4, data);
61 }
62 ctrl = bfin_read_DMEM_CONTROL();
63 ctrl |= DMEM_CNTR;
64 bfin_write_DMEM_CONTROL(ctrl);
65}
66#endif
diff --git a/arch/blackfin/kernel/cplbinit.c b/arch/blackfin/kernel/cplbinit.c
new file mode 100644
index 0000000000..bbdb403fcb
--- /dev/null
+++ b/arch/blackfin/kernel/cplbinit.c
@@ -0,0 +1,433 @@
1/*
2 * Blackfin CPLB initialization
3 *
4 * Copyright 2004-2007 Analog Devices Inc.
5 *
6 * Bugs: Enter bugs at http://blackfin.uclinux.org/
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, see the file COPYING, or write
20 * to the Free Software Foundation, Inc.,
21 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23#include <linux/module.h>
24
25#include <asm/blackfin.h>
26#include <asm/cplbinit.h>
27
28u_long icplb_table[MAX_CPLBS+1];
29u_long dcplb_table[MAX_CPLBS+1];
30
31#ifdef CONFIG_CPLB_SWITCH_TAB_L1
32u_long ipdt_table[MAX_SWITCH_I_CPLBS+1]__attribute__((l1_data));
33u_long dpdt_table[MAX_SWITCH_D_CPLBS+1]__attribute__((l1_data));
34
35#ifdef CONFIG_CPLB_INFO
36u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS]__attribute__((l1_data));
37u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS]__attribute__((l1_data));
38#endif /* CONFIG_CPLB_INFO */
39
40#else
41
42u_long ipdt_table[MAX_SWITCH_I_CPLBS+1];
43u_long dpdt_table[MAX_SWITCH_D_CPLBS+1];
44
45#ifdef CONFIG_CPLB_INFO
46u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS];
47u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS];
48#endif /* CONFIG_CPLB_INFO */
49
50#endif /*CONFIG_CPLB_SWITCH_TAB_L1*/
51
52struct s_cplb {
53 struct cplb_tab init_i;
54 struct cplb_tab init_d;
55 struct cplb_tab switch_i;
56 struct cplb_tab switch_d;
57};
58
59#if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE)
60static struct cplb_desc cplb_data[] = {
61 {
62 .start = 0,
63 .end = SIZE_1K,
64 .psize = SIZE_1K,
65 .attr = INITIAL_T | SWITCH_T | I_CPLB | D_CPLB,
66 .i_conf = SDRAM_OOPS,
67 .d_conf = SDRAM_OOPS,
68#if defined(CONFIG_DEBUG_HUNT_FOR_ZERO)
69 .valid = 1,
70#else
71 .valid = 0,
72#endif
73 .name = "ZERO Pointer Saveguard",
74 },
75 {
76 .start = L1_CODE_START,
77 .end = L1_CODE_START + L1_CODE_LENGTH,
78 .psize = SIZE_4M,
79 .attr = INITIAL_T | SWITCH_T | I_CPLB,
80 .i_conf = L1_IMEMORY,
81 .d_conf = 0,
82 .valid = 1,
83 .name = "L1 I-Memory",
84 },
85 {
86 .start = L1_DATA_A_START,
87 .end = L1_DATA_B_START + L1_DATA_B_LENGTH,
88 .psize = SIZE_4M,
89 .attr = INITIAL_T | SWITCH_T | D_CPLB,
90 .i_conf = 0,
91 .d_conf = L1_DMEMORY,
92#if ((L1_DATA_A_LENGTH > 0) || (L1_DATA_B_LENGTH > 0))
93 .valid = 1,
94#else
95 .valid = 0,
96#endif
97 .name = "L1 D-Memory",
98 },
99 {
100 .start = 0,
101 .end = 0, /* dynamic */
102 .psize = 0,
103 .attr = INITIAL_T | SWITCH_T | I_CPLB | D_CPLB,
104 .i_conf = SDRAM_IGENERIC,
105 .d_conf = SDRAM_DGENERIC,
106 .valid = 1,
107 .name = "SDRAM Kernel",
108 },
109 {
110 .start = 0, /* dynamic */
111 .end = 0, /* dynamic */
112 .psize = 0,
113 .attr = INITIAL_T | SWITCH_T | D_CPLB,
114 .i_conf = SDRAM_IGENERIC,
115 .d_conf = SDRAM_DNON_CHBL,
116 .valid = 1,
117 .name = "SDRAM RAM MTD",
118 },
119 {
120 .start = 0, /* dynamic */
121 .end = 0, /* dynamic */
122 .psize = SIZE_1M,
123 .attr = INITIAL_T | SWITCH_T | D_CPLB,
124 .d_conf = SDRAM_DNON_CHBL,
125 .valid = 1,
126 .name = "SDRAM Uncached DMA ZONE",
127 },
128 {
129 .start = 0, /* dynamic */
130 .end = 0, /* dynamic */
131 .psize = 0,
132 .attr = SWITCH_T | D_CPLB,
133 .i_conf = 0, /* dynamic */
134 .d_conf = 0, /* dynamic */
135 .valid = 1,
136 .name = "SDRAM Reserved Memory",
137 },
138 {
139 .start = ASYNC_BANK0_BASE,
140 .end = ASYNC_BANK3_BASE + ASYNC_BANK3_SIZE,
141 .psize = 0,
142 .attr = SWITCH_T | D_CPLB,
143 .d_conf = SDRAM_EBIU,
144 .valid = 1,
145 .name = "ASYNC Memory",
146 },
147 {
148#if defined(CONFIG_BF561)
149 .start = L2_SRAM,
150 .end = L2_SRAM_END,
151 .psize = SIZE_1M,
152 .attr = SWITCH_T | D_CPLB,
153 .i_conf = L2_MEMORY,
154 .d_conf = L2_MEMORY,
155 .valid = 1,
156#else
157 .valid = 0,
158#endif
159 .name = "L2 Memory",
160 }
161};
162
163static u16 __init lock_kernel_check(u32 start, u32 end)
164{
165 if ((start <= (u32) _stext && end >= (u32) _end)
166 || (start >= (u32) _stext && end <= (u32) _end))
167 return IN_KERNEL;
168 return 0;
169}
170
171static unsigned short __init
172fill_cplbtab(struct cplb_tab *table,
173 unsigned long start, unsigned long end,
174 unsigned long block_size, unsigned long cplb_data)
175{
176 int i;
177
178 switch (block_size) {
179 case SIZE_4M:
180 i = 3;
181 break;
182 case SIZE_1M:
183 i = 2;
184 break;
185 case SIZE_4K:
186 i = 1;
187 break;
188 case SIZE_1K:
189 default:
190 i = 0;
191 break;
192 }
193
194 cplb_data = (cplb_data & ~(3 << 16)) | (i << 16);
195
196 while ((start < end) && (table->pos < table->size)) {
197
198 table->tab[table->pos++] = start;
199
200 if (lock_kernel_check(start, start + block_size) == IN_KERNEL)
201 table->tab[table->pos++] =
202 cplb_data | CPLB_LOCK | CPLB_DIRTY;
203 else
204 table->tab[table->pos++] = cplb_data;
205
206 start += block_size;
207 }
208 return 0;
209}
210
211static unsigned short __init
212close_cplbtab(struct cplb_tab *table)
213{
214
215 while (table->pos < table->size) {
216
217 table->tab[table->pos++] = 0;
218 table->tab[table->pos++] = 0; /* !CPLB_VALID */
219 }
220 return 0;
221}
222
223/* helper function */
224static void __fill_code_cplbtab(struct cplb_tab *t, int i, u32 a_start, u32 a_end)
225{
226 if (cplb_data[i].psize) {
227 fill_cplbtab(t,
228 cplb_data[i].start,
229 cplb_data[i].end,
230 cplb_data[i].psize,
231 cplb_data[i].i_conf);
232 } else {
233#if (defined(CONFIG_BLKFIN_CACHE) && defined(ANOMALY_05000263))
234 if (i == SDRAM_KERN) {
235 fill_cplbtab(t,
236 cplb_data[i].start,
237 cplb_data[i].end,
238 SIZE_4M,
239 cplb_data[i].i_conf);
240 } else
241#endif
242 {
243 fill_cplbtab(t,
244 cplb_data[i].start,
245 a_start,
246 SIZE_1M,
247 cplb_data[i].i_conf);
248 fill_cplbtab(t,
249 a_start,
250 a_end,
251 SIZE_4M,
252 cplb_data[i].i_conf);
253 fill_cplbtab(t, a_end,
254 cplb_data[i].end,
255 SIZE_1M,
256 cplb_data[i].i_conf);
257 }
258 }
259}
260
261static void __fill_data_cplbtab(struct cplb_tab *t, int i, u32 a_start, u32 a_end)
262{
263 if (cplb_data[i].psize) {
264 fill_cplbtab(t,
265 cplb_data[i].start,
266 cplb_data[i].end,
267 cplb_data[i].psize,
268 cplb_data[i].d_conf);
269 } else {
270 fill_cplbtab(t,
271 cplb_data[i].start,
272 a_start, SIZE_1M,
273 cplb_data[i].d_conf);
274 fill_cplbtab(t, a_start,
275 a_end, SIZE_4M,
276 cplb_data[i].d_conf);
277 fill_cplbtab(t, a_end,
278 cplb_data[i].end,
279 SIZE_1M,
280 cplb_data[i].d_conf);
281 }
282}
283
284void __init generate_cpl_tables(void)
285{
286
287 u16 i, j, process;
288 u32 a_start, a_end, as, ae, as_1m;
289
290 struct cplb_tab *t_i = NULL;
291 struct cplb_tab *t_d = NULL;
292 struct s_cplb cplb;
293
294 cplb.init_i.size = MAX_CPLBS;
295 cplb.init_d.size = MAX_CPLBS;
296 cplb.switch_i.size = MAX_SWITCH_I_CPLBS;
297 cplb.switch_d.size = MAX_SWITCH_D_CPLBS;
298
299 cplb.init_i.pos = 0;
300 cplb.init_d.pos = 0;
301 cplb.switch_i.pos = 0;
302 cplb.switch_d.pos = 0;
303
304 cplb.init_i.tab = icplb_table;
305 cplb.init_d.tab = dcplb_table;
306 cplb.switch_i.tab = ipdt_table;
307 cplb.switch_d.tab = dpdt_table;
308
309 cplb_data[SDRAM_KERN].end = memory_end;
310
311#ifdef CONFIG_MTD_UCLINUX
312 cplb_data[SDRAM_RAM_MTD].start = memory_mtd_start;
313 cplb_data[SDRAM_RAM_MTD].end = memory_mtd_start + mtd_size;
314 cplb_data[SDRAM_RAM_MTD].valid = mtd_size > 0;
315# if defined(CONFIG_ROMFS_FS)
316 cplb_data[SDRAM_RAM_MTD].attr |= I_CPLB;
317
318 /*
319 * The ROMFS_FS size is often not multiple of 1MB.
320 * This can cause multiple CPLB sets covering the same memory area.
321 * This will then cause multiple CPLB hit exceptions.
322 * Workaround: We ensure a contiguous memory area by extending the kernel
323 * memory section over the mtd section.
324 * For ROMFS_FS memory must be covered with ICPLBs anyways.
325 * So there is no difference between kernel and mtd memory setup.
326 */
327
328 cplb_data[SDRAM_KERN].end = memory_mtd_start + mtd_size;;
329 cplb_data[SDRAM_RAM_MTD].valid = 0;
330
331# endif
332#else
333 cplb_data[SDRAM_RAM_MTD].valid = 0;
334#endif
335
336 cplb_data[SDRAM_DMAZ].start = _ramend - DMA_UNCACHED_REGION;
337 cplb_data[SDRAM_DMAZ].end = _ramend;
338
339 cplb_data[RES_MEM].start = _ramend;
340 cplb_data[RES_MEM].end = physical_mem_end;
341
342 if (reserved_mem_dcache_on)
343 cplb_data[RES_MEM].d_conf = SDRAM_DGENERIC;
344 else
345 cplb_data[RES_MEM].d_conf = SDRAM_DNON_CHBL;
346
347 if (reserved_mem_icache_on)
348 cplb_data[RES_MEM].i_conf = SDRAM_IGENERIC;
349 else
350 cplb_data[RES_MEM].i_conf = SDRAM_INON_CHBL;
351
352 for (i = ZERO_P; i <= L2_MEM; i++) {
353 if (!cplb_data[i].valid)
354 continue;
355
356 as_1m = cplb_data[i].start % SIZE_1M;
357
358 /* We need to make sure all sections are properly 1M aligned
359 * However between Kernel Memory and the Kernel mtd section, depending on the
360 * rootfs size, there can be overlapping memory areas.
361 */
362
363 if (as_1m && i != L1I_MEM && i != L1D_MEM) {
364#ifdef CONFIG_MTD_UCLINUX
365 if (i == SDRAM_RAM_MTD) {
366 if ((cplb_data[SDRAM_KERN].end + 1) > cplb_data[SDRAM_RAM_MTD].start)
367 cplb_data[SDRAM_RAM_MTD].start = (cplb_data[i].start & (-2*SIZE_1M)) + SIZE_1M;
368 else
369 cplb_data[SDRAM_RAM_MTD].start = (cplb_data[i].start & (-2*SIZE_1M));
370 } else
371#endif
372 printk(KERN_WARNING "Unaligned Start of %s at 0x%X\n",
373 cplb_data[i].name, cplb_data[i].start);
374 }
375
376 as = cplb_data[i].start % SIZE_4M;
377 ae = cplb_data[i].end % SIZE_4M;
378
379 if (as)
380 a_start = cplb_data[i].start + (SIZE_4M - (as));
381 else
382 a_start = cplb_data[i].start;
383
384 a_end = cplb_data[i].end - ae;
385
386 for (j = INITIAL_T; j <= SWITCH_T; j++) {
387
388 switch (j) {
389 case INITIAL_T:
390 if (cplb_data[i].attr & INITIAL_T) {
391 t_i = &cplb.init_i;
392 t_d = &cplb.init_d;
393 process = 1;
394 } else
395 process = 0;
396 break;
397 case SWITCH_T:
398 if (cplb_data[i].attr & SWITCH_T) {
399 t_i = &cplb.switch_i;
400 t_d = &cplb.switch_d;
401 process = 1;
402 } else
403 process = 0;
404 break;
405 default:
406 process = 0;
407 break;
408 }
409
410 if (!process)
411 continue;
412 if (cplb_data[i].attr & I_CPLB)
413 __fill_code_cplbtab(t_i, i, a_start, a_end);
414
415 if (cplb_data[i].attr & D_CPLB)
416 __fill_data_cplbtab(t_d, i, a_start, a_end);
417 }
418 }
419
420/* close tables */
421
422 close_cplbtab(&cplb.init_i);
423 close_cplbtab(&cplb.init_d);
424
425 cplb.init_i.tab[cplb.init_i.pos] = -1;
426 cplb.init_d.tab[cplb.init_d.pos] = -1;
427 cplb.switch_i.tab[cplb.switch_i.pos] = -1;
428 cplb.switch_d.tab[cplb.switch_d.pos] = -1;
429
430}
431
432#endif
433
diff --git a/arch/blackfin/kernel/dma-mapping.c b/arch/blackfin/kernel/dma-mapping.c
index 539eb24e06..ea48d5b13f 100644
--- a/arch/blackfin/kernel/dma-mapping.c
+++ b/arch/blackfin/kernel/dma-mapping.c
@@ -34,8 +34,8 @@
34#include <linux/spinlock.h> 34#include <linux/spinlock.h>
35#include <linux/device.h> 35#include <linux/device.h>
36#include <linux/dma-mapping.h> 36#include <linux/dma-mapping.h>
37#include <linux/io.h>
37#include <asm/cacheflush.h> 38#include <asm/cacheflush.h>
38#include <asm/io.h>
39#include <asm/bfin-global.h> 39#include <asm/bfin-global.h>
40 40
41static spinlock_t dma_page_lock; 41static spinlock_t dma_page_lock;
@@ -159,10 +159,13 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
159 159
160 BUG_ON(direction == DMA_NONE); 160 BUG_ON(direction == DMA_NONE);
161 161
162 for (i = 0; i < nents; i++) 162 for (i = 0; i < nents; i++, sg++) {
163 invalidate_dcache_range(sg_dma_address(&sg[i]), 163 sg->dma_address = page_address(sg->page) + sg->offset;
164 sg_dma_address(&sg[i]) + 164
165 sg_dma_len(&sg[i])); 165 invalidate_dcache_range(sg_dma_address(sg),
166 sg_dma_address(sg) +
167 sg_dma_len(sg));
168 }
166 169
167 return nents; 170 return nents;
168} 171}
diff --git a/arch/blackfin/kernel/dualcore_test.c b/arch/blackfin/kernel/dualcore_test.c
index 8b89c99f9d..0fcba74840 100644
--- a/arch/blackfin/kernel/dualcore_test.c
+++ b/arch/blackfin/kernel/dualcore_test.c
@@ -30,19 +30,19 @@
30#include <linux/init.h> 30#include <linux/init.h>
31#include <linux/module.h> 31#include <linux/module.h>
32 32
33static int *testarg = (int*)0xfeb00000; 33static int *testarg = (int *)0xfeb00000;
34 34
35static int test_init(void) 35static int test_init(void)
36{ 36{
37 *testarg = 1; 37 *testarg = 1;
38 printk("Dual core test module inserted: set testarg = [%d]\n @ [%p]\n", 38 printk(KERN_INFO "Dual core test module inserted: set testarg = [%d]\n @ [%p]\n",
39 *testarg, testarg); 39 *testarg, testarg);
40 return 0; 40 return 0;
41} 41}
42 42
43static void test_exit(void) 43static void test_exit(void)
44{ 44{
45 printk("Dual core test module removed: testarg = [%d]\n", *testarg); 45 printk(KERN_INFO "Dual core test module removed: testarg = [%d]\n", *testarg);
46} 46}
47 47
48module_init(test_init); 48module_init(test_init);
diff --git a/arch/blackfin/kernel/fixed_code.S b/arch/blackfin/kernel/fixed_code.S
new file mode 100644
index 0000000000..d8b1ebc709
--- /dev/null
+++ b/arch/blackfin/kernel/fixed_code.S
@@ -0,0 +1,132 @@
1/*
2 * This file contains sequences of code that will be copied to a
3 * fixed location, defined in <asm/atomic_seq.h>. The interrupt
4 * handlers ensure that these sequences appear to be atomic when
5 * executed from userspace.
6 * These are aligned to 16 bytes, so that we have some space to replace
7 * these sequences with something else (e.g. kernel traps if we ever do
8 * BF561 SMP).
9 */
10#include <linux/linkage.h>
11#include <linux/unistd.h>
12#include <asm/entry.h>
13
14.text
15ENTRY(_fixed_code_start)
16
17.align 16
18ENTRY(_sigreturn_stub)
19 P0 = __NR_rt_sigreturn;
20 EXCPT 0;
21 /* Speculative execution paranoia. */
220: JUMP.S 0b;
23ENDPROC (_sigreturn_stub)
24
25.align 16
26 /*
27 * Atomic swap, 8 bit.
28 * Inputs: P0: memory address to use
29 * R1: value to store
30 * Output: R0: old contents of the memory address, zero extended.
31 */
32ENTRY(_atomic_xchg32)
33 R0 = [P0];
34 [P0] = R1;
35 rts;
36ENDPROC (_atomic_xchg32)
37
38.align 16
39 /*
40 * Compare and swap, 32 bit.
41 * Inputs: P0: memory address to use
42 * R1: compare value
43 * R2: new value to store
44 * The new value is stored if the contents of the memory
45 * address is equal to the compare value.
46 * Output: R0: old contents of the memory address.
47 */
48ENTRY(_atomic_cas32)
49 R0 = [P0];
50 CC = R0 == R1;
51 IF !CC JUMP 1f;
52 [P0] = R2;
531:
54 rts;
55ENDPROC (_atomic_cas32)
56
57.align 16
58 /*
59 * Atomic add, 32 bit.
60 * Inputs: P0: memory address to use
61 * R0: value to add
62 * Outputs: R0: new contents of the memory address.
63 * R1: previous contents of the memory address.
64 */
65ENTRY(_atomic_add32)
66 R1 = [P0];
67 R0 = R1 + R0;
68 [P0] = R0;
69 rts;
70ENDPROC (_atomic_add32)
71
72.align 16
73 /*
74 * Atomic sub, 32 bit.
75 * Inputs: P0: memory address to use
76 * R0: value to subtract
77 * Outputs: R0: new contents of the memory address.
78 * R1: previous contents of the memory address.
79 */
80ENTRY(_atomic_sub32)
81 R1 = [P0];
82 R0 = R1 - R0;
83 [P0] = R0;
84 rts;
85ENDPROC (_atomic_sub32)
86
87.align 16
88 /*
89 * Atomic ior, 32 bit.
90 * Inputs: P0: memory address to use
91 * R0: value to ior
92 * Outputs: R0: new contents of the memory address.
93 * R1: previous contents of the memory address.
94 */
95ENTRY(_atomic_ior32)
96 R1 = [P0];
97 R0 = R1 | R0;
98 [P0] = R0;
99 rts;
100ENDPROC (_atomic_ior32)
101
102.align 16
103 /*
104 * Atomic ior, 32 bit.
105 * Inputs: P0: memory address to use
106 * R0: value to ior
107 * Outputs: R0: new contents of the memory address.
108 * R1: previous contents of the memory address.
109 */
110ENTRY(_atomic_and32)
111 R1 = [P0];
112 R0 = R1 & R0;
113 [P0] = R0;
114 rts;
115ENDPROC (_atomic_ior32)
116
117.align 16
118 /*
119 * Atomic ior, 32 bit.
120 * Inputs: P0: memory address to use
121 * R0: value to ior
122 * Outputs: R0: new contents of the memory address.
123 * R1: previous contents of the memory address.
124 */
125ENTRY(_atomic_xor32)
126 R1 = [P0];
127 R0 = R1 ^ R0;
128 [P0] = R0;
129 rts;
130ENDPROC (_atomic_ior32)
131
132ENTRY(_fixed_code_end)
diff --git a/arch/blackfin/kernel/flat.c b/arch/blackfin/kernel/flat.c
index a92587b628..d188b24305 100644
--- a/arch/blackfin/kernel/flat.c
+++ b/arch/blackfin/kernel/flat.c
@@ -36,24 +36,22 @@ unsigned long bfin_get_addr_from_rp(unsigned long *ptr,
36 unsigned long val; 36 unsigned long val;
37 37
38 switch (type) { 38 switch (type) {
39 case FLAT_BFIN_RELOC_TYPE_16_BIT: 39 case FLAT_BFIN_RELOC_TYPE_16_BIT:
40 case FLAT_BFIN_RELOC_TYPE_16H_BIT: 40 case FLAT_BFIN_RELOC_TYPE_16H_BIT:
41 usptr = (unsigned short *)ptr; 41 usptr = (unsigned short *)ptr;
42 pr_debug("*usptr = %x", get_unaligned(usptr)); 42 pr_debug("*usptr = %x", get_unaligned(usptr));
43 val = get_unaligned(usptr); 43 val = get_unaligned(usptr);
44 val += *persistent; 44 val += *persistent;
45 break; 45 break;
46 46
47 case FLAT_BFIN_RELOC_TYPE_32_BIT: 47 case FLAT_BFIN_RELOC_TYPE_32_BIT:
48 pr_debug("*ptr = %lx", get_unaligned(ptr)); 48 pr_debug("*ptr = %lx", get_unaligned(ptr));
49 val = get_unaligned(ptr); 49 val = get_unaligned(ptr);
50 break; 50 break;
51 51
52 default: 52 default:
53 pr_debug("BINFMT_FLAT: Unknown relocation type %x\n", 53 pr_debug("BINFMT_FLAT: Unknown relocation type %x\n", type);
54 type); 54 return 0;
55
56 return 0;
57 } 55 }
58 56
59 /* 57 /*
@@ -81,21 +79,20 @@ void bfin_put_addr_at_rp(unsigned long *ptr, unsigned long addr,
81 int type = (relval >> 26) & 7; 79 int type = (relval >> 26) & 7;
82 80
83 switch (type) { 81 switch (type) {
84 case FLAT_BFIN_RELOC_TYPE_16_BIT: 82 case FLAT_BFIN_RELOC_TYPE_16_BIT:
85 put_unaligned(addr, usptr); 83 put_unaligned(addr, usptr);
86 pr_debug("new value %x at %p", get_unaligned(usptr), 84 pr_debug("new value %x at %p", get_unaligned(usptr), usptr);
87 usptr); 85 break;
88 break;
89 86
90 case FLAT_BFIN_RELOC_TYPE_16H_BIT: 87 case FLAT_BFIN_RELOC_TYPE_16H_BIT:
91 put_unaligned(addr >> 16, usptr); 88 put_unaligned(addr >> 16, usptr);
92 pr_debug("new value %x", get_unaligned(usptr)); 89 pr_debug("new value %x", get_unaligned(usptr));
93 break; 90 break;
94 91
95 case FLAT_BFIN_RELOC_TYPE_32_BIT: 92 case FLAT_BFIN_RELOC_TYPE_32_BIT:
96 put_unaligned(addr, ptr); 93 put_unaligned(addr, ptr);
97 pr_debug("new ptr =%lx", get_unaligned(ptr)); 94 pr_debug("new ptr =%lx", get_unaligned(ptr));
98 break; 95 break;
99 } 96 }
100} 97}
101EXPORT_SYMBOL(bfin_put_addr_at_rp); 98EXPORT_SYMBOL(bfin_put_addr_at_rp);
diff --git a/arch/blackfin/kernel/irqchip.c b/arch/blackfin/kernel/irqchip.c
index 80996a1a94..1fc001c7ab 100644
--- a/arch/blackfin/kernel/irqchip.c
+++ b/arch/blackfin/kernel/irqchip.c
@@ -82,7 +82,7 @@ int show_interrupts(struct seq_file *p, void *v)
82 seq_printf(p, ", %s", action->name); 82 seq_printf(p, ", %s", action->name);
83 83
84 seq_putc(p, '\n'); 84 seq_putc(p, '\n');
85 unlock: 85 unlock:
86 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 86 spin_unlock_irqrestore(&irq_desc[i].lock, flags);
87 } else if (i == NR_IRQS) { 87 } else if (i == NR_IRQS) {
88 seq_printf(p, "Err: %10lu\n", irq_err_count); 88 seq_printf(p, "Err: %10lu\n", irq_err_count);
diff --git a/arch/blackfin/kernel/kgdb.c b/arch/blackfin/kernel/kgdb.c
new file mode 100644
index 0000000000..a9c15515bf
--- /dev/null
+++ b/arch/blackfin/kernel/kgdb.c
@@ -0,0 +1,421 @@
1/*
2 * File: arch/blackfin/kernel/kgdb.c
3 * Based on:
4 * Author: Sonic Zhang
5 *
6 * Created:
7 * Description:
8 *
9 * Rev: $Id: kgdb_bfin_linux-2.6.x.patch 4934 2007-02-13 09:32:11Z sonicz $
10 *
11 * Modified:
12 * Copyright 2005-2006 Analog Devices Inc.
13 *
14 * Bugs: Enter bugs at http://blackfin.uclinux.org/
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, see the file COPYING, or write
28 * to the Free Software Foundation, Inc.,
29 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 */
31
32#include <linux/string.h>
33#include <linux/kernel.h>
34#include <linux/sched.h>
35#include <linux/smp.h>
36#include <linux/spinlock.h>
37#include <linux/delay.h>
38#include <linux/ptrace.h> /* for linux pt_regs struct */
39#include <linux/kgdb.h>
40#include <linux/console.h>
41#include <linux/init.h>
42#include <linux/debugger.h>
43#include <linux/errno.h>
44#include <linux/irq.h>
45#include <asm/system.h>
46#include <asm/traps.h>
47#include <asm/blackfin.h>
48
49/* Put the error code here just in case the user cares. */
50int gdb_bf533errcode;
51/* Likewise, the vector number here (since GDB only gets the signal
52 number through the usual means, and that's not very specific). */
53int gdb_bf533vector = -1;
54
55#if KGDB_MAX_NO_CPUS != 8
56#error change the definition of slavecpulocks
57#endif
58
59void regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs)
60{
61 gdb_regs[BFIN_R0] = regs->r0;
62 gdb_regs[BFIN_R1] = regs->r1;
63 gdb_regs[BFIN_R2] = regs->r2;
64 gdb_regs[BFIN_R3] = regs->r3;
65 gdb_regs[BFIN_R4] = regs->r4;
66 gdb_regs[BFIN_R5] = regs->r5;
67 gdb_regs[BFIN_R6] = regs->r6;
68 gdb_regs[BFIN_R7] = regs->r7;
69 gdb_regs[BFIN_P0] = regs->p0;
70 gdb_regs[BFIN_P1] = regs->p1;
71 gdb_regs[BFIN_P2] = regs->p2;
72 gdb_regs[BFIN_P3] = regs->p3;
73 gdb_regs[BFIN_P4] = regs->p4;
74 gdb_regs[BFIN_P5] = regs->p5;
75 gdb_regs[BFIN_SP] = regs->reserved;
76 gdb_regs[BFIN_FP] = regs->fp;
77 gdb_regs[BFIN_I0] = regs->i0;
78 gdb_regs[BFIN_I1] = regs->i1;
79 gdb_regs[BFIN_I2] = regs->i2;
80 gdb_regs[BFIN_I3] = regs->i3;
81 gdb_regs[BFIN_M0] = regs->m0;
82 gdb_regs[BFIN_M1] = regs->m1;
83 gdb_regs[BFIN_M2] = regs->m2;
84 gdb_regs[BFIN_M3] = regs->m3;
85 gdb_regs[BFIN_B0] = regs->b0;
86 gdb_regs[BFIN_B1] = regs->b1;
87 gdb_regs[BFIN_B2] = regs->b2;
88 gdb_regs[BFIN_B3] = regs->b3;
89 gdb_regs[BFIN_L0] = regs->l0;
90 gdb_regs[BFIN_L1] = regs->l1;
91 gdb_regs[BFIN_L2] = regs->l2;
92 gdb_regs[BFIN_L3] = regs->l3;
93 gdb_regs[BFIN_A0_DOT_X] = regs->a0x;
94 gdb_regs[BFIN_A0_DOT_W] = regs->a0w;
95 gdb_regs[BFIN_A1_DOT_X] = regs->a1x;
96 gdb_regs[BFIN_A1_DOT_W] = regs->a1w;
97 gdb_regs[BFIN_ASTAT] = regs->astat;
98 gdb_regs[BFIN_RETS] = regs->rets;
99 gdb_regs[BFIN_LC0] = regs->lc0;
100 gdb_regs[BFIN_LT0] = regs->lt0;
101 gdb_regs[BFIN_LB0] = regs->lb0;
102 gdb_regs[BFIN_LC1] = regs->lc1;
103 gdb_regs[BFIN_LT1] = regs->lt1;
104 gdb_regs[BFIN_LB1] = regs->lb1;
105 gdb_regs[BFIN_CYCLES] = 0;
106 gdb_regs[BFIN_CYCLES2] = 0;
107 gdb_regs[BFIN_USP] = regs->usp;
108 gdb_regs[BFIN_SEQSTAT] = regs->seqstat;
109 gdb_regs[BFIN_SYSCFG] = regs->syscfg;
110 gdb_regs[BFIN_RETI] = regs->pc;
111 gdb_regs[BFIN_RETX] = regs->retx;
112 gdb_regs[BFIN_RETN] = regs->retn;
113 gdb_regs[BFIN_RETE] = regs->rete;
114 gdb_regs[BFIN_PC] = regs->pc;
115 gdb_regs[BFIN_CC] = 0;
116 gdb_regs[BFIN_EXTRA1] = 0;
117 gdb_regs[BFIN_EXTRA2] = 0;
118 gdb_regs[BFIN_EXTRA3] = 0;
119 gdb_regs[BFIN_IPEND] = regs->ipend;
120}
121
122/*
123 * Extracts ebp, esp and eip values understandable by gdb from the values
124 * saved by switch_to.
125 * thread.esp points to ebp. flags and ebp are pushed in switch_to hence esp
126 * prior to entering switch_to is 8 greater then the value that is saved.
127 * If switch_to changes, change following code appropriately.
128 */
129void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p)
130{
131 gdb_regs[BFIN_SP] = p->thread.ksp;
132 gdb_regs[BFIN_PC] = p->thread.pc;
133 gdb_regs[BFIN_SEQSTAT] = p->thread.seqstat;
134}
135
136void gdb_regs_to_regs(unsigned long *gdb_regs, struct pt_regs *regs)
137{
138 regs->r0 = gdb_regs[BFIN_R0];
139 regs->r1 = gdb_regs[BFIN_R1];
140 regs->r2 = gdb_regs[BFIN_R2];
141 regs->r3 = gdb_regs[BFIN_R3];
142 regs->r4 = gdb_regs[BFIN_R4];
143 regs->r5 = gdb_regs[BFIN_R5];
144 regs->r6 = gdb_regs[BFIN_R6];
145 regs->r7 = gdb_regs[BFIN_R7];
146 regs->p0 = gdb_regs[BFIN_P0];
147 regs->p1 = gdb_regs[BFIN_P1];
148 regs->p2 = gdb_regs[BFIN_P2];
149 regs->p3 = gdb_regs[BFIN_P3];
150 regs->p4 = gdb_regs[BFIN_P4];
151 regs->p5 = gdb_regs[BFIN_P5];
152 regs->fp = gdb_regs[BFIN_FP];
153 regs->i0 = gdb_regs[BFIN_I0];
154 regs->i1 = gdb_regs[BFIN_I1];
155 regs->i2 = gdb_regs[BFIN_I2];
156 regs->i3 = gdb_regs[BFIN_I3];
157 regs->m0 = gdb_regs[BFIN_M0];
158 regs->m1 = gdb_regs[BFIN_M1];
159 regs->m2 = gdb_regs[BFIN_M2];
160 regs->m3 = gdb_regs[BFIN_M3];
161 regs->b0 = gdb_regs[BFIN_B0];
162 regs->b1 = gdb_regs[BFIN_B1];
163 regs->b2 = gdb_regs[BFIN_B2];
164 regs->b3 = gdb_regs[BFIN_B3];
165 regs->l0 = gdb_regs[BFIN_L0];
166 regs->l1 = gdb_regs[BFIN_L1];
167 regs->l2 = gdb_regs[BFIN_L2];
168 regs->l3 = gdb_regs[BFIN_L3];
169 regs->a0x = gdb_regs[BFIN_A0_DOT_X];
170 regs->a0w = gdb_regs[BFIN_A0_DOT_W];
171 regs->a1x = gdb_regs[BFIN_A1_DOT_X];
172 regs->a1w = gdb_regs[BFIN_A1_DOT_W];
173 regs->rets = gdb_regs[BFIN_RETS];
174 regs->lc0 = gdb_regs[BFIN_LC0];
175 regs->lt0 = gdb_regs[BFIN_LT0];
176 regs->lb0 = gdb_regs[BFIN_LB0];
177 regs->lc1 = gdb_regs[BFIN_LC1];
178 regs->lt1 = gdb_regs[BFIN_LT1];
179 regs->lb1 = gdb_regs[BFIN_LB1];
180 regs->usp = gdb_regs[BFIN_USP];
181 regs->syscfg = gdb_regs[BFIN_SYSCFG];
182 regs->retx = gdb_regs[BFIN_PC];
183 regs->retn = gdb_regs[BFIN_RETN];
184 regs->rete = gdb_regs[BFIN_RETE];
185 regs->pc = gdb_regs[BFIN_PC];
186
187#if 0 /* can't change these */
188 regs->astat = gdb_regs[BFIN_ASTAT];
189 regs->seqstat = gdb_regs[BFIN_SEQSTAT];
190 regs->ipend = gdb_regs[BFIN_IPEND];
191#endif
192}
193
194struct hw_breakpoint {
195 unsigned int occupied:1;
196 unsigned int skip:1;
197 unsigned int enabled:1;
198 unsigned int type:1;
199 unsigned int dataacc:2;
200 unsigned short count;
201 unsigned int addr;
202} breakinfo[HW_BREAKPOINT_NUM];
203
204int kgdb_arch_init(void)
205{
206 kgdb_remove_all_hw_break();
207 return 0;
208}
209
210int kgdb_set_hw_break(unsigned long addr)
211{
212 int breakno;
213 for (breakno = 0; breakno < HW_BREAKPOINT_NUM; breakno++)
214 if (!breakinfo[breakno].occupied) {
215 breakinfo[breakno].occupied = 1;
216 breakinfo[breakno].enabled = 1;
217 breakinfo[breakno].type = 1;
218 breakinfo[breakno].addr = addr;
219 return 0;
220 }
221
222 return -ENOSPC;
223}
224
225int kgdb_remove_hw_break(unsigned long addr)
226{
227 int breakno;
228 for (breakno = 0; breakno < HW_BREAKPOINT_NUM; breakno++)
229 if (breakinfo[breakno].addr == addr)
230 memset(&(breakinfo[breakno]), 0, sizeof(struct hw_breakpoint));
231
232 return 0;
233}
234
235void kgdb_remove_all_hw_break(void)
236{
237 memset(breakinfo, 0, sizeof(struct hw_breakpoint)*8);
238}
239
240/*
241void kgdb_show_info(void)
242{
243 printk(KERN_DEBUG "hwd: wpia0=0x%x, wpiacnt0=%d, wpiactl=0x%x, wpstat=0x%x\n",
244 bfin_read_WPIA0(), bfin_read_WPIACNT0(),
245 bfin_read_WPIACTL(), bfin_read_WPSTAT());
246}
247*/
248
249void kgdb_correct_hw_break(void)
250{
251 int breakno;
252 int correctit;
253 uint32_t wpdactl = bfin_read_WPDACTL();
254
255 correctit = 0;
256 for (breakno = 0; breakno < HW_BREAKPOINT_NUM; breakno++) {
257 if (breakinfo[breakno].type == 1) {
258 switch (breakno) {
259 case 0:
260 if (breakinfo[breakno].enabled && !(wpdactl & WPIAEN0)) {
261 correctit = 1;
262 wpdactl &= ~(WPIREN01|EMUSW0);
263 wpdactl |= WPIAEN0|WPICNTEN0;
264 bfin_write_WPIA0(breakinfo[breakno].addr);
265 bfin_write_WPIACNT0(breakinfo[breakno].skip);
266 } else if (!breakinfo[breakno].enabled && (wpdactl & WPIAEN0)) {
267 correctit = 1;
268 wpdactl &= ~WPIAEN0;
269 }
270 break;
271
272 case 1:
273 if (breakinfo[breakno].enabled && !(wpdactl & WPIAEN1)) {
274 correctit = 1;
275 wpdactl &= ~(WPIREN01|EMUSW1);
276 wpdactl |= WPIAEN1|WPICNTEN1;
277 bfin_write_WPIA1(breakinfo[breakno].addr);
278 bfin_write_WPIACNT1(breakinfo[breakno].skip);
279 } else if (!breakinfo[breakno].enabled && (wpdactl & WPIAEN1)) {
280 correctit = 1;
281 wpdactl &= ~WPIAEN1;
282 }
283 break;
284
285 case 2:
286 if (breakinfo[breakno].enabled && !(wpdactl & WPIAEN2)) {
287 correctit = 1;
288 wpdactl &= ~(WPIREN23|EMUSW2);
289 wpdactl |= WPIAEN2|WPICNTEN2;
290 bfin_write_WPIA2(breakinfo[breakno].addr);
291 bfin_write_WPIACNT2(breakinfo[breakno].skip);
292 } else if (!breakinfo[breakno].enabled && (wpdactl & WPIAEN2)) {
293 correctit = 1;
294 wpdactl &= ~WPIAEN2;
295 }
296 break;
297
298 case 3:
299 if (breakinfo[breakno].enabled && !(wpdactl & WPIAEN3)) {
300 correctit = 1;
301 wpdactl &= ~(WPIREN23|EMUSW3);
302 wpdactl |= WPIAEN3|WPICNTEN3;
303 bfin_write_WPIA3(breakinfo[breakno].addr);
304 bfin_write_WPIACNT3(breakinfo[breakno].skip);
305 } else if (!breakinfo[breakno].enabled && (wpdactl & WPIAEN3)) {
306 correctit = 1;
307 wpdactl &= ~WPIAEN3;
308 }
309 break;
310 case 4:
311 if (breakinfo[breakno].enabled && !(wpdactl & WPIAEN4)) {
312 correctit = 1;
313 wpdactl &= ~(WPIREN45|EMUSW4);
314 wpdactl |= WPIAEN4|WPICNTEN4;
315 bfin_write_WPIA4(breakinfo[breakno].addr);
316 bfin_write_WPIACNT4(breakinfo[breakno].skip);
317 } else if (!breakinfo[breakno].enabled && (wpdactl & WPIAEN4)) {
318 correctit = 1;
319 wpdactl &= ~WPIAEN4;
320 }
321 break;
322 case 5:
323 if (breakinfo[breakno].enabled && !(wpdactl & WPIAEN5)) {
324 correctit = 1;
325 wpdactl &= ~(WPIREN45|EMUSW5);
326 wpdactl |= WPIAEN5|WPICNTEN5;
327 bfin_write_WPIA5(breakinfo[breakno].addr);
328 bfin_write_WPIACNT5(breakinfo[breakno].skip);
329 } else if (!breakinfo[breakno].enabled && (wpdactl & WPIAEN5)) {
330 correctit = 1;
331 wpdactl &= ~WPIAEN5;
332 }
333 break;
334 }
335 }
336 }
337 if (correctit) {
338 wpdactl &= ~WPAND;
339 wpdactl |= WPPWR;
340 /*printk("correct_hw_break: wpdactl=0x%x\n", wpdactl);*/
341 bfin_write_WPDACTL(wpdactl);
342 CSYNC();
343 /*kgdb_show_info();*/
344 }
345}
346
347void kgdb_disable_hw_debug(struct pt_regs *regs)
348{
349 /* Disable hardware debugging while we are in kgdb */
350 bfin_write_WPIACTL(bfin_read_WPIACTL() & ~0x1);
351 CSYNC();
352}
353
354void kgdb_post_master_code(struct pt_regs *regs, int eVector, int err_code)
355{
356 /* Master processor is completely in the debugger */
357 gdb_bf533vector = eVector;
358 gdb_bf533errcode = err_code;
359}
360
361int kgdb_arch_handle_exception(int exceptionVector, int signo,
362 int err_code, char *remcom_in_buffer,
363 char *remcom_out_buffer,
364 struct pt_regs *linux_regs)
365{
366 long addr;
367 long breakno;
368 char *ptr;
369 int newPC;
370 int wp_status;
371
372 switch (remcom_in_buffer[0]) {
373 case 'c':
374 case 's':
375 if (kgdb_contthread && kgdb_contthread != current) {
376 strcpy(remcom_out_buffer, "E00");
377 break;
378 }
379
380 kgdb_contthread = NULL;
381
382 /* try to read optional parameter, pc unchanged if no parm */
383 ptr = &remcom_in_buffer[1];
384 if (kgdb_hex2long(&ptr, &addr)) {
385 linux_regs->retx = addr;
386 }
387 newPC = linux_regs->retx;
388
389 /* clear the trace bit */
390 linux_regs->syscfg &= 0xfffffffe;
391
392 /* set the trace bit if we're stepping */
393 if (remcom_in_buffer[0] == 's') {
394 linux_regs->syscfg |= 0x1;
395 debugger_step = 1;
396 }
397
398 wp_status = bfin_read_WPSTAT();
399 CSYNC();
400
401 if (exceptionVector == VEC_WATCH) {
402 for (breakno = 0; breakno < 6; ++breakno) {
403 if (wp_status & (1 << breakno)) {
404 breakinfo->skip = 1;
405 break;
406 }
407 }
408 }
409 kgdb_correct_hw_break();
410
411 bfin_write_WPSTAT(0);
412
413 return 0;
414 } /* switch */
415 return -1; /* this means that we do not want to exit from the handler */
416}
417
418struct kgdb_arch arch_kgdb_ops = {
419 .gdb_bpt_instr = {0xa1},
420 .flags = KGDB_HW_BREAKPOINT,
421};
diff --git a/arch/blackfin/kernel/module.c b/arch/blackfin/kernel/module.c
index 372f756f1a..8b9fe29d03 100644
--- a/arch/blackfin/kernel/module.c
+++ b/arch/blackfin/kernel/module.c
@@ -165,8 +165,8 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs,
165 165
166 for (s = sechdrs; s < sechdrs_end; ++s) { 166 for (s = sechdrs; s < sechdrs_end; ++s) {
167 if ((strcmp(".l1.text", secstrings + s->sh_name) == 0) || 167 if ((strcmp(".l1.text", secstrings + s->sh_name) == 0) ||
168 ((strcmp(".text", secstrings + s->sh_name)==0) && 168 ((strcmp(".text", secstrings + s->sh_name) == 0) &&
169 (hdr->e_flags & FLG_CODE_IN_L1) && (s->sh_size > 0))) { 169 (hdr->e_flags & FLG_CODE_IN_L1) && (s->sh_size > 0))) {
170 mod->arch.text_l1 = s; 170 mod->arch.text_l1 = s;
171 dest = l1_inst_sram_alloc(s->sh_size); 171 dest = l1_inst_sram_alloc(s->sh_size);
172 if (dest == NULL) { 172 if (dest == NULL) {
@@ -179,9 +179,9 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs,
179 s->sh_flags &= ~SHF_ALLOC; 179 s->sh_flags &= ~SHF_ALLOC;
180 s->sh_addr = (unsigned long)dest; 180 s->sh_addr = (unsigned long)dest;
181 } 181 }
182 if ((strcmp(".l1.data", secstrings + s->sh_name) == 0)|| 182 if ((strcmp(".l1.data", secstrings + s->sh_name) == 0) ||
183 ((strcmp(".data", secstrings + s->sh_name)==0) && 183 ((strcmp(".data", secstrings + s->sh_name) == 0) &&
184 (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) { 184 (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) {
185 mod->arch.data_a_l1 = s; 185 mod->arch.data_a_l1 = s;
186 dest = l1_data_sram_alloc(s->sh_size); 186 dest = l1_data_sram_alloc(s->sh_size);
187 if (dest == NULL) { 187 if (dest == NULL) {
@@ -195,8 +195,8 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs,
195 s->sh_addr = (unsigned long)dest; 195 s->sh_addr = (unsigned long)dest;
196 } 196 }
197 if (strcmp(".l1.bss", secstrings + s->sh_name) == 0 || 197 if (strcmp(".l1.bss", secstrings + s->sh_name) == 0 ||
198 ((strcmp(".bss", secstrings + s->sh_name)==0) && 198 ((strcmp(".bss", secstrings + s->sh_name) == 0) &&
199 (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) { 199 (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) {
200 mod->arch.bss_a_l1 = s; 200 mod->arch.bss_a_l1 = s;
201 dest = l1_data_sram_alloc(s->sh_size); 201 dest = l1_data_sram_alloc(s->sh_size);
202 if (dest == NULL) { 202 if (dest == NULL) {
@@ -326,7 +326,7 @@ apply_relocate_add(Elf_Shdr * sechdrs, const char *strtab,
326 pr_debug("before %x after %x\n", *location16, 326 pr_debug("before %x after %x\n", *location16,
327 (value & 0xffff)); 327 (value & 0xffff));
328 tmp = (value & 0xffff); 328 tmp = (value & 0xffff);
329 if((unsigned long)location16 >= L1_CODE_START) { 329 if ((unsigned long)location16 >= L1_CODE_START) {
330 dma_memcpy(location16, &tmp, 2); 330 dma_memcpy(location16, &tmp, 2);
331 } else 331 } else
332 *location16 = tmp; 332 *location16 = tmp;
@@ -335,7 +335,7 @@ apply_relocate_add(Elf_Shdr * sechdrs, const char *strtab,
335 pr_debug("before %x after %x\n", *location16, 335 pr_debug("before %x after %x\n", *location16,
336 ((value >> 16) & 0xffff)); 336 ((value >> 16) & 0xffff));
337 tmp = ((value >> 16) & 0xffff); 337 tmp = ((value >> 16) & 0xffff);
338 if((unsigned long)location16 >= L1_CODE_START) { 338 if ((unsigned long)location16 >= L1_CODE_START) {
339 dma_memcpy(location16, &tmp, 2); 339 dma_memcpy(location16, &tmp, 2);
340 } else 340 } else
341 *location16 = tmp; 341 *location16 = tmp;
@@ -404,8 +404,8 @@ module_finalize(const Elf_Ehdr * hdr,
404 continue; 404 continue;
405 405
406 if ((sechdrs[i].sh_type == SHT_RELA) && 406 if ((sechdrs[i].sh_type == SHT_RELA) &&
407 ((strcmp(".rela.l1.text", secstrings + sechdrs[i].sh_name) == 0)|| 407 ((strcmp(".rela.l1.text", secstrings + sechdrs[i].sh_name) == 0) ||
408 ((strcmp(".rela.text", secstrings + sechdrs[i].sh_name) == 0) && 408 ((strcmp(".rela.text", secstrings + sechdrs[i].sh_name) == 0) &&
409 (hdr->e_flags & FLG_CODE_IN_L1)))) { 409 (hdr->e_flags & FLG_CODE_IN_L1)))) {
410 apply_relocate_add((Elf_Shdr *) sechdrs, strtab, 410 apply_relocate_add((Elf_Shdr *) sechdrs, strtab,
411 symindex, i, mod); 411 symindex, i, mod);
@@ -417,13 +417,13 @@ module_finalize(const Elf_Ehdr * hdr,
417void module_arch_cleanup(struct module *mod) 417void module_arch_cleanup(struct module *mod)
418{ 418{
419 if ((mod->arch.text_l1) && (mod->arch.text_l1->sh_addr)) 419 if ((mod->arch.text_l1) && (mod->arch.text_l1->sh_addr))
420 l1_inst_sram_free((void*)mod->arch.text_l1->sh_addr); 420 l1_inst_sram_free((void *)mod->arch.text_l1->sh_addr);
421 if ((mod->arch.data_a_l1) && (mod->arch.data_a_l1->sh_addr)) 421 if ((mod->arch.data_a_l1) && (mod->arch.data_a_l1->sh_addr))
422 l1_data_sram_free((void*)mod->arch.data_a_l1->sh_addr); 422 l1_data_sram_free((void *)mod->arch.data_a_l1->sh_addr);
423 if ((mod->arch.bss_a_l1) && (mod->arch.bss_a_l1->sh_addr)) 423 if ((mod->arch.bss_a_l1) && (mod->arch.bss_a_l1->sh_addr))
424 l1_data_sram_free((void*)mod->arch.bss_a_l1->sh_addr); 424 l1_data_sram_free((void *)mod->arch.bss_a_l1->sh_addr);
425 if ((mod->arch.data_b_l1) && (mod->arch.data_b_l1->sh_addr)) 425 if ((mod->arch.data_b_l1) && (mod->arch.data_b_l1->sh_addr))
426 l1_data_B_sram_free((void*)mod->arch.data_b_l1->sh_addr); 426 l1_data_B_sram_free((void *)mod->arch.data_b_l1->sh_addr);
427 if ((mod->arch.bss_b_l1) && (mod->arch.bss_b_l1->sh_addr)) 427 if ((mod->arch.bss_b_l1) && (mod->arch.bss_b_l1->sh_addr))
428 l1_data_B_sram_free((void*)mod->arch.bss_b_l1->sh_addr); 428 l1_data_B_sram_free((void *)mod->arch.bss_b_l1->sh_addr);
429} 429}
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index 3eff7439d8..5a51dd6ab2 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -32,9 +32,10 @@
32#include <linux/unistd.h> 32#include <linux/unistd.h>
33#include <linux/user.h> 33#include <linux/user.h>
34#include <linux/a.out.h> 34#include <linux/a.out.h>
35#include <linux/uaccess.h>
35 36
36#include <asm/blackfin.h> 37#include <asm/blackfin.h>
37#include <asm/uaccess.h> 38#include <asm/fixed_code.h>
38 39
39#define LED_ON 0 40#define LED_ON 0
40#define LED_OFF 1 41#define LED_OFF 1
@@ -173,8 +174,8 @@ void show_regs(struct pt_regs *regs)
173 printk(KERN_NOTICE "R4: %08lx R5: %08lx R6: %08lx R7: %08lx\n", 174 printk(KERN_NOTICE "R4: %08lx R5: %08lx R6: %08lx R7: %08lx\n",
174 regs->r4, regs->r5, regs->r6, regs->r7); 175 regs->r4, regs->r5, regs->r6, regs->r7);
175 176
176 if (!(regs->ipend)) 177 if (!regs->ipend)
177 printk("USP: %08lx\n", rdusp()); 178 printk(KERN_NOTICE "USP: %08lx\n", rdusp());
178} 179}
179 180
180/* Fill in the fpu structure for a core dump. */ 181/* Fill in the fpu structure for a core dump. */
@@ -322,7 +323,7 @@ asmlinkage int sys_execve(char *name, char **argv, char **envp)
322 goto out; 323 goto out;
323 error = do_execve(filename, argv, envp, regs); 324 error = do_execve(filename, argv, envp, regs);
324 putname(filename); 325 putname(filename);
325 out: 326 out:
326 unlock_kernel(); 327 unlock_kernel();
327 return error; 328 return error;
328} 329}
@@ -350,13 +351,77 @@ unsigned long get_wchan(struct task_struct *p)
350 return 0; 351 return 0;
351} 352}
352 353
354void finish_atomic_sections (struct pt_regs *regs)
355{
356 if (regs->pc < ATOMIC_SEQS_START || regs->pc >= ATOMIC_SEQS_END)
357 return;
358
359 switch (regs->pc) {
360 case ATOMIC_XCHG32 + 2:
361 put_user(regs->r1, (int *)regs->p0);
362 regs->pc += 2;
363 break;
364
365 case ATOMIC_CAS32 + 2:
366 case ATOMIC_CAS32 + 4:
367 if (regs->r0 == regs->r1)
368 put_user(regs->r2, (int *)regs->p0);
369 regs->pc = ATOMIC_CAS32 + 8;
370 break;
371 case ATOMIC_CAS32 + 6:
372 put_user(regs->r2, (int *)regs->p0);
373 regs->pc += 2;
374 break;
375
376 case ATOMIC_ADD32 + 2:
377 regs->r0 = regs->r1 + regs->r0;
378 /* fall through */
379 case ATOMIC_ADD32 + 4:
380 put_user(regs->r0, (int *)regs->p0);
381 regs->pc = ATOMIC_ADD32 + 6;
382 break;
383
384 case ATOMIC_SUB32 + 2:
385 regs->r0 = regs->r1 - regs->r0;
386 /* fall through */
387 case ATOMIC_SUB32 + 4:
388 put_user(regs->r0, (int *)regs->p0);
389 regs->pc = ATOMIC_SUB32 + 6;
390 break;
391
392 case ATOMIC_IOR32 + 2:
393 regs->r0 = regs->r1 | regs->r0;
394 /* fall through */
395 case ATOMIC_IOR32 + 4:
396 put_user(regs->r0, (int *)regs->p0);
397 regs->pc = ATOMIC_IOR32 + 6;
398 break;
399
400 case ATOMIC_AND32 + 2:
401 regs->r0 = regs->r1 & regs->r0;
402 /* fall through */
403 case ATOMIC_AND32 + 4:
404 put_user(regs->r0, (int *)regs->p0);
405 regs->pc = ATOMIC_AND32 + 6;
406 break;
407
408 case ATOMIC_XOR32 + 2:
409 regs->r0 = regs->r1 ^ regs->r0;
410 /* fall through */
411 case ATOMIC_XOR32 + 4:
412 put_user(regs->r0, (int *)regs->p0);
413 regs->pc = ATOMIC_XOR32 + 6;
414 break;
415 }
416}
417
353#if defined(CONFIG_ACCESS_CHECK) 418#if defined(CONFIG_ACCESS_CHECK)
354int _access_ok(unsigned long addr, unsigned long size) 419int _access_ok(unsigned long addr, unsigned long size)
355{ 420{
356 421
357 if (addr > (addr + size)) 422 if (addr > (addr + size))
358 return 0; 423 return 0;
359 if (segment_eq(get_fs(),KERNEL_DS)) 424 if (segment_eq(get_fs(), KERNEL_DS))
360 return 1; 425 return 1;
361#ifdef CONFIG_MTD_UCLINUX 426#ifdef CONFIG_MTD_UCLINUX
362 if (addr >= memory_start && (addr + size) <= memory_end) 427 if (addr >= memory_start && (addr + size) <= memory_end)
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c
index e718bb4a1e..ed800c7456 100644
--- a/arch/blackfin/kernel/ptrace.c
+++ b/arch/blackfin/kernel/ptrace.c
@@ -36,8 +36,8 @@
36#include <linux/ptrace.h> 36#include <linux/ptrace.h>
37#include <linux/user.h> 37#include <linux/user.h>
38#include <linux/signal.h> 38#include <linux/signal.h>
39#include <linux/uaccess.h>
39 40
40#include <asm/uaccess.h>
41#include <asm/page.h> 41#include <asm/page.h>
42#include <asm/pgtable.h> 42#include <asm/pgtable.h>
43#include <asm/system.h> 43#include <asm/system.h>
@@ -122,7 +122,7 @@ static inline long get_reg(struct task_struct *task, int regno)
122static inline int 122static inline int
123put_reg(struct task_struct *task, int regno, unsigned long data) 123put_reg(struct task_struct *task, int regno, unsigned long data)
124{ 124{
125 char * reg_ptr; 125 char *reg_ptr;
126 126
127 struct pt_regs *regs = 127 struct pt_regs *regs =
128 (struct pt_regs *)((unsigned long)task_stack_page(task) + 128 (struct pt_regs *)((unsigned long)task_stack_page(task) +
@@ -146,7 +146,7 @@ put_reg(struct task_struct *task, int regno, unsigned long data)
146 break; 146 break;
147 default: 147 default:
148 if (regno <= 216) 148 if (regno <= 216)
149 *(long *)(reg_ptr + regno) = data; 149 *(long *)(reg_ptr + regno) = data;
150 } 150 }
151 return 0; 151 return 0;
152} 152}
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index 5b9b434c1e..f59dcee7ba 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -42,6 +42,7 @@
42#include <asm/cacheflush.h> 42#include <asm/cacheflush.h>
43#include <asm/blackfin.h> 43#include <asm/blackfin.h>
44#include <asm/cplbinit.h> 44#include <asm/cplbinit.h>
45#include <asm/fixed_code.h>
45 46
46u16 _bfin_swrst; 47u16 _bfin_swrst;
47 48
@@ -63,10 +64,6 @@ EXPORT_SYMBOL(mtd_size);
63 64
64char __initdata command_line[COMMAND_LINE_SIZE]; 65char __initdata command_line[COMMAND_LINE_SIZE];
65 66
66#if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE)
67static void generate_cpl_tables(void);
68#endif
69
70void __init bf53x_cache_init(void) 67void __init bf53x_cache_init(void)
71{ 68{
72#if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE) 69#if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE)
@@ -197,6 +194,17 @@ void __init setup_arch(char **cmdline_p)
197 /* this give a chance to get printk() working before crash. */ 194 /* this give a chance to get printk() working before crash. */
198#endif 195#endif
199 196
197 printk(KERN_INFO "Hardware Trace ");
198 if (bfin_read_TBUFCTL() & 0x1 )
199 printk("Active ");
200 else
201 printk("Off ");
202 if (bfin_read_TBUFCTL() & 0x2)
203 printk("and Enabled\n");
204 else
205 printk("and Disabled\n");
206
207
200#if defined(CONFIG_CHR_DEV_FLASH) || defined(CONFIG_BLK_DEV_FLASH) 208#if defined(CONFIG_CHR_DEV_FLASH) || defined(CONFIG_BLK_DEV_FLASH)
201 /* we need to initialize the Flashrom device here since we might 209 /* we need to initialize the Flashrom device here since we might
202 * do things with flash early on in the boot 210 * do things with flash early on in the boot
@@ -307,10 +315,20 @@ void __init setup_arch(char **cmdline_p)
307 init_leds(); 315 init_leds();
308 316
309 printk(KERN_INFO "Blackfin support (C) 2004-2007 Analog Devices, Inc.\n"); 317 printk(KERN_INFO "Blackfin support (C) 2004-2007 Analog Devices, Inc.\n");
310 printk(KERN_INFO "Compiled for ADSP-%s Rev 0.%d\n", CPU, bfin_compiled_revid()); 318 if (bfin_compiled_revid() == 0xffff)
311 if (bfin_revid() != bfin_compiled_revid()) 319 printk(KERN_INFO "Compiled for ADSP-%s Rev any\n", CPU);
312 printk(KERN_ERR "Warning: Compiled for Rev %d, but running on Rev %d\n", 320 else if (bfin_compiled_revid() == -1)
313 bfin_compiled_revid(), bfin_revid()); 321 printk(KERN_INFO "Compiled for ADSP-%s Rev none\n", CPU);
322 else
323 printk(KERN_INFO "Compiled for ADSP-%s Rev 0.%d\n", CPU, bfin_compiled_revid());
324 if (bfin_revid() != bfin_compiled_revid()) {
325 if (bfin_compiled_revid() == -1)
326 printk(KERN_ERR "Warning: Compiled for Rev none, but running on Rev %d\n",
327 bfin_revid());
328 else if (bfin_compiled_revid() != 0xffff)
329 printk(KERN_ERR "Warning: Compiled for Rev %d, but running on Rev %d\n",
330 bfin_compiled_revid(), bfin_revid());
331 }
314 if (bfin_revid() < SUPPORTED_REVID) 332 if (bfin_revid() < SUPPORTED_REVID)
315 printk(KERN_ERR "Warning: Unsupported Chip Revision ADSP-%s Rev 0.%d detected\n", 333 printk(KERN_ERR "Warning: Unsupported Chip Revision ADSP-%s Rev 0.%d detected\n",
316 CPU, bfin_revid()); 334 CPU, bfin_revid());
@@ -344,15 +362,15 @@ void __init setup_arch(char **cmdline_p)
344 , _stext, _etext, 362 , _stext, _etext,
345 __start_rodata, __end_rodata, 363 __start_rodata, __end_rodata,
346 _sdata, _edata, 364 _sdata, _edata,
347 (void*)&init_thread_union, (void*)((int)(&init_thread_union) + 0x2000), 365 (void *)&init_thread_union, (void *)((int)(&init_thread_union) + 0x2000),
348 __init_begin, __init_end, 366 __init_begin, __init_end,
349 __bss_start, __bss_stop, 367 __bss_start, __bss_stop,
350 (void*)_ramstart, (void*)memory_end 368 (void *)_ramstart, (void *)memory_end
351#ifdef CONFIG_MTD_UCLINUX 369#ifdef CONFIG_MTD_UCLINUX
352 , (void*)memory_mtd_start, (void*)(memory_mtd_start + mtd_size) 370 , (void *)memory_mtd_start, (void *)(memory_mtd_start + mtd_size)
353#endif 371#endif
354#if DMA_UNCACHED_REGION > 0 372#if DMA_UNCACHED_REGION > 0
355 , (void*)(_ramend - DMA_UNCACHED_REGION), (void*)(_ramend) 373 , (void *)(_ramend - DMA_UNCACHED_REGION), (void *)(_ramend)
356#endif 374#endif
357 ); 375 );
358 376
@@ -378,11 +396,11 @@ void __init setup_arch(char **cmdline_p)
378 /* check the size of the l1 area */ 396 /* check the size of the l1 area */
379 l1_length = _etext_l1 - _stext_l1; 397 l1_length = _etext_l1 - _stext_l1;
380 if (l1_length > L1_CODE_LENGTH) 398 if (l1_length > L1_CODE_LENGTH)
381 panic("L1 memory overflow\n"); 399 panic("L1 code memory overflow\n");
382 400
383 l1_length = _ebss_l1 - _sdata_l1; 401 l1_length = _ebss_l1 - _sdata_l1;
384 if (l1_length > L1_DATA_A_LENGTH) 402 if (l1_length > L1_DATA_A_LENGTH)
385 panic("L1 memory overflow\n"); 403 panic("L1 data memory overflow\n");
386 404
387#ifdef BF561_FAMILY 405#ifdef BF561_FAMILY
388 _bfin_swrst = bfin_read_SICA_SWRST(); 406 _bfin_swrst = bfin_read_SICA_SWRST();
@@ -390,10 +408,28 @@ void __init setup_arch(char **cmdline_p)
390 _bfin_swrst = bfin_read_SWRST(); 408 _bfin_swrst = bfin_read_SWRST();
391#endif 409#endif
392 410
393 bf53x_cache_init(); 411 /* Copy atomic sequences to their fixed location, and sanity check that
412 these locations are the ones that we advertise to userspace. */
413 memcpy((void *)FIXED_CODE_START, &fixed_code_start,
414 FIXED_CODE_END - FIXED_CODE_START);
415 BUG_ON((char *)&sigreturn_stub - (char *)&fixed_code_start
416 != SIGRETURN_STUB - FIXED_CODE_START);
417 BUG_ON((char *)&atomic_xchg32 - (char *)&fixed_code_start
418 != ATOMIC_XCHG32 - FIXED_CODE_START);
419 BUG_ON((char *)&atomic_cas32 - (char *)&fixed_code_start
420 != ATOMIC_CAS32 - FIXED_CODE_START);
421 BUG_ON((char *)&atomic_add32 - (char *)&fixed_code_start
422 != ATOMIC_ADD32 - FIXED_CODE_START);
423 BUG_ON((char *)&atomic_sub32 - (char *)&fixed_code_start
424 != ATOMIC_SUB32 - FIXED_CODE_START);
425 BUG_ON((char *)&atomic_ior32 - (char *)&fixed_code_start
426 != ATOMIC_IOR32 - FIXED_CODE_START);
427 BUG_ON((char *)&atomic_and32 - (char *)&fixed_code_start
428 != ATOMIC_AND32 - FIXED_CODE_START);
429 BUG_ON((char *)&atomic_xor32 - (char *)&fixed_code_start
430 != ATOMIC_XOR32 - FIXED_CODE_START);
394 431
395 printk(KERN_INFO "Hardware Trace Enabled\n"); 432 bf53x_cache_init();
396 bfin_write_TBUFCTL(0x03);
397} 433}
398 434
399static int __init topology_init(void) 435static int __init topology_init(void)
@@ -411,286 +447,6 @@ static int __init topology_init(void)
411 447
412subsys_initcall(topology_init); 448subsys_initcall(topology_init);
413 449
414#if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE)
415static u16 __init lock_kernel_check(u32 start, u32 end)
416{
417 if ((start <= (u32) _stext && end >= (u32) _end)
418 || (start >= (u32) _stext && end <= (u32) _end))
419 return IN_KERNEL;
420 return 0;
421}
422
423static unsigned short __init
424fill_cplbtab(struct cplb_tab *table,
425 unsigned long start, unsigned long end,
426 unsigned long block_size, unsigned long cplb_data)
427{
428 int i;
429
430 switch (block_size) {
431 case SIZE_4M:
432 i = 3;
433 break;
434 case SIZE_1M:
435 i = 2;
436 break;
437 case SIZE_4K:
438 i = 1;
439 break;
440 case SIZE_1K:
441 default:
442 i = 0;
443 break;
444 }
445
446 cplb_data = (cplb_data & ~(3 << 16)) | (i << 16);
447
448 while ((start < end) && (table->pos < table->size)) {
449
450 table->tab[table->pos++] = start;
451
452 if (lock_kernel_check(start, start + block_size) == IN_KERNEL)
453 table->tab[table->pos++] =
454 cplb_data | CPLB_LOCK | CPLB_DIRTY;
455 else
456 table->tab[table->pos++] = cplb_data;
457
458 start += block_size;
459 }
460 return 0;
461}
462
463static unsigned short __init
464close_cplbtab(struct cplb_tab *table)
465{
466
467 while (table->pos < table->size) {
468
469 table->tab[table->pos++] = 0;
470 table->tab[table->pos++] = 0; /* !CPLB_VALID */
471 }
472 return 0;
473}
474
475/* helper function */
476static void __fill_code_cplbtab(struct cplb_tab *t, int i,
477 u32 a_start, u32 a_end)
478{
479 if (cplb_data[i].psize) {
480 fill_cplbtab(t,
481 cplb_data[i].start,
482 cplb_data[i].end,
483 cplb_data[i].psize,
484 cplb_data[i].i_conf);
485 } else {
486#if (defined(CONFIG_BLKFIN_CACHE) && defined(ANOMALY_05000263))
487 if (i == SDRAM_KERN) {
488 fill_cplbtab(t,
489 cplb_data[i].start,
490 cplb_data[i].end,
491 SIZE_4M,
492 cplb_data[i].i_conf);
493 } else {
494#endif
495 fill_cplbtab(t,
496 cplb_data[i].start,
497 a_start,
498 SIZE_1M,
499 cplb_data[i].i_conf);
500 fill_cplbtab(t,
501 a_start,
502 a_end,
503 SIZE_4M,
504 cplb_data[i].i_conf);
505 fill_cplbtab(t, a_end,
506 cplb_data[i].end,
507 SIZE_1M,
508 cplb_data[i].i_conf);
509 }
510 }
511}
512
513static void __fill_data_cplbtab(struct cplb_tab *t, int i,
514 u32 a_start, u32 a_end)
515{
516 if (cplb_data[i].psize) {
517 fill_cplbtab(t,
518 cplb_data[i].start,
519 cplb_data[i].end,
520 cplb_data[i].psize,
521 cplb_data[i].d_conf);
522 } else {
523 fill_cplbtab(t,
524 cplb_data[i].start,
525 a_start, SIZE_1M,
526 cplb_data[i].d_conf);
527 fill_cplbtab(t, a_start,
528 a_end, SIZE_4M,
529 cplb_data[i].d_conf);
530 fill_cplbtab(t, a_end,
531 cplb_data[i].end,
532 SIZE_1M,
533 cplb_data[i].d_conf);
534 }
535}
536static void __init generate_cpl_tables(void)
537{
538
539 u16 i, j, process;
540 u32 a_start, a_end, as, ae, as_1m;
541
542 struct cplb_tab *t_i = NULL;
543 struct cplb_tab *t_d = NULL;
544 struct s_cplb cplb;
545
546 cplb.init_i.size = MAX_CPLBS;
547 cplb.init_d.size = MAX_CPLBS;
548 cplb.switch_i.size = MAX_SWITCH_I_CPLBS;
549 cplb.switch_d.size = MAX_SWITCH_D_CPLBS;
550
551 cplb.init_i.pos = 0;
552 cplb.init_d.pos = 0;
553 cplb.switch_i.pos = 0;
554 cplb.switch_d.pos = 0;
555
556 cplb.init_i.tab = icplb_table;
557 cplb.init_d.tab = dcplb_table;
558 cplb.switch_i.tab = ipdt_table;
559 cplb.switch_d.tab = dpdt_table;
560
561 cplb_data[SDRAM_KERN].end = memory_end;
562
563#ifdef CONFIG_MTD_UCLINUX
564 cplb_data[SDRAM_RAM_MTD].start = memory_mtd_start;
565 cplb_data[SDRAM_RAM_MTD].end = memory_mtd_start + mtd_size;
566 cplb_data[SDRAM_RAM_MTD].valid = mtd_size > 0;
567# if defined(CONFIG_ROMFS_FS)
568 cplb_data[SDRAM_RAM_MTD].attr |= I_CPLB;
569
570 /*
571 * The ROMFS_FS size is often not multiple of 1MB.
572 * This can cause multiple CPLB sets covering the same memory area.
573 * This will then cause multiple CPLB hit exceptions.
574 * Workaround: We ensure a contiguous memory area by extending the kernel
575 * memory section over the mtd section.
576 * For ROMFS_FS memory must be covered with ICPLBs anyways.
577 * So there is no difference between kernel and mtd memory setup.
578 */
579
580 cplb_data[SDRAM_KERN].end = memory_mtd_start + mtd_size;;
581 cplb_data[SDRAM_RAM_MTD].valid = 0;
582
583# endif
584#else
585 cplb_data[SDRAM_RAM_MTD].valid = 0;
586#endif
587
588 cplb_data[SDRAM_DMAZ].start = _ramend - DMA_UNCACHED_REGION;
589 cplb_data[SDRAM_DMAZ].end = _ramend;
590
591 cplb_data[RES_MEM].start = _ramend;
592 cplb_data[RES_MEM].end = physical_mem_end;
593
594 if (reserved_mem_dcache_on)
595 cplb_data[RES_MEM].d_conf = SDRAM_DGENERIC;
596 else
597 cplb_data[RES_MEM].d_conf = SDRAM_DNON_CHBL;
598
599 if (reserved_mem_icache_on)
600 cplb_data[RES_MEM].i_conf = SDRAM_IGENERIC;
601 else
602 cplb_data[RES_MEM].i_conf = SDRAM_INON_CHBL;
603
604 for (i = ZERO_P; i <= L2_MEM; i++) {
605 if (!cplb_data[i].valid)
606 continue;
607
608 as_1m = cplb_data[i].start % SIZE_1M;
609
610 /*
611 * We need to make sure all sections are properly 1M aligned
612 * However between Kernel Memory and the Kernel mtd section,
613 * depending on the rootfs size, there can be overlapping
614 * memory areas.
615 */
616
617 if (as_1m && i != L1I_MEM && i != L1D_MEM) {
618#ifdef CONFIG_MTD_UCLINUX
619 if (i == SDRAM_RAM_MTD) {
620 if ((cplb_data[SDRAM_KERN].end + 1) >
621 cplb_data[SDRAM_RAM_MTD].start)
622 cplb_data[SDRAM_RAM_MTD].start =
623 (cplb_data[i].start &
624 (-2*SIZE_1M)) + SIZE_1M;
625 else
626 cplb_data[SDRAM_RAM_MTD].start =
627 (cplb_data[i].start &
628 (-2*SIZE_1M));
629 } else
630#endif
631 printk(KERN_WARNING
632 "Unaligned Start of %s at 0x%X\n",
633 cplb_data[i].name, cplb_data[i].start);
634 }
635
636 as = cplb_data[i].start % SIZE_4M;
637 ae = cplb_data[i].end % SIZE_4M;
638
639 if (as)
640 a_start = cplb_data[i].start + (SIZE_4M - (as));
641 else
642 a_start = cplb_data[i].start;
643
644 a_end = cplb_data[i].end - ae;
645
646 for (j = INITIAL_T; j <= SWITCH_T; j++) {
647
648 switch (j) {
649 case INITIAL_T:
650 if (cplb_data[i].attr & INITIAL_T) {
651 t_i = &cplb.init_i;
652 t_d = &cplb.init_d;
653 process = 1;
654 } else
655 process = 0;
656 break;
657 case SWITCH_T:
658 if (cplb_data[i].attr & SWITCH_T) {
659 t_i = &cplb.switch_i;
660 t_d = &cplb.switch_d;
661 process = 1;
662 } else
663 process = 0;
664 break;
665 default:
666 process = 0;
667 break;
668 }
669
670 if (!process)
671 continue;
672 if (cplb_data[i].attr & I_CPLB)
673 __fill_code_cplbtab(t_i, i, a_start, a_end);
674
675 if (cplb_data[i].attr & D_CPLB)
676 __fill_data_cplbtab(t_d, i, a_start, a_end);
677 }
678 }
679
680/* close tables */
681
682 close_cplbtab(&cplb.init_i);
683 close_cplbtab(&cplb.init_d);
684
685 cplb.init_i.tab[cplb.init_i.pos] = -1;
686 cplb.init_d.tab[cplb.init_d.pos] = -1;
687 cplb.switch_i.tab[cplb.switch_i.pos] = -1;
688 cplb.switch_d.tab[cplb.switch_d.pos] = -1;
689
690}
691
692#endif
693
694static u_long get_vco(void) 450static u_long get_vco(void)
695{ 451{
696 u_long msel; 452 u_long msel;
@@ -720,7 +476,6 @@ u_long get_cclk(void)
720 return get_vco() / ssel; 476 return get_vco() / ssel;
721 return get_vco() >> csel; 477 return get_vco() >> csel;
722} 478}
723
724EXPORT_SYMBOL(get_cclk); 479EXPORT_SYMBOL(get_cclk);
725 480
726/* Get the System clock */ 481/* Get the System clock */
@@ -739,7 +494,6 @@ u_long get_sclk(void)
739 494
740 return get_vco() / ssel; 495 return get_vco() / ssel;
741} 496}
742
743EXPORT_SYMBOL(get_sclk); 497EXPORT_SYMBOL(get_sclk);
744 498
745/* 499/*
@@ -794,23 +548,23 @@ static int show_cpuinfo(struct seq_file *m, void *v)
794 seq_printf(m, "D-CACHE:\tOFF\n"); 548 seq_printf(m, "D-CACHE:\tOFF\n");
795 549
796 550
797 switch(bfin_read_DMEM_CONTROL() & (1 << DMC0_P | 1 << DMC1_P)) { 551 switch (bfin_read_DMEM_CONTROL() & (1 << DMC0_P | 1 << DMC1_P)) {
798 case ACACHE_BSRAM: 552 case ACACHE_BSRAM:
799 seq_printf(m, "DBANK-A:\tCACHE\n" "DBANK-B:\tSRAM\n"); 553 seq_printf(m, "DBANK-A:\tCACHE\n" "DBANK-B:\tSRAM\n");
800 dcache_size = 16; 554 dcache_size = 16;
801 dsup_banks = 1; 555 dsup_banks = 1;
802 break; 556 break;
803 case ACACHE_BCACHE: 557 case ACACHE_BCACHE:
804 seq_printf(m, "DBANK-A:\tCACHE\n" "DBANK-B:\tCACHE\n"); 558 seq_printf(m, "DBANK-A:\tCACHE\n" "DBANK-B:\tCACHE\n");
805 dcache_size = 32; 559 dcache_size = 32;
806 dsup_banks = 2; 560 dsup_banks = 2;
807 break; 561 break;
808 case ASRAM_BSRAM: 562 case ASRAM_BSRAM:
809 seq_printf(m, "DBANK-A:\tSRAM\n" "DBANK-B:\tSRAM\n"); 563 seq_printf(m, "DBANK-A:\tSRAM\n" "DBANK-B:\tSRAM\n");
810 dcache_size = 0; 564 dcache_size = 0;
811 dsup_banks = 0; 565 dsup_banks = 0;
812 break; 566 break;
813 default: 567 default:
814 break; 568 break;
815 } 569 }
816 570
diff --git a/arch/blackfin/kernel/signal.c b/arch/blackfin/kernel/signal.c
index 316e65c343..5564c9588a 100644
--- a/arch/blackfin/kernel/signal.c
+++ b/arch/blackfin/kernel/signal.c
@@ -34,8 +34,8 @@
34#include <linux/personality.h> 34#include <linux/personality.h>
35#include <linux/binfmts.h> 35#include <linux/binfmts.h>
36#include <linux/freezer.h> 36#include <linux/freezer.h>
37#include <linux/uaccess.h>
37 38
38#include <asm/uaccess.h>
39#include <asm/cacheflush.h> 39#include <asm/cacheflush.h>
40#include <asm/ucontext.h> 40#include <asm/ucontext.h>
41 41
@@ -124,7 +124,7 @@ asmlinkage int do_rt_sigreturn(unsigned long __unused)
124 124
125 return r0; 125 return r0;
126 126
127 badframe: 127 badframe:
128 force_sig(SIGSEGV, current); 128 force_sig(SIGSEGV, current);
129 return 0; 129 return 0;
130} 130}
@@ -239,7 +239,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t * info,
239 239
240 return 0; 240 return 0;
241 241
242 give_sigsegv: 242 give_sigsegv:
243 if (sig == SIGSEGV) 243 if (sig == SIGSEGV)
244 ka->sa.sa_handler = SIG_DFL; 244 ka->sa.sa_handler = SIG_DFL;
245 force_sig(SIGSEGV, current); 245 force_sig(SIGSEGV, current);
@@ -263,7 +263,7 @@ handle_restart(struct pt_regs *regs, struct k_sigaction *ka, int has_handler)
263 } 263 }
264 /* fallthrough */ 264 /* fallthrough */
265 case -ERESTARTNOINTR: 265 case -ERESTARTNOINTR:
266 do_restart: 266 do_restart:
267 regs->p0 = regs->orig_p0; 267 regs->p0 = regs->orig_p0;
268 regs->r0 = regs->orig_r0; 268 regs->r0 = regs->orig_r0;
269 regs->pc -= 2; 269 regs->pc -= 2;
@@ -341,7 +341,7 @@ asmlinkage void do_signal(struct pt_regs *regs)
341 return; 341 return;
342 } 342 }
343 343
344no_signal: 344 no_signal:
345 /* Did we come from a system call? */ 345 /* Did we come from a system call? */
346 if (regs->orig_p0 >= 0) 346 if (regs->orig_p0 >= 0)
347 /* Restart the system call - no handlers present */ 347 /* Restart the system call - no handlers present */
diff --git a/arch/blackfin/kernel/sys_bfin.c b/arch/blackfin/kernel/sys_bfin.c
index f436e6743f..f5e1ae3d17 100644
--- a/arch/blackfin/kernel/sys_bfin.c
+++ b/arch/blackfin/kernel/sys_bfin.c
@@ -37,12 +37,12 @@
37#include <linux/syscalls.h> 37#include <linux/syscalls.h>
38#include <linux/mman.h> 38#include <linux/mman.h>
39#include <linux/file.h> 39#include <linux/file.h>
40#include <linux/uaccess.h>
41#include <linux/ipc.h>
42#include <linux/unistd.h>
40 43
41#include <asm/cacheflush.h> 44#include <asm/cacheflush.h>
42#include <asm/uaccess.h>
43#include <asm/ipc.h>
44#include <asm/dma.h> 45#include <asm/dma.h>
45#include <asm/unistd.h>
46 46
47/* 47/*
48 * sys_pipe() is the normal C calling standard for creating 48 * sys_pipe() is the normal C calling standard for creating
@@ -83,7 +83,7 @@ do_mmap2(unsigned long addr, unsigned long len,
83 83
84 if (file) 84 if (file)
85 fput(file); 85 fput(file);
86 out: 86 out:
87 return error; 87 return error;
88} 88}
89 89
diff --git a/arch/blackfin/kernel/time.c b/arch/blackfin/kernel/time.c
index f578176b6d..beef057bd1 100644
--- a/arch/blackfin/kernel/time.c
+++ b/arch/blackfin/kernel/time.c
@@ -87,7 +87,7 @@ void __init init_leds(void)
87static inline void do_leds(void) 87static inline void do_leds(void)
88{ 88{
89 static unsigned int count = 50; 89 static unsigned int count = 50;
90 static int flag = 0; 90 static int flag;
91 unsigned short tmp = 0; 91 unsigned short tmp = 0;
92 92
93 if (--count == 0) { 93 if (--count == 0) {
@@ -200,7 +200,7 @@ irqreturn_t timer_interrupt(int irq, void *dummy)__attribute__((l1_text));
200irqreturn_t timer_interrupt(int irq, void *dummy) 200irqreturn_t timer_interrupt(int irq, void *dummy)
201{ 201{
202 /* last time the cmos clock got updated */ 202 /* last time the cmos clock got updated */
203 static long last_rtc_update = 0; 203 static long last_rtc_update;
204 204
205 write_seqlock(&xtime_lock); 205 write_seqlock(&xtime_lock);
206 206
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index aa660f32d8..3909f5b355 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -27,15 +27,15 @@
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */ 28 */
29 29
30#include <asm/uaccess.h> 30#include <linux/uaccess.h>
31#include <linux/interrupt.h>
32#include <linux/module.h>
33#include <linux/kallsyms.h>
31#include <asm/traps.h> 34#include <asm/traps.h>
32#include <asm/cacheflush.h> 35#include <asm/cacheflush.h>
33#include <asm/blackfin.h> 36#include <asm/blackfin.h>
34#include <asm/uaccess.h>
35#include <asm/irq_handler.h> 37#include <asm/irq_handler.h>
36#include <linux/interrupt.h> 38#include <asm/trace.h>
37#include <linux/module.h>
38#include <linux/kallsyms.h>
39 39
40#ifdef CONFIG_KGDB 40#ifdef CONFIG_KGDB
41# include <linux/debugger.h> 41# include <linux/debugger.h>
@@ -76,7 +76,7 @@ static int printk_address(unsigned long address)
76 if (!modname) 76 if (!modname)
77 modname = delim = ""; 77 modname = delim = "";
78 return printk("<0x%p> { %s%s%s%s + 0x%lx }", 78 return printk("<0x%p> { %s%s%s%s + 0x%lx }",
79 (void*)address, delim, modname, delim, symname, 79 (void *)address, delim, modname, delim, symname,
80 (unsigned long)offset); 80 (unsigned long)offset);
81 81
82 } 82 }
@@ -119,7 +119,7 @@ static int printk_address(unsigned long address)
119 119
120 write_unlock_irq(&tasklist_lock); 120 write_unlock_irq(&tasklist_lock);
121 return printk("<0x%p> [ %s + 0x%lx ]", 121 return printk("<0x%p> [ %s + 0x%lx ]",
122 (void*)address, name, offset); 122 (void *)address, name, offset);
123 } 123 }
124 124
125 vml = vml->next; 125 vml = vml->next;
@@ -128,19 +128,9 @@ static int printk_address(unsigned long address)
128 write_unlock_irq(&tasklist_lock); 128 write_unlock_irq(&tasklist_lock);
129 129
130 /* we were unable to find this address anywhere */ 130 /* we were unable to find this address anywhere */
131 return printk("[<0x%p>]", (void*)address); 131 return printk("[<0x%p>]", (void *)address);
132} 132}
133 133
134#define trace_buffer_save(x) \
135 do { \
136 (x) = bfin_read_TBUFCTL(); \
137 bfin_write_TBUFCTL((x) & ~TBUFEN); \
138 } while (0)
139#define trace_buffer_restore(x) \
140 do { \
141 bfin_write_TBUFCTL((x)); \
142 } while (0)
143
144asmlinkage void trap_c(struct pt_regs *fp) 134asmlinkage void trap_c(struct pt_regs *fp)
145{ 135{
146 int j, sig = 0; 136 int j, sig = 0;
@@ -203,15 +193,14 @@ asmlinkage void trap_c(struct pt_regs *fp)
203#else 193#else
204 /* 0x02 - User Defined, Caught by default */ 194 /* 0x02 - User Defined, Caught by default */
205#endif 195#endif
206 /* 0x03 - Atomic test and set */ 196 /* 0x03 - User Defined, userspace stack overflow */
207 case VEC_EXCPT03: 197 case VEC_EXCPT03:
208 info.si_code = SEGV_STACKFLOW; 198 info.si_code = SEGV_STACKFLOW;
209 sig = SIGSEGV; 199 sig = SIGSEGV;
210 printk(KERN_EMERG EXC_0x03); 200 printk(KERN_EMERG EXC_0x03);
211 CHK_DEBUGGER_TRAP(); 201 CHK_DEBUGGER_TRAP();
212 break; 202 break;
213 /* 0x04 - spinlock - handled by _ex_spinlock, 203 /* 0x04 - User Defined, Caught by default */
214 getting here is an error */
215 /* 0x05 - User Defined, Caught by default */ 204 /* 0x05 - User Defined, Caught by default */
216 /* 0x06 - User Defined, Caught by default */ 205 /* 0x06 - User Defined, Caught by default */
217 /* 0x07 - User Defined, Caught by default */ 206 /* 0x07 - User Defined, Caught by default */
@@ -545,30 +534,30 @@ void dump_bfin_regs(struct pt_regs *fp, void *retaddr)
545 534
546 if (current->mm) { 535 if (current->mm) {
547 printk(KERN_EMERG "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" 536 printk(KERN_EMERG "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n"
548 "BSS = 0x%p-0x%p USER-STACK = 0x%p\n\n", 537 KERN_EMERG "BSS = 0x%p-0x%p USER-STACK = 0x%p\n"
549 (void*)current->mm->start_code, 538 KERN_EMERG "\n",
550 (void*)current->mm->end_code, 539 (void *)current->mm->start_code,
551 (void*)current->mm->start_data, 540 (void *)current->mm->end_code,
552 (void*)current->mm->end_data, 541 (void *)current->mm->start_data,
553 (void*)current->mm->end_data, 542 (void *)current->mm->end_data,
554 (void*)current->mm->brk, 543 (void *)current->mm->end_data,
555 (void*)current->mm->start_stack); 544 (void *)current->mm->brk,
545 (void *)current->mm->start_stack);
556 } 546 }
557 547
558 printk(KERN_EMERG "return address: [0x%p]; contents of:", retaddr); 548 printk(KERN_EMERG "return address: [0x%p]; contents of:", retaddr);
559 if (retaddr != 0 && retaddr <= (void*)physical_mem_end 549 if (retaddr != 0 && retaddr <= (void *)physical_mem_end
560#if L1_CODE_LENGTH != 0 550#if L1_CODE_LENGTH != 0
561 /* FIXME: Copy the code out of L1 Instruction SRAM through dma 551 /* FIXME: Copy the code out of L1 Instruction SRAM through dma
562 memcpy. */ 552 memcpy. */
563 && !(retaddr >= (void*)L1_CODE_START 553 && !(retaddr >= (void *)L1_CODE_START
564 && retaddr < (void*)(L1_CODE_START + L1_CODE_LENGTH)) 554 && retaddr < (void *)(L1_CODE_START + L1_CODE_LENGTH))
565#endif 555#endif
566 ) { 556 ) {
567 int i = ((unsigned int)retaddr & 0xFFFFFFF0) - 32; 557 int i = ((unsigned int)retaddr & 0xFFFFFFF0) - 32;
568 unsigned short x = 0; 558 unsigned short x = 0;
569 for (; i < ((unsigned int)retaddr & 0xFFFFFFF0 ) + 32 ; 559 for (; i < ((unsigned int)retaddr & 0xFFFFFFF0) + 32; i += 2) {
570 i += 2) { 560 if (!(i & 0xF))
571 if ( !(i & 0xF) )
572 printk(KERN_EMERG "\n" KERN_EMERG 561 printk(KERN_EMERG "\n" KERN_EMERG
573 "0x%08x: ", i); 562 "0x%08x: ", i);
574 563
@@ -587,7 +576,7 @@ void dump_bfin_regs(struct pt_regs *fp, void *retaddr)
587 " The rest of this error" 576 " The rest of this error"
588 " is meanless\n"); 577 " is meanless\n");
589#endif 578#endif
590 if ( i == (unsigned int)retaddr ) 579 if (i == (unsigned int)retaddr)
591 printk("[%04x]", x); 580 printk("[%04x]", x);
592 else 581 else
593 printk(" %04x ", x); 582 printk(" %04x ", x);
@@ -680,8 +669,8 @@ void panic_cplb_error(int cplb_panic, struct pt_regs *fp)
680 break; 669 break;
681 } 670 }
682 671
683 printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", (void*)bfin_read_DCPLB_FAULT_ADDR()); 672 printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", (void *)bfin_read_DCPLB_FAULT_ADDR());
684 printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", (void*)bfin_read_ICPLB_FAULT_ADDR()); 673 printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", (void *)bfin_read_ICPLB_FAULT_ADDR());
685 dump_bfin_regs(fp, (void *)fp->retx); 674 dump_bfin_regs(fp, (void *)fp->retx);
686 dump_stack(); 675 dump_stack();
687 panic("Unrecoverable event\n"); 676 panic("Unrecoverable event\n");
diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S
index 1ef1e36b39..d06f860f47 100644
--- a/arch/blackfin/kernel/vmlinux.lds.S
+++ b/arch/blackfin/kernel/vmlinux.lds.S
@@ -31,6 +31,7 @@
31 31
32#include <asm-generic/vmlinux.lds.h> 32#include <asm-generic/vmlinux.lds.h>
33#include <asm/mem_map.h> 33#include <asm/mem_map.h>
34#include <asm/page.h>
34 35
35OUTPUT_FORMAT("elf32-bfin") 36OUTPUT_FORMAT("elf32-bfin")
36ENTRY(__start) 37ENTRY(__start)
@@ -63,8 +64,8 @@ SECTIONS
63 64
64 .data : 65 .data :
65 { 66 {
67 . = ALIGN(PAGE_SIZE);
66 __sdata = .; 68 __sdata = .;
67 . = ALIGN(0x2000);
68 *(.data.init_task) 69 *(.data.init_task)
69 DATA_DATA 70 DATA_DATA
70 CONSTRUCTORS 71 CONSTRUCTORS
@@ -72,14 +73,14 @@ SECTIONS
72 . = ALIGN(32); 73 . = ALIGN(32);
73 *(.data.cacheline_aligned) 74 *(.data.cacheline_aligned)
74 75
75 . = ALIGN(0x2000); 76 . = ALIGN(PAGE_SIZE);
76 __edata = .; 77 __edata = .;
77 } 78 }
78 79
80 . = ALIGN(PAGE_SIZE);
79 ___init_begin = .; 81 ___init_begin = .;
80 .init : 82 .init :
81 { 83 {
82 . = ALIGN(4096);
83 __sinittext = .; 84 __sinittext = .;
84 *(.init.text) 85 *(.init.text)
85 __einittext = .; 86 __einittext = .;
@@ -152,9 +153,10 @@ SECTIONS
152 __ebss_b_l1 = .; 153 __ebss_b_l1 = .;
153 } 154 }
154 155
155 ___init_end = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1); 156 . = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
157 ___init_end = ALIGN(PAGE_SIZE);
156 158
157 .bss LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1) : 159 .bss ___init_end :
158 { 160 {
159 . = ALIGN(4); 161 . = ALIGN(4);
160 ___bss_start = .; 162 ___bss_start = .;
diff --git a/arch/blackfin/lib/strcmp.c b/arch/blackfin/lib/strcmp.c
index 2ad47c4254..4eeefd8690 100644
--- a/arch/blackfin/lib/strcmp.c
+++ b/arch/blackfin/lib/strcmp.c
@@ -6,6 +6,5 @@
6 6
7int strcmp(const char *dest, const char *src) 7int strcmp(const char *dest, const char *src)
8{ 8{
9 return __inline_strcmp(dest, src); 9 return __inline_strcmp(dest, src);
10} 10}
11
diff --git a/arch/blackfin/lib/strcpy.c b/arch/blackfin/lib/strcpy.c
index 4dc835a8a1..534589db72 100644
--- a/arch/blackfin/lib/strcpy.c
+++ b/arch/blackfin/lib/strcpy.c
@@ -6,6 +6,5 @@
6 6
7char *strcpy(char *dest, const char *src) 7char *strcpy(char *dest, const char *src)
8{ 8{
9 return __inline_strcpy(dest, src); 9 return __inline_strcpy(dest, src);
10} 10}
11
diff --git a/arch/blackfin/lib/strncmp.c b/arch/blackfin/lib/strncmp.c
index 947bcfe3f3..d791f120bf 100644
--- a/arch/blackfin/lib/strncmp.c
+++ b/arch/blackfin/lib/strncmp.c
@@ -6,6 +6,5 @@
6 6
7int strncmp(const char *cs, const char *ct, size_t count) 7int strncmp(const char *cs, const char *ct, size_t count)
8{ 8{
9 return __inline_strncmp(cs, ct, count); 9 return __inline_strncmp(cs, ct, count);
10} 10}
11
diff --git a/arch/blackfin/lib/strncpy.c b/arch/blackfin/lib/strncpy.c
index 77a9b2e950..1fecb5c71f 100644
--- a/arch/blackfin/lib/strncpy.c
+++ b/arch/blackfin/lib/strncpy.c
@@ -6,6 +6,5 @@
6 6
7char *strncpy(char *dest, const char *src, size_t n) 7char *strncpy(char *dest, const char *src, size_t n)
8{ 8{
9 return __inline_strncpy(dest, src, n); 9 return __inline_strncpy(dest, src, n);
10} 10}
11
diff --git a/arch/blackfin/mach-bf533/Makefile b/arch/blackfin/mach-bf533/Makefile
index 76d2c2b857..8cce173636 100644
--- a/arch/blackfin/mach-bf533/Makefile
+++ b/arch/blackfin/mach-bf533/Makefile
@@ -4,6 +4,6 @@
4 4
5extra-y := head.o 5extra-y := head.o
6 6
7obj-y := ints-priority.o 7obj-y := ints-priority.o dma.o
8 8
9obj-$(CONFIG_CPU_FREQ_BF533) += cpu.o 9obj-$(CONFIG_CPU_FREQ) += cpu.o
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index edd31ce4f8..4545f363e6 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -34,7 +34,7 @@
34#include <linux/spi/spi.h> 34#include <linux/spi/spi.h>
35#include <linux/spi/flash.h> 35#include <linux/spi/flash.h>
36#include <linux/usb_isp1362.h> 36#include <linux/usb_isp1362.h>
37#include <asm/irq.h> 37#include <linux/irq.h>
38#include <asm/bfin5xx_spi.h> 38#include <asm/bfin5xx_spi.h>
39 39
40/* 40/*
@@ -51,11 +51,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
51 .size = 0x00020000, 51 .size = 0x00020000,
52 .offset = 0, 52 .offset = 0,
53 .mask_flags = MTD_CAP_ROM 53 .mask_flags = MTD_CAP_ROM
54 },{ 54 }, {
55 .name = "kernel", 55 .name = "kernel",
56 .size = 0xe0000, 56 .size = 0xe0000,
57 .offset = 0x20000 57 .offset = 0x20000
58 },{ 58 }, {
59 .name = "file system", 59 .name = "file system",
60 .size = 0x700000, 60 .size = 0x700000,
61 .offset = 0x00100000, 61 .offset = 0x00100000,
@@ -98,7 +98,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
98 .platform_data = &bfin_spi_flash_data, 98 .platform_data = &bfin_spi_flash_data,
99 .controller_data = &spi_flash_chip_info, 99 .controller_data = &spi_flash_chip_info,
100 .mode = SPI_MODE_3, 100 .mode = SPI_MODE_3,
101 },{ 101 }, {
102 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 102 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
103 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 103 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
104 .bus_num = 1, /* Framework bus number */ 104 .bus_num = 1, /* Framework bus number */
@@ -145,7 +145,7 @@ static struct resource smc91x_resources[] = {
145 .start = 0x20200300, 145 .start = 0x20200300,
146 .end = 0x20200300 + 16, 146 .end = 0x20200300 + 16,
147 .flags = IORESOURCE_MEM, 147 .flags = IORESOURCE_MEM,
148 },{ 148 }, {
149 .start = IRQ_PF0, 149 .start = IRQ_PF0,
150 .end = IRQ_PF0, 150 .end = IRQ_PF0,
151 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 151 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -194,11 +194,11 @@ static struct resource isp1362_hcd_resources[] = {
194 .start = 0x20308000, 194 .start = 0x20308000,
195 .end = 0x20308000, 195 .end = 0x20308000,
196 .flags = IORESOURCE_MEM, 196 .flags = IORESOURCE_MEM,
197 },{ 197 }, {
198 .start = 0x20308004, 198 .start = 0x20308004,
199 .end = 0x20308004, 199 .end = 0x20308004,
200 .flags = IORESOURCE_MEM, 200 .flags = IORESOURCE_MEM,
201 },{ 201 }, {
202 .start = IRQ_PF4, 202 .start = IRQ_PF4,
203 .end = IRQ_PF4, 203 .end = IRQ_PF4,
204 .flags = IORESOURCE_IRQ, 204 .flags = IORESOURCE_IRQ,
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index 0b522d9516..0000b8f123 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -35,7 +35,7 @@
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/spi/flash.h> 36#include <linux/spi/flash.h>
37#include <linux/usb_isp1362.h> 37#include <linux/usb_isp1362.h>
38#include <asm/irq.h> 38#include <linux/irq.h>
39#include <asm/bfin5xx_spi.h> 39#include <asm/bfin5xx_spi.h>
40 40
41/* 41/*
@@ -61,7 +61,7 @@ static struct resource smc91x_resources[] = {
61 .start = 0x20310300, 61 .start = 0x20310300,
62 .end = 0x20310300 + 16, 62 .end = 0x20310300 + 16,
63 .flags = IORESOURCE_MEM, 63 .flags = IORESOURCE_MEM,
64 },{ 64 }, {
65 .start = IRQ_PF9, 65 .start = IRQ_PF9,
66 .end = IRQ_PF9, 66 .end = IRQ_PF9,
67 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 67 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -85,11 +85,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
85 .size = 0x00020000, 85 .size = 0x00020000,
86 .offset = 0, 86 .offset = 0,
87 .mask_flags = MTD_CAP_ROM 87 .mask_flags = MTD_CAP_ROM
88 },{ 88 }, {
89 .name = "kernel", 89 .name = "kernel",
90 .size = 0xe0000, 90 .size = 0xe0000,
91 .offset = 0x20000 91 .offset = 0x20000
92 },{ 92 }, {
93 .name = "file system", 93 .name = "file system",
94 .size = 0x700000, 94 .size = 0x700000,
95 .offset = 0x00100000, 95 .offset = 0x00100000,
diff --git a/arch/blackfin/mach-bf533/boards/generic_board.c b/arch/blackfin/mach-bf533/boards/generic_board.c
index c0f43ccfbf..9bc1f0d0ab 100644
--- a/arch/blackfin/mach-bf533/boards/generic_board.c
+++ b/arch/blackfin/mach-bf533/boards/generic_board.c
@@ -30,7 +30,7 @@
30 30
31#include <linux/device.h> 31#include <linux/device.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <asm/irq.h> 33#include <linux/irq.h>
34 34
35/* 35/*
36 * Name the Board for the /proc/cpuinfo 36 * Name the Board for the /proc/cpuinfo
@@ -53,11 +53,11 @@ static struct resource smc91x_resources[] = {
53 .start = 0x20300300, 53 .start = 0x20300300,
54 .end = 0x20300300 + 16, 54 .end = 0x20300300 + 16,
55 .flags = IORESOURCE_MEM, 55 .flags = IORESOURCE_MEM,
56 },{ 56 }, {
57 .start = IRQ_PROG_INTB, 57 .start = IRQ_PROG_INTB,
58 .end = IRQ_PROG_INTB, 58 .end = IRQ_PROG_INTB,
59 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 59 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
60 },{ 60 }, {
61 /* 61 /*
62 * denotes the flag pin and is used directly if 62 * denotes the flag pin and is used directly if
63 * CONFIG_IRQCHIP_DEMUX_GPIO is defined. 63 * CONFIG_IRQCHIP_DEMUX_GPIO is defined.
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 9a472fe158..a9143c4cbd 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -37,7 +37,7 @@
37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
38#include <linux/usb_isp1362.h> 38#include <linux/usb_isp1362.h>
39#endif 39#endif
40#include <asm/irq.h> 40#include <linux/irq.h>
41#include <asm/bfin5xx_spi.h> 41#include <asm/bfin5xx_spi.h>
42 42
43/* 43/*
@@ -62,7 +62,7 @@ static struct resource smc91x_resources[] = {
62 .start = 0x20300300, 62 .start = 0x20300300,
63 .end = 0x20300300 + 16, 63 .end = 0x20300300 + 16,
64 .flags = IORESOURCE_MEM, 64 .flags = IORESOURCE_MEM,
65 },{ 65 }, {
66 .start = IRQ_PF7, 66 .start = IRQ_PF7,
67 .end = IRQ_PF7, 67 .end = IRQ_PF7,
68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -83,7 +83,7 @@ static struct resource net2272_bfin_resources[] = {
83 .start = 0x20300000, 83 .start = 0x20300000,
84 .end = 0x20300000 + 0x100, 84 .end = 0x20300000 + 0x100,
85 .flags = IORESOURCE_MEM, 85 .flags = IORESOURCE_MEM,
86 },{ 86 }, {
87 .start = IRQ_PF10, 87 .start = IRQ_PF10,
88 .end = IRQ_PF10, 88 .end = IRQ_PF10,
89 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 89 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -108,11 +108,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
108 .size = 0x00020000, 108 .size = 0x00020000,
109 .offset = 0, 109 .offset = 0,
110 .mask_flags = MTD_CAP_ROM 110 .mask_flags = MTD_CAP_ROM
111 },{ 111 }, {
112 .name = "kernel", 112 .name = "kernel",
113 .size = 0xe0000, 113 .size = 0xe0000,
114 .offset = 0x20000 114 .offset = 0x20000
115 },{ 115 }, {
116 .name = "file system", 116 .name = "file system",
117 .size = 0x700000, 117 .size = 0x700000,
118 .offset = 0x00100000, 118 .offset = 0x00100000,
@@ -229,19 +229,19 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
229 229
230#if defined(CONFIG_PBX) 230#if defined(CONFIG_PBX)
231 { 231 {
232 .modalias = "fxs-spi", 232 .modalias = "fxs-spi",
233 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 233 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
234 .bus_num = 1, 234 .bus_num = 1,
235 .chip_select = 3, 235 .chip_select = 3,
236 .controller_data= &spi_si3xxx_chip_info, 236 .controller_data = &spi_si3xxx_chip_info,
237 .mode = SPI_MODE_3, 237 .mode = SPI_MODE_3,
238 }, 238 },
239 { 239 {
240 .modalias = "fxo-spi", 240 .modalias = "fxo-spi",
241 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 241 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
242 .bus_num = 1, 242 .bus_num = 1,
243 .chip_select = 2, 243 .chip_select = 2,
244 .controller_data= &spi_si3xxx_chip_info, 244 .controller_data = &spi_si3xxx_chip_info,
245 .mode = SPI_MODE_3, 245 .mode = SPI_MODE_3,
246 }, 246 },
247#endif 247#endif
diff --git a/arch/blackfin/mach-bf533/cpu.c b/arch/blackfin/mach-bf533/cpu.c
index 99547c4c29..6fd9cfd0a3 100644
--- a/arch/blackfin/mach-bf533/cpu.c
+++ b/arch/blackfin/mach-bf533/cpu.c
@@ -79,8 +79,7 @@ static int bf533_target(struct cpufreq_policy *policy,
79 int i; 79 int i;
80 80
81 struct cpufreq_freqs freqs; 81 struct cpufreq_freqs freqs;
82 if (cpufreq_frequency_table_target 82 if (cpufreq_frequency_table_target(policy, bf533_freq_table, target_freq, relation, &index))
83 (policy, bf533_freq_table, target_freq, relation, &index))
84 return -EINVAL; 83 return -EINVAL;
85 cclk_mhz = bf533_freq_table[index].frequency; 84 cclk_mhz = bf533_freq_table[index].frequency;
86 vco_mhz = bf533_freq_table[index].index; 85 vco_mhz = bf533_freq_table[index].index;
diff --git a/arch/blackfin/mach-bf533/dma.c b/arch/blackfin/mach-bf533/dma.c
new file mode 100644
index 0000000000..6c909cf4f7
--- /dev/null
+++ b/arch/blackfin/mach-bf533/dma.c
@@ -0,0 +1,95 @@
1/*
2 * File: arch/blackfin/mach-bf533/dma.c
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: This file contains the simple DMA Implementation for Blackfin
8 *
9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
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, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29#include <asm/blackfin.h>
30#include <asm/dma.h>
31
32struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
33 (struct dma_register *) DMA0_NEXT_DESC_PTR,
34 (struct dma_register *) DMA1_NEXT_DESC_PTR,
35 (struct dma_register *) DMA2_NEXT_DESC_PTR,
36 (struct dma_register *) DMA3_NEXT_DESC_PTR,
37 (struct dma_register *) DMA4_NEXT_DESC_PTR,
38 (struct dma_register *) DMA5_NEXT_DESC_PTR,
39 (struct dma_register *) DMA6_NEXT_DESC_PTR,
40 (struct dma_register *) DMA7_NEXT_DESC_PTR,
41 (struct dma_register *) MDMA_D0_NEXT_DESC_PTR,
42 (struct dma_register *) MDMA_S0_NEXT_DESC_PTR,
43 (struct dma_register *) MDMA_D1_NEXT_DESC_PTR,
44 (struct dma_register *) MDMA_S1_NEXT_DESC_PTR,
45};
46
47int channel2irq(unsigned int channel)
48{
49 int ret_irq = -1;
50
51 switch (channel) {
52 case CH_PPI:
53 ret_irq = IRQ_PPI;
54 break;
55
56 case CH_SPORT0_RX:
57 ret_irq = IRQ_SPORT0_RX;
58 break;
59
60 case CH_SPORT0_TX:
61 ret_irq = IRQ_SPORT0_TX;
62 break;
63
64 case CH_SPORT1_RX:
65 ret_irq = IRQ_SPORT1_RX;
66 break;
67
68 case CH_SPORT1_TX:
69 ret_irq = IRQ_SPORT1_TX;
70 break;
71
72 case CH_SPI:
73 ret_irq = IRQ_SPI;
74 break;
75
76 case CH_UART_RX:
77 ret_irq = IRQ_UART_RX;
78 break;
79
80 case CH_UART_TX:
81 ret_irq = IRQ_UART_TX;
82 break;
83
84 case CH_MEM_STREAM0_SRC:
85 case CH_MEM_STREAM0_DEST:
86 ret_irq = IRQ_MEM_DMA0;
87 break;
88
89 case CH_MEM_STREAM1_SRC:
90 case CH_MEM_STREAM1_DEST:
91 ret_irq = IRQ_MEM_DMA1;
92 break;
93 }
94 return ret_irq;
95}
diff --git a/arch/blackfin/mach-bf533/head.S b/arch/blackfin/mach-bf533/head.S
index 7e2aa8d0f4..7dd0e9c3a9 100644
--- a/arch/blackfin/mach-bf533/head.S
+++ b/arch/blackfin/mach-bf533/head.S
@@ -30,6 +30,7 @@
30#include <linux/linkage.h> 30#include <linux/linkage.h>
31#include <linux/init.h> 31#include <linux/init.h>
32#include <asm/blackfin.h> 32#include <asm/blackfin.h>
33#include <asm/trace.h>
33#if CONFIG_BFIN_KERNEL_CLOCK 34#if CONFIG_BFIN_KERNEL_CLOCK
34#include <asm/mach/mem_init.h> 35#include <asm/mach/mem_init.h>
35#endif 36#endif
@@ -96,6 +97,10 @@ ENTRY(__start)
96 M2 = r0; 97 M2 = r0;
97 M3 = r0; 98 M3 = r0;
98 99
100 trace_buffer_start(p0,r0);
101 P0 = R1;
102 R0 = R1;
103
99#if CONFIG_DEBUG_KERNEL_START 104#if CONFIG_DEBUG_KERNEL_START
100 105
101/* 106/*
diff --git a/arch/blackfin/mach-bf533/ints-priority.c b/arch/blackfin/mach-bf533/ints-priority.c
index a3e1789167..7d79e0f950 100644
--- a/arch/blackfin/mach-bf533/ints-priority.c
+++ b/arch/blackfin/mach-bf533/ints-priority.c
@@ -28,8 +28,8 @@
28 */ 28 */
29 29
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/irq.h>
31#include <asm/blackfin.h> 32#include <asm/blackfin.h>
32#include <asm/irq.h>
33 33
34void program_IAR(void) 34void program_IAR(void)
35{ 35{
diff --git a/arch/blackfin/mach-bf537/Makefile b/arch/blackfin/mach-bf537/Makefile
index f32d44215b..7e7c9c8ac5 100644
--- a/arch/blackfin/mach-bf537/Makefile
+++ b/arch/blackfin/mach-bf537/Makefile
@@ -4,6 +4,6 @@
4 4
5extra-y := head.o 5extra-y := head.o
6 6
7obj-y := ints-priority.o 7obj-y := ints-priority.o dma.o
8 8
9obj-$(CONFIG_CPU_FREQ) += cpu.o 9obj-$(CONFIG_CPU_FREQ) += cpu.o
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c
index 6a60618a78..a8f947b727 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c
@@ -35,7 +35,7 @@
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/spi/flash.h> 36#include <linux/spi/flash.h>
37#include <linux/usb_isp1362.h> 37#include <linux/usb_isp1362.h>
38#include <asm/irq.h> 38#include <linux/irq.h>
39#include <asm/bfin5xx_spi.h> 39#include <asm/bfin5xx_spi.h>
40 40
41/* 41/*
@@ -53,11 +53,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
53 .size = 0x00020000, 53 .size = 0x00020000,
54 .offset = 0, 54 .offset = 0,
55 .mask_flags = MTD_CAP_ROM 55 .mask_flags = MTD_CAP_ROM
56 },{ 56 }, {
57 .name = "kernel", 57 .name = "kernel",
58 .size = 0xe0000, 58 .size = 0xe0000,
59 .offset = 0x20000 59 .offset = 0x20000
60 },{ 60 }, {
61 .name = "file system", 61 .name = "file system",
62 .size = 0x700000, 62 .size = 0x700000,
63 .offset = 0x00100000, 63 .offset = 0x00100000,
@@ -202,7 +202,7 @@ static struct resource smc91x_resources[] = {
202 .start = 0x20200300, 202 .start = 0x20200300,
203 .end = 0x20200300 + 16, 203 .end = 0x20200300 + 16,
204 .flags = IORESOURCE_MEM, 204 .flags = IORESOURCE_MEM,
205 },{ 205 }, {
206 .start = IRQ_PF14, 206 .start = IRQ_PF14,
207 .end = IRQ_PF14, 207 .end = IRQ_PF14,
208 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 208 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -223,11 +223,11 @@ static struct resource isp1362_hcd_resources[] = {
223 .start = 0x20308000, 223 .start = 0x20308000,
224 .end = 0x20308000, 224 .end = 0x20308000,
225 .flags = IORESOURCE_MEM, 225 .flags = IORESOURCE_MEM,
226 },{ 226 }, {
227 .start = 0x20308004, 227 .start = 0x20308004,
228 .end = 0x20308004, 228 .end = 0x20308004,
229 .flags = IORESOURCE_MEM, 229 .flags = IORESOURCE_MEM,
230 },{ 230 }, {
231 .start = IRQ_PG15, 231 .start = IRQ_PG15,
232 .end = IRQ_PG15, 232 .end = IRQ_PG15,
233 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 233 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -262,7 +262,7 @@ static struct resource net2272_bfin_resources[] = {
262 .start = 0x20200000, 262 .start = 0x20200000,
263 .end = 0x20200000 + 0x100, 263 .end = 0x20200000 + 0x100,
264 .flags = IORESOURCE_MEM, 264 .flags = IORESOURCE_MEM,
265 },{ 265 }, {
266 .start = IRQ_PF7, 266 .start = IRQ_PF7,
267 .end = IRQ_PF7, 267 .end = IRQ_PF7,
268 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 268 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -283,7 +283,7 @@ static struct resource bfin_uart_resources[] = {
283 .start = 0xFFC00400, 283 .start = 0xFFC00400,
284 .end = 0xFFC004FF, 284 .end = 0xFFC004FF,
285 .flags = IORESOURCE_MEM, 285 .flags = IORESOURCE_MEM,
286 },{ 286 }, {
287 .start = 0xFFC02000, 287 .start = 0xFFC02000,
288 .end = 0xFFC020FF, 288 .end = 0xFFC020FF,
289 .flags = IORESOURCE_MEM, 289 .flags = IORESOURCE_MEM,
diff --git a/arch/blackfin/mach-bf537/boards/eth_mac.c b/arch/blackfin/mach-bf537/boards/eth_mac.c
index e129a08d63..a725cc8a92 100644
--- a/arch/blackfin/mach-bf537/boards/eth_mac.c
+++ b/arch/blackfin/mach-bf537/boards/eth_mac.c
@@ -20,8 +20,7 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <asm/blackfin.h> 21#include <asm/blackfin.h>
22 22
23#if defined(CONFIG_GENERIC_BOARD) \ 23#if defined(CONFIG_GENERIC_BOARD) || defined(CONFIG_BFIN537_STAMP)
24 || defined(CONFIG_BFIN537_STAMP)
25 24
26/* 25/*
27 * Currently the MAC address is saved in Flash by U-Boot 26 * Currently the MAC address is saved in Flash by U-Boot
@@ -43,7 +42,7 @@ void get_bf537_ether_addr(char *addr)
43 */ 42 */
44void get_bf537_ether_addr(char *addr) 43void get_bf537_ether_addr(char *addr)
45{ 44{
46 printk(KERN_WARNING "%s: No valid Ethernet MAC address found\n",__FILE__); 45 printk(KERN_WARNING "%s: No valid Ethernet MAC address found\n", __FILE__);
47} 46}
48 47
49#endif 48#endif
diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c
index fd57e7439e..648d984e98 100644
--- a/arch/blackfin/mach-bf537/boards/generic_board.c
+++ b/arch/blackfin/mach-bf537/boards/generic_board.c
@@ -35,9 +35,9 @@
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/spi/flash.h> 36#include <linux/spi/flash.h>
37#include <linux/usb_isp1362.h> 37#include <linux/usb_isp1362.h>
38#include <asm/irq.h> 38#include <linux/irq.h>
39#include <asm/bfin5xx_spi.h>
40#include <linux/usb_sl811.h> 39#include <linux/usb_sl811.h>
40#include <asm/bfin5xx_spi.h>
41 41
42/* 42/*
43 * Name the Board for the /proc/cpuinfo 43 * Name the Board for the /proc/cpuinfo
@@ -54,19 +54,19 @@ static struct resource bfin_pcmcia_cf_resources[] = {
54 .start = 0x20310000, /* IO PORT */ 54 .start = 0x20310000, /* IO PORT */
55 .end = 0x20312000, 55 .end = 0x20312000,
56 .flags = IORESOURCE_MEM, 56 .flags = IORESOURCE_MEM,
57 },{ 57 }, {
58 .start = 0x20311000, /* Attribute Memory */ 58 .start = 0x20311000, /* Attribute Memory */
59 .end = 0x20311FFF, 59 .end = 0x20311FFF,
60 .flags = IORESOURCE_MEM, 60 .flags = IORESOURCE_MEM,
61 },{ 61 }, {
62 .start = IRQ_PROG_INTA, 62 .start = IRQ_PROG_INTA,
63 .end = IRQ_PROG_INTA, 63 .end = IRQ_PROG_INTA,
64 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, 64 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
65 },{ 65 }, {
66 .start = IRQ_PF4, 66 .start = IRQ_PF4,
67 .end = IRQ_PF4, 67 .end = IRQ_PF4,
68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, 68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
69 },{ 69 }, {
70 .start = 6, /* Card Detect PF6 */ 70 .start = 6, /* Card Detect PF6 */
71 .end = 6, 71 .end = 6,
72 .flags = IORESOURCE_IRQ, 72 .flags = IORESOURCE_IRQ,
@@ -95,11 +95,11 @@ static struct resource smc91x_resources[] = {
95 .start = 0x20300300, 95 .start = 0x20300300,
96 .end = 0x20300300 + 16, 96 .end = 0x20300300 + 16,
97 .flags = IORESOURCE_MEM, 97 .flags = IORESOURCE_MEM,
98 },{ 98 }, {
99 .start = IRQ_PROG_INTB, 99 .start = IRQ_PROG_INTB,
100 .end = IRQ_PROG_INTB, 100 .end = IRQ_PROG_INTB,
101 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 101 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
102 },{ 102 }, {
103 /* 103 /*
104 * denotes the flag pin and is used directly if 104 * denotes the flag pin and is used directly if
105 * CONFIG_IRQCHIP_DEMUX_GPIO is defined. 105 * CONFIG_IRQCHIP_DEMUX_GPIO is defined.
@@ -123,15 +123,15 @@ static struct resource sl811_hcd_resources[] = {
123 .start = 0x20340000, 123 .start = 0x20340000,
124 .end = 0x20340000, 124 .end = 0x20340000,
125 .flags = IORESOURCE_MEM, 125 .flags = IORESOURCE_MEM,
126 },{ 126 }, {
127 .start = 0x20340004, 127 .start = 0x20340004,
128 .end = 0x20340004, 128 .end = 0x20340004,
129 .flags = IORESOURCE_MEM, 129 .flags = IORESOURCE_MEM,
130 },{ 130 }, {
131 .start = IRQ_PROG_INTA, 131 .start = IRQ_PROG_INTA,
132 .end = IRQ_PROG_INTA, 132 .end = IRQ_PROG_INTA,
133 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 133 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
134 },{ 134 }, {
135 .start = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO, 135 .start = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO,
136 .end = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO, 136 .end = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO,
137 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 137 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -179,15 +179,15 @@ static struct resource isp1362_hcd_resources[] = {
179 .start = 0x20360000, 179 .start = 0x20360000,
180 .end = 0x20360000, 180 .end = 0x20360000,
181 .flags = IORESOURCE_MEM, 181 .flags = IORESOURCE_MEM,
182 },{ 182 }, {
183 .start = 0x20360004, 183 .start = 0x20360004,
184 .end = 0x20360004, 184 .end = 0x20360004,
185 .flags = IORESOURCE_MEM, 185 .flags = IORESOURCE_MEM,
186 },{ 186 }, {
187 .start = IRQ_PROG_INTA, 187 .start = IRQ_PROG_INTA,
188 .end = IRQ_PROG_INTA, 188 .end = IRQ_PROG_INTA,
189 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 189 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
190 },{ 190 }, {
191 .start = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO, 191 .start = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO,
192 .end = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO, 192 .end = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO,
193 .flags = IORESOURCE_IRQ, 193 .flags = IORESOURCE_IRQ,
@@ -228,7 +228,7 @@ static struct resource net2272_bfin_resources[] = {
228 .start = 0x20300000, 228 .start = 0x20300000,
229 .end = 0x20300000 + 0x100, 229 .end = 0x20300000 + 0x100,
230 .flags = IORESOURCE_MEM, 230 .flags = IORESOURCE_MEM,
231 },{ 231 }, {
232 .start = IRQ_PF7, 232 .start = IRQ_PF7,
233 .end = IRQ_PF7, 233 .end = IRQ_PF7,
234 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 234 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -253,11 +253,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
253 .size = 0x00020000, 253 .size = 0x00020000,
254 .offset = 0, 254 .offset = 0,
255 .mask_flags = MTD_CAP_ROM 255 .mask_flags = MTD_CAP_ROM
256 },{ 256 }, {
257 .name = "kernel", 257 .name = "kernel",
258 .size = 0xe0000, 258 .size = 0xe0000,
259 .offset = 0x20000 259 .offset = 0x20000
260 },{ 260 }, {
261 .name = "file system", 261 .name = "file system",
262 .size = 0x700000, 262 .size = 0x700000,
263 .offset = 0x00100000, 263 .offset = 0x00100000,
@@ -375,7 +375,7 @@ static struct resource bfin_uart_resources[] = {
375 .start = 0xFFC00400, 375 .start = 0xFFC00400,
376 .end = 0xFFC004FF, 376 .end = 0xFFC004FF,
377 .flags = IORESOURCE_MEM, 377 .flags = IORESOURCE_MEM,
378 },{ 378 }, {
379 .start = 0xFFC02000, 379 .start = 0xFFC02000,
380 .end = 0xFFC020FF, 380 .end = 0xFFC020FF,
381 .flags = IORESOURCE_MEM, 381 .flags = IORESOURCE_MEM,
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c
index 8aaf76dfce..8806f1230f 100644
--- a/arch/blackfin/mach-bf537/boards/pnav10.c
+++ b/arch/blackfin/mach-bf537/boards/pnav10.c
@@ -37,7 +37,7 @@
37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
38#include <linux/usb_isp1362.h> 38#include <linux/usb_isp1362.h>
39#endif 39#endif
40#include <asm/irq.h> 40#include <linux/irq.h>
41#include <asm/bfin5xx_spi.h> 41#include <asm/bfin5xx_spi.h>
42#include <linux/usb_sl811.h> 42#include <linux/usb_sl811.h>
43 43
@@ -58,15 +58,15 @@ static struct resource bfin_pcmcia_cf_resources[] = {
58 .start = 0x20310000, /* IO PORT */ 58 .start = 0x20310000, /* IO PORT */
59 .end = 0x20312000, 59 .end = 0x20312000,
60 .flags = IORESOURCE_MEM, 60 .flags = IORESOURCE_MEM,
61 },{ 61 }, {
62 .start = 0x20311000, /* Attribute Memory */ 62 .start = 0x20311000, /* Attribute Memory */
63 .end = 0x20311FFF, 63 .end = 0x20311FFF,
64 .flags = IORESOURCE_MEM, 64 .flags = IORESOURCE_MEM,
65 },{ 65 }, {
66 .start = IRQ_PF4, 66 .start = IRQ_PF4,
67 .end = IRQ_PF4, 67 .end = IRQ_PF4,
68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, 68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
69 },{ 69 }, {
70 .start = 6, /* Card Detect PF6 */ 70 .start = 6, /* Card Detect PF6 */
71 .end = 6, 71 .end = 6,
72 .flags = IORESOURCE_IRQ, 72 .flags = IORESOURCE_IRQ,
@@ -95,7 +95,7 @@ static struct resource smc91x_resources[] = {
95 .start = 0x20300300, 95 .start = 0x20300300,
96 .end = 0x20300300 + 16, 96 .end = 0x20300300 + 16,
97 .flags = IORESOURCE_MEM, 97 .flags = IORESOURCE_MEM,
98 },{ 98 }, {
99 99
100 .start = IRQ_PF7, 100 .start = IRQ_PF7,
101 .end = IRQ_PF7, 101 .end = IRQ_PF7,
@@ -116,11 +116,11 @@ static struct resource sl811_hcd_resources[] = {
116 .start = 0x20340000, 116 .start = 0x20340000,
117 .end = 0x20340000, 117 .end = 0x20340000,
118 .flags = IORESOURCE_MEM, 118 .flags = IORESOURCE_MEM,
119 },{ 119 }, {
120 .start = 0x20340004, 120 .start = 0x20340004,
121 .end = 0x20340004, 121 .end = 0x20340004,
122 .flags = IORESOURCE_MEM, 122 .flags = IORESOURCE_MEM,
123 },{ 123 }, {
124 .start = CONFIG_USB_SL811_BFIN_IRQ, 124 .start = CONFIG_USB_SL811_BFIN_IRQ,
125 .end = CONFIG_USB_SL811_BFIN_IRQ, 125 .end = CONFIG_USB_SL811_BFIN_IRQ,
126 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 126 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -167,11 +167,11 @@ static struct resource isp1362_hcd_resources[] = {
167 .start = 0x20360000, 167 .start = 0x20360000,
168 .end = 0x20360000, 168 .end = 0x20360000,
169 .flags = IORESOURCE_MEM, 169 .flags = IORESOURCE_MEM,
170 },{ 170 }, {
171 .start = 0x20360004, 171 .start = 0x20360004,
172 .end = 0x20360004, 172 .end = 0x20360004,
173 .flags = IORESOURCE_MEM, 173 .flags = IORESOURCE_MEM,
174 },{ 174 }, {
175 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, 175 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
176 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, 176 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
177 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 177 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -212,7 +212,7 @@ static struct resource net2272_bfin_resources[] = {
212 .start = 0x20300000, 212 .start = 0x20300000,
213 .end = 0x20300000 + 0x100, 213 .end = 0x20300000 + 0x100,
214 .flags = IORESOURCE_MEM, 214 .flags = IORESOURCE_MEM,
215 },{ 215 }, {
216 .start = IRQ_PF7, 216 .start = IRQ_PF7,
217 .end = IRQ_PF7, 217 .end = IRQ_PF7,
218 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 218 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -238,11 +238,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
238 .size = 0x00020000, 238 .size = 0x00020000,
239 .offset = 0, 239 .offset = 0,
240 .mask_flags = MTD_CAP_ROM 240 .mask_flags = MTD_CAP_ROM
241 },{ 241 }, {
242 .name = "kernel", 242 .name = "kernel",
243 .size = 0xe0000, 243 .size = 0xe0000,
244 .offset = 0x20000 244 .offset = 0x20000
245 },{ 245 }, {
246 .name = "file system", 246 .name = "file system",
247 .size = 0x700000, 247 .size = 0x700000,
248 .offset = 0x00100000, 248 .offset = 0x00100000,
@@ -294,16 +294,6 @@ static struct bfin5xx_spi_chip spi_mmc_chip_info = {
294}; 294};
295#endif 295#endif
296 296
297#if defined(CONFIG_PBX)
298static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
299 .ctl_reg = 0x4, /* send zero */
300 .enable_dma = 0,
301 .bits_per_word = 8,
302 .cs_change_per_word = 1,
303};
304#endif
305
306
307#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 297#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
308static struct bfin5xx_spi_chip spi_ad7877_chip_info = { 298static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
309 .cs_change_per_word = 1, 299 .cs_change_per_word = 1,
@@ -392,24 +382,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
392 .mode = SPI_MODE_3, 382 .mode = SPI_MODE_3,
393 }, 383 },
394#endif 384#endif
395#if defined(CONFIG_PBX)
396 {
397 .modalias = "fxs-spi",
398 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
399 .bus_num = 1,
400 .chip_select = 3,
401 .controller_data= &spi_si3xxx_chip_info,
402 .mode = SPI_MODE_3,
403 },
404 {
405 .modalias = "fxo-spi",
406 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
407 .bus_num = 1,
408 .chip_select = 2,
409 .controller_data= &spi_si3xxx_chip_info,
410 .mode = SPI_MODE_3,
411 },
412#endif
413#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 385#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
414{ 386{
415 .modalias = "ad7877", 387 .modalias = "ad7877",
@@ -451,7 +423,7 @@ static struct resource bfin_uart_resources[] = {
451 .start = 0xFFC00400, 423 .start = 0xFFC00400,
452 .end = 0xFFC004FF, 424 .end = 0xFFC004FF,
453 .flags = IORESOURCE_MEM, 425 .flags = IORESOURCE_MEM,
454 },{ 426 }, {
455 .start = 0xFFC02000, 427 .start = 0xFFC02000,
456 .end = 0xFFC020FF, 428 .end = 0xFFC020FF,
457 .flags = IORESOURCE_MEM, 429 .flags = IORESOURCE_MEM,
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 3a29b4d15f..9c43d77565 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -37,12 +37,10 @@
37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
38#include <linux/usb_isp1362.h> 38#include <linux/usb_isp1362.h>
39#endif 39#endif
40#include <asm/irq.h>
41#include <linux/irq.h> 40#include <linux/irq.h>
42#include <linux/interrupt.h> 41#include <linux/interrupt.h>
43#include <asm/bfin5xx_spi.h>
44#include <linux/usb_sl811.h> 42#include <linux/usb_sl811.h>
45 43#include <asm/bfin5xx_spi.h>
46#include <linux/spi/ad7877.h> 44#include <linux/spi/ad7877.h>
47 45
48/* 46/*
@@ -85,7 +83,7 @@ static struct platform_device *bfin_isp1761_devices[] = {
85 83
86int __init bfin_isp1761_init(void) 84int __init bfin_isp1761_init(void)
87{ 85{
88 unsigned int num_devices=ARRAY_SIZE(bfin_isp1761_devices); 86 unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices);
89 87
90 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); 88 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
91 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING); 89 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING);
@@ -107,15 +105,15 @@ static struct resource bfin_pcmcia_cf_resources[] = {
107 .start = 0x20310000, /* IO PORT */ 105 .start = 0x20310000, /* IO PORT */
108 .end = 0x20312000, 106 .end = 0x20312000,
109 .flags = IORESOURCE_MEM, 107 .flags = IORESOURCE_MEM,
110 },{ 108 }, {
111 .start = 0x20311000, /* Attribute Memory */ 109 .start = 0x20311000, /* Attribute Memory */
112 .end = 0x20311FFF, 110 .end = 0x20311FFF,
113 .flags = IORESOURCE_MEM, 111 .flags = IORESOURCE_MEM,
114 },{ 112 }, {
115 .start = IRQ_PF4, 113 .start = IRQ_PF4,
116 .end = IRQ_PF4, 114 .end = IRQ_PF4,
117 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, 115 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
118 },{ 116 }, {
119 .start = 6, /* Card Detect PF6 */ 117 .start = 6, /* Card Detect PF6 */
120 .end = 6, 118 .end = 6,
121 .flags = IORESOURCE_IRQ, 119 .flags = IORESOURCE_IRQ,
@@ -144,7 +142,7 @@ static struct resource smc91x_resources[] = {
144 .start = 0x20300300, 142 .start = 0x20300300,
145 .end = 0x20300300 + 16, 143 .end = 0x20300300 + 16,
146 .flags = IORESOURCE_MEM, 144 .flags = IORESOURCE_MEM,
147 },{ 145 }, {
148 146
149 .start = IRQ_PF7, 147 .start = IRQ_PF7,
150 .end = IRQ_PF7, 148 .end = IRQ_PF7,
@@ -159,17 +157,39 @@ static struct platform_device smc91x_device = {
159}; 157};
160#endif 158#endif
161 159
160#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
161static struct resource dm9000_resources[] = {
162 [0] = {
163 .start = 0x203FB800,
164 .end = 0x203FB800 + 8,
165 .flags = IORESOURCE_MEM,
166 },
167 [1] = {
168 .start = IRQ_PF9,
169 .end = IRQ_PF9,
170 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
171 },
172};
173
174static struct platform_device dm9000_device = {
175 .name = "dm9000",
176 .id = -1,
177 .num_resources = ARRAY_SIZE(dm9000_resources),
178 .resource = dm9000_resources,
179};
180#endif
181
162#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) 182#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
163static struct resource sl811_hcd_resources[] = { 183static struct resource sl811_hcd_resources[] = {
164 { 184 {
165 .start = 0x20340000, 185 .start = 0x20340000,
166 .end = 0x20340000, 186 .end = 0x20340000,
167 .flags = IORESOURCE_MEM, 187 .flags = IORESOURCE_MEM,
168 },{ 188 }, {
169 .start = 0x20340004, 189 .start = 0x20340004,
170 .end = 0x20340004, 190 .end = 0x20340004,
171 .flags = IORESOURCE_MEM, 191 .flags = IORESOURCE_MEM,
172 },{ 192 }, {
173 .start = CONFIG_USB_SL811_BFIN_IRQ, 193 .start = CONFIG_USB_SL811_BFIN_IRQ,
174 .end = CONFIG_USB_SL811_BFIN_IRQ, 194 .end = CONFIG_USB_SL811_BFIN_IRQ,
175 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 195 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -216,11 +236,11 @@ static struct resource isp1362_hcd_resources[] = {
216 .start = 0x20360000, 236 .start = 0x20360000,
217 .end = 0x20360000, 237 .end = 0x20360000,
218 .flags = IORESOURCE_MEM, 238 .flags = IORESOURCE_MEM,
219 },{ 239 }, {
220 .start = 0x20360004, 240 .start = 0x20360004,
221 .end = 0x20360004, 241 .end = 0x20360004,
222 .flags = IORESOURCE_MEM, 242 .flags = IORESOURCE_MEM,
223 },{ 243 }, {
224 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, 244 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
225 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, 245 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
226 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 246 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -261,7 +281,7 @@ static struct resource net2272_bfin_resources[] = {
261 .start = 0x20300000, 281 .start = 0x20300000,
262 .end = 0x20300000 + 0x100, 282 .end = 0x20300000 + 0x100,
263 .flags = IORESOURCE_MEM, 283 .flags = IORESOURCE_MEM,
264 },{ 284 }, {
265 .start = IRQ_PF7, 285 .start = IRQ_PF7,
266 .end = IRQ_PF7, 286 .end = IRQ_PF7,
267 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 287 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -287,11 +307,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
287 .size = 0x00020000, 307 .size = 0x00020000,
288 .offset = 0, 308 .offset = 0,
289 .mask_flags = MTD_CAP_ROM 309 .mask_flags = MTD_CAP_ROM
290 },{ 310 }, {
291 .name = "kernel", 311 .name = "kernel",
292 .size = 0xe0000, 312 .size = 0xe0000,
293 .offset = 0x20000 313 .offset = 0x20000
294 },{ 314 }, {
295 .name = "file system", 315 .name = "file system",
296 .size = 0x700000, 316 .size = 0x700000,
297 .offset = 0x00100000, 317 .offset = 0x00100000,
@@ -361,7 +381,6 @@ static struct bfin5xx_spi_chip ad5304_chip_info = {
361 381
362#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 382#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
363static struct bfin5xx_spi_chip spi_ad7877_chip_info = { 383static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
364// .cs_change_per_word = 1,
365 .enable_dma = 0, 384 .enable_dma = 0,
366 .bits_per_word = 16, 385 .bits_per_word = 16,
367}; 386};
@@ -449,19 +468,19 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
449#endif 468#endif
450#if defined(CONFIG_PBX) 469#if defined(CONFIG_PBX)
451 { 470 {
452 .modalias = "fxs-spi", 471 .modalias = "fxs-spi",
453 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 472 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
454 .bus_num = 1, 473 .bus_num = 1,
455 .chip_select = 3, 474 .chip_select = 3,
456 .controller_data= &spi_si3xxx_chip_info, 475 .controller_data = &spi_si3xxx_chip_info,
457 .mode = SPI_MODE_3, 476 .mode = SPI_MODE_3,
458 }, 477 },
459 { 478 {
460 .modalias = "fxo-spi", 479 .modalias = "fxo-spi",
461 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 480 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
462 .bus_num = 1, 481 .bus_num = 1,
463 .chip_select = 2, 482 .chip_select = 2,
464 .controller_data= &spi_si3xxx_chip_info, 483 .controller_data = &spi_si3xxx_chip_info,
465 .mode = SPI_MODE_3, 484 .mode = SPI_MODE_3,
466 }, 485 },
467#endif 486#endif
@@ -516,7 +535,7 @@ static struct resource bfin_uart_resources[] = {
516 .start = 0xFFC00400, 535 .start = 0xFFC00400,
517 .end = 0xFFC004FF, 536 .end = 0xFFC004FF,
518 .flags = IORESOURCE_MEM, 537 .flags = IORESOURCE_MEM,
519 },{ 538 }, {
520 .start = 0xFFC02000, 539 .start = 0xFFC02000,
521 .end = 0xFFC020FF, 540 .end = 0xFFC020FF,
522 .flags = IORESOURCE_MEM, 541 .flags = IORESOURCE_MEM,
@@ -571,6 +590,10 @@ static struct platform_device *stamp_devices[] __initdata = {
571 &smc91x_device, 590 &smc91x_device,
572#endif 591#endif
573 592
593#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
594 &dm9000_device,
595#endif
596
574#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 597#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
575 &bfin_mac_device, 598 &bfin_mac_device,
576#endif 599#endif
diff --git a/arch/blackfin/mach-bf537/dma.c b/arch/blackfin/mach-bf537/dma.c
new file mode 100644
index 0000000000..706cb97b02
--- /dev/null
+++ b/arch/blackfin/mach-bf537/dma.c
@@ -0,0 +1,115 @@
1/*
2 * File: arch/blackfin/mach-bf537/dma.c
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: This file contains the simple DMA Implementation for Blackfin
8 *
9 * Modified:
10 * Copyright 2004-2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
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, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29#include <asm/blackfin.h>
30#include <asm/dma.h>
31
32struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
33 (struct dma_register *) DMA0_NEXT_DESC_PTR,
34 (struct dma_register *) DMA1_NEXT_DESC_PTR,
35 (struct dma_register *) DMA2_NEXT_DESC_PTR,
36 (struct dma_register *) DMA3_NEXT_DESC_PTR,
37 (struct dma_register *) DMA4_NEXT_DESC_PTR,
38 (struct dma_register *) DMA5_NEXT_DESC_PTR,
39 (struct dma_register *) DMA6_NEXT_DESC_PTR,
40 (struct dma_register *) DMA7_NEXT_DESC_PTR,
41 (struct dma_register *) DMA8_NEXT_DESC_PTR,
42 (struct dma_register *) DMA9_NEXT_DESC_PTR,
43 (struct dma_register *) DMA10_NEXT_DESC_PTR,
44 (struct dma_register *) DMA11_NEXT_DESC_PTR,
45 (struct dma_register *) MDMA_D0_NEXT_DESC_PTR,
46 (struct dma_register *) MDMA_S0_NEXT_DESC_PTR,
47 (struct dma_register *) MDMA_D1_NEXT_DESC_PTR,
48 (struct dma_register *) MDMA_S1_NEXT_DESC_PTR,
49};
50
51int channel2irq(unsigned int channel)
52{
53 int ret_irq = -1;
54
55 switch (channel) {
56 case CH_PPI:
57 ret_irq = IRQ_PPI;
58 break;
59
60 case CH_EMAC_RX:
61 ret_irq = IRQ_MAC_RX;
62 break;
63
64 case CH_EMAC_TX:
65 ret_irq = IRQ_MAC_TX;
66 break;
67
68 case CH_UART1_RX:
69 ret_irq = IRQ_UART1_RX;
70 break;
71
72 case CH_UART1_TX:
73 ret_irq = IRQ_UART1_TX;
74 break;
75
76 case CH_SPORT0_RX:
77 ret_irq = IRQ_SPORT0_RX;
78 break;
79
80 case CH_SPORT0_TX:
81 ret_irq = IRQ_SPORT0_TX;
82 break;
83
84 case CH_SPORT1_RX:
85 ret_irq = IRQ_SPORT1_RX;
86 break;
87
88 case CH_SPORT1_TX:
89 ret_irq = IRQ_SPORT1_TX;
90 break;
91
92 case CH_SPI:
93 ret_irq = IRQ_SPI;
94 break;
95
96 case CH_UART_RX:
97 ret_irq = IRQ_UART_RX;
98 break;
99
100 case CH_UART_TX:
101 ret_irq = IRQ_UART_TX;
102 break;
103
104 case CH_MEM_STREAM0_SRC:
105 case CH_MEM_STREAM0_DEST:
106 ret_irq = IRQ_MEM_DMA0;
107 break;
108
109 case CH_MEM_STREAM1_SRC:
110 case CH_MEM_STREAM1_DEST:
111 ret_irq = IRQ_MEM_DMA1;
112 break;
113 }
114 return ret_irq;
115}
diff --git a/arch/blackfin/mach-bf537/head.S b/arch/blackfin/mach-bf537/head.S
index 7d902bbd86..429c8a1019 100644
--- a/arch/blackfin/mach-bf537/head.S
+++ b/arch/blackfin/mach-bf537/head.S
@@ -30,6 +30,8 @@
30#include <linux/linkage.h> 30#include <linux/linkage.h>
31#include <linux/init.h> 31#include <linux/init.h>
32#include <asm/blackfin.h> 32#include <asm/blackfin.h>
33#include <asm/trace.h>
34
33#if CONFIG_BFIN_KERNEL_CLOCK 35#if CONFIG_BFIN_KERNEL_CLOCK
34#include <asm/mach/mem_init.h> 36#include <asm/mach/mem_init.h>
35#endif 37#endif
@@ -93,6 +95,10 @@ ENTRY(__start)
93 M2 = r0; 95 M2 = r0;
94 M3 = r0; 96 M3 = r0;
95 97
98 trace_buffer_start(p0,r0);
99 P0 = R1;
100 R0 = R1;
101
96 /* Turn off the icache */ 102 /* Turn off the icache */
97 p0.l = (IMEM_CONTROL & 0xFFFF); 103 p0.l = (IMEM_CONTROL & 0xFFFF);
98 p0.h = (IMEM_CONTROL >> 16); 104 p0.h = (IMEM_CONTROL >> 16);
diff --git a/arch/blackfin/mach-bf537/ints-priority.c b/arch/blackfin/mach-bf537/ints-priority.c
index 2dbf3df465..a8b915f202 100644
--- a/arch/blackfin/mach-bf537/ints-priority.c
+++ b/arch/blackfin/mach-bf537/ints-priority.c
@@ -28,8 +28,8 @@
28 */ 28 */
29 29
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/irq.h>
31#include <asm/blackfin.h> 32#include <asm/blackfin.h>
32#include <asm/irq.h>
33 33
34void program_IAR(void) 34void program_IAR(void)
35{ 35{
diff --git a/arch/blackfin/mach-bf548/Kconfig b/arch/blackfin/mach-bf548/Kconfig
new file mode 100644
index 0000000000..e78b03d56c
--- /dev/null
+++ b/arch/blackfin/mach-bf548/Kconfig
@@ -0,0 +1,316 @@
1if (BF54x)
2
3menu "BF548 Specific Configuration"
4
5comment "Interrupt Priority Assignment"
6menu "Priority"
7
8config IRQ_PLL_WAKEUP
9 int "IRQ_PLL_WAKEUP"
10 default 7
11config IRQ_DMAC0_ERR
12 int "IRQ_DMAC0_ERR"
13 default 7
14config IRQ_EPPI0_ERR
15 int "IRQ_EPPI0_ERR"
16 default 7
17config IRQ_SPORT0_ERR
18 int "IRQ_SPORT0_ERR"
19 default 7
20config IRQ_SPORT1_ERR
21 int "IRQ_SPORT1_ERR"
22 default 7
23config IRQ_SPI0_ERR
24 int "IRQ_SPI0_ERR"
25 default 7
26config IRQ_UART0_ERR
27 int "IRQ_UART0_ERR"
28 default 7
29config IRQ_RTC
30 int "IRQ_RTC"
31 default 8
32config IRQ_EPPI0
33 int "IRQ_EPPI0"
34 default 8
35config IRQ_SPORT0_RX
36 int "IRQ_SPORT0_RX"
37 default 9
38config IRQ_SPORT0_TX
39 int "IRQ_SPORT0_TX"
40 default 9
41config IRQ_SPORT1_RX
42 int "IRQ_SPORT1_RX"
43 default 9
44config IRQ_SPORT1_TX
45 int "IRQ_SPORT1_TX"
46 default 9
47config IRQ_SPI0
48 int "IRQ_SPI0"
49 default 10
50config IRQ_UART0_RX
51 int "IRQ_UART0_RX"
52 default 10
53config IRQ_UART0_TX
54 int "IRQ_UART0_TX"
55 default 10
56config IRQ_TIMER8
57 int "IRQ_TIMER8"
58 default 11
59config IRQ_TIMER9
60 int "IRQ_TIMER9"
61 default 11
62config IRQ_TIMER10
63 int "IRQ_TIMER10"
64 default 11
65config IRQ_PINT0
66 int "IRQ_PINT0"
67 default 12
68config IRQ_PINT1
69 int "IRQ_PINT0"
70 default 12
71config IRQ_MDMAS0
72 int "IRQ_MDMAS0"
73 default 13
74config IRQ_MDMAS1
75 int "IRQ_DMDMAS1"
76 default 13
77config IRQ_WATCHDOG
78 int "IRQ_WATCHDOG"
79 default 13
80config IRQ_DMAC1_ERR
81 int "IRQ_DMAC1_ERR"
82 default 7
83config IRQ_SPORT2_ERR
84 int "IRQ_SPORT2_ERR"
85 default 7
86config IRQ_SPORT3_ERR
87 int "IRQ_SPORT3_ERR"
88 default 7
89config IRQ_MXVR_DATA
90 int "IRQ MXVR Data"
91 default 7
92config IRQ_SPI1_ERR
93 int "IRQ_SPI1_ERR"
94 default 7
95config IRQ_SPI2_ERR
96 int "IRQ_SPI2_ERR"
97 default 7
98config IRQ_UART1_ERR
99 int "IRQ_UART1_ERR"
100 default 7
101config IRQ_UART2_ERR
102 int "IRQ_UART2_ERR"
103 default 7
104config IRQ_CAN0_ERR
105 int "IRQ_CAN0_ERR"
106 default 7
107config IRQ_SPORT2_RX
108 int "IRQ_SPORT2_RX"
109 default 9
110config IRQ_SPORT2_TX
111 int "IRQ_SPORT2_TX"
112 default 9
113config IRQ_SPORT3_RX
114 int "IRQ_SPORT3_RX"
115 default 9
116config IRQ_SPORT3_TX
117 int "IRQ_SPORT3_TX"
118 default 9
119config IRQ_EPPI1
120 int "IRQ_EPPI1"
121 default 9
122config IRQ_EPPI2
123 int "IRQ_EPPI2"
124 default 9
125config IRQ_SPI1
126 int "IRQ_SPI1"
127 default 10
128config IRQ_SPI2
129 int "IRQ_SPI2"
130 default 10
131config IRQ_UART1_RX
132 int "IRQ_UART1_RX"
133 default 10
134config IRQ_UART1_TX
135 int "IRQ_UART1_TX"
136 default 10
137config IRQ_ATAPI_RX
138 int "IRQ_ATAPI_RX"
139 default 10
140config IRQ_ATAPI_TX
141 int "IRQ_ATAPI_TX"
142 default 10
143config IRQ_TWI0
144 int "IRQ_TWI0"
145 default 11
146config IRQ_TWI1
147 int "IRQ_TWI1"
148 default 11
149config IRQ_CAN0_RX
150 int "IRQ_CAN_RX"
151 default 11
152config IRQ_CAN0_TX
153 int "IRQ_CAN_TX"
154 default 11
155config IRQ_MDMAS2
156 int "IRQ_MDMAS2"
157 default 13
158config IRQ_MDMAS3
159 int "IRQ_DMMAS3"
160 default 13
161config IRQ_MXVR_ERR
162 int "IRQ_MXVR_ERR"
163 default 11
164config IRQ_MXVR_MSG
165 int "IRQ_MXVR_MSG"
166 default 11
167config IRQ_MXVR_PKT
168 int "IRQ_MXVR_PKT"
169 default 11
170config IRQ_EPPI1_ERR
171 int "IRQ_EPPI1_ERR"
172 default 7
173config IRQ_EPPI2_ERR
174 int "IRQ_EPPI2_ERR"
175 default 7
176config IRQ_UART3_ERR
177 int "IRQ_UART3_ERR"
178 default 7
179config IRQ_HOST_ERR
180 int "IRQ_HOST_ERR"
181 default 7
182config IRQ_PIXC_ERR
183 int "IRQ_PIXC_ERR"
184 default 7
185config IRQ_NFC_ERR
186 int "IRQ_NFC_ERR"
187 default 7
188config IRQ_ATAPI_ERR
189 int "IRQ_ATAPI_ERR"
190 default 7
191config IRQ_CAN1_ERR
192 int "IRQ_CAN1_ERR"
193 default 7
194config IRQ_HS_DMA_ERR
195 int "IRQ Handshake DMA Status"
196 default 7
197config IRQ_PIXC_IN0
198 int "IRQ PIXC IN0"
199 default 8
200config IRQ_PIXC_IN1
201 int "IRQ PIXC IN1"
202 default 8
203config IRQ_PIXC_OUT
204 int "IRQ PIXC OUT"
205 default 8
206config IRQ_SDH
207 int "IRQ SDH"
208 default 8
209config IRQ_CNT
210 int "IRQ CNT"
211 default 8
212config IRQ_KEY
213 int "IRQ KEY"
214 default 8
215config IRQ_CAN1_RX
216 int "IRQ CAN1 RX"
217 default 11
218config IRQ_CAN1_TX
219 int "IRQ_CAN1_TX"
220 default 11
221config IRQ_SDH_MASK0
222 int "IRQ_SDH_MASK0"
223 default 11
224config IRQ_SDH_MASK1
225 int "IRQ_SDH_MASK1"
226 default 11
227config IRQ_USB_INT0
228 int "IRQ USB INT0"
229 default 11
230config IRQ_USB_INT1
231 int "IRQ USB INT1"
232 default 11
233config IRQ_USB_INT2
234 int "IRQ USB INT2"
235 default 11
236config IRQ_USB_DMA
237 int "IRQ USB DMA"
238 default 11
239config IRQ_OTPSEC
240 int "IRQ OPTSEC"
241 default 11
242config IRQ_TIMER0
243 int "IRQ_TIMER0"
244 default 11
245config IRQ_TIMER1
246 int "IRQ_TIMER1"
247 default 11
248config IRQ_TIMER2
249 int "IRQ_TIMER2"
250 default 11
251config IRQ_TIMER3
252 int "IRQ_TIMER3"
253 default 11
254config IRQ_TIMER4
255 int "IRQ_TIMER4"
256 default 11
257config IRQ_TIMER5
258 int "IRQ_TIMER5"
259 default 11
260config IRQ_TIMER6
261 int "IRQ_TIMER6"
262 default 11
263config IRQ_TIMER7
264 int "IRQ_TIMER7"
265 default 11
266config IRQ_PINT2
267 int "IRQ_PIN2"
268 default 11
269config IRQ_PINT3
270 int "IRQ_PIN3"
271 default 11
272
273 help
274 Enter the priority numbers between 7-13 ONLY. Others are Reserved.
275 This applies to all the above. It is not recommended to assign the
276 highest priority number 7 to UART or any other device.
277
278endmenu
279
280comment "Pin Interrupt to Port Assignment"
281menu "Assignment"
282
283config PINTx_REASSIGN
284 bool "Reprogram PINT Assignment"
285 default n
286 help
287 The interrupt assignment registers controls the pin-to-interrupt
288 assignment in a byte-wide manner. Each option allows you to select
289 a set of pins (High/Low Byte) of an specific Port being mapped
290 to one of the four PIN Interrupts IRQ_PINTx.
291
292 You shouldn't change any of these unless you know exactly what you're doing.
293 Please consult the Blackfin BF54x Processor Hardware Reference Manual.
294
295config PINT0_ASSIGN
296 hex "PINT0_ASSIGN"
297 depends on PINTx_REASSIGN
298 default 0x00000101
299config PINT1_ASSIGN
300 hex "PINT1_ASSIGN"
301 depends on PINTx_REASSIGN
302 default 0x01010000
303config PINT2_ASSIGN
304 hex "PINT2_ASSIGN"
305 depends on PINTx_REASSIGN
306 default 0x00000101
307config PINT3_ASSIGN
308 hex "PINT3_ASSIGN"
309 depends on PINTx_REASSIGN
310 default 0x02020303
311
312endmenu
313
314endmenu
315
316endif
diff --git a/arch/blackfin/mach-bf548/Makefile b/arch/blackfin/mach-bf548/Makefile
new file mode 100644
index 0000000000..060ad78ebf
--- /dev/null
+++ b/arch/blackfin/mach-bf548/Makefile
@@ -0,0 +1,9 @@
1#
2# arch/blackfin/mach-bf537/Makefile
3#
4
5extra-y := head.o
6
7obj-y := ints-priority.o dma.o gpio.o
8
9obj-$(CONFIG_CPU_FREQ) += cpu.o
diff --git a/arch/blackfin/mach-bf548/boards/Makefile b/arch/blackfin/mach-bf548/boards/Makefile
new file mode 100644
index 0000000000..486e07c99a
--- /dev/null
+++ b/arch/blackfin/mach-bf548/boards/Makefile
@@ -0,0 +1,5 @@
1#
2# arch/blackfin/mach-bf548/boards/Makefile
3#
4
5obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o led.o
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
new file mode 100644
index 0000000000..96ad95fab1
--- /dev/null
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -0,0 +1,114 @@
1/*
2 * File: arch/blackfin/mach-bf548/boards/ezkit.c
3 * Based on: arch/blackfin/mach-bf537/boards/ezkit.c
4 * Author: Aidan Williams <aidan@nicta.com.au>
5 *
6 * Created:
7 * Description:
8 *
9 * Modified:
10 * Copyright 2005 National ICT Australia (NICTA)
11 * Copyright 2004-2007 Analog Devices Inc.
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, see the file COPYING, or write
27 * to the Free Software Foundation, Inc.,
28 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 */
30
31#include <linux/device.h>
32#include <linux/platform_device.h>
33#include <linux/mtd/mtd.h>
34#include <linux/mtd/partitions.h>
35#include <linux/spi/spi.h>
36#include <linux/spi/flash.h>
37#include <linux/irq.h>
38#include <linux/irq.h>
39#include <linux/interrupt.h>
40#include <asm/bfin5xx_spi.h>
41
42/*
43 * Name the Board for the /proc/cpuinfo
44 */
45char *bfin_board_name = "ADSP-BF548-EZKIT";
46
47/*
48 * Driver needs to know address, irq and flag pin.
49 */
50
51#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
52static struct platform_device rtc_device = {
53 .name = "rtc-bfin",
54 .id = -1,
55};
56#endif
57
58#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
59static struct resource bfin_uart_resources[] = {
60#ifdef CONFIG_SERIAL_BFIN_UART0
61 {
62 .start = 0xFFC00400,
63 .end = 0xFFC004FF,
64 .flags = IORESOURCE_MEM,
65 },
66#endif
67#ifdef CONFIG_SERIAL_BFIN_UART1
68 {
69 .start = 0xFFC02000,
70 .end = 0xFFC020FF,
71 .flags = IORESOURCE_MEM,
72 },
73#endif
74#ifdef CONFIG_SERIAL_BFIN_UART2
75 {
76 .start = 0xFFC02100,
77 .end = 0xFFC021FF,
78 .flags = IORESOURCE_MEM,
79 },
80#endif
81#ifdef CONFIG_SERIAL_BFIN_UART3
82 {
83 .start = 0xFFC03100,
84 .end = 0xFFC031FF,
85 },
86#endif
87};
88
89static struct platform_device bfin_uart_device = {
90 .name = "bfin-uart",
91 .id = 1,
92 .num_resources = ARRAY_SIZE(bfin_uart_resources),
93 .resource = bfin_uart_resources,
94};
95#endif
96
97static struct platform_device *ezkit_devices[] __initdata = {
98#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
99 &rtc_device,
100#endif
101
102#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
103 &bfin_uart_device,
104#endif
105};
106
107static int __init stamp_init(void)
108{
109 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
110 platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
111 return 0;
112}
113
114arch_initcall(stamp_init);
diff --git a/arch/blackfin/mach-bf548/boards/led.S b/arch/blackfin/mach-bf548/boards/led.S
new file mode 100644
index 0000000000..f47daf3770
--- /dev/null
+++ b/arch/blackfin/mach-bf548/boards/led.S
@@ -0,0 +1,172 @@
1/****************************************************
2 * LED1 ---- PG6 LED2 ---- PG7 *
3 * LED3 ---- PG8 LED4 ---- PG9 *
4 * LED5 ---- PG10 LED6 ---- PG11 *
5 ****************************************************/
6
7#include <linux/linkage.h>
8#include <asm/blackfin.h>
9
10/* All functions in this file save the registers they uses.
11 So there is no need to save any registers before calling them. */
12
13 .text;
14
15/* Initialize LEDs. */
16
17ENTRY(_led_init)
18 LINK 0;
19 [--SP] = P0;
20 [--SP] = R0;
21 [--SP] = R1;
22 [--SP] = R2;
23 R1 = (PG6|PG7|PG8|PG9|PG10|PG11)(Z);
24 R2 = ~R1;
25
26 P0.H = hi(PORTG_FER);
27 P0.L = lo(PORTG_FER);
28 R0 = W[P0](Z);
29 SSYNC;
30 R0 = R0 & R2;
31 W[P0] = R0.L;
32 SSYNC;
33
34 P0.H = hi(PORTG_DIR_SET);
35 P0.L = lo(PORTG_DIR_SET);
36 W[P0] = R1.L;
37 SSYNC;
38
39 P0.H = hi(PORTG_INEN);
40 P0.L = lo(PORTG_INEN);
41 R0 = W[P0](Z);
42 SSYNC;
43 R0 = R0 & R2;
44 W[P0] = R0.L;
45 SSYNC;
46
47 R2 = [SP++];
48 R1 = [SP++];
49 R0 = [SP++];
50 P0 = [SP++];
51 RTS;
52 .size _led_init, .-_led_init
53
54/* Set one LED on. Leave other LEDs unchanged.
55 It expects the LED number passed through R0. */
56
57ENTRY(_led_on)
58 LINK 0;
59 [--SP] = P0;
60 [--SP] = R1;
61 CALL _led_init;
62 R1 = 1;
63 R0 += 5;
64 R1 <<= R0;
65 P0.H = hi(PORTG_SET);
66 P0.L = lo(PORTG_SET);
67 W[P0] = R1.L;
68 SSYNC;
69 R1 = [SP++];
70 P0 = [SP++];
71 UNLINK;
72 RTS;
73 .size _led_on, .-_led_on
74
75/* Set one LED off. Leave other LEDs unchanged. */
76
77ENTRY(_led_off)
78 LINK 0;
79 [--SP] = P0;
80 [--SP] = R1;
81 CALL _led_init;
82 R1 = 1;
83 R0 += 5;
84 R1 <<= R0;
85 P0.H = hi(PORTG_CLEAR);
86 P0.L = lo(PORTG_CLEAR);
87 W[P0] = R1.L;
88 SSYNC;
89 R1 = [SP++];
90 P0 = [SP++];
91 UNLINK;
92 RTS;
93 .size _led_off, .-_led_off
94
95/* Toggle one LED. Leave other LEDs unchanged. */
96
97ENTRY(_led_toggle)
98 LINK 0;
99 [--SP] = P0;
100 [--SP] = R1;
101 CALL _led_init;
102 R1 = 1;
103 R0 += 5;
104 R1 <<= R0;
105 P0.H = hi(PORTG);
106 P0.L = lo(PORTG);
107 R0 = W[P0](Z);
108 SSYNC;
109 R0 = R0 ^ R1;
110 W[P0] = R0.L;
111 SSYNC;
112 R1 = [SP++];
113 P0 = [SP++];
114 UNLINK;
115 RTS;
116 .size _led_toggle, .-_led_toggle
117
118/* Display the number using LEDs in binary format. */
119
120ENTRY(_led_disp_num)
121 LINK 0;
122 [--SP] = P0;
123 [--SP] = R1;
124 [--SP] = R2;
125 CALL _led_init;
126 R1 = 0x3f(X);
127 R0 = R0 & R1;
128 R2 = 6(X);
129 R0 <<= R2;
130 R1 <<= R2;
131 P0.H = hi(PORTG);
132 P0.L = lo(PORTG);
133 R2 = W[P0](Z);
134 SSYNC;
135 R1 = ~R1;
136 R2 = R2 & R1;
137 R2 = R2 | R0;
138 W[P0] = R2.L;
139 SSYNC;
140 R2 = [SP++];
141 R1 = [SP++];
142 P0 = [SP++];
143 UNLINK;
144 RTS;
145 .size _led_disp_num, .-_led_disp_num
146
147/* Toggle the number using LEDs in binary format. */
148
149ENTRY(_led_toggle_num)
150 LINK 0;
151 [--SP] = P0;
152 [--SP] = R1;
153 [--SP] = R2;
154 CALL _led_init;
155 R1 = 0x3f(X);
156 R0 = R0 & R1;
157 R1 = 6(X);
158 R0 <<= R1;
159 P0.H = hi(PORTG);
160 P0.L = lo(PORTG);
161 R1 = W[P0](Z);
162 SSYNC;
163 R1 = R1 ^ R0;
164 W[P0] = R1.L;
165 SSYNC;
166 R2 = [SP++];
167 R1 = [SP++];
168 P0 = [SP++];
169 UNLINK;
170 RTS;
171 .size _led_toggle_num, .-_led_toggle_num
172
diff --git a/arch/blackfin/mach-bf548/cpu.c b/arch/blackfin/mach-bf548/cpu.c
new file mode 100644
index 0000000000..4298a3ccfb
--- /dev/null
+++ b/arch/blackfin/mach-bf548/cpu.c
@@ -0,0 +1,159 @@
1/*
2 * File: arch/blackfin/mach-bf548/cpu.c
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: clock scaling for the bf54x
8 *
9 * Modified:
10 * Copyright 2004-2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
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, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#include <linux/kernel.h>
31#include <linux/types.h>
32#include <linux/init.h>
33#include <linux/cpufreq.h>
34#include <asm/dpmc.h>
35#include <linux/fs.h>
36#include <asm/bfin-global.h>
37
38/* CONFIG_CLKIN_HZ=25000000 */
39#define VCO5 (CONFIG_CLKIN_HZ*45)
40#define VCO4 (CONFIG_CLKIN_HZ*36)
41#define VCO3 (CONFIG_CLKIN_HZ*27)
42#define VCO2 (CONFIG_CLKIN_HZ*18)
43#define VCO1 (CONFIG_CLKIN_HZ*9)
44#define VCO(x) VCO##x
45
46#define MFREQ(x) {VCO(x),VCO(x)/4},{VCO(x),VCO(x)/2},{VCO(x),VCO(x)}
47/* frequency */
48static struct cpufreq_frequency_table bf548_freq_table[] = {
49 MFREQ(1),
50 MFREQ(3),
51 {VCO4, VCO4 / 2}, {VCO4, VCO4},
52 MFREQ(5),
53 {0, CPUFREQ_TABLE_END},
54};
55
56/*
57 * dpmc_fops->ioctl()
58 * static int dpmc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
59 */
60static int bf548_getfreq(unsigned int cpu)
61{
62 unsigned long cclk_mhz;
63
64 /* The driver only support single cpu */
65 if (cpu == 0)
66 dpmc_fops.ioctl(NULL, NULL, IOCTL_GET_CORECLOCK, &cclk_mhz);
67 else
68 cclk_mhz = -1;
69
70 return cclk_mhz;
71}
72
73static int bf548_target(struct cpufreq_policy *policy,
74 unsigned int target_freq, unsigned int relation)
75{
76 unsigned long cclk_mhz;
77 unsigned long vco_mhz;
78 unsigned long flags;
79 unsigned int index;
80 struct cpufreq_freqs freqs;
81
82 if (cpufreq_frequency_table_target(policy, bf548_freq_table, target_freq, relation, &index))
83 return -EINVAL;
84
85 cclk_mhz = bf548_freq_table[index].frequency;
86 vco_mhz = bf548_freq_table[index].index;
87
88 dpmc_fops.ioctl(NULL, NULL, IOCTL_CHANGE_FREQUENCY, &vco_mhz);
89 freqs.old = bf548_getfreq(0);
90 freqs.new = cclk_mhz;
91 freqs.cpu = 0;
92
93 pr_debug("cclk begin change to cclk %d,vco=%d,index=%d,target=%d,oldfreq=%d\n",
94 cclk_mhz, vco_mhz, index, target_freq, freqs.old);
95
96 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
97 local_irq_save(flags);
98 dpmc_fops.ioctl(NULL, NULL, IOCTL_SET_CCLK, &cclk_mhz);
99 local_irq_restore(flags);
100 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
101
102 vco_mhz = get_vco();
103 cclk_mhz = get_cclk();
104 return 0;
105}
106
107/* make sure that only the "userspace" governor is run -- anything else wouldn't make sense on
108 * this platform, anyway.
109 */
110static int bf548_verify_speed(struct cpufreq_policy *policy)
111{
112 return cpufreq_frequency_table_verify(policy, &bf548_freq_table);
113}
114
115static int __init __bf548_cpu_init(struct cpufreq_policy *policy)
116{
117 if (policy->cpu != 0)
118 return -EINVAL;
119
120 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
121
122 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
123 /*Now ,only support one cpu */
124 policy->cur = bf548_getfreq(0);
125 cpufreq_frequency_table_get_attr(bf548_freq_table, policy->cpu);
126 return cpufreq_frequency_table_cpuinfo(policy, bf548_freq_table);
127}
128
129static struct freq_attr *bf548_freq_attr[] = {
130 &cpufreq_freq_attr_scaling_available_freqs,
131 NULL,
132};
133
134static struct cpufreq_driver bf548_driver = {
135 .verify = bf548_verify_speed,
136 .target = bf548_target,
137 .get = bf548_getfreq,
138 .init = __bf548_cpu_init,
139 .name = "bf548",
140 .owner = THIS_MODULE,
141 .attr = bf548_freq_attr,
142};
143
144static int __init bf548_cpu_init(void)
145{
146 return cpufreq_register_driver(&bf548_driver);
147}
148
149static void __exit bf548_cpu_exit(void)
150{
151 cpufreq_unregister_driver(&bf548_driver);
152}
153
154MODULE_AUTHOR("Mickael Kang");
155MODULE_DESCRIPTION("cpufreq driver for BF548 CPU");
156MODULE_LICENSE("GPL");
157
158module_init(bf548_cpu_init);
159module_exit(bf548_cpu_exit);
diff --git a/arch/blackfin/mach-bf548/dma.c b/arch/blackfin/mach-bf548/dma.c
new file mode 100644
index 0000000000..a8184113be
--- /dev/null
+++ b/arch/blackfin/mach-bf548/dma.c
@@ -0,0 +1,156 @@
1/*
2 * File: arch/blackfin/mach-bf561/dma.c
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: This file contains the simple DMA Implementation for Blackfin
8 *
9 * Modified:
10 * Copyright 2004-2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
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, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#include <asm/blackfin.h>
31#include <asm/dma.h>
32
33 struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
34 (struct dma_register *) DMA0_NEXT_DESC_PTR,
35 (struct dma_register *) DMA1_NEXT_DESC_PTR,
36 (struct dma_register *) DMA2_NEXT_DESC_PTR,
37 (struct dma_register *) DMA3_NEXT_DESC_PTR,
38 (struct dma_register *) DMA4_NEXT_DESC_PTR,
39 (struct dma_register *) DMA5_NEXT_DESC_PTR,
40 (struct dma_register *) DMA6_NEXT_DESC_PTR,
41 (struct dma_register *) DMA7_NEXT_DESC_PTR,
42 (struct dma_register *) DMA8_NEXT_DESC_PTR,
43 (struct dma_register *) DMA9_NEXT_DESC_PTR,
44 (struct dma_register *) DMA10_NEXT_DESC_PTR,
45 (struct dma_register *) DMA11_NEXT_DESC_PTR,
46 (struct dma_register *) DMA12_NEXT_DESC_PTR,
47 (struct dma_register *) DMA13_NEXT_DESC_PTR,
48 (struct dma_register *) DMA14_NEXT_DESC_PTR,
49 (struct dma_register *) DMA15_NEXT_DESC_PTR,
50 (struct dma_register *) DMA16_NEXT_DESC_PTR,
51 (struct dma_register *) DMA17_NEXT_DESC_PTR,
52 (struct dma_register *) DMA18_NEXT_DESC_PTR,
53 (struct dma_register *) DMA19_NEXT_DESC_PTR,
54 (struct dma_register *) DMA20_NEXT_DESC_PTR,
55 (struct dma_register *) DMA21_NEXT_DESC_PTR,
56 (struct dma_register *) DMA22_NEXT_DESC_PTR,
57 (struct dma_register *) DMA23_NEXT_DESC_PTR,
58 (struct dma_register *) MDMA_D0_NEXT_DESC_PTR,
59 (struct dma_register *) MDMA_S0_NEXT_DESC_PTR,
60 (struct dma_register *) MDMA_D1_NEXT_DESC_PTR,
61 (struct dma_register *) MDMA_S1_NEXT_DESC_PTR,
62 (struct dma_register *) MDMA_D2_NEXT_DESC_PTR,
63 (struct dma_register *) MDMA_S2_NEXT_DESC_PTR,
64 (struct dma_register *) MDMA_D3_NEXT_DESC_PTR,
65 (struct dma_register *) MDMA_S3_NEXT_DESC_PTR,
66};
67
68int channel2irq(unsigned int channel)
69{
70 int ret_irq = -1;
71
72 switch (channel) {
73 case CH_SPORT0_RX:
74 ret_irq = IRQ_SPORT0_RX;
75 break;
76 case CH_SPORT0_TX:
77 ret_irq = IRQ_SPORT0_TX;
78 break;
79 case CH_SPORT1_RX:
80 ret_irq = IRQ_SPORT1_RX;
81 break;
82 case CH_SPORT1_TX:
83 ret_irq = IRQ_SPORT1_TX;
84 case CH_SPI0:
85 ret_irq = IRQ_SPI0;
86 break;
87 case CH_SPI1:
88 ret_irq = IRQ_SPI1;
89 break;
90 case CH_UART0_RX:
91 ret_irq = IRQ_UART_RX;
92 break;
93 case CH_UART0_TX:
94 ret_irq = IRQ_UART_TX;
95 break;
96 case CH_UART1_RX:
97 ret_irq = IRQ_UART_RX;
98 break;
99 case CH_UART1_TX:
100 ret_irq = IRQ_UART_TX;
101 break;
102 case CH_EPPI0:
103 ret_irq = IRQ_EPPI0;
104 break;
105 case CH_EPPI1:
106 ret_irq = IRQ_EPPI1;
107 break;
108 case CH_EPPI2:
109 ret_irq = IRQ_EPPI2;
110 break;
111 case CH_PIXC_IMAGE:
112 ret_irq = IRQ_PIXC_IN0;
113 break;
114 case CH_PIXC_OVERLAY:
115 ret_irq = IRQ_PIXC_IN1;
116 break;
117 case CH_PIXC_OUTPUT:
118 ret_irq = IRQ_PIXC_OUT;
119 break;
120 case CH_SPORT2_RX:
121 ret_irq = IRQ_SPORT2_RX;
122 break;
123 case CH_SPORT2_TX:
124 ret_irq = IRQ_SPORT2_TX;
125 break;
126 case CH_SPORT3_RX:
127 ret_irq = IRQ_SPORT3_RX;
128 break;
129 case CH_SPORT3_TX:
130 ret_irq = IRQ_SPORT3_TX;
131 break;
132 case CH_SDH:
133 ret_irq = IRQ_SDH;
134 break;
135 case CH_SPI2:
136 ret_irq = IRQ_SPI2;
137 break;
138 case CH_MEM_STREAM0_SRC:
139 case CH_MEM_STREAM0_DEST:
140 ret_irq = IRQ_MDMAS0;
141 break;
142 case CH_MEM_STREAM1_SRC:
143 case CH_MEM_STREAM1_DEST:
144 ret_irq = IRQ_MDMAS1;
145 break;
146 case CH_MEM_STREAM2_SRC:
147 case CH_MEM_STREAM2_DEST:
148 ret_irq = IRQ_MDMAS2;
149 break;
150 case CH_MEM_STREAM3_SRC:
151 case CH_MEM_STREAM3_DEST:
152 ret_irq = IRQ_MDMAS3;
153 break;
154 }
155 return ret_irq;
156}
diff --git a/arch/blackfin/mach-bf548/gpio.c b/arch/blackfin/mach-bf548/gpio.c
new file mode 100644
index 0000000000..0da5f0003b
--- /dev/null
+++ b/arch/blackfin/mach-bf548/gpio.c
@@ -0,0 +1,323 @@
1/*
2 * File: arch/blackfin/mach-bf548/gpio.c
3 * Based on:
4 * Author: Michael Hennerich (hennerich@blackfin.uclinux.org)
5 *
6 * Created:
7 * Description: GPIO Abstraction Layer
8 *
9 * Modified:
10 * Copyright 2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
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, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#include <linux/module.h>
31#include <linux/err.h>
32#include <asm/blackfin.h>
33#include <asm/gpio.h>
34#include <asm/portmux.h>
35#include <linux/irq.h>
36
37static struct gpio_port_t *gpio_array[gpio_bank(MAX_BLACKFIN_GPIOS)] = {
38 (struct gpio_port_t *)PORTA_FER,
39 (struct gpio_port_t *)PORTB_FER,
40 (struct gpio_port_t *)PORTC_FER,
41 (struct gpio_port_t *)PORTD_FER,
42 (struct gpio_port_t *)PORTE_FER,
43 (struct gpio_port_t *)PORTF_FER,
44 (struct gpio_port_t *)PORTG_FER,
45 (struct gpio_port_t *)PORTH_FER,
46 (struct gpio_port_t *)PORTI_FER,
47 (struct gpio_port_t *)PORTJ_FER,
48};
49
50static unsigned short reserved_gpio_map[gpio_bank(MAX_BLACKFIN_GPIOS)];
51static unsigned short reserved_peri_map[gpio_bank(MAX_BLACKFIN_GPIOS)];
52
53inline int check_gpio(unsigned short gpio)
54{
55 if (gpio == GPIO_PB15 || gpio == GPIO_PC14 || gpio == GPIO_PC15
56 || gpio == GPIO_PH14 || gpio == GPIO_PH15
57 || gpio == GPIO_PJ14 || gpio == GPIO_PJ15
58 || gpio > MAX_BLACKFIN_GPIOS)
59 return -EINVAL;
60 return 0;
61}
62
63inline void portmux_setup(unsigned short portno, unsigned short function)
64{
65 u32 pmux;
66
67 pmux = gpio_array[gpio_bank(portno)]->port_mux;
68
69 pmux &= ~(0x3 << (2 * gpio_sub_n(portno)));
70 pmux |= (function & 0x3) << (2 * gpio_sub_n(portno));
71
72 gpio_array[gpio_bank(portno)]->port_mux = pmux;
73
74}
75
76inline u16 get_portmux(unsigned short portno)
77{
78 u32 pmux;
79
80 pmux = gpio_array[gpio_bank(portno)]->port_mux;
81
82 return (pmux >> (2 * gpio_sub_n(portno)) & 0x3);
83
84}
85
86static void port_setup(unsigned short gpio, unsigned short usage)
87{
88 if (usage == GPIO_USAGE) {
89 if (gpio_array[gpio_bank(gpio)]->port_fer & gpio_bit(gpio))
90 printk(KERN_WARNING
91 "bfin-gpio: Possible Conflict with Peripheral "
92 "usage and GPIO %d detected!\n", gpio);
93 gpio_array[gpio_bank(gpio)]->port_fer &= ~gpio_bit(gpio);
94 } else
95 gpio_array[gpio_bank(gpio)]->port_fer |= gpio_bit(gpio);
96 SSYNC();
97}
98
99static int __init bfin_gpio_init(void)
100{
101 printk(KERN_INFO "Blackfin GPIO Controller\n");
102
103 return 0;
104}
105
106arch_initcall(bfin_gpio_init);
107
108int peripheral_request(unsigned short per, const char *label)
109{
110 unsigned long flags;
111 unsigned short ident = P_IDENT(per);
112
113 if (!(per & P_DEFINED))
114 return -ENODEV;
115
116 if (check_gpio(ident) < 0)
117 return -EINVAL;
118
119 local_irq_save(flags);
120
121 if (unlikely(reserved_gpio_map[gpio_bank(ident)] & gpio_bit(ident))) {
122 printk(KERN_ERR
123 "%s: Peripheral %d is already reserved as GPIO!\n",
124 __FUNCTION__, per);
125 dump_stack();
126 local_irq_restore(flags);
127 return -EBUSY;
128 }
129
130 if (unlikely(reserved_peri_map[gpio_bank(ident)] & gpio_bit(ident))) {
131
132 u16 funct = get_portmux(ident);
133
134 if (!((per & P_MAYSHARE) && (funct == P_FUNCT2MUX(per)))) {
135 printk(KERN_ERR
136 "%s: Peripheral %d is already reserved!\n",
137 __FUNCTION__, per);
138 dump_stack();
139 local_irq_restore(flags);
140 return -EBUSY;
141 }
142 }
143
144 reserved_peri_map[gpio_bank(ident)] |= gpio_bit(ident);
145
146 portmux_setup(ident, P_FUNCT2MUX(per));
147 port_setup(ident, PERIPHERAL_USAGE);
148
149 local_irq_restore(flags);
150
151 return 0;
152}
153EXPORT_SYMBOL(peripheral_request);
154
155int peripheral_request_list(unsigned short per[], const char *label)
156{
157
158 u16 cnt;
159 int ret;
160
161 for (cnt = 0; per[cnt] != 0; cnt++) {
162 ret = peripheral_request(per[cnt], label);
163 if (ret < 0)
164 return ret;
165 }
166
167 return 0;
168}
169EXPORT_SYMBOL(peripheral_request_list);
170
171void peripheral_free(unsigned short per)
172{
173 unsigned long flags;
174 unsigned short ident = P_IDENT(per);
175
176 if (!(per & P_DEFINED))
177 return;
178
179 if (check_gpio(ident) < 0)
180 return;
181
182 local_irq_save(flags);
183
184 if (unlikely(!(reserved_peri_map[gpio_bank(ident)] & gpio_bit(ident)))) {
185 printk(KERN_ERR "bfin-gpio: Peripheral %d wasn't reserved!\n", per);
186 dump_stack();
187 local_irq_restore(flags);
188 return;
189 }
190
191 if (!(per & P_MAYSHARE)) {
192 port_setup(ident, GPIO_USAGE);
193 }
194
195 reserved_peri_map[gpio_bank(ident)] &= ~gpio_bit(ident);
196
197 local_irq_restore(flags);
198}
199EXPORT_SYMBOL(peripheral_free);
200
201void peripheral_free_list(unsigned short per[])
202{
203 u16 cnt;
204
205 for (cnt = 0; per[cnt] != 0; cnt++) {
206 peripheral_free(per[cnt]);
207 }
208
209}
210EXPORT_SYMBOL(peripheral_free_list);
211
212/***********************************************************
213*
214* FUNCTIONS: Blackfin GPIO Driver
215*
216* INPUTS/OUTPUTS:
217* gpio - GPIO Number between 0 and MAX_BLACKFIN_GPIOS
218*
219*
220* DESCRIPTION: Blackfin GPIO Driver API
221*
222* CAUTION:
223*************************************************************
224* MODIFICATION HISTORY :
225**************************************************************/
226
227int gpio_request(unsigned short gpio, const char *label)
228{
229 unsigned long flags;
230
231 if (check_gpio(gpio) < 0)
232 return -EINVAL;
233
234 local_irq_save(flags);
235
236 if (unlikely(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
237 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved!\n", gpio);
238 dump_stack();
239 local_irq_restore(flags);
240 return -EBUSY;
241 }
242
243 if (unlikely(reserved_peri_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
244 printk(KERN_ERR
245 "bfin-gpio: GPIO %d is already reserved as Peripheral!\n", gpio);
246 dump_stack();
247 local_irq_restore(flags);
248 return -EBUSY;
249 }
250
251 reserved_gpio_map[gpio_bank(gpio)] |= gpio_bit(gpio);
252
253 local_irq_restore(flags);
254
255 port_setup(gpio, GPIO_USAGE);
256
257 return 0;
258}
259EXPORT_SYMBOL(gpio_request);
260
261void gpio_free(unsigned short gpio)
262{
263 unsigned long flags;
264
265 if (check_gpio(gpio) < 0)
266 return;
267
268 local_irq_save(flags);
269
270 if (unlikely(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)))) {
271 printk(KERN_ERR "bfin-gpio: GPIO %d wasn't reserved!\n", gpio);
272 dump_stack();
273 local_irq_restore(flags);
274 return;
275 }
276
277 reserved_gpio_map[gpio_bank(gpio)] &= ~gpio_bit(gpio);
278
279 local_irq_restore(flags);
280}
281EXPORT_SYMBOL(gpio_free);
282
283void gpio_direction_input(unsigned short gpio)
284{
285 unsigned long flags;
286
287 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
288
289 local_irq_save(flags);
290 gpio_array[gpio_bank(gpio)]->port_dir_clear = gpio_bit(gpio);
291 gpio_array[gpio_bank(gpio)]->port_inen |= gpio_bit(gpio);
292 local_irq_restore(flags);
293}
294EXPORT_SYMBOL(gpio_direction_input);
295
296void gpio_direction_output(unsigned short gpio)
297{
298 unsigned long flags;
299
300 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
301
302 local_irq_save(flags);
303 gpio_array[gpio_bank(gpio)]->port_inen &= ~gpio_bit(gpio);
304 gpio_array[gpio_bank(gpio)]->port_dir_set = gpio_bit(gpio);
305 local_irq_restore(flags);
306}
307EXPORT_SYMBOL(gpio_direction_output);
308
309void gpio_set_value(unsigned short gpio, unsigned short arg)
310{
311 if (arg)
312 gpio_array[gpio_bank(gpio)]->port_set = gpio_bit(gpio);
313 else
314 gpio_array[gpio_bank(gpio)]->port_clear = gpio_bit(gpio);
315
316}
317EXPORT_SYMBOL(gpio_set_value);
318
319unsigned short gpio_get_value(unsigned short gpio)
320{
321 return (1 & (gpio_array[gpio_bank(gpio)]->port_data >> gpio_sub_n(gpio)));
322}
323EXPORT_SYMBOL(gpio_get_value);
diff --git a/arch/blackfin/mach-bf548/head.S b/arch/blackfin/mach-bf548/head.S
new file mode 100644
index 0000000000..06751ae8b8
--- /dev/null
+++ b/arch/blackfin/mach-bf548/head.S
@@ -0,0 +1,512 @@
1/*
2 * File: arch/blackfin/mach-bf548/head.S
3 * Based on: arch/blackfin/mach-bf537/head.S
4 * Author: Jeff Dionne <jeff@uclinux.org> COPYRIGHT 1998 D. Jeff Dionne
5 *
6 * Created: 1998
7 * Description: Startup code for Blackfin BF548
8 *
9 * Modified:
10 * Copyright 2004-2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
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, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#include <linux/linkage.h>
31#include <asm/blackfin.h>
32#include <asm/trace.h>
33#if CONFIG_BFIN_KERNEL_CLOCK
34#include <asm/mach/mem_init.h>
35#endif
36
37.global __rambase
38.global __ramstart
39.global __ramend
40.extern ___bss_stop
41.extern ___bss_start
42.extern _bf53x_relocate_l1_mem
43
44#define INITIAL_STACK 0xFFB01000
45
46.text
47
48ENTRY(__start)
49ENTRY(__stext)
50 /* R0: argument of command line string, passed from uboot, save it */
51 R7 = R0;
52 /* Set the SYSCFG register */
53 R0 = 0x36;
54 SYSCFG = R0; /*Enable Cycle Counter and Nesting Of Interrupts(3rd Bit)*/
55 R0 = 0;
56
57 /* Clear Out All the data and pointer Registers*/
58 R1 = R0;
59 R2 = R0;
60 R3 = R0;
61 R4 = R0;
62 R5 = R0;
63 R6 = R0;
64
65 P0 = R0;
66 P1 = R0;
67 P2 = R0;
68 P3 = R0;
69 P4 = R0;
70 P5 = R0;
71
72 LC0 = r0;
73 LC1 = r0;
74 L0 = r0;
75 L1 = r0;
76 L2 = r0;
77 L3 = r0;
78
79 /* Clear Out All the DAG Registers*/
80 B0 = r0;
81 B1 = r0;
82 B2 = r0;
83 B3 = r0;
84
85 I0 = r0;
86 I1 = r0;
87 I2 = r0;
88 I3 = r0;
89
90 M0 = r0;
91 M1 = r0;
92 M2 = r0;
93 M3 = r0;
94
95 trace_buffer_start(p0,r0);
96 P0 = R1;
97 R0 = R1;
98
99 /* Turn off the icache */
100 p0.l = (IMEM_CONTROL & 0xFFFF);
101 p0.h = (IMEM_CONTROL >> 16);
102 R1 = [p0];
103 R0 = ~ENICPLB;
104 R0 = R0 & R1;
105 [p0] = R0;
106 SSYNC;
107
108 /* Turn off the dcache */
109 p0.l = (DMEM_CONTROL & 0xFFFF);
110 p0.h = (DMEM_CONTROL >> 16);
111 R1 = [p0];
112 R0 = ~ENDCPLB;
113 R0 = R0 & R1;
114 [p0] = R0;
115 SSYNC;
116
117 /* Initialize stack pointer */
118 SP.L = LO(INITIAL_STACK);
119 SP.H = HI(INITIAL_STACK);
120 FP = SP;
121 USP = SP;
122
123 /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */
124 call _bf53x_relocate_l1_mem;
125#if CONFIG_BFIN_KERNEL_CLOCK
126 call _start_dma_code;
127#endif
128 /* Code for initializing Async memory banks */
129
130 p2.h = hi(EBIU_AMBCTL1);
131 p2.l = lo(EBIU_AMBCTL1);
132 r0.h = hi(AMBCTL1VAL);
133 r0.l = lo(AMBCTL1VAL);
134 [p2] = r0;
135 ssync;
136
137 p2.h = hi(EBIU_AMBCTL0);
138 p2.l = lo(EBIU_AMBCTL0);
139 r0.h = hi(AMBCTL0VAL);
140 r0.l = lo(AMBCTL0VAL);
141 [p2] = r0;
142 ssync;
143
144 p2.h = hi(EBIU_AMGCTL);
145 p2.l = lo(EBIU_AMGCTL);
146 r0 = AMGCTLVAL;
147 w[p2] = r0;
148 ssync;
149
150 /* This section keeps the processor in supervisor mode
151 * during kernel boot. Switches to user mode at end of boot.
152 * See page 3-9 of Hardware Reference manual for documentation.
153 */
154
155 /* EVT15 = _real_start */
156
157 p0.l = lo(EVT15);
158 p0.h = hi(EVT15);
159 p1.l = _real_start;
160 p1.h = _real_start;
161 [p0] = p1;
162 csync;
163
164 p0.l = lo(IMASK);
165 p0.h = hi(IMASK);
166 p1.l = IMASK_IVG15;
167 p1.h = 0x0;
168 [p0] = p1;
169 csync;
170
171 raise 15;
172 p0.l = .LWAIT_HERE;
173 p0.h = .LWAIT_HERE;
174 reti = p0;
175#if defined (ANOMALY_05000281)
176 nop;
177 nop;
178 nop;
179#endif
180 rti;
181
182.LWAIT_HERE:
183 jump .LWAIT_HERE;
184
185ENTRY(_real_start)
186 [ -- sp ] = reti;
187 p0.l = lo(WDOG_CTL);
188 p0.h = hi(WDOG_CTL);
189 r0 = 0xAD6(z);
190 w[p0] = r0; /* watchdog off for now */
191 ssync;
192
193 /* Code update for BSS size == 0
194 * Zero out the bss region.
195 */
196
197 p1.l = ___bss_start;
198 p1.h = ___bss_start;
199 p2.l = ___bss_stop;
200 p2.h = ___bss_stop;
201 r0 = 0;
202 p2 -= p1;
203 lsetup (.L_clear_bss, .L_clear_bss ) lc0 = p2;
204.L_clear_bss:
205 B[p1++] = r0;
206
207 /* In case there is a NULL pointer reference
208 * Zero out region before stext
209 */
210
211 p1.l = 0x0;
212 p1.h = 0x0;
213 r0.l = __stext;
214 r0.h = __stext;
215 r0 = r0 >> 1;
216 p2 = r0;
217 r0 = 0;
218 lsetup (.L_clear_zero, .L_clear_zero ) lc0 = p2;
219.L_clear_zero:
220 W[p1++] = r0;
221
222 /* pass the uboot arguments to the global value command line */
223 R0 = R7;
224 call _cmdline_init;
225
226 p1.l = __rambase;
227 p1.h = __rambase;
228 r0.l = __sdata;
229 r0.h = __sdata;
230 [p1] = r0;
231
232 p1.l = __ramstart;
233 p1.h = __ramstart;
234 p3.l = ___bss_stop;
235 p3.h = ___bss_stop;
236
237 r1 = p3;
238 [p1] = r1;
239
240
241 /*
242 * load the current thread pointer and stack
243 */
244 r1.l = _init_thread_union;
245 r1.h = _init_thread_union;
246
247 r2.l = 0x2000;
248 r2.h = 0x0000;
249 r1 = r1 + r2;
250 sp = r1;
251 usp = sp;
252 fp = sp;
253 call _start_kernel;
254.L_exit:
255 jump.s .L_exit;
256
257.section .l1.text
258#if CONFIG_BFIN_KERNEL_CLOCK
259ENTRY(_start_dma_code)
260
261 /* Enable PHY CLK buffer output */
262 p0.h = hi(VR_CTL);
263 p0.l = lo(VR_CTL);
264 r0.l = w[p0];
265 bitset(r0, 14);
266 w[p0] = r0.l;
267 ssync;
268
269 p0.h = hi(SIC_IWR);
270 p0.l = lo(SIC_IWR);
271 r0.l = 0x1;
272 r0.h = 0x0;
273 [p0] = r0;
274 SSYNC;
275
276 /*
277 * Set PLL_CTL
278 * - [14:09] = MSEL[5:0] : CLKIN / VCO multiplication factors
279 * - [8] = BYPASS : BYPASS the PLL, run CLKIN into CCLK/SCLK
280 * - [7] = output delay (add 200ps of delay to mem signals)
281 * - [6] = input delay (add 200ps of input delay to mem signals)
282 * - [5] = PDWN : 1=All Clocks off
283 * - [3] = STOPCK : 1=Core Clock off
284 * - [1] = PLL_OFF : 1=Disable Power to PLL
285 * - [0] = DF : 1=Pass CLKIN/2 to PLL / 0=Pass CLKIN to PLL
286 * all other bits set to zero
287 */
288
289 p0.h = hi(PLL_LOCKCNT);
290 p0.l = lo(PLL_LOCKCNT);
291 r0 = 0x300(Z);
292 w[p0] = r0.l;
293 ssync;
294
295 P2.H = hi(EBIU_SDGCTL);
296 P2.L = lo(EBIU_SDGCTL);
297 R0 = [P2];
298 BITSET (R0, 24);
299 [P2] = R0;
300 SSYNC;
301
302 r0 = CONFIG_VCO_MULT & 63; /* Load the VCO multiplier */
303 r0 = r0 << 9; /* Shift it over, */
304 r1 = CLKIN_HALF; /* Do we need to divide CLKIN by 2?*/
305 r0 = r1 | r0;
306 r1 = PLL_BYPASS; /* Bypass the PLL? */
307 r1 = r1 << 8; /* Shift it over */
308 r0 = r1 | r0; /* add them all together */
309
310 p0.h = hi(PLL_CTL);
311 p0.l = lo(PLL_CTL); /* Load the address */
312 cli r2; /* Disable interrupts */
313 ssync;
314 w[p0] = r0.l; /* Set the value */
315 idle; /* Wait for the PLL to stablize */
316 sti r2; /* Enable interrupts */
317
318.Lcheck_again:
319 p0.h = hi(PLL_STAT);
320 p0.l = lo(PLL_STAT);
321 R0 = W[P0](Z);
322 CC = BITTST(R0,5);
323 if ! CC jump .Lcheck_again;
324
325 /* Configure SCLK & CCLK Dividers */
326 r0 = (CONFIG_CCLK_ACT_DIV | CONFIG_SCLK_DIV);
327 p0.h = hi(PLL_DIV);
328 p0.l = lo(PLL_DIV);
329 w[p0] = r0.l;
330 ssync;
331
332 p0.l = lo(EBIU_SDRRC);
333 p0.h = hi(EBIU_SDRRC);
334 r0 = mem_SDRRC;
335 w[p0] = r0.l;
336 ssync;
337
338 p0.l = (EBIU_SDBCTL & 0xFFFF);
339 p0.h = (EBIU_SDBCTL >> 16); /* SDRAM Memory Bank Control Register */
340 r0 = mem_SDBCTL;
341 w[p0] = r0.l;
342 ssync;
343
344 P2.H = hi(EBIU_SDGCTL);
345 P2.L = lo(EBIU_SDGCTL);
346 R0 = [P2];
347 BITCLR (R0, 24);
348 p0.h = hi(EBIU_SDSTAT);
349 p0.l = lo(EBIU_SDSTAT);
350 r2.l = w[p0];
351 cc = bittst(r2,3);
352 if !cc jump .Lskip;
353 NOP;
354 BITSET (R0, 23);
355.Lskip:
356 [P2] = R0;
357 SSYNC;
358
359 R0.L = lo(mem_SDGCTL);
360 R0.H = hi(mem_SDGCTL);
361 R1 = [p2];
362 R1 = R1 | R0;
363 [P2] = R1;
364 SSYNC;
365
366 p0.h = hi(SIC_IWR);
367 p0.l = lo(SIC_IWR);
368 r0.l = lo(IWR_ENABLE_ALL);
369 r0.h = hi(IWR_ENABLE_ALL);
370 [p0] = r0;
371 SSYNC;
372
373 RTS;
374#endif /* CONFIG_BFIN_KERNEL_CLOCK */
375
376ENTRY(_bfin_reset)
377 /* No more interrupts to be handled*/
378 CLI R6;
379 SSYNC;
380
381#if defined(CONFIG_MTD_M25P80)
382/*
383 * The following code fix the SPI flash reboot issue,
384 * /CS signal of the chip which is using PF10 return to GPIO mode
385 */
386 p0.h = hi(PORTF_FER);
387 p0.l = lo(PORTF_FER);
388 r0.l = 0x0000;
389 w[p0] = r0.l;
390 SSYNC;
391
392/* /CS return to high */
393 p0.h = hi(PORTFIO);
394 p0.l = lo(PORTFIO);
395 r0.l = 0xFFFF;
396 w[p0] = r0.l;
397 SSYNC;
398
399/* Delay some time, This is necessary */
400 r1.h = 0;
401 r1.l = 0x400;
402 p1 = r1;
403 lsetup (_delay_lab1,_delay_lab1_end ) lc1 = p1;
404_delay_lab1:
405 r0.h = 0;
406 r0.l = 0x8000;
407 p0 = r0;
408 lsetup (_delay_lab0,_delay_lab0_end ) lc0 = p0;
409_delay_lab0:
410 nop;
411_delay_lab0_end:
412 nop;
413_delay_lab1_end:
414 nop;
415#endif
416
417 /* Clear the bits 13-15 in SWRST if they werent cleared */
418 p0.h = hi(SWRST);
419 p0.l = lo(SWRST);
420 csync;
421 r0.l = w[p0];
422
423 /* Clear the IMASK register */
424 p0.h = hi(IMASK);
425 p0.l = lo(IMASK);
426 r0 = 0x0;
427 [p0] = r0;
428
429 /* Clear the ILAT register */
430 p0.h = hi(ILAT);
431 p0.l = lo(ILAT);
432 r0 = [p0];
433 [p0] = r0;
434 SSYNC;
435
436 /* Disable the WDOG TIMER */
437 p0.h = hi(WDOG_CTL);
438 p0.l = lo(WDOG_CTL);
439 r0.l = 0xAD6;
440 w[p0] = r0.l;
441 SSYNC;
442
443 /* Clear the sticky bit incase it is already set */
444 p0.h = hi(WDOG_CTL);
445 p0.l = lo(WDOG_CTL);
446 r0.l = 0x8AD6;
447 w[p0] = r0.l;
448 SSYNC;
449
450 /* Program the count value */
451 R0.l = 0x100;
452 R0.h = 0x0;
453 P0.h = hi(WDOG_CNT);
454 P0.l = lo(WDOG_CNT);
455 [P0] = R0;
456 SSYNC;
457
458 /* Program WDOG_STAT if necessary */
459 P0.h = hi(WDOG_CTL);
460 P0.l = lo(WDOG_CTL);
461 R0 = W[P0](Z);
462 CC = BITTST(R0,1);
463 if !CC JUMP .LWRITESTAT;
464 CC = BITTST(R0,2);
465 if !CC JUMP .LWRITESTAT;
466 JUMP .LSKIP_WRITE;
467
468.LWRITESTAT:
469 /* When watch dog timer is enabled,
470 * a write to STAT will load the contents of CNT to STAT
471 */
472 R0 = 0x0000(z);
473 P0.h = hi(WDOG_STAT);
474 P0.l = lo(WDOG_STAT)
475 [P0] = R0;
476 SSYNC;
477
478.LSKIP_WRITE:
479 /* Enable the reset event */
480 P0.h = hi(WDOG_CTL);
481 P0.l = lo(WDOG_CTL);
482 R0 = W[P0](Z);
483 BITCLR(R0,1);
484 BITCLR(R0,2);
485 W[P0] = R0.L;
486 SSYNC;
487 NOP;
488
489 /* Enable the wdog counter */
490 R0 = W[P0](Z);
491 BITCLR(R0,4);
492 W[P0] = R0.L;
493 SSYNC;
494
495 IDLE;
496
497 RTS;
498
499.data
500
501/*
502 * Set up the usable of RAM stuff. Size of RAM is determined then
503 * an initial stack set up at the end.
504 */
505
506.align 4
507__rambase:
508.long 0
509__ramstart:
510.long 0
511__ramend:
512.long 0
diff --git a/arch/blackfin/mach-bf548/ints-priority.c b/arch/blackfin/mach-bf548/ints-priority.c
new file mode 100644
index 0000000000..cb0ebac53c
--- /dev/null
+++ b/arch/blackfin/mach-bf548/ints-priority.c
@@ -0,0 +1,137 @@
1/*
2 * File: arch/blackfin/mach-bf537/ints-priority.c
3 * Based on: arch/blackfin/mach-bf533/ints-priority.c
4 * Author: Michael Hennerich
5 *
6 * Created:
7 * Description: Set up the interupt priorities
8 *
9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
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, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#include <linux/module.h>
31#include <linux/irq.h>
32#include <asm/blackfin.h>
33
34void program_IAR(void)
35{
36 /* Program the IAR0 Register with the configured priority */
37 bfin_write_SIC_IAR0(((CONFIG_IRQ_PLL_WAKEUP - 7) << IRQ_PLL_WAKEUP_POS) |
38 ((CONFIG_IRQ_DMAC0_ERR - 7) << IRQ_DMAC0_ERR_POS) |
39 ((CONFIG_IRQ_EPPI0_ERR - 7) << IRQ_EPPI0_ERR_POS) |
40 ((CONFIG_IRQ_SPORT0_ERR - 7) << IRQ_SPORT0_ERR_POS) |
41 ((CONFIG_IRQ_SPORT1_ERR - 7) << IRQ_SPORT1_ERR_POS) |
42 ((CONFIG_IRQ_SPI0_ERR - 7) << IRQ_SPI0_ERR_POS) |
43 ((CONFIG_IRQ_UART0_ERR - 7) << IRQ_UART0_ERR_POS) |
44 ((CONFIG_IRQ_RTC - 7) << IRQ_RTC_POS));
45
46 bfin_write_SIC_IAR1(((CONFIG_IRQ_EPPI0 - 7) << IRQ_EPPI0_POS) |
47 ((CONFIG_IRQ_SPORT0_RX - 7) << IRQ_SPORT0_RX_POS) |
48 ((CONFIG_IRQ_SPORT0_TX - 7) << IRQ_SPORT0_TX_POS) |
49 ((CONFIG_IRQ_SPORT1_RX - 7) << IRQ_SPORT1_RX_POS) |
50 ((CONFIG_IRQ_SPORT1_TX - 7) << IRQ_SPORT1_TX_POS) |
51 ((CONFIG_IRQ_SPI0 - 7) << IRQ_SPI0_POS) |
52 ((CONFIG_IRQ_UART0_RX - 7) << IRQ_UART0_RX_POS) |
53 ((CONFIG_IRQ_UART0_TX - 7) << IRQ_UART0_TX_POS));
54
55 bfin_write_SIC_IAR2(((CONFIG_IRQ_TIMER8 - 7) << IRQ_TIMER8_POS) |
56 ((CONFIG_IRQ_TIMER9 - 7) << IRQ_TIMER9_POS) |
57 ((CONFIG_IRQ_PINT0 - 7) << IRQ_PINT0_POS) |
58 ((CONFIG_IRQ_PINT1 - 7) << IRQ_PINT1_POS) |
59 ((CONFIG_IRQ_MDMAS0 - 7) << IRQ_MDMAS0_POS) |
60 ((CONFIG_IRQ_MDMAS1 - 7) << IRQ_MDMAS1_POS) |
61 ((CONFIG_IRQ_WATCHDOG - 7) << IRQ_WATCHDOG_POS));
62
63 bfin_write_SIC_IAR3(((CONFIG_IRQ_DMAC1_ERR - 7) << IRQ_DMAC1_ERR_POS) |
64 ((CONFIG_IRQ_SPORT2_ERR - 7) << IRQ_SPORT2_ERR_POS) |
65 ((CONFIG_IRQ_SPORT3_ERR - 7) << IRQ_SPORT3_ERR_POS) |
66 ((CONFIG_IRQ_MXVR_DATA - 7) << IRQ_MXVR_DATA_POS) |
67 ((CONFIG_IRQ_SPI1_ERR - 7) << IRQ_SPI1_ERR_POS) |
68 ((CONFIG_IRQ_SPI2_ERR - 7) << IRQ_SPI2_ERR_POS) |
69 ((CONFIG_IRQ_UART1_ERR - 7) << IRQ_UART1_ERR_POS) |
70 ((CONFIG_IRQ_UART2_ERR - 7) << IRQ_UART2_ERR_POS));
71
72 bfin_write_SIC_IAR4(((CONFIG_IRQ_CAN0_ERR - 7) << IRQ_CAN0_ERR_POS) |
73 ((CONFIG_IRQ_SPORT2_RX - 7) << IRQ_SPORT2_RX_POS) |
74 ((CONFIG_IRQ_SPORT2_TX - 7) << IRQ_SPORT2_TX_POS) |
75 ((CONFIG_IRQ_SPORT3_RX - 7) << IRQ_SPORT3_RX_POS) |
76 ((CONFIG_IRQ_SPORT3_TX - 7) << IRQ_SPORT3_TX_POS) |
77 ((CONFIG_IRQ_EPPI1 - 7) << IRQ_EPPI1_POS) |
78 ((CONFIG_IRQ_EPPI2 - 7) << IRQ_EPPI2_POS) |
79 ((CONFIG_IRQ_SPI1 - 7) << IRQ_SPI1_POS));
80
81 bfin_write_SIC_IAR5(((CONFIG_IRQ_SPI2 - 7) << IRQ_SPI2_POS) |
82 ((CONFIG_IRQ_UART1_RX - 7) << IRQ_UART1_RX_POS) |
83 ((CONFIG_IRQ_UART1_TX - 7) << IRQ_UART1_TX_POS) |
84 ((CONFIG_IRQ_ATAPI_RX - 7) << IRQ_ATAPI_RX_POS) |
85 ((CONFIG_IRQ_ATAPI_TX - 7) << IRQ_ATAPI_TX_POS) |
86 ((CONFIG_IRQ_TWI0 - 7) << IRQ_TWI0_POS) |
87 ((CONFIG_IRQ_TWI1 - 7) << IRQ_TWI1_POS) |
88 ((CONFIG_IRQ_CAN0_RX - 7) << IRQ_CAN0_RX_POS));
89
90 bfin_write_SIC_IAR6(((CONFIG_IRQ_CAN0_TX - 7) << IRQ_CAN0_TX_POS) |
91 ((CONFIG_IRQ_MDMAS2 - 7) << IRQ_MDMAS2_POS) |
92 ((CONFIG_IRQ_MDMAS3 - 7) << IRQ_MDMAS3_POS) |
93 ((CONFIG_IRQ_MXVR_ERR - 7) << IRQ_MXVR_ERR_POS) |
94 ((CONFIG_IRQ_MXVR_MSG - 7) << IRQ_MXVR_MSG_POS) |
95 ((CONFIG_IRQ_MXVR_PKT - 7) << IRQ_MXVR_PKT_POS) |
96 ((CONFIG_IRQ_EPPI1_ERR - 7) << IRQ_EPPI1_ERR_POS) |
97 ((CONFIG_IRQ_EPPI2_ERR - 7) << IRQ_EPPI2_ERR_POS));
98
99 bfin_write_SIC_IAR7(((CONFIG_IRQ_UART3_ERR - 7) << IRQ_UART3_ERR_POS) |
100 ((CONFIG_IRQ_HOST_ERR - 7) << IRQ_HOST_ERR_POS) |
101 ((CONFIG_IRQ_PIXC_ERR - 7) << IRQ_PIXC_ERR_POS) |
102 ((CONFIG_IRQ_NFC_ERR - 7) << IRQ_NFC_ERR_POS) |
103 ((CONFIG_IRQ_ATAPI_ERR - 7) << IRQ_ATAPI_ERR_POS) |
104 ((CONFIG_IRQ_CAN1_ERR - 7) << IRQ_CAN1_ERR_POS) |
105 ((CONFIG_IRQ_HS_DMA_ERR - 7) << IRQ_HS_DMA_ERR_POS));
106
107 bfin_write_SIC_IAR8(((CONFIG_IRQ_PIXC_IN0 - 7) << IRQ_PIXC_IN1_POS) |
108 ((CONFIG_IRQ_PIXC_IN1 - 7) << IRQ_PIXC_IN1_POS) |
109 ((CONFIG_IRQ_PIXC_OUT - 7) << IRQ_PIXC_OUT_POS) |
110 ((CONFIG_IRQ_SDH - 7) << IRQ_SDH_POS) |
111 ((CONFIG_IRQ_CNT - 7) << IRQ_CNT_POS) |
112 ((CONFIG_IRQ_KEY - 7) << IRQ_KEY_POS) |
113 ((CONFIG_IRQ_CAN1_RX - 7) << IRQ_CAN1_RX_POS) |
114 ((CONFIG_IRQ_CAN1_TX - 7) << IRQ_CAN1_TX_POS));
115
116 bfin_write_SIC_IAR9(((CONFIG_IRQ_SDH_MASK0 - 7) << IRQ_SDH_MASK0_POS) |
117 ((CONFIG_IRQ_SDH_MASK1 - 7) << IRQ_SDH_MASK1_POS) |
118 ((CONFIG_IRQ_USB_INT0 - 7) << IRQ_USB_INT0_POS) |
119 ((CONFIG_IRQ_USB_INT1 - 7) << IRQ_USB_INT1_POS) |
120 ((CONFIG_IRQ_USB_INT2 - 7) << IRQ_USB_INT2_POS) |
121 ((CONFIG_IRQ_USB_DMA - 7) << IRQ_USB_DMA_POS) |
122 ((CONFIG_IRQ_OTPSEC - 7) << IRQ_OTPSEC_POS));
123
124 bfin_write_SIC_IAR10(((CONFIG_IRQ_TIMER0 - 7) << IRQ_TIMER0_POS) |
125 ((CONFIG_IRQ_TIMER1 - 7) << IRQ_TIMER1_POS));
126
127 bfin_write_SIC_IAR11(((CONFIG_IRQ_TIMER2 - 7) << IRQ_TIMER2_POS) |
128 ((CONFIG_IRQ_TIMER3 - 7) << IRQ_TIMER3_POS) |
129 ((CONFIG_IRQ_TIMER4 - 7) << IRQ_TIMER4_POS) |
130 ((CONFIG_IRQ_TIMER5 - 7) << IRQ_TIMER5_POS) |
131 ((CONFIG_IRQ_TIMER6 - 7) << IRQ_TIMER6_POS) |
132 ((CONFIG_IRQ_TIMER7 - 7) << IRQ_TIMER7_POS) |
133 ((CONFIG_IRQ_PINT2 - 7) << IRQ_PINT2_POS) |
134 ((CONFIG_IRQ_PINT3 - 7) << IRQ_PINT3_POS));
135
136 SSYNC();
137}
diff --git a/arch/blackfin/mach-bf561/Makefile b/arch/blackfin/mach-bf561/Makefile
index 57f475a551..f39235a557 100644
--- a/arch/blackfin/mach-bf561/Makefile
+++ b/arch/blackfin/mach-bf561/Makefile
@@ -4,6 +4,6 @@
4 4
5extra-y := head.o 5extra-y := head.o
6 6
7obj-y := ints-priority.o 7obj-y := ints-priority.o dma.o
8 8
9obj-$(CONFIG_BF561_COREB) += coreb.o 9obj-$(CONFIG_BF561_COREB) += coreb.o
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index 3dc5c04204..5b2b544529 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -34,7 +34,7 @@
34#include <linux/spi/spi.h> 34#include <linux/spi/spi.h>
35#include <linux/spi/flash.h> 35#include <linux/spi/flash.h>
36#include <linux/usb_isp1362.h> 36#include <linux/usb_isp1362.h>
37#include <asm/irq.h> 37#include <linux/irq.h>
38#include <asm/bfin5xx_spi.h> 38#include <asm/bfin5xx_spi.h>
39 39
40/* 40/*
@@ -52,11 +52,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
52 .size = 0x00020000, 52 .size = 0x00020000,
53 .offset = 0, 53 .offset = 0,
54 .mask_flags = MTD_CAP_ROM 54 .mask_flags = MTD_CAP_ROM
55 },{ 55 }, {
56 .name = "kernel", 56 .name = "kernel",
57 .size = 0xe0000, 57 .size = 0xe0000,
58 .offset = 0x20000 58 .offset = 0x20000
59 },{ 59 }, {
60 .name = "file system", 60 .name = "file system",
61 .size = 0x700000, 61 .size = 0x700000,
62 .offset = 0x00100000, 62 .offset = 0x00100000,
@@ -186,7 +186,7 @@ static struct resource smc91x_resources[] = {
186 .start = 0x28000300, 186 .start = 0x28000300,
187 .end = 0x28000300 + 16, 187 .end = 0x28000300 + 16,
188 .flags = IORESOURCE_MEM, 188 .flags = IORESOURCE_MEM,
189 },{ 189 }, {
190 .start = IRQ_PF0, 190 .start = IRQ_PF0,
191 .end = IRQ_PF0, 191 .end = IRQ_PF0,
192 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 192 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -206,11 +206,11 @@ static struct resource isp1362_hcd_resources[] = {
206 .start = 0x24008000, 206 .start = 0x24008000,
207 .end = 0x24008000, 207 .end = 0x24008000,
208 .flags = IORESOURCE_MEM, 208 .flags = IORESOURCE_MEM,
209 },{ 209 }, {
210 .start = 0x24008004, 210 .start = 0x24008004,
211 .end = 0x24008004, 211 .end = 0x24008004,
212 .flags = IORESOURCE_MEM, 212 .flags = IORESOURCE_MEM,
213 },{ 213 }, {
214 .start = IRQ_PF47, 214 .start = IRQ_PF47,
215 .end = IRQ_PF47, 215 .end = IRQ_PF47,
216 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 216 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -241,25 +241,25 @@ static struct platform_device isp1362_hcd_device = {
241 241
242#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 242#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
243static struct resource bfin_uart_resources[] = { 243static struct resource bfin_uart_resources[] = {
244 { 244 {
245 .start = 0xFFC00400, 245 .start = 0xFFC00400,
246 .end = 0xFFC004FF, 246 .end = 0xFFC004FF,
247 .flags = IORESOURCE_MEM, 247 .flags = IORESOURCE_MEM,
248 }, 248 },
249}; 249};
250 250
251static struct platform_device bfin_uart_device = { 251static struct platform_device bfin_uart_device = {
252 .name = "bfin-uart", 252 .name = "bfin-uart",
253 .id = 1, 253 .id = 1,
254 .num_resources = ARRAY_SIZE(bfin_uart_resources), 254 .num_resources = ARRAY_SIZE(bfin_uart_resources),
255 .resource = bfin_uart_resources, 255 .resource = bfin_uart_resources,
256}; 256};
257#endif 257#endif
258 258
259static struct platform_device *cm_bf561_devices[] __initdata = { 259static struct platform_device *cm_bf561_devices[] __initdata = {
260 260
261#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 261#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
262 &bfin_uart_device, 262 &bfin_uart_device,
263#endif 263#endif
264 264
265#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 265#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 9720b5c307..724191da20 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -30,10 +30,9 @@
30#include <linux/device.h> 30#include <linux/device.h>
31#include <linux/platform_device.h> 31#include <linux/platform_device.h>
32#include <linux/spi/spi.h> 32#include <linux/spi/spi.h>
33#include <asm/irq.h>
34#include <asm/bfin5xx_spi.h>
35#include <linux/interrupt.h>
36#include <linux/irq.h> 33#include <linux/irq.h>
34#include <linux/interrupt.h>
35#include <asm/bfin5xx_spi.h>
37 36
38/* 37/*
39 * Name the Board for the /proc/cpuinfo 38 * Name the Board for the /proc/cpuinfo
@@ -45,13 +44,13 @@ char *bfin_board_name = "ADDS-BF561-EZKIT";
45 44
46#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 45#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
47static struct resource bfin_isp1761_resources[] = { 46static struct resource bfin_isp1761_resources[] = {
48 [0] = { 47 {
49 .name = "isp1761-regs", 48 .name = "isp1761-regs",
50 .start = ISP1761_BASE + 0x00000000, 49 .start = ISP1761_BASE + 0x00000000,
51 .end = ISP1761_BASE + 0x000fffff, 50 .end = ISP1761_BASE + 0x000fffff,
52 .flags = IORESOURCE_MEM, 51 .flags = IORESOURCE_MEM,
53 }, 52 },
54 [1] = { 53 {
55 .start = ISP1761_IRQ, 54 .start = ISP1761_IRQ,
56 .end = ISP1761_IRQ, 55 .end = ISP1761_IRQ,
57 .flags = IORESOURCE_IRQ, 56 .flags = IORESOURCE_IRQ,
@@ -71,7 +70,7 @@ static struct platform_device *bfin_isp1761_devices[] = {
71 70
72int __init bfin_isp1761_init(void) 71int __init bfin_isp1761_init(void)
73{ 72{
74 unsigned int num_devices=ARRAY_SIZE(bfin_isp1761_devices); 73 unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices);
75 74
76 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); 75 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
77 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING); 76 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING);
@@ -98,7 +97,7 @@ static struct resource smc91x_resources[] = {
98 .start = 0x2C010300, 97 .start = 0x2C010300,
99 .end = 0x2C010300 + 16, 98 .end = 0x2C010300 + 16,
100 .flags = IORESOURCE_MEM, 99 .flags = IORESOURCE_MEM,
101 },{ 100 }, {
102 101
103 .start = IRQ_PF9, 102 .start = IRQ_PF9,
104 .end = IRQ_PF9, 103 .end = IRQ_PF9,
@@ -116,18 +115,18 @@ static struct platform_device smc91x_device = {
116 115
117#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 116#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
118static struct resource bfin_uart_resources[] = { 117static struct resource bfin_uart_resources[] = {
119 { 118 {
120 .start = 0xFFC00400, 119 .start = 0xFFC00400,
121 .end = 0xFFC004FF, 120 .end = 0xFFC004FF,
122 .flags = IORESOURCE_MEM, 121 .flags = IORESOURCE_MEM,
123 }, 122 },
124}; 123};
125 124
126static struct platform_device bfin_uart_device = { 125static struct platform_device bfin_uart_device = {
127 .name = "bfin-uart", 126 .name = "bfin-uart",
128 .id = 1, 127 .id = 1,
129 .num_resources = ARRAY_SIZE(bfin_uart_resources), 128 .num_resources = ARRAY_SIZE(bfin_uart_resources),
130 .resource = bfin_uart_resources, 129 .resource = bfin_uart_resources,
131}; 130};
132#endif 131#endif
133 132
@@ -176,7 +175,7 @@ static struct platform_device *ezkit_devices[] __initdata = {
176 &spi_bfin_master_device, 175 &spi_bfin_master_device,
177#endif 176#endif
178#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 177#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
179 &bfin_uart_device, 178 &bfin_uart_device,
180#endif 179#endif
181}; 180};
182 181
diff --git a/arch/blackfin/mach-bf561/boards/generic_board.c b/arch/blackfin/mach-bf561/boards/generic_board.c
index 585ecdd2f6..4dfea5da67 100644
--- a/arch/blackfin/mach-bf561/boards/generic_board.c
+++ b/arch/blackfin/mach-bf561/boards/generic_board.c
@@ -30,7 +30,7 @@
30 30
31#include <linux/device.h> 31#include <linux/device.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <asm/irq.h> 33#include <linux/irq.h>
34 34
35char *bfin_board_name = "UNKNOWN BOARD"; 35char *bfin_board_name = "UNKNOWN BOARD";
36 36
@@ -43,11 +43,11 @@ static struct resource smc91x_resources[] = {
43 .start = 0x2C010300, 43 .start = 0x2C010300,
44 .end = 0x2C010300 + 16, 44 .end = 0x2C010300 + 16,
45 .flags = IORESOURCE_MEM, 45 .flags = IORESOURCE_MEM,
46 },{ 46 }, {
47 .start = IRQ_PROG_INTB, 47 .start = IRQ_PROG_INTB,
48 .end = IRQ_PROG_INTB, 48 .end = IRQ_PROG_INTB,
49 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 49 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
50 },{ 50 }, {
51 /* 51 /*
52 * denotes the flag pin and is used directly if 52 * denotes the flag pin and is used directly if
53 * CONFIG_IRQCHIP_DEMUX_GPIO is defined. 53 * CONFIG_IRQCHIP_DEMUX_GPIO is defined.
diff --git a/arch/blackfin/mach-bf561/boards/tepla.c b/arch/blackfin/mach-bf561/boards/tepla.c
index db308c7cca..c442eb23db 100644
--- a/arch/blackfin/mach-bf561/boards/tepla.c
+++ b/arch/blackfin/mach-bf561/boards/tepla.c
@@ -14,7 +14,7 @@
14 14
15#include <linux/device.h> 15#include <linux/device.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <asm/irq.h> 17#include <linux/irq.h>
18 18
19char *bfin_board_name = "Tepla-BF561"; 19char *bfin_board_name = "Tepla-BF561";
20 20
@@ -26,11 +26,11 @@ static struct resource smc91x_resources[] = {
26 .start = 0x2C000300, 26 .start = 0x2C000300,
27 .end = 0x2C000320, 27 .end = 0x2C000320,
28 .flags = IORESOURCE_MEM, 28 .flags = IORESOURCE_MEM,
29 },{ 29 }, {
30 .start = IRQ_PROG_INTB, 30 .start = IRQ_PROG_INTB,
31 .end = IRQ_PROG_INTB, 31 .end = IRQ_PROG_INTB,
32 .flags = IORESOURCE_IRQ|IORESOURCE_IRQ_HIGHLEVEL, 32 .flags = IORESOURCE_IRQ|IORESOURCE_IRQ_HIGHLEVEL,
33 },{ 33 }, {
34 /* 34 /*
35 * denotes the flag pin and is used directly if 35 * denotes the flag pin and is used directly if
36 * CONFIG_IRQCHIP_DEMUX_GPIO is defined. 36 * CONFIG_IRQCHIP_DEMUX_GPIO is defined.
diff --git a/arch/blackfin/mach-bf561/coreb.c b/arch/blackfin/mach-bf561/coreb.c
index b28582fe08..5d1d21b4c2 100644
--- a/arch/blackfin/mach-bf561/coreb.c
+++ b/arch/blackfin/mach-bf561/coreb.c
@@ -32,8 +32,8 @@
32#include <linux/device.h> 32#include <linux/device.h>
33#include <linux/ioport.h> 33#include <linux/ioport.h>
34#include <linux/module.h> 34#include <linux/module.h>
35#include <linux/uaccess.h>
35#include <asm/dma.h> 36#include <asm/dma.h>
36#include <asm/uaccess.h>
37 37
38#define MODULE_VER "v0.1" 38#define MODULE_VER "v0.1"
39 39
@@ -202,7 +202,7 @@ static int coreb_open(struct inode *inode, struct file *file)
202 spin_unlock_irq(&coreb_lock); 202 spin_unlock_irq(&coreb_lock);
203 return 0; 203 return 0;
204 204
205 out_busy: 205 out_busy:
206 spin_unlock_irq(&coreb_lock); 206 spin_unlock_irq(&coreb_lock);
207 return -EBUSY; 207 return -EBUSY;
208} 208}
@@ -365,19 +365,19 @@ int __init bf561_coreb_init(void)
365 printk(KERN_INFO "BF561 Core B driver %s initialized.\n", MODULE_VER); 365 printk(KERN_INFO "BF561 Core B driver %s initialized.\n", MODULE_VER);
366 return 0; 366 return 0;
367 367
368 release_dma_src: 368 release_dma_src:
369 free_dma(CH_MEM_STREAM2_SRC); 369 free_dma(CH_MEM_STREAM2_SRC);
370 release_dma_dest: 370 release_dma_dest:
371 free_dma(CH_MEM_STREAM2_DEST); 371 free_dma(CH_MEM_STREAM2_DEST);
372 release_data_a_sram: 372 release_data_a_sram:
373 release_mem_region(0xff400000, 0x8000); 373 release_mem_region(0xff400000, 0x8000);
374 release_data_b_sram: 374 release_data_b_sram:
375 release_mem_region(0xff500000, 0x8000); 375 release_mem_region(0xff500000, 0x8000);
376 release_instruction_b_sram: 376 release_instruction_b_sram:
377 release_mem_region(0xff610000, 0x4000); 377 release_mem_region(0xff610000, 0x4000);
378 release_instruction_a_sram: 378 release_instruction_a_sram:
379 release_mem_region(0xff600000, 0x4000); 379 release_mem_region(0xff600000, 0x4000);
380 exit: 380 exit:
381 return -ENOMEM; 381 return -ENOMEM;
382} 382}
383 383
diff --git a/arch/blackfin/mach-bf561/dma.c b/arch/blackfin/mach-bf561/dma.c
new file mode 100644
index 0000000000..89c65bb0be
--- /dev/null
+++ b/arch/blackfin/mach-bf561/dma.c
@@ -0,0 +1,131 @@
1/*
2 * File: arch/blackfin/mach-bf561/dma.c
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: This file contains the simple DMA Implementation for Blackfin
8 *
9 * Modified:
10 * Copyright 2004-2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
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, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29#include <asm/blackfin.h>
30#include <asm/dma.h>
31
32struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = {
33 (struct dma_register *) DMA1_0_NEXT_DESC_PTR,
34 (struct dma_register *) DMA1_1_NEXT_DESC_PTR,
35 (struct dma_register *) DMA1_2_NEXT_DESC_PTR,
36 (struct dma_register *) DMA1_3_NEXT_DESC_PTR,
37 (struct dma_register *) DMA1_4_NEXT_DESC_PTR,
38 (struct dma_register *) DMA1_5_NEXT_DESC_PTR,
39 (struct dma_register *) DMA1_6_NEXT_DESC_PTR,
40 (struct dma_register *) DMA1_7_NEXT_DESC_PTR,
41 (struct dma_register *) DMA1_8_NEXT_DESC_PTR,
42 (struct dma_register *) DMA1_9_NEXT_DESC_PTR,
43 (struct dma_register *) DMA1_10_NEXT_DESC_PTR,
44 (struct dma_register *) DMA1_11_NEXT_DESC_PTR,
45 (struct dma_register *) DMA2_0_NEXT_DESC_PTR,
46 (struct dma_register *) DMA2_1_NEXT_DESC_PTR,
47 (struct dma_register *) DMA2_2_NEXT_DESC_PTR,
48 (struct dma_register *) DMA2_3_NEXT_DESC_PTR,
49 (struct dma_register *) DMA2_4_NEXT_DESC_PTR,
50 (struct dma_register *) DMA2_5_NEXT_DESC_PTR,
51 (struct dma_register *) DMA2_6_NEXT_DESC_PTR,
52 (struct dma_register *) DMA2_7_NEXT_DESC_PTR,
53 (struct dma_register *) DMA2_8_NEXT_DESC_PTR,
54 (struct dma_register *) DMA2_9_NEXT_DESC_PTR,
55 (struct dma_register *) DMA2_10_NEXT_DESC_PTR,
56 (struct dma_register *) DMA2_11_NEXT_DESC_PTR,
57 (struct dma_register *) MDMA1_D0_NEXT_DESC_PTR,
58 (struct dma_register *) MDMA1_S0_NEXT_DESC_PTR,
59 (struct dma_register *) MDMA1_D1_NEXT_DESC_PTR,
60 (struct dma_register *) MDMA1_S1_NEXT_DESC_PTR,
61 (struct dma_register *) MDMA2_D0_NEXT_DESC_PTR,
62 (struct dma_register *) MDMA2_S0_NEXT_DESC_PTR,
63 (struct dma_register *) MDMA2_D1_NEXT_DESC_PTR,
64 (struct dma_register *) MDMA2_S1_NEXT_DESC_PTR,
65 (struct dma_register *) IMDMA_D0_NEXT_DESC_PTR,
66 (struct dma_register *) IMDMA_S0_NEXT_DESC_PTR,
67 (struct dma_register *) IMDMA_D1_NEXT_DESC_PTR,
68 (struct dma_register *) IMDMA_S1_NEXT_DESC_PTR,
69};
70
71int channel2irq(unsigned int channel)
72{
73 int ret_irq = -1;
74
75 switch (channel) {
76 case CH_PPI0:
77 ret_irq = IRQ_PPI0;
78 break;
79 case CH_PPI1:
80 ret_irq = IRQ_PPI1;
81 break;
82 case CH_SPORT0_RX:
83 ret_irq = IRQ_SPORT0_RX;
84 break;
85 case CH_SPORT0_TX:
86 ret_irq = IRQ_SPORT0_TX;
87 break;
88 case CH_SPORT1_RX:
89 ret_irq = IRQ_SPORT1_RX;
90 break;
91 case CH_SPORT1_TX:
92 ret_irq = IRQ_SPORT1_TX;
93 break;
94 case CH_SPI:
95 ret_irq = IRQ_SPI;
96 break;
97 case CH_UART_RX:
98 ret_irq = IRQ_UART_RX;
99 break;
100 case CH_UART_TX:
101 ret_irq = IRQ_UART_TX;
102 break;
103
104 case CH_MEM_STREAM0_SRC:
105 case CH_MEM_STREAM0_DEST:
106 ret_irq = IRQ_MEM_DMA0;
107 break;
108 case CH_MEM_STREAM1_SRC:
109 case CH_MEM_STREAM1_DEST:
110 ret_irq = IRQ_MEM_DMA1;
111 break;
112 case CH_MEM_STREAM2_SRC:
113 case CH_MEM_STREAM2_DEST:
114 ret_irq = IRQ_MEM_DMA2;
115 break;
116 case CH_MEM_STREAM3_SRC:
117 case CH_MEM_STREAM3_DEST:
118 ret_irq = IRQ_MEM_DMA3;
119 break;
120
121 case CH_IMEM_STREAM0_SRC:
122 case CH_IMEM_STREAM0_DEST:
123 ret_irq = IRQ_IMEM_DMA0;
124 break;
125 case CH_IMEM_STREAM1_SRC:
126 case CH_IMEM_STREAM1_DEST:
127 ret_irq = IRQ_IMEM_DMA1;
128 break;
129 }
130 return ret_irq;
131}
diff --git a/arch/blackfin/mach-bf561/head.S b/arch/blackfin/mach-bf561/head.S
index 31cbc75c85..2f08bcb2dd 100644
--- a/arch/blackfin/mach-bf561/head.S
+++ b/arch/blackfin/mach-bf561/head.S
@@ -30,6 +30,8 @@
30#include <linux/linkage.h> 30#include <linux/linkage.h>
31#include <linux/init.h> 31#include <linux/init.h>
32#include <asm/blackfin.h> 32#include <asm/blackfin.h>
33#include <asm/trace.h>
34
33#if CONFIG_BFIN_KERNEL_CLOCK 35#if CONFIG_BFIN_KERNEL_CLOCK
34#include <asm/mach/mem_init.h> 36#include <asm/mach/mem_init.h>
35#endif 37#endif
@@ -93,6 +95,10 @@ ENTRY(__start)
93 M2 = r0; 95 M2 = r0;
94 M3 = r0; 96 M3 = r0;
95 97
98 trace_buffer_start(p0,r0);
99 P0 = R1;
100 R0 = R1;
101
96 /* Turn off the icache */ 102 /* Turn off the icache */
97 p0.l = (IMEM_CONTROL & 0xFFFF); 103 p0.l = (IMEM_CONTROL & 0xFFFF);
98 p0.h = (IMEM_CONTROL >> 16); 104 p0.h = (IMEM_CONTROL >> 16);
diff --git a/arch/blackfin/mach-bf561/ints-priority.c b/arch/blackfin/mach-bf561/ints-priority.c
index 86e3b0ee93..09b541b0f7 100644
--- a/arch/blackfin/mach-bf561/ints-priority.c
+++ b/arch/blackfin/mach-bf561/ints-priority.c
@@ -28,8 +28,8 @@
28 */ 28 */
29 29
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/irq.h>
31#include <asm/blackfin.h> 32#include <asm/blackfin.h>
32#include <asm/irq.h>
33 33
34void program_IAR(void) 34void program_IAR(void)
35{ 35{
diff --git a/arch/blackfin/mach-common/Makefile b/arch/blackfin/mach-common/Makefile
index d3a49073d1..0279ede703 100644
--- a/arch/blackfin/mach-common/Makefile
+++ b/arch/blackfin/mach-common/Makefile
@@ -4,9 +4,9 @@
4 4
5obj-y := \ 5obj-y := \
6 cache.o cacheinit.o cplbhdlr.o cplbmgr.o entry.o \ 6 cache.o cacheinit.o cplbhdlr.o cplbmgr.o entry.o \
7 interrupt.o lock.o dpmc.o irqpanic.o 7 interrupt.o lock.o irqpanic.o
8 8
9obj-$(CONFIG_CPLB_INFO) += cplbinfo.o 9obj-$(CONFIG_CPLB_INFO) += cplbinfo.o
10obj-$(CONFIG_BFIN_SINGLE_CORE) += ints-priority-sc.o 10obj-$(CONFIG_BFIN_SINGLE_CORE) += ints-priority-sc.o
11obj-$(CONFIG_BFIN_DUAL_CORE) += ints-priority-dc.o 11obj-$(CONFIG_BFIN_DUAL_CORE) += ints-priority-dc.o
12obj-$(CONFIG_PM) += pm.o 12obj-$(CONFIG_PM) += pm.o dpmc.o
diff --git a/arch/blackfin/mach-common/cacheinit.S b/arch/blackfin/mach-common/cacheinit.S
index 7924a90d96..9d475623b7 100644
--- a/arch/blackfin/mach-common/cacheinit.S
+++ b/arch/blackfin/mach-common/cacheinit.S
@@ -38,104 +38,37 @@
38 38
39.text 39.text
40 40
41#ifdef ANOMALY_05000125
41#if defined(CONFIG_BLKFIN_CACHE) 42#if defined(CONFIG_BLKFIN_CACHE)
42ENTRY(_bfin_icache_init) 43ENTRY(_bfin_write_IMEM_CONTROL)
43 44
44 /* Initialize Instruction CPLBS */
45
46 I0.L = (ICPLB_ADDR0 & 0xFFFF);
47 I0.H = (ICPLB_ADDR0 >> 16);
48
49 I1.L = (ICPLB_DATA0 & 0xFFFF);
50 I1.H = (ICPLB_DATA0 >> 16);
51
52 I2.L = _icplb_table;
53 I2.H = _icplb_table;
54
55 r1 = -1; /* end point comparison */
56 r3 = 15; /* max counter */
57
58/* read entries from table */
59
60.Lread_iaddr:
61 R0 = [I2++];
62 CC = R0 == R1;
63 IF CC JUMP .Lidone;
64 [I0++] = R0;
65
66.Lread_idata:
67 R2 = [I2++];
68 [I1++] = R2;
69 R3 = R3 + R1;
70 CC = R3 == R1;
71 IF !CC JUMP .Lread_iaddr;
72
73.Lidone:
74 /* Enable Instruction Cache */ 45 /* Enable Instruction Cache */
75 P0.l = (IMEM_CONTROL & 0xFFFF); 46 P0.l = (IMEM_CONTROL & 0xFFFF);
76 P0.h = (IMEM_CONTROL >> 16); 47 P0.h = (IMEM_CONTROL >> 16);
77 R1 = [P0];
78 R0 = (IMC | ENICPLB);
79 R0 = R0 | R1;
80 48
81 /* Anomaly 05000125 */ 49 /* Anomaly 05000125 */
82 CLI R2; 50 CLI R1;
83 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */ 51 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */
84 .align 8; 52 .align 8;
85 [P0] = R0; 53 [P0] = R0;
86 SSYNC; 54 SSYNC;
87 STI R2; 55 STI R1;
88 RTS; 56 RTS;
89 57
90ENDPROC(_bfin_icache_init) 58ENDPROC(_bfin_write_IMEM_CONTROL)
91#endif 59#endif
92 60
93#if defined(CONFIG_BLKFIN_DCACHE) 61#if defined(CONFIG_BLKFIN_DCACHE)
94ENTRY(_bfin_dcache_init) 62ENTRY(_bfin_write_DMEM_CONTROL)
95 63 CLI R1;
96 /* Initialize Data CPLBS */
97
98 I0.L = (DCPLB_ADDR0 & 0xFFFF);
99 I0.H = (DCPLB_ADDR0 >> 16);
100
101 I1.L = (DCPLB_DATA0 & 0xFFFF);
102 I1.H = (DCPLB_DATA0 >> 16);
103
104 I2.L = _dcplb_table;
105 I2.H = _dcplb_table;
106
107 R1 = -1; /* end point comparison */
108 R3 = 15; /* max counter */
109
110 /* read entries from table */
111.Lread_daddr:
112 R0 = [I2++];
113 cc = R0 == R1;
114 IF CC JUMP .Lddone;
115 [I0++] = R0;
116
117.Lread_ddata:
118 R2 = [I2++];
119 [I1++] = R2;
120 R3 = R3 + R1;
121 CC = R3 == R1;
122 IF !CC JUMP .Lread_daddr;
123.Lddone:
124 P0.L = (DMEM_CONTROL & 0xFFFF);
125 P0.H = (DMEM_CONTROL >> 16);
126 R1 = [P0];
127
128 R0 = DMEM_CNTR;
129
130 R0 = R0 | R1;
131 /* Anomaly 05000125 */
132 CLI R2;
133 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */ 64 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */
134 .align 8; 65 .align 8;
135 [P0] = R0; 66 [P0] = R0;
136 SSYNC; 67 SSYNC;
137 STI R2; 68 STI R1;
138 RTS; 69 RTS;
139 70
140ENDPROC(_bfin_dcache_init) 71ENDPROC(_bfin_write_DMEM_CONTROL)
72#endif
73
141#endif 74#endif
diff --git a/arch/blackfin/mach-common/cplbinfo.c b/arch/blackfin/mach-common/cplbinfo.c
index caa9623e6b..785ca98169 100644
--- a/arch/blackfin/mach-common/cplbinfo.c
+++ b/arch/blackfin/mach-common/cplbinfo.c
@@ -31,11 +31,10 @@
31#include <linux/kernel.h> 31#include <linux/kernel.h>
32#include <linux/init.h> 32#include <linux/init.h>
33#include <linux/proc_fs.h> 33#include <linux/proc_fs.h>
34#include <linux/uaccess.h>
34 35
35#include <asm/current.h> 36#include <asm/current.h>
36#include <asm/uaccess.h>
37#include <asm/system.h> 37#include <asm/system.h>
38
39#include <asm/cplb.h> 38#include <asm/cplb.h>
40#include <asm/blackfin.h> 39#include <asm/blackfin.h>
41 40
@@ -92,8 +91,7 @@ static char *cplb_print_entry(char *buf, int type)
92 } else 91 } else
93 buf += sprintf(buf, "Data CPLB entry:\n"); 92 buf += sprintf(buf, "Data CPLB entry:\n");
94 93
95 buf += sprintf(buf, "Address\t\tData\tSize\tValid\tLocked\tSwapin\ 94 buf += sprintf(buf, "Address\t\tData\tSize\tValid\tLocked\tSwapin\n\tiCount\toCount\n");
96\tiCount\toCount\n");
97 95
98 while (*p_addr != 0xffffffff) { 96 while (*p_addr != 0xffffffff) {
99 entry = cplb_find_entry(cplb_addr, cplb_data, *p_addr, *p_data); 97 entry = cplb_find_entry(cplb_addr, cplb_data, *p_addr, *p_data);
@@ -144,8 +142,7 @@ static int cplbinfo_proc_output(char *buf)
144 142
145 p = buf; 143 p = buf;
146 144
147 p += sprintf(p, 145 p += sprintf(p, "------------------ CPLB Information ------------------\n\n");
148 "------------------ CPLB Information ------------------\n\n");
149 146
150 if (bfin_read_IMEM_CONTROL() & ENICPLB) 147 if (bfin_read_IMEM_CONTROL() & ENICPLB)
151 p = cplb_print_entry(p, CPLB_I); 148 p = cplb_print_entry(p, CPLB_I);
@@ -191,9 +188,9 @@ static int __init cplbinfo_init(void)
191{ 188{
192 struct proc_dir_entry *entry; 189 struct proc_dir_entry *entry;
193 190
194 if ((entry = create_proc_entry("cplbinfo", 0, NULL)) == NULL) { 191 entry = create_proc_entry("cplbinfo", 0, NULL);
192 if (!entry)
195 return -ENOMEM; 193 return -ENOMEM;
196 }
197 194
198 entry->read_proc = cplbinfo_read_proc; 195 entry->read_proc = cplbinfo_read_proc;
199 entry->write_proc = cplbinfo_write_proc; 196 entry->write_proc = cplbinfo_write_proc;
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index 40045b1386..d61bba98fb 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -49,34 +49,15 @@
49 49
50 50
51#include <linux/linkage.h> 51#include <linux/linkage.h>
52#include <linux/unistd.h>
52#include <asm/blackfin.h> 53#include <asm/blackfin.h>
53#include <asm/unistd.h>
54#include <asm/errno.h> 54#include <asm/errno.h>
55#include <asm/thread_info.h> /* TIF_NEED_RESCHED */ 55#include <asm/thread_info.h> /* TIF_NEED_RESCHED */
56#include <asm/asm-offsets.h> 56#include <asm/asm-offsets.h>
57#include <asm/trace.h>
57 58
58#include <asm/mach-common/context.S> 59#include <asm/mach-common/context.S>
59 60
60#ifdef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE
61 /*
62 * TODO: this should be proper save/restore, but for now
63 * we'll just cheat and use 0x1/0x13
64 */
65# define DEBUG_START_HWTRACE \
66 P5.l = LO(TBUFCTL); \
67 P5.h = HI(TBUFCTL); \
68 R7 = 0x13; \
69 [P5] = R7;
70# define DEBUG_STOP_HWTRACE \
71 P5.l = LO(TBUFCTL); \
72 P5.h = HI(TBUFCTL); \
73 R7 = 0x01; \
74 [P5] = R7;
75#else
76# define DEBUG_START_HWTRACE
77# define DEBUG_STOP_HWTRACE
78#endif
79
80#ifdef CONFIG_EXCPT_IRQ_SYSC_L1 61#ifdef CONFIG_EXCPT_IRQ_SYSC_L1
81.section .l1.text 62.section .l1.text
82#else 63#else
@@ -110,25 +91,14 @@ ENTRY(_ex_icplb)
110 ASTAT = [sp++]; 91 ASTAT = [sp++];
111 SAVE_ALL_SYS 92 SAVE_ALL_SYS
112 call __cplb_hdr; 93 call __cplb_hdr;
113 DEBUG_START_HWTRACE 94 DEBUG_START_HWTRACE(p5, r7)
114 RESTORE_ALL_SYS 95 RESTORE_ALL_SYS
115 SP = RETN; 96 SP = RETN;
116 rtx; 97 rtx;
117ENDPROC(_ex_icplb) 98ENDPROC(_ex_icplb)
118 99
119ENTRY(_ex_spinlock)
120 /* Transform this into a syscall - twiddle the syscall vector. */
121 p5.l = lo(EVT15);
122 p5.h = hi(EVT15);
123 r7.l = _spinlock_bh;
124 r7.h = _spinlock_bh;
125 [p5] = r7;
126 csync;
127 /* Fall through. */
128ENDPROC(_ex_spinlock)
129
130ENTRY(_ex_syscall) 100ENTRY(_ex_syscall)
131 DEBUG_START_HWTRACE 101 DEBUG_START_HWTRACE(p5, r7)
132 (R7:6,P5:4) = [sp++]; 102 (R7:6,P5:4) = [sp++];
133 ASTAT = [sp++]; 103 ASTAT = [sp++];
134 raise 15; /* invoked by TRAP #0, for sys call */ 104 raise 15; /* invoked by TRAP #0, for sys call */
@@ -136,26 +106,6 @@ ENTRY(_ex_syscall)
136 rtx 106 rtx
137ENDPROC(_ex_syscall) 107ENDPROC(_ex_syscall)
138 108
139ENTRY(_spinlock_bh)
140 SAVE_ALL_SYS
141 /* To end up here, vector 15 was changed - so we have to change it
142 * back.
143 */
144 p0.l = lo(EVT15);
145 p0.h = hi(EVT15);
146 p1.l = _evt_system_call;
147 p1.h = _evt_system_call;
148 [p0] = p1;
149 csync;
150 r0 = [sp + PT_R0];
151 sp += -12;
152 call _sys_bfin_spinlock;
153 sp += 12;
154 [SP + PT_R0] = R0;
155 RESTORE_ALL_SYS
156 rti;
157ENDPROC(_spinlock_bh)
158
159ENTRY(_ex_soft_bp) 109ENTRY(_ex_soft_bp)
160 r7 = retx; 110 r7 = retx;
161 r7 += -2; 111 r7 += -2;
@@ -186,7 +136,7 @@ ENTRY(_ex_single_step)
186 if !cc jump _ex_trap_c; 136 if !cc jump _ex_trap_c;
187 137
188_return_from_exception: 138_return_from_exception:
189 DEBUG_START_HWTRACE 139 DEBUG_START_HWTRACE(p5, r7)
190#ifdef ANOMALY_05000257 140#ifdef ANOMALY_05000257
191 R7=LC0; 141 R7=LC0;
192 LC0=R7; 142 LC0=R7;
@@ -208,7 +158,7 @@ ENTRY(_handle_bad_cplb)
208 * need to make a CPLB exception look like a normal exception 158 * need to make a CPLB exception look like a normal exception
209 */ 159 */
210 160
211 DEBUG_START_HWTRACE 161 DEBUG_START_HWTRACE(p5, r7)
212 RESTORE_ALL_SYS 162 RESTORE_ALL_SYS
213 [--sp] = ASTAT; 163 [--sp] = ASTAT;
214 [--sp] = (R7:6, P5:4); 164 [--sp] = (R7:6, P5:4);
@@ -251,7 +201,7 @@ ENTRY(_ex_trap_c)
251 R6 = SEQSTAT; 201 R6 = SEQSTAT;
252 [P5] = R6; 202 [P5] = R6;
253 203
254 DEBUG_START_HWTRACE 204 DEBUG_START_HWTRACE(p5, r7)
255 (R7:6,P5:4) = [sp++]; 205 (R7:6,P5:4) = [sp++];
256 ASTAT = [sp++]; 206 ASTAT = [sp++];
257 SP = RETN; 207 SP = RETN;
@@ -335,7 +285,7 @@ ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/
335 /* Try to deal with syscalls quickly. */ 285 /* Try to deal with syscalls quickly. */
336 [--sp] = ASTAT; 286 [--sp] = ASTAT;
337 [--sp] = (R7:6, P5:4); 287 [--sp] = (R7:6, P5:4);
338 DEBUG_STOP_HWTRACE 288 DEBUG_STOP_HWTRACE(p5, r7)
339 r7 = SEQSTAT; /* reason code is in bit 5:0 */ 289 r7 = SEQSTAT; /* reason code is in bit 5:0 */
340 r6.l = lo(SEQSTAT_EXCAUSE); 290 r6.l = lo(SEQSTAT_EXCAUSE);
341 r6.h = hi(SEQSTAT_EXCAUSE); 291 r6.h = hi(SEQSTAT_EXCAUSE);
@@ -741,6 +691,10 @@ _schedule_and_signal_from_int:
741 r0 = [p0]; 691 r0 = [p0];
742 sti r0; 692 sti r0;
743 693
694 r0 = sp;
695 sp += -12;
696 call _finish_atomic_sections;
697 sp += 12;
744 jump.s .Lresume_userspace; 698 jump.s .Lresume_userspace;
745 699
746_schedule_and_signal: 700_schedule_and_signal:
@@ -790,14 +744,14 @@ ENDPROC(_init_exception_buff)
790ALIGN 744ALIGN
791_extable: 745_extable:
792 /* entry for each EXCAUSE[5:0] 746 /* entry for each EXCAUSE[5:0]
793 * This table bmust be in sync with the table in ./kernel/traps.c 747 * This table must be in sync with the table in ./kernel/traps.c
794 * EXCPT instruction can provide 4 bits of EXCAUSE, allowing 16 to be user defined 748 * EXCPT instruction can provide 4 bits of EXCAUSE, allowing 16 to be user defined
795 */ 749 */
796 .long _ex_syscall; /* 0x00 - User Defined - Linux Syscall */ 750 .long _ex_syscall; /* 0x00 - User Defined - Linux Syscall */
797 .long _ex_soft_bp /* 0x01 - User Defined - Software breakpoint */ 751 .long _ex_soft_bp /* 0x01 - User Defined - Software breakpoint */
798 .long _ex_trap_c /* 0x02 - User Defined */ 752 .long _ex_trap_c /* 0x02 - User Defined */
799 .long _ex_trap_c /* 0x03 - User Defined - Atomic test and set service */ 753 .long _ex_trap_c /* 0x03 - User Defined - userspace stack overflow */
800 .long _ex_spinlock /* 0x04 - User Defined */ 754 .long _ex_trap_c /* 0x04 - User Defined */
801 .long _ex_trap_c /* 0x05 - User Defined */ 755 .long _ex_trap_c /* 0x05 - User Defined */
802 .long _ex_trap_c /* 0x06 - User Defined */ 756 .long _ex_trap_c /* 0x06 - User Defined */
803 .long _ex_trap_c /* 0x07 - User Defined */ 757 .long _ex_trap_c /* 0x07 - User Defined */
diff --git a/arch/blackfin/mach-common/interrupt.S b/arch/blackfin/mach-common/interrupt.S
index 8be548e061..203e207091 100644
--- a/arch/blackfin/mach-common/interrupt.S
+++ b/arch/blackfin/mach-common/interrupt.S
@@ -34,6 +34,7 @@
34#include <linux/linkage.h> 34#include <linux/linkage.h>
35#include <asm/entry.h> 35#include <asm/entry.h>
36#include <asm/asm-offsets.h> 36#include <asm/asm-offsets.h>
37#include <asm/trace.h>
37 38
38#include <asm/mach-common/context.S> 39#include <asm/mach-common/context.S>
39 40
@@ -170,10 +171,9 @@ ENTRY(_evt_ivhw)
170 r7.l = W[p5]; 171 r7.l = W[p5];
1711: 1721:
172#endif 173#endif
173 p0.l = lo(TBUFCTL); 174
174 p0.h = hi(TBUFCTL); 175 trace_buffer_stop(p0, r0);
175 r0 = 1; 176
176 [p0] = r0;
177 r0 = IRQ_HWERR; 177 r0 = IRQ_HWERR;
178 r1 = sp; 178 r1 = sp;
179 179
diff --git a/arch/blackfin/mach-common/ints-priority-dc.c b/arch/blackfin/mach-common/ints-priority-dc.c
index 80943bbd37..6b9fd03ce8 100644
--- a/arch/blackfin/mach-common/ints-priority-dc.c
+++ b/arch/blackfin/mach-common/ints-priority-dc.c
@@ -183,7 +183,7 @@ static void bf561_gpio_ack_irq(unsigned int irq)
183{ 183{
184 u16 gpionr = irq - IRQ_PF0; 184 u16 gpionr = irq - IRQ_PF0;
185 185
186 if(gpio_edge_triggered[gpio_bank(gpionr)] & gpio_bit(gpionr)) { 186 if (gpio_edge_triggered[gpio_bank(gpionr)] & gpio_bit(gpionr)) {
187 set_gpio_data(gpionr, 0); 187 set_gpio_data(gpionr, 0);
188 SSYNC(); 188 SSYNC();
189 } 189 }
@@ -193,7 +193,7 @@ static void bf561_gpio_mask_ack_irq(unsigned int irq)
193{ 193{
194 u16 gpionr = irq - IRQ_PF0; 194 u16 gpionr = irq - IRQ_PF0;
195 195
196 if(gpio_edge_triggered[gpio_bank(gpionr)] & gpio_bit(gpionr)) { 196 if (gpio_edge_triggered[gpio_bank(gpionr)] & gpio_bit(gpionr)) {
197 set_gpio_data(gpionr, 0); 197 set_gpio_data(gpionr, 0);
198 SSYNC(); 198 SSYNC();
199 } 199 }
@@ -222,7 +222,7 @@ static unsigned int bf561_gpio_irq_startup(unsigned int irq)
222 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { 222 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
223 223
224 ret = gpio_request(gpionr, NULL); 224 ret = gpio_request(gpionr, NULL);
225 if(ret) 225 if (ret)
226 return ret; 226 return ret;
227 227
228 } 228 }
@@ -262,7 +262,7 @@ static int bf561_gpio_irq_type(unsigned int irq, unsigned int type)
262 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { 262 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
263 263
264 ret = gpio_request(gpionr, NULL); 264 ret = gpio_request(gpionr, NULL);
265 if(ret) 265 if (ret)
266 return ret; 266 return ret;
267 267
268 } 268 }
@@ -371,6 +371,9 @@ int __init init_arch_irq(void)
371 bfin_write_SICA_IMASK1(SIC_UNMASK_ALL); 371 bfin_write_SICA_IMASK1(SIC_UNMASK_ALL);
372 SSYNC(); 372 SSYNC();
373 373
374 bfin_write_SICA_IWR0(IWR_ENABLE_ALL);
375 bfin_write_SICA_IWR1(IWR_ENABLE_ALL);
376
374 local_irq_disable(); 377 local_irq_disable();
375 378
376 init_exception_buff(); 379 init_exception_buff();
@@ -393,7 +396,7 @@ int __init init_arch_irq(void)
393 bfin_write_EVT15(evt_system_call); 396 bfin_write_EVT15(evt_system_call);
394 CSYNC(); 397 CSYNC();
395 398
396 for (irq = 0; irq < SYS_IRQS; irq++) { 399 for (irq = 0; irq <= SYS_IRQS; irq++) {
397 if (irq <= IRQ_CORETMR) 400 if (irq <= IRQ_CORETMR)
398 set_irq_chip(irq, &bf561_core_irqchip); 401 set_irq_chip(irq, &bf561_core_irqchip);
399 else 402 else
diff --git a/arch/blackfin/mach-common/ints-priority-sc.c b/arch/blackfin/mach-common/ints-priority-sc.c
index 2cfc7d5aec..28a878c357 100644
--- a/arch/blackfin/mach-common/ints-priority-sc.c
+++ b/arch/blackfin/mach-common/ints-priority-sc.c
@@ -13,7 +13,7 @@
13 * 2002 Arcturus Networks Inc. MaTed <mated@sympatico.ca> 13 * 2002 Arcturus Networks Inc. MaTed <mated@sympatico.ca>
14 * 2003 Metrowerks/Motorola 14 * 2003 Metrowerks/Motorola
15 * 2003 Bas Vermeulen <bas@buyways.nl> 15 * 2003 Bas Vermeulen <bas@buyways.nl>
16 * Copyright 2004-2006 Analog Devices Inc. 16 * Copyright 2004-2007 Analog Devices Inc.
17 * 17 *
18 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 18 * Bugs: Enter bugs at http://blackfin.uclinux.org/
19 * 19 *
@@ -65,9 +65,9 @@ atomic_t num_spurious;
65 65
66struct ivgx { 66struct ivgx {
67 /* irq number for request_irq, available in mach-bf533/irq.h */ 67 /* irq number for request_irq, available in mach-bf533/irq.h */
68 int irqno; 68 unsigned int irqno;
69 /* corresponding bit in the SIC_ISR register */ 69 /* corresponding bit in the SIC_ISR register */
70 int isrflag; 70 unsigned int isrflag;
71} ivg_table[NR_PERI_INTS]; 71} ivg_table[NR_PERI_INTS];
72 72
73struct ivg_slice { 73struct ivg_slice {
@@ -88,17 +88,16 @@ static void __init search_IAR(void)
88 for (ivg = 0; ivg <= IVG13 - IVG7; ivg++) { 88 for (ivg = 0; ivg <= IVG13 - IVG7; ivg++) {
89 int irqn; 89 int irqn;
90 90
91 ivg7_13[ivg].istop = ivg7_13[ivg].ifirst = 91 ivg7_13[ivg].istop = ivg7_13[ivg].ifirst = &ivg_table[irq_pos];
92 &ivg_table[irq_pos];
93 92
94 for (irqn = 0; irqn < NR_PERI_INTS; irqn++) { 93 for (irqn = 0; irqn < NR_PERI_INTS; irqn++) {
95 int iar_shift = (irqn & 7) * 4; 94 int iar_shift = (irqn & 7) * 4;
96 if (ivg == 95 if (ivg ==
97 (0xf & 96 (0xf &
98 bfin_read32((unsigned long *) SIC_IAR0 + 97 bfin_read32((unsigned long *)SIC_IAR0 +
99 (irqn >> 3)) >> iar_shift)) { 98 (irqn >> 3)) >> iar_shift)) {
100 ivg_table[irq_pos].irqno = IVG7 + irqn; 99 ivg_table[irq_pos].irqno = IVG7 + irqn;
101 ivg_table[irq_pos].isrflag = 1 << irqn; 100 ivg_table[irq_pos].isrflag = 1 << (irqn % 32);
102 ivg7_13[ivg].istop++; 101 ivg7_13[ivg].istop++;
103 irq_pos++; 102 irq_pos++;
104 } 103 }
@@ -141,15 +140,31 @@ static void bfin_core_unmask_irq(unsigned int irq)
141 140
142static void bfin_internal_mask_irq(unsigned int irq) 141static void bfin_internal_mask_irq(unsigned int irq)
143{ 142{
143#ifndef CONFIG_BF54x
144 bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() & 144 bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() &
145 ~(1 << (irq - (IRQ_CORETMR + 1)))); 145 ~(1 << (irq - (IRQ_CORETMR + 1))));
146#else
147 unsigned mask_bank, mask_bit;
148 mask_bank = (irq - (IRQ_CORETMR + 1)) / 32;
149 mask_bit = (irq - (IRQ_CORETMR + 1)) % 32;
150 bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) &
151 ~(1 << mask_bit));
152#endif
146 SSYNC(); 153 SSYNC();
147} 154}
148 155
149static void bfin_internal_unmask_irq(unsigned int irq) 156static void bfin_internal_unmask_irq(unsigned int irq)
150{ 157{
158#ifndef CONFIG_BF54x
151 bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() | 159 bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() |
152 (1 << (irq - (IRQ_CORETMR + 1)))); 160 (1 << (irq - (IRQ_CORETMR + 1))));
161#else
162 unsigned mask_bank, mask_bit;
163 mask_bank = (irq - (IRQ_CORETMR + 1)) / 32;
164 mask_bit = (irq - (IRQ_CORETMR + 1)) % 32;
165 bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) |
166 (1 << mask_bit));
167#endif
153 SSYNC(); 168 SSYNC();
154} 169}
155 170
@@ -206,7 +221,7 @@ static struct irq_chip bfin_generic_error_irqchip = {
206}; 221};
207 222
208static void bfin_demux_error_irq(unsigned int int_err_irq, 223static void bfin_demux_error_irq(unsigned int int_err_irq,
209 struct irq_desc *intb_desc) 224 struct irq_desc *intb_desc)
210{ 225{
211 int irq = 0; 226 int irq = 0;
212 227
@@ -270,8 +285,8 @@ static void bfin_demux_error_irq(unsigned int int_err_irq,
270 } 285 }
271 286
272 pr_debug("IRQ %d:" 287 pr_debug("IRQ %d:"
273 " MASKED PERIPHERAL ERROR INTERRUPT ASSERTED\n", 288 " MASKED PERIPHERAL ERROR INTERRUPT ASSERTED\n",
274 irq); 289 irq);
275 } 290 }
276 } else 291 } else
277 printk(KERN_ERR 292 printk(KERN_ERR
@@ -279,11 +294,10 @@ static void bfin_demux_error_irq(unsigned int int_err_irq,
279 " INTERRUPT ASSERTED BUT NO SOURCE FOUND\n", 294 " INTERRUPT ASSERTED BUT NO SOURCE FOUND\n",
280 __FUNCTION__, __FILE__, __LINE__); 295 __FUNCTION__, __FILE__, __LINE__);
281 296
282
283} 297}
284#endif /* BF537_GENERIC_ERROR_INT_DEMUX */ 298#endif /* BF537_GENERIC_ERROR_INT_DEMUX */
285 299
286#ifdef CONFIG_IRQCHIP_DEMUX_GPIO 300#if defined(CONFIG_IRQCHIP_DEMUX_GPIO) && !defined(CONFIG_BF54x)
287 301
288static unsigned short gpio_enabled[gpio_bank(MAX_BLACKFIN_GPIOS)]; 302static unsigned short gpio_enabled[gpio_bank(MAX_BLACKFIN_GPIOS)];
289static unsigned short gpio_edge_triggered[gpio_bank(MAX_BLACKFIN_GPIOS)]; 303static unsigned short gpio_edge_triggered[gpio_bank(MAX_BLACKFIN_GPIOS)];
@@ -361,8 +375,7 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
361 } 375 }
362 376
363 if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING | 377 if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING |
364 IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) 378 IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) {
365 {
366 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { 379 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
367 ret = gpio_request(gpionr, NULL); 380 ret = gpio_request(gpionr, NULL);
368 if (ret) 381 if (ret)
@@ -407,7 +420,6 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
407 return 0; 420 return 0;
408} 421}
409 422
410
411static struct irq_chip bfin_gpio_irqchip = { 423static struct irq_chip bfin_gpio_irqchip = {
412 .ack = bfin_gpio_ack_irq, 424 .ack = bfin_gpio_ack_irq,
413 .mask = bfin_gpio_mask_irq, 425 .mask = bfin_gpio_mask_irq,
@@ -419,20 +431,20 @@ static struct irq_chip bfin_gpio_irqchip = {
419}; 431};
420 432
421static void bfin_demux_gpio_irq(unsigned int intb_irq, 433static void bfin_demux_gpio_irq(unsigned int intb_irq,
422 struct irq_desc *intb_desc) 434 struct irq_desc *intb_desc)
423{ 435{
424 u16 i; 436 u16 i;
437 struct irq_desc *desc;
425 438
426 for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=16) { 439 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += 16) {
427 int irq = IRQ_PF0 + i; 440 int irq = IRQ_PF0 + i;
428 int flag_d = get_gpiop_data(i); 441 int flag_d = get_gpiop_data(i);
429 int mask = 442 int mask =
430 flag_d & (gpio_enabled[gpio_bank(i)] & 443 flag_d & (gpio_enabled[gpio_bank(i)] & get_gpiop_maska(i));
431 get_gpiop_maska(i));
432 444
433 while (mask) { 445 while (mask) {
434 if (mask & 1) { 446 if (mask & 1) {
435 struct irq_desc *desc = irq_desc + irq; 447 desc = irq_desc + irq;
436 desc->handle_irq(irq, desc); 448 desc->handle_irq(irq, desc);
437 } 449 }
438 irq++; 450 irq++;
@@ -441,6 +453,264 @@ static void bfin_demux_gpio_irq(unsigned int intb_irq,
441 } 453 }
442} 454}
443 455
456#else /* CONFIG_IRQCHIP_DEMUX_GPIO */
457
458#define NR_PINT_SYS_IRQS 4
459#define NR_PINT_BITS 32
460#define NR_PINTS 160
461#define IRQ_NOT_AVAIL 0xFF
462
463#define PINT_2_BANK(x) ((x) >> 5)
464#define PINT_2_BIT(x) ((x) & 0x1F)
465#define PINT_BIT(x) (1 << (PINT_2_BIT(x)))
466
467static unsigned char irq2pint_lut[NR_PINTS];
468static unsigned char pint2irq_lut[NR_PINT_SYS_IRQS * NR_PINT_BITS];
469
470struct pin_int_t {
471 unsigned int mask_set;
472 unsigned int mask_clear;
473 unsigned int request;
474 unsigned int assign;
475 unsigned int edge_set;
476 unsigned int edge_clear;
477 unsigned int invert_set;
478 unsigned int invert_clear;
479 unsigned int pinstate;
480 unsigned int latch;
481};
482
483static struct pin_int_t *pint[NR_PINT_SYS_IRQS] = {
484 (struct pin_int_t *)PINT0_MASK_SET,
485 (struct pin_int_t *)PINT1_MASK_SET,
486 (struct pin_int_t *)PINT2_MASK_SET,
487 (struct pin_int_t *)PINT3_MASK_SET,
488};
489
490unsigned short get_irq_base(u8 bank, u8 bmap)
491{
492
493 u16 irq_base;
494
495 if (bank < 2) { /*PA-PB */
496 irq_base = IRQ_PA0 + bmap * 16;
497 } else { /*PC-PJ */
498 irq_base = IRQ_PC0 + bmap * 16;
499 }
500
501 return irq_base;
502
503}
504
505 /* Whenever PINTx_ASSIGN is altered init_pint_lut() must be executed! */
506void init_pint_lut(void)
507{
508 u16 bank, bit, irq_base, bit_pos;
509 u32 pint_assign;
510 u8 bmap;
511
512 memset(irq2pint_lut, IRQ_NOT_AVAIL, sizeof(irq2pint_lut));
513
514 for (bank = 0; bank < NR_PINT_SYS_IRQS; bank++) {
515
516 pint_assign = pint[bank]->assign;
517
518 for (bit = 0; bit < NR_PINT_BITS; bit++) {
519
520 bmap = (pint_assign >> ((bit / 8) * 8)) & 0xFF;
521
522 irq_base = get_irq_base(bank, bmap);
523
524 irq_base += (bit % 8) + ((bit / 8) & 1 ? 8 : 0);
525 bit_pos = bit + bank * NR_PINT_BITS;
526
527 pint2irq_lut[bit_pos] = irq_base - SYS_IRQS;
528 irq2pint_lut[irq_base - SYS_IRQS] = bit_pos;
529
530 }
531
532 }
533
534}
535
536static unsigned short gpio_enabled[gpio_bank(MAX_BLACKFIN_GPIOS)];
537
538static void bfin_gpio_ack_irq(unsigned int irq)
539{
540 u8 pint_val = irq2pint_lut[irq - SYS_IRQS];
541
542 pint[PINT_2_BANK(pint_val)]->request = PINT_BIT(pint_val);
543 SSYNC();
544}
545
546static void bfin_gpio_mask_ack_irq(unsigned int irq)
547{
548 u8 pint_val = irq2pint_lut[irq - SYS_IRQS];
549 u32 pintbit = PINT_BIT(pint_val);
550 u8 bank = PINT_2_BANK(pint_val);
551
552 pint[bank]->request = pintbit;
553 pint[bank]->mask_clear = pintbit;
554 SSYNC();
555}
556
557static void bfin_gpio_mask_irq(unsigned int irq)
558{
559 u8 pint_val = irq2pint_lut[irq - SYS_IRQS];
560
561 pint[PINT_2_BANK(pint_val)]->mask_clear = PINT_BIT(pint_val);
562 SSYNC();
563}
564
565static void bfin_gpio_unmask_irq(unsigned int irq)
566{
567 u8 pint_val = irq2pint_lut[irq - SYS_IRQS];
568 u32 pintbit = PINT_BIT(pint_val);
569 u8 bank = PINT_2_BANK(pint_val);
570
571 pint[bank]->request = pintbit;
572 pint[bank]->mask_set = pintbit;
573 SSYNC();
574}
575
576static unsigned int bfin_gpio_irq_startup(unsigned int irq)
577{
578 unsigned int ret;
579 u16 gpionr = irq - IRQ_PA0;
580 u8 pint_val = irq2pint_lut[irq - SYS_IRQS];
581
582 if (pint_val == IRQ_NOT_AVAIL)
583 return -ENODEV;
584
585 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
586 ret = gpio_request(gpionr, NULL);
587 if (ret)
588 return ret;
589 }
590
591 gpio_enabled[gpio_bank(gpionr)] |= gpio_bit(gpionr);
592 bfin_gpio_unmask_irq(irq);
593
594 return ret;
595}
596
597static void bfin_gpio_irq_shutdown(unsigned int irq)
598{
599 bfin_gpio_mask_irq(irq);
600 gpio_free(irq - IRQ_PA0);
601 gpio_enabled[gpio_bank(irq - IRQ_PA0)] &= ~gpio_bit(irq - IRQ_PA0);
602}
603
604static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
605{
606
607 unsigned int ret;
608 u16 gpionr = irq - IRQ_PA0;
609 u8 pint_val = irq2pint_lut[irq - SYS_IRQS];
610 u32 pintbit = PINT_BIT(pint_val);
611 u8 bank = PINT_2_BANK(pint_val);
612
613 if (pint_val == IRQ_NOT_AVAIL)
614 return -ENODEV;
615
616 if (type == IRQ_TYPE_PROBE) {
617 /* only probe unenabled GPIO interrupt lines */
618 if (gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))
619 return 0;
620 type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING;
621 }
622
623 if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING |
624 IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) {
625 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
626 ret = gpio_request(gpionr, NULL);
627 if (ret)
628 return ret;
629 }
630
631 gpio_enabled[gpio_bank(gpionr)] |= gpio_bit(gpionr);
632 } else {
633 gpio_enabled[gpio_bank(gpionr)] &= ~gpio_bit(gpionr);
634 return 0;
635 }
636
637 gpio_direction_input(gpionr);
638
639 if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) {
640 pint[bank]->edge_set = pintbit;
641 } else {
642 pint[bank]->edge_clear = pintbit;
643 }
644
645 if ((type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_LEVEL_LOW)))
646 pint[bank]->invert_set = pintbit; /* low or falling edge denoted by one */
647 else
648 pint[bank]->invert_set = pintbit; /* high or rising edge denoted by zero */
649
650 if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING))
651 pint[bank]->invert_set = pintbit;
652 else
653 pint[bank]->invert_set = pintbit;
654
655 SSYNC();
656
657 if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING))
658 set_irq_handler(irq, handle_edge_irq);
659 else
660 set_irq_handler(irq, handle_level_irq);
661
662 return 0;
663}
664
665static struct irq_chip bfin_gpio_irqchip = {
666 .ack = bfin_gpio_ack_irq,
667 .mask = bfin_gpio_mask_irq,
668 .mask_ack = bfin_gpio_mask_ack_irq,
669 .unmask = bfin_gpio_unmask_irq,
670 .set_type = bfin_gpio_irq_type,
671 .startup = bfin_gpio_irq_startup,
672 .shutdown = bfin_gpio_irq_shutdown
673};
674
675static void bfin_demux_gpio_irq(unsigned int intb_irq,
676 struct irq_desc *intb_desc)
677{
678 u8 bank, pint_val;
679 u32 request, irq;
680 struct irq_desc *desc;
681
682 switch (intb_irq) {
683 case IRQ_PINT0:
684 bank = 0;
685 break;
686 case IRQ_PINT2:
687 bank = 2;
688 break;
689 case IRQ_PINT3:
690 bank = 3;
691 break;
692 case IRQ_PINT1:
693 bank = 1;
694 break;
695 default:
696 return;
697 }
698
699 pint_val = bank * NR_PINT_BITS;
700
701 request = pint[bank]->request;
702
703 while (request) {
704 if (request & 1) {
705 irq = pint2irq_lut[pint_val] + SYS_IRQS;
706 desc = irq_desc + irq;
707 desc->handle_irq(irq, desc);
708 }
709 pint_val++;
710 request >>= 1;
711 }
712
713}
444#endif /* CONFIG_IRQCHIP_DEMUX_GPIO */ 714#endif /* CONFIG_IRQCHIP_DEMUX_GPIO */
445 715
446/* 716/*
@@ -452,7 +722,18 @@ int __init init_arch_irq(void)
452 int irq; 722 int irq;
453 unsigned long ilat = 0; 723 unsigned long ilat = 0;
454 /* Disable all the peripheral intrs - page 4-29 HW Ref manual */ 724 /* Disable all the peripheral intrs - page 4-29 HW Ref manual */
725#ifdef CONFIG_BF54x
726 bfin_write_SIC_IMASK0(SIC_UNMASK_ALL);
727 bfin_write_SIC_IMASK1(SIC_UNMASK_ALL);
728 bfin_write_SIC_IMASK2(SIC_UNMASK_ALL);
729 bfin_write_SIC_IWR0(IWR_ENABLE_ALL);
730 bfin_write_SIC_IWR1(IWR_ENABLE_ALL);
731 bfin_write_SIC_IWR2(IWR_ENABLE_ALL);
732#else
455 bfin_write_SIC_IMASK(SIC_UNMASK_ALL); 733 bfin_write_SIC_IMASK(SIC_UNMASK_ALL);
734 bfin_write_SIC_IWR(IWR_ENABLE_ALL);
735#endif
736
456 SSYNC(); 737 SSYNC();
457 738
458 local_irq_disable(); 739 local_irq_disable();
@@ -475,7 +756,18 @@ int __init init_arch_irq(void)
475 bfin_write_EVT15(evt_system_call); 756 bfin_write_EVT15(evt_system_call);
476 CSYNC(); 757 CSYNC();
477 758
478 for (irq = 0; irq < SYS_IRQS; irq++) { 759#if defined(CONFIG_IRQCHIP_DEMUX_GPIO) && defined(CONFIG_BF54x)
760#ifdef CONFIG_PINTx_REASSIGN
761 pint[0]->assign = CONFIG_PINT0_ASSIGN;
762 pint[1]->assign = CONFIG_PINT1_ASSIGN;
763 pint[2]->assign = CONFIG_PINT2_ASSIGN;
764 pint[3]->assign = CONFIG_PINT3_ASSIGN;
765#endif
766 /* Whenever PINTx_ASSIGN is altered init_pint_lut() must be executed! */
767 init_pint_lut();
768#endif
769
770 for (irq = 0; irq <= SYS_IRQS; irq++) {
479 if (irq <= IRQ_CORETMR) 771 if (irq <= IRQ_CORETMR)
480 set_irq_chip(irq, &bfin_core_irqchip); 772 set_irq_chip(irq, &bfin_core_irqchip);
481 else 773 else
@@ -484,20 +776,42 @@ int __init init_arch_irq(void)
484 if (irq != IRQ_GENERIC_ERROR) { 776 if (irq != IRQ_GENERIC_ERROR) {
485#endif 777#endif
486 778
779 switch (irq) {
487#ifdef CONFIG_IRQCHIP_DEMUX_GPIO 780#ifdef CONFIG_IRQCHIP_DEMUX_GPIO
488 if ((irq != IRQ_PROG_INTA) /*PORT F & G MASK_A Interrupt*/ 781#ifndef CONFIG_BF54x
489# if defined(BF537_FAMILY) && !(defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)) 782 case IRQ_PROG_INTA:
490 && (irq != IRQ_MAC_RX) /*PORT H MASK_A Interrupt*/ 783 set_irq_chained_handler(irq,
491# endif 784 bfin_demux_gpio_irq);
492 ) { 785 break;
786#if defined(BF537_FAMILY) && !(defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE))
787 case IRQ_MAC_RX:
788 set_irq_chained_handler(irq,
789 bfin_demux_gpio_irq);
790 break;
493#endif 791#endif
494 set_irq_handler(irq, handle_simple_irq); 792#else
495#ifdef CONFIG_IRQCHIP_DEMUX_GPIO 793 case IRQ_PINT0:
496 } else {
497 set_irq_chained_handler(irq, 794 set_irq_chained_handler(irq,
498 bfin_demux_gpio_irq); 795 bfin_demux_gpio_irq);
499 } 796 break;
797 case IRQ_PINT1:
798 set_irq_chained_handler(irq,
799 bfin_demux_gpio_irq);
800 break;
801 case IRQ_PINT2:
802 set_irq_chained_handler(irq,
803 bfin_demux_gpio_irq);
804 break;
805 case IRQ_PINT3:
806 set_irq_chained_handler(irq,
807 bfin_demux_gpio_irq);
808 break;
809#endif /*CONFIG_BF54x */
500#endif 810#endif
811 default:
812 set_irq_handler(irq, handle_simple_irq);
813 break;
814 }
501 815
502#ifdef BF537_GENERIC_ERROR_INT_DEMUX 816#ifdef BF537_GENERIC_ERROR_INT_DEMUX
503 } else { 817 } else {
@@ -513,7 +827,11 @@ int __init init_arch_irq(void)
513#endif 827#endif
514 828
515#ifdef CONFIG_IRQCHIP_DEMUX_GPIO 829#ifdef CONFIG_IRQCHIP_DEMUX_GPIO
830#ifndef CONFIG_BF54x
516 for (irq = IRQ_PF0; irq < NR_IRQS; irq++) { 831 for (irq = IRQ_PF0; irq < NR_IRQS; irq++) {
832#else
833 for (irq = IRQ_PA0; irq < NR_IRQS; irq++) {
834#endif
517 set_irq_chip(irq, &bfin_gpio_irqchip); 835 set_irq_chip(irq, &bfin_gpio_irqchip);
518 /* if configured as edge, then will be changed to do_edge_IRQ */ 836 /* if configured as edge, then will be changed to do_edge_IRQ */
519 set_irq_handler(irq, handle_level_irq); 837 set_irq_handler(irq, handle_level_irq);
@@ -526,8 +844,7 @@ int __init init_arch_irq(void)
526 bfin_write_ILAT(ilat); 844 bfin_write_ILAT(ilat);
527 CSYNC(); 845 CSYNC();
528 846
529 printk(KERN_INFO 847 printk(KERN_INFO "Configuring Blackfin Priority Driven Interrupts\n");
530 "Configuring Blackfin Priority Driven Interrupts\n");
531 /* IMASK=xxx is equivalent to STI xx or irq_flags=xx, 848 /* IMASK=xxx is equivalent to STI xx or irq_flags=xx,
532 * local_irq_enable() 849 * local_irq_enable()
533 */ 850 */
@@ -538,14 +855,13 @@ int __init init_arch_irq(void)
538 /* Enable interrupts IVG7-15 */ 855 /* Enable interrupts IVG7-15 */
539 irq_flags = irq_flags | IMASK_IVG15 | 856 irq_flags = irq_flags | IMASK_IVG15 |
540 IMASK_IVG14 | IMASK_IVG13 | IMASK_IVG12 | IMASK_IVG11 | 857 IMASK_IVG14 | IMASK_IVG13 | IMASK_IVG12 | IMASK_IVG11 |
541 IMASK_IVG10 | IMASK_IVG9 | IMASK_IVG8 | IMASK_IVG7 | 858 IMASK_IVG10 | IMASK_IVG9 | IMASK_IVG8 | IMASK_IVG7 | IMASK_IVGHW;
542 IMASK_IVGHW;
543 859
544 return 0; 860 return 0;
545} 861}
546 862
547#ifdef CONFIG_DO_IRQ_L1 863#ifdef CONFIG_DO_IRQ_L1
548void do_irq(int vec, struct pt_regs *fp)__attribute__((l1_text)); 864void do_irq(int vec, struct pt_regs *fp) __attribute__((l1_text));
549#endif 865#endif
550 866
551void do_irq(int vec, struct pt_regs *fp) 867void do_irq(int vec, struct pt_regs *fp)
@@ -555,9 +871,25 @@ void do_irq(int vec, struct pt_regs *fp)
555 } else { 871 } else {
556 struct ivgx *ivg = ivg7_13[vec - IVG7].ifirst; 872 struct ivgx *ivg = ivg7_13[vec - IVG7].ifirst;
557 struct ivgx *ivg_stop = ivg7_13[vec - IVG7].istop; 873 struct ivgx *ivg_stop = ivg7_13[vec - IVG7].istop;
558 unsigned long sic_status; 874#ifdef CONFIG_BF54x
875 unsigned long sic_status[3];
559 876
560 SSYNC(); 877 SSYNC();
878 sic_status[0] = bfin_read_SIC_ISR(0) & bfin_read_SIC_IMASK(0);
879 sic_status[1] = bfin_read_SIC_ISR(1) & bfin_read_SIC_IMASK(1);
880 sic_status[2] = bfin_read_SIC_ISR(2) & bfin_read_SIC_IMASK(2);
881
882 for (;; ivg++) {
883 if (ivg >= ivg_stop) {
884 atomic_inc(&num_spurious);
885 return;
886 }
887 if (sic_status[(ivg->irqno - IVG7) / 32] & ivg->isrflag)
888 break;
889 }
890#else
891 unsigned long sic_status;
892 SSYNC();
561 sic_status = bfin_read_SIC_IMASK() & bfin_read_SIC_ISR(); 893 sic_status = bfin_read_SIC_IMASK() & bfin_read_SIC_ISR();
562 894
563 for (;; ivg++) { 895 for (;; ivg++) {
@@ -567,6 +899,7 @@ void do_irq(int vec, struct pt_regs *fp)
567 } else if (sic_status & ivg->isrflag) 899 } else if (sic_status & ivg->isrflag)
568 break; 900 break;
569 } 901 }
902#endif
570 vec = ivg->irqno; 903 vec = ivg->irqno;
571 } 904 }
572 asm_do_IRQ(vec, fp); 905 asm_do_IRQ(vec, fp);
diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c
index 150ef5d088..1772d8d2c1 100644
--- a/arch/blackfin/mach-common/pm.c
+++ b/arch/blackfin/mach-common/pm.c
@@ -35,10 +35,10 @@
35#include <linux/pm.h> 35#include <linux/pm.h>
36#include <linux/sched.h> 36#include <linux/sched.h>
37#include <linux/proc_fs.h> 37#include <linux/proc_fs.h>
38#include <linux/io.h>
39#include <linux/irq.h>
38 40
39#include <asm/io.h>
40#include <asm/dpmc.h> 41#include <asm/dpmc.h>
41#include <asm/irq.h>
42#include <asm/gpio.h> 42#include <asm/gpio.h>
43 43
44#ifdef CONFIG_PM_WAKEUP_GPIO_POLAR_H 44#ifdef CONFIG_PM_WAKEUP_GPIO_POLAR_H
diff --git a/arch/blackfin/mm/blackfin_sram.c b/arch/blackfin/mm/blackfin_sram.c
index 6810792463..16c6169ed0 100644
--- a/arch/blackfin/mm/blackfin_sram.c
+++ b/arch/blackfin/mm/blackfin_sram.c
@@ -87,7 +87,7 @@ void __init l1sram_init(void)
87 L1_SCRATCH_LENGTH >> 10); 87 L1_SCRATCH_LENGTH >> 10);
88 88
89 memset(&l1_ssram, 0x00, sizeof(l1_ssram)); 89 memset(&l1_ssram, 0x00, sizeof(l1_ssram));
90 l1_ssram[0].paddr = (void*)L1_SCRATCH_START; 90 l1_ssram[0].paddr = (void *)L1_SCRATCH_START;
91 l1_ssram[0].size = L1_SCRATCH_LENGTH; 91 l1_ssram[0].size = L1_SCRATCH_LENGTH;
92 l1_ssram[0].flag = SRAM_SLT_FREE; 92 l1_ssram[0].flag = SRAM_SLT_FREE;
93 93
@@ -126,7 +126,7 @@ void __init l1_inst_sram_init(void)
126{ 126{
127#if L1_CODE_LENGTH != 0 127#if L1_CODE_LENGTH != 0
128 memset(&l1_inst_sram, 0x00, sizeof(l1_inst_sram)); 128 memset(&l1_inst_sram, 0x00, sizeof(l1_inst_sram));
129 l1_inst_sram[0].paddr = (void*)L1_CODE_START + (_etext_l1 - _stext_l1); 129 l1_inst_sram[0].paddr = (void *)L1_CODE_START + (_etext_l1 - _stext_l1);
130 l1_inst_sram[0].size = L1_CODE_LENGTH - (_etext_l1 - _stext_l1); 130 l1_inst_sram[0].size = L1_CODE_LENGTH - (_etext_l1 - _stext_l1);
131 l1_inst_sram[0].flag = SRAM_SLT_FREE; 131 l1_inst_sram[0].flag = SRAM_SLT_FREE;
132 132
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c
index 570356dbe0..68459cc052 100644
--- a/arch/blackfin/mm/init.c
+++ b/arch/blackfin/mm/init.c
@@ -29,8 +29,8 @@
29 29
30#include <linux/swap.h> 30#include <linux/swap.h>
31#include <linux/bootmem.h> 31#include <linux/bootmem.h>
32#include <linux/uaccess.h>
32#include <asm/bfin-global.h> 33#include <asm/bfin-global.h>
33#include <asm/uaccess.h>
34#include <asm/l1layout.h> 34#include <asm/l1layout.h>
35#include "blackfin_sram.h" 35#include "blackfin_sram.h"
36 36
@@ -168,42 +168,31 @@ void __init mem_init(void)
168 } 168 }
169} 169}
170 170
171#ifdef CONFIG_BLK_DEV_INITRD 171static __init void free_init_pages(const char *what, unsigned long begin, unsigned long end)
172void __init free_initrd_mem(unsigned long start, unsigned long end)
173{ 172{
174 int pages = 0; 173 unsigned long addr;
175 for (; start < end; start += PAGE_SIZE) { 174 /* next to check that the page we free is not a partial page */
176 ClearPageReserved(virt_to_page(start)); 175 for (addr = begin; addr + PAGE_SIZE <= end; addr += PAGE_SIZE) {
177 init_page_count(virt_to_page(start)); 176 ClearPageReserved(virt_to_page(addr));
178 free_page(start); 177 init_page_count(virt_to_page(addr));
178 free_page(addr);
179 totalram_pages++; 179 totalram_pages++;
180 pages++;
181 } 180 }
182 printk(KERN_NOTICE "Freeing initrd memory: %dk freed\n", pages); 181 printk(KERN_INFO "Freeing %s: %ldk freed\n", what, (end - begin) >> 10);
182}
183
184#ifdef CONFIG_BLK_DEV_INITRD
185void __init free_initrd_mem(unsigned long start, unsigned long end)
186{
187 free_init_pages("initrd memory", start, end);
183} 188}
184#endif 189#endif
185 190
186void __init free_initmem(void) 191void __init free_initmem(void)
187{ 192{
188#ifdef CONFIG_RAMKERNEL 193#ifdef CONFIG_RAMKERNEL
189 unsigned long addr; 194 free_init_pages("unused kernel memory",
190 /* 195 (unsigned long)(&__init_begin),
191 * the following code should be cool even if these sections 196 (unsigned long)(&__init_end));
192 * are not page aligned.
193 */
194 addr = PAGE_ALIGN((unsigned long)(__init_begin));
195 /* next to check that the page we free is not a partial page */
196 for (; addr + PAGE_SIZE < (unsigned long)(__init_end);
197 addr += PAGE_SIZE) {
198 ClearPageReserved(virt_to_page(addr));
199 init_page_count(virt_to_page(addr));
200 free_page(addr);
201 totalram_pages++;
202 }
203 printk(KERN_NOTICE
204 "Freeing unused kernel memory: %ldk freed (0x%x - 0x%x)\n",
205 (addr - PAGE_ALIGN((long)__init_begin)) >> 10,
206 (int)(PAGE_ALIGN((unsigned long)(__init_begin))),
207 (int)(addr - PAGE_SIZE));
208#endif 197#endif
209} 198}
diff --git a/arch/blackfin/oprofile/common.c b/arch/blackfin/oprofile/common.c
index 009a1700c8..cb8b8d5af3 100644
--- a/arch/blackfin/oprofile/common.c
+++ b/arch/blackfin/oprofile/common.c
@@ -33,12 +33,12 @@
33#include <linux/smp.h> 33#include <linux/smp.h>
34#include <linux/errno.h> 34#include <linux/errno.h>
35#include <linux/mutex.h> 35#include <linux/mutex.h>
36#include <linux/ptrace.h>
37#include <linux/irq.h>
38#include <linux/io.h>
36 39
37#include <asm/ptrace.h>
38#include <asm/system.h> 40#include <asm/system.h>
39#include <asm/blackfin.h> 41#include <asm/blackfin.h>
40#include <asm/irq.h>
41#include <asm/io.h>
42 42
43#include "op_blackfin.h" 43#include "op_blackfin.h"
44 44
diff --git a/arch/blackfin/oprofile/op_model_bf533.c b/arch/blackfin/oprofile/op_model_bf533.c
index b7a20a006b..872dffe336 100644
--- a/arch/blackfin/oprofile/op_model_bf533.c
+++ b/arch/blackfin/oprofile/op_model_bf533.c
@@ -32,12 +32,12 @@
32#include <linux/init.h> 32#include <linux/init.h>
33#include <linux/smp.h> 33#include <linux/smp.h>
34#include <linux/interrupt.h> 34#include <linux/interrupt.h>
35#include <asm/ptrace.h> 35#include <linux/ptrace.h>
36#include <linux/irq.h>
37#include <linux/io.h>
36#include <asm/system.h> 38#include <asm/system.h>
37#include <asm/processor.h> 39#include <asm/processor.h>
38#include <asm/blackfin.h> 40#include <asm/blackfin.h>
39#include <asm/irq.h>
40#include <asm/io.h>
41 41
42#include "op_blackfin.h" 42#include "op_blackfin.h"
43 43
diff --git a/arch/blackfin/oprofile/timer_int.c b/arch/blackfin/oprofile/timer_int.c
index 8fba16c846..6c6f8606af 100644
--- a/arch/blackfin/oprofile/timer_int.c
+++ b/arch/blackfin/oprofile/timer_int.c
@@ -31,8 +31,7 @@
31#include <linux/smp.h> 31#include <linux/smp.h>
32#include <linux/irq.h> 32#include <linux/irq.h>
33#include <linux/oprofile.h> 33#include <linux/oprofile.h>
34 34#include <linux/ptrace.h>
35#include <asm/ptrace.h>
36 35
37static void enable_sys_timer0() 36static void enable_sys_timer0()
38{ 37{
diff --git a/arch/cris/arch-v10/defconfig b/arch/cris/arch-v10/defconfig
index 2a3411eaac..710c20ba2b 100644
--- a/arch/cris/arch-v10/defconfig
+++ b/arch/cris/arch-v10/defconfig
@@ -429,7 +429,6 @@ CONFIG_NET_ETHERNET=y
429# CONFIG_BFS_FS is not set 429# CONFIG_BFS_FS is not set
430# CONFIG_FAT_FS is not set 430# CONFIG_FAT_FS is not set
431# CONFIG_MSDOS_FS is not set 431# CONFIG_MSDOS_FS is not set
432# CONFIG_UMSDOS_FS is not set
433# CONFIG_VFAT_FS is not set 432# CONFIG_VFAT_FS is not set
434# CONFIG_EFS_FS is not set 433# CONFIG_EFS_FS is not set
435# CONFIG_JFFS_FS is not set 434# CONFIG_JFFS_FS is not set
diff --git a/arch/cris/arch-v10/kernel/ptrace.c b/arch/cris/arch-v10/kernel/ptrace.c
index fd2129a045..f4f9db698b 100644
--- a/arch/cris/arch-v10/kernel/ptrace.c
+++ b/arch/cris/arch-v10/kernel/ptrace.c
@@ -83,19 +83,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
83 switch (request) { 83 switch (request) {
84 /* Read word at location address. */ 84 /* Read word at location address. */
85 case PTRACE_PEEKTEXT: 85 case PTRACE_PEEKTEXT:
86 case PTRACE_PEEKDATA: { 86 case PTRACE_PEEKDATA:
87 unsigned long tmp; 87 ret = generic_ptrace_peekdata(child, addr, data);
88 int copied;
89
90 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
91 ret = -EIO;
92
93 if (copied != sizeof(tmp))
94 break;
95
96 ret = put_user(tmp,datap);
97 break; 88 break;
98 }
99 89
100 /* Read the word at location address in the USER area. */ 90 /* Read the word at location address in the USER area. */
101 case PTRACE_PEEKUSR: { 91 case PTRACE_PEEKUSR: {
@@ -113,12 +103,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
113 /* Write the word at location address. */ 103 /* Write the word at location address. */
114 case PTRACE_POKETEXT: 104 case PTRACE_POKETEXT:
115 case PTRACE_POKEDATA: 105 case PTRACE_POKEDATA:
116 ret = 0; 106 ret = generic_ptrace_pokedata(child, addr, data);
117
118 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
119 break;
120
121 ret = -EIO;
122 break; 107 break;
123 108
124 /* Write the word at location address in the USER area. */ 109 /* Write the word at location address in the USER area. */
diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
index 1a071f1744..e8914d4016 100644
--- a/arch/cris/arch-v32/drivers/cryptocop.c
+++ b/arch/cris/arch-v32/drivers/cryptocop.c
@@ -267,10 +267,10 @@ static void print_user_dma_lists(struct cryptocop_dma_list_operation *dma_op);
267 267
268 268
269const struct 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,
273 ioctl: cryptocop_ioctl 273 .ioctl = cryptocop_ioctl
274}; 274};
275 275
276 276
diff --git a/arch/cris/arch-v32/drivers/i2c.c b/arch/cris/arch-v32/drivers/i2c.c
index 5d6c52737d..e12f6cc6f4 100644
--- a/arch/cris/arch-v32/drivers/i2c.c
+++ b/arch/cris/arch-v32/drivers/i2c.c
@@ -574,10 +574,10 @@ i2c_ioctl(struct inode *inode, struct file *file,
574} 574}
575 575
576static const 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,
580 release: i2c_release, 580 .release = i2c_release,
581}; 581};
582 582
583int __init 583int __init
diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c
index 24b919b382..fa8d50007e 100644
--- a/arch/cris/arch-v32/drivers/pcf8563.c
+++ b/arch/cris/arch-v32/drivers/pcf8563.c
@@ -51,10 +51,10 @@ int pcf8563_open(struct inode *, struct file *);
51int pcf8563_release(struct inode *, struct file *); 51int pcf8563_release(struct inode *, struct file *);
52 52
53static const 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,
57 release: pcf8563_release, 57 .release = pcf8563_release,
58}; 58};
59 59
60unsigned char 60unsigned char
diff --git a/arch/cris/arch-v32/kernel/ptrace.c b/arch/cris/arch-v32/kernel/ptrace.c
index d4d57b7413..38ece0cd47 100644
--- a/arch/cris/arch-v32/kernel/ptrace.c
+++ b/arch/cris/arch-v32/kernel/ptrace.c
@@ -146,12 +146,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
146 /* Write the word at location address. */ 146 /* Write the word at location address. */
147 case PTRACE_POKETEXT: 147 case PTRACE_POKETEXT:
148 case PTRACE_POKEDATA: 148 case PTRACE_POKEDATA:
149 ret = 0; 149 ret = generic_ptrace_pokedata(child, addr, data);
150
151 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
152 break;
153
154 ret = -EIO;
155 break; 150 break;
156 151
157 /* Write the word at location address in the USER area. */ 152 /* Write the word at location address in the USER area. */
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S
index 43dc08ec75..275673c192 100644
--- a/arch/frv/kernel/entry.S
+++ b/arch/frv/kernel/entry.S
@@ -1492,6 +1492,10 @@ sys_call_table:
1492 .long sys_move_pages 1492 .long sys_move_pages
1493 .long sys_getcpu 1493 .long sys_getcpu
1494 .long sys_epoll_pwait 1494 .long sys_epoll_pwait
1495 .long sys_utimensat /* 320 */
1496 .long sys_signalfd
1497 .long sys_timerfd
1498 .long sys_eventfd
1495 1499
1496 1500
1497syscall_table_size = (. - sys_call_table) 1501syscall_table_size = (. - sys_call_table)
diff --git a/arch/frv/kernel/gdb-stub.c b/arch/frv/kernel/gdb-stub.c
index 1e7a101cbf..e89cad1192 100644
--- a/arch/frv/kernel/gdb-stub.c
+++ b/arch/frv/kernel/gdb-stub.c
@@ -647,17 +647,11 @@ void debug_to_serial(const char *p, int n)
647} 647}
648#endif 648#endif
649 649
650#ifdef CONFIG_GDBSTUB_CONSOLE 650#ifdef CONFIG_GDB_CONSOLE
651
652static kdev_t gdbstub_console_dev(struct console *con)
653{
654 return MKDEV(1,3); /* /dev/null */
655}
656 651
657static struct console gdbstub_console = { 652static struct console gdbstub_console = {
658 .name = "gdb", 653 .name = "gdb",
659 .write = gdbstub_console_write, /* in break.S */ 654 .write = gdbstub_console_write, /* in break.S */
660 .device = gdbstub_console_dev,
661 .flags = CON_PRINTBUFFER, 655 .flags = CON_PRINTBUFFER,
662 .index = -1, 656 .index = -1,
663}; 657};
@@ -2021,7 +2015,7 @@ void __init gdbstub_init(void)
2021 ptr = mem2hex(gdbstub_banner, ptr, sizeof(gdbstub_banner) - 1, 0); 2015 ptr = mem2hex(gdbstub_banner, ptr, sizeof(gdbstub_banner) - 1, 0);
2022 gdbstub_send_packet(output_buffer); 2016 gdbstub_send_packet(output_buffer);
2023#endif 2017#endif
2024#if defined(CONFIG_GDBSTUB_CONSOLE) && defined(CONFIG_GDBSTUB_IMMEDIATE) 2018#if defined(CONFIG_GDB_CONSOLE) && defined(CONFIG_GDBSTUB_IMMEDIATE)
2025 register_console(&gdbstub_console); 2019 register_console(&gdbstub_console);
2026#endif 2020#endif
2027 2021
@@ -2031,7 +2025,7 @@ void __init gdbstub_init(void)
2031/* 2025/*
2032 * register the console at a more appropriate time 2026 * register the console at a more appropriate time
2033 */ 2027 */
2034#if defined (CONFIG_GDBSTUB_CONSOLE) && !defined(CONFIG_GDBSTUB_IMMEDIATE) 2028#if defined (CONFIG_GDB_CONSOLE) && !defined(CONFIG_GDBSTUB_IMMEDIATE)
2035static int __init gdbstub_postinit(void) 2029static int __init gdbstub_postinit(void)
2036{ 2030{
2037 printk("registering console\n"); 2031 printk("registering console\n");
diff --git a/arch/frv/kernel/ptrace.c b/arch/frv/kernel/ptrace.c
index ce88fb95ee..709e9bdc61 100644
--- a/arch/frv/kernel/ptrace.c
+++ b/arch/frv/kernel/ptrace.c
@@ -112,20 +112,12 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
112 switch (request) { 112 switch (request) {
113 /* when I and D space are separate, these will need to be fixed. */ 113 /* when I and D space are separate, these will need to be fixed. */
114 case PTRACE_PEEKTEXT: /* read word at location addr. */ 114 case PTRACE_PEEKTEXT: /* read word at location addr. */
115 case PTRACE_PEEKDATA: { 115 case PTRACE_PEEKDATA:
116 int copied;
117
118 ret = -EIO; 116 ret = -EIO;
119 if (is_user_addr_valid(child, addr, sizeof(tmp)) < 0) 117 if (is_user_addr_valid(child, addr, sizeof(tmp)) < 0)
120 break; 118 break;
121 119 ret = generic_ptrace_peekdata(child, addr, data);
122 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
123 if (copied != sizeof(tmp))
124 break;
125
126 ret = put_user(tmp,(unsigned long *) data);
127 break; 120 break;
128 }
129 121
130 /* read the word at location addr in the USER area. */ 122 /* read the word at location addr in the USER area. */
131 case PTRACE_PEEKUSR: { 123 case PTRACE_PEEKUSR: {
@@ -176,9 +168,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
176 ret = -EIO; 168 ret = -EIO;
177 if (is_user_addr_valid(child, addr, sizeof(tmp)) < 0) 169 if (is_user_addr_valid(child, addr, sizeof(tmp)) < 0)
178 break; 170 break;
179 if (access_process_vm(child, addr, &data, sizeof(data), 1) != sizeof(data)) 171 ret = generic_ptrace_pokedata(child, addr, data);
180 break;
181 ret = 0;
182 break; 172 break;
183 173
184 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ 174 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c
index aa3c795d53..a74c08786b 100644
--- a/arch/frv/kernel/setup.c
+++ b/arch/frv/kernel/setup.c
@@ -29,6 +29,7 @@
29#include <linux/serial.h> 29#include <linux/serial.h>
30#include <linux/serial_core.h> 30#include <linux/serial_core.h>
31#include <linux/serial_reg.h> 31#include <linux/serial_reg.h>
32#include <linux/serial_8250.h>
32 33
33#include <asm/setup.h> 34#include <asm/setup.h>
34#include <asm/irq.h> 35#include <asm/irq.h>
@@ -60,10 +61,6 @@ static void __init setup_linux_memory(void);
60static void __init setup_uclinux_memory(void); 61static void __init setup_uclinux_memory(void);
61#endif 62#endif
62 63
63#ifdef CONFIG_CONSOLE
64extern struct consw *conswitchp;
65#endif
66
67#ifdef CONFIG_MB93090_MB00 64#ifdef CONFIG_MB93090_MB00
68static char __initdata mb93090_banner[] = "FJ/RH FR-V Linux"; 65static char __initdata mb93090_banner[] = "FJ/RH FR-V Linux";
69static char __initdata mb93090_version[] = UTS_RELEASE; 66static char __initdata mb93090_version[] = UTS_RELEASE;
@@ -795,13 +792,6 @@ void __init setup_arch(char **cmdline_p)
795#endif 792#endif
796#endif 793#endif
797 794
798#if defined(CONFIG_CHR_DEV_FLASH) || defined(CONFIG_BLK_DEV_FLASH)
799 /* we need to initialize the Flashrom device here since we might
800 * do things with flash early on in the boot
801 */
802 flash_probe();
803#endif
804
805 /* deal with the command line - RedBoot may have passed one to the kernel */ 795 /* deal with the command line - RedBoot may have passed one to the kernel */
806 memcpy(command_line, boot_command_line, sizeof(command_line)); 796 memcpy(command_line, boot_command_line, sizeof(command_line));
807 *cmdline_p = &command_line[0]; 797 *cmdline_p = &command_line[0];
@@ -837,11 +827,6 @@ void __init setup_arch(char **cmdline_p)
837#endif 827#endif
838#endif 828#endif
839 829
840#ifdef CONFIG_BLK_DEV_BLKMEM
841 ROOT_DEV = MKDEV(BLKMEM_MAJOR,0);
842#endif
843 /*rom_length = (unsigned long)&_flashend - (unsigned long)&_romvec;*/
844
845#ifdef CONFIG_MMU 830#ifdef CONFIG_MMU
846 setup_linux_memory(); 831 setup_linux_memory();
847#else 832#else
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 618dbad696..e35f74e6e5 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -68,6 +68,9 @@ config TIME_LOW_RES
68config NO_IOPORT 68config NO_IOPORT
69 def_bool y 69 def_bool y
70 70
71config NO_DMA
72 def_bool y
73
71config ISA 74config ISA
72 bool 75 bool
73 default y 76 default y
diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile
index b2d896a7e5..53b5c1edf5 100644
--- a/arch/h8300/Makefile
+++ b/arch/h8300/Makefile
@@ -61,10 +61,11 @@ archmrproper:
61archclean: 61archclean:
62 $(Q)$(MAKE) $(clean)=$(boot) 62 $(Q)$(MAKE) $(clean)=$(boot)
63 63
64vmlinux.srec vmlinux.bin: vmlinux 64vmlinux.srec vmlinux.bin zImage: vmlinux
65 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ 65 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
66 66
67define archhelp 67define archhelp
68 echo 'vmlinux.bin - Create raw binary' 68 @echo 'vmlinux.bin - Create raw binary'
69 echo 'vmlinux.srec - Create srec binary' 69 @echo 'vmlinux.srec - Create srec binary'
70 @echo 'zImage - Compressed kernel image'
70endef 71endef
diff --git a/arch/h8300/boot/compressed/Makefile b/arch/h8300/boot/compressed/Makefile
index 71aac82a8a..d6189e057e 100644
--- a/arch/h8300/boot/compressed/Makefile
+++ b/arch/h8300/boot/compressed/Makefile
@@ -15,10 +15,10 @@ OBJECTS = $(obj)/head.o $(obj)/misc.o
15# in order to suppress error message. 15# in order to suppress error message.
16# 16#
17CONFIG_MEMORY_START ?= 0x00400000 17CONFIG_MEMORY_START ?= 0x00400000
18CONFIG_BOOT_LINK_OFFSET ?= 0x00400000 18CONFIG_BOOT_LINK_OFFSET ?= 0x00140000
19IMAGE_OFFSET := $(shell printf "0x%08x" $$[$(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET)]) 19IMAGE_OFFSET := $(shell printf "0x%08x" $$[$(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET)])
20 20
21LDFLAGS_vmlinux := -T $(obj)/vmlinux.lds 21LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -estartup $(obj)/vmlinux.lds
22 22
23$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE 23$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
24 $(call if_changed,ld) 24 $(call if_changed,ld)
diff --git a/arch/h8300/boot/compressed/head.S b/arch/h8300/boot/compressed/head.S
index b8e90d12d1..985a81a243 100644
--- a/arch/h8300/boot/compressed/head.S
+++ b/arch/h8300/boot/compressed/head.S
@@ -4,7 +4,7 @@
4 * Copyright (C) 2006 Yoshinori Sato 4 * Copyright (C) 2006 Yoshinori Sato
5 */ 5 */
6 6
7.h8300h 7 .h8300h
8#include <linux/linkage.h> 8#include <linux/linkage.h>
9 9
10#define SRAM_START 0xff4000 10#define SRAM_START 0xff4000
diff --git a/arch/h8300/boot/compressed/vmlinux.lds b/arch/h8300/boot/compressed/vmlinux.lds
new file mode 100644
index 0000000000..65e2a0d1ae
--- /dev/null
+++ b/arch/h8300/boot/compressed/vmlinux.lds
@@ -0,0 +1,32 @@
1SECTIONS
2{
3 .text :
4 {
5 __stext = . ;
6 __text = .;
7 *(.text.startup)
8 *(.text)
9 __etext = . ;
10 }
11
12 .rodata :
13 {
14 *(.rodata)
15 }
16 .data :
17
18 {
19 __sdata = . ;
20 ___data_start = . ;
21 *(.data.*)
22 }
23 .bss :
24 {
25 . = ALIGN(0x4) ;
26 __sbss = . ;
27 *(.bss*)
28 . = ALIGN(0x4) ;
29 __ebss = . ;
30 __end = . ;
31 }
32}
diff --git a/arch/h8300/boot/compressed/vmlinux.scr b/arch/h8300/boot/compressed/vmlinux.scr
new file mode 100644
index 0000000000..a0f6962736
--- /dev/null
+++ b/arch/h8300/boot/compressed/vmlinux.scr
@@ -0,0 +1,9 @@
1SECTIONS
2{
3 .data : {
4 _input_len = .;
5 LONG(_input_data_end - _input_data) _input_data = .;
6 *(.data)
7 _input_data_end = .;
8 }
9}
diff --git a/arch/h8300/kernel/Makefile b/arch/h8300/kernel/Makefile
index ccc1a7fbf9..874f6aefee 100644
--- a/arch/h8300/kernel/Makefile
+++ b/arch/h8300/kernel/Makefile
@@ -6,6 +6,7 @@ extra-y := vmlinux.lds
6 6
7obj-y := process.o traps.o ptrace.o irq.o \ 7obj-y := process.o traps.o ptrace.o irq.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 \
10 entry.o
10 11
11obj-$(CONFIG_MODULES) += module.o h8300_ksyms.o 12obj-$(CONFIG_MODULES) += module.o h8300_ksyms.o
diff --git a/arch/h8300/platform/h8s/entry.S b/arch/h8300/kernel/entry.S
index f3d6b8e8f9..ca74316903 100644
--- a/arch/h8300/platform/h8s/entry.S
+++ b/arch/h8300/kernel/entry.S
@@ -1,11 +1,10 @@
1/* -*- mode: asm -*- 1/* -*- mode: asm -*-
2 * 2 *
3 * linux/arch/h8300/platform/h8s/entry.S 3 * linux/arch/h8300/platform/h8300h/entry.S
4 * 4 *
5 * Yoshinori Sato <ysato@users.sourceforge.jp> 5 * Yoshinori Sato <ysato@users.sourceforge.jp>
6 * David McCullough <davidm@snapgear.com>
6 * 7 *
7 * fairly heavy changes to fix syscall args and signal processing
8 * by David McCullough <davidm@snapgear.com>
9 */ 8 */
10 9
11/* 10/*
@@ -23,13 +22,66 @@
23#include <asm/thread_info.h> 22#include <asm/thread_info.h>
24#include <asm/errno.h> 23#include <asm/errno.h>
25 24
25#if defined(CONFIG_CPU_H8300H)
26#define USERRET 8
27INTERRUPTS = 64
28 .h8300h
29 .macro SHLL2 reg
30 shll.l \reg
31 shll.l \reg
32 .endm
33 .macro SHLR2 reg
34 shlr.l \reg
35 shlr.l \reg
36 .endm
37 .macro SAVEREGS
38 mov.l er0,@-sp
39 mov.l er1,@-sp
40 mov.l er2,@-sp
41 mov.l er3,@-sp
42 .endm
43 .macro RESTOREREGS
44 mov.l @sp+,er3
45 mov.l @sp+,er2
46 .endm
47 .macro SAVEEXR
48 .endm
49 .macro RESTOREEXR
50 .endm
51#endif
52#if defined(CONFIG_CPU_H8S)
53#define USERRET 10
54#define USEREXR 8
55INTERRUPTS = 128
26 .h8300s 56 .h8300s
57 .macro SHLL2 reg
58 shll.l #2,\reg
59 .endm
60 .macro SHLR2 reg
61 shlr.l #2,\reg
62 .endm
63 .macro SAVEREGS
64 stm.l er0-er3,@-sp
65 .endm
66 .macro RESTOREREGS
67 ldm.l @sp+,er2-er3
68 .endm
69 .macro SAVEEXR
70 mov.w @(USEREXR:16,er0),r1
71 mov.w r1,@(LEXR-LER3:16,sp) /* copy EXR */
72 .endm
73 .macro RESTOREEXR
74 mov.w @(LEXR-LER1:16,sp),r1 /* restore EXR */
75 mov.b r1l,r1h
76 mov.w r1,@(USEREXR:16,er0)
77 .endm
78#endif
79
27 80
28/* CPU context save/restore macros. */ 81/* CPU context save/restore macros. */
29 82
30 .macro SAVE_ALL 83 .macro SAVE_ALL
31 mov.l er0,@-sp 84 mov.l er0,@-sp
32
33 stc ccr,r0l /* check kernel mode */ 85 stc ccr,r0l /* check kernel mode */
34 btst #4,r0l 86 btst #4,r0l
35 bne 5f 87 bne 5f
@@ -39,42 +91,38 @@
39 mov.l @sp,er0 /* restore saved er0 */ 91 mov.l @sp,er0 /* restore saved er0 */
40 orc #0x10,ccr /* switch kernel stack */ 92 orc #0x10,ccr /* switch kernel stack */
41 mov.l @SYMBOL_NAME(sw_ksp),sp 93 mov.l @SYMBOL_NAME(sw_ksp),sp
42 sub.l #(LRET-LORIG),sp /* allocate LORIG - LRET */ 94 sub.l #(LRET-LORIG),sp /* allocate LORIG - LRET */
43 stm.l er0-er3,@-sp 95 SAVEREGS
44 mov.l @SYMBOL_NAME(sw_usp),er0 96 mov.l @SYMBOL_NAME(sw_usp),er0
45 mov.l @(10:16,er0),er1 /* copy the RET addr */ 97 mov.l @(USERRET:16,er0),er1 /* copy the RET addr */
46 mov.l er1,@(LRET-LER3:16,sp) 98 mov.l er1,@(LRET-LER3:16,sp)
47 mov.w @(8:16,er0),r1 99 SAVEEXR
48 mov.w r1,@(LEXR-LER3:16,sp) /* copy EXR */
49 100
50 mov.w e1,r1 /* e1 highbyte = ccr */
51 and #0xef,r1h /* mask mode? flag */
52 sub.w r0,r0
53 mov.b r1h,r0l
54 mov.w r0,@(LCCR-LER3:16,sp) /* copy ccr */
55 mov.l @(LORIG-LER3:16,sp),er0 101 mov.l @(LORIG-LER3:16,sp),er0
56 mov.l er0,@(LER0-LER3:16,sp) /* copy ER0 */ 102 mov.l er0,@(LER0-LER3:16,sp) /* copy ER0 */
103 mov.w e1,r1 /* e1 highbyte = ccr */
104 and #0xef,r1h /* mask mode? flag */
57 bra 6f 105 bra 6f
585: 1065:
59 /* kernel mode */ 107 /* kernel mode */
60 mov.l @sp,er0 /* restore saved er0 */ 108 mov.l @sp,er0 /* restore saved er0 */
61 subs #2,sp /* set dummy ccr */ 109 subs #2,sp /* set dummy ccr */
62 stm.l er0-er3,@-sp 110 SAVEREGS
63 mov.w @(LRET-LER3:16,sp),r1 /* copy old ccr */ 111 mov.w @(LRET-LER3:16,sp),r1 /* copy old ccr */
1126:
64 mov.b r1h,r1l 113 mov.b r1h,r1l
65 mov.b #0,r1h 114 mov.b #0,r1h
66 mov.w r1,@(LCCR-LER3:16,sp) 115 mov.w r1,@(LCCR-LER3:16,sp) /* set ccr */
676:
68 mov.l er6,@-sp /* syscall arg #6 */ 116 mov.l er6,@-sp /* syscall arg #6 */
69 mov.l er5,@-sp /* syscall arg #5 */ 117 mov.l er5,@-sp /* syscall arg #5 */
70 mov.l er4,@-sp /* syscall arg #4 */ 118 mov.l er4,@-sp /* syscall arg #4 */
71 .endm 119 .endm /* r1 = ccr */
72 120
73 .macro RESTORE_ALL 121 .macro RESTORE_ALL
74 mov.l @sp+,er4 122 mov.l @sp+,er4
75 mov.l @sp+,er5 123 mov.l @sp+,er5
76 mov.l @sp+,er6 124 mov.l @sp+,er6
77 ldm.l @sp+,er2-er3 125 RESTOREREGS
78 mov.w @(LCCR-LER1:16,sp),r0 /* check kernel mode */ 126 mov.w @(LCCR-LER1:16,sp),r0 /* check kernel mode */
79 btst #4,r0l 127 btst #4,r0l
80 bne 7f 128 bne 7f
@@ -83,18 +131,16 @@
83 mov.l @SYMBOL_NAME(sw_usp),er0 131 mov.l @SYMBOL_NAME(sw_usp),er0
84 mov.l @(LER0-LER1:16,sp),er1 /* restore ER0 */ 132 mov.l @(LER0-LER1:16,sp),er1 /* restore ER0 */
85 mov.l er1,@er0 133 mov.l er1,@er0
86 mov.w @(LEXR-LER1:16,sp),r1 /* restore EXR */ 134 RESTOREEXR
87 mov.b r1l,r1h
88 mov.w r1,@(8:16,er0)
89 mov.w @(LCCR-LER1:16,sp),r1 /* restore the RET addr */ 135 mov.w @(LCCR-LER1:16,sp),r1 /* restore the RET addr */
90 mov.b r1l,r1h 136 mov.b r1l,r1h
91 mov.b @(LRET+1-LER1:16,sp),r1l 137 mov.b @(LRET+1-LER1:16,sp),r1l
92 mov.w r1,e1 138 mov.w r1,e1
93 mov.w @(LRET+2-LER1:16,sp),r1 139 mov.w @(LRET+2-LER1:16,sp),r1
94 mov.l er1,@(10:16,er0) 140 mov.l er1,@(USERRET:16,er0)
95 141
96 mov.l @sp+,er1 142 mov.l @sp+,er1
97 add.l #(LRET-LER1),sp /* remove LORIG - LRET */ 143 add.l #(LRET-LER1),sp /* remove LORIG - LRET */
98 mov.l sp,@SYMBOL_NAME(sw_ksp) 144 mov.l sp,@SYMBOL_NAME(sw_ksp)
99 andc #0xef,ccr /* switch to user mode */ 145 andc #0xef,ccr /* switch to user mode */
100 mov.l er0,sp 146 mov.l er0,sp
@@ -108,7 +154,7 @@
108 adds #4,sp /* remove the sw created LVEC */ 154 adds #4,sp /* remove the sw created LVEC */
109 rte 155 rte
110 .endm 156 .endm
111 157
112.globl SYMBOL_NAME(system_call) 158.globl SYMBOL_NAME(system_call)
113.globl SYMBOL_NAME(ret_from_exception) 159.globl SYMBOL_NAME(ret_from_exception)
114.globl SYMBOL_NAME(ret_from_fork) 160.globl SYMBOL_NAME(ret_from_fork)
@@ -116,16 +162,25 @@
116.globl SYMBOL_NAME(interrupt_redirect_table) 162.globl SYMBOL_NAME(interrupt_redirect_table)
117.globl SYMBOL_NAME(sw_ksp),SYMBOL_NAME(sw_usp) 163.globl SYMBOL_NAME(sw_ksp),SYMBOL_NAME(sw_usp)
118.globl SYMBOL_NAME(resume) 164.globl SYMBOL_NAME(resume)
119.globl SYMBOL_NAME(trace_break)
120.globl SYMBOL_NAME(interrupt_entry) 165.globl SYMBOL_NAME(interrupt_entry)
121 166.globl SYMBOL_NAME(trace_break)
122INTERRUPTS = 128 167
123#if defined(CONFIG_ROMKERNEL) 168#if defined(CONFIG_ROMKERNEL)
124 .section .int_redirect,"ax" 169 .section .int_redirect,"ax"
125SYMBOL_NAME_LABEL(interrupt_redirect_table) 170SYMBOL_NAME_LABEL(interrupt_redirect_table)
171#if defined(CONFIG_CPU_H8300H)
126 .rept 7 172 .rept 7
127 .long 0 173 .long 0
128 .endr 174 .endr
175#endif
176#if defined(CONFIG_CPU_H8S)
177 .rept 5
178 .long 0
179 .endr
180 jmp @SYMBOL_NAME(trace_break)
181 .long 0
182#endif
183
129 jsr @SYMBOL_NAME(interrupt_entry) /* NMI */ 184 jsr @SYMBOL_NAME(interrupt_entry) /* NMI */
130 jmp @SYMBOL_NAME(system_call) /* TRAPA #0 (System call) */ 185 jmp @SYMBOL_NAME(system_call) /* TRAPA #0 (System call) */
131 .long 0 186 .long 0
@@ -141,20 +196,20 @@ SYMBOL_NAME_LABEL(interrupt_redirect_table)
141SYMBOL_NAME_LABEL(interrupt_redirect_table) 196SYMBOL_NAME_LABEL(interrupt_redirect_table)
142 .space 4 197 .space 4
143#endif 198#endif
144 199
145 .section .text 200 .section .text
146 .align 2 201 .align 2
147SYMBOL_NAME_LABEL(interrupt_entry) 202SYMBOL_NAME_LABEL(interrupt_entry)
148 SAVE_ALL 203 SAVE_ALL
149 mov.w @(LCCR,sp),r0 204 mov.l sp,er0
150 btst #4,r0l 205 add.l #LVEC,er0
206 btst #4,r1l
151 bne 1f 207 bne 1f
208 /* user LVEC */
152 mov.l @SYMBOL_NAME(sw_usp),er0 209 mov.l @SYMBOL_NAME(sw_usp),er0
153 mov.l @(4:16,er0),er0 210 adds #4,er0
154 bra 2f
1551: 2111:
156 mov.l @(LVEC:16,sp),er0 212 mov.l @er0,er0 /* LVEC address */
1572:
158#if defined(CONFIG_ROMKERNEL) 213#if defined(CONFIG_ROMKERNEL)
159 sub.l #SYMBOL_NAME(interrupt_redirect_table),er0 214 sub.l #SYMBOL_NAME(interrupt_redirect_table),er0
160#endif 215#endif
@@ -162,69 +217,62 @@ SYMBOL_NAME_LABEL(interrupt_entry)
162 mov.l @SYMBOL_NAME(interrupt_redirect_table),er1 217 mov.l @SYMBOL_NAME(interrupt_redirect_table),er1
163 sub.l er1,er0 218 sub.l er1,er0
164#endif 219#endif
165 shlr.l #2,er0 220 SHLR2 er0
166 dec.l #1,er0 221 dec.l #1,er0
167 mov.l sp,er1 222 mov.l sp,er1
168 subs #4,er1 /* adjust ret_pc */ 223 subs #4,er1 /* adjust ret_pc */
169 jsr @SYMBOL_NAME(process_int) 224 jsr @SYMBOL_NAME(do_IRQ)
170 mov.l @SYMBOL_NAME(irq_stat)+CPUSTAT_SOFTIRQ_PENDING,er0 225 jmp @SYMBOL_NAME(ret_from_interrupt)
171 beq 1f
172 jsr @SYMBOL_NAME(do_softirq)
1731:
174 jmp @SYMBOL_NAME(ret_from_exception)
175 226
176SYMBOL_NAME_LABEL(system_call) 227SYMBOL_NAME_LABEL(system_call)
177 subs #4,sp /* dummy LVEC */ 228 subs #4,sp /* dummy LVEC */
178 SAVE_ALL 229 SAVE_ALL
230 andc #0x7f,ccr
179 mov.l er0,er4 231 mov.l er0,er4
180 mov.l #-ENOSYS,er0
181 mov.l er0,@(LER0:16,sp)
182 232
183 /* save top of frame */ 233 /* save top of frame */
184 mov.l sp,er0 234 mov.l sp,er0
185 jsr @SYMBOL_NAME(set_esp0) 235 jsr @SYMBOL_NAME(set_esp0)
186 cmp.l #NR_syscalls,er4
187 bcc SYMBOL_NAME(ret_from_exception):16
188 shll.l #2,er4
189 mov.l #SYMBOL_NAME(sys_call_table),er0
190 add.l er4,er0
191 mov.l @er0,er0
192 mov.l er0,er4
193 beq SYMBOL_NAME(ret_from_exception):16
194 mov.l sp,er2 236 mov.l sp,er2
195 and.w #0xe000,r2 237 and.w #0xe000,r2
196 mov.b @((TASK_FLAGS+3-(TIF_SYSCALL_TRACE >> 3)):16,er2),r2l 238 mov.b @((TI_FLAGS+3-(TIF_SYSCALL_TRACE >> 3)):16,er2),r2l
197 btst #(TIF_SYSCALL_TRACE & 7),r2l 239 btst #(TIF_SYSCALL_TRACE & 7),r2l
240 beq 1f
241 jsr @SYMBOL_NAME(do_syscall_trace)
2421:
243 cmp.l #NR_syscalls,er4
244 bcc badsys
245 SHLL2 er4
246 mov.l #SYMBOL_NAME(sys_call_table),er0
247 add.l er4,er0
248 mov.l @er0,er4
249 beq SYMBOL_NAME(ret_from_exception):16
198 mov.l @(LER1:16,sp),er0 250 mov.l @(LER1:16,sp),er0
199 mov.l @(LER2:16,sp),er1 251 mov.l @(LER2:16,sp),er1
200 mov.l @(LER3:16,sp),er2 252 mov.l @(LER3:16,sp),er2
201 andc #0x7f,ccr
202 jsr @er4 253 jsr @er4
203 mov.l er0,@(LER0:16,sp) /* save the return value */ 254 mov.l er0,@(LER0:16,sp) /* save the return value */
255 mov.l sp,er2
256 and.w #0xe000,r2
257 mov.b @((TI_FLAGS+3-(TIF_SYSCALL_TRACE >> 3)):16,er2),r2l
258 btst #(TIF_SYSCALL_TRACE & 7),r2l
259 beq 2f
260 jsr @SYMBOL_NAME(do_syscall_trace)
2612:
204#if defined(CONFIG_SYSCALL_PRINT) 262#if defined(CONFIG_SYSCALL_PRINT)
205 jsr @SYMBOL_NAME(syscall_print) 263 jsr @SYMBOL_NAME(syscall_print)
206#endif 264#endif
207 bra SYMBOL_NAME(ret_from_exception):8 265 orc #0x80,ccr
2081: 266 bra resume_userspace
209 jsr SYMBOL_NAME(syscall_trace)
210 mov.l @(LER1:16,sp),er0
211 mov.l @(LER2:16,sp),er1
212 mov.l @(LER3:16,sp),er2
213 jsr @er4
214 mov.l er0,@(LER0:16,sp) /* save the return value */
215 jsr @SYMBOL_NAME(syscall_trace)
216 bra SYMBOL_NAME(ret_from_exception):8
217 267
218SYMBOL_NAME_LABEL(ret_from_fork) 268badsys:
219 mov.l er2,er0 269 mov.l #-ENOSYS,er0
220 jsr @SYMBOL_NAME(schedule_tail) 270 mov.l er0,@(LER0:16,sp)
221 bra SYMBOL_NAME(ret_from_exception):8 271 bra resume_userspace
222 272
223SYMBOL_NAME_LABEL(reschedule) 273#if !defined(CONFIG_PREEMPT)
224 /* save top of frame */ 274#define resume_kernel restore_all
225 mov.l sp,er0 275#endif
226 jsr @SYMBOL_NAME(set_esp0)
227 jsr @SYMBOL_NAME(schedule)
228 276
229SYMBOL_NAME_LABEL(ret_from_exception) 277SYMBOL_NAME_LABEL(ret_from_exception)
230#if defined(CONFIG_PREEMPT) 278#if defined(CONFIG_PREEMPT)
@@ -232,58 +280,68 @@ SYMBOL_NAME_LABEL(ret_from_exception)
232#endif 280#endif
233SYMBOL_NAME_LABEL(ret_from_interrupt) 281SYMBOL_NAME_LABEL(ret_from_interrupt)
234 mov.b @(LCCR+1:16,sp),r0l 282 mov.b @(LCCR+1:16,sp),r0l
235 btst #4,r0l /* check if returning to kernel */ 283 btst #4,r0l
236 bne done:8 /* if so, skip resched, signals */ 284 bne resume_kernel:8 /* return from kernel */
285resume_userspace:
237 andc #0x7f,ccr 286 andc #0x7f,ccr
238 mov.l sp,er4 287 mov.l sp,er4
239 and.w #0xe000,r4 288 and.w #0xe000,r4 /* er4 <- current thread info */
240 mov.l @(TI_FLAGS:16,er4),er1 289 mov.l @(TI_FLAGS:16,er4),er1
241 and.l #_TIF_WORK_MASK,er1 290 and.l #_TIF_WORK_MASK,er1
242 beq done:8 291 beq restore_all:8
2431: 292work_pending:
244 mov.l @(TI_FLAGS:16,er4),er1
245 btst #TIF_NEED_RESCHED,r1l 293 btst #TIF_NEED_RESCHED,r1l
246 bne SYMBOL_NAME(reschedule):16 294 bne work_resched:8
295 /* work notifysig */
247 mov.l sp,er0 296 mov.l sp,er0
248 subs #4,er0 /* adjust retpc */ 297 subs #4,er0 /* er0: pt_regs */
249 mov.l er2,er1 298 jsr @SYMBOL_NAME(do_notify_resume)
250 jsr @SYMBOL_NAME(do_signal) 299 bra restore_all:8
300work_resched:
301 mov.l sp,er0
302 jsr @SYMBOL_NAME(set_esp0)
303 jsr @SYMBOL_NAME(schedule)
304 bra resume_userspace:8
305restore_all:
306 RESTORE_ALL /* Does RTE */
307
251#if defined(CONFIG_PREEMPT) 308#if defined(CONFIG_PREEMPT)
252 bra done:8 /* userspace thoru */ 309resume_kernel:
2533: 310 mov.l @(TI_PRE_COUNT:16,er4),er0
254 btst #4,r0l 311 bne restore_all:8
255 beq done:8 /* userspace thoru */ 312need_resched:
2564: 313 mov.l @(TI_FLAGS:16,er4),er0
257 mov.l @(TI_PRE_COUNT:16,er4),er1 314 btst #TIF_NEED_RESCHED,r0l
258 bne done:8 315 beq restore_all:8
259 mov.l @(TI_FLAGS:16,er4),er1 316 mov.b @(LCCR+1:16,sp),r0l /* Interrupt Enabled? */
260 btst #TIF_NEED_RESCHED,r1l 317 bmi restore_all:8
261 beq done:8 318 mov.l #PREEMPT_ACTIVE,er0
262 mov.b r0l,r0l 319 mov.l er0,@(TI_PRE_COUNT:16,er4)
263 bpl done:8 /* interrupt off (exception path?) */
264 mov.l #PREEMPT_ACTIVE,er1
265 mov.l er1,@(TI_PRE_COUNT:16,er4)
266 andc #0x7f,ccr 320 andc #0x7f,ccr
321 mov.l sp,er0
322 jsr @SYMBOL_NAME(set_esp0)
267 jsr @SYMBOL_NAME(schedule) 323 jsr @SYMBOL_NAME(schedule)
268 sub.l er1,er1
269 mov.l er1,@(TI_PRE_COUNT:16,er4)
270 orc #0x80,ccr 324 orc #0x80,ccr
271 bra 4b:8 325 bra need_resched:8
272#endif 326#endif
273done: 327
274 RESTORE_ALL /* Does RTE */ 328SYMBOL_NAME_LABEL(ret_from_fork)
329 mov.l er2,er0
330 jsr @SYMBOL_NAME(schedule_tail)
331 jmp @SYMBOL_NAME(ret_from_exception)
275 332
276SYMBOL_NAME_LABEL(resume) 333SYMBOL_NAME_LABEL(resume)
277 /* 334 /*
278 * er0 = prev 335 * Beware - when entering resume, offset of tss is in d1,
279 * er1 = next 336 * prev (the current task) is in a0, next (the new task)
280 * return last in er2 337 * is in a1 and d2.b is non-zero if the mm structure is
338 * shared between the tasks, so don't change these
339 * registers until their contents are no longer needed.
281 */ 340 */
282 341
283 /* save sr */ 342 /* save sr */
284 sub.w r3,r3 343 sub.w r3,r3
285 stc ccr,r3l 344 stc ccr,r3l
286 stc exr,r3h
287 mov.w r3,@(THREAD_CCR+2:16,er0) 345 mov.w r3,@(THREAD_CCR+2:16,er0)
288 346
289 /* disable interrupts */ 347 /* disable interrupts */
@@ -291,41 +349,45 @@ SYMBOL_NAME_LABEL(resume)
291 mov.l @SYMBOL_NAME(sw_usp),er3 349 mov.l @SYMBOL_NAME(sw_usp),er3
292 mov.l er3,@(THREAD_USP:16,er0) 350 mov.l er3,@(THREAD_USP:16,er0)
293 mov.l sp,@(THREAD_KSP:16,er0) 351 mov.l sp,@(THREAD_KSP:16,er0)
294 352
295 /* Skip address space switching if they are the same. */ 353 /* Skip address space switching if they are the same. */
296 /* FIXME: what did we hack out of here, this does nothing! */ 354 /* FIXME: what did we hack out of here, this does nothing! */
297 355
298 mov.l @(THREAD_USP:16,er1),er0 356 mov.l @(THREAD_USP:16,er1),er0
299 mov.l er0,@SYMBOL_NAME(sw_usp) 357 mov.l er0,@SYMBOL_NAME(sw_usp)
300 mov.l @(THREAD_KSP:16,er1),sp 358 mov.l @(THREAD_KSP:16,er1),sp
301 359
302 /* restore status register */ 360 /* restore status register */
303 mov.w @(THREAD_CCR+2:16,er1),r3 361 mov.w @(THREAD_CCR+2:16,er1),r3
304 362
305 ldc r3l,ccr 363 ldc r3l,ccr
306 ldc r3h,exr
307
308 rts 364 rts
309 365
310SYMBOL_NAME_LABEL(trace_break) 366SYMBOL_NAME_LABEL(trace_break)
311 subs #4,sp /* dummy LVEC */ 367 subs #4,sp
312 SAVE_ALL 368 SAVE_ALL
313 sub.l er1,er1 369 sub.l er1,er1
314 dec.l #1,er1 370 dec.l #1,er1
315 mov.l er1,@(LORIG,sp) 371 mov.l er1,@(LORIG,sp)
316 mov.l sp,er0 372 mov.l sp,er0
317 jsr @SYMBOL_NAME(set_esp0) 373 jsr @SYMBOL_NAME(set_esp0)
318 mov.l @SYMBOL_NAME(sw_usp),er0 374 mov.l @SYMBOL_NAME(sw_usp),er0
319 mov.l @er0,er1 375 mov.l @er0,er1
376 mov.w @(-2:16,er1),r2
377 cmp.w #0x5730,r2
378 beq 1f
320 subs #2,er1 379 subs #2,er1
321 mov.l er1,@er0 380 mov.l er1,@er0
3811:
322 and.w #0xff,e1 382 and.w #0xff,e1
323 mov.l er1,er0 383 mov.l er1,er0
324 jsr @SYMBOL_NAME(trace_trap) 384 jsr @SYMBOL_NAME(trace_trap)
325 jmp @SYMBOL_NAME(ret_from_exception) 385 jmp @SYMBOL_NAME(ret_from_exception)
326 386
327 .section .bss 387 .section .bss
328SYMBOL_NAME_LABEL(sw_ksp) 388SYMBOL_NAME_LABEL(sw_ksp)
329 .space 4 389 .space 4
330SYMBOL_NAME_LABEL(sw_usp) 390SYMBOL_NAME_LABEL(sw_usp)
331 .space 4 391 .space 4
392
393 .end
diff --git a/arch/h8300/kernel/ints.c b/arch/h8300/kernel/ints.c
deleted file mode 100644
index 3e4f479271..0000000000
--- a/arch/h8300/kernel/ints.c
+++ /dev/null
@@ -1,256 +0,0 @@
1/*
2 * linux/arch/h8300/kernel/ints.c
3 *
4 * Yoshinori Sato <ysato@users.sourceforge.jp>
5 *
6 * Based on linux/arch/$(ARCH)/platform/$(PLATFORM)/ints.c
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 * Copyright 1996 Roman Zippel
13 * Copyright 1999 D. Jeff Dionne <jeff@rt-control.com>
14 */
15
16#include <linux/module.h>
17#include <linux/types.h>
18#include <linux/kernel.h>
19#include <linux/sched.h>
20#include <linux/kernel_stat.h>
21#include <linux/seq_file.h>
22#include <linux/interrupt.h>
23#include <linux/init.h>
24#include <linux/random.h>
25#include <linux/bootmem.h>
26#include <linux/hardirq.h>
27
28#include <asm/system.h>
29#include <asm/irq.h>
30#include <asm/traps.h>
31#include <asm/io.h>
32#include <asm/setup.h>
33#include <asm/errno.h>
34
35/*
36 * This structure has only 4 elements for speed reasons
37 */
38typedef struct irq_handler {
39 irqreturn_t (*handler)(int, void *, struct pt_regs *);
40 int flags;
41 int count;
42 void *dev_id;
43 const char *devname;
44} irq_handler_t;
45
46static irq_handler_t *irq_list[NR_IRQS];
47static int use_kmalloc;
48
49extern unsigned long *interrupt_redirect_table;
50extern const int h8300_saved_vectors[];
51extern const unsigned long h8300_trap_table[];
52int h8300_enable_irq_pin(unsigned int irq);
53void h8300_disable_irq_pin(unsigned int irq);
54
55#define CPU_VECTOR ((unsigned long *)0x000000)
56#define ADDR_MASK (0xffffff)
57
58#if defined(CONFIG_RAMKERNEL)
59static unsigned long __init *get_vector_address(void)
60{
61 unsigned long *rom_vector = CPU_VECTOR;
62 unsigned long base,tmp;
63 int vec_no;
64
65 base = rom_vector[EXT_IRQ0] & ADDR_MASK;
66
67 /* check romvector format */
68 for (vec_no = EXT_IRQ1; vec_no <= EXT_IRQ0+EXT_IRQS; vec_no++) {
69 if ((base+(vec_no - EXT_IRQ0)*4) != (rom_vector[vec_no] & ADDR_MASK))
70 return NULL;
71 }
72
73 /* ramvector base address */
74 base -= EXT_IRQ0*4;
75
76 /* writerble check */
77 tmp = ~(*(volatile unsigned long *)base);
78 (*(volatile unsigned long *)base) = tmp;
79 if ((*(volatile unsigned long *)base) != tmp)
80 return NULL;
81 return (unsigned long *)base;
82}
83#endif
84
85void __init init_IRQ(void)
86{
87#if defined(CONFIG_RAMKERNEL)
88 int i;
89 unsigned long *ramvec,*ramvec_p;
90 const unsigned long *trap_entry;
91 const int *saved_vector;
92
93 ramvec = get_vector_address();
94 if (ramvec == NULL)
95 panic("interrupt vector serup failed.");
96 else
97 printk(KERN_INFO "virtual vector at 0x%08lx\n",(unsigned long)ramvec);
98
99 /* create redirect table */
100 ramvec_p = ramvec;
101 trap_entry = h8300_trap_table;
102 saved_vector = h8300_saved_vectors;
103 for ( i = 0; i < NR_IRQS; i++) {
104 if (i == *saved_vector) {
105 ramvec_p++;
106 saved_vector++;
107 } else {
108 if ( i < NR_TRAPS ) {
109 if (*trap_entry)
110 *ramvec_p = VECTOR(*trap_entry);
111 ramvec_p++;
112 trap_entry++;
113 } else
114 *ramvec_p++ = REDIRECT(interrupt_entry);
115 }
116 }
117 interrupt_redirect_table = ramvec;
118#ifdef DUMP_VECTOR
119 ramvec_p = ramvec;
120 for (i = 0; i < NR_IRQS; i++) {
121 if ((i % 8) == 0)
122 printk(KERN_DEBUG "\n%p: ",ramvec_p);
123 printk(KERN_DEBUG "%p ",*ramvec_p);
124 ramvec_p++;
125 }
126 printk(KERN_DEBUG "\n");
127#endif
128#endif
129}
130
131int request_irq(unsigned int irq,
132 irqreturn_t (*handler)(int, void *, struct pt_regs *),
133 unsigned long flags, const char *devname, void *dev_id)
134{
135 irq_handler_t *irq_handle;
136 if (irq < 0 || irq >= NR_IRQS) {
137 printk(KERN_ERR "Incorrect IRQ %d from %s\n", irq, devname);
138 return -EINVAL;
139 }
140
141 if (irq_list[irq] || (h8300_enable_irq_pin(irq) == -EBUSY))
142 return -EBUSY;
143
144 if (use_kmalloc)
145 irq_handle = kmalloc(sizeof(irq_handler_t), GFP_ATOMIC);
146 else {
147 /* use bootmem allocater */
148 irq_handle = (irq_handler_t *)alloc_bootmem(sizeof(irq_handler_t));
149 irq_handle = (irq_handler_t *)((unsigned long)irq_handle | 0x80000000);
150 }
151
152 if (irq_handle == NULL)
153 return -ENOMEM;
154
155 irq_handle->handler = handler;
156 irq_handle->flags = flags;
157 irq_handle->count = 0;
158 irq_handle->dev_id = dev_id;
159 irq_handle->devname = devname;
160 irq_list[irq] = irq_handle;
161
162 if (irq_handle->flags & IRQF_SAMPLE_RANDOM)
163 rand_initialize_irq(irq);
164
165 enable_irq(irq);
166 return 0;
167}
168
169EXPORT_SYMBOL(request_irq);
170
171void free_irq(unsigned int irq, void *dev_id)
172{
173 if (irq >= NR_IRQS)
174 return;
175
176 if (!irq_list[irq] || irq_list[irq]->dev_id != dev_id)
177 printk(KERN_WARNING "Removing probably wrong IRQ %d from %s\n",
178 irq, irq_list[irq]->devname);
179 disable_irq(irq);
180 h8300_disable_irq_pin(irq);
181 if (((unsigned long)irq_list[irq] & 0x80000000) == 0) {
182 kfree(irq_list[irq]);
183 irq_list[irq] = NULL;
184 }
185}
186
187EXPORT_SYMBOL(free_irq);
188
189/*
190 * Do we need these probe functions on the m68k?
191 */
192unsigned long probe_irq_on (void)
193{
194 return 0;
195}
196
197EXPORT_SYMBOL(probe_irq_on);
198
199int probe_irq_off (unsigned long irqs)
200{
201 return 0;
202}
203
204EXPORT_SYMBOL(probe_irq_off);
205
206void enable_irq(unsigned int irq)
207{
208 if (irq >= EXT_IRQ0 && irq <= (EXT_IRQ0 + EXT_IRQS))
209 IER_REGS |= 1 << (irq - EXT_IRQ0);
210}
211
212void disable_irq(unsigned int irq)
213{
214 if (irq >= EXT_IRQ0 && irq <= (EXT_IRQ0 + EXT_IRQS))
215 IER_REGS &= ~(1 << (irq - EXT_IRQ0));
216}
217
218asmlinkage void process_int(int irq, struct pt_regs *fp)
219{
220 irq_enter();
221 h8300_clear_isr(irq);
222 if (irq >= NR_TRAPS && irq < NR_IRQS) {
223 if (irq_list[irq]) {
224 irq_list[irq]->handler(irq, irq_list[irq]->dev_id, fp);
225 irq_list[irq]->count++;
226 if (irq_list[irq]->flags & IRQF_SAMPLE_RANDOM)
227 add_interrupt_randomness(irq);
228 }
229 } else {
230 BUG();
231 }
232 irq_exit();
233}
234
235int show_interrupts(struct seq_file *p, void *v)
236{
237 int i = *(loff_t *) v;
238
239 if ((i < NR_IRQS) && (irq_list[i]!=NULL)) {
240 seq_printf(p, "%3d: %10u ",i,irq_list[i]->count);
241 seq_printf(p, "%s\n", irq_list[i]->devname);
242 }
243
244 return 0;
245}
246
247void init_irq_proc(void)
248{
249}
250
251static int __init enable_kmalloc(void)
252{
253 use_kmalloc = 1;
254 return 0;
255}
256core_initcall(enable_kmalloc);
diff --git a/arch/h8300/kernel/ptrace.c b/arch/h8300/kernel/ptrace.c
index 8f2411db7e..d32bbf02fc 100644
--- a/arch/h8300/kernel/ptrace.c
+++ b/arch/h8300/kernel/ptrace.c
@@ -111,10 +111,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
111 /* when I and D space are separate, this will have to be fixed. */ 111 /* when I and D space are separate, this will have to be fixed. */
112 case PTRACE_POKETEXT: /* write the word at location addr. */ 112 case PTRACE_POKETEXT: /* write the word at location addr. */
113 case PTRACE_POKEDATA: 113 case PTRACE_POKEDATA:
114 ret = 0; 114 ret = generic_ptrace_pokedata(child, addr, data);
115 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
116 break;
117 ret = -EIO;
118 break; 115 break;
119 116
120 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ 117 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
@@ -219,7 +216,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
219 return ret; 216 return ret;
220} 217}
221 218
222asmlinkage void syscall_trace(void) 219asmlinkage void do_syscall_trace(void)
223{ 220{
224 if (!test_thread_flag(TIF_SYSCALL_TRACE)) 221 if (!test_thread_flag(TIF_SYSCALL_TRACE))
225 return; 222 return;
diff --git a/arch/h8300/kernel/signal.c b/arch/h8300/kernel/signal.c
index 02955604d7..62ea12d339 100644
--- a/arch/h8300/kernel/signal.c
+++ b/arch/h8300/kernel/signal.c
@@ -547,3 +547,9 @@ asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset)
547 } 547 }
548 return 0; 548 return 0;
549} 549}
550
551asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags)
552{
553 if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
554 do_signal(regs, NULL);
555}
diff --git a/arch/h8300/platform/h8300h/Makefile b/arch/h8300/platform/h8300h/Makefile
index b24ea08aa0..c5096369ea 100644
--- a/arch/h8300/platform/h8300h/Makefile
+++ b/arch/h8300/platform/h8300h/Makefile
@@ -4,4 +4,4 @@
4# Reuse any files we can from the H8/300H 4# Reuse any files we can from the H8/300H
5# 5#
6 6
7obj-y := entry.o irq_pin.o ptrace_h8300h.o 7obj-y := irq_pin.o ptrace_h8300h.o
diff --git a/arch/h8300/platform/h8300h/entry.S b/arch/h8300/platform/h8300h/entry.S
deleted file mode 100644
index f86ac3b5d4..0000000000
--- a/arch/h8300/platform/h8300h/entry.S
+++ /dev/null
@@ -1,332 +0,0 @@
1/* -*- mode: asm -*-
2 *
3 * linux/arch/h8300/platform/h8300h/entry.S
4 *
5 * Yoshinori Sato <ysato@users.sourceforge.jp>
6 * David McCullough <davidm@snapgear.com>
7 *
8 */
9
10/*
11 * entry.S
12 * include exception/interrupt gateway
13 * system call entry
14 */
15
16#include <linux/sys.h>
17#include <asm/unistd.h>
18#include <asm/setup.h>
19#include <asm/segment.h>
20#include <asm/linkage.h>
21#include <asm/asm-offsets.h>
22#include <asm/thread_info.h>
23#include <asm/errno.h>
24
25 .h8300h
26
27/* CPU context save/restore macros. */
28
29 .macro SAVE_ALL
30 mov.l er0,@-sp
31
32 stc ccr,r0l /* check kernel mode */
33 btst #4,r0l
34 bne 5f
35
36 mov.l sp,@SYMBOL_NAME(sw_usp) /* user mode */
37 mov.l @sp,er0
38 orc #0x10,ccr
39 mov.l @SYMBOL_NAME(sw_ksp),sp
40 sub.l #(LRET-LORIG),sp /* allocate LORIG - LRET */
41 mov.l er0,@-sp
42 mov.l er1,@-sp
43 mov.l @SYMBOL_NAME(sw_usp),er0
44 mov.l @(8:16,er0),er1 /* copy the RET addr */
45 mov.l er1,@(LRET-LER1:16,sp)
46
47 mov.w e1,r1 /* e1 highbyte = ccr */
48 and #0xef,r1h /* mask mode? flag */
49 sub.w r0,r0
50 mov.b r1h,r0l
51 mov.w r0,@(LCCR-LER1:16,sp) /* copy ccr */
52 mov.l @(LORIG-LER1:16,sp),er0
53 mov.l er0,@(LER0-LER1:16,sp) /* copy ER0 */
54 bra 6f
555:
56 mov.l @sp,er0 /* kernel mode */
57 subs #2,sp /* dummy ccr */
58 mov.l er0,@-sp
59 mov.l er1,@-sp
60 mov.w @(LRET-LER1:16,sp),r1 /* copy old ccr */
61 mov.b r1h,r1l
62 mov.b #0,r1h
63 mov.w r1,@(LCCR-LER1:16,sp) /* set ccr */
646:
65 mov.l er2,@-sp
66 mov.l er3,@-sp
67 mov.l er6,@-sp /* syscall arg #6 */
68 mov.l er5,@-sp /* syscall arg #5 */
69 mov.l er4,@-sp /* syscall arg #4 */
70 .endm
71
72 .macro RESTORE_ALL
73 mov.l @sp+,er4
74 mov.l @sp+,er5
75 mov.l @sp+,er6
76 mov.l @sp+,er3
77 mov.l @sp+,er2
78 mov.w @(LCCR-LER1:16,sp),r0 /* check kernel mode */
79 btst #4,r0l
80 bne 7f
81
82 orc #0x80,ccr
83 mov.l @SYMBOL_NAME(sw_usp),er0
84 mov.l @(LER0-LER1:16,sp),er1 /* restore ER0 */
85 mov.l er1,@er0
86 mov.w @(LCCR-LER1:16,sp),r1 /* restore the RET addr */
87 mov.b r1l,r1h
88 mov.b @(LRET+1-LER1:16,sp),r1l
89 mov.w r1,e1
90 mov.w @(LRET+2-LER1:16,sp),r1
91 mov.l er1,@(8:16,er0)
92
93 mov.l @sp+,er1
94 add.l #(LRET-LER1),sp /* remove LORIG - LRET */
95 mov.l sp,@SYMBOL_NAME(sw_ksp)
96 mov.l er0,sp
97 bra 8f
987:
99 mov.l @sp+,er1
100 adds #4,sp
101 adds #2,sp
1028:
103 mov.l @sp+,er0
104 adds #4,sp /* remove the sw created LVEC */
105 rte
106 .endm
107
108.globl SYMBOL_NAME(system_call)
109.globl SYMBOL_NAME(ret_from_exception)
110.globl SYMBOL_NAME(ret_from_fork)
111.globl SYMBOL_NAME(ret_from_interrupt)
112.globl SYMBOL_NAME(interrupt_redirect_table)
113.globl SYMBOL_NAME(sw_ksp),SYMBOL_NAME(sw_usp)
114.globl SYMBOL_NAME(resume)
115.globl SYMBOL_NAME(interrupt_redirect_table)
116.globl SYMBOL_NAME(interrupt_entry)
117.globl SYMBOL_NAME(system_call)
118.globl SYMBOL_NAME(trace_break)
119
120#if defined(CONFIG_ROMKERNEL)
121INTERRUPTS = 64
122 .section .int_redirect,"ax"
123SYMBOL_NAME_LABEL(interrupt_redirect_table)
124 .rept 7
125 .long 0
126 .endr
127 jsr @SYMBOL_NAME(interrupt_entry) /* NMI */
128 jmp @SYMBOL_NAME(system_call) /* TRAPA #0 (System call) */
129 .long 0
130 .long 0
131 jmp @SYMBOL_NAME(trace_break) /* TRAPA #3 (breakpoint) */
132 .rept INTERRUPTS-12
133 jsr @SYMBOL_NAME(interrupt_entry)
134 .endr
135#endif
136#if defined(CONFIG_RAMKERNEL)
137.globl SYMBOL_NAME(interrupt_redirect_table)
138 .section .bss
139SYMBOL_NAME_LABEL(interrupt_redirect_table)
140 .space 4
141#endif
142
143 .section .text
144 .align 2
145SYMBOL_NAME_LABEL(interrupt_entry)
146 SAVE_ALL
147 mov.w @(LCCR,sp),r0
148 btst #4,r0l
149 bne 1f
150 mov.l @SYMBOL_NAME(sw_usp),er0
151 mov.l @(4:16,er0),er0
152 bra 2f
1531:
154 mov.l @(LVEC,sp),er0
1552:
156#if defined(CONFIG_ROMKERNEL)
157 sub.l #SYMBOL_NAME(interrupt_redirect_table),er0
158#endif
159#if defined(CONFIG_RAMKERNEL)
160 mov.l @SYMBOL_NAME(interrupt_redirect_table),er1
161 sub.l er1,er0
162#endif
163 shlr.l er0
164 shlr.l er0
165 dec.l #1,er0
166 mov.l sp,er1
167 subs #4,er1 /* adjust ret_pc */
168 jsr @SYMBOL_NAME(do_IRQ)
169 mov.l @SYMBOL_NAME(irq_stat)+CPUSTAT_SOFTIRQ_PENDING,er0
170 beq 1f
171 jsr @SYMBOL_NAME(do_softirq)
1721:
173 jmp @SYMBOL_NAME(ret_from_interrupt)
174
175SYMBOL_NAME_LABEL(system_call)
176 subs #4,sp /* dummy LVEC */
177 SAVE_ALL
178 mov.w @(LCCR:16,sp),r1
179 bset #4,r1l
180 ldc r1l,ccr
181 mov.l er0,er4
182 mov.l #-ENOSYS,er0
183 mov.l er0,@(LER0:16,sp)
184
185 /* save top of frame */
186 mov.l sp,er0
187 jsr @SYMBOL_NAME(set_esp0)
188 cmp.l #NR_syscalls,er4
189 bcc SYMBOL_NAME(ret_from_exception):16
190 shll.l er4
191 shll.l er4
192 mov.l #SYMBOL_NAME(sys_call_table),er0
193 add.l er4,er0
194 mov.l @er0,er4
195 beq SYMBOL_NAME(ret_from_exception):16
196 mov.l sp,er2
197 and.w #0xe000,r2
198 mov.b @((TASK_FLAGS+3-(TIF_SYSCALL_TRACE >> 3)):16,er2),r2l
199 btst #(TIF_SYSCALL_TRACE & 7),r2l
200 bne 1f
201 mov.l @(LER1:16,sp),er0
202 mov.l @(LER2:16,sp),er1
203 mov.l @(LER3:16,sp),er2
204 jsr @er4
205 mov.l er0,@(LER0:16,sp) /* save the return value */
206#if defined(CONFIG_SYSCALL_PRINT)
207 jsr @SYMBOL_NAME(syscall_print)
208#endif
209 bra SYMBOL_NAME(ret_from_exception):8
2101:
211 jsr SYMBOL_NAME(syscall_trace)
212 mov.l @(LER1:16,sp),er0
213 mov.l @(LER2:16,sp),er1
214 mov.l @(LER3:16,sp),er2
215 jsr @er4
216 mov.l er0,@(LER0:16,sp) /* save the return value */
217 jsr @SYMBOL_NAME(syscall_trace)
218 bra SYMBOL_NAME(ret_from_exception):8
219
220SYMBOL_NAME_LABEL(ret_from_fork)
221 mov.l er2,er0
222 jsr @SYMBOL_NAME(schedule_tail)
223 bra SYMBOL_NAME(ret_from_exception):8
224
225SYMBOL_NAME_LABEL(reschedule)
226 /* save top of frame */
227 mov.l sp,er0
228 jsr @SYMBOL_NAME(set_esp0)
229 jsr @SYMBOL_NAME(schedule)
230
231SYMBOL_NAME_LABEL(ret_from_exception)
232#if defined(CONFIG_PREEMPT)
233 orc #0x80,ccr
234#endif
235SYMBOL_NAME_LABEL(ret_from_interrupt)
236 mov.b @(LCCR+1:16,sp),r0l
237 btst #4,r0l /* check if returning to kernel */
238 bne done:8 /* if so, skip resched, signals */
239 andc #0x7f,ccr
240 mov.l sp,er4
241 and.w #0xe000,r4
242 mov.l @(TI_FLAGS:16,er4),er1
243 and.l #_TIF_WORK_MASK,er1
244 beq done:8
2451:
246 mov.l @(TI_FLAGS:16,er4),er1
247 btst #TIF_NEED_RESCHED,r1l
248 bne SYMBOL_NAME(reschedule):16
249 mov.l sp,er0
250 subs #4,er0 /* adjust retpc */
251 mov.l er2,er1
252 jsr @SYMBOL_NAME(do_signal)
253#if defined(CONFIG_PREEMPT)
254 bra done:8 /* userspace thoru */
2553:
256 btst #4,r0l
257 beq done:8 /* userspace thoru */
2584:
259 mov.l @(TI_PRE_COUNT:16,er4),er1
260 bne done:8
261 mov.l @(TI_FLAGS:16,er4),er1
262 btst #TIF_NEED_RESCHED,r1l
263 beq done:8
264 mov.b r0l,r0l
265 bpl done:8 /* interrupt off (exception path?) */
266 mov.l #PREEMPT_ACTIVE,er1
267 mov.l er1,@(TI_PRE_COUNT:16,er4)
268 andc #0x7f,ccr
269 jsr @SYMBOL_NAME(schedule)
270 sub.l er1,er1
271 mov.l er1,@(TI_PRE_COUNT:16,er4)
272 orc #0x80,ccr
273 bra 4b:8
274#endif
275done:
276 RESTORE_ALL /* Does RTE */
277
278SYMBOL_NAME_LABEL(resume)
279 /*
280 * Beware - when entering resume, offset of tss is in d1,
281 * prev (the current task) is in a0, next (the new task)
282 * is in a1 and d2.b is non-zero if the mm structure is
283 * shared between the tasks, so don't change these
284 * registers until their contents are no longer needed.
285 */
286
287 /* save sr */
288 sub.w r3,r3
289 stc ccr,r3l
290 mov.w r3,@(THREAD_CCR+2:16,er0)
291
292 /* disable interrupts */
293 orc #0x80,ccr
294 mov.l @SYMBOL_NAME(sw_usp),er3
295 mov.l er3,@(THREAD_USP:16,er0)
296 mov.l sp,@(THREAD_KSP:16,er0)
297
298 /* Skip address space switching if they are the same. */
299 /* FIXME: what did we hack out of here, this does nothing! */
300
301 mov.l @(THREAD_USP:16,er1),er0
302 mov.l er0,@SYMBOL_NAME(sw_usp)
303 mov.l @(THREAD_KSP:16,er1),sp
304
305 /* restore status register */
306 mov.w @(THREAD_CCR+2:16,er1),r3
307
308 ldc r3l,ccr
309 rts
310
311SYMBOL_NAME_LABEL(trace_break)
312 subs #4,sp
313 SAVE_ALL
314 sub.l er1,er1
315 dec.l #1,er1
316 mov.l er1,@(LORIG,sp)
317 mov.l sp,er0
318 jsr @SYMBOL_NAME(set_esp0)
319 mov.l @SYMBOL_NAME(sw_usp),er0
320 mov.l @er0,er1
321 subs #2,er1
322 mov.l er1,@er0
323 and.w #0xff,e1
324 mov.l er1,er0
325 jsr @SYMBOL_NAME(trace_trap)
326 jmp @SYMBOL_NAME(ret_from_exception)
327
328 .section .bss
329SYMBOL_NAME_LABEL(sw_ksp)
330 .space 4
331SYMBOL_NAME_LABEL(sw_usp)
332 .space 4
diff --git a/arch/h8300/platform/h8s/Makefile b/arch/h8300/platform/h8s/Makefile
index 0847b15d42..bf12418837 100644
--- a/arch/h8300/platform/h8s/Makefile
+++ b/arch/h8300/platform/h8s/Makefile
@@ -4,4 +4,4 @@
4# Reuse any files we can from the H8S 4# Reuse any files we can from the H8S
5# 5#
6 6
7obj-y := entry.o ints_h8s.o ptrace_h8s.o 7obj-y := ints_h8s.o ptrace_h8s.o
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index d2f6a24741..7a11b905ef 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -222,6 +222,8 @@ config PARAVIRT
222 However, when run without a hypervisor the kernel is 222 However, when run without a hypervisor the kernel is
223 theoretically slower. If in doubt, say N. 223 theoretically slower. If in doubt, say N.
224 224
225source "arch/i386/xen/Kconfig"
226
225config VMI 227config VMI
226 bool "VMI Paravirt-ops support" 228 bool "VMI Paravirt-ops support"
227 depends on PARAVIRT 229 depends on PARAVIRT
@@ -441,8 +443,8 @@ config X86_REBOOTFIXUPS
441 this config is intended, is when reboot ends with a stalled/hung 443 this config is intended, is when reboot ends with a stalled/hung
442 system. 444 system.
443 445
444 Currently, the only fixup is for the Geode GX1/CS5530A/TROM2.1. 446 Currently, the only fixup is for the Geode machines using
445 combination. 447 CS5530A and CS5536 chipsets.
446 448
447 Say Y if you want to enable the fixup. Currently, it's safe to 449 Say Y if you want to enable the fixup. Currently, it's safe to
448 enable this option even if you don't need it. 450 enable this option even if you don't need it.
@@ -1212,21 +1214,26 @@ source "drivers/Kconfig"
1212 1214
1213source "fs/Kconfig" 1215source "fs/Kconfig"
1214 1216
1215menu "Instrumentation Support" 1217menuconfig INSTRUMENTATION
1218 bool "Instrumentation Support"
1216 depends on EXPERIMENTAL 1219 depends on EXPERIMENTAL
1220 default y
1221
1222if INSTRUMENTATION
1217 1223
1218source "arch/i386/oprofile/Kconfig" 1224source "arch/i386/oprofile/Kconfig"
1219 1225
1220config KPROBES 1226config KPROBES
1221 bool "Kprobes (EXPERIMENTAL)" 1227 bool "Kprobes"
1222 depends on KALLSYMS && EXPERIMENTAL && MODULES 1228 depends on KALLSYMS && MODULES
1223 help 1229 help
1224 Kprobes allows you to trap at almost any kernel address and 1230 Kprobes allows you to trap at almost any kernel address and
1225 execute a callback function. register_kprobe() establishes 1231 execute a callback function. register_kprobe() establishes
1226 a probepoint and specifies the callback. Kprobes is useful 1232 a probepoint and specifies the callback. Kprobes is useful
1227 for kernel debugging, non-intrusive instrumentation and testing. 1233 for kernel debugging, non-intrusive instrumentation and testing.
1228 If in doubt, say "N". 1234 If in doubt, say "N".
1229endmenu 1235
1236endif # INSTRUMENTATION
1230 1237
1231source "arch/i386/Kconfig.debug" 1238source "arch/i386/Kconfig.debug"
1232 1239
diff --git a/arch/i386/Kconfig.cpu b/arch/i386/Kconfig.cpu
index 5c95ceb7f1..9cbe76c3aa 100644
--- a/arch/i386/Kconfig.cpu
+++ b/arch/i386/Kconfig.cpu
@@ -344,8 +344,8 @@ config X86_CMOV
344 depends on (MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7) 344 depends on (MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7)
345 default y 345 default y
346 346
347config X86_MINIMUM_CPU_MODEL 347config X86_MINIMUM_CPU_FAMILY
348 int 348 int
349 default "4" if X86_XADD || X86_CMPXCHG || X86_BSWAP 349 default "4" if X86_XADD || X86_CMPXCHG || X86_BSWAP || X86_WP_WORKS_OK
350 default "0" 350 default "3"
351 351
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index bd28f9f9b4..01f0ff0daa 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -93,6 +93,9 @@ mflags-$(CONFIG_X86_ES7000) := -Iinclude/asm-i386/mach-es7000
93mcore-$(CONFIG_X86_ES7000) := mach-default 93mcore-$(CONFIG_X86_ES7000) := mach-default
94core-$(CONFIG_X86_ES7000) := arch/i386/mach-es7000/ 94core-$(CONFIG_X86_ES7000) := arch/i386/mach-es7000/
95 95
96# Xen paravirtualization support
97core-$(CONFIG_XEN) += arch/i386/xen/
98
96# default subarch .h files 99# default subarch .h files
97mflags-y += -Iinclude/asm-i386/mach-default 100mflags-y += -Iinclude/asm-i386/mach-default
98 101
@@ -108,6 +111,7 @@ drivers-$(CONFIG_PCI) += arch/i386/pci/
108# must be linked after kernel/ 111# must be linked after kernel/
109drivers-$(CONFIG_OPROFILE) += arch/i386/oprofile/ 112drivers-$(CONFIG_OPROFILE) += arch/i386/oprofile/
110drivers-$(CONFIG_PM) += arch/i386/power/ 113drivers-$(CONFIG_PM) += arch/i386/power/
114drivers-$(CONFIG_FB) += arch/i386/video/
111 115
112CFLAGS += $(mflags-y) 116CFLAGS += $(mflags-y)
113AFLAGS += $(mflags-y) 117AFLAGS += $(mflags-y)
diff --git a/arch/i386/boot/Makefile b/arch/i386/boot/Makefile
index bfbc32098a..93386a4e40 100644
--- a/arch/i386/boot/Makefile
+++ b/arch/i386/boot/Makefile
@@ -25,27 +25,56 @@ SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
25 25
26#RAMDISK := -DRAMDISK=512 26#RAMDISK := -DRAMDISK=512
27 27
28targets := vmlinux.bin bootsect bootsect.o \ 28targets := vmlinux.bin setup.bin setup.elf zImage bzImage
29 setup setup.o zImage bzImage
30subdir- := compressed 29subdir- := compressed
31 30
31setup-y += a20.o apm.o cmdline.o copy.o cpu.o cpucheck.o edd.o
32setup-y += header.o main.o mca.o memory.o pm.o pmjump.o
33setup-y += printf.o string.o tty.o video.o version.o voyager.o
34
35# The link order of the video-*.o modules can matter. In particular,
36# video-vga.o *must* be listed first, followed by video-vesa.o.
37# Hardware-specific drivers should follow in the order they should be
38# probed, and video-bios.o should typically be last.
39setup-y += video-vga.o
40setup-y += video-vesa.o
41setup-y += video-bios.o
42targets += $(setup-y)
32hostprogs-y := tools/build 43hostprogs-y := tools/build
33 44
34HOSTCFLAGS_build.o := $(LINUXINCLUDE) 45HOSTCFLAGS_build.o := $(LINUXINCLUDE)
35 46
36# --------------------------------------------------------------------------- 47# ---------------------------------------------------------------------------
37 48
49# How to compile the 16-bit code. Note we always compile for -march=i386,
50# that way we can complain to the user if the CPU is insufficient.
51cflags-i386 :=
52cflags-x86_64 := -m32
53CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
54 $(cflags-$(ARCH)) \
55 -Wall -Wstrict-prototypes \
56 -march=i386 -mregparm=3 \
57 -include $(srctree)/$(src)/code16gcc.h \
58 -fno-strict-aliasing -fomit-frame-pointer \
59 $(call cc-option, -ffreestanding) \
60 $(call cc-option, -fno-toplevel-reorder,\
61 $(call cc-option, -fno-unit-at-a-time)) \
62 $(call cc-option, -fno-stack-protector) \
63 $(call cc-option, -mpreferred-stack-boundary=2)
64AFLAGS := $(CFLAGS) -D__ASSEMBLY__
65
38$(obj)/zImage: IMAGE_OFFSET := 0x1000 66$(obj)/zImage: IMAGE_OFFSET := 0x1000
39$(obj)/zImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK) 67$(obj)/zImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK)
40$(obj)/bzImage: IMAGE_OFFSET := 0x100000 68$(obj)/bzImage: IMAGE_OFFSET := 0x100000
69$(obj)/bzImage: EXTRA_CFLAGS := -D__BIG_KERNEL__
41$(obj)/bzImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__ 70$(obj)/bzImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__
42$(obj)/bzImage: BUILDFLAGS := -b 71$(obj)/bzImage: BUILDFLAGS := -b
43 72
44quiet_cmd_image = BUILD $@ 73quiet_cmd_image = BUILD $@
45cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/bootsect $(obj)/setup \ 74cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/setup.bin \
46 $(obj)/vmlinux.bin $(ROOT_DEV) > $@ 75 $(obj)/vmlinux.bin $(ROOT_DEV) > $@
47 76
48$(obj)/zImage $(obj)/bzImage: $(obj)/bootsect $(obj)/setup \ 77$(obj)/zImage $(obj)/bzImage: $(obj)/setup.bin \
49 $(obj)/vmlinux.bin $(obj)/tools/build FORCE 78 $(obj)/vmlinux.bin $(obj)/tools/build FORCE
50 $(call if_changed,image) 79 $(call if_changed,image)
51 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' 80 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
@@ -53,12 +82,17 @@ $(obj)/zImage $(obj)/bzImage: $(obj)/bootsect $(obj)/setup \
53$(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE 82$(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE
54 $(call if_changed,objcopy) 83 $(call if_changed,objcopy)
55 84
56LDFLAGS_bootsect := -Ttext 0x0 -s --oformat binary 85SETUP_OBJS = $(addprefix $(obj)/,$(setup-y))
57LDFLAGS_setup := -Ttext 0x0 -s --oformat binary -e begtext
58 86
59$(obj)/setup $(obj)/bootsect: %: %.o FORCE 87LDFLAGS_setup.elf := -T
88$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
60 $(call if_changed,ld) 89 $(call if_changed,ld)
61 90
91OBJCOPYFLAGS_setup.bin := -O binary
92
93$(obj)/setup.bin: $(obj)/setup.elf FORCE
94 $(call if_changed,objcopy)
95
62$(obj)/compressed/vmlinux: FORCE 96$(obj)/compressed/vmlinux: FORCE
63 $(Q)$(MAKE) $(build)=$(obj)/compressed IMAGE_OFFSET=$(IMAGE_OFFSET) $@ 97 $(Q)$(MAKE) $(build)=$(obj)/compressed IMAGE_OFFSET=$(IMAGE_OFFSET) $@
64 98
diff --git a/arch/i386/boot/a20.c b/arch/i386/boot/a20.c
new file mode 100644
index 0000000000..31348d054f
--- /dev/null
+++ b/arch/i386/boot/a20.c
@@ -0,0 +1,161 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/a20.c
13 *
14 * Enable A20 gate (return -1 on failure)
15 */
16
17#include "boot.h"
18
19#define MAX_8042_LOOPS 100000
20
21static int empty_8042(void)
22{
23 u8 status;
24 int loops = MAX_8042_LOOPS;
25
26 while (loops--) {
27 io_delay();
28
29 status = inb(0x64);
30 if (status & 1) {
31 /* Read and discard input data */
32 io_delay();
33 (void)inb(0x60);
34 } else if (!(status & 2)) {
35 /* Buffers empty, finished! */
36 return 0;
37 }
38 }
39
40 return -1;
41}
42
43/* Returns nonzero if the A20 line is enabled. The memory address
44 used as a test is the int $0x80 vector, which should be safe. */
45
46#define A20_TEST_ADDR (4*0x80)
47#define A20_TEST_SHORT 32
48#define A20_TEST_LONG 2097152 /* 2^21 */
49
50static int a20_test(int loops)
51{
52 int ok = 0;
53 int saved, ctr;
54
55 set_fs(0x0000);
56 set_gs(0xffff);
57
58 saved = ctr = rdfs32(A20_TEST_ADDR);
59
60 while (loops--) {
61 wrfs32(++ctr, A20_TEST_ADDR);
62 io_delay(); /* Serialize and make delay constant */
63 ok = rdgs32(A20_TEST_ADDR+0x10) ^ ctr;
64 if (ok)
65 break;
66 }
67
68 wrfs32(saved, A20_TEST_ADDR);
69 return ok;
70}
71
72/* Quick test to see if A20 is already enabled */
73static int a20_test_short(void)
74{
75 return a20_test(A20_TEST_SHORT);
76}
77
78/* Longer test that actually waits for A20 to come on line; this
79 is useful when dealing with the KBC or other slow external circuitry. */
80static int a20_test_long(void)
81{
82 return a20_test(A20_TEST_LONG);
83}
84
85static void enable_a20_bios(void)
86{
87 asm volatile("pushfl; int $0x15; popfl"
88 : : "a" ((u16)0x2401));
89}
90
91static void enable_a20_kbc(void)
92{
93 empty_8042();
94
95 outb(0xd1, 0x64); /* Command write */
96 empty_8042();
97
98 outb(0xdf, 0x60); /* A20 on */
99 empty_8042();
100}
101
102static void enable_a20_fast(void)
103{
104 u8 port_a;
105
106 port_a = inb(0x92); /* Configuration port A */
107 port_a |= 0x02; /* Enable A20 */
108 port_a &= ~0x01; /* Do not reset machine */
109 outb(port_a, 0x92);
110}
111
112/*
113 * Actual routine to enable A20; return 0 on ok, -1 on failure
114 */
115
116#define A20_ENABLE_LOOPS 255 /* Number of times to try */
117
118int enable_a20(void)
119{
120 int loops = A20_ENABLE_LOOPS;
121
122#if defined(CONFIG_X86_ELAN)
123 /* Elan croaks if we try to touch the KBC */
124 enable_a20_fast();
125 while (!a20_test_long())
126 ;
127 return 0;
128#elif defined(CONFIG_X86_VOYAGER)
129 /* On Voyager, a20_test() is unsafe? */
130 enable_a20_kbc();
131 return 0;
132#else
133 while (loops--) {
134 /* First, check to see if A20 is already enabled
135 (legacy free, etc.) */
136 if (a20_test_short())
137 return 0;
138
139 /* Next, try the BIOS (INT 0x15, AX=0x2401) */
140 enable_a20_bios();
141 if (a20_test_short())
142 return 0;
143
144 /* Try enabling A20 through the keyboard controller */
145 empty_8042();
146 if (a20_test_short())
147 return 0; /* BIOS worked, but with delayed reaction */
148
149 enable_a20_kbc();
150 if (a20_test_long())
151 return 0;
152
153 /* Finally, try enabling the "fast A20 gate" */
154 enable_a20_fast();
155 if (a20_test_long())
156 return 0;
157 }
158
159 return -1;
160#endif
161}
diff --git a/arch/i386/boot/apm.c b/arch/i386/boot/apm.c
new file mode 100644
index 0000000000..a34087c370
--- /dev/null
+++ b/arch/i386/boot/apm.c
@@ -0,0 +1,97 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * Original APM BIOS checking by Stephen Rothwell, May 1994
7 * (sfr@canb.auug.org.au)
8 *
9 * This file is part of the Linux kernel, and is made available under
10 * the terms of the GNU General Public License version 2.
11 *
12 * ----------------------------------------------------------------------- */
13
14/*
15 * arch/i386/boot/apm.c
16 *
17 * Get APM BIOS information
18 */
19
20#include "boot.h"
21
22#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
23
24int query_apm_bios(void)
25{
26 u16 ax, bx, cx, dx, di;
27 u32 ebx, esi;
28 u8 err;
29
30 /* APM BIOS installation check */
31 ax = 0x5300;
32 bx = cx = 0;
33 asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp ; setc %0"
34 : "=d" (err), "+a" (ax), "+b" (bx), "+c" (cx)
35 : : "esi", "edi");
36
37 if (err)
38 return -1; /* No APM BIOS */
39
40 if (bx != 0x504d) /* "PM" signature */
41 return -1;
42
43 if (cx & 0x02) /* 32 bits supported? */
44 return -1;
45
46 /* Disconnect first, just in case */
47 ax = 0x5304;
48 asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp"
49 : "+a" (ax)
50 : : "ebx", "ecx", "edx", "esi", "edi");
51
52 /* Paranoia */
53 ebx = esi = 0;
54 cx = dx = di = 0;
55
56 /* 32-bit connect */
57 asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp ; setc %6"
58 : "=a" (ax), "+b" (ebx), "+c" (cx), "+d" (dx),
59 "+S" (esi), "+D" (di), "=m" (err)
60 : "a" (0x5303));
61
62 boot_params.apm_bios_info.cseg = ax;
63 boot_params.apm_bios_info.offset = ebx;
64 boot_params.apm_bios_info.cseg_16 = cx;
65 boot_params.apm_bios_info.dseg = dx;
66 boot_params.apm_bios_info.cseg_len = (u16)esi;
67 boot_params.apm_bios_info.cseg_16_len = esi >> 16;
68 boot_params.apm_bios_info.dseg_len = di;
69
70 if (err)
71 return -1;
72
73 /* Redo the installation check as the 32-bit connect;
74 some BIOSes return different flags this way... */
75
76 ax = 0x5300;
77 bx = cx = 0;
78 asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp ; setc %0"
79 : "=d" (err), "+a" (ax), "+b" (bx), "+c" (cx)
80 : : "esi", "edi");
81
82 if (err || bx != 0x504d) {
83 /* Failure with 32-bit connect, try to disconect and ignore */
84 ax = 0x5304;
85 bx = 0;
86 asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp"
87 : "+a" (ax), "+b" (bx)
88 : : "ecx", "edx", "esi", "edi");
89 return -1;
90 }
91
92 boot_params.apm_bios_info.version = ax;
93 boot_params.apm_bios_info.flags = cx;
94 return 0;
95}
96
97#endif
diff --git a/arch/i386/boot/bitops.h b/arch/i386/boot/bitops.h
new file mode 100644
index 0000000000..8dcc8dc7db
--- /dev/null
+++ b/arch/i386/boot/bitops.h
@@ -0,0 +1,45 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/bitops.h
13 *
14 * Very simple bitops for the boot code.
15 */
16
17#ifndef BOOT_BITOPS_H
18#define BOOT_BITOPS_H
19#define _LINUX_BITOPS_H /* Inhibit inclusion of <linux/bitops.h> */
20
21static inline int constant_test_bit(int nr, const void *addr)
22{
23 const u32 *p = (const u32 *)addr;
24 return ((1UL << (nr & 31)) & (p[nr >> 5])) != 0;
25}
26static inline int variable_test_bit(int nr, const void *addr)
27{
28 u8 v;
29 const u32 *p = (const u32 *)addr;
30
31 asm("btl %2,%1; setc %0" : "=qm" (v) : "m" (*p), "Ir" (nr));
32 return v;
33}
34
35#define test_bit(nr,addr) \
36(__builtin_constant_p(nr) ? \
37 constant_test_bit((nr),(addr)) : \
38 variable_test_bit((nr),(addr)))
39
40static inline void set_bit(int nr, void *addr)
41{
42 asm("btsl %1,%0" : "+m" (*(u32 *)addr) : "Ir" (nr));
43}
44
45#endif /* BOOT_BITOPS_H */
diff --git a/arch/i386/boot/boot.h b/arch/i386/boot/boot.h
new file mode 100644
index 0000000000..dec70c9b60
--- /dev/null
+++ b/arch/i386/boot/boot.h
@@ -0,0 +1,296 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/boot.h
13 *
14 * Header file for the real-mode kernel code
15 */
16
17#ifndef BOOT_BOOT_H
18#define BOOT_BOOT_H
19
20#ifndef __ASSEMBLY__
21
22#include <stdarg.h>
23#include <linux/types.h>
24#include <linux/edd.h>
25#include <asm/boot.h>
26#include <asm/bootparam.h>
27
28/* Useful macros */
29#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
30
31extern struct setup_header hdr;
32extern struct boot_params boot_params;
33
34/* Basic port I/O */
35static inline void outb(u8 v, u16 port)
36{
37 asm volatile("outb %0,%1" : : "a" (v), "dN" (port));
38}
39static inline u8 inb(u16 port)
40{
41 u8 v;
42 asm volatile("inb %1,%0" : "=a" (v) : "dN" (port));
43 return v;
44}
45
46static inline void outw(u16 v, u16 port)
47{
48 asm volatile("outw %0,%1" : : "a" (v), "dN" (port));
49}
50static inline u16 inw(u16 port)
51{
52 u16 v;
53 asm volatile("inw %1,%0" : "=a" (v) : "dN" (port));
54 return v;
55}
56
57static inline void outl(u32 v, u16 port)
58{
59 asm volatile("outl %0,%1" : : "a" (v), "dN" (port));
60}
61static inline u32 inl(u32 port)
62{
63 u32 v;
64 asm volatile("inl %1,%0" : "=a" (v) : "dN" (port));
65 return v;
66}
67
68static inline void io_delay(void)
69{
70 const u16 DELAY_PORT = 0x80;
71 asm volatile("outb %%al,%0" : : "dN" (DELAY_PORT));
72}
73
74/* These functions are used to reference data in other segments. */
75
76static inline u16 ds(void)
77{
78 u16 seg;
79 asm("movw %%ds,%0" : "=rm" (seg));
80 return seg;
81}
82
83static inline void set_fs(u16 seg)
84{
85 asm volatile("movw %0,%%fs" : : "rm" (seg));
86}
87static inline u16 fs(void)
88{
89 u16 seg;
90 asm("movw %%fs,%0" : "=rm" (seg));
91 return seg;
92}
93
94static inline void set_gs(u16 seg)
95{
96 asm volatile("movw %0,%%gs" : : "rm" (seg));
97}
98static inline u16 gs(void)
99{
100 u16 seg;
101 asm("movw %%gs,%0" : "=rm" (seg));
102 return seg;
103}
104
105typedef unsigned int addr_t;
106
107static inline u8 rdfs8(addr_t addr)
108{
109 u8 v;
110 asm("movb %%fs:%1,%0" : "=r" (v) : "m" (*(u8 *)addr));
111 return v;
112}
113static inline u16 rdfs16(addr_t addr)
114{
115 u16 v;
116 asm("movw %%fs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
117 return v;
118}
119static inline u32 rdfs32(addr_t addr)
120{
121 u32 v;
122 asm("movl %%fs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr));
123 return v;
124}
125
126static inline void wrfs8(u8 v, addr_t addr)
127{
128 asm volatile("movb %1,%%fs:%0" : "+m" (*(u8 *)addr) : "r" (v));
129}
130static inline void wrfs16(u16 v, addr_t addr)
131{
132 asm volatile("movw %1,%%fs:%0" : "+m" (*(u16 *)addr) : "r" (v));
133}
134static inline void wrfs32(u32 v, addr_t addr)
135{
136 asm volatile("movl %1,%%fs:%0" : "+m" (*(u32 *)addr) : "r" (v));
137}
138
139static inline u8 rdgs8(addr_t addr)
140{
141 u8 v;
142 asm("movb %%gs:%1,%0" : "=r" (v) : "m" (*(u8 *)addr));
143 return v;
144}
145static inline u16 rdgs16(addr_t addr)
146{
147 u16 v;
148 asm("movw %%gs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
149 return v;
150}
151static inline u32 rdgs32(addr_t addr)
152{
153 u32 v;
154 asm("movl %%gs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr));
155 return v;
156}
157
158static inline void wrgs8(u8 v, addr_t addr)
159{
160 asm volatile("movb %1,%%gs:%0" : "+m" (*(u8 *)addr) : "r" (v));
161}
162static inline void wrgs16(u16 v, addr_t addr)
163{
164 asm volatile("movw %1,%%gs:%0" : "+m" (*(u16 *)addr) : "r" (v));
165}
166static inline void wrgs32(u32 v, addr_t addr)
167{
168 asm volatile("movl %1,%%gs:%0" : "+m" (*(u32 *)addr) : "r" (v));
169}
170
171/* Note: these only return true/false, not a signed return value! */
172static inline int memcmp(const void *s1, const void *s2, size_t len)
173{
174 u8 diff;
175 asm("repe; cmpsb; setnz %0"
176 : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
177 return diff;
178}
179
180static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
181{
182 u8 diff;
183 asm("fs; repe; cmpsb; setnz %0"
184 : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
185 return diff;
186}
187static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
188{
189 u8 diff;
190 asm("gs; repe; cmpsb; setnz %0"
191 : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
192 return diff;
193}
194
195static inline int isdigit(int ch)
196{
197 return (ch >= '0') && (ch <= '9');
198}
199
200/* Heap -- available for dynamic lists. */
201#define STACK_SIZE 512 /* Minimum number of bytes for stack */
202
203extern char _end[];
204extern char *HEAP;
205extern char *heap_end;
206#define RESET_HEAP() ((void *)( HEAP = _end ))
207static inline char *__get_heap(size_t s, size_t a, size_t n)
208{
209 char *tmp;
210
211 HEAP = (char *)(((size_t)HEAP+(a-1)) & ~(a-1));
212 tmp = HEAP;
213 HEAP += s*n;
214 return tmp;
215}
216#define GET_HEAP(type, n) \
217 ((type *)__get_heap(sizeof(type),__alignof__(type),(n)))
218
219static inline int heap_free(void)
220{
221 return heap_end-HEAP;
222}
223
224/* copy.S */
225
226void copy_to_fs(addr_t dst, void *src, size_t len);
227void *copy_from_fs(void *dst, addr_t src, size_t len);
228void copy_to_gs(addr_t dst, void *src, size_t len);
229void *copy_from_gs(void *dst, addr_t src, size_t len);
230void *memcpy(void *dst, void *src, size_t len);
231void *memset(void *dst, int c, size_t len);
232
233#define memcpy(d,s,l) __builtin_memcpy(d,s,l)
234#define memset(d,c,l) __builtin_memset(d,c,l)
235
236/* a20.c */
237int enable_a20(void);
238
239/* apm.c */
240int query_apm_bios(void);
241
242/* cmdline.c */
243int cmdline_find_option(const char *option, char *buffer, int bufsize);
244
245/* cpu.c, cpucheck.c */
246int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr);
247int validate_cpu(void);
248
249/* edd.c */
250void query_edd(void);
251
252/* header.S */
253void __attribute__((noreturn)) die(void);
254
255/* mca.c */
256int query_mca(void);
257
258/* memory.c */
259int detect_memory(void);
260
261/* pm.c */
262void __attribute__((noreturn)) go_to_protected_mode(void);
263
264/* pmjump.S */
265void __attribute__((noreturn))
266 protected_mode_jump(u32 entrypoint, u32 bootparams);
267
268/* printf.c */
269int sprintf(char *buf, const char *fmt, ...);
270int vsprintf(char *buf, const char *fmt, va_list args);
271int printf(const char *fmt, ...);
272
273/* string.c */
274int strcmp(const char *str1, const char *str2);
275size_t strnlen(const char *s, size_t maxlen);
276unsigned int atou(const char *s);
277
278/* tty.c */
279void puts(const char *);
280void putchar(int);
281int getchar(void);
282void kbd_flush(void);
283int getchar_timeout(void);
284
285/* video.c */
286void set_video(void);
287
288/* video-vesa.c */
289void vesa_store_edid(void);
290
291/* voyager.c */
292int query_voyager(void);
293
294#endif /* __ASSEMBLY__ */
295
296#endif /* BOOT_BOOT_H */
diff --git a/arch/i386/boot/bootsect.S b/arch/i386/boot/bootsect.S
deleted file mode 100644
index 011b7a4993..0000000000
--- a/arch/i386/boot/bootsect.S
+++ /dev/null
@@ -1,98 +0,0 @@
1/*
2 * bootsect.S Copyright (C) 1991, 1992 Linus Torvalds
3 *
4 * modified by Drew Eckhardt
5 * modified by Bruce Evans (bde)
6 * modified by Chris Noe (May 1999) (as86 -> gas)
7 * gutted by H. Peter Anvin (Jan 2003)
8 *
9 * BIG FAT NOTE: We're in real mode using 64k segments. Therefore segment
10 * addresses must be multiplied by 16 to obtain their respective linear
11 * addresses. To avoid confusion, linear addresses are written using leading
12 * hex while segment addresses are written as segment:offset.
13 *
14 */
15
16#include <asm/boot.h>
17
18SETUPSECTS = 4 /* default nr of setup-sectors */
19BOOTSEG = 0x07C0 /* original address of boot-sector */
20INITSEG = DEF_INITSEG /* we move boot here - out of the way */
21SETUPSEG = DEF_SETUPSEG /* setup starts here */
22SYSSEG = DEF_SYSSEG /* system loaded at 0x10000 (65536) */
23SYSSIZE = DEF_SYSSIZE /* system size: # of 16-byte clicks */
24 /* to be loaded */
25ROOT_DEV = 0 /* ROOT_DEV is now written by "build" */
26SWAP_DEV = 0 /* SWAP_DEV is now written by "build" */
27
28#ifndef SVGA_MODE
29#define SVGA_MODE ASK_VGA
30#endif
31
32#ifndef RAMDISK
33#define RAMDISK 0
34#endif
35
36#ifndef ROOT_RDONLY
37#define ROOT_RDONLY 1
38#endif
39
40.code16
41.text
42
43.global _start
44_start:
45
46 # Normalize the start address
47 jmpl $BOOTSEG, $start2
48
49start2:
50 movw %cs, %ax
51 movw %ax, %ds
52 movw %ax, %es
53 movw %ax, %ss
54 movw $0x7c00, %sp
55 sti
56 cld
57
58 movw $bugger_off_msg, %si
59
60msg_loop:
61 lodsb
62 andb %al, %al
63 jz die
64 movb $0xe, %ah
65 movw $7, %bx
66 int $0x10
67 jmp msg_loop
68
69die:
70 # Allow the user to press a key, then reboot
71 xorw %ax, %ax
72 int $0x16
73 int $0x19
74
75 # int 0x19 should never return. In case it does anyway,
76 # invoke the BIOS reset code...
77 ljmp $0xf000,$0xfff0
78
79
80bugger_off_msg:
81 .ascii "Direct booting from floppy is no longer supported.\r\n"
82 .ascii "Please use a boot loader program instead.\r\n"
83 .ascii "\n"
84 .ascii "Remove disk and press any key to reboot . . .\r\n"
85 .byte 0
86
87
88 # Kernel attributes; used by setup
89
90 .org 497
91setup_sects: .byte SETUPSECTS
92root_flags: .word ROOT_RDONLY
93syssize: .word SYSSIZE
94swap_dev: .word SWAP_DEV
95ram_size: .word RAMDISK
96vid_mode: .word SVGA_MODE
97root_dev: .word ROOT_DEV
98boot_flag: .word 0xAA55
diff --git a/arch/i386/boot/cmdline.c b/arch/i386/boot/cmdline.c
new file mode 100644
index 0000000000..34bb778c43
--- /dev/null
+++ b/arch/i386/boot/cmdline.c
@@ -0,0 +1,97 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/cmdline.c
13 *
14 * Simple command-line parser for early boot.
15 */
16
17#include "boot.h"
18
19static inline int myisspace(u8 c)
20{
21 return c <= ' '; /* Close enough approximation */
22}
23
24/*
25 * Find a non-boolean option, that is, "option=argument". In accordance
26 * with standard Linux practice, if this option is repeated, this returns
27 * the last instance on the command line.
28 *
29 * Returns the length of the argument (regardless of if it was
30 * truncated to fit in the buffer), or -1 on not found.
31 */
32int cmdline_find_option(const char *option, char *buffer, int bufsize)
33{
34 u32 cmdline_ptr = boot_params.hdr.cmd_line_ptr;
35 addr_t cptr;
36 char c;
37 int len = -1;
38 const char *opptr = NULL;
39 char *bufptr = buffer;
40 enum {
41 st_wordstart, /* Start of word/after whitespace */
42 st_wordcmp, /* Comparing this word */
43 st_wordskip, /* Miscompare, skip */
44 st_bufcpy /* Copying this to buffer */
45 } state = st_wordstart;
46
47 if (!cmdline_ptr || cmdline_ptr >= 0x100000)
48 return -1; /* No command line, or inaccessible */
49
50 cptr = cmdline_ptr & 0xf;
51 set_fs(cmdline_ptr >> 4);
52
53 while (cptr < 0x10000 && (c = rdfs8(cptr++))) {
54 switch (state) {
55 case st_wordstart:
56 if (myisspace(c))
57 break;
58
59 /* else */
60 state = st_wordcmp;
61 opptr = option;
62 /* fall through */
63
64 case st_wordcmp:
65 if (c == '=' && !*opptr) {
66 len = 0;
67 bufptr = buffer;
68 state = st_bufcpy;
69 } else if (myisspace(c)) {
70 state = st_wordstart;
71 } else if (c != *opptr++) {
72 state = st_wordskip;
73 }
74 break;
75
76 case st_wordskip:
77 if (myisspace(c))
78 state = st_wordstart;
79 break;
80
81 case st_bufcpy:
82 if (myisspace(c)) {
83 state = st_wordstart;
84 } else {
85 if (len < bufsize-1)
86 *bufptr++ = c;
87 len++;
88 }
89 break;
90 }
91 }
92
93 if (bufsize)
94 *bufptr = '\0';
95
96 return len;
97}
diff --git a/arch/i386/boot/code16gcc.h b/arch/i386/boot/code16gcc.h
new file mode 100644
index 0000000000..3bd848093b
--- /dev/null
+++ b/arch/i386/boot/code16gcc.h
@@ -0,0 +1,15 @@
1/*
2 * code16gcc.h
3 *
4 * This file is -include'd when compiling 16-bit C code.
5 * Note: this asm() needs to be emitted before gcc omits any code.
6 * Depending on gcc version, this requires -fno-unit-at-a-time or
7 * -fno-toplevel-reorder.
8 *
9 * Hopefully gcc will eventually have a real -m16 option so we can
10 * drop this hack long term.
11 */
12
13#ifndef __ASSEMBLY__
14asm(".code16gcc");
15#endif
diff --git a/arch/i386/boot/compressed/Makefile b/arch/i386/boot/compressed/Makefile
index a661217f33..189fa1dbef 100644
--- a/arch/i386/boot/compressed/Makefile
+++ b/arch/i386/boot/compressed/Makefile
@@ -9,9 +9,14 @@ targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o \
9EXTRA_AFLAGS := -traditional 9EXTRA_AFLAGS := -traditional
10 10
11LDFLAGS_vmlinux := -T 11LDFLAGS_vmlinux := -T
12CFLAGS_misc.o += -fPIC
13hostprogs-y := relocs 12hostprogs-y := relocs
14 13
14CFLAGS := -m32 -D__KERNEL__ $(LINUX_INCLUDE) -O2 \
15 -fno-strict-aliasing -fPIC \
16 $(call cc-option,-ffreestanding) \
17 $(call cc-option,-fno-stack-protector)
18LDFLAGS := -m elf_i386
19
15$(obj)/vmlinux: $(src)/vmlinux.lds $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o FORCE 20$(obj)/vmlinux: $(src)/vmlinux.lds $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o FORCE
16 $(call if_changed,ld) 21 $(call if_changed,ld)
17 @: 22 @:
diff --git a/arch/i386/boot/compressed/head.S b/arch/i386/boot/compressed/head.S
index 3517a32aaf..f35ea22375 100644
--- a/arch/i386/boot/compressed/head.S
+++ b/arch/i386/boot/compressed/head.S
@@ -45,10 +45,10 @@ startup_32:
45 * at and where we were actually loaded at. This can only be done 45 * at and where we were actually loaded at. This can only be done
46 * with a short local call on x86. Nothing else will tell us what 46 * with a short local call on x86. Nothing else will tell us what
47 * address we are running at. The reserved chunk of the real-mode 47 * address we are running at. The reserved chunk of the real-mode
48 * data at 0x34-0x3f are used as the stack for this calculation. 48 * data at 0x1e4 (defined as a scratch field) are used as the stack
49 * Only 4 bytes are needed. 49 * for this calculation. Only 4 bytes are needed.
50 */ 50 */
51 leal 0x40(%esi), %esp 51 leal (0x1e4+4)(%esi), %esp
52 call 1f 52 call 1f
531: popl %ebp 531: popl %ebp
54 subl $1b, %ebp 54 subl $1b, %ebp
diff --git a/arch/i386/boot/compressed/relocs.c b/arch/i386/boot/compressed/relocs.c
index ce4fda261a..b0e21c3cee 100644
--- a/arch/i386/boot/compressed/relocs.c
+++ b/arch/i386/boot/compressed/relocs.c
@@ -31,6 +31,8 @@ static const char* safe_abs_relocs[] = {
31 "__kernel_rt_sigreturn", 31 "__kernel_rt_sigreturn",
32 "__kernel_sigreturn", 32 "__kernel_sigreturn",
33 "SYSENTER_RETURN", 33 "SYSENTER_RETURN",
34 "xen_irq_disable_direct_reloc",
35 "xen_save_fl_direct_reloc",
34}; 36};
35 37
36static int is_safe_abs_reloc(const char* sym_name) 38static int is_safe_abs_reloc(const char* sym_name)
diff --git a/arch/i386/boot/copy.S b/arch/i386/boot/copy.S
new file mode 100644
index 0000000000..ef127e56a3
--- /dev/null
+++ b/arch/i386/boot/copy.S
@@ -0,0 +1,101 @@
1/* ----------------------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/copy.S
13 *
14 * Memory copy routines
15 */
16
17 .code16gcc
18 .text
19
20 .globl memcpy
21 .type memcpy, @function
22memcpy:
23 pushw %si
24 pushw %di
25 movw %ax, %di
26 movw %dx, %si
27 pushw %cx
28 shrw $2, %cx
29 rep; movsl
30 popw %cx
31 andw $3, %cx
32 rep; movsb
33 popw %di
34 popw %si
35 ret
36 .size memcpy, .-memcpy
37
38 .globl memset
39 .type memset, @function
40memset:
41 pushw %di
42 movw %ax, %di
43 movzbl %dl, %eax
44 imull $0x01010101,%eax
45 pushw %cx
46 shrw $2, %cx
47 rep; stosl
48 popw %cx
49 andw $3, %cx
50 rep; stosb
51 popw %di
52 ret
53 .size memset, .-memset
54
55 .globl copy_from_fs
56 .type copy_from_fs, @function
57copy_from_fs:
58 pushw %ds
59 pushw %fs
60 popw %ds
61 call memcpy
62 popw %ds
63 ret
64 .size copy_from_fs, .-copy_from_fs
65
66 .globl copy_to_fs
67 .type copy_to_fs, @function
68copy_to_fs:
69 pushw %es
70 pushw %fs
71 popw %es
72 call memcpy
73 popw %es
74 ret
75 .size copy_to_fs, .-copy_to_fs
76
77#if 0 /* Not currently used, but can be enabled as needed */
78
79 .globl copy_from_gs
80 .type copy_from_gs, @function
81copy_from_gs:
82 pushw %ds
83 pushw %gs
84 popw %ds
85 call memcpy
86 popw %ds
87 ret
88 .size copy_from_gs, .-copy_from_gs
89 .globl copy_to_gs
90
91 .type copy_to_gs, @function
92copy_to_gs:
93 pushw %es
94 pushw %gs
95 popw %es
96 call memcpy
97 popw %es
98 ret
99 .size copy_to_gs, .-copy_to_gs
100
101#endif
diff --git a/arch/i386/boot/cpu.c b/arch/i386/boot/cpu.c
new file mode 100644
index 0000000000..2a5c32da58
--- /dev/null
+++ b/arch/i386/boot/cpu.c
@@ -0,0 +1,69 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/cpu.c
13 *
14 * Check for obligatory CPU features and abort if the features are not
15 * present.
16 */
17
18#include "boot.h"
19#include "bitops.h"
20#include <asm/cpufeature.h>
21
22static char *cpu_name(int level)
23{
24 static char buf[6];
25
26 if (level == 64) {
27 return "x86-64";
28 } else {
29 sprintf(buf, "i%d86", level);
30 return buf;
31 }
32}
33
34int validate_cpu(void)
35{
36 u32 *err_flags;
37 int cpu_level, req_level;
38
39 check_cpu(&cpu_level, &req_level, &err_flags);
40
41 if (cpu_level < req_level) {
42 printf("This kernel requires an %s CPU, ",
43 cpu_name(req_level));
44 printf("but only detected an %s CPU.\n",
45 cpu_name(cpu_level));
46 return -1;
47 }
48
49 if (err_flags) {
50 int i, j;
51 puts("This kernel requires the following features "
52 "not present on the CPU:\n");
53
54 for (i = 0; i < NCAPINTS; i++) {
55 u32 e = err_flags[i];
56
57 for (j = 0; j < 32; j++) {
58 if (e & 1)
59 printf("%d:%d ", i, j);
60
61 e >>= 1;
62 }
63 }
64 putchar('\n');
65 return -1;
66 } else {
67 return 0;
68 }
69}
diff --git a/arch/i386/boot/cpucheck.c b/arch/i386/boot/cpucheck.c
new file mode 100644
index 0000000000..991e8ceae1
--- /dev/null
+++ b/arch/i386/boot/cpucheck.c
@@ -0,0 +1,267 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/cpucheck.c
13 *
14 * Check for obligatory CPU features and abort if the features are not
15 * present. This code should be compilable as 16-, 32- or 64-bit
16 * code, so be very careful with types and inline assembly.
17 *
18 * This code should not contain any messages; that requires an
19 * additional wrapper.
20 *
21 * As written, this code is not safe for inclusion into the kernel
22 * proper (after FPU initialization, in particular).
23 */
24
25#ifdef _SETUP
26# include "boot.h"
27# include "bitops.h"
28#endif
29#include <linux/types.h>
30#include <asm/cpufeature.h>
31#include <asm/processor-flags.h>
32#include <asm/required-features.h>
33#include <asm/msr-index.h>
34
35struct cpu_features {
36 int level; /* Family, or 64 for x86-64 */
37 int model;
38 u32 flags[NCAPINTS];
39};
40
41static struct cpu_features cpu;
42static u32 cpu_vendor[3];
43static u32 err_flags[NCAPINTS];
44
45#ifdef CONFIG_X86_64
46static const int req_level = 64;
47#elif defined(CONFIG_X86_MINIMUM_CPU_FAMILY)
48static const int req_level = CONFIG_X86_MINIMUM_CPU_FAMILY;
49#else
50static const int req_level = 3;
51#endif
52
53static const u32 req_flags[NCAPINTS] =
54{
55 REQUIRED_MASK0,
56 REQUIRED_MASK1,
57 REQUIRED_MASK2,
58 REQUIRED_MASK3,
59 REQUIRED_MASK4,
60 REQUIRED_MASK5,
61 REQUIRED_MASK6,
62 REQUIRED_MASK7,
63};
64
65#define A32(a,b,c,d) (((d) << 24)+((c) << 16)+((b) << 8)+(a))
66
67static int is_amd(void)
68{
69 return cpu_vendor[0] == A32('A','u','t','h') &&
70 cpu_vendor[1] == A32('e','n','t','i') &&
71 cpu_vendor[2] == A32('c','A','M','D');
72}
73
74static int is_centaur(void)
75{
76 return cpu_vendor[0] == A32('C','e','n','t') &&
77 cpu_vendor[1] == A32('a','u','r','H') &&
78 cpu_vendor[2] == A32('a','u','l','s');
79}
80
81static int is_transmeta(void)
82{
83 return cpu_vendor[0] == A32('G','e','n','u') &&
84 cpu_vendor[1] == A32('i','n','e','T') &&
85 cpu_vendor[2] == A32('M','x','8','6');
86}
87
88static int has_fpu(void)
89{
90 u16 fcw = -1, fsw = -1;
91 u32 cr0;
92
93 asm("movl %%cr0,%0" : "=r" (cr0));
94 if (cr0 & (X86_CR0_EM|X86_CR0_TS)) {
95 cr0 &= ~(X86_CR0_EM|X86_CR0_TS);
96 asm volatile("movl %0,%%cr0" : : "r" (cr0));
97 }
98
99 asm("fninit ; fnstsw %0 ; fnstcw %1" : "+m" (fsw), "+m" (fcw));
100
101 return fsw == 0 && (fcw & 0x103f) == 0x003f;
102}
103
104static int has_eflag(u32 mask)
105{
106 u32 f0, f1;
107
108 asm("pushfl ; "
109 "pushfl ; "
110 "popl %0 ; "
111 "movl %0,%1 ; "
112 "xorl %2,%1 ; "
113 "pushl %1 ; "
114 "popfl ; "
115 "pushfl ; "
116 "popl %1 ; "
117 "popfl"
118 : "=&r" (f0), "=&r" (f1)
119 : "ri" (mask));
120
121 return !!((f0^f1) & mask);
122}
123
124static void get_flags(void)
125{
126 u32 max_intel_level, max_amd_level;
127 u32 tfms;
128
129 if (has_fpu())
130 set_bit(X86_FEATURE_FPU, cpu.flags);
131
132 if (has_eflag(X86_EFLAGS_ID)) {
133 asm("cpuid"
134 : "=a" (max_intel_level),
135 "=b" (cpu_vendor[0]),
136 "=d" (cpu_vendor[1]),
137 "=c" (cpu_vendor[2])
138 : "a" (0));
139
140 if (max_intel_level >= 0x00000001 &&
141 max_intel_level <= 0x0000ffff) {
142 asm("cpuid"
143 : "=a" (tfms),
144 "=c" (cpu.flags[4]),
145 "=d" (cpu.flags[0])
146 : "a" (0x00000001)
147 : "ebx");
148 cpu.level = (tfms >> 8) & 15;
149 cpu.model = (tfms >> 4) & 15;
150 if (cpu.level >= 6)
151 cpu.model += ((tfms >> 16) & 0xf) << 4;
152 }
153
154 asm("cpuid"
155 : "=a" (max_amd_level)
156 : "a" (0x80000000)
157 : "ebx", "ecx", "edx");
158
159 if (max_amd_level >= 0x80000001 &&
160 max_amd_level <= 0x8000ffff) {
161 u32 eax = 0x80000001;
162 asm("cpuid"
163 : "+a" (eax),
164 "=c" (cpu.flags[6]),
165 "=d" (cpu.flags[1])
166 : : "ebx");
167 }
168 }
169}
170
171/* Returns a bitmask of which words we have error bits in */
172static int check_flags(void)
173{
174 u32 err;
175 int i;
176
177 err = 0;
178 for (i = 0; i < NCAPINTS; i++) {
179 err_flags[i] = req_flags[i] & ~cpu.flags[i];
180 if (err_flags[i])
181 err |= 1 << i;
182 }
183
184 return err;
185}
186
187/*
188 * Returns -1 on error.
189 *
190 * *cpu_level is set to the current CPU level; *req_level to the required
191 * level. x86-64 is considered level 64 for this purpose.
192 *
193 * *err_flags_ptr is set to the flags error array if there are flags missing.
194 */
195int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr)
196{
197 int err;
198
199 memset(&cpu.flags, 0, sizeof cpu.flags);
200 cpu.level = 3;
201
202 if (has_eflag(X86_EFLAGS_AC))
203 cpu.level = 4;
204
205 get_flags();
206 err = check_flags();
207
208 if (test_bit(X86_FEATURE_LM, cpu.flags))
209 cpu.level = 64;
210
211 if (err == 0x01 &&
212 !(err_flags[0] &
213 ~((1 << X86_FEATURE_XMM)|(1 << X86_FEATURE_XMM2))) &&
214 is_amd()) {
215 /* If this is an AMD and we're only missing SSE+SSE2, try to
216 turn them on */
217
218 u32 ecx = MSR_K7_HWCR;
219 u32 eax, edx;
220
221 asm("rdmsr" : "=a" (eax), "=d" (edx) : "c" (ecx));
222 eax &= ~(1 << 15);
223 asm("wrmsr" : : "a" (eax), "d" (edx), "c" (ecx));
224
225 get_flags(); /* Make sure it really did something */
226 err = check_flags();
227 } else if (err == 0x01 &&
228 !(err_flags[0] & ~(1 << X86_FEATURE_CX8)) &&
229 is_centaur() && cpu.model >= 6) {
230 /* If this is a VIA C3, we might have to enable CX8
231 explicitly */
232
233 u32 ecx = MSR_VIA_FCR;
234 u32 eax, edx;
235
236 asm("rdmsr" : "=a" (eax), "=d" (edx) : "c" (ecx));
237 eax |= (1<<1)|(1<<7);
238 asm("wrmsr" : : "a" (eax), "d" (edx), "c" (ecx));
239
240 set_bit(X86_FEATURE_CX8, cpu.flags);
241 err = check_flags();
242 } else if (err == 0x01 && is_transmeta()) {
243 /* Transmeta might have masked feature bits in word 0 */
244
245 u32 ecx = 0x80860004;
246 u32 eax, edx;
247 u32 level = 1;
248
249 asm("rdmsr" : "=a" (eax), "=d" (edx) : "c" (ecx));
250 asm("wrmsr" : : "a" (~0), "d" (edx), "c" (ecx));
251 asm("cpuid"
252 : "+a" (level), "=d" (cpu.flags[0])
253 : : "ecx", "ebx");
254 asm("wrmsr" : : "a" (eax), "d" (edx), "c" (ecx));
255
256 err = check_flags();
257 }
258
259 if (err_flags_ptr)
260 *err_flags_ptr = err ? err_flags : NULL;
261 if (cpu_level_ptr)
262 *cpu_level_ptr = cpu.level;
263 if (req_level_ptr)
264 *req_level_ptr = req_level;
265
266 return (cpu.level < req_level || err) ? -1 : 0;
267}
diff --git a/arch/i386/boot/edd.S b/arch/i386/boot/edd.S
deleted file mode 100644
index 3432136801..0000000000
--- a/arch/i386/boot/edd.S
+++ /dev/null
@@ -1,231 +0,0 @@
1/*
2 * BIOS Enhanced Disk Drive support
3 * Copyright (C) 2002, 2003, 2004 Dell, Inc.
4 * by Matt Domsch <Matt_Domsch@dell.com> October 2002
5 * conformant to T13 Committee www.t13.org
6 * projects 1572D, 1484D, 1386D, 1226DT
7 * disk signature read by Matt Domsch <Matt_Domsch@dell.com>
8 * and Andrew Wilks <Andrew_Wilks@dell.com> September 2003, June 2004
9 * legacy CHS retrieval by Patrick J. LoPresti <patl@users.sourceforge.net>
10 * March 2004
11 * Command line option parsing, Matt Domsch, November 2004
12 */
13
14#include <linux/edd.h>
15#include <asm/setup.h>
16
17#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
18
19# It is assumed that %ds == INITSEG here
20
21 movb $0, (EDD_MBR_SIG_NR_BUF)
22 movb $0, (EDDNR)
23
24# Check the command line for options:
25# edd=of disables EDD completely (edd=off)
26# edd=sk skips the MBR test (edd=skipmbr)
27# edd=on re-enables EDD (edd=on)
28
29 pushl %esi
30 movw $edd_mbr_sig_start, %di # Default to edd=on
31
32 movl %cs:(cmd_line_ptr), %esi
33 andl %esi, %esi
34 jz old_cl # Old boot protocol?
35
36# Convert to a real-mode pointer in fs:si
37 movl %esi, %eax
38 shrl $4, %eax
39 movw %ax, %fs
40 andw $0xf, %si
41 jmp have_cl_pointer
42
43# Old-style boot protocol?
44old_cl:
45 push %ds # aka INITSEG
46 pop %fs
47
48 cmpw $0xa33f, (0x20)
49 jne done_cl # No command line at all?
50 movw (0x22), %si # Pointer relative to INITSEG
51
52# fs:si has the pointer to the command line now
53have_cl_pointer:
54
55# Loop through kernel command line one byte at a time. Just in
56# case the loader is buggy and failed to null-terminate the command line
57# terminate if we get close enough to the end of the segment that we
58# cannot fit "edd=XX"...
59cl_atspace:
60 cmpw $-5, %si # Watch for segment wraparound
61 jae done_cl
62 movl %fs:(%si), %eax
63 andb %al, %al # End of line?
64 jz done_cl
65 cmpl $EDD_CL_EQUALS, %eax
66 jz found_edd_equals
67 cmpb $0x20, %al # <= space consider whitespace
68 ja cl_skipword
69 incw %si
70 jmp cl_atspace
71
72cl_skipword:
73 cmpw $-5, %si # Watch for segment wraparound
74 jae done_cl
75 movb %fs:(%si), %al # End of string?
76 andb %al, %al
77 jz done_cl
78 cmpb $0x20, %al
79 jbe cl_atspace
80 incw %si
81 jmp cl_skipword
82
83found_edd_equals:
84# only looking at first two characters after equals
85# late overrides early on the command line, so keep going after finding something
86 movw %fs:4(%si), %ax
87 cmpw $EDD_CL_OFF, %ax # edd=of
88 je do_edd_off
89 cmpw $EDD_CL_SKIP, %ax # edd=sk
90 je do_edd_skipmbr
91 cmpw $EDD_CL_ON, %ax # edd=on
92 je do_edd_on
93 jmp cl_skipword
94do_edd_skipmbr:
95 movw $edd_start, %di
96 jmp cl_skipword
97do_edd_off:
98 movw $edd_done, %di
99 jmp cl_skipword
100do_edd_on:
101 movw $edd_mbr_sig_start, %di
102 jmp cl_skipword
103
104done_cl:
105 popl %esi
106 jmpw *%di
107
108# Read the first sector of each BIOS disk device and store the 4-byte signature
109edd_mbr_sig_start:
110 movb $0x80, %dl # from device 80
111 movw $EDD_MBR_SIG_BUF, %bx # store buffer ptr in bx
112edd_mbr_sig_read:
113 movl $0xFFFFFFFF, %eax
114 movl %eax, (%bx) # assume failure
115 pushw %bx
116 movb $READ_SECTORS, %ah
117 movb $1, %al # read 1 sector
118 movb $0, %dh # at head 0
119 movw $1, %cx # cylinder 0, sector 0
120 pushw %es
121 pushw %ds
122 popw %es
123 movw $EDDBUF, %bx # disk's data goes into EDDBUF
124 pushw %dx # work around buggy BIOSes
125 stc # work around buggy BIOSes
126 int $0x13
127 sti # work around buggy BIOSes
128 popw %dx
129 popw %es
130 popw %bx
131 jc edd_mbr_sig_done # on failure, we're done.
132 cmpb $0, %ah # some BIOSes do not set CF
133 jne edd_mbr_sig_done # on failure, we're done.
134 movl (EDDBUF+EDD_MBR_SIG_OFFSET), %eax # read sig out of the MBR
135 movl %eax, (%bx) # store success
136 incb (EDD_MBR_SIG_NR_BUF) # note that we stored something
137 incb %dl # increment to next device
138 addw $4, %bx # increment sig buffer ptr
139 cmpb $EDD_MBR_SIG_MAX, (EDD_MBR_SIG_NR_BUF) # Out of space?
140 jb edd_mbr_sig_read # keep looping
141edd_mbr_sig_done:
142
143# Do the BIOS Enhanced Disk Drive calls
144# This consists of two calls:
145# int 13h ah=41h "Check Extensions Present"
146# int 13h ah=48h "Get Device Parameters"
147# int 13h ah=08h "Legacy Get Device Parameters"
148#
149# A buffer of size EDDMAXNR*(EDDEXTSIZE+EDDPARMSIZE) is reserved for our use
150# in the boot_params at EDDBUF. The first four bytes of which are
151# used to store the device number, interface support map and version
152# results from fn41. The next four bytes are used to store the legacy
153# cylinders, heads, and sectors from fn08. The following 74 bytes are used to
154# store the results from fn48. Starting from device 80h, fn41, then fn48
155# are called and their results stored in EDDBUF+n*(EDDEXTSIZE+EDDPARMIZE).
156# Then the pointer is incremented to store the data for the next call.
157# This repeats until either a device doesn't exist, or until EDDMAXNR
158# devices have been stored.
159# The one tricky part is that ds:si always points EDDEXTSIZE bytes into
160# the structure, and the fn41 and fn08 results are stored at offsets
161# from there. This removes the need to increment the pointer for
162# every store, and leaves it ready for the fn48 call.
163# A second one-byte buffer, EDDNR, in the boot_params stores
164# the number of BIOS devices which exist, up to EDDMAXNR.
165# In setup.c, copy_edd() stores both boot_params buffers away
166# for later use, as they would get overwritten otherwise.
167# This code is sensitive to the size of the structs in edd.h
168edd_start:
169 # %ds points to the bootsector
170 # result buffer for fn48
171 movw $EDDBUF+EDDEXTSIZE, %si # in ds:si, fn41 results
172 # kept just before that
173 movb $0x80, %dl # BIOS device 0x80
174
175edd_check_ext:
176 movb $CHECKEXTENSIONSPRESENT, %ah # Function 41
177 movw $EDDMAGIC1, %bx # magic
178 int $0x13 # make the call
179 jc edd_done # no more BIOS devices
180
181 cmpw $EDDMAGIC2, %bx # is magic right?
182 jne edd_next # nope, next...
183
184 movb %dl, %ds:-8(%si) # store device number
185 movb %ah, %ds:-7(%si) # store version
186 movw %cx, %ds:-6(%si) # store extensions
187 incb (EDDNR) # note that we stored something
188
189edd_get_device_params:
190 movw $EDDPARMSIZE, %ds:(%si) # put size
191 movw $0x0, %ds:2(%si) # work around buggy BIOSes
192 movb $GETDEVICEPARAMETERS, %ah # Function 48
193 int $0x13 # make the call
194 # Don't check for fail return
195 # it doesn't matter.
196edd_get_legacy_chs:
197 xorw %ax, %ax
198 movw %ax, %ds:-4(%si)
199 movw %ax, %ds:-2(%si)
200 # Ralf Brown's Interrupt List says to set ES:DI to
201 # 0000h:0000h "to guard against BIOS bugs"
202 pushw %es
203 movw %ax, %es
204 movw %ax, %di
205 pushw %dx # legacy call clobbers %dl
206 movb $LEGACYGETDEVICEPARAMETERS, %ah # Function 08
207 int $0x13 # make the call
208 jc edd_legacy_done # failed
209 movb %cl, %al # Low 6 bits are max
210 andb $0x3F, %al # sector number
211 movb %al, %ds:-1(%si) # Record max sect
212 movb %dh, %ds:-2(%si) # Record max head number
213 movb %ch, %al # Low 8 bits of max cyl
214 shr $6, %cl
215 movb %cl, %ah # High 2 bits of max cyl
216 movw %ax, %ds:-4(%si)
217
218edd_legacy_done:
219 popw %dx
220 popw %es
221 movw %si, %ax # increment si
222 addw $EDDPARMSIZE+EDDEXTSIZE, %ax
223 movw %ax, %si
224
225edd_next:
226 incb %dl # increment to next device
227 cmpb $EDDMAXNR, (EDDNR) # Out of space?
228 jb edd_check_ext # keep looping
229
230edd_done:
231#endif
diff --git a/arch/i386/boot/edd.c b/arch/i386/boot/edd.c
new file mode 100644
index 0000000000..25a282494f
--- /dev/null
+++ b/arch/i386/boot/edd.c
@@ -0,0 +1,196 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/edd.c
13 *
14 * Get EDD BIOS disk information
15 */
16
17#include "boot.h"
18#include <linux/edd.h>
19
20#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
21
22struct edd_dapa {
23 u8 pkt_size;
24 u8 rsvd;
25 u16 sector_cnt;
26 u16 buf_off, buf_seg;
27 u64 lba;
28 u64 buf_lin_addr;
29};
30
31/*
32 * Read the MBR (first sector) from a specific device.
33 */
34static int read_mbr(u8 devno, void *buf)
35{
36 struct edd_dapa dapa;
37 u16 ax, bx, cx, dx, si;
38
39 memset(&dapa, 0, sizeof dapa);
40 dapa.pkt_size = sizeof(dapa);
41 dapa.sector_cnt = 1;
42 dapa.buf_off = (size_t)buf;
43 dapa.buf_seg = ds();
44 /* dapa.lba = 0; */
45
46 ax = 0x4200; /* Extended Read */
47 si = (size_t)&dapa;
48 dx = devno;
49 asm("pushfl; stc; int $0x13; setc %%al; popfl"
50 : "+a" (ax), "+S" (si), "+d" (dx)
51 : "m" (dapa)
52 : "ebx", "ecx", "edi", "memory");
53
54 if (!(u8)ax)
55 return 0; /* OK */
56
57 ax = 0x0201; /* Legacy Read, one sector */
58 cx = 0x0001; /* Sector 0-0-1 */
59 dx = devno;
60 bx = (size_t)buf;
61 asm("pushfl; stc; int $0x13; setc %%al; popfl"
62 : "+a" (ax), "+c" (cx), "+d" (dx), "+b" (bx)
63 : : "esi", "edi", "memory");
64
65 return -(u8)ax; /* 0 or -1 */
66}
67
68static u32 read_mbr_sig(u8 devno, struct edd_info *ei)
69{
70 int sector_size;
71 char *mbrbuf_ptr, *mbrbuf_end;
72 u32 mbrsig;
73 u32 buf_base, mbr_base;
74 extern char _end[];
75 static char mbr_buf[1024];
76
77 sector_size = ei->params.bytes_per_sector;
78 if (!sector_size)
79 sector_size = 512; /* Best available guess */
80
81 buf_base = (ds() << 4) + (u32)&_end;
82 mbr_base = (buf_base+sector_size-1) & ~(sector_size-1);
83 mbrbuf_ptr = mbr_buf + (mbr_base-buf_base);
84 mbrbuf_end = mbrbuf_ptr + sector_size;
85
86 if (!(boot_params.hdr.loadflags & CAN_USE_HEAP))
87 return 0;
88 if (mbrbuf_end > (char *)(size_t)boot_params.hdr.heap_end_ptr)
89 return 0;
90
91 if (read_mbr(devno, mbrbuf_ptr))
92 return 0;
93
94 mbrsig = *(u32 *)&mbrbuf_ptr[EDD_MBR_SIG_OFFSET];
95 return mbrsig;
96}
97
98static int get_edd_info(u8 devno, struct edd_info *ei)
99{
100 u16 ax, bx, cx, dx, di;
101
102 memset(ei, 0, sizeof *ei);
103
104 /* Check Extensions Present */
105
106 ax = 0x4100;
107 bx = EDDMAGIC1;
108 dx = devno;
109 asm("pushfl; stc; int $0x13; setc %%al; popfl"
110 : "+a" (ax), "+b" (bx), "=c" (cx), "+d" (dx)
111 : : "esi", "edi");
112
113 if ((u8)ax)
114 return -1; /* No extended information */
115
116 if (bx != EDDMAGIC2)
117 return -1;
118
119 ei->device = devno;
120 ei->version = ax >> 8; /* EDD version number */
121 ei->interface_support = cx; /* EDD functionality subsets */
122
123 /* Extended Get Device Parameters */
124
125 ei->params.length = sizeof(ei->params);
126 ax = 0x4800;
127 dx = devno;
128 asm("pushfl; int $0x13; popfl"
129 : "+a" (ax), "+d" (dx)
130 : "S" (&ei->params)
131 : "ebx", "ecx", "edi");
132
133 /* Get legacy CHS parameters */
134
135 /* Ralf Brown recommends setting ES:DI to 0:0 */
136 ax = 0x0800;
137 dx = devno;
138 di = 0;
139 asm("pushw %%es; "
140 "movw %%di,%%es; "
141 "pushfl; stc; int $0x13; setc %%al; popfl; "
142 "popw %%es"
143 : "+a" (ax), "=b" (bx), "=c" (cx), "+d" (dx), "+D" (di)
144 : : "esi");
145
146 if ((u8)ax == 0) {
147 ei->legacy_max_cylinder = (cx >> 8) + ((cx & 0xc0) << 2);
148 ei->legacy_max_head = dx >> 8;
149 ei->legacy_sectors_per_track = cx & 0x3f;
150 }
151
152 return 0;
153}
154
155void query_edd(void)
156{
157 char eddarg[8];
158 int do_mbr = 1;
159 int do_edd = 1;
160 int devno;
161 struct edd_info ei, *edp;
162
163 if (cmdline_find_option("edd", eddarg, sizeof eddarg) > 0) {
164 if (!strcmp(eddarg, "skipmbr") || !strcmp(eddarg, "skip"))
165 do_mbr = 0;
166 else if (!strcmp(eddarg, "off"))
167 do_edd = 0;
168 }
169
170 edp = (struct edd_info *)boot_params.eddbuf;
171
172 if (!do_edd)
173 return;
174
175 for (devno = 0x80; devno < 0x80+EDD_MBR_SIG_MAX; devno++) {
176 /*
177 * Scan the BIOS-supported hard disks and query EDD
178 * information...
179 */
180 get_edd_info(devno, &ei);
181
182 if (boot_params.eddbuf_entries < EDDMAXNR) {
183 memcpy(edp, &ei, sizeof ei);
184 edp++;
185 boot_params.eddbuf_entries++;
186 }
187
188 if (do_mbr) {
189 u32 mbr_sig;
190 mbr_sig = read_mbr_sig(devno, &ei);
191 boot_params.edd_mbr_sig_buffer[devno-0x80] = mbr_sig;
192 }
193 }
194}
195
196#endif
diff --git a/arch/i386/boot/header.S b/arch/i386/boot/header.S
new file mode 100644
index 0000000000..6b9923fb6e
--- /dev/null
+++ b/arch/i386/boot/header.S
@@ -0,0 +1,283 @@
1/*
2 * header.S
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 *
6 * Based on bootsect.S and setup.S
7 * modified by more people than can be counted
8 *
9 * Rewritten as a common file by H. Peter Anvin (Apr 2007)
10 *
11 * BIG FAT NOTE: We're in real mode using 64k segments. Therefore segment
12 * addresses must be multiplied by 16 to obtain their respective linear
13 * addresses. To avoid confusion, linear addresses are written using leading
14 * hex while segment addresses are written as segment:offset.
15 *
16 */
17
18#include <asm/segment.h>
19#include <linux/utsrelease.h>
20#include <asm/boot.h>
21#include <asm/e820.h>
22#include <asm/page.h>
23#include <asm/setup.h>
24#include "boot.h"
25
26SETUPSECTS = 4 /* default nr of setup-sectors */
27BOOTSEG = 0x07C0 /* original address of boot-sector */
28SYSSEG = DEF_SYSSEG /* system loaded at 0x10000 (65536) */
29SYSSIZE = DEF_SYSSIZE /* system size: # of 16-byte clicks */
30 /* to be loaded */
31ROOT_DEV = 0 /* ROOT_DEV is now written by "build" */
32SWAP_DEV = 0 /* SWAP_DEV is now written by "build" */
33
34#ifndef SVGA_MODE
35#define SVGA_MODE ASK_VGA
36#endif
37
38#ifndef RAMDISK
39#define RAMDISK 0
40#endif
41
42#ifndef ROOT_RDONLY
43#define ROOT_RDONLY 1
44#endif
45
46 .code16
47 .section ".bstext", "ax"
48
49 .global bootsect_start
50bootsect_start:
51
52 # Normalize the start address
53 ljmp $BOOTSEG, $start2
54
55start2:
56 movw %cs, %ax
57 movw %ax, %ds
58 movw %ax, %es
59 movw %ax, %ss
60 xorw %sp, %sp
61 sti
62 cld
63
64 movw $bugger_off_msg, %si
65
66msg_loop:
67 lodsb
68 andb %al, %al
69 jz bs_die
70 movb $0xe, %ah
71 movw $7, %bx
72 int $0x10
73 jmp msg_loop
74
75bs_die:
76 # Allow the user to press a key, then reboot
77 xorw %ax, %ax
78 int $0x16
79 int $0x19
80
81 # int 0x19 should never return. In case it does anyway,
82 # invoke the BIOS reset code...
83 ljmp $0xf000,$0xfff0
84
85 .section ".bsdata", "a"
86bugger_off_msg:
87 .ascii "Direct booting from floppy is no longer supported.\r\n"
88 .ascii "Please use a boot loader program instead.\r\n"
89 .ascii "\n"
90 .ascii "Remove disk and press any key to reboot . . .\r\n"
91 .byte 0
92
93
94 # Kernel attributes; used by setup. This is part 1 of the
95 # header, from the old boot sector.
96
97 .section ".header", "a"
98 .globl hdr
99hdr:
100setup_sects: .byte SETUPSECTS
101root_flags: .word ROOT_RDONLY
102syssize: .long SYSSIZE
103ram_size: .word RAMDISK
104vid_mode: .word SVGA_MODE
105root_dev: .word ROOT_DEV
106boot_flag: .word 0xAA55
107
108 # offset 512, entry point
109
110 .globl _start
111_start:
112 # Explicitly enter this as bytes, or the assembler
113 # tries to generate a 3-byte jump here, which causes
114 # everything else to push off to the wrong offset.
115 .byte 0xeb # short (2-byte) jump
116 .byte start_of_setup-1f
1171:
118
119 # Part 2 of the header, from the old setup.S
120
121 .ascii "HdrS" # header signature
122 .word 0x0206 # header version number (>= 0x0105)
123 # or else old loadlin-1.5 will fail)
124 .globl realmode_swtch
125realmode_swtch: .word 0, 0 # default_switch, SETUPSEG
126start_sys_seg: .word SYSSEG
127 .word kernel_version-512 # pointing to kernel version string
128 # above section of header is compatible
129 # with loadlin-1.5 (header v1.5). Don't
130 # change it.
131
132type_of_loader: .byte 0 # = 0, old one (LILO, Loadlin,
133 # Bootlin, SYSLX, bootsect...)
134 # See Documentation/i386/boot.txt for
135 # assigned ids
136
137# flags, unused bits must be zero (RFU) bit within loadflags
138loadflags:
139LOADED_HIGH = 1 # If set, the kernel is loaded high
140CAN_USE_HEAP = 0x80 # If set, the loader also has set
141 # heap_end_ptr to tell how much
142 # space behind setup.S can be used for
143 # heap purposes.
144 # Only the loader knows what is free
145#ifndef __BIG_KERNEL__
146 .byte 0
147#else
148 .byte LOADED_HIGH
149#endif
150
151setup_move_size: .word 0x8000 # size to move, when setup is not
152 # loaded at 0x90000. We will move setup
153 # to 0x90000 then just before jumping
154 # into the kernel. However, only the
155 # loader knows how much data behind
156 # us also needs to be loaded.
157
158code32_start: # here loaders can put a different
159 # start address for 32-bit code.
160#ifndef __BIG_KERNEL__
161 .long 0x1000 # 0x1000 = default for zImage
162#else
163 .long 0x100000 # 0x100000 = default for big kernel
164#endif
165
166ramdisk_image: .long 0 # address of loaded ramdisk image
167 # Here the loader puts the 32-bit
168 # address where it loaded the image.
169 # This only will be read by the kernel.
170
171ramdisk_size: .long 0 # its size in bytes
172
173bootsect_kludge:
174 .long 0 # obsolete
175
176heap_end_ptr: .word _end+1024 # (Header version 0x0201 or later)
177 # space from here (exclusive) down to
178 # end of setup code can be used by setup
179 # for local heap purposes.
180
181pad1: .word 0
182cmd_line_ptr: .long 0 # (Header version 0x0202 or later)
183 # If nonzero, a 32-bit pointer
184 # to the kernel command line.
185 # The command line should be
186 # located between the start of
187 # setup and the end of low
188 # memory (0xa0000), or it may
189 # get overwritten before it
190 # gets read. If this field is
191 # used, there is no longer
192 # anything magical about the
193 # 0x90000 segment; the setup
194 # can be located anywhere in
195 # low memory 0x10000 or higher.
196
197ramdisk_max: .long (-__PAGE_OFFSET-(512 << 20)-1) & 0x7fffffff
198 # (Header version 0x0203 or later)
199 # The highest safe address for
200 # the contents of an initrd
201
202kernel_alignment: .long CONFIG_PHYSICAL_ALIGN #physical addr alignment
203 #required for protected mode
204 #kernel
205#ifdef CONFIG_RELOCATABLE
206relocatable_kernel: .byte 1
207#else
208relocatable_kernel: .byte 0
209#endif
210pad2: .byte 0
211pad3: .word 0
212
213cmdline_size: .long COMMAND_LINE_SIZE-1 #length of the command line,
214 #added with boot protocol
215 #version 2.06
216
217# End of setup header #####################################################
218
219 .section ".inittext", "ax"
220start_of_setup:
221#ifdef SAFE_RESET_DISK_CONTROLLER
222# Reset the disk controller.
223 movw $0x0000, %ax # Reset disk controller
224 movb $0x80, %dl # All disks
225 int $0x13
226#endif
227
228# We will have entired with %cs = %ds+0x20, normalize %cs so
229# it is on par with the other segments.
230 pushw %ds
231 pushw $setup2
232 lretw
233
234setup2:
235# Force %es = %ds
236 movw %ds, %ax
237 movw %ax, %es
238 cld
239
240# Stack paranoia: align the stack and make sure it is good
241# for both 16- and 32-bit references. In particular, if we
242# were meant to have been using the full 16-bit segment, the
243# caller might have set %sp to zero, which breaks %esp-based
244# references.
245 andw $~3, %sp # dword align (might as well...)
246 jnz 1f
247 movw $0xfffc, %sp # Make sure we're not zero
2481: movzwl %sp, %esp # Clear upper half of %esp
249 sti
250
251# Check signature at end of setup
252 cmpl $0x5a5aaa55, setup_sig
253 jne setup_bad
254
255# Zero the bss
256 movw $__bss_start, %di
257 movw $_end+3, %cx
258 xorl %eax, %eax
259 subw %di, %cx
260 shrw $2, %cx
261 rep; stosl
262
263# Jump to C code (should not return)
264 calll main
265
266# Setup corrupt somehow...
267setup_bad:
268 movl $setup_corrupt, %eax
269 calll puts
270 # Fall through...
271
272 .globl die
273 .type die, @function
274die:
275 hlt
276 jmp die
277
278 .size die, .-due
279
280 .section ".initdata", "a"
281setup_corrupt:
282 .byte 7
283 .string "No setup signature found..."
diff --git a/arch/i386/boot/main.c b/arch/i386/boot/main.c
new file mode 100644
index 0000000000..7f01f96c4f
--- /dev/null
+++ b/arch/i386/boot/main.c
@@ -0,0 +1,161 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/main.c
13 *
14 * Main module for the real-mode kernel code
15 */
16
17#include "boot.h"
18
19struct boot_params boot_params __attribute__((aligned(16)));
20
21char *HEAP = _end;
22char *heap_end = _end; /* Default end of heap = no heap */
23
24/*
25 * Copy the header into the boot parameter block. Since this
26 * screws up the old-style command line protocol, adjust by
27 * filling in the new-style command line pointer instead.
28 */
29#define OLD_CL_MAGIC 0xA33F
30#define OLD_CL_ADDRESS 0x20
31
32static void copy_boot_params(void)
33{
34 struct old_cmdline {
35 u16 cl_magic;
36 u16 cl_offset;
37 };
38 const struct old_cmdline * const oldcmd =
39 (const struct old_cmdline *)OLD_CL_ADDRESS;
40
41 BUILD_BUG_ON(sizeof boot_params != 4096);
42 memcpy(&boot_params.hdr, &hdr, sizeof hdr);
43
44 if (!boot_params.hdr.cmd_line_ptr &&
45 oldcmd->cl_magic == OLD_CL_MAGIC) {
46 /* Old-style command line protocol. */
47 u16 cmdline_seg;
48
49 /* Figure out if the command line falls in the region
50 of memory that an old kernel would have copied up
51 to 0x90000... */
52 if (oldcmd->cl_offset < boot_params.hdr.setup_move_size)
53 cmdline_seg = ds();
54 else
55 cmdline_seg = 0x9000;
56
57 boot_params.hdr.cmd_line_ptr =
58 (cmdline_seg << 4) + oldcmd->cl_offset;
59 }
60}
61
62/*
63 * Set the keyboard repeat rate to maximum. Unclear why this
64 * is done here; this might be possible to kill off as stale code.
65 */
66static void keyboard_set_repeat(void)
67{
68 u16 ax = 0x0305;
69 u16 bx = 0;
70 asm volatile("int $0x16"
71 : "+a" (ax), "+b" (bx)
72 : : "ecx", "edx", "esi", "edi");
73}
74
75/*
76 * Get Intel SpeedStep IST information.
77 */
78static void query_speedstep_ist(void)
79{
80 asm("int $0x15"
81 : "=a" (boot_params.speedstep_info[0]),
82 "=b" (boot_params.speedstep_info[1]),
83 "=c" (boot_params.speedstep_info[2]),
84 "=d" (boot_params.speedstep_info[3])
85 : "a" (0x0000e980), /* IST Support */
86 "d" (0x47534943)); /* Request value */
87}
88
89/*
90 * Tell the BIOS what CPU mode we intend to run in.
91 */
92static void set_bios_mode(void)
93{
94#ifdef CONFIG_X86_64
95 u32 eax, ebx;
96
97 eax = 0xec00;
98 ebx = 2;
99 asm volatile("int $0x15"
100 : "+a" (eax), "+b" (ebx)
101 : : "ecx", "edx", "esi", "edi");
102#endif
103}
104
105void main(void)
106{
107 /* First, copy the boot header into the "zeropage" */
108 copy_boot_params();
109
110 /* End of heap check */
111 if (boot_params.hdr.loadflags & CAN_USE_HEAP) {
112 heap_end = (char *)(boot_params.hdr.heap_end_ptr
113 +0x200-STACK_SIZE);
114 } else {
115 /* Boot protocol 2.00 only, no heap available */
116 puts("WARNING: Ancient bootloader, some functionality "
117 "may be limited!\n");
118 }
119
120 /* Make sure we have all the proper CPU support */
121 if (validate_cpu()) {
122 puts("Unable to boot - please use a kernel appropriate "
123 "for your CPU.\n");
124 die();
125 }
126
127 /* Tell the BIOS what CPU mode we intend to run in. */
128 set_bios_mode();
129
130 /* Detect memory layout */
131 detect_memory();
132
133 /* Set keyboard repeat rate (why?) */
134 keyboard_set_repeat();
135
136 /* Set the video mode */
137 set_video();
138
139 /* Query MCA information */
140 query_mca();
141
142 /* Voyager */
143#ifdef CONFIG_X86_VOYAGER
144 query_voyager();
145#endif
146
147 /* Query SpeedStep IST information */
148 query_speedstep_ist();
149
150 /* Query APM information */
151#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
152 query_apm_bios();
153#endif
154
155 /* Query EDD information */
156#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
157 query_edd();
158#endif
159 /* Do the last things and invoke protected mode */
160 go_to_protected_mode();
161}
diff --git a/arch/i386/boot/mca.c b/arch/i386/boot/mca.c
new file mode 100644
index 0000000000..68222f2d4b
--- /dev/null
+++ b/arch/i386/boot/mca.c
@@ -0,0 +1,43 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/mca.c
13 *
14 * Get the MCA system description table
15 */
16
17#include "boot.h"
18
19int query_mca(void)
20{
21 u8 err;
22 u16 es, bx, len;
23
24 asm("pushw %%es ; "
25 "int $0x15 ; "
26 "setc %0 ; "
27 "movw %%es, %1 ; "
28 "popw %%es"
29 : "=acd" (err), "=acdSD" (es), "=b" (bx)
30 : "a" (0xc000));
31
32 if (err)
33 return -1; /* No MCA present */
34
35 set_fs(es);
36 len = rdfs16(bx);
37
38 if (len > sizeof(boot_params.sys_desc_table))
39 len = sizeof(boot_params.sys_desc_table);
40
41 copy_from_fs(&boot_params.sys_desc_table, bx, len);
42 return 0;
43}
diff --git a/arch/i386/boot/memory.c b/arch/i386/boot/memory.c
new file mode 100644
index 0000000000..1a2e62db8b
--- /dev/null
+++ b/arch/i386/boot/memory.c
@@ -0,0 +1,99 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/memory.c
13 *
14 * Memory detection code
15 */
16
17#include "boot.h"
18
19#define SMAP 0x534d4150 /* ASCII "SMAP" */
20
21static int detect_memory_e820(void)
22{
23 u32 next = 0;
24 u32 size, id;
25 u8 err;
26 struct e820entry *desc = boot_params.e820_map;
27
28 do {
29 size = sizeof(struct e820entry);
30 id = SMAP;
31 asm("int $0x15; setc %0"
32 : "=am" (err), "+b" (next), "+d" (id), "+c" (size),
33 "=m" (*desc)
34 : "D" (desc), "a" (0xe820));
35
36 if (err || id != SMAP)
37 break;
38
39 boot_params.e820_entries++;
40 desc++;
41 } while (next && boot_params.e820_entries < E820MAX);
42
43 return boot_params.e820_entries;
44}
45
46static int detect_memory_e801(void)
47{
48 u16 ax, bx, cx, dx;
49 u8 err;
50
51 bx = cx = dx = 0;
52 ax = 0xe801;
53 asm("stc; int $0x15; setc %0"
54 : "=m" (err), "+a" (ax), "+b" (bx), "+c" (cx), "+d" (dx));
55
56 if (err)
57 return -1;
58
59 /* Do we really need to do this? */
60 if (cx || dx) {
61 ax = cx;
62 bx = dx;
63 }
64
65 if (ax > 15*1024)
66 return -1; /* Bogus! */
67
68 /* This ignores memory above 16MB if we have a memory hole
69 there. If someone actually finds a machine with a memory
70 hole at 16MB and no support for 0E820h they should probably
71 generate a fake e820 map. */
72 boot_params.alt_mem_k = (ax == 15*1024) ? (dx << 6)+ax : ax;
73
74 return 0;
75}
76
77static int detect_memory_88(void)
78{
79 u16 ax;
80 u8 err;
81
82 ax = 0x8800;
83 asm("stc; int $0x15; setc %0" : "=bcdm" (err), "+a" (ax));
84
85 boot_params.screen_info.ext_mem_k = ax;
86
87 return -err;
88}
89
90int detect_memory(void)
91{
92 if (detect_memory_e820() > 0)
93 return 0;
94
95 if (!detect_memory_e801())
96 return 0;
97
98 return detect_memory_88();
99}
diff --git a/arch/i386/boot/pm.c b/arch/i386/boot/pm.c
new file mode 100644
index 0000000000..1df025c732
--- /dev/null
+++ b/arch/i386/boot/pm.c
@@ -0,0 +1,170 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/pm.c
13 *
14 * Prepare the machine for transition to protected mode.
15 */
16
17#include "boot.h"
18#include <asm/segment.h>
19
20/*
21 * Invoke the realmode switch hook if present; otherwise
22 * disable all interrupts.
23 */
24static void realmode_switch_hook(void)
25{
26 if (boot_params.hdr.realmode_swtch) {
27 asm volatile("lcallw *%0"
28 : : "m" (boot_params.hdr.realmode_swtch)
29 : "eax", "ebx", "ecx", "edx");
30 } else {
31 asm volatile("cli");
32 outb(0x80, 0x70); /* Disable NMI */
33 io_delay();
34 }
35}
36
37/*
38 * A zImage kernel is loaded at 0x10000 but wants to run at 0x1000.
39 * A bzImage kernel is loaded and runs at 0x100000.
40 */
41static void move_kernel_around(void)
42{
43 /* Note: rely on the compile-time option here rather than
44 the LOADED_HIGH flag. The Qemu kernel loader unconditionally
45 sets the loadflags to zero. */
46#ifndef __BIG_KERNEL__
47 u16 dst_seg, src_seg;
48 u32 syssize;
49
50 dst_seg = 0x1000 >> 4;
51 src_seg = 0x10000 >> 4;
52 syssize = boot_params.hdr.syssize; /* Size in 16-byte paragraphs */
53
54 while (syssize) {
55 int paras = (syssize >= 0x1000) ? 0x1000 : syssize;
56 int dwords = paras << 2;
57
58 asm volatile("pushw %%es ; "
59 "pushw %%ds ; "
60 "movw %1,%%es ; "
61 "movw %2,%%ds ; "
62 "xorw %%di,%%di ; "
63 "xorw %%si,%%si ; "
64 "rep;movsl ; "
65 "popw %%ds ; "
66 "popw %%es"
67 : "+c" (dwords)
68 : "r" (dst_seg), "r" (src_seg)
69 : "esi", "edi");
70
71 syssize -= paras;
72 dst_seg += paras;
73 src_seg += paras;
74 }
75#endif
76}
77
78/*
79 * Disable all interrupts at the legacy PIC.
80 */
81static void mask_all_interrupts(void)
82{
83 outb(0xff, 0xa1); /* Mask all interrupts on the seconday PIC */
84 io_delay();
85 outb(0xfb, 0x21); /* Mask all but cascade on the primary PIC */
86 io_delay();
87}
88
89/*
90 * Reset IGNNE# if asserted in the FPU.
91 */
92static void reset_coprocessor(void)
93{
94 outb(0, 0xf0);
95 io_delay();
96 outb(0, 0xf1);
97 io_delay();
98}
99
100/*
101 * Set up the GDT
102 */
103#define GDT_ENTRY(flags,base,limit) \
104 (((u64)(base & 0xff000000) << 32) | \
105 ((u64)flags << 40) | \
106 ((u64)(limit & 0x00ff0000) << 32) | \
107 ((u64)(base & 0x00ffff00) << 16) | \
108 ((u64)(limit & 0x0000ffff)))
109
110struct gdt_ptr {
111 u16 len;
112 u32 ptr;
113} __attribute__((packed));
114
115static void setup_gdt(void)
116{
117 /* There are machines which are known to not boot with the GDT
118 being 8-byte unaligned. Intel recommends 16 byte alignment. */
119 static const u64 boot_gdt[] __attribute__((aligned(16))) = {
120 /* CS: code, read/execute, 4 GB, base 0 */
121 [GDT_ENTRY_BOOT_CS] = GDT_ENTRY(0xc09b, 0, 0xfffff),
122 /* DS: data, read/write, 4 GB, base 0 */
123 [GDT_ENTRY_BOOT_DS] = GDT_ENTRY(0xc093, 0, 0xfffff),
124 };
125 struct gdt_ptr gdt;
126
127 gdt.len = sizeof(boot_gdt)-1;
128 gdt.ptr = (u32)&boot_gdt + (ds() << 4);
129
130 asm volatile("lgdtl %0" : : "m" (gdt));
131}
132
133/*
134 * Set up the IDT
135 */
136static void setup_idt(void)
137{
138 static const struct gdt_ptr null_idt = {0, 0};
139 asm volatile("lidtl %0" : : "m" (null_idt));
140}
141
142/*
143 * Actual invocation sequence
144 */
145void go_to_protected_mode(void)
146{
147 /* Hook before leaving real mode, also disables interrupts */
148 realmode_switch_hook();
149
150 /* Move the kernel/setup to their final resting places */
151 move_kernel_around();
152
153 /* Enable the A20 gate */
154 if (enable_a20()) {
155 puts("A20 gate not responding, unable to boot...\n");
156 die();
157 }
158
159 /* Reset coprocessor (IGNNE#) */
160 reset_coprocessor();
161
162 /* Mask all interrupts in the PIC */
163 mask_all_interrupts();
164
165 /* Actual transition to protected mode... */
166 setup_idt();
167 setup_gdt();
168 protected_mode_jump(boot_params.hdr.code32_start,
169 (u32)&boot_params + (ds() << 4));
170}
diff --git a/arch/i386/boot/pmjump.S b/arch/i386/boot/pmjump.S
new file mode 100644
index 0000000000..2e55923372
--- /dev/null
+++ b/arch/i386/boot/pmjump.S
@@ -0,0 +1,54 @@
1/* ----------------------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/pmjump.S
13 *
14 * The actual transition into protected mode
15 */
16
17#include <asm/boot.h>
18#include <asm/segment.h>
19
20 .text
21
22 .globl protected_mode_jump
23 .type protected_mode_jump, @function
24
25 .code16
26
27/*
28 * void protected_mode_jump(u32 entrypoint, u32 bootparams);
29 */
30protected_mode_jump:
31 xorl %ebx, %ebx # Flag to indicate this is a boot
32 movl %edx, %esi # Pointer to boot_params table
33 movl %eax, 2f # Patch ljmpl instruction
34 jmp 1f # Short jump to flush instruction q.
35
361:
37 movw $__BOOT_DS, %cx
38
39 movl %cr0, %edx
40 orb $1, %dl # Protected mode (PE) bit
41 movl %edx, %cr0
42
43 movw %cx, %ds
44 movw %cx, %es
45 movw %cx, %fs
46 movw %cx, %gs
47 movw %cx, %ss
48
49 # Jump to the 32-bit entrypoint
50 .byte 0x66, 0xea # ljmpl opcode
512: .long 0 # offset
52 .word __BOOT_CS # segment
53
54 .size protected_mode_jump, .-protected_mode_jump
diff --git a/arch/i386/boot/printf.c b/arch/i386/boot/printf.c
new file mode 100644
index 0000000000..1a09f9309d
--- /dev/null
+++ b/arch/i386/boot/printf.c
@@ -0,0 +1,307 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/printf.c
13 *
14 * Oh, it's a waste of space, but oh-so-yummy for debugging. This
15 * version of printf() does not include 64-bit support. "Live with
16 * it."
17 *
18 */
19
20#include "boot.h"
21
22static int skip_atoi(const char **s)
23{
24 int i = 0;
25
26 while (isdigit(**s))
27 i = i * 10 + *((*s)++) - '0';
28 return i;
29}
30
31#define ZEROPAD 1 /* pad with zero */
32#define SIGN 2 /* unsigned/signed long */
33#define PLUS 4 /* show plus */
34#define SPACE 8 /* space if plus */
35#define LEFT 16 /* left justified */
36#define SPECIAL 32 /* 0x */
37#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */
38
39#define do_div(n,base) ({ \
40int __res; \
41__res = ((unsigned long) n) % (unsigned) base; \
42n = ((unsigned long) n) / (unsigned) base; \
43__res; })
44
45static char *number(char *str, long num, int base, int size, int precision,
46 int type)
47{
48 char c, sign, tmp[66];
49 const char *digits = "0123456789abcdefghijklmnopqrstuvwxyz";
50 int i;
51
52 if (type & LARGE)
53 digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
54 if (type & LEFT)
55 type &= ~ZEROPAD;
56 if (base < 2 || base > 36)
57 return 0;
58 c = (type & ZEROPAD) ? '0' : ' ';
59 sign = 0;
60 if (type & SIGN) {
61 if (num < 0) {
62 sign = '-';
63 num = -num;
64 size--;
65 } else if (type & PLUS) {
66 sign = '+';
67 size--;
68 } else if (type & SPACE) {
69 sign = ' ';
70 size--;
71 }
72 }
73 if (type & SPECIAL) {
74 if (base == 16)
75 size -= 2;
76 else if (base == 8)
77 size--;
78 }
79 i = 0;
80 if (num == 0)
81 tmp[i++] = '0';
82 else
83 while (num != 0)
84 tmp[i++] = digits[do_div(num, base)];
85 if (i > precision)
86 precision = i;
87 size -= precision;
88 if (!(type & (ZEROPAD + LEFT)))
89 while (size-- > 0)
90 *str++ = ' ';
91 if (sign)
92 *str++ = sign;
93 if (type & SPECIAL) {
94 if (base == 8)
95 *str++ = '0';
96 else if (base == 16) {
97 *str++ = '0';
98 *str++ = digits[33];
99 }
100 }
101 if (!(type & LEFT))
102 while (size-- > 0)
103 *str++ = c;
104 while (i < precision--)
105 *str++ = '0';
106 while (i-- > 0)
107 *str++ = tmp[i];
108 while (size-- > 0)
109 *str++ = ' ';
110 return str;
111}
112
113int vsprintf(char *buf, const char *fmt, va_list args)
114{
115 int len;
116 unsigned long num;
117 int i, base;
118 char *str;
119 const char *s;
120
121 int flags; /* flags to number() */
122
123 int field_width; /* width of output field */
124 int precision; /* min. # of digits for integers; max
125 number of chars for from string */
126 int qualifier; /* 'h', 'l', or 'L' for integer fields */
127
128 for (str = buf; *fmt; ++fmt) {
129 if (*fmt != '%') {
130 *str++ = *fmt;
131 continue;
132 }
133
134 /* process flags */
135 flags = 0;
136 repeat:
137 ++fmt; /* this also skips first '%' */
138 switch (*fmt) {
139 case '-':
140 flags |= LEFT;
141 goto repeat;
142 case '+':
143 flags |= PLUS;
144 goto repeat;
145 case ' ':
146 flags |= SPACE;
147 goto repeat;
148 case '#':
149 flags |= SPECIAL;
150 goto repeat;
151 case '0':
152 flags |= ZEROPAD;
153 goto repeat;
154 }
155
156 /* get field width */
157 field_width = -1;
158 if (isdigit(*fmt))
159 field_width = skip_atoi(&fmt);
160 else if (*fmt == '*') {
161 ++fmt;
162 /* it's the next argument */
163 field_width = va_arg(args, int);
164 if (field_width < 0) {
165 field_width = -field_width;
166 flags |= LEFT;
167 }
168 }
169
170 /* get the precision */
171 precision = -1;
172 if (*fmt == '.') {
173 ++fmt;
174 if (isdigit(*fmt))
175 precision = skip_atoi(&fmt);
176 else if (*fmt == '*') {
177 ++fmt;
178 /* it's the next argument */
179 precision = va_arg(args, int);
180 }
181 if (precision < 0)
182 precision = 0;
183 }
184
185 /* get the conversion qualifier */
186 qualifier = -1;
187 if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L') {
188 qualifier = *fmt;
189 ++fmt;
190 }
191
192 /* default base */
193 base = 10;
194
195 switch (*fmt) {
196 case 'c':
197 if (!(flags & LEFT))
198 while (--field_width > 0)
199 *str++ = ' ';
200 *str++ = (unsigned char)va_arg(args, int);
201 while (--field_width > 0)
202 *str++ = ' ';
203 continue;
204
205 case 's':
206 s = va_arg(args, char *);
207 len = strnlen(s, precision);
208
209 if (!(flags & LEFT))
210 while (len < field_width--)
211 *str++ = ' ';
212 for (i = 0; i < len; ++i)
213 *str++ = *s++;
214 while (len < field_width--)
215 *str++ = ' ';
216 continue;
217
218 case 'p':
219 if (field_width == -1) {
220 field_width = 2 * sizeof(void *);
221 flags |= ZEROPAD;
222 }
223 str = number(str,
224 (unsigned long)va_arg(args, void *), 16,
225 field_width, precision, flags);
226 continue;
227
228 case 'n':
229 if (qualifier == 'l') {
230 long *ip = va_arg(args, long *);
231 *ip = (str - buf);
232 } else {
233 int *ip = va_arg(args, int *);
234 *ip = (str - buf);
235 }
236 continue;
237
238 case '%':
239 *str++ = '%';
240 continue;
241
242 /* integer number formats - set up the flags and "break" */
243 case 'o':
244 base = 8;
245 break;
246
247 case 'X':
248 flags |= LARGE;
249 case 'x':
250 base = 16;
251 break;
252
253 case 'd':
254 case 'i':
255 flags |= SIGN;
256 case 'u':
257 break;
258
259 default:
260 *str++ = '%';
261 if (*fmt)
262 *str++ = *fmt;
263 else
264 --fmt;
265 continue;
266 }
267 if (qualifier == 'l')
268 num = va_arg(args, unsigned long);
269 else if (qualifier == 'h') {
270 num = (unsigned short)va_arg(args, int);
271 if (flags & SIGN)
272 num = (short)num;
273 } else if (flags & SIGN)
274 num = va_arg(args, int);
275 else
276 num = va_arg(args, unsigned int);
277 str = number(str, num, base, field_width, precision, flags);
278 }
279 *str = '\0';
280 return str - buf;
281}
282
283int sprintf(char *buf, const char *fmt, ...)
284{
285 va_list args;
286 int i;
287
288 va_start(args, fmt);
289 i = vsprintf(buf, fmt, args);
290 va_end(args);
291 return i;
292}
293
294int printf(const char *fmt, ...)
295{
296 char printf_buf[1024];
297 va_list args;
298 int printed;
299
300 va_start(args, fmt);
301 printed = vsprintf(printf_buf, fmt, args);
302 va_end(args);
303
304 puts(printf_buf);
305
306 return printed;
307}
diff --git a/arch/i386/boot/setup.S b/arch/i386/boot/setup.S
deleted file mode 100644
index 6dbcc95b21..0000000000
--- a/arch/i386/boot/setup.S
+++ /dev/null
@@ -1,1075 +0,0 @@
1/*
2 * setup.S Copyright (C) 1991, 1992 Linus Torvalds
3 *
4 * setup.s is responsible for getting the system data from the BIOS,
5 * and putting them into the appropriate places in system memory.
6 * both setup.s and system has been loaded by the bootblock.
7 *
8 * This code asks the bios for memory/disk/other parameters, and
9 * puts them in a "safe" place: 0x90000-0x901FF, ie where the
10 * boot-block used to be. It is then up to the protected mode
11 * system to read them from there before the area is overwritten
12 * for buffer-blocks.
13 *
14 * Move PS/2 aux init code to psaux.c
15 * (troyer@saifr00.cfsat.Honeywell.COM) 03Oct92
16 *
17 * some changes and additional features by Christoph Niemann,
18 * March 1993/June 1994 (Christoph.Niemann@linux.org)
19 *
20 * add APM BIOS checking by Stephen Rothwell, May 1994
21 * (sfr@canb.auug.org.au)
22 *
23 * High load stuff, initrd support and position independency
24 * by Hans Lermen & Werner Almesberger, February 1996
25 * <lermen@elserv.ffm.fgan.de>, <almesber@lrc.epfl.ch>
26 *
27 * Video handling moved to video.S by Martin Mares, March 1996
28 * <mj@k332.feld.cvut.cz>
29 *
30 * Extended memory detection scheme retwiddled by orc@pell.chi.il.us (david
31 * parsons) to avoid loadlin confusion, July 1997
32 *
33 * Transcribed from Intel (as86) -> AT&T (gas) by Chris Noe, May 1999.
34 * <stiker@northlink.com>
35 *
36 * Fix to work around buggy BIOSes which don't use carry bit correctly
37 * and/or report extended memory in CX/DX for e801h memory size detection
38 * call. As a result the kernel got wrong figures. The int15/e801h docs
39 * from Ralf Brown interrupt list seem to indicate AX/BX should be used
40 * anyway. So to avoid breaking many machines (presumably there was a reason
41 * to orginally use CX/DX instead of AX/BX), we do a kludge to see
42 * if CX/DX have been changed in the e801 call and if so use AX/BX .
43 * Michael Miller, April 2001 <michaelm@mjmm.org>
44 *
45 * New A20 code ported from SYSLINUX by H. Peter Anvin. AMD Elan bugfixes
46 * by Robert Schwebel, December 2001 <robert@schwebel.de>
47 */
48
49#include <asm/segment.h>
50#include <linux/utsrelease.h>
51#include <linux/compile.h>
52#include <asm/boot.h>
53#include <asm/e820.h>
54#include <asm/page.h>
55#include <asm/setup.h>
56
57/* Signature words to ensure LILO loaded us right */
58#define SIG1 0xAA55
59#define SIG2 0x5A5A
60
61INITSEG = DEF_INITSEG # 0x9000, we move boot here, out of the way
62SYSSEG = DEF_SYSSEG # 0x1000, system loaded at 0x10000 (65536).
63SETUPSEG = DEF_SETUPSEG # 0x9020, this is the current segment
64 # ... and the former contents of CS
65
66DELTA_INITSEG = SETUPSEG - INITSEG # 0x0020
67
68.code16
69.globl begtext, begdata, begbss, endtext, enddata, endbss
70
71.text
72begtext:
73.data
74begdata:
75.bss
76begbss:
77.text
78
79start:
80 jmp trampoline
81
82# This is the setup header, and it must start at %cs:2 (old 0x9020:2)
83
84 .ascii "HdrS" # header signature
85 .word 0x0206 # header version number (>= 0x0105)
86 # or else old loadlin-1.5 will fail)
87realmode_swtch: .word 0, 0 # default_switch, SETUPSEG
88start_sys_seg: .word SYSSEG
89 .word kernel_version # pointing to kernel version string
90 # above section of header is compatible
91 # with loadlin-1.5 (header v1.5). Don't
92 # change it.
93
94type_of_loader: .byte 0 # = 0, old one (LILO, Loadlin,
95 # Bootlin, SYSLX, bootsect...)
96 # See Documentation/i386/boot.txt for
97 # assigned ids
98
99# flags, unused bits must be zero (RFU) bit within loadflags
100loadflags:
101LOADED_HIGH = 1 # If set, the kernel is loaded high
102CAN_USE_HEAP = 0x80 # If set, the loader also has set
103 # heap_end_ptr to tell how much
104 # space behind setup.S can be used for
105 # heap purposes.
106 # Only the loader knows what is free
107#ifndef __BIG_KERNEL__
108 .byte 0
109#else
110 .byte LOADED_HIGH
111#endif
112
113setup_move_size: .word 0x8000 # size to move, when setup is not
114 # loaded at 0x90000. We will move setup
115 # to 0x90000 then just before jumping
116 # into the kernel. However, only the
117 # loader knows how much data behind
118 # us also needs to be loaded.
119
120code32_start: # here loaders can put a different
121 # start address for 32-bit code.
122#ifndef __BIG_KERNEL__
123 .long 0x1000 # 0x1000 = default for zImage
124#else
125 .long 0x100000 # 0x100000 = default for big kernel
126#endif
127
128ramdisk_image: .long 0 # address of loaded ramdisk image
129 # Here the loader puts the 32-bit
130 # address where it loaded the image.
131 # This only will be read by the kernel.
132
133ramdisk_size: .long 0 # its size in bytes
134
135bootsect_kludge:
136 .long 0 # obsolete
137
138heap_end_ptr: .word modelist+1024 # (Header version 0x0201 or later)
139 # space from here (exclusive) down to
140 # end of setup code can be used by setup
141 # for local heap purposes.
142
143pad1: .word 0
144cmd_line_ptr: .long 0 # (Header version 0x0202 or later)
145 # If nonzero, a 32-bit pointer
146 # to the kernel command line.
147 # The command line should be
148 # located between the start of
149 # setup and the end of low
150 # memory (0xa0000), or it may
151 # get overwritten before it
152 # gets read. If this field is
153 # used, there is no longer
154 # anything magical about the
155 # 0x90000 segment; the setup
156 # can be located anywhere in
157 # low memory 0x10000 or higher.
158
159ramdisk_max: .long (-__PAGE_OFFSET-(512 << 20)-1) & 0x7fffffff
160 # (Header version 0x0203 or later)
161 # The highest safe address for
162 # the contents of an initrd
163
164kernel_alignment: .long CONFIG_PHYSICAL_ALIGN #physical addr alignment
165 #required for protected mode
166 #kernel
167#ifdef CONFIG_RELOCATABLE
168relocatable_kernel: .byte 1
169#else
170relocatable_kernel: .byte 0
171#endif
172pad2: .byte 0
173pad3: .word 0
174
175cmdline_size: .long COMMAND_LINE_SIZE-1 #length of the command line,
176 #added with boot protocol
177 #version 2.06
178
179trampoline: call start_of_setup
180 .align 16
181 # The offset at this point is 0x240
182 .space (0xeff-0x240+1) # E820 & EDD space (ending at 0xeff)
183# End of setup header #####################################################
184
185start_of_setup:
186# Bootlin depends on this being done early
187 movw $0x01500, %ax
188 movb $0x81, %dl
189 int $0x13
190
191#ifdef SAFE_RESET_DISK_CONTROLLER
192# Reset the disk controller.
193 movw $0x0000, %ax
194 movb $0x80, %dl
195 int $0x13
196#endif
197
198# Set %ds = %cs, we know that SETUPSEG = %cs at this point
199 movw %cs, %ax # aka SETUPSEG
200 movw %ax, %ds
201# Check signature at end of setup
202 cmpw $SIG1, setup_sig1
203 jne bad_sig
204
205 cmpw $SIG2, setup_sig2
206 jne bad_sig
207
208 jmp good_sig1
209
210# Routine to print asciiz string at ds:si
211prtstr:
212 lodsb
213 andb %al, %al
214 jz fin
215
216 call prtchr
217 jmp prtstr
218
219fin: ret
220
221# Space printing
222prtsp2: call prtspc # Print double space
223prtspc: movb $0x20, %al # Print single space (note: fall-thru)
224
225# Part of above routine, this one just prints ascii al
226prtchr: pushw %ax
227 pushw %cx
228 movw $7,%bx
229 movw $0x01, %cx
230 movb $0x0e, %ah
231 int $0x10
232 popw %cx
233 popw %ax
234 ret
235
236beep: movb $0x07, %al
237 jmp prtchr
238
239no_sig_mess: .string "No setup signature found ..."
240
241good_sig1:
242 jmp good_sig
243
244# We now have to find the rest of the setup code/data
245bad_sig:
246 movw %cs, %ax # SETUPSEG
247 subw $DELTA_INITSEG, %ax # INITSEG
248 movw %ax, %ds
249 xorb %bh, %bh
250 movb (497), %bl # get setup sect from bootsect
251 subw $4, %bx # LILO loads 4 sectors of setup
252 shlw $8, %bx # convert to words (1sect=2^8 words)
253 movw %bx, %cx
254 shrw $3, %bx # convert to segment
255 addw $SYSSEG, %bx
256 movw %bx, %cs:start_sys_seg
257# Move rest of setup code/data to here
258 movw $2048, %di # four sectors loaded by LILO
259 subw %si, %si
260 pushw %cs
261 popw %es
262 movw $SYSSEG, %ax
263 movw %ax, %ds
264 rep
265 movsw
266 movw %cs, %ax # aka SETUPSEG
267 movw %ax, %ds
268 cmpw $SIG1, setup_sig1
269 jne no_sig
270
271 cmpw $SIG2, setup_sig2
272 jne no_sig
273
274 jmp good_sig
275
276no_sig:
277 lea no_sig_mess, %si
278 call prtstr
279
280no_sig_loop:
281 hlt
282 jmp no_sig_loop
283
284good_sig:
285 movw %cs, %ax # aka SETUPSEG
286 subw $DELTA_INITSEG, %ax # aka INITSEG
287 movw %ax, %ds
288# Check if an old loader tries to load a big-kernel
289 testb $LOADED_HIGH, %cs:loadflags # Do we have a big kernel?
290 jz loader_ok # No, no danger for old loaders.
291
292 cmpb $0, %cs:type_of_loader # Do we have a loader that
293 # can deal with us?
294 jnz loader_ok # Yes, continue.
295
296 pushw %cs # No, we have an old loader,
297 popw %ds # die.
298 lea loader_panic_mess, %si
299 call prtstr
300
301 jmp no_sig_loop
302
303loader_panic_mess: .string "Wrong loader, giving up..."
304
305# check minimum cpuid
306# we do this here because it is the last place we can actually
307# show a user visible error message. Later the video modus
308# might be already messed up.
309loader_ok:
310 call verify_cpu
311 testl %eax,%eax
312 jz cpu_ok
313 movw %cs,%ax # aka SETUPSEG
314 movw %ax,%ds
315 lea cpu_panic_mess,%si
316 call prtstr
3171: jmp 1b
318
319cpu_panic_mess:
320 .asciz "PANIC: CPU too old for this kernel."
321
322#include "../kernel/verify_cpu.S"
323
324cpu_ok:
325# Get memory size (extended mem, kB)
326
327 xorl %eax, %eax
328 movl %eax, (0x1e0)
329#ifndef STANDARD_MEMORY_BIOS_CALL
330 movb %al, (E820NR)
331# Try three different memory detection schemes. First, try
332# e820h, which lets us assemble a memory map, then try e801h,
333# which returns a 32-bit memory size, and finally 88h, which
334# returns 0-64m
335
336# method E820H:
337# the memory map from hell. e820h returns memory classified into
338# a whole bunch of different types, and allows memory holes and
339# everything. We scan through this memory map and build a list
340# of the first 32 memory areas, which we return at [E820MAP].
341# This is documented at http://www.acpi.info/, in the ACPI 2.0 specification.
342
343#define SMAP 0x534d4150
344
345meme820:
346 xorl %ebx, %ebx # continuation counter
347 movw $E820MAP, %di # point into the whitelist
348 # so we can have the bios
349 # directly write into it.
350
351jmpe820:
352 movl $0x0000e820, %eax # e820, upper word zeroed
353 movl $SMAP, %edx # ascii 'SMAP'
354 movl $20, %ecx # size of the e820rec
355 pushw %ds # data record.
356 popw %es
357 int $0x15 # make the call
358 jc bail820 # fall to e801 if it fails
359
360 cmpl $SMAP, %eax # check the return is `SMAP'
361 jne bail820 # fall to e801 if it fails
362
363# cmpl $1, 16(%di) # is this usable memory?
364# jne again820
365
366 # If this is usable memory, we save it by simply advancing %di by
367 # sizeof(e820rec).
368 #
369good820:
370 movb (E820NR), %al # up to 128 entries
371 cmpb $E820MAX, %al
372 jae bail820
373
374 incb (E820NR)
375 movw %di, %ax
376 addw $20, %ax
377 movw %ax, %di
378again820:
379 cmpl $0, %ebx # check to see if
380 jne jmpe820 # %ebx is set to EOF
381bail820:
382
383
384# method E801H:
385# memory size is in 1k chunksizes, to avoid confusing loadlin.
386# we store the 0xe801 memory size in a completely different place,
387# because it will most likely be longer than 16 bits.
388# (use 1e0 because that's what Larry Augustine uses in his
389# alternative new memory detection scheme, and it's sensible
390# to write everything into the same place.)
391
392meme801:
393 stc # fix to work around buggy
394 xorw %cx,%cx # BIOSes which don't clear/set
395 xorw %dx,%dx # carry on pass/error of
396 # e801h memory size call
397 # or merely pass cx,dx though
398 # without changing them.
399 movw $0xe801, %ax
400 int $0x15
401 jc mem88
402
403 cmpw $0x0, %cx # Kludge to handle BIOSes
404 jne e801usecxdx # which report their extended
405 cmpw $0x0, %dx # memory in AX/BX rather than
406 jne e801usecxdx # CX/DX. The spec I have read
407 movw %ax, %cx # seems to indicate AX/BX
408 movw %bx, %dx # are more reasonable anyway...
409
410e801usecxdx:
411 andl $0xffff, %edx # clear sign extend
412 shll $6, %edx # and go from 64k to 1k chunks
413 movl %edx, (0x1e0) # store extended memory size
414 andl $0xffff, %ecx # clear sign extend
415 addl %ecx, (0x1e0) # and add lower memory into
416 # total size.
417
418# Ye Olde Traditional Methode. Returns the memory size (up to 16mb or
419# 64mb, depending on the bios) in ax.
420mem88:
421
422#endif
423 movb $0x88, %ah
424 int $0x15
425 movw %ax, (2)
426
427# Set the keyboard repeat rate to the max
428 movw $0x0305, %ax
429 xorw %bx, %bx
430 int $0x16
431
432# Check for video adapter and its parameters and allow the
433# user to browse video modes.
434 call video # NOTE: we need %ds pointing
435 # to bootsector
436
437# Get hd0 data...
438 xorw %ax, %ax
439 movw %ax, %ds
440 ldsw (4 * 0x41), %si
441 movw %cs, %ax # aka SETUPSEG
442 subw $DELTA_INITSEG, %ax # aka INITSEG
443 pushw %ax
444 movw %ax, %es
445 movw $0x0080, %di
446 movw $0x10, %cx
447 pushw %cx
448 cld
449 rep
450 movsb
451# Get hd1 data...
452 xorw %ax, %ax
453 movw %ax, %ds
454 ldsw (4 * 0x46), %si
455 popw %cx
456 popw %es
457 movw $0x0090, %di
458 rep
459 movsb
460# Check that there IS a hd1 :-)
461 movw $0x01500, %ax
462 movb $0x81, %dl
463 int $0x13
464 jc no_disk1
465
466 cmpb $3, %ah
467 je is_disk1
468
469no_disk1:
470 movw %cs, %ax # aka SETUPSEG
471 subw $DELTA_INITSEG, %ax # aka INITSEG
472 movw %ax, %es
473 movw $0x0090, %di
474 movw $0x10, %cx
475 xorw %ax, %ax
476 cld
477 rep
478 stosb
479is_disk1:
480# check for Micro Channel (MCA) bus
481 movw %cs, %ax # aka SETUPSEG
482 subw $DELTA_INITSEG, %ax # aka INITSEG
483 movw %ax, %ds
484 xorw %ax, %ax
485 movw %ax, (0xa0) # set table length to 0
486 movb $0xc0, %ah
487 stc
488 int $0x15 # moves feature table to es:bx
489 jc no_mca
490
491 pushw %ds
492 movw %es, %ax
493 movw %ax, %ds
494 movw %cs, %ax # aka SETUPSEG
495 subw $DELTA_INITSEG, %ax # aka INITSEG
496 movw %ax, %es
497 movw %bx, %si
498 movw $0xa0, %di
499 movw (%si), %cx
500 addw $2, %cx # table length is a short
501 cmpw $0x10, %cx
502 jc sysdesc_ok
503
504 movw $0x10, %cx # we keep only first 16 bytes
505sysdesc_ok:
506 rep
507 movsb
508 popw %ds
509no_mca:
510#ifdef CONFIG_X86_VOYAGER
511 movb $0xff, 0x40 # flag on config found
512 movb $0xc0, %al
513 mov $0xff, %ah
514 int $0x15 # put voyager config info at es:di
515 jc no_voyager
516 movw $0x40, %si # place voyager info in apm table
517 cld
518 movw $7, %cx
519voyager_rep:
520 movb %es:(%di), %al
521 movb %al,(%si)
522 incw %di
523 incw %si
524 decw %cx
525 jnz voyager_rep
526no_voyager:
527#endif
528# Check for PS/2 pointing device
529 movw %cs, %ax # aka SETUPSEG
530 subw $DELTA_INITSEG, %ax # aka INITSEG
531 movw %ax, %ds
532 movb $0, (0x1ff) # default is no pointing device
533 int $0x11 # int 0x11: equipment list
534 testb $0x04, %al # check if mouse installed
535 jz no_psmouse
536
537 movb $0xAA, (0x1ff) # device present
538no_psmouse:
539
540#if defined(CONFIG_X86_SPEEDSTEP_SMI) || defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE)
541 movl $0x0000E980, %eax # IST Support
542 movl $0x47534943, %edx # Request value
543 int $0x15
544
545 movl %eax, (96)
546 movl %ebx, (100)
547 movl %ecx, (104)
548 movl %edx, (108)
549#endif
550
551#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
552# Then check for an APM BIOS...
553 # %ds points to the bootsector
554 movw $0, 0x40 # version = 0 means no APM BIOS
555 movw $0x05300, %ax # APM BIOS installation check
556 xorw %bx, %bx
557 int $0x15
558 jc done_apm_bios # Nope, no APM BIOS
559
560 cmpw $0x0504d, %bx # Check for "PM" signature
561 jne done_apm_bios # No signature, no APM BIOS
562
563 andw $0x02, %cx # Is 32 bit supported?
564 je done_apm_bios # No 32-bit, no (good) APM BIOS
565
566 movw $0x05304, %ax # Disconnect first just in case
567 xorw %bx, %bx
568 int $0x15 # ignore return code
569 movw $0x05303, %ax # 32 bit connect
570 xorl %ebx, %ebx
571 xorw %cx, %cx # paranoia :-)
572 xorw %dx, %dx # ...
573 xorl %esi, %esi # ...
574 xorw %di, %di # ...
575 int $0x15
576 jc no_32_apm_bios # Ack, error.
577
578 movw %ax, (66) # BIOS code segment
579 movl %ebx, (68) # BIOS entry point offset
580 movw %cx, (72) # BIOS 16 bit code segment
581 movw %dx, (74) # BIOS data segment
582 movl %esi, (78) # BIOS code segment lengths
583 movw %di, (82) # BIOS data segment length
584# Redo the installation check as the 32 bit connect
585# modifies the flags returned on some BIOSs
586 movw $0x05300, %ax # APM BIOS installation check
587 xorw %bx, %bx
588 xorw %cx, %cx # paranoia
589 int $0x15
590 jc apm_disconnect # error -> shouldn't happen
591
592 cmpw $0x0504d, %bx # check for "PM" signature
593 jne apm_disconnect # no sig -> shouldn't happen
594
595 movw %ax, (64) # record the APM BIOS version
596 movw %cx, (76) # and flags
597 jmp done_apm_bios
598
599apm_disconnect: # Tidy up
600 movw $0x05304, %ax # Disconnect
601 xorw %bx, %bx
602 int $0x15 # ignore return code
603
604 jmp done_apm_bios
605
606no_32_apm_bios:
607 andw $0xfffd, (76) # remove 32 bit support bit
608done_apm_bios:
609#endif
610
611#include "edd.S"
612
613# Now we want to move to protected mode ...
614 cmpw $0, %cs:realmode_swtch
615 jz rmodeswtch_normal
616
617 lcall *%cs:realmode_swtch
618
619 jmp rmodeswtch_end
620
621rmodeswtch_normal:
622 pushw %cs
623 call default_switch
624
625rmodeswtch_end:
626# Now we move the system to its rightful place ... but we check if we have a
627# big-kernel. In that case we *must* not move it ...
628 testb $LOADED_HIGH, %cs:loadflags
629 jz do_move0 # .. then we have a normal low
630 # loaded zImage
631 # .. or else we have a high
632 # loaded bzImage
633 jmp end_move # ... and we skip moving
634
635do_move0:
636 movw $0x100, %ax # start of destination segment
637 movw %cs, %bp # aka SETUPSEG
638 subw $DELTA_INITSEG, %bp # aka INITSEG
639 movw %cs:start_sys_seg, %bx # start of source segment
640 cld
641do_move:
642 movw %ax, %es # destination segment
643 incb %ah # instead of add ax,#0x100
644 movw %bx, %ds # source segment
645 addw $0x100, %bx
646 subw %di, %di
647 subw %si, %si
648 movw $0x800, %cx
649 rep
650 movsw
651 cmpw %bp, %bx # assume start_sys_seg > 0x200,
652 # so we will perhaps read one
653 # page more than needed, but
654 # never overwrite INITSEG
655 # because destination is a
656 # minimum one page below source
657 jb do_move
658
659end_move:
660# then we load the segment descriptors
661 movw %cs, %ax # aka SETUPSEG
662 movw %ax, %ds
663
664# Check whether we need to be downward compatible with version <=201
665 cmpl $0, cmd_line_ptr
666 jne end_move_self # loader uses version >=202 features
667 cmpb $0x20, type_of_loader
668 je end_move_self # bootsect loader, we know of it
669
670# Boot loader doesnt support boot protocol version 2.02.
671# If we have our code not at 0x90000, we need to move it there now.
672# We also then need to move the params behind it (commandline)
673# Because we would overwrite the code on the current IP, we move
674# it in two steps, jumping high after the first one.
675 movw %cs, %ax
676 cmpw $SETUPSEG, %ax
677 je end_move_self
678
679 cli # make sure we really have
680 # interrupts disabled !
681 # because after this the stack
682 # should not be used
683 subw $DELTA_INITSEG, %ax # aka INITSEG
684 movw %ss, %dx
685 cmpw %ax, %dx
686 jb move_self_1
687
688 addw $INITSEG, %dx
689 subw %ax, %dx # this will go into %ss after
690 # the move
691move_self_1:
692 movw %ax, %ds
693 movw $INITSEG, %ax # real INITSEG
694 movw %ax, %es
695 movw %cs:setup_move_size, %cx
696 std # we have to move up, so we use
697 # direction down because the
698 # areas may overlap
699 movw %cx, %di
700 decw %di
701 movw %di, %si
702 subw $move_self_here+0x200, %cx
703 rep
704 movsb
705 ljmp $SETUPSEG, $move_self_here
706
707move_self_here:
708 movw $move_self_here+0x200, %cx
709 rep
710 movsb
711 movw $SETUPSEG, %ax
712 movw %ax, %ds
713 movw %dx, %ss
714end_move_self: # now we are at the right place
715
716#
717# Enable A20. This is at the very best an annoying procedure.
718# A20 code ported from SYSLINUX 1.52-1.63 by H. Peter Anvin.
719# AMD Elan bug fix by Robert Schwebel.
720#
721
722#if defined(CONFIG_X86_ELAN)
723 movb $0x02, %al # alternate A20 gate
724 outb %al, $0x92 # this works on SC410/SC520
725a20_elan_wait:
726 call a20_test
727 jz a20_elan_wait
728 jmp a20_done
729#endif
730
731
732A20_TEST_LOOPS = 32 # Iterations per wait
733A20_ENABLE_LOOPS = 255 # Total loops to try
734
735
736#ifndef CONFIG_X86_VOYAGER
737a20_try_loop:
738
739 # First, see if we are on a system with no A20 gate.
740a20_none:
741 call a20_test
742 jnz a20_done
743
744 # Next, try the BIOS (INT 0x15, AX=0x2401)
745a20_bios:
746 movw $0x2401, %ax
747 pushfl # Be paranoid about flags
748 int $0x15
749 popfl
750
751 call a20_test
752 jnz a20_done
753
754 # Try enabling A20 through the keyboard controller
755#endif /* CONFIG_X86_VOYAGER */
756a20_kbc:
757 call empty_8042
758
759#ifndef CONFIG_X86_VOYAGER
760 call a20_test # Just in case the BIOS worked
761 jnz a20_done # but had a delayed reaction.
762#endif
763
764 movb $0xD1, %al # command write
765 outb %al, $0x64
766 call empty_8042
767
768 movb $0xDF, %al # A20 on
769 outb %al, $0x60
770 call empty_8042
771
772#ifndef CONFIG_X86_VOYAGER
773 # Wait until a20 really *is* enabled; it can take a fair amount of
774 # time on certain systems; Toshiba Tecras are known to have this
775 # problem.
776a20_kbc_wait:
777 xorw %cx, %cx
778a20_kbc_wait_loop:
779 call a20_test
780 jnz a20_done
781 loop a20_kbc_wait_loop
782
783 # Final attempt: use "configuration port A"
784a20_fast:
785 inb $0x92, %al # Configuration Port A
786 orb $0x02, %al # "fast A20" version
787 andb $0xFE, %al # don't accidentally reset
788 outb %al, $0x92
789
790 # Wait for configuration port A to take effect
791a20_fast_wait:
792 xorw %cx, %cx
793a20_fast_wait_loop:
794 call a20_test
795 jnz a20_done
796 loop a20_fast_wait_loop
797
798 # A20 is still not responding. Try frobbing it again.
799 #
800 decb (a20_tries)
801 jnz a20_try_loop
802
803 movw $a20_err_msg, %si
804 call prtstr
805
806a20_die:
807 hlt
808 jmp a20_die
809
810a20_tries:
811 .byte A20_ENABLE_LOOPS
812
813a20_err_msg:
814 .ascii "linux: fatal error: A20 gate not responding!"
815 .byte 13, 10, 0
816
817 # If we get here, all is good
818a20_done:
819
820#endif /* CONFIG_X86_VOYAGER */
821# set up gdt and idt and 32bit start address
822 lidt idt_48 # load idt with 0,0
823 xorl %eax, %eax # Compute gdt_base
824 movw %ds, %ax # (Convert %ds:gdt to a linear ptr)
825 shll $4, %eax
826 addl %eax, code32
827 addl $gdt, %eax
828 movl %eax, (gdt_48+2)
829 lgdt gdt_48 # load gdt with whatever is
830 # appropriate
831
832# make sure any possible coprocessor is properly reset..
833 xorw %ax, %ax
834 outb %al, $0xf0
835 call delay
836
837 outb %al, $0xf1
838 call delay
839
840# well, that went ok, I hope. Now we mask all interrupts - the rest
841# is done in init_IRQ().
842 movb $0xFF, %al # mask all interrupts for now
843 outb %al, $0xA1
844 call delay
845
846 movb $0xFB, %al # mask all irq's but irq2 which
847 outb %al, $0x21 # is cascaded
848
849# Well, that certainly wasn't fun :-(. Hopefully it works, and we don't
850# need no steenking BIOS anyway (except for the initial loading :-).
851# The BIOS-routine wants lots of unnecessary data, and it's less
852# "interesting" anyway. This is how REAL programmers do it.
853#
854# Well, now's the time to actually move into protected mode. To make
855# things as simple as possible, we do no register set-up or anything,
856# we let the gnu-compiled 32-bit programs do that. We just jump to
857# absolute address 0x1000 (or the loader supplied one),
858# in 32-bit protected mode.
859#
860# Note that the short jump isn't strictly needed, although there are
861# reasons why it might be a good idea. It won't hurt in any case.
862 movw $1, %ax # protected mode (PE) bit
863 lmsw %ax # This is it!
864 jmp flush_instr
865
866flush_instr:
867 xorw %bx, %bx # Flag to indicate a boot
868 xorl %esi, %esi # Pointer to real-mode code
869 movw %cs, %si
870 subw $DELTA_INITSEG, %si
871 shll $4, %esi # Convert to 32-bit pointer
872
873# jump to startup_32 in arch/i386/boot/compressed/head.S
874#
875# NOTE: For high loaded big kernels we need a
876# jmpi 0x100000,__BOOT_CS
877#
878# but we yet haven't reloaded the CS register, so the default size
879# of the target offset still is 16 bit.
880# However, using an operand prefix (0x66), the CPU will properly
881# take our 48 bit far pointer. (INTeL 80386 Programmer's Reference
882# Manual, Mixing 16-bit and 32-bit code, page 16-6)
883
884 .byte 0x66, 0xea # prefix + jmpi-opcode
885code32: .long startup_32 # will be set to %cs+startup_32
886 .word __BOOT_CS
887.code32
888startup_32:
889 movl $(__BOOT_DS), %eax
890 movl %eax, %ds
891 movl %eax, %es
892 movl %eax, %fs
893 movl %eax, %gs
894 movl %eax, %ss
895
896 xorl %eax, %eax
8971: incl %eax # check that A20 really IS enabled
898 movl %eax, 0x00000000 # loop forever if it isn't
899 cmpl %eax, 0x00100000
900 je 1b
901
902 # Jump to the 32bit entry point
903 jmpl *(code32_start - start + (DELTA_INITSEG << 4))(%esi)
904.code16
905
906# Here's a bunch of information about your current kernel..
907kernel_version: .ascii UTS_RELEASE
908 .ascii " ("
909 .ascii LINUX_COMPILE_BY
910 .ascii "@"
911 .ascii LINUX_COMPILE_HOST
912 .ascii ") "
913 .ascii UTS_VERSION
914 .byte 0
915
916# This is the default real mode switch routine.
917# to be called just before protected mode transition
918default_switch:
919 cli # no interrupts allowed !
920 movb $0x80, %al # disable NMI for bootup
921 # sequence
922 outb %al, $0x70
923 lret
924
925
926#ifndef CONFIG_X86_VOYAGER
927# This routine tests whether or not A20 is enabled. If so, it
928# exits with zf = 0.
929#
930# The memory address used, 0x200, is the int $0x80 vector, which
931# should be safe.
932
933A20_TEST_ADDR = 4*0x80
934
935a20_test:
936 pushw %cx
937 pushw %ax
938 xorw %cx, %cx
939 movw %cx, %fs # Low memory
940 decw %cx
941 movw %cx, %gs # High memory area
942 movw $A20_TEST_LOOPS, %cx
943 movw %fs:(A20_TEST_ADDR), %ax
944 pushw %ax
945a20_test_wait:
946 incw %ax
947 movw %ax, %fs:(A20_TEST_ADDR)
948 call delay # Serialize and make delay constant
949 cmpw %gs:(A20_TEST_ADDR+0x10), %ax
950 loope a20_test_wait
951
952 popw %fs:(A20_TEST_ADDR)
953 popw %ax
954 popw %cx
955 ret
956
957#endif /* CONFIG_X86_VOYAGER */
958
959# This routine checks that the keyboard command queue is empty
960# (after emptying the output buffers)
961#
962# Some machines have delusions that the keyboard buffer is always full
963# with no keyboard attached...
964#
965# If there is no keyboard controller, we will usually get 0xff
966# to all the reads. With each IO taking a microsecond and
967# a timeout of 100,000 iterations, this can take about half a
968# second ("delay" == outb to port 0x80). That should be ok,
969# and should also be plenty of time for a real keyboard controller
970# to empty.
971#
972
973empty_8042:
974 pushl %ecx
975 movl $100000, %ecx
976
977empty_8042_loop:
978 decl %ecx
979 jz empty_8042_end_loop
980
981 call delay
982
983 inb $0x64, %al # 8042 status port
984 testb $1, %al # output buffer?
985 jz no_output
986
987 call delay
988 inb $0x60, %al # read it
989 jmp empty_8042_loop
990
991no_output:
992 testb $2, %al # is input buffer full?
993 jnz empty_8042_loop # yes - loop
994empty_8042_end_loop:
995 popl %ecx
996 ret
997
998# Read the cmos clock. Return the seconds in al
999gettime:
1000 pushw %cx
1001 movb $0x02, %ah
1002 int $0x1a
1003 movb %dh, %al # %dh contains the seconds
1004 andb $0x0f, %al
1005 movb %dh, %ah
1006 movb $0x04, %cl
1007 shrb %cl, %ah
1008 aad
1009 popw %cx
1010 ret
1011
1012# Delay is needed after doing I/O
1013delay:
1014 outb %al,$0x80
1015 ret
1016
1017# Descriptor tables
1018#
1019# NOTE: The intel manual says gdt should be sixteen bytes aligned for
1020# efficiency reasons. However, there are machines which are known not
1021# to boot with misaligned GDTs, so alter this at your peril! If you alter
1022# GDT_ENTRY_BOOT_CS (in asm/segment.h) remember to leave at least two
1023# empty GDT entries (one for NULL and one reserved).
1024#
1025# NOTE: On some CPUs, the GDT must be 8 byte aligned. This is
1026# true for the Voyager Quad CPU card which will not boot without
1027# This directive. 16 byte aligment is recommended by intel.
1028#
1029 .align 16
1030gdt:
1031 .fill GDT_ENTRY_BOOT_CS,8,0
1032
1033 .word 0xFFFF # 4Gb - (0x100000*0x1000 = 4Gb)
1034 .word 0 # base address = 0
1035 .word 0x9A00 # code read/exec
1036 .word 0x00CF # granularity = 4096, 386
1037 # (+5th nibble of limit)
1038
1039 .word 0xFFFF # 4Gb - (0x100000*0x1000 = 4Gb)
1040 .word 0 # base address = 0
1041 .word 0x9200 # data read/write
1042 .word 0x00CF # granularity = 4096, 386
1043 # (+5th nibble of limit)
1044gdt_end:
1045 .align 4
1046
1047 .word 0 # alignment byte
1048idt_48:
1049 .word 0 # idt limit = 0
1050 .word 0, 0 # idt base = 0L
1051
1052 .word 0 # alignment byte
1053gdt_48:
1054 .word gdt_end - gdt - 1 # gdt limit
1055 .word 0, 0 # gdt base (filled in later)
1056
1057# Include video setup & detection code
1058
1059#include "video.S"
1060
1061# Setup signature -- must be last
1062setup_sig1: .word SIG1
1063setup_sig2: .word SIG2
1064
1065# After this point, there is some free space which is used by the video mode
1066# handling code to store the temporary mode table (not used by the kernel).
1067
1068modelist:
1069
1070.text
1071endtext:
1072.data
1073enddata:
1074.bss
1075endbss:
diff --git a/arch/i386/boot/setup.ld b/arch/i386/boot/setup.ld
new file mode 100644
index 0000000000..df9234b3a5
--- /dev/null
+++ b/arch/i386/boot/setup.ld
@@ -0,0 +1,54 @@
1/*
2 * setup.ld
3 *
4 * Linker script for the i386 setup code
5 */
6OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
7OUTPUT_ARCH(i386)
8ENTRY(_start)
9
10SECTIONS
11{
12 . = 0;
13 .bstext : { *(.bstext) }
14 .bsdata : { *(.bsdata) }
15
16 . = 497;
17 .header : { *(.header) }
18 .inittext : { *(.inittext) }
19 .initdata : { *(.initdata) }
20 .text : { *(.text*) }
21
22 . = ALIGN(16);
23 .rodata : { *(.rodata*) }
24
25 .videocards : {
26 video_cards = .;
27 *(.videocards)
28 video_cards_end = .;
29 }
30
31 . = ALIGN(16);
32 .data : { *(.data*) }
33
34 .signature : {
35 setup_sig = .;
36 LONG(0x5a5aaa55)
37 }
38
39
40 . = ALIGN(16);
41 .bss :
42 {
43 __bss_start = .;
44 *(.bss)
45 __bss_end = .;
46 }
47 . = ALIGN(16);
48 _end = .;
49
50 /DISCARD/ : { *(.note*) }
51
52 . = ASSERT(_end <= 0x8000, "Setup too big!");
53 . = ASSERT(hdr == 0x1f1, "The setup header has the wrong offset!");
54}
diff --git a/arch/i386/boot/string.c b/arch/i386/boot/string.c
new file mode 100644
index 0000000000..481a220977
--- /dev/null
+++ b/arch/i386/boot/string.c
@@ -0,0 +1,52 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/string.c
13 *
14 * Very basic string functions
15 */
16
17#include "boot.h"
18
19int strcmp(const char *str1, const char *str2)
20{
21 const unsigned char *s1 = (const unsigned char *)str1;
22 const unsigned char *s2 = (const unsigned char *)str2;
23 int delta = 0;
24
25 while (*s1 || *s2) {
26 delta = *s2 - *s1;
27 if (delta)
28 return delta;
29 s1++;
30 s2++;
31 }
32 return 0;
33}
34
35size_t strnlen(const char *s, size_t maxlen)
36{
37 const char *es = s;
38 while (*es && maxlen) {
39 es++;
40 maxlen--;
41 }
42
43 return (es - s);
44}
45
46unsigned int atou(const char *s)
47{
48 unsigned int i = 0;
49 while (isdigit(*s))
50 i = i * 10 + (*s++ - '0');
51 return i;
52}
diff --git a/arch/i386/boot/tools/build.c b/arch/i386/boot/tools/build.c
index 05798419a6..b4248740ff 100644
--- a/arch/i386/boot/tools/build.c
+++ b/arch/i386/boot/tools/build.c
@@ -1,13 +1,12 @@
1/* 1/*
2 * Copyright (C) 1991, 1992 Linus Torvalds 2 * Copyright (C) 1991, 1992 Linus Torvalds
3 * Copyright (C) 1997 Martin Mares 3 * Copyright (C) 1997 Martin Mares
4 * Copyright (C) 2007 H. Peter Anvin
4 */ 5 */
5 6
6/* 7/*
7 * This file builds a disk-image from three different files: 8 * This file builds a disk-image from two different files:
8 * 9 *
9 * - bootsect: compatibility mbr which prints an error message if
10 * someone tries to boot the kernel directly.
11 * - setup: 8086 machine code, sets up system parm 10 * - setup: 8086 machine code, sets up system parm
12 * - system: 80386 code for actual system 11 * - system: 80386 code for actual system
13 * 12 *
@@ -21,6 +20,7 @@
21 * High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996 20 * High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996
22 * Cross compiling fixes by Gertjan van Wingerde, July 1996 21 * Cross compiling fixes by Gertjan van Wingerde, July 1996
23 * Rewritten by Martin Mares, April 1997 22 * Rewritten by Martin Mares, April 1997
23 * Substantially overhauled by H. Peter Anvin, April 2007
24 */ 24 */
25 25
26#include <stdio.h> 26#include <stdio.h>
@@ -32,23 +32,25 @@
32#include <sys/sysmacros.h> 32#include <sys/sysmacros.h>
33#include <unistd.h> 33#include <unistd.h>
34#include <fcntl.h> 34#include <fcntl.h>
35#include <sys/mman.h>
35#include <asm/boot.h> 36#include <asm/boot.h>
36 37
37typedef unsigned char byte; 38typedef unsigned char u8;
38typedef unsigned short word; 39typedef unsigned short u16;
39typedef unsigned long u32; 40typedef unsigned long u32;
40 41
41#define DEFAULT_MAJOR_ROOT 0 42#define DEFAULT_MAJOR_ROOT 0
42#define DEFAULT_MINOR_ROOT 0 43#define DEFAULT_MINOR_ROOT 0
43 44
44/* Minimal number of setup sectors (see also bootsect.S) */ 45/* Minimal number of setup sectors */
45#define SETUP_SECTS 4 46#define SETUP_SECT_MIN 5
47#define SETUP_SECT_MAX 64
46 48
47byte buf[1024]; 49/* This must be large enough to hold the entire setup */
48int fd; 50u8 buf[SETUP_SECT_MAX*512];
49int is_big_kernel; 51int is_big_kernel;
50 52
51void die(const char * str, ...) 53static void die(const char * str, ...)
52{ 54{
53 va_list args; 55 va_list args;
54 va_start(args, str); 56 va_start(args, str);
@@ -57,15 +59,9 @@ void die(const char * str, ...)
57 exit(1); 59 exit(1);
58} 60}
59 61
60void file_open(const char *name) 62static void usage(void)
61{ 63{
62 if ((fd = open(name, O_RDONLY, 0)) < 0) 64 die("Usage: build [-b] setup system [rootdev] [> image]");
63 die("Unable to open `%s': %m", name);
64}
65
66void usage(void)
67{
68 die("Usage: build [-b] bootsect setup system [rootdev] [> image]");
69} 65}
70 66
71int main(int argc, char ** argv) 67int main(int argc, char ** argv)
@@ -73,27 +69,30 @@ int main(int argc, char ** argv)
73 unsigned int i, sz, setup_sectors; 69 unsigned int i, sz, setup_sectors;
74 int c; 70 int c;
75 u32 sys_size; 71 u32 sys_size;
76 byte major_root, minor_root; 72 u8 major_root, minor_root;
77 struct stat sb; 73 struct stat sb;
74 FILE *file;
75 int fd;
76 void *kernel;
78 77
79 if (argc > 2 && !strcmp(argv[1], "-b")) 78 if (argc > 2 && !strcmp(argv[1], "-b"))
80 { 79 {
81 is_big_kernel = 1; 80 is_big_kernel = 1;
82 argc--, argv++; 81 argc--, argv++;
83 } 82 }
84 if ((argc < 4) || (argc > 5)) 83 if ((argc < 3) || (argc > 4))
85 usage(); 84 usage();
86 if (argc > 4) { 85 if (argc > 3) {
87 if (!strcmp(argv[4], "CURRENT")) { 86 if (!strcmp(argv[3], "CURRENT")) {
88 if (stat("/", &sb)) { 87 if (stat("/", &sb)) {
89 perror("/"); 88 perror("/");
90 die("Couldn't stat /"); 89 die("Couldn't stat /");
91 } 90 }
92 major_root = major(sb.st_dev); 91 major_root = major(sb.st_dev);
93 minor_root = minor(sb.st_dev); 92 minor_root = minor(sb.st_dev);
94 } else if (strcmp(argv[4], "FLOPPY")) { 93 } else if (strcmp(argv[3], "FLOPPY")) {
95 if (stat(argv[4], &sb)) { 94 if (stat(argv[3], &sb)) {
96 perror(argv[4]); 95 perror(argv[3]);
97 die("Couldn't stat root device."); 96 die("Couldn't stat root device.");
98 } 97 }
99 major_root = major(sb.st_rdev); 98 major_root = major(sb.st_rdev);
@@ -108,79 +107,62 @@ int main(int argc, char ** argv)
108 } 107 }
109 fprintf(stderr, "Root device is (%d, %d)\n", major_root, minor_root); 108 fprintf(stderr, "Root device is (%d, %d)\n", major_root, minor_root);
110 109
111 file_open(argv[1]); 110 /* Copy the setup code */
112 i = read(fd, buf, sizeof(buf)); 111 file = fopen(argv[1], "r");
113 fprintf(stderr,"Boot sector %d bytes.\n",i); 112 if (!file)
114 if (i != 512) 113 die("Unable to open `%s': %m", argv[1]);
115 die("Boot block must be exactly 512 bytes"); 114 c = fread(buf, 1, sizeof(buf), file);
115 if (ferror(file))
116 die("read-error on `setup'");
117 if (c < 1024)
118 die("The setup must be at least 1024 bytes");
116 if (buf[510] != 0x55 || buf[511] != 0xaa) 119 if (buf[510] != 0x55 || buf[511] != 0xaa)
117 die("Boot block hasn't got boot flag (0xAA55)"); 120 die("Boot block hasn't got boot flag (0xAA55)");
121 fclose(file);
122
123 /* Pad unused space with zeros */
124 setup_sectors = (c + 511) / 512;
125 if (setup_sectors < SETUP_SECT_MIN)
126 setup_sectors = SETUP_SECT_MIN;
127 i = setup_sectors*512;
128 memset(buf+c, 0, i-c);
129
130 /* Set the default root device */
118 buf[508] = minor_root; 131 buf[508] = minor_root;
119 buf[509] = major_root; 132 buf[509] = major_root;
120 if (write(1, buf, 512) != 512)
121 die("Write call failed");
122 close (fd);
123
124 file_open(argv[2]); /* Copy the setup code */
125 for (i=0 ; (c=read(fd, buf, sizeof(buf)))>0 ; i+=c )
126 if (write(1, buf, c) != c)
127 die("Write call failed");
128 if (c != 0)
129 die("read-error on `setup'");
130 close (fd);
131
132 setup_sectors = (i + 511) / 512; /* Pad unused space with zeros */
133 /* for compatibility with ancient versions of LILO. */
134 if (setup_sectors < SETUP_SECTS)
135 setup_sectors = SETUP_SECTS;
136 fprintf(stderr, "Setup is %d bytes.\n", i);
137 memset(buf, 0, sizeof(buf));
138 while (i < setup_sectors * 512) {
139 c = setup_sectors * 512 - i;
140 if (c > sizeof(buf))
141 c = sizeof(buf);
142 if (write(1, buf, c) != c)
143 die("Write call failed");
144 i += c;
145 }
146 133
147 file_open(argv[3]); 134 fprintf(stderr, "Setup is %d bytes (padded to %d bytes).\n", c, i);
148 if (fstat (fd, &sb)) 135
149 die("Unable to stat `%s': %m", argv[3]); 136 /* Open and stat the kernel file */
137 fd = open(argv[2], O_RDONLY);
138 if (fd < 0)
139 die("Unable to open `%s': %m", argv[2]);
140 if (fstat(fd, &sb))
141 die("Unable to stat `%s': %m", argv[2]);
150 sz = sb.st_size; 142 sz = sb.st_size;
151 fprintf (stderr, "System is %d kB\n", sz/1024); 143 fprintf (stderr, "System is %d kB\n", (sz+1023)/1024);
144 kernel = mmap(NULL, sz, PROT_READ, MAP_SHARED, fd, 0);
145 if (kernel == MAP_FAILED)
146 die("Unable to mmap '%s': %m", argv[2]);
152 sys_size = (sz + 15) / 16; 147 sys_size = (sz + 15) / 16;
153 if (!is_big_kernel && sys_size > DEF_SYSSIZE) 148 if (!is_big_kernel && sys_size > DEF_SYSSIZE)
154 die("System is too big. Try using bzImage or modules."); 149 die("System is too big. Try using bzImage or modules.");
155 while (sz > 0) { 150
156 int l, n; 151 /* Patch the setup code with the appropriate size parameters */
157 152 buf[0x1f1] = setup_sectors-1;
158 l = (sz > sizeof(buf)) ? sizeof(buf) : sz; 153 buf[0x1f4] = sys_size;
159 if ((n=read(fd, buf, l)) != l) { 154 buf[0x1f5] = sys_size >> 8;
160 if (n < 0) 155 buf[0x1f6] = sys_size >> 16;
161 die("Error reading %s: %m", argv[3]); 156 buf[0x1f7] = sys_size >> 24;
162 else 157
163 die("%s: Unexpected EOF", argv[3]); 158 if (fwrite(buf, 1, i, stdout) != i)
164 } 159 die("Writing setup failed");
165 if (write(1, buf, l) != l) 160
166 die("Write failed"); 161 /* Copy the kernel code */
167 sz -= l; 162 if (fwrite(kernel, 1, sz, stdout) != sz)
168 } 163 die("Writing kernel failed");
169 close(fd); 164 close(fd);
170 165
171 if (lseek(1, 497, SEEK_SET) != 497) /* Write sizes to the bootsector */ 166 /* Everything is OK */
172 die("Output: seek failed"); 167 return 0;
173 buf[0] = setup_sectors;
174 if (write(1, buf, 1) != 1)
175 die("Write of setup sector count failed");
176 if (lseek(1, 500, SEEK_SET) != 500)
177 die("Output: seek failed");
178 buf[0] = (sys_size & 0xff);
179 buf[1] = ((sys_size >> 8) & 0xff);
180 buf[2] = ((sys_size >> 16) & 0xff);
181 buf[3] = ((sys_size >> 24) & 0xff);
182 if (write(1, buf, 4) != 4)
183 die("Write of image length failed");
184
185 return 0; /* Everything is OK */
186} 168}
diff --git a/arch/i386/boot/tty.c b/arch/i386/boot/tty.c
new file mode 100644
index 0000000000..9c668aad35
--- /dev/null
+++ b/arch/i386/boot/tty.c
@@ -0,0 +1,112 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/tty.c
13 *
14 * Very simple screen I/O
15 * XXX: Probably should add very simple serial I/O?
16 */
17
18#include "boot.h"
19
20/*
21 * These functions are in .inittext so they can be used to signal
22 * error during initialization.
23 */
24
25void __attribute__((section(".inittext"))) putchar(int ch)
26{
27 unsigned char c = ch;
28
29 if (c == '\n')
30 putchar('\r'); /* \n -> \r\n */
31
32 /* int $0x10 is known to have bugs involving touching registers
33 it shouldn't. Be extra conservative... */
34 asm volatile("pushal; pushw %%ds; int $0x10; popw %%ds; popal"
35 : : "b" (0x0007), "c" (0x0001), "a" (0x0e00|ch));
36}
37
38void __attribute__((section(".inittext"))) puts(const char *str)
39{
40 int n = 0;
41 while (*str) {
42 putchar(*str++);
43 n++;
44 }
45}
46
47/*
48 * Read the CMOS clock through the BIOS, and return the
49 * seconds in BCD.
50 */
51
52static u8 gettime(void)
53{
54 u16 ax = 0x0200;
55 u16 cx, dx;
56
57 asm("int $0x1a"
58 : "+a" (ax), "=c" (cx), "=d" (dx)
59 : : "ebx", "esi", "edi");
60
61 return dx >> 8;
62}
63
64/*
65 * Read from the keyboard
66 */
67int getchar(void)
68{
69 u16 ax = 0;
70 asm("int $0x16" : "+a" (ax));
71
72 return ax & 0xff;
73}
74
75static int kbd_pending(void)
76{
77 u8 pending;
78 asm("int $0x16; setnz %0"
79 : "=rm" (pending)
80 : "a" (0x0100));
81 return pending;
82}
83
84void kbd_flush(void)
85{
86 for (;;) {
87 if (!kbd_pending())
88 break;
89 getchar();
90 }
91}
92
93int getchar_timeout(void)
94{
95 int cnt = 30;
96 int t0, t1;
97
98 t0 = gettime();
99
100 while (cnt) {
101 if (kbd_pending())
102 return getchar();
103
104 t1 = gettime();
105 if (t0 != t1) {
106 cnt--;
107 t0 = t1;
108 }
109 }
110
111 return 0; /* Timeout! */
112}
diff --git a/arch/i386/boot/version.c b/arch/i386/boot/version.c
new file mode 100644
index 0000000000..c61462f7d9
--- /dev/null
+++ b/arch/i386/boot/version.c
@@ -0,0 +1,23 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/version.c
13 *
14 * Kernel version string
15 */
16
17#include "boot.h"
18#include <linux/utsrelease.h>
19#include <linux/compile.h>
20
21const char kernel_version[] =
22 UTS_RELEASE " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ") "
23 UTS_VERSION;
diff --git a/arch/i386/boot/vesa.h b/arch/i386/boot/vesa.h
new file mode 100644
index 0000000000..ff5b73cd40
--- /dev/null
+++ b/arch/i386/boot/vesa.h
@@ -0,0 +1,79 @@
1/* ----------------------------------------------------------------------- *
2 *
3 * Copyright 1999-2007 H. Peter Anvin - All Rights Reserved
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 * Boston MA 02111-1307, USA; either version 2 of the License, or
9 * (at your option) any later version; incorporated herein by reference.
10 *
11 * ----------------------------------------------------------------------- */
12
13#ifndef BOOT_VESA_H
14#define BOOT_VESA_H
15
16typedef struct {
17 u16 off, seg;
18} far_ptr;
19
20/* VESA General Information table */
21struct vesa_general_info {
22 u32 signature; /* 0 Magic number = "VESA" */
23 u16 version; /* 4 */
24 far_ptr vendor_string; /* 6 */
25 u32 capabilities; /* 10 */
26 far_ptr video_mode_ptr; /* 14 */
27 u16 total_memory; /* 18 */
28
29 u16 oem_software_rev; /* 20 */
30 far_ptr oem_vendor_name_ptr; /* 22 */
31 far_ptr oem_product_name_ptr; /* 26 */
32 far_ptr oem_product_rev_ptr; /* 30 */
33
34 u8 reserved[222]; /* 34 */
35 u8 oem_data[256]; /* 256 */
36} __attribute__ ((packed));
37
38#define VESA_MAGIC ('V' + ('E' << 8) + ('S' << 16) + ('A' << 24))
39#define VBE2_MAGIC ('V' + ('B' << 8) + ('E' << 16) + ('2' << 24))
40
41struct vesa_mode_info {
42 u16 mode_attr; /* 0 */
43 u8 win_attr[2]; /* 2 */
44 u16 win_grain; /* 4 */
45 u16 win_size; /* 6 */
46 u16 win_seg[2]; /* 8 */
47 far_ptr win_scheme; /* 12 */
48 u16 logical_scan; /* 16 */
49
50 u16 h_res; /* 18 */
51 u16 v_res; /* 20 */
52 u8 char_width; /* 22 */
53 u8 char_height; /* 23 */
54 u8 memory_planes; /* 24 */
55 u8 bpp; /* 25 */
56 u8 banks; /* 26 */
57 u8 memory_layout; /* 27 */
58 u8 bank_size; /* 28 */
59 u8 image_planes; /* 29 */
60 u8 page_function; /* 30 */
61
62 u8 rmask; /* 31 */
63 u8 rpos; /* 32 */
64 u8 gmask; /* 33 */
65 u8 gpos; /* 34 */
66 u8 bmask; /* 35 */
67 u8 bpos; /* 36 */
68 u8 resv_mask; /* 37 */
69 u8 resv_pos; /* 38 */
70 u8 dcm_info; /* 39 */
71
72 u32 lfb_ptr; /* 40 Linear frame buffer address */
73 u32 offscreen_ptr; /* 44 Offscreen memory address */
74 u16 offscreen_size; /* 48 */
75
76 u8 reserved[206]; /* 50 */
77} __attribute__ ((packed));
78
79#endif /* LIB_SYS_VESA_H */
diff --git a/arch/i386/boot/video-bios.c b/arch/i386/boot/video-bios.c
new file mode 100644
index 0000000000..afea46c500
--- /dev/null
+++ b/arch/i386/boot/video-bios.c
@@ -0,0 +1,125 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/video-bios.c
13 *
14 * Standard video BIOS modes
15 *
16 * We have two options for this; silent and scanned.
17 */
18
19#include "boot.h"
20#include "video.h"
21
22__videocard video_bios;
23
24/* Set a conventional BIOS mode */
25static int set_bios_mode(u8 mode);
26
27static int bios_set_mode(struct mode_info *mi)
28{
29 return set_bios_mode(mi->mode - VIDEO_FIRST_BIOS);
30}
31
32static int set_bios_mode(u8 mode)
33{
34 u16 ax;
35 u8 new_mode;
36
37 ax = mode; /* AH=0x00 Set Video Mode */
38 asm volatile(INT10
39 : "+a" (ax)
40 : : "ebx", "ecx", "edx", "esi", "edi");
41
42 ax = 0x0f00; /* Get Current Video Mode */
43 asm volatile(INT10
44 : "+a" (ax)
45 : : "ebx", "ecx", "edx", "esi", "edi");
46
47 do_restore = 1; /* Assume video contents was lost */
48 new_mode = ax & 0x7f; /* Not all BIOSes are clean with the top bit */
49
50 if (new_mode == mode)
51 return 0; /* Mode change OK */
52
53 if (new_mode != boot_params.screen_info.orig_video_mode) {
54 /* Mode setting failed, but we didn't end up where we
55 started. That's bad. Try to revert to the original
56 video mode. */
57 ax = boot_params.screen_info.orig_video_mode;
58 asm volatile(INT10
59 : "+a" (ax)
60 : : "ebx", "ecx", "edx", "esi", "edi");
61 }
62 return -1;
63}
64
65static int bios_probe(void)
66{
67 u8 mode;
68 u8 saved_mode = boot_params.screen_info.orig_video_mode;
69 u16 crtc;
70 struct mode_info *mi;
71 int nmodes = 0;
72
73 if (adapter != ADAPTER_EGA && adapter != ADAPTER_VGA)
74 return 0;
75
76 set_fs(0);
77 crtc = vga_crtc();
78
79 video_bios.modes = GET_HEAP(struct mode_info, 0);
80
81 for (mode = 0x14; mode <= 0x7f; mode++) {
82 if (heap_free() < sizeof(struct mode_info))
83 break;
84
85 if (mode_defined(VIDEO_FIRST_BIOS+mode))
86 continue;
87
88 if (set_bios_mode(mode))
89 continue;
90
91 /* Try to verify that it's a text mode. */
92
93 /* Attribute Controller: make graphics controller disabled */
94 if (in_idx(0x3c0, 0x10) & 0x01)
95 continue;
96
97 /* Graphics Controller: verify Alpha addressing enabled */
98 if (in_idx(0x3ce, 0x06) & 0x01)
99 continue;
100
101 /* CRTC cursor location low should be zero(?) */
102 if (in_idx(crtc, 0x0f))
103 continue;
104
105 mi = GET_HEAP(struct mode_info, 1);
106 mi->mode = VIDEO_FIRST_BIOS+mode;
107 mi->x = rdfs16(0x44a);
108 mi->y = rdfs8(0x484)+1;
109 nmodes++;
110 }
111
112 set_bios_mode(saved_mode);
113
114 return nmodes;
115}
116
117__videocard video_bios =
118{
119 .card_name = "BIOS (scanned)",
120 .probe = bios_probe,
121 .set_mode = bios_set_mode,
122 .unsafe = 1,
123 .xmode_first = VIDEO_FIRST_BIOS,
124 .xmode_n = 0x80,
125};
diff --git a/arch/i386/boot/video-vesa.c b/arch/i386/boot/video-vesa.c
new file mode 100644
index 0000000000..e6aa9eb8d9
--- /dev/null
+++ b/arch/i386/boot/video-vesa.c
@@ -0,0 +1,284 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/video-vesa.c
13 *
14 * VESA text modes
15 */
16
17#include "boot.h"
18#include "video.h"
19#include "vesa.h"
20
21/* VESA information */
22static struct vesa_general_info vginfo;
23static struct vesa_mode_info vminfo;
24
25__videocard video_vesa;
26
27static void vesa_store_mode_params_graphics(void);
28
29static int vesa_probe(void)
30{
31#if defined(CONFIG_VIDEO_VESA) || defined(CONFIG_FIRMWARE_EDID)
32 u16 ax;
33 u16 mode;
34 addr_t mode_ptr;
35 struct mode_info *mi;
36 int nmodes = 0;
37
38 video_vesa.modes = GET_HEAP(struct mode_info, 0);
39
40 vginfo.signature = VBE2_MAGIC;
41
42 /* Optimistically assume a VESA BIOS is register-clean... */
43 ax = 0x4f00;
44 asm("int $0x10" : "+a" (ax), "=m" (vginfo) : "D" (&vginfo));
45
46 if (ax != 0x004f ||
47 vginfo.signature != VESA_MAGIC ||
48 vginfo.version < 0x0102)
49 return 0; /* Not present */
50#endif /* CONFIG_VIDEO_VESA || CONFIG_FIRMWARE_EDID */
51#ifdef CONFIG_VIDEO_VESA
52 set_fs(vginfo.video_mode_ptr.seg);
53 mode_ptr = vginfo.video_mode_ptr.off;
54
55 while ((mode = rdfs16(mode_ptr)) != 0xffff) {
56 mode_ptr += 2;
57
58 if (heap_free() < sizeof(struct mode_info))
59 break; /* Heap full, can't save mode info */
60
61 if (mode & ~0x1ff)
62 continue;
63
64 memset(&vminfo, 0, sizeof vminfo); /* Just in case... */
65
66 ax = 0x4f01;
67 asm("int $0x10"
68 : "+a" (ax), "=m" (vminfo)
69 : "c" (mode), "D" (&vminfo));
70
71 if (ax != 0x004f)
72 continue;
73
74 if ((vminfo.mode_attr & 0x15) == 0x05) {
75 /* Text Mode, TTY BIOS supported,
76 supported by hardware */
77 mi = GET_HEAP(struct mode_info, 1);
78 mi->mode = mode + VIDEO_FIRST_VESA;
79 mi->x = vminfo.h_res;
80 mi->y = vminfo.v_res;
81 nmodes++;
82 } else if ((vminfo.mode_attr & 0x99) == 0x99) {
83#ifdef CONFIG_FB
84 /* Graphics mode, color, linear frame buffer
85 supported -- register the mode but hide from
86 the menu. Only do this if framebuffer is
87 configured, however, otherwise the user will
88 be left without a screen. */
89 mi = GET_HEAP(struct mode_info, 1);
90 mi->mode = mode + VIDEO_FIRST_VESA;
91 mi->x = mi->y = 0;
92 nmodes++;
93#endif
94 }
95 }
96
97 return nmodes;
98#else
99 return 0;
100#endif /* CONFIG_VIDEO_VESA */
101}
102
103static int vesa_set_mode(struct mode_info *mode)
104{
105 u16 ax;
106 int is_graphic;
107 u16 vesa_mode = mode->mode - VIDEO_FIRST_VESA;
108
109 memset(&vminfo, 0, sizeof vminfo); /* Just in case... */
110
111 ax = 0x4f01;
112 asm("int $0x10"
113 : "+a" (ax), "=m" (vminfo)
114 : "c" (vesa_mode), "D" (&vminfo));
115
116 if (ax != 0x004f)
117 return -1;
118
119 if ((vminfo.mode_attr & 0x15) == 0x05) {
120 /* It's a supported text mode */
121 is_graphic = 0;
122 } else if ((vminfo.mode_attr & 0x99) == 0x99) {
123 /* It's a graphics mode with linear frame buffer */
124 is_graphic = 1;
125 vesa_mode |= 0x4000; /* Request linear frame buffer */
126 } else {
127 return -1; /* Invalid mode */
128 }
129
130
131 ax = 0x4f02;
132 asm volatile("int $0x10"
133 : "+a" (ax)
134 : "b" (vesa_mode), "D" (0));
135
136 if (ax != 0x004f)
137 return -1;
138
139 graphic_mode = is_graphic;
140 if (!is_graphic) {
141 /* Text mode */
142 force_x = mode->x;
143 force_y = mode->y;
144 do_restore = 1;
145 } else {
146 /* Graphics mode */
147 vesa_store_mode_params_graphics();
148 }
149
150 return 0;
151}
152
153
154/* Switch DAC to 8-bit mode */
155static void vesa_dac_set_8bits(void)
156{
157 u8 dac_size = 6;
158
159 /* If possible, switch the DAC to 8-bit mode */
160 if (vginfo.capabilities & 1) {
161 u16 ax, bx;
162
163 ax = 0x4f08;
164 bx = 0x0800;
165 asm volatile(INT10
166 : "+a" (ax), "+b" (bx)
167 : : "ecx", "edx", "esi", "edi");
168
169 if (ax == 0x004f)
170 dac_size = bx >> 8;
171 }
172
173 /* Set the color sizes to the DAC size, and offsets to 0 */
174 boot_params.screen_info.red_size = dac_size;
175 boot_params.screen_info.green_size = dac_size;
176 boot_params.screen_info.blue_size = dac_size;
177 boot_params.screen_info.rsvd_size = dac_size;
178
179 boot_params.screen_info.red_pos = 0;
180 boot_params.screen_info.green_pos = 0;
181 boot_params.screen_info.blue_pos = 0;
182 boot_params.screen_info.rsvd_pos = 0;
183}
184
185/* Save the VESA protected mode info */
186static void vesa_store_pm_info(void)
187{
188 u16 ax, bx, di, es;
189
190 ax = 0x4f0a;
191 bx = di = 0;
192 asm("pushw %%es; "INT10"; movw %%es,%0; popw %%es"
193 : "=d" (es), "+a" (ax), "+b" (bx), "+D" (di)
194 : : "ecx", "esi");
195
196 if (ax != 0x004f)
197 return;
198
199 boot_params.screen_info.vesapm_seg = es;
200 boot_params.screen_info.vesapm_off = di;
201}
202
203/*
204 * Save video mode parameters for graphics mode
205 */
206static void vesa_store_mode_params_graphics(void)
207{
208 /* Tell the kernel we're in VESA graphics mode */
209 boot_params.screen_info.orig_video_isVGA = 0x23;
210
211 /* Mode parameters */
212 boot_params.screen_info.vesa_attributes = vminfo.mode_attr;
213 boot_params.screen_info.lfb_linelength = vminfo.logical_scan;
214 boot_params.screen_info.lfb_width = vminfo.h_res;
215 boot_params.screen_info.lfb_height = vminfo.v_res;
216 boot_params.screen_info.lfb_depth = vminfo.bpp;
217 boot_params.screen_info.pages = vminfo.image_planes;
218 boot_params.screen_info.lfb_base = vminfo.lfb_ptr;
219 memcpy(&boot_params.screen_info.red_size,
220 &vminfo.rmask, 8);
221
222 /* General parameters */
223 boot_params.screen_info.lfb_size = vginfo.total_memory;
224
225 if (vminfo.bpp <= 8)
226 vesa_dac_set_8bits();
227
228 vesa_store_pm_info();
229}
230
231/*
232 * Save EDID information for the kernel; this is invoked, separately,
233 * after mode-setting.
234 */
235void vesa_store_edid(void)
236{
237#ifdef CONFIG_FIRMWARE_EDID
238 u16 ax, bx, cx, dx, di;
239
240 /* Apparently used as a nonsense token... */
241 memset(&boot_params.edid_info, 0x13, sizeof boot_params.edid_info);
242
243 if (vginfo.version < 0x0200)
244 return; /* EDID requires VBE 2.0+ */
245
246 ax = 0x4f15; /* VBE DDC */
247 bx = 0x0000; /* Report DDC capabilities */
248 cx = 0; /* Controller 0 */
249 di = 0; /* ES:DI must be 0 by spec */
250
251 /* Note: The VBE DDC spec is different from the main VESA spec;
252 we genuinely have to assume all registers are destroyed here. */
253
254 asm("pushw %%es; movw %2,%%es; "INT10"; popw %%es"
255 : "+a" (ax), "+b" (bx)
256 : "c" (cx), "D" (di)
257 : "esi");
258
259 if (ax != 0x004f)
260 return; /* No EDID */
261
262 /* BH = time in seconds to transfer EDD information */
263 /* BL = DDC level supported */
264
265 ax = 0x4f15; /* VBE DDC */
266 bx = 0x0001; /* Read EDID */
267 cx = 0; /* Controller 0 */
268 dx = 0; /* EDID block number */
269 di =(size_t) &boot_params.edid_info; /* (ES:)Pointer to block */
270 asm(INT10
271 : "+a" (ax), "+b" (bx), "+d" (dx)
272 : "c" (cx), "D" (di)
273 : "esi");
274#endif /* CONFIG_FIRMWARE_EDID */
275}
276
277__videocard video_vesa =
278{
279 .card_name = "VESA",
280 .probe = vesa_probe,
281 .set_mode = vesa_set_mode,
282 .xmode_first = VIDEO_FIRST_VESA,
283 .xmode_n = 0x200,
284};
diff --git a/arch/i386/boot/video-vga.c b/arch/i386/boot/video-vga.c
new file mode 100644
index 0000000000..700d09a9c9
--- /dev/null
+++ b/arch/i386/boot/video-vga.c
@@ -0,0 +1,260 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/video-vga.c
13 *
14 * Common all-VGA modes
15 */
16
17#include "boot.h"
18#include "video.h"
19
20static struct mode_info vga_modes[] = {
21 { VIDEO_80x25, 80, 25 },
22 { VIDEO_8POINT, 80, 50 },
23 { VIDEO_80x43, 80, 43 },
24 { VIDEO_80x28, 80, 28 },
25 { VIDEO_80x30, 80, 30 },
26 { VIDEO_80x34, 80, 34 },
27 { VIDEO_80x60, 80, 60 },
28};
29
30static struct mode_info ega_modes[] = {
31 { VIDEO_80x25, 80, 25 },
32 { VIDEO_8POINT, 80, 43 },
33};
34
35static struct mode_info cga_modes[] = {
36 { VIDEO_80x25, 80, 25 },
37};
38
39__videocard video_vga;
40
41/* Set basic 80x25 mode */
42static u8 vga_set_basic_mode(void)
43{
44 u16 ax;
45 u8 rows;
46 u8 mode;
47
48#ifdef CONFIG_VIDEO_400_HACK
49 if (adapter >= ADAPTER_VGA) {
50 asm(INT10
51 : : "a" (0x1202), "b" (0x0030)
52 : "ecx", "edx", "esi", "edi");
53 }
54#endif
55
56 ax = 0x0f00;
57 asm(INT10
58 : "+a" (ax)
59 : : "ebx", "ecx", "edx", "esi", "edi");
60
61 mode = (u8)ax;
62
63 set_fs(0);
64 rows = rdfs8(0x484); /* rows minus one */
65
66#ifndef CONFIG_VIDEO_400_HACK
67 if ((ax == 0x5003 || ax == 0x5007) &&
68 (rows == 0 || rows == 24))
69 return mode;
70#endif
71
72 if (mode != 3 && mode != 7)
73 mode = 3;
74
75 /* Set the mode */
76 asm volatile(INT10
77 : : "a" (mode)
78 : "ebx", "ecx", "edx", "esi", "edi");
79 do_restore = 1;
80 return mode;
81}
82
83static void vga_set_8font(void)
84{
85 /* Set 8x8 font - 80x43 on EGA, 80x50 on VGA */
86
87 /* Set 8x8 font */
88 asm volatile(INT10 : : "a" (0x1112), "b" (0));
89
90 /* Use alternate print screen */
91 asm volatile(INT10 : : "a" (0x1200), "b" (0x20));
92
93 /* Turn off cursor emulation */
94 asm volatile(INT10 : : "a" (0x1201), "b" (0x34));
95
96 /* Cursor is scan lines 6-7 */
97 asm volatile(INT10 : : "a" (0x0100), "c" (0x0607));
98}
99
100static void vga_set_14font(void)
101{
102 /* Set 9x14 font - 80x28 on VGA */
103
104 /* Set 9x14 font */
105 asm volatile(INT10 : : "a" (0x1111), "b" (0));
106
107 /* Turn off cursor emulation */
108 asm volatile(INT10 : : "a" (0x1201), "b" (0x34));
109
110 /* Cursor is scan lines 11-12 */
111 asm volatile(INT10 : : "a" (0x0100), "c" (0x0b0c));
112}
113
114static void vga_set_80x43(void)
115{
116 /* Set 80x43 mode on VGA (not EGA) */
117
118 /* Set 350 scans */
119 asm volatile(INT10 : : "a" (0x1201), "b" (0x30));
120
121 /* Reset video mode */
122 asm volatile(INT10 : : "a" (0x0003));
123
124 vga_set_8font();
125}
126
127/* I/O address of the VGA CRTC */
128u16 vga_crtc(void)
129{
130 return (inb(0x3cc) & 1) ? 0x3d4 : 0x3b4;
131}
132
133static void vga_set_480_scanlines(int end)
134{
135 u16 crtc;
136 u8 csel;
137
138 crtc = vga_crtc();
139
140 out_idx(0x0c, crtc, 0x11); /* Vertical sync end, unlock CR0-7 */
141 out_idx(0x0b, crtc, 0x06); /* Vertical total */
142 out_idx(0x3e, crtc, 0x07); /* Vertical overflow */
143 out_idx(0xea, crtc, 0x10); /* Vertical sync start */
144 out_idx(end, crtc, 0x12); /* Vertical display end */
145 out_idx(0xe7, crtc, 0x15); /* Vertical blank start */
146 out_idx(0x04, crtc, 0x16); /* Vertical blank end */
147 csel = inb(0x3cc);
148 csel &= 0x0d;
149 csel |= 0xe2;
150 outb(csel, 0x3cc);
151}
152
153static void vga_set_80x30(void)
154{
155 vga_set_480_scanlines(0xdf);
156}
157
158static void vga_set_80x34(void)
159{
160 vga_set_14font();
161 vga_set_480_scanlines(0xdb);
162}
163
164static void vga_set_80x60(void)
165{
166 vga_set_8font();
167 vga_set_480_scanlines(0xdf);
168}
169
170static int vga_set_mode(struct mode_info *mode)
171{
172 /* Set the basic mode */
173 vga_set_basic_mode();
174
175 /* Override a possibly broken BIOS */
176 force_x = mode->x;
177 force_y = mode->y;
178
179 switch (mode->mode) {
180 case VIDEO_80x25:
181 break;
182 case VIDEO_8POINT:
183 vga_set_8font();
184 break;
185 case VIDEO_80x43:
186 vga_set_80x43();
187 break;
188 case VIDEO_80x28:
189 vga_set_14font();
190 break;
191 case VIDEO_80x30:
192 vga_set_80x30();
193 break;
194 case VIDEO_80x34:
195 vga_set_80x34();
196 break;
197 case VIDEO_80x60:
198 vga_set_80x60();
199 break;
200 }
201
202 return 0;
203}
204
205/*
206 * Note: this probe includes basic information required by all
207 * systems. It should be executed first, by making sure
208 * video-vga.c is listed first in the Makefile.
209 */
210static int vga_probe(void)
211{
212 static const char *card_name[] = {
213 "CGA/MDA/HGC", "EGA", "VGA"
214 };
215 static struct mode_info *mode_lists[] = {
216 cga_modes,
217 ega_modes,
218 vga_modes,
219 };
220 static int mode_count[] = {
221 sizeof(cga_modes)/sizeof(struct mode_info),
222 sizeof(ega_modes)/sizeof(struct mode_info),
223 sizeof(vga_modes)/sizeof(struct mode_info),
224 };
225 u8 vga_flag;
226
227 asm(INT10
228 : "=b" (boot_params.screen_info.orig_video_ega_bx)
229 : "a" (0x1200), "b" (0x10) /* Check EGA/VGA */
230 : "ecx", "edx", "esi", "edi");
231
232 /* If we have MDA/CGA/HGC then BL will be unchanged at 0x10 */
233 if ((u8)boot_params.screen_info.orig_video_ega_bx != 0x10) {
234 /* EGA/VGA */
235 asm(INT10
236 : "=a" (vga_flag)
237 : "a" (0x1a00)
238 : "ebx", "ecx", "edx", "esi", "edi");
239
240 if (vga_flag == 0x1a) {
241 adapter = ADAPTER_VGA;
242 boot_params.screen_info.orig_video_isVGA = 1;
243 } else {
244 adapter = ADAPTER_EGA;
245 }
246 } else {
247 adapter = ADAPTER_CGA;
248 }
249
250 video_vga.modes = mode_lists[adapter];
251 video_vga.card_name = card_name[adapter];
252 return mode_count[adapter];
253}
254
255__videocard video_vga =
256{
257 .card_name = "VGA",
258 .probe = vga_probe,
259 .set_mode = vga_set_mode,
260};
diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S
deleted file mode 100644
index 8143c9516c..0000000000
--- a/arch/i386/boot/video.S
+++ /dev/null
@@ -1,2043 +0,0 @@
1/* video.S
2 *
3 * Display adapter & video mode setup, version 2.13 (14-May-99)
4 *
5 * Copyright (C) 1995 -- 1998 Martin Mares <mj@ucw.cz>
6 * Based on the original setup.S code (C) Linus Torvalds and Mats Anderson
7 *
8 * Rewritten to use GNU 'as' by Chris Noe <stiker@northlink.com> May 1999
9 *
10 * For further information, look at Documentation/svga.txt.
11 *
12 */
13
14/* Enable autodetection of SVGA adapters and modes. */
15#undef CONFIG_VIDEO_SVGA
16
17/* Enable autodetection of VESA modes */
18#define CONFIG_VIDEO_VESA
19
20/* Enable compacting of mode table */
21#define CONFIG_VIDEO_COMPACT
22
23/* Retain screen contents when switching modes */
24#define CONFIG_VIDEO_RETAIN
25
26/* Enable local mode list */
27#undef CONFIG_VIDEO_LOCAL
28
29/* Force 400 scan lines for standard modes (hack to fix bad BIOS behaviour */
30#undef CONFIG_VIDEO_400_HACK
31
32/* Hack that lets you force specific BIOS mode ID and specific dimensions */
33#undef CONFIG_VIDEO_GFX_HACK
34#define VIDEO_GFX_BIOS_AX 0x4f02 /* 800x600 on ThinkPad */
35#define VIDEO_GFX_BIOS_BX 0x0102
36#define VIDEO_GFX_DUMMY_RESOLUTION 0x6425 /* 100x37 */
37
38/* This code uses an extended set of video mode numbers. These include:
39 * Aliases for standard modes
40 * NORMAL_VGA (-1)
41 * EXTENDED_VGA (-2)
42 * ASK_VGA (-3)
43 * Video modes numbered by menu position -- NOT RECOMMENDED because of lack
44 * of compatibility when extending the table. These are between 0x00 and 0xff.
45 */
46#define VIDEO_FIRST_MENU 0x0000
47
48/* Standard BIOS video modes (BIOS number + 0x0100) */
49#define VIDEO_FIRST_BIOS 0x0100
50
51/* VESA BIOS video modes (VESA number + 0x0200) */
52#define VIDEO_FIRST_VESA 0x0200
53
54/* Video7 special modes (BIOS number + 0x0900) */
55#define VIDEO_FIRST_V7 0x0900
56
57/* Special video modes */
58#define VIDEO_FIRST_SPECIAL 0x0f00
59#define VIDEO_80x25 0x0f00
60#define VIDEO_8POINT 0x0f01
61#define VIDEO_80x43 0x0f02
62#define VIDEO_80x28 0x0f03
63#define VIDEO_CURRENT_MODE 0x0f04
64#define VIDEO_80x30 0x0f05
65#define VIDEO_80x34 0x0f06
66#define VIDEO_80x60 0x0f07
67#define VIDEO_GFX_HACK 0x0f08
68#define VIDEO_LAST_SPECIAL 0x0f09
69
70/* Video modes given by resolution */
71#define VIDEO_FIRST_RESOLUTION 0x1000
72
73/* The "recalculate timings" flag */
74#define VIDEO_RECALC 0x8000
75
76/* Positions of various video parameters passed to the kernel */
77/* (see also include/linux/tty.h) */
78#define PARAM_CURSOR_POS 0x00
79#define PARAM_VIDEO_PAGE 0x04
80#define PARAM_VIDEO_MODE 0x06
81#define PARAM_VIDEO_COLS 0x07
82#define PARAM_VIDEO_EGA_BX 0x0a
83#define PARAM_VIDEO_LINES 0x0e
84#define PARAM_HAVE_VGA 0x0f
85#define PARAM_FONT_POINTS 0x10
86
87#define PARAM_LFB_WIDTH 0x12
88#define PARAM_LFB_HEIGHT 0x14
89#define PARAM_LFB_DEPTH 0x16
90#define PARAM_LFB_BASE 0x18
91#define PARAM_LFB_SIZE 0x1c
92#define PARAM_LFB_LINELENGTH 0x24
93#define PARAM_LFB_COLORS 0x26
94#define PARAM_VESAPM_SEG 0x2e
95#define PARAM_VESAPM_OFF 0x30
96#define PARAM_LFB_PAGES 0x32
97#define PARAM_VESA_ATTRIB 0x34
98#define PARAM_CAPABILITIES 0x36
99
100/* Define DO_STORE according to CONFIG_VIDEO_RETAIN */
101#ifdef CONFIG_VIDEO_RETAIN
102#define DO_STORE call store_screen
103#else
104#define DO_STORE
105#endif /* CONFIG_VIDEO_RETAIN */
106
107# This is the main entry point called by setup.S
108# %ds *must* be pointing to the bootsector
109video: pushw %ds # We use different segments
110 pushw %ds # FS contains original DS
111 popw %fs
112 pushw %cs # DS is equal to CS
113 popw %ds
114 pushw %cs # ES is equal to CS
115 popw %es
116 xorw %ax, %ax
117 movw %ax, %gs # GS is zero
118 cld
119 call basic_detect # Basic adapter type testing (EGA/VGA/MDA/CGA)
120#ifdef CONFIG_VIDEO_SELECT
121 movw %fs:(0x01fa), %ax # User selected video mode
122 cmpw $ASK_VGA, %ax # Bring up the menu
123 jz vid2
124
125 call mode_set # Set the mode
126 jc vid1
127
128 leaw badmdt, %si # Invalid mode ID
129 call prtstr
130vid2: call mode_menu
131vid1:
132#ifdef CONFIG_VIDEO_RETAIN
133 call restore_screen # Restore screen contents
134#endif /* CONFIG_VIDEO_RETAIN */
135 call store_edid
136#endif /* CONFIG_VIDEO_SELECT */
137 call mode_params # Store mode parameters
138 popw %ds # Restore original DS
139 ret
140
141# Detect if we have CGA, MDA, EGA or VGA and pass it to the kernel.
142basic_detect:
143 movb $0, %fs:(PARAM_HAVE_VGA)
144 movb $0x12, %ah # Check EGA/VGA
145 movb $0x10, %bl
146 int $0x10
147 movw %bx, %fs:(PARAM_VIDEO_EGA_BX) # Identifies EGA to the kernel
148 cmpb $0x10, %bl # No, it's a CGA/MDA/HGA card.
149 je basret
150
151 incb adapter
152 movw $0x1a00, %ax # Check EGA or VGA?
153 int $0x10
154 cmpb $0x1a, %al # 1a means VGA...
155 jne basret # anything else is EGA.
156
157 incb %fs:(PARAM_HAVE_VGA) # We've detected a VGA
158 incb adapter
159basret: ret
160
161# Store the video mode parameters for later usage by the kernel.
162# This is done by asking the BIOS except for the rows/columns
163# parameters in the default 80x25 mode -- these are set directly,
164# because some very obscure BIOSes supply insane values.
165mode_params:
166#ifdef CONFIG_VIDEO_SELECT
167 cmpb $0, graphic_mode
168 jnz mopar_gr
169#endif
170 movb $0x03, %ah # Read cursor position
171 xorb %bh, %bh
172 int $0x10
173 movw %dx, %fs:(PARAM_CURSOR_POS)
174 movb $0x0f, %ah # Read page/mode/width
175 int $0x10
176 movw %bx, %fs:(PARAM_VIDEO_PAGE)
177 movw %ax, %fs:(PARAM_VIDEO_MODE) # Video mode and screen width
178 cmpb $0x7, %al # MDA/HGA => segment differs
179 jnz mopar0
180
181 movw $0xb000, video_segment
182mopar0: movw %gs:(0x485), %ax # Font size
183 movw %ax, %fs:(PARAM_FONT_POINTS) # (valid only on EGA/VGA)
184 movw force_size, %ax # Forced size?
185 orw %ax, %ax
186 jz mopar1
187
188 movb %ah, %fs:(PARAM_VIDEO_COLS)
189 movb %al, %fs:(PARAM_VIDEO_LINES)
190 ret
191
192mopar1: movb $25, %al
193 cmpb $0, adapter # If we are on CGA/MDA/HGA, the
194 jz mopar2 # screen must have 25 lines.
195
196 movb %gs:(0x484), %al # On EGA/VGA, use the EGA+ BIOS
197 incb %al # location of max lines.
198mopar2: movb %al, %fs:(PARAM_VIDEO_LINES)
199 ret
200
201#ifdef CONFIG_VIDEO_SELECT
202# Fetching of VESA frame buffer parameters
203mopar_gr:
204 leaw modelist+1024, %di
205 movb $0x23, %fs:(PARAM_HAVE_VGA)
206 movw 16(%di), %ax
207 movw %ax, %fs:(PARAM_LFB_LINELENGTH)
208 movw 18(%di), %ax
209 movw %ax, %fs:(PARAM_LFB_WIDTH)
210 movw 20(%di), %ax
211 movw %ax, %fs:(PARAM_LFB_HEIGHT)
212 movb 25(%di), %al
213 movb $0, %ah
214 movw %ax, %fs:(PARAM_LFB_DEPTH)
215 movb 29(%di), %al
216 movb $0, %ah
217 movw %ax, %fs:(PARAM_LFB_PAGES)
218 movl 40(%di), %eax
219 movl %eax, %fs:(PARAM_LFB_BASE)
220 movl 31(%di), %eax
221 movl %eax, %fs:(PARAM_LFB_COLORS)
222 movl 35(%di), %eax
223 movl %eax, %fs:(PARAM_LFB_COLORS+4)
224 movw 0(%di), %ax
225 movw %ax, %fs:(PARAM_VESA_ATTRIB)
226
227# get video mem size
228 leaw modelist+1024, %di
229 movw $0x4f00, %ax
230 int $0x10
231 xorl %eax, %eax
232 movw 18(%di), %ax
233 movl %eax, %fs:(PARAM_LFB_SIZE)
234
235# store mode capabilities
236 movl 10(%di), %eax
237 movl %eax, %fs:(PARAM_CAPABILITIES)
238
239# switching the DAC to 8-bit is for <= 8 bpp only
240 movw %fs:(PARAM_LFB_DEPTH), %ax
241 cmpw $8, %ax
242 jg dac_done
243
244# get DAC switching capability
245 xorl %eax, %eax
246 movb 10(%di), %al
247 testb $1, %al
248 jz dac_set
249
250# attempt to switch DAC to 8-bit
251 movw $0x4f08, %ax
252 movw $0x0800, %bx
253 int $0x10
254 cmpw $0x004f, %ax
255 jne dac_set
256 movb %bh, dac_size # store actual DAC size
257
258dac_set:
259# set color size to DAC size
260 movb dac_size, %al
261 movb %al, %fs:(PARAM_LFB_COLORS+0)
262 movb %al, %fs:(PARAM_LFB_COLORS+2)
263 movb %al, %fs:(PARAM_LFB_COLORS+4)
264 movb %al, %fs:(PARAM_LFB_COLORS+6)
265
266# set color offsets to 0
267 movb $0, %fs:(PARAM_LFB_COLORS+1)
268 movb $0, %fs:(PARAM_LFB_COLORS+3)
269 movb $0, %fs:(PARAM_LFB_COLORS+5)
270 movb $0, %fs:(PARAM_LFB_COLORS+7)
271
272dac_done:
273# get protected mode interface informations
274 movw $0x4f0a, %ax
275 xorw %bx, %bx
276 xorw %di, %di
277 int $0x10
278 cmp $0x004f, %ax
279 jnz no_pm
280
281 movw %es, %fs:(PARAM_VESAPM_SEG)
282 movw %di, %fs:(PARAM_VESAPM_OFF)
283no_pm: ret
284
285# The video mode menu
286mode_menu:
287 leaw keymsg, %si # "Return/Space/Timeout" message
288 call prtstr
289 call flush
290nokey: call getkt
291
292 cmpb $0x0d, %al # ENTER ?
293 je listm # yes - manual mode selection
294
295 cmpb $0x20, %al # SPACE ?
296 je defmd1 # no - repeat
297
298 call beep
299 jmp nokey
300
301defmd1: ret # No mode chosen? Default 80x25
302
303listm: call mode_table # List mode table
304listm0: leaw name_bann, %si # Print adapter name
305 call prtstr
306 movw card_name, %si
307 orw %si, %si
308 jnz an2
309
310 movb adapter, %al
311 leaw old_name, %si
312 orb %al, %al
313 jz an1
314
315 leaw ega_name, %si
316 decb %al
317 jz an1
318
319 leaw vga_name, %si
320 jmp an1
321
322an2: call prtstr
323 leaw svga_name, %si
324an1: call prtstr
325 leaw listhdr, %si # Table header
326 call prtstr
327 movb $0x30, %dl # DL holds mode number
328 leaw modelist, %si
329lm1: cmpw $ASK_VGA, (%si) # End?
330 jz lm2
331
332 movb %dl, %al # Menu selection number
333 call prtchr
334 call prtsp2
335 lodsw
336 call prthw # Mode ID
337 call prtsp2
338 movb 0x1(%si), %al
339 call prtdec # Rows
340 movb $0x78, %al # the letter 'x'
341 call prtchr
342 lodsw
343 call prtdec # Columns
344 movb $0x0d, %al # New line
345 call prtchr
346 movb $0x0a, %al
347 call prtchr
348 incb %dl # Next character
349 cmpb $0x3a, %dl
350 jnz lm1
351
352 movb $0x61, %dl
353 jmp lm1
354
355lm2: leaw prompt, %si # Mode prompt
356 call prtstr
357 leaw edit_buf, %di # Editor buffer
358lm3: call getkey
359 cmpb $0x0d, %al # Enter?
360 jz lment
361
362 cmpb $0x08, %al # Backspace?
363 jz lmbs
364
365 cmpb $0x20, %al # Printable?
366 jc lm3
367
368 cmpw $edit_buf+4, %di # Enough space?
369 jz lm3
370
371 stosb
372 call prtchr
373 jmp lm3
374
375lmbs: cmpw $edit_buf, %di # Backspace
376 jz lm3
377
378 decw %di
379 movb $0x08, %al
380 call prtchr
381 call prtspc
382 movb $0x08, %al
383 call prtchr
384 jmp lm3
385
386lment: movb $0, (%di)
387 leaw crlft, %si
388 call prtstr
389 leaw edit_buf, %si
390 cmpb $0, (%si) # Empty string = default mode
391 jz lmdef
392
393 cmpb $0, 1(%si) # One character = menu selection
394 jz mnusel
395
396 cmpw $0x6373, (%si) # "scan" => mode scanning
397 jnz lmhx
398
399 cmpw $0x6e61, 2(%si)
400 jz lmscan
401
402lmhx: xorw %bx, %bx # Else => mode ID in hex
403lmhex: lodsb
404 orb %al, %al
405 jz lmuse1
406
407 subb $0x30, %al
408 jc lmbad
409
410 cmpb $10, %al
411 jc lmhx1
412
413 subb $7, %al
414 andb $0xdf, %al
415 cmpb $10, %al
416 jc lmbad
417
418 cmpb $16, %al
419 jnc lmbad
420
421lmhx1: shlw $4, %bx
422 orb %al, %bl
423 jmp lmhex
424
425lmuse1: movw %bx, %ax
426 jmp lmuse
427
428mnusel: lodsb # Menu selection
429 xorb %ah, %ah
430 subb $0x30, %al
431 jc lmbad
432
433 cmpb $10, %al
434 jc lmuse
435
436 cmpb $0x61-0x30, %al
437 jc lmbad
438
439 subb $0x61-0x30-10, %al
440 cmpb $36, %al
441 jnc lmbad
442
443lmuse: call mode_set
444 jc lmdef
445
446lmbad: leaw unknt, %si
447 call prtstr
448 jmp lm2
449lmscan: cmpb $0, adapter # Scanning only on EGA/VGA
450 jz lmbad
451
452 movw $0, mt_end # Scanning of modes is
453 movb $1, scanning # done as new autodetection.
454 call mode_table
455 jmp listm0
456lmdef: ret
457
458# Additional parts of mode_set... (relative jumps, you know)
459setv7: # Video7 extended modes
460 DO_STORE
461 subb $VIDEO_FIRST_V7>>8, %bh
462 movw $0x6f05, %ax
463 int $0x10
464 stc
465 ret
466
467_setrec: jmp setrec # Ugly...
468_set_80x25: jmp set_80x25
469
470# Aliases for backward compatibility.
471setalias:
472 movw $VIDEO_80x25, %ax
473 incw %bx
474 jz mode_set
475
476 movb $VIDEO_8POINT-VIDEO_FIRST_SPECIAL, %al
477 incw %bx
478 jnz setbad # Fall-through!
479
480# Setting of user mode (AX=mode ID) => CF=success
481mode_set:
482 movw %ax, %fs:(0x01fa) # Store mode for use in acpi_wakeup.S
483 movw %ax, %bx
484 cmpb $0xff, %ah
485 jz setalias
486
487 testb $VIDEO_RECALC>>8, %ah
488 jnz _setrec
489
490 cmpb $VIDEO_FIRST_RESOLUTION>>8, %ah
491 jnc setres
492
493 cmpb $VIDEO_FIRST_SPECIAL>>8, %ah
494 jz setspc
495
496 cmpb $VIDEO_FIRST_V7>>8, %ah
497 jz setv7
498
499 cmpb $VIDEO_FIRST_VESA>>8, %ah
500 jnc check_vesa
501
502 orb %ah, %ah
503 jz setmenu
504
505 decb %ah
506 jz setbios
507
508setbad: clc
509 movb $0, do_restore # The screen needn't be restored
510 ret
511
512setvesa:
513 DO_STORE
514 subb $VIDEO_FIRST_VESA>>8, %bh
515 movw $0x4f02, %ax # VESA BIOS mode set call
516 int $0x10
517 cmpw $0x004f, %ax # AL=4f if implemented
518 jnz setbad # AH=0 if OK
519
520 stc
521 ret
522
523setbios:
524 DO_STORE
525 int $0x10 # Standard BIOS mode set call
526 pushw %bx
527 movb $0x0f, %ah # Check if really set
528 int $0x10
529 popw %bx
530 cmpb %bl, %al
531 jnz setbad
532
533 stc
534 ret
535
536setspc: xorb %bh, %bh # Set special mode
537 cmpb $VIDEO_LAST_SPECIAL-VIDEO_FIRST_SPECIAL, %bl
538 jnc setbad
539
540 addw %bx, %bx
541 jmp *spec_inits(%bx)
542
543setmenu:
544 orb %al, %al # 80x25 is an exception
545 jz _set_80x25
546
547 pushw %bx # Set mode chosen from menu
548 call mode_table # Build the mode table
549 popw %ax
550 shlw $2, %ax
551 addw %ax, %si
552 cmpw %di, %si
553 jnc setbad
554
555 movw (%si), %ax # Fetch mode ID
556_m_s: jmp mode_set
557
558setres: pushw %bx # Set mode chosen by resolution
559 call mode_table
560 popw %bx
561 xchgb %bl, %bh
562setr1: lodsw
563 cmpw $ASK_VGA, %ax # End of the list?
564 jz setbad
565
566 lodsw
567 cmpw %bx, %ax
568 jnz setr1
569
570 movw -4(%si), %ax # Fetch mode ID
571 jmp _m_s
572
573check_vesa:
574#ifdef CONFIG_FIRMWARE_EDID
575 leaw modelist+1024, %di
576 movw $0x4f00, %ax
577 int $0x10
578 cmpw $0x004f, %ax
579 jnz setbad
580
581 movw 4(%di), %ax
582 movw %ax, vbe_version
583#endif
584 leaw modelist+1024, %di
585 subb $VIDEO_FIRST_VESA>>8, %bh
586 movw %bx, %cx # Get mode information structure
587 movw $0x4f01, %ax
588 int $0x10
589 addb $VIDEO_FIRST_VESA>>8, %bh
590 cmpw $0x004f, %ax
591 jnz setbad
592
593 movb (%di), %al # Check capabilities.
594 andb $0x19, %al
595 cmpb $0x09, %al
596 jz setvesa # This is a text mode
597
598 movb (%di), %al # Check capabilities.
599 andb $0x99, %al
600 cmpb $0x99, %al
601 jnz _setbad # Doh! No linear frame buffer.
602
603 subb $VIDEO_FIRST_VESA>>8, %bh
604 orw $0x4000, %bx # Use linear frame buffer
605 movw $0x4f02, %ax # VESA BIOS mode set call
606 int $0x10
607 cmpw $0x004f, %ax # AL=4f if implemented
608 jnz _setbad # AH=0 if OK
609
610 movb $1, graphic_mode # flag graphic mode
611 movb $0, do_restore # no screen restore
612 stc
613 ret
614
615_setbad: jmp setbad # Ugly...
616
617# Recalculate vertical display end registers -- this fixes various
618# inconsistencies of extended modes on many adapters. Called when
619# the VIDEO_RECALC flag is set in the mode ID.
620
621setrec: subb $VIDEO_RECALC>>8, %ah # Set the base mode
622 call mode_set
623 jnc rct3
624
625 movw %gs:(0x485), %ax # Font size in pixels
626 movb %gs:(0x484), %bl # Number of rows
627 incb %bl
628 mulb %bl # Number of visible
629 decw %ax # scan lines - 1
630 movw $0x3d4, %dx
631 movw %ax, %bx
632 movb $0x12, %al # Lower 8 bits
633 movb %bl, %ah
634 outw %ax, %dx
635 movb $0x07, %al # Bits 8 and 9 in the overflow register
636 call inidx
637 xchgb %al, %ah
638 andb $0xbd, %ah
639 shrb %bh
640 jnc rct1
641 orb $0x02, %ah
642rct1: shrb %bh
643 jnc rct2
644 orb $0x40, %ah
645rct2: movb $0x07, %al
646 outw %ax, %dx
647 stc
648rct3: ret
649
650# Table of routines for setting of the special modes.
651spec_inits:
652 .word set_80x25
653 .word set_8pixel
654 .word set_80x43
655 .word set_80x28
656 .word set_current
657 .word set_80x30
658 .word set_80x34
659 .word set_80x60
660 .word set_gfx
661
662# Set the 80x25 mode. If already set, do nothing.
663set_80x25:
664 movw $0x5019, force_size # Override possibly broken BIOS
665use_80x25:
666#ifdef CONFIG_VIDEO_400_HACK
667 movw $0x1202, %ax # Force 400 scan lines
668 movb $0x30, %bl
669 int $0x10
670#else
671 movb $0x0f, %ah # Get current mode ID
672 int $0x10
673 cmpw $0x5007, %ax # Mode 7 (80x25 mono) is the only one available
674 jz st80 # on CGA/MDA/HGA and is also available on EGAM
675
676 cmpw $0x5003, %ax # Unknown mode, force 80x25 color
677 jnz force3
678
679st80: cmpb $0, adapter # CGA/MDA/HGA => mode 3/7 is always 80x25
680 jz set80
681
682 movb %gs:(0x0484), %al # This is EGA+ -- beware of 80x50 etc.
683 orb %al, %al # Some buggy BIOS'es set 0 rows
684 jz set80
685
686 cmpb $24, %al # It's hopefully correct
687 jz set80
688#endif /* CONFIG_VIDEO_400_HACK */
689force3: DO_STORE
690 movw $0x0003, %ax # Forced set
691 int $0x10
692set80: stc
693 ret
694
695# Set the 80x50/80x43 8-pixel mode. Simple BIOS calls.
696set_8pixel:
697 DO_STORE
698 call use_80x25 # The base is 80x25
699set_8pt:
700 movw $0x1112, %ax # Use 8x8 font
701 xorb %bl, %bl
702 int $0x10
703 movw $0x1200, %ax # Use alternate print screen
704 movb $0x20, %bl
705 int $0x10
706 movw $0x1201, %ax # Turn off cursor emulation
707 movb $0x34, %bl
708 int $0x10
709 movb $0x01, %ah # Define cursor scan lines 6-7
710 movw $0x0607, %cx
711 int $0x10
712set_current:
713 stc
714 ret
715
716# Set the 80x28 mode. This mode works on all VGA's, because it's a standard
717# 80x25 mode with 14-point fonts instead of 16-point.
718set_80x28:
719 DO_STORE
720 call use_80x25 # The base is 80x25
721set14: movw $0x1111, %ax # Use 9x14 font
722 xorb %bl, %bl
723 int $0x10
724 movb $0x01, %ah # Define cursor scan lines 11-12
725 movw $0x0b0c, %cx
726 int $0x10
727 stc
728 ret
729
730# Set the 80x43 mode. This mode is works on all VGA's.
731# It's a 350-scanline mode with 8-pixel font.
732set_80x43:
733 DO_STORE
734 movw $0x1201, %ax # Set 350 scans
735 movb $0x30, %bl
736 int $0x10
737 movw $0x0003, %ax # Reset video mode
738 int $0x10
739 jmp set_8pt # Use 8-pixel font
740
741# Set the 80x30 mode (all VGA's). 480 scanlines, 16-pixel font.
742set_80x30:
743 call use_80x25 # Start with real 80x25
744 DO_STORE
745 movw $0x3cc, %dx # Get CRTC port
746 inb %dx, %al
747 movb $0xd4, %dl
748 rorb %al # Mono or color?
749 jc set48a
750
751 movb $0xb4, %dl
752set48a: movw $0x0c11, %ax # Vertical sync end (also unlocks CR0-7)
753 call outidx
754 movw $0x0b06, %ax # Vertical total
755 call outidx
756 movw $0x3e07, %ax # (Vertical) overflow
757 call outidx
758 movw $0xea10, %ax # Vertical sync start
759 call outidx
760 movw $0xdf12, %ax # Vertical display end
761 call outidx
762 movw $0xe715, %ax # Vertical blank start
763 call outidx
764 movw $0x0416, %ax # Vertical blank end
765 call outidx
766 pushw %dx
767 movb $0xcc, %dl # Misc output register (read)
768 inb %dx, %al
769 movb $0xc2, %dl # (write)
770 andb $0x0d, %al # Preserve clock select bits and color bit
771 orb $0xe2, %al # Set correct sync polarity
772 outb %al, %dx
773 popw %dx
774 movw $0x501e, force_size
775 stc # That's all.
776 ret
777
778# Set the 80x34 mode (all VGA's). 480 scans, 14-pixel font.
779set_80x34:
780 call set_80x30 # Set 480 scans
781 call set14 # And 14-pt font
782 movw $0xdb12, %ax # VGA vertical display end
783 movw $0x5022, force_size
784setvde: call outidx
785 stc
786 ret
787
788# Set the 80x60 mode (all VGA's). 480 scans, 8-pixel font.
789set_80x60:
790 call set_80x30 # Set 480 scans
791 call set_8pt # And 8-pt font
792 movw $0xdf12, %ax # VGA vertical display end
793 movw $0x503c, force_size
794 jmp setvde
795
796# Special hack for ThinkPad graphics
797set_gfx:
798#ifdef CONFIG_VIDEO_GFX_HACK
799 movw $VIDEO_GFX_BIOS_AX, %ax
800 movw $VIDEO_GFX_BIOS_BX, %bx
801 int $0x10
802 movw $VIDEO_GFX_DUMMY_RESOLUTION, force_size
803 stc
804#endif
805 ret
806
807#ifdef CONFIG_VIDEO_RETAIN
808
809# Store screen contents to temporary buffer.
810store_screen:
811 cmpb $0, do_restore # Already stored?
812 jnz stsr
813
814 testb $CAN_USE_HEAP, loadflags # Have we space for storing?
815 jz stsr
816
817 pushw %ax
818 pushw %bx
819 pushw force_size # Don't force specific size
820 movw $0, force_size
821 call mode_params # Obtain params of current mode
822 popw force_size
823 movb %fs:(PARAM_VIDEO_LINES), %ah
824 movb %fs:(PARAM_VIDEO_COLS), %al
825 movw %ax, %bx # BX=dimensions
826 mulb %ah
827 movw %ax, %cx # CX=number of characters
828 addw %ax, %ax # Calculate image size
829 addw $modelist+1024+4, %ax
830 cmpw heap_end_ptr, %ax
831 jnc sts1 # Unfortunately, out of memory
832
833 movw %fs:(PARAM_CURSOR_POS), %ax # Store mode params
834 leaw modelist+1024, %di
835 stosw
836 movw %bx, %ax
837 stosw
838 pushw %ds # Store the screen
839 movw video_segment, %ds
840 xorw %si, %si
841 rep
842 movsw
843 popw %ds
844 incb do_restore # Screen will be restored later
845sts1: popw %bx
846 popw %ax
847stsr: ret
848
849# Restore screen contents from temporary buffer.
850restore_screen:
851 cmpb $0, do_restore # Has the screen been stored?
852 jz res1
853
854 call mode_params # Get parameters of current mode
855 movb %fs:(PARAM_VIDEO_LINES), %cl
856 movb %fs:(PARAM_VIDEO_COLS), %ch
857 leaw modelist+1024, %si # Screen buffer
858 lodsw # Set cursor position
859 movw %ax, %dx
860 cmpb %cl, %dh
861 jc res2
862
863 movb %cl, %dh
864 decb %dh
865res2: cmpb %ch, %dl
866 jc res3
867
868 movb %ch, %dl
869 decb %dl
870res3: movb $0x02, %ah
871 movb $0x00, %bh
872 int $0x10
873 lodsw # Display size
874 movb %ah, %dl # DL=number of lines
875 movb $0, %ah # BX=phys. length of orig. line
876 movw %ax, %bx
877 cmpb %cl, %dl # Too many?
878 jc res4
879
880 pushw %ax
881 movb %dl, %al
882 subb %cl, %al
883 mulb %bl
884 addw %ax, %si
885 addw %ax, %si
886 popw %ax
887 movb %cl, %dl
888res4: cmpb %ch, %al # Too wide?
889 jc res5
890
891 movb %ch, %al # AX=width of src. line
892res5: movb $0, %cl
893 xchgb %ch, %cl
894 movw %cx, %bp # BP=width of dest. line
895 pushw %es
896 movw video_segment, %es
897 xorw %di, %di # Move the data
898 addw %bx, %bx # Convert BX and BP to _bytes_
899 addw %bp, %bp
900res6: pushw %si
901 pushw %di
902 movw %ax, %cx
903 rep
904 movsw
905 popw %di
906 popw %si
907 addw %bp, %di
908 addw %bx, %si
909 decb %dl
910 jnz res6
911
912 popw %es # Done
913res1: ret
914#endif /* CONFIG_VIDEO_RETAIN */
915
916# Write to indexed VGA register (AL=index, AH=data, DX=index reg. port)
917outidx: outb %al, %dx
918 pushw %ax
919 movb %ah, %al
920 incw %dx
921 outb %al, %dx
922 decw %dx
923 popw %ax
924 ret
925
926# Build the table of video modes (stored after the setup.S code at the
927# `modelist' label. Each video mode record looks like:
928# .word MODE-ID (our special mode ID (see above))
929# .byte rows (number of rows)
930# .byte columns (number of columns)
931# Returns address of the end of the table in DI, the end is marked
932# with a ASK_VGA ID.
933mode_table:
934 movw mt_end, %di # Already filled?
935 orw %di, %di
936 jnz mtab1x
937
938 leaw modelist, %di # Store standard modes:
939 movl $VIDEO_80x25 + 0x50190000, %eax # The 80x25 mode (ALL)
940 stosl
941 movb adapter, %al # CGA/MDA/HGA -- no more modes
942 orb %al, %al
943 jz mtabe
944
945 decb %al
946 jnz mtabv
947
948 movl $VIDEO_8POINT + 0x502b0000, %eax # The 80x43 EGA mode
949 stosl
950 jmp mtabe
951
952mtab1x: jmp mtab1
953
954mtabv: leaw vga_modes, %si # All modes for std VGA
955 movw $vga_modes_end-vga_modes, %cx
956 rep # I'm unable to use movsw as I don't know how to store a half
957 movsb # of the expression above to cx without using explicit shr.
958
959 cmpb $0, scanning # Mode scan requested?
960 jz mscan1
961
962 call mode_scan
963mscan1:
964
965#ifdef CONFIG_VIDEO_LOCAL
966 call local_modes
967#endif /* CONFIG_VIDEO_LOCAL */
968
969#ifdef CONFIG_VIDEO_VESA
970 call vesa_modes # Detect VESA VGA modes
971#endif /* CONFIG_VIDEO_VESA */
972
973#ifdef CONFIG_VIDEO_SVGA
974 cmpb $0, scanning # Bypass when scanning
975 jnz mscan2
976
977 call svga_modes # Detect SVGA cards & modes
978mscan2:
979#endif /* CONFIG_VIDEO_SVGA */
980
981mtabe:
982
983#ifdef CONFIG_VIDEO_COMPACT
984 leaw modelist, %si
985 movw %di, %dx
986 movw %si, %di
987cmt1: cmpw %dx, %si # Scan all modes
988 jz cmt2
989
990 leaw modelist, %bx # Find in previous entries
991 movw 2(%si), %cx
992cmt3: cmpw %bx, %si
993 jz cmt4
994
995 cmpw 2(%bx), %cx # Found => don't copy this entry
996 jz cmt5
997
998 addw $4, %bx
999 jmp cmt3
1000
1001cmt4: movsl # Copy entry
1002 jmp cmt1
1003
1004cmt5: addw $4, %si # Skip entry
1005 jmp cmt1
1006
1007cmt2:
1008#endif /* CONFIG_VIDEO_COMPACT */
1009
1010 movw $ASK_VGA, (%di) # End marker
1011 movw %di, mt_end
1012mtab1: leaw modelist, %si # SI=mode list, DI=list end
1013ret0: ret
1014
1015# Modes usable on all standard VGAs
1016vga_modes:
1017 .word VIDEO_8POINT
1018 .word 0x5032 # 80x50
1019 .word VIDEO_80x43
1020 .word 0x502b # 80x43
1021 .word VIDEO_80x28
1022 .word 0x501c # 80x28
1023 .word VIDEO_80x30
1024 .word 0x501e # 80x30
1025 .word VIDEO_80x34
1026 .word 0x5022 # 80x34
1027 .word VIDEO_80x60
1028 .word 0x503c # 80x60
1029#ifdef CONFIG_VIDEO_GFX_HACK
1030 .word VIDEO_GFX_HACK
1031 .word VIDEO_GFX_DUMMY_RESOLUTION
1032#endif
1033
1034vga_modes_end:
1035# Detect VESA modes.
1036
1037#ifdef CONFIG_VIDEO_VESA
1038vesa_modes:
1039 cmpb $2, adapter # VGA only
1040 jnz ret0
1041
1042 movw %di, %bp # BP=original mode table end
1043 addw $0x200, %di # Buffer space
1044 movw $0x4f00, %ax # VESA Get card info call
1045 int $0x10
1046 movw %bp, %di
1047 cmpw $0x004f, %ax # Successful?
1048 jnz ret0
1049
1050 cmpw $0x4556, 0x200(%di)
1051 jnz ret0
1052
1053 cmpw $0x4153, 0x202(%di)
1054 jnz ret0
1055
1056 movw $vesa_name, card_name # Set name to "VESA VGA"
1057 pushw %gs
1058 lgsw 0x20e(%di), %si # GS:SI=mode list
1059 movw $128, %cx # Iteration limit
1060vesa1:
1061# gas version 2.9.1, using BFD version 2.9.1.0.23 buggers the next inst.
1062# XXX: lodsw %gs:(%si), %ax # Get next mode in the list
1063 gs; lodsw
1064 cmpw $0xffff, %ax # End of the table?
1065 jz vesar
1066
1067 cmpw $0x0080, %ax # Check validity of mode ID
1068 jc vesa2
1069
1070 orb %ah, %ah # Valid IDs: 0x0000-0x007f/0x0100-0x07ff
1071 jz vesan # Certain BIOSes report 0x80-0xff!
1072
1073 cmpw $0x0800, %ax
1074 jnc vesae
1075
1076vesa2: pushw %cx
1077 movw %ax, %cx # Get mode information structure
1078 movw $0x4f01, %ax
1079 int $0x10
1080 movw %cx, %bx # BX=mode number
1081 addb $VIDEO_FIRST_VESA>>8, %bh
1082 popw %cx
1083 cmpw $0x004f, %ax
1084 jnz vesan # Don't report errors (buggy BIOSES)
1085
1086 movb (%di), %al # Check capabilities. We require
1087 andb $0x19, %al # a color text mode.
1088 cmpb $0x09, %al
1089 jnz vesan
1090
1091 cmpw $0xb800, 8(%di) # Standard video memory address required
1092 jnz vesan
1093
1094 testb $2, (%di) # Mode characteristics supplied?
1095 movw %bx, (%di) # Store mode number
1096 jz vesa3
1097
1098 xorw %dx, %dx
1099 movw 0x12(%di), %bx # Width
1100 orb %bh, %bh
1101 jnz vesan
1102
1103 movb %bl, 0x3(%di)
1104 movw 0x14(%di), %ax # Height
1105 orb %ah, %ah
1106 jnz vesan
1107
1108 movb %al, 2(%di)
1109 mulb %bl
1110 cmpw $8193, %ax # Small enough for Linux console driver?
1111 jnc vesan
1112
1113 jmp vesaok
1114
1115vesa3: subw $0x8108, %bx # This mode has no detailed info specified,
1116 jc vesan # so it must be a standard VESA mode.
1117
1118 cmpw $5, %bx
1119 jnc vesan
1120
1121 movw vesa_text_mode_table(%bx), %ax
1122 movw %ax, 2(%di)
1123vesaok: addw $4, %di # The mode is valid. Store it.
1124vesan: loop vesa1 # Next mode. Limit exceeded => error
1125vesae: leaw vesaer, %si
1126 call prtstr
1127 movw %bp, %di # Discard already found modes.
1128vesar: popw %gs
1129 ret
1130
1131# Dimensions of standard VESA text modes
1132vesa_text_mode_table:
1133 .byte 60, 80 # 0108
1134 .byte 25, 132 # 0109
1135 .byte 43, 132 # 010A
1136 .byte 50, 132 # 010B
1137 .byte 60, 132 # 010C
1138#endif /* CONFIG_VIDEO_VESA */
1139
1140# Scan for video modes. A bit dirty, but should work.
1141mode_scan:
1142 movw $0x0100, %cx # Start with mode 0
1143scm1: movb $0, %ah # Test the mode
1144 movb %cl, %al
1145 int $0x10
1146 movb $0x0f, %ah
1147 int $0x10
1148 cmpb %cl, %al
1149 jnz scm2 # Mode not set
1150
1151 movw $0x3c0, %dx # Test if it's a text mode
1152 movb $0x10, %al # Mode bits
1153 call inidx
1154 andb $0x03, %al
1155 jnz scm2
1156
1157 movb $0xce, %dl # Another set of mode bits
1158 movb $0x06, %al
1159 call inidx
1160 shrb %al
1161 jc scm2
1162
1163 movb $0xd4, %dl # Cursor location
1164 movb $0x0f, %al
1165 call inidx
1166 orb %al, %al
1167 jnz scm2
1168
1169 movw %cx, %ax # Ok, store the mode
1170 stosw
1171 movb %gs:(0x484), %al # Number of rows
1172 incb %al
1173 stosb
1174 movw %gs:(0x44a), %ax # Number of columns
1175 stosb
1176scm2: incb %cl
1177 jns scm1
1178
1179 movw $0x0003, %ax # Return back to mode 3
1180 int $0x10
1181 ret
1182
1183tstidx: outw %ax, %dx # OUT DX,AX and inidx
1184inidx: outb %al, %dx # Read from indexed VGA register
1185 incw %dx # AL=index, DX=index reg port -> AL=data
1186 inb %dx, %al
1187 decw %dx
1188 ret
1189
1190# Try to detect type of SVGA card and supply (usually approximate) video
1191# mode table for it.
1192
1193#ifdef CONFIG_VIDEO_SVGA
1194svga_modes:
1195 leaw svga_table, %si # Test all known SVGA adapters
1196dosvga: lodsw
1197 movw %ax, %bp # Default mode table
1198 orw %ax, %ax
1199 jz didsv1
1200
1201 lodsw # Pointer to test routine
1202 pushw %si
1203 pushw %di
1204 pushw %es
1205 movw $0xc000, %bx
1206 movw %bx, %es
1207 call *%ax # Call test routine
1208 popw %es
1209 popw %di
1210 popw %si
1211 orw %bp, %bp
1212 jz dosvga
1213
1214 movw %bp, %si # Found, copy the modes
1215 movb svga_prefix, %ah
1216cpsvga: lodsb
1217 orb %al, %al
1218 jz didsv
1219
1220 stosw
1221 movsw
1222 jmp cpsvga
1223
1224didsv: movw %si, card_name # Store pointer to card name
1225didsv1: ret
1226
1227# Table of all known SVGA cards. For each card, we store a pointer to
1228# a table of video modes supported by the card and a pointer to a routine
1229# used for testing of presence of the card. The video mode table is always
1230# followed by the name of the card or the chipset.
1231svga_table:
1232 .word ati_md, ati_test
1233 .word oak_md, oak_test
1234 .word paradise_md, paradise_test
1235 .word realtek_md, realtek_test
1236 .word s3_md, s3_test
1237 .word chips_md, chips_test
1238 .word video7_md, video7_test
1239 .word cirrus5_md, cirrus5_test
1240 .word cirrus6_md, cirrus6_test
1241 .word cirrus1_md, cirrus1_test
1242 .word ahead_md, ahead_test
1243 .word everex_md, everex_test
1244 .word genoa_md, genoa_test
1245 .word trident_md, trident_test
1246 .word tseng_md, tseng_test
1247 .word 0
1248
1249# Test routines and mode tables:
1250
1251# S3 - The test algorithm was taken from the SuperProbe package
1252# for XFree86 1.2.1. Report bugs to Christoph.Niemann@linux.org
1253s3_test:
1254 movw $0x0f35, %cx # we store some constants in cl/ch
1255 movw $0x03d4, %dx
1256 movb $0x38, %al
1257 call inidx
1258 movb %al, %bh # store current CRT-register 0x38
1259 movw $0x0038, %ax
1260 call outidx # disable writing to special regs
1261 movb %cl, %al # check whether we can write special reg 0x35
1262 call inidx
1263 movb %al, %bl # save the current value of CRT reg 0x35
1264 andb $0xf0, %al # clear bits 0-3
1265 movb %al, %ah
1266 movb %cl, %al # and write it to CRT reg 0x35
1267 call outidx
1268 call inidx # now read it back
1269 andb %ch, %al # clear the upper 4 bits
1270 jz s3_2 # the first test failed. But we have a
1271
1272 movb %bl, %ah # second chance
1273 movb %cl, %al
1274 call outidx
1275 jmp s3_1 # do the other tests
1276
1277s3_2: movw %cx, %ax # load ah with 0xf and al with 0x35
1278 orb %bl, %ah # set the upper 4 bits of ah with the orig value
1279 call outidx # write ...
1280 call inidx # ... and reread
1281 andb %cl, %al # turn off the upper 4 bits
1282 pushw %ax
1283 movb %bl, %ah # restore old value in register 0x35
1284 movb %cl, %al
1285 call outidx
1286 popw %ax
1287 cmpb %ch, %al # setting lower 4 bits was successful => bad
1288 je no_s3 # writing is allowed => this is not an S3
1289
1290s3_1: movw $0x4838, %ax # allow writing to special regs by putting
1291 call outidx # magic number into CRT-register 0x38
1292 movb %cl, %al # check whether we can write special reg 0x35
1293 call inidx
1294 movb %al, %bl
1295 andb $0xf0, %al
1296 movb %al, %ah
1297 movb %cl, %al
1298 call outidx
1299 call inidx
1300 andb %ch, %al
1301 jnz no_s3 # no, we can't write => no S3
1302
1303 movw %cx, %ax
1304 orb %bl, %ah
1305 call outidx
1306 call inidx
1307 andb %ch, %al
1308 pushw %ax
1309 movb %bl, %ah # restore old value in register 0x35
1310 movb %cl, %al
1311 call outidx
1312 popw %ax
1313 cmpb %ch, %al
1314 jne no_s31 # writing not possible => no S3
1315 movb $0x30, %al
1316 call inidx # now get the S3 id ...
1317 leaw idS3, %di
1318 movw $0x10, %cx
1319 repne
1320 scasb
1321 je no_s31
1322
1323 movb %bh, %ah
1324 movb $0x38, %al
1325 jmp s3rest
1326
1327no_s3: movb $0x35, %al # restore CRT register 0x35
1328 movb %bl, %ah
1329 call outidx
1330no_s31: xorw %bp, %bp # Detection failed
1331s3rest: movb %bh, %ah
1332 movb $0x38, %al # restore old value of CRT register 0x38
1333 jmp outidx
1334
1335idS3: .byte 0x81, 0x82, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95
1336 .byte 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa8, 0xb0
1337
1338s3_md: .byte 0x54, 0x2b, 0x84
1339 .byte 0x55, 0x19, 0x84
1340 .byte 0
1341 .ascii "S3"
1342 .byte 0
1343
1344# ATI cards.
1345ati_test:
1346 leaw idati, %si
1347 movw $0x31, %di
1348 movw $0x09, %cx
1349 repe
1350 cmpsb
1351 je atiok
1352
1353 xorw %bp, %bp
1354atiok: ret
1355
1356idati: .ascii "761295520"
1357
1358ati_md: .byte 0x23, 0x19, 0x84
1359 .byte 0x33, 0x2c, 0x84
1360 .byte 0x22, 0x1e, 0x64
1361 .byte 0x21, 0x19, 0x64
1362 .byte 0x58, 0x21, 0x50
1363 .byte 0x5b, 0x1e, 0x50
1364 .byte 0
1365 .ascii "ATI"
1366 .byte 0
1367
1368# AHEAD
1369ahead_test:
1370 movw $0x200f, %ax
1371 movw $0x3ce, %dx
1372 outw %ax, %dx
1373 incw %dx
1374 inb %dx, %al
1375 cmpb $0x20, %al
1376 je isahed
1377
1378 cmpb $0x21, %al
1379 je isahed
1380
1381 xorw %bp, %bp
1382isahed: ret
1383
1384ahead_md:
1385 .byte 0x22, 0x2c, 0x84
1386 .byte 0x23, 0x19, 0x84
1387 .byte 0x24, 0x1c, 0x84
1388 .byte 0x2f, 0x32, 0xa0
1389 .byte 0x32, 0x22, 0x50
1390 .byte 0x34, 0x42, 0x50
1391 .byte 0
1392 .ascii "Ahead"
1393 .byte 0
1394
1395# Chips & Tech.
1396chips_test:
1397 movw $0x3c3, %dx
1398 inb %dx, %al
1399 orb $0x10, %al
1400 outb %al, %dx
1401 movw $0x104, %dx
1402 inb %dx, %al
1403 movb %al, %bl
1404 movw $0x3c3, %dx
1405 inb %dx, %al
1406 andb $0xef, %al
1407 outb %al, %dx
1408 cmpb $0xa5, %bl
1409 je cantok
1410
1411 xorw %bp, %bp
1412cantok: ret
1413
1414chips_md:
1415 .byte 0x60, 0x19, 0x84
1416 .byte 0x61, 0x32, 0x84
1417 .byte 0
1418 .ascii "Chips & Technologies"
1419 .byte 0
1420
1421# Cirrus Logic 5X0
1422cirrus1_test:
1423 movw $0x3d4, %dx
1424 movb $0x0c, %al
1425 outb %al, %dx
1426 incw %dx
1427 inb %dx, %al
1428 movb %al, %bl
1429 xorb %al, %al
1430 outb %al, %dx
1431 decw %dx
1432 movb $0x1f, %al
1433 outb %al, %dx
1434 incw %dx
1435 inb %dx, %al
1436 movb %al, %bh
1437 xorb %ah, %ah
1438 shlb $4, %al
1439 movw %ax, %cx
1440 movb %bh, %al
1441 shrb $4, %al
1442 addw %ax, %cx
1443 shlw $8, %cx
1444 addw $6, %cx
1445 movw %cx, %ax
1446 movw $0x3c4, %dx
1447 outw %ax, %dx
1448 incw %dx
1449 inb %dx, %al
1450 andb %al, %al
1451 jnz nocirr
1452
1453 movb %bh, %al
1454 outb %al, %dx
1455 inb %dx, %al
1456 cmpb $0x01, %al
1457 je iscirr
1458
1459nocirr: xorw %bp, %bp
1460iscirr: movw $0x3d4, %dx
1461 movb %bl, %al
1462 xorb %ah, %ah
1463 shlw $8, %ax
1464 addw $0x0c, %ax
1465 outw %ax, %dx
1466 ret
1467
1468cirrus1_md:
1469 .byte 0x1f, 0x19, 0x84
1470 .byte 0x20, 0x2c, 0x84
1471 .byte 0x22, 0x1e, 0x84
1472 .byte 0x31, 0x25, 0x64
1473 .byte 0
1474 .ascii "Cirrus Logic 5X0"
1475 .byte 0
1476
1477# Cirrus Logic 54XX
1478cirrus5_test:
1479 movw $0x3c4, %dx
1480 movb $6, %al
1481 call inidx
1482 movb %al, %bl # BL=backup
1483 movw $6, %ax
1484 call tstidx
1485 cmpb $0x0f, %al
1486 jne c5fail
1487
1488 movw $0x1206, %ax
1489 call tstidx
1490 cmpb $0x12, %al
1491 jne c5fail
1492
1493 movb $0x1e, %al
1494 call inidx
1495 movb %al, %bh
1496 movb %bh, %ah
1497 andb $0xc0, %ah
1498 movb $0x1e, %al
1499 call tstidx
1500 andb $0x3f, %al
1501 jne c5xx
1502
1503 movb $0x1e, %al
1504 movb %bh, %ah
1505 orb $0x3f, %ah
1506 call tstidx
1507 xorb $0x3f, %al
1508 andb $0x3f, %al
1509c5xx: pushf
1510 movb $0x1e, %al
1511 movb %bh, %ah
1512 outw %ax, %dx
1513 popf
1514 je c5done
1515
1516c5fail: xorw %bp, %bp
1517c5done: movb $6, %al
1518 movb %bl, %ah
1519 outw %ax, %dx
1520 ret
1521
1522cirrus5_md:
1523 .byte 0x14, 0x19, 0x84
1524 .byte 0x54, 0x2b, 0x84
1525 .byte 0
1526 .ascii "Cirrus Logic 54XX"
1527 .byte 0
1528
1529# Cirrus Logic 64XX -- no known extra modes, but must be identified, because
1530# it's misidentified by the Ahead test.
1531cirrus6_test:
1532 movw $0x3ce, %dx
1533 movb $0x0a, %al
1534 call inidx
1535 movb %al, %bl # BL=backup
1536 movw $0xce0a, %ax
1537 call tstidx
1538 orb %al, %al
1539 jne c2fail
1540
1541 movw $0xec0a, %ax
1542 call tstidx
1543 cmpb $0x01, %al
1544 jne c2fail
1545
1546 movb $0xaa, %al
1547 call inidx # 4X, 5X, 7X and 8X are valid 64XX chip ID's.
1548 shrb $4, %al
1549 subb $4, %al
1550 jz c6done
1551
1552 decb %al
1553 jz c6done
1554
1555 subb $2, %al
1556 jz c6done
1557
1558 decb %al
1559 jz c6done
1560
1561c2fail: xorw %bp, %bp
1562c6done: movb $0x0a, %al
1563 movb %bl, %ah
1564 outw %ax, %dx
1565 ret
1566
1567cirrus6_md:
1568 .byte 0
1569 .ascii "Cirrus Logic 64XX"
1570 .byte 0
1571
1572# Everex / Trident
1573everex_test:
1574 movw $0x7000, %ax
1575 xorw %bx, %bx
1576 int $0x10
1577 cmpb $0x70, %al
1578 jne noevrx
1579
1580 shrw $4, %dx
1581 cmpw $0x678, %dx
1582 je evtrid
1583
1584 cmpw $0x236, %dx
1585 jne evrxok
1586
1587evtrid: leaw trident_md, %bp
1588evrxok: ret
1589
1590noevrx: xorw %bp, %bp
1591 ret
1592
1593everex_md:
1594 .byte 0x03, 0x22, 0x50
1595 .byte 0x04, 0x3c, 0x50
1596 .byte 0x07, 0x2b, 0x64
1597 .byte 0x08, 0x4b, 0x64
1598 .byte 0x0a, 0x19, 0x84
1599 .byte 0x0b, 0x2c, 0x84
1600 .byte 0x16, 0x1e, 0x50
1601 .byte 0x18, 0x1b, 0x64
1602 .byte 0x21, 0x40, 0xa0
1603 .byte 0x40, 0x1e, 0x84
1604 .byte 0
1605 .ascii "Everex/Trident"
1606 .byte 0
1607
1608# Genoa.
1609genoa_test:
1610 leaw idgenoa, %si # Check Genoa 'clues'
1611 xorw %ax, %ax
1612 movb %es:(0x37), %al
1613 movw %ax, %di
1614 movw $0x04, %cx
1615 decw %si
1616 decw %di
1617l1: incw %si
1618 incw %di
1619 movb (%si), %al
1620 testb %al, %al
1621 jz l2
1622
1623 cmpb %es:(%di), %al
1624l2: loope l1
1625 orw %cx, %cx
1626 je isgen
1627
1628 xorw %bp, %bp
1629isgen: ret
1630
1631idgenoa: .byte 0x77, 0x00, 0x99, 0x66
1632
1633genoa_md:
1634 .byte 0x58, 0x20, 0x50
1635 .byte 0x5a, 0x2a, 0x64
1636 .byte 0x60, 0x19, 0x84
1637 .byte 0x61, 0x1d, 0x84
1638 .byte 0x62, 0x20, 0x84
1639 .byte 0x63, 0x2c, 0x84
1640 .byte 0x64, 0x3c, 0x84
1641 .byte 0x6b, 0x4f, 0x64
1642 .byte 0x72, 0x3c, 0x50
1643 .byte 0x74, 0x42, 0x50
1644 .byte 0x78, 0x4b, 0x64
1645 .byte 0
1646 .ascii "Genoa"
1647 .byte 0
1648
1649# OAK
1650oak_test:
1651 leaw idoakvga, %si
1652 movw $0x08, %di
1653 movw $0x08, %cx
1654 repe
1655 cmpsb
1656 je isoak
1657
1658 xorw %bp, %bp
1659isoak: ret
1660
1661idoakvga: .ascii "OAK VGA "
1662
1663oak_md: .byte 0x4e, 0x3c, 0x50
1664 .byte 0x4f, 0x3c, 0x84
1665 .byte 0x50, 0x19, 0x84
1666 .byte 0x51, 0x2b, 0x84
1667 .byte 0
1668 .ascii "OAK"
1669 .byte 0
1670
1671# WD Paradise.
1672paradise_test:
1673 leaw idparadise, %si
1674 movw $0x7d, %di
1675 movw $0x04, %cx
1676 repe
1677 cmpsb
1678 je ispara
1679
1680 xorw %bp, %bp
1681ispara: ret
1682
1683idparadise: .ascii "VGA="
1684
1685paradise_md:
1686 .byte 0x41, 0x22, 0x50
1687 .byte 0x47, 0x1c, 0x84
1688 .byte 0x55, 0x19, 0x84
1689 .byte 0x54, 0x2c, 0x84
1690 .byte 0
1691 .ascii "Paradise"
1692 .byte 0
1693
1694# Trident.
1695trident_test:
1696 movw $0x3c4, %dx
1697 movb $0x0e, %al
1698 outb %al, %dx
1699 incw %dx
1700 inb %dx, %al
1701 xchgb %al, %ah
1702 xorb %al, %al
1703 outb %al, %dx
1704 inb %dx, %al
1705 xchgb %ah, %al
1706 movb %al, %bl # Strange thing ... in the book this wasn't
1707 andb $0x02, %bl # necessary but it worked on my card which
1708 jz setb2 # is a trident. Without it the screen goes
1709 # blurred ...
1710 andb $0xfd, %al
1711 jmp clrb2
1712
1713setb2: orb $0x02, %al
1714clrb2: outb %al, %dx
1715 andb $0x0f, %ah
1716 cmpb $0x02, %ah
1717 je istrid
1718
1719 xorw %bp, %bp
1720istrid: ret
1721
1722trident_md:
1723 .byte 0x50, 0x1e, 0x50
1724 .byte 0x51, 0x2b, 0x50
1725 .byte 0x52, 0x3c, 0x50
1726 .byte 0x57, 0x19, 0x84
1727 .byte 0x58, 0x1e, 0x84
1728 .byte 0x59, 0x2b, 0x84
1729 .byte 0x5a, 0x3c, 0x84
1730 .byte 0
1731 .ascii "Trident"
1732 .byte 0
1733
1734# Tseng.
1735tseng_test:
1736 movw $0x3cd, %dx
1737 inb %dx, %al # Could things be this simple ! :-)
1738 movb %al, %bl
1739 movb $0x55, %al
1740 outb %al, %dx
1741 inb %dx, %al
1742 movb %al, %ah
1743 movb %bl, %al
1744 outb %al, %dx
1745 cmpb $0x55, %ah
1746 je istsen
1747
1748isnot: xorw %bp, %bp
1749istsen: ret
1750
1751tseng_md:
1752 .byte 0x26, 0x3c, 0x50
1753 .byte 0x2a, 0x28, 0x64
1754 .byte 0x23, 0x19, 0x84
1755 .byte 0x24, 0x1c, 0x84
1756 .byte 0x22, 0x2c, 0x84
1757 .byte 0x21, 0x3c, 0x84
1758 .byte 0
1759 .ascii "Tseng"
1760 .byte 0
1761
1762# Video7.
1763video7_test:
1764 movw $0x3cc, %dx
1765 inb %dx, %al
1766 movw $0x3b4, %dx
1767 andb $0x01, %al
1768 jz even7
1769
1770 movw $0x3d4, %dx
1771even7: movb $0x0c, %al
1772 outb %al, %dx
1773 incw %dx
1774 inb %dx, %al
1775 movb %al, %bl
1776 movb $0x55, %al
1777 outb %al, %dx
1778 inb %dx, %al
1779 decw %dx
1780 movb $0x1f, %al
1781 outb %al, %dx
1782 incw %dx
1783 inb %dx, %al
1784 movb %al, %bh
1785 decw %dx
1786 movb $0x0c, %al
1787 outb %al, %dx
1788 incw %dx
1789 movb %bl, %al
1790 outb %al, %dx
1791 movb $0x55, %al
1792 xorb $0xea, %al
1793 cmpb %bh, %al
1794 jne isnot
1795
1796 movb $VIDEO_FIRST_V7>>8, svga_prefix # Use special mode switching
1797 ret
1798
1799video7_md:
1800 .byte 0x40, 0x2b, 0x50
1801 .byte 0x43, 0x3c, 0x50
1802 .byte 0x44, 0x3c, 0x64
1803 .byte 0x41, 0x19, 0x84
1804 .byte 0x42, 0x2c, 0x84
1805 .byte 0x45, 0x1c, 0x84
1806 .byte 0
1807 .ascii "Video 7"
1808 .byte 0
1809
1810# Realtek VGA
1811realtek_test:
1812 leaw idrtvga, %si
1813 movw $0x45, %di
1814 movw $0x0b, %cx
1815 repe
1816 cmpsb
1817 je isrt
1818
1819 xorw %bp, %bp
1820isrt: ret
1821
1822idrtvga: .ascii "REALTEK VGA"
1823
1824realtek_md:
1825 .byte 0x1a, 0x3c, 0x50
1826 .byte 0x1b, 0x19, 0x84
1827 .byte 0x1c, 0x1e, 0x84
1828 .byte 0x1d, 0x2b, 0x84
1829 .byte 0x1e, 0x3c, 0x84
1830 .byte 0
1831 .ascii "REALTEK"
1832 .byte 0
1833
1834#endif /* CONFIG_VIDEO_SVGA */
1835
1836# User-defined local mode table (VGA only)
1837#ifdef CONFIG_VIDEO_LOCAL
1838local_modes:
1839 leaw local_mode_table, %si
1840locm1: lodsw
1841 orw %ax, %ax
1842 jz locm2
1843
1844 stosw
1845 movsw
1846 jmp locm1
1847
1848locm2: ret
1849
1850# This is the table of local video modes which can be supplied manually
1851# by the user. Each entry consists of mode ID (word) and dimensions
1852# (byte for column count and another byte for row count). These modes
1853# are placed before all SVGA and VESA modes and override them if table
1854# compacting is enabled. The table must end with a zero word followed
1855# by NUL-terminated video adapter name.
1856local_mode_table:
1857 .word 0x0100 # Example: 40x25
1858 .byte 25,40
1859 .word 0
1860 .ascii "Local"
1861 .byte 0
1862#endif /* CONFIG_VIDEO_LOCAL */
1863
1864# Read a key and return the ASCII code in al, scan code in ah
1865getkey: xorb %ah, %ah
1866 int $0x16
1867 ret
1868
1869# Read a key with a timeout of 30 seconds.
1870# The hardware clock is used to get the time.
1871getkt: call gettime
1872 addb $30, %al # Wait 30 seconds
1873 cmpb $60, %al
1874 jl lminute
1875
1876 subb $60, %al
1877lminute:
1878 movb %al, %cl
1879again: movb $0x01, %ah
1880 int $0x16
1881 jnz getkey # key pressed, so get it
1882
1883 call gettime
1884 cmpb %cl, %al
1885 jne again
1886
1887 movb $0x20, %al # timeout, return `space'
1888 ret
1889
1890# Flush the keyboard buffer
1891flush: movb $0x01, %ah
1892 int $0x16
1893 jz empty
1894
1895 xorb %ah, %ah
1896 int $0x16
1897 jmp flush
1898
1899empty: ret
1900
1901# Print hexadecimal number.
1902prthw: pushw %ax
1903 movb %ah, %al
1904 call prthb
1905 popw %ax
1906prthb: pushw %ax
1907 shrb $4, %al
1908 call prthn
1909 popw %ax
1910 andb $0x0f, %al
1911prthn: cmpb $0x0a, %al
1912 jc prth1
1913
1914 addb $0x07, %al
1915prth1: addb $0x30, %al
1916 jmp prtchr
1917
1918# Print decimal number in al
1919prtdec: pushw %ax
1920 pushw %cx
1921 xorb %ah, %ah
1922 movb $0x0a, %cl
1923 idivb %cl
1924 cmpb $0x09, %al
1925 jbe lt100
1926
1927 call prtdec
1928 jmp skip10
1929
1930lt100: addb $0x30, %al
1931 call prtchr
1932skip10: movb %ah, %al
1933 addb $0x30, %al
1934 call prtchr
1935 popw %cx
1936 popw %ax
1937 ret
1938
1939store_edid:
1940#ifdef CONFIG_FIRMWARE_EDID
1941 pushw %es # just save all registers
1942 pushw %ax
1943 pushw %bx
1944 pushw %cx
1945 pushw %dx
1946 pushw %di
1947
1948 pushw %fs
1949 popw %es
1950
1951 movl $0x13131313, %eax # memset block with 0x13
1952 movw $32, %cx
1953 movw $0x140, %di
1954 cld
1955 rep
1956 stosl
1957
1958 cmpw $0x0200, vbe_version # only do EDID on >= VBE2.0
1959 jl no_edid
1960
1961 pushw %es # save ES
1962 xorw %di, %di # Report Capability
1963 pushw %di
1964 popw %es # ES:DI must be 0:0
1965 movw $0x4f15, %ax
1966 xorw %bx, %bx
1967 xorw %cx, %cx
1968 int $0x10
1969 popw %es # restore ES
1970
1971 cmpb $0x00, %ah # call successful
1972 jne no_edid
1973
1974 cmpb $0x4f, %al # function supported
1975 jne no_edid
1976
1977 movw $0x4f15, %ax # do VBE/DDC
1978 movw $0x01, %bx
1979 movw $0x00, %cx
1980 movw $0x00, %dx
1981 movw $0x140, %di
1982 int $0x10
1983
1984no_edid:
1985 popw %di # restore all registers
1986 popw %dx
1987 popw %cx
1988 popw %bx
1989 popw %ax
1990 popw %es
1991#endif
1992 ret
1993
1994# VIDEO_SELECT-only variables
1995mt_end: .word 0 # End of video mode table if built
1996edit_buf: .space 6 # Line editor buffer
1997card_name: .word 0 # Pointer to adapter name
1998scanning: .byte 0 # Performing mode scan
1999do_restore: .byte 0 # Screen contents altered during mode change
2000svga_prefix: .byte VIDEO_FIRST_BIOS>>8 # Default prefix for BIOS modes
2001graphic_mode: .byte 0 # Graphic mode with a linear frame buffer
2002dac_size: .byte 6 # DAC bit depth
2003vbe_version: .word 0 # VBE bios version
2004
2005# Status messages
2006keymsg: .ascii "Press <RETURN> to see video modes available, "
2007 .ascii "<SPACE> to continue or wait 30 secs"
2008 .byte 0x0d, 0x0a, 0
2009
2010listhdr: .byte 0x0d, 0x0a
2011 .ascii "Mode: COLSxROWS:"
2012
2013crlft: .byte 0x0d, 0x0a, 0
2014
2015prompt: .byte 0x0d, 0x0a
2016 .asciz "Enter mode number or `scan': "
2017
2018unknt: .asciz "Unknown mode ID. Try again."
2019
2020badmdt: .ascii "You passed an undefined mode number."
2021 .byte 0x0d, 0x0a, 0
2022
2023vesaer: .ascii "Error: Scanning of VESA modes failed. Please "
2024 .ascii "report to <mj@ucw.cz>."
2025 .byte 0x0d, 0x0a, 0
2026
2027old_name: .asciz "CGA/MDA/HGA"
2028
2029ega_name: .asciz "EGA"
2030
2031svga_name: .ascii " "
2032
2033vga_name: .asciz "VGA"
2034
2035vesa_name: .asciz "VESA"
2036
2037name_bann: .asciz "Video adapter: "
2038#endif /* CONFIG_VIDEO_SELECT */
2039
2040# Other variables:
2041adapter: .byte 0 # Video adapter: 0=CGA/MDA/HGA,1=EGA,2=VGA
2042video_segment: .word 0xb800 # Video memory segment
2043force_size: .word 0 # Use this size instead of the one in BIOS vars
diff --git a/arch/i386/boot/video.c b/arch/i386/boot/video.c
new file mode 100644
index 0000000000..958130ef00
--- /dev/null
+++ b/arch/i386/boot/video.c
@@ -0,0 +1,461 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/video.c
13 *
14 * Select video mode
15 */
16
17#include "boot.h"
18#include "video.h"
19#include "vesa.h"
20
21/*
22 * Mode list variables
23 */
24static struct card_info cards[]; /* List of cards to probe for */
25
26/*
27 * Common variables
28 */
29int adapter; /* 0=CGA/MDA/HGC, 1=EGA, 2=VGA+ */
30u16 video_segment;
31int force_x, force_y; /* Don't query the BIOS for cols/rows */
32
33int do_restore = 0; /* Screen contents changed during mode flip */
34int graphic_mode; /* Graphic mode with linear frame buffer */
35
36static void store_cursor_position(void)
37{
38 u16 curpos;
39 u16 ax, bx;
40
41 ax = 0x0300;
42 bx = 0;
43 asm(INT10
44 : "=d" (curpos), "+a" (ax), "+b" (bx)
45 : : "ecx", "esi", "edi");
46
47 boot_params.screen_info.orig_x = curpos;
48 boot_params.screen_info.orig_y = curpos >> 8;
49}
50
51static void store_video_mode(void)
52{
53 u16 ax, page;
54
55 /* N.B.: the saving of the video page here is a bit silly,
56 since we pretty much assume page 0 everywhere. */
57 ax = 0x0f00;
58 asm(INT10
59 : "+a" (ax), "=b" (page)
60 : : "ecx", "edx", "esi", "edi");
61
62 /* Not all BIOSes are clean with respect to the top bit */
63 boot_params.screen_info.orig_video_mode = ax & 0x7f;
64 boot_params.screen_info.orig_video_page = page;
65}
66
67/*
68 * Store the video mode parameters for later usage by the kernel.
69 * This is done by asking the BIOS except for the rows/columns
70 * parameters in the default 80x25 mode -- these are set directly,
71 * because some very obscure BIOSes supply insane values.
72 */
73static void store_mode_params(void)
74{
75 u16 font_size;
76 int x, y;
77
78 /* For graphics mode, it is up to the mode-setting driver
79 (currently only video-vesa.c) to store the parameters */
80 if (graphic_mode)
81 return;
82
83 store_cursor_position();
84 store_video_mode();
85
86 if (boot_params.screen_info.orig_video_mode == 0x07) {
87 /* MDA, HGC, or VGA in monochrome mode */
88 video_segment = 0xb000;
89 } else {
90 /* CGA, EGA, VGA and so forth */
91 video_segment = 0xb800;
92 }
93
94 set_fs(0);
95 font_size = rdfs16(0x485); /* Font size, BIOS area */
96 boot_params.screen_info.orig_video_points = font_size;
97
98 x = rdfs16(0x44a);
99 y = (adapter == ADAPTER_CGA) ? 25 : rdfs8(0x484)+1;
100
101 if (force_x)
102 x = force_x;
103 if (force_y)
104 y = force_y;
105
106 boot_params.screen_info.orig_video_cols = x;
107 boot_params.screen_info.orig_video_lines = y;
108}
109
110/* Probe the video drivers and have them generate their mode lists. */
111static void probe_cards(int unsafe)
112{
113 struct card_info *card;
114 static u8 probed[2];
115
116 if (probed[unsafe])
117 return;
118
119 probed[unsafe] = 1;
120
121 for (card = video_cards; card < video_cards_end; card++) {
122 if (card->unsafe == unsafe) {
123 if (card->probe)
124 card->nmodes = card->probe();
125 else
126 card->nmodes = 0;
127 }
128 }
129}
130
131/* Test if a mode is defined */
132int mode_defined(u16 mode)
133{
134 struct card_info *card;
135 struct mode_info *mi;
136 int i;
137
138 for (card = video_cards; card < video_cards_end; card++) {
139 mi = card->modes;
140 for (i = 0; i < card->nmodes; i++, mi++) {
141 if (mi->mode == mode)
142 return 1;
143 }
144 }
145
146 return 0;
147}
148
149/* Set mode (without recalc) */
150static int raw_set_mode(u16 mode)
151{
152 int nmode, i;
153 struct card_info *card;
154 struct mode_info *mi;
155
156 /* Drop the recalc bit if set */
157 mode &= ~VIDEO_RECALC;
158
159 /* Scan for mode based on fixed ID, position, or resolution */
160 nmode = 0;
161 for (card = video_cards; card < video_cards_end; card++) {
162 mi = card->modes;
163 for (i = 0; i < card->nmodes; i++, mi++) {
164 int visible = mi->x || mi->y;
165
166 if ((mode == nmode && visible) ||
167 mode == mi->mode ||
168 mode == (mi->y << 8)+mi->x)
169 return card->set_mode(mi);
170
171 if (visible)
172 nmode++;
173 }
174 }
175
176 /* Nothing found? Is it an "exceptional" (unprobed) mode? */
177 for (card = video_cards; card < video_cards_end; card++) {
178 if (mode >= card->xmode_first &&
179 mode < card->xmode_first+card->xmode_n) {
180 struct mode_info mix;
181 mix.mode = mode;
182 mix.x = mix.y = 0;
183 return card->set_mode(&mix);
184 }
185 }
186
187 /* Otherwise, failure... */
188 return -1;
189}
190
191/*
192 * Recalculate the vertical video cutoff (hack!)
193 */
194static void vga_recalc_vertical(void)
195{
196 unsigned int font_size, rows;
197 u16 crtc;
198 u8 pt, ov;
199
200 set_fs(0);
201 font_size = rdfs8(0x485); /* BIOS: font size (pixels) */
202 rows = force_y ? force_y : rdfs8(0x484)+1; /* Text rows */
203
204 rows *= font_size; /* Visible scan lines */
205 rows--; /* ... minus one */
206
207 crtc = vga_crtc();
208
209 pt = in_idx(crtc, 0x11);
210 pt &= ~0x80; /* Unlock CR0-7 */
211 out_idx(pt, crtc, 0x11);
212
213 out_idx((u8)rows, crtc, 0x12); /* Lower height register */
214
215 ov = in_idx(crtc, 0x07); /* Overflow register */
216 ov &= 0xbd;
217 ov |= (rows >> (8-1)) & 0x02;
218 ov |= (rows >> (9-6)) & 0x40;
219 out_idx(ov, crtc, 0x07);
220}
221
222/* Set mode (with recalc if specified) */
223static int set_mode(u16 mode)
224{
225 int rv;
226
227 /* Very special mode numbers... */
228 if (mode == VIDEO_CURRENT_MODE)
229 return 0; /* Nothing to do... */
230 else if (mode == NORMAL_VGA)
231 mode = VIDEO_80x25;
232 else if (mode == EXTENDED_VGA)
233 mode = VIDEO_8POINT;
234
235 rv = raw_set_mode(mode);
236 if (rv)
237 return rv;
238
239 if (mode & VIDEO_RECALC)
240 vga_recalc_vertical();
241
242 return 0;
243}
244
245static unsigned int get_entry(void)
246{
247 char entry_buf[4];
248 int i, len = 0;
249 int key;
250 unsigned int v;
251
252 do {
253 key = getchar();
254
255 if (key == '\b') {
256 if (len > 0) {
257 puts("\b \b");
258 len--;
259 }
260 } else if ((key >= '0' && key <= '9') ||
261 (key >= 'A' && key <= 'Z') ||
262 (key >= 'a' && key <= 'z')) {
263 if (len < sizeof entry_buf) {
264 entry_buf[len++] = key;
265 putchar(key);
266 }
267 }
268 } while (key != '\r');
269 putchar('\n');
270
271 if (len == 0)
272 return VIDEO_CURRENT_MODE; /* Default */
273
274 v = 0;
275 for (i = 0; i < len; i++) {
276 v <<= 4;
277 key = entry_buf[i] | 0x20;
278 v += (key > '9') ? key-'a'+10 : key-'0';
279 }
280
281 return v;
282}
283
284static void display_menu(void)
285{
286 struct card_info *card;
287 struct mode_info *mi;
288 char ch;
289 int i;
290
291 puts("Mode: COLSxROWS:\n");
292
293 ch = '0';
294 for (card = video_cards; card < video_cards_end; card++) {
295 mi = card->modes;
296 for (i = 0; i < card->nmodes; i++, mi++) {
297 int visible = mi->x && mi->y;
298 u16 mode_id = mi->mode ? mi->mode :
299 (mi->y << 8)+mi->x;
300
301 if (!visible)
302 continue; /* Hidden mode */
303
304 printf("%c %04X %3dx%-3d %s\n",
305 ch, mode_id, mi->x, mi->y, card->card_name);
306
307 if (ch == '9')
308 ch = 'a';
309 else if (ch == 'z' || ch == ' ')
310 ch = ' '; /* Out of keys... */
311 else
312 ch++;
313 }
314 }
315}
316
317#define H(x) ((x)-'a'+10)
318#define SCAN ((H('s')<<12)+(H('c')<<8)+(H('a')<<4)+H('n'))
319
320static unsigned int mode_menu(void)
321{
322 int key;
323 unsigned int sel;
324
325 puts("Press <ENTER> to see video modes available, "
326 "<SPACE> to continue, or wait 30 sec\n");
327
328 kbd_flush();
329 while (1) {
330 key = getchar_timeout();
331 if (key == ' ' || key == 0)
332 return VIDEO_CURRENT_MODE; /* Default */
333 if (key == '\r')
334 break;
335 putchar('\a'); /* Beep! */
336 }
337
338
339 for (;;) {
340 display_menu();
341
342 puts("Enter a video mode or \"scan\" to scan for "
343 "additional modes: ");
344 sel = get_entry();
345 if (sel != SCAN)
346 return sel;
347
348 probe_cards(1);
349 }
350}
351
352#ifdef CONFIG_VIDEO_RETAIN
353/* Save screen content to the heap */
354struct saved_screen {
355 int x, y;
356 int curx, cury;
357 u16 *data;
358} saved;
359
360static void save_screen(void)
361{
362 /* Should be called after store_mode_params() */
363 saved.x = boot_params.screen_info.orig_video_cols;
364 saved.y = boot_params.screen_info.orig_video_lines;
365 saved.curx = boot_params.screen_info.orig_x;
366 saved.cury = boot_params.screen_info.orig_y;
367
368 if (heap_free() < saved.x*saved.y*sizeof(u16)+512)
369 return; /* Not enough heap to save the screen */
370
371 saved.data = GET_HEAP(u16, saved.x*saved.y);
372
373 set_fs(video_segment);
374 copy_from_fs(saved.data, 0, saved.x*saved.y*sizeof(u16));
375}
376
377static void restore_screen(void)
378{
379 /* Should be called after store_mode_params() */
380 int xs = boot_params.screen_info.orig_video_cols;
381 int ys = boot_params.screen_info.orig_video_lines;
382 int y;
383 addr_t dst = 0;
384 u16 *src = saved.data;
385 u16 ax, bx, dx;
386
387 if (graphic_mode)
388 return; /* Can't restore onto a graphic mode */
389
390 if (!src)
391 return; /* No saved screen contents */
392
393 /* Restore screen contents */
394
395 set_fs(video_segment);
396 for (y = 0; y < ys; y++) {
397 int npad;
398
399 if (y < saved.y) {
400 int copy = (xs < saved.x) ? xs : saved.x;
401 copy_to_fs(dst, src, copy*sizeof(u16));
402 dst += copy*sizeof(u16);
403 src += saved.x;
404 npad = (xs < saved.x) ? 0 : xs-saved.x;
405 } else {
406 npad = xs;
407 }
408
409 /* Writes "npad" blank characters to
410 video_segment:dst and advances dst */
411 asm volatile("pushw %%es ; "
412 "movw %2,%%es ; "
413 "shrw %%cx ; "
414 "jnc 1f ; "
415 "stosw \n\t"
416 "1: rep;stosl ; "
417 "popw %%es"
418 : "+D" (dst), "+c" (npad)
419 : "bdS" (video_segment),
420 "a" (0x07200720));
421 }
422
423 /* Restore cursor position */
424 ax = 0x0200; /* Set cursor position */
425 bx = 0; /* Page number (<< 8) */
426 dx = (saved.cury << 8)+saved.curx;
427 asm volatile(INT10
428 : "+a" (ax), "+b" (bx), "+d" (dx)
429 : : "ecx", "esi", "edi");
430}
431#else
432#define save_screen() ((void)0)
433#define restore_screen() ((void)0)
434#endif
435
436void set_video(void)
437{
438 u16 mode = boot_params.hdr.vid_mode;
439
440 RESET_HEAP();
441
442 store_mode_params();
443 save_screen();
444 probe_cards(0);
445
446 for (;;) {
447 if (mode == ASK_VGA)
448 mode = mode_menu();
449
450 if (!set_mode(mode))
451 break;
452
453 printf("Undefined video mode number: %x\n", mode);
454 mode = ASK_VGA;
455 }
456 vesa_store_edid();
457 store_mode_params();
458
459 if (do_restore)
460 restore_screen();
461}
diff --git a/arch/i386/boot/video.h b/arch/i386/boot/video.h
new file mode 100644
index 0000000000..b92447d512
--- /dev/null
+++ b/arch/i386/boot/video.h
@@ -0,0 +1,152 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/video.h
13 *
14 * Header file for the real-mode video probing code
15 */
16
17#ifndef BOOT_VIDEO_H
18#define BOOT_VIDEO_H
19
20#include <linux/types.h>
21
22/* Enable autodetection of SVGA adapters and modes. */
23#undef CONFIG_VIDEO_SVGA
24
25/* Enable autodetection of VESA modes */
26#define CONFIG_VIDEO_VESA
27
28/* Retain screen contents when switching modes */
29#define CONFIG_VIDEO_RETAIN
30
31/* Force 400 scan lines for standard modes (hack to fix bad BIOS behaviour */
32#undef CONFIG_VIDEO_400_HACK
33
34/* This code uses an extended set of video mode numbers. These include:
35 * Aliases for standard modes
36 * NORMAL_VGA (-1)
37 * EXTENDED_VGA (-2)
38 * ASK_VGA (-3)
39 * Video modes numbered by menu position -- NOT RECOMMENDED because of lack
40 * of compatibility when extending the table. These are between 0x00 and 0xff.
41 */
42#define VIDEO_FIRST_MENU 0x0000
43
44/* Standard BIOS video modes (BIOS number + 0x0100) */
45#define VIDEO_FIRST_BIOS 0x0100
46
47/* VESA BIOS video modes (VESA number + 0x0200) */
48#define VIDEO_FIRST_VESA 0x0200
49
50/* Video7 special modes (BIOS number + 0x0900) */
51#define VIDEO_FIRST_V7 0x0900
52
53/* Special video modes */
54#define VIDEO_FIRST_SPECIAL 0x0f00
55#define VIDEO_80x25 0x0f00
56#define VIDEO_8POINT 0x0f01
57#define VIDEO_80x43 0x0f02
58#define VIDEO_80x28 0x0f03
59#define VIDEO_CURRENT_MODE 0x0f04
60#define VIDEO_80x30 0x0f05
61#define VIDEO_80x34 0x0f06
62#define VIDEO_80x60 0x0f07
63#define VIDEO_GFX_HACK 0x0f08
64#define VIDEO_LAST_SPECIAL 0x0f09
65
66/* Video modes given by resolution */
67#define VIDEO_FIRST_RESOLUTION 0x1000
68
69/* The "recalculate timings" flag */
70#define VIDEO_RECALC 0x8000
71
72/* Define DO_STORE according to CONFIG_VIDEO_RETAIN */
73#ifdef CONFIG_VIDEO_RETAIN
74void store_screen(void);
75#define DO_STORE() store_screen()
76#else
77#define DO_STORE() ((void)0)
78#endif /* CONFIG_VIDEO_RETAIN */
79
80/*
81 * Mode table structures
82 */
83
84struct mode_info {
85 u16 mode; /* Mode number (vga= style) */
86 u8 x, y; /* Width, height */
87};
88
89struct card_info {
90 const char *card_name;
91 int (*set_mode)(struct mode_info *mode);
92 int (*probe)(void);
93 struct mode_info *modes;
94 int nmodes; /* Number of probed modes so far */
95 int unsafe; /* Probing is unsafe, only do after "scan" */
96 u16 xmode_first; /* Unprobed modes to try to call anyway */
97 u16 xmode_n; /* Size of unprobed mode range */
98};
99
100#define __videocard struct card_info __attribute__((section(".videocards")))
101extern struct card_info video_cards[], video_cards_end[];
102
103int mode_defined(u16 mode); /* video.c */
104
105/* Basic video information */
106#define ADAPTER_CGA 0 /* CGA/MDA/HGC */
107#define ADAPTER_EGA 1
108#define ADAPTER_VGA 2
109
110extern int adapter;
111extern u16 video_segment;
112extern int force_x, force_y; /* Don't query the BIOS for cols/rows */
113extern int do_restore; /* Restore screen contents */
114extern int graphic_mode; /* Graphics mode with linear frame buffer */
115
116/*
117 * int $0x10 is notorious for touching registers it shouldn't.
118 * gcc doesn't like %ebp being clobbered, so define it as a push/pop
119 * sequence here.
120 *
121 * A number of systems, including the original PC can clobber %bp in
122 * certain circumstances, like when scrolling. There exists at least
123 * one Trident video card which could clobber DS under a set of
124 * circumstances that we are unlikely to encounter (scrolling when
125 * using an extended graphics mode of more than 800x600 pixels), but
126 * it's cheap insurance to deal with that here.
127 */
128#define INT10 "pushl %%ebp; pushw %%ds; int $0x10; popw %%ds; popl %%ebp"
129
130/* Accessing VGA indexed registers */
131static inline u8 in_idx(u16 port, u8 index)
132{
133 outb(index, port);
134 return inb(port+1);
135}
136
137static inline void out_idx(u8 v, u16 port, u8 index)
138{
139 outw(index+(v << 8), port);
140}
141
142/* Writes a value to an indexed port and then reads the port again */
143static inline u8 tst_idx(u8 v, u16 port, u8 index)
144{
145 out_idx(port, index, v);
146 return in_idx(port, index);
147}
148
149/* Get the I/O port of the VGA CRTC */
150u16 vga_crtc(void); /* video-vga.c */
151
152#endif /* BOOT_VIDEO_H */
diff --git a/arch/i386/boot/voyager.c b/arch/i386/boot/voyager.c
new file mode 100644
index 0000000000..61c8fe0453
--- /dev/null
+++ b/arch/i386/boot/voyager.c
@@ -0,0 +1,46 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
5 *
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * arch/i386/boot/voyager.c
13 *
14 * Get the Voyager config information
15 */
16
17#include "boot.h"
18
19#ifdef CONFIG_X86_VOYAGER
20
21int query_voyager(void)
22{
23 u8 err;
24 u16 es, di;
25 /* Abuse the apm_bios_info area for this */
26 u8 *data_ptr = (u8 *)&boot_params.apm_bios_info;
27
28 data_ptr[0] = 0xff; /* Flag on config not found(?) */
29
30 asm("pushw %%es ; "
31 "int $0x15 ; "
32 "setc %0 ; "
33 "movw %%es, %1 ; "
34 "popw %%es"
35 : "=q" (err), "=r" (es), "=D" (di)
36 : "a" (0xffc0));
37
38 if (err)
39 return -1; /* Not Voyager */
40
41 set_fs(es);
42 copy_from_fs(data_ptr, di, 7); /* Table is 7 bytes apparently */
43 return 0;
44}
45
46#endif /* CONFIG_X86_VOYAGER */
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
index 280898b045..a574cd2c8b 100644
--- a/arch/i386/kernel/acpi/boot.c
+++ b/arch/i386/kernel/acpi/boot.c
@@ -621,8 +621,6 @@ static int __init acpi_parse_sbf(struct acpi_table_header *table)
621static int __init acpi_parse_hpet(struct acpi_table_header *table) 621static int __init acpi_parse_hpet(struct acpi_table_header *table)
622{ 622{
623 struct acpi_table_hpet *hpet_tbl; 623 struct acpi_table_hpet *hpet_tbl;
624 struct resource *hpet_res;
625 resource_size_t res_start;
626 624
627 hpet_tbl = (struct acpi_table_hpet *)table; 625 hpet_tbl = (struct acpi_table_hpet *)table;
628 if (!hpet_tbl) { 626 if (!hpet_tbl) {
@@ -636,29 +634,10 @@ static int __init acpi_parse_hpet(struct acpi_table_header *table)
636 return -1; 634 return -1;
637 } 635 }
638 636
639#define HPET_RESOURCE_NAME_SIZE 9
640 hpet_res = alloc_bootmem(sizeof(*hpet_res) + HPET_RESOURCE_NAME_SIZE);
641 if (hpet_res) {
642 memset(hpet_res, 0, sizeof(*hpet_res));
643 hpet_res->name = (void *)&hpet_res[1];
644 hpet_res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
645 snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE,
646 "HPET %u", hpet_tbl->sequence);
647 hpet_res->end = (1 * 1024) - 1;
648 }
649
650 hpet_address = hpet_tbl->address.address; 637 hpet_address = hpet_tbl->address.address;
651 printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", 638 printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n",
652 hpet_tbl->id, hpet_address); 639 hpet_tbl->id, hpet_address);
653 640
654 res_start = hpet_address;
655
656 if (hpet_res) {
657 hpet_res->start = res_start;
658 hpet_res->end += res_start;
659 insert_resource(&iomem_resource, hpet_res);
660 }
661
662 return 0; 641 return 0;
663} 642}
664#else 643#else
diff --git a/arch/i386/kernel/acpi/wakeup.S b/arch/i386/kernel/acpi/wakeup.S
index b781b38131..a2295a34b2 100644
--- a/arch/i386/kernel/acpi/wakeup.S
+++ b/arch/i386/kernel/acpi/wakeup.S
@@ -230,6 +230,7 @@ bogus_magic:
230# 230#
231ENTRY(acpi_copy_wakeup_routine) 231ENTRY(acpi_copy_wakeup_routine)
232 232
233 pushl %ebx
233 sgdt saved_gdt 234 sgdt saved_gdt
234 sidt saved_idt 235 sidt saved_idt
235 sldt saved_ldt 236 sldt saved_ldt
@@ -263,6 +264,7 @@ ENTRY(acpi_copy_wakeup_routine)
263 movl %edx, video_flags - wakeup_start (%eax) 264 movl %edx, video_flags - wakeup_start (%eax)
264 movl $0x12345678, real_magic - wakeup_start (%eax) 265 movl $0x12345678, real_magic - wakeup_start (%eax)
265 movl $0x12345678, saved_magic 266 movl $0x12345678, saved_magic
267 popl %ebx
266 ret 268 ret
267 269
268save_registers: 270save_registers:
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
index 4112afe712..47001d50a0 100644
--- a/arch/i386/kernel/apm.c
+++ b/arch/i386/kernel/apm.c
@@ -222,6 +222,7 @@
222#include <linux/capability.h> 222#include <linux/capability.h>
223#include <linux/device.h> 223#include <linux/device.h>
224#include <linux/kernel.h> 224#include <linux/kernel.h>
225#include <linux/freezer.h>
225#include <linux/smp.h> 226#include <linux/smp.h>
226#include <linux/dmi.h> 227#include <linux/dmi.h>
227#include <linux/suspend.h> 228#include <linux/suspend.h>
@@ -2311,7 +2312,6 @@ static int __init apm_init(void)
2311 remove_proc_entry("apm", NULL); 2312 remove_proc_entry("apm", NULL);
2312 return err; 2313 return err;
2313 } 2314 }
2314 kapmd_task->flags |= PF_NOFREEZE;
2315 wake_up_process(kapmd_task); 2315 wake_up_process(kapmd_task);
2316 2316
2317 if (num_online_cpus() > 1 && !smp ) { 2317 if (num_online_cpus() > 1 && !smp ) {
diff --git a/arch/i386/kernel/asm-offsets.c b/arch/i386/kernel/asm-offsets.c
index 27a776c904..25f7eb5139 100644
--- a/arch/i386/kernel/asm-offsets.c
+++ b/arch/i386/kernel/asm-offsets.c
@@ -17,6 +17,8 @@
17#include <asm/thread_info.h> 17#include <asm/thread_info.h>
18#include <asm/elf.h> 18#include <asm/elf.h>
19 19
20#include <xen/interface/xen.h>
21
20#define DEFINE(sym, val) \ 22#define DEFINE(sym, val) \
21 asm volatile("\n->" #sym " %0 " #val : : "i" (val)) 23 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
22 24
@@ -59,6 +61,7 @@ void foo(void)
59 OFFSET(TI_addr_limit, thread_info, addr_limit); 61 OFFSET(TI_addr_limit, thread_info, addr_limit);
60 OFFSET(TI_restart_block, thread_info, restart_block); 62 OFFSET(TI_restart_block, thread_info, restart_block);
61 OFFSET(TI_sysenter_return, thread_info, sysenter_return); 63 OFFSET(TI_sysenter_return, thread_info, sysenter_return);
64 OFFSET(TI_cpu, thread_info, cpu);
62 BLANK(); 65 BLANK();
63 66
64 OFFSET(GDS_size, Xgt_desc_struct, size); 67 OFFSET(GDS_size, Xgt_desc_struct, size);
@@ -115,4 +118,10 @@ void foo(void)
115 OFFSET(PARAVIRT_iret, paravirt_ops, iret); 118 OFFSET(PARAVIRT_iret, paravirt_ops, iret);
116 OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0); 119 OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0);
117#endif 120#endif
121
122#ifdef CONFIG_XEN
123 BLANK();
124 OFFSET(XEN_vcpu_info_mask, vcpu_info, evtchn_upcall_mask);
125 OFFSET(XEN_vcpu_info_pending, vcpu_info, evtchn_upcall_pending);
126#endif
118} 127}
diff --git a/arch/i386/kernel/cpu/Makefile b/arch/i386/kernel/cpu/Makefile
index 74f27a463d..0b6a8551e9 100644
--- a/arch/i386/kernel/cpu/Makefile
+++ b/arch/i386/kernel/cpu/Makefile
@@ -8,7 +8,7 @@ obj-y += amd.o
8obj-y += cyrix.o 8obj-y += cyrix.o
9obj-y += centaur.o 9obj-y += centaur.o
10obj-y += transmeta.o 10obj-y += transmeta.o
11obj-y += intel.o intel_cacheinfo.o 11obj-y += intel.o intel_cacheinfo.o addon_cpuid_features.o
12obj-y += rise.o 12obj-y += rise.o
13obj-y += nexgen.o 13obj-y += nexgen.o
14obj-y += umc.o 14obj-y += umc.o
diff --git a/arch/i386/kernel/cpu/addon_cpuid_features.c b/arch/i386/kernel/cpu/addon_cpuid_features.c
new file mode 100644
index 0000000000..3e91d3ee26
--- /dev/null
+++ b/arch/i386/kernel/cpu/addon_cpuid_features.c
@@ -0,0 +1,50 @@
1
2/*
3 * Routines to indentify additional cpu features that are scattered in
4 * cpuid space.
5 */
6
7#include <linux/cpu.h>
8
9#include <asm/processor.h>
10
11struct cpuid_bit {
12 u16 feature;
13 u8 reg;
14 u8 bit;
15 u32 level;
16};
17
18enum cpuid_regs {
19 CR_EAX = 0,
20 CR_ECX,
21 CR_EDX,
22 CR_EBX
23};
24
25void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
26{
27 u32 max_level;
28 u32 regs[4];
29 const struct cpuid_bit *cb;
30
31 static const struct cpuid_bit cpuid_bits[] = {
32 { X86_FEATURE_IDA, CR_EAX, 1, 0x00000006 },
33 { 0, 0, 0, 0 }
34 };
35
36 for (cb = cpuid_bits; cb->feature; cb++) {
37
38 /* Verify that the level is valid */
39 max_level = cpuid_eax(cb->level & 0xffff0000);
40 if (max_level < cb->level ||
41 max_level > (cb->level | 0xffff))
42 continue;
43
44 cpuid(cb->level, &regs[CR_EAX], &regs[CR_EBX],
45 &regs[CR_ECX], &regs[CR_EDX]);
46
47 if (regs[cb->reg] & (1 << cb->bit))
48 set_bit(cb->feature, c->x86_capability);
49 }
50}
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c
index 794d593c47..e5419a9dec 100644
--- a/arch/i386/kernel/cpu/common.c
+++ b/arch/i386/kernel/cpu/common.c
@@ -353,6 +353,8 @@ static void __cpuinit generic_identify(struct cpuinfo_x86 * c)
353 if ( xlvl >= 0x80000004 ) 353 if ( xlvl >= 0x80000004 )
354 get_model_name(c); /* Default name */ 354 get_model_name(c); /* Default name */
355 } 355 }
356
357 init_scattered_cpuid_features(c);
356 } 358 }
357 359
358 early_intel_workaround(c); 360 early_intel_workaround(c);
diff --git a/arch/i386/kernel/cpu/cpufreq/Kconfig b/arch/i386/kernel/cpu/cpufreq/Kconfig
index e912aae947..094118ba00 100644
--- a/arch/i386/kernel/cpu/cpufreq/Kconfig
+++ b/arch/i386/kernel/cpu/cpufreq/Kconfig
@@ -90,10 +90,17 @@ config X86_POWERNOW_K8
90 If in doubt, say N. 90 If in doubt, say N.
91 91
92config X86_POWERNOW_K8_ACPI 92config X86_POWERNOW_K8_ACPI
93 bool 93 bool "ACPI Support"
94 depends on X86_POWERNOW_K8 && ACPI_PROCESSOR 94 select ACPI_PROCESSOR
95 depends on !(X86_POWERNOW_K8 = y && ACPI_PROCESSOR = m) 95 depends on X86_POWERNOW_K8
96 default y 96 default y
97 help
98 This provides access to the K8s Processor Performance States via ACPI.
99 This driver is probably required for CPUFreq to work with multi-socket and
100 SMP systems. It is not required on at least some single-socket yet
101 multi-core systems, even if SMP is enabled.
102
103 It is safe to say Y here.
97 104
98config X86_GX_SUSPMOD 105config X86_GX_SUSPMOD
99 tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation" 106 tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation"
@@ -109,7 +116,7 @@ config X86_GX_SUSPMOD
109config X86_SPEEDSTEP_CENTRINO 116config X86_SPEEDSTEP_CENTRINO
110 tristate "Intel Enhanced SpeedStep" 117 tristate "Intel Enhanced SpeedStep"
111 select CPU_FREQ_TABLE 118 select CPU_FREQ_TABLE
112 select X86_SPEEDSTEP_CENTRINO_TABLE if (!X86_SPEEDSTEP_CENTRINO_ACPI) 119 select X86_SPEEDSTEP_CENTRINO_TABLE
113 help 120 help
114 This adds the CPUFreq driver for Enhanced SpeedStep enabled 121 This adds the CPUFreq driver for Enhanced SpeedStep enabled
115 mobile CPUs. This means Intel Pentium M (Centrino) CPUs. However, 122 mobile CPUs. This means Intel Pentium M (Centrino) CPUs. However,
@@ -121,20 +128,6 @@ config X86_SPEEDSTEP_CENTRINO
121 128
122 If in doubt, say N. 129 If in doubt, say N.
123 130
124config X86_SPEEDSTEP_CENTRINO_ACPI
125 bool "Use ACPI tables to decode valid frequency/voltage (deprecated)"
126 depends on X86_SPEEDSTEP_CENTRINO && ACPI_PROCESSOR
127 depends on !(X86_SPEEDSTEP_CENTRINO = y && ACPI_PROCESSOR = m)
128 help
129 This is deprecated and this functionality is now merged into
130 acpi_cpufreq (X86_ACPI_CPUFREQ). Use that driver instead of
131 speedstep_centrino.
132 Use primarily the information provided in the BIOS ACPI tables
133 to determine valid CPU frequency and voltage pairings. It is
134 required for the driver to work on non-Banias CPUs.
135
136 If in doubt, say Y.
137
138config X86_SPEEDSTEP_CENTRINO_TABLE 131config X86_SPEEDSTEP_CENTRINO_TABLE
139 bool "Built-in tables for Banias CPUs" 132 bool "Built-in tables for Banias CPUs"
140 depends on X86_SPEEDSTEP_CENTRINO 133 depends on X86_SPEEDSTEP_CENTRINO
@@ -230,7 +223,7 @@ comment "shared options"
230config X86_ACPI_CPUFREQ_PROC_INTF 223config X86_ACPI_CPUFREQ_PROC_INTF
231 bool "/proc/acpi/processor/../performance interface (deprecated)" 224 bool "/proc/acpi/processor/../performance interface (deprecated)"
232 depends on PROC_FS 225 depends on PROC_FS
233 depends on X86_ACPI_CPUFREQ || X86_SPEEDSTEP_CENTRINO_ACPI || X86_POWERNOW_K7_ACPI || X86_POWERNOW_K8_ACPI 226 depends on X86_ACPI_CPUFREQ || X86_POWERNOW_K7_ACPI || X86_POWERNOW_K8_ACPI
234 help 227 help
235 This enables the deprecated /proc/acpi/processor/../performance 228 This enables the deprecated /proc/acpi/processor/../performance
236 interface. While it is helpful for debugging, the generic, 229 interface. While it is helpful for debugging, the generic,
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
index 10baa3501e..18c8b67ea3 100644
--- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -167,11 +167,13 @@ static void do_drv_read(struct drv_cmd *cmd)
167 167
168static void do_drv_write(struct drv_cmd *cmd) 168static void do_drv_write(struct drv_cmd *cmd)
169{ 169{
170 u32 h = 0; 170 u32 lo, hi;
171 171
172 switch (cmd->type) { 172 switch (cmd->type) {
173 case SYSTEM_INTEL_MSR_CAPABLE: 173 case SYSTEM_INTEL_MSR_CAPABLE:
174 wrmsr(cmd->addr.msr.reg, cmd->val, h); 174 rdmsr(cmd->addr.msr.reg, lo, hi);
175 lo = (lo & ~INTEL_MSR_RANGE) | (cmd->val & INTEL_MSR_RANGE);
176 wrmsr(cmd->addr.msr.reg, lo, hi);
175 break; 177 break;
176 case SYSTEM_IO_CAPABLE: 178 case SYSTEM_IO_CAPABLE:
177 acpi_os_write_port((acpi_io_address)cmd->addr.io.port, 179 acpi_os_write_port((acpi_io_address)cmd->addr.io.port,
@@ -372,7 +374,6 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,
372 struct cpufreq_freqs freqs; 374 struct cpufreq_freqs freqs;
373 cpumask_t online_policy_cpus; 375 cpumask_t online_policy_cpus;
374 struct drv_cmd cmd; 376 struct drv_cmd cmd;
375 unsigned int msr;
376 unsigned int next_state = 0; /* Index into freq_table */ 377 unsigned int next_state = 0; /* Index into freq_table */
377 unsigned int next_perf_state = 0; /* Index into perf table */ 378 unsigned int next_perf_state = 0; /* Index into perf table */
378 unsigned int i; 379 unsigned int i;
@@ -417,11 +418,7 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,
417 case SYSTEM_INTEL_MSR_CAPABLE: 418 case SYSTEM_INTEL_MSR_CAPABLE:
418 cmd.type = SYSTEM_INTEL_MSR_CAPABLE; 419 cmd.type = SYSTEM_INTEL_MSR_CAPABLE;
419 cmd.addr.msr.reg = MSR_IA32_PERF_CTL; 420 cmd.addr.msr.reg = MSR_IA32_PERF_CTL;
420 msr = 421 cmd.val = (u32) perf->states[next_perf_state].control;
421 (u32) perf->states[next_perf_state].
422 control & INTEL_MSR_RANGE;
423 cmd.val = get_cur_val(online_policy_cpus);
424 cmd.val = (cmd.val & ~INTEL_MSR_RANGE) | msr;
425 break; 422 break;
426 case SYSTEM_IO_CAPABLE: 423 case SYSTEM_IO_CAPABLE:
427 cmd.type = SYSTEM_IO_CAPABLE; 424 cmd.type = SYSTEM_IO_CAPABLE;
diff --git a/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c b/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
index 0d49d73d1b..66acd50399 100644
--- a/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
+++ b/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
@@ -391,8 +391,6 @@ static struct cpufreq_driver nforce2_driver = {
391 */ 391 */
392static unsigned int nforce2_detect_chipset(void) 392static unsigned int nforce2_detect_chipset(void)
393{ 393{
394 u8 revision;
395
396 nforce2_chipset_dev = pci_get_subsys(PCI_VENDOR_ID_NVIDIA, 394 nforce2_chipset_dev = pci_get_subsys(PCI_VENDOR_ID_NVIDIA,
397 PCI_DEVICE_ID_NVIDIA_NFORCE2, 395 PCI_DEVICE_ID_NVIDIA_NFORCE2,
398 PCI_ANY_ID, PCI_ANY_ID, NULL); 396 PCI_ANY_ID, PCI_ANY_ID, NULL);
@@ -400,10 +398,8 @@ static unsigned int nforce2_detect_chipset(void)
400 if (nforce2_chipset_dev == NULL) 398 if (nforce2_chipset_dev == NULL)
401 return -ENODEV; 399 return -ENODEV;
402 400
403 pci_read_config_byte(nforce2_chipset_dev, PCI_REVISION_ID, &revision);
404
405 printk(KERN_INFO "cpufreq: Detected nForce2 chipset revision %X\n", 401 printk(KERN_INFO "cpufreq: Detected nForce2 chipset revision %X\n",
406 revision); 402 nforce2_chipset_dev->revision);
407 printk(KERN_INFO 403 printk(KERN_INFO
408 "cpufreq: FSB changing is maybe unstable and can lead to crashes and data loss.\n"); 404 "cpufreq: FSB changing is maybe unstable and can lead to crashes and data loss.\n");
409 405
diff --git a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
index 6667e9cceb..194144539a 100644
--- a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
+++ b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
@@ -115,7 +115,6 @@ struct gxfreq_params {
115 u8 pci_suscfg; 115 u8 pci_suscfg;
116 u8 pci_pmer1; 116 u8 pci_pmer1;
117 u8 pci_pmer2; 117 u8 pci_pmer2;
118 u8 pci_rev;
119 struct pci_dev *cs55x0; 118 struct pci_dev *cs55x0;
120}; 119};
121 120
@@ -276,7 +275,7 @@ static void gx_set_cpuspeed(unsigned int khz)
276 pci_write_config_byte(gx_params->cs55x0, PCI_VIDTC, 100);/* typical 50 to 100ms */ 275 pci_write_config_byte(gx_params->cs55x0, PCI_VIDTC, 100);/* typical 50 to 100ms */
277 pci_write_config_byte(gx_params->cs55x0, PCI_PMER1, pmer1); 276 pci_write_config_byte(gx_params->cs55x0, PCI_PMER1, pmer1);
278 277
279 if (gx_params->pci_rev < 0x10) { /* CS5530(rev 1.2, 1.3) */ 278 if (gx_params->cs55x0->revision < 0x10) { /* CS5530(rev 1.2, 1.3) */
280 suscfg = gx_params->pci_suscfg | SUSMOD; 279 suscfg = gx_params->pci_suscfg | SUSMOD;
281 } else { /* CS5530A,B.. */ 280 } else { /* CS5530A,B.. */
282 suscfg = gx_params->pci_suscfg | SUSMOD | PWRSVE; 281 suscfg = gx_params->pci_suscfg | SUSMOD | PWRSVE;
@@ -471,7 +470,6 @@ static int __init cpufreq_gx_init(void)
471 pci_read_config_byte(params->cs55x0, PCI_PMER2, &(params->pci_pmer2)); 470 pci_read_config_byte(params->cs55x0, PCI_PMER2, &(params->pci_pmer2));
472 pci_read_config_byte(params->cs55x0, PCI_MODON, &(params->on_duration)); 471 pci_read_config_byte(params->cs55x0, PCI_MODON, &(params->on_duration));
473 pci_read_config_byte(params->cs55x0, PCI_MODOFF, &(params->off_duration)); 472 pci_read_config_byte(params->cs55x0, PCI_MODOFF, &(params->off_duration));
474 pci_read_config_byte(params->cs55x0, PCI_REVISION_ID, &params->pci_rev);
475 473
476 if ((ret = cpufreq_register_driver(&gx_suspmod_driver))) { 474 if ((ret = cpufreq_register_driver(&gx_suspmod_driver))) {
477 kfree(params); 475 kfree(params);
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c
index a3df9c039b..ef8f0bc3fc 100644
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.c
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c
@@ -29,6 +29,7 @@
29#include <linux/pci.h> 29#include <linux/pci.h>
30#include <linux/slab.h> 30#include <linux/slab.h>
31#include <linux/string.h> 31#include <linux/string.h>
32#include <linux/delay.h>
32 33
33#include <asm/msr.h> 34#include <asm/msr.h>
34#include <asm/timex.h> 35#include <asm/timex.h>
@@ -55,7 +56,6 @@
55/* Flags */ 56/* Flags */
56#define USE_ACPI_C3 (1 << 1) 57#define USE_ACPI_C3 (1 << 1)
57#define USE_NORTHBRIDGE (1 << 2) 58#define USE_NORTHBRIDGE (1 << 2)
58#define USE_VT8235 (1 << 3)
59 59
60static int cpu_model; 60static int cpu_model;
61static unsigned int numscales=16; 61static unsigned int numscales=16;
@@ -63,22 +63,19 @@ static unsigned int fsb;
63 63
64static const struct mV_pos *vrm_mV_table; 64static const struct mV_pos *vrm_mV_table;
65static const unsigned char *mV_vrm_table; 65static const unsigned char *mV_vrm_table;
66struct f_msr {
67 u8 vrm;
68 u8 pos;
69};
70static struct f_msr f_msr_table[32];
71 66
72static unsigned int highest_speed, lowest_speed; /* kHz */ 67static unsigned int highest_speed, lowest_speed; /* kHz */
73static unsigned int minmult, maxmult; 68static unsigned int minmult, maxmult;
74static int can_scale_voltage; 69static int can_scale_voltage;
75static struct acpi_processor *pr = NULL; 70static struct acpi_processor *pr = NULL;
76static struct acpi_processor_cx *cx = NULL; 71static struct acpi_processor_cx *cx = NULL;
72static u32 acpi_regs_addr;
77static u8 longhaul_flags; 73static u8 longhaul_flags;
78static u8 longhaul_pos; 74static unsigned int longhaul_index;
79 75
80/* Module parameters */ 76/* Module parameters */
81static int scale_voltage; 77static int scale_voltage;
78static int disable_acpi_c3;
82 79
83#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longhaul", msg) 80#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longhaul", msg)
84 81
@@ -144,7 +141,7 @@ static void do_longhaul1(unsigned int clock_ratio_index)
144 rdmsrl(MSR_VIA_BCR2, bcr2.val); 141 rdmsrl(MSR_VIA_BCR2, bcr2.val);
145 /* Enable software clock multiplier */ 142 /* Enable software clock multiplier */
146 bcr2.bits.ESOFTBF = 1; 143 bcr2.bits.ESOFTBF = 1;
147 bcr2.bits.CLOCKMUL = clock_ratio_index; 144 bcr2.bits.CLOCKMUL = clock_ratio_index & 0xff;
148 145
149 /* Sync to timer tick */ 146 /* Sync to timer tick */
150 safe_halt(); 147 safe_halt();
@@ -163,14 +160,12 @@ static void do_longhaul1(unsigned int clock_ratio_index)
163 160
164/* For processor with Longhaul MSR */ 161/* For processor with Longhaul MSR */
165 162
166static void do_powersaver(int cx_address, unsigned int clock_ratio_index) 163static void do_powersaver(int cx_address, unsigned int clock_ratio_index,
164 unsigned int dir)
167{ 165{
168 union msr_longhaul longhaul; 166 union msr_longhaul longhaul;
169 u8 dest_pos;
170 u32 t; 167 u32 t;
171 168
172 dest_pos = f_msr_table[clock_ratio_index].pos;
173
174 rdmsrl(MSR_VIA_LONGHAUL, longhaul.val); 169 rdmsrl(MSR_VIA_LONGHAUL, longhaul.val);
175 /* Setup new frequency */ 170 /* Setup new frequency */
176 longhaul.bits.RevisionKey = longhaul.bits.RevisionID; 171 longhaul.bits.RevisionKey = longhaul.bits.RevisionID;
@@ -178,11 +173,11 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index)
178 longhaul.bits.SoftBusRatio4 = (clock_ratio_index & 0x10) >> 4; 173 longhaul.bits.SoftBusRatio4 = (clock_ratio_index & 0x10) >> 4;
179 /* Setup new voltage */ 174 /* Setup new voltage */
180 if (can_scale_voltage) 175 if (can_scale_voltage)
181 longhaul.bits.SoftVID = f_msr_table[clock_ratio_index].vrm; 176 longhaul.bits.SoftVID = (clock_ratio_index >> 8) & 0x1f;
182 /* Sync to timer tick */ 177 /* Sync to timer tick */
183 safe_halt(); 178 safe_halt();
184 /* Raise voltage if necessary */ 179 /* Raise voltage if necessary */
185 if (can_scale_voltage && longhaul_pos < dest_pos) { 180 if (can_scale_voltage && dir) {
186 longhaul.bits.EnableSoftVID = 1; 181 longhaul.bits.EnableSoftVID = 1;
187 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); 182 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
188 /* Change voltage */ 183 /* Change voltage */
@@ -199,7 +194,6 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index)
199 } 194 }
200 longhaul.bits.EnableSoftVID = 0; 195 longhaul.bits.EnableSoftVID = 0;
201 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); 196 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
202 longhaul_pos = dest_pos;
203 } 197 }
204 198
205 /* Change frequency on next halt or sleep */ 199 /* Change frequency on next halt or sleep */
@@ -220,7 +214,7 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index)
220 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); 214 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
221 215
222 /* Reduce voltage if necessary */ 216 /* Reduce voltage if necessary */
223 if (can_scale_voltage && longhaul_pos > dest_pos) { 217 if (can_scale_voltage && !dir) {
224 longhaul.bits.EnableSoftVID = 1; 218 longhaul.bits.EnableSoftVID = 1;
225 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); 219 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
226 /* Change voltage */ 220 /* Change voltage */
@@ -237,7 +231,6 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index)
237 } 231 }
238 longhaul.bits.EnableSoftVID = 0; 232 longhaul.bits.EnableSoftVID = 0;
239 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); 233 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
240 longhaul_pos = dest_pos;
241 } 234 }
242} 235}
243 236
@@ -248,25 +241,28 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index)
248 * Sets a new clock ratio. 241 * Sets a new clock ratio.
249 */ 242 */
250 243
251static void longhaul_setstate(unsigned int clock_ratio_index) 244static void longhaul_setstate(unsigned int table_index)
252{ 245{
246 unsigned int clock_ratio_index;
253 int speed, mult; 247 int speed, mult;
254 struct cpufreq_freqs freqs; 248 struct cpufreq_freqs freqs;
255 static unsigned int old_ratio=-1;
256 unsigned long flags; 249 unsigned long flags;
257 unsigned int pic1_mask, pic2_mask; 250 unsigned int pic1_mask, pic2_mask;
251 u16 bm_status = 0;
252 u32 bm_timeout = 1000;
253 unsigned int dir = 0;
258 254
259 if (old_ratio == clock_ratio_index) 255 clock_ratio_index = longhaul_table[table_index].index;
260 return; 256 /* Safety precautions */
261 old_ratio = clock_ratio_index; 257 mult = clock_ratio[clock_ratio_index & 0x1f];
262
263 mult = clock_ratio[clock_ratio_index];
264 if (mult == -1) 258 if (mult == -1)
265 return; 259 return;
266
267 speed = calc_speed(mult); 260 speed = calc_speed(mult);
268 if ((speed > highest_speed) || (speed < lowest_speed)) 261 if ((speed > highest_speed) || (speed < lowest_speed))
269 return; 262 return;
263 /* Voltage transition before frequency transition? */
264 if (can_scale_voltage && longhaul_index < table_index)
265 dir = 1;
270 266
271 freqs.old = calc_speed(longhaul_get_cpu_mult()); 267 freqs.old = calc_speed(longhaul_get_cpu_mult());
272 freqs.new = speed; 268 freqs.new = speed;
@@ -285,11 +281,24 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
285 outb(0xFF,0xA1); /* Overkill */ 281 outb(0xFF,0xA1); /* Overkill */
286 outb(0xFE,0x21); /* TMR0 only */ 282 outb(0xFE,0x21); /* TMR0 only */
287 283
284 /* Wait while PCI bus is busy. */
285 if (acpi_regs_addr && (longhaul_flags & USE_NORTHBRIDGE
286 || ((pr != NULL) && pr->flags.bm_control))) {
287 bm_status = inw(acpi_regs_addr);
288 bm_status &= 1 << 4;
289 while (bm_status && bm_timeout) {
290 outw(1 << 4, acpi_regs_addr);
291 bm_timeout--;
292 bm_status = inw(acpi_regs_addr);
293 bm_status &= 1 << 4;
294 }
295 }
296
288 if (longhaul_flags & USE_NORTHBRIDGE) { 297 if (longhaul_flags & USE_NORTHBRIDGE) {
289 /* Disable AGP and PCI arbiters */ 298 /* Disable AGP and PCI arbiters */
290 outb(3, 0x22); 299 outb(3, 0x22);
291 } else if ((pr != NULL) && pr->flags.bm_control) { 300 } else if ((pr != NULL) && pr->flags.bm_control) {
292 /* Disable bus master arbitration */ 301 /* Disable bus master arbitration */
293 acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1); 302 acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1);
294 } 303 }
295 switch (longhaul_version) { 304 switch (longhaul_version) {
@@ -314,9 +323,9 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
314 if (longhaul_flags & USE_ACPI_C3) { 323 if (longhaul_flags & USE_ACPI_C3) {
315 /* Don't allow wakeup */ 324 /* Don't allow wakeup */
316 acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0); 325 acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0);
317 do_powersaver(cx->address, clock_ratio_index); 326 do_powersaver(cx->address, clock_ratio_index, dir);
318 } else { 327 } else {
319 do_powersaver(0, clock_ratio_index); 328 do_powersaver(0, clock_ratio_index, dir);
320 } 329 }
321 break; 330 break;
322 } 331 }
@@ -336,6 +345,9 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
336 345
337 freqs.new = calc_speed(longhaul_get_cpu_mult()); 346 freqs.new = calc_speed(longhaul_get_cpu_mult());
338 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 347 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
348
349 if (!bm_timeout)
350 printk(KERN_INFO PFX "Warning: Timeout while waiting for idle PCI bus.\n");
339} 351}
340 352
341/* 353/*
@@ -369,7 +381,8 @@ static int guess_fsb(int mult)
369 381
370static int __init longhaul_get_ranges(void) 382static int __init longhaul_get_ranges(void)
371{ 383{
372 unsigned int j, k = 0; 384 unsigned int i, j, k = 0;
385 unsigned int ratio;
373 int mult; 386 int mult;
374 387
375 /* Get current frequency */ 388 /* Get current frequency */
@@ -423,8 +436,7 @@ static int __init longhaul_get_ranges(void)
423 if(!longhaul_table) 436 if(!longhaul_table)
424 return -ENOMEM; 437 return -ENOMEM;
425 438
426 for (j=0; j < numscales; j++) { 439 for (j = 0; j < numscales; j++) {
427 unsigned int ratio;
428 ratio = clock_ratio[j]; 440 ratio = clock_ratio[j];
429 if (ratio == -1) 441 if (ratio == -1)
430 continue; 442 continue;
@@ -434,13 +446,41 @@ static int __init longhaul_get_ranges(void)
434 longhaul_table[k].index = j; 446 longhaul_table[k].index = j;
435 k++; 447 k++;
436 } 448 }
449 if (k <= 1) {
450 kfree(longhaul_table);
451 return -ENODEV;
452 }
453 /* Sort */
454 for (j = 0; j < k - 1; j++) {
455 unsigned int min_f, min_i;
456 min_f = longhaul_table[j].frequency;
457 min_i = j;
458 for (i = j + 1; i < k; i++) {
459 if (longhaul_table[i].frequency < min_f) {
460 min_f = longhaul_table[i].frequency;
461 min_i = i;
462 }
463 }
464 if (min_i != j) {
465 unsigned int temp;
466 temp = longhaul_table[j].frequency;
467 longhaul_table[j].frequency = longhaul_table[min_i].frequency;
468 longhaul_table[min_i].frequency = temp;
469 temp = longhaul_table[j].index;
470 longhaul_table[j].index = longhaul_table[min_i].index;
471 longhaul_table[min_i].index = temp;
472 }
473 }
437 474
438 longhaul_table[k].frequency = CPUFREQ_TABLE_END; 475 longhaul_table[k].frequency = CPUFREQ_TABLE_END;
439 if (!k) {
440 kfree (longhaul_table);
441 return -EINVAL;
442 }
443 476
477 /* Find index we are running on */
478 for (j = 0; j < k; j++) {
479 if (clock_ratio[longhaul_table[j].index & 0x1f] == mult) {
480 longhaul_index = j;
481 break;
482 }
483 }
444 return 0; 484 return 0;
445} 485}
446 486
@@ -448,7 +488,7 @@ static int __init longhaul_get_ranges(void)
448static void __init longhaul_setup_voltagescaling(void) 488static void __init longhaul_setup_voltagescaling(void)
449{ 489{
450 union msr_longhaul longhaul; 490 union msr_longhaul longhaul;
451 struct mV_pos minvid, maxvid; 491 struct mV_pos minvid, maxvid, vid;
452 unsigned int j, speed, pos, kHz_step, numvscales; 492 unsigned int j, speed, pos, kHz_step, numvscales;
453 int min_vid_speed; 493 int min_vid_speed;
454 494
@@ -459,11 +499,11 @@ static void __init longhaul_setup_voltagescaling(void)
459 } 499 }
460 500
461 if (!longhaul.bits.VRMRev) { 501 if (!longhaul.bits.VRMRev) {
462 printk (KERN_INFO PFX "VRM 8.5\n"); 502 printk(KERN_INFO PFX "VRM 8.5\n");
463 vrm_mV_table = &vrm85_mV[0]; 503 vrm_mV_table = &vrm85_mV[0];
464 mV_vrm_table = &mV_vrm85[0]; 504 mV_vrm_table = &mV_vrm85[0];
465 } else { 505 } else {
466 printk (KERN_INFO PFX "Mobile VRM\n"); 506 printk(KERN_INFO PFX "Mobile VRM\n");
467 if (cpu_model < CPU_NEHEMIAH) 507 if (cpu_model < CPU_NEHEMIAH)
468 return; 508 return;
469 vrm_mV_table = &mobilevrm_mV[0]; 509 vrm_mV_table = &mobilevrm_mV[0];
@@ -523,7 +563,6 @@ static void __init longhaul_setup_voltagescaling(void)
523 /* Calculate kHz for one voltage step */ 563 /* Calculate kHz for one voltage step */
524 kHz_step = (highest_speed - min_vid_speed) / numvscales; 564 kHz_step = (highest_speed - min_vid_speed) / numvscales;
525 565
526
527 j = 0; 566 j = 0;
528 while (longhaul_table[j].frequency != CPUFREQ_TABLE_END) { 567 while (longhaul_table[j].frequency != CPUFREQ_TABLE_END) {
529 speed = longhaul_table[j].frequency; 568 speed = longhaul_table[j].frequency;
@@ -531,15 +570,14 @@ static void __init longhaul_setup_voltagescaling(void)
531 pos = (speed - min_vid_speed) / kHz_step + minvid.pos; 570 pos = (speed - min_vid_speed) / kHz_step + minvid.pos;
532 else 571 else
533 pos = minvid.pos; 572 pos = minvid.pos;
534 f_msr_table[longhaul_table[j].index].vrm = mV_vrm_table[pos]; 573 longhaul_table[j].index |= mV_vrm_table[pos] << 8;
535 f_msr_table[longhaul_table[j].index].pos = pos; 574 vid = vrm_mV_table[mV_vrm_table[pos]];
575 printk(KERN_INFO PFX "f: %d kHz, index: %d, vid: %d mV\n", speed, j, vid.mV);
536 j++; 576 j++;
537 } 577 }
538 578
539 longhaul_pos = maxvid.pos;
540 can_scale_voltage = 1; 579 can_scale_voltage = 1;
541 printk(KERN_INFO PFX "Voltage scaling enabled. " 580 printk(KERN_INFO PFX "Voltage scaling enabled.\n");
542 "Use of \"conservative\" governor is highly recommended.\n");
543} 581}
544 582
545 583
@@ -553,15 +591,44 @@ static int longhaul_target(struct cpufreq_policy *policy,
553 unsigned int target_freq, unsigned int relation) 591 unsigned int target_freq, unsigned int relation)
554{ 592{
555 unsigned int table_index = 0; 593 unsigned int table_index = 0;
556 unsigned int new_clock_ratio = 0; 594 unsigned int i;
595 unsigned int dir = 0;
596 u8 vid, current_vid;
557 597
558 if (cpufreq_frequency_table_target(policy, longhaul_table, target_freq, relation, &table_index)) 598 if (cpufreq_frequency_table_target(policy, longhaul_table, target_freq, relation, &table_index))
559 return -EINVAL; 599 return -EINVAL;
560 600
561 new_clock_ratio = longhaul_table[table_index].index & 0xFF; 601 /* Don't set same frequency again */
562 602 if (longhaul_index == table_index)
563 longhaul_setstate(new_clock_ratio); 603 return 0;
564 604
605 if (!can_scale_voltage)
606 longhaul_setstate(table_index);
607 else {
608 /* On test system voltage transitions exceeding single
609 * step up or down were turning motherboard off. Both
610 * "ondemand" and "userspace" are unsafe. C7 is doing
611 * this in hardware, C3 is old and we need to do this
612 * in software. */
613 i = longhaul_index;
614 current_vid = (longhaul_table[longhaul_index].index >> 8) & 0x1f;
615 if (table_index > longhaul_index)
616 dir = 1;
617 while (i != table_index) {
618 vid = (longhaul_table[i].index >> 8) & 0x1f;
619 if (vid != current_vid) {
620 longhaul_setstate(i);
621 current_vid = vid;
622 msleep(200);
623 }
624 if (dir)
625 i++;
626 else
627 i--;
628 }
629 longhaul_setstate(table_index);
630 }
631 longhaul_index = table_index;
565 return 0; 632 return 0;
566} 633}
567 634
@@ -590,11 +657,10 @@ static acpi_status longhaul_walk_callback(acpi_handle obj_handle,
590static int enable_arbiter_disable(void) 657static int enable_arbiter_disable(void)
591{ 658{
592 struct pci_dev *dev; 659 struct pci_dev *dev;
593 int status; 660 int status = 1;
594 int reg; 661 int reg;
595 u8 pci_cmd; 662 u8 pci_cmd;
596 663
597 status = 1;
598 /* Find PLE133 host bridge */ 664 /* Find PLE133 host bridge */
599 reg = 0x78; 665 reg = 0x78;
600 dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0, 666 dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0,
@@ -627,13 +693,17 @@ static int enable_arbiter_disable(void)
627 return 0; 693 return 0;
628} 694}
629 695
630static int longhaul_setup_vt8235(void) 696static int longhaul_setup_southbridge(void)
631{ 697{
632 struct pci_dev *dev; 698 struct pci_dev *dev;
633 u8 pci_cmd; 699 u8 pci_cmd;
634 700
635 /* Find VT8235 southbridge */ 701 /* Find VT8235 southbridge */
636 dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, NULL); 702 dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, NULL);
703 if (dev == NULL)
704 /* Find VT8237 southbridge */
705 dev = pci_get_device(PCI_VENDOR_ID_VIA,
706 PCI_DEVICE_ID_VIA_8237, NULL);
637 if (dev != NULL) { 707 if (dev != NULL) {
638 /* Set transition time to max */ 708 /* Set transition time to max */
639 pci_read_config_byte(dev, 0xec, &pci_cmd); 709 pci_read_config_byte(dev, 0xec, &pci_cmd);
@@ -645,6 +715,14 @@ static int longhaul_setup_vt8235(void)
645 pci_read_config_byte(dev, 0xe5, &pci_cmd); 715 pci_read_config_byte(dev, 0xe5, &pci_cmd);
646 pci_cmd |= 1 << 7; 716 pci_cmd |= 1 << 7;
647 pci_write_config_byte(dev, 0xe5, pci_cmd); 717 pci_write_config_byte(dev, 0xe5, pci_cmd);
718 /* Get address of ACPI registers block*/
719 pci_read_config_byte(dev, 0x81, &pci_cmd);
720 if (pci_cmd & 1 << 7) {
721 pci_read_config_dword(dev, 0x88, &acpi_regs_addr);
722 acpi_regs_addr &= 0xff00;
723 printk(KERN_INFO PFX "ACPI I/O at 0x%x\n", acpi_regs_addr);
724 }
725
648 pci_dev_put(dev); 726 pci_dev_put(dev);
649 return 1; 727 return 1;
650 } 728 }
@@ -657,7 +735,6 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
657 char *cpuname=NULL; 735 char *cpuname=NULL;
658 int ret; 736 int ret;
659 u32 lo, hi; 737 u32 lo, hi;
660 int vt8235_present;
661 738
662 /* Check what we have on this motherboard */ 739 /* Check what we have on this motherboard */
663 switch (c->x86_model) { 740 switch (c->x86_model) {
@@ -755,7 +832,7 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
755 }; 832 };
756 833
757 /* Doesn't hurt */ 834 /* Doesn't hurt */
758 vt8235_present = longhaul_setup_vt8235(); 835 longhaul_setup_southbridge();
759 836
760 /* Find ACPI data for processor */ 837 /* Find ACPI data for processor */
761 acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, 838 acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT,
@@ -765,35 +842,29 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
765 /* Check ACPI support for C3 state */ 842 /* Check ACPI support for C3 state */
766 if (pr != NULL && longhaul_version == TYPE_POWERSAVER) { 843 if (pr != NULL && longhaul_version == TYPE_POWERSAVER) {
767 cx = &pr->power.states[ACPI_STATE_C3]; 844 cx = &pr->power.states[ACPI_STATE_C3];
768 if (cx->address > 0 && cx->latency <= 1000) { 845 if (cx->address > 0 && cx->latency <= 1000)
769 longhaul_flags |= USE_ACPI_C3; 846 longhaul_flags |= USE_ACPI_C3;
770 goto print_support_type;
771 }
772 } 847 }
848 /* Disable if it isn't working */
849 if (disable_acpi_c3)
850 longhaul_flags &= ~USE_ACPI_C3;
773 /* Check if northbridge is friendly */ 851 /* Check if northbridge is friendly */
774 if (enable_arbiter_disable()) { 852 if (enable_arbiter_disable())
775 longhaul_flags |= USE_NORTHBRIDGE; 853 longhaul_flags |= USE_NORTHBRIDGE;
776 goto print_support_type; 854
777 }
778 /* Use VT8235 southbridge if present */
779 if (longhaul_version == TYPE_POWERSAVER && vt8235_present) {
780 longhaul_flags |= USE_VT8235;
781 goto print_support_type;
782 }
783 /* Check ACPI support for bus master arbiter disable */ 855 /* Check ACPI support for bus master arbiter disable */
784 if ((pr == NULL) || !(pr->flags.bm_control)) { 856 if (!(longhaul_flags & USE_ACPI_C3
857 || longhaul_flags & USE_NORTHBRIDGE)
858 && ((pr == NULL) || !(pr->flags.bm_control))) {
785 printk(KERN_ERR PFX 859 printk(KERN_ERR PFX
786 "No ACPI support. Unsupported northbridge.\n"); 860 "No ACPI support. Unsupported northbridge.\n");
787 return -ENODEV; 861 return -ENODEV;
788 } 862 }
789 863
790print_support_type:
791 if (longhaul_flags & USE_NORTHBRIDGE) 864 if (longhaul_flags & USE_NORTHBRIDGE)
792 printk (KERN_INFO PFX "Using northbridge support.\n"); 865 printk(KERN_INFO PFX "Using northbridge support.\n");
793 else if (longhaul_flags & USE_VT8235) 866 if (longhaul_flags & USE_ACPI_C3)
794 printk (KERN_INFO PFX "Using VT8235 support.\n"); 867 printk(KERN_INFO PFX "Using ACPI support.\n");
795 else
796 printk (KERN_INFO PFX "Using ACPI support.\n");
797 868
798 ret = longhaul_get_ranges(); 869 ret = longhaul_get_ranges();
799 if (ret != 0) 870 if (ret != 0)
@@ -885,6 +956,9 @@ static void __exit longhaul_exit(void)
885 kfree(longhaul_table); 956 kfree(longhaul_table);
886} 957}
887 958
959module_param (disable_acpi_c3, int, 0644);
960MODULE_PARM_DESC(disable_acpi_c3, "Don't use ACPI C3 support");
961
888module_param (scale_voltage, int, 0644); 962module_param (scale_voltage, int, 0644);
889MODULE_PARM_DESC(scale_voltage, "Scale voltage of processor"); 963MODULE_PARM_DESC(scale_voltage, "Scale voltage of processor");
890 964
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.h b/arch/i386/kernel/cpu/cpufreq/longhaul.h
index 102548f128..4fcc320997 100644
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.h
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.h
@@ -180,7 +180,7 @@ static const int __initdata ezrat_clock_ratio[32] = {
180 180
181 -1, /* 0000 -> RESERVED (10.0x) */ 181 -1, /* 0000 -> RESERVED (10.0x) */
182 110, /* 0001 -> 11.0x */ 182 110, /* 0001 -> 11.0x */
183 120, /* 0010 -> 12.0x */ 183 -1, /* 0010 -> 12.0x */
184 -1, /* 0011 -> RESERVED (9.0x)*/ 184 -1, /* 0011 -> RESERVED (9.0x)*/
185 105, /* 0100 -> 10.5x */ 185 105, /* 0100 -> 10.5x */
186 115, /* 0101 -> 11.5x */ 186 115, /* 0101 -> 11.5x */
@@ -237,7 +237,7 @@ static const int __initdata ezrat_eblcr[32] = {
237 237
238static const int __initdata nehemiah_clock_ratio[32] = { 238static const int __initdata nehemiah_clock_ratio[32] = {
239 100, /* 0000 -> 10.0x */ 239 100, /* 0000 -> 10.0x */
240 160, /* 0001 -> 16.0x */ 240 -1, /* 0001 -> 16.0x */
241 40, /* 0010 -> 4.0x */ 241 40, /* 0010 -> 4.0x */
242 90, /* 0011 -> 9.0x */ 242 90, /* 0011 -> 9.0x */
243 95, /* 0100 -> 9.5x */ 243 95, /* 0100 -> 9.5x */
@@ -252,10 +252,10 @@ static const int __initdata nehemiah_clock_ratio[32] = {
252 75, /* 1101 -> 7.5x */ 252 75, /* 1101 -> 7.5x */
253 85, /* 1110 -> 8.5x */ 253 85, /* 1110 -> 8.5x */
254 120, /* 1111 -> 12.0x */ 254 120, /* 1111 -> 12.0x */
255 100, /* 0000 -> 10.0x */ 255 -1, /* 0000 -> 10.0x */
256 110, /* 0001 -> 11.0x */ 256 110, /* 0001 -> 11.0x */
257 120, /* 0010 -> 12.0x */ 257 -1, /* 0010 -> 12.0x */
258 90, /* 0011 -> 9.0x */ 258 -1, /* 0011 -> 9.0x */
259 105, /* 0100 -> 10.5x */ 259 105, /* 0100 -> 10.5x */
260 115, /* 0101 -> 11.5x */ 260 115, /* 0101 -> 11.5x */
261 125, /* 0110 -> 12.5x */ 261 125, /* 0110 -> 12.5x */
@@ -267,7 +267,7 @@ static const int __initdata nehemiah_clock_ratio[32] = {
267 145, /* 1100 -> 14.5x */ 267 145, /* 1100 -> 14.5x */
268 155, /* 1101 -> 15.5x */ 268 155, /* 1101 -> 15.5x */
269 -1, /* 1110 -> RESERVED (13.0x) */ 269 -1, /* 1110 -> RESERVED (13.0x) */
270 120, /* 1111 -> 12.0x */ 270 -1, /* 1111 -> 12.0x */
271}; 271};
272 272
273static const int __initdata nehemiah_eblcr[32] = { 273static const int __initdata nehemiah_eblcr[32] = {
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
index 4ade55c5f3..34ed53a067 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -599,14 +599,17 @@ static void print_basics(struct powernow_k8_data *data)
599 for (j = 0; j < data->numps; j++) { 599 for (j = 0; j < data->numps; j++) {
600 if (data->powernow_table[j].frequency != CPUFREQ_ENTRY_INVALID) { 600 if (data->powernow_table[j].frequency != CPUFREQ_ENTRY_INVALID) {
601 if (cpu_family == CPU_HW_PSTATE) { 601 if (cpu_family == CPU_HW_PSTATE) {
602 printk(KERN_INFO PFX " %d : fid 0x%x gid 0x%x (%d MHz)\n", j, (data->powernow_table[j].index & 0xff00) >> 8, 602 printk(KERN_INFO PFX " %d : fid 0x%x did 0x%x (%d MHz)\n",
603 (data->powernow_table[j].index & 0xff0000) >> 16, 603 j,
604 data->powernow_table[j].frequency/1000); 604 (data->powernow_table[j].index & 0xff00) >> 8,
605 (data->powernow_table[j].index & 0xff0000) >> 16,
606 data->powernow_table[j].frequency/1000);
605 } else { 607 } else {
606 printk(KERN_INFO PFX " %d : fid 0x%x (%d MHz), vid 0x%x\n", j, 608 printk(KERN_INFO PFX " %d : fid 0x%x (%d MHz), vid 0x%x\n",
607 data->powernow_table[j].index & 0xff, 609 j,
608 data->powernow_table[j].frequency/1000, 610 data->powernow_table[j].index & 0xff,
609 data->powernow_table[j].index >> 8); 611 data->powernow_table[j].frequency/1000,
612 data->powernow_table[j].index >> 8);
610 } 613 }
611 } 614 }
612 } 615 }
@@ -1086,7 +1089,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
1086 1089
1087 if (cpu_family == CPU_HW_PSTATE) 1090 if (cpu_family == CPU_HW_PSTATE)
1088 dprintk("targ: curr fid 0x%x, did 0x%x\n", 1091 dprintk("targ: curr fid 0x%x, did 0x%x\n",
1089 data->currfid, data->currvid); 1092 data->currfid, data->currdid);
1090 else { 1093 else {
1091 dprintk("targ: curr fid 0x%x, vid 0x%x\n", 1094 dprintk("targ: curr fid 0x%x, vid 0x%x\n",
1092 data->currfid, data->currvid); 1095 data->currfid, data->currvid);
@@ -1322,16 +1325,22 @@ static struct cpufreq_driver cpufreq_amd64_driver = {
1322static int __cpuinit powernowk8_init(void) 1325static int __cpuinit powernowk8_init(void)
1323{ 1326{
1324 unsigned int i, supported_cpus = 0; 1327 unsigned int i, supported_cpus = 0;
1328 unsigned int booted_cores = 1;
1325 1329
1326 for_each_online_cpu(i) { 1330 for_each_online_cpu(i) {
1327 if (check_supported_cpu(i)) 1331 if (check_supported_cpu(i))
1328 supported_cpus++; 1332 supported_cpus++;
1329 } 1333 }
1330 1334
1335#ifdef CONFIG_SMP
1336 booted_cores = cpu_data[0].booted_cores;
1337#endif
1338
1331 if (supported_cpus == num_online_cpus()) { 1339 if (supported_cpus == num_online_cpus()) {
1332 printk(KERN_INFO PFX "Found %d %s " 1340 printk(KERN_INFO PFX "Found %d %s "
1333 "processors (" VERSION ")\n", supported_cpus, 1341 "processors (%d cpu cores) (" VERSION ")\n",
1334 boot_cpu_data.x86_model_id); 1342 supported_cpus/booted_cores,
1343 boot_cpu_data.x86_model_id, supported_cpus);
1335 return cpufreq_register_driver(&cpufreq_amd64_driver); 1344 return cpufreq_register_driver(&cpufreq_amd64_driver);
1336 } 1345 }
1337 1346
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
index 35489fd688..6c5dc2c85a 100644
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
@@ -21,12 +21,6 @@
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/compiler.h> 22#include <linux/compiler.h>
23 23
24#ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
25#include <linux/acpi.h>
26#include <linux/dmi.h>
27#include <acpi/processor.h>
28#endif
29
30#include <asm/msr.h> 24#include <asm/msr.h>
31#include <asm/processor.h> 25#include <asm/processor.h>
32#include <asm/cpufeature.h> 26#include <asm/cpufeature.h>
@@ -257,9 +251,7 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy)
257 /* Matched a non-match */ 251 /* Matched a non-match */
258 dprintk("no table support for CPU model \"%s\"\n", 252 dprintk("no table support for CPU model \"%s\"\n",
259 cpu->x86_model_id); 253 cpu->x86_model_id);
260#ifndef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI 254 dprintk("try using the acpi-cpufreq driver\n");
261 dprintk("try compiling with CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI enabled\n");
262#endif
263 return -ENOENT; 255 return -ENOENT;
264 } 256 }
265 257
@@ -346,213 +338,6 @@ static unsigned int get_cur_freq(unsigned int cpu)
346} 338}
347 339
348 340
349#ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
350
351static struct acpi_processor_performance *acpi_perf_data[NR_CPUS];
352
353/*
354 * centrino_cpu_early_init_acpi - Do the preregistering with ACPI P-States
355 * library
356 *
357 * Before doing the actual init, we need to do _PSD related setup whenever
358 * supported by the BIOS. These are handled by this early_init routine.
359 */
360static int centrino_cpu_early_init_acpi(void)
361{
362 unsigned int i, j;
363 struct acpi_processor_performance *data;
364
365 for_each_possible_cpu(i) {
366 data = kzalloc(sizeof(struct acpi_processor_performance),
367 GFP_KERNEL);
368 if (!data) {
369 for_each_possible_cpu(j) {
370 kfree(acpi_perf_data[j]);
371 acpi_perf_data[j] = NULL;
372 }
373 return (-ENOMEM);
374 }
375 acpi_perf_data[i] = data;
376 }
377
378 acpi_processor_preregister_performance(acpi_perf_data);
379 return 0;
380}
381
382
383#ifdef CONFIG_SMP
384/*
385 * Some BIOSes do SW_ANY coordination internally, either set it up in hw
386 * or do it in BIOS firmware and won't inform about it to OS. If not
387 * detected, this has a side effect of making CPU run at a different speed
388 * than OS intended it to run at. Detect it and handle it cleanly.
389 */
390static int bios_with_sw_any_bug;
391static int sw_any_bug_found(struct dmi_system_id *d)
392{
393 bios_with_sw_any_bug = 1;
394 return 0;
395}
396
397static struct dmi_system_id sw_any_bug_dmi_table[] = {
398 {
399 .callback = sw_any_bug_found,
400 .ident = "Supermicro Server X6DLP",
401 .matches = {
402 DMI_MATCH(DMI_SYS_VENDOR, "Supermicro"),
403 DMI_MATCH(DMI_BIOS_VERSION, "080010"),
404 DMI_MATCH(DMI_PRODUCT_NAME, "X6DLP"),
405 },
406 },
407 { }
408};
409#endif
410
411/*
412 * centrino_cpu_init_acpi - register with ACPI P-States library
413 *
414 * Register with the ACPI P-States library (part of drivers/acpi/processor.c)
415 * in order to determine correct frequency and voltage pairings by reading
416 * the _PSS of the ACPI DSDT or SSDT tables.
417 */
418static int centrino_cpu_init_acpi(struct cpufreq_policy *policy)
419{
420 unsigned long cur_freq;
421 int result = 0, i;
422 unsigned int cpu = policy->cpu;
423 struct acpi_processor_performance *p;
424
425 p = acpi_perf_data[cpu];
426
427 /* register with ACPI core */
428 if (acpi_processor_register_performance(p, cpu)) {
429 dprintk(PFX "obtaining ACPI data failed\n");
430 return -EIO;
431 }
432
433 policy->shared_type = p->shared_type;
434 /*
435 * Will let policy->cpus know about dependency only when software
436 * coordination is required.
437 */
438 if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL ||
439 policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) {
440 policy->cpus = p->shared_cpu_map;
441 }
442
443#ifdef CONFIG_SMP
444 dmi_check_system(sw_any_bug_dmi_table);
445 if (bios_with_sw_any_bug && cpus_weight(policy->cpus) == 1) {
446 policy->shared_type = CPUFREQ_SHARED_TYPE_ALL;
447 policy->cpus = cpu_core_map[cpu];
448 }
449#endif
450
451 /* verify the acpi_data */
452 if (p->state_count <= 1) {
453 dprintk("No P-States\n");
454 result = -ENODEV;
455 goto err_unreg;
456 }
457
458 if ((p->control_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) ||
459 (p->status_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) {
460 dprintk("Invalid control/status registers (%x - %x)\n",
461 p->control_register.space_id, p->status_register.space_id);
462 result = -EIO;
463 goto err_unreg;
464 }
465
466 for (i=0; i<p->state_count; i++) {
467 if ((p->states[i].control & INTEL_MSR_RANGE) !=
468 (p->states[i].status & INTEL_MSR_RANGE)) {
469 dprintk("Different MSR bits in control (%llu) and status (%llu)\n",
470 p->states[i].control, p->states[i].status);
471 result = -EINVAL;
472 goto err_unreg;
473 }
474
475 if (!p->states[i].core_frequency) {
476 dprintk("Zero core frequency for state %u\n", i);
477 result = -EINVAL;
478 goto err_unreg;
479 }
480
481 if (p->states[i].core_frequency > p->states[0].core_frequency) {
482 dprintk("P%u has larger frequency (%llu) than P0 (%llu), skipping\n", i,
483 p->states[i].core_frequency, p->states[0].core_frequency);
484 p->states[i].core_frequency = 0;
485 continue;
486 }
487 }
488
489 centrino_model[cpu] = kzalloc(sizeof(struct cpu_model), GFP_KERNEL);
490 if (!centrino_model[cpu]) {
491 result = -ENOMEM;
492 goto err_unreg;
493 }
494
495 centrino_model[cpu]->model_name=NULL;
496 centrino_model[cpu]->max_freq = p->states[0].core_frequency * 1000;
497 centrino_model[cpu]->op_points = kmalloc(sizeof(struct cpufreq_frequency_table) *
498 (p->state_count + 1), GFP_KERNEL);
499 if (!centrino_model[cpu]->op_points) {
500 result = -ENOMEM;
501 goto err_kfree;
502 }
503
504 for (i=0; i<p->state_count; i++) {
505 centrino_model[cpu]->op_points[i].index = p->states[i].control & INTEL_MSR_RANGE;
506 centrino_model[cpu]->op_points[i].frequency = p->states[i].core_frequency * 1000;
507 dprintk("adding state %i with frequency %u and control value %04x\n",
508 i, centrino_model[cpu]->op_points[i].frequency, centrino_model[cpu]->op_points[i].index);
509 }
510 centrino_model[cpu]->op_points[p->state_count].frequency = CPUFREQ_TABLE_END;
511
512 cur_freq = get_cur_freq(cpu);
513
514 for (i=0; i<p->state_count; i++) {
515 if (!p->states[i].core_frequency) {
516 dprintk("skipping state %u\n", i);
517 centrino_model[cpu]->op_points[i].frequency = CPUFREQ_ENTRY_INVALID;
518 continue;
519 }
520
521 if (extract_clock(centrino_model[cpu]->op_points[i].index, cpu, 0) !=
522 (centrino_model[cpu]->op_points[i].frequency)) {
523 dprintk("Invalid encoded frequency (%u vs. %u)\n",
524 extract_clock(centrino_model[cpu]->op_points[i].index, cpu, 0),
525 centrino_model[cpu]->op_points[i].frequency);
526 result = -EINVAL;
527 goto err_kfree_all;
528 }
529
530 if (cur_freq == centrino_model[cpu]->op_points[i].frequency)
531 p->state = i;
532 }
533
534 /* notify BIOS that we exist */
535 acpi_processor_notify_smm(THIS_MODULE);
536 printk("speedstep-centrino with X86_SPEEDSTEP_CENTRINO_ACPI "
537 "config is deprecated.\n "
538 "Use X86_ACPI_CPUFREQ (acpi-cpufreq) instead.\n" );
539
540 return 0;
541
542 err_kfree_all:
543 kfree(centrino_model[cpu]->op_points);
544 err_kfree:
545 kfree(centrino_model[cpu]);
546 err_unreg:
547 acpi_processor_unregister_performance(p, cpu);
548 dprintk(PFX "invalid ACPI data\n");
549 return (result);
550}
551#else
552static inline int centrino_cpu_init_acpi(struct cpufreq_policy *policy) { return -ENODEV; }
553static inline int centrino_cpu_early_init_acpi(void) { return 0; }
554#endif
555
556static int centrino_cpu_init(struct cpufreq_policy *policy) 341static int centrino_cpu_init(struct cpufreq_policy *policy)
557{ 342{
558 struct cpuinfo_x86 *cpu = &cpu_data[policy->cpu]; 343 struct cpuinfo_x86 *cpu = &cpu_data[policy->cpu];
@@ -568,27 +353,25 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)
568 if (cpu_has(cpu, X86_FEATURE_CONSTANT_TSC)) 353 if (cpu_has(cpu, X86_FEATURE_CONSTANT_TSC))
569 centrino_driver.flags |= CPUFREQ_CONST_LOOPS; 354 centrino_driver.flags |= CPUFREQ_CONST_LOOPS;
570 355
571 if (centrino_cpu_init_acpi(policy)) { 356 if (policy->cpu != 0)
572 if (policy->cpu != 0) 357 return -ENODEV;
573 return -ENODEV;
574 358
575 for (i = 0; i < N_IDS; i++) 359 for (i = 0; i < N_IDS; i++)
576 if (centrino_verify_cpu_id(cpu, &cpu_ids[i])) 360 if (centrino_verify_cpu_id(cpu, &cpu_ids[i]))
577 break; 361 break;
578 362
579 if (i != N_IDS) 363 if (i != N_IDS)
580 centrino_cpu[policy->cpu] = &cpu_ids[i]; 364 centrino_cpu[policy->cpu] = &cpu_ids[i];
581 365
582 if (!centrino_cpu[policy->cpu]) { 366 if (!centrino_cpu[policy->cpu]) {
583 dprintk("found unsupported CPU with " 367 dprintk("found unsupported CPU with "
584 "Enhanced SpeedStep: send /proc/cpuinfo to " 368 "Enhanced SpeedStep: send /proc/cpuinfo to "
585 MAINTAINER "\n"); 369 MAINTAINER "\n");
586 return -ENODEV; 370 return -ENODEV;
587 } 371 }
588 372
589 if (centrino_cpu_init_table(policy)) { 373 if (centrino_cpu_init_table(policy)) {
590 return -ENODEV; 374 return -ENODEV;
591 }
592 } 375 }
593 376
594 /* Check to see if Enhanced SpeedStep is enabled, and try to 377 /* Check to see if Enhanced SpeedStep is enabled, and try to
@@ -634,20 +417,6 @@ static int centrino_cpu_exit(struct cpufreq_policy *policy)
634 417
635 cpufreq_frequency_table_put_attr(cpu); 418 cpufreq_frequency_table_put_attr(cpu);
636 419
637#ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
638 if (!centrino_model[cpu]->model_name) {
639 static struct acpi_processor_performance *p;
640
641 if (acpi_perf_data[cpu]) {
642 p = acpi_perf_data[cpu];
643 dprintk("unregistering and freeing ACPI data\n");
644 acpi_processor_unregister_performance(p, cpu);
645 kfree(centrino_model[cpu]->op_points);
646 kfree(centrino_model[cpu]);
647 }
648 }
649#endif
650
651 centrino_model[cpu] = NULL; 420 centrino_model[cpu] = NULL;
652 421
653 return 0; 422 return 0;
@@ -849,25 +618,12 @@ static int __init centrino_init(void)
849 if (!cpu_has(cpu, X86_FEATURE_EST)) 618 if (!cpu_has(cpu, X86_FEATURE_EST))
850 return -ENODEV; 619 return -ENODEV;
851 620
852 centrino_cpu_early_init_acpi();
853
854 return cpufreq_register_driver(&centrino_driver); 621 return cpufreq_register_driver(&centrino_driver);
855} 622}
856 623
857static void __exit centrino_exit(void) 624static void __exit centrino_exit(void)
858{ 625{
859#ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
860 unsigned int j;
861#endif
862
863 cpufreq_unregister_driver(&centrino_driver); 626 cpufreq_unregister_driver(&centrino_driver);
864
865#ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
866 for_each_possible_cpu(j) {
867 kfree(acpi_perf_data[j]);
868 acpi_perf_data[j] = NULL;
869 }
870#endif
871} 627}
872 628
873MODULE_AUTHOR ("Jeremy Fitzhardinge <jeremy@goop.org>"); 629MODULE_AUTHOR ("Jeremy Fitzhardinge <jeremy@goop.org>");
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c
index 698f980eb4..a5b2346faf 100644
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c
@@ -205,7 +205,6 @@ static unsigned int speedstep_detect_chipset (void)
205 * host brige. Abort on these systems. 205 * host brige. Abort on these systems.
206 */ 206 */
207 static struct pci_dev *hostbridge; 207 static struct pci_dev *hostbridge;
208 u8 rev = 0;
209 208
210 hostbridge = pci_get_subsys(PCI_VENDOR_ID_INTEL, 209 hostbridge = pci_get_subsys(PCI_VENDOR_ID_INTEL,
211 PCI_DEVICE_ID_INTEL_82815_MC, 210 PCI_DEVICE_ID_INTEL_82815_MC,
@@ -216,8 +215,7 @@ static unsigned int speedstep_detect_chipset (void)
216 if (!hostbridge) 215 if (!hostbridge)
217 return 2; /* 2-M */ 216 return 2; /* 2-M */
218 217
219 pci_read_config_byte(hostbridge, PCI_REVISION_ID, &rev); 218 if (hostbridge->revision < 5) {
220 if (rev < 5) {
221 dprintk("hostbridge does not support speedstep\n"); 219 dprintk("hostbridge does not support speedstep\n");
222 speedstep_chipset_dev = NULL; 220 speedstep_chipset_dev = NULL;
223 pci_dev_put(hostbridge); 221 pci_dev_put(hostbridge);
diff --git a/arch/i386/kernel/cpu/mcheck/therm_throt.c b/arch/i386/kernel/cpu/mcheck/therm_throt.c
index 7ba7c3abd3..1203dc5ab8 100644
--- a/arch/i386/kernel/cpu/mcheck/therm_throt.c
+++ b/arch/i386/kernel/cpu/mcheck/therm_throt.c
@@ -134,19 +134,21 @@ static __cpuinit int thermal_throttle_cpu_callback(struct notifier_block *nfb,
134 int err; 134 int err;
135 135
136 sys_dev = get_cpu_sysdev(cpu); 136 sys_dev = get_cpu_sysdev(cpu);
137 mutex_lock(&therm_cpu_lock);
138 switch (action) { 137 switch (action) {
139 case CPU_ONLINE: 138 case CPU_ONLINE:
140 case CPU_ONLINE_FROZEN: 139 case CPU_ONLINE_FROZEN:
140 mutex_lock(&therm_cpu_lock);
141 err = thermal_throttle_add_dev(sys_dev); 141 err = thermal_throttle_add_dev(sys_dev);
142 mutex_unlock(&therm_cpu_lock);
142 WARN_ON(err); 143 WARN_ON(err);
143 break; 144 break;
144 case CPU_DEAD: 145 case CPU_DEAD:
145 case CPU_DEAD_FROZEN: 146 case CPU_DEAD_FROZEN:
147 mutex_lock(&therm_cpu_lock);
146 thermal_throttle_remove_dev(sys_dev); 148 thermal_throttle_remove_dev(sys_dev);
149 mutex_unlock(&therm_cpu_lock);
147 break; 150 break;
148 } 151 }
149 mutex_unlock(&therm_cpu_lock);
150 return NOTIFY_OK; 152 return NOTIFY_OK;
151} 153}
152 154
diff --git a/arch/i386/kernel/cpu/mtrr/cyrix.c b/arch/i386/kernel/cpu/mtrr/cyrix.c
index 9edf562558..1001f1e0fe 100644
--- a/arch/i386/kernel/cpu/mtrr/cyrix.c
+++ b/arch/i386/kernel/cpu/mtrr/cyrix.c
@@ -233,12 +233,12 @@ typedef struct {
233 mtrr_type type; 233 mtrr_type type;
234} arr_state_t; 234} arr_state_t;
235 235
236static arr_state_t arr_state[8] __devinitdata = { 236static arr_state_t arr_state[8] = {
237 {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, 237 {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL},
238 {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL} 238 {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}
239}; 239};
240 240
241static unsigned char ccr_state[7] __devinitdata = { 0, 0, 0, 0, 0, 0, 0 }; 241static unsigned char ccr_state[7] = { 0, 0, 0, 0, 0, 0, 0 };
242 242
243static void cyrix_set_all(void) 243static void cyrix_set_all(void)
244{ 244{
diff --git a/arch/i386/kernel/cpu/mtrr/generic.c b/arch/i386/kernel/cpu/mtrr/generic.c
index 6d5937891b..f6e46943e6 100644
--- a/arch/i386/kernel/cpu/mtrr/generic.c
+++ b/arch/i386/kernel/cpu/mtrr/generic.c
@@ -65,7 +65,8 @@ get_fixed_ranges(mtrr_type * frs)
65 65
66void mtrr_save_fixed_ranges(void *info) 66void mtrr_save_fixed_ranges(void *info)
67{ 67{
68 get_fixed_ranges(mtrr_state.fixed_ranges); 68 if (cpu_has_mtrr)
69 get_fixed_ranges(mtrr_state.fixed_ranges);
69} 70}
70 71
71static void print_fixed(unsigned base, unsigned step, const mtrr_type*types) 72static void print_fixed(unsigned base, unsigned step, const mtrr_type*types)
@@ -469,11 +470,6 @@ int generic_validate_add_page(unsigned long base, unsigned long size, unsigned i
469 } 470 }
470 } 471 }
471 472
472 if (base < 0x100) {
473 printk(KERN_WARNING "mtrr: cannot set region below 1 MiB (0x%lx000,0x%lx000)\n",
474 base, size);
475 return -EINVAL;
476 }
477 /* Check upper bits of base and last are equal and lower bits are 0 473 /* Check upper bits of base and last are equal and lower bits are 0
478 for base and 1 for last */ 474 for base and 1 for last */
479 last = base + size - 1; 475 last = base + size - 1;
diff --git a/arch/i386/kernel/cpu/mtrr/main.c b/arch/i386/kernel/cpu/mtrr/main.c
index 55b005152a..75dc6d5214 100644
--- a/arch/i386/kernel/cpu/mtrr/main.c
+++ b/arch/i386/kernel/cpu/mtrr/main.c
@@ -229,6 +229,8 @@ static void set_mtrr(unsigned int reg, unsigned long base,
229 data.smp_size = size; 229 data.smp_size = size;
230 data.smp_type = type; 230 data.smp_type = type;
231 atomic_set(&data.count, num_booting_cpus() - 1); 231 atomic_set(&data.count, num_booting_cpus() - 1);
232 /* make sure data.count is visible before unleashing other CPUs */
233 smp_wmb();
232 atomic_set(&data.gate,0); 234 atomic_set(&data.gate,0);
233 235
234 /* Start the ball rolling on other CPUs */ 236 /* Start the ball rolling on other CPUs */
@@ -242,6 +244,7 @@ static void set_mtrr(unsigned int reg, unsigned long base,
242 244
243 /* ok, reset count and toggle gate */ 245 /* ok, reset count and toggle gate */
244 atomic_set(&data.count, num_booting_cpus() - 1); 246 atomic_set(&data.count, num_booting_cpus() - 1);
247 smp_wmb();
245 atomic_set(&data.gate,1); 248 atomic_set(&data.gate,1);
246 249
247 /* do our MTRR business */ 250 /* do our MTRR business */
@@ -260,6 +263,7 @@ static void set_mtrr(unsigned int reg, unsigned long base,
260 cpu_relax(); 263 cpu_relax();
261 264
262 atomic_set(&data.count, num_booting_cpus() - 1); 265 atomic_set(&data.count, num_booting_cpus() - 1);
266 smp_wmb();
263 atomic_set(&data.gate,0); 267 atomic_set(&data.gate,0);
264 268
265 /* 269 /*
diff --git a/arch/i386/kernel/cpu/perfctr-watchdog.c b/arch/i386/kernel/cpu/perfctr-watchdog.c
index f0b67630b9..4d26d514c5 100644
--- a/arch/i386/kernel/cpu/perfctr-watchdog.c
+++ b/arch/i386/kernel/cpu/perfctr-watchdog.c
@@ -55,14 +55,45 @@ static DEFINE_PER_CPU(struct nmi_watchdog_ctlblk, nmi_watchdog_ctlblk);
55/* converts an msr to an appropriate reservation bit */ 55/* converts an msr to an appropriate reservation bit */
56static inline unsigned int nmi_perfctr_msr_to_bit(unsigned int msr) 56static inline unsigned int nmi_perfctr_msr_to_bit(unsigned int msr)
57{ 57{
58 return wd_ops ? msr - wd_ops->perfctr : 0; 58 /* returns the bit offset of the performance counter register */
59 switch (boot_cpu_data.x86_vendor) {
60 case X86_VENDOR_AMD:
61 return (msr - MSR_K7_PERFCTR0);
62 case X86_VENDOR_INTEL:
63 if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON))
64 return (msr - MSR_ARCH_PERFMON_PERFCTR0);
65
66 switch (boot_cpu_data.x86) {
67 case 6:
68 return (msr - MSR_P6_PERFCTR0);
69 case 15:
70 return (msr - MSR_P4_BPU_PERFCTR0);
71 }
72 }
73 return 0;
59} 74}
60 75
61/* converts an msr to an appropriate reservation bit */ 76/* converts an msr to an appropriate reservation bit */
62/* returns the bit offset of the event selection register */ 77/* returns the bit offset of the event selection register */
63static inline unsigned int nmi_evntsel_msr_to_bit(unsigned int msr) 78static inline unsigned int nmi_evntsel_msr_to_bit(unsigned int msr)
64{ 79{
65 return wd_ops ? msr - wd_ops->evntsel : 0; 80 /* returns the bit offset of the event selection register */
81 switch (boot_cpu_data.x86_vendor) {
82 case X86_VENDOR_AMD:
83 return (msr - MSR_K7_EVNTSEL0);
84 case X86_VENDOR_INTEL:
85 if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON))
86 return (msr - MSR_ARCH_PERFMON_EVENTSEL0);
87
88 switch (boot_cpu_data.x86) {
89 case 6:
90 return (msr - MSR_P6_EVNTSEL0);
91 case 15:
92 return (msr - MSR_P4_BSU_ESCR0);
93 }
94 }
95 return 0;
96
66} 97}
67 98
68/* checks for a bit availability (hack for oprofile) */ 99/* checks for a bit availability (hack for oprofile) */
diff --git a/arch/i386/kernel/cpu/proc.c b/arch/i386/kernel/cpu/proc.c
index 89d91e6cc9..1e31b6caff 100644
--- a/arch/i386/kernel/cpu/proc.c
+++ b/arch/i386/kernel/cpu/proc.c
@@ -29,7 +29,8 @@ 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", "pdpe1gb", "rdtscp", NULL, "lm", "3dnowext", "3dnow", 32 NULL, "fxsr_opt", "pdpe1gb", "rdtscp", NULL, "lm",
33 "3dnowext", "3dnow",
33 34
34 /* Transmeta-defined */ 35 /* Transmeta-defined */
35 "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL, 36 "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL,
@@ -40,8 +41,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
40 /* Other (Linux-defined) */ 41 /* Other (Linux-defined) */
41 "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr", 42 "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr",
42 NULL, NULL, NULL, NULL, 43 NULL, NULL, NULL, NULL,
43 "constant_tsc", "up", NULL, NULL, NULL, NULL, NULL, NULL, 44 "constant_tsc", "up", NULL, "arch_perfmon",
44 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 45 "pebs", "bts", NULL, "sync_rdtsc",
46 "rep_good", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
45 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 47 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
46 48
47 /* Intel-defined (#2) */ 49 /* Intel-defined (#2) */
@@ -57,9 +59,16 @@ static int show_cpuinfo(struct seq_file *m, void *v)
57 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 59 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
58 60
59 /* AMD-defined (#2) */ 61 /* AMD-defined (#2) */
60 "lahf_lm", "cmp_legacy", "svm", "extapic", "cr8legacy", "abm", 62 "lahf_lm", "cmp_legacy", "svm", "extapic", "cr8_legacy",
61 "sse4a", "misalignsse", 63 "altmovcr8", "abm", "sse4a",
62 "3dnowprefetch", "osvw", "ibs", NULL, NULL, NULL, NULL, NULL, 64 "misalignsse", "3dnowprefetch",
65 "osvw", "ibs", NULL, NULL, NULL, NULL,
66 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
67 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
68
69 /* Auxiliary (Linux-defined) */
70 "ida", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
71 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
63 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 72 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
64 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 73 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
65 }; 74 };
diff --git a/arch/i386/kernel/e820.c b/arch/i386/kernel/e820.c
index 9645bb51f7..fc822a4689 100644
--- a/arch/i386/kernel/e820.c
+++ b/arch/i386/kernel/e820.c
@@ -734,7 +734,7 @@ void __init print_memory_map(char *who)
734 case E820_NVS: 734 case E820_NVS:
735 printk("(ACPI NVS)\n"); 735 printk("(ACPI NVS)\n");
736 break; 736 break;
737 default: printk("type %lu\n", e820.map[i].type); 737 default: printk("type %u\n", e820.map[i].type);
738 break; 738 break;
739 } 739 }
740 } 740 }
diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c
index a1808022ea..2452c6fbe9 100644
--- a/arch/i386/kernel/efi.c
+++ b/arch/i386/kernel/efi.c
@@ -278,7 +278,7 @@ void efi_memmap_walk(efi_freemem_callback_t callback, void *arg)
278 struct range { 278 struct range {
279 unsigned long start; 279 unsigned long start;
280 unsigned long end; 280 unsigned long end;
281 } prev, curr; 281 } uninitialized_var(prev), curr;
282 efi_memory_desc_t *md; 282 efi_memory_desc_t *md;
283 unsigned long start, end; 283 unsigned long start, end;
284 void *p; 284 void *p;
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
index b1f16ee65e..a714d6b435 100644
--- a/arch/i386/kernel/entry.S
+++ b/arch/i386/kernel/entry.S
@@ -367,10 +367,6 @@ ENTRY(system_call)
367 CFI_ADJUST_CFA_OFFSET 4 367 CFI_ADJUST_CFA_OFFSET 4
368 SAVE_ALL 368 SAVE_ALL
369 GET_THREAD_INFO(%ebp) 369 GET_THREAD_INFO(%ebp)
370 testl $TF_MASK,PT_EFLAGS(%esp)
371 jz no_singlestep
372 orl $_TIF_SINGLESTEP,TI_flags(%ebp)
373no_singlestep:
374 # system call tracing in operation / emulation 370 # system call tracing in operation / emulation
375 /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ 371 /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
376 testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp) 372 testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
@@ -385,6 +381,10 @@ syscall_exit:
385 # setting need_resched or sigpending 381 # setting need_resched or sigpending
386 # between sampling and the iret 382 # between sampling and the iret
387 TRACE_IRQS_OFF 383 TRACE_IRQS_OFF
384 testl $TF_MASK,PT_EFLAGS(%esp) # If tracing set singlestep flag on exit
385 jz no_singlestep
386 orl $_TIF_SINGLESTEP,TI_flags(%ebp)
387no_singlestep:
388 movl TI_flags(%ebp), %ecx 388 movl TI_flags(%ebp), %ecx
389 testw $_TIF_ALLWORK_MASK, %cx # current->work 389 testw $_TIF_ALLWORK_MASK, %cx # current->work
390 jne syscall_exit_work 390 jne syscall_exit_work
@@ -409,8 +409,6 @@ restore_nocheck_notrace:
4091: INTERRUPT_RETURN 4091: INTERRUPT_RETURN
410.section .fixup,"ax" 410.section .fixup,"ax"
411iret_exc: 411iret_exc:
412 TRACE_IRQS_ON
413 ENABLE_INTERRUPTS(CLBR_NONE)
414 pushl $0 # no error code 412 pushl $0 # no error code
415 pushl $do_iret_error 413 pushl $do_iret_error
416 jmp error_code 414 jmp error_code
@@ -1023,6 +1021,91 @@ ENTRY(kernel_thread_helper)
1023 CFI_ENDPROC 1021 CFI_ENDPROC
1024ENDPROC(kernel_thread_helper) 1022ENDPROC(kernel_thread_helper)
1025 1023
1024#ifdef CONFIG_XEN
1025ENTRY(xen_hypervisor_callback)
1026 CFI_STARTPROC
1027 pushl $0
1028 CFI_ADJUST_CFA_OFFSET 4
1029 SAVE_ALL
1030 TRACE_IRQS_OFF
1031
1032 /* Check to see if we got the event in the critical
1033 region in xen_iret_direct, after we've reenabled
1034 events and checked for pending events. This simulates
1035 iret instruction's behaviour where it delivers a
1036 pending interrupt when enabling interrupts. */
1037 movl PT_EIP(%esp),%eax
1038 cmpl $xen_iret_start_crit,%eax
1039 jb 1f
1040 cmpl $xen_iret_end_crit,%eax
1041 jae 1f
1042
1043 call xen_iret_crit_fixup
1044
10451: mov %esp, %eax
1046 call xen_evtchn_do_upcall
1047 jmp ret_from_intr
1048 CFI_ENDPROC
1049ENDPROC(xen_hypervisor_callback)
1050
1051# Hypervisor uses this for application faults while it executes.
1052# We get here for two reasons:
1053# 1. Fault while reloading DS, ES, FS or GS
1054# 2. Fault while executing IRET
1055# Category 1 we fix up by reattempting the load, and zeroing the segment
1056# register if the load fails.
1057# Category 2 we fix up by jumping to do_iret_error. We cannot use the
1058# normal Linux return path in this case because if we use the IRET hypercall
1059# to pop the stack frame we end up in an infinite loop of failsafe callbacks.
1060# We distinguish between categories by maintaining a status value in EAX.
1061ENTRY(xen_failsafe_callback)
1062 CFI_STARTPROC
1063 pushl %eax
1064 CFI_ADJUST_CFA_OFFSET 4
1065 movl $1,%eax
10661: mov 4(%esp),%ds
10672: mov 8(%esp),%es
10683: mov 12(%esp),%fs
10694: mov 16(%esp),%gs
1070 testl %eax,%eax
1071 popl %eax
1072 CFI_ADJUST_CFA_OFFSET -4
1073 lea 16(%esp),%esp
1074 CFI_ADJUST_CFA_OFFSET -16
1075 jz 5f
1076 addl $16,%esp
1077 jmp iret_exc # EAX != 0 => Category 2 (Bad IRET)
10785: pushl $0 # EAX == 0 => Category 1 (Bad segment)
1079 CFI_ADJUST_CFA_OFFSET 4
1080 SAVE_ALL
1081 jmp ret_from_exception
1082 CFI_ENDPROC
1083
1084.section .fixup,"ax"
10856: xorl %eax,%eax
1086 movl %eax,4(%esp)
1087 jmp 1b
10887: xorl %eax,%eax
1089 movl %eax,8(%esp)
1090 jmp 2b
10918: xorl %eax,%eax
1092 movl %eax,12(%esp)
1093 jmp 3b
10949: xorl %eax,%eax
1095 movl %eax,16(%esp)
1096 jmp 4b
1097.previous
1098.section __ex_table,"a"
1099 .align 4
1100 .long 1b,6b
1101 .long 2b,7b
1102 .long 3b,8b
1103 .long 4b,9b
1104.previous
1105ENDPROC(xen_failsafe_callback)
1106
1107#endif /* CONFIG_XEN */
1108
1026.section .rodata,"a" 1109.section .rodata,"a"
1027#include "syscall_table.S" 1110#include "syscall_table.S"
1028 1111
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S
index f74dfc419b..7c52b22220 100644
--- a/arch/i386/kernel/head.S
+++ b/arch/i386/kernel/head.S
@@ -168,6 +168,12 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
168.section .init.text,"ax",@progbits 168.section .init.text,"ax",@progbits
169#endif 169#endif
170 170
171 /* Do an early initialization of the fixmap area */
172 movl $(swapper_pg_dir - __PAGE_OFFSET), %edx
173 movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax
174 addl $0x007, %eax /* 0x007 = PRESENT+RW+USER */
175 movl %eax, 4092(%edx)
176
171#ifdef CONFIG_SMP 177#ifdef CONFIG_SMP
172ENTRY(startup_32_smp) 178ENTRY(startup_32_smp)
173 cld 179 cld
@@ -504,9 +510,12 @@ ENTRY(_stext)
504/* 510/*
505 * BSS section 511 * BSS section
506 */ 512 */
507.section ".bss.page_aligned","w" 513.section ".bss.page_aligned","wa"
514 .align PAGE_SIZE_asm
508ENTRY(swapper_pg_dir) 515ENTRY(swapper_pg_dir)
509 .fill 1024,4,0 516 .fill 1024,4,0
517ENTRY(swapper_pg_pmd)
518 .fill 1024,4,0
510ENTRY(empty_zero_page) 519ENTRY(empty_zero_page)
511 .fill 4096,1,0 520 .fill 4096,1,0
512 521
@@ -530,6 +539,8 @@ fault_msg:
530 .ascii "Int %d: CR2 %p err %p EIP %p CS %p flags %p\n" 539 .ascii "Int %d: CR2 %p err %p EIP %p CS %p flags %p\n"
531 .asciz "Stack: %p %p %p %p %p %p %p %p\n" 540 .asciz "Stack: %p %p %p %p %p %p %p %p\n"
532 541
542#include "../xen/xen-head.S"
543
533/* 544/*
534 * The IDT and GDT 'descriptors' are a strange 48-bit object 545 * The IDT and GDT 'descriptors' are a strange 48-bit object
535 * only used by the lidt and lgdt instructions. They are not 546 * only used by the lidt and lgdt instructions. They are not
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index 7f8b7af2b9..21db8f56c9 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -667,6 +667,7 @@ static int balanced_irq(void *unused)
667 set_pending_irq(i, cpumask_of_cpu(0)); 667 set_pending_irq(i, cpumask_of_cpu(0));
668 } 668 }
669 669
670 set_freezable();
670 for ( ; ; ) { 671 for ( ; ; ) {
671 time_remaining = schedule_timeout_interruptible(time_remaining); 672 time_remaining = schedule_timeout_interruptible(time_remaining);
672 try_to_freeze(); 673 try_to_freeze();
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index fba121f797..03b7f5584d 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -295,7 +295,7 @@ static unsigned int
295 last_irq_sums [NR_CPUS], 295 last_irq_sums [NR_CPUS],
296 alert_counter [NR_CPUS]; 296 alert_counter [NR_CPUS];
297 297
298void touch_nmi_watchdog (void) 298void touch_nmi_watchdog(void)
299{ 299{
300 if (nmi_watchdog > 0) { 300 if (nmi_watchdog > 0) {
301 unsigned cpu; 301 unsigned cpu;
@@ -304,8 +304,10 @@ void touch_nmi_watchdog (void)
304 * Just reset the alert counters, (other CPUs might be 304 * Just reset the alert counters, (other CPUs might be
305 * spinning on locks we hold): 305 * spinning on locks we hold):
306 */ 306 */
307 for_each_present_cpu (cpu) 307 for_each_present_cpu(cpu) {
308 alert_counter[cpu] = 0; 308 if (alert_counter[cpu])
309 alert_counter[cpu] = 0;
310 }
309 } 311 }
310 312
311 /* 313 /*
diff --git a/arch/i386/kernel/paravirt.c b/arch/i386/kernel/paravirt.c
index faab09abca..53f07a8275 100644
--- a/arch/i386/kernel/paravirt.c
+++ b/arch/i386/kernel/paravirt.c
@@ -228,6 +228,41 @@ static int __init print_banner(void)
228} 228}
229core_initcall(print_banner); 229core_initcall(print_banner);
230 230
231static struct resource reserve_ioports = {
232 .start = 0,
233 .end = IO_SPACE_LIMIT,
234 .name = "paravirt-ioport",
235 .flags = IORESOURCE_IO | IORESOURCE_BUSY,
236};
237
238static struct resource reserve_iomem = {
239 .start = 0,
240 .end = -1,
241 .name = "paravirt-iomem",
242 .flags = IORESOURCE_MEM | IORESOURCE_BUSY,
243};
244
245/*
246 * Reserve the whole legacy IO space to prevent any legacy drivers
247 * from wasting time probing for their hardware. This is a fairly
248 * brute-force approach to disabling all non-virtual drivers.
249 *
250 * Note that this must be called very early to have any effect.
251 */
252int paravirt_disable_iospace(void)
253{
254 int ret;
255
256 ret = request_resource(&ioport_resource, &reserve_ioports);
257 if (ret == 0) {
258 ret = request_resource(&iomem_resource, &reserve_iomem);
259 if (ret)
260 release_resource(&reserve_ioports);
261 }
262
263 return ret;
264}
265
231struct paravirt_ops paravirt_ops = { 266struct paravirt_ops paravirt_ops = {
232 .name = "bare hardware", 267 .name = "bare hardware",
233 .paravirt_enabled = 0, 268 .paravirt_enabled = 0,
@@ -267,7 +302,7 @@ struct paravirt_ops paravirt_ops = {
267 .write_msr = native_write_msr_safe, 302 .write_msr = native_write_msr_safe,
268 .read_tsc = native_read_tsc, 303 .read_tsc = native_read_tsc,
269 .read_pmc = native_read_pmc, 304 .read_pmc = native_read_pmc,
270 .get_scheduled_cycles = native_read_tsc, 305 .sched_clock = native_sched_clock,
271 .get_cpu_khz = native_calculate_cpu_khz, 306 .get_cpu_khz = native_calculate_cpu_khz,
272 .load_tr_desc = native_load_tr_desc, 307 .load_tr_desc = native_load_tr_desc,
273 .set_ldt = native_set_ldt, 308 .set_ldt = native_set_ldt,
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index 06dfa65ad1..6c49acb969 100644
--- a/arch/i386/kernel/process.c
+++ b/arch/i386/kernel/process.c
@@ -538,8 +538,31 @@ int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
538 return 1; 538 return 1;
539} 539}
540 540
541static noinline void __switch_to_xtra(struct task_struct *next_p, 541#ifdef CONFIG_SECCOMP
542 struct tss_struct *tss) 542void hard_disable_TSC(void)
543{
544 write_cr4(read_cr4() | X86_CR4_TSD);
545}
546void disable_TSC(void)
547{
548 preempt_disable();
549 if (!test_and_set_thread_flag(TIF_NOTSC))
550 /*
551 * Must flip the CPU state synchronously with
552 * TIF_NOTSC in the current running context.
553 */
554 hard_disable_TSC();
555 preempt_enable();
556}
557void hard_enable_TSC(void)
558{
559 write_cr4(read_cr4() & ~X86_CR4_TSD);
560}
561#endif /* CONFIG_SECCOMP */
562
563static noinline void
564__switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p,
565 struct tss_struct *tss)
543{ 566{
544 struct thread_struct *next; 567 struct thread_struct *next;
545 568
@@ -555,6 +578,17 @@ static noinline void __switch_to_xtra(struct task_struct *next_p,
555 set_debugreg(next->debugreg[7], 7); 578 set_debugreg(next->debugreg[7], 7);
556 } 579 }
557 580
581#ifdef CONFIG_SECCOMP
582 if (test_tsk_thread_flag(prev_p, TIF_NOTSC) ^
583 test_tsk_thread_flag(next_p, TIF_NOTSC)) {
584 /* prev and next are different */
585 if (test_tsk_thread_flag(next_p, TIF_NOTSC))
586 hard_disable_TSC();
587 else
588 hard_enable_TSC();
589 }
590#endif
591
558 if (!test_tsk_thread_flag(next_p, TIF_IO_BITMAP)) { 592 if (!test_tsk_thread_flag(next_p, TIF_IO_BITMAP)) {
559 /* 593 /*
560 * Disable the bitmap via an invalid offset. We still cache 594 * Disable the bitmap via an invalid offset. We still cache
@@ -586,33 +620,6 @@ static noinline void __switch_to_xtra(struct task_struct *next_p,
586} 620}
587 621
588/* 622/*
589 * This function selects if the context switch from prev to next
590 * has to tweak the TSC disable bit in the cr4.
591 */
592static inline void disable_tsc(struct task_struct *prev_p,
593 struct task_struct *next_p)
594{
595 struct thread_info *prev, *next;
596
597 /*
598 * gcc should eliminate the ->thread_info dereference if
599 * has_secure_computing returns 0 at compile time (SECCOMP=n).
600 */
601 prev = task_thread_info(prev_p);
602 next = task_thread_info(next_p);
603
604 if (has_secure_computing(prev) || has_secure_computing(next)) {
605 /* slow path here */
606 if (has_secure_computing(prev) &&
607 !has_secure_computing(next)) {
608 write_cr4(read_cr4() & ~X86_CR4_TSD);
609 } else if (!has_secure_computing(prev) &&
610 has_secure_computing(next))
611 write_cr4(read_cr4() | X86_CR4_TSD);
612 }
613}
614
615/*
616 * switch_to(x,yn) should switch tasks from x to y. 623 * switch_to(x,yn) should switch tasks from x to y.
617 * 624 *
618 * We fsave/fwait so that an exception goes off at the right time 625 * We fsave/fwait so that an exception goes off at the right time
@@ -689,11 +696,9 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas
689 /* 696 /*
690 * Now maybe handle debug registers and/or IO bitmaps 697 * Now maybe handle debug registers and/or IO bitmaps
691 */ 698 */
692 if (unlikely((task_thread_info(next_p)->flags & _TIF_WORK_CTXSW) 699 if (unlikely(task_thread_info(prev_p)->flags & _TIF_WORK_CTXSW_PREV ||
693 || test_tsk_thread_flag(prev_p, TIF_IO_BITMAP))) 700 task_thread_info(next_p)->flags & _TIF_WORK_CTXSW_NEXT))
694 __switch_to_xtra(next_p, tss); 701 __switch_to_xtra(prev_p, next_p, tss);
695
696 disable_tsc(prev_p, next_p);
697 702
698 /* 703 /*
699 * Leave lazy mode, flushing any hypercalls made here. 704 * Leave lazy mode, flushing any hypercalls made here.
diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c
index 0c0ceec5de..0c8f00e69c 100644
--- a/arch/i386/kernel/ptrace.c
+++ b/arch/i386/kernel/ptrace.c
@@ -164,14 +164,22 @@ static unsigned long convert_eip_to_linear(struct task_struct *child, struct pt_
164 u32 *desc; 164 u32 *desc;
165 unsigned long base; 165 unsigned long base;
166 166
167 down(&child->mm->context.sem); 167 seg &= ~7UL;
168 desc = child->mm->context.ldt + (seg & ~7);
169 base = (desc[0] >> 16) | ((desc[1] & 0xff) << 16) | (desc[1] & 0xff000000);
170 168
171 /* 16-bit code segment? */ 169 down(&child->mm->context.sem);
172 if (!((desc[1] >> 22) & 1)) 170 if (unlikely((seg >> 3) >= child->mm->context.size))
173 addr &= 0xffff; 171 addr = -1L; /* bogus selector, access would fault */
174 addr += base; 172 else {
173 desc = child->mm->context.ldt + seg;
174 base = ((desc[0] >> 16) |
175 ((desc[1] & 0xff) << 16) |
176 (desc[1] & 0xff000000));
177
178 /* 16-bit code segment? */
179 if (!((desc[1] >> 22) & 1))
180 addr &= 0xffff;
181 addr += base;
182 }
175 up(&child->mm->context.sem); 183 up(&child->mm->context.sem);
176 } 184 }
177 return addr; 185 return addr;
@@ -358,17 +366,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
358 switch (request) { 366 switch (request) {
359 /* when I and D space are separate, these will need to be fixed. */ 367 /* when I and D space are separate, these will need to be fixed. */
360 case PTRACE_PEEKTEXT: /* read word at location addr. */ 368 case PTRACE_PEEKTEXT: /* read word at location addr. */
361 case PTRACE_PEEKDATA: { 369 case PTRACE_PEEKDATA:
362 unsigned long tmp; 370 ret = generic_ptrace_peekdata(child, addr, data);
363 int copied;
364
365 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
366 ret = -EIO;
367 if (copied != sizeof(tmp))
368 break;
369 ret = put_user(tmp, datap);
370 break; 371 break;
371 }
372 372
373 /* read the word at location addr in the USER area. */ 373 /* read the word at location addr in the USER area. */
374 case PTRACE_PEEKUSR: { 374 case PTRACE_PEEKUSR: {
@@ -395,10 +395,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
395 /* when I and D space are separate, this will have to be fixed. */ 395 /* when I and D space are separate, this will have to be fixed. */
396 case PTRACE_POKETEXT: /* write the word at location addr. */ 396 case PTRACE_POKETEXT: /* write the word at location addr. */
397 case PTRACE_POKEDATA: 397 case PTRACE_POKEDATA:
398 ret = 0; 398 ret = generic_ptrace_pokedata(child, addr, data);
399 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
400 break;
401 ret = -EIO;
402 break; 399 break;
403 400
404 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ 401 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
diff --git a/arch/i386/kernel/quirks.c b/arch/i386/kernel/quirks.c
index 9f6ab1789b..6722469c26 100644
--- a/arch/i386/kernel/quirks.c
+++ b/arch/i386/kernel/quirks.c
@@ -20,8 +20,6 @@ static void __devinit quirk_intel_irqbalance(struct pci_dev *dev)
20 if (rev > 0x9) 20 if (rev > 0x9)
21 return; 21 return;
22 22
23 printk(KERN_INFO "Intel E7520/7320/7525 detected.");
24
25 /* enable access to config space*/ 23 /* enable access to config space*/
26 pci_read_config_byte(dev, 0xf4, &config); 24 pci_read_config_byte(dev, 0xf4, &config);
27 pci_write_config_byte(dev, 0xf4, config|0x2); 25 pci_write_config_byte(dev, 0xf4, config|0x2);
@@ -30,7 +28,8 @@ static void __devinit quirk_intel_irqbalance(struct pci_dev *dev)
30 raw_pci_ops->read(0, 0, 0x40, 0x4c, 2, &word); 28 raw_pci_ops->read(0, 0, 0x40, 0x4c, 2, &word);
31 29
32 if (!(word & (1 << 13))) { 30 if (!(word & (1 << 13))) {
33 printk(KERN_INFO "Disabling irq balancing and affinity\n"); 31 printk(KERN_INFO "Intel E7520/7320/7525 detected. "
32 "Disabling irq balancing and affinity\n");
34#ifdef CONFIG_IRQBALANCE 33#ifdef CONFIG_IRQBALANCE
35 irqbalance_disable(""); 34 irqbalance_disable("");
36#endif 35#endif
diff --git a/arch/i386/kernel/reboot_fixups.c b/arch/i386/kernel/reboot_fixups.c
index 2d78d91834..03e1cce58f 100644
--- a/arch/i386/kernel/reboot_fixups.c
+++ b/arch/i386/kernel/reboot_fixups.c
@@ -5,12 +5,14 @@
5 * 5 *
6 * List of supported fixups: 6 * List of supported fixups:
7 * geode-gx1/cs5530a - Jaya Kumar <jayalk@intworks.biz> 7 * geode-gx1/cs5530a - Jaya Kumar <jayalk@intworks.biz>
8 * geode-gx/lx/cs5536 - Andres Salomon <dilinger@debian.org>
8 * 9 *
9 */ 10 */
10 11
11#include <asm/delay.h> 12#include <asm/delay.h>
12#include <linux/pci.h> 13#include <linux/pci.h>
13#include <asm/reboot_fixups.h> 14#include <asm/reboot_fixups.h>
15#include <asm/msr.h>
14 16
15static void cs5530a_warm_reset(struct pci_dev *dev) 17static void cs5530a_warm_reset(struct pci_dev *dev)
16{ 18{
@@ -21,6 +23,16 @@ static void cs5530a_warm_reset(struct pci_dev *dev)
21 return; 23 return;
22} 24}
23 25
26static void cs5536_warm_reset(struct pci_dev *dev)
27{
28 /*
29 * 6.6.2.12 Soft Reset (DIVIL_SOFT_RESET)
30 * writing 1 to the LSB of this MSR causes a hard reset.
31 */
32 wrmsrl(0x51400017, 1ULL);
33 udelay(50); /* shouldn't get here but be safe and spin a while */
34}
35
24struct device_fixup { 36struct device_fixup {
25 unsigned int vendor; 37 unsigned int vendor;
26 unsigned int device; 38 unsigned int device;
@@ -29,6 +41,7 @@ struct device_fixup {
29 41
30static struct device_fixup fixups_table[] = { 42static struct device_fixup fixups_table[] = {
31{ PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, cs5530a_warm_reset }, 43{ PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, cs5530a_warm_reset },
44{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, cs5536_warm_reset },
32}; 45};
33 46
34/* 47/*
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 698c24fe48..74871d066c 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -102,19 +102,10 @@ static unsigned int highmem_pages = -1;
102/* 102/*
103 * Setup options 103 * Setup options
104 */ 104 */
105struct drive_info_struct { char dummy[32]; } drive_info;
106#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || \
107 defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
108EXPORT_SYMBOL(drive_info);
109#endif
110struct screen_info screen_info; 105struct screen_info screen_info;
111EXPORT_SYMBOL(screen_info); 106EXPORT_SYMBOL(screen_info);
112struct apm_info apm_info; 107struct apm_info apm_info;
113EXPORT_SYMBOL(apm_info); 108EXPORT_SYMBOL(apm_info);
114struct sys_desc_table_struct {
115 unsigned short length;
116 unsigned char table[0];
117};
118struct edid_info edid_info; 109struct edid_info edid_info;
119EXPORT_SYMBOL_GPL(edid_info); 110EXPORT_SYMBOL_GPL(edid_info);
120struct ist_info ist_info; 111struct ist_info ist_info;
@@ -134,7 +125,7 @@ unsigned long saved_videomode;
134 125
135static char __initdata command_line[COMMAND_LINE_SIZE]; 126static char __initdata command_line[COMMAND_LINE_SIZE];
136 127
137unsigned char __initdata boot_params[PARAM_SIZE]; 128struct boot_params __initdata boot_params;
138 129
139#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) 130#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
140struct edd edd; 131struct edd edd;
@@ -528,7 +519,6 @@ void __init setup_arch(char **cmdline_p)
528#endif 519#endif
529 520
530 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); 521 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
531 drive_info = DRIVE_INFO;
532 screen_info = SCREEN_INFO; 522 screen_info = SCREEN_INFO;
533 edid_info = EDID_INFO; 523 edid_info = EDID_INFO;
534 apm_info.bios = APM_BIOS_INFO; 524 apm_info.bios = APM_BIOS_INFO;
@@ -611,6 +601,8 @@ void __init setup_arch(char **cmdline_p)
611 * NOTE: at this point the bootmem allocator is fully available. 601 * NOTE: at this point the bootmem allocator is fully available.
612 */ 602 */
613 603
604 paravirt_post_allocator_init();
605
614 dmi_scan_machine(); 606 dmi_scan_machine();
615 607
616#ifdef CONFIG_X86_GENERICARCH 608#ifdef CONFIG_X86_GENERICARCH
diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c
index 6299c080f6..2d35d85020 100644
--- a/arch/i386/kernel/smp.c
+++ b/arch/i386/kernel/smp.c
@@ -22,6 +22,7 @@
22 22
23#include <asm/mtrr.h> 23#include <asm/mtrr.h>
24#include <asm/tlbflush.h> 24#include <asm/tlbflush.h>
25#include <asm/mmu_context.h>
25#include <mach_apic.h> 26#include <mach_apic.h>
26 27
27/* 28/*
@@ -249,13 +250,13 @@ static unsigned long flush_va;
249static DEFINE_SPINLOCK(tlbstate_lock); 250static DEFINE_SPINLOCK(tlbstate_lock);
250 251
251/* 252/*
252 * We cannot call mmdrop() because we are in interrupt context, 253 * We cannot call mmdrop() because we are in interrupt context,
253 * instead update mm->cpu_vm_mask. 254 * instead update mm->cpu_vm_mask.
254 * 255 *
255 * We need to reload %cr3 since the page tables may be going 256 * We need to reload %cr3 since the page tables may be going
256 * away from under us.. 257 * away from under us..
257 */ 258 */
258static inline void leave_mm (unsigned long cpu) 259void leave_mm(unsigned long cpu)
259{ 260{
260 if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK) 261 if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK)
261 BUG(); 262 BUG();
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c
index 88baed1e7e..5910d3fac5 100644
--- a/arch/i386/kernel/smpboot.c
+++ b/arch/i386/kernel/smpboot.c
@@ -148,7 +148,7 @@ void __init smp_alloc_memory(void)
148 * a given CPU 148 * a given CPU
149 */ 149 */
150 150
151static void __cpuinit smp_store_cpu_info(int id) 151void __cpuinit smp_store_cpu_info(int id)
152{ 152{
153 struct cpuinfo_x86 *c = cpu_data + id; 153 struct cpuinfo_x86 *c = cpu_data + id;
154 154
@@ -308,8 +308,7 @@ cpumask_t cpu_coregroup_map(int cpu)
308/* representing cpus for which sibling maps can be computed */ 308/* representing cpus for which sibling maps can be computed */
309static cpumask_t cpu_sibling_setup_map; 309static cpumask_t cpu_sibling_setup_map;
310 310
311static inline void 311void set_cpu_sibling_map(int cpu)
312set_cpu_sibling_map(int cpu)
313{ 312{
314 int i; 313 int i;
315 struct cpuinfo_x86 *c = cpu_data; 314 struct cpuinfo_x86 *c = cpu_data;
@@ -941,17 +940,6 @@ exit:
941} 940}
942#endif 941#endif
943 942
944static void smp_tune_scheduling(void)
945{
946 if (cpu_khz) {
947 /* cache size in kB */
948 long cachesize = boot_cpu_data.x86_cache_size;
949
950 if (cachesize > 0)
951 max_cache_size = cachesize * 1024;
952 }
953}
954
955/* 943/*
956 * Cycle through the processors sending APIC IPIs to boot each. 944 * Cycle through the processors sending APIC IPIs to boot each.
957 */ 945 */
@@ -980,7 +968,6 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
980 x86_cpu_to_apicid[0] = boot_cpu_physical_apicid; 968 x86_cpu_to_apicid[0] = boot_cpu_physical_apicid;
981 969
982 current_thread_info()->cpu = 0; 970 current_thread_info()->cpu = 0;
983 smp_tune_scheduling();
984 971
985 set_cpu_sibling_map(0); 972 set_cpu_sibling_map(0);
986 973
@@ -1156,8 +1143,7 @@ void __init native_smp_prepare_boot_cpu(void)
1156} 1143}
1157 1144
1158#ifdef CONFIG_HOTPLUG_CPU 1145#ifdef CONFIG_HOTPLUG_CPU
1159static void 1146void remove_siblinginfo(int cpu)
1160remove_siblinginfo(int cpu)
1161{ 1147{
1162 int sibling; 1148 int sibling;
1163 struct cpuinfo_x86 *c = cpu_data; 1149 struct cpuinfo_x86 *c = cpu_data;
diff --git a/arch/i386/kernel/smpcommon.c b/arch/i386/kernel/smpcommon.c
index 1868ae18eb..bbfe85a0f6 100644
--- a/arch/i386/kernel/smpcommon.c
+++ b/arch/i386/kernel/smpcommon.c
@@ -47,7 +47,7 @@ int smp_call_function(void (*func) (void *info), void *info, int nonatomic,
47EXPORT_SYMBOL(smp_call_function); 47EXPORT_SYMBOL(smp_call_function);
48 48
49/** 49/**
50 * smp_call_function_single - Run a function on another CPU 50 * smp_call_function_single - Run a function on a specific CPU
51 * @cpu: The target CPU. Cannot be the calling CPU. 51 * @cpu: The target CPU. Cannot be the calling CPU.
52 * @func: The function to run. This must be fast and non-blocking. 52 * @func: The function to run. This must be fast and non-blocking.
53 * @info: An arbitrary pointer to pass to the function. 53 * @info: An arbitrary pointer to pass to the function.
@@ -66,9 +66,11 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
66 int ret; 66 int ret;
67 int me = get_cpu(); 67 int me = get_cpu();
68 if (cpu == me) { 68 if (cpu == me) {
69 WARN_ON(1); 69 local_irq_disable();
70 func(info);
71 local_irq_enable();
70 put_cpu(); 72 put_cpu();
71 return -EBUSY; 73 return 0;
72 } 74 }
73 75
74 ret = smp_call_function_mask(cpumask_of_cpu(cpu), func, info, wait); 76 ret = smp_call_function_mask(cpumask_of_cpu(cpu), func, info, wait);
diff --git a/arch/i386/kernel/syscall_table.S b/arch/i386/kernel/syscall_table.S
index bf6adce522..8344c70adf 100644
--- a/arch/i386/kernel/syscall_table.S
+++ b/arch/i386/kernel/syscall_table.S
@@ -323,3 +323,4 @@ ENTRY(sys_call_table)
323 .long sys_signalfd 323 .long sys_signalfd
324 .long sys_timerfd 324 .long sys_timerfd
325 .long sys_eventfd 325 .long sys_eventfd
326 .long sys_fallocate
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index 90da0575fc..d32fd4b6f7 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -390,7 +390,7 @@ void die(const char * str, struct pt_regs * regs, long err)
390 unsigned long esp; 390 unsigned long esp;
391 unsigned short ss; 391 unsigned short ss;
392 392
393 report_bug(regs->eip); 393 report_bug(regs->eip, regs);
394 394
395 printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); 395 printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
396#ifdef CONFIG_PREEMPT 396#ifdef CONFIG_PREEMPT
@@ -433,6 +433,7 @@ void die(const char * str, struct pt_regs * regs, long err)
433 433
434 bust_spinlocks(0); 434 bust_spinlocks(0);
435 die.lock_owner = -1; 435 die.lock_owner = -1;
436 add_taint(TAINT_DIE);
436 spin_unlock_irqrestore(&die.lock, flags); 437 spin_unlock_irqrestore(&die.lock, flags);
437 438
438 if (!regs) 439 if (!regs)
@@ -517,10 +518,12 @@ fastcall void do_##name(struct pt_regs * regs, long error_code) \
517 do_trap(trapnr, signr, str, 0, regs, error_code, NULL); \ 518 do_trap(trapnr, signr, str, 0, regs, error_code, NULL); \
518} 519}
519 520
520#define DO_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \ 521#define DO_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr, irq) \
521fastcall void do_##name(struct pt_regs * regs, long error_code) \ 522fastcall void do_##name(struct pt_regs * regs, long error_code) \
522{ \ 523{ \
523 siginfo_t info; \ 524 siginfo_t info; \
525 if (irq) \
526 local_irq_enable(); \
524 info.si_signo = signr; \ 527 info.si_signo = signr; \
525 info.si_errno = 0; \ 528 info.si_errno = 0; \
526 info.si_code = sicode; \ 529 info.si_code = sicode; \
@@ -560,13 +563,13 @@ DO_VM86_ERROR( 3, SIGTRAP, "int3", int3)
560#endif 563#endif
561DO_VM86_ERROR( 4, SIGSEGV, "overflow", overflow) 564DO_VM86_ERROR( 4, SIGSEGV, "overflow", overflow)
562DO_VM86_ERROR( 5, SIGSEGV, "bounds", bounds) 565DO_VM86_ERROR( 5, SIGSEGV, "bounds", bounds)
563DO_ERROR_INFO( 6, SIGILL, "invalid opcode", invalid_op, ILL_ILLOPN, regs->eip) 566DO_ERROR_INFO( 6, SIGILL, "invalid opcode", invalid_op, ILL_ILLOPN, regs->eip, 0)
564DO_ERROR( 9, SIGFPE, "coprocessor segment overrun", coprocessor_segment_overrun) 567DO_ERROR( 9, SIGFPE, "coprocessor segment overrun", coprocessor_segment_overrun)
565DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS) 568DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS)
566DO_ERROR(11, SIGBUS, "segment not present", segment_not_present) 569DO_ERROR(11, SIGBUS, "segment not present", segment_not_present)
567DO_ERROR(12, SIGBUS, "stack segment", stack_segment) 570DO_ERROR(12, SIGBUS, "stack segment", stack_segment)
568DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0) 571DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0, 0)
569DO_ERROR_INFO(32, SIGSEGV, "iret exception", iret_error, ILL_BADSTK, 0) 572DO_ERROR_INFO(32, SIGSEGV, "iret exception", iret_error, ILL_BADSTK, 0, 1)
570 573
571fastcall void __kprobes do_general_protection(struct pt_regs * regs, 574fastcall void __kprobes do_general_protection(struct pt_regs * regs,
572 long error_code) 575 long error_code)
diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c
index f64b81f303..252f9010f2 100644
--- a/arch/i386/kernel/tsc.c
+++ b/arch/i386/kernel/tsc.c
@@ -4,6 +4,7 @@
4 * See comments there for proper credits. 4 * See comments there for proper credits.
5 */ 5 */
6 6
7#include <linux/sched.h>
7#include <linux/clocksource.h> 8#include <linux/clocksource.h>
8#include <linux/workqueue.h> 9#include <linux/workqueue.h>
9#include <linux/cpufreq.h> 10#include <linux/cpufreq.h>
@@ -83,7 +84,7 @@ static inline int check_tsc_unstable(void)
83 * 84 *
84 * -johnstul@us.ibm.com "math is hard, lets go shopping!" 85 * -johnstul@us.ibm.com "math is hard, lets go shopping!"
85 */ 86 */
86static unsigned long cyc2ns_scale __read_mostly; 87unsigned long cyc2ns_scale __read_mostly;
87 88
88#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */ 89#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */
89 90
@@ -92,32 +93,44 @@ static inline void set_cyc2ns_scale(unsigned long cpu_khz)
92 cyc2ns_scale = (1000000 << CYC2NS_SCALE_FACTOR)/cpu_khz; 93 cyc2ns_scale = (1000000 << CYC2NS_SCALE_FACTOR)/cpu_khz;
93} 94}
94 95
95static inline unsigned long long cycles_2_ns(unsigned long long cyc)
96{
97 return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR;
98}
99
100/* 96/*
101 * Scheduler clock - returns current time in nanosec units. 97 * Scheduler clock - returns current time in nanosec units.
102 */ 98 */
103unsigned long long sched_clock(void) 99unsigned long long native_sched_clock(void)
104{ 100{
105 unsigned long long this_offset; 101 unsigned long long this_offset;
106 102
107 /* 103 /*
108 * Fall back to jiffies if there's no TSC available: 104 * Fall back to jiffies if there's no TSC available:
105 * ( But note that we still use it if the TSC is marked
106 * unstable. We do this because unlike Time Of Day,
107 * the scheduler clock tolerates small errors and it's
108 * very important for it to be as fast as the platform
109 * can achive it. )
109 */ 110 */
110 if (unlikely(!tsc_enabled)) 111 if (unlikely(!tsc_enabled && !tsc_unstable))
111 /* No locking but a rare wrong value is not a big deal: */ 112 /* No locking but a rare wrong value is not a big deal: */
112 return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ); 113 return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ);
113 114
114 /* read the Time Stamp Counter: */ 115 /* read the Time Stamp Counter: */
115 get_scheduled_cycles(this_offset); 116 rdtscll(this_offset);
116 117
117 /* return the value in ns */ 118 /* return the value in ns */
118 return cycles_2_ns(this_offset); 119 return cycles_2_ns(this_offset);
119} 120}
120 121
122/* We need to define a real function for sched_clock, to override the
123 weak default version */
124#ifdef CONFIG_PARAVIRT
125unsigned long long sched_clock(void)
126{
127 return paravirt_sched_clock();
128}
129#else
130unsigned long long sched_clock(void)
131 __attribute__((alias("native_sched_clock")));
132#endif
133
121unsigned long native_calculate_cpu_khz(void) 134unsigned long native_calculate_cpu_khz(void)
122{ 135{
123 unsigned long long start, end; 136 unsigned long long start, end;
@@ -277,6 +290,7 @@ static struct clocksource clocksource_tsc = {
277 290
278void mark_tsc_unstable(char *reason) 291void mark_tsc_unstable(char *reason)
279{ 292{
293 sched_clock_unstable_event();
280 if (!tsc_unstable) { 294 if (!tsc_unstable) {
281 tsc_unstable = 1; 295 tsc_unstable = 1;
282 tsc_enabled = 0; 296 tsc_enabled = 0;
diff --git a/arch/i386/kernel/verify_cpu.S b/arch/i386/kernel/verify_cpu.S
deleted file mode 100644
index f1d1eacf4a..0000000000
--- a/arch/i386/kernel/verify_cpu.S
+++ /dev/null
@@ -1,94 +0,0 @@
1/* Check if CPU has some minimum CPUID bits
2 This runs in 16bit mode so that the caller can still use the BIOS
3 to output errors on the screen */
4#include <asm/cpufeature.h>
5#include <asm/msr.h>
6
7verify_cpu:
8 pushfl # Save caller passed flags
9 pushl $0 # Kill any dangerous flags
10 popfl
11
12#if CONFIG_X86_MINIMUM_CPU_MODEL >= 4
13 pushfl
14 pop %eax
15 orl $(1<<18),%eax # try setting AC
16 push %eax
17 popfl
18 pushfl
19 popl %eax
20 testl $(1<<18),%eax
21 jz bad
22#endif
23#if REQUIRED_MASK1 != 0
24 pushfl # standard way to check for cpuid
25 popl %eax
26 movl %eax,%ebx
27 xorl $0x200000,%eax
28 pushl %eax
29 popfl
30 pushfl
31 popl %eax
32 cmpl %eax,%ebx
33 pushfl # standard way to check for cpuid
34 popl %eax
35 movl %eax,%ebx
36 xorl $0x200000,%eax
37 pushl %eax
38 popfl
39 pushfl
40 popl %eax
41 cmpl %eax,%ebx
42 jz bad # REQUIRED_MASK1 != 0 requires CPUID
43
44 movl $0x0,%eax # See if cpuid 1 is implemented
45 cpuid
46 cmpl $0x1,%eax
47 jb bad # no cpuid 1
48
49#if REQUIRED_MASK1 & NEED_CMPXCHG64
50 /* Some VIA C3s need magic MSRs to enable CX64. Do this here */
51 cmpl $0x746e6543,%ebx # Cent
52 jne 1f
53 cmpl $0x48727561,%edx # aurH
54 jne 1f
55 cmpl $0x736c7561,%ecx # auls
56 jne 1f
57 movl $1,%eax # check model
58 cpuid
59 movl %eax,%ebx
60 shr $8,%ebx
61 andl $0xf,%ebx
62 cmp $6,%ebx # check family == 6
63 jne 1f
64 shr $4,%eax
65 andl $0xf,%eax
66 cmpl $6,%eax # check model >= 6
67 jb 1f
68 # assume models >= 6 all support this MSR
69 movl $MSR_VIA_FCR,%ecx
70 rdmsr
71 orl $((1<<1)|(1<<7)),%eax # enable CMPXCHG64 and PGE
72 wrmsr
731:
74#endif
75 movl $0x1,%eax # Does the cpu have what it takes
76 cpuid
77
78#if CONFIG_X86_MINIMUM_CPU_MODEL > 4
79#error add proper model checking here
80#endif
81
82 andl $REQUIRED_MASK1,%edx
83 xorl $REQUIRED_MASK1,%edx
84 jnz bad
85#endif /* REQUIRED_MASK1 */
86
87 popfl
88 xor %eax,%eax
89 ret
90
91bad:
92 popfl
93 movl $1,%eax
94 ret
diff --git a/arch/i386/kernel/vmi.c b/arch/i386/kernel/vmi.c
index c12720d7cb..72042bb7ec 100644
--- a/arch/i386/kernel/vmi.c
+++ b/arch/i386/kernel/vmi.c
@@ -362,7 +362,7 @@ static void *vmi_kmap_atomic_pte(struct page *page, enum km_type type)
362} 362}
363#endif 363#endif
364 364
365static void vmi_allocate_pt(u32 pfn) 365static void vmi_allocate_pt(struct mm_struct *mm, u32 pfn)
366{ 366{
367 vmi_set_page_type(pfn, VMI_PAGE_L1); 367 vmi_set_page_type(pfn, VMI_PAGE_L1);
368 vmi_ops.allocate_page(pfn, VMI_PAGE_L1, 0, 0, 0); 368 vmi_ops.allocate_page(pfn, VMI_PAGE_L1, 0, 0, 0);
@@ -891,7 +891,7 @@ static inline int __init activate_vmi(void)
891 paravirt_ops.setup_boot_clock = vmi_time_bsp_init; 891 paravirt_ops.setup_boot_clock = vmi_time_bsp_init;
892 paravirt_ops.setup_secondary_clock = vmi_time_ap_init; 892 paravirt_ops.setup_secondary_clock = vmi_time_ap_init;
893#endif 893#endif
894 paravirt_ops.get_scheduled_cycles = vmi_get_sched_cycles; 894 paravirt_ops.sched_clock = vmi_sched_clock;
895 paravirt_ops.get_cpu_khz = vmi_cpu_khz; 895 paravirt_ops.get_cpu_khz = vmi_cpu_khz;
896 896
897 /* We have true wallclock functions; disable CMOS clock sync */ 897 /* We have true wallclock functions; disable CMOS clock sync */
diff --git a/arch/i386/kernel/vmiclock.c b/arch/i386/kernel/vmiclock.c
index 26a37f8a87..f9b845f4e6 100644
--- a/arch/i386/kernel/vmiclock.c
+++ b/arch/i386/kernel/vmiclock.c
@@ -64,10 +64,10 @@ int vmi_set_wallclock(unsigned long now)
64 return 0; 64 return 0;
65} 65}
66 66
67/* paravirt_ops.get_scheduled_cycles = vmi_get_sched_cycles */ 67/* paravirt_ops.sched_clock = vmi_sched_clock */
68unsigned long long vmi_get_sched_cycles(void) 68unsigned long long vmi_sched_clock(void)
69{ 69{
70 return vmi_timer_ops.get_cycle_counter(VMI_CYCLES_AVAILABLE); 70 return cycles_2_ns(vmi_timer_ops.get_cycle_counter(VMI_CYCLES_AVAILABLE));
71} 71}
72 72
73/* paravirt_ops.get_cpu_khz = vmi_cpu_khz */ 73/* paravirt_ops.get_cpu_khz = vmi_cpu_khz */
diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S
index aa87b06c7c..00f1bc47d3 100644
--- a/arch/i386/kernel/vmlinux.lds.S
+++ b/arch/i386/kernel/vmlinux.lds.S
@@ -88,6 +88,7 @@ SECTIONS
88 88
89 . = ALIGN(4096); 89 . = ALIGN(4096);
90 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { 90 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
91 *(.data.page_aligned)
91 *(.data.idt) 92 *(.data.idt)
92 } 93 }
93 94
diff --git a/arch/i386/kernel/vsyscall-note.S b/arch/i386/kernel/vsyscall-note.S
index d4b5be4f3d..271f16a8ca 100644
--- a/arch/i386/kernel/vsyscall-note.S
+++ b/arch/i386/kernel/vsyscall-note.S
@@ -3,23 +3,40 @@
3 * Here we can supply some information useful to userland. 3 * Here we can supply some information useful to userland.
4 */ 4 */
5 5
6#include <linux/uts.h>
7#include <linux/version.h> 6#include <linux/version.h>
7#include <linux/elfnote.h>
8 8
9#define ASM_ELF_NOTE_BEGIN(name, flags, vendor, type) \ 9/* Ideally this would use UTS_NAME, but using a quoted string here
10 .section name, flags; \ 10 doesn't work. Remember to change this when changing the
11 .balign 4; \ 11 kernel's name. */
12 .long 1f - 0f; /* name length */ \ 12ELFNOTE_START(Linux, 0, "a")
13 .long 3f - 2f; /* data length */ \ 13 .long LINUX_VERSION_CODE
14 .long type; /* note type */ \ 14ELFNOTE_END
150: .asciz vendor; /* vendor name */ \
161: .balign 4; \
172:
18 15
19#define ASM_ELF_NOTE_END \ 16#ifdef CONFIG_XEN
203: .balign 4; /* pad out section */ \
21 .previous
22 17
23 ASM_ELF_NOTE_BEGIN(".note.kernel-version", "a", UTS_SYSNAME, 0) 18/*
24 .long LINUX_VERSION_CODE 19 * Add a special note telling glibc's dynamic linker a fake hardware
25 ASM_ELF_NOTE_END 20 * flavor that it will use to choose the search path for libraries in the
21 * same way it uses real hardware capabilities like "mmx".
22 * We supply "nosegneg" as the fake capability, to indicate that we
23 * do not like negative offsets in instructions using segment overrides,
24 * since we implement those inefficiently. This makes it possible to
25 * install libraries optimized to avoid those access patterns in someplace
26 * like /lib/i686/tls/nosegneg. Note that an /etc/ld.so.conf.d/file
27 * corresponding to the bits here is needed to make ldconfig work right.
28 * It should contain:
29 * hwcap 1 nosegneg
30 * to match the mapping of bit to name that we give here.
31 */
32
33/* Bit used for the pseudo-hwcap for non-negative segments. We use
34 bit 1 to avoid bugs in some versions of glibc when bit 0 is
35 used; the choice is otherwise arbitrary. */
36#define VDSO_NOTE_NONEGSEG_BIT 1
37
38ELFNOTE_START(GNU, 2, "a")
39 .long 1, 1<<VDSO_NOTE_NONEGSEG_BIT /* ncaps, mask */
40 .byte VDSO_NOTE_NONEGSEG_BIT; .asciz "nosegneg" /* bit, name */
41ELFNOTE_END
42#endif
diff --git a/arch/i386/mach-es7000/es7000plat.c b/arch/i386/mach-es7000/es7000plat.c
index 9be6ceabf0..ab99072d3f 100644
--- a/arch/i386/mach-es7000/es7000plat.c
+++ b/arch/i386/mach-es7000/es7000plat.c
@@ -40,6 +40,7 @@
40#include <asm/smp.h> 40#include <asm/smp.h>
41#include <asm/apicdef.h> 41#include <asm/apicdef.h>
42#include "es7000.h" 42#include "es7000.h"
43#include <mach_mpparse.h>
43 44
44/* 45/*
45 * ES7000 Globals 46 * ES7000 Globals
@@ -174,6 +175,53 @@ find_unisys_acpi_oem_table(unsigned long *oem_addr)
174} 175}
175#endif 176#endif
176 177
178/*
179 * This file also gets compiled if CONFIG_X86_GENERICARCH is set. Generic
180 * arch already has got following function definitions (asm-generic/es7000.c)
181 * hence no need to define these for that case.
182 */
183#ifndef CONFIG_X86_GENERICARCH
184void es7000_sw_apic(void);
185void __init enable_apic_mode(void)
186{
187 es7000_sw_apic();
188 return;
189}
190
191__init int mps_oem_check(struct mp_config_table *mpc, char *oem,
192 char *productid)
193{
194 if (mpc->mpc_oemptr) {
195 struct mp_config_oemtable *oem_table =
196 (struct mp_config_oemtable *)mpc->mpc_oemptr;
197 if (!strncmp(oem, "UNISYS", 6))
198 return parse_unisys_oem((char *)oem_table);
199 }
200 return 0;
201}
202#ifdef CONFIG_ACPI
203/* Hook from generic ACPI tables.c */
204int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
205{
206 unsigned long oem_addr;
207 if (!find_unisys_acpi_oem_table(&oem_addr)) {
208 if (es7000_check_dsdt())
209 return parse_unisys_oem((char *)oem_addr);
210 else {
211 setup_unisys();
212 return 1;
213 }
214 }
215 return 0;
216}
217#else
218int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
219{
220 return 0;
221}
222#endif
223#endif /* COFIG_X86_GENERICARCH */
224
177static void 225static void
178es7000_spin(int n) 226es7000_spin(int n)
179{ 227{
diff --git a/arch/i386/mach-visws/traps.c b/arch/i386/mach-visws/traps.c
index 5199bd0325..843b67acf4 100644
--- a/arch/i386/mach-visws/traps.c
+++ b/arch/i386/mach-visws/traps.c
@@ -23,13 +23,13 @@ static __init void lithium_init(void)
23 set_fixmap(FIX_LI_PCIB, LI_PCI_B_PHYS); 23 set_fixmap(FIX_LI_PCIB, LI_PCI_B_PHYS);
24 24
25 if ((li_pcia_read16(PCI_VENDOR_ID) != PCI_VENDOR_ID_SGI) || 25 if ((li_pcia_read16(PCI_VENDOR_ID) != PCI_VENDOR_ID_SGI) ||
26 (li_pcia_read16(PCI_DEVICE_ID) != PCI_VENDOR_ID_SGI_LITHIUM)) { 26 (li_pcia_read16(PCI_DEVICE_ID) != PCI_DEVICE_ID_SGI_LITHIUM)) {
27 printk(KERN_EMERG "Lithium hostbridge %c not found\n", 'A'); 27 printk(KERN_EMERG "Lithium hostbridge %c not found\n", 'A');
28 panic("This machine is not SGI Visual Workstation 320/540"); 28 panic("This machine is not SGI Visual Workstation 320/540");
29 } 29 }
30 30
31 if ((li_pcib_read16(PCI_VENDOR_ID) != PCI_VENDOR_ID_SGI) || 31 if ((li_pcib_read16(PCI_VENDOR_ID) != PCI_VENDOR_ID_SGI) ||
32 (li_pcib_read16(PCI_DEVICE_ID) != PCI_VENDOR_ID_SGI_LITHIUM)) { 32 (li_pcib_read16(PCI_DEVICE_ID) != PCI_DEVICE_ID_SGI_LITHIUM)) {
33 printk(KERN_EMERG "Lithium hostbridge %c not found\n", 'B'); 33 printk(KERN_EMERG "Lithium hostbridge %c not found\n", 'B');
34 panic("This machine is not SGI Visual Workstation 320/540"); 34 panic("This machine is not SGI Visual Workstation 320/540");
35 } 35 }
diff --git a/arch/i386/mach-voyager/voyager_thread.c b/arch/i386/mach-voyager/voyager_thread.c
index b4b24e0e45..f9d5953381 100644
--- a/arch/i386/mach-voyager/voyager_thread.c
+++ b/arch/i386/mach-voyager/voyager_thread.c
@@ -52,7 +52,7 @@ execute(const char *string)
52 NULL, 52 NULL,
53 }; 53 };
54 54
55 if ((ret = call_usermodehelper(argv[0], argv, envp, 1)) != 0) { 55 if ((ret = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC)) != 0) {
56 printk(KERN_ERR "Voyager failed to run \"%s\": %i\n", 56 printk(KERN_ERR "Voyager failed to run \"%s\": %i\n",
57 string, ret); 57 string, ret);
58 } 58 }
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c
index 7135946d36..6a68b1ae06 100644
--- a/arch/i386/mm/init.c
+++ b/arch/i386/mm/init.c
@@ -87,7 +87,7 @@ static pte_t * __init one_page_table_init(pmd_t *pmd)
87 if (!(pmd_val(*pmd) & _PAGE_PRESENT)) { 87 if (!(pmd_val(*pmd) & _PAGE_PRESENT)) {
88 pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); 88 pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
89 89
90 paravirt_alloc_pt(__pa(page_table) >> PAGE_SHIFT); 90 paravirt_alloc_pt(&init_mm, __pa(page_table) >> PAGE_SHIFT);
91 set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE)); 91 set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
92 BUG_ON(page_table != pte_offset_kernel(pmd, 0)); 92 BUG_ON(page_table != pte_offset_kernel(pmd, 0));
93 } 93 }
@@ -473,6 +473,7 @@ void zap_low_mappings (void)
473 473
474static int disable_nx __initdata = 0; 474static int disable_nx __initdata = 0;
475u64 __supported_pte_mask __read_mostly = ~_PAGE_NX; 475u64 __supported_pte_mask __read_mostly = ~_PAGE_NX;
476EXPORT_SYMBOL_GPL(__supported_pte_mask);
476 477
477/* 478/*
478 * noexec = on|off 479 * noexec = on|off
diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c
index 2eb14a73be..37992ffb16 100644
--- a/arch/i386/mm/pageattr.c
+++ b/arch/i386/mm/pageattr.c
@@ -60,7 +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 paravirt_alloc_pt(&init_mm, page_to_pfn(base));
64 for (i = 0; i < PTRS_PER_PTE; i++, addr += PAGE_SIZE) { 64 for (i = 0; i < PTRS_PER_PTE; i++, addr += PAGE_SIZE) {
65 set_pte(&pbase[i], pfn_pte(addr >> PAGE_SHIFT, 65 set_pte(&pbase[i], pfn_pte(addr >> PAGE_SHIFT,
66 addr == address ? prot : ref_prot)); 66 addr == address ? prot : ref_prot));
diff --git a/arch/i386/pci/fixup.c b/arch/i386/pci/fixup.c
index b95b42950e..e7306dbf6c 100644
--- a/arch/i386/pci/fixup.c
+++ b/arch/i386/pci/fixup.c
@@ -118,12 +118,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, pci
118static void pci_fixup_via_northbridge_bug(struct pci_dev *d) 118static void pci_fixup_via_northbridge_bug(struct pci_dev *d)
119{ 119{
120 u8 v; 120 u8 v;
121 u8 revision;
122 int where = 0x55; 121 int where = 0x55;
123 int mask = 0x1f; /* clear bits 5, 6, 7 by default */ 122 int mask = 0x1f; /* clear bits 5, 6, 7 by default */
124 123
125 pci_read_config_byte(d, PCI_REVISION_ID, &revision);
126
127 if (d->device == PCI_DEVICE_ID_VIA_8367_0) { 124 if (d->device == PCI_DEVICE_ID_VIA_8367_0) {
128 /* fix pci bus latency issues resulted by NB bios error 125 /* fix pci bus latency issues resulted by NB bios error
129 it appears on bug free^Wreduced kt266x's bios forces 126 it appears on bug free^Wreduced kt266x's bios forces
@@ -133,8 +130,8 @@ static void pci_fixup_via_northbridge_bug(struct pci_dev *d)
133 where = 0x95; /* the memory write queue timer register is 130 where = 0x95; /* the memory write queue timer register is
134 different for the KT266x's: 0x95 not 0x55 */ 131 different for the KT266x's: 0x95 not 0x55 */
135 } else if (d->device == PCI_DEVICE_ID_VIA_8363_0 && 132 } else if (d->device == PCI_DEVICE_ID_VIA_8363_0 &&
136 (revision == VIA_8363_KL133_REVISION_ID || 133 (d->revision == VIA_8363_KL133_REVISION_ID ||
137 revision == VIA_8363_KM133_REVISION_ID)) { 134 d->revision == VIA_8363_KM133_REVISION_ID)) {
138 mask = 0x3f; /* clear only bits 6 and 7; clearing bit 5 135 mask = 0x3f; /* clear only bits 6 and 7; clearing bit 5
139 causes screen corruption on the KL133/KM133 */ 136 causes screen corruption on the KL133/KM133 */
140 } 137 }
@@ -142,7 +139,7 @@ static void pci_fixup_via_northbridge_bug(struct pci_dev *d)
142 pci_read_config_byte(d, where, &v); 139 pci_read_config_byte(d, where, &v);
143 if (v & ~mask) { 140 if (v & ~mask) {
144 printk(KERN_WARNING "Disabling VIA memory write queue (PCI ID %04x, rev %02x): [%02x] %02x & %02x -> %02x\n", \ 141 printk(KERN_WARNING "Disabling VIA memory write queue (PCI ID %04x, rev %02x): [%02x] %02x & %02x -> %02x\n", \
145 d->device, revision, where, v, mask, v & mask); 142 d->device, d->revision, where, v, mask, v & mask);
146 v &= mask; 143 v &= mask;
147 pci_write_config_byte(d, where, v); 144 pci_write_config_byte(d, where, v);
148 } 145 }
diff --git a/arch/i386/video/Makefile b/arch/i386/video/Makefile
new file mode 100644
index 0000000000..2c447c94ad
--- /dev/null
+++ b/arch/i386/video/Makefile
@@ -0,0 +1 @@
obj-$(CONFIG_FB) += fbdev.o
diff --git a/arch/i386/video/fbdev.c b/arch/i386/video/fbdev.c
new file mode 100644
index 0000000000..48fb38d7d2
--- /dev/null
+++ b/arch/i386/video/fbdev.c
@@ -0,0 +1,32 @@
1/*
2 * arch/i386/video/fbdev.c - i386 Framebuffer
3 *
4 * Copyright (C) 2007 Antonino Daplas <adaplas@gmail.com>
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive
8 * for more details.
9 *
10 */
11#include <linux/fb.h>
12#include <linux/pci.h>
13
14int fb_is_primary_device(struct fb_info *info)
15{
16 struct device *device = info->device;
17 struct pci_dev *pci_dev = NULL;
18 struct resource *res = NULL;
19 int retval = 0;
20
21 if (device)
22 pci_dev = to_pci_dev(device);
23
24 if (pci_dev)
25 res = &pci_dev->resource[PCI_ROM_RESOURCE];
26
27 if (res && res->flags & IORESOURCE_ROM_SHADOW)
28 retval = 1;
29
30 return retval;
31}
32EXPORT_SYMBOL(fb_is_primary_device);
diff --git a/arch/i386/xen/Kconfig b/arch/i386/xen/Kconfig
new file mode 100644
index 0000000000..9df99e1885
--- /dev/null
+++ b/arch/i386/xen/Kconfig
@@ -0,0 +1,11 @@
1#
2# This Kconfig describes xen options
3#
4
5config XEN
6 bool "Enable support for Xen hypervisor"
7 depends on PARAVIRT && X86_CMPXCHG && X86_TSC && !NEED_MULTIPLE_NODES
8 help
9 This is the Linux Xen port. Enabling this will allow the
10 kernel to boot in a paravirtualized environment under the
11 Xen hypervisor.
diff --git a/arch/i386/xen/Makefile b/arch/i386/xen/Makefile
new file mode 100644
index 0000000000..343df246bd
--- /dev/null
+++ b/arch/i386/xen/Makefile
@@ -0,0 +1,4 @@
1obj-y := enlighten.o setup.o features.o multicalls.o mmu.o \
2 events.o time.o manage.o xen-asm.o
3
4obj-$(CONFIG_SMP) += smp.o
diff --git a/arch/i386/xen/enlighten.c b/arch/i386/xen/enlighten.c
new file mode 100644
index 0000000000..9a8c1181c0
--- /dev/null
+++ b/arch/i386/xen/enlighten.c
@@ -0,0 +1,1144 @@
1/*
2 * Core of Xen paravirt_ops implementation.
3 *
4 * This file contains the xen_paravirt_ops structure itself, and the
5 * implementations for:
6 * - privileged instructions
7 * - interrupt flags
8 * - segment operations
9 * - booting and setup
10 *
11 * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/smp.h>
17#include <linux/preempt.h>
18#include <linux/hardirq.h>
19#include <linux/percpu.h>
20#include <linux/delay.h>
21#include <linux/start_kernel.h>
22#include <linux/sched.h>
23#include <linux/bootmem.h>
24#include <linux/module.h>
25#include <linux/mm.h>
26#include <linux/page-flags.h>
27#include <linux/highmem.h>
28#include <linux/smp.h>
29
30#include <xen/interface/xen.h>
31#include <xen/interface/physdev.h>
32#include <xen/interface/vcpu.h>
33#include <xen/interface/sched.h>
34#include <xen/features.h>
35#include <xen/page.h>
36
37#include <asm/paravirt.h>
38#include <asm/page.h>
39#include <asm/xen/hypercall.h>
40#include <asm/xen/hypervisor.h>
41#include <asm/fixmap.h>
42#include <asm/processor.h>
43#include <asm/setup.h>
44#include <asm/desc.h>
45#include <asm/pgtable.h>
46#include <asm/tlbflush.h>
47#include <asm/reboot.h>
48
49#include "xen-ops.h"
50#include "mmu.h"
51#include "multicalls.h"
52
53EXPORT_SYMBOL_GPL(hypercall_page);
54
55DEFINE_PER_CPU(enum paravirt_lazy_mode, xen_lazy_mode);
56
57DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu);
58DEFINE_PER_CPU(struct vcpu_info, xen_vcpu_info);
59DEFINE_PER_CPU(unsigned long, xen_cr3);
60
61struct start_info *xen_start_info;
62EXPORT_SYMBOL_GPL(xen_start_info);
63
64static /* __initdata */ struct shared_info dummy_shared_info;
65
66/*
67 * Point at some empty memory to start with. We map the real shared_info
68 * page as soon as fixmap is up and running.
69 */
70struct shared_info *HYPERVISOR_shared_info = (void *)&dummy_shared_info;
71
72/*
73 * Flag to determine whether vcpu info placement is available on all
74 * VCPUs. We assume it is to start with, and then set it to zero on
75 * the first failure. This is because it can succeed on some VCPUs
76 * and not others, since it can involve hypervisor memory allocation,
77 * or because the guest failed to guarantee all the appropriate
78 * constraints on all VCPUs (ie buffer can't cross a page boundary).
79 *
80 * Note that any particular CPU may be using a placed vcpu structure,
81 * but we can only optimise if the all are.
82 *
83 * 0: not available, 1: available
84 */
85static int have_vcpu_info_placement = 1;
86
87static void __init xen_vcpu_setup(int cpu)
88{
89 struct vcpu_register_vcpu_info info;
90 int err;
91 struct vcpu_info *vcpup;
92
93 per_cpu(xen_vcpu, cpu) = &HYPERVISOR_shared_info->vcpu_info[cpu];
94
95 if (!have_vcpu_info_placement)
96 return; /* already tested, not available */
97
98 vcpup = &per_cpu(xen_vcpu_info, cpu);
99
100 info.mfn = virt_to_mfn(vcpup);
101 info.offset = offset_in_page(vcpup);
102
103 printk(KERN_DEBUG "trying to map vcpu_info %d at %p, mfn %x, offset %d\n",
104 cpu, vcpup, info.mfn, info.offset);
105
106 /* Check to see if the hypervisor will put the vcpu_info
107 structure where we want it, which allows direct access via
108 a percpu-variable. */
109 err = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_info, cpu, &info);
110
111 if (err) {
112 printk(KERN_DEBUG "register_vcpu_info failed: err=%d\n", err);
113 have_vcpu_info_placement = 0;
114 } else {
115 /* This cpu is using the registered vcpu info, even if
116 later ones fail to. */
117 per_cpu(xen_vcpu, cpu) = vcpup;
118
119 printk(KERN_DEBUG "cpu %d using vcpu_info at %p\n",
120 cpu, vcpup);
121 }
122}
123
124static void __init xen_banner(void)
125{
126 printk(KERN_INFO "Booting paravirtualized kernel on %s\n",
127 paravirt_ops.name);
128 printk(KERN_INFO "Hypervisor signature: %s\n", xen_start_info->magic);
129}
130
131static void xen_cpuid(unsigned int *eax, unsigned int *ebx,
132 unsigned int *ecx, unsigned int *edx)
133{
134 unsigned maskedx = ~0;
135
136 /*
137 * Mask out inconvenient features, to try and disable as many
138 * unsupported kernel subsystems as possible.
139 */
140 if (*eax == 1)
141 maskedx = ~((1 << X86_FEATURE_APIC) | /* disable APIC */
142 (1 << X86_FEATURE_ACPI) | /* disable ACPI */
143 (1 << X86_FEATURE_ACC)); /* thermal monitoring */
144
145 asm(XEN_EMULATE_PREFIX "cpuid"
146 : "=a" (*eax),
147 "=b" (*ebx),
148 "=c" (*ecx),
149 "=d" (*edx)
150 : "0" (*eax), "2" (*ecx));
151 *edx &= maskedx;
152}
153
154static void xen_set_debugreg(int reg, unsigned long val)
155{
156 HYPERVISOR_set_debugreg(reg, val);
157}
158
159static unsigned long xen_get_debugreg(int reg)
160{
161 return HYPERVISOR_get_debugreg(reg);
162}
163
164static unsigned long xen_save_fl(void)
165{
166 struct vcpu_info *vcpu;
167 unsigned long flags;
168
169 vcpu = x86_read_percpu(xen_vcpu);
170
171 /* flag has opposite sense of mask */
172 flags = !vcpu->evtchn_upcall_mask;
173
174 /* convert to IF type flag
175 -0 -> 0x00000000
176 -1 -> 0xffffffff
177 */
178 return (-flags) & X86_EFLAGS_IF;
179}
180
181static void xen_restore_fl(unsigned long flags)
182{
183 struct vcpu_info *vcpu;
184
185 /* convert from IF type flag */
186 flags = !(flags & X86_EFLAGS_IF);
187
188 /* There's a one instruction preempt window here. We need to
189 make sure we're don't switch CPUs between getting the vcpu
190 pointer and updating the mask. */
191 preempt_disable();
192 vcpu = x86_read_percpu(xen_vcpu);
193 vcpu->evtchn_upcall_mask = flags;
194 preempt_enable_no_resched();
195
196 /* Doesn't matter if we get preempted here, because any
197 pending event will get dealt with anyway. */
198
199 if (flags == 0) {
200 preempt_check_resched();
201 barrier(); /* unmask then check (avoid races) */
202 if (unlikely(vcpu->evtchn_upcall_pending))
203 force_evtchn_callback();
204 }
205}
206
207static void xen_irq_disable(void)
208{
209 /* There's a one instruction preempt window here. We need to
210 make sure we're don't switch CPUs between getting the vcpu
211 pointer and updating the mask. */
212 preempt_disable();
213 x86_read_percpu(xen_vcpu)->evtchn_upcall_mask = 1;
214 preempt_enable_no_resched();
215}
216
217static void xen_irq_enable(void)
218{
219 struct vcpu_info *vcpu;
220
221 /* There's a one instruction preempt window here. We need to
222 make sure we're don't switch CPUs between getting the vcpu
223 pointer and updating the mask. */
224 preempt_disable();
225 vcpu = x86_read_percpu(xen_vcpu);
226 vcpu->evtchn_upcall_mask = 0;
227 preempt_enable_no_resched();
228
229 /* Doesn't matter if we get preempted here, because any
230 pending event will get dealt with anyway. */
231
232 barrier(); /* unmask then check (avoid races) */
233 if (unlikely(vcpu->evtchn_upcall_pending))
234 force_evtchn_callback();
235}
236
237static void xen_safe_halt(void)
238{
239 /* Blocking includes an implicit local_irq_enable(). */
240 if (HYPERVISOR_sched_op(SCHEDOP_block, 0) != 0)
241 BUG();
242}
243
244static void xen_halt(void)
245{
246 if (irqs_disabled())
247 HYPERVISOR_vcpu_op(VCPUOP_down, smp_processor_id(), NULL);
248 else
249 xen_safe_halt();
250}
251
252static void xen_set_lazy_mode(enum paravirt_lazy_mode mode)
253{
254 BUG_ON(preemptible());
255
256 switch (mode) {
257 case PARAVIRT_LAZY_NONE:
258 BUG_ON(x86_read_percpu(xen_lazy_mode) == PARAVIRT_LAZY_NONE);
259 break;
260
261 case PARAVIRT_LAZY_MMU:
262 case PARAVIRT_LAZY_CPU:
263 BUG_ON(x86_read_percpu(xen_lazy_mode) != PARAVIRT_LAZY_NONE);
264 break;
265
266 case PARAVIRT_LAZY_FLUSH:
267 /* flush if necessary, but don't change state */
268 if (x86_read_percpu(xen_lazy_mode) != PARAVIRT_LAZY_NONE)
269 xen_mc_flush();
270 return;
271 }
272
273 xen_mc_flush();
274 x86_write_percpu(xen_lazy_mode, mode);
275}
276
277static unsigned long xen_store_tr(void)
278{
279 return 0;
280}
281
282static void xen_set_ldt(const void *addr, unsigned entries)
283{
284 unsigned long linear_addr = (unsigned long)addr;
285 struct mmuext_op *op;
286 struct multicall_space mcs = xen_mc_entry(sizeof(*op));
287
288 op = mcs.args;
289 op->cmd = MMUEXT_SET_LDT;
290 if (linear_addr) {
291 /* ldt my be vmalloced, use arbitrary_virt_to_machine */
292 xmaddr_t maddr;
293 maddr = arbitrary_virt_to_machine((unsigned long)addr);
294 linear_addr = (unsigned long)maddr.maddr;
295 }
296 op->arg1.linear_addr = linear_addr;
297 op->arg2.nr_ents = entries;
298
299 MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF);
300
301 xen_mc_issue(PARAVIRT_LAZY_CPU);
302}
303
304static void xen_load_gdt(const struct Xgt_desc_struct *dtr)
305{
306 unsigned long *frames;
307 unsigned long va = dtr->address;
308 unsigned int size = dtr->size + 1;
309 unsigned pages = (size + PAGE_SIZE - 1) / PAGE_SIZE;
310 int f;
311 struct multicall_space mcs;
312
313 /* A GDT can be up to 64k in size, which corresponds to 8192
314 8-byte entries, or 16 4k pages.. */
315
316 BUG_ON(size > 65536);
317 BUG_ON(va & ~PAGE_MASK);
318
319 mcs = xen_mc_entry(sizeof(*frames) * pages);
320 frames = mcs.args;
321
322 for (f = 0; va < dtr->address + size; va += PAGE_SIZE, f++) {
323 frames[f] = virt_to_mfn(va);
324 make_lowmem_page_readonly((void *)va);
325 }
326
327 MULTI_set_gdt(mcs.mc, frames, size / sizeof(struct desc_struct));
328
329 xen_mc_issue(PARAVIRT_LAZY_CPU);
330}
331
332static void load_TLS_descriptor(struct thread_struct *t,
333 unsigned int cpu, unsigned int i)
334{
335 struct desc_struct *gdt = get_cpu_gdt_table(cpu);
336 xmaddr_t maddr = virt_to_machine(&gdt[GDT_ENTRY_TLS_MIN+i]);
337 struct multicall_space mc = __xen_mc_entry(0);
338
339 MULTI_update_descriptor(mc.mc, maddr.maddr, t->tls_array[i]);
340}
341
342static void xen_load_tls(struct thread_struct *t, unsigned int cpu)
343{
344 xen_mc_batch();
345
346 load_TLS_descriptor(t, cpu, 0);
347 load_TLS_descriptor(t, cpu, 1);
348 load_TLS_descriptor(t, cpu, 2);
349
350 xen_mc_issue(PARAVIRT_LAZY_CPU);
351
352 /*
353 * XXX sleazy hack: If we're being called in a lazy-cpu zone,
354 * it means we're in a context switch, and %gs has just been
355 * saved. This means we can zero it out to prevent faults on
356 * exit from the hypervisor if the next process has no %gs.
357 * Either way, it has been saved, and the new value will get
358 * loaded properly. This will go away as soon as Xen has been
359 * modified to not save/restore %gs for normal hypercalls.
360 */
361 if (xen_get_lazy_mode() == PARAVIRT_LAZY_CPU)
362 loadsegment(gs, 0);
363}
364
365static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum,
366 u32 low, u32 high)
367{
368 unsigned long lp = (unsigned long)&dt[entrynum];
369 xmaddr_t mach_lp = virt_to_machine(lp);
370 u64 entry = (u64)high << 32 | low;
371
372 preempt_disable();
373
374 xen_mc_flush();
375 if (HYPERVISOR_update_descriptor(mach_lp.maddr, entry))
376 BUG();
377
378 preempt_enable();
379}
380
381static int cvt_gate_to_trap(int vector, u32 low, u32 high,
382 struct trap_info *info)
383{
384 u8 type, dpl;
385
386 type = (high >> 8) & 0x1f;
387 dpl = (high >> 13) & 3;
388
389 if (type != 0xf && type != 0xe)
390 return 0;
391
392 info->vector = vector;
393 info->address = (high & 0xffff0000) | (low & 0x0000ffff);
394 info->cs = low >> 16;
395 info->flags = dpl;
396 /* interrupt gates clear IF */
397 if (type == 0xe)
398 info->flags |= 4;
399
400 return 1;
401}
402
403/* Locations of each CPU's IDT */
404static DEFINE_PER_CPU(struct Xgt_desc_struct, idt_desc);
405
406/* Set an IDT entry. If the entry is part of the current IDT, then
407 also update Xen. */
408static void xen_write_idt_entry(struct desc_struct *dt, int entrynum,
409 u32 low, u32 high)
410{
411 unsigned long p = (unsigned long)&dt[entrynum];
412 unsigned long start, end;
413
414 preempt_disable();
415
416 start = __get_cpu_var(idt_desc).address;
417 end = start + __get_cpu_var(idt_desc).size + 1;
418
419 xen_mc_flush();
420
421 write_dt_entry(dt, entrynum, low, high);
422
423 if (p >= start && (p + 8) <= end) {
424 struct trap_info info[2];
425
426 info[1].address = 0;
427
428 if (cvt_gate_to_trap(entrynum, low, high, &info[0]))
429 if (HYPERVISOR_set_trap_table(info))
430 BUG();
431 }
432
433 preempt_enable();
434}
435
436static void xen_convert_trap_info(const struct Xgt_desc_struct *desc,
437 struct trap_info *traps)
438{
439 unsigned in, out, count;
440
441 count = (desc->size+1) / 8;
442 BUG_ON(count > 256);
443
444 for (in = out = 0; in < count; in++) {
445 const u32 *entry = (u32 *)(desc->address + in * 8);
446
447 if (cvt_gate_to_trap(in, entry[0], entry[1], &traps[out]))
448 out++;
449 }
450 traps[out].address = 0;
451}
452
453void xen_copy_trap_info(struct trap_info *traps)
454{
455 const struct Xgt_desc_struct *desc = &__get_cpu_var(idt_desc);
456
457 xen_convert_trap_info(desc, traps);
458}
459
460/* Load a new IDT into Xen. In principle this can be per-CPU, so we
461 hold a spinlock to protect the static traps[] array (static because
462 it avoids allocation, and saves stack space). */
463static void xen_load_idt(const struct Xgt_desc_struct *desc)
464{
465 static DEFINE_SPINLOCK(lock);
466 static struct trap_info traps[257];
467
468 spin_lock(&lock);
469
470 __get_cpu_var(idt_desc) = *desc;
471
472 xen_convert_trap_info(desc, traps);
473
474 xen_mc_flush();
475 if (HYPERVISOR_set_trap_table(traps))
476 BUG();
477
478 spin_unlock(&lock);
479}
480
481/* Write a GDT descriptor entry. Ignore LDT descriptors, since
482 they're handled differently. */
483static void xen_write_gdt_entry(struct desc_struct *dt, int entry,
484 u32 low, u32 high)
485{
486 preempt_disable();
487
488 switch ((high >> 8) & 0xff) {
489 case DESCTYPE_LDT:
490 case DESCTYPE_TSS:
491 /* ignore */
492 break;
493
494 default: {
495 xmaddr_t maddr = virt_to_machine(&dt[entry]);
496 u64 desc = (u64)high << 32 | low;
497
498 xen_mc_flush();
499 if (HYPERVISOR_update_descriptor(maddr.maddr, desc))
500 BUG();
501 }
502
503 }
504
505 preempt_enable();
506}
507
508static void xen_load_esp0(struct tss_struct *tss,
509 struct thread_struct *thread)
510{
511 struct multicall_space mcs = xen_mc_entry(0);
512 MULTI_stack_switch(mcs.mc, __KERNEL_DS, thread->esp0);
513 xen_mc_issue(PARAVIRT_LAZY_CPU);
514}
515
516static void xen_set_iopl_mask(unsigned mask)
517{
518 struct physdev_set_iopl set_iopl;
519
520 /* Force the change at ring 0. */
521 set_iopl.iopl = (mask == 0) ? 1 : (mask >> 12) & 3;
522 HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
523}
524
525static void xen_io_delay(void)
526{
527}
528
529#ifdef CONFIG_X86_LOCAL_APIC
530static unsigned long xen_apic_read(unsigned long reg)
531{
532 return 0;
533}
534
535static void xen_apic_write(unsigned long reg, unsigned long val)
536{
537 /* Warn to see if there's any stray references */
538 WARN_ON(1);
539}
540#endif
541
542static void xen_flush_tlb(void)
543{
544 struct mmuext_op *op;
545 struct multicall_space mcs = xen_mc_entry(sizeof(*op));
546
547 op = mcs.args;
548 op->cmd = MMUEXT_TLB_FLUSH_LOCAL;
549 MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF);
550
551 xen_mc_issue(PARAVIRT_LAZY_MMU);
552}
553
554static void xen_flush_tlb_single(unsigned long addr)
555{
556 struct mmuext_op *op;
557 struct multicall_space mcs = xen_mc_entry(sizeof(*op));
558
559 op = mcs.args;
560 op->cmd = MMUEXT_INVLPG_LOCAL;
561 op->arg1.linear_addr = addr & PAGE_MASK;
562 MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF);
563
564 xen_mc_issue(PARAVIRT_LAZY_MMU);
565}
566
567static void xen_flush_tlb_others(const cpumask_t *cpus, struct mm_struct *mm,
568 unsigned long va)
569{
570 struct {
571 struct mmuext_op op;
572 cpumask_t mask;
573 } *args;
574 cpumask_t cpumask = *cpus;
575 struct multicall_space mcs;
576
577 /*
578 * A couple of (to be removed) sanity checks:
579 *
580 * - current CPU must not be in mask
581 * - mask must exist :)
582 */
583 BUG_ON(cpus_empty(cpumask));
584 BUG_ON(cpu_isset(smp_processor_id(), cpumask));
585 BUG_ON(!mm);
586
587 /* If a CPU which we ran on has gone down, OK. */
588 cpus_and(cpumask, cpumask, cpu_online_map);
589 if (cpus_empty(cpumask))
590 return;
591
592 mcs = xen_mc_entry(sizeof(*args));
593 args = mcs.args;
594 args->mask = cpumask;
595 args->op.arg2.vcpumask = &args->mask;
596
597 if (va == TLB_FLUSH_ALL) {
598 args->op.cmd = MMUEXT_TLB_FLUSH_MULTI;
599 } else {
600 args->op.cmd = MMUEXT_INVLPG_MULTI;
601 args->op.arg1.linear_addr = va;
602 }
603
604 MULTI_mmuext_op(mcs.mc, &args->op, 1, NULL, DOMID_SELF);
605
606 xen_mc_issue(PARAVIRT_LAZY_MMU);
607}
608
609static void xen_write_cr2(unsigned long cr2)
610{
611 x86_read_percpu(xen_vcpu)->arch.cr2 = cr2;
612}
613
614static unsigned long xen_read_cr2(void)
615{
616 return x86_read_percpu(xen_vcpu)->arch.cr2;
617}
618
619static unsigned long xen_read_cr2_direct(void)
620{
621 return x86_read_percpu(xen_vcpu_info.arch.cr2);
622}
623
624static void xen_write_cr4(unsigned long cr4)
625{
626 /* never allow TSC to be disabled */
627 native_write_cr4(cr4 & ~X86_CR4_TSD);
628}
629
630static unsigned long xen_read_cr3(void)
631{
632 return x86_read_percpu(xen_cr3);
633}
634
635static void xen_write_cr3(unsigned long cr3)
636{
637 BUG_ON(preemptible());
638
639 if (cr3 == x86_read_percpu(xen_cr3)) {
640 /* just a simple tlb flush */
641 xen_flush_tlb();
642 return;
643 }
644
645 x86_write_percpu(xen_cr3, cr3);
646
647
648 {
649 struct mmuext_op *op;
650 struct multicall_space mcs = xen_mc_entry(sizeof(*op));
651 unsigned long mfn = pfn_to_mfn(PFN_DOWN(cr3));
652
653 op = mcs.args;
654 op->cmd = MMUEXT_NEW_BASEPTR;
655 op->arg1.mfn = mfn;
656
657 MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF);
658
659 xen_mc_issue(PARAVIRT_LAZY_CPU);
660 }
661}
662
663/* Early in boot, while setting up the initial pagetable, assume
664 everything is pinned. */
665static __init void xen_alloc_pt_init(struct mm_struct *mm, u32 pfn)
666{
667 BUG_ON(mem_map); /* should only be used early */
668 make_lowmem_page_readonly(__va(PFN_PHYS(pfn)));
669}
670
671/* This needs to make sure the new pte page is pinned iff its being
672 attached to a pinned pagetable. */
673static void xen_alloc_pt(struct mm_struct *mm, u32 pfn)
674{
675 struct page *page = pfn_to_page(pfn);
676
677 if (PagePinned(virt_to_page(mm->pgd))) {
678 SetPagePinned(page);
679
680 if (!PageHighMem(page))
681 make_lowmem_page_readonly(__va(PFN_PHYS(pfn)));
682 else
683 /* make sure there are no stray mappings of
684 this page */
685 kmap_flush_unused();
686 }
687}
688
689/* This should never happen until we're OK to use struct page */
690static void xen_release_pt(u32 pfn)
691{
692 struct page *page = pfn_to_page(pfn);
693
694 if (PagePinned(page)) {
695 if (!PageHighMem(page))
696 make_lowmem_page_readwrite(__va(PFN_PHYS(pfn)));
697 }
698}
699
700#ifdef CONFIG_HIGHPTE
701static void *xen_kmap_atomic_pte(struct page *page, enum km_type type)
702{
703 pgprot_t prot = PAGE_KERNEL;
704
705 if (PagePinned(page))
706 prot = PAGE_KERNEL_RO;
707
708 if (0 && PageHighMem(page))
709 printk("mapping highpte %lx type %d prot %s\n",
710 page_to_pfn(page), type,
711 (unsigned long)pgprot_val(prot) & _PAGE_RW ? "WRITE" : "READ");
712
713 return kmap_atomic_prot(page, type, prot);
714}
715#endif
716
717static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte)
718{
719 /* If there's an existing pte, then don't allow _PAGE_RW to be set */
720 if (pte_val_ma(*ptep) & _PAGE_PRESENT)
721 pte = __pte_ma(((pte_val_ma(*ptep) & _PAGE_RW) | ~_PAGE_RW) &
722 pte_val_ma(pte));
723
724 return pte;
725}
726
727/* Init-time set_pte while constructing initial pagetables, which
728 doesn't allow RO pagetable pages to be remapped RW */
729static __init void xen_set_pte_init(pte_t *ptep, pte_t pte)
730{
731 pte = mask_rw_pte(ptep, pte);
732
733 xen_set_pte(ptep, pte);
734}
735
736static __init void xen_pagetable_setup_start(pgd_t *base)
737{
738 pgd_t *xen_pgd = (pgd_t *)xen_start_info->pt_base;
739
740 /* special set_pte for pagetable initialization */
741 paravirt_ops.set_pte = xen_set_pte_init;
742
743 init_mm.pgd = base;
744 /*
745 * copy top-level of Xen-supplied pagetable into place. For
746 * !PAE we can use this as-is, but for PAE it is a stand-in
747 * while we copy the pmd pages.
748 */
749 memcpy(base, xen_pgd, PTRS_PER_PGD * sizeof(pgd_t));
750
751 if (PTRS_PER_PMD > 1) {
752 int i;
753 /*
754 * For PAE, need to allocate new pmds, rather than
755 * share Xen's, since Xen doesn't like pmd's being
756 * shared between address spaces.
757 */
758 for (i = 0; i < PTRS_PER_PGD; i++) {
759 if (pgd_val_ma(xen_pgd[i]) & _PAGE_PRESENT) {
760 pmd_t *pmd = (pmd_t *)alloc_bootmem_low_pages(PAGE_SIZE);
761
762 memcpy(pmd, (void *)pgd_page_vaddr(xen_pgd[i]),
763 PAGE_SIZE);
764
765 make_lowmem_page_readonly(pmd);
766
767 set_pgd(&base[i], __pgd(1 + __pa(pmd)));
768 } else
769 pgd_clear(&base[i]);
770 }
771 }
772
773 /* make sure zero_page is mapped RO so we can use it in pagetables */
774 make_lowmem_page_readonly(empty_zero_page);
775 make_lowmem_page_readonly(base);
776 /*
777 * Switch to new pagetable. This is done before
778 * pagetable_init has done anything so that the new pages
779 * added to the table can be prepared properly for Xen.
780 */
781 xen_write_cr3(__pa(base));
782}
783
784static __init void xen_pagetable_setup_done(pgd_t *base)
785{
786 /* This will work as long as patching hasn't happened yet
787 (which it hasn't) */
788 paravirt_ops.alloc_pt = xen_alloc_pt;
789 paravirt_ops.set_pte = xen_set_pte;
790
791 if (!xen_feature(XENFEAT_auto_translated_physmap)) {
792 /*
793 * Create a mapping for the shared info page.
794 * Should be set_fixmap(), but shared_info is a machine
795 * address with no corresponding pseudo-phys address.
796 */
797 set_pte_mfn(fix_to_virt(FIX_PARAVIRT_BOOTMAP),
798 PFN_DOWN(xen_start_info->shared_info),
799 PAGE_KERNEL);
800
801 HYPERVISOR_shared_info =
802 (struct shared_info *)fix_to_virt(FIX_PARAVIRT_BOOTMAP);
803
804 } else
805 HYPERVISOR_shared_info =
806 (struct shared_info *)__va(xen_start_info->shared_info);
807
808 /* Actually pin the pagetable down, but we can't set PG_pinned
809 yet because the page structures don't exist yet. */
810 {
811 struct mmuext_op op;
812#ifdef CONFIG_X86_PAE
813 op.cmd = MMUEXT_PIN_L3_TABLE;
814#else
815 op.cmd = MMUEXT_PIN_L3_TABLE;
816#endif
817 op.arg1.mfn = pfn_to_mfn(PFN_DOWN(__pa(base)));
818 if (HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF))
819 BUG();
820 }
821}
822
823/* This is called once we have the cpu_possible_map */
824void __init xen_setup_vcpu_info_placement(void)
825{
826 int cpu;
827
828 for_each_possible_cpu(cpu)
829 xen_vcpu_setup(cpu);
830
831 /* xen_vcpu_setup managed to place the vcpu_info within the
832 percpu area for all cpus, so make use of it */
833 if (have_vcpu_info_placement) {
834 printk(KERN_INFO "Xen: using vcpu_info placement\n");
835
836 paravirt_ops.save_fl = xen_save_fl_direct;
837 paravirt_ops.restore_fl = xen_restore_fl_direct;
838 paravirt_ops.irq_disable = xen_irq_disable_direct;
839 paravirt_ops.irq_enable = xen_irq_enable_direct;
840 paravirt_ops.read_cr2 = xen_read_cr2_direct;
841 paravirt_ops.iret = xen_iret_direct;
842 }
843}
844
845static unsigned xen_patch(u8 type, u16 clobbers, void *insns, unsigned len)
846{
847 char *start, *end, *reloc;
848 unsigned ret;
849
850 start = end = reloc = NULL;
851
852#define SITE(x) \
853 case PARAVIRT_PATCH(x): \
854 if (have_vcpu_info_placement) { \
855 start = (char *)xen_##x##_direct; \
856 end = xen_##x##_direct_end; \
857 reloc = xen_##x##_direct_reloc; \
858 } \
859 goto patch_site
860
861 switch (type) {
862 SITE(irq_enable);
863 SITE(irq_disable);
864 SITE(save_fl);
865 SITE(restore_fl);
866#undef SITE
867
868 patch_site:
869 if (start == NULL || (end-start) > len)
870 goto default_patch;
871
872 ret = paravirt_patch_insns(insns, len, start, end);
873
874 /* Note: because reloc is assigned from something that
875 appears to be an array, gcc assumes it's non-null,
876 but doesn't know its relationship with start and
877 end. */
878 if (reloc > start && reloc < end) {
879 int reloc_off = reloc - start;
880 long *relocp = (long *)(insns + reloc_off);
881 long delta = start - (char *)insns;
882
883 *relocp += delta;
884 }
885 break;
886
887 default_patch:
888 default:
889 ret = paravirt_patch_default(type, clobbers, insns, len);
890 break;
891 }
892
893 return ret;
894}
895
896static const struct paravirt_ops xen_paravirt_ops __initdata = {
897 .paravirt_enabled = 1,
898 .shared_kernel_pmd = 0,
899
900 .name = "Xen",
901 .banner = xen_banner,
902
903 .patch = xen_patch,
904
905 .memory_setup = xen_memory_setup,
906 .arch_setup = xen_arch_setup,
907 .init_IRQ = xen_init_IRQ,
908 .post_allocator_init = xen_mark_init_mm_pinned,
909
910 .time_init = xen_time_init,
911 .set_wallclock = xen_set_wallclock,
912 .get_wallclock = xen_get_wallclock,
913 .get_cpu_khz = xen_cpu_khz,
914 .sched_clock = xen_sched_clock,
915
916 .cpuid = xen_cpuid,
917
918 .set_debugreg = xen_set_debugreg,
919 .get_debugreg = xen_get_debugreg,
920
921 .clts = native_clts,
922
923 .read_cr0 = native_read_cr0,
924 .write_cr0 = native_write_cr0,
925
926 .read_cr2 = xen_read_cr2,
927 .write_cr2 = xen_write_cr2,
928
929 .read_cr3 = xen_read_cr3,
930 .write_cr3 = xen_write_cr3,
931
932 .read_cr4 = native_read_cr4,
933 .read_cr4_safe = native_read_cr4_safe,
934 .write_cr4 = xen_write_cr4,
935
936 .save_fl = xen_save_fl,
937 .restore_fl = xen_restore_fl,
938 .irq_disable = xen_irq_disable,
939 .irq_enable = xen_irq_enable,
940 .safe_halt = xen_safe_halt,
941 .halt = xen_halt,
942 .wbinvd = native_wbinvd,
943
944 .read_msr = native_read_msr_safe,
945 .write_msr = native_write_msr_safe,
946 .read_tsc = native_read_tsc,
947 .read_pmc = native_read_pmc,
948
949 .iret = (void *)&hypercall_page[__HYPERVISOR_iret],
950 .irq_enable_sysexit = NULL, /* never called */
951
952 .load_tr_desc = paravirt_nop,
953 .set_ldt = xen_set_ldt,
954 .load_gdt = xen_load_gdt,
955 .load_idt = xen_load_idt,
956 .load_tls = xen_load_tls,
957
958 .store_gdt = native_store_gdt,
959 .store_idt = native_store_idt,
960 .store_tr = xen_store_tr,
961
962 .write_ldt_entry = xen_write_ldt_entry,
963 .write_gdt_entry = xen_write_gdt_entry,
964 .write_idt_entry = xen_write_idt_entry,
965 .load_esp0 = xen_load_esp0,
966
967 .set_iopl_mask = xen_set_iopl_mask,
968 .io_delay = xen_io_delay,
969
970#ifdef CONFIG_X86_LOCAL_APIC
971 .apic_write = xen_apic_write,
972 .apic_write_atomic = xen_apic_write,
973 .apic_read = xen_apic_read,
974 .setup_boot_clock = paravirt_nop,
975 .setup_secondary_clock = paravirt_nop,
976 .startup_ipi_hook = paravirt_nop,
977#endif
978
979 .flush_tlb_user = xen_flush_tlb,
980 .flush_tlb_kernel = xen_flush_tlb,
981 .flush_tlb_single = xen_flush_tlb_single,
982 .flush_tlb_others = xen_flush_tlb_others,
983
984 .pte_update = paravirt_nop,
985 .pte_update_defer = paravirt_nop,
986
987 .pagetable_setup_start = xen_pagetable_setup_start,
988 .pagetable_setup_done = xen_pagetable_setup_done,
989
990 .alloc_pt = xen_alloc_pt_init,
991 .release_pt = xen_release_pt,
992 .alloc_pd = paravirt_nop,
993 .alloc_pd_clone = paravirt_nop,
994 .release_pd = paravirt_nop,
995
996#ifdef CONFIG_HIGHPTE
997 .kmap_atomic_pte = xen_kmap_atomic_pte,
998#endif
999
1000 .set_pte = NULL, /* see xen_pagetable_setup_* */
1001 .set_pte_at = xen_set_pte_at,
1002 .set_pmd = xen_set_pmd,
1003
1004 .pte_val = xen_pte_val,
1005 .pgd_val = xen_pgd_val,
1006
1007 .make_pte = xen_make_pte,
1008 .make_pgd = xen_make_pgd,
1009
1010#ifdef CONFIG_X86_PAE
1011 .set_pte_atomic = xen_set_pte_atomic,
1012 .set_pte_present = xen_set_pte_at,
1013 .set_pud = xen_set_pud,
1014 .pte_clear = xen_pte_clear,
1015 .pmd_clear = xen_pmd_clear,
1016
1017 .make_pmd = xen_make_pmd,
1018 .pmd_val = xen_pmd_val,
1019#endif /* PAE */
1020
1021 .activate_mm = xen_activate_mm,
1022 .dup_mmap = xen_dup_mmap,
1023 .exit_mmap = xen_exit_mmap,
1024
1025 .set_lazy_mode = xen_set_lazy_mode,
1026};
1027
1028#ifdef CONFIG_SMP
1029static const struct smp_ops xen_smp_ops __initdata = {
1030 .smp_prepare_boot_cpu = xen_smp_prepare_boot_cpu,
1031 .smp_prepare_cpus = xen_smp_prepare_cpus,
1032 .cpu_up = xen_cpu_up,
1033 .smp_cpus_done = xen_smp_cpus_done,
1034
1035 .smp_send_stop = xen_smp_send_stop,
1036 .smp_send_reschedule = xen_smp_send_reschedule,
1037 .smp_call_function_mask = xen_smp_call_function_mask,
1038};
1039#endif /* CONFIG_SMP */
1040
1041static void xen_reboot(int reason)
1042{
1043#ifdef CONFIG_SMP
1044 smp_send_stop();
1045#endif
1046
1047 if (HYPERVISOR_sched_op(SCHEDOP_shutdown, reason))
1048 BUG();
1049}
1050
1051static void xen_restart(char *msg)
1052{
1053 xen_reboot(SHUTDOWN_reboot);
1054}
1055
1056static void xen_emergency_restart(void)
1057{
1058 xen_reboot(SHUTDOWN_reboot);
1059}
1060
1061static void xen_machine_halt(void)
1062{
1063 xen_reboot(SHUTDOWN_poweroff);
1064}
1065
1066static void xen_crash_shutdown(struct pt_regs *regs)
1067{
1068 xen_reboot(SHUTDOWN_crash);
1069}
1070
1071static const struct machine_ops __initdata xen_machine_ops = {
1072 .restart = xen_restart,
1073 .halt = xen_machine_halt,
1074 .power_off = xen_machine_halt,
1075 .shutdown = xen_machine_halt,
1076 .crash_shutdown = xen_crash_shutdown,
1077 .emergency_restart = xen_emergency_restart,
1078};
1079
1080
1081/* First C function to be called on Xen boot */
1082asmlinkage void __init xen_start_kernel(void)
1083{
1084 pgd_t *pgd;
1085
1086 if (!xen_start_info)
1087 return;
1088
1089 BUG_ON(memcmp(xen_start_info->magic, "xen-3.0", 7) != 0);
1090
1091 /* Install Xen paravirt ops */
1092 paravirt_ops = xen_paravirt_ops;
1093 machine_ops = xen_machine_ops;
1094
1095#ifdef CONFIG_SMP
1096 smp_ops = xen_smp_ops;
1097#endif
1098
1099 xen_setup_features();
1100
1101 /* Get mfn list */
1102 if (!xen_feature(XENFEAT_auto_translated_physmap))
1103 phys_to_machine_mapping = (unsigned long *)xen_start_info->mfn_list;
1104
1105 pgd = (pgd_t *)xen_start_info->pt_base;
1106
1107 init_pg_tables_end = __pa(pgd) + xen_start_info->nr_pt_frames*PAGE_SIZE;
1108
1109 init_mm.pgd = pgd; /* use the Xen pagetables to start */
1110
1111 /* keep using Xen gdt for now; no urgent need to change it */
1112
1113 x86_write_percpu(xen_cr3, __pa(pgd));
1114
1115#ifdef CONFIG_SMP
1116 /* Don't do the full vcpu_info placement stuff until we have a
1117 possible map. */
1118 per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0];
1119#else
1120 /* May as well do it now, since there's no good time to call
1121 it later on UP. */
1122 xen_setup_vcpu_info_placement();
1123#endif
1124
1125 paravirt_ops.kernel_rpl = 1;
1126 if (xen_feature(XENFEAT_supervisor_mode_kernel))
1127 paravirt_ops.kernel_rpl = 0;
1128
1129 /* set the limit of our address space */
1130 reserve_top_address(-HYPERVISOR_VIRT_START + 2 * PAGE_SIZE);
1131
1132 /* set up basic CPUID stuff */
1133 cpu_detect(&new_cpu_data);
1134 new_cpu_data.hard_math = 1;
1135 new_cpu_data.x86_capability[0] = cpuid_edx(1);
1136
1137 /* Poke various useful things into boot_params */
1138 LOADER_TYPE = (9 << 4) | 0;
1139 INITRD_START = xen_start_info->mod_start ? __pa(xen_start_info->mod_start) : 0;
1140 INITRD_SIZE = xen_start_info->mod_len;
1141
1142 /* Start the world */
1143 start_kernel();
1144}
diff --git a/arch/i386/xen/events.c b/arch/i386/xen/events.c
new file mode 100644
index 0000000000..8904acc20f
--- /dev/null
+++ b/arch/i386/xen/events.c
@@ -0,0 +1,590 @@
1/*
2 * Xen event channels
3 *
4 * Xen models interrupts with abstract event channels. Because each
5 * domain gets 1024 event channels, but NR_IRQ is not that large, we
6 * must dynamically map irqs<->event channels. The event channels
7 * interface with the rest of the kernel by defining a xen interrupt
8 * chip. When an event is recieved, it is mapped to an irq and sent
9 * through the normal interrupt processing path.
10 *
11 * There are four kinds of events which can be mapped to an event
12 * channel:
13 *
14 * 1. Inter-domain notifications. This includes all the virtual
15 * device events, since they're driven by front-ends in another domain
16 * (typically dom0).
17 * 2. VIRQs, typically used for timers. These are per-cpu events.
18 * 3. IPIs.
19 * 4. Hardware interrupts. Not supported at present.
20 *
21 * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007
22 */
23
24#include <linux/linkage.h>
25#include <linux/interrupt.h>
26#include <linux/irq.h>
27#include <linux/module.h>
28#include <linux/string.h>
29
30#include <asm/ptrace.h>
31#include <asm/irq.h>
32#include <asm/sync_bitops.h>
33#include <asm/xen/hypercall.h>
34
35#include <xen/events.h>
36#include <xen/interface/xen.h>
37#include <xen/interface/event_channel.h>
38
39#include "xen-ops.h"
40
41/*
42 * This lock protects updates to the following mapping and reference-count
43 * arrays. The lock does not need to be acquired to read the mapping tables.
44 */
45static DEFINE_SPINLOCK(irq_mapping_update_lock);
46
47/* IRQ <-> VIRQ mapping. */
48static DEFINE_PER_CPU(int, virq_to_irq[NR_VIRQS]) = {[0 ... NR_VIRQS-1] = -1};
49
50/* IRQ <-> IPI mapping */
51static DEFINE_PER_CPU(int, ipi_to_irq[XEN_NR_IPIS]) = {[0 ... XEN_NR_IPIS-1] = -1};
52
53/* Packed IRQ information: binding type, sub-type index, and event channel. */
54struct packed_irq
55{
56 unsigned short evtchn;
57 unsigned char index;
58 unsigned char type;
59};
60
61static struct packed_irq irq_info[NR_IRQS];
62
63/* Binding types. */
64enum {
65 IRQT_UNBOUND,
66 IRQT_PIRQ,
67 IRQT_VIRQ,
68 IRQT_IPI,
69 IRQT_EVTCHN
70};
71
72/* Convenient shorthand for packed representation of an unbound IRQ. */
73#define IRQ_UNBOUND mk_irq_info(IRQT_UNBOUND, 0, 0)
74
75static int evtchn_to_irq[NR_EVENT_CHANNELS] = {
76 [0 ... NR_EVENT_CHANNELS-1] = -1
77};
78static unsigned long cpu_evtchn_mask[NR_CPUS][NR_EVENT_CHANNELS/BITS_PER_LONG];
79static u8 cpu_evtchn[NR_EVENT_CHANNELS];
80
81/* Reference counts for bindings to IRQs. */
82static int irq_bindcount[NR_IRQS];
83
84/* Xen will never allocate port zero for any purpose. */
85#define VALID_EVTCHN(chn) ((chn) != 0)
86
87/*
88 * Force a proper event-channel callback from Xen after clearing the
89 * callback mask. We do this in a very simple manner, by making a call
90 * down into Xen. The pending flag will be checked by Xen on return.
91 */
92void force_evtchn_callback(void)
93{
94 (void)HYPERVISOR_xen_version(0, NULL);
95}
96EXPORT_SYMBOL_GPL(force_evtchn_callback);
97
98static struct irq_chip xen_dynamic_chip;
99
100/* Constructor for packed IRQ information. */
101static inline struct packed_irq mk_irq_info(u32 type, u32 index, u32 evtchn)
102{
103 return (struct packed_irq) { evtchn, index, type };
104}
105
106/*
107 * Accessors for packed IRQ information.
108 */
109static inline unsigned int evtchn_from_irq(int irq)
110{
111 return irq_info[irq].evtchn;
112}
113
114static inline unsigned int index_from_irq(int irq)
115{
116 return irq_info[irq].index;
117}
118
119static inline unsigned int type_from_irq(int irq)
120{
121 return irq_info[irq].type;
122}
123
124static inline unsigned long active_evtchns(unsigned int cpu,
125 struct shared_info *sh,
126 unsigned int idx)
127{
128 return (sh->evtchn_pending[idx] &
129 cpu_evtchn_mask[cpu][idx] &
130 ~sh->evtchn_mask[idx]);
131}
132
133static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu)
134{
135 int irq = evtchn_to_irq[chn];
136
137 BUG_ON(irq == -1);
138#ifdef CONFIG_SMP
139 irq_desc[irq].affinity = cpumask_of_cpu(cpu);
140#endif
141
142 __clear_bit(chn, cpu_evtchn_mask[cpu_evtchn[chn]]);
143 __set_bit(chn, cpu_evtchn_mask[cpu]);
144
145 cpu_evtchn[chn] = cpu;
146}
147
148static void init_evtchn_cpu_bindings(void)
149{
150#ifdef CONFIG_SMP
151 int i;
152 /* By default all event channels notify CPU#0. */
153 for (i = 0; i < NR_IRQS; i++)
154 irq_desc[i].affinity = cpumask_of_cpu(0);
155#endif
156
157 memset(cpu_evtchn, 0, sizeof(cpu_evtchn));
158 memset(cpu_evtchn_mask[0], ~0, sizeof(cpu_evtchn_mask[0]));
159}
160
161static inline unsigned int cpu_from_evtchn(unsigned int evtchn)
162{
163 return cpu_evtchn[evtchn];
164}
165
166static inline void clear_evtchn(int port)
167{
168 struct shared_info *s = HYPERVISOR_shared_info;
169 sync_clear_bit(port, &s->evtchn_pending[0]);
170}
171
172static inline void set_evtchn(int port)
173{
174 struct shared_info *s = HYPERVISOR_shared_info;
175 sync_set_bit(port, &s->evtchn_pending[0]);
176}
177
178
179/**
180 * notify_remote_via_irq - send event to remote end of event channel via irq
181 * @irq: irq of event channel to send event to
182 *
183 * Unlike notify_remote_via_evtchn(), this is safe to use across
184 * save/restore. Notifications on a broken connection are silently
185 * dropped.
186 */
187void notify_remote_via_irq(int irq)
188{
189 int evtchn = evtchn_from_irq(irq);
190
191 if (VALID_EVTCHN(evtchn))
192 notify_remote_via_evtchn(evtchn);
193}
194EXPORT_SYMBOL_GPL(notify_remote_via_irq);
195
196static void mask_evtchn(int port)
197{
198 struct shared_info *s = HYPERVISOR_shared_info;
199 sync_set_bit(port, &s->evtchn_mask[0]);
200}
201
202static void unmask_evtchn(int port)
203{
204 struct shared_info *s = HYPERVISOR_shared_info;
205 unsigned int cpu = get_cpu();
206
207 BUG_ON(!irqs_disabled());
208
209 /* Slow path (hypercall) if this is a non-local port. */
210 if (unlikely(cpu != cpu_from_evtchn(port))) {
211 struct evtchn_unmask unmask = { .port = port };
212 (void)HYPERVISOR_event_channel_op(EVTCHNOP_unmask, &unmask);
213 } else {
214 struct vcpu_info *vcpu_info = __get_cpu_var(xen_vcpu);
215
216 sync_clear_bit(port, &s->evtchn_mask[0]);
217
218 /*
219 * The following is basically the equivalent of
220 * 'hw_resend_irq'. Just like a real IO-APIC we 'lose
221 * the interrupt edge' if the channel is masked.
222 */
223 if (sync_test_bit(port, &s->evtchn_pending[0]) &&
224 !sync_test_and_set_bit(port / BITS_PER_LONG,
225 &vcpu_info->evtchn_pending_sel))
226 vcpu_info->evtchn_upcall_pending = 1;
227 }
228
229 put_cpu();
230}
231
232static int find_unbound_irq(void)
233{
234 int irq;
235
236 /* Only allocate from dynirq range */
237 for (irq = 0; irq < NR_IRQS; irq++)
238 if (irq_bindcount[irq] == 0)
239 break;
240
241 if (irq == NR_IRQS)
242 panic("No available IRQ to bind to: increase NR_IRQS!\n");
243
244 return irq;
245}
246
247int bind_evtchn_to_irq(unsigned int evtchn)
248{
249 int irq;
250
251 spin_lock(&irq_mapping_update_lock);
252
253 irq = evtchn_to_irq[evtchn];
254
255 if (irq == -1) {
256 irq = find_unbound_irq();
257
258 dynamic_irq_init(irq);
259 set_irq_chip_and_handler_name(irq, &xen_dynamic_chip,
260 handle_level_irq, "event");
261
262 evtchn_to_irq[evtchn] = irq;
263 irq_info[irq] = mk_irq_info(IRQT_EVTCHN, 0, evtchn);
264 }
265
266 irq_bindcount[irq]++;
267
268 spin_unlock(&irq_mapping_update_lock);
269
270 return irq;
271}
272EXPORT_SYMBOL_GPL(bind_evtchn_to_irq);
273
274static int bind_ipi_to_irq(unsigned int ipi, unsigned int cpu)
275{
276 struct evtchn_bind_ipi bind_ipi;
277 int evtchn, irq;
278
279 spin_lock(&irq_mapping_update_lock);
280
281 irq = per_cpu(ipi_to_irq, cpu)[ipi];
282 if (irq == -1) {
283 irq = find_unbound_irq();
284 if (irq < 0)
285 goto out;
286
287 dynamic_irq_init(irq);
288 set_irq_chip_and_handler_name(irq, &xen_dynamic_chip,
289 handle_level_irq, "ipi");
290
291 bind_ipi.vcpu = cpu;
292 if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_ipi,
293 &bind_ipi) != 0)
294 BUG();
295 evtchn = bind_ipi.port;
296
297 evtchn_to_irq[evtchn] = irq;
298 irq_info[irq] = mk_irq_info(IRQT_IPI, ipi, evtchn);
299
300 per_cpu(ipi_to_irq, cpu)[ipi] = irq;
301
302 bind_evtchn_to_cpu(evtchn, cpu);
303 }
304
305 irq_bindcount[irq]++;
306
307 out:
308 spin_unlock(&irq_mapping_update_lock);
309 return irq;
310}
311
312
313static int bind_virq_to_irq(unsigned int virq, unsigned int cpu)
314{
315 struct evtchn_bind_virq bind_virq;
316 int evtchn, irq;
317
318 spin_lock(&irq_mapping_update_lock);
319
320 irq = per_cpu(virq_to_irq, cpu)[virq];
321
322 if (irq == -1) {
323 bind_virq.virq = virq;
324 bind_virq.vcpu = cpu;
325 if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_virq,
326 &bind_virq) != 0)
327 BUG();
328 evtchn = bind_virq.port;
329
330 irq = find_unbound_irq();
331
332 dynamic_irq_init(irq);
333 set_irq_chip_and_handler_name(irq, &xen_dynamic_chip,
334 handle_level_irq, "virq");
335
336 evtchn_to_irq[evtchn] = irq;
337 irq_info[irq] = mk_irq_info(IRQT_VIRQ, virq, evtchn);
338
339 per_cpu(virq_to_irq, cpu)[virq] = irq;
340
341 bind_evtchn_to_cpu(evtchn, cpu);
342 }
343
344 irq_bindcount[irq]++;
345
346 spin_unlock(&irq_mapping_update_lock);
347
348 return irq;
349}
350
351static void unbind_from_irq(unsigned int irq)
352{
353 struct evtchn_close close;
354 int evtchn = evtchn_from_irq(irq);
355
356 spin_lock(&irq_mapping_update_lock);
357
358 if (VALID_EVTCHN(evtchn) && (--irq_bindcount[irq] == 0)) {
359 close.port = evtchn;
360 if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close) != 0)
361 BUG();
362
363 switch (type_from_irq(irq)) {
364 case IRQT_VIRQ:
365 per_cpu(virq_to_irq, cpu_from_evtchn(evtchn))
366 [index_from_irq(irq)] = -1;
367 break;
368 default:
369 break;
370 }
371
372 /* Closed ports are implicitly re-bound to VCPU0. */
373 bind_evtchn_to_cpu(evtchn, 0);
374
375 evtchn_to_irq[evtchn] = -1;
376 irq_info[irq] = IRQ_UNBOUND;
377
378 dynamic_irq_init(irq);
379 }
380
381 spin_unlock(&irq_mapping_update_lock);
382}
383
384int bind_evtchn_to_irqhandler(unsigned int evtchn,
385 irqreturn_t (*handler)(int, void *),
386 unsigned long irqflags,
387 const char *devname, void *dev_id)
388{
389 unsigned int irq;
390 int retval;
391
392 irq = bind_evtchn_to_irq(evtchn);
393 retval = request_irq(irq, handler, irqflags, devname, dev_id);
394 if (retval != 0) {
395 unbind_from_irq(irq);
396 return retval;
397 }
398
399 return irq;
400}
401EXPORT_SYMBOL_GPL(bind_evtchn_to_irqhandler);
402
403int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu,
404 irqreturn_t (*handler)(int, void *),
405 unsigned long irqflags, const char *devname, void *dev_id)
406{
407 unsigned int irq;
408 int retval;
409
410 irq = bind_virq_to_irq(virq, cpu);
411 retval = request_irq(irq, handler, irqflags, devname, dev_id);
412 if (retval != 0) {
413 unbind_from_irq(irq);
414 return retval;
415 }
416
417 return irq;
418}
419EXPORT_SYMBOL_GPL(bind_virq_to_irqhandler);
420
421int bind_ipi_to_irqhandler(enum ipi_vector ipi,
422 unsigned int cpu,
423 irq_handler_t handler,
424 unsigned long irqflags,
425 const char *devname,
426 void *dev_id)
427{
428 int irq, retval;
429
430 irq = bind_ipi_to_irq(ipi, cpu);
431 if (irq < 0)
432 return irq;
433
434 retval = request_irq(irq, handler, irqflags, devname, dev_id);
435 if (retval != 0) {
436 unbind_from_irq(irq);
437 return retval;
438 }
439
440 return irq;
441}
442
443void unbind_from_irqhandler(unsigned int irq, void *dev_id)
444{
445 free_irq(irq, dev_id);
446 unbind_from_irq(irq);
447}
448EXPORT_SYMBOL_GPL(unbind_from_irqhandler);
449
450void xen_send_IPI_one(unsigned int cpu, enum ipi_vector vector)
451{
452 int irq = per_cpu(ipi_to_irq, cpu)[vector];
453 BUG_ON(irq < 0);
454 notify_remote_via_irq(irq);
455}
456
457
458/*
459 * Search the CPUs pending events bitmasks. For each one found, map
460 * the event number to an irq, and feed it into do_IRQ() for
461 * handling.
462 *
463 * Xen uses a two-level bitmap to speed searching. The first level is
464 * a bitset of words which contain pending event bits. The second
465 * level is a bitset of pending events themselves.
466 */
467fastcall void xen_evtchn_do_upcall(struct pt_regs *regs)
468{
469 int cpu = get_cpu();
470 struct shared_info *s = HYPERVISOR_shared_info;
471 struct vcpu_info *vcpu_info = __get_cpu_var(xen_vcpu);
472 unsigned long pending_words;
473
474 vcpu_info->evtchn_upcall_pending = 0;
475
476 /* NB. No need for a barrier here -- XCHG is a barrier on x86. */
477 pending_words = xchg(&vcpu_info->evtchn_pending_sel, 0);
478 while (pending_words != 0) {
479 unsigned long pending_bits;
480 int word_idx = __ffs(pending_words);
481 pending_words &= ~(1UL << word_idx);
482
483 while ((pending_bits = active_evtchns(cpu, s, word_idx)) != 0) {
484 int bit_idx = __ffs(pending_bits);
485 int port = (word_idx * BITS_PER_LONG) + bit_idx;
486 int irq = evtchn_to_irq[port];
487
488 if (irq != -1) {
489 regs->orig_eax = ~irq;
490 do_IRQ(regs);
491 }
492 }
493 }
494
495 put_cpu();
496}
497
498/* Rebind an evtchn so that it gets delivered to a specific cpu */
499static void rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
500{
501 struct evtchn_bind_vcpu bind_vcpu;
502 int evtchn = evtchn_from_irq(irq);
503
504 if (!VALID_EVTCHN(evtchn))
505 return;
506
507 /* Send future instances of this interrupt to other vcpu. */
508 bind_vcpu.port = evtchn;
509 bind_vcpu.vcpu = tcpu;
510
511 /*
512 * If this fails, it usually just indicates that we're dealing with a
513 * virq or IPI channel, which don't actually need to be rebound. Ignore
514 * it, but don't do the xenlinux-level rebind in that case.
515 */
516 if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0)
517 bind_evtchn_to_cpu(evtchn, tcpu);
518}
519
520
521static void set_affinity_irq(unsigned irq, cpumask_t dest)
522{
523 unsigned tcpu = first_cpu(dest);
524 rebind_irq_to_cpu(irq, tcpu);
525}
526
527static void enable_dynirq(unsigned int irq)
528{
529 int evtchn = evtchn_from_irq(irq);
530
531 if (VALID_EVTCHN(evtchn))
532 unmask_evtchn(evtchn);
533}
534
535static void disable_dynirq(unsigned int irq)
536{
537 int evtchn = evtchn_from_irq(irq);
538
539 if (VALID_EVTCHN(evtchn))
540 mask_evtchn(evtchn);
541}
542
543static void ack_dynirq(unsigned int irq)
544{
545 int evtchn = evtchn_from_irq(irq);
546
547 move_native_irq(irq);
548
549 if (VALID_EVTCHN(evtchn))
550 clear_evtchn(evtchn);
551}
552
553static int retrigger_dynirq(unsigned int irq)
554{
555 int evtchn = evtchn_from_irq(irq);
556 int ret = 0;
557
558 if (VALID_EVTCHN(evtchn)) {
559 set_evtchn(evtchn);
560 ret = 1;
561 }
562
563 return ret;
564}
565
566static struct irq_chip xen_dynamic_chip __read_mostly = {
567 .name = "xen-dyn",
568 .mask = disable_dynirq,
569 .unmask = enable_dynirq,
570 .ack = ack_dynirq,
571 .set_affinity = set_affinity_irq,
572 .retrigger = retrigger_dynirq,
573};
574
575void __init xen_init_IRQ(void)
576{
577 int i;
578
579 init_evtchn_cpu_bindings();
580
581 /* No event channels are 'live' right now. */
582 for (i = 0; i < NR_EVENT_CHANNELS; i++)
583 mask_evtchn(i);
584
585 /* Dynamic IRQ space is currently unbound. Zero the refcnts. */
586 for (i = 0; i < NR_IRQS; i++)
587 irq_bindcount[i] = 0;
588
589 irq_ctx_init(smp_processor_id());
590}
diff --git a/arch/i386/xen/features.c b/arch/i386/xen/features.c
new file mode 100644
index 0000000000..0707714e40
--- /dev/null
+++ b/arch/i386/xen/features.c
@@ -0,0 +1,29 @@
1/******************************************************************************
2 * features.c
3 *
4 * Xen feature flags.
5 *
6 * Copyright (c) 2006, Ian Campbell, XenSource Inc.
7 */
8#include <linux/types.h>
9#include <linux/cache.h>
10#include <linux/module.h>
11#include <asm/xen/hypervisor.h>
12#include <xen/features.h>
13
14u8 xen_features[XENFEAT_NR_SUBMAPS * 32] __read_mostly;
15EXPORT_SYMBOL_GPL(xen_features);
16
17void xen_setup_features(void)
18{
19 struct xen_feature_info fi;
20 int i, j;
21
22 for (i = 0; i < XENFEAT_NR_SUBMAPS; i++) {
23 fi.submap_idx = i;
24 if (HYPERVISOR_xen_version(XENVER_get_features, &fi) < 0)
25 break;
26 for (j = 0; j < 32; j++)
27 xen_features[i * 32 + j] = !!(fi.submap & 1<<j);
28 }
29}
diff --git a/arch/i386/xen/manage.c b/arch/i386/xen/manage.c
new file mode 100644
index 0000000000..aa7af9e6ab
--- /dev/null
+++ b/arch/i386/xen/manage.c
@@ -0,0 +1,143 @@
1/*
2 * Handle extern requests for shutdown, reboot and sysrq
3 */
4#include <linux/kernel.h>
5#include <linux/err.h>
6#include <linux/reboot.h>
7#include <linux/sysrq.h>
8
9#include <xen/xenbus.h>
10
11#define SHUTDOWN_INVALID -1
12#define SHUTDOWN_POWEROFF 0
13#define SHUTDOWN_SUSPEND 2
14/* Code 3 is SHUTDOWN_CRASH, which we don't use because the domain can only
15 * report a crash, not be instructed to crash!
16 * HALT is the same as POWEROFF, as far as we're concerned. The tools use
17 * the distinction when we return the reason code to them.
18 */
19#define SHUTDOWN_HALT 4
20
21/* Ignore multiple shutdown requests. */
22static int shutting_down = SHUTDOWN_INVALID;
23
24static void shutdown_handler(struct xenbus_watch *watch,
25 const char **vec, unsigned int len)
26{
27 char *str;
28 struct xenbus_transaction xbt;
29 int err;
30
31 if (shutting_down != SHUTDOWN_INVALID)
32 return;
33
34 again:
35 err = xenbus_transaction_start(&xbt);
36 if (err)
37 return;
38
39 str = (char *)xenbus_read(xbt, "control", "shutdown", NULL);
40 /* Ignore read errors and empty reads. */
41 if (XENBUS_IS_ERR_READ(str)) {
42 xenbus_transaction_end(xbt, 1);
43 return;
44 }
45
46 xenbus_write(xbt, "control", "shutdown", "");
47
48 err = xenbus_transaction_end(xbt, 0);
49 if (err == -EAGAIN) {
50 kfree(str);
51 goto again;
52 }
53
54 if (strcmp(str, "poweroff") == 0 ||
55 strcmp(str, "halt") == 0)
56 orderly_poweroff(false);
57 else if (strcmp(str, "reboot") == 0)
58 ctrl_alt_del();
59 else {
60 printk(KERN_INFO "Ignoring shutdown request: %s\n", str);
61 shutting_down = SHUTDOWN_INVALID;
62 }
63
64 kfree(str);
65}
66
67static void sysrq_handler(struct xenbus_watch *watch, const char **vec,
68 unsigned int len)
69{
70 char sysrq_key = '\0';
71 struct xenbus_transaction xbt;
72 int err;
73
74 again:
75 err = xenbus_transaction_start(&xbt);
76 if (err)
77 return;
78 if (!xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key)) {
79 printk(KERN_ERR "Unable to read sysrq code in "
80 "control/sysrq\n");
81 xenbus_transaction_end(xbt, 1);
82 return;
83 }
84
85 if (sysrq_key != '\0')
86 xenbus_printf(xbt, "control", "sysrq", "%c", '\0');
87
88 err = xenbus_transaction_end(xbt, 0);
89 if (err == -EAGAIN)
90 goto again;
91
92 if (sysrq_key != '\0')
93 handle_sysrq(sysrq_key, NULL);
94}
95
96static struct xenbus_watch shutdown_watch = {
97 .node = "control/shutdown",
98 .callback = shutdown_handler
99};
100
101static struct xenbus_watch sysrq_watch = {
102 .node = "control/sysrq",
103 .callback = sysrq_handler
104};
105
106static int setup_shutdown_watcher(void)
107{
108 int err;
109
110 err = register_xenbus_watch(&shutdown_watch);
111 if (err) {
112 printk(KERN_ERR "Failed to set shutdown watcher\n");
113 return err;
114 }
115
116 err = register_xenbus_watch(&sysrq_watch);
117 if (err) {
118 printk(KERN_ERR "Failed to set sysrq watcher\n");
119 return err;
120 }
121
122 return 0;
123}
124
125static int shutdown_event(struct notifier_block *notifier,
126 unsigned long event,
127 void *data)
128{
129 setup_shutdown_watcher();
130 return NOTIFY_DONE;
131}
132
133static int __init setup_shutdown_event(void)
134{
135 static struct notifier_block xenstore_notifier = {
136 .notifier_call = shutdown_event
137 };
138 register_xenstore_notifier(&xenstore_notifier);
139
140 return 0;
141}
142
143subsys_initcall(setup_shutdown_event);
diff --git a/arch/i386/xen/mmu.c b/arch/i386/xen/mmu.c
new file mode 100644
index 0000000000..4ae038aa6c
--- /dev/null
+++ b/arch/i386/xen/mmu.c
@@ -0,0 +1,564 @@
1/*
2 * Xen mmu operations
3 *
4 * This file contains the various mmu fetch and update operations.
5 * The most important job they must perform is the mapping between the
6 * domain's pfn and the overall machine mfns.
7 *
8 * Xen allows guests to directly update the pagetable, in a controlled
9 * fashion. In other words, the guest modifies the same pagetable
10 * that the CPU actually uses, which eliminates the overhead of having
11 * a separate shadow pagetable.
12 *
13 * In order to allow this, it falls on the guest domain to map its
14 * notion of a "physical" pfn - which is just a domain-local linear
15 * address - into a real "machine address" which the CPU's MMU can
16 * use.
17 *
18 * A pgd_t/pmd_t/pte_t will typically contain an mfn, and so can be
19 * inserted directly into the pagetable. When creating a new
20 * pte/pmd/pgd, it converts the passed pfn into an mfn. Conversely,
21 * when reading the content back with __(pgd|pmd|pte)_val, it converts
22 * the mfn back into a pfn.
23 *
24 * The other constraint is that all pages which make up a pagetable
25 * must be mapped read-only in the guest. This prevents uncontrolled
26 * guest updates to the pagetable. Xen strictly enforces this, and
27 * will disallow any pagetable update which will end up mapping a
28 * pagetable page RW, and will disallow using any writable page as a
29 * pagetable.
30 *
31 * Naively, when loading %cr3 with the base of a new pagetable, Xen
32 * would need to validate the whole pagetable before going on.
33 * Naturally, this is quite slow. The solution is to "pin" a
34 * pagetable, which enforces all the constraints on the pagetable even
35 * when it is not actively in use. This menas that Xen can be assured
36 * that it is still valid when you do load it into %cr3, and doesn't
37 * need to revalidate it.
38 *
39 * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007
40 */
41#include <linux/sched.h>
42#include <linux/highmem.h>
43#include <linux/bug.h>
44#include <linux/sched.h>
45
46#include <asm/pgtable.h>
47#include <asm/tlbflush.h>
48#include <asm/mmu_context.h>
49#include <asm/paravirt.h>
50
51#include <asm/xen/hypercall.h>
52#include <asm/xen/hypervisor.h>
53
54#include <xen/page.h>
55#include <xen/interface/xen.h>
56
57#include "multicalls.h"
58#include "mmu.h"
59
60xmaddr_t arbitrary_virt_to_machine(unsigned long address)
61{
62 pte_t *pte = lookup_address(address);
63 unsigned offset = address & PAGE_MASK;
64
65 BUG_ON(pte == NULL);
66
67 return XMADDR((pte_mfn(*pte) << PAGE_SHIFT) + offset);
68}
69
70void make_lowmem_page_readonly(void *vaddr)
71{
72 pte_t *pte, ptev;
73 unsigned long address = (unsigned long)vaddr;
74
75 pte = lookup_address(address);
76 BUG_ON(pte == NULL);
77
78 ptev = pte_wrprotect(*pte);
79
80 if (HYPERVISOR_update_va_mapping(address, ptev, 0))
81 BUG();
82}
83
84void make_lowmem_page_readwrite(void *vaddr)
85{
86 pte_t *pte, ptev;
87 unsigned long address = (unsigned long)vaddr;
88
89 pte = lookup_address(address);
90 BUG_ON(pte == NULL);
91
92 ptev = pte_mkwrite(*pte);
93
94 if (HYPERVISOR_update_va_mapping(address, ptev, 0))
95 BUG();
96}
97
98
99void xen_set_pmd(pmd_t *ptr, pmd_t val)
100{
101 struct multicall_space mcs;
102 struct mmu_update *u;
103
104 preempt_disable();
105
106 mcs = xen_mc_entry(sizeof(*u));
107 u = mcs.args;
108 u->ptr = virt_to_machine(ptr).maddr;
109 u->val = pmd_val_ma(val);
110 MULTI_mmu_update(mcs.mc, u, 1, NULL, DOMID_SELF);
111
112 xen_mc_issue(PARAVIRT_LAZY_MMU);
113
114 preempt_enable();
115}
116
117/*
118 * Associate a virtual page frame with a given physical page frame
119 * and protection flags for that frame.
120 */
121void set_pte_mfn(unsigned long vaddr, unsigned long mfn, pgprot_t flags)
122{
123 pgd_t *pgd;
124 pud_t *pud;
125 pmd_t *pmd;
126 pte_t *pte;
127
128 pgd = swapper_pg_dir + pgd_index(vaddr);
129 if (pgd_none(*pgd)) {
130 BUG();
131 return;
132 }
133 pud = pud_offset(pgd, vaddr);
134 if (pud_none(*pud)) {
135 BUG();
136 return;
137 }
138 pmd = pmd_offset(pud, vaddr);
139 if (pmd_none(*pmd)) {
140 BUG();
141 return;
142 }
143 pte = pte_offset_kernel(pmd, vaddr);
144 /* <mfn,flags> stored as-is, to permit clearing entries */
145 xen_set_pte(pte, mfn_pte(mfn, flags));
146
147 /*
148 * It's enough to flush this one mapping.
149 * (PGE mappings get flushed as well)
150 */
151 __flush_tlb_one(vaddr);
152}
153
154void xen_set_pte_at(struct mm_struct *mm, unsigned long addr,
155 pte_t *ptep, pte_t pteval)
156{
157 if (mm == current->mm || mm == &init_mm) {
158 if (xen_get_lazy_mode() == PARAVIRT_LAZY_MMU) {
159 struct multicall_space mcs;
160 mcs = xen_mc_entry(0);
161
162 MULTI_update_va_mapping(mcs.mc, addr, pteval, 0);
163 xen_mc_issue(PARAVIRT_LAZY_MMU);
164 return;
165 } else
166 if (HYPERVISOR_update_va_mapping(addr, pteval, 0) == 0)
167 return;
168 }
169 xen_set_pte(ptep, pteval);
170}
171
172#ifdef CONFIG_X86_PAE
173void xen_set_pud(pud_t *ptr, pud_t val)
174{
175 struct multicall_space mcs;
176 struct mmu_update *u;
177
178 preempt_disable();
179
180 mcs = xen_mc_entry(sizeof(*u));
181 u = mcs.args;
182 u->ptr = virt_to_machine(ptr).maddr;
183 u->val = pud_val_ma(val);
184 MULTI_mmu_update(mcs.mc, u, 1, NULL, DOMID_SELF);
185
186 xen_mc_issue(PARAVIRT_LAZY_MMU);
187
188 preempt_enable();
189}
190
191void xen_set_pte(pte_t *ptep, pte_t pte)
192{
193 ptep->pte_high = pte.pte_high;
194 smp_wmb();
195 ptep->pte_low = pte.pte_low;
196}
197
198void xen_set_pte_atomic(pte_t *ptep, pte_t pte)
199{
200 set_64bit((u64 *)ptep, pte_val_ma(pte));
201}
202
203void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
204{
205 ptep->pte_low = 0;
206 smp_wmb(); /* make sure low gets written first */
207 ptep->pte_high = 0;
208}
209
210void xen_pmd_clear(pmd_t *pmdp)
211{
212 xen_set_pmd(pmdp, __pmd(0));
213}
214
215unsigned long long xen_pte_val(pte_t pte)
216{
217 unsigned long long ret = 0;
218
219 if (pte.pte_low) {
220 ret = ((unsigned long long)pte.pte_high << 32) | pte.pte_low;
221 ret = machine_to_phys(XMADDR(ret)).paddr | 1;
222 }
223
224 return ret;
225}
226
227unsigned long long xen_pmd_val(pmd_t pmd)
228{
229 unsigned long long ret = pmd.pmd;
230 if (ret)
231 ret = machine_to_phys(XMADDR(ret)).paddr | 1;
232 return ret;
233}
234
235unsigned long long xen_pgd_val(pgd_t pgd)
236{
237 unsigned long long ret = pgd.pgd;
238 if (ret)
239 ret = machine_to_phys(XMADDR(ret)).paddr | 1;
240 return ret;
241}
242
243pte_t xen_make_pte(unsigned long long pte)
244{
245 if (pte & 1)
246 pte = phys_to_machine(XPADDR(pte)).maddr;
247
248 return (pte_t){ pte, pte >> 32 };
249}
250
251pmd_t xen_make_pmd(unsigned long long pmd)
252{
253 if (pmd & 1)
254 pmd = phys_to_machine(XPADDR(pmd)).maddr;
255
256 return (pmd_t){ pmd };
257}
258
259pgd_t xen_make_pgd(unsigned long long pgd)
260{
261 if (pgd & _PAGE_PRESENT)
262 pgd = phys_to_machine(XPADDR(pgd)).maddr;
263
264 return (pgd_t){ pgd };
265}
266#else /* !PAE */
267void xen_set_pte(pte_t *ptep, pte_t pte)
268{
269 *ptep = pte;
270}
271
272unsigned long xen_pte_val(pte_t pte)
273{
274 unsigned long ret = pte.pte_low;
275
276 if (ret & _PAGE_PRESENT)
277 ret = machine_to_phys(XMADDR(ret)).paddr;
278
279 return ret;
280}
281
282unsigned long xen_pgd_val(pgd_t pgd)
283{
284 unsigned long ret = pgd.pgd;
285 if (ret)
286 ret = machine_to_phys(XMADDR(ret)).paddr | 1;
287 return ret;
288}
289
290pte_t xen_make_pte(unsigned long pte)
291{
292 if (pte & _PAGE_PRESENT)
293 pte = phys_to_machine(XPADDR(pte)).maddr;
294
295 return (pte_t){ pte };
296}
297
298pgd_t xen_make_pgd(unsigned long pgd)
299{
300 if (pgd & _PAGE_PRESENT)
301 pgd = phys_to_machine(XPADDR(pgd)).maddr;
302
303 return (pgd_t){ pgd };
304}
305#endif /* CONFIG_X86_PAE */
306
307
308
309/*
310 (Yet another) pagetable walker. This one is intended for pinning a
311 pagetable. This means that it walks a pagetable and calls the
312 callback function on each page it finds making up the page table,
313 at every level. It walks the entire pagetable, but it only bothers
314 pinning pte pages which are below pte_limit. In the normal case
315 this will be TASK_SIZE, but at boot we need to pin up to
316 FIXADDR_TOP. But the important bit is that we don't pin beyond
317 there, because then we start getting into Xen's ptes.
318*/
319static int pgd_walk(pgd_t *pgd_base, int (*func)(struct page *, unsigned),
320 unsigned long limit)
321{
322 pgd_t *pgd = pgd_base;
323 int flush = 0;
324 unsigned long addr = 0;
325 unsigned long pgd_next;
326
327 BUG_ON(limit > FIXADDR_TOP);
328
329 if (xen_feature(XENFEAT_auto_translated_physmap))
330 return 0;
331
332 for (; addr != FIXADDR_TOP; pgd++, addr = pgd_next) {
333 pud_t *pud;
334 unsigned long pud_limit, pud_next;
335
336 pgd_next = pud_limit = pgd_addr_end(addr, FIXADDR_TOP);
337
338 if (!pgd_val(*pgd))
339 continue;
340
341 pud = pud_offset(pgd, 0);
342
343 if (PTRS_PER_PUD > 1) /* not folded */
344 flush |= (*func)(virt_to_page(pud), 0);
345
346 for (; addr != pud_limit; pud++, addr = pud_next) {
347 pmd_t *pmd;
348 unsigned long pmd_limit;
349
350 pud_next = pud_addr_end(addr, pud_limit);
351
352 if (pud_next < limit)
353 pmd_limit = pud_next;
354 else
355 pmd_limit = limit;
356
357 if (pud_none(*pud))
358 continue;
359
360 pmd = pmd_offset(pud, 0);
361
362 if (PTRS_PER_PMD > 1) /* not folded */
363 flush |= (*func)(virt_to_page(pmd), 0);
364
365 for (; addr != pmd_limit; pmd++) {
366 addr += (PAGE_SIZE * PTRS_PER_PTE);
367 if ((pmd_limit-1) < (addr-1)) {
368 addr = pmd_limit;
369 break;
370 }
371
372 if (pmd_none(*pmd))
373 continue;
374
375 flush |= (*func)(pmd_page(*pmd), 0);
376 }
377 }
378 }
379
380 flush |= (*func)(virt_to_page(pgd_base), UVMF_TLB_FLUSH);
381
382 return flush;
383}
384
385static int pin_page(struct page *page, unsigned flags)
386{
387 unsigned pgfl = test_and_set_bit(PG_pinned, &page->flags);
388 int flush;
389
390 if (pgfl)
391 flush = 0; /* already pinned */
392 else if (PageHighMem(page))
393 /* kmaps need flushing if we found an unpinned
394 highpage */
395 flush = 1;
396 else {
397 void *pt = lowmem_page_address(page);
398 unsigned long pfn = page_to_pfn(page);
399 struct multicall_space mcs = __xen_mc_entry(0);
400
401 flush = 0;
402
403 MULTI_update_va_mapping(mcs.mc, (unsigned long)pt,
404 pfn_pte(pfn, PAGE_KERNEL_RO),
405 flags);
406 }
407
408 return flush;
409}
410
411/* This is called just after a mm has been created, but it has not
412 been used yet. We need to make sure that its pagetable is all
413 read-only, and can be pinned. */
414void xen_pgd_pin(pgd_t *pgd)
415{
416 struct multicall_space mcs;
417 struct mmuext_op *op;
418
419 xen_mc_batch();
420
421 if (pgd_walk(pgd, pin_page, TASK_SIZE)) {
422 /* re-enable interrupts for kmap_flush_unused */
423 xen_mc_issue(0);
424 kmap_flush_unused();
425 xen_mc_batch();
426 }
427
428 mcs = __xen_mc_entry(sizeof(*op));
429 op = mcs.args;
430
431#ifdef CONFIG_X86_PAE
432 op->cmd = MMUEXT_PIN_L3_TABLE;
433#else
434 op->cmd = MMUEXT_PIN_L2_TABLE;
435#endif
436 op->arg1.mfn = pfn_to_mfn(PFN_DOWN(__pa(pgd)));
437 MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF);
438
439 xen_mc_issue(0);
440}
441
442/* The init_mm pagetable is really pinned as soon as its created, but
443 that's before we have page structures to store the bits. So do all
444 the book-keeping now. */
445static __init int mark_pinned(struct page *page, unsigned flags)
446{
447 SetPagePinned(page);
448 return 0;
449}
450
451void __init xen_mark_init_mm_pinned(void)
452{
453 pgd_walk(init_mm.pgd, mark_pinned, FIXADDR_TOP);
454}
455
456static int unpin_page(struct page *page, unsigned flags)
457{
458 unsigned pgfl = test_and_clear_bit(PG_pinned, &page->flags);
459
460 if (pgfl && !PageHighMem(page)) {
461 void *pt = lowmem_page_address(page);
462 unsigned long pfn = page_to_pfn(page);
463 struct multicall_space mcs = __xen_mc_entry(0);
464
465 MULTI_update_va_mapping(mcs.mc, (unsigned long)pt,
466 pfn_pte(pfn, PAGE_KERNEL),
467 flags);
468 }
469
470 return 0; /* never need to flush on unpin */
471}
472
473/* Release a pagetables pages back as normal RW */
474static void xen_pgd_unpin(pgd_t *pgd)
475{
476 struct mmuext_op *op;
477 struct multicall_space mcs;
478
479 xen_mc_batch();
480
481 mcs = __xen_mc_entry(sizeof(*op));
482
483 op = mcs.args;
484 op->cmd = MMUEXT_UNPIN_TABLE;
485 op->arg1.mfn = pfn_to_mfn(PFN_DOWN(__pa(pgd)));
486
487 MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF);
488
489 pgd_walk(pgd, unpin_page, TASK_SIZE);
490
491 xen_mc_issue(0);
492}
493
494void xen_activate_mm(struct mm_struct *prev, struct mm_struct *next)
495{
496 spin_lock(&next->page_table_lock);
497 xen_pgd_pin(next->pgd);
498 spin_unlock(&next->page_table_lock);
499}
500
501void xen_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm)
502{
503 spin_lock(&mm->page_table_lock);
504 xen_pgd_pin(mm->pgd);
505 spin_unlock(&mm->page_table_lock);
506}
507
508
509#ifdef CONFIG_SMP
510/* Another cpu may still have their %cr3 pointing at the pagetable, so
511 we need to repoint it somewhere else before we can unpin it. */
512static void drop_other_mm_ref(void *info)
513{
514 struct mm_struct *mm = info;
515
516 if (__get_cpu_var(cpu_tlbstate).active_mm == mm)
517 leave_mm(smp_processor_id());
518}
519
520static void drop_mm_ref(struct mm_struct *mm)
521{
522 if (current->active_mm == mm) {
523 if (current->mm == mm)
524 load_cr3(swapper_pg_dir);
525 else
526 leave_mm(smp_processor_id());
527 }
528
529 if (!cpus_empty(mm->cpu_vm_mask))
530 xen_smp_call_function_mask(mm->cpu_vm_mask, drop_other_mm_ref,
531 mm, 1);
532}
533#else
534static void drop_mm_ref(struct mm_struct *mm)
535{
536 if (current->active_mm == mm)
537 load_cr3(swapper_pg_dir);
538}
539#endif
540
541/*
542 * While a process runs, Xen pins its pagetables, which means that the
543 * hypervisor forces it to be read-only, and it controls all updates
544 * to it. This means that all pagetable updates have to go via the
545 * hypervisor, which is moderately expensive.
546 *
547 * Since we're pulling the pagetable down, we switch to use init_mm,
548 * unpin old process pagetable and mark it all read-write, which
549 * allows further operations on it to be simple memory accesses.
550 *
551 * The only subtle point is that another CPU may be still using the
552 * pagetable because of lazy tlb flushing. This means we need need to
553 * switch all CPUs off this pagetable before we can unpin it.
554 */
555void xen_exit_mmap(struct mm_struct *mm)
556{
557 get_cpu(); /* make sure we don't move around */
558 drop_mm_ref(mm);
559 put_cpu();
560
561 spin_lock(&mm->page_table_lock);
562 xen_pgd_unpin(mm->pgd);
563 spin_unlock(&mm->page_table_lock);
564}
diff --git a/arch/i386/xen/mmu.h b/arch/i386/xen/mmu.h
new file mode 100644
index 0000000000..c9ff27f3ac
--- /dev/null
+++ b/arch/i386/xen/mmu.h
@@ -0,0 +1,60 @@
1#ifndef _XEN_MMU_H
2
3#include <linux/linkage.h>
4#include <asm/page.h>
5
6/*
7 * Page-directory addresses above 4GB do not fit into architectural %cr3.
8 * When accessing %cr3, or equivalent field in vcpu_guest_context, guests
9 * must use the following accessor macros to pack/unpack valid MFNs.
10 *
11 * Note that Xen is using the fact that the pagetable base is always
12 * page-aligned, and putting the 12 MSB of the address into the 12 LSB
13 * of cr3.
14 */
15#define xen_pfn_to_cr3(pfn) (((unsigned)(pfn) << 12) | ((unsigned)(pfn) >> 20))
16#define xen_cr3_to_pfn(cr3) (((unsigned)(cr3) >> 12) | ((unsigned)(cr3) << 20))
17
18
19void set_pte_mfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags);
20
21void xen_set_pte(pte_t *ptep, pte_t pteval);
22void xen_set_pte_at(struct mm_struct *mm, unsigned long addr,
23 pte_t *ptep, pte_t pteval);
24void xen_set_pmd(pmd_t *pmdp, pmd_t pmdval);
25
26void xen_activate_mm(struct mm_struct *prev, struct mm_struct *next);
27void xen_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm);
28void xen_exit_mmap(struct mm_struct *mm);
29
30void xen_pgd_pin(pgd_t *pgd);
31//void xen_pgd_unpin(pgd_t *pgd);
32
33#ifdef CONFIG_X86_PAE
34unsigned long long xen_pte_val(pte_t);
35unsigned long long xen_pmd_val(pmd_t);
36unsigned long long xen_pgd_val(pgd_t);
37
38pte_t xen_make_pte(unsigned long long);
39pmd_t xen_make_pmd(unsigned long long);
40pgd_t xen_make_pgd(unsigned long long);
41
42void xen_set_pte_at(struct mm_struct *mm, unsigned long addr,
43 pte_t *ptep, pte_t pteval);
44void xen_set_pte_atomic(pte_t *ptep, pte_t pte);
45void xen_set_pud(pud_t *ptr, pud_t val);
46void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
47void xen_pmd_clear(pmd_t *pmdp);
48
49
50#else
51unsigned long xen_pte_val(pte_t);
52unsigned long xen_pmd_val(pmd_t);
53unsigned long xen_pgd_val(pgd_t);
54
55pte_t xen_make_pte(unsigned long);
56pmd_t xen_make_pmd(unsigned long);
57pgd_t xen_make_pgd(unsigned long);
58#endif
59
60#endif /* _XEN_MMU_H */
diff --git a/arch/i386/xen/multicalls.c b/arch/i386/xen/multicalls.c
new file mode 100644
index 0000000000..c837e8e463
--- /dev/null
+++ b/arch/i386/xen/multicalls.c
@@ -0,0 +1,90 @@
1/*
2 * Xen hypercall batching.
3 *
4 * Xen allows multiple hypercalls to be issued at once, using the
5 * multicall interface. This allows the cost of trapping into the
6 * hypervisor to be amortized over several calls.
7 *
8 * This file implements a simple interface for multicalls. There's a
9 * per-cpu buffer of outstanding multicalls. When you want to queue a
10 * multicall for issuing, you can allocate a multicall slot for the
11 * call and its arguments, along with storage for space which is
12 * pointed to by the arguments (for passing pointers to structures,
13 * etc). When the multicall is actually issued, all the space for the
14 * commands and allocated memory is freed for reuse.
15 *
16 * Multicalls are flushed whenever any of the buffers get full, or
17 * when explicitly requested. There's no way to get per-multicall
18 * return results back. It will BUG if any of the multicalls fail.
19 *
20 * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007
21 */
22#include <linux/percpu.h>
23#include <linux/hardirq.h>
24
25#include <asm/xen/hypercall.h>
26
27#include "multicalls.h"
28
29#define MC_BATCH 32
30#define MC_ARGS (MC_BATCH * 16 / sizeof(u64))
31
32struct mc_buffer {
33 struct multicall_entry entries[MC_BATCH];
34 u64 args[MC_ARGS];
35 unsigned mcidx, argidx;
36};
37
38static DEFINE_PER_CPU(struct mc_buffer, mc_buffer);
39DEFINE_PER_CPU(unsigned long, xen_mc_irq_flags);
40
41void xen_mc_flush(void)
42{
43 struct mc_buffer *b = &__get_cpu_var(mc_buffer);
44 int ret = 0;
45 unsigned long flags;
46
47 BUG_ON(preemptible());
48
49 /* Disable interrupts in case someone comes in and queues
50 something in the middle */
51 local_irq_save(flags);
52
53 if (b->mcidx) {
54 int i;
55
56 if (HYPERVISOR_multicall(b->entries, b->mcidx) != 0)
57 BUG();
58 for (i = 0; i < b->mcidx; i++)
59 if (b->entries[i].result < 0)
60 ret++;
61 b->mcidx = 0;
62 b->argidx = 0;
63 } else
64 BUG_ON(b->argidx != 0);
65
66 local_irq_restore(flags);
67
68 BUG_ON(ret);
69}
70
71struct multicall_space __xen_mc_entry(size_t args)
72{
73 struct mc_buffer *b = &__get_cpu_var(mc_buffer);
74 struct multicall_space ret;
75 unsigned argspace = (args + sizeof(u64) - 1) / sizeof(u64);
76
77 BUG_ON(preemptible());
78 BUG_ON(argspace > MC_ARGS);
79
80 if (b->mcidx == MC_BATCH ||
81 (b->argidx + argspace) > MC_ARGS)
82 xen_mc_flush();
83
84 ret.mc = &b->entries[b->mcidx];
85 b->mcidx++;
86 ret.args = &b->args[b->argidx];
87 b->argidx += argspace;
88
89 return ret;
90}
diff --git a/arch/i386/xen/multicalls.h b/arch/i386/xen/multicalls.h
new file mode 100644
index 0000000000..e6f7530b15
--- /dev/null
+++ b/arch/i386/xen/multicalls.h
@@ -0,0 +1,45 @@
1#ifndef _XEN_MULTICALLS_H
2#define _XEN_MULTICALLS_H
3
4#include "xen-ops.h"
5
6/* Multicalls */
7struct multicall_space
8{
9 struct multicall_entry *mc;
10 void *args;
11};
12
13/* Allocate room for a multicall and its args */
14struct multicall_space __xen_mc_entry(size_t args);
15
16DECLARE_PER_CPU(unsigned long, xen_mc_irq_flags);
17
18/* Call to start a batch of multiple __xen_mc_entry()s. Must be
19 paired with xen_mc_issue() */
20static inline void xen_mc_batch(void)
21{
22 /* need to disable interrupts until this entry is complete */
23 local_irq_save(__get_cpu_var(xen_mc_irq_flags));
24}
25
26static inline struct multicall_space xen_mc_entry(size_t args)
27{
28 xen_mc_batch();
29 return __xen_mc_entry(args);
30}
31
32/* Flush all pending multicalls */
33void xen_mc_flush(void);
34
35/* Issue a multicall if we're not in a lazy mode */
36static inline void xen_mc_issue(unsigned mode)
37{
38 if ((xen_get_lazy_mode() & mode) == 0)
39 xen_mc_flush();
40
41 /* restore flags saved in xen_mc_batch */
42 local_irq_restore(x86_read_percpu(xen_mc_irq_flags));
43}
44
45#endif /* _XEN_MULTICALLS_H */
diff --git a/arch/i386/xen/setup.c b/arch/i386/xen/setup.c
new file mode 100644
index 0000000000..2fe6eac510
--- /dev/null
+++ b/arch/i386/xen/setup.c
@@ -0,0 +1,96 @@
1/*
2 * Machine specific setup for xen
3 *
4 * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007
5 */
6
7#include <linux/module.h>
8#include <linux/sched.h>
9#include <linux/mm.h>
10#include <linux/pm.h>
11
12#include <asm/elf.h>
13#include <asm/e820.h>
14#include <asm/setup.h>
15#include <asm/xen/hypervisor.h>
16#include <asm/xen/hypercall.h>
17
18#include <xen/interface/physdev.h>
19#include <xen/features.h>
20
21#include "xen-ops.h"
22
23/* These are code, but not functions. Defined in entry.S */
24extern const char xen_hypervisor_callback[];
25extern const char xen_failsafe_callback[];
26
27unsigned long *phys_to_machine_mapping;
28EXPORT_SYMBOL(phys_to_machine_mapping);
29
30/**
31 * machine_specific_memory_setup - Hook for machine specific memory setup.
32 **/
33
34char * __init xen_memory_setup(void)
35{
36 unsigned long max_pfn = xen_start_info->nr_pages;
37
38 e820.nr_map = 0;
39 add_memory_region(0, PFN_PHYS(max_pfn), E820_RAM);
40
41 return "Xen";
42}
43
44static void xen_idle(void)
45{
46 local_irq_disable();
47
48 if (need_resched())
49 local_irq_enable();
50 else {
51 current_thread_info()->status &= ~TS_POLLING;
52 smp_mb__after_clear_bit();
53 safe_halt();
54 current_thread_info()->status |= TS_POLLING;
55 }
56}
57
58void __init xen_arch_setup(void)
59{
60 struct physdev_set_iopl set_iopl;
61 int rc;
62
63 HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments);
64 HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_writable_pagetables);
65
66 if (!xen_feature(XENFEAT_auto_translated_physmap))
67 HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_pae_extended_cr3);
68
69 HYPERVISOR_set_callbacks(__KERNEL_CS, (unsigned long)xen_hypervisor_callback,
70 __KERNEL_CS, (unsigned long)xen_failsafe_callback);
71
72 set_iopl.iopl = 1;
73 rc = HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
74 if (rc != 0)
75 printk(KERN_INFO "physdev_op failed %d\n", rc);
76
77#ifdef CONFIG_ACPI
78 if (!(xen_start_info->flags & SIF_INITDOMAIN)) {
79 printk(KERN_INFO "ACPI in unprivileged domain disabled\n");
80 disable_acpi();
81 }
82#endif
83
84 memcpy(boot_command_line, xen_start_info->cmd_line,
85 MAX_GUEST_CMDLINE > COMMAND_LINE_SIZE ?
86 COMMAND_LINE_SIZE : MAX_GUEST_CMDLINE);
87
88 pm_idle = xen_idle;
89
90#ifdef CONFIG_SMP
91 /* fill cpus_possible with all available cpus */
92 xen_fill_possible_map();
93#endif
94
95 paravirt_disable_iospace();
96}
diff --git a/arch/i386/xen/smp.c b/arch/i386/xen/smp.c
new file mode 100644
index 0000000000..557b8e2470
--- /dev/null
+++ b/arch/i386/xen/smp.c
@@ -0,0 +1,404 @@
1/*
2 * Xen SMP support
3 *
4 * This file implements the Xen versions of smp_ops. SMP under Xen is
5 * very straightforward. Bringing a CPU up is simply a matter of
6 * loading its initial context and setting it running.
7 *
8 * IPIs are handled through the Xen event mechanism.
9 *
10 * Because virtual CPUs can be scheduled onto any real CPU, there's no
11 * useful topology information for the kernel to make use of. As a
12 * result, all CPUs are treated as if they're single-core and
13 * single-threaded.
14 *
15 * This does not handle HOTPLUG_CPU yet.
16 */
17#include <linux/sched.h>
18#include <linux/err.h>
19#include <linux/smp.h>
20
21#include <asm/paravirt.h>
22#include <asm/desc.h>
23#include <asm/pgtable.h>
24#include <asm/cpu.h>
25
26#include <xen/interface/xen.h>
27#include <xen/interface/vcpu.h>
28
29#include <asm/xen/interface.h>
30#include <asm/xen/hypercall.h>
31
32#include <xen/page.h>
33#include <xen/events.h>
34
35#include "xen-ops.h"
36#include "mmu.h"
37
38static cpumask_t cpu_initialized_map;
39static DEFINE_PER_CPU(int, resched_irq);
40static DEFINE_PER_CPU(int, callfunc_irq);
41
42/*
43 * Structure and data for smp_call_function(). This is designed to minimise
44 * static memory requirements. It also looks cleaner.
45 */
46static DEFINE_SPINLOCK(call_lock);
47
48struct call_data_struct {
49 void (*func) (void *info);
50 void *info;
51 atomic_t started;
52 atomic_t finished;
53 int wait;
54};
55
56static irqreturn_t xen_call_function_interrupt(int irq, void *dev_id);
57
58static struct call_data_struct *call_data;
59
60/*
61 * Reschedule call back. Nothing to do,
62 * all the work is done automatically when
63 * we return from the interrupt.
64 */
65static irqreturn_t xen_reschedule_interrupt(int irq, void *dev_id)
66{
67 return IRQ_HANDLED;
68}
69
70static __cpuinit void cpu_bringup_and_idle(void)
71{
72 int cpu = smp_processor_id();
73
74 cpu_init();
75
76 preempt_disable();
77 per_cpu(cpu_state, cpu) = CPU_ONLINE;
78
79 xen_setup_cpu_clockevents();
80
81 /* We can take interrupts now: we're officially "up". */
82 local_irq_enable();
83
84 wmb(); /* make sure everything is out */
85 cpu_idle();
86}
87
88static int xen_smp_intr_init(unsigned int cpu)
89{
90 int rc;
91 const char *resched_name, *callfunc_name;
92
93 per_cpu(resched_irq, cpu) = per_cpu(callfunc_irq, cpu) = -1;
94
95 resched_name = kasprintf(GFP_KERNEL, "resched%d", cpu);
96 rc = bind_ipi_to_irqhandler(XEN_RESCHEDULE_VECTOR,
97 cpu,
98 xen_reschedule_interrupt,
99 IRQF_DISABLED|IRQF_PERCPU|IRQF_NOBALANCING,
100 resched_name,
101 NULL);
102 if (rc < 0)
103 goto fail;
104 per_cpu(resched_irq, cpu) = rc;
105
106 callfunc_name = kasprintf(GFP_KERNEL, "callfunc%d", cpu);
107 rc = bind_ipi_to_irqhandler(XEN_CALL_FUNCTION_VECTOR,
108 cpu,
109 xen_call_function_interrupt,
110 IRQF_DISABLED|IRQF_PERCPU|IRQF_NOBALANCING,
111 callfunc_name,
112 NULL);
113 if (rc < 0)
114 goto fail;
115 per_cpu(callfunc_irq, cpu) = rc;
116
117 return 0;
118
119 fail:
120 if (per_cpu(resched_irq, cpu) >= 0)
121 unbind_from_irqhandler(per_cpu(resched_irq, cpu), NULL);
122 if (per_cpu(callfunc_irq, cpu) >= 0)
123 unbind_from_irqhandler(per_cpu(callfunc_irq, cpu), NULL);
124 return rc;
125}
126
127void __init xen_fill_possible_map(void)
128{
129 int i, rc;
130
131 for (i = 0; i < NR_CPUS; i++) {
132 rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL);
133 if (rc >= 0)
134 cpu_set(i, cpu_possible_map);
135 }
136}
137
138void __init xen_smp_prepare_boot_cpu(void)
139{
140 int cpu;
141
142 BUG_ON(smp_processor_id() != 0);
143 native_smp_prepare_boot_cpu();
144
145 /* We've switched to the "real" per-cpu gdt, so make sure the
146 old memory can be recycled */
147 make_lowmem_page_readwrite(&per_cpu__gdt_page);
148
149 for (cpu = 0; cpu < NR_CPUS; cpu++) {
150 cpus_clear(cpu_sibling_map[cpu]);
151 cpus_clear(cpu_core_map[cpu]);
152 }
153
154 xen_setup_vcpu_info_placement();
155}
156
157void __init xen_smp_prepare_cpus(unsigned int max_cpus)
158{
159 unsigned cpu;
160
161 for (cpu = 0; cpu < NR_CPUS; cpu++) {
162 cpus_clear(cpu_sibling_map[cpu]);
163 cpus_clear(cpu_core_map[cpu]);
164 }
165
166 smp_store_cpu_info(0);
167 set_cpu_sibling_map(0);
168
169 if (xen_smp_intr_init(0))
170 BUG();
171
172 cpu_initialized_map = cpumask_of_cpu(0);
173
174 /* Restrict the possible_map according to max_cpus. */
175 while ((num_possible_cpus() > 1) && (num_possible_cpus() > max_cpus)) {
176 for (cpu = NR_CPUS-1; !cpu_isset(cpu, cpu_possible_map); cpu--)
177 continue;
178 cpu_clear(cpu, cpu_possible_map);
179 }
180
181 for_each_possible_cpu (cpu) {
182 struct task_struct *idle;
183
184 if (cpu == 0)
185 continue;
186
187 idle = fork_idle(cpu);
188 if (IS_ERR(idle))
189 panic("failed fork for CPU %d", cpu);
190
191 cpu_set(cpu, cpu_present_map);
192 }
193
194 //init_xenbus_allowed_cpumask();
195}
196
197static __cpuinit int
198cpu_initialize_context(unsigned int cpu, struct task_struct *idle)
199{
200 struct vcpu_guest_context *ctxt;
201 struct gdt_page *gdt = &per_cpu(gdt_page, cpu);
202
203 if (cpu_test_and_set(cpu, cpu_initialized_map))
204 return 0;
205
206 ctxt = kzalloc(sizeof(*ctxt), GFP_KERNEL);
207 if (ctxt == NULL)
208 return -ENOMEM;
209
210 ctxt->flags = VGCF_IN_KERNEL;
211 ctxt->user_regs.ds = __USER_DS;
212 ctxt->user_regs.es = __USER_DS;
213 ctxt->user_regs.fs = __KERNEL_PERCPU;
214 ctxt->user_regs.gs = 0;
215 ctxt->user_regs.ss = __KERNEL_DS;
216 ctxt->user_regs.eip = (unsigned long)cpu_bringup_and_idle;
217 ctxt->user_regs.eflags = 0x1000; /* IOPL_RING1 */
218
219 memset(&ctxt->fpu_ctxt, 0, sizeof(ctxt->fpu_ctxt));
220
221 xen_copy_trap_info(ctxt->trap_ctxt);
222
223 ctxt->ldt_ents = 0;
224
225 BUG_ON((unsigned long)gdt->gdt & ~PAGE_MASK);
226 make_lowmem_page_readonly(gdt->gdt);
227
228 ctxt->gdt_frames[0] = virt_to_mfn(gdt->gdt);
229 ctxt->gdt_ents = ARRAY_SIZE(gdt->gdt);
230
231 ctxt->user_regs.cs = __KERNEL_CS;
232 ctxt->user_regs.esp = idle->thread.esp0 - sizeof(struct pt_regs);
233
234 ctxt->kernel_ss = __KERNEL_DS;
235 ctxt->kernel_sp = idle->thread.esp0;
236
237 ctxt->event_callback_cs = __KERNEL_CS;
238 ctxt->event_callback_eip = (unsigned long)xen_hypervisor_callback;
239 ctxt->failsafe_callback_cs = __KERNEL_CS;
240 ctxt->failsafe_callback_eip = (unsigned long)xen_failsafe_callback;
241
242 per_cpu(xen_cr3, cpu) = __pa(swapper_pg_dir);
243 ctxt->ctrlreg[3] = xen_pfn_to_cr3(virt_to_mfn(swapper_pg_dir));
244
245 if (HYPERVISOR_vcpu_op(VCPUOP_initialise, cpu, ctxt))
246 BUG();
247
248 kfree(ctxt);
249 return 0;
250}
251
252int __cpuinit xen_cpu_up(unsigned int cpu)
253{
254 struct task_struct *idle = idle_task(cpu);
255 int rc;
256
257#if 0
258 rc = cpu_up_check(cpu);
259 if (rc)
260 return rc;
261#endif
262
263 init_gdt(cpu);
264 per_cpu(current_task, cpu) = idle;
265 irq_ctx_init(cpu);
266 xen_setup_timer(cpu);
267
268 /* make sure interrupts start blocked */
269 per_cpu(xen_vcpu, cpu)->evtchn_upcall_mask = 1;
270
271 rc = cpu_initialize_context(cpu, idle);
272 if (rc)
273 return rc;
274
275 if (num_online_cpus() == 1)
276 alternatives_smp_switch(1);
277
278 rc = xen_smp_intr_init(cpu);
279 if (rc)
280 return rc;
281
282 smp_store_cpu_info(cpu);
283 set_cpu_sibling_map(cpu);
284 /* This must be done before setting cpu_online_map */
285 wmb();
286
287 cpu_set(cpu, cpu_online_map);
288
289 rc = HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL);
290 BUG_ON(rc);
291
292 return 0;
293}
294
295void xen_smp_cpus_done(unsigned int max_cpus)
296{
297}
298
299static void stop_self(void *v)
300{
301 int cpu = smp_processor_id();
302
303 /* make sure we're not pinning something down */
304 load_cr3(swapper_pg_dir);
305 /* should set up a minimal gdt */
306
307 HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL);
308 BUG();
309}
310
311void xen_smp_send_stop(void)
312{
313 smp_call_function(stop_self, NULL, 0, 0);
314}
315
316void xen_smp_send_reschedule(int cpu)
317{
318 xen_send_IPI_one(cpu, XEN_RESCHEDULE_VECTOR);
319}
320
321
322static void xen_send_IPI_mask(cpumask_t mask, enum ipi_vector vector)
323{
324 unsigned cpu;
325
326 cpus_and(mask, mask, cpu_online_map);
327
328 for_each_cpu_mask(cpu, mask)
329 xen_send_IPI_one(cpu, vector);
330}
331
332static irqreturn_t xen_call_function_interrupt(int irq, void *dev_id)
333{
334 void (*func) (void *info) = call_data->func;
335 void *info = call_data->info;
336 int wait = call_data->wait;
337
338 /*
339 * Notify initiating CPU that I've grabbed the data and am
340 * about to execute the function
341 */
342 mb();
343 atomic_inc(&call_data->started);
344 /*
345 * At this point the info structure may be out of scope unless wait==1
346 */
347 irq_enter();
348 (*func)(info);
349 irq_exit();
350
351 if (wait) {
352 mb(); /* commit everything before setting finished */
353 atomic_inc(&call_data->finished);
354 }
355
356 return IRQ_HANDLED;
357}
358
359int xen_smp_call_function_mask(cpumask_t mask, void (*func)(void *),
360 void *info, int wait)
361{
362 struct call_data_struct data;
363 int cpus;
364
365 /* Holding any lock stops cpus from going down. */
366 spin_lock(&call_lock);
367
368 cpu_clear(smp_processor_id(), mask);
369
370 cpus = cpus_weight(mask);
371 if (!cpus) {
372 spin_unlock(&call_lock);
373 return 0;
374 }
375
376 /* Can deadlock when called with interrupts disabled */
377 WARN_ON(irqs_disabled());
378
379 data.func = func;
380 data.info = info;
381 atomic_set(&data.started, 0);
382 data.wait = wait;
383 if (wait)
384 atomic_set(&data.finished, 0);
385
386 call_data = &data;
387 mb(); /* write everything before IPI */
388
389 /* Send a message to other CPUs and wait for them to respond */
390 xen_send_IPI_mask(mask, XEN_CALL_FUNCTION_VECTOR);
391
392 /* Make sure other vcpus get a chance to run.
393 XXX too severe? Maybe we should check the other CPU's states? */
394 HYPERVISOR_sched_op(SCHEDOP_yield, 0);
395
396 /* Wait for response */
397 while (atomic_read(&data.started) != cpus ||
398 (wait && atomic_read(&data.finished) != cpus))
399 cpu_relax();
400
401 spin_unlock(&call_lock);
402
403 return 0;
404}
diff --git a/arch/i386/xen/time.c b/arch/i386/xen/time.c
new file mode 100644
index 0000000000..51fdabf1fd
--- /dev/null
+++ b/arch/i386/xen/time.c
@@ -0,0 +1,590 @@
1/*
2 * Xen time implementation.
3 *
4 * This is implemented in terms of a clocksource driver which uses
5 * the hypervisor clock as a nanosecond timebase, and a clockevent
6 * driver which uses the hypervisor's timer mechanism.
7 *
8 * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007
9 */
10#include <linux/kernel.h>
11#include <linux/interrupt.h>
12#include <linux/clocksource.h>
13#include <linux/clockchips.h>
14#include <linux/kernel_stat.h>
15
16#include <asm/xen/hypervisor.h>
17#include <asm/xen/hypercall.h>
18
19#include <xen/events.h>
20#include <xen/interface/xen.h>
21#include <xen/interface/vcpu.h>
22
23#include "xen-ops.h"
24
25#define XEN_SHIFT 22
26
27/* Xen may fire a timer up to this many ns early */
28#define TIMER_SLOP 100000
29#define NS_PER_TICK (1000000000LL / HZ)
30
31static cycle_t xen_clocksource_read(void);
32
33/* These are perodically updated in shared_info, and then copied here. */
34struct shadow_time_info {
35 u64 tsc_timestamp; /* TSC at last update of time vals. */
36 u64 system_timestamp; /* Time, in nanosecs, since boot. */
37 u32 tsc_to_nsec_mul;
38 int tsc_shift;
39 u32 version;
40};
41
42static DEFINE_PER_CPU(struct shadow_time_info, shadow_time);
43
44/* runstate info updated by Xen */
45static DEFINE_PER_CPU(struct vcpu_runstate_info, runstate);
46
47/* snapshots of runstate info */
48static DEFINE_PER_CPU(struct vcpu_runstate_info, runstate_snapshot);
49
50/* unused ns of stolen and blocked time */
51static DEFINE_PER_CPU(u64, residual_stolen);
52static DEFINE_PER_CPU(u64, residual_blocked);
53
54/* return an consistent snapshot of 64-bit time/counter value */
55static u64 get64(const u64 *p)
56{
57 u64 ret;
58
59 if (BITS_PER_LONG < 64) {
60 u32 *p32 = (u32 *)p;
61 u32 h, l;
62
63 /*
64 * Read high then low, and then make sure high is
65 * still the same; this will only loop if low wraps
66 * and carries into high.
67 * XXX some clean way to make this endian-proof?
68 */
69 do {
70 h = p32[1];
71 barrier();
72 l = p32[0];
73 barrier();
74 } while (p32[1] != h);
75
76 ret = (((u64)h) << 32) | l;
77 } else
78 ret = *p;
79
80 return ret;
81}
82
83/*
84 * Runstate accounting
85 */
86static void get_runstate_snapshot(struct vcpu_runstate_info *res)
87{
88 u64 state_time;
89 struct vcpu_runstate_info *state;
90
91 BUG_ON(preemptible());
92
93 state = &__get_cpu_var(runstate);
94
95 /*
96 * The runstate info is always updated by the hypervisor on
97 * the current CPU, so there's no need to use anything
98 * stronger than a compiler barrier when fetching it.
99 */
100 do {
101 state_time = get64(&state->state_entry_time);
102 barrier();
103 *res = *state;
104 barrier();
105 } while (get64(&state->state_entry_time) != state_time);
106}
107
108static void setup_runstate_info(int cpu)
109{
110 struct vcpu_register_runstate_memory_area area;
111
112 area.addr.v = &per_cpu(runstate, cpu);
113
114 if (HYPERVISOR_vcpu_op(VCPUOP_register_runstate_memory_area,
115 cpu, &area))
116 BUG();
117}
118
119static void do_stolen_accounting(void)
120{
121 struct vcpu_runstate_info state;
122 struct vcpu_runstate_info *snap;
123 s64 blocked, runnable, offline, stolen;
124 cputime_t ticks;
125
126 get_runstate_snapshot(&state);
127
128 WARN_ON(state.state != RUNSTATE_running);
129
130 snap = &__get_cpu_var(runstate_snapshot);
131
132 /* work out how much time the VCPU has not been runn*ing* */
133 blocked = state.time[RUNSTATE_blocked] - snap->time[RUNSTATE_blocked];
134 runnable = state.time[RUNSTATE_runnable] - snap->time[RUNSTATE_runnable];
135 offline = state.time[RUNSTATE_offline] - snap->time[RUNSTATE_offline];
136
137 *snap = state;
138
139 /* Add the appropriate number of ticks of stolen time,
140 including any left-overs from last time. Passing NULL to
141 account_steal_time accounts the time as stolen. */
142 stolen = runnable + offline + __get_cpu_var(residual_stolen);
143
144 if (stolen < 0)
145 stolen = 0;
146
147 ticks = 0;
148 while (stolen >= NS_PER_TICK) {
149 ticks++;
150 stolen -= NS_PER_TICK;
151 }
152 __get_cpu_var(residual_stolen) = stolen;
153 account_steal_time(NULL, ticks);
154
155 /* Add the appropriate number of ticks of blocked time,
156 including any left-overs from last time. Passing idle to
157 account_steal_time accounts the time as idle/wait. */
158 blocked += __get_cpu_var(residual_blocked);
159
160 if (blocked < 0)
161 blocked = 0;
162
163 ticks = 0;
164 while (blocked >= NS_PER_TICK) {
165 ticks++;
166 blocked -= NS_PER_TICK;
167 }
168 __get_cpu_var(residual_blocked) = blocked;
169 account_steal_time(idle_task(smp_processor_id()), ticks);
170}
171
172/*
173 * Xen sched_clock implementation. Returns the number of unstolen
174 * nanoseconds, which is nanoseconds the VCPU spent in RUNNING+BLOCKED
175 * states.
176 */
177unsigned long long xen_sched_clock(void)
178{
179 struct vcpu_runstate_info state;
180 cycle_t now;
181 u64 ret;
182 s64 offset;
183
184 /*
185 * Ideally sched_clock should be called on a per-cpu basis
186 * anyway, so preempt should already be disabled, but that's
187 * not current practice at the moment.
188 */
189 preempt_disable();
190
191 now = xen_clocksource_read();
192
193 get_runstate_snapshot(&state);
194
195 WARN_ON(state.state != RUNSTATE_running);
196
197 offset = now - state.state_entry_time;
198 if (offset < 0)
199 offset = 0;
200
201 ret = state.time[RUNSTATE_blocked] +
202 state.time[RUNSTATE_running] +
203 offset;
204
205 preempt_enable();
206
207 return ret;
208}
209
210
211/* Get the CPU speed from Xen */
212unsigned long xen_cpu_khz(void)
213{
214 u64 cpu_khz = 1000000ULL << 32;
215 const struct vcpu_time_info *info =
216 &HYPERVISOR_shared_info->vcpu_info[0].time;
217
218 do_div(cpu_khz, info->tsc_to_system_mul);
219 if (info->tsc_shift < 0)
220 cpu_khz <<= -info->tsc_shift;
221 else
222 cpu_khz >>= info->tsc_shift;
223
224 return cpu_khz;
225}
226
227/*
228 * Reads a consistent set of time-base values from Xen, into a shadow data
229 * area.
230 */
231static unsigned get_time_values_from_xen(void)
232{
233 struct vcpu_time_info *src;
234 struct shadow_time_info *dst;
235
236 /* src is shared memory with the hypervisor, so we need to
237 make sure we get a consistent snapshot, even in the face of
238 being preempted. */
239 src = &__get_cpu_var(xen_vcpu)->time;
240 dst = &__get_cpu_var(shadow_time);
241
242 do {
243 dst->version = src->version;
244 rmb(); /* fetch version before data */
245 dst->tsc_timestamp = src->tsc_timestamp;
246 dst->system_timestamp = src->system_time;
247 dst->tsc_to_nsec_mul = src->tsc_to_system_mul;
248 dst->tsc_shift = src->tsc_shift;
249 rmb(); /* test version after fetching data */
250 } while ((src->version & 1) | (dst->version ^ src->version));
251
252 return dst->version;
253}
254
255/*
256 * Scale a 64-bit delta by scaling and multiplying by a 32-bit fraction,
257 * yielding a 64-bit result.
258 */
259static inline u64 scale_delta(u64 delta, u32 mul_frac, int shift)
260{
261 u64 product;
262#ifdef __i386__
263 u32 tmp1, tmp2;
264#endif
265
266 if (shift < 0)
267 delta >>= -shift;
268 else
269 delta <<= shift;
270
271#ifdef __i386__
272 __asm__ (
273 "mul %5 ; "
274 "mov %4,%%eax ; "
275 "mov %%edx,%4 ; "
276 "mul %5 ; "
277 "xor %5,%5 ; "
278 "add %4,%%eax ; "
279 "adc %5,%%edx ; "
280 : "=A" (product), "=r" (tmp1), "=r" (tmp2)
281 : "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) );
282#elif __x86_64__
283 __asm__ (
284 "mul %%rdx ; shrd $32,%%rdx,%%rax"
285 : "=a" (product) : "0" (delta), "d" ((u64)mul_frac) );
286#else
287#error implement me!
288#endif
289
290 return product;
291}
292
293static u64 get_nsec_offset(struct shadow_time_info *shadow)
294{
295 u64 now, delta;
296 now = native_read_tsc();
297 delta = now - shadow->tsc_timestamp;
298 return scale_delta(delta, shadow->tsc_to_nsec_mul, shadow->tsc_shift);
299}
300
301static cycle_t xen_clocksource_read(void)
302{
303 struct shadow_time_info *shadow = &get_cpu_var(shadow_time);
304 cycle_t ret;
305 unsigned version;
306
307 do {
308 version = get_time_values_from_xen();
309 barrier();
310 ret = shadow->system_timestamp + get_nsec_offset(shadow);
311 barrier();
312 } while (version != __get_cpu_var(xen_vcpu)->time.version);
313
314 put_cpu_var(shadow_time);
315
316 return ret;
317}
318
319static void xen_read_wallclock(struct timespec *ts)
320{
321 const struct shared_info *s = HYPERVISOR_shared_info;
322 u32 version;
323 u64 delta;
324 struct timespec now;
325
326 /* get wallclock at system boot */
327 do {
328 version = s->wc_version;
329 rmb(); /* fetch version before time */
330 now.tv_sec = s->wc_sec;
331 now.tv_nsec = s->wc_nsec;
332 rmb(); /* fetch time before checking version */
333 } while ((s->wc_version & 1) | (version ^ s->wc_version));
334
335 delta = xen_clocksource_read(); /* time since system boot */
336 delta += now.tv_sec * (u64)NSEC_PER_SEC + now.tv_nsec;
337
338 now.tv_nsec = do_div(delta, NSEC_PER_SEC);
339 now.tv_sec = delta;
340
341 set_normalized_timespec(ts, now.tv_sec, now.tv_nsec);
342}
343
344unsigned long xen_get_wallclock(void)
345{
346 struct timespec ts;
347
348 xen_read_wallclock(&ts);
349
350 return ts.tv_sec;
351}
352
353int xen_set_wallclock(unsigned long now)
354{
355 /* do nothing for domU */
356 return -1;
357}
358
359static struct clocksource xen_clocksource __read_mostly = {
360 .name = "xen",
361 .rating = 400,
362 .read = xen_clocksource_read,
363 .mask = ~0,
364 .mult = 1<<XEN_SHIFT, /* time directly in nanoseconds */
365 .shift = XEN_SHIFT,
366 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
367};
368
369/*
370 Xen clockevent implementation
371
372 Xen has two clockevent implementations:
373
374 The old timer_op one works with all released versions of Xen prior
375 to version 3.0.4. This version of the hypervisor provides a
376 single-shot timer with nanosecond resolution. However, sharing the
377 same event channel is a 100Hz tick which is delivered while the
378 vcpu is running. We don't care about or use this tick, but it will
379 cause the core time code to think the timer fired too soon, and
380 will end up resetting it each time. It could be filtered, but
381 doing so has complications when the ktime clocksource is not yet
382 the xen clocksource (ie, at boot time).
383
384 The new vcpu_op-based timer interface allows the tick timer period
385 to be changed or turned off. The tick timer is not useful as a
386 periodic timer because events are only delivered to running vcpus.
387 The one-shot timer can report when a timeout is in the past, so
388 set_next_event is capable of returning -ETIME when appropriate.
389 This interface is used when available.
390*/
391
392
393/*
394 Get a hypervisor absolute time. In theory we could maintain an
395 offset between the kernel's time and the hypervisor's time, and
396 apply that to a kernel's absolute timeout. Unfortunately the
397 hypervisor and kernel times can drift even if the kernel is using
398 the Xen clocksource, because ntp can warp the kernel's clocksource.
399*/
400static s64 get_abs_timeout(unsigned long delta)
401{
402 return xen_clocksource_read() + delta;
403}
404
405static void xen_timerop_set_mode(enum clock_event_mode mode,
406 struct clock_event_device *evt)
407{
408 switch (mode) {
409 case CLOCK_EVT_MODE_PERIODIC:
410 /* unsupported */
411 WARN_ON(1);
412 break;
413
414 case CLOCK_EVT_MODE_ONESHOT:
415 break;
416
417 case CLOCK_EVT_MODE_UNUSED:
418 case CLOCK_EVT_MODE_SHUTDOWN:
419 HYPERVISOR_set_timer_op(0); /* cancel timeout */
420 break;
421 }
422}
423
424static int xen_timerop_set_next_event(unsigned long delta,
425 struct clock_event_device *evt)
426{
427 WARN_ON(evt->mode != CLOCK_EVT_MODE_ONESHOT);
428
429 if (HYPERVISOR_set_timer_op(get_abs_timeout(delta)) < 0)
430 BUG();
431
432 /* We may have missed the deadline, but there's no real way of
433 knowing for sure. If the event was in the past, then we'll
434 get an immediate interrupt. */
435
436 return 0;
437}
438
439static const struct clock_event_device xen_timerop_clockevent = {
440 .name = "xen",
441 .features = CLOCK_EVT_FEAT_ONESHOT,
442
443 .max_delta_ns = 0xffffffff,
444 .min_delta_ns = TIMER_SLOP,
445
446 .mult = 1,
447 .shift = 0,
448 .rating = 500,
449
450 .set_mode = xen_timerop_set_mode,
451 .set_next_event = xen_timerop_set_next_event,
452};
453
454
455
456static void xen_vcpuop_set_mode(enum clock_event_mode mode,
457 struct clock_event_device *evt)
458{
459 int cpu = smp_processor_id();
460
461 switch (mode) {
462 case CLOCK_EVT_MODE_PERIODIC:
463 WARN_ON(1); /* unsupported */
464 break;
465
466 case CLOCK_EVT_MODE_ONESHOT:
467 if (HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, cpu, NULL))
468 BUG();
469 break;
470
471 case CLOCK_EVT_MODE_UNUSED:
472 case CLOCK_EVT_MODE_SHUTDOWN:
473 if (HYPERVISOR_vcpu_op(VCPUOP_stop_singleshot_timer, cpu, NULL) ||
474 HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, cpu, NULL))
475 BUG();
476 break;
477 }
478}
479
480static int xen_vcpuop_set_next_event(unsigned long delta,
481 struct clock_event_device *evt)
482{
483 int cpu = smp_processor_id();
484 struct vcpu_set_singleshot_timer single;
485 int ret;
486
487 WARN_ON(evt->mode != CLOCK_EVT_MODE_ONESHOT);
488
489 single.timeout_abs_ns = get_abs_timeout(delta);
490 single.flags = VCPU_SSHOTTMR_future;
491
492 ret = HYPERVISOR_vcpu_op(VCPUOP_set_singleshot_timer, cpu, &single);
493
494 BUG_ON(ret != 0 && ret != -ETIME);
495
496 return ret;
497}
498
499static const struct clock_event_device xen_vcpuop_clockevent = {
500 .name = "xen",
501 .features = CLOCK_EVT_FEAT_ONESHOT,
502
503 .max_delta_ns = 0xffffffff,
504 .min_delta_ns = TIMER_SLOP,
505
506 .mult = 1,
507 .shift = 0,
508 .rating = 500,
509
510 .set_mode = xen_vcpuop_set_mode,
511 .set_next_event = xen_vcpuop_set_next_event,
512};
513
514static const struct clock_event_device *xen_clockevent =
515 &xen_timerop_clockevent;
516static DEFINE_PER_CPU(struct clock_event_device, xen_clock_events);
517
518static irqreturn_t xen_timer_interrupt(int irq, void *dev_id)
519{
520 struct clock_event_device *evt = &__get_cpu_var(xen_clock_events);
521 irqreturn_t ret;
522
523 ret = IRQ_NONE;
524 if (evt->event_handler) {
525 evt->event_handler(evt);
526 ret = IRQ_HANDLED;
527 }
528
529 do_stolen_accounting();
530
531 return ret;
532}
533
534void xen_setup_timer(int cpu)
535{
536 const char *name;
537 struct clock_event_device *evt;
538 int irq;
539
540 printk(KERN_INFO "installing Xen timer for CPU %d\n", cpu);
541
542 name = kasprintf(GFP_KERNEL, "timer%d", cpu);
543 if (!name)
544 name = "<timer kasprintf failed>";
545
546 irq = bind_virq_to_irqhandler(VIRQ_TIMER, cpu, xen_timer_interrupt,
547 IRQF_DISABLED|IRQF_PERCPU|IRQF_NOBALANCING,
548 name, NULL);
549
550 evt = &per_cpu(xen_clock_events, cpu);
551 memcpy(evt, xen_clockevent, sizeof(*evt));
552
553 evt->cpumask = cpumask_of_cpu(cpu);
554 evt->irq = irq;
555
556 setup_runstate_info(cpu);
557}
558
559void xen_setup_cpu_clockevents(void)
560{
561 BUG_ON(preemptible());
562
563 clockevents_register_device(&__get_cpu_var(xen_clock_events));
564}
565
566__init void xen_time_init(void)
567{
568 int cpu = smp_processor_id();
569
570 get_time_values_from_xen();
571
572 clocksource_register(&xen_clocksource);
573
574 if (HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, cpu, NULL) == 0) {
575 /* Successfully turned off 100Hz tick, so we have the
576 vcpuop-based timer interface */
577 printk(KERN_DEBUG "Xen: using vcpuop timer interface\n");
578 xen_clockevent = &xen_vcpuop_clockevent;
579 }
580
581 /* Set initial system time with full resolution */
582 xen_read_wallclock(&xtime);
583 set_normalized_timespec(&wall_to_monotonic,
584 -xtime.tv_sec, -xtime.tv_nsec);
585
586 tsc_disable = 0;
587
588 xen_setup_timer(cpu);
589 xen_setup_cpu_clockevents();
590}
diff --git a/arch/i386/xen/xen-asm.S b/arch/i386/xen/xen-asm.S
new file mode 100644
index 0000000000..1a43b60c0c
--- /dev/null
+++ b/arch/i386/xen/xen-asm.S
@@ -0,0 +1,291 @@
1/*
2 Asm versions of Xen pv-ops, suitable for either direct use or inlining.
3 The inline versions are the same as the direct-use versions, with the
4 pre- and post-amble chopped off.
5
6 This code is encoded for size rather than absolute efficiency,
7 with a view to being able to inline as much as possible.
8
9 We only bother with direct forms (ie, vcpu in pda) of the operations
10 here; the indirect forms are better handled in C, since they're
11 generally too large to inline anyway.
12 */
13
14#include <linux/linkage.h>
15
16#include <asm/asm-offsets.h>
17#include <asm/thread_info.h>
18#include <asm/percpu.h>
19#include <asm/processor-flags.h>
20#include <asm/segment.h>
21
22#include <xen/interface/xen.h>
23
24#define RELOC(x, v) .globl x##_reloc; x##_reloc=v
25#define ENDPATCH(x) .globl x##_end; x##_end=.
26
27/* Pseudo-flag used for virtual NMI, which we don't implement yet */
28#define XEN_EFLAGS_NMI 0x80000000
29
30/*
31 Enable events. This clears the event mask and tests the pending
32 event status with one and operation. If there are pending
33 events, then enter the hypervisor to get them handled.
34 */
35ENTRY(xen_irq_enable_direct)
36 /* Clear mask and test pending */
37 andw $0x00ff, PER_CPU_VAR(xen_vcpu_info)+XEN_vcpu_info_pending
38 /* Preempt here doesn't matter because that will deal with
39 any pending interrupts. The pending check may end up being
40 run on the wrong CPU, but that doesn't hurt. */
41 jz 1f
422: call check_events
431:
44ENDPATCH(xen_irq_enable_direct)
45 ret
46 ENDPROC(xen_irq_enable_direct)
47 RELOC(xen_irq_enable_direct, 2b+1)
48
49
50/*
51 Disabling events is simply a matter of making the event mask
52 non-zero.
53 */
54ENTRY(xen_irq_disable_direct)
55 movb $1, PER_CPU_VAR(xen_vcpu_info)+XEN_vcpu_info_mask
56ENDPATCH(xen_irq_disable_direct)
57 ret
58 ENDPROC(xen_irq_disable_direct)
59 RELOC(xen_irq_disable_direct, 0)
60
61/*
62 (xen_)save_fl is used to get the current interrupt enable status.
63 Callers expect the status to be in X86_EFLAGS_IF, and other bits
64 may be set in the return value. We take advantage of this by
65 making sure that X86_EFLAGS_IF has the right value (and other bits
66 in that byte are 0), but other bits in the return value are
67 undefined. We need to toggle the state of the bit, because
68 Xen and x86 use opposite senses (mask vs enable).
69 */
70ENTRY(xen_save_fl_direct)
71 testb $0xff, PER_CPU_VAR(xen_vcpu_info)+XEN_vcpu_info_mask
72 setz %ah
73 addb %ah,%ah
74ENDPATCH(xen_save_fl_direct)
75 ret
76 ENDPROC(xen_save_fl_direct)
77 RELOC(xen_save_fl_direct, 0)
78
79
80/*
81 In principle the caller should be passing us a value return
82 from xen_save_fl_direct, but for robustness sake we test only
83 the X86_EFLAGS_IF flag rather than the whole byte. After
84 setting the interrupt mask state, it checks for unmasked
85 pending events and enters the hypervisor to get them delivered
86 if so.
87 */
88ENTRY(xen_restore_fl_direct)
89 testb $X86_EFLAGS_IF>>8, %ah
90 setz PER_CPU_VAR(xen_vcpu_info)+XEN_vcpu_info_mask
91 /* Preempt here doesn't matter because that will deal with
92 any pending interrupts. The pending check may end up being
93 run on the wrong CPU, but that doesn't hurt. */
94
95 /* check for unmasked and pending */
96 cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info)+XEN_vcpu_info_pending
97 jz 1f
982: call check_events
991:
100ENDPATCH(xen_restore_fl_direct)
101 ret
102 ENDPROC(xen_restore_fl_direct)
103 RELOC(xen_restore_fl_direct, 2b+1)
104
105/*
106 This is run where a normal iret would be run, with the same stack setup:
107 8: eflags
108 4: cs
109 esp-> 0: eip
110
111 This attempts to make sure that any pending events are dealt
112 with on return to usermode, but there is a small window in
113 which an event can happen just before entering usermode. If
114 the nested interrupt ends up setting one of the TIF_WORK_MASK
115 pending work flags, they will not be tested again before
116 returning to usermode. This means that a process can end up
117 with pending work, which will be unprocessed until the process
118 enters and leaves the kernel again, which could be an
119 unbounded amount of time. This means that a pending signal or
120 reschedule event could be indefinitely delayed.
121
122 The fix is to notice a nested interrupt in the critical
123 window, and if one occurs, then fold the nested interrupt into
124 the current interrupt stack frame, and re-process it
125 iteratively rather than recursively. This means that it will
126 exit via the normal path, and all pending work will be dealt
127 with appropriately.
128
129 Because the nested interrupt handler needs to deal with the
130 current stack state in whatever form its in, we keep things
131 simple by only using a single register which is pushed/popped
132 on the stack.
133
134 Non-direct iret could be done in the same way, but it would
135 require an annoying amount of code duplication. We'll assume
136 that direct mode will be the common case once the hypervisor
137 support becomes commonplace.
138 */
139ENTRY(xen_iret_direct)
140 /* test eflags for special cases */
141 testl $(X86_EFLAGS_VM | XEN_EFLAGS_NMI), 8(%esp)
142 jnz hyper_iret
143
144 push %eax
145 ESP_OFFSET=4 # bytes pushed onto stack
146
147 /* Store vcpu_info pointer for easy access. Do it this
148 way to avoid having to reload %fs */
149#ifdef CONFIG_SMP
150 GET_THREAD_INFO(%eax)
151 movl TI_cpu(%eax),%eax
152 movl __per_cpu_offset(,%eax,4),%eax
153 lea per_cpu__xen_vcpu_info(%eax),%eax
154#else
155 movl $per_cpu__xen_vcpu_info, %eax
156#endif
157
158 /* check IF state we're restoring */
159 testb $X86_EFLAGS_IF>>8, 8+1+ESP_OFFSET(%esp)
160
161 /* Maybe enable events. Once this happens we could get a
162 recursive event, so the critical region starts immediately
163 afterwards. However, if that happens we don't end up
164 resuming the code, so we don't have to be worried about
165 being preempted to another CPU. */
166 setz XEN_vcpu_info_mask(%eax)
167xen_iret_start_crit:
168
169 /* check for unmasked and pending */
170 cmpw $0x0001, XEN_vcpu_info_pending(%eax)
171
172 /* If there's something pending, mask events again so we
173 can jump back into xen_hypervisor_callback */
174 sete XEN_vcpu_info_mask(%eax)
175
176 popl %eax
177
178 /* From this point on the registers are restored and the stack
179 updated, so we don't need to worry about it if we're preempted */
180iret_restore_end:
181
182 /* Jump to hypervisor_callback after fixing up the stack.
183 Events are masked, so jumping out of the critical
184 region is OK. */
185 je xen_hypervisor_callback
186
187 iret
188xen_iret_end_crit:
189
190hyper_iret:
191 /* put this out of line since its very rarely used */
192 jmp hypercall_page + __HYPERVISOR_iret * 32
193
194 .globl xen_iret_start_crit, xen_iret_end_crit
195
196/*
197 This is called by xen_hypervisor_callback in entry.S when it sees
198 that the EIP at the time of interrupt was between xen_iret_start_crit
199 and xen_iret_end_crit. We're passed the EIP in %eax so we can do
200 a more refined determination of what to do.
201
202 The stack format at this point is:
203 ----------------
204 ss : (ss/esp may be present if we came from usermode)
205 esp :
206 eflags } outer exception info
207 cs }
208 eip }
209 ---------------- <- edi (copy dest)
210 eax : outer eax if it hasn't been restored
211 ----------------
212 eflags } nested exception info
213 cs } (no ss/esp because we're nested
214 eip } from the same ring)
215 orig_eax }<- esi (copy src)
216 - - - - - - - -
217 fs }
218 es }
219 ds } SAVE_ALL state
220 eax }
221 : :
222 ebx }
223 ----------------
224 return addr <- esp
225 ----------------
226
227 In order to deliver the nested exception properly, we need to shift
228 everything from the return addr up to the error code so it
229 sits just under the outer exception info. This means that when we
230 handle the exception, we do it in the context of the outer exception
231 rather than starting a new one.
232
233 The only caveat is that if the outer eax hasn't been
234 restored yet (ie, it's still on stack), we need to insert
235 its value into the SAVE_ALL state before going on, since
236 it's usermode state which we eventually need to restore.
237 */
238ENTRY(xen_iret_crit_fixup)
239 /* offsets +4 for return address */
240
241 /*
242 Paranoia: Make sure we're really coming from userspace.
243 One could imagine a case where userspace jumps into the
244 critical range address, but just before the CPU delivers a GP,
245 it decides to deliver an interrupt instead. Unlikely?
246 Definitely. Easy to avoid? Yes. The Intel documents
247 explicitly say that the reported EIP for a bad jump is the
248 jump instruction itself, not the destination, but some virtual
249 environments get this wrong.
250 */
251 movl PT_CS+4(%esp), %ecx
252 andl $SEGMENT_RPL_MASK, %ecx
253 cmpl $USER_RPL, %ecx
254 je 2f
255
256 lea PT_ORIG_EAX+4(%esp), %esi
257 lea PT_EFLAGS+4(%esp), %edi
258
259 /* If eip is before iret_restore_end then stack
260 hasn't been restored yet. */
261 cmp $iret_restore_end, %eax
262 jae 1f
263
264 movl 0+4(%edi),%eax /* copy EAX */
265 movl %eax, PT_EAX+4(%esp)
266
267 lea ESP_OFFSET(%edi),%edi /* move dest up over saved regs */
268
269 /* set up the copy */
2701: std
271 mov $(PT_EIP+4) / 4, %ecx /* copy ret+saved regs up to orig_eax */
272 rep movsl
273 cld
274
275 lea 4(%edi),%esp /* point esp to new frame */
2762: ret
277
278
279/*
280 Force an event check by making a hypercall,
281 but preserve regs before making the call.
282 */
283check_events:
284 push %eax
285 push %ecx
286 push %edx
287 call force_evtchn_callback
288 pop %edx
289 pop %ecx
290 pop %eax
291 ret
diff --git a/arch/i386/xen/xen-head.S b/arch/i386/xen/xen-head.S
new file mode 100644
index 0000000000..2998d55a00
--- /dev/null
+++ b/arch/i386/xen/xen-head.S
@@ -0,0 +1,36 @@
1/* Xen-specific pieces of head.S, intended to be included in the right
2 place in head.S */
3
4#ifdef CONFIG_XEN
5
6#include <linux/elfnote.h>
7#include <asm/boot.h>
8#include <xen/interface/elfnote.h>
9
10ENTRY(startup_xen)
11 movl %esi,xen_start_info
12 cld
13 movl $(init_thread_union+THREAD_SIZE),%esp
14 jmp xen_start_kernel
15
16.pushsection ".bss.page_aligned"
17 .align PAGE_SIZE_asm
18ENTRY(hypercall_page)
19 .skip 0x1000
20.popsection
21
22 ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz "linux")
23 ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz "2.6")
24 ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz "xen-3.0")
25 ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, .long __PAGE_OFFSET)
26 ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, .long startup_xen)
27 ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, .long hypercall_page)
28 ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz "!writable_page_tables|pae_pgdir_above_4gb")
29#ifdef CONFIG_X86_PAE
30 ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "yes")
31#else
32 ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "no")
33#endif
34 ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic")
35
36#endif /*CONFIG_XEN */
diff --git a/arch/i386/xen/xen-ops.h b/arch/i386/xen/xen-ops.h
new file mode 100644
index 0000000000..b9aaea45f0
--- /dev/null
+++ b/arch/i386/xen/xen-ops.h
@@ -0,0 +1,71 @@
1#ifndef XEN_OPS_H
2#define XEN_OPS_H
3
4#include <linux/init.h>
5
6/* These are code, but not functions. Defined in entry.S */
7extern const char xen_hypervisor_callback[];
8extern const char xen_failsafe_callback[];
9
10void xen_copy_trap_info(struct trap_info *traps);
11
12DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu);
13DECLARE_PER_CPU(unsigned long, xen_cr3);
14
15extern struct start_info *xen_start_info;
16extern struct shared_info *HYPERVISOR_shared_info;
17
18char * __init xen_memory_setup(void);
19void __init xen_arch_setup(void);
20void __init xen_init_IRQ(void);
21
22void xen_setup_timer(int cpu);
23void xen_setup_cpu_clockevents(void);
24unsigned long xen_cpu_khz(void);
25void __init xen_time_init(void);
26unsigned long xen_get_wallclock(void);
27int xen_set_wallclock(unsigned long time);
28unsigned long long xen_sched_clock(void);
29
30void xen_mark_init_mm_pinned(void);
31
32DECLARE_PER_CPU(enum paravirt_lazy_mode, xen_lazy_mode);
33
34static inline unsigned xen_get_lazy_mode(void)
35{
36 return x86_read_percpu(xen_lazy_mode);
37}
38
39void __init xen_fill_possible_map(void);
40
41void __init xen_setup_vcpu_info_placement(void);
42void xen_smp_prepare_boot_cpu(void);
43void xen_smp_prepare_cpus(unsigned int max_cpus);
44int xen_cpu_up(unsigned int cpu);
45void xen_smp_cpus_done(unsigned int max_cpus);
46
47void xen_smp_send_stop(void);
48void xen_smp_send_reschedule(int cpu);
49int xen_smp_call_function (void (*func) (void *info), void *info, int nonatomic,
50 int wait);
51int xen_smp_call_function_single(int cpu, void (*func) (void *info), void *info,
52 int nonatomic, int wait);
53
54int xen_smp_call_function_mask(cpumask_t mask, void (*func)(void *),
55 void *info, int wait);
56
57
58/* Declare an asm function, along with symbols needed to make it
59 inlineable */
60#define DECL_ASM(ret, name, ...) \
61 ret name(__VA_ARGS__); \
62 extern char name##_end[]; \
63 extern char name##_reloc[] \
64
65DECL_ASM(void, xen_irq_enable_direct, void);
66DECL_ASM(void, xen_irq_disable_direct, void);
67DECL_ASM(unsigned long, xen_save_fl_direct, void);
68DECL_ASM(void, xen_restore_fl_direct, unsigned long);
69
70void xen_iret_direct(void);
71#endif /* XEN_OPS_H */
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index de1bff6599..616c96e734 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -520,8 +520,10 @@ config PCI
520 here unless you are using a simulator without PCI support. 520 here unless you are using a simulator without PCI support.
521 521
522config PCI_DOMAINS 522config PCI_DOMAINS
523 bool 523 def_bool PCI
524 default PCI 524
525config PCI_SYSCALL
526 def_bool PCI
525 527
526source "drivers/pci/pcie/Kconfig" 528source "drivers/pci/pcie/Kconfig"
527 529
@@ -580,8 +582,8 @@ menu "Instrumentation Support"
580source "arch/ia64/oprofile/Kconfig" 582source "arch/ia64/oprofile/Kconfig"
581 583
582config KPROBES 584config KPROBES
583 bool "Kprobes (EXPERIMENTAL)" 585 bool "Kprobes"
584 depends on KALLSYMS && EXPERIMENTAL && MODULES 586 depends on KALLSYMS && MODULES
585 help 587 help
586 Kprobes allows you to trap at almost any kernel address and 588 Kprobes allows you to trap at almost any kernel address and
587 execute a callback function. register_kprobe() establishes 589 execute a callback function. register_kprobe() establishes
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index c1dca226b4..cd4adf52f1 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -34,6 +34,7 @@
34#include <linux/efi.h> 34#include <linux/efi.h>
35#include <linux/nodemask.h> 35#include <linux/nodemask.h>
36#include <linux/bitops.h> /* hweight64() */ 36#include <linux/bitops.h> /* hweight64() */
37#include <linux/crash_dump.h>
37 38
38#include <asm/delay.h> /* ia64_get_itc() */ 39#include <asm/delay.h> /* ia64_get_itc() */
39#include <asm/io.h> 40#include <asm/io.h>
@@ -43,6 +44,8 @@
43 44
44#include <asm/acpi-ext.h> 45#include <asm/acpi-ext.h>
45 46
47extern int swiotlb_late_init_with_default_size (size_t size);
48
46#define PFX "IOC: " 49#define PFX "IOC: "
47 50
48/* 51/*
@@ -2026,11 +2029,24 @@ sba_init(void)
2026 if (!ia64_platform_is("hpzx1") && !ia64_platform_is("hpzx1_swiotlb")) 2029 if (!ia64_platform_is("hpzx1") && !ia64_platform_is("hpzx1_swiotlb"))
2027 return 0; 2030 return 0;
2028 2031
2032#if defined(CONFIG_IA64_GENERIC) && defined(CONFIG_CRASH_DUMP)
2033 /* If we are booting a kdump kernel, the sba_iommu will
2034 * cause devices that were not shutdown properly to MCA
2035 * as soon as they are turned back on. Our only option for
2036 * a successful kdump kernel boot is to use the swiotlb.
2037 */
2038 if (elfcorehdr_addr < ELFCORE_ADDR_MAX) {
2039 if (swiotlb_late_init_with_default_size(64 * (1<<20)) != 0)
2040 panic("Unable to initialize software I/O TLB:"
2041 " Try machvec=dig boot option");
2042 machvec_init("dig");
2043 return 0;
2044 }
2045#endif
2046
2029 acpi_bus_register_driver(&acpi_sba_ioc_driver); 2047 acpi_bus_register_driver(&acpi_sba_ioc_driver);
2030 if (!ioc_list) { 2048 if (!ioc_list) {
2031#ifdef CONFIG_IA64_GENERIC 2049#ifdef CONFIG_IA64_GENERIC
2032 extern int swiotlb_late_init_with_default_size (size_t size);
2033
2034 /* 2050 /*
2035 * If we didn't find something sba_iommu can claim, we 2051 * If we didn't find something sba_iommu can claim, we
2036 * need to setup the swiotlb and switch to the dig machvec. 2052 * need to setup the swiotlb and switch to the dig machvec.
diff --git a/arch/ia64/hp/sim/boot/fw-emu.c b/arch/ia64/hp/sim/boot/fw-emu.c
index 300acd913d..1189d035d3 100644
--- a/arch/ia64/hp/sim/boot/fw-emu.c
+++ b/arch/ia64/hp/sim/boot/fw-emu.c
@@ -329,11 +329,6 @@ sys_fw_init (const char *args, int arglen)
329 strcpy(sal_systab->product_id, "HP-simulator"); 329 strcpy(sal_systab->product_id, "HP-simulator");
330#endif 330#endif
331 331
332#ifdef CONFIG_IA64_SDV
333 strcpy(sal_systab->oem_id, "Intel");
334 strcpy(sal_systab->product_id, "SDV");
335#endif
336
337 /* fill in an entry point: */ 332 /* fill in an entry point: */
338 sal_ed->type = SAL_DESC_ENTRY_POINT; 333 sal_ed->type = SAL_DESC_ENTRY_POINT;
339 sal_ed->pal_proc = __pa(pal_desc[0]); 334 sal_ed->pal_proc = __pa(pal_desc[0]);
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index 324ea7565e..ef252df50e 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -36,10 +36,6 @@
36#include <asm/hw_irq.h> 36#include <asm/hw_irq.h>
37#include <asm/uaccess.h> 37#include <asm/uaccess.h>
38 38
39#ifdef CONFIG_KDB
40# include <linux/kdb.h>
41#endif
42
43#undef SIMSERIAL_DEBUG /* define this to get some debug information */ 39#undef SIMSERIAL_DEBUG /* define this to get some debug information */
44 40
45#define KEYBOARD_INTR 3 /* must match with simulator! */ 41#define KEYBOARD_INTR 3 /* must match with simulator! */
diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c
index c05bda6623..6f4d3d06f0 100644
--- a/arch/ia64/ia32/binfmt_elf32.c
+++ b/arch/ia64/ia32/binfmt_elf32.c
@@ -261,7 +261,7 @@ elf32_set_personality (void)
261} 261}
262 262
263static unsigned long 263static unsigned long
264elf32_map (struct file *filep, unsigned long addr, struct elf_phdr *eppnt, int prot, int type) 264elf32_map (struct file *filep, unsigned long addr, struct elf_phdr *eppnt, int prot, int type, unsigned long unused)
265{ 265{
266 unsigned long pgoff = (eppnt->p_vaddr) & ~IA32_PAGE_MASK; 266 unsigned long pgoff = (eppnt->p_vaddr) & ~IA32_PAGE_MASK;
267 267
diff --git a/arch/ia64/ia32/ia32_entry.S b/arch/ia64/ia32/ia32_entry.S
index 99b665e2b1..06efd1f9b8 100644
--- a/arch/ia64/ia32/ia32_entry.S
+++ b/arch/ia64/ia32/ia32_entry.S
@@ -304,7 +304,7 @@ ia32_syscall_table:
304 data8 sys_ni_syscall /* init_module */ 304 data8 sys_ni_syscall /* init_module */
305 data8 sys_ni_syscall /* delete_module */ 305 data8 sys_ni_syscall /* delete_module */
306 data8 sys_ni_syscall /* get_kernel_syms */ /* 130 */ 306 data8 sys_ni_syscall /* get_kernel_syms */ /* 130 */
307 data8 sys_quotactl 307 data8 sys32_quotactl
308 data8 sys_getpgid 308 data8 sys_getpgid
309 data8 sys_fchdir 309 data8 sys_fchdir
310 data8 sys_ni_syscall /* sys_bdflush */ 310 data8 sys_ni_syscall /* sys_bdflush */
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 75ec3478d8..73ca86d038 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -28,6 +28,7 @@
28#include <linux/time.h> 28#include <linux/time.h>
29#include <linux/efi.h> 29#include <linux/efi.h>
30#include <linux/kexec.h> 30#include <linux/kexec.h>
31#include <linux/mm.h>
31 32
32#include <asm/io.h> 33#include <asm/io.h>
33#include <asm/kregs.h> 34#include <asm/kregs.h>
diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S
index 8589e84a27..3f926c2dc7 100644
--- a/arch/ia64/kernel/fsys.S
+++ b/arch/ia64/kernel/fsys.S
@@ -247,6 +247,9 @@ ENTRY(fsys_gettimeofday)
247.time_redo: 247.time_redo:
248 .pred.rel.mutex p8,p9,p10 248 .pred.rel.mutex p8,p9,p10
249 ld4.acq r28 = [r29] // xtime_lock.sequence. Must come first for locking purposes 249 ld4.acq r28 = [r29] // xtime_lock.sequence. Must come first for locking purposes
250 ;;
251 and r28 = ~1,r28 // Make sequence even to force retry if odd
252 ;;
250(p8) mov r2 = ar.itc // CPU_TIMER. 36 clocks latency!!! 253(p8) mov r2 = ar.itc // CPU_TIMER. 36 clocks latency!!!
251 add r22 = IA64_TIME_INTERPOLATOR_LAST_COUNTER_OFFSET,r20 254 add r22 = IA64_TIME_INTERPOLATOR_LAST_COUNTER_OFFSET,r20
252(p9) ld8 r2 = [r30] // readq(ti->address). Could also have latency issues.. 255(p9) ld8 r2 = [r30] // readq(ti->address). Could also have latency issues..
@@ -284,7 +287,6 @@ EX(.fail_efault, probe.w.fault r31, 3) // This takes 5 cycles and we have spare
284(p15) ld8 r17 = [r19],-IA64_TIMESPEC_TV_NSEC_OFFSET 287(p15) ld8 r17 = [r19],-IA64_TIMESPEC_TV_NSEC_OFFSET
285(p7) cmp.ne p7,p0 = r25,r3 // if cmpxchg not successful redo 288(p7) cmp.ne p7,p0 = r25,r3 // if cmpxchg not successful redo
286 // simulate tbit.nz.or p7,p0 = r28,0 289 // simulate tbit.nz.or p7,p0 = r28,0
287 and r28 = ~1,r28 // Make sequence even to force retry if odd
288 getf.sig r2 = f8 290 getf.sig r2 = f8
289 mf 291 mf
290 add r8 = r8,r18 // Add time interpolator offset 292 add r8 = r8,r18 // Add time interpolator offset
diff --git a/arch/ia64/kernel/gate.S b/arch/ia64/kernel/gate.S
index 3274850cf2..74b1ccce4e 100644
--- a/arch/ia64/kernel/gate.S
+++ b/arch/ia64/kernel/gate.S
@@ -30,6 +30,7 @@
30 .previous 30 .previous
31#define BRL_COND_FSYS_BUBBLE_DOWN(pr) \ 31#define BRL_COND_FSYS_BUBBLE_DOWN(pr) \
32[1:](pr)brl.cond.sptk 0; \ 32[1:](pr)brl.cond.sptk 0; \
33 ;; \
33 .xdata4 ".data.patch.brl_fsys_bubble_down", 1b-. 34 .xdata4 ".data.patch.brl_fsys_bubble_down", 1b-.
34 35
35GLOBAL_ENTRY(__kernel_syscall_via_break) 36GLOBAL_ENTRY(__kernel_syscall_via_break)
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 1ead5ea6c5..4b5daa3cc0 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -57,6 +57,9 @@
57 * 57 *
58 * 2006-09-15 Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> 58 * 2006-09-15 Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
59 * Add printing support for MCA/INIT. 59 * Add printing support for MCA/INIT.
60 *
61 * 2007-04-27 Russ Anderson <rja@sgi.com>
62 * Support multiple cpus going through OS_MCA in the same event.
60 */ 63 */
61#include <linux/types.h> 64#include <linux/types.h>
62#include <linux/init.h> 65#include <linux/init.h>
@@ -96,7 +99,6 @@
96#endif 99#endif
97 100
98/* Used by mca_asm.S */ 101/* Used by mca_asm.S */
99u32 ia64_mca_serialize;
100DEFINE_PER_CPU(u64, ia64_mca_data); /* == __per_cpu_mca[smp_processor_id()] */ 102DEFINE_PER_CPU(u64, ia64_mca_data); /* == __per_cpu_mca[smp_processor_id()] */
101DEFINE_PER_CPU(u64, ia64_mca_per_cpu_pte); /* PTE to map per-CPU area */ 103DEFINE_PER_CPU(u64, ia64_mca_per_cpu_pte); /* PTE to map per-CPU area */
102DEFINE_PER_CPU(u64, ia64_mca_pal_pte); /* PTE to map PAL code */ 104DEFINE_PER_CPU(u64, ia64_mca_pal_pte); /* PTE to map PAL code */
@@ -963,11 +965,12 @@ ia64_mca_modify_original_stack(struct pt_regs *regs,
963 goto no_mod; 965 goto no_mod;
964 } 966 }
965 967
968 if (r13 != sos->prev_IA64_KR_CURRENT) {
969 msg = "inconsistent previous current and r13";
970 goto no_mod;
971 }
972
966 if (!mca_recover_range(ms->pmsa_iip)) { 973 if (!mca_recover_range(ms->pmsa_iip)) {
967 if (r13 != sos->prev_IA64_KR_CURRENT) {
968 msg = "inconsistent previous current and r13";
969 goto no_mod;
970 }
971 if ((r12 - r13) >= KERNEL_STACK_SIZE) { 974 if ((r12 - r13) >= KERNEL_STACK_SIZE) {
972 msg = "inconsistent r12 and r13"; 975 msg = "inconsistent r12 and r13";
973 goto no_mod; 976 goto no_mod;
@@ -1187,6 +1190,13 @@ all_in:
1187 * further MCA logging is enabled by clearing logs. 1190 * further MCA logging is enabled by clearing logs.
1188 * Monarch also has the duty of sending wakeup-IPIs to pull the 1191 * Monarch also has the duty of sending wakeup-IPIs to pull the
1189 * slave processors out of rendezvous spinloop. 1192 * slave processors out of rendezvous spinloop.
1193 *
1194 * If multiple processors call into OS_MCA, the first will become
1195 * the monarch. Subsequent cpus will be recorded in the mca_cpu
1196 * bitmask. After the first monarch has processed its MCA, it
1197 * will wake up the next cpu in the mca_cpu bitmask and then go
1198 * into the rendezvous loop. When all processors have serviced
1199 * their MCA, the last monarch frees up the rest of the processors.
1190 */ 1200 */
1191void 1201void
1192ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw, 1202ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
@@ -1196,16 +1206,32 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
1196 struct task_struct *previous_current; 1206 struct task_struct *previous_current;
1197 struct ia64_mca_notify_die nd = 1207 struct ia64_mca_notify_die nd =
1198 { .sos = sos, .monarch_cpu = &monarch_cpu }; 1208 { .sos = sos, .monarch_cpu = &monarch_cpu };
1209 static atomic_t mca_count;
1210 static cpumask_t mca_cpu;
1199 1211
1212 if (atomic_add_return(1, &mca_count) == 1) {
1213 monarch_cpu = cpu;
1214 sos->monarch = 1;
1215 } else {
1216 cpu_set(cpu, mca_cpu);
1217 sos->monarch = 0;
1218 }
1200 mprintk(KERN_INFO "Entered OS MCA handler. PSP=%lx cpu=%d " 1219 mprintk(KERN_INFO "Entered OS MCA handler. PSP=%lx cpu=%d "
1201 "monarch=%ld\n", sos->proc_state_param, cpu, sos->monarch); 1220 "monarch=%ld\n", sos->proc_state_param, cpu, sos->monarch);
1202 1221
1203 previous_current = ia64_mca_modify_original_stack(regs, sw, sos, "MCA"); 1222 previous_current = ia64_mca_modify_original_stack(regs, sw, sos, "MCA");
1204 monarch_cpu = cpu; 1223
1205 if (notify_die(DIE_MCA_MONARCH_ENTER, "MCA", regs, (long)&nd, 0, 0) 1224 if (notify_die(DIE_MCA_MONARCH_ENTER, "MCA", regs, (long)&nd, 0, 0)
1206 == NOTIFY_STOP) 1225 == NOTIFY_STOP)
1207 ia64_mca_spin(__FUNCTION__); 1226 ia64_mca_spin(__FUNCTION__);
1208 ia64_wait_for_slaves(cpu, "MCA"); 1227 if (sos->monarch) {
1228 ia64_wait_for_slaves(cpu, "MCA");
1229 } else {
1230 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_CONCURRENT_MCA;
1231 while (cpu_isset(cpu, mca_cpu))
1232 cpu_relax(); /* spin until monarch wakes us */
1233 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_NOTDONE;
1234 }
1209 1235
1210 /* Wakeup all the processors which are spinning in the rendezvous loop. 1236 /* Wakeup all the processors which are spinning in the rendezvous loop.
1211 * They will leave SAL, then spin in the OS with interrupts disabled 1237 * They will leave SAL, then spin in the OS with interrupts disabled
@@ -1244,6 +1270,26 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
1244 == NOTIFY_STOP) 1270 == NOTIFY_STOP)
1245 ia64_mca_spin(__FUNCTION__); 1271 ia64_mca_spin(__FUNCTION__);
1246 1272
1273
1274 if (atomic_dec_return(&mca_count) > 0) {
1275 int i;
1276
1277 /* wake up the next monarch cpu,
1278 * and put this cpu in the rendez loop.
1279 */
1280 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_CONCURRENT_MCA;
1281 for_each_online_cpu(i) {
1282 if (cpu_isset(i, mca_cpu)) {
1283 monarch_cpu = i;
1284 cpu_clear(i, mca_cpu); /* wake next cpu */
1285 while (monarch_cpu != -1)
1286 cpu_relax(); /* spin until last cpu leaves */
1287 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_NOTDONE;
1288 set_curr_task(cpu, previous_current);
1289 return;
1290 }
1291 }
1292 }
1247 set_curr_task(cpu, previous_current); 1293 set_curr_task(cpu, previous_current);
1248 monarch_cpu = -1; 1294 monarch_cpu = -1;
1249} 1295}
diff --git a/arch/ia64/kernel/mca_asm.S b/arch/ia64/kernel/mca_asm.S
index 8c9c26aa6a..0f5965fcdf 100644
--- a/arch/ia64/kernel/mca_asm.S
+++ b/arch/ia64/kernel/mca_asm.S
@@ -133,14 +133,6 @@ ia64_do_tlb_purge:
133//StartMain//////////////////////////////////////////////////////////////////// 133//StartMain////////////////////////////////////////////////////////////////////
134 134
135ia64_os_mca_dispatch: 135ia64_os_mca_dispatch:
136 // Serialize all MCA processing
137 mov r3=1;;
138 LOAD_PHYSICAL(p0,r2,ia64_mca_serialize);;
139ia64_os_mca_spin:
140 xchg4 r4=[r2],r3;;
141 cmp.ne p6,p0=r4,r0
142(p6) br ia64_os_mca_spin
143
144 mov r3=IA64_MCA_CPU_MCA_STACK_OFFSET // use the MCA stack 136 mov r3=IA64_MCA_CPU_MCA_STACK_OFFSET // use the MCA stack
145 LOAD_PHYSICAL(p0,r2,1f) // return address 137 LOAD_PHYSICAL(p0,r2,1f) // return address
146 mov r19=1 // All MCA events are treated as monarch (for now) 138 mov r19=1 // All MCA events are treated as monarch (for now)
@@ -291,10 +283,6 @@ END(ia64_os_mca_virtual_begin)
291 283
292 mov b0=r12 // SAL_CHECK return address 284 mov b0=r12 // SAL_CHECK return address
293 285
294 // release lock
295 LOAD_PHYSICAL(p0,r3,ia64_mca_serialize);;
296 st4.rel [r3]=r0
297
298 br b0 286 br b0
299 287
300//EndMain////////////////////////////////////////////////////////////////////// 288//EndMain//////////////////////////////////////////////////////////////////////
diff --git a/arch/ia64/kernel/mca_drv_asm.S b/arch/ia64/kernel/mca_drv_asm.S
index f2d4900751..3bccb06c8d 100644
--- a/arch/ia64/kernel/mca_drv_asm.S
+++ b/arch/ia64/kernel/mca_drv_asm.S
@@ -40,7 +40,11 @@ GLOBAL_ENTRY(mca_handler_bhhook)
40 mov b6=loc1 40 mov b6=loc1
41 ;; 41 ;;
42 mov loc1=rp 42 mov loc1=rp
43 ssm psr.i | psr.ic 43 ssm psr.ic
44 ;;
45 srlz.i
46 ;;
47 ssm psr.i
44 br.call.sptk.many rp=b6 // does not return ... 48 br.call.sptk.many rp=b6 // does not return ...
45 ;; 49 ;;
46 mov ar.pfs=loc0 50 mov ar.pfs=loc0
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index af73b8dfde..fa40cba433 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -513,7 +513,8 @@ copy_thread (int nr, unsigned long clone_flags,
513static void 513static void
514do_copy_task_regs (struct task_struct *task, struct unw_frame_info *info, void *arg) 514do_copy_task_regs (struct task_struct *task, struct unw_frame_info *info, void *arg)
515{ 515{
516 unsigned long mask, sp, nat_bits = 0, ip, ar_rnat, urbs_end, cfm; 516 unsigned long mask, sp, nat_bits = 0, ar_rnat, urbs_end, cfm;
517 unsigned long uninitialized_var(ip); /* GCC be quiet */
517 elf_greg_t *dst = arg; 518 elf_greg_t *dst = arg;
518 struct pt_regs *pt; 519 struct pt_regs *pt;
519 char nat; 520 char nat;
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index eaa6a24bc0..4d9864cc92 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -390,10 +390,6 @@ early_console_setup (char *cmdline)
390 if (!efi_setup_pcdp_console(cmdline)) 390 if (!efi_setup_pcdp_console(cmdline))
391 earlycons++; 391 earlycons++;
392#endif 392#endif
393#ifdef CONFIG_SERIAL_8250_CONSOLE
394 if (!early_serial_console_init(cmdline))
395 earlycons++;
396#endif
397 393
398 return (earlycons) ? 0 : -1; 394 return (earlycons) ? 0 : -1;
399} 395}
@@ -805,7 +801,6 @@ static void __cpuinit
805get_max_cacheline_size (void) 801get_max_cacheline_size (void)
806{ 802{
807 unsigned long line_size, max = 1; 803 unsigned long line_size, max = 1;
808 unsigned int cache_size = 0;
809 u64 l, levels, unique_caches; 804 u64 l, levels, unique_caches;
810 pal_cache_config_info_t cci; 805 pal_cache_config_info_t cci;
811 s64 status; 806 s64 status;
@@ -835,8 +830,6 @@ get_max_cacheline_size (void)
835 line_size = 1 << cci.pcci_line_size; 830 line_size = 1 << cci.pcci_line_size;
836 if (line_size > max) 831 if (line_size > max)
837 max = line_size; 832 max = line_size;
838 if (cache_size < cci.pcci_cache_size)
839 cache_size = cci.pcci_cache_size;
840 if (!cci.pcci_unified) { 833 if (!cci.pcci_unified) {
841 status = ia64_pal_cache_config_info(l, 834 status = ia64_pal_cache_config_info(l,
842 /* cache_type (instruction)= */ 1, 835 /* cache_type (instruction)= */ 1,
@@ -853,9 +846,6 @@ get_max_cacheline_size (void)
853 ia64_i_cache_stride_shift = cci.pcci_stride; 846 ia64_i_cache_stride_shift = cci.pcci_stride;
854 } 847 }
855 out: 848 out:
856#ifdef CONFIG_SMP
857 max_cache_size = max(max_cache_size, cache_size);
858#endif
859 if (max > ia64_max_cacheline_size) 849 if (max > ia64_max_cacheline_size)
860 ia64_max_cacheline_size = max; 850 ia64_max_cacheline_size = max;
861} 851}
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index a06667c7ac..3486fe7d6e 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -18,7 +18,6 @@
18#include <linux/time.h> 18#include <linux/time.h>
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/efi.h> 20#include <linux/efi.h>
21#include <linux/profile.h>
22#include <linux/timex.h> 21#include <linux/timex.h>
23 22
24#include <asm/machvec.h> 23#include <asm/machvec.h>
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c
index 15ad85da15..3aeaf15e46 100644
--- a/arch/ia64/kernel/traps.c
+++ b/arch/ia64/kernel/traps.c
@@ -69,6 +69,7 @@ die (const char *str, struct pt_regs *regs, long err)
69 69
70 bust_spinlocks(0); 70 bust_spinlocks(0);
71 die.lock_owner = -1; 71 die.lock_owner = -1;
72 add_taint(TAINT_DIE);
72 spin_unlock_irq(&die.lock); 73 spin_unlock_irq(&die.lock);
73 74
74 if (panic_on_oops) 75 if (panic_on_oops)
diff --git a/arch/ia64/kernel/unwind.c b/arch/ia64/kernel/unwind.c
index b0b08b5f3e..c1bdb51318 100644
--- a/arch/ia64/kernel/unwind.c
+++ b/arch/ia64/kernel/unwind.c
@@ -1856,11 +1856,19 @@ find_save_locs (struct unw_frame_info *info)
1856 return 0; 1856 return 0;
1857} 1857}
1858 1858
1859static int
1860unw_valid(const struct unw_frame_info *info, unsigned long* p)
1861{
1862 unsigned long loc = (unsigned long)p;
1863 return (loc >= info->regstk.limit && loc < info->regstk.top) ||
1864 (loc >= info->memstk.top && loc < info->memstk.limit);
1865}
1866
1859int 1867int
1860unw_unwind (struct unw_frame_info *info) 1868unw_unwind (struct unw_frame_info *info)
1861{ 1869{
1862 unsigned long prev_ip, prev_sp, prev_bsp; 1870 unsigned long prev_ip, prev_sp, prev_bsp;
1863 unsigned long ip, pr, num_regs, rp_loc, pfs_loc; 1871 unsigned long ip, pr, num_regs;
1864 STAT(unsigned long start, flags;) 1872 STAT(unsigned long start, flags;)
1865 int retval; 1873 int retval;
1866 1874
@@ -1871,8 +1879,7 @@ unw_unwind (struct unw_frame_info *info)
1871 prev_bsp = info->bsp; 1879 prev_bsp = info->bsp;
1872 1880
1873 /* validate the return IP pointer */ 1881 /* validate the return IP pointer */
1874 rp_loc = (unsigned long) info->rp_loc; 1882 if (!unw_valid(info, info->rp_loc)) {
1875 if ((rp_loc < info->regstk.limit) || (rp_loc > info->regstk.top)) {
1876 /* FIXME: should really be level 0 but it occurs too often. KAO */ 1883 /* FIXME: should really be level 0 but it occurs too often. KAO */
1877 UNW_DPRINT(1, "unwind.%s: failed to locate return link (ip=0x%lx)!\n", 1884 UNW_DPRINT(1, "unwind.%s: failed to locate return link (ip=0x%lx)!\n",
1878 __FUNCTION__, info->ip); 1885 __FUNCTION__, info->ip);
@@ -1888,8 +1895,7 @@ unw_unwind (struct unw_frame_info *info)
1888 } 1895 }
1889 1896
1890 /* validate the previous stack frame pointer */ 1897 /* validate the previous stack frame pointer */
1891 pfs_loc = (unsigned long) info->pfs_loc; 1898 if (!unw_valid(info, info->pfs_loc)) {
1892 if ((pfs_loc < info->regstk.limit) || (pfs_loc > info->regstk.top)) {
1893 UNW_DPRINT(0, "unwind.%s: failed to locate ar.pfs!\n", __FUNCTION__); 1899 UNW_DPRINT(0, "unwind.%s: failed to locate ar.pfs!\n", __FUNCTION__);
1894 STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags)); 1900 STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
1895 return -1; 1901 return -1;
diff --git a/arch/ia64/lib/checksum.c b/arch/ia64/lib/checksum.c
index 4411d9baeb..9fc955026f 100644
--- a/arch/ia64/lib/checksum.c
+++ b/arch/ia64/lib/checksum.c
@@ -60,6 +60,7 @@ csum_tcpudp_nofold (__be32 saddr, __be32 daddr, unsigned short len,
60 result = (result & 0xffffffff) + (result >> 32); 60 result = (result & 0xffffffff) + (result >> 32);
61 return (__force __wsum)result; 61 return (__force __wsum)result;
62} 62}
63EXPORT_SYMBOL(csum_tcpudp_nofold);
63 64
64extern unsigned long do_csum (const unsigned char *, long); 65extern unsigned long do_csum (const unsigned char *, long);
65 66
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
index 1346b7f053..d22861c5b0 100644
--- a/arch/ia64/mm/hugetlbpage.c
+++ b/arch/ia64/mm/hugetlbpage.c
@@ -15,6 +15,7 @@
15#include <linux/pagemap.h> 15#include <linux/pagemap.h>
16#include <linux/slab.h> 16#include <linux/slab.h>
17#include <linux/sysctl.h> 17#include <linux/sysctl.h>
18#include <linux/log2.h>
18#include <asm/mman.h> 19#include <asm/mman.h>
19#include <asm/pgalloc.h> 20#include <asm/pgalloc.h>
20#include <asm/tlb.h> 21#include <asm/tlb.h>
@@ -182,7 +183,7 @@ static int __init hugetlb_setup_sz(char *str)
182 tr_pages = 0x15557000UL; 183 tr_pages = 0x15557000UL;
183 184
184 size = memparse(str, &str); 185 size = memparse(str, &str);
185 if (*str || (size & (size-1)) || !(tr_pages & size) || 186 if (*str || !is_power_of_2(size) || !(tr_pages & size) ||
186 size <= PAGE_SIZE || 187 size <= PAGE_SIZE ||
187 size >= (1UL << PAGE_SHIFT << MAX_ORDER)) { 188 size >= (1UL << PAGE_SHIFT << MAX_ORDER)) {
188 printk(KERN_WARNING "Invalid huge page size specified\n"); 189 printk(KERN_WARNING "Invalid huge page size specified\n");
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c
index fa4e6d4810..1682fc6390 100644
--- a/arch/ia64/mm/tlb.c
+++ b/arch/ia64/mm/tlb.c
@@ -175,7 +175,7 @@ EXPORT_SYMBOL(flush_tlb_range);
175void __devinit 175void __devinit
176ia64_tlb_init (void) 176ia64_tlb_init (void)
177{ 177{
178 ia64_ptce_info_t ptce_info; 178 ia64_ptce_info_t uninitialized_var(ptce_info); /* GCC be quiet */
179 unsigned long tr_pgbits; 179 unsigned long tr_pgbits;
180 long status; 180 long status;
181 181
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 73696b4a2e..07d0e92742 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -591,6 +591,9 @@ int
591pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma, 591pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma,
592 enum pci_mmap_state mmap_state, int write_combine) 592 enum pci_mmap_state mmap_state, int write_combine)
593{ 593{
594 unsigned long size = vma->vm_end - vma->vm_start;
595 pgprot_t prot;
596
594 /* 597 /*
595 * I/O space cannot be accessed via normal processor loads and 598 * I/O space cannot be accessed via normal processor loads and
596 * stores on this platform. 599 * stores on this platform.
@@ -604,15 +607,24 @@ pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma,
604 */ 607 */
605 return -EINVAL; 608 return -EINVAL;
606 609
610 if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size))
611 return -EINVAL;
612
613 prot = phys_mem_access_prot(NULL, vma->vm_pgoff, size,
614 vma->vm_page_prot);
615
607 /* 616 /*
608 * Leave vm_pgoff as-is, the PCI space address is the physical 617 * If the user requested WC, the kernel uses UC or WC for this region,
609 * address on this platform. 618 * and the chipset supports WC, we can use WC. Otherwise, we have to
619 * use the same attribute the kernel uses.
610 */ 620 */
611 if (write_combine && efi_range_is_wc(vma->vm_start, 621 if (write_combine &&
612 vma->vm_end - vma->vm_start)) 622 ((pgprot_val(prot) & _PAGE_MA_MASK) == _PAGE_MA_UC ||
623 (pgprot_val(prot) & _PAGE_MA_MASK) == _PAGE_MA_WC) &&
624 efi_range_is_wc(vma->vm_start, vma->vm_end - vma->vm_start))
613 vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); 625 vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
614 else 626 else
615 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); 627 vma->vm_page_prot = prot;
616 628
617 if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, 629 if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
618 vma->vm_end - vma->vm_start, vma->vm_page_prot)) 630 vma->vm_end - vma->vm_start, vma->vm_page_prot))
diff --git a/arch/ia64/sn/kernel/io_acpi_init.c b/arch/ia64/sn/kernel/io_acpi_init.c
index c6216f454f..3c7178f5dc 100644
--- a/arch/ia64/sn/kernel/io_acpi_init.c
+++ b/arch/ia64/sn/kernel/io_acpi_init.c
@@ -418,7 +418,7 @@ sn_acpi_slot_fixup(struct pci_dev *dev)
418 void __iomem *addr; 418 void __iomem *addr;
419 struct pcidev_info *pcidev_info = NULL; 419 struct pcidev_info *pcidev_info = NULL;
420 struct sn_irq_info *sn_irq_info = NULL; 420 struct sn_irq_info *sn_irq_info = NULL;
421 size_t size; 421 size_t image_size, size;
422 422
423 if (sn_acpi_get_pcidev_info(dev, &pcidev_info, &sn_irq_info)) { 423 if (sn_acpi_get_pcidev_info(dev, &pcidev_info, &sn_irq_info)) {
424 panic("%s: Failure obtaining pcidev_info for %s\n", 424 panic("%s: Failure obtaining pcidev_info for %s\n",
@@ -428,17 +428,16 @@ sn_acpi_slot_fixup(struct pci_dev *dev)
428 if (pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE]) { 428 if (pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE]) {
429 /* 429 /*
430 * A valid ROM image exists and has been shadowed by the 430 * A valid ROM image exists and has been shadowed by the
431 * PROM. Setup the pci_dev ROM resource to point to 431 * PROM. Setup the pci_dev ROM resource with the address
432 * the shadowed copy. 432 * of the shadowed copy, and the actual length of the ROM image.
433 */ 433 */
434 size = dev->resource[PCI_ROM_RESOURCE].end - 434 size = pci_resource_len(dev, PCI_ROM_RESOURCE);
435 dev->resource[PCI_ROM_RESOURCE].start; 435 addr = ioremap(pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE],
436 addr = 436 size);
437 ioremap(pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE], 437 image_size = pci_get_rom_size(addr, size);
438 size);
439 dev->resource[PCI_ROM_RESOURCE].start = (unsigned long) addr; 438 dev->resource[PCI_ROM_RESOURCE].start = (unsigned long) addr;
440 dev->resource[PCI_ROM_RESOURCE].end = 439 dev->resource[PCI_ROM_RESOURCE].end =
441 (unsigned long) addr + size; 440 (unsigned long) addr + image_size - 1;
442 dev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_BIOS_COPY; 441 dev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_BIOS_COPY;
443 } 442 }
444 sn_pci_fixup_slot(dev, pcidev_info, sn_irq_info); 443 sn_pci_fixup_slot(dev, pcidev_info, sn_irq_info);
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c
index 6b10e5d284..906b93674b 100644
--- a/arch/ia64/sn/kernel/io_init.c
+++ b/arch/ia64/sn/kernel/io_init.c
@@ -259,9 +259,23 @@ sn_io_slot_fixup(struct pci_dev *dev)
259 insert_resource(&ioport_resource, &dev->resource[idx]); 259 insert_resource(&ioport_resource, &dev->resource[idx]);
260 else 260 else
261 insert_resource(&iomem_resource, &dev->resource[idx]); 261 insert_resource(&iomem_resource, &dev->resource[idx]);
262 /* If ROM, mark as shadowed in PROM */ 262 /*
263 if (idx == PCI_ROM_RESOURCE) 263 * If ROM, set the actual ROM image size, and mark as
264 dev->resource[idx].flags |= IORESOURCE_ROM_BIOS_COPY; 264 * shadowed in PROM.
265 */
266 if (idx == PCI_ROM_RESOURCE) {
267 size_t image_size;
268 void __iomem *rom;
269
270 rom = ioremap(pci_resource_start(dev, PCI_ROM_RESOURCE),
271 size + 1);
272 image_size = pci_get_rom_size(rom, size + 1);
273 dev->resource[PCI_ROM_RESOURCE].end =
274 dev->resource[PCI_ROM_RESOURCE].start +
275 image_size - 1;
276 dev->resource[PCI_ROM_RESOURCE].flags |=
277 IORESOURCE_ROM_BIOS_COPY;
278 }
265 } 279 }
266 /* Create a pci_window in the pci_controller struct for 280 /* Create a pci_window in the pci_controller struct for
267 * each device resource. 281 * each device resource.
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index 6da9854751..df8d5bed61 100644
--- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -750,9 +750,10 @@ sn_hwperf_ioctl(struct inode *in, struct file *fp, u32 op, u64 arg)
750 goto error; 750 goto error;
751 } else 751 } else
752 if ((r = sn_hwperf_enum_objects(&nobj, &objs)) == 0) { 752 if ((r = sn_hwperf_enum_objects(&nobj, &objs)) == 0) {
753 int cpuobj_index = 0;
754
753 memset(p, 0, a.sz); 755 memset(p, 0, a.sz);
754 for (i = 0; i < nobj; i++) { 756 for (i = 0; i < nobj; i++) {
755 int cpuobj_index = 0;
756 if (!SN_HWPERF_IS_NODE(objs + i)) 757 if (!SN_HWPERF_IS_NODE(objs + i))
757 continue; 758 continue;
758 node = sn_hwperf_obj_to_cnode(objs + i); 759 node = sn_hwperf_obj_to_cnode(objs + i);
diff --git a/arch/ia64/sn/kernel/tiocx.c b/arch/ia64/sn/kernel/tiocx.c
index 493380b2c0..5a289e4de8 100644
--- a/arch/ia64/sn/kernel/tiocx.c
+++ b/arch/ia64/sn/kernel/tiocx.c
@@ -369,7 +369,7 @@ static void tio_corelet_reset(nasid_t nasid, int corelet)
369 369
370static int is_fpga_tio(int nasid, int *bt) 370static int is_fpga_tio(int nasid, int *bt)
371{ 371{
372 u16 ioboard_type; 372 u16 uninitialized_var(ioboard_type); /* GCC be quiet */
373 s64 rc; 373 s64 rc;
374 374
375 rc = ia64_sn_sysctl_ioboard_get(nasid, &ioboard_type); 375 rc = ia64_sn_sysctl_ioboard_get(nasid, &ioboard_type);
diff --git a/arch/ia64/sn/kernel/xp_nofault.S b/arch/ia64/sn/kernel/xp_nofault.S
index b772543053..54e8973b6e 100644
--- a/arch/ia64/sn/kernel/xp_nofault.S
+++ b/arch/ia64/sn/kernel/xp_nofault.S
@@ -21,7 +21,8 @@
21xp_nofault_PIOR: 21xp_nofault_PIOR:
22 mov r8=r0 // Stage a success return value 22 mov r8=r0 // Stage a success return value
23 ld8.acq r9=[r32];; // PIO Read the specified register 23 ld8.acq r9=[r32];; // PIO Read the specified register
24 adds r9=1,r9 // Add to force a consume 24 adds r9=1,r9;; // Add to force consumption
25 or r9=r9,r9;; // Or to force consumption
25 br.ret.sptk.many b0;; // Return success 26 br.ret.sptk.many b0;; // Return success
26 27
27 .global xp_error_PIOR 28 .global xp_error_PIOR
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
index 04a8256017..42485ad50c 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
@@ -15,6 +15,7 @@
15#include <asm/sn/pcibus_provider_defs.h> 15#include <asm/sn/pcibus_provider_defs.h>
16#include <asm/sn/pcidev.h> 16#include <asm/sn/pcidev.h>
17#include <asm/sn/sn_sal.h> 17#include <asm/sn/sn_sal.h>
18#include <asm/sn/pic.h>
18#include <asm/sn/sn2/sn_hwperf.h> 19#include <asm/sn/sn2/sn_hwperf.h>
19#include "xtalk/xwidgetdev.h" 20#include "xtalk/xwidgetdev.h"
20#include "xtalk/hubdev.h" 21#include "xtalk/hubdev.h"
@@ -79,7 +80,7 @@ static int sal_pcibr_error_interrupt(struct pcibus_info *soft)
79u16 sn_ioboard_to_pci_bus(struct pci_bus *pci_bus) 80u16 sn_ioboard_to_pci_bus(struct pci_bus *pci_bus)
80{ 81{
81 s64 rc; 82 s64 rc;
82 u16 ioboard; 83 u16 uninitialized_var(ioboard); /* GCC be quiet */
83 nasid_t nasid = NASID_GET(SN_PCIBUS_BUSSOFT(pci_bus)->bs_base); 84 nasid_t nasid = NASID_GET(SN_PCIBUS_BUSSOFT(pci_bus)->bs_base);
84 85
85 rc = ia64_sn_sysctl_ioboard_get(nasid, &ioboard); 86 rc = ia64_sn_sysctl_ioboard_get(nasid, &ioboard);
@@ -130,9 +131,9 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
130 } 131 }
131 132
132 memcpy(soft, prom_bussoft, sizeof(struct pcibus_info)); 133 memcpy(soft, prom_bussoft, sizeof(struct pcibus_info));
133 soft->pbi_buscommon.bs_base = 134 soft->pbi_buscommon.bs_base = (unsigned long)
134 (((u64) soft->pbi_buscommon. 135 ioremap(REGION_OFFSET(soft->pbi_buscommon.bs_base),
135 bs_base << 4) >> 4) | __IA64_UNCACHED_OFFSET; 136 sizeof(struct pic));
136 137
137 spin_lock_init(&soft->pbi_lock); 138 spin_lock_init(&soft->pbi_lock);
138 139
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c
index b9bedbd6e1..d798dd4d0d 100644
--- a/arch/ia64/sn/pci/tioca_provider.c
+++ b/arch/ia64/sn/pci/tioca_provider.c
@@ -610,7 +610,9 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
610 return NULL; 610 return NULL;
611 611
612 memcpy(tioca_common, prom_bussoft, sizeof(struct tioca_common)); 612 memcpy(tioca_common, prom_bussoft, sizeof(struct tioca_common));
613 tioca_common->ca_common.bs_base |= __IA64_UNCACHED_OFFSET; 613 tioca_common->ca_common.bs_base = (unsigned long)
614 ioremap(REGION_OFFSET(tioca_common->ca_common.bs_base),
615 sizeof(struct tioca_common));
614 616
615 /* init kernel-private area */ 617 /* init kernel-private area */
616 618
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c
index f4c0b961a9..84b72b27e2 100644
--- a/arch/ia64/sn/pci/tioce_provider.c
+++ b/arch/ia64/sn/pci/tioce_provider.c
@@ -1002,7 +1002,9 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
1002 return NULL; 1002 return NULL;
1003 1003
1004 memcpy(tioce_common, prom_bussoft, sizeof(struct tioce_common)); 1004 memcpy(tioce_common, prom_bussoft, sizeof(struct tioce_common));
1005 tioce_common->ce_pcibus.bs_base |= __IA64_UNCACHED_OFFSET; 1005 tioce_common->ce_pcibus.bs_base = (unsigned long)
1006 ioremap(REGION_OFFSET(tioce_common->ce_pcibus.bs_base),
1007 sizeof(struct tioce_common));
1006 1008
1007 tioce_kern = tioce_kern_init(tioce_common); 1009 tioce_kern = tioce_kern_init(tioce_common);
1008 if (tioce_kern == NULL) { 1010 if (tioce_kern == NULL) {
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index c3bb8a755b..8ccf3e47bf 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -31,6 +31,9 @@ config GENERIC_IRQ_PROBE
31config NO_IOPORT 31config NO_IOPORT
32 def_bool y 32 def_bool y
33 33
34config NO_DMA
35 def_bool y
36
34source "init/Kconfig" 37source "init/Kconfig"
35 38
36 39
diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c
index 5f02b31448..57a92ef31a 100644
--- a/arch/m32r/kernel/ptrace.c
+++ b/arch/m32r/kernel/ptrace.c
@@ -595,7 +595,6 @@ void ptrace_disable(struct task_struct *child)
595static int 595static int
596do_ptrace(long request, struct task_struct *child, long addr, long data) 596do_ptrace(long request, struct task_struct *child, long addr, long data)
597{ 597{
598 unsigned long tmp;
599 int ret; 598 int ret;
600 599
601 switch (request) { 600 switch (request) {
@@ -604,11 +603,7 @@ do_ptrace(long request, struct task_struct *child, long addr, long data)
604 */ 603 */
605 case PTRACE_PEEKTEXT: 604 case PTRACE_PEEKTEXT:
606 case PTRACE_PEEKDATA: 605 case PTRACE_PEEKDATA:
607 ret = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); 606 ret = generic_ptrace_peekdata(child, addr, data);
608 if (ret == sizeof(tmp))
609 ret = put_user(tmp,(unsigned long __user *) data);
610 else
611 ret = -EIO;
612 break; 607 break;
613 608
614 /* 609 /*
@@ -624,15 +619,9 @@ do_ptrace(long request, struct task_struct *child, long addr, long data)
624 */ 619 */
625 case PTRACE_POKETEXT: 620 case PTRACE_POKETEXT:
626 case PTRACE_POKEDATA: 621 case PTRACE_POKEDATA:
627 ret = access_process_vm(child, addr, &data, sizeof(data), 1); 622 ret = generic_ptrace_pokedata(child, addr, data);
628 if (ret == sizeof(data)) { 623 if (ret == 0 && request == PTRACE_POKETEXT)
629 ret = 0; 624 invalidate_cache();
630 if (request == PTRACE_POKETEXT) {
631 invalidate_cache();
632 }
633 } else {
634 ret = -EIO;
635 }
636 break; 625 break;
637 626
638 /* 627 /*
diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c
index cdba9fd6d8..2cf0690b78 100644
--- a/arch/m68k/kernel/ptrace.c
+++ b/arch/m68k/kernel/ptrace.c
@@ -128,10 +128,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
128 /* when I and D space are separate, these will need to be fixed. */ 128 /* when I and D space are separate, these will need to be fixed. */
129 case PTRACE_PEEKTEXT: /* read word at location addr. */ 129 case PTRACE_PEEKTEXT: /* read word at location addr. */
130 case PTRACE_PEEKDATA: 130 case PTRACE_PEEKDATA:
131 i = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); 131 ret = generic_ptrace_peekdata(child, addr, data);
132 if (i != sizeof(tmp))
133 goto out_eio;
134 ret = put_user(tmp, (unsigned long *)data);
135 break; 132 break;
136 133
137 /* read the word at location addr in the USER area. */ 134 /* read the word at location addr in the USER area. */
@@ -160,8 +157,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
160 /* when I and D space are separate, this will have to be fixed. */ 157 /* when I and D space are separate, this will have to be fixed. */
161 case PTRACE_POKETEXT: /* write the word at location addr. */ 158 case PTRACE_POKETEXT: /* write the word at location addr. */
162 case PTRACE_POKEDATA: 159 case PTRACE_POKEDATA:
163 if (access_process_vm(child, addr, &data, sizeof(data), 1) != sizeof(data)) 160 ret = generic_ptrace_pokedata(child, addr, data);
164 goto out_eio;
165 break; 161 break;
166 162
167 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ 163 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c
index a27a4fa332..4e2752a0e8 100644
--- a/arch/m68k/kernel/traps.c
+++ b/arch/m68k/kernel/traps.c
@@ -1170,6 +1170,7 @@ void die_if_kernel (char *str, struct pt_regs *fp, int nr)
1170 console_verbose(); 1170 console_verbose();
1171 printk("%s: %08x\n",str,nr); 1171 printk("%s: %08x\n",str,nr);
1172 show_registers(fp); 1172 show_registers(fp);
1173 add_taint(TAINT_DIE);
1173 do_exit(SIGSEGV); 1174 do_exit(SIGSEGV);
1174} 1175}
1175 1176
diff --git a/arch/m68k/lib/checksum.c b/arch/m68k/lib/checksum.c
index cf6bb51945..6216f12a75 100644
--- a/arch/m68k/lib/checksum.c
+++ b/arch/m68k/lib/checksum.c
@@ -422,3 +422,4 @@ csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum)
422 ); 422 );
423 return(sum); 423 return(sum);
424} 424}
425EXPORT_SYMBOL(csum_partial_copy_nocheck);
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c
index 941955dc3b..846f975346 100644
--- a/arch/m68knommu/kernel/process.c
+++ b/arch/m68knommu/kernel/process.c
@@ -377,7 +377,7 @@ unsigned long get_wchan(struct task_struct *p)
377 fp = ((struct switch_stack *)p->thread.ksp)->a6; 377 fp = ((struct switch_stack *)p->thread.ksp)->a6;
378 do { 378 do {
379 if (fp < stack_page+sizeof(struct thread_info) || 379 if (fp < stack_page+sizeof(struct thread_info) ||
380 fp >= 8184+stack_page) 380 fp >= THREAD_SIZE-8+stack_page)
381 return 0; 381 return 0;
382 pc = ((unsigned long *)fp)[1]; 382 pc = ((unsigned long *)fp)[1];
383 if (!in_sched_functions(pc)) 383 if (!in_sched_functions(pc))
diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c
index f54b6a3dfe..ef70ca070c 100644
--- a/arch/m68knommu/kernel/ptrace.c
+++ b/arch/m68knommu/kernel/ptrace.c
@@ -106,17 +106,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
106 switch (request) { 106 switch (request) {
107 /* when I and D space are separate, these will need to be fixed. */ 107 /* when I and D space are separate, these will need to be fixed. */
108 case PTRACE_PEEKTEXT: /* read word at location addr. */ 108 case PTRACE_PEEKTEXT: /* read word at location addr. */
109 case PTRACE_PEEKDATA: { 109 case PTRACE_PEEKDATA:
110 unsigned long tmp; 110 ret = generic_ptrace_peekdata(child, addr, data);
111 int copied;
112
113 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
114 ret = -EIO;
115 if (copied != sizeof(tmp))
116 break;
117 ret = put_user(tmp,(unsigned long *) data);
118 break; 111 break;
119 }
120 112
121 /* read the word at location addr in the USER area. */ 113 /* read the word at location addr in the USER area. */
122 case PTRACE_PEEKUSR: { 114 case PTRACE_PEEKUSR: {
@@ -159,10 +151,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
159 /* when I and D space are separate, this will have to be fixed. */ 151 /* when I and D space are separate, this will have to be fixed. */
160 case PTRACE_POKETEXT: /* write the word at location addr. */ 152 case PTRACE_POKETEXT: /* write the word at location addr. */
161 case PTRACE_POKEDATA: 153 case PTRACE_POKEDATA:
162 ret = 0; 154 ret = generic_ptrace_pokedata(child, addr, data);
163 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
164 break;
165 ret = -EIO;
166 break; 155 break;
167 156
168 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ 157 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index 8133b10473..80f4e9d74a 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -1,8 +1,8 @@
1/* 1/*
2 * linux/arch/m68knommu/kernel/setup.c 2 * linux/arch/m68knommu/kernel/setup.c
3 * 3 *
4 * Copyright (C) 1999-2004 Greg Ungerer (gerg@snapgear.com) 4 * Copyright (C) 1999-2007 Greg Ungerer (gerg@snapgear.com)
5 * Copyright (C) 1998,1999 D. Jeff Dionne <jeff@lineo.ca> 5 * Copyright (C) 1998,1999 D. Jeff Dionne <jeff@uClinux.org>
6 * Copyleft ()) 2000 James D. Schettine {james@telos-systems.com} 6 * Copyleft ()) 2000 James D. Schettine {james@telos-systems.com}
7 * Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com> 7 * Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>
8 * Copyright (C) 1995 Hamish Macdonald 8 * Copyright (C) 1995 Hamish Macdonald
@@ -20,17 +20,13 @@
20#include <linux/sched.h> 20#include <linux/sched.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/fs.h>
24#include <linux/fb.h> 23#include <linux/fb.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/console.h> 25#include <linux/console.h>
27#include <linux/genhd.h>
28#include <linux/errno.h> 26#include <linux/errno.h>
29#include <linux/string.h> 27#include <linux/string.h>
30#include <linux/major.h>
31#include <linux/bootmem.h> 28#include <linux/bootmem.h>
32#include <linux/seq_file.h> 29#include <linux/seq_file.h>
33#include <linux/root_dev.h>
34#include <linux/init.h> 30#include <linux/init.h>
35 31
36#include <asm/setup.h> 32#include <asm/setup.h>
@@ -46,34 +42,19 @@ EXPORT_SYMBOL(memory_end);
46 42
47char __initdata command_line[COMMAND_LINE_SIZE]; 43char __initdata command_line[COMMAND_LINE_SIZE];
48 44
49/* setup some dummy routines */ 45void (*mach_trap_init)(void);
50static void dummy_waitbut(void)
51{
52}
53 46
54void (*mach_sched_init) (irq_handler_t handler);
55void (*mach_tick)( void );
56/* machine dependent keyboard functions */
57int (*mach_keyb_init) (void);
58int (*mach_kbdrate) (struct kbd_repeat *);
59void (*mach_kbd_leds) (unsigned int);
60/* machine dependent irq functions */
61void (*mach_init_IRQ) (void);
62irq_handler_t mach_default_handler;
63int (*mach_get_irq_list) (struct seq_file *, void *);
64void (*mach_process_int) (int irq, struct pt_regs *fp);
65void (*mach_trap_init) (void);
66/* machine dependent timer functions */ 47/* machine dependent timer functions */
67unsigned long (*mach_gettimeoffset) (void); 48void (*mach_sched_init)(irq_handler_t handler);
68void (*mach_gettod) (int*, int*, int*, int*, int*, int*); 49void (*mach_tick)(void);
69int (*mach_hwclk) (int, struct rtc_time*); 50void (*mach_gettod)(int*, int*, int*, int*, int*, int*);
70int (*mach_set_clock_mmss) (unsigned long); 51int (*mach_set_clock_mmss)(unsigned long);
71void (*mach_mksound)( unsigned int count, unsigned int ticks ); 52unsigned long (*mach_gettimeoffset)(void);
72void (*mach_reset)( void ); 53
73void (*waitbut)(void) = dummy_waitbut; 54/* machine dependent reboot functions */
74void (*mach_debug_init)(void); 55void (*mach_reset)(void);
75void (*mach_halt)( void ); 56void (*mach_halt)(void);
76void (*mach_power_off)( void ); 57void (*mach_power_off)(void);
77 58
78 59
79#ifdef CONFIG_M68000 60#ifdef CONFIG_M68000
@@ -134,13 +115,6 @@ void (*mach_power_off)( void );
134 #define CPU "UNKNOWN" 115 #define CPU "UNKNOWN"
135#endif 116#endif
136 117
137/* (es) */
138/* note: why is this defined here? the must be a better place to put this */
139#if defined( CONFIG_TELOS) || defined( CONFIG_UCDIMM ) || defined( CONFIG_UCSIMM ) || defined(CONFIG_DRAGEN2) || (defined( CONFIG_PILOT ) && defined( CONFIG_M68328 ))
140#define CAT_ROMARRAY
141#endif
142/* (/es) */
143
144extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end; 118extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
145extern int _ramstart, _ramend; 119extern int _ramstart, _ramend;
146 120
@@ -148,15 +122,8 @@ void setup_arch(char **cmdline_p)
148{ 122{
149 int bootmap_size; 123 int bootmap_size;
150 124
151#if defined(CAT_ROMARRAY) && defined(DEBUG)
152 extern int __data_rom_start;
153 extern int __data_start;
154 int *romarray = (int *)((int) &__data_rom_start +
155 (int)&_edata - (int)&__data_start);
156#endif
157
158 memory_start = PAGE_ALIGN(_ramstart); 125 memory_start = PAGE_ALIGN(_ramstart);
159 memory_end = _ramend; /* by now the stack is part of the init task */ 126 memory_end = _ramend;
160 127
161 init_mm.start_code = (unsigned long) &_stext; 128 init_mm.start_code = (unsigned long) &_stext;
162 init_mm.end_code = (unsigned long) &_etext; 129 init_mm.end_code = (unsigned long) &_etext;
@@ -220,11 +187,7 @@ void setup_arch(char **cmdline_p)
220 (int) &_sbss, (int) &_ebss); 187 (int) &_sbss, (int) &_ebss);
221 printk(KERN_DEBUG "KERNEL -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x " 188 printk(KERN_DEBUG "KERNEL -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x "
222 "STACK=0x%06x-0x%06x\n", 189 "STACK=0x%06x-0x%06x\n",
223#ifdef CAT_ROMARRAY
224 (int) romarray, ((int) romarray) + romarray[2],
225#else
226 (int) &_ebss, (int) memory_start, 190 (int) &_ebss, (int) memory_start,
227#endif
228 (int) memory_start, (int) memory_end, 191 (int) memory_start, (int) memory_end,
229 (int) memory_end, (int) _ramend); 192 (int) memory_end, (int) _ramend);
230#endif 193#endif
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c
index bed5f47bf5..fde04e1757 100644
--- a/arch/m68knommu/kernel/traps.c
+++ b/arch/m68knommu/kernel/traps.c
@@ -83,6 +83,7 @@ void die_if_kernel(char *str, struct pt_regs *fp, int nr)
83 printk(KERN_EMERG "Process %s (pid: %d, stackpage=%08lx)\n", 83 printk(KERN_EMERG "Process %s (pid: %d, stackpage=%08lx)\n",
84 current->comm, current->pid, PAGE_SIZE+(unsigned long)current); 84 current->comm, current->pid, PAGE_SIZE+(unsigned long)current);
85 show_stack(NULL, (unsigned long *)fp); 85 show_stack(NULL, (unsigned long *)fp);
86 add_taint(TAINT_DIE);
86 do_exit(SIGSEGV); 87 do_exit(SIGSEGV);
87} 88}
88 89
diff --git a/arch/m68knommu/mm/memory.c b/arch/m68knommu/mm/memory.c
index 411e45248e..1a66b71035 100644
--- a/arch/m68knommu/mm/memory.c
+++ b/arch/m68knommu/mm/memory.c
@@ -17,90 +17,14 @@
17#include <linux/types.h> 17#include <linux/types.h>
18#include <linux/slab.h> 18#include <linux/slab.h>
19 19
20#include <asm/setup.h>
21#include <asm/segment.h> 20#include <asm/segment.h>
22#include <asm/page.h> 21#include <asm/page.h>
23#include <asm/pgtable.h> 22#include <asm/pgtable.h>
24#include <asm/system.h> 23#include <asm/system.h>
25#include <asm/traps.h>
26#include <asm/io.h>
27 24
28/* 25/*
29 * cache_clear() semantics: Clear any cache entries for the area in question, 26 * Map some physical address range into the kernel address space.
30 * without writing back dirty entries first. This is useful if the data will 27 * The code is copied and adapted from map_chunk().
31 * be overwritten anyway, e.g. by DMA to memory. The range is defined by a
32 * _physical_ address.
33 */
34
35void cache_clear (unsigned long paddr, int len)
36{
37}
38
39
40/*
41 * Define cache invalidate functions. The ColdFire 5407 is really
42 * the only processor that needs to do some work here. Anything
43 * that has separate data and instruction caches will be a problem.
44 */
45#ifdef CONFIG_M5407
46
47static __inline__ void cache_invalidate_lines(unsigned long paddr, int len)
48{
49 unsigned long sset, eset;
50
51 sset = (paddr & 0x00000ff0);
52 eset = ((paddr + len) & 0x0000ff0) + 0x10;
53
54 __asm__ __volatile__ (
55 "nop\n\t"
56 "clrl %%d0\n\t"
57 "1:\n\t"
58 "movel %0,%%a0\n\t"
59 "addl %%d0,%%a0\n\t"
60 "2:\n\t"
61 ".word 0xf4e8\n\t"
62 "addl #0x10,%%a0\n\t"
63 "cmpl %1,%%a0\n\t"
64 "blt 2b\n\t"
65 "addql #1,%%d0\n\t"
66 "cmpil #4,%%d0\n\t"
67 "bne 1b"
68 : : "a" (sset), "a" (eset) : "d0", "a0" );
69}
70
71#else
72#define cache_invalidate_lines(a,b)
73#endif
74
75
76/*
77 * cache_push() semantics: Write back any dirty cache data in the given area,
78 * and invalidate the range in the instruction cache. It needs not (but may)
79 * invalidate those entries also in the data cache. The range is defined by a
80 * _physical_ address.
81 */
82
83void cache_push (unsigned long paddr, int len)
84{
85 cache_invalidate_lines(paddr, len);
86}
87
88
89/*
90 * cache_push_v() semantics: Write back any dirty cache data in the given
91 * area, and invalidate those entries at least in the instruction cache. This
92 * is intended to be used after data has been written that can be executed as
93 * code later. The range is defined by a _user_mode_ _virtual_ address (or,
94 * more exactly, the space is defined by the %sfc/%dfc register.)
95 */
96
97void cache_push_v (unsigned long vaddr, int len)
98{
99 cache_invalidate_lines(vaddr, len);
100}
101
102/* Map some physical address range into the kernel address space. The
103 * code is copied and adapted from map_chunk().
104 */ 28 */
105 29
106unsigned long kernel_map(unsigned long paddr, unsigned long size, 30unsigned long kernel_map(unsigned long paddr, unsigned long size,
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 9528ee9064..5c863bcd56 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -15,6 +15,29 @@ choice
15 prompt "System type" 15 prompt "System type"
16 default SGI_IP22 16 default SGI_IP22
17 17
18config LEMOTE_FULONG
19 bool "Lemote Fulong mini-PC"
20 select ARCH_SPARSEMEM_ENABLE
21 select SYS_HAS_CPU_LOONGSON2
22 select DMA_NONCOHERENT
23 select BOOT_ELF32
24 select BOARD_SCACHE
25 select HAVE_STD_PC_SERIAL_PORT
26 select HW_HAS_PCI
27 select I8259
28 select ISA
29 select IRQ_CPU
30 select SYS_SUPPORTS_32BIT_KERNEL
31 select SYS_SUPPORTS_64BIT_KERNEL
32 select SYS_SUPPORTS_LITTLE_ENDIAN
33 select SYS_SUPPORTS_HIGHMEM
34 select SYS_HAS_EARLY_PRINTK
35 select GENERIC_HARDIRQS_NO__DO_IRQ
36 select CPU_HAS_WB
37 help
38 Lemote Fulong mini-PC board based on the Chinese Loongson-2E CPU and
39 an FPGA northbridge
40
18config MACH_ALCHEMY 41config MACH_ALCHEMY
19 bool "Alchemy processor based machines" 42 bool "Alchemy processor based machines"
20 43
@@ -63,7 +86,7 @@ config MACH_DECSTATION
63 bool "DECstations" 86 bool "DECstations"
64 select BOOT_ELF32 87 select BOOT_ELF32
65 select DMA_NONCOHERENT 88 select DMA_NONCOHERENT
66 select SYS_HAS_EARLY_PRINTK 89 select NO_IOPORT
67 select IRQ_CPU 90 select IRQ_CPU
68 select SYS_HAS_CPU_R3000 91 select SYS_HAS_CPU_R3000
69 select SYS_HAS_CPU_R4X00 92 select SYS_HAS_CPU_R4X00
@@ -88,33 +111,15 @@ config MACH_DECSTATION
88 111
89 otherwise choose R3000. 112 otherwise choose R3000.
90 113
91config MIPS_EV64120
92 bool "Galileo EV64120 Evaluation board (EXPERIMENTAL)"
93 depends on EXPERIMENTAL
94 select DMA_NONCOHERENT
95 select HW_HAS_PCI
96 select PCI_GT64XXX_PCI0
97 select SYS_HAS_CPU_R5000
98 select SYS_SUPPORTS_32BIT_KERNEL
99 select SYS_SUPPORTS_64BIT_KERNEL
100 select SYS_SUPPORTS_BIG_ENDIAN
101 select SYS_SUPPORTS_KGDB
102 help
103 This is an evaluation board based on the Galileo GT-64120
104 single-chip system controller that contains a MIPS R5000 compatible
105 core running at 75/100MHz. Their website is located at
106 <http://www.marvell.com/>. Say Y here if you wish to build a
107 kernel for this platform.
108
109config MACH_JAZZ 114config MACH_JAZZ
110 bool "Jazz family of machines" 115 bool "Jazz family of machines"
111 select ARC 116 select ARC
112 select ARC32 117 select ARC32
113 select ARCH_MAY_HAVE_PC_FDC 118 select ARCH_MAY_HAVE_PC_FDC
114 select GENERIC_ISA_DMA 119 select GENERIC_ISA_DMA
115 select I8253
116 select I8259 120 select I8259
117 select ISA 121 select ISA
122 select PCSPEAKER
118 select SYS_HAS_CPU_R4X00 123 select SYS_HAS_CPU_R4X00
119 select SYS_SUPPORTS_32BIT_KERNEL 124 select SYS_SUPPORTS_32BIT_KERNEL
120 select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL 125 select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
@@ -126,20 +131,6 @@ config MACH_JAZZ
126 Members include the Acer PICA, MIPS Magnum 4000, MIPS Millenium and 131 Members include the Acer PICA, MIPS Magnum 4000, MIPS Millenium and
127 Olivetti M700-10 workstations. 132 Olivetti M700-10 workstations.
128 133
129config LASAT
130 bool "LASAT Networks platforms"
131 select DMA_NONCOHERENT
132 select SYS_HAS_EARLY_PRINTK
133 select HW_HAS_PCI
134 select PCI_GT64XXX_PCI0
135 select MIPS_NILE4
136 select R5000_CPU_SCACHE
137 select SYS_HAS_CPU_R5000
138 select SYS_SUPPORTS_32BIT_KERNEL
139 select SYS_SUPPORTS_64BIT_KERNEL if BROKEN
140 select SYS_SUPPORTS_LITTLE_ENDIAN
141 select GENERIC_HARDIRQS_NO__DO_IRQ
142
143config MIPS_ATLAS 134config MIPS_ATLAS
144 bool "MIPS Atlas board" 135 bool "MIPS Atlas board"
145 select BOOT_ELF32 136 select BOOT_ELF32
@@ -173,7 +164,6 @@ config MIPS_MALTA
173 bool "MIPS Malta board" 164 bool "MIPS Malta board"
174 select ARCH_MAY_HAVE_PC_FDC 165 select ARCH_MAY_HAVE_PC_FDC
175 select BOOT_ELF32 166 select BOOT_ELF32
176 select HAVE_STD_PC_SERIAL_PORT
177 select DMA_NONCOHERENT 167 select DMA_NONCOHERENT
178 select GENERIC_ISA_DMA 168 select GENERIC_ISA_DMA
179 select IRQ_CPU 169 select IRQ_CPU
@@ -246,11 +236,13 @@ config MIPS_SIM
246 select DMA_NONCOHERENT 236 select DMA_NONCOHERENT
247 select SYS_HAS_EARLY_PRINTK 237 select SYS_HAS_EARLY_PRINTK
248 select IRQ_CPU 238 select IRQ_CPU
239 select BOOT_RAW
249 select SYS_HAS_CPU_MIPS32_R1 240 select SYS_HAS_CPU_MIPS32_R1
250 select SYS_HAS_CPU_MIPS32_R2 241 select SYS_HAS_CPU_MIPS32_R2
251 select SYS_HAS_EARLY_PRINTK 242 select SYS_HAS_EARLY_PRINTK
252 select SYS_SUPPORTS_32BIT_KERNEL 243 select SYS_SUPPORTS_32BIT_KERNEL
253 select SYS_SUPPORTS_BIG_ENDIAN 244 select SYS_SUPPORTS_BIG_ENDIAN
245 select SYS_SUPPORTS_MULTITHREADING
254 select SYS_SUPPORTS_LITTLE_ENDIAN 246 select SYS_SUPPORTS_LITTLE_ENDIAN
255 help 247 help
256 This option enables support for MIPS Technologies MIPSsim software 248 This option enables support for MIPS Technologies MIPSsim software
@@ -274,50 +266,13 @@ config MOMENCO_OCELOT
274 The Ocelot is a MIPS-based Single Board Computer (SBC) made by 266 The Ocelot is a MIPS-based Single Board Computer (SBC) made by
275 Momentum Computer <http://www.momenco.com/>. 267 Momentum Computer <http://www.momenco.com/>.
276 268
277config MOMENCO_OCELOT_3
278 bool "Momentum Ocelot-3 board"
279 select BOOT_ELF32
280 select DMA_NONCOHERENT
281 select HW_HAS_PCI
282 select IRQ_CPU
283 select IRQ_CPU_RM7K
284 select IRQ_MV64340
285 select PCI_MARVELL
286 select RM7000_CPU_SCACHE
287 select SWAP_IO_SPACE
288 select SYS_HAS_CPU_RM9000
289 select SYS_SUPPORTS_32BIT_KERNEL
290 select SYS_SUPPORTS_64BIT_KERNEL
291 select SYS_SUPPORTS_BIG_ENDIAN
292 help
293 The Ocelot-3 is based off Discovery III System Controller and
294 PMC-Sierra Rm79000 core.
295
296config MOMENCO_OCELOT_C
297 bool "Momentum Ocelot-C board"
298 select DMA_NONCOHERENT
299 select HW_HAS_PCI
300 select IRQ_CPU
301 select IRQ_MV64340
302 select PCI_MARVELL
303 select RM7000_CPU_SCACHE
304 select SWAP_IO_SPACE
305 select SYS_HAS_CPU_RM7000
306 select SYS_SUPPORTS_32BIT_KERNEL
307 select SYS_SUPPORTS_64BIT_KERNEL
308 select SYS_SUPPORTS_BIG_ENDIAN
309 select GENERIC_HARDIRQS_NO__DO_IRQ
310 help
311 The Ocelot is a MIPS-based Single Board Computer (SBC) made by
312 Momentum Computer <http://www.momenco.com/>.
313
314config PNX8550_JBS 269config PNX8550_JBS
315 bool "Philips PNX8550 based JBS board" 270 bool "Philips PNX8550 based JBS board"
316 select PNX8550 271 select PNX8550
317 select SYS_SUPPORTS_LITTLE_ENDIAN 272 select SYS_SUPPORTS_LITTLE_ENDIAN
318 273
319config PNX8550_STB810 274config PNX8550_STB810
320 bool "Support for Philips PNX8550 based STB810 board" 275 bool "Philips PNX8550 based STB810 board"
321 select PNX8550 276 select PNX8550
322 select SYS_SUPPORTS_LITTLE_ENDIAN 277 select SYS_SUPPORTS_LITTLE_ENDIAN
323 278
@@ -346,6 +301,27 @@ config MACH_VR41XX
346 select SYS_HAS_CPU_VR41XX 301 select SYS_HAS_CPU_VR41XX
347 select GENERIC_HARDIRQS_NO__DO_IRQ 302 select GENERIC_HARDIRQS_NO__DO_IRQ
348 303
304config PMC_MSP
305 bool "PMC-Sierra MSP chipsets"
306 depends on EXPERIMENTAL
307 select DMA_NONCOHERENT
308 select SWAP_IO_SPACE
309 select NO_EXCEPT_FILL
310 select BOOT_RAW
311 select SYS_HAS_CPU_MIPS32_R1
312 select SYS_HAS_CPU_MIPS32_R2
313 select SYS_SUPPORTS_32BIT_KERNEL
314 select SYS_SUPPORTS_BIG_ENDIAN
315 select SYS_SUPPORTS_KGDB
316 select IRQ_CPU
317 select SERIAL_8250
318 select SERIAL_8250_CONSOLE
319 help
320 This adds support for the PMC-Sierra family of Multi-Service
321 Processor System-On-A-Chips. These parts include a number
322 of integrated peripherals, interfaces and DSPs in addition to
323 a variety of MIPS cores.
324
349config PMC_YOSEMITE 325config PMC_YOSEMITE
350 bool "PMC-Sierra Yosemite eval board" 326 bool "PMC-Sierra Yosemite eval board"
351 select DMA_COHERENT 327 select DMA_COHERENT
@@ -371,9 +347,9 @@ config QEMU
371 select DMA_COHERENT 347 select DMA_COHERENT
372 select GENERIC_ISA_DMA 348 select GENERIC_ISA_DMA
373 select HAVE_STD_PC_SERIAL_PORT 349 select HAVE_STD_PC_SERIAL_PORT
374 select I8253
375 select I8259 350 select I8259
376 select ISA 351 select ISA
352 select PCSPEAKER
377 select SWAP_IO_SPACE 353 select SWAP_IO_SPACE
378 select SYS_HAS_CPU_MIPS32_R1 354 select SYS_HAS_CPU_MIPS32_R1
379 select SYS_SUPPORTS_32BIT_KERNEL 355 select SYS_SUPPORTS_32BIT_KERNEL
@@ -392,7 +368,7 @@ config QEMU
392 can be found at http://www.linux-mips.org/wiki/Qemu. 368 can be found at http://www.linux-mips.org/wiki/Qemu.
393 369
394config MARKEINS 370config MARKEINS
395 bool "Support for NEC EMMA2RH Mark-eins" 371 bool "NEC EMMA2RH Mark-eins"
396 select DMA_NONCOHERENT 372 select DMA_NONCOHERENT
397 select HW_HAS_PCI 373 select HW_HAS_PCI
398 select IRQ_CPU 374 select IRQ_CPU
@@ -450,8 +426,7 @@ config SGI_IP27
450 here. 426 here.
451 427
452config SGI_IP32 428config SGI_IP32
453 bool "SGI IP32 (O2) (EXPERIMENTAL)" 429 bool "SGI IP32 (O2)"
454 depends on EXPERIMENTAL
455 select ARC 430 select ARC
456 select ARC32 431 select ARC32
457 select BOOT_ELF32 432 select BOOT_ELF32
@@ -587,9 +562,9 @@ config SNI_RM
587 select HW_HAS_EISA 562 select HW_HAS_EISA
588 select HW_HAS_PCI 563 select HW_HAS_PCI
589 select IRQ_CPU 564 select IRQ_CPU
590 select I8253
591 select I8259 565 select I8259
592 select ISA 566 select ISA
567 select PCSPEAKER
593 select SWAP_IO_SPACE if CPU_BIG_ENDIAN 568 select SWAP_IO_SPACE if CPU_BIG_ENDIAN
594 select SYS_HAS_CPU_R4X00 569 select SYS_HAS_CPU_R4X00
595 select SYS_HAS_CPU_R5000 570 select SYS_HAS_CPU_R5000
@@ -652,6 +627,7 @@ config TOSHIBA_RBTX4938
652 select SYS_SUPPORTS_BIG_ENDIAN 627 select SYS_SUPPORTS_BIG_ENDIAN
653 select SYS_SUPPORTS_KGDB 628 select SYS_SUPPORTS_KGDB
654 select GENERIC_HARDIRQS_NO__DO_IRQ 629 select GENERIC_HARDIRQS_NO__DO_IRQ
630 select GENERIC_GPIO
655 help 631 help
656 This Toshiba board is based on the TX4938 processor. Say Y here to 632 This Toshiba board is based on the TX4938 processor. Say Y here to
657 support this machine type 633 support this machine type
@@ -660,9 +636,7 @@ endchoice
660 636
661source "arch/mips/au1000/Kconfig" 637source "arch/mips/au1000/Kconfig"
662source "arch/mips/ddb5xxx/Kconfig" 638source "arch/mips/ddb5xxx/Kconfig"
663source "arch/mips/gt64120/ev64120/Kconfig"
664source "arch/mips/jazz/Kconfig" 639source "arch/mips/jazz/Kconfig"
665source "arch/mips/lasat/Kconfig"
666source "arch/mips/pmc-sierra/Kconfig" 640source "arch/mips/pmc-sierra/Kconfig"
667source "arch/mips/sgi-ip27/Kconfig" 641source "arch/mips/sgi-ip27/Kconfig"
668source "arch/mips/sibyte/Kconfig" 642source "arch/mips/sibyte/Kconfig"
@@ -721,6 +695,9 @@ config ARC
721config ARCH_MAY_HAVE_PC_FDC 695config ARCH_MAY_HAVE_PC_FDC
722 bool 696 bool
723 697
698config BOOT_RAW
699 bool
700
724config DMA_COHERENT 701config DMA_COHERENT
725 bool 702 bool
726 703
@@ -768,16 +745,19 @@ config MIPS_BONITO64
768config MIPS_MSC 745config MIPS_MSC
769 bool 746 bool
770 747
771config MIPS_NILE4
772 bool
773
774config MIPS_DISABLE_OBSOLETE_IDE 748config MIPS_DISABLE_OBSOLETE_IDE
775 bool 749 bool
776 750
751config NO_IOPORT
752 def_bool n
753
777config GENERIC_ISA_DMA_SUPPORT_BROKEN 754config GENERIC_ISA_DMA_SUPPORT_BROKEN
778 bool 755 bool
779 select ZONE_DMA 756 select ZONE_DMA
780 757
758config GENERIC_GPIO
759 bool
760
781# 761#
782# Endianess selection. Sufficiently obscure so many users don't know what to 762# Endianess selection. Sufficiently obscure so many users don't know what to
783# answer,so we try hard to limit the available choices. Also the use of a 763# answer,so we try hard to limit the available choices. Also the use of a
@@ -821,7 +801,10 @@ config IRQ_CPU_RM7K
821config IRQ_CPU_RM9K 801config IRQ_CPU_RM9K
822 bool 802 bool
823 803
824config IRQ_MV64340 804config IRQ_MSP_SLP
805 bool
806
807config IRQ_MSP_CIC
825 bool 808 bool
826 809
827config DDB5XXX_COMMON 810config DDB5XXX_COMMON
@@ -834,6 +817,9 @@ config MIPS_BOARDS_GEN
834config PCI_GT64XXX_PCI0 817config PCI_GT64XXX_PCI0
835 bool 818 bool
836 819
820config NO_EXCEPT_FILL
821 bool
822
837config MIPS_TX3927 823config MIPS_TX3927
838 bool 824 bool
839 select HAS_TXX9_SERIAL 825 select HAS_TXX9_SERIAL
@@ -841,14 +827,6 @@ config MIPS_TX3927
841config MIPS_RM9122 827config MIPS_RM9122
842 bool 828 bool
843 select SERIAL_RM9000 829 select SERIAL_RM9000
844 select GPI_RM9000
845 select WDT_RM9000
846
847config PCI_MARVELL
848 bool
849
850config SERIAL_RM9000
851 bool
852 830
853config PNX8550 831config PNX8550
854 bool 832 bool
@@ -863,6 +841,7 @@ config SOC_PNX8550
863 select SYS_SUPPORTS_32BIT_KERNEL 841 select SYS_SUPPORTS_32BIT_KERNEL
864 select GENERIC_HARDIRQS_NO__DO_IRQ 842 select GENERIC_HARDIRQS_NO__DO_IRQ
865 select SYS_SUPPORTS_KGDB 843 select SYS_SUPPORTS_KGDB
844 select GENERIC_GPIO
866 845
867config SWAP_IO_SPACE 846config SWAP_IO_SPACE
868 bool 847 bool
@@ -875,31 +854,17 @@ config EMMA2RH
875config SERIAL_RM9000 854config SERIAL_RM9000
876 bool 855 bool
877 856
878config GPI_RM9000
879 bool
880
881config WDT_RM9000
882 bool
883
884# 857#
885# Unfortunately not all GT64120 systems run the chip at the same clock. 858# Unfortunately not all GT64120 systems run the chip at the same clock.
886# As the user for the clock rate and try to minimize the available options. 859# As the user for the clock rate and try to minimize the available options.
887# 860#
888choice 861choice
889 prompt "Galileo Chip Clock" 862 prompt "Galileo Chip Clock"
890 #default SYSCLK_83 if MIPS_EV64120 863 depends on MOMENCO_OCELOT
891 depends on MIPS_EV64120 || MOMENCO_OCELOT
892 default SYSCLK_83 if MIPS_EV64120
893 default SYSCLK_100 if MOMENCO_OCELOT 864 default SYSCLK_100 if MOMENCO_OCELOT
894 865
895config SYSCLK_75
896 bool "75" if MIPS_EV64120
897
898config SYSCLK_83
899 bool "83.3" if MIPS_EV64120
900
901config SYSCLK_100 866config SYSCLK_100
902 bool "100" if MIPS_EV64120 || MOMENCO_OCELOT 867 bool "100" if MOMENCO_OCELOT
903 868
904endchoice 869endchoice
905 870
@@ -911,8 +876,9 @@ config BOOT_ELF32
911 876
912config MIPS_L1_CACHE_SHIFT 877config MIPS_L1_CACHE_SHIFT
913 int 878 int
914 default "4" if MACH_DECSTATION || SNI_RM 879 default "4" if MACH_DECSTATION
915 default "7" if SGI_IP27 880 default "7" if SGI_IP27 || SNI_RM
881 default "4" if PMC_MSP4200_EVAL
916 default "5" 882 default "5"
917 883
918config HAVE_STD_PC_SERIAL_PORT 884config HAVE_STD_PC_SERIAL_PORT
@@ -944,6 +910,16 @@ choice
944 prompt "CPU type" 910 prompt "CPU type"
945 default CPU_R4X00 911 default CPU_R4X00
946 912
913config CPU_LOONGSON2
914 bool "Loongson 2"
915 depends on SYS_HAS_CPU_LOONGSON2
916 select CPU_SUPPORTS_32BIT_KERNEL
917 select CPU_SUPPORTS_64BIT_KERNEL
918 select CPU_SUPPORTS_HIGHMEM
919 help
920 The Loongson 2E processor implements the MIPS III instruction set
921 with many extensions.
922
947config CPU_MIPS32_R1 923config CPU_MIPS32_R1
948 bool "MIPS32 Release 1" 924 bool "MIPS32 Release 1"
949 depends on SYS_HAS_CPU_MIPS32_R1 925 depends on SYS_HAS_CPU_MIPS32_R1
@@ -1154,6 +1130,9 @@ config CPU_SB1
1154 1130
1155endchoice 1131endchoice
1156 1132
1133config SYS_HAS_CPU_LOONGSON2
1134 bool
1135
1157config SYS_HAS_CPU_MIPS32_R1 1136config SYS_HAS_CPU_MIPS32_R1
1158 bool 1137 bool
1159 1138
@@ -1392,6 +1371,7 @@ config MIPS_VPE_LOADER
1392 depends on SYS_SUPPORTS_MULTITHREADING 1371 depends on SYS_SUPPORTS_MULTITHREADING
1393 select CPU_MIPSR2_IRQ_VI 1372 select CPU_MIPSR2_IRQ_VI
1394 select CPU_MIPSR2_IRQ_EI 1373 select CPU_MIPSR2_IRQ_EI
1374 select CPU_MIPSR2_SRS
1395 select MIPS_MT 1375 select MIPS_MT
1396 help 1376 help
1397 Includes a loader for loading an elf relocatable object 1377 Includes a loader for loading an elf relocatable object
@@ -1424,6 +1404,19 @@ config MIPS_MT_SMTC_INSTANT_REPLAY
1424 it off), but ensures that IPIs are handled promptly even under 1404 it off), but ensures that IPIs are handled promptly even under
1425 heavy I/O interrupt load. 1405 heavy I/O interrupt load.
1426 1406
1407config MIPS_MT_SMTC_IM_BACKSTOP
1408 bool "Use per-TC register bits as backstop for inhibited IM bits"
1409 depends on MIPS_MT_SMTC
1410 default y
1411 help
1412 To support multiple TC microthreads acting as "CPUs" within
1413 a VPE, VPE-wide interrupt mask bits must be specially manipulated
1414 during interrupt handling. To support legacy drivers and interrupt
1415 controller management code, SMTC has a "backstop" to track and
1416 if necessary restore the interrupt mask. This has some performance
1417 impact on interrupt service overhead. Disable it only if you know
1418 what you are doing.
1419
1427config MIPS_VPE_LOADER_TOM 1420config MIPS_VPE_LOADER_TOM
1428 bool "Load VPE program into memory hidden from linux" 1421 bool "Load VPE program into memory hidden from linux"
1429 depends on MIPS_VPE_LOADER 1422 depends on MIPS_VPE_LOADER
@@ -1487,6 +1480,15 @@ config CPU_HAS_SMARTMIPS
1487config CPU_HAS_WB 1480config CPU_HAS_WB
1488 bool 1481 bool
1489 1482
1483config 64BIT_CONTEXT
1484 bool "Save 64bit integer registers"
1485 depends on 32BIT && CPU_LOONGSON2
1486 help
1487 Loongson2 CPU is 64bit , when used in 32BIT mode, its integer
1488 registers can still be accessed as 64bit, mainly for multimedia
1489 instructions. We must have all 64bit save/restored to make sure
1490 those instructions to get correct result.
1491
1490# 1492#
1491# Vectored interrupt mode is an R2 feature 1493# Vectored interrupt mode is an R2 feature
1492# 1494#
@@ -1862,7 +1864,7 @@ config MMU
1862 bool 1864 bool
1863 default y 1865 default y
1864 1866
1865config I8253 1867config PCSPEAKER
1866 bool 1868 bool
1867 1869
1868source "drivers/pcmcia/Kconfig" 1870source "drivers/pcmcia/Kconfig"
diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug
index 72d5c198e7..3efe117721 100644
--- a/arch/mips/Kconfig.debug
+++ b/arch/mips/Kconfig.debug
@@ -37,7 +37,7 @@ config DEBUG_STACK_USAGE
37 37
38 This option will slow down process creation somewhat. 38 This option will slow down process creation somewhat.
39 39
40config CONFIG_SMTC_IDLE_HOOK_DEBUG 40config SMTC_IDLE_HOOK_DEBUG
41 bool "Enable additional debug checks before going into CPU idle loop" 41 bool "Enable additional debug checks before going into CPU idle loop"
42 depends on DEBUG_KERNEL && MIPS_MT_SMTC 42 depends on DEBUG_KERNEL && MIPS_MT_SMTC
43 help 43 help
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index f450066b62..20d19c9b77 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -118,6 +118,7 @@ cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap
118cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap 118cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap
119cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap 119cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap
120cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap 120cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap
121cflags-$(CONFIG_CPU_LOONGSON2) += -march=r4600 -Wa,--trap
121cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ 122cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
122 -Wa,-mips32 -Wa,--trap 123 -Wa,-mips32 -Wa,--trap
123cflags-$(CONFIG_CPU_MIPS32_R2) += $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ 124cflags-$(CONFIG_CPU_MIPS32_R2) += $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
@@ -283,14 +284,6 @@ load-$(CONFIG_MACH_DECSTATION) += 0xffffffff80040000
283CLEAN_FILES += drivers/tc/lk201-map.c 284CLEAN_FILES += drivers/tc/lk201-map.c
284 285
285# 286#
286# Galileo EV64120 Board
287#
288core-$(CONFIG_MIPS_EV64120) += arch/mips/gt64120/ev64120/
289core-$(CONFIG_MIPS_EV64120) += arch/mips/gt64120/common/
290cflags-$(CONFIG_MIPS_EV64120) += -Iinclude/asm-mips/mach-ev64120
291load-$(CONFIG_MIPS_EV64120) += 0xffffffff80100000
292
293#
294# Wind River PPMC Board (4KC + GT64120) 287# Wind River PPMC Board (4KC + GT64120)
295# 288#
296core-$(CONFIG_WR_PPMC) += arch/mips/gt64120/wrppmc/ 289core-$(CONFIG_WR_PPMC) += arch/mips/gt64120/wrppmc/
@@ -298,6 +291,13 @@ cflags-$(CONFIG_WR_PPMC) += -Iinclude/asm-mips/mach-wrppmc
298load-$(CONFIG_WR_PPMC) += 0xffffffff80100000 291load-$(CONFIG_WR_PPMC) += 0xffffffff80100000
299 292
300# 293#
294# lemote fulong mini-PC board
295#
296core-$(CONFIG_LEMOTE_FULONG) +=arch/mips/lemote/lm2e/
297load-$(CONFIG_LEMOTE_FULONG) +=0xffffffff80100000
298cflags-$(CONFIG_LEMOTE_FULONG) += -Iinclude/asm-mips/mach-lemote
299
300#
301# For all MIPS, Inc. eval boards 301# For all MIPS, Inc. eval boards
302# 302#
303core-$(CONFIG_MIPS_BOARDS_GEN) += arch/mips/mips-boards/generic/ 303core-$(CONFIG_MIPS_BOARDS_GEN) += arch/mips/mips-boards/generic/
@@ -327,7 +327,7 @@ load-$(CONFIG_MIPS_SEAD) += 0xffffffff80100000
327# 327#
328# MIPS SIM 328# MIPS SIM
329# 329#
330core-$(CONFIG_MIPS_SIM) += arch/mips/mips-boards/sim/ 330core-$(CONFIG_MIPS_SIM) += arch/mips/mipssim/
331cflags-$(CONFIG_MIPS_SIM) += -Iinclude/asm-mips/mach-sim 331cflags-$(CONFIG_MIPS_SIM) += -Iinclude/asm-mips/mach-sim
332load-$(CONFIG_MIPS_SIM) += 0x80100000 332load-$(CONFIG_MIPS_SIM) += 0x80100000
333 333
@@ -343,12 +343,12 @@ cflags-$(CONFIG_MOMENCO_OCELOT) += -Iinclude/asm-mips/mach-ocelot
343load-$(CONFIG_MOMENCO_OCELOT) += 0xffffffff80100000 343load-$(CONFIG_MOMENCO_OCELOT) += 0xffffffff80100000
344 344
345# 345#
346# Momentum Ocelot-C and -CS boards 346# PMC-Sierra MSP SOCs
347# 347#
348# The Ocelot-C[S] setup.o must be linked early - it does the ioremap() for the 348core-$(CONFIG_PMC_MSP) += arch/mips/pmc-sierra/msp71xx/
349# mips_io_port_base. 349cflags-$(CONFIG_PMC_MSP) += -Iinclude/asm-mips/pmc-sierra/msp71xx \
350core-$(CONFIG_MOMENCO_OCELOT_C) += arch/mips/momentum/ocelot_c/ 350 -mno-branch-likely
351load-$(CONFIG_MOMENCO_OCELOT_C) += 0xffffffff80100000 351load-$(CONFIG_PMC_MSP) += 0xffffffff80100000
352 352
353# 353#
354# PMC-Sierra Yosemite 354# PMC-Sierra Yosemite
@@ -365,13 +365,6 @@ cflags-$(CONFIG_QEMU) += -Iinclude/asm-mips/mach-qemu
365load-$(CONFIG_QEMU) += 0xffffffff80010000 365load-$(CONFIG_QEMU) += 0xffffffff80010000
366 366
367# 367#
368# Momentum Ocelot-3
369#
370core-$(CONFIG_MOMENCO_OCELOT_3) += arch/mips/momentum/ocelot_3/
371cflags-$(CONFIG_MOMENCO_OCELOT_3) += -Iinclude/asm-mips/mach-ocelot3
372load-$(CONFIG_MOMENCO_OCELOT_3) += 0xffffffff80100000
373
374#
375# Basler eXcite 368# Basler eXcite
376# 369#
377core-$(CONFIG_BASLER_EXCITE) += arch/mips/basler/excite/ 370core-$(CONFIG_BASLER_EXCITE) += arch/mips/basler/excite/
@@ -389,10 +382,6 @@ core-$(CONFIG_DDB5XXX_COMMON) += arch/mips/ddb5xxx/common/
389core-$(CONFIG_DDB5477) += arch/mips/ddb5xxx/ddb5477/ 382core-$(CONFIG_DDB5477) += arch/mips/ddb5xxx/ddb5477/
390load-$(CONFIG_DDB5477) += 0xffffffff80100000 383load-$(CONFIG_DDB5477) += 0xffffffff80100000
391 384
392core-$(CONFIG_LASAT) += arch/mips/lasat/
393cflags-$(CONFIG_LASAT) += -Iinclude/asm-mips/mach-lasat
394load-$(CONFIG_LASAT) += 0xffffffff80000000
395
396# 385#
397# Common VR41xx 386# Common VR41xx
398# 387#
@@ -580,6 +569,7 @@ load-$(CONFIG_TOSHIBA_JMR3927) += 0xffffffff80050000
580# 569#
581core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/toshiba_rbtx4927/ 570core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/toshiba_rbtx4927/
582core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/common/ 571core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/common/
572cflags-$(CONFIG_TOSHIBA_RBTX4927) += -Iinclude/asm-mips/mach-tx49xx
583load-$(CONFIG_TOSHIBA_RBTX4927) += 0xffffffff80020000 573load-$(CONFIG_TOSHIBA_RBTX4927) += 0xffffffff80020000
584 574
585# 575#
@@ -587,6 +577,7 @@ load-$(CONFIG_TOSHIBA_RBTX4927) += 0xffffffff80020000
587# 577#
588core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/toshiba_rbtx4938/ 578core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/toshiba_rbtx4938/
589core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/common/ 579core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/common/
580cflags-$(CONFIG_TOSHIBA_RBTX4938) += -Iinclude/asm-mips/mach-tx49xx
590load-$(CONFIG_TOSHIBA_RBTX4938) += 0xffffffff80100000 581load-$(CONFIG_TOSHIBA_RBTX4938) += 0xffffffff80100000
591 582
592cflags-y += -Iinclude/asm-mips/mach-generic 583cflags-y += -Iinclude/asm-mips/mach-generic
@@ -603,7 +594,8 @@ JIFFIES = jiffies_64
603endif 594endif
604 595
605AFLAGS += $(cflags-y) 596AFLAGS += $(cflags-y)
606CFLAGS += $(cflags-y) 597CFLAGS += $(cflags-y) \
598 -D"VMLINUX_LOAD_ADDRESS=$(load-y)"
607 599
608LDFLAGS += -m $(ld-emul) 600LDFLAGS += -m $(ld-emul)
609 601
@@ -633,18 +625,11 @@ CPPFLAGS_vmlinux.lds := \
633head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o 625head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
634 626
635libs-y += arch/mips/lib/ 627libs-y += arch/mips/lib/
636libs-$(CONFIG_32BIT) += arch/mips/lib-32/
637libs-$(CONFIG_64BIT) += arch/mips/lib-64/
638 628
639core-y += arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/ 629core-y += arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/
640 630
641drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/ 631drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/
642 632
643ifdef CONFIG_LASAT
644rom.bin rom.sw: vmlinux
645 $(Q)$(MAKE) $(build)=arch/mips/lasat/image $@
646endif
647
648# 633#
649# Some machines like the Indy need 32-bit ELF binaries for booting purposes. 634# Some machines like the Indy need 32-bit ELF binaries for booting purposes.
650# Other need ECOFF, so we build a 32-bit ELF binary for them which we then 635# Other need ECOFF, so we build a 32-bit ELF binary for them which we then
@@ -702,32 +687,19 @@ vmlinux.srec: $(vmlinux-32)
702CLEAN_FILES += vmlinux.ecoff \ 687CLEAN_FILES += vmlinux.ecoff \
703 vmlinux.srec 688 vmlinux.srec
704 689
690archprepare:
691ifdef CONFIG_MIPS32_N32
692 @echo ' Checking missing-syscalls for N32'
693 $(Q)$(MAKE) $(build)=. missing-syscalls EXTRA_CFLAGS="-mabi=n32"
694endif
695ifdef CONFIG_MIPS32_O32
696 @echo ' Checking missing-syscalls for O32'
697 $(Q)$(MAKE) $(build)=. missing-syscalls EXTRA_CFLAGS="-mabi=32"
698endif
699
705archclean: 700archclean:
706 @$(MAKE) $(clean)=arch/mips/boot 701 @$(MAKE) $(clean)=arch/mips/boot
707 @$(MAKE) $(clean)=arch/mips/lasat
708 702
709CLEAN_FILES += vmlinux.32 \ 703CLEAN_FILES += vmlinux.32 \
710 vmlinux.64 \ 704 vmlinux.64 \
711 vmlinux.ecoff 705 vmlinux.ecoff
712
713quiet_cmd_syscalls_n32 = CALL-N32 $<
714 cmd_syscalls_n32 = $(CONFIG_SHELL) $< $(CC) $(c_flags) -mabi=n32
715
716quiet_cmd_syscalls_o32 = CALL-O32 $<
717 cmd_syscalls_o32 = $(CONFIG_SHELL) $< $(CC) $(c_flags) -mabi=32
718
719PHONY += missing-syscalls-n32 missing-syscalls-o32
720
721missing-syscalls-n32: scripts/checksyscalls.sh FORCE
722 $(call cmd,syscalls_n32)
723
724missing-syscalls-o32: scripts/checksyscalls.sh FORCE
725 $(call cmd,syscalls_o32)
726
727archprepare:
728ifdef CONFIG_MIPS32_N32
729 $(Q)$(MAKE) $(build)=arch/mips missing-syscalls-n32
730endif
731ifdef CONFIG_MIPS32_O32
732 $(Q)$(MAKE) $(build)=arch/mips missing-syscalls-o32
733endif
diff --git a/arch/mips/au1000/common/gpio.c b/arch/mips/au1000/common/gpio.c
index ce55297dcb..7abe420994 100644
--- a/arch/mips/au1000/common/gpio.c
+++ b/arch/mips/au1000/common/gpio.c
@@ -1,4 +1,7 @@
1/* 1/*
2 * Copyright (C) 2007, OpenWrt.org, Florian Fainelli <florian@openwrt.org>
3 * Architecture specific GPIO support
4 *
2 * This program is free software; you can redistribute it and/or modify it 5 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published by the 6 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; either version 2 of the License, or (at your 7 * Free Software Foundation; either version 2 of the License, or (at your
@@ -18,101 +21,136 @@
18 * You should have received a copy of the GNU General Public License along 21 * 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., 22 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 675 Mass Ave, Cambridge, MA 02139, USA. 23 * 675 Mass Ave, Cambridge, MA 02139, USA.
24 *
25 * Notes :
26 * au1000 SoC have only one GPIO line : GPIO1
27 * others have a second one : GPIO2
21 */ 28 */
29
30#include <linux/autoconf.h>
31#include <linux/init.h>
32#include <linux/io.h>
33#include <linux/types.h>
22#include <linux/module.h> 34#include <linux/module.h>
23#include <au1000.h> 35
24#include <au1xxx_gpio.h> 36#include <asm/addrspace.h>
37
38#include <asm/mach-au1x00/au1000.h>
39#include <asm/gpio.h>
25 40
26#define gpio1 sys 41#define gpio1 sys
27#if !defined(CONFIG_SOC_AU1000) 42#if !defined(CONFIG_SOC_AU1000)
28static AU1X00_GPIO2 * const gpio2 = (AU1X00_GPIO2 *)GPIO2_BASE;
29 43
30#define GPIO2_OUTPUT_ENABLE_MASK 0x00010000 44static struct au1x00_gpio2 *const gpio2 = (struct au1x00_gpio2 *) GPIO2_BASE;
45#define GPIO2_OUTPUT_ENABLE_MASK 0x00010000
31 46
32int au1xxx_gpio2_read(int signal) 47static int au1xxx_gpio2_read(unsigned gpio)
33{ 48{
34 signal -= 200; 49 gpio -= AU1XXX_GPIO_BASE;
35/* gpio2->dir &= ~(0x01 << signal); //Set GPIO to input */ 50 return ((gpio2->pinstate >> gpio) & 0x01);
36 return ((gpio2->pinstate >> signal) & 0x01);
37} 51}
38 52
39void au1xxx_gpio2_write(int signal, int value) 53static void au1xxx_gpio2_write(unsigned gpio, int value)
40{ 54{
41 signal -= 200; 55 gpio -= AU1XXX_GPIO_BASE;
42 56
43 gpio2->output = (GPIO2_OUTPUT_ENABLE_MASK << signal) | 57 gpio2->output = (GPIO2_OUTPUT_ENABLE_MASK << gpio) | (value << gpio);
44 (value << signal);
45} 58}
46 59
47void au1xxx_gpio2_tristate(int signal) 60static int au1xxx_gpio2_direction_input(unsigned gpio)
48{ 61{
49 signal -= 200; 62 gpio -= AU1XXX_GPIO_BASE;
50 gpio2->dir &= ~(0x01 << signal); /* Set GPIO to input */ 63 gpio2->dir &= ~(0x01 << gpio);
64 return 0;
51} 65}
52#endif
53 66
54int au1xxx_gpio1_read(int signal) 67static int au1xxx_gpio2_direction_output(unsigned gpio, int value)
68{
69 gpio -= AU1XXX_GPIO_BASE;
70 gpio2->dir = (0x01 << gpio) | (value << gpio);
71 return 0;
72}
73
74#endif /* !defined(CONFIG_SOC_AU1000) */
75
76static int au1xxx_gpio1_read(unsigned gpio)
55{ 77{
56/* gpio1->trioutclr |= (0x01 << signal); */ 78 return ((gpio1->pinstaterd >> gpio) & 0x01);
57 return ((gpio1->pinstaterd >> signal) & 0x01);
58} 79}
59 80
60void au1xxx_gpio1_write(int signal, int value) 81static void au1xxx_gpio1_write(unsigned gpio, int value)
61{ 82{
62 if(value) 83 if (value)
63 gpio1->outputset = (0x01 << signal); 84 gpio1->outputset = (0x01 << gpio);
64 else 85 else
65 gpio1->outputclr = (0x01 << signal); /* Output a Zero */ 86 /* Output a zero */
87 gpio1->outputclr = (0x01 << gpio);
66} 88}
67 89
68void au1xxx_gpio1_tristate(int signal) 90static int au1xxx_gpio1_direction_input(unsigned gpio)
69{ 91{
70 gpio1->trioutclr = (0x01 << signal); /* Tristate signal */ 92 gpio1->pininputen = (0x01 << gpio);
93 return 0;
71} 94}
72 95
96static int au1xxx_gpio1_direction_output(unsigned gpio, int value)
97{
98 gpio1->trioutclr = (0x01 & gpio);
99 return 0;
100}
73 101
74int au1xxx_gpio_read(int signal) 102int au1xxx_gpio_get_value(unsigned gpio)
75{ 103{
76 if(signal >= 200) 104 if (gpio >= AU1XXX_GPIO_BASE)
77#if defined(CONFIG_SOC_AU1000) 105#if defined(CONFIG_SOC_AU1000)
78 return 0; 106 return 0;
79#else 107#else
80 return au1xxx_gpio2_read(signal); 108 return au1xxx_gpio2_read(gpio);
81#endif 109#endif
82 else 110 else
83 return au1xxx_gpio1_read(signal); 111 return au1xxx_gpio1_read(gpio);
84} 112}
85 113
86void au1xxx_gpio_write(int signal, int value) 114EXPORT_SYMBOL(au1xxx_gpio_get_value);
115
116void au1xxx_gpio_set_value(unsigned gpio, int value)
87{ 117{
88 if(signal >= 200) 118 if (gpio >= AU1XXX_GPIO_BASE)
89#if defined(CONFIG_SOC_AU1000) 119#if defined(CONFIG_SOC_AU1000)
90 ; 120 ;
91#else 121#else
92 au1xxx_gpio2_write(signal, value); 122 au1xxx_gpio2_write(gpio, value);
93#endif 123#endif
94 else 124 else
95 au1xxx_gpio1_write(signal, value); 125 au1xxx_gpio1_write(gpio, value);
96} 126}
97 127
98void au1xxx_gpio_tristate(int signal) 128EXPORT_SYMBOL(au1xxx_gpio_set_value);
129
130int au1xxx_gpio_direction_input(unsigned gpio)
99{ 131{
100 if(signal >= 200) 132 if (gpio >= AU1XXX_GPIO_BASE)
101#if defined(CONFIG_SOC_AU1000) 133#if defined(CONFIG_SOC_AU1000)
102 ; 134 ;
103#else 135#else
104 au1xxx_gpio2_tristate(signal); 136 return au1xxx_gpio2_direction_input(gpio);
105#endif 137#endif
106 else 138 else
107 au1xxx_gpio1_tristate(signal); 139 return au1xxx_gpio1_direction_input(gpio);
108} 140}
109 141
110void au1xxx_gpio1_set_inputs(void) 142EXPORT_SYMBOL(au1xxx_gpio_direction_input);
143
144int au1xxx_gpio_direction_output(unsigned gpio, int value)
111{ 145{
112 gpio1->pininputen = 0; 146 if (gpio >= AU1XXX_GPIO_BASE)
147#if defined(CONFIG_SOC_AU1000)
148 ;
149#else
150 return au1xxx_gpio2_direction_output(gpio, value);
151#endif
152 else
153 return au1xxx_gpio1_direction_output(gpio, value);
113} 154}
114 155
115EXPORT_SYMBOL(au1xxx_gpio1_set_inputs); 156EXPORT_SYMBOL(au1xxx_gpio_direction_output);
116EXPORT_SYMBOL(au1xxx_gpio_tristate);
117EXPORT_SYMBOL(au1xxx_gpio_write);
118EXPORT_SYMBOL(au1xxx_gpio_read);
diff --git a/arch/mips/au1000/common/platform.c b/arch/mips/au1000/common/platform.c
index 8fd203d4a3..d51e18fb78 100644
--- a/arch/mips/au1000/common/platform.c
+++ b/arch/mips/au1000/common/platform.c
@@ -289,7 +289,7 @@ static struct platform_device *au1xxx_platform_devices[] __initdata = {
289#endif 289#endif
290}; 290};
291 291
292int au1xxx_platform_init(void) 292int __init au1xxx_platform_init(void)
293{ 293{
294 return platform_add_devices(au1xxx_platform_devices, ARRAY_SIZE(au1xxx_platform_devices)); 294 return platform_add_devices(au1xxx_platform_devices, ARRAY_SIZE(au1xxx_platform_devices));
295} 295}
diff --git a/arch/mips/au1000/common/setup.c b/arch/mips/au1000/common/setup.c
index 13fe187f35..a95b377731 100644
--- a/arch/mips/au1000/common/setup.c
+++ b/arch/mips/au1000/common/setup.c
@@ -100,18 +100,9 @@ void __init plat_mem_setup(void)
100 argptr = prom_getcmdline(); 100 argptr = prom_getcmdline();
101 /* default panel */ 101 /* default panel */
102 /*strcat(argptr, " video=au1100fb:panel:Sharp_320x240_16");*/ 102 /*strcat(argptr, " video=au1100fb:panel:Sharp_320x240_16");*/
103#ifdef CONFIG_MIPS_HYDROGEN3
104 strcat(argptr, " video=au1100fb:panel:Hydrogen_3_NEC_panel_320x240,nohwcursor");
105#endif
106 } 103 }
107#endif 104#endif
108 105
109#ifdef CONFIG_FB_XPERT98
110 if ((argptr = strstr(argptr, "video=")) == NULL) {
111 argptr = prom_getcmdline();
112 strcat(argptr, " video=atyfb:1024x768-8@70");
113 }
114#endif
115 106
116#if defined(CONFIG_SOUND_AU1X00) && !defined(CONFIG_SOC_AU1000) 107#if defined(CONFIG_SOUND_AU1X00) && !defined(CONFIG_SOC_AU1000)
117 /* au1000 does not support vra, au1500 and au1100 do */ 108 /* au1000 does not support vra, au1500 and au1100 do */
diff --git a/arch/mips/au1000/common/time.c b/arch/mips/au1000/common/time.c
index fa1c62f055..8fc29982d7 100644
--- a/arch/mips/au1000/common/time.c
+++ b/arch/mips/au1000/common/time.c
@@ -203,11 +203,7 @@ wakeup_counter0_set(int ticks)
203/* I haven't found anyone that doesn't use a 12 MHz source clock, 203/* I haven't found anyone that doesn't use a 12 MHz source clock,
204 * but just in case..... 204 * but just in case.....
205 */ 205 */
206#ifdef CONFIG_AU1000_SRC_CLK
207#define AU1000_SRC_CLK CONFIG_AU1000_SRC_CLK
208#else
209#define AU1000_SRC_CLK 12000000 206#define AU1000_SRC_CLK 12000000
210#endif
211 207
212/* 208/*
213 * We read the real processor speed from the PLL. This is important 209 * We read the real processor speed from the PLL. This is important
@@ -247,33 +243,8 @@ unsigned long cal_r4koff(void)
247 au_writel (0, SYS_TOYWRITE); 243 au_writel (0, SYS_TOYWRITE);
248 while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S); 244 while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S);
249 245
250#if defined(CONFIG_AU1000_USE32K)
251 {
252 unsigned long start, end, count;
253
254 start = au_readl(SYS_RTCREAD);
255 start += 2;
256 /* wait for the beginning of a new tick
257 */
258 while (au_readl(SYS_RTCREAD) < start);
259
260 /* Start r4k counter.
261 */
262 write_c0_count(0);
263
264 /* Wait 0.5 seconds.
265 */
266 end = start + (32768 / trim_divide)/2;
267
268 while (end > au_readl(SYS_RTCREAD));
269
270 count = read_c0_count();
271 cpu_speed = count * 2;
272 }
273#else
274 cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * 246 cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) *
275 AU1000_SRC_CLK; 247 AU1000_SRC_CLK;
276#endif
277 } 248 }
278 else { 249 else {
279 /* The 32KHz oscillator isn't running, so assume there 250 /* The 32KHz oscillator isn't running, so assume there
diff --git a/arch/mips/au1000/pb1100/init.c b/arch/mips/au1000/pb1100/init.c
index 1fae39a608..6131b56f41 100644
--- a/arch/mips/au1000/pb1100/init.c
+++ b/arch/mips/au1000/pb1100/init.c
@@ -53,7 +53,7 @@ void __init prom_init(void)
53 53
54 prom_argc = fw_arg0; 54 prom_argc = fw_arg0;
55 prom_argv = (char **) fw_arg1; 55 prom_argv = (char **) fw_arg1;
56 prom_envp = (int *) fw_arg3; 56 prom_envp = (char **) fw_arg3;
57 57
58 mips_machgroup = MACH_GROUP_ALCHEMY; 58 mips_machgroup = MACH_GROUP_ALCHEMY;
59 mips_machtype = MACH_PB1100; 59 mips_machtype = MACH_PB1100;
diff --git a/arch/mips/au1000/pb1200/board_setup.c b/arch/mips/au1000/pb1200/board_setup.c
index 043302b7fe..eea2092bde 100644
--- a/arch/mips/au1000/pb1200/board_setup.c
+++ b/arch/mips/au1000/pb1200/board_setup.c
@@ -131,14 +131,7 @@ void __init board_setup(void)
131 /* The Pb1200 development board uses external MUX for PSC0 to 131 /* The Pb1200 development board uses external MUX for PSC0 to
132 support SMB/SPI. bcsr->resets bit 12: 0=SMB 1=SPI 132 support SMB/SPI. bcsr->resets bit 12: 0=SMB 1=SPI
133 */ 133 */
134#if defined(CONFIG_AU1XXX_PSC_SPI) && defined(CONFIG_I2C_AU1550) 134#ifdef CONFIG_I2C_AU1550
135 #error I2C and SPI are mutually exclusive. Both are physically connected to PSC0.\
136 Refer to Pb1200/Db1200 documentation.
137#elif defined( CONFIG_AU1XXX_PSC_SPI )
138 bcsr->resets |= BCSR_RESETS_PCS0MUX;
139 /*Hard Coding Value to enable Temp Sensors [bit 14] Value for SOC Au1200. Pls refer documentation*/
140 bcsr->resets =0x900f;
141#elif defined( CONFIG_I2C_AU1550 )
142 bcsr->resets &= (~BCSR_RESETS_PCS0MUX); 135 bcsr->resets &= (~BCSR_RESETS_PCS0MUX);
143#endif 136#endif
144 au_sync(); 137 au_sync();
diff --git a/arch/mips/au1000/pb1500/board_setup.c b/arch/mips/au1000/pb1500/board_setup.c
index 0ffdb4fd57..c9b655616f 100644
--- a/arch/mips/au1000/pb1500/board_setup.c
+++ b/arch/mips/au1000/pb1500/board_setup.c
@@ -125,7 +125,7 @@ void __init board_setup(void)
125 au_writel((au_readl(0xac000028) | 0x20), 0xac000028); 125 au_writel((au_readl(0xac000028) | 0x20), 0xac000028);
126 } 126 }
127 /* Put the clock in BCD mode */ 127 /* Put the clock in BCD mode */
128 if (readl(0xac00002C) & 0x4) { /* reg B */ 128 if (au_readl(0xac00002C) & 0x4) { /* reg B */
129 au_writel(au_readl(0xac00002c) & ~0x4, 0xac00002c); 129 au_writel(au_readl(0xac00002c) & ~0x4, 0xac00002c);
130 au_sync(); 130 au_sync();
131 } 131 }
diff --git a/arch/mips/basler/excite/excite_setup.c b/arch/mips/basler/excite/excite_setup.c
index 2f0e4c08eb..56003188f1 100644
--- a/arch/mips/basler/excite/excite_setup.c
+++ b/arch/mips/basler/excite/excite_setup.c
@@ -26,6 +26,7 @@
26#include <linux/tty.h> 26#include <linux/tty.h>
27#include <linux/serial_core.h> 27#include <linux/serial_core.h>
28#include <linux/serial.h> 28#include <linux/serial.h>
29#include <linux/serial_8250.h>
29#include <linux/ioport.h> 30#include <linux/ioport.h>
30#include <linux/spinlock.h> 31#include <linux/spinlock.h>
31#include <asm/bootinfo.h> 32#include <asm/bootinfo.h>
diff --git a/arch/mips/cobalt/pci.c b/arch/mips/cobalt/pci.c
index d91027f43d..cfce7af1bc 100644
--- a/arch/mips/cobalt/pci.c
+++ b/arch/mips/cobalt/pci.c
@@ -35,6 +35,7 @@ static struct pci_controller cobalt_pci_controller = {
35 .mem_resource = &cobalt_mem_resource, 35 .mem_resource = &cobalt_mem_resource,
36 .io_resource = &cobalt_io_resource, 36 .io_resource = &cobalt_io_resource,
37 .io_offset = 0 - GT_DEF_PCI0_IO_BASE, 37 .io_offset = 0 - GT_DEF_PCI0_IO_BASE,
38 .io_map_base = CKSEG1ADDR(GT_DEF_PCI0_IO_BASE),
38}; 39};
39 40
40static int __init cobalt_pci_init(void) 41static int __init cobalt_pci_init(void)
diff --git a/arch/mips/configs/atlas_defconfig b/arch/mips/configs/atlas_defconfig
index 39e251300c..129e2c961f 100644
--- a/arch/mips/configs/atlas_defconfig
+++ b/arch/mips/configs/atlas_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31CONFIG_MIPS_ATLAS=y 29CONFIG_MIPS_ATLAS=y
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_MIPS_ATLAS=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig
index 4713a13211..dc3e1bf4e4 100644
--- a/arch/mips/configs/bigsur_defconfig
+++ b/arch/mips/configs/bigsur_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/capcella_defconfig b/arch/mips/configs/capcella_defconfig
index 5e7ae56b1f..4c7031222e 100644
--- a/arch/mips/configs/capcella_defconfig
+++ b/arch/mips/configs/capcella_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/cobalt_defconfig b/arch/mips/configs/cobalt_defconfig
index 631b2138ad..c8c05785a8 100644
--- a/arch/mips/configs/cobalt_defconfig
+++ b/arch/mips/configs/cobalt_defconfig
@@ -1,44 +1,24 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21-rc7 3# Linux kernel version: 2.6.22-rc2
4# Wed Apr 18 14:25:45 2007 4# Fri May 25 11:17: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_MACH_ALCHEMY is not set
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set 12# CONFIG_BASLER_EXCITE is not set
26CONFIG_MIPS_COBALT=y 13CONFIG_MIPS_COBALT=y
27# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 15# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 16# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 17# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 18# CONFIG_MIPS_SEAD is not set
34# CONFIG_WR_PPMC is not set 19# CONFIG_WR_PPMC is not set
35# CONFIG_MIPS_SIM is not set 20# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 21# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 22# CONFIG_PNX8550_JBS is not set
43# CONFIG_PNX8550_STB810 is not set 23# CONFIG_PNX8550_STB810 is not set
44# CONFIG_DDB5477 is not set 24# CONFIG_DDB5477 is not set
@@ -138,7 +118,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
138# CONFIG_SPARSEMEM_STATIC is not set 118# CONFIG_SPARSEMEM_STATIC is not set
139CONFIG_SPLIT_PTLOCK_CPUS=4 119CONFIG_SPLIT_PTLOCK_CPUS=4
140# CONFIG_RESOURCES_64BIT is not set 120# CONFIG_RESOURCES_64BIT is not set
141CONFIG_ZONE_DMA_FLAG=1 121CONFIG_ZONE_DMA_FLAG=0
142# CONFIG_HZ_48 is not set 122# CONFIG_HZ_48 is not set
143# CONFIG_HZ_100 is not set 123# CONFIG_HZ_100 is not set
144# CONFIG_HZ_128 is not set 124# CONFIG_HZ_128 is not set
@@ -178,6 +158,7 @@ CONFIG_SYSVIPC_SYSCTL=y
178# CONFIG_UTS_NS is not set 158# CONFIG_UTS_NS is not set
179# CONFIG_AUDIT is not set 159# CONFIG_AUDIT is not set
180# CONFIG_IKCONFIG is not set 160# CONFIG_IKCONFIG is not set
161CONFIG_LOG_BUF_SHIFT=14
181CONFIG_SYSFS_DEPRECATED=y 162CONFIG_SYSFS_DEPRECATED=y
182CONFIG_RELAY=y 163CONFIG_RELAY=y
183# CONFIG_BLK_DEV_INITRD is not set 164# CONFIG_BLK_DEV_INITRD is not set
@@ -193,14 +174,19 @@ CONFIG_BUG=y
193CONFIG_ELF_CORE=y 174CONFIG_ELF_CORE=y
194CONFIG_BASE_FULL=y 175CONFIG_BASE_FULL=y
195CONFIG_FUTEX=y 176CONFIG_FUTEX=y
177CONFIG_ANON_INODES=y
196CONFIG_EPOLL=y 178CONFIG_EPOLL=y
179CONFIG_SIGNALFD=y
180CONFIG_TIMERFD=y
181CONFIG_EVENTFD=y
197CONFIG_SHMEM=y 182CONFIG_SHMEM=y
198CONFIG_SLAB=y
199CONFIG_VM_EVENT_COUNTERS=y 183CONFIG_VM_EVENT_COUNTERS=y
184CONFIG_SLAB=y
185# CONFIG_SLUB is not set
186# CONFIG_SLOB is not set
200CONFIG_RT_MUTEXES=y 187CONFIG_RT_MUTEXES=y
201# CONFIG_TINY_SHMEM is not set 188# CONFIG_TINY_SHMEM is not set
202CONFIG_BASE_SMALL=0 189CONFIG_BASE_SMALL=0
203# CONFIG_SLOB is not set
204 190
205# 191#
206# Loadable module support 192# Loadable module support
@@ -233,16 +219,13 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
233# 219#
234CONFIG_HW_HAS_PCI=y 220CONFIG_HW_HAS_PCI=y
235CONFIG_PCI=y 221CONFIG_PCI=y
222# CONFIG_ARCH_SUPPORTS_MSI is not set
236CONFIG_MMU=y 223CONFIG_MMU=y
237 224
238# 225#
239# PCCARD (PCMCIA/CardBus) support 226# PCCARD (PCMCIA/CardBus) support
240# 227#
241# CONFIG_PCCARD is not set 228# CONFIG_PCCARD is not set
242
243#
244# PCI Hotplug Support
245#
246# CONFIG_HOTPLUG_PCI is not set 229# CONFIG_HOTPLUG_PCI is not set
247 230
248# 231#
@@ -268,7 +251,6 @@ CONFIG_NET=y
268# 251#
269# Networking options 252# Networking options
270# 253#
271# CONFIG_NETDEBUG is not set
272CONFIG_PACKET=y 254CONFIG_PACKET=y
273# CONFIG_PACKET_MMAP is not set 255# CONFIG_PACKET_MMAP is not set
274CONFIG_UNIX=y 256CONFIG_UNIX=y
@@ -300,11 +282,11 @@ CONFIG_INET_TCP_DIAG=y
300# CONFIG_TCP_CONG_ADVANCED is not set 282# CONFIG_TCP_CONG_ADVANCED is not set
301CONFIG_TCP_CONG_CUBIC=y 283CONFIG_TCP_CONG_CUBIC=y
302CONFIG_DEFAULT_TCP_CONG="cubic" 284CONFIG_DEFAULT_TCP_CONG="cubic"
303CONFIG_TCP_MD5SIG=y 285# CONFIG_TCP_MD5SIG is not set
304# CONFIG_IPV6 is not set 286# CONFIG_IPV6 is not set
305# CONFIG_INET6_XFRM_TUNNEL is not set 287# CONFIG_INET6_XFRM_TUNNEL is not set
306# CONFIG_INET6_TUNNEL is not set 288# CONFIG_INET6_TUNNEL is not set
307CONFIG_NETWORK_SECMARK=y 289# CONFIG_NETWORK_SECMARK is not set
308# CONFIG_NETFILTER is not set 290# CONFIG_NETFILTER is not set
309 291
310# 292#
@@ -345,13 +327,16 @@ CONFIG_NETWORK_SECMARK=y
345# CONFIG_HAMRADIO is not set 327# CONFIG_HAMRADIO is not set
346# CONFIG_IRDA is not set 328# CONFIG_IRDA is not set
347# CONFIG_BT is not set 329# CONFIG_BT is not set
348CONFIG_IEEE80211=y 330# CONFIG_AF_RXRPC is not set
349# CONFIG_IEEE80211_DEBUG is not set 331
350CONFIG_IEEE80211_CRYPT_WEP=y 332#
351CONFIG_IEEE80211_CRYPT_CCMP=y 333# Wireless
352CONFIG_IEEE80211_SOFTMAC=y 334#
353# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set 335# CONFIG_CFG80211 is not set
354CONFIG_WIRELESS_EXT=y 336# CONFIG_WIRELESS_EXT is not set
337# CONFIG_MAC80211 is not set
338# CONFIG_IEEE80211 is not set
339# CONFIG_RFKILL is not set
355 340
356# 341#
357# Device Drivers 342# Device Drivers
@@ -370,10 +355,6 @@ CONFIG_FW_LOADER=y
370# 355#
371CONFIG_CONNECTOR=y 356CONFIG_CONNECTOR=y
372CONFIG_PROC_EVENTS=y 357CONFIG_PROC_EVENTS=y
373
374#
375# Memory Technology Devices (MTD)
376#
377CONFIG_MTD=y 358CONFIG_MTD=y
378# CONFIG_MTD_DEBUG is not set 359# CONFIG_MTD_DEBUG is not set
379# CONFIG_MTD_CONCAT is not set 360# CONFIG_MTD_CONCAT is not set
@@ -418,7 +399,6 @@ CONFIG_MTD_CFI_UTIL=y
418# CONFIG_MTD_RAM is not set 399# CONFIG_MTD_RAM is not set
419# CONFIG_MTD_ROM is not set 400# CONFIG_MTD_ROM is not set
420# CONFIG_MTD_ABSENT is not set 401# CONFIG_MTD_ABSENT is not set
421# CONFIG_MTD_OBSOLETE_CHIPS is not set
422 402
423# 403#
424# Mapping drivers for chip access 404# Mapping drivers for chip access
@@ -445,16 +425,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=0
445# CONFIG_MTD_DOC2000 is not set 425# CONFIG_MTD_DOC2000 is not set
446# CONFIG_MTD_DOC2001 is not set 426# CONFIG_MTD_DOC2001 is not set
447# CONFIG_MTD_DOC2001PLUS is not set 427# CONFIG_MTD_DOC2001PLUS is not set
448
449#
450# NAND Flash Device Drivers
451#
452# CONFIG_MTD_NAND is not set 428# CONFIG_MTD_NAND is not set
429# CONFIG_MTD_ONENAND is not set
453 430
454# 431#
455# OneNAND Flash Device Drivers 432# UBI - Unsorted block images
456# 433#
457# CONFIG_MTD_ONENAND is not set 434# CONFIG_MTD_UBI is not set
458 435
459# 436#
460# Parallel port support 437# Parallel port support
@@ -479,87 +456,145 @@ CONFIG_BLK_DEV_LOOP=y
479# CONFIG_BLK_DEV_NBD is not set 456# CONFIG_BLK_DEV_NBD is not set
480# CONFIG_BLK_DEV_SX8 is not set 457# CONFIG_BLK_DEV_SX8 is not set
481# CONFIG_BLK_DEV_RAM is not set 458# CONFIG_BLK_DEV_RAM is not set
482CONFIG_CDROM_PKTCDVD=y 459# CONFIG_CDROM_PKTCDVD is not set
483CONFIG_CDROM_PKTCDVD_BUFFERS=8 460# CONFIG_ATA_OVER_ETH is not set
484# CONFIG_CDROM_PKTCDVD_WCACHE is not set
485CONFIG_ATA_OVER_ETH=y
486 461
487# 462#
488# Misc devices 463# Misc devices
489# 464#
490CONFIG_SGI_IOC4=y 465# CONFIG_PHANTOM is not set
466# CONFIG_SGI_IOC4 is not set
491# CONFIG_TIFM_CORE is not set 467# CONFIG_TIFM_CORE is not set
492 468# CONFIG_BLINK is not set
493# 469# CONFIG_IDE is not set
494# ATA/ATAPI/MFM/RLL support
495#
496CONFIG_IDE=y
497CONFIG_IDE_MAX_HWIFS=4
498CONFIG_BLK_DEV_IDE=y
499
500#
501# Please see Documentation/ide.txt for help/info on IDE drives
502#
503# CONFIG_BLK_DEV_IDE_SATA is not set
504CONFIG_BLK_DEV_IDEDISK=y
505# CONFIG_IDEDISK_MULTI_MODE is not set
506# CONFIG_BLK_DEV_IDECD is not set
507# CONFIG_BLK_DEV_IDETAPE is not set
508# CONFIG_BLK_DEV_IDEFLOPPY is not set
509# CONFIG_IDE_TASK_IOCTL is not set
510
511#
512# IDE chipset support/bugfixes
513#
514CONFIG_IDE_GENERIC=y
515CONFIG_BLK_DEV_IDEPCI=y
516# CONFIG_IDEPCI_SHARE_IRQ is not set
517# CONFIG_BLK_DEV_OFFBOARD is not set
518# CONFIG_BLK_DEV_GENERIC is not set
519# CONFIG_BLK_DEV_OPTI621 is not set
520CONFIG_BLK_DEV_IDEDMA_PCI=y
521# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
522# CONFIG_IDEDMA_ONLYDISK is not set
523# CONFIG_BLK_DEV_AEC62XX is not set
524# CONFIG_BLK_DEV_ALI15X3 is not set
525# CONFIG_BLK_DEV_AMD74XX is not set
526# CONFIG_BLK_DEV_CMD64X is not set
527# CONFIG_BLK_DEV_TRIFLEX is not set
528# CONFIG_BLK_DEV_CY82C693 is not set
529# CONFIG_BLK_DEV_CS5520 is not set
530# CONFIG_BLK_DEV_CS5530 is not set
531# CONFIG_BLK_DEV_HPT34X is not set
532# CONFIG_BLK_DEV_HPT366 is not set
533# CONFIG_BLK_DEV_JMICRON is not set
534# CONFIG_BLK_DEV_SC1200 is not set
535# CONFIG_BLK_DEV_PIIX is not set
536CONFIG_BLK_DEV_IT8213=y
537# CONFIG_BLK_DEV_IT821X is not set
538# CONFIG_BLK_DEV_NS87415 is not set
539# CONFIG_BLK_DEV_PDC202XX_OLD is not set
540# CONFIG_BLK_DEV_PDC202XX_NEW is not set
541# CONFIG_BLK_DEV_SVWKS is not set
542# CONFIG_BLK_DEV_SIIMAGE is not set
543# CONFIG_BLK_DEV_SLC90E66 is not set
544# CONFIG_BLK_DEV_TRM290 is not set
545CONFIG_BLK_DEV_VIA82CXXX=y
546CONFIG_BLK_DEV_TC86C001=y
547# CONFIG_IDE_ARM is not set
548CONFIG_BLK_DEV_IDEDMA=y
549# CONFIG_IDEDMA_IVB is not set
550# CONFIG_BLK_DEV_HD is not set
551 470
552# 471#
553# SCSI device support 472# SCSI device support
554# 473#
555CONFIG_RAID_ATTRS=y 474CONFIG_RAID_ATTRS=y
556# CONFIG_SCSI is not set 475CONFIG_SCSI=y
476# CONFIG_SCSI_TGT is not set
557# CONFIG_SCSI_NETLINK is not set 477# CONFIG_SCSI_NETLINK is not set
558 478CONFIG_SCSI_PROC_FS=y
559# 479
560# Serial ATA (prod) and Parallel ATA (experimental) drivers 480#
561# 481# SCSI support type (disk, tape, CD-ROM)
562# CONFIG_ATA is not set 482#
483CONFIG_BLK_DEV_SD=y
484# CONFIG_CHR_DEV_ST is not set
485# CONFIG_CHR_DEV_OSST is not set
486# CONFIG_BLK_DEV_SR is not set
487# CONFIG_CHR_DEV_SG is not set
488# CONFIG_CHR_DEV_SCH is not set
489
490#
491# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
492#
493# CONFIG_SCSI_MULTI_LUN is not set
494# CONFIG_SCSI_CONSTANTS is not set
495# CONFIG_SCSI_LOGGING is not set
496# CONFIG_SCSI_SCAN_ASYNC is not set
497
498#
499# SCSI Transports
500#
501# CONFIG_SCSI_SPI_ATTRS is not set
502# CONFIG_SCSI_FC_ATTRS is not set
503# CONFIG_SCSI_ISCSI_ATTRS is not set
504# CONFIG_SCSI_SAS_ATTRS is not set
505# CONFIG_SCSI_SAS_LIBSAS is not set
506
507#
508# SCSI low-level drivers
509#
510# CONFIG_ISCSI_TCP is not set
511# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
512# CONFIG_SCSI_3W_9XXX is not set
513# CONFIG_SCSI_ACARD is not set
514# CONFIG_SCSI_AACRAID is not set
515# CONFIG_SCSI_AIC7XXX is not set
516# CONFIG_SCSI_AIC7XXX_OLD is not set
517# CONFIG_SCSI_AIC79XX is not set
518# CONFIG_SCSI_AIC94XX is not set
519# CONFIG_SCSI_DPT_I2O is not set
520# CONFIG_SCSI_ARCMSR is not set
521# CONFIG_MEGARAID_NEWGEN is not set
522# CONFIG_MEGARAID_LEGACY is not set
523# CONFIG_MEGARAID_SAS is not set
524# CONFIG_SCSI_HPTIOP is not set
525# CONFIG_SCSI_DMX3191D is not set
526# CONFIG_SCSI_FUTURE_DOMAIN is not set
527# CONFIG_SCSI_IPS is not set
528# CONFIG_SCSI_INITIO is not set
529# CONFIG_SCSI_INIA100 is not set
530# CONFIG_SCSI_STEX is not set
531# CONFIG_SCSI_SYM53C8XX_2 is not set
532# CONFIG_SCSI_IPR is not set
533# CONFIG_SCSI_QLOGIC_1280 is not set
534# CONFIG_SCSI_QLA_FC is not set
535# CONFIG_SCSI_QLA_ISCSI is not set
536# CONFIG_SCSI_LPFC is not set
537# CONFIG_SCSI_DC395x is not set
538# CONFIG_SCSI_DC390T is not set
539# CONFIG_SCSI_NSP32 is not set
540# CONFIG_SCSI_DEBUG is not set
541# CONFIG_SCSI_ESP_CORE is not set
542# CONFIG_SCSI_SRP is not set
543CONFIG_ATA=y
544# CONFIG_ATA_NONSTANDARD is not set
545# CONFIG_SATA_AHCI is not set
546# CONFIG_SATA_SVW is not set
547# CONFIG_ATA_PIIX is not set
548# CONFIG_SATA_MV is not set
549# CONFIG_SATA_NV is not set
550# CONFIG_PDC_ADMA is not set
551# CONFIG_SATA_QSTOR is not set
552# CONFIG_SATA_PROMISE is not set
553# CONFIG_SATA_SX4 is not set
554# CONFIG_SATA_SIL is not set
555# CONFIG_SATA_SIL24 is not set
556# CONFIG_SATA_SIS is not set
557# CONFIG_SATA_ULI is not set
558# CONFIG_SATA_VIA is not set
559# CONFIG_SATA_VITESSE is not set
560# CONFIG_SATA_INIC162X is not set
561# CONFIG_PATA_ALI is not set
562# CONFIG_PATA_AMD is not set
563# CONFIG_PATA_ARTOP is not set
564# CONFIG_PATA_ATIIXP is not set
565# CONFIG_PATA_CMD640_PCI is not set
566# CONFIG_PATA_CMD64X is not set
567# CONFIG_PATA_CS5520 is not set
568# CONFIG_PATA_CS5530 is not set
569# CONFIG_PATA_CYPRESS is not set
570# CONFIG_PATA_EFAR is not set
571# CONFIG_ATA_GENERIC is not set
572# CONFIG_PATA_HPT366 is not set
573# CONFIG_PATA_HPT37X is not set
574# CONFIG_PATA_HPT3X2N is not set
575# CONFIG_PATA_HPT3X3 is not set
576# CONFIG_PATA_IT821X is not set
577# CONFIG_PATA_IT8213 is not set
578# CONFIG_PATA_JMICRON is not set
579# CONFIG_PATA_TRIFLEX is not set
580# CONFIG_PATA_MARVELL is not set
581# CONFIG_PATA_MPIIX is not set
582# CONFIG_PATA_OLDPIIX is not set
583# CONFIG_PATA_NETCELL is not set
584# CONFIG_PATA_NS87410 is not set
585# CONFIG_PATA_OPTI is not set
586# CONFIG_PATA_OPTIDMA is not set
587# CONFIG_PATA_PDC_OLD is not set
588# CONFIG_PATA_RADISYS is not set
589# CONFIG_PATA_RZ1000 is not set
590# CONFIG_PATA_SC1200 is not set
591# CONFIG_PATA_SERVERWORKS is not set
592# CONFIG_PATA_PDC2027X is not set
593# CONFIG_PATA_SIL680 is not set
594# CONFIG_PATA_SIS is not set
595CONFIG_PATA_VIA=y
596# CONFIG_PATA_WINBOND is not set
597# CONFIG_PATA_PLATFORM is not set
563 598
564# 599#
565# Multi-device support (RAID and LVM) 600# Multi-device support (RAID and LVM)
@@ -570,10 +605,14 @@ CONFIG_RAID_ATTRS=y
570# Fusion MPT device support 605# Fusion MPT device support
571# 606#
572# CONFIG_FUSION is not set 607# CONFIG_FUSION is not set
608# CONFIG_FUSION_SPI is not set
609# CONFIG_FUSION_FC is not set
610# CONFIG_FUSION_SAS is not set
573 611
574# 612#
575# IEEE 1394 (FireWire) support 613# IEEE 1394 (FireWire) support
576# 614#
615# CONFIG_FIREWIRE is not set
577# CONFIG_IEEE1394 is not set 616# CONFIG_IEEE1394 is not set
578 617
579# 618#
@@ -594,24 +633,7 @@ CONFIG_NETDEVICES=y
594# ARCnet devices 633# ARCnet devices
595# 634#
596# CONFIG_ARCNET is not set 635# CONFIG_ARCNET is not set
597 636# CONFIG_PHYLIB is not set
598#
599# PHY device support
600#
601CONFIG_PHYLIB=y
602
603#
604# MII PHY device drivers
605#
606CONFIG_MARVELL_PHY=y
607CONFIG_DAVICOM_PHY=y
608CONFIG_QSEMI_PHY=y
609CONFIG_LXT_PHY=y
610CONFIG_CICADA_PHY=y
611CONFIG_VITESSE_PHY=y
612CONFIG_SMSC_PHY=y
613# CONFIG_BROADCOM_PHY is not set
614# CONFIG_FIXED_PHY is not set
615 637
616# 638#
617# Ethernet (10 or 100Mbit) 639# Ethernet (10 or 100Mbit)
@@ -639,35 +661,8 @@ CONFIG_TULIP=y
639# CONFIG_ULI526X is not set 661# CONFIG_ULI526X is not set
640# CONFIG_HP100 is not set 662# CONFIG_HP100 is not set
641# CONFIG_NET_PCI is not set 663# CONFIG_NET_PCI is not set
642 664# CONFIG_NETDEV_1000 is not set
643# 665# CONFIG_NETDEV_10000 is not set
644# Ethernet (1000 Mbit)
645#
646# CONFIG_ACENIC is not set
647# CONFIG_DL2K is not set
648# CONFIG_E1000 is not set
649# CONFIG_NS83820 is not set
650# CONFIG_HAMACHI is not set
651# CONFIG_YELLOWFIN is not set
652# CONFIG_R8169 is not set
653# CONFIG_SIS190 is not set
654# CONFIG_SKGE is not set
655# CONFIG_SKY2 is not set
656# CONFIG_SK98LIN is not set
657# CONFIG_TIGON3 is not set
658# CONFIG_BNX2 is not set
659CONFIG_QLA3XXX=y
660# CONFIG_ATL1 is not set
661
662#
663# Ethernet (10000 Mbit)
664#
665# CONFIG_CHELSIO_T1 is not set
666CONFIG_CHELSIO_T3=y
667# CONFIG_IXGB is not set
668# CONFIG_S2IO is not set
669# CONFIG_MYRI10GE is not set
670CONFIG_NETXEN_NIC=y
671 666
672# 667#
673# Token Ring devices 668# Token Ring devices
@@ -675,18 +670,16 @@ CONFIG_NETXEN_NIC=y
675# CONFIG_TR is not set 670# CONFIG_TR is not set
676 671
677# 672#
678# Wireless LAN (non-hamradio) 673# Wireless LAN
679#
680# CONFIG_NET_RADIO is not set
681
682#
683# Wan interfaces
684# 674#
675# CONFIG_WLAN_PRE80211 is not set
676# CONFIG_WLAN_80211 is not set
685# CONFIG_WAN is not set 677# CONFIG_WAN is not set
686# CONFIG_FDDI is not set 678# CONFIG_FDDI is not set
687# CONFIG_HIPPI is not set 679# CONFIG_HIPPI is not set
688# CONFIG_PPP is not set 680# CONFIG_PPP is not set
689# CONFIG_SLIP is not set 681# CONFIG_SLIP is not set
682# CONFIG_NET_FC is not set
690# CONFIG_SHAPER is not set 683# CONFIG_SHAPER is not set
691# CONFIG_NETCONSOLE is not set 684# CONFIG_NETCONSOLE is not set
692# CONFIG_NETPOLL is not set 685# CONFIG_NETPOLL is not set
@@ -711,10 +704,7 @@ CONFIG_INPUT=y
711# 704#
712# Userland interfaces 705# Userland interfaces
713# 706#
714CONFIG_INPUT_MOUSEDEV=y 707# CONFIG_INPUT_MOUSEDEV is not set
715CONFIG_INPUT_MOUSEDEV_PSAUX=y
716CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
717CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
718# CONFIG_INPUT_JOYDEV is not set 708# CONFIG_INPUT_JOYDEV is not set
719# CONFIG_INPUT_TSDEV is not set 709# CONFIG_INPUT_TSDEV is not set
720# CONFIG_INPUT_EVDEV is not set 710# CONFIG_INPUT_EVDEV is not set
@@ -726,18 +716,23 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
726# CONFIG_INPUT_KEYBOARD is not set 716# CONFIG_INPUT_KEYBOARD is not set
727# CONFIG_INPUT_MOUSE is not set 717# CONFIG_INPUT_MOUSE is not set
728# CONFIG_INPUT_JOYSTICK is not set 718# CONFIG_INPUT_JOYSTICK is not set
719# CONFIG_INPUT_TABLET is not set
729# CONFIG_INPUT_TOUCHSCREEN is not set 720# CONFIG_INPUT_TOUCHSCREEN is not set
730# CONFIG_INPUT_MISC is not set 721CONFIG_INPUT_MISC=y
722# CONFIG_INPUT_PCSPKR is not set
723CONFIG_INPUT_COBALT_BTNS=y
724# CONFIG_INPUT_ATI_REMOTE is not set
725# CONFIG_INPUT_ATI_REMOTE2 is not set
726# CONFIG_INPUT_KEYSPAN_REMOTE is not set
727# CONFIG_INPUT_POWERMATE is not set
728# CONFIG_INPUT_YEALINK is not set
729# CONFIG_INPUT_UINPUT is not set
730CONFIG_INPUT_POLLDEV=y
731 731
732# 732#
733# Hardware I/O ports 733# Hardware I/O ports
734# 734#
735CONFIG_SERIO=y 735# CONFIG_SERIO is not set
736# CONFIG_SERIO_I8042 is not set
737CONFIG_SERIO_SERPORT=y
738# CONFIG_SERIO_PCIPS2 is not set
739# CONFIG_SERIO_LIBPS2 is not set
740CONFIG_SERIO_RAW=y
741# CONFIG_GAMEPORT is not set 736# CONFIG_GAMEPORT is not set
742 737
743# 738#
@@ -754,7 +749,7 @@ CONFIG_VT_HW_CONSOLE_BINDING=y
754# 749#
755CONFIG_SERIAL_8250=y 750CONFIG_SERIAL_8250=y
756CONFIG_SERIAL_8250_CONSOLE=y 751CONFIG_SERIAL_8250_CONSOLE=y
757CONFIG_SERIAL_8250_PCI=y 752# CONFIG_SERIAL_8250_PCI is not set
758CONFIG_SERIAL_8250_NR_UARTS=4 753CONFIG_SERIAL_8250_NR_UARTS=4
759CONFIG_SERIAL_8250_RUNTIME_UARTS=4 754CONFIG_SERIAL_8250_RUNTIME_UARTS=4
760# CONFIG_SERIAL_8250_EXTENDED is not set 755# CONFIG_SERIAL_8250_EXTENDED is not set
@@ -773,16 +768,11 @@ CONFIG_LEGACY_PTY_COUNT=256
773# IPMI 768# IPMI
774# 769#
775# CONFIG_IPMI_HANDLER is not set 770# CONFIG_IPMI_HANDLER is not set
776
777#
778# Watchdog Cards
779#
780# CONFIG_WATCHDOG is not set 771# CONFIG_WATCHDOG is not set
781# CONFIG_HW_RANDOM is not set 772# CONFIG_HW_RANDOM is not set
782# CONFIG_RTC is not set 773# CONFIG_RTC is not set
783# CONFIG_GEN_RTC is not set 774# CONFIG_GEN_RTC is not set
784CONFIG_COBALT_LCD=y 775CONFIG_COBALT_LCD=y
785# CONFIG_DTLK is not set
786# CONFIG_R3964 is not set 776# CONFIG_R3964 is not set
787# CONFIG_APPLICOM is not set 777# CONFIG_APPLICOM is not set
788# CONFIG_DRM is not set 778# CONFIG_DRM is not set
@@ -792,10 +782,7 @@ CONFIG_COBALT_LCD=y
792# TPM devices 782# TPM devices
793# 783#
794# CONFIG_TCG_TPM is not set 784# CONFIG_TCG_TPM is not set
795 785CONFIG_DEVPORT=y
796#
797# I2C support
798#
799# CONFIG_I2C is not set 786# CONFIG_I2C is not set
800 787
801# 788#
@@ -808,12 +795,7 @@ CONFIG_COBALT_LCD=y
808# Dallas's 1-wire bus 795# Dallas's 1-wire bus
809# 796#
810# CONFIG_W1 is not set 797# CONFIG_W1 is not set
811
812#
813# Hardware Monitoring support
814#
815# CONFIG_HWMON is not set 798# CONFIG_HWMON is not set
816# CONFIG_HWMON_VID is not set
817 799
818# 800#
819# Multifunction device drivers 801# Multifunction device drivers
@@ -824,16 +806,19 @@ CONFIG_COBALT_LCD=y
824# Multimedia devices 806# Multimedia devices
825# 807#
826# CONFIG_VIDEO_DEV is not set 808# CONFIG_VIDEO_DEV is not set
809# CONFIG_DVB_CORE is not set
810# CONFIG_DAB is not set
827 811
828# 812#
829# Digital Video Broadcasting Devices 813# Graphics support
830# 814#
831# CONFIG_DVB is not set 815# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
832 816
833# 817#
834# Graphics support 818# Display device support
835# 819#
836# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 820# CONFIG_DISPLAY_SUPPORT is not set
821# CONFIG_VGASTATE is not set
837# CONFIG_FB is not set 822# CONFIG_FB is not set
838 823
839# 824#
@@ -868,10 +853,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
868# USB Gadget Support 853# USB Gadget Support
869# 854#
870# CONFIG_USB_GADGET is not set 855# CONFIG_USB_GADGET is not set
871
872#
873# MMC/SD Card support
874#
875# CONFIG_MMC is not set 856# CONFIG_MMC is not set
876 857
877# 858#
@@ -912,18 +893,30 @@ CONFIG_RTC_INTF_SYSFS=y
912CONFIG_RTC_INTF_PROC=y 893CONFIG_RTC_INTF_PROC=y
913CONFIG_RTC_INTF_DEV=y 894CONFIG_RTC_INTF_DEV=y
914# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 895# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
896# CONFIG_RTC_DRV_TEST is not set
915 897
916# 898#
917# RTC drivers 899# I2C RTC drivers
900#
901
902#
903# SPI RTC drivers
904#
905
906#
907# Platform RTC drivers
918# 908#
919CONFIG_RTC_DRV_CMOS=y 909CONFIG_RTC_DRV_CMOS=y
920# CONFIG_RTC_DRV_DS1553 is not set 910# CONFIG_RTC_DRV_DS1553 is not set
921# CONFIG_RTC_DRV_DS1742 is not set 911# CONFIG_RTC_DRV_DS1742 is not set
922# CONFIG_RTC_DRV_M48T86 is not set 912# CONFIG_RTC_DRV_M48T86 is not set
923# CONFIG_RTC_DRV_TEST is not set
924# CONFIG_RTC_DRV_V3020 is not set 913# CONFIG_RTC_DRV_V3020 is not set
925 914
926# 915#
916# on-CPU RTC drivers
917#
918
919#
927# DMA Engine support 920# DMA Engine support
928# 921#
929# CONFIG_DMA_ENGINE is not set 922# CONFIG_DMA_ENGINE is not set
@@ -937,14 +930,6 @@ CONFIG_RTC_DRV_CMOS=y
937# 930#
938 931
939# 932#
940# Auxiliary Display support
941#
942
943#
944# Virtualization
945#
946
947#
948# File systems 933# File systems
949# 934#
950CONFIG_EXT2_FS=y 935CONFIG_EXT2_FS=y
@@ -952,8 +937,13 @@ CONFIG_EXT2_FS_XATTR=y
952CONFIG_EXT2_FS_POSIX_ACL=y 937CONFIG_EXT2_FS_POSIX_ACL=y
953CONFIG_EXT2_FS_SECURITY=y 938CONFIG_EXT2_FS_SECURITY=y
954# CONFIG_EXT2_FS_XIP is not set 939# CONFIG_EXT2_FS_XIP is not set
955# CONFIG_EXT3_FS is not set 940CONFIG_EXT3_FS=y
941CONFIG_EXT3_FS_XATTR=y
942CONFIG_EXT3_FS_POSIX_ACL=y
943CONFIG_EXT3_FS_SECURITY=y
956# CONFIG_EXT4DEV_FS is not set 944# CONFIG_EXT4DEV_FS is not set
945CONFIG_JBD=y
946# CONFIG_JBD_DEBUG is not set
957CONFIG_FS_MBCACHE=y 947CONFIG_FS_MBCACHE=y
958# CONFIG_REISERFS_FS is not set 948# CONFIG_REISERFS_FS is not set
959# CONFIG_JFS_FS is not set 949# CONFIG_JFS_FS is not set
@@ -969,7 +959,7 @@ CONFIG_INOTIFY_USER=y
969CONFIG_DNOTIFY=y 959CONFIG_DNOTIFY=y
970# CONFIG_AUTOFS_FS is not set 960# CONFIG_AUTOFS_FS is not set
971# CONFIG_AUTOFS4_FS is not set 961# CONFIG_AUTOFS4_FS is not set
972CONFIG_FUSE_FS=y 962# CONFIG_FUSE_FS is not set
973CONFIG_GENERIC_ACL=y 963CONFIG_GENERIC_ACL=y
974 964
975# 965#
@@ -1003,7 +993,6 @@ CONFIG_CONFIGFS_FS=y
1003# 993#
1004# CONFIG_ADFS_FS is not set 994# CONFIG_ADFS_FS is not set
1005# CONFIG_AFFS_FS is not set 995# CONFIG_AFFS_FS is not set
1006# CONFIG_ECRYPT_FS is not set
1007# CONFIG_HFS_FS is not set 996# CONFIG_HFS_FS is not set
1008# CONFIG_HFSPLUS_FS is not set 997# CONFIG_HFSPLUS_FS is not set
1009# CONFIG_BEFS_FS is not set 998# CONFIG_BEFS_FS is not set
@@ -1021,13 +1010,23 @@ CONFIG_CONFIGFS_FS=y
1021# Network File Systems 1010# Network File Systems
1022# 1011#
1023CONFIG_NFS_FS=y 1012CONFIG_NFS_FS=y
1024# CONFIG_NFS_V3 is not set 1013CONFIG_NFS_V3=y
1014CONFIG_NFS_V3_ACL=y
1025# CONFIG_NFS_V4 is not set 1015# CONFIG_NFS_V4 is not set
1026# CONFIG_NFS_DIRECTIO is not set 1016# CONFIG_NFS_DIRECTIO is not set
1027# CONFIG_NFSD is not set 1017CONFIG_NFSD=y
1018CONFIG_NFSD_V2_ACL=y
1019CONFIG_NFSD_V3=y
1020CONFIG_NFSD_V3_ACL=y
1021# CONFIG_NFSD_V4 is not set
1022CONFIG_NFSD_TCP=y
1028CONFIG_LOCKD=y 1023CONFIG_LOCKD=y
1024CONFIG_LOCKD_V4=y
1025CONFIG_EXPORTFS=y
1026CONFIG_NFS_ACL_SUPPORT=y
1029CONFIG_NFS_COMMON=y 1027CONFIG_NFS_COMMON=y
1030CONFIG_SUNRPC=y 1028CONFIG_SUNRPC=y
1029# CONFIG_SUNRPC_BIND34 is not set
1031# CONFIG_RPCSEC_GSS_KRB5 is not set 1030# CONFIG_RPCSEC_GSS_KRB5 is not set
1032# CONFIG_RPCSEC_GSS_SPKM3 is not set 1031# CONFIG_RPCSEC_GSS_SPKM3 is not set
1033# CONFIG_SMB_FS is not set 1032# CONFIG_SMB_FS is not set
@@ -1051,10 +1050,7 @@ CONFIG_MSDOS_PARTITION=y
1051# 1050#
1052# Distributed Lock Manager 1051# Distributed Lock Manager
1053# 1052#
1054CONFIG_DLM=y 1053# CONFIG_DLM is not set
1055CONFIG_DLM_TCP=y
1056# CONFIG_DLM_SCTP is not set
1057# CONFIG_DLM_DEBUG is not set
1058 1054
1059# 1055#
1060# Profiling support 1056# Profiling support
@@ -1072,72 +1068,30 @@ CONFIG_ENABLE_MUST_CHECK=y
1072# CONFIG_DEBUG_FS is not set 1068# CONFIG_DEBUG_FS is not set
1073# CONFIG_HEADERS_CHECK is not set 1069# CONFIG_HEADERS_CHECK is not set
1074# CONFIG_DEBUG_KERNEL is not set 1070# CONFIG_DEBUG_KERNEL is not set
1075CONFIG_LOG_BUF_SHIFT=14
1076CONFIG_CROSSCOMPILE=y 1071CONFIG_CROSSCOMPILE=y
1077CONFIG_CMDLINE="" 1072CONFIG_CMDLINE=""
1078 1073
1079# 1074#
1080# Security options 1075# Security options
1081# 1076#
1082CONFIG_KEYS=y 1077# CONFIG_KEYS is not set
1083CONFIG_KEYS_DEBUG_PROC_KEYS=y
1084# CONFIG_SECURITY is not set 1078# CONFIG_SECURITY is not set
1085 1079
1086# 1080#
1087# Cryptographic options 1081# Cryptographic options
1088# 1082#
1089CONFIG_CRYPTO=y 1083# CONFIG_CRYPTO is not set
1090CONFIG_CRYPTO_ALGAPI=y
1091CONFIG_CRYPTO_BLKCIPHER=y
1092CONFIG_CRYPTO_HASH=y
1093CONFIG_CRYPTO_MANAGER=y
1094CONFIG_CRYPTO_HMAC=y
1095CONFIG_CRYPTO_XCBC=y
1096CONFIG_CRYPTO_NULL=y
1097CONFIG_CRYPTO_MD4=y
1098CONFIG_CRYPTO_MD5=y
1099CONFIG_CRYPTO_SHA1=y
1100CONFIG_CRYPTO_SHA256=y
1101CONFIG_CRYPTO_SHA512=y
1102CONFIG_CRYPTO_WP512=y
1103CONFIG_CRYPTO_TGR192=y
1104CONFIG_CRYPTO_GF128MUL=y
1105CONFIG_CRYPTO_ECB=y
1106CONFIG_CRYPTO_CBC=y
1107CONFIG_CRYPTO_PCBC=y
1108CONFIG_CRYPTO_LRW=y
1109CONFIG_CRYPTO_DES=y
1110CONFIG_CRYPTO_FCRYPT=y
1111CONFIG_CRYPTO_BLOWFISH=y
1112CONFIG_CRYPTO_TWOFISH=y
1113CONFIG_CRYPTO_TWOFISH_COMMON=y
1114CONFIG_CRYPTO_SERPENT=y
1115CONFIG_CRYPTO_AES=y
1116CONFIG_CRYPTO_CAST5=y
1117CONFIG_CRYPTO_CAST6=y
1118CONFIG_CRYPTO_TEA=y
1119CONFIG_CRYPTO_ARC4=y
1120CONFIG_CRYPTO_KHAZAD=y
1121CONFIG_CRYPTO_ANUBIS=y
1122CONFIG_CRYPTO_DEFLATE=y
1123CONFIG_CRYPTO_MICHAEL_MIC=y
1124CONFIG_CRYPTO_CRC32C=y
1125CONFIG_CRYPTO_CAMELLIA=y
1126
1127#
1128# Hardware crypto devices
1129#
1130 1084
1131# 1085#
1132# Library routines 1086# Library routines
1133# 1087#
1134CONFIG_BITREVERSE=y 1088CONFIG_BITREVERSE=y
1135# CONFIG_CRC_CCITT is not set 1089# CONFIG_CRC_CCITT is not set
1136CONFIG_CRC16=y 1090# CONFIG_CRC16 is not set
1091# CONFIG_CRC_ITU_T is not set
1137CONFIG_CRC32=y 1092CONFIG_CRC32=y
1138CONFIG_LIBCRC32C=y 1093CONFIG_LIBCRC32C=y
1139CONFIG_ZLIB_INFLATE=y
1140CONFIG_ZLIB_DEFLATE=y
1141CONFIG_PLIST=y 1094CONFIG_PLIST=y
1142CONFIG_HAS_IOMEM=y 1095CONFIG_HAS_IOMEM=y
1143CONFIG_HAS_IOPORT=y 1096CONFIG_HAS_IOPORT=y
1097CONFIG_HAS_DMA=y
diff --git a/arch/mips/configs/db1000_defconfig b/arch/mips/configs/db1000_defconfig
index 10f6af4375..ec60beb888 100644
--- a/arch/mips/configs/db1000_defconfig
+++ b/arch/mips/configs/db1000_defconfig
@@ -26,9 +26,7 @@ CONFIG_MIPS_DB1000=y
26# CONFIG_BASLER_EXCITE is not set 26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_MIPS_DB1000=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/db1100_defconfig b/arch/mips/configs/db1100_defconfig
index 4b08629277..f3c25f08bf 100644
--- a/arch/mips/configs/db1100_defconfig
+++ b/arch/mips/configs/db1100_defconfig
@@ -26,9 +26,7 @@ CONFIG_MIPS_DB1100=y
26# CONFIG_BASLER_EXCITE is not set 26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_MIPS_DB1100=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/db1200_defconfig b/arch/mips/configs/db1200_defconfig
index 820659e810..6d400befba 100644
--- a/arch/mips/configs/db1200_defconfig
+++ b/arch/mips/configs/db1200_defconfig
@@ -26,9 +26,7 @@ CONFIG_MIPS_DB1200=y
26# CONFIG_BASLER_EXCITE is not set 26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_MIPS_DB1200=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/db1500_defconfig b/arch/mips/configs/db1500_defconfig
index 4050b9b91b..82aea6e088 100644
--- a/arch/mips/configs/db1500_defconfig
+++ b/arch/mips/configs/db1500_defconfig
@@ -26,9 +26,7 @@ CONFIG_MIPS_DB1500=y
26# CONFIG_BASLER_EXCITE is not set 26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_MIPS_DB1500=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/db1550_defconfig b/arch/mips/configs/db1550_defconfig
index 7b3519058a..82697714a9 100644
--- a/arch/mips/configs/db1550_defconfig
+++ b/arch/mips/configs/db1550_defconfig
@@ -26,9 +26,7 @@ CONFIG_MIPS_DB1550=y
26# CONFIG_BASLER_EXCITE is not set 26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_MIPS_DB1550=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/ddb5477_defconfig b/arch/mips/configs/ddb5477_defconfig
index 5b502a2013..a42ab9ae7d 100644
--- a/arch/mips/configs/ddb5477_defconfig
+++ b/arch/mips/configs/ddb5477_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/decstation_defconfig b/arch/mips/configs/decstation_defconfig
index 4bbdab078f..d6e3fffbc8 100644
--- a/arch/mips/configs/decstation_defconfig
+++ b/arch/mips/configs/decstation_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27CONFIG_MACH_DECSTATION=y 27CONFIG_MACH_DECSTATION=y
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_MACH_DECSTATION=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/e55_defconfig b/arch/mips/configs/e55_defconfig
index b5714a6a53..78f5004fb7 100644
--- a/arch/mips/configs/e55_defconfig
+++ b/arch/mips/configs/e55_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/emma2rh_defconfig b/arch/mips/configs/emma2rh_defconfig
index 3044579f17..b29bff0f56 100644
--- a/arch/mips/configs/emma2rh_defconfig
+++ b/arch/mips/configs/emma2rh_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
@@ -951,8 +947,7 @@ CONFIG_LEGACY_PTY_COUNT=256
951# CONFIG_WATCHDOG is not set 947# CONFIG_WATCHDOG is not set
952# CONFIG_HW_RANDOM is not set 948# CONFIG_HW_RANDOM is not set
953CONFIG_RTC=m 949CONFIG_RTC=m
954CONFIG_GEN_RTC=m 950# CONFIG_GEN_RTC is not set
955CONFIG_GEN_RTC_X=y
956# CONFIG_DTLK is not set 951# CONFIG_DTLK is not set
957# CONFIG_R3964 is not set 952# CONFIG_R3964 is not set
958# CONFIG_APPLICOM is not set 953# CONFIG_APPLICOM is not set
diff --git a/arch/mips/configs/ev64120_defconfig b/arch/mips/configs/ev64120_defconfig
deleted file mode 100644
index c10e4e0632..0000000000
--- a/arch/mips/configs/ev64120_defconfig
+++ /dev/null
@@ -1,985 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Tue Feb 20 21:47:30 2007
5#
6CONFIG_MIPS=y
7
8#
9# Machine selection
10#
11CONFIG_ZONE_DMA=y
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set
28CONFIG_MIPS_EV64120=y
29# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set
34# CONFIG_WR_PPMC is not set
35# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set
43# CONFIG_PNX8550_STB810 is not set
44# CONFIG_DDB5477 is not set
45# CONFIG_MACH_VR41XX is not set
46# CONFIG_PMC_YOSEMITE is not set
47# CONFIG_QEMU is not set
48# CONFIG_MARKEINS is not set
49# CONFIG_SGI_IP22 is not set
50# CONFIG_SGI_IP27 is not set
51# CONFIG_SGI_IP32 is not set
52# CONFIG_SIBYTE_BIGSUR is not set
53# CONFIG_SIBYTE_SWARM is not set
54# CONFIG_SIBYTE_SENTOSA is not set
55# CONFIG_SIBYTE_RHONE is not set
56# CONFIG_SIBYTE_CARMEL is not set
57# CONFIG_SIBYTE_PTSWARM is not set
58# CONFIG_SIBYTE_LITTLESUR is not set
59# CONFIG_SIBYTE_CRHINE is not set
60# CONFIG_SIBYTE_CRHONE is not set
61# CONFIG_SNI_RM is not set
62# CONFIG_TOSHIBA_JMR3927 is not set
63# CONFIG_TOSHIBA_RBTX4927 is not set
64# CONFIG_TOSHIBA_RBTX4938 is not set
65# CONFIG_EVB_PCI1 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
69CONFIG_GENERIC_FIND_NEXT_BIT=y
70CONFIG_GENERIC_HWEIGHT=y
71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
75CONFIG_DMA_NONCOHERENT=y
76CONFIG_DMA_NEED_PCI_MAP_STATE=y
77CONFIG_CPU_BIG_ENDIAN=y
78# CONFIG_CPU_LITTLE_ENDIAN is not set
79CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
80CONFIG_MIPS_GT64120=y
81# CONFIG_SYSCLK_75 is not set
82# CONFIG_SYSCLK_83 is not set
83CONFIG_SYSCLK_100=y
84CONFIG_MIPS_L1_CACHE_SHIFT=5
85
86#
87# CPU selection
88#
89# CONFIG_CPU_MIPS32_R1 is not set
90# CONFIG_CPU_MIPS32_R2 is not set
91# CONFIG_CPU_MIPS64_R1 is not set
92# CONFIG_CPU_MIPS64_R2 is not set
93# CONFIG_CPU_R3000 is not set
94# CONFIG_CPU_TX39XX is not set
95# CONFIG_CPU_VR41XX is not set
96# CONFIG_CPU_R4300 is not set
97# CONFIG_CPU_R4X00 is not set
98# CONFIG_CPU_TX49XX is not set
99CONFIG_CPU_R5000=y
100# CONFIG_CPU_R5432 is not set
101# CONFIG_CPU_R6000 is not set
102# CONFIG_CPU_NEVADA is not set
103# CONFIG_CPU_R8000 is not set
104# CONFIG_CPU_R10000 is not set
105# CONFIG_CPU_RM7000 is not set
106# CONFIG_CPU_RM9000 is not set
107# CONFIG_CPU_SB1 is not set
108CONFIG_SYS_HAS_CPU_R5000=y
109CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
110CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
111CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
112CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
113
114#
115# Kernel type
116#
117CONFIG_32BIT=y
118# CONFIG_64BIT is not set
119CONFIG_PAGE_SIZE_4KB=y
120# CONFIG_PAGE_SIZE_8KB is not set
121# CONFIG_PAGE_SIZE_16KB is not set
122# CONFIG_PAGE_SIZE_64KB is not set
123CONFIG_MIPS_MT_DISABLED=y
124# CONFIG_MIPS_MT_SMP is not set
125# CONFIG_MIPS_MT_SMTC is not set
126# CONFIG_MIPS_VPE_LOADER is not set
127# CONFIG_64BIT_PHYS_ADDR is not set
128CONFIG_CPU_HAS_LLSC=y
129CONFIG_CPU_HAS_SYNC=y
130CONFIG_GENERIC_HARDIRQS=y
131CONFIG_GENERIC_IRQ_PROBE=y
132CONFIG_ARCH_FLATMEM_ENABLE=y
133CONFIG_SELECT_MEMORY_MODEL=y
134CONFIG_FLATMEM_MANUAL=y
135# CONFIG_DISCONTIGMEM_MANUAL is not set
136# CONFIG_SPARSEMEM_MANUAL is not set
137CONFIG_FLATMEM=y
138CONFIG_FLAT_NODE_MEM_MAP=y
139# CONFIG_SPARSEMEM_STATIC is not set
140CONFIG_SPLIT_PTLOCK_CPUS=4
141# CONFIG_RESOURCES_64BIT is not set
142CONFIG_ZONE_DMA_FLAG=1
143# CONFIG_HZ_48 is not set
144# CONFIG_HZ_100 is not set
145# CONFIG_HZ_128 is not set
146# CONFIG_HZ_250 is not set
147# CONFIG_HZ_256 is not set
148CONFIG_HZ_1000=y
149# CONFIG_HZ_1024 is not set
150CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
151CONFIG_HZ=1000
152CONFIG_PREEMPT_NONE=y
153# CONFIG_PREEMPT_VOLUNTARY is not set
154# CONFIG_PREEMPT is not set
155# CONFIG_KEXEC is not set
156CONFIG_LOCKDEP_SUPPORT=y
157CONFIG_STACKTRACE_SUPPORT=y
158CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
159
160#
161# Code maturity level options
162#
163CONFIG_EXPERIMENTAL=y
164CONFIG_BROKEN_ON_SMP=y
165CONFIG_INIT_ENV_ARG_LIMIT=32
166
167#
168# General setup
169#
170CONFIG_LOCALVERSION=""
171CONFIG_LOCALVERSION_AUTO=y
172CONFIG_SWAP=y
173CONFIG_SYSVIPC=y
174# CONFIG_IPC_NS is not set
175CONFIG_SYSVIPC_SYSCTL=y
176# CONFIG_POSIX_MQUEUE is not set
177# CONFIG_BSD_PROCESS_ACCT is not set
178# CONFIG_TASKSTATS is not set
179# CONFIG_UTS_NS is not set
180# CONFIG_AUDIT is not set
181# CONFIG_IKCONFIG is not set
182CONFIG_SYSFS_DEPRECATED=y
183CONFIG_RELAY=y
184# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
185CONFIG_SYSCTL=y
186CONFIG_EMBEDDED=y
187CONFIG_SYSCTL_SYSCALL=y
188CONFIG_KALLSYMS=y
189# CONFIG_KALLSYMS_EXTRA_PASS is not set
190CONFIG_HOTPLUG=y
191CONFIG_PRINTK=y
192CONFIG_BUG=y
193CONFIG_ELF_CORE=y
194CONFIG_BASE_FULL=y
195CONFIG_FUTEX=y
196CONFIG_EPOLL=y
197CONFIG_SHMEM=y
198CONFIG_SLAB=y
199CONFIG_VM_EVENT_COUNTERS=y
200CONFIG_RT_MUTEXES=y
201# CONFIG_TINY_SHMEM is not set
202CONFIG_BASE_SMALL=0
203# CONFIG_SLOB is not set
204
205#
206# Loadable module support
207#
208CONFIG_MODULES=y
209CONFIG_MODULE_UNLOAD=y
210# CONFIG_MODULE_FORCE_UNLOAD is not set
211CONFIG_MODVERSIONS=y
212CONFIG_MODULE_SRCVERSION_ALL=y
213# CONFIG_KMOD is not set
214
215#
216# Block layer
217#
218CONFIG_BLOCK=y
219# CONFIG_LBD is not set
220# CONFIG_BLK_DEV_IO_TRACE is not set
221# CONFIG_LSF is not set
222
223#
224# IO Schedulers
225#
226CONFIG_IOSCHED_NOOP=y
227CONFIG_IOSCHED_AS=y
228CONFIG_IOSCHED_DEADLINE=y
229CONFIG_IOSCHED_CFQ=y
230CONFIG_DEFAULT_AS=y
231# CONFIG_DEFAULT_DEADLINE is not set
232# CONFIG_DEFAULT_CFQ is not set
233# CONFIG_DEFAULT_NOOP is not set
234CONFIG_DEFAULT_IOSCHED="anticipatory"
235
236#
237# Bus options (PCI, PCMCIA, EISA, ISA, TC)
238#
239CONFIG_HW_HAS_PCI=y
240CONFIG_PCI=y
241CONFIG_MMU=y
242
243#
244# PCCARD (PCMCIA/CardBus) support
245#
246# CONFIG_PCCARD is not set
247
248#
249# PCI Hotplug Support
250#
251# CONFIG_HOTPLUG_PCI is not set
252
253#
254# Executable file formats
255#
256CONFIG_BINFMT_ELF=y
257# CONFIG_BINFMT_MISC is not set
258CONFIG_TRAD_SIGNALS=y
259
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#
269# Networking
270#
271CONFIG_NET=y
272
273#
274# Networking options
275#
276# CONFIG_NETDEBUG is not set
277# CONFIG_PACKET is not set
278CONFIG_UNIX=y
279CONFIG_XFRM=y
280CONFIG_XFRM_USER=m
281# CONFIG_XFRM_SUB_POLICY is not set
282CONFIG_XFRM_MIGRATE=y
283CONFIG_NET_KEY=y
284CONFIG_NET_KEY_MIGRATE=y
285CONFIG_INET=y
286# CONFIG_IP_MULTICAST is not set
287# CONFIG_IP_ADVANCED_ROUTER is not set
288CONFIG_IP_FIB_HASH=y
289CONFIG_IP_PNP=y
290# CONFIG_IP_PNP_DHCP is not set
291# CONFIG_IP_PNP_BOOTP is not set
292# CONFIG_IP_PNP_RARP is not set
293# CONFIG_NET_IPIP is not set
294# CONFIG_NET_IPGRE is not set
295# CONFIG_ARPD is not set
296# CONFIG_SYN_COOKIES is not set
297# CONFIG_INET_AH is not set
298# CONFIG_INET_ESP is not set
299# CONFIG_INET_IPCOMP is not set
300# CONFIG_INET_XFRM_TUNNEL is not set
301# CONFIG_INET_TUNNEL is not set
302CONFIG_INET_XFRM_MODE_TRANSPORT=m
303CONFIG_INET_XFRM_MODE_TUNNEL=m
304CONFIG_INET_XFRM_MODE_BEET=m
305CONFIG_INET_DIAG=y
306CONFIG_INET_TCP_DIAG=y
307# CONFIG_TCP_CONG_ADVANCED is not set
308CONFIG_TCP_CONG_CUBIC=y
309CONFIG_DEFAULT_TCP_CONG="cubic"
310CONFIG_TCP_MD5SIG=y
311# CONFIG_IPV6 is not set
312# CONFIG_INET6_XFRM_TUNNEL is not set
313# CONFIG_INET6_TUNNEL is not set
314CONFIG_NETWORK_SECMARK=y
315# CONFIG_NETFILTER 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
355CONFIG_IEEE80211=m
356# CONFIG_IEEE80211_DEBUG is not set
357CONFIG_IEEE80211_CRYPT_WEP=m
358CONFIG_IEEE80211_CRYPT_CCMP=m
359CONFIG_IEEE80211_SOFTMAC=m
360# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
361CONFIG_WIRELESS_EXT=y
362
363#
364# Device Drivers
365#
366
367#
368# Generic Driver Options
369#
370CONFIG_STANDALONE=y
371CONFIG_PREVENT_FIRMWARE_BUILD=y
372CONFIG_FW_LOADER=m
373# CONFIG_SYS_HYPERVISOR is not set
374
375#
376# Connector - unified userspace <-> kernelspace linker
377#
378CONFIG_CONNECTOR=m
379
380#
381# Memory Technology Devices (MTD)
382#
383# CONFIG_MTD is not set
384
385#
386# Parallel port support
387#
388# CONFIG_PARPORT is not set
389
390#
391# Plug and Play support
392#
393# CONFIG_PNPACPI is not set
394
395#
396# Block devices
397#
398# CONFIG_BLK_CPQ_DA is not set
399# CONFIG_BLK_CPQ_CISS_DA is not set
400# CONFIG_BLK_DEV_DAC960 is not set
401# CONFIG_BLK_DEV_UMEM is not set
402# CONFIG_BLK_DEV_COW_COMMON is not set
403# CONFIG_BLK_DEV_LOOP is not set
404# CONFIG_BLK_DEV_NBD is not set
405# CONFIG_BLK_DEV_SX8 is not set
406# CONFIG_BLK_DEV_RAM is not set
407# CONFIG_BLK_DEV_INITRD is not set
408CONFIG_CDROM_PKTCDVD=m
409CONFIG_CDROM_PKTCDVD_BUFFERS=8
410# CONFIG_CDROM_PKTCDVD_WCACHE is not set
411CONFIG_ATA_OVER_ETH=m
412
413#
414# Misc devices
415#
416CONFIG_SGI_IOC4=m
417# CONFIG_TIFM_CORE is not set
418
419#
420# ATA/ATAPI/MFM/RLL support
421#
422# CONFIG_IDE is not set
423
424#
425# SCSI device support
426#
427CONFIG_RAID_ATTRS=m
428# CONFIG_SCSI is not set
429# CONFIG_SCSI_NETLINK is not set
430
431#
432# Serial ATA (prod) and Parallel ATA (experimental) drivers
433#
434# CONFIG_ATA is not set
435
436#
437# Multi-device support (RAID and LVM)
438#
439# CONFIG_MD is not set
440
441#
442# Fusion MPT device support
443#
444# CONFIG_FUSION is not set
445
446#
447# IEEE 1394 (FireWire) support
448#
449# CONFIG_IEEE1394 is not set
450
451#
452# I2O device support
453#
454# CONFIG_I2O is not set
455
456#
457# Network device support
458#
459CONFIG_NETDEVICES=y
460# CONFIG_DUMMY is not set
461# CONFIG_BONDING is not set
462# CONFIG_EQUALIZER is not set
463# CONFIG_TUN is not set
464
465#
466# ARCnet devices
467#
468# CONFIG_ARCNET is not set
469
470#
471# PHY device support
472#
473CONFIG_PHYLIB=m
474
475#
476# MII PHY device drivers
477#
478CONFIG_MARVELL_PHY=m
479CONFIG_DAVICOM_PHY=m
480CONFIG_QSEMI_PHY=m
481CONFIG_LXT_PHY=m
482CONFIG_CICADA_PHY=m
483CONFIG_VITESSE_PHY=m
484CONFIG_SMSC_PHY=m
485# CONFIG_BROADCOM_PHY is not set
486# CONFIG_FIXED_PHY is not set
487
488#
489# Ethernet (10 or 100Mbit)
490#
491CONFIG_NET_ETHERNET=y
492# CONFIG_MII is not set
493# CONFIG_HAPPYMEAL is not set
494# CONFIG_SUNGEM is not set
495# CONFIG_CASSINI is not set
496# CONFIG_NET_VENDOR_3COM is not set
497# CONFIG_DM9000 is not set
498
499#
500# Tulip family network device support
501#
502# CONFIG_NET_TULIP is not set
503# CONFIG_HP100 is not set
504# CONFIG_NET_PCI is not set
505
506#
507# Ethernet (1000 Mbit)
508#
509# CONFIG_ACENIC is not set
510# CONFIG_DL2K is not set
511# CONFIG_E1000 is not set
512# CONFIG_NS83820 is not set
513# CONFIG_HAMACHI is not set
514# CONFIG_YELLOWFIN is not set
515# CONFIG_R8169 is not set
516# CONFIG_SIS190 is not set
517# CONFIG_SKGE is not set
518# CONFIG_SKY2 is not set
519# CONFIG_SK98LIN is not set
520# CONFIG_TIGON3 is not set
521# CONFIG_BNX2 is not set
522CONFIG_QLA3XXX=m
523# CONFIG_ATL1 is not set
524
525#
526# Ethernet (10000 Mbit)
527#
528# CONFIG_CHELSIO_T1 is not set
529CONFIG_CHELSIO_T3=m
530# CONFIG_IXGB is not set
531# CONFIG_S2IO is not set
532# CONFIG_MYRI10GE is not set
533CONFIG_NETXEN_NIC=m
534
535#
536# Token Ring devices
537#
538# CONFIG_TR is not set
539
540#
541# Wireless LAN (non-hamradio)
542#
543# CONFIG_NET_RADIO is not set
544
545#
546# Wan interfaces
547#
548# CONFIG_WAN is not set
549# CONFIG_FDDI is not set
550# CONFIG_HIPPI is not set
551CONFIG_PPP=y
552# CONFIG_PPP_MULTILINK is not set
553# CONFIG_PPP_FILTER is not set
554CONFIG_PPP_ASYNC=y
555# CONFIG_PPP_SYNC_TTY is not set
556# CONFIG_PPP_DEFLATE is not set
557# CONFIG_PPP_BSDCOMP is not set
558CONFIG_PPP_MPPE=m
559# CONFIG_PPPOE is not set
560# CONFIG_SLIP is not set
561CONFIG_SLHC=y
562# CONFIG_SHAPER is not set
563# CONFIG_NETCONSOLE is not set
564# CONFIG_NETPOLL is not set
565# CONFIG_NET_POLL_CONTROLLER is not set
566
567#
568# ISDN subsystem
569#
570# CONFIG_ISDN is not set
571
572#
573# Telephony Support
574#
575# CONFIG_PHONE is not set
576
577#
578# Input device support
579#
580CONFIG_INPUT=y
581# CONFIG_INPUT_FF_MEMLESS is not set
582
583#
584# Userland interfaces
585#
586CONFIG_INPUT_MOUSEDEV=y
587CONFIG_INPUT_MOUSEDEV_PSAUX=y
588CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
589CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
590# CONFIG_INPUT_JOYDEV is not set
591# CONFIG_INPUT_TSDEV is not set
592# CONFIG_INPUT_EVDEV is not set
593# CONFIG_INPUT_EVBUG is not set
594
595#
596# Input Device Drivers
597#
598# CONFIG_INPUT_KEYBOARD is not set
599# CONFIG_INPUT_MOUSE is not set
600# CONFIG_INPUT_JOYSTICK is not set
601# CONFIG_INPUT_TOUCHSCREEN is not set
602# CONFIG_INPUT_MISC is not set
603
604#
605# Hardware I/O ports
606#
607CONFIG_SERIO=y
608# CONFIG_SERIO_I8042 is not set
609CONFIG_SERIO_SERPORT=y
610# CONFIG_SERIO_PCIPS2 is not set
611# CONFIG_SERIO_LIBPS2 is not set
612CONFIG_SERIO_RAW=m
613# CONFIG_GAMEPORT is not set
614
615#
616# Character devices
617#
618CONFIG_VT=y
619CONFIG_VT_CONSOLE=y
620CONFIG_HW_CONSOLE=y
621CONFIG_VT_HW_CONSOLE_BINDING=y
622# CONFIG_SERIAL_NONSTANDARD is not set
623
624#
625# Serial drivers
626#
627CONFIG_SERIAL_8250=y
628CONFIG_SERIAL_8250_CONSOLE=y
629CONFIG_SERIAL_8250_PCI=y
630CONFIG_SERIAL_8250_NR_UARTS=4
631CONFIG_SERIAL_8250_RUNTIME_UARTS=4
632# CONFIG_SERIAL_8250_EXTENDED is not set
633
634#
635# Non-8250 serial port support
636#
637CONFIG_SERIAL_CORE=y
638CONFIG_SERIAL_CORE_CONSOLE=y
639# CONFIG_SERIAL_JSM is not set
640CONFIG_UNIX98_PTYS=y
641CONFIG_LEGACY_PTYS=y
642CONFIG_LEGACY_PTY_COUNT=256
643
644#
645# IPMI
646#
647# CONFIG_IPMI_HANDLER is not set
648
649#
650# Watchdog Cards
651#
652# CONFIG_WATCHDOG is not set
653# CONFIG_HW_RANDOM is not set
654# CONFIG_RTC is not set
655# CONFIG_GEN_RTC is not set
656# CONFIG_DTLK is not set
657# CONFIG_R3964 is not set
658# CONFIG_APPLICOM is not set
659# CONFIG_DRM is not set
660# CONFIG_RAW_DRIVER is not set
661
662#
663# TPM devices
664#
665# CONFIG_TCG_TPM is not set
666
667#
668# I2C support
669#
670# CONFIG_I2C is not set
671
672#
673# SPI support
674#
675# CONFIG_SPI is not set
676# CONFIG_SPI_MASTER is not set
677
678#
679# Dallas's 1-wire bus
680#
681# CONFIG_W1 is not set
682
683#
684# Hardware Monitoring support
685#
686# CONFIG_HWMON is not set
687# CONFIG_HWMON_VID is not set
688
689#
690# Multimedia devices
691#
692# CONFIG_VIDEO_DEV is not set
693
694#
695# Digital Video Broadcasting Devices
696#
697# CONFIG_DVB is not set
698
699#
700# Graphics support
701#
702# CONFIG_FIRMWARE_EDID is not set
703# CONFIG_FB is not set
704
705#
706# Console display driver support
707#
708# CONFIG_VGA_CONSOLE is not set
709CONFIG_DUMMY_CONSOLE=y
710# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
711
712#
713# Sound
714#
715# CONFIG_SOUND is not set
716
717#
718# HID Devices
719#
720# CONFIG_HID is not set
721
722#
723# USB support
724#
725CONFIG_USB_ARCH_HAS_HCD=y
726CONFIG_USB_ARCH_HAS_OHCI=y
727CONFIG_USB_ARCH_HAS_EHCI=y
728# CONFIG_USB is not set
729
730#
731# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
732#
733
734#
735# USB Gadget Support
736#
737# CONFIG_USB_GADGET is not set
738
739#
740# MMC/SD Card support
741#
742# CONFIG_MMC is not set
743
744#
745# LED devices
746#
747# CONFIG_NEW_LEDS is not set
748
749#
750# LED drivers
751#
752
753#
754# LED Triggers
755#
756
757#
758# InfiniBand support
759#
760# CONFIG_INFINIBAND is not set
761
762#
763# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
764#
765
766#
767# Real Time Clock
768#
769# CONFIG_RTC_CLASS is not set
770
771#
772# DMA Engine support
773#
774# CONFIG_DMA_ENGINE is not set
775
776#
777# DMA Clients
778#
779
780#
781# DMA Devices
782#
783
784#
785# Auxiliary Display support
786#
787
788#
789# Virtualization
790#
791
792#
793# File systems
794#
795CONFIG_EXT2_FS=y
796# CONFIG_EXT2_FS_XATTR is not set
797# CONFIG_EXT2_FS_XIP is not set
798# CONFIG_EXT3_FS is not set
799# CONFIG_EXT4DEV_FS is not set
800# CONFIG_REISERFS_FS is not set
801# CONFIG_JFS_FS is not set
802# CONFIG_FS_POSIX_ACL is not set
803# CONFIG_XFS_FS is not set
804# CONFIG_GFS2_FS is not set
805# CONFIG_OCFS2_FS is not set
806# CONFIG_MINIX_FS is not set
807# CONFIG_ROMFS_FS is not set
808CONFIG_INOTIFY=y
809CONFIG_INOTIFY_USER=y
810# CONFIG_QUOTA is not set
811CONFIG_DNOTIFY=y
812# CONFIG_AUTOFS_FS is not set
813# CONFIG_AUTOFS4_FS is not set
814CONFIG_FUSE_FS=m
815
816#
817# CD-ROM/DVD Filesystems
818#
819# CONFIG_ISO9660_FS is not set
820# CONFIG_UDF_FS is not set
821
822#
823# DOS/FAT/NT Filesystems
824#
825# CONFIG_MSDOS_FS is not set
826# CONFIG_VFAT_FS is not set
827# CONFIG_NTFS_FS is not set
828
829#
830# Pseudo filesystems
831#
832CONFIG_PROC_FS=y
833CONFIG_PROC_KCORE=y
834CONFIG_PROC_SYSCTL=y
835CONFIG_SYSFS=y
836# CONFIG_TMPFS is not set
837# CONFIG_HUGETLB_PAGE is not set
838CONFIG_RAMFS=y
839CONFIG_CONFIGFS_FS=m
840
841#
842# Miscellaneous filesystems
843#
844# CONFIG_ADFS_FS is not set
845# CONFIG_AFFS_FS is not set
846# CONFIG_ECRYPT_FS is not set
847# CONFIG_HFS_FS is not set
848# CONFIG_HFSPLUS_FS is not set
849# CONFIG_BEFS_FS is not set
850# CONFIG_BFS_FS is not set
851# CONFIG_EFS_FS is not set
852# CONFIG_CRAMFS is not set
853# CONFIG_VXFS_FS is not set
854# CONFIG_HPFS_FS is not set
855# CONFIG_QNX4FS_FS is not set
856# CONFIG_SYSV_FS is not set
857# CONFIG_UFS_FS is not set
858
859#
860# Network File Systems
861#
862CONFIG_NFS_FS=y
863# CONFIG_NFS_V3 is not set
864# CONFIG_NFS_V4 is not set
865# CONFIG_NFS_DIRECTIO is not set
866# CONFIG_NFSD is not set
867CONFIG_ROOT_NFS=y
868CONFIG_LOCKD=y
869CONFIG_NFS_COMMON=y
870CONFIG_SUNRPC=y
871# CONFIG_RPCSEC_GSS_KRB5 is not set
872# CONFIG_RPCSEC_GSS_SPKM3 is not set
873# CONFIG_SMB_FS is not set
874# CONFIG_CIFS is not set
875# CONFIG_NCP_FS is not set
876# CONFIG_CODA_FS is not set
877# CONFIG_AFS_FS is not set
878# CONFIG_9P_FS is not set
879
880#
881# Partition Types
882#
883# CONFIG_PARTITION_ADVANCED is not set
884CONFIG_MSDOS_PARTITION=y
885
886#
887# Native Language Support
888#
889# CONFIG_NLS is not set
890
891#
892# Distributed Lock Manager
893#
894CONFIG_DLM=m
895CONFIG_DLM_TCP=y
896# CONFIG_DLM_SCTP is not set
897# CONFIG_DLM_DEBUG is not set
898
899#
900# Profiling support
901#
902# CONFIG_PROFILING is not set
903
904#
905# Kernel hacking
906#
907CONFIG_TRACE_IRQFLAGS_SUPPORT=y
908# CONFIG_PRINTK_TIME is not set
909CONFIG_ENABLE_MUST_CHECK=y
910# CONFIG_MAGIC_SYSRQ is not set
911# CONFIG_UNUSED_SYMBOLS is not set
912# CONFIG_DEBUG_FS is not set
913# CONFIG_HEADERS_CHECK is not set
914# CONFIG_DEBUG_KERNEL is not set
915CONFIG_LOG_BUF_SHIFT=14
916CONFIG_CROSSCOMPILE=y
917CONFIG_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_SYS_SUPPORTS_KGDB=y
919
920#
921# Security options
922#
923CONFIG_KEYS=y
924CONFIG_KEYS_DEBUG_PROC_KEYS=y
925# CONFIG_SECURITY is not set
926
927#
928# Cryptographic options
929#
930CONFIG_CRYPTO=y
931CONFIG_CRYPTO_ALGAPI=y
932CONFIG_CRYPTO_BLKCIPHER=m
933CONFIG_CRYPTO_HASH=y
934CONFIG_CRYPTO_MANAGER=y
935CONFIG_CRYPTO_HMAC=y
936CONFIG_CRYPTO_XCBC=m
937CONFIG_CRYPTO_NULL=m
938CONFIG_CRYPTO_MD4=m
939CONFIG_CRYPTO_MD5=y
940CONFIG_CRYPTO_SHA1=m
941CONFIG_CRYPTO_SHA256=m
942CONFIG_CRYPTO_SHA512=m
943CONFIG_CRYPTO_WP512=m
944CONFIG_CRYPTO_TGR192=m
945CONFIG_CRYPTO_GF128MUL=m
946CONFIG_CRYPTO_ECB=m
947CONFIG_CRYPTO_CBC=m
948CONFIG_CRYPTO_PCBC=m
949CONFIG_CRYPTO_LRW=m
950CONFIG_CRYPTO_DES=m
951CONFIG_CRYPTO_FCRYPT=m
952CONFIG_CRYPTO_BLOWFISH=m
953CONFIG_CRYPTO_TWOFISH=m
954CONFIG_CRYPTO_TWOFISH_COMMON=m
955CONFIG_CRYPTO_SERPENT=m
956CONFIG_CRYPTO_AES=m
957CONFIG_CRYPTO_CAST5=m
958CONFIG_CRYPTO_CAST6=m
959CONFIG_CRYPTO_TEA=m
960CONFIG_CRYPTO_ARC4=m
961CONFIG_CRYPTO_KHAZAD=m
962CONFIG_CRYPTO_ANUBIS=m
963CONFIG_CRYPTO_DEFLATE=m
964CONFIG_CRYPTO_MICHAEL_MIC=m
965CONFIG_CRYPTO_CRC32C=m
966CONFIG_CRYPTO_CAMELLIA=m
967# CONFIG_CRYPTO_TEST is not set
968
969#
970# Hardware crypto devices
971#
972
973#
974# Library routines
975#
976CONFIG_BITREVERSE=m
977CONFIG_CRC_CCITT=y
978CONFIG_CRC16=m
979CONFIG_CRC32=m
980CONFIG_LIBCRC32C=m
981CONFIG_ZLIB_INFLATE=m
982CONFIG_ZLIB_DEFLATE=m
983CONFIG_PLIST=y
984CONFIG_HAS_IOMEM=y
985CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/excite_defconfig b/arch/mips/configs/excite_defconfig
index 460d7a26a8..69810592aa 100644
--- a/arch/mips/configs/excite_defconfig
+++ b/arch/mips/configs/excite_defconfig
@@ -26,9 +26,7 @@ CONFIG_BASLER_EXCITE=y
26# CONFIG_BASLER_EXCITE_PROTOTYPE is not set 26# CONFIG_BASLER_EXCITE_PROTOTYPE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_BASLER_EXCITE=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/fulong_defconfig b/arch/mips/configs/fulong_defconfig
new file mode 100644
index 0000000000..6ab94d8cf0
--- /dev/null
+++ b/arch/mips/configs/fulong_defconfig
@@ -0,0 +1,1765 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc4
4# Mon Jun 11 00:23:51 2007
5#
6CONFIG_MIPS=y
7
8#
9# Machine selection
10#
11CONFIG_LEMOTE_FULONG=y
12# CONFIG_MACH_ALCHEMY is not set
13# CONFIG_BASLER_EXCITE is not set
14# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set
16# CONFIG_MACH_JAZZ is not set
17# CONFIG_MIPS_ATLAS is not set
18# CONFIG_MIPS_MALTA is not set
19# CONFIG_MIPS_SEAD is not set
20# CONFIG_WR_PPMC is not set
21# CONFIG_MIPS_SIM is not set
22# CONFIG_MOMENCO_OCELOT is not set
23# CONFIG_PNX8550_JBS is not set
24# CONFIG_PNX8550_STB810 is not set
25# CONFIG_DDB5477 is not set
26# CONFIG_MACH_VR41XX is not set
27# CONFIG_PMC_YOSEMITE is not set
28# CONFIG_QEMU is not set
29# CONFIG_MARKEINS is not set
30# CONFIG_SGI_IP22 is not set
31# CONFIG_SGI_IP27 is not set
32# CONFIG_SGI_IP32 is not set
33# CONFIG_SIBYTE_BIGSUR is not set
34# CONFIG_SIBYTE_SWARM is not set
35# CONFIG_SIBYTE_SENTOSA is not set
36# CONFIG_SIBYTE_RHONE is not set
37# CONFIG_SIBYTE_CARMEL is not set
38# CONFIG_SIBYTE_PTSWARM is not set
39# CONFIG_SIBYTE_LITTLESUR is not set
40# CONFIG_SIBYTE_CRHINE is not set
41# CONFIG_SIBYTE_CRHONE is not set
42# CONFIG_SNI_RM is not set
43# CONFIG_TOSHIBA_JMR3927 is not set
44# CONFIG_TOSHIBA_RBTX4927 is not set
45# CONFIG_TOSHIBA_RBTX4938 is not set
46CONFIG_RWSEM_GENERIC_SPINLOCK=y
47# CONFIG_ARCH_HAS_ILOG2_U32 is not set
48# CONFIG_ARCH_HAS_ILOG2_U64 is not set
49CONFIG_GENERIC_FIND_NEXT_BIT=y
50CONFIG_GENERIC_HWEIGHT=y
51CONFIG_GENERIC_CALIBRATE_DELAY=y
52CONFIG_GENERIC_TIME=y
53CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
54CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
55CONFIG_DMA_NONCOHERENT=y
56CONFIG_DMA_NEED_PCI_MAP_STATE=y
57CONFIG_EARLY_PRINTK=y
58CONFIG_SYS_HAS_EARLY_PRINTK=y
59CONFIG_I8259=y
60# CONFIG_NO_IOPORT is not set
61# CONFIG_CPU_BIG_ENDIAN is not set
62CONFIG_CPU_LITTLE_ENDIAN=y
63CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
64CONFIG_IRQ_CPU=y
65CONFIG_BOOT_ELF32=y
66CONFIG_MIPS_L1_CACHE_SHIFT=5
67
68#
69# CPU selection
70#
71CONFIG_CPU_LOONGSON2=y
72# CONFIG_CPU_MIPS32_R1 is not set
73# CONFIG_CPU_MIPS32_R2 is not set
74# CONFIG_CPU_MIPS64_R1 is not set
75# CONFIG_CPU_MIPS64_R2 is not set
76# CONFIG_CPU_R3000 is not set
77# CONFIG_CPU_TX39XX is not set
78# CONFIG_CPU_VR41XX is not set
79# CONFIG_CPU_R4300 is not set
80# CONFIG_CPU_R4X00 is not set
81# CONFIG_CPU_TX49XX is not set
82# CONFIG_CPU_R5000 is not set
83# CONFIG_CPU_R5432 is not set
84# CONFIG_CPU_R6000 is not set
85# CONFIG_CPU_NEVADA is not set
86# CONFIG_CPU_R8000 is not set
87# CONFIG_CPU_R10000 is not set
88# CONFIG_CPU_RM7000 is not set
89# CONFIG_CPU_RM9000 is not set
90# CONFIG_CPU_SB1 is not set
91CONFIG_SYS_HAS_CPU_LOONGSON2=y
92CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
93CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
94CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
95CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
96
97#
98# Kernel type
99#
100# CONFIG_32BIT is not set
101CONFIG_64BIT=y
102# CONFIG_PAGE_SIZE_4KB is not set
103# CONFIG_PAGE_SIZE_8KB is not set
104CONFIG_PAGE_SIZE_16KB=y
105# CONFIG_PAGE_SIZE_64KB is not set
106CONFIG_BOARD_SCACHE=y
107CONFIG_MIPS_MT_DISABLED=y
108# CONFIG_MIPS_MT_SMP is not set
109# CONFIG_MIPS_MT_SMTC is not set
110# CONFIG_MIPS_VPE_LOADER is not set
111CONFIG_CPU_HAS_WB=y
112CONFIG_CPU_HAS_SYNC=y
113CONFIG_GENERIC_HARDIRQS=y
114CONFIG_GENERIC_IRQ_PROBE=y
115CONFIG_CPU_SUPPORTS_HIGHMEM=y
116CONFIG_SYS_SUPPORTS_HIGHMEM=y
117CONFIG_ARCH_FLATMEM_ENABLE=y
118CONFIG_ARCH_SPARSEMEM_ENABLE=y
119CONFIG_SELECT_MEMORY_MODEL=y
120CONFIG_FLATMEM_MANUAL=y
121# CONFIG_DISCONTIGMEM_MANUAL is not set
122# CONFIG_SPARSEMEM_MANUAL is not set
123CONFIG_FLATMEM=y
124CONFIG_FLAT_NODE_MEM_MAP=y
125CONFIG_SPARSEMEM_STATIC=y
126CONFIG_SPLIT_PTLOCK_CPUS=4
127CONFIG_RESOURCES_64BIT=y
128CONFIG_ZONE_DMA_FLAG=0
129# CONFIG_HZ_48 is not set
130# CONFIG_HZ_100 is not set
131# CONFIG_HZ_128 is not set
132CONFIG_HZ_250=y
133# CONFIG_HZ_256 is not set
134# CONFIG_HZ_1000 is not set
135# CONFIG_HZ_1024 is not set
136CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
137CONFIG_HZ=250
138# CONFIG_PREEMPT_NONE is not set
139CONFIG_PREEMPT_VOLUNTARY=y
140# CONFIG_PREEMPT is not set
141# CONFIG_KEXEC is not set
142CONFIG_LOCKDEP_SUPPORT=y
143CONFIG_STACKTRACE_SUPPORT=y
144CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
145
146#
147# Code maturity level options
148#
149CONFIG_EXPERIMENTAL=y
150CONFIG_BROKEN_ON_SMP=y
151CONFIG_INIT_ENV_ARG_LIMIT=32
152
153#
154# General setup
155#
156CONFIG_LOCALVERSION="lm32"
157# CONFIG_LOCALVERSION_AUTO is not set
158CONFIG_SWAP=y
159CONFIG_SYSVIPC=y
160# CONFIG_IPC_NS is not set
161CONFIG_SYSVIPC_SYSCTL=y
162CONFIG_POSIX_MQUEUE=y
163CONFIG_BSD_PROCESS_ACCT=y
164# CONFIG_BSD_PROCESS_ACCT_V3 is not set
165# CONFIG_TASKSTATS is not set
166# CONFIG_UTS_NS is not set
167# CONFIG_AUDIT is not set
168CONFIG_IKCONFIG=y
169CONFIG_IKCONFIG_PROC=y
170CONFIG_LOG_BUF_SHIFT=14
171CONFIG_SYSFS_DEPRECATED=y
172# CONFIG_RELAY is not set
173# CONFIG_BLK_DEV_INITRD is not set
174# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
175CONFIG_SYSCTL=y
176CONFIG_EMBEDDED=y
177CONFIG_SYSCTL_SYSCALL=y
178CONFIG_KALLSYMS=y
179# CONFIG_KALLSYMS_EXTRA_PASS is not set
180CONFIG_HOTPLUG=y
181CONFIG_PRINTK=y
182CONFIG_BUG=y
183CONFIG_ELF_CORE=y
184CONFIG_BASE_FULL=y
185CONFIG_FUTEX=y
186CONFIG_ANON_INODES=y
187CONFIG_EPOLL=y
188CONFIG_SIGNALFD=y
189CONFIG_TIMERFD=y
190CONFIG_EVENTFD=y
191CONFIG_SHMEM=y
192CONFIG_VM_EVENT_COUNTERS=y
193CONFIG_SLAB=y
194# CONFIG_SLUB is not set
195# CONFIG_SLOB is not set
196CONFIG_RT_MUTEXES=y
197# CONFIG_TINY_SHMEM is not set
198CONFIG_BASE_SMALL=0
199
200#
201# Loadable module support
202#
203CONFIG_MODULES=y
204CONFIG_MODULE_UNLOAD=y
205CONFIG_MODULE_FORCE_UNLOAD=y
206# CONFIG_MODVERSIONS is not set
207# CONFIG_MODULE_SRCVERSION_ALL is not set
208CONFIG_KMOD=y
209
210#
211# Block layer
212#
213CONFIG_BLOCK=y
214# CONFIG_BLK_DEV_IO_TRACE is not set
215
216#
217# IO Schedulers
218#
219CONFIG_IOSCHED_NOOP=y
220CONFIG_IOSCHED_AS=y
221CONFIG_IOSCHED_DEADLINE=y
222CONFIG_IOSCHED_CFQ=y
223# CONFIG_DEFAULT_AS is not set
224# CONFIG_DEFAULT_DEADLINE is not set
225CONFIG_DEFAULT_CFQ=y
226# CONFIG_DEFAULT_NOOP is not set
227CONFIG_DEFAULT_IOSCHED="cfq"
228
229#
230# Bus options (PCI, PCMCIA, EISA, ISA, TC)
231#
232CONFIG_HW_HAS_PCI=y
233CONFIG_PCI=y
234# CONFIG_ARCH_SUPPORTS_MSI is not set
235CONFIG_ISA=y
236CONFIG_MMU=y
237
238#
239# PCCARD (PCMCIA/CardBus) support
240#
241# CONFIG_PCCARD is not set
242# CONFIG_HOTPLUG_PCI is not set
243
244#
245# Executable file formats
246#
247CONFIG_BINFMT_ELF=y
248CONFIG_BINFMT_MISC=y
249# CONFIG_BUILD_ELF64 is not set
250CONFIG_MIPS32_COMPAT=y
251CONFIG_COMPAT=y
252CONFIG_SYSVIPC_COMPAT=y
253CONFIG_MIPS32_O32=y
254CONFIG_MIPS32_N32=y
255CONFIG_BINFMT_ELF32=y
256
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#
266# Networking
267#
268CONFIG_NET=y
269
270#
271# Networking options
272#
273CONFIG_PACKET=y
274CONFIG_PACKET_MMAP=y
275CONFIG_UNIX=y
276CONFIG_XFRM=y
277# CONFIG_XFRM_USER is not set
278# CONFIG_XFRM_SUB_POLICY is not set
279# CONFIG_XFRM_MIGRATE is not set
280# CONFIG_NET_KEY is not set
281CONFIG_INET=y
282CONFIG_IP_MULTICAST=y
283# CONFIG_IP_ADVANCED_ROUTER is not set
284CONFIG_IP_FIB_HASH=y
285CONFIG_IP_PNP=y
286# CONFIG_IP_PNP_DHCP is not set
287CONFIG_IP_PNP_BOOTP=y
288# CONFIG_IP_PNP_RARP is not set
289CONFIG_NET_IPIP=m
290CONFIG_NET_IPGRE=m
291CONFIG_NET_IPGRE_BROADCAST=y
292# CONFIG_IP_MROUTE is not set
293# CONFIG_ARPD is not set
294# CONFIG_SYN_COOKIES is not set
295# CONFIG_INET_AH is not set
296# CONFIG_INET_ESP is not set
297# CONFIG_INET_IPCOMP is not set
298# CONFIG_INET_XFRM_TUNNEL is not set
299CONFIG_INET_TUNNEL=m
300# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
301# CONFIG_INET_XFRM_MODE_TUNNEL is not set
302CONFIG_INET_XFRM_MODE_BEET=y
303# CONFIG_INET_DIAG is not set
304# CONFIG_TCP_CONG_ADVANCED is not set
305CONFIG_TCP_CONG_CUBIC=y
306CONFIG_DEFAULT_TCP_CONG="cubic"
307# CONFIG_TCP_MD5SIG is not set
308# CONFIG_IP_VS is not set
309# CONFIG_IPV6 is not set
310# CONFIG_INET6_XFRM_TUNNEL is not set
311# CONFIG_INET6_TUNNEL is not set
312# CONFIG_NETWORK_SECMARK is not set
313CONFIG_NETFILTER=y
314# CONFIG_NETFILTER_DEBUG is not set
315
316#
317# Core Netfilter Configuration
318#
319CONFIG_NETFILTER_NETLINK=m
320CONFIG_NETFILTER_NETLINK_QUEUE=m
321CONFIG_NETFILTER_NETLINK_LOG=m
322# CONFIG_NF_CONNTRACK_ENABLED is not set
323# CONFIG_NF_CONNTRACK is not set
324CONFIG_NETFILTER_XTABLES=m
325CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
326# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
327CONFIG_NETFILTER_XT_TARGET_MARK=m
328CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
329# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
330# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
331CONFIG_NETFILTER_XT_MATCH_COMMENT=m
332CONFIG_NETFILTER_XT_MATCH_DCCP=m
333# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
334CONFIG_NETFILTER_XT_MATCH_ESP=m
335CONFIG_NETFILTER_XT_MATCH_LENGTH=m
336CONFIG_NETFILTER_XT_MATCH_LIMIT=m
337CONFIG_NETFILTER_XT_MATCH_MAC=m
338CONFIG_NETFILTER_XT_MATCH_MARK=m
339# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
340CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
341CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
342CONFIG_NETFILTER_XT_MATCH_QUOTA=m
343CONFIG_NETFILTER_XT_MATCH_REALM=m
344CONFIG_NETFILTER_XT_MATCH_SCTP=m
345CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
346CONFIG_NETFILTER_XT_MATCH_STRING=m
347CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
348# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
349
350#
351# IP: Netfilter Configuration
352#
353CONFIG_IP_NF_QUEUE=m
354CONFIG_IP_NF_IPTABLES=m
355CONFIG_IP_NF_MATCH_IPRANGE=m
356CONFIG_IP_NF_MATCH_TOS=m
357CONFIG_IP_NF_MATCH_RECENT=m
358CONFIG_IP_NF_MATCH_ECN=m
359CONFIG_IP_NF_MATCH_AH=m
360CONFIG_IP_NF_MATCH_TTL=m
361CONFIG_IP_NF_MATCH_OWNER=m
362CONFIG_IP_NF_MATCH_ADDRTYPE=m
363CONFIG_IP_NF_FILTER=m
364CONFIG_IP_NF_TARGET_REJECT=m
365CONFIG_IP_NF_TARGET_LOG=m
366CONFIG_IP_NF_TARGET_ULOG=m
367CONFIG_IP_NF_MANGLE=m
368CONFIG_IP_NF_TARGET_TOS=m
369CONFIG_IP_NF_TARGET_ECN=m
370CONFIG_IP_NF_TARGET_TTL=m
371CONFIG_IP_NF_RAW=m
372CONFIG_IP_NF_ARPTABLES=m
373CONFIG_IP_NF_ARPFILTER=m
374CONFIG_IP_NF_ARP_MANGLE=m
375# CONFIG_IP_DCCP is not set
376# CONFIG_IP_SCTP is not set
377# CONFIG_TIPC is not set
378# CONFIG_ATM is not set
379# CONFIG_BRIDGE is not set
380# CONFIG_VLAN_8021Q is not set
381# CONFIG_DECNET is not set
382# CONFIG_LLC2 is not set
383# CONFIG_IPX is not set
384# CONFIG_ATALK is not set
385# CONFIG_X25 is not set
386# CONFIG_LAPB is not set
387# CONFIG_ECONET is not set
388# CONFIG_WAN_ROUTER is not set
389
390#
391# QoS and/or fair queueing
392#
393# CONFIG_NET_SCHED is not set
394CONFIG_NET_CLS_ROUTE=y
395
396#
397# Network testing
398#
399# CONFIG_NET_PKTGEN is not set
400# CONFIG_HAMRADIO is not set
401# CONFIG_IRDA is not set
402# CONFIG_BT is not set
403# CONFIG_AF_RXRPC is not set
404
405#
406# Wireless
407#
408# CONFIG_CFG80211 is not set
409CONFIG_WIRELESS_EXT=y
410# CONFIG_MAC80211 is not set
411CONFIG_IEEE80211=m
412# CONFIG_IEEE80211_DEBUG is not set
413CONFIG_IEEE80211_CRYPT_WEP=m
414# CONFIG_IEEE80211_CRYPT_CCMP is not set
415# CONFIG_IEEE80211_CRYPT_TKIP is not set
416# CONFIG_IEEE80211_SOFTMAC is not set
417# CONFIG_RFKILL is not set
418
419#
420# Device Drivers
421#
422
423#
424# Generic Driver Options
425#
426CONFIG_STANDALONE=y
427CONFIG_PREVENT_FIRMWARE_BUILD=y
428CONFIG_FW_LOADER=m
429# CONFIG_SYS_HYPERVISOR is not set
430
431#
432# Connector - unified userspace <-> kernelspace linker
433#
434# CONFIG_CONNECTOR is not set
435CONFIG_MTD=m
436# CONFIG_MTD_DEBUG is not set
437# CONFIG_MTD_CONCAT is not set
438# CONFIG_MTD_PARTITIONS is not set
439
440#
441# User Modules And Translation Layers
442#
443CONFIG_MTD_CHAR=m
444CONFIG_MTD_BLKDEVS=m
445CONFIG_MTD_BLOCK=m
446# CONFIG_MTD_BLOCK_RO is not set
447# CONFIG_FTL is not set
448# CONFIG_NFTL is not set
449# CONFIG_INFTL is not set
450# CONFIG_RFD_FTL is not set
451# CONFIG_SSFDC is not set
452
453#
454# RAM/ROM/Flash chip drivers
455#
456CONFIG_MTD_CFI=m
457CONFIG_MTD_JEDECPROBE=m
458CONFIG_MTD_GEN_PROBE=m
459CONFIG_MTD_CFI_ADV_OPTIONS=y
460CONFIG_MTD_CFI_NOSWAP=y
461# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
462# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
463# CONFIG_MTD_CFI_GEOMETRY is not set
464CONFIG_MTD_MAP_BANK_WIDTH_1=y
465CONFIG_MTD_MAP_BANK_WIDTH_2=y
466CONFIG_MTD_MAP_BANK_WIDTH_4=y
467# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
468# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
469# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
470CONFIG_MTD_CFI_I1=y
471CONFIG_MTD_CFI_I2=y
472# CONFIG_MTD_CFI_I4 is not set
473# CONFIG_MTD_CFI_I8 is not set
474# CONFIG_MTD_OTP is not set
475# CONFIG_MTD_CFI_INTELEXT is not set
476CONFIG_MTD_CFI_AMDSTD=m
477CONFIG_MTD_CFI_STAA=m
478CONFIG_MTD_CFI_UTIL=m
479# CONFIG_MTD_RAM is not set
480# CONFIG_MTD_ROM is not set
481# CONFIG_MTD_ABSENT is not set
482
483#
484# Mapping drivers for chip access
485#
486# CONFIG_MTD_COMPLEX_MAPPINGS is not set
487CONFIG_MTD_PHYSMAP=m
488CONFIG_MTD_PHYSMAP_START=0x1fc00000
489CONFIG_MTD_PHYSMAP_LEN=0x80000
490CONFIG_MTD_PHYSMAP_BANKWIDTH=1
491# CONFIG_MTD_PLATRAM is not set
492
493#
494# Self-contained MTD device drivers
495#
496# CONFIG_MTD_PMC551 is not set
497# CONFIG_MTD_SLRAM is not set
498# CONFIG_MTD_PHRAM is not set
499# CONFIG_MTD_MTDRAM is not set
500# CONFIG_MTD_BLOCK2MTD is not set
501
502#
503# Disk-On-Chip Device Drivers
504#
505# CONFIG_MTD_DOC2000 is not set
506# CONFIG_MTD_DOC2001 is not set
507# CONFIG_MTD_DOC2001PLUS is not set
508# CONFIG_MTD_NAND is not set
509# CONFIG_MTD_ONENAND is not set
510
511#
512# UBI - Unsorted block images
513#
514# CONFIG_MTD_UBI is not set
515
516#
517# Parallel port support
518#
519# CONFIG_PARPORT is not set
520
521#
522# Plug and Play support
523#
524# CONFIG_PNP is not set
525# CONFIG_PNPACPI is not set
526
527#
528# Block devices
529#
530# CONFIG_BLK_CPQ_DA is not set
531# CONFIG_BLK_CPQ_CISS_DA is not set
532# CONFIG_BLK_DEV_DAC960 is not set
533# CONFIG_BLK_DEV_UMEM is not set
534# CONFIG_BLK_DEV_COW_COMMON is not set
535CONFIG_BLK_DEV_LOOP=y
536CONFIG_BLK_DEV_CRYPTOLOOP=m
537# CONFIG_BLK_DEV_NBD is not set
538# CONFIG_BLK_DEV_SX8 is not set
539# CONFIG_BLK_DEV_UB is not set
540CONFIG_BLK_DEV_RAM=m
541CONFIG_BLK_DEV_RAM_COUNT=16
542CONFIG_BLK_DEV_RAM_SIZE=4096
543CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
544CONFIG_CDROM_PKTCDVD=m
545CONFIG_CDROM_PKTCDVD_BUFFERS=8
546# CONFIG_CDROM_PKTCDVD_WCACHE is not set
547CONFIG_ATA_OVER_ETH=m
548
549#
550# Misc devices
551#
552# CONFIG_PHANTOM is not set
553# CONFIG_SGI_IOC4 is not set
554# CONFIG_TIFM_CORE is not set
555# CONFIG_BLINK is not set
556CONFIG_IDE=y
557CONFIG_IDE_MAX_HWIFS=4
558CONFIG_BLK_DEV_IDE=y
559
560#
561# Please see Documentation/ide.txt for help/info on IDE drives
562#
563# CONFIG_BLK_DEV_IDE_SATA is not set
564CONFIG_BLK_DEV_IDEDISK=y
565CONFIG_IDEDISK_MULTI_MODE=y
566CONFIG_BLK_DEV_IDECD=y
567# CONFIG_BLK_DEV_IDETAPE is not set
568# CONFIG_BLK_DEV_IDEFLOPPY is not set
569CONFIG_BLK_DEV_IDESCSI=y
570CONFIG_IDE_TASK_IOCTL=y
571CONFIG_IDE_PROC_FS=y
572
573#
574# IDE chipset support/bugfixes
575#
576CONFIG_IDE_GENERIC=y
577CONFIG_BLK_DEV_IDEPCI=y
578CONFIG_IDEPCI_SHARE_IRQ=y
579CONFIG_IDEPCI_PCIBUS_ORDER=y
580# CONFIG_BLK_DEV_OFFBOARD is not set
581CONFIG_BLK_DEV_GENERIC=y
582# CONFIG_BLK_DEV_OPTI621 is not set
583CONFIG_BLK_DEV_IDEDMA_PCI=y
584# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
585# CONFIG_IDEDMA_ONLYDISK is not set
586# CONFIG_BLK_DEV_AEC62XX is not set
587# CONFIG_BLK_DEV_ALI15X3 is not set
588# CONFIG_BLK_DEV_AMD74XX is not set
589# CONFIG_BLK_DEV_CMD64X is not set
590# CONFIG_BLK_DEV_TRIFLEX is not set
591# CONFIG_BLK_DEV_CY82C693 is not set
592# CONFIG_BLK_DEV_CS5520 is not set
593# CONFIG_BLK_DEV_CS5530 is not set
594# CONFIG_BLK_DEV_HPT34X is not set
595# CONFIG_BLK_DEV_HPT366 is not set
596# CONFIG_BLK_DEV_JMICRON is not set
597# CONFIG_BLK_DEV_SC1200 is not set
598# CONFIG_BLK_DEV_PIIX is not set
599# CONFIG_BLK_DEV_IT8213 is not set
600# CONFIG_BLK_DEV_IT821X is not set
601# CONFIG_BLK_DEV_NS87415 is not set
602# CONFIG_BLK_DEV_PDC202XX_OLD is not set
603# CONFIG_BLK_DEV_PDC202XX_NEW is not set
604# CONFIG_BLK_DEV_SVWKS is not set
605# CONFIG_BLK_DEV_SIIMAGE is not set
606# CONFIG_BLK_DEV_SLC90E66 is not set
607# CONFIG_BLK_DEV_TRM290 is not set
608CONFIG_BLK_DEV_VIA82CXXX=y
609# CONFIG_BLK_DEV_TC86C001 is not set
610# CONFIG_IDE_ARM is not set
611# CONFIG_IDE_CHIPSETS is not set
612CONFIG_BLK_DEV_IDEDMA=y
613# CONFIG_IDEDMA_IVB is not set
614# CONFIG_BLK_DEV_HD is not set
615
616#
617# SCSI device support
618#
619# CONFIG_RAID_ATTRS is not set
620CONFIG_SCSI=y
621# CONFIG_SCSI_TGT is not set
622# CONFIG_SCSI_NETLINK is not set
623CONFIG_SCSI_PROC_FS=y
624
625#
626# SCSI support type (disk, tape, CD-ROM)
627#
628CONFIG_BLK_DEV_SD=y
629# CONFIG_CHR_DEV_ST is not set
630# CONFIG_CHR_DEV_OSST is not set
631CONFIG_BLK_DEV_SR=y
632CONFIG_BLK_DEV_SR_VENDOR=y
633CONFIG_CHR_DEV_SG=y
634# CONFIG_CHR_DEV_SCH is not set
635
636#
637# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
638#
639# CONFIG_SCSI_MULTI_LUN is not set
640CONFIG_SCSI_CONSTANTS=y
641# CONFIG_SCSI_LOGGING is not set
642# CONFIG_SCSI_SCAN_ASYNC is not set
643CONFIG_SCSI_WAIT_SCAN=m
644
645#
646# SCSI Transports
647#
648# CONFIG_SCSI_SPI_ATTRS is not set
649# CONFIG_SCSI_FC_ATTRS is not set
650# CONFIG_SCSI_ISCSI_ATTRS is not set
651# CONFIG_SCSI_SAS_ATTRS is not set
652# CONFIG_SCSI_SAS_LIBSAS is not set
653
654#
655# SCSI low-level drivers
656#
657# CONFIG_ISCSI_TCP is not set
658# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
659# CONFIG_SCSI_3W_9XXX is not set
660# CONFIG_SCSI_ACARD is not set
661# CONFIG_SCSI_AACRAID is not set
662# CONFIG_SCSI_AIC7XXX is not set
663# CONFIG_SCSI_AIC7XXX_OLD is not set
664# CONFIG_SCSI_AIC79XX is not set
665# CONFIG_SCSI_AIC94XX is not set
666# CONFIG_SCSI_IN2000 is not set
667# CONFIG_SCSI_ARCMSR is not set
668# CONFIG_MEGARAID_NEWGEN is not set
669# CONFIG_MEGARAID_LEGACY is not set
670# CONFIG_MEGARAID_SAS is not set
671# CONFIG_SCSI_HPTIOP is not set
672# CONFIG_SCSI_DMX3191D is not set
673# CONFIG_SCSI_DTC3280 is not set
674# CONFIG_SCSI_FUTURE_DOMAIN is not set
675# CONFIG_SCSI_GENERIC_NCR5380 is not set
676# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
677# CONFIG_SCSI_IPS is not set
678# CONFIG_SCSI_INITIO is not set
679# CONFIG_SCSI_INIA100 is not set
680# CONFIG_SCSI_NCR53C406A is not set
681# CONFIG_SCSI_STEX is not set
682# CONFIG_SCSI_SYM53C8XX_2 is not set
683# CONFIG_SCSI_PAS16 is not set
684# CONFIG_SCSI_PSI240I is not set
685# CONFIG_SCSI_QLOGIC_FAS is not set
686# CONFIG_SCSI_QLOGIC_1280 is not set
687# CONFIG_SCSI_QLA_FC is not set
688# CONFIG_SCSI_QLA_ISCSI is not set
689# CONFIG_SCSI_LPFC is not set
690# CONFIG_SCSI_SYM53C416 is not set
691# CONFIG_SCSI_DC395x is not set
692# CONFIG_SCSI_DC390T is not set
693# CONFIG_SCSI_T128 is not set
694# CONFIG_SCSI_DEBUG is not set
695# CONFIG_SCSI_SRP is not set
696# CONFIG_ATA is not set
697
698#
699# Old CD-ROM drivers (not SCSI, not IDE)
700#
701# CONFIG_CD_NO_IDESCSI is not set
702
703#
704# Multi-device support (RAID and LVM)
705#
706# CONFIG_MD is not set
707
708#
709# Fusion MPT device support
710#
711# CONFIG_FUSION is not set
712# CONFIG_FUSION_SPI is not set
713# CONFIG_FUSION_FC is not set
714# CONFIG_FUSION_SAS is not set
715
716#
717# IEEE 1394 (FireWire) support
718#
719# CONFIG_FIREWIRE is not set
720# CONFIG_IEEE1394 is not set
721
722#
723# I2O device support
724#
725# CONFIG_I2O is not set
726
727#
728# Network device support
729#
730CONFIG_NETDEVICES=y
731# CONFIG_DUMMY is not set
732# CONFIG_BONDING is not set
733# CONFIG_EQUALIZER is not set
734# CONFIG_TUN is not set
735# CONFIG_ARCNET is not set
736CONFIG_PHYLIB=m
737
738#
739# MII PHY device drivers
740#
741CONFIG_MARVELL_PHY=m
742CONFIG_DAVICOM_PHY=m
743CONFIG_QSEMI_PHY=m
744CONFIG_LXT_PHY=m
745CONFIG_CICADA_PHY=m
746# CONFIG_VITESSE_PHY is not set
747# CONFIG_SMSC_PHY is not set
748# CONFIG_BROADCOM_PHY is not set
749# CONFIG_FIXED_PHY is not set
750
751#
752# Ethernet (10 or 100Mbit)
753#
754CONFIG_NET_ETHERNET=y
755CONFIG_MII=y
756# CONFIG_HAPPYMEAL is not set
757# CONFIG_SUNGEM is not set
758# CONFIG_CASSINI is not set
759# CONFIG_NET_VENDOR_3COM is not set
760# CONFIG_NET_VENDOR_SMC is not set
761# CONFIG_DM9000 is not set
762# CONFIG_NET_VENDOR_RACAL is not set
763
764#
765# Tulip family network device support
766#
767# CONFIG_NET_TULIP is not set
768# CONFIG_AT1700 is not set
769# CONFIG_DEPCA is not set
770# CONFIG_HP100 is not set
771# CONFIG_NET_ISA is not set
772CONFIG_NET_PCI=y
773# CONFIG_PCNET32 is not set
774# CONFIG_AMD8111_ETH is not set
775# CONFIG_ADAPTEC_STARFIRE is not set
776# CONFIG_AC3200 is not set
777# CONFIG_APRICOT is not set
778# CONFIG_B44 is not set
779# CONFIG_FORCEDETH is not set
780# CONFIG_CS89x0 is not set
781# CONFIG_TC35815 is not set
782# CONFIG_DGRS is not set
783# CONFIG_EEPRO100 is not set
784# CONFIG_E100 is not set
785# CONFIG_FEALNX is not set
786# CONFIG_NATSEMI is not set
787# CONFIG_NE2K_PCI is not set
788# CONFIG_8139CP is not set
789CONFIG_8139TOO=y
790# CONFIG_8139TOO_PIO is not set
791# CONFIG_8139TOO_TUNE_TWISTER is not set
792# CONFIG_8139TOO_8129 is not set
793# CONFIG_8139_OLD_RX_RESET is not set
794# CONFIG_SIS900 is not set
795# CONFIG_EPIC100 is not set
796# CONFIG_SUNDANCE is not set
797# CONFIG_VIA_RHINE is not set
798# CONFIG_SC92031 is not set
799CONFIG_NETDEV_1000=y
800# CONFIG_ACENIC is not set
801# CONFIG_DL2K is not set
802# CONFIG_E1000 is not set
803# CONFIG_NS83820 is not set
804# CONFIG_HAMACHI is not set
805# CONFIG_YELLOWFIN is not set
806# CONFIG_R8169 is not set
807# CONFIG_SIS190 is not set
808# CONFIG_SKGE is not set
809# CONFIG_SKY2 is not set
810# CONFIG_SK98LIN is not set
811# CONFIG_VIA_VELOCITY is not set
812# CONFIG_TIGON3 is not set
813# CONFIG_BNX2 is not set
814# CONFIG_QLA3XXX is not set
815# CONFIG_ATL1 is not set
816CONFIG_NETDEV_10000=y
817# CONFIG_CHELSIO_T1 is not set
818# CONFIG_CHELSIO_T3 is not set
819# CONFIG_IXGB is not set
820# CONFIG_S2IO is not set
821# CONFIG_MYRI10GE is not set
822# CONFIG_NETXEN_NIC is not set
823# CONFIG_MLX4_CORE is not set
824# CONFIG_TR is not set
825
826#
827# Wireless LAN
828#
829# CONFIG_WLAN_PRE80211 is not set
830# CONFIG_WLAN_80211 is not set
831
832#
833# USB Network Adapters
834#
835# CONFIG_USB_CATC is not set
836# CONFIG_USB_KAWETH is not set
837# CONFIG_USB_PEGASUS is not set
838# CONFIG_USB_RTL8150 is not set
839# CONFIG_USB_USBNET_MII is not set
840# CONFIG_USB_USBNET is not set
841# CONFIG_WAN is not set
842# CONFIG_FDDI is not set
843# CONFIG_HIPPI is not set
844CONFIG_PPP=m
845CONFIG_PPP_MULTILINK=y
846CONFIG_PPP_FILTER=y
847CONFIG_PPP_ASYNC=m
848CONFIG_PPP_SYNC_TTY=m
849CONFIG_PPP_DEFLATE=m
850CONFIG_PPP_BSDCOMP=m
851CONFIG_PPP_MPPE=m
852CONFIG_PPPOE=m
853CONFIG_SLIP=m
854CONFIG_SLIP_COMPRESSED=y
855CONFIG_SLHC=m
856CONFIG_SLIP_SMART=y
857CONFIG_SLIP_MODE_SLIP6=y
858CONFIG_NET_FC=y
859# CONFIG_SHAPER is not set
860# CONFIG_NETCONSOLE is not set
861# CONFIG_NETPOLL is not set
862# CONFIG_NET_POLL_CONTROLLER is not set
863
864#
865# ISDN subsystem
866#
867# CONFIG_ISDN is not set
868
869#
870# Telephony Support
871#
872# CONFIG_PHONE is not set
873
874#
875# Input device support
876#
877CONFIG_INPUT=y
878CONFIG_INPUT_FF_MEMLESS=y
879
880#
881# Userland interfaces
882#
883CONFIG_INPUT_MOUSEDEV=y
884CONFIG_INPUT_MOUSEDEV_PSAUX=y
885CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
886CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
887# CONFIG_INPUT_JOYDEV is not set
888# CONFIG_INPUT_TSDEV is not set
889# CONFIG_INPUT_EVDEV is not set
890# CONFIG_INPUT_EVBUG is not set
891
892#
893# Input Device Drivers
894#
895CONFIG_INPUT_KEYBOARD=y
896CONFIG_KEYBOARD_ATKBD=m
897# CONFIG_KEYBOARD_SUNKBD is not set
898# CONFIG_KEYBOARD_LKKBD is not set
899# CONFIG_KEYBOARD_XTKBD is not set
900# CONFIG_KEYBOARD_NEWTON is not set
901# CONFIG_KEYBOARD_STOWAWAY is not set
902CONFIG_INPUT_MOUSE=y
903CONFIG_MOUSE_PS2=y
904CONFIG_MOUSE_PS2_ALPS=y
905CONFIG_MOUSE_PS2_LOGIPS2PP=y
906CONFIG_MOUSE_PS2_SYNAPTICS=y
907CONFIG_MOUSE_PS2_LIFEBOOK=y
908CONFIG_MOUSE_PS2_TRACKPOINT=y
909# CONFIG_MOUSE_PS2_TOUCHKIT is not set
910CONFIG_MOUSE_SERIAL=y
911# CONFIG_MOUSE_APPLETOUCH is not set
912# CONFIG_MOUSE_INPORT is not set
913# CONFIG_MOUSE_LOGIBM is not set
914# CONFIG_MOUSE_PC110PAD is not set
915# CONFIG_MOUSE_VSXXXAA is not set
916# CONFIG_INPUT_JOYSTICK is not set
917# CONFIG_INPUT_TABLET is not set
918# CONFIG_INPUT_TOUCHSCREEN is not set
919# CONFIG_INPUT_MISC is not set
920
921#
922# Hardware I/O ports
923#
924CONFIG_SERIO=y
925CONFIG_SERIO_I8042=y
926CONFIG_SERIO_SERPORT=y
927# CONFIG_SERIO_PCIPS2 is not set
928CONFIG_SERIO_LIBPS2=y
929# CONFIG_SERIO_RAW is not set
930# CONFIG_GAMEPORT is not set
931
932#
933# Character devices
934#
935CONFIG_VT=y
936CONFIG_VT_CONSOLE=y
937CONFIG_HW_CONSOLE=y
938# CONFIG_VT_HW_CONSOLE_BINDING is not set
939# CONFIG_SERIAL_NONSTANDARD is not set
940
941#
942# Serial drivers
943#
944CONFIG_SERIAL_8250=y
945CONFIG_SERIAL_8250_CONSOLE=y
946CONFIG_SERIAL_8250_PCI=y
947CONFIG_SERIAL_8250_NR_UARTS=2
948CONFIG_SERIAL_8250_RUNTIME_UARTS=2
949# CONFIG_SERIAL_8250_EXTENDED is not set
950
951#
952# Non-8250 serial port support
953#
954CONFIG_SERIAL_CORE=y
955CONFIG_SERIAL_CORE_CONSOLE=y
956# CONFIG_SERIAL_JSM is not set
957CONFIG_UNIX98_PTYS=y
958CONFIG_LEGACY_PTYS=y
959CONFIG_LEGACY_PTY_COUNT=256
960
961#
962# IPMI
963#
964# CONFIG_IPMI_HANDLER is not set
965# CONFIG_WATCHDOG is not set
966CONFIG_HW_RANDOM=y
967CONFIG_RTC=y
968# CONFIG_DTLK is not set
969# CONFIG_R3964 is not set
970# CONFIG_APPLICOM is not set
971# CONFIG_DRM is not set
972# CONFIG_RAW_DRIVER is not set
973
974#
975# TPM devices
976#
977# CONFIG_TCG_TPM is not set
978CONFIG_DEVPORT=y
979CONFIG_I2C=m
980CONFIG_I2C_BOARDINFO=y
981CONFIG_I2C_CHARDEV=m
982
983#
984# I2C Algorithms
985#
986# CONFIG_I2C_ALGOBIT is not set
987# CONFIG_I2C_ALGOPCF is not set
988# CONFIG_I2C_ALGOPCA is not set
989
990#
991# I2C Hardware Bus support
992#
993# CONFIG_I2C_ALI1535 is not set
994# CONFIG_I2C_ALI1563 is not set
995# CONFIG_I2C_ALI15X3 is not set
996# CONFIG_I2C_AMD756 is not set
997# CONFIG_I2C_AMD8111 is not set
998# CONFIG_I2C_ELEKTOR is not set
999# CONFIG_I2C_I801 is not set
1000# CONFIG_I2C_I810 is not set
1001# CONFIG_I2C_PIIX4 is not set
1002# CONFIG_I2C_NFORCE2 is not set
1003# CONFIG_I2C_OCORES is not set
1004# CONFIG_I2C_PARPORT_LIGHT is not set
1005# CONFIG_I2C_PROSAVAGE is not set
1006# CONFIG_I2C_SAVAGE4 is not set
1007# CONFIG_I2C_SIMTEC is not set
1008# CONFIG_I2C_SIS5595 is not set
1009# CONFIG_I2C_SIS630 is not set
1010# CONFIG_I2C_SIS96X is not set
1011# CONFIG_I2C_STUB is not set
1012# CONFIG_I2C_TINY_USB is not set
1013# CONFIG_I2C_VIA is not set
1014CONFIG_I2C_VIAPRO=m
1015# CONFIG_I2C_VOODOO3 is not set
1016# CONFIG_I2C_PCA_ISA is not set
1017
1018#
1019# Miscellaneous I2C Chip support
1020#
1021# CONFIG_SENSORS_DS1337 is not set
1022# CONFIG_SENSORS_DS1374 is not set
1023# CONFIG_SENSORS_EEPROM is not set
1024# CONFIG_SENSORS_PCF8574 is not set
1025# CONFIG_SENSORS_PCA9539 is not set
1026# CONFIG_SENSORS_PCF8591 is not set
1027# CONFIG_SENSORS_MAX6875 is not set
1028# CONFIG_I2C_DEBUG_CORE is not set
1029# CONFIG_I2C_DEBUG_ALGO is not set
1030# CONFIG_I2C_DEBUG_BUS is not set
1031# CONFIG_I2C_DEBUG_CHIP is not set
1032
1033#
1034# SPI support
1035#
1036# CONFIG_SPI is not set
1037# CONFIG_SPI_MASTER is not set
1038
1039#
1040# Dallas's 1-wire bus
1041#
1042# CONFIG_W1 is not set
1043# CONFIG_HWMON is not set
1044
1045#
1046# Multifunction device drivers
1047#
1048# CONFIG_MFD_SM501 is not set
1049
1050#
1051# Multimedia devices
1052#
1053CONFIG_VIDEO_DEV=m
1054CONFIG_VIDEO_V4L1=y
1055CONFIG_VIDEO_V4L1_COMPAT=y
1056CONFIG_VIDEO_V4L2=y
1057CONFIG_VIDEO_CAPTURE_DRIVERS=y
1058# CONFIG_VIDEO_ADV_DEBUG is not set
1059CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
1060# CONFIG_VIDEO_VIVI is not set
1061# CONFIG_VIDEO_BT848 is not set
1062# CONFIG_VIDEO_PMS is not set
1063# CONFIG_VIDEO_CPIA is not set
1064# CONFIG_VIDEO_CPIA2 is not set
1065# CONFIG_VIDEO_SAA5246A is not set
1066# CONFIG_VIDEO_SAA5249 is not set
1067# CONFIG_TUNER_3036 is not set
1068# CONFIG_VIDEO_STRADIS is not set
1069# CONFIG_VIDEO_SAA7134 is not set
1070# CONFIG_VIDEO_MXB is not set
1071# CONFIG_VIDEO_DPC is not set
1072# CONFIG_VIDEO_HEXIUM_ORION is not set
1073# CONFIG_VIDEO_HEXIUM_GEMINI is not set
1074# CONFIG_VIDEO_CX88 is not set
1075# CONFIG_VIDEO_IVTV is not set
1076# CONFIG_VIDEO_CAFE_CCIC is not set
1077CONFIG_V4L_USB_DRIVERS=y
1078# CONFIG_VIDEO_PVRUSB2 is not set
1079# CONFIG_VIDEO_EM28XX is not set
1080# CONFIG_VIDEO_USBVISION is not set
1081CONFIG_VIDEO_USBVIDEO=m
1082CONFIG_USB_VICAM=m
1083CONFIG_USB_IBMCAM=m
1084CONFIG_USB_KONICAWC=m
1085CONFIG_USB_QUICKCAM_MESSENGER=m
1086CONFIG_USB_ET61X251=m
1087# CONFIG_VIDEO_OVCAMCHIP is not set
1088# CONFIG_USB_W9968CF is not set
1089CONFIG_USB_OV511=m
1090CONFIG_USB_SE401=m
1091CONFIG_USB_SN9C102=m
1092CONFIG_USB_STV680=m
1093CONFIG_USB_ZC0301=m
1094CONFIG_USB_PWC=m
1095# CONFIG_USB_PWC_DEBUG is not set
1096# CONFIG_USB_ZR364XX is not set
1097CONFIG_RADIO_ADAPTERS=y
1098# CONFIG_RADIO_CADET is not set
1099# CONFIG_RADIO_RTRACK is not set
1100# CONFIG_RADIO_RTRACK2 is not set
1101# CONFIG_RADIO_AZTECH is not set
1102# CONFIG_RADIO_GEMTEK is not set
1103# CONFIG_RADIO_GEMTEK_PCI is not set
1104# CONFIG_RADIO_MAXIRADIO is not set
1105# CONFIG_RADIO_MAESTRO is not set
1106# CONFIG_RADIO_SF16FMI is not set
1107# CONFIG_RADIO_SF16FMR2 is not set
1108# CONFIG_RADIO_TERRATEC is not set
1109# CONFIG_RADIO_TRUST is not set
1110# CONFIG_RADIO_TYPHOON is not set
1111# CONFIG_RADIO_ZOLTRIX is not set
1112# CONFIG_USB_DSBR is not set
1113# CONFIG_DVB_CORE is not set
1114CONFIG_DAB=y
1115# CONFIG_USB_DABUSB is not set
1116
1117#
1118# Graphics support
1119#
1120CONFIG_BACKLIGHT_LCD_SUPPORT=y
1121CONFIG_BACKLIGHT_CLASS_DEVICE=y
1122CONFIG_LCD_CLASS_DEVICE=m
1123
1124#
1125# Display device support
1126#
1127# CONFIG_DISPLAY_SUPPORT is not set
1128# CONFIG_VGASTATE is not set
1129CONFIG_FB=y
1130# CONFIG_FIRMWARE_EDID is not set
1131# CONFIG_FB_DDC is not set
1132CONFIG_FB_CFB_FILLRECT=y
1133CONFIG_FB_CFB_COPYAREA=y
1134CONFIG_FB_CFB_IMAGEBLIT=y
1135# CONFIG_FB_SYS_FILLRECT is not set
1136# CONFIG_FB_SYS_COPYAREA is not set
1137# CONFIG_FB_SYS_IMAGEBLIT is not set
1138# CONFIG_FB_SYS_FOPS is not set
1139CONFIG_FB_DEFERRED_IO=y
1140# CONFIG_FB_SVGALIB is not set
1141# CONFIG_FB_MACMODES is not set
1142CONFIG_FB_BACKLIGHT=y
1143CONFIG_FB_MODE_HELPERS=y
1144# CONFIG_FB_TILEBLITTING is not set
1145
1146#
1147# Frame buffer hardware drivers
1148#
1149# CONFIG_FB_CIRRUS is not set
1150# CONFIG_FB_PM2 is not set
1151# CONFIG_FB_CYBER2000 is not set
1152# CONFIG_FB_ASILIANT is not set
1153# CONFIG_FB_IMSTT is not set
1154# CONFIG_FB_S1D13XXX is not set
1155# CONFIG_FB_NVIDIA is not set
1156# CONFIG_FB_RIVA is not set
1157# CONFIG_FB_MATROX is not set
1158CONFIG_FB_RADEON=y
1159# CONFIG_FB_RADEON_I2C is not set
1160CONFIG_FB_RADEON_BACKLIGHT=y
1161# CONFIG_FB_RADEON_DEBUG is not set
1162# CONFIG_FB_ATY128 is not set
1163# CONFIG_FB_ATY is not set
1164# CONFIG_FB_S3 is not set
1165# CONFIG_FB_SAVAGE is not set
1166# CONFIG_FB_SIS is not set
1167# CONFIG_FB_NEOMAGIC is not set
1168# CONFIG_FB_KYRO is not set
1169# CONFIG_FB_3DFX is not set
1170# CONFIG_FB_VOODOO1 is not set
1171# CONFIG_FB_SMIVGX is not set
1172# CONFIG_FB_VT8623 is not set
1173# CONFIG_FB_TRIDENT is not set
1174# CONFIG_FB_ARK is not set
1175# CONFIG_FB_PM3 is not set
1176# CONFIG_FB_VIRTUAL is not set
1177
1178#
1179# Console display driver support
1180#
1181# CONFIG_VGA_CONSOLE is not set
1182# CONFIG_MDA_CONSOLE is not set
1183CONFIG_DUMMY_CONSOLE=y
1184CONFIG_FRAMEBUFFER_CONSOLE=y
1185# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
1186# CONFIG_FONTS is not set
1187CONFIG_FONT_8x8=y
1188CONFIG_FONT_8x16=y
1189# CONFIG_LOGO is not set
1190
1191#
1192# Sound
1193#
1194CONFIG_SOUND=y
1195
1196#
1197# Advanced Linux Sound Architecture
1198#
1199CONFIG_SND=m
1200CONFIG_SND_TIMER=m
1201CONFIG_SND_PCM=m
1202CONFIG_SND_RAWMIDI=m
1203CONFIG_SND_SEQUENCER=m
1204CONFIG_SND_SEQ_DUMMY=m
1205CONFIG_SND_OSSEMUL=y
1206CONFIG_SND_MIXER_OSS=m
1207CONFIG_SND_PCM_OSS=m
1208CONFIG_SND_PCM_OSS_PLUGINS=y
1209CONFIG_SND_SEQUENCER_OSS=y
1210CONFIG_SND_RTCTIMER=m
1211CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
1212# CONFIG_SND_DYNAMIC_MINORS is not set
1213CONFIG_SND_SUPPORT_OLD_API=y
1214CONFIG_SND_VERBOSE_PROCFS=y
1215# CONFIG_SND_VERBOSE_PRINTK is not set
1216# CONFIG_SND_DEBUG is not set
1217
1218#
1219# Generic devices
1220#
1221CONFIG_SND_MPU401_UART=m
1222CONFIG_SND_AC97_CODEC=m
1223# CONFIG_SND_DUMMY is not set
1224# CONFIG_SND_VIRMIDI is not set
1225# CONFIG_SND_MTPAV is not set
1226# CONFIG_SND_SERIAL_U16550 is not set
1227# CONFIG_SND_MPU401 is not set
1228
1229#
1230# PCI devices
1231#
1232# CONFIG_SND_AD1889 is not set
1233# CONFIG_SND_ALS300 is not set
1234# CONFIG_SND_ALI5451 is not set
1235# CONFIG_SND_ATIIXP is not set
1236# CONFIG_SND_ATIIXP_MODEM is not set
1237# CONFIG_SND_AU8810 is not set
1238# CONFIG_SND_AU8820 is not set
1239# CONFIG_SND_AU8830 is not set
1240# CONFIG_SND_AZT3328 is not set
1241# CONFIG_SND_BT87X is not set
1242# CONFIG_SND_CA0106 is not set
1243# CONFIG_SND_CMIPCI is not set
1244# CONFIG_SND_CS4281 is not set
1245# CONFIG_SND_CS46XX is not set
1246# CONFIG_SND_DARLA20 is not set
1247# CONFIG_SND_GINA20 is not set
1248# CONFIG_SND_LAYLA20 is not set
1249# CONFIG_SND_DARLA24 is not set
1250# CONFIG_SND_GINA24 is not set
1251# CONFIG_SND_LAYLA24 is not set
1252# CONFIG_SND_MONA is not set
1253# CONFIG_SND_MIA is not set
1254# CONFIG_SND_ECHO3G is not set
1255# CONFIG_SND_INDIGO is not set
1256# CONFIG_SND_INDIGOIO is not set
1257# CONFIG_SND_INDIGODJ is not set
1258# CONFIG_SND_EMU10K1 is not set
1259# CONFIG_SND_EMU10K1X is not set
1260# CONFIG_SND_ENS1370 is not set
1261# CONFIG_SND_ENS1371 is not set
1262# CONFIG_SND_ES1938 is not set
1263# CONFIG_SND_ES1968 is not set
1264# CONFIG_SND_FM801 is not set
1265# CONFIG_SND_HDA_INTEL is not set
1266# CONFIG_SND_HDSP is not set
1267# CONFIG_SND_HDSPM is not set
1268# CONFIG_SND_ICE1712 is not set
1269# CONFIG_SND_ICE1724 is not set
1270# CONFIG_SND_INTEL8X0 is not set
1271# CONFIG_SND_INTEL8X0M is not set
1272# CONFIG_SND_KORG1212 is not set
1273# CONFIG_SND_MAESTRO3 is not set
1274# CONFIG_SND_MIXART is not set
1275# CONFIG_SND_NM256 is not set
1276# CONFIG_SND_PCXHR is not set
1277# CONFIG_SND_RIPTIDE is not set
1278# CONFIG_SND_RME32 is not set
1279# CONFIG_SND_RME96 is not set
1280# CONFIG_SND_RME9652 is not set
1281# CONFIG_SND_SONICVIBES is not set
1282# CONFIG_SND_TRIDENT is not set
1283CONFIG_SND_VIA82XX=m
1284# CONFIG_SND_VIA82XX_MODEM is not set
1285# CONFIG_SND_VX222 is not set
1286# CONFIG_SND_YMFPCI is not set
1287# CONFIG_SND_AC97_POWER_SAVE is not set
1288
1289#
1290# ALSA MIPS devices
1291#
1292
1293#
1294# USB devices
1295#
1296# CONFIG_SND_USB_AUDIO is not set
1297# CONFIG_SND_USB_CAIAQ is not set
1298
1299#
1300# System on Chip audio support
1301#
1302# CONFIG_SND_SOC is not set
1303
1304#
1305# Open Sound System
1306#
1307# CONFIG_SOUND_PRIME is not set
1308CONFIG_AC97_BUS=m
1309
1310#
1311# HID Devices
1312#
1313CONFIG_HID=y
1314# CONFIG_HID_DEBUG is not set
1315
1316#
1317# USB Input Devices
1318#
1319CONFIG_USB_HID=m
1320# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1321# CONFIG_HID_FF is not set
1322CONFIG_USB_HIDDEV=y
1323
1324#
1325# USB HID Boot Protocol drivers
1326#
1327# CONFIG_USB_KBD is not set
1328# CONFIG_USB_MOUSE is not set
1329
1330#
1331# USB support
1332#
1333CONFIG_USB_ARCH_HAS_HCD=y
1334CONFIG_USB_ARCH_HAS_OHCI=y
1335CONFIG_USB_ARCH_HAS_EHCI=y
1336CONFIG_USB=y
1337# CONFIG_USB_DEBUG is not set
1338
1339#
1340# Miscellaneous USB options
1341#
1342CONFIG_USB_DEVICEFS=y
1343# CONFIG_USB_DEVICE_CLASS is not set
1344# CONFIG_USB_DYNAMIC_MINORS is not set
1345# CONFIG_USB_SUSPEND is not set
1346# CONFIG_USB_OTG is not set
1347
1348#
1349# USB Host Controller Drivers
1350#
1351CONFIG_USB_EHCI_HCD=y
1352CONFIG_USB_EHCI_SPLIT_ISO=y
1353CONFIG_USB_EHCI_ROOT_HUB_TT=y
1354CONFIG_USB_EHCI_TT_NEWSCHED=y
1355# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1356# CONFIG_USB_ISP116X_HCD is not set
1357CONFIG_USB_OHCI_HCD=y
1358# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1359# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1360CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1361CONFIG_USB_UHCI_HCD=m
1362# CONFIG_USB_SL811_HCD is not set
1363
1364#
1365# USB Device Class drivers
1366#
1367CONFIG_USB_ACM=y
1368CONFIG_USB_PRINTER=y
1369
1370#
1371# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1372#
1373
1374#
1375# may also be needed; see USB_STORAGE Help for more information
1376#
1377CONFIG_USB_STORAGE=y
1378# CONFIG_USB_STORAGE_DEBUG is not set
1379# CONFIG_USB_STORAGE_DATAFAB is not set
1380# CONFIG_USB_STORAGE_FREECOM is not set
1381# CONFIG_USB_STORAGE_ISD200 is not set
1382# CONFIG_USB_STORAGE_DPCM is not set
1383# CONFIG_USB_STORAGE_USBAT is not set
1384# CONFIG_USB_STORAGE_SDDR09 is not set
1385# CONFIG_USB_STORAGE_SDDR55 is not set
1386# CONFIG_USB_STORAGE_JUMPSHOT is not set
1387# CONFIG_USB_STORAGE_ALAUDA is not set
1388# CONFIG_USB_STORAGE_KARMA is not set
1389CONFIG_USB_LIBUSUAL=y
1390
1391#
1392# USB Imaging devices
1393#
1394# CONFIG_USB_MDC800 is not set
1395# CONFIG_USB_MICROTEK is not set
1396# CONFIG_USB_MON is not set
1397
1398#
1399# USB port drivers
1400#
1401
1402#
1403# USB Serial Converter support
1404#
1405# CONFIG_USB_SERIAL is not set
1406
1407#
1408# USB Miscellaneous drivers
1409#
1410# CONFIG_USB_EMI62 is not set
1411# CONFIG_USB_EMI26 is not set
1412# CONFIG_USB_ADUTUX is not set
1413# CONFIG_USB_AUERSWALD is not set
1414# CONFIG_USB_RIO500 is not set
1415# CONFIG_USB_LEGOTOWER is not set
1416# CONFIG_USB_LCD is not set
1417# CONFIG_USB_BERRY_CHARGE is not set
1418# CONFIG_USB_LED is not set
1419# CONFIG_USB_CYPRESS_CY7C63 is not set
1420# CONFIG_USB_CYTHERM is not set
1421# CONFIG_USB_PHIDGET is not set
1422# CONFIG_USB_IDMOUSE is not set
1423# CONFIG_USB_FTDI_ELAN is not set
1424# CONFIG_USB_APPLEDISPLAY is not set
1425# CONFIG_USB_SISUSBVGA is not set
1426# CONFIG_USB_LD is not set
1427# CONFIG_USB_TRANCEVIBRATOR is not set
1428# CONFIG_USB_IOWARRIOR is not set
1429# CONFIG_USB_TEST is not set
1430
1431#
1432# USB DSL modem support
1433#
1434
1435#
1436# USB Gadget Support
1437#
1438# CONFIG_USB_GADGET is not set
1439# CONFIG_MMC is not set
1440
1441#
1442# LED devices
1443#
1444# CONFIG_NEW_LEDS is not set
1445
1446#
1447# LED drivers
1448#
1449
1450#
1451# LED Triggers
1452#
1453
1454#
1455# InfiniBand support
1456#
1457# CONFIG_INFINIBAND is not set
1458
1459#
1460# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1461#
1462
1463#
1464# Real Time Clock
1465#
1466# CONFIG_RTC_CLASS is not set
1467
1468#
1469# DMA Engine support
1470#
1471# CONFIG_DMA_ENGINE is not set
1472
1473#
1474# DMA Clients
1475#
1476
1477#
1478# DMA Devices
1479#
1480
1481#
1482# File systems
1483#
1484CONFIG_EXT2_FS=y
1485# CONFIG_EXT2_FS_XATTR is not set
1486CONFIG_EXT2_FS_XIP=y
1487CONFIG_FS_XIP=y
1488CONFIG_EXT3_FS=y
1489# CONFIG_EXT3_FS_XATTR is not set
1490# CONFIG_EXT4DEV_FS is not set
1491CONFIG_JBD=y
1492# CONFIG_JBD_DEBUG is not set
1493CONFIG_REISERFS_FS=m
1494# CONFIG_REISERFS_CHECK is not set
1495# CONFIG_REISERFS_PROC_INFO is not set
1496# CONFIG_REISERFS_FS_XATTR is not set
1497# CONFIG_JFS_FS is not set
1498CONFIG_FS_POSIX_ACL=y
1499# CONFIG_XFS_FS is not set
1500# CONFIG_GFS2_FS is not set
1501# CONFIG_OCFS2_FS is not set
1502# CONFIG_MINIX_FS is not set
1503# CONFIG_ROMFS_FS is not set
1504CONFIG_INOTIFY=y
1505CONFIG_INOTIFY_USER=y
1506# CONFIG_QUOTA is not set
1507CONFIG_DNOTIFY=y
1508CONFIG_AUTOFS_FS=y
1509CONFIG_AUTOFS4_FS=y
1510CONFIG_FUSE_FS=y
1511
1512#
1513# CD-ROM/DVD Filesystems
1514#
1515CONFIG_ISO9660_FS=m
1516CONFIG_JOLIET=y
1517CONFIG_ZISOFS=y
1518CONFIG_UDF_FS=m
1519CONFIG_UDF_NLS=y
1520
1521#
1522# DOS/FAT/NT Filesystems
1523#
1524CONFIG_FAT_FS=m
1525CONFIG_MSDOS_FS=m
1526CONFIG_VFAT_FS=m
1527CONFIG_FAT_DEFAULT_CODEPAGE=936
1528CONFIG_FAT_DEFAULT_IOCHARSET="utf8"
1529CONFIG_NTFS_FS=m
1530# CONFIG_NTFS_DEBUG is not set
1531CONFIG_NTFS_RW=y
1532
1533#
1534# Pseudo filesystems
1535#
1536CONFIG_PROC_FS=y
1537CONFIG_PROC_KCORE=y
1538CONFIG_PROC_SYSCTL=y
1539CONFIG_SYSFS=y
1540CONFIG_TMPFS=y
1541# CONFIG_TMPFS_POSIX_ACL is not set
1542# CONFIG_HUGETLB_PAGE is not set
1543CONFIG_RAMFS=y
1544# CONFIG_CONFIGFS_FS is not set
1545
1546#
1547# Miscellaneous filesystems
1548#
1549# CONFIG_ADFS_FS is not set
1550# CONFIG_AFFS_FS is not set
1551# CONFIG_HFS_FS is not set
1552# CONFIG_HFSPLUS_FS is not set
1553# CONFIG_BEFS_FS is not set
1554# CONFIG_BFS_FS is not set
1555# CONFIG_EFS_FS is not set
1556# CONFIG_JFFS2_FS is not set
1557# CONFIG_CRAMFS is not set
1558# CONFIG_VXFS_FS is not set
1559# CONFIG_HPFS_FS is not set
1560# CONFIG_QNX4FS_FS is not set
1561# CONFIG_SYSV_FS is not set
1562# CONFIG_UFS_FS is not set
1563
1564#
1565# Network File Systems
1566#
1567CONFIG_NFS_FS=m
1568CONFIG_NFS_V3=y
1569CONFIG_NFS_V3_ACL=y
1570CONFIG_NFS_V4=y
1571CONFIG_NFS_DIRECTIO=y
1572CONFIG_NFSD=m
1573CONFIG_NFSD_V2_ACL=y
1574CONFIG_NFSD_V3=y
1575CONFIG_NFSD_V3_ACL=y
1576CONFIG_NFSD_V4=y
1577CONFIG_NFSD_TCP=y
1578CONFIG_LOCKD=m
1579CONFIG_LOCKD_V4=y
1580CONFIG_EXPORTFS=m
1581CONFIG_NFS_ACL_SUPPORT=m
1582CONFIG_NFS_COMMON=y
1583CONFIG_SUNRPC=m
1584CONFIG_SUNRPC_GSS=m
1585# CONFIG_SUNRPC_BIND34 is not set
1586CONFIG_RPCSEC_GSS_KRB5=m
1587# CONFIG_RPCSEC_GSS_SPKM3 is not set
1588CONFIG_SMB_FS=m
1589CONFIG_SMB_NLS_DEFAULT=y
1590CONFIG_SMB_NLS_REMOTE="cp936"
1591CONFIG_CIFS=m
1592CONFIG_CIFS_STATS=y
1593CONFIG_CIFS_STATS2=y
1594CONFIG_CIFS_WEAK_PW_HASH=y
1595CONFIG_CIFS_XATTR=y
1596CONFIG_CIFS_POSIX=y
1597CONFIG_CIFS_DEBUG2=y
1598CONFIG_CIFS_EXPERIMENTAL=y
1599# CONFIG_NCP_FS is not set
1600# CONFIG_CODA_FS is not set
1601# CONFIG_AFS_FS is not set
1602# CONFIG_9P_FS is not set
1603
1604#
1605# Partition Types
1606#
1607CONFIG_PARTITION_ADVANCED=y
1608# CONFIG_ACORN_PARTITION is not set
1609# CONFIG_OSF_PARTITION is not set
1610# CONFIG_AMIGA_PARTITION is not set
1611# CONFIG_ATARI_PARTITION is not set
1612# CONFIG_MAC_PARTITION is not set
1613CONFIG_MSDOS_PARTITION=y
1614# CONFIG_BSD_DISKLABEL is not set
1615# CONFIG_MINIX_SUBPARTITION is not set
1616# CONFIG_SOLARIS_X86_PARTITION is not set
1617# CONFIG_UNIXWARE_DISKLABEL is not set
1618# CONFIG_LDM_PARTITION is not set
1619# CONFIG_SGI_PARTITION is not set
1620# CONFIG_ULTRIX_PARTITION is not set
1621# CONFIG_SUN_PARTITION is not set
1622# CONFIG_KARMA_PARTITION is not set
1623# CONFIG_EFI_PARTITION is not set
1624# CONFIG_SYSV68_PARTITION is not set
1625
1626#
1627# Native Language Support
1628#
1629CONFIG_NLS=y
1630CONFIG_NLS_DEFAULT="utf8"
1631# CONFIG_NLS_CODEPAGE_437 is not set
1632# CONFIG_NLS_CODEPAGE_737 is not set
1633# CONFIG_NLS_CODEPAGE_775 is not set
1634# CONFIG_NLS_CODEPAGE_850 is not set
1635# CONFIG_NLS_CODEPAGE_852 is not set
1636# CONFIG_NLS_CODEPAGE_855 is not set
1637# CONFIG_NLS_CODEPAGE_857 is not set
1638# CONFIG_NLS_CODEPAGE_860 is not set
1639# CONFIG_NLS_CODEPAGE_861 is not set
1640# CONFIG_NLS_CODEPAGE_862 is not set
1641# CONFIG_NLS_CODEPAGE_863 is not set
1642# CONFIG_NLS_CODEPAGE_864 is not set
1643# CONFIG_NLS_CODEPAGE_865 is not set
1644# CONFIG_NLS_CODEPAGE_866 is not set
1645# CONFIG_NLS_CODEPAGE_869 is not set
1646CONFIG_NLS_CODEPAGE_936=y
1647# CONFIG_NLS_CODEPAGE_950 is not set
1648# CONFIG_NLS_CODEPAGE_932 is not set
1649# CONFIG_NLS_CODEPAGE_949 is not set
1650# CONFIG_NLS_CODEPAGE_874 is not set
1651# CONFIG_NLS_ISO8859_8 is not set
1652# CONFIG_NLS_CODEPAGE_1250 is not set
1653# CONFIG_NLS_CODEPAGE_1251 is not set
1654# CONFIG_NLS_ASCII is not set
1655CONFIG_NLS_ISO8859_1=y
1656# CONFIG_NLS_ISO8859_2 is not set
1657# CONFIG_NLS_ISO8859_3 is not set
1658# CONFIG_NLS_ISO8859_4 is not set
1659# CONFIG_NLS_ISO8859_5 is not set
1660# CONFIG_NLS_ISO8859_6 is not set
1661# CONFIG_NLS_ISO8859_7 is not set
1662# CONFIG_NLS_ISO8859_9 is not set
1663# CONFIG_NLS_ISO8859_13 is not set
1664# CONFIG_NLS_ISO8859_14 is not set
1665# CONFIG_NLS_ISO8859_15 is not set
1666# CONFIG_NLS_KOI8_R is not set
1667# CONFIG_NLS_KOI8_U is not set
1668CONFIG_NLS_UTF8=y
1669
1670#
1671# Distributed Lock Manager
1672#
1673# CONFIG_DLM is not set
1674
1675#
1676# Profiling support
1677#
1678CONFIG_PROFILING=y
1679CONFIG_OPROFILE=m
1680
1681#
1682# Kernel hacking
1683#
1684CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1685# CONFIG_PRINTK_TIME is not set
1686# CONFIG_ENABLE_MUST_CHECK is not set
1687# CONFIG_MAGIC_SYSRQ is not set
1688# CONFIG_UNUSED_SYMBOLS is not set
1689# CONFIG_DEBUG_FS is not set
1690# CONFIG_HEADERS_CHECK is not set
1691# CONFIG_DEBUG_KERNEL is not set
1692CONFIG_CROSSCOMPILE=y
1693CONFIG_CMDLINE=""
1694
1695#
1696# Security options
1697#
1698# CONFIG_KEYS is not set
1699# CONFIG_SECURITY is not set
1700
1701#
1702# Cryptographic options
1703#
1704CONFIG_CRYPTO=y
1705CONFIG_CRYPTO_ALGAPI=y
1706CONFIG_CRYPTO_BLKCIPHER=m
1707CONFIG_CRYPTO_HASH=y
1708CONFIG_CRYPTO_MANAGER=y
1709CONFIG_CRYPTO_HMAC=y
1710# CONFIG_CRYPTO_XCBC is not set
1711# CONFIG_CRYPTO_NULL is not set
1712# CONFIG_CRYPTO_MD4 is not set
1713CONFIG_CRYPTO_MD5=m
1714CONFIG_CRYPTO_SHA1=m
1715# CONFIG_CRYPTO_SHA256 is not set
1716# CONFIG_CRYPTO_SHA512 is not set
1717# CONFIG_CRYPTO_WP512 is not set
1718# CONFIG_CRYPTO_TGR192 is not set
1719# CONFIG_CRYPTO_GF128MUL is not set
1720CONFIG_CRYPTO_ECB=m
1721CONFIG_CRYPTO_CBC=m
1722CONFIG_CRYPTO_PCBC=m
1723# CONFIG_CRYPTO_LRW is not set
1724# CONFIG_CRYPTO_CRYPTD is not set
1725CONFIG_CRYPTO_DES=m
1726# CONFIG_CRYPTO_FCRYPT is not set
1727# CONFIG_CRYPTO_BLOWFISH is not set
1728# CONFIG_CRYPTO_TWOFISH is not set
1729# CONFIG_CRYPTO_SERPENT is not set
1730# CONFIG_CRYPTO_AES is not set
1731# CONFIG_CRYPTO_CAST5 is not set
1732# CONFIG_CRYPTO_CAST6 is not set
1733# CONFIG_CRYPTO_TEA is not set
1734CONFIG_CRYPTO_ARC4=m
1735# CONFIG_CRYPTO_KHAZAD is not set
1736# CONFIG_CRYPTO_ANUBIS is not set
1737CONFIG_CRYPTO_DEFLATE=m
1738# CONFIG_CRYPTO_MICHAEL_MIC is not set
1739# CONFIG_CRYPTO_CRC32C is not set
1740# CONFIG_CRYPTO_CAMELLIA is not set
1741# CONFIG_CRYPTO_TEST is not set
1742
1743#
1744# Hardware crypto devices
1745#
1746
1747#
1748# Library routines
1749#
1750CONFIG_BITREVERSE=y
1751CONFIG_CRC_CCITT=y
1752# CONFIG_CRC16 is not set
1753# CONFIG_CRC_ITU_T is not set
1754CONFIG_CRC32=y
1755# CONFIG_LIBCRC32C is not set
1756CONFIG_ZLIB_INFLATE=m
1757CONFIG_ZLIB_DEFLATE=m
1758CONFIG_TEXTSEARCH=y
1759CONFIG_TEXTSEARCH_KMP=m
1760CONFIG_TEXTSEARCH_BM=m
1761CONFIG_TEXTSEARCH_FSM=m
1762CONFIG_PLIST=y
1763CONFIG_HAS_IOMEM=y
1764CONFIG_HAS_IOPORT=y
1765CONFIG_HAS_DMA=y
diff --git a/arch/mips/configs/ip22_defconfig b/arch/mips/configs/ip22_defconfig
index 7ec618f3c8..405c9f505a 100644
--- a/arch/mips/configs/ip22_defconfig
+++ b/arch/mips/configs/ip22_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig
index 9ddc3eff47..a9dcbcf563 100644
--- a/arch/mips/configs/ip27_defconfig
+++ b/arch/mips/configs/ip27_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/ip32_defconfig b/arch/mips/configs/ip32_defconfig
index 8fc18809d5..a040459bec 100644
--- a/arch/mips/configs/ip32_defconfig
+++ b/arch/mips/configs/ip32_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/jazz_defconfig b/arch/mips/configs/jazz_defconfig
index 9331cb0a19..8a0b4ac528 100644
--- a/arch/mips/configs/jazz_defconfig
+++ b/arch/mips/configs/jazz_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29CONFIG_MACH_JAZZ=y 28CONFIG_MACH_JAZZ=y
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_MACH_JAZZ=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
@@ -245,7 +241,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
245# 241#
246CONFIG_ISA=y 242CONFIG_ISA=y
247CONFIG_MMU=y 243CONFIG_MMU=y
248CONFIG_I8253=y 244CONFIG_PCSPEAKER=y
249 245
250# 246#
251# PCCARD (PCMCIA/CardBus) support 247# PCCARD (PCMCIA/CardBus) support
diff --git a/arch/mips/configs/jmr3927_defconfig b/arch/mips/configs/jmr3927_defconfig
index 1b364cf691..9a25e770ab 100644
--- a/arch/mips/configs/jmr3927_defconfig
+++ b/arch/mips/configs/jmr3927_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/lasat200_defconfig b/arch/mips/configs/lasat200_defconfig
deleted file mode 100644
index fd4272c145..0000000000
--- a/arch/mips/configs/lasat200_defconfig
+++ /dev/null
@@ -1,1118 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Tue Feb 20 21:47:34 2007
5#
6CONFIG_MIPS=y
7
8#
9# Machine selection
10#
11CONFIG_ZONE_DMA=y
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set
30CONFIG_LASAT=y
31# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set
34# CONFIG_WR_PPMC is not set
35# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set
43# CONFIG_PNX8550_STB810 is not set
44# CONFIG_DDB5477 is not set
45# CONFIG_MACH_VR41XX is not set
46# CONFIG_PMC_YOSEMITE is not set
47# CONFIG_QEMU is not set
48# CONFIG_MARKEINS is not set
49# CONFIG_SGI_IP22 is not set
50# CONFIG_SGI_IP27 is not set
51# CONFIG_SGI_IP32 is not set
52# CONFIG_SIBYTE_BIGSUR is not set
53# CONFIG_SIBYTE_SWARM is not set
54# CONFIG_SIBYTE_SENTOSA is not set
55# CONFIG_SIBYTE_RHONE is not set
56# CONFIG_SIBYTE_CARMEL is not set
57# CONFIG_SIBYTE_PTSWARM is not set
58# CONFIG_SIBYTE_LITTLESUR is not set
59# CONFIG_SIBYTE_CRHINE is not set
60# CONFIG_SIBYTE_CRHONE is not set
61# CONFIG_SNI_RM is not set
62# CONFIG_TOSHIBA_JMR3927 is not set
63# CONFIG_TOSHIBA_RBTX4927 is not set
64# CONFIG_TOSHIBA_RBTX4938 is not set
65CONFIG_PICVUE=y
66CONFIG_PICVUE_PROC=y
67CONFIG_DS1603=y
68CONFIG_LASAT_SYSCTL=y
69CONFIG_RWSEM_GENERIC_SPINLOCK=y
70# CONFIG_ARCH_HAS_ILOG2_U32 is not set
71# CONFIG_ARCH_HAS_ILOG2_U64 is not set
72CONFIG_GENERIC_FIND_NEXT_BIT=y
73CONFIG_GENERIC_HWEIGHT=y
74CONFIG_GENERIC_CALIBRATE_DELAY=y
75CONFIG_GENERIC_TIME=y
76CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
77CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
78CONFIG_DMA_NONCOHERENT=y
79CONFIG_DMA_NEED_PCI_MAP_STATE=y
80CONFIG_MIPS_NILE4=y
81# CONFIG_CPU_BIG_ENDIAN is not set
82CONFIG_CPU_LITTLE_ENDIAN=y
83CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
84CONFIG_MIPS_GT64120=y
85CONFIG_MIPS_L1_CACHE_SHIFT=5
86
87#
88# CPU selection
89#
90# CONFIG_CPU_MIPS32_R1 is not set
91# CONFIG_CPU_MIPS32_R2 is not set
92# CONFIG_CPU_MIPS64_R1 is not set
93# CONFIG_CPU_MIPS64_R2 is not set
94# CONFIG_CPU_R3000 is not set
95# CONFIG_CPU_TX39XX is not set
96# CONFIG_CPU_VR41XX is not set
97# CONFIG_CPU_R4300 is not set
98# CONFIG_CPU_R4X00 is not set
99# CONFIG_CPU_TX49XX is not set
100CONFIG_CPU_R5000=y
101# CONFIG_CPU_R5432 is not set
102# CONFIG_CPU_R6000 is not set
103# CONFIG_CPU_NEVADA is not set
104# CONFIG_CPU_R8000 is not set
105# CONFIG_CPU_R10000 is not set
106# CONFIG_CPU_RM7000 is not set
107# CONFIG_CPU_RM9000 is not set
108# CONFIG_CPU_SB1 is not set
109CONFIG_SYS_HAS_CPU_R5000=y
110CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
111CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
112CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
113CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
114
115#
116# Kernel type
117#
118CONFIG_32BIT=y
119# CONFIG_64BIT is not set
120CONFIG_PAGE_SIZE_4KB=y
121# CONFIG_PAGE_SIZE_8KB is not set
122# CONFIG_PAGE_SIZE_16KB is not set
123# CONFIG_PAGE_SIZE_64KB is not set
124CONFIG_BOARD_SCACHE=y
125CONFIG_R5000_CPU_SCACHE=y
126CONFIG_MIPS_MT_DISABLED=y
127# CONFIG_MIPS_MT_SMP is not set
128# CONFIG_MIPS_MT_SMTC is not set
129# CONFIG_MIPS_VPE_LOADER is not set
130# CONFIG_64BIT_PHYS_ADDR is not set
131CONFIG_CPU_HAS_LLSC=y
132CONFIG_CPU_HAS_SYNC=y
133CONFIG_GENERIC_HARDIRQS=y
134CONFIG_GENERIC_IRQ_PROBE=y
135CONFIG_ARCH_FLATMEM_ENABLE=y
136CONFIG_SELECT_MEMORY_MODEL=y
137CONFIG_FLATMEM_MANUAL=y
138# CONFIG_DISCONTIGMEM_MANUAL is not set
139# CONFIG_SPARSEMEM_MANUAL is not set
140CONFIG_FLATMEM=y
141CONFIG_FLAT_NODE_MEM_MAP=y
142# CONFIG_SPARSEMEM_STATIC is not set
143CONFIG_SPLIT_PTLOCK_CPUS=4
144# CONFIG_RESOURCES_64BIT is not set
145CONFIG_ZONE_DMA_FLAG=1
146# CONFIG_HZ_48 is not set
147# CONFIG_HZ_100 is not set
148# CONFIG_HZ_128 is not set
149# CONFIG_HZ_250 is not set
150# CONFIG_HZ_256 is not set
151CONFIG_HZ_1000=y
152# CONFIG_HZ_1024 is not set
153CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
154CONFIG_HZ=1000
155CONFIG_PREEMPT_NONE=y
156# CONFIG_PREEMPT_VOLUNTARY is not set
157# CONFIG_PREEMPT is not set
158# CONFIG_KEXEC is not set
159CONFIG_LOCKDEP_SUPPORT=y
160CONFIG_STACKTRACE_SUPPORT=y
161CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
162
163#
164# Code maturity level options
165#
166CONFIG_EXPERIMENTAL=y
167CONFIG_BROKEN_ON_SMP=y
168CONFIG_INIT_ENV_ARG_LIMIT=32
169
170#
171# General setup
172#
173CONFIG_LOCALVERSION=""
174CONFIG_LOCALVERSION_AUTO=y
175CONFIG_SWAP=y
176CONFIG_SYSVIPC=y
177# CONFIG_IPC_NS is not set
178CONFIG_SYSVIPC_SYSCTL=y
179# CONFIG_POSIX_MQUEUE is not set
180# CONFIG_BSD_PROCESS_ACCT is not set
181# CONFIG_TASKSTATS is not set
182# CONFIG_UTS_NS is not set
183# CONFIG_AUDIT is not set
184# CONFIG_IKCONFIG is not set
185CONFIG_SYSFS_DEPRECATED=y
186CONFIG_RELAY=y
187# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
188CONFIG_SYSCTL=y
189CONFIG_EMBEDDED=y
190CONFIG_SYSCTL_SYSCALL=y
191CONFIG_KALLSYMS=y
192# CONFIG_KALLSYMS_EXTRA_PASS is not set
193CONFIG_HOTPLUG=y
194CONFIG_PRINTK=y
195CONFIG_BUG=y
196CONFIG_ELF_CORE=y
197CONFIG_BASE_FULL=y
198CONFIG_FUTEX=y
199CONFIG_EPOLL=y
200CONFIG_SHMEM=y
201CONFIG_SLAB=y
202CONFIG_VM_EVENT_COUNTERS=y
203CONFIG_RT_MUTEXES=y
204# CONFIG_TINY_SHMEM is not set
205CONFIG_BASE_SMALL=0
206# CONFIG_SLOB is not set
207
208#
209# Loadable module support
210#
211CONFIG_MODULES=y
212CONFIG_MODULE_UNLOAD=y
213# CONFIG_MODULE_FORCE_UNLOAD is not set
214CONFIG_MODVERSIONS=y
215CONFIG_MODULE_SRCVERSION_ALL=y
216CONFIG_KMOD=y
217
218#
219# Block layer
220#
221CONFIG_BLOCK=y
222# CONFIG_LBD is not set
223# CONFIG_BLK_DEV_IO_TRACE is not set
224# CONFIG_LSF is not set
225
226#
227# IO Schedulers
228#
229CONFIG_IOSCHED_NOOP=y
230CONFIG_IOSCHED_AS=y
231CONFIG_IOSCHED_DEADLINE=y
232CONFIG_IOSCHED_CFQ=y
233CONFIG_DEFAULT_AS=y
234# CONFIG_DEFAULT_DEADLINE is not set
235# CONFIG_DEFAULT_CFQ is not set
236# CONFIG_DEFAULT_NOOP is not set
237CONFIG_DEFAULT_IOSCHED="anticipatory"
238
239#
240# Bus options (PCI, PCMCIA, EISA, ISA, TC)
241#
242CONFIG_HW_HAS_PCI=y
243CONFIG_PCI=y
244CONFIG_MMU=y
245
246#
247# PCCARD (PCMCIA/CardBus) support
248#
249# CONFIG_PCCARD is not set
250
251#
252# PCI Hotplug Support
253#
254# CONFIG_HOTPLUG_PCI is not set
255
256#
257# Executable file formats
258#
259CONFIG_BINFMT_ELF=y
260# CONFIG_BINFMT_MISC is not set
261CONFIG_TRAD_SIGNALS=y
262
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#
272# Networking
273#
274CONFIG_NET=y
275
276#
277# Networking options
278#
279# CONFIG_NETDEBUG is not set
280# CONFIG_PACKET is not set
281CONFIG_UNIX=y
282CONFIG_XFRM=y
283CONFIG_XFRM_USER=m
284# CONFIG_XFRM_SUB_POLICY is not set
285CONFIG_XFRM_MIGRATE=y
286CONFIG_NET_KEY=y
287CONFIG_NET_KEY_MIGRATE=y
288CONFIG_INET=y
289# CONFIG_IP_MULTICAST is not set
290# CONFIG_IP_ADVANCED_ROUTER is not set
291CONFIG_IP_FIB_HASH=y
292# CONFIG_IP_PNP is not set
293# CONFIG_NET_IPIP is not set
294# CONFIG_NET_IPGRE is not set
295# CONFIG_ARPD is not set
296# CONFIG_SYN_COOKIES is not set
297# CONFIG_INET_AH is not set
298# CONFIG_INET_ESP is not set
299# CONFIG_INET_IPCOMP is not set
300# CONFIG_INET_XFRM_TUNNEL is not set
301# CONFIG_INET_TUNNEL is not set
302CONFIG_INET_XFRM_MODE_TRANSPORT=m
303CONFIG_INET_XFRM_MODE_TUNNEL=m
304CONFIG_INET_XFRM_MODE_BEET=m
305CONFIG_INET_DIAG=y
306CONFIG_INET_TCP_DIAG=y
307# CONFIG_TCP_CONG_ADVANCED is not set
308CONFIG_TCP_CONG_CUBIC=y
309CONFIG_DEFAULT_TCP_CONG="cubic"
310CONFIG_TCP_MD5SIG=y
311# CONFIG_IPV6 is not set
312# CONFIG_INET6_XFRM_TUNNEL is not set
313# CONFIG_INET6_TUNNEL is not set
314CONFIG_NETWORK_SECMARK=y
315# CONFIG_NETFILTER 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
355CONFIG_IEEE80211=m
356# CONFIG_IEEE80211_DEBUG is not set
357CONFIG_IEEE80211_CRYPT_WEP=m
358CONFIG_IEEE80211_CRYPT_CCMP=m
359CONFIG_IEEE80211_SOFTMAC=m
360# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
361CONFIG_WIRELESS_EXT=y
362
363#
364# Device Drivers
365#
366
367#
368# Generic Driver Options
369#
370CONFIG_STANDALONE=y
371CONFIG_PREVENT_FIRMWARE_BUILD=y
372CONFIG_FW_LOADER=m
373# CONFIG_SYS_HYPERVISOR is not set
374
375#
376# Connector - unified userspace <-> kernelspace linker
377#
378CONFIG_CONNECTOR=m
379
380#
381# Memory Technology Devices (MTD)
382#
383CONFIG_MTD=y
384# CONFIG_MTD_DEBUG is not set
385# CONFIG_MTD_CONCAT is not set
386CONFIG_MTD_PARTITIONS=y
387# CONFIG_MTD_REDBOOT_PARTS is not set
388# CONFIG_MTD_CMDLINE_PARTS is not set
389
390#
391# User Modules And Translation Layers
392#
393CONFIG_MTD_CHAR=y
394CONFIG_MTD_BLKDEVS=y
395CONFIG_MTD_BLOCK=y
396# CONFIG_FTL is not set
397# CONFIG_NFTL is not set
398# CONFIG_INFTL is not set
399# CONFIG_RFD_FTL is not set
400# CONFIG_SSFDC is not set
401
402#
403# RAM/ROM/Flash chip drivers
404#
405CONFIG_MTD_CFI=y
406# CONFIG_MTD_JEDECPROBE is not set
407CONFIG_MTD_GEN_PROBE=y
408# CONFIG_MTD_CFI_ADV_OPTIONS is not set
409CONFIG_MTD_MAP_BANK_WIDTH_1=y
410CONFIG_MTD_MAP_BANK_WIDTH_2=y
411CONFIG_MTD_MAP_BANK_WIDTH_4=y
412# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
413# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
414# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
415CONFIG_MTD_CFI_I1=y
416CONFIG_MTD_CFI_I2=y
417# CONFIG_MTD_CFI_I4 is not set
418# CONFIG_MTD_CFI_I8 is not set
419# CONFIG_MTD_CFI_INTELEXT is not set
420CONFIG_MTD_CFI_AMDSTD=y
421# CONFIG_MTD_CFI_STAA is not set
422CONFIG_MTD_CFI_UTIL=y
423# CONFIG_MTD_RAM is not set
424# CONFIG_MTD_ROM is not set
425# CONFIG_MTD_ABSENT is not set
426# CONFIG_MTD_OBSOLETE_CHIPS is not set
427
428#
429# Mapping drivers for chip access
430#
431# CONFIG_MTD_COMPLEX_MAPPINGS is not set
432# CONFIG_MTD_PHYSMAP is not set
433CONFIG_MTD_LASAT=y
434# CONFIG_MTD_PLATRAM is not set
435
436#
437# Self-contained MTD device drivers
438#
439# CONFIG_MTD_PMC551 is not set
440# CONFIG_MTD_SLRAM is not set
441# CONFIG_MTD_PHRAM is not set
442# CONFIG_MTD_MTDRAM is not set
443# CONFIG_MTD_BLOCK2MTD is not set
444
445#
446# Disk-On-Chip Device Drivers
447#
448# CONFIG_MTD_DOC2000 is not set
449# CONFIG_MTD_DOC2001 is not set
450# CONFIG_MTD_DOC2001PLUS is not set
451
452#
453# NAND Flash Device Drivers
454#
455# CONFIG_MTD_NAND is not set
456
457#
458# OneNAND Flash Device Drivers
459#
460# CONFIG_MTD_ONENAND is not set
461
462#
463# Parallel port support
464#
465# CONFIG_PARPORT is not set
466
467#
468# Plug and Play support
469#
470# CONFIG_PNPACPI is not set
471
472#
473# Block devices
474#
475# CONFIG_BLK_CPQ_DA is not set
476# CONFIG_BLK_CPQ_CISS_DA is not set
477# CONFIG_BLK_DEV_DAC960 is not set
478# CONFIG_BLK_DEV_UMEM is not set
479# CONFIG_BLK_DEV_COW_COMMON is not set
480# CONFIG_BLK_DEV_LOOP is not set
481# CONFIG_BLK_DEV_NBD is not set
482# CONFIG_BLK_DEV_SX8 is not set
483# CONFIG_BLK_DEV_RAM is not set
484# CONFIG_BLK_DEV_INITRD is not set
485CONFIG_CDROM_PKTCDVD=m
486CONFIG_CDROM_PKTCDVD_BUFFERS=8
487# CONFIG_CDROM_PKTCDVD_WCACHE is not set
488CONFIG_ATA_OVER_ETH=m
489
490#
491# Misc devices
492#
493CONFIG_SGI_IOC4=m
494# CONFIG_TIFM_CORE is not set
495
496#
497# ATA/ATAPI/MFM/RLL support
498#
499CONFIG_IDE=y
500CONFIG_IDE_MAX_HWIFS=4
501CONFIG_BLK_DEV_IDE=y
502
503#
504# Please see Documentation/ide.txt for help/info on IDE drives
505#
506# CONFIG_BLK_DEV_IDE_SATA is not set
507CONFIG_BLK_DEV_IDEDISK=y
508CONFIG_IDEDISK_MULTI_MODE=y
509# CONFIG_BLK_DEV_IDECD is not set
510# CONFIG_BLK_DEV_IDETAPE is not set
511# CONFIG_BLK_DEV_IDEFLOPPY is not set
512# CONFIG_IDE_TASK_IOCTL is not set
513
514#
515# IDE chipset support/bugfixes
516#
517CONFIG_IDE_GENERIC=y
518CONFIG_BLK_DEV_IDEPCI=y
519# CONFIG_IDEPCI_SHARE_IRQ is not set
520# CONFIG_BLK_DEV_OFFBOARD is not set
521CONFIG_BLK_DEV_GENERIC=y
522# CONFIG_BLK_DEV_OPTI621 is not set
523CONFIG_BLK_DEV_IDEDMA_PCI=y
524# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
525CONFIG_IDEDMA_PCI_AUTO=y
526# CONFIG_IDEDMA_ONLYDISK is not set
527# CONFIG_BLK_DEV_AEC62XX is not set
528# CONFIG_BLK_DEV_ALI15X3 is not set
529# CONFIG_BLK_DEV_AMD74XX is not set
530CONFIG_BLK_DEV_CMD64X=y
531# CONFIG_BLK_DEV_TRIFLEX is not set
532# CONFIG_BLK_DEV_CY82C693 is not set
533# CONFIG_BLK_DEV_CS5520 is not set
534# CONFIG_BLK_DEV_CS5530 is not set
535# CONFIG_BLK_DEV_HPT34X is not set
536# CONFIG_BLK_DEV_HPT366 is not set
537# CONFIG_BLK_DEV_JMICRON is not set
538# CONFIG_BLK_DEV_SC1200 is not set
539# CONFIG_BLK_DEV_PIIX is not set
540CONFIG_BLK_DEV_IT8213=m
541# CONFIG_BLK_DEV_IT821X is not set
542# CONFIG_BLK_DEV_NS87415 is not set
543# CONFIG_BLK_DEV_PDC202XX_OLD is not set
544# CONFIG_BLK_DEV_PDC202XX_NEW is not set
545# CONFIG_BLK_DEV_SVWKS is not set
546# CONFIG_BLK_DEV_SIIMAGE is not set
547# CONFIG_BLK_DEV_SLC90E66 is not set
548# CONFIG_BLK_DEV_TRM290 is not set
549# CONFIG_BLK_DEV_VIA82CXXX is not set
550CONFIG_BLK_DEV_TC86C001=m
551# CONFIG_IDE_ARM is not set
552CONFIG_BLK_DEV_IDEDMA=y
553# CONFIG_IDEDMA_IVB is not set
554CONFIG_IDEDMA_AUTO=y
555# CONFIG_BLK_DEV_HD is not set
556
557#
558# SCSI device support
559#
560CONFIG_RAID_ATTRS=m
561# CONFIG_SCSI is not set
562# CONFIG_SCSI_NETLINK is not set
563
564#
565# Serial ATA (prod) and Parallel ATA (experimental) drivers
566#
567# CONFIG_ATA is not set
568
569#
570# Multi-device support (RAID and LVM)
571#
572# CONFIG_MD is not set
573
574#
575# Fusion MPT device support
576#
577# CONFIG_FUSION is not set
578
579#
580# IEEE 1394 (FireWire) support
581#
582# CONFIG_IEEE1394 is not set
583
584#
585# I2O device support
586#
587# CONFIG_I2O is not set
588
589#
590# Network device support
591#
592CONFIG_NETDEVICES=y
593# CONFIG_DUMMY is not set
594# CONFIG_BONDING is not set
595# CONFIG_EQUALIZER is not set
596# CONFIG_TUN is not set
597
598#
599# ARCnet devices
600#
601# CONFIG_ARCNET is not set
602
603#
604# PHY device support
605#
606CONFIG_PHYLIB=m
607
608#
609# MII PHY device drivers
610#
611CONFIG_MARVELL_PHY=m
612CONFIG_DAVICOM_PHY=m
613CONFIG_QSEMI_PHY=m
614CONFIG_LXT_PHY=m
615CONFIG_CICADA_PHY=m
616CONFIG_VITESSE_PHY=m
617CONFIG_SMSC_PHY=m
618# CONFIG_BROADCOM_PHY is not set
619# CONFIG_FIXED_PHY is not set
620
621#
622# Ethernet (10 or 100Mbit)
623#
624CONFIG_NET_ETHERNET=y
625# CONFIG_MII is not set
626# CONFIG_HAPPYMEAL is not set
627# CONFIG_SUNGEM is not set
628# CONFIG_CASSINI is not set
629# CONFIG_NET_VENDOR_3COM is not set
630# CONFIG_DM9000 is not set
631
632#
633# Tulip family network device support
634#
635# CONFIG_NET_TULIP is not set
636# CONFIG_HP100 is not set
637# CONFIG_NET_PCI is not set
638
639#
640# Ethernet (1000 Mbit)
641#
642# CONFIG_ACENIC is not set
643# CONFIG_DL2K is not set
644# CONFIG_E1000 is not set
645# CONFIG_NS83820 is not set
646# CONFIG_HAMACHI is not set
647# CONFIG_YELLOWFIN is not set
648# CONFIG_R8169 is not set
649# CONFIG_SIS190 is not set
650# CONFIG_SKGE is not set
651# CONFIG_SKY2 is not set
652# CONFIG_SK98LIN is not set
653# CONFIG_TIGON3 is not set
654# CONFIG_BNX2 is not set
655CONFIG_QLA3XXX=m
656# CONFIG_ATL1 is not set
657
658#
659# Ethernet (10000 Mbit)
660#
661# CONFIG_CHELSIO_T1 is not set
662CONFIG_CHELSIO_T3=m
663# CONFIG_IXGB is not set
664# CONFIG_S2IO is not set
665# CONFIG_MYRI10GE is not set
666CONFIG_NETXEN_NIC=m
667
668#
669# Token Ring devices
670#
671# CONFIG_TR is not set
672
673#
674# Wireless LAN (non-hamradio)
675#
676# CONFIG_NET_RADIO is not set
677
678#
679# Wan interfaces
680#
681# CONFIG_WAN is not set
682# CONFIG_FDDI is not set
683# CONFIG_HIPPI is not set
684# CONFIG_PPP is not set
685# CONFIG_SLIP is not set
686# CONFIG_SHAPER is not set
687# CONFIG_NETCONSOLE is not set
688# CONFIG_NETPOLL is not set
689# CONFIG_NET_POLL_CONTROLLER is not set
690
691#
692# ISDN subsystem
693#
694# CONFIG_ISDN is not set
695
696#
697# Telephony Support
698#
699# CONFIG_PHONE is not set
700
701#
702# Input device support
703#
704CONFIG_INPUT=y
705# CONFIG_INPUT_FF_MEMLESS is not set
706
707#
708# Userland interfaces
709#
710CONFIG_INPUT_MOUSEDEV=y
711CONFIG_INPUT_MOUSEDEV_PSAUX=y
712CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
713CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
714# CONFIG_INPUT_JOYDEV is not set
715# CONFIG_INPUT_TSDEV is not set
716# CONFIG_INPUT_EVDEV is not set
717# CONFIG_INPUT_EVBUG is not set
718
719#
720# Input Device Drivers
721#
722# CONFIG_INPUT_KEYBOARD is not set
723# CONFIG_INPUT_MOUSE is not set
724# CONFIG_INPUT_JOYSTICK is not set
725# CONFIG_INPUT_TOUCHSCREEN is not set
726# CONFIG_INPUT_MISC is not set
727
728#
729# Hardware I/O ports
730#
731CONFIG_SERIO=y
732CONFIG_SERIO_I8042=y
733CONFIG_SERIO_SERPORT=y
734# CONFIG_SERIO_PCIPS2 is not set
735# CONFIG_SERIO_LIBPS2 is not set
736CONFIG_SERIO_RAW=m
737# CONFIG_GAMEPORT is not set
738
739#
740# Character devices
741#
742CONFIG_VT=y
743CONFIG_VT_CONSOLE=y
744CONFIG_HW_CONSOLE=y
745CONFIG_VT_HW_CONSOLE_BINDING=y
746# CONFIG_SERIAL_NONSTANDARD is not set
747
748#
749# Serial drivers
750#
751CONFIG_SERIAL_8250=y
752CONFIG_SERIAL_8250_CONSOLE=y
753CONFIG_SERIAL_8250_PCI=y
754CONFIG_SERIAL_8250_NR_UARTS=4
755CONFIG_SERIAL_8250_RUNTIME_UARTS=4
756# CONFIG_SERIAL_8250_EXTENDED is not set
757
758#
759# Non-8250 serial port support
760#
761CONFIG_SERIAL_CORE=y
762CONFIG_SERIAL_CORE_CONSOLE=y
763# CONFIG_SERIAL_JSM is not set
764CONFIG_UNIX98_PTYS=y
765CONFIG_LEGACY_PTYS=y
766CONFIG_LEGACY_PTY_COUNT=256
767
768#
769# IPMI
770#
771# CONFIG_IPMI_HANDLER is not set
772
773#
774# Watchdog Cards
775#
776# CONFIG_WATCHDOG is not set
777# CONFIG_HW_RANDOM is not set
778# CONFIG_RTC is not set
779# CONFIG_GEN_RTC is not set
780# CONFIG_DTLK is not set
781# CONFIG_R3964 is not set
782# CONFIG_APPLICOM 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#
794# CONFIG_I2C is not set
795
796#
797# SPI support
798#
799# CONFIG_SPI is not set
800# CONFIG_SPI_MASTER is not set
801
802#
803# Dallas's 1-wire bus
804#
805# CONFIG_W1 is not set
806
807#
808# Hardware Monitoring support
809#
810# CONFIG_HWMON is not set
811# CONFIG_HWMON_VID is not set
812
813#
814# Multimedia devices
815#
816# CONFIG_VIDEO_DEV is not set
817
818#
819# Digital Video Broadcasting Devices
820#
821# CONFIG_DVB is not set
822
823#
824# Graphics support
825#
826# CONFIG_FIRMWARE_EDID is not set
827# CONFIG_FB is not set
828
829#
830# Console display driver support
831#
832# CONFIG_VGA_CONSOLE is not set
833CONFIG_DUMMY_CONSOLE=y
834# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
835
836#
837# Sound
838#
839# CONFIG_SOUND is not set
840
841#
842# HID Devices
843#
844# CONFIG_HID is not set
845
846#
847# USB support
848#
849CONFIG_USB_ARCH_HAS_HCD=y
850CONFIG_USB_ARCH_HAS_OHCI=y
851CONFIG_USB_ARCH_HAS_EHCI=y
852# CONFIG_USB is not set
853
854#
855# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
856#
857
858#
859# USB Gadget Support
860#
861# CONFIG_USB_GADGET is not set
862
863#
864# MMC/SD Card support
865#
866# CONFIG_MMC is not set
867
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#
882# InfiniBand support
883#
884# CONFIG_INFINIBAND is not set
885
886#
887# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
888#
889
890#
891# Real Time Clock
892#
893# CONFIG_RTC_CLASS is not set
894
895#
896# DMA Engine support
897#
898# CONFIG_DMA_ENGINE is not set
899
900#
901# DMA Clients
902#
903
904#
905# DMA Devices
906#
907
908#
909# Auxiliary Display support
910#
911
912#
913# Virtualization
914#
915
916#
917# File systems
918#
919CONFIG_EXT2_FS=y
920# CONFIG_EXT2_FS_XATTR is not set
921# CONFIG_EXT2_FS_XIP is not set
922CONFIG_EXT3_FS=y
923CONFIG_EXT3_FS_XATTR=y
924# CONFIG_EXT3_FS_POSIX_ACL is not set
925CONFIG_EXT3_FS_SECURITY=y
926# CONFIG_EXT4DEV_FS is not set
927CONFIG_JBD=y
928# CONFIG_JBD_DEBUG is not set
929CONFIG_FS_MBCACHE=y
930# CONFIG_REISERFS_FS is not set
931# CONFIG_JFS_FS is not set
932CONFIG_FS_POSIX_ACL=y
933# CONFIG_XFS_FS is not set
934# CONFIG_GFS2_FS is not set
935# CONFIG_OCFS2_FS is not set
936# CONFIG_MINIX_FS is not set
937# CONFIG_ROMFS_FS is not set
938CONFIG_INOTIFY=y
939CONFIG_INOTIFY_USER=y
940# CONFIG_QUOTA is not set
941CONFIG_DNOTIFY=y
942# CONFIG_AUTOFS_FS is not set
943# CONFIG_AUTOFS4_FS is not set
944CONFIG_FUSE_FS=m
945CONFIG_GENERIC_ACL=y
946
947#
948# CD-ROM/DVD Filesystems
949#
950# CONFIG_ISO9660_FS is not set
951# CONFIG_UDF_FS is not set
952
953#
954# DOS/FAT/NT Filesystems
955#
956# CONFIG_MSDOS_FS is not set
957# CONFIG_VFAT_FS is not set
958# CONFIG_NTFS_FS is not set
959
960#
961# Pseudo filesystems
962#
963CONFIG_PROC_FS=y
964CONFIG_PROC_KCORE=y
965CONFIG_PROC_SYSCTL=y
966CONFIG_SYSFS=y
967CONFIG_TMPFS=y
968CONFIG_TMPFS_POSIX_ACL=y
969# CONFIG_HUGETLB_PAGE is not set
970CONFIG_RAMFS=y
971CONFIG_CONFIGFS_FS=m
972
973#
974# Miscellaneous filesystems
975#
976# CONFIG_ADFS_FS is not set
977# CONFIG_AFFS_FS is not set
978# CONFIG_ECRYPT_FS is not set
979# CONFIG_HFS_FS is not set
980# CONFIG_HFSPLUS_FS is not set
981# CONFIG_BEFS_FS is not set
982# CONFIG_BFS_FS is not set
983# CONFIG_EFS_FS is not set
984# CONFIG_JFFS2_FS is not set
985# CONFIG_CRAMFS is not set
986# CONFIG_VXFS_FS is not set
987# CONFIG_HPFS_FS is not set
988# CONFIG_QNX4FS_FS is not set
989# CONFIG_SYSV_FS is not set
990# CONFIG_UFS_FS is not set
991
992#
993# Network File Systems
994#
995CONFIG_NFS_FS=y
996CONFIG_NFS_V3=y
997# CONFIG_NFS_V3_ACL is not set
998# CONFIG_NFS_V4 is not set
999# CONFIG_NFS_DIRECTIO is not set
1000# CONFIG_NFSD is not set
1001CONFIG_LOCKD=y
1002CONFIG_LOCKD_V4=y
1003CONFIG_NFS_COMMON=y
1004CONFIG_SUNRPC=y
1005# CONFIG_RPCSEC_GSS_KRB5 is not set
1006# CONFIG_RPCSEC_GSS_SPKM3 is not set
1007# CONFIG_SMB_FS is not set
1008# CONFIG_CIFS is not set
1009# CONFIG_NCP_FS is not set
1010# CONFIG_CODA_FS is not set
1011# CONFIG_AFS_FS is not set
1012# CONFIG_9P_FS is not set
1013
1014#
1015# Partition Types
1016#
1017# CONFIG_PARTITION_ADVANCED is not set
1018CONFIG_MSDOS_PARTITION=y
1019
1020#
1021# Native Language Support
1022#
1023# CONFIG_NLS is not set
1024
1025#
1026# Distributed Lock Manager
1027#
1028CONFIG_DLM=m
1029CONFIG_DLM_TCP=y
1030# CONFIG_DLM_SCTP is not set
1031# CONFIG_DLM_DEBUG is not set
1032
1033#
1034# Profiling support
1035#
1036# CONFIG_PROFILING is not set
1037
1038#
1039# Kernel hacking
1040#
1041CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1042# CONFIG_PRINTK_TIME is not set
1043CONFIG_ENABLE_MUST_CHECK=y
1044# CONFIG_MAGIC_SYSRQ is not set
1045# CONFIG_UNUSED_SYMBOLS is not set
1046# CONFIG_DEBUG_FS is not set
1047# CONFIG_HEADERS_CHECK is not set
1048# CONFIG_DEBUG_KERNEL is not set
1049CONFIG_LOG_BUF_SHIFT=14
1050CONFIG_CROSSCOMPILE=y
1051CONFIG_CMDLINE=""
1052
1053#
1054# Security options
1055#
1056CONFIG_KEYS=y
1057CONFIG_KEYS_DEBUG_PROC_KEYS=y
1058# CONFIG_SECURITY is not set
1059
1060#
1061# Cryptographic options
1062#
1063CONFIG_CRYPTO=y
1064CONFIG_CRYPTO_ALGAPI=y
1065CONFIG_CRYPTO_BLKCIPHER=m
1066CONFIG_CRYPTO_HASH=y
1067CONFIG_CRYPTO_MANAGER=y
1068CONFIG_CRYPTO_HMAC=y
1069CONFIG_CRYPTO_XCBC=m
1070CONFIG_CRYPTO_NULL=m
1071CONFIG_CRYPTO_MD4=m
1072CONFIG_CRYPTO_MD5=y
1073CONFIG_CRYPTO_SHA1=m
1074CONFIG_CRYPTO_SHA256=m
1075CONFIG_CRYPTO_SHA512=m
1076CONFIG_CRYPTO_WP512=m
1077CONFIG_CRYPTO_TGR192=m
1078CONFIG_CRYPTO_GF128MUL=m
1079CONFIG_CRYPTO_ECB=m
1080CONFIG_CRYPTO_CBC=m
1081CONFIG_CRYPTO_PCBC=m
1082CONFIG_CRYPTO_LRW=m
1083CONFIG_CRYPTO_DES=m
1084CONFIG_CRYPTO_FCRYPT=m
1085CONFIG_CRYPTO_BLOWFISH=m
1086CONFIG_CRYPTO_TWOFISH=m
1087CONFIG_CRYPTO_TWOFISH_COMMON=m
1088CONFIG_CRYPTO_SERPENT=m
1089CONFIG_CRYPTO_AES=m
1090CONFIG_CRYPTO_CAST5=m
1091CONFIG_CRYPTO_CAST6=m
1092CONFIG_CRYPTO_TEA=m
1093CONFIG_CRYPTO_ARC4=m
1094CONFIG_CRYPTO_KHAZAD=m
1095CONFIG_CRYPTO_ANUBIS=m
1096CONFIG_CRYPTO_DEFLATE=m
1097CONFIG_CRYPTO_MICHAEL_MIC=m
1098CONFIG_CRYPTO_CRC32C=m
1099CONFIG_CRYPTO_CAMELLIA=m
1100# CONFIG_CRYPTO_TEST is not set
1101
1102#
1103# Hardware crypto devices
1104#
1105
1106#
1107# Library routines
1108#
1109CONFIG_BITREVERSE=y
1110# CONFIG_CRC_CCITT is not set
1111CONFIG_CRC16=m
1112CONFIG_CRC32=y
1113CONFIG_LIBCRC32C=m
1114CONFIG_ZLIB_INFLATE=m
1115CONFIG_ZLIB_DEFLATE=m
1116CONFIG_PLIST=y
1117CONFIG_HAS_IOMEM=y
1118CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig
index 1f64d7632a..546cb243fd 100644
--- a/arch/mips/configs/malta_defconfig
+++ b/arch/mips/configs/malta_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32CONFIG_MIPS_MALTA=y 30CONFIG_MIPS_MALTA=y
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_MIPS_MALTA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/mipssim_defconfig b/arch/mips/configs/mipssim_defconfig
index a2db5c2012..6abad6f883 100644
--- a/arch/mips/configs/mipssim_defconfig
+++ b/arch/mips/configs/mipssim_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35CONFIG_MIPS_SIM=y 33CONFIG_MIPS_SIM=y
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
@@ -496,36 +492,23 @@ CONFIG_NETDEVICES=y
496# CONFIG_BONDING is not set 492# CONFIG_BONDING is not set
497# CONFIG_EQUALIZER is not set 493# CONFIG_EQUALIZER is not set
498# CONFIG_TUN is not set 494# CONFIG_TUN is not set
499 495# CONFIG_PHYLIB is not set
500#
501# PHY device support
502#
503 496
504# 497#
505# Ethernet (10 or 100Mbit) 498# Ethernet (10 or 100Mbit)
506# 499#
507# CONFIG_NET_ETHERNET is not set 500CONFIG_NET_ETHERNET=y
508 501# CONFIG_MII is not set
509# 502CONFIG_MIPS_SIM_NET=y
510# Ethernet (1000 Mbit) 503# CONFIG_DM9000 is not set
511# 504# CONFIG_NETDEV_1000 is not set
512 505# CONFIG_NETDEV_10000 is not set
513#
514# Ethernet (10000 Mbit)
515#
516
517#
518# Token Ring devices
519#
520
521#
522# Wireless LAN (non-hamradio)
523#
524# CONFIG_NET_RADIO is not set
525 506
526# 507#
527# Wan interfaces 508# Wireless LAN
528# 509#
510# CONFIG_WLAN_PRE80211 is not set
511# CONFIG_WLAN_80211 is not set
529# CONFIG_WAN is not set 512# CONFIG_WAN is not set
530# CONFIG_PPP is not set 513# CONFIG_PPP is not set
531# CONFIG_SLIP is not set 514# CONFIG_SLIP is not set
diff --git a/arch/mips/configs/mpc30x_defconfig b/arch/mips/configs/mpc30x_defconfig
index ad5c0bf87b..4981ce425d 100644
--- a/arch/mips/configs/mpc30x_defconfig
+++ b/arch/mips/configs/mpc30x_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/ocelot_3_defconfig b/arch/mips/configs/msp71xx_defconfig
index 28547313ce..adca5f7ba5 100644
--- a/arch/mips/configs/ocelot_3_defconfig
+++ b/arch/mips/configs/msp71xx_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 3# Linux kernel version: 2.6.21-rc4
4# Tue Feb 20 21:47:35 2007 4# Thu Apr 26 18:11:29 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,14 +33,13 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38CONFIG_MOMENCO_OCELOT_3=y
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
43# CONFIG_PNX8550_STB810 is not set 39# CONFIG_PNX8550_STB810 is not set
44# CONFIG_DDB5477 is not set 40# CONFIG_DDB5477 is not set
45# CONFIG_MACH_VR41XX is not set 41# CONFIG_MACH_VR41XX is not set
42CONFIG_PMC_MSP=y
46# CONFIG_PMC_YOSEMITE is not set 43# CONFIG_PMC_YOSEMITE is not set
47# CONFIG_QEMU is not set 44# CONFIG_QEMU is not set
48# CONFIG_MARKEINS is not set 45# CONFIG_MARKEINS is not set
@@ -62,6 +59,16 @@ CONFIG_MOMENCO_OCELOT_3=y
62# CONFIG_TOSHIBA_JMR3927 is not set 59# CONFIG_TOSHIBA_JMR3927 is not set
63# CONFIG_TOSHIBA_RBTX4927 is not set 60# CONFIG_TOSHIBA_RBTX4927 is not set
64# CONFIG_TOSHIBA_RBTX4938 is not set 61# CONFIG_TOSHIBA_RBTX4938 is not set
62# CONFIG_PMC_MSP4200_EVAL is not set
63# CONFIG_PMC_MSP4200_GW is not set
64# CONFIG_PMC_MSP7120_EVAL is not set
65CONFIG_PMC_MSP7120_GW=y
66# CONFIG_PMC_MSP7120_FPGA is not set
67
68#
69# Options for PMC-Sierra MSP chipsets
70#
71CONFIG_PMC_MSP_EMBEDDED_ROOTFS=y
65CONFIG_RWSEM_GENERIC_SPINLOCK=y 72CONFIG_RWSEM_GENERIC_SPINLOCK=y
66# CONFIG_ARCH_HAS_ILOG2_U32 is not set 73# CONFIG_ARCH_HAS_ILOG2_U32 is not set
67# CONFIG_ARCH_HAS_ILOG2_U64 is not set 74# CONFIG_ARCH_HAS_ILOG2_U64 is not set
@@ -71,24 +78,24 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y
71CONFIG_GENERIC_TIME=y 78CONFIG_GENERIC_TIME=y
72CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 79CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
73# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set 80# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
81CONFIG_BOOT_RAW=y
74CONFIG_DMA_NONCOHERENT=y 82CONFIG_DMA_NONCOHERENT=y
75CONFIG_DMA_NEED_PCI_MAP_STATE=y 83CONFIG_DMA_NEED_PCI_MAP_STATE=y
84CONFIG_NO_EXCEPT_FILL=y
76CONFIG_CPU_BIG_ENDIAN=y 85CONFIG_CPU_BIG_ENDIAN=y
77# CONFIG_CPU_LITTLE_ENDIAN is not set 86# CONFIG_CPU_LITTLE_ENDIAN is not set
78CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y 87CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
79CONFIG_IRQ_CPU=y 88CONFIG_IRQ_CPU=y
80CONFIG_IRQ_CPU_RM7K=y 89CONFIG_IRQ_MSP_CIC=y
81CONFIG_IRQ_MV64340=y 90CONFIG_MSP_USB=y
82CONFIG_PCI_MARVELL=y
83CONFIG_SWAP_IO_SPACE=y 91CONFIG_SWAP_IO_SPACE=y
84CONFIG_BOOT_ELF32=y
85CONFIG_MIPS_L1_CACHE_SHIFT=5 92CONFIG_MIPS_L1_CACHE_SHIFT=5
86 93
87# 94#
88# CPU selection 95# CPU selection
89# 96#
90# CONFIG_CPU_MIPS32_R1 is not set 97# CONFIG_CPU_MIPS32_R1 is not set
91# CONFIG_CPU_MIPS32_R2 is not set 98CONFIG_CPU_MIPS32_R2=y
92# CONFIG_CPU_MIPS64_R1 is not set 99# CONFIG_CPU_MIPS64_R1 is not set
93# CONFIG_CPU_MIPS64_R2 is not set 100# CONFIG_CPU_MIPS64_R2 is not set
94# CONFIG_CPU_R3000 is not set 101# CONFIG_CPU_R3000 is not set
@@ -104,14 +111,14 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
104# CONFIG_CPU_R8000 is not set 111# CONFIG_CPU_R8000 is not set
105# CONFIG_CPU_R10000 is not set 112# CONFIG_CPU_R10000 is not set
106# CONFIG_CPU_RM7000 is not set 113# CONFIG_CPU_RM7000 is not set
107CONFIG_CPU_RM9000=y 114# CONFIG_CPU_RM9000 is not set
108# CONFIG_CPU_SB1 is not set 115# CONFIG_CPU_SB1 is not set
109CONFIG_SYS_HAS_CPU_RM9000=y 116CONFIG_SYS_HAS_CPU_MIPS32_R1=y
110CONFIG_WEAK_ORDERING=y 117CONFIG_SYS_HAS_CPU_MIPS32_R2=y
118CONFIG_CPU_MIPS32=y
119CONFIG_CPU_MIPSR2=y
111CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 120CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
112CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
113CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 121CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
114CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
115 122
116# 123#
117# Kernel type 124# Kernel type
@@ -122,13 +129,12 @@ CONFIG_PAGE_SIZE_4KB=y
122# CONFIG_PAGE_SIZE_8KB is not set 129# CONFIG_PAGE_SIZE_8KB is not set
123# CONFIG_PAGE_SIZE_16KB is not set 130# CONFIG_PAGE_SIZE_16KB is not set
124# CONFIG_PAGE_SIZE_64KB is not set 131# CONFIG_PAGE_SIZE_64KB is not set
125CONFIG_BOARD_SCACHE=y
126CONFIG_RM7000_CPU_SCACHE=y
127CONFIG_CPU_HAS_PREFETCH=y 132CONFIG_CPU_HAS_PREFETCH=y
128CONFIG_MIPS_MT_DISABLED=y 133CONFIG_MIPS_MT_DISABLED=y
129# CONFIG_MIPS_MT_SMP is not set 134# CONFIG_MIPS_MT_SMP is not set
130# CONFIG_MIPS_MT_SMTC is not set 135# CONFIG_MIPS_MT_SMTC is not set
131# CONFIG_MIPS_VPE_LOADER is not set 136# CONFIG_MIPS_VPE_LOADER is not set
137CONFIG_SYS_SUPPORTS_MULTITHREADING=y
132# CONFIG_64BIT_PHYS_ADDR is not set 138# CONFIG_64BIT_PHYS_ADDR is not set
133CONFIG_CPU_HAS_LLSC=y 139CONFIG_CPU_HAS_LLSC=y
134CONFIG_CPU_HAS_SYNC=y 140CONFIG_CPU_HAS_SYNC=y
@@ -149,15 +155,16 @@ CONFIG_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
152# CONFIG_HZ_250 is not set 158CONFIG_HZ_250=y
153# CONFIG_HZ_256 is not set 159# CONFIG_HZ_256 is not set
154CONFIG_HZ_1000=y 160# CONFIG_HZ_1000 is not set
155# CONFIG_HZ_1024 is not set 161# CONFIG_HZ_1024 is not set
156CONFIG_SYS_SUPPORTS_ARBIT_HZ=y 162CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
157CONFIG_HZ=1000 163CONFIG_HZ=250
158CONFIG_PREEMPT_NONE=y 164# CONFIG_PREEMPT_NONE is not set
159# CONFIG_PREEMPT_VOLUNTARY is not set 165# CONFIG_PREEMPT_VOLUNTARY is not set
160# CONFIG_PREEMPT is not set 166CONFIG_PREEMPT=y
167# CONFIG_PREEMPT_BKL is not set
161# CONFIG_KEXEC is not set 168# CONFIG_KEXEC is not set
162CONFIG_LOCKDEP_SUPPORT=y 169CONFIG_LOCKDEP_SUPPORT=y
163CONFIG_STACKTRACE_SUPPORT=y 170CONFIG_STACKTRACE_SUPPORT=y
@@ -168,14 +175,15 @@ CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
168# 175#
169CONFIG_EXPERIMENTAL=y 176CONFIG_EXPERIMENTAL=y
170CONFIG_BROKEN_ON_SMP=y 177CONFIG_BROKEN_ON_SMP=y
178CONFIG_LOCK_KERNEL=y
171CONFIG_INIT_ENV_ARG_LIMIT=32 179CONFIG_INIT_ENV_ARG_LIMIT=32
172 180
173# 181#
174# General setup 182# General setup
175# 183#
176CONFIG_LOCALVERSION="" 184CONFIG_LOCALVERSION="-pmc"
177CONFIG_LOCALVERSION_AUTO=y 185CONFIG_LOCALVERSION_AUTO=y
178CONFIG_SWAP=y 186# CONFIG_SWAP is not set
179CONFIG_SYSVIPC=y 187CONFIG_SYSVIPC=y
180# CONFIG_IPC_NS is not set 188# CONFIG_IPC_NS is not set
181CONFIG_SYSVIPC_SYSCTL=y 189CONFIG_SYSVIPC_SYSCTL=y
@@ -184,15 +192,16 @@ CONFIG_SYSVIPC_SYSCTL=y
184# CONFIG_TASKSTATS is not set 192# CONFIG_TASKSTATS is not set
185# CONFIG_UTS_NS is not set 193# CONFIG_UTS_NS is not set
186# CONFIG_AUDIT is not set 194# CONFIG_AUDIT is not set
187CONFIG_IKCONFIG=y 195# CONFIG_IKCONFIG is not set
188CONFIG_IKCONFIG_PROC=y
189CONFIG_SYSFS_DEPRECATED=y 196CONFIG_SYSFS_DEPRECATED=y
190CONFIG_RELAY=y 197# CONFIG_RELAY is not set
198# CONFIG_BLK_DEV_INITRD is not set
191# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 199# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
192CONFIG_SYSCTL=y 200CONFIG_SYSCTL=y
193CONFIG_EMBEDDED=y 201CONFIG_EMBEDDED=y
194CONFIG_SYSCTL_SYSCALL=y 202CONFIG_SYSCTL_SYSCALL=y
195CONFIG_KALLSYMS=y 203CONFIG_KALLSYMS=y
204# CONFIG_KALLSYMS_ALL is not set
196# CONFIG_KALLSYMS_EXTRA_PASS is not set 205# CONFIG_KALLSYMS_EXTRA_PASS is not set
197CONFIG_HOTPLUG=y 206CONFIG_HOTPLUG=y
198CONFIG_PRINTK=y 207CONFIG_PRINTK=y
@@ -201,11 +210,11 @@ CONFIG_ELF_CORE=y
201CONFIG_BASE_FULL=y 210CONFIG_BASE_FULL=y
202CONFIG_FUTEX=y 211CONFIG_FUTEX=y
203CONFIG_EPOLL=y 212CONFIG_EPOLL=y
204CONFIG_SHMEM=y 213# CONFIG_SHMEM is not set
205CONFIG_SLAB=y 214CONFIG_SLAB=y
206CONFIG_VM_EVENT_COUNTERS=y 215CONFIG_VM_EVENT_COUNTERS=y
207CONFIG_RT_MUTEXES=y 216CONFIG_RT_MUTEXES=y
208# CONFIG_TINY_SHMEM is not set 217CONFIG_TINY_SHMEM=y
209CONFIG_BASE_SMALL=0 218CONFIG_BASE_SMALL=0
210# CONFIG_SLOB is not set 219# CONFIG_SLOB is not set
211 220
@@ -232,8 +241,8 @@ CONFIG_BLOCK=y
232# 241#
233CONFIG_IOSCHED_NOOP=y 242CONFIG_IOSCHED_NOOP=y
234CONFIG_IOSCHED_AS=y 243CONFIG_IOSCHED_AS=y
235CONFIG_IOSCHED_DEADLINE=y 244# CONFIG_IOSCHED_DEADLINE is not set
236CONFIG_IOSCHED_CFQ=y 245# CONFIG_IOSCHED_CFQ is not set
237CONFIG_DEFAULT_AS=y 246CONFIG_DEFAULT_AS=y
238# CONFIG_DEFAULT_DEADLINE is not set 247# CONFIG_DEFAULT_DEADLINE is not set
239# CONFIG_DEFAULT_CFQ is not set 248# CONFIG_DEFAULT_CFQ is not set
@@ -245,6 +254,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
245# 254#
246CONFIG_HW_HAS_PCI=y 255CONFIG_HW_HAS_PCI=y
247CONFIG_PCI=y 256CONFIG_PCI=y
257# CONFIG_PCI_DEBUG is not set
248CONFIG_MMU=y 258CONFIG_MMU=y
249 259
250# 260#
@@ -267,10 +277,7 @@ CONFIG_TRAD_SIGNALS=y
267# 277#
268# Power management options 278# Power management options
269# 279#
270CONFIG_PM=y 280# CONFIG_PM is not set
271# CONFIG_PM_LEGACY is not set
272# CONFIG_PM_DEBUG is not set
273# CONFIG_PM_SYSFS_DEPRECATED is not set
274 281
275# 282#
276# Networking 283# Networking
@@ -281,17 +288,16 @@ CONFIG_NET=y
281# Networking options 288# Networking options
282# 289#
283# CONFIG_NETDEBUG is not set 290# CONFIG_NETDEBUG is not set
284CONFIG_PACKET=y 291# CONFIG_PACKET is not set
285# CONFIG_PACKET_MMAP is not set
286CONFIG_UNIX=y 292CONFIG_UNIX=y
287CONFIG_XFRM=y 293CONFIG_XFRM=y
288# CONFIG_XFRM_USER is not set 294CONFIG_XFRM_USER=y
289# CONFIG_XFRM_SUB_POLICY is not set 295# CONFIG_XFRM_SUB_POLICY is not set
290CONFIG_XFRM_MIGRATE=y 296# CONFIG_XFRM_MIGRATE is not set
291CONFIG_NET_KEY=y 297CONFIG_NET_KEY=y
292CONFIG_NET_KEY_MIGRATE=y 298# CONFIG_NET_KEY_MIGRATE is not set
293CONFIG_INET=y 299CONFIG_INET=y
294# CONFIG_IP_MULTICAST is not set 300CONFIG_IP_MULTICAST=y
295# CONFIG_IP_ADVANCED_ROUTER is not set 301# CONFIG_IP_ADVANCED_ROUTER is not set
296CONFIG_IP_FIB_HASH=y 302CONFIG_IP_FIB_HASH=y
297CONFIG_IP_PNP=y 303CONFIG_IP_PNP=y
@@ -300,122 +306,92 @@ CONFIG_IP_PNP_BOOTP=y
300# CONFIG_IP_PNP_RARP is not set 306# CONFIG_IP_PNP_RARP is not set
301# CONFIG_NET_IPIP is not set 307# CONFIG_NET_IPIP is not set
302# CONFIG_NET_IPGRE is not set 308# CONFIG_NET_IPGRE is not set
309# CONFIG_IP_MROUTE is not set
303# CONFIG_ARPD is not set 310# CONFIG_ARPD is not set
304# CONFIG_SYN_COOKIES is not set 311# CONFIG_SYN_COOKIES is not set
305# CONFIG_INET_AH is not set 312CONFIG_INET_AH=y
306# CONFIG_INET_ESP is not set 313CONFIG_INET_ESP=y
307# CONFIG_INET_IPCOMP is not set 314CONFIG_INET_IPCOMP=y
308# CONFIG_INET_XFRM_TUNNEL is not set 315CONFIG_INET_XFRM_TUNNEL=y
309CONFIG_INET_TUNNEL=m 316CONFIG_INET_TUNNEL=y
310CONFIG_INET_XFRM_MODE_TRANSPORT=m 317CONFIG_INET_XFRM_MODE_TRANSPORT=y
311CONFIG_INET_XFRM_MODE_TUNNEL=m 318CONFIG_INET_XFRM_MODE_TUNNEL=y
312CONFIG_INET_XFRM_MODE_BEET=m 319CONFIG_INET_XFRM_MODE_BEET=y
313CONFIG_INET_DIAG=y 320CONFIG_INET_DIAG=y
314CONFIG_INET_TCP_DIAG=y 321CONFIG_INET_TCP_DIAG=y
315# CONFIG_TCP_CONG_ADVANCED is not set 322# CONFIG_TCP_CONG_ADVANCED is not set
316CONFIG_TCP_CONG_CUBIC=y 323CONFIG_TCP_CONG_CUBIC=y
317CONFIG_DEFAULT_TCP_CONG="cubic" 324CONFIG_DEFAULT_TCP_CONG="cubic"
318CONFIG_TCP_MD5SIG=y 325# CONFIG_TCP_MD5SIG is not set
319 326
320# 327#
321# IP: Virtual Server Configuration 328# IP: Virtual Server Configuration
322# 329#
323# CONFIG_IP_VS is not set 330# CONFIG_IP_VS is not set
324CONFIG_IPV6=m 331# CONFIG_IPV6 is not set
325# CONFIG_IPV6_PRIVACY is not set
326CONFIG_IPV6_ROUTER_PREF=y
327CONFIG_IPV6_ROUTE_INFO=y
328# CONFIG_INET6_AH is not set
329# CONFIG_INET6_ESP is not set
330# CONFIG_INET6_IPCOMP is not set
331CONFIG_IPV6_MIP6=y
332# CONFIG_INET6_XFRM_TUNNEL is not set 332# CONFIG_INET6_XFRM_TUNNEL is not set
333# CONFIG_INET6_TUNNEL is not set 333# CONFIG_INET6_TUNNEL is not set
334CONFIG_INET6_XFRM_MODE_TRANSPORT=m 334# CONFIG_NETWORK_SECMARK is not set
335CONFIG_INET6_XFRM_MODE_TUNNEL=m
336CONFIG_INET6_XFRM_MODE_BEET=m
337CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
338CONFIG_IPV6_SIT=m
339# CONFIG_IPV6_TUNNEL is not set
340CONFIG_IPV6_MULTIPLE_TABLES=y
341CONFIG_IPV6_SUBTREES=y
342CONFIG_NETWORK_SECMARK=y
343CONFIG_NETFILTER=y 335CONFIG_NETFILTER=y
344# CONFIG_NETFILTER_DEBUG is not set 336# CONFIG_NETFILTER_DEBUG is not set
337CONFIG_BRIDGE_NETFILTER=y
345 338
346# 339#
347# Core Netfilter Configuration 340# Core Netfilter Configuration
348# 341#
349CONFIG_NETFILTER_NETLINK=m 342# CONFIG_NETFILTER_NETLINK is not set
350CONFIG_NETFILTER_NETLINK_QUEUE=m 343# CONFIG_NF_CONNTRACK_ENABLED is not set
351CONFIG_NETFILTER_NETLINK_LOG=m 344CONFIG_NETFILTER_XTABLES=y
352CONFIG_NF_CONNTRACK_ENABLED=m 345# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
353CONFIG_NF_CONNTRACK_SUPPORT=y 346# CONFIG_NETFILTER_XT_TARGET_MARK is not set
354# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set 347# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
355CONFIG_NF_CONNTRACK=m 348# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
356CONFIG_NF_CT_ACCT=y 349# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
357CONFIG_NF_CONNTRACK_MARK=y 350# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
358CONFIG_NF_CONNTRACK_SECMARK=y 351# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
359CONFIG_NF_CONNTRACK_EVENTS=y 352# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
360CONFIG_NF_CT_PROTO_GRE=m 353# CONFIG_NETFILTER_XT_MATCH_ESP is not set
361CONFIG_NF_CT_PROTO_SCTP=m 354# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
362CONFIG_NF_CONNTRACK_AMANDA=m 355# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
363CONFIG_NF_CONNTRACK_FTP=m 356# CONFIG_NETFILTER_XT_MATCH_MAC is not set
364CONFIG_NF_CONNTRACK_H323=m 357# CONFIG_NETFILTER_XT_MATCH_MARK is not set
365CONFIG_NF_CONNTRACK_IRC=m 358# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
366# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set 359# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
367CONFIG_NF_CONNTRACK_PPTP=m 360# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
368CONFIG_NF_CONNTRACK_SANE=m 361# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
369CONFIG_NF_CONNTRACK_SIP=m 362# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
370CONFIG_NF_CONNTRACK_TFTP=m 363# CONFIG_NETFILTER_XT_MATCH_REALM is not set
371CONFIG_NF_CT_NETLINK=m 364# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
372CONFIG_NETFILTER_XTABLES=m 365# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
373CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 366# CONFIG_NETFILTER_XT_MATCH_STRING is not set
374CONFIG_NETFILTER_XT_TARGET_MARK=m 367# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
375CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 368# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
376CONFIG_NETFILTER_XT_TARGET_NFLOG=m
377CONFIG_NETFILTER_XT_TARGET_SECMARK=m
378CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
379CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
380CONFIG_NETFILTER_XT_MATCH_COMMENT=m
381CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
382CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
383CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
384CONFIG_NETFILTER_XT_MATCH_DCCP=m
385CONFIG_NETFILTER_XT_MATCH_DSCP=m
386CONFIG_NETFILTER_XT_MATCH_ESP=m
387CONFIG_NETFILTER_XT_MATCH_HELPER=m
388CONFIG_NETFILTER_XT_MATCH_LENGTH=m
389CONFIG_NETFILTER_XT_MATCH_LIMIT=m
390CONFIG_NETFILTER_XT_MATCH_MAC=m
391CONFIG_NETFILTER_XT_MATCH_MARK=m
392CONFIG_NETFILTER_XT_MATCH_POLICY=m
393CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
394CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
395CONFIG_NETFILTER_XT_MATCH_QUOTA=m
396CONFIG_NETFILTER_XT_MATCH_REALM=m
397CONFIG_NETFILTER_XT_MATCH_SCTP=m
398CONFIG_NETFILTER_XT_MATCH_STATE=m
399CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
400CONFIG_NETFILTER_XT_MATCH_STRING=m
401CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
402CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
403 369
404# 370#
405# IP: Netfilter Configuration 371# IP: Netfilter Configuration
406# 372#
407CONFIG_NF_CONNTRACK_IPV4=m
408CONFIG_NF_CONNTRACK_PROC_COMPAT=y
409# CONFIG_IP_NF_QUEUE is not set 373# CONFIG_IP_NF_QUEUE is not set
410# CONFIG_IP_NF_IPTABLES is not set 374CONFIG_IP_NF_IPTABLES=y
375# CONFIG_IP_NF_MATCH_IPRANGE is not set
376# CONFIG_IP_NF_MATCH_TOS is not set
377# CONFIG_IP_NF_MATCH_RECENT is not set
378# CONFIG_IP_NF_MATCH_ECN is not set
379# CONFIG_IP_NF_MATCH_AH is not set
380# CONFIG_IP_NF_MATCH_TTL is not set
381# CONFIG_IP_NF_MATCH_OWNER is not set
382# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
383CONFIG_IP_NF_FILTER=y
384CONFIG_IP_NF_TARGET_REJECT=y
385# CONFIG_IP_NF_TARGET_LOG is not set
386# CONFIG_IP_NF_TARGET_ULOG is not set
387# CONFIG_IP_NF_MANGLE is not set
388# CONFIG_IP_NF_RAW is not set
411# CONFIG_IP_NF_ARPTABLES is not set 389# CONFIG_IP_NF_ARPTABLES is not set
412 390
413# 391#
414# IPv6: Netfilter Configuration (EXPERIMENTAL) 392# Bridge: Netfilter Configuration
415# 393#
416CONFIG_NF_CONNTRACK_IPV6=m 394# CONFIG_BRIDGE_NF_EBTABLES is not set
417# CONFIG_IP6_NF_QUEUE is not set
418# CONFIG_IP6_NF_IPTABLES is not set
419 395
420# 396#
421# DCCP Configuration (EXPERIMENTAL) 397# DCCP Configuration (EXPERIMENTAL)
@@ -432,9 +408,10 @@ CONFIG_NF_CONNTRACK_IPV6=m
432# 408#
433# CONFIG_TIPC is not set 409# CONFIG_TIPC is not set
434# CONFIG_ATM is not set 410# CONFIG_ATM is not set
435# CONFIG_BRIDGE is not set 411CONFIG_BRIDGE=y
436# CONFIG_VLAN_8021Q is not set 412# CONFIG_VLAN_8021Q is not set
437# CONFIG_DECNET is not set 413# CONFIG_DECNET is not set
414CONFIG_LLC=y
438# CONFIG_LLC2 is not set 415# CONFIG_LLC2 is not set
439# CONFIG_IPX is not set 416# CONFIG_IPX is not set
440# CONFIG_ATALK is not set 417# CONFIG_ATALK is not set
@@ -447,7 +424,6 @@ CONFIG_NF_CONNTRACK_IPV6=m
447# QoS and/or fair queueing 424# QoS and/or fair queueing
448# 425#
449# CONFIG_NET_SCHED is not set 426# CONFIG_NET_SCHED is not set
450CONFIG_NET_CLS_ROUTE=y
451 427
452# 428#
453# Network testing 429# Network testing
@@ -456,14 +432,8 @@ CONFIG_NET_CLS_ROUTE=y
456# CONFIG_HAMRADIO is not set 432# CONFIG_HAMRADIO is not set
457# CONFIG_IRDA is not set 433# CONFIG_IRDA is not set
458# CONFIG_BT is not set 434# CONFIG_BT is not set
459CONFIG_IEEE80211=m 435# CONFIG_IEEE80211 is not set
460# CONFIG_IEEE80211_DEBUG is not set
461CONFIG_IEEE80211_CRYPT_WEP=m
462CONFIG_IEEE80211_CRYPT_CCMP=m
463CONFIG_IEEE80211_SOFTMAC=m
464# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
465CONFIG_WIRELESS_EXT=y 436CONFIG_WIRELESS_EXT=y
466CONFIG_FIB_RULES=y
467 437
468# 438#
469# Device Drivers 439# Device Drivers
@@ -473,19 +443,101 @@ CONFIG_FIB_RULES=y
473# Generic Driver Options 443# Generic Driver Options
474# 444#
475CONFIG_STANDALONE=y 445CONFIG_STANDALONE=y
476CONFIG_PREVENT_FIRMWARE_BUILD=y 446# CONFIG_PREVENT_FIRMWARE_BUILD is not set
477CONFIG_FW_LOADER=m 447# CONFIG_FW_LOADER is not set
448# CONFIG_DEBUG_DRIVER is not set
449# CONFIG_DEBUG_DEVRES is not set
478# CONFIG_SYS_HYPERVISOR is not set 450# CONFIG_SYS_HYPERVISOR is not set
479 451
480# 452#
481# Connector - unified userspace <-> kernelspace linker 453# Connector - unified userspace <-> kernelspace linker
482# 454#
483CONFIG_CONNECTOR=m 455# CONFIG_CONNECTOR is not set
484 456
485# 457#
486# Memory Technology Devices (MTD) 458# Memory Technology Devices (MTD)
487# 459#
488# CONFIG_MTD is not set 460CONFIG_MTD=y
461# CONFIG_MTD_DEBUG is not set
462# CONFIG_MTD_CONCAT is not set
463CONFIG_MTD_PARTITIONS=y
464# CONFIG_MTD_REDBOOT_PARTS is not set
465# CONFIG_MTD_CMDLINE_PARTS is not set
466
467#
468# User Modules And Translation Layers
469#
470CONFIG_MTD_CHAR=y
471CONFIG_MTD_BLKDEVS=y
472CONFIG_MTD_BLOCK=y
473# CONFIG_FTL is not set
474# CONFIG_NFTL is not set
475# CONFIG_INFTL is not set
476# CONFIG_RFD_FTL is not set
477# CONFIG_SSFDC is not set
478
479#
480# RAM/ROM/Flash chip drivers
481#
482CONFIG_MTD_CFI=y
483# CONFIG_MTD_JEDECPROBE is not set
484CONFIG_MTD_GEN_PROBE=y
485# CONFIG_MTD_CFI_ADV_OPTIONS is not set
486CONFIG_MTD_MAP_BANK_WIDTH_1=y
487CONFIG_MTD_MAP_BANK_WIDTH_2=y
488CONFIG_MTD_MAP_BANK_WIDTH_4=y
489# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
490# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
491# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
492CONFIG_MTD_CFI_I1=y
493CONFIG_MTD_CFI_I2=y
494# CONFIG_MTD_CFI_I4 is not set
495# CONFIG_MTD_CFI_I8 is not set
496# CONFIG_MTD_CFI_INTELEXT is not set
497CONFIG_MTD_CFI_AMDSTD=y
498# CONFIG_MTD_CFI_STAA is not set
499CONFIG_MTD_CFI_UTIL=y
500CONFIG_MTD_RAM=y
501# CONFIG_MTD_ROM is not set
502# CONFIG_MTD_ABSENT is not set
503# CONFIG_MTD_OBSOLETE_CHIPS is not set
504
505#
506# Mapping drivers for chip access
507#
508# CONFIG_MTD_COMPLEX_MAPPINGS is not set
509# CONFIG_MTD_PHYSMAP is not set
510CONFIG_MTD_PMC_MSP_EVM=y
511CONFIG_MSP_FLASH_MAP_LIMIT_32M=y
512CONFIG_MSP_FLASH_MAP_LIMIT=0x02000000
513CONFIG_MTD_PMC_MSP_RAMROOT=y
514# CONFIG_MTD_PLATRAM is not set
515
516#
517# Self-contained MTD device drivers
518#
519# CONFIG_MTD_PMC551 is not set
520# CONFIG_MTD_SLRAM is not set
521# CONFIG_MTD_PHRAM is not set
522# CONFIG_MTD_MTDRAM is not set
523# CONFIG_MTD_BLOCK2MTD is not set
524
525#
526# Disk-On-Chip Device Drivers
527#
528# CONFIG_MTD_DOC2000 is not set
529# CONFIG_MTD_DOC2001 is not set
530# CONFIG_MTD_DOC2001PLUS is not set
531
532#
533# NAND Flash Device Drivers
534#
535# CONFIG_MTD_NAND is not set
536
537#
538# OneNAND Flash Device Drivers
539#
540# CONFIG_MTD_ONENAND is not set
489 541
490# 542#
491# Parallel port support 543# Parallel port support
@@ -505,19 +557,21 @@ CONFIG_CONNECTOR=m
505# CONFIG_BLK_DEV_DAC960 is not set 557# CONFIG_BLK_DEV_DAC960 is not set
506# CONFIG_BLK_DEV_UMEM is not set 558# CONFIG_BLK_DEV_UMEM is not set
507# CONFIG_BLK_DEV_COW_COMMON is not set 559# CONFIG_BLK_DEV_COW_COMMON is not set
508CONFIG_BLK_DEV_LOOP=y 560# CONFIG_BLK_DEV_LOOP is not set
509# CONFIG_BLK_DEV_CRYPTOLOOP is not set
510# CONFIG_BLK_DEV_NBD is not set 561# CONFIG_BLK_DEV_NBD is not set
511# CONFIG_BLK_DEV_SX8 is not set 562# CONFIG_BLK_DEV_SX8 is not set
512# CONFIG_BLK_DEV_RAM is not set 563# CONFIG_BLK_DEV_UB is not set
513# CONFIG_BLK_DEV_INITRD is not set 564CONFIG_BLK_DEV_RAM=y
565CONFIG_BLK_DEV_RAM_COUNT=16
566CONFIG_BLK_DEV_RAM_SIZE=4096
567CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
514# CONFIG_CDROM_PKTCDVD is not set 568# CONFIG_CDROM_PKTCDVD is not set
515CONFIG_ATA_OVER_ETH=m 569# CONFIG_ATA_OVER_ETH is not set
516 570
517# 571#
518# Misc devices 572# Misc devices
519# 573#
520CONFIG_SGI_IOC4=m 574# CONFIG_SGI_IOC4 is not set
521# CONFIG_TIFM_CORE is not set 575# CONFIG_TIFM_CORE is not set
522 576
523# 577#
@@ -528,16 +582,16 @@ CONFIG_SGI_IOC4=m
528# 582#
529# SCSI device support 583# SCSI device support
530# 584#
531CONFIG_RAID_ATTRS=m 585# CONFIG_RAID_ATTRS is not set
532CONFIG_SCSI=m 586CONFIG_SCSI=y
533CONFIG_SCSI_TGT=m 587# CONFIG_SCSI_TGT is not set
534CONFIG_SCSI_NETLINK=y 588# CONFIG_SCSI_NETLINK is not set
535CONFIG_SCSI_PROC_FS=y 589CONFIG_SCSI_PROC_FS=y
536 590
537# 591#
538# SCSI support type (disk, tape, CD-ROM) 592# SCSI support type (disk, tape, CD-ROM)
539# 593#
540# CONFIG_BLK_DEV_SD is not set 594CONFIG_BLK_DEV_SD=y
541# CONFIG_CHR_DEV_ST is not set 595# CONFIG_CHR_DEV_ST is not set
542# CONFIG_CHR_DEV_OSST is not set 596# CONFIG_CHR_DEV_OSST is not set
543# CONFIG_BLK_DEV_SR is not set 597# CONFIG_BLK_DEV_SR is not set
@@ -550,22 +604,21 @@ CONFIG_SCSI_PROC_FS=y
550# CONFIG_SCSI_MULTI_LUN is not set 604# CONFIG_SCSI_MULTI_LUN is not set
551# CONFIG_SCSI_CONSTANTS is not set 605# CONFIG_SCSI_CONSTANTS is not set
552# CONFIG_SCSI_LOGGING is not set 606# CONFIG_SCSI_LOGGING is not set
553CONFIG_SCSI_SCAN_ASYNC=y 607# CONFIG_SCSI_SCAN_ASYNC is not set
554 608
555# 609#
556# SCSI Transports 610# SCSI Transports
557# 611#
558# CONFIG_SCSI_SPI_ATTRS is not set 612# CONFIG_SCSI_SPI_ATTRS is not set
559CONFIG_SCSI_FC_ATTRS=m 613# CONFIG_SCSI_FC_ATTRS is not set
560CONFIG_SCSI_ISCSI_ATTRS=m 614# CONFIG_SCSI_ISCSI_ATTRS is not set
561CONFIG_SCSI_SAS_ATTRS=m 615# CONFIG_SCSI_SAS_ATTRS is not set
562CONFIG_SCSI_SAS_LIBSAS=m 616# CONFIG_SCSI_SAS_LIBSAS is not set
563# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
564 617
565# 618#
566# SCSI low-level drivers 619# SCSI low-level drivers
567# 620#
568CONFIG_ISCSI_TCP=m 621# CONFIG_ISCSI_TCP is not set
569# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 622# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
570# CONFIG_SCSI_3W_9XXX is not set 623# CONFIG_SCSI_3W_9XXX is not set
571# CONFIG_SCSI_ACARD is not set 624# CONFIG_SCSI_ACARD is not set
@@ -573,8 +626,7 @@ CONFIG_ISCSI_TCP=m
573# CONFIG_SCSI_AIC7XXX is not set 626# CONFIG_SCSI_AIC7XXX is not set
574# CONFIG_SCSI_AIC7XXX_OLD is not set 627# CONFIG_SCSI_AIC7XXX_OLD is not set
575# CONFIG_SCSI_AIC79XX is not set 628# CONFIG_SCSI_AIC79XX is not set
576CONFIG_SCSI_AIC94XX=m 629# CONFIG_SCSI_AIC94XX is not set
577# CONFIG_AIC94XX_DEBUG is not set
578# CONFIG_SCSI_DPT_I2O is not set 630# CONFIG_SCSI_DPT_I2O is not set
579# CONFIG_SCSI_ARCMSR is not set 631# CONFIG_SCSI_ARCMSR is not set
580# CONFIG_MEGARAID_NEWGEN is not set 632# CONFIG_MEGARAID_NEWGEN is not set
@@ -630,10 +682,10 @@ CONFIG_SCSI_AIC94XX=m
630# Network device support 682# Network device support
631# 683#
632CONFIG_NETDEVICES=y 684CONFIG_NETDEVICES=y
633# CONFIG_DUMMY is not set 685CONFIG_DUMMY=y
634# CONFIG_BONDING is not set 686# CONFIG_BONDING is not set
635# CONFIG_EQUALIZER is not set 687# CONFIG_EQUALIZER is not set
636CONFIG_TUN=m 688# CONFIG_TUN is not set
637 689
638# 690#
639# ARCnet devices 691# ARCnet devices
@@ -643,26 +695,16 @@ CONFIG_TUN=m
643# 695#
644# PHY device support 696# PHY device support
645# 697#
646CONFIG_PHYLIB=m 698# CONFIG_PHYLIB is not set
647
648#
649# MII PHY device drivers
650#
651CONFIG_MARVELL_PHY=m
652CONFIG_DAVICOM_PHY=m
653CONFIG_QSEMI_PHY=m
654CONFIG_LXT_PHY=m
655CONFIG_CICADA_PHY=m
656CONFIG_VITESSE_PHY=m
657CONFIG_SMSC_PHY=m
658# CONFIG_BROADCOM_PHY is not set
659# CONFIG_FIXED_PHY is not set
660 699
661# 700#
662# Ethernet (10 or 100Mbit) 701# Ethernet (10 or 100Mbit)
663# 702#
664CONFIG_NET_ETHERNET=y 703CONFIG_NET_ETHERNET=y
665CONFIG_MII=y 704CONFIG_MII=y
705CONFIG_MSPETH=y
706CONFIG_MSPETH_NAPI=y
707# CONFIG_MSPETH_SKB_RECYCLE is not set
666# CONFIG_HAPPYMEAL is not set 708# CONFIG_HAPPYMEAL is not set
667# CONFIG_SUNGEM is not set 709# CONFIG_SUNGEM is not set
668# CONFIG_CASSINI is not set 710# CONFIG_CASSINI is not set
@@ -674,26 +716,7 @@ CONFIG_MII=y
674# 716#
675# CONFIG_NET_TULIP is not set 717# CONFIG_NET_TULIP is not set
676# CONFIG_HP100 is not set 718# CONFIG_HP100 is not set
677CONFIG_NET_PCI=y 719# CONFIG_NET_PCI is not set
678# CONFIG_PCNET32 is not set
679# CONFIG_AMD8111_ETH is not set
680# CONFIG_ADAPTEC_STARFIRE is not set
681# CONFIG_B44 is not set
682# CONFIG_FORCEDETH is not set
683# CONFIG_DGRS is not set
684# CONFIG_EEPRO100 is not set
685CONFIG_E100=y
686# CONFIG_FEALNX is not set
687# CONFIG_NATSEMI is not set
688# CONFIG_NE2K_PCI is not set
689# CONFIG_8139CP is not set
690# CONFIG_8139TOO is not set
691# CONFIG_SIS900 is not set
692# CONFIG_EPIC100 is not set
693# CONFIG_SUNDANCE is not set
694# CONFIG_TLAN is not set
695# CONFIG_VIA_RHINE is not set
696# CONFIG_SC92031 is not set
697 720
698# 721#
699# Ethernet (1000 Mbit) 722# Ethernet (1000 Mbit)
@@ -709,22 +732,20 @@ CONFIG_E100=y
709# CONFIG_SKGE is not set 732# CONFIG_SKGE is not set
710# CONFIG_SKY2 is not set 733# CONFIG_SKY2 is not set
711# CONFIG_SK98LIN is not set 734# CONFIG_SK98LIN is not set
712# CONFIG_VIA_VELOCITY is not set
713# CONFIG_TIGON3 is not set 735# CONFIG_TIGON3 is not set
714# CONFIG_BNX2 is not set 736# CONFIG_BNX2 is not set
715CONFIG_MV643XX_ETH=y 737# CONFIG_QLA3XXX is not set
716CONFIG_QLA3XXX=m
717# CONFIG_ATL1 is not set 738# CONFIG_ATL1 is not set
718 739
719# 740#
720# Ethernet (10000 Mbit) 741# Ethernet (10000 Mbit)
721# 742#
722# CONFIG_CHELSIO_T1 is not set 743# CONFIG_CHELSIO_T1 is not set
723CONFIG_CHELSIO_T3=m 744# CONFIG_CHELSIO_T3 is not set
724# CONFIG_IXGB is not set 745# CONFIG_IXGB is not set
725# CONFIG_S2IO is not set 746# CONFIG_S2IO is not set
726# CONFIG_MYRI10GE is not set 747# CONFIG_MYRI10GE is not set
727CONFIG_NETXEN_NIC=m 748# CONFIG_NETXEN_NIC is not set
728 749
729# 750#
730# Token Ring devices 751# Token Ring devices
@@ -734,7 +755,29 @@ CONFIG_NETXEN_NIC=m
734# 755#
735# Wireless LAN (non-hamradio) 756# Wireless LAN (non-hamradio)
736# 757#
737# CONFIG_NET_RADIO is not set 758CONFIG_NET_RADIO=y
759# CONFIG_NET_WIRELESS_RTNETLINK is not set
760
761#
762# Obsolete Wireless cards support (pre-802.11)
763#
764# CONFIG_STRIP is not set
765
766#
767# Wireless 802.11b ISA/PCI cards support
768#
769# CONFIG_IPW2100 is not set
770# CONFIG_IPW2200 is not set
771# CONFIG_HERMES is not set
772# CONFIG_ATMEL is not set
773
774#
775# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
776#
777# CONFIG_PRISM54 is not set
778# CONFIG_USB_ZD1201 is not set
779# CONFIG_HOSTAP is not set
780CONFIG_NET_WIRELESS=y
738 781
739# 782#
740# Wan interfaces 783# Wan interfaces
@@ -742,17 +785,17 @@ CONFIG_NETXEN_NIC=m
742# CONFIG_WAN is not set 785# CONFIG_WAN is not set
743# CONFIG_FDDI is not set 786# CONFIG_FDDI is not set
744# CONFIG_HIPPI is not set 787# CONFIG_HIPPI is not set
745CONFIG_PPP=m 788CONFIG_PPP=y
746# CONFIG_PPP_MULTILINK is not set 789# CONFIG_PPP_MULTILINK is not set
747# CONFIG_PPP_FILTER is not set 790# CONFIG_PPP_FILTER is not set
748CONFIG_PPP_ASYNC=m 791# CONFIG_PPP_ASYNC is not set
749CONFIG_PPP_SYNC_TTY=m 792# CONFIG_PPP_SYNC_TTY is not set
750CONFIG_PPP_DEFLATE=m 793# CONFIG_PPP_DEFLATE is not set
751# CONFIG_PPP_BSDCOMP is not set 794# CONFIG_PPP_BSDCOMP is not set
752CONFIG_PPP_MPPE=m 795# CONFIG_PPP_MPPE is not set
753CONFIG_PPPOE=m 796# CONFIG_PPPOE is not set
754# CONFIG_SLIP is not set 797# CONFIG_SLIP is not set
755CONFIG_SLHC=m 798CONFIG_SLHC=y
756# CONFIG_NET_FC is not set 799# CONFIG_NET_FC is not set
757# CONFIG_SHAPER is not set 800# CONFIG_SHAPER is not set
758# CONFIG_NETCONSOLE is not set 801# CONFIG_NETCONSOLE is not set
@@ -796,31 +839,24 @@ CONFIG_INPUT=y
796# 839#
797# Hardware I/O ports 840# Hardware I/O ports
798# 841#
799CONFIG_SERIO=y 842# CONFIG_SERIO is not set
800# CONFIG_SERIO_I8042 is not set
801# CONFIG_SERIO_SERPORT is not set
802# CONFIG_SERIO_PCIPS2 is not set
803# CONFIG_SERIO_LIBPS2 is not set
804# CONFIG_SERIO_RAW is not set
805# CONFIG_GAMEPORT is not set 843# CONFIG_GAMEPORT is not set
806 844
807# 845#
808# Character devices 846# Character devices
809# 847#
810CONFIG_VT=y 848# CONFIG_VT is not set
811CONFIG_VT_CONSOLE=y
812CONFIG_HW_CONSOLE=y
813CONFIG_VT_HW_CONSOLE_BINDING=y
814# CONFIG_SERIAL_NONSTANDARD is not set 849# CONFIG_SERIAL_NONSTANDARD is not set
850CONFIG_PMCMSP_GPIO=y
815 851
816# 852#
817# Serial drivers 853# Serial drivers
818# 854#
819CONFIG_SERIAL_8250=y 855CONFIG_SERIAL_8250=y
820CONFIG_SERIAL_8250_CONSOLE=y 856CONFIG_SERIAL_8250_CONSOLE=y
821CONFIG_SERIAL_8250_PCI=y 857# CONFIG_SERIAL_8250_PCI is not set
822CONFIG_SERIAL_8250_NR_UARTS=4 858CONFIG_SERIAL_8250_NR_UARTS=2
823CONFIG_SERIAL_8250_RUNTIME_UARTS=4 859CONFIG_SERIAL_8250_RUNTIME_UARTS=2
824# CONFIG_SERIAL_8250_EXTENDED is not set 860# CONFIG_SERIAL_8250_EXTENDED is not set
825 861
826# 862#
@@ -830,8 +866,7 @@ CONFIG_SERIAL_CORE=y
830CONFIG_SERIAL_CORE_CONSOLE=y 866CONFIG_SERIAL_CORE_CONSOLE=y
831# CONFIG_SERIAL_JSM is not set 867# CONFIG_SERIAL_JSM is not set
832CONFIG_UNIX98_PTYS=y 868CONFIG_UNIX98_PTYS=y
833CONFIG_LEGACY_PTYS=y 869# CONFIG_LEGACY_PTYS is not set
834CONFIG_LEGACY_PTY_COUNT=256
835 870
836# 871#
837# IPMI 872# IPMI
@@ -843,7 +878,8 @@ CONFIG_LEGACY_PTY_COUNT=256
843# 878#
844# CONFIG_WATCHDOG is not set 879# CONFIG_WATCHDOG is not set
845# CONFIG_HW_RANDOM is not set 880# CONFIG_HW_RANDOM is not set
846CONFIG_RTC=y 881# CONFIG_RTC is not set
882# CONFIG_GEN_RTC is not set
847# CONFIG_DTLK is not set 883# CONFIG_DTLK is not set
848# CONFIG_R3964 is not set 884# CONFIG_R3964 is not set
849# CONFIG_APPLICOM is not set 885# CONFIG_APPLICOM is not set
@@ -858,7 +894,58 @@ CONFIG_RTC=y
858# 894#
859# I2C support 895# I2C support
860# 896#
861# CONFIG_I2C is not set 897CONFIG_I2C=y
898CONFIG_I2C_CHARDEV=y
899
900#
901# I2C Algorithms
902#
903# CONFIG_I2C_ALGOBIT is not set
904# CONFIG_I2C_ALGOPCF is not set
905# CONFIG_I2C_ALGOPCA is not set
906
907#
908# I2C Hardware Bus support
909#
910# CONFIG_I2C_ALI1535 is not set
911# CONFIG_I2C_ALI1563 is not set
912# CONFIG_I2C_ALI15X3 is not set
913# CONFIG_I2C_AMD756 is not set
914# CONFIG_I2C_AMD8111 is not set
915# CONFIG_I2C_I801 is not set
916# CONFIG_I2C_I810 is not set
917# CONFIG_I2C_PIIX4 is not set
918# CONFIG_I2C_NFORCE2 is not set
919# CONFIG_I2C_OCORES is not set
920# CONFIG_I2C_PARPORT_LIGHT is not set
921# CONFIG_I2C_PASEMI is not set
922# CONFIG_I2C_PROSAVAGE is not set
923# CONFIG_I2C_SAVAGE4 is not set
924# CONFIG_I2C_SIS5595 is not set
925# CONFIG_I2C_SIS630 is not set
926# CONFIG_I2C_SIS96X is not set
927# CONFIG_I2C_STUB is not set
928# CONFIG_I2C_VIA is not set
929# CONFIG_I2C_VIAPRO is not set
930# CONFIG_I2C_VOODOO3 is not set
931# CONFIG_I2C_PCA_ISA is not set
932CONFIG_I2C_PMCMSP=y
933
934#
935# Miscellaneous I2C Chip support
936#
937# CONFIG_SENSORS_DS1337 is not set
938# CONFIG_SENSORS_DS1374 is not set
939# CONFIG_SENSORS_EEPROM is not set
940# CONFIG_SENSORS_PCF8574 is not set
941CONFIG_PMCTWILED=y
942# CONFIG_SENSORS_PCA9539 is not set
943# CONFIG_SENSORS_PCF8591 is not set
944# CONFIG_SENSORS_MAX6875 is not set
945# CONFIG_I2C_DEBUG_CORE is not set
946# CONFIG_I2C_DEBUG_ALGO is not set
947# CONFIG_I2C_DEBUG_BUS is not set
948# CONFIG_I2C_DEBUG_CHIP is not set
862 949
863# 950#
864# SPI support 951# SPI support
@@ -874,8 +961,57 @@ CONFIG_RTC=y
874# 961#
875# Hardware Monitoring support 962# Hardware Monitoring support
876# 963#
877# CONFIG_HWMON is not set 964CONFIG_HWMON=y
878# CONFIG_HWMON_VID is not set 965# CONFIG_HWMON_VID is not set
966# CONFIG_SENSORS_ABITUGURU is not set
967# CONFIG_SENSORS_ADM1021 is not set
968# CONFIG_SENSORS_ADM1025 is not set
969# CONFIG_SENSORS_ADM1026 is not set
970# CONFIG_SENSORS_ADM1029 is not set
971# CONFIG_SENSORS_ADM1031 is not set
972# CONFIG_SENSORS_ADM9240 is not set
973# CONFIG_SENSORS_ASB100 is not set
974# CONFIG_SENSORS_ATXP1 is not set
975# CONFIG_SENSORS_DS1621 is not set
976# CONFIG_SENSORS_F71805F is not set
977# CONFIG_SENSORS_FSCHER is not set
978# CONFIG_SENSORS_FSCPOS is not set
979# CONFIG_SENSORS_GL518SM is not set
980# CONFIG_SENSORS_GL520SM is not set
981# CONFIG_SENSORS_IT87 is not set
982# CONFIG_SENSORS_LM63 is not set
983# CONFIG_SENSORS_LM75 is not set
984# CONFIG_SENSORS_LM77 is not set
985# CONFIG_SENSORS_LM78 is not set
986# CONFIG_SENSORS_LM80 is not set
987# CONFIG_SENSORS_LM83 is not set
988# CONFIG_SENSORS_LM85 is not set
989# CONFIG_SENSORS_LM87 is not set
990# CONFIG_SENSORS_LM90 is not set
991# CONFIG_SENSORS_LM92 is not set
992# CONFIG_SENSORS_MAX1619 is not set
993# CONFIG_SENSORS_PC87360 is not set
994# CONFIG_SENSORS_PC87427 is not set
995# CONFIG_SENSORS_SIS5595 is not set
996# CONFIG_SENSORS_SMSC47M1 is not set
997# CONFIG_SENSORS_SMSC47M192 is not set
998# CONFIG_SENSORS_SMSC47B397 is not set
999# CONFIG_SENSORS_VIA686A is not set
1000# CONFIG_SENSORS_VT1211 is not set
1001# CONFIG_SENSORS_VT8231 is not set
1002# CONFIG_SENSORS_W83781D is not set
1003# CONFIG_SENSORS_W83791D is not set
1004# CONFIG_SENSORS_W83792D is not set
1005# CONFIG_SENSORS_W83793 is not set
1006# CONFIG_SENSORS_W83L785TS is not set
1007# CONFIG_SENSORS_W83627HF is not set
1008# CONFIG_SENSORS_W83627EHF is not set
1009# CONFIG_HWMON_DEBUG_CHIP is not set
1010
1011#
1012# Multifunction device drivers
1013#
1014# CONFIG_MFD_SM501 is not set
879 1015
880# 1016#
881# Multimedia devices 1017# Multimedia devices
@@ -886,62 +1022,13 @@ CONFIG_RTC=y
886# Digital Video Broadcasting Devices 1022# Digital Video Broadcasting Devices
887# 1023#
888# CONFIG_DVB is not set 1024# CONFIG_DVB is not set
1025# CONFIG_USB_DABUSB is not set
889 1026
890# 1027#
891# Graphics support 1028# Graphics support
892# 1029#
893# CONFIG_FIRMWARE_EDID is not set
894CONFIG_FB=y
895# CONFIG_FB_CFB_FILLRECT is not set
896# CONFIG_FB_CFB_COPYAREA is not set
897# CONFIG_FB_CFB_IMAGEBLIT is not set
898# CONFIG_FB_SVGALIB is not set
899# CONFIG_FB_MACMODES is not set
900# CONFIG_FB_BACKLIGHT is not set
901CONFIG_FB_MODE_HELPERS=y
902# CONFIG_FB_TILEBLITTING is not set
903# CONFIG_FB_CIRRUS is not set
904# CONFIG_FB_PM2 is not set
905# CONFIG_FB_CYBER2000 is not set
906# CONFIG_FB_ASILIANT is not set
907# CONFIG_FB_IMSTT is not set
908# CONFIG_FB_S1D13XXX is not set
909# CONFIG_FB_NVIDIA is not set
910# CONFIG_FB_RIVA is not set
911# CONFIG_FB_MATROX is not set
912# CONFIG_FB_RADEON is not set
913# CONFIG_FB_ATY128 is not set
914# CONFIG_FB_ATY is not set
915# CONFIG_FB_S3 is not set
916# CONFIG_FB_SAVAGE is not set
917# CONFIG_FB_SIS is not set
918# CONFIG_FB_NEOMAGIC is not set
919# CONFIG_FB_KYRO is not set
920# CONFIG_FB_3DFX is not set
921# CONFIG_FB_VOODOO1 is not set
922# CONFIG_FB_SMIVGX is not set
923# CONFIG_FB_TRIDENT is not set
924# CONFIG_FB_VIRTUAL is not set
925
926#
927# Console display driver support
928#
929# CONFIG_VGA_CONSOLE is not set
930CONFIG_DUMMY_CONSOLE=y
931CONFIG_FRAMEBUFFER_CONSOLE=y
932# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
933# CONFIG_FONTS is not set
934CONFIG_FONT_8x8=y
935CONFIG_FONT_8x16=y
936
937#
938# Logo configuration
939#
940CONFIG_LOGO=y
941CONFIG_LOGO_LINUX_MONO=y
942CONFIG_LOGO_LINUX_VGA16=y
943CONFIG_LOGO_LINUX_CLUT224=y
944# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 1030# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1031# CONFIG_FB is not set
945 1032
946# 1033#
947# Sound 1034# Sound
@@ -960,13 +1047,134 @@ CONFIG_HID=y
960CONFIG_USB_ARCH_HAS_HCD=y 1047CONFIG_USB_ARCH_HAS_HCD=y
961CONFIG_USB_ARCH_HAS_OHCI=y 1048CONFIG_USB_ARCH_HAS_OHCI=y
962CONFIG_USB_ARCH_HAS_EHCI=y 1049CONFIG_USB_ARCH_HAS_EHCI=y
963# CONFIG_USB is not set 1050CONFIG_USB=y
1051# CONFIG_USB_DEBUG is not set
1052
1053#
1054# Miscellaneous USB options
1055#
1056CONFIG_USB_DEVICEFS=y
1057# CONFIG_USB_DYNAMIC_MINORS is not set
1058# CONFIG_USB_OTG is not set
1059
1060#
1061# USB Host Controller Drivers
1062#
1063CONFIG_USB_EHCI_HCD=y
1064# CONFIG_USB_EHCI_SPLIT_ISO is not set
1065CONFIG_USB_EHCI_ROOT_HUB_TT=y
1066# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1067# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1068# CONFIG_USB_ISP116X_HCD is not set
1069# CONFIG_USB_OHCI_HCD is not set
1070# CONFIG_USB_UHCI_HCD is not set
1071# CONFIG_USB_SL811_HCD is not set
1072
1073#
1074# USB Device Class drivers
1075#
1076# CONFIG_USB_ACM is not set
1077# CONFIG_USB_PRINTER is not set
964 1078
965# 1079#
966# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1080# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
967# 1081#
968 1082
969# 1083#
1084# may also be needed; see USB_STORAGE Help for more information
1085#
1086CONFIG_USB_STORAGE=y
1087# CONFIG_USB_STORAGE_DEBUG is not set
1088# CONFIG_USB_STORAGE_DATAFAB is not set
1089# CONFIG_USB_STORAGE_FREECOM is not set
1090# CONFIG_USB_STORAGE_DPCM is not set
1091# CONFIG_USB_STORAGE_USBAT is not set
1092# CONFIG_USB_STORAGE_SDDR09 is not set
1093# CONFIG_USB_STORAGE_SDDR55 is not set
1094# CONFIG_USB_STORAGE_JUMPSHOT is not set
1095# CONFIG_USB_STORAGE_ALAUDA is not set
1096# CONFIG_USB_STORAGE_KARMA is not set
1097# CONFIG_USB_LIBUSUAL is not set
1098
1099#
1100# USB Input Devices
1101#
1102# CONFIG_USB_HID is not set
1103
1104#
1105# USB HID Boot Protocol drivers
1106#
1107# CONFIG_USB_KBD is not set
1108# CONFIG_USB_MOUSE is not set
1109# CONFIG_USB_AIPTEK is not set
1110# CONFIG_USB_WACOM is not set
1111# CONFIG_USB_ACECAD is not set
1112# CONFIG_USB_KBTAB is not set
1113# CONFIG_USB_POWERMATE is not set
1114# CONFIG_USB_TOUCHSCREEN is not set
1115# CONFIG_USB_YEALINK is not set
1116# CONFIG_USB_XPAD is not set
1117# CONFIG_USB_ATI_REMOTE is not set
1118# CONFIG_USB_ATI_REMOTE2 is not set
1119# CONFIG_USB_KEYSPAN_REMOTE is not set
1120# CONFIG_USB_APPLETOUCH is not set
1121# CONFIG_USB_GTCO is not set
1122
1123#
1124# USB Imaging devices
1125#
1126# CONFIG_USB_MDC800 is not set
1127# CONFIG_USB_MICROTEK is not set
1128
1129#
1130# USB Network Adapters
1131#
1132# CONFIG_USB_CATC is not set
1133# CONFIG_USB_KAWETH is not set
1134# CONFIG_USB_PEGASUS is not set
1135# CONFIG_USB_RTL8150 is not set
1136# CONFIG_USB_USBNET_MII is not set
1137# CONFIG_USB_USBNET is not set
1138CONFIG_USB_MON=y
1139
1140#
1141# USB port drivers
1142#
1143
1144#
1145# USB Serial Converter support
1146#
1147# CONFIG_USB_SERIAL is not set
1148
1149#
1150# USB Miscellaneous drivers
1151#
1152# CONFIG_USB_EMI62 is not set
1153# CONFIG_USB_EMI26 is not set
1154# CONFIG_USB_ADUTUX is not set
1155# CONFIG_USB_AUERSWALD is not set
1156# CONFIG_USB_RIO500 is not set
1157# CONFIG_USB_LEGOTOWER is not set
1158# CONFIG_USB_LCD is not set
1159# CONFIG_USB_BERRY_CHARGE is not set
1160# CONFIG_USB_LED is not set
1161# CONFIG_USB_CYPRESS_CY7C63 is not set
1162# CONFIG_USB_CYTHERM is not set
1163# CONFIG_USB_PHIDGET is not set
1164# CONFIG_USB_IDMOUSE is not set
1165# CONFIG_USB_FTDI_ELAN is not set
1166# CONFIG_USB_APPLEDISPLAY is not set
1167# CONFIG_USB_SISUSBVGA is not set
1168# CONFIG_USB_LD is not set
1169# CONFIG_USB_TRANCEVIBRATOR is not set
1170# CONFIG_USB_IOWARRIOR is not set
1171# CONFIG_USB_TEST is not set
1172
1173#
1174# USB DSL modem support
1175#
1176
1177#
970# USB Gadget Support 1178# USB Gadget Support
971# 1179#
972# CONFIG_USB_GADGET is not set 1180# CONFIG_USB_GADGET is not set
@@ -1030,37 +1238,22 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1030CONFIG_EXT2_FS=y 1238CONFIG_EXT2_FS=y
1031# CONFIG_EXT2_FS_XATTR is not set 1239# CONFIG_EXT2_FS_XATTR is not set
1032# CONFIG_EXT2_FS_XIP is not set 1240# CONFIG_EXT2_FS_XIP is not set
1033CONFIG_EXT3_FS=m 1241# CONFIG_EXT3_FS is not set
1034CONFIG_EXT3_FS_XATTR=y
1035# CONFIG_EXT3_FS_POSIX_ACL is not set
1036# CONFIG_EXT3_FS_SECURITY is not set
1037# CONFIG_EXT4DEV_FS is not set 1242# CONFIG_EXT4DEV_FS is not set
1038CONFIG_JBD=m 1243# CONFIG_REISERFS_FS is not set
1039# CONFIG_JBD_DEBUG is not set
1040CONFIG_FS_MBCACHE=y
1041CONFIG_REISERFS_FS=m
1042# CONFIG_REISERFS_CHECK is not set
1043# CONFIG_REISERFS_PROC_INFO is not set
1044# CONFIG_REISERFS_FS_XATTR is not set
1045# CONFIG_JFS_FS is not set 1244# CONFIG_JFS_FS is not set
1046CONFIG_FS_POSIX_ACL=y 1245# CONFIG_FS_POSIX_ACL is not set
1047CONFIG_XFS_FS=m 1246# CONFIG_XFS_FS is not set
1048# CONFIG_XFS_QUOTA is not set
1049# CONFIG_XFS_SECURITY is not set
1050# CONFIG_XFS_POSIX_ACL is not set
1051# CONFIG_XFS_RT is not set
1052# CONFIG_GFS2_FS is not set 1247# CONFIG_GFS2_FS is not set
1053# CONFIG_OCFS2_FS is not set 1248# CONFIG_OCFS2_FS is not set
1054# CONFIG_MINIX_FS is not set 1249# CONFIG_MINIX_FS is not set
1055# CONFIG_ROMFS_FS is not set 1250# CONFIG_ROMFS_FS is not set
1056CONFIG_INOTIFY=y 1251# CONFIG_INOTIFY is not set
1057CONFIG_INOTIFY_USER=y
1058# CONFIG_QUOTA is not set 1252# CONFIG_QUOTA is not set
1059CONFIG_DNOTIFY=y 1253# CONFIG_DNOTIFY is not set
1060CONFIG_AUTOFS_FS=y 1254# CONFIG_AUTOFS_FS is not set
1061CONFIG_AUTOFS4_FS=m 1255# CONFIG_AUTOFS4_FS is not set
1062CONFIG_FUSE_FS=m 1256# CONFIG_FUSE_FS is not set
1063CONFIG_GENERIC_ACL=y
1064 1257
1065# 1258#
1066# CD-ROM/DVD Filesystems 1259# CD-ROM/DVD Filesystems
@@ -1071,22 +1264,25 @@ CONFIG_GENERIC_ACL=y
1071# 1264#
1072# DOS/FAT/NT Filesystems 1265# DOS/FAT/NT Filesystems
1073# 1266#
1074# CONFIG_MSDOS_FS is not set 1267CONFIG_FAT_FS=y
1075# CONFIG_VFAT_FS is not set 1268CONFIG_MSDOS_FS=y
1269CONFIG_VFAT_FS=y
1270CONFIG_FAT_DEFAULT_CODEPAGE=437
1271CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1076# CONFIG_NTFS_FS is not set 1272# CONFIG_NTFS_FS is not set
1077 1273
1078# 1274#
1079# Pseudo filesystems 1275# Pseudo filesystems
1080# 1276#
1081CONFIG_PROC_FS=y 1277CONFIG_PROC_FS=y
1082CONFIG_PROC_KCORE=y 1278# CONFIG_PROC_KCORE is not set
1083CONFIG_PROC_SYSCTL=y 1279CONFIG_PROC_SYSCTL=y
1084CONFIG_SYSFS=y 1280CONFIG_SYSFS=y
1085CONFIG_TMPFS=y 1281CONFIG_TMPFS=y
1086CONFIG_TMPFS_POSIX_ACL=y 1282# CONFIG_TMPFS_POSIX_ACL is not set
1087# CONFIG_HUGETLB_PAGE is not set 1283# CONFIG_HUGETLB_PAGE is not set
1088CONFIG_RAMFS=y 1284CONFIG_RAMFS=y
1089CONFIG_CONFIGFS_FS=m 1285# CONFIG_CONFIGFS_FS is not set
1090 1286
1091# 1287#
1092# Miscellaneous filesystems 1288# Miscellaneous filesystems
@@ -1097,8 +1293,21 @@ CONFIG_CONFIGFS_FS=m
1097# CONFIG_HFSPLUS_FS is not set 1293# CONFIG_HFSPLUS_FS is not set
1098# CONFIG_BEFS_FS is not set 1294# CONFIG_BEFS_FS is not set
1099# CONFIG_BFS_FS is not set 1295# CONFIG_BFS_FS is not set
1100CONFIG_EFS_FS=y 1296# CONFIG_EFS_FS is not set
1101CONFIG_CRAMFS=y 1297CONFIG_JFFS2_FS=y
1298CONFIG_JFFS2_FS_DEBUG=0
1299CONFIG_JFFS2_FS_WRITEBUFFER=y
1300# CONFIG_JFFS2_SUMMARY is not set
1301# CONFIG_JFFS2_FS_XATTR is not set
1302# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1303CONFIG_JFFS2_ZLIB=y
1304CONFIG_JFFS2_RTIME=y
1305# CONFIG_JFFS2_RUBIN is not set
1306# CONFIG_CRAMFS is not set
1307CONFIG_SQUASHFS=y
1308CONFIG_SQUASHFS_EMBEDDED=y
1309CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
1310CONFIG_SQUASHFS_VMALLOC=y
1102# CONFIG_VXFS_FS is not set 1311# CONFIG_VXFS_FS is not set
1103# CONFIG_HPFS_FS is not set 1312# CONFIG_HPFS_FS is not set
1104# CONFIG_QNX4FS_FS is not set 1313# CONFIG_QNX4FS_FS is not set
@@ -1108,26 +1317,9 @@ CONFIG_CRAMFS=y
1108# 1317#
1109# Network File Systems 1318# Network File Systems
1110# 1319#
1111CONFIG_NFS_FS=y 1320# CONFIG_NFS_FS is not set
1112CONFIG_NFS_V3=y 1321# CONFIG_NFSD is not set
1113# CONFIG_NFS_V3_ACL is not set 1322# CONFIG_SMB_FS is not set
1114# CONFIG_NFS_V4 is not set
1115# CONFIG_NFS_DIRECTIO is not set
1116CONFIG_NFSD=y
1117CONFIG_NFSD_V3=y
1118# CONFIG_NFSD_V3_ACL is not set
1119# CONFIG_NFSD_V4 is not set
1120# CONFIG_NFSD_TCP is not set
1121CONFIG_ROOT_NFS=y
1122CONFIG_LOCKD=y
1123CONFIG_LOCKD_V4=y
1124CONFIG_EXPORTFS=y
1125CONFIG_NFS_COMMON=y
1126CONFIG_SUNRPC=y
1127# CONFIG_RPCSEC_GSS_KRB5 is not set
1128# CONFIG_RPCSEC_GSS_SPKM3 is not set
1129CONFIG_SMB_FS=m
1130# CONFIG_SMB_NLS_DEFAULT is not set
1131# CONFIG_CIFS is not set 1323# CONFIG_CIFS is not set
1132# CONFIG_NCP_FS is not set 1324# CONFIG_NCP_FS is not set
1133# CONFIG_CODA_FS is not set 1325# CONFIG_CODA_FS is not set
@@ -1143,9 +1335,9 @@ CONFIG_MSDOS_PARTITION=y
1143# 1335#
1144# Native Language Support 1336# Native Language Support
1145# 1337#
1146CONFIG_NLS=m 1338CONFIG_NLS=y
1147CONFIG_NLS_DEFAULT="iso8859-1" 1339CONFIG_NLS_DEFAULT="iso8859-1"
1148# CONFIG_NLS_CODEPAGE_437 is not set 1340CONFIG_NLS_CODEPAGE_437=y
1149# CONFIG_NLS_CODEPAGE_737 is not set 1341# CONFIG_NLS_CODEPAGE_737 is not set
1150# CONFIG_NLS_CODEPAGE_775 is not set 1342# CONFIG_NLS_CODEPAGE_775 is not set
1151# CONFIG_NLS_CODEPAGE_850 is not set 1343# CONFIG_NLS_CODEPAGE_850 is not set
@@ -1169,7 +1361,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1169# CONFIG_NLS_CODEPAGE_1250 is not set 1361# CONFIG_NLS_CODEPAGE_1250 is not set
1170# CONFIG_NLS_CODEPAGE_1251 is not set 1362# CONFIG_NLS_CODEPAGE_1251 is not set
1171# CONFIG_NLS_ASCII is not set 1363# CONFIG_NLS_ASCII is not set
1172# CONFIG_NLS_ISO8859_1 is not set 1364CONFIG_NLS_ISO8859_1=y
1173# CONFIG_NLS_ISO8859_2 is not set 1365# CONFIG_NLS_ISO8859_2 is not set
1174# CONFIG_NLS_ISO8859_3 is not set 1366# CONFIG_NLS_ISO8859_3 is not set
1175# CONFIG_NLS_ISO8859_4 is not set 1367# CONFIG_NLS_ISO8859_4 is not set
@@ -1187,10 +1379,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1187# 1379#
1188# Distributed Lock Manager 1380# Distributed Lock Manager
1189# 1381#
1190CONFIG_DLM=m 1382# CONFIG_DLM is not set
1191CONFIG_DLM_TCP=y
1192# CONFIG_DLM_SCTP is not set
1193# CONFIG_DLM_DEBUG is not set
1194 1383
1195# 1384#
1196# Profiling support 1385# Profiling support
@@ -1203,14 +1392,40 @@ CONFIG_DLM_TCP=y
1203CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1392CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1204# CONFIG_PRINTK_TIME is not set 1393# CONFIG_PRINTK_TIME is not set
1205CONFIG_ENABLE_MUST_CHECK=y 1394CONFIG_ENABLE_MUST_CHECK=y
1206# CONFIG_MAGIC_SYSRQ is not set 1395CONFIG_MAGIC_SYSRQ=y
1207# CONFIG_UNUSED_SYMBOLS is not set 1396# CONFIG_UNUSED_SYMBOLS is not set
1208# CONFIG_DEBUG_FS is not set 1397# CONFIG_DEBUG_FS is not set
1209# CONFIG_HEADERS_CHECK is not set 1398# CONFIG_HEADERS_CHECK is not set
1210# CONFIG_DEBUG_KERNEL is not set 1399CONFIG_DEBUG_KERNEL=y
1400# CONFIG_DEBUG_SHIRQ is not set
1211CONFIG_LOG_BUF_SHIFT=14 1401CONFIG_LOG_BUF_SHIFT=14
1402CONFIG_DETECT_SOFTLOCKUP=y
1403# CONFIG_SCHEDSTATS is not set
1404# CONFIG_TIMER_STATS is not set
1405# CONFIG_DEBUG_SLAB is not set
1406CONFIG_DEBUG_PREEMPT=y
1407# CONFIG_DEBUG_RT_MUTEXES is not set
1408# CONFIG_RT_MUTEX_TESTER is not set
1409# CONFIG_DEBUG_SPINLOCK is not set
1410# CONFIG_DEBUG_MUTEXES is not set
1411# CONFIG_DEBUG_LOCK_ALLOC is not set
1412# CONFIG_PROVE_LOCKING is not set
1413# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1414# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1415# CONFIG_DEBUG_KOBJECT is not set
1416# CONFIG_DEBUG_INFO is not set
1417# CONFIG_DEBUG_VM is not set
1418# CONFIG_DEBUG_LIST is not set
1419CONFIG_FORCED_INLINING=y
1420# CONFIG_RCU_TORTURE_TEST is not set
1421# CONFIG_FAULT_INJECTION is not set
1212CONFIG_CROSSCOMPILE=y 1422CONFIG_CROSSCOMPILE=y
1213CONFIG_CMDLINE="ip=any root=nfs" 1423CONFIG_CMDLINE=""
1424# CONFIG_DEBUG_STACK_USAGE is not set
1425# CONFIG_KGDB is not set
1426CONFIG_SYS_SUPPORTS_KGDB=y
1427# CONFIG_RUNTIME_DEBUG is not set
1428# CONFIG_MIPS_UNCACHED is not set
1214 1429
1215# 1430#
1216# Security options 1431# Security options
@@ -1223,41 +1438,40 @@ CONFIG_CMDLINE="ip=any root=nfs"
1223# 1438#
1224CONFIG_CRYPTO=y 1439CONFIG_CRYPTO=y
1225CONFIG_CRYPTO_ALGAPI=y 1440CONFIG_CRYPTO_ALGAPI=y
1226CONFIG_CRYPTO_BLKCIPHER=m 1441CONFIG_CRYPTO_BLKCIPHER=y
1227CONFIG_CRYPTO_HASH=y 1442CONFIG_CRYPTO_HASH=y
1228CONFIG_CRYPTO_MANAGER=y 1443CONFIG_CRYPTO_MANAGER=y
1229CONFIG_CRYPTO_HMAC=y 1444CONFIG_CRYPTO_HMAC=y
1230CONFIG_CRYPTO_XCBC=m 1445# CONFIG_CRYPTO_XCBC is not set
1231CONFIG_CRYPTO_NULL=m 1446CONFIG_CRYPTO_NULL=y
1232CONFIG_CRYPTO_MD4=m 1447# CONFIG_CRYPTO_MD4 is not set
1233CONFIG_CRYPTO_MD5=y 1448CONFIG_CRYPTO_MD5=y
1234CONFIG_CRYPTO_SHA1=m 1449CONFIG_CRYPTO_SHA1=y
1235CONFIG_CRYPTO_SHA256=m 1450# CONFIG_CRYPTO_SHA256 is not set
1236CONFIG_CRYPTO_SHA512=m 1451# CONFIG_CRYPTO_SHA512 is not set
1237CONFIG_CRYPTO_WP512=m 1452# CONFIG_CRYPTO_WP512 is not set
1238CONFIG_CRYPTO_TGR192=m 1453# CONFIG_CRYPTO_TGR192 is not set
1239CONFIG_CRYPTO_GF128MUL=m 1454# CONFIG_CRYPTO_GF128MUL is not set
1240CONFIG_CRYPTO_ECB=m 1455# CONFIG_CRYPTO_ECB is not set
1241CONFIG_CRYPTO_CBC=m 1456CONFIG_CRYPTO_CBC=y
1242CONFIG_CRYPTO_PCBC=m 1457# CONFIG_CRYPTO_PCBC is not set
1243CONFIG_CRYPTO_LRW=m 1458# CONFIG_CRYPTO_LRW is not set
1244CONFIG_CRYPTO_DES=m 1459CONFIG_CRYPTO_DES=y
1245CONFIG_CRYPTO_FCRYPT=m 1460# CONFIG_CRYPTO_FCRYPT is not set
1246CONFIG_CRYPTO_BLOWFISH=m 1461# CONFIG_CRYPTO_BLOWFISH is not set
1247CONFIG_CRYPTO_TWOFISH=m 1462# CONFIG_CRYPTO_TWOFISH is not set
1248CONFIG_CRYPTO_TWOFISH_COMMON=m 1463# CONFIG_CRYPTO_SERPENT is not set
1249CONFIG_CRYPTO_SERPENT=m 1464CONFIG_CRYPTO_AES=y
1250CONFIG_CRYPTO_AES=m 1465# CONFIG_CRYPTO_CAST5 is not set
1251CONFIG_CRYPTO_CAST5=m 1466# CONFIG_CRYPTO_CAST6 is not set
1252CONFIG_CRYPTO_CAST6=m 1467# CONFIG_CRYPTO_TEA is not set
1253CONFIG_CRYPTO_TEA=m 1468# CONFIG_CRYPTO_ARC4 is not set
1254CONFIG_CRYPTO_ARC4=m 1469# CONFIG_CRYPTO_KHAZAD is not set
1255CONFIG_CRYPTO_KHAZAD=m 1470# CONFIG_CRYPTO_ANUBIS is not set
1256CONFIG_CRYPTO_ANUBIS=m 1471CONFIG_CRYPTO_DEFLATE=y
1257CONFIG_CRYPTO_DEFLATE=m 1472# CONFIG_CRYPTO_MICHAEL_MIC is not set
1258CONFIG_CRYPTO_MICHAEL_MIC=m 1473# CONFIG_CRYPTO_CRC32C is not set
1259CONFIG_CRYPTO_CRC32C=m 1474# CONFIG_CRYPTO_CAMELLIA is not set
1260CONFIG_CRYPTO_CAMELLIA=m
1261# CONFIG_CRYPTO_TEST is not set 1475# CONFIG_CRYPTO_TEST is not set
1262 1476
1263# 1477#
@@ -1268,16 +1482,12 @@ CONFIG_CRYPTO_CAMELLIA=m
1268# Library routines 1482# Library routines
1269# 1483#
1270CONFIG_BITREVERSE=y 1484CONFIG_BITREVERSE=y
1271CONFIG_CRC_CCITT=m 1485# CONFIG_CRC_CCITT is not set
1272CONFIG_CRC16=m 1486# CONFIG_CRC16 is not set
1273CONFIG_CRC32=y 1487CONFIG_CRC32=y
1274CONFIG_LIBCRC32C=m 1488# CONFIG_LIBCRC32C is not set
1275CONFIG_ZLIB_INFLATE=y 1489CONFIG_ZLIB_INFLATE=y
1276CONFIG_ZLIB_DEFLATE=m 1490CONFIG_ZLIB_DEFLATE=y
1277CONFIG_TEXTSEARCH=y
1278CONFIG_TEXTSEARCH_KMP=m
1279CONFIG_TEXTSEARCH_BM=m
1280CONFIG_TEXTSEARCH_FSM=m
1281CONFIG_PLIST=y 1491CONFIG_PLIST=y
1282CONFIG_HAS_IOMEM=y 1492CONFIG_HAS_IOMEM=y
1283CONFIG_HAS_IOPORT=y 1493CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/ocelot_c_defconfig b/arch/mips/configs/ocelot_c_defconfig
deleted file mode 100644
index 82ff6fc0cd..0000000000
--- a/arch/mips/configs/ocelot_c_defconfig
+++ /dev/null
@@ -1,982 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Tue Feb 20 21:47:36 2007
5#
6CONFIG_MIPS=y
7
8#
9# Machine selection
10#
11CONFIG_ZONE_DMA=y
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set
34# CONFIG_WR_PPMC is not set
35# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39CONFIG_MOMENCO_OCELOT_C=y
40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set
43# CONFIG_PNX8550_STB810 is not set
44# CONFIG_DDB5477 is not set
45# CONFIG_MACH_VR41XX is not set
46# CONFIG_PMC_YOSEMITE is not set
47# CONFIG_QEMU is not set
48# CONFIG_MARKEINS is not set
49# CONFIG_SGI_IP22 is not set
50# CONFIG_SGI_IP27 is not set
51# CONFIG_SGI_IP32 is not set
52# CONFIG_SIBYTE_BIGSUR is not set
53# CONFIG_SIBYTE_SWARM is not set
54# CONFIG_SIBYTE_SENTOSA is not set
55# CONFIG_SIBYTE_RHONE is not set
56# CONFIG_SIBYTE_CARMEL is not set
57# CONFIG_SIBYTE_PTSWARM is not set
58# CONFIG_SIBYTE_LITTLESUR is not set
59# CONFIG_SIBYTE_CRHINE is not set
60# CONFIG_SIBYTE_CRHONE is not set
61# CONFIG_SNI_RM is not set
62# CONFIG_TOSHIBA_JMR3927 is not set
63# CONFIG_TOSHIBA_RBTX4927 is not set
64# CONFIG_TOSHIBA_RBTX4938 is not set
65CONFIG_RWSEM_GENERIC_SPINLOCK=y
66# CONFIG_ARCH_HAS_ILOG2_U32 is not set
67# CONFIG_ARCH_HAS_ILOG2_U64 is not set
68CONFIG_GENERIC_FIND_NEXT_BIT=y
69CONFIG_GENERIC_HWEIGHT=y
70CONFIG_GENERIC_CALIBRATE_DELAY=y
71CONFIG_GENERIC_TIME=y
72CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
73CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
74CONFIG_DMA_NONCOHERENT=y
75CONFIG_DMA_NEED_PCI_MAP_STATE=y
76CONFIG_CPU_BIG_ENDIAN=y
77# CONFIG_CPU_LITTLE_ENDIAN is not set
78CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
79CONFIG_IRQ_CPU=y
80CONFIG_IRQ_MV64340=y
81CONFIG_PCI_MARVELL=y
82CONFIG_SWAP_IO_SPACE=y
83CONFIG_MIPS_L1_CACHE_SHIFT=5
84
85#
86# CPU selection
87#
88# CONFIG_CPU_MIPS32_R1 is not set
89# CONFIG_CPU_MIPS32_R2 is not set
90# CONFIG_CPU_MIPS64_R1 is not set
91# CONFIG_CPU_MIPS64_R2 is not set
92# CONFIG_CPU_R3000 is not set
93# CONFIG_CPU_TX39XX is not set
94# CONFIG_CPU_VR41XX is not set
95# CONFIG_CPU_R4300 is not set
96# CONFIG_CPU_R4X00 is not set
97# CONFIG_CPU_TX49XX is not set
98# CONFIG_CPU_R5000 is not set
99# CONFIG_CPU_R5432 is not set
100# CONFIG_CPU_R6000 is not set
101# CONFIG_CPU_NEVADA is not set
102# CONFIG_CPU_R8000 is not set
103# CONFIG_CPU_R10000 is not set
104CONFIG_CPU_RM7000=y
105# CONFIG_CPU_RM9000 is not set
106# CONFIG_CPU_SB1 is not set
107CONFIG_SYS_HAS_CPU_RM7000=y
108CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
109CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
110CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
111CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
112
113#
114# Kernel type
115#
116# CONFIG_32BIT is not set
117CONFIG_64BIT=y
118CONFIG_PAGE_SIZE_4KB=y
119# CONFIG_PAGE_SIZE_8KB is not set
120# CONFIG_PAGE_SIZE_16KB is not set
121# CONFIG_PAGE_SIZE_64KB is not set
122CONFIG_BOARD_SCACHE=y
123CONFIG_RM7000_CPU_SCACHE=y
124CONFIG_CPU_HAS_PREFETCH=y
125CONFIG_MIPS_MT_DISABLED=y
126# CONFIG_MIPS_MT_SMP is not set
127# CONFIG_MIPS_MT_SMTC is not set
128# CONFIG_MIPS_VPE_LOADER is not set
129CONFIG_CPU_HAS_LLSC=y
130CONFIG_CPU_HAS_SYNC=y
131CONFIG_GENERIC_HARDIRQS=y
132CONFIG_GENERIC_IRQ_PROBE=y
133CONFIG_CPU_SUPPORTS_HIGHMEM=y
134CONFIG_ARCH_FLATMEM_ENABLE=y
135CONFIG_SELECT_MEMORY_MODEL=y
136CONFIG_FLATMEM_MANUAL=y
137# CONFIG_DISCONTIGMEM_MANUAL is not set
138# CONFIG_SPARSEMEM_MANUAL is not set
139CONFIG_FLATMEM=y
140CONFIG_FLAT_NODE_MEM_MAP=y
141# CONFIG_SPARSEMEM_STATIC is not set
142CONFIG_SPLIT_PTLOCK_CPUS=4
143CONFIG_RESOURCES_64BIT=y
144CONFIG_ZONE_DMA_FLAG=1
145# CONFIG_HZ_48 is not set
146# CONFIG_HZ_100 is not set
147# CONFIG_HZ_128 is not set
148# CONFIG_HZ_250 is not set
149# CONFIG_HZ_256 is not set
150CONFIG_HZ_1000=y
151# CONFIG_HZ_1024 is not set
152CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
153CONFIG_HZ=1000
154CONFIG_PREEMPT_NONE=y
155# CONFIG_PREEMPT_VOLUNTARY is not set
156# CONFIG_PREEMPT is not set
157# CONFIG_KEXEC is not set
158CONFIG_LOCKDEP_SUPPORT=y
159CONFIG_STACKTRACE_SUPPORT=y
160CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
161
162#
163# Code maturity level options
164#
165CONFIG_EXPERIMENTAL=y
166CONFIG_BROKEN_ON_SMP=y
167CONFIG_INIT_ENV_ARG_LIMIT=32
168
169#
170# General setup
171#
172CONFIG_LOCALVERSION=""
173CONFIG_LOCALVERSION_AUTO=y
174CONFIG_SWAP=y
175CONFIG_SYSVIPC=y
176# CONFIG_IPC_NS is not set
177CONFIG_SYSVIPC_SYSCTL=y
178# CONFIG_POSIX_MQUEUE is not set
179# CONFIG_BSD_PROCESS_ACCT is not set
180# CONFIG_TASKSTATS is not set
181# CONFIG_UTS_NS is not set
182# CONFIG_AUDIT is not set
183# CONFIG_IKCONFIG is not set
184CONFIG_SYSFS_DEPRECATED=y
185CONFIG_RELAY=y
186# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
187CONFIG_SYSCTL=y
188CONFIG_EMBEDDED=y
189CONFIG_SYSCTL_SYSCALL=y
190CONFIG_KALLSYMS=y
191# CONFIG_KALLSYMS_EXTRA_PASS is not set
192CONFIG_HOTPLUG=y
193CONFIG_PRINTK=y
194CONFIG_BUG=y
195CONFIG_ELF_CORE=y
196CONFIG_BASE_FULL=y
197CONFIG_FUTEX=y
198CONFIG_EPOLL=y
199CONFIG_SHMEM=y
200CONFIG_SLAB=y
201CONFIG_VM_EVENT_COUNTERS=y
202CONFIG_RT_MUTEXES=y
203# CONFIG_TINY_SHMEM is not set
204CONFIG_BASE_SMALL=0
205# CONFIG_SLOB is not set
206
207#
208# Loadable module support
209#
210# CONFIG_MODULES is not set
211
212#
213# Block layer
214#
215CONFIG_BLOCK=y
216# CONFIG_BLK_DEV_IO_TRACE is not set
217
218#
219# IO Schedulers
220#
221CONFIG_IOSCHED_NOOP=y
222CONFIG_IOSCHED_AS=y
223CONFIG_IOSCHED_DEADLINE=y
224CONFIG_IOSCHED_CFQ=y
225CONFIG_DEFAULT_AS=y
226# CONFIG_DEFAULT_DEADLINE is not set
227# CONFIG_DEFAULT_CFQ is not set
228# CONFIG_DEFAULT_NOOP is not set
229CONFIG_DEFAULT_IOSCHED="anticipatory"
230
231#
232# Bus options (PCI, PCMCIA, EISA, ISA, TC)
233#
234CONFIG_HW_HAS_PCI=y
235CONFIG_PCI=y
236CONFIG_MMU=y
237
238#
239# PCCARD (PCMCIA/CardBus) support
240#
241# CONFIG_PCCARD is not set
242
243#
244# PCI Hotplug Support
245#
246# CONFIG_HOTPLUG_PCI is not set
247
248#
249# Executable file formats
250#
251CONFIG_BINFMT_ELF=y
252# CONFIG_BINFMT_MISC is not set
253# CONFIG_BUILD_ELF64 is not set
254CONFIG_MIPS32_COMPAT=y
255CONFIG_COMPAT=y
256CONFIG_SYSVIPC_COMPAT=y
257CONFIG_MIPS32_O32=y
258CONFIG_MIPS32_N32=y
259CONFIG_BINFMT_ELF32=y
260
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#
270# Networking
271#
272CONFIG_NET=y
273
274#
275# Networking options
276#
277# CONFIG_NETDEBUG is not set
278# CONFIG_PACKET is not set
279CONFIG_UNIX=y
280CONFIG_XFRM=y
281CONFIG_XFRM_USER=y
282# CONFIG_XFRM_SUB_POLICY is not set
283CONFIG_XFRM_MIGRATE=y
284CONFIG_NET_KEY=y
285CONFIG_NET_KEY_MIGRATE=y
286CONFIG_INET=y
287# CONFIG_IP_MULTICAST is not set
288# CONFIG_IP_ADVANCED_ROUTER is not set
289CONFIG_IP_FIB_HASH=y
290CONFIG_IP_PNP=y
291CONFIG_IP_PNP_DHCP=y
292# CONFIG_IP_PNP_BOOTP is not set
293# CONFIG_IP_PNP_RARP is not set
294# CONFIG_NET_IPIP is not set
295# CONFIG_NET_IPGRE is not set
296# CONFIG_ARPD is not set
297# CONFIG_SYN_COOKIES is not set
298# CONFIG_INET_AH is not set
299# CONFIG_INET_ESP is not set
300# CONFIG_INET_IPCOMP is not set
301# CONFIG_INET_XFRM_TUNNEL is not set
302# CONFIG_INET_TUNNEL is not set
303CONFIG_INET_XFRM_MODE_TRANSPORT=y
304CONFIG_INET_XFRM_MODE_TUNNEL=y
305CONFIG_INET_XFRM_MODE_BEET=y
306CONFIG_INET_DIAG=y
307CONFIG_INET_TCP_DIAG=y
308# CONFIG_TCP_CONG_ADVANCED is not set
309CONFIG_TCP_CONG_CUBIC=y
310CONFIG_DEFAULT_TCP_CONG="cubic"
311CONFIG_TCP_MD5SIG=y
312# CONFIG_IPV6 is not set
313# CONFIG_INET6_XFRM_TUNNEL is not set
314# CONFIG_INET6_TUNNEL is not set
315CONFIG_NETWORK_SECMARK=y
316# CONFIG_NETFILTER is not set
317
318#
319# DCCP Configuration (EXPERIMENTAL)
320#
321# CONFIG_IP_DCCP is not set
322
323#
324# SCTP Configuration (EXPERIMENTAL)
325#
326# CONFIG_IP_SCTP is not set
327
328#
329# TIPC Configuration (EXPERIMENTAL)
330#
331# CONFIG_TIPC is not set
332# CONFIG_ATM is not set
333# CONFIG_BRIDGE is not set
334# CONFIG_VLAN_8021Q is not set
335# CONFIG_DECNET is not set
336# CONFIG_LLC2 is not set
337# CONFIG_IPX is not set
338# CONFIG_ATALK is not set
339# CONFIG_X25 is not set
340# CONFIG_LAPB is not set
341# CONFIG_ECONET is not set
342# CONFIG_WAN_ROUTER is not set
343
344#
345# QoS and/or fair queueing
346#
347# CONFIG_NET_SCHED is not set
348
349#
350# Network testing
351#
352# CONFIG_NET_PKTGEN is not set
353# CONFIG_HAMRADIO is not set
354# CONFIG_IRDA is not set
355# CONFIG_BT is not set
356CONFIG_IEEE80211=y
357# CONFIG_IEEE80211_DEBUG is not set
358CONFIG_IEEE80211_CRYPT_WEP=y
359CONFIG_IEEE80211_CRYPT_CCMP=y
360CONFIG_IEEE80211_SOFTMAC=y
361# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
362CONFIG_WIRELESS_EXT=y
363
364#
365# Device Drivers
366#
367
368#
369# Generic Driver Options
370#
371CONFIG_STANDALONE=y
372CONFIG_PREVENT_FIRMWARE_BUILD=y
373CONFIG_FW_LOADER=y
374# CONFIG_SYS_HYPERVISOR is not set
375
376#
377# Connector - unified userspace <-> kernelspace linker
378#
379CONFIG_CONNECTOR=y
380CONFIG_PROC_EVENTS=y
381
382#
383# Memory Technology Devices (MTD)
384#
385# CONFIG_MTD is not set
386
387#
388# Parallel port support
389#
390# CONFIG_PARPORT is not set
391
392#
393# Plug and Play support
394#
395# CONFIG_PNPACPI is not set
396
397#
398# Block devices
399#
400# CONFIG_BLK_CPQ_DA is not set
401# CONFIG_BLK_CPQ_CISS_DA is not set
402# CONFIG_BLK_DEV_DAC960 is not set
403# CONFIG_BLK_DEV_UMEM is not set
404# CONFIG_BLK_DEV_COW_COMMON is not set
405# CONFIG_BLK_DEV_LOOP is not set
406# CONFIG_BLK_DEV_NBD is not set
407# CONFIG_BLK_DEV_SX8 is not set
408# CONFIG_BLK_DEV_RAM is not set
409# CONFIG_BLK_DEV_INITRD is not set
410CONFIG_CDROM_PKTCDVD=y
411CONFIG_CDROM_PKTCDVD_BUFFERS=8
412# CONFIG_CDROM_PKTCDVD_WCACHE is not set
413CONFIG_ATA_OVER_ETH=y
414
415#
416# Misc devices
417#
418CONFIG_SGI_IOC4=y
419# CONFIG_TIFM_CORE is not set
420
421#
422# ATA/ATAPI/MFM/RLL support
423#
424# CONFIG_IDE is not set
425
426#
427# SCSI device support
428#
429CONFIG_RAID_ATTRS=y
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
437
438#
439# Multi-device support (RAID and LVM)
440#
441# CONFIG_MD is not set
442
443#
444# Fusion MPT device support
445#
446# CONFIG_FUSION is not set
447
448#
449# IEEE 1394 (FireWire) support
450#
451# CONFIG_IEEE1394 is not set
452
453#
454# I2O device support
455#
456# CONFIG_I2O is not set
457
458#
459# Network device support
460#
461CONFIG_NETDEVICES=y
462# CONFIG_DUMMY is not set
463# CONFIG_BONDING is not set
464# CONFIG_EQUALIZER is not set
465# CONFIG_TUN is not set
466
467#
468# ARCnet devices
469#
470# CONFIG_ARCNET is not set
471
472#
473# PHY device support
474#
475CONFIG_PHYLIB=y
476
477#
478# MII PHY device drivers
479#
480CONFIG_MARVELL_PHY=y
481CONFIG_DAVICOM_PHY=y
482CONFIG_QSEMI_PHY=y
483CONFIG_LXT_PHY=y
484CONFIG_CICADA_PHY=y
485CONFIG_VITESSE_PHY=y
486CONFIG_SMSC_PHY=y
487# CONFIG_BROADCOM_PHY is not set
488# CONFIG_FIXED_PHY is not set
489
490#
491# Ethernet (10 or 100Mbit)
492#
493CONFIG_NET_ETHERNET=y
494# CONFIG_MII is not set
495# CONFIG_HAPPYMEAL is not set
496# CONFIG_SUNGEM is not set
497# CONFIG_CASSINI is not set
498# CONFIG_NET_VENDOR_3COM is not set
499# CONFIG_DM9000 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_MV643XX_ETH is not set
525CONFIG_QLA3XXX=y
526# CONFIG_ATL1 is not set
527
528#
529# Ethernet (10000 Mbit)
530#
531# CONFIG_CHELSIO_T1 is not set
532CONFIG_CHELSIO_T3=y
533# CONFIG_IXGB is not set
534# CONFIG_S2IO is not set
535# CONFIG_MYRI10GE is not set
536CONFIG_NETXEN_NIC=y
537
538#
539# Token Ring devices
540#
541# CONFIG_TR is not set
542
543#
544# Wireless LAN (non-hamradio)
545#
546# CONFIG_NET_RADIO is not set
547
548#
549# Wan interfaces
550#
551# CONFIG_WAN is not set
552# CONFIG_FDDI is not set
553# CONFIG_HIPPI is not set
554# CONFIG_PPP is not set
555# CONFIG_SLIP is not set
556# CONFIG_SHAPER is not set
557# CONFIG_NETCONSOLE is not set
558# CONFIG_NETPOLL is not set
559# CONFIG_NET_POLL_CONTROLLER is not set
560
561#
562# ISDN subsystem
563#
564# CONFIG_ISDN is not set
565
566#
567# Telephony Support
568#
569# CONFIG_PHONE is not set
570
571#
572# Input device support
573#
574CONFIG_INPUT=y
575# CONFIG_INPUT_FF_MEMLESS is not set
576
577#
578# Userland interfaces
579#
580CONFIG_INPUT_MOUSEDEV=y
581CONFIG_INPUT_MOUSEDEV_PSAUX=y
582CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
583CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
584# CONFIG_INPUT_JOYDEV is not set
585# CONFIG_INPUT_TSDEV is not set
586# CONFIG_INPUT_EVDEV is not set
587# CONFIG_INPUT_EVBUG is not set
588
589#
590# Input Device Drivers
591#
592# CONFIG_INPUT_KEYBOARD is not set
593# CONFIG_INPUT_MOUSE is not set
594# CONFIG_INPUT_JOYSTICK is not set
595# CONFIG_INPUT_TOUCHSCREEN is not set
596# CONFIG_INPUT_MISC is not set
597
598#
599# Hardware I/O ports
600#
601CONFIG_SERIO=y
602# CONFIG_SERIO_I8042 is not set
603CONFIG_SERIO_SERPORT=y
604# CONFIG_SERIO_PCIPS2 is not set
605# CONFIG_SERIO_LIBPS2 is not set
606CONFIG_SERIO_RAW=y
607# CONFIG_GAMEPORT is not set
608
609#
610# Character devices
611#
612CONFIG_VT=y
613CONFIG_VT_CONSOLE=y
614CONFIG_HW_CONSOLE=y
615CONFIG_VT_HW_CONSOLE_BINDING=y
616# CONFIG_SERIAL_NONSTANDARD is not set
617
618#
619# Serial drivers
620#
621CONFIG_SERIAL_8250=y
622CONFIG_SERIAL_8250_CONSOLE=y
623CONFIG_SERIAL_8250_PCI=y
624CONFIG_SERIAL_8250_NR_UARTS=4
625CONFIG_SERIAL_8250_RUNTIME_UARTS=4
626# CONFIG_SERIAL_8250_EXTENDED is not set
627
628#
629# Non-8250 serial port support
630#
631CONFIG_SERIAL_CORE=y
632CONFIG_SERIAL_CORE_CONSOLE=y
633# CONFIG_SERIAL_JSM is not set
634CONFIG_UNIX98_PTYS=y
635CONFIG_LEGACY_PTYS=y
636CONFIG_LEGACY_PTY_COUNT=256
637
638#
639# IPMI
640#
641# CONFIG_IPMI_HANDLER is not set
642
643#
644# Watchdog Cards
645#
646# CONFIG_WATCHDOG is not set
647# CONFIG_HW_RANDOM is not set
648# CONFIG_RTC is not set
649# CONFIG_GEN_RTC is not set
650# CONFIG_DTLK is not set
651# CONFIG_R3964 is not set
652# CONFIG_APPLICOM is not set
653# CONFIG_DRM is not set
654# CONFIG_RAW_DRIVER is not set
655
656#
657# TPM devices
658#
659# CONFIG_TCG_TPM is not set
660
661#
662# I2C support
663#
664# CONFIG_I2C is not set
665
666#
667# SPI support
668#
669# CONFIG_SPI is not set
670# CONFIG_SPI_MASTER is not set
671
672#
673# Dallas's 1-wire bus
674#
675# CONFIG_W1 is not set
676
677#
678# Hardware Monitoring support
679#
680# CONFIG_HWMON is not set
681# CONFIG_HWMON_VID is not set
682
683#
684# Multimedia devices
685#
686# CONFIG_VIDEO_DEV is not set
687
688#
689# Digital Video Broadcasting Devices
690#
691# CONFIG_DVB is not set
692
693#
694# Graphics support
695#
696# CONFIG_FIRMWARE_EDID is not set
697# CONFIG_FB is not set
698
699#
700# Console display driver support
701#
702# CONFIG_VGA_CONSOLE is not set
703CONFIG_DUMMY_CONSOLE=y
704# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
705
706#
707# Sound
708#
709# CONFIG_SOUND is not set
710
711#
712# HID Devices
713#
714# CONFIG_HID is not set
715
716#
717# USB support
718#
719CONFIG_USB_ARCH_HAS_HCD=y
720CONFIG_USB_ARCH_HAS_OHCI=y
721CONFIG_USB_ARCH_HAS_EHCI=y
722# CONFIG_USB is not set
723
724#
725# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
726#
727
728#
729# USB Gadget Support
730#
731# CONFIG_USB_GADGET is not set
732
733#
734# MMC/SD Card support
735#
736# CONFIG_MMC 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#
750
751#
752# InfiniBand support
753#
754# CONFIG_INFINIBAND is not set
755
756#
757# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
758#
759
760#
761# Real Time Clock
762#
763# CONFIG_RTC_CLASS is not set
764
765#
766# DMA Engine support
767#
768# CONFIG_DMA_ENGINE is not set
769
770#
771# DMA Clients
772#
773
774#
775# DMA Devices
776#
777
778#
779# Auxiliary Display support
780#
781
782#
783# Virtualization
784#
785
786#
787# File systems
788#
789CONFIG_EXT2_FS=y
790# CONFIG_EXT2_FS_XATTR is not set
791# CONFIG_EXT2_FS_XIP is not set
792# CONFIG_EXT3_FS is not set
793# CONFIG_EXT4DEV_FS is not set
794# CONFIG_REISERFS_FS is not set
795# CONFIG_JFS_FS is not set
796CONFIG_FS_POSIX_ACL=y
797# CONFIG_XFS_FS is not set
798# CONFIG_GFS2_FS is not set
799# CONFIG_OCFS2_FS is not set
800# CONFIG_MINIX_FS is not set
801# CONFIG_ROMFS_FS is not set
802CONFIG_INOTIFY=y
803CONFIG_INOTIFY_USER=y
804# CONFIG_QUOTA is not set
805CONFIG_DNOTIFY=y
806# CONFIG_AUTOFS_FS is not set
807# CONFIG_AUTOFS4_FS is not set
808CONFIG_FUSE_FS=y
809CONFIG_GENERIC_ACL=y
810
811#
812# CD-ROM/DVD Filesystems
813#
814# CONFIG_ISO9660_FS is not set
815# CONFIG_UDF_FS is not set
816
817#
818# DOS/FAT/NT Filesystems
819#
820# CONFIG_MSDOS_FS is not set
821# CONFIG_VFAT_FS is not set
822# CONFIG_NTFS_FS is not set
823
824#
825# Pseudo filesystems
826#
827CONFIG_PROC_FS=y
828CONFIG_PROC_KCORE=y
829CONFIG_PROC_SYSCTL=y
830CONFIG_SYSFS=y
831CONFIG_TMPFS=y
832CONFIG_TMPFS_POSIX_ACL=y
833# CONFIG_HUGETLB_PAGE is not set
834CONFIG_RAMFS=y
835CONFIG_CONFIGFS_FS=y
836
837#
838# Miscellaneous filesystems
839#
840# CONFIG_ADFS_FS is not set
841# CONFIG_AFFS_FS is not set
842# CONFIG_ECRYPT_FS is not set
843# CONFIG_HFS_FS is not set
844# CONFIG_HFSPLUS_FS is not set
845# CONFIG_BEFS_FS is not set
846# CONFIG_BFS_FS is not set
847# CONFIG_EFS_FS is not set
848# CONFIG_CRAMFS is not set
849# CONFIG_VXFS_FS is not set
850# CONFIG_HPFS_FS is not set
851# CONFIG_QNX4FS_FS is not set
852# CONFIG_SYSV_FS is not set
853# CONFIG_UFS_FS is not set
854
855#
856# Network File Systems
857#
858CONFIG_NFS_FS=y
859# CONFIG_NFS_V3 is not set
860# CONFIG_NFS_V4 is not set
861# CONFIG_NFS_DIRECTIO is not set
862CONFIG_NFSD=y
863# CONFIG_NFSD_V3 is not set
864# CONFIG_NFSD_TCP is not set
865CONFIG_ROOT_NFS=y
866CONFIG_LOCKD=y
867CONFIG_EXPORTFS=y
868CONFIG_NFS_COMMON=y
869CONFIG_SUNRPC=y
870# CONFIG_RPCSEC_GSS_KRB5 is not set
871# CONFIG_RPCSEC_GSS_SPKM3 is not set
872# CONFIG_SMB_FS is not set
873# CONFIG_CIFS is not set
874# CONFIG_NCP_FS is not set
875# CONFIG_CODA_FS is not set
876# CONFIG_AFS_FS is not set
877# CONFIG_9P_FS is not set
878
879#
880# Partition Types
881#
882# CONFIG_PARTITION_ADVANCED is not set
883CONFIG_MSDOS_PARTITION=y
884
885#
886# Native Language Support
887#
888# CONFIG_NLS is not set
889
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#
899# Profiling support
900#
901# CONFIG_PROFILING is not set
902
903#
904# Kernel hacking
905#
906CONFIG_TRACE_IRQFLAGS_SUPPORT=y
907# CONFIG_PRINTK_TIME is not set
908CONFIG_ENABLE_MUST_CHECK=y
909# CONFIG_MAGIC_SYSRQ is not set
910# CONFIG_UNUSED_SYMBOLS is not set
911# CONFIG_DEBUG_FS is not set
912# CONFIG_HEADERS_CHECK is not set
913# CONFIG_DEBUG_KERNEL is not set
914CONFIG_LOG_BUF_SHIFT=14
915CONFIG_CROSSCOMPILE=y
916CONFIG_CMDLINE=""
917
918#
919# Security options
920#
921CONFIG_KEYS=y
922CONFIG_KEYS_DEBUG_PROC_KEYS=y
923# CONFIG_SECURITY is not set
924
925#
926# Cryptographic options
927#
928CONFIG_CRYPTO=y
929CONFIG_CRYPTO_ALGAPI=y
930CONFIG_CRYPTO_BLKCIPHER=y
931CONFIG_CRYPTO_HASH=y
932CONFIG_CRYPTO_MANAGER=y
933CONFIG_CRYPTO_HMAC=y
934CONFIG_CRYPTO_XCBC=y
935CONFIG_CRYPTO_NULL=y
936CONFIG_CRYPTO_MD4=y
937CONFIG_CRYPTO_MD5=y
938CONFIG_CRYPTO_SHA1=y
939CONFIG_CRYPTO_SHA256=y
940CONFIG_CRYPTO_SHA512=y
941CONFIG_CRYPTO_WP512=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
948CONFIG_CRYPTO_DES=y
949CONFIG_CRYPTO_FCRYPT=y
950CONFIG_CRYPTO_BLOWFISH=y
951CONFIG_CRYPTO_TWOFISH=y
952CONFIG_CRYPTO_TWOFISH_COMMON=y
953CONFIG_CRYPTO_SERPENT=y
954CONFIG_CRYPTO_AES=y
955CONFIG_CRYPTO_CAST5=y
956CONFIG_CRYPTO_CAST6=y
957CONFIG_CRYPTO_TEA=y
958CONFIG_CRYPTO_ARC4=y
959CONFIG_CRYPTO_KHAZAD=y
960CONFIG_CRYPTO_ANUBIS=y
961CONFIG_CRYPTO_DEFLATE=y
962CONFIG_CRYPTO_MICHAEL_MIC=y
963CONFIG_CRYPTO_CRC32C=y
964CONFIG_CRYPTO_CAMELLIA=y
965
966#
967# Hardware crypto devices
968#
969
970#
971# Library routines
972#
973CONFIG_BITREVERSE=y
974# CONFIG_CRC_CCITT is not set
975CONFIG_CRC16=y
976CONFIG_CRC32=y
977CONFIG_LIBCRC32C=y
978CONFIG_ZLIB_INFLATE=y
979CONFIG_ZLIB_DEFLATE=y
980CONFIG_PLIST=y
981CONFIG_HAS_IOMEM=y
982CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/ocelot_defconfig b/arch/mips/configs/ocelot_defconfig
index 15a027e00e..e1db1fb80c 100644
--- a/arch/mips/configs/ocelot_defconfig
+++ b/arch/mips/configs/ocelot_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37CONFIG_MOMENCO_OCELOT=y 35CONFIG_MOMENCO_OCELOT=y
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/pb1100_defconfig b/arch/mips/configs/pb1100_defconfig
index 37d696c645..0028aef0af 100644
--- a/arch/mips/configs/pb1100_defconfig
+++ b/arch/mips/configs/pb1100_defconfig
@@ -26,9 +26,7 @@ CONFIG_MIPS_PB1100=y
26# CONFIG_BASLER_EXCITE is not set 26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_MIPS_PB1100=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/pb1500_defconfig b/arch/mips/configs/pb1500_defconfig
index b11f0e8b60..8a1d588873 100644
--- a/arch/mips/configs/pb1500_defconfig
+++ b/arch/mips/configs/pb1500_defconfig
@@ -26,9 +26,7 @@ CONFIG_MIPS_PB1500=y
26# CONFIG_BASLER_EXCITE is not set 26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_MIPS_PB1500=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/pb1550_defconfig b/arch/mips/configs/pb1550_defconfig
index 2927f38f49..5581ad2ca4 100644
--- a/arch/mips/configs/pb1550_defconfig
+++ b/arch/mips/configs/pb1550_defconfig
@@ -26,9 +26,7 @@ CONFIG_MIPS_PB1550=y
26# CONFIG_BASLER_EXCITE is not set 26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MIPS_EV64120 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
33# CONFIG_MIPS_MALTA is not set 31# CONFIG_MIPS_MALTA is not set
34# CONFIG_MIPS_SEAD is not set 32# CONFIG_MIPS_SEAD is not set
@@ -36,8 +34,6 @@ CONFIG_MIPS_PB1550=y
36# CONFIG_MIPS_SIM is not set 34# CONFIG_MIPS_SIM is not set
37# CONFIG_MOMENCO_JAGUAR_ATX is not set 35# CONFIG_MOMENCO_JAGUAR_ATX is not set
38# CONFIG_MOMENCO_OCELOT is not set 36# CONFIG_MOMENCO_OCELOT is not set
39# CONFIG_MOMENCO_OCELOT_3 is not set
40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 37# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 38# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_JBS is not set 39# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/pnx8550-jbs_defconfig b/arch/mips/configs/pnx8550-jbs_defconfig
index fae16c5ec5..821c1cee56 100644
--- a/arch/mips/configs/pnx8550-jbs_defconfig
+++ b/arch/mips/configs/pnx8550-jbs_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42CONFIG_PNX8550_JBS=y 38CONFIG_PNX8550_JBS=y
diff --git a/arch/mips/configs/pnx8550-stb810_defconfig b/arch/mips/configs/pnx8550-stb810_defconfig
index cd821e5218..0e8bd92b38 100644
--- a/arch/mips/configs/pnx8550-stb810_defconfig
+++ b/arch/mips/configs/pnx8550-stb810_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/qemu_defconfig b/arch/mips/configs/qemu_defconfig
index 8e8d031579..703de002e3 100644
--- a/arch/mips/configs/qemu_defconfig
+++ b/arch/mips/configs/qemu_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
@@ -225,7 +221,7 @@ CONFIG_DEFAULT_IOSCHED="noop"
225# 221#
226CONFIG_ISA=y 222CONFIG_ISA=y
227CONFIG_MMU=y 223CONFIG_MMU=y
228CONFIG_I8253=y 224CONFIG_PCSPEAKER=y
229 225
230# 226#
231# PCCARD (PCMCIA/CardBus) support 227# PCCARD (PCMCIA/CardBus) support
diff --git a/arch/mips/configs/rbhma4200_defconfig b/arch/mips/configs/rbhma4200_defconfig
index 35d6426091..20a38526d4 100644
--- a/arch/mips/configs/rbhma4200_defconfig
+++ b/arch/mips/configs/rbhma4200_defconfig
@@ -24,17 +24,13 @@ CONFIG_MIPS=y
24# CONFIG_BASLER_EXCITE is not set 24# CONFIG_BASLER_EXCITE is not set
25# CONFIG_MIPS_COBALT is not set 25# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 26# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MACH_JAZZ is not set 27# CONFIG_MACH_JAZZ is not set
29# CONFIG_LASAT is not set
30# CONFIG_MIPS_ATLAS is not set 28# CONFIG_MIPS_ATLAS is not set
31# CONFIG_MIPS_MALTA is not set 29# CONFIG_MIPS_MALTA is not set
32# CONFIG_MIPS_SEAD is not set 30# CONFIG_MIPS_SEAD is not set
33# CONFIG_WR_PPMC is not set 31# CONFIG_WR_PPMC is not set
34# CONFIG_MIPS_SIM is not set 32# CONFIG_MIPS_SIM is not set
35# CONFIG_MOMENCO_OCELOT is not set 33# CONFIG_MOMENCO_OCELOT is not set
36# CONFIG_MOMENCO_OCELOT_3 is not set
37# CONFIG_MOMENCO_OCELOT_C is not set
38# CONFIG_MIPS_XXS1500 is not set 34# CONFIG_MIPS_XXS1500 is not set
39# CONFIG_PNX8550_JBS is not set 35# CONFIG_PNX8550_JBS is not set
40# CONFIG_PNX8550_STB810 is not set 36# CONFIG_PNX8550_STB810 is not set
diff --git a/arch/mips/configs/rbhma4500_defconfig b/arch/mips/configs/rbhma4500_defconfig
index 41011f770a..5dbb250f71 100644
--- a/arch/mips/configs/rbhma4500_defconfig
+++ b/arch/mips/configs/rbhma4500_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 3# Linux kernel version: 2.6.22-rc5
4# Tue Feb 20 21:47:39 2007 4# Fri Jun 22 21:39:45 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
@@ -9,40 +9,23 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y 11CONFIG_ZONE_DMA=y
12# CONFIG_MIPS_MTX1 is not set 12# CONFIG_LEMOTE_FULONG is not set
13# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MACH_ALCHEMY is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set 14# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 15# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 16# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 17# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 18# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 19# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 20# CONFIG_MIPS_SEAD is not set
34# CONFIG_WR_PPMC is not set 21# CONFIG_WR_PPMC is not set
35# CONFIG_MIPS_SIM is not set 22# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 23# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 24# CONFIG_PNX8550_JBS is not set
43# CONFIG_PNX8550_STB810 is not set 25# CONFIG_PNX8550_STB810 is not set
44# CONFIG_DDB5477 is not set 26# CONFIG_DDB5477 is not set
45# CONFIG_MACH_VR41XX is not set 27# CONFIG_MACH_VR41XX is not set
28# CONFIG_PMC_MSP is not set
46# CONFIG_PMC_YOSEMITE is not set 29# CONFIG_PMC_YOSEMITE is not set
47# CONFIG_QEMU is not set 30# CONFIG_QEMU is not set
48# CONFIG_MARKEINS is not set 31# CONFIG_MARKEINS is not set
@@ -82,6 +65,8 @@ CONFIG_DMA_NONCOHERENT=y
82CONFIG_DMA_NEED_PCI_MAP_STATE=y 65CONFIG_DMA_NEED_PCI_MAP_STATE=y
83CONFIG_GENERIC_ISA_DMA=y 66CONFIG_GENERIC_ISA_DMA=y
84CONFIG_I8259=y 67CONFIG_I8259=y
68# CONFIG_NO_IOPORT is not set
69CONFIG_GENERIC_GPIO=y
85# CONFIG_CPU_BIG_ENDIAN is not set 70# CONFIG_CPU_BIG_ENDIAN is not set
86CONFIG_CPU_LITTLE_ENDIAN=y 71CONFIG_CPU_LITTLE_ENDIAN=y
87CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y 72CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
@@ -93,6 +78,7 @@ CONFIG_HAVE_STD_PC_SERIAL_PORT=y
93# 78#
94# CPU selection 79# CPU selection
95# 80#
81# CONFIG_CPU_LOONGSON2 is not set
96# CONFIG_CPU_MIPS32_R1 is not set 82# CONFIG_CPU_MIPS32_R1 is not set
97# CONFIG_CPU_MIPS32_R2 is not set 83# CONFIG_CPU_MIPS32_R2 is not set
98# CONFIG_CPU_MIPS64_R1 is not set 84# CONFIG_CPU_MIPS64_R1 is not set
@@ -149,12 +135,12 @@ CONFIG_ZONE_DMA_FLAG=1
149# CONFIG_HZ_48 is not set 135# CONFIG_HZ_48 is not set
150# CONFIG_HZ_100 is not set 136# CONFIG_HZ_100 is not set
151# CONFIG_HZ_128 is not set 137# CONFIG_HZ_128 is not set
152# CONFIG_HZ_250 is not set 138CONFIG_HZ_250=y
153# CONFIG_HZ_256 is not set 139# CONFIG_HZ_256 is not set
154CONFIG_HZ_1000=y 140# CONFIG_HZ_1000 is not set
155# CONFIG_HZ_1024 is not set 141# CONFIG_HZ_1024 is not set
156CONFIG_SYS_SUPPORTS_ARBIT_HZ=y 142CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
157CONFIG_HZ=1000 143CONFIG_HZ=250
158CONFIG_PREEMPT_NONE=y 144CONFIG_PREEMPT_NONE=y
159# CONFIG_PREEMPT_VOLUNTARY is not set 145# CONFIG_PREEMPT_VOLUNTARY is not set
160# CONFIG_PREEMPT is not set 146# CONFIG_PREEMPT is not set
@@ -186,28 +172,35 @@ CONFIG_SYSVIPC_SYSCTL=y
186# CONFIG_AUDIT is not set 172# CONFIG_AUDIT is not set
187CONFIG_IKCONFIG=y 173CONFIG_IKCONFIG=y
188CONFIG_IKCONFIG_PROC=y 174CONFIG_IKCONFIG_PROC=y
175CONFIG_LOG_BUF_SHIFT=14
189CONFIG_SYSFS_DEPRECATED=y 176CONFIG_SYSFS_DEPRECATED=y
190CONFIG_RELAY=y 177# CONFIG_RELAY is not set
178CONFIG_BLK_DEV_INITRD=y
191CONFIG_INITRAMFS_SOURCE="" 179CONFIG_INITRAMFS_SOURCE=""
192# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 180CONFIG_CC_OPTIMIZE_FOR_SIZE=y
193CONFIG_SYSCTL=y 181CONFIG_SYSCTL=y
194CONFIG_EMBEDDED=y 182CONFIG_EMBEDDED=y
195CONFIG_SYSCTL_SYSCALL=y 183CONFIG_SYSCTL_SYSCALL=y
196CONFIG_KALLSYMS=y 184CONFIG_KALLSYMS=y
197# CONFIG_KALLSYMS_EXTRA_PASS is not set 185# CONFIG_KALLSYMS_EXTRA_PASS is not set
198CONFIG_HOTPLUG=y 186# CONFIG_HOTPLUG is not set
199CONFIG_PRINTK=y 187CONFIG_PRINTK=y
200CONFIG_BUG=y 188CONFIG_BUG=y
201CONFIG_ELF_CORE=y 189CONFIG_ELF_CORE=y
202CONFIG_BASE_FULL=y 190CONFIG_BASE_FULL=y
203# CONFIG_FUTEX is not set 191# CONFIG_FUTEX is not set
192CONFIG_ANON_INODES=y
204# CONFIG_EPOLL is not set 193# CONFIG_EPOLL is not set
194CONFIG_SIGNALFD=y
195CONFIG_TIMERFD=y
196CONFIG_EVENTFD=y
205CONFIG_SHMEM=y 197CONFIG_SHMEM=y
206CONFIG_SLAB=y
207CONFIG_VM_EVENT_COUNTERS=y 198CONFIG_VM_EVENT_COUNTERS=y
199CONFIG_SLAB=y
200# CONFIG_SLUB is not set
201# CONFIG_SLOB is not set
208# CONFIG_TINY_SHMEM is not set 202# CONFIG_TINY_SHMEM is not set
209CONFIG_BASE_SMALL=0 203CONFIG_BASE_SMALL=0
210# CONFIG_SLOB is not set
211 204
212# 205#
213# Loadable module support 206# Loadable module support
@@ -244,17 +237,12 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
244# 237#
245CONFIG_HW_HAS_PCI=y 238CONFIG_HW_HAS_PCI=y
246CONFIG_PCI=y 239CONFIG_PCI=y
240# CONFIG_ARCH_SUPPORTS_MSI is not set
247CONFIG_MMU=y 241CONFIG_MMU=y
248 242
249# 243#
250# PCCARD (PCMCIA/CardBus) support 244# PCCARD (PCMCIA/CardBus) support
251# 245#
252# CONFIG_PCCARD is not set
253
254#
255# PCI Hotplug Support
256#
257# CONFIG_HOTPLUG_PCI is not set
258 246
259# 247#
260# Executable file formats 248# Executable file formats
@@ -266,10 +254,7 @@ CONFIG_TRAD_SIGNALS=y
266# 254#
267# Power management options 255# Power management options
268# 256#
269CONFIG_PM=y 257# CONFIG_PM is not set
270# CONFIG_PM_LEGACY is not set
271# CONFIG_PM_DEBUG is not set
272# CONFIG_PM_SYSFS_DEPRECATED is not set
273 258
274# 259#
275# Networking 260# Networking
@@ -279,14 +264,9 @@ CONFIG_NET=y
279# 264#
280# Networking options 265# Networking options
281# 266#
282# CONFIG_NETDEBUG is not set
283CONFIG_PACKET=y 267CONFIG_PACKET=y
284# CONFIG_PACKET_MMAP is not set 268# CONFIG_PACKET_MMAP is not set
285CONFIG_UNIX=y 269CONFIG_UNIX=y
286CONFIG_XFRM=y
287# CONFIG_XFRM_USER is not set
288# CONFIG_XFRM_SUB_POLICY is not set
289CONFIG_XFRM_MIGRATE=y
290# CONFIG_NET_KEY is not set 270# CONFIG_NET_KEY is not set
291CONFIG_INET=y 271CONFIG_INET=y
292CONFIG_IP_MULTICAST=y 272CONFIG_IP_MULTICAST=y
@@ -294,7 +274,7 @@ CONFIG_IP_MULTICAST=y
294CONFIG_IP_FIB_HASH=y 274CONFIG_IP_FIB_HASH=y
295CONFIG_IP_PNP=y 275CONFIG_IP_PNP=y
296# CONFIG_IP_PNP_DHCP is not set 276# CONFIG_IP_PNP_DHCP is not set
297CONFIG_IP_PNP_BOOTP=y 277# CONFIG_IP_PNP_BOOTP is not set
298# CONFIG_IP_PNP_RARP is not set 278# CONFIG_IP_PNP_RARP is not set
299# CONFIG_NET_IPIP is not set 279# CONFIG_NET_IPIP is not set
300# CONFIG_NET_IPGRE is not set 280# CONFIG_NET_IPGRE is not set
@@ -305,130 +285,23 @@ CONFIG_IP_PNP_BOOTP=y
305# CONFIG_INET_ESP is not set 285# CONFIG_INET_ESP is not set
306# CONFIG_INET_IPCOMP is not set 286# CONFIG_INET_IPCOMP is not set
307# CONFIG_INET_XFRM_TUNNEL is not set 287# CONFIG_INET_XFRM_TUNNEL is not set
308CONFIG_INET_TUNNEL=m 288# CONFIG_INET_TUNNEL is not set
309CONFIG_INET_XFRM_MODE_TRANSPORT=m 289# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
310CONFIG_INET_XFRM_MODE_TUNNEL=m 290# CONFIG_INET_XFRM_MODE_TUNNEL is not set
311CONFIG_INET_XFRM_MODE_BEET=m 291# CONFIG_INET_XFRM_MODE_BEET is not set
312CONFIG_INET_DIAG=y 292CONFIG_INET_DIAG=y
313CONFIG_INET_TCP_DIAG=y 293CONFIG_INET_TCP_DIAG=y
314# CONFIG_TCP_CONG_ADVANCED is not set 294# CONFIG_TCP_CONG_ADVANCED is not set
315CONFIG_TCP_CONG_CUBIC=y 295CONFIG_TCP_CONG_CUBIC=y
316CONFIG_DEFAULT_TCP_CONG="cubic" 296CONFIG_DEFAULT_TCP_CONG="cubic"
317CONFIG_TCP_MD5SIG=y 297# CONFIG_TCP_MD5SIG is not set
318 298# CONFIG_IPV6 is not set
319#
320# IP: Virtual Server Configuration
321#
322# CONFIG_IP_VS is not set
323CONFIG_IPV6=m
324# CONFIG_IPV6_PRIVACY is not set
325CONFIG_IPV6_ROUTER_PREF=y
326CONFIG_IPV6_ROUTE_INFO=y
327# CONFIG_INET6_AH is not set
328# CONFIG_INET6_ESP is not set
329# CONFIG_INET6_IPCOMP is not set
330CONFIG_IPV6_MIP6=y
331# CONFIG_INET6_XFRM_TUNNEL is not set 299# CONFIG_INET6_XFRM_TUNNEL is not set
332# CONFIG_INET6_TUNNEL is not set 300# CONFIG_INET6_TUNNEL is not set
333CONFIG_INET6_XFRM_MODE_TRANSPORT=m 301# CONFIG_NETWORK_SECMARK is not set
334CONFIG_INET6_XFRM_MODE_TUNNEL=m 302# CONFIG_NETFILTER is not set
335CONFIG_INET6_XFRM_MODE_BEET=m
336CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
337CONFIG_IPV6_SIT=m
338# CONFIG_IPV6_TUNNEL is not set
339CONFIG_IPV6_MULTIPLE_TABLES=y
340CONFIG_IPV6_SUBTREES=y
341CONFIG_NETWORK_SECMARK=y
342CONFIG_NETFILTER=y
343# CONFIG_NETFILTER_DEBUG is not set
344
345#
346# Core Netfilter Configuration
347#
348CONFIG_NETFILTER_NETLINK=m
349CONFIG_NETFILTER_NETLINK_QUEUE=m
350CONFIG_NETFILTER_NETLINK_LOG=m
351CONFIG_NF_CONNTRACK_ENABLED=m
352CONFIG_NF_CONNTRACK_SUPPORT=y
353# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
354CONFIG_NF_CONNTRACK=m
355CONFIG_NF_CT_ACCT=y
356CONFIG_NF_CONNTRACK_MARK=y
357CONFIG_NF_CONNTRACK_SECMARK=y
358CONFIG_NF_CONNTRACK_EVENTS=y
359CONFIG_NF_CT_PROTO_GRE=m
360CONFIG_NF_CT_PROTO_SCTP=m
361CONFIG_NF_CONNTRACK_AMANDA=m
362CONFIG_NF_CONNTRACK_FTP=m
363CONFIG_NF_CONNTRACK_H323=m
364CONFIG_NF_CONNTRACK_IRC=m
365# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
366CONFIG_NF_CONNTRACK_PPTP=m
367CONFIG_NF_CONNTRACK_SANE=m
368CONFIG_NF_CONNTRACK_SIP=m
369CONFIG_NF_CONNTRACK_TFTP=m
370CONFIG_NF_CT_NETLINK=m
371CONFIG_NETFILTER_XTABLES=m
372CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
373CONFIG_NETFILTER_XT_TARGET_MARK=m
374CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
375CONFIG_NETFILTER_XT_TARGET_NFLOG=m
376CONFIG_NETFILTER_XT_TARGET_SECMARK=m
377CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
378CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
379CONFIG_NETFILTER_XT_MATCH_COMMENT=m
380CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
381CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
382CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
383CONFIG_NETFILTER_XT_MATCH_DCCP=m
384CONFIG_NETFILTER_XT_MATCH_DSCP=m
385CONFIG_NETFILTER_XT_MATCH_ESP=m
386CONFIG_NETFILTER_XT_MATCH_HELPER=m
387CONFIG_NETFILTER_XT_MATCH_LENGTH=m
388CONFIG_NETFILTER_XT_MATCH_LIMIT=m
389CONFIG_NETFILTER_XT_MATCH_MAC=m
390CONFIG_NETFILTER_XT_MATCH_MARK=m
391# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
392CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
393CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
394CONFIG_NETFILTER_XT_MATCH_QUOTA=m
395CONFIG_NETFILTER_XT_MATCH_REALM=m
396CONFIG_NETFILTER_XT_MATCH_SCTP=m
397CONFIG_NETFILTER_XT_MATCH_STATE=m
398CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
399CONFIG_NETFILTER_XT_MATCH_STRING=m
400CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
401CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
402
403#
404# IP: Netfilter Configuration
405#
406CONFIG_NF_CONNTRACK_IPV4=m
407CONFIG_NF_CONNTRACK_PROC_COMPAT=y
408# CONFIG_IP_NF_QUEUE is not set
409# CONFIG_IP_NF_IPTABLES is not set
410# CONFIG_IP_NF_ARPTABLES is not set
411
412#
413# IPv6: Netfilter Configuration (EXPERIMENTAL)
414#
415CONFIG_NF_CONNTRACK_IPV6=m
416# CONFIG_IP6_NF_QUEUE is not set
417# CONFIG_IP6_NF_IPTABLES is not set
418
419#
420# DCCP Configuration (EXPERIMENTAL)
421#
422# CONFIG_IP_DCCP is not set 303# CONFIG_IP_DCCP is not set
423
424#
425# SCTP Configuration (EXPERIMENTAL)
426#
427# CONFIG_IP_SCTP is not set 304# CONFIG_IP_SCTP is not set
428
429#
430# TIPC Configuration (EXPERIMENTAL)
431#
432# CONFIG_TIPC is not set 305# CONFIG_TIPC is not set
433# CONFIG_ATM is not set 306# CONFIG_ATM is not set
434# CONFIG_BRIDGE is not set 307# CONFIG_BRIDGE is not set
@@ -446,7 +319,6 @@ CONFIG_NF_CONNTRACK_IPV6=m
446# QoS and/or fair queueing 319# QoS and/or fair queueing
447# 320#
448# CONFIG_NET_SCHED is not set 321# CONFIG_NET_SCHED is not set
449CONFIG_NET_CLS_ROUTE=y
450 322
451# 323#
452# Network testing 324# Network testing
@@ -455,15 +327,16 @@ CONFIG_NET_CLS_ROUTE=y
455# CONFIG_HAMRADIO is not set 327# CONFIG_HAMRADIO is not set
456# CONFIG_IRDA is not set 328# CONFIG_IRDA is not set
457# CONFIG_BT is not set 329# CONFIG_BT is not set
458CONFIG_IEEE80211=m 330# CONFIG_AF_RXRPC is not set
459# CONFIG_IEEE80211_DEBUG is not set 331
460CONFIG_IEEE80211_CRYPT_WEP=m 332#
461CONFIG_IEEE80211_CRYPT_CCMP=m 333# Wireless
462CONFIG_IEEE80211_CRYPT_TKIP=m 334#
463CONFIG_IEEE80211_SOFTMAC=m 335# CONFIG_CFG80211 is not set
464# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set 336# CONFIG_WIRELESS_EXT is not set
465CONFIG_WIRELESS_EXT=y 337# CONFIG_MAC80211 is not set
466CONFIG_FIB_RULES=y 338# CONFIG_IEEE80211 is not set
339# CONFIG_RFKILL is not set
467 340
468# 341#
469# Device Drivers 342# Device Drivers
@@ -474,94 +347,13 @@ CONFIG_FIB_RULES=y
474# 347#
475CONFIG_STANDALONE=y 348CONFIG_STANDALONE=y
476CONFIG_PREVENT_FIRMWARE_BUILD=y 349CONFIG_PREVENT_FIRMWARE_BUILD=y
477CONFIG_FW_LOADER=m
478# CONFIG_SYS_HYPERVISOR is not set 350# CONFIG_SYS_HYPERVISOR is not set
479 351
480# 352#
481# Connector - unified userspace <-> kernelspace linker 353# Connector - unified userspace <-> kernelspace linker
482# 354#
483CONFIG_CONNECTOR=m 355# CONFIG_CONNECTOR is not set
484 356# CONFIG_MTD is not set
485#
486# Memory Technology Devices (MTD)
487#
488CONFIG_MTD=y
489# CONFIG_MTD_DEBUG is not set
490# CONFIG_MTD_CONCAT is not set
491CONFIG_MTD_PARTITIONS=y
492# CONFIG_MTD_REDBOOT_PARTS is not set
493# CONFIG_MTD_CMDLINE_PARTS is not set
494
495#
496# User Modules And Translation Layers
497#
498CONFIG_MTD_CHAR=y
499CONFIG_MTD_BLKDEVS=y
500CONFIG_MTD_BLOCK=y
501# CONFIG_FTL is not set
502# CONFIG_NFTL is not set
503# CONFIG_INFTL is not set
504# CONFIG_RFD_FTL is not set
505# CONFIG_SSFDC is not set
506
507#
508# RAM/ROM/Flash chip drivers
509#
510CONFIG_MTD_CFI=y
511# CONFIG_MTD_JEDECPROBE is not set
512CONFIG_MTD_GEN_PROBE=y
513# CONFIG_MTD_CFI_ADV_OPTIONS is not set
514CONFIG_MTD_MAP_BANK_WIDTH_1=y
515CONFIG_MTD_MAP_BANK_WIDTH_2=y
516CONFIG_MTD_MAP_BANK_WIDTH_4=y
517# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
518# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
519# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
520CONFIG_MTD_CFI_I1=y
521CONFIG_MTD_CFI_I2=y
522# CONFIG_MTD_CFI_I4 is not set
523# CONFIG_MTD_CFI_I8 is not set
524CONFIG_MTD_CFI_INTELEXT=y
525CONFIG_MTD_CFI_AMDSTD=y
526# CONFIG_MTD_CFI_STAA is not set
527CONFIG_MTD_CFI_UTIL=y
528# CONFIG_MTD_RAM is not set
529# CONFIG_MTD_ROM is not set
530# CONFIG_MTD_ABSENT is not set
531# CONFIG_MTD_OBSOLETE_CHIPS is not set
532
533#
534# Mapping drivers for chip access
535#
536# CONFIG_MTD_COMPLEX_MAPPINGS is not set
537# CONFIG_MTD_PHYSMAP is not set
538# CONFIG_MTD_PLATRAM is not set
539
540#
541# Self-contained MTD device drivers
542#
543# CONFIG_MTD_PMC551 is not set
544# CONFIG_MTD_SLRAM is not set
545# CONFIG_MTD_PHRAM is not set
546# CONFIG_MTD_MTDRAM is not set
547# CONFIG_MTD_BLOCK2MTD is not set
548
549#
550# Disk-On-Chip Device Drivers
551#
552# CONFIG_MTD_DOC2000 is not set
553# CONFIG_MTD_DOC2001 is not set
554# CONFIG_MTD_DOC2001PLUS is not set
555
556#
557# NAND Flash Device Drivers
558#
559# CONFIG_MTD_NAND is not set
560
561#
562# OneNAND Flash Device Drivers
563#
564# CONFIG_MTD_ONENAND is not set
565 357
566# 358#
567# Parallel port support 359# Parallel port support
@@ -583,93 +375,30 @@ CONFIG_MTD_CFI_UTIL=y
583# CONFIG_BLK_DEV_COW_COMMON is not set 375# CONFIG_BLK_DEV_COW_COMMON is not set
584CONFIG_BLK_DEV_LOOP=y 376CONFIG_BLK_DEV_LOOP=y
585# CONFIG_BLK_DEV_CRYPTOLOOP is not set 377# CONFIG_BLK_DEV_CRYPTOLOOP is not set
586CONFIG_BLK_DEV_NBD=m 378# CONFIG_BLK_DEV_NBD is not set
587# CONFIG_BLK_DEV_SX8 is not set 379# CONFIG_BLK_DEV_SX8 is not set
588# CONFIG_BLK_DEV_UB is not set
589CONFIG_BLK_DEV_RAM=y 380CONFIG_BLK_DEV_RAM=y
590CONFIG_BLK_DEV_RAM_COUNT=16 381CONFIG_BLK_DEV_RAM_COUNT=16
591CONFIG_BLK_DEV_RAM_SIZE=8192 382CONFIG_BLK_DEV_RAM_SIZE=8192
592CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 383CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
593CONFIG_BLK_DEV_INITRD=y
594# CONFIG_CDROM_PKTCDVD is not set 384# CONFIG_CDROM_PKTCDVD is not set
595# CONFIG_ATA_OVER_ETH is not set 385# CONFIG_ATA_OVER_ETH is not set
596 386
597# 387#
598# Misc devices 388# Misc devices
599# 389#
600CONFIG_SGI_IOC4=m 390# CONFIG_PHANTOM is not set
391# CONFIG_SGI_IOC4 is not set
601# CONFIG_TIFM_CORE is not set 392# CONFIG_TIFM_CORE is not set
602 393# CONFIG_BLINK is not set
603# 394# CONFIG_IDE is not set
604# ATA/ATAPI/MFM/RLL support
605#
606CONFIG_IDE=y
607CONFIG_IDE_MAX_HWIFS=4
608CONFIG_BLK_DEV_IDE=y
609
610#
611# Please see Documentation/ide.txt for help/info on IDE drives
612#
613# CONFIG_BLK_DEV_IDE_SATA is not set
614CONFIG_BLK_DEV_IDEDISK=y
615# CONFIG_IDEDISK_MULTI_MODE is not set
616CONFIG_BLK_DEV_IDECD=y
617# CONFIG_BLK_DEV_IDETAPE is not set
618# CONFIG_BLK_DEV_IDEFLOPPY is not set
619# CONFIG_IDE_TASK_IOCTL is not set
620
621#
622# IDE chipset support/bugfixes
623#
624CONFIG_IDE_GENERIC=y
625CONFIG_BLK_DEV_IDEPCI=y
626CONFIG_IDEPCI_SHARE_IRQ=y
627# CONFIG_BLK_DEV_OFFBOARD is not set
628# CONFIG_BLK_DEV_GENERIC is not set
629# CONFIG_BLK_DEV_OPTI621 is not set
630CONFIG_BLK_DEV_IDEDMA_PCI=y
631# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
632# CONFIG_IDEDMA_PCI_AUTO is not set
633# CONFIG_BLK_DEV_AEC62XX is not set
634# CONFIG_BLK_DEV_ALI15X3 is not set
635# CONFIG_BLK_DEV_AMD74XX is not set
636# CONFIG_BLK_DEV_CMD64X is not set
637# CONFIG_BLK_DEV_TRIFLEX is not set
638# CONFIG_BLK_DEV_CY82C693 is not set
639# CONFIG_BLK_DEV_CS5520 is not set
640# CONFIG_BLK_DEV_CS5530 is not set
641# CONFIG_BLK_DEV_HPT34X is not set
642# CONFIG_BLK_DEV_HPT366 is not set
643# CONFIG_BLK_DEV_JMICRON is not set
644# CONFIG_BLK_DEV_SC1200 is not set
645# CONFIG_BLK_DEV_PIIX is not set
646CONFIG_BLK_DEV_IT8213=m
647# CONFIG_BLK_DEV_IT821X is not set
648# CONFIG_BLK_DEV_NS87415 is not set
649# CONFIG_BLK_DEV_PDC202XX_OLD is not set
650# CONFIG_BLK_DEV_PDC202XX_NEW is not set
651# CONFIG_BLK_DEV_SVWKS is not set
652# CONFIG_BLK_DEV_SIIMAGE is not set
653# CONFIG_BLK_DEV_SLC90E66 is not set
654# CONFIG_BLK_DEV_TRM290 is not set
655# CONFIG_BLK_DEV_VIA82CXXX is not set
656CONFIG_BLK_DEV_TC86C001=m
657# CONFIG_IDE_ARM is not set
658CONFIG_BLK_DEV_IDEDMA=y
659# CONFIG_IDEDMA_IVB is not set
660# CONFIG_IDEDMA_AUTO is not set
661# CONFIG_BLK_DEV_HD is not set
662 395
663# 396#
664# SCSI device support 397# SCSI device support
665# 398#
666CONFIG_RAID_ATTRS=m 399# CONFIG_RAID_ATTRS is not set
667# CONFIG_SCSI is not set 400# CONFIG_SCSI is not set
668# CONFIG_SCSI_NETLINK is not set 401# CONFIG_SCSI_NETLINK is not set
669
670#
671# Serial ATA (prod) and Parallel ATA (experimental) drivers
672#
673# CONFIG_ATA is not set 402# CONFIG_ATA is not set
674 403
675# 404#
@@ -685,6 +414,7 @@ CONFIG_RAID_ATTRS=m
685# 414#
686# IEEE 1394 (FireWire) support 415# IEEE 1394 (FireWire) support
687# 416#
417# CONFIG_FIREWIRE is not set
688# CONFIG_IEEE1394 is not set 418# CONFIG_IEEE1394 is not set
689 419
690# 420#
@@ -699,36 +429,15 @@ CONFIG_NETDEVICES=y
699# CONFIG_DUMMY is not set 429# CONFIG_DUMMY is not set
700# CONFIG_BONDING is not set 430# CONFIG_BONDING is not set
701# CONFIG_EQUALIZER is not set 431# CONFIG_EQUALIZER is not set
702CONFIG_TUN=m 432# CONFIG_TUN is not set
703
704#
705# ARCnet devices
706#
707# CONFIG_ARCNET is not set 433# CONFIG_ARCNET is not set
708 434# CONFIG_PHYLIB is not set
709#
710# PHY device support
711#
712CONFIG_PHYLIB=m
713
714#
715# MII PHY device drivers
716#
717CONFIG_MARVELL_PHY=m
718CONFIG_DAVICOM_PHY=m
719CONFIG_QSEMI_PHY=m
720CONFIG_LXT_PHY=m
721CONFIG_CICADA_PHY=m
722CONFIG_VITESSE_PHY=m
723CONFIG_SMSC_PHY=m
724# CONFIG_BROADCOM_PHY is not set
725# CONFIG_FIXED_PHY is not set
726 435
727# 436#
728# Ethernet (10 or 100Mbit) 437# Ethernet (10 or 100Mbit)
729# 438#
730CONFIG_NET_ETHERNET=y 439CONFIG_NET_ETHERNET=y
731# CONFIG_MII is not set 440CONFIG_MII=y
732# CONFIG_HAPPYMEAL is not set 441# CONFIG_HAPPYMEAL is not set
733# CONFIG_SUNGEM is not set 442# CONFIG_SUNGEM is not set
734# CONFIG_CASSINI is not set 443# CONFIG_CASSINI is not set
@@ -747,6 +456,7 @@ CONFIG_NET_PCI=y
747# CONFIG_ADAPTEC_STARFIRE is not set 456# CONFIG_ADAPTEC_STARFIRE is not set
748# CONFIG_B44 is not set 457# CONFIG_B44 is not set
749# CONFIG_FORCEDETH is not set 458# CONFIG_FORCEDETH is not set
459CONFIG_TC35815=y
750# CONFIG_DGRS is not set 460# CONFIG_DGRS is not set
751# CONFIG_EEPRO100 is not set 461# CONFIG_EEPRO100 is not set
752# CONFIG_E100 is not set 462# CONFIG_E100 is not set
@@ -761,91 +471,20 @@ CONFIG_NET_PCI=y
761# CONFIG_TLAN is not set 471# CONFIG_TLAN is not set
762# CONFIG_VIA_RHINE is not set 472# CONFIG_VIA_RHINE is not set
763# CONFIG_SC92031 is not set 473# CONFIG_SC92031 is not set
764 474# CONFIG_NETDEV_1000 is not set
765# 475# CONFIG_NETDEV_10000 is not set
766# Ethernet (1000 Mbit)
767#
768# CONFIG_ACENIC is not set
769# CONFIG_DL2K is not set
770# CONFIG_E1000 is not set
771# CONFIG_NS83820 is not set
772# CONFIG_HAMACHI is not set
773# CONFIG_YELLOWFIN is not set
774# CONFIG_R8169 is not set
775# CONFIG_SIS190 is not set
776# CONFIG_SKGE is not set
777# CONFIG_SKY2 is not set
778# CONFIG_SK98LIN is not set
779# CONFIG_VIA_VELOCITY is not set
780# CONFIG_TIGON3 is not set
781# CONFIG_BNX2 is not set
782CONFIG_QLA3XXX=m
783# CONFIG_ATL1 is not set
784
785#
786# Ethernet (10000 Mbit)
787#
788# CONFIG_CHELSIO_T1 is not set
789CONFIG_CHELSIO_T3=m
790# CONFIG_IXGB is not set
791# CONFIG_S2IO is not set
792# CONFIG_MYRI10GE is not set
793CONFIG_NETXEN_NIC=m
794
795#
796# Token Ring devices
797#
798# CONFIG_TR is not set 476# CONFIG_TR is not set
799 477
800# 478#
801# Wireless LAN (non-hamradio) 479# Wireless LAN
802#
803CONFIG_NET_RADIO=y
804# CONFIG_NET_WIRELESS_RTNETLINK is not set
805
806#
807# Obsolete Wireless cards support (pre-802.11)
808#
809# CONFIG_STRIP is not set
810
811#
812# Wireless 802.11b ISA/PCI cards support
813#
814# CONFIG_IPW2100 is not set
815CONFIG_IPW2200=m
816# CONFIG_IPW2200_MONITOR is not set
817# CONFIG_IPW2200_QOS is not set
818# CONFIG_IPW2200_DEBUG is not set
819# CONFIG_HERMES is not set
820# CONFIG_ATMEL is not set
821
822#
823# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
824#
825# CONFIG_PRISM54 is not set
826# CONFIG_USB_ZD1201 is not set
827# CONFIG_HOSTAP is not set
828# CONFIG_BCM43XX is not set
829# CONFIG_ZD1211RW is not set
830CONFIG_NET_WIRELESS=y
831
832#
833# Wan interfaces
834# 480#
481# CONFIG_WLAN_PRE80211 is not set
482# CONFIG_WLAN_80211 is not set
835# CONFIG_WAN is not set 483# CONFIG_WAN is not set
836# CONFIG_FDDI is not set 484# CONFIG_FDDI is not set
837# CONFIG_HIPPI is not set 485# CONFIG_HIPPI is not set
838CONFIG_PPP=m 486# CONFIG_PPP is not set
839CONFIG_PPP_MULTILINK=y
840# CONFIG_PPP_FILTER is not set
841CONFIG_PPP_ASYNC=m
842CONFIG_PPP_SYNC_TTY=m
843CONFIG_PPP_DEFLATE=m
844# CONFIG_PPP_BSDCOMP is not set
845CONFIG_PPP_MPPE=m
846CONFIG_PPPOE=m
847# CONFIG_SLIP is not set 487# CONFIG_SLIP is not set
848CONFIG_SLHC=m
849# CONFIG_SHAPER is not set 488# CONFIG_SHAPER is not set
850# CONFIG_NETCONSOLE is not set 489# CONFIG_NETCONSOLE is not set
851# CONFIG_NETPOLL is not set 490# CONFIG_NETPOLL is not set
@@ -864,57 +503,18 @@ CONFIG_SLHC=m
864# 503#
865# Input device support 504# Input device support
866# 505#
867CONFIG_INPUT=y 506# CONFIG_INPUT is not set
868# CONFIG_INPUT_FF_MEMLESS is not set
869
870#
871# Userland interfaces
872#
873CONFIG_INPUT_MOUSEDEV=y
874CONFIG_INPUT_MOUSEDEV_PSAUX=y
875CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
876CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
877# CONFIG_INPUT_JOYDEV is not set
878# CONFIG_INPUT_TSDEV is not set
879CONFIG_INPUT_EVDEV=y
880# CONFIG_INPUT_EVBUG is not set
881
882#
883# Input Device Drivers
884#
885CONFIG_INPUT_KEYBOARD=y
886CONFIG_KEYBOARD_ATKBD=y
887# CONFIG_KEYBOARD_SUNKBD is not set
888# CONFIG_KEYBOARD_LKKBD is not set
889# CONFIG_KEYBOARD_XTKBD is not set
890# CONFIG_KEYBOARD_NEWTON is not set
891# CONFIG_KEYBOARD_STOWAWAY is not set
892CONFIG_INPUT_MOUSE=y
893CONFIG_MOUSE_PS2=y
894# CONFIG_MOUSE_SERIAL is not set
895# CONFIG_MOUSE_VSXXXAA is not set
896# CONFIG_INPUT_JOYSTICK is not set
897# CONFIG_INPUT_TOUCHSCREEN is not set
898# CONFIG_INPUT_MISC is not set
899 507
900# 508#
901# Hardware I/O ports 509# Hardware I/O ports
902# 510#
903CONFIG_SERIO=y 511# CONFIG_SERIO is not set
904CONFIG_SERIO_I8042=y
905CONFIG_SERIO_SERPORT=y
906# CONFIG_SERIO_PCIPS2 is not set
907CONFIG_SERIO_LIBPS2=y
908# CONFIG_SERIO_RAW is not set
909# CONFIG_GAMEPORT is not set 512# CONFIG_GAMEPORT is not set
910 513
911# 514#
912# Character devices 515# Character devices
913# 516#
914CONFIG_VT=y 517# CONFIG_VT is not set
915CONFIG_VT_CONSOLE=y
916CONFIG_HW_CONSOLE=y
917CONFIG_VT_HW_CONSOLE_BINDING=y
918# CONFIG_SERIAL_NONSTANDARD is not set 518# CONFIG_SERIAL_NONSTANDARD is not set
919 519
920# 520#
@@ -926,11 +526,12 @@ CONFIG_VT_HW_CONSOLE_BINDING=y
926# Non-8250 serial port support 526# Non-8250 serial port support
927# 527#
928CONFIG_SERIAL_CORE=y 528CONFIG_SERIAL_CORE=y
529CONFIG_SERIAL_CORE_CONSOLE=y
929CONFIG_SERIAL_TXX9=y 530CONFIG_SERIAL_TXX9=y
930CONFIG_HAS_TXX9_SERIAL=y 531CONFIG_HAS_TXX9_SERIAL=y
931CONFIG_SERIAL_TXX9_NR_UARTS=6 532CONFIG_SERIAL_TXX9_NR_UARTS=6
932# CONFIG_SERIAL_TXX9_CONSOLE is not set 533CONFIG_SERIAL_TXX9_CONSOLE=y
933# CONFIG_SERIAL_TXX9_STDSERIAL is not set 534CONFIG_SERIAL_TXX9_STDSERIAL=y
934# CONFIG_SERIAL_JSM is not set 535# CONFIG_SERIAL_JSM is not set
935CONFIG_UNIX98_PTYS=y 536CONFIG_UNIX98_PTYS=y
936CONFIG_LEGACY_PTYS=y 537CONFIG_LEGACY_PTYS=y
@@ -940,15 +541,10 @@ CONFIG_LEGACY_PTY_COUNT=256
940# IPMI 541# IPMI
941# 542#
942# CONFIG_IPMI_HANDLER is not set 543# CONFIG_IPMI_HANDLER is not set
943
944#
945# Watchdog Cards
946#
947# CONFIG_WATCHDOG is not set 544# CONFIG_WATCHDOG is not set
948# CONFIG_HW_RANDOM is not set 545# CONFIG_HW_RANDOM is not set
949# CONFIG_RTC is not set 546# CONFIG_RTC is not set
950# CONFIG_GEN_RTC is not set 547# CONFIG_GEN_RTC is not set
951# CONFIG_DTLK is not set
952# CONFIG_R3964 is not set 548# CONFIG_R3964 is not set
953# CONFIG_APPLICOM is not set 549# CONFIG_APPLICOM is not set
954# CONFIG_DRM is not set 550# CONFIG_DRM is not set
@@ -958,108 +554,61 @@ CONFIG_LEGACY_PTY_COUNT=256
958# TPM devices 554# TPM devices
959# 555#
960# CONFIG_TCG_TPM is not set 556# CONFIG_TCG_TPM is not set
557CONFIG_DEVPORT=y
558# CONFIG_I2C is not set
559
560#
561# SPI support
562#
563CONFIG_SPI=y
564CONFIG_SPI_MASTER=y
961 565
962# 566#
963# I2C support 567# SPI Master Controller Drivers
964# 568#
965# CONFIG_I2C is not set 569# CONFIG_SPI_BITBANG is not set
570CONFIG_SPI_TXX9=y
966 571
967# 572#
968# SPI support 573# SPI Protocol Masters
969# 574#
970# CONFIG_SPI is not set 575CONFIG_SPI_AT25=y
971# CONFIG_SPI_MASTER is not set 576# CONFIG_SPI_SPIDEV is not set
972 577
973# 578#
974# Dallas's 1-wire bus 579# Dallas's 1-wire bus
975# 580#
976# CONFIG_W1 is not set 581# CONFIG_W1 is not set
582# CONFIG_HWMON is not set
977 583
978# 584#
979# Hardware Monitoring support 585# Multifunction device drivers
980# 586#
981CONFIG_HWMON=y 587# CONFIG_MFD_SM501 is not set
982# CONFIG_HWMON_VID is not set
983# CONFIG_SENSORS_ABITUGURU is not set
984# CONFIG_SENSORS_F71805F is not set
985# CONFIG_SENSORS_PC87427 is not set
986# CONFIG_SENSORS_VT1211 is not set
987# CONFIG_HWMON_DEBUG_CHIP is not set
988 588
989# 589#
990# Multimedia devices 590# Multimedia devices
991# 591#
992# CONFIG_VIDEO_DEV is not set 592# CONFIG_VIDEO_DEV is not set
993 593# CONFIG_DVB_CORE is not set
994# 594# CONFIG_DAB is not set
995# Digital Video Broadcasting Devices
996#
997# CONFIG_DVB is not set
998# CONFIG_USB_DABUSB is not set
999 595
1000# 596#
1001# Graphics support 597# Graphics support
1002# 598#
1003# CONFIG_FIRMWARE_EDID is not set
1004CONFIG_FB=y
1005CONFIG_FB_CFB_FILLRECT=y
1006CONFIG_FB_CFB_COPYAREA=y
1007CONFIG_FB_CFB_IMAGEBLIT=y
1008# CONFIG_FB_SVGALIB is not set
1009# CONFIG_FB_MACMODES is not set
1010# CONFIG_FB_BACKLIGHT is not set
1011# CONFIG_FB_MODE_HELPERS is not set
1012# CONFIG_FB_TILEBLITTING is not set
1013# CONFIG_FB_CIRRUS is not set
1014# CONFIG_FB_PM2 is not set
1015# CONFIG_FB_CYBER2000 is not set
1016# CONFIG_FB_ASILIANT is not set
1017# CONFIG_FB_IMSTT is not set
1018# CONFIG_FB_S1D13XXX is not set
1019# CONFIG_FB_NVIDIA is not set
1020# CONFIG_FB_RIVA is not set
1021# CONFIG_FB_MATROX is not set
1022# CONFIG_FB_RADEON is not set
1023# CONFIG_FB_ATY128 is not set
1024CONFIG_FB_ATY=y
1025CONFIG_FB_ATY_CT=y
1026# CONFIG_FB_ATY_GENERIC_LCD is not set
1027# CONFIG_FB_ATY_GX is not set
1028# CONFIG_FB_S3 is not set
1029# CONFIG_FB_SAVAGE is not set
1030# CONFIG_FB_SIS is not set
1031# CONFIG_FB_NEOMAGIC is not set
1032# CONFIG_FB_KYRO is not set
1033# CONFIG_FB_3DFX is not set
1034# CONFIG_FB_VOODOO1 is not set
1035# CONFIG_FB_SMIVGX is not set
1036# CONFIG_FB_TRIDENT is not set
1037# CONFIG_FB_VIRTUAL is not set
1038
1039#
1040# Console display driver support
1041#
1042CONFIG_VGA_CONSOLE=y
1043# CONFIG_VGACON_SOFT_SCROLLBACK is not set
1044CONFIG_DUMMY_CONSOLE=y
1045# CONFIG_FRAMEBUFFER_CONSOLE is not set
1046
1047#
1048# Logo configuration
1049#
1050# CONFIG_LOGO is not set
1051# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 599# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1052 600
1053# 601#
1054# Sound 602# Display device support
1055# 603#
1056# CONFIG_SOUND is not set 604# CONFIG_DISPLAY_SUPPORT is not set
605# CONFIG_VGASTATE is not set
606# CONFIG_FB is not set
1057 607
1058# 608#
1059# HID Devices 609# Sound
1060# 610#
1061CONFIG_HID=y 611# CONFIG_SOUND is not set
1062# CONFIG_HID_DEBUG is not set
1063 612
1064# 613#
1065# USB support 614# USB support
@@ -1067,148 +616,80 @@ CONFIG_HID=y
1067CONFIG_USB_ARCH_HAS_HCD=y 616CONFIG_USB_ARCH_HAS_HCD=y
1068CONFIG_USB_ARCH_HAS_OHCI=y 617CONFIG_USB_ARCH_HAS_OHCI=y
1069CONFIG_USB_ARCH_HAS_EHCI=y 618CONFIG_USB_ARCH_HAS_EHCI=y
1070CONFIG_USB=y 619# CONFIG_USB is not set
1071# CONFIG_USB_DEBUG is not set
1072
1073#
1074# Miscellaneous USB options
1075#
1076# CONFIG_USB_DEVICEFS is not set
1077# CONFIG_USB_DYNAMIC_MINORS is not set
1078# CONFIG_USB_SUSPEND is not set
1079# CONFIG_USB_OTG is not set
1080
1081#
1082# USB Host Controller Drivers
1083#
1084# CONFIG_USB_EHCI_HCD is not set
1085# CONFIG_USB_ISP116X_HCD is not set
1086# CONFIG_USB_OHCI_HCD is not set
1087# CONFIG_USB_UHCI_HCD is not set
1088# CONFIG_USB_SL811_HCD is not set
1089
1090#
1091# USB Device Class drivers
1092#
1093# CONFIG_USB_ACM is not set
1094# CONFIG_USB_PRINTER is not set
1095 620
1096# 621#
1097# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 622# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1098# 623#
1099 624
1100# 625#
1101# may also be needed; see USB_STORAGE Help for more information 626# USB Gadget Support
1102#
1103# CONFIG_USB_LIBUSUAL is not set
1104
1105#
1106# USB Input Devices
1107#
1108CONFIG_USB_HID=y
1109# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1110# CONFIG_HID_FF is not set
1111CONFIG_USB_HIDDEV=y
1112# CONFIG_USB_AIPTEK is not set
1113# CONFIG_USB_WACOM is not set
1114# CONFIG_USB_ACECAD is not set
1115# CONFIG_USB_KBTAB is not set
1116# CONFIG_USB_POWERMATE is not set
1117# CONFIG_USB_TOUCHSCREEN is not set
1118CONFIG_USB_YEALINK=m
1119# CONFIG_USB_XPAD is not set
1120# CONFIG_USB_ATI_REMOTE is not set
1121# CONFIG_USB_ATI_REMOTE2 is not set
1122# CONFIG_USB_KEYSPAN_REMOTE is not set
1123# CONFIG_USB_APPLETOUCH is not set
1124# CONFIG_USB_GTCO is not set
1125
1126#
1127# USB Imaging devices
1128#
1129# CONFIG_USB_MDC800 is not set
1130
1131#
1132# USB Network Adapters
1133#
1134# CONFIG_USB_CATC is not set
1135# CONFIG_USB_KAWETH is not set
1136# CONFIG_USB_PEGASUS is not set
1137# CONFIG_USB_RTL8150 is not set
1138# CONFIG_USB_USBNET_MII is not set
1139# CONFIG_USB_USBNET is not set
1140CONFIG_USB_MON=y
1141
1142#
1143# USB port drivers
1144# 627#
628# CONFIG_USB_GADGET is not set
629# CONFIG_MMC is not set
1145 630
1146# 631#
1147# USB Serial Converter support 632# LED devices
1148# 633#
1149# CONFIG_USB_SERIAL is not set 634# CONFIG_NEW_LEDS is not set
1150 635
1151# 636#
1152# USB Miscellaneous drivers 637# LED drivers
1153# 638#
1154# CONFIG_USB_EMI62 is not set
1155# CONFIG_USB_EMI26 is not set
1156# CONFIG_USB_ADUTUX is not set
1157# CONFIG_USB_AUERSWALD is not set
1158# CONFIG_USB_RIO500 is not set
1159# CONFIG_USB_LEGOTOWER is not set
1160# CONFIG_USB_LCD is not set
1161# CONFIG_USB_BERRY_CHARGE is not set
1162# CONFIG_USB_LED is not set
1163# CONFIG_USB_CYPRESS_CY7C63 is not set
1164# CONFIG_USB_CYTHERM is not set
1165# CONFIG_USB_PHIDGET is not set
1166# CONFIG_USB_IDMOUSE is not set
1167# CONFIG_USB_FTDI_ELAN is not set
1168# CONFIG_USB_APPLEDISPLAY is not set
1169# CONFIG_USB_LD is not set
1170# CONFIG_USB_TRANCEVIBRATOR is not set
1171 639
1172# 640#
1173# USB DSL modem support 641# LED Triggers
1174# 642#
1175 643
1176# 644#
1177# USB Gadget Support 645# InfiniBand support
1178# 646#
1179# CONFIG_USB_GADGET is not set 647# CONFIG_INFINIBAND is not set
1180 648
1181# 649#
1182# MMC/SD Card support 650# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1183# 651#
1184# CONFIG_MMC is not set
1185 652
1186# 653#
1187# LED devices 654# Real Time Clock
1188# 655#
1189# CONFIG_NEW_LEDS is not set 656CONFIG_RTC_LIB=y
657CONFIG_RTC_CLASS=y
658CONFIG_RTC_HCTOSYS=y
659CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
660# CONFIG_RTC_DEBUG is not set
1190 661
1191# 662#
1192# LED drivers 663# RTC interfaces
1193# 664#
665CONFIG_RTC_INTF_SYSFS=y
666CONFIG_RTC_INTF_PROC=y
667CONFIG_RTC_INTF_DEV=y
668CONFIG_RTC_INTF_DEV_UIE_EMUL=y
669# CONFIG_RTC_DRV_TEST is not set
1194 670
1195# 671#
1196# LED Triggers 672# I2C RTC drivers
1197# 673#
1198 674
1199# 675#
1200# InfiniBand support 676# SPI RTC drivers
1201# 677#
1202# CONFIG_INFINIBAND is not set 678CONFIG_RTC_DRV_RS5C348=y
679# CONFIG_RTC_DRV_MAX6902 is not set
1203 680
1204# 681#
1205# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) 682# Platform RTC drivers
1206# 683#
684# CONFIG_RTC_DRV_CMOS is not set
685# CONFIG_RTC_DRV_DS1553 is not set
686# CONFIG_RTC_DRV_DS1742 is not set
687# CONFIG_RTC_DRV_M48T86 is not set
688# CONFIG_RTC_DRV_V3020 is not set
1207 689
1208# 690#
1209# Real Time Clock 691# on-CPU RTC drivers
1210# 692#
1211# CONFIG_RTC_CLASS is not set
1212 693
1213# 694#
1214# DMA Engine support 695# DMA Engine support
@@ -1224,38 +705,15 @@ CONFIG_USB_MON=y
1224# 705#
1225 706
1226# 707#
1227# Auxiliary Display support
1228#
1229
1230#
1231# Virtualization
1232#
1233
1234#
1235# File systems 708# File systems
1236# 709#
1237CONFIG_EXT2_FS=y 710# CONFIG_EXT2_FS is not set
1238# CONFIG_EXT2_FS_XATTR is not set 711# CONFIG_EXT3_FS is not set
1239# CONFIG_EXT2_FS_XIP is not set
1240CONFIG_EXT3_FS=m
1241CONFIG_EXT3_FS_XATTR=y
1242# CONFIG_EXT3_FS_POSIX_ACL is not set
1243# CONFIG_EXT3_FS_SECURITY is not set
1244# CONFIG_EXT4DEV_FS is not set 712# CONFIG_EXT4DEV_FS is not set
1245CONFIG_JBD=m 713# CONFIG_REISERFS_FS is not set
1246# CONFIG_JBD_DEBUG is not set
1247CONFIG_FS_MBCACHE=y
1248CONFIG_REISERFS_FS=m
1249# CONFIG_REISERFS_CHECK is not set
1250# CONFIG_REISERFS_PROC_INFO is not set
1251# CONFIG_REISERFS_FS_XATTR is not set
1252# CONFIG_JFS_FS is not set 714# CONFIG_JFS_FS is not set
1253CONFIG_FS_POSIX_ACL=y 715CONFIG_FS_POSIX_ACL=y
1254CONFIG_XFS_FS=m 716# CONFIG_XFS_FS is not set
1255# CONFIG_XFS_QUOTA is not set
1256# CONFIG_XFS_SECURITY is not set
1257# CONFIG_XFS_POSIX_ACL is not set
1258# CONFIG_XFS_RT is not set
1259# CONFIG_GFS2_FS is not set 717# CONFIG_GFS2_FS is not set
1260# CONFIG_OCFS2_FS is not set 718# CONFIG_OCFS2_FS is not set
1261# CONFIG_MINIX_FS is not set 719# CONFIG_MINIX_FS is not set
@@ -1265,26 +723,21 @@ CONFIG_INOTIFY_USER=y
1265# CONFIG_QUOTA is not set 723# CONFIG_QUOTA is not set
1266# CONFIG_DNOTIFY is not set 724# CONFIG_DNOTIFY is not set
1267# CONFIG_AUTOFS_FS is not set 725# CONFIG_AUTOFS_FS is not set
1268CONFIG_AUTOFS4_FS=m 726# CONFIG_AUTOFS4_FS is not set
1269CONFIG_FUSE_FS=m 727# CONFIG_FUSE_FS is not set
1270CONFIG_GENERIC_ACL=y 728CONFIG_GENERIC_ACL=y
1271 729
1272# 730#
1273# CD-ROM/DVD Filesystems 731# CD-ROM/DVD Filesystems
1274# 732#
1275CONFIG_ISO9660_FS=y 733# CONFIG_ISO9660_FS is not set
1276# CONFIG_JOLIET is not set
1277# CONFIG_ZISOFS is not set
1278# CONFIG_UDF_FS is not set 734# CONFIG_UDF_FS is not set
1279 735
1280# 736#
1281# DOS/FAT/NT Filesystems 737# DOS/FAT/NT Filesystems
1282# 738#
1283CONFIG_FAT_FS=y
1284# CONFIG_MSDOS_FS is not set 739# CONFIG_MSDOS_FS is not set
1285CONFIG_VFAT_FS=y 740# CONFIG_VFAT_FS is not set
1286CONFIG_FAT_DEFAULT_CODEPAGE=437
1287CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1288# CONFIG_NTFS_FS is not set 741# CONFIG_NTFS_FS is not set
1289 742
1290# 743#
@@ -1298,7 +751,7 @@ CONFIG_TMPFS=y
1298CONFIG_TMPFS_POSIX_ACL=y 751CONFIG_TMPFS_POSIX_ACL=y
1299# CONFIG_HUGETLB_PAGE is not set 752# CONFIG_HUGETLB_PAGE is not set
1300CONFIG_RAMFS=y 753CONFIG_RAMFS=y
1301CONFIG_CONFIGFS_FS=m 754# CONFIG_CONFIGFS_FS is not set
1302 755
1303# 756#
1304# Miscellaneous filesystems 757# Miscellaneous filesystems
@@ -1310,16 +763,7 @@ CONFIG_CONFIGFS_FS=m
1310# CONFIG_BEFS_FS is not set 763# CONFIG_BEFS_FS is not set
1311# CONFIG_BFS_FS is not set 764# CONFIG_BFS_FS is not set
1312# CONFIG_EFS_FS is not set 765# CONFIG_EFS_FS is not set
1313CONFIG_JFFS2_FS=y 766# CONFIG_CRAMFS is not set
1314CONFIG_JFFS2_FS_DEBUG=0
1315CONFIG_JFFS2_FS_WRITEBUFFER=y
1316# CONFIG_JFFS2_SUMMARY is not set
1317# CONFIG_JFFS2_FS_XATTR is not set
1318# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1319CONFIG_JFFS2_ZLIB=y
1320CONFIG_JFFS2_RTIME=y
1321# CONFIG_JFFS2_RUBIN is not set
1322CONFIG_CRAMFS=y
1323# CONFIG_VXFS_FS is not set 767# CONFIG_VXFS_FS is not set
1324# CONFIG_HPFS_FS is not set 768# CONFIG_HPFS_FS is not set
1325# CONFIG_QNX4FS_FS is not set 769# CONFIG_QNX4FS_FS is not set
@@ -1334,19 +778,16 @@ CONFIG_NFS_V3=y
1334# CONFIG_NFS_V3_ACL is not set 778# CONFIG_NFS_V3_ACL is not set
1335# CONFIG_NFS_V4 is not set 779# CONFIG_NFS_V4 is not set
1336# CONFIG_NFS_DIRECTIO is not set 780# CONFIG_NFS_DIRECTIO is not set
1337CONFIG_NFSD=m 781# CONFIG_NFSD is not set
1338# CONFIG_NFSD_V3 is not set
1339# CONFIG_NFSD_TCP is not set
1340CONFIG_ROOT_NFS=y 782CONFIG_ROOT_NFS=y
1341CONFIG_LOCKD=y 783CONFIG_LOCKD=y
1342CONFIG_LOCKD_V4=y 784CONFIG_LOCKD_V4=y
1343CONFIG_EXPORTFS=m
1344CONFIG_NFS_COMMON=y 785CONFIG_NFS_COMMON=y
1345CONFIG_SUNRPC=y 786CONFIG_SUNRPC=y
787# CONFIG_SUNRPC_BIND34 is not set
1346# CONFIG_RPCSEC_GSS_KRB5 is not set 788# CONFIG_RPCSEC_GSS_KRB5 is not set
1347# CONFIG_RPCSEC_GSS_SPKM3 is not set 789# CONFIG_RPCSEC_GSS_SPKM3 is not set
1348CONFIG_SMB_FS=m 790# CONFIG_SMB_FS is not set
1349# CONFIG_SMB_NLS_DEFAULT is not set
1350# CONFIG_CIFS is not set 791# CONFIG_CIFS is not set
1351# CONFIG_NCP_FS is not set 792# CONFIG_NCP_FS is not set
1352# CONFIG_CODA_FS is not set 793# CONFIG_CODA_FS is not set
@@ -1362,54 +803,12 @@ CONFIG_MSDOS_PARTITION=y
1362# 803#
1363# Native Language Support 804# Native Language Support
1364# 805#
1365CONFIG_NLS=y 806# CONFIG_NLS is not set
1366CONFIG_NLS_DEFAULT="iso8859-1"
1367# CONFIG_NLS_CODEPAGE_437 is not set
1368# CONFIG_NLS_CODEPAGE_737 is not set
1369# CONFIG_NLS_CODEPAGE_775 is not set
1370# CONFIG_NLS_CODEPAGE_850 is not set
1371# CONFIG_NLS_CODEPAGE_852 is not set
1372# CONFIG_NLS_CODEPAGE_855 is not set
1373# CONFIG_NLS_CODEPAGE_857 is not set
1374# CONFIG_NLS_CODEPAGE_860 is not set
1375# CONFIG_NLS_CODEPAGE_861 is not set
1376# CONFIG_NLS_CODEPAGE_862 is not set
1377# CONFIG_NLS_CODEPAGE_863 is not set
1378# CONFIG_NLS_CODEPAGE_864 is not set
1379# CONFIG_NLS_CODEPAGE_865 is not set
1380# CONFIG_NLS_CODEPAGE_866 is not set
1381# CONFIG_NLS_CODEPAGE_869 is not set
1382# CONFIG_NLS_CODEPAGE_936 is not set
1383# CONFIG_NLS_CODEPAGE_950 is not set
1384# CONFIG_NLS_CODEPAGE_932 is not set
1385# CONFIG_NLS_CODEPAGE_949 is not set
1386# CONFIG_NLS_CODEPAGE_874 is not set
1387# CONFIG_NLS_ISO8859_8 is not set
1388# CONFIG_NLS_CODEPAGE_1250 is not set
1389# CONFIG_NLS_CODEPAGE_1251 is not set
1390# CONFIG_NLS_ASCII is not set
1391# CONFIG_NLS_ISO8859_1 is not set
1392# CONFIG_NLS_ISO8859_2 is not set
1393# CONFIG_NLS_ISO8859_3 is not set
1394# CONFIG_NLS_ISO8859_4 is not set
1395# CONFIG_NLS_ISO8859_5 is not set
1396# CONFIG_NLS_ISO8859_6 is not set
1397# CONFIG_NLS_ISO8859_7 is not set
1398# CONFIG_NLS_ISO8859_9 is not set
1399# CONFIG_NLS_ISO8859_13 is not set
1400# CONFIG_NLS_ISO8859_14 is not set
1401# CONFIG_NLS_ISO8859_15 is not set
1402# CONFIG_NLS_KOI8_R is not set
1403# CONFIG_NLS_KOI8_U is not set
1404# CONFIG_NLS_UTF8 is not set
1405 807
1406# 808#
1407# Distributed Lock Manager 809# Distributed Lock Manager
1408# 810#
1409CONFIG_DLM=m 811# CONFIG_DLM is not set
1410CONFIG_DLM_TCP=y
1411# CONFIG_DLM_SCTP is not set
1412# CONFIG_DLM_DEBUG is not set
1413 812
1414# 813#
1415# Profiling support 814# Profiling support
@@ -1427,7 +826,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1427# CONFIG_DEBUG_FS is not set 826# CONFIG_DEBUG_FS is not set
1428# CONFIG_HEADERS_CHECK is not set 827# CONFIG_HEADERS_CHECK is not set
1429# CONFIG_DEBUG_KERNEL is not set 828# CONFIG_DEBUG_KERNEL is not set
1430CONFIG_LOG_BUF_SHIFT=14
1431CONFIG_CROSSCOMPILE=y 829CONFIG_CROSSCOMPILE=y
1432CONFIG_CMDLINE="" 830CONFIG_CMDLINE=""
1433CONFIG_SYS_SUPPORTS_KGDB=y 831CONFIG_SYS_SUPPORTS_KGDB=y
@@ -1441,62 +839,17 @@ CONFIG_SYS_SUPPORTS_KGDB=y
1441# 839#
1442# Cryptographic options 840# Cryptographic options
1443# 841#
1444CONFIG_CRYPTO=y 842# CONFIG_CRYPTO is not set
1445CONFIG_CRYPTO_ALGAPI=y
1446CONFIG_CRYPTO_BLKCIPHER=m
1447CONFIG_CRYPTO_HASH=y
1448CONFIG_CRYPTO_MANAGER=y
1449CONFIG_CRYPTO_HMAC=y
1450CONFIG_CRYPTO_XCBC=m
1451CONFIG_CRYPTO_NULL=m
1452CONFIG_CRYPTO_MD4=m
1453CONFIG_CRYPTO_MD5=y
1454CONFIG_CRYPTO_SHA1=m
1455CONFIG_CRYPTO_SHA256=m
1456CONFIG_CRYPTO_SHA512=m
1457CONFIG_CRYPTO_WP512=m
1458CONFIG_CRYPTO_TGR192=m
1459CONFIG_CRYPTO_GF128MUL=m
1460CONFIG_CRYPTO_ECB=m
1461CONFIG_CRYPTO_CBC=m
1462CONFIG_CRYPTO_PCBC=m
1463CONFIG_CRYPTO_LRW=m
1464CONFIG_CRYPTO_DES=m
1465CONFIG_CRYPTO_FCRYPT=m
1466CONFIG_CRYPTO_BLOWFISH=m
1467CONFIG_CRYPTO_TWOFISH=m
1468CONFIG_CRYPTO_TWOFISH_COMMON=m
1469CONFIG_CRYPTO_SERPENT=m
1470CONFIG_CRYPTO_AES=m
1471CONFIG_CRYPTO_CAST5=m
1472CONFIG_CRYPTO_CAST6=m
1473CONFIG_CRYPTO_TEA=m
1474CONFIG_CRYPTO_ARC4=m
1475CONFIG_CRYPTO_KHAZAD=m
1476CONFIG_CRYPTO_ANUBIS=m
1477CONFIG_CRYPTO_DEFLATE=m
1478CONFIG_CRYPTO_MICHAEL_MIC=m
1479CONFIG_CRYPTO_CRC32C=m
1480CONFIG_CRYPTO_CAMELLIA=m
1481# CONFIG_CRYPTO_TEST is not set
1482
1483#
1484# Hardware crypto devices
1485#
1486 843
1487# 844#
1488# Library routines 845# Library routines
1489# 846#
1490CONFIG_BITREVERSE=y 847CONFIG_BITREVERSE=y
1491CONFIG_CRC_CCITT=m 848# CONFIG_CRC_CCITT is not set
1492CONFIG_CRC16=m 849# CONFIG_CRC16 is not set
850# CONFIG_CRC_ITU_T is not set
1493CONFIG_CRC32=y 851CONFIG_CRC32=y
1494CONFIG_LIBCRC32C=m 852# CONFIG_LIBCRC32C is not set
1495CONFIG_ZLIB_INFLATE=y
1496CONFIG_ZLIB_DEFLATE=y
1497CONFIG_TEXTSEARCH=y
1498CONFIG_TEXTSEARCH_KMP=m
1499CONFIG_TEXTSEARCH_BM=m
1500CONFIG_TEXTSEARCH_FSM=m
1501CONFIG_HAS_IOMEM=y 853CONFIG_HAS_IOMEM=y
1502CONFIG_HAS_IOPORT=y 854CONFIG_HAS_IOPORT=y
855CONFIG_HAS_DMA=y
diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig
index 5593cde9f7..a5dc5cb97a 100644
--- a/arch/mips/configs/rm200_defconfig
+++ b/arch/mips/configs/rm200_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
@@ -255,7 +251,7 @@ CONFIG_PCI=y
255CONFIG_ISA=y 251CONFIG_ISA=y
256# CONFIG_EISA is not set 252# CONFIG_EISA is not set
257CONFIG_MMU=y 253CONFIG_MMU=y
258CONFIG_I8253=y 254CONFIG_PCSPEAKER=y
259 255
260# 256#
261# PCCARD (PCMCIA/CardBus) support 257# PCCARD (PCMCIA/CardBus) support
diff --git a/arch/mips/configs/sb1250-swarm_defconfig b/arch/mips/configs/sb1250-swarm_defconfig
index 6c4f09a381..98a9140922 100644
--- a/arch/mips/configs/sb1250-swarm_defconfig
+++ b/arch/mips/configs/sb1250-swarm_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/sead_defconfig b/arch/mips/configs/sead_defconfig
index 988b9cdef0..69c08b24c8 100644
--- a/arch/mips/configs/sead_defconfig
+++ b/arch/mips/configs/sead_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33CONFIG_MIPS_SEAD=y 31CONFIG_MIPS_SEAD=y
@@ -35,8 +33,6 @@ CONFIG_MIPS_SEAD=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/tb0219_defconfig b/arch/mips/configs/tb0219_defconfig
index 8b1675c07e..5d4fc0e4f7 100644
--- a/arch/mips/configs/tb0219_defconfig
+++ b/arch/mips/configs/tb0219_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/tb0226_defconfig b/arch/mips/configs/tb0226_defconfig
index b5be8b74d8..1b92b48de0 100644
--- a/arch/mips/configs/tb0226_defconfig
+++ b/arch/mips/configs/tb0226_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/tb0287_defconfig b/arch/mips/configs/tb0287_defconfig
index 8bb6be4342..5b77c7a5d8 100644
--- a/arch/mips/configs/tb0287_defconfig
+++ b/arch/mips/configs/tb0287_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/workpad_defconfig b/arch/mips/configs/workpad_defconfig
index 8f019ffcc7..94a4f94a8b 100644
--- a/arch/mips/configs/workpad_defconfig
+++ b/arch/mips/configs/workpad_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/wrppmc_defconfig b/arch/mips/configs/wrppmc_defconfig
index 52b48c0715..e38bd9b0ea 100644
--- a/arch/mips/configs/wrppmc_defconfig
+++ b/arch/mips/configs/wrppmc_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_WR_PPMC=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/configs/yosemite_defconfig b/arch/mips/configs/yosemite_defconfig
index 6824606309..f342d8c887 100644
--- a/arch/mips/configs/yosemite_defconfig
+++ b/arch/mips/configs/yosemite_defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
@@ -596,8 +592,6 @@ CONFIG_LEGACY_PTY_COUNT=256
596# CONFIG_WATCHDOG is not set 592# CONFIG_WATCHDOG is not set
597# CONFIG_HW_RANDOM is not set 593# CONFIG_HW_RANDOM is not set
598# CONFIG_RTC is not set 594# CONFIG_RTC is not set
599CONFIG_GEN_RTC=y
600CONFIG_GEN_RTC_X=y
601# CONFIG_DTLK is not set 595# CONFIG_DTLK is not set
602# CONFIG_R3964 is not set 596# CONFIG_R3964 is not set
603# CONFIG_APPLICOM is not set 597# CONFIG_APPLICOM is not set
diff --git a/arch/mips/ddb5xxx/ddb5477/Makefile b/arch/mips/ddb5xxx/ddb5477/Makefile
index 23fd3b81fe..4864b8a659 100644
--- a/arch/mips/ddb5xxx/ddb5477/Makefile
+++ b/arch/mips/ddb5xxx/ddb5477/Makefile
@@ -2,7 +2,8 @@
2# Makefile for NEC DDB-Vrc5477 board 2# Makefile for NEC DDB-Vrc5477 board
3# 3#
4 4
5obj-y += irq.o irq_5477.o setup.o lcd44780.o 5obj-y += ddb5477-platform.o irq.o irq_5477.o setup.o \
6 lcd44780.o
6 7
7obj-$(CONFIG_RUNTIME_DEBUG) += debug.o 8obj-$(CONFIG_RUNTIME_DEBUG) += debug.o
8obj-$(CONFIG_KGDB) += kgdb_io.o 9obj-$(CONFIG_KGDB) += kgdb_io.o
diff --git a/arch/mips/ddb5xxx/ddb5477/ddb5477-platform.c b/arch/mips/ddb5xxx/ddb5477/ddb5477-platform.c
new file mode 100644
index 0000000000..c16020ad54
--- /dev/null
+++ b/arch/mips/ddb5xxx/ddb5477/ddb5477-platform.c
@@ -0,0 +1,49 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
7 */
8#include <linux/init.h>
9#include <linux/module.h>
10#include <linux/serial_8250.h>
11
12#include <asm/ddb5xxx/ddb5477.h>
13
14#define DDB_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP)
15
16#define DDB5477_PORT(base, int) \
17{ \
18 .mapbase = base, \
19 .irq = int, \
20 .uartclk = 1843200, \
21 .iotype = UPIO_MEM, \
22 .flags = DDB_UART_FLAGS, \
23 .regshift = 3, \
24}
25
26static struct plat_serial8250_port uart8250_data[] = {
27 DDB5477_PORT(0xbfa04200, VRC5477_IRQ_UART0),
28 DDB5477_PORT(0xbfa04240, VRC5477_IRQ_UART1),
29 { },
30};
31
32static struct platform_device uart8250_device = {
33 .name = "serial8250",
34 .id = PLAT8250_DEV_PLATFORM,
35 .dev = {
36 .platform_data = uart8250_data,
37 },
38};
39
40static int __init uart8250_init(void)
41{
42 return platform_device_register(&uart8250_device);
43}
44
45module_init(uart8250_init);
46
47MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
48MODULE_LICENSE("GPL");
49MODULE_DESCRIPTION("8250 UART probe driver for the NEC DDB5477");
diff --git a/arch/mips/dec/prom/console.c b/arch/mips/dec/prom/console.c
index 65419bf324..078e1a1242 100644
--- a/arch/mips/dec/prom/console.c
+++ b/arch/mips/dec/prom/console.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * DECstation PROM-based early console support. 4 * DECstation PROM-based early console support.
5 * 5 *
6 * Copyright (C) 2004 Maciej W. Rozycki 6 * Copyright (C) 2004, 2007 Maciej W. Rozycki
7 * 7 *
8 * This program is free software; you can redistribute it and/or 8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License 9 * modify it under the terms of the GNU General Public License
@@ -13,15 +13,35 @@
13#include <linux/console.h> 13#include <linux/console.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/string.h>
16 17
17#include <asm/dec/prom.h> 18#include <asm/dec/prom.h>
18 19
19void prom_putchar(char c) 20static void __init prom_console_write(struct console *con, const char *s,
21 unsigned int c)
20{ 22{
21 char s[2]; 23 char buf[81];
24 unsigned int chunk = sizeof(buf) - 1;
22 25
23 s[0] = c; 26 while (c > 0) {
24 s[1] = '\0'; 27 if (chunk > c)
28 chunk = c;
29 memcpy(buf, s, chunk);
30 buf[chunk] = '\0';
31 prom_printf("%s", buf);
32 s += chunk;
33 c -= chunk;
34 }
35}
36
37static struct console promcons __initdata = {
38 .name = "prom",
39 .write = prom_console_write,
40 .flags = CON_BOOT | CON_PRINTBUFFER,
41 .index = -1,
42};
25 43
26 prom_printf( s); 44void __init register_prom_console(void)
45{
46 register_console(&promcons);
27} 47}
diff --git a/arch/mips/dec/prom/init.c b/arch/mips/dec/prom/init.c
index a217aafe59..808c182fd3 100644
--- a/arch/mips/dec/prom/init.c
+++ b/arch/mips/dec/prom/init.c
@@ -86,7 +86,7 @@ void __init which_prom(s32 magic, s32 *prom_vec)
86 86
87void __init prom_init(void) 87void __init prom_init(void)
88{ 88{
89 extern void ATTRIB_NORET dec_machine_halt(void); 89 extern void dec_machine_halt(void);
90 static char cpu_msg[] __initdata = 90 static char cpu_msg[] __initdata =
91 "Sorry, this kernel is compiled for a wrong CPU type!\n"; 91 "Sorry, this kernel is compiled for a wrong CPU type!\n";
92 s32 argc = fw_arg0; 92 s32 argc = fw_arg0;
@@ -103,6 +103,9 @@ void __init prom_init(void)
103 if (prom_is_rex(magic)) 103 if (prom_is_rex(magic))
104 rex_clear_cache(); 104 rex_clear_cache();
105 105
106 /* Register the early console. */
107 register_prom_console();
108
106 /* Were we compiled with the right CPU option? */ 109 /* Were we compiled with the right CPU option? */
107#if defined(CONFIG_CPU_R3000) 110#if defined(CONFIG_CPU_R3000)
108 if ((current_cpu_data.cputype == CPU_R4000SC) || 111 if ((current_cpu_data.cputype == CPU_R4000SC) ||
diff --git a/arch/mips/dec/reset.c b/arch/mips/dec/reset.c
index 56397227ad..c15a879046 100644
--- a/arch/mips/dec/reset.c
+++ b/arch/mips/dec/reset.c
@@ -9,26 +9,26 @@
9 9
10#include <asm/addrspace.h> 10#include <asm/addrspace.h>
11 11
12typedef void ATTRIB_NORET (* noret_func_t)(void); 12typedef void __noreturn (* noret_func_t)(void);
13 13
14static inline void ATTRIB_NORET back_to_prom(void) 14static inline void __noreturn back_to_prom(void)
15{ 15{
16 noret_func_t func = (void *)CKSEG1ADDR(0x1fc00000); 16 noret_func_t func = (void *)CKSEG1ADDR(0x1fc00000);
17 17
18 func(); 18 func();
19} 19}
20 20
21void ATTRIB_NORET dec_machine_restart(char *command) 21void __noreturn dec_machine_restart(char *command)
22{ 22{
23 back_to_prom(); 23 back_to_prom();
24} 24}
25 25
26void ATTRIB_NORET dec_machine_halt(void) 26void __noreturn dec_machine_halt(void)
27{ 27{
28 back_to_prom(); 28 back_to_prom();
29} 29}
30 30
31void ATTRIB_NORET dec_machine_power_off(void) 31void __noreturn dec_machine_power_off(void)
32{ 32{
33 /* DECstations don't have a software power switch */ 33 /* DECstations don't have a software power switch */
34 back_to_prom(); 34 back_to_prom();
diff --git a/arch/mips/defconfig b/arch/mips/defconfig
index 41211f8b77..b3b6e58058 100644
--- a/arch/mips/defconfig
+++ b/arch/mips/defconfig
@@ -25,9 +25,7 @@ CONFIG_ZONE_DMA=y
25# CONFIG_BASLER_EXCITE is not set 25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
30# CONFIG_LASAT is not set
31# CONFIG_MIPS_ATLAS is not set 29# CONFIG_MIPS_ATLAS is not set
32# CONFIG_MIPS_MALTA is not set 30# CONFIG_MIPS_MALTA is not set
33# CONFIG_MIPS_SEAD is not set 31# CONFIG_MIPS_SEAD is not set
@@ -35,8 +33,6 @@ CONFIG_ZONE_DMA=y
35# CONFIG_MIPS_SIM is not set 33# CONFIG_MIPS_SIM is not set
36# CONFIG_MOMENCO_JAGUAR_ATX is not set 34# CONFIG_MOMENCO_JAGUAR_ATX is not set
37# CONFIG_MOMENCO_OCELOT is not set 35# CONFIG_MOMENCO_OCELOT is not set
38# CONFIG_MOMENCO_OCELOT_3 is not set
39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 36# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 37# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_JBS is not set 38# CONFIG_PNX8550_JBS is not set
diff --git a/arch/mips/gt64120/ev64120/Kconfig b/arch/mips/gt64120/ev64120/Kconfig
deleted file mode 100644
index d691762cb0..0000000000
--- a/arch/mips/gt64120/ev64120/Kconfig
+++ /dev/null
@@ -1,3 +0,0 @@
1config EVB_PCI1
2 bool "Enable Second PCI (PCI1)"
3 depends on MIPS_EV64120
diff --git a/arch/mips/gt64120/ev64120/Makefile b/arch/mips/gt64120/ev64120/Makefile
deleted file mode 100644
index 323b2cebc6..0000000000
--- a/arch/mips/gt64120/ev64120/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
1#
2# Copyright 2000 RidgeRun, Inc.
3# Author: RidgeRun, Inc.
4# glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.com
5#
6# Makefile for the Galileo EV64120 board.
7#
8
9obj-y += irq.o promcon.o reset.o serialGT.o setup.o
diff --git a/arch/mips/gt64120/ev64120/irq.c b/arch/mips/gt64120/ev64120/irq.c
deleted file mode 100644
index 64e4c80b61..0000000000
--- a/arch/mips/gt64120/ev64120/irq.c
+++ /dev/null
@@ -1,116 +0,0 @@
1/*
2 * BRIEF MODULE DESCRIPTION
3 * Code to handle irqs on GT64120A boards
4 * Derived from mips/orion and Cort <cort@fsmlabs.com>
5 *
6 * Copyright (C) 2000 RidgeRun, Inc.
7 * Author: RidgeRun, Inc.
8 * glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.com
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 *
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
16 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
18 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
21 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
22 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * You should have received a copy of the GNU General Public License along
27 * with this program; if not, write to the Free Software Foundation, Inc.,
28 * 675 Mass Ave, Cambridge, MA 02139, USA.
29 */
30#include <linux/errno.h>
31#include <linux/init.h>
32#include <linux/kernel_stat.h>
33#include <linux/module.h>
34#include <linux/signal.h>
35#include <linux/sched.h>
36#include <linux/types.h>
37#include <linux/interrupt.h>
38#include <linux/ioport.h>
39#include <linux/timex.h>
40#include <linux/slab.h>
41#include <linux/random.h>
42#include <linux/bitops.h>
43#include <asm/bootinfo.h>
44#include <asm/io.h>
45#include <asm/mipsregs.h>
46#include <asm/system.h>
47#include <asm/gt64120.h>
48
49asmlinkage void plat_irq_dispatch(void)
50{
51 unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
52
53 if (pending & STATUSF_IP4) /* int2 hardware line (timer) */
54 do_IRQ(4);
55 else if (pending & STATUSF_IP2) /* int0 hardware line */
56 do_IRQ(GT_INTA);
57 else if (pending & STATUSF_IP5) /* int3 hardware line */
58 do_IRQ(GT_INTD);
59 else if (pending & STATUSF_IP6) /* int4 hardware line */
60 do_IRQ(6);
61 else if (pending & STATUSF_IP7) /* compare int */
62 do_IRQ(7);
63 else
64 spurious_interrupt();
65}
66
67static void disable_ev64120_irq(unsigned int irq_nr)
68{
69 if (irq_nr >= 8) { // All PCI interrupts are on line 5 or 2
70 clear_c0_status(9 << 10);
71 } else {
72 clear_c0_status(1 << (irq_nr + 8));
73 }
74}
75
76static void enable_ev64120_irq(unsigned int irq_nr)
77{
78 if (irq_nr >= 8) // All PCI interrupts are on line 5 or 2
79 set_c0_status(9 << 10);
80 else
81 set_c0_status(1 << (irq_nr + 8));
82}
83
84static void end_ev64120_irq(unsigned int irq)
85{
86 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
87 enable_ev64120_irq(irq);
88}
89
90static struct irq_chip ev64120_irq_type = {
91 .name = "EV64120",
92 .ack = disable_ev64120_irq,
93 .mask = disable_ev64120_irq,
94 .mask_ack = disable_ev64120_irq,
95 .unmask = enable_ev64120_irq,
96 .end = end_ev64120_irq,
97};
98
99void gt64120_irq_setup(void)
100{
101 /*
102 * Clear all of the interrupts while we change the able around a bit.
103 */
104 clear_c0_status(ST0_IM);
105
106 /*
107 * Enable timer. Other interrupts will be enabled as they are
108 * registered.
109 */
110 set_c0_status(IE_IRQ2);
111}
112
113void __init arch_init_irq(void)
114{
115 gt64120_irq_setup();
116}
diff --git a/arch/mips/gt64120/ev64120/promcon.c b/arch/mips/gt64120/ev64120/promcon.c
deleted file mode 100644
index 6e0ecfed96..0000000000
--- a/arch/mips/gt64120/ev64120/promcon.c
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * Wrap-around code for a console using the
3 * SGI PROM io-routines.
4 *
5 * Copyright (c) 1999 Ulf Carlsson
6 *
7 * Derived from DECstation promcon.c
8 * Copyright (c) 1998 Harald Koerfgen
9 */
10#include <linux/tty.h>
11#include <linux/init.h>
12#include <linux/console.h>
13
14static void prom_console_write(struct console *co, const char *s,
15 unsigned count)
16{
17 extern int CONSOLE_CHANNEL; // The default serial port
18 unsigned i;
19
20 for (i = 0; i < count; i++) {
21 if (*s == 10)
22 serial_putc(CONSOLE_CHANNEL, 13);
23 serial_putc(CONSOLE_CHANNEL, *s++);
24 }
25}
26
27static struct console sercons = {
28 .name = "ttyS",
29 .write = prom_console_write,
30 .flags = CON_PRINTBUFFER,
31 .index = -1,
32};
33
34/*
35 * Register console.
36 */
37
38static int gal_serial_console_init(void)
39{
40 // serial_init();
41 //serial_set(115200);
42
43 register_console(&sercons);
44
45 return 0;
46}
47
48console_initcall(gal_serial_console_init);
diff --git a/arch/mips/gt64120/ev64120/reset.c b/arch/mips/gt64120/ev64120/reset.c
deleted file mode 100644
index 7b9f5e5bf2..0000000000
--- a/arch/mips/gt64120/ev64120/reset.c
+++ /dev/null
@@ -1,45 +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) 1997 Ralf Baechle
7 */
8#include <linux/sched.h>
9#include <linux/mm.h>
10#include <asm/io.h>
11#include <asm/pgtable.h>
12#include <asm/processor.h>
13#include <asm/reboot.h>
14#include <asm/system.h>
15
16void galileo_machine_restart(char *command)
17{
18 *(volatile char *) 0xbc000000 = 0x0f;
19 /*
20 * Ouch, we're still alive ... This time we take the silver bullet ...
21 * ... and find that we leave the hardware in a state in which the
22 * kernel in the flush locks up somewhen during of after the PCI
23 * detection stuff.
24 */
25 set_c0_status(ST0_BEV | ST0_ERL);
26 change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED);
27 flush_cache_all();
28 write_c0_wired(0);
29 __asm__ __volatile__("jr\t%0"::"r"(0xbfc00000));
30}
31
32void galileo_machine_halt(void)
33{
34 printk(KERN_NOTICE "You can safely turn off the power\n");
35 while (1)
36 __asm__(".set\tmips3\n\t"
37 "wait\n\t"
38 ".set\tmips0");
39
40}
41
42void galileo_machine_power_off(void)
43{
44 galileo_machine_halt();
45}
diff --git a/arch/mips/gt64120/ev64120/serialGT.c b/arch/mips/gt64120/ev64120/serialGT.c
deleted file mode 100644
index 8f0d835491..0000000000
--- a/arch/mips/gt64120/ev64120/serialGT.c
+++ /dev/null
@@ -1,212 +0,0 @@
1/*
2 * serialGT.c
3 *
4 * BRIEF MODULE DESCRIPTION
5 * Low Level Serial Port control for use
6 * with the Galileo EVB64120A MIPS eval board and
7 * its on board two channel 16552 Uart.
8 *
9 * Copyright (C) 2000 RidgeRun, Inc.
10 * Author: RidgeRun, Inc.
11 * glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.com
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version.
17 *
18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
19 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
21 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
24 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * You should have received a copy of the GNU General Public License along
30 * with this program; if not, write to the Free Software Foundation, Inc.,
31 * 675 Mass Ave, Cambridge, MA 02139, USA.
32 *
33 */
34
35// Note:
36// Serial CHANNELS - 0 is the bottom connector of evb64120A.
37// (The one that maps to the "B" channel of the
38// board's uart)
39// 1 is the top connector of evb64120A.
40// (The one that maps to the "A" channel of the
41// board's uart)
42int DEBUG_CHANNEL = 0; // See Note Above
43int CONSOLE_CHANNEL = 1; // See Note Above
44
45#define DUART 0xBD000000 /* Base address of Uart. */
46#define CHANNELOFFSET 0x20 /* DUART+CHANNELOFFSET gets you to the ChanA
47 register set of the 16552 Uart device.
48 DUART+0 gets you to the ChanB register set.
49 */
50#define DUART_DELTA 0x4
51#define FIFO_ENABLE 0x07
52#define INT_ENABLE 0x04 /* default interrupt mask */
53
54#define RBR 0x00
55#define THR 0x00
56#define DLL 0x00
57#define IER 0x01
58#define DLM 0x01
59#define IIR 0x02
60#define FCR 0x02
61#define LCR 0x03
62#define MCR 0x04
63#define LSR 0x05
64#define MSR 0x06
65#define SCR 0x07
66
67#define LCR_DLAB 0x80
68#define XTAL 1843200
69#define LSR_THRE 0x20
70#define LSR_BI 0x10
71#define LSR_DR 0x01
72#define MCR_LOOP 0x10
73#define ACCESS_DELAY 0x10000
74
75/******************************
76 Routine:
77 Description:
78 ******************************/
79int inreg(int channel, int reg)
80{
81 int val;
82 val =
83 *((volatile unsigned char *) DUART +
84 (channel * CHANNELOFFSET) + (reg * DUART_DELTA));
85 return val;
86}
87
88/******************************
89 Routine:
90 Description:
91 ******************************/
92void outreg(int channel, int reg, unsigned char val)
93{
94 *((volatile unsigned char *) DUART + (channel * CHANNELOFFSET)
95 + (reg * DUART_DELTA)) = val;
96}
97
98/******************************
99 Routine:
100 Description:
101 Initialize the device driver.
102 ******************************/
103void serial_init(int channel)
104{
105 /*
106 * Configure active port, (CHANNELOFFSET already set.)
107 *
108 * Set 8 bits, 1 stop bit, no parity.
109 *
110 * LCR<7> 0 divisor latch access bit
111 * LCR<6> 0 break control (1=send break)
112 * LCR<5> 0 stick parity (0=space, 1=mark)
113 * LCR<4> 0 parity even (0=odd, 1=even)
114 * LCR<3> 0 parity enable (1=enabled)
115 * LCR<2> 0 # stop bits (0=1, 1=1.5)
116 * LCR<1:0> 11 bits per character(00=5, 01=6, 10=7, 11=8)
117 */
118 outreg(channel, LCR, 0x3);
119
120 outreg(channel, FCR, FIFO_ENABLE); /* Enable the FIFO */
121
122 outreg(channel, IER, INT_ENABLE); /* Enable appropriate interrupts */
123}
124
125/******************************
126 Routine:
127 Description:
128 Set the baud rate.
129 ******************************/
130void serial_set(int channel, unsigned long baud)
131{
132 unsigned char sav_lcr;
133
134 /*
135 * Enable access to the divisor latches by setting DLAB in LCR.
136 *
137 */
138 sav_lcr = inreg(channel, LCR);
139
140#if 0
141 /*
142 * Set baud rate
143 */
144 outreg(channel, LCR, LCR_DLAB | sav_lcr);
145 // outreg(DLL,(XTAL/(16*2*(baud))-2));
146 outreg(channel, DLL, XTAL / (16 * baud));
147 // outreg(DLM,(XTAL/(16*2*(baud))-2)>>8);
148 outreg(channel, DLM, (XTAL / (16 * baud)) >> 8);
149#else
150 /*
151 * Note: Set baud rate, hardcoded here for rate of 115200
152 * since became unsure of above "baud rate" algorithm (??).
153 */
154 outreg(channel, LCR, 0x83);
155 outreg(channel, DLM, 0x00); // See note above
156 outreg(channel, DLL, 0x02); // See note above.
157 outreg(channel, LCR, 0x03);
158#endif
159
160 /*
161 * Restore line control register
162 */
163 outreg(channel, LCR, sav_lcr);
164}
165
166
167/******************************
168 Routine:
169 Description:
170 Transmit a character.
171 ******************************/
172void serial_putc(int channel, int c)
173{
174 while ((inreg(channel, LSR) & LSR_THRE) == 0);
175 outreg(channel, THR, c);
176}
177
178/******************************
179 Routine:
180 Description:
181 Read a received character if one is
182 available. Return -1 otherwise.
183 ******************************/
184int serial_getc(int channel)
185{
186 if (inreg(channel, LSR) & LSR_DR) {
187 return inreg(channel, RBR);
188 }
189 return -1;
190}
191
192/******************************
193 Routine:
194 Description:
195 Used by embedded gdb client. (example; gdb-stub.c)
196 ******************************/
197char getDebugChar()
198{
199 int val;
200 while ((val = serial_getc(DEBUG_CHANNEL)) == -1); // loop until we get a character in.
201 return (char) val;
202}
203
204/******************************
205 Routine:
206 Description:
207 Used by embedded gdb target. (example; gdb-stub.c)
208 ******************************/
209void putDebugChar(char c)
210{
211 serial_putc(DEBUG_CHANNEL, (int) c);
212}
diff --git a/arch/mips/gt64120/ev64120/setup.c b/arch/mips/gt64120/ev64120/setup.c
deleted file mode 100644
index 477848c22a..0000000000
--- a/arch/mips/gt64120/ev64120/setup.c
+++ /dev/null
@@ -1,99 +0,0 @@
1/*
2 * Copyright (C) 2000 RidgeRun, Inc.
3 * Author: RidgeRun, Inc.
4 * glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.com
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
12 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
14 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
15 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
20 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 *
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 *
26 */
27#include <linux/init.h>
28#include <linux/kernel.h>
29#include <linux/types.h>
30#include <linux/mm.h>
31#include <linux/swap.h>
32#include <linux/ioport.h>
33#include <linux/sched.h>
34#include <linux/interrupt.h>
35#include <linux/pci.h>
36#include <linux/timex.h>
37#include <linux/pm.h>
38
39#include <asm/bootinfo.h>
40#include <asm/page.h>
41#include <asm/io.h>
42#include <asm/irq.h>
43#include <asm/pci.h>
44#include <asm/processor.h>
45#include <asm/time.h>
46#include <asm/reboot.h>
47#include <asm/traps.h>
48#include <linux/bootmem.h>
49
50unsigned long gt64120_base = KSEG1ADDR(0x14000000);
51
52/* These functions are used for rebooting or halting the machine*/
53extern void galileo_machine_restart(char *command);
54extern void galileo_machine_halt(void);
55extern void galileo_machine_power_off(void);
56/*
57 *This structure holds pointers to the pci configuration space accesses
58 *and interrupts allocating routine for device over the PCI
59 */
60extern struct pci_ops galileo_pci_ops;
61
62void __init prom_free_prom_memory(void)
63{
64}
65
66/*
67 * Initializes basic routines and structures pointers, memory size (as
68 * given by the bios and saves the command line.
69 */
70
71void __init plat_mem_setup(void)
72{
73 _machine_restart = galileo_machine_restart;
74 _machine_halt = galileo_machine_halt;
75 pm_power_off = galileo_machine_power_off;
76
77 set_io_port_base(KSEG1);
78}
79
80const char *get_system_type(void)
81{
82 return "Galileo EV64120A";
83}
84
85/*
86 * Kernel arguments passed by the firmware
87 *
88 * $a0 - nothing
89 * $a1 - holds a pointer to the eprom parameters
90 * $a2 - nothing
91 */
92
93void __init prom_init(void)
94{
95 mips_machgroup = MACH_GROUP_GALILEO;
96 mips_machtype = MACH_EV64120A;
97
98 add_memory_region(0, 32 << 20, BOOT_MEM_RAM);
99}
diff --git a/arch/mips/gt64120/momenco_ocelot/Makefile b/arch/mips/gt64120/momenco_ocelot/Makefile
index 9f9a33fc76..1df5fe23c6 100644
--- a/arch/mips/gt64120/momenco_ocelot/Makefile
+++ b/arch/mips/gt64120/momenco_ocelot/Makefile
@@ -2,6 +2,6 @@
2# Makefile for Momentum's Ocelot board. 2# Makefile for Momentum's Ocelot board.
3# 3#
4 4
5obj-y += irq.o prom.o reset.o setup.o 5obj-y += irq.o ocelot-platform.o prom.o reset.o setup.o
6 6
7obj-$(CONFIG_KGDB) += dbg_io.o 7obj-$(CONFIG_KGDB) += dbg_io.o
diff --git a/arch/mips/gt64120/momenco_ocelot/ocelot-platform.c b/arch/mips/gt64120/momenco_ocelot/ocelot-platform.c
new file mode 100644
index 0000000000..81d9031a5a
--- /dev/null
+++ b/arch/mips/gt64120/momenco_ocelot/ocelot-platform.c
@@ -0,0 +1,46 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
7 *
8 * A NS16552 DUART with a 20MHz crystal.
9 *
10 */
11#include <linux/module.h>
12#include <linux/init.h>
13#include <linux/serial_8250.h>
14
15#define OCELOT_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP)
16
17static struct plat_serial8250_port uart8250_data[] = {
18 {
19 .mapbase = 0xe0001020,
20 .irq = 4,
21 .uartclk = 20000000,
22 .iotype = UPIO_MEM,
23 .flags = OCELOT_UART_FLAGS,
24 .regshift = 2,
25 },
26 { },
27};
28
29static struct platform_device uart8250_device = {
30 .name = "serial8250",
31 .id = PLAT8250_DEV_PLATFORM,
32 .dev = {
33 .platform_data = uart8250_data,
34 },
35};
36
37static int __init uart8250_init(void)
38{
39 return platform_device_register(&uart8250_device);
40}
41
42module_init(uart8250_init);
43
44MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
45MODULE_LICENSE("GPL");
46MODULE_DESCRIPTION("8250 UART probe driver for the Momenco Ocelot");
diff --git a/arch/mips/gt64120/wrppmc/setup.c b/arch/mips/gt64120/wrppmc/setup.c
index 121188d5ec..ed58c13b60 100644
--- a/arch/mips/gt64120/wrppmc/setup.c
+++ b/arch/mips/gt64120/wrppmc/setup.c
@@ -14,6 +14,7 @@
14#include <linux/tty.h> 14#include <linux/tty.h>
15#include <linux/serial.h> 15#include <linux/serial.h>
16#include <linux/serial_core.h> 16#include <linux/serial_core.h>
17#include <linux/serial_8250.h>
17#include <linux/pm.h> 18#include <linux/pm.h>
18 19
19#include <asm/io.h> 20#include <asm/io.h>
@@ -158,8 +159,8 @@ const char *get_system_type(void)
158 */ 159 */
159void __init prom_init(void) 160void __init prom_init(void)
160{ 161{
161 mips_machgroup = MACH_GROUP_GALILEO; 162 mips_machgroup = MACH_GROUP_WINDRIVER;
162 mips_machtype = MACH_EV64120A; 163 mips_machtype = MACH_WRPPMC;
163 164
164 add_memory_region(WRPPMC_SDRAM_SCS0_BASE, WRPPMC_SDRAM_SCS0_SIZE, BOOT_MEM_RAM); 165 add_memory_region(WRPPMC_SDRAM_SCS0_BASE, WRPPMC_SDRAM_SCS0_SIZE, BOOT_MEM_RAM);
165 add_memory_region(WRPPMC_BOOTROM_BASE, WRPPMC_BOOTROM_SIZE, BOOT_MEM_ROM_DATA); 166 add_memory_region(WRPPMC_BOOTROM_BASE, WRPPMC_BOOTROM_SIZE, BOOT_MEM_ROM_DATA);
diff --git a/arch/mips/jazz/Makefile b/arch/mips/jazz/Makefile
index dd9d99bfcf..ae4c402b50 100644
--- a/arch/mips/jazz/Makefile
+++ b/arch/mips/jazz/Makefile
@@ -2,4 +2,4 @@
2# Makefile for the Jazz family specific parts of the kernel 2# Makefile for the Jazz family specific parts of the kernel
3# 3#
4 4
5obj-y := irq.o jazzdma.o reset.o setup.o 5obj-y := irq.o jazzdma.o jazz-platform.o reset.o setup.o
diff --git a/arch/mips/jazz/jazz-platform.c b/arch/mips/jazz/jazz-platform.c
new file mode 100644
index 0000000000..fd736703ee
--- /dev/null
+++ b/arch/mips/jazz/jazz-platform.c
@@ -0,0 +1,60 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
7 */
8#include <linux/init.h>
9#include <linux/module.h>
10#include <linux/serial_8250.h>
11
12#include <asm/jazz.h>
13
14/*
15 * Confusion ... It seems the original Microsoft Jazz machine used to have a
16 * 4.096MHz clock for its UART while the MIPS Magnum and Millenium systems
17 * had 8MHz. The Olivetti M700-10 and the Acer PICA have 1.8432MHz like PCs.
18 */
19#ifdef CONFIG_OLIVETTI_M700
20#define JAZZ_BASE_BAUD 1843200
21#else
22#define JAZZ_BASE_BAUD 8000000 /* 3072000 */
23#endif
24
25#define JAZZ_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP)
26
27#define JAZZ_PORT(base, int) \
28{ \
29 .mapbase = base, \
30 .irq = int, \
31 .uartclk = JAZZ_BASE_BAUD, \
32 .iotype = UPIO_MEM, \
33 .flags = JAZZ_UART_FLAGS, \
34 .regshift = 0, \
35}
36
37static struct plat_serial8250_port uart8250_data[] = {
38 JAZZ_PORT(JAZZ_SERIAL1_BASE, JAZZ_SERIAL1_IRQ),
39 JAZZ_PORT(JAZZ_SERIAL2_BASE, JAZZ_SERIAL2_IRQ),
40 { },
41};
42
43static struct platform_device uart8250_device = {
44 .name = "serial8250",
45 .id = PLAT8250_DEV_PLATFORM,
46 .dev = {
47 .platform_data = uart8250_data,
48 },
49};
50
51static int __init uart8250_init(void)
52{
53 return platform_device_register(&uart8250_device);
54}
55
56module_init(uart8250_init);
57
58MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
59MODULE_LICENSE("GPL");
60MODULE_DESCRIPTION("8250 UART probe driver for the Jazz family");
diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c
index d848f1a077..81ec559a1c 100644
--- a/arch/mips/jazz/setup.c
+++ b/arch/mips/jazz/setup.c
@@ -54,7 +54,7 @@ static struct resource jazz_io_resources[] = {
54 .start = 0x40, 54 .start = 0x40,
55 .end = 0x5f, 55 .end = 0x5f,
56 .name = "timer", 56 .name = "timer",
57 .end = IORESOURCE_BUSY 57 .flags = IORESOURCE_BUSY
58 }, { 58 }, {
59 .start = 0x80, 59 .start = 0x80,
60 .end = 0x8f, 60 .end = 0x8f,
diff --git a/arch/mips/kernel/8250-platform.c b/arch/mips/kernel/8250-platform.c
new file mode 100644
index 0000000000..cbf3fe20ad
--- /dev/null
+++ b/arch/mips/kernel/8250-platform.c
@@ -0,0 +1,47 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
7 */
8#include <linux/module.h>
9#include <linux/init.h>
10#include <linux/serial_8250.h>
11
12#define PORT(base, int) \
13{ \
14 .iobase = base, \
15 .irq = int, \
16 .uartclk = 1843200, \
17 .iotype = UPIO_PORT, \
18 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \
19 .regshift = 0, \
20}
21
22static struct plat_serial8250_port uart8250_data[] = {
23 PORT(0x3F8, 4),
24 PORT(0x2F8, 3),
25 PORT(0x3E8, 4),
26 PORT(0x2E8, 3),
27 { },
28};
29
30static struct platform_device uart8250_device = {
31 .name = "serial8250",
32 .id = PLAT8250_DEV_PLATFORM,
33 .dev = {
34 .platform_data = uart8250_data,
35 },
36};
37
38static int __init uart8250_init(void)
39{
40 return platform_device_register(&uart8250_device);
41}
42
43module_init(uart8250_init);
44
45MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
46MODULE_LICENSE("GPL");
47MODULE_DESCRIPTION("Generic 8250 UART probe driver");
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index 49246264cc..5c8085b6d7 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -14,14 +14,15 @@ 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_CPU_LOONGSON2) += r4k_fpu.o r4k_switch.o
18obj-$(CONFIG_CPU_MIPS32) += r4k_fpu.o r4k_switch.o
19obj-$(CONFIG_CPU_MIPS64) += r4k_fpu.o r4k_switch.o
17obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o 20obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o
18obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o
19obj-$(CONFIG_CPU_TX49XX) += r4k_fpu.o r4k_switch.o
20obj-$(CONFIG_CPU_R4000) += r4k_fpu.o r4k_switch.o 21obj-$(CONFIG_CPU_R4000) += r4k_fpu.o r4k_switch.o
21obj-$(CONFIG_CPU_VR41XX) += r4k_fpu.o r4k_switch.o
22obj-$(CONFIG_CPU_R4300) += r4k_fpu.o r4k_switch.o 22obj-$(CONFIG_CPU_R4300) += r4k_fpu.o r4k_switch.o
23obj-$(CONFIG_CPU_R4X00) += r4k_fpu.o r4k_switch.o 23obj-$(CONFIG_CPU_R4X00) += r4k_fpu.o r4k_switch.o
24obj-$(CONFIG_CPU_R5000) += r4k_fpu.o r4k_switch.o 24obj-$(CONFIG_CPU_R5000) += r4k_fpu.o r4k_switch.o
25obj-$(CONFIG_CPU_R6000) += r6000_fpu.o r4k_switch.o
25obj-$(CONFIG_CPU_R5432) += r4k_fpu.o r4k_switch.o 26obj-$(CONFIG_CPU_R5432) += r4k_fpu.o r4k_switch.o
26obj-$(CONFIG_CPU_R8000) += r4k_fpu.o r4k_switch.o 27obj-$(CONFIG_CPU_R8000) += r4k_fpu.o r4k_switch.o
27obj-$(CONFIG_CPU_RM7000) += r4k_fpu.o r4k_switch.o 28obj-$(CONFIG_CPU_RM7000) += r4k_fpu.o r4k_switch.o
@@ -29,13 +30,14 @@ obj-$(CONFIG_CPU_RM9000) += r4k_fpu.o r4k_switch.o
29obj-$(CONFIG_CPU_NEVADA) += r4k_fpu.o r4k_switch.o 30obj-$(CONFIG_CPU_NEVADA) += r4k_fpu.o r4k_switch.o
30obj-$(CONFIG_CPU_R10000) += r4k_fpu.o r4k_switch.o 31obj-$(CONFIG_CPU_R10000) += r4k_fpu.o r4k_switch.o
31obj-$(CONFIG_CPU_SB1) += r4k_fpu.o r4k_switch.o 32obj-$(CONFIG_CPU_SB1) += r4k_fpu.o r4k_switch.o
32obj-$(CONFIG_CPU_MIPS32) += r4k_fpu.o r4k_switch.o 33obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o
33obj-$(CONFIG_CPU_MIPS64) += r4k_fpu.o r4k_switch.o 34obj-$(CONFIG_CPU_TX49XX) += r4k_fpu.o r4k_switch.o
34obj-$(CONFIG_CPU_R6000) += r6000_fpu.o r4k_switch.o 35obj-$(CONFIG_CPU_VR41XX) += r4k_fpu.o r4k_switch.o
35 36
36obj-$(CONFIG_SMP) += smp.o 37obj-$(CONFIG_SMP) += smp.o
37 38
38obj-$(CONFIG_MIPS_MT) += mips-mt.o 39obj-$(CONFIG_MIPS_MT) += mips-mt.o
40obj-$(CONFIG_MIPS_MT_FPAFF) += mips-mt-fpaff.o
39obj-$(CONFIG_MIPS_MT_SMTC) += smtc.o smtc-asm.o smtc-proc.o 41obj-$(CONFIG_MIPS_MT_SMTC) += smtc.o smtc-asm.o smtc-proc.o
40obj-$(CONFIG_MIPS_MT_SMP) += smp-mt.o 42obj-$(CONFIG_MIPS_MT_SMP) += smp-mt.o
41 43
@@ -47,7 +49,6 @@ obj-$(CONFIG_I8259) += i8259.o
47obj-$(CONFIG_IRQ_CPU) += irq_cpu.o 49obj-$(CONFIG_IRQ_CPU) += irq_cpu.o
48obj-$(CONFIG_IRQ_CPU_RM7K) += irq-rm7000.o 50obj-$(CONFIG_IRQ_CPU_RM7K) += irq-rm7000.o
49obj-$(CONFIG_IRQ_CPU_RM9K) += irq-rm9000.o 51obj-$(CONFIG_IRQ_CPU_RM9K) += irq-rm9000.o
50obj-$(CONFIG_IRQ_MV64340) += irq-mv6434x.o
51obj-$(CONFIG_MIPS_BOARDS_GEN) += irq-msc01.o 52obj-$(CONFIG_MIPS_BOARDS_GEN) += irq-msc01.o
52 53
53obj-$(CONFIG_32BIT) += scall32-o32.o 54obj-$(CONFIG_32BIT) += scall32-o32.o
@@ -62,9 +63,11 @@ obj-$(CONFIG_PROC_FS) += proc.o
62 63
63obj-$(CONFIG_64BIT) += cpu-bugs64.o 64obj-$(CONFIG_64BIT) += cpu-bugs64.o
64 65
65obj-$(CONFIG_I8253) += i8253.o 66obj-$(CONFIG_PCSPEAKER) += pcspeaker.o
66 67
67obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o 68obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
68obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 69obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
69 70
70CFLAGS_cpu-bugs64.o = $(shell if $(CC) $(CFLAGS) -Wa,-mdaddi -c -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi) 71CFLAGS_cpu-bugs64.o = $(shell if $(CC) $(CFLAGS) -Wa,-mdaddi -c -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi)
72
73obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT) += 8250-platform.o
diff --git a/arch/mips/kernel/branch.c b/arch/mips/kernel/branch.c
index 76fd3f22c7..6b5df8bfab 100644
--- a/arch/mips/kernel/branch.c
+++ b/arch/mips/kernel/branch.c
@@ -22,7 +22,8 @@
22 */ 22 */
23int __compute_return_epc(struct pt_regs *regs) 23int __compute_return_epc(struct pt_regs *regs)
24{ 24{
25 unsigned int *addr, bit, fcr31, dspcontrol; 25 unsigned int __user *addr;
26 unsigned int bit, fcr31, dspcontrol;
26 long epc; 27 long epc;
27 union mips_instruction insn; 28 union mips_instruction insn;
28 29
@@ -33,7 +34,7 @@ int __compute_return_epc(struct pt_regs *regs)
33 /* 34 /*
34 * Read the instruction 35 * Read the instruction
35 */ 36 */
36 addr = (unsigned int *) epc; 37 addr = (unsigned int __user *) epc;
37 if (__get_user(insn.word, addr)) { 38 if (__get_user(insn.word, addr)) {
38 force_sig(SIGSEGV, current); 39 force_sig(SIGSEGV, current);
39 return -EFAULT; 40 return -EFAULT;
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index ab755ea26c..c6b8b074a8 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -137,14 +137,24 @@ static inline void check_wait(void)
137 case CPU_4KEC: 137 case CPU_4KEC:
138 case CPU_4KSC: 138 case CPU_4KSC:
139 case CPU_5KC: 139 case CPU_5KC:
140/* case CPU_20KC:*/
141 case CPU_24K:
142 case CPU_25KF: 140 case CPU_25KF:
141 case CPU_PR4450:
142 cpu_wait = r4k_wait;
143 break;
144
145 case CPU_24K:
143 case CPU_34K: 146 case CPU_34K:
147 cpu_wait = r4k_wait;
148 if (read_c0_config7() & MIPS_CONF7_WII)
149 cpu_wait = r4k_wait_irqoff;
150 break;
151
144 case CPU_74K: 152 case CPU_74K:
145 case CPU_PR4450:
146 cpu_wait = r4k_wait; 153 cpu_wait = r4k_wait;
154 if ((c->processor_id & 0xff) >= PRID_REV_ENCODE_332(2, 1, 0))
155 cpu_wait = r4k_wait_irqoff;
147 break; 156 break;
157
148 case CPU_TX49XX: 158 case CPU_TX49XX:
149 cpu_wait = r4k_wait_irqoff; 159 cpu_wait = r4k_wait_irqoff;
150 break; 160 break;
@@ -156,6 +166,17 @@ static inline void check_wait(void)
156 if (allow_au1k_wait) 166 if (allow_au1k_wait)
157 cpu_wait = au1k_wait; 167 cpu_wait = au1k_wait;
158 break; 168 break;
169 case CPU_20KC:
170 /*
171 * WAIT on Rev1.0 has E1, E2, E3 and E16.
172 * WAIT on Rev2.0 and Rev3.0 has E16.
173 * Rev3.1 WAIT is nop, why bother
174 */
175 if ((c->processor_id & 0xff) <= 0x64)
176 break;
177
178 cpu_wait = r4k_wait;
179 break;
159 case CPU_RM9000: 180 case CPU_RM9000:
160 if ((c->processor_id & 0x00ff) >= 0x40) 181 if ((c->processor_id & 0x00ff) >= 0x40)
161 cpu_wait = r4k_wait; 182 cpu_wait = r4k_wait;
@@ -165,9 +186,29 @@ static inline void check_wait(void)
165 } 186 }
166} 187}
167 188
189static inline void check_errata(void)
190{
191 struct cpuinfo_mips *c = &current_cpu_data;
192
193 switch (c->cputype) {
194 case CPU_34K:
195 /*
196 * Erratum "RPS May Cause Incorrect Instruction Execution"
197 * This code only handles VPE0, any SMP/SMTC/RTOS code
198 * making use of VPE1 will be responsable for that VPE.
199 */
200 if ((c->processor_id & PRID_REV_MASK) <= PRID_REV_34K_V1_0_2)
201 write_c0_config7(read_c0_config7() | MIPS_CONF7_RPS);
202 break;
203 default:
204 break;
205 }
206}
207
168void __init check_bugs32(void) 208void __init check_bugs32(void)
169{ 209{
170 check_wait(); 210 check_wait();
211 check_errata();
171} 212}
172 213
173/* 214/*
@@ -464,6 +505,14 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
464 MIPS_CPU_LLSC; 505 MIPS_CPU_LLSC;
465 c->tlbsize = 64; 506 c->tlbsize = 64;
466 break; 507 break;
508 case PRID_IMP_LOONGSON2:
509 c->cputype = CPU_LOONGSON2;
510 c->isa_level = MIPS_CPU_ISA_III;
511 c->options = R4K_OPTS |
512 MIPS_CPU_FPU | MIPS_CPU_LLSC |
513 MIPS_CPU_32FPR;
514 c->tlbsize = 64;
515 break;
467 } 516 }
468} 517}
469 518
@@ -567,6 +616,8 @@ static inline unsigned int decode_config3(struct cpuinfo_mips *c)
567 c->options |= MIPS_CPU_VEIC; 616 c->options |= MIPS_CPU_VEIC;
568 if (config3 & MIPS_CONF3_MT) 617 if (config3 & MIPS_CONF3_MT)
569 c->ases |= MIPS_ASE_MIPSMT; 618 c->ases |= MIPS_ASE_MIPSMT;
619 if (config3 & MIPS_CONF3_ULRI)
620 c->options |= MIPS_CPU_ULRI;
570 621
571 return config3 & MIPS_CONF_M; 622 return config3 & MIPS_CONF_M;
572} 623}
diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S
index 686249c5c3..e29598ae93 100644
--- a/arch/mips/kernel/entry.S
+++ b/arch/mips/kernel/entry.S
@@ -84,6 +84,7 @@ FEXPORT(restore_all) # restore full frame
84 LONG_S sp, TI_REGS($28) 84 LONG_S sp, TI_REGS($28)
85 jal deferred_smtc_ipi 85 jal deferred_smtc_ipi
86 LONG_S s0, TI_REGS($28) 86 LONG_S s0, TI_REGS($28)
87#ifdef CONFIG_MIPS_MT_SMTC_IM_BACKSTOP
87/* Re-arm any temporarily masked interrupts not explicitly "acked" */ 88/* Re-arm any temporarily masked interrupts not explicitly "acked" */
88 mfc0 v0, CP0_TCSTATUS 89 mfc0 v0, CP0_TCSTATUS
89 ori v1, v0, TCSTATUS_IXMT 90 ori v1, v0, TCSTATUS_IXMT
@@ -110,6 +111,7 @@ FEXPORT(restore_all) # restore full frame
110 _ehb 111 _ehb
111 xor t0, t0, t3 112 xor t0, t0, t3
112 mtc0 t0, CP0_TCCONTEXT 113 mtc0 t0, CP0_TCCONTEXT
114#endif /* CONFIG_MIPS_MT_SMTC_IM_BACKSTOP */
113#endif /* CONFIG_MIPS_MT_SMTC */ 115#endif /* CONFIG_MIPS_MT_SMTC */
114 .set noat 116 .set noat
115 RESTORE_TEMP 117 RESTORE_TEMP
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S
index 297bd56c23..c0f19d638b 100644
--- a/arch/mips/kernel/genex.S
+++ b/arch/mips/kernel/genex.S
@@ -243,9 +243,11 @@ NESTED(except_vec_vi_handler, 0, sp)
243 */ 243 */
244 mfc0 t1, CP0_STATUS 244 mfc0 t1, CP0_STATUS
245 and t0, a0, t1 245 and t0, a0, t1
246#ifdef CONFIG_MIPS_MT_SMTC_IM_BACKSTOP
246 mfc0 t2, CP0_TCCONTEXT 247 mfc0 t2, CP0_TCCONTEXT
247 or t0, t0, t2 248 or t0, t0, t2
248 mtc0 t0, CP0_TCCONTEXT 249 mtc0 t0, CP0_TCCONTEXT
250#endif /* CONFIG_MIPS_MT_SMTC_IM_BACKSTOP */
249 xor t1, t1, t0 251 xor t1, t1, t0
250 mtc0 t1, CP0_STATUS 252 mtc0 t1, CP0_STATUS
251 _ehb 253 _ehb
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
index 6f57ca4429..f78538ecee 100644
--- a/arch/mips/kernel/head.S
+++ b/arch/mips/kernel/head.S
@@ -16,6 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/threads.h> 17#include <linux/threads.h>
18 18
19#include <asm/addrspace.h>
19#include <asm/asm.h> 20#include <asm/asm.h>
20#include <asm/asmmacro.h> 21#include <asm/asmmacro.h>
21#include <asm/irqflags.h> 22#include <asm/irqflags.h>
@@ -129,24 +130,25 @@
129#endif 130#endif
130 .endm 131 .endm
131 132
133#ifndef CONFIG_NO_EXCEPT_FILL
132 /* 134 /*
133 * Reserved space for exception handlers. 135 * Reserved space for exception handlers.
134 * Necessary for machines which link their kernels at KSEG0. 136 * Necessary for machines which link their kernels at KSEG0.
135 */ 137 */
136 .fill 0x400 138 .fill 0x400
139#endif
137 140
138EXPORT(stext) # used for profiling 141EXPORT(stext) # used for profiling
139EXPORT(_stext) 142EXPORT(_stext)
140 143
141#ifdef CONFIG_MIPS_SIM 144#ifdef CONFIG_BOOT_RAW
142 /* 145 /*
143 * Give us a fighting chance of running if execution beings at the 146 * Give us a fighting chance of running if execution beings at the
144 * kernel load address. This is needed because this platform does 147 * kernel load address. This is needed because this platform does
145 * not have a ELF loader yet. 148 * not have a ELF loader yet.
146 */ 149 */
147 j kernel_entry
148#endif
149 __INIT 150 __INIT
151#endif
150 152
151NESTED(kernel_entry, 16, sp) # kernel entry point 153NESTED(kernel_entry, 16, sp) # kernel entry point
152 154
@@ -197,9 +199,7 @@ NESTED(kernel_entry, 16, sp) # kernel entry point
197 j start_kernel 199 j start_kernel
198 END(kernel_entry) 200 END(kernel_entry)
199 201
200#ifdef CONFIG_QEMU
201 __INIT 202 __INIT
202#endif
203 203
204#ifdef CONFIG_SMP 204#ifdef CONFIG_SMP
205/* 205/*
diff --git a/arch/mips/kernel/irq-mv6434x.c b/arch/mips/kernel/irq-mv6434x.c
deleted file mode 100644
index 3dd561832e..0000000000
--- a/arch/mips/kernel/irq-mv6434x.c
+++ /dev/null
@@ -1,111 +0,0 @@
1/*
2 * Copyright 2002 Momentum Computer
3 * Author: mdharm@momenco.com
4 * Copyright (C) 2004, 06 Ralf Baechle <ralf@linux-mips.org>
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#include <linux/module.h>
12#include <linux/interrupt.h>
13#include <linux/kernel.h>
14#include <linux/kernel_stat.h>
15#include <linux/mv643xx.h>
16#include <linux/sched.h>
17
18#include <asm/io.h>
19#include <asm/irq.h>
20#include <asm/marvell.h>
21
22static unsigned int irq_base;
23
24static inline int ls1bit32(unsigned int x)
25{
26 int b = 31, s;
27
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;
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;
32 s = 1; if (x << 1 == 0) s = 0; b -= s;
33
34 return b;
35}
36
37/* mask off an interrupt -- 1 is enable, 0 is disable */
38static inline void mask_mv64340_irq(unsigned int irq)
39{
40 uint32_t value;
41
42 if (irq < (irq_base + 32)) {
43 value = MV_READ(MV64340_INTERRUPT0_MASK_0_LOW);
44 value &= ~(1 << (irq - irq_base));
45 MV_WRITE(MV64340_INTERRUPT0_MASK_0_LOW, value);
46 } else {
47 value = MV_READ(MV64340_INTERRUPT0_MASK_0_HIGH);
48 value &= ~(1 << (irq - irq_base - 32));
49 MV_WRITE(MV64340_INTERRUPT0_MASK_0_HIGH, value);
50 }
51}
52
53/* unmask an interrupt -- 1 is enable, 0 is disable */
54static inline void unmask_mv64340_irq(unsigned int irq)
55{
56 uint32_t value;
57
58 if (irq < (irq_base + 32)) {
59 value = MV_READ(MV64340_INTERRUPT0_MASK_0_LOW);
60 value |= 1 << (irq - irq_base);
61 MV_WRITE(MV64340_INTERRUPT0_MASK_0_LOW, value);
62 } else {
63 value = MV_READ(MV64340_INTERRUPT0_MASK_0_HIGH);
64 value |= 1 << (irq - irq_base - 32);
65 MV_WRITE(MV64340_INTERRUPT0_MASK_0_HIGH, value);
66 }
67}
68
69/*
70 * Interrupt handler for interrupts coming from the Marvell chip.
71 * It could be built in ethernet ports etc...
72 */
73void ll_mv64340_irq(void)
74{
75 unsigned int irq_src_low, irq_src_high;
76 unsigned int irq_mask_low, irq_mask_high;
77
78 /* read the interrupt status registers */
79 irq_mask_low = MV_READ(MV64340_INTERRUPT0_MASK_0_LOW);
80 irq_mask_high = MV_READ(MV64340_INTERRUPT0_MASK_0_HIGH);
81 irq_src_low = MV_READ(MV64340_MAIN_INTERRUPT_CAUSE_LOW);
82 irq_src_high = MV_READ(MV64340_MAIN_INTERRUPT_CAUSE_HIGH);
83
84 /* mask for just the interrupts we want */
85 irq_src_low &= irq_mask_low;
86 irq_src_high &= irq_mask_high;
87
88 if (irq_src_low)
89 do_IRQ(ls1bit32(irq_src_low) + irq_base);
90 else
91 do_IRQ(ls1bit32(irq_src_high) + irq_base + 32);
92}
93
94struct irq_chip mv64340_irq_type = {
95 .name = "MV-64340",
96 .ack = mask_mv64340_irq,
97 .mask = mask_mv64340_irq,
98 .mask_ack = mask_mv64340_irq,
99 .unmask = unmask_mv64340_irq,
100};
101
102void __init mv64340_irq_init(unsigned int base)
103{
104 int i;
105
106 for (i = base; i < base + 64; i++)
107 set_irq_chip_and_handler(i, &mv64340_irq_type,
108 handle_level_irq);
109
110 irq_base = base;
111}
diff --git a/arch/mips/kernel/mips-mt-fpaff.c b/arch/mips/kernel/mips-mt-fpaff.c
new file mode 100644
index 0000000000..ede5d73d65
--- /dev/null
+++ b/arch/mips/kernel/mips-mt-fpaff.c
@@ -0,0 +1,176 @@
1/*
2 * General MIPS MT support routines, usable in AP/SP, SMVP, or SMTC kernels
3 * Copyright (C) 2005 Mips Technologies, Inc
4 */
5#include <linux/cpu.h>
6#include <linux/cpumask.h>
7#include <linux/delay.h>
8#include <linux/kernel.h>
9#include <linux/init.h>
10#include <linux/sched.h>
11#include <linux/security.h>
12#include <linux/types.h>
13#include <asm/uaccess.h>
14
15/*
16 * CPU mask used to set process affinity for MT VPEs/TCs with FPUs
17 */
18cpumask_t mt_fpu_cpumask;
19
20static int fpaff_threshold = -1;
21unsigned long mt_fpemul_threshold = 0;
22
23/*
24 * Replacement functions for the sys_sched_setaffinity() and
25 * sys_sched_getaffinity() system calls, so that we can integrate
26 * FPU affinity with the user's requested processor affinity.
27 * This code is 98% identical with the sys_sched_setaffinity()
28 * and sys_sched_getaffinity() system calls, and should be
29 * updated when kernel/sched.c changes.
30 */
31
32/*
33 * find_process_by_pid - find a process with a matching PID value.
34 * used in sys_sched_set/getaffinity() in kernel/sched.c, so
35 * cloned here.
36 */
37static inline struct task_struct *find_process_by_pid(pid_t pid)
38{
39 return pid ? find_task_by_pid(pid) : current;
40}
41
42
43/*
44 * mipsmt_sys_sched_setaffinity - set the cpu affinity of a process
45 */
46asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len,
47 unsigned long __user *user_mask_ptr)
48{
49 cpumask_t new_mask;
50 cpumask_t effective_mask;
51 int retval;
52 struct task_struct *p;
53
54 if (len < sizeof(new_mask))
55 return -EINVAL;
56
57 if (copy_from_user(&new_mask, user_mask_ptr, sizeof(new_mask)))
58 return -EFAULT;
59
60 lock_cpu_hotplug();
61 read_lock(&tasklist_lock);
62
63 p = find_process_by_pid(pid);
64 if (!p) {
65 read_unlock(&tasklist_lock);
66 unlock_cpu_hotplug();
67 return -ESRCH;
68 }
69
70 /*
71 * It is not safe to call set_cpus_allowed with the
72 * tasklist_lock held. We will bump the task_struct's
73 * usage count and drop tasklist_lock before invoking
74 * set_cpus_allowed.
75 */
76 get_task_struct(p);
77
78 retval = -EPERM;
79 if ((current->euid != p->euid) && (current->euid != p->uid) &&
80 !capable(CAP_SYS_NICE)) {
81 read_unlock(&tasklist_lock);
82 goto out_unlock;
83 }
84
85 retval = security_task_setscheduler(p, 0, NULL);
86 if (retval)
87 goto out_unlock;
88
89 /* Record new user-specified CPU set for future reference */
90 p->thread.user_cpus_allowed = new_mask;
91
92 /* Unlock the task list */
93 read_unlock(&tasklist_lock);
94
95 /* Compute new global allowed CPU set if necessary */
96 if ((p->thread.mflags & MF_FPUBOUND)
97 && cpus_intersects(new_mask, mt_fpu_cpumask)) {
98 cpus_and(effective_mask, new_mask, mt_fpu_cpumask);
99 retval = set_cpus_allowed(p, effective_mask);
100 } else {
101 p->thread.mflags &= ~MF_FPUBOUND;
102 retval = set_cpus_allowed(p, new_mask);
103 }
104
105
106out_unlock:
107 put_task_struct(p);
108 unlock_cpu_hotplug();
109 return retval;
110}
111
112/*
113 * mipsmt_sys_sched_getaffinity - get the cpu affinity of a process
114 */
115asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len,
116 unsigned long __user *user_mask_ptr)
117{
118 unsigned int real_len;
119 cpumask_t mask;
120 int retval;
121 struct task_struct *p;
122
123 real_len = sizeof(mask);
124 if (len < real_len)
125 return -EINVAL;
126
127 lock_cpu_hotplug();
128 read_lock(&tasklist_lock);
129
130 retval = -ESRCH;
131 p = find_process_by_pid(pid);
132 if (!p)
133 goto out_unlock;
134 retval = security_task_getscheduler(p);
135 if (retval)
136 goto out_unlock;
137
138 cpus_and(mask, p->thread.user_cpus_allowed, cpu_possible_map);
139
140out_unlock:
141 read_unlock(&tasklist_lock);
142 unlock_cpu_hotplug();
143 if (retval)
144 return retval;
145 if (copy_to_user(user_mask_ptr, &mask, real_len))
146 return -EFAULT;
147 return real_len;
148}
149
150
151static int __init fpaff_thresh(char *str)
152{
153 get_option(&str, &fpaff_threshold);
154 return 1;
155}
156__setup("fpaff=", fpaff_thresh);
157
158/*
159 * FPU Use Factor empirically derived from experiments on 34K
160 */
161#define FPUSEFACTOR 333
162
163static __init int mt_fp_affinity_init(void)
164{
165 if (fpaff_threshold >= 0) {
166 mt_fpemul_threshold = fpaff_threshold;
167 } else {
168 mt_fpemul_threshold =
169 (FPUSEFACTOR * (loops_per_jiffy/(500000/HZ))) / HZ;
170 }
171 printk(KERN_DEBUG "FPU Affinity set after %ld emulations\n",
172 mt_fpemul_threshold);
173
174 return 0;
175}
176arch_initcall(mt_fp_affinity_init);
diff --git a/arch/mips/kernel/mips-mt.c b/arch/mips/kernel/mips-mt.c
index ba01800b60..1a7d892312 100644
--- a/arch/mips/kernel/mips-mt.c
+++ b/arch/mips/kernel/mips-mt.c
@@ -6,7 +6,6 @@
6#include <linux/device.h> 6#include <linux/device.h>
7#include <linux/kernel.h> 7#include <linux/kernel.h>
8#include <linux/sched.h> 8#include <linux/sched.h>
9#include <linux/cpumask.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/interrupt.h> 10#include <linux/interrupt.h>
12#include <linux/security.h> 11#include <linux/security.h>
@@ -23,149 +22,6 @@
23#include <asm/cacheflush.h> 22#include <asm/cacheflush.h>
24 23
25/* 24/*
26 * CPU mask used to set process affinity for MT VPEs/TCs with FPUs
27 */
28
29cpumask_t mt_fpu_cpumask;
30
31#ifdef CONFIG_MIPS_MT_FPAFF
32
33#include <linux/cpu.h>
34#include <linux/delay.h>
35#include <asm/uaccess.h>
36
37unsigned long mt_fpemul_threshold = 0;
38
39/*
40 * Replacement functions for the sys_sched_setaffinity() and
41 * sys_sched_getaffinity() system calls, so that we can integrate
42 * FPU affinity with the user's requested processor affinity.
43 * This code is 98% identical with the sys_sched_setaffinity()
44 * and sys_sched_getaffinity() system calls, and should be
45 * updated when kernel/sched.c changes.
46 */
47
48/*
49 * find_process_by_pid - find a process with a matching PID value.
50 * used in sys_sched_set/getaffinity() in kernel/sched.c, so
51 * cloned here.
52 */
53static inline struct task_struct *find_process_by_pid(pid_t pid)
54{
55 return pid ? find_task_by_pid(pid) : current;
56}
57
58
59/*
60 * mipsmt_sys_sched_setaffinity - set the cpu affinity of a process
61 */
62asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len,
63 unsigned long __user *user_mask_ptr)
64{
65 cpumask_t new_mask;
66 cpumask_t effective_mask;
67 int retval;
68 struct task_struct *p;
69
70 if (len < sizeof(new_mask))
71 return -EINVAL;
72
73 if (copy_from_user(&new_mask, user_mask_ptr, sizeof(new_mask)))
74 return -EFAULT;
75
76 lock_cpu_hotplug();
77 read_lock(&tasklist_lock);
78
79 p = find_process_by_pid(pid);
80 if (!p) {
81 read_unlock(&tasklist_lock);
82 unlock_cpu_hotplug();
83 return -ESRCH;
84 }
85
86 /*
87 * It is not safe to call set_cpus_allowed with the
88 * tasklist_lock held. We will bump the task_struct's
89 * usage count and drop tasklist_lock before invoking
90 * set_cpus_allowed.
91 */
92 get_task_struct(p);
93
94 retval = -EPERM;
95 if ((current->euid != p->euid) && (current->euid != p->uid) &&
96 !capable(CAP_SYS_NICE)) {
97 read_unlock(&tasklist_lock);
98 goto out_unlock;
99 }
100
101 retval = security_task_setscheduler(p, 0, NULL);
102 if (retval)
103 goto out_unlock;
104
105 /* Record new user-specified CPU set for future reference */
106 p->thread.user_cpus_allowed = new_mask;
107
108 /* Unlock the task list */
109 read_unlock(&tasklist_lock);
110
111 /* Compute new global allowed CPU set if necessary */
112 if( (p->thread.mflags & MF_FPUBOUND)
113 && cpus_intersects(new_mask, mt_fpu_cpumask)) {
114 cpus_and(effective_mask, new_mask, mt_fpu_cpumask);
115 retval = set_cpus_allowed(p, effective_mask);
116 } else {
117 p->thread.mflags &= ~MF_FPUBOUND;
118 retval = set_cpus_allowed(p, new_mask);
119 }
120
121
122out_unlock:
123 put_task_struct(p);
124 unlock_cpu_hotplug();
125 return retval;
126}
127
128/*
129 * mipsmt_sys_sched_getaffinity - get the cpu affinity of a process
130 */
131asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len,
132 unsigned long __user *user_mask_ptr)
133{
134 unsigned int real_len;
135 cpumask_t mask;
136 int retval;
137 struct task_struct *p;
138
139 real_len = sizeof(mask);
140 if (len < real_len)
141 return -EINVAL;
142
143 lock_cpu_hotplug();
144 read_lock(&tasklist_lock);
145
146 retval = -ESRCH;
147 p = find_process_by_pid(pid);
148 if (!p)
149 goto out_unlock;
150 retval = security_task_getscheduler(p);
151 if (retval)
152 goto out_unlock;
153
154 cpus_and(mask, p->thread.user_cpus_allowed, cpu_possible_map);
155
156out_unlock:
157 read_unlock(&tasklist_lock);
158 unlock_cpu_hotplug();
159 if (retval)
160 return retval;
161 if (copy_to_user(user_mask_ptr, &mask, real_len))
162 return -EFAULT;
163 return real_len;
164}
165
166#endif /* CONFIG_MIPS_MT_FPAFF */
167
168/*
169 * Dump new MIPS MT state for the core. Does not leave TCs halted. 25 * Dump new MIPS MT state for the core. Does not leave TCs halted.
170 * Takes an argument which taken to be a pre-call MVPControl value. 26 * Takes an argument which taken to be a pre-call MVPControl value.
171 */ 27 */
@@ -195,27 +51,31 @@ void mips_mt_regdump(unsigned long mvpctl)
195 nvpe = ((mvpconf0 & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT) + 1; 51 nvpe = ((mvpconf0 & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT) + 1;
196 ntc = ((mvpconf0 & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1; 52 ntc = ((mvpconf0 & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1;
197 printk("-- per-VPE State --\n"); 53 printk("-- per-VPE State --\n");
198 for(i = 0; i < nvpe; i++) { 54 for (i = 0; i < nvpe; i++) {
199 for(tc = 0; tc < ntc; tc++) { 55 for (tc = 0; tc < ntc; tc++) {
200 settc(tc); 56 settc(tc);
201 if((read_tc_c0_tcbind() & TCBIND_CURVPE) == i) { 57 if ((read_tc_c0_tcbind() & TCBIND_CURVPE) == i) {
202 printk(" VPE %d\n", i); 58 printk(" VPE %d\n", i);
203 printk(" VPEControl : %08lx\n", read_vpe_c0_vpecontrol()); 59 printk(" VPEControl : %08lx\n",
204 printk(" VPEConf0 : %08lx\n", read_vpe_c0_vpeconf0()); 60 read_vpe_c0_vpecontrol());
205 printk(" VPE%d.Status : %08lx\n", 61 printk(" VPEConf0 : %08lx\n",
206 i, read_vpe_c0_status()); 62 read_vpe_c0_vpeconf0());
207 printk(" VPE%d.EPC : %08lx\n", i, read_vpe_c0_epc()); 63 printk(" VPE%d.Status : %08lx\n",
208 printk(" VPE%d.Cause : %08lx\n", i, read_vpe_c0_cause()); 64 i, read_vpe_c0_status());
209 printk(" VPE%d.Config7 : %08lx\n", 65 printk(" VPE%d.EPC : %08lx\n",
210 i, read_vpe_c0_config7()); 66 i, read_vpe_c0_epc());
211 break; /* Next VPE */ 67 printk(" VPE%d.Cause : %08lx\n",
68 i, read_vpe_c0_cause());
69 printk(" VPE%d.Config7 : %08lx\n",
70 i, read_vpe_c0_config7());
71 break; /* Next VPE */
72 }
212 } 73 }
213 }
214 } 74 }
215 printk("-- per-TC State --\n"); 75 printk("-- per-TC State --\n");
216 for(tc = 0; tc < ntc; tc++) { 76 for (tc = 0; tc < ntc; tc++) {
217 settc(tc); 77 settc(tc);
218 if(read_tc_c0_tcbind() == read_c0_tcbind()) { 78 if (read_tc_c0_tcbind() == read_c0_tcbind()) {
219 /* Are we dumping ourself? */ 79 /* Are we dumping ourself? */
220 haltval = 0; /* Then we're not halted, and mustn't be */ 80 haltval = 0; /* Then we're not halted, and mustn't be */
221 tcstatval = flags; /* And pre-dump TCStatus is flags */ 81 tcstatval = flags; /* And pre-dump TCStatus is flags */
@@ -310,17 +170,6 @@ static int __init ndflush(char *s)
310 return 1; 170 return 1;
311} 171}
312__setup("ndflush=", ndflush); 172__setup("ndflush=", ndflush);
313#ifdef CONFIG_MIPS_MT_FPAFF
314static int fpaff_threshold = -1;
315
316static int __init fpaff_thresh(char *str)
317{
318 get_option(&str, &fpaff_threshold);
319 return 1;
320}
321
322__setup("fpaff=", fpaff_thresh);
323#endif /* CONFIG_MIPS_MT_FPAFF */
324 173
325static unsigned int itc_base = 0; 174static unsigned int itc_base = 0;
326 175
@@ -376,20 +225,6 @@ void mips_mt_set_cpuoptions(void)
376 if (mt_n_dflushes != 1) 225 if (mt_n_dflushes != 1)
377 printk("D-Cache Flushes Repeated %d times\n", mt_n_dflushes); 226 printk("D-Cache Flushes Repeated %d times\n", mt_n_dflushes);
378 227
379#ifdef CONFIG_MIPS_MT_FPAFF
380 /* FPU Use Factor empirically derived from experiments on 34K */
381#define FPUSEFACTOR 333
382
383 if (fpaff_threshold >= 0) {
384 mt_fpemul_threshold = fpaff_threshold;
385 } else {
386 mt_fpemul_threshold =
387 (FPUSEFACTOR * (loops_per_jiffy/(500000/HZ))) / HZ;
388 }
389 printk("FPU Affinity set after %ld emulations\n",
390 mt_fpemul_threshold);
391#endif /* CONFIG_MIPS_MT_FPAFF */
392
393 if (itc_base != 0) { 228 if (itc_base != 0) {
394 /* 229 /*
395 * Configure ITC mapping. This code is very 230 * Configure ITC mapping. This code is very
diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/pcspeaker.c
index 475df69042..475df69042 100644
--- a/arch/mips/kernel/i8253.c
+++ b/arch/mips/kernel/pcspeaker.c
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
index 5ddc2e9dee..ec04f5a1a5 100644
--- a/arch/mips/kernel/proc.c
+++ b/arch/mips/kernel/proc.c
@@ -14,7 +14,6 @@
14#include <asm/cpu-features.h> 14#include <asm/cpu-features.h>
15#include <asm/mipsregs.h> 15#include <asm/mipsregs.h>
16#include <asm/processor.h> 16#include <asm/processor.h>
17#include <asm/watch.h>
18 17
19unsigned int vced_count, vcei_count; 18unsigned int vced_count, vcei_count;
20 19
@@ -84,6 +83,7 @@ static const char *cpu_name[] = {
84 [CPU_VR4181A] = "NEC VR4181A", 83 [CPU_VR4181A] = "NEC VR4181A",
85 [CPU_SR71000] = "Sandcraft SR71000", 84 [CPU_SR71000] = "Sandcraft SR71000",
86 [CPU_PR4450] = "Philips PR4450", 85 [CPU_PR4450] = "Philips PR4450",
86 [CPU_LOONGSON2] = "ICT Loongson-2",
87}; 87};
88 88
89 89
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index 6bdfb5a9fa..8f4cf27c71 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -46,7 +46,7 @@
46 * power and have a low exit latency (ie sit in a loop waiting for somebody to 46 * power and have a low exit latency (ie sit in a loop waiting for somebody to
47 * say that they'd like to reschedule) 47 * say that they'd like to reschedule)
48 */ 48 */
49ATTRIB_NORET void cpu_idle(void) 49void __noreturn cpu_idle(void)
50{ 50{
51 /* endless idle loop with no priority at all */ 51 /* endless idle loop with no priority at all */
52 while (1) { 52 while (1) {
@@ -213,7 +213,7 @@ int dump_task_fpu (struct task_struct *t, elf_fpregset_t *fpr)
213/* 213/*
214 * Create a kernel thread 214 * Create a kernel thread
215 */ 215 */
216static ATTRIB_NORET void kernel_thread_helper(void *arg, int (*fn)(void *)) 216static void __noreturn kernel_thread_helper(void *arg, int (*fn)(void *))
217{ 217{
218 do_exit(fn(arg)); 218 do_exit(fn(arg));
219} 219}
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
index b5a7b46bbc..893e7bccf2 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -174,17 +174,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
174 switch (request) { 174 switch (request) {
175 /* when I and D space are separate, these will need to be fixed. */ 175 /* when I and D space are separate, these will need to be fixed. */
176 case PTRACE_PEEKTEXT: /* read word at location addr. */ 176 case PTRACE_PEEKTEXT: /* read word at location addr. */
177 case PTRACE_PEEKDATA: { 177 case PTRACE_PEEKDATA:
178 unsigned long tmp; 178 ret = generic_ptrace_peekdata(child, addr, data);
179 int copied;
180
181 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
182 ret = -EIO;
183 if (copied != sizeof(tmp))
184 break;
185 ret = put_user(tmp,(unsigned long __user *) data);
186 break; 179 break;
187 }
188 180
189 /* Read the word at location addr in the USER area. */ 181 /* Read the word at location addr in the USER area. */
190 case PTRACE_PEEKUSR: { 182 case PTRACE_PEEKUSR: {
@@ -313,11 +305,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
313 /* when I and D space are separate, this will have to be fixed. */ 305 /* when I and D space are separate, this will have to be fixed. */
314 case PTRACE_POKETEXT: /* write the word at location addr. */ 306 case PTRACE_POKETEXT: /* write the word at location addr. */
315 case PTRACE_POKEDATA: 307 case PTRACE_POKEDATA:
316 ret = 0; 308 ret = generic_ptrace_pokedata(child, addr, data);
317 if (access_process_vm(child, addr, &data, sizeof(data), 1)
318 == sizeof(data))
319 break;
320 ret = -EIO;
321 break; 309 break;
322 310
323 case PTRACE_POKEUSR: { 311 case PTRACE_POKEUSR: {
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S
index 0672959681..d9bfae53c4 100644
--- a/arch/mips/kernel/r4k_switch.S
+++ b/arch/mips/kernel/r4k_switch.S
@@ -85,12 +85,7 @@
85 move $28, a2 85 move $28, a2
86 cpu_restore_nonscratch a1 86 cpu_restore_nonscratch a1
87 87
88#if (_THREAD_SIZE - 32) < 0x10000 88 PTR_ADDU t0, $28, _THREAD_SIZE - 32
89 PTR_ADDIU t0, $28, _THREAD_SIZE - 32
90#else
91 PTR_LI t0, _THREAD_SIZE - 32
92 PTR_ADDU t0, $28
93#endif
94 set_saved_sp t0, t1, t2 89 set_saved_sp t0, t1, t2
95#ifdef CONFIG_MIPS_MT_SMTC 90#ifdef CONFIG_MIPS_MT_SMTC
96 /* Read-modify-writes of Status must be atomic on a VPE */ 91 /* Read-modify-writes of Status must be atomic on a VPE */
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 4975da0bfb..316685fca0 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -20,6 +20,7 @@
20#include <linux/highmem.h> 20#include <linux/highmem.h>
21#include <linux/console.h> 21#include <linux/console.h>
22#include <linux/pfn.h> 22#include <linux/pfn.h>
23#include <linux/debugfs.h>
23 24
24#include <asm/addrspace.h> 25#include <asm/addrspace.h>
25#include <asm/bootinfo.h> 26#include <asm/bootinfo.h>
@@ -574,3 +575,18 @@ __setup("nodsp", dsp_disable);
574 575
575unsigned long kernelsp[NR_CPUS]; 576unsigned long kernelsp[NR_CPUS];
576unsigned long fw_arg0, fw_arg1, fw_arg2, fw_arg3; 577unsigned long fw_arg0, fw_arg1, fw_arg2, fw_arg3;
578
579#ifdef CONFIG_DEBUG_FS
580struct dentry *mips_debugfs_dir;
581static int __init debugfs_mips(void)
582{
583 struct dentry *d;
584
585 d = debugfs_create_dir("mips", NULL);
586 if (IS_ERR(d))
587 return PTR_ERR(d);
588 mips_debugfs_dir = d;
589 return 0;
590}
591arch_initcall(debugfs_mips);
592#endif
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
index 003f8152b9..486b8e5f52 100644
--- a/arch/mips/kernel/signal32.c
+++ b/arch/mips/kernel/signal32.c
@@ -36,68 +36,6 @@
36 36
37#include "signal-common.h" 37#include "signal-common.h"
38 38
39#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3)
40
41typedef struct compat_siginfo {
42 int si_signo;
43 int si_code;
44 int si_errno;
45
46 union {
47 int _pad[SI_PAD_SIZE32];
48
49 /* kill() */
50 struct {
51 compat_pid_t _pid; /* sender's pid */
52 compat_uid_t _uid; /* sender's uid */
53 } _kill;
54
55 /* SIGCHLD */
56 struct {
57 compat_pid_t _pid; /* which child */
58 compat_uid_t _uid; /* sender's uid */
59 int _status; /* exit code */
60 compat_clock_t _utime;
61 compat_clock_t _stime;
62 } _sigchld;
63
64 /* IRIX SIGCHLD */
65 struct {
66 compat_pid_t _pid; /* which child */
67 compat_clock_t _utime;
68 int _status; /* exit code */
69 compat_clock_t _stime;
70 } _irix_sigchld;
71
72 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
73 struct {
74 s32 _addr; /* faulting insn/memory ref. */
75 } _sigfault;
76
77 /* SIGPOLL, SIGXFSZ (To do ...) */
78 struct {
79 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
80 int _fd;
81 } _sigpoll;
82
83 /* POSIX.1b timers */
84 struct {
85 timer_t _tid; /* timer id */
86 int _overrun; /* overrun count */
87 compat_sigval_t _sigval;/* same as below */
88 int _sys_private; /* not to be passed to user */
89 } _timer;
90
91 /* POSIX.1b signals */
92 struct {
93 compat_pid_t _pid; /* sender's pid */
94 compat_uid_t _uid; /* sender's uid */
95 compat_sigval_t _sigval;
96 } _rt;
97
98 } _sifields;
99} compat_siginfo_t;
100
101/* 39/*
102 * Including <asm/unistd.h> would give use the 64-bit syscall numbers ... 40 * Including <asm/unistd.h> would give use the 64-bit syscall numbers ...
103 */ 41 */
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c
index 4cf9ff24d1..eb7e05926e 100644
--- a/arch/mips/kernel/signal_n32.c
+++ b/arch/mips/kernel/signal_n32.c
@@ -72,7 +72,7 @@ struct ucontextn32 {
72struct rt_sigframe_n32 { 72struct rt_sigframe_n32 {
73 u32 rs_ass[4]; /* argument save space for o32 */ 73 u32 rs_ass[4]; /* argument save space for o32 */
74 u32 rs_code[2]; /* signal trampoline */ 74 u32 rs_code[2]; /* signal trampoline */
75 struct siginfo rs_info; 75 struct compat_siginfo rs_info;
76 struct ucontextn32 rs_uc; 76 struct ucontextn32 rs_uc;
77}; 77};
78 78
@@ -81,7 +81,7 @@ struct rt_sigframe_n32 {
81struct rt_sigframe_n32 { 81struct rt_sigframe_n32 {
82 u32 rs_ass[4]; /* argument save space for o32 */ 82 u32 rs_ass[4]; /* argument save space for o32 */
83 u32 rs_pad[2]; 83 u32 rs_pad[2];
84 struct siginfo rs_info; 84 struct compat_siginfo rs_info;
85 struct ucontextn32 rs_uc; 85 struct ucontextn32 rs_uc;
86 u32 rs_code[8] ____cacheline_aligned; /* signal trampoline */ 86 u32 rs_code[8] ____cacheline_aligned; /* signal trampoline */
87}; 87};
@@ -187,7 +187,7 @@ static int setup_rt_frame_n32(struct k_sigaction * ka,
187 install_sigtramp(frame->rs_code, __NR_N32_rt_sigreturn); 187 install_sigtramp(frame->rs_code, __NR_N32_rt_sigreturn);
188 188
189 /* Create siginfo. */ 189 /* Create siginfo. */
190 err |= copy_siginfo_to_user(&frame->rs_info, info); 190 err |= copy_siginfo_to_user32(&frame->rs_info, info);
191 191
192 /* Create the ucontext. */ 192 /* Create the ucontext. */
193 err |= __put_user(0, &frame->rs_uc.uc_flags); 193 err |= __put_user(0, &frame->rs_uc.uc_flags);
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c
index b8fa7ddd78..19b30d6f17 100644
--- a/arch/mips/kernel/smp-mt.c
+++ b/arch/mips/kernel/smp-mt.c
@@ -236,8 +236,6 @@ void __init plat_smp_setup(void)
236 dvpe(); 236 dvpe();
237 dmt(); 237 dmt();
238 238
239 mips_mt_set_cpuoptions();
240
241 /* Put MVPE's into 'configuration state' */ 239 /* Put MVPE's into 'configuration state' */
242 set_c0_mvpcontrol(MVPCONTROL_VPC); 240 set_c0_mvpcontrol(MVPCONTROL_VPC);
243 241
@@ -263,6 +261,8 @@ void __init plat_smp_setup(void)
263 261
264void __init plat_prepare_cpus(unsigned int max_cpus) 262void __init plat_prepare_cpus(unsigned int max_cpus)
265{ 263{
264 mips_mt_set_cpuoptions();
265
266 /* set up ipi interrupts */ 266 /* set up ipi interrupts */
267 if (cpu_has_vint) { 267 if (cpu_has_vint) {
268 set_vi_handler(MIPS_CPU_IPI_RESCHED_IRQ, ipi_resched_dispatch); 268 set_vi_handler(MIPS_CPU_IPI_RESCHED_IRQ, ipi_resched_dispatch);
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 67edfa7ed9..be7362bc2c 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -51,18 +51,8 @@ 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 */
55static void smp_tune_scheduling (void)
56{
57 struct cache_desc *cd = &current_cpu_data.scache;
58 unsigned long cachesize = cd->linesz * cd->sets * cd->ways;
59
60 if (cachesize > max_cache_size)
61 max_cache_size = cachesize;
62}
63
64extern void __init calibrate_delay(void); 54extern void __init calibrate_delay(void);
65extern ATTRIB_NORET void cpu_idle(void); 55extern void cpu_idle(void);
66 56
67/* 57/*
68 * First C code run on the secondary CPUs after being started up by 58 * First C code run on the secondary CPUs after being started up by
@@ -228,7 +218,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
228{ 218{
229 init_new_context(current, &init_mm); 219 init_new_context(current, &init_mm);
230 current_thread_info()->cpu = 0; 220 current_thread_info()->cpu = 0;
231 smp_tune_scheduling();
232 plat_prepare_cpus(max_cpus); 221 plat_prepare_cpus(max_cpus);
233#ifndef CONFIG_HOTPLUG_CPU 222#ifndef CONFIG_HOTPLUG_CPU
234 cpu_present_map = cpu_possible_map; 223 cpu_present_map = cpu_possible_map;
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index 2e011470c3..342d873b2e 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -822,7 +822,7 @@ void ipi_decode(struct smtc_ipi *pipi)
822 switch (type_copy) { 822 switch (type_copy) {
823 case SMTC_CLOCK_TICK: 823 case SMTC_CLOCK_TICK:
824 irq_enter(); 824 irq_enter();
825 kstat_this_cpu.irqs[MIPS_CPU_IRQ_BASE + cp0_perfcount_irq]++; 825 kstat_this_cpu.irqs[MIPS_CPU_IRQ_BASE + cp0_compare_irq]++;
826 /* Invoke Clock "Interrupt" */ 826 /* Invoke Clock "Interrupt" */
827 ipi_timer_latch[dest_copy] = 0; 827 ipi_timer_latch[dest_copy] = 0;
828#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG 828#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG
@@ -1104,7 +1104,7 @@ void smtc_idle_loop_hook(void)
1104 mtflags = dmt(); 1104 mtflags = dmt();
1105 pdb_msg = &id_ho_db_msg[0]; 1105 pdb_msg = &id_ho_db_msg[0];
1106 im = read_c0_status(); 1106 im = read_c0_status();
1107 vpe = cpu_data[smp_processor_id()].vpe_id; 1107 vpe = current_cpu_data.vpe_id;
1108 for (bit = 0; bit < 8; bit++) { 1108 for (bit = 0; bit < 8; bit++) {
1109 /* 1109 /*
1110 * In current prototype, I/O interrupts 1110 * In current prototype, I/O interrupts
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 9dd5a2df8e..b947c61c0c 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -272,9 +272,8 @@ asmlinkage int sys_set_thread_area(unsigned long addr)
272 struct thread_info *ti = task_thread_info(current); 272 struct thread_info *ti = task_thread_info(current);
273 273
274 ti->tp_value = addr; 274 ti->tp_value = addr;
275 275 if (cpu_has_userlocal)
276 /* If some future MIPS implementation has this register in hardware, 276 write_c0_userlocal(addr);
277 * we will need to update it here (and in context switches). */
278 277
279 return 0; 278 return 0;
280} 279}
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index b1233644fc..ce277cb34d 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -39,7 +39,6 @@
39#include <asm/traps.h> 39#include <asm/traps.h>
40#include <asm/uaccess.h> 40#include <asm/uaccess.h>
41#include <asm/mmu_context.h> 41#include <asm/mmu_context.h>
42#include <asm/watch.h>
43#include <asm/types.h> 42#include <asm/types.h>
44#include <asm/stacktrace.h> 43#include <asm/stacktrace.h>
45 44
@@ -70,6 +69,7 @@ extern asmlinkage void handle_reserved(void);
70extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, 69extern int fpu_emulator_cop1Handler(struct pt_regs *xcp,
71 struct mips_fpu_struct *ctx, int has_fpu); 70 struct mips_fpu_struct *ctx, int has_fpu);
72 71
72void (*board_watchpoint_handler)(struct pt_regs *regs);
73void (*board_be_init)(void); 73void (*board_be_init)(void);
74int (*board_be_handler)(struct pt_regs *regs, int is_fixup); 74int (*board_be_handler)(struct pt_regs *regs, int is_fixup);
75void (*board_nmi_handler_setup)(void); 75void (*board_nmi_handler_setup)(void);
@@ -131,7 +131,7 @@ static void show_stacktrace(struct task_struct *task, struct pt_regs *regs)
131 const int field = 2 * sizeof(unsigned long); 131 const int field = 2 * sizeof(unsigned long);
132 long stackdata; 132 long stackdata;
133 int i; 133 int i;
134 unsigned long *sp = (unsigned long *)regs->regs[29]; 134 unsigned long __user *sp = (unsigned long __user *)regs->regs[29];
135 135
136 printk("Stack :"); 136 printk("Stack :");
137 i = 0; 137 i = 0;
@@ -187,7 +187,7 @@ void dump_stack(void)
187 187
188EXPORT_SYMBOL(dump_stack); 188EXPORT_SYMBOL(dump_stack);
189 189
190void show_code(unsigned int *pc) 190static void show_code(unsigned int __user *pc)
191{ 191{
192 long i; 192 long i;
193 193
@@ -305,13 +305,13 @@ void show_registers(struct pt_regs *regs)
305 printk("Process %s (pid: %d, threadinfo=%p, task=%p)\n", 305 printk("Process %s (pid: %d, threadinfo=%p, task=%p)\n",
306 current->comm, current->pid, current_thread_info(), current); 306 current->comm, current->pid, current_thread_info(), current);
307 show_stacktrace(current, regs); 307 show_stacktrace(current, regs);
308 show_code((unsigned int *) regs->cp0_epc); 308 show_code((unsigned int __user *) regs->cp0_epc);
309 printk("\n"); 309 printk("\n");
310} 310}
311 311
312static DEFINE_SPINLOCK(die_lock); 312static DEFINE_SPINLOCK(die_lock);
313 313
314NORET_TYPE void ATTRIB_NORET die(const char * str, struct pt_regs * regs) 314void __noreturn die(const char * str, struct pt_regs * regs)
315{ 315{
316 static int die_counter; 316 static int die_counter;
317#ifdef CONFIG_MIPS_MT_SMTC 317#ifdef CONFIG_MIPS_MT_SMTC
@@ -326,6 +326,7 @@ NORET_TYPE void ATTRIB_NORET die(const char * str, struct pt_regs * regs)
326#endif /* CONFIG_MIPS_MT_SMTC */ 326#endif /* CONFIG_MIPS_MT_SMTC */
327 printk("%s[#%d]:\n", str, ++die_counter); 327 printk("%s[#%d]:\n", str, ++die_counter);
328 show_registers(regs); 328 show_registers(regs);
329 add_taint(TAINT_DIE);
329 spin_unlock_irq(&die_lock); 330 spin_unlock_irq(&die_lock);
330 331
331 if (in_interrupt()) 332 if (in_interrupt())
@@ -373,7 +374,7 @@ asmlinkage void do_be(struct pt_regs *regs)
373 action = MIPS_BE_FIXUP; 374 action = MIPS_BE_FIXUP;
374 375
375 if (board_be_handler) 376 if (board_be_handler)
376 action = board_be_handler(regs, fixup != 0); 377 action = board_be_handler(regs, fixup != NULL);
377 378
378 switch (action) { 379 switch (action) {
379 case MIPS_BE_DISCARD: 380 case MIPS_BE_DISCARD:
@@ -753,6 +754,33 @@ asmlinkage void do_ri(struct pt_regs *regs)
753 force_sig(SIGILL, current); 754 force_sig(SIGILL, current);
754} 755}
755 756
757/*
758 * MIPS MT processors may have fewer FPU contexts than CPU threads. If we've
759 * emulated more than some threshold number of instructions, force migration to
760 * a "CPU" that has FP support.
761 */
762static void mt_ase_fp_affinity(void)
763{
764#ifdef CONFIG_MIPS_MT_FPAFF
765 if (mt_fpemul_threshold > 0 &&
766 ((current->thread.emulated_fp++ > mt_fpemul_threshold))) {
767 /*
768 * If there's no FPU present, or if the application has already
769 * restricted the allowed set to exclude any CPUs with FPUs,
770 * we'll skip the procedure.
771 */
772 if (cpus_intersects(current->cpus_allowed, mt_fpu_cpumask)) {
773 cpumask_t tmask;
774
775 cpus_and(tmask, current->thread.user_cpus_allowed,
776 mt_fpu_cpumask);
777 set_cpus_allowed(current, tmask);
778 current->thread.mflags |= MF_FPUBOUND;
779 }
780 }
781#endif /* CONFIG_MIPS_MT_FPAFF */
782}
783
756asmlinkage void do_cpu(struct pt_regs *regs) 784asmlinkage void do_cpu(struct pt_regs *regs)
757{ 785{
758 unsigned int cpid; 786 unsigned int cpid;
@@ -786,36 +814,8 @@ asmlinkage void do_cpu(struct pt_regs *regs)
786 &current->thread.fpu, 0); 814 &current->thread.fpu, 0);
787 if (sig) 815 if (sig)
788 force_sig(sig, current); 816 force_sig(sig, current);
789#ifdef CONFIG_MIPS_MT_FPAFF 817 else
790 else { 818 mt_ase_fp_affinity();
791 /*
792 * MIPS MT processors may have fewer FPU contexts
793 * than CPU threads. If we've emulated more than
794 * some threshold number of instructions, force
795 * migration to a "CPU" that has FP support.
796 */
797 if(mt_fpemul_threshold > 0
798 && ((current->thread.emulated_fp++
799 > mt_fpemul_threshold))) {
800 /*
801 * If there's no FPU present, or if the
802 * application has already restricted
803 * the allowed set to exclude any CPUs
804 * with FPUs, we'll skip the procedure.
805 */
806 if (cpus_intersects(current->cpus_allowed,
807 mt_fpu_cpumask)) {
808 cpumask_t tmask;
809
810 cpus_and(tmask,
811 current->thread.user_cpus_allowed,
812 mt_fpu_cpumask);
813 set_cpus_allowed(current, tmask);
814 current->thread.mflags |= MF_FPUBOUND;
815 }
816 }
817 }
818#endif /* CONFIG_MIPS_MT_FPAFF */
819 } 819 }
820 820
821 return; 821 return;
@@ -835,6 +835,11 @@ asmlinkage void do_mdmx(struct pt_regs *regs)
835 835
836asmlinkage void do_watch(struct pt_regs *regs) 836asmlinkage void do_watch(struct pt_regs *regs)
837{ 837{
838 if (board_watchpoint_handler) {
839 (*board_watchpoint_handler)(regs);
840 return;
841 }
842
838 /* 843 /*
839 * We use the watch exception where available to detect stack 844 * We use the watch exception where available to detect stack
840 * overflows. 845 * overflows.
@@ -861,7 +866,7 @@ asmlinkage void do_mcheck(struct pt_regs *regs)
861 dump_tlb_all(); 866 dump_tlb_all();
862 } 867 }
863 868
864 show_code((unsigned int *) regs->cp0_epc); 869 show_code((unsigned int __user *) regs->cp0_epc);
865 870
866 /* 871 /*
867 * Some chips may have other causes of machine check (e.g. SB1 872 * Some chips may have other causes of machine check (e.g. SB1
@@ -1343,7 +1348,14 @@ void __init per_cpu_trap_init(void)
1343 set_c0_status(ST0_MX); 1348 set_c0_status(ST0_MX);
1344 1349
1345#ifdef CONFIG_CPU_MIPSR2 1350#ifdef CONFIG_CPU_MIPSR2
1346 write_c0_hwrena (0x0000000f); /* Allow rdhwr to all registers */ 1351 if (cpu_has_mips_r2) {
1352 unsigned int enable = 0x0000000f;
1353
1354 if (cpu_has_userlocal)
1355 enable |= (1 << 29);
1356
1357 write_c0_hwrena(enable);
1358 }
1347#endif 1359#endif
1348 1360
1349#ifdef CONFIG_MIPS_MT_SMTC 1361#ifdef CONFIG_MIPS_MT_SMTC
@@ -1372,12 +1384,12 @@ void __init per_cpu_trap_init(void)
1372 */ 1384 */
1373 if (cpu_has_mips_r2) { 1385 if (cpu_has_mips_r2) {
1374 cp0_compare_irq = (read_c0_intctl () >> 29) & 7; 1386 cp0_compare_irq = (read_c0_intctl () >> 29) & 7;
1375 cp0_perfcount_irq = -1;
1376 } else {
1377 cp0_compare_irq = CP0_LEGACY_COMPARE_IRQ;
1378 cp0_perfcount_irq = (read_c0_intctl () >> 26) & 7; 1387 cp0_perfcount_irq = (read_c0_intctl () >> 26) & 7;
1379 if (cp0_perfcount_irq != cp0_compare_irq) 1388 if (cp0_perfcount_irq == cp0_compare_irq)
1380 cp0_perfcount_irq = -1; 1389 cp0_perfcount_irq = -1;
1390 } else {
1391 cp0_compare_irq = CP0_LEGACY_COMPARE_IRQ;
1392 cp0_perfcount_irq = -1;
1381 } 1393 }
1382 1394
1383#ifdef CONFIG_MIPS_MT_SMTC 1395#ifdef CONFIG_MIPS_MT_SMTC
diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c
index 18c4a3c45a..8b9c34ffae 100644
--- a/arch/mips/kernel/unaligned.c
+++ b/arch/mips/kernel/unaligned.c
@@ -77,6 +77,7 @@
77#include <linux/signal.h> 77#include <linux/signal.h>
78#include <linux/smp.h> 78#include <linux/smp.h>
79#include <linux/sched.h> 79#include <linux/sched.h>
80#include <linux/debugfs.h>
80#include <asm/asm.h> 81#include <asm/asm.h>
81#include <asm/branch.h> 82#include <asm/branch.h>
82#include <asm/byteorder.h> 83#include <asm/byteorder.h>
@@ -87,9 +88,18 @@
87#define STR(x) __STR(x) 88#define STR(x) __STR(x)
88#define __STR(x) #x 89#define __STR(x) #x
89 90
90#ifdef CONFIG_PROC_FS 91enum {
91unsigned long unaligned_instructions; 92 UNALIGNED_ACTION_QUIET,
93 UNALIGNED_ACTION_SIGNAL,
94 UNALIGNED_ACTION_SHOW,
95};
96#ifdef CONFIG_DEBUG_FS
97static u32 unaligned_instructions;
98static u32 unaligned_action;
99#else
100#define unaligned_action UNALIGNED_ACTION_QUIET
92#endif 101#endif
102extern void show_registers(struct pt_regs *regs);
93 103
94static inline int emulate_load_store_insn(struct pt_regs *regs, 104static inline int emulate_load_store_insn(struct pt_regs *regs,
95 void __user *addr, unsigned int __user *pc, 105 void __user *addr, unsigned int __user *pc,
@@ -459,7 +469,7 @@ static inline int emulate_load_store_insn(struct pt_regs *regs,
459 goto sigill; 469 goto sigill;
460 } 470 }
461 471
462#ifdef CONFIG_PROC_FS 472#ifdef CONFIG_DEBUG_FS
463 unaligned_instructions++; 473 unaligned_instructions++;
464#endif 474#endif
465 475
@@ -516,6 +526,10 @@ asmlinkage void do_ade(struct pt_regs *regs)
516 pc = (unsigned int __user *) exception_epc(regs); 526 pc = (unsigned int __user *) exception_epc(regs);
517 if (user_mode(regs) && (current->thread.mflags & MF_FIXADE) == 0) 527 if (user_mode(regs) && (current->thread.mflags & MF_FIXADE) == 0)
518 goto sigbus; 528 goto sigbus;
529 if (unaligned_action == UNALIGNED_ACTION_SIGNAL)
530 goto sigbus;
531 else if (unaligned_action == UNALIGNED_ACTION_SHOW)
532 show_registers(regs);
519 533
520 /* 534 /*
521 * Do branch emulation only if we didn't forward the exception. 535 * Do branch emulation only if we didn't forward the exception.
@@ -546,3 +560,24 @@ sigbus:
546 * XXX On return from the signal handler we should advance the epc 560 * XXX On return from the signal handler we should advance the epc
547 */ 561 */
548} 562}
563
564#ifdef CONFIG_DEBUG_FS
565extern struct dentry *mips_debugfs_dir;
566static int __init debugfs_unaligned(void)
567{
568 struct dentry *d;
569
570 if (!mips_debugfs_dir)
571 return -ENODEV;
572 d = debugfs_create_u32("unaligned_instructions", S_IRUGO,
573 mips_debugfs_dir, &unaligned_instructions);
574 if (IS_ERR(d))
575 return PTR_ERR(d);
576 d = debugfs_create_u32("unaligned_action", S_IRUGO | S_IWUSR,
577 mips_debugfs_dir, &unaligned_action);
578 if (IS_ERR(d))
579 return PTR_ERR(d);
580 return 0;
581}
582__initcall(debugfs_unaligned);
583#endif
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c
index c9ee9d2d58..9e66354dee 100644
--- a/arch/mips/kernel/vpe.c
+++ b/arch/mips/kernel/vpe.c
@@ -1436,10 +1436,6 @@ static int __init vpe_module_init(void)
1436 write_vpe_c0_vpecontrol(read_vpe_c0_vpecontrol() & ~VPECONTROL_TE); 1436 write_vpe_c0_vpecontrol(read_vpe_c0_vpecontrol() & ~VPECONTROL_TE);
1437 1437
1438 if (i != 0) { 1438 if (i != 0) {
1439 write_vpe_c0_status((read_c0_status() &
1440 ~(ST0_IM | ST0_IE | ST0_KSU))
1441 | ST0_CU0);
1442
1443 /* 1439 /*
1444 * Set config to be the same as vpe0, 1440 * Set config to be the same as vpe0,
1445 * particularly kseg0 coherency alg 1441 * particularly kseg0 coherency alg
diff --git a/arch/mips/lasat/Kconfig b/arch/mips/lasat/Kconfig
deleted file mode 100644
index 1d2ee8a9be..0000000000
--- a/arch/mips/lasat/Kconfig
+++ /dev/null
@@ -1,15 +0,0 @@
1config PICVUE
2 tristate "PICVUE LCD display driver"
3 depends on LASAT
4
5config PICVUE_PROC
6 tristate "PICVUE LCD display driver /proc interface"
7 depends on PICVUE
8
9config DS1603
10 bool "DS1603 RTC driver"
11 depends on LASAT
12
13config LASAT_SYSCTL
14 bool "LASAT sysctl interface"
15 depends on LASAT
diff --git a/arch/mips/lasat/Makefile b/arch/mips/lasat/Makefile
deleted file mode 100644
index 99f5046fdf..0000000000
--- a/arch/mips/lasat/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
1#
2# Makefile for the LASAT specific kernel interface routines under Linux.
3#
4
5obj-y += reset.o setup.o prom.o lasat_board.o \
6 at93c.o interrupt.o
7
8obj-$(CONFIG_LASAT_SYSCTL) += sysctl.o
9obj-$(CONFIG_DS1603) += ds1603.o
10obj-$(CONFIG_PICVUE) += picvue.o
11obj-$(CONFIG_PICVUE_PROC) += picvue_proc.o
12
13clean:
14 make -C image clean
diff --git a/arch/mips/lasat/at93c.c b/arch/mips/lasat/at93c.c
deleted file mode 100644
index ca26e55461..0000000000
--- a/arch/mips/lasat/at93c.c
+++ /dev/null
@@ -1,148 +0,0 @@
1/*
2 * Atmel AT93C46 serial eeprom driver
3 *
4 * Brian Murphy <brian.murphy@eicon.com>
5 *
6 */
7#include <linux/kernel.h>
8#include <linux/delay.h>
9#include <asm/lasat/lasat.h>
10#include <linux/module.h>
11#include <linux/init.h>
12
13#include "at93c.h"
14
15#define AT93C_ADDR_SHIFT 7
16#define AT93C_ADDR_MAX ((1 << AT93C_ADDR_SHIFT) - 1)
17#define AT93C_RCMD (0x6 << AT93C_ADDR_SHIFT)
18#define AT93C_WCMD (0x5 << AT93C_ADDR_SHIFT)
19#define AT93C_WENCMD 0x260
20#define AT93C_WDSCMD 0x200
21
22struct at93c_defs *at93c;
23
24static void at93c_reg_write(u32 val)
25{
26 *at93c->reg = val;
27}
28
29static u32 at93c_reg_read(void)
30{
31 u32 tmp = *at93c->reg;
32 return tmp;
33}
34
35static u32 at93c_datareg_read(void)
36{
37 u32 tmp = *at93c->rdata_reg;
38 return tmp;
39}
40
41static void at93c_cycle_clk(u32 data)
42{
43 at93c_reg_write(data | at93c->clk);
44 lasat_ndelay(250);
45 at93c_reg_write(data & ~at93c->clk);
46 lasat_ndelay(250);
47}
48
49static void at93c_write_databit(u8 bit)
50{
51 u32 data = at93c_reg_read();
52 if (bit)
53 data |= 1 << at93c->wdata_shift;
54 else
55 data &= ~(1 << at93c->wdata_shift);
56
57 at93c_reg_write(data);
58 lasat_ndelay(100);
59 at93c_cycle_clk(data);
60}
61
62static unsigned int at93c_read_databit(void)
63{
64 u32 data;
65
66 at93c_cycle_clk(at93c_reg_read());
67 data = (at93c_datareg_read() >> at93c->rdata_shift) & 1;
68 return data;
69}
70
71static u8 at93c_read_byte(void)
72{
73 int i;
74 u8 data = 0;
75
76 for (i = 0; i<=7; i++) {
77 data <<= 1;
78 data |= at93c_read_databit();
79 }
80 return data;
81}
82
83static void at93c_write_bits(u32 data, int size)
84{
85 int i;
86 int shift = size - 1;
87 u32 mask = (1 << shift);
88
89 for (i = 0; i < size; i++) {
90 at93c_write_databit((data & mask) >> shift);
91 data <<= 1;
92 }
93}
94
95static void at93c_init_op(void)
96{
97 at93c_reg_write((at93c_reg_read() | at93c->cs) & ~at93c->clk & ~(1 << at93c->rdata_shift));
98 lasat_ndelay(50);
99}
100
101static void at93c_end_op(void)
102{
103 at93c_reg_write(at93c_reg_read() & ~at93c->cs);
104 lasat_ndelay(250);
105}
106
107static void at93c_wait(void)
108{
109 at93c_init_op();
110 while (!at93c_read_databit())
111 ;
112 at93c_end_op();
113};
114
115static void at93c_disable_wp(void)
116{
117 at93c_init_op();
118 at93c_write_bits(AT93C_WENCMD, 10);
119 at93c_end_op();
120}
121
122static void at93c_enable_wp(void)
123{
124 at93c_init_op();
125 at93c_write_bits(AT93C_WDSCMD, 10);
126 at93c_end_op();
127}
128
129u8 at93c_read(u8 addr)
130{
131 u8 byte;
132 at93c_init_op();
133 at93c_write_bits((addr & AT93C_ADDR_MAX)|AT93C_RCMD, 10);
134 byte = at93c_read_byte();
135 at93c_end_op();
136 return byte;
137}
138
139void at93c_write(u8 addr, u8 data)
140{
141 at93c_disable_wp();
142 at93c_init_op();
143 at93c_write_bits((addr & AT93C_ADDR_MAX)|AT93C_WCMD, 10);
144 at93c_write_bits(data, 8);
145 at93c_end_op();
146 at93c_wait();
147 at93c_enable_wp();
148}
diff --git a/arch/mips/lasat/at93c.h b/arch/mips/lasat/at93c.h
deleted file mode 100644
index cfe2f99b1d..0000000000
--- a/arch/mips/lasat/at93c.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * Atmel AT93C46 serial eeprom driver
3 *
4 * Brian Murphy <brian.murphy@eicon.com>
5 *
6 */
7
8extern struct at93c_defs {
9 volatile u32 *reg;
10 volatile u32 *rdata_reg;
11 int rdata_shift;
12 int wdata_shift;
13 u32 cs;
14 u32 clk;
15} *at93c;
16
17u8 at93c_read(u8 addr);
18void at93c_write(u8 addr, u8 data);
diff --git a/arch/mips/lasat/ds1603.c b/arch/mips/lasat/ds1603.c
deleted file mode 100644
index 7dced67c55..0000000000
--- a/arch/mips/lasat/ds1603.c
+++ /dev/null
@@ -1,183 +0,0 @@
1/*
2 * Dallas Semiconductors 1603 RTC driver
3 *
4 * Brian Murphy <brian@murphy.dk>
5 *
6 */
7#include <linux/kernel.h>
8#include <asm/lasat/lasat.h>
9#include <linux/delay.h>
10#include <asm/lasat/ds1603.h>
11#include <asm/time.h>
12
13#include "ds1603.h"
14
15#define READ_TIME_CMD 0x81
16#define SET_TIME_CMD 0x80
17#define TRIMMER_SET_CMD 0xC0
18#define TRIMMER_VALUE_MASK 0x38
19#define TRIMMER_SHIFT 3
20
21struct ds_defs *ds1603 = NULL;
22
23/* HW specific register functions */
24static void rtc_reg_write(unsigned long val)
25{
26 *ds1603->reg = val;
27}
28
29static unsigned long rtc_reg_read(void)
30{
31 unsigned long tmp = *ds1603->reg;
32 return tmp;
33}
34
35static unsigned long rtc_datareg_read(void)
36{
37 unsigned long tmp = *ds1603->data_reg;
38 return tmp;
39}
40
41static void rtc_nrst_high(void)
42{
43 rtc_reg_write(rtc_reg_read() | ds1603->rst);
44}
45
46static void rtc_nrst_low(void)
47{
48 rtc_reg_write(rtc_reg_read() & ~ds1603->rst);
49}
50
51static void rtc_cycle_clock(unsigned long data)
52{
53 data |= ds1603->clk;
54 rtc_reg_write(data);
55 lasat_ndelay(250);
56 if (ds1603->data_reversed)
57 data &= ~ds1603->data;
58 else
59 data |= ds1603->data;
60 data &= ~ds1603->clk;
61 rtc_reg_write(data);
62 lasat_ndelay(250 + ds1603->huge_delay);
63}
64
65static void rtc_write_databit(unsigned int bit)
66{
67 unsigned long data = rtc_reg_read();
68 if (ds1603->data_reversed)
69 bit = !bit;
70 if (bit)
71 data |= ds1603->data;
72 else
73 data &= ~ds1603->data;
74
75 rtc_reg_write(data);
76 lasat_ndelay(50 + ds1603->huge_delay);
77 rtc_cycle_clock(data);
78}
79
80static unsigned int rtc_read_databit(void)
81{
82 unsigned int data;
83
84 data = (rtc_datareg_read() & (1 << ds1603->data_read_shift))
85 >> ds1603->data_read_shift;
86 rtc_cycle_clock(rtc_reg_read());
87 return data;
88}
89
90static void rtc_write_byte(unsigned int byte)
91{
92 int i;
93
94 for (i = 0; i<=7; i++) {
95 rtc_write_databit(byte & 1L);
96 byte >>= 1;
97 }
98}
99
100static void rtc_write_word(unsigned long word)
101{
102 int i;
103
104 for (i = 0; i<=31; i++) {
105 rtc_write_databit(word & 1L);
106 word >>= 1;
107 }
108}
109
110static unsigned long rtc_read_word(void)
111{
112 int i;
113 unsigned long word = 0;
114 unsigned long shift = 0;
115
116 for (i = 0; i<=31; i++) {
117 word |= rtc_read_databit() << shift;
118 shift++;
119 }
120 return word;
121}
122
123static void rtc_init_op(void)
124{
125 rtc_nrst_high();
126
127 rtc_reg_write(rtc_reg_read() & ~ds1603->clk);
128
129 lasat_ndelay(50);
130}
131
132static void rtc_end_op(void)
133{
134 rtc_nrst_low();
135 lasat_ndelay(1000);
136}
137
138/* interface */
139unsigned long ds1603_read(void)
140{
141 unsigned long word;
142 unsigned long flags;
143
144 spin_lock_irqsave(&rtc_lock, flags);
145 rtc_init_op();
146 rtc_write_byte(READ_TIME_CMD);
147 word = rtc_read_word();
148 rtc_end_op();
149 spin_unlock_irqrestore(&rtc_lock, flags);
150 return word;
151}
152
153int ds1603_set(unsigned long time)
154{
155 unsigned long flags;
156
157 spin_lock_irqsave(&rtc_lock, flags);
158 rtc_init_op();
159 rtc_write_byte(SET_TIME_CMD);
160 rtc_write_word(time);
161 rtc_end_op();
162 spin_unlock_irqrestore(&rtc_lock, flags);
163
164 return 0;
165}
166
167void ds1603_set_trimmer(unsigned int trimval)
168{
169 rtc_init_op();
170 rtc_write_byte(((trimval << TRIMMER_SHIFT) & TRIMMER_VALUE_MASK)
171 | (TRIMMER_SET_CMD));
172 rtc_end_op();
173}
174
175void ds1603_disable(void)
176{
177 ds1603_set_trimmer(TRIMMER_DISABLE_RTC);
178}
179
180void ds1603_enable(void)
181{
182 ds1603_set_trimmer(TRIMMER_DEFAULT);
183}
diff --git a/arch/mips/lasat/ds1603.h b/arch/mips/lasat/ds1603.h
deleted file mode 100644
index c2e5c76a37..0000000000
--- a/arch/mips/lasat/ds1603.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * Dallas Semiconductors 1603 RTC driver
3 *
4 * Brian Murphy <brian@murphy.dk>
5 *
6 */
7#ifndef __DS1603_H
8#define __DS1603_H
9
10struct ds_defs {
11 volatile u32 *reg;
12 volatile u32 *data_reg;
13 u32 rst;
14 u32 clk;
15 u32 data;
16 u32 data_read_shift;
17 char data_reversed;
18 u32 huge_delay;
19};
20
21extern struct ds_defs *ds1603;
22
23unsigned long ds1603_read(void);
24int ds1603_set(unsigned long);
25void ds1603_set_trimmer(unsigned int);
26void ds1603_enable(void);
27void ds1603_disable(void);
28void ds1603_init(struct ds_defs *);
29
30#define TRIMMER_DEFAULT 3
31#define TRIMMER_DISABLE_RTC 0
32
33#endif
diff --git a/arch/mips/lasat/image/Makefile b/arch/mips/lasat/image/Makefile
deleted file mode 100644
index 35ecd6483e..0000000000
--- a/arch/mips/lasat/image/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
1#
2# MAKEFILE FOR THE MIPS LINUX BOOTLOADER AND ROM DEBUGGER
3#
4# i-data Networks
5#
6# Author: Thomas Horsten <thh@i-data.com>
7#
8
9ifndef Version
10 Version = "$(USER)-test"
11endif
12
13MKLASATIMG = mklasatimg
14MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200
15KERNEL_IMAGE = $(TOPDIR)/vmlinux
16KERNEL_START = $(shell $(NM) $(KERNEL_IMAGE) | grep " _text" | cut -f1 -d\ )
17KERNEL_ENTRY = $(shell $(NM) $(KERNEL_IMAGE) | grep kernel_entry | cut -f1 -d\ )
18
19LDSCRIPT= -L$(obj) -Tromscript.normal
20
21HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \
22 -D_kernel_entry=0x$(KERNEL_ENTRY) \
23 -D VERSION="\"$(Version)\"" \
24 -D TIMESTAMP=$(shell date +%s)
25
26$(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE)
27 $(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $<
28
29OBJECTS = head.o kImage.o
30
31rom.sw: $(obj)/rom.sw
32
33$(obj)/rom.sw: $(obj)/rom.bin
34 $(MKLASATIMG) -o $@ -k $^ -m $(MKLASATIMG_ARCH)
35
36$(obj)/rom.bin: $(obj)/rom
37 $(OBJCOPY) -O binary -S $^ $@
38
39# Rule to make the bootloader
40$(obj)/rom: $(addprefix $(obj)/,$(OBJECTS))
41 $(LD) $(LDFLAGS) $(LDSCRIPT) -o $@ $^
42
43$(obj)/%.o: $(obj)/%.gz
44 $(LD) -r -o $@ -b binary $<
45
46$(obj)/%.gz: $(obj)/%.bin
47 gzip -cf -9 $< > $@
48
49$(obj)/kImage.bin: $(KERNEL_IMAGE)
50 $(OBJCOPY) -O binary -S $^ $@
51
52clean:
53 rm -f rom rom.bin rom.sw kImage.bin kImage.o
diff --git a/arch/mips/lasat/image/head.S b/arch/mips/lasat/image/head.S
deleted file mode 100644
index efb95f2609..0000000000
--- a/arch/mips/lasat/image/head.S
+++ /dev/null
@@ -1,31 +0,0 @@
1#include <asm/lasat/head.h>
2
3 .text
4 .section .text.start, "ax"
5 .set noreorder
6 .set mips3
7
8 /* Magic words identifying a software image */
9 .word LASAT_K_MAGIC0_VAL
10 .word LASAT_K_MAGIC1_VAL
11
12 /* Image header version */
13 .word 0x00000002
14
15 /* image start and size */
16 .word _image_start
17 .word _image_size
18
19 /* start of kernel and entrypoint in uncompressed image */
20 .word _kernel_start
21 .word _kernel_entry
22
23 /* Here we have room for future flags */
24
25 .org 0x40
26reldate:
27 .word TIMESTAMP
28
29 .org 0x50
30release:
31 .string VERSION
diff --git a/arch/mips/lasat/image/romscript.normal b/arch/mips/lasat/image/romscript.normal
deleted file mode 100644
index 988f8ad189..0000000000
--- a/arch/mips/lasat/image/romscript.normal
+++ /dev/null
@@ -1,23 +0,0 @@
1OUTPUT_ARCH(mips)
2
3SECTIONS
4{
5 .text :
6 {
7 *(.text.start)
8 }
9
10 /* Data in ROM */
11
12 .data ALIGN(0x10) :
13 {
14 *(.data)
15 }
16 _image_start = ADDR(.data);
17 _image_size = SIZEOF(.data);
18
19 .other :
20 {
21 *(.*)
22 }
23}
diff --git a/arch/mips/lasat/interrupt.c b/arch/mips/lasat/interrupt.c
deleted file mode 100644
index 9a622b9a10..0000000000
--- a/arch/mips/lasat/interrupt.c
+++ /dev/null
@@ -1,130 +0,0 @@
1/*
2 * Carsten Langgaard, carstenl@mips.com
3 * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
4 *
5 * This program is free software; you can distribute it and/or modify it
6 * under the terms of the GNU General Public License (Version 2) as
7 * 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
12 * for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
17 *
18 * Routines for generic manipulation of the interrupts found on the
19 * Lasat boards.
20 */
21#include <linux/init.h>
22#include <linux/sched.h>
23#include <linux/slab.h>
24#include <linux/interrupt.h>
25#include <linux/kernel_stat.h>
26
27#include <asm/bootinfo.h>
28#include <asm/irq.h>
29#include <asm/lasat/lasatint.h>
30#include <asm/time.h>
31#include <asm/gdb-stub.h>
32
33static volatile int *lasat_int_status = NULL;
34static volatile int *lasat_int_mask = NULL;
35static volatile int lasat_int_mask_shift;
36
37void disable_lasat_irq(unsigned int irq_nr)
38{
39 *lasat_int_mask &= ~(1 << irq_nr) << lasat_int_mask_shift;
40}
41
42void enable_lasat_irq(unsigned int irq_nr)
43{
44 *lasat_int_mask |= (1 << irq_nr) << lasat_int_mask_shift;
45}
46
47static struct irq_chip lasat_irq_type = {
48 .name = "Lasat",
49 .ack = disable_lasat_irq,
50 .mask = disable_lasat_irq,
51 .mask_ack = disable_lasat_irq,
52 .unmask = enable_lasat_irq,
53};
54
55static inline int ls1bit32(unsigned int x)
56{
57 int b = 31, s;
58
59 s = 16; if (x << 16 == 0) s = 0; b -= s; x <<= s;
60 s = 8; if (x << 8 == 0) s = 0; b -= s; x <<= s;
61 s = 4; if (x << 4 == 0) s = 0; b -= s; x <<= s;
62 s = 2; if (x << 2 == 0) s = 0; b -= s; x <<= s;
63 s = 1; if (x << 1 == 0) s = 0; b -= s;
64
65 return b;
66}
67
68static unsigned long (* get_int_status)(void);
69
70static unsigned long get_int_status_100(void)
71{
72 return *lasat_int_status & *lasat_int_mask;
73}
74
75static unsigned long get_int_status_200(void)
76{
77 unsigned long int_status;
78
79 int_status = *lasat_int_status;
80 int_status &= (int_status >> LASATINT_MASK_SHIFT_200) & 0xffff;
81 return int_status;
82}
83
84asmlinkage void plat_irq_dispatch(void)
85{
86 unsigned long int_status;
87 unsigned int cause = read_c0_cause();
88 int irq;
89
90 if (cause & CAUSEF_IP7) { /* R4000 count / compare IRQ */
91 ll_timer_interrupt(7);
92 return;
93 }
94
95 int_status = get_int_status();
96
97 /* if int_status == 0, then the interrupt has already been cleared */
98 if (int_status) {
99 irq = ls1bit32(int_status);
100
101 do_IRQ(irq);
102 }
103}
104
105void __init arch_init_irq(void)
106{
107 int i;
108
109 switch (mips_machtype) {
110 case MACH_LASAT_100:
111 lasat_int_status = (void *)LASAT_INT_STATUS_REG_100;
112 lasat_int_mask = (void *)LASAT_INT_MASK_REG_100;
113 lasat_int_mask_shift = LASATINT_MASK_SHIFT_100;
114 get_int_status = get_int_status_100;
115 *lasat_int_mask = 0;
116 break;
117 case MACH_LASAT_200:
118 lasat_int_status = (void *)LASAT_INT_STATUS_REG_200;
119 lasat_int_mask = (void *)LASAT_INT_MASK_REG_200;
120 lasat_int_mask_shift = LASATINT_MASK_SHIFT_200;
121 get_int_status = get_int_status_200;
122 *lasat_int_mask &= 0xffff;
123 break;
124 default:
125 panic("arch_init_irq: mips_machtype incorrect");
126 }
127
128 for (i = 0; i <= LASATINT_END; i++)
129 set_irq_chip_and_handler(i, &lasat_irq_type, handle_level_irq);
130}
diff --git a/arch/mips/lasat/lasat_board.c b/arch/mips/lasat/lasat_board.c
deleted file mode 100644
index fbe9a87bd0..0000000000
--- a/arch/mips/lasat/lasat_board.c
+++ /dev/null
@@ -1,279 +0,0 @@
1/*
2 * Thomas Horsten <thh@lasat.com>
3 * Copyright (C) 2000 LASAT Networks A/S.
4 *
5 * This program is free software; you can distribute it and/or modify it
6 * under the terms of the GNU General Public License (Version 2) as
7 * 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
12 * for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
17 *
18 * Routines specific to the LASAT boards
19 */
20#include <linux/types.h>
21#include <linux/crc32.h>
22#include <asm/lasat/lasat.h>
23#include <linux/kernel.h>
24#include <linux/string.h>
25#include <linux/ctype.h>
26#include <asm/bootinfo.h>
27#include <asm/addrspace.h>
28#include "at93c.h"
29/* New model description table */
30#include "lasat_models.h"
31
32#define EEPROM_CRC(data, len) (~0 ^ crc32(~0, data, len))
33
34struct lasat_info lasat_board_info;
35
36void update_bcastaddr(void);
37
38int EEPROMRead(unsigned int pos, unsigned char *data, int len)
39{
40 int i;
41
42 for (i=0; i<len; i++)
43 *data++ = at93c_read(pos++);
44
45 return 0;
46}
47int EEPROMWrite(unsigned int pos, unsigned char *data, int len)
48{
49 int i;
50
51 for (i=0; i<len; i++)
52 at93c_write(pos++, *data++);
53
54 return 0;
55}
56
57static void init_flash_sizes(void)
58{
59 int i;
60 unsigned long *lb = lasat_board_info.li_flashpart_base;
61 unsigned long *ls = lasat_board_info.li_flashpart_size;
62
63 ls[LASAT_MTD_BOOTLOADER] = 0x40000;
64 ls[LASAT_MTD_SERVICE] = 0xC0000;
65 ls[LASAT_MTD_NORMAL] = 0x100000;
66
67 if (mips_machtype == MACH_LASAT_100) {
68 lasat_board_info.li_flash_base = 0x1e000000;
69
70 lb[LASAT_MTD_BOOTLOADER] = 0x1e400000;
71
72 if (lasat_board_info.li_flash_size > 0x200000) {
73 ls[LASAT_MTD_CONFIG] = 0x100000;
74 ls[LASAT_MTD_FS] = 0x500000;
75 }
76 } else {
77 lasat_board_info.li_flash_base = 0x10000000;
78
79 if (lasat_board_info.li_flash_size < 0x1000000) {
80 lb[LASAT_MTD_BOOTLOADER] = 0x10000000;
81 ls[LASAT_MTD_CONFIG] = 0x100000;
82 if (lasat_board_info.li_flash_size >= 0x400000) {
83 ls[LASAT_MTD_FS] = lasat_board_info.li_flash_size - 0x300000;
84 }
85 }
86 }
87
88 for (i = 1; i < LASAT_MTD_LAST; i++)
89 lb[i] = lb[i-1] + ls[i-1];
90}
91
92int lasat_init_board_info(void)
93{
94 int c;
95 unsigned long crc;
96 unsigned long cfg0, cfg1;
97 const product_info_t *ppi;
98 int i_n_base_models = N_BASE_MODELS;
99 const char * const * i_txt_base_models = txt_base_models;
100 int i_n_prids = N_PRIDS;
101
102 memset(&lasat_board_info, 0, sizeof(lasat_board_info));
103
104 /* First read the EEPROM info */
105 EEPROMRead(0, (unsigned char *)&lasat_board_info.li_eeprom_info,
106 sizeof(struct lasat_eeprom_struct));
107
108 /* Check the CRC */
109 crc = EEPROM_CRC((unsigned char *)(&lasat_board_info.li_eeprom_info),
110 sizeof(struct lasat_eeprom_struct) - 4);
111
112 if (crc != lasat_board_info.li_eeprom_info.crc32) {
113 printk(KERN_WARNING "WARNING...\nWARNING...\nEEPROM CRC does "
114 "not match calculated, attempting to soldier on...\n");
115 }
116
117 if (lasat_board_info.li_eeprom_info.version != LASAT_EEPROM_VERSION) {
118 printk(KERN_WARNING "WARNING...\nWARNING...\nEEPROM version "
119 "%d, wanted version %d, attempting to soldier on...\n",
120 (unsigned int)lasat_board_info.li_eeprom_info.version,
121 LASAT_EEPROM_VERSION);
122 }
123
124 cfg0 = lasat_board_info.li_eeprom_info.cfg[0];
125 cfg1 = lasat_board_info.li_eeprom_info.cfg[1];
126
127 if ( LASAT_W0_DSCTYPE(cfg0) != 1) {
128 printk(KERN_WARNING "WARNING...\nWARNING...\n"
129 "Invalid configuration read from EEPROM, attempting to "
130 "soldier on...");
131 }
132 /* We have a valid configuration */
133
134 switch (LASAT_W0_SDRAMBANKSZ(cfg0)) {
135 case 0:
136 lasat_board_info.li_memsize = 0x0800000;
137 break;
138 case 1:
139 lasat_board_info.li_memsize = 0x1000000;
140 break;
141 case 2:
142 lasat_board_info.li_memsize = 0x2000000;
143 break;
144 case 3:
145 lasat_board_info.li_memsize = 0x4000000;
146 break;
147 case 4:
148 lasat_board_info.li_memsize = 0x8000000;
149 break;
150 default:
151 lasat_board_info.li_memsize = 0;
152 }
153
154 switch (LASAT_W0_SDRAMBANKS(cfg0)) {
155 case 0:
156 break;
157 case 1:
158 lasat_board_info.li_memsize *= 2;
159 break;
160 default:
161 break;
162 }
163
164 switch (LASAT_W0_BUSSPEED(cfg0)) {
165 case 0x0:
166 lasat_board_info.li_bus_hz = 60000000;
167 break;
168 case 0x1:
169 lasat_board_info.li_bus_hz = 66000000;
170 break;
171 case 0x2:
172 lasat_board_info.li_bus_hz = 66666667;
173 break;
174 case 0x3:
175 lasat_board_info.li_bus_hz = 80000000;
176 break;
177 case 0x4:
178 lasat_board_info.li_bus_hz = 83333333;
179 break;
180 case 0x5:
181 lasat_board_info.li_bus_hz = 100000000;
182 break;
183 }
184
185 switch (LASAT_W0_CPUCLK(cfg0)) {
186 case 0x0:
187 lasat_board_info.li_cpu_hz =
188 lasat_board_info.li_bus_hz;
189 break;
190 case 0x1:
191 lasat_board_info.li_cpu_hz =
192 lasat_board_info.li_bus_hz +
193 (lasat_board_info.li_bus_hz >> 1);
194 break;
195 case 0x2:
196 lasat_board_info.li_cpu_hz =
197 lasat_board_info.li_bus_hz +
198 lasat_board_info.li_bus_hz;
199 break;
200 case 0x3:
201 lasat_board_info.li_cpu_hz =
202 lasat_board_info.li_bus_hz +
203 lasat_board_info.li_bus_hz +
204 (lasat_board_info.li_bus_hz >> 1);
205 break;
206 case 0x4:
207 lasat_board_info.li_cpu_hz =
208 lasat_board_info.li_bus_hz +
209 lasat_board_info.li_bus_hz +
210 lasat_board_info.li_bus_hz;
211 break;
212 }
213
214 /* Flash size */
215 switch (LASAT_W1_FLASHSIZE(cfg1)) {
216 case 0:
217 lasat_board_info.li_flash_size = 0x200000;
218 break;
219 case 1:
220 lasat_board_info.li_flash_size = 0x400000;
221 break;
222 case 2:
223 lasat_board_info.li_flash_size = 0x800000;
224 break;
225 case 3:
226 lasat_board_info.li_flash_size = 0x1000000;
227 break;
228 case 4:
229 lasat_board_info.li_flash_size = 0x2000000;
230 break;
231 }
232
233 init_flash_sizes();
234
235 lasat_board_info.li_bmid = LASAT_W0_BMID(cfg0);
236 lasat_board_info.li_prid = lasat_board_info.li_eeprom_info.prid;
237 if (lasat_board_info.li_prid == 0xffff || lasat_board_info.li_prid == 0)
238 lasat_board_info.li_prid = lasat_board_info.li_bmid;
239
240 /* Base model stuff */
241 if (lasat_board_info.li_bmid > i_n_base_models)
242 lasat_board_info.li_bmid = i_n_base_models;
243 strcpy(lasat_board_info.li_bmstr, i_txt_base_models[lasat_board_info.li_bmid]);
244
245 /* Product ID dependent values */
246 c = lasat_board_info.li_prid;
247 if (c >= i_n_prids) {
248 strcpy(lasat_board_info.li_namestr, "Unknown Model");
249 strcpy(lasat_board_info.li_typestr, "Unknown Type");
250 } else {
251 ppi = &vendor_info_table[0].vi_product_info[c];
252 strcpy(lasat_board_info.li_namestr, ppi->pi_name);
253 if (ppi->pi_type)
254 strcpy(lasat_board_info.li_typestr, ppi->pi_type);
255 else
256 sprintf(lasat_board_info.li_typestr, "%d",10*c);
257 }
258
259#if defined(CONFIG_INET) && defined(CONFIG_SYSCTL)
260 update_bcastaddr();
261#endif
262
263 return 0;
264}
265
266void lasat_write_eeprom_info(void)
267{
268 unsigned long crc;
269
270 /* Generate the CRC */
271 crc = EEPROM_CRC((unsigned char *)(&lasat_board_info.li_eeprom_info),
272 sizeof(struct lasat_eeprom_struct) - 4);
273 lasat_board_info.li_eeprom_info.crc32 = crc;
274
275 /* Write the EEPROM info */
276 EEPROMWrite(0, (unsigned char *)&lasat_board_info.li_eeprom_info,
277 sizeof(struct lasat_eeprom_struct));
278}
279
diff --git a/arch/mips/lasat/lasat_models.h b/arch/mips/lasat/lasat_models.h
deleted file mode 100644
index ae0c5d0bd4..0000000000
--- a/arch/mips/lasat/lasat_models.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * Model description tables
3 */
4
5typedef struct product_info_t {
6 const char *pi_name;
7 const char *pi_type;
8} product_info_t;
9
10typedef struct vendor_info_t {
11 const char *vi_name;
12 const product_info_t *vi_product_info;
13} vendor_info_t;
14
15/*
16 * Base models
17 */
18static const char * const txt_base_models[] = {
19 "MQ 2", "MQ Pro", "SP 25", "SP 50", "SP 100", "SP 5000", "SP 7000", "SP 1000", "Unknown"
20};
21#define N_BASE_MODELS (sizeof(txt_base_models)/sizeof(char*)-1)
22
23/*
24 * Eicon Networks
25 */
26static const char txt_en_mq[] = "Masquerade";
27static const char txt_en_sp[] = "Safepipe";
28
29static const product_info_t product_info_eicon[] = {
30 { txt_en_mq, "II" }, /* 0 */
31 { txt_en_mq, "Pro" }, /* 1 */
32 { txt_en_sp, "25" }, /* 2 */
33 { txt_en_sp, "50" }, /* 3 */
34 { txt_en_sp, "100" }, /* 4 */
35 { txt_en_sp, "5000" }, /* 5 */
36 { txt_en_sp, "7000" }, /* 6 */
37 { txt_en_sp, "30" }, /* 7 */
38 { txt_en_sp, "5100" }, /* 8 */
39 { txt_en_sp, "7100" }, /* 9 */
40 { txt_en_sp, "1110" }, /* 10 */
41 { txt_en_sp, "3020" }, /* 11 */
42 { txt_en_sp, "3030" }, /* 12 */
43 { txt_en_sp, "5020" }, /* 13 */
44 { txt_en_sp, "5030" }, /* 14 */
45 { txt_en_sp, "1120" }, /* 15 */
46 { txt_en_sp, "1130" }, /* 16 */
47 { txt_en_sp, "6010" }, /* 17 */
48 { txt_en_sp, "6110" }, /* 18 */
49 { txt_en_sp, "6210" }, /* 19 */
50 { txt_en_sp, "1020" }, /* 20 */
51 { txt_en_sp, "1040" }, /* 21 */
52 { txt_en_sp, "1050" }, /* 22 */
53 { txt_en_sp, "1060" }, /* 23 */
54};
55#define N_PRIDS (sizeof(product_info_eicon)/sizeof(product_info_t))
56
57/*
58 * The vendor table
59 */
60static vendor_info_t const vendor_info_table[] = {
61 { "Eicon Networks", product_info_eicon },
62};
63#define N_VENDORS (sizeof(vendor_info_table)/sizeof(vendor_info_t))
diff --git a/arch/mips/lasat/picvue.c b/arch/mips/lasat/picvue.c
deleted file mode 100644
index 9ae82c3ffb..0000000000
--- a/arch/mips/lasat/picvue.c
+++ /dev/null
@@ -1,240 +0,0 @@
1/*
2 * Picvue PVC160206 display driver
3 *
4 * Brian Murphy <brian@murphy.dk>
5 *
6 */
7#include <linux/kernel.h>
8#include <linux/delay.h>
9#include <asm/bootinfo.h>
10#include <asm/lasat/lasat.h>
11#include <linux/module.h>
12#include <linux/init.h>
13#include <linux/errno.h>
14#include <linux/string.h>
15
16#include "picvue.h"
17
18#define PVC_BUSY 0x80
19#define PVC_NLINES 2
20#define PVC_DISPMEM 80
21#define PVC_LINELEN PVC_DISPMEM / PVC_NLINES
22
23struct pvc_defs *picvue = NULL;
24
25DECLARE_MUTEX(pvc_sem);
26
27static void pvc_reg_write(u32 val)
28{
29 *picvue->reg = val;
30}
31
32static u32 pvc_reg_read(void)
33{
34 u32 tmp = *picvue->reg;
35 return tmp;
36}
37
38static void pvc_write_byte(u32 data, u8 byte)
39{
40 data |= picvue->e;
41 pvc_reg_write(data);
42 data &= ~picvue->data_mask;
43 data |= byte << picvue->data_shift;
44 pvc_reg_write(data);
45 ndelay(220);
46 pvc_reg_write(data & ~picvue->e);
47 ndelay(220);
48}
49
50static u8 pvc_read_byte(u32 data)
51{
52 u8 byte;
53
54 data |= picvue->e;
55 pvc_reg_write(data);
56 ndelay(220);
57 byte = (pvc_reg_read() & picvue->data_mask) >> picvue->data_shift;
58 data &= ~picvue->e;
59 pvc_reg_write(data);
60 ndelay(220);
61 return byte;
62}
63
64static u8 pvc_read_data(void)
65{
66 u32 data = pvc_reg_read();
67 u8 byte;
68 data |= picvue->rw;
69 data &= ~picvue->rs;
70 pvc_reg_write(data);
71 ndelay(40);
72 byte = pvc_read_byte(data);
73 data |= picvue->rs;
74 pvc_reg_write(data);
75 return byte;
76}
77
78#define TIMEOUT 1000
79static int pvc_wait(void)
80{
81 int i = TIMEOUT;
82 int err = 0;
83
84 while ((pvc_read_data() & PVC_BUSY) && i)
85 i--;
86 if (i == 0)
87 err = -ETIME;
88
89 return err;
90}
91
92#define MODE_INST 0
93#define MODE_DATA 1
94static void pvc_write(u8 byte, int mode)
95{
96 u32 data = pvc_reg_read();
97 data &= ~picvue->rw;
98 if (mode == MODE_DATA)
99 data |= picvue->rs;
100 else
101 data &= ~picvue->rs;
102 pvc_reg_write(data);
103 ndelay(40);
104 pvc_write_byte(data, byte);
105 if (mode == MODE_DATA)
106 data &= ~picvue->rs;
107 else
108 data |= picvue->rs;
109 pvc_reg_write(data);
110 pvc_wait();
111}
112
113void pvc_write_string(const unsigned char *str, u8 addr, int line)
114{
115 int i = 0;
116
117 if (line > 0 && (PVC_NLINES > 1))
118 addr += 0x40 * line;
119 pvc_write(0x80 | addr, MODE_INST);
120
121 while (*str != 0 && i < PVC_LINELEN) {
122 pvc_write(*str++, MODE_DATA);
123 i++;
124 }
125}
126
127void pvc_write_string_centered(const unsigned char *str, int line)
128{
129 int len = strlen(str);
130 u8 addr;
131
132 if (len > PVC_VISIBLE_CHARS)
133 addr = 0;
134 else
135 addr = (PVC_VISIBLE_CHARS - strlen(str))/2;
136
137 pvc_write_string(str, addr, line);
138}
139
140void pvc_dump_string(const unsigned char *str)
141{
142 int len = strlen(str);
143
144 pvc_write_string(str, 0, 0);
145 if (len > PVC_VISIBLE_CHARS)
146 pvc_write_string(&str[PVC_VISIBLE_CHARS], 0, 1);
147}
148
149#define BM_SIZE 8
150#define MAX_PROGRAMMABLE_CHARS 8
151int pvc_program_cg(int charnum, u8 bitmap[BM_SIZE])
152{
153 int i;
154 int addr;
155
156 if (charnum > MAX_PROGRAMMABLE_CHARS)
157 return -ENOENT;
158
159 addr = charnum * 8;
160 pvc_write(0x40 | addr, MODE_INST);
161
162 for (i=0; i<BM_SIZE; i++)
163 pvc_write(bitmap[i], MODE_DATA);
164 return 0;
165}
166
167#define FUNC_SET_CMD 0x20
168#define EIGHT_BYTE (1 << 4)
169#define FOUR_BYTE 0
170#define TWO_LINES (1 << 3)
171#define ONE_LINE 0
172#define LARGE_FONT (1 << 2)
173#define SMALL_FONT 0
174static void pvc_funcset(u8 cmd)
175{
176 pvc_write(FUNC_SET_CMD | (cmd & (EIGHT_BYTE|TWO_LINES|LARGE_FONT)), MODE_INST);
177}
178
179#define ENTRYMODE_CMD 0x4
180#define AUTO_INC (1 << 1)
181#define AUTO_DEC 0
182#define CURSOR_FOLLOWS_DISP (1 << 0)
183static void pvc_entrymode(u8 cmd)
184{
185 pvc_write(ENTRYMODE_CMD | (cmd & (AUTO_INC|CURSOR_FOLLOWS_DISP)), MODE_INST);
186}
187
188#define DISP_CNT_CMD 0x08
189#define DISP_OFF 0
190#define DISP_ON (1 << 2)
191#define CUR_ON (1 << 1)
192#define CUR_BLINK (1 << 0)
193void pvc_dispcnt(u8 cmd)
194{
195 pvc_write(DISP_CNT_CMD | (cmd & (DISP_ON|CUR_ON|CUR_BLINK)), MODE_INST);
196}
197
198#define MOVE_CMD 0x10
199#define DISPLAY (1 << 3)
200#define CURSOR 0
201#define RIGHT (1 << 2)
202#define LEFT 0
203void pvc_move(u8 cmd)
204{
205 pvc_write(MOVE_CMD | (cmd & (DISPLAY|RIGHT)), MODE_INST);
206}
207
208#define CLEAR_CMD 0x1
209void pvc_clear(void)
210{
211 pvc_write(CLEAR_CMD, MODE_INST);
212}
213
214#define HOME_CMD 0x2
215void pvc_home(void)
216{
217 pvc_write(HOME_CMD, MODE_INST);
218}
219
220int pvc_init(void)
221{
222 u8 cmd = EIGHT_BYTE;
223
224 if (PVC_NLINES == 2)
225 cmd |= (SMALL_FONT|TWO_LINES);
226 else
227 cmd |= (LARGE_FONT|ONE_LINE);
228 pvc_funcset(cmd);
229 pvc_dispcnt(DISP_ON);
230 pvc_entrymode(AUTO_INC);
231
232 pvc_clear();
233 pvc_write_string_centered("Display", 0);
234 pvc_write_string_centered("Initialized", 1);
235
236 return 0;
237}
238
239module_init(pvc_init);
240MODULE_LICENSE("GPL");
diff --git a/arch/mips/lasat/picvue.h b/arch/mips/lasat/picvue.h
deleted file mode 100644
index 2a96bf9718..0000000000
--- a/arch/mips/lasat/picvue.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * Picvue PVC160206 display driver
3 *
4 * Brian Murphy <brian.murphy@eicon.com>
5 *
6 */
7#include <asm/semaphore.h>
8
9struct pvc_defs {
10 volatile u32 *reg;
11 u32 data_shift;
12 u32 data_mask;
13 u32 e;
14 u32 rw;
15 u32 rs;
16};
17
18extern struct pvc_defs *picvue;
19
20#define PVC_NLINES 2
21#define PVC_DISPMEM 80
22#define PVC_LINELEN PVC_DISPMEM / PVC_NLINES
23#define PVC_VISIBLE_CHARS 16
24
25void pvc_write_string(const unsigned char *str, u8 addr, int line);
26void pvc_write_string_centered(const unsigned char *str, int line);
27void pvc_dump_string(const unsigned char *str);
28
29#define BM_SIZE 8
30#define MAX_PROGRAMMABLE_CHARS 8
31int pvc_program_cg(int charnum, u8 bitmap[BM_SIZE]);
32
33void pvc_dispcnt(u8 cmd);
34#define DISP_OFF 0
35#define DISP_ON (1 << 2)
36#define CUR_ON (1 << 1)
37#define CUR_BLINK (1 << 0)
38
39void pvc_move(u8 cmd);
40#define DISPLAY (1 << 3)
41#define CURSOR 0
42#define RIGHT (1 << 2)
43#define LEFT 0
44
45void pvc_clear(void);
46void pvc_home(void);
47
48extern struct semaphore pvc_sem;
diff --git a/arch/mips/lasat/picvue_proc.c b/arch/mips/lasat/picvue_proc.c
deleted file mode 100644
index cce7cddcdb..0000000000
--- a/arch/mips/lasat/picvue_proc.c
+++ /dev/null
@@ -1,186 +0,0 @@
1/*
2 * Picvue PVC160206 display driver
3 *
4 * Brian Murphy <brian.murphy@eicon.com>
5 *
6 */
7#include <linux/kernel.h>
8#include <linux/module.h>
9#include <linux/init.h>
10#include <linux/errno.h>
11
12#include <linux/proc_fs.h>
13#include <linux/interrupt.h>
14
15#include <linux/timer.h>
16
17#include "picvue.h"
18
19static char pvc_lines[PVC_NLINES][PVC_LINELEN+1];
20static int pvc_linedata[PVC_NLINES];
21static struct proc_dir_entry *pvc_display_dir;
22static char *pvc_linename[PVC_NLINES] = {"line1", "line2"};
23#define DISPLAY_DIR_NAME "display"
24static int scroll_dir = 0, scroll_interval = 0;
25
26static struct timer_list timer;
27
28static void pvc_display(unsigned long data) {
29 int i;
30
31 pvc_clear();
32 for (i=0; i<PVC_NLINES; i++)
33 pvc_write_string(pvc_lines[i], 0, i);
34}
35
36static DECLARE_TASKLET(pvc_display_tasklet, &pvc_display, 0);
37
38static int pvc_proc_read_line(char *page, char **start,
39 off_t off, int count,
40 int *eof, void *data)
41{
42 char *origpage = page;
43 int lineno = *(int *)data;
44
45 if (lineno < 0 || lineno > PVC_NLINES) {
46 printk("proc_read_line: invalid lineno %d\n", lineno);
47 return 0;
48 }
49
50 down(&pvc_sem);
51 page += sprintf(page, "%s\n", pvc_lines[lineno]);
52 up(&pvc_sem);
53
54 return page - origpage;
55}
56
57static int pvc_proc_write_line(struct file *file, const char *buffer,
58 unsigned long count, void *data)
59{
60 int origcount = count;
61 int lineno = *(int *)data;
62
63 if (lineno < 0 || lineno > PVC_NLINES) {
64 printk("proc_write_line: invalid lineno %d\n", lineno);
65 return origcount;
66 }
67
68 if (count > PVC_LINELEN)
69 count = PVC_LINELEN;
70
71 if (buffer[count-1] == '\n')
72 count--;
73
74 down(&pvc_sem);
75 strncpy(pvc_lines[lineno], buffer, count);
76 pvc_lines[lineno][count] = '\0';
77 up(&pvc_sem);
78
79 tasklet_schedule(&pvc_display_tasklet);
80
81 return origcount;
82}
83
84static int pvc_proc_write_scroll(struct file *file, const char *buffer,
85 unsigned long count, void *data)
86{
87 int origcount = count;
88 int cmd = simple_strtol(buffer, NULL, 10);
89
90 down(&pvc_sem);
91 if (scroll_interval != 0)
92 del_timer(&timer);
93
94 if (cmd == 0) {
95 scroll_dir = 0;
96 scroll_interval = 0;
97 } else {
98 if (cmd < 0) {
99 scroll_dir = -1;
100 scroll_interval = -cmd;
101 } else {
102 scroll_dir = 1;
103 scroll_interval = cmd;
104 }
105 add_timer(&timer);
106 }
107 up(&pvc_sem);
108
109 return origcount;
110}
111
112static int pvc_proc_read_scroll(char *page, char **start,
113 off_t off, int count,
114 int *eof, void *data)
115{
116 char *origpage = page;
117
118 down(&pvc_sem);
119 page += sprintf(page, "%d\n", scroll_dir * scroll_interval);
120 up(&pvc_sem);
121
122 return page - origpage;
123}
124
125
126void pvc_proc_timerfunc(unsigned long data)
127{
128 if (scroll_dir < 0)
129 pvc_move(DISPLAY|RIGHT);
130 else if (scroll_dir > 0)
131 pvc_move(DISPLAY|LEFT);
132
133 timer.expires = jiffies + scroll_interval;
134 add_timer(&timer);
135}
136
137static void pvc_proc_cleanup(void)
138{
139 int i;
140 for (i=0; i<PVC_NLINES; i++)
141 remove_proc_entry(pvc_linename[i], pvc_display_dir);
142 remove_proc_entry("scroll", pvc_display_dir);
143 remove_proc_entry(DISPLAY_DIR_NAME, NULL);
144
145 del_timer(&timer);
146}
147
148static int __init pvc_proc_init(void)
149{
150 struct proc_dir_entry *proc_entry;
151 int i;
152
153 pvc_display_dir = proc_mkdir(DISPLAY_DIR_NAME, NULL);
154 if (pvc_display_dir == NULL)
155 goto error;
156
157 for (i=0; i<PVC_NLINES; i++) {
158 strcpy(pvc_lines[i], "");
159 pvc_linedata[i] = i;
160 }
161 for (i=0; i<PVC_NLINES; i++) {
162 proc_entry = create_proc_entry(pvc_linename[i], 0644, pvc_display_dir);
163 if (proc_entry == NULL)
164 goto error;
165 proc_entry->read_proc = pvc_proc_read_line;
166 proc_entry->write_proc = pvc_proc_write_line;
167 proc_entry->data = &pvc_linedata[i];
168 }
169 proc_entry = create_proc_entry("scroll", 0644, pvc_display_dir);
170 if (proc_entry == NULL)
171 goto error;
172 proc_entry->write_proc = pvc_proc_write_scroll;
173 proc_entry->read_proc = pvc_proc_read_scroll;
174
175 init_timer(&timer);
176 timer.function = pvc_proc_timerfunc;
177
178 return 0;
179error:
180 pvc_proc_cleanup();
181 return -ENOMEM;
182}
183
184module_init(pvc_proc_init);
185module_exit(pvc_proc_cleanup);
186MODULE_LICENSE("GPL");
diff --git a/arch/mips/lasat/prom.c b/arch/mips/lasat/prom.c
deleted file mode 100644
index 812c6ac366..0000000000
--- a/arch/mips/lasat/prom.c
+++ /dev/null
@@ -1,117 +0,0 @@
1/*
2 * PROM interface routines.
3 */
4#include <linux/types.h>
5#include <linux/init.h>
6#include <linux/string.h>
7#include <linux/ctype.h>
8#include <linux/kernel.h>
9#include <linux/mm.h>
10#include <linux/bootmem.h>
11#include <linux/ioport.h>
12#include <asm/bootinfo.h>
13#include <asm/lasat/lasat.h>
14#include <asm/cpu.h>
15
16#include "at93c.h"
17#include <asm/lasat/eeprom.h>
18#include "prom.h"
19
20#define RESET_VECTOR 0xbfc00000
21#define PROM_JUMP_TABLE_ENTRY(n) (*((u32 *)(RESET_VECTOR + 0x20) + n))
22#define PROM_DISPLAY_ADDR PROM_JUMP_TABLE_ENTRY(0)
23#define PROM_PUTC_ADDR PROM_JUMP_TABLE_ENTRY(1)
24#define PROM_MONITOR_ADDR PROM_JUMP_TABLE_ENTRY(2)
25
26static void null_prom_display(const char *string, int pos, int clear)
27{
28}
29
30static void null_prom_monitor(void)
31{
32}
33
34static void null_prom_putc(char c)
35{
36}
37
38/* these are functions provided by the bootloader */
39static void (* __prom_putc)(char c) = null_prom_putc;
40
41void prom_putchar(char c)
42{
43 __prom_putc(c);
44}
45
46void (* prom_display)(const char *string, int pos, int clear) =
47 null_prom_display;
48void (* prom_monitor)(void) = null_prom_monitor;
49
50unsigned int lasat_ndelay_divider;
51
52static void setup_prom_vectors(void)
53{
54 u32 version = *(u32 *)(RESET_VECTOR + 0x90);
55
56 if (version >= 307) {
57 prom_display = (void *)PROM_DISPLAY_ADDR;
58 __prom_putc = (void *)PROM_PUTC_ADDR;
59 prom_monitor = (void *)PROM_MONITOR_ADDR;
60 }
61 printk("prom vectors set up\n");
62}
63
64static struct at93c_defs at93c_defs[N_MACHTYPES] = {
65 {(void *)AT93C_REG_100, (void *)AT93C_RDATA_REG_100, AT93C_RDATA_SHIFT_100,
66 AT93C_WDATA_SHIFT_100, AT93C_CS_M_100, AT93C_CLK_M_100},
67 {(void *)AT93C_REG_200, (void *)AT93C_RDATA_REG_200, AT93C_RDATA_SHIFT_200,
68 AT93C_WDATA_SHIFT_200, AT93C_CS_M_200, AT93C_CLK_M_200},
69};
70
71void __init prom_init(void)
72{
73 int argc = fw_arg0;
74 char **argv = (char **) fw_arg1;
75
76 setup_prom_vectors();
77
78 if (current_cpu_data.cputype == CPU_R5000) {
79 printk("LASAT 200 board\n");
80 mips_machtype = MACH_LASAT_200;
81 lasat_ndelay_divider = LASAT_200_DIVIDER;
82 } else {
83 printk("LASAT 100 board\n");
84 mips_machtype = MACH_LASAT_100;
85 lasat_ndelay_divider = LASAT_100_DIVIDER;
86 }
87
88 at93c = &at93c_defs[mips_machtype];
89
90 lasat_init_board_info(); /* Read info from EEPROM */
91
92 mips_machgroup = MACH_GROUP_LASAT;
93
94 /* Get the command line */
95 if (argc > 0) {
96 strncpy(arcs_cmdline, argv[0], CL_SIZE-1);
97 arcs_cmdline[CL_SIZE-1] = '\0';
98 }
99
100 /* Set the I/O base address */
101 set_io_port_base(KSEG1);
102
103 /* Set memory regions */
104 ioport_resource.start = 0;
105 ioport_resource.end = 0xffffffff; /* Wrong, fixme. */
106
107 add_memory_region(0, lasat_board_info.li_memsize, BOOT_MEM_RAM);
108}
109
110void __init prom_free_prom_memory(void)
111{
112}
113
114const char *get_system_type(void)
115{
116 return lasat_board_info.li_bmstr;
117}
diff --git a/arch/mips/lasat/prom.h b/arch/mips/lasat/prom.h
deleted file mode 100644
index 019d45fbd2..0000000000
--- a/arch/mips/lasat/prom.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifndef PROM_H
2#define PROM_H
3extern void (* prom_display)(const char *string, int pos, int clear);
4extern void (* prom_monitor)(void);
5#endif
diff --git a/arch/mips/lasat/reset.c b/arch/mips/lasat/reset.c
deleted file mode 100644
index 9e22acf030..0000000000
--- a/arch/mips/lasat/reset.c
+++ /dev/null
@@ -1,69 +0,0 @@
1/*
2 * Thomas Horsten <thh@lasat.com>
3 * Copyright (C) 2000 LASAT Networks A/S.
4 *
5 * This program is free software; you can distribute it and/or modify it
6 * under the terms of the GNU General Public License (Version 2) as
7 * 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
12 * for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
17 *
18 * Reset the LASAT board.
19 */
20#include <linux/kernel.h>
21#include <linux/pm.h>
22
23#include <asm/reboot.h>
24#include <asm/system.h>
25#include <asm/lasat/lasat.h>
26
27#include "picvue.h"
28#include "prom.h"
29
30static void lasat_machine_restart(char *command);
31static void lasat_machine_halt(void);
32
33/* Used to set machine to boot in service mode via /proc interface */
34int lasat_boot_to_service = 0;
35
36static void lasat_machine_restart(char *command)
37{
38 local_irq_disable();
39
40 if (lasat_boot_to_service) {
41 printk("machine_restart: Rebooting to service mode\n");
42 *(volatile unsigned int *)0xa0000024 = 0xdeadbeef;
43 *(volatile unsigned int *)0xa00000fc = 0xfedeabba;
44 }
45 *lasat_misc->reset_reg = 0xbedead;
46 for (;;) ;
47}
48
49#define MESSAGE "System halted"
50static void lasat_machine_halt(void)
51{
52 local_irq_disable();
53
54 /* Disable interrupts and loop forever */
55 printk(KERN_NOTICE MESSAGE "\n");
56#ifdef CONFIG_PICVUE
57 pvc_clear();
58 pvc_write_string(MESSAGE, 0, 0);
59#endif
60 prom_monitor();
61 for (;;) ;
62}
63
64void lasat_reboot_setup(void)
65{
66 _machine_restart = lasat_machine_restart;
67 _machine_halt = lasat_machine_halt;
68 pm_power_off = lasat_machine_halt;
69}
diff --git a/arch/mips/lasat/setup.c b/arch/mips/lasat/setup.c
deleted file mode 100644
index 488007f139..0000000000
--- a/arch/mips/lasat/setup.c
+++ /dev/null
@@ -1,182 +0,0 @@
1/*
2 * Carsten Langgaard, carstenl@mips.com
3 * Copyright (C) 1999 MIPS Technologies, Inc. All rights reserved.
4 *
5 * Thomas Horsten <thh@lasat.com>
6 * Copyright (C) 2000 LASAT Networks A/S.
7 *
8 * Brian Murphy <brian@murphy.dk>
9 *
10 * This program is free software; you can distribute it and/or modify it
11 * under the terms of the GNU General Public License (Version 2) as
12 * published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 * for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
22 *
23 * Lasat specific setup.
24 */
25#include <linux/init.h>
26#include <linux/sched.h>
27#include <linux/pci.h>
28#include <linux/interrupt.h>
29#include <linux/tty.h>
30#include <linux/serial.h>
31#include <linux/serial_core.h>
32
33#include <asm/time.h>
34#include <asm/cpu.h>
35#include <asm/bootinfo.h>
36#include <asm/irq.h>
37#include <asm/lasat/lasat.h>
38#include <asm/lasat/serial.h>
39
40#ifdef CONFIG_PICVUE
41#include <linux/notifier.h>
42#endif
43
44#include "ds1603.h"
45#include <asm/lasat/ds1603.h>
46#include <asm/lasat/picvue.h>
47#include <asm/lasat/eeprom.h>
48
49#include "prom.h"
50
51int lasat_command_line = 0;
52void lasatint_init(void);
53
54extern void lasat_reboot_setup(void);
55extern void pcisetup(void);
56extern void edhac_init(void *, void *, void *);
57extern void addrflt_init(void);
58
59struct lasat_misc lasat_misc_info[N_MACHTYPES] = {
60 {(void *)KSEG1ADDR(0x1c840000), (void *)KSEG1ADDR(0x1c800000), 2},
61 {(void *)KSEG1ADDR(0x11080000), (void *)KSEG1ADDR(0x11000000), 6}
62};
63
64struct lasat_misc *lasat_misc = NULL;
65
66#ifdef CONFIG_DS1603
67static struct ds_defs ds_defs[N_MACHTYPES] = {
68 { (void *)DS1603_REG_100, (void *)DS1603_REG_100,
69 DS1603_RST_100, DS1603_CLK_100, DS1603_DATA_100,
70 DS1603_DATA_SHIFT_100, 0, 0 },
71 { (void *)DS1603_REG_200, (void *)DS1603_DATA_REG_200,
72 DS1603_RST_200, DS1603_CLK_200, DS1603_DATA_200,
73 DS1603_DATA_READ_SHIFT_200, 1, 2000 }
74};
75#endif
76
77#ifdef CONFIG_PICVUE
78#include "picvue.h"
79static struct pvc_defs pvc_defs[N_MACHTYPES] = {
80 { (void *)PVC_REG_100, PVC_DATA_SHIFT_100, PVC_DATA_M_100,
81 PVC_E_100, PVC_RW_100, PVC_RS_100 },
82 { (void *)PVC_REG_200, PVC_DATA_SHIFT_200, PVC_DATA_M_200,
83 PVC_E_200, PVC_RW_200, PVC_RS_200 }
84};
85#endif
86
87static int lasat_panic_display(struct notifier_block *this,
88 unsigned long event, void *ptr)
89{
90#ifdef CONFIG_PICVUE
91 unsigned char *string = ptr;
92 if (string == NULL)
93 string = "Kernel Panic";
94 pvc_dump_string(string);
95#endif
96 return NOTIFY_DONE;
97}
98
99static int lasat_panic_prom_monitor(struct notifier_block *this,
100 unsigned long event, void *ptr)
101{
102 prom_monitor();
103 return NOTIFY_DONE;
104}
105
106static struct notifier_block lasat_panic_block[] =
107{
108 { lasat_panic_display, NULL, INT_MAX },
109 { lasat_panic_prom_monitor, NULL, INT_MIN }
110};
111
112static void lasat_time_init(void)
113{
114 mips_hpt_frequency = lasat_board_info.li_cpu_hz / 2;
115}
116
117void __init plat_timer_setup(struct irqaction *irq)
118{
119 change_c0_status(ST0_IM, IE_IRQ0 | IE_IRQ5);
120}
121
122#define DYNAMIC_SERIAL_INIT
123#ifdef DYNAMIC_SERIAL_INIT
124void __init serial_init(void)
125{
126#ifdef CONFIG_SERIAL_8250
127 struct uart_port s;
128
129 memset(&s, 0, sizeof(s));
130
131 s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
132 s.iotype = UPIO_MEM;
133
134 if (mips_machtype == MACH_LASAT_100) {
135 s.uartclk = LASAT_BASE_BAUD_100 * 16;
136 s.irq = LASATINT_UART_100;
137 s.regshift = LASAT_UART_REGS_SHIFT_100;
138 s.membase = (char *)KSEG1ADDR(LASAT_UART_REGS_BASE_100);
139 } else {
140 s.uartclk = LASAT_BASE_BAUD_200 * 16;
141 s.irq = LASATINT_UART_200;
142 s.regshift = LASAT_UART_REGS_SHIFT_200;
143 s.membase = (char *)KSEG1ADDR(LASAT_UART_REGS_BASE_200);
144 }
145
146 if (early_serial_setup(&s) != 0)
147 printk(KERN_ERR "Serial setup failed!\n");
148#endif
149}
150#endif
151
152void __init plat_mem_setup(void)
153{
154 int i;
155 lasat_misc = &lasat_misc_info[mips_machtype];
156#ifdef CONFIG_PICVUE
157 picvue = &pvc_defs[mips_machtype];
158#endif
159
160 /* Set up panic notifier */
161 for (i = 0; i < sizeof(lasat_panic_block) / sizeof(struct notifier_block); i++)
162 atomic_notifier_chain_register(&panic_notifier_list,
163 &lasat_panic_block[i]);
164
165 lasat_reboot_setup();
166
167 board_time_init = lasat_time_init;
168
169#ifdef CONFIG_DS1603
170 ds1603 = &ds_defs[mips_machtype];
171 rtc_mips_get_time = ds1603_read;
172 rtc_mips_set_time = ds1603_set;
173#endif
174
175#ifdef DYNAMIC_SERIAL_INIT
176 serial_init();
177#endif
178 /* Switch from prom exception handler to normal mode */
179 change_c0_status(ST0_BEV,0);
180
181 pr_info("Lasat specific initialization complete\n");
182}
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c
deleted file mode 100644
index 699ab1886c..0000000000
--- a/arch/mips/lasat/sysctl.c
+++ /dev/null
@@ -1,441 +0,0 @@
1/*
2 * Thomas Horsten <thh@lasat.com>
3 * Copyright (C) 2000 LASAT Networks A/S.
4 *
5 * This program is free software; you can distribute it and/or modify it
6 * under the terms of the GNU General Public License (Version 2) as
7 * 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
12 * for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
17 *
18 * Routines specific to the LASAT boards
19 */
20#include <linux/types.h>
21#include <asm/lasat/lasat.h>
22
23#include <linux/module.h>
24#include <linux/sysctl.h>
25#include <linux/stddef.h>
26#include <linux/init.h>
27#include <linux/fs.h>
28#include <linux/ctype.h>
29#include <linux/string.h>
30#include <linux/net.h>
31#include <linux/inet.h>
32#include <linux/mutex.h>
33#include <asm/uaccess.h>
34
35#include "sysctl.h"
36#include "ds1603.h"
37
38static DEFINE_MUTEX(lasat_info_mutex);
39
40/* Strategy function to write EEPROM after changing string entry */
41int sysctl_lasatstring(ctl_table *table, int *name, int nlen,
42 void *oldval, size_t *oldlenp,
43 void *newval, size_t newlen)
44{
45 int r;
46 mutex_lock(&lasat_info_mutex);
47 r = sysctl_string(table, name,
48 nlen, oldval, oldlenp, newval, newlen);
49 if (r < 0) {
50 mutex_unlock(&lasat_info_mutex);
51 return r;
52 }
53 if (newval && newlen) {
54 lasat_write_eeprom_info();
55 }
56 mutex_unlock(&lasat_info_mutex);
57 return 1;
58}
59
60
61/* And the same for proc */
62int proc_dolasatstring(ctl_table *table, int write, struct file *filp,
63 void *buffer, size_t *lenp, loff_t *ppos)
64{
65 int r;
66 mutex_lock(&lasat_info_mutex);
67 r = proc_dostring(table, write, filp, buffer, lenp, ppos);
68 if ( (!write) || r) {
69 mutex_unlock(&lasat_info_mutex);
70 return r;
71 }
72 lasat_write_eeprom_info();
73 mutex_unlock(&lasat_info_mutex);
74 return 0;
75}
76
77/* proc function to write EEPROM after changing int entry */
78int proc_dolasatint(ctl_table *table, int write, struct file *filp,
79 void *buffer, size_t *lenp, loff_t *ppos)
80{
81 int r;
82 mutex_lock(&lasat_info_mutex);
83 r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
84 if ( (!write) || r) {
85 mutex_unlock(&lasat_info_mutex);
86 return r;
87 }
88 lasat_write_eeprom_info();
89 mutex_unlock(&lasat_info_mutex);
90 return 0;
91}
92
93static int rtctmp;
94
95#ifdef CONFIG_DS1603
96/* proc function to read/write RealTime Clock */
97int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,
98 void *buffer, size_t *lenp, loff_t *ppos)
99{
100 int r;
101 mutex_lock(&lasat_info_mutex);
102 if (!write) {
103 rtctmp = ds1603_read();
104 /* check for time < 0 and set to 0 */
105 if (rtctmp < 0)
106 rtctmp = 0;
107 }
108 r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
109 if ( (!write) || r) {
110 mutex_unlock(&lasat_info_mutex);
111 return r;
112 }
113 ds1603_set(rtctmp);
114 mutex_unlock(&lasat_info_mutex);
115 return 0;
116}
117#endif
118
119/* Sysctl for setting the IP addresses */
120int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen,
121 void *oldval, size_t *oldlenp,
122 void *newval, size_t newlen)
123{
124 int r;
125 mutex_lock(&lasat_info_mutex);
126 r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen);
127 if (r < 0) {
128 mutex_unlock(&lasat_info_mutex);
129 return r;
130 }
131 if (newval && newlen) {
132 lasat_write_eeprom_info();
133 }
134 mutex_unlock(&lasat_info_mutex);
135 return 1;
136}
137
138#ifdef CONFIG_DS1603
139/* Same for RTC */
140int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen,
141 void *oldval, size_t *oldlenp,
142 void *newval, size_t newlen)
143{
144 int r;
145 mutex_lock(&lasat_info_mutex);
146 rtctmp = ds1603_read();
147 if (rtctmp < 0)
148 rtctmp = 0;
149 r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen);
150 if (r < 0) {
151 mutex_unlock(&lasat_info_mutex);
152 return r;
153 }
154 if (newval && newlen) {
155 ds1603_set(rtctmp);
156 }
157 mutex_unlock(&lasat_info_mutex);
158 return 1;
159}
160#endif
161
162#ifdef CONFIG_INET
163static char lasat_bcastaddr[16];
164
165void update_bcastaddr(void)
166{
167 unsigned int ip;
168
169 ip = (lasat_board_info.li_eeprom_info.ipaddr &
170 lasat_board_info.li_eeprom_info.netmask) |
171 ~lasat_board_info.li_eeprom_info.netmask;
172
173 sprintf(lasat_bcastaddr, "%d.%d.%d.%d",
174 (ip ) & 0xff,
175 (ip >> 8) & 0xff,
176 (ip >> 16) & 0xff,
177 (ip >> 24) & 0xff);
178}
179
180static char proc_lasat_ipbuf[32];
181/* Parsing of IP address */
182int proc_lasat_ip(ctl_table *table, int write, struct file *filp,
183 void *buffer, size_t *lenp, loff_t *ppos)
184{
185 int len;
186 unsigned int ip;
187 char *p, c;
188
189 if (!table->data || !table->maxlen || !*lenp ||
190 (*ppos && !write)) {
191 *lenp = 0;
192 return 0;
193 }
194
195 mutex_lock(&lasat_info_mutex);
196 if (write) {
197 len = 0;
198 p = buffer;
199 while (len < *lenp) {
200 if(get_user(c, p++)) {
201 mutex_unlock(&lasat_info_mutex);
202 return -EFAULT;
203 }
204 if (c == 0 || c == '\n')
205 break;
206 len++;
207 }
208 if (len >= sizeof(proc_lasat_ipbuf)-1)
209 len = sizeof(proc_lasat_ipbuf) - 1;
210 if (copy_from_user(proc_lasat_ipbuf, buffer, len))
211 {
212 mutex_unlock(&lasat_info_mutex);
213 return -EFAULT;
214 }
215 proc_lasat_ipbuf[len] = 0;
216 *ppos += *lenp;
217 /* Now see if we can convert it to a valid IP */
218 ip = in_aton(proc_lasat_ipbuf);
219 *(unsigned int *)(table->data) = ip;
220 lasat_write_eeprom_info();
221 } else {
222 ip = *(unsigned int *)(table->data);
223 sprintf(proc_lasat_ipbuf, "%d.%d.%d.%d",
224 (ip ) & 0xff,
225 (ip >> 8) & 0xff,
226 (ip >> 16) & 0xff,
227 (ip >> 24) & 0xff);
228 len = strlen(proc_lasat_ipbuf);
229 if (len > *lenp)
230 len = *lenp;
231 if (len)
232 if(copy_to_user(buffer, proc_lasat_ipbuf, len)) {
233 mutex_unlock(&lasat_info_mutex);
234 return -EFAULT;
235 }
236 if (len < *lenp) {
237 if(put_user('\n', ((char *) buffer) + len)) {
238 mutex_unlock(&lasat_info_mutex);
239 return -EFAULT;
240 }
241 len++;
242 }
243 *lenp = len;
244 *ppos += len;
245 }
246 update_bcastaddr();
247 mutex_unlock(&lasat_info_mutex);
248 return 0;
249}
250#endif /* defined(CONFIG_INET) */
251
252static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen,
253 void *oldval, size_t *oldlenp,
254 void *newval, size_t newlen)
255{
256 int r;
257
258 mutex_lock(&lasat_info_mutex);
259 r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen);
260 if (r < 0) {
261 mutex_unlock(&lasat_info_mutex);
262 return r;
263 }
264
265 if (newval && newlen)
266 {
267 if (name && *name == LASAT_PRID)
268 lasat_board_info.li_eeprom_info.prid = *(int*)newval;
269
270 lasat_write_eeprom_info();
271 lasat_init_board_info();
272 }
273 mutex_unlock(&lasat_info_mutex);
274
275 return 0;
276}
277
278int proc_lasat_eeprom_value(ctl_table *table, int write, struct file *filp,
279 void *buffer, size_t *lenp, loff_t *ppos)
280{
281 int r;
282 mutex_lock(&lasat_info_mutex);
283 r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
284 if ( (!write) || r) {
285 mutex_unlock(&lasat_info_mutex);
286 return r;
287 }
288 if (filp && filp->f_path.dentry)
289 {
290 if (!strcmp(filp->f_path.dentry->d_name.name, "prid"))
291 lasat_board_info.li_eeprom_info.prid = lasat_board_info.li_prid;
292 if (!strcmp(filp->f_path.dentry->d_name.name, "debugaccess"))
293 lasat_board_info.li_eeprom_info.debugaccess = lasat_board_info.li_debugaccess;
294 }
295 lasat_write_eeprom_info();
296 mutex_unlock(&lasat_info_mutex);
297 return 0;
298}
299
300extern int lasat_boot_to_service;
301
302#ifdef CONFIG_SYSCTL
303
304static ctl_table lasat_table[] = {
305 {
306 .ctl_name = CTL_UNNUMBERED,
307 .procname = "cpu-hz",
308 .data = &lasat_board_info.li_cpu_hz,
309 .maxlen = sizeof(int),
310 .mode = 0444,
311 .proc_handler = &proc_dointvec,
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 },
341#ifdef CONFIG_INET
342 {
343 .ctl_name = CTL_UNNUMBERED,
344 .procname = "ipaddr",
345 .data = &lasat_board_info.li_eeprom_info.ipaddr,
346 .maxlen = sizeof(int),
347 .mode = 0644,
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 },
369#endif
370 {
371 .ctl_name = CTL_UNNUMBERED,
372 .procname = "passwd_hash",
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 },
388#ifdef CONFIG_DS1603
389 {
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 },
398#endif
399 {
400 .ctl_name = CTL_UNNUMBERED,
401 .procname = "namestr",
402 .data = &lasat_board_info.li_namestr,
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 {}
418};
419
420static ctl_table lasat_root_table[] = {
421 {
422 .ctl_name = CTL_UNNUMBERED,
423 .procname = "lasat",
424 .mode = 0555,
425 .child = lasat_table
426 },
427 {}
428};
429
430static int __init lasat_register_sysctl(void)
431{
432 struct ctl_table_header *lasat_table_header;
433
434 lasat_table_header =
435 register_sysctl_table(lasat_root_table);
436
437 return 0;
438}
439
440__initcall(lasat_register_sysctl);
441#endif /* CONFIG_SYSCTL */
diff --git a/arch/mips/lasat/sysctl.h b/arch/mips/lasat/sysctl.h
deleted file mode 100644
index 4d139d2adb..0000000000
--- a/arch/mips/lasat/sysctl.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/*
2 * LASAT sysctl values
3 */
4
5#ifndef _LASAT_SYSCTL_H
6#define _LASAT_SYSCTL_H
7
8/* /proc/sys/lasat */
9enum {
10 LASAT_CPU_HZ=1,
11 LASAT_BUS_HZ,
12 LASAT_MODEL,
13 LASAT_PRID,
14 LASAT_IPADDR,
15 LASAT_NETMASK,
16 LASAT_BCAST,
17 LASAT_PASSWORD,
18 LASAT_SBOOT,
19 LASAT_RTC,
20 LASAT_NAMESTR,
21 LASAT_TYPESTR,
22};
23
24#endif /* _LASAT_SYSCTL_H */
diff --git a/arch/mips/lemote/lm2e/Makefile b/arch/mips/lemote/lm2e/Makefile
new file mode 100644
index 0000000000..fb1b48c48c
--- /dev/null
+++ b/arch/mips/lemote/lm2e/Makefile
@@ -0,0 +1,7 @@
1#
2# Makefile for Lemote Fulong mini-PC board.
3#
4
5obj-y += setup.o prom.o reset.o irq.o pci.o bonito-irq.o dbg_io.o mem.o
6EXTRA_AFLAGS := $(CFLAGS)
7
diff --git a/arch/mips/lemote/lm2e/bonito-irq.c b/arch/mips/lemote/lm2e/bonito-irq.c
new file mode 100644
index 0000000000..8fc3bce707
--- /dev/null
+++ b/arch/mips/lemote/lm2e/bonito-irq.c
@@ -0,0 +1,74 @@
1/*
2 * Copyright 2001 MontaVista Software Inc.
3 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
4 * Copyright (C) 2000, 2001 Ralf Baechle (ralf@gnu.org)
5 *
6 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
7 * Author: Fuxin Zhang, zhangfx@lemote.com
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
20 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA.
28 *
29 */
30#include <linux/errno.h>
31#include <linux/init.h>
32#include <linux/io.h>
33#include <linux/types.h>
34#include <linux/interrupt.h>
35#include <linux/irq.h>
36
37#include <asm/mips-boards/bonito64.h>
38
39
40static inline void bonito_irq_enable(unsigned int irq)
41{
42 BONITO_INTENSET = (1 << (irq - BONITO_IRQ_BASE));
43 mmiowb();
44}
45
46static inline void bonito_irq_disable(unsigned int irq)
47{
48 BONITO_INTENCLR = (1 << (irq - BONITO_IRQ_BASE));
49 mmiowb();
50}
51
52static struct irq_chip bonito_irq_type = {
53 .name = "bonito_irq",
54 .ack = bonito_irq_disable,
55 .mask = bonito_irq_disable,
56 .mask_ack = bonito_irq_disable,
57 .unmask = bonito_irq_enable,
58};
59
60static struct irqaction dma_timeout_irqaction = {
61 .handler = no_action,
62 .name = "dma_timeout",
63};
64
65void bonito_irq_init(void)
66{
67 u32 i;
68
69 for (i = BONITO_IRQ_BASE; i < BONITO_IRQ_BASE + 32; i++) {
70 set_irq_chip_and_handler(i, &bonito_irq_type, handle_level_irq);
71 }
72
73 setup_irq(BONITO_IRQ_BASE + 10, &dma_timeout_irqaction);
74}
diff --git a/arch/mips/lemote/lm2e/dbg_io.c b/arch/mips/lemote/lm2e/dbg_io.c
new file mode 100644
index 0000000000..6c95da3ca7
--- /dev/null
+++ b/arch/mips/lemote/lm2e/dbg_io.c
@@ -0,0 +1,146 @@
1/*
2 * Copyright 2001 MontaVista Software Inc.
3 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
4 * Copyright (C) 2000, 2001 Ralf Baechle (ralf@gnu.org)
5 *
6 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
7 * Author: Fuxin Zhang, zhangfx@lemote.com
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
20 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA.
28 *
29 */
30
31#include <linux/io.h>
32#include <linux/init.h>
33#include <linux/types.h>
34
35#include <asm/serial.h>
36
37#define UART16550_BAUD_2400 2400
38#define UART16550_BAUD_4800 4800
39#define UART16550_BAUD_9600 9600
40#define UART16550_BAUD_19200 19200
41#define UART16550_BAUD_38400 38400
42#define UART16550_BAUD_57600 57600
43#define UART16550_BAUD_115200 115200
44
45#define UART16550_PARITY_NONE 0
46#define UART16550_PARITY_ODD 0x08
47#define UART16550_PARITY_EVEN 0x18
48#define UART16550_PARITY_MARK 0x28
49#define UART16550_PARITY_SPACE 0x38
50
51#define UART16550_DATA_5BIT 0x0
52#define UART16550_DATA_6BIT 0x1
53#define UART16550_DATA_7BIT 0x2
54#define UART16550_DATA_8BIT 0x3
55
56#define UART16550_STOP_1BIT 0x0
57#define UART16550_STOP_2BIT 0x4
58
59/* ----------------------------------------------------- */
60
61/* === CONFIG === */
62#ifdef CONFIG_64BIT
63#define BASE (0xffffffffbfd003f8)
64#else
65#define BASE (0xbfd003f8)
66#endif
67
68#define MAX_BAUD BASE_BAUD
69/* === END OF CONFIG === */
70
71#define REG_OFFSET 1
72
73/* register offset */
74#define OFS_RCV_BUFFER 0
75#define OFS_TRANS_HOLD 0
76#define OFS_SEND_BUFFER 0
77#define OFS_INTR_ENABLE (1*REG_OFFSET)
78#define OFS_INTR_ID (2*REG_OFFSET)
79#define OFS_DATA_FORMAT (3*REG_OFFSET)
80#define OFS_LINE_CONTROL (3*REG_OFFSET)
81#define OFS_MODEM_CONTROL (4*REG_OFFSET)
82#define OFS_RS232_OUTPUT (4*REG_OFFSET)
83#define OFS_LINE_STATUS (5*REG_OFFSET)
84#define OFS_MODEM_STATUS (6*REG_OFFSET)
85#define OFS_RS232_INPUT (6*REG_OFFSET)
86#define OFS_SCRATCH_PAD (7*REG_OFFSET)
87
88#define OFS_DIVISOR_LSB (0*REG_OFFSET)
89#define OFS_DIVISOR_MSB (1*REG_OFFSET)
90
91/* memory-mapped read/write of the port */
92#define UART16550_READ(y) readb((char *)BASE + (y))
93#define UART16550_WRITE(y, z) writeb(z, (char *)BASE + (y))
94
95void debugInit(u32 baud, u8 data, u8 parity, u8 stop)
96{
97 u32 divisor;
98
99 /* disable interrupts */
100 UART16550_WRITE(OFS_INTR_ENABLE, 0);
101
102 /* set up buad rate */
103 /* set DIAB bit */
104 UART16550_WRITE(OFS_LINE_CONTROL, 0x80);
105
106 /* set divisor */
107 divisor = MAX_BAUD / baud;
108 UART16550_WRITE(OFS_DIVISOR_LSB, divisor & 0xff);
109 UART16550_WRITE(OFS_DIVISOR_MSB, (divisor & 0xff00) >> 8);
110
111 /* clear DIAB bit */
112 UART16550_WRITE(OFS_LINE_CONTROL, 0x0);
113
114 /* set data format */
115 UART16550_WRITE(OFS_DATA_FORMAT, data | parity | stop);
116}
117
118static int remoteDebugInitialized;
119
120u8 getDebugChar(void)
121{
122 if (!remoteDebugInitialized) {
123 remoteDebugInitialized = 1;
124 debugInit(UART16550_BAUD_115200,
125 UART16550_DATA_8BIT,
126 UART16550_PARITY_NONE, UART16550_STOP_1BIT);
127 }
128
129 while ((UART16550_READ(OFS_LINE_STATUS) & 0x1) == 0) ;
130 return UART16550_READ(OFS_RCV_BUFFER);
131}
132
133int putDebugChar(u8 byte)
134{
135 if (!remoteDebugInitialized) {
136 remoteDebugInitialized = 1;
137 /*
138 debugInit(UART16550_BAUD_115200,
139 UART16550_DATA_8BIT,
140 UART16550_PARITY_NONE, UART16550_STOP_1BIT); */
141 }
142
143 while ((UART16550_READ(OFS_LINE_STATUS) & 0x20) == 0) ;
144 UART16550_WRITE(OFS_SEND_BUFFER, byte);
145 return 1;
146}
diff --git a/arch/mips/lemote/lm2e/irq.c b/arch/mips/lemote/lm2e/irq.c
new file mode 100644
index 0000000000..05693bceae
--- /dev/null
+++ b/arch/mips/lemote/lm2e/irq.c
@@ -0,0 +1,145 @@
1/*
2 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
3 * Author: Fuxin Zhang, zhangfx@lemote.com
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 *
10 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
11 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
13 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
14 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
16 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
17 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
19 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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 * 675 Mass Ave, Cambridge, MA 02139, USA.
24 *
25 */
26#include <linux/delay.h>
27#include <linux/io.h>
28#include <linux/irq.h>
29#include <linux/init.h>
30#include <linux/interrupt.h>
31#include <linux/irq.h>
32
33#include <asm/irq_cpu.h>
34#include <asm/i8259.h>
35#include <asm/mipsregs.h>
36#include <asm/mips-boards/bonito64.h>
37
38
39/*
40 * the first level int-handler will jump here if it is a bonito irq
41 */
42static void bonito_irqdispatch(void)
43{
44 u32 int_status;
45 int i;
46
47 /* workaround the IO dma problem: let cpu looping to allow DMA finish */
48 int_status = BONITO_INTISR;
49 if (int_status & (1 << 10)) {
50 while (int_status & (1 << 10)) {
51 udelay(1);
52 int_status = BONITO_INTISR;
53 }
54 }
55
56 /* Get pending sources, masked by current enables */
57 int_status = BONITO_INTISR & BONITO_INTEN;
58
59 if (int_status != 0) {
60 i = __ffs(int_status);
61 int_status &= ~(1 << i);
62 do_IRQ(BONITO_IRQ_BASE + i);
63 }
64}
65
66static void i8259_irqdispatch(void)
67{
68 int irq;
69
70 irq = i8259_irq();
71 if (irq >= 0) {
72 do_IRQ(irq);
73 } else {
74 spurious_interrupt();
75 }
76
77}
78
79asmlinkage void plat_irq_dispatch(void)
80{
81 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
82
83 if (pending & CAUSEF_IP7) {
84 do_IRQ(MIPS_CPU_IRQ_BASE + 7);
85 } else if (pending & CAUSEF_IP5) {
86 i8259_irqdispatch();
87 } else if (pending & CAUSEF_IP2) {
88 bonito_irqdispatch();
89 } else {
90 spurious_interrupt();
91 }
92}
93
94static struct irqaction cascade_irqaction = {
95 .handler = no_action,
96 .mask = CPU_MASK_NONE,
97 .name = "cascade",
98};
99
100void __init arch_init_irq(void)
101{
102 extern void bonito_irq_init(void);
103
104 /*
105 * Clear all of the interrupts while we change the able around a bit.
106 * int-handler is not on bootstrap
107 */
108 clear_c0_status(ST0_IM | ST0_BEV);
109 local_irq_disable();
110
111 /* most bonito irq should be level triggered */
112 BONITO_INTEDGE = BONITO_ICU_SYSTEMERR | BONITO_ICU_MASTERERR |
113 BONITO_ICU_RETRYERR | BONITO_ICU_MBOXES;
114 BONITO_INTSTEER = 0;
115
116 /*
117 * Mask out all interrupt by writing "1" to all bit position in
118 * the interrupt reset reg.
119 */
120 BONITO_INTENCLR = ~0;
121
122 /* init all controller
123 * 0-15 ------> i8259 interrupt
124 * 16-23 ------> mips cpu interrupt
125 * 32-63 ------> bonito irq
126 */
127
128 /* Sets the first-level interrupt dispatcher. */
129 mips_cpu_irq_init();
130 init_i8259_irqs();
131 bonito_irq_init();
132
133 /*
134 printk("GPIODATA=%x, GPIOIE=%x\n", BONITO_GPIODATA, BONITO_GPIOIE);
135 printk("INTEN=%x, INTSET=%x, INTCLR=%x, INTISR=%x\n",
136 BONITO_INTEN, BONITO_INTENSET,
137 BONITO_INTENCLR, BONITO_INTISR);
138 */
139
140 /* bonito irq at IP2 */
141 setup_irq(MIPS_CPU_IRQ_BASE + 2, &cascade_irqaction);
142 /* 8259 irq at IP5 */
143 setup_irq(MIPS_CPU_IRQ_BASE + 5, &cascade_irqaction);
144
145}
diff --git a/arch/mips/lemote/lm2e/mem.c b/arch/mips/lemote/lm2e/mem.c
new file mode 100644
index 0000000000..16cd21587d
--- /dev/null
+++ b/arch/mips/lemote/lm2e/mem.c
@@ -0,0 +1,23 @@
1/*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; either version 2 of the License, or (at your
5 * option) any later version.
6 */
7#include <linux/fs.h>
8#include <linux/fcntl.h>
9#include <linux/mm.h>
10
11/* override of arch/mips/mm/cache.c: __uncached_access */
12int __uncached_access(struct file *file, unsigned long addr)
13{
14 if (file->f_flags & O_SYNC)
15 return 1;
16
17 /*
18 * On the Lemote Loongson 2e system, the peripheral registers
19 * reside between 0x1000:0000 and 0x2000:0000.
20 */
21 return addr >= __pa(high_memory) ||
22 ((addr >= 0x10000000) && (addr < 0x20000000));
23}
diff --git a/arch/mips/lemote/lm2e/pci.c b/arch/mips/lemote/lm2e/pci.c
new file mode 100644
index 0000000000..1ade1cef38
--- /dev/null
+++ b/arch/mips/lemote/lm2e/pci.c
@@ -0,0 +1,93 @@
1/*
2 * pci.c
3 *
4 * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
5 * Author: Fuxin Zhang, zhangfx@lemote.com
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
15 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
16 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
18 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 *
27 */
28#include <linux/types.h>
29#include <linux/pci.h>
30#include <linux/kernel.h>
31#include <linux/init.h>
32#include <asm/mips-boards/bonito64.h>
33
34extern struct pci_ops bonito64_pci_ops;
35
36static struct resource loongson2e_pci_mem_resource = {
37 .name = "LOONGSON2E PCI MEM",
38 .start = 0x14000000UL,
39 .end = 0x1fffffffUL,
40 .flags = IORESOURCE_MEM,
41};
42
43static struct resource loongson2e_pci_io_resource = {
44 .name = "LOONGSON2E PCI IO MEM",
45 .start = 0x00004000UL,
46 .end = IO_SPACE_LIMIT,
47 .flags = IORESOURCE_IO,
48};
49
50static struct pci_controller loongson2e_pci_controller = {
51 .pci_ops = &bonito64_pci_ops,
52 .io_resource = &loongson2e_pci_io_resource,
53 .mem_resource = &loongson2e_pci_mem_resource,
54 .mem_offset = 0x00000000UL,
55 .io_offset = 0x00000000UL,
56};
57
58static void __init ict_pcimap(void)
59{
60 /*
61 * local to PCI mapping: [256M,512M] -> [256M,512M]; differ from PMON
62 *
63 * CPU address space [256M,448M] is window for accessing pci space
64 * we set pcimap_lo[0,1,2] to map it to pci space [256M,448M]
65 * pcimap: bit18,pcimap_2; bit[17-12],lo2;bit[11-6],lo1;bit[5-0],lo0
66 */
67 /* 1,00 0110 ,0001 01,00 0000 */
68 BONITO_PCIMAP = 0x46140;
69
70 /* 1, 00 0010, 0000,01, 00 0000 */
71 /* BONITO_PCIMAP = 0x42040; */
72
73 /*
74 * PCI to local mapping: [2G,2G+256M] -> [0,256M]
75 */
76 BONITO_PCIBASE0 = 0x80000000;
77 BONITO_PCIBASE1 = 0x00800000;
78 BONITO_PCIBASE2 = 0x90000000;
79
80}
81
82static int __init pcibios_init(void)
83{
84 extern int pci_probe_only;
85 pci_probe_only = 0;
86
87 ict_pcimap();
88 register_pci_controller(&loongson2e_pci_controller);
89
90 return 0;
91}
92
93arch_initcall(pcibios_init);
diff --git a/arch/mips/lemote/lm2e/prom.c b/arch/mips/lemote/lm2e/prom.c
new file mode 100644
index 0000000000..67312d7acf
--- /dev/null
+++ b/arch/mips/lemote/lm2e/prom.c
@@ -0,0 +1,104 @@
1/*
2 * Based on Ocelot Linux port, which is
3 * Copyright 2001 MontaVista Software Inc.
4 * Author: jsun@mvista.com or jsun@junsun.net
5 *
6 * Copyright 2003 ICT CAS
7 * Author: Michael Guo <guoyi@ict.ac.cn>
8 *
9 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
10 * Author: Fuxin Zhang, zhangfx@lemote.com
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 */
17#include <linux/init.h>
18#include <linux/mm.h>
19#include <linux/sched.h>
20#include <linux/bootmem.h>
21
22#include <asm/addrspace.h>
23#include <asm/bootinfo.h>
24
25extern unsigned long bus_clock;
26extern unsigned long cpu_clock;
27extern unsigned int memsize, highmemsize;
28extern int putDebugChar(unsigned char byte);
29
30static int argc;
31/* pmon passes arguments in 32bit pointers */
32static int *arg;
33static int *env;
34
35const char *get_system_type(void)
36{
37 return "lemote-fulong";
38}
39
40void __init prom_init_cmdline(void)
41{
42 int i;
43 long l;
44
45 /* arg[0] is "g", the rest is boot parameters */
46 arcs_cmdline[0] = '\0';
47 for (i = 1; i < argc; i++) {
48 l = (long)arg[i];
49 if (strlen(arcs_cmdline) + strlen(((char *)l) + 1)
50 >= sizeof(arcs_cmdline))
51 break;
52 strcat(arcs_cmdline, ((char *)l));
53 strcat(arcs_cmdline, " ");
54 }
55}
56
57void __init prom_init(void)
58{
59 long l;
60 argc = fw_arg0;
61 arg = (int *)fw_arg1;
62 env = (int *)fw_arg2;
63
64 mips_machgroup = MACH_GROUP_LEMOTE;
65 mips_machtype = MACH_LEMOTE_FULONG;
66
67 prom_init_cmdline();
68
69 if ((strstr(arcs_cmdline, "console=")) == NULL)
70 strcat(arcs_cmdline, " console=ttyS0,115200");
71 if ((strstr(arcs_cmdline, "root=")) == NULL)
72 strcat(arcs_cmdline, " root=/dev/hda1");
73
74#define parse_even_earlier(res, option, p) \
75do { \
76 if (strncmp(option, (char *)p, strlen(option)) == 0) \
77 res = simple_strtol((char *)p + strlen(option"="), \
78 NULL, 10); \
79} while (0)
80
81 l = (long)*env;
82 while (l != 0) {
83 parse_even_earlier(bus_clock, "busclock", l);
84 parse_even_earlier(cpu_clock, "cpuclock", l);
85 parse_even_earlier(memsize, "memsize", l);
86 parse_even_earlier(highmemsize, "highmemsize", l);
87 env++;
88 l = (long)*env;
89 }
90 if (memsize == 0)
91 memsize = 256;
92
93 pr_info("busclock=%ld, cpuclock=%ld,memsize=%d,highmemsize=%d\n",
94 bus_clock, cpu_clock, memsize, highmemsize);
95}
96
97void __init prom_free_prom_memory(void)
98{
99}
100
101void prom_putchar(char c)
102{
103 putDebugChar(c);
104}
diff --git a/arch/mips/lemote/lm2e/reset.c b/arch/mips/lemote/lm2e/reset.c
new file mode 100644
index 0000000000..099387a382
--- /dev/null
+++ b/arch/mips/lemote/lm2e/reset.c
@@ -0,0 +1,41 @@
1/*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; either version 2 of the License, or (at your
5 * option) any later version.
6 *
7 * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
8 * Author: Fuxin Zhang, zhangfx@lemote.com
9 */
10#include <linux/pm.h>
11
12#include <asm/reboot.h>
13
14static void loongson2e_restart(char *command)
15{
16#ifdef CONFIG_32BIT
17 *(unsigned long *)0xbfe00104 &= ~(1 << 2);
18 *(unsigned long *)0xbfe00104 |= (1 << 2);
19#else
20 *(unsigned long *)0xffffffffbfe00104 &= ~(1 << 2);
21 *(unsigned long *)0xffffffffbfe00104 |= (1 << 2);
22#endif
23 __asm__ __volatile__("jr\t%0"::"r"(0xbfc00000));
24}
25
26static void loongson2e_halt(void)
27{
28 while (1) ;
29}
30
31static void loongson2e_power_off(void)
32{
33 loongson2e_halt();
34}
35
36void mips_reboot_setup(void)
37{
38 _machine_restart = loongson2e_restart;
39 _machine_halt = loongson2e_halt;
40 pm_power_off = loongson2e_power_off;
41}
diff --git a/arch/mips/lemote/lm2e/setup.c b/arch/mips/lemote/lm2e/setup.c
new file mode 100644
index 0000000000..0e4d1fa572
--- /dev/null
+++ b/arch/mips/lemote/lm2e/setup.c
@@ -0,0 +1,134 @@
1/*
2 * BRIEF MODULE DESCRIPTION
3 * setup.c - board dependent boot routines
4 *
5 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
6 * Author: Fuxin Zhang, zhangfx@lemote.com
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
16 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 *
28 */
29#include <linux/bootmem.h>
30#include <linux/init.h>
31#include <linux/io.h>
32#include <linux/ioport.h>
33#include <linux/interrupt.h>
34#include <linux/irq.h>
35#include <linux/kernel.h>
36#include <linux/mc146818rtc.h>
37#include <linux/mm.h>
38#include <linux/module.h>
39#include <linux/pci.h>
40#include <linux/tty.h>
41#include <linux/types.h>
42
43#include <asm/bootinfo.h>
44#include <asm/mc146818-time.h>
45#include <asm/time.h>
46#include <asm/wbflush.h>
47
48#ifdef CONFIG_VT
49#include <linux/console.h>
50#include <linux/screen_info.h>
51#endif
52
53extern void mips_reboot_setup(void);
54
55#ifdef CONFIG_64BIT
56#define PTR_PAD(p) ((0xffffffff00000000)|((unsigned long long)(p)))
57#else
58#define PTR_PAD(p) (p)
59#endif
60
61unsigned long cpu_clock;
62unsigned long bus_clock;
63unsigned int memsize;
64unsigned int highmemsize = 0;
65
66void __init plat_timer_setup(struct irqaction *irq)
67{
68 setup_irq(MIPS_CPU_IRQ_BASE + 7, irq);
69}
70
71static void __init loongson2e_time_init(void)
72{
73 /* setup mips r4k timer */
74 mips_hpt_frequency = cpu_clock / 2;
75}
76
77static unsigned long __init mips_rtc_get_time(void)
78{
79 return mc146818_get_cmos_time();
80}
81
82void (*__wbflush)(void);
83EXPORT_SYMBOL(__wbflush);
84
85static void wbflush_loongson2e(void)
86{
87 asm(".set\tpush\n\t"
88 ".set\tnoreorder\n\t"
89 ".set mips3\n\t"
90 "sync\n\t"
91 "nop\n\t"
92 ".set\tpop\n\t"
93 ".set mips0\n\t");
94}
95
96void __init plat_mem_setup(void)
97{
98 set_io_port_base(PTR_PAD(0xbfd00000));
99
100 mips_reboot_setup();
101
102 board_time_init = loongson2e_time_init;
103 rtc_mips_get_time = mips_rtc_get_time;
104
105 __wbflush = wbflush_loongson2e;
106
107 add_memory_region(0x0, (memsize << 20), BOOT_MEM_RAM);
108#ifdef CONFIG_64BIT
109 if (highmemsize > 0) {
110 add_memory_region(0x20000000, highmemsize << 20, BOOT_MEM_RAM);
111 }
112#endif
113
114#ifdef CONFIG_VT
115#if defined(CONFIG_VGA_CONSOLE)
116 conswitchp = &vga_con;
117
118 screen_info = (struct screen_info) {
119 0, 25, /* orig-x, orig-y */
120 0, /* unused */
121 0, /* orig-video-page */
122 0, /* orig-video-mode */
123 80, /* orig-video-cols */
124 0, 0, 0, /* ega_ax, ega_bx, ega_cx */
125 25, /* orig-video-lines */
126 VIDEO_TYPE_VGAC, /* orig-video-isVGA */
127 16 /* orig-video-points */
128 };
129#elif defined(CONFIG_DUMMY_CONSOLE)
130 conswitchp = &dummy_con;
131#endif
132#endif
133
134}
diff --git a/arch/mips/lib-32/Makefile b/arch/mips/lib-32/Makefile
deleted file mode 100644
index 8b94d4cc5a..0000000000
--- a/arch/mips/lib-32/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
1#
2# Makefile for MIPS-specific library files..
3#
4
5lib-y += watch.o
6
7obj-$(CONFIG_CPU_MIPS32) += dump_tlb.o
8obj-$(CONFIG_CPU_MIPS64) += dump_tlb.o
9obj-$(CONFIG_CPU_NEVADA) += dump_tlb.o
10obj-$(CONFIG_CPU_R10000) += dump_tlb.o
11obj-$(CONFIG_CPU_R3000) += r3k_dump_tlb.o
12obj-$(CONFIG_CPU_R4300) += dump_tlb.o
13obj-$(CONFIG_CPU_R4X00) += dump_tlb.o
14obj-$(CONFIG_CPU_R5000) += dump_tlb.o
15obj-$(CONFIG_CPU_R5432) += dump_tlb.o
16obj-$(CONFIG_CPU_R6000) +=
17obj-$(CONFIG_CPU_R8000) +=
18obj-$(CONFIG_CPU_RM7000) += dump_tlb.o
19obj-$(CONFIG_CPU_RM9000) += dump_tlb.o
20obj-$(CONFIG_CPU_SB1) += dump_tlb.o
21obj-$(CONFIG_CPU_TX39XX) += r3k_dump_tlb.o
22obj-$(CONFIG_CPU_TX49XX) += dump_tlb.o
23obj-$(CONFIG_CPU_VR41XX) += dump_tlb.o
diff --git a/arch/mips/lib-32/dump_tlb.c b/arch/mips/lib-32/dump_tlb.c
deleted file mode 100644
index 6a68deb51a..0000000000
--- a/arch/mips/lib-32/dump_tlb.c
+++ /dev/null
@@ -1,242 +0,0 @@
1/*
2 * Dump R4x00 TLB for debugging purposes.
3 *
4 * Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle.
5 * Copyright (C) 1999 by Silicon Graphics, Inc.
6 */
7#include <linux/kernel.h>
8#include <linux/mm.h>
9#include <linux/sched.h>
10#include <linux/string.h>
11
12#include <asm/bootinfo.h>
13#include <asm/cachectl.h>
14#include <asm/cpu.h>
15#include <asm/mipsregs.h>
16#include <asm/page.h>
17#include <asm/pgtable.h>
18
19static inline const char *msk2str(unsigned int mask)
20{
21 switch (mask) {
22 case PM_4K:
23 return "4kb";
24 case PM_16K:
25 return "16kb";
26 case PM_64K:
27 return "64kb";
28 case PM_256K:
29 return "256kb";
30#ifndef CONFIG_CPU_VR41XX
31 case PM_1M:
32 return "1Mb";
33 case PM_4M:
34 return "4Mb";
35 case PM_16M:
36 return "16Mb";
37 case PM_64M:
38 return "64Mb";
39 case PM_256M:
40 return "256Mb";
41#endif
42 }
43
44 return "unknown";
45}
46
47#define BARRIER() \
48 __asm__ __volatile__( \
49 ".set\tnoreorder\n\t" \
50 "nop;nop;nop;nop;nop;nop;nop\n\t" \
51 ".set\treorder");
52
53void dump_tlb(int first, int last)
54{
55 unsigned int pagemask, c0, c1, asid;
56 unsigned long long entrylo0, entrylo1;
57 unsigned long entryhi;
58 int i;
59
60 asid = read_c0_entryhi() & 0xff;
61
62 printk("\n");
63 for (i = first; i <= last; i++) {
64 write_c0_index(i);
65 BARRIER();
66 tlb_read();
67 BARRIER();
68 pagemask = read_c0_pagemask();
69 entryhi = read_c0_entryhi();
70 entrylo0 = read_c0_entrylo0();
71 entrylo1 = read_c0_entrylo1();
72
73 /* Unused entries have a virtual address in KSEG0. */
74 if ((entryhi & 0xf0000000) != 0x80000000
75 && (entryhi & 0xff) == asid) {
76 /*
77 * Only print entries in use
78 */
79 printk("Index: %2d pgmask=%s ", i, msk2str(pagemask));
80
81 c0 = (entrylo0 >> 3) & 7;
82 c1 = (entrylo1 >> 3) & 7;
83
84 printk("va=%08lx asid=%02lx\n",
85 (entryhi & 0xffffe000), (entryhi & 0xff));
86 printk("\t\t\t[pa=%08Lx c=%d d=%d v=%d g=%Ld]\n",
87 (entrylo0 << 6) & PAGE_MASK, c0,
88 (entrylo0 & 4) ? 1 : 0,
89 (entrylo0 & 2) ? 1 : 0, (entrylo0 & 1));
90 printk("\t\t\t[pa=%08Lx c=%d d=%d v=%d g=%Ld]\n",
91 (entrylo1 << 6) & PAGE_MASK, c1,
92 (entrylo1 & 4) ? 1 : 0,
93 (entrylo1 & 2) ? 1 : 0, (entrylo1 & 1));
94 printk("\n");
95 }
96 }
97
98 write_c0_entryhi(asid);
99}
100
101void dump_tlb_all(void)
102{
103 dump_tlb(0, current_cpu_data.tlbsize - 1);
104}
105
106void dump_tlb_wired(void)
107{
108 int wired;
109
110 wired = read_c0_wired();
111 printk("Wired: %d", wired);
112 dump_tlb(0, read_c0_wired());
113}
114
115void dump_tlb_addr(unsigned long addr)
116{
117 unsigned int flags, oldpid;
118 int index;
119
120 local_irq_save(flags);
121 oldpid = read_c0_entryhi() & 0xff;
122 BARRIER();
123 write_c0_entryhi((addr & PAGE_MASK) | oldpid);
124 BARRIER();
125 tlb_probe();
126 BARRIER();
127 index = read_c0_index();
128 write_c0_entryhi(oldpid);
129 local_irq_restore(flags);
130
131 if (index < 0) {
132 printk("No entry for address 0x%08lx in TLB\n", addr);
133 return;
134 }
135
136 printk("Entry %d maps address 0x%08lx\n", index, addr);
137 dump_tlb(index, index);
138}
139
140void dump_tlb_nonwired(void)
141{
142 dump_tlb(read_c0_wired(), current_cpu_data.tlbsize - 1);
143}
144
145void dump_list_process(struct task_struct *t, void *address)
146{
147 pgd_t *page_dir, *pgd;
148 pud_t *pud;
149 pmd_t *pmd;
150 pte_t *pte, page;
151 unsigned long addr, val;
152
153 addr = (unsigned long) address;
154
155 printk("Addr == %08lx\n", addr);
156 printk("task == %8p\n", t);
157 printk("task->mm == %8p\n", t->mm);
158 //printk("tasks->mm.pgd == %08x\n", (unsigned int) t->mm->pgd);
159
160 if (addr > KSEG0) {
161 page_dir = pgd_offset_k(0);
162 pgd = pgd_offset_k(addr);
163 } else if (t->mm) {
164 page_dir = pgd_offset(t->mm, 0);
165 pgd = pgd_offset(t->mm, addr);
166 } else {
167 printk("Current thread has no mm\n");
168 return;
169 }
170 printk("page_dir == %08x\n", (unsigned int) page_dir);
171 printk("pgd == %08x, ", (unsigned int) pgd);
172 pud = pud_offset(pgd, addr);
173 printk("pud == %08x, ", (unsigned int) pud);
174
175 pmd = pmd_offset(pud, addr);
176 printk("pmd == %08x, ", (unsigned int) pmd);
177
178 pte = pte_offset(pmd, addr);
179 printk("pte == %08x, ", (unsigned int) pte);
180
181 page = *pte;
182#ifdef CONFIG_64BIT_PHYS_ADDR
183 printk("page == %08Lx\n", pte_val(page));
184#else
185 printk("page == %08lx\n", pte_val(page));
186#endif
187
188 val = pte_val(page);
189 if (val & _PAGE_PRESENT)
190 printk("present ");
191 if (val & _PAGE_READ)
192 printk("read ");
193 if (val & _PAGE_WRITE)
194 printk("write ");
195 if (val & _PAGE_ACCESSED)
196 printk("accessed ");
197 if (val & _PAGE_MODIFIED)
198 printk("modified ");
199 if (val & _PAGE_R4KBUG)
200 printk("r4kbug ");
201 if (val & _PAGE_GLOBAL)
202 printk("global ");
203 if (val & _PAGE_VALID)
204 printk("valid ");
205 printk("\n");
206}
207
208void dump_list_current(void *address)
209{
210 dump_list_process(current, address);
211}
212
213unsigned int vtop(void *address)
214{
215 pgd_t *pgd;
216 pud_t *pud;
217 pmd_t *pmd;
218 pte_t *pte;
219 unsigned int addr, paddr;
220
221 addr = (unsigned long) address;
222 pgd = pgd_offset(current->mm, addr);
223 pud = pud_offset(pgd, addr);
224 pmd = pmd_offset(pud, addr);
225 pte = pte_offset(pmd, addr);
226 paddr = (KSEG1 | (unsigned int) pte_val(*pte)) & PAGE_MASK;
227 paddr |= (addr & ~PAGE_MASK);
228
229 return paddr;
230}
231
232void dump16(unsigned long *p)
233{
234 int i;
235
236 for (i = 0; i < 8; i++) {
237 printk("*%08lx == %08lx, ", (unsigned long) p, *p);
238 p++;
239 printk("*%08lx == %08lx\n", (unsigned long) p, *p);
240 p++;
241 }
242}
diff --git a/arch/mips/lib-32/r3k_dump_tlb.c b/arch/mips/lib-32/r3k_dump_tlb.c
deleted file mode 100644
index 4f2cb74f07..0000000000
--- a/arch/mips/lib-32/r3k_dump_tlb.c
+++ /dev/null
@@ -1,182 +0,0 @@
1/*
2 * Dump R3000 TLB for debugging purposes.
3 *
4 * Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle.
5 * Copyright (C) 1999 by Silicon Graphics, Inc.
6 * Copyright (C) 1999 by Harald Koerfgen
7 */
8#include <linux/kernel.h>
9#include <linux/mm.h>
10#include <linux/sched.h>
11#include <linux/string.h>
12
13#include <asm/bootinfo.h>
14#include <asm/cachectl.h>
15#include <asm/cpu.h>
16#include <asm/mipsregs.h>
17#include <asm/page.h>
18#include <asm/pgtable.h>
19
20extern int r3k_have_wired_reg; /* defined in tlb-r3k.c */
21
22void dump_tlb(int first, int last)
23{
24 int i;
25 unsigned int asid;
26 unsigned long entryhi, entrylo0;
27
28 asid = read_c0_entryhi() & 0xfc0;
29
30 for (i = first; i <= last; i++) {
31 write_c0_index(i<<8);
32 __asm__ __volatile__(
33 ".set\tnoreorder\n\t"
34 "tlbr\n\t"
35 "nop\n\t"
36 ".set\treorder");
37 entryhi = read_c0_entryhi();
38 entrylo0 = read_c0_entrylo0();
39
40 /* Unused entries have a virtual address of KSEG0. */
41 if ((entryhi & 0xffffe000) != 0x80000000
42 && (entryhi & 0xfc0) == asid) {
43 /*
44 * Only print entries in use
45 */
46 printk("Index: %2d ", i);
47
48 printk("va=%08lx asid=%08lx"
49 " [pa=%06lx n=%d d=%d v=%d g=%d]",
50 (entryhi & 0xffffe000),
51 entryhi & 0xfc0,
52 entrylo0 & PAGE_MASK,
53 (entrylo0 & (1 << 11)) ? 1 : 0,
54 (entrylo0 & (1 << 10)) ? 1 : 0,
55 (entrylo0 & (1 << 9)) ? 1 : 0,
56 (entrylo0 & (1 << 8)) ? 1 : 0);
57 }
58 }
59 printk("\n");
60
61 write_c0_entryhi(asid);
62}
63
64void dump_tlb_all(void)
65{
66 dump_tlb(0, current_cpu_data.tlbsize - 1);
67}
68
69void dump_tlb_wired(void)
70{
71 int wired = r3k_have_wired_reg ? read_c0_wired() : 8;
72
73 printk("Wired: %d", wired);
74 dump_tlb(0, wired - 1);
75}
76
77void dump_tlb_addr(unsigned long addr)
78{
79 unsigned long flags, oldpid;
80 int index;
81
82 local_irq_save(flags);
83 oldpid = read_c0_entryhi() & 0xff;
84 write_c0_entryhi((addr & PAGE_MASK) | oldpid);
85 tlb_probe();
86 index = read_c0_index();
87 write_c0_entryhi(oldpid);
88 local_irq_restore(flags);
89
90 if (index < 0) {
91 printk("No entry for address 0x%08lx in TLB\n", addr);
92 return;
93 }
94
95 printk("Entry %d maps address 0x%08lx\n", index, addr);
96 dump_tlb(index, index);
97}
98
99void dump_tlb_nonwired(void)
100{
101 int wired = r3k_have_wired_reg ? read_c0_wired() : 8;
102 dump_tlb(wired, current_cpu_data.tlbsize - 1);
103}
104
105void dump_list_process(struct task_struct *t, void *address)
106{
107 pgd_t *page_dir, *pgd;
108 pud_t *pud;
109 pmd_t *pmd;
110 pte_t *pte, page;
111 unsigned int addr;
112 unsigned long val;
113
114 addr = (unsigned int) address;
115
116 printk("Addr == %08x\n", addr);
117 printk("tasks->mm.pgd == %08x\n", (unsigned int) t->mm->pgd);
118
119 page_dir = pgd_offset(t->mm, 0);
120 printk("page_dir == %08x\n", (unsigned int) page_dir);
121
122 pgd = pgd_offset(t->mm, addr);
123 printk("pgd == %08x, ", (unsigned int) pgd);
124
125 pud = pud_offset(pgd, addr);
126 printk("pud == %08x, ", (unsigned int) pud);
127
128 pmd = pmd_offset(pud, addr);
129 printk("pmd == %08x, ", (unsigned int) pmd);
130
131 pte = pte_offset(pmd, addr);
132 printk("pte == %08x, ", (unsigned int) pte);
133
134 page = *pte;
135 printk("page == %08x\n", (unsigned int) pte_val(page));
136
137 val = pte_val(page);
138 if (val & _PAGE_PRESENT) printk("present ");
139 if (val & _PAGE_READ) printk("read ");
140 if (val & _PAGE_WRITE) printk("write ");
141 if (val & _PAGE_ACCESSED) printk("accessed ");
142 if (val & _PAGE_MODIFIED) printk("modified ");
143 if (val & _PAGE_GLOBAL) printk("global ");
144 if (val & _PAGE_VALID) printk("valid ");
145 printk("\n");
146}
147
148void dump_list_current(void *address)
149{
150 dump_list_process(current, address);
151}
152
153unsigned int vtop(void *address)
154{
155 pgd_t *pgd;
156 pud_t *pud;
157 pmd_t *pmd;
158 pte_t *pte;
159 unsigned int addr, paddr;
160
161 addr = (unsigned long) address;
162 pgd = pgd_offset(current->mm, addr);
163 pud = pud_offset(pgd, addr);
164 pmd = pmd_offset(pud, addr);
165 pte = pte_offset(pmd, addr);
166 paddr = (KSEG1 | (unsigned int) pte_val(*pte)) & PAGE_MASK;
167 paddr |= (addr & ~PAGE_MASK);
168
169 return paddr;
170}
171
172void dump16(unsigned long *p)
173{
174 int i;
175
176 for (i = 0; i < 8; i++) {
177 printk("*%08lx == %08lx, ", (unsigned long)p, *p);
178 p++;
179 printk("*%08lx == %08lx\n", (unsigned long)p, *p);
180 p++;
181 }
182}
diff --git a/arch/mips/lib-32/watch.S b/arch/mips/lib-32/watch.S
deleted file mode 100644
index 808b3af1a6..0000000000
--- a/arch/mips/lib-32/watch.S
+++ /dev/null
@@ -1,60 +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 * Kernel debug stuff to use the Watch registers.
7 * Useful to find stack overflows, dangling pointers etc.
8 *
9 * Copyright (C) 1995, 1996, 1999 by Ralf Baechle
10 */
11#include <asm/asm.h>
12#include <asm/mipsregs.h>
13#include <asm/regdef.h>
14
15 .set noreorder
16/*
17 * Parameter: a0 - logic address to watch
18 * Currently only KSEG0 addresses are allowed!
19 * a1 - set bit #1 to trap on load references
20 * bit #0 to trap on store references
21 * Results : none
22 */
23 LEAF(__watch_set)
24 li t0, 0x80000000
25 subu a0, t0
26 ori a0, 7
27 xori a0, 7
28 or a0, a1
29 mtc0 a0, CP0_WATCHLO
30 sw a0, watch_savelo
31
32 jr ra
33 mtc0 zero, CP0_WATCHHI
34 END(__watch_set)
35
36/*
37 * Parameter: none
38 * Results : none
39 */
40 LEAF(__watch_clear)
41 jr ra
42 mtc0 zero, CP0_WATCHLO
43 END(__watch_clear)
44
45/*
46 * Parameter: none
47 * Results : none
48 */
49 LEAF(__watch_reenable)
50 lw t0, watch_savelo
51 jr ra
52 mtc0 t0, CP0_WATCHLO
53 END(__watch_reenable)
54
55/*
56 * Saved value of the c0_watchlo register for watch_reenable()
57 */
58 .data
59watch_savelo: .word 0
60 .text
diff --git a/arch/mips/lib-64/Makefile b/arch/mips/lib-64/Makefile
deleted file mode 100644
index 8b94d4cc5a..0000000000
--- a/arch/mips/lib-64/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
1#
2# Makefile for MIPS-specific library files..
3#
4
5lib-y += watch.o
6
7obj-$(CONFIG_CPU_MIPS32) += dump_tlb.o
8obj-$(CONFIG_CPU_MIPS64) += dump_tlb.o
9obj-$(CONFIG_CPU_NEVADA) += dump_tlb.o
10obj-$(CONFIG_CPU_R10000) += dump_tlb.o
11obj-$(CONFIG_CPU_R3000) += r3k_dump_tlb.o
12obj-$(CONFIG_CPU_R4300) += dump_tlb.o
13obj-$(CONFIG_CPU_R4X00) += dump_tlb.o
14obj-$(CONFIG_CPU_R5000) += dump_tlb.o
15obj-$(CONFIG_CPU_R5432) += dump_tlb.o
16obj-$(CONFIG_CPU_R6000) +=
17obj-$(CONFIG_CPU_R8000) +=
18obj-$(CONFIG_CPU_RM7000) += dump_tlb.o
19obj-$(CONFIG_CPU_RM9000) += dump_tlb.o
20obj-$(CONFIG_CPU_SB1) += dump_tlb.o
21obj-$(CONFIG_CPU_TX39XX) += r3k_dump_tlb.o
22obj-$(CONFIG_CPU_TX49XX) += dump_tlb.o
23obj-$(CONFIG_CPU_VR41XX) += dump_tlb.o
diff --git a/arch/mips/lib-64/dump_tlb.c b/arch/mips/lib-64/dump_tlb.c
deleted file mode 100644
index 594df1a05e..0000000000
--- a/arch/mips/lib-64/dump_tlb.c
+++ /dev/null
@@ -1,216 +0,0 @@
1/*
2 * Dump R4x00 TLB for debugging purposes.
3 *
4 * Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle.
5 * Copyright (C) 1999 by Silicon Graphics, Inc.
6 */
7#include <linux/kernel.h>
8#include <linux/mm.h>
9#include <linux/sched.h>
10#include <linux/string.h>
11
12#include <asm/bootinfo.h>
13#include <asm/cachectl.h>
14#include <asm/cpu.h>
15#include <asm/mipsregs.h>
16#include <asm/page.h>
17#include <asm/pgtable.h>
18
19static inline const char *msk2str(unsigned int mask)
20{
21 switch (mask) {
22 case PM_4K: return "4kb";
23 case PM_16K: return "16kb";
24 case PM_64K: return "64kb";
25 case PM_256K: return "256kb";
26#ifndef CONFIG_CPU_VR41XX
27 case PM_1M: return "1Mb";
28 case PM_4M: return "4Mb";
29 case PM_16M: return "16Mb";
30 case PM_64M: return "64Mb";
31 case PM_256M: return "256Mb";
32#endif
33 }
34
35 return "unknown";
36}
37
38#define BARRIER() \
39 __asm__ __volatile__( \
40 ".set\tnoreorder\n\t" \
41 "nop;nop;nop;nop;nop;nop;nop\n\t" \
42 ".set\treorder");
43
44void dump_tlb(int first, int last)
45{
46 unsigned long s_entryhi, entryhi, entrylo0, entrylo1, asid;
47 unsigned int s_index, pagemask, c0, c1, i;
48
49 s_entryhi = read_c0_entryhi();
50 s_index = read_c0_index();
51 asid = s_entryhi & 0xff;
52
53 for (i = first; i <= last; i++) {
54 write_c0_index(i);
55 BARRIER();
56 tlb_read();
57 BARRIER();
58 pagemask = read_c0_pagemask();
59 entryhi = read_c0_entryhi();
60 entrylo0 = read_c0_entrylo0();
61 entrylo1 = read_c0_entrylo1();
62
63 /* Unused entries have a virtual address of CKSEG0. */
64 if ((entryhi & ~0x1ffffUL) != CKSEG0
65 && (entryhi & 0xff) == asid) {
66 /*
67 * Only print entries in use
68 */
69 printk("Index: %2d pgmask=%s ", i, msk2str(pagemask));
70
71 c0 = (entrylo0 >> 3) & 7;
72 c1 = (entrylo1 >> 3) & 7;
73
74 printk("va=%011lx asid=%02lx\n",
75 (entryhi & ~0x1fffUL),
76 entryhi & 0xff);
77 printk("\t[pa=%011lx c=%d d=%d v=%d g=%ld] ",
78 (entrylo0 << 6) & PAGE_MASK, c0,
79 (entrylo0 & 4) ? 1 : 0,
80 (entrylo0 & 2) ? 1 : 0,
81 (entrylo0 & 1));
82 printk("[pa=%011lx c=%d d=%d v=%d g=%ld]\n",
83 (entrylo1 << 6) & PAGE_MASK, c1,
84 (entrylo1 & 4) ? 1 : 0,
85 (entrylo1 & 2) ? 1 : 0,
86 (entrylo1 & 1));
87 }
88 }
89 printk("\n");
90
91 write_c0_entryhi(s_entryhi);
92 write_c0_index(s_index);
93}
94
95void dump_tlb_all(void)
96{
97 dump_tlb(0, current_cpu_data.tlbsize - 1);
98}
99
100void dump_tlb_wired(void)
101{
102 int wired;
103
104 wired = read_c0_wired();
105 printk("Wired: %d", wired);
106 dump_tlb(0, read_c0_wired());
107}
108
109void dump_tlb_addr(unsigned long addr)
110{
111 unsigned int flags, oldpid;
112 int index;
113
114 local_irq_save(flags);
115 oldpid = read_c0_entryhi() & 0xff;
116 BARRIER();
117 write_c0_entryhi((addr & PAGE_MASK) | oldpid);
118 BARRIER();
119 tlb_probe();
120 BARRIER();
121 index = read_c0_index();
122 write_c0_entryhi(oldpid);
123 local_irq_restore(flags);
124
125 if (index < 0) {
126 printk("No entry for address 0x%08lx in TLB\n", addr);
127 return;
128 }
129
130 printk("Entry %d maps address 0x%08lx\n", index, addr);
131 dump_tlb(index, index);
132}
133
134void dump_tlb_nonwired(void)
135{
136 dump_tlb(read_c0_wired(), current_cpu_data.tlbsize - 1);
137}
138
139void dump_list_process(struct task_struct *t, void *address)
140{
141 pgd_t *page_dir, *pgd;
142 pud_t *pud;
143 pmd_t *pmd;
144 pte_t *pte, page;
145 unsigned long addr, val;
146
147 addr = (unsigned long) address;
148
149 printk("Addr == %08lx\n", addr);
150 printk("tasks->mm.pgd == %08lx\n", (unsigned long) t->mm->pgd);
151
152 page_dir = pgd_offset(t->mm, 0UL);
153 printk("page_dir == %016lx\n", (unsigned long) page_dir);
154
155 pgd = pgd_offset(t->mm, addr);
156 printk("pgd == %016lx\n", (unsigned long) pgd);
157
158 pud = pud_offset(pgd, addr);
159 printk("pud == %016lx\n", (unsigned long) pud);
160
161 pmd = pmd_offset(pud, addr);
162 printk("pmd == %016lx\n", (unsigned long) pmd);
163
164 pte = pte_offset(pmd, addr);
165 printk("pte == %016lx\n", (unsigned long) pte);
166
167 page = *pte;
168 printk("page == %08lx\n", pte_val(page));
169
170 val = pte_val(page);
171 if (val & _PAGE_PRESENT) printk("present ");
172 if (val & _PAGE_READ) printk("read ");
173 if (val & _PAGE_WRITE) printk("write ");
174 if (val & _PAGE_ACCESSED) printk("accessed ");
175 if (val & _PAGE_MODIFIED) printk("modified ");
176 if (val & _PAGE_R4KBUG) printk("r4kbug ");
177 if (val & _PAGE_GLOBAL) printk("global ");
178 if (val & _PAGE_VALID) printk("valid ");
179 printk("\n");
180}
181
182void dump_list_current(void *address)
183{
184 dump_list_process(current, address);
185}
186
187unsigned long vtop(void *address)
188{
189 pgd_t *pgd;
190 pud_t *pud;
191 pmd_t *pmd;
192 pte_t *pte;
193 unsigned long addr, paddr;
194
195 addr = (unsigned long) address;
196 pgd = pgd_offset(current->mm, addr);
197 pud = pud_offset(pgd, addr);
198 pmd = pmd_offset(pud, addr);
199 pte = pte_offset(pmd, addr);
200 paddr = (CKSEG1 | (unsigned int) pte_val(*pte)) & PAGE_MASK;
201 paddr |= (addr & ~PAGE_MASK);
202
203 return paddr;
204}
205
206void dump16(unsigned long *p)
207{
208 int i;
209
210 for (i = 0; i < 8; i++) {
211 printk("*%08lx == %08lx, ", (unsigned long)p, *p);
212 p++;
213 printk("*%08lx == %08lx\n", (unsigned long)p, *p);
214 p++;
215 }
216}
diff --git a/arch/mips/lib-64/watch.S b/arch/mips/lib-64/watch.S
deleted file mode 100644
index f914340136..0000000000
--- a/arch/mips/lib-64/watch.S
+++ /dev/null
@@ -1,57 +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 * Kernel debug stuff to use the Watch registers.
7 * Useful to find stack overflows, dangling pointers etc.
8 *
9 * Copyright (C) 1995, 1996, 1999, 2001 by Ralf Baechle
10 */
11#include <asm/asm.h>
12#include <asm/mipsregs.h>
13#include <asm/regdef.h>
14
15 .set noreorder
16/*
17 * Parameter: a0 - physical address to watch
18 * a1 - set bit #1 to trap on load references
19 * bit #0 to trap on store references
20 * Results : none
21 */
22 LEAF(__watch_set)
23 ori a0, 7
24 xori a0, 7
25 or a0, a1
26 mtc0 a0, CP0_WATCHLO
27 sd a0, watch_savelo
28 dsrl32 a0, a0, 0
29
30 jr ra
31 mtc0 zero, CP0_WATCHHI
32 END(__watch_set)
33
34/*
35 * Parameter: none
36 * Results : none
37 */
38 LEAF(__watch_clear)
39 jr ra
40 mtc0 zero, CP0_WATCHLO
41 END(__watch_clear)
42
43/*
44 * Parameter: none
45 * Results : none
46 */
47 LEAF(__watch_reenable)
48 ld t0, watch_savelo
49 jr ra
50 mtc0 t0, CP0_WATCHLO
51 END(__watch_reenable)
52
53/*
54 * Saved value of the c0_watchlo register for watch_reenable()
55 */
56 .local watch_savelo
57 .comm watch_savelo, 8, 8
diff --git a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile
index 5dad13efba..91ed1eb331 100644
--- a/arch/mips/lib/Makefile
+++ b/arch/mips/lib/Makefile
@@ -8,5 +8,24 @@ lib-y += csum_partial.o memcpy.o memcpy-inatomic.o memset.o strlen_user.o \
8obj-y += iomap.o 8obj-y += iomap.o
9obj-$(CONFIG_PCI) += iomap-pci.o 9obj-$(CONFIG_PCI) += iomap-pci.o
10 10
11obj-$(CONFIG_CPU_LOONGSON2) += dump_tlb.o
12obj-$(CONFIG_CPU_MIPS32) += dump_tlb.o
13obj-$(CONFIG_CPU_MIPS64) += dump_tlb.o
14obj-$(CONFIG_CPU_NEVADA) += dump_tlb.o
15obj-$(CONFIG_CPU_R10000) += dump_tlb.o
16obj-$(CONFIG_CPU_R3000) += r3k_dump_tlb.o
17obj-$(CONFIG_CPU_R4300) += dump_tlb.o
18obj-$(CONFIG_CPU_R4X00) += dump_tlb.o
19obj-$(CONFIG_CPU_R5000) += dump_tlb.o
20obj-$(CONFIG_CPU_R5432) += dump_tlb.o
21obj-$(CONFIG_CPU_R6000) +=
22obj-$(CONFIG_CPU_R8000) +=
23obj-$(CONFIG_CPU_RM7000) += dump_tlb.o
24obj-$(CONFIG_CPU_RM9000) += dump_tlb.o
25obj-$(CONFIG_CPU_SB1) += dump_tlb.o
26obj-$(CONFIG_CPU_TX39XX) += r3k_dump_tlb.o
27obj-$(CONFIG_CPU_TX49XX) += dump_tlb.o
28obj-$(CONFIG_CPU_VR41XX) += dump_tlb.o
29
11# libgcc-style stuff needed in the kernel 30# libgcc-style stuff needed in the kernel
12lib-y += ashldi3.o ashrdi3.o lshrdi3.o ucmpdi2.o 31obj-y += ashldi3.o ashrdi3.o lshrdi3.o ucmpdi2.o
diff --git a/arch/mips/lib/dump_tlb.c b/arch/mips/lib/dump_tlb.c
new file mode 100644
index 0000000000..465ff0ec85
--- /dev/null
+++ b/arch/mips/lib/dump_tlb.c
@@ -0,0 +1,101 @@
1/*
2 * Dump R4x00 TLB for debugging purposes.
3 *
4 * Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle.
5 * Copyright (C) 1999 by Silicon Graphics, Inc.
6 */
7#include <linux/kernel.h>
8#include <linux/mm.h>
9
10#include <asm/mipsregs.h>
11#include <asm/page.h>
12#include <asm/pgtable.h>
13#include <asm/tlbdebug.h>
14
15static inline const char *msk2str(unsigned int mask)
16{
17 switch (mask) {
18 case PM_4K: return "4kb";
19 case PM_16K: return "16kb";
20 case PM_64K: return "64kb";
21 case PM_256K: return "256kb";
22#ifndef CONFIG_CPU_VR41XX
23 case PM_1M: return "1Mb";
24 case PM_4M: return "4Mb";
25 case PM_16M: return "16Mb";
26 case PM_64M: return "64Mb";
27 case PM_256M: return "256Mb";
28#endif
29 }
30 return "";
31}
32
33#define BARRIER() \
34 __asm__ __volatile__( \
35 ".set\tnoreorder\n\t" \
36 "nop;nop;nop;nop;nop;nop;nop\n\t" \
37 ".set\treorder");
38
39static void dump_tlb(int first, int last)
40{
41 unsigned long s_entryhi, entryhi, asid;
42 unsigned long long entrylo0, entrylo1;
43 unsigned int s_index, pagemask, c0, c1, i;
44
45 s_entryhi = read_c0_entryhi();
46 s_index = read_c0_index();
47 asid = s_entryhi & 0xff;
48
49 for (i = first; i <= last; i++) {
50 write_c0_index(i);
51 BARRIER();
52 tlb_read();
53 BARRIER();
54 pagemask = read_c0_pagemask();
55 entryhi = read_c0_entryhi();
56 entrylo0 = read_c0_entrylo0();
57 entrylo1 = read_c0_entrylo1();
58
59 /* Unused entries have a virtual address of CKSEG0. */
60 if ((entryhi & ~0x1ffffUL) != CKSEG0
61 && (entryhi & 0xff) == asid) {
62#ifdef CONFIG_32BIT
63 int width = 8;
64#else
65 int width = 11;
66#endif
67 /*
68 * Only print entries in use
69 */
70 printk("Index: %2d pgmask=%s ", i, msk2str(pagemask));
71
72 c0 = (entrylo0 >> 3) & 7;
73 c1 = (entrylo1 >> 3) & 7;
74
75 printk("va=%0*lx asid=%02lx\n",
76 width, (entryhi & ~0x1fffUL),
77 entryhi & 0xff);
78 printk("\t[pa=%0*llx c=%d d=%d v=%d g=%d] ",
79 width,
80 (entrylo0 << 6) & PAGE_MASK, c0,
81 (entrylo0 & 4) ? 1 : 0,
82 (entrylo0 & 2) ? 1 : 0,
83 (entrylo0 & 1) ? 1 : 0);
84 printk("[pa=%0*llx c=%d d=%d v=%d g=%d]\n",
85 width,
86 (entrylo1 << 6) & PAGE_MASK, c1,
87 (entrylo1 & 4) ? 1 : 0,
88 (entrylo1 & 2) ? 1 : 0,
89 (entrylo1 & 1) ? 1 : 0);
90 }
91 }
92 printk("\n");
93
94 write_c0_entryhi(s_entryhi);
95 write_c0_index(s_index);
96}
97
98void dump_tlb_all(void)
99{
100 dump_tlb(0, current_cpu_data.tlbsize - 1);
101}
diff --git a/arch/mips/lib/r3k_dump_tlb.c b/arch/mips/lib/r3k_dump_tlb.c
new file mode 100644
index 0000000000..9cee907975
--- /dev/null
+++ b/arch/mips/lib/r3k_dump_tlb.c
@@ -0,0 +1,63 @@
1/*
2 * Dump R3000 TLB for debugging purposes.
3 *
4 * Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle.
5 * Copyright (C) 1999 by Silicon Graphics, Inc.
6 * Copyright (C) 1999 by Harald Koerfgen
7 */
8#include <linux/kernel.h>
9#include <linux/mm.h>
10
11#include <asm/mipsregs.h>
12#include <asm/page.h>
13#include <asm/pgtable.h>
14#include <asm/tlbdebug.h>
15
16extern int r3k_have_wired_reg; /* defined in tlb-r3k.c */
17
18static void dump_tlb(int first, int last)
19{
20 int i;
21 unsigned int asid;
22 unsigned long entryhi, entrylo0;
23
24 asid = read_c0_entryhi() & 0xfc0;
25
26 for (i = first; i <= last; i++) {
27 write_c0_index(i<<8);
28 __asm__ __volatile__(
29 ".set\tnoreorder\n\t"
30 "tlbr\n\t"
31 "nop\n\t"
32 ".set\treorder");
33 entryhi = read_c0_entryhi();
34 entrylo0 = read_c0_entrylo0();
35
36 /* Unused entries have a virtual address of KSEG0. */
37 if ((entryhi & 0xffffe000) != 0x80000000
38 && (entryhi & 0xfc0) == asid) {
39 /*
40 * Only print entries in use
41 */
42 printk("Index: %2d ", i);
43
44 printk("va=%08lx asid=%08lx"
45 " [pa=%06lx n=%d d=%d v=%d g=%d]",
46 (entryhi & 0xffffe000),
47 entryhi & 0xfc0,
48 entrylo0 & PAGE_MASK,
49 (entrylo0 & (1 << 11)) ? 1 : 0,
50 (entrylo0 & (1 << 10)) ? 1 : 0,
51 (entrylo0 & (1 << 9)) ? 1 : 0,
52 (entrylo0 & (1 << 8)) ? 1 : 0);
53 }
54 }
55 printk("\n");
56
57 write_c0_entryhi(asid);
58}
59
60void dump_tlb_all(void)
61{
62 dump_tlb(0, current_cpu_data.tlbsize - 1);
63}
diff --git a/arch/mips/lib/ucmpdi2.c b/arch/mips/lib/ucmpdi2.c
index e9ff258ef0..e2ff6072b5 100644
--- a/arch/mips/lib/ucmpdi2.c
+++ b/arch/mips/lib/ucmpdi2.c
@@ -2,7 +2,7 @@
2 2
3#include "libgcc.h" 3#include "libgcc.h"
4 4
5word_type __ucmpdi2 (unsigned long a, unsigned long b) 5word_type __ucmpdi2 (unsigned long long a, unsigned long long b)
6{ 6{
7 const DWunion au = {.ll = a}; 7 const DWunion au = {.ll = a};
8 const DWunion bu = {.ll = b}; 8 const DWunion bu = {.ll = b};
diff --git a/arch/mips/lib/uncached.c b/arch/mips/lib/uncached.c
index 2388f7f3ff..58d14f4d93 100644
--- a/arch/mips/lib/uncached.c
+++ b/arch/mips/lib/uncached.c
@@ -12,6 +12,7 @@
12 12
13#include <asm/addrspace.h> 13#include <asm/addrspace.h>
14#include <asm/bug.h> 14#include <asm/bug.h>
15#include <asm/cacheflush.h>
15 16
16#ifndef CKSEG2 17#ifndef CKSEG2
17#define CKSEG2 CKSSEG 18#define CKSEG2 CKSSEG
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index 80531b35cd..17419e11ec 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -35,6 +35,7 @@
35 * better performance by compiling with -msoft-float! 35 * better performance by compiling with -msoft-float!
36 */ 36 */
37#include <linux/sched.h> 37#include <linux/sched.h>
38#include <linux/debugfs.h>
38 39
39#include <asm/inst.h> 40#include <asm/inst.h>
40#include <asm/bootinfo.h> 41#include <asm/bootinfo.h>
@@ -204,7 +205,7 @@ static int isBranchInstr(mips_instruction * i)
204static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx) 205static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
205{ 206{
206 mips_instruction ir; 207 mips_instruction ir;
207 void * emulpc, *contpc; 208 unsigned long emulpc, contpc;
208 unsigned int cond; 209 unsigned int cond;
209 210
210 if (get_user(ir, (mips_instruction __user *) xcp->cp0_epc)) { 211 if (get_user(ir, (mips_instruction __user *) xcp->cp0_epc)) {
@@ -229,7 +230,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
229 * Linux MIPS branch emulator operates on context, updating the 230 * Linux MIPS branch emulator operates on context, updating the
230 * cp0_epc. 231 * cp0_epc.
231 */ 232 */
232 emulpc = (void *) (xcp->cp0_epc + 4); /* Snapshot emulation target */ 233 emulpc = xcp->cp0_epc + 4; /* Snapshot emulation target */
233 234
234 if (__compute_return_epc(xcp)) { 235 if (__compute_return_epc(xcp)) {
235#ifdef CP1DBG 236#ifdef CP1DBG
@@ -243,12 +244,12 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
243 return SIGBUS; 244 return SIGBUS;
244 } 245 }
245 /* __compute_return_epc() will have updated cp0_epc */ 246 /* __compute_return_epc() will have updated cp0_epc */
246 contpc = (void *) xcp->cp0_epc; 247 contpc = xcp->cp0_epc;
247 /* In order not to confuse ptrace() et al, tweak context */ 248 /* In order not to confuse ptrace() et al, tweak context */
248 xcp->cp0_epc = (unsigned long) emulpc - 4; 249 xcp->cp0_epc = emulpc - 4;
249 } else { 250 } else {
250 emulpc = (void *) xcp->cp0_epc; 251 emulpc = xcp->cp0_epc;
251 contpc = (void *) (xcp->cp0_epc + 4); 252 contpc = xcp->cp0_epc + 4;
252 } 253 }
253 254
254 emul: 255 emul:
@@ -426,8 +427,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
426 * instruction 427 * instruction
427 */ 428 */
428 xcp->cp0_epc += 4; 429 xcp->cp0_epc += 4;
429 contpc = (void *) 430 contpc = (xcp->cp0_epc +
430 (xcp->cp0_epc +
431 (MIPSInst_SIMM(ir) << 2)); 431 (MIPSInst_SIMM(ir) << 2));
432 432
433 if (get_user(ir, 433 if (get_user(ir,
@@ -461,7 +461,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
461 * Single step the non-cp1 461 * Single step the non-cp1
462 * instruction in the dslot 462 * instruction in the dslot
463 */ 463 */
464 return mips_dsemul(xcp, ir, (unsigned long) contpc); 464 return mips_dsemul(xcp, ir, contpc);
465 } 465 }
466 else { 466 else {
467 /* branch not taken */ 467 /* branch not taken */
@@ -520,7 +520,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
520 } 520 }
521 521
522 /* we did it !! */ 522 /* we did it !! */
523 xcp->cp0_epc = (unsigned long) contpc; 523 xcp->cp0_epc = contpc;
524 xcp->cp0_cause &= ~CAUSEF_BD; 524 xcp->cp0_cause &= ~CAUSEF_BD;
525 525
526 return 0; 526 return 0;
@@ -1277,3 +1277,36 @@ int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
1277 1277
1278 return sig; 1278 return sig;
1279} 1279}
1280
1281#ifdef CONFIG_DEBUG_FS
1282extern struct dentry *mips_debugfs_dir;
1283static int __init debugfs_fpuemu(void)
1284{
1285 struct dentry *d, *dir;
1286 int i;
1287 static struct {
1288 const char *name;
1289 unsigned int *v;
1290 } vars[] __initdata = {
1291 { "emulated", &fpuemustats.emulated },
1292 { "loads", &fpuemustats.loads },
1293 { "stores", &fpuemustats.stores },
1294 { "cp1ops", &fpuemustats.cp1ops },
1295 { "cp1xops", &fpuemustats.cp1xops },
1296 { "errors", &fpuemustats.errors },
1297 };
1298
1299 if (!mips_debugfs_dir)
1300 return -ENODEV;
1301 dir = debugfs_create_dir("fpuemustats", mips_debugfs_dir);
1302 if (IS_ERR(dir))
1303 return PTR_ERR(dir);
1304 for (i = 0; i < ARRAY_SIZE(vars); i++) {
1305 d = debugfs_create_u32(vars[i].name, S_IRUGO, dir, vars[i].v);
1306 if (IS_ERR(d))
1307 return PTR_ERR(d);
1308 }
1309 return 0;
1310}
1311__initcall(debugfs_fpuemu);
1312#endif
diff --git a/arch/mips/math-emu/dsemul.c b/arch/mips/math-emu/dsemul.c
index ea6ba72484..653e325849 100644
--- a/arch/mips/math-emu/dsemul.c
+++ b/arch/mips/math-emu/dsemul.c
@@ -54,8 +54,7 @@ struct emuframe {
54int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc) 54int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc)
55{ 55{
56 extern asmlinkage void handle_dsemulret(void); 56 extern asmlinkage void handle_dsemulret(void);
57 mips_instruction *dsemul_insns; 57 struct emuframe __user *fr;
58 struct emuframe *fr;
59 int err; 58 int err;
60 59
61 if (ir == 0) { /* a nop is easy */ 60 if (ir == 0) { /* a nop is easy */
@@ -87,8 +86,8 @@ int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc)
87 */ 86 */
88 87
89 /* Ensure that the two instructions are in the same cache line */ 88 /* Ensure that the two instructions are in the same cache line */
90 dsemul_insns = (mips_instruction *) ((regs->regs[29] - sizeof(struct emuframe)) & ~0x7); 89 fr = (struct emuframe __user *)
91 fr = (struct emuframe *) dsemul_insns; 90 ((regs->regs[29] - sizeof(struct emuframe)) & ~0x7);
92 91
93 /* Verify that the stack pointer is not competely insane */ 92 /* Verify that the stack pointer is not competely insane */
94 if (unlikely(!access_ok(VERIFY_WRITE, fr, sizeof(struct emuframe)))) 93 if (unlikely(!access_ok(VERIFY_WRITE, fr, sizeof(struct emuframe))))
@@ -113,12 +112,13 @@ int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc)
113 112
114int do_dsemulret(struct pt_regs *xcp) 113int do_dsemulret(struct pt_regs *xcp)
115{ 114{
116 struct emuframe *fr; 115 struct emuframe __user *fr;
117 unsigned long epc; 116 unsigned long epc;
118 u32 insn, cookie; 117 u32 insn, cookie;
119 int err = 0; 118 int err = 0;
120 119
121 fr = (struct emuframe *) (xcp->cp0_epc - sizeof(mips_instruction)); 120 fr = (struct emuframe __user *)
121 (xcp->cp0_epc - sizeof(mips_instruction));
122 122
123 /* 123 /*
124 * If we can't even access the area, something is very wrong, but we'll 124 * If we can't even access the area, something is very wrong, but we'll
diff --git a/arch/mips/mips-boards/atlas/atlas_setup.c b/arch/mips/mips-boards/atlas/atlas_setup.c
index 1cc6ebbedf..c68358a476 100644
--- a/arch/mips/mips-boards/atlas/atlas_setup.c
+++ b/arch/mips/mips-boards/atlas/atlas_setup.c
@@ -22,6 +22,7 @@
22#include <linux/tty.h> 22#include <linux/tty.h>
23#include <linux/serial.h> 23#include <linux/serial.h>
24#include <linux/serial_core.h> 24#include <linux/serial_core.h>
25#include <linux/serial_8250.h>
25 26
26#include <asm/cpu.h> 27#include <asm/cpu.h>
27#include <asm/bootinfo.h> 28#include <asm/bootinfo.h>
diff --git a/arch/mips/mips-boards/malta/Makefile b/arch/mips/mips-boards/malta/Makefile
index 377d9e8f25..a242b0fc37 100644
--- a/arch/mips/mips-boards/malta/Makefile
+++ b/arch/mips/mips-boards/malta/Makefile
@@ -19,6 +19,7 @@
19# under Linux. 19# under Linux.
20# 20#
21 21
22obj-y := malta_int.o malta_setup.o 22obj-y := malta_int.o malta_platform.o malta_setup.o
23
23obj-$(CONFIG_MTD) += malta_mtd.o 24obj-$(CONFIG_MTD) += malta_mtd.o
24obj-$(CONFIG_MIPS_MT_SMTC) += malta_smtc.o 25obj-$(CONFIG_MIPS_MT_SMTC) += malta_smtc.o
diff --git a/arch/mips/mips-boards/malta/malta_platform.c b/arch/mips/mips-boards/malta/malta_platform.c
new file mode 100644
index 0000000000..83b9bab3cd
--- /dev/null
+++ b/arch/mips/mips-boards/malta/malta_platform.c
@@ -0,0 +1,65 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2007 MIPS Technologies, Inc.
7 * written by Ralf Baechle (ralf@linux-mips.org)
8 *
9 * Probe driver for the Malta's UART ports:
10 *
11 * o 2 ports in the SMC SuperIO
12 * o 1 port in the CBUS UART, a discrete 16550 which normally is only used
13 * for bringups.
14 *
15 * We don't use 8250_platform.c on Malta as it would result in the CBUS
16 * UART becoming ttyS0.
17 */
18#include <linux/module.h>
19#include <linux/init.h>
20#include <linux/serial_8250.h>
21
22#define SMC_PORT(base, int) \
23{ \
24 .iobase = base, \
25 .irq = int, \
26 .uartclk = 1843200, \
27 .iotype = UPIO_PORT, \
28 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \
29 .regshift = 0, \
30}
31
32#define CBUS_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP)
33
34static struct plat_serial8250_port uart8250_data[] = {
35 SMC_PORT(0x3F8, 4),
36 SMC_PORT(0x2F8, 3),
37 {
38 .mapbase = 0x1f000900, /* The CBUS UART */
39 .irq = MIPS_CPU_IRQ_BASE + 2,
40 .uartclk = 3686400, /* Twice the usual clk! */
41 .iotype = UPIO_MEM32,
42 .flags = CBUS_UART_FLAGS,
43 .regshift = 3,
44 },
45 { },
46};
47
48static struct platform_device uart8250_device = {
49 .name = "serial8250",
50 .id = PLAT8250_DEV_PLATFORM2,
51 .dev = {
52 .platform_data = uart8250_data,
53 },
54};
55
56static int __init uart8250_init(void)
57{
58 return platform_device_register(&uart8250_device);
59}
60
61module_init(uart8250_init);
62
63MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
64MODULE_LICENSE("GPL");
65MODULE_DESCRIPTION("8250 UART probe driver for the Malta CBUS UART");
diff --git a/arch/mips/mips-boards/sead/sead_setup.c b/arch/mips/mips-boards/sead/sead_setup.c
index bb801409d3..5f70eaf01f 100644
--- a/arch/mips/mips-boards/sead/sead_setup.c
+++ b/arch/mips/mips-boards/sead/sead_setup.c
@@ -23,6 +23,7 @@
23#include <linux/tty.h> 23#include <linux/tty.h>
24#include <linux/serial.h> 24#include <linux/serial.h>
25#include <linux/serial_core.h> 25#include <linux/serial_core.h>
26#include <linux/serial_8250.h>
26 27
27#include <asm/cpu.h> 28#include <asm/cpu.h>
28#include <asm/bootinfo.h> 29#include <asm/bootinfo.h>
diff --git a/arch/mips/mips-boards/sim/Makefile b/arch/mips/mipssim/Makefile
index dc0bfda114..dc0bfda114 100644
--- a/arch/mips/mips-boards/sim/Makefile
+++ b/arch/mips/mipssim/Makefile
diff --git a/arch/mips/mips-boards/sim/sim_cmdline.c b/arch/mips/mipssim/sim_cmdline.c
index c63021a5dc..c63021a5dc 100644
--- a/arch/mips/mips-boards/sim/sim_cmdline.c
+++ b/arch/mips/mipssim/sim_cmdline.c
diff --git a/arch/mips/mips-boards/sim/sim_console.c b/arch/mips/mipssim/sim_console.c
index de595a9ccb..a2f41672cd 100644
--- a/arch/mips/mips-boards/sim/sim_console.c
+++ b/arch/mips/mipssim/sim_console.c
@@ -18,8 +18,8 @@
18 * written by Ralf Baechle 18 * written by Ralf Baechle
19 */ 19 */
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/io.h>
21#include <linux/serial_reg.h> 22#include <linux/serial_reg.h>
22#include <asm/io.h>
23 23
24static inline unsigned int serial_in(int offset) 24static inline unsigned int serial_in(int offset)
25{ 25{
diff --git a/arch/mips/mipssim/sim_int.c b/arch/mips/mipssim/sim_int.c
new file mode 100644
index 0000000000..5cbc3509ab
--- /dev/null
+++ b/arch/mips/mipssim/sim_int.c
@@ -0,0 +1,88 @@
1/*
2 * Copyright (C) 1999, 2005 MIPS Technologies, Inc. All rights reserved.
3 *
4 * This program is free software; you can distribute it and/or modify it
5 * under the terms of the GNU General Public License (Version 2) as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * for more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
16 *
17 */
18#include <linux/init.h>
19#include <linux/sched.h>
20#include <linux/slab.h>
21#include <linux/interrupt.h>
22#include <linux/kernel_stat.h>
23#include <asm/mips-boards/simint.h>
24#include <asm/irq_cpu.h>
25
26static inline int clz(unsigned long x)
27{
28 __asm__ (
29 " .set push \n"
30 " .set mips32 \n"
31 " clz %0, %1 \n"
32 " .set pop \n"
33 : "=r" (x)
34 : "r" (x));
35
36 return x;
37}
38
39/*
40 * Version of ffs that only looks at bits 12..15.
41 */
42static inline unsigned int irq_ffs(unsigned int pending)
43{
44#if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64)
45 return -clz(pending) + 31 - CAUSEB_IP;
46#else
47 unsigned int a0 = 7;
48 unsigned int t0;
49
50 t0 = s0 & 0xf000;
51 t0 = t0 < 1;
52 t0 = t0 << 2;
53 a0 = a0 - t0;
54 s0 = s0 << t0;
55
56 t0 = s0 & 0xc000;
57 t0 = t0 < 1;
58 t0 = t0 << 1;
59 a0 = a0 - t0;
60 s0 = s0 << t0;
61
62 t0 = s0 & 0x8000;
63 t0 = t0 < 1;
64 /* t0 = t0 << 2; */
65 a0 = a0 - t0;
66 /* s0 = s0 << t0; */
67
68 return a0;
69#endif
70}
71
72asmlinkage void plat_irq_dispatch(void)
73{
74 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
75 int irq;
76
77 irq = irq_ffs(pending);
78
79 if (irq > 0)
80 do_IRQ(MIPS_CPU_IRQ_BASE + irq);
81 else
82 spurious_interrupt();
83}
84
85void __init arch_init_irq(void)
86{
87 mips_cpu_irq_init();
88}
diff --git a/arch/mips/mips-boards/sim/sim_mem.c b/arch/mips/mipssim/sim_mem.c
index e408ef0bcd..2312483eb8 100644
--- a/arch/mips/mips-boards/sim/sim_mem.c
+++ b/arch/mips/mipssim/sim_mem.c
@@ -95,7 +95,7 @@ void __init prom_meminit(void)
95 size = p->size; 95 size = p->size;
96 96
97 add_memory_region(base, size, type); 97 add_memory_region(base, size, type);
98 p++; 98 p++;
99 } 99 }
100} 100}
101 101
diff --git a/arch/mips/mips-boards/sim/sim_platform.c b/arch/mips/mipssim/sim_platform.c
index 53210a8c5d..53210a8c5d 100644
--- a/arch/mips/mips-boards/sim/sim_platform.c
+++ b/arch/mips/mipssim/sim_platform.c
diff --git a/arch/mips/mips-boards/sim/sim_setup.c b/arch/mips/mipssim/sim_setup.c
index b705f09e57..17819b5941 100644
--- a/arch/mips/mips-boards/sim/sim_setup.c
+++ b/arch/mips/mipssim/sim_setup.c
@@ -19,18 +19,19 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/string.h> 20#include <linux/string.h>
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/io.h>
23#include <linux/irq.h>
22#include <linux/ioport.h> 24#include <linux/ioport.h>
25#include <linux/serial.h>
23#include <linux/tty.h> 26#include <linux/tty.h>
24#include <linux/serial.h> 27#include <linux/serial.h>
25#include <linux/serial_core.h> 28#include <linux/serial_core.h>
29#include <linux/serial_8250.h>
26 30
27#include <asm/cpu.h> 31#include <asm/cpu.h>
28#include <asm/bootinfo.h> 32#include <asm/bootinfo.h>
29#include <asm/irq.h>
30#include <asm/mips-boards/generic.h> 33#include <asm/mips-boards/generic.h>
31#include <asm/mips-boards/prom.h> 34#include <asm/mips-boards/prom.h>
32#include <asm/serial.h>
33#include <asm/io.h>
34#include <asm/time.h> 35#include <asm/time.h>
35#include <asm/mips-boards/sim.h> 36#include <asm/mips-boards/sim.h>
36#include <asm/mips-boards/simint.h> 37#include <asm/mips-boards/simint.h>
@@ -62,7 +63,7 @@ void __init plat_mem_setup(void)
62#endif 63#endif
63} 64}
64 65
65void prom_init(void) 66void __init prom_init(void)
66{ 67{
67 set_io_port_base(0xbfd00000); 68 set_io_port_base(0xbfd00000);
68 69
@@ -84,7 +85,7 @@ static void __init serial_init(void)
84 /* hardware int 4 - the serial int, is CPU int 6 85 /* hardware int 4 - the serial int, is CPU int 6
85 but poll for now */ 86 but poll for now */
86 s.irq = 0; 87 s.irq = 0;
87 s.uartclk = BASE_BAUD * 16; 88 s.uartclk = 1843200;
88 s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; 89 s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
89 s.iotype = UPIO_PORT; 90 s.iotype = UPIO_PORT;
90 s.regshift = 0; 91 s.regshift = 0;
diff --git a/arch/mips/mips-boards/sim/sim_smp.c b/arch/mips/mipssim/sim_smp.c
index cb47863ecf..38fa807b99 100644
--- a/arch/mips/mips-boards/sim/sim_smp.c
+++ b/arch/mips/mipssim/sim_smp.c
@@ -22,13 +22,13 @@
22#include <linux/sched.h> 22#include <linux/sched.h>
23#include <linux/cpumask.h> 23#include <linux/cpumask.h>
24#include <linux/interrupt.h> 24#include <linux/interrupt.h>
25#include <linux/smp.h>
26
25#include <asm/atomic.h> 27#include <asm/atomic.h>
26#include <asm/cpu.h> 28#include <asm/cpu.h>
27#include <asm/processor.h> 29#include <asm/processor.h>
28#include <asm/system.h> 30#include <asm/system.h>
29#include <asm/hardirq.h>
30#include <asm/mmu_context.h> 31#include <asm/mmu_context.h>
31#include <asm/smp.h>
32#ifdef CONFIG_MIPS_MT_SMTC 32#ifdef CONFIG_MIPS_MT_SMTC
33#include <asm/smtc_ipi.h> 33#include <asm/smtc_ipi.h>
34#endif /* CONFIG_MIPS_MT_SMTC */ 34#endif /* CONFIG_MIPS_MT_SMTC */
@@ -73,11 +73,19 @@ void prom_init_secondary(void)
73#endif /* CONFIG_MIPS_MT_SMTC */ 73#endif /* CONFIG_MIPS_MT_SMTC */
74} 74}
75 75
76void plat_smp_setup(void)
77{
78#ifdef CONFIG_MIPS_MT_SMTC
79 if (read_c0_config3() & (1 << 2))
80 mipsmt_build_cpu_map(0);
81#endif /* CONFIG_MIPS_MT_SMTC */
82}
83
76/* 84/*
77 * Platform SMP pre-initialization 85 * Platform SMP pre-initialization
78 */ 86 */
79 87
80void prom_prepare_cpus(unsigned int max_cpus) 88void plat_prepare_cpus(unsigned int max_cpus)
81{ 89{
82#ifdef CONFIG_MIPS_MT_SMTC 90#ifdef CONFIG_MIPS_MT_SMTC
83 /* 91 /*
@@ -85,8 +93,8 @@ void prom_prepare_cpus(unsigned int max_cpus)
85 * but it may be multithreaded. 93 * but it may be multithreaded.
86 */ 94 */
87 95
88 if (read_c0_config3() & (1<<2)) { 96 if (read_c0_config3() & (1 << 2)) {
89 mipsmt_prepare_cpus(max_cpus); 97 mipsmt_prepare_cpus();
90 } 98 }
91#endif /* CONFIG_MIPS_MT_SMTC */ 99#endif /* CONFIG_MIPS_MT_SMTC */
92} 100}
diff --git a/arch/mips/mips-boards/sim/sim_time.c b/arch/mips/mipssim/sim_time.c
index 7224ffe31d..a0f5a5dca1 100644
--- a/arch/mips/mips-boards/sim/sim_time.c
+++ b/arch/mips/mipssim/sim_time.c
@@ -5,10 +5,9 @@
5#include <linux/spinlock.h> 5#include <linux/spinlock.h>
6#include <linux/interrupt.h> 6#include <linux/interrupt.h>
7#include <linux/mc146818rtc.h> 7#include <linux/mc146818rtc.h>
8#include <linux/smp.h>
8#include <linux/timex.h> 9#include <linux/timex.h>
9 10
10#include <asm/mipsregs.h>
11#include <asm/ptrace.h>
12#include <asm/hardirq.h> 11#include <asm/hardirq.h>
13#include <asm/div64.h> 12#include <asm/div64.h>
14#include <asm/cpu.h> 13#include <asm/cpu.h>
@@ -16,7 +15,6 @@
16#include <asm/irq.h> 15#include <asm/irq.h>
17#include <asm/mc146818-time.h> 16#include <asm/mc146818-time.h>
18#include <asm/msc01_ic.h> 17#include <asm/msc01_ic.h>
19#include <asm/smp.h>
20 18
21#include <asm/mips-boards/generic.h> 19#include <asm/mips-boards/generic.h>
22#include <asm/mips-boards/prom.h> 20#include <asm/mips-boards/prom.h>
@@ -37,8 +35,7 @@ irqreturn_t sim_timer_interrupt(int irq, void *dev_id)
37#ifndef CONFIG_MIPS_MT_SMTC 35#ifndef CONFIG_MIPS_MT_SMTC
38 if (cpu == 0) { 36 if (cpu == 0) {
39 timer_interrupt(irq, dev_id); 37 timer_interrupt(irq, dev_id);
40 } 38 } else {
41 else {
42 /* Everyone else needs to reset the timer int here as 39 /* Everyone else needs to reset the timer int here as
43 ll_local_timer_interrupt doesn't */ 40 ll_local_timer_interrupt doesn't */
44 /* 41 /*
@@ -76,8 +73,10 @@ irqreturn_t sim_timer_interrupt(int irq, void *dev_id)
76 irq_enable_hazard(); 73 irq_enable_hazard();
77 evpe(vpflags); 74 evpe(vpflags);
78 75
79 if(cpu_data[cpu].vpe_id == 0) timer_interrupt(irq, dev_id); 76 if (cpu_data[cpu].vpe_id == 0)
80 else write_c0_compare (read_c0_count() + ( mips_hpt_frequency/HZ)); 77 timer_interrupt(irq, dev_id);
78 else
79 write_c0_compare (read_c0_count() + ( mips_hpt_frequency/HZ));
81 smtc_timer_broadcast(cpu_data[cpu].vpe_id); 80 smtc_timer_broadcast(cpu_data[cpu].vpe_id);
82 81
83#endif /* CONFIG_MIPS_MT_SMTC */ 82#endif /* CONFIG_MIPS_MT_SMTC */
@@ -85,7 +84,8 @@ irqreturn_t sim_timer_interrupt(int irq, void *dev_id)
85 /* 84 /*
86 * every CPU should do profiling and process accounting 85 * every CPU should do profiling and process accounting
87 */ 86 */
88 local_timer_interrupt (irq, dev_id); 87 local_timer_interrupt (irq, dev_id);
88
89 return IRQ_HANDLED; 89 return IRQ_HANDLED;
90#else 90#else
91 return timer_interrupt (irq, dev_id); 91 return timer_interrupt (irq, dev_id);
@@ -152,17 +152,15 @@ void __init sim_time_init(void)
152 152
153 local_irq_save(flags); 153 local_irq_save(flags);
154 154
155 155 /* Set Data mode - binary. */
156 /* Set Data mode - binary. */
157 CMOS_WRITE(CMOS_READ(RTC_CONTROL) | RTC_DM_BINARY, RTC_CONTROL); 156 CMOS_WRITE(CMOS_READ(RTC_CONTROL) | RTC_DM_BINARY, RTC_CONTROL);
158 157
159
160 est_freq = estimate_cpu_frequency (); 158 est_freq = estimate_cpu_frequency ();
161 159
162 printk("CPU frequency %d.%02d MHz\n", est_freq/1000000, 160 printk(KERN_INFO "CPU frequency %d.%02d MHz\n", est_freq / 1000000,
163 (est_freq%1000000)*100/1000000); 161 (est_freq % 1000000) * 100 / 1000000);
164 162
165 cpu_khz = est_freq / 1000; 163 cpu_khz = est_freq / 1000;
166 164
167 local_irq_restore(flags); 165 local_irq_restore(flags);
168} 166}
@@ -180,8 +178,7 @@ void __init plat_timer_setup(struct irqaction *irq)
180 if (cpu_has_veic) { 178 if (cpu_has_veic) {
181 set_vi_handler(MSC01E_INT_CPUCTR, mips_timer_dispatch); 179 set_vi_handler(MSC01E_INT_CPUCTR, mips_timer_dispatch);
182 mips_cpu_timer_irq = MSC01E_INT_BASE + MSC01E_INT_CPUCTR; 180 mips_cpu_timer_irq = MSC01E_INT_BASE + MSC01E_INT_CPUCTR;
183 } 181 } else {
184 else {
185 if (cpu_has_vint) 182 if (cpu_has_vint)
186 set_vi_handler(cp0_compare_irq, mips_timer_dispatch); 183 set_vi_handler(cp0_compare_irq, mips_timer_dispatch);
187 mips_cpu_timer_irq = MIPS_CPU_IRQ_BASE + cp0_compare_irq; 184 mips_cpu_timer_irq = MIPS_CPU_IRQ_BASE + cp0_compare_irq;
diff --git a/arch/mips/mm/Makefile b/arch/mips/mm/Makefile
index 293697b156..19a0e544c4 100644
--- a/arch/mips/mm/Makefile
+++ b/arch/mips/mm/Makefile
@@ -9,6 +9,7 @@ obj-$(CONFIG_32BIT) += ioremap.o pgtable-32.o
9obj-$(CONFIG_64BIT) += pgtable-64.o 9obj-$(CONFIG_64BIT) += pgtable-64.o
10obj-$(CONFIG_HIGHMEM) += highmem.o 10obj-$(CONFIG_HIGHMEM) += highmem.o
11 11
12obj-$(CONFIG_CPU_LOONGSON2) += c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
12obj-$(CONFIG_CPU_MIPS32) += c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o 13obj-$(CONFIG_CPU_MIPS32) += c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
13obj-$(CONFIG_CPU_MIPS64) += c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o 14obj-$(CONFIG_CPU_MIPS64) += c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
14obj-$(CONFIG_CPU_NEVADA) += c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o 15obj-$(CONFIG_CPU_NEVADA) += c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index df04a315d8..be96231dcc 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -335,6 +335,10 @@ static void r4k_flush_cache_all(void)
335 335
336static inline void local_r4k___flush_cache_all(void * args) 336static inline void local_r4k___flush_cache_all(void * args)
337{ 337{
338#if defined(CONFIG_CPU_LOONGSON2)
339 r4k_blast_scache();
340 return;
341#endif
338 r4k_blast_dcache(); 342 r4k_blast_dcache();
339 r4k_blast_icache(); 343 r4k_blast_icache();
340 344
@@ -848,6 +852,24 @@ static void __init probe_pcache(void)
848 c->options |= MIPS_CPU_PREFETCH; 852 c->options |= MIPS_CPU_PREFETCH;
849 break; 853 break;
850 854
855 case CPU_LOONGSON2:
856 icache_size = 1 << (12 + ((config & CONF_IC) >> 9));
857 c->icache.linesz = 16 << ((config & CONF_IB) >> 5);
858 if (prid & 0x3)
859 c->icache.ways = 4;
860 else
861 c->icache.ways = 2;
862 c->icache.waybit = 0;
863
864 dcache_size = 1 << (12 + ((config & CONF_DC) >> 6));
865 c->dcache.linesz = 16 << ((config & CONF_DB) >> 4);
866 if (prid & 0x3)
867 c->dcache.ways = 4;
868 else
869 c->dcache.ways = 2;
870 c->dcache.waybit = 0;
871 break;
872
851 default: 873 default:
852 if (!(config & MIPS_CONF_M)) 874 if (!(config & MIPS_CONF_M))
853 panic("Don't know how to probe P-caches on this cpu."); 875 panic("Don't know how to probe P-caches on this cpu.");
@@ -963,6 +985,14 @@ static void __init probe_pcache(void)
963 break; 985 break;
964 } 986 }
965 987
988#ifdef CONFIG_CPU_LOONGSON2
989 /*
990 * LOONGSON2 has 4 way icache, but when using indexed cache op,
991 * one op will act on all 4 ways
992 */
993 c->icache.ways = 1;
994#endif
995
966 printk("Primary instruction cache %ldkB, %s, %s, linesize %d bytes.\n", 996 printk("Primary instruction cache %ldkB, %s, %s, linesize %d bytes.\n",
967 icache_size >> 10, 997 icache_size >> 10,
968 cpu_has_vtag_icache ? "virtually tagged" : "physically tagged", 998 cpu_has_vtag_icache ? "virtually tagged" : "physically tagged",
@@ -1036,6 +1066,24 @@ static int __init probe_scache(void)
1036 return 1; 1066 return 1;
1037} 1067}
1038 1068
1069#if defined(CONFIG_CPU_LOONGSON2)
1070static void __init loongson2_sc_init(void)
1071{
1072 struct cpuinfo_mips *c = &current_cpu_data;
1073
1074 scache_size = 512*1024;
1075 c->scache.linesz = 32;
1076 c->scache.ways = 4;
1077 c->scache.waybit = 0;
1078 c->scache.waysize = scache_size / (c->scache.ways);
1079 c->scache.sets = scache_size / (c->scache.linesz * c->scache.ways);
1080 pr_info("Unified secondary cache %ldkB %s, linesize %d bytes.\n",
1081 scache_size >> 10, way_string[c->scache.ways], c->scache.linesz);
1082
1083 c->options |= MIPS_CPU_INCLUSIVE_CACHES;
1084}
1085#endif
1086
1039extern int r5k_sc_init(void); 1087extern int r5k_sc_init(void);
1040extern int rm7k_sc_init(void); 1088extern int rm7k_sc_init(void);
1041extern int mips_sc_init(void); 1089extern int mips_sc_init(void);
@@ -1085,6 +1133,12 @@ static void __init setup_scache(void)
1085#endif 1133#endif
1086 return; 1134 return;
1087 1135
1136#if defined(CONFIG_CPU_LOONGSON2)
1137 case CPU_LOONGSON2:
1138 loongson2_sc_init();
1139 return;
1140#endif
1141
1088 default: 1142 default:
1089 if (c->isa_level == MIPS_CPU_ISA_M32R1 || 1143 if (c->isa_level == MIPS_CPU_ISA_M32R1 ||
1090 c->isa_level == MIPS_CPU_ISA_M32R2 || 1144 c->isa_level == MIPS_CPU_ISA_M32R2 ||
diff --git a/arch/mips/mm/c-sb1.c b/arch/mips/mm/c-sb1.c
index 9ea460b16b..6f9bd7fbd4 100644
--- a/arch/mips/mm/c-sb1.c
+++ b/arch/mips/mm/c-sb1.c
@@ -476,7 +476,7 @@ static __init void probe_cache_sizes(void)
476 * memory management function pointers, as well as initialize 476 * memory management function pointers, as well as initialize
477 * the caches and tlbs 477 * the caches and tlbs
478 */ 478 */
479void sb1_cache_init(void) 479void __init sb1_cache_init(void)
480{ 480{
481 extern char except_vec2_sb1; 481 extern char except_vec2_sb1;
482 482
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
index abf99b1eba..81f925a9a7 100644
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -6,6 +6,8 @@
6 * Copyright (C) 1994 - 2003, 07 by Ralf Baechle (ralf@linux-mips.org) 6 * Copyright (C) 1994 - 2003, 07 by Ralf Baechle (ralf@linux-mips.org)
7 * Copyright (C) 2007 MIPS Technologies, Inc. 7 * Copyright (C) 2007 MIPS Technologies, Inc.
8 */ 8 */
9#include <linux/fs.h>
10#include <linux/fcntl.h>
9#include <linux/init.h> 11#include <linux/init.h>
10#include <linux/kernel.h> 12#include <linux/kernel.h>
11#include <linux/module.h> 13#include <linux/module.h>
@@ -164,3 +166,11 @@ void __init cpu_cache_init(void)
164 166
165 panic(cache_panic); 167 panic(cache_panic);
166} 168}
169
170int __weak __uncached_access(struct file *file, unsigned long addr)
171{
172 if (file->f_flags & O_SYNC)
173 return 1;
174
175 return addr >= __pa(high_memory);
176}
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
index 65160d4984..dcd6913dc1 100644
--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -48,6 +48,22 @@ extern void build_tlb_refill_handler(void);
48 48
49#endif /* CONFIG_MIPS_MT_SMTC */ 49#endif /* CONFIG_MIPS_MT_SMTC */
50 50
51#if defined(CONFIG_CPU_LOONGSON2)
52/*
53 * LOONGSON2 has a 4 entry itlb which is a subset of dtlb,
54 * unfortrunately, itlb is not totally transparent to software.
55 */
56#define FLUSH_ITLB write_c0_diag(4);
57
58#define FLUSH_ITLB_VM(vma) { if ((vma)->vm_flags & VM_EXEC) write_c0_diag(4); }
59
60#else
61
62#define FLUSH_ITLB
63#define FLUSH_ITLB_VM(vma)
64
65#endif
66
51void local_flush_tlb_all(void) 67void local_flush_tlb_all(void)
52{ 68{
53 unsigned long flags; 69 unsigned long flags;
@@ -73,6 +89,7 @@ void local_flush_tlb_all(void)
73 } 89 }
74 tlbw_use_hazard(); 90 tlbw_use_hazard();
75 write_c0_entryhi(old_ctx); 91 write_c0_entryhi(old_ctx);
92 FLUSH_ITLB;
76 EXIT_CRITICAL(flags); 93 EXIT_CRITICAL(flags);
77} 94}
78 95
@@ -136,6 +153,7 @@ void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
136 } else { 153 } else {
137 drop_mmu_context(mm, cpu); 154 drop_mmu_context(mm, cpu);
138 } 155 }
156 FLUSH_ITLB;
139 EXIT_CRITICAL(flags); 157 EXIT_CRITICAL(flags);
140 } 158 }
141} 159}
@@ -178,6 +196,7 @@ void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
178 } else { 196 } else {
179 local_flush_tlb_all(); 197 local_flush_tlb_all();
180 } 198 }
199 FLUSH_ITLB;
181 EXIT_CRITICAL(flags); 200 EXIT_CRITICAL(flags);
182} 201}
183 202
@@ -210,6 +229,7 @@ void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
210 229
211 finish: 230 finish:
212 write_c0_entryhi(oldpid); 231 write_c0_entryhi(oldpid);
232 FLUSH_ITLB_VM(vma);
213 EXIT_CRITICAL(flags); 233 EXIT_CRITICAL(flags);
214 } 234 }
215} 235}
@@ -241,7 +261,7 @@ void local_flush_tlb_one(unsigned long page)
241 tlbw_use_hazard(); 261 tlbw_use_hazard();
242 } 262 }
243 write_c0_entryhi(oldpid); 263 write_c0_entryhi(oldpid);
244 264 FLUSH_ITLB;
245 EXIT_CRITICAL(flags); 265 EXIT_CRITICAL(flags);
246} 266}
247 267
@@ -293,6 +313,7 @@ void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte)
293 else 313 else
294 tlb_write_indexed(); 314 tlb_write_indexed();
295 tlbw_use_hazard(); 315 tlbw_use_hazard();
316 FLUSH_ITLB_VM(vma);
296 EXIT_CRITICAL(flags); 317 EXIT_CRITICAL(flags);
297} 318}
298 319
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index e7149290d1..4ec0964b83 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -893,6 +893,7 @@ static __init void build_tlb_write_entry(u32 **p, struct label **l,
893 case CPU_4KSC: 893 case CPU_4KSC:
894 case CPU_20KC: 894 case CPU_20KC:
895 case CPU_25KF: 895 case CPU_25KF:
896 case CPU_LOONGSON2:
896 tlbw(p); 897 tlbw(p);
897 break; 898 break;
898 899
@@ -1276,7 +1277,8 @@ static void __init build_r4000_tlb_refill_handler(void)
1276 * need three, with the second nop'ed and the third being 1277 * need three, with the second nop'ed and the third being
1277 * unused. 1278 * unused.
1278 */ 1279 */
1279#ifdef CONFIG_32BIT 1280 /* Loongson2 ebase is different than r4k, we have more space */
1281#if defined(CONFIG_32BIT) || defined(CONFIG_CPU_LOONGSON2)
1280 if ((p - tlb_handler) > 64) 1282 if ((p - tlb_handler) > 64)
1281 panic("TLB refill handler space exceeded"); 1283 panic("TLB refill handler space exceeded");
1282#else 1284#else
@@ -1289,7 +1291,7 @@ static void __init build_r4000_tlb_refill_handler(void)
1289 /* 1291 /*
1290 * Now fold the handler in the TLB refill handler space. 1292 * Now fold the handler in the TLB refill handler space.
1291 */ 1293 */
1292#ifdef CONFIG_32BIT 1294#if defined(CONFIG_32BIT) || defined(CONFIG_CPU_LOONGSON2)
1293 f = final_handler; 1295 f = final_handler;
1294 /* Simplest case, just copy the handler. */ 1296 /* Simplest case, just copy the handler. */
1295 copy_handler(relocs, labels, tlb_handler, p, f); 1297 copy_handler(relocs, labels, tlb_handler, p, f);
@@ -1336,7 +1338,7 @@ static void __init build_r4000_tlb_refill_handler(void)
1336 final_len); 1338 final_len);
1337 1339
1338 f = final_handler; 1340 f = final_handler;
1339#ifdef CONFIG_64BIT 1341#if defined(CONFIG_64BIT) && !defined(CONFIG_CPU_LOONGSON2)
1340 if (final_len > 32) 1342 if (final_len > 32)
1341 final_len = 64; 1343 final_len = 64;
1342 else 1344 else
diff --git a/arch/mips/momentum/ocelot_3/Makefile b/arch/mips/momentum/ocelot_3/Makefile
deleted file mode 100644
index d5a090a85a..0000000000
--- a/arch/mips/momentum/ocelot_3/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
1#
2# Makefile for Momentum Computer's Ocelot-3 board.
3#
4# Note! Dependencies are done automagically by 'make dep', which also
5# removes any old dependencies. DON'T put your own dependencies here
6# unless it's something special (ie not a .c file).
7#
8obj-y += irq.o platform.o prom.o reset.o setup.o
diff --git a/arch/mips/momentum/ocelot_3/irq.c b/arch/mips/momentum/ocelot_3/irq.c
deleted file mode 100644
index 3862d1d1ad..0000000000
--- a/arch/mips/momentum/ocelot_3/irq.c
+++ /dev/null
@@ -1,109 +0,0 @@
1/*
2 * Copyright (C) 2000 RidgeRun, Inc.
3 * Author: RidgeRun, Inc.
4 * glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.com
5 *
6 * Copyright 2001 MontaVista Software Inc.
7 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
8 * Copyright (C) 2000, 2001 Ralf Baechle (ralf@gnu.org)
9 *
10 * Copyright 2004 PMC-Sierra
11 * Author: Manish Lachwani (lachwani@pmc-sierra.com)
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version.
17 *
18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
19 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
21 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
24 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * You should have received a copy of the GNU General Public License along
30 * with this program; if not, write to the Free Software Foundation, Inc.,
31 * 675 Mass Ave, Cambridge, MA 02139, USA.
32 *
33 * Copyright (C) 2004 MontaVista Software Inc.
34 * Author: Manish Lachwani, mlachwani@mvista.com
35 *
36 */
37#include <linux/errno.h>
38#include <linux/init.h>
39#include <linux/kernel_stat.h>
40#include <linux/module.h>
41#include <linux/signal.h>
42#include <linux/sched.h>
43#include <linux/types.h>
44#include <linux/interrupt.h>
45#include <linux/ioport.h>
46#include <linux/timex.h>
47#include <linux/slab.h>
48#include <linux/random.h>
49#include <asm/bitops.h>
50#include <asm/bootinfo.h>
51#include <asm/io.h>
52#include <asm/irq.h>
53#include <asm/mipsregs.h>
54#include <asm/system.h>
55
56static struct irqaction cascade_mv64340 = {
57 no_action, IRQF_DISABLED, CPU_MASK_NONE, "MV64340-Cascade", NULL, NULL
58};
59
60void __init arch_init_irq(void)
61{
62 /*
63 * Clear all of the interrupts while we change the able around a bit.
64 * int-handler is not on bootstrap
65 */
66 clear_c0_status(ST0_IM | ST0_BEV);
67
68 rm7k_cpu_irq_init();
69
70 /* set up the cascading interrupts */
71 setup_irq(8, &cascade_mv64340); /* unmask intControl IM8, IRQ 9 */
72 mv64340_irq_init(16);
73
74 set_c0_status(ST0_IM); /* IE in the status register */
75
76}
77
78asmlinkage void plat_irq_dispatch(void)
79{
80 unsigned int pending = read_c0_cause() & read_c0_status();
81
82 if (pending & STATUSF_IP0)
83 do_IRQ(0);
84 else if (pending & STATUSF_IP1)
85 do_IRQ(1);
86 else if (pending & STATUSF_IP2)
87 do_IRQ(2);
88 else if (pending & STATUSF_IP3)
89 do_IRQ(3);
90 else if (pending & STATUSF_IP4)
91 do_IRQ(4);
92 else if (pending & STATUSF_IP5)
93 do_IRQ(5);
94 else if (pending & STATUSF_IP6)
95 do_IRQ(6);
96 else if (pending & STATUSF_IP7)
97 do_IRQ(7);
98 else {
99 /*
100 * Now look at the extended interrupts
101 */
102 pending = (read_c0_cause() & (read_c0_intcontrol() << 8)) >> 16;
103
104 if (pending & STATUSF_IP8)
105 ll_mv64340_irq();
106 else
107 spurious_interrupt();
108 }
109}
diff --git a/arch/mips/momentum/ocelot_3/platform.c b/arch/mips/momentum/ocelot_3/platform.c
deleted file mode 100644
index 44e4c3fc74..0000000000
--- a/arch/mips/momentum/ocelot_3/platform.c
+++ /dev/null
@@ -1,208 +0,0 @@
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 "ocelot_3_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 struct mv643xx_eth_platform_data eth0_pd = {
51 .port_number = 0,
52
53 .tx_sram_addr = MV_SRAM_BASE_ETH0,
54 .tx_sram_size = MV_SRAM_TXRING_SIZE,
55 .tx_queue_size = MV_SRAM_TXRING_SIZE / 16,
56
57 .rx_sram_addr = MV_SRAM_BASE_ETH0 + MV_SRAM_TXRING_SIZE,
58 .rx_sram_size = MV_SRAM_RXRING_SIZE,
59 .rx_queue_size = MV_SRAM_RXRING_SIZE / 16,
60};
61
62static struct platform_device eth0_device = {
63 .name = MV643XX_ETH_NAME,
64 .id = 0,
65 .num_resources = ARRAY_SIZE(mv64x60_eth0_resources),
66 .resource = mv64x60_eth0_resources,
67 .dev = {
68 .platform_data = &eth0_pd,
69 },
70};
71
72static struct resource mv64x60_eth1_resources[] = {
73 [0] = {
74 .name = "eth1 irq",
75 .start = MV64x60_IRQ_ETH_1,
76 .end = MV64x60_IRQ_ETH_1,
77 .flags = IORESOURCE_IRQ,
78 },
79};
80
81static struct mv643xx_eth_platform_data eth1_pd = {
82 .port_number = 1,
83
84 .tx_sram_addr = MV_SRAM_BASE_ETH1,
85 .tx_sram_size = MV_SRAM_TXRING_SIZE,
86 .tx_queue_size = MV_SRAM_TXRING_SIZE / 16,
87
88 .rx_sram_addr = MV_SRAM_BASE_ETH1 + MV_SRAM_TXRING_SIZE,
89 .rx_sram_size = MV_SRAM_RXRING_SIZE,
90 .rx_queue_size = MV_SRAM_RXRING_SIZE / 16,
91};
92
93static struct platform_device eth1_device = {
94 .name = MV643XX_ETH_NAME,
95 .id = 1,
96 .num_resources = ARRAY_SIZE(mv64x60_eth1_resources),
97 .resource = mv64x60_eth1_resources,
98 .dev = {
99 .platform_data = &eth1_pd,
100 },
101};
102
103static struct resource mv64x60_eth2_resources[] = {
104 [0] = {
105 .name = "eth2 irq",
106 .start = MV64x60_IRQ_ETH_2,
107 .end = MV64x60_IRQ_ETH_2,
108 .flags = IORESOURCE_IRQ,
109 },
110};
111
112static struct mv643xx_eth_platform_data eth2_pd = {
113 .port_number = 2,
114};
115
116static struct platform_device eth2_device = {
117 .name = MV643XX_ETH_NAME,
118 .id = 2,
119 .num_resources = ARRAY_SIZE(mv64x60_eth2_resources),
120 .resource = mv64x60_eth2_resources,
121 .dev = {
122 .platform_data = &eth2_pd,
123 },
124};
125
126static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
127 &mv643xx_eth_shared_device,
128 &eth0_device,
129 &eth1_device,
130 &eth2_device,
131};
132
133static u8 __init exchange_bit(u8 val, u8 cs)
134{
135 /* place the data */
136 OCELOT_FPGA_WRITE((val << 2) | cs, EEPROM_MODE);
137 udelay(1);
138
139 /* turn the clock on */
140 OCELOT_FPGA_WRITE((val << 2) | cs | 0x2, EEPROM_MODE);
141 udelay(1);
142
143 /* turn the clock off and read-strobe */
144 OCELOT_FPGA_WRITE((val << 2) | cs | 0x10, EEPROM_MODE);
145
146 /* return the data */
147 return (OCELOT_FPGA_READ(EEPROM_MODE) >> 3) & 0x1;
148}
149
150static void __init get_mac(char dest[6])
151{
152 u8 read_opcode[12] = {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
153 int i,j;
154
155 for (i = 0; i < 12; i++)
156 exchange_bit(read_opcode[i], 1);
157
158 for (j = 0; j < 6; j++) {
159 dest[j] = 0;
160 for (i = 0; i < 8; i++) {
161 dest[j] <<= 1;
162 dest[j] |= exchange_bit(0, 1);
163 }
164 }
165
166 /* turn off CS */
167 exchange_bit(0,0);
168}
169
170/*
171 * Copy and increment ethernet MAC address by a small value.
172 *
173 * This is useful for systems where the only one MAC address is stored in
174 * non-volatile memory for multiple ports.
175 */
176static inline void eth_mac_add(unsigned char *dst, unsigned char *src,
177 unsigned int add)
178{
179 int i;
180
181 BUG_ON(add >= 256);
182
183 for (i = ETH_ALEN; i >= 0; i--) {
184 dst[i] = src[i] + add;
185 add = dst[i] < src[i]; /* compute carry */
186 }
187
188 WARN_ON(add);
189}
190
191static int __init mv643xx_eth_add_pds(void)
192{
193 unsigned char mac[ETH_ALEN];
194 int ret;
195
196 get_mac(mac);
197 eth_mac_add(eth0_pd.mac_addr, mac, 0);
198 eth_mac_add(eth1_pd.mac_addr, mac, 1);
199 eth_mac_add(eth2_pd.mac_addr, mac, 2);
200 ret = platform_add_devices(mv643xx_eth_pd_devs,
201 ARRAY_SIZE(mv643xx_eth_pd_devs));
202
203 return ret;
204}
205
206device_initcall(mv643xx_eth_add_pds);
207
208#endif /* defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE) */
diff --git a/arch/mips/momentum/ocelot_3/prom.c b/arch/mips/momentum/ocelot_3/prom.c
deleted file mode 100644
index 8e02df6357..0000000000
--- a/arch/mips/momentum/ocelot_3/prom.c
+++ /dev/null
@@ -1,189 +0,0 @@
1/*
2 * Copyright 2002 Momentum Computer Inc.
3 * Author: Matthew Dharm <mdharm@momenco.com>
4 *
5 * Louis Hamilton, Red Hat, Inc.
6 * hamilton@redhat.com [MIPS64 modifications]
7 *
8 * Copyright 2004 PMC-Sierra
9 * Author: Manish Lachwani (lachwani@pmc-sierra.com)
10 *
11 * Based on Ocelot Linux port, which is
12 * Copyright 2001 MontaVista Software Inc.
13 * Author: jsun@mvista.com or jsun@junsun.net
14 *
15 * This program is free software; you can redistribute it and/or modify it
16 * under the terms of the GNU General Public License as published by the
17 * Free Software Foundation; either version 2 of the License, or (at your
18 * option) any later version.
19 *
20 * Copyright (C) 2004 MontaVista Software Inc.
21 * Author: Manish Lachwani, mlachwani@mvista.com
22 *
23 */
24#include <linux/init.h>
25#include <linux/bootmem.h>
26#include <linux/mv643xx.h>
27
28#include <asm/addrspace.h>
29#include <asm/bootinfo.h>
30#include <asm/pmon.h>
31#include "ocelot_3_fpga.h"
32
33struct callvectors* debug_vectors;
34extern unsigned long marvell_base;
35extern unsigned long cpu_clock;
36
37const char *get_system_type(void)
38{
39 return "Momentum Ocelot-3";
40}
41
42#ifdef CONFIG_64BIT
43
44unsigned long signext(unsigned long addr)
45{
46 addr &= 0xffffffff;
47 return (unsigned long)((int)addr);
48}
49
50void *get_arg(unsigned long args, int arc)
51{
52 unsigned long ul;
53 unsigned char *puc, uc;
54
55 args += (arc * 4);
56 ul = (unsigned long)signext(args);
57 puc = (unsigned char *)ul;
58 if (puc == 0)
59 return (void *)0;
60
61#ifdef CONFIG_CPU_LITTLE_ENDIAN
62 uc = *puc++;
63 ul = (unsigned long)uc;
64 uc = *puc++;
65 ul |= (((unsigned long)uc) << 8);
66 uc = *puc++;
67 ul |= (((unsigned long)uc) << 16);
68 uc = *puc++;
69 ul |= (((unsigned long)uc) << 24);
70#else /* CONFIG_CPU_LITTLE_ENDIAN */
71 uc = *puc++;
72 ul = ((unsigned long)uc) << 24;
73 uc = *puc++;
74 ul |= (((unsigned long)uc) << 16);
75 uc = *puc++;
76 ul |= (((unsigned long)uc) << 8);
77 uc = *puc++;
78 ul |= ((unsigned long)uc);
79#endif /* CONFIG_CPU_LITTLE_ENDIAN */
80 ul = signext(ul);
81 return (void *)ul;
82}
83
84char *arg64(unsigned long addrin, int arg_index)
85{
86 unsigned long args;
87 char *p;
88
89 args = signext(addrin);
90 p = (char *)get_arg(args, arg_index);
91
92 return p;
93}
94#endif /* CONFIG_64BIT */
95
96void __init prom_init(void)
97{
98 int argc = fw_arg0;
99 char **arg = (char **) fw_arg1;
100 char **env = (char **) fw_arg2;
101 struct callvectors *cv = (struct callvectors *) fw_arg3;
102 int i;
103
104#ifdef CONFIG_64BIT
105 char *ptr;
106 printk("prom_init - MIPS64\n");
107
108 /* save the PROM vectors for debugging use */
109 debug_vectors = (struct callvectors *)signext((unsigned long)cv);
110
111 /* arg[0] is "g", the rest is boot parameters */
112 arcs_cmdline[0] = '\0';
113
114 for (i = 1; i < argc; i++) {
115 ptr = (char *)arg64((unsigned long)arg, i);
116 if ((strlen(arcs_cmdline) + strlen(ptr) + 1) >=
117 sizeof(arcs_cmdline))
118 break;
119 strcat(arcs_cmdline, ptr);
120 strcat(arcs_cmdline, " ");
121 }
122 i = 0;
123
124 while (1) {
125 ptr = (char *)arg64((unsigned long)env, i);
126 if (! ptr)
127 break;
128
129 if (strncmp("gtbase", ptr, strlen("gtbase")) == 0) {
130 marvell_base = simple_strtol(ptr + strlen("gtbase="),
131 NULL, 16);
132
133 if ((marvell_base & 0xffffffff00000000) == 0)
134 marvell_base |= 0xffffffff00000000;
135
136 printk("marvell_base set to 0x%016lx\n", marvell_base);
137 }
138 if (strncmp("cpuclock", ptr, strlen("cpuclock")) == 0) {
139 cpu_clock = simple_strtol(ptr + strlen("cpuclock="),
140 NULL, 10);
141 printk("cpu_clock set to %d\n", cpu_clock);
142 }
143 i++;
144 }
145 printk("arcs_cmdline: %s\n", arcs_cmdline);
146
147#else /* CONFIG_64BIT */
148
149 /* save the PROM vectors for debugging use */
150 debug_vectors = cv;
151
152 /* arg[0] is "g", the rest is boot parameters */
153 arcs_cmdline[0] = '\0';
154 for (i = 1; i < argc; i++) {
155 if (strlen(arcs_cmdline) + strlen(arg[i] + 1)
156 >= sizeof(arcs_cmdline))
157 break;
158 strcat(arcs_cmdline, arg[i]);
159 strcat(arcs_cmdline, " ");
160 }
161
162 while (*env) {
163 if (strncmp("gtbase", *env, strlen("gtbase")) == 0) {
164 marvell_base = simple_strtol(*env + strlen("gtbase="),
165 NULL, 16);
166 }
167 if (strncmp("cpuclock", *env, strlen("cpuclock")) == 0) {
168 cpu_clock = simple_strtol(*env + strlen("cpuclock="),
169 NULL, 10);
170 }
171 env++;
172 }
173#endif /* CONFIG_64BIT */
174
175 mips_machgroup = MACH_GROUP_MOMENCO;
176 mips_machtype = MACH_MOMENCO_OCELOT_3;
177
178#ifndef CONFIG_64BIT
179 debug_vectors->printf("Booting Linux kernel...\n");
180#endif
181}
182
183void __init prom_free_prom_memory(void)
184{
185}
186
187void __init prom_fixup_mem_map(unsigned long start, unsigned long end)
188{
189}
diff --git a/arch/mips/momentum/ocelot_3/reset.c b/arch/mips/momentum/ocelot_3/reset.c
deleted file mode 100644
index 9d86d24683..0000000000
--- a/arch/mips/momentum/ocelot_3/reset.c
+++ /dev/null
@@ -1,59 +0,0 @@
1/*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; either version 2 of the License, or (at your
5 * option) any later version.
6 *
7 * Copyright (C) 1997, 01, 05 Ralf Baechle
8 * Copyright 2001 MontaVista Software Inc.
9 * Author: jsun@mvista.com or jsun@junsun.net
10 *
11 * Copyright (C) 2002 Momentum Computer Inc.
12 * Author: Matthew Dharm <mdharm@momenco.com>
13 *
14 * Louis Hamilton, Red Hat, Inc.
15 * hamilton@redhat.com [MIPS64 modifications]
16 *
17 * Copyright 2004 PMC-Sierra
18 * Author: Manish Lachwani (lachwani@pmc-sierra.com)
19 *
20 * Copyright (C) 2004 MontaVista Software Inc.
21 * Author: Manish Lachwani, mlachwani@mvista.com
22 */
23#include <linux/sched.h>
24#include <linux/mm.h>
25#include <linux/delay.h>
26#include <asm/io.h>
27#include <asm/pgtable.h>
28#include <asm/processor.h>
29#include <asm/reboot.h>
30#include <asm/system.h>
31
32void momenco_ocelot_restart(char *command)
33{
34 /* base address of timekeeper portion of part */
35 void *nvram = (void *) 0xfc807000L;
36
37 /* Ask the NVRAM/RTC/watchdog chip to assert reset in 1/16 second */
38 writeb(0x84, nvram + 0xff7);
39
40 /* wait for the watchdog to go off */
41 mdelay(100+(1000/16));
42
43 /* if the watchdog fails for some reason, let people know */
44 printk(KERN_NOTICE "Watchdog reset failed\n");
45}
46
47void momenco_ocelot_halt(void)
48{
49 printk(KERN_NOTICE "\n** You can safely turn off the power\n");
50 while (1)
51 __asm__(".set\tmips3\n\t"
52 "wait\n\t"
53 ".set\tmips0");
54}
55
56void momenco_ocelot_power_off(void)
57{
58 momenco_ocelot_halt();
59}
diff --git a/arch/mips/momentum/ocelot_3/setup.c b/arch/mips/momentum/ocelot_3/setup.c
deleted file mode 100644
index ff0829f811..0000000000
--- a/arch/mips/momentum/ocelot_3/setup.c
+++ /dev/null
@@ -1,398 +0,0 @@
1/*
2 * setup.c
3 *
4 * BRIEF MODULE DESCRIPTION
5 * Momentum Computer Ocelot-3 board dependent boot routines
6 *
7 * Copyright (C) 1996, 1997, 01, 05 - 06 Ralf Baechle
8 * Copyright (C) 2000 RidgeRun, Inc.
9 * Copyright (C) 2001 Red Hat, Inc.
10 * Copyright (C) 2002 Momentum Computer
11 *
12 * Author: Matthew Dharm, Momentum Computer
13 * mdharm@momenco.com
14 *
15 * Louis Hamilton, Red Hat, Inc.
16 * hamilton@redhat.com [MIPS64 modifications]
17 *
18 * Author: RidgeRun, Inc.
19 * glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.com
20 *
21 * Copyright 2001 MontaVista Software Inc.
22 * Author: jsun@mvista.com or jsun@junsun.net
23 *
24 * Copyright 2004 PMC-Sierra
25 * Author: Manish Lachwani (lachwani@pmc-sierra.com)
26 *
27 * Copyright (C) 2004 MontaVista Software Inc.
28 * Author: Manish Lachwani, mlachwani@mvista.com
29 *
30 * This program is free software; you can redistribute it and/or modify it
31 * under the terms of the GNU General Public License as published by the
32 * Free Software Foundation; either version 2 of the License, or (at your
33 * option) any later version.
34 *
35 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
36 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
37 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
38 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
39 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
40 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
41 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
42 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
43 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
44 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45 *
46 * You should have received a copy of the GNU General Public License along
47 * with this program; if not, write to the Free Software Foundation, Inc.,
48 * 675 Mass Ave, Cambridge, MA 02139, USA.
49 */
50#include <linux/init.h>
51#include <linux/kernel.h>
52#include <linux/types.h>
53#include <linux/mc146818rtc.h>
54#include <linux/ioport.h>
55#include <linux/interrupt.h>
56#include <linux/pci.h>
57#include <linux/timex.h>
58#include <linux/bootmem.h>
59#include <linux/mv643xx.h>
60#include <linux/pm.h>
61#include <linux/bcd.h>
62
63#include <asm/time.h>
64#include <asm/page.h>
65#include <asm/bootinfo.h>
66#include <asm/io.h>
67#include <asm/irq.h>
68#include <asm/pci.h>
69#include <asm/processor.h>
70#include <asm/reboot.h>
71#include <asm/mc146818rtc.h>
72#include <asm/tlbflush.h>
73#include "ocelot_3_fpga.h"
74
75/* Marvell Discovery Register Base */
76unsigned long marvell_base = (signed)0xf4000000;
77
78/* CPU clock */
79unsigned long cpu_clock;
80
81/* RTC/NVRAM */
82unsigned char* rtc_base = (unsigned char*)(signed)0xfc800000;
83
84/* FPGA Base */
85unsigned long ocelot_fpga_base = (signed)0xfc000000;
86
87/* Serial base */
88unsigned long uart_base = (signed)0xfd000000;
89
90/*
91 * Marvell Discovery SRAM. This is one place where Ethernet
92 * Tx and Rx descriptors can be placed to improve performance
93 */
94extern unsigned long mv64340_sram_base;
95
96/* These functions are used for rebooting or halting the machine*/
97extern void momenco_ocelot_restart(char *command);
98extern void momenco_ocelot_halt(void);
99extern void momenco_ocelot_power_off(void);
100
101void momenco_time_init(void);
102static char reset_reason;
103
104void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
105 unsigned long entryhi, unsigned long pagemask);
106
107static inline unsigned long ENTRYLO(unsigned long paddr)
108{
109 return ((paddr & PAGE_MASK) |
110 (_PAGE_PRESENT | __READABLE | __WRITEABLE | _PAGE_GLOBAL |
111 _CACHE_UNCACHED)) >> 6;
112}
113
114void __init bus_error_init(void)
115{
116 /* nothing */
117}
118
119/*
120 * setup code for a handoff from a version 2 PMON 2000 PROM
121 */
122void setup_wired_tlb_entries(void)
123{
124 write_c0_wired(0);
125 local_flush_tlb_all();
126
127 /* marvell and extra space */
128 add_wired_entry(ENTRYLO(0xf4000000), ENTRYLO(0xf4010000), (signed)0xf4000000, PM_64K);
129
130 /* fpga, rtc, and uart */
131 add_wired_entry(ENTRYLO(0xfc000000), ENTRYLO(0xfd000000), (signed)0xfc000000, PM_16M);
132}
133
134unsigned long m48t37y_get_time(void)
135{
136 unsigned int year, month, day, hour, min, sec;
137 unsigned long flags;
138
139 spin_lock_irqsave(&rtc_lock, flags);
140 /* stop the update */
141 rtc_base[0x7ff8] = 0x40;
142
143 year = BCD2BIN(rtc_base[0x7fff]);
144 year += BCD2BIN(rtc_base[0x7ff1]) * 100;
145
146 month = BCD2BIN(rtc_base[0x7ffe]);
147
148 day = BCD2BIN(rtc_base[0x7ffd]);
149
150 hour = BCD2BIN(rtc_base[0x7ffb]);
151 min = BCD2BIN(rtc_base[0x7ffa]);
152 sec = BCD2BIN(rtc_base[0x7ff9]);
153
154 /* start the update */
155 rtc_base[0x7ff8] = 0x00;
156 spin_unlock_irqrestore(&rtc_lock, flags);
157
158 return mktime(year, month, day, hour, min, sec);
159}
160
161int m48t37y_set_time(unsigned long sec)
162{
163 struct rtc_time tm;
164 unsigned long flags;
165
166 /* convert to a more useful format -- note months count from 0 */
167 to_tm(sec, &tm);
168 tm.tm_mon += 1;
169
170 spin_lock_irqsave(&rtc_lock, flags);
171 /* enable writing */
172 rtc_base[0x7ff8] = 0x80;
173
174 /* year */
175 rtc_base[0x7fff] = BIN2BCD(tm.tm_year % 100);
176 rtc_base[0x7ff1] = BIN2BCD(tm.tm_year / 100);
177
178 /* month */
179 rtc_base[0x7ffe] = BIN2BCD(tm.tm_mon);
180
181 /* day */
182 rtc_base[0x7ffd] = BIN2BCD(tm.tm_mday);
183
184 /* hour/min/sec */
185 rtc_base[0x7ffb] = BIN2BCD(tm.tm_hour);
186 rtc_base[0x7ffa] = BIN2BCD(tm.tm_min);
187 rtc_base[0x7ff9] = BIN2BCD(tm.tm_sec);
188
189 /* day of week -- not really used, but let's keep it up-to-date */
190 rtc_base[0x7ffc] = BIN2BCD(tm.tm_wday + 1);
191
192 /* disable writing */
193 rtc_base[0x7ff8] = 0x00;
194 spin_unlock_irqrestore(&rtc_lock, flags);
195
196 return 0;
197}
198
199void __init plat_timer_setup(struct irqaction *irq)
200{
201 setup_irq(7, irq); /* Timer interrupt, unmask status IM7 */
202}
203
204void momenco_time_init(void)
205{
206 setup_wired_tlb_entries();
207
208 /*
209 * Ocelot-3 board has been built with both
210 * the Rm7900 and the Rm7065C
211 */
212 mips_hpt_frequency = cpu_clock / 2;
213
214 rtc_mips_get_time = m48t37y_get_time;
215 rtc_mips_set_time = m48t37y_set_time;
216}
217
218/*
219 * PCI Support for Ocelot-3
220 */
221
222/* Bus #0 IO and MEM space */
223#define OCELOT_3_PCI_IO_0_START 0xe0000000
224#define OCELOT_3_PCI_IO_0_SIZE 0x08000000
225#define OCELOT_3_PCI_MEM_0_START 0xc0000000
226#define OCELOT_3_PCI_MEM_0_SIZE 0x10000000
227
228/* Bus #1 IO and MEM space */
229#define OCELOT_3_PCI_IO_1_START 0xe8000000
230#define OCELOT_3_PCI_IO_1_SIZE 0x08000000
231#define OCELOT_3_PCI_MEM_1_START 0xd0000000
232#define OCELOT_3_PCI_MEM_1_SIZE 0x10000000
233
234static struct resource mv_pci_io_mem0_resource = {
235 .name = "MV64340 PCI0 IO MEM",
236 .start = OCELOT_3_PCI_IO_0_START,
237 .end = OCELOT_3_PCI_IO_0_START + OCELOT_3_PCI_IO_0_SIZE - 1,
238 .flags = IORESOURCE_IO,
239};
240
241static struct resource mv_pci_io_mem1_resource = {
242 .name = "MV64340 PCI1 IO MEM",
243 .start = OCELOT_3_PCI_IO_1_START,
244 .end = OCELOT_3_PCI_IO_1_START + OCELOT_3_PCI_IO_1_SIZE - 1,
245 .flags = IORESOURCE_IO,
246};
247
248static struct resource mv_pci_mem0_resource = {
249 .name = "MV64340 PCI0 MEM",
250 .start = OCELOT_3_PCI_MEM_0_START,
251 .end = OCELOT_3_PCI_MEM_0_START + OCELOT_3_PCI_MEM_0_SIZE - 1,
252 .flags = IORESOURCE_MEM,
253};
254
255static struct resource mv_pci_mem1_resource = {
256 .name = "MV64340 PCI1 MEM",
257 .start = OCELOT_3_PCI_MEM_1_START,
258 .end = OCELOT_3_PCI_MEM_1_START + OCELOT_3_PCI_MEM_1_SIZE - 1,
259 .flags = IORESOURCE_MEM,
260};
261
262static struct mv_pci_controller mv_bus0_controller = {
263 .pcic = {
264 .pci_ops = &mv_pci_ops,
265 .mem_resource = &mv_pci_mem0_resource,
266 .io_resource = &mv_pci_io_mem0_resource,
267 },
268 .config_addr = MV64340_PCI_0_CONFIG_ADDR,
269 .config_vreg = MV64340_PCI_0_CONFIG_DATA_VIRTUAL_REG,
270};
271
272static struct mv_pci_controller mv_bus1_controller = {
273 .pcic = {
274 .pci_ops = &mv_pci_ops,
275 .mem_resource = &mv_pci_mem1_resource,
276 .io_resource = &mv_pci_io_mem1_resource,
277 },
278 .config_addr = MV64340_PCI_1_CONFIG_ADDR,
279 .config_vreg = MV64340_PCI_1_CONFIG_DATA_VIRTUAL_REG,
280};
281
282static __init int __init ja_pci_init(void)
283{
284 uint32_t enable;
285 extern int pci_probe_only;
286
287 /* PMON will assign PCI resources */
288 pci_probe_only = 1;
289
290 enable = ~MV_READ(MV64340_BASE_ADDR_ENABLE);
291 /*
292 * We require at least one enabled I/O or PCI memory window or we
293 * will ignore this PCI bus. We ignore PCI windows 1, 2 and 3.
294 */
295 if (enable & (0x01 << 9) || enable & (0x01 << 10))
296 register_pci_controller(&mv_bus0_controller.pcic);
297
298 if (enable & (0x01 << 14) || enable & (0x01 << 15))
299 register_pci_controller(&mv_bus1_controller.pcic);
300
301 ioport_resource.end = OCELOT_3_PCI_IO_0_START + OCELOT_3_PCI_IO_0_SIZE +
302 OCELOT_3_PCI_IO_1_SIZE - 1;
303
304 iomem_resource.end = OCELOT_3_PCI_MEM_0_START + OCELOT_3_PCI_MEM_0_SIZE +
305 OCELOT_3_PCI_MEM_1_SIZE - 1;
306
307 set_io_port_base(OCELOT_3_PCI_IO_0_START); /* mips_io_port_base */
308
309 return 0;
310}
311
312arch_initcall(ja_pci_init);
313
314void __init plat_mem_setup(void)
315{
316 unsigned int tmpword;
317
318 board_time_init = momenco_time_init;
319
320 _machine_restart = momenco_ocelot_restart;
321 _machine_halt = momenco_ocelot_halt;
322 pm_power_off = momenco_ocelot_power_off;
323
324 /* Wired TLB entries */
325 setup_wired_tlb_entries();
326
327 /* shut down ethernet ports, just to be sure our memory doesn't get
328 * corrupted by random ethernet traffic.
329 */
330 MV_WRITE(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(0), 0xff << 8);
331 MV_WRITE(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(1), 0xff << 8);
332 MV_WRITE(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(0), 0xff << 8);
333 MV_WRITE(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(1), 0xff << 8);
334 do {}
335 while (MV_READ(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(0)) & 0xff);
336 do {}
337 while (MV_READ(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(1)) & 0xff);
338 do {}
339 while (MV_READ(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(0)) & 0xff);
340 do {}
341 while (MV_READ(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(1)) & 0xff);
342 MV_WRITE(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(0),
343 MV_READ(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(0)) & ~1);
344 MV_WRITE(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(1),
345 MV_READ(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(1)) & ~1);
346
347 /* Turn off the Bit-Error LED */
348 OCELOT_FPGA_WRITE(0x80, CLR);
349
350 tmpword = OCELOT_FPGA_READ(BOARDREV);
351 if (tmpword < 26)
352 printk("Momenco Ocelot-3: Board Assembly Rev. %c\n",
353 'A'+tmpword);
354 else
355 printk("Momenco Ocelot-3: Board Assembly Revision #0x%x\n",
356 tmpword);
357
358 tmpword = OCELOT_FPGA_READ(FPGA_REV);
359 printk("FPGA Rev: %d.%d\n", tmpword>>4, tmpword&15);
360 tmpword = OCELOT_FPGA_READ(RESET_STATUS);
361 printk("Reset reason: 0x%x\n", tmpword);
362 switch (tmpword) {
363 case 0x1:
364 printk(" - Power-up reset\n");
365 break;
366 case 0x2:
367 printk(" - Push-button reset\n");
368 break;
369 case 0x4:
370 printk(" - cPCI bus reset\n");
371 break;
372 case 0x8:
373 printk(" - Watchdog reset\n");
374 break;
375 case 0x10:
376 printk(" - Software reset\n");
377 break;
378 default:
379 printk(" - Unknown reset cause\n");
380 }
381 reset_reason = tmpword;
382 OCELOT_FPGA_WRITE(0xff, RESET_STATUS);
383
384 tmpword = OCELOT_FPGA_READ(CPCI_ID);
385 printk("cPCI ID register: 0x%02x\n", tmpword);
386 printk(" - Slot number: %d\n", tmpword & 0x1f);
387 printk(" - PCI bus present: %s\n", tmpword & 0x40 ? "yes" : "no");
388 printk(" - System Slot: %s\n", tmpword & 0x20 ? "yes" : "no");
389
390 tmpword = OCELOT_FPGA_READ(BOARD_STATUS);
391 printk("Board Status register: 0x%02x\n", tmpword);
392 printk(" - User jumper: %s\n", (tmpword & 0x80)?"installed":"absent");
393 printk(" - Boot flash write jumper: %s\n", (tmpword&0x40)?"installed":"absent");
394 printk(" - L3 cache size: %d MB\n", (1<<((tmpword&12) >> 2))&~1);
395
396 /* Support for 128 MB memory */
397 add_memory_region(0x0, 0x08000000, BOOT_MEM_RAM);
398}
diff --git a/arch/mips/momentum/ocelot_c/Makefile b/arch/mips/momentum/ocelot_c/Makefile
deleted file mode 100644
index d69161aa16..0000000000
--- a/arch/mips/momentum/ocelot_c/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
1#
2# Makefile for Momentum Computer's Ocelot-C and -CS boards.
3#
4
5obj-y += cpci-irq.o irq.o platform.o prom.o reset.o \
6 setup.o uart-irq.o
7
8obj-$(CONFIG_KGDB) += dbg_io.o
diff --git a/arch/mips/momentum/ocelot_c/cpci-irq.c b/arch/mips/momentum/ocelot_c/cpci-irq.c
deleted file mode 100644
index 186a140fd2..0000000000
--- a/arch/mips/momentum/ocelot_c/cpci-irq.c
+++ /dev/null
@@ -1,100 +0,0 @@
1/*
2 * Copyright 2002 Momentum Computer
3 * Author: mdharm@momenco.com
4 *
5 * arch/mips/momentum/ocelot_c/cpci-irq.c
6 * Interrupt routines for cpci. Interrupt numbers are assigned from
7 * CPCI_IRQ_BASE to CPCI_IRQ_BASE+8 (8 interrupt sources).
8 *
9 * Note that the high-level software will need to be careful about using
10 * these interrupts. If this board is asserting a cPCI interrupt, it will
11 * also see the asserted interrupt. Care must be taken to avoid an
12 * interrupt flood.
13 *
14 * This program is free software; you can redistribute it and/or modify it
15 * under the terms of the GNU General Public License as published by the
16 * Free Software Foundation; either version 2 of the License, or (at your
17 * option) any later version.
18 */
19
20#include <linux/module.h>
21#include <linux/interrupt.h>
22#include <linux/irq.h>
23#include <linux/kernel.h>
24#include <linux/sched.h>
25#include <linux/kernel_stat.h>
26#include <asm/io.h>
27#include "ocelot_c_fpga.h"
28
29#define CPCI_IRQ_BASE 8
30
31static inline int ls1bit8(unsigned int x)
32{
33 int b = 7, s;
34
35 s = 4; if (((unsigned char)(x << 4)) == 0) s = 0; b -= s; x <<= s;
36 s = 2; if (((unsigned char)(x << 2)) == 0) s = 0; b -= s; x <<= s;
37 s = 1; if (((unsigned char)(x << 1)) == 0) s = 0; b -= s;
38
39 return b;
40}
41
42/* mask off an interrupt -- 0 is enable, 1 is disable */
43static inline void mask_cpci_irq(unsigned int irq)
44{
45 uint32_t value;
46
47 value = OCELOT_FPGA_READ(INTMASK);
48 value |= 1 << (irq - CPCI_IRQ_BASE);
49 OCELOT_FPGA_WRITE(value, INTMASK);
50
51 /* read the value back to assure that it's really been written */
52 value = OCELOT_FPGA_READ(INTMASK);
53}
54
55/* unmask an interrupt -- 0 is enable, 1 is disable */
56static inline void unmask_cpci_irq(unsigned int irq)
57{
58 uint32_t value;
59
60 value = OCELOT_FPGA_READ(INTMASK);
61 value &= ~(1 << (irq - CPCI_IRQ_BASE));
62 OCELOT_FPGA_WRITE(value, INTMASK);
63
64 /* read the value back to assure that it's really been written */
65 value = OCELOT_FPGA_READ(INTMASK);
66}
67
68/*
69 * Interrupt handler for interrupts coming from the FPGA chip.
70 * It could be built in ethernet ports etc...
71 */
72void ll_cpci_irq(void)
73{
74 unsigned int irq_src, irq_mask;
75
76 /* read the interrupt status registers */
77 irq_src = OCELOT_FPGA_READ(INTSTAT);
78 irq_mask = OCELOT_FPGA_READ(INTMASK);
79
80 /* mask for just the interrupts we want */
81 irq_src &= ~irq_mask;
82
83 do_IRQ(ls1bit8(irq_src) + CPCI_IRQ_BASE);
84}
85
86struct irq_chip cpci_irq_type = {
87 .name = "CPCI/FPGA",
88 .ack = mask_cpci_irq,
89 .mask = mask_cpci_irq,
90 .mask_ack = mask_cpci_irq,
91 .unmask = unmask_cpci_irq,
92};
93
94void cpci_irq_init(void)
95{
96 int i;
97
98 for (i = CPCI_IRQ_BASE; i < (CPCI_IRQ_BASE + 8); i++)
99 set_irq_chip_and_handler(i, &cpci_irq_type, handle_level_irq);
100}
diff --git a/arch/mips/momentum/ocelot_c/dbg_io.c b/arch/mips/momentum/ocelot_c/dbg_io.c
deleted file mode 100644
index 32d6fb4ee6..0000000000
--- a/arch/mips/momentum/ocelot_c/dbg_io.c
+++ /dev/null
@@ -1,121 +0,0 @@
1
2#include <asm/serial.h> /* For the serial port location and base baud */
3
4/* --- CONFIG --- */
5
6typedef unsigned char uint8;
7typedef unsigned int uint32;
8
9/* --- END OF CONFIG --- */
10
11#define UART16550_BAUD_2400 2400
12#define UART16550_BAUD_4800 4800
13#define UART16550_BAUD_9600 9600
14#define UART16550_BAUD_19200 19200
15#define UART16550_BAUD_38400 38400
16#define UART16550_BAUD_57600 57600
17#define UART16550_BAUD_115200 115200
18
19#define UART16550_PARITY_NONE 0
20#define UART16550_PARITY_ODD 0x08
21#define UART16550_PARITY_EVEN 0x18
22#define UART16550_PARITY_MARK 0x28
23#define UART16550_PARITY_SPACE 0x38
24
25#define UART16550_DATA_5BIT 0x0
26#define UART16550_DATA_6BIT 0x1
27#define UART16550_DATA_7BIT 0x2
28#define UART16550_DATA_8BIT 0x3
29
30#define UART16550_STOP_1BIT 0x0
31#define UART16550_STOP_2BIT 0x4
32
33/* ----------------------------------------------------- */
34
35/* === CONFIG === */
36
37/* [jsun] we use the second serial port for kdb */
38#define BASE OCELOT_SERIAL1_BASE
39#define MAX_BAUD OCELOT_BASE_BAUD
40
41/* === END OF CONFIG === */
42
43#define REG_OFFSET 4
44
45/* register offset */
46#define OFS_RCV_BUFFER 0
47#define OFS_TRANS_HOLD 0
48#define OFS_SEND_BUFFER 0
49#define OFS_INTR_ENABLE (1*REG_OFFSET)
50#define OFS_INTR_ID (2*REG_OFFSET)
51#define OFS_DATA_FORMAT (3*REG_OFFSET)
52#define OFS_LINE_CONTROL (3*REG_OFFSET)
53#define OFS_MODEM_CONTROL (4*REG_OFFSET)
54#define OFS_RS232_OUTPUT (4*REG_OFFSET)
55#define OFS_LINE_STATUS (5*REG_OFFSET)
56#define OFS_MODEM_STATUS (6*REG_OFFSET)
57#define OFS_RS232_INPUT (6*REG_OFFSET)
58#define OFS_SCRATCH_PAD (7*REG_OFFSET)
59
60#define OFS_DIVISOR_LSB (0*REG_OFFSET)
61#define OFS_DIVISOR_MSB (1*REG_OFFSET)
62
63
64/* memory-mapped read/write of the port */
65#define UART16550_READ(y) (*((volatile uint8*)(BASE + y)))
66#define UART16550_WRITE(y, z) ((*((volatile uint8*)(BASE + y))) = z)
67
68void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop)
69{
70 /* disable interrupts */
71 UART16550_WRITE(OFS_INTR_ENABLE, 0);
72
73 /* set up baud rate */
74 {
75 uint32 divisor;
76
77 /* set DIAB bit */
78 UART16550_WRITE(OFS_LINE_CONTROL, 0x80);
79
80 /* set divisor */
81 divisor = MAX_BAUD / baud;
82 UART16550_WRITE(OFS_DIVISOR_LSB, divisor & 0xff);
83 UART16550_WRITE(OFS_DIVISOR_MSB, (divisor & 0xff00) >> 8);
84
85 /* clear DIAB bit */
86 UART16550_WRITE(OFS_LINE_CONTROL, 0x0);
87 }
88
89 /* set data format */
90 UART16550_WRITE(OFS_DATA_FORMAT, data | parity | stop);
91}
92
93static int remoteDebugInitialized = 0;
94
95uint8 getDebugChar(void)
96{
97 if (!remoteDebugInitialized) {
98 remoteDebugInitialized = 1;
99 debugInit(UART16550_BAUD_38400,
100 UART16550_DATA_8BIT,
101 UART16550_PARITY_NONE, UART16550_STOP_1BIT);
102 }
103
104 while ((UART16550_READ(OFS_LINE_STATUS) & 0x1) == 0);
105 return UART16550_READ(OFS_RCV_BUFFER);
106}
107
108
109int putDebugChar(uint8 byte)
110{
111 if (!remoteDebugInitialized) {
112 remoteDebugInitialized = 1;
113 debugInit(UART16550_BAUD_38400,
114 UART16550_DATA_8BIT,
115 UART16550_PARITY_NONE, UART16550_STOP_1BIT);
116 }
117
118 while ((UART16550_READ(OFS_LINE_STATUS) & 0x20) == 0);
119 UART16550_WRITE(OFS_SEND_BUFFER, byte);
120 return 1;
121}
diff --git a/arch/mips/momentum/ocelot_c/irq.c b/arch/mips/momentum/ocelot_c/irq.c
deleted file mode 100644
index 844d566c9d..0000000000
--- a/arch/mips/momentum/ocelot_c/irq.c
+++ /dev/null
@@ -1,107 +0,0 @@
1/*
2 * Copyright (C) 2000 RidgeRun, Inc.
3 * Author: RidgeRun, Inc.
4 * glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.com
5 *
6 * Copyright 2001 MontaVista Software Inc.
7 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
8 * Copyright (C) 2000, 01, 05 Ralf Baechle (ralf@linux-mips.org)
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 *
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
16 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
18 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
21 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
22 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * You should have received a copy of the GNU General Public License along
27 * with this program; if not, write to the Free Software Foundation, Inc.,
28 * 675 Mass Ave, Cambridge, MA 02139, USA.
29 *
30 */
31#include <linux/errno.h>
32#include <linux/init.h>
33#include <linux/kernel_stat.h>
34#include <linux/module.h>
35#include <linux/signal.h>
36#include <linux/sched.h>
37#include <linux/types.h>
38#include <linux/interrupt.h>
39#include <linux/ioport.h>
40#include <linux/timex.h>
41#include <linux/slab.h>
42#include <linux/random.h>
43#include <linux/bitops.h>
44#include <linux/mv643xx.h>
45#include <asm/bootinfo.h>
46#include <asm/io.h>
47#include <asm/irq_cpu.h>
48#include <asm/mipsregs.h>
49#include <asm/system.h>
50
51extern void uart_irq_init(void);
52extern void cpci_irq_init(void);
53
54static struct irqaction cascade_fpga = {
55 no_action, IRQF_DISABLED, CPU_MASK_NONE, "cascade via FPGA", NULL, NULL
56};
57
58static struct irqaction cascade_mv64340 = {
59 no_action, IRQF_DISABLED, CPU_MASK_NONE, "cascade via MV64340", NULL, NULL
60};
61
62extern void ll_uart_irq(void);
63extern void ll_cpci_irq(void);
64
65asmlinkage void plat_irq_dispatch(void)
66{
67 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
68
69 if (pending & STATUSF_IP0)
70 do_IRQ(0);
71 else if (pending & STATUSF_IP1)
72 do_IRQ(1);
73 else if (pending & STATUSF_IP2)
74 do_IRQ(2);
75 else if (pending & STATUSF_IP3)
76 ll_uart_irq();
77 else if (pending & STATUSF_IP4)
78 do_IRQ(4);
79 else if (pending & STATUSF_IP5)
80 ll_cpci_irq();
81 else if (pending & STATUSF_IP6)
82 ll_mv64340_irq();
83 else if (pending & STATUSF_IP7)
84 do_IRQ(7);
85 else
86 spurious_interrupt();
87}
88
89void __init arch_init_irq(void)
90{
91 /*
92 * Clear all of the interrupts while we change the able around a bit.
93 * int-handler is not on bootstrap
94 */
95 clear_c0_status(ST0_IM);
96
97 mips_cpu_irq_init();
98
99 /* set up the cascading interrupts */
100 setup_irq(3, &cascade_fpga);
101 setup_irq(5, &cascade_fpga);
102 setup_irq(6, &cascade_mv64340);
103
104 mv64340_irq_init(16);
105 uart_irq_init();
106 cpci_irq_init();
107}
diff --git a/arch/mips/momentum/ocelot_c/platform.c b/arch/mips/momentum/ocelot_c/platform.c
deleted file mode 100644
index 7780aa0c65..0000000000
--- a/arch/mips/momentum/ocelot_c/platform.c
+++ /dev/null
@@ -1,183 +0,0 @@
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 "ocelot_c_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
40static struct resource mv64x60_eth0_resources[] = {
41 [0] = {
42 .name = "eth0 irq",
43 .start = MV64x60_IRQ_ETH_0,
44 .end = MV64x60_IRQ_ETH_0,
45 .flags = IORESOURCE_IRQ,
46 },
47};
48
49static struct mv643xx_eth_platform_data eth0_pd = {
50 .port_number = 0,
51
52 .tx_sram_addr = MV_SRAM_BASE_ETH0,
53 .tx_sram_size = MV_SRAM_TXRING_SIZE,
54 .tx_queue_size = MV_SRAM_TXRING_SIZE / 16,
55
56 .rx_sram_addr = MV_SRAM_BASE_ETH0 + MV_SRAM_TXRING_SIZE,
57 .rx_sram_size = MV_SRAM_RXRING_SIZE,
58 .rx_queue_size = MV_SRAM_RXRING_SIZE / 16,
59};
60
61static struct platform_device eth0_device = {
62 .name = MV643XX_ETH_NAME,
63 .id = 0,
64 .num_resources = ARRAY_SIZE(mv64x60_eth0_resources),
65 .resource = mv64x60_eth0_resources,
66 .dev = {
67 .platform_data = &eth0_pd,
68 },
69};
70
71static struct resource mv64x60_eth1_resources[] = {
72 [0] = {
73 .name = "eth1 irq",
74 .start = MV64x60_IRQ_ETH_1,
75 .end = MV64x60_IRQ_ETH_1,
76 .flags = IORESOURCE_IRQ,
77 },
78};
79
80static struct mv643xx_eth_platform_data eth1_pd = {
81 .port_number = 1,
82
83 .tx_sram_addr = MV_SRAM_BASE_ETH1,
84 .tx_sram_size = MV_SRAM_TXRING_SIZE,
85 .tx_queue_size = MV_SRAM_TXRING_SIZE / 16,
86
87 .rx_sram_addr = MV_SRAM_BASE_ETH1 + MV_SRAM_TXRING_SIZE,
88 .rx_sram_size = MV_SRAM_RXRING_SIZE,
89 .rx_queue_size = MV_SRAM_RXRING_SIZE / 16,
90};
91
92static struct platform_device eth1_device = {
93 .name = MV643XX_ETH_NAME,
94 .id = 1,
95 .num_resources = ARRAY_SIZE(mv64x60_eth1_resources),
96 .resource = mv64x60_eth1_resources,
97 .dev = {
98 .platform_data = &eth1_pd,
99 },
100};
101
102static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
103 &mv643xx_eth_shared_device,
104 &eth0_device,
105 &eth1_device,
106 /* The third port is not wired up on the Ocelot C */
107};
108
109static u8 __init exchange_bit(u8 val, u8 cs)
110{
111 /* place the data */
112 OCELOT_FPGA_WRITE((val << 2) | cs, EEPROM_MODE);
113 udelay(1);
114
115 /* turn the clock on */
116 OCELOT_FPGA_WRITE((val << 2) | cs | 0x2, EEPROM_MODE);
117 udelay(1);
118
119 /* turn the clock off and read-strobe */
120 OCELOT_FPGA_WRITE((val << 2) | cs | 0x10, EEPROM_MODE);
121
122 /* return the data */
123 return (OCELOT_FPGA_READ(EEPROM_MODE) >> 3) & 0x1;
124}
125
126static void __init get_mac(char dest[6])
127{
128 u8 read_opcode[12] = {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
129 int i,j;
130
131 for (i = 0; i < 12; i++)
132 exchange_bit(read_opcode[i], 1);
133
134 for (j = 0; j < 6; j++) {
135 dest[j] = 0;
136 for (i = 0; i < 8; i++) {
137 dest[j] <<= 1;
138 dest[j] |= exchange_bit(0, 1);
139 }
140 }
141
142 /* turn off CS */
143 exchange_bit(0,0);
144}
145
146/*
147 * Copy and increment ethernet MAC address by a small value.
148 *
149 * This is useful for systems where the only one MAC address is stored in
150 * non-volatile memory for multiple ports.
151 */
152static inline void eth_mac_add(unsigned char *dst, unsigned char *src,
153 unsigned int add)
154{
155 int i;
156
157 BUG_ON(add >= 256);
158
159 for (i = ETH_ALEN; i >= 0; i--) {
160 dst[i] = src[i] + add;
161 add = dst[i] < src[i]; /* compute carry */
162 }
163
164 WARN_ON(add);
165}
166
167static int __init mv643xx_eth_add_pds(void)
168{
169 unsigned char mac[ETH_ALEN];
170 int ret;
171
172 get_mac(mac);
173 eth_mac_add(eth0_pd.mac_addr, mac, 0);
174 eth_mac_add(eth1_pd.mac_addr, mac, 1);
175 ret = platform_add_devices(mv643xx_eth_pd_devs,
176 ARRAY_SIZE(mv643xx_eth_pd_devs));
177
178 return ret;
179}
180
181device_initcall(mv643xx_eth_add_pds);
182
183#endif /* defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE) */
diff --git a/arch/mips/momentum/ocelot_c/prom.c b/arch/mips/momentum/ocelot_c/prom.c
deleted file mode 100644
index b689ceea8c..0000000000
--- a/arch/mips/momentum/ocelot_c/prom.c
+++ /dev/null
@@ -1,183 +0,0 @@
1/*
2 * Copyright 2002 Momentum Computer Inc.
3 * Author: Matthew Dharm <mdharm@momenco.com>
4 *
5 * Louis Hamilton, Red Hat, Inc.
6 * hamilton@redhat.com [MIPS64 modifications]
7 *
8 * Based on Ocelot Linux port, which is
9 * Copyright 2001 MontaVista Software Inc.
10 * Author: jsun@mvista.com or jsun@junsun.net
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 */
17#include <linux/init.h>
18#include <linux/mm.h>
19#include <linux/sched.h>
20#include <linux/bootmem.h>
21#include <linux/mv643xx.h>
22
23#include <asm/addrspace.h>
24#include <asm/bootinfo.h>
25#include <asm/pmon.h>
26
27#include "ocelot_c_fpga.h"
28
29struct callvectors* debug_vectors;
30
31extern unsigned long marvell_base;
32extern unsigned int cpu_clock;
33
34const char *get_system_type(void)
35{
36#ifdef CONFIG_CPU_SR71000
37 return "Momentum Ocelot-CS";
38#else
39 return "Momentum Ocelot-C";
40#endif
41}
42
43#ifdef CONFIG_64BIT
44
45unsigned long signext(unsigned long addr)
46{
47 addr &= 0xffffffff;
48 return (unsigned long)((int)addr);
49}
50
51void *get_arg(unsigned long args, int arc)
52{
53 unsigned long ul;
54 unsigned char *puc, uc;
55
56 args += (arc * 4);
57 ul = (unsigned long)signext(args);
58 puc = (unsigned char *)ul;
59 if (puc == 0)
60 return (void *)0;
61
62#ifdef CONFIG_CPU_LITTLE_ENDIAN
63 uc = *puc++;
64 ul = (unsigned long)uc;
65 uc = *puc++;
66 ul |= (((unsigned long)uc) << 8);
67 uc = *puc++;
68 ul |= (((unsigned long)uc) << 16);
69 uc = *puc++;
70 ul |= (((unsigned long)uc) << 24);
71#else /* CONFIG_CPU_LITTLE_ENDIAN */
72 uc = *puc++;
73 ul = ((unsigned long)uc) << 24;
74 uc = *puc++;
75 ul |= (((unsigned long)uc) << 16);
76 uc = *puc++;
77 ul |= (((unsigned long)uc) << 8);
78 uc = *puc++;
79 ul |= ((unsigned long)uc);
80#endif /* CONFIG_CPU_LITTLE_ENDIAN */
81 ul = signext(ul);
82 return (void *)ul;
83}
84
85char *arg64(unsigned long addrin, int arg_index)
86{
87 unsigned long args;
88 char *p;
89 args = signext(addrin);
90 p = (char *)get_arg(args, arg_index);
91 return p;
92}
93#endif /* CONFIG_64BIT */
94
95
96void __init prom_init(void)
97{
98 int argc = fw_arg0;
99 char **arg = (char **) fw_arg1;
100 char **env = (char **) fw_arg2;
101 struct callvectors *cv = (struct callvectors *) fw_arg3;
102 int i;
103
104#ifdef CONFIG_64BIT
105 char *ptr;
106
107 printk("prom_init - MIPS64\n");
108 /* save the PROM vectors for debugging use */
109 debug_vectors = (struct callvectors *)signext((unsigned long)cv);
110
111 /* arg[0] is "g", the rest is boot parameters */
112 arcs_cmdline[0] = '\0';
113
114 for (i = 1; i < argc; i++) {
115 ptr = (char *)arg64((unsigned long)arg, i);
116 if ((strlen(arcs_cmdline) + strlen(ptr) + 1) >=
117 sizeof(arcs_cmdline))
118 break;
119 strcat(arcs_cmdline, ptr);
120 strcat(arcs_cmdline, " ");
121 }
122 i = 0;
123 while (1) {
124 ptr = (char *)arg64((unsigned long)env, i);
125 if (! ptr)
126 break;
127
128 if (strncmp("gtbase", ptr, strlen("gtbase")) == 0) {
129 marvell_base = simple_strtol(ptr + strlen("gtbase="),
130 NULL, 16);
131
132 if ((marvell_base & 0xffffffff00000000) == 0)
133 marvell_base |= 0xffffffff00000000;
134
135 printk("marvell_base set to 0x%016lx\n", marvell_base);
136 }
137 if (strncmp("cpuclock", ptr, strlen("cpuclock")) == 0) {
138 cpu_clock = simple_strtol(ptr + strlen("cpuclock="),
139 NULL, 10);
140 printk("cpu_clock set to %d\n", cpu_clock);
141 }
142 i++;
143 }
144 printk("arcs_cmdline: %s\n", arcs_cmdline);
145
146#else /* CONFIG_64BIT */
147 /* save the PROM vectors for debugging use */
148 debug_vectors = cv;
149
150 /* arg[0] is "g", the rest is boot parameters */
151 arcs_cmdline[0] = '\0';
152 for (i = 1; i < argc; i++) {
153 if (strlen(arcs_cmdline) + strlen(arg[i] + 1)
154 >= sizeof(arcs_cmdline))
155 break;
156 strcat(arcs_cmdline, arg[i]);
157 strcat(arcs_cmdline, " ");
158 }
159
160 while (*env) {
161 if (strncmp("gtbase", *env, strlen("gtbase")) == 0) {
162 marvell_base = simple_strtol(*env + strlen("gtbase="),
163 NULL, 16);
164 }
165 if (strncmp("cpuclock", *env, strlen("cpuclock")) == 0) {
166 cpu_clock = simple_strtol(*env + strlen("cpuclock="),
167 NULL, 10);
168 }
169 env++;
170 }
171#endif /* CONFIG_64BIT */
172
173 mips_machgroup = MACH_GROUP_MOMENCO;
174 mips_machtype = MACH_MOMENCO_OCELOT_C;
175
176#ifndef CONFIG_64BIT
177 debug_vectors->printf("Booting Linux kernel...\n");
178#endif
179}
180
181void __init prom_free_prom_memory(void)
182{
183}
diff --git a/arch/mips/momentum/ocelot_c/reset.c b/arch/mips/momentum/ocelot_c/reset.c
deleted file mode 100644
index 3fdcb64ff1..0000000000
--- a/arch/mips/momentum/ocelot_c/reset.c
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; either version 2 of the License, or (at your
5 * option) any later version.
6 *
7 * Copyright (C) 1997, 2001 Ralf Baechle
8 * Copyright 2001 MontaVista Software Inc.
9 * Author: jsun@mvista.com or jsun@junsun.net
10 *
11 * Copyright (C) 2002 Momentum Computer Inc.
12 * Author: Matthew Dharm <mdharm@momenco.com>
13 *
14 * Louis Hamilton, Red Hat, Inc.
15 * hamilton@redhat.com [MIPS64 modifications]
16 */
17#include <linux/sched.h>
18#include <linux/mm.h>
19#include <asm/io.h>
20#include <asm/pgtable.h>
21#include <asm/processor.h>
22#include <asm/reboot.h>
23#include <asm/system.h>
24#include <linux/delay.h>
25
26void momenco_ocelot_restart(char *command)
27{
28 /* base address of timekeeper portion of part */
29 void *nvram = (void *)
30#ifdef CONFIG_64BIT
31 0xfffffffffc807000;
32#else
33 0xfc807000;
34#endif
35
36 /* Ask the NVRAM/RTC/watchdog chip to assert reset in 1/16 second */
37 writeb(0x84, nvram + 0xff7);
38
39 /* wait for the watchdog to go off */
40 mdelay(100+(1000/16));
41
42 /* if the watchdog fails for some reason, let people know */
43 printk(KERN_NOTICE "Watchdog reset failed\n");
44}
45
46void momenco_ocelot_halt(void)
47{
48 printk(KERN_NOTICE "\n** You can safely turn off the power\n");
49 while (1)
50 __asm__(".set\tmips3\n\t"
51 "wait\n\t"
52 ".set\tmips0");
53}
54
55void momenco_ocelot_power_off(void)
56{
57 momenco_ocelot_halt();
58}
diff --git a/arch/mips/momentum/ocelot_c/setup.c b/arch/mips/momentum/ocelot_c/setup.c
deleted file mode 100644
index 0b6b2338cf..0000000000
--- a/arch/mips/momentum/ocelot_c/setup.c
+++ /dev/null
@@ -1,362 +0,0 @@
1/*
2 * BRIEF MODULE DESCRIPTION
3 * Momentum Computer Ocelot-C and -CS board dependent boot routines
4 *
5 * Copyright (C) 1996, 1997, 2001 Ralf Baechle
6 * Copyright (C) 2000 RidgeRun, Inc.
7 * Copyright (C) 2001 Red Hat, Inc.
8 * Copyright (C) 2002 Momentum Computer
9 *
10 * Author: Matthew Dharm, Momentum Computer
11 * mdharm@momenco.com
12 *
13 * Louis Hamilton, Red Hat, Inc.
14 * hamilton@redhat.com [MIPS64 modifications]
15 *
16 * Author: RidgeRun, Inc.
17 * glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.com
18 *
19 * Copyright 2001 MontaVista Software Inc.
20 * Author: jsun@mvista.com or jsun@junsun.net
21 *
22 * This program is free software; you can redistribute it and/or modify it
23 * under the terms of the GNU General Public License as published by the
24 * Free Software Foundation; either version 2 of the License, or (at your
25 * option) any later version.
26 *
27 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
28 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
29 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
30 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
31 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
33 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
34 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
36 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 *
38 * You should have received a copy of the GNU General Public License along
39 * with this program; if not, write to the Free Software Foundation, Inc.,
40 * 675 Mass Ave, Cambridge, MA 02139, USA.
41 *
42 */
43#include <linux/bcd.h>
44#include <linux/init.h>
45#include <linux/kernel.h>
46#include <linux/types.h>
47#include <linux/mm.h>
48#include <linux/swap.h>
49#include <linux/ioport.h>
50#include <linux/sched.h>
51#include <linux/interrupt.h>
52#include <linux/pci.h>
53#include <linux/pm.h>
54#include <linux/timex.h>
55#include <linux/vmalloc.h>
56#include <linux/mv643xx.h>
57
58#include <asm/time.h>
59#include <asm/bootinfo.h>
60#include <asm/page.h>
61#include <asm/io.h>
62#include <asm/irq.h>
63#include <asm/pci.h>
64#include <asm/processor.h>
65#include <asm/reboot.h>
66#include <asm/marvell.h>
67#include <linux/bootmem.h>
68#include <linux/blkdev.h>
69#include "ocelot_c_fpga.h"
70
71unsigned long marvell_base;
72unsigned int cpu_clock;
73
74/* These functions are used for rebooting or halting the machine*/
75extern void momenco_ocelot_restart(char *command);
76extern void momenco_ocelot_halt(void);
77extern void momenco_ocelot_power_off(void);
78
79void momenco_time_init(void);
80
81static char reset_reason;
82
83void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1, unsigned long entryhi, unsigned long pagemask);
84
85static unsigned long ENTRYLO(unsigned long paddr)
86{
87 return ((paddr & PAGE_MASK) |
88 (_PAGE_PRESENT | __READABLE | __WRITEABLE | _PAGE_GLOBAL |
89 _CACHE_UNCACHED)) >> 6;
90}
91
92/* setup code for a handoff from a version 2 PMON 2000 PROM */
93void PMON_v2_setup(void)
94{
95 /* Some wired TLB entries for the MV64340 and perhiperals. The
96 MV64340 is going to be hit on every IRQ anyway - there's
97 absolutely no point in letting it be a random TLB entry, as
98 it'll just cause needless churning of the TLB. And we use
99 the other half for the serial port, which is just a PITA
100 otherwise :)
101
102 Device Physical Virtual
103 MV64340 Internal Regs 0xf4000000 0xf4000000
104 Ocelot-C[S] PLD (CS0) 0xfc000000 0xfc000000
105 NVRAM (CS1) 0xfc800000 0xfc800000
106 UARTs (CS2) 0xfd000000 0xfd000000
107 Internal SRAM 0xfe000000 0xfe000000
108 M-Systems DOC (CS3) 0xff000000 0xff000000
109 */
110 printk("PMON_v2_setup\n");
111
112#ifdef CONFIG_64BIT
113 /* marvell and extra space */
114 add_wired_entry(ENTRYLO(0xf4000000), ENTRYLO(0xf4010000), 0xfffffffff4000000, PM_64K);
115 /* fpga, rtc, and uart */
116 add_wired_entry(ENTRYLO(0xfc000000), ENTRYLO(0xfd000000), 0xfffffffffc000000, PM_16M);
117 /* m-sys and internal SRAM */
118 add_wired_entry(ENTRYLO(0xfe000000), ENTRYLO(0xff000000), 0xfffffffffe000000, PM_16M);
119
120 marvell_base = 0xfffffffff4000000;
121#else
122 /* marvell and extra space */
123 add_wired_entry(ENTRYLO(0xf4000000), ENTRYLO(0xf4010000), 0xf4000000, PM_64K);
124 /* fpga, rtc, and uart */
125 add_wired_entry(ENTRYLO(0xfc000000), ENTRYLO(0xfd000000), 0xfc000000, PM_16M);
126 /* m-sys and internal SRAM */
127 add_wired_entry(ENTRYLO(0xfe000000), ENTRYLO(0xff000000), 0xfe000000, PM_16M);
128
129 marvell_base = 0xf4000000;
130#endif
131}
132
133unsigned long m48t37y_get_time(void)
134{
135#ifdef CONFIG_64BIT
136 unsigned char *rtc_base = (unsigned char*)0xfffffffffc800000;
137#else
138 unsigned char* rtc_base = (unsigned char*)0xfc800000;
139#endif
140 unsigned int year, month, day, hour, min, sec;
141 unsigned long flags;
142
143 spin_lock_irqsave(&rtc_lock, flags);
144 /* stop the update */
145 rtc_base[0x7ff8] = 0x40;
146
147 year = BCD2BIN(rtc_base[0x7fff]);
148 year += BCD2BIN(rtc_base[0x7ff1]) * 100;
149
150 month = BCD2BIN(rtc_base[0x7ffe]);
151
152 day = BCD2BIN(rtc_base[0x7ffd]);
153
154 hour = BCD2BIN(rtc_base[0x7ffb]);
155 min = BCD2BIN(rtc_base[0x7ffa]);
156 sec = BCD2BIN(rtc_base[0x7ff9]);
157
158 /* start the update */
159 rtc_base[0x7ff8] = 0x00;
160 spin_unlock_irqrestore(&rtc_lock, flags);
161
162 return mktime(year, month, day, hour, min, sec);
163}
164
165int m48t37y_set_time(unsigned long sec)
166{
167#ifdef CONFIG_64BIT
168 unsigned char* rtc_base = (unsigned char*)0xfffffffffc800000;
169#else
170 unsigned char* rtc_base = (unsigned char*)0xfc800000;
171#endif
172 struct rtc_time tm;
173 unsigned long flags;
174
175 /* convert to a more useful format -- note months count from 0 */
176 to_tm(sec, &tm);
177 tm.tm_mon += 1;
178
179 spin_lock_irqsave(&rtc_lock, flags);
180 /* enable writing */
181 rtc_base[0x7ff8] = 0x80;
182
183 /* year */
184 rtc_base[0x7fff] = BIN2BCD(tm.tm_year % 100);
185 rtc_base[0x7ff1] = BIN2BCD(tm.tm_year / 100);
186
187 /* month */
188 rtc_base[0x7ffe] = BIN2BCD(tm.tm_mon);
189
190 /* day */
191 rtc_base[0x7ffd] = BIN2BCD(tm.tm_mday);
192
193 /* hour/min/sec */
194 rtc_base[0x7ffb] = BIN2BCD(tm.tm_hour);
195 rtc_base[0x7ffa] = BIN2BCD(tm.tm_min);
196 rtc_base[0x7ff9] = BIN2BCD(tm.tm_sec);
197
198 /* day of week -- not really used, but let's keep it up-to-date */
199 rtc_base[0x7ffc] = BIN2BCD(tm.tm_wday + 1);
200
201 /* disable writing */
202 rtc_base[0x7ff8] = 0x00;
203 spin_unlock_irqrestore(&rtc_lock, flags);
204
205 return 0;
206}
207
208void __init plat_timer_setup(struct irqaction *irq)
209{
210 setup_irq(7, irq);
211}
212
213void momenco_time_init(void)
214{
215#ifdef CONFIG_CPU_SR71000
216 mips_hpt_frequency = cpu_clock;
217#elif defined(CONFIG_CPU_RM7000)
218 mips_hpt_frequency = cpu_clock / 2;
219#else
220#error Unknown CPU for this board
221#endif
222 printk("momenco_time_init cpu_clock=%d\n", cpu_clock);
223
224 rtc_mips_get_time = m48t37y_get_time;
225 rtc_mips_set_time = m48t37y_set_time;
226}
227
228void __init plat_mem_setup(void)
229{
230 unsigned int tmpword;
231
232 board_time_init = momenco_time_init;
233
234 _machine_restart = momenco_ocelot_restart;
235 _machine_halt = momenco_ocelot_halt;
236 pm_power_off = momenco_ocelot_power_off;
237
238 /*
239 * initrd_start = (unsigned long)ocelot_initrd_start;
240 * initrd_end = (unsigned long)ocelot_initrd_start + (ulong)ocelot_initrd_size;
241 * initrd_below_start_ok = 1;
242 */
243
244 /* do handoff reconfiguration */
245 PMON_v2_setup();
246
247 /* shut down ethernet ports, just to be sure our memory doesn't get
248 * corrupted by random ethernet traffic.
249 */
250 MV_WRITE(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(0), 0xff << 8);
251 MV_WRITE(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(1), 0xff << 8);
252 MV_WRITE(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(0), 0xff << 8);
253 MV_WRITE(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(1), 0xff << 8);
254 do {}
255 while (MV_READ(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(0)) & 0xff);
256 do {}
257 while (MV_READ(MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(1)) & 0xff);
258 do {}
259 while (MV_READ(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(0)) & 0xff);
260 do {}
261 while (MV_READ(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(1)) & 0xff);
262 MV_WRITE(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(0),
263 MV_READ(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(0)) & ~1);
264 MV_WRITE(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(1),
265 MV_READ(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(1)) & ~1);
266
267 /* Turn off the Bit-Error LED */
268 OCELOT_FPGA_WRITE(0x80, CLR);
269
270 tmpword = OCELOT_FPGA_READ(BOARDREV);
271#ifdef CONFIG_CPU_SR71000
272 if (tmpword < 26)
273 printk("Momenco Ocelot-CS: Board Assembly Rev. %c\n",
274 'A'+tmpword);
275 else
276 printk("Momenco Ocelot-CS: Board Assembly Revision #0x%x\n",
277 tmpword);
278#else
279 if (tmpword < 26)
280 printk("Momenco Ocelot-C: Board Assembly Rev. %c\n",
281 'A'+tmpword);
282 else
283 printk("Momenco Ocelot-C: Board Assembly Revision #0x%x\n",
284 tmpword);
285#endif
286
287 tmpword = OCELOT_FPGA_READ(FPGA_REV);
288 printk("FPGA Rev: %d.%d\n", tmpword>>4, tmpword&15);
289 tmpword = OCELOT_FPGA_READ(RESET_STATUS);
290 printk("Reset reason: 0x%x\n", tmpword);
291 switch (tmpword) {
292 case 0x1:
293 printk(" - Power-up reset\n");
294 break;
295 case 0x2:
296 printk(" - Push-button reset\n");
297 break;
298 case 0x4:
299 printk(" - cPCI bus reset\n");
300 break;
301 case 0x8:
302 printk(" - Watchdog reset\n");
303 break;
304 case 0x10:
305 printk(" - Software reset\n");
306 break;
307 default:
308 printk(" - Unknown reset cause\n");
309 }
310 reset_reason = tmpword;
311 OCELOT_FPGA_WRITE(0xff, RESET_STATUS);
312
313 tmpword = OCELOT_FPGA_READ(CPCI_ID);
314 printk("cPCI ID register: 0x%02x\n", tmpword);
315 printk(" - Slot number: %d\n", tmpword & 0x1f);
316 printk(" - PCI bus present: %s\n", tmpword & 0x40 ? "yes" : "no");
317 printk(" - System Slot: %s\n", tmpword & 0x20 ? "yes" : "no");
318
319 tmpword = OCELOT_FPGA_READ(BOARD_STATUS);
320 printk("Board Status register: 0x%02x\n", tmpword);
321 printk(" - User jumper: %s\n", (tmpword & 0x80)?"installed":"absent");
322 printk(" - Boot flash write jumper: %s\n", (tmpword&0x40)?"installed":"absent");
323 printk(" - L3 Cache size: %d MiB\n", (1<<((tmpword&12) >> 2))&~1);
324 printk(" - SDRAM size: %d MiB\n", 1<<(6+(tmpword&3)));
325
326 switch(tmpword &3) {
327 case 3:
328 /* 512MiB */
329 add_memory_region(0x0, 0x200<<20, BOOT_MEM_RAM);
330 break;
331 case 2:
332 /* 256MiB */
333 add_memory_region(0x0, 0x100<<20, BOOT_MEM_RAM);
334 break;
335 case 1:
336 /* 128MiB */
337 add_memory_region(0x0, 0x80<<20, BOOT_MEM_RAM);
338 break;
339 case 0:
340 /* 1GiB -- needs CONFIG_HIGHMEM */
341 add_memory_region(0x0, 0x400<<20, BOOT_MEM_RAM);
342 break;
343 }
344}
345
346/*
347 * This needs to be one of the first initcalls, because no I/O port access
348 * can work before this
349 */
350static int io_base_ioremap(void)
351{
352 void __iomem * io_remap_range = ioremap(0xc0000000UL, 0x10000);
353
354 if (!io_remap_range)
355 panic("Could not ioremap I/O port range");
356
357 set_io_port_base((unsigned long) io_remap_range);
358
359 return 0;
360}
361
362module_init(io_base_ioremap);
diff --git a/arch/mips/momentum/ocelot_c/uart-irq.c b/arch/mips/momentum/ocelot_c/uart-irq.c
deleted file mode 100644
index de1a31ee52..0000000000
--- a/arch/mips/momentum/ocelot_c/uart-irq.c
+++ /dev/null
@@ -1,91 +0,0 @@
1/*
2 * Copyright 2002 Momentum Computer
3 * Author: mdharm@momenco.com
4 *
5 * arch/mips/momentum/ocelot_c/uart-irq.c
6 * Interrupt routines for UARTs. Interrupt numbers are assigned from
7 * 80 to 81 (2 interrupt sources).
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 */
14
15#include <linux/module.h>
16#include <linux/interrupt.h>
17#include <linux/irq.h>
18#include <linux/kernel.h>
19#include <linux/sched.h>
20#include <linux/kernel_stat.h>
21#include <asm/io.h>
22#include <asm/irq.h>
23#include "ocelot_c_fpga.h"
24
25static inline int ls1bit8(unsigned int x)
26{
27 int b = 7, s;
28
29 s = 4; if (((unsigned char)(x << 4)) == 0) s = 0; b -= s; x <<= s;
30 s = 2; if (((unsigned char)(x << 2)) == 0) s = 0; b -= s; x <<= s;
31 s = 1; if (((unsigned char)(x << 1)) == 0) s = 0; b -= s;
32
33 return b;
34}
35
36/* mask off an interrupt -- 0 is enable, 1 is disable */
37static inline void mask_uart_irq(unsigned int irq)
38{
39 uint8_t value;
40
41 value = OCELOT_FPGA_READ(UART_INTMASK);
42 value |= 1 << (irq - 74);
43 OCELOT_FPGA_WRITE(value, UART_INTMASK);
44
45 /* read the value back to assure that it's really been written */
46 value = OCELOT_FPGA_READ(UART_INTMASK);
47}
48
49/* unmask an interrupt -- 0 is enable, 1 is disable */
50static inline void unmask_uart_irq(unsigned int irq)
51{
52 uint8_t value;
53
54 value = OCELOT_FPGA_READ(UART_INTMASK);
55 value &= ~(1 << (irq - 74));
56 OCELOT_FPGA_WRITE(value, UART_INTMASK);
57
58 /* read the value back to assure that it's really been written */
59 value = OCELOT_FPGA_READ(UART_INTMASK);
60}
61
62/*
63 * Interrupt handler for interrupts coming from the FPGA chip.
64 */
65void ll_uart_irq(void)
66{
67 unsigned int irq_src, irq_mask;
68
69 /* read the interrupt status registers */
70 irq_src = OCELOT_FPGA_READ(UART_INTSTAT);
71 irq_mask = OCELOT_FPGA_READ(UART_INTMASK);
72
73 /* mask for just the interrupts we want */
74 irq_src &= ~irq_mask;
75
76 do_IRQ(ls1bit8(irq_src) + 74);
77}
78
79struct irq_chip uart_irq_type = {
80 .name = "UART/FPGA",
81 .ack = mask_uart_irq,
82 .mask = mask_uart_irq,
83 .mask_ack = mask_uart_irq,
84 .unmask = unmask_uart_irq,
85};
86
87void uart_irq_init(void)
88{
89 set_irq_chip_and_handler(80, &uart_irq_type, handle_level_irq);
90 set_irq_chip_and_handler(81, &uart_irq_type, handle_level_irq);
91}
diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile
index aba3dbf47e..c58bd3d036 100644
--- a/arch/mips/pci/Makefile
+++ b/arch/mips/pci/Makefile
@@ -2,16 +2,14 @@
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 pci-dac.o 5obj-y += pci.o
6 6
7# 7#
8# PCI bus host bridge specific code 8# PCI bus host bridge specific code
9# 9#
10obj-$(CONFIG_MIPS_BONITO64) += ops-bonito64.o 10obj-$(CONFIG_MIPS_BONITO64) += ops-bonito64.o
11obj-$(CONFIG_PCI_GT64XXX_PCI0) += ops-gt64xxx_pci0.o 11obj-$(CONFIG_PCI_GT64XXX_PCI0) += ops-gt64xxx_pci0.o
12obj-$(CONFIG_PCI_MARVELL) += ops-marvell.o
13obj-$(CONFIG_MIPS_MSC) += ops-msc.o 12obj-$(CONFIG_MIPS_MSC) += ops-msc.o
14obj-$(CONFIG_MIPS_NILE4) += ops-nile4.o
15obj-$(CONFIG_MIPS_TX3927) += ops-tx3927.o 13obj-$(CONFIG_MIPS_TX3927) += ops-tx3927.o
16obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o 14obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o
17obj-$(CONFIG_NEC_CMBVR4133) += fixup-vr4133.o 15obj-$(CONFIG_NEC_CMBVR4133) += fixup-vr4133.o
@@ -22,17 +20,17 @@ obj-$(CONFIG_MARKEINS) += ops-emma2rh.o pci-emma2rh.o fixup-emma2rh.o
22# 20#
23obj-$(CONFIG_BASLER_EXCITE) += ops-titan.o pci-excite.o fixup-excite.o 21obj-$(CONFIG_BASLER_EXCITE) += ops-titan.o pci-excite.o fixup-excite.o
24obj-$(CONFIG_DDB5477) += fixup-ddb5477.o pci-ddb5477.o ops-ddb5477.o 22obj-$(CONFIG_DDB5477) += fixup-ddb5477.o pci-ddb5477.o ops-ddb5477.o
25obj-$(CONFIG_LASAT) += pci-lasat.o
26obj-$(CONFIG_MIPS_ATLAS) += fixup-atlas.o 23obj-$(CONFIG_MIPS_ATLAS) += fixup-atlas.o
27obj-$(CONFIG_MIPS_COBALT) += fixup-cobalt.o 24obj-$(CONFIG_MIPS_COBALT) += fixup-cobalt.o
28obj-$(CONFIG_MIPS_EV64120) += pci-ev64120.o
29obj-$(CONFIG_SOC_AU1500) += fixup-au1000.o ops-au1000.o 25obj-$(CONFIG_SOC_AU1500) += fixup-au1000.o ops-au1000.o
30obj-$(CONFIG_SOC_AU1550) += fixup-au1000.o ops-au1000.o 26obj-$(CONFIG_SOC_AU1550) += fixup-au1000.o ops-au1000.o
31obj-$(CONFIG_SOC_PNX8550) += fixup-pnx8550.o ops-pnx8550.o 27obj-$(CONFIG_SOC_PNX8550) += fixup-pnx8550.o ops-pnx8550.o
28obj-$(CONFIG_LEMOTE_FULONG) += fixup-lm2e.o ops-bonito64.o
32obj-$(CONFIG_MIPS_MALTA) += fixup-malta.o 29obj-$(CONFIG_MIPS_MALTA) += fixup-malta.o
33obj-$(CONFIG_MOMENCO_OCELOT) += fixup-ocelot.o pci-ocelot.o 30obj-$(CONFIG_MOMENCO_OCELOT) += fixup-ocelot.o pci-ocelot.o
34obj-$(CONFIG_MOMENCO_OCELOT_3) += fixup-ocelot3.o 31obj-$(CONFIG_PMC_MSP7120_GW) += fixup-pmcmsp.o ops-pmcmsp.o
35obj-$(CONFIG_MOMENCO_OCELOT_C) += fixup-ocelot-c.o pci-ocelot-c.o 32obj-$(CONFIG_PMC_MSP7120_EVAL) += fixup-pmcmsp.o ops-pmcmsp.o
33obj-$(CONFIG_PMC_MSP7120_FPGA) += fixup-pmcmsp.o ops-pmcmsp.o
36obj-$(CONFIG_PMC_YOSEMITE) += fixup-yosemite.o ops-titan.o ops-titan-ht.o \ 34obj-$(CONFIG_PMC_YOSEMITE) += fixup-yosemite.o ops-titan.o ops-titan-ht.o \
37 pci-yosemite.o 35 pci-yosemite.o
38obj-$(CONFIG_SGI_IP27) += ops-bridge.o pci-ip27.o 36obj-$(CONFIG_SGI_IP27) += ops-bridge.o pci-ip27.o
diff --git a/arch/mips/pci/fixup-atlas.c b/arch/mips/pci/fixup-atlas.c
index c6cd6e9cdf..45224fd2c7 100644
--- a/arch/mips/pci/fixup-atlas.c
+++ b/arch/mips/pci/fixup-atlas.c
@@ -58,7 +58,7 @@ static char irq_tab[][5] __initdata = {
58 {0, 0, 0, 0, 0 } /* 21: Unused */ 58 {0, 0, 0, 0, 0 } /* 21: Unused */
59}; 59};
60 60
61int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 61int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
62{ 62{
63 return irq_tab[slot][pin]; 63 return irq_tab[slot][pin];
64} 64}
diff --git a/arch/mips/pci/fixup-au1000.c b/arch/mips/pci/fixup-au1000.c
index c2f8304fe5..ca0276c807 100644
--- a/arch/mips/pci/fixup-au1000.c
+++ b/arch/mips/pci/fixup-au1000.c
@@ -35,7 +35,7 @@
35 35
36extern char irq_tab_alchemy[][5]; 36extern char irq_tab_alchemy[][5];
37 37
38int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 38int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
39{ 39{
40 return irq_tab_alchemy[slot][pin]; 40 return irq_tab_alchemy[slot][pin];
41} 41}
diff --git a/arch/mips/pci/fixup-capcella.c b/arch/mips/pci/fixup-capcella.c
index 1e53075193..1416bca6d1 100644
--- a/arch/mips/pci/fixup-capcella.c
+++ b/arch/mips/pci/fixup-capcella.c
@@ -38,7 +38,7 @@ static char irq_tab_capcella[][5] __initdata = {
38 [14] = { -1, INTA, INTB, INTC, INTD } 38 [14] = { -1, INTA, INTB, INTC, INTD }
39}; 39};
40 40
41int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 41int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
42{ 42{
43 return irq_tab_capcella[slot][pin]; 43 return irq_tab_capcella[slot][pin];
44} 44}
diff --git a/arch/mips/pci/fixup-cobalt.c b/arch/mips/pci/fixup-cobalt.c
index d57ffd7242..76b4f0ffb1 100644
--- a/arch/mips/pci/fixup-cobalt.c
+++ b/arch/mips/pci/fixup-cobalt.c
@@ -58,8 +58,6 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1,
58 58
59static void qube_raq_galileo_fixup(struct pci_dev *dev) 59static void qube_raq_galileo_fixup(struct pci_dev *dev)
60{ 60{
61 unsigned short galileo_id;
62
63 if (dev->devfn != PCI_DEVFN(0, 0)) 61 if (dev->devfn != PCI_DEVFN(0, 0))
64 return; 62 return;
65 63
@@ -84,16 +82,14 @@ static void qube_raq_galileo_fixup(struct pci_dev *dev)
84 * Therefore we must set the disconnect/retry cycle values to 82 * Therefore we must set the disconnect/retry cycle values to
85 * something sensible when using the new Galileo. 83 * something sensible when using the new Galileo.
86 */ 84 */
87 pci_read_config_word(dev, PCI_REVISION_ID, &galileo_id);
88 galileo_id &= 0xff; /* mask off class info */
89 85
90 printk(KERN_INFO "Galileo: revision %u\n", galileo_id); 86 printk(KERN_INFO "Galileo: revision %u\n", dev->revision);
91 87
92#if 0 88#if 0
93 if (galileo_id >= 0x10) { 89 if (dev->revision >= 0x10) {
94 /* New Galileo, assumes PCI stop line to VIA is connected. */ 90 /* New Galileo, assumes PCI stop line to VIA is connected. */
95 GT_WRITE(GT_PCI0_TOR_OFS, 0x4020); 91 GT_WRITE(GT_PCI0_TOR_OFS, 0x4020);
96 } else if (galileo_id == 0x1 || galileo_id == 0x2) 92 } else if (dev->revision == 0x1 || dev->revision == 0x2)
97#endif 93#endif
98 { 94 {
99 signed int timeo; 95 signed int timeo;
@@ -161,7 +157,7 @@ static char irq_tab_raq2[] __initdata = {
161 [COBALT_PCICONF_ETH1] = COBALT_ETH1_IRQ 157 [COBALT_PCICONF_ETH1] = COBALT_ETH1_IRQ
162}; 158};
163 159
164int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 160int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
165{ 161{
166 if (cobalt_board_id < COBALT_BRD_ID_QUBE2) 162 if (cobalt_board_id < COBALT_BRD_ID_QUBE2)
167 return irq_tab_qube1[slot]; 163 return irq_tab_qube1[slot];
diff --git a/arch/mips/pci/fixup-emma2rh.c b/arch/mips/pci/fixup-emma2rh.c
index 7abcfd175d..a270589556 100644
--- a/arch/mips/pci/fixup-emma2rh.c
+++ b/arch/mips/pci/fixup-emma2rh.c
@@ -89,7 +89,7 @@ static void __devinit emma2rh_pci_host_fixup(struct pci_dev *dev)
89DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_EMMA2RH, 89DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_EMMA2RH,
90 emma2rh_pci_host_fixup); 90 emma2rh_pci_host_fixup);
91 91
92int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 92int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
93{ 93{
94 return irq_map[slot][pin]; 94 return irq_map[slot][pin];
95} 95}
diff --git a/arch/mips/pci/fixup-excite.c b/arch/mips/pci/fixup-excite.c
index 1da696d43f..cd64d9f177 100644
--- a/arch/mips/pci/fixup-excite.c
+++ b/arch/mips/pci/fixup-excite.c
@@ -21,7 +21,7 @@
21#include <linux/pci.h> 21#include <linux/pci.h>
22#include <excite.h> 22#include <excite.h>
23 23
24int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 24int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
25{ 25{
26 if (pin == 0) 26 if (pin == 0)
27 return -1; 27 return -1;
diff --git a/arch/mips/pci/fixup-ip32.c b/arch/mips/pci/fixup-ip32.c
index 3e66b0aa63..190fffd08d 100644
--- a/arch/mips/pci/fixup-ip32.c
+++ b/arch/mips/pci/fixup-ip32.c
@@ -39,7 +39,7 @@ static char irq_tab_mace[][5] __initdata = {
39 * irqs. I suppose a device without a pin A will thank us for doing it 39 * irqs. I suppose a device without a pin A will thank us for doing it
40 * right if there exists such a broken piece of crap. 40 * right if there exists such a broken piece of crap.
41 */ 41 */
42int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 42int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
43{ 43{
44 return irq_tab_mace[slot][pin]; 44 return irq_tab_mace[slot][pin];
45} 45}
diff --git a/arch/mips/pci/fixup-jmr3927.c b/arch/mips/pci/fixup-jmr3927.c
index 73d1850351..e974394be7 100644
--- a/arch/mips/pci/fixup-jmr3927.c
+++ b/arch/mips/pci/fixup-jmr3927.c
@@ -33,7 +33,7 @@
33 33
34#include <asm/jmr3927/jmr3927.h> 34#include <asm/jmr3927/jmr3927.h>
35 35
36int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 36int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
37{ 37{
38 unsigned char irq = pin; 38 unsigned char irq = pin;
39 39
diff --git a/arch/mips/pci/fixup-lm2e.c b/arch/mips/pci/fixup-lm2e.c
new file mode 100644
index 0000000000..e18ae4f574
--- /dev/null
+++ b/arch/mips/pci/fixup-lm2e.c
@@ -0,0 +1,242 @@
1/*
2 * fixup-lm2e.c
3 *
4 * Copyright (C) 2004 ICT CAS
5 * Author: Li xiaoyu, ICT CAS
6 * lixy@ict.ac.cn
7 *
8 * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
9 * Author: Fuxin Zhang, zhangfx@lemote.com
10 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
15 *
16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
19 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
22 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * You should have received a copy of the GNU General Public License along
28 * with this program; if not, write to the Free Software Foundation, Inc.,
29 * 675 Mass Ave, Cambridge, MA 02139, USA.
30 *
31 */
32#include <linux/init.h>
33#include <linux/pci.h>
34#include <asm/mips-boards/bonito64.h>
35
36/* South bridge slot number is set by the pci probe process */
37static u8 sb_slot = 5;
38
39int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
40{
41 int irq = 0;
42
43 if (slot == sb_slot) {
44 switch (PCI_FUNC(dev->devfn)) {
45 case 2:
46 irq = 10;
47 break;
48 case 3:
49 irq = 11;
50 break;
51 case 5:
52 irq = 9;
53 break;
54 }
55 } else {
56 irq = BONITO_IRQ_BASE + 25 + pin;
57 }
58 return irq;
59
60}
61
62/* Do platform specific device initialization at pci_enable_device() time */
63int pcibios_plat_dev_init(struct pci_dev *dev)
64{
65 return 0;
66}
67
68static void __init loongson2e_nec_fixup(struct pci_dev *pdev)
69{
70 unsigned int val;
71
72 /* Configues port 1, 2, 3, 4 to be validate*/
73 pci_read_config_dword(pdev, 0xe0, &val);
74 pci_write_config_dword(pdev, 0xe0, (val & ~7) | 0x4);
75
76 /* System clock is 48-MHz Oscillator. */
77 pci_write_config_dword(pdev, 0xe4, 1 << 5);
78}
79
80static void __init loongson2e_686b_func0_fixup(struct pci_dev *pdev)
81{
82 unsigned char c;
83
84 sb_slot = PCI_SLOT(pdev->devfn);
85
86 printk(KERN_INFO "via686b fix: ISA bridge\n");
87
88 /* Enable I/O Recovery time */
89 pci_write_config_byte(pdev, 0x40, 0x08);
90
91 /* Enable ISA refresh */
92 pci_write_config_byte(pdev, 0x41, 0x01);
93
94 /* disable ISA line buffer */
95 pci_write_config_byte(pdev, 0x45, 0x00);
96
97 /* Gate INTR, and flush line buffer */
98 pci_write_config_byte(pdev, 0x46, 0xe0);
99
100 /* Disable PCI Delay Transaction, Enable EISA ports 4D0/4D1. */
101 /* pci_write_config_byte(pdev, 0x47, 0x20); */
102
103 /*
104 * enable PCI Delay Transaction, Enable EISA ports 4D0/4D1.
105 * enable time-out timer
106 */
107 pci_write_config_byte(pdev, 0x47, 0xe6);
108
109 /*
110 * enable level trigger on pci irqs: 9,10,11,13
111 * important! without this PCI interrupts won't work
112 */
113 outb(0x2e, 0x4d1);
114
115 /* 512 K PCI Decode */
116 pci_write_config_byte(pdev, 0x48, 0x01);
117
118 /* Wait for PGNT before grant to ISA Master/DMA */
119 pci_write_config_byte(pdev, 0x4a, 0x84);
120
121 /*
122 * Plug'n'Play
123 *
124 * Parallel DRQ 3, Floppy DRQ 2 (default)
125 */
126 pci_write_config_byte(pdev, 0x50, 0x0e);
127
128 /*
129 * IRQ Routing for Floppy and Parallel port
130 *
131 * IRQ 6 for floppy, IRQ 7 for parallel port
132 */
133 pci_write_config_byte(pdev, 0x51, 0x76);
134
135 /* IRQ Routing for serial ports (take IRQ 3 and 4) */
136 pci_write_config_byte(pdev, 0x52, 0x34);
137
138 /* All IRQ's level triggered. */
139 pci_write_config_byte(pdev, 0x54, 0x00);
140
141 /* route PIRQA-D irq */
142 pci_write_config_byte(pdev, 0x55, 0x90); /* bit 7-4, PIRQA */
143 pci_write_config_byte(pdev, 0x56, 0xba); /* bit 7-4, PIRQC; */
144 /* 3-0, PIRQB */
145 pci_write_config_byte(pdev, 0x57, 0xd0); /* bit 7-4, PIRQD */
146
147 /* enable function 5/6, audio/modem */
148 pci_read_config_byte(pdev, 0x85, &c);
149 c &= ~(0x3 << 2);
150 pci_write_config_byte(pdev, 0x85, c);
151
152 printk(KERN_INFO"via686b fix: ISA bridge done\n");
153}
154
155static void __init loongson2e_686b_func1_fixup(struct pci_dev *pdev)
156{
157 printk(KERN_INFO"via686b fix: IDE\n");
158
159 /* Modify IDE controller setup */
160 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 48);
161 pci_write_config_byte(pdev, PCI_COMMAND,
162 PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
163 PCI_COMMAND_MASTER);
164 pci_write_config_byte(pdev, 0x40, 0x0b);
165 /* legacy mode */
166 pci_write_config_byte(pdev, 0x42, 0x09);
167
168#if 1/* play safe, otherwise we may see notebook's usb keyboard lockup */
169 /* disable read prefetch/write post buffers */
170 pci_write_config_byte(pdev, 0x41, 0x02);
171
172 /* use 3/4 as fifo thresh hold */
173 pci_write_config_byte(pdev, 0x43, 0x0a);
174 pci_write_config_byte(pdev, 0x44, 0x00);
175
176 pci_write_config_byte(pdev, 0x45, 0x00);
177#else
178 pci_write_config_byte(pdev, 0x41, 0xc2);
179 pci_write_config_byte(pdev, 0x43, 0x35);
180 pci_write_config_byte(pdev, 0x44, 0x1c);
181
182 pci_write_config_byte(pdev, 0x45, 0x10);
183#endif
184
185 printk(KERN_INFO"via686b fix: IDE done\n");
186}
187
188static void __init loongson2e_686b_func2_fixup(struct pci_dev *pdev)
189{
190 /* irq routing */
191 pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 10);
192}
193
194static void __init loongson2e_686b_func3_fixup(struct pci_dev *pdev)
195{
196 /* irq routing */
197 pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 11);
198}
199
200static void __init loongson2e_686b_func5_fixup(struct pci_dev *pdev)
201{
202 unsigned int val;
203 unsigned char c;
204
205 /* enable IO */
206 pci_write_config_byte(pdev, PCI_COMMAND,
207 PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
208 PCI_COMMAND_MASTER);
209 pci_read_config_dword(pdev, 0x4, &val);
210 pci_write_config_dword(pdev, 0x4, val | 1);
211
212 /* route ac97 IRQ */
213 pci_write_config_byte(pdev, 0x3c, 9);
214
215 pci_read_config_byte(pdev, 0x8, &c);
216
217 /* link control: enable link & SGD PCM output */
218 pci_write_config_byte(pdev, 0x41, 0xcc);
219
220 /* disable game port, FM, midi, sb, enable write to reg2c-2f */
221 pci_write_config_byte(pdev, 0x42, 0x20);
222
223 /* we are using Avance logic codec */
224 pci_write_config_word(pdev, 0x2c, 0x1005);
225 pci_write_config_word(pdev, 0x2e, 0x4710);
226 pci_read_config_dword(pdev, 0x2c, &val);
227
228 pci_write_config_byte(pdev, 0x42, 0x0);
229}
230
231DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686,
232 loongson2e_686b_func0_fixup);
233DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1,
234 loongson2e_686b_func1_fixup);
235DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2,
236 loongson2e_686b_func2_fixup);
237DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3,
238 loongson2e_686b_func3_fixup);
239DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5,
240 loongson2e_686b_func5_fixup);
241DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB,
242 loongson2e_nec_fixup);
diff --git a/arch/mips/pci/fixup-malta.c b/arch/mips/pci/fixup-malta.c
index bf2c41d1e9..0f48498bc2 100644
--- a/arch/mips/pci/fixup-malta.c
+++ b/arch/mips/pci/fixup-malta.c
@@ -36,7 +36,7 @@ static char irq_tab[][5] __initdata = {
36 {0, PCID, PCIA, PCIB, PCIC } /* 21: PCI Slot 4 */ 36 {0, PCID, PCIA, PCIB, PCIC } /* 21: PCI Slot 4 */
37}; 37};
38 38
39int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 39int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
40{ 40{
41 int virq; 41 int virq;
42 virq = irq_tab[slot][pin]; 42 virq = irq_tab[slot][pin];
diff --git a/arch/mips/pci/fixup-mpc30x.c b/arch/mips/pci/fixup-mpc30x.c
index 3c9ae41f75..5911596257 100644
--- a/arch/mips/pci/fixup-mpc30x.c
+++ b/arch/mips/pci/fixup-mpc30x.c
@@ -34,7 +34,7 @@ static const int irq_tab_mpc30x[] __initdata = {
34 [29] = MQ200_IRQ, 34 [29] = MQ200_IRQ,
35}; 35};
36 36
37int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 37int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
38{ 38{
39 if (slot == 30) 39 if (slot == 30)
40 return internal_func_irqs[PCI_FUNC(dev->devfn)]; 40 return internal_func_irqs[PCI_FUNC(dev->devfn)];
diff --git a/arch/mips/pci/fixup-ocelot-c.c b/arch/mips/pci/fixup-ocelot-c.c
deleted file mode 100644
index d45494807a..0000000000
--- a/arch/mips/pci/fixup-ocelot-c.c
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * Copyright 2002 Momentum Computer Inc.
3 * Author: Matthew Dharm <mdharm@momenco.com>
4 *
5 * Based on work for the Linux port to the Ocelot board, which is
6 * Copyright 2001 MontaVista Software Inc.
7 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
8 *
9 * arch/mips/momentum/ocelot_g/pci.c
10 * Board-specific PCI routines for mv64340 controller.
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 */
17#include <linux/types.h>
18#include <linux/pci.h>
19#include <linux/kernel.h>
20#include <linux/init.h>
21
22int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
23{
24 int bus = dev->bus->number;
25
26 if (bus == 0 && slot == 1)
27 return 2; /* PCI-X A */
28 if (bus == 1 && slot == 1)
29 return 12; /* PCI-X B */
30 if (bus == 1 && slot == 2)
31 return 4; /* PCI B */
32
33return 0;
34 panic("Whooops in pcibios_map_irq");
35}
36
37/* Do platform specific device initialization at pci_enable_device() time */
38int pcibios_plat_dev_init(struct pci_dev *dev)
39{
40 return 0;
41}
diff --git a/arch/mips/pci/fixup-ocelot3.c b/arch/mips/pci/fixup-ocelot3.c
deleted file mode 100644
index ececc03ec6..0000000000
--- a/arch/mips/pci/fixup-ocelot3.c
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2004 Montavista Software Inc.
7 * Author: Manish Lachwani (mlachwani@mvista.com)
8 *
9 * Looking at the schematics for the Ocelot-3 board, there are
10 * two PCI busses and each bus has two PCI slots.
11 */
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/pci.h>
15#include <asm/mipsregs.h>
16
17/*
18 * Do platform specific device initialization at
19 * pci_enable_device() time
20 */
21int pcibios_plat_dev_init(struct pci_dev *dev)
22{
23 return 0;
24}
25
26int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
27{
28 int bus = dev->bus->number;
29
30 if (bus == 0 && slot == 1)
31 return 2; /* PCI-X A */
32 if (bus == 0 && slot == 2)
33 return 3; /* PCI-X B */
34 if (bus == 1 && slot == 1)
35 return 4; /* PCI A */
36 if (bus == 1 && slot == 2)
37 return 5; /* PCI B */
38
39return 0;
40 panic("Whooops in pcibios_map_irq");
41}
diff --git a/arch/mips/pci/fixup-pmcmsp.c b/arch/mips/pci/fixup-pmcmsp.c
new file mode 100644
index 0000000000..00261211db
--- /dev/null
+++ b/arch/mips/pci/fixup-pmcmsp.c
@@ -0,0 +1,216 @@
1/*
2 * PMC-Sierra MSP board specific pci fixups.
3 *
4 * Copyright 2001 MontaVista Software Inc.
5 * Copyright 2005-2007 PMC-Sierra, Inc
6 *
7 * Author: MontaVista Software, Inc.
8 * ppopov@mvista.com or source@mvista.com
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 *
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
16 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
18 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
21 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
22 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * You should have received a copy of the GNU General Public License along
27 * with this program; if not, write to the Free Software Foundation, Inc.,
28 * 675 Mass Ave, Cambridge, MA 02139, USA.
29 */
30
31#ifdef CONFIG_PCI
32
33#include <linux/types.h>
34#include <linux/pci.h>
35#include <linux/kernel.h>
36#include <linux/init.h>
37
38#include <asm/byteorder.h>
39
40#include <msp_pci.h>
41#include <msp_cic_int.h>
42
43/* PCI interrupt pins */
44#define IRQ4 MSP_INT_EXT4
45#define IRQ5 MSP_INT_EXT5
46#define IRQ6 MSP_INT_EXT6
47
48#if defined(CONFIG_PMC_MSP7120_GW)
49/* Garibaldi Board IRQ wiring to PCI slots */
50static char irq_tab[][5] __initdata = {
51 /* INTA INTB INTC INTD */
52 {0, 0, 0, 0, 0 }, /* (AD[0]): Unused */
53 {0, 0, 0, 0, 0 }, /* (AD[1]): Unused */
54 {0, 0, 0, 0, 0 }, /* (AD[2]): Unused */
55 {0, 0, 0, 0, 0 }, /* (AD[3]): Unused */
56 {0, 0, 0, 0, 0 }, /* (AD[4]): Unused */
57 {0, 0, 0, 0, 0 }, /* (AD[5]): Unused */
58 {0, 0, 0, 0, 0 }, /* (AD[6]): Unused */
59 {0, 0, 0, 0, 0 }, /* (AD[7]): Unused */
60 {0, 0, 0, 0, 0 }, /* (AD[8]): Unused */
61 {0, 0, 0, 0, 0 }, /* (AD[9]): Unused */
62 {0, 0, 0, 0, 0 }, /* 0 (AD[10]): Unused */
63 {0, 0, 0, 0, 0 }, /* 1 (AD[11]): Unused */
64 {0, 0, 0, 0, 0 }, /* 2 (AD[12]): Unused */
65 {0, 0, 0, 0, 0 }, /* 3 (AD[13]): Unused */
66 {0, 0, 0, 0, 0 }, /* 4 (AD[14]): Unused */
67 {0, 0, 0, 0, 0 }, /* 5 (AD[15]): Unused */
68 {0, 0, 0, 0, 0 }, /* 6 (AD[16]): Unused */
69 {0, 0, 0, 0, 0 }, /* 7 (AD[17]): Unused */
70 {0, 0, 0, 0, 0 }, /* 8 (AD[18]): Unused */
71 {0, 0, 0, 0, 0 }, /* 9 (AD[19]): Unused */
72 {0, 0, 0, 0, 0 }, /* 10 (AD[20]): Unused */
73 {0, 0, 0, 0, 0 }, /* 11 (AD[21]): Unused */
74 {0, 0, 0, 0, 0 }, /* 12 (AD[22]): Unused */
75 {0, 0, 0, 0, 0 }, /* 13 (AD[23]): Unused */
76 {0, 0, 0, 0, 0 }, /* 14 (AD[24]): Unused */
77 {0, 0, 0, 0, 0 }, /* 15 (AD[25]): Unused */
78 {0, 0, 0, 0, 0 }, /* 16 (AD[26]): Unused */
79 {0, 0, 0, 0, 0 }, /* 17 (AD[27]): Unused */
80 {0, IRQ4, IRQ4, 0, 0 }, /* 18 (AD[28]): slot 0 */
81 {0, 0, 0, 0, 0 }, /* 19 (AD[29]): Unused */
82 {0, IRQ5, IRQ5, 0, 0 }, /* 20 (AD[30]): slot 1 */
83 {0, IRQ6, IRQ6, 0, 0 } /* 21 (AD[31]): slot 2 */
84};
85
86#elif defined(CONFIG_PMC_MSP7120_EVAL)
87
88/* MSP7120 Eval Board IRQ wiring to PCI slots */
89static char irq_tab[][5] __initdata = {
90 /* INTA INTB INTC INTD */
91 {0, 0, 0, 0, 0 }, /* (AD[0]): Unused */
92 {0, 0, 0, 0, 0 }, /* (AD[1]): Unused */
93 {0, 0, 0, 0, 0 }, /* (AD[2]): Unused */
94 {0, 0, 0, 0, 0 }, /* (AD[3]): Unused */
95 {0, 0, 0, 0, 0 }, /* (AD[4]): Unused */
96 {0, 0, 0, 0, 0 }, /* (AD[5]): Unused */
97 {0, 0, 0, 0, 0 }, /* (AD[6]): Unused */
98 {0, 0, 0, 0, 0 }, /* (AD[7]): Unused */
99 {0, 0, 0, 0, 0 }, /* (AD[8]): Unused */
100 {0, 0, 0, 0, 0 }, /* (AD[9]): Unused */
101 {0, 0, 0, 0, 0 }, /* 0 (AD[10]): Unused */
102 {0, 0, 0, 0, 0 }, /* 1 (AD[11]): Unused */
103 {0, 0, 0, 0, 0 }, /* 2 (AD[12]): Unused */
104 {0, 0, 0, 0, 0 }, /* 3 (AD[13]): Unused */
105 {0, 0, 0, 0, 0 }, /* 4 (AD[14]): Unused */
106 {0, 0, 0, 0, 0 }, /* 5 (AD[15]): Unused */
107 {0, IRQ6, IRQ6, 0, 0 }, /* 6 (AD[16]): slot 3 (mini) */
108 {0, IRQ5, IRQ5, 0, 0 }, /* 7 (AD[17]): slot 2 (mini) */
109 {0, IRQ4, IRQ4, IRQ4, IRQ4}, /* 8 (AD[18]): slot 0 (PCI) */
110 {0, IRQ5, IRQ5, IRQ5, IRQ5}, /* 9 (AD[19]): slot 1 (PCI) */
111 {0, 0, 0, 0, 0 }, /* 10 (AD[20]): Unused */
112 {0, 0, 0, 0, 0 }, /* 11 (AD[21]): Unused */
113 {0, 0, 0, 0, 0 }, /* 12 (AD[22]): Unused */
114 {0, 0, 0, 0, 0 }, /* 13 (AD[23]): Unused */
115 {0, 0, 0, 0, 0 }, /* 14 (AD[24]): Unused */
116 {0, 0, 0, 0, 0 }, /* 15 (AD[25]): Unused */
117 {0, 0, 0, 0, 0 }, /* 16 (AD[26]): Unused */
118 {0, 0, 0, 0, 0 }, /* 17 (AD[27]): Unused */
119 {0, 0, 0, 0, 0 }, /* 18 (AD[28]): Unused */
120 {0, 0, 0, 0, 0 }, /* 19 (AD[29]): Unused */
121 {0, 0, 0, 0, 0 }, /* 20 (AD[30]): Unused */
122 {0, 0, 0, 0, 0 } /* 21 (AD[31]): Unused */
123};
124
125#else
126
127/* Unknown board -- don't assign any IRQs */
128static char irq_tab[][5] __initdata = {
129 /* INTA INTB INTC INTD */
130 {0, 0, 0, 0, 0 }, /* (AD[0]): Unused */
131 {0, 0, 0, 0, 0 }, /* (AD[1]): Unused */
132 {0, 0, 0, 0, 0 }, /* (AD[2]): Unused */
133 {0, 0, 0, 0, 0 }, /* (AD[3]): Unused */
134 {0, 0, 0, 0, 0 }, /* (AD[4]): Unused */
135 {0, 0, 0, 0, 0 }, /* (AD[5]): Unused */
136 {0, 0, 0, 0, 0 }, /* (AD[6]): Unused */
137 {0, 0, 0, 0, 0 }, /* (AD[7]): Unused */
138 {0, 0, 0, 0, 0 }, /* (AD[8]): Unused */
139 {0, 0, 0, 0, 0 }, /* (AD[9]): Unused */
140 {0, 0, 0, 0, 0 }, /* 0 (AD[10]): Unused */
141 {0, 0, 0, 0, 0 }, /* 1 (AD[11]): Unused */
142 {0, 0, 0, 0, 0 }, /* 2 (AD[12]): Unused */
143 {0, 0, 0, 0, 0 }, /* 3 (AD[13]): Unused */
144 {0, 0, 0, 0, 0 }, /* 4 (AD[14]): Unused */
145 {0, 0, 0, 0, 0 }, /* 5 (AD[15]): Unused */
146 {0, 0, 0, 0, 0 }, /* 6 (AD[16]): Unused */
147 {0, 0, 0, 0, 0 }, /* 7 (AD[17]): Unused */
148 {0, 0, 0, 0, 0 }, /* 8 (AD[18]): Unused */
149 {0, 0, 0, 0, 0 }, /* 9 (AD[19]): Unused */
150 {0, 0, 0, 0, 0 }, /* 10 (AD[20]): Unused */
151 {0, 0, 0, 0, 0 }, /* 11 (AD[21]): Unused */
152 {0, 0, 0, 0, 0 }, /* 12 (AD[22]): Unused */
153 {0, 0, 0, 0, 0 }, /* 13 (AD[23]): Unused */
154 {0, 0, 0, 0, 0 }, /* 14 (AD[24]): Unused */
155 {0, 0, 0, 0, 0 }, /* 15 (AD[25]): Unused */
156 {0, 0, 0, 0, 0 }, /* 16 (AD[26]): Unused */
157 {0, 0, 0, 0, 0 }, /* 17 (AD[27]): Unused */
158 {0, 0, 0, 0, 0 }, /* 18 (AD[28]): Unused */
159 {0, 0, 0, 0, 0 }, /* 19 (AD[29]): Unused */
160 {0, 0, 0, 0, 0 }, /* 20 (AD[30]): Unused */
161 {0, 0, 0, 0, 0 } /* 21 (AD[31]): Unused */
162};
163#endif
164
165/*****************************************************************************
166 *
167 * FUNCTION: pcibios_plat_dev_init
168 * _________________________________________________________________________
169 *
170 * DESCRIPTION: Perform platform specific device initialization at
171 * pci_enable_device() time.
172 * None are needed for the MSP7120 PCI Controller.
173 *
174 * INPUTS: dev - structure describing the PCI device
175 *
176 * OUTPUTS: none
177 *
178 * RETURNS: PCIBIOS_SUCCESSFUL
179 *
180 ****************************************************************************/
181int pcibios_plat_dev_init(struct pci_dev *dev)
182{
183 return PCIBIOS_SUCCESSFUL;
184}
185
186/*****************************************************************************
187 *
188 * FUNCTION: pcibios_map_irq
189 * _________________________________________________________________________
190 *
191 * DESCRIPTION: Perform board supplied PCI IRQ mapping routine.
192 *
193 * INPUTS: dev - unused
194 * slot - PCI slot. Identified by which bit of the AD[] bus
195 * drives the IDSEL line. AD[10] is 0, AD[31] is
196 * slot 21.
197 * pin - numbered using the scheme of the PCI_INTERRUPT_PIN
198 * field of the config header.
199 *
200 * OUTPUTS: none
201 *
202 * RETURNS: IRQ number
203 *
204 ****************************************************************************/
205int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
206{
207#if !defined(CONFIG_PMC_MSP7120_GW) && !defined(CONFIG_PMC_MSP7120_EVAL)
208 printk(KERN_WARNING "PCI: unknown board, no PCI IRQs assigned.\n");
209#endif
210 printk(KERN_WARNING "PCI: irq_tab returned %d for slot=%d pin=%d\n",
211 irq_tab[slot][pin], slot, pin);
212
213 return irq_tab[slot][pin];
214}
215
216#endif /* CONFIG_PCI */
diff --git a/arch/mips/pci/fixup-pnx8550.c b/arch/mips/pci/fixup-pnx8550.c
index 50546dab66..96857ac63b 100644
--- a/arch/mips/pci/fixup-pnx8550.c
+++ b/arch/mips/pci/fixup-pnx8550.c
@@ -45,7 +45,7 @@ void __init pcibios_fixup(void)
45 /* nothing to do here */ 45 /* nothing to do here */
46} 46}
47 47
48int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 48int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
49{ 49{
50 return pnx8550_irq_tab[slot][pin]; 50 return pnx8550_irq_tab[slot][pin];
51} 51}
diff --git a/arch/mips/pci/fixup-rbtx4927.c b/arch/mips/pci/fixup-rbtx4927.c
index ceeb186089..3cdbecb8e7 100644
--- a/arch/mips/pci/fixup-rbtx4927.c
+++ b/arch/mips/pci/fixup-rbtx4927.c
@@ -119,7 +119,7 @@ int pci_get_irq(struct pci_dev *dev, int pin)
119 return irq; 119 return irq;
120} 120}
121 121
122int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 122int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
123{ 123{
124 unsigned char irq; 124 unsigned char irq;
125 125
diff --git a/arch/mips/pci/fixup-sni.c b/arch/mips/pci/fixup-sni.c
index 36e5fb1b37..a45bedd172 100644
--- a/arch/mips/pci/fixup-sni.c
+++ b/arch/mips/pci/fixup-sni.c
@@ -120,7 +120,7 @@ static inline int is_rm300_revd(void)
120 return (csmsr & 0xa0) == 0x20; 120 return (csmsr & 0xa0) == 0x20;
121} 121}
122 122
123int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 123int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
124{ 124{
125 switch (sni_brd_type) { 125 switch (sni_brd_type) {
126 case SNI_BRD_PCI_TOWER: 126 case SNI_BRD_PCI_TOWER:
diff --git a/arch/mips/pci/fixup-tb0219.c b/arch/mips/pci/fixup-tb0219.c
index 734f2b71e1..720a2b720c 100644
--- a/arch/mips/pci/fixup-tb0219.c
+++ b/arch/mips/pci/fixup-tb0219.c
@@ -23,7 +23,7 @@
23 23
24#include <asm/vr41xx/tb0219.h> 24#include <asm/vr41xx/tb0219.h>
25 25
26int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 26int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
27{ 27{
28 int irq = -1; 28 int irq = -1;
29 29
diff --git a/arch/mips/pci/fixup-tb0226.c b/arch/mips/pci/fixup-tb0226.c
index c9e7cb4361..e3eedf4bf9 100644
--- a/arch/mips/pci/fixup-tb0226.c
+++ b/arch/mips/pci/fixup-tb0226.c
@@ -23,7 +23,7 @@
23#include <asm/vr41xx/giu.h> 23#include <asm/vr41xx/giu.h>
24#include <asm/vr41xx/tb0226.h> 24#include <asm/vr41xx/tb0226.h>
25 25
26int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 26int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
27{ 27{
28 int irq = -1; 28 int irq = -1;
29 29
diff --git a/arch/mips/pci/fixup-tb0287.c b/arch/mips/pci/fixup-tb0287.c
index fbe6bcb281..267ab3dc3d 100644
--- a/arch/mips/pci/fixup-tb0287.c
+++ b/arch/mips/pci/fixup-tb0287.c
@@ -22,7 +22,7 @@
22 22
23#include <asm/vr41xx/tb0287.h> 23#include <asm/vr41xx/tb0287.h>
24 24
25int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 25int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
26{ 26{
27 unsigned char bus; 27 unsigned char bus;
28 int irq = -1; 28 int irq = -1;
diff --git a/arch/mips/pci/fixup-tx4938.c b/arch/mips/pci/fixup-tx4938.c
index f455520ada..2485f47dfe 100644
--- a/arch/mips/pci/fixup-tx4938.c
+++ b/arch/mips/pci/fixup-tx4938.c
@@ -69,7 +69,7 @@ int pci_get_irq(struct pci_dev *dev, int pin)
69 return irq; 69 return irq;
70} 70}
71 71
72int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 72int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
73{ 73{
74 unsigned char irq = 0; 74 unsigned char irq = 0;
75 75
diff --git a/arch/mips/pci/fixup-vr4133.c b/arch/mips/pci/fixup-vr4133.c
index a8d9d22b13..de5e5f6bbf 100644
--- a/arch/mips/pci/fixup-vr4133.c
+++ b/arch/mips/pci/fixup-vr4133.c
@@ -169,7 +169,7 @@ void i8259_init(void)
169} 169}
170#endif 170#endif
171 171
172int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 172int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
173{ 173{
174 extern int pci_probe_only; 174 extern int pci_probe_only;
175 pci_probe_only = 1; 175 pci_probe_only = 1;
diff --git a/arch/mips/pci/fixup-wrppmc.c b/arch/mips/pci/fixup-wrppmc.c
index 3357c1300b..3d277549d5 100644
--- a/arch/mips/pci/fixup-wrppmc.c
+++ b/arch/mips/pci/fixup-wrppmc.c
@@ -25,7 +25,7 @@ static char pci_irq_tab[PCI_SLOT_MAXNR][5] __initdata = {
25 [6] = {0, WRPPMC_PCI_INTA_IRQ, 0, 0, 0}, 25 [6] = {0, WRPPMC_PCI_INTA_IRQ, 0, 0, 0},
26}; 26};
27 27
28int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 28int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
29{ 29{
30 return pci_irq_tab[slot][pin]; 30 return pci_irq_tab[slot][pin];
31} 31}
diff --git a/arch/mips/pci/fixup-yosemite.c b/arch/mips/pci/fixup-yosemite.c
index 81d77a587a..fdafb13a79 100644
--- a/arch/mips/pci/fixup-yosemite.c
+++ b/arch/mips/pci/fixup-yosemite.c
@@ -26,7 +26,7 @@
26#include <linux/init.h> 26#include <linux/init.h>
27#include <linux/pci.h> 27#include <linux/pci.h>
28 28
29int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 29int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
30{ 30{
31 if (pin == 0) 31 if (pin == 0)
32 return -1; 32 return -1;
diff --git a/arch/mips/pci/ops-bonito64.c b/arch/mips/pci/ops-bonito64.c
index dc35270b65..f742c51acf 100644
--- a/arch/mips/pci/ops-bonito64.c
+++ b/arch/mips/pci/ops-bonito64.c
@@ -29,83 +29,60 @@
29#define PCI_ACCESS_READ 0 29#define PCI_ACCESS_READ 0
30#define PCI_ACCESS_WRITE 1 30#define PCI_ACCESS_WRITE 1
31 31
32/* 32#ifdef CONFIG_LEMOTE_FULONG
33 * PCI configuration cycle AD bus definition 33#define CFG_SPACE_REG(offset) (void *)CKSEG1ADDR(BONITO_PCICFG_BASE | (offset))
34 */ 34#define ID_SEL_BEGIN 11
35/* Type 0 */ 35#else
36#define PCI_CFG_TYPE0_REG_SHF 0 36#define CFG_SPACE_REG(offset) (void *)CKSEG1ADDR(_pcictrl_bonito_pcicfg + (offset))
37#define PCI_CFG_TYPE0_FUNC_SHF 8 37#define ID_SEL_BEGIN 10
38#endif
39#define MAX_DEV_NUM (31 - ID_SEL_BEGIN)
38 40
39/* Type 1 */
40#define PCI_CFG_TYPE1_REG_SHF 0
41#define PCI_CFG_TYPE1_FUNC_SHF 8
42#define PCI_CFG_TYPE1_DEV_SHF 11
43#define PCI_CFG_TYPE1_BUS_SHF 16
44 41
45static int bonito64_pcibios_config_access(unsigned char access_type, 42static int bonito64_pcibios_config_access(unsigned char access_type,
46 struct pci_bus *bus, 43 struct pci_bus *bus,
47 unsigned int devfn, int where, 44 unsigned int devfn, int where,
48 u32 * data) 45 u32 * data)
49{ 46{
50 unsigned char busnum = bus->number; 47 u32 busnum = bus->number;
48 u32 addr, type;
51 u32 dummy; 49 u32 dummy;
52 u64 pci_addr; 50 void *addrp;
53 51 int device = PCI_SLOT(devfn);
54 /* Algorithmics Bonito64 system controller. */ 52 int function = PCI_FUNC(devfn);
53 int reg = where & ~3;
55 54
56 if ((busnum == 0) && (PCI_SLOT(devfn) > 21)) {
57 /* We number bus 0 devices from 0..21 */
58 return -1;
59 }
60
61 /* Clear cause register bits */
62 BONITO_PCICMD |= (BONITO_PCICMD_MABORT_CLR |
63 BONITO_PCICMD_MTABORT_CLR);
64
65 /*
66 * Setup pattern to be used as PCI "address" for
67 * Type 0 cycle
68 */
69 if (busnum == 0) { 55 if (busnum == 0) {
70 /* IDSEL */ 56 /* Type 0 configuration for onboard PCI bus */
71 pci_addr = (u64) 1 << (PCI_SLOT(devfn) + 10); 57 if (device > MAX_DEV_NUM)
72 } else { 58 return -1;
73 /* Bus number */
74 pci_addr = busnum << PCI_CFG_TYPE1_BUS_SHF;
75
76 /* Device number */
77 pci_addr |=
78 PCI_SLOT(devfn) << PCI_CFG_TYPE1_DEV_SHF;
79 }
80
81 /* Function (same for Type 0/1) */
82 pci_addr |= PCI_FUNC(devfn) << PCI_CFG_TYPE0_FUNC_SHF;
83
84 /* Register number (same for Type 0/1) */
85 pci_addr |= (where & ~0x3) << PCI_CFG_TYPE0_REG_SHF;
86 59
87 if (busnum == 0) { 60 addr = (1 << (device + ID_SEL_BEGIN)) | (function << 8) | reg;
88 /* Type 0 */ 61 type = 0;
89 BONITO_PCIMAP_CFG = pci_addr >> 16;
90 } else { 62 } else {
91 /* Type 1 */ 63 /* Type 1 configuration for offboard PCI bus */
92 BONITO_PCIMAP_CFG = (pci_addr >> 16) | 0x10000; 64 addr = (busnum << 16) | (device << 11) | (function << 8) | reg;
65 type = 0x10000;
93 } 66 }
94 67
95 pci_addr &= 0xffff; 68 /* Clear aborts */
69 BONITO_PCICMD |= BONITO_PCICMD_MABORT_CLR | BONITO_PCICMD_MTABORT_CLR;
70
71 BONITO_PCIMAP_CFG = (addr >> 16) | type;
96 72
97 /* Flush Bonito register block */ 73 /* Flush Bonito register block */
98 dummy = BONITO_PCIMAP_CFG; 74 dummy = BONITO_PCIMAP_CFG;
99 iob(); /* sync */ 75 mmiowb();
100 76
101 /* Perform access */ 77 addrp = CFG_SPACE_REG(addr & 0xffff);
102 if (access_type == PCI_ACCESS_WRITE) { 78 if (access_type == PCI_ACCESS_WRITE) {
103 *(volatile u32 *) (_pcictrl_bonito_pcicfg + (u32)pci_addr) = *(u32 *) data; 79 writel(cpu_to_le32(*data), addrp);
104 80#ifndef CONFIG_LEMOTE_FULONG
105 /* Wait till done */ 81 /* Wait till done */
106 while (BONITO_PCIMSTAT & 0xF); 82 while (BONITO_PCIMSTAT & 0xF);
83#endif
107 } else { 84 } else {
108 *(u32 *) data = *(volatile u32 *) (_pcictrl_bonito_pcicfg + (u32)pci_addr); 85 *data = le32_to_cpu(readl(addrp));
109 } 86 }
110 87
111 /* Detect Master/Target abort */ 88 /* Detect Master/Target abort */
@@ -121,6 +98,7 @@ static int bonito64_pcibios_config_access(unsigned char access_type,
121 } 98 }
122 99
123 return 0; 100 return 0;
101
124} 102}
125 103
126 104
diff --git a/arch/mips/pci/ops-marvell.c b/arch/mips/pci/ops-marvell.c
deleted file mode 100644
index 1ac5c59199..0000000000
--- a/arch/mips/pci/ops-marvell.c
+++ /dev/null
@@ -1,93 +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) 2003, 2004 Ralf Baechle (ralf@linux-mips.org)
7 */
8#include <linux/kernel.h>
9#include <linux/types.h>
10#include <linux/pci.h>
11
12#include <asm/marvell.h>
13
14static int mv_read_config(struct pci_bus *bus, unsigned int devfn,
15 int where, int size, u32 * val)
16{
17 struct mv_pci_controller *mvbc = bus->sysdata;
18 unsigned long address_reg, data_reg;
19 u32 address;
20
21 address_reg = mvbc->config_addr;
22 data_reg = mvbc->config_vreg;
23
24 /* Accessing device 31 crashes those Marvells. Since years.
25 Will they ever make sane controllers ... */
26 if (PCI_SLOT(devfn) == 31)
27 return PCIBIOS_DEVICE_NOT_FOUND;
28
29 address = (bus->number << 16) | (devfn << 8) |
30 (where & 0xfc) | 0x80000000;
31
32 /* start the configuration cycle */
33 MV_WRITE(address_reg, address);
34
35 switch (size) {
36 case 1:
37 *val = MV_READ_8(data_reg + (where & 0x3));
38 break;
39
40 case 2:
41 *val = MV_READ_16(data_reg + (where & 0x3));
42 break;
43
44 case 4:
45 *val = MV_READ(data_reg);
46 break;
47 }
48
49 return PCIBIOS_SUCCESSFUL;
50}
51
52static int mv_write_config(struct pci_bus *bus, unsigned int devfn,
53 int where, int size, u32 val)
54{
55 struct mv_pci_controller *mvbc = bus->sysdata;
56 unsigned long address_reg, data_reg;
57 u32 address;
58
59 address_reg = mvbc->config_addr;
60 data_reg = mvbc->config_vreg;
61
62 /* Accessing device 31 crashes those Marvells. Since years.
63 Will they ever make sane controllers ... */
64 if (PCI_SLOT(devfn) == 31)
65 return PCIBIOS_DEVICE_NOT_FOUND;
66
67 address = (bus->number << 16) | (devfn << 8) |
68 (where & 0xfc) | 0x80000000;
69
70 /* start the configuration cycle */
71 MV_WRITE(address_reg, address);
72
73 switch (size) {
74 case 1:
75 MV_WRITE_8(data_reg + (where & 0x3), val);
76 break;
77
78 case 2:
79 MV_WRITE_16(data_reg + (where & 0x3), val);
80 break;
81
82 case 4:
83 MV_WRITE(data_reg, val);
84 break;
85 }
86
87 return PCIBIOS_SUCCESSFUL;
88}
89
90struct pci_ops mv_pci_ops = {
91 .read = mv_read_config,
92 .write = mv_write_config
93};
diff --git a/arch/mips/pci/ops-nile4.c b/arch/mips/pci/ops-nile4.c
deleted file mode 100644
index a8d38dc8c5..0000000000
--- a/arch/mips/pci/ops-nile4.c
+++ /dev/null
@@ -1,147 +0,0 @@
1#include <linux/kernel.h>
2#include <linux/init.h>
3#include <linux/pci.h>
4#include <asm/bootinfo.h>
5
6#include <asm/lasat/lasat.h>
7#include <asm/gt64120.h>
8#include <asm/nile4.h>
9
10#define PCI_ACCESS_READ 0
11#define PCI_ACCESS_WRITE 1
12
13#define LO(reg) (reg / 4)
14#define HI(reg) (reg / 4 + 1)
15
16volatile unsigned long *const vrc_pciregs = (void *) Vrc5074_BASE;
17
18static DEFINE_SPINLOCK(nile4_pci_lock);
19
20static int nile4_pcibios_config_access(unsigned char access_type,
21 struct pci_bus *bus, unsigned int devfn, int where, u32 * val)
22{
23 unsigned char busnum = bus->number;
24 u32 adr, mask, err;
25
26 if ((busnum == 0) && (PCI_SLOT(devfn) > 8))
27 /* The addressing scheme chosen leaves room for just
28 * 8 devices on the first busnum (besides the PCI
29 * controller itself) */
30 return PCIBIOS_DEVICE_NOT_FOUND;
31
32 if ((busnum == 0) && (devfn == PCI_DEVFN(0, 0))) {
33 /* Access controller registers directly */
34 if (access_type == PCI_ACCESS_WRITE) {
35 vrc_pciregs[(0x200 + where) >> 2] = *val;
36 } else {
37 *val = vrc_pciregs[(0x200 + where) >> 2];
38 }
39 return PCIBIOS_SUCCESSFUL;
40 }
41
42 /* Temporarily map PCI Window 1 to config space */
43 mask = vrc_pciregs[LO(NILE4_PCIINIT1)];
44 vrc_pciregs[LO(NILE4_PCIINIT1)] = 0x0000001a | (busnum ? 0x200 : 0);
45
46 /* Clear PCI Error register. This also clears the Error Type
47 * bits in the Control register */
48 vrc_pciregs[LO(NILE4_PCIERR)] = 0;
49 vrc_pciregs[HI(NILE4_PCIERR)] = 0;
50
51 /* Setup address */
52 if (busnum == 0)
53 adr =
54 KSEG1ADDR(PCI_WINDOW1) +
55 ((1 << (PCI_SLOT(devfn) + 15)) | (PCI_FUNC(devfn) << 8)
56 | (where & ~3));
57 else
58 adr = KSEG1ADDR(PCI_WINDOW1) | (busnum << 16) | (devfn << 8) |
59 (where & ~3);
60
61 if (access_type == PCI_ACCESS_WRITE)
62 *(u32 *) adr = *val;
63 else
64 *val = *(u32 *) adr;
65
66 /* Check for master or target abort */
67 err = (vrc_pciregs[HI(NILE4_PCICTRL)] >> 5) & 0x7;
68
69 /* Restore PCI Window 1 */
70 vrc_pciregs[LO(NILE4_PCIINIT1)] = mask;
71
72 if (err)
73 return PCIBIOS_DEVICE_NOT_FOUND;
74
75 return PCIBIOS_SUCCESSFUL;
76}
77
78static int nile4_pcibios_read(struct pci_bus *bus, unsigned int devfn,
79 int where, int size, u32 * val)
80{
81 unsigned long flags;
82 u32 data = 0;
83 int err;
84
85 if ((size == 2) && (where & 1))
86 return PCIBIOS_BAD_REGISTER_NUMBER;
87 else if ((size == 4) && (where & 3))
88 return PCIBIOS_BAD_REGISTER_NUMBER;
89
90 spin_lock_irqsave(&nile4_pci_lock, flags);
91 err = nile4_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where,
92 &data);
93 spin_unlock_irqrestore(&nile4_pci_lock, flags);
94
95 if (err)
96 return err;
97
98 if (size == 1)
99 *val = (data >> ((where & 3) << 3)) & 0xff;
100 else if (size == 2)
101 *val = (data >> ((where & 3) << 3)) & 0xffff;
102 else
103 *val = data;
104
105 return PCIBIOS_SUCCESSFUL;
106}
107
108static int nile4_pcibios_write(struct pci_bus *bus, unsigned int devfn,
109 int where, int size, u32 val)
110{
111 unsigned long flags;
112 u32 data = 0;
113 int err;
114
115 if ((size == 2) && (where & 1))
116 return PCIBIOS_BAD_REGISTER_NUMBER;
117 else if ((size == 4) && (where & 3))
118 return PCIBIOS_BAD_REGISTER_NUMBER;
119
120 spin_lock_irqsave(&nile4_pci_lock, flags);
121 err = nile4_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where,
122 &data);
123 spin_unlock_irqrestore(&nile4_pci_lock, flags);
124
125 if (err)
126 return err;
127
128 if (size == 1)
129 data = (data & ~(0xff << ((where & 3) << 3))) |
130 (val << ((where & 3) << 3));
131 else if (size == 2)
132 data = (data & ~(0xffff << ((where & 3) << 3))) |
133 (val << ((where & 3) << 3));
134 else
135 data = val;
136
137 if (nile4_pcibios_config_access
138 (PCI_ACCESS_WRITE, bus, devfn, where, &data))
139 return -1;
140
141 return PCIBIOS_SUCCESSFUL;
142}
143
144struct pci_ops nile4_pci_ops = {
145 .read = nile4_pcibios_read,
146 .write = nile4_pcibios_write,
147};
diff --git a/arch/mips/pci/ops-pmcmsp.c b/arch/mips/pci/ops-pmcmsp.c
new file mode 100644
index 0000000000..09fa007c1d
--- /dev/null
+++ b/arch/mips/pci/ops-pmcmsp.c
@@ -0,0 +1,994 @@
1/*
2 * PMC-Sierra MSP board specific pci_ops
3 *
4 * Copyright 2001 MontaVista Software Inc.
5 * Copyright 2005-2007 PMC-Sierra, Inc
6 *
7 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
8 *
9 * Much of the code is derived from the original DDB5074 port by
10 * Geert Uytterhoeven <geert@sonycom.com>
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 *
17 */
18
19#define PCI_COUNTERS 1
20
21#include <linux/types.h>
22#include <linux/pci.h>
23#include <linux/interrupt.h>
24
25#if defined(CONFIG_PROC_FS) && defined(PCI_COUNTERS)
26#include <linux/proc_fs.h>
27#include <linux/seq_file.h>
28#endif /* CONFIG_PROC_FS && PCI_COUNTERS */
29
30#include <linux/kernel.h>
31#include <linux/init.h>
32
33#include <asm/byteorder.h>
34#if defined(CONFIG_PMC_MSP7120_GW) || defined(CONFIG_PMC_MSP7120_EVAL)
35#include <asm/mipsmtregs.h>
36#endif
37
38#include <msp_prom.h>
39#include <msp_cic_int.h>
40#include <msp_pci.h>
41#include <msp_regs.h>
42#include <msp_regops.h>
43
44#define PCI_ACCESS_READ 0
45#define PCI_ACCESS_WRITE 1
46
47#if defined(CONFIG_PROC_FS) && defined(PCI_COUNTERS)
48static char proc_init;
49extern struct proc_dir_entry *proc_bus_pci_dir;
50unsigned int pci_int_count[32];
51
52static void pci_proc_init(void);
53
54/*****************************************************************************
55 *
56 * FUNCTION: read_msp_pci_counts
57 * _________________________________________________________________________
58 *
59 * DESCRIPTION: Prints the count of how many times each PCI
60 * interrupt has asserted. Can be invoked by the
61 * /proc filesystem.
62 *
63 * INPUTS: page - part of STDOUT calculation
64 * off - part of STDOUT calculation
65 * count - part of STDOUT calculation
66 * data - unused
67 *
68 * OUTPUTS: start - new start location
69 * eof - end of file pointer
70 *
71 * RETURNS: len - STDOUT length
72 *
73 ****************************************************************************/
74static int read_msp_pci_counts(char *page, char **start, off_t off,
75 int count, int *eof, void *data)
76{
77 int i;
78 int len = 0;
79 unsigned int intcount, total = 0;
80
81 for (i = 0; i < 32; ++i) {
82 intcount = pci_int_count[i];
83 if (intcount != 0) {
84 len += sprintf(page + len, "[%d] = %u\n", i, intcount);
85 total += intcount;
86 }
87 }
88
89 len += sprintf(page + len, "total = %u\n", total);
90 if (len <= off+count)
91 *eof = 1;
92
93 *start = page + off;
94 len -= off;
95 if (len > count)
96 len = count;
97 if (len < 0)
98 len = 0;
99
100 return len;
101}
102
103/*****************************************************************************
104 *
105 * FUNCTION: gen_pci_cfg_wr
106 * _________________________________________________________________________
107 *
108 * DESCRIPTION: Generates a configuration write cycle for debug purposes.
109 * The IDSEL line asserted and location and data written are
110 * immaterial. Just want to be able to prove that a
111 * configuration write can be correctly generated on the
112 * PCI bus. Intent is that this function by invocable from
113 * the /proc filesystem.
114 *
115 * INPUTS: page - part of STDOUT calculation
116 * off - part of STDOUT calculation
117 * count - part of STDOUT calculation
118 * data - unused
119 *
120 * OUTPUTS: start - new start location
121 * eof - end of file pointer
122 *
123 * RETURNS: len - STDOUT length
124 *
125 ****************************************************************************/
126static int gen_pci_cfg_wr(char *page, char **start, off_t off,
127 int count, int *eof, void *data)
128{
129 unsigned char where = 0; /* Write to static Device/Vendor ID */
130 unsigned char bus_num = 0; /* Bus 0 */
131 unsigned char dev_fn = 0xF; /* Arbitrary device number */
132 u32 wr_data = 0xFF00AA00; /* Arbitrary data */
133 struct msp_pci_regs *preg = (void *)PCI_BASE_REG;
134 int len = 0;
135 unsigned long value;
136 int intr;
137
138 len += sprintf(page + len, "PMC MSP PCI: Beginning\n");
139
140 if (proc_init == 0) {
141 pci_proc_init();
142 proc_init = ~0;
143 }
144
145 len += sprintf(page + len, "PMC MSP PCI: Before Cfg Wr\n");
146
147 /*
148 * Generate PCI Configuration Write Cycle
149 */
150
151 /* Clear cause register bits */
152 preg->if_status = ~(BPCI_IFSTATUS_BC0F | BPCI_IFSTATUS_BC1F);
153
154 /* Setup address that is to appear on PCI bus */
155 preg->config_addr = BPCI_CFGADDR_ENABLE |
156 (bus_num << BPCI_CFGADDR_BUSNUM_SHF) |
157 (dev_fn << BPCI_CFGADDR_FUNCTNUM_SHF) |
158 (where & 0xFC);
159
160 value = cpu_to_le32(wr_data);
161
162 /* Launch the PCI configuration write cycle */
163 *PCI_CONFIG_SPACE_REG = value;
164
165 /*
166 * Check if the PCI configuration cycle (rd or wr) succeeded, by
167 * checking the status bits for errors like master or target abort.
168 */
169 intr = preg->if_status;
170
171 len += sprintf(page + len, "PMC MSP PCI: After Cfg Wr\n");
172
173 /* Handle STDOUT calculations */
174 if (len <= off+count)
175 *eof = 1;
176 *start = page + off;
177 len -= off;
178 if (len > count)
179 len = count;
180 if (len < 0)
181 len = 0;
182
183 return len;
184}
185
186/*****************************************************************************
187 *
188 * FUNCTION: pci_proc_init
189 * _________________________________________________________________________
190 *
191 * DESCRIPTION: Create entries in the /proc filesystem for debug access.
192 *
193 * INPUTS: none
194 *
195 * OUTPUTS: none
196 *
197 * RETURNS: none
198 *
199 ****************************************************************************/
200static void pci_proc_init(void)
201{
202 create_proc_read_entry("pmc_msp_pci_rd_cnt", 0, NULL,
203 read_msp_pci_counts, NULL);
204 create_proc_read_entry("pmc_msp_pci_cfg_wr", 0, NULL,
205 gen_pci_cfg_wr, NULL);
206}
207#endif /* CONFIG_PROC_FS && PCI_COUNTERS */
208
209spinlock_t bpci_lock = SPIN_LOCK_UNLOCKED;
210
211/*****************************************************************************
212 *
213 * STRUCT: pci_io_resource
214 * _________________________________________________________________________
215 *
216 * DESCRIPTION: Defines the address range that pciauto() will use to
217 * assign to the I/O BARs of PCI devices.
218 *
219 * Use the start and end addresses of the MSP7120 PCI Host
220 * Controller I/O space, in the form that they appear on the
221 * PCI bus AFTER MSP7120 has performed address translation.
222 *
223 * For I/O accesses, MSP7120 ignores OATRAN and maps I/O
224 * accesses into the bottom 0xFFF region of address space,
225 * so that is the range to put into the pci_io_resource
226 * struct.
227 *
228 * In MSP4200, the start address was 0x04 instead of the
229 * expected 0x00. Will just assume there was a good reason
230 * for this!
231 *
232 * NOTES: Linux, by default, will assign I/O space to the lowest
233 * region of address space. Since MSP7120 and Linux,
234 * by default, have no offset in between how they map, the
235 * io_offset element of pci_controller struct should be set
236 * to zero.
237 * ELEMENTS:
238 * name - String used for a meaningful name.
239 *
240 * start - Start address of MSP7120's I/O space, as MSP7120 presents
241 * the address on the PCI bus.
242 *
243 * end - End address of MSP7120's I/O space, as MSP7120 presents
244 * the address on the PCI bus.
245 *
246 * flags - Attributes indicating the type of resource. In this case,
247 * indicate I/O space.
248 *
249 ****************************************************************************/
250static struct resource pci_io_resource = {
251 .name = "pci IO space",
252 .start = 0x04,
253 .end = 0x0FFF,
254 .flags = IORESOURCE_IO /* I/O space */
255};
256
257/*****************************************************************************
258 *
259 * STRUCT: pci_mem_resource
260 * _________________________________________________________________________
261 *
262 * DESCRIPTION: Defines the address range that pciauto() will use to
263 * assign to the memory BARs of PCI devices.
264 *
265 * The .start and .end values are dependent upon how address
266 * translation is performed by the OATRAN regiser.
267 *
268 * The values to use for .start and .end are the values
269 * in the form they appear on the PCI bus AFTER MSP7120 has
270 * performed OATRAN address translation.
271 *
272 * ELEMENTS:
273 * name - String used for a meaningful name.
274 *
275 * start - Start address of MSP7120's memory space, as MSP7120 presents
276 * the address on the PCI bus.
277 *
278 * end - End address of MSP7120's memory space, as MSP7120 presents
279 * the address on the PCI bus.
280 *
281 * flags - Attributes indicating the type of resource. In this case,
282 * indicate memory space.
283 *
284 ****************************************************************************/
285static struct resource pci_mem_resource = {
286 .name = "pci memory space",
287 .start = MSP_PCI_SPACE_BASE,
288 .end = MSP_PCI_SPACE_END,
289 .flags = IORESOURCE_MEM /* memory space */
290};
291
292/*****************************************************************************
293 *
294 * FUNCTION: bpci_interrupt
295 * _________________________________________________________________________
296 *
297 * DESCRIPTION: PCI status interrupt handler. Updates the count of how
298 * many times each status bit has been set, then clears
299 * the status bits. If the appropriate macros are defined,
300 * these counts can be viewed via the /proc filesystem.
301 *
302 * INPUTS: irq - unused
303 * dev_id - unused
304 * pt_regs - unused
305 *
306 * OUTPUTS: none
307 *
308 * RETURNS: PCIBIOS_SUCCESSFUL - success
309 *
310 ****************************************************************************/
311static int bpci_interrupt(int irq, void *dev_id)
312{
313 struct msp_pci_regs *preg = (void *)PCI_BASE_REG;
314 unsigned int stat = preg->if_status;
315
316#if defined(CONFIG_PROC_FS) && defined(PCI_COUNTERS)
317 int i;
318 for (i = 0; i < 32; ++i) {
319 if ((1 << i) & stat)
320 ++pci_int_count[i];
321 }
322#endif /* PROC_FS && PCI_COUNTERS */
323
324 /* printk("PCI ISR: Status=%08X\n", stat); */
325
326 /* write to clear all asserted interrupts */
327 preg->if_status = stat;
328
329 return PCIBIOS_SUCCESSFUL;
330}
331
332/*****************************************************************************
333 *
334 * FUNCTION: msp_pcibios_config_access
335 * _________________________________________________________________________
336 *
337 * DESCRIPTION: Performs a PCI configuration access (rd or wr), then
338 * checks that the access succeeded by querying MSP7120's
339 * PCI status bits.
340 *
341 * INPUTS:
342 * access_type - kind of PCI configuration cycle to perform
343 * (read or write). Legal values are
344 * PCI_ACCESS_WRITE and PCI_ACCESS_READ.
345 *
346 * bus - pointer to the bus number of the device to
347 * be targetted for the configuration cycle.
348 * The only element of the pci_bus structure
349 * used is bus->number. This argument determines
350 * if the configuration access will be Type 0 or
351 * Type 1. Since MSP7120 assumes itself to be the
352 * PCI Host, any non-zero bus->number generates
353 * a Type 1 access.
354 *
355 * devfn - this is an 8-bit field. The lower three bits
356 * specify the function number of the device to
357 * be targetted for the configuration cycle, with
358 * all three-bit combinations being legal. The
359 * upper five bits specify the device number,
360 * with legal values being 10 to 31.
361 *
362 * where - address within the Configuration Header
363 * space to access.
364 *
365 * data - for write accesses, contains the data to
366 * write.
367 *
368 * OUTPUTS:
369 * data - for read accesses, contains the value read.
370 *
371 * RETURNS: PCIBIOS_SUCCESSFUL - success
372 * -1 - access failure
373 *
374 ****************************************************************************/
375int msp_pcibios_config_access(unsigned char access_type,
376 struct pci_bus *bus,
377 unsigned int devfn,
378 unsigned char where,
379 u32 *data)
380{
381 struct msp_pci_regs *preg = (void *)PCI_BASE_REG;
382 unsigned char bus_num = bus->number;
383 unsigned char dev_fn = (unsigned char)devfn;
384 unsigned long flags;
385 unsigned long intr;
386 unsigned long value;
387 static char pciirqflag;
388#if defined(CONFIG_PMC_MSP7120_GW) || defined(CONFIG_PMC_MSP7120_EVAL)
389 unsigned int vpe_status;
390#endif
391
392#if defined(CONFIG_PROC_FS) && defined(PCI_COUNTERS)
393 if (proc_init == 0) {
394 pci_proc_init();
395 proc_init = ~0;
396 }
397#endif /* CONFIG_PROC_FS && PCI_COUNTERS */
398
399 /*
400 * Just the first time this function invokes, allocate
401 * an interrupt line for PCI host status interrupts. The
402 * allocation assigns an interrupt handler to the interrupt.
403 */
404 if (pciirqflag == 0) {
405 request_irq(MSP_INT_PCI,/* Hardcoded internal MSP7120 wiring */
406 bpci_interrupt,
407 SA_SHIRQ | SA_INTERRUPT,
408 "PMC MSP PCI Host",
409 preg);
410 pciirqflag = ~0;
411 }
412
413#if defined(CONFIG_PMC_MSP7120_GW) || defined(CONFIG_PMC_MSP7120_EVAL)
414 local_irq_save(flags);
415 vpe_status = dvpe();
416#else
417 spin_lock_irqsave(&bpci_lock, flags);
418#endif
419
420 /*
421 * Clear PCI cause register bits.
422 *
423 * In Polo, the PCI Host had a dedicated DMA called the
424 * Block Copy (not to be confused with the general purpose Block
425 * Copy Engine block). There appear to have been special interrupts
426 * for this Block Copy, called Block Copy 0 Fault (BC0F) and
427 * Block Copy 1 Fault (BC1F). MSP4200 and MSP7120 don't have this
428 * dedicated Block Copy block, so these two interrupts are now
429 * marked reserved. In case the Block Copy is resurrected in a
430 * future design, maintain the code that treats these two interrupts
431 * specially.
432 *
433 * Write to clear all interrupts in the PCI status register, aside
434 * from BC0F and BC1F.
435 */
436 preg->if_status = ~(BPCI_IFSTATUS_BC0F | BPCI_IFSTATUS_BC1F);
437
438 /* Setup address that is to appear on PCI bus */
439 preg->config_addr = BPCI_CFGADDR_ENABLE |
440 (bus_num << BPCI_CFGADDR_BUSNUM_SHF) |
441 (dev_fn << BPCI_CFGADDR_FUNCTNUM_SHF) |
442 (where & 0xFC);
443
444 /* IF access is a PCI configuration write */
445 if (access_type == PCI_ACCESS_WRITE) {
446 value = cpu_to_le32(*data);
447 *PCI_CONFIG_SPACE_REG = value;
448 } else {
449 /* ELSE access is a PCI configuration read */
450 value = le32_to_cpu(*PCI_CONFIG_SPACE_REG);
451 *data = value;
452 }
453
454 /*
455 * Check if the PCI configuration cycle (rd or wr) succeeded, by
456 * checking the status bits for errors like master or target abort.
457 */
458 intr = preg->if_status;
459
460 /* Clear config access */
461 preg->config_addr = 0;
462
463 /* IF error occurred */
464 if (intr & ~(BPCI_IFSTATUS_BC0F | BPCI_IFSTATUS_BC1F)) {
465 /* Clear status bits */
466 preg->if_status = ~(BPCI_IFSTATUS_BC0F | BPCI_IFSTATUS_BC1F);
467
468#if defined(CONFIG_PMC_MSP7120_GW) || defined(CONFIG_PMC_MSP7120_EVAL)
469 evpe(vpe_status);
470 local_irq_restore(flags);
471#else
472 spin_unlock_irqrestore(&bpci_lock, flags);
473#endif
474
475 return -1;
476 }
477
478#if defined(CONFIG_PMC_MSP7120_GW) || defined(CONFIG_PMC_MSP7120_EVAL)
479 evpe(vpe_status);
480 local_irq_restore(flags);
481#else
482 spin_unlock_irqrestore(&bpci_lock, flags);
483#endif
484
485 return PCIBIOS_SUCCESSFUL;
486}
487
488/*****************************************************************************
489 *
490 * FUNCTION: msp_pcibios_read_config_byte
491 * _________________________________________________________________________
492 *
493 * DESCRIPTION: Read a byte from PCI configuration address spac
494 * Since the hardware can't address 8 bit chunks
495 * directly, read a 32-bit chunk, then mask off extraneous
496 * bits.
497 *
498 * INPUTS bus - structure containing attributes for the PCI bus
499 * that the read is destined for.
500 * devfn - device/function combination that the read is
501 * destined for.
502 * where - register within the Configuration Header space
503 * to access.
504 *
505 * OUTPUTS val - read data
506 *
507 * RETURNS: PCIBIOS_SUCCESSFUL - success
508 * -1 - read access failure
509 *
510 ****************************************************************************/
511static int
512msp_pcibios_read_config_byte(struct pci_bus *bus,
513 unsigned int devfn,
514 int where,
515 u32 *val)
516{
517 u32 data = 0;
518
519 /*
520 * If the config access did not complete normally (e.g., underwent
521 * master abort) do the PCI compliant thing, which is to supply an
522 * all ones value.
523 */
524 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn,
525 where, &data)) {
526 *val = 0xFFFFFFFF;
527 return -1;
528 }
529
530 *val = (data >> ((where & 3) << 3)) & 0x0ff;
531
532 return PCIBIOS_SUCCESSFUL;
533}
534
535/*****************************************************************************
536 *
537 * FUNCTION: msp_pcibios_read_config_word
538 * _________________________________________________________________________
539 *
540 * DESCRIPTION: Read a word (16 bits) from PCI configuration address space.
541 * Since the hardware can't address 16 bit chunks
542 * directly, read a 32-bit chunk, then mask off extraneous
543 * bits.
544 *
545 * INPUTS bus - structure containing attributes for the PCI bus
546 * that the read is destined for.
547 * devfn - device/function combination that the read is
548 * destined for.
549 * where - register within the Configuration Header space
550 * to access.
551 *
552 * OUTPUTS val - read data
553 *
554 * RETURNS: PCIBIOS_SUCCESSFUL - success
555 * PCIBIOS_BAD_REGISTER_NUMBER - bad register address
556 * -1 - read access failure
557 *
558 ****************************************************************************/
559static int
560msp_pcibios_read_config_word(struct pci_bus *bus,
561 unsigned int devfn,
562 int where,
563 u32 *val)
564{
565 u32 data = 0;
566
567 /* if (where & 1) */ /* Commented out non-compliant code.
568 * Should allow word access to configuration
569 * registers, with only exception being when
570 * the word access would wrap around into
571 * the next dword.
572 */
573 if ((where & 3) == 3) {
574 *val = 0xFFFFFFFF;
575 return PCIBIOS_BAD_REGISTER_NUMBER;
576 }
577
578 /*
579 * If the config access did not complete normally (e.g., underwent
580 * master abort) do the PCI compliant thing, which is to supply an
581 * all ones value.
582 */
583 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn,
584 where, &data)) {
585 *val = 0xFFFFFFFF;
586 return -1;
587 }
588
589 *val = (data >> ((where & 3) << 3)) & 0x0ffff;
590
591 return PCIBIOS_SUCCESSFUL;
592}
593
594/*****************************************************************************
595 *
596 * FUNCTION: msp_pcibios_read_config_dword
597 * _________________________________________________________________________
598 *
599 * DESCRIPTION: Read a double word (32 bits) from PCI configuration
600 * address space.
601 *
602 * INPUTS bus - structure containing attributes for the PCI bus
603 * that the read is destined for.
604 * devfn - device/function combination that the read is
605 * destined for.
606 * where - register within the Configuration Header space
607 * to access.
608 *
609 * OUTPUTS val - read data
610 *
611 * RETURNS: PCIBIOS_SUCCESSFUL - success
612 * PCIBIOS_BAD_REGISTER_NUMBER - bad register address
613 * -1 - read access failure
614 *
615 ****************************************************************************/
616static int
617msp_pcibios_read_config_dword(struct pci_bus *bus,
618 unsigned int devfn,
619 int where,
620 u32 *val)
621{
622 u32 data = 0;
623
624 /* Address must be dword aligned. */
625 if (where & 3) {
626 *val = 0xFFFFFFFF;
627 return PCIBIOS_BAD_REGISTER_NUMBER;
628 }
629
630 /*
631 * If the config access did not complete normally (e.g., underwent
632 * master abort) do the PCI compliant thing, which is to supply an
633 * all ones value.
634 */
635 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn,
636 where, &data)) {
637 *val = 0xFFFFFFFF;
638 return -1;
639 }
640
641 *val = data;
642
643 return PCIBIOS_SUCCESSFUL;
644}
645
646/*****************************************************************************
647 *
648 * FUNCTION: msp_pcibios_write_config_byte
649 * _________________________________________________________________________
650 *
651 * DESCRIPTION: Write a byte to PCI configuration address space.
652 * Since the hardware can't address 8 bit chunks
653 * directly, a read-modify-write is performed.
654 *
655 * INPUTS bus - structure containing attributes for the PCI bus
656 * that the write is destined for.
657 * devfn - device/function combination that the write is
658 * destined for.
659 * where - register within the Configuration Header space
660 * to access.
661 * val - value to write
662 *
663 * OUTPUTS none
664 *
665 * RETURNS: PCIBIOS_SUCCESSFUL - success
666 * -1 - write access failure
667 *
668 ****************************************************************************/
669static int
670msp_pcibios_write_config_byte(struct pci_bus *bus,
671 unsigned int devfn,
672 int where,
673 u8 val)
674{
675 u32 data = 0;
676
677 /* read config space */
678 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn,
679 where, &data))
680 return -1;
681
682 /* modify the byte within the dword */
683 data = (data & ~(0xff << ((where & 3) << 3))) |
684 (val << ((where & 3) << 3));
685
686 /* write back the full dword */
687 if (msp_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn,
688 where, &data))
689 return -1;
690
691 return PCIBIOS_SUCCESSFUL;
692}
693
694/*****************************************************************************
695 *
696 * FUNCTION: msp_pcibios_write_config_word
697 * _________________________________________________________________________
698 *
699 * DESCRIPTION: Write a word (16-bits) to PCI configuration address space.
700 * Since the hardware can't address 16 bit chunks
701 * directly, a read-modify-write is performed.
702 *
703 * INPUTS bus - structure containing attributes for the PCI bus
704 * that the write is destined for.
705 * devfn - device/function combination that the write is
706 * destined for.
707 * where - register within the Configuration Header space
708 * to access.
709 * val - value to write
710 *
711 * OUTPUTS none
712 *
713 * RETURNS: PCIBIOS_SUCCESSFUL - success
714 * PCIBIOS_BAD_REGISTER_NUMBER - bad register address
715 * -1 - write access failure
716 *
717 ****************************************************************************/
718static int
719msp_pcibios_write_config_word(struct pci_bus *bus,
720 unsigned int devfn,
721 int where,
722 u16 val)
723{
724 u32 data = 0;
725
726 /* Fixed non-compliance: if (where & 1) */
727 if ((where & 3) == 3)
728 return PCIBIOS_BAD_REGISTER_NUMBER;
729
730 /* read config space */
731 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn,
732 where, &data))
733 return -1;
734
735 /* modify the word within the dword */
736 data = (data & ~(0xffff << ((where & 3) << 3))) |
737 (val << ((where & 3) << 3));
738
739 /* write back the full dword */
740 if (msp_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn,
741 where, &data))
742 return -1;
743
744 return PCIBIOS_SUCCESSFUL;
745}
746
747/*****************************************************************************
748 *
749 * FUNCTION: msp_pcibios_write_config_dword
750 * _________________________________________________________________________
751 *
752 * DESCRIPTION: Write a double word (32-bits) to PCI configuration address
753 * space.
754 *
755 * INPUTS bus - structure containing attributes for the PCI bus
756 * that the write is destined for.
757 * devfn - device/function combination that the write is
758 * destined for.
759 * where - register within the Configuration Header space
760 * to access.
761 * val - value to write
762 *
763 * OUTPUTS none
764 *
765 * RETURNS: PCIBIOS_SUCCESSFUL - success
766 * PCIBIOS_BAD_REGISTER_NUMBER - bad register address
767 * -1 - write access failure
768 *
769 ****************************************************************************/
770static int
771msp_pcibios_write_config_dword(struct pci_bus *bus,
772 unsigned int devfn,
773 int where,
774 u32 val)
775{
776 /* check that address is dword aligned */
777 if (where & 3)
778 return PCIBIOS_BAD_REGISTER_NUMBER;
779
780 /* perform write */
781 if (msp_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn,
782 where, &val))
783 return -1;
784
785 return PCIBIOS_SUCCESSFUL;
786}
787
788/*****************************************************************************
789 *
790 * FUNCTION: msp_pcibios_read_config
791 * _________________________________________________________________________
792 *
793 * DESCRIPTION: Interface the PCI configuration read request with
794 * the appropriate function, based on how many bytes
795 * the read request is.
796 *
797 * INPUTS bus - structure containing attributes for the PCI bus
798 * that the write is destined for.
799 * devfn - device/function combination that the write is
800 * destined for.
801 * where - register within the Configuration Header space
802 * to access.
803 * size - in units of bytes, should be 1, 2, or 4.
804 *
805 * OUTPUTS val - value read, with any extraneous bytes masked
806 * to zero.
807 *
808 * RETURNS: PCIBIOS_SUCCESSFUL - success
809 * -1 - failure
810 *
811 ****************************************************************************/
812int
813msp_pcibios_read_config(struct pci_bus *bus,
814 unsigned int devfn,
815 int where,
816 int size,
817 u32 *val)
818{
819 if (size == 1) {
820 if (msp_pcibios_read_config_byte(bus, devfn, where, val)) {
821 return -1;
822 }
823 } else if (size == 2) {
824 if (msp_pcibios_read_config_word(bus, devfn, where, val)) {
825 return -1;
826 }
827 } else if (size == 4) {
828 if (msp_pcibios_read_config_dword(bus, devfn, where, val)) {
829 return -1;
830 }
831 } else {
832 *val = 0xFFFFFFFF;
833 return -1;
834 }
835
836 return PCIBIOS_SUCCESSFUL;
837}
838
839/*****************************************************************************
840 *
841 * FUNCTION: msp_pcibios_write_config
842 * _________________________________________________________________________
843 *
844 * DESCRIPTION: Interface the PCI configuration write request with
845 * the appropriate function, based on how many bytes
846 * the read request is.
847 *
848 * INPUTS bus - structure containing attributes for the PCI bus
849 * that the write is destined for.
850 * devfn - device/function combination that the write is
851 * destined for.
852 * where - register within the Configuration Header space
853 * to access.
854 * size - in units of bytes, should be 1, 2, or 4.
855 * val - value to write
856 *
857 * OUTPUTS: none
858 *
859 * RETURNS: PCIBIOS_SUCCESSFUL - success
860 * -1 - failure
861 *
862 ****************************************************************************/
863int
864msp_pcibios_write_config(struct pci_bus *bus,
865 unsigned int devfn,
866 int where,
867 int size,
868 u32 val)
869{
870 if (size == 1) {
871 if (msp_pcibios_write_config_byte(bus, devfn,
872 where, (u8)(0xFF & val))) {
873 return -1;
874 }
875 } else if (size == 2) {
876 if (msp_pcibios_write_config_word(bus, devfn,
877 where, (u16)(0xFFFF & val))) {
878 return -1;
879 }
880 } else if (size == 4) {
881 if (msp_pcibios_write_config_dword(bus, devfn, where, val)) {
882 return -1;
883 }
884 } else {
885 return -1;
886 }
887
888 return PCIBIOS_SUCCESSFUL;
889}
890
891/*****************************************************************************
892 *
893 * STRUCTURE: msp_pci_ops
894 * _________________________________________________________________________
895 *
896 * DESCRIPTION: structure to abstract the hardware specific PCI
897 * configuration accesses.
898 *
899 * ELEMENTS:
900 * read - function for Linux to generate PCI Configuration reads.
901 * write - function for Linux to generate PCI Configuration writes.
902 *
903 ****************************************************************************/
904struct pci_ops msp_pci_ops = {
905 .read = msp_pcibios_read_config,
906 .write = msp_pcibios_write_config
907};
908
909/*****************************************************************************
910 *
911 * STRUCTURE: msp_pci_controller
912 * _________________________________________________________________________
913 *
914 * Describes the attributes of the MSP7120 PCI Host Controller
915 *
916 * ELEMENTS:
917 * pci_ops - abstracts the hardware specific PCI configuration
918 * accesses.
919 *
920 * mem_resource - address range pciauto() uses to assign to PCI device
921 * memory BARs.
922 *
923 * mem_offset - offset between how MSP7120 outbound PCI memory
924 * transaction addresses appear on the PCI bus and how Linux
925 * wants to configure memory BARs of the PCI devices.
926 * MSP7120 does nothing funky, so just set to zero.
927 *
928 * io_resource - address range pciauto() uses to assign to PCI device
929 * I/O BARs.
930 *
931 * io_offset - offset between how MSP7120 outbound PCI I/O
932 * transaction addresses appear on the PCI bus and how
933 * Linux defaults to configure I/O BARs of the PCI devices.
934 * MSP7120 maps outbound I/O accesses into the bottom
935 * bottom 4K of PCI address space (and ignores OATRAN).
936 * Since the Linux default is to configure I/O BARs to the
937 * bottom 4K, no special offset is needed. Just set to zero.
938 *
939 ****************************************************************************/
940static struct pci_controller msp_pci_controller = {
941 .pci_ops = &msp_pci_ops,
942 .mem_resource = &pci_mem_resource,
943 .mem_offset = 0,
944 .io_resource = &pci_io_resource,
945 .io_offset = 0
946};
947
948/*****************************************************************************
949 *
950 * FUNCTION: msp_pci_init
951 * _________________________________________________________________________
952 *
953 * DESCRIPTION: Initialize the PCI Host Controller and register it with
954 * Linux so Linux can seize control of the PCI bus.
955 *
956 ****************************************************************************/
957void __init msp_pci_init(void)
958{
959 struct msp_pci_regs *preg = (void *)PCI_BASE_REG;
960 u32 id;
961
962 /* Extract Device ID */
963 id = read_reg32(PCI_JTAG_DEVID_REG, 0xFFFF) >> 12;
964
965 /* Check if JTAG ID identifies MSP7120 */
966 if (!MSP_HAS_PCI(id)) {
967 printk(KERN_WARNING "PCI: No PCI; id reads as %x\n", id);
968 goto no_pci;
969 }
970
971 /*
972 * Enable flushing of the PCI-SDRAM queue upon a read
973 * of the SDRAM's Memory Configuration Register.
974 */
975 *(unsigned long *)QFLUSH_REG_1 = 3;
976
977 /* Configure PCI Host Controller. */
978 preg->if_status = ~0; /* Clear cause register bits */
979 preg->config_addr = 0; /* Clear config access */
980 preg->oatran = MSP_PCI_OATRAN; /* PCI outbound addr translation */
981 preg->if_mask = 0xF8BF87C0; /* Enable all PCI status interrupts */
982
983 /* configure so inb(), outb(), and family are functional */
984 set_io_port_base(MSP_PCI_IOSPACE_BASE);
985
986 /* Tell Linux the details of the MSP7120 PCI Host Controller */
987 register_pci_controller(&msp_pci_controller);
988
989 return;
990
991no_pci:
992 /* Disable PCI channel */
993 printk(KERN_WARNING "PCI: no host PCI bus detected\n");
994}
diff --git a/arch/mips/pci/ops-tx4938.c b/arch/mips/pci/ops-tx4938.c
index 4450070845..a450c40620 100644
--- a/arch/mips/pci/ops-tx4938.c
+++ b/arch/mips/pci/ops-tx4938.c
@@ -46,50 +46,63 @@ struct resource tx4938_pcic1_pci_mem_resource = {
46 .flags = IORESOURCE_MEM 46 .flags = IORESOURCE_MEM
47}; 47};
48 48
49static int mkaddr(int bus, int dev_fn, int where, int *flagsp) 49static int mkaddr(int bus, int dev_fn, int where,
50 struct tx4938_pcic_reg *pcicptr)
50{ 51{
51 if (bus > 0) { 52 if (bus > 0) {
52 /* Type 1 configuration */ 53 /* Type 1 configuration */
53 tx4938_pcicptr->g2pcfgadrs = ((bus & 0xff) << 0x10) | 54 pcicptr->g2pcfgadrs = ((bus & 0xff) << 0x10) |
54 ((dev_fn & 0xff) << 0x08) | (where & 0xfc) | 1; 55 ((dev_fn & 0xff) << 0x08) | (where & 0xfc) | 1;
55 } else { 56 } else {
56 if (dev_fn >= PCI_DEVFN(TX4938_PCIC_MAX_DEVNU, 0)) 57 if (dev_fn >= PCI_DEVFN(TX4938_PCIC_MAX_DEVNU, 0))
57 return -1; 58 return -1;
58 59
59 /* Type 0 configuration */ 60 /* Type 0 configuration */
60 tx4938_pcicptr->g2pcfgadrs = ((bus & 0xff) << 0x10) | 61 pcicptr->g2pcfgadrs = ((bus & 0xff) << 0x10) |
61 ((dev_fn & 0xff) << 0x08) | (where & 0xfc); 62 ((dev_fn & 0xff) << 0x08) | (where & 0xfc);
62 } 63 }
63 /* clear M_ABORT and Disable M_ABORT Int. */ 64 /* clear M_ABORT and Disable M_ABORT Int. */
64 tx4938_pcicptr->pcistatus = 65 pcicptr->pcistatus =
65 (tx4938_pcicptr->pcistatus & 0x0000ffff) | 66 (pcicptr->pcistatus & 0x0000ffff) |
66 (PCI_STATUS_REC_MASTER_ABORT << 16); 67 (PCI_STATUS_REC_MASTER_ABORT << 16);
67 tx4938_pcicptr->pcimask &= ~PCI_STATUS_REC_MASTER_ABORT; 68 pcicptr->pcimask &= ~PCI_STATUS_REC_MASTER_ABORT;
68 69
69 return 0; 70 return 0;
70} 71}
71 72
72static int check_abort(int flags) 73static int check_abort(struct tx4938_pcic_reg *pcicptr)
73{ 74{
74 int code = PCIBIOS_SUCCESSFUL; 75 int code = PCIBIOS_SUCCESSFUL;
75 /* wait write cycle completion before checking error status */ 76 /* wait write cycle completion before checking error status */
76 while (tx4938_pcicptr->pcicstatus & TX4938_PCIC_PCICSTATUS_IWB) 77 while (pcicptr->pcicstatus & TX4938_PCIC_PCICSTATUS_IWB)
77 ; 78 ;
78 if (tx4938_pcicptr->pcistatus & (PCI_STATUS_REC_MASTER_ABORT << 16)) { 79 if (pcicptr->pcistatus & (PCI_STATUS_REC_MASTER_ABORT << 16)) {
79 tx4938_pcicptr->pcistatus = 80 pcicptr->pcistatus =
80 (tx4938_pcicptr-> 81 (pcicptr->
81 pcistatus & 0x0000ffff) | (PCI_STATUS_REC_MASTER_ABORT 82 pcistatus & 0x0000ffff) | (PCI_STATUS_REC_MASTER_ABORT
82 << 16); 83 << 16);
83 tx4938_pcicptr->pcimask |= PCI_STATUS_REC_MASTER_ABORT; 84 pcicptr->pcimask |= PCI_STATUS_REC_MASTER_ABORT;
84 code = PCIBIOS_DEVICE_NOT_FOUND; 85 code = PCIBIOS_DEVICE_NOT_FOUND;
85 } 86 }
86 return code; 87 return code;
87} 88}
88 89
90extern struct pci_controller tx4938_pci_controller[];
91extern struct tx4938_pcic_reg *get_tx4938_pcicptr(int ch);
92
93static struct tx4938_pcic_reg *pci_bus_to_pcicptr(struct pci_bus *bus)
94{
95 struct pci_controller *channel = bus->sysdata;
96 return get_tx4938_pcicptr(channel - &tx4938_pci_controller[0]);
97}
98
89static int tx4938_pcibios_read_config(struct pci_bus *bus, unsigned int devfn, 99static int tx4938_pcibios_read_config(struct pci_bus *bus, unsigned int devfn,
90 int where, int size, u32 * val) 100 int where, int size, u32 * val)
91{ 101{
92 int flags, retval, dev, busno, func; 102 int retval, dev, busno, func;
103 struct tx4938_pcic_reg *pcicptr = pci_bus_to_pcicptr(bus);
104 void __iomem *cfgdata =
105 (void __iomem *)(unsigned long)&pcicptr->g2pcfgdata;
93 106
94 dev = PCI_SLOT(devfn); 107 dev = PCI_SLOT(devfn);
95 func = PCI_FUNC(devfn); 108 func = PCI_FUNC(devfn);
@@ -101,32 +114,32 @@ static int tx4938_pcibios_read_config(struct pci_bus *bus, unsigned int devfn,
101 busno = 0; 114 busno = 0;
102 } 115 }
103 116
104 if (mkaddr(busno, devfn, where, &flags)) 117 if (mkaddr(busno, devfn, where, pcicptr))
105 return -1; 118 return -1;
106 119
107 switch (size) { 120 switch (size) {
108 case 1: 121 case 1:
109 *val = *(volatile u8 *) ((unsigned long) & tx4938_pcicptr->g2pcfgdata |
110#ifdef __BIG_ENDIAN 122#ifdef __BIG_ENDIAN
111 ((where & 3) ^ 3)); 123 cfgdata += (where & 3) ^ 3;
112#else 124#else
113 (where & 3)); 125 cfgdata += where & 3;
114#endif 126#endif
127 *val = __raw_readb(cfgdata);
115 break; 128 break;
116 case 2: 129 case 2:
117 *val = *(volatile u16 *) ((unsigned long) & tx4938_pcicptr->g2pcfgdata |
118#ifdef __BIG_ENDIAN 130#ifdef __BIG_ENDIAN
119 ((where & 3) ^ 2)); 131 cfgdata += (where & 2) ^ 2;
120#else 132#else
121 (where & 3)); 133 cfgdata += where & 2;
122#endif 134#endif
135 *val = __raw_readw(cfgdata);
123 break; 136 break;
124 case 4: 137 case 4:
125 *val = tx4938_pcicptr->g2pcfgdata; 138 *val = __raw_readl(cfgdata);
126 break; 139 break;
127 } 140 }
128 141
129 retval = check_abort(flags); 142 retval = check_abort(pcicptr);
130 if (retval == PCIBIOS_DEVICE_NOT_FOUND) 143 if (retval == PCIBIOS_DEVICE_NOT_FOUND)
131 *val = 0xffffffff; 144 *val = 0xffffffff;
132 145
@@ -136,7 +149,10 @@ static int tx4938_pcibios_read_config(struct pci_bus *bus, unsigned int devfn,
136static int tx4938_pcibios_write_config(struct pci_bus *bus, unsigned int devfn, int where, 149static int tx4938_pcibios_write_config(struct pci_bus *bus, unsigned int devfn, int where,
137 int size, u32 val) 150 int size, u32 val)
138{ 151{
139 int flags, dev, busno, func; 152 int dev, busno, func;
153 struct tx4938_pcic_reg *pcicptr = pci_bus_to_pcicptr(bus);
154 void __iomem *cfgdata =
155 (void __iomem *)(unsigned long)&pcicptr->g2pcfgdata;
140 156
141 busno = bus->number; 157 busno = bus->number;
142 dev = PCI_SLOT(devfn); 158 dev = PCI_SLOT(devfn);
@@ -149,32 +165,32 @@ static int tx4938_pcibios_write_config(struct pci_bus *bus, unsigned int devfn,
149 busno = 0; 165 busno = 0;
150 } 166 }
151 167
152 if (mkaddr(busno, devfn, where, &flags)) 168 if (mkaddr(busno, devfn, where, pcicptr))
153 return -1; 169 return -1;
154 170
155 switch (size) { 171 switch (size) {
156 case 1: 172 case 1:
157 *(volatile u8 *) ((unsigned long) & tx4938_pcicptr->g2pcfgdata |
158#ifdef __BIG_ENDIAN 173#ifdef __BIG_ENDIAN
159 ((where & 3) ^ 3)) = val; 174 cfgdata += (where & 3) ^ 3;
160#else 175#else
161 (where & 3)) = val; 176 cfgdata += where & 3;
162#endif 177#endif
178 __raw_writeb(val, cfgdata);
163 break; 179 break;
164 case 2: 180 case 2:
165 *(volatile u16 *) ((unsigned long) & tx4938_pcicptr->g2pcfgdata |
166#ifdef __BIG_ENDIAN 181#ifdef __BIG_ENDIAN
167 ((where & 0x3) ^ 0x2)) = val; 182 cfgdata += (where & 2) ^ 2;
168#else 183#else
169 (where & 3)) = val; 184 cfgdata += where & 2;
170#endif 185#endif
186 __raw_writew(val, cfgdata);
171 break; 187 break;
172 case 4: 188 case 4:
173 tx4938_pcicptr->g2pcfgdata = val; 189 __raw_writel(val, cfgdata);
174 break; 190 break;
175 } 191 }
176 192
177 return check_abort(flags); 193 return check_abort(pcicptr);
178} 194}
179 195
180struct pci_ops tx4938_pci_ops = { 196struct pci_ops tx4938_pci_ops = {
diff --git a/arch/mips/pci/pci-bcm1480.c b/arch/mips/pci/pci-bcm1480.c
index d7b9e1349f..2b4e30c7d1 100644
--- a/arch/mips/pci/pci-bcm1480.c
+++ b/arch/mips/pci/pci-bcm1480.c
@@ -74,8 +74,9 @@ static inline void WRITECFG32(u32 addr, u32 data)
74 *(u32 *)(cfg_space + (addr & ~3)) = data; 74 *(u32 *)(cfg_space + (addr & ~3)) = data;
75} 75}
76 76
77int pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 77int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
78{ 78{
79 This is b0rked.
79 return dev->irq; 80 return dev->irq;
80} 81}
81 82
diff --git a/arch/mips/pci/pci-dac.c b/arch/mips/pci/pci-dac.c
deleted file mode 100644
index 0f0ea1b7d4..0000000000
--- a/arch/mips/pci/pci-dac.c
+++ /dev/null
@@ -1,79 +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, 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-ddb5477.c b/arch/mips/pci/pci-ddb5477.c
index d071bc375b..7363e18778 100644
--- a/arch/mips/pci/pci-ddb5477.c
+++ b/arch/mips/pci/pci-ddb5477.c
@@ -131,7 +131,7 @@ static unsigned char rockhopperII_irq_map[MAX_SLOT_NUM] = {
131 /* SLOT: 20, AD:31 */ VRC5477_IRQ_IOPCI_INTA, /* vrc5477 usb host */ 131 /* SLOT: 20, AD:31 */ VRC5477_IRQ_IOPCI_INTA, /* vrc5477 usb host */
132}; 132};
133 133
134int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 134int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
135{ 135{
136 int slot_num; 136 int slot_num;
137 unsigned char *slot_irq_map; 137 unsigned char *slot_irq_map;
diff --git a/arch/mips/pci/pci-ev64120.c b/arch/mips/pci/pci-ev64120.c
deleted file mode 100644
index a84f594b5a..0000000000
--- a/arch/mips/pci/pci-ev64120.c
+++ /dev/null
@@ -1,22 +0,0 @@
1#include <linux/pci.h>
2#include <asm/irq.h>
3
4int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
5{
6 int irq;
7
8 if (!pin)
9 return 0;
10
11 irq = allocate_irqno();
12 if (irq < 0)
13 return 0;
14
15 return irq;
16}
17
18/* Do platform specific device initialization at pci_enable_device() time */
19int pcibios_plat_dev_init(struct pci_dev *dev)
20{
21 return 0;
22}
diff --git a/arch/mips/pci/pci-ip27.c b/arch/mips/pci/pci-ip27.c
index 405ce01527..a322543ac3 100644
--- a/arch/mips/pci/pci-ip27.c
+++ b/arch/mips/pci/pci-ip27.c
@@ -134,7 +134,7 @@ int __init bridge_probe(nasid_t nasid, int widget_id, int masterwid)
134 * A given PCI device, in general, should be able to intr any of the cpus 134 * A given PCI device, in general, should be able to intr any of the cpus
135 * on any one of the hubs connected to its xbow. 135 * on any one of the hubs connected to its xbow.
136 */ 136 */
137int __devinit pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 137int __devinit pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
138{ 138{
139 struct bridge_controller *bc = BRIDGE_CONTROLLER(dev->bus); 139 struct bridge_controller *bc = BRIDGE_CONTROLLER(dev->bus);
140 int irq = bc->pci_int[slot]; 140 int irq = bc->pci_int[slot];
diff --git a/arch/mips/pci/pci-lasat.c b/arch/mips/pci/pci-lasat.c
deleted file mode 100644
index 985784a3e6..0000000000
--- a/arch/mips/pci/pci-lasat.c
+++ /dev/null
@@ -1,91 +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, 2001, 04 Keith M Wesolowski
7 */
8#include <linux/kernel.h>
9#include <linux/init.h>
10#include <linux/pci.h>
11#include <linux/types.h>
12#include <asm/bootinfo.h>
13
14extern struct pci_ops nile4_pci_ops;
15extern struct pci_ops gt64xxx_pci0_ops;
16static struct resource lasat_pci_mem_resource = {
17 .name = "LASAT PCI MEM",
18 .start = 0x18000000,
19 .end = 0x19ffffff,
20 .flags = IORESOURCE_MEM,
21};
22
23static struct resource lasat_pci_io_resource = {
24 .name = "LASAT PCI IO",
25 .start = 0x1a000000,
26 .end = 0x1bffffff,
27 .flags = IORESOURCE_IO,
28};
29
30static struct pci_controller lasat_pci_controller = {
31 .mem_resource = &lasat_pci_mem_resource,
32 .io_resource = &lasat_pci_io_resource,
33};
34
35static int __init lasat_pci_setup(void)
36{
37 printk("PCI: starting\n");
38
39 switch (mips_machtype) {
40 case MACH_LASAT_100:
41 lasat_pci_controller.pci_ops = &gt64xxx_pci0_ops;
42 break;
43 case MACH_LASAT_200:
44 lasat_pci_controller.pci_ops = &nile4_pci_ops;
45 break;
46 default:
47 panic("pcibios_init: mips_machtype incorrect");
48 }
49
50 register_pci_controller(&lasat_pci_controller);
51
52 return 0;
53}
54
55arch_initcall(lasat_pci_setup);
56
57#define LASATINT_ETH1 0
58#define LASATINT_ETH0 1
59#define LASATINT_HDC 2
60#define LASATINT_COMP 3
61#define LASATINT_HDLC 4
62#define LASATINT_PCIA 5
63#define LASATINT_PCIB 6
64#define LASATINT_PCIC 7
65#define LASATINT_PCID 8
66
67int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
68{
69 switch (slot) {
70 case 1:
71 case 2:
72 case 3:
73 return LASATINT_PCIA + (((slot-1) + (pin-1)) % 4);
74 case 4:
75 return LASATINT_ETH1; /* Ethernet 1 (LAN 2) */
76 case 5:
77 return LASATINT_ETH0; /* Ethernet 0 (LAN 1) */
78 case 6:
79 return LASATINT_HDC; /* IDE controller */
80 default:
81 return 0xff; /* Illegal */
82 }
83
84 return -1;
85}
86
87/* Do platform specific device initialization at pci_enable_device() time */
88int pcibios_plat_dev_init(struct pci_dev *dev)
89{
90 return 0;
91}
diff --git a/arch/mips/pci/pci-ocelot-c.c b/arch/mips/pci/pci-ocelot-c.c
deleted file mode 100644
index 027759f7c9..0000000000
--- a/arch/mips/pci/pci-ocelot-c.c
+++ /dev/null
@@ -1,145 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2004, 06 by Ralf Baechle (ralf@linux-mips.org)
7 */
8
9#include <linux/types.h>
10#include <linux/pci.h>
11#include <linux/mv643xx.h>
12
13#include <linux/init.h>
14
15#include <asm/marvell.h>
16
17/*
18 * We assume the address ranges have already been setup appropriately by
19 * the firmware. PMON in case of the Ocelot C does that.
20 */
21static struct resource mv_pci_io_mem0_resource = {
22 .name = "MV64340 PCI0 IO MEM",
23 .flags = IORESOURCE_IO
24};
25
26static struct resource mv_pci_mem0_resource = {
27 .name = "MV64340 PCI0 MEM",
28 .flags = IORESOURCE_MEM
29};
30
31static struct mv_pci_controller mv_bus0_controller = {
32 .pcic = {
33 .pci_ops = &mv_pci_ops,
34 .mem_resource = &mv_pci_mem0_resource,
35 .io_resource = &mv_pci_io_mem0_resource,
36 },
37 .config_addr = MV64340_PCI_0_CONFIG_ADDR,
38 .config_vreg = MV64340_PCI_0_CONFIG_DATA_VIRTUAL_REG,
39};
40
41static uint32_t mv_io_base, mv_io_size;
42
43static void mv64340_pci0_init(void)
44{
45 uint32_t mem0_base, mem0_size;
46 uint32_t io_base, io_size;
47
48 io_base = MV_READ(MV64340_PCI_0_IO_BASE_ADDR) << 16;
49 io_size = (MV_READ(MV64340_PCI_0_IO_SIZE) + 1) << 16;
50 mem0_base = MV_READ(MV64340_PCI_0_MEMORY0_BASE_ADDR) << 16;
51 mem0_size = (MV_READ(MV64340_PCI_0_MEMORY0_SIZE) + 1) << 16;
52
53 mv_pci_io_mem0_resource.start = 0;
54 mv_pci_io_mem0_resource.end = io_size - 1;
55 mv_pci_mem0_resource.start = mem0_base;
56 mv_pci_mem0_resource.end = mem0_base + mem0_size - 1;
57 mv_bus0_controller.pcic.mem_offset = mem0_base;
58 mv_bus0_controller.pcic.io_offset = 0;
59
60 ioport_resource.end = io_size - 1;
61
62 register_pci_controller(&mv_bus0_controller.pcic);
63
64 mv_io_base = io_base;
65 mv_io_size = io_size;
66}
67
68static struct resource mv_pci_io_mem1_resource = {
69 .name = "MV64340 PCI1 IO MEM",
70 .flags = IORESOURCE_IO
71};
72
73static struct resource mv_pci_mem1_resource = {
74 .name = "MV64340 PCI1 MEM",
75 .flags = IORESOURCE_MEM
76};
77
78static struct mv_pci_controller mv_bus1_controller = {
79 .pcic = {
80 .pci_ops = &mv_pci_ops,
81 .mem_resource = &mv_pci_mem1_resource,
82 .io_resource = &mv_pci_io_mem1_resource,
83 },
84 .config_addr = MV64340_PCI_1_CONFIG_ADDR,
85 .config_vreg = MV64340_PCI_1_CONFIG_DATA_VIRTUAL_REG,
86};
87
88static __init void mv64340_pci1_init(void)
89{
90 uint32_t mem0_base, mem0_size;
91 uint32_t io_base, io_size;
92
93 io_base = MV_READ(MV64340_PCI_1_IO_BASE_ADDR) << 16;
94 io_size = (MV_READ(MV64340_PCI_1_IO_SIZE) + 1) << 16;
95 mem0_base = MV_READ(MV64340_PCI_1_MEMORY0_BASE_ADDR) << 16;
96 mem0_size = (MV_READ(MV64340_PCI_1_MEMORY0_SIZE) + 1) << 16;
97
98 /*
99 * Here we assume the I/O window of second bus to be contiguous with
100 * the first. A gap is no problem but would waste address space for
101 * remapping the port space.
102 */
103 mv_pci_io_mem1_resource.start = mv_io_size;
104 mv_pci_io_mem1_resource.end = mv_io_size + io_size - 1;
105 mv_pci_mem1_resource.start = mem0_base;
106 mv_pci_mem1_resource.end = mem0_base + mem0_size - 1;
107 mv_bus1_controller.pcic.mem_offset = mem0_base;
108 mv_bus1_controller.pcic.io_offset = 0;
109
110 ioport_resource.end = io_base + io_size -mv_io_base - 1;
111
112 register_pci_controller(&mv_bus1_controller.pcic);
113
114 mv_io_size = io_base + io_size - mv_io_base;
115}
116
117static __init int __init ocelot_c_pci_init(void)
118{
119 unsigned long io_v_base;
120 uint32_t enable;
121
122 enable = ~MV_READ(MV64340_BASE_ADDR_ENABLE);
123
124 /*
125 * We require at least one enabled I/O or PCI memory window or we
126 * will ignore this PCI bus. We ignore PCI windows 1, 2 and 3.
127 */
128 if (enable & (0x01 << 9) || enable & (0x01 << 10))
129 mv64340_pci0_init();
130
131 if (enable & (0x01 << 14) || enable & (0x01 << 15))
132 mv64340_pci1_init();
133
134 if (mv_io_size) {
135 io_v_base = (unsigned long) ioremap(mv_io_base, mv_io_size);
136 if (!io_v_base)
137 panic("Could not ioremap I/O port range");
138
139 set_io_port_base(io_v_base);
140 }
141
142 return 0;
143}
144
145arch_initcall(ocelot_c_pci_init);
diff --git a/arch/mips/pci/pci-sb1250.c b/arch/mips/pci/pci-sb1250.c
index 75c1246ced..c1ac649315 100644
--- a/arch/mips/pci/pci-sb1250.c
+++ b/arch/mips/pci/pci-sb1250.c
@@ -84,7 +84,7 @@ static inline void WRITECFG32(u32 addr, u32 data)
84 *(u32 *) (cfg_space + (addr & ~3)) = data; 84 *(u32 *) (cfg_space + (addr & ~3)) = data;
85} 85}
86 86
87int pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 87int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
88{ 88{
89 return dev->irq; 89 return dev->irq;
90} 90}
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 8108231f2e..99d8f4fd3f 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -269,7 +269,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
269 } 269 }
270 270
271 for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) { 271 for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) {
272 struct pci_dev *dev = pci_dev_b(ln); 272 dev = pci_dev_b(ln);
273 273
274 if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI) 274 if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI)
275 pcibios_fixup_device_resources(dev, bus); 275 pcibios_fixup_device_resources(dev, bus);
diff --git a/arch/mips/philips/pnx8550/common/platform.c b/arch/mips/philips/pnx8550/common/platform.c
index d43f56e2cd..c839436bd0 100644
--- a/arch/mips/philips/pnx8550/common/platform.c
+++ b/arch/mips/philips/pnx8550/common/platform.c
@@ -123,7 +123,7 @@ static struct platform_device *pnx8550_platform_devices[] __initdata = {
123 &pnx8550_uart_device, 123 &pnx8550_uart_device,
124}; 124};
125 125
126int pnx8550_platform_init(void) 126static int __init pnx8550_platform_init(void)
127{ 127{
128 return platform_add_devices(pnx8550_platform_devices, 128 return platform_add_devices(pnx8550_platform_devices,
129 ARRAY_SIZE(pnx8550_platform_devices)); 129 ARRAY_SIZE(pnx8550_platform_devices));
diff --git a/arch/mips/philips/pnx8550/common/proc.c b/arch/mips/philips/pnx8550/common/proc.c
index 3f097558ef..92311e95b7 100644
--- a/arch/mips/philips/pnx8550/common/proc.c
+++ b/arch/mips/philips/pnx8550/common/proc.c
@@ -78,29 +78,33 @@ static int pnx8550_proc_init( void )
78{ 78{
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 = proc_mkdir("pnx8550", NULL);
82 if (!pnx8550_dir) { 82 if (!pnx8550_dir) {
83 printk(KERN_ERR "Can't create pnx8550 proc dir\n"); 83 printk(KERN_ERR "Can't create pnx8550 proc dir\n");
84 return -1; 84 return -1;
85 } 85 }
86 86
87 // Create /proc/pnx8550/timers 87 // Create /proc/pnx8550/timers
88 pnx8550_timers = create_proc_entry("timers", S_IFREG|S_IRUGO, pnx8550_dir ); 88 pnx8550_timers = create_proc_read_entry(
89 if (pnx8550_timers){ 89 "timers",
90 pnx8550_timers->read_proc = pnx8550_timers_read; 90 0,
91 } 91 pnx8550_dir,
92 else { 92 pnx8550_timers_read,
93 NULL);
94
95 if (!pnx8550_timers)
93 printk(KERN_ERR "Can't create pnx8550 timers proc file\n"); 96 printk(KERN_ERR "Can't create pnx8550 timers proc file\n");
94 }
95 97
96 // Create /proc/pnx8550/registers 98 // Create /proc/pnx8550/registers
97 pnx8550_registers = create_proc_entry("registers", S_IFREG|S_IRUGO, pnx8550_dir ); 99 pnx8550_registers = create_proc_read_entry(
98 if (pnx8550_registers){ 100 "registers",
99 pnx8550_registers->read_proc = pnx8550_registers_read; 101 0,
100 } 102 pnx8550_dir,
101 else { 103 pnx8550_registers_read,
104 NULL);
105
106 if (!pnx8550_registers)
102 printk(KERN_ERR "Can't create pnx8550 registers proc file\n"); 107 printk(KERN_ERR "Can't create pnx8550 registers proc file\n");
103 }
104 108
105 return 0; 109 return 0;
106} 110}
diff --git a/arch/mips/pmc-sierra/Kconfig b/arch/mips/pmc-sierra/Kconfig
index 24d514c9df..abbd0bbfab 100644
--- a/arch/mips/pmc-sierra/Kconfig
+++ b/arch/mips/pmc-sierra/Kconfig
@@ -1,3 +1,49 @@
1choice
2 prompt "PMC-Sierra MSP SOC type"
3 depends on PMC_MSP
4
5config PMC_MSP4200_EVAL
6 bool "PMC-Sierra MSP4200 Eval Board"
7 select IRQ_MSP_SLP
8 select HW_HAS_PCI
9
10config PMC_MSP4200_GW
11 bool "PMC-Sierra MSP4200 VoIP Gateway"
12 select IRQ_MSP_SLP
13 select HW_HAS_PCI
14
15config PMC_MSP7120_EVAL
16 bool "PMC-Sierra MSP7120 Eval Board"
17 select SYS_SUPPORTS_MULTITHREADING
18 select IRQ_MSP_CIC
19 select HW_HAS_PCI
20
21config PMC_MSP7120_GW
22 bool "PMC-Sierra MSP7120 Residential Gateway"
23 select SYS_SUPPORTS_MULTITHREADING
24 select IRQ_MSP_CIC
25 select HW_HAS_PCI
26
27config PMC_MSP7120_FPGA
28 bool "PMC-Sierra MSP7120 FPGA"
29 select SYS_SUPPORTS_MULTITHREADING
30 select IRQ_MSP_CIC
31 select HW_HAS_PCI
32
33endchoice
34
35menu "Options for PMC-Sierra MSP chipsets"
36 depends on PMC_MSP
37
38config PMC_MSP_EMBEDDED_ROOTFS
39 bool "Root filesystem embedded in kernel image"
40 select MTD
41 select MTD_BLOCK
42 select MTD_PMC_MSP_RAMROOT
43 select MTD_RAM
44
45endmenu
46
1config HYPERTRANSPORT 47config HYPERTRANSPORT
2 bool "Hypertransport Support for PMC-Sierra Yosemite" 48 bool "Hypertransport Support for PMC-Sierra Yosemite"
3 depends on PMC_YOSEMITE 49 depends on PMC_YOSEMITE
diff --git a/arch/mips/pmc-sierra/msp71xx/Makefile b/arch/mips/pmc-sierra/msp71xx/Makefile
new file mode 100644
index 0000000000..4bba79c1cc
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/Makefile
@@ -0,0 +1,11 @@
1#
2# Makefile for the PMC-Sierra MSP SOCs
3#
4obj-y += msp_prom.o msp_setup.o msp_irq.o \
5 msp_time.o msp_serial.o msp_elb.o
6obj-$(CONFIG_PMC_MSP7120_GW) += msp_hwbutton.o
7obj-$(CONFIG_IRQ_MSP_SLP) += msp_irq_slp.o
8obj-$(CONFIG_IRQ_MSP_CIC) += msp_irq_cic.o
9obj-$(CONFIG_PCI) += msp_pci.o
10obj-$(CONFIG_MSPETH) += msp_eth.o
11obj-$(CONFIG_USB_MSP71XX) += msp_usb.o
diff --git a/arch/mips/momentum/ocelot_c/ocelot_c_fpga.h b/arch/mips/pmc-sierra/msp71xx/msp_elb.c
index f0f5581dcb..3e96410072 100644
--- a/arch/mips/momentum/ocelot_c/ocelot_c_fpga.h
+++ b/arch/mips/pmc-sierra/msp71xx/msp_elb.c
@@ -1,7 +1,9 @@
1/* 1/*
2 * Ocelot-C Board Register Definitions 2 * Sets up the proper Chip Select configuration registers. It is assumed that
3 * PMON sets up the ADDR and MASK registers properly.
3 * 4 *
4 * (C) 2002 Momentum Computer Inc. 5 * Copyright 2005-2006 PMC-Sierra, Inc.
6 * Author: Marc St-Jean, Marc_St-Jean@pmc-sierra.com
5 * 7 *
6 * This program is free software; you can redistribute it and/or modify it 8 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the 9 * under the terms of the GNU General Public License as published by the
@@ -22,40 +24,23 @@
22 * You should have received a copy of the GNU General Public License along 24 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc., 25 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA. 26 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 *
26 * Louis Hamilton, Red Hat, Inc.
27 * hamilton@redhat.com [MIPS64 modifications]
28 */ 27 */
29 28
30#ifndef __OCELOT_C_FPGA_H__ 29#include <linux/kernel.h>
31#define __OCELOT_C_FPGA_H__ 30#include <linux/init.h>
32 31#include <msp_regs.h>
33 32
34#ifdef CONFIG_64BIT 33static int __init msp_elb_setup(void)
35#define OCELOT_C_CS0_ADDR (0xfffffffffc000000) 34{
36#else 35#if defined(CONFIG_PMC_MSP7120_GW) \
37#define OCELOT_C_CS0_ADDR (0xfc000000) 36 || defined(CONFIG_PMC_MSP7120_EVAL)
37 /*
38 * Force all CNFG to be identical and equal to CS0,
39 * according to OPS doc
40 */
41 *CS1_CNFG_REG = *CS2_CNFG_REG = *CS3_CNFG_REG = *CS0_CNFG_REG;
38#endif 42#endif
43 return 0;
44}
39 45
40#define OCELOT_C_REG_BOARDREV 0x0 46subsys_initcall(msp_elb_setup);
41#define OCELOT_C_REG_FPGA_REV 0x1
42#define OCELOT_C_REG_FPGA_TYPE 0x2
43#define OCELOT_C_REG_RESET_STATUS 0x3
44#define OCELOT_C_REG_BOARD_STATUS 0x4
45#define OCELOT_C_REG_CPCI_ID 0x5
46#define OCELOT_C_REG_SET 0x6
47#define OCELOT_C_REG_CLR 0x7
48#define OCELOT_C_REG_EEPROM_MODE 0x9
49#define OCELOT_C_REG_INTMASK 0xa
50#define OCELOT_C_REG_INTSTAT 0xb
51#define OCELOT_C_REG_UART_INTMASK 0xc
52#define OCELOT_C_REG_UART_INTSTAT 0xd
53#define OCELOT_C_REG_INTSET 0xe
54#define OCELOT_C_REG_INTCLR 0xf
55
56#define __FPGA_REG_TO_ADDR(reg) \
57 ((void *) OCELOT_C_CS0_ADDR + OCELOT_C_REG_##reg)
58#define OCELOT_FPGA_WRITE(x, reg) writeb(x, __FPGA_REG_TO_ADDR(reg))
59#define OCELOT_FPGA_READ(reg) readb(__FPGA_REG_TO_ADDR(reg))
60
61#endif
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_hwbutton.c b/arch/mips/pmc-sierra/msp71xx/msp_hwbutton.c
new file mode 100644
index 0000000000..6fa8572815
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_hwbutton.c
@@ -0,0 +1,179 @@
1/*
2 * Sets up interrupt handlers for various hardware switches which are
3 * connected to interrupt lines.
4 *
5 * Copyright 2005-2207 PMC-Sierra, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
15 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
16 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
18 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28#include <linux/kernel.h>
29#include <linux/init.h>
30#include <linux/interrupt.h>
31
32#include <msp_int.h>
33#include <msp_regs.h>
34#include <msp_regops.h>
35#ifdef CONFIG_PMCTWILED
36#include <msp_led_macros.h>
37#endif
38
39/* For hwbutton_interrupt->initial_state */
40#define HWBUTTON_HI 0x1
41#define HWBUTTON_LO 0x2
42
43/*
44 * This struct describes a hardware button
45 */
46struct hwbutton_interrupt {
47 char *name; /* Name of button */
48 int irq; /* Actual LINUX IRQ */
49 int eirq; /* Extended IRQ number (0-7) */
50 int initial_state; /* The "normal" state of the switch */
51 void (*handle_hi)(void *); /* Handler: switch input has gone HI */
52 void (*handle_lo)(void *); /* Handler: switch input has gone LO */
53 void *data; /* Optional data to pass to handler */
54};
55
56#ifdef CONFIG_PMC_MSP7120_GW
57extern void msp_restart(char *);
58
59static void softreset_push(void *data)
60{
61 printk(KERN_WARNING "SOFTRESET switch was pushed\n");
62
63 /*
64 * In the future you could move this to the release handler,
65 * timing the difference between the 'push' and 'release', and only
66 * doing this ungraceful restart if the button has been down for
67 * a certain amount of time; otherwise doing a graceful restart.
68 */
69
70 msp_restart(NULL);
71}
72
73static void softreset_release(void *data)
74{
75 printk(KERN_WARNING "SOFTRESET switch was released\n");
76
77 /* Do nothing */
78}
79
80static void standby_on(void *data)
81{
82 printk(KERN_WARNING "STANDBY switch was set to ON (not implemented)\n");
83
84 /* TODO: Put board in standby mode */
85#ifdef CONFIG_PMCTWILED
86 msp_led_turn_off(MSP_LED_PWRSTANDBY_GREEN);
87 msp_led_turn_on(MSP_LED_PWRSTANDBY_RED);
88#endif
89}
90
91static void standby_off(void *data)
92{
93 printk(KERN_WARNING
94 "STANDBY switch was set to OFF (not implemented)\n");
95
96 /* TODO: Take out of standby mode */
97#ifdef CONFIG_PMCTWILED
98 msp_led_turn_on(MSP_LED_PWRSTANDBY_GREEN);
99 msp_led_turn_off(MSP_LED_PWRSTANDBY_RED);
100#endif
101}
102
103static struct hwbutton_interrupt softreset_sw = {
104 .name = "Softreset button",
105 .irq = MSP_INT_EXT0,
106 .eirq = 0,
107 .initial_state = HWBUTTON_HI,
108 .handle_hi = softreset_release,
109 .handle_lo = softreset_push,
110 .data = NULL,
111};
112
113static struct hwbutton_interrupt standby_sw = {
114 .name = "Standby switch",
115 .irq = MSP_INT_EXT1,
116 .eirq = 1,
117 .initial_state = HWBUTTON_HI,
118 .handle_hi = standby_off,
119 .handle_lo = standby_on,
120 .data = NULL,
121};
122#endif /* CONFIG_PMC_MSP7120_GW */
123
124static irqreturn_t hwbutton_handler(int irq, void *data)
125{
126 struct hwbutton_interrupt *hirq = data;
127 unsigned long cic_ext = *CIC_EXT_CFG_REG;
128
129 if (irq != hirq->irq)
130 return IRQ_NONE;
131
132 if (CIC_EXT_IS_ACTIVE_HI(cic_ext, hirq->eirq)) {
133 /* Interrupt: pin is now HI */
134 CIC_EXT_SET_ACTIVE_LO(cic_ext, hirq->eirq);
135 hirq->handle_hi(hirq->data);
136 } else {
137 /* Interrupt: pin is now LO */
138 CIC_EXT_SET_ACTIVE_HI(cic_ext, hirq->eirq);
139 hirq->handle_lo(hirq->data);
140 }
141
142 /*
143 * Invert the POLARITY of this level interrupt to ack the interrupt
144 * Thus next state change will invoke the opposite message
145 */
146 *CIC_EXT_CFG_REG = cic_ext;
147
148 return IRQ_HANDLED;
149}
150
151static int msp_hwbutton_register(struct hwbutton_interrupt *hirq)
152{
153 unsigned long cic_ext;
154
155 if (hirq->handle_hi == NULL || hirq->handle_lo == NULL)
156 return -EINVAL;
157
158 cic_ext = *CIC_EXT_CFG_REG;
159 CIC_EXT_SET_TRIGGER_LEVEL(cic_ext, hirq->eirq);
160 if (hirq->initial_state == HWBUTTON_HI)
161 CIC_EXT_SET_ACTIVE_LO(cic_ext, hirq->eirq);
162 else
163 CIC_EXT_SET_ACTIVE_HI(cic_ext, hirq->eirq);
164 *CIC_EXT_CFG_REG = cic_ext;
165
166 return request_irq(hirq->irq, hwbutton_handler, SA_INTERRUPT,
167 hirq->name, (void *)hirq);
168}
169
170static int __init msp_hwbutton_setup(void)
171{
172#ifdef CONFIG_PMC_MSP7120_GW
173 msp_hwbutton_register(&softreset_sw);
174 msp_hwbutton_register(&standby_sw);
175#endif
176 return 0;
177}
178
179subsys_initcall(msp_hwbutton_setup);
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_irq.c b/arch/mips/pmc-sierra/msp71xx/msp_irq.c
new file mode 100644
index 0000000000..734d598a2e
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_irq.c
@@ -0,0 +1,124 @@
1/*
2 * IRQ vector handles
3 *
4 * Copyright (C) 1995, 1996, 1997, 2003 by Ralf Baechle
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/irq.h>
14#include <linux/interrupt.h>
15#include <linux/ptrace.h>
16#include <linux/time.h>
17
18#include <asm/irq_cpu.h>
19
20#include <msp_int.h>
21
22extern void msp_int_handle(void);
23
24/* SLP bases systems */
25extern void msp_slp_irq_init(void);
26extern void msp_slp_irq_dispatch(void);
27
28/* CIC based systems */
29extern void msp_cic_irq_init(void);
30extern void msp_cic_irq_dispatch(void);
31
32/*
33 * The PMC-Sierra MSP interrupts are arranged in a 3 level cascaded
34 * hierarchical system. The first level are the direct MIPS interrupts
35 * and are assigned the interrupt range 0-7. The second level is the SLM
36 * interrupt controller and is assigned the range 8-39. The third level
37 * comprises the Peripherial block, the PCI block, the PCI MSI block and
38 * the SLP. The PCI interrupts and the SLP errors are handled by the
39 * relevant subsystems so the core interrupt code needs only concern
40 * itself with the Peripheral block. These are assigned interrupts in
41 * the range 40-71.
42 */
43
44asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
45{
46 u32 pending;
47
48 pending = read_c0_status() & read_c0_cause();
49
50 /*
51 * jump to the correct interrupt routine
52 * These are arranged in priority order and the timer
53 * comes first!
54 */
55
56#ifdef CONFIG_IRQ_MSP_CIC /* break out the CIC stuff for now */
57 if (pending & C_IRQ4) /* do the peripherals first, that's the timer */
58 msp_cic_irq_dispatch();
59
60 else if (pending & C_IRQ0)
61 do_IRQ(MSP_INT_MAC0);
62
63 else if (pending & C_IRQ1)
64 do_IRQ(MSP_INT_MAC1);
65
66 else if (pending & C_IRQ2)
67 do_IRQ(MSP_INT_USB);
68
69 else if (pending & C_IRQ3)
70 do_IRQ(MSP_INT_SAR);
71
72 else if (pending & C_IRQ5)
73 do_IRQ(MSP_INT_SEC);
74
75#else
76 if (pending & C_IRQ5)
77 do_IRQ(MSP_INT_TIMER);
78
79 else if (pending & C_IRQ0)
80 do_IRQ(MSP_INT_MAC0);
81
82 else if (pending & C_IRQ1)
83 do_IRQ(MSP_INT_MAC1);
84
85 else if (pending & C_IRQ3)
86 do_IRQ(MSP_INT_VE);
87
88 else if (pending & C_IRQ4)
89 msp_slp_irq_dispatch();
90#endif
91
92 else if (pending & C_SW0) /* do software after hardware */
93 do_IRQ(MSP_INT_SW0);
94
95 else if (pending & C_SW1)
96 do_IRQ(MSP_INT_SW1);
97}
98
99static struct irqaction cascade_msp = {
100 .handler = no_action,
101 .name = "MSP cascade"
102};
103
104
105void __init arch_init_irq(void)
106{
107 /* initialize the 1st-level CPU based interrupt controller */
108 mips_cpu_irq_init();
109
110#ifdef CONFIG_IRQ_MSP_CIC
111 msp_cic_irq_init();
112
113 /* setup the cascaded interrupts */
114 setup_irq(MSP_INT_CIC, &cascade_msp);
115 setup_irq(MSP_INT_PER, &cascade_msp);
116#else
117 /* setup the 2nd-level SLP register based interrupt controller */
118 msp_slp_irq_init();
119
120 /* setup the cascaded SLP/PER interrupts */
121 setup_irq(MSP_INT_SLP, &cascade_msp);
122 setup_irq(MSP_INT_PER, &cascade_msp);
123#endif
124}
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c b/arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c
new file mode 100644
index 0000000000..5175357d0a
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c
@@ -0,0 +1,134 @@
1/*
2 * This file define the irq handler for MSP SLM subsystem interrupts.
3 *
4 * Copyright 2005-2007 PMC-Sierra, Inc, derived from irq_cpu.c
5 * Author: Andrew Hughes, Andrew_Hughes@pmc-sierra.com
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13#include <linux/init.h>
14#include <linux/interrupt.h>
15#include <linux/kernel.h>
16#include <linux/bitops.h>
17
18#include <asm/system.h>
19
20#include <msp_cic_int.h>
21#include <msp_regs.h>
22
23/*
24 * NOTE: We are only enabling support for VPE0 right now.
25 */
26
27static inline void unmask_msp_cic_irq(unsigned int irq)
28{
29
30 /* check for PER interrupt range */
31 if (irq < MSP_PER_INTBASE)
32 *CIC_VPE0_MSK_REG |= (1 << (irq - MSP_CIC_INTBASE));
33 else
34 *PER_INT_MSK_REG |= (1 << (irq - MSP_PER_INTBASE));
35}
36
37static inline void mask_msp_cic_irq(unsigned int irq)
38{
39 /* check for PER interrupt range */
40 if (irq < MSP_PER_INTBASE)
41 *CIC_VPE0_MSK_REG &= ~(1 << (irq - MSP_CIC_INTBASE));
42 else
43 *PER_INT_MSK_REG &= ~(1 << (irq - MSP_PER_INTBASE));
44}
45
46/*
47 * While we ack the interrupt interrupts are disabled and thus we don't need
48 * to deal with concurrency issues. Same for msp_cic_irq_end.
49 */
50static inline void ack_msp_cic_irq(unsigned int irq)
51{
52 mask_msp_cic_irq(irq);
53
54 /*
55 * only really necessary for 18, 16-14 and sometimes 3:0 (since
56 * these can be edge sensitive) but it doesn't hurt for the others.
57 */
58
59 /* check for PER interrupt range */
60 if (irq < MSP_PER_INTBASE)
61 *CIC_STS_REG = (1 << (irq - MSP_CIC_INTBASE));
62 else
63 *PER_INT_STS_REG = (1 << (irq - MSP_PER_INTBASE));
64}
65
66static struct irq_chip msp_cic_irq_controller = {
67 .name = "MSP_CIC",
68 .ack = ack_msp_cic_irq,
69 .mask = ack_msp_cic_irq,
70 .mask_ack = ack_msp_cic_irq,
71 .unmask = unmask_msp_cic_irq,
72};
73
74
75void __init msp_cic_irq_init(void)
76{
77 int i;
78
79 /* Mask/clear interrupts. */
80 *CIC_VPE0_MSK_REG = 0x00000000;
81 *PER_INT_MSK_REG = 0x00000000;
82 *CIC_STS_REG = 0xFFFFFFFF;
83 *PER_INT_STS_REG = 0xFFFFFFFF;
84
85#if defined(CONFIG_PMC_MSP7120_GW) || \
86 defined(CONFIG_PMC_MSP7120_EVAL)
87 /*
88 * The MSP7120 RG and EVBD boards use IRQ[6:4] for PCI.
89 * These inputs map to EXT_INT_POL[6:4] inside the CIC.
90 * They are to be active low, level sensitive.
91 */
92 *CIC_EXT_CFG_REG &= 0xFFFF8F8F;
93#endif
94
95 /* initialize all the IRQ descriptors */
96 for (i = MSP_CIC_INTBASE; i < MSP_PER_INTBASE + 32; i++)
97 set_irq_chip_and_handler(i, &msp_cic_irq_controller,
98 handle_level_irq);
99}
100
101void msp_cic_irq_dispatch(void)
102{
103 u32 pending;
104 int intbase;
105
106 intbase = MSP_CIC_INTBASE;
107 pending = *CIC_STS_REG & *CIC_VPE0_MSK_REG;
108
109 /* check for PER interrupt */
110 if (pending == (1 << (MSP_INT_PER - MSP_CIC_INTBASE))) {
111 intbase = MSP_PER_INTBASE;
112 pending = *PER_INT_STS_REG & *PER_INT_MSK_REG;
113 }
114
115 /* check for spurious interrupt */
116 if (pending == 0x00000000) {
117 printk(KERN_ERR
118 "Spurious %s interrupt? status %08x, mask %08x\n",
119 (intbase == MSP_CIC_INTBASE) ? "CIC" : "PER",
120 (intbase == MSP_CIC_INTBASE) ?
121 *CIC_STS_REG : *PER_INT_STS_REG,
122 (intbase == MSP_CIC_INTBASE) ?
123 *CIC_VPE0_MSK_REG : *PER_INT_MSK_REG);
124 return;
125 }
126
127 /* check for the timer and dispatch it first */
128 if ((intbase == MSP_CIC_INTBASE) &&
129 (pending & (1 << (MSP_INT_VPE0_TIMER - MSP_CIC_INTBASE))))
130 do_IRQ(MSP_INT_VPE0_TIMER);
131 else
132 do_IRQ(ffs(pending) + intbase - 1);
133}
134
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c b/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c
new file mode 100644
index 0000000000..f5f1b8d2bb
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c
@@ -0,0 +1,109 @@
1/*
2 * This file define the irq handler for MSP SLM subsystem interrupts.
3 *
4 * Copyright 2005-2006 PMC-Sierra, Inc, derived from irq_cpu.c
5 * Author: Andrew Hughes, Andrew_Hughes@pmc-sierra.com
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13#include <linux/init.h>
14#include <linux/interrupt.h>
15#include <linux/kernel.h>
16#include <linux/bitops.h>
17
18#include <asm/mipsregs.h>
19#include <asm/system.h>
20
21#include <msp_slp_int.h>
22#include <msp_regs.h>
23
24static inline void unmask_msp_slp_irq(unsigned int irq)
25{
26 /* check for PER interrupt range */
27 if (irq < MSP_PER_INTBASE)
28 *SLP_INT_MSK_REG |= (1 << (irq - MSP_SLP_INTBASE));
29 else
30 *PER_INT_MSK_REG |= (1 << (irq - MSP_PER_INTBASE));
31}
32
33static inline void mask_msp_slp_irq(unsigned int irq)
34{
35 /* check for PER interrupt range */
36 if (irq < MSP_PER_INTBASE)
37 *SLP_INT_MSK_REG &= ~(1 << (irq - MSP_SLP_INTBASE));
38 else
39 *PER_INT_MSK_REG &= ~(1 << (irq - MSP_PER_INTBASE));
40}
41
42/*
43 * While we ack the interrupt interrupts are disabled and thus we don't need
44 * to deal with concurrency issues. Same for msp_slp_irq_end.
45 */
46static inline void ack_msp_slp_irq(unsigned int irq)
47{
48 mask_slp_irq(irq);
49
50 /*
51 * only really necessary for 18, 16-14 and sometimes 3:0 (since
52 * these can be edge sensitive) but it doesn't hurt for the others.
53 */
54
55 /* check for PER interrupt range */
56 if (irq < MSP_PER_INTBASE)
57 *SLP_INT_STS_REG = (1 << (irq - MSP_SLP_INTBASE));
58 else
59 *PER_INT_STS_REG = (1 << (irq - MSP_PER_INTBASE));
60}
61
62static struct irq_chip msp_slp_irq_controller = {
63 .name = "MSP_SLP",
64 .ack = ack_msp_slp_irq,
65 .mask = ack_msp_slp_irq,
66 .mask_ack = ack_msp_slp_irq,
67 .unmask = unmask_msp_slp_irq,
68};
69
70void __init msp_slp_irq_init(void)
71{
72 int i;
73
74 /* Mask/clear interrupts. */
75 *SLP_INT_MSK_REG = 0x00000000;
76 *PER_INT_MSK_REG = 0x00000000;
77 *SLP_INT_STS_REG = 0xFFFFFFFF;
78 *PER_INT_STS_REG = 0xFFFFFFFF;
79
80 /* initialize all the IRQ descriptors */
81 for (i = MSP_SLP_INTBASE; i < MSP_PER_INTBASE + 32; i++)
82 set_irq_chip_and_handler(i, &msp_slp_irq_controller
83 handle_level_irq);
84}
85
86void msp_slp_irq_dispatch(void)
87{
88 u32 pending;
89 int intbase;
90
91 intbase = MSP_SLP_INTBASE;
92 pending = *SLP_INT_STS_REG & *SLP_INT_MSK_REG;
93
94 /* check for PER interrupt */
95 if (pending == (1 << (MSP_INT_PER - MSP_SLP_INTBASE))) {
96 intbase = MSP_PER_INTBASE;
97 pending = *PER_INT_STS_REG & *PER_INT_MSK_REG;
98 }
99
100 /* check for spurious interrupt */
101 if (pending == 0x00000000) {
102 printk(KERN_ERR "Spurious %s interrupt?\n",
103 (intbase == MSP_SLP_INTBASE) ? "SLP" : "PER");
104 return;
105 }
106
107 /* dispatch the irq */
108 do_IRQ(ffs(pending) + intbase - 1);
109}
diff --git a/arch/mips/momentum/ocelot_3/ocelot_3_fpga.h b/arch/mips/pmc-sierra/msp71xx/msp_pci.c
index 5710a9029f..f764fe7748 100644
--- a/arch/mips/momentum/ocelot_3/ocelot_3_fpga.h
+++ b/arch/mips/pmc-sierra/msp71xx/msp_pci.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Ocelot-3 Board Register Definitions 2 * The setup file for PCI related hardware on PMC-Sierra MSP processors.
3 * 3 *
4 * (C) 2002 Momentum Computer Inc. 4 * Copyright 2005-2006 PMC-Sierra, Inc.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the 7 * under the terms of the GNU General Public License as published by the
@@ -22,38 +22,29 @@
22 * You should have received a copy of the GNU General Public License along 22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc., 23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA. 24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 *
26 * Louis Hamilton, Red Hat, Inc.
27 * hamilton@redhat.com [MIPS64 modifications]
28 *
29 * Copyright (C) 2004 MontaVista Software Inc.
30 * Author: Manish Lachwani, mlachwani@mvista.com
31 */ 25 */
32 26
33#ifndef __OCELOT_3_FPGA_H__ 27#include <linux/init.h>
34#define __OCELOT_3_FPGA_H__ 28
35 29#include <msp_prom.h>
36#define OCELOT_3_REG_BOARDREV 0x0 30#include <msp_regs.h>
37#define OCELOT_3_REG_FPGA_REV 0x1 31
38#define OCELOT_3_REG_FPGA_TYPE 0x2 32extern void msp_pci_init(void);
39#define OCELOT_3_REG_RESET_STATUS 0x3
40#define OCELOT_3_REG_BOARD_STATUS 0x4
41#define OCELOT_3_REG_CPCI_ID 0x5
42#define OCELOT_3_REG_SET 0x6
43#define OCELOT_3_REG_CLR 0x7
44#define OCELOT_3_REG_EEPROM_MODE 0x9
45#define OCELOT_3_REG_INTMASK 0xa
46#define OCELOT_3_REG_INTSTAT 0xb
47#define OCELOT_3_REG_UART_INTMASK 0xc
48#define OCELOT_3_REG_UART_INTSTAT 0xd
49#define OCELOT_3_REG_INTSET 0xe
50#define OCELOT_3_REG_INTCLR 0xf
51
52extern unsigned long ocelot_fpga_base;
53
54#define __FPGA_REG_TO_ADDR(reg) \
55 ((void *) ocelot_fpga_base + OCELOT_3_REG_##reg)
56#define OCELOT_FPGA_WRITE(x, reg) writeb(x, __FPGA_REG_TO_ADDR(reg))
57#define OCELOT_FPGA_READ(reg) readb(__FPGA_REG_TO_ADDR(reg))
58 33
34static int __init msp_pci_setup(void)
35{
36#if 0 /* Linux 2.6 initialization code to be completed */
37 if (getdeviceid() & DEV_ID_SINGLE_PC) {
38 /* If single card mode */
39 slmRegs *sreg = (slmRegs *) SREG_BASE;
40
41 sreg->single_pc_enable = SINGLE_PCCARD;
42 }
59#endif 43#endif
44
45 msp_pci_init();
46
47 return 0;
48}
49
50subsys_initcall(msp_pci_setup);
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_prom.c b/arch/mips/pmc-sierra/msp71xx/msp_prom.c
new file mode 100644
index 0000000000..e5bd5481d8
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_prom.c
@@ -0,0 +1,566 @@
1/*
2 * BRIEF MODULE DESCRIPTION
3 * PROM library initialisation code, assuming a version of
4 * pmon is the boot code.
5 *
6 * Copyright 2000,2001 MontaVista Software Inc.
7 * Author: MontaVista Software, Inc.
8 * ppopov@mvista.com or source@mvista.com
9 *
10 * This file was derived from Carsten Langgaard's
11 * arch/mips/mips-boards/xx files.
12 *
13 * Carsten Langgaard, carstenl@mips.com
14 * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
15 *
16 * This program is free software; you can redistribute it and/or modify it
17 * under the terms of the GNU General Public License as published by the
18 * Free Software Foundation; either version 2 of the License, or (at your
19 * option) any later version.
20 *
21 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
22 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
24 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
27 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 * You should have received a copy of the GNU General Public License along
33 * with this program; if not, write to the Free Software Foundation, Inc.,
34 * 675 Mass Ave, Cambridge, MA 02139, USA.
35 */
36
37#include <linux/module.h>
38#include <linux/kernel.h>
39#include <linux/init.h>
40#include <linux/string.h>
41#include <linux/interrupt.h>
42#include <linux/mm.h>
43#ifdef CONFIG_CRAMFS
44#include <linux/cramfs_fs.h>
45#endif
46#ifdef CONFIG_SQUASHFS
47#include <linux/squashfs_fs.h>
48#endif
49
50#include <asm/addrspace.h>
51#include <asm/bootinfo.h>
52#include <asm-generic/sections.h>
53#include <asm/page.h>
54
55#include <msp_prom.h>
56#include <msp_regs.h>
57
58/* global PROM environment variables and pointers */
59int prom_argc;
60char **prom_argv, **prom_envp;
61int *prom_vec;
62
63/* debug flag */
64int init_debug = 1;
65
66/* memory blocks */
67struct prom_pmemblock mdesc[PROM_MAX_PMEMBLOCKS];
68
69/* default feature sets */
70static char msp_default_features[] =
71#if defined(CONFIG_PMC_MSP4200_EVAL) \
72 || defined(CONFIG_PMC_MSP4200_GW)
73 "ERER";
74#elif defined(CONFIG_PMC_MSP7120_EVAL) \
75 || defined(CONFIG_PMC_MSP7120_GW)
76 "EMEMSP";
77#elif defined(CONFIG_PMC_MSP7120_FPGA)
78 "EMEM";
79#endif
80
81/* conversion functions */
82static inline unsigned char str2hexnum(unsigned char c)
83{
84 if (c >= '0' && c <= '9')
85 return c - '0';
86 if (c >= 'a' && c <= 'f')
87 return c - 'a' + 10;
88 return 0; /* foo */
89}
90
91static inline int str2eaddr(unsigned char *ea, unsigned char *str)
92{
93 int index = 0;
94 unsigned char num = 0;
95
96 while (*str != '\0') {
97 if ((*str == '.') || (*str == ':')) {
98 ea[index++] = num;
99 num = 0;
100 str++;
101 } else {
102 num = num << 4;
103 num |= str2hexnum(*str++);
104 }
105 }
106
107 if (index == 5) {
108 ea[index++] = num;
109 return 0;
110 } else
111 return -1;
112}
113EXPORT_SYMBOL(str2eaddr);
114
115static inline unsigned long str2hex(unsigned char *str)
116{
117 int value = 0;
118
119 while (*str) {
120 value = value << 4;
121 value |= str2hexnum(*str++);
122 }
123
124 return value;
125}
126
127/* function to query the system information */
128const char *get_system_type(void)
129{
130#if defined(CONFIG_PMC_MSP4200_EVAL)
131 return "PMC-Sierra MSP4200 Eval Board";
132#elif defined(CONFIG_PMC_MSP4200_GW)
133 return "PMC-Sierra MSP4200 VoIP Gateway";
134#elif defined(CONFIG_PMC_MSP7120_EVAL)
135 return "PMC-Sierra MSP7120 Eval Board";
136#elif defined(CONFIG_PMC_MSP7120_GW)
137 return "PMC-Sierra MSP7120 Residential Gateway";
138#elif defined(CONFIG_PMC_MSP7120_FPGA)
139 return "PMC-Sierra MSP7120 FPGA";
140#else
141 #error "What is the type of *your* MSP?"
142#endif
143}
144
145int get_ethernet_addr(char *ethaddr_name, char *ethernet_addr)
146{
147 char *ethaddr_str;
148
149 ethaddr_str = prom_getenv(ethaddr_name);
150 if (!ethaddr_str) {
151 printk(KERN_WARNING "%s not set in boot prom\n", ethaddr_name);
152 return -1;
153 }
154
155 if (str2eaddr(ethernet_addr, ethaddr_str) == -1) {
156 printk(KERN_WARNING "%s badly formatted-<%s>\n",
157 ethaddr_name, ethaddr_str);
158 return -1;
159 }
160
161 if (init_debug > 1) {
162 int i;
163 printk(KERN_DEBUG "get_ethernet_addr: for %s ", ethaddr_name);
164 for (i = 0; i < 5; i++)
165 printk(KERN_DEBUG "%02x:",
166 (unsigned char)*(ethernet_addr+i));
167 printk(KERN_DEBUG "%02x\n", *(ethernet_addr+i));
168 }
169
170 return 0;
171}
172EXPORT_SYMBOL(get_ethernet_addr);
173
174static char *get_features(void)
175{
176 char *feature = prom_getenv(FEATURES);
177
178 if (feature == NULL) {
179 /* default features based on MACHINE_TYPE */
180 feature = msp_default_features;
181 }
182
183 return feature;
184}
185
186static char test_feature(char c)
187{
188 char *feature = get_features();
189
190 while (*feature) {
191 if (*feature++ == c)
192 return *feature;
193 feature++;
194 }
195
196 return FEATURE_NOEXIST;
197}
198
199unsigned long get_deviceid(void)
200{
201 char *deviceid = prom_getenv(DEVICEID);
202
203 if (deviceid == NULL)
204 return *DEV_ID_REG;
205 else
206 return str2hex(deviceid);
207}
208
209char identify_pci(void)
210{
211 return test_feature(PCI_KEY);
212}
213EXPORT_SYMBOL(identify_pci);
214
215char identify_pcimux(void)
216{
217 return test_feature(PCIMUX_KEY);
218}
219
220char identify_sec(void)
221{
222 return test_feature(SEC_KEY);
223}
224EXPORT_SYMBOL(identify_sec);
225
226char identify_spad(void)
227{
228 return test_feature(SPAD_KEY);
229}
230EXPORT_SYMBOL(identify_spad);
231
232char identify_tdm(void)
233{
234 return test_feature(TDM_KEY);
235}
236EXPORT_SYMBOL(identify_tdm);
237
238char identify_zsp(void)
239{
240 return test_feature(ZSP_KEY);
241}
242EXPORT_SYMBOL(identify_zsp);
243
244static char identify_enetfeature(char key, unsigned long interface_num)
245{
246 char *feature = get_features();
247
248 while (*feature) {
249 if (*feature++ == key && interface_num-- == 0)
250 return *feature;
251 feature++;
252 }
253
254 return FEATURE_NOEXIST;
255}
256
257char identify_enet(unsigned long interface_num)
258{
259 return identify_enetfeature(ENET_KEY, interface_num);
260}
261EXPORT_SYMBOL(identify_enet);
262
263char identify_enetTxD(unsigned long interface_num)
264{
265 return identify_enetfeature(ENETTXD_KEY, interface_num);
266}
267EXPORT_SYMBOL(identify_enetTxD);
268
269unsigned long identify_family(void)
270{
271 unsigned long deviceid;
272
273 deviceid = get_deviceid();
274
275 return deviceid & CPU_DEVID_FAMILY;
276}
277EXPORT_SYMBOL(identify_family);
278
279unsigned long identify_revision(void)
280{
281 unsigned long deviceid;
282
283 deviceid = get_deviceid();
284
285 return deviceid & CPU_DEVID_REVISION;
286}
287EXPORT_SYMBOL(identify_revision);
288
289/* PROM environment functions */
290char *prom_getenv(char *env_name)
291{
292 /*
293 * Return a pointer to the given environment variable. prom_envp
294 * points to a null terminated array of pointers to variables.
295 * Environment variables are stored in the form of "memsize=64"
296 */
297
298 char **var = prom_envp;
299 int i = strlen(env_name);
300
301 while (*var) {
302 if (strncmp(env_name, *var, i) == 0) {
303 return (*var + strlen(env_name) + 1);
304 }
305 var++;
306 }
307
308 return NULL;
309}
310
311/* PROM commandline functions */
312char *prom_getcmdline(void)
313{
314 return &(arcs_cmdline[0]);
315}
316EXPORT_SYMBOL(prom_getcmdline);
317
318void __init prom_init_cmdline(void)
319{
320 char *cp;
321 int actr;
322
323 actr = 1; /* Always ignore argv[0] */
324
325 cp = &(arcs_cmdline[0]);
326 while (actr < prom_argc) {
327 strcpy(cp, prom_argv[actr]);
328 cp += strlen(prom_argv[actr]);
329 *cp++ = ' ';
330 actr++;
331 }
332 if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */
333 --cp;
334 *cp = '\0';
335}
336
337/* memory allocation functions */
338static int __init prom_memtype_classify(unsigned int type)
339{
340 switch (type) {
341 case yamon_free:
342 return BOOT_MEM_RAM;
343 case yamon_prom:
344 return BOOT_MEM_ROM_DATA;
345 default:
346 return BOOT_MEM_RESERVED;
347 }
348}
349
350void __init prom_meminit(void)
351{
352 struct prom_pmemblock *p;
353
354 p = prom_getmdesc();
355
356 while (p->size) {
357 long type;
358 unsigned long base, size;
359
360 type = prom_memtype_classify(p->type);
361 base = p->base;
362 size = p->size;
363
364 add_memory_region(base, size, type);
365 p++;
366 }
367}
368
369void __init prom_free_prom_memory(void)
370{
371 int argc;
372 char **argv;
373 char **envp;
374 char *ptr;
375 int len = 0;
376 int i;
377 unsigned long addr;
378
379 /*
380 * preserve environment variables and command line from pmon/bbload
381 * first preserve the command line
382 */
383 for (argc = 0; argc < prom_argc; argc++) {
384 len += sizeof(char *); /* length of pointer */
385 len += strlen(prom_argv[argc]) + 1; /* length of string */
386 }
387 len += sizeof(char *); /* plus length of null pointer */
388
389 argv = kmalloc(len, GFP_KERNEL);
390 ptr = (char *) &argv[prom_argc + 1]; /* strings follow array */
391
392 for (argc = 0; argc < prom_argc; argc++) {
393 argv[argc] = ptr;
394 strcpy(ptr, prom_argv[argc]);
395 ptr += strlen(prom_argv[argc]) + 1;
396 }
397 argv[prom_argc] = NULL; /* end array with null pointer */
398 prom_argv = argv;
399
400 /* next preserve the environment variables */
401 len = 0;
402 i = 0;
403 for (envp = prom_envp; *envp != NULL; envp++) {
404 i++; /* count number of environment variables */
405 len += sizeof(char *); /* length of pointer */
406 len += strlen(*envp) + 1; /* length of string */
407 }
408 len += sizeof(char *); /* plus length of null pointer */
409
410 envp = kmalloc(len, GFP_KERNEL);
411 ptr = (char *) &envp[i+1];
412
413 for (argc = 0; argc < i; argc++) {
414 envp[argc] = ptr;
415 strcpy(ptr, prom_envp[argc]);
416 ptr += strlen(prom_envp[argc]) + 1;
417 }
418 envp[i] = NULL; /* end array with null pointer */
419 prom_envp = envp;
420
421 for (i = 0; i < boot_mem_map.nr_map; i++) {
422 if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA)
423 continue;
424
425 addr = boot_mem_map.map[i].addr;
426 free_init_pages("prom memory",
427 addr, addr + boot_mem_map.map[i].size);
428 }
429}
430
431struct prom_pmemblock *__init prom_getmdesc(void)
432{
433 static char memsz_env[] __initdata = "memsize";
434 static char heaptop_env[] __initdata = "heaptop";
435 char *str;
436 unsigned int memsize;
437 unsigned int heaptop;
438#ifdef CONFIG_MTD_PMC_MSP_RAMROOT
439 void *ramroot_start;
440 unsigned long ramroot_size;
441#endif
442 int i;
443
444 str = prom_getenv(memsz_env);
445 if (!str) {
446 ppfinit("memsize not set in boot prom, "
447 "set to default (32Mb)\n");
448 memsize = 0x02000000;
449 } else {
450 memsize = simple_strtol(str, NULL, 0);
451
452 if (memsize == 0) {
453 /* if memsize is a bad size, use reasonable default */
454 memsize = 0x02000000;
455 }
456
457 /* convert to physical address (removing caching bits, etc) */
458 memsize = CPHYSADDR(memsize);
459 }
460
461 str = prom_getenv(heaptop_env);
462 if (!str) {
463 heaptop = CPHYSADDR((u32)&_text);
464 ppfinit("heaptop not set in boot prom, "
465 "set to default 0x%08x\n", heaptop);
466 } else {
467 heaptop = simple_strtol(str, NULL, 16);
468 if (heaptop == 0) {
469 /* heaptop conversion bad, might have 0xValue */
470 heaptop = simple_strtol(str, NULL, 0);
471
472 if (heaptop == 0) {
473 /* heaptop still bad, use reasonable default */
474 heaptop = CPHYSADDR((u32)&_text);
475 }
476 }
477
478 /* convert to physical address (removing caching bits, etc) */
479 heaptop = CPHYSADDR((u32)heaptop);
480 }
481
482 /* the base region */
483 i = 0;
484 mdesc[i].type = BOOT_MEM_RESERVED;
485 mdesc[i].base = 0x00000000;
486 mdesc[i].size = PAGE_ALIGN(0x300 + 0x80);
487 /* jtag interrupt vector + sizeof vector */
488
489 /* PMON data */
490 if (heaptop > mdesc[i].base + mdesc[i].size) {
491 i++; /* 1 */
492 mdesc[i].type = BOOT_MEM_ROM_DATA;
493 mdesc[i].base = mdesc[i-1].base + mdesc[i-1].size;
494 mdesc[i].size = heaptop - mdesc[i].base;
495 }
496
497 /* end of PMON data to start of kernel -- probably zero .. */
498 if (heaptop != CPHYSADDR((u32)_text)) {
499 i++; /* 2 */
500 mdesc[i].type = BOOT_MEM_RAM;
501 mdesc[i].base = heaptop;
502 mdesc[i].size = CPHYSADDR((u32)_text) - mdesc[i].base;
503 }
504
505 /* kernel proper */
506 i++; /* 3 */
507 mdesc[i].type = BOOT_MEM_RESERVED;
508 mdesc[i].base = CPHYSADDR((u32)_text);
509#ifdef CONFIG_MTD_PMC_MSP_RAMROOT
510 if (get_ramroot(&ramroot_start, &ramroot_size)) {
511 /*
512 * Rootfs in RAM -- follows kernel
513 * Combine rootfs image with kernel block so a
514 * page (4k) isn't wasted between memory blocks
515 */
516 mdesc[i].size = CPHYSADDR(PAGE_ALIGN(
517 (u32)ramroot_start + ramroot_size)) - mdesc[i].base;
518 } else
519#endif
520 mdesc[i].size = CPHYSADDR(PAGE_ALIGN(
521 (u32)_end)) - mdesc[i].base;
522
523 /* Remainder of RAM -- under memsize */
524 i++; /* 5 */
525 mdesc[i].type = yamon_free;
526 mdesc[i].base = mdesc[i-1].base + mdesc[i-1].size;
527 mdesc[i].size = memsize - mdesc[i].base;
528
529 return &mdesc[0];
530}
531
532/* rootfs functions */
533#ifdef CONFIG_MTD_PMC_MSP_RAMROOT
534bool get_ramroot(void **start, unsigned long *size)
535{
536 extern char _end[];
537
538 /* Check for start following the end of the kernel */
539 void *check_start = (void *)_end;
540
541 /* Check for supported rootfs types */
542#ifdef CONFIG_CRAMFS
543 if (*(__u32 *)check_start == CRAMFS_MAGIC) {
544 /* Get CRAMFS size */
545 *start = check_start;
546 *size = PAGE_ALIGN(((struct cramfs_super *)
547 check_start)->size);
548
549 return true;
550 }
551#endif
552#ifdef CONFIG_SQUASHFS
553 if (*((unsigned int *)check_start) == SQUASHFS_MAGIC) {
554 /* Get SQUASHFS size */
555 *start = check_start;
556 *size = PAGE_ALIGN(((struct squashfs_super_block *)
557 check_start)->bytes_used);
558
559 return true;
560 }
561#endif
562
563 return false;
564}
565EXPORT_SYMBOL(get_ramroot);
566#endif
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_serial.c b/arch/mips/pmc-sierra/msp71xx/msp_serial.c
index c41b53faa8..e25bac537d 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_serial.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_serial.c
@@ -32,6 +32,7 @@
32#include <asm/io.h> 32#include <asm/io.h>
33#include <asm/processor.h> 33#include <asm/processor.h>
34#include <asm/serial.h> 34#include <asm/serial.h>
35#include <linux/serial_8250.h>
35 36
36#include <msp_prom.h> 37#include <msp_prom.h>
37#include <msp_int.h> 38#include <msp_int.h>
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_setup.c b/arch/mips/pmc-sierra/msp71xx/msp_setup.c
new file mode 100644
index 0000000000..8f69b789be
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_setup.c
@@ -0,0 +1,256 @@
1/*
2 * The generic setup file for PMC-Sierra MSP processors
3 *
4 * Copyright 2005-2007 PMC-Sierra, Inc,
5 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13#include <asm/bootinfo.h>
14#include <asm/cacheflush.h>
15#include <asm/r4kcache.h>
16#include <asm/reboot.h>
17#include <asm/time.h>
18
19#include <msp_prom.h>
20#include <msp_regs.h>
21
22#if defined(CONFIG_PMC_MSP7120_GW)
23#include <msp_regops.h>
24#include <msp_gpio.h>
25#define MSP_BOARD_RESET_GPIO 9
26#endif
27
28extern void msp_timer_init(void);
29extern void msp_serial_setup(void);
30extern void pmctwiled_setup(void);
31
32#if defined(CONFIG_PMC_MSP7120_EVAL) || \
33 defined(CONFIG_PMC_MSP7120_GW) || \
34 defined(CONFIG_PMC_MSP7120_FPGA)
35/*
36 * Performs the reset for MSP7120-based boards
37 */
38void msp7120_reset(void)
39{
40 void *start, *end, *iptr;
41 register int i;
42
43 /* Diasble all interrupts */
44 local_irq_disable();
45#ifdef CONFIG_SYS_SUPPORTS_MULTITHREADING
46 dvpe();
47#endif
48
49 /* Cache the reset code of this function */
50 __asm__ __volatile__ (
51 " .set push \n"
52 " .set mips3 \n"
53 " la %0,startpoint \n"
54 " la %1,endpoint \n"
55 " .set pop \n"
56 : "=r" (start), "=r" (end)
57 :
58 );
59
60 for (iptr = (void *)((unsigned int)start & ~(L1_CACHE_BYTES - 1));
61 iptr < end; iptr += L1_CACHE_BYTES)
62 cache_op(Fill, iptr);
63
64 __asm__ __volatile__ (
65 "startpoint: \n"
66 );
67
68 /* Put the DDRC into self-refresh mode */
69 DDRC_INDIRECT_WRITE(DDRC_CTL(10), 0xb, 1 << 16);
70
71 /*
72 * IMPORTANT!
73 * DO NOT do anything from here on out that might even
74 * think about fetching from RAM - i.e., don't call any
75 * non-inlined functions, and be VERY sure that any inline
76 * functions you do call do NOT access any sort of RAM
77 * anywhere!
78 */
79
80 /* Wait a bit for the DDRC to settle */
81 for (i = 0; i < 100000000; i++);
82
83#if defined(CONFIG_PMC_MSP7120_GW)
84 /*
85 * Set GPIO 9 HI, (tied to board reset logic)
86 * GPIO 9 is the 4th GPIO of register 3
87 *
88 * NOTE: We cannot use the higher-level msp_gpio_mode()/out()
89 * as GPIO char driver may not be enabled and it would look up
90 * data inRAM!
91 */
92 set_value_reg32(GPIO_CFG3_REG,
93 basic_mode_mask(MSP_BOARD_RESET_GPIO),
94 basic_mode(MSP_GPIO_OUTPUT, MSP_BOARD_RESET_GPIO));
95 set_reg32(GPIO_DATA3_REG,
96 basic_data_mask(MSP_BOARD_RESET_GPIO));
97
98 /*
99 * In case GPIO9 doesn't reset the board (jumper configurable!)
100 * fallback to device reset below.
101 */
102#endif
103 /* Set bit 1 of the MSP7120 reset register */
104 *RST_SET_REG = 0x00000001;
105
106 __asm__ __volatile__ (
107 "endpoint: \n"
108 );
109}
110#endif
111
112void msp_restart(char *command)
113{
114 printk(KERN_WARNING "Now rebooting .......\n");
115
116#if defined(CONFIG_PMC_MSP7120_EVAL) || \
117 defined(CONFIG_PMC_MSP7120_GW) || \
118 defined(CONFIG_PMC_MSP7120_FPGA)
119 msp7120_reset();
120#else
121 /* No chip-specific reset code, just jump to the ROM reset vector */
122 set_c0_status(ST0_BEV | ST0_ERL);
123 change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED);
124 flush_cache_all();
125 write_c0_wired(0);
126
127 __asm__ __volatile__("jr\t%0"::"r"(0xbfc00000));
128#endif
129}
130
131void msp_halt(void)
132{
133 printk(KERN_WARNING "\n** You can safely turn off the power\n");
134 while (1)
135 /* If possible call official function to get CPU WARs */
136 if (cpu_wait)
137 (*cpu_wait)();
138 else
139 __asm__(".set\tmips3\n\t" "wait\n\t" ".set\tmips0");
140}
141
142void msp_power_off(void)
143{
144 msp_halt();
145}
146
147void __init plat_mem_setup(void)
148{
149 _machine_restart = msp_restart;
150 _machine_halt = msp_halt;
151 pm_power_off = msp_power_off;
152
153 board_time_init = msp_timer_init;
154}
155
156void __init prom_init(void)
157{
158 unsigned long family;
159 unsigned long revision;
160
161 prom_argc = fw_arg0;
162 prom_argv = (char **)fw_arg1;
163 prom_envp = (char **)fw_arg2;
164
165 /*
166 * Someday we can use this with PMON2000 to get a
167 * platform call prom routines for output etc. without
168 * having to use grody hacks. For now it's unused.
169 *
170 * struct callvectors *cv = (struct callvectors *) fw_arg3;
171 */
172 family = identify_family();
173 revision = identify_revision();
174
175 switch (family) {
176 case FAMILY_FPGA:
177 if (FPGA_IS_MSP4200(revision)) {
178 /* Old-style revision ID */
179 mips_machgroup = MACH_GROUP_MSP;
180 mips_machtype = MACH_MSP4200_FPGA;
181 } else {
182 mips_machgroup = MACH_GROUP_MSP;
183 mips_machtype = MACH_MSP_OTHER;
184 }
185 break;
186
187 case FAMILY_MSP4200:
188 mips_machgroup = MACH_GROUP_MSP;
189#if defined(CONFIG_PMC_MSP4200_EVAL)
190 mips_machtype = MACH_MSP4200_EVAL;
191#elif defined(CONFIG_PMC_MSP4200_GW)
192 mips_machtype = MACH_MSP4200_GW;
193#else
194 mips_machtype = MACH_MSP_OTHER;
195#endif
196 break;
197
198 case FAMILY_MSP4200_FPGA:
199 mips_machgroup = MACH_GROUP_MSP;
200 mips_machtype = MACH_MSP4200_FPGA;
201 break;
202
203 case FAMILY_MSP7100:
204 mips_machgroup = MACH_GROUP_MSP;
205#if defined(CONFIG_PMC_MSP7120_EVAL)
206 mips_machtype = MACH_MSP7120_EVAL;
207#elif defined(CONFIG_PMC_MSP7120_GW)
208 mips_machtype = MACH_MSP7120_GW;
209#else
210 mips_machtype = MACH_MSP_OTHER;
211#endif
212 break;
213
214 case FAMILY_MSP7100_FPGA:
215 mips_machgroup = MACH_GROUP_MSP;
216 mips_machtype = MACH_MSP7120_FPGA;
217 break;
218
219 default:
220 /* we don't recognize the machine */
221 mips_machgroup = MACH_GROUP_UNKNOWN;
222 mips_machtype = MACH_UNKNOWN;
223 break;
224 }
225
226 /* make sure we have the right initialization routine - sanity */
227 if (mips_machgroup != MACH_GROUP_MSP) {
228 ppfinit("Unknown machine group in a "
229 "MSP initialization routine\n");
230 panic("***Bogosity factor five***, exiting\n");
231 }
232
233 prom_init_cmdline();
234
235 prom_meminit();
236
237 /*
238 * Sub-system setup follows.
239 * Setup functions can either be called here or using the
240 * subsys_initcall mechanism (i.e. see msp_pci_setup). The
241 * order in which they are called can be changed by using the
242 * link order in arch/mips/pmc-sierra/msp71xx/Makefile.
243 *
244 * NOTE: Please keep sub-system specific initialization code
245 * in separate specific files.
246 */
247 msp_serial_setup();
248
249#ifdef CONFIG_PMCTWILED
250 /*
251 * Setup LED states before the subsys_initcall loads other
252 * dependant drivers/modules.
253 */
254 pmctwiled_setup();
255#endif
256}
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_time.c b/arch/mips/pmc-sierra/msp71xx/msp_time.c
new file mode 100644
index 0000000000..2a2beac5a4
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_time.c
@@ -0,0 +1,94 @@
1/*
2 * Setting up the clock on MSP SOCs. No RTC typically.
3 *
4 * Carsten Langgaard, carstenl@mips.com
5 * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
6 *
7 * ########################################################################
8 *
9 * This program is free software; you can distribute it and/or modify it
10 * under the terms of the GNU General Public License (Version 2) as
11 * published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 * for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
21 *
22 * ########################################################################
23 */
24
25#include <linux/init.h>
26#include <linux/kernel_stat.h>
27#include <linux/sched.h>
28#include <linux/spinlock.h>
29#include <linux/module.h>
30#include <linux/ptrace.h>
31
32#include <asm/mipsregs.h>
33#include <asm/time.h>
34
35#include <msp_prom.h>
36#include <msp_int.h>
37#include <msp_regs.h>
38
39void __init msp_timer_init(void)
40{
41 char *endp, *s;
42 unsigned long cpu_rate = 0;
43
44 if (cpu_rate == 0) {
45 s = prom_getenv("clkfreqhz");
46 cpu_rate = simple_strtoul(s, &endp, 10);
47 if (endp != NULL && *endp != 0) {
48 printk(KERN_ERR
49 "Clock rate in Hz parse error: %s\n", s);
50 cpu_rate = 0;
51 }
52 }
53
54 if (cpu_rate == 0) {
55 s = prom_getenv("clkfreq");
56 cpu_rate = 1000 * simple_strtoul(s, &endp, 10);
57 if (endp != NULL && *endp != 0) {
58 printk(KERN_ERR
59 "Clock rate in MHz parse error: %s\n", s);
60 cpu_rate = 0;
61 }
62 }
63
64 if (cpu_rate == 0) {
65#if defined(CONFIG_PMC_MSP7120_EVAL) \
66 || defined(CONFIG_PMC_MSP7120_GW)
67 cpu_rate = 400000000;
68#elif defined(CONFIG_PMC_MSP7120_FPGA)
69 cpu_rate = 25000000;
70#else
71 cpu_rate = 150000000;
72#endif
73 printk(KERN_ERR
74 "Failed to determine CPU clock rate, "
75 "assuming %ld hz ...\n", cpu_rate);
76 }
77
78 printk(KERN_WARNING "Clock rate set to %ld\n", cpu_rate);
79
80 /* timer frequency is 1/2 clock rate */
81 mips_hpt_frequency = cpu_rate/2;
82}
83
84
85void __init plat_timer_setup(struct irqaction *irq)
86{
87#ifdef CONFIG_IRQ_MSP_CIC
88 /* we are using the vpe0 counter for timer interrupts */
89 setup_irq(MSP_INT_VPE0_TIMER, irq);
90#else
91 /* we are using the mips counter for timer interrupts */
92 setup_irq(MSP_INT_TIMER, irq);
93#endif
94}
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_usb.c b/arch/mips/pmc-sierra/msp71xx/msp_usb.c
new file mode 100644
index 0000000000..21f9c70b69
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_usb.c
@@ -0,0 +1,150 @@
1/*
2 * The setup file for USB related hardware on PMC-Sierra MSP processors.
3 *
4 * Copyright 2006-2007 PMC-Sierra, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
12 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
14 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
15 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
20 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 *
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26
27#include <linux/dma-mapping.h>
28#include <linux/init.h>
29#include <linux/ioport.h>
30#include <linux/platform_device.h>
31
32#include <asm/mipsregs.h>
33
34#include <msp_regs.h>
35#include <msp_int.h>
36#include <msp_prom.h>
37
38#if defined(CONFIG_USB_EHCI_HCD)
39static struct resource msp_usbhost_resources [] = {
40 [0] = {
41 .start = MSP_USB_BASE_START,
42 .end = MSP_USB_BASE_END,
43 .flags = IORESOURCE_MEM,
44 },
45 [1] = {
46 .start = MSP_INT_USB,
47 .end = MSP_INT_USB,
48 .flags = IORESOURCE_IRQ,
49 },
50};
51
52static u64 msp_usbhost_dma_mask = DMA_32BIT_MASK;
53
54static struct platform_device msp_usbhost_device = {
55 .name = "pmcmsp-ehci",
56 .id = 0,
57 .dev = {
58 .dma_mask = &msp_usbhost_dma_mask,
59 .coherent_dma_mask = DMA_32BIT_MASK,
60 },
61 .num_resources = ARRAY_SIZE (msp_usbhost_resources),
62 .resource = msp_usbhost_resources,
63};
64#endif /* CONFIG_USB_EHCI_HCD */
65
66#if defined(CONFIG_USB_GADGET)
67static struct resource msp_usbdev_resources [] = {
68 [0] = {
69 .start = MSP_USB_BASE,
70 .end = MSP_USB_BASE_END,
71 .flags = IORESOURCE_MEM,
72 },
73 [1] = {
74 .start = MSP_INT_USB,
75 .end = MSP_INT_USB,
76 .flags = IORESOURCE_IRQ,
77 },
78};
79
80static u64 msp_usbdev_dma_mask = DMA_32BIT_MASK;
81
82static struct platform_device msp_usbdev_device = {
83 .name = "msp71xx_udc",
84 .id = 0,
85 .dev = {
86 .dma_mask = &msp_usbdev_dma_mask,
87 .coherent_dma_mask = DMA_32BIT_MASK,
88 },
89 .num_resources = ARRAY_SIZE (msp_usbdev_resources),
90 .resource = msp_usbdev_resources,
91};
92#endif /* CONFIG_USB_GADGET */
93
94#if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_GADGET)
95static struct platform_device *msp_devs[1];
96#endif
97
98
99static int __init msp_usb_setup(void)
100{
101#if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_GADGET)
102 char *strp;
103 char envstr[32];
104 unsigned int val = 0;
105 int result = 0;
106
107 /*
108 * construct environment name usbmode
109 * set usbmode <host/device> as pmon environment var
110 */
111 snprintf((char *)&envstr[0], sizeof(envstr), "usbmode");
112
113#if defined(CONFIG_USB_EHCI_HCD)
114 /* default to host mode */
115 val = 1;
116#endif
117
118 /* get environment string */
119 strp = prom_getenv((char *)&envstr[0]);
120 if (strp) {
121 if (!strcmp(strp, "device"))
122 val = 0;
123 }
124
125 if (val) {
126#if defined(CONFIG_USB_EHCI_HCD)
127 /* get host mode device */
128 msp_devs[0] = &msp_usbhost_device;
129 ppfinit("platform add USB HOST done %s.\n",
130 msp_devs[0]->name);
131
132 result = platform_add_devices(msp_devs, ARRAY_SIZE (msp_devs));
133#endif /* CONFIG_USB_EHCI_HCD */
134 }
135#if defined(CONFIG_USB_GADGET)
136 else {
137 /* get device mode structure */
138 msp_devs[0] = &msp_usbdev_device;
139 ppfinit("platform add USB DEVICE done %s.\n",
140 msp_devs[0]->name);
141
142 result = platform_add_devices(msp_devs, ARRAY_SIZE (msp_devs));
143 }
144#endif /* CONFIG_USB_GADGET */
145#endif /* CONFIG_USB_EHCI_HCD || CONFIG_USB_GADGET */
146
147 return result;
148}
149
150subsys_initcall(msp_usb_setup);
diff --git a/arch/mips/pmc-sierra/yosemite/setup.c b/arch/mips/pmc-sierra/yosemite/setup.c
index 6a6e15e400..f7f93ae24c 100644
--- a/arch/mips/pmc-sierra/yosemite/setup.c
+++ b/arch/mips/pmc-sierra/yosemite/setup.c
@@ -39,6 +39,7 @@
39#include <linux/tty.h> 39#include <linux/tty.h>
40#include <linux/serial.h> 40#include <linux/serial.h>
41#include <linux/serial_core.h> 41#include <linux/serial_core.h>
42#include <linux/serial_8250.h>
42 43
43#include <asm/time.h> 44#include <asm/time.h>
44#include <asm/bootinfo.h> 45#include <asm/bootinfo.h>
diff --git a/arch/mips/pmc-sierra/yosemite/smp.c b/arch/mips/pmc-sierra/yosemite/smp.c
index 305491e74d..d83c4ada14 100644
--- a/arch/mips/pmc-sierra/yosemite/smp.c
+++ b/arch/mips/pmc-sierra/yosemite/smp.c
@@ -77,7 +77,7 @@ void __init plat_prepare_cpus(unsigned int max_cpus)
77 * stack so the first thing we do is throw away that stuff and load useful 77 * stack so the first thing we do is throw away that stuff and load useful
78 * values into the registers ... 78 * values into the registers ...
79 */ 79 */
80void prom_boot_secondary(int cpu, struct task_struct *idle) 80void __init prom_boot_secondary(int cpu, struct task_struct *idle)
81{ 81{
82 unsigned long gp = (unsigned long) task_thread_info(idle); 82 unsigned long gp = (unsigned long) task_thread_info(idle);
83 unsigned long sp = __KSTK_TOS(idle); 83 unsigned long sp = __KSTK_TOS(idle);
diff --git a/arch/mips/sgi-ip22/ip22-reset.c b/arch/mips/sgi-ip22/ip22-reset.c
index 66df5ac8f0..63afd7e444 100644
--- a/arch/mips/sgi-ip22/ip22-reset.c
+++ b/arch/mips/sgi-ip22/ip22-reset.c
@@ -46,7 +46,7 @@ static struct timer_list power_timer, blink_timer, debounce_timer, volume_timer;
46 46
47static int machine_state; 47static int machine_state;
48 48
49static void ATTRIB_NORET sgi_machine_power_off(void) 49static void __noreturn sgi_machine_power_off(void)
50{ 50{
51 unsigned int tmp; 51 unsigned int tmp;
52 52
@@ -68,7 +68,7 @@ static void ATTRIB_NORET sgi_machine_power_off(void)
68 } 68 }
69} 69}
70 70
71static void ATTRIB_NORET sgi_machine_restart(char *command) 71static void __noreturn sgi_machine_restart(char *command)
72{ 72{
73 if (machine_state & MACHINE_SHUTTING_DOWN) 73 if (machine_state & MACHINE_SHUTTING_DOWN)
74 sgi_machine_power_off(); 74 sgi_machine_power_off();
@@ -76,7 +76,7 @@ static void ATTRIB_NORET sgi_machine_restart(char *command)
76 while (1); 76 while (1);
77} 77}
78 78
79static void ATTRIB_NORET sgi_machine_halt(void) 79static void __noreturn sgi_machine_halt(void)
80{ 80{
81 if (machine_state & MACHINE_SHUTTING_DOWN) 81 if (machine_state & MACHINE_SHUTTING_DOWN)
82 sgi_machine_power_off(); 82 sgi_machine_power_off();
diff --git a/arch/mips/sgi-ip27/ip27-berr.c b/arch/mips/sgi-ip27/ip27-berr.c
index ce907eda22..123141ab21 100644
--- a/arch/mips/sgi-ip27/ip27-berr.c
+++ b/arch/mips/sgi-ip27/ip27-berr.c
@@ -21,7 +21,6 @@
21#include <asm/traps.h> 21#include <asm/traps.h>
22#include <asm/uaccess.h> 22#include <asm/uaccess.h>
23 23
24extern void dump_tlb_addr(unsigned long addr);
25extern void dump_tlb_all(void); 24extern void dump_tlb_all(void);
26 25
27static void dump_hub_information(unsigned long errst0, unsigned long errst1) 26static void dump_hub_information(unsigned long errst0, unsigned long errst1)
diff --git a/arch/mips/sgi-ip32/ip32-platform.c b/arch/mips/sgi-ip32/ip32-platform.c
index 120b15932c..ba3697ee7f 100644
--- a/arch/mips/sgi-ip32/ip32-platform.c
+++ b/arch/mips/sgi-ip32/ip32-platform.c
@@ -1,5 +1,53 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
7 */
8#include <linux/module.h>
1#include <linux/init.h> 9#include <linux/init.h>
2#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/serial_8250.h>
12
13#include <asm/ip32/mace.h>
14#include <asm/ip32/ip32_ints.h>
15
16/*
17 * .iobase isn't a constant (in the sense of C) so we fill it in at runtime.
18 */
19#define MACE_PORT(int) \
20{ \
21 .irq = int, \
22 .uartclk = 1843200, \
23 .iotype = UPIO_MEM, \
24 .flags = UPF_SKIP_TEST, \
25 .regshift = 8, \
26}
27
28static struct plat_serial8250_port uart8250_data[] = {
29 MACE_PORT(MACEISA_SERIAL1_IRQ),
30 MACE_PORT(MACEISA_SERIAL2_IRQ),
31 { },
32};
33
34static struct platform_device uart8250_device = {
35 .name = "serial8250",
36 .id = PLAT8250_DEV_PLATFORM,
37 .dev = {
38 .platform_data = uart8250_data,
39 },
40};
41
42static int __init uart8250_init(void)
43{
44 uart8250_data[0].iobase = (unsigned long) &mace->isa.serial1;
45 uart8250_data[1].iobase = (unsigned long) &mace->isa.serial1;
46
47 return platform_device_register(&uart8250_device);
48}
49
50device_initcall(uart8250_init);
3 51
4static __init int meth_devinit(void) 52static __init int meth_devinit(void)
5{ 53{
@@ -18,3 +66,7 @@ static __init int meth_devinit(void)
18} 66}
19 67
20device_initcall(meth_devinit); 68device_initcall(meth_devinit);
69
70MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
71MODULE_LICENSE("GPL");
72MODULE_DESCRIPTION("8250 UART probe driver for SGI IP32 aka O2");
diff --git a/arch/mips/sgi-ip32/ip32-setup.c b/arch/mips/sgi-ip32/ip32-setup.c
index 57708fe28b..bbba066cb4 100644
--- a/arch/mips/sgi-ip32/ip32-setup.c
+++ b/arch/mips/sgi-ip32/ip32-setup.c
@@ -62,12 +62,6 @@ static inline void str2eaddr(unsigned char *ea, unsigned char *str)
62} 62}
63#endif 63#endif
64 64
65#ifdef CONFIG_SERIAL_8250
66#include <linux/tty.h>
67#include <linux/serial.h>
68#include <linux/serial_core.h>
69#endif /* CONFIG_SERIAL_8250 */
70
71/* An arbitrary time; this can be decreased if reliability looks good */ 65/* An arbitrary time; this can be decreased if reliability looks good */
72#define WAIT_MS 10 66#define WAIT_MS 10
73 67
@@ -96,36 +90,6 @@ void __init plat_mem_setup(void)
96 90
97 board_time_init = ip32_time_init; 91 board_time_init = ip32_time_init;
98 92
99#ifdef CONFIG_SERIAL_8250
100 {
101 static struct uart_port o2_serial[2];
102
103 memset(o2_serial, 0, sizeof(o2_serial));
104 o2_serial[0].type = PORT_16550A;
105 o2_serial[0].line = 0;
106 o2_serial[0].irq = MACEISA_SERIAL1_IRQ;
107 o2_serial[0].flags = UPF_SKIP_TEST;
108 o2_serial[0].uartclk = 1843200;
109 o2_serial[0].iotype = UPIO_MEM;
110 o2_serial[0].membase = (char *)&mace->isa.serial1;
111 o2_serial[0].fifosize = 14;
112 /* How much to shift register offset by. Each UART register
113 * is replicated over 256 byte space */
114 o2_serial[0].regshift = 8;
115 o2_serial[1].type = PORT_16550A;
116 o2_serial[1].line = 1;
117 o2_serial[1].irq = MACEISA_SERIAL2_IRQ;
118 o2_serial[1].flags = UPF_SKIP_TEST;
119 o2_serial[1].uartclk = 1843200;
120 o2_serial[1].iotype = UPIO_MEM;
121 o2_serial[1].membase = (char *)&mace->isa.serial2;
122 o2_serial[1].fifosize = 14;
123 o2_serial[1].regshift = 8;
124
125 early_serial_setup(&o2_serial[0]);
126 early_serial_setup(&o2_serial[1]);
127 }
128#endif
129#ifdef CONFIG_SGI_O2MACE_ETH 93#ifdef CONFIG_SGI_O2MACE_ETH
130 { 94 {
131 char *mac = ArcGetEnvironmentVariable("eaddr"); 95 char *mac = ArcGetEnvironmentVariable("eaddr");
diff --git a/arch/mips/sibyte/bcm1480/setup.c b/arch/mips/sibyte/bcm1480/setup.c
index bdaac34ae7..89f29233ca 100644
--- a/arch/mips/sibyte/bcm1480/setup.c
+++ b/arch/mips/sibyte/bcm1480/setup.c
@@ -31,6 +31,7 @@
31unsigned int sb1_pass; 31unsigned int sb1_pass;
32unsigned int soc_pass; 32unsigned int soc_pass;
33unsigned int soc_type; 33unsigned int soc_type;
34EXPORT_SYMBOL(soc_type);
34unsigned int periph_rev; 35unsigned int periph_rev;
35unsigned int zbbus_mhz; 36unsigned int zbbus_mhz;
36 37
diff --git a/arch/mips/sibyte/cfe/setup.c b/arch/mips/sibyte/cfe/setup.c
index ae4a92c3e5..51898dd130 100644
--- a/arch/mips/sibyte/cfe/setup.c
+++ b/arch/mips/sibyte/cfe/setup.c
@@ -62,7 +62,7 @@ extern unsigned long initrd_start, initrd_end;
62extern int kgdb_port; 62extern int kgdb_port;
63#endif 63#endif
64 64
65static void ATTRIB_NORET cfe_linux_exit(void *arg) 65static void __noreturn cfe_linux_exit(void *arg)
66{ 66{
67 int warm = *(int *)arg; 67 int warm = *(int *)arg;
68 68
@@ -83,14 +83,14 @@ static void ATTRIB_NORET cfe_linux_exit(void *arg)
83 while (1); 83 while (1);
84} 84}
85 85
86static void ATTRIB_NORET cfe_linux_restart(char *command) 86static void __noreturn cfe_linux_restart(char *command)
87{ 87{
88 static const int zero; 88 static const int zero;
89 89
90 cfe_linux_exit((void *)&zero); 90 cfe_linux_exit((void *)&zero);
91} 91}
92 92
93static void ATTRIB_NORET cfe_linux_halt(void) 93static void __noreturn cfe_linux_halt(void)
94{ 94{
95 static const int one = 1; 95 static const int one = 1;
96 96
diff --git a/arch/mips/sibyte/sb1250/setup.c b/arch/mips/sibyte/sb1250/setup.c
index f4a6169aa0..2d5c6d8b41 100644
--- a/arch/mips/sibyte/sb1250/setup.c
+++ b/arch/mips/sibyte/sb1250/setup.c
@@ -31,6 +31,7 @@
31unsigned int sb1_pass; 31unsigned int sb1_pass;
32unsigned int soc_pass; 32unsigned int soc_pass;
33unsigned int soc_type; 33unsigned int soc_type;
34EXPORT_SYMBOL(soc_type);
34unsigned int periph_rev; 35unsigned int periph_rev;
35unsigned int zbbus_mhz; 36unsigned int zbbus_mhz;
36EXPORT_SYMBOL(zbbus_mhz); 37EXPORT_SYMBOL(zbbus_mhz);
diff --git a/arch/mips/sibyte/swarm/time.c b/arch/mips/sibyte/swarm/time.c
deleted file mode 100644
index 97c73c793c..0000000000
--- a/arch/mips/sibyte/swarm/time.c
+++ /dev/null
@@ -1,244 +0,0 @@
1/*
2 * Copyright (C) 2000, 2001 Broadcom 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 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19/*
20 * Time routines for the swarm board. We pass all the hard stuff
21 * through to the sb1250 handling code. Only thing we really keep
22 * track of here is what time of day we think it is. And we don't
23 * really even do a good job of that...
24 */
25
26
27#include <linux/bcd.h>
28#include <linux/init.h>
29#include <linux/time.h>
30#include <linux/sched.h>
31#include <linux/spinlock.h>
32#include <asm/system.h>
33#include <asm/addrspace.h>
34#include <asm/io.h>
35
36#include <asm/sibyte/sb1250.h>
37#include <asm/sibyte/sb1250_regs.h>
38#include <asm/sibyte/sb1250_smbus.h>
39
40static unsigned long long sec_bias = 0;
41static unsigned int usec_bias = 0;
42
43/* Xicor 1241 definitions */
44
45/*
46 * Register bits
47 */
48
49#define X1241REG_SR_BAT 0x80 /* currently on battery power */
50#define X1241REG_SR_RWEL 0x04 /* r/w latch is enabled, can write RTC */
51#define X1241REG_SR_WEL 0x02 /* r/w latch is unlocked, can enable r/w now */
52#define X1241REG_SR_RTCF 0x01 /* clock failed */
53#define X1241REG_BL_BP2 0x80 /* block protect 2 */
54#define X1241REG_BL_BP1 0x40 /* block protect 1 */
55#define X1241REG_BL_BP0 0x20 /* block protect 0 */
56#define X1241REG_BL_WD1 0x10
57#define X1241REG_BL_WD0 0x08
58#define X1241REG_HR_MIL 0x80 /* military time format */
59
60/*
61 * Register numbers
62 */
63
64#define X1241REG_BL 0x10 /* block protect bits */
65#define X1241REG_INT 0x11 /* */
66#define X1241REG_SC 0x30 /* Seconds */
67#define X1241REG_MN 0x31 /* Minutes */
68#define X1241REG_HR 0x32 /* Hours */
69#define X1241REG_DT 0x33 /* Day of month */
70#define X1241REG_MO 0x34 /* Month */
71#define X1241REG_YR 0x35 /* Year */
72#define X1241REG_DW 0x36 /* Day of Week */
73#define X1241REG_Y2K 0x37 /* Year 2K */
74#define X1241REG_SR 0x3F /* Status register */
75
76#define X1241_CCR_ADDRESS 0x6F
77
78#define SMB_CSR(reg) (IOADDR(A_SMB_REGISTER(1, reg)))
79
80static int xicor_read(uint8_t addr)
81{
82 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY)
83 ;
84
85 __raw_writeq((addr >> 8) & 0x7, SMB_CSR(R_SMB_CMD));
86 __raw_writeq(addr & 0xff, SMB_CSR(R_SMB_DATA));
87 __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_WR2BYTE,
88 SMB_CSR(R_SMB_START));
89
90 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY)
91 ;
92
93 __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_RD1BYTE,
94 SMB_CSR(R_SMB_START));
95
96 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY)
97 ;
98
99 if (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_ERROR) {
100 /* Clear error bit by writing a 1 */
101 __raw_writeq(M_SMB_ERROR, SMB_CSR(R_SMB_STATUS));
102 return -1;
103 }
104
105 return (__raw_readq(SMB_CSR(R_SMB_DATA)) & 0xff);
106}
107
108static int xicor_write(uint8_t addr, int b)
109{
110 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY)
111 ;
112
113 __raw_writeq(addr, SMB_CSR(R_SMB_CMD));
114 __raw_writeq((addr & 0xff) | ((b & 0xff) << 8), SMB_CSR(R_SMB_DATA));
115 __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_WR3BYTE,
116 SMB_CSR(R_SMB_START));
117
118 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY)
119 ;
120
121 if (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_ERROR) {
122 /* Clear error bit by writing a 1 */
123 __raw_writeq(M_SMB_ERROR, SMB_CSR(R_SMB_STATUS));
124 return -1;
125 } else {
126 return 0;
127 }
128}
129
130/*
131 * In order to set the CMOS clock precisely, set_rtc_mmss has to be
132 * called 500 ms after the second nowtime has started, because when
133 * nowtime is written into the registers of the CMOS clock, it will
134 * jump to the next second precisely 500 ms later. Check the Motorola
135 * MC146818A or Dallas DS12887 data sheet for details.
136 *
137 * BUG: This routine does not handle hour overflow properly; it just
138 * sets the minutes. Usually you'll only notice that after reboot!
139 */
140int set_rtc_mmss(unsigned long nowtime)
141{
142 int retval = 0;
143 int real_seconds, real_minutes, cmos_minutes;
144
145 cmos_minutes = xicor_read(X1241REG_MN);
146 cmos_minutes = BCD2BIN(cmos_minutes);
147
148 /*
149 * since we're only adjusting minutes and seconds,
150 * don't interfere with hour overflow. This avoids
151 * messing with unknown time zones but requires your
152 * RTC not to be off by more than 15 minutes
153 */
154 real_seconds = nowtime % 60;
155 real_minutes = nowtime / 60;
156 if (((abs(real_minutes - cmos_minutes) + 15)/30) & 1)
157 real_minutes += 30; /* correct for half hour time zone */
158 real_minutes %= 60;
159
160 /* unlock writes to the CCR */
161 xicor_write(X1241REG_SR, X1241REG_SR_WEL);
162 xicor_write(X1241REG_SR, X1241REG_SR_WEL | X1241REG_SR_RWEL);
163
164 if (abs(real_minutes - cmos_minutes) < 30) {
165 real_seconds = BIN2BCD(real_seconds);
166 real_minutes = BIN2BCD(real_minutes);
167 xicor_write(X1241REG_SC, real_seconds);
168 xicor_write(X1241REG_MN, real_minutes);
169 } else {
170 printk(KERN_WARNING
171 "set_rtc_mmss: can't update from %d to %d\n",
172 cmos_minutes, real_minutes);
173 retval = -1;
174 }
175
176 xicor_write(X1241REG_SR, 0);
177
178 printk("set_rtc_mmss: %02d:%02d\n", real_minutes, real_seconds);
179
180 return retval;
181}
182
183static unsigned long __init get_swarm_time(void)
184{
185 unsigned int year, mon, day, hour, min, sec, y2k;
186
187 sec = xicor_read(X1241REG_SC);
188 min = xicor_read(X1241REG_MN);
189 hour = xicor_read(X1241REG_HR);
190
191 if (hour & X1241REG_HR_MIL) {
192 hour &= 0x3f;
193 } else {
194 if (hour & 0x20)
195 hour = (hour & 0xf) + 0x12;
196 }
197
198 sec = BCD2BIN(sec);
199 min = BCD2BIN(min);
200 hour = BCD2BIN(hour);
201
202 day = xicor_read(X1241REG_DT);
203 mon = xicor_read(X1241REG_MO);
204 year = xicor_read(X1241REG_YR);
205 y2k = xicor_read(X1241REG_Y2K);
206
207 day = BCD2BIN(day);
208 mon = BCD2BIN(mon);
209 year = BCD2BIN(year);
210 y2k = BCD2BIN(y2k);
211
212 year += (y2k * 100);
213
214 return mktime(year, mon, day, hour, min, sec);
215}
216
217/*
218 * Bring up the timer at 100 Hz.
219 */
220void __init swarm_time_init(void)
221{
222 unsigned int flags;
223 int status;
224
225 /* Set up the scd general purpose timer 0 to cpu 0 */
226 sb1250_time_init();
227
228 /* Establish communication with the Xicor 1241 RTC */
229 /* XXXKW how do I share the SMBus with the I2C subsystem? */
230
231 __raw_writeq(K_SMB_FREQ_400KHZ, SMB_CSR(R_SMB_FREQ));
232 __raw_writeq(0, SMB_CSR(R_SMB_CONTROL));
233
234 if ((status = xicor_read(X1241REG_SR_RTCF)) < 0) {
235 printk("x1241: couldn't detect on SWARM SMBus 1\n");
236 } else {
237 if (status & X1241REG_SR_RTCF)
238 printk("x1241: battery failed -- time is probably wrong\n");
239 write_seqlock_irqsave(&xtime_lock, flags);
240 xtime.tv_sec = get_swarm_time();
241 xtime.tv_nsec = 0;
242 write_sequnlock_irqrestore(&xtime_lock, flags);
243 }
244}
diff --git a/arch/mips/sni/Makefile b/arch/mips/sni/Makefile
index e5777b7e2b..471418e4f4 100644
--- a/arch/mips/sni/Makefile
+++ b/arch/mips/sni/Makefile
@@ -2,5 +2,5 @@
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 reset.o setup.o ds1216.o a20r.o rm200.o pcimt.o pcit.o time.o 5obj-y += irq.o reset.o setup.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
diff --git a/arch/mips/sni/a20r.c b/arch/mips/sni/a20r.c
index 31ab80f1be..acc9ba76c1 100644
--- a/arch/mips/sni/a20r.c
+++ b/arch/mips/sni/a20r.c
@@ -15,7 +15,6 @@
15 15
16#include <asm/sni.h> 16#include <asm/sni.h>
17#include <asm/time.h> 17#include <asm/time.h>
18#include <asm/ds1216.h>
19 18
20#define PORT(_base,_irq) \ 19#define PORT(_base,_irq) \
21 { \ 20 { \
@@ -40,20 +39,34 @@ static struct platform_device a20r_serial8250_device = {
40 }, 39 },
41}; 40};
42 41
42static struct resource a20r_ds1216_rsrc[] = {
43 {
44 .start = 0x1c081ffc,
45 .end = 0x1c081fff,
46 .flags = IORESOURCE_MEM
47 }
48};
49
50static struct platform_device a20r_ds1216_device = {
51 .name = "rtc-ds1216",
52 .num_resources = ARRAY_SIZE(a20r_ds1216_rsrc),
53 .resource = a20r_ds1216_rsrc
54};
55
43static struct resource snirm_82596_rsrc[] = { 56static struct resource snirm_82596_rsrc[] = {
44 { 57 {
45 .start = 0xb8000000, 58 .start = 0x18000000,
46 .end = 0xb8000004, 59 .end = 0x18000004,
47 .flags = IORESOURCE_MEM 60 .flags = IORESOURCE_MEM
48 }, 61 },
49 { 62 {
50 .start = 0xb8010000, 63 .start = 0x18010000,
51 .end = 0xb8010004, 64 .end = 0x18010004,
52 .flags = IORESOURCE_MEM 65 .flags = IORESOURCE_MEM
53 }, 66 },
54 { 67 {
55 .start = 0xbff00000, 68 .start = 0x1ff00000,
56 .end = 0xbff00020, 69 .end = 0x1ff00020,
57 .flags = IORESOURCE_MEM 70 .flags = IORESOURCE_MEM
58 }, 71 },
59 { 72 {
@@ -74,8 +87,8 @@ static struct platform_device snirm_82596_pdev = {
74 87
75static struct resource snirm_53c710_rsrc[] = { 88static struct resource snirm_53c710_rsrc[] = {
76 { 89 {
77 .start = 0xb9000000, 90 .start = 0x19000000,
78 .end = 0xb90fffff, 91 .end = 0x190fffff,
79 .flags = IORESOURCE_MEM 92 .flags = IORESOURCE_MEM
80 }, 93 },
81 { 94 {
@@ -93,8 +106,8 @@ static struct platform_device snirm_53c710_pdev = {
93 106
94static struct resource sc26xx_rsrc[] = { 107static struct resource sc26xx_rsrc[] = {
95 { 108 {
96 .start = 0xbc070000, 109 .start = 0x1c070000,
97 .end = 0xbc0700ff, 110 .end = 0x1c0700ff,
98 .flags = IORESOURCE_MEM 111 .flags = IORESOURCE_MEM
99 }, 112 },
100 { 113 {
@@ -205,8 +218,7 @@ void __init sni_a20r_irq_init(void)
205 218
206void sni_a20r_init(void) 219void sni_a20r_init(void)
207{ 220{
208 ds1216_base = (volatile unsigned char *) SNI_DS1216_A20R_BASE; 221 /* FIXME, remove if not needed */
209 rtc_mips_get_time = ds1216_get_cmos_time;
210} 222}
211 223
212static int __init snirm_a20r_setup_devinit(void) 224static int __init snirm_a20r_setup_devinit(void)
@@ -218,6 +230,7 @@ static int __init snirm_a20r_setup_devinit(void)
218 platform_device_register(&snirm_53c710_pdev); 230 platform_device_register(&snirm_53c710_pdev);
219 platform_device_register(&sc26xx_pdev); 231 platform_device_register(&sc26xx_pdev);
220 platform_device_register(&a20r_serial8250_device); 232 platform_device_register(&a20r_serial8250_device);
233 platform_device_register(&a20r_ds1216_device);
221 break; 234 break;
222 } 235 }
223 236
diff --git a/arch/mips/sni/ds1216.c b/arch/mips/sni/ds1216.c
deleted file mode 100644
index 1d92732c14..0000000000
--- a/arch/mips/sni/ds1216.c
+++ /dev/null
@@ -1,81 +0,0 @@
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/pcimt.c b/arch/mips/sni/pcimt.c
index 97b234361b..44b1ae62aa 100644
--- a/arch/mips/sni/pcimt.c
+++ b/arch/mips/sni/pcimt.c
@@ -14,7 +14,6 @@
14#include <linux/pci.h> 14#include <linux/pci.h>
15#include <linux/serial_8250.h> 15#include <linux/serial_8250.h>
16 16
17#include <asm/mc146818-time.h>
18#include <asm/sni.h> 17#include <asm/sni.h>
19#include <asm/time.h> 18#include <asm/time.h>
20#include <asm/i8259.h> 19#include <asm/i8259.h>
@@ -90,6 +89,26 @@ static struct platform_device pcimt_serial8250_device = {
90 }, 89 },
91}; 90};
92 91
92static struct resource pcimt_cmos_rsrc[] = {
93 {
94 .start = 0x70,
95 .end = 0x71,
96 .flags = IORESOURCE_IO
97 },
98 {
99 .start = 8,
100 .end = 8,
101 .flags = IORESOURCE_IRQ
102 }
103};
104
105static struct platform_device pcimt_cmos_device = {
106 .name = "rtc_cmos",
107 .num_resources = ARRAY_SIZE(pcimt_cmos_rsrc),
108 .resource = pcimt_cmos_rsrc
109};
110
111
93static struct resource sni_io_resource = { 112static struct resource sni_io_resource = {
94 .start = 0x00000000UL, 113 .start = 0x00000000UL,
95 .end = 0x03bfffffUL, 114 .end = 0x03bfffffUL,
@@ -290,12 +309,10 @@ void __init sni_pcimt_irq_init(void)
290 change_c0_status(ST0_IM, IE_IRQ1|IE_IRQ3); 309 change_c0_status(ST0_IM, IE_IRQ1|IE_IRQ3);
291} 310}
292 311
293void sni_pcimt_init(void) 312void __init sni_pcimt_init(void)
294{ 313{
295 sni_pcimt_detect(); 314 sni_pcimt_detect();
296 sni_pcimt_sc_init(); 315 sni_pcimt_sc_init();
297 rtc_mips_get_time = mc146818_get_cmos_time;
298 rtc_mips_set_time = mc146818_set_rtc_mmss;
299 board_time_init = sni_cpu_time_init; 316 board_time_init = sni_cpu_time_init;
300 ioport_resource.end = sni_io_resource.end; 317 ioport_resource.end = sni_io_resource.end;
301#ifdef CONFIG_PCI 318#ifdef CONFIG_PCI
@@ -312,6 +329,7 @@ static int __init snirm_pcimt_setup_devinit(void)
312 case SNI_BRD_PCI_DESKTOP: 329 case SNI_BRD_PCI_DESKTOP:
313 case SNI_BRD_PCI_MTOWER_CPLUS: 330 case SNI_BRD_PCI_MTOWER_CPLUS:
314 platform_device_register(&pcimt_serial8250_device); 331 platform_device_register(&pcimt_serial8250_device);
332 platform_device_register(&pcimt_cmos_device);
315 break; 333 break;
316 } 334 }
317 335
diff --git a/arch/mips/sni/pcit.c b/arch/mips/sni/pcit.c
index 00d151f4d1..2480c478dc 100644
--- a/arch/mips/sni/pcit.c
+++ b/arch/mips/sni/pcit.c
@@ -13,7 +13,6 @@
13#include <linux/pci.h> 13#include <linux/pci.h>
14#include <linux/serial_8250.h> 14#include <linux/serial_8250.h>
15 15
16#include <asm/mc146818-time.h>
17#include <asm/sni.h> 16#include <asm/sni.h>
18#include <asm/time.h> 17#include <asm/time.h>
19#include <asm/irq_cpu.h> 18#include <asm/irq_cpu.h>
@@ -58,6 +57,25 @@ static struct platform_device pcit_cplus_serial8250_device = {
58 }, 57 },
59}; 58};
60 59
60static struct resource pcit_cmos_rsrc[] = {
61 {
62 .start = 0x70,
63 .end = 0x71,
64 .flags = IORESOURCE_IO
65 },
66 {
67 .start = 8,
68 .end = 8,
69 .flags = IORESOURCE_IRQ
70 }
71};
72
73static struct platform_device pcit_cmos_device = {
74 .name = "rtc_cmos",
75 .num_resources = ARRAY_SIZE(pcit_cmos_rsrc),
76 .resource = pcit_cmos_rsrc
77};
78
61static struct resource sni_io_resource = { 79static struct resource sni_io_resource = {
62 .start = 0x00000000UL, 80 .start = 0x00000000UL,
63 .end = 0x03bfffffUL, 81 .end = 0x03bfffffUL,
@@ -243,10 +261,8 @@ void __init sni_pcit_cplus_irq_init(void)
243 setup_irq (MIPS_CPU_IRQ_BASE + 3, &sni_isa_irq); 261 setup_irq (MIPS_CPU_IRQ_BASE + 3, &sni_isa_irq);
244} 262}
245 263
246void sni_pcit_init(void) 264void __init sni_pcit_init(void)
247{ 265{
248 rtc_mips_get_time = mc146818_get_cmos_time;
249 rtc_mips_set_time = mc146818_set_rtc_mmss;
250 board_time_init = sni_cpu_time_init; 266 board_time_init = sni_cpu_time_init;
251 ioport_resource.end = sni_io_resource.end; 267 ioport_resource.end = sni_io_resource.end;
252#ifdef CONFIG_PCI 268#ifdef CONFIG_PCI
@@ -261,10 +277,12 @@ static int __init snirm_pcit_setup_devinit(void)
261 switch (sni_brd_type) { 277 switch (sni_brd_type) {
262 case SNI_BRD_PCI_TOWER: 278 case SNI_BRD_PCI_TOWER:
263 platform_device_register(&pcit_serial8250_device); 279 platform_device_register(&pcit_serial8250_device);
280 platform_device_register(&pcit_cmos_device);
264 break; 281 break;
265 282
266 case SNI_BRD_PCI_TOWER_CPLUS: 283 case SNI_BRD_PCI_TOWER_CPLUS:
267 platform_device_register(&pcit_cplus_serial8250_device); 284 platform_device_register(&pcit_cplus_serial8250_device);
285 platform_device_register(&pcit_cmos_device);
268 break; 286 break;
269 } 287 }
270 return 0; 288 return 0;
diff --git a/arch/mips/sni/rm200.c b/arch/mips/sni/rm200.c
index b82ff129f5..28a11d8605 100644
--- a/arch/mips/sni/rm200.c
+++ b/arch/mips/sni/rm200.c
@@ -15,7 +15,6 @@
15 15
16#include <asm/sni.h> 16#include <asm/sni.h>
17#include <asm/time.h> 17#include <asm/time.h>
18#include <asm/ds1216.h>
19#include <asm/irq_cpu.h> 18#include <asm/irq_cpu.h>
20 19
21#define PORT(_base,_irq) \ 20#define PORT(_base,_irq) \
@@ -41,20 +40,34 @@ static struct platform_device rm200_serial8250_device = {
41 }, 40 },
42}; 41};
43 42
43static struct resource rm200_ds1216_rsrc[] = {
44 {
45 .start = 0x1cd41ffc,
46 .end = 0x1cd41fff,
47 .flags = IORESOURCE_MEM
48 }
49};
50
51static struct platform_device rm200_ds1216_device = {
52 .name = "rtc-ds1216",
53 .num_resources = ARRAY_SIZE(rm200_ds1216_rsrc),
54 .resource = rm200_ds1216_rsrc
55};
56
44static struct resource snirm_82596_rm200_rsrc[] = { 57static struct resource snirm_82596_rm200_rsrc[] = {
45 { 58 {
46 .start = 0xb8000000, 59 .start = 0x18000000,
47 .end = 0xb80fffff, 60 .end = 0x180fffff,
48 .flags = IORESOURCE_MEM 61 .flags = IORESOURCE_MEM
49 }, 62 },
50 { 63 {
51 .start = 0xbb000000, 64 .start = 0x1b000000,
52 .end = 0xbb000004, 65 .end = 0x1b000004,
53 .flags = IORESOURCE_MEM 66 .flags = IORESOURCE_MEM
54 }, 67 },
55 { 68 {
56 .start = 0xbff00000, 69 .start = 0x1ff00000,
57 .end = 0xbff00020, 70 .end = 0x1ff00020,
58 .flags = IORESOURCE_MEM 71 .flags = IORESOURCE_MEM
59 }, 72 },
60 { 73 {
@@ -75,8 +88,8 @@ static struct platform_device snirm_82596_rm200_pdev = {
75 88
76static struct resource snirm_53c710_rm200_rsrc[] = { 89static struct resource snirm_53c710_rm200_rsrc[] = {
77 { 90 {
78 .start = 0xb9000000, 91 .start = 0x19000000,
79 .end = 0xb90fffff, 92 .end = 0x190fffff,
80 .flags = IORESOURCE_MEM 93 .flags = IORESOURCE_MEM
81 }, 94 },
82 { 95 {
@@ -96,6 +109,7 @@ static int __init snirm_setup_devinit(void)
96{ 109{
97 if (sni_brd_type == SNI_BRD_RM200) { 110 if (sni_brd_type == SNI_BRD_RM200) {
98 platform_device_register(&rm200_serial8250_device); 111 platform_device_register(&rm200_serial8250_device);
112 platform_device_register(&rm200_ds1216_device);
99 platform_device_register(&snirm_82596_rm200_pdev); 113 platform_device_register(&snirm_82596_rm200_pdev);
100 platform_device_register(&snirm_53c710_rm200_pdev); 114 platform_device_register(&snirm_53c710_rm200_pdev);
101 } 115 }
@@ -176,11 +190,9 @@ void __init sni_rm200_irq_init(void)
176 setup_irq (SNI_RM200_INT_START + 0, &sni_isa_irq); 190 setup_irq (SNI_RM200_INT_START + 0, &sni_isa_irq);
177} 191}
178 192
179void sni_rm200_init(void) 193void __init sni_rm200_init(void)
180{ 194{
181 set_io_port_base(SNI_PORT_BASE + 0x02000000); 195 set_io_port_base(SNI_PORT_BASE + 0x02000000);
182 ioport_resource.end += 0x02000000; 196 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; 197 board_time_init = sni_cpu_time_init;
186} 198}
diff --git a/arch/mips/sni/sniprom.c b/arch/mips/sni/sniprom.c
index 643366eb85..00a03a6e8f 100644
--- a/arch/mips/sni/sniprom.c
+++ b/arch/mips/sni/sniprom.c
@@ -146,7 +146,10 @@ static void __init sni_console_setup(void)
146 } 146 }
147 if (baud) 147 if (baud)
148 strcpy(options, baud); 148 strcpy(options, baud);
149 add_preferred_console("ttyS", port, baud ? options : NULL); 149 if (strncmp (cdev, "tty552", 6) == 0)
150 add_preferred_console("ttyS", port, baud ? options : NULL);
151 else
152 add_preferred_console("ttySC", port, baud ? options : NULL);
150 } 153 }
151} 154}
152 155
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
index a0c11efeae..40c7c3eeaf 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
@@ -138,7 +138,6 @@ extern void toshiba_rbtx4927_irq_setup(void);
138char *prom_getcmdline(void); 138char *prom_getcmdline(void);
139 139
140#ifdef CONFIG_PCI 140#ifdef CONFIG_PCI
141#define CONFIG_TX4927BUG_WORKAROUND
142#undef TX4927_SUPPORT_COMMAND_IO 141#undef TX4927_SUPPORT_COMMAND_IO
143#undef TX4927_SUPPORT_PCI_66 142#undef TX4927_SUPPORT_PCI_66
144int tx4927_cpu_clock = 100000000; /* 100MHz */ 143int tx4927_cpu_clock = 100000000; /* 100MHz */
@@ -669,15 +668,7 @@ void tx4927_pci_setup(void)
669 668
670 /* PCI->GB mappings (MEM 16MB) -not used */ 669 /* PCI->GB mappings (MEM 16MB) -not used */
671 tx4927_pcicptr->p2gm1plbase = 0xffffffff; 670 tx4927_pcicptr->p2gm1plbase = 0xffffffff;
672#ifdef CONFIG_TX4927BUG_WORKAROUND
673 /*
674 * TX4927-PCIC-BUG: P2GM1PUBASE must be 0
675 * if P2GM0PUBASE was 0.
676 */
677 tx4927_pcicptr->p2gm1pubase = 0;
678#else
679 tx4927_pcicptr->p2gm1pubase = 0xffffffff; 671 tx4927_pcicptr->p2gm1pubase = 0xffffffff;
680#endif
681 tx4927_pcicptr->p2gmgbase[1] = 0; 672 tx4927_pcicptr->p2gmgbase[1] = 0;
682 673
683 /* PCI->GB mappings (MEM 1MB) -not used */ 674 /* PCI->GB mappings (MEM 1MB) -not used */
@@ -910,16 +901,6 @@ void __init toshiba_rbtx4927_setup(void)
910 if (tx4927_ccfg_toeon) 901 if (tx4927_ccfg_toeon)
911 tx4927_ccfgptr->ccfg |= TX4927_CCFG_TOE; 902 tx4927_ccfgptr->ccfg |= TX4927_CCFG_TOE;
912 903
913 /* SDRAMC fixup */
914#ifdef CONFIG_TX4927BUG_WORKAROUND
915 /*
916 * TX4927-BUG: INF 01-01-18/ BUG 01-01-22
917 * G-bus timeout error detection is incorrect
918 */
919 if (tx4927_ccfg_toeon)
920 tx4927_sdramcptr->tr |= 0x02000000; /* RCD:3tck */
921#endif
922
923 tx4927_pci_setup(); 904 tx4927_pci_setup();
924 if (tx4927_using_backplane == 1) 905 if (tx4927_using_backplane == 1)
925 printk("backplane board IS installed\n"); 906 printk("backplane board IS installed\n");
diff --git a/arch/mips/tx4938/common/Makefile b/arch/mips/tx4938/common/Makefile
index 2033ae77f6..83cda518f2 100644
--- a/arch/mips/tx4938/common/Makefile
+++ b/arch/mips/tx4938/common/Makefile
@@ -6,6 +6,6 @@
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 += prom.o setup.o irq.o rtc_rx5c348.o 9obj-y += prom.o setup.o irq.o
10obj-$(CONFIG_KGDB) += dbgio.o 10obj-$(CONFIG_KGDB) += dbgio.o
11 11
diff --git a/arch/mips/tx4938/common/rtc_rx5c348.c b/arch/mips/tx4938/common/rtc_rx5c348.c
deleted file mode 100644
index 07f782fc07..0000000000
--- a/arch/mips/tx4938/common/rtc_rx5c348.c
+++ /dev/null
@@ -1,192 +0,0 @@
1/*
2 * RTC routines for RICOH Rx5C348 SPI chip.
3 * Copyright (C) 2000-2001 Toshiba Corporation
4 *
5 * 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the
6 * terms of the GNU General Public License version 2. This program is
7 * licensed "as is" without any warranty of any kind, whether express
8 * or implied.
9 *
10 * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com)
11 */
12#include <linux/init.h>
13#include <linux/kernel.h>
14#include <linux/string.h>
15#include <linux/rtc.h>
16#include <linux/time.h>
17#include <linux/bcd.h>
18#include <asm/time.h>
19#include <asm/tx4938/spi.h>
20
21#define EPOCH 2000
22
23/* registers */
24#define Rx5C348_REG_SECOND 0
25#define Rx5C348_REG_MINUTE 1
26#define Rx5C348_REG_HOUR 2
27#define Rx5C348_REG_WEEK 3
28#define Rx5C348_REG_DAY 4
29#define Rx5C348_REG_MONTH 5
30#define Rx5C348_REG_YEAR 6
31#define Rx5C348_REG_ADJUST 7
32#define Rx5C348_REG_ALARM_W_MIN 8
33#define Rx5C348_REG_ALARM_W_HOUR 9
34#define Rx5C348_REG_ALARM_W_WEEK 10
35#define Rx5C348_REG_ALARM_D_MIN 11
36#define Rx5C348_REG_ALARM_D_HOUR 12
37#define Rx5C348_REG_CTL1 14
38#define Rx5C348_REG_CTL2 15
39
40/* register bits */
41#define Rx5C348_BIT_PM 0x20 /* REG_HOUR */
42#define Rx5C348_BIT_Y2K 0x80 /* REG_MONTH */
43#define Rx5C348_BIT_24H 0x20 /* REG_CTL1 */
44#define Rx5C348_BIT_XSTP 0x10 /* REG_CTL2 */
45
46/* commands */
47#define Rx5C348_CMD_W(addr) (((addr) << 4) | 0x08) /* single write */
48#define Rx5C348_CMD_R(addr) (((addr) << 4) | 0x0c) /* single read */
49#define Rx5C348_CMD_MW(addr) (((addr) << 4) | 0x00) /* burst write */
50#define Rx5C348_CMD_MR(addr) (((addr) << 4) | 0x04) /* burst read */
51
52static struct spi_dev_desc srtc_dev_desc = {
53 .baud = 1000000, /* 1.0Mbps @ Vdd 2.0V */
54 .tcss = 31,
55 .tcsh = 1,
56 .tcsr = 62,
57 /* 31us for Tcss (62us for Tcsr) is required for carry operation) */
58 .byteorder = 1, /* MSB-First */
59 .polarity = 0, /* High-Active */
60 .phase = 1, /* Shift-Then-Sample */
61
62};
63static int srtc_chipid;
64static int srtc_24h;
65
66static inline int
67spi_rtc_io(unsigned char *inbuf, unsigned char *outbuf, unsigned int count)
68{
69 unsigned char *inbufs[1], *outbufs[1];
70 unsigned int incounts[2], outcounts[2];
71 inbufs[0] = inbuf;
72 incounts[0] = count;
73 incounts[1] = 0;
74 outbufs[0] = outbuf;
75 outcounts[0] = count;
76 outcounts[1] = 0;
77 return txx9_spi_io(srtc_chipid, &srtc_dev_desc,
78 inbufs, incounts, outbufs, outcounts, 0);
79}
80
81/* RTC-dependent code for time.c */
82
83static int
84rtc_rx5c348_set_time(unsigned long t)
85{
86 unsigned char inbuf[8];
87 struct rtc_time tm;
88 u8 year, month, day, hour, minute, second, century;
89
90 /* convert */
91 to_tm(t, &tm);
92
93 year = tm.tm_year % 100;
94 month = tm.tm_mon+1; /* tm_mon starts from 0 to 11 */
95 day = tm.tm_mday;
96 hour = tm.tm_hour;
97 minute = tm.tm_min;
98 second = tm.tm_sec;
99 century = tm.tm_year / 100;
100
101 inbuf[0] = Rx5C348_CMD_MW(Rx5C348_REG_SECOND);
102 BIN_TO_BCD(second);
103 inbuf[1] = second;
104 BIN_TO_BCD(minute);
105 inbuf[2] = minute;
106
107 if (srtc_24h) {
108 BIN_TO_BCD(hour);
109 inbuf[3] = hour;
110 } else {
111 /* hour 0 is AM12, noon is PM12 */
112 inbuf[3] = 0;
113 if (hour >= 12)
114 inbuf[3] = Rx5C348_BIT_PM;
115 hour = (hour + 11) % 12 + 1;
116 BIN_TO_BCD(hour);
117 inbuf[3] |= hour;
118 }
119 inbuf[4] = 0; /* ignore week */
120 BIN_TO_BCD(day);
121 inbuf[5] = day;
122 BIN_TO_BCD(month);
123 inbuf[6] = month;
124 if (century >= 20)
125 inbuf[6] |= Rx5C348_BIT_Y2K;
126 BIN_TO_BCD(year);
127 inbuf[7] = year;
128 /* write in one transfer to avoid data inconsistency */
129 return spi_rtc_io(inbuf, NULL, 8);
130}
131
132static unsigned long
133rtc_rx5c348_get_time(void)
134{
135 unsigned char inbuf[8], outbuf[8];
136 unsigned int year, month, day, hour, minute, second;
137
138 inbuf[0] = Rx5C348_CMD_MR(Rx5C348_REG_SECOND);
139 memset(inbuf + 1, 0, 7);
140 /* read in one transfer to avoid data inconsistency */
141 if (spi_rtc_io(inbuf, outbuf, 8))
142 return 0;
143 second = outbuf[1];
144 BCD_TO_BIN(second);
145 minute = outbuf[2];
146 BCD_TO_BIN(minute);
147 if (srtc_24h) {
148 hour = outbuf[3];
149 BCD_TO_BIN(hour);
150 } else {
151 hour = outbuf[3] & ~Rx5C348_BIT_PM;
152 BCD_TO_BIN(hour);
153 hour %= 12;
154 if (outbuf[3] & Rx5C348_BIT_PM)
155 hour += 12;
156 }
157 day = outbuf[5];
158 BCD_TO_BIN(day);
159 month = outbuf[6] & ~Rx5C348_BIT_Y2K;
160 BCD_TO_BIN(month);
161 year = outbuf[7];
162 BCD_TO_BIN(year);
163 year += EPOCH;
164
165 return mktime(year, month, day, hour, minute, second);
166}
167
168void __init
169rtc_rx5c348_init(int chipid)
170{
171 unsigned char inbuf[2], outbuf[2];
172 srtc_chipid = chipid;
173 /* turn on RTC if it is not on */
174 inbuf[0] = Rx5C348_CMD_R(Rx5C348_REG_CTL2);
175 inbuf[1] = 0;
176 spi_rtc_io(inbuf, outbuf, 2);
177 if (outbuf[1] & Rx5C348_BIT_XSTP) {
178 inbuf[0] = Rx5C348_CMD_W(Rx5C348_REG_CTL2);
179 inbuf[1] = 0;
180 spi_rtc_io(inbuf, NULL, 2);
181 }
182
183 inbuf[0] = Rx5C348_CMD_R(Rx5C348_REG_CTL1);
184 inbuf[1] = 0;
185 spi_rtc_io(inbuf, outbuf, 2);
186 if (outbuf[1] & Rx5C348_BIT_24H)
187 srtc_24h = 1;
188
189 /* set the function pointers */
190 rtc_mips_get_time = rtc_rx5c348_get_time;
191 rtc_mips_set_time = rtc_rx5c348_set_time;
192}
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/Makefile b/arch/mips/tx4938/toshiba_rbtx4938/Makefile
index 226941279d..10c94e62bf 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/Makefile
+++ b/arch/mips/tx4938/toshiba_rbtx4938/Makefile
@@ -6,4 +6,4 @@
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 += prom.o setup.o irq.o spi_eeprom.o spi_txx9.o 9obj-y += prom.o setup.o irq.o spi_eeprom.o
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/irq.c b/arch/mips/tx4938/toshiba_rbtx4938/irq.c
index 2e96dbb248..91aea7aff5 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/irq.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/irq.c
@@ -165,8 +165,6 @@ toshiba_rbtx4938_irq_ioc_disable(unsigned int irq)
165 TX4938_RD08(TOSHIBA_RBTX4938_IOC_INTR_ENAB); 165 TX4938_RD08(TOSHIBA_RBTX4938_IOC_INTR_ENAB);
166} 166}
167 167
168extern void __init txx9_spi_irqinit(int irc_irq);
169
170void __init arch_init_irq(void) 168void __init arch_init_irq(void)
171{ 169{
172 extern void tx4938_irq_init(void); 170 extern void tx4938_irq_init(void);
@@ -185,9 +183,5 @@ void __init arch_init_irq(void)
185 /* Onboard 10M Ether: High Active */ 183 /* Onboard 10M Ether: High Active */
186 TX4938_WR(TX4938_MKA(TX4938_IRC_IRDM0), 0x00000040); 184 TX4938_WR(TX4938_MKA(TX4938_IRC_IRDM0), 0x00000040);
187 185
188 if (tx4938_ccfgptr->pcfg & TX4938_PCFG_SPI_SEL) {
189 txx9_spi_irqinit(RBTX4938_IRQ_IRC_SPI);
190 }
191
192 wbflush(); 186 wbflush();
193} 187}
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/setup.c b/arch/mips/tx4938/toshiba_rbtx4938/setup.c
index f5d1ce739f..6ed39a5aea 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/setup.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/setup.c
@@ -14,13 +14,13 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/ioport.h> 16#include <linux/ioport.h>
17#include <linux/proc_fs.h>
18#include <linux/delay.h> 17#include <linux/delay.h>
19#include <linux/interrupt.h> 18#include <linux/interrupt.h>
20#include <linux/console.h> 19#include <linux/console.h>
21#include <linux/pci.h> 20#include <linux/pci.h>
22#include <linux/pm.h> 21#include <linux/pm.h>
23#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/clk.h>
24 24
25#include <asm/wbflush.h> 25#include <asm/wbflush.h>
26#include <asm/reboot.h> 26#include <asm/reboot.h>
@@ -35,6 +35,9 @@
35#include <linux/serial.h> 35#include <linux/serial.h>
36#include <linux/serial_core.h> 36#include <linux/serial_core.h>
37#endif 37#endif
38#include <linux/spi/spi.h>
39#include <asm/tx4938/spi.h>
40#include <asm/gpio.h>
38 41
39extern void rbtx4938_time_init(void) __init; 42extern void rbtx4938_time_init(void) __init;
40extern char * __init prom_getcmdline(void); 43extern char * __init prom_getcmdline(void);
@@ -349,7 +352,7 @@ static struct pci_dev *fake_pci_dev(struct pci_controller *hose,
349 static struct pci_dev dev; 352 static struct pci_dev dev;
350 static struct pci_bus bus; 353 static struct pci_bus bus;
351 354
352 dev.sysdata = (void *)hose; 355 dev.sysdata = bus.sysdata = hose;
353 dev.devfn = devfn; 356 dev.devfn = devfn;
354 bus.number = busnr; 357 bus.number = busnr;
355 bus.ops = hose->pci_ops; 358 bus.ops = hose->pci_ops;
@@ -382,8 +385,10 @@ int txboard_pci66_check(struct pci_controller *hose, int top_bus, int current_bu
382 printk("PCI: Checking 66MHz capabilities...\n"); 385 printk("PCI: Checking 66MHz capabilities...\n");
383 386
384 for (pci_devfn=devfn_start; pci_devfn<devfn_stop; pci_devfn++) { 387 for (pci_devfn=devfn_start; pci_devfn<devfn_stop; pci_devfn++) {
385 early_read_config_word(hose, top_bus, current_bus, pci_devfn, 388 if (early_read_config_word(hose, top_bus, current_bus,
386 PCI_VENDOR_ID, &vid); 389 pci_devfn, PCI_VENDOR_ID,
390 &vid) != PCIBIOS_SUCCESSFUL)
391 continue;
387 392
388 if (vid == 0xffff) continue; 393 if (vid == 0xffff) continue;
389 394
@@ -460,7 +465,6 @@ static int __init tx4938_pcibios_init(void)
460 int extarb = !(tx4938_ccfgptr->ccfg & TX4938_CCFG_PCIXARB); 465 int extarb = !(tx4938_ccfgptr->ccfg & TX4938_CCFG_PCIXARB);
461 466
462 PCIBIOS_MIN_IO = 0x00001000UL; 467 PCIBIOS_MIN_IO = 0x00001000UL;
463 PCIBIOS_MIN_MEM = 0x01000000UL;
464 468
465 mem_base[0] = txboard_request_phys_region_shrink(&mem_size[0]); 469 mem_base[0] = txboard_request_phys_region_shrink(&mem_size[0]);
466 io_base[0] = txboard_request_phys_region_shrink(&io_size[0]); 470 io_base[0] = txboard_request_phys_region_shrink(&io_size[0]);
@@ -574,82 +578,43 @@ arch_initcall(tx4938_pcibios_init);
574#define SEEPROM3_CS 1 /* IOC */ 578#define SEEPROM3_CS 1 /* IOC */
575#define SRTC_CS 2 /* IOC */ 579#define SRTC_CS 2 /* IOC */
576 580
577static int rbtx4938_spi_cs_func(int chipid, int on)
578{
579 unsigned char bit;
580 switch (chipid) {
581 case RBTX4938_SEEPROM1_CHIPID:
582 if (on)
583 tx4938_pioptr->dout &= ~(1 << SEEPROM1_CS);
584 else
585 tx4938_pioptr->dout |= (1 << SEEPROM1_CS);
586 return 0;
587 break;
588 case RBTX4938_SEEPROM2_CHIPID:
589 bit = (1 << SEEPROM2_CS);
590 break;
591 case RBTX4938_SEEPROM3_CHIPID:
592 bit = (1 << SEEPROM3_CS);
593 break;
594 case RBTX4938_SRTC_CHIPID:
595 bit = (1 << SRTC_CS);
596 break;
597 default:
598 return -ENODEV;
599 }
600 /* bit1,2,4 are low active, bit3 is high active */
601 *rbtx4938_spics_ptr =
602 (*rbtx4938_spics_ptr & ~bit) |
603 ((on ? (bit ^ 0x0b) : ~(bit ^ 0x0b)) & bit);
604 return 0;
605}
606
607#ifdef CONFIG_PCI 581#ifdef CONFIG_PCI
608extern int spi_eeprom_read(int chipid, int address, unsigned char *buf, int len); 582static int __init rbtx4938_ethaddr_init(void)
609
610int rbtx4938_get_tx4938_ethaddr(struct pci_dev *dev, unsigned char *addr)
611{ 583{
612 struct pci_controller *channel = (struct pci_controller *)dev->bus->sysdata; 584 unsigned char dat[17];
613 static unsigned char dat[17]; 585 unsigned char sum;
614 static int read_dat = 0; 586 int i;
615 int ch = 0;
616 587
617 if (channel != &tx4938_pci_controller[1]) 588 /* 0-3: "MAC\0", 4-9:eth0, 10-15:eth1, 16:sum */
618 return -ENODEV; 589 if (spi_eeprom_read(SEEPROM1_CS, 0, dat, sizeof(dat))) {
619 /* TX4938 PCIC1 */ 590 printk(KERN_ERR "seeprom: read error.\n");
620 switch (PCI_SLOT(dev->devfn)) {
621 case TX4938_PCIC_IDSEL_AD_TO_SLOT(31):
622 ch = 0;
623 break;
624 case TX4938_PCIC_IDSEL_AD_TO_SLOT(30):
625 ch = 1;
626 break;
627 default:
628 return -ENODEV; 591 return -ENODEV;
592 } else {
593 if (strcmp(dat, "MAC") != 0)
594 printk(KERN_WARNING "seeprom: bad signature.\n");
595 for (i = 0, sum = 0; i < sizeof(dat); i++)
596 sum += dat[i];
597 if (sum)
598 printk(KERN_WARNING "seeprom: bad checksum.\n");
629 } 599 }
630 if (!read_dat) { 600 for (i = 0; i < 2; i++) {
631 unsigned char sum; 601 unsigned int slot = TX4938_PCIC_IDSEL_AD_TO_SLOT(31 - i);
632 int i; 602 unsigned int id = (1 << 8) | PCI_DEVFN(slot, 0); /* bus 1 */
633 read_dat = 1; 603 struct platform_device *pdev;
634 /* 0-3: "MAC\0", 4-9:eth0, 10-15:eth1, 16:sum */ 604 if (!(tx4938_ccfgptr->pcfg &
635 if (spi_eeprom_read(RBTX4938_SEEPROM1_CHIPID, 605 (i ? TX4938_PCFG_ETH1_SEL : TX4938_PCFG_ETH0_SEL)))
636 0, dat, sizeof(dat))) { 606 continue;
637 printk(KERN_ERR "seeprom: read error.\n"); 607 pdev = platform_device_alloc("tc35815-mac", id);
638 } else { 608 if (!pdev ||
639 if (strcmp(dat, "MAC") != 0) 609 platform_device_add_data(pdev, &dat[4 + 6 * i], 6) ||
640 printk(KERN_WARNING "seeprom: bad signature.\n"); 610 platform_device_add(pdev))
641 for (i = 0, sum = 0; i < sizeof(dat); i++) 611 platform_device_put(pdev);
642 sum += dat[i];
643 if (sum)
644 printk(KERN_WARNING "seeprom: bad checksum.\n");
645 }
646 } 612 }
647 memcpy(addr, &dat[4 + 6 * ch], 6);
648 return 0; 613 return 0;
649} 614}
615device_initcall(rbtx4938_ethaddr_init);
650#endif /* CONFIG_PCI */ 616#endif /* CONFIG_PCI */
651 617
652extern void __init txx9_spi_init(unsigned long base, int (*cs_func)(int chipid, int on));
653static void __init rbtx4938_spi_setup(void) 618static void __init rbtx4938_spi_setup(void)
654{ 619{
655 /* set SPI_SEL */ 620 /* set SPI_SEL */
@@ -657,7 +622,6 @@ static void __init rbtx4938_spi_setup(void)
657 /* chip selects for SPI devices */ 622 /* chip selects for SPI devices */
658 tx4938_pioptr->dout |= (1 << SEEPROM1_CS); 623 tx4938_pioptr->dout |= (1 << SEEPROM1_CS);
659 tx4938_pioptr->dir |= (1 << SEEPROM1_CS); 624 tx4938_pioptr->dir |= (1 << SEEPROM1_CS);
660 txx9_spi_init(TX4938_SPI_REG, rbtx4938_spi_cs_func);
661} 625}
662 626
663static struct resource rbtx4938_fpga_resource; 627static struct resource rbtx4938_fpga_resource;
@@ -896,10 +860,8 @@ void tx4938_report_pcic_status(void)
896/* We use onchip r4k counter or TMR timer as our system wide timer 860/* We use onchip r4k counter or TMR timer as our system wide timer
897 * interrupt running at 100HZ. */ 861 * interrupt running at 100HZ. */
898 862
899extern void __init rtc_rx5c348_init(int chipid);
900void __init rbtx4938_time_init(void) 863void __init rbtx4938_time_init(void)
901{ 864{
902 rtc_rx5c348_init(RBTX4938_SRTC_CHIPID);
903 mips_hpt_frequency = txx9_cpu_clock / 2; 865 mips_hpt_frequency = txx9_cpu_clock / 2;
904} 866}
905 867
@@ -1016,29 +978,6 @@ void __init toshiba_rbtx4938_setup(void)
1016 *rbtx4938_dipsw_ptr, *rbtx4938_bdipsw_ptr); 978 *rbtx4938_dipsw_ptr, *rbtx4938_bdipsw_ptr);
1017} 979}
1018 980
1019#ifdef CONFIG_PROC_FS
1020extern void spi_eeprom_proc_create(struct proc_dir_entry *dir, int chipid);
1021static int __init tx4938_spi_proc_setup(void)
1022{
1023 struct proc_dir_entry *tx4938_spi_eeprom_dir;
1024
1025 tx4938_spi_eeprom_dir = proc_mkdir("spi_eeprom", 0);
1026
1027 if (!tx4938_spi_eeprom_dir)
1028 return -ENOMEM;
1029
1030 /* don't allow user access to RBTX4938_SEEPROM1_CHIPID
1031 * as it contains eth0 and eth1 MAC addresses
1032 */
1033 spi_eeprom_proc_create(tx4938_spi_eeprom_dir, RBTX4938_SEEPROM2_CHIPID);
1034 spi_eeprom_proc_create(tx4938_spi_eeprom_dir, RBTX4938_SEEPROM3_CHIPID);
1035
1036 return 0;
1037}
1038
1039__initcall(tx4938_spi_proc_setup);
1040#endif
1041
1042static int __init rbtx4938_ne_init(void) 981static int __init rbtx4938_ne_init(void)
1043{ 982{
1044 struct resource res[] = { 983 struct resource res[] = {
@@ -1057,3 +996,176 @@ static int __init rbtx4938_ne_init(void)
1057 return IS_ERR(dev) ? PTR_ERR(dev) : 0; 996 return IS_ERR(dev) ? PTR_ERR(dev) : 0;
1058} 997}
1059device_initcall(rbtx4938_ne_init); 998device_initcall(rbtx4938_ne_init);
999
1000/* GPIO support */
1001
1002static DEFINE_SPINLOCK(rbtx4938_spi_gpio_lock);
1003
1004static void rbtx4938_spi_gpio_set(unsigned gpio, int value)
1005{
1006 u8 val;
1007 unsigned long flags;
1008 gpio -= 16;
1009 spin_lock_irqsave(&rbtx4938_spi_gpio_lock, flags);
1010 val = *rbtx4938_spics_ptr;
1011 if (value)
1012 val |= 1 << gpio;
1013 else
1014 val &= ~(1 << gpio);
1015 *rbtx4938_spics_ptr = val;
1016 mmiowb();
1017 spin_unlock_irqrestore(&rbtx4938_spi_gpio_lock, flags);
1018}
1019
1020static int rbtx4938_spi_gpio_dir_out(unsigned gpio, int value)
1021{
1022 rbtx4938_spi_gpio_set(gpio, value);
1023 return 0;
1024}
1025
1026static DEFINE_SPINLOCK(tx4938_gpio_lock);
1027
1028static int tx4938_gpio_get(unsigned gpio)
1029{
1030 return tx4938_pioptr->din & (1 << gpio);
1031}
1032
1033static void tx4938_gpio_set_raw(unsigned gpio, int value)
1034{
1035 u32 val;
1036 val = tx4938_pioptr->dout;
1037 if (value)
1038 val |= 1 << gpio;
1039 else
1040 val &= ~(1 << gpio);
1041 tx4938_pioptr->dout = val;
1042}
1043
1044static void tx4938_gpio_set(unsigned gpio, int value)
1045{
1046 unsigned long flags;
1047 spin_lock_irqsave(&tx4938_gpio_lock, flags);
1048 tx4938_gpio_set_raw(gpio, value);
1049 mmiowb();
1050 spin_unlock_irqrestore(&tx4938_gpio_lock, flags);
1051}
1052
1053static int tx4938_gpio_dir_in(unsigned gpio)
1054{
1055 spin_lock_irq(&tx4938_gpio_lock);
1056 tx4938_pioptr->dir &= ~(1 << gpio);
1057 mmiowb();
1058 spin_unlock_irq(&tx4938_gpio_lock);
1059 return 0;
1060}
1061
1062static int tx4938_gpio_dir_out(unsigned int gpio, int value)
1063{
1064 spin_lock_irq(&tx4938_gpio_lock);
1065 tx4938_gpio_set_raw(gpio, value);
1066 tx4938_pioptr->dir |= 1 << gpio;
1067 mmiowb();
1068 spin_unlock_irq(&tx4938_gpio_lock);
1069 return 0;
1070}
1071
1072int gpio_direction_input(unsigned gpio)
1073{
1074 if (gpio < 16)
1075 return tx4938_gpio_dir_in(gpio);
1076 return -EINVAL;
1077}
1078
1079int gpio_direction_output(unsigned gpio, int value)
1080{
1081 if (gpio < 16)
1082 return tx4938_gpio_dir_out(gpio, value);
1083 if (gpio < 16 + 3)
1084 return rbtx4938_spi_gpio_dir_out(gpio, value);
1085 return -EINVAL;
1086}
1087
1088int gpio_get_value(unsigned gpio)
1089{
1090 if (gpio < 16)
1091 return tx4938_gpio_get(gpio);
1092 return 0;
1093}
1094
1095void gpio_set_value(unsigned gpio, int value)
1096{
1097 if (gpio < 16)
1098 tx4938_gpio_set(gpio, value);
1099 else
1100 rbtx4938_spi_gpio_set(gpio, value);
1101}
1102
1103/* SPI support */
1104
1105static void __init txx9_spi_init(unsigned long base, int irq)
1106{
1107 struct resource res[] = {
1108 {
1109 .start = base,
1110 .end = base + 0x20 - 1,
1111 .flags = IORESOURCE_MEM,
1112 .parent = &tx4938_reg_resource,
1113 }, {
1114 .start = irq,
1115 .flags = IORESOURCE_IRQ,
1116 },
1117 };
1118 platform_device_register_simple("txx9spi", 0,
1119 res, ARRAY_SIZE(res));
1120}
1121
1122static int __init rbtx4938_spi_init(void)
1123{
1124 struct spi_board_info srtc_info = {
1125 .modalias = "rs5c348",
1126 .max_speed_hz = 1000000, /* 1.0Mbps @ Vdd 2.0V */
1127 .bus_num = 0,
1128 .chip_select = 16 + SRTC_CS,
1129 /* Mode 1 (High-Active, Shift-Then-Sample), High Avtive CS */
1130 .mode = SPI_MODE_1 | SPI_CS_HIGH,
1131 };
1132 spi_register_board_info(&srtc_info, 1);
1133 spi_eeprom_register(SEEPROM1_CS);
1134 spi_eeprom_register(16 + SEEPROM2_CS);
1135 spi_eeprom_register(16 + SEEPROM3_CS);
1136 txx9_spi_init(TX4938_SPI_REG & 0xfffffffffULL, RBTX4938_IRQ_IRC_SPI);
1137 return 0;
1138}
1139arch_initcall(rbtx4938_spi_init);
1140
1141/* Minimum CLK support */
1142
1143struct clk *clk_get(struct device *dev, const char *id)
1144{
1145 if (!strcmp(id, "spi-baseclk"))
1146 return (struct clk *)(txx9_gbus_clock / 2 / 4);
1147 return ERR_PTR(-ENOENT);
1148}
1149EXPORT_SYMBOL(clk_get);
1150
1151int clk_enable(struct clk *clk)
1152{
1153 return 0;
1154}
1155EXPORT_SYMBOL(clk_enable);
1156
1157void clk_disable(struct clk *clk)
1158{
1159}
1160EXPORT_SYMBOL(clk_disable);
1161
1162unsigned long clk_get_rate(struct clk *clk)
1163{
1164 return (unsigned long)clk;
1165}
1166EXPORT_SYMBOL(clk_get_rate);
1167
1168void clk_put(struct clk *clk)
1169{
1170}
1171EXPORT_SYMBOL(clk_put);
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c b/arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c
index 89596e62f9..4d6b4ade5e 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c
@@ -10,209 +10,90 @@
10 * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) 10 * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com)
11 */ 11 */
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/delay.h> 13#include <linux/device.h>
14#include <linux/proc_fs.h> 14#include <linux/spi/spi.h>
15#include <linux/spinlock.h> 15#include <linux/spi/eeprom.h>
16#include <asm/tx4938/spi.h> 16#include <asm/tx4938/spi.h>
17#include <asm/tx4938/tx4938.h>
18 17
19/* ATMEL 250x0 instructions */ 18#define AT250X0_PAGE_SIZE 8
20#define ATMEL_WREN 0x06
21#define ATMEL_WRDI 0x04
22#define ATMEL_RDSR 0x05
23#define ATMEL_WRSR 0x01
24#define ATMEL_READ 0x03
25#define ATMEL_WRITE 0x02
26 19
27#define ATMEL_SR_BSY 0x01 20/* register board information for at25 driver */
28#define ATMEL_SR_WEN 0x02 21int __init spi_eeprom_register(int chipid)
29#define ATMEL_SR_BP0 0x04
30#define ATMEL_SR_BP1 0x08
31
32DEFINE_SPINLOCK(spi_eeprom_lock);
33
34static struct spi_dev_desc seeprom_dev_desc = {
35 .baud = 1500000, /* 1.5Mbps */
36 .tcss = 1,
37 .tcsh = 1,
38 .tcsr = 1,
39 .byteorder = 1, /* MSB-First */
40 .polarity = 0, /* High-Active */
41 .phase = 0, /* Sample-Then-Shift */
42
43};
44static inline int
45spi_eeprom_io(int chipid,
46 unsigned char **inbufs, unsigned int *incounts,
47 unsigned char **outbufs, unsigned int *outcounts)
48{
49 return txx9_spi_io(chipid, &seeprom_dev_desc,
50 inbufs, incounts, outbufs, outcounts, 0);
51}
52
53int spi_eeprom_write_enable(int chipid, int enable)
54{ 22{
55 unsigned char inbuf[1]; 23 static struct spi_eeprom eeprom = {
56 unsigned char *inbufs[1]; 24 .name = "at250x0",
57 unsigned int incounts[2]; 25 .byte_len = 128,
58 unsigned long flags; 26 .page_size = AT250X0_PAGE_SIZE,
59 int stat; 27 .flags = EE_ADDR1,
60 inbuf[0] = enable ? ATMEL_WREN : ATMEL_WRDI; 28 };
61 inbufs[0] = inbuf; 29 struct spi_board_info info = {
62 incounts[0] = sizeof(inbuf); 30 .modalias = "at25",
63 incounts[1] = 0; 31 .max_speed_hz = 1500000, /* 1.5Mbps */
64 spin_lock_irqsave(&spi_eeprom_lock, flags); 32 .bus_num = 0,
65 stat = spi_eeprom_io(chipid, inbufs, incounts, NULL, NULL); 33 .chip_select = chipid,
66 spin_unlock_irqrestore(&spi_eeprom_lock, flags); 34 .platform_data = &eeprom,
67 return stat; 35 /* Mode 0: High-Active, Sample-Then-Shift */
68} 36 };
69 37
70static int spi_eeprom_read_status_nolock(int chipid) 38 return spi_register_board_info(&info, 1);
71{
72 unsigned char inbuf[2], outbuf[2];
73 unsigned char *inbufs[1], *outbufs[1];
74 unsigned int incounts[2], outcounts[2];
75 int stat;
76 inbuf[0] = ATMEL_RDSR;
77 inbuf[1] = 0;
78 inbufs[0] = inbuf;
79 incounts[0] = sizeof(inbuf);
80 incounts[1] = 0;
81 outbufs[0] = outbuf;
82 outcounts[0] = sizeof(outbuf);
83 outcounts[1] = 0;
84 stat = spi_eeprom_io(chipid, inbufs, incounts, outbufs, outcounts);
85 if (stat < 0)
86 return stat;
87 return outbuf[1];
88} 39}
89 40
90int spi_eeprom_read_status(int chipid) 41/* simple temporary spi driver to provide early access to seeprom. */
91{
92 unsigned long flags;
93 int stat;
94 spin_lock_irqsave(&spi_eeprom_lock, flags);
95 stat = spi_eeprom_read_status_nolock(chipid);
96 spin_unlock_irqrestore(&spi_eeprom_lock, flags);
97 return stat;
98}
99 42
100int spi_eeprom_read(int chipid, int address, unsigned char *buf, int len) 43static struct read_param {
101{ 44 int chipid;
102 unsigned char inbuf[2]; 45 int address;
103 unsigned char *inbufs[2], *outbufs[2]; 46 unsigned char *buf;
104 unsigned int incounts[2], outcounts[3]; 47 int len;
105 unsigned long flags; 48} *read_param;
106 int stat;
107 inbuf[0] = ATMEL_READ;
108 inbuf[1] = address;
109 inbufs[0] = inbuf;
110 inbufs[1] = NULL;
111 incounts[0] = sizeof(inbuf);
112 incounts[1] = 0;
113 outbufs[0] = NULL;
114 outbufs[1] = buf;
115 outcounts[0] = 2;
116 outcounts[1] = len;
117 outcounts[2] = 0;
118 spin_lock_irqsave(&spi_eeprom_lock, flags);
119 stat = spi_eeprom_io(chipid, inbufs, incounts, outbufs, outcounts);
120 spin_unlock_irqrestore(&spi_eeprom_lock, flags);
121 return stat;
122}
123 49
124int spi_eeprom_write(int chipid, int address, unsigned char *buf, int len) 50static int __init early_seeprom_probe(struct spi_device *spi)
125{ 51{
126 unsigned char inbuf[2]; 52 int stat = 0;
127 unsigned char *inbufs[2]; 53 u8 cmd[2];
128 unsigned int incounts[3]; 54 int len = read_param->len;
129 unsigned long flags; 55 char *buf = read_param->buf;
130 int i, stat; 56 int address = read_param->address;
131 57
132 if (address / 8 != (address + len - 1) / 8) 58 dev_info(&spi->dev, "spiclk %u KHz.\n",
133 return -EINVAL; 59 (spi->max_speed_hz + 500) / 1000);
134 stat = spi_eeprom_write_enable(chipid, 1); 60 if (read_param->chipid != spi->chip_select)
135 if (stat < 0) 61 return -ENODEV;
136 return stat; 62 while (len > 0) {
137 stat = spi_eeprom_read_status(chipid); 63 /* spi_write_then_read can only work with small chunk */
138 if (stat < 0) 64 int c = len < AT250X0_PAGE_SIZE ? len : AT250X0_PAGE_SIZE;
139 return stat; 65 cmd[0] = 0x03; /* AT25_READ */
140 if (!(stat & ATMEL_SR_WEN)) 66 cmd[1] = address;
141 return -EPERM; 67 stat = spi_write_then_read(spi, cmd, sizeof(cmd), buf, c);
142 68 buf += c;
143 inbuf[0] = ATMEL_WRITE; 69 len -= c;
144 inbuf[1] = address; 70 address += c;
145 inbufs[0] = inbuf;
146 inbufs[1] = buf;
147 incounts[0] = sizeof(inbuf);
148 incounts[1] = len;
149 incounts[2] = 0;
150 spin_lock_irqsave(&spi_eeprom_lock, flags);
151 stat = spi_eeprom_io(chipid, inbufs, incounts, NULL, NULL);
152 if (stat < 0)
153 goto unlock_return;
154
155 /* write start. max 10ms */
156 for (i = 10; i > 0; i--) {
157 int stat = spi_eeprom_read_status_nolock(chipid);
158 if (stat < 0)
159 goto unlock_return;
160 if (!(stat & ATMEL_SR_BSY))
161 break;
162 mdelay(1);
163 } 71 }
164 spin_unlock_irqrestore(&spi_eeprom_lock, flags);
165 if (i == 0)
166 return -EIO;
167 return len;
168 unlock_return:
169 spin_unlock_irqrestore(&spi_eeprom_lock, flags);
170 return stat; 72 return stat;
171} 73}
172 74
173#ifdef CONFIG_PROC_FS 75static struct spi_driver early_seeprom_driver __initdata = {
174#define MAX_SIZE 0x80 /* for ATMEL 25010 */ 76 .driver = {
175static int spi_eeprom_read_proc(char *page, char **start, off_t off, 77 .name = "at25",
176 int count, int *eof, void *data) 78 .owner = THIS_MODULE,
177{ 79 },
178 unsigned int size = MAX_SIZE; 80 .probe = early_seeprom_probe,
179 if (spi_eeprom_read((int)data, 0, (unsigned char *)page, size) < 0) 81};
180 size = 0;
181 return size;
182}
183
184static int spi_eeprom_write_proc(struct file *file, const char *buffer,
185 unsigned long count, void *data)
186{
187 unsigned int size = MAX_SIZE;
188 int i;
189 if (file->f_pos >= size)
190 return -EIO;
191 if (file->f_pos + count > size)
192 count = size - file->f_pos;
193 for (i = 0; i < count; i += 8) {
194 int len = count - i < 8 ? count - i : 8;
195 if (spi_eeprom_write((int)data, file->f_pos,
196 (unsigned char *)buffer, len) < 0) {
197 count = -EIO;
198 break;
199 }
200 buffer += len;
201 file->f_pos += len;
202 }
203 return count;
204}
205 82
206__init void spi_eeprom_proc_create(struct proc_dir_entry *dir, int chipid) 83int __init spi_eeprom_read(int chipid, int address,
84 unsigned char *buf, int len)
207{ 85{
208 struct proc_dir_entry *entry; 86 int ret;
209 char name[128]; 87 struct read_param param = {
210 sprintf(name, "seeprom-%d", chipid); 88 .chipid = chipid,
211 entry = create_proc_entry(name, 0600, dir); 89 .address = address,
212 if (entry) { 90 .buf = buf,
213 entry->read_proc = spi_eeprom_read_proc; 91 .len = len
214 entry->write_proc = spi_eeprom_write_proc; 92 };
215 entry->data = (void *)chipid; 93
216 } 94 read_param = &param;
95 ret = spi_register_driver(&early_seeprom_driver);
96 if (!ret)
97 spi_unregister_driver(&early_seeprom_driver);
98 return ret;
217} 99}
218#endif /* CONFIG_PROC_FS */
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c b/arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c
deleted file mode 100644
index 08b20cdfd7..0000000000
--- a/arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c
+++ /dev/null
@@ -1,164 +0,0 @@
1/*
2 * linux/arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c
3 * Copyright (C) 2000-2001 Toshiba Corporation
4 *
5 * 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the
6 * terms of the GNU General Public License version 2. This program is
7 * licensed "as is" without any warranty of any kind, whether express
8 * or implied.
9 *
10 * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com)
11 */
12#include <linux/init.h>
13#include <linux/delay.h>
14#include <linux/errno.h>
15#include <linux/interrupt.h>
16#include <linux/module.h>
17#include <linux/sched.h>
18#include <linux/spinlock.h>
19#include <linux/wait.h>
20#include <asm/tx4938/spi.h>
21#include <asm/tx4938/tx4938.h>
22
23static int (*txx9_spi_cs_func)(int chipid, int on);
24static DEFINE_SPINLOCK(txx9_spi_lock);
25
26extern unsigned int txx9_gbus_clock;
27
28#define SPI_FIFO_SIZE 4
29
30void __init txx9_spi_init(unsigned long base, int (*cs_func)(int chipid, int on))
31{
32 txx9_spi_cs_func = cs_func;
33 /* enter config mode */
34 tx4938_spiptr->mcr = TXx9_SPMCR_CONFIG | TXx9_SPMCR_BCLR;
35}
36
37static DECLARE_WAIT_QUEUE_HEAD(txx9_spi_wait);
38
39static irqreturn_t txx9_spi_interrupt(int irq, void *dev_id)
40{
41 /* disable rx intr */
42 tx4938_spiptr->cr0 &= ~TXx9_SPCR0_RBSIE;
43 wake_up(&txx9_spi_wait);
44
45 return IRQ_HANDLED;
46}
47
48static struct irqaction txx9_spi_action = {
49 .handler = txx9_spi_interrupt,
50 .name = "spi",
51};
52
53void __init txx9_spi_irqinit(int irc_irq)
54{
55 setup_irq(irc_irq, &txx9_spi_action);
56}
57
58int txx9_spi_io(int chipid, struct spi_dev_desc *desc,
59 unsigned char **inbufs, unsigned int *incounts,
60 unsigned char **outbufs, unsigned int *outcounts,
61 int cansleep)
62{
63 unsigned int incount, outcount;
64 unsigned char *inp, *outp;
65 int ret;
66 unsigned long flags;
67
68 spin_lock_irqsave(&txx9_spi_lock, flags);
69 if ((tx4938_spiptr->mcr & TXx9_SPMCR_OPMODE) == TXx9_SPMCR_ACTIVE) {
70 spin_unlock_irqrestore(&txx9_spi_lock, flags);
71 return -EBUSY;
72 }
73 /* enter config mode */
74 tx4938_spiptr->mcr = TXx9_SPMCR_CONFIG | TXx9_SPMCR_BCLR;
75 tx4938_spiptr->cr0 =
76 (desc->byteorder ? TXx9_SPCR0_SBOS : 0) |
77 (desc->polarity ? TXx9_SPCR0_SPOL : 0) |
78 (desc->phase ? TXx9_SPCR0_SPHA : 0) |
79 0x08;
80 tx4938_spiptr->cr1 =
81 (((TXX9_IMCLK + desc->baud) / (2 * desc->baud) - 1) << 8) |
82 0x08 /* 8 bit only */;
83 /* enter active mode */
84 tx4938_spiptr->mcr = TXx9_SPMCR_ACTIVE;
85 spin_unlock_irqrestore(&txx9_spi_lock, flags);
86
87 /* CS ON */
88 if ((ret = txx9_spi_cs_func(chipid, 1)) < 0) {
89 spin_unlock_irqrestore(&txx9_spi_lock, flags);
90 return ret;
91 }
92 udelay(desc->tcss);
93
94 /* do scatter IO */
95 inp = inbufs ? *inbufs : NULL;
96 outp = outbufs ? *outbufs : NULL;
97 incount = 0;
98 outcount = 0;
99 while (1) {
100 unsigned char data;
101 unsigned int count;
102 int i;
103 if (!incount) {
104 incount = incounts ? *incounts++ : 0;
105 inp = (incount && inbufs) ? *inbufs++ : NULL;
106 }
107 if (!outcount) {
108 outcount = outcounts ? *outcounts++ : 0;
109 outp = (outcount && outbufs) ? *outbufs++ : NULL;
110 }
111 if (!inp && !outp)
112 break;
113 count = SPI_FIFO_SIZE;
114 if (incount)
115 count = min(count, incount);
116 if (outcount)
117 count = min(count, outcount);
118
119 /* now tx must be idle... */
120 while (!(tx4938_spiptr->sr & TXx9_SPSR_SIDLE))
121 ;
122
123 tx4938_spiptr->cr0 =
124 (tx4938_spiptr->cr0 & ~TXx9_SPCR0_RXIFL_MASK) |
125 ((count - 1) << 12);
126 if (cansleep) {
127 /* enable rx intr */
128 tx4938_spiptr->cr0 |= TXx9_SPCR0_RBSIE;
129 }
130 /* send */
131 for (i = 0; i < count; i++)
132 tx4938_spiptr->dr = inp ? *inp++ : 0;
133 /* wait all rx data */
134 if (cansleep) {
135 wait_event(txx9_spi_wait,
136 tx4938_spiptr->sr & TXx9_SPSR_SRRDY);
137 } else {
138 while (!(tx4938_spiptr->sr & TXx9_SPSR_RBSI))
139 ;
140 }
141 /* receive */
142 for (i = 0; i < count; i++) {
143 data = tx4938_spiptr->dr;
144 if (outp)
145 *outp++ = data;
146 }
147 if (incount)
148 incount -= count;
149 if (outcount)
150 outcount -= count;
151 }
152
153 /* CS OFF */
154 udelay(desc->tcsh);
155 txx9_spi_cs_func(chipid, 0);
156 udelay(desc->tcsr);
157
158 spin_lock_irqsave(&txx9_spi_lock, flags);
159 /* enter config mode */
160 tx4938_spiptr->mcr = TXx9_SPMCR_CONFIG | TXx9_SPMCR_BCLR;
161 spin_unlock_irqrestore(&txx9_spi_lock, flags);
162
163 return 0;
164}
diff --git a/arch/mips/vr41xx/common/Makefile b/arch/mips/vr41xx/common/Makefile
index f842783acd..d0d84ec8d6 100644
--- a/arch/mips/vr41xx/common/Makefile
+++ b/arch/mips/vr41xx/common/Makefile
@@ -2,4 +2,4 @@
2# Makefile for common code of the NEC VR4100 series. 2# Makefile for common code of the NEC VR4100 series.
3# 3#
4 4
5obj-y += bcu.o cmu.o icu.o init.o irq.o pmu.o type.o 5obj-y += bcu.o cmu.o giu.o icu.o init.o irq.o pmu.o rtc.o siu.o type.o
diff --git a/arch/mips/vr41xx/common/giu.c b/arch/mips/vr41xx/common/giu.c
new file mode 100644
index 0000000000..d21f6f2d22
--- /dev/null
+++ b/arch/mips/vr41xx/common/giu.c
@@ -0,0 +1,122 @@
1/*
2 * NEC VR4100 series GIU platform device.
3 *
4 * Copyright (C) 2007 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/errno.h>
21#include <linux/init.h>
22#include <linux/ioport.h>
23#include <linux/platform_device.h>
24
25#include <asm/cpu.h>
26#include <asm/vr41xx/giu.h>
27#include <asm/vr41xx/irq.h>
28
29static struct resource giu_50pins_pullupdown_resource[] __initdata = {
30 {
31 .start = 0x0b000100,
32 .end = 0x0b00011f,
33 .flags = IORESOURCE_MEM,
34 },
35 {
36 .start = 0x0b0002e0,
37 .end = 0x0b0002e3,
38 .flags = IORESOURCE_MEM,
39 },
40 {
41 .start = GIUINT_IRQ,
42 .end = GIUINT_IRQ,
43 .flags = IORESOURCE_IRQ,
44 },
45};
46
47static struct resource giu_36pins_resource[] __initdata = {
48 {
49 .start = 0x0f000140,
50 .end = 0x0f00015f,
51 .flags = IORESOURCE_MEM,
52 },
53 {
54 .start = GIUINT_IRQ,
55 .end = GIUINT_IRQ,
56 .flags = IORESOURCE_IRQ,
57 },
58};
59
60static struct resource giu_48pins_resource[] __initdata = {
61 {
62 .start = 0x0f000140,
63 .end = 0x0f000167,
64 .flags = IORESOURCE_MEM,
65 },
66 {
67 .start = GIUINT_IRQ,
68 .end = GIUINT_IRQ,
69 .flags = IORESOURCE_IRQ,
70 },
71};
72
73static int __init vr41xx_giu_add(void)
74{
75 struct platform_device *pdev;
76 struct resource *res;
77 unsigned int num;
78 int retval;
79
80 pdev = platform_device_alloc("GIU", -1);
81 if (!pdev)
82 return -ENOMEM;
83
84 switch (current_cpu_data.cputype) {
85 case CPU_VR4111:
86 case CPU_VR4121:
87 pdev->id = GPIO_50PINS_PULLUPDOWN;
88 res = giu_50pins_pullupdown_resource;
89 num = ARRAY_SIZE(giu_50pins_pullupdown_resource);
90 break;
91 case CPU_VR4122:
92 case CPU_VR4131:
93 pdev->id = GPIO_36PINS;
94 res = giu_36pins_resource;
95 num = ARRAY_SIZE(giu_36pins_resource);
96 break;
97 case CPU_VR4133:
98 pdev->id = GPIO_48PINS_EDGE_SELECT;
99 res = giu_48pins_resource;
100 num = ARRAY_SIZE(giu_48pins_resource);
101 break;
102 default:
103 retval = -ENODEV;
104 goto err_free_device;
105 }
106
107 retval = platform_device_add_resources(pdev, res, num);
108 if (retval)
109 goto err_free_device;
110
111 retval = platform_device_add(pdev);
112 if (retval)
113 goto err_free_device;
114
115 return 0;
116
117err_free_device:
118 platform_device_put(pdev);
119
120 return retval;
121}
122device_initcall(vr41xx_giu_add);
diff --git a/arch/mips/vr41xx/common/rtc.c b/arch/mips/vr41xx/common/rtc.c
new file mode 100644
index 0000000000..cce605b3d6
--- /dev/null
+++ b/arch/mips/vr41xx/common/rtc.c
@@ -0,0 +1,117 @@
1/*
2 * NEC VR4100 series RTC platform device.
3 *
4 * Copyright (C) 2007 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/errno.h>
21#include <linux/init.h>
22#include <linux/ioport.h>
23#include <linux/platform_device.h>
24
25#include <asm/cpu.h>
26#include <asm/vr41xx/irq.h>
27
28static struct resource rtc_type1_resource[] __initdata = {
29 {
30 .start = 0x0b0000c0,
31 .end = 0x0b0000df,
32 .flags = IORESOURCE_MEM,
33 },
34 {
35 .start = 0x0b0001c0,
36 .end = 0x0b0001df,
37 .flags = IORESOURCE_MEM,
38 },
39 {
40 .start = ELAPSEDTIME_IRQ,
41 .end = ELAPSEDTIME_IRQ,
42 .flags = IORESOURCE_IRQ,
43 },
44 {
45 .start = RTCLONG1_IRQ,
46 .end = RTCLONG1_IRQ,
47 .flags = IORESOURCE_IRQ,
48 },
49};
50
51static struct resource rtc_type2_resource[] __initdata = {
52 {
53 .start = 0x0f000100,
54 .end = 0x0f00011f,
55 .flags = IORESOURCE_MEM,
56 },
57 {
58 .start = 0x0f000120,
59 .end = 0x0f00013f,
60 .flags = IORESOURCE_MEM,
61 },
62 {
63 .start = ELAPSEDTIME_IRQ,
64 .end = ELAPSEDTIME_IRQ,
65 .flags = IORESOURCE_IRQ,
66 },
67 {
68 .start = RTCLONG1_IRQ,
69 .end = RTCLONG1_IRQ,
70 .flags = IORESOURCE_IRQ,
71 },
72};
73
74static int __init vr41xx_rtc_add(void)
75{
76 struct platform_device *pdev;
77 struct resource *res;
78 unsigned int num;
79 int retval;
80
81 pdev = platform_device_alloc("RTC", -1);
82 if (!pdev)
83 return -ENOMEM;
84
85 switch (current_cpu_data.cputype) {
86 case CPU_VR4111:
87 case CPU_VR4121:
88 res = rtc_type1_resource;
89 num = ARRAY_SIZE(rtc_type1_resource);
90 break;
91 case CPU_VR4122:
92 case CPU_VR4131:
93 case CPU_VR4133:
94 res = rtc_type2_resource;
95 num = ARRAY_SIZE(rtc_type2_resource);
96 break;
97 default:
98 retval = -ENODEV;
99 goto err_free_device;
100 }
101
102 retval = platform_device_add_resources(pdev, res, num);
103 if (retval)
104 goto err_free_device;
105
106 retval = platform_device_add(pdev);
107 if (retval)
108 goto err_free_device;
109
110 return 0;
111
112err_free_device:
113 platform_device_put(pdev);
114
115 return retval;
116}
117device_initcall(vr41xx_rtc_add);
diff --git a/arch/mips/vr41xx/common/siu.c b/arch/mips/vr41xx/common/siu.c
new file mode 100644
index 0000000000..a1e7741421
--- /dev/null
+++ b/arch/mips/vr41xx/common/siu.c
@@ -0,0 +1,120 @@
1/*
2 * NEC VR4100 series SIU platform device.
3 *
4 * Copyright (C) 2007 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/errno.h>
21#include <linux/init.h>
22#include <linux/ioport.h>
23#include <linux/platform_device.h>
24#include <linux/serial_core.h>
25
26#include <asm/cpu.h>
27#include <asm/vr41xx/siu.h>
28
29static unsigned int siu_type1_ports[SIU_PORTS_MAX] __initdata = {
30 PORT_VR41XX_SIU,
31 PORT_UNKNOWN,
32};
33
34static struct resource siu_type1_resource[] __initdata = {
35 {
36 .start = 0x0c000000,
37 .end = 0x0c00000a,
38 .flags = IORESOURCE_MEM,
39 },
40 {
41 .start = SIU_IRQ,
42 .end = SIU_IRQ,
43 .flags = IORESOURCE_IRQ,
44 },
45};
46
47static unsigned int siu_type2_ports[SIU_PORTS_MAX] __initdata = {
48 PORT_VR41XX_SIU,
49 PORT_VR41XX_DSIU,
50};
51
52static struct resource siu_type2_resource[] __initdata = {
53 {
54 .start = 0x0f000800,
55 .end = 0x0f00080a,
56 .flags = IORESOURCE_MEM,
57 },
58 {
59 .start = 0x0f000820,
60 .end = 0x0f000829,
61 .flags = IORESOURCE_MEM,
62 },
63 {
64 .start = SIU_IRQ,
65 .end = SIU_IRQ,
66 .flags = IORESOURCE_IRQ,
67 },
68 {
69 .start = DSIU_IRQ,
70 .end = DSIU_IRQ,
71 .flags = IORESOURCE_IRQ,
72 },
73};
74
75static int __init vr41xx_siu_add(void)
76{
77 struct platform_device *pdev;
78 struct resource *res;
79 unsigned int num;
80 int retval;
81
82 pdev = platform_device_alloc("SIU", -1);
83 if (!pdev)
84 return -ENOMEM;
85
86 switch (current_cpu_data.cputype) {
87 case CPU_VR4111:
88 case CPU_VR4121:
89 pdev->dev.platform_data = siu_type1_ports;
90 res = siu_type1_resource;
91 num = ARRAY_SIZE(siu_type1_resource);
92 break;
93 case CPU_VR4122:
94 case CPU_VR4131:
95 case CPU_VR4133:
96 pdev->dev.platform_data = siu_type2_ports;
97 res = siu_type2_resource;
98 num = ARRAY_SIZE(siu_type2_resource);
99 break;
100 default:
101 retval = -ENODEV;
102 goto err_free_device;
103 }
104
105 retval = platform_device_add_resources(pdev, res, num);
106 if (retval)
107 goto err_free_device;
108
109 retval = platform_device_add(pdev);
110 if (retval)
111 goto err_free_device;
112
113 return 0;
114
115err_free_device:
116 platform_device_put(pdev);
117
118 return retval;
119}
120device_initcall(vr41xx_siu_add);
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c
index 8a0db376e9..26ec774c50 100644
--- a/arch/parisc/kernel/ptrace.c
+++ b/arch/parisc/kernel/ptrace.c
@@ -87,10 +87,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
87 switch (request) { 87 switch (request) {
88 case PTRACE_PEEKTEXT: /* read word at location addr. */ 88 case PTRACE_PEEKTEXT: /* read word at location addr. */
89 case PTRACE_PEEKDATA: { 89 case PTRACE_PEEKDATA: {
90 int copied;
91
92#ifdef CONFIG_64BIT 90#ifdef CONFIG_64BIT
93 if (__is_compat_task(child)) { 91 if (__is_compat_task(child)) {
92 int copied;
94 unsigned int tmp; 93 unsigned int tmp;
95 94
96 addr &= 0xffffffffL; 95 addr &= 0xffffffffL;
@@ -105,15 +104,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
105 } 104 }
106 else 105 else
107#endif 106#endif
108 { 107 ret = generic_ptrace_peekdata(child, addr, data);
109 unsigned long tmp;
110
111 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
112 ret = -EIO;
113 if (copied != sizeof(tmp))
114 goto out_tsk;
115 ret = put_user(tmp,(unsigned long *) data);
116 }
117 goto out_tsk; 108 goto out_tsk;
118 } 109 }
119 110
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index c3ec9f1ec0..bbf029a184 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -264,6 +264,7 @@ KERN_CRIT " || ||\n");
264 264
265 show_regs(regs); 265 show_regs(regs);
266 dump_stack(); 266 dump_stack();
267 add_taint(TAINT_DIE);
267 268
268 if (in_interrupt()) 269 if (in_interrupt())
269 panic("Fatal exception in interrupt"); 270 panic("Fatal exception in interrupt");
@@ -302,7 +303,7 @@ static void handle_break(struct pt_regs *regs)
302 if (unlikely(iir == PARISC_BUG_BREAK_INSN && !user_mode(regs))) { 303 if (unlikely(iir == PARISC_BUG_BREAK_INSN && !user_mode(regs))) {
303 /* check if a BUG() or WARN() trapped here. */ 304 /* check if a BUG() or WARN() trapped here. */
304 enum bug_trap_type tt; 305 enum bug_trap_type tt;
305 tt = report_bug(regs->iaoq[0] & ~3); 306 tt = report_bug(regs->iaoq[0] & ~3, regs);
306 if (tt == BUG_TRAP_TYPE_WARN) { 307 if (tt == BUG_TRAP_TYPE_WARN) {
307 regs->iaoq[0] += 4; 308 regs->iaoq[0] += 4;
308 regs->iaoq[1] += 4; 309 regs->iaoq[1] += 4;
diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c
index 322167737d..cf780cb3b9 100644
--- a/arch/parisc/kernel/unwind.c
+++ b/arch/parisc/kernel/unwind.c
@@ -242,7 +242,7 @@ static void unwind_frame_regs(struct unwind_frame_info *info)
242#ifdef CONFIG_KALLSYMS 242#ifdef CONFIG_KALLSYMS
243 /* Handle some frequent special cases.... */ 243 /* Handle some frequent special cases.... */
244 { 244 {
245 char symname[KSYM_NAME_LEN+1]; 245 char symname[KSYM_NAME_LEN];
246 char *modname; 246 char *modname;
247 247
248 kallsyms_lookup(info->ip, NULL, NULL, &modname, 248 kallsyms_lookup(info->ip, NULL, NULL, &modname,
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 5eaeafd30b..d860b640a1 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -4,17 +4,7 @@
4 4
5mainmenu "Linux/PowerPC Kernel Configuration" 5mainmenu "Linux/PowerPC Kernel Configuration"
6 6
7config PPC64 7source "arch/powerpc/platforms/Kconfig.cputype"
8 bool "64-bit kernel"
9 default n
10 help
11 This option selects whether a 32-bit or a 64-bit kernel
12 will be built.
13
14config PPC_PM_NEEDS_RTC_LIB
15 bool
16 select RTC_LIB
17 default y if PM
18 8
19config PPC32 9config PPC32
20 bool 10 bool
@@ -66,6 +56,9 @@ config GENERIC_FIND_NEXT_BIT
66 bool 56 bool
67 default y 57 default y
68 58
59config ARCH_NO_VIRT_TO_BUS
60 def_bool PPC64
61
69config PPC 62config PPC
70 bool 63 bool
71 default y 64 default y
@@ -132,123 +125,6 @@ config PPC64_SWSUSP
132 depends on PPC64 && (BROKEN || (PPC_PMAC64 && EXPERIMENTAL)) 125 depends on PPC64 && (BROKEN || (PPC_PMAC64 && EXPERIMENTAL))
133 default y 126 default y
134 127
135menu "Processor support"
136choice
137 prompt "Processor Type"
138 depends on PPC32
139 default 6xx
140
141config CLASSIC32
142 bool "52xx/6xx/7xx/74xx"
143 select PPC_FPU
144 select 6xx
145 help
146 There are four families of PowerPC chips supported. The more common
147 types (601, 603, 604, 740, 750, 7400), the Motorola embedded
148 versions (821, 823, 850, 855, 860, 52xx, 82xx, 83xx), the AMCC
149 embedded versions (403 and 405) and the high end 64 bit Power
150 processors (POWER 3, POWER4, and IBM PPC970 also known as G5).
151
152 This option is the catch-all for 6xx types, including some of the
153 embedded versions. Unless there is see an option for the specific
154 chip family you are using, you want this option.
155
156 You do not want this if you are building a kernel for a 64 bit
157 IBM RS/6000 or an Apple G5, choose 6xx.
158
159 If unsure, select this option
160
161 Note that the kernel runs in 32-bit mode even on 64-bit chips.
162
163config PPC_82xx
164 bool "Freescale 82xx"
165 select 6xx
166 select PPC_FPU
167
168config PPC_83xx
169 bool "Freescale 83xx"
170 select 6xx
171 select FSL_SOC
172 select 83xx
173 select PPC_FPU
174 select WANT_DEVICE_TREE
175
176config PPC_85xx
177 bool "Freescale 85xx"
178 select E500
179 select FSL_SOC
180 select 85xx
181 select WANT_DEVICE_TREE
182
183config PPC_86xx
184 bool "Freescale 86xx"
185 select 6xx
186 select FSL_SOC
187 select FSL_PCIE
188 select PPC_FPU
189 select ALTIVEC
190 help
191 The Freescale E600 SoCs have 74xx cores.
192
193config PPC_8xx
194 bool "Freescale 8xx"
195 select FSL_SOC
196 select 8xx
197
198config 40x
199 bool "AMCC 40x"
200 select PPC_DCR_NATIVE
201
202config 44x
203 bool "AMCC 44x"
204 select PPC_DCR_NATIVE
205 select WANT_DEVICE_TREE
206
207config E200
208 bool "Freescale e200"
209
210endchoice
211
212config POWER4_ONLY
213 bool "Optimize for POWER4"
214 depends on PPC64
215 default n
216 ---help---
217 Cause the compiler to optimize for POWER4/POWER5/PPC970 processors.
218 The resulting binary will not work on POWER3 or RS64 processors
219 when compiled with binutils 2.15 or later.
220
221config POWER3
222 bool
223 depends on PPC64
224 default y if !POWER4_ONLY
225
226config POWER4
227 depends on PPC64
228 def_bool y
229
230config 6xx
231 bool
232
233# this is temp to handle compat with arch=ppc
234config 8xx
235 bool
236
237# this is temp to handle compat with arch=ppc
238config 83xx
239 bool
240
241# this is temp to handle compat with arch=ppc
242config 85xx
243 bool
244
245config E500
246 bool
247
248config PPC_FPU
249 bool
250 default y if PPC64
251
252config PPC_DCR_NATIVE 128config PPC_DCR_NATIVE
253 bool 129 bool
254 default n 130 default n
@@ -267,134 +143,6 @@ config PPC_OF_PLATFORM_PCI
267 depends on PPC64 # not supported on 32 bits yet 143 depends on PPC64 # not supported on 32 bits yet
268 default n 144 default n
269 145
270config 4xx
271 bool
272 depends on 40x || 44x
273 default y
274
275config BOOKE
276 bool
277 depends on E200 || E500 || 44x
278 default y
279
280config FSL_BOOKE
281 bool
282 depends on E200 || E500
283 default y
284
285config PTE_64BIT
286 bool
287 depends on 44x || E500
288 default y if 44x
289 default y if E500 && PHYS_64BIT
290
291config PHYS_64BIT
292 bool 'Large physical address support' if E500
293 depends on 44x || E500
294 select RESOURCES_64BIT
295 default y if 44x
296 ---help---
297 This option enables kernel support for larger than 32-bit physical
298 addresses. This features is not be available on all e500 cores.
299
300 If in doubt, say N here.
301
302config ALTIVEC
303 bool "AltiVec Support"
304 depends on CLASSIC32 || POWER4
305 ---help---
306 This option enables kernel support for the Altivec extensions to the
307 PowerPC processor. The kernel currently supports saving and restoring
308 altivec registers, and turning on the 'altivec enable' bit so user
309 processes can execute altivec instructions.
310
311 This option is only usefully if you have a processor that supports
312 altivec (G4, otherwise known as 74xx series), but does not have
313 any affect on a non-altivec cpu (it does, however add code to the
314 kernel).
315
316 If in doubt, say Y here.
317
318config SPE
319 bool "SPE Support"
320 depends on E200 || E500
321 default y
322 ---help---
323 This option enables kernel support for the Signal Processing
324 Extensions (SPE) to the PowerPC processor. The kernel currently
325 supports saving and restoring SPE registers, and turning on the
326 'spe enable' bit so user processes can execute SPE instructions.
327
328 This option is only useful if you have a processor that supports
329 SPE (e500, otherwise known as 85xx series), but does not have any
330 effect on a non-spe cpu (it does, however add code to the kernel).
331
332 If in doubt, say Y here.
333
334config PPC_STD_MMU
335 bool
336 depends on 6xx || POWER3 || POWER4 || PPC64
337 default y
338
339config PPC_STD_MMU_32
340 def_bool y
341 depends on PPC_STD_MMU && PPC32
342
343config PPC_MM_SLICES
344 bool
345 default y if HUGETLB_PAGE
346 default n
347
348config VIRT_CPU_ACCOUNTING
349 bool "Deterministic task and CPU time accounting"
350 depends on PPC64
351 default y
352 help
353 Select this option to enable more accurate task and CPU time
354 accounting. This is done by reading a CPU counter on each
355 kernel entry and exit and on transitions within the kernel
356 between system, softirq and hardirq state, so there is a
357 small performance impact. This also enables accounting of
358 stolen time on logically-partitioned systems running on
359 IBM POWER5-based machines.
360
361 If in doubt, say Y here.
362
363config SMP
364 depends on PPC_STD_MMU
365 bool "Symmetric multi-processing support"
366 ---help---
367 This enables support for systems with more than one CPU. If you have
368 a system with only one CPU, say N. If you have a system with more
369 than one CPU, say Y. Note that the kernel does not currently
370 support SMP machines with 603/603e/603ev or PPC750 ("G3") processors
371 since they have inadequate hardware support for multiprocessor
372 operation.
373
374 If you say N here, the kernel will run on single and multiprocessor
375 machines, but will use only one CPU of a multiprocessor machine. If
376 you say Y here, the kernel will run on single-processor machines.
377 On a single-processor machine, the kernel will run faster if you say
378 N here.
379
380 If you don't know what to do here, say N.
381
382config NR_CPUS
383 int "Maximum number of CPUs (2-128)"
384 range 2 128
385 depends on SMP
386 default "32" if PPC64
387 default "4"
388
389config NOT_COHERENT_CACHE
390 bool
391 depends on 4xx || 8xx || E200
392 default y
393
394config CONFIG_CHECK_CACHE_COHERENCY
395 bool
396endmenu
397
398source "init/Kconfig" 146source "init/Kconfig"
399 147
400source "arch/powerpc/platforms/Kconfig" 148source "arch/powerpc/platforms/Kconfig"
@@ -674,10 +422,6 @@ config SBUS
674config FSL_SOC 422config FSL_SOC
675 bool 423 bool
676 424
677config FSL_PCIE
678 bool
679 depends on PPC_86xx
680
681# Yes MCA RS/6000s exist but Linux-PPC does not currently support any 425# Yes MCA RS/6000s exist but Linux-PPC does not currently support any
682config MCA 426config MCA
683 bool 427 bool
@@ -685,10 +429,10 @@ config MCA
685config PCI 429config PCI
686 bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \ 430 bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \
687 || PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \ 431 || PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \
688 || MPC7448HPC2 || PPC_PS3 || PPC_HOLLY 432 || PPC_PS3
689 default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx \ 433 default y if !40x && !CPM2 && !8xx && !PPC_83xx \
690 && !PPC_85xx && !PPC_86xx 434 && !PPC_85xx && !PPC_86xx
691 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS 435 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx
692 default PCI_QSPAN if !4xx && !CPM2 && 8xx 436 default PCI_QSPAN if !4xx && !CPM2 && 8xx
693 select ARCH_SUPPORTS_MSI 437 select ARCH_SUPPORTS_MSI
694 help 438 help
@@ -698,8 +442,10 @@ config PCI
698 infrastructure code to support PCI bus devices. 442 infrastructure code to support PCI bus devices.
699 443
700config PCI_DOMAINS 444config PCI_DOMAINS
701 bool 445 def_bool PCI
702 default PCI 446
447config PCI_SYSCALL
448 def_bool PCI
703 449
704config PCI_QSPAN 450config PCI_QSPAN
705 bool "QSpan PCI" 451 bool "QSpan PCI"
@@ -894,8 +640,8 @@ menu "Instrumentation Support"
894source "arch/powerpc/oprofile/Kconfig" 640source "arch/powerpc/oprofile/Kconfig"
895 641
896config KPROBES 642config KPROBES
897 bool "Kprobes (EXPERIMENTAL)" 643 bool "Kprobes"
898 depends on !BOOKE && !4xx && KALLSYMS && EXPERIMENTAL && MODULES 644 depends on !BOOKE && !4xx && KALLSYMS && MODULES
899 help 645 help
900 Kprobes allows you to trap at almost any kernel address and 646 Kprobes allows you to trap at almost any kernel address and
901 execute a callback function. register_kprobe() establishes 647 execute a callback function. register_kprobe() establishes
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index fbafd965dc..187a39af3e 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -148,7 +148,7 @@ all: $(KBUILD_IMAGE)
148 148
149CPPFLAGS_vmlinux.lds := -Upowerpc 149CPPFLAGS_vmlinux.lds := -Upowerpc
150 150
151BOOT_TARGETS = zImage zImage.initrd zImage.dts zImage.dts_initrd uImage 151BOOT_TARGETS = zImage zImage.initrd uImage
152 152
153PHONY += $(BOOT_TARGETS) 153PHONY += $(BOOT_TARGETS)
154 154
diff --git a/arch/powerpc/boot/44x.c b/arch/powerpc/boot/44x.c
index d51377d902..9f64e840be 100644
--- a/arch/powerpc/boot/44x.c
+++ b/arch/powerpc/boot/44x.c
@@ -38,3 +38,48 @@ void ibm44x_fixup_memsize(void)
38 38
39 dt_fixup_memory(0, memsize); 39 dt_fixup_memory(0, memsize);
40} 40}
41
42#define SPRN_DBCR0 0x134
43#define DBCR0_RST_SYSTEM 0x30000000
44
45void ibm44x_dbcr_reset(void)
46{
47 unsigned long tmp;
48
49 asm volatile (
50 "mfspr %0,%1\n"
51 "oris %0,%0,%2@h\n"
52 "mtspr %1,%0"
53 : "=&r"(tmp) : "i"(SPRN_DBCR0), "i"(DBCR0_RST_SYSTEM)
54 );
55
56}
57
58/* Read 4xx EBC bus bridge registers to get mappings of the peripheral
59 * banks into the OPB address space */
60void ibm4xx_fixup_ebc_ranges(const char *ebc)
61{
62 void *devp;
63 u32 bxcr;
64 u32 ranges[EBC_NUM_BANKS*4];
65 u32 *p = ranges;
66 int i;
67
68 for (i = 0; i < EBC_NUM_BANKS; i++) {
69 mtdcr(DCRN_EBC0_CFGADDR, EBC_BXCR(i));
70 bxcr = mfdcr(DCRN_EBC0_CFGDATA);
71
72 if ((bxcr & EBC_BXCR_BU) != EBC_BXCR_BU_OFF) {
73 *p++ = i;
74 *p++ = 0;
75 *p++ = bxcr & EBC_BXCR_BAS;
76 *p++ = EBC_BXCR_BANK_SIZE(bxcr);
77 }
78 }
79
80 devp = finddevice(ebc);
81 if (! devp)
82 fatal("Couldn't locate EBC node %s\n\r", ebc);
83
84 setprop(devp, "ranges", ranges, (p - ranges) * sizeof(u32));
85}
diff --git a/arch/powerpc/boot/44x.h b/arch/powerpc/boot/44x.h
index 7b129ad043..577982c9a3 100644
--- a/arch/powerpc/boot/44x.h
+++ b/arch/powerpc/boot/44x.h
@@ -11,6 +11,9 @@
11#define _PPC_BOOT_44X_H_ 11#define _PPC_BOOT_44X_H_
12 12
13void ibm44x_fixup_memsize(void); 13void ibm44x_fixup_memsize(void);
14void ibm4xx_fixup_ebc_ranges(const char *ebc);
15
16void ibm44x_dbcr_reset(void);
14void ebony_init(void *mac0, void *mac1); 17void ebony_init(void *mac0, void *mac1);
15 18
16#endif /* _PPC_BOOT_44X_H_ */ 19#endif /* _PPC_BOOT_44X_H_ */
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index ff2701949e..61a6f34ca5 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -43,10 +43,11 @@ $(addprefix $(obj)/,$(zlib) gunzip_util.o main.o): \
43 43
44src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ 44src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \
45 ns16550.c serial.c simple_alloc.c div64.S util.S \ 45 ns16550.c serial.c simple_alloc.c div64.S util.S \
46 gunzip_util.c elf_util.c $(zlib) devtree.c \ 46 gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
47 44x.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c 47 44x.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c
48src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \ 48src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \
49 cuboot-ebony.c treeboot-ebony.c prpmc2800.c 49 cuboot-ebony.c treeboot-ebony.c prpmc2800.c \
50 ps3-head.S ps3-hvcall.S ps3.c
50src-boot := $(src-wlib) $(src-plat) empty.c 51src-boot := $(src-wlib) $(src-plat) empty.c
51 52
52src-boot := $(addprefix $(obj)/, $(src-boot)) 53src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -75,11 +76,11 @@ $(addprefix $(obj)/,$(zliblinuxheader)): $(obj)/%: $(srctree)/include/linux/%
75$(obj)/empty.c: 76$(obj)/empty.c:
76 @touch $@ 77 @touch $@
77 78
78$(obj)/zImage.lds $(obj)/zImage.coff.lds: $(obj)/%: $(srctree)/$(src)/%.S 79$(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds: $(obj)/%: $(srctree)/$(src)/%.S
79 @cp $< $@ 80 @cp $< $@
80 81
81clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \ 82clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \
82 empty.c zImage.coff.lds zImage.lds 83 empty.c zImage zImage.coff.lds zImage.ps3.lds zImage.lds
83 84
84quiet_cmd_bootcc = BOOTCC $@ 85quiet_cmd_bootcc = BOOTCC $@
85 cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $< 86 cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
@@ -102,7 +103,7 @@ hostprogs-y := addnote addRamDisk hack-coff mktree
102 103
103targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) 104targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a)
104extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ 105extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
105 $(obj)/zImage.lds $(obj)/zImage.coff.lds 106 $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds
106 107
107wrapper :=$(srctree)/$(src)/wrapper 108wrapper :=$(srctree)/$(src)/wrapper
108wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \ 109wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
@@ -132,7 +133,7 @@ image-$(CONFIG_PPC_CELLEB) += zImage.pseries
132image-$(CONFIG_PPC_CHRP) += zImage.chrp 133image-$(CONFIG_PPC_CHRP) += zImage.chrp
133image-$(CONFIG_PPC_EFIKA) += zImage.chrp 134image-$(CONFIG_PPC_EFIKA) += zImage.chrp
134image-$(CONFIG_PPC_PMAC) += zImage.pmac 135image-$(CONFIG_PPC_PMAC) += zImage.pmac
135image-$(CONFIG_PPC_HOLLY) += zImage.holly-elf 136image-$(CONFIG_PPC_HOLLY) += zImage.holly
136image-$(CONFIG_PPC_PRPMC2800) += zImage.prpmc2800 137image-$(CONFIG_PPC_PRPMC2800) += zImage.prpmc2800
137image-$(CONFIG_PPC_ISERIES) += zImage.iseries 138image-$(CONFIG_PPC_ISERIES) += zImage.iseries
138image-$(CONFIG_DEFAULT_UIMAGE) += uImage 139image-$(CONFIG_DEFAULT_UIMAGE) += uImage
@@ -157,55 +158,43 @@ targets += $(image-y) $(initrd-y)
157 158
158$(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz 159$(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
159 160
160dts- := $(patsubst zImage%, zImage.dts%, $(image-n) $(image-)) 161# If CONFIG_WANT_DEVICE_TREE is set and CONFIG_DEVICE_TREE isn't an
161dts-y := $(patsubst zImage%, zImage.dts%, $(image-y)) 162# empty string, define 'dts' to be path to the dts
162dts-y := $(filter-out $(image-y), $(dts-y)) 163# CONFIG_DEVICE_TREE will have "" around it, make sure to strip them
163targets += $(image-y) $(dts-y) 164ifeq ($(CONFIG_WANT_DEVICE_TREE),y)
164 165ifneq ($(CONFIG_DEVICE_TREE),"")
165dts_initrd- := $(patsubst zImage%, zImage.dts_initrd%, $(image-n) $(image-)) 166dts = $(if $(shell echo $(CONFIG_DEVICE_TREE) | grep '^/'),\
166dts_initrd-y := $(patsubst zImage%, zImage.dts_initrd%, $(image-y)) 167 ,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE:"%"=%)
167dts_initrd-y := $(filter-out $(image-y), $(dts_initrd-y)) 168endif
168targets += $(image-y) $(dts_initrd-y) 169endif
169
170$(addprefix $(obj)/, $(dts_initrd-y)): $(obj)/ramdisk.image.gz
171 170
172# Don't put the ramdisk on the pattern rule; when its missing make will try 171# Don't put the ramdisk on the pattern rule; when its missing make will try
173# the pattern rule with less dependencies that also matches (even with the 172# the pattern rule with less dependencies that also matches (even with the
174# hard dependency listed). 173# hard dependency listed).
175$(obj)/zImage.dts_initrd.%: vmlinux $(wrapperbits) $(dts) $(obj)/ramdisk.image.gz 174$(obj)/zImage.initrd.%: vmlinux $(wrapperbits) $(dts)
176 $(call if_changed,wrap,$*,$(dts),,$(obj)/ramdisk.image.gz) 175 $(call if_changed,wrap,$*,$(dts),,$(obj)/ramdisk.image.gz)
177 176
178$(obj)/zImage.dts.%: vmlinux $(wrapperbits) $(dts) 177$(obj)/zImage.%: vmlinux $(wrapperbits) $(dts)
179 $(call if_changed,wrap,$*,$(dts)) 178 $(call if_changed,wrap,$*,$(dts))
180 179
181$(obj)/zImage.initrd.%: vmlinux $(wrapperbits) 180# This cannot be in the root of $(src) as the zImage rule always adds a $(obj)
182 $(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz) 181# prefix
183 182$(obj)/vmlinux.strip: vmlinux
184$(obj)/zImage.%: vmlinux $(wrapperbits)
185 $(call if_changed,wrap,$*)
186
187$(obj)/zImage.iseries: vmlinux
188 $(STRIP) -s -R .comment $< -o $@ 183 $(STRIP) -s -R .comment $< -o $@
189 184
190$(obj)/zImage.ps3: vmlinux 185$(obj)/zImage.iseries: vmlinux
191 $(STRIP) -s -R .comment $< -o $@ 186 $(STRIP) -s -R .comment $< -o $@
192 187
193$(obj)/zImage.initrd.ps3: vmlinux 188$(obj)/zImage.ps3: vmlinux $(wrapper) $(wrapperbits) $(srctree)/$(src)/dts/ps3.dts
194 @echo " WARNING zImage.initrd.ps3 not supported (yet)" 189 $(STRIP) -s -R .comment $< -o vmlinux.strip
195 190 $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,)
196$(obj)/zImage.holly-elf: vmlinux $(wrapperbits)
197 $(call if_changed,wrap,holly,$(obj)/dts/holly.dts,,)
198 191
199$(obj)/zImage.initrd.holly-elf: vmlinux $(wrapperbits) $(obj)/ramdisk.image.gz 192$(obj)/zImage.initrd.ps3: vmlinux $(wrapper) $(wrapperbits) $(srctree)/$(src)/dts/ps3.dts $(obj)/ramdisk.image.gz
200 $(call if_changed,wrap,holly,$(obj)/dts/holly.dts,,$(obj)/ramdisk.image.gz) 193 $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,$(obj)/ramdisk.image.gz)
201 194
202$(obj)/uImage: vmlinux $(wrapperbits) 195$(obj)/uImage: vmlinux $(wrapperbits)
203 $(call if_changed,wrap,uboot) 196 $(call if_changed,wrap,uboot)
204 197
205# CONFIG_DEVICE_TREE will have "" around it, make sure to strip them
206dts = $(if $(shell echo $(CONFIG_DEVICE_TREE) | grep '^/'),\
207 ,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE:"%"=%)
208
209$(obj)/cuImage.%: vmlinux $(dts) $(wrapperbits) 198$(obj)/cuImage.%: vmlinux $(dts) $(wrapperbits)
210 $(call if_changed,wrap,cuboot-$*,$(dts)) 199 $(call if_changed,wrap,cuboot-$*,$(dts))
211 200
@@ -215,22 +204,22 @@ $(obj)/treeImage.initrd.%: vmlinux $(dts) $(wrapperbits)
215$(obj)/treeImage.%: vmlinux $(dts) $(wrapperbits) 204$(obj)/treeImage.%: vmlinux $(dts) $(wrapperbits)
216 $(call if_changed,wrap,treeboot-$*,$(dts)) 205 $(call if_changed,wrap,treeboot-$*,$(dts))
217 206
207# If there isn't a platform selected then just strip the vmlinux.
208ifeq (,$(image-y))
209image-y := vmlinux.strip
210endif
211
218$(obj)/zImage: $(addprefix $(obj)/, $(image-y)) 212$(obj)/zImage: $(addprefix $(obj)/, $(image-y))
219 @rm -f $@; ln $< $@ 213 @rm -f $@; ln $< $@
220$(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y)) 214$(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y))
221 @rm -f $@; ln $< $@ 215 @rm -f $@; ln $< $@
222$(obj)/zImage.dts: $(addprefix $(obj)/, $(dts-y))
223 @rm -f $@; ln $< $@
224$(obj)/zImage.dts_initrd: $(addprefix $(obj)/, $(dts_initrd-y))
225 @rm -f $@; ln $< $@
226
227 216
228install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) 217install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
229 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $< 218 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $<
230 219
231# anything not in $(targets) 220# anything not in $(targets)
232clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* \ 221clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* treeImage.* \
233 treeImage.* zImage.dts zImage.dts_initrd 222 otheros.bld
234 223
235# clean up files cached by wrapper 224# clean up files cached by wrapper
236clean-kernel := vmlinux.strip vmlinux.bin 225clean-kernel := vmlinux.strip vmlinux.bin
diff --git a/arch/powerpc/boot/cuboot-83xx.c b/arch/powerpc/boot/cuboot-83xx.c
index 9af554eea5..296025d8b2 100644
--- a/arch/powerpc/boot/cuboot-83xx.c
+++ b/arch/powerpc/boot/cuboot-83xx.c
@@ -12,12 +12,12 @@
12 12
13#include "ops.h" 13#include "ops.h"
14#include "stdio.h" 14#include "stdio.h"
15#include "cuboot.h"
15 16
16#define TARGET_83xx 17#define TARGET_83xx
17#include "ppcboot.h" 18#include "ppcboot.h"
18 19
19static bd_t bd; 20static bd_t bd;
20extern char _end[];
21extern char _dtb_start[], _dtb_end[]; 21extern char _dtb_start[], _dtb_end[];
22 22
23static void platform_fixups(void) 23static void platform_fixups(void)
@@ -52,16 +52,7 @@ static void platform_fixups(void)
52void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, 52void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
53 unsigned long r6, unsigned long r7) 53 unsigned long r6, unsigned long r7)
54{ 54{
55 unsigned long end_of_ram = bd.bi_memstart + bd.bi_memsize; 55 CUBOOT_INIT();
56 unsigned long avail_ram = end_of_ram - (unsigned long)_end;
57
58 memcpy(&bd, (bd_t *)r3, sizeof(bd));
59 loader_info.initrd_addr = r4;
60 loader_info.initrd_size = r4 ? r5 - r4 : 0;
61 loader_info.cmdline = (char *)r6;
62 loader_info.cmdline_len = r7 - r6;
63
64 simple_alloc_init(_end, avail_ram - 1024*1024, 32, 64);
65 ft_init(_dtb_start, _dtb_end - _dtb_start, 32); 56 ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
66 serial_console_init(); 57 serial_console_init();
67 platform_ops.fixups = platform_fixups; 58 platform_ops.fixups = platform_fixups;
diff --git a/arch/powerpc/boot/cuboot-85xx.c b/arch/powerpc/boot/cuboot-85xx.c
index e2560317f2..10f0f697c9 100644
--- a/arch/powerpc/boot/cuboot-85xx.c
+++ b/arch/powerpc/boot/cuboot-85xx.c
@@ -12,12 +12,12 @@
12 12
13#include "ops.h" 13#include "ops.h"
14#include "stdio.h" 14#include "stdio.h"
15#include "cuboot.h"
15 16
16#define TARGET_85xx 17#define TARGET_85xx
17#include "ppcboot.h" 18#include "ppcboot.h"
18 19
19static bd_t bd; 20static bd_t bd;
20extern char _end[];
21extern char _dtb_start[], _dtb_end[]; 21extern char _dtb_start[], _dtb_end[];
22 22
23static void platform_fixups(void) 23static void platform_fixups(void)
@@ -53,16 +53,7 @@ static void platform_fixups(void)
53void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, 53void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
54 unsigned long r6, unsigned long r7) 54 unsigned long r6, unsigned long r7)
55{ 55{
56 unsigned long end_of_ram = bd.bi_memstart + bd.bi_memsize; 56 CUBOOT_INIT();
57 unsigned long avail_ram = end_of_ram - (unsigned long)_end;
58
59 memcpy(&bd, (bd_t *)r3, sizeof(bd));
60 loader_info.initrd_addr = r4;
61 loader_info.initrd_size = r4 ? r5 - r4 : 0;
62 loader_info.cmdline = (char *)r6;
63 loader_info.cmdline_len = r7 - r6;
64
65 simple_alloc_init(_end, avail_ram - 1024*1024, 32, 64);
66 ft_init(_dtb_start, _dtb_end - _dtb_start, 32); 57 ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
67 serial_console_init(); 58 serial_console_init();
68 platform_ops.fixups = platform_fixups; 59 platform_ops.fixups = platform_fixups;
diff --git a/arch/powerpc/boot/cuboot-ebony.c b/arch/powerpc/boot/cuboot-ebony.c
index 4464c5f67a..c5f37ce172 100644
--- a/arch/powerpc/boot/cuboot-ebony.c
+++ b/arch/powerpc/boot/cuboot-ebony.c
@@ -15,28 +15,16 @@
15#include "ops.h" 15#include "ops.h"
16#include "stdio.h" 16#include "stdio.h"
17#include "44x.h" 17#include "44x.h"
18#include "cuboot.h"
18 19
19#define TARGET_44x 20#define TARGET_44x
20#include "ppcboot.h" 21#include "ppcboot.h"
21 22
22static bd_t bd; 23static bd_t bd;
23extern char _end[];
24
25BSS_STACK(4096);
26 24
27void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, 25void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
28 unsigned long r6, unsigned long r7) 26 unsigned long r6, unsigned long r7)
29{ 27{
30 unsigned long end_of_ram = bd.bi_memstart + bd.bi_memsize; 28 CUBOOT_INIT();
31 unsigned long avail_ram = end_of_ram - (unsigned long)_end;
32
33 memcpy(&bd, (bd_t *)r3, sizeof(bd));
34 loader_info.initrd_addr = r4;
35 loader_info.initrd_size = r4 ? r5 : 0;
36 loader_info.cmdline = (char *)r6;
37 loader_info.cmdline_len = r7 - r6;
38
39 simple_alloc_init(_end, avail_ram, 32, 64);
40
41 ebony_init(&bd.bi_enetaddr, &bd.bi_enet1addr); 29 ebony_init(&bd.bi_enetaddr, &bd.bi_enet1addr);
42} 30}
diff --git a/arch/powerpc/boot/cuboot.c b/arch/powerpc/boot/cuboot.c
new file mode 100644
index 0000000000..65795468ad
--- /dev/null
+++ b/arch/powerpc/boot/cuboot.c
@@ -0,0 +1,35 @@
1/*
2 * Compatibility for old (not device tree aware) U-Boot versions
3 *
4 * Author: Scott Wood <scottwood@freescale.com>
5 * Consolidated using macros by David Gibson <david@gibson.dropbear.id.au>
6 *
7 * Copyright 2007 David Gibson, IBM Corporation.
8 * Copyright (c) 2007 Freescale Semiconductor, Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License version 2 as published
12 * by the Free Software Foundation.
13 */
14
15#include "ops.h"
16#include "stdio.h"
17
18#include "ppcboot.h"
19
20extern char _end[];
21extern char _dtb_start[], _dtb_end[];
22
23void cuboot_init(unsigned long r4, unsigned long r5,
24 unsigned long r6, unsigned long r7,
25 unsigned long end_of_ram)
26{
27 unsigned long avail_ram = end_of_ram - (unsigned long)_end;
28
29 loader_info.initrd_addr = r4;
30 loader_info.initrd_size = r4 ? r5 - r4 : 0;
31 loader_info.cmdline = (char *)r6;
32 loader_info.cmdline_len = r7 - r6;
33
34 simple_alloc_init(_end, avail_ram - 1024*1024, 32, 64);
35}
diff --git a/arch/powerpc/boot/cuboot.h b/arch/powerpc/boot/cuboot.h
new file mode 100644
index 0000000000..cd2aa7f348
--- /dev/null
+++ b/arch/powerpc/boot/cuboot.h
@@ -0,0 +1,14 @@
1#ifndef _PPC_BOOT_CUBOOT_H_
2#define _PPC_BOOT_CUBOOT_H_
3
4void cuboot_init(unsigned long r4, unsigned long r5,
5 unsigned long r6, unsigned long r7,
6 unsigned long end_of_ram);
7
8#define CUBOOT_INIT() \
9 do { \
10 memcpy(&bd, (bd_t *)r3, sizeof(bd)); \
11 cuboot_init(r4, r5, r6, r7, bd.bi_memstart + bd.bi_memsize); \
12 } while (0)
13
14#endif /* _PPC_BOOT_CUBOOT_H_ */
diff --git a/arch/powerpc/boot/dcr.h b/arch/powerpc/boot/dcr.h
index 877bc97b1e..14b44aa96f 100644
--- a/arch/powerpc/boot/dcr.h
+++ b/arch/powerpc/boot/dcr.h
@@ -26,6 +26,43 @@ static const unsigned long sdram_bxcr[] = { SDRAM0_B0CR, SDRAM0_B1CR, SDRAM0_B2C
26#define SDRAM_CONFIG_BANK_SIZE(reg) \ 26#define SDRAM_CONFIG_BANK_SIZE(reg) \
27 (0x00400000 << ((reg & SDRAM_CONFIG_SIZE_MASK) >> 17)) 27 (0x00400000 << ((reg & SDRAM_CONFIG_SIZE_MASK) >> 17))
28 28
29/* 440GP External Bus Controller (EBC) */
30#define DCRN_EBC0_CFGADDR 0x012
31#define DCRN_EBC0_CFGDATA 0x013
32#define EBC_NUM_BANKS 8
33#define EBC_B0CR 0x00
34#define EBC_B1CR 0x01
35#define EBC_B2CR 0x02
36#define EBC_B3CR 0x03
37#define EBC_B4CR 0x04
38#define EBC_B5CR 0x05
39#define EBC_B6CR 0x06
40#define EBC_B7CR 0x07
41#define EBC_BXCR(n) (n)
42#define EBC_BXCR_BAS 0xfff00000
43#define EBC_BXCR_BS 0x000e0000
44#define EBC_BXCR_BANK_SIZE(reg) \
45 (0x100000 << (((reg) & EBC_BXCR_BS) >> 17))
46#define EBC_BXCR_BU 0x00018000
47#define EBC_BXCR_BU_OFF 0x00000000
48#define EBC_BXCR_BU_RO 0x00008000
49#define EBC_BXCR_BU_WO 0x00010000
50#define EBC_BXCR_BU_RW 0x00018000
51#define EBC_BXCR_BW 0x00006000
52#define EBC_B0AP 0x10
53#define EBC_B1AP 0x11
54#define EBC_B2AP 0x12
55#define EBC_B3AP 0x13
56#define EBC_B4AP 0x14
57#define EBC_B5AP 0x15
58#define EBC_B6AP 0x16
59#define EBC_B7AP 0x17
60#define EBC_BXAP(n) (0x10+(n))
61#define EBC_BEAR 0x20
62#define EBC_BESR 0x21
63#define EBC_CFG 0x23
64#define EBC_CID 0x24
65
29/* 440GP Clock, PM, chip control */ 66/* 440GP Clock, PM, chip control */
30#define DCRN_CPC0_SR 0x0b0 67#define DCRN_CPC0_SR 0x0b0
31#define DCRN_CPC0_ER 0x0b1 68#define DCRN_CPC0_ER 0x0b1
diff --git a/arch/powerpc/boot/dts/ebony.dts b/arch/powerpc/boot/dts/ebony.dts
index 0ec02f4726..c5f99613fc 100644
--- a/arch/powerpc/boot/dts/ebony.dts
+++ b/arch/powerpc/boot/dts/ebony.dts
@@ -31,8 +31,8 @@
31 reg = <0>; 31 reg = <0>;
32 clock-frequency = <0>; // Filled in by zImage 32 clock-frequency = <0>; // Filled in by zImage
33 timebase-frequency = <0>; // Filled in by zImage 33 timebase-frequency = <0>; // Filled in by zImage
34 i-cache-line-size = <32>; 34 i-cache-line-size = <20>;
35 d-cache-line-size = <32>; 35 d-cache-line-size = <20>;
36 i-cache-size = <8000>; /* 32 kB */ 36 i-cache-size = <8000>; /* 32 kB */
37 d-cache-size = <8000>; /* 32 kB */ 37 d-cache-size = <8000>; /* 32 kB */
38 dcr-controller; 38 dcr-controller;
@@ -135,11 +135,9 @@
135 #address-cells = <2>; 135 #address-cells = <2>;
136 #size-cells = <1>; 136 #size-cells = <1>;
137 clock-frequency = <0>; // Filled in by zImage 137 clock-frequency = <0>; // Filled in by zImage
138 ranges = <0 00000000 fff00000 100000 138 // ranges property is supplied by zImage
139 1 00000000 48000000 100000 139 // based on firmware's configuration of the
140 2 00000000 ff800000 400000 140 // EBC bridge
141 3 00000000 48200000 100000
142 7 00000000 48300000 100000>;
143 interrupts = <5 4>; 141 interrupts = <5 4>;
144 interrupt-parent = <&UIC1>; 142 interrupt-parent = <&UIC1>;
145 143
diff --git a/arch/powerpc/boot/dts/holly.dts b/arch/powerpc/boot/dts/holly.dts
index 254499b107..80a4fab8ee 100644
--- a/arch/powerpc/boot/dts/holly.dts
+++ b/arch/powerpc/boot/dts/holly.dts
@@ -46,7 +46,7 @@
46 46
47 tsi109@c0000000 { 47 tsi109@c0000000 {
48 device_type = "tsi-bridge"; 48 device_type = "tsi-bridge";
49 compatible = "tsi-bridge"; 49 compatible = "tsi109-bridge", "tsi108-bridge";
50 #address-cells = <1>; 50 #address-cells = <1>;
51 #size-cells = <1>; 51 #size-cells = <1>;
52 ranges = <00000000 c0000000 00010000>; 52 ranges = <00000000 c0000000 00010000>;
@@ -54,52 +54,55 @@
54 54
55 i2c@7000 { 55 i2c@7000 {
56 device_type = "i2c"; 56 device_type = "i2c";
57 compatible = "tsi-i2c"; 57 compatible = "tsi109-i2c", "tsi108-i2c";
58 interrupt-parent = < &/tsi109@c0000000/pic@7400 >; 58 interrupt-parent = <&MPIC>;
59 interrupts = <e 2>; 59 interrupts = <e 2>;
60 reg = <7000 400>; 60 reg = <7000 400>;
61 }; 61 };
62 62
63 mdio@6000 { 63 MDIO: mdio@6000 {
64 device_type = "mdio"; 64 device_type = "mdio";
65 compatible = "tsi-ethernet"; 65 compatible = "tsi109-mdio", "tsi108-mdio";
66 reg = <6000 50>;
67 #address-cells = <1>;
68 #size-cells = <0>;
66 69
67 PHY1: ethernet-phy@6000 { 70 PHY1: ethernet-phy@1 {
68 device_type = "ethernet-phy"; 71 compatible = "bcm5461a";
69 compatible = "bcm54xx"; 72 reg = <1>;
70 reg = <6000 50>; 73 txc-rxc-delay-disable;
71 phy-id = <1>;
72 }; 74 };
73 75
74 PHY2: ethernet-phy@6400 { 76 PHY2: ethernet-phy@2 {
75 device_type = "ethernet-phy"; 77 compatible = "bcm5461a";
76 compatible = "bcm54xx"; 78 reg = <2>;
77 reg = <6000 50>; 79 txc-rxc-delay-disable;
78 phy-id = <2>;
79 }; 80 };
80 }; 81 };
81 82
82 ethernet@6200 { 83 ethernet@6200 {
83 device_type = "network"; 84 device_type = "network";
84 compatible = "tsi-ethernet"; 85 compatible = "tsi109-ethernet", "tsi108-ethernet";
85 #address-cells = <1>; 86 #address-cells = <1>;
86 #size-cells = <0>; 87 #size-cells = <0>;
87 reg = <6000 200>; 88 reg = <6000 200>;
88 local-mac-address = [ 00 00 00 00 00 00 ]; 89 local-mac-address = [ 00 00 00 00 00 00 ];
89 interrupt-parent = < &/tsi109@c0000000/pic@7400 >; 90 interrupt-parent = <&MPIC>;
90 interrupts = <10 2>; 91 interrupts = <10 2>;
92 mdio-handle = <&MDIO>;
91 phy-handle = <&PHY1>; 93 phy-handle = <&PHY1>;
92 }; 94 };
93 95
94 ethernet@6600 { 96 ethernet@6600 {
95 device_type = "network"; 97 device_type = "network";
96 compatible = "tsi-ethernet"; 98 compatible = "tsi109-ethernet", "tsi108-ethernet";
97 #address-cells = <1>; 99 #address-cells = <1>;
98 #size-cells = <0>; 100 #size-cells = <0>;
99 reg = <6400 200>; 101 reg = <6400 200>;
100 local-mac-address = [ 00 00 00 00 00 00 ]; 102 local-mac-address = [ 00 00 00 00 00 00 ];
101 interrupt-parent = < &/tsi109@c0000000/pic@7400 >; 103 interrupt-parent = <&MPIC>;
102 interrupts = <11 2>; 104 interrupts = <11 2>;
105 mdio-handle = <&MDIO>;
103 phy-handle = <&PHY2>; 106 phy-handle = <&PHY2>;
104 }; 107 };
105 108
@@ -110,7 +113,7 @@
110 virtual-reg = <c0007808>; 113 virtual-reg = <c0007808>;
111 clock-frequency = <3F9C6000>; 114 clock-frequency = <3F9C6000>;
112 current-speed = <1c200>; 115 current-speed = <1c200>;
113 interrupt-parent = < &/tsi109@c0000000/pic@7400 >; 116 interrupt-parent = <&MPIC>;
114 interrupts = <c 2>; 117 interrupts = <c 2>;
115 }; 118 };
116 119
@@ -121,7 +124,7 @@
121 virtual-reg = <c0007c08>; 124 virtual-reg = <c0007c08>;
122 clock-frequency = <3F9C6000>; 125 clock-frequency = <3F9C6000>;
123 current-speed = <1c200>; 126 current-speed = <1c200>;
124 interrupt-parent = < &/tsi109@c0000000/pic@7400 >; 127 interrupt-parent = <&MPIC>;
125 interrupts = <d 2>; 128 interrupts = <d 2>;
126 }; 129 };
127 130
@@ -136,7 +139,7 @@
136 139
137 pci@1000 { 140 pci@1000 {
138 device_type = "pci"; 141 device_type = "pci";
139 compatible = "tsi109"; 142 compatible = "tsi109-pci", "tsi108-pci";
140 #interrupt-cells = <1>; 143 #interrupt-cells = <1>;
141 #size-cells = <2>; 144 #size-cells = <2>;
142 #address-cells = <3>; 145 #address-cells = <3>;
@@ -150,7 +153,7 @@
150 ranges = <02000000 0 40000000 40000000 0 10000000 153 ranges = <02000000 0 40000000 40000000 0 10000000
151 01000000 0 00000000 7e000000 0 00010000>; 154 01000000 0 00000000 7e000000 0 00010000>;
152 clock-frequency = <7f28154>; 155 clock-frequency = <7f28154>;
153 interrupt-parent = < &/tsi109@c0000000/pic@7400 >; 156 interrupt-parent = <&MPIC>;
154 interrupts = <17 2>; 157 interrupts = <17 2>;
155 interrupt-map-mask = <f800 0 0 7>; 158 interrupt-map-mask = <f800 0 0 7>;
156 /*----------------------------------------------------+ 159 /*----------------------------------------------------+
@@ -186,13 +189,12 @@
186 #address-cells = <0>; 189 #address-cells = <0>;
187 #interrupt-cells = <2>; 190 #interrupt-cells = <2>;
188 interrupts = <17 2>; 191 interrupts = <17 2>;
189 interrupt-parent = < &/tsi109@c0000000/pic@7400 >; 192 interrupt-parent = <&MPIC>;
190 }; 193 };
191 }; 194 };
192 }; 195 };
193 196
194 chosen { 197 chosen {
195 linux,stdout-path = "/tsi109@c0000000/serial@7808"; 198 linux,stdout-path = "/tsi109@c0000000/serial@7808";
196 bootargs = "console=ttyS0,115200";
197 }; 199 };
198}; 200};
diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts
index 765c306ecf..0e3d314a71 100644
--- a/arch/powerpc/boot/dts/mpc7448hpc2.dts
+++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts
@@ -45,7 +45,7 @@
45 #address-cells = <1>; 45 #address-cells = <1>;
46 #size-cells = <1>; 46 #size-cells = <1>;
47 #interrupt-cells = <2>; 47 #interrupt-cells = <2>;
48 device_type = "tsi-bridge"; 48 device_type = "tsi108-bridge";
49 ranges = <00000000 c0000000 00010000>; 49 ranges = <00000000 c0000000 00010000>;
50 reg = <c0000000 00010000>; 50 reg = <c0000000 00010000>;
51 bus-frequency = <0>; 51 bus-frequency = <0>;
@@ -55,27 +55,26 @@
55 interrupts = <E 0>; 55 interrupts = <E 0>;
56 reg = <7000 400>; 56 reg = <7000 400>;
57 device_type = "i2c"; 57 device_type = "i2c";
58 compatible = "tsi-i2c"; 58 compatible = "tsi108-i2c";
59 }; 59 };
60 60
61 mdio@6000 { 61 MDIO: mdio@6000 {
62 device_type = "mdio"; 62 device_type = "mdio";
63 compatible = "tsi-ethernet"; 63 compatible = "tsi108-mdio";
64 reg = <6000 50>;
65 #address-cells = <1>;
66 #size-cells = <0>;
64 67
65 phy8: ethernet-phy@6000 { 68 phy8: ethernet-phy@8 {
66 interrupt-parent = <&mpic>; 69 interrupt-parent = <&mpic>;
67 interrupts = <2 1>; 70 interrupts = <2 1>;
68 reg = <6000 50>; 71 reg = <8>;
69 phy-id = <8>;
70 device_type = "ethernet-phy";
71 }; 72 };
72 73
73 phy9: ethernet-phy@6400 { 74 phy9: ethernet-phy@9 {
74 interrupt-parent = <&mpic>; 75 interrupt-parent = <&mpic>;
75 interrupts = <2 1>; 76 interrupts = <2 1>;
76 reg = <6000 50>; 77 reg = <9>;
77 phy-id = <9>;
78 device_type = "ethernet-phy";
79 }; 78 };
80 79
81 }; 80 };
@@ -83,12 +82,12 @@
83 ethernet@6200 { 82 ethernet@6200 {
84 #size-cells = <0>; 83 #size-cells = <0>;
85 device_type = "network"; 84 device_type = "network";
86 model = "TSI-ETH"; 85 compatible = "tsi108-ethernet";
87 compatible = "tsi-ethernet";
88 reg = <6000 200>; 86 reg = <6000 200>;
89 address = [ 00 06 D2 00 00 01 ]; 87 address = [ 00 06 D2 00 00 01 ];
90 interrupts = <10 2>; 88 interrupts = <10 2>;
91 interrupt-parent = <&mpic>; 89 interrupt-parent = <&mpic>;
90 mdio-handle = <&MDIO>;
92 phy-handle = <&phy8>; 91 phy-handle = <&phy8>;
93 }; 92 };
94 93
@@ -96,12 +95,12 @@
96 #address-cells = <1>; 95 #address-cells = <1>;
97 #size-cells = <0>; 96 #size-cells = <0>;
98 device_type = "network"; 97 device_type = "network";
99 model = "TSI-ETH"; 98 compatible = "tsi108-ethernet";
100 compatible = "tsi-ethernet";
101 reg = <6400 200>; 99 reg = <6400 200>;
102 address = [ 00 06 D2 00 00 02 ]; 100 address = [ 00 06 D2 00 00 02 ];
103 interrupts = <11 2>; 101 interrupts = <11 2>;
104 interrupt-parent = <&mpic>; 102 interrupt-parent = <&mpic>;
103 mdio-handle = <&MDIO>;
105 phy-handle = <&phy9>; 104 phy-handle = <&phy9>;
106 }; 105 };
107 106
@@ -135,7 +134,7 @@
135 big-endian; 134 big-endian;
136 }; 135 };
137 pci@1000 { 136 pci@1000 {
138 compatible = "tsi10x"; 137 compatible = "tsi108-pci";
139 device_type = "pci"; 138 device_type = "pci";
140 #interrupt-cells = <1>; 139 #interrupt-cells = <1>;
141 #size-cells = <2>; 140 #size-cells = <2>;
diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
index 423eedcf63..1934b80027 100644
--- a/arch/powerpc/boot/dts/mpc8272ads.dts
+++ b/arch/powerpc/boot/dts/mpc8272ads.dts
@@ -14,12 +14,10 @@
14 compatible = "MPC8260ADS"; 14 compatible = "MPC8260ADS";
15 #address-cells = <1>; 15 #address-cells = <1>;
16 #size-cells = <1>; 16 #size-cells = <1>;
17 linux,phandle = <100>;
18 17
19 cpus { 18 cpus {
20 #address-cells = <1>; 19 #address-cells = <1>;
21 #size-cells = <0>; 20 #size-cells = <0>;
22 linux,phandle = <200>;
23 21
24 PowerPC,8272@0 { 22 PowerPC,8272@0 {
25 device_type = "cpu"; 23 device_type = "cpu";
@@ -32,12 +30,10 @@
32 bus-frequency = <0>; 30 bus-frequency = <0>;
33 clock-frequency = <0>; 31 clock-frequency = <0>;
34 32-bit; 32 32-bit;
35 linux,phandle = <201>;
36 }; 33 };
37 }; 34 };
38 35
39 interrupt-controller@f8200000 { 36 pci_pic: interrupt-controller@f8200000 {
40 linux,phandle = <f8200000>;
41 #address-cells = <0>; 37 #address-cells = <0>;
42 #interrupt-cells = <2>; 38 #interrupt-cells = <2>;
43 interrupt-controller; 39 interrupt-controller;
@@ -47,15 +43,13 @@
47 }; 43 };
48 memory { 44 memory {
49 device_type = "memory"; 45 device_type = "memory";
50 linux,phandle = <300>;
51 reg = <00000000 4000000 f4500000 00000020>; 46 reg = <00000000 4000000 f4500000 00000020>;
52 }; 47 };
53 48
54 chosen { 49 chosen {
55 name = "chosen"; 50 name = "chosen";
56 linux,platform = <0>; 51 linux,platform = <0>;
57 interrupt-controller = <10c00>; 52 interrupt-controller = <&Cpm_pic>;
58 linux,phandle = <400>;
59 }; 53 };
60 54
61 soc8272@f0000000 { 55 soc8272@f0000000 {
@@ -70,20 +64,17 @@
70 device_type = "mdio"; 64 device_type = "mdio";
71 compatible = "fs_enet"; 65 compatible = "fs_enet";
72 reg = <0 0>; 66 reg = <0 0>;
73 linux,phandle = <24520>;
74 #address-cells = <1>; 67 #address-cells = <1>;
75 #size-cells = <0>; 68 #size-cells = <0>;
76 ethernet-phy@0 { 69 phy0:ethernet-phy@0 {
77 linux,phandle = <2452000>; 70 interrupt-parent = <&Cpm_pic>;
78 interrupt-parent = <10c00>;
79 interrupts = <17 4>; 71 interrupts = <17 4>;
80 reg = <0>; 72 reg = <0>;
81 bitbang = [ 12 12 13 02 02 01 ]; 73 bitbang = [ 12 12 13 02 02 01 ];
82 device_type = "ethernet-phy"; 74 device_type = "ethernet-phy";
83 }; 75 };
84 ethernet-phy@1 { 76 phy1:ethernet-phy@1 {
85 linux,phandle = <2452001>; 77 interrupt-parent = <&Cpm_pic>;
86 interrupt-parent = <10c00>;
87 interrupts = <17 4>; 78 interrupts = <17 4>;
88 bitbang = [ 12 12 13 02 02 01 ]; 79 bitbang = [ 12 12 13 02 02 01 ];
89 reg = <3>; 80 reg = <3>;
@@ -101,8 +92,8 @@
101 reg = <11300 20 8400 100 11380 30>; 92 reg = <11300 20 8400 100 11380 30>;
102 mac-address = [ 00 11 2F 99 43 54 ]; 93 mac-address = [ 00 11 2F 99 43 54 ];
103 interrupts = <20 2>; 94 interrupts = <20 2>;
104 interrupt-parent = <10c00>; 95 interrupt-parent = <&Cpm_pic>;
105 phy-handle = <2452000>; 96 phy-handle = <&Phy0>;
106 rx-clock = <13>; 97 rx-clock = <13>;
107 tx-clock = <12>; 98 tx-clock = <12>;
108 }; 99 };
@@ -115,14 +106,13 @@
115 reg = <11320 20 8500 100 113b0 30>; 106 reg = <11320 20 8500 100 113b0 30>;
116 mac-address = [ 00 11 2F 99 44 54 ]; 107 mac-address = [ 00 11 2F 99 44 54 ];
117 interrupts = <21 2>; 108 interrupts = <21 2>;
118 interrupt-parent = <10c00>; 109 interrupt-parent = <&Cpm_pic>;
119 phy-handle = <2452001>; 110 phy-handle = <&Phy1>;
120 rx-clock = <17>; 111 rx-clock = <17>;
121 tx-clock = <18>; 112 tx-clock = <18>;
122 }; 113 };
123 114
124 cpm@f0000000 { 115 cpm@f0000000 {
125 linux,phandle = <f0000000>;
126 #address-cells = <1>; 116 #address-cells = <1>;
127 #size-cells = <1>; 117 #size-cells = <1>;
128 #interrupt-cells = <2>; 118 #interrupt-cells = <2>;
@@ -142,7 +132,7 @@
142 reg = <11a00 20 8000 100>; 132 reg = <11a00 20 8000 100>;
143 current-speed = <1c200>; 133 current-speed = <1c200>;
144 interrupts = <28 2>; 134 interrupts = <28 2>;
145 interrupt-parent = <10c00>; 135 interrupt-parent = <&Cpm_pic>;
146 clock-setup = <0 00ffffff>; 136 clock-setup = <0 00ffffff>;
147 rx-clock = <1>; 137 rx-clock = <1>;
148 tx-clock = <1>; 138 tx-clock = <1>;
@@ -156,15 +146,14 @@
156 reg = <11a60 20 8300 100>; 146 reg = <11a60 20 8300 100>;
157 current-speed = <1c200>; 147 current-speed = <1c200>;
158 interrupts = <2b 2>; 148 interrupts = <2b 2>;
159 interrupt-parent = <10c00>; 149 interrupt-parent = <&Cpm_pic>;
160 clock-setup = <1b ffffff00>; 150 clock-setup = <1b ffffff00>;
161 rx-clock = <4>; 151 rx-clock = <4>;
162 tx-clock = <4>; 152 tx-clock = <4>;
163 }; 153 };
164 154
165 }; 155 };
166 interrupt-controller@10c00 { 156 cpm_pic:interrupt-controller@10c00 {
167 linux,phandle = <10c00>;
168 #address-cells = <0>; 157 #address-cells = <0>;
169 #interrupt-cells = <2>; 158 #interrupt-cells = <2>;
170 interrupt-controller; 159 interrupt-controller;
@@ -174,7 +163,6 @@
174 compatible = "CPM2"; 163 compatible = "CPM2";
175 }; 164 };
176 pci@0500 { 165 pci@0500 {
177 linux,phandle = <0500>;
178 #interrupt-cells = <1>; 166 #interrupt-cells = <1>;
179 #size-cells = <2>; 167 #size-cells = <2>;
180 #address-cells = <3>; 168 #address-cells = <3>;
@@ -202,7 +190,7 @@
202 c000 0 0 2 f8200000 43 8 190 c000 0 0 2 f8200000 43 8
203 c000 0 0 3 f8200000 40 8 191 c000 0 0 3 f8200000 40 8
204 c000 0 0 4 f8200000 41 8>; 192 c000 0 0 4 f8200000 41 8>;
205 interrupt-parent = <10c00>; 193 interrupt-parent = <&Cpm_pic>;
206 interrupts = <14 8>; 194 interrupts = <14 8>;
207 bus-range = <0 0>; 195 bus-range = <0 0>;
208 ranges = <02000000 0 80000000 80000000 0 40000000 196 ranges = <02000000 0 80000000 80000000 0 40000000
@@ -216,7 +204,7 @@
216 compatible = "talitos"; 204 compatible = "talitos";
217 reg = <30000 10000>; 205 reg = <30000 10000>;
218 interrupts = <b 2>; 206 interrupts = <b 2>;
219 interrupt-parent = <10c00>; 207 interrupt-parent = <&Cpm_pic>;
220 num-channels = <4>; 208 num-channels = <4>;
221 channel-fifo-len = <18>; 209 channel-fifo-len = <18>;
222 exec-units-mask = <0000007e>; 210 exec-units-mask = <0000007e>;
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
index 112dd5198f..4fc0c4d34a 100644
--- a/arch/powerpc/boot/dts/mpc832x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -272,7 +272,13 @@
272 reg = <2200 200>; 272 reg = <2200 200>;
273 interrupts = <22>; 273 interrupts = <22>;
274 interrupt-parent = < &qeic >; 274 interrupt-parent = < &qeic >;
275 mac-address = [ 00 04 9f 00 23 23 ]; 275 /*
276 * mac-address is deprecated and will be removed
277 * in 2.6.25. Only recent versions of
278 * U-Boot support local-mac-address, however.
279 */
280 mac-address = [ 00 00 00 00 00 00 ];
281 local-mac-address = [ 00 00 00 00 00 00 ];
276 rx-clock = <19>; 282 rx-clock = <19>;
277 tx-clock = <1a>; 283 tx-clock = <1a>;
278 phy-handle = < &phy3 >; 284 phy-handle = < &phy3 >;
@@ -287,7 +293,13 @@
287 reg = <3000 200>; 293 reg = <3000 200>;
288 interrupts = <23>; 294 interrupts = <23>;
289 interrupt-parent = < &qeic >; 295 interrupt-parent = < &qeic >;
290 mac-address = [ 00 11 22 33 44 55 ]; 296 /*
297 * mac-address is deprecated and will be removed
298 * in 2.6.25. Only recent versions of
299 * U-Boot support local-mac-address, however.
300 */
301 mac-address = [ 00 00 00 00 00 00 ];
302 local-mac-address = [ 00 00 00 00 00 00 ];
291 rx-clock = <17>; 303 rx-clock = <17>;
292 tx-clock = <18>; 304 tx-clock = <18>;
293 phy-handle = < &phy4 >; 305 phy-handle = < &phy4 >;
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts
index be4c35784e..447c03ffab 100644
--- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
@@ -231,7 +231,13 @@
231 reg = <3000 200>; 231 reg = <3000 200>;
232 interrupts = <21>; 232 interrupts = <21>;
233 interrupt-parent = <&qeic>; 233 interrupt-parent = <&qeic>;
234 mac-address = [ 00 04 9f ef 03 02 ]; 234 /*
235 * mac-address is deprecated and will be removed
236 * in 2.6.25. Only recent versions of
237 * U-Boot support local-mac-address, however.
238 */
239 mac-address = [ 00 00 00 00 00 00 ];
240 local-mac-address = [ 00 00 00 00 00 00 ];
235 rx-clock = <20>; 241 rx-clock = <20>;
236 tx-clock = <13>; 242 tx-clock = <13>;
237 phy-handle = <&phy00>; 243 phy-handle = <&phy00>;
@@ -246,7 +252,13 @@
246 reg = <2200 200>; 252 reg = <2200 200>;
247 interrupts = <22>; 253 interrupts = <22>;
248 interrupt-parent = <&qeic>; 254 interrupt-parent = <&qeic>;
249 mac-address = [ 00 04 9f ef 03 01 ]; 255 /*
256 * mac-address is deprecated and will be removed
257 * in 2.6.25. Only recent versions of
258 * U-Boot support local-mac-address, however.
259 */
260 mac-address = [ 00 00 00 00 00 00 ];
261 local-mac-address = [ 00 00 00 00 00 00 ];
250 rx-clock = <19>; 262 rx-clock = <19>;
251 tx-clock = <1a>; 263 tx-clock = <1a>;
252 phy-handle = <&phy04>; 264 phy-handle = <&phy04>;
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index db0d003032..ae9bca5754 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -131,6 +131,11 @@
131 model = "TSEC"; 131 model = "TSEC";
132 compatible = "gianfar"; 132 compatible = "gianfar";
133 reg = <24000 1000>; 133 reg = <24000 1000>;
134 /*
135 * address is deprecated and will be removed
136 * in 2.6.25. Only recent versions of
137 * U-Boot support local-mac-address, however.
138 */
134 address = [ 00 00 00 00 00 00 ]; 139 address = [ 00 00 00 00 00 00 ];
135 local-mac-address = [ 00 00 00 00 00 00 ]; 140 local-mac-address = [ 00 00 00 00 00 00 ];
136 interrupts = <20 8 21 8 22 8>; 141 interrupts = <20 8 21 8 22 8>;
@@ -145,6 +150,11 @@
145 model = "TSEC"; 150 model = "TSEC";
146 compatible = "gianfar"; 151 compatible = "gianfar";
147 reg = <25000 1000>; 152 reg = <25000 1000>;
153 /*
154 * address is deprecated and will be removed
155 * in 2.6.25. Only recent versions of
156 * U-Boot support local-mac-address, however.
157 */
148 address = [ 00 00 00 00 00 00 ]; 158 address = [ 00 00 00 00 00 00 ];
149 local-mac-address = [ 00 00 00 00 00 00 ]; 159 local-mac-address = [ 00 00 00 00 00 00 ];
150 interrupts = <23 8 24 8 25 8>; 160 interrupts = <23 8 24 8 25 8>;
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts
index df773fafe9..310e877826 100644
--- a/arch/powerpc/boot/dts/mpc834x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc834x_mds.dts
@@ -136,6 +136,11 @@
136 model = "TSEC"; 136 model = "TSEC";
137 compatible = "gianfar"; 137 compatible = "gianfar";
138 reg = <24000 1000>; 138 reg = <24000 1000>;
139 /*
140 * address is deprecated and will be removed
141 * in 2.6.25. Only recent versions of
142 * U-Boot support local-mac-address, however.
143 */
139 address = [ 00 00 00 00 00 00 ]; 144 address = [ 00 00 00 00 00 00 ];
140 local-mac-address = [ 00 00 00 00 00 00 ]; 145 local-mac-address = [ 00 00 00 00 00 00 ];
141 interrupts = <20 8 21 8 22 8>; 146 interrupts = <20 8 21 8 22 8>;
@@ -150,6 +155,11 @@
150 model = "TSEC"; 155 model = "TSEC";
151 compatible = "gianfar"; 156 compatible = "gianfar";
152 reg = <25000 1000>; 157 reg = <25000 1000>;
158 /*
159 * address is deprecated and will be removed
160 * in 2.6.25. Only recent versions of
161 * U-Boot support local-mac-address, however.
162 */
153 address = [ 00 00 00 00 00 00 ]; 163 address = [ 00 00 00 00 00 00 ];
154 local-mac-address = [ 00 00 00 00 00 00 ]; 164 local-mac-address = [ 00 00 00 00 00 00 ];
155 interrupts = <23 8 24 8 25 8>; 165 interrupts = <23 8 24 8 25 8>;
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts
index 38c8594df3..1e914f31dd 100644
--- a/arch/powerpc/boot/dts/mpc836x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
@@ -301,7 +301,13 @@
301 reg = <2000 200>; 301 reg = <2000 200>;
302 interrupts = <20>; 302 interrupts = <20>;
303 interrupt-parent = < &qeic >; 303 interrupt-parent = < &qeic >;
304 mac-address = [ 00 04 9f 00 23 23 ]; 304 /*
305 * mac-address is deprecated and will be removed
306 * in 2.6.25. Only recent versions of
307 * U-Boot support local-mac-address, however.
308 */
309 mac-address = [ 00 00 00 00 00 00 ];
310 local-mac-address = [ 00 00 00 00 00 00 ];
305 rx-clock = <0>; 311 rx-clock = <0>;
306 tx-clock = <19>; 312 tx-clock = <19>;
307 phy-handle = < &phy0 >; 313 phy-handle = < &phy0 >;
@@ -317,7 +323,13 @@
317 reg = <3000 200>; 323 reg = <3000 200>;
318 interrupts = <21>; 324 interrupts = <21>;
319 interrupt-parent = < &qeic >; 325 interrupt-parent = < &qeic >;
320 mac-address = [ 00 11 22 33 44 55 ]; 326 /*
327 * mac-address is deprecated and will be removed
328 * in 2.6.25. Only recent versions of
329 * U-Boot support local-mac-address, however.
330 */
331 mac-address = [ 00 00 00 00 00 00 ];
332 local-mac-address = [ 00 00 00 00 00 00 ];
321 rx-clock = <0>; 333 rx-clock = <0>;
322 tx-clock = <14>; 334 tx-clock = <14>;
323 phy-handle = < &phy1 >; 335 phy-handle = < &phy1 >;
diff --git a/arch/powerpc/boot/dts/mpc8540ads.dts b/arch/powerpc/boot/dts/mpc8540ads.dts
index d91e81c009..364a969f5c 100644
--- a/arch/powerpc/boot/dts/mpc8540ads.dts
+++ b/arch/powerpc/boot/dts/mpc8540ads.dts
@@ -52,7 +52,7 @@
52 compatible = "fsl,8540-memory-controller"; 52 compatible = "fsl,8540-memory-controller";
53 reg = <2000 1000>; 53 reg = <2000 1000>;
54 interrupt-parent = <&mpic>; 54 interrupt-parent = <&mpic>;
55 interrupts = <2 2>; 55 interrupts = <12 2>;
56 }; 56 };
57 57
58 l2-cache-controller@20000 { 58 l2-cache-controller@20000 {
@@ -61,14 +61,14 @@
61 cache-line-size = <20>; // 32 bytes 61 cache-line-size = <20>; // 32 bytes
62 cache-size = <40000>; // L2, 256K 62 cache-size = <40000>; // L2, 256K
63 interrupt-parent = <&mpic>; 63 interrupt-parent = <&mpic>;
64 interrupts = <0 2>; 64 interrupts = <10 2>;
65 }; 65 };
66 66
67 i2c@3000 { 67 i2c@3000 {
68 device_type = "i2c"; 68 device_type = "i2c";
69 compatible = "fsl-i2c"; 69 compatible = "fsl-i2c";
70 reg = <3000 100>; 70 reg = <3000 100>;
71 interrupts = <1b 2>; 71 interrupts = <2b 2>;
72 interrupt-parent = <&mpic>; 72 interrupt-parent = <&mpic>;
73 dfsrr; 73 dfsrr;
74 }; 74 };
@@ -81,19 +81,19 @@
81 reg = <24520 20>; 81 reg = <24520 20>;
82 phy0: ethernet-phy@0 { 82 phy0: ethernet-phy@0 {
83 interrupt-parent = <&mpic>; 83 interrupt-parent = <&mpic>;
84 interrupts = <35 1>; 84 interrupts = <5 1>;
85 reg = <0>; 85 reg = <0>;
86 device_type = "ethernet-phy"; 86 device_type = "ethernet-phy";
87 }; 87 };
88 phy1: ethernet-phy@1 { 88 phy1: ethernet-phy@1 {
89 interrupt-parent = <&mpic>; 89 interrupt-parent = <&mpic>;
90 interrupts = <35 1>; 90 interrupts = <5 1>;
91 reg = <1>; 91 reg = <1>;
92 device_type = "ethernet-phy"; 92 device_type = "ethernet-phy";
93 }; 93 };
94 phy3: ethernet-phy@3 { 94 phy3: ethernet-phy@3 {
95 interrupt-parent = <&mpic>; 95 interrupt-parent = <&mpic>;
96 interrupts = <37 1>; 96 interrupts = <7 1>;
97 reg = <3>; 97 reg = <3>;
98 device_type = "ethernet-phy"; 98 device_type = "ethernet-phy";
99 }; 99 };
@@ -106,9 +106,14 @@
106 model = "TSEC"; 106 model = "TSEC";
107 compatible = "gianfar"; 107 compatible = "gianfar";
108 reg = <24000 1000>; 108 reg = <24000 1000>;
109 address = [ 00 E0 0C 00 73 00 ]; 109 /*
110 local-mac-address = [ 00 E0 0C 00 73 00 ]; 110 * address is deprecated and will be removed
111 interrupts = <d 2 e 2 12 2>; 111 * in 2.6.25. Only recent versions of
112 * U-Boot support local-mac-address, however.
113 */
114 address = [ 00 00 00 00 00 00 ];
115 local-mac-address = [ 00 00 00 00 00 00 ];
116 interrupts = <1d 2 1e 2 22 2>;
112 interrupt-parent = <&mpic>; 117 interrupt-parent = <&mpic>;
113 phy-handle = <&phy0>; 118 phy-handle = <&phy0>;
114 }; 119 };
@@ -120,9 +125,14 @@
120 model = "TSEC"; 125 model = "TSEC";
121 compatible = "gianfar"; 126 compatible = "gianfar";
122 reg = <25000 1000>; 127 reg = <25000 1000>;
123 address = [ 00 E0 0C 00 73 01 ]; 128 /*
124 local-mac-address = [ 00 E0 0C 00 73 01 ]; 129 * address is deprecated and will be removed
125 interrupts = <13 2 14 2 18 2>; 130 * in 2.6.25. Only recent versions of
131 * U-Boot support local-mac-address, however.
132 */
133 address = [ 00 00 00 00 00 00 ];
134 local-mac-address = [ 00 00 00 00 00 00 ];
135 interrupts = <23 2 24 2 28 2>;
126 interrupt-parent = <&mpic>; 136 interrupt-parent = <&mpic>;
127 phy-handle = <&phy1>; 137 phy-handle = <&phy1>;
128 }; 138 };
@@ -134,9 +144,14 @@
134 model = "FEC"; 144 model = "FEC";
135 compatible = "gianfar"; 145 compatible = "gianfar";
136 reg = <26000 1000>; 146 reg = <26000 1000>;
137 address = [ 00 E0 0C 00 73 02 ]; 147 /*
138 local-mac-address = [ 00 E0 0C 00 73 02 ]; 148 * address is deprecated and will be removed
139 interrupts = <19 2>; 149 * in 2.6.25. Only recent versions of
150 * U-Boot support local-mac-address, however.
151 */
152 address = [ 00 00 00 00 00 00 ];
153 local-mac-address = [ 00 00 00 00 00 00 ];
154 interrupts = <29 2>;
140 interrupt-parent = <&mpic>; 155 interrupt-parent = <&mpic>;
141 phy-handle = <&phy3>; 156 phy-handle = <&phy3>;
142 }; 157 };
@@ -146,7 +161,7 @@
146 compatible = "ns16550"; 161 compatible = "ns16550";
147 reg = <4500 100>; // reg base, size 162 reg = <4500 100>; // reg base, size
148 clock-frequency = <0>; // should we fill in in uboot? 163 clock-frequency = <0>; // should we fill in in uboot?
149 interrupts = <1a 2>; 164 interrupts = <2a 2>;
150 interrupt-parent = <&mpic>; 165 interrupt-parent = <&mpic>;
151 }; 166 };
152 167
@@ -155,7 +170,7 @@
155 compatible = "ns16550"; 170 compatible = "ns16550";
156 reg = <4600 100>; // reg base, size 171 reg = <4600 100>; // reg base, size
157 clock-frequency = <0>; // should we fill in in uboot? 172 clock-frequency = <0>; // should we fill in in uboot?
158 interrupts = <1a 2>; 173 interrupts = <2a 2>;
159 interrupt-parent = <&mpic>; 174 interrupt-parent = <&mpic>;
160 }; 175 };
161 pci@8000 { 176 pci@8000 {
@@ -163,78 +178,78 @@
163 interrupt-map = < 178 interrupt-map = <
164 179
165 /* IDSEL 0x02 */ 180 /* IDSEL 0x02 */
166 1000 0 0 1 &mpic 31 1 181 1000 0 0 1 &mpic 1 1
167 1000 0 0 2 &mpic 32 1 182 1000 0 0 2 &mpic 2 1
168 1000 0 0 3 &mpic 33 1 183 1000 0 0 3 &mpic 3 1
169 1000 0 0 4 &mpic 34 1 184 1000 0 0 4 &mpic 4 1
170 185
171 /* IDSEL 0x03 */ 186 /* IDSEL 0x03 */
172 1800 0 0 1 &mpic 34 1 187 1800 0 0 1 &mpic 4 1
173 1800 0 0 2 &mpic 31 1 188 1800 0 0 2 &mpic 1 1
174 1800 0 0 3 &mpic 32 1 189 1800 0 0 3 &mpic 2 1
175 1800 0 0 4 &mpic 33 1 190 1800 0 0 4 &mpic 3 1
176 191
177 /* IDSEL 0x04 */ 192 /* IDSEL 0x04 */
178 2000 0 0 1 &mpic 33 1 193 2000 0 0 1 &mpic 3 1
179 2000 0 0 2 &mpic 34 1 194 2000 0 0 2 &mpic 4 1
180 2000 0 0 3 &mpic 31 1 195 2000 0 0 3 &mpic 1 1
181 2000 0 0 4 &mpic 32 1 196 2000 0 0 4 &mpic 2 1
182 197
183 /* IDSEL 0x05 */ 198 /* IDSEL 0x05 */
184 2800 0 0 1 &mpic 32 1 199 2800 0 0 1 &mpic 2 1
185 2800 0 0 2 &mpic 33 1 200 2800 0 0 2 &mpic 3 1
186 2800 0 0 3 &mpic 34 1 201 2800 0 0 3 &mpic 4 1
187 2800 0 0 4 &mpic 31 1 202 2800 0 0 4 &mpic 1 1
188 203
189 /* IDSEL 0x0c */ 204 /* IDSEL 0x0c */
190 6000 0 0 1 &mpic 31 1 205 6000 0 0 1 &mpic 1 1
191 6000 0 0 2 &mpic 32 1 206 6000 0 0 2 &mpic 2 1
192 6000 0 0 3 &mpic 33 1 207 6000 0 0 3 &mpic 3 1
193 6000 0 0 4 &mpic 34 1 208 6000 0 0 4 &mpic 4 1
194 209
195 /* IDSEL 0x0d */ 210 /* IDSEL 0x0d */
196 6800 0 0 1 &mpic 34 1 211 6800 0 0 1 &mpic 4 1
197 6800 0 0 2 &mpic 31 1 212 6800 0 0 2 &mpic 1 1
198 6800 0 0 3 &mpic 32 1 213 6800 0 0 3 &mpic 2 1
199 6800 0 0 4 &mpic 33 1 214 6800 0 0 4 &mpic 3 1
200 215
201 /* IDSEL 0x0e */ 216 /* IDSEL 0x0e */
202 7000 0 0 1 &mpic 33 1 217 7000 0 0 1 &mpic 3 1
203 7000 0 0 2 &mpic 34 1 218 7000 0 0 2 &mpic 4 1
204 7000 0 0 3 &mpic 31 1 219 7000 0 0 3 &mpic 1 1
205 7000 0 0 4 &mpic 32 1 220 7000 0 0 4 &mpic 2 1
206 221
207 /* IDSEL 0x0f */ 222 /* IDSEL 0x0f */
208 7800 0 0 1 &mpic 32 1 223 7800 0 0 1 &mpic 2 1
209 7800 0 0 2 &mpic 33 1 224 7800 0 0 2 &mpic 3 1
210 7800 0 0 3 &mpic 34 1 225 7800 0 0 3 &mpic 4 1
211 7800 0 0 4 &mpic 31 1 226 7800 0 0 4 &mpic 1 1
212 227
213 /* IDSEL 0x12 */ 228 /* IDSEL 0x12 */
214 9000 0 0 1 &mpic 31 1 229 9000 0 0 1 &mpic 1 1
215 9000 0 0 2 &mpic 32 1 230 9000 0 0 2 &mpic 2 1
216 9000 0 0 3 &mpic 33 1 231 9000 0 0 3 &mpic 3 1
217 9000 0 0 4 &mpic 34 1 232 9000 0 0 4 &mpic 4 1
218 233
219 /* IDSEL 0x13 */ 234 /* IDSEL 0x13 */
220 9800 0 0 1 &mpic 34 1 235 9800 0 0 1 &mpic 4 1
221 9800 0 0 2 &mpic 31 1 236 9800 0 0 2 &mpic 1 1
222 9800 0 0 3 &mpic 32 1 237 9800 0 0 3 &mpic 2 1
223 9800 0 0 4 &mpic 33 1 238 9800 0 0 4 &mpic 3 1
224 239
225 /* IDSEL 0x14 */ 240 /* IDSEL 0x14 */
226 a000 0 0 1 &mpic 33 1 241 a000 0 0 1 &mpic 3 1
227 a000 0 0 2 &mpic 34 1 242 a000 0 0 2 &mpic 4 1
228 a000 0 0 3 &mpic 31 1 243 a000 0 0 3 &mpic 1 1
229 a000 0 0 4 &mpic 32 1 244 a000 0 0 4 &mpic 2 1
230 245
231 /* IDSEL 0x15 */ 246 /* IDSEL 0x15 */
232 a800 0 0 1 &mpic 32 1 247 a800 0 0 1 &mpic 2 1
233 a800 0 0 2 &mpic 33 1 248 a800 0 0 2 &mpic 3 1
234 a800 0 0 3 &mpic 34 1 249 a800 0 0 3 &mpic 4 1
235 a800 0 0 4 &mpic 31 1>; 250 a800 0 0 4 &mpic 1 1>;
236 interrupt-parent = <&mpic>; 251 interrupt-parent = <&mpic>;
237 interrupts = <08 2>; 252 interrupts = <18 2>;
238 bus-range = <0 0>; 253 bus-range = <0 0>;
239 ranges = <02000000 0 80000000 80000000 0 20000000 254 ranges = <02000000 0 80000000 80000000 0 20000000
240 01000000 0 00000000 e2000000 0 00100000>; 255 01000000 0 00000000 e2000000 0 00100000>;
diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/mpc8541cds.dts
index 4f2c3af2e0..070206fffe 100644
--- a/arch/powerpc/boot/dts/mpc8541cds.dts
+++ b/arch/powerpc/boot/dts/mpc8541cds.dts
@@ -52,7 +52,7 @@
52 compatible = "fsl,8541-memory-controller"; 52 compatible = "fsl,8541-memory-controller";
53 reg = <2000 1000>; 53 reg = <2000 1000>;
54 interrupt-parent = <&mpic>; 54 interrupt-parent = <&mpic>;
55 interrupts = <2 2>; 55 interrupts = <12 2>;
56 }; 56 };
57 57
58 l2-cache-controller@20000 { 58 l2-cache-controller@20000 {
@@ -61,14 +61,14 @@
61 cache-line-size = <20>; // 32 bytes 61 cache-line-size = <20>; // 32 bytes
62 cache-size = <40000>; // L2, 256K 62 cache-size = <40000>; // L2, 256K
63 interrupt-parent = <&mpic>; 63 interrupt-parent = <&mpic>;
64 interrupts = <0 2>; 64 interrupts = <10 2>;
65 }; 65 };
66 66
67 i2c@3000 { 67 i2c@3000 {
68 device_type = "i2c"; 68 device_type = "i2c";
69 compatible = "fsl-i2c"; 69 compatible = "fsl-i2c";
70 reg = <3000 100>; 70 reg = <3000 100>;
71 interrupts = <1b 2>; 71 interrupts = <2b 2>;
72 interrupt-parent = <&mpic>; 72 interrupt-parent = <&mpic>;
73 dfsrr; 73 dfsrr;
74 }; 74 };
@@ -81,13 +81,13 @@
81 reg = <24520 20>; 81 reg = <24520 20>;
82 phy0: ethernet-phy@0 { 82 phy0: ethernet-phy@0 {
83 interrupt-parent = <&mpic>; 83 interrupt-parent = <&mpic>;
84 interrupts = <35 0>; 84 interrupts = <5 1>;
85 reg = <0>; 85 reg = <0>;
86 device_type = "ethernet-phy"; 86 device_type = "ethernet-phy";
87 }; 87 };
88 phy1: ethernet-phy@1 { 88 phy1: ethernet-phy@1 {
89 interrupt-parent = <&mpic>; 89 interrupt-parent = <&mpic>;
90 interrupts = <35 0>; 90 interrupts = <5 1>;
91 reg = <1>; 91 reg = <1>;
92 device_type = "ethernet-phy"; 92 device_type = "ethernet-phy";
93 }; 93 };
@@ -100,8 +100,8 @@
100 model = "TSEC"; 100 model = "TSEC";
101 compatible = "gianfar"; 101 compatible = "gianfar";
102 reg = <24000 1000>; 102 reg = <24000 1000>;
103 local-mac-address = [ 00 E0 0C 00 73 00 ]; 103 local-mac-address = [ 00 00 00 00 00 00 ];
104 interrupts = <d 2 e 2 12 2>; 104 interrupts = <1d 2 1e 2 22 2>;
105 interrupt-parent = <&mpic>; 105 interrupt-parent = <&mpic>;
106 phy-handle = <&phy0>; 106 phy-handle = <&phy0>;
107 }; 107 };
@@ -113,8 +113,8 @@
113 model = "TSEC"; 113 model = "TSEC";
114 compatible = "gianfar"; 114 compatible = "gianfar";
115 reg = <25000 1000>; 115 reg = <25000 1000>;
116 local-mac-address = [ 00 E0 0C 00 73 01 ]; 116 local-mac-address = [ 00 00 00 00 00 00 ];
117 interrupts = <13 2 14 2 18 2>; 117 interrupts = <23 2 24 2 28 2>;
118 interrupt-parent = <&mpic>; 118 interrupt-parent = <&mpic>;
119 phy-handle = <&phy1>; 119 phy-handle = <&phy1>;
120 }; 120 };
@@ -124,7 +124,7 @@
124 compatible = "ns16550"; 124 compatible = "ns16550";
125 reg = <4500 100>; // reg base, size 125 reg = <4500 100>; // reg base, size
126 clock-frequency = <0>; // should we fill in in uboot? 126 clock-frequency = <0>; // should we fill in in uboot?
127 interrupts = <1a 2>; 127 interrupts = <2a 2>;
128 interrupt-parent = <&mpic>; 128 interrupt-parent = <&mpic>;
129 }; 129 };
130 130
@@ -133,7 +133,7 @@
133 compatible = "ns16550"; 133 compatible = "ns16550";
134 reg = <4600 100>; // reg base, size 134 reg = <4600 100>; // reg base, size
135 clock-frequency = <0>; // should we fill in in uboot? 135 clock-frequency = <0>; // should we fill in in uboot?
136 interrupts = <1a 2>; 136 interrupts = <2a 2>;
137 interrupt-parent = <&mpic>; 137 interrupt-parent = <&mpic>;
138 }; 138 };
139 139
@@ -142,49 +142,49 @@
142 interrupt-map = < 142 interrupt-map = <
143 143
144 /* IDSEL 0x10 */ 144 /* IDSEL 0x10 */
145 08000 0 0 1 &mpic 30 1 145 08000 0 0 1 &mpic 0 1
146 08000 0 0 2 &mpic 31 1 146 08000 0 0 2 &mpic 1 1
147 08000 0 0 3 &mpic 32 1 147 08000 0 0 3 &mpic 2 1
148 08000 0 0 4 &mpic 33 1 148 08000 0 0 4 &mpic 3 1
149 149
150 /* IDSEL 0x11 */ 150 /* IDSEL 0x11 */
151 08800 0 0 1 &mpic 30 1 151 08800 0 0 1 &mpic 0 1
152 08800 0 0 2 &mpic 31 1 152 08800 0 0 2 &mpic 1 1
153 08800 0 0 3 &mpic 32 1 153 08800 0 0 3 &mpic 2 1
154 08800 0 0 4 &mpic 33 1 154 08800 0 0 4 &mpic 3 1
155 155
156 /* IDSEL 0x12 (Slot 1) */ 156 /* IDSEL 0x12 (Slot 1) */
157 09000 0 0 1 &mpic 30 1 157 09000 0 0 1 &mpic 0 1
158 09000 0 0 2 &mpic 31 1 158 09000 0 0 2 &mpic 1 1
159 09000 0 0 3 &mpic 32 1 159 09000 0 0 3 &mpic 2 1
160 09000 0 0 4 &mpic 33 1 160 09000 0 0 4 &mpic 3 1
161 161
162 /* IDSEL 0x13 (Slot 2) */ 162 /* IDSEL 0x13 (Slot 2) */
163 09800 0 0 1 &mpic 31 1 163 09800 0 0 1 &mpic 1 1
164 09800 0 0 2 &mpic 32 1 164 09800 0 0 2 &mpic 2 1
165 09800 0 0 3 &mpic 33 1 165 09800 0 0 3 &mpic 3 1
166 09800 0 0 4 &mpic 30 1 166 09800 0 0 4 &mpic 0 1
167 167
168 /* IDSEL 0x14 (Slot 3) */ 168 /* IDSEL 0x14 (Slot 3) */
169 0a000 0 0 1 &mpic 32 1 169 0a000 0 0 1 &mpic 2 1
170 0a000 0 0 2 &mpic 33 1 170 0a000 0 0 2 &mpic 3 1
171 0a000 0 0 3 &mpic 30 1 171 0a000 0 0 3 &mpic 0 1
172 0a000 0 0 4 &mpic 31 1 172 0a000 0 0 4 &mpic 1 1
173 173
174 /* IDSEL 0x15 (Slot 4) */ 174 /* IDSEL 0x15 (Slot 4) */
175 0a800 0 0 1 &mpic 33 1 175 0a800 0 0 1 &mpic 3 1
176 0a800 0 0 2 &mpic 30 1 176 0a800 0 0 2 &mpic 0 1
177 0a800 0 0 3 &mpic 31 1 177 0a800 0 0 3 &mpic 1 1
178 0a800 0 0 4 &mpic 32 1 178 0a800 0 0 4 &mpic 2 1
179 179
180 /* Bus 1 (Tundra Bridge) */ 180 /* Bus 1 (Tundra Bridge) */
181 /* IDSEL 0x12 (ISA bridge) */ 181 /* IDSEL 0x12 (ISA bridge) */
182 19000 0 0 1 &mpic 30 1 182 19000 0 0 1 &mpic 0 1
183 19000 0 0 2 &mpic 31 1 183 19000 0 0 2 &mpic 1 1
184 19000 0 0 3 &mpic 32 1 184 19000 0 0 3 &mpic 2 1
185 19000 0 0 4 &mpic 33 1>; 185 19000 0 0 4 &mpic 3 1>;
186 interrupt-parent = <&mpic>; 186 interrupt-parent = <&mpic>;
187 interrupts = <08 2>; 187 interrupts = <18 2>;
188 bus-range = <0 0>; 188 bus-range = <0 0>;
189 ranges = <02000000 0 80000000 80000000 0 20000000 189 ranges = <02000000 0 80000000 80000000 0 20000000
190 01000000 0 00000000 e2000000 0 00100000>; 190 01000000 0 00000000 e2000000 0 00100000>;
@@ -216,12 +216,12 @@
216 interrupt-map = < 216 interrupt-map = <
217 217
218 /* IDSEL 0x15 */ 218 /* IDSEL 0x15 */
219 a800 0 0 1 &mpic 3b 1 219 a800 0 0 1 &mpic b 1
220 a800 0 0 2 &mpic 3b 1 220 a800 0 0 2 &mpic b 1
221 a800 0 0 3 &mpic 3b 1 221 a800 0 0 3 &mpic b 1
222 a800 0 0 4 &mpic 3b 1>; 222 a800 0 0 4 &mpic b 1>;
223 interrupt-parent = <&mpic>; 223 interrupt-parent = <&mpic>;
224 interrupts = <09 2>; 224 interrupts = <19 2>;
225 bus-range = <0 0>; 225 bus-range = <0 0>;
226 ranges = <02000000 0 a0000000 a0000000 0 20000000 226 ranges = <02000000 0 a0000000 a0000000 0 20000000
227 01000000 0 00000000 e3000000 0 00100000>; 227 01000000 0 00000000 e3000000 0 00100000>;
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts
index 3033599e74..8285925924 100644
--- a/arch/powerpc/boot/dts/mpc8544ds.dts
+++ b/arch/powerpc/boot/dts/mpc8544ds.dts
@@ -52,7 +52,7 @@
52 compatible = "fsl,8544-memory-controller"; 52 compatible = "fsl,8544-memory-controller";
53 reg = <2000 1000>; 53 reg = <2000 1000>;
54 interrupt-parent = <&mpic>; 54 interrupt-parent = <&mpic>;
55 interrupts = <2 2>; 55 interrupts = <12 2>;
56 }; 56 };
57 57
58 l2-cache-controller@20000 { 58 l2-cache-controller@20000 {
@@ -61,14 +61,14 @@
61 cache-line-size = <20>; // 32 bytes 61 cache-line-size = <20>; // 32 bytes
62 cache-size = <40000>; // L2, 256K 62 cache-size = <40000>; // L2, 256K
63 interrupt-parent = <&mpic>; 63 interrupt-parent = <&mpic>;
64 interrupts = <0 2>; 64 interrupts = <10 2>;
65 }; 65 };
66 66
67 i2c@3000 { 67 i2c@3000 {
68 device_type = "i2c"; 68 device_type = "i2c";
69 compatible = "fsl-i2c"; 69 compatible = "fsl-i2c";
70 reg = <3000 100>; 70 reg = <3000 100>;
71 interrupts = <1b 2>; 71 interrupts = <2b 2>;
72 interrupt-parent = <&mpic>; 72 interrupt-parent = <&mpic>;
73 dfsrr; 73 dfsrr;
74 }; 74 };
@@ -81,13 +81,13 @@
81 reg = <24520 20>; 81 reg = <24520 20>;
82 phy0: ethernet-phy@0 { 82 phy0: ethernet-phy@0 {
83 interrupt-parent = <&mpic>; 83 interrupt-parent = <&mpic>;
84 interrupts = <3a 1>; 84 interrupts = <a 1>;
85 reg = <0>; 85 reg = <0>;
86 device_type = "ethernet-phy"; 86 device_type = "ethernet-phy";
87 }; 87 };
88 phy1: ethernet-phy@1 { 88 phy1: ethernet-phy@1 {
89 interrupt-parent = <&mpic>; 89 interrupt-parent = <&mpic>;
90 interrupts = <3a 1>; 90 interrupts = <a 1>;
91 reg = <1>; 91 reg = <1>;
92 device_type = "ethernet-phy"; 92 device_type = "ethernet-phy";
93 }; 93 };
@@ -101,7 +101,7 @@
101 compatible = "gianfar"; 101 compatible = "gianfar";
102 reg = <24000 1000>; 102 reg = <24000 1000>;
103 local-mac-address = [ 00 00 00 00 00 00 ]; 103 local-mac-address = [ 00 00 00 00 00 00 ];
104 interrupts = <d 2 e 2 12 2>; 104 interrupts = <1d 2 1e 2 22 2>;
105 interrupt-parent = <&mpic>; 105 interrupt-parent = <&mpic>;
106 phy-handle = <&phy0>; 106 phy-handle = <&phy0>;
107 }; 107 };
@@ -114,7 +114,7 @@
114 compatible = "gianfar"; 114 compatible = "gianfar";
115 reg = <26000 1000>; 115 reg = <26000 1000>;
116 local-mac-address = [ 00 00 00 00 00 00 ]; 116 local-mac-address = [ 00 00 00 00 00 00 ];
117 interrupts = <f 2 10 2 11 2>; 117 interrupts = <1f 2 20 2 21 2>;
118 interrupt-parent = <&mpic>; 118 interrupt-parent = <&mpic>;
119 phy-handle = <&phy1>; 119 phy-handle = <&phy1>;
120 }; 120 };
@@ -124,7 +124,7 @@
124 compatible = "ns16550"; 124 compatible = "ns16550";
125 reg = <4500 100>; 125 reg = <4500 100>;
126 clock-frequency = <0>; 126 clock-frequency = <0>;
127 interrupts = <1a 2>; 127 interrupts = <2a 2>;
128 interrupt-parent = <&mpic>; 128 interrupt-parent = <&mpic>;
129 }; 129 };
130 130
@@ -133,7 +133,7 @@
133 compatible = "ns16550"; 133 compatible = "ns16550";
134 reg = <4600 100>; 134 reg = <4600 100>;
135 clock-frequency = <0>; 135 clock-frequency = <0>;
136 interrupts = <1a 2>; 136 interrupts = <2a 2>;
137 interrupt-parent = <&mpic>; 137 interrupt-parent = <&mpic>;
138 }; 138 };
139 139
diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts
index ad96381033..9d0b84b66c 100644
--- a/arch/powerpc/boot/dts/mpc8548cds.dts
+++ b/arch/powerpc/boot/dts/mpc8548cds.dts
@@ -52,7 +52,7 @@
52 compatible = "fsl,8548-memory-controller"; 52 compatible = "fsl,8548-memory-controller";
53 reg = <2000 1000>; 53 reg = <2000 1000>;
54 interrupt-parent = <&mpic>; 54 interrupt-parent = <&mpic>;
55 interrupts = <2 2>; 55 interrupts = <12 2>;
56 }; 56 };
57 57
58 l2-cache-controller@20000 { 58 l2-cache-controller@20000 {
@@ -61,14 +61,14 @@
61 cache-line-size = <20>; // 32 bytes 61 cache-line-size = <20>; // 32 bytes
62 cache-size = <80000>; // L2, 512K 62 cache-size = <80000>; // L2, 512K
63 interrupt-parent = <&mpic>; 63 interrupt-parent = <&mpic>;
64 interrupts = <0 2>; 64 interrupts = <10 2>;
65 }; 65 };
66 66
67 i2c@3000 { 67 i2c@3000 {
68 device_type = "i2c"; 68 device_type = "i2c";
69 compatible = "fsl-i2c"; 69 compatible = "fsl-i2c";
70 reg = <3000 100>; 70 reg = <3000 100>;
71 interrupts = <1b 2>; 71 interrupts = <2b 2>;
72 interrupt-parent = <&mpic>; 72 interrupt-parent = <&mpic>;
73 dfsrr; 73 dfsrr;
74 }; 74 };
@@ -81,25 +81,25 @@
81 reg = <24520 20>; 81 reg = <24520 20>;
82 phy0: ethernet-phy@0 { 82 phy0: ethernet-phy@0 {
83 interrupt-parent = <&mpic>; 83 interrupt-parent = <&mpic>;
84 interrupts = <35 0>; 84 interrupts = <5 1>;
85 reg = <0>; 85 reg = <0>;
86 device_type = "ethernet-phy"; 86 device_type = "ethernet-phy";
87 }; 87 };
88 phy1: ethernet-phy@1 { 88 phy1: ethernet-phy@1 {
89 interrupt-parent = <&mpic>; 89 interrupt-parent = <&mpic>;
90 interrupts = <35 0>; 90 interrupts = <5 1>;
91 reg = <1>; 91 reg = <1>;
92 device_type = "ethernet-phy"; 92 device_type = "ethernet-phy";
93 }; 93 };
94 phy2: ethernet-phy@2 { 94 phy2: ethernet-phy@2 {
95 interrupt-parent = <&mpic>; 95 interrupt-parent = <&mpic>;
96 interrupts = <35 0>; 96 interrupts = <5 1>;
97 reg = <2>; 97 reg = <2>;
98 device_type = "ethernet-phy"; 98 device_type = "ethernet-phy";
99 }; 99 };
100 phy3: ethernet-phy@3 { 100 phy3: ethernet-phy@3 {
101 interrupt-parent = <&mpic>; 101 interrupt-parent = <&mpic>;
102 interrupts = <35 0>; 102 interrupts = <5 1>;
103 reg = <3>; 103 reg = <3>;
104 device_type = "ethernet-phy"; 104 device_type = "ethernet-phy";
105 }; 105 };
@@ -112,8 +112,8 @@
112 model = "eTSEC"; 112 model = "eTSEC";
113 compatible = "gianfar"; 113 compatible = "gianfar";
114 reg = <24000 1000>; 114 reg = <24000 1000>;
115 local-mac-address = [ 00 E0 0C 00 73 00 ]; 115 local-mac-address = [ 00 00 00 00 00 00 ];
116 interrupts = <d 2 e 2 12 2>; 116 interrupts = <1d 2 1e 2 22 2>;
117 interrupt-parent = <&mpic>; 117 interrupt-parent = <&mpic>;
118 phy-handle = <&phy0>; 118 phy-handle = <&phy0>;
119 }; 119 };
@@ -125,8 +125,8 @@
125 model = "eTSEC"; 125 model = "eTSEC";
126 compatible = "gianfar"; 126 compatible = "gianfar";
127 reg = <25000 1000>; 127 reg = <25000 1000>;
128 local-mac-address = [ 00 E0 0C 00 73 01 ]; 128 local-mac-address = [ 00 00 00 00 00 00 ];
129 interrupts = <13 2 14 2 18 2>; 129 interrupts = <23 2 24 2 28 2>;
130 interrupt-parent = <&mpic>; 130 interrupt-parent = <&mpic>;
131 phy-handle = <&phy1>; 131 phy-handle = <&phy1>;
132 }; 132 };
@@ -139,8 +139,8 @@
139 model = "eTSEC"; 139 model = "eTSEC";
140 compatible = "gianfar"; 140 compatible = "gianfar";
141 reg = <26000 1000>; 141 reg = <26000 1000>;
142 local-mac-address = [ 00 E0 0C 00 73 02 ]; 142 local-mac-address = [ 00 00 00 00 00 00 ];
143 interrupts = <f 2 10 2 11 2>; 143 interrupts = <1f 2 20 2 21 2>;
144 interrupt-parent = <&mpic>; 144 interrupt-parent = <&mpic>;
145 phy-handle = <&phy2>; 145 phy-handle = <&phy2>;
146 }; 146 };
@@ -152,8 +152,8 @@
152 model = "eTSEC"; 152 model = "eTSEC";
153 compatible = "gianfar"; 153 compatible = "gianfar";
154 reg = <27000 1000>; 154 reg = <27000 1000>;
155 local-mac-address = [ 00 E0 0C 00 73 03 ]; 155 local-mac-address = [ 00 00 00 00 00 00 ];
156 interrupts = <15 2 16 2 17 2>; 156 interrupts = <25 2 26 2 27 2>;
157 interrupt-parent = <&mpic>; 157 interrupt-parent = <&mpic>;
158 phy-handle = <&phy3>; 158 phy-handle = <&phy3>;
159 }; 159 };
@@ -164,7 +164,7 @@
164 compatible = "ns16550"; 164 compatible = "ns16550";
165 reg = <4500 100>; // reg base, size 165 reg = <4500 100>; // reg base, size
166 clock-frequency = <0>; // should we fill in in uboot? 166 clock-frequency = <0>; // should we fill in in uboot?
167 interrupts = <1a 2>; 167 interrupts = <2a 2>;
168 interrupt-parent = <&mpic>; 168 interrupt-parent = <&mpic>;
169 }; 169 };
170 170
@@ -173,58 +173,64 @@
173 compatible = "ns16550"; 173 compatible = "ns16550";
174 reg = <4600 100>; // reg base, size 174 reg = <4600 100>; // reg base, size
175 clock-frequency = <0>; // should we fill in in uboot? 175 clock-frequency = <0>; // should we fill in in uboot?
176 interrupts = <1a 2>; 176 interrupts = <2a 2>;
177 interrupt-parent = <&mpic>; 177 interrupt-parent = <&mpic>;
178 }; 178 };
179 179
180 global-utilities@e0000 { //global utilities reg
181 compatible = "fsl,mpc8548-guts";
182 reg = <e0000 1000>;
183 fsl,has-rstcr;
184 };
185
180 pci1: pci@8000 { 186 pci1: pci@8000 {
181 interrupt-map-mask = <1f800 0 0 7>; 187 interrupt-map-mask = <1f800 0 0 7>;
182 interrupt-map = < 188 interrupt-map = <
183 189
184 /* IDSEL 0x10 */ 190 /* IDSEL 0x10 */
185 08000 0 0 1 &mpic 30 1 191 08000 0 0 1 &mpic 0 1
186 08000 0 0 2 &mpic 31 1 192 08000 0 0 2 &mpic 1 1
187 08000 0 0 3 &mpic 32 1 193 08000 0 0 3 &mpic 2 1
188 08000 0 0 4 &mpic 33 1 194 08000 0 0 4 &mpic 3 1
189 195
190 /* IDSEL 0x11 */ 196 /* IDSEL 0x11 */
191 08800 0 0 1 &mpic 30 1 197 08800 0 0 1 &mpic 0 1
192 08800 0 0 2 &mpic 31 1 198 08800 0 0 2 &mpic 1 1
193 08800 0 0 3 &mpic 32 1 199 08800 0 0 3 &mpic 2 1
194 08800 0 0 4 &mpic 33 1 200 08800 0 0 4 &mpic 3 1
195 201
196 /* IDSEL 0x12 (Slot 1) */ 202 /* IDSEL 0x12 (Slot 1) */
197 09000 0 0 1 &mpic 30 1 203 09000 0 0 1 &mpic 0 1
198 09000 0 0 2 &mpic 31 1 204 09000 0 0 2 &mpic 1 1
199 09000 0 0 3 &mpic 32 1 205 09000 0 0 3 &mpic 2 1
200 09000 0 0 4 &mpic 33 1 206 09000 0 0 4 &mpic 3 1
201 207
202 /* IDSEL 0x13 (Slot 2) */ 208 /* IDSEL 0x13 (Slot 2) */
203 09800 0 0 1 &mpic 31 1 209 09800 0 0 1 &mpic 1 1
204 09800 0 0 2 &mpic 32 1 210 09800 0 0 2 &mpic 2 1
205 09800 0 0 3 &mpic 33 1 211 09800 0 0 3 &mpic 3 1
206 09800 0 0 4 &mpic 30 1 212 09800 0 0 4 &mpic 0 1
207 213
208 /* IDSEL 0x14 (Slot 3) */ 214 /* IDSEL 0x14 (Slot 3) */
209 0a000 0 0 1 &mpic 32 1 215 0a000 0 0 1 &mpic 2 1
210 0a000 0 0 2 &mpic 33 1 216 0a000 0 0 2 &mpic 3 1
211 0a000 0 0 3 &mpic 30 1 217 0a000 0 0 3 &mpic 0 1
212 0a000 0 0 4 &mpic 31 1 218 0a000 0 0 4 &mpic 1 1
213 219
214 /* IDSEL 0x15 (Slot 4) */ 220 /* IDSEL 0x15 (Slot 4) */
215 0a800 0 0 1 &mpic 33 1 221 0a800 0 0 1 &mpic 3 1
216 0a800 0 0 2 &mpic 30 1 222 0a800 0 0 2 &mpic 0 1
217 0a800 0 0 3 &mpic 31 1 223 0a800 0 0 3 &mpic 1 1
218 0a800 0 0 4 &mpic 32 1 224 0a800 0 0 4 &mpic 2 1
219 225
220 /* Bus 1 (Tundra Bridge) */ 226 /* Bus 1 (Tundra Bridge) */
221 /* IDSEL 0x12 (ISA bridge) */ 227 /* IDSEL 0x12 (ISA bridge) */
222 19000 0 0 1 &mpic 30 1 228 19000 0 0 1 &mpic 0 1
223 19000 0 0 2 &mpic 31 1 229 19000 0 0 2 &mpic 1 1
224 19000 0 0 3 &mpic 32 1 230 19000 0 0 3 &mpic 2 1
225 19000 0 0 4 &mpic 33 1>; 231 19000 0 0 4 &mpic 3 1>;
226 interrupt-parent = <&mpic>; 232 interrupt-parent = <&mpic>;
227 interrupts = <08 2>; 233 interrupts = <18 2>;
228 bus-range = <0 0>; 234 bus-range = <0 0>;
229 ranges = <02000000 0 80000000 80000000 0 20000000 235 ranges = <02000000 0 80000000 80000000 0 20000000
230 01000000 0 00000000 e2000000 0 00100000>; 236 01000000 0 00000000 e2000000 0 00100000>;
@@ -256,12 +262,12 @@
256 interrupt-map = < 262 interrupt-map = <
257 263
258 /* IDSEL 0x15 */ 264 /* IDSEL 0x15 */
259 a800 0 0 1 &mpic 3b 1 265 a800 0 0 1 &mpic b 1
260 a800 0 0 2 &mpic 3b 1 266 a800 0 0 2 &mpic b 1
261 a800 0 0 3 &mpic 3b 1 267 a800 0 0 3 &mpic b 1
262 a800 0 0 4 &mpic 3b 1>; 268 a800 0 0 4 &mpic b 1>;
263 interrupt-parent = <&mpic>; 269 interrupt-parent = <&mpic>;
264 interrupts = <09 2>; 270 interrupts = <19 2>;
265 bus-range = <0 0>; 271 bus-range = <0 0>;
266 ranges = <02000000 0 a0000000 a0000000 0 20000000 272 ranges = <02000000 0 a0000000 a0000000 0 20000000
267 01000000 0 00000000 e3000000 0 00100000>; 273 01000000 0 00000000 e3000000 0 00100000>;
diff --git a/arch/powerpc/boot/dts/mpc8555cds.dts b/arch/powerpc/boot/dts/mpc8555cds.dts
index 951ed92f11..17e45d9a38 100644
--- a/arch/powerpc/boot/dts/mpc8555cds.dts
+++ b/arch/powerpc/boot/dts/mpc8555cds.dts
@@ -52,7 +52,7 @@
52 compatible = "fsl,8555-memory-controller"; 52 compatible = "fsl,8555-memory-controller";
53 reg = <2000 1000>; 53 reg = <2000 1000>;
54 interrupt-parent = <&mpic>; 54 interrupt-parent = <&mpic>;
55 interrupts = <2 2>; 55 interrupts = <12 2>;
56 }; 56 };
57 57
58 l2-cache-controller@20000 { 58 l2-cache-controller@20000 {
@@ -61,14 +61,14 @@
61 cache-line-size = <20>; // 32 bytes 61 cache-line-size = <20>; // 32 bytes
62 cache-size = <40000>; // L2, 256K 62 cache-size = <40000>; // L2, 256K
63 interrupt-parent = <&mpic>; 63 interrupt-parent = <&mpic>;
64 interrupts = <0 2>; 64 interrupts = <10 2>;
65 }; 65 };
66 66
67 i2c@3000 { 67 i2c@3000 {
68 device_type = "i2c"; 68 device_type = "i2c";
69 compatible = "fsl-i2c"; 69 compatible = "fsl-i2c";
70 reg = <3000 100>; 70 reg = <3000 100>;
71 interrupts = <1b 2>; 71 interrupts = <2b 2>;
72 interrupt-parent = <&mpic>; 72 interrupt-parent = <&mpic>;
73 dfsrr; 73 dfsrr;
74 }; 74 };
@@ -81,13 +81,13 @@
81 reg = <24520 20>; 81 reg = <24520 20>;
82 phy0: ethernet-phy@0 { 82 phy0: ethernet-phy@0 {
83 interrupt-parent = <&mpic>; 83 interrupt-parent = <&mpic>;
84 interrupts = <35 0>; 84 interrupts = <5 1>;
85 reg = <0>; 85 reg = <0>;
86 device_type = "ethernet-phy"; 86 device_type = "ethernet-phy";
87 }; 87 };
88 phy1: ethernet-phy@1 { 88 phy1: ethernet-phy@1 {
89 interrupt-parent = <&mpic>; 89 interrupt-parent = <&mpic>;
90 interrupts = <35 0>; 90 interrupts = <5 1>;
91 reg = <1>; 91 reg = <1>;
92 device_type = "ethernet-phy"; 92 device_type = "ethernet-phy";
93 }; 93 };
@@ -100,8 +100,8 @@
100 model = "TSEC"; 100 model = "TSEC";
101 compatible = "gianfar"; 101 compatible = "gianfar";
102 reg = <24000 1000>; 102 reg = <24000 1000>;
103 local-mac-address = [ 00 E0 0C 00 73 00 ]; 103 local-mac-address = [ 00 00 00 00 00 00 ];
104 interrupts = <0d 2 0e 2 12 2>; 104 interrupts = <1d 2 1e 2 22 2>;
105 interrupt-parent = <&mpic>; 105 interrupt-parent = <&mpic>;
106 phy-handle = <&phy0>; 106 phy-handle = <&phy0>;
107 }; 107 };
@@ -113,8 +113,8 @@
113 model = "TSEC"; 113 model = "TSEC";
114 compatible = "gianfar"; 114 compatible = "gianfar";
115 reg = <25000 1000>; 115 reg = <25000 1000>;
116 local-mac-address = [ 00 E0 0C 00 73 01 ]; 116 local-mac-address = [ 00 00 00 00 00 00 ];
117 interrupts = <13 2 14 2 18 2>; 117 interrupts = <23 2 24 2 28 2>;
118 interrupt-parent = <&mpic>; 118 interrupt-parent = <&mpic>;
119 phy-handle = <&phy1>; 119 phy-handle = <&phy1>;
120 }; 120 };
@@ -124,7 +124,7 @@
124 compatible = "ns16550"; 124 compatible = "ns16550";
125 reg = <4500 100>; // reg base, size 125 reg = <4500 100>; // reg base, size
126 clock-frequency = <0>; // should we fill in in uboot? 126 clock-frequency = <0>; // should we fill in in uboot?
127 interrupts = <1a 2>; 127 interrupts = <2a 2>;
128 interrupt-parent = <&mpic>; 128 interrupt-parent = <&mpic>;
129 }; 129 };
130 130
@@ -133,7 +133,7 @@
133 compatible = "ns16550"; 133 compatible = "ns16550";
134 reg = <4600 100>; // reg base, size 134 reg = <4600 100>; // reg base, size
135 clock-frequency = <0>; // should we fill in in uboot? 135 clock-frequency = <0>; // should we fill in in uboot?
136 interrupts = <1a 2>; 136 interrupts = <2a 2>;
137 interrupt-parent = <&mpic>; 137 interrupt-parent = <&mpic>;
138 }; 138 };
139 139
@@ -142,49 +142,49 @@
142 interrupt-map = < 142 interrupt-map = <
143 143
144 /* IDSEL 0x10 */ 144 /* IDSEL 0x10 */
145 08000 0 0 1 &mpic 30 1 145 08000 0 0 1 &mpic 0 1
146 08000 0 0 2 &mpic 31 1 146 08000 0 0 2 &mpic 1 1
147 08000 0 0 3 &mpic 32 1 147 08000 0 0 3 &mpic 2 1
148 08000 0 0 4 &mpic 33 1 148 08000 0 0 4 &mpic 3 1
149 149
150 /* IDSEL 0x11 */ 150 /* IDSEL 0x11 */
151 08800 0 0 1 &mpic 30 1 151 08800 0 0 1 &mpic 0 1
152 08800 0 0 2 &mpic 31 1 152 08800 0 0 2 &mpic 1 1
153 08800 0 0 3 &mpic 32 1 153 08800 0 0 3 &mpic 2 1
154 08800 0 0 4 &mpic 33 1 154 08800 0 0 4 &mpic 3 1
155 155
156 /* IDSEL 0x12 (Slot 1) */ 156 /* IDSEL 0x12 (Slot 1) */
157 09000 0 0 1 &mpic 30 1 157 09000 0 0 1 &mpic 0 1
158 09000 0 0 2 &mpic 31 1 158 09000 0 0 2 &mpic 1 1
159 09000 0 0 3 &mpic 32 1 159 09000 0 0 3 &mpic 2 1
160 09000 0 0 4 &mpic 33 1 160 09000 0 0 4 &mpic 3 1
161 161
162 /* IDSEL 0x13 (Slot 2) */ 162 /* IDSEL 0x13 (Slot 2) */
163 09800 0 0 1 &mpic 31 1 163 09800 0 0 1 &mpic 1 1
164 09800 0 0 2 &mpic 32 1 164 09800 0 0 2 &mpic 2 1
165 09800 0 0 3 &mpic 33 1 165 09800 0 0 3 &mpic 3 1
166 09800 0 0 4 &mpic 30 1 166 09800 0 0 4 &mpic 0 1
167 167
168 /* IDSEL 0x14 (Slot 3) */ 168 /* IDSEL 0x14 (Slot 3) */
169 0a000 0 0 1 &mpic 32 1 169 0a000 0 0 1 &mpic 2 1
170 0a000 0 0 2 &mpic 33 1 170 0a000 0 0 2 &mpic 3 1
171 0a000 0 0 3 &mpic 30 1 171 0a000 0 0 3 &mpic 0 1
172 0a000 0 0 4 &mpic 31 1 172 0a000 0 0 4 &mpic 1 1
173 173
174 /* IDSEL 0x15 (Slot 4) */ 174 /* IDSEL 0x15 (Slot 4) */
175 0a800 0 0 1 &mpic 33 1 175 0a800 0 0 1 &mpic 3 1
176 0a800 0 0 2 &mpic 30 1 176 0a800 0 0 2 &mpic 0 1
177 0a800 0 0 3 &mpic 31 1 177 0a800 0 0 3 &mpic 1 1
178 0a800 0 0 4 &mpic 32 1 178 0a800 0 0 4 &mpic 2 1
179 179
180 /* Bus 1 (Tundra Bridge) */ 180 /* Bus 1 (Tundra Bridge) */
181 /* IDSEL 0x12 (ISA bridge) */ 181 /* IDSEL 0x12 (ISA bridge) */
182 19000 0 0 1 &mpic 30 1 182 19000 0 0 1 &mpic 0 1
183 19000 0 0 2 &mpic 31 1 183 19000 0 0 2 &mpic 1 1
184 19000 0 0 3 &mpic 32 1 184 19000 0 0 3 &mpic 2 1
185 19000 0 0 4 &mpic 33 1>; 185 19000 0 0 4 &mpic 3 1>;
186 interrupt-parent = <&mpic>; 186 interrupt-parent = <&mpic>;
187 interrupts = <08 2>; 187 interrupts = <18 2>;
188 bus-range = <0 0>; 188 bus-range = <0 0>;
189 ranges = <02000000 0 80000000 80000000 0 20000000 189 ranges = <02000000 0 80000000 80000000 0 20000000
190 01000000 0 00000000 e2000000 0 00100000>; 190 01000000 0 00000000 e2000000 0 00100000>;
@@ -216,12 +216,12 @@
216 interrupt-map = < 216 interrupt-map = <
217 217
218 /* IDSEL 0x15 */ 218 /* IDSEL 0x15 */
219 a800 0 0 1 &mpic 3b 1 219 a800 0 0 1 &mpic b 1
220 a800 0 0 2 &mpic 3b 1 220 a800 0 0 2 &mpic b 1
221 a800 0 0 3 &mpic 3b 1 221 a800 0 0 3 &mpic b 1
222 a800 0 0 4 &mpic 3b 1>; 222 a800 0 0 4 &mpic b 1>;
223 interrupt-parent = <&mpic>; 223 interrupt-parent = <&mpic>;
224 interrupts = <09 2>; 224 interrupts = <19 2>;
225 bus-range = <0 0>; 225 bus-range = <0 0>;
226 ranges = <02000000 0 a0000000 a0000000 0 20000000 226 ranges = <02000000 0 a0000000 a0000000 0 20000000
227 01000000 0 00000000 e3000000 0 00100000>; 227 01000000 0 00000000 e3000000 0 00100000>;
diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts
index 80682152b0..21ccaaa279 100644
--- a/arch/powerpc/boot/dts/mpc8560ads.dts
+++ b/arch/powerpc/boot/dts/mpc8560ads.dts
@@ -52,7 +52,7 @@
52 compatible = "fsl,8540-memory-controller"; 52 compatible = "fsl,8540-memory-controller";
53 reg = <2000 1000>; 53 reg = <2000 1000>;
54 interrupt-parent = <&mpic>; 54 interrupt-parent = <&mpic>;
55 interrupts = <2 2>; 55 interrupts = <12 2>;
56 }; 56 };
57 57
58 l2-cache-controller@20000 { 58 l2-cache-controller@20000 {
@@ -61,7 +61,7 @@
61 cache-line-size = <20>; // 32 bytes 61 cache-line-size = <20>; // 32 bytes
62 cache-size = <40000>; // L2, 256K 62 cache-size = <40000>; // L2, 256K
63 interrupt-parent = <&mpic>; 63 interrupt-parent = <&mpic>;
64 interrupts = <0 2>; 64 interrupts = <10 2>;
65 }; 65 };
66 66
67 mdio@24520 { 67 mdio@24520 {
@@ -72,25 +72,25 @@
72 #size-cells = <0>; 72 #size-cells = <0>;
73 phy0: ethernet-phy@0 { 73 phy0: ethernet-phy@0 {
74 interrupt-parent = <&mpic>; 74 interrupt-parent = <&mpic>;
75 interrupts = <35 1>; 75 interrupts = <5 1>;
76 reg = <0>; 76 reg = <0>;
77 device_type = "ethernet-phy"; 77 device_type = "ethernet-phy";
78 }; 78 };
79 phy1: ethernet-phy@1 { 79 phy1: ethernet-phy@1 {
80 interrupt-parent = <&mpic>; 80 interrupt-parent = <&mpic>;
81 interrupts = <35 1>; 81 interrupts = <5 1>;
82 reg = <1>; 82 reg = <1>;
83 device_type = "ethernet-phy"; 83 device_type = "ethernet-phy";
84 }; 84 };
85 phy2: ethernet-phy@2 { 85 phy2: ethernet-phy@2 {
86 interrupt-parent = <&mpic>; 86 interrupt-parent = <&mpic>;
87 interrupts = <37 1>; 87 interrupts = <7 1>;
88 reg = <2>; 88 reg = <2>;
89 device_type = "ethernet-phy"; 89 device_type = "ethernet-phy";
90 }; 90 };
91 phy3: ethernet-phy@3 { 91 phy3: ethernet-phy@3 {
92 interrupt-parent = <&mpic>; 92 interrupt-parent = <&mpic>;
93 interrupts = <37 1>; 93 interrupts = <7 1>;
94 reg = <3>; 94 reg = <3>;
95 device_type = "ethernet-phy"; 95 device_type = "ethernet-phy";
96 }; 96 };
@@ -101,8 +101,14 @@
101 model = "TSEC"; 101 model = "TSEC";
102 compatible = "gianfar"; 102 compatible = "gianfar";
103 reg = <24000 1000>; 103 reg = <24000 1000>;
104 address = [ 00 00 0C 00 00 FD ]; 104 /*
105 interrupts = <d 2 e 2 12 2>; 105 * address is deprecated and will be removed
106 * in 2.6.25. Only recent versions of
107 * U-Boot support local-mac-address, however.
108 */
109 address = [ 00 00 00 00 00 00 ];
110 local-mac-address = [ 00 00 00 00 00 00 ];
111 interrupts = <1d 2 1e 2 22 2>;
106 interrupt-parent = <&mpic>; 112 interrupt-parent = <&mpic>;
107 phy-handle = <&phy0>; 113 phy-handle = <&phy0>;
108 }; 114 };
@@ -114,8 +120,14 @@
114 model = "TSEC"; 120 model = "TSEC";
115 compatible = "gianfar"; 121 compatible = "gianfar";
116 reg = <25000 1000>; 122 reg = <25000 1000>;
117 address = [ 00 00 0C 00 01 FD ]; 123 /*
118 interrupts = <13 2 14 2 18 2>; 124 * address is deprecated and will be removed
125 * in 2.6.25. Only recent versions of
126 * U-Boot support local-mac-address, however.
127 */
128 address = [ 00 00 00 00 00 00 ];
129 local-mac-address = [ 00 00 00 00 00 00 ];
130 interrupts = <23 2 24 2 28 2>;
119 interrupt-parent = <&mpic>; 131 interrupt-parent = <&mpic>;
120 phy-handle = <&phy1>; 132 phy-handle = <&phy1>;
121 }; 133 };
@@ -132,79 +144,79 @@
132 interrupt-map = < 144 interrupt-map = <
133 145
134 /* IDSEL 0x2 */ 146 /* IDSEL 0x2 */
135 1000 0 0 1 &mpic 31 1 147 1000 0 0 1 &mpic 1 1
136 1000 0 0 2 &mpic 32 1 148 1000 0 0 2 &mpic 2 1
137 1000 0 0 3 &mpic 33 1 149 1000 0 0 3 &mpic 3 1
138 1000 0 0 4 &mpic 34 1 150 1000 0 0 4 &mpic 4 1
139 151
140 /* IDSEL 0x3 */ 152 /* IDSEL 0x3 */
141 1800 0 0 1 &mpic 34 1 153 1800 0 0 1 &mpic 4 1
142 1800 0 0 2 &mpic 31 1 154 1800 0 0 2 &mpic 1 1
143 1800 0 0 3 &mpic 32 1 155 1800 0 0 3 &mpic 2 1
144 1800 0 0 4 &mpic 33 1 156 1800 0 0 4 &mpic 3 1
145 157
146 /* IDSEL 0x4 */ 158 /* IDSEL 0x4 */
147 2000 0 0 1 &mpic 33 1 159 2000 0 0 1 &mpic 3 1
148 2000 0 0 2 &mpic 34 1 160 2000 0 0 2 &mpic 4 1
149 2000 0 0 3 &mpic 31 1 161 2000 0 0 3 &mpic 1 1
150 2000 0 0 4 &mpic 32 1 162 2000 0 0 4 &mpic 2 1
151 163
152 /* IDSEL 0x5 */ 164 /* IDSEL 0x5 */
153 2800 0 0 1 &mpic 32 1 165 2800 0 0 1 &mpic 2 1
154 2800 0 0 2 &mpic 33 1 166 2800 0 0 2 &mpic 3 1
155 2800 0 0 3 &mpic 34 1 167 2800 0 0 3 &mpic 4 1
156 2800 0 0 4 &mpic 31 1 168 2800 0 0 4 &mpic 1 1
157 169
158 /* IDSEL 12 */ 170 /* IDSEL 12 */
159 6000 0 0 1 &mpic 31 1 171 6000 0 0 1 &mpic 1 1
160 6000 0 0 2 &mpic 32 1 172 6000 0 0 2 &mpic 2 1
161 6000 0 0 3 &mpic 33 1 173 6000 0 0 3 &mpic 3 1
162 6000 0 0 4 &mpic 34 1 174 6000 0 0 4 &mpic 4 1
163 175
164 /* IDSEL 13 */ 176 /* IDSEL 13 */
165 6800 0 0 1 &mpic 34 1 177 6800 0 0 1 &mpic 4 1
166 6800 0 0 2 &mpic 31 1 178 6800 0 0 2 &mpic 1 1
167 6800 0 0 3 &mpic 32 1 179 6800 0 0 3 &mpic 2 1
168 6800 0 0 4 &mpic 33 1 180 6800 0 0 4 &mpic 3 1
169 181
170 /* IDSEL 14*/ 182 /* IDSEL 14*/
171 7000 0 0 1 &mpic 33 1 183 7000 0 0 1 &mpic 3 1
172 7000 0 0 2 &mpic 34 1 184 7000 0 0 2 &mpic 4 1
173 7000 0 0 3 &mpic 31 1 185 7000 0 0 3 &mpic 1 1
174 7000 0 0 4 &mpic 32 1 186 7000 0 0 4 &mpic 2 1
175 187
176 /* IDSEL 15 */ 188 /* IDSEL 15 */
177 7800 0 0 1 &mpic 32 1 189 7800 0 0 1 &mpic 2 1
178 7800 0 0 2 &mpic 33 1 190 7800 0 0 2 &mpic 3 1
179 7800 0 0 3 &mpic 34 1 191 7800 0 0 3 &mpic 4 1
180 7800 0 0 4 &mpic 31 1 192 7800 0 0 4 &mpic 1 1
181 193
182 /* IDSEL 18 */ 194 /* IDSEL 18 */
183 9000 0 0 1 &mpic 31 1 195 9000 0 0 1 &mpic 1 1
184 9000 0 0 2 &mpic 32 1 196 9000 0 0 2 &mpic 2 1
185 9000 0 0 3 &mpic 33 1 197 9000 0 0 3 &mpic 3 1
186 9000 0 0 4 &mpic 34 1 198 9000 0 0 4 &mpic 4 1
187 199
188 /* IDSEL 19 */ 200 /* IDSEL 19 */
189 9800 0 0 1 &mpic 34 1 201 9800 0 0 1 &mpic 4 1
190 9800 0 0 2 &mpic 31 1 202 9800 0 0 2 &mpic 1 1
191 9800 0 0 3 &mpic 32 1 203 9800 0 0 3 &mpic 2 1
192 9800 0 0 4 &mpic 33 1 204 9800 0 0 4 &mpic 3 1
193 205
194 /* IDSEL 20 */ 206 /* IDSEL 20 */
195 a000 0 0 1 &mpic 33 1 207 a000 0 0 1 &mpic 3 1
196 a000 0 0 2 &mpic 34 1 208 a000 0 0 2 &mpic 4 1
197 a000 0 0 3 &mpic 31 1 209 a000 0 0 3 &mpic 1 1
198 a000 0 0 4 &mpic 32 1 210 a000 0 0 4 &mpic 2 1
199 211
200 /* IDSEL 21 */ 212 /* IDSEL 21 */
201 a800 0 0 1 &mpic 32 1 213 a800 0 0 1 &mpic 2 1
202 a800 0 0 2 &mpic 33 1 214 a800 0 0 2 &mpic 3 1
203 a800 0 0 3 &mpic 34 1 215 a800 0 0 3 &mpic 4 1
204 a800 0 0 4 &mpic 31 1>; 216 a800 0 0 4 &mpic 1 1>;
205 217
206 interrupt-parent = <&mpic>; 218 interrupt-parent = <&mpic>;
207 interrupts = <8 0>; 219 interrupts = <18 2>;
208 bus-range = <0 0>; 220 bus-range = <0 0>;
209 ranges = <02000000 0 80000000 80000000 0 20000000 221 ranges = <02000000 0 80000000 80000000 0 20000000
210 01000000 0 00000000 e2000000 0 01000000>; 222 01000000 0 00000000 e2000000 0 01000000>;
@@ -234,7 +246,7 @@
234 interrupt-controller; 246 interrupt-controller;
235 #address-cells = <0>; 247 #address-cells = <0>;
236 #interrupt-cells = <2>; 248 #interrupt-cells = <2>;
237 interrupts = <1e 0>; 249 interrupts = <2e 2>;
238 interrupt-parent = <&mpic>; 250 interrupt-parent = <&mpic>;
239 reg = <90c00 80>; 251 reg = <90c00 80>;
240 built-in; 252 built-in;
@@ -275,7 +287,13 @@
275 model = "FCC"; 287 model = "FCC";
276 device-id = <2>; 288 device-id = <2>;
277 reg = <91320 20 88500 100 913a0 30>; 289 reg = <91320 20 88500 100 913a0 30>;
278 mac-address = [ 00 00 0C 00 02 FD ]; 290 /*
291 * mac-address is deprecated and will be removed
292 * in 2.6.25. Only recent versions of
293 * U-Boot support local-mac-address, however.
294 */
295 mac-address = [ 00 00 00 00 00 00 ];
296 local-mac-address = [ 00 00 00 00 00 00 ];
279 clock-setup = <ff00ffff 250000>; 297 clock-setup = <ff00ffff 250000>;
280 rx-clock = <15>; 298 rx-clock = <15>;
281 tx-clock = <16>; 299 tx-clock = <16>;
@@ -290,7 +308,13 @@
290 model = "FCC"; 308 model = "FCC";
291 device-id = <3>; 309 device-id = <3>;
292 reg = <91340 20 88600 100 913d0 30>; 310 reg = <91340 20 88600 100 913d0 30>;
293 mac-address = [ 00 00 0C 00 03 FD ]; 311 /*
312 * mac-address is deprecated and will be removed
313 * in 2.6.25. Only recent versions of
314 * U-Boot support local-mac-address, however.
315 */
316 mac-address = [ 00 00 00 00 00 00 ];
317 local-mac-address = [ 00 00 00 00 00 00 ];
294 clock-setup = <ffff00ff 3700>; 318 clock-setup = <ffff00ff 3700>;
295 rx-clock = <17>; 319 rx-clock = <17>;
296 tx-clock = <18>; 320 tx-clock = <18>;
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts
index a123ec9456..6bb18f2807 100644
--- a/arch/powerpc/boot/dts/mpc8568mds.dts
+++ b/arch/powerpc/boot/dts/mpc8568mds.dts
@@ -61,7 +61,7 @@
61 compatible = "fsl,8568-memory-controller"; 61 compatible = "fsl,8568-memory-controller";
62 reg = <2000 1000>; 62 reg = <2000 1000>;
63 interrupt-parent = <&mpic>; 63 interrupt-parent = <&mpic>;
64 interrupts = <2 2>; 64 interrupts = <12 2>;
65 }; 65 };
66 66
67 l2-cache-controller@20000 { 67 l2-cache-controller@20000 {
@@ -70,14 +70,14 @@
70 cache-line-size = <20>; // 32 bytes 70 cache-line-size = <20>; // 32 bytes
71 cache-size = <80000>; // L2, 512K 71 cache-size = <80000>; // L2, 512K
72 interrupt-parent = <&mpic>; 72 interrupt-parent = <&mpic>;
73 interrupts = <0 2>; 73 interrupts = <10 2>;
74 }; 74 };
75 75
76 i2c@3000 { 76 i2c@3000 {
77 device_type = "i2c"; 77 device_type = "i2c";
78 compatible = "fsl-i2c"; 78 compatible = "fsl-i2c";
79 reg = <3000 100>; 79 reg = <3000 100>;
80 interrupts = <1b 2>; 80 interrupts = <2b 2>;
81 interrupt-parent = <&mpic>; 81 interrupt-parent = <&mpic>;
82 dfsrr; 82 dfsrr;
83 }; 83 };
@@ -86,7 +86,7 @@
86 device_type = "i2c"; 86 device_type = "i2c";
87 compatible = "fsl-i2c"; 87 compatible = "fsl-i2c";
88 reg = <3100 100>; 88 reg = <3100 100>;
89 interrupts = <1b 2>; 89 interrupts = <2b 2>;
90 interrupt-parent = <&mpic>; 90 interrupt-parent = <&mpic>;
91 dfsrr; 91 dfsrr;
92 }; 92 };
@@ -99,25 +99,25 @@
99 reg = <24520 20>; 99 reg = <24520 20>;
100 phy0: ethernet-phy@0 { 100 phy0: ethernet-phy@0 {
101 interrupt-parent = <&mpic>; 101 interrupt-parent = <&mpic>;
102 interrupts = <31 1>; 102 interrupts = <1 1>;
103 reg = <0>; 103 reg = <0>;
104 device_type = "ethernet-phy"; 104 device_type = "ethernet-phy";
105 }; 105 };
106 phy1: ethernet-phy@1 { 106 phy1: ethernet-phy@1 {
107 interrupt-parent = <&mpic>; 107 interrupt-parent = <&mpic>;
108 interrupts = <32 1>; 108 interrupts = <2 1>;
109 reg = <1>; 109 reg = <1>;
110 device_type = "ethernet-phy"; 110 device_type = "ethernet-phy";
111 }; 111 };
112 phy2: ethernet-phy@2 { 112 phy2: ethernet-phy@2 {
113 interrupt-parent = <&mpic>; 113 interrupt-parent = <&mpic>;
114 interrupts = <31 1>; 114 interrupts = <1 1>;
115 reg = <2>; 115 reg = <2>;
116 device_type = "ethernet-phy"; 116 device_type = "ethernet-phy";
117 }; 117 };
118 phy3: ethernet-phy@3 { 118 phy3: ethernet-phy@3 {
119 interrupt-parent = <&mpic>; 119 interrupt-parent = <&mpic>;
120 interrupts = <32 1>; 120 interrupts = <2 1>;
121 reg = <3>; 121 reg = <3>;
122 device_type = "ethernet-phy"; 122 device_type = "ethernet-phy";
123 }; 123 };
@@ -130,8 +130,14 @@
130 model = "eTSEC"; 130 model = "eTSEC";
131 compatible = "gianfar"; 131 compatible = "gianfar";
132 reg = <24000 1000>; 132 reg = <24000 1000>;
133 /*
134 * mac-address is deprecated and will be removed
135 * in 2.6.25. Only recent versions of
136 * U-Boot support local-mac-address, however.
137 */
133 mac-address = [ 00 00 00 00 00 00 ]; 138 mac-address = [ 00 00 00 00 00 00 ];
134 interrupts = <d 2 e 2 12 2>; 139 local-mac-address = [ 00 00 00 00 00 00 ];
140 interrupts = <1d 2 1e 2 22 2>;
135 interrupt-parent = <&mpic>; 141 interrupt-parent = <&mpic>;
136 phy-handle = <&phy2>; 142 phy-handle = <&phy2>;
137 }; 143 };
@@ -143,8 +149,14 @@
143 model = "eTSEC"; 149 model = "eTSEC";
144 compatible = "gianfar"; 150 compatible = "gianfar";
145 reg = <25000 1000>; 151 reg = <25000 1000>;
146 mac-address = [ 00 00 00 00 00 00]; 152 /*
147 interrupts = <13 2 14 2 18 2>; 153 * mac-address is deprecated and will be removed
154 * in 2.6.25. Only recent versions of
155 * U-Boot support local-mac-address, however.
156 */
157 mac-address = [ 00 00 00 00 00 00 ];
158 local-mac-address = [ 00 00 00 00 00 00 ];
159 interrupts = <23 2 24 2 28 2>;
148 interrupt-parent = <&mpic>; 160 interrupt-parent = <&mpic>;
149 phy-handle = <&phy3>; 161 phy-handle = <&phy3>;
150 }; 162 };
@@ -154,7 +166,7 @@
154 compatible = "ns16550"; 166 compatible = "ns16550";
155 reg = <4500 100>; 167 reg = <4500 100>;
156 clock-frequency = <0>; 168 clock-frequency = <0>;
157 interrupts = <1a 2>; 169 interrupts = <2a 2>;
158 interrupt-parent = <&mpic>; 170 interrupt-parent = <&mpic>;
159 }; 171 };
160 172
@@ -163,7 +175,7 @@
163 compatible = "ns16550"; 175 compatible = "ns16550";
164 reg = <4600 100>; 176 reg = <4600 100>;
165 clock-frequency = <0>; 177 clock-frequency = <0>;
166 interrupts = <1a 2>; 178 interrupts = <2a 2>;
167 interrupt-parent = <&mpic>; 179 interrupt-parent = <&mpic>;
168 }; 180 };
169 181
@@ -172,7 +184,7 @@
172 model = "SEC2"; 184 model = "SEC2";
173 compatible = "talitos"; 185 compatible = "talitos";
174 reg = <30000 f000>; 186 reg = <30000 f000>;
175 interrupts = <1d 2>; 187 interrupts = <2d 2>;
176 interrupt-parent = <&mpic>; 188 interrupt-parent = <&mpic>;
177 num-channels = <4>; 189 num-channels = <4>;
178 channel-fifo-len = <18>; 190 channel-fifo-len = <18>;
@@ -300,7 +312,13 @@
300 reg = <2000 200>; 312 reg = <2000 200>;
301 interrupts = <20>; 313 interrupts = <20>;
302 interrupt-parent = <&qeic>; 314 interrupt-parent = <&qeic>;
303 mac-address = [ 00 04 9f 00 23 23 ]; 315 /*
316 * mac-address is deprecated and will be removed
317 * in 2.6.25. Only recent versions of
318 * U-Boot support local-mac-address, however.
319 */
320 mac-address = [ 00 00 00 00 00 00 ];
321 local-mac-address = [ 00 00 00 00 00 00 ];
304 rx-clock = <0>; 322 rx-clock = <0>;
305 tx-clock = <19>; 323 tx-clock = <19>;
306 phy-handle = <&qe_phy0>; 324 phy-handle = <&qe_phy0>;
@@ -316,7 +334,13 @@
316 reg = <3000 200>; 334 reg = <3000 200>;
317 interrupts = <21>; 335 interrupts = <21>;
318 interrupt-parent = <&qeic>; 336 interrupt-parent = <&qeic>;
319 mac-address = [ 00 11 22 33 44 55 ]; 337 /*
338 * mac-address is deprecated and will be removed
339 * in 2.6.25. Only recent versions of
340 * U-Boot support local-mac-address, however.
341 */
342 mac-address = [ 00 00 00 00 00 00 ];
343 local-mac-address = [ 00 00 00 00 00 00 ];
320 rx-clock = <0>; 344 rx-clock = <0>;
321 tx-clock = <14>; 345 tx-clock = <14>;
322 phy-handle = <&qe_phy1>; 346 phy-handle = <&qe_phy1>;
@@ -335,25 +359,25 @@
335 * gianfar's MDIO bus */ 359 * gianfar's MDIO bus */
336 qe_phy0: ethernet-phy@00 { 360 qe_phy0: ethernet-phy@00 {
337 interrupt-parent = <&mpic>; 361 interrupt-parent = <&mpic>;
338 interrupts = <31 1>; 362 interrupts = <1 1>;
339 reg = <0>; 363 reg = <0>;
340 device_type = "ethernet-phy"; 364 device_type = "ethernet-phy";
341 }; 365 };
342 qe_phy1: ethernet-phy@01 { 366 qe_phy1: ethernet-phy@01 {
343 interrupt-parent = <&mpic>; 367 interrupt-parent = <&mpic>;
344 interrupts = <32 1>; 368 interrupts = <2 1>;
345 reg = <1>; 369 reg = <1>;
346 device_type = "ethernet-phy"; 370 device_type = "ethernet-phy";
347 }; 371 };
348 qe_phy2: ethernet-phy@02 { 372 qe_phy2: ethernet-phy@02 {
349 interrupt-parent = <&mpic>; 373 interrupt-parent = <&mpic>;
350 interrupts = <31 1>; 374 interrupts = <1 1>;
351 reg = <2>; 375 reg = <2>;
352 device_type = "ethernet-phy"; 376 device_type = "ethernet-phy";
353 }; 377 };
354 qe_phy3: ethernet-phy@03 { 378 qe_phy3: ethernet-phy@03 {
355 interrupt-parent = <&mpic>; 379 interrupt-parent = <&mpic>;
356 interrupts = <32 1>; 380 interrupts = <2 1>;
357 reg = <3>; 381 reg = <3>;
358 device_type = "ethernet-phy"; 382 device_type = "ethernet-phy";
359 }; 383 };
@@ -367,7 +391,7 @@
367 reg = <80 80>; 391 reg = <80 80>;
368 built-in; 392 built-in;
369 big-endian; 393 big-endian;
370 interrupts = <1e 2 1e 2>; //high:30 low:30 394 interrupts = <2e 2 2e 2>; //high:30 low:30
371 interrupt-parent = <&mpic>; 395 interrupt-parent = <&mpic>;
372 }; 396 };
373 397
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
index 260b264c86..db56a02b74 100644
--- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
+++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
@@ -56,8 +56,12 @@
56 #size-cells = <1>; 56 #size-cells = <1>;
57 #interrupt-cells = <2>; 57 #interrupt-cells = <2>;
58 device_type = "soc"; 58 device_type = "soc";
59 ranges = <0 f8000000 00100000>; 59 ranges = <00001000 f8001000 000ff000
60 reg = <f8000000 00100000>; // CCSRBAR 1M 60 80000000 80000000 20000000
61 e2000000 e2000000 00100000
62 a0000000 a0000000 20000000
63 e3000000 e3000000 00100000>;
64 reg = <f8000000 00001000>; // CCSRBAR
61 bus-frequency = <0>; 65 bus-frequency = <0>;
62 66
63 i2c@3000 { 67 i2c@3000 {
@@ -86,25 +90,25 @@
86 reg = <24520 20>; 90 reg = <24520 20>;
87 phy0: ethernet-phy@0 { 91 phy0: ethernet-phy@0 {
88 interrupt-parent = <&mpic>; 92 interrupt-parent = <&mpic>;
89 interrupts = <4a 1>; 93 interrupts = <a 1>;
90 reg = <0>; 94 reg = <0>;
91 device_type = "ethernet-phy"; 95 device_type = "ethernet-phy";
92 }; 96 };
93 phy1: ethernet-phy@1 { 97 phy1: ethernet-phy@1 {
94 interrupt-parent = <&mpic>; 98 interrupt-parent = <&mpic>;
95 interrupts = <4a 1>; 99 interrupts = <a 1>;
96 reg = <1>; 100 reg = <1>;
97 device_type = "ethernet-phy"; 101 device_type = "ethernet-phy";
98 }; 102 };
99 phy2: ethernet-phy@2 { 103 phy2: ethernet-phy@2 {
100 interrupt-parent = <&mpic>; 104 interrupt-parent = <&mpic>;
101 interrupts = <4a 1>; 105 interrupts = <a 1>;
102 reg = <2>; 106 reg = <2>;
103 device_type = "ethernet-phy"; 107 device_type = "ethernet-phy";
104 }; 108 };
105 phy3: ethernet-phy@3 { 109 phy3: ethernet-phy@3 {
106 interrupt-parent = <&mpic>; 110 interrupt-parent = <&mpic>;
107 interrupts = <4a 1>; 111 interrupts = <a 1>;
108 reg = <3>; 112 reg = <3>;
109 device_type = "ethernet-phy"; 113 device_type = "ethernet-phy";
110 }; 114 };
@@ -117,7 +121,13 @@
117 model = "TSEC"; 121 model = "TSEC";
118 compatible = "gianfar"; 122 compatible = "gianfar";
119 reg = <24000 1000>; 123 reg = <24000 1000>;
120 mac-address = [ 00 E0 0C 00 73 00 ]; 124 /*
125 * mac-address is deprecated and will be removed
126 * in 2.6.25. Only recent versions of
127 * U-Boot support local-mac-address, however.
128 */
129 mac-address = [ 00 00 00 00 00 00 ];
130 local-mac-address = [ 00 00 00 00 00 00 ];
121 interrupts = <1d 2 1e 2 22 2>; 131 interrupts = <1d 2 1e 2 22 2>;
122 interrupt-parent = <&mpic>; 132 interrupt-parent = <&mpic>;
123 phy-handle = <&phy0>; 133 phy-handle = <&phy0>;
@@ -130,7 +140,13 @@
130 model = "TSEC"; 140 model = "TSEC";
131 compatible = "gianfar"; 141 compatible = "gianfar";
132 reg = <25000 1000>; 142 reg = <25000 1000>;
133 mac-address = [ 00 E0 0C 00 73 01 ]; 143 /*
144 * mac-address is deprecated and will be removed
145 * in 2.6.25. Only recent versions of
146 * U-Boot support local-mac-address, however.
147 */
148 mac-address = [ 00 00 00 00 00 00 ];
149 local-mac-address = [ 00 00 00 00 00 00 ];
134 interrupts = <23 2 24 2 28 2>; 150 interrupts = <23 2 24 2 28 2>;
135 interrupt-parent = <&mpic>; 151 interrupt-parent = <&mpic>;
136 phy-handle = <&phy1>; 152 phy-handle = <&phy1>;
@@ -143,7 +159,13 @@
143 model = "TSEC"; 159 model = "TSEC";
144 compatible = "gianfar"; 160 compatible = "gianfar";
145 reg = <26000 1000>; 161 reg = <26000 1000>;
146 mac-address = [ 00 E0 0C 00 02 FD ]; 162 /*
163 * mac-address is deprecated and will be removed
164 * in 2.6.25. Only recent versions of
165 * U-Boot support local-mac-address, however.
166 */
167 mac-address = [ 00 00 00 00 00 00 ];
168 local-mac-address = [ 00 00 00 00 00 00 ];
147 interrupts = <1F 2 20 2 21 2>; 169 interrupts = <1F 2 20 2 21 2>;
148 interrupt-parent = <&mpic>; 170 interrupt-parent = <&mpic>;
149 phy-handle = <&phy2>; 171 phy-handle = <&phy2>;
@@ -156,7 +178,13 @@
156 model = "TSEC"; 178 model = "TSEC";
157 compatible = "gianfar"; 179 compatible = "gianfar";
158 reg = <27000 1000>; 180 reg = <27000 1000>;
159 mac-address = [ 00 E0 0C 00 03 FD ]; 181 /*
182 * mac-address is deprecated and will be removed
183 * in 2.6.25. Only recent versions of
184 * U-Boot support local-mac-address, however.
185 */
186 mac-address = [ 00 00 00 00 00 00 ];
187 local-mac-address = [ 00 00 00 00 00 00 ];
160 interrupts = <25 2 26 2 27 2>; 188 interrupts = <25 2 26 2 27 2>;
161 interrupt-parent = <&mpic>; 189 interrupt-parent = <&mpic>;
162 phy-handle = <&phy3>; 190 phy-handle = <&phy3>;
@@ -186,7 +214,7 @@
186 #size-cells = <2>; 214 #size-cells = <2>;
187 #address-cells = <3>; 215 #address-cells = <3>;
188 reg = <8000 1000>; 216 reg = <8000 1000>;
189 bus-range = <0 fe>; 217 bus-range = <0 ff>;
190 ranges = <02000000 0 80000000 80000000 0 20000000 218 ranges = <02000000 0 80000000 80000000 0 20000000
191 01000000 0 00000000 e2000000 0 00100000>; 219 01000000 0 00000000 e2000000 0 00100000>;
192 clock-frequency = <1fca055>; 220 clock-frequency = <1fca055>;
@@ -285,17 +313,84 @@
285 f800 0 0 3 &i8259 0 0 313 f800 0 0 3 &i8259 0 0
286 f800 0 0 4 &i8259 0 0 314 f800 0 0 4 &i8259 0 0
287 >; 315 >;
288 i8259: i8259@4d0 { 316 uli1575@0 {
289 clock-frequency = <0>; 317 reg = <0 0 0 0 0>;
290 interrupt-controller; 318 #size-cells = <2>;
291 device_type = "interrupt-controller"; 319 #address-cells = <3>;
292 #address-cells = <0>; 320 ranges = <02000000 0 80000000
293 #interrupt-cells = <2>; 321 02000000 0 80000000
294 built-in; 322 0 20000000
295 compatible = "chrp,iic"; 323 01000000 0 00000000
296 big-endian; 324 01000000 0 00000000
297 interrupts = <49 2>; 325 0 00100000>;
298 interrupt-parent = <&mpic>; 326
327 pci_bridge@0 {
328 reg = <0 0 0 0 0>;
329 #size-cells = <2>;
330 #address-cells = <3>;
331 ranges = <02000000 0 80000000
332 02000000 0 80000000
333 0 20000000
334 01000000 0 00000000
335 01000000 0 00000000
336 0 00100000>;
337
338 isa@1e {
339 device_type = "isa";
340 #interrupt-cells = <2>;
341 #size-cells = <1>;
342 #address-cells = <2>;
343 reg = <f000 0 0 0 0>;
344 ranges = <1 0 01000000 0 0
345 00001000>;
346 interrupt-parent = <&i8259>;
347
348 i8259: interrupt-controller@20 {
349 reg = <1 20 2
350 1 a0 2
351 1 4d0 2>;
352 clock-frequency = <0>;
353 interrupt-controller;
354 device_type = "interrupt-controller";
355 #address-cells = <0>;
356 #interrupt-cells = <2>;
357 built-in;
358 compatible = "chrp,iic";
359 interrupts = <9 2>;
360 interrupt-parent =
361 <&mpic>;
362 };
363
364 i8042@60 {
365 #size-cells = <0>;
366 #address-cells = <1>;
367 reg = <1 60 1 1 64 1>;
368 interrupts = <1 3 c 3>;
369 interrupt-parent =
370 <&i8259>;
371
372 keyboard@0 {
373 reg = <0>;
374 compatible = "pnpPNP,303";
375 };
376
377 mouse@1 {
378 reg = <1>;
379 compatible = "pnpPNP,f03";
380 };
381 };
382
383 rtc@70 {
384 compatible =
385 "pnpPNP,b00";
386 reg = <1 70 2>;
387 };
388
389 gpio@400 {
390 reg = <1 400 80>;
391 };
392 };
393 };
299 }; 394 };
300 395
301 }; 396 };
@@ -316,10 +411,10 @@
316 interrupt-map-mask = <f800 0 0 7>; 411 interrupt-map-mask = <f800 0 0 7>;
317 interrupt-map = < 412 interrupt-map = <
318 /* IDSEL 0x0 */ 413 /* IDSEL 0x0 */
319 0000 0 0 1 &mpic 44 1 414 0000 0 0 1 &mpic 4 1
320 0000 0 0 2 &mpic 45 1 415 0000 0 0 2 &mpic 5 1
321 0000 0 0 3 &mpic 46 1 416 0000 0 0 3 &mpic 6 1
322 0000 0 0 4 &mpic 47 1 417 0000 0 0 4 &mpic 7 1
323 >; 418 >;
324 }; 419 };
325 420
diff --git a/arch/powerpc/boot/dts/mpc866ads.dts b/arch/powerpc/boot/dts/mpc866ads.dts
index c0d06fd129..e5e7726ddb 100644
--- a/arch/powerpc/boot/dts/mpc866ads.dts
+++ b/arch/powerpc/boot/dts/mpc866ads.dts
@@ -15,12 +15,10 @@
15 compatible = "mpc8xx"; 15 compatible = "mpc8xx";
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 #address-cells = <1>; 20 #address-cells = <1>;
22 #size-cells = <0>; 21 #size-cells = <0>;
23 linux,phandle = <200>;
24 22
25 PowerPC,866@0 { 23 PowerPC,866@0 {
26 device_type = "cpu"; 24 device_type = "cpu";
@@ -34,14 +32,12 @@
34 clock-frequency = <0>; 32 clock-frequency = <0>;
35 32-bit; 33 32-bit;
36 interrupts = <f 2>; // decrementer interrupt 34 interrupts = <f 2>; // decrementer interrupt
37 interrupt-parent = <ff000000>; 35 interrupt-parent = <&Mpc8xx_pic>;
38 linux,phandle = <201>;
39 }; 36 };
40 }; 37 };
41 38
42 memory { 39 memory {
43 device_type = "memory"; 40 device_type = "memory";
44 linux,phandle = <300>;
45 reg = <00000000 800000>; 41 reg = <00000000 800000>;
46 }; 42 };
47 43
@@ -57,11 +53,9 @@
57 device_type = "mdio"; 53 device_type = "mdio";
58 compatible = "fs_enet"; 54 compatible = "fs_enet";
59 reg = <e80 8>; 55 reg = <e80 8>;
60 linux,phandle = <e80>;
61 #address-cells = <1>; 56 #address-cells = <1>;
62 #size-cells = <0>; 57 #size-cells = <0>;
63 ethernet-phy@f { 58 phy: ethernet-phy@f {
64 linux,phandle = <e800f>;
65 reg = <f>; 59 reg = <f>;
66 device_type = "ethernet-phy"; 60 device_type = "ethernet-phy";
67 }; 61 };
@@ -75,12 +69,11 @@
75 reg = <e00 188>; 69 reg = <e00 188>;
76 mac-address = [ 00 00 0C 00 01 FD ]; 70 mac-address = [ 00 00 0C 00 01 FD ];
77 interrupts = <3 1>; 71 interrupts = <3 1>;
78 interrupt-parent = <ff000000>; 72 interrupt-parent = <&Mpc8xx_pic>;
79 phy-handle = <e800f>; 73 phy-handle = <&Phy>;
80 }; 74 };
81 75
82 pic@ff000000 { 76 mpc8xx_pic: pic@ff000000 {
83 linux,phandle = <ff000000>;
84 interrupt-controller; 77 interrupt-controller;
85 #address-cells = <0>; 78 #address-cells = <0>;
86 #interrupt-cells = <2>; 79 #interrupt-cells = <2>;
@@ -91,7 +84,6 @@
91 }; 84 };
92 85
93 cpm@ff000000 { 86 cpm@ff000000 {
94 linux,phandle = <ff000000>;
95 #address-cells = <1>; 87 #address-cells = <1>;
96 #size-cells = <1>; 88 #size-cells = <1>;
97 #interrupt-cells = <2>; 89 #interrupt-cells = <2>;
@@ -102,15 +94,14 @@
102 command-proc = <9c0>; 94 command-proc = <9c0>;
103 brg-frequency = <0>; 95 brg-frequency = <0>;
104 interrupts = <0 2>; // cpm error interrupt 96 interrupts = <0 2>; // cpm error interrupt
105 interrupt-parent = <930>; 97 interrupt-parent = <&Cpm_pic>;
106 98
107 pic@930 { 99 cpm_pic: pic@930 {
108 linux,phandle = <930>;
109 interrupt-controller; 100 interrupt-controller;
110 #address-cells = <0>; 101 #address-cells = <0>;
111 #interrupt-cells = <2>; 102 #interrupt-cells = <2>;
112 interrupts = <5 2 0 2>; 103 interrupts = <5 2 0 2>;
113 interrupt-parent = <ff000000>; 104 interrupt-parent = <&Mpc8xx_pic>;
114 reg = <930 20>; 105 reg = <930 20>;
115 built-in; 106 built-in;
116 device_type = "cpm-pic"; 107 device_type = "cpm-pic";
@@ -128,7 +119,7 @@
128 tx-clock = <1>; 119 tx-clock = <1>;
129 current-speed = <0>; 120 current-speed = <0>;
130 interrupts = <4 3>; 121 interrupts = <4 3>;
131 interrupt-parent = <930>; 122 interrupt-parent = <&Cpm_pic>;
132 }; 123 };
133 124
134 smc@a90 { 125 smc@a90 {
@@ -142,7 +133,7 @@
142 tx-clock = <2>; 133 tx-clock = <2>;
143 current-speed = <0>; 134 current-speed = <0>;
144 interrupts = <3 3>; 135 interrupts = <3 3>;
145 interrupt-parent = <930>; 136 interrupt-parent = <&Cpm_pic>;
146 }; 137 };
147 138
148 scc@a00 { 139 scc@a00 {
@@ -153,7 +144,7 @@
153 reg = <a00 18 3c00 80>; 144 reg = <a00 18 3c00 80>;
154 mac-address = [ 00 00 0C 00 03 FD ]; 145 mac-address = [ 00 00 0C 00 03 FD ];
155 interrupts = <1e 3>; 146 interrupts = <1e 3>;
156 interrupt-parent = <930>; 147 interrupt-parent = <&Cpm_pic>;
157 }; 148 };
158 }; 149 };
159 }; 150 };
diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts
index 110bf61706..dc7ab9c806 100644
--- a/arch/powerpc/boot/dts/mpc885ads.dts
+++ b/arch/powerpc/boot/dts/mpc885ads.dts
@@ -15,12 +15,10 @@
15 compatible = "mpc8xx"; 15 compatible = "mpc8xx";
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 #address-cells = <1>; 20 #address-cells = <1>;
22 #size-cells = <0>; 21 #size-cells = <0>;
23 linux,phandle = <200>;
24 22
25 PowerPC,885@0 { 23 PowerPC,885@0 {
26 device_type = "cpu"; 24 device_type = "cpu";
@@ -34,14 +32,12 @@
34 clock-frequency = <0>; 32 clock-frequency = <0>;
35 32-bit; 33 32-bit;
36 interrupts = <f 2>; // decrementer interrupt 34 interrupts = <f 2>; // decrementer interrupt
37 interrupt-parent = <ff000000>; 35 interrupt-parent = <&Mpc8xx_pic>;
38 linux,phandle = <201>;
39 }; 36 };
40 }; 37 };
41 38
42 memory { 39 memory {
43 device_type = "memory"; 40 device_type = "memory";
44 linux,phandle = <300>;
45 reg = <00000000 800000>; 41 reg = <00000000 800000>;
46 }; 42 };
47 43
@@ -57,21 +53,17 @@
57 device_type = "mdio"; 53 device_type = "mdio";
58 compatible = "fs_enet"; 54 compatible = "fs_enet";
59 reg = <e80 8>; 55 reg = <e80 8>;
60 linux,phandle = <e80>;
61 #address-cells = <1>; 56 #address-cells = <1>;
62 #size-cells = <0>; 57 #size-cells = <0>;
63 ethernet-phy@0 { 58 Phy0: ethernet-phy@0 {
64 linux,phandle = <e8000>;
65 reg = <0>; 59 reg = <0>;
66 device_type = "ethernet-phy"; 60 device_type = "ethernet-phy";
67 }; 61 };
68 ethernet-phy@1 { 62 Phy1: ethernet-phy@1 {
69 linux,phandle = <e8001>;
70 reg = <1>; 63 reg = <1>;
71 device_type = "ethernet-phy"; 64 device_type = "ethernet-phy";
72 }; 65 };
73 ethernet-phy@2 { 66 Phy2: ethernet-phy@2 {
74 linux,phandle = <e8002>;
75 reg = <2>; 67 reg = <2>;
76 device_type = "ethernet-phy"; 68 device_type = "ethernet-phy";
77 }; 69 };
@@ -85,8 +77,8 @@
85 reg = <e00 188>; 77 reg = <e00 188>;
86 mac-address = [ 00 00 0C 00 01 FD ]; 78 mac-address = [ 00 00 0C 00 01 FD ];
87 interrupts = <3 1>; 79 interrupts = <3 1>;
88 interrupt-parent = <ff000000>; 80 interrupt-parent = <&Mpc8xx_pic>;
89 phy-handle = <e8000>; 81 phy-handle = <&Phy1>;
90 }; 82 };
91 83
92 fec@1e00 { 84 fec@1e00 {
@@ -97,12 +89,11 @@
97 reg = <1e00 188>; 89 reg = <1e00 188>;
98 mac-address = [ 00 00 0C 00 02 FD ]; 90 mac-address = [ 00 00 0C 00 02 FD ];
99 interrupts = <7 1>; 91 interrupts = <7 1>;
100 interrupt-parent = <ff000000>; 92 interrupt-parent = <&Mpc8xx_pic>;
101 phy-handle = <e8001>; 93 phy-handle = <&Phy2>;
102 }; 94 };
103 95
104 pic@ff000000 { 96 Mpc8xx_pic: pic@ff000000 {
105 linux,phandle = <ff000000>;
106 interrupt-controller; 97 interrupt-controller;
107 #address-cells = <0>; 98 #address-cells = <0>;
108 #interrupt-cells = <2>; 99 #interrupt-cells = <2>;
@@ -112,8 +103,18 @@
112 compatible = "CPM"; 103 compatible = "CPM";
113 }; 104 };
114 105
106 pcmcia@0080 {
107 #address-cells = <3>;
108 #interrupt-cells = <1>;
109 #size-cells = <2>;
110 compatible = "fsl,pq-pcmcia";
111 device_type = "pcmcia";
112 reg = <80 80>;
113 interrupt-parent = <&Mpc8xx_pic>;
114 interrupts = <d 1>;
115 };
116
115 cpm@ff000000 { 117 cpm@ff000000 {
116 linux,phandle = <ff000000>;
117 #address-cells = <1>; 118 #address-cells = <1>;
118 #size-cells = <1>; 119 #size-cells = <1>;
119 #interrupt-cells = <2>; 120 #interrupt-cells = <2>;
@@ -124,15 +125,14 @@
124 command-proc = <9c0>; 125 command-proc = <9c0>;
125 brg-frequency = <0>; 126 brg-frequency = <0>;
126 interrupts = <0 2>; // cpm error interrupt 127 interrupts = <0 2>; // cpm error interrupt
127 interrupt-parent = <930>; 128 interrupt-parent = <&Cpm_pic>;
128 129
129 pic@930 { 130 Cpm_pic: pic@930 {
130 linux,phandle = <930>;
131 interrupt-controller; 131 interrupt-controller;
132 #address-cells = <0>; 132 #address-cells = <0>;
133 #interrupt-cells = <2>; 133 #interrupt-cells = <2>;
134 interrupts = <5 2 0 2>; 134 interrupts = <5 2 0 2>;
135 interrupt-parent = <ff000000>; 135 interrupt-parent = <&Mpc8xx_pic>;
136 reg = <930 20>; 136 reg = <930 20>;
137 built-in; 137 built-in;
138 device_type = "cpm-pic"; 138 device_type = "cpm-pic";
@@ -150,7 +150,7 @@
150 tx-clock = <1>; 150 tx-clock = <1>;
151 current-speed = <0>; 151 current-speed = <0>;
152 interrupts = <4 3>; 152 interrupts = <4 3>;
153 interrupt-parent = <930>; 153 interrupt-parent = <&Cpm_pic>;
154 }; 154 };
155 155
156 smc@a90 { 156 smc@a90 {
@@ -164,7 +164,7 @@
164 tx-clock = <2>; 164 tx-clock = <2>;
165 current-speed = <0>; 165 current-speed = <0>;
166 interrupts = <3 3>; 166 interrupts = <3 3>;
167 interrupt-parent = <930>; 167 interrupt-parent = <&Cpm_pic>;
168 }; 168 };
169 169
170 scc@a40 { 170 scc@a40 {
@@ -175,8 +175,8 @@
175 reg = <a40 18 3e00 80>; 175 reg = <a40 18 3e00 80>;
176 mac-address = [ 00 00 0C 00 03 FD ]; 176 mac-address = [ 00 00 0C 00 03 FD ];
177 interrupts = <1c 3>; 177 interrupts = <1c 3>;
178 interrupt-parent = <930>; 178 interrupt-parent = <&Cpm_pic>;
179 phy-handle = <e8002>; 179 phy-handle = <&Phy2>;
180 }; 180 };
181 }; 181 };
182 }; 182 };
diff --git a/arch/powerpc/boot/dts/prpmc2800.dts b/arch/powerpc/boot/dts/prpmc2800.dts
index 568965a022..699d0df574 100644
--- a/arch/powerpc/boot/dts/prpmc2800.dts
+++ b/arch/powerpc/boot/dts/prpmc2800.dts
@@ -309,7 +309,7 @@
309 }; 309 };
310 310
311 chosen { 311 chosen {
312 bootargs = "ip=on console=ttyMM0"; 312 bootargs = "ip=on";
313 linux,stdout-path = "/mv64x60@f1000000/mpsc@8000"; 313 linux,stdout-path = "/mv64x60@f1000000/mpsc@8000";
314 }; 314 };
315}; 315};
diff --git a/arch/powerpc/boot/dts/ps3.dts b/arch/powerpc/boot/dts/ps3.dts
new file mode 100644
index 0000000000..379ded282d
--- /dev/null
+++ b/arch/powerpc/boot/dts/ps3.dts
@@ -0,0 +1,68 @@
1/*
2 * PS3 Game Console device tree.
3 *
4 * Copyright (C) 2007 Sony Computer Entertainment Inc.
5 * Copyright 2007 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/ {
22 model = "SonyPS3";
23 compatible = "sony,ps3";
24 #size-cells = <2>;
25 #address-cells = <2>;
26
27 chosen {
28 };
29
30 /*
31 * We'll get the size of the bootmem block from lv1 after startup,
32 * so we'll put a null entry here.
33 */
34
35 memory {
36 device_type = "memory";
37 reg = <0 0 0 0>;
38 };
39
40 /*
41 * The boot cpu is always zero for PS3.
42 *
43 * dtc expects a clock-frequency and timebase-frequency entries, so
44 * we'll put a null entries here. These will be initialized after
45 * startup with data from lv1.
46 *
47 * Seems the only way currently to indicate a processor has multiple
48 * threads is with an ibm,ppc-interrupt-server#s entry. We'll put one
49 * here so we can bring up both of ours. See smp_setup_cpu_maps().
50 */
51
52 cpus {
53 #size-cells = <0>;
54 #address-cells = <1>;
55
56 cpu@0 {
57 device_type = "cpu";
58 reg = <0>;
59 ibm,ppc-interrupt-server#s = <0 1>;
60 clock-frequency = <0>;
61 timebase-frequency = <0>;
62 i-cache-size = <8000>;
63 d-cache-size = <8000>;
64 i-cache-line-size = <80>;
65 d-cache-line-size = <80>;
66 };
67 };
68};
diff --git a/arch/powerpc/boot/ebony.c b/arch/powerpc/boot/ebony.c
index b1251ee7a1..75daedafd0 100644
--- a/arch/powerpc/boot/ebony.c
+++ b/arch/powerpc/boot/ebony.c
@@ -100,28 +100,13 @@ static void ebony_fixups(void)
100 ibm440gp_fixup_clocks(sysclk, 6 * 1843200); 100 ibm440gp_fixup_clocks(sysclk, 6 * 1843200);
101 ibm44x_fixup_memsize(); 101 ibm44x_fixup_memsize();
102 dt_fixup_mac_addresses(ebony_mac0, ebony_mac1); 102 dt_fixup_mac_addresses(ebony_mac0, ebony_mac1);
103} 103 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
104
105#define SPRN_DBCR0 0x134
106#define DBCR0_RST_SYSTEM 0x30000000
107
108static void ebony_exit(void)
109{
110 unsigned long tmp;
111
112 asm volatile (
113 "mfspr %0,%1\n"
114 "oris %0,%0,%2@h\n"
115 "mtspr %1,%0"
116 : "=&r"(tmp) : "i"(SPRN_DBCR0), "i"(DBCR0_RST_SYSTEM)
117 );
118
119} 104}
120 105
121void ebony_init(void *mac0, void *mac1) 106void ebony_init(void *mac0, void *mac1)
122{ 107{
123 platform_ops.fixups = ebony_fixups; 108 platform_ops.fixups = ebony_fixups;
124 platform_ops.exit = ebony_exit; 109 platform_ops.exit = ibm44x_dbcr_reset;
125 ebony_mac0 = mac0; 110 ebony_mac0 = mac0;
126 ebony_mac1 = mac1; 111 ebony_mac1 = mac1;
127 ft_init(_dtb_start, _dtb_end - _dtb_start, 32); 112 ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c
index 56b56a8d4b..416dc3857b 100644
--- a/arch/powerpc/boot/main.c
+++ b/arch/powerpc/boot/main.c
@@ -36,8 +36,6 @@ struct addr_range {
36 unsigned long size; 36 unsigned long size;
37}; 37};
38 38
39typedef void (*kernel_entry_t)(unsigned long, unsigned long, void *);
40
41#undef DEBUG 39#undef DEBUG
42 40
43static struct addr_range prep_kernel(void) 41static struct addr_range prep_kernel(void)
diff --git a/arch/powerpc/boot/of.c b/arch/powerpc/boot/of.c
index d16ee3e3f8..385e08b83b 100644
--- a/arch/powerpc/boot/of.c
+++ b/arch/powerpc/boot/of.c
@@ -15,8 +15,7 @@
15#include "page.h" 15#include "page.h"
16#include "ops.h" 16#include "ops.h"
17 17
18typedef void *ihandle; 18#include "of.h"
19typedef void *phandle;
20 19
21extern char _end[]; 20extern char _end[];
22 21
@@ -25,154 +24,10 @@ extern char _end[];
25#define RAM_END (512<<20) /* Fixme: use OF */ 24#define RAM_END (512<<20) /* Fixme: use OF */
26#define ONE_MB 0x100000 25#define ONE_MB 0x100000
27 26
28int (*prom) (void *);
29 27
30 28
31static unsigned long claim_base; 29static unsigned long claim_base;
32 30
33static int call_prom(const char *service, int nargs, int nret, ...)
34{
35 int i;
36 struct prom_args {
37 const char *service;
38 int nargs;
39 int nret;
40 unsigned int args[12];
41 } args;
42 va_list list;
43
44 args.service = service;
45 args.nargs = nargs;
46 args.nret = nret;
47
48 va_start(list, nret);
49 for (i = 0; i < nargs; i++)
50 args.args[i] = va_arg(list, unsigned int);
51 va_end(list);
52
53 for (i = 0; i < nret; i++)
54 args.args[nargs+i] = 0;
55
56 if (prom(&args) < 0)
57 return -1;
58
59 return (nret > 0)? args.args[nargs]: 0;
60}
61
62static int call_prom_ret(const char *service, int nargs, int nret,
63 unsigned int *rets, ...)
64{
65 int i;
66 struct prom_args {
67 const char *service;
68 int nargs;
69 int nret;
70 unsigned int args[12];
71 } args;
72 va_list list;
73
74 args.service = service;
75 args.nargs = nargs;
76 args.nret = nret;
77
78 va_start(list, rets);
79 for (i = 0; i < nargs; i++)
80 args.args[i] = va_arg(list, unsigned int);
81 va_end(list);
82
83 for (i = 0; i < nret; i++)
84 args.args[nargs+i] = 0;
85
86 if (prom(&args) < 0)
87 return -1;
88
89 if (rets != (void *) 0)
90 for (i = 1; i < nret; ++i)
91 rets[i-1] = args.args[nargs+i];
92
93 return (nret > 0)? args.args[nargs]: 0;
94}
95
96/*
97 * Older OF's require that when claiming a specific range of addresses,
98 * we claim the physical space in the /memory node and the virtual
99 * space in the chosen mmu node, and then do a map operation to
100 * map virtual to physical.
101 */
102static int need_map = -1;
103static ihandle chosen_mmu;
104static phandle memory;
105
106/* returns true if s2 is a prefix of s1 */
107static int string_match(const char *s1, const char *s2)
108{
109 for (; *s2; ++s2)
110 if (*s1++ != *s2)
111 return 0;
112 return 1;
113}
114
115static int check_of_version(void)
116{
117 phandle oprom, chosen;
118 char version[64];
119
120 oprom = finddevice("/openprom");
121 if (oprom == (phandle) -1)
122 return 0;
123 if (getprop(oprom, "model", version, sizeof(version)) <= 0)
124 return 0;
125 version[sizeof(version)-1] = 0;
126 printf("OF version = '%s'\r\n", version);
127 if (!string_match(version, "Open Firmware, 1.")
128 && !string_match(version, "FirmWorks,3."))
129 return 0;
130 chosen = finddevice("/chosen");
131 if (chosen == (phandle) -1) {
132 chosen = finddevice("/chosen@0");
133 if (chosen == (phandle) -1) {
134 printf("no chosen\n");
135 return 0;
136 }
137 }
138 if (getprop(chosen, "mmu", &chosen_mmu, sizeof(chosen_mmu)) <= 0) {
139 printf("no mmu\n");
140 return 0;
141 }
142 memory = (ihandle) call_prom("open", 1, 1, "/memory");
143 if (memory == (ihandle) -1) {
144 memory = (ihandle) call_prom("open", 1, 1, "/memory@0");
145 if (memory == (ihandle) -1) {
146 printf("no memory node\n");
147 return 0;
148 }
149 }
150 printf("old OF detected\r\n");
151 return 1;
152}
153
154static void *claim(unsigned long virt, unsigned long size, unsigned long align)
155{
156 int ret;
157 unsigned int result;
158
159 if (need_map < 0)
160 need_map = check_of_version();
161 if (align || !need_map)
162 return (void *) call_prom("claim", 3, 1, virt, size, align);
163
164 ret = call_prom_ret("call-method", 5, 2, &result, "claim", memory,
165 align, size, virt);
166 if (ret != 0 || result == -1)
167 return (void *) -1;
168 ret = call_prom_ret("call-method", 5, 2, &result, "claim", chosen_mmu,
169 align, size, virt);
170 /* 0x12 == coherent + read/write */
171 ret = call_prom("call-method", 6, 1, "map", chosen_mmu,
172 0x12, size, virt, virt);
173 return (void *) virt;
174}
175
176static void *of_try_claim(unsigned long size) 31static void *of_try_claim(unsigned long size)
177{ 32{
178 unsigned long addr = 0; 33 unsigned long addr = 0;
@@ -184,7 +39,7 @@ static void *of_try_claim(unsigned long size)
184#ifdef DEBUG 39#ifdef DEBUG
185 printf(" trying: 0x%08lx\n\r", claim_base); 40 printf(" trying: 0x%08lx\n\r", claim_base);
186#endif 41#endif
187 addr = (unsigned long)claim(claim_base, size, 0); 42 addr = (unsigned long)of_claim(claim_base, size, 0);
188 if ((void *)addr != (void *)-1) 43 if ((void *)addr != (void *)-1)
189 break; 44 break;
190 } 45 }
@@ -208,64 +63,6 @@ static void of_image_hdr(const void *hdr)
208 } 63 }
209} 64}
210 65
211static void *of_vmlinux_alloc(unsigned long size)
212{
213 void *p = malloc(size);
214
215 if (!p)
216 fatal("Can't allocate memory for kernel image!\n\r");
217
218 return p;
219}
220
221static void of_exit(void)
222{
223 call_prom("exit", 0, 0);
224}
225
226/*
227 * OF device tree routines
228 */
229static void *of_finddevice(const char *name)
230{
231 return (phandle) call_prom("finddevice", 1, 1, name);
232}
233
234static int of_getprop(const void *phandle, const char *name, void *buf,
235 const int buflen)
236{
237 return call_prom("getprop", 4, 1, phandle, name, buf, buflen);
238}
239
240static int of_setprop(const void *phandle, const char *name, const void *buf,
241 const int buflen)
242{
243 return call_prom("setprop", 4, 1, phandle, name, buf, buflen);
244}
245
246/*
247 * OF console routines
248 */
249static void *of_stdout_handle;
250
251static int of_console_open(void)
252{
253 void *devp;
254
255 if (((devp = finddevice("/chosen")) != NULL)
256 && (getprop(devp, "stdout", &of_stdout_handle,
257 sizeof(of_stdout_handle))
258 == sizeof(of_stdout_handle)))
259 return 0;
260
261 return -1;
262}
263
264static void of_console_write(char *buf, int len)
265{
266 call_prom("write", 3, 1, of_stdout_handle, buf, len);
267}
268
269void platform_init(unsigned long a1, unsigned long a2, void *promptr) 66void platform_init(unsigned long a1, unsigned long a2, void *promptr)
270{ 67{
271 platform_ops.image_hdr = of_image_hdr; 68 platform_ops.image_hdr = of_image_hdr;
@@ -277,10 +74,9 @@ void platform_init(unsigned long a1, unsigned long a2, void *promptr)
277 dt_ops.getprop = of_getprop; 74 dt_ops.getprop = of_getprop;
278 dt_ops.setprop = of_setprop; 75 dt_ops.setprop = of_setprop;
279 76
280 console_ops.open = of_console_open; 77 of_console_init();
281 console_ops.write = of_console_write;
282 78
283 prom = (int (*)(void *))promptr; 79 of_init(promptr);
284 loader_info.promptr = promptr; 80 loader_info.promptr = promptr;
285 if (a1 && a2 && a2 != 0xdeadbeef) { 81 if (a1 && a2 && a2 != 0xdeadbeef) {
286 loader_info.initrd_addr = a1; 82 loader_info.initrd_addr = a1;
diff --git a/arch/powerpc/boot/of.h b/arch/powerpc/boot/of.h
new file mode 100644
index 0000000000..e4c68f7391
--- /dev/null
+++ b/arch/powerpc/boot/of.h
@@ -0,0 +1,21 @@
1#ifndef _PPC_BOOT_OF_H_
2#define _PPC_BOOT_OF_H_
3
4typedef void *phandle;
5typedef void *ihandle;
6
7void of_init(void *promptr);
8int of_call_prom(const char *service, int nargs, int nret, ...);
9void *of_claim(unsigned long virt, unsigned long size, unsigned long align);
10void *of_vmlinux_alloc(unsigned long size);
11void of_exit(void);
12void *of_finddevice(const char *name);
13int of_getprop(const void *phandle, const char *name, void *buf,
14 const int buflen);
15int of_setprop(const void *phandle, const char *name, const void *buf,
16 const int buflen);
17
18/* Console functions */
19void of_console_init(void);
20
21#endif /* _PPC_BOOT_OF_H_ */
diff --git a/arch/powerpc/boot/ofconsole.c b/arch/powerpc/boot/ofconsole.c
new file mode 100644
index 0000000000..ce0e024244
--- /dev/null
+++ b/arch/powerpc/boot/ofconsole.c
@@ -0,0 +1,45 @@
1/*
2 * OF console routines
3 *
4 * Copyright (C) Paul Mackerras 1997.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11#include <stddef.h>
12#include "types.h"
13#include "elf.h"
14#include "string.h"
15#include "stdio.h"
16#include "page.h"
17#include "ops.h"
18
19#include "of.h"
20
21static void *of_stdout_handle;
22
23static int of_console_open(void)
24{
25 void *devp;
26
27 if (((devp = of_finddevice("/chosen")) != NULL)
28 && (of_getprop(devp, "stdout", &of_stdout_handle,
29 sizeof(of_stdout_handle))
30 == sizeof(of_stdout_handle)))
31 return 0;
32
33 return -1;
34}
35
36static void of_console_write(const char *buf, int len)
37{
38 of_call_prom("write", 3, 1, of_stdout_handle, buf, len);
39}
40
41void of_console_init(void)
42{
43 console_ops.open = of_console_open;
44 console_ops.write = of_console_write;
45}
diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc/boot/oflib.c
new file mode 100644
index 0000000000..95b8fd69a4
--- /dev/null
+++ b/arch/powerpc/boot/oflib.c
@@ -0,0 +1,202 @@
1/*
2 * Copyright (C) Paul Mackerras 1997.
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#include <stddef.h>
10#include "types.h"
11#include "elf.h"
12#include "string.h"
13#include "stdio.h"
14#include "page.h"
15#include "ops.h"
16
17#include "of.h"
18
19static int (*prom) (void *);
20
21void of_init(void *promptr)
22{
23 prom = (int (*)(void *))promptr;
24}
25
26int of_call_prom(const char *service, int nargs, int nret, ...)
27{
28 int i;
29 struct prom_args {
30 const char *service;
31 int nargs;
32 int nret;
33 unsigned int args[12];
34 } args;
35 va_list list;
36
37 args.service = service;
38 args.nargs = nargs;
39 args.nret = nret;
40
41 va_start(list, nret);
42 for (i = 0; i < nargs; i++)
43 args.args[i] = va_arg(list, unsigned int);
44 va_end(list);
45
46 for (i = 0; i < nret; i++)
47 args.args[nargs+i] = 0;
48
49 if (prom(&args) < 0)
50 return -1;
51
52 return (nret > 0)? args.args[nargs]: 0;
53}
54
55static int of_call_prom_ret(const char *service, int nargs, int nret,
56 unsigned int *rets, ...)
57{
58 int i;
59 struct prom_args {
60 const char *service;
61 int nargs;
62 int nret;
63 unsigned int args[12];
64 } args;
65 va_list list;
66
67 args.service = service;
68 args.nargs = nargs;
69 args.nret = nret;
70
71 va_start(list, rets);
72 for (i = 0; i < nargs; i++)
73 args.args[i] = va_arg(list, unsigned int);
74 va_end(list);
75
76 for (i = 0; i < nret; i++)
77 args.args[nargs+i] = 0;
78
79 if (prom(&args) < 0)
80 return -1;
81
82 if (rets != (void *) 0)
83 for (i = 1; i < nret; ++i)
84 rets[i-1] = args.args[nargs+i];
85
86 return (nret > 0)? args.args[nargs]: 0;
87}
88
89/* returns true if s2 is a prefix of s1 */
90static int string_match(const char *s1, const char *s2)
91{
92 for (; *s2; ++s2)
93 if (*s1++ != *s2)
94 return 0;
95 return 1;
96}
97
98/*
99 * Older OF's require that when claiming a specific range of addresses,
100 * we claim the physical space in the /memory node and the virtual
101 * space in the chosen mmu node, and then do a map operation to
102 * map virtual to physical.
103 */
104static int need_map = -1;
105static ihandle chosen_mmu;
106static phandle memory;
107
108static int check_of_version(void)
109{
110 phandle oprom, chosen;
111 char version[64];
112
113 oprom = of_finddevice("/openprom");
114 if (oprom == (phandle) -1)
115 return 0;
116 if (of_getprop(oprom, "model", version, sizeof(version)) <= 0)
117 return 0;
118 version[sizeof(version)-1] = 0;
119 printf("OF version = '%s'\r\n", version);
120 if (!string_match(version, "Open Firmware, 1.")
121 && !string_match(version, "FirmWorks,3."))
122 return 0;
123 chosen = of_finddevice("/chosen");
124 if (chosen == (phandle) -1) {
125 chosen = of_finddevice("/chosen@0");
126 if (chosen == (phandle) -1) {
127 printf("no chosen\n");
128 return 0;
129 }
130 }
131 if (of_getprop(chosen, "mmu", &chosen_mmu, sizeof(chosen_mmu)) <= 0) {
132 printf("no mmu\n");
133 return 0;
134 }
135 memory = (ihandle) of_call_prom("open", 1, 1, "/memory");
136 if (memory == (ihandle) -1) {
137 memory = (ihandle) of_call_prom("open", 1, 1, "/memory@0");
138 if (memory == (ihandle) -1) {
139 printf("no memory node\n");
140 return 0;
141 }
142 }
143 printf("old OF detected\r\n");
144 return 1;
145}
146
147void *of_claim(unsigned long virt, unsigned long size, unsigned long align)
148{
149 int ret;
150 unsigned int result;
151
152 if (need_map < 0)
153 need_map = check_of_version();
154 if (align || !need_map)
155 return (void *) of_call_prom("claim", 3, 1, virt, size, align);
156
157 ret = of_call_prom_ret("call-method", 5, 2, &result, "claim", memory,
158 align, size, virt);
159 if (ret != 0 || result == -1)
160 return (void *) -1;
161 ret = of_call_prom_ret("call-method", 5, 2, &result, "claim", chosen_mmu,
162 align, size, virt);
163 /* 0x12 == coherent + read/write */
164 ret = of_call_prom("call-method", 6, 1, "map", chosen_mmu,
165 0x12, size, virt, virt);
166 return (void *) virt;
167}
168
169void *of_vmlinux_alloc(unsigned long size)
170{
171 void *p = malloc(size);
172
173 if (!p)
174 fatal("Can't allocate memory for kernel image!\n\r");
175
176 return p;
177}
178
179void of_exit(void)
180{
181 of_call_prom("exit", 0, 0);
182}
183
184/*
185 * OF device tree routines
186 */
187void *of_finddevice(const char *name)
188{
189 return (phandle) of_call_prom("finddevice", 1, 1, name);
190}
191
192int of_getprop(const void *phandle, const char *name, void *buf,
193 const int buflen)
194{
195 return of_call_prom("getprop", 4, 1, phandle, name, buf, buflen);
196}
197
198int of_setprop(const void *phandle, const char *name, const void *buf,
199 const int buflen)
200{
201 return of_call_prom("setprop", 4, 1, phandle, name, buf, buflen);
202}
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h
index 959124f3f9..86077066cd 100644
--- a/arch/powerpc/boot/ops.h
+++ b/arch/powerpc/boot/ops.h
@@ -19,6 +19,8 @@
19#define MAX_PATH_LEN 256 19#define MAX_PATH_LEN 256
20#define MAX_PROP_LEN 256 /* What should this be? */ 20#define MAX_PROP_LEN 256 /* What should this be? */
21 21
22typedef void (*kernel_entry_t)(unsigned long r3, unsigned long r4, void *r5);
23
22/* Platform specific operations */ 24/* Platform specific operations */
23struct platform_ops { 25struct platform_ops {
24 void (*fixups)(void); 26 void (*fixups)(void);
@@ -51,7 +53,7 @@ extern struct dt_ops dt_ops;
51/* Console operations */ 53/* Console operations */
52struct console_ops { 54struct console_ops {
53 int (*open)(void); 55 int (*open)(void);
54 void (*write)(char *buf, int len); 56 void (*write)(const char *buf, int len);
55 void (*edit_cmdline)(char *buf, int len); 57 void (*edit_cmdline)(char *buf, int len);
56 void (*close)(void); 58 void (*close)(void);
57 void *data; 59 void *data;
diff --git a/arch/powerpc/boot/ps3-head.S b/arch/powerpc/boot/ps3-head.S
new file mode 100644
index 0000000000..1a6d64a68d
--- /dev/null
+++ b/arch/powerpc/boot/ps3-head.S
@@ -0,0 +1,80 @@
1/*
2 * PS3 bootwrapper entry.
3 *
4 * Copyright (C) 2007 Sony Computer Entertainment Inc.
5 * Copyright 2007 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 "ppc_asm.h"
22
23 .text
24
25/*
26 * __system_reset_overlay - The PS3 first stage entry.
27 *
28 * The bootwraper build script copies the 0x100 bytes at symbol
29 * __system_reset_overlay to offset 0x100 of the rom image.
30 *
31 * The PS3 has a single processor with two threads.
32 */
33
34 .globl __system_reset_overlay
35__system_reset_overlay:
36
37 /* Switch to 32-bit mode. */
38
39 mfmsr r9
40 clrldi r9,r9,1
41 mtmsrd r9
42 nop
43
44 /* Get thread number in r3 and branch. */
45
46 mfspr r3, 0x88
47 cntlzw. r3, r3
48 li r4, 0
49 li r5, 0
50 beq 1f
51
52 /* Secondary goes to __secondary_hold in kernel. */
53
54 li r4, 0x60
55 mtctr r4
56 bctr
57
58 /* Primary delays then goes to _zimage_start in wrapper. */
591:
60 or 31, 31, 31 /* db16cyc */
61 or 31, 31, 31 /* db16cyc */
62
63 lis r4, _zimage_start@ha
64 addi r4, r4, _zimage_start@l
65 mtctr r4
66 bctr
67
68/*
69 * __system_reset_kernel - Place holder for the kernel reset vector.
70 *
71 * The bootwrapper build script copies 0x100 bytes from offset 0x100
72 * of the rom image to the symbol __system_reset_kernel. At runtime
73 * the bootwrapper program copies the 0x100 bytes at __system_reset_kernel
74 * to ram address 0x100. This symbol must occupy 0x100 bytes.
75 */
76
77 .globl __system_reset_kernel
78__system_reset_kernel:
79
80 . = __system_reset_kernel + 0x100
diff --git a/arch/powerpc/boot/ps3-hvcall.S b/arch/powerpc/boot/ps3-hvcall.S
new file mode 100644
index 0000000000..c8b7df3210
--- /dev/null
+++ b/arch/powerpc/boot/ps3-hvcall.S
@@ -0,0 +1,184 @@
1/*
2 * PS3 bootwrapper hvcalls.
3 *
4 * Copyright (C) 2007 Sony Computer Entertainment Inc.
5 * Copyright 2007 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 "ppc_asm.h"
22
23/*
24 * The PS3 hypervisor uses a 64 bit "C" language calling convention.
25 * The routines here marshal arguments between the 32 bit wrapper
26 * program and the 64 bit hvcalls.
27 *
28 * wrapper lv1
29 * 32-bit (h,l) 64-bit
30 *
31 * 1: r3,r4 <-> r3
32 * 2: r5,r6 <-> r4
33 * 3: r7,r8 <-> r5
34 * 4: r9,r10 <-> r6
35 * 5: 8(r1),12(r1) <-> r7
36 * 6: 16(r1),20(r1) <-> r8
37 * 7: 24(r1),28(r1) <-> r9
38 * 8: 32(r1),36(r1) <-> r10
39 *
40 */
41
42.macro GLOBAL name
43 .section ".text"
44 .balign 4
45 .globl \name
46\name:
47.endm
48
49.macro NO_SUPPORT name
50 GLOBAL \name
51 b ps3_no_support
52.endm
53
54.macro HVCALL num
55 li r11, \num
56 .long 0x44000022
57 extsw r3, r3
58.endm
59
60.macro SAVE_LR offset=4
61 mflr r0
62 stw r0, \offset(r1)
63.endm
64
65.macro LOAD_LR offset=4
66 lwz r0, \offset(r1)
67 mtlr r0
68.endm
69
70.macro LOAD_64_REG target,high,low
71 sldi r11, \high, 32
72 or \target, r11, \low
73.endm
74
75.macro LOAD_64_STACK target,offset
76 ld \target, \offset(r1)
77.endm
78
79.macro LOAD_R3
80 LOAD_64_REG r3,r3,r4
81.endm
82
83.macro LOAD_R4
84 LOAD_64_REG r4,r5,r6
85.endm
86
87.macro LOAD_R5
88 LOAD_64_REG r5,r7,r8
89.endm
90
91.macro LOAD_R6
92 LOAD_64_REG r6,r9,r10
93.endm
94
95.macro LOAD_R7
96 LOAD_64_STACK r7,8
97.endm
98
99.macro LOAD_R8
100 LOAD_64_STACK r8,16
101.endm
102
103.macro LOAD_R9
104 LOAD_64_STACK r9,24
105.endm
106
107.macro LOAD_R10
108 LOAD_64_STACK r10,32
109.endm
110
111.macro LOAD_REGS_0
112 stwu 1,-16(1)
113 stw 3, 8(1)
114.endm
115
116.macro LOAD_REGS_5
117 LOAD_R3
118 LOAD_R4
119 LOAD_R5
120 LOAD_R6
121 LOAD_R7
122.endm
123
124.macro LOAD_REGS_6
125 LOAD_REGS_5
126 LOAD_R8
127.endm
128
129.macro LOAD_REGS_8
130 LOAD_REGS_6
131 LOAD_R9
132 LOAD_R10
133.endm
134
135.macro STORE_REGS_0_1
136 lwz r11, 8(r1)
137 std r4, 0(r11)
138 mr r4, r3
139 li r3, 0
140 addi r1,r1,16
141.endm
142
143.macro STORE_REGS_5_2
144 lwz r11, 16(r1)
145 std r4, 0(r11)
146 lwz r11, 24(r1)
147 std r5, 0(r11)
148.endm
149
150.macro STORE_REGS_6_1
151 lwz r11, 24(r1)
152 std r4, 0(r11)
153.endm
154
155GLOBAL lv1_get_logical_ppe_id
156 SAVE_LR
157 LOAD_REGS_0
158 HVCALL 69
159 STORE_REGS_0_1
160 LOAD_LR
161 blr
162
163GLOBAL lv1_get_logical_partition_id
164 SAVE_LR
165 LOAD_REGS_0
166 HVCALL 74
167 STORE_REGS_0_1
168 LOAD_LR
169 blr
170
171GLOBAL lv1_get_repository_node_value
172 SAVE_LR
173 LOAD_REGS_5
174 HVCALL 91
175 STORE_REGS_5_2
176 LOAD_LR
177 blr
178
179GLOBAL lv1_panic
180 SAVE_LR
181 LOAD_REGS_8
182 HVCALL 255
183 LOAD_LR
184 blr
diff --git a/arch/powerpc/boot/ps3.c b/arch/powerpc/boot/ps3.c
new file mode 100644
index 0000000000..893d59339c
--- /dev/null
+++ b/arch/powerpc/boot/ps3.c
@@ -0,0 +1,161 @@
1/*
2 * PS3 bootwrapper support.
3 *
4 * Copyright (C) 2007 Sony Computer Entertainment Inc.
5 * Copyright 2007 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 <stdarg.h>
22#include <stddef.h>
23#include "types.h"
24#include "elf.h"
25#include "string.h"
26#include "stdio.h"
27#include "page.h"
28#include "ops.h"
29
30extern s64 lv1_panic(u64 in_1);
31extern s64 lv1_get_logical_partition_id(u64 *out_1);
32extern s64 lv1_get_logical_ppe_id(u64 *out_1);
33extern s64 lv1_get_repository_node_value(u64 in_1, u64 in_2, u64 in_3,
34 u64 in_4, u64 in_5, u64 *out_1, u64 *out_2);
35
36#ifdef DEBUG
37#define DBG(fmt...) printf(fmt)
38#else
39static inline int __attribute__ ((format (printf, 1, 2))) DBG(
40 const char *fmt, ...) {return 0;}
41#endif
42
43BSS_STACK(4096);
44
45/* A buffer that may be edited by tools operating on a zImage binary so as to
46 * edit the command line passed to vmlinux (by setting /chosen/bootargs).
47 * The buffer is put in it's own section so that tools may locate it easier.
48 */
49static char cmdline[COMMAND_LINE_SIZE]
50 __attribute__((__section__("__builtin_cmdline")));
51
52static void prep_cmdline(void *chosen)
53{
54 if (cmdline[0] == '\0')
55 getprop(chosen, "bootargs", cmdline, COMMAND_LINE_SIZE-1);
56 else
57 setprop_str(chosen, "bootargs", cmdline);
58
59 printf("cmdline: '%s'\n", cmdline);
60}
61
62static void ps3_console_write(const char *buf, int len)
63{
64}
65
66static void ps3_exit(void)
67{
68 printf("ps3_exit\n");
69
70 /* lv1_panic will shutdown the lpar. */
71
72 lv1_panic(0); /* zero = do not reboot */
73 while (1);
74}
75
76static int ps3_repository_read_rm_size(u64 *rm_size)
77{
78 s64 result;
79 u64 lpar_id;
80 u64 ppe_id;
81 u64 v2;
82
83 result = lv1_get_logical_partition_id(&lpar_id);
84
85 if (result)
86 return -1;
87
88 result = lv1_get_logical_ppe_id(&ppe_id);
89
90 if (result)
91 return -1;
92
93 /*
94 * n1: 0000000062690000 : ....bi..
95 * n2: 7075000000000000 : pu......
96 * n3: 0000000000000001 : ........
97 * n4: 726d5f73697a6500 : rm_size.
98 */
99
100 result = lv1_get_repository_node_value(lpar_id, 0x0000000062690000ULL,
101 0x7075000000000000ULL, ppe_id, 0x726d5f73697a6500ULL, rm_size,
102 &v2);
103
104 printf("%s:%d: ppe_id %lu \n", __func__, __LINE__,
105 (unsigned long)ppe_id);
106 printf("%s:%d: lpar_id %lu \n", __func__, __LINE__,
107 (unsigned long)lpar_id);
108 printf("%s:%d: rm_size %llxh \n", __func__, __LINE__, *rm_size);
109
110 return result ? -1 : 0;
111}
112
113void ps3_copy_vectors(void)
114{
115 extern char __system_reset_kernel[];
116
117 memcpy((void *)0x100, __system_reset_kernel, 0x100);
118 flush_cache((void *)0x100, 0x100);
119}
120
121void platform_init(void)
122{
123 extern char _end[];
124 extern char _dtb_start[];
125 extern char _initrd_start[];
126 extern char _initrd_end[];
127 const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */
128 void *chosen;
129 unsigned long ft_addr;
130 u64 rm_size;
131
132 console_ops.write = ps3_console_write;
133 platform_ops.exit = ps3_exit;
134
135 printf("\n-- PS3 bootwrapper --\n");
136
137 simple_alloc_init(_end, heapsize, 32, 64);
138 ft_init(_dtb_start, 0, 4);
139
140 chosen = finddevice("/chosen");
141
142 ps3_repository_read_rm_size(&rm_size);
143 dt_fixup_memory(0, rm_size);
144
145 if (_initrd_end > _initrd_start) {
146 setprop_val(chosen, "linux,initrd-start", (u32)(_initrd_start));
147 setprop_val(chosen, "linux,initrd-end", (u32)(_initrd_end));
148 }
149
150 prep_cmdline(chosen);
151
152 ft_addr = dt_ops.finalize();
153
154 ps3_copy_vectors();
155
156 printf(" flat tree at 0x%lx\n\r", ft_addr);
157
158 ((kernel_entry_t)0)(ft_addr, 0, NULL);
159
160 ps3_exit();
161}
diff --git a/arch/powerpc/boot/serial.c b/arch/powerpc/boot/serial.c
index 7fd32330a9..eaa0d3ae35 100644
--- a/arch/powerpc/boot/serial.c
+++ b/arch/powerpc/boot/serial.c
@@ -27,7 +27,7 @@ static int serial_open(void)
27 return scdp->open(); 27 return scdp->open();
28} 28}
29 29
30static void serial_write(char *buf, int len) 30static void serial_write(const char *buf, int len)
31{ 31{
32 struct serial_console_data *scdp = console_ops.data; 32 struct serial_console_data *scdp = console_ops.data;
33 33
diff --git a/arch/powerpc/boot/stdio.c b/arch/powerpc/boot/stdio.c
index 0a9feeb983..5b57800bbc 100644
--- a/arch/powerpc/boot/stdio.c
+++ b/arch/powerpc/boot/stdio.c
@@ -190,7 +190,11 @@ int vsprintf(char *buf, const char *fmt, va_list args)
190 190
191 /* get the conversion qualifier */ 191 /* get the conversion qualifier */
192 qualifier = -1; 192 qualifier = -1;
193 if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt =='Z') { 193 if (*fmt == 'l' && *(fmt + 1) == 'l') {
194 qualifier = 'q';
195 fmt += 2;
196 } else if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L'
197 || *fmt == 'Z') {
194 qualifier = *fmt; 198 qualifier = *fmt;
195 ++fmt; 199 ++fmt;
196 } 200 }
@@ -281,6 +285,10 @@ int vsprintf(char *buf, const char *fmt, va_list args)
281 num = va_arg(args, unsigned long); 285 num = va_arg(args, unsigned long);
282 if (flags & SIGN) 286 if (flags & SIGN)
283 num = (signed long) num; 287 num = (signed long) num;
288 } else if (qualifier == 'q') {
289 num = va_arg(args, unsigned long long);
290 if (flags & SIGN)
291 num = (signed long long) num;
284 } else if (qualifier == 'Z') { 292 } else if (qualifier == 'Z') {
285 num = va_arg(args, size_t); 293 num = va_arg(args, size_t);
286 } else if (qualifier == 'h') { 294 } else if (qualifier == 'h') {
diff --git a/arch/powerpc/boot/types.h b/arch/powerpc/boot/types.h
index 79d26e7086..31393d17a9 100644
--- a/arch/powerpc/boot/types.h
+++ b/arch/powerpc/boot/types.h
@@ -7,6 +7,10 @@ typedef unsigned char u8;
7typedef unsigned short u16; 7typedef unsigned short u16;
8typedef unsigned int u32; 8typedef unsigned int u32;
9typedef unsigned long long u64; 9typedef unsigned long long u64;
10typedef signed char s8;
11typedef short s16;
12typedef int s32;
13typedef long long s64;
10 14
11#define min(x,y) ({ \ 15#define min(x,y) ({ \
12 typeof(x) _x = (x); \ 16 typeof(x) _x = (x); \
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index da77adc730..65f6854791 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -144,6 +144,15 @@ miboot|uboot)
144cuboot*) 144cuboot*)
145 gzip= 145 gzip=
146 ;; 146 ;;
147ps3)
148 platformo="$object/ps3-head.o $object/ps3-hvcall.o $object/ps3.o"
149 lds=$object/zImage.ps3.lds
150 gzip=
151 ext=bin
152 objflags="-O binary --set-section-flags=.bss=contents,alloc,load,data"
153 ksection=.kernel:vmlinux.bin
154 isection=.kernel:initrd
155 ;;
147esac 156esac
148 157
149vmz="$tmpdir/`basename \"$kernel\"`.$ext" 158vmz="$tmpdir/`basename \"$kernel\"`.$ext"
@@ -239,4 +248,50 @@ treeboot*)
239 fi 248 fi
240 exit 0 249 exit 0
241 ;; 250 ;;
251ps3)
252 # The ps3's loader supports loading gzipped binary images from flash
253 # rom to addr zero. The loader enters the image at addr 0x100. A
254 # bootwrapper overlay is use to arrange for the kernel to be loaded
255 # to addr zero and to have a suitable bootwrapper entry at 0x100.
256 # To construct the rom image, 0x100 bytes from offset 0x100 in the
257 # kernel is copied to the bootwrapper symbol __system_reset_kernel.
258 # The 0x100 bytes at the bootwrapper symbol __system_reset_overlay is
259 # then copied to offset 0x100. At runtime the bootwrapper program
260 # copies the 0x100 bytes at __system_reset_kernel to addr 0x100.
261
262 system_reset_overlay=0x`${CROSS}nm "$ofile" \
263 | grep ' __system_reset_overlay$' \
264 | cut -d' ' -f1`
265 system_reset_overlay=`printf "%d" $system_reset_overlay`
266 system_reset_kernel=0x`${CROSS}nm "$ofile" \
267 | grep ' __system_reset_kernel$' \
268 | cut -d' ' -f1`
269 system_reset_kernel=`printf "%d" $system_reset_kernel`
270 overlay_dest="256"
271 overlay_size="256"
272
273 rm -f "$object/otheros.bld"
274
275 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin"
276
277 msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
278 skip=$overlay_dest seek=$system_reset_kernel \
279 count=$overlay_size bs=1 2>&1)
280
281 if [ $? -ne "0" ]; then
282 echo $msg
283 exit 1
284 fi
285
286 msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
287 skip=$system_reset_overlay seek=$overlay_dest \
288 count=$overlay_size bs=1 2>&1)
289
290 if [ $? -ne "0" ]; then
291 echo $msg
292 exit 2
293 fi
294
295 gzip --force -9 --stdout "$ofile.bin" > "$object/otheros.bld"
296 ;;
242esac 297esac
diff --git a/arch/powerpc/boot/zImage.ps3.lds.S b/arch/powerpc/boot/zImage.ps3.lds.S
new file mode 100644
index 0000000000..aaa469c1e6
--- /dev/null
+++ b/arch/powerpc/boot/zImage.ps3.lds.S
@@ -0,0 +1,50 @@
1OUTPUT_ARCH(powerpc:common)
2ENTRY(_zimage_start)
3EXTERN(_zimage_start)
4SECTIONS
5{
6 _vmlinux_start = .;
7 .kernel:vmlinux.bin : { *(.kernel:vmlinux.bin) }
8 _vmlinux_end = .;
9
10 . = ALIGN(4096);
11 _dtb_start = .;
12 .kernel:dtb : { *(.kernel:dtb) }
13 _dtb_end = .;
14
15 . = ALIGN(4096);
16 _initrd_start = .;
17 .kernel:initrd : { *(.kernel:initrd) }
18 _initrd_end = .;
19
20 _start = .;
21 .text :
22 {
23 *(.text)
24 *(.fixup)
25 }
26 _etext = .;
27 . = ALIGN(4096);
28 .data :
29 {
30 *(.rodata*)
31 *(.data*)
32 *(.sdata*)
33 __got2_start = .;
34 *(.got2)
35 __got2_end = .;
36 }
37
38 . = ALIGN(4096);
39 _edata = .;
40
41 . = ALIGN(4096);
42 __bss_start = .;
43 .bss :
44 {
45 *(.sbss)
46 *(.bss)
47 }
48 . = ALIGN(4096);
49 _end = . ;
50}
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig
index 02c428affc..74f83f4a4e 100644
--- a/arch/powerpc/configs/cell_defconfig
+++ b/arch/powerpc/configs/cell_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.21-rc6 3# Linux kernel version: 2.6.22-rc6
4# Mon Apr 23 20:46:48 2007 4# Tue Jun 26 12:32:34 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -41,6 +41,7 @@ CONFIG_PPC_DCR=y
41CONFIG_PPC_OF_PLATFORM_PCI=y 41CONFIG_PPC_OF_PLATFORM_PCI=y
42CONFIG_ALTIVEC=y 42CONFIG_ALTIVEC=y
43CONFIG_PPC_STD_MMU=y 43CONFIG_PPC_STD_MMU=y
44CONFIG_PPC_MM_SLICES=y
44CONFIG_VIRT_CPU_ACCOUNTING=y 45CONFIG_VIRT_CPU_ACCOUNTING=y
45CONFIG_SMP=y 46CONFIG_SMP=y
46CONFIG_NR_CPUS=4 47CONFIG_NR_CPUS=4
@@ -69,6 +70,7 @@ CONFIG_SYSVIPC_SYSCTL=y
69# CONFIG_AUDIT is not set 70# CONFIG_AUDIT is not set
70CONFIG_IKCONFIG=y 71CONFIG_IKCONFIG=y
71CONFIG_IKCONFIG_PROC=y 72CONFIG_IKCONFIG_PROC=y
73CONFIG_LOG_BUF_SHIFT=15
72CONFIG_CPUSETS=y 74CONFIG_CPUSETS=y
73CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
@@ -87,14 +89,19 @@ CONFIG_BUG=y
87CONFIG_ELF_CORE=y 89CONFIG_ELF_CORE=y
88CONFIG_BASE_FULL=y 90CONFIG_BASE_FULL=y
89CONFIG_FUTEX=y 91CONFIG_FUTEX=y
92CONFIG_ANON_INODES=y
90CONFIG_EPOLL=y 93CONFIG_EPOLL=y
94CONFIG_SIGNALFD=y
95CONFIG_TIMERFD=y
96CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 97CONFIG_SHMEM=y
92CONFIG_SLAB=y
93CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLAB=y
100# CONFIG_SLUB is not set
101# CONFIG_SLOB is not set
94CONFIG_RT_MUTEXES=y 102CONFIG_RT_MUTEXES=y
95# CONFIG_TINY_SHMEM is not set 103# CONFIG_TINY_SHMEM is not set
96CONFIG_BASE_SMALL=0 104CONFIG_BASE_SMALL=0
97# CONFIG_SLOB is not set
98 105
99# 106#
100# Loadable module support 107# Loadable module support
@@ -163,9 +170,14 @@ CONFIG_SPU_FS=m
163CONFIG_SPU_BASE=y 170CONFIG_SPU_BASE=y
164CONFIG_CBE_RAS=y 171CONFIG_CBE_RAS=y
165CONFIG_CBE_THERM=m 172CONFIG_CBE_THERM=m
173CONFIG_CBE_CPUFREQ=m
174# CONFIG_PQ2ADS is not set
166CONFIG_PPC_NATIVE=y 175CONFIG_PPC_NATIVE=y
167CONFIG_UDBG_RTAS_CONSOLE=y 176CONFIG_UDBG_RTAS_CONSOLE=y
168CONFIG_PPC_UDBG_BEAT=y 177CONFIG_PPC_UDBG_BEAT=y
178CONFIG_MPIC=y
179# CONFIG_MPIC_WEIRD is not set
180# CONFIG_PPC_I8259 is not set
169# CONFIG_U3_DART is not set 181# CONFIG_U3_DART is not set
170CONFIG_PPC_RTAS=y 182CONFIG_PPC_RTAS=y
171# CONFIG_RTAS_ERROR_LOGGING is not set 183# CONFIG_RTAS_ERROR_LOGGING is not set
@@ -177,9 +189,23 @@ CONFIG_MMIO_NVRAM=y
177# CONFIG_PPC_970_NAP is not set 189# CONFIG_PPC_970_NAP is not set
178CONFIG_PPC_INDIRECT_IO=y 190CONFIG_PPC_INDIRECT_IO=y
179CONFIG_GENERIC_IOMAP=y 191CONFIG_GENERIC_IOMAP=y
180# CONFIG_CPU_FREQ_PMAC64 is not set 192CONFIG_CPU_FREQ=y
181# CONFIG_WANT_EARLY_SERIAL is not set 193CONFIG_CPU_FREQ_TABLE=y
182CONFIG_MPIC=y 194# CONFIG_CPU_FREQ_DEBUG is not set
195CONFIG_CPU_FREQ_STAT=y
196# CONFIG_CPU_FREQ_STAT_DETAILS is not set
197CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
198# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
199CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
200CONFIG_CPU_FREQ_GOV_POWERSAVE=y
201CONFIG_CPU_FREQ_GOV_USERSPACE=y
202CONFIG_CPU_FREQ_GOV_ONDEMAND=y
203CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
204
205#
206# CPU Frequency drivers
207#
208# CONFIG_CPM2 is not set
183 209
184# 210#
185# Kernel options 211# Kernel options
@@ -224,12 +250,14 @@ CONFIG_RESOURCES_64BIT=y
224CONFIG_ZONE_DMA_FLAG=1 250CONFIG_ZONE_DMA_FLAG=1
225CONFIG_ARCH_MEMORY_PROBE=y 251CONFIG_ARCH_MEMORY_PROBE=y
226CONFIG_NODES_SPAN_OTHER_NODES=y 252CONFIG_NODES_SPAN_OTHER_NODES=y
253CONFIG_PPC_HAS_HASH_64K=y
227CONFIG_PPC_64K_PAGES=y 254CONFIG_PPC_64K_PAGES=y
228CONFIG_SCHED_SMT=y 255CONFIG_SCHED_SMT=y
229CONFIG_PROC_DEVICETREE=y 256CONFIG_PROC_DEVICETREE=y
230# CONFIG_CMDLINE_BOOL is not set 257# CONFIG_CMDLINE_BOOL is not set
231# CONFIG_PM is not set 258# CONFIG_PM is not set
232CONFIG_SECCOMP=y 259CONFIG_SECCOMP=y
260# CONFIG_WANT_DEVICE_TREE is not set
233CONFIG_ISA_DMA_API=y 261CONFIG_ISA_DMA_API=y
234 262
235# 263#
@@ -237,22 +265,18 @@ CONFIG_ISA_DMA_API=y
237# 265#
238CONFIG_ZONE_DMA=y 266CONFIG_ZONE_DMA=y
239CONFIG_GENERIC_ISA_DMA=y 267CONFIG_GENERIC_ISA_DMA=y
240# CONFIG_MPIC_WEIRD is not set
241# CONFIG_PPC_I8259 is not set
242# CONFIG_PPC_INDIRECT_PCI is not set 268# CONFIG_PPC_INDIRECT_PCI is not set
243CONFIG_PCI=y 269CONFIG_PCI=y
244CONFIG_PCI_DOMAINS=y 270CONFIG_PCI_DOMAINS=y
245CONFIG_PCIEPORTBUS=y 271CONFIG_PCIEPORTBUS=y
272CONFIG_ARCH_SUPPORTS_MSI=y
273# CONFIG_PCI_MSI is not set
246# CONFIG_PCI_DEBUG is not set 274# CONFIG_PCI_DEBUG is not set
247 275
248# 276#
249# PCCARD (PCMCIA/CardBus) support 277# PCCARD (PCMCIA/CardBus) support
250# 278#
251# CONFIG_PCCARD is not set 279# CONFIG_PCCARD is not set
252
253#
254# PCI Hotplug Support
255#
256# CONFIG_HOTPLUG_PCI is not set 280# CONFIG_HOTPLUG_PCI is not set
257CONFIG_KERNEL_START=0xc000000000000000 281CONFIG_KERNEL_START=0xc000000000000000
258 282
@@ -264,7 +288,6 @@ CONFIG_NET=y
264# 288#
265# Networking options 289# Networking options
266# 290#
267# CONFIG_NETDEBUG is not set
268CONFIG_PACKET=y 291CONFIG_PACKET=y
269# CONFIG_PACKET_MMAP is not set 292# CONFIG_PACKET_MMAP is not set
270CONFIG_UNIX=y 293CONFIG_UNIX=y
@@ -300,14 +323,11 @@ CONFIG_INET_TCP_DIAG=y
300CONFIG_TCP_CONG_CUBIC=y 323CONFIG_TCP_CONG_CUBIC=y
301CONFIG_DEFAULT_TCP_CONG="cubic" 324CONFIG_DEFAULT_TCP_CONG="cubic"
302# CONFIG_TCP_MD5SIG is not set 325# CONFIG_TCP_MD5SIG is not set
303
304#
305# IP: Virtual Server Configuration
306#
307# CONFIG_IP_VS is not set 326# CONFIG_IP_VS is not set
308CONFIG_IPV6=y 327CONFIG_IPV6=y
309# CONFIG_IPV6_PRIVACY is not set 328# CONFIG_IPV6_PRIVACY is not set
310# CONFIG_IPV6_ROUTER_PREF is not set 329# CONFIG_IPV6_ROUTER_PREF is not set
330# CONFIG_IPV6_OPTIMISTIC_DAD is not set
311CONFIG_INET6_AH=m 331CONFIG_INET6_AH=m
312CONFIG_INET6_ESP=m 332CONFIG_INET6_ESP=m
313CONFIG_INET6_IPCOMP=m 333CONFIG_INET6_IPCOMP=m
@@ -332,6 +352,7 @@ CONFIG_NETFILTER_NETLINK=m
332CONFIG_NETFILTER_NETLINK_QUEUE=m 352CONFIG_NETFILTER_NETLINK_QUEUE=m
333CONFIG_NETFILTER_NETLINK_LOG=m 353CONFIG_NETFILTER_NETLINK_LOG=m
334# CONFIG_NF_CONNTRACK_ENABLED is not set 354# CONFIG_NF_CONNTRACK_ENABLED is not set
355# CONFIG_NF_CONNTRACK is not set
335CONFIG_NETFILTER_XTABLES=m 356CONFIG_NETFILTER_XTABLES=m
336CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 357CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
337CONFIG_NETFILTER_XT_TARGET_DSCP=m 358CONFIG_NETFILTER_XT_TARGET_DSCP=m
@@ -389,20 +410,8 @@ CONFIG_IP_NF_ARP_MANGLE=m
389# 410#
390# CONFIG_IP6_NF_QUEUE is not set 411# CONFIG_IP6_NF_QUEUE is not set
391# CONFIG_IP6_NF_IPTABLES is not set 412# CONFIG_IP6_NF_IPTABLES is not set
392
393#
394# DCCP Configuration (EXPERIMENTAL)
395#
396# CONFIG_IP_DCCP is not set 413# CONFIG_IP_DCCP is not set
397
398#
399# SCTP Configuration (EXPERIMENTAL)
400#
401# CONFIG_IP_SCTP is not set 414# CONFIG_IP_SCTP is not set
402
403#
404# TIPC Configuration (EXPERIMENTAL)
405#
406# CONFIG_TIPC is not set 415# CONFIG_TIPC is not set
407# CONFIG_ATM is not set 416# CONFIG_ATM is not set
408# CONFIG_BRIDGE is not set 417# CONFIG_BRIDGE is not set
@@ -429,7 +438,16 @@ CONFIG_NET_CLS_ROUTE=y
429# CONFIG_HAMRADIO is not set 438# CONFIG_HAMRADIO is not set
430# CONFIG_IRDA is not set 439# CONFIG_IRDA is not set
431# CONFIG_BT is not set 440# CONFIG_BT is not set
441# CONFIG_AF_RXRPC is not set
442
443#
444# Wireless
445#
446# CONFIG_CFG80211 is not set
447# CONFIG_WIRELESS_EXT is not set
448# CONFIG_MAC80211 is not set
432# CONFIG_IEEE80211 is not set 449# CONFIG_IEEE80211 is not set
450# CONFIG_RFKILL is not set
433 451
434# 452#
435# Device Drivers 453# Device Drivers
@@ -449,10 +467,6 @@ CONFIG_FW_LOADER=y
449# Connector - unified userspace <-> kernelspace linker 467# Connector - unified userspace <-> kernelspace linker
450# 468#
451# CONFIG_CONNECTOR is not set 469# CONFIG_CONNECTOR is not set
452
453#
454# Memory Technology Devices (MTD)
455#
456# CONFIG_MTD is not set 470# CONFIG_MTD is not set
457 471
458# 472#
@@ -489,12 +503,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
489# 503#
490# Misc devices 504# Misc devices
491# 505#
506# CONFIG_PHANTOM is not set
492# CONFIG_SGI_IOC4 is not set 507# CONFIG_SGI_IOC4 is not set
493# CONFIG_TIFM_CORE is not set 508# CONFIG_TIFM_CORE is not set
494 509# CONFIG_BLINK is not set
495#
496# ATA/ATAPI/MFM/RLL support
497#
498CONFIG_IDE=y 510CONFIG_IDE=y
499CONFIG_BLK_DEV_IDE=y 511CONFIG_BLK_DEV_IDE=y
500 512
@@ -509,6 +521,7 @@ CONFIG_IDEDISK_MULTI_MODE=y
509# CONFIG_BLK_DEV_IDEFLOPPY is not set 521# CONFIG_BLK_DEV_IDEFLOPPY is not set
510# CONFIG_BLK_DEV_IDESCSI is not set 522# CONFIG_BLK_DEV_IDESCSI is not set
511# CONFIG_IDE_TASK_IOCTL is not set 523# CONFIG_IDE_TASK_IOCTL is not set
524CONFIG_IDE_PROC_FS=y
512 525
513# 526#
514# IDE chipset support/bugfixes 527# IDE chipset support/bugfixes
@@ -516,6 +529,7 @@ CONFIG_IDEDISK_MULTI_MODE=y
516CONFIG_IDE_GENERIC=y 529CONFIG_IDE_GENERIC=y
517CONFIG_BLK_DEV_IDEPCI=y 530CONFIG_BLK_DEV_IDEPCI=y
518CONFIG_IDEPCI_SHARE_IRQ=y 531CONFIG_IDEPCI_SHARE_IRQ=y
532CONFIG_IDEPCI_PCIBUS_ORDER=y
519# CONFIG_BLK_DEV_OFFBOARD is not set 533# CONFIG_BLK_DEV_OFFBOARD is not set
520CONFIG_BLK_DEV_GENERIC=y 534CONFIG_BLK_DEV_GENERIC=y
521# CONFIG_BLK_DEV_OPTI621 is not set 535# CONFIG_BLK_DEV_OPTI621 is not set
@@ -580,6 +594,7 @@ CONFIG_CHR_DEV_SG=y
580# CONFIG_SCSI_CONSTANTS is not set 594# CONFIG_SCSI_CONSTANTS is not set
581# CONFIG_SCSI_LOGGING is not set 595# CONFIG_SCSI_LOGGING is not set
582# CONFIG_SCSI_SCAN_ASYNC is not set 596# CONFIG_SCSI_SCAN_ASYNC is not set
597CONFIG_SCSI_WAIT_SCAN=m
583 598
584# 599#
585# SCSI Transports 600# SCSI Transports
@@ -626,10 +641,6 @@ CONFIG_SCSI_SAS_ATTRS=y
626# CONFIG_SCSI_DC390T is not set 641# CONFIG_SCSI_DC390T is not set
627# CONFIG_SCSI_DEBUG is not set 642# CONFIG_SCSI_DEBUG is not set
628# CONFIG_SCSI_SRP is not set 643# CONFIG_SCSI_SRP is not set
629
630#
631# Serial ATA (prod) and Parallel ATA (experimental) drivers
632#
633CONFIG_ATA=y 644CONFIG_ATA=y
634# CONFIG_ATA_NONSTANDARD is not set 645# CONFIG_ATA_NONSTANDARD is not set
635# CONFIG_SATA_AHCI is not set 646# CONFIG_SATA_AHCI is not set
@@ -652,6 +663,7 @@ CONFIG_SATA_PROMISE=y
652# CONFIG_PATA_AMD is not set 663# CONFIG_PATA_AMD is not set
653# CONFIG_PATA_ARTOP is not set 664# CONFIG_PATA_ARTOP is not set
654# CONFIG_PATA_ATIIXP is not set 665# CONFIG_PATA_ATIIXP is not set
666# CONFIG_PATA_CMD640_PCI is not set
655# CONFIG_PATA_CMD64X is not set 667# CONFIG_PATA_CMD64X is not set
656# CONFIG_PATA_CS5520 is not set 668# CONFIG_PATA_CS5520 is not set
657# CONFIG_PATA_CS5530 is not set 669# CONFIG_PATA_CS5530 is not set
@@ -705,6 +717,7 @@ CONFIG_DM_MIRROR=m
705CONFIG_DM_ZERO=m 717CONFIG_DM_ZERO=m
706CONFIG_DM_MULTIPATH=m 718CONFIG_DM_MULTIPATH=m
707# CONFIG_DM_MULTIPATH_EMC is not set 719# CONFIG_DM_MULTIPATH_EMC is not set
720# CONFIG_DM_DELAY is not set
708 721
709# 722#
710# Fusion MPT device support 723# Fusion MPT device support
@@ -719,18 +732,14 @@ CONFIG_FUSION_MAX_SGE=128
719# 732#
720# IEEE 1394 (FireWire) support 733# IEEE 1394 (FireWire) support
721# 734#
735# CONFIG_FIREWIRE is not set
722# CONFIG_IEEE1394 is not set 736# CONFIG_IEEE1394 is not set
723 737
724# 738#
725# I2O device support 739# I2O device support
726# 740#
727# CONFIG_I2O is not set 741# CONFIG_I2O is not set
728 742# CONFIG_MACINTOSH_DRIVERS is not set
729#
730# Macintosh device drivers
731#
732# CONFIG_MAC_EMUMOUSEBTN is not set
733# CONFIG_WINDFARM is not set
734 743
735# 744#
736# Network device support 745# Network device support
@@ -740,15 +749,7 @@ CONFIG_NETDEVICES=y
740CONFIG_BONDING=m 749CONFIG_BONDING=m
741# CONFIG_EQUALIZER is not set 750# CONFIG_EQUALIZER is not set
742CONFIG_TUN=y 751CONFIG_TUN=y
743
744#
745# ARCnet devices
746#
747# CONFIG_ARCNET is not set 752# CONFIG_ARCNET is not set
748
749#
750# PHY device support
751#
752# CONFIG_PHYLIB is not set 753# CONFIG_PHYLIB is not set
753 754
754# 755#
@@ -767,10 +768,7 @@ CONFIG_MII=y
767# CONFIG_NET_TULIP is not set 768# CONFIG_NET_TULIP is not set
768# CONFIG_HP100 is not set 769# CONFIG_HP100 is not set
769# CONFIG_NET_PCI is not set 770# CONFIG_NET_PCI is not set
770 771CONFIG_NETDEV_1000=y
771#
772# Ethernet (1000 Mbit)
773#
774# CONFIG_ACENIC is not set 772# CONFIG_ACENIC is not set
775# CONFIG_DL2K is not set 773# CONFIG_DL2K is not set
776CONFIG_E1000=m 774CONFIG_E1000=m
@@ -784,15 +782,13 @@ CONFIG_E1000_NAPI=y
784CONFIG_SKGE=m 782CONFIG_SKGE=m
785CONFIG_SKY2=m 783CONFIG_SKY2=m
786# CONFIG_SK98LIN is not set 784# CONFIG_SK98LIN is not set
785# CONFIG_VIA_VELOCITY is not set
787CONFIG_TIGON3=y 786CONFIG_TIGON3=y
788# CONFIG_BNX2 is not set 787# CONFIG_BNX2 is not set
789CONFIG_SPIDER_NET=y 788CONFIG_SPIDER_NET=y
790# CONFIG_QLA3XXX is not set 789# CONFIG_QLA3XXX is not set
791# CONFIG_ATL1 is not set 790# CONFIG_ATL1 is not set
792 791CONFIG_NETDEV_10000=y
793#
794# Ethernet (10000 Mbit)
795#
796# CONFIG_CHELSIO_T1 is not set 792# CONFIG_CHELSIO_T1 is not set
797# CONFIG_CHELSIO_T3 is not set 793# CONFIG_CHELSIO_T3 is not set
798# CONFIG_IXGB is not set 794# CONFIG_IXGB is not set
@@ -800,20 +796,24 @@ CONFIG_SPIDER_NET=y
800# CONFIG_MYRI10GE is not set 796# CONFIG_MYRI10GE is not set
801# CONFIG_NETXEN_NIC is not set 797# CONFIG_NETXEN_NIC is not set
802# CONFIG_PASEMI_MAC is not set 798# CONFIG_PASEMI_MAC is not set
803 799# CONFIG_MLX4_CORE is not set
804#
805# Token Ring devices
806#
807# CONFIG_TR is not set 800# CONFIG_TR is not set
808 801
809# 802#
810# Wireless LAN (non-hamradio) 803# Wireless LAN
811# 804#
812# CONFIG_NET_RADIO is not set 805# CONFIG_WLAN_PRE80211 is not set
806# CONFIG_WLAN_80211 is not set
813 807
814# 808#
815# Wan interfaces 809# USB Network Adapters
816# 810#
811# CONFIG_USB_CATC is not set
812# CONFIG_USB_KAWETH is not set
813# CONFIG_USB_PEGASUS is not set
814# CONFIG_USB_RTL8150 is not set
815# CONFIG_USB_USBNET_MII is not set
816# CONFIG_USB_USBNET is not set
817# CONFIG_WAN is not set 817# CONFIG_WAN is not set
818# CONFIG_FDDI is not set 818# CONFIG_FDDI is not set
819# CONFIG_HIPPI is not set 819# CONFIG_HIPPI is not set
@@ -840,6 +840,7 @@ CONFIG_SPIDER_NET=y
840# 840#
841CONFIG_INPUT=y 841CONFIG_INPUT=y
842# CONFIG_INPUT_FF_MEMLESS is not set 842# CONFIG_INPUT_FF_MEMLESS is not set
843# CONFIG_INPUT_POLLDEV is not set
843 844
844# 845#
845# Userland interfaces 846# Userland interfaces
@@ -859,6 +860,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
859# CONFIG_INPUT_KEYBOARD is not set 860# CONFIG_INPUT_KEYBOARD is not set
860# CONFIG_INPUT_MOUSE is not set 861# CONFIG_INPUT_MOUSE is not set
861# CONFIG_INPUT_JOYSTICK is not set 862# CONFIG_INPUT_JOYSTICK is not set
863# CONFIG_INPUT_TABLET is not set
862# CONFIG_INPUT_TOUCHSCREEN is not set 864# CONFIG_INPUT_TOUCHSCREEN is not set
863# CONFIG_INPUT_MISC is not set 865# CONFIG_INPUT_MISC is not set
864 866
@@ -933,10 +935,6 @@ CONFIG_IPMI_DEVICE_INTERFACE=m
933CONFIG_IPMI_SI=m 935CONFIG_IPMI_SI=m
934CONFIG_IPMI_WATCHDOG=m 936CONFIG_IPMI_WATCHDOG=m
935CONFIG_IPMI_POWEROFF=m 937CONFIG_IPMI_POWEROFF=m
936
937#
938# Watchdog Cards
939#
940CONFIG_WATCHDOG=y 938CONFIG_WATCHDOG=y
941# CONFIG_WATCHDOG_NOWAYOUT is not set 939# CONFIG_WATCHDOG_NOWAYOUT is not set
942 940
@@ -959,7 +957,6 @@ CONFIG_WATCHDOG=y
959# CONFIG_HW_RANDOM is not set 957# CONFIG_HW_RANDOM is not set
960CONFIG_GEN_RTC=y 958CONFIG_GEN_RTC=y
961# CONFIG_GEN_RTC_X is not set 959# CONFIG_GEN_RTC_X is not set
962# CONFIG_DTLK is not set
963# CONFIG_R3964 is not set 960# CONFIG_R3964 is not set
964# CONFIG_APPLICOM is not set 961# CONFIG_APPLICOM is not set
965# CONFIG_AGP is not set 962# CONFIG_AGP is not set
@@ -971,11 +968,9 @@ CONFIG_GEN_RTC=y
971# TPM devices 968# TPM devices
972# 969#
973# CONFIG_TCG_TPM is not set 970# CONFIG_TCG_TPM is not set
974 971CONFIG_DEVPORT=y
975#
976# I2C support
977#
978CONFIG_I2C=y 972CONFIG_I2C=y
973CONFIG_I2C_BOARDINFO=y
979# CONFIG_I2C_CHARDEV is not set 974# CONFIG_I2C_CHARDEV is not set
980 975
981# 976#
@@ -999,17 +994,17 @@ CONFIG_I2C_ALGOBIT=y
999# CONFIG_I2C_NFORCE2 is not set 994# CONFIG_I2C_NFORCE2 is not set
1000# CONFIG_I2C_OCORES is not set 995# CONFIG_I2C_OCORES is not set
1001# CONFIG_I2C_PARPORT_LIGHT is not set 996# CONFIG_I2C_PARPORT_LIGHT is not set
1002# CONFIG_I2C_PASEMI is not set
1003# CONFIG_I2C_PROSAVAGE is not set 997# CONFIG_I2C_PROSAVAGE is not set
1004# CONFIG_I2C_SAVAGE4 is not set 998# CONFIG_I2C_SAVAGE4 is not set
999# CONFIG_I2C_SIMTEC is not set
1005# CONFIG_I2C_SIS5595 is not set 1000# CONFIG_I2C_SIS5595 is not set
1006# CONFIG_I2C_SIS630 is not set 1001# CONFIG_I2C_SIS630 is not set
1007# CONFIG_I2C_SIS96X is not set 1002# CONFIG_I2C_SIS96X is not set
1008# CONFIG_I2C_STUB is not set 1003# CONFIG_I2C_STUB is not set
1004# CONFIG_I2C_TINY_USB is not set
1009# CONFIG_I2C_VIA is not set 1005# CONFIG_I2C_VIA is not set
1010# CONFIG_I2C_VIAPRO is not set 1006# CONFIG_I2C_VIAPRO is not set
1011# CONFIG_I2C_VOODOO3 is not set 1007# CONFIG_I2C_VOODOO3 is not set
1012# CONFIG_I2C_PCA_ISA is not set
1013 1008
1014# 1009#
1015# Miscellaneous I2C Chip support 1010# Miscellaneous I2C Chip support
@@ -1036,12 +1031,7 @@ CONFIG_I2C_ALGOBIT=y
1036# Dallas's 1-wire bus 1031# Dallas's 1-wire bus
1037# 1032#
1038# CONFIG_W1 is not set 1033# CONFIG_W1 is not set
1039
1040#
1041# Hardware Monitoring support
1042#
1043# CONFIG_HWMON is not set 1034# CONFIG_HWMON is not set
1044# CONFIG_HWMON_VID is not set
1045 1035
1046# 1036#
1047# Multifunction device drivers 1037# Multifunction device drivers
@@ -1052,17 +1042,19 @@ CONFIG_I2C_ALGOBIT=y
1052# Multimedia devices 1042# Multimedia devices
1053# 1043#
1054# CONFIG_VIDEO_DEV is not set 1044# CONFIG_VIDEO_DEV is not set
1045# CONFIG_DVB_CORE is not set
1046# CONFIG_DAB is not set
1055 1047
1056# 1048#
1057# Digital Video Broadcasting Devices 1049# Graphics support
1058# 1050#
1059# CONFIG_DVB is not set 1051# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1060# CONFIG_USB_DABUSB is not set
1061 1052
1062# 1053#
1063# Graphics support 1054# Display device support
1064# 1055#
1065# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 1056# CONFIG_DISPLAY_SUPPORT is not set
1057# CONFIG_VGASTATE is not set
1066# CONFIG_FB is not set 1058# CONFIG_FB is not set
1067# CONFIG_FB_IBM_GXT4500 is not set 1059# CONFIG_FB_IBM_GXT4500 is not set
1068 1060
@@ -1084,6 +1076,17 @@ CONFIG_HID=m
1084# CONFIG_HID_DEBUG is not set 1076# CONFIG_HID_DEBUG is not set
1085 1077
1086# 1078#
1079# USB Input Devices
1080#
1081# CONFIG_USB_HID is not set
1082
1083#
1084# USB HID Boot Protocol drivers
1085#
1086# CONFIG_USB_KBD is not set
1087# CONFIG_USB_MOUSE is not set
1088
1089#
1087# USB support 1090# USB support
1088# 1091#
1089CONFIG_USB_ARCH_HAS_HCD=y 1092CONFIG_USB_ARCH_HAS_HCD=y
@@ -1096,6 +1099,7 @@ CONFIG_USB=m
1096# Miscellaneous USB options 1099# Miscellaneous USB options
1097# 1100#
1098CONFIG_USB_DEVICEFS=y 1101CONFIG_USB_DEVICEFS=y
1102CONFIG_USB_DEVICE_CLASS=y
1099# CONFIG_USB_DYNAMIC_MINORS is not set 1103# CONFIG_USB_DYNAMIC_MINORS is not set
1100# CONFIG_USB_OTG is not set 1104# CONFIG_USB_OTG is not set
1101 1105
@@ -1147,44 +1151,10 @@ CONFIG_USB_STORAGE=m
1147# CONFIG_USB_LIBUSUAL is not set 1151# CONFIG_USB_LIBUSUAL is not set
1148 1152
1149# 1153#
1150# USB Input Devices
1151#
1152# CONFIG_USB_HID is not set
1153
1154#
1155# USB HID Boot Protocol drivers
1156#
1157# CONFIG_USB_KBD is not set
1158# CONFIG_USB_MOUSE is not set
1159# CONFIG_USB_AIPTEK is not set
1160# CONFIG_USB_WACOM is not set
1161# CONFIG_USB_ACECAD is not set
1162# CONFIG_USB_KBTAB is not set
1163# CONFIG_USB_POWERMATE is not set
1164# CONFIG_USB_TOUCHSCREEN is not set
1165# CONFIG_USB_YEALINK is not set
1166# CONFIG_USB_XPAD is not set
1167# CONFIG_USB_ATI_REMOTE is not set
1168# CONFIG_USB_ATI_REMOTE2 is not set
1169# CONFIG_USB_KEYSPAN_REMOTE is not set
1170# CONFIG_USB_APPLETOUCH is not set
1171# CONFIG_USB_GTCO is not set
1172
1173#
1174# USB Imaging devices 1154# USB Imaging devices
1175# 1155#
1176# CONFIG_USB_MDC800 is not set 1156# CONFIG_USB_MDC800 is not set
1177# CONFIG_USB_MICROTEK is not set 1157# CONFIG_USB_MICROTEK is not set
1178
1179#
1180# USB Network Adapters
1181#
1182# CONFIG_USB_CATC is not set
1183# CONFIG_USB_KAWETH is not set
1184# CONFIG_USB_PEGASUS is not set
1185# CONFIG_USB_RTL8150 is not set
1186# CONFIG_USB_USBNET_MII is not set
1187# CONFIG_USB_USBNET is not set
1188CONFIG_USB_MON=y 1158CONFIG_USB_MON=y
1189 1159
1190# 1160#
@@ -1228,10 +1198,6 @@ CONFIG_USB_MON=y
1228# USB Gadget Support 1198# USB Gadget Support
1229# 1199#
1230# CONFIG_USB_GADGET is not set 1200# CONFIG_USB_GADGET is not set
1231
1232#
1233# MMC/SD Card support
1234#
1235# CONFIG_MMC is not set 1201# CONFIG_MMC is not set
1236 1202
1237# 1203#
@@ -1253,10 +1219,12 @@ CONFIG_USB_MON=y
1253CONFIG_INFINIBAND=m 1219CONFIG_INFINIBAND=m
1254CONFIG_INFINIBAND_USER_MAD=m 1220CONFIG_INFINIBAND_USER_MAD=m
1255CONFIG_INFINIBAND_USER_ACCESS=m 1221CONFIG_INFINIBAND_USER_ACCESS=m
1222CONFIG_INFINIBAND_USER_MEM=y
1256CONFIG_INFINIBAND_ADDR_TRANS=y 1223CONFIG_INFINIBAND_ADDR_TRANS=y
1257CONFIG_INFINIBAND_MTHCA=m 1224CONFIG_INFINIBAND_MTHCA=m
1258CONFIG_INFINIBAND_MTHCA_DEBUG=y 1225CONFIG_INFINIBAND_MTHCA_DEBUG=y
1259# CONFIG_INFINIBAND_AMSO1100 is not set 1226# CONFIG_INFINIBAND_AMSO1100 is not set
1227# CONFIG_MLX4_INFINIBAND is not set
1260CONFIG_INFINIBAND_IPOIB=m 1228CONFIG_INFINIBAND_IPOIB=m
1261# CONFIG_INFINIBAND_IPOIB_CM is not set 1229# CONFIG_INFINIBAND_IPOIB_CM is not set
1262CONFIG_INFINIBAND_IPOIB_DEBUG=y 1230CONFIG_INFINIBAND_IPOIB_DEBUG=y
@@ -1287,14 +1255,6 @@ CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y
1287# 1255#
1288 1256
1289# 1257#
1290# Auxiliary Display support
1291#
1292
1293#
1294# Virtualization
1295#
1296
1297#
1298# File systems 1258# File systems
1299# 1259#
1300CONFIG_EXT2_FS=y 1260CONFIG_EXT2_FS=y
@@ -1389,6 +1349,7 @@ CONFIG_LOCKD_V4=y
1389CONFIG_NFS_ACL_SUPPORT=y 1349CONFIG_NFS_ACL_SUPPORT=y
1390CONFIG_NFS_COMMON=y 1350CONFIG_NFS_COMMON=y
1391CONFIG_SUNRPC=y 1351CONFIG_SUNRPC=y
1352# CONFIG_SUNRPC_BIND34 is not set
1392# CONFIG_RPCSEC_GSS_KRB5 is not set 1353# CONFIG_RPCSEC_GSS_KRB5 is not set
1393# CONFIG_RPCSEC_GSS_SPKM3 is not set 1354# CONFIG_RPCSEC_GSS_SPKM3 is not set
1394# CONFIG_SMB_FS is not set 1355# CONFIG_SMB_FS is not set
@@ -1418,6 +1379,7 @@ CONFIG_MSDOS_PARTITION=y
1418# CONFIG_SUN_PARTITION is not set 1379# CONFIG_SUN_PARTITION is not set
1419# CONFIG_KARMA_PARTITION is not set 1380# CONFIG_KARMA_PARTITION is not set
1420CONFIG_EFI_PARTITION=y 1381CONFIG_EFI_PARTITION=y
1382# CONFIG_SYSV68_PARTITION is not set
1421 1383
1422# 1384#
1423# Native Language Support 1385# Native Language Support
@@ -1468,7 +1430,6 @@ CONFIG_NLS_ISO8859_15=m
1468# 1430#
1469# CONFIG_DLM is not set 1431# CONFIG_DLM is not set
1470# CONFIG_UCC_SLOW is not set 1432# CONFIG_UCC_SLOW is not set
1471# CONFIG_UCC_FAST is not set
1472 1433
1473# 1434#
1474# Library routines 1435# Library routines
@@ -1476,6 +1437,7 @@ CONFIG_NLS_ISO8859_15=m
1476CONFIG_BITREVERSE=y 1437CONFIG_BITREVERSE=y
1477# CONFIG_CRC_CCITT is not set 1438# CONFIG_CRC_CCITT is not set
1478# CONFIG_CRC16 is not set 1439# CONFIG_CRC16 is not set
1440# CONFIG_CRC_ITU_T is not set
1479CONFIG_CRC32=y 1441CONFIG_CRC32=y
1480# CONFIG_LIBCRC32C is not set 1442# CONFIG_LIBCRC32C is not set
1481CONFIG_ZLIB_INFLATE=m 1443CONFIG_ZLIB_INFLATE=m
@@ -1487,6 +1449,7 @@ CONFIG_TEXTSEARCH_FSM=m
1487CONFIG_PLIST=y 1449CONFIG_PLIST=y
1488CONFIG_HAS_IOMEM=y 1450CONFIG_HAS_IOMEM=y
1489CONFIG_HAS_IOPORT=y 1451CONFIG_HAS_IOPORT=y
1452CONFIG_HAS_DMA=y
1490 1453
1491# 1454#
1492# Instrumentation Support 1455# Instrumentation Support
@@ -1506,7 +1469,6 @@ CONFIG_DEBUG_FS=y
1506# CONFIG_HEADERS_CHECK is not set 1469# CONFIG_HEADERS_CHECK is not set
1507CONFIG_DEBUG_KERNEL=y 1470CONFIG_DEBUG_KERNEL=y
1508# CONFIG_DEBUG_SHIRQ is not set 1471# CONFIG_DEBUG_SHIRQ is not set
1509CONFIG_LOG_BUF_SHIFT=15
1510# CONFIG_DETECT_SOFTLOCKUP is not set 1472# CONFIG_DETECT_SOFTLOCKUP is not set
1511# CONFIG_SCHEDSTATS is not set 1473# CONFIG_SCHEDSTATS is not set
1512# CONFIG_TIMER_STATS is not set 1474# CONFIG_TIMER_STATS is not set
@@ -1565,6 +1527,7 @@ CONFIG_CRYPTO_ECB=m
1565CONFIG_CRYPTO_CBC=m 1527CONFIG_CRYPTO_CBC=m
1566CONFIG_CRYPTO_PCBC=m 1528CONFIG_CRYPTO_PCBC=m
1567# CONFIG_CRYPTO_LRW is not set 1529# CONFIG_CRYPTO_LRW is not set
1530# CONFIG_CRYPTO_CRYPTD is not set
1568CONFIG_CRYPTO_DES=m 1531CONFIG_CRYPTO_DES=m
1569# CONFIG_CRYPTO_FCRYPT is not set 1532# CONFIG_CRYPTO_FCRYPT is not set
1570# CONFIG_CRYPTO_BLOWFISH is not set 1533# CONFIG_CRYPTO_BLOWFISH is not set
diff --git a/arch/powerpc/configs/celleb_defconfig b/arch/powerpc/configs/celleb_defconfig
index 91b657b339..0dc9874b46 100644
--- a/arch/powerpc/configs/celleb_defconfig
+++ b/arch/powerpc/configs/celleb_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.21 3# Linux kernel version: 2.6.22-rc6
4# Tue May 8 12:32:16 2007 4# Tue Jun 26 12:33:17 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -40,6 +40,7 @@ CONFIG_PPC_FPU=y
40CONFIG_PPC_OF_PLATFORM_PCI=y 40CONFIG_PPC_OF_PLATFORM_PCI=y
41CONFIG_ALTIVEC=y 41CONFIG_ALTIVEC=y
42CONFIG_PPC_STD_MMU=y 42CONFIG_PPC_STD_MMU=y
43CONFIG_PPC_MM_SLICES=y
43CONFIG_VIRT_CPU_ACCOUNTING=y 44CONFIG_VIRT_CPU_ACCOUNTING=y
44CONFIG_SMP=y 45CONFIG_SMP=y
45CONFIG_NR_CPUS=4 46CONFIG_NR_CPUS=4
@@ -68,6 +69,7 @@ CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_AUDIT is not set 69# CONFIG_AUDIT is not set
69CONFIG_IKCONFIG=y 70CONFIG_IKCONFIG=y
70CONFIG_IKCONFIG_PROC=y 71CONFIG_IKCONFIG_PROC=y
72CONFIG_LOG_BUF_SHIFT=15
71# CONFIG_CPUSETS is not set 73# CONFIG_CPUSETS is not set
72CONFIG_SYSFS_DEPRECATED=y 74CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 75# CONFIG_RELAY is not set
@@ -86,14 +88,19 @@ CONFIG_BUG=y
86CONFIG_ELF_CORE=y 88CONFIG_ELF_CORE=y
87CONFIG_BASE_FULL=y 89CONFIG_BASE_FULL=y
88CONFIG_FUTEX=y 90CONFIG_FUTEX=y
91CONFIG_ANON_INODES=y
89CONFIG_EPOLL=y 92CONFIG_EPOLL=y
93CONFIG_SIGNALFD=y
94CONFIG_TIMERFD=y
95CONFIG_EVENTFD=y
90CONFIG_SHMEM=y 96CONFIG_SHMEM=y
91CONFIG_SLAB=y
92CONFIG_VM_EVENT_COUNTERS=y 97CONFIG_VM_EVENT_COUNTERS=y
98CONFIG_SLAB=y
99# CONFIG_SLUB is not set
100# CONFIG_SLOB is not set
93CONFIG_RT_MUTEXES=y 101CONFIG_RT_MUTEXES=y
94# CONFIG_TINY_SHMEM is not set 102# CONFIG_TINY_SHMEM is not set
95CONFIG_BASE_SMALL=0 103CONFIG_BASE_SMALL=0
96# CONFIG_SLOB is not set
97 104
98# 105#
99# Loadable module support 106# Loadable module support
@@ -148,6 +155,7 @@ CONFIG_PPC_CELL=y
148# Cell Broadband Engine options 155# Cell Broadband Engine options
149# 156#
150CONFIG_SPU_FS=y 157CONFIG_SPU_FS=y
158CONFIG_SPU_FS_64K_LS=y
151CONFIG_SPU_BASE=y 159CONFIG_SPU_BASE=y
152# CONFIG_PQ2ADS is not set 160# CONFIG_PQ2ADS is not set
153CONFIG_PPC_UDBG_BEAT=y 161CONFIG_PPC_UDBG_BEAT=y
@@ -206,6 +214,7 @@ CONFIG_RESOURCES_64BIT=y
206CONFIG_ZONE_DMA_FLAG=1 214CONFIG_ZONE_DMA_FLAG=1
207CONFIG_ARCH_MEMORY_PROBE=y 215CONFIG_ARCH_MEMORY_PROBE=y
208CONFIG_NODES_SPAN_OTHER_NODES=y 216CONFIG_NODES_SPAN_OTHER_NODES=y
217CONFIG_PPC_HAS_HASH_64K=y
209# CONFIG_PPC_64K_PAGES is not set 218# CONFIG_PPC_64K_PAGES is not set
210# CONFIG_SCHED_SMT is not set 219# CONFIG_SCHED_SMT is not set
211CONFIG_PROC_DEVICETREE=y 220CONFIG_PROC_DEVICETREE=y
@@ -224,16 +233,14 @@ CONFIG_GENERIC_ISA_DMA=y
224CONFIG_PCI=y 233CONFIG_PCI=y
225CONFIG_PCI_DOMAINS=y 234CONFIG_PCI_DOMAINS=y
226# CONFIG_PCIEPORTBUS is not set 235# CONFIG_PCIEPORTBUS is not set
236CONFIG_ARCH_SUPPORTS_MSI=y
237# CONFIG_PCI_MSI is not set
227# CONFIG_PCI_DEBUG is not set 238# CONFIG_PCI_DEBUG is not set
228 239
229# 240#
230# PCCARD (PCMCIA/CardBus) support 241# PCCARD (PCMCIA/CardBus) support
231# 242#
232# CONFIG_PCCARD is not set 243# CONFIG_PCCARD is not set
233
234#
235# PCI Hotplug Support
236#
237# CONFIG_HOTPLUG_PCI is not set 244# CONFIG_HOTPLUG_PCI is not set
238CONFIG_KERNEL_START=0xc000000000000000 245CONFIG_KERNEL_START=0xc000000000000000
239 246
@@ -277,10 +284,6 @@ CONFIG_INET_TCP_DIAG=y
277CONFIG_TCP_CONG_CUBIC=y 284CONFIG_TCP_CONG_CUBIC=y
278CONFIG_DEFAULT_TCP_CONG="cubic" 285CONFIG_DEFAULT_TCP_CONG="cubic"
279# CONFIG_TCP_MD5SIG is not set 286# CONFIG_TCP_MD5SIG is not set
280
281#
282# IP: Virtual Server Configuration
283#
284# CONFIG_IP_VS is not set 287# CONFIG_IP_VS is not set
285CONFIG_IPV6=y 288CONFIG_IPV6=y
286# CONFIG_IPV6_PRIVACY is not set 289# CONFIG_IPV6_PRIVACY is not set
@@ -323,20 +326,8 @@ CONFIG_IP_NF_QUEUE=m
323# 326#
324# CONFIG_IP6_NF_QUEUE is not set 327# CONFIG_IP6_NF_QUEUE is not set
325# CONFIG_IP6_NF_IPTABLES is not set 328# CONFIG_IP6_NF_IPTABLES is not set
326
327#
328# DCCP Configuration (EXPERIMENTAL)
329#
330# CONFIG_IP_DCCP is not set 329# CONFIG_IP_DCCP is not set
331
332#
333# SCTP Configuration (EXPERIMENTAL)
334#
335# CONFIG_IP_SCTP is not set 330# CONFIG_IP_SCTP is not set
336
337#
338# TIPC Configuration (EXPERIMENTAL)
339#
340# CONFIG_TIPC is not set 331# CONFIG_TIPC is not set
341# CONFIG_ATM is not set 332# CONFIG_ATM is not set
342# CONFIG_BRIDGE is not set 333# CONFIG_BRIDGE is not set
@@ -369,7 +360,9 @@ CONFIG_IP_NF_QUEUE=m
369# 360#
370# CONFIG_CFG80211 is not set 361# CONFIG_CFG80211 is not set
371# CONFIG_WIRELESS_EXT is not set 362# CONFIG_WIRELESS_EXT is not set
363# CONFIG_MAC80211 is not set
372# CONFIG_IEEE80211 is not set 364# CONFIG_IEEE80211 is not set
365# CONFIG_RFKILL is not set
373 366
374# 367#
375# Device Drivers 368# Device Drivers
@@ -425,12 +418,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
425# 418#
426# Misc devices 419# Misc devices
427# 420#
421# CONFIG_PHANTOM is not set
428# CONFIG_SGI_IOC4 is not set 422# CONFIG_SGI_IOC4 is not set
429# CONFIG_TIFM_CORE is not set 423# CONFIG_TIFM_CORE is not set
430 424# CONFIG_BLINK is not set
431#
432# ATA/ATAPI/MFM/RLL support
433#
434CONFIG_IDE=y 425CONFIG_IDE=y
435CONFIG_BLK_DEV_IDE=y 426CONFIG_BLK_DEV_IDE=y
436 427
@@ -445,6 +436,7 @@ CONFIG_BLK_DEV_IDECD=m
445# CONFIG_BLK_DEV_IDEFLOPPY is not set 436# CONFIG_BLK_DEV_IDEFLOPPY is not set
446# CONFIG_BLK_DEV_IDESCSI is not set 437# CONFIG_BLK_DEV_IDESCSI is not set
447# CONFIG_IDE_TASK_IOCTL is not set 438# CONFIG_IDE_TASK_IOCTL is not set
439CONFIG_IDE_PROC_FS=y
448 440
449# 441#
450# IDE chipset support/bugfixes 442# IDE chipset support/bugfixes
@@ -452,6 +444,7 @@ CONFIG_BLK_DEV_IDECD=m
452CONFIG_IDE_GENERIC=y 444CONFIG_IDE_GENERIC=y
453CONFIG_BLK_DEV_IDEPCI=y 445CONFIG_BLK_DEV_IDEPCI=y
454CONFIG_IDEPCI_SHARE_IRQ=y 446CONFIG_IDEPCI_SHARE_IRQ=y
447CONFIG_IDEPCI_PCIBUS_ORDER=y
455# CONFIG_BLK_DEV_OFFBOARD is not set 448# CONFIG_BLK_DEV_OFFBOARD is not set
456CONFIG_BLK_DEV_GENERIC=y 449CONFIG_BLK_DEV_GENERIC=y
457# CONFIG_BLK_DEV_OPTI621 is not set 450# CONFIG_BLK_DEV_OPTI621 is not set
@@ -516,6 +509,7 @@ CONFIG_SCSI_MULTI_LUN=y
516# CONFIG_SCSI_CONSTANTS is not set 509# CONFIG_SCSI_CONSTANTS is not set
517# CONFIG_SCSI_LOGGING is not set 510# CONFIG_SCSI_LOGGING is not set
518# CONFIG_SCSI_SCAN_ASYNC is not set 511# CONFIG_SCSI_SCAN_ASYNC is not set
512CONFIG_SCSI_WAIT_SCAN=m
519 513
520# 514#
521# SCSI Transports 515# SCSI Transports
@@ -560,12 +554,7 @@ CONFIG_SCSI_MULTI_LUN=y
560# CONFIG_SCSI_DC395x is not set 554# CONFIG_SCSI_DC395x is not set
561# CONFIG_SCSI_DC390T is not set 555# CONFIG_SCSI_DC390T is not set
562# CONFIG_SCSI_DEBUG is not set 556# CONFIG_SCSI_DEBUG is not set
563# CONFIG_SCSI_ESP_CORE is not set
564# CONFIG_SCSI_SRP is not set 557# CONFIG_SCSI_SRP is not set
565
566#
567# Serial ATA (prod) and Parallel ATA (experimental) drivers
568#
569# CONFIG_ATA is not set 558# CONFIG_ATA is not set
570 559
571# 560#
@@ -588,6 +577,7 @@ CONFIG_DM_MIRROR=m
588CONFIG_DM_ZERO=m 577CONFIG_DM_ZERO=m
589CONFIG_DM_MULTIPATH=m 578CONFIG_DM_MULTIPATH=m
590# CONFIG_DM_MULTIPATH_EMC is not set 579# CONFIG_DM_MULTIPATH_EMC is not set
580# CONFIG_DM_DELAY is not set
591 581
592# 582#
593# Fusion MPT device support 583# Fusion MPT device support
@@ -600,6 +590,7 @@ CONFIG_DM_MULTIPATH=m
600# 590#
601# IEEE 1394 (FireWire) support 591# IEEE 1394 (FireWire) support
602# 592#
593# CONFIG_FIREWIRE is not set
603# CONFIG_IEEE1394 is not set 594# CONFIG_IEEE1394 is not set
604 595
605# 596#
@@ -616,15 +607,7 @@ CONFIG_NETDEVICES=y
616# CONFIG_BONDING is not set 607# CONFIG_BONDING is not set
617# CONFIG_EQUALIZER is not set 608# CONFIG_EQUALIZER is not set
618# CONFIG_TUN is not set 609# CONFIG_TUN is not set
619
620#
621# ARCnet devices
622#
623# CONFIG_ARCNET is not set 610# CONFIG_ARCNET is not set
624
625#
626# PHY device support
627#
628# CONFIG_PHYLIB is not set 611# CONFIG_PHYLIB is not set
629 612
630# 613#
@@ -643,10 +626,7 @@ CONFIG_MII=y
643# CONFIG_NET_TULIP is not set 626# CONFIG_NET_TULIP is not set
644# CONFIG_HP100 is not set 627# CONFIG_HP100 is not set
645# CONFIG_NET_PCI is not set 628# CONFIG_NET_PCI is not set
646 629CONFIG_NETDEV_1000=y
647#
648# Ethernet (1000 Mbit)
649#
650# CONFIG_ACENIC is not set 630# CONFIG_ACENIC is not set
651# CONFIG_DL2K is not set 631# CONFIG_DL2K is not set
652# CONFIG_E1000 is not set 632# CONFIG_E1000 is not set
@@ -658,15 +638,13 @@ CONFIG_MII=y
658# CONFIG_SKGE is not set 638# CONFIG_SKGE is not set
659# CONFIG_SKY2 is not set 639# CONFIG_SKY2 is not set
660# CONFIG_SK98LIN is not set 640# CONFIG_SK98LIN is not set
641# CONFIG_VIA_VELOCITY is not set
661# CONFIG_TIGON3 is not set 642# CONFIG_TIGON3 is not set
662# CONFIG_BNX2 is not set 643# CONFIG_BNX2 is not set
663CONFIG_SPIDER_NET=y 644CONFIG_SPIDER_NET=y
664# CONFIG_QLA3XXX is not set 645# CONFIG_QLA3XXX is not set
665# CONFIG_ATL1 is not set 646# CONFIG_ATL1 is not set
666 647CONFIG_NETDEV_10000=y
667#
668# Ethernet (10000 Mbit)
669#
670# CONFIG_CHELSIO_T1 is not set 648# CONFIG_CHELSIO_T1 is not set
671# CONFIG_CHELSIO_T3 is not set 649# CONFIG_CHELSIO_T3 is not set
672# CONFIG_IXGB is not set 650# CONFIG_IXGB is not set
@@ -674,10 +652,7 @@ CONFIG_SPIDER_NET=y
674# CONFIG_MYRI10GE is not set 652# CONFIG_MYRI10GE is not set
675# CONFIG_NETXEN_NIC is not set 653# CONFIG_NETXEN_NIC is not set
676# CONFIG_PASEMI_MAC is not set 654# CONFIG_PASEMI_MAC is not set
677 655# CONFIG_MLX4_CORE is not set
678#
679# Token Ring devices
680#
681# CONFIG_TR is not set 656# CONFIG_TR is not set
682 657
683# 658#
@@ -687,8 +662,14 @@ CONFIG_SPIDER_NET=y
687# CONFIG_WLAN_80211 is not set 662# CONFIG_WLAN_80211 is not set
688 663
689# 664#
690# Wan interfaces 665# USB Network Adapters
691# 666#
667# CONFIG_USB_CATC is not set
668# CONFIG_USB_KAWETH is not set
669# CONFIG_USB_PEGASUS is not set
670# CONFIG_USB_RTL8150 is not set
671# CONFIG_USB_USBNET_MII is not set
672# CONFIG_USB_USBNET is not set
692# CONFIG_WAN is not set 673# CONFIG_WAN is not set
693# CONFIG_FDDI is not set 674# CONFIG_FDDI is not set
694# CONFIG_HIPPI is not set 675# CONFIG_HIPPI is not set
@@ -715,6 +696,7 @@ CONFIG_SPIDER_NET=y
715# 696#
716CONFIG_INPUT=y 697CONFIG_INPUT=y
717# CONFIG_INPUT_FF_MEMLESS is not set 698# CONFIG_INPUT_FF_MEMLESS is not set
699# CONFIG_INPUT_POLLDEV is not set
718 700
719# 701#
720# Userland interfaces 702# Userland interfaces
@@ -734,6 +716,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
734# CONFIG_INPUT_KEYBOARD is not set 716# CONFIG_INPUT_KEYBOARD is not set
735# CONFIG_INPUT_MOUSE is not set 717# CONFIG_INPUT_MOUSE is not set
736# CONFIG_INPUT_JOYSTICK is not set 718# CONFIG_INPUT_JOYSTICK is not set
719# CONFIG_INPUT_TABLET is not set
737# CONFIG_INPUT_TOUCHSCREEN is not set 720# CONFIG_INPUT_TOUCHSCREEN is not set
738# CONFIG_INPUT_MISC is not set 721# CONFIG_INPUT_MISC is not set
739 722
@@ -797,10 +780,6 @@ CONFIG_HVC_BEAT=y
797# IPMI 780# IPMI
798# 781#
799# CONFIG_IPMI_HANDLER is not set 782# CONFIG_IPMI_HANDLER is not set
800
801#
802# Watchdog Cards
803#
804CONFIG_WATCHDOG=y 783CONFIG_WATCHDOG=y
805# CONFIG_WATCHDOG_NOWAYOUT is not set 784# CONFIG_WATCHDOG_NOWAYOUT is not set
806 785
@@ -822,7 +801,6 @@ CONFIG_WATCHDOG=y
822# CONFIG_HW_RANDOM is not set 801# CONFIG_HW_RANDOM is not set
823CONFIG_GEN_RTC=y 802CONFIG_GEN_RTC=y
824# CONFIG_GEN_RTC_X is not set 803# CONFIG_GEN_RTC_X is not set
825# CONFIG_DTLK is not set
826# CONFIG_R3964 is not set 804# CONFIG_R3964 is not set
827# CONFIG_APPLICOM is not set 805# CONFIG_APPLICOM is not set
828# CONFIG_AGP is not set 806# CONFIG_AGP is not set
@@ -834,11 +812,9 @@ CONFIG_GEN_RTC=y
834# TPM devices 812# TPM devices
835# 813#
836# CONFIG_TCG_TPM is not set 814# CONFIG_TCG_TPM is not set
837 815CONFIG_DEVPORT=y
838#
839# I2C support
840#
841CONFIG_I2C=y 816CONFIG_I2C=y
817CONFIG_I2C_BOARDINFO=y
842# CONFIG_I2C_CHARDEV is not set 818# CONFIG_I2C_CHARDEV is not set
843 819
844# 820#
@@ -864,14 +840,15 @@ CONFIG_I2C_ALGOBIT=y
864# CONFIG_I2C_PARPORT_LIGHT is not set 840# CONFIG_I2C_PARPORT_LIGHT is not set
865# CONFIG_I2C_PROSAVAGE is not set 841# CONFIG_I2C_PROSAVAGE is not set
866# CONFIG_I2C_SAVAGE4 is not set 842# CONFIG_I2C_SAVAGE4 is not set
843# CONFIG_I2C_SIMTEC is not set
867# CONFIG_I2C_SIS5595 is not set 844# CONFIG_I2C_SIS5595 is not set
868# CONFIG_I2C_SIS630 is not set 845# CONFIG_I2C_SIS630 is not set
869# CONFIG_I2C_SIS96X is not set 846# CONFIG_I2C_SIS96X is not set
870# CONFIG_I2C_STUB is not set 847# CONFIG_I2C_STUB is not set
848# CONFIG_I2C_TINY_USB is not set
871# CONFIG_I2C_VIA is not set 849# CONFIG_I2C_VIA is not set
872# CONFIG_I2C_VIAPRO is not set 850# CONFIG_I2C_VIAPRO is not set
873# CONFIG_I2C_VOODOO3 is not set 851# CONFIG_I2C_VOODOO3 is not set
874# CONFIG_I2C_PCA_ISA is not set
875 852
876# 853#
877# Miscellaneous I2C Chip support 854# Miscellaneous I2C Chip support
@@ -898,12 +875,7 @@ CONFIG_I2C_ALGOBIT=y
898# Dallas's 1-wire bus 875# Dallas's 1-wire bus
899# 876#
900# CONFIG_W1 is not set 877# CONFIG_W1 is not set
901
902#
903# Hardware Monitoring support
904#
905# CONFIG_HWMON is not set 878# CONFIG_HWMON is not set
906# CONFIG_HWMON_VID is not set
907 879
908# 880#
909# Multifunction device drivers 881# Multifunction device drivers
@@ -914,17 +886,19 @@ CONFIG_I2C_ALGOBIT=y
914# Multimedia devices 886# Multimedia devices
915# 887#
916# CONFIG_VIDEO_DEV is not set 888# CONFIG_VIDEO_DEV is not set
889# CONFIG_DVB_CORE is not set
890# CONFIG_DAB is not set
917 891
918# 892#
919# Digital Video Broadcasting Devices 893# Graphics support
920# 894#
921# CONFIG_DVB is not set 895# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
922# CONFIG_USB_DABUSB is not set
923 896
924# 897#
925# Graphics support 898# Display device support
926# 899#
927# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 900# CONFIG_DISPLAY_SUPPORT is not set
901# CONFIG_VGASTATE is not set
928# CONFIG_FB is not set 902# CONFIG_FB is not set
929# CONFIG_FB_IBM_GXT4500 is not set 903# CONFIG_FB_IBM_GXT4500 is not set
930 904
@@ -1015,37 +989,10 @@ CONFIG_USB_STORAGE=m
1015# CONFIG_USB_LIBUSUAL is not set 989# CONFIG_USB_LIBUSUAL is not set
1016 990
1017# 991#
1018# USB Input Devices
1019#
1020# CONFIG_USB_AIPTEK is not set
1021# CONFIG_USB_WACOM is not set
1022# CONFIG_USB_ACECAD is not set
1023# CONFIG_USB_KBTAB is not set
1024# CONFIG_USB_POWERMATE is not set
1025# CONFIG_USB_TOUCHSCREEN is not set
1026# CONFIG_USB_YEALINK is not set
1027# CONFIG_USB_XPAD is not set
1028# CONFIG_USB_ATI_REMOTE is not set
1029# CONFIG_USB_ATI_REMOTE2 is not set
1030# CONFIG_USB_KEYSPAN_REMOTE is not set
1031# CONFIG_USB_APPLETOUCH is not set
1032# CONFIG_USB_GTCO is not set
1033
1034#
1035# USB Imaging devices 992# USB Imaging devices
1036# 993#
1037# CONFIG_USB_MDC800 is not set 994# CONFIG_USB_MDC800 is not set
1038# CONFIG_USB_MICROTEK is not set 995# CONFIG_USB_MICROTEK is not set
1039
1040#
1041# USB Network Adapters
1042#
1043# CONFIG_USB_CATC is not set
1044# CONFIG_USB_KAWETH is not set
1045# CONFIG_USB_PEGASUS is not set
1046# CONFIG_USB_RTL8150 is not set
1047# CONFIG_USB_USBNET_MII is not set
1048# CONFIG_USB_USBNET is not set
1049CONFIG_USB_MON=y 996CONFIG_USB_MON=y
1050 997
1051# 998#
@@ -1089,10 +1036,6 @@ CONFIG_USB_MON=y
1089# USB Gadget Support 1036# USB Gadget Support
1090# 1037#
1091# CONFIG_USB_GADGET is not set 1038# CONFIG_USB_GADGET is not set
1092
1093#
1094# MMC/SD Card support
1095#
1096# CONFIG_MMC is not set 1039# CONFIG_MMC is not set
1097 1040
1098# 1041#
@@ -1136,14 +1079,6 @@ CONFIG_USB_MON=y
1136# 1079#
1137 1080
1138# 1081#
1139# Auxiliary Display support
1140#
1141
1142#
1143# Virtualization
1144#
1145
1146#
1147# File systems 1082# File systems
1148# 1083#
1149CONFIG_EXT2_FS=y 1084CONFIG_EXT2_FS=y
@@ -1246,6 +1181,7 @@ CONFIG_EXPORTFS=m
1246CONFIG_NFS_ACL_SUPPORT=m 1181CONFIG_NFS_ACL_SUPPORT=m
1247CONFIG_NFS_COMMON=y 1182CONFIG_NFS_COMMON=y
1248CONFIG_SUNRPC=m 1183CONFIG_SUNRPC=m
1184# CONFIG_SUNRPC_BIND34 is not set
1249# CONFIG_RPCSEC_GSS_KRB5 is not set 1185# CONFIG_RPCSEC_GSS_KRB5 is not set
1250# CONFIG_RPCSEC_GSS_SPKM3 is not set 1186# CONFIG_RPCSEC_GSS_SPKM3 is not set
1251# CONFIG_SMB_FS is not set 1187# CONFIG_SMB_FS is not set
@@ -1275,6 +1211,7 @@ CONFIG_MSDOS_PARTITION=y
1275# CONFIG_SUN_PARTITION is not set 1211# CONFIG_SUN_PARTITION is not set
1276# CONFIG_KARMA_PARTITION is not set 1212# CONFIG_KARMA_PARTITION is not set
1277CONFIG_EFI_PARTITION=y 1213CONFIG_EFI_PARTITION=y
1214# CONFIG_SYSV68_PARTITION is not set
1278 1215
1279# 1216#
1280# Native Language Support 1217# Native Language Support
@@ -1325,7 +1262,6 @@ CONFIG_NLS_ISO8859_15=m
1325# 1262#
1326# CONFIG_DLM is not set 1263# CONFIG_DLM is not set
1327# CONFIG_UCC_SLOW is not set 1264# CONFIG_UCC_SLOW is not set
1328# CONFIG_UCC_FAST is not set
1329 1265
1330# 1266#
1331# Library routines 1267# Library routines
@@ -1333,6 +1269,7 @@ CONFIG_NLS_ISO8859_15=m
1333CONFIG_BITREVERSE=y 1269CONFIG_BITREVERSE=y
1334# CONFIG_CRC_CCITT is not set 1270# CONFIG_CRC_CCITT is not set
1335# CONFIG_CRC16 is not set 1271# CONFIG_CRC16 is not set
1272# CONFIG_CRC_ITU_T is not set
1336CONFIG_CRC32=y 1273CONFIG_CRC32=y
1337CONFIG_LIBCRC32C=m 1274CONFIG_LIBCRC32C=m
1338CONFIG_ZLIB_INFLATE=m 1275CONFIG_ZLIB_INFLATE=m
@@ -1340,6 +1277,7 @@ CONFIG_ZLIB_DEFLATE=m
1340CONFIG_PLIST=y 1277CONFIG_PLIST=y
1341CONFIG_HAS_IOMEM=y 1278CONFIG_HAS_IOMEM=y
1342CONFIG_HAS_IOPORT=y 1279CONFIG_HAS_IOPORT=y
1280CONFIG_HAS_DMA=y
1343 1281
1344# 1282#
1345# Instrumentation Support 1283# Instrumentation Support
@@ -1358,7 +1296,6 @@ CONFIG_DEBUG_FS=y
1358# CONFIG_HEADERS_CHECK is not set 1296# CONFIG_HEADERS_CHECK is not set
1359CONFIG_DEBUG_KERNEL=y 1297CONFIG_DEBUG_KERNEL=y
1360# CONFIG_DEBUG_SHIRQ is not set 1298# CONFIG_DEBUG_SHIRQ is not set
1361CONFIG_LOG_BUF_SHIFT=15
1362CONFIG_DETECT_SOFTLOCKUP=y 1299CONFIG_DETECT_SOFTLOCKUP=y
1363# CONFIG_SCHEDSTATS is not set 1300# CONFIG_SCHEDSTATS is not set
1364# CONFIG_TIMER_STATS is not set 1301# CONFIG_TIMER_STATS is not set
@@ -1395,6 +1332,7 @@ CONFIG_PPC_EARLY_DEBUG=y
1395# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set 1332# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
1396# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set 1333# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
1397CONFIG_PPC_EARLY_DEBUG_BEAT=y 1334CONFIG_PPC_EARLY_DEBUG_BEAT=y
1335# CONFIG_PPC_EARLY_DEBUG_44x is not set
1398 1336
1399# 1337#
1400# Security options 1338# Security options
@@ -1425,6 +1363,7 @@ CONFIG_CRYPTO_ECB=m
1425CONFIG_CRYPTO_CBC=m 1363CONFIG_CRYPTO_CBC=m
1426CONFIG_CRYPTO_PCBC=m 1364CONFIG_CRYPTO_PCBC=m
1427# CONFIG_CRYPTO_LRW is not set 1365# CONFIG_CRYPTO_LRW is not set
1366# CONFIG_CRYPTO_CRYPTD is not set
1428CONFIG_CRYPTO_DES=m 1367CONFIG_CRYPTO_DES=m
1429# CONFIG_CRYPTO_FCRYPT is not set 1368# CONFIG_CRYPTO_FCRYPT is not set
1430CONFIG_CRYPTO_BLOWFISH=m 1369CONFIG_CRYPTO_BLOWFISH=m
diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/chrp32_defconfig
index 029c9a0e73..7a747c4385 100644
--- a/arch/powerpc/configs/chrp32_defconfig
+++ b/arch/powerpc/configs/chrp32_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc5 3# Linux kernel version: 2.6.22-rc6
4# Mon Jan 22 22:12:58 2007 4# Tue Jun 26 12:36:45 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_CLASSIC32=y
34# CONFIG_PPC_83xx is not set 34# CONFIG_PPC_83xx is not set
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_PPC_FPU=y 42CONFIG_PPC_FPU=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_ALTIVEC is not set 45# CONFIG_ALTIVEC is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48CONFIG_SMP=y 49CONFIG_SMP=y
49CONFIG_NR_CPUS=4 50CONFIG_NR_CPUS=4
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 51CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -64,6 +65,7 @@ CONFIG_LOCALVERSION=""
64CONFIG_SWAP=y 65CONFIG_SWAP=y
65CONFIG_SYSVIPC=y 66CONFIG_SYSVIPC=y
66# CONFIG_IPC_NS is not set 67# CONFIG_IPC_NS is not set
68CONFIG_SYSVIPC_SYSCTL=y
67CONFIG_POSIX_MQUEUE=y 69CONFIG_POSIX_MQUEUE=y
68# CONFIG_BSD_PROCESS_ACCT is not set 70# CONFIG_BSD_PROCESS_ACCT is not set
69# CONFIG_TASKSTATS is not set 71# CONFIG_TASKSTATS is not set
@@ -71,9 +73,11 @@ CONFIG_POSIX_MQUEUE=y
71# CONFIG_AUDIT is not set 73# CONFIG_AUDIT is not set
72CONFIG_IKCONFIG=y 74CONFIG_IKCONFIG=y
73CONFIG_IKCONFIG_PROC=y 75CONFIG_IKCONFIG_PROC=y
76CONFIG_LOG_BUF_SHIFT=15
74# CONFIG_CPUSETS is not set 77# CONFIG_CPUSETS is not set
75CONFIG_SYSFS_DEPRECATED=y 78CONFIG_SYSFS_DEPRECATED=y
76# CONFIG_RELAY is not set 79# CONFIG_RELAY is not set
80CONFIG_BLK_DEV_INITRD=y
77CONFIG_INITRAMFS_SOURCE="" 81CONFIG_INITRAMFS_SOURCE=""
78# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 82# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
79CONFIG_SYSCTL=y 83CONFIG_SYSCTL=y
@@ -88,14 +92,19 @@ CONFIG_BUG=y
88CONFIG_ELF_CORE=y 92CONFIG_ELF_CORE=y
89CONFIG_BASE_FULL=y 93CONFIG_BASE_FULL=y
90CONFIG_FUTEX=y 94CONFIG_FUTEX=y
95CONFIG_ANON_INODES=y
91CONFIG_EPOLL=y 96CONFIG_EPOLL=y
97CONFIG_SIGNALFD=y
98CONFIG_TIMERFD=y
99CONFIG_EVENTFD=y
92CONFIG_SHMEM=y 100CONFIG_SHMEM=y
93CONFIG_SLAB=y
94CONFIG_VM_EVENT_COUNTERS=y 101CONFIG_VM_EVENT_COUNTERS=y
102CONFIG_SLAB=y
103# CONFIG_SLUB is not set
104# CONFIG_SLOB is not set
95CONFIG_RT_MUTEXES=y 105CONFIG_RT_MUTEXES=y
96# CONFIG_TINY_SHMEM is not set 106# CONFIG_TINY_SHMEM is not set
97CONFIG_BASE_SMALL=0 107CONFIG_BASE_SMALL=0
98# CONFIG_SLOB is not set
99 108
100# 109#
101# Loadable module support 110# Loadable module support
@@ -137,13 +146,18 @@ CONFIG_PPC_MULTIPLATFORM=y
137# CONFIG_APUS is not set 146# CONFIG_APUS is not set
138CONFIG_PPC_CHRP=y 147CONFIG_PPC_CHRP=y
139# CONFIG_PPC_MPC52xx is not set 148# CONFIG_PPC_MPC52xx is not set
149# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_EFIKA is not set 150# CONFIG_PPC_EFIKA is not set
141# CONFIG_PPC_LITE5200 is not set 151# CONFIG_PPC_LITE5200 is not set
142# CONFIG_PPC_PMAC is not set 152# CONFIG_PPC_PMAC is not set
143# CONFIG_PPC_CELL is not set 153# CONFIG_PPC_CELL is not set
144# CONFIG_PPC_CELL_NATIVE is not set 154# CONFIG_PPC_CELL_NATIVE is not set
155# CONFIG_PQ2ADS is not set
145CONFIG_PPC_NATIVE=y 156CONFIG_PPC_NATIVE=y
146# CONFIG_UDBG_RTAS_CONSOLE is not set 157# CONFIG_UDBG_RTAS_CONSOLE is not set
158CONFIG_MPIC=y
159# CONFIG_MPIC_WEIRD is not set
160CONFIG_PPC_I8259=y
147CONFIG_PPC_RTAS=y 161CONFIG_PPC_RTAS=y
148# CONFIG_RTAS_ERROR_LOGGING is not set 162# CONFIG_RTAS_ERROR_LOGGING is not set
149CONFIG_RTAS_PROC=y 163CONFIG_RTAS_PROC=y
@@ -154,8 +168,7 @@ CONFIG_PPC_MPC106=y
154# CONFIG_GENERIC_IOMAP is not set 168# CONFIG_GENERIC_IOMAP is not set
155# CONFIG_CPU_FREQ is not set 169# CONFIG_CPU_FREQ is not set
156# CONFIG_TAU is not set 170# CONFIG_TAU is not set
157# CONFIG_WANT_EARLY_SERIAL is not set 171# CONFIG_CPM2 is not set
158CONFIG_MPIC=y
159 172
160# 173#
161# Kernel options 174# Kernel options
@@ -186,33 +199,33 @@ CONFIG_FLAT_NODE_MEM_MAP=y
186# CONFIG_SPARSEMEM_STATIC is not set 199# CONFIG_SPARSEMEM_STATIC is not set
187CONFIG_SPLIT_PTLOCK_CPUS=4 200CONFIG_SPLIT_PTLOCK_CPUS=4
188# CONFIG_RESOURCES_64BIT is not set 201# CONFIG_RESOURCES_64BIT is not set
202CONFIG_ZONE_DMA_FLAG=1
189CONFIG_PROC_DEVICETREE=y 203CONFIG_PROC_DEVICETREE=y
190# CONFIG_CMDLINE_BOOL is not set 204# CONFIG_CMDLINE_BOOL is not set
191# CONFIG_PM is not set 205# CONFIG_PM is not set
192CONFIG_SECCOMP=y 206CONFIG_SECCOMP=y
207# CONFIG_WANT_DEVICE_TREE is not set
193CONFIG_ISA_DMA_API=y 208CONFIG_ISA_DMA_API=y
194 209
195# 210#
196# Bus options 211# Bus options
197# 212#
198CONFIG_ISA=y 213CONFIG_ISA=y
214CONFIG_ZONE_DMA=y
199CONFIG_GENERIC_ISA_DMA=y 215CONFIG_GENERIC_ISA_DMA=y
200# CONFIG_MPIC_WEIRD is not set
201CONFIG_PPC_I8259=y
202CONFIG_PPC_INDIRECT_PCI=y 216CONFIG_PPC_INDIRECT_PCI=y
217# CONFIG_PPC_INDIRECT_PCI_BE is not set
203CONFIG_PCI=y 218CONFIG_PCI=y
204CONFIG_PCI_DOMAINS=y 219CONFIG_PCI_DOMAINS=y
205# CONFIG_PCIEPORTBUS is not set 220# CONFIG_PCIEPORTBUS is not set
221CONFIG_ARCH_SUPPORTS_MSI=y
222# CONFIG_PCI_MSI is not set
206# CONFIG_PCI_DEBUG is not set 223# CONFIG_PCI_DEBUG is not set
207 224
208# 225#
209# PCCARD (PCMCIA/CardBus) support 226# PCCARD (PCMCIA/CardBus) support
210# 227#
211# CONFIG_PCCARD is not set 228# CONFIG_PCCARD is not set
212
213#
214# PCI Hotplug Support
215#
216# CONFIG_HOTPLUG_PCI is not set 229# CONFIG_HOTPLUG_PCI is not set
217 230
218# 231#
@@ -237,7 +250,6 @@ CONFIG_NET=y
237# 250#
238# Networking options 251# Networking options
239# 252#
240# CONFIG_NETDEBUG is not set
241CONFIG_PACKET=y 253CONFIG_PACKET=y
242# CONFIG_PACKET_MMAP is not set 254# CONFIG_PACKET_MMAP is not set
243CONFIG_UNIX=y 255CONFIG_UNIX=y
@@ -266,10 +278,6 @@ CONFIG_INET_TCP_DIAG=y
266CONFIG_TCP_CONG_CUBIC=y 278CONFIG_TCP_CONG_CUBIC=y
267CONFIG_DEFAULT_TCP_CONG="cubic" 279CONFIG_DEFAULT_TCP_CONG="cubic"
268# CONFIG_TCP_MD5SIG is not set 280# CONFIG_TCP_MD5SIG is not set
269
270#
271# IP: Virtual Server Configuration
272#
273# CONFIG_IP_VS is not set 281# CONFIG_IP_VS is not set
274# CONFIG_IPV6 is not set 282# CONFIG_IPV6 is not set
275# CONFIG_INET6_XFRM_TUNNEL is not set 283# CONFIG_INET6_XFRM_TUNNEL is not set
@@ -283,8 +291,6 @@ CONFIG_NETFILTER=y
283# 291#
284# CONFIG_NETFILTER_NETLINK is not set 292# CONFIG_NETFILTER_NETLINK is not set
285CONFIG_NF_CONNTRACK_ENABLED=m 293CONFIG_NF_CONNTRACK_ENABLED=m
286CONFIG_NF_CONNTRACK_SUPPORT=y
287# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
288CONFIG_NF_CONNTRACK=m 294CONFIG_NF_CONNTRACK=m
289# CONFIG_NF_CT_ACCT is not set 295# CONFIG_NF_CT_ACCT is not set
290# CONFIG_NF_CONNTRACK_MARK is not set 296# CONFIG_NF_CONNTRACK_MARK is not set
@@ -296,9 +302,37 @@ CONFIG_NF_CONNTRACK_FTP=m
296CONFIG_NF_CONNTRACK_IRC=m 302CONFIG_NF_CONNTRACK_IRC=m
297# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set 303# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
298# CONFIG_NF_CONNTRACK_PPTP is not set 304# CONFIG_NF_CONNTRACK_PPTP is not set
305# CONFIG_NF_CONNTRACK_SANE is not set
299CONFIG_NF_CONNTRACK_SIP=m 306CONFIG_NF_CONNTRACK_SIP=m
300CONFIG_NF_CONNTRACK_TFTP=m 307CONFIG_NF_CONNTRACK_TFTP=m
301# CONFIG_NETFILTER_XTABLES is not set 308CONFIG_NETFILTER_XTABLES=m
309# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
310# CONFIG_NETFILTER_XT_TARGET_MARK is not set
311# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
312# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
313# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
314# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
315# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set
316# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set
317# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set
318# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
319# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
320# CONFIG_NETFILTER_XT_MATCH_ESP is not set
321# CONFIG_NETFILTER_XT_MATCH_HELPER is not set
322# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
323# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
324# CONFIG_NETFILTER_XT_MATCH_MAC is not set
325# CONFIG_NETFILTER_XT_MATCH_MARK is not set
326# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
327# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
328# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
329# CONFIG_NETFILTER_XT_MATCH_REALM is not set
330# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
331# CONFIG_NETFILTER_XT_MATCH_STATE is not set
332# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
333# CONFIG_NETFILTER_XT_MATCH_STRING is not set
334# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
335# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
302 336
303# 337#
304# IP: Netfilter Configuration 338# IP: Netfilter Configuration
@@ -306,20 +340,38 @@ CONFIG_NF_CONNTRACK_TFTP=m
306CONFIG_NF_CONNTRACK_IPV4=m 340CONFIG_NF_CONNTRACK_IPV4=m
307CONFIG_NF_CONNTRACK_PROC_COMPAT=y 341CONFIG_NF_CONNTRACK_PROC_COMPAT=y
308# CONFIG_IP_NF_QUEUE is not set 342# CONFIG_IP_NF_QUEUE is not set
309 343CONFIG_IP_NF_IPTABLES=m
310# 344# CONFIG_IP_NF_MATCH_IPRANGE is not set
311# DCCP Configuration (EXPERIMENTAL) 345# CONFIG_IP_NF_MATCH_TOS is not set
312# 346# CONFIG_IP_NF_MATCH_RECENT is not set
347# CONFIG_IP_NF_MATCH_ECN is not set
348# CONFIG_IP_NF_MATCH_AH is not set
349# CONFIG_IP_NF_MATCH_TTL is not set
350# CONFIG_IP_NF_MATCH_OWNER is not set
351# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
352CONFIG_IP_NF_FILTER=m
353CONFIG_IP_NF_TARGET_REJECT=m
354CONFIG_IP_NF_TARGET_LOG=m
355# CONFIG_IP_NF_TARGET_ULOG is not set
356CONFIG_NF_NAT=m
357CONFIG_NF_NAT_NEEDED=y
358CONFIG_IP_NF_TARGET_MASQUERADE=m
359CONFIG_IP_NF_TARGET_REDIRECT=m
360# CONFIG_IP_NF_TARGET_NETMAP is not set
361# CONFIG_IP_NF_TARGET_SAME is not set
362# CONFIG_NF_NAT_SNMP_BASIC is not set
363CONFIG_NF_NAT_FTP=m
364CONFIG_NF_NAT_IRC=m
365CONFIG_NF_NAT_TFTP=m
366# CONFIG_NF_NAT_AMANDA is not set
367# CONFIG_NF_NAT_PPTP is not set
368# CONFIG_NF_NAT_H323 is not set
369CONFIG_NF_NAT_SIP=m
370# CONFIG_IP_NF_MANGLE is not set
371# CONFIG_IP_NF_RAW is not set
372# CONFIG_IP_NF_ARPTABLES is not set
313# CONFIG_IP_DCCP is not set 373# CONFIG_IP_DCCP is not set
314
315#
316# SCTP Configuration (EXPERIMENTAL)
317#
318# CONFIG_IP_SCTP is not set 374# CONFIG_IP_SCTP is not set
319
320#
321# TIPC Configuration (EXPERIMENTAL)
322#
323# CONFIG_TIPC is not set 375# CONFIG_TIPC is not set
324# CONFIG_ATM is not set 376# CONFIG_ATM is not set
325# CONFIG_BRIDGE is not set 377# CONFIG_BRIDGE is not set
@@ -345,7 +397,16 @@ CONFIG_NF_CONNTRACK_PROC_COMPAT=y
345# CONFIG_HAMRADIO is not set 397# CONFIG_HAMRADIO is not set
346# CONFIG_IRDA is not set 398# CONFIG_IRDA is not set
347# CONFIG_BT is not set 399# CONFIG_BT is not set
400# CONFIG_AF_RXRPC is not set
401
402#
403# Wireless
404#
405# CONFIG_CFG80211 is not set
406# CONFIG_WIRELESS_EXT is not set
407# CONFIG_MAC80211 is not set
348# CONFIG_IEEE80211 is not set 408# CONFIG_IEEE80211 is not set
409# CONFIG_RFKILL is not set
349 410
350# 411#
351# Device Drivers 412# Device Drivers
@@ -358,16 +419,13 @@ CONFIG_NF_CONNTRACK_PROC_COMPAT=y
358CONFIG_PREVENT_FIRMWARE_BUILD=y 419CONFIG_PREVENT_FIRMWARE_BUILD=y
359# CONFIG_FW_LOADER is not set 420# CONFIG_FW_LOADER is not set
360# CONFIG_DEBUG_DRIVER is not set 421# CONFIG_DEBUG_DRIVER is not set
422# CONFIG_DEBUG_DEVRES is not set
361# CONFIG_SYS_HYPERVISOR is not set 423# CONFIG_SYS_HYPERVISOR is not set
362 424
363# 425#
364# Connector - unified userspace <-> kernelspace linker 426# Connector - unified userspace <-> kernelspace linker
365# 427#
366# CONFIG_CONNECTOR is not set 428# CONFIG_CONNECTOR is not set
367
368#
369# Memory Technology Devices (MTD)
370#
371# CONFIG_MTD is not set 429# CONFIG_MTD is not set
372 430
373# 431#
@@ -379,6 +437,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
379# Plug and Play support 437# Plug and Play support
380# 438#
381# CONFIG_PNP is not set 439# CONFIG_PNP is not set
440# CONFIG_PNPACPI is not set
382 441
383# 442#
384# Block devices 443# Block devices
@@ -399,19 +458,16 @@ CONFIG_BLK_DEV_RAM=y
399CONFIG_BLK_DEV_RAM_COUNT=16 458CONFIG_BLK_DEV_RAM_COUNT=16
400CONFIG_BLK_DEV_RAM_SIZE=4096 459CONFIG_BLK_DEV_RAM_SIZE=4096
401CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 460CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
402CONFIG_BLK_DEV_INITRD=y
403# CONFIG_CDROM_PKTCDVD is not set 461# CONFIG_CDROM_PKTCDVD is not set
404# CONFIG_ATA_OVER_ETH is not set 462# CONFIG_ATA_OVER_ETH is not set
405 463
406# 464#
407# Misc devices 465# Misc devices
408# 466#
467# CONFIG_PHANTOM is not set
409# CONFIG_SGI_IOC4 is not set 468# CONFIG_SGI_IOC4 is not set
410# CONFIG_TIFM_CORE is not set 469# CONFIG_TIFM_CORE is not set
411 470# CONFIG_BLINK is not set
412#
413# ATA/ATAPI/MFM/RLL support
414#
415CONFIG_IDE=y 471CONFIG_IDE=y
416CONFIG_BLK_DEV_IDE=y 472CONFIG_BLK_DEV_IDE=y
417 473
@@ -426,6 +482,7 @@ CONFIG_BLK_DEV_IDECD=y
426# CONFIG_BLK_DEV_IDEFLOPPY is not set 482# CONFIG_BLK_DEV_IDEFLOPPY is not set
427# CONFIG_BLK_DEV_IDESCSI is not set 483# CONFIG_BLK_DEV_IDESCSI is not set
428# CONFIG_IDE_TASK_IOCTL is not set 484# CONFIG_IDE_TASK_IOCTL is not set
485CONFIG_IDE_PROC_FS=y
429 486
430# 487#
431# IDE chipset support/bugfixes 488# IDE chipset support/bugfixes
@@ -433,12 +490,12 @@ CONFIG_BLK_DEV_IDECD=y
433CONFIG_IDE_GENERIC=y 490CONFIG_IDE_GENERIC=y
434CONFIG_BLK_DEV_IDEPCI=y 491CONFIG_BLK_DEV_IDEPCI=y
435CONFIG_IDEPCI_SHARE_IRQ=y 492CONFIG_IDEPCI_SHARE_IRQ=y
493CONFIG_IDEPCI_PCIBUS_ORDER=y
436# CONFIG_BLK_DEV_OFFBOARD is not set 494# CONFIG_BLK_DEV_OFFBOARD is not set
437CONFIG_BLK_DEV_GENERIC=y 495CONFIG_BLK_DEV_GENERIC=y
438# CONFIG_BLK_DEV_OPTI621 is not set 496# CONFIG_BLK_DEV_OPTI621 is not set
439CONFIG_BLK_DEV_IDEDMA_PCI=y 497CONFIG_BLK_DEV_IDEDMA_PCI=y
440# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 498# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
441CONFIG_IDEDMA_PCI_AUTO=y
442# CONFIG_IDEDMA_ONLYDISK is not set 499# CONFIG_IDEDMA_ONLYDISK is not set
443# CONFIG_BLK_DEV_AEC62XX is not set 500# CONFIG_BLK_DEV_AEC62XX is not set
444# CONFIG_BLK_DEV_ALI15X3 is not set 501# CONFIG_BLK_DEV_ALI15X3 is not set
@@ -453,6 +510,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
453# CONFIG_BLK_DEV_JMICRON is not set 510# CONFIG_BLK_DEV_JMICRON is not set
454# CONFIG_BLK_DEV_SC1200 is not set 511# CONFIG_BLK_DEV_SC1200 is not set
455# CONFIG_BLK_DEV_PIIX is not set 512# CONFIG_BLK_DEV_PIIX is not set
513# CONFIG_BLK_DEV_IT8213 is not set
456# CONFIG_BLK_DEV_IT821X is not set 514# CONFIG_BLK_DEV_IT821X is not set
457# CONFIG_BLK_DEV_NS87415 is not set 515# CONFIG_BLK_DEV_NS87415 is not set
458# CONFIG_BLK_DEV_PDC202XX_OLD is not set 516# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -463,11 +521,11 @@ CONFIG_BLK_DEV_SL82C105=y
463# CONFIG_BLK_DEV_SLC90E66 is not set 521# CONFIG_BLK_DEV_SLC90E66 is not set
464# CONFIG_BLK_DEV_TRM290 is not set 522# CONFIG_BLK_DEV_TRM290 is not set
465CONFIG_BLK_DEV_VIA82CXXX=y 523CONFIG_BLK_DEV_VIA82CXXX=y
524# CONFIG_BLK_DEV_TC86C001 is not set
466# CONFIG_IDE_ARM is not set 525# CONFIG_IDE_ARM is not set
467# CONFIG_IDE_CHIPSETS is not set 526# CONFIG_IDE_CHIPSETS is not set
468CONFIG_BLK_DEV_IDEDMA=y 527CONFIG_BLK_DEV_IDEDMA=y
469# CONFIG_IDEDMA_IVB is not set 528# CONFIG_IDEDMA_IVB is not set
470CONFIG_IDEDMA_AUTO=y
471# CONFIG_BLK_DEV_HD is not set 529# CONFIG_BLK_DEV_HD is not set
472 530
473# 531#
@@ -497,6 +555,7 @@ CONFIG_CHR_DEV_SG=y
497CONFIG_SCSI_CONSTANTS=y 555CONFIG_SCSI_CONSTANTS=y
498# CONFIG_SCSI_LOGGING is not set 556# CONFIG_SCSI_LOGGING is not set
499# CONFIG_SCSI_SCAN_ASYNC is not set 557# CONFIG_SCSI_SCAN_ASYNC is not set
558CONFIG_SCSI_WAIT_SCAN=m
500 559
501# 560#
502# SCSI Transports 561# SCSI Transports
@@ -562,10 +621,6 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y
562# CONFIG_SCSI_NSP32 is not set 621# CONFIG_SCSI_NSP32 is not set
563# CONFIG_SCSI_DEBUG is not set 622# CONFIG_SCSI_DEBUG is not set
564# CONFIG_SCSI_SRP is not set 623# CONFIG_SCSI_SRP is not set
565
566#
567# Serial ATA (prod) and Parallel ATA (experimental) drivers
568#
569# CONFIG_ATA is not set 624# CONFIG_ATA is not set
570 625
571# 626#
@@ -589,18 +644,14 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y
589# 644#
590# IEEE 1394 (FireWire) support 645# IEEE 1394 (FireWire) support
591# 646#
647# CONFIG_FIREWIRE is not set
592# CONFIG_IEEE1394 is not set 648# CONFIG_IEEE1394 is not set
593 649
594# 650#
595# I2O device support 651# I2O device support
596# 652#
597# CONFIG_I2O is not set 653# CONFIG_I2O is not set
598 654# CONFIG_MACINTOSH_DRIVERS is not set
599#
600# Macintosh device drivers
601#
602# CONFIG_MAC_EMUMOUSEBTN is not set
603# CONFIG_WINDFARM is not set
604 655
605# 656#
606# Network device support 657# Network device support
@@ -610,15 +661,7 @@ CONFIG_NETDEVICES=y
610# CONFIG_BONDING is not set 661# CONFIG_BONDING is not set
611# CONFIG_EQUALIZER is not set 662# CONFIG_EQUALIZER is not set
612# CONFIG_TUN is not set 663# CONFIG_TUN is not set
613
614#
615# ARCnet devices
616#
617# CONFIG_ARCNET is not set 664# CONFIG_ARCNET is not set
618
619#
620# PHY device support
621#
622# CONFIG_PHYLIB is not set 665# CONFIG_PHYLIB is not set
623 666
624# 667#
@@ -677,10 +720,8 @@ CONFIG_8139TOO=y
677CONFIG_VIA_RHINE=y 720CONFIG_VIA_RHINE=y
678# CONFIG_VIA_RHINE_MMIO is not set 721# CONFIG_VIA_RHINE_MMIO is not set
679# CONFIG_VIA_RHINE_NAPI is not set 722# CONFIG_VIA_RHINE_NAPI is not set
680 723# CONFIG_SC92031 is not set
681# 724CONFIG_NETDEV_1000=y
682# Ethernet (1000 Mbit)
683#
684# CONFIG_ACENIC is not set 725# CONFIG_ACENIC is not set
685# CONFIG_DL2K is not set 726# CONFIG_DL2K is not set
686# CONFIG_E1000 is not set 727# CONFIG_E1000 is not set
@@ -696,33 +737,33 @@ CONFIG_VIA_RHINE=y
696# CONFIG_TIGON3 is not set 737# CONFIG_TIGON3 is not set
697# CONFIG_BNX2 is not set 738# CONFIG_BNX2 is not set
698CONFIG_MV643XX_ETH=y 739CONFIG_MV643XX_ETH=y
699# CONFIG_MV643XX_ETH_0 is not set
700# CONFIG_MV643XX_ETH_1 is not set
701# CONFIG_MV643XX_ETH_2 is not set
702# CONFIG_QLA3XXX is not set 740# CONFIG_QLA3XXX is not set
703 741# CONFIG_ATL1 is not set
704# 742CONFIG_NETDEV_10000=y
705# Ethernet (10000 Mbit)
706#
707# CONFIG_CHELSIO_T1 is not set 743# CONFIG_CHELSIO_T1 is not set
744# CONFIG_CHELSIO_T3 is not set
708# CONFIG_IXGB is not set 745# CONFIG_IXGB is not set
709# CONFIG_S2IO is not set 746# CONFIG_S2IO is not set
710# CONFIG_MYRI10GE is not set 747# CONFIG_MYRI10GE is not set
711# CONFIG_NETXEN_NIC is not set 748# CONFIG_NETXEN_NIC is not set
712 749# CONFIG_MLX4_CORE is not set
713#
714# Token Ring devices
715#
716# CONFIG_TR is not set 750# CONFIG_TR is not set
717 751
718# 752#
719# Wireless LAN (non-hamradio) 753# Wireless LAN
720# 754#
721# CONFIG_NET_RADIO is not set 755# CONFIG_WLAN_PRE80211 is not set
756# CONFIG_WLAN_80211 is not set
722 757
723# 758#
724# Wan interfaces 759# USB Network Adapters
725# 760#
761# CONFIG_USB_CATC is not set
762# CONFIG_USB_KAWETH is not set
763# CONFIG_USB_PEGASUS is not set
764# CONFIG_USB_RTL8150 is not set
765# CONFIG_USB_USBNET_MII is not set
766# CONFIG_USB_USBNET is not set
726# CONFIG_WAN is not set 767# CONFIG_WAN is not set
727# CONFIG_FDDI is not set 768# CONFIG_FDDI is not set
728# CONFIG_HIPPI is not set 769# CONFIG_HIPPI is not set
@@ -758,6 +799,7 @@ CONFIG_SLHC=m
758# 799#
759CONFIG_INPUT=y 800CONFIG_INPUT=y
760# CONFIG_INPUT_FF_MEMLESS is not set 801# CONFIG_INPUT_FF_MEMLESS is not set
802# CONFIG_INPUT_POLLDEV is not set
761 803
762# 804#
763# Userland interfaces 805# Userland interfaces
@@ -783,15 +825,28 @@ CONFIG_KEYBOARD_ATKBD=y
783# CONFIG_KEYBOARD_STOWAWAY is not set 825# CONFIG_KEYBOARD_STOWAWAY is not set
784CONFIG_INPUT_MOUSE=y 826CONFIG_INPUT_MOUSE=y
785CONFIG_MOUSE_PS2=y 827CONFIG_MOUSE_PS2=y
828CONFIG_MOUSE_PS2_ALPS=y
829CONFIG_MOUSE_PS2_LOGIPS2PP=y
830CONFIG_MOUSE_PS2_SYNAPTICS=y
831CONFIG_MOUSE_PS2_LIFEBOOK=y
832CONFIG_MOUSE_PS2_TRACKPOINT=y
833# CONFIG_MOUSE_PS2_TOUCHKIT is not set
786# CONFIG_MOUSE_SERIAL is not set 834# CONFIG_MOUSE_SERIAL is not set
835# CONFIG_MOUSE_APPLETOUCH is not set
787# CONFIG_MOUSE_INPORT is not set 836# CONFIG_MOUSE_INPORT is not set
788# CONFIG_MOUSE_LOGIBM is not set 837# CONFIG_MOUSE_LOGIBM is not set
789# CONFIG_MOUSE_PC110PAD is not set 838# CONFIG_MOUSE_PC110PAD is not set
790# CONFIG_MOUSE_VSXXXAA is not set 839# CONFIG_MOUSE_VSXXXAA is not set
791# CONFIG_INPUT_JOYSTICK is not set 840# CONFIG_INPUT_JOYSTICK is not set
841# CONFIG_INPUT_TABLET is not set
792# CONFIG_INPUT_TOUCHSCREEN is not set 842# CONFIG_INPUT_TOUCHSCREEN is not set
793CONFIG_INPUT_MISC=y 843CONFIG_INPUT_MISC=y
794# CONFIG_INPUT_PCSPKR is not set 844# CONFIG_INPUT_PCSPKR is not set
845# CONFIG_INPUT_ATI_REMOTE is not set
846# CONFIG_INPUT_ATI_REMOTE2 is not set
847# CONFIG_INPUT_KEYSPAN_REMOTE is not set
848# CONFIG_INPUT_POWERMATE is not set
849# CONFIG_INPUT_YEALINK is not set
795CONFIG_INPUT_UINPUT=y 850CONFIG_INPUT_UINPUT=y
796 851
797# 852#
@@ -831,6 +886,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
831CONFIG_SERIAL_CORE=y 886CONFIG_SERIAL_CORE=y
832CONFIG_SERIAL_CORE_CONSOLE=y 887CONFIG_SERIAL_CORE_CONSOLE=y
833# CONFIG_SERIAL_JSM is not set 888# CONFIG_SERIAL_JSM is not set
889# CONFIG_SERIAL_OF_PLATFORM is not set
834CONFIG_UNIX98_PTYS=y 890CONFIG_UNIX98_PTYS=y
835CONFIG_LEGACY_PTYS=y 891CONFIG_LEGACY_PTYS=y
836CONFIG_LEGACY_PTY_COUNT=256 892CONFIG_LEGACY_PTY_COUNT=256
@@ -841,10 +897,6 @@ CONFIG_BRIQ_PANEL=m
841# IPMI 897# IPMI
842# 898#
843# CONFIG_IPMI_HANDLER is not set 899# CONFIG_IPMI_HANDLER is not set
844
845#
846# Watchdog Cards
847#
848# CONFIG_WATCHDOG is not set 900# CONFIG_WATCHDOG is not set
849# CONFIG_HW_RANDOM is not set 901# CONFIG_HW_RANDOM is not set
850CONFIG_NVRAM=y 902CONFIG_NVRAM=y
@@ -861,11 +913,9 @@ CONFIG_GEN_RTC=y
861# TPM devices 913# TPM devices
862# 914#
863# CONFIG_TCG_TPM is not set 915# CONFIG_TCG_TPM is not set
864 916CONFIG_DEVPORT=y
865#
866# I2C support
867#
868CONFIG_I2C=y 917CONFIG_I2C=y
918CONFIG_I2C_BOARDINFO=y
869# CONFIG_I2C_CHARDEV is not set 919# CONFIG_I2C_CHARDEV is not set
870 920
871# 921#
@@ -893,10 +943,12 @@ CONFIG_I2C_ALGOBIT=y
893# CONFIG_I2C_PARPORT_LIGHT is not set 943# CONFIG_I2C_PARPORT_LIGHT is not set
894# CONFIG_I2C_PROSAVAGE is not set 944# CONFIG_I2C_PROSAVAGE is not set
895# CONFIG_I2C_SAVAGE4 is not set 945# CONFIG_I2C_SAVAGE4 is not set
946# CONFIG_I2C_SIMTEC is not set
896# CONFIG_I2C_SIS5595 is not set 947# CONFIG_I2C_SIS5595 is not set
897# CONFIG_I2C_SIS630 is not set 948# CONFIG_I2C_SIS630 is not set
898# CONFIG_I2C_SIS96X is not set 949# CONFIG_I2C_SIS96X is not set
899# CONFIG_I2C_STUB is not set 950# CONFIG_I2C_STUB is not set
951# CONFIG_I2C_TINY_USB is not set
900# CONFIG_I2C_VIA is not set 952# CONFIG_I2C_VIA is not set
901# CONFIG_I2C_VIAPRO is not set 953# CONFIG_I2C_VIAPRO is not set
902# CONFIG_I2C_VOODOO3 is not set 954# CONFIG_I2C_VOODOO3 is not set
@@ -928,37 +980,56 @@ CONFIG_I2C_ALGOBIT=y
928# Dallas's 1-wire bus 980# Dallas's 1-wire bus
929# 981#
930# CONFIG_W1 is not set 982# CONFIG_W1 is not set
983# CONFIG_HWMON is not set
931 984
932# 985#
933# Hardware Monitoring support 986# Multifunction device drivers
934# 987#
935# CONFIG_HWMON is not set 988# CONFIG_MFD_SM501 is not set
936# CONFIG_HWMON_VID is not set
937 989
938# 990#
939# Multimedia devices 991# Multimedia devices
940# 992#
941# CONFIG_VIDEO_DEV is not set 993# CONFIG_VIDEO_DEV is not set
994# CONFIG_DVB_CORE is not set
995# CONFIG_DAB is not set
942 996
943# 997#
944# Digital Video Broadcasting Devices 998# Graphics support
945# 999#
946# CONFIG_DVB is not set 1000CONFIG_BACKLIGHT_LCD_SUPPORT=y
947# CONFIG_USB_DABUSB is not set 1001CONFIG_BACKLIGHT_CLASS_DEVICE=y
1002CONFIG_LCD_CLASS_DEVICE=m
948 1003
949# 1004#
950# Graphics support 1005# Display device support
951# 1006#
952CONFIG_FIRMWARE_EDID=y 1007CONFIG_DISPLAY_SUPPORT=m
1008
1009#
1010# Display hardware drivers
1011#
1012# CONFIG_VGASTATE is not set
953CONFIG_FB=y 1013CONFIG_FB=y
1014CONFIG_FIRMWARE_EDID=y
954CONFIG_FB_DDC=y 1015CONFIG_FB_DDC=y
955CONFIG_FB_CFB_FILLRECT=y 1016CONFIG_FB_CFB_FILLRECT=y
956CONFIG_FB_CFB_COPYAREA=y 1017CONFIG_FB_CFB_COPYAREA=y
957CONFIG_FB_CFB_IMAGEBLIT=y 1018CONFIG_FB_CFB_IMAGEBLIT=y
1019# CONFIG_FB_SYS_FILLRECT is not set
1020# CONFIG_FB_SYS_COPYAREA is not set
1021# CONFIG_FB_SYS_IMAGEBLIT is not set
1022# CONFIG_FB_SYS_FOPS is not set
1023CONFIG_FB_DEFERRED_IO=y
1024# CONFIG_FB_SVGALIB is not set
958CONFIG_FB_MACMODES=y 1025CONFIG_FB_MACMODES=y
959# CONFIG_FB_BACKLIGHT is not set 1026CONFIG_FB_BACKLIGHT=y
960CONFIG_FB_MODE_HELPERS=y 1027CONFIG_FB_MODE_HELPERS=y
961CONFIG_FB_TILEBLITTING=y 1028CONFIG_FB_TILEBLITTING=y
1029
1030#
1031# Frame buffer hardware drivers
1032#
962# CONFIG_FB_CIRRUS is not set 1033# CONFIG_FB_CIRRUS is not set
963# CONFIG_FB_PM2 is not set 1034# CONFIG_FB_PM2 is not set
964# CONFIG_FB_CYBER2000 is not set 1035# CONFIG_FB_CYBER2000 is not set
@@ -978,12 +1049,15 @@ CONFIG_FB_MATROX_G=y
978# CONFIG_FB_MATROX_MULTIHEAD is not set 1049# CONFIG_FB_MATROX_MULTIHEAD is not set
979CONFIG_FB_RADEON=y 1050CONFIG_FB_RADEON=y
980CONFIG_FB_RADEON_I2C=y 1051CONFIG_FB_RADEON_I2C=y
1052CONFIG_FB_RADEON_BACKLIGHT=y
981# CONFIG_FB_RADEON_DEBUG is not set 1053# CONFIG_FB_RADEON_DEBUG is not set
982# CONFIG_FB_ATY128 is not set 1054# CONFIG_FB_ATY128 is not set
983CONFIG_FB_ATY=y 1055CONFIG_FB_ATY=y
984CONFIG_FB_ATY_CT=y 1056CONFIG_FB_ATY_CT=y
985# CONFIG_FB_ATY_GENERIC_LCD is not set 1057# CONFIG_FB_ATY_GENERIC_LCD is not set
986CONFIG_FB_ATY_GX=y 1058CONFIG_FB_ATY_GX=y
1059CONFIG_FB_ATY_BACKLIGHT=y
1060# CONFIG_FB_S3 is not set
987# CONFIG_FB_SAVAGE is not set 1061# CONFIG_FB_SAVAGE is not set
988# CONFIG_FB_SIS is not set 1062# CONFIG_FB_SIS is not set
989# CONFIG_FB_NEOMAGIC is not set 1063# CONFIG_FB_NEOMAGIC is not set
@@ -991,7 +1065,10 @@ CONFIG_FB_ATY_GX=y
991CONFIG_FB_3DFX=y 1065CONFIG_FB_3DFX=y
992# CONFIG_FB_3DFX_ACCEL is not set 1066# CONFIG_FB_3DFX_ACCEL is not set
993# CONFIG_FB_VOODOO1 is not set 1067# CONFIG_FB_VOODOO1 is not set
1068# CONFIG_FB_VT8623 is not set
994# CONFIG_FB_TRIDENT is not set 1069# CONFIG_FB_TRIDENT is not set
1070# CONFIG_FB_ARK is not set
1071# CONFIG_FB_PM3 is not set
995# CONFIG_FB_IBM_GXT4500 is not set 1072# CONFIG_FB_IBM_GXT4500 is not set
996# CONFIG_FB_VIRTUAL is not set 1073# CONFIG_FB_VIRTUAL is not set
997 1074
@@ -1007,15 +1084,10 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
1007# CONFIG_FONTS is not set 1084# CONFIG_FONTS is not set
1008CONFIG_FONT_8x8=y 1085CONFIG_FONT_8x8=y
1009CONFIG_FONT_8x16=y 1086CONFIG_FONT_8x16=y
1010
1011#
1012# Logo configuration
1013#
1014CONFIG_LOGO=y 1087CONFIG_LOGO=y
1015CONFIG_LOGO_LINUX_MONO=y 1088CONFIG_LOGO_LINUX_MONO=y
1016CONFIG_LOGO_LINUX_VGA16=y 1089CONFIG_LOGO_LINUX_VGA16=y
1017CONFIG_LOGO_LINUX_CLUT224=y 1090CONFIG_LOGO_LINUX_CLUT224=y
1018# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1019 1091
1020# 1092#
1021# Sound 1093# Sound
@@ -1026,6 +1098,15 @@ CONFIG_LOGO_LINUX_CLUT224=y
1026# HID Devices 1098# HID Devices
1027# 1099#
1028CONFIG_HID=y 1100CONFIG_HID=y
1101# CONFIG_HID_DEBUG is not set
1102
1103#
1104# USB Input Devices
1105#
1106CONFIG_USB_HID=y
1107# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1108# CONFIG_HID_FF is not set
1109# CONFIG_USB_HIDDEV is not set
1029 1110
1030# 1111#
1031# USB support 1112# USB support
@@ -1040,9 +1121,8 @@ CONFIG_USB=y
1040# Miscellaneous USB options 1121# Miscellaneous USB options
1041# 1122#
1042CONFIG_USB_DEVICEFS=y 1123CONFIG_USB_DEVICEFS=y
1043# CONFIG_USB_BANDWIDTH is not set 1124CONFIG_USB_DEVICE_CLASS=y
1044# CONFIG_USB_DYNAMIC_MINORS is not set 1125# CONFIG_USB_DYNAMIC_MINORS is not set
1045# CONFIG_USB_MULTITHREAD_PROBE is not set
1046# CONFIG_USB_OTG is not set 1126# CONFIG_USB_OTG is not set
1047 1127
1048# 1128#
@@ -1052,9 +1132,12 @@ CONFIG_USB_EHCI_HCD=m
1052# CONFIG_USB_EHCI_SPLIT_ISO is not set 1132# CONFIG_USB_EHCI_SPLIT_ISO is not set
1053# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1133# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1054# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1134# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1135# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1055# CONFIG_USB_ISP116X_HCD is not set 1136# CONFIG_USB_ISP116X_HCD is not set
1056CONFIG_USB_OHCI_HCD=y 1137CONFIG_USB_OHCI_HCD=y
1057# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1138# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1139# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1140# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1058CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1141CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1059CONFIG_USB_UHCI_HCD=y 1142CONFIG_USB_UHCI_HCD=y
1060# CONFIG_USB_SL811_HCD is not set 1143# CONFIG_USB_SL811_HCD is not set
@@ -1088,40 +1171,10 @@ CONFIG_USB_STORAGE=m
1088# CONFIG_USB_LIBUSUAL is not set 1171# CONFIG_USB_LIBUSUAL is not set
1089 1172
1090# 1173#
1091# USB Input Devices
1092#
1093CONFIG_USB_HID=y
1094# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1095# CONFIG_HID_FF is not set
1096# CONFIG_USB_HIDDEV is not set
1097# CONFIG_USB_AIPTEK is not set
1098# CONFIG_USB_WACOM is not set
1099# CONFIG_USB_ACECAD is not set
1100# CONFIG_USB_KBTAB is not set
1101# CONFIG_USB_POWERMATE is not set
1102# CONFIG_USB_TOUCHSCREEN is not set
1103# CONFIG_USB_YEALINK is not set
1104# CONFIG_USB_XPAD is not set
1105# CONFIG_USB_ATI_REMOTE is not set
1106# CONFIG_USB_ATI_REMOTE2 is not set
1107# CONFIG_USB_KEYSPAN_REMOTE is not set
1108# CONFIG_USB_APPLETOUCH is not set
1109
1110#
1111# USB Imaging devices 1174# USB Imaging devices
1112# 1175#
1113# CONFIG_USB_MDC800 is not set 1176# CONFIG_USB_MDC800 is not set
1114# CONFIG_USB_MICROTEK is not set 1177# CONFIG_USB_MICROTEK is not set
1115
1116#
1117# USB Network Adapters
1118#
1119# CONFIG_USB_CATC is not set
1120# CONFIG_USB_KAWETH is not set
1121# CONFIG_USB_PEGASUS is not set
1122# CONFIG_USB_RTL8150 is not set
1123# CONFIG_USB_USBNET_MII is not set
1124# CONFIG_USB_USBNET is not set
1125CONFIG_USB_MON=y 1178CONFIG_USB_MON=y
1126 1179
1127# 1180#
@@ -1143,6 +1196,7 @@ CONFIG_USB_MON=y
1143# CONFIG_USB_RIO500 is not set 1196# CONFIG_USB_RIO500 is not set
1144# CONFIG_USB_LEGOTOWER is not set 1197# CONFIG_USB_LEGOTOWER is not set
1145# CONFIG_USB_LCD is not set 1198# CONFIG_USB_LCD is not set
1199# CONFIG_USB_BERRY_CHARGE is not set
1146# CONFIG_USB_LED is not set 1200# CONFIG_USB_LED is not set
1147# CONFIG_USB_CYPRESS_CY7C63 is not set 1201# CONFIG_USB_CYPRESS_CY7C63 is not set
1148# CONFIG_USB_CYTHERM is not set 1202# CONFIG_USB_CYTHERM is not set
@@ -1153,6 +1207,7 @@ CONFIG_USB_MON=y
1153# CONFIG_USB_SISUSBVGA is not set 1207# CONFIG_USB_SISUSBVGA is not set
1154# CONFIG_USB_LD is not set 1208# CONFIG_USB_LD is not set
1155# CONFIG_USB_TRANCEVIBRATOR is not set 1209# CONFIG_USB_TRANCEVIBRATOR is not set
1210# CONFIG_USB_IOWARRIOR is not set
1156# CONFIG_USB_TEST is not set 1211# CONFIG_USB_TEST is not set
1157 1212
1158# 1213#
@@ -1163,10 +1218,6 @@ CONFIG_USB_MON=y
1163# USB Gadget Support 1218# USB Gadget Support
1164# 1219#
1165# CONFIG_USB_GADGET is not set 1220# CONFIG_USB_GADGET is not set
1166
1167#
1168# MMC/SD Card support
1169#
1170# CONFIG_MMC is not set 1221# CONFIG_MMC is not set
1171 1222
1172# 1223#
@@ -1210,10 +1261,6 @@ CONFIG_USB_MON=y
1210# 1261#
1211 1262
1212# 1263#
1213# Virtualization
1214#
1215
1216#
1217# File systems 1264# File systems
1218# 1265#
1219CONFIG_EXT2_FS=y 1266CONFIG_EXT2_FS=y
@@ -1323,6 +1370,7 @@ CONFIG_MSDOS_PARTITION=y
1323# CONFIG_SUN_PARTITION is not set 1370# CONFIG_SUN_PARTITION is not set
1324# CONFIG_KARMA_PARTITION is not set 1371# CONFIG_KARMA_PARTITION is not set
1325# CONFIG_EFI_PARTITION is not set 1372# CONFIG_EFI_PARTITION is not set
1373# CONFIG_SYSV68_PARTITION is not set
1326 1374
1327# 1375#
1328# Native Language Support 1376# Native Language Support
@@ -1372,6 +1420,7 @@ CONFIG_NLS_ISO8859_1=m
1372# Distributed Lock Manager 1420# Distributed Lock Manager
1373# 1421#
1374# CONFIG_DLM is not set 1422# CONFIG_DLM is not set
1423# CONFIG_UCC_SLOW is not set
1375 1424
1376# 1425#
1377# Library routines 1426# Library routines
@@ -1379,17 +1428,21 @@ CONFIG_NLS_ISO8859_1=m
1379CONFIG_BITREVERSE=y 1428CONFIG_BITREVERSE=y
1380CONFIG_CRC_CCITT=m 1429CONFIG_CRC_CCITT=m
1381# CONFIG_CRC16 is not set 1430# CONFIG_CRC16 is not set
1431# CONFIG_CRC_ITU_T is not set
1382CONFIG_CRC32=y 1432CONFIG_CRC32=y
1383# CONFIG_LIBCRC32C is not set 1433# CONFIG_LIBCRC32C is not set
1384CONFIG_ZLIB_INFLATE=m 1434CONFIG_ZLIB_INFLATE=m
1385CONFIG_ZLIB_DEFLATE=m 1435CONFIG_ZLIB_DEFLATE=m
1386CONFIG_PLIST=y 1436CONFIG_PLIST=y
1387CONFIG_IOMAP_COPY=y 1437CONFIG_HAS_IOMEM=y
1438CONFIG_HAS_IOPORT=y
1439CONFIG_HAS_DMA=y
1388 1440
1389# 1441#
1390# Instrumentation Support 1442# Instrumentation Support
1391# 1443#
1392# CONFIG_PROFILING is not set 1444# CONFIG_PROFILING is not set
1445# CONFIG_KPROBES is not set
1393 1446
1394# 1447#
1395# Kernel hacking 1448# Kernel hacking
@@ -1401,15 +1454,15 @@ CONFIG_MAGIC_SYSRQ=y
1401# CONFIG_DEBUG_FS is not set 1454# CONFIG_DEBUG_FS is not set
1402# CONFIG_HEADERS_CHECK is not set 1455# CONFIG_HEADERS_CHECK is not set
1403CONFIG_DEBUG_KERNEL=y 1456CONFIG_DEBUG_KERNEL=y
1404CONFIG_LOG_BUF_SHIFT=15 1457# CONFIG_DEBUG_SHIRQ is not set
1405CONFIG_DETECT_SOFTLOCKUP=y 1458CONFIG_DETECT_SOFTLOCKUP=y
1406# CONFIG_SCHEDSTATS is not set 1459# CONFIG_SCHEDSTATS is not set
1460# CONFIG_TIMER_STATS is not set
1407# CONFIG_DEBUG_SLAB is not set 1461# CONFIG_DEBUG_SLAB is not set
1408# CONFIG_DEBUG_RT_MUTEXES is not set 1462# CONFIG_DEBUG_RT_MUTEXES is not set
1409# CONFIG_RT_MUTEX_TESTER is not set 1463# CONFIG_RT_MUTEX_TESTER is not set
1410# CONFIG_DEBUG_SPINLOCK is not set 1464# CONFIG_DEBUG_SPINLOCK is not set
1411CONFIG_DEBUG_MUTEXES=y 1465CONFIG_DEBUG_MUTEXES=y
1412# CONFIG_DEBUG_RWSEMS is not set
1413CONFIG_DEBUG_SPINLOCK_SLEEP=y 1466CONFIG_DEBUG_SPINLOCK_SLEEP=y
1414# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1467# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1415# CONFIG_DEBUG_KOBJECT is not set 1468# CONFIG_DEBUG_KOBJECT is not set
@@ -1420,6 +1473,10 @@ CONFIG_DEBUG_BUGVERBOSE=y
1420# CONFIG_DEBUG_LIST is not set 1473# CONFIG_DEBUG_LIST is not set
1421CONFIG_FORCED_INLINING=y 1474CONFIG_FORCED_INLINING=y
1422# CONFIG_RCU_TORTURE_TEST is not set 1475# CONFIG_RCU_TORTURE_TEST is not set
1476# CONFIG_FAULT_INJECTION is not set
1477# CONFIG_DEBUG_STACKOVERFLOW is not set
1478# CONFIG_DEBUG_STACK_USAGE is not set
1479# CONFIG_DEBUG_PAGEALLOC is not set
1423CONFIG_DEBUGGER=y 1480CONFIG_DEBUGGER=y
1424CONFIG_XMON=y 1481CONFIG_XMON=y
1425CONFIG_XMON_DEFAULT=y 1482CONFIG_XMON_DEFAULT=y
@@ -1454,8 +1511,11 @@ CONFIG_CRYPTO_SHA1=m
1454# CONFIG_CRYPTO_GF128MUL is not set 1511# CONFIG_CRYPTO_GF128MUL is not set
1455CONFIG_CRYPTO_ECB=m 1512CONFIG_CRYPTO_ECB=m
1456CONFIG_CRYPTO_CBC=m 1513CONFIG_CRYPTO_CBC=m
1514CONFIG_CRYPTO_PCBC=m
1457# CONFIG_CRYPTO_LRW is not set 1515# CONFIG_CRYPTO_LRW is not set
1516# CONFIG_CRYPTO_CRYPTD is not set
1458# CONFIG_CRYPTO_DES is not set 1517# CONFIG_CRYPTO_DES is not set
1518# CONFIG_CRYPTO_FCRYPT is not set
1459# CONFIG_CRYPTO_BLOWFISH is not set 1519# CONFIG_CRYPTO_BLOWFISH is not set
1460# CONFIG_CRYPTO_TWOFISH is not set 1520# CONFIG_CRYPTO_TWOFISH is not set
1461# CONFIG_CRYPTO_SERPENT is not set 1521# CONFIG_CRYPTO_SERPENT is not set
@@ -1469,6 +1529,7 @@ CONFIG_CRYPTO_ARC4=m
1469# CONFIG_CRYPTO_DEFLATE is not set 1529# CONFIG_CRYPTO_DEFLATE is not set
1470# CONFIG_CRYPTO_MICHAEL_MIC is not set 1530# CONFIG_CRYPTO_MICHAEL_MIC is not set
1471# CONFIG_CRYPTO_CRC32C is not set 1531# CONFIG_CRYPTO_CRC32C is not set
1532# CONFIG_CRYPTO_CAMELLIA is not set
1472# CONFIG_CRYPTO_TEST is not set 1533# CONFIG_CRYPTO_TEST is not set
1473 1534
1474# 1535#
diff --git a/arch/powerpc/configs/ebony_defconfig b/arch/powerpc/configs/ebony_defconfig
index c3b96ef3c2..5762cddfc1 100644
--- a/arch/powerpc/configs/ebony_defconfig
+++ b/arch/powerpc/configs/ebony_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21 3# Linux kernel version: 2.6.22-rc6
4# Fri May 4 13:47:08 2007 4# Tue Jun 26 12:38:33 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_4xx=y
45CONFIG_BOOKE=y 45CONFIG_BOOKE=y
46CONFIG_PTE_64BIT=y 46CONFIG_PTE_64BIT=y
47CONFIG_PHYS_64BIT=y 47CONFIG_PHYS_64BIT=y
48# CONFIG_PPC_MM_SLICES is not set
48CONFIG_NOT_COHERENT_CACHE=y 49CONFIG_NOT_COHERENT_CACHE=y
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -70,6 +71,7 @@ CONFIG_POSIX_MQUEUE=y
70# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
71# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
73CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
75CONFIG_BLK_DEV_INITRD=y 77CONFIG_BLK_DEV_INITRD=y
@@ -87,14 +89,19 @@ CONFIG_BUG=y
87CONFIG_ELF_CORE=y 89CONFIG_ELF_CORE=y
88CONFIG_BASE_FULL=y 90CONFIG_BASE_FULL=y
89CONFIG_FUTEX=y 91CONFIG_FUTEX=y
92CONFIG_ANON_INODES=y
90CONFIG_EPOLL=y 93CONFIG_EPOLL=y
94CONFIG_SIGNALFD=y
95CONFIG_TIMERFD=y
96CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 97CONFIG_SHMEM=y
92CONFIG_SLAB=y
93CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLAB=y
100# CONFIG_SLUB is not set
101# CONFIG_SLOB is not set
94CONFIG_RT_MUTEXES=y 102CONFIG_RT_MUTEXES=y
95# CONFIG_TINY_SHMEM is not set 103# CONFIG_TINY_SHMEM is not set
96CONFIG_BASE_SMALL=0 104CONFIG_BASE_SMALL=0
97# CONFIG_SLOB is not set
98 105
99# 106#
100# Loadable module support 107# Loadable module support
@@ -193,16 +200,14 @@ CONFIG_PPC_INDIRECT_PCI=y
193CONFIG_PCI=y 200CONFIG_PCI=y
194CONFIG_PCI_DOMAINS=y 201CONFIG_PCI_DOMAINS=y
195# CONFIG_PCIEPORTBUS is not set 202# CONFIG_PCIEPORTBUS is not set
203CONFIG_ARCH_SUPPORTS_MSI=y
204# CONFIG_PCI_MSI is not set
196# CONFIG_PCI_DEBUG is not set 205# CONFIG_PCI_DEBUG is not set
197 206
198# 207#
199# PCCARD (PCMCIA/CardBus) support 208# PCCARD (PCMCIA/CardBus) support
200# 209#
201# CONFIG_PCCARD is not set 210# CONFIG_PCCARD is not set
202
203#
204# PCI Hotplug Support
205#
206# CONFIG_HOTPLUG_PCI is not set 211# CONFIG_HOTPLUG_PCI is not set
207 212
208# 213#
@@ -264,20 +269,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
264# CONFIG_INET6_TUNNEL is not set 269# CONFIG_INET6_TUNNEL is not set
265# CONFIG_NETWORK_SECMARK is not set 270# CONFIG_NETWORK_SECMARK is not set
266# CONFIG_NETFILTER is not set 271# CONFIG_NETFILTER is not set
267
268#
269# DCCP Configuration (EXPERIMENTAL)
270#
271# CONFIG_IP_DCCP is not set 272# CONFIG_IP_DCCP is not set
272
273#
274# SCTP Configuration (EXPERIMENTAL)
275#
276# CONFIG_IP_SCTP is not set 273# CONFIG_IP_SCTP is not set
277
278#
279# TIPC Configuration (EXPERIMENTAL)
280#
281# CONFIG_TIPC is not set 274# CONFIG_TIPC is not set
282# CONFIG_ATM is not set 275# CONFIG_ATM is not set
283# CONFIG_BRIDGE is not set 276# CONFIG_BRIDGE is not set
@@ -310,7 +303,9 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
310# 303#
311# CONFIG_CFG80211 is not set 304# CONFIG_CFG80211 is not set
312# CONFIG_WIRELESS_EXT is not set 305# CONFIG_WIRELESS_EXT is not set
306# CONFIG_MAC80211 is not set
313# CONFIG_IEEE80211 is not set 307# CONFIG_IEEE80211 is not set
308# CONFIG_RFKILL is not set
314 309
315# 310#
316# Device Drivers 311# Device Drivers
@@ -365,12 +360,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
365# 360#
366# Misc devices 361# Misc devices
367# 362#
363# CONFIG_PHANTOM is not set
368# CONFIG_SGI_IOC4 is not set 364# CONFIG_SGI_IOC4 is not set
369# CONFIG_TIFM_CORE is not set 365# CONFIG_TIFM_CORE is not set
370 366# CONFIG_BLINK is not set
371#
372# ATA/ATAPI/MFM/RLL support
373#
374# CONFIG_IDE is not set 367# CONFIG_IDE is not set
375 368
376# 369#
@@ -379,10 +372,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
379# CONFIG_RAID_ATTRS is not set 372# CONFIG_RAID_ATTRS is not set
380# CONFIG_SCSI is not set 373# CONFIG_SCSI is not set
381# CONFIG_SCSI_NETLINK is not set 374# CONFIG_SCSI_NETLINK is not set
382
383#
384# Serial ATA (prod) and Parallel ATA (experimental) drivers
385#
386# CONFIG_ATA is not set 375# CONFIG_ATA is not set
387 376
388# 377#
@@ -398,6 +387,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
398# 387#
399# IEEE 1394 (FireWire) support 388# IEEE 1394 (FireWire) support
400# 389#
390# CONFIG_FIREWIRE is not set
401# CONFIG_IEEE1394 is not set 391# CONFIG_IEEE1394 is not set
402 392
403# 393#
@@ -414,35 +404,21 @@ CONFIG_NETDEVICES=y
414# CONFIG_BONDING is not set 404# CONFIG_BONDING is not set
415# CONFIG_EQUALIZER is not set 405# CONFIG_EQUALIZER is not set
416# CONFIG_TUN is not set 406# CONFIG_TUN is not set
417
418#
419# ARCnet devices
420#
421# CONFIG_ARCNET is not set 407# CONFIG_ARCNET is not set
422 408
423# 409#
424# PHY device support
425#
426
427#
428# Ethernet (10 or 100Mbit) 410# Ethernet (10 or 100Mbit)
429# 411#
430# CONFIG_NET_ETHERNET is not set 412# CONFIG_NET_ETHERNET is not set
431CONFIG_IBM_NEW_EMAC=y 413CONFIG_IBM_EMAC=y
432CONFIG_IBM_NEW_EMAC_RXB=128 414CONFIG_IBM_EMAC_RXB=128
433CONFIG_IBM_NEW_EMAC_TXB=64 415CONFIG_IBM_EMAC_TXB=64
434CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32 416CONFIG_IBM_EMAC_POLL_WEIGHT=32
435CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256 417CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256
436CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0 418CONFIG_IBM_EMAC_RX_SKB_HEADROOM=0
437# CONFIG_IBM_NEW_EMAC_DEBUG is not set 419# CONFIG_IBM_EMAC_DEBUG is not set
438CONFIG_IBM_NEW_EMAC_ZMII=y 420CONFIG_IBM_EMAC_ZMII=y
439# CONFIG_IBM_NEW_EMAC_RGMII is not set 421CONFIG_NETDEV_1000=y
440# CONFIG_IBM_NEW_EMAC_TAH is not set
441# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
442
443#
444# Ethernet (1000 Mbit)
445#
446# CONFIG_ACENIC is not set 422# CONFIG_ACENIC is not set
447# CONFIG_DL2K is not set 423# CONFIG_DL2K is not set
448# CONFIG_E1000 is not set 424# CONFIG_E1000 is not set
@@ -454,24 +430,19 @@ CONFIG_IBM_NEW_EMAC_ZMII=y
454# CONFIG_SKGE is not set 430# CONFIG_SKGE is not set
455# CONFIG_SKY2 is not set 431# CONFIG_SKY2 is not set
456# CONFIG_SK98LIN is not set 432# CONFIG_SK98LIN is not set
433# CONFIG_VIA_VELOCITY is not set
457# CONFIG_TIGON3 is not set 434# CONFIG_TIGON3 is not set
458# CONFIG_BNX2 is not set 435# CONFIG_BNX2 is not set
459# CONFIG_QLA3XXX is not set 436# CONFIG_QLA3XXX is not set
460# CONFIG_ATL1 is not set 437# CONFIG_ATL1 is not set
461 438CONFIG_NETDEV_10000=y
462#
463# Ethernet (10000 Mbit)
464#
465# CONFIG_CHELSIO_T1 is not set 439# CONFIG_CHELSIO_T1 is not set
466# CONFIG_CHELSIO_T3 is not set 440# CONFIG_CHELSIO_T3 is not set
467# CONFIG_IXGB is not set 441# CONFIG_IXGB is not set
468# CONFIG_S2IO is not set 442# CONFIG_S2IO is not set
469# CONFIG_MYRI10GE is not set 443# CONFIG_MYRI10GE is not set
470# CONFIG_NETXEN_NIC is not set 444# CONFIG_NETXEN_NIC is not set
471 445# CONFIG_MLX4_CORE is not set
472#
473# Token Ring devices
474#
475# CONFIG_TR is not set 446# CONFIG_TR is not set
476 447
477# 448#
@@ -479,10 +450,6 @@ CONFIG_IBM_NEW_EMAC_ZMII=y
479# 450#
480# CONFIG_WLAN_PRE80211 is not set 451# CONFIG_WLAN_PRE80211 is not set
481# CONFIG_WLAN_80211 is not set 452# CONFIG_WLAN_80211 is not set
482
483#
484# Wan interfaces
485#
486# CONFIG_WAN is not set 453# CONFIG_WAN is not set
487# CONFIG_FDDI is not set 454# CONFIG_FDDI is not set
488# CONFIG_HIPPI is not set 455# CONFIG_HIPPI is not set
@@ -550,15 +517,10 @@ CONFIG_LEGACY_PTY_COUNT=256
550# IPMI 517# IPMI
551# 518#
552# CONFIG_IPMI_HANDLER is not set 519# CONFIG_IPMI_HANDLER is not set
553
554#
555# Watchdog Cards
556#
557# CONFIG_WATCHDOG is not set 520# CONFIG_WATCHDOG is not set
558# CONFIG_HW_RANDOM is not set 521# CONFIG_HW_RANDOM is not set
559# CONFIG_NVRAM is not set 522# CONFIG_NVRAM is not set
560# CONFIG_GEN_RTC is not set 523# CONFIG_GEN_RTC is not set
561# CONFIG_DTLK is not set
562# CONFIG_R3964 is not set 524# CONFIG_R3964 is not set
563# CONFIG_APPLICOM is not set 525# CONFIG_APPLICOM is not set
564# CONFIG_AGP is not set 526# CONFIG_AGP is not set
@@ -569,10 +531,7 @@ CONFIG_LEGACY_PTY_COUNT=256
569# TPM devices 531# TPM devices
570# 532#
571# CONFIG_TCG_TPM is not set 533# CONFIG_TCG_TPM is not set
572 534CONFIG_DEVPORT=y
573#
574# I2C support
575#
576# CONFIG_I2C is not set 535# CONFIG_I2C is not set
577 536
578# 537#
@@ -585,12 +544,7 @@ CONFIG_LEGACY_PTY_COUNT=256
585# Dallas's 1-wire bus 544# Dallas's 1-wire bus
586# 545#
587# CONFIG_W1 is not set 546# CONFIG_W1 is not set
588
589#
590# Hardware Monitoring support
591#
592# CONFIG_HWMON is not set 547# CONFIG_HWMON is not set
593# CONFIG_HWMON_VID is not set
594 548
595# 549#
596# Multifunction device drivers 550# Multifunction device drivers
@@ -601,16 +555,19 @@ CONFIG_LEGACY_PTY_COUNT=256
601# Multimedia devices 555# Multimedia devices
602# 556#
603# CONFIG_VIDEO_DEV is not set 557# CONFIG_VIDEO_DEV is not set
558# CONFIG_DVB_CORE is not set
559# CONFIG_DAB is not set
604 560
605# 561#
606# Digital Video Broadcasting Devices 562# Graphics support
607# 563#
608# CONFIG_DVB is not set 564# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
609 565
610# 566#
611# Graphics support 567# Display device support
612# 568#
613# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 569# CONFIG_DISPLAY_SUPPORT is not set
570# CONFIG_VGASTATE is not set
614# CONFIG_FB is not set 571# CONFIG_FB is not set
615# CONFIG_FB_IBM_GXT4500 is not set 572# CONFIG_FB_IBM_GXT4500 is not set
616 573
@@ -635,10 +592,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
635# USB Gadget Support 592# USB Gadget Support
636# 593#
637# CONFIG_USB_GADGET is not set 594# CONFIG_USB_GADGET is not set
638
639#
640# MMC/SD Card support
641#
642# CONFIG_MMC is not set 595# CONFIG_MMC is not set
643 596
644# 597#
@@ -682,14 +635,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
682# 635#
683 636
684# 637#
685# Auxiliary Display support
686#
687
688#
689# Virtualization
690#
691
692#
693# File systems 638# File systems
694# 639#
695CONFIG_EXT2_FS=y 640CONFIG_EXT2_FS=y
@@ -770,6 +715,7 @@ CONFIG_LOCKD=y
770CONFIG_LOCKD_V4=y 715CONFIG_LOCKD_V4=y
771CONFIG_NFS_COMMON=y 716CONFIG_NFS_COMMON=y
772CONFIG_SUNRPC=y 717CONFIG_SUNRPC=y
718# CONFIG_SUNRPC_BIND34 is not set
773# CONFIG_RPCSEC_GSS_KRB5 is not set 719# CONFIG_RPCSEC_GSS_KRB5 is not set
774# CONFIG_RPCSEC_GSS_SPKM3 is not set 720# CONFIG_RPCSEC_GSS_SPKM3 is not set
775# CONFIG_SMB_FS is not set 721# CONFIG_SMB_FS is not set
@@ -795,7 +741,6 @@ CONFIG_MSDOS_PARTITION=y
795# 741#
796# CONFIG_DLM is not set 742# CONFIG_DLM is not set
797# CONFIG_UCC_SLOW is not set 743# CONFIG_UCC_SLOW is not set
798# CONFIG_UCC_FAST is not set
799 744
800# 745#
801# Library routines 746# Library routines
@@ -803,12 +748,14 @@ CONFIG_MSDOS_PARTITION=y
803CONFIG_BITREVERSE=y 748CONFIG_BITREVERSE=y
804# CONFIG_CRC_CCITT is not set 749# CONFIG_CRC_CCITT is not set
805# CONFIG_CRC16 is not set 750# CONFIG_CRC16 is not set
751# CONFIG_CRC_ITU_T is not set
806CONFIG_CRC32=y 752CONFIG_CRC32=y
807# CONFIG_LIBCRC32C is not set 753# CONFIG_LIBCRC32C is not set
808CONFIG_ZLIB_INFLATE=y 754CONFIG_ZLIB_INFLATE=y
809CONFIG_PLIST=y 755CONFIG_PLIST=y
810CONFIG_HAS_IOMEM=y 756CONFIG_HAS_IOMEM=y
811CONFIG_HAS_IOPORT=y 757CONFIG_HAS_IOPORT=y
758CONFIG_HAS_DMA=y
812 759
813# 760#
814# Instrumentation Support 761# Instrumentation Support
@@ -826,7 +773,6 @@ CONFIG_MAGIC_SYSRQ=y
826# CONFIG_HEADERS_CHECK is not set 773# CONFIG_HEADERS_CHECK is not set
827CONFIG_DEBUG_KERNEL=y 774CONFIG_DEBUG_KERNEL=y
828# CONFIG_DEBUG_SHIRQ is not set 775# CONFIG_DEBUG_SHIRQ is not set
829CONFIG_LOG_BUF_SHIFT=14
830CONFIG_DETECT_SOFTLOCKUP=y 776CONFIG_DETECT_SOFTLOCKUP=y
831# CONFIG_SCHEDSTATS is not set 777# CONFIG_SCHEDSTATS is not set
832# CONFIG_TIMER_STATS is not set 778# CONFIG_TIMER_STATS is not set
@@ -851,7 +797,6 @@ CONFIG_FORCED_INLINING=y
851# CONFIG_DEBUGGER is not set 797# CONFIG_DEBUGGER is not set
852# CONFIG_BDI_SWITCH is not set 798# CONFIG_BDI_SWITCH is not set
853# CONFIG_BOOTX_TEXT is not set 799# CONFIG_BOOTX_TEXT is not set
854# CONFIG_SERIAL_TEXT_DEBUG is not set
855# CONFIG_PPC_EARLY_DEBUG is not set 800# CONFIG_PPC_EARLY_DEBUG is not set
856 801
857# 802#
@@ -882,6 +827,7 @@ CONFIG_CRYPTO_ECB=y
882CONFIG_CRYPTO_CBC=y 827CONFIG_CRYPTO_CBC=y
883CONFIG_CRYPTO_PCBC=y 828CONFIG_CRYPTO_PCBC=y
884# CONFIG_CRYPTO_LRW is not set 829# CONFIG_CRYPTO_LRW is not set
830# CONFIG_CRYPTO_CRYPTD is not set
885CONFIG_CRYPTO_DES=y 831CONFIG_CRYPTO_DES=y
886# CONFIG_CRYPTO_FCRYPT is not set 832# CONFIG_CRYPTO_FCRYPT is not set
887# CONFIG_CRYPTO_BLOWFISH is not set 833# CONFIG_CRYPTO_BLOWFISH is not set
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
index 3ccf19d8da..a217f4ebcf 100644
--- a/arch/powerpc/configs/g5_defconfig
+++ b/arch/powerpc/configs/g5_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc5 3# Linux kernel version: 2.6.22-rc6
4# Mon Jan 22 22:15:04 2007 4# Tue Jun 26 12:38:34 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -27,6 +27,7 @@ CONFIG_GENERIC_TBSYNC=y
27CONFIG_AUDIT_ARCH=y 27CONFIG_AUDIT_ARCH=y
28CONFIG_GENERIC_BUG=y 28CONFIG_GENERIC_BUG=y
29# CONFIG_DEFAULT_UIMAGE is not set 29# CONFIG_DEFAULT_UIMAGE is not set
30CONFIG_PPC64_SWSUSP=y
30 31
31# 32#
32# Processor support 33# Processor support
@@ -39,6 +40,7 @@ CONFIG_PPC_FPU=y
39# CONFIG_PPC_OF_PLATFORM_PCI is not set 40# CONFIG_PPC_OF_PLATFORM_PCI is not set
40CONFIG_ALTIVEC=y 41CONFIG_ALTIVEC=y
41CONFIG_PPC_STD_MMU=y 42CONFIG_PPC_STD_MMU=y
43CONFIG_PPC_MM_SLICES=y
42CONFIG_VIRT_CPU_ACCOUNTING=y 44CONFIG_VIRT_CPU_ACCOUNTING=y
43CONFIG_SMP=y 45CONFIG_SMP=y
44CONFIG_NR_CPUS=4 46CONFIG_NR_CPUS=4
@@ -59,6 +61,7 @@ CONFIG_LOCALVERSION_AUTO=y
59CONFIG_SWAP=y 61CONFIG_SWAP=y
60CONFIG_SYSVIPC=y 62CONFIG_SYSVIPC=y
61# CONFIG_IPC_NS is not set 63# CONFIG_IPC_NS is not set
64CONFIG_SYSVIPC_SYSCTL=y
62CONFIG_POSIX_MQUEUE=y 65CONFIG_POSIX_MQUEUE=y
63# CONFIG_BSD_PROCESS_ACCT is not set 66# CONFIG_BSD_PROCESS_ACCT is not set
64# CONFIG_TASKSTATS is not set 67# CONFIG_TASKSTATS is not set
@@ -66,9 +69,11 @@ CONFIG_POSIX_MQUEUE=y
66# CONFIG_AUDIT is not set 69# CONFIG_AUDIT is not set
67CONFIG_IKCONFIG=y 70CONFIG_IKCONFIG=y
68CONFIG_IKCONFIG_PROC=y 71CONFIG_IKCONFIG_PROC=y
72CONFIG_LOG_BUF_SHIFT=17
69# CONFIG_CPUSETS is not set 73# CONFIG_CPUSETS is not set
70CONFIG_SYSFS_DEPRECATED=y 74CONFIG_SYSFS_DEPRECATED=y
71# CONFIG_RELAY is not set 75# CONFIG_RELAY is not set
76CONFIG_BLK_DEV_INITRD=y
72CONFIG_INITRAMFS_SOURCE="" 77CONFIG_INITRAMFS_SOURCE=""
73CONFIG_CC_OPTIMIZE_FOR_SIZE=y 78CONFIG_CC_OPTIMIZE_FOR_SIZE=y
74CONFIG_SYSCTL=y 79CONFIG_SYSCTL=y
@@ -83,14 +88,19 @@ CONFIG_BUG=y
83CONFIG_ELF_CORE=y 88CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y 89CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y 90CONFIG_FUTEX=y
91CONFIG_ANON_INODES=y
86CONFIG_EPOLL=y 92CONFIG_EPOLL=y
93CONFIG_SIGNALFD=y
94CONFIG_TIMERFD=y
95CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 96CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y 97CONFIG_VM_EVENT_COUNTERS=y
98CONFIG_SLAB=y
99# CONFIG_SLUB is not set
100# CONFIG_SLOB is not set
90CONFIG_RT_MUTEXES=y 101CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set 102# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0 103CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94 104
95# 105#
96# Loadable module support 106# Loadable module support
@@ -131,15 +141,21 @@ CONFIG_PPC_MULTIPLATFORM=y
131# CONFIG_PPC_PSERIES is not set 141# CONFIG_PPC_PSERIES is not set
132# CONFIG_PPC_ISERIES is not set 142# CONFIG_PPC_ISERIES is not set
133# CONFIG_PPC_MPC52xx is not set 143# CONFIG_PPC_MPC52xx is not set
144# CONFIG_PPC_MPC5200 is not set
134CONFIG_PPC_PMAC=y 145CONFIG_PPC_PMAC=y
135CONFIG_PPC_PMAC64=y 146CONFIG_PPC_PMAC64=y
136# CONFIG_PPC_MAPLE is not set 147# CONFIG_PPC_MAPLE is not set
137# CONFIG_PPC_PASEMI is not set 148# CONFIG_PPC_PASEMI is not set
149# CONFIG_PPC_CELLEB is not set
150# CONFIG_PPC_PS3 is not set
138# CONFIG_PPC_CELL is not set 151# CONFIG_PPC_CELL is not set
139# CONFIG_PPC_CELL_NATIVE is not set 152# CONFIG_PPC_CELL_NATIVE is not set
140# CONFIG_PPC_IBM_CELL_BLADE is not set 153# CONFIG_PPC_IBM_CELL_BLADE is not set
141# CONFIG_PPC_PS3 is not set 154# CONFIG_PQ2ADS is not set
142CONFIG_PPC_NATIVE=y 155CONFIG_PPC_NATIVE=y
156CONFIG_MPIC=y
157# CONFIG_MPIC_WEIRD is not set
158# CONFIG_PPC_I8259 is not set
143CONFIG_U3_DART=y 159CONFIG_U3_DART=y
144# CONFIG_PPC_RTAS is not set 160# CONFIG_PPC_RTAS is not set
145# CONFIG_MMIO_NVRAM is not set 161# CONFIG_MMIO_NVRAM is not set
@@ -160,9 +176,12 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y
160CONFIG_CPU_FREQ_GOV_USERSPACE=y 176CONFIG_CPU_FREQ_GOV_USERSPACE=y
161# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set 177# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
162# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set 178# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
179
180#
181# CPU Frequency drivers
182#
163CONFIG_CPU_FREQ_PMAC64=y 183CONFIG_CPU_FREQ_PMAC64=y
164# CONFIG_WANT_EARLY_SERIAL is not set 184# CONFIG_CPM2 is not set
165CONFIG_MPIC=y
166 185
167# 186#
168# Kernel options 187# Kernel options
@@ -199,34 +218,34 @@ CONFIG_FLAT_NODE_MEM_MAP=y
199# CONFIG_SPARSEMEM_STATIC is not set 218# CONFIG_SPARSEMEM_STATIC is not set
200CONFIG_SPLIT_PTLOCK_CPUS=4 219CONFIG_SPLIT_PTLOCK_CPUS=4
201CONFIG_RESOURCES_64BIT=y 220CONFIG_RESOURCES_64BIT=y
221CONFIG_ZONE_DMA_FLAG=1
222# CONFIG_PPC_HAS_HASH_64K is not set
202# CONFIG_PPC_64K_PAGES is not set 223# CONFIG_PPC_64K_PAGES is not set
203# CONFIG_SCHED_SMT is not set 224# CONFIG_SCHED_SMT is not set
204CONFIG_PROC_DEVICETREE=y 225CONFIG_PROC_DEVICETREE=y
205# CONFIG_CMDLINE_BOOL is not set 226# CONFIG_CMDLINE_BOOL is not set
206# CONFIG_PM is not set 227# CONFIG_PM is not set
207CONFIG_SECCOMP=y 228CONFIG_SECCOMP=y
229# CONFIG_WANT_DEVICE_TREE is not set
208CONFIG_ISA_DMA_API=y 230CONFIG_ISA_DMA_API=y
209 231
210# 232#
211# Bus options 233# Bus options
212# 234#
235CONFIG_ZONE_DMA=y
213CONFIG_GENERIC_ISA_DMA=y 236CONFIG_GENERIC_ISA_DMA=y
214# CONFIG_MPIC_WEIRD is not set
215# CONFIG_PPC_I8259 is not set
216# CONFIG_PPC_INDIRECT_PCI is not set 237# CONFIG_PPC_INDIRECT_PCI is not set
217CONFIG_PCI=y 238CONFIG_PCI=y
218CONFIG_PCI_DOMAINS=y 239CONFIG_PCI_DOMAINS=y
219# CONFIG_PCIEPORTBUS is not set 240# CONFIG_PCIEPORTBUS is not set
241CONFIG_ARCH_SUPPORTS_MSI=y
242CONFIG_PCI_MSI=y
220# CONFIG_PCI_DEBUG is not set 243# CONFIG_PCI_DEBUG is not set
221 244
222# 245#
223# PCCARD (PCMCIA/CardBus) support 246# PCCARD (PCMCIA/CardBus) support
224# 247#
225# CONFIG_PCCARD is not set 248# CONFIG_PCCARD is not set
226
227#
228# PCI Hotplug Support
229#
230# CONFIG_HOTPLUG_PCI is not set 249# CONFIG_HOTPLUG_PCI is not set
231CONFIG_KERNEL_START=0xc000000000000000 250CONFIG_KERNEL_START=0xc000000000000000
232 251
@@ -238,14 +257,15 @@ CONFIG_NET=y
238# 257#
239# Networking options 258# Networking options
240# 259#
241# CONFIG_NETDEBUG is not set
242CONFIG_PACKET=y 260CONFIG_PACKET=y
243# CONFIG_PACKET_MMAP is not set 261# CONFIG_PACKET_MMAP is not set
244CONFIG_UNIX=y 262CONFIG_UNIX=y
245CONFIG_XFRM=y 263CONFIG_XFRM=y
246CONFIG_XFRM_USER=m 264CONFIG_XFRM_USER=m
247# CONFIG_XFRM_SUB_POLICY is not set 265# CONFIG_XFRM_SUB_POLICY is not set
266# CONFIG_XFRM_MIGRATE is not set
248CONFIG_NET_KEY=m 267CONFIG_NET_KEY=m
268# CONFIG_NET_KEY_MIGRATE is not set
249CONFIG_INET=y 269CONFIG_INET=y
250CONFIG_IP_MULTICAST=y 270CONFIG_IP_MULTICAST=y
251# CONFIG_IP_ADVANCED_ROUTER is not set 271# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -270,10 +290,6 @@ CONFIG_INET_TCP_DIAG=y
270CONFIG_TCP_CONG_CUBIC=y 290CONFIG_TCP_CONG_CUBIC=y
271CONFIG_DEFAULT_TCP_CONG="cubic" 291CONFIG_DEFAULT_TCP_CONG="cubic"
272# CONFIG_TCP_MD5SIG is not set 292# CONFIG_TCP_MD5SIG is not set
273
274#
275# IP: Virtual Server Configuration
276#
277# CONFIG_IP_VS is not set 293# CONFIG_IP_VS is not set
278# CONFIG_IPV6 is not set 294# CONFIG_IPV6 is not set
279# CONFIG_INET6_XFRM_TUNNEL is not set 295# CONFIG_INET6_XFRM_TUNNEL is not set
@@ -287,8 +303,6 @@ CONFIG_NETFILTER=y
287# 303#
288# CONFIG_NETFILTER_NETLINK is not set 304# CONFIG_NETFILTER_NETLINK is not set
289CONFIG_NF_CONNTRACK_ENABLED=m 305CONFIG_NF_CONNTRACK_ENABLED=m
290CONFIG_NF_CONNTRACK_SUPPORT=y
291# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
292CONFIG_NF_CONNTRACK=m 306CONFIG_NF_CONNTRACK=m
293# CONFIG_NF_CT_ACCT is not set 307# CONFIG_NF_CT_ACCT is not set
294CONFIG_NF_CONNTRACK_MARK=y 308CONFIG_NF_CONNTRACK_MARK=y
@@ -300,6 +314,7 @@ CONFIG_NF_CONNTRACK_FTP=m
300CONFIG_NF_CONNTRACK_IRC=m 314CONFIG_NF_CONNTRACK_IRC=m
301# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set 315# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
302# CONFIG_NF_CONNTRACK_PPTP is not set 316# CONFIG_NF_CONNTRACK_PPTP is not set
317# CONFIG_NF_CONNTRACK_SANE is not set
303# CONFIG_NF_CONNTRACK_SIP is not set 318# CONFIG_NF_CONNTRACK_SIP is not set
304CONFIG_NF_CONNTRACK_TFTP=m 319CONFIG_NF_CONNTRACK_TFTP=m
305# CONFIG_NETFILTER_XTABLES is not set 320# CONFIG_NETFILTER_XTABLES is not set
@@ -310,20 +325,10 @@ CONFIG_NF_CONNTRACK_TFTP=m
310CONFIG_NF_CONNTRACK_IPV4=m 325CONFIG_NF_CONNTRACK_IPV4=m
311CONFIG_NF_CONNTRACK_PROC_COMPAT=y 326CONFIG_NF_CONNTRACK_PROC_COMPAT=y
312CONFIG_IP_NF_QUEUE=m 327CONFIG_IP_NF_QUEUE=m
313 328# CONFIG_IP_NF_IPTABLES is not set
314# 329# CONFIG_IP_NF_ARPTABLES is not set
315# DCCP Configuration (EXPERIMENTAL)
316#
317# CONFIG_IP_DCCP is not set 330# CONFIG_IP_DCCP is not set
318
319#
320# SCTP Configuration (EXPERIMENTAL)
321#
322# CONFIG_IP_SCTP is not set 331# CONFIG_IP_SCTP is not set
323
324#
325# TIPC Configuration (EXPERIMENTAL)
326#
327# CONFIG_TIPC is not set 332# CONFIG_TIPC is not set
328# CONFIG_ATM is not set 333# CONFIG_ATM is not set
329# CONFIG_BRIDGE is not set 334# CONFIG_BRIDGE is not set
@@ -350,7 +355,16 @@ CONFIG_LLC=y
350# CONFIG_HAMRADIO is not set 355# CONFIG_HAMRADIO is not set
351# CONFIG_IRDA is not set 356# CONFIG_IRDA is not set
352# CONFIG_BT is not set 357# CONFIG_BT is not set
358# CONFIG_AF_RXRPC is not set
359
360#
361# Wireless
362#
363# CONFIG_CFG80211 is not set
364# CONFIG_WIRELESS_EXT is not set
365# CONFIG_MAC80211 is not set
353# CONFIG_IEEE80211 is not set 366# CONFIG_IEEE80211 is not set
367# CONFIG_RFKILL is not set
354 368
355# 369#
356# Device Drivers 370# Device Drivers
@@ -363,16 +377,13 @@ CONFIG_STANDALONE=y
363CONFIG_PREVENT_FIRMWARE_BUILD=y 377CONFIG_PREVENT_FIRMWARE_BUILD=y
364CONFIG_FW_LOADER=y 378CONFIG_FW_LOADER=y
365# CONFIG_DEBUG_DRIVER is not set 379# CONFIG_DEBUG_DRIVER is not set
380# CONFIG_DEBUG_DEVRES is not set
366# CONFIG_SYS_HYPERVISOR is not set 381# CONFIG_SYS_HYPERVISOR is not set
367 382
368# 383#
369# Connector - unified userspace <-> kernelspace linker 384# Connector - unified userspace <-> kernelspace linker
370# 385#
371# CONFIG_CONNECTOR is not set 386# CONFIG_CONNECTOR is not set
372
373#
374# Memory Technology Devices (MTD)
375#
376# CONFIG_MTD is not set 387# CONFIG_MTD is not set
377 388
378# 389#
@@ -383,6 +394,7 @@ CONFIG_FW_LOADER=y
383# 394#
384# Plug and Play support 395# Plug and Play support
385# 396#
397# CONFIG_PNPACPI is not set
386 398
387# 399#
388# Block devices 400# Block devices
@@ -402,7 +414,6 @@ CONFIG_BLK_DEV_RAM=y
402CONFIG_BLK_DEV_RAM_COUNT=16 414CONFIG_BLK_DEV_RAM_COUNT=16
403CONFIG_BLK_DEV_RAM_SIZE=65536 415CONFIG_BLK_DEV_RAM_SIZE=65536
404CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 416CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
405CONFIG_BLK_DEV_INITRD=y
406CONFIG_CDROM_PKTCDVD=m 417CONFIG_CDROM_PKTCDVD=m
407CONFIG_CDROM_PKTCDVD_BUFFERS=8 418CONFIG_CDROM_PKTCDVD_BUFFERS=8
408# CONFIG_CDROM_PKTCDVD_WCACHE is not set 419# CONFIG_CDROM_PKTCDVD_WCACHE is not set
@@ -411,12 +422,10 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
411# 422#
412# Misc devices 423# Misc devices
413# 424#
425# CONFIG_PHANTOM is not set
414# CONFIG_SGI_IOC4 is not set 426# CONFIG_SGI_IOC4 is not set
415# CONFIG_TIFM_CORE is not set 427# CONFIG_TIFM_CORE is not set
416 428# CONFIG_BLINK is not set
417#
418# ATA/ATAPI/MFM/RLL support
419#
420CONFIG_IDE=y 429CONFIG_IDE=y
421CONFIG_BLK_DEV_IDE=y 430CONFIG_BLK_DEV_IDE=y
422 431
@@ -431,6 +440,7 @@ CONFIG_BLK_DEV_IDECD=y
431# CONFIG_BLK_DEV_IDEFLOPPY is not set 440# CONFIG_BLK_DEV_IDEFLOPPY is not set
432# CONFIG_BLK_DEV_IDESCSI is not set 441# CONFIG_BLK_DEV_IDESCSI is not set
433# CONFIG_IDE_TASK_IOCTL is not set 442# CONFIG_IDE_TASK_IOCTL is not set
443CONFIG_IDE_PROC_FS=y
434 444
435# 445#
436# IDE chipset support/bugfixes 446# IDE chipset support/bugfixes
@@ -438,12 +448,12 @@ CONFIG_BLK_DEV_IDECD=y
438CONFIG_IDE_GENERIC=y 448CONFIG_IDE_GENERIC=y
439CONFIG_BLK_DEV_IDEPCI=y 449CONFIG_BLK_DEV_IDEPCI=y
440# CONFIG_IDEPCI_SHARE_IRQ is not set 450# CONFIG_IDEPCI_SHARE_IRQ is not set
451CONFIG_IDEPCI_PCIBUS_ORDER=y
441# CONFIG_BLK_DEV_OFFBOARD is not set 452# CONFIG_BLK_DEV_OFFBOARD is not set
442# CONFIG_BLK_DEV_GENERIC is not set 453# CONFIG_BLK_DEV_GENERIC is not set
443# CONFIG_BLK_DEV_OPTI621 is not set 454# CONFIG_BLK_DEV_OPTI621 is not set
444CONFIG_BLK_DEV_IDEDMA_PCI=y 455CONFIG_BLK_DEV_IDEDMA_PCI=y
445# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 456# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
446CONFIG_IDEDMA_PCI_AUTO=y
447# CONFIG_IDEDMA_ONLYDISK is not set 457# CONFIG_IDEDMA_ONLYDISK is not set
448# CONFIG_BLK_DEV_AEC62XX is not set 458# CONFIG_BLK_DEV_AEC62XX is not set
449# CONFIG_BLK_DEV_ALI15X3 is not set 459# CONFIG_BLK_DEV_ALI15X3 is not set
@@ -458,6 +468,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
458# CONFIG_BLK_DEV_JMICRON is not set 468# CONFIG_BLK_DEV_JMICRON is not set
459# CONFIG_BLK_DEV_SC1200 is not set 469# CONFIG_BLK_DEV_SC1200 is not set
460# CONFIG_BLK_DEV_PIIX is not set 470# CONFIG_BLK_DEV_PIIX is not set
471# CONFIG_BLK_DEV_IT8213 is not set
461# CONFIG_BLK_DEV_IT821X is not set 472# CONFIG_BLK_DEV_IT821X is not set
462# CONFIG_BLK_DEV_NS87415 is not set 473# CONFIG_BLK_DEV_NS87415 is not set
463# CONFIG_BLK_DEV_PDC202XX_OLD is not set 474# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -468,13 +479,13 @@ CONFIG_IDEDMA_PCI_AUTO=y
468# CONFIG_BLK_DEV_SLC90E66 is not set 479# CONFIG_BLK_DEV_SLC90E66 is not set
469# CONFIG_BLK_DEV_TRM290 is not set 480# CONFIG_BLK_DEV_TRM290 is not set
470# CONFIG_BLK_DEV_VIA82CXXX is not set 481# CONFIG_BLK_DEV_VIA82CXXX is not set
482# CONFIG_BLK_DEV_TC86C001 is not set
471CONFIG_BLK_DEV_IDE_PMAC=y 483CONFIG_BLK_DEV_IDE_PMAC=y
472CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y 484CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
473CONFIG_BLK_DEV_IDEDMA_PMAC=y 485CONFIG_BLK_DEV_IDEDMA_PMAC=y
474# CONFIG_IDE_ARM is not set 486# CONFIG_IDE_ARM is not set
475CONFIG_BLK_DEV_IDEDMA=y 487CONFIG_BLK_DEV_IDEDMA=y
476# CONFIG_IDEDMA_IVB is not set 488# CONFIG_IDEDMA_IVB is not set
477CONFIG_IDEDMA_AUTO=y
478# CONFIG_BLK_DEV_HD is not set 489# CONFIG_BLK_DEV_HD is not set
479 490
480# 491#
@@ -504,6 +515,7 @@ CONFIG_SCSI_MULTI_LUN=y
504CONFIG_SCSI_CONSTANTS=y 515CONFIG_SCSI_CONSTANTS=y
505# CONFIG_SCSI_LOGGING is not set 516# CONFIG_SCSI_LOGGING is not set
506# CONFIG_SCSI_SCAN_ASYNC is not set 517# CONFIG_SCSI_SCAN_ASYNC is not set
518CONFIG_SCSI_WAIT_SCAN=m
507 519
508# 520#
509# SCSI Transports 521# SCSI Transports
@@ -550,11 +562,8 @@ CONFIG_SCSI_SPI_ATTRS=y
550# CONFIG_SCSI_DC390T is not set 562# CONFIG_SCSI_DC390T is not set
551# CONFIG_SCSI_DEBUG is not set 563# CONFIG_SCSI_DEBUG is not set
552# CONFIG_SCSI_SRP is not set 564# CONFIG_SCSI_SRP is not set
553
554#
555# Serial ATA (prod) and Parallel ATA (experimental) drivers
556#
557CONFIG_ATA=y 565CONFIG_ATA=y
566# CONFIG_ATA_NONSTANDARD is not set
558# CONFIG_SATA_AHCI is not set 567# CONFIG_SATA_AHCI is not set
559CONFIG_SATA_SVW=y 568CONFIG_SATA_SVW=y
560# CONFIG_ATA_PIIX is not set 569# CONFIG_ATA_PIIX is not set
@@ -570,10 +579,12 @@ CONFIG_SATA_SVW=y
570# CONFIG_SATA_ULI is not set 579# CONFIG_SATA_ULI is not set
571# CONFIG_SATA_VIA is not set 580# CONFIG_SATA_VIA is not set
572# CONFIG_SATA_VITESSE is not set 581# CONFIG_SATA_VITESSE is not set
582# CONFIG_SATA_INIC162X is not set
573# CONFIG_PATA_ALI is not set 583# CONFIG_PATA_ALI is not set
574# CONFIG_PATA_AMD is not set 584# CONFIG_PATA_AMD is not set
575# CONFIG_PATA_ARTOP is not set 585# CONFIG_PATA_ARTOP is not set
576# CONFIG_PATA_ATIIXP is not set 586# CONFIG_PATA_ATIIXP is not set
587# CONFIG_PATA_CMD640_PCI is not set
577# CONFIG_PATA_CMD64X is not set 588# CONFIG_PATA_CMD64X is not set
578# CONFIG_PATA_CS5520 is not set 589# CONFIG_PATA_CS5520 is not set
579# CONFIG_PATA_CS5530 is not set 590# CONFIG_PATA_CS5530 is not set
@@ -585,6 +596,7 @@ CONFIG_SATA_SVW=y
585# CONFIG_PATA_HPT3X2N is not set 596# CONFIG_PATA_HPT3X2N is not set
586# CONFIG_PATA_HPT3X3 is not set 597# CONFIG_PATA_HPT3X3 is not set
587# CONFIG_PATA_IT821X is not set 598# CONFIG_PATA_IT821X is not set
599# CONFIG_PATA_IT8213 is not set
588# CONFIG_PATA_JMICRON is not set 600# CONFIG_PATA_JMICRON is not set
589# CONFIG_PATA_TRIFLEX is not set 601# CONFIG_PATA_TRIFLEX is not set
590# CONFIG_PATA_MARVELL is not set 602# CONFIG_PATA_MARVELL is not set
@@ -624,6 +636,7 @@ CONFIG_DM_SNAPSHOT=m
624CONFIG_DM_MIRROR=m 636CONFIG_DM_MIRROR=m
625CONFIG_DM_ZERO=m 637CONFIG_DM_ZERO=m
626# CONFIG_DM_MULTIPATH is not set 638# CONFIG_DM_MULTIPATH is not set
639# CONFIG_DM_DELAY is not set
627 640
628# 641#
629# Fusion MPT device support 642# Fusion MPT device support
@@ -636,28 +649,26 @@ CONFIG_DM_ZERO=m
636# 649#
637# IEEE 1394 (FireWire) support 650# IEEE 1394 (FireWire) support
638# 651#
652# CONFIG_FIREWIRE is not set
639CONFIG_IEEE1394=y 653CONFIG_IEEE1394=y
640 654
641# 655#
642# Subsystem Options 656# Subsystem Options
643# 657#
644# CONFIG_IEEE1394_VERBOSEDEBUG is not set 658# CONFIG_IEEE1394_VERBOSEDEBUG is not set
645CONFIG_IEEE1394_OUI_DB=y
646CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
647CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
648# CONFIG_IEEE1394_EXPORT_FULL_API is not set
649 659
650# 660#
651# Device Drivers 661# Controllers
652# 662#
653# CONFIG_IEEE1394_PCILYNX is not set 663# CONFIG_IEEE1394_PCILYNX is not set
654CONFIG_IEEE1394_OHCI1394=y 664CONFIG_IEEE1394_OHCI1394=y
655 665
656# 666#
657# Protocol Drivers 667# Protocols
658# 668#
659CONFIG_IEEE1394_VIDEO1394=m 669CONFIG_IEEE1394_VIDEO1394=m
660CONFIG_IEEE1394_SBP2=m 670CONFIG_IEEE1394_SBP2=m
671CONFIG_IEEE1394_ETH1394_ROM_ENTRY=y
661CONFIG_IEEE1394_ETH1394=m 672CONFIG_IEEE1394_ETH1394=m
662CONFIG_IEEE1394_DV1394=m 673CONFIG_IEEE1394_DV1394=m
663CONFIG_IEEE1394_RAWIO=y 674CONFIG_IEEE1394_RAWIO=y
@@ -666,10 +677,7 @@ CONFIG_IEEE1394_RAWIO=y
666# I2O device support 677# I2O device support
667# 678#
668# CONFIG_I2O is not set 679# CONFIG_I2O is not set
669 680CONFIG_MACINTOSH_DRIVERS=y
670#
671# Macintosh device drivers
672#
673CONFIG_ADB_PMU=y 681CONFIG_ADB_PMU=y
674# CONFIG_ADB_PMU_LED is not set 682# CONFIG_ADB_PMU_LED is not set
675CONFIG_PMAC_SMU=y 683CONFIG_PMAC_SMU=y
@@ -689,15 +697,7 @@ CONFIG_DUMMY=m
689CONFIG_BONDING=m 697CONFIG_BONDING=m
690# CONFIG_EQUALIZER is not set 698# CONFIG_EQUALIZER is not set
691CONFIG_TUN=m 699CONFIG_TUN=m
692
693#
694# ARCnet devices
695#
696# CONFIG_ARCNET is not set 700# CONFIG_ARCNET is not set
697
698#
699# PHY device support
700#
701# CONFIG_PHYLIB is not set 701# CONFIG_PHYLIB is not set
702 702
703# 703#
@@ -716,10 +716,7 @@ CONFIG_SUNGEM=y
716# CONFIG_NET_TULIP is not set 716# CONFIG_NET_TULIP is not set
717# CONFIG_HP100 is not set 717# CONFIG_HP100 is not set
718# CONFIG_NET_PCI is not set 718# CONFIG_NET_PCI is not set
719 719CONFIG_NETDEV_1000=y
720#
721# Ethernet (1000 Mbit)
722#
723CONFIG_ACENIC=y 720CONFIG_ACENIC=y
724CONFIG_ACENIC_OMIT_TIGON_I=y 721CONFIG_ACENIC_OMIT_TIGON_I=y
725# CONFIG_DL2K is not set 722# CONFIG_DL2K is not set
@@ -734,35 +731,50 @@ CONFIG_E1000=y
734# CONFIG_SKGE is not set 731# CONFIG_SKGE is not set
735# CONFIG_SKY2 is not set 732# CONFIG_SKY2 is not set
736# CONFIG_SK98LIN is not set 733# CONFIG_SK98LIN is not set
734# CONFIG_VIA_VELOCITY is not set
737CONFIG_TIGON3=y 735CONFIG_TIGON3=y
738# CONFIG_BNX2 is not set 736# CONFIG_BNX2 is not set
739# CONFIG_QLA3XXX is not set 737# CONFIG_QLA3XXX is not set
740 738# CONFIG_ATL1 is not set
741# 739CONFIG_NETDEV_10000=y
742# Ethernet (10000 Mbit)
743#
744# CONFIG_CHELSIO_T1 is not set 740# CONFIG_CHELSIO_T1 is not set
741# CONFIG_CHELSIO_T3 is not set
745# CONFIG_IXGB is not set 742# CONFIG_IXGB is not set
746# CONFIG_S2IO is not set 743# CONFIG_S2IO is not set
747# CONFIG_MYRI10GE is not set 744# CONFIG_MYRI10GE is not set
748# CONFIG_NETXEN_NIC is not set 745# CONFIG_NETXEN_NIC is not set
749 746# CONFIG_PASEMI_MAC is not set
750# 747# CONFIG_MLX4_CORE is not set
751# Token Ring devices
752#
753CONFIG_TR=y 748CONFIG_TR=y
754CONFIG_IBMOL=y 749CONFIG_IBMOL=y
755# CONFIG_3C359 is not set 750# CONFIG_3C359 is not set
756# CONFIG_TMS380TR is not set 751# CONFIG_TMS380TR is not set
757 752
758# 753#
759# Wireless LAN (non-hamradio) 754# Wireless LAN
760# 755#
761# CONFIG_NET_RADIO is not set 756# CONFIG_WLAN_PRE80211 is not set
757# CONFIG_WLAN_80211 is not set
762 758
763# 759#
764# Wan interfaces 760# USB Network Adapters
765# 761#
762CONFIG_USB_CATC=m
763CONFIG_USB_KAWETH=m
764CONFIG_USB_PEGASUS=m
765CONFIG_USB_RTL8150=m
766# CONFIG_USB_USBNET_MII is not set
767CONFIG_USB_USBNET=m
768# CONFIG_USB_NET_AX8817X is not set
769CONFIG_USB_NET_CDCETHER=m
770# CONFIG_USB_NET_DM9601 is not set
771# CONFIG_USB_NET_GL620A is not set
772# CONFIG_USB_NET_NET1080 is not set
773# CONFIG_USB_NET_PLUSB is not set
774# CONFIG_USB_NET_MCS7830 is not set
775# CONFIG_USB_NET_RNDIS_HOST is not set
776# CONFIG_USB_NET_CDC_SUBSET is not set
777# CONFIG_USB_NET_ZAURUS is not set
766# CONFIG_WAN is not set 778# CONFIG_WAN is not set
767# CONFIG_FDDI is not set 779# CONFIG_FDDI is not set
768# CONFIG_HIPPI is not set 780# CONFIG_HIPPI is not set
@@ -798,6 +810,7 @@ CONFIG_SLHC=m
798# 810#
799CONFIG_INPUT=y 811CONFIG_INPUT=y
800CONFIG_INPUT_FF_MEMLESS=y 812CONFIG_INPUT_FF_MEMLESS=y
813# CONFIG_INPUT_POLLDEV is not set
801 814
802# 815#
803# Userland interfaces 816# Userland interfaces
@@ -824,8 +837,10 @@ CONFIG_INPUT_KEYBOARD=y
824CONFIG_INPUT_MOUSE=y 837CONFIG_INPUT_MOUSE=y
825# CONFIG_MOUSE_PS2 is not set 838# CONFIG_MOUSE_PS2 is not set
826# CONFIG_MOUSE_SERIAL is not set 839# CONFIG_MOUSE_SERIAL is not set
840# CONFIG_MOUSE_APPLETOUCH is not set
827# CONFIG_MOUSE_VSXXXAA is not set 841# CONFIG_MOUSE_VSXXXAA is not set
828# CONFIG_INPUT_JOYSTICK is not set 842# CONFIG_INPUT_JOYSTICK is not set
843# CONFIG_INPUT_TABLET is not set
829# CONFIG_INPUT_TOUCHSCREEN is not set 844# CONFIG_INPUT_TOUCHSCREEN is not set
830# CONFIG_INPUT_MISC is not set 845# CONFIG_INPUT_MISC is not set
831 846
@@ -866,15 +881,10 @@ CONFIG_LEGACY_PTY_COUNT=256
866# IPMI 881# IPMI
867# 882#
868# CONFIG_IPMI_HANDLER is not set 883# CONFIG_IPMI_HANDLER is not set
869
870#
871# Watchdog Cards
872#
873# CONFIG_WATCHDOG is not set 884# CONFIG_WATCHDOG is not set
874# CONFIG_HW_RANDOM is not set 885# CONFIG_HW_RANDOM is not set
875CONFIG_GEN_RTC=y 886CONFIG_GEN_RTC=y
876# CONFIG_GEN_RTC_X is not set 887# CONFIG_GEN_RTC_X is not set
877# CONFIG_DTLK is not set
878# CONFIG_R3964 is not set 888# CONFIG_R3964 is not set
879# CONFIG_APPLICOM is not set 889# CONFIG_APPLICOM is not set
880CONFIG_AGP=m 890CONFIG_AGP=m
@@ -888,11 +898,9 @@ CONFIG_MAX_RAW_DEVS=256
888# TPM devices 898# TPM devices
889# 899#
890# CONFIG_TCG_TPM is not set 900# CONFIG_TCG_TPM is not set
891 901CONFIG_DEVPORT=y
892#
893# I2C support
894#
895CONFIG_I2C=y 902CONFIG_I2C=y
903CONFIG_I2C_BOARDINFO=y
896CONFIG_I2C_CHARDEV=y 904CONFIG_I2C_CHARDEV=y
897 905
898# 906#
@@ -919,14 +927,15 @@ CONFIG_I2C_POWERMAC=y
919# CONFIG_I2C_PARPORT_LIGHT is not set 927# CONFIG_I2C_PARPORT_LIGHT is not set
920# CONFIG_I2C_PROSAVAGE is not set 928# CONFIG_I2C_PROSAVAGE is not set
921# CONFIG_I2C_SAVAGE4 is not set 929# CONFIG_I2C_SAVAGE4 is not set
930# CONFIG_I2C_SIMTEC is not set
922# CONFIG_I2C_SIS5595 is not set 931# CONFIG_I2C_SIS5595 is not set
923# CONFIG_I2C_SIS630 is not set 932# CONFIG_I2C_SIS630 is not set
924# CONFIG_I2C_SIS96X is not set 933# CONFIG_I2C_SIS96X is not set
925# CONFIG_I2C_STUB is not set 934# CONFIG_I2C_STUB is not set
935# CONFIG_I2C_TINY_USB is not set
926# CONFIG_I2C_VIA is not set 936# CONFIG_I2C_VIA is not set
927# CONFIG_I2C_VIAPRO is not set 937# CONFIG_I2C_VIAPRO is not set
928# CONFIG_I2C_VOODOO3 is not set 938# CONFIG_I2C_VOODOO3 is not set
929# CONFIG_I2C_PCA_ISA is not set
930 939
931# 940#
932# Miscellaneous I2C Chip support 941# Miscellaneous I2C Chip support
@@ -953,37 +962,53 @@ CONFIG_I2C_POWERMAC=y
953# Dallas's 1-wire bus 962# Dallas's 1-wire bus
954# 963#
955# CONFIG_W1 is not set 964# CONFIG_W1 is not set
965# CONFIG_HWMON is not set
956 966
957# 967#
958# Hardware Monitoring support 968# Multifunction device drivers
959# 969#
960# CONFIG_HWMON is not set 970# CONFIG_MFD_SM501 is not set
961# CONFIG_HWMON_VID is not set
962 971
963# 972#
964# Multimedia devices 973# Multimedia devices
965# 974#
966# CONFIG_VIDEO_DEV is not set 975# CONFIG_VIDEO_DEV is not set
976# CONFIG_DVB_CORE is not set
977CONFIG_DAB=y
978# CONFIG_USB_DABUSB is not set
967 979
968# 980#
969# Digital Video Broadcasting Devices 981# Graphics support
970# 982#
971# CONFIG_DVB is not set 983CONFIG_BACKLIGHT_LCD_SUPPORT=y
972# CONFIG_USB_DABUSB is not set 984CONFIG_BACKLIGHT_CLASS_DEVICE=y
985CONFIG_LCD_CLASS_DEVICE=m
973 986
974# 987#
975# Graphics support 988# Display device support
976# 989#
977CONFIG_FIRMWARE_EDID=y 990# CONFIG_DISPLAY_SUPPORT is not set
991CONFIG_VGASTATE=y
978CONFIG_FB=y 992CONFIG_FB=y
993CONFIG_FIRMWARE_EDID=y
979CONFIG_FB_DDC=y 994CONFIG_FB_DDC=y
980CONFIG_FB_CFB_FILLRECT=y 995CONFIG_FB_CFB_FILLRECT=y
981CONFIG_FB_CFB_COPYAREA=y 996CONFIG_FB_CFB_COPYAREA=y
982CONFIG_FB_CFB_IMAGEBLIT=y 997CONFIG_FB_CFB_IMAGEBLIT=y
998# CONFIG_FB_SYS_FILLRECT is not set
999# CONFIG_FB_SYS_COPYAREA is not set
1000# CONFIG_FB_SYS_IMAGEBLIT is not set
1001# CONFIG_FB_SYS_FOPS is not set
1002CONFIG_FB_DEFERRED_IO=y
1003# CONFIG_FB_SVGALIB is not set
983CONFIG_FB_MACMODES=y 1004CONFIG_FB_MACMODES=y
984# CONFIG_FB_BACKLIGHT is not set 1005CONFIG_FB_BACKLIGHT=y
985CONFIG_FB_MODE_HELPERS=y 1006CONFIG_FB_MODE_HELPERS=y
986CONFIG_FB_TILEBLITTING=y 1007CONFIG_FB_TILEBLITTING=y
1008
1009#
1010# Frame buffer hardware drivers
1011#
987# CONFIG_FB_CIRRUS is not set 1012# CONFIG_FB_CIRRUS is not set
988# CONFIG_FB_PM2 is not set 1013# CONFIG_FB_PM2 is not set
989# CONFIG_FB_CYBER2000 is not set 1014# CONFIG_FB_CYBER2000 is not set
@@ -994,20 +1019,27 @@ CONFIG_FB_OF=y
994# CONFIG_FB_S1D13XXX is not set 1019# CONFIG_FB_S1D13XXX is not set
995CONFIG_FB_NVIDIA=y 1020CONFIG_FB_NVIDIA=y
996CONFIG_FB_NVIDIA_I2C=y 1021CONFIG_FB_NVIDIA_I2C=y
1022# CONFIG_FB_NVIDIA_DEBUG is not set
1023CONFIG_FB_NVIDIA_BACKLIGHT=y
997# CONFIG_FB_RIVA is not set 1024# CONFIG_FB_RIVA is not set
998# CONFIG_FB_MATROX is not set 1025# CONFIG_FB_MATROX is not set
999CONFIG_FB_RADEON=y 1026CONFIG_FB_RADEON=y
1000CONFIG_FB_RADEON_I2C=y 1027CONFIG_FB_RADEON_I2C=y
1028CONFIG_FB_RADEON_BACKLIGHT=y
1001# CONFIG_FB_RADEON_DEBUG is not set 1029# CONFIG_FB_RADEON_DEBUG is not set
1002# CONFIG_FB_ATY128 is not set 1030# CONFIG_FB_ATY128 is not set
1003# CONFIG_FB_ATY is not set 1031# CONFIG_FB_ATY is not set
1032# CONFIG_FB_S3 is not set
1004# CONFIG_FB_SAVAGE is not set 1033# CONFIG_FB_SAVAGE is not set
1005# CONFIG_FB_SIS is not set 1034# CONFIG_FB_SIS is not set
1006# CONFIG_FB_NEOMAGIC is not set 1035# CONFIG_FB_NEOMAGIC is not set
1007# CONFIG_FB_KYRO is not set 1036# CONFIG_FB_KYRO is not set
1008# CONFIG_FB_3DFX is not set 1037# CONFIG_FB_3DFX is not set
1009# CONFIG_FB_VOODOO1 is not set 1038# CONFIG_FB_VOODOO1 is not set
1039# CONFIG_FB_VT8623 is not set
1010# CONFIG_FB_TRIDENT is not set 1040# CONFIG_FB_TRIDENT is not set
1041# CONFIG_FB_ARK is not set
1042# CONFIG_FB_PM3 is not set
1011# CONFIG_FB_IBM_GXT4500 is not set 1043# CONFIG_FB_IBM_GXT4500 is not set
1012# CONFIG_FB_VIRTUAL is not set 1044# CONFIG_FB_VIRTUAL is not set
1013 1045
@@ -1021,19 +1053,10 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
1021# CONFIG_FONTS is not set 1053# CONFIG_FONTS is not set
1022CONFIG_FONT_8x8=y 1054CONFIG_FONT_8x8=y
1023CONFIG_FONT_8x16=y 1055CONFIG_FONT_8x16=y
1024
1025#
1026# Logo configuration
1027#
1028CONFIG_LOGO=y 1056CONFIG_LOGO=y
1029CONFIG_LOGO_LINUX_MONO=y 1057CONFIG_LOGO_LINUX_MONO=y
1030CONFIG_LOGO_LINUX_VGA16=y 1058CONFIG_LOGO_LINUX_VGA16=y
1031CONFIG_LOGO_LINUX_CLUT224=y 1059CONFIG_LOGO_LINUX_CLUT224=y
1032CONFIG_BACKLIGHT_LCD_SUPPORT=y
1033CONFIG_BACKLIGHT_CLASS_DEVICE=m
1034CONFIG_BACKLIGHT_DEVICE=y
1035CONFIG_LCD_CLASS_DEVICE=m
1036CONFIG_LCD_DEVICE=y
1037 1060
1038# 1061#
1039# Sound 1062# Sound
@@ -1152,6 +1175,12 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m
1152# 1175#
1153CONFIG_SND_USB_AUDIO=m 1176CONFIG_SND_USB_AUDIO=m
1154# CONFIG_SND_USB_USX2Y is not set 1177# CONFIG_SND_USB_USX2Y is not set
1178# CONFIG_SND_USB_CAIAQ is not set
1179
1180#
1181# System on Chip audio support
1182#
1183# CONFIG_SND_SOC is not set
1155 1184
1156# 1185#
1157# Open Sound System 1186# Open Sound System
@@ -1162,6 +1191,20 @@ CONFIG_SND_USB_AUDIO=m
1162# HID Devices 1191# HID Devices
1163# 1192#
1164CONFIG_HID=y 1193CONFIG_HID=y
1194# CONFIG_HID_DEBUG is not set
1195
1196#
1197# USB Input Devices
1198#
1199CONFIG_USB_HID=y
1200# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1201CONFIG_HID_FF=y
1202CONFIG_HID_PID=y
1203CONFIG_LOGITECH_FF=y
1204# CONFIG_PANTHERLORD_FF is not set
1205CONFIG_THRUSTMASTER_FF=y
1206# CONFIG_ZEROPLUS_FF is not set
1207CONFIG_USB_HIDDEV=y
1165 1208
1166# 1209#
1167# USB support 1210# USB support
@@ -1176,9 +1219,8 @@ CONFIG_USB=y
1176# Miscellaneous USB options 1219# Miscellaneous USB options
1177# 1220#
1178CONFIG_USB_DEVICEFS=y 1221CONFIG_USB_DEVICEFS=y
1179# CONFIG_USB_BANDWIDTH is not set 1222CONFIG_USB_DEVICE_CLASS=y
1180# CONFIG_USB_DYNAMIC_MINORS is not set 1223# CONFIG_USB_DYNAMIC_MINORS is not set
1181# CONFIG_USB_MULTITHREAD_PROBE is not set
1182# CONFIG_USB_OTG is not set 1224# CONFIG_USB_OTG is not set
1183 1225
1184# 1226#
@@ -1188,9 +1230,15 @@ CONFIG_USB_EHCI_HCD=y
1188# CONFIG_USB_EHCI_SPLIT_ISO is not set 1230# CONFIG_USB_EHCI_SPLIT_ISO is not set
1189# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1231# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1190# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1232# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1233# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1191# CONFIG_USB_ISP116X_HCD is not set 1234# CONFIG_USB_ISP116X_HCD is not set
1192CONFIG_USB_OHCI_HCD=y 1235CONFIG_USB_OHCI_HCD=y
1193# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1236CONFIG_USB_OHCI_HCD_PPC_OF=y
1237CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1238# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
1239CONFIG_USB_OHCI_HCD_PCI=y
1240CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1241CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
1194CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1242CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1195# CONFIG_USB_UHCI_HCD is not set 1243# CONFIG_USB_UHCI_HCD is not set
1196# CONFIG_USB_SL811_HCD is not set 1244# CONFIG_USB_SL811_HCD is not set
@@ -1224,53 +1272,10 @@ CONFIG_USB_STORAGE_JUMPSHOT=y
1224# CONFIG_USB_LIBUSUAL is not set 1272# CONFIG_USB_LIBUSUAL is not set
1225 1273
1226# 1274#
1227# USB Input Devices
1228#
1229CONFIG_USB_HID=y
1230# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1231CONFIG_HID_FF=y
1232CONFIG_HID_PID=y
1233CONFIG_LOGITECH_FF=y
1234CONFIG_THRUSTMASTER_FF=y
1235# CONFIG_ZEROPLUS_FF is not set
1236CONFIG_USB_HIDDEV=y
1237# CONFIG_USB_AIPTEK is not set
1238# CONFIG_USB_WACOM is not set
1239# CONFIG_USB_ACECAD is not set
1240# CONFIG_USB_KBTAB is not set
1241# CONFIG_USB_POWERMATE is not set
1242# CONFIG_USB_TOUCHSCREEN is not set
1243# CONFIG_USB_YEALINK is not set
1244# CONFIG_USB_XPAD is not set
1245# CONFIG_USB_ATI_REMOTE is not set
1246# CONFIG_USB_ATI_REMOTE2 is not set
1247# CONFIG_USB_KEYSPAN_REMOTE is not set
1248# CONFIG_USB_APPLETOUCH is not set
1249
1250#
1251# USB Imaging devices 1275# USB Imaging devices
1252# 1276#
1253# CONFIG_USB_MDC800 is not set 1277# CONFIG_USB_MDC800 is not set
1254# CONFIG_USB_MICROTEK is not set 1278# CONFIG_USB_MICROTEK is not set
1255
1256#
1257# USB Network Adapters
1258#
1259CONFIG_USB_CATC=m
1260CONFIG_USB_KAWETH=m
1261CONFIG_USB_PEGASUS=m
1262CONFIG_USB_RTL8150=m
1263# CONFIG_USB_USBNET_MII is not set
1264CONFIG_USB_USBNET=m
1265# CONFIG_USB_NET_AX8817X is not set
1266CONFIG_USB_NET_CDCETHER=m
1267# CONFIG_USB_NET_GL620A is not set
1268# CONFIG_USB_NET_NET1080 is not set
1269# CONFIG_USB_NET_PLUSB is not set
1270# CONFIG_USB_NET_MCS7830 is not set
1271# CONFIG_USB_NET_RNDIS_HOST is not set
1272# CONFIG_USB_NET_CDC_SUBSET is not set
1273# CONFIG_USB_NET_ZAURUS is not set
1274CONFIG_USB_MON=y 1279CONFIG_USB_MON=y
1275 1280
1276# 1281#
@@ -1343,6 +1348,7 @@ CONFIG_USB_EZUSB=y
1343# CONFIG_USB_RIO500 is not set 1348# CONFIG_USB_RIO500 is not set
1344# CONFIG_USB_LEGOTOWER is not set 1349# CONFIG_USB_LEGOTOWER is not set
1345# CONFIG_USB_LCD is not set 1350# CONFIG_USB_LCD is not set
1351# CONFIG_USB_BERRY_CHARGE is not set
1346# CONFIG_USB_LED is not set 1352# CONFIG_USB_LED is not set
1347# CONFIG_USB_CYPRESS_CY7C63 is not set 1353# CONFIG_USB_CYPRESS_CY7C63 is not set
1348# CONFIG_USB_CYTHERM is not set 1354# CONFIG_USB_CYTHERM is not set
@@ -1353,6 +1359,7 @@ CONFIG_USB_APPLEDISPLAY=m
1353# CONFIG_USB_SISUSBVGA is not set 1359# CONFIG_USB_SISUSBVGA is not set
1354# CONFIG_USB_LD is not set 1360# CONFIG_USB_LD is not set
1355# CONFIG_USB_TRANCEVIBRATOR is not set 1361# CONFIG_USB_TRANCEVIBRATOR is not set
1362# CONFIG_USB_IOWARRIOR is not set
1356# CONFIG_USB_TEST is not set 1363# CONFIG_USB_TEST is not set
1357 1364
1358# 1365#
@@ -1363,10 +1370,6 @@ CONFIG_USB_APPLEDISPLAY=m
1363# USB Gadget Support 1370# USB Gadget Support
1364# 1371#
1365# CONFIG_USB_GADGET is not set 1372# CONFIG_USB_GADGET is not set
1366
1367#
1368# MMC/SD Card support
1369#
1370# CONFIG_MMC is not set 1373# CONFIG_MMC is not set
1371 1374
1372# 1375#
@@ -1410,10 +1413,6 @@ CONFIG_USB_APPLEDISPLAY=m
1410# 1413#
1411 1414
1412# 1415#
1413# Virtualization
1414#
1415
1416#
1417# File systems 1416# File systems
1418# 1417#
1419CONFIG_EXT2_FS=y 1418CONFIG_EXT2_FS=y
@@ -1461,7 +1460,6 @@ CONFIG_AUTOFS_FS=m
1461CONFIG_ISO9660_FS=y 1460CONFIG_ISO9660_FS=y
1462CONFIG_JOLIET=y 1461CONFIG_JOLIET=y
1463CONFIG_ZISOFS=y 1462CONFIG_ZISOFS=y
1464CONFIG_ZISOFS_FS=y
1465CONFIG_UDF_FS=m 1463CONFIG_UDF_FS=m
1466CONFIG_UDF_NLS=y 1464CONFIG_UDF_NLS=y
1467 1465
@@ -1527,6 +1525,7 @@ CONFIG_NFS_ACL_SUPPORT=y
1527CONFIG_NFS_COMMON=y 1525CONFIG_NFS_COMMON=y
1528CONFIG_SUNRPC=y 1526CONFIG_SUNRPC=y
1529CONFIG_SUNRPC_GSS=y 1527CONFIG_SUNRPC_GSS=y
1528# CONFIG_SUNRPC_BIND34 is not set
1530CONFIG_RPCSEC_GSS_KRB5=y 1529CONFIG_RPCSEC_GSS_KRB5=y
1531# CONFIG_RPCSEC_GSS_SPKM3 is not set 1530# CONFIG_RPCSEC_GSS_SPKM3 is not set
1532# CONFIG_SMB_FS is not set 1531# CONFIG_SMB_FS is not set
@@ -1561,6 +1560,7 @@ CONFIG_MSDOS_PARTITION=y
1561# CONFIG_SUN_PARTITION is not set 1560# CONFIG_SUN_PARTITION is not set
1562# CONFIG_KARMA_PARTITION is not set 1561# CONFIG_KARMA_PARTITION is not set
1563# CONFIG_EFI_PARTITION is not set 1562# CONFIG_EFI_PARTITION is not set
1563# CONFIG_SYSV68_PARTITION is not set
1564 1564
1565# 1565#
1566# Native Language Support 1566# Native Language Support
@@ -1610,6 +1610,7 @@ CONFIG_NLS_UTF8=y
1610# Distributed Lock Manager 1610# Distributed Lock Manager
1611# 1611#
1612# CONFIG_DLM is not set 1612# CONFIG_DLM is not set
1613# CONFIG_UCC_SLOW is not set
1613 1614
1614# 1615#
1615# Library routines 1616# Library routines
@@ -1617,12 +1618,15 @@ CONFIG_NLS_UTF8=y
1617CONFIG_BITREVERSE=y 1618CONFIG_BITREVERSE=y
1618CONFIG_CRC_CCITT=m 1619CONFIG_CRC_CCITT=m
1619# CONFIG_CRC16 is not set 1620# CONFIG_CRC16 is not set
1621# CONFIG_CRC_ITU_T is not set
1620CONFIG_CRC32=y 1622CONFIG_CRC32=y
1621CONFIG_LIBCRC32C=m 1623CONFIG_LIBCRC32C=m
1622CONFIG_ZLIB_INFLATE=y 1624CONFIG_ZLIB_INFLATE=y
1623CONFIG_ZLIB_DEFLATE=m 1625CONFIG_ZLIB_DEFLATE=m
1624CONFIG_PLIST=y 1626CONFIG_PLIST=y
1625CONFIG_IOMAP_COPY=y 1627CONFIG_HAS_IOMEM=y
1628CONFIG_HAS_IOPORT=y
1629CONFIG_HAS_DMA=y
1626 1630
1627# 1631#
1628# Instrumentation Support 1632# Instrumentation Support
@@ -1641,15 +1645,15 @@ CONFIG_MAGIC_SYSRQ=y
1641CONFIG_DEBUG_FS=y 1645CONFIG_DEBUG_FS=y
1642# CONFIG_HEADERS_CHECK is not set 1646# CONFIG_HEADERS_CHECK is not set
1643CONFIG_DEBUG_KERNEL=y 1647CONFIG_DEBUG_KERNEL=y
1644CONFIG_LOG_BUF_SHIFT=17 1648# CONFIG_DEBUG_SHIRQ is not set
1645CONFIG_DETECT_SOFTLOCKUP=y 1649CONFIG_DETECT_SOFTLOCKUP=y
1646# CONFIG_SCHEDSTATS is not set 1650# CONFIG_SCHEDSTATS is not set
1651# CONFIG_TIMER_STATS is not set
1647# CONFIG_DEBUG_SLAB is not set 1652# CONFIG_DEBUG_SLAB is not set
1648# CONFIG_DEBUG_RT_MUTEXES is not set 1653# CONFIG_DEBUG_RT_MUTEXES is not set
1649# CONFIG_RT_MUTEX_TESTER is not set 1654# CONFIG_RT_MUTEX_TESTER is not set
1650# CONFIG_DEBUG_SPINLOCK is not set 1655# CONFIG_DEBUG_SPINLOCK is not set
1651CONFIG_DEBUG_MUTEXES=y 1656CONFIG_DEBUG_MUTEXES=y
1652# CONFIG_DEBUG_RWSEMS is not set
1653# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1657# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1654# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1658# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1655# CONFIG_DEBUG_KOBJECT is not set 1659# CONFIG_DEBUG_KOBJECT is not set
@@ -1659,8 +1663,10 @@ CONFIG_DEBUG_BUGVERBOSE=y
1659# CONFIG_DEBUG_LIST is not set 1663# CONFIG_DEBUG_LIST is not set
1660CONFIG_FORCED_INLINING=y 1664CONFIG_FORCED_INLINING=y
1661# CONFIG_RCU_TORTURE_TEST is not set 1665# CONFIG_RCU_TORTURE_TEST is not set
1666# CONFIG_FAULT_INJECTION is not set
1662# CONFIG_DEBUG_STACKOVERFLOW is not set 1667# CONFIG_DEBUG_STACKOVERFLOW is not set
1663# CONFIG_DEBUG_STACK_USAGE is not set 1668# CONFIG_DEBUG_STACK_USAGE is not set
1669# CONFIG_DEBUG_PAGEALLOC is not set
1664# CONFIG_DEBUGGER is not set 1670# CONFIG_DEBUGGER is not set
1665CONFIG_IRQSTACKS=y 1671CONFIG_IRQSTACKS=y
1666CONFIG_BOOTX_TEXT=y 1672CONFIG_BOOTX_TEXT=y
@@ -1693,8 +1699,11 @@ CONFIG_CRYPTO_WP512=m
1693# CONFIG_CRYPTO_GF128MUL is not set 1699# CONFIG_CRYPTO_GF128MUL is not set
1694CONFIG_CRYPTO_ECB=m 1700CONFIG_CRYPTO_ECB=m
1695CONFIG_CRYPTO_CBC=y 1701CONFIG_CRYPTO_CBC=y
1702CONFIG_CRYPTO_PCBC=m
1696# CONFIG_CRYPTO_LRW is not set 1703# CONFIG_CRYPTO_LRW is not set
1704# CONFIG_CRYPTO_CRYPTD is not set
1697CONFIG_CRYPTO_DES=y 1705CONFIG_CRYPTO_DES=y
1706# CONFIG_CRYPTO_FCRYPT is not set
1698CONFIG_CRYPTO_BLOWFISH=m 1707CONFIG_CRYPTO_BLOWFISH=m
1699CONFIG_CRYPTO_TWOFISH=m 1708CONFIG_CRYPTO_TWOFISH=m
1700CONFIG_CRYPTO_TWOFISH_COMMON=m 1709CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -1709,6 +1718,7 @@ CONFIG_CRYPTO_ANUBIS=m
1709CONFIG_CRYPTO_DEFLATE=m 1718CONFIG_CRYPTO_DEFLATE=m
1710CONFIG_CRYPTO_MICHAEL_MIC=m 1719CONFIG_CRYPTO_MICHAEL_MIC=m
1711CONFIG_CRYPTO_CRC32C=m 1720CONFIG_CRYPTO_CRC32C=m
1721# CONFIG_CRYPTO_CAMELLIA is not set
1712CONFIG_CRYPTO_TEST=m 1722CONFIG_CRYPTO_TEST=m
1713 1723
1714# 1724#
diff --git a/arch/powerpc/configs/holly_defconfig b/arch/powerpc/configs/holly_defconfig
index be633b9b57..04b94f884a 100644
--- a/arch/powerpc/configs/holly_defconfig
+++ b/arch/powerpc/configs/holly_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.21 3# Linux kernel version: 2.6.22-rc6
4# Sat May 5 11:02:35 2007 4# Tue Jun 26 13:22:36 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_ALTIVEC is not set 45# CONFIG_ALTIVEC is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -70,6 +71,7 @@ CONFIG_SYSVIPC_SYSCTL=y
70# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
71# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
73CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
75CONFIG_BLK_DEV_INITRD=y 77CONFIG_BLK_DEV_INITRD=y
@@ -87,14 +89,19 @@ CONFIG_BUG=y
87CONFIG_ELF_CORE=y 89CONFIG_ELF_CORE=y
88CONFIG_BASE_FULL=y 90CONFIG_BASE_FULL=y
89CONFIG_FUTEX=y 91CONFIG_FUTEX=y
92CONFIG_ANON_INODES=y
90CONFIG_EPOLL=y 93CONFIG_EPOLL=y
94CONFIG_SIGNALFD=y
95CONFIG_TIMERFD=y
96CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 97CONFIG_SHMEM=y
92CONFIG_SLAB=y
93CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLAB=y
100# CONFIG_SLUB is not set
101# CONFIG_SLOB is not set
94CONFIG_RT_MUTEXES=y 102CONFIG_RT_MUTEXES=y
95# CONFIG_TINY_SHMEM is not set 103# CONFIG_TINY_SHMEM is not set
96CONFIG_BASE_SMALL=0 104CONFIG_BASE_SMALL=0
97# CONFIG_SLOB is not set
98 105
99# 106#
100# Loadable module support 107# Loadable module support
@@ -140,6 +147,7 @@ CONFIG_EMBEDDED6xx=y
140# CONFIG_LINKSTATION is not set 147# CONFIG_LINKSTATION is not set
141# CONFIG_MPC7448HPC2 is not set 148# CONFIG_MPC7448HPC2 is not set
142CONFIG_PPC_HOLLY=y 149CONFIG_PPC_HOLLY=y
150# CONFIG_PPC_PRPMC2800 is not set
143CONFIG_TSI108_BRIDGE=y 151CONFIG_TSI108_BRIDGE=y
144CONFIG_MPIC=y 152CONFIG_MPIC=y
145CONFIG_MPIC_WEIRD=y 153CONFIG_MPIC_WEIRD=y
@@ -182,10 +190,12 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
182# CONFIG_RESOURCES_64BIT is not set 190# CONFIG_RESOURCES_64BIT is not set
183CONFIG_ZONE_DMA_FLAG=1 191CONFIG_ZONE_DMA_FLAG=1
184CONFIG_PROC_DEVICETREE=y 192CONFIG_PROC_DEVICETREE=y
185# CONFIG_CMDLINE_BOOL is not set 193CONFIG_CMDLINE_BOOL=y
194CONFIG_CMDLINE="console=ttyS0,115200"
186# CONFIG_PM is not set 195# CONFIG_PM is not set
187# CONFIG_SECCOMP is not set 196# CONFIG_SECCOMP is not set
188# CONFIG_WANT_DEVICE_TREE is not set 197CONFIG_WANT_DEVICE_TREE=y
198CONFIG_DEVICE_TREE="holly.dts"
189CONFIG_ISA_DMA_API=y 199CONFIG_ISA_DMA_API=y
190 200
191# 201#
@@ -197,16 +207,14 @@ CONFIG_GENERIC_ISA_DMA=y
197CONFIG_PCI=y 207CONFIG_PCI=y
198CONFIG_PCI_DOMAINS=y 208CONFIG_PCI_DOMAINS=y
199# CONFIG_PCIEPORTBUS is not set 209# CONFIG_PCIEPORTBUS is not set
210CONFIG_ARCH_SUPPORTS_MSI=y
211# CONFIG_PCI_MSI is not set
200# CONFIG_PCI_DEBUG is not set 212# CONFIG_PCI_DEBUG is not set
201 213
202# 214#
203# PCCARD (PCMCIA/CardBus) support 215# PCCARD (PCMCIA/CardBus) support
204# 216#
205# CONFIG_PCCARD is not set 217# CONFIG_PCCARD is not set
206
207#
208# PCI Hotplug Support
209#
210# CONFIG_HOTPLUG_PCI is not set 218# CONFIG_HOTPLUG_PCI is not set
211 219
212# 220#
@@ -271,20 +279,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
271# CONFIG_INET6_TUNNEL is not set 279# CONFIG_INET6_TUNNEL is not set
272# CONFIG_NETWORK_SECMARK is not set 280# CONFIG_NETWORK_SECMARK is not set
273# CONFIG_NETFILTER is not set 281# CONFIG_NETFILTER is not set
274
275#
276# DCCP Configuration (EXPERIMENTAL)
277#
278# CONFIG_IP_DCCP is not set 282# CONFIG_IP_DCCP is not set
279
280#
281# SCTP Configuration (EXPERIMENTAL)
282#
283# CONFIG_IP_SCTP is not set 283# CONFIG_IP_SCTP is not set
284
285#
286# TIPC Configuration (EXPERIMENTAL)
287#
288# CONFIG_TIPC is not set 284# CONFIG_TIPC is not set
289# CONFIG_ATM is not set 285# CONFIG_ATM is not set
290# CONFIG_BRIDGE is not set 286# CONFIG_BRIDGE is not set
@@ -317,7 +313,9 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
317# 313#
318# CONFIG_CFG80211 is not set 314# CONFIG_CFG80211 is not set
319# CONFIG_WIRELESS_EXT is not set 315# CONFIG_WIRELESS_EXT is not set
316# CONFIG_MAC80211 is not set
320# CONFIG_IEEE80211 is not set 317# CONFIG_IEEE80211 is not set
318# CONFIG_RFKILL is not set
321 319
322# 320#
323# Device Drivers 321# Device Drivers
@@ -372,12 +370,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
372# 370#
373# Misc devices 371# Misc devices
374# 372#
373# CONFIG_PHANTOM is not set
375# CONFIG_SGI_IOC4 is not set 374# CONFIG_SGI_IOC4 is not set
376# CONFIG_TIFM_CORE is not set 375# CONFIG_TIFM_CORE is not set
377 376# CONFIG_BLINK is not set
378#
379# ATA/ATAPI/MFM/RLL support
380#
381# CONFIG_IDE is not set 377# CONFIG_IDE is not set
382 378
383# 379#
@@ -406,6 +402,7 @@ CONFIG_BLK_DEV_SD=y
406# CONFIG_SCSI_CONSTANTS is not set 402# CONFIG_SCSI_CONSTANTS is not set
407# CONFIG_SCSI_LOGGING is not set 403# CONFIG_SCSI_LOGGING is not set
408# CONFIG_SCSI_SCAN_ASYNC is not set 404# CONFIG_SCSI_SCAN_ASYNC is not set
405CONFIG_SCSI_WAIT_SCAN=m
409 406
410# 407#
411# SCSI Transports 408# SCSI Transports
@@ -453,12 +450,7 @@ CONFIG_BLK_DEV_SD=y
453# CONFIG_SCSI_DC390T is not set 450# CONFIG_SCSI_DC390T is not set
454# CONFIG_SCSI_NSP32 is not set 451# CONFIG_SCSI_NSP32 is not set
455# CONFIG_SCSI_DEBUG is not set 452# CONFIG_SCSI_DEBUG is not set
456# CONFIG_SCSI_ESP_CORE is not set
457# CONFIG_SCSI_SRP is not set 453# CONFIG_SCSI_SRP is not set
458
459#
460# Serial ATA (prod) and Parallel ATA (experimental) drivers
461#
462CONFIG_ATA=y 454CONFIG_ATA=y
463# CONFIG_ATA_NONSTANDARD is not set 455# CONFIG_ATA_NONSTANDARD is not set
464# CONFIG_SATA_AHCI is not set 456# CONFIG_SATA_AHCI is not set
@@ -531,6 +523,7 @@ CONFIG_ATA=y
531# 523#
532# IEEE 1394 (FireWire) support 524# IEEE 1394 (FireWire) support
533# 525#
526# CONFIG_FIREWIRE is not set
534# CONFIG_IEEE1394 is not set 527# CONFIG_IEEE1394 is not set
535 528
536# 529#
@@ -547,15 +540,7 @@ CONFIG_NETDEVICES=y
547# CONFIG_BONDING is not set 540# CONFIG_BONDING is not set
548# CONFIG_EQUALIZER is not set 541# CONFIG_EQUALIZER is not set
549# CONFIG_TUN is not set 542# CONFIG_TUN is not set
550
551#
552# ARCnet devices
553#
554# CONFIG_ARCNET is not set 543# CONFIG_ARCNET is not set
555
556#
557# PHY device support
558#
559CONFIG_PHYLIB=y 544CONFIG_PHYLIB=y
560 545
561# 546#
@@ -589,10 +574,7 @@ CONFIG_VORTEX=y
589# CONFIG_NET_TULIP is not set 574# CONFIG_NET_TULIP is not set
590# CONFIG_HP100 is not set 575# CONFIG_HP100 is not set
591# CONFIG_NET_PCI is not set 576# CONFIG_NET_PCI is not set
592 577CONFIG_NETDEV_1000=y
593#
594# Ethernet (1000 Mbit)
595#
596# CONFIG_ACENIC is not set 578# CONFIG_ACENIC is not set
597# CONFIG_DL2K is not set 579# CONFIG_DL2K is not set
598# CONFIG_E1000 is not set 580# CONFIG_E1000 is not set
@@ -604,25 +586,20 @@ CONFIG_VORTEX=y
604# CONFIG_SKGE is not set 586# CONFIG_SKGE is not set
605# CONFIG_SKY2 is not set 587# CONFIG_SKY2 is not set
606# CONFIG_SK98LIN is not set 588# CONFIG_SK98LIN is not set
589# CONFIG_VIA_VELOCITY is not set
607# CONFIG_TIGON3 is not set 590# CONFIG_TIGON3 is not set
608# CONFIG_BNX2 is not set 591# CONFIG_BNX2 is not set
609CONFIG_TSI108_ETH=y 592CONFIG_TSI108_ETH=y
610# CONFIG_QLA3XXX is not set 593# CONFIG_QLA3XXX is not set
611# CONFIG_ATL1 is not set 594# CONFIG_ATL1 is not set
612 595CONFIG_NETDEV_10000=y
613#
614# Ethernet (10000 Mbit)
615#
616# CONFIG_CHELSIO_T1 is not set 596# CONFIG_CHELSIO_T1 is not set
617# CONFIG_CHELSIO_T3 is not set 597# CONFIG_CHELSIO_T3 is not set
618# CONFIG_IXGB is not set 598# CONFIG_IXGB is not set
619# CONFIG_S2IO is not set 599# CONFIG_S2IO is not set
620# CONFIG_MYRI10GE is not set 600# CONFIG_MYRI10GE is not set
621# CONFIG_NETXEN_NIC is not set 601# CONFIG_NETXEN_NIC is not set
622 602# CONFIG_MLX4_CORE is not set
623#
624# Token Ring devices
625#
626# CONFIG_TR is not set 603# CONFIG_TR is not set
627 604
628# 605#
@@ -630,10 +607,6 @@ CONFIG_TSI108_ETH=y
630# 607#
631# CONFIG_WLAN_PRE80211 is not set 608# CONFIG_WLAN_PRE80211 is not set
632# CONFIG_WLAN_80211 is not set 609# CONFIG_WLAN_80211 is not set
633
634#
635# Wan interfaces
636#
637# CONFIG_WAN is not set 610# CONFIG_WAN is not set
638# CONFIG_FDDI is not set 611# CONFIG_FDDI is not set
639# CONFIG_HIPPI is not set 612# CONFIG_HIPPI is not set
@@ -660,6 +633,7 @@ CONFIG_TSI108_ETH=y
660# 633#
661CONFIG_INPUT=y 634CONFIG_INPUT=y
662# CONFIG_INPUT_FF_MEMLESS is not set 635# CONFIG_INPUT_FF_MEMLESS is not set
636# CONFIG_INPUT_POLLDEV is not set
663 637
664# 638#
665# Userland interfaces 639# Userland interfaces
@@ -676,6 +650,7 @@ CONFIG_INPUT=y
676# CONFIG_INPUT_KEYBOARD is not set 650# CONFIG_INPUT_KEYBOARD is not set
677# CONFIG_INPUT_MOUSE is not set 651# CONFIG_INPUT_MOUSE is not set
678# CONFIG_INPUT_JOYSTICK is not set 652# CONFIG_INPUT_JOYSTICK is not set
653# CONFIG_INPUT_TABLET is not set
679# CONFIG_INPUT_TOUCHSCREEN is not set 654# CONFIG_INPUT_TOUCHSCREEN is not set
680# CONFIG_INPUT_MISC is not set 655# CONFIG_INPUT_MISC is not set
681 656
@@ -721,16 +696,11 @@ CONFIG_LEGACY_PTY_COUNT=256
721# IPMI 696# IPMI
722# 697#
723# CONFIG_IPMI_HANDLER is not set 698# CONFIG_IPMI_HANDLER is not set
724
725#
726# Watchdog Cards
727#
728# CONFIG_WATCHDOG is not set 699# CONFIG_WATCHDOG is not set
729# CONFIG_HW_RANDOM is not set 700# CONFIG_HW_RANDOM is not set
730# CONFIG_NVRAM is not set 701# CONFIG_NVRAM is not set
731CONFIG_GEN_RTC=y 702CONFIG_GEN_RTC=y
732# CONFIG_GEN_RTC_X is not set 703# CONFIG_GEN_RTC_X is not set
733# CONFIG_DTLK is not set
734# CONFIG_R3964 is not set 704# CONFIG_R3964 is not set
735# CONFIG_APPLICOM is not set 705# CONFIG_APPLICOM is not set
736# CONFIG_AGP is not set 706# CONFIG_AGP is not set
@@ -741,10 +711,7 @@ CONFIG_GEN_RTC=y
741# TPM devices 711# TPM devices
742# 712#
743# CONFIG_TCG_TPM is not set 713# CONFIG_TCG_TPM is not set
744 714CONFIG_DEVPORT=y
745#
746# I2C support
747#
748# CONFIG_I2C is not set 715# CONFIG_I2C is not set
749 716
750# 717#
@@ -757,16 +724,15 @@ CONFIG_GEN_RTC=y
757# Dallas's 1-wire bus 724# Dallas's 1-wire bus
758# 725#
759# CONFIG_W1 is not set 726# CONFIG_W1 is not set
760
761#
762# Hardware Monitoring support
763#
764CONFIG_HWMON=y 727CONFIG_HWMON=y
765# CONFIG_HWMON_VID is not set 728# CONFIG_HWMON_VID is not set
766# CONFIG_SENSORS_ABITUGURU is not set 729# CONFIG_SENSORS_ABITUGURU is not set
767# CONFIG_SENSORS_F71805F is not set 730# CONFIG_SENSORS_F71805F is not set
768# CONFIG_SENSORS_PC87427 is not set 731# CONFIG_SENSORS_PC87427 is not set
732# CONFIG_SENSORS_SMSC47M1 is not set
733# CONFIG_SENSORS_SMSC47B397 is not set
769# CONFIG_SENSORS_VT1211 is not set 734# CONFIG_SENSORS_VT1211 is not set
735# CONFIG_SENSORS_W83627HF is not set
770# CONFIG_HWMON_DEBUG_CHIP is not set 736# CONFIG_HWMON_DEBUG_CHIP is not set
771 737
772# 738#
@@ -778,16 +744,19 @@ CONFIG_HWMON=y
778# Multimedia devices 744# Multimedia devices
779# 745#
780# CONFIG_VIDEO_DEV is not set 746# CONFIG_VIDEO_DEV is not set
747# CONFIG_DVB_CORE is not set
748# CONFIG_DAB is not set
781 749
782# 750#
783# Digital Video Broadcasting Devices 751# Graphics support
784# 752#
785# CONFIG_DVB is not set 753# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
786 754
787# 755#
788# Graphics support 756# Display device support
789# 757#
790# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 758# CONFIG_DISPLAY_SUPPORT is not set
759# CONFIG_VGASTATE is not set
791# CONFIG_FB is not set 760# CONFIG_FB is not set
792# CONFIG_FB_IBM_GXT4500 is not set 761# CONFIG_FB_IBM_GXT4500 is not set
793 762
@@ -818,10 +787,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
818# USB Gadget Support 787# USB Gadget Support
819# 788#
820# CONFIG_USB_GADGET is not set 789# CONFIG_USB_GADGET is not set
821
822#
823# MMC/SD Card support
824#
825# CONFIG_MMC is not set 790# CONFIG_MMC is not set
826 791
827# 792#
@@ -865,14 +830,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
865# 830#
866 831
867# 832#
868# Auxiliary Display support
869#
870
871#
872# Virtualization
873#
874
875#
876# File systems 833# File systems
877# 834#
878CONFIG_EXT2_FS=y 835CONFIG_EXT2_FS=y
@@ -957,6 +914,7 @@ CONFIG_ROOT_NFS=y
957CONFIG_LOCKD=y 914CONFIG_LOCKD=y
958CONFIG_NFS_COMMON=y 915CONFIG_NFS_COMMON=y
959CONFIG_SUNRPC=y 916CONFIG_SUNRPC=y
917# CONFIG_SUNRPC_BIND34 is not set
960# CONFIG_RPCSEC_GSS_KRB5 is not set 918# CONFIG_RPCSEC_GSS_KRB5 is not set
961# CONFIG_RPCSEC_GSS_SPKM3 is not set 919# CONFIG_RPCSEC_GSS_SPKM3 is not set
962# CONFIG_SMB_FS is not set 920# CONFIG_SMB_FS is not set
@@ -986,6 +944,7 @@ CONFIG_MSDOS_PARTITION=y
986# CONFIG_SUN_PARTITION is not set 944# CONFIG_SUN_PARTITION is not set
987# CONFIG_KARMA_PARTITION is not set 945# CONFIG_KARMA_PARTITION is not set
988# CONFIG_EFI_PARTITION is not set 946# CONFIG_EFI_PARTITION is not set
947# CONFIG_SYSV68_PARTITION is not set
989 948
990# 949#
991# Native Language Support 950# Native Language Support
@@ -997,7 +956,6 @@ CONFIG_MSDOS_PARTITION=y
997# 956#
998# CONFIG_DLM is not set 957# CONFIG_DLM is not set
999# CONFIG_UCC_SLOW is not set 958# CONFIG_UCC_SLOW is not set
1000# CONFIG_UCC_FAST is not set
1001 959
1002# 960#
1003# Library routines 961# Library routines
@@ -1005,11 +963,13 @@ CONFIG_MSDOS_PARTITION=y
1005CONFIG_BITREVERSE=y 963CONFIG_BITREVERSE=y
1006# CONFIG_CRC_CCITT is not set 964# CONFIG_CRC_CCITT is not set
1007# CONFIG_CRC16 is not set 965# CONFIG_CRC16 is not set
966# CONFIG_CRC_ITU_T is not set
1008CONFIG_CRC32=y 967CONFIG_CRC32=y
1009# CONFIG_LIBCRC32C is not set 968# CONFIG_LIBCRC32C is not set
1010CONFIG_PLIST=y 969CONFIG_PLIST=y
1011CONFIG_HAS_IOMEM=y 970CONFIG_HAS_IOMEM=y
1012CONFIG_HAS_IOPORT=y 971CONFIG_HAS_IOPORT=y
972CONFIG_HAS_DMA=y
1013 973
1014# 974#
1015# Instrumentation Support 975# Instrumentation Support
@@ -1028,7 +988,6 @@ CONFIG_MAGIC_SYSRQ=y
1028# CONFIG_HEADERS_CHECK is not set 988# CONFIG_HEADERS_CHECK is not set
1029CONFIG_DEBUG_KERNEL=y 989CONFIG_DEBUG_KERNEL=y
1030# CONFIG_DEBUG_SHIRQ is not set 990# CONFIG_DEBUG_SHIRQ is not set
1031CONFIG_LOG_BUF_SHIFT=14
1032CONFIG_DETECT_SOFTLOCKUP=y 991CONFIG_DETECT_SOFTLOCKUP=y
1033# CONFIG_SCHEDSTATS is not set 992# CONFIG_SCHEDSTATS is not set
1034# CONFIG_TIMER_STATS is not set 993# CONFIG_TIMER_STATS is not set
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig
index af25118c8f..8e33674524 100644
--- a/arch/powerpc/configs/iseries_defconfig
+++ b/arch/powerpc/configs/iseries_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc1 3# Linux kernel version: 2.6.22-rc6
4# Mon May 14 14:27:46 2007 4# Tue Jun 26 13:22:39 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -281,10 +281,6 @@ CONFIG_INET_TCP_DIAG=y
281CONFIG_TCP_CONG_CUBIC=y 281CONFIG_TCP_CONG_CUBIC=y
282CONFIG_DEFAULT_TCP_CONG="cubic" 282CONFIG_DEFAULT_TCP_CONG="cubic"
283# CONFIG_TCP_MD5SIG is not set 283# CONFIG_TCP_MD5SIG is not set
284
285#
286# IP: Virtual Server Configuration
287#
288# CONFIG_IP_VS is not set 284# CONFIG_IP_VS is not set
289# CONFIG_IPV6 is not set 285# CONFIG_IPV6 is not set
290# CONFIG_INET6_XFRM_TUNNEL is not set 286# CONFIG_INET6_XFRM_TUNNEL is not set
@@ -387,25 +383,13 @@ CONFIG_IP_NF_RAW=m
387CONFIG_IP_NF_ARPTABLES=m 383CONFIG_IP_NF_ARPTABLES=m
388CONFIG_IP_NF_ARPFILTER=m 384CONFIG_IP_NF_ARPFILTER=m
389CONFIG_IP_NF_ARP_MANGLE=m 385CONFIG_IP_NF_ARP_MANGLE=m
390
391#
392# DCCP Configuration (EXPERIMENTAL)
393#
394# CONFIG_IP_DCCP is not set 386# CONFIG_IP_DCCP is not set
395
396#
397# SCTP Configuration (EXPERIMENTAL)
398#
399CONFIG_IP_SCTP=m 387CONFIG_IP_SCTP=m
400# CONFIG_SCTP_DBG_MSG is not set 388# CONFIG_SCTP_DBG_MSG is not set
401# CONFIG_SCTP_DBG_OBJCNT is not set 389# CONFIG_SCTP_DBG_OBJCNT is not set
402# CONFIG_SCTP_HMAC_NONE is not set 390# CONFIG_SCTP_HMAC_NONE is not set
403# CONFIG_SCTP_HMAC_SHA1 is not set 391# CONFIG_SCTP_HMAC_SHA1 is not set
404CONFIG_SCTP_HMAC_MD5=y 392CONFIG_SCTP_HMAC_MD5=y
405
406#
407# TIPC Configuration (EXPERIMENTAL)
408#
409# CONFIG_TIPC is not set 393# CONFIG_TIPC is not set
410# CONFIG_ATM is not set 394# CONFIG_ATM is not set
411# CONFIG_BRIDGE is not set 395# CONFIG_BRIDGE is not set
@@ -501,10 +485,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
501# CONFIG_SGI_IOC4 is not set 485# CONFIG_SGI_IOC4 is not set
502# CONFIG_TIFM_CORE is not set 486# CONFIG_TIFM_CORE is not set
503# CONFIG_BLINK is not set 487# CONFIG_BLINK is not set
504
505#
506# ATA/ATAPI/MFM/RLL support
507#
508# CONFIG_IDE is not set 488# CONFIG_IDE is not set
509 489
510# 490#
@@ -581,7 +561,6 @@ CONFIG_SCSI_IBMVSCSI=m
581# CONFIG_SCSI_DC395x is not set 561# CONFIG_SCSI_DC395x is not set
582# CONFIG_SCSI_DC390T is not set 562# CONFIG_SCSI_DC390T is not set
583# CONFIG_SCSI_DEBUG is not set 563# CONFIG_SCSI_DEBUG is not set
584# CONFIG_SCSI_ESP_CORE is not set
585# CONFIG_SCSI_SRP is not set 564# CONFIG_SCSI_SRP is not set
586# CONFIG_ATA is not set 565# CONFIG_ATA is not set
587 566
@@ -634,10 +613,6 @@ CONFIG_DUMMY=m
634CONFIG_BONDING=m 613CONFIG_BONDING=m
635# CONFIG_EQUALIZER is not set 614# CONFIG_EQUALIZER is not set
636CONFIG_TUN=m 615CONFIG_TUN=m
637
638#
639# ARCnet devices
640#
641# CONFIG_ARCNET is not set 616# CONFIG_ARCNET is not set
642# CONFIG_PHYLIB is not set 617# CONFIG_PHYLIB is not set
643 618
@@ -705,11 +680,6 @@ CONFIG_NETDEV_10000=y
705# CONFIG_NETXEN_NIC is not set 680# CONFIG_NETXEN_NIC is not set
706# CONFIG_PASEMI_MAC is not set 681# CONFIG_PASEMI_MAC is not set
707# CONFIG_MLX4_CORE is not set 682# CONFIG_MLX4_CORE is not set
708CONFIG_MLX4_DEBUG=y
709
710#
711# Token Ring devices
712#
713CONFIG_TR=y 683CONFIG_TR=y
714CONFIG_IBMOL=y 684CONFIG_IBMOL=y
715# CONFIG_3C359 is not set 685# CONFIG_3C359 is not set
@@ -757,6 +727,7 @@ CONFIG_NET_POLL_CONTROLLER=y
757# 727#
758CONFIG_INPUT=y 728CONFIG_INPUT=y
759# CONFIG_INPUT_FF_MEMLESS is not set 729# CONFIG_INPUT_FF_MEMLESS is not set
730# CONFIG_INPUT_POLLDEV is not set
760 731
761# 732#
762# Userland interfaces 733# Userland interfaces
@@ -1139,7 +1110,6 @@ CONFIG_NLS_ISO8859_1=y
1139CONFIG_DLM=m 1110CONFIG_DLM=m
1140# CONFIG_DLM_DEBUG is not set 1111# CONFIG_DLM_DEBUG is not set
1141# CONFIG_UCC_SLOW is not set 1112# CONFIG_UCC_SLOW is not set
1142# CONFIG_UCC_FAST is not set
1143 1113
1144# 1114#
1145# Library routines 1115# Library routines
diff --git a/arch/powerpc/configs/linkstation_defconfig b/arch/powerpc/configs/linkstation_defconfig
index dde66a597a..78fd07c5f4 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-rc6 3# Linux kernel version: 2.6.22-rc6
4# Sun Jan 28 23:13:56 2007 4# Tue Jun 26 13:25:19 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -24,7 +24,7 @@ CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set 24# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 25CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 26CONFIG_GENERIC_BUG=y
27# CONFIG_DEFAULT_UIMAGE is not set 27CONFIG_DEFAULT_UIMAGE=y
28 28
29# 29#
30# Processor support 30# Processor support
@@ -34,9 +34,9 @@ CONFIG_CLASSIC32=y
34# CONFIG_PPC_83xx is not set 34# CONFIG_PPC_83xx is not set
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_PPC_FPU=y 42CONFIG_PPC_FPU=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_ALTIVEC is not set 45# CONFIG_ALTIVEC is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -63,6 +64,7 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66CONFIG_POSIX_MQUEUE=y 68CONFIG_POSIX_MQUEUE=y
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
@@ -70,8 +72,10 @@ CONFIG_POSIX_MQUEUE=y
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71CONFIG_IKCONFIG=y 73CONFIG_IKCONFIG=y
72CONFIG_IKCONFIG_PROC=y 74CONFIG_IKCONFIG_PROC=y
75CONFIG_LOG_BUF_SHIFT=14
73CONFIG_SYSFS_DEPRECATED=y 76CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 77# CONFIG_RELAY is not set
78CONFIG_BLK_DEV_INITRD=y
75CONFIG_INITRAMFS_SOURCE="" 79CONFIG_INITRAMFS_SOURCE=""
76# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 80# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
77CONFIG_SYSCTL=y 81CONFIG_SYSCTL=y
@@ -86,14 +90,19 @@ CONFIG_BUG=y
86CONFIG_ELF_CORE=y 90CONFIG_ELF_CORE=y
87CONFIG_BASE_FULL=y 91CONFIG_BASE_FULL=y
88CONFIG_FUTEX=y 92CONFIG_FUTEX=y
93CONFIG_ANON_INODES=y
89CONFIG_EPOLL=y 94CONFIG_EPOLL=y
95CONFIG_SIGNALFD=y
96CONFIG_TIMERFD=y
97CONFIG_EVENTFD=y
90CONFIG_SHMEM=y 98CONFIG_SHMEM=y
91CONFIG_SLAB=y
92CONFIG_VM_EVENT_COUNTERS=y 99CONFIG_VM_EVENT_COUNTERS=y
100CONFIG_SLAB=y
101# CONFIG_SLUB is not set
102# CONFIG_SLOB is not set
93CONFIG_RT_MUTEXES=y 103CONFIG_RT_MUTEXES=y
94# CONFIG_TINY_SHMEM is not set 104# CONFIG_TINY_SHMEM is not set
95CONFIG_BASE_SMALL=0 105CONFIG_BASE_SMALL=0
96# CONFIG_SLOB is not set
97 106
98# 107#
99# Loadable module support 108# Loadable module support
@@ -133,8 +142,20 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
133CONFIG_EMBEDDED6xx=y 142CONFIG_EMBEDDED6xx=y
134# CONFIG_APUS is not set 143# CONFIG_APUS is not set
135# CONFIG_PPC_MPC52xx is not set 144# CONFIG_PPC_MPC52xx is not set
145# CONFIG_PPC_MPC5200 is not set
136# CONFIG_PPC_CELL is not set 146# CONFIG_PPC_CELL is not set
137# CONFIG_PPC_CELL_NATIVE is not set 147# CONFIG_PPC_CELL_NATIVE is not set
148# CONFIG_PQ2ADS is not set
149CONFIG_LINKSTATION=y
150# CONFIG_MPC7448HPC2 is not set
151# CONFIG_PPC_HOLLY is not set
152# CONFIG_PPC_PRPMC2800 is not set
153CONFIG_MPC10X_BRIDGE=y
154CONFIG_MPC10X_OPENPIC=y
155# CONFIG_MPC10X_STORE_GATHERING is not set
156CONFIG_MPIC=y
157# CONFIG_MPIC_WEIRD is not set
158# CONFIG_PPC_I8259 is not set
138# CONFIG_PPC_RTAS is not set 159# CONFIG_PPC_RTAS is not set
139# CONFIG_MMIO_NVRAM is not set 160# CONFIG_MMIO_NVRAM is not set
140# CONFIG_PPC_MPC106 is not set 161# CONFIG_PPC_MPC106 is not set
@@ -143,39 +164,7 @@ CONFIG_EMBEDDED6xx=y
143# CONFIG_GENERIC_IOMAP is not set 164# CONFIG_GENERIC_IOMAP is not set
144# CONFIG_CPU_FREQ is not set 165# CONFIG_CPU_FREQ is not set
145# CONFIG_TAU is not set 166# CONFIG_TAU is not set
146# CONFIG_KATANA is not set 167# CONFIG_CPM2 is not set
147# CONFIG_WILLOW is not set
148# CONFIG_CPCI690 is not set
149# CONFIG_POWERPMC250 is not set
150# CONFIG_CHESTNUT is not set
151# CONFIG_SPRUCE is not set
152# CONFIG_HDPU is not set
153# CONFIG_EV64260 is not set
154# CONFIG_LOPEC is not set
155# CONFIG_MVME5100 is not set
156# CONFIG_PPLUS is not set
157# CONFIG_PRPMC750 is not set
158# CONFIG_PRPMC800 is not set
159# CONFIG_SANDPOINT is not set
160CONFIG_LINKSTATION=y
161# CONFIG_MPC7448HPC2 is not set
162# CONFIG_RADSTONE_PPC7D is not set
163# CONFIG_PAL4 is not set
164# CONFIG_GEMINI is not set
165# CONFIG_EST8260 is not set
166# CONFIG_SBC82xx is not set
167# CONFIG_SBS8260 is not set
168# CONFIG_RPX8260 is not set
169# CONFIG_TQM8260 is not set
170# CONFIG_ADS8272 is not set
171# CONFIG_PQ2FADS is not set
172# CONFIG_EV64360 is not set
173CONFIG_PPC_GEN550=y
174CONFIG_MPC10X_BRIDGE=y
175CONFIG_MPC10X_OPENPIC=y
176# CONFIG_MPC10X_STORE_GATHERING is not set
177# CONFIG_WANT_EARLY_SERIAL is not set
178CONFIG_MPIC=y
179 168
180# 169#
181# Kernel options 170# Kernel options
@@ -203,33 +192,33 @@ CONFIG_FLAT_NODE_MEM_MAP=y
203# CONFIG_SPARSEMEM_STATIC is not set 192# CONFIG_SPARSEMEM_STATIC is not set
204CONFIG_SPLIT_PTLOCK_CPUS=4 193CONFIG_SPLIT_PTLOCK_CPUS=4
205# CONFIG_RESOURCES_64BIT is not set 194# CONFIG_RESOURCES_64BIT is not set
195CONFIG_ZONE_DMA_FLAG=1
206CONFIG_PROC_DEVICETREE=y 196CONFIG_PROC_DEVICETREE=y
207# CONFIG_CMDLINE_BOOL is not set 197# CONFIG_CMDLINE_BOOL is not set
208# CONFIG_PM is not set 198# CONFIG_PM is not set
209CONFIG_SECCOMP=y 199CONFIG_SECCOMP=y
200# CONFIG_WANT_DEVICE_TREE is not set
210CONFIG_ISA_DMA_API=y 201CONFIG_ISA_DMA_API=y
211 202
212# 203#
213# Bus options 204# Bus options
214# 205#
206CONFIG_ZONE_DMA=y
215CONFIG_GENERIC_ISA_DMA=y 207CONFIG_GENERIC_ISA_DMA=y
216# CONFIG_MPIC_WEIRD is not set
217# CONFIG_PPC_I8259 is not set
218CONFIG_PPC_INDIRECT_PCI=y 208CONFIG_PPC_INDIRECT_PCI=y
209# CONFIG_PPC_INDIRECT_PCI_BE is not set
219CONFIG_FSL_SOC=y 210CONFIG_FSL_SOC=y
220CONFIG_PCI=y 211CONFIG_PCI=y
221CONFIG_PCI_DOMAINS=y 212CONFIG_PCI_DOMAINS=y
222# CONFIG_PCIEPORTBUS is not set 213# CONFIG_PCIEPORTBUS is not set
214CONFIG_ARCH_SUPPORTS_MSI=y
215# CONFIG_PCI_MSI is not set
223# CONFIG_PCI_DEBUG is not set 216# CONFIG_PCI_DEBUG is not set
224 217
225# 218#
226# PCCARD (PCMCIA/CardBus) support 219# PCCARD (PCMCIA/CardBus) support
227# 220#
228# CONFIG_PCCARD is not set 221# CONFIG_PCCARD is not set
229
230#
231# PCI Hotplug Support
232#
233# CONFIG_HOTPLUG_PCI is not set 222# CONFIG_HOTPLUG_PCI is not set
234 223
235# 224#
@@ -254,13 +243,13 @@ CONFIG_NET=y
254# 243#
255# Networking options 244# Networking options
256# 245#
257# CONFIG_NETDEBUG is not set
258CONFIG_PACKET=y 246CONFIG_PACKET=y
259CONFIG_PACKET_MMAP=y 247CONFIG_PACKET_MMAP=y
260CONFIG_UNIX=y 248CONFIG_UNIX=y
261CONFIG_XFRM=y 249CONFIG_XFRM=y
262# CONFIG_XFRM_USER is not set 250# CONFIG_XFRM_USER is not set
263# CONFIG_XFRM_SUB_POLICY is not set 251# CONFIG_XFRM_SUB_POLICY is not set
252# CONFIG_XFRM_MIGRATE is not set
264# CONFIG_NET_KEY is not set 253# CONFIG_NET_KEY is not set
265CONFIG_INET=y 254CONFIG_INET=y
266CONFIG_IP_MULTICAST=y 255CONFIG_IP_MULTICAST=y
@@ -289,10 +278,6 @@ CONFIG_INET_TCP_DIAG=y
289CONFIG_TCP_CONG_CUBIC=y 278CONFIG_TCP_CONG_CUBIC=y
290CONFIG_DEFAULT_TCP_CONG="cubic" 279CONFIG_DEFAULT_TCP_CONG="cubic"
291# CONFIG_TCP_MD5SIG is not set 280# CONFIG_TCP_MD5SIG is not set
292
293#
294# IP: Virtual Server Configuration
295#
296# CONFIG_IP_VS is not set 281# CONFIG_IP_VS is not set
297# CONFIG_IPV6 is not set 282# CONFIG_IPV6 is not set
298# CONFIG_INET6_XFRM_TUNNEL is not set 283# CONFIG_INET6_XFRM_TUNNEL is not set
@@ -306,8 +291,6 @@ CONFIG_NETFILTER=y
306# 291#
307# CONFIG_NETFILTER_NETLINK is not set 292# CONFIG_NETFILTER_NETLINK is not set
308CONFIG_NF_CONNTRACK_ENABLED=m 293CONFIG_NF_CONNTRACK_ENABLED=m
309CONFIG_NF_CONNTRACK_SUPPORT=y
310# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
311CONFIG_NF_CONNTRACK=m 294CONFIG_NF_CONNTRACK=m
312# CONFIG_NF_CT_ACCT is not set 295# CONFIG_NF_CT_ACCT is not set
313# CONFIG_NF_CONNTRACK_MARK is not set 296# CONFIG_NF_CONNTRACK_MARK is not set
@@ -320,16 +303,21 @@ CONFIG_NF_CONNTRACK_H323=m
320CONFIG_NF_CONNTRACK_IRC=m 303CONFIG_NF_CONNTRACK_IRC=m
321CONFIG_NF_CONNTRACK_NETBIOS_NS=m 304CONFIG_NF_CONNTRACK_NETBIOS_NS=m
322CONFIG_NF_CONNTRACK_PPTP=m 305CONFIG_NF_CONNTRACK_PPTP=m
306# CONFIG_NF_CONNTRACK_SANE is not set
323CONFIG_NF_CONNTRACK_SIP=m 307CONFIG_NF_CONNTRACK_SIP=m
324CONFIG_NF_CONNTRACK_TFTP=m 308CONFIG_NF_CONNTRACK_TFTP=m
325CONFIG_NETFILTER_XTABLES=m 309CONFIG_NETFILTER_XTABLES=m
326# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set 310# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
311# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set
327# CONFIG_NETFILTER_XT_TARGET_DSCP is not set 312# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
328# CONFIG_NETFILTER_XT_TARGET_MARK is not set 313# CONFIG_NETFILTER_XT_TARGET_MARK is not set
329# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set 314# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
330# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set 315# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
331# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set 316# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
317# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
332# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set 318# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
319# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set
320# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set
333# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set 321# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set
334# CONFIG_NETFILTER_XT_MATCH_DCCP is not set 322# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
335# CONFIG_NETFILTER_XT_MATCH_DSCP is not set 323# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
@@ -370,7 +358,6 @@ CONFIG_IP_NF_FILTER=m
370CONFIG_IP_NF_TARGET_REJECT=m 358CONFIG_IP_NF_TARGET_REJECT=m
371# CONFIG_IP_NF_TARGET_LOG is not set 359# CONFIG_IP_NF_TARGET_LOG is not set
372# CONFIG_IP_NF_TARGET_ULOG is not set 360# CONFIG_IP_NF_TARGET_ULOG is not set
373# CONFIG_IP_NF_TARGET_TCPMSS is not set
374CONFIG_NF_NAT=m 361CONFIG_NF_NAT=m
375CONFIG_NF_NAT_NEEDED=y 362CONFIG_NF_NAT_NEEDED=y
376CONFIG_IP_NF_TARGET_MASQUERADE=m 363CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -390,24 +377,13 @@ CONFIG_IP_NF_MANGLE=m
390CONFIG_IP_NF_TARGET_TOS=m 377CONFIG_IP_NF_TARGET_TOS=m
391CONFIG_IP_NF_TARGET_ECN=m 378CONFIG_IP_NF_TARGET_ECN=m
392CONFIG_IP_NF_TARGET_TTL=m 379CONFIG_IP_NF_TARGET_TTL=m
380# CONFIG_IP_NF_TARGET_CLUSTERIP is not set
393CONFIG_IP_NF_RAW=m 381CONFIG_IP_NF_RAW=m
394CONFIG_IP_NF_ARPTABLES=m 382CONFIG_IP_NF_ARPTABLES=m
395CONFIG_IP_NF_ARPFILTER=m 383CONFIG_IP_NF_ARPFILTER=m
396CONFIG_IP_NF_ARP_MANGLE=m 384CONFIG_IP_NF_ARP_MANGLE=m
397
398#
399# DCCP Configuration (EXPERIMENTAL)
400#
401# CONFIG_IP_DCCP is not set 385# CONFIG_IP_DCCP is not set
402
403#
404# SCTP Configuration (EXPERIMENTAL)
405#
406# CONFIG_IP_SCTP is not set 386# CONFIG_IP_SCTP is not set
407
408#
409# TIPC Configuration (EXPERIMENTAL)
410#
411# CONFIG_TIPC is not set 387# CONFIG_TIPC is not set
412# CONFIG_ATM is not set 388# CONFIG_ATM is not set
413# CONFIG_BRIDGE is not set 389# CONFIG_BRIDGE is not set
@@ -433,6 +409,14 @@ CONFIG_IP_NF_ARP_MANGLE=m
433# CONFIG_HAMRADIO is not set 409# CONFIG_HAMRADIO is not set
434# CONFIG_IRDA is not set 410# CONFIG_IRDA is not set
435# CONFIG_BT is not set 411# CONFIG_BT is not set
412# CONFIG_AF_RXRPC is not set
413
414#
415# Wireless
416#
417# CONFIG_CFG80211 is not set
418CONFIG_WIRELESS_EXT=y
419# CONFIG_MAC80211 is not set
436CONFIG_IEEE80211=m 420CONFIG_IEEE80211=m
437CONFIG_IEEE80211_DEBUG=y 421CONFIG_IEEE80211_DEBUG=y
438CONFIG_IEEE80211_CRYPT_WEP=m 422CONFIG_IEEE80211_CRYPT_WEP=m
@@ -440,7 +424,7 @@ CONFIG_IEEE80211_CRYPT_CCMP=m
440CONFIG_IEEE80211_CRYPT_TKIP=m 424CONFIG_IEEE80211_CRYPT_TKIP=m
441CONFIG_IEEE80211_SOFTMAC=m 425CONFIG_IEEE80211_SOFTMAC=m
442CONFIG_IEEE80211_SOFTMAC_DEBUG=y 426CONFIG_IEEE80211_SOFTMAC_DEBUG=y
443CONFIG_WIRELESS_EXT=y 427# CONFIG_RFKILL is not set
444 428
445# 429#
446# Device Drivers 430# Device Drivers
@@ -453,16 +437,13 @@ CONFIG_STANDALONE=y
453CONFIG_PREVENT_FIRMWARE_BUILD=y 437CONFIG_PREVENT_FIRMWARE_BUILD=y
454CONFIG_FW_LOADER=m 438CONFIG_FW_LOADER=m
455# CONFIG_DEBUG_DRIVER is not set 439# CONFIG_DEBUG_DRIVER is not set
440# CONFIG_DEBUG_DEVRES is not set
456# CONFIG_SYS_HYPERVISOR is not set 441# CONFIG_SYS_HYPERVISOR is not set
457 442
458# 443#
459# Connector - unified userspace <-> kernelspace linker 444# Connector - unified userspace <-> kernelspace linker
460# 445#
461# CONFIG_CONNECTOR is not set 446# CONFIG_CONNECTOR is not set
462
463#
464# Memory Technology Devices (MTD)
465#
466CONFIG_MTD=y 447CONFIG_MTD=y
467# CONFIG_MTD_DEBUG is not set 448# CONFIG_MTD_DEBUG is not set
468CONFIG_MTD_CONCAT=y 449CONFIG_MTD_CONCAT=y
@@ -511,7 +492,6 @@ CONFIG_MTD_CFI_UTIL=y
511# CONFIG_MTD_RAM is not set 492# CONFIG_MTD_RAM is not set
512# CONFIG_MTD_ROM is not set 493# CONFIG_MTD_ROM is not set
513# CONFIG_MTD_ABSENT is not set 494# CONFIG_MTD_ABSENT is not set
514# CONFIG_MTD_OBSOLETE_CHIPS is not set
515 495
516# 496#
517# Mapping drivers for chip access 497# Mapping drivers for chip access
@@ -539,17 +519,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
539# CONFIG_MTD_DOC2000 is not set 519# CONFIG_MTD_DOC2000 is not set
540# CONFIG_MTD_DOC2001 is not set 520# CONFIG_MTD_DOC2001 is not set
541# CONFIG_MTD_DOC2001PLUS is not set 521# CONFIG_MTD_DOC2001PLUS is not set
542
543#
544# NAND Flash Device Drivers
545#
546# CONFIG_MTD_NAND is not set 522# CONFIG_MTD_NAND is not set
547# CONFIG_MTD_NAND_CAFE is not set 523# CONFIG_MTD_ONENAND is not set
548 524
549# 525#
550# OneNAND Flash Device Drivers 526# UBI - Unsorted block images
551# 527#
552# CONFIG_MTD_ONENAND is not set 528# CONFIG_MTD_UBI is not set
553 529
554# 530#
555# Parallel port support 531# Parallel port support
@@ -559,6 +535,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
559# 535#
560# Plug and Play support 536# Plug and Play support
561# 537#
538# CONFIG_PNPACPI is not set
562 539
563# 540#
564# Block devices 541# Block devices
@@ -578,19 +555,16 @@ CONFIG_BLK_DEV_RAM=y
578CONFIG_BLK_DEV_RAM_COUNT=2 555CONFIG_BLK_DEV_RAM_COUNT=2
579CONFIG_BLK_DEV_RAM_SIZE=8192 556CONFIG_BLK_DEV_RAM_SIZE=8192
580CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 557CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
581CONFIG_BLK_DEV_INITRD=y
582# CONFIG_CDROM_PKTCDVD is not set 558# CONFIG_CDROM_PKTCDVD is not set
583# CONFIG_ATA_OVER_ETH is not set 559# CONFIG_ATA_OVER_ETH is not set
584 560
585# 561#
586# Misc devices 562# Misc devices
587# 563#
564# CONFIG_PHANTOM is not set
588# CONFIG_SGI_IOC4 is not set 565# CONFIG_SGI_IOC4 is not set
589# CONFIG_TIFM_CORE is not set 566# CONFIG_TIFM_CORE is not set
590 567# CONFIG_BLINK is not set
591#
592# ATA/ATAPI/MFM/RLL support
593#
594# CONFIG_IDE is not set 568# CONFIG_IDE is not set
595 569
596# 570#
@@ -619,6 +593,7 @@ CONFIG_SCSI_MULTI_LUN=y
619# CONFIG_SCSI_CONSTANTS is not set 593# CONFIG_SCSI_CONSTANTS is not set
620# CONFIG_SCSI_LOGGING is not set 594# CONFIG_SCSI_LOGGING is not set
621# CONFIG_SCSI_SCAN_ASYNC is not set 595# CONFIG_SCSI_SCAN_ASYNC is not set
596CONFIG_SCSI_WAIT_SCAN=m
622 597
623# 598#
624# SCSI Transports 599# SCSI Transports
@@ -667,11 +642,8 @@ CONFIG_SCSI_MULTI_LUN=y
667# CONFIG_SCSI_NSP32 is not set 642# CONFIG_SCSI_NSP32 is not set
668# CONFIG_SCSI_DEBUG is not set 643# CONFIG_SCSI_DEBUG is not set
669# CONFIG_SCSI_SRP is not set 644# CONFIG_SCSI_SRP is not set
670
671#
672# Serial ATA (prod) and Parallel ATA (experimental) drivers
673#
674CONFIG_ATA=y 645CONFIG_ATA=y
646# CONFIG_ATA_NONSTANDARD is not set
675# CONFIG_SATA_AHCI is not set 647# CONFIG_SATA_AHCI is not set
676# CONFIG_SATA_SVW is not set 648# CONFIG_SATA_SVW is not set
677# CONFIG_ATA_PIIX is not set 649# CONFIG_ATA_PIIX is not set
@@ -687,10 +659,12 @@ CONFIG_ATA=y
687# CONFIG_SATA_ULI is not set 659# CONFIG_SATA_ULI is not set
688# CONFIG_SATA_VIA is not set 660# CONFIG_SATA_VIA is not set
689# CONFIG_SATA_VITESSE is not set 661# CONFIG_SATA_VITESSE is not set
662# CONFIG_SATA_INIC162X is not set
690# CONFIG_PATA_ALI is not set 663# CONFIG_PATA_ALI is not set
691# CONFIG_PATA_AMD is not set 664# CONFIG_PATA_AMD is not set
692# CONFIG_PATA_ARTOP is not set 665# CONFIG_PATA_ARTOP is not set
693# CONFIG_PATA_ATIIXP is not set 666# CONFIG_PATA_ATIIXP is not set
667# CONFIG_PATA_CMD640_PCI is not set
694# CONFIG_PATA_CMD64X is not set 668# CONFIG_PATA_CMD64X is not set
695# CONFIG_PATA_CS5520 is not set 669# CONFIG_PATA_CS5520 is not set
696# CONFIG_PATA_CS5530 is not set 670# CONFIG_PATA_CS5530 is not set
@@ -702,6 +676,7 @@ CONFIG_ATA=y
702# CONFIG_PATA_HPT3X2N is not set 676# CONFIG_PATA_HPT3X2N is not set
703# CONFIG_PATA_HPT3X3 is not set 677# CONFIG_PATA_HPT3X3 is not set
704CONFIG_PATA_IT821X=y 678CONFIG_PATA_IT821X=y
679# CONFIG_PATA_IT8213 is not set
705# CONFIG_PATA_JMICRON is not set 680# CONFIG_PATA_JMICRON is not set
706# CONFIG_PATA_TRIFLEX is not set 681# CONFIG_PATA_TRIFLEX is not set
707# CONFIG_PATA_MARVELL is not set 682# CONFIG_PATA_MARVELL is not set
@@ -738,18 +713,14 @@ CONFIG_PATA_SIL680=y
738# 713#
739# IEEE 1394 (FireWire) support 714# IEEE 1394 (FireWire) support
740# 715#
716# CONFIG_FIREWIRE is not set
741# CONFIG_IEEE1394 is not set 717# CONFIG_IEEE1394 is not set
742 718
743# 719#
744# I2O device support 720# I2O device support
745# 721#
746# CONFIG_I2O is not set 722# CONFIG_I2O is not set
747 723# CONFIG_MACINTOSH_DRIVERS is not set
748#
749# Macintosh device drivers
750#
751# CONFIG_MAC_EMUMOUSEBTN is not set
752# CONFIG_WINDFARM is not set
753 724
754# 725#
755# Network device support 726# Network device support
@@ -759,15 +730,7 @@ CONFIG_NETDEVICES=y
759# CONFIG_BONDING is not set 730# CONFIG_BONDING is not set
760# CONFIG_EQUALIZER is not set 731# CONFIG_EQUALIZER is not set
761CONFIG_TUN=m 732CONFIG_TUN=m
762
763#
764# ARCnet devices
765#
766# CONFIG_ARCNET is not set 733# CONFIG_ARCNET is not set
767
768#
769# PHY device support
770#
771# CONFIG_PHYLIB is not set 734# CONFIG_PHYLIB is not set
772 735
773# 736#
@@ -795,10 +758,7 @@ CONFIG_TULIP_MMIO=y
795# CONFIG_ULI526X is not set 758# CONFIG_ULI526X is not set
796# CONFIG_HP100 is not set 759# CONFIG_HP100 is not set
797# CONFIG_NET_PCI is not set 760# CONFIG_NET_PCI is not set
798 761CONFIG_NETDEV_1000=y
799#
800# Ethernet (1000 Mbit)
801#
802# CONFIG_ACENIC is not set 762# CONFIG_ACENIC is not set
803# CONFIG_DL2K is not set 763# CONFIG_DL2K is not set
804# CONFIG_E1000 is not set 764# CONFIG_E1000 is not set
@@ -811,58 +771,36 @@ CONFIG_R8169=y
811# CONFIG_SKGE is not set 771# CONFIG_SKGE is not set
812# CONFIG_SKY2 is not set 772# CONFIG_SKY2 is not set
813# CONFIG_SK98LIN is not set 773# CONFIG_SK98LIN is not set
774# CONFIG_VIA_VELOCITY is not set
814# CONFIG_TIGON3 is not set 775# CONFIG_TIGON3 is not set
815# CONFIG_BNX2 is not set 776# CONFIG_BNX2 is not set
816# CONFIG_QLA3XXX is not set 777# CONFIG_QLA3XXX is not set
817 778# CONFIG_ATL1 is not set
818# 779CONFIG_NETDEV_10000=y
819# Ethernet (10000 Mbit)
820#
821# CONFIG_CHELSIO_T1 is not set 780# CONFIG_CHELSIO_T1 is not set
781# CONFIG_CHELSIO_T3 is not set
822# CONFIG_IXGB is not set 782# CONFIG_IXGB is not set
823# CONFIG_S2IO is not set 783# CONFIG_S2IO is not set
824# CONFIG_MYRI10GE is not set 784# CONFIG_MYRI10GE is not set
825# CONFIG_NETXEN_NIC is not set 785# CONFIG_NETXEN_NIC is not set
826 786# CONFIG_MLX4_CORE is not set
827#
828# Token Ring devices
829#
830# CONFIG_TR is not set 787# CONFIG_TR is not set
831 788
832# 789#
833# Wireless LAN (non-hamradio) 790# Wireless LAN
834#
835CONFIG_NET_RADIO=y
836# CONFIG_NET_WIRELESS_RTNETLINK is not set
837
838#
839# Obsolete Wireless cards support (pre-802.11)
840#
841# CONFIG_STRIP is not set
842
843#
844# Wireless 802.11b ISA/PCI cards support
845#
846# CONFIG_IPW2100 is not set
847# CONFIG_IPW2200 is not set
848# CONFIG_AIRO is not set
849# CONFIG_HERMES is not set
850# CONFIG_ATMEL is not set
851
852#
853# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
854# 791#
855# CONFIG_PRISM54 is not set 792# CONFIG_WLAN_PRE80211 is not set
856# CONFIG_USB_ZD1201 is not set 793# CONFIG_WLAN_80211 is not set
857# CONFIG_HOSTAP is not set
858# CONFIG_BCM43XX is not set
859CONFIG_ZD1211RW=m
860# CONFIG_ZD1211RW_DEBUG is not set
861CONFIG_NET_WIRELESS=y
862 794
863# 795#
864# Wan interfaces 796# USB Network Adapters
865# 797#
798# CONFIG_USB_CATC is not set
799# CONFIG_USB_KAWETH is not set
800# CONFIG_USB_PEGASUS is not set
801# CONFIG_USB_RTL8150 is not set
802# CONFIG_USB_USBNET_MII is not set
803# CONFIG_USB_USBNET is not set
866# CONFIG_WAN is not set 804# CONFIG_WAN is not set
867# CONFIG_FDDI is not set 805# CONFIG_FDDI is not set
868# CONFIG_HIPPI is not set 806# CONFIG_HIPPI is not set
@@ -872,7 +810,6 @@ CONFIG_NET_WIRELESS=y
872# CONFIG_SHAPER is not set 810# CONFIG_SHAPER is not set
873CONFIG_NETCONSOLE=y 811CONFIG_NETCONSOLE=y
874CONFIG_NETPOLL=y 812CONFIG_NETPOLL=y
875# CONFIG_NETPOLL_RX is not set
876# CONFIG_NETPOLL_TRAP is not set 813# CONFIG_NETPOLL_TRAP is not set
877CONFIG_NET_POLL_CONTROLLER=y 814CONFIG_NET_POLL_CONTROLLER=y
878 815
@@ -891,6 +828,7 @@ CONFIG_NET_POLL_CONTROLLER=y
891# 828#
892CONFIG_INPUT=y 829CONFIG_INPUT=y
893# CONFIG_INPUT_FF_MEMLESS is not set 830# CONFIG_INPUT_FF_MEMLESS is not set
831# CONFIG_INPUT_POLLDEV is not set
894 832
895# 833#
896# Userland interfaces 834# Userland interfaces
@@ -910,8 +848,14 @@ CONFIG_INPUT_EVDEV=m
910# CONFIG_INPUT_KEYBOARD is not set 848# CONFIG_INPUT_KEYBOARD is not set
911# CONFIG_INPUT_MOUSE is not set 849# CONFIG_INPUT_MOUSE is not set
912# CONFIG_INPUT_JOYSTICK is not set 850# CONFIG_INPUT_JOYSTICK is not set
851# CONFIG_INPUT_TABLET is not set
913# CONFIG_INPUT_TOUCHSCREEN is not set 852# CONFIG_INPUT_TOUCHSCREEN is not set
914CONFIG_INPUT_MISC=y 853CONFIG_INPUT_MISC=y
854# CONFIG_INPUT_ATI_REMOTE is not set
855# CONFIG_INPUT_ATI_REMOTE2 is not set
856# CONFIG_INPUT_KEYSPAN_REMOTE is not set
857# CONFIG_INPUT_POWERMATE is not set
858# CONFIG_INPUT_YEALINK is not set
915CONFIG_INPUT_UINPUT=m 859CONFIG_INPUT_UINPUT=m
916 860
917# 861#
@@ -950,6 +894,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
950CONFIG_SERIAL_CORE=y 894CONFIG_SERIAL_CORE=y
951CONFIG_SERIAL_CORE_CONSOLE=y 895CONFIG_SERIAL_CORE_CONSOLE=y
952# CONFIG_SERIAL_JSM is not set 896# CONFIG_SERIAL_JSM is not set
897CONFIG_SERIAL_OF_PLATFORM=y
953CONFIG_UNIX98_PTYS=y 898CONFIG_UNIX98_PTYS=y
954CONFIG_LEGACY_PTYS=y 899CONFIG_LEGACY_PTYS=y
955CONFIG_LEGACY_PTY_COUNT=256 900CONFIG_LEGACY_PTY_COUNT=256
@@ -958,15 +903,10 @@ CONFIG_LEGACY_PTY_COUNT=256
958# IPMI 903# IPMI
959# 904#
960# CONFIG_IPMI_HANDLER is not set 905# CONFIG_IPMI_HANDLER is not set
961
962#
963# Watchdog Cards
964#
965# CONFIG_WATCHDOG is not set 906# CONFIG_WATCHDOG is not set
966CONFIG_HW_RANDOM=y 907CONFIG_HW_RANDOM=y
967# CONFIG_NVRAM is not set 908# CONFIG_NVRAM is not set
968# CONFIG_GEN_RTC is not set 909# CONFIG_GEN_RTC is not set
969# CONFIG_DTLK is not set
970# CONFIG_R3964 is not set 910# CONFIG_R3964 is not set
971# CONFIG_APPLICOM is not set 911# CONFIG_APPLICOM is not set
972# CONFIG_AGP is not set 912# CONFIG_AGP is not set
@@ -977,11 +917,9 @@ CONFIG_HW_RANDOM=y
977# TPM devices 917# TPM devices
978# 918#
979# CONFIG_TCG_TPM is not set 919# CONFIG_TCG_TPM is not set
980 920CONFIG_DEVPORT=y
981#
982# I2C support
983#
984CONFIG_I2C=y 921CONFIG_I2C=y
922CONFIG_I2C_BOARDINFO=y
985CONFIG_I2C_CHARDEV=y 923CONFIG_I2C_CHARDEV=y
986 924
987# 925#
@@ -1008,14 +946,15 @@ CONFIG_I2C_MPC=y
1008# CONFIG_I2C_PARPORT_LIGHT is not set 946# CONFIG_I2C_PARPORT_LIGHT is not set
1009# CONFIG_I2C_PROSAVAGE is not set 947# CONFIG_I2C_PROSAVAGE is not set
1010# CONFIG_I2C_SAVAGE4 is not set 948# CONFIG_I2C_SAVAGE4 is not set
949# CONFIG_I2C_SIMTEC is not set
1011# CONFIG_I2C_SIS5595 is not set 950# CONFIG_I2C_SIS5595 is not set
1012# CONFIG_I2C_SIS630 is not set 951# CONFIG_I2C_SIS630 is not set
1013# CONFIG_I2C_SIS96X is not set 952# CONFIG_I2C_SIS96X is not set
1014# CONFIG_I2C_STUB is not set 953# CONFIG_I2C_STUB is not set
954# CONFIG_I2C_TINY_USB is not set
1015# CONFIG_I2C_VIA is not set 955# CONFIG_I2C_VIA is not set
1016# CONFIG_I2C_VIAPRO is not set 956# CONFIG_I2C_VIAPRO is not set
1017# CONFIG_I2C_VOODOO3 is not set 957# CONFIG_I2C_VOODOO3 is not set
1018# CONFIG_I2C_PCA_ISA is not set
1019 958
1020# 959#
1021# Miscellaneous I2C Chip support 960# Miscellaneous I2C Chip support
@@ -1043,16 +982,14 @@ CONFIG_SENSORS_EEPROM=m
1043# Dallas's 1-wire bus 982# Dallas's 1-wire bus
1044# 983#
1045# CONFIG_W1 is not set 984# CONFIG_W1 is not set
1046
1047#
1048# Hardware Monitoring support
1049#
1050CONFIG_HWMON=y 985CONFIG_HWMON=y
1051# CONFIG_HWMON_VID is not set 986# CONFIG_HWMON_VID is not set
1052# CONFIG_SENSORS_ABITUGURU is not set 987# CONFIG_SENSORS_ABITUGURU is not set
988# CONFIG_SENSORS_AD7418 is not set
1053# CONFIG_SENSORS_ADM1021 is not set 989# CONFIG_SENSORS_ADM1021 is not set
1054# CONFIG_SENSORS_ADM1025 is not set 990# CONFIG_SENSORS_ADM1025 is not set
1055# CONFIG_SENSORS_ADM1026 is not set 991# CONFIG_SENSORS_ADM1026 is not set
992# CONFIG_SENSORS_ADM1029 is not set
1056# CONFIG_SENSORS_ADM1031 is not set 993# CONFIG_SENSORS_ADM1031 is not set
1057# CONFIG_SENSORS_ADM9240 is not set 994# CONFIG_SENSORS_ADM9240 is not set
1058# CONFIG_SENSORS_ASB100 is not set 995# CONFIG_SENSORS_ASB100 is not set
@@ -1075,6 +1012,7 @@ CONFIG_HWMON=y
1075# CONFIG_SENSORS_LM90 is not set 1012# CONFIG_SENSORS_LM90 is not set
1076# CONFIG_SENSORS_LM92 is not set 1013# CONFIG_SENSORS_LM92 is not set
1077# CONFIG_SENSORS_MAX1619 is not set 1014# CONFIG_SENSORS_MAX1619 is not set
1015# CONFIG_SENSORS_MAX6650 is not set
1078# CONFIG_SENSORS_PC87360 is not set 1016# CONFIG_SENSORS_PC87360 is not set
1079# CONFIG_SENSORS_PC87427 is not set 1017# CONFIG_SENSORS_PC87427 is not set
1080# CONFIG_SENSORS_SIS5595 is not set 1018# CONFIG_SENSORS_SIS5595 is not set
@@ -1094,20 +1032,27 @@ CONFIG_HWMON=y
1094# CONFIG_HWMON_DEBUG_CHIP is not set 1032# CONFIG_HWMON_DEBUG_CHIP is not set
1095 1033
1096# 1034#
1035# Multifunction device drivers
1036#
1037# CONFIG_MFD_SM501 is not set
1038
1039#
1097# Multimedia devices 1040# Multimedia devices
1098# 1041#
1099# CONFIG_VIDEO_DEV is not set 1042# CONFIG_VIDEO_DEV is not set
1043# CONFIG_DVB_CORE is not set
1044# CONFIG_DAB is not set
1100 1045
1101# 1046#
1102# Digital Video Broadcasting Devices 1047# Graphics support
1103# 1048#
1104# CONFIG_DVB is not set 1049# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1105# CONFIG_USB_DABUSB is not set
1106 1050
1107# 1051#
1108# Graphics support 1052# Display device support
1109# 1053#
1110CONFIG_FIRMWARE_EDID=y 1054# CONFIG_DISPLAY_SUPPORT is not set
1055# CONFIG_VGASTATE is not set
1111# CONFIG_FB is not set 1056# CONFIG_FB is not set
1112# CONFIG_FB_IBM_GXT4500 is not set 1057# CONFIG_FB_IBM_GXT4500 is not set
1113 1058
@@ -1116,7 +1061,6 @@ CONFIG_FIRMWARE_EDID=y
1116# 1061#
1117# CONFIG_VGA_CONSOLE is not set 1062# CONFIG_VGA_CONSOLE is not set
1118CONFIG_DUMMY_CONSOLE=y 1063CONFIG_DUMMY_CONSOLE=y
1119# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1120 1064
1121# 1065#
1122# Sound 1066# Sound
@@ -1127,6 +1071,18 @@ CONFIG_DUMMY_CONSOLE=y
1127# HID Devices 1071# HID Devices
1128# 1072#
1129CONFIG_HID=m 1073CONFIG_HID=m
1074# CONFIG_HID_DEBUG is not set
1075
1076#
1077# USB Input Devices
1078#
1079# CONFIG_USB_HID is not set
1080
1081#
1082# USB HID Boot Protocol drivers
1083#
1084# CONFIG_USB_KBD is not set
1085# CONFIG_USB_MOUSE is not set
1130 1086
1131# 1087#
1132# USB support 1088# USB support
@@ -1141,7 +1097,7 @@ CONFIG_USB=y
1141# Miscellaneous USB options 1097# Miscellaneous USB options
1142# 1098#
1143CONFIG_USB_DEVICEFS=y 1099CONFIG_USB_DEVICEFS=y
1144# CONFIG_USB_BANDWIDTH is not set 1100CONFIG_USB_DEVICE_CLASS=y
1145# CONFIG_USB_DYNAMIC_MINORS is not set 1101# CONFIG_USB_DYNAMIC_MINORS is not set
1146# CONFIG_USB_OTG is not set 1102# CONFIG_USB_OTG is not set
1147 1103
@@ -1152,9 +1108,15 @@ CONFIG_USB_EHCI_HCD=y
1152# CONFIG_USB_EHCI_SPLIT_ISO is not set 1108# CONFIG_USB_EHCI_SPLIT_ISO is not set
1153# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1109# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1154# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1110# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1111# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1155# CONFIG_USB_ISP116X_HCD is not set 1112# CONFIG_USB_ISP116X_HCD is not set
1156CONFIG_USB_OHCI_HCD=y 1113CONFIG_USB_OHCI_HCD=y
1157# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1114CONFIG_USB_OHCI_HCD_PPC_OF=y
1115CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1116# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
1117CONFIG_USB_OHCI_HCD_PCI=y
1118CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1119CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
1158CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1120CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1159# CONFIG_USB_UHCI_HCD is not set 1121# CONFIG_USB_UHCI_HCD is not set
1160# CONFIG_USB_SL811_HCD is not set 1122# CONFIG_USB_SL811_HCD is not set
@@ -1187,43 +1149,10 @@ CONFIG_USB_STORAGE=m
1187# CONFIG_USB_LIBUSUAL is not set 1149# CONFIG_USB_LIBUSUAL is not set
1188 1150
1189# 1151#
1190# USB Input Devices
1191#
1192# CONFIG_USB_HID is not set
1193
1194#
1195# USB HID Boot Protocol drivers
1196#
1197# CONFIG_USB_KBD is not set
1198# CONFIG_USB_MOUSE is not set
1199# CONFIG_USB_AIPTEK is not set
1200# CONFIG_USB_WACOM is not set
1201# CONFIG_USB_ACECAD is not set
1202# CONFIG_USB_KBTAB is not set
1203# CONFIG_USB_POWERMATE is not set
1204# CONFIG_USB_TOUCHSCREEN is not set
1205# CONFIG_USB_YEALINK is not set
1206# CONFIG_USB_XPAD is not set
1207# CONFIG_USB_ATI_REMOTE is not set
1208# CONFIG_USB_ATI_REMOTE2 is not set
1209# CONFIG_USB_KEYSPAN_REMOTE is not set
1210# CONFIG_USB_APPLETOUCH is not set
1211
1212#
1213# USB Imaging devices 1152# USB Imaging devices
1214# 1153#
1215# CONFIG_USB_MDC800 is not set 1154# CONFIG_USB_MDC800 is not set
1216# CONFIG_USB_MICROTEK is not set 1155# CONFIG_USB_MICROTEK is not set
1217
1218#
1219# USB Network Adapters
1220#
1221# CONFIG_USB_CATC is not set
1222# CONFIG_USB_KAWETH is not set
1223# CONFIG_USB_PEGASUS is not set
1224# CONFIG_USB_RTL8150 is not set
1225# CONFIG_USB_USBNET_MII is not set
1226# CONFIG_USB_USBNET is not set
1227CONFIG_USB_MON=y 1156CONFIG_USB_MON=y
1228 1157
1229# 1158#
@@ -1283,6 +1212,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=y
1283# CONFIG_USB_RIO500 is not set 1212# CONFIG_USB_RIO500 is not set
1284# CONFIG_USB_LEGOTOWER is not set 1213# CONFIG_USB_LEGOTOWER is not set
1285# CONFIG_USB_LCD is not set 1214# CONFIG_USB_LCD is not set
1215# CONFIG_USB_BERRY_CHARGE is not set
1286# CONFIG_USB_LED is not set 1216# CONFIG_USB_LED is not set
1287# CONFIG_USB_CYPRESS_CY7C63 is not set 1217# CONFIG_USB_CYPRESS_CY7C63 is not set
1288# CONFIG_USB_CYTHERM is not set 1218# CONFIG_USB_CYTHERM is not set
@@ -1293,6 +1223,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=y
1293# CONFIG_USB_SISUSBVGA is not set 1223# CONFIG_USB_SISUSBVGA is not set
1294# CONFIG_USB_LD is not set 1224# CONFIG_USB_LD is not set
1295# CONFIG_USB_TRANCEVIBRATOR is not set 1225# CONFIG_USB_TRANCEVIBRATOR is not set
1226# CONFIG_USB_IOWARRIOR is not set
1296# CONFIG_USB_TEST is not set 1227# CONFIG_USB_TEST is not set
1297 1228
1298# 1229#
@@ -1303,10 +1234,6 @@ CONFIG_USB_SERIAL_FTDI_SIO=y
1303# USB Gadget Support 1234# USB Gadget Support
1304# 1235#
1305# CONFIG_USB_GADGET is not set 1236# CONFIG_USB_GADGET is not set
1306
1307#
1308# MMC/SD Card support
1309#
1310# CONFIG_MMC is not set 1237# CONFIG_MMC is not set
1311 1238
1312# 1239#
@@ -1347,24 +1274,37 @@ CONFIG_RTC_INTF_SYSFS=y
1347CONFIG_RTC_INTF_PROC=y 1274CONFIG_RTC_INTF_PROC=y
1348CONFIG_RTC_INTF_DEV=y 1275CONFIG_RTC_INTF_DEV=y
1349# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 1276# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1277# CONFIG_RTC_DRV_TEST is not set
1350 1278
1351# 1279#
1352# RTC drivers 1280# I2C RTC drivers
1353# 1281#
1354# CONFIG_RTC_DRV_X1205 is not set
1355# CONFIG_RTC_DRV_DS1307 is not set 1282# CONFIG_RTC_DRV_DS1307 is not set
1356# CONFIG_RTC_DRV_DS1553 is not set
1357# CONFIG_RTC_DRV_ISL1208 is not set
1358# CONFIG_RTC_DRV_DS1672 is not set 1283# CONFIG_RTC_DRV_DS1672 is not set
1359# CONFIG_RTC_DRV_DS1742 is not set 1284# CONFIG_RTC_DRV_MAX6900 is not set
1285CONFIG_RTC_DRV_RS5C372=y
1286# CONFIG_RTC_DRV_ISL1208 is not set
1287# CONFIG_RTC_DRV_X1205 is not set
1360# CONFIG_RTC_DRV_PCF8563 is not set 1288# CONFIG_RTC_DRV_PCF8563 is not set
1361# CONFIG_RTC_DRV_PCF8583 is not set 1289# CONFIG_RTC_DRV_PCF8583 is not set
1362CONFIG_RTC_DRV_RS5C372=y 1290
1291#
1292# SPI RTC drivers
1293#
1294
1295#
1296# Platform RTC drivers
1297#
1298# CONFIG_RTC_DRV_DS1553 is not set
1299# CONFIG_RTC_DRV_DS1742 is not set
1363# CONFIG_RTC_DRV_M48T86 is not set 1300# CONFIG_RTC_DRV_M48T86 is not set
1364# CONFIG_RTC_DRV_TEST is not set
1365# CONFIG_RTC_DRV_V3020 is not set 1301# CONFIG_RTC_DRV_V3020 is not set
1366 1302
1367# 1303#
1304# on-CPU RTC drivers
1305#
1306
1307#
1368# DMA Engine support 1308# DMA Engine support
1369# 1309#
1370# CONFIG_DMA_ENGINE is not set 1310# CONFIG_DMA_ENGINE is not set
@@ -1378,10 +1318,6 @@ CONFIG_RTC_DRV_RS5C372=y
1378# 1318#
1379 1319
1380# 1320#
1381# Virtualization
1382#
1383
1384#
1385# File systems 1321# File systems
1386# 1322#
1387CONFIG_EXT2_FS=y 1323CONFIG_EXT2_FS=y
@@ -1421,7 +1357,6 @@ CONFIG_DNOTIFY=y
1421CONFIG_ISO9660_FS=m 1357CONFIG_ISO9660_FS=m
1422CONFIG_JOLIET=y 1358CONFIG_JOLIET=y
1423CONFIG_ZISOFS=y 1359CONFIG_ZISOFS=y
1424CONFIG_ZISOFS_FS=m
1425CONFIG_UDF_FS=m 1360CONFIG_UDF_FS=m
1426CONFIG_UDF_NLS=y 1361CONFIG_UDF_NLS=y
1427 1362
@@ -1489,6 +1424,7 @@ CONFIG_NFS_ACL_SUPPORT=y
1489CONFIG_NFS_COMMON=y 1424CONFIG_NFS_COMMON=y
1490CONFIG_SUNRPC=y 1425CONFIG_SUNRPC=y
1491CONFIG_SUNRPC_GSS=y 1426CONFIG_SUNRPC_GSS=y
1427# CONFIG_SUNRPC_BIND34 is not set
1492CONFIG_RPCSEC_GSS_KRB5=y 1428CONFIG_RPCSEC_GSS_KRB5=y
1493# CONFIG_RPCSEC_GSS_SPKM3 is not set 1429# CONFIG_RPCSEC_GSS_SPKM3 is not set
1494# CONFIG_SMB_FS is not set 1430# CONFIG_SMB_FS is not set
@@ -1557,6 +1493,7 @@ CONFIG_NLS_UTF8=m
1557# Distributed Lock Manager 1493# Distributed Lock Manager
1558# 1494#
1559# CONFIG_DLM is not set 1495# CONFIG_DLM is not set
1496# CONFIG_UCC_SLOW is not set
1560 1497
1561# 1498#
1562# Library routines 1499# Library routines
@@ -1564,6 +1501,7 @@ CONFIG_NLS_UTF8=m
1564CONFIG_BITREVERSE=y 1501CONFIG_BITREVERSE=y
1565CONFIG_CRC_CCITT=m 1502CONFIG_CRC_CCITT=m
1566# CONFIG_CRC16 is not set 1503# CONFIG_CRC16 is not set
1504# CONFIG_CRC_ITU_T is not set
1567CONFIG_CRC32=y 1505CONFIG_CRC32=y
1568CONFIG_LIBCRC32C=m 1506CONFIG_LIBCRC32C=m
1569CONFIG_ZLIB_INFLATE=m 1507CONFIG_ZLIB_INFLATE=m
@@ -1571,13 +1509,16 @@ CONFIG_ZLIB_DEFLATE=m
1571CONFIG_TEXTSEARCH=y 1509CONFIG_TEXTSEARCH=y
1572CONFIG_TEXTSEARCH_KMP=m 1510CONFIG_TEXTSEARCH_KMP=m
1573CONFIG_PLIST=y 1511CONFIG_PLIST=y
1574CONFIG_IOMAP_COPY=y 1512CONFIG_HAS_IOMEM=y
1513CONFIG_HAS_IOPORT=y
1514CONFIG_HAS_DMA=y
1575 1515
1576# 1516#
1577# Instrumentation Support 1517# Instrumentation Support
1578# 1518#
1579CONFIG_PROFILING=y 1519CONFIG_PROFILING=y
1580CONFIG_OPROFILE=m 1520CONFIG_OPROFILE=m
1521# CONFIG_KPROBES is not set
1581 1522
1582# 1523#
1583# Kernel hacking 1524# Kernel hacking
@@ -1589,15 +1530,15 @@ CONFIG_MAGIC_SYSRQ=y
1589# CONFIG_DEBUG_FS is not set 1530# CONFIG_DEBUG_FS is not set
1590# CONFIG_HEADERS_CHECK is not set 1531# CONFIG_HEADERS_CHECK is not set
1591CONFIG_DEBUG_KERNEL=y 1532CONFIG_DEBUG_KERNEL=y
1592CONFIG_LOG_BUF_SHIFT=14 1533# CONFIG_DEBUG_SHIRQ is not set
1593CONFIG_DETECT_SOFTLOCKUP=y 1534CONFIG_DETECT_SOFTLOCKUP=y
1594# CONFIG_SCHEDSTATS is not set 1535# CONFIG_SCHEDSTATS is not set
1536# CONFIG_TIMER_STATS is not set
1595# CONFIG_DEBUG_SLAB is not set 1537# CONFIG_DEBUG_SLAB is not set
1596# CONFIG_DEBUG_RT_MUTEXES is not set 1538# CONFIG_DEBUG_RT_MUTEXES is not set
1597# CONFIG_RT_MUTEX_TESTER is not set 1539# CONFIG_RT_MUTEX_TESTER is not set
1598# CONFIG_DEBUG_SPINLOCK is not set 1540# CONFIG_DEBUG_SPINLOCK is not set
1599# CONFIG_DEBUG_MUTEXES is not set 1541# CONFIG_DEBUG_MUTEXES is not set
1600# CONFIG_DEBUG_RWSEMS is not set
1601# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1542# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1602# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1543# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1603# CONFIG_DEBUG_KOBJECT is not set 1544# CONFIG_DEBUG_KOBJECT is not set
@@ -1607,10 +1548,13 @@ CONFIG_DEBUG_BUGVERBOSE=y
1607# CONFIG_DEBUG_LIST is not set 1548# CONFIG_DEBUG_LIST is not set
1608CONFIG_FORCED_INLINING=y 1549CONFIG_FORCED_INLINING=y
1609# CONFIG_RCU_TORTURE_TEST is not set 1550# CONFIG_RCU_TORTURE_TEST is not set
1551# CONFIG_FAULT_INJECTION is not set
1552# CONFIG_DEBUG_STACKOVERFLOW is not set
1553# CONFIG_DEBUG_STACK_USAGE is not set
1554# CONFIG_DEBUG_PAGEALLOC is not set
1610# CONFIG_DEBUGGER is not set 1555# CONFIG_DEBUGGER is not set
1611# CONFIG_BDI_SWITCH is not set 1556# CONFIG_BDI_SWITCH is not set
1612# CONFIG_BOOTX_TEXT is not set 1557# CONFIG_BOOTX_TEXT is not set
1613# CONFIG_SERIAL_TEXT_DEBUG is not set
1614# CONFIG_PPC_EARLY_DEBUG is not set 1558# CONFIG_PPC_EARLY_DEBUG is not set
1615 1559
1616# 1560#
@@ -1639,8 +1583,11 @@ CONFIG_CRYPTO_SHA1=m
1639# CONFIG_CRYPTO_GF128MUL is not set 1583# CONFIG_CRYPTO_GF128MUL is not set
1640CONFIG_CRYPTO_ECB=m 1584CONFIG_CRYPTO_ECB=m
1641CONFIG_CRYPTO_CBC=y 1585CONFIG_CRYPTO_CBC=y
1586CONFIG_CRYPTO_PCBC=m
1642# CONFIG_CRYPTO_LRW is not set 1587# CONFIG_CRYPTO_LRW is not set
1588# CONFIG_CRYPTO_CRYPTD is not set
1643CONFIG_CRYPTO_DES=y 1589CONFIG_CRYPTO_DES=y
1590# CONFIG_CRYPTO_FCRYPT is not set
1644CONFIG_CRYPTO_BLOWFISH=m 1591CONFIG_CRYPTO_BLOWFISH=m
1645CONFIG_CRYPTO_TWOFISH=m 1592CONFIG_CRYPTO_TWOFISH=m
1646CONFIG_CRYPTO_TWOFISH_COMMON=m 1593CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -1655,6 +1602,7 @@ CONFIG_CRYPTO_ARC4=m
1655CONFIG_CRYPTO_DEFLATE=m 1602CONFIG_CRYPTO_DEFLATE=m
1656CONFIG_CRYPTO_MICHAEL_MIC=m 1603CONFIG_CRYPTO_MICHAEL_MIC=m
1657CONFIG_CRYPTO_CRC32C=m 1604CONFIG_CRYPTO_CRC32C=m
1605# CONFIG_CRYPTO_CAMELLIA is not set
1658# CONFIG_CRYPTO_TEST is not set 1606# CONFIG_CRYPTO_TEST is not set
1659 1607
1660# 1608#
diff --git a/arch/powerpc/configs/lite5200_defconfig b/arch/powerpc/configs/lite5200_defconfig
index 8cbd87ded6..d12a981398 100644
--- a/arch/powerpc/configs/lite5200_defconfig
+++ b/arch/powerpc/configs/lite5200_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-rc5 3# Linux kernel version: 2.6.22-rc6
4# Mon Jan 22 22:18:18 2007 4# Tue Jun 26 13:26:09 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC_PM_NEEDS_RTC_LIB=y
7CONFIG_PPC32=y 8CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 9CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 10CONFIG_MMU=y
@@ -34,9 +35,9 @@ CONFIG_CLASSIC32=y
34# CONFIG_PPC_83xx is not set 35# CONFIG_PPC_83xx is not set
35# CONFIG_PPC_85xx is not set 36# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set 37# CONFIG_PPC_86xx is not set
38# CONFIG_PPC_8xx is not set
37# CONFIG_40x is not set 39# CONFIG_40x is not set
38# CONFIG_44x is not set 40# CONFIG_44x is not set
39# CONFIG_8xx is not set
40# CONFIG_E200 is not set 41# CONFIG_E200 is not set
41CONFIG_6xx=y 42CONFIG_6xx=y
42CONFIG_PPC_FPU=y 43CONFIG_PPC_FPU=y
@@ -45,6 +46,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_ALTIVEC is not set 46# CONFIG_ALTIVEC is not set
46CONFIG_PPC_STD_MMU=y 47CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 48CONFIG_PPC_STD_MMU_32=y
49# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 50# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 51CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 52
@@ -63,14 +65,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 65CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 66CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 67# CONFIG_IPC_NS is not set
68CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 69# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 70# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 71# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 72# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 73# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 74# CONFIG_IKCONFIG is not set
75CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 76CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 77# CONFIG_RELAY is not set
78CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 79CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 80# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 81CONFIG_SYSCTL=y
@@ -83,14 +88,19 @@ CONFIG_BUG=y
83CONFIG_ELF_CORE=y 88CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y 89CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y 90CONFIG_FUTEX=y
91CONFIG_ANON_INODES=y
86# CONFIG_EPOLL is not set 92# CONFIG_EPOLL is not set
93CONFIG_SIGNALFD=y
94CONFIG_TIMERFD=y
95CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 96CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y 97CONFIG_VM_EVENT_COUNTERS=y
98CONFIG_SLAB=y
99# CONFIG_SLUB is not set
100# CONFIG_SLOB is not set
90CONFIG_RT_MUTEXES=y 101CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set 102# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0 103CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94 104
95# 105#
96# Loadable module support 106# Loadable module support
@@ -131,11 +141,17 @@ CONFIG_PPC_MULTIPLATFORM=y
131# CONFIG_APUS is not set 141# CONFIG_APUS is not set
132# CONFIG_PPC_CHRP is not set 142# CONFIG_PPC_CHRP is not set
133CONFIG_PPC_MPC52xx=y 143CONFIG_PPC_MPC52xx=y
144CONFIG_PPC_MPC5200=y
145CONFIG_PPC_MPC5200_BUGFIX=y
134# CONFIG_PPC_EFIKA is not set 146# CONFIG_PPC_EFIKA is not set
135CONFIG_PPC_LITE5200=y 147CONFIG_PPC_LITE5200=y
136# CONFIG_PPC_PMAC is not set 148# CONFIG_PPC_PMAC is not set
137# CONFIG_PPC_CELL is not set 149# CONFIG_PPC_CELL is not set
138# CONFIG_PPC_CELL_NATIVE is not set 150# CONFIG_PPC_CELL_NATIVE is not set
151# CONFIG_PQ2ADS is not set
152# CONFIG_MPIC is not set
153# CONFIG_MPIC_WEIRD is not set
154# CONFIG_PPC_I8259 is not set
139# CONFIG_PPC_RTAS is not set 155# CONFIG_PPC_RTAS is not set
140# CONFIG_MMIO_NVRAM is not set 156# CONFIG_MMIO_NVRAM is not set
141# CONFIG_PPC_MPC106 is not set 157# CONFIG_PPC_MPC106 is not set
@@ -144,8 +160,7 @@ CONFIG_PPC_LITE5200=y
144# CONFIG_GENERIC_IOMAP is not set 160# CONFIG_GENERIC_IOMAP is not set
145# CONFIG_CPU_FREQ is not set 161# CONFIG_CPU_FREQ is not set
146# CONFIG_TAU is not set 162# CONFIG_TAU is not set
147# CONFIG_WANT_EARLY_SERIAL is not set 163# CONFIG_CPM2 is not set
148# CONFIG_MPIC is not set
149 164
150# 165#
151# Kernel options 166# Kernel options
@@ -174,6 +189,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
174# CONFIG_SPARSEMEM_STATIC is not set 189# CONFIG_SPARSEMEM_STATIC is not set
175CONFIG_SPLIT_PTLOCK_CPUS=4 190CONFIG_SPLIT_PTLOCK_CPUS=4
176# CONFIG_RESOURCES_64BIT is not set 191# CONFIG_RESOURCES_64BIT is not set
192CONFIG_ZONE_DMA_FLAG=1
177CONFIG_PROC_DEVICETREE=y 193CONFIG_PROC_DEVICETREE=y
178# CONFIG_CMDLINE_BOOL is not set 194# CONFIG_CMDLINE_BOOL is not set
179CONFIG_PM=y 195CONFIG_PM=y
@@ -182,28 +198,27 @@ CONFIG_PM=y
182# CONFIG_PM_SYSFS_DEPRECATED is not set 198# CONFIG_PM_SYSFS_DEPRECATED is not set
183# CONFIG_SOFTWARE_SUSPEND is not set 199# CONFIG_SOFTWARE_SUSPEND is not set
184CONFIG_SECCOMP=y 200CONFIG_SECCOMP=y
201# CONFIG_WANT_DEVICE_TREE is not set
185CONFIG_ISA_DMA_API=y 202CONFIG_ISA_DMA_API=y
186 203
187# 204#
188# Bus options 205# Bus options
189# 206#
207CONFIG_ZONE_DMA=y
190CONFIG_GENERIC_ISA_DMA=y 208CONFIG_GENERIC_ISA_DMA=y
191# CONFIG_MPIC_WEIRD is not set
192# CONFIG_PPC_I8259 is not set
193# CONFIG_PPC_INDIRECT_PCI is not set 209# CONFIG_PPC_INDIRECT_PCI is not set
210CONFIG_FSL_SOC=y
194CONFIG_PCI=y 211CONFIG_PCI=y
195CONFIG_PCI_DOMAINS=y 212CONFIG_PCI_DOMAINS=y
196# CONFIG_PCIEPORTBUS is not set 213# CONFIG_PCIEPORTBUS is not set
214CONFIG_ARCH_SUPPORTS_MSI=y
215# CONFIG_PCI_MSI is not set
197# CONFIG_PCI_DEBUG is not set 216# CONFIG_PCI_DEBUG is not set
198 217
199# 218#
200# PCCARD (PCMCIA/CardBus) support 219# PCCARD (PCMCIA/CardBus) support
201# 220#
202# CONFIG_PCCARD is not set 221# CONFIG_PCCARD is not set
203
204#
205# PCI Hotplug Support
206#
207# CONFIG_HOTPLUG_PCI is not set 222# CONFIG_HOTPLUG_PCI is not set
208 223
209# 224#
@@ -228,13 +243,13 @@ CONFIG_NET=y
228# 243#
229# Networking options 244# Networking options
230# 245#
231# CONFIG_NETDEBUG is not set
232CONFIG_PACKET=y 246CONFIG_PACKET=y
233# CONFIG_PACKET_MMAP is not set 247# CONFIG_PACKET_MMAP is not set
234CONFIG_UNIX=y 248CONFIG_UNIX=y
235CONFIG_XFRM=y 249CONFIG_XFRM=y
236CONFIG_XFRM_USER=m 250CONFIG_XFRM_USER=m
237# CONFIG_XFRM_SUB_POLICY is not set 251# CONFIG_XFRM_SUB_POLICY is not set
252# CONFIG_XFRM_MIGRATE is not set
238# CONFIG_NET_KEY is not set 253# CONFIG_NET_KEY is not set
239CONFIG_INET=y 254CONFIG_INET=y
240CONFIG_IP_MULTICAST=y 255CONFIG_IP_MULTICAST=y
@@ -268,20 +283,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
268# CONFIG_INET6_TUNNEL is not set 283# CONFIG_INET6_TUNNEL is not set
269# CONFIG_NETWORK_SECMARK is not set 284# CONFIG_NETWORK_SECMARK is not set
270# CONFIG_NETFILTER is not set 285# CONFIG_NETFILTER is not set
271
272#
273# DCCP Configuration (EXPERIMENTAL)
274#
275# CONFIG_IP_DCCP is not set 286# CONFIG_IP_DCCP is not set
276
277#
278# SCTP Configuration (EXPERIMENTAL)
279#
280# CONFIG_IP_SCTP is not set 287# CONFIG_IP_SCTP is not set
281
282#
283# TIPC Configuration (EXPERIMENTAL)
284#
285# CONFIG_TIPC is not set 288# CONFIG_TIPC is not set
286# CONFIG_ATM is not set 289# CONFIG_ATM is not set
287# CONFIG_BRIDGE is not set 290# CONFIG_BRIDGE is not set
@@ -307,7 +310,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
307# CONFIG_HAMRADIO is not set 310# CONFIG_HAMRADIO is not set
308# CONFIG_IRDA is not set 311# CONFIG_IRDA is not set
309# CONFIG_BT is not set 312# CONFIG_BT is not set
313# CONFIG_AF_RXRPC is not set
314
315#
316# Wireless
317#
318# CONFIG_CFG80211 is not set
319# CONFIG_WIRELESS_EXT is not set
320# CONFIG_MAC80211 is not set
310# CONFIG_IEEE80211 is not set 321# CONFIG_IEEE80211 is not set
322# CONFIG_RFKILL is not set
311 323
312# 324#
313# Device Drivers 325# Device Drivers
@@ -320,16 +332,13 @@ CONFIG_STANDALONE=y
320CONFIG_PREVENT_FIRMWARE_BUILD=y 332CONFIG_PREVENT_FIRMWARE_BUILD=y
321# CONFIG_FW_LOADER is not set 333# CONFIG_FW_LOADER is not set
322# CONFIG_DEBUG_DRIVER is not set 334# CONFIG_DEBUG_DRIVER is not set
335# CONFIG_DEBUG_DEVRES is not set
323# CONFIG_SYS_HYPERVISOR is not set 336# CONFIG_SYS_HYPERVISOR is not set
324 337
325# 338#
326# Connector - unified userspace <-> kernelspace linker 339# Connector - unified userspace <-> kernelspace linker
327# 340#
328# CONFIG_CONNECTOR is not set 341# CONFIG_CONNECTOR is not set
329
330#
331# Memory Technology Devices (MTD)
332#
333# CONFIG_MTD is not set 342# CONFIG_MTD is not set
334 343
335# 344#
@@ -340,6 +349,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
340# 349#
341# Plug and Play support 350# Plug and Play support
342# 351#
352# CONFIG_PNPACPI is not set
343 353
344# 354#
345# Block devices 355# Block devices
@@ -358,19 +368,16 @@ CONFIG_BLK_DEV_RAM=y
358CONFIG_BLK_DEV_RAM_COUNT=16 368CONFIG_BLK_DEV_RAM_COUNT=16
359CONFIG_BLK_DEV_RAM_SIZE=32768 369CONFIG_BLK_DEV_RAM_SIZE=32768
360CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 370CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
361CONFIG_BLK_DEV_INITRD=y
362# CONFIG_CDROM_PKTCDVD is not set 371# CONFIG_CDROM_PKTCDVD is not set
363# CONFIG_ATA_OVER_ETH is not set 372# CONFIG_ATA_OVER_ETH is not set
364 373
365# 374#
366# Misc devices 375# Misc devices
367# 376#
377# CONFIG_PHANTOM is not set
368# CONFIG_SGI_IOC4 is not set 378# CONFIG_SGI_IOC4 is not set
369# CONFIG_TIFM_CORE is not set 379# CONFIG_TIFM_CORE is not set
370 380# CONFIG_BLINK is not set
371#
372# ATA/ATAPI/MFM/RLL support
373#
374# CONFIG_IDE is not set 381# CONFIG_IDE is not set
375 382
376# 383#
@@ -399,6 +406,7 @@ CONFIG_SCSI=y
399# CONFIG_SCSI_CONSTANTS is not set 406# CONFIG_SCSI_CONSTANTS is not set
400# CONFIG_SCSI_LOGGING is not set 407# CONFIG_SCSI_LOGGING is not set
401# CONFIG_SCSI_SCAN_ASYNC is not set 408# CONFIG_SCSI_SCAN_ASYNC is not set
409CONFIG_SCSI_WAIT_SCAN=m
402 410
403# 411#
404# SCSI Transports 412# SCSI Transports
@@ -447,11 +455,8 @@ CONFIG_SCSI=y
447# CONFIG_SCSI_NSP32 is not set 455# CONFIG_SCSI_NSP32 is not set
448# CONFIG_SCSI_DEBUG is not set 456# CONFIG_SCSI_DEBUG is not set
449# CONFIG_SCSI_SRP is not set 457# CONFIG_SCSI_SRP is not set
450
451#
452# Serial ATA (prod) and Parallel ATA (experimental) drivers
453#
454CONFIG_ATA=y 458CONFIG_ATA=y
459# CONFIG_ATA_NONSTANDARD is not set
455# CONFIG_SATA_AHCI is not set 460# CONFIG_SATA_AHCI is not set
456# CONFIG_SATA_SVW is not set 461# CONFIG_SATA_SVW is not set
457# CONFIG_ATA_PIIX is not set 462# CONFIG_ATA_PIIX is not set
@@ -467,10 +472,12 @@ CONFIG_ATA=y
467# CONFIG_SATA_ULI is not set 472# CONFIG_SATA_ULI is not set
468# CONFIG_SATA_VIA is not set 473# CONFIG_SATA_VIA is not set
469# CONFIG_SATA_VITESSE is not set 474# CONFIG_SATA_VITESSE is not set
475# CONFIG_SATA_INIC162X is not set
470# CONFIG_PATA_ALI is not set 476# CONFIG_PATA_ALI is not set
471# CONFIG_PATA_AMD is not set 477# CONFIG_PATA_AMD is not set
472# CONFIG_PATA_ARTOP is not set 478# CONFIG_PATA_ARTOP is not set
473# CONFIG_PATA_ATIIXP is not set 479# CONFIG_PATA_ATIIXP is not set
480# CONFIG_PATA_CMD640_PCI is not set
474# CONFIG_PATA_CMD64X is not set 481# CONFIG_PATA_CMD64X is not set
475# CONFIG_PATA_CS5520 is not set 482# CONFIG_PATA_CS5520 is not set
476# CONFIG_PATA_CS5530 is not set 483# CONFIG_PATA_CS5530 is not set
@@ -482,9 +489,11 @@ CONFIG_ATA=y
482# CONFIG_PATA_HPT3X2N is not set 489# CONFIG_PATA_HPT3X2N is not set
483# CONFIG_PATA_HPT3X3 is not set 490# CONFIG_PATA_HPT3X3 is not set
484# CONFIG_PATA_IT821X is not set 491# CONFIG_PATA_IT821X is not set
492# CONFIG_PATA_IT8213 is not set
485# CONFIG_PATA_JMICRON is not set 493# CONFIG_PATA_JMICRON is not set
486# CONFIG_PATA_TRIFLEX is not set 494# CONFIG_PATA_TRIFLEX is not set
487# CONFIG_PATA_MARVELL is not set 495# CONFIG_PATA_MARVELL is not set
496CONFIG_PATA_MPC52xx=y
488# CONFIG_PATA_MPIIX is not set 497# CONFIG_PATA_MPIIX is not set
489# CONFIG_PATA_OLDPIIX is not set 498# CONFIG_PATA_OLDPIIX is not set
490# CONFIG_PATA_NETCELL is not set 499# CONFIG_PATA_NETCELL is not set
@@ -519,18 +528,14 @@ CONFIG_ATA=y
519# 528#
520# IEEE 1394 (FireWire) support 529# IEEE 1394 (FireWire) support
521# 530#
531# CONFIG_FIREWIRE is not set
522# CONFIG_IEEE1394 is not set 532# CONFIG_IEEE1394 is not set
523 533
524# 534#
525# I2O device support 535# I2O device support
526# 536#
527# CONFIG_I2O is not set 537# CONFIG_I2O is not set
528 538# CONFIG_MACINTOSH_DRIVERS is not set
529#
530# Macintosh device drivers
531#
532# CONFIG_MAC_EMUMOUSEBTN is not set
533# CONFIG_WINDFARM is not set
534 539
535# 540#
536# Network device support 541# Network device support
@@ -540,24 +545,13 @@ CONFIG_NETDEVICES=y
540# CONFIG_BONDING is not set 545# CONFIG_BONDING is not set
541# CONFIG_EQUALIZER is not set 546# CONFIG_EQUALIZER is not set
542# CONFIG_TUN is not set 547# CONFIG_TUN is not set
543
544#
545# ARCnet devices
546#
547# CONFIG_ARCNET is not set 548# CONFIG_ARCNET is not set
548 549
549# 550#
550# PHY device support
551#
552
553#
554# Ethernet (10 or 100Mbit) 551# Ethernet (10 or 100Mbit)
555# 552#
556# CONFIG_NET_ETHERNET is not set 553# CONFIG_NET_ETHERNET is not set
557 554CONFIG_NETDEV_1000=y
558#
559# Ethernet (1000 Mbit)
560#
561# CONFIG_ACENIC is not set 555# CONFIG_ACENIC is not set
562# CONFIG_DL2K is not set 556# CONFIG_DL2K is not set
563# CONFIG_E1000 is not set 557# CONFIG_E1000 is not set
@@ -569,33 +563,27 @@ CONFIG_NETDEVICES=y
569# CONFIG_SKGE is not set 563# CONFIG_SKGE is not set
570# CONFIG_SKY2 is not set 564# CONFIG_SKY2 is not set
571# CONFIG_SK98LIN is not set 565# CONFIG_SK98LIN is not set
566# CONFIG_VIA_VELOCITY is not set
572# CONFIG_TIGON3 is not set 567# CONFIG_TIGON3 is not set
573# CONFIG_BNX2 is not set 568# CONFIG_BNX2 is not set
574# CONFIG_MV643XX_ETH is not set 569# CONFIG_MV643XX_ETH is not set
575# CONFIG_QLA3XXX is not set 570# CONFIG_QLA3XXX is not set
576 571# CONFIG_ATL1 is not set
577# 572CONFIG_NETDEV_10000=y
578# Ethernet (10000 Mbit)
579#
580# CONFIG_CHELSIO_T1 is not set 573# CONFIG_CHELSIO_T1 is not set
574# CONFIG_CHELSIO_T3 is not set
581# CONFIG_IXGB is not set 575# CONFIG_IXGB is not set
582# CONFIG_S2IO is not set 576# CONFIG_S2IO is not set
583# CONFIG_MYRI10GE is not set 577# CONFIG_MYRI10GE is not set
584# CONFIG_NETXEN_NIC is not set 578# CONFIG_NETXEN_NIC is not set
585 579# CONFIG_MLX4_CORE is not set
586#
587# Token Ring devices
588#
589# CONFIG_TR is not set 580# CONFIG_TR is not set
590 581
591# 582#
592# Wireless LAN (non-hamradio) 583# Wireless LAN
593#
594# CONFIG_NET_RADIO is not set
595
596#
597# Wan interfaces
598# 584#
585# CONFIG_WLAN_PRE80211 is not set
586# CONFIG_WLAN_80211 is not set
599# CONFIG_WAN is not set 587# CONFIG_WAN is not set
600# CONFIG_FDDI is not set 588# CONFIG_FDDI is not set
601# CONFIG_HIPPI is not set 589# CONFIG_HIPPI is not set
@@ -657,15 +645,10 @@ CONFIG_LEGACY_PTY_COUNT=256
657# IPMI 645# IPMI
658# 646#
659# CONFIG_IPMI_HANDLER is not set 647# CONFIG_IPMI_HANDLER is not set
660
661#
662# Watchdog Cards
663#
664# CONFIG_WATCHDOG is not set 648# CONFIG_WATCHDOG is not set
665# CONFIG_HW_RANDOM is not set 649# CONFIG_HW_RANDOM is not set
666# CONFIG_NVRAM is not set 650# CONFIG_NVRAM is not set
667# CONFIG_GEN_RTC is not set 651# CONFIG_GEN_RTC is not set
668# CONFIG_DTLK is not set
669# CONFIG_R3964 is not set 652# CONFIG_R3964 is not set
670# CONFIG_APPLICOM is not set 653# CONFIG_APPLICOM is not set
671# CONFIG_AGP is not set 654# CONFIG_AGP is not set
@@ -676,10 +659,7 @@ CONFIG_LEGACY_PTY_COUNT=256
676# TPM devices 659# TPM devices
677# 660#
678# CONFIG_TCG_TPM is not set 661# CONFIG_TCG_TPM is not set
679 662CONFIG_DEVPORT=y
680#
681# I2C support
682#
683# CONFIG_I2C is not set 663# CONFIG_I2C is not set
684 664
685# 665#
@@ -692,30 +672,32 @@ CONFIG_LEGACY_PTY_COUNT=256
692# Dallas's 1-wire bus 672# Dallas's 1-wire bus
693# 673#
694# CONFIG_W1 is not set 674# CONFIG_W1 is not set
675# CONFIG_HWMON is not set
695 676
696# 677#
697# Hardware Monitoring support 678# Multifunction device drivers
698# 679#
699# CONFIG_HWMON is not set 680# CONFIG_MFD_SM501 is not set
700# CONFIG_HWMON_VID is not set
701 681
702# 682#
703# Multimedia devices 683# Multimedia devices
704# 684#
705# CONFIG_VIDEO_DEV is not set 685# CONFIG_VIDEO_DEV is not set
686# CONFIG_DVB_CORE is not set
687# CONFIG_DAB is not set
706 688
707# 689#
708# Digital Video Broadcasting Devices 690# Graphics support
709# 691#
710# CONFIG_DVB is not set 692# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
711 693
712# 694#
713# Graphics support 695# Display device support
714# 696#
715# CONFIG_FIRMWARE_EDID is not set 697# CONFIG_DISPLAY_SUPPORT is not set
698# CONFIG_VGASTATE is not set
716# CONFIG_FB is not set 699# CONFIG_FB is not set
717# CONFIG_FB_IBM_GXT4500 is not set 700# CONFIG_FB_IBM_GXT4500 is not set
718# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
719 701
720# 702#
721# Sound 703# Sound
@@ -738,10 +720,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
738# USB Gadget Support 720# USB Gadget Support
739# 721#
740# CONFIG_USB_GADGET is not set 722# CONFIG_USB_GADGET is not set
741
742#
743# MMC/SD Card support
744#
745# CONFIG_MMC is not set 723# CONFIG_MMC is not set
746 724
747# 725#
@@ -769,6 +747,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y
769# 747#
770# Real Time Clock 748# Real Time Clock
771# 749#
750CONFIG_RTC_LIB=y
772# CONFIG_RTC_CLASS is not set 751# CONFIG_RTC_CLASS is not set
773 752
774# 753#
@@ -785,10 +764,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
785# 764#
786 765
787# 766#
788# Virtualization
789#
790
791#
792# File systems 767# File systems
793# 768#
794CONFIG_EXT2_FS=y 769CONFIG_EXT2_FS=y
@@ -888,16 +863,20 @@ CONFIG_MSDOS_PARTITION=y
888# Distributed Lock Manager 863# Distributed Lock Manager
889# 864#
890# CONFIG_DLM is not set 865# CONFIG_DLM is not set
866# CONFIG_UCC_SLOW is not set
891 867
892# 868#
893# Library routines 869# Library routines
894# 870#
895# CONFIG_CRC_CCITT is not set 871# CONFIG_CRC_CCITT is not set
896# CONFIG_CRC16 is not set 872# CONFIG_CRC16 is not set
873# CONFIG_CRC_ITU_T is not set
897# CONFIG_CRC32 is not set 874# CONFIG_CRC32 is not set
898# CONFIG_LIBCRC32C is not set 875# CONFIG_LIBCRC32C is not set
899CONFIG_PLIST=y 876CONFIG_PLIST=y
900CONFIG_IOMAP_COPY=y 877CONFIG_HAS_IOMEM=y
878CONFIG_HAS_IOPORT=y
879CONFIG_HAS_DMA=y
901 880
902# 881#
903# Instrumentation Support 882# Instrumentation Support
@@ -914,15 +893,15 @@ CONFIG_ENABLE_MUST_CHECK=y
914# CONFIG_DEBUG_FS is not set 893# CONFIG_DEBUG_FS is not set
915# CONFIG_HEADERS_CHECK is not set 894# CONFIG_HEADERS_CHECK is not set
916CONFIG_DEBUG_KERNEL=y 895CONFIG_DEBUG_KERNEL=y
917CONFIG_LOG_BUF_SHIFT=14 896# CONFIG_DEBUG_SHIRQ is not set
918CONFIG_DETECT_SOFTLOCKUP=y 897CONFIG_DETECT_SOFTLOCKUP=y
919# CONFIG_SCHEDSTATS is not set 898# CONFIG_SCHEDSTATS is not set
899# CONFIG_TIMER_STATS is not set
920# CONFIG_DEBUG_SLAB is not set 900# CONFIG_DEBUG_SLAB is not set
921# CONFIG_DEBUG_RT_MUTEXES is not set 901# CONFIG_DEBUG_RT_MUTEXES is not set
922# CONFIG_RT_MUTEX_TESTER is not set 902# CONFIG_RT_MUTEX_TESTER is not set
923# CONFIG_DEBUG_SPINLOCK is not set 903# CONFIG_DEBUG_SPINLOCK is not set
924# CONFIG_DEBUG_MUTEXES is not set 904# CONFIG_DEBUG_MUTEXES is not set
925# CONFIG_DEBUG_RWSEMS is not set
926# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 905# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
927# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 906# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
928# CONFIG_DEBUG_KOBJECT is not set 907# CONFIG_DEBUG_KOBJECT is not set
@@ -932,10 +911,13 @@ CONFIG_DEBUG_INFO=y
932# CONFIG_DEBUG_LIST is not set 911# CONFIG_DEBUG_LIST is not set
933CONFIG_FORCED_INLINING=y 912CONFIG_FORCED_INLINING=y
934# CONFIG_RCU_TORTURE_TEST is not set 913# CONFIG_RCU_TORTURE_TEST is not set
914# CONFIG_FAULT_INJECTION is not set
915# CONFIG_DEBUG_STACKOVERFLOW is not set
916# CONFIG_DEBUG_STACK_USAGE is not set
917# CONFIG_DEBUG_PAGEALLOC is not set
935# CONFIG_DEBUGGER is not set 918# CONFIG_DEBUGGER is not set
936# CONFIG_BDI_SWITCH is not set 919# CONFIG_BDI_SWITCH is not set
937# CONFIG_BOOTX_TEXT is not set 920# CONFIG_BOOTX_TEXT is not set
938# CONFIG_SERIAL_TEXT_DEBUG is not set
939# CONFIG_PPC_EARLY_DEBUG is not set 921# CONFIG_PPC_EARLY_DEBUG is not set
940 922
941# 923#
diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig
index 15366f0e48..eb3d9ad655 100644
--- a/arch/powerpc/configs/maple_defconfig
+++ b/arch/powerpc/configs/maple_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.22-rc6
4# Mon Jan 22 22:19:02 2007 4# Tue Jun 26 13:27:35 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -39,6 +39,7 @@ CONFIG_PPC_FPU=y
39# CONFIG_PPC_OF_PLATFORM_PCI is not set 39# CONFIG_PPC_OF_PLATFORM_PCI is not set
40# CONFIG_ALTIVEC is not set 40# CONFIG_ALTIVEC is not set
41CONFIG_PPC_STD_MMU=y 41CONFIG_PPC_STD_MMU=y
42CONFIG_PPC_MM_SLICES=y
42CONFIG_VIRT_CPU_ACCOUNTING=y 43CONFIG_VIRT_CPU_ACCOUNTING=y
43CONFIG_SMP=y 44CONFIG_SMP=y
44CONFIG_NR_CPUS=4 45CONFIG_NR_CPUS=4
@@ -59,6 +60,7 @@ CONFIG_LOCALVERSION_AUTO=y
59CONFIG_SWAP=y 60CONFIG_SWAP=y
60CONFIG_SYSVIPC=y 61CONFIG_SYSVIPC=y
61# CONFIG_IPC_NS is not set 62# CONFIG_IPC_NS is not set
63CONFIG_SYSVIPC_SYSCTL=y
62CONFIG_POSIX_MQUEUE=y 64CONFIG_POSIX_MQUEUE=y
63# CONFIG_BSD_PROCESS_ACCT is not set 65# CONFIG_BSD_PROCESS_ACCT is not set
64# CONFIG_TASKSTATS is not set 66# CONFIG_TASKSTATS is not set
@@ -66,10 +68,11 @@ CONFIG_POSIX_MQUEUE=y
66# CONFIG_AUDIT is not set 68# CONFIG_AUDIT is not set
67CONFIG_IKCONFIG=y 69CONFIG_IKCONFIG=y
68CONFIG_IKCONFIG_PROC=y 70CONFIG_IKCONFIG_PROC=y
71CONFIG_LOG_BUF_SHIFT=17
69# CONFIG_CPUSETS is not set 72# CONFIG_CPUSETS is not set
70CONFIG_SYSFS_DEPRECATED=y 73CONFIG_SYSFS_DEPRECATED=y
71# CONFIG_RELAY is not set 74# CONFIG_RELAY is not set
72CONFIG_INITRAMFS_SOURCE="" 75# CONFIG_BLK_DEV_INITRD is not set
73CONFIG_CC_OPTIMIZE_FOR_SIZE=y 76CONFIG_CC_OPTIMIZE_FOR_SIZE=y
74CONFIG_SYSCTL=y 77CONFIG_SYSCTL=y
75# CONFIG_EMBEDDED is not set 78# CONFIG_EMBEDDED is not set
@@ -83,14 +86,19 @@ CONFIG_BUG=y
83CONFIG_ELF_CORE=y 86CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y 87CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y 88CONFIG_FUTEX=y
89CONFIG_ANON_INODES=y
86CONFIG_EPOLL=y 90CONFIG_EPOLL=y
91CONFIG_SIGNALFD=y
92CONFIG_TIMERFD=y
93CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 94CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y 95CONFIG_VM_EVENT_COUNTERS=y
96CONFIG_SLAB=y
97# CONFIG_SLUB is not set
98# CONFIG_SLOB is not set
90CONFIG_RT_MUTEXES=y 99CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set 100# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0 101CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94 102
95# 103#
96# Loadable module support 104# Loadable module support
@@ -131,29 +139,34 @@ CONFIG_PPC_MULTIPLATFORM=y
131# CONFIG_PPC_PSERIES is not set 139# CONFIG_PPC_PSERIES is not set
132# CONFIG_PPC_ISERIES is not set 140# CONFIG_PPC_ISERIES is not set
133# CONFIG_PPC_MPC52xx is not set 141# CONFIG_PPC_MPC52xx is not set
142# CONFIG_PPC_MPC5200 is not set
134# CONFIG_PPC_PMAC is not set 143# CONFIG_PPC_PMAC is not set
135CONFIG_PPC_MAPLE=y 144CONFIG_PPC_MAPLE=y
136# CONFIG_PPC_PASEMI is not set 145# CONFIG_PPC_PASEMI is not set
146# CONFIG_PPC_CELLEB is not set
147# CONFIG_PPC_PS3 is not set
137# CONFIG_PPC_CELL is not set 148# CONFIG_PPC_CELL is not set
138# CONFIG_PPC_CELL_NATIVE is not set 149# CONFIG_PPC_CELL_NATIVE is not set
139# CONFIG_PPC_IBM_CELL_BLADE is not set 150# CONFIG_PPC_IBM_CELL_BLADE is not set
140# CONFIG_PPC_PS3 is not set 151# CONFIG_PQ2ADS is not set
141CONFIG_PPC_NATIVE=y 152CONFIG_PPC_NATIVE=y
142CONFIG_UDBG_RTAS_CONSOLE=y 153CONFIG_UDBG_RTAS_CONSOLE=y
154CONFIG_MPIC=y
155# CONFIG_MPIC_WEIRD is not set
156# CONFIG_PPC_I8259 is not set
143CONFIG_U3_DART=y 157CONFIG_U3_DART=y
144CONFIG_PPC_RTAS=y 158CONFIG_PPC_RTAS=y
145# CONFIG_RTAS_ERROR_LOGGING is not set 159# CONFIG_RTAS_ERROR_LOGGING is not set
146CONFIG_RTAS_PROC=y 160CONFIG_RTAS_PROC=y
147# CONFIG_RTAS_FLASH is not set 161# CONFIG_RTAS_FLASH is not set
148# CONFIG_MMIO_NVRAM is not set 162CONFIG_MMIO_NVRAM=y
149CONFIG_MPIC_U3_HT_IRQS=y 163CONFIG_MPIC_U3_HT_IRQS=y
150# CONFIG_PPC_MPC106 is not set 164# CONFIG_PPC_MPC106 is not set
151CONFIG_PPC_970_NAP=y 165CONFIG_PPC_970_NAP=y
152# CONFIG_PPC_INDIRECT_IO is not set 166# CONFIG_PPC_INDIRECT_IO is not set
153# CONFIG_GENERIC_IOMAP is not set 167# CONFIG_GENERIC_IOMAP is not set
154# CONFIG_CPU_FREQ is not set 168# CONFIG_CPU_FREQ is not set
155# CONFIG_WANT_EARLY_SERIAL is not set 169# CONFIG_CPM2 is not set
156CONFIG_MPIC=y
157 170
158# 171#
159# Kernel options 172# Kernel options
@@ -189,34 +202,34 @@ CONFIG_FLAT_NODE_MEM_MAP=y
189# CONFIG_SPARSEMEM_STATIC is not set 202# CONFIG_SPARSEMEM_STATIC is not set
190CONFIG_SPLIT_PTLOCK_CPUS=4 203CONFIG_SPLIT_PTLOCK_CPUS=4
191CONFIG_RESOURCES_64BIT=y 204CONFIG_RESOURCES_64BIT=y
205CONFIG_ZONE_DMA_FLAG=1
206# CONFIG_PPC_HAS_HASH_64K is not set
192# CONFIG_PPC_64K_PAGES is not set 207# CONFIG_PPC_64K_PAGES is not set
193# CONFIG_SCHED_SMT is not set 208# CONFIG_SCHED_SMT is not set
194CONFIG_PROC_DEVICETREE=y 209CONFIG_PROC_DEVICETREE=y
195# CONFIG_CMDLINE_BOOL is not set 210# CONFIG_CMDLINE_BOOL is not set
196# CONFIG_PM is not set 211# CONFIG_PM is not set
197CONFIG_SECCOMP=y 212CONFIG_SECCOMP=y
213# CONFIG_WANT_DEVICE_TREE is not set
198CONFIG_ISA_DMA_API=y 214CONFIG_ISA_DMA_API=y
199 215
200# 216#
201# Bus options 217# Bus options
202# 218#
219CONFIG_ZONE_DMA=y
203CONFIG_GENERIC_ISA_DMA=y 220CONFIG_GENERIC_ISA_DMA=y
204# CONFIG_MPIC_WEIRD is not set
205# CONFIG_PPC_I8259 is not set
206# CONFIG_PPC_INDIRECT_PCI is not set 221# CONFIG_PPC_INDIRECT_PCI is not set
207CONFIG_PCI=y 222CONFIG_PCI=y
208CONFIG_PCI_DOMAINS=y 223CONFIG_PCI_DOMAINS=y
209# CONFIG_PCIEPORTBUS is not set 224# CONFIG_PCIEPORTBUS is not set
225CONFIG_ARCH_SUPPORTS_MSI=y
226CONFIG_PCI_MSI=y
210# CONFIG_PCI_DEBUG is not set 227# CONFIG_PCI_DEBUG is not set
211 228
212# 229#
213# PCCARD (PCMCIA/CardBus) support 230# PCCARD (PCMCIA/CardBus) support
214# 231#
215# CONFIG_PCCARD is not set 232# CONFIG_PCCARD is not set
216
217#
218# PCI Hotplug Support
219#
220# CONFIG_HOTPLUG_PCI is not set 233# CONFIG_HOTPLUG_PCI is not set
221CONFIG_KERNEL_START=0xc000000000000000 234CONFIG_KERNEL_START=0xc000000000000000
222 235
@@ -228,13 +241,13 @@ CONFIG_NET=y
228# 241#
229# Networking options 242# Networking options
230# 243#
231# CONFIG_NETDEBUG is not set
232CONFIG_PACKET=y 244CONFIG_PACKET=y
233CONFIG_PACKET_MMAP=y 245CONFIG_PACKET_MMAP=y
234CONFIG_UNIX=y 246CONFIG_UNIX=y
235CONFIG_XFRM=y 247CONFIG_XFRM=y
236CONFIG_XFRM_USER=m 248CONFIG_XFRM_USER=m
237# CONFIG_XFRM_SUB_POLICY is not set 249# CONFIG_XFRM_SUB_POLICY is not set
250# CONFIG_XFRM_MIGRATE is not set
238# CONFIG_NET_KEY is not set 251# CONFIG_NET_KEY is not set
239CONFIG_INET=y 252CONFIG_INET=y
240CONFIG_IP_MULTICAST=y 253CONFIG_IP_MULTICAST=y
@@ -268,20 +281,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
268# CONFIG_INET6_TUNNEL is not set 281# CONFIG_INET6_TUNNEL is not set
269# CONFIG_NETWORK_SECMARK is not set 282# CONFIG_NETWORK_SECMARK is not set
270# CONFIG_NETFILTER is not set 283# CONFIG_NETFILTER is not set
271
272#
273# DCCP Configuration (EXPERIMENTAL)
274#
275# CONFIG_IP_DCCP is not set 284# CONFIG_IP_DCCP is not set
276
277#
278# SCTP Configuration (EXPERIMENTAL)
279#
280# CONFIG_IP_SCTP is not set 285# CONFIG_IP_SCTP is not set
281
282#
283# TIPC Configuration (EXPERIMENTAL)
284#
285# CONFIG_TIPC is not set 286# CONFIG_TIPC is not set
286# CONFIG_ATM is not set 287# CONFIG_ATM is not set
287# CONFIG_BRIDGE is not set 288# CONFIG_BRIDGE is not set
@@ -307,7 +308,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
307# CONFIG_HAMRADIO is not set 308# CONFIG_HAMRADIO is not set
308# CONFIG_IRDA is not set 309# CONFIG_IRDA is not set
309# CONFIG_BT is not set 310# CONFIG_BT is not set
311# CONFIG_AF_RXRPC is not set
312
313#
314# Wireless
315#
316# CONFIG_CFG80211 is not set
317# CONFIG_WIRELESS_EXT is not set
318# CONFIG_MAC80211 is not set
310# CONFIG_IEEE80211 is not set 319# CONFIG_IEEE80211 is not set
320# CONFIG_RFKILL is not set
311 321
312# 322#
313# Device Drivers 323# Device Drivers
@@ -320,16 +330,13 @@ CONFIG_STANDALONE=y
320CONFIG_PREVENT_FIRMWARE_BUILD=y 330CONFIG_PREVENT_FIRMWARE_BUILD=y
321# CONFIG_FW_LOADER is not set 331# CONFIG_FW_LOADER is not set
322# CONFIG_DEBUG_DRIVER is not set 332# CONFIG_DEBUG_DRIVER is not set
333# CONFIG_DEBUG_DEVRES is not set
323# CONFIG_SYS_HYPERVISOR is not set 334# CONFIG_SYS_HYPERVISOR is not set
324 335
325# 336#
326# Connector - unified userspace <-> kernelspace linker 337# Connector - unified userspace <-> kernelspace linker
327# 338#
328# CONFIG_CONNECTOR is not set 339# CONFIG_CONNECTOR is not set
329
330#
331# Memory Technology Devices (MTD)
332#
333# CONFIG_MTD is not set 340# CONFIG_MTD is not set
334 341
335# 342#
@@ -340,6 +347,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
340# 347#
341# Plug and Play support 348# Plug and Play support
342# 349#
350# CONFIG_PNPACPI is not set
343 351
344# 352#
345# Block devices 353# Block devices
@@ -358,19 +366,16 @@ CONFIG_BLK_DEV_RAM=y
358CONFIG_BLK_DEV_RAM_COUNT=16 366CONFIG_BLK_DEV_RAM_COUNT=16
359CONFIG_BLK_DEV_RAM_SIZE=8192 367CONFIG_BLK_DEV_RAM_SIZE=8192
360CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 368CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
361# CONFIG_BLK_DEV_INITRD is not set
362# CONFIG_CDROM_PKTCDVD is not set 369# CONFIG_CDROM_PKTCDVD is not set
363# CONFIG_ATA_OVER_ETH is not set 370# CONFIG_ATA_OVER_ETH is not set
364 371
365# 372#
366# Misc devices 373# Misc devices
367# 374#
375# CONFIG_PHANTOM is not set
368# CONFIG_SGI_IOC4 is not set 376# CONFIG_SGI_IOC4 is not set
369# CONFIG_TIFM_CORE is not set 377# CONFIG_TIFM_CORE is not set
370 378# CONFIG_BLINK is not set
371#
372# ATA/ATAPI/MFM/RLL support
373#
374CONFIG_IDE=y 379CONFIG_IDE=y
375CONFIG_BLK_DEV_IDE=y 380CONFIG_BLK_DEV_IDE=y
376 381
@@ -384,6 +389,7 @@ CONFIG_BLK_DEV_IDECD=y
384# CONFIG_BLK_DEV_IDETAPE is not set 389# CONFIG_BLK_DEV_IDETAPE is not set
385# CONFIG_BLK_DEV_IDEFLOPPY is not set 390# CONFIG_BLK_DEV_IDEFLOPPY is not set
386CONFIG_IDE_TASK_IOCTL=y 391CONFIG_IDE_TASK_IOCTL=y
392CONFIG_IDE_PROC_FS=y
387 393
388# 394#
389# IDE chipset support/bugfixes 395# IDE chipset support/bugfixes
@@ -391,12 +397,12 @@ CONFIG_IDE_TASK_IOCTL=y
391CONFIG_IDE_GENERIC=y 397CONFIG_IDE_GENERIC=y
392CONFIG_BLK_DEV_IDEPCI=y 398CONFIG_BLK_DEV_IDEPCI=y
393CONFIG_IDEPCI_SHARE_IRQ=y 399CONFIG_IDEPCI_SHARE_IRQ=y
400CONFIG_IDEPCI_PCIBUS_ORDER=y
394# CONFIG_BLK_DEV_OFFBOARD is not set 401# CONFIG_BLK_DEV_OFFBOARD is not set
395CONFIG_BLK_DEV_GENERIC=y 402CONFIG_BLK_DEV_GENERIC=y
396# CONFIG_BLK_DEV_OPTI621 is not set 403# CONFIG_BLK_DEV_OPTI621 is not set
397CONFIG_BLK_DEV_IDEDMA_PCI=y 404CONFIG_BLK_DEV_IDEDMA_PCI=y
398# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 405# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
399CONFIG_IDEDMA_PCI_AUTO=y
400# CONFIG_IDEDMA_ONLYDISK is not set 406# CONFIG_IDEDMA_ONLYDISK is not set
401# CONFIG_BLK_DEV_AEC62XX is not set 407# CONFIG_BLK_DEV_AEC62XX is not set
402# CONFIG_BLK_DEV_ALI15X3 is not set 408# CONFIG_BLK_DEV_ALI15X3 is not set
@@ -411,6 +417,7 @@ CONFIG_BLK_DEV_AMD74XX=y
411# CONFIG_BLK_DEV_JMICRON is not set 417# CONFIG_BLK_DEV_JMICRON is not set
412# CONFIG_BLK_DEV_SC1200 is not set 418# CONFIG_BLK_DEV_SC1200 is not set
413# CONFIG_BLK_DEV_PIIX is not set 419# CONFIG_BLK_DEV_PIIX is not set
420# CONFIG_BLK_DEV_IT8213 is not set
414# CONFIG_BLK_DEV_IT821X is not set 421# CONFIG_BLK_DEV_IT821X is not set
415# CONFIG_BLK_DEV_NS87415 is not set 422# CONFIG_BLK_DEV_NS87415 is not set
416# CONFIG_BLK_DEV_PDC202XX_OLD is not set 423# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -421,10 +428,10 @@ CONFIG_BLK_DEV_AMD74XX=y
421# CONFIG_BLK_DEV_SLC90E66 is not set 428# CONFIG_BLK_DEV_SLC90E66 is not set
422# CONFIG_BLK_DEV_TRM290 is not set 429# CONFIG_BLK_DEV_TRM290 is not set
423# CONFIG_BLK_DEV_VIA82CXXX is not set 430# CONFIG_BLK_DEV_VIA82CXXX is not set
431# CONFIG_BLK_DEV_TC86C001 is not set
424# CONFIG_IDE_ARM is not set 432# CONFIG_IDE_ARM is not set
425CONFIG_BLK_DEV_IDEDMA=y 433CONFIG_BLK_DEV_IDEDMA=y
426# CONFIG_IDEDMA_IVB is not set 434# CONFIG_IDEDMA_IVB is not set
427CONFIG_IDEDMA_AUTO=y
428# CONFIG_BLK_DEV_HD is not set 435# CONFIG_BLK_DEV_HD is not set
429 436
430# 437#
@@ -433,10 +440,6 @@ CONFIG_IDEDMA_AUTO=y
433# CONFIG_RAID_ATTRS is not set 440# CONFIG_RAID_ATTRS is not set
434# CONFIG_SCSI is not set 441# CONFIG_SCSI is not set
435# CONFIG_SCSI_NETLINK is not set 442# CONFIG_SCSI_NETLINK is not set
436
437#
438# Serial ATA (prod) and Parallel ATA (experimental) drivers
439#
440# CONFIG_ATA is not set 443# CONFIG_ATA is not set
441 444
442# 445#
@@ -452,18 +455,14 @@ CONFIG_IDEDMA_AUTO=y
452# 455#
453# IEEE 1394 (FireWire) support 456# IEEE 1394 (FireWire) support
454# 457#
458# CONFIG_FIREWIRE is not set
455# CONFIG_IEEE1394 is not set 459# CONFIG_IEEE1394 is not set
456 460
457# 461#
458# I2O device support 462# I2O device support
459# 463#
460# CONFIG_I2O is not set 464# CONFIG_I2O is not set
461 465# CONFIG_MACINTOSH_DRIVERS is not set
462#
463# Macintosh device drivers
464#
465# CONFIG_MAC_EMUMOUSEBTN is not set
466# CONFIG_WINDFARM is not set
467 466
468# 467#
469# Network device support 468# Network device support
@@ -473,15 +472,7 @@ CONFIG_NETDEVICES=y
473# CONFIG_BONDING is not set 472# CONFIG_BONDING is not set
474# CONFIG_EQUALIZER is not set 473# CONFIG_EQUALIZER is not set
475# CONFIG_TUN is not set 474# CONFIG_TUN is not set
476
477#
478# ARCnet devices
479#
480# CONFIG_ARCNET is not set 475# CONFIG_ARCNET is not set
481
482#
483# PHY device support
484#
485# CONFIG_PHYLIB is not set 476# CONFIG_PHYLIB is not set
486 477
487# 478#
@@ -518,10 +509,8 @@ CONFIG_AMD8111_ETH=y
518# CONFIG_EPIC100 is not set 509# CONFIG_EPIC100 is not set
519# CONFIG_SUNDANCE is not set 510# CONFIG_SUNDANCE is not set
520# CONFIG_VIA_RHINE is not set 511# CONFIG_VIA_RHINE is not set
521 512# CONFIG_SC92031 is not set
522# 513CONFIG_NETDEV_1000=y
523# Ethernet (1000 Mbit)
524#
525# CONFIG_ACENIC is not set 514# CONFIG_ACENIC is not set
526# CONFIG_DL2K is not set 515# CONFIG_DL2K is not set
527CONFIG_E1000=y 516CONFIG_E1000=y
@@ -539,29 +528,33 @@ CONFIG_E1000=y
539CONFIG_TIGON3=y 528CONFIG_TIGON3=y
540# CONFIG_BNX2 is not set 529# CONFIG_BNX2 is not set
541# CONFIG_QLA3XXX is not set 530# CONFIG_QLA3XXX is not set
542 531# CONFIG_ATL1 is not set
543# 532CONFIG_NETDEV_10000=y
544# Ethernet (10000 Mbit)
545#
546# CONFIG_CHELSIO_T1 is not set 533# CONFIG_CHELSIO_T1 is not set
534# CONFIG_CHELSIO_T3 is not set
547# CONFIG_IXGB is not set 535# CONFIG_IXGB is not set
548# CONFIG_S2IO is not set 536# CONFIG_S2IO is not set
549# CONFIG_MYRI10GE is not set 537# CONFIG_MYRI10GE is not set
550# CONFIG_NETXEN_NIC is not set 538# CONFIG_NETXEN_NIC is not set
551 539# CONFIG_PASEMI_MAC is not set
552# 540# CONFIG_MLX4_CORE is not set
553# Token Ring devices
554#
555# CONFIG_TR is not set 541# CONFIG_TR is not set
556 542
557# 543#
558# Wireless LAN (non-hamradio) 544# Wireless LAN
559# 545#
560# CONFIG_NET_RADIO is not set 546# CONFIG_WLAN_PRE80211 is not set
547# CONFIG_WLAN_80211 is not set
561 548
562# 549#
563# Wan interfaces 550# USB Network Adapters
564# 551#
552# CONFIG_USB_CATC is not set
553# CONFIG_USB_KAWETH is not set
554CONFIG_USB_PEGASUS=y
555# CONFIG_USB_RTL8150 is not set
556# CONFIG_USB_USBNET_MII is not set
557# CONFIG_USB_USBNET is not set
565# CONFIG_WAN is not set 558# CONFIG_WAN is not set
566# CONFIG_FDDI is not set 559# CONFIG_FDDI is not set
567# CONFIG_HIPPI is not set 560# CONFIG_HIPPI is not set
@@ -587,6 +580,7 @@ CONFIG_TIGON3=y
587# 580#
588CONFIG_INPUT=y 581CONFIG_INPUT=y
589# CONFIG_INPUT_FF_MEMLESS is not set 582# CONFIG_INPUT_FF_MEMLESS is not set
583# CONFIG_INPUT_POLLDEV is not set
590 584
591# 585#
592# Userland interfaces 586# Userland interfaces
@@ -606,6 +600,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1200
606# CONFIG_INPUT_KEYBOARD is not set 600# CONFIG_INPUT_KEYBOARD is not set
607# CONFIG_INPUT_MOUSE is not set 601# CONFIG_INPUT_MOUSE is not set
608# CONFIG_INPUT_JOYSTICK is not set 602# CONFIG_INPUT_JOYSTICK is not set
603# CONFIG_INPUT_TABLET is not set
609# CONFIG_INPUT_TOUCHSCREEN is not set 604# CONFIG_INPUT_TOUCHSCREEN is not set
610# CONFIG_INPUT_MISC is not set 605# CONFIG_INPUT_MISC is not set
611 606
@@ -640,6 +635,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
640CONFIG_SERIAL_CORE=y 635CONFIG_SERIAL_CORE=y
641CONFIG_SERIAL_CORE_CONSOLE=y 636CONFIG_SERIAL_CORE_CONSOLE=y
642# CONFIG_SERIAL_JSM is not set 637# CONFIG_SERIAL_JSM is not set
638# CONFIG_SERIAL_OF_PLATFORM is not set
643CONFIG_UNIX98_PTYS=y 639CONFIG_UNIX98_PTYS=y
644CONFIG_LEGACY_PTYS=y 640CONFIG_LEGACY_PTYS=y
645CONFIG_LEGACY_PTY_COUNT=256 641CONFIG_LEGACY_PTY_COUNT=256
@@ -650,15 +646,10 @@ CONFIG_HVC_RTAS=y
650# IPMI 646# IPMI
651# 647#
652# CONFIG_IPMI_HANDLER is not set 648# CONFIG_IPMI_HANDLER is not set
653
654#
655# Watchdog Cards
656#
657# CONFIG_WATCHDOG is not set 649# CONFIG_WATCHDOG is not set
658# CONFIG_HW_RANDOM is not set 650# CONFIG_HW_RANDOM is not set
659CONFIG_GEN_RTC=y 651CONFIG_GEN_RTC=y
660# CONFIG_GEN_RTC_X is not set 652# CONFIG_GEN_RTC_X is not set
661# CONFIG_DTLK is not set
662# CONFIG_R3964 is not set 653# CONFIG_R3964 is not set
663# CONFIG_APPLICOM is not set 654# CONFIG_APPLICOM is not set
664# CONFIG_AGP is not set 655# CONFIG_AGP is not set
@@ -670,11 +661,9 @@ CONFIG_GEN_RTC=y
670# TPM devices 661# TPM devices
671# 662#
672# CONFIG_TCG_TPM is not set 663# CONFIG_TCG_TPM is not set
673 664CONFIG_DEVPORT=y
674#
675# I2C support
676#
677CONFIG_I2C=y 665CONFIG_I2C=y
666CONFIG_I2C_BOARDINFO=y
678CONFIG_I2C_CHARDEV=y 667CONFIG_I2C_CHARDEV=y
679 668
680# 669#
@@ -700,14 +689,15 @@ CONFIG_I2C_AMD8111=y
700# CONFIG_I2C_PARPORT_LIGHT is not set 689# CONFIG_I2C_PARPORT_LIGHT is not set
701# CONFIG_I2C_PROSAVAGE is not set 690# CONFIG_I2C_PROSAVAGE is not set
702# CONFIG_I2C_SAVAGE4 is not set 691# CONFIG_I2C_SAVAGE4 is not set
692# CONFIG_I2C_SIMTEC is not set
703# CONFIG_I2C_SIS5595 is not set 693# CONFIG_I2C_SIS5595 is not set
704# CONFIG_I2C_SIS630 is not set 694# CONFIG_I2C_SIS630 is not set
705# CONFIG_I2C_SIS96X is not set 695# CONFIG_I2C_SIS96X is not set
706# CONFIG_I2C_STUB is not set 696# CONFIG_I2C_STUB is not set
697# CONFIG_I2C_TINY_USB is not set
707# CONFIG_I2C_VIA is not set 698# CONFIG_I2C_VIA is not set
708# CONFIG_I2C_VIAPRO is not set 699# CONFIG_I2C_VIAPRO is not set
709# CONFIG_I2C_VOODOO3 is not set 700# CONFIG_I2C_VOODOO3 is not set
710# CONFIG_I2C_PCA_ISA is not set
711 701
712# 702#
713# Miscellaneous I2C Chip support 703# Miscellaneous I2C Chip support
@@ -734,28 +724,30 @@ CONFIG_I2C_AMD8111=y
734# Dallas's 1-wire bus 724# Dallas's 1-wire bus
735# 725#
736# CONFIG_W1 is not set 726# CONFIG_W1 is not set
727# CONFIG_HWMON is not set
737 728
738# 729#
739# Hardware Monitoring support 730# Multifunction device drivers
740# 731#
741# CONFIG_HWMON is not set 732# CONFIG_MFD_SM501 is not set
742# CONFIG_HWMON_VID is not set
743 733
744# 734#
745# Multimedia devices 735# Multimedia devices
746# 736#
747# CONFIG_VIDEO_DEV is not set 737# CONFIG_VIDEO_DEV is not set
738# CONFIG_DVB_CORE is not set
739# CONFIG_DAB is not set
748 740
749# 741#
750# Digital Video Broadcasting Devices 742# Graphics support
751# 743#
752# CONFIG_DVB is not set 744# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
753# CONFIG_USB_DABUSB is not set
754 745
755# 746#
756# Graphics support 747# Display device support
757# 748#
758CONFIG_FIRMWARE_EDID=y 749# CONFIG_DISPLAY_SUPPORT is not set
750# CONFIG_VGASTATE is not set
759# CONFIG_FB is not set 751# CONFIG_FB is not set
760# CONFIG_FB_IBM_GXT4500 is not set 752# CONFIG_FB_IBM_GXT4500 is not set
761 753
@@ -764,7 +756,6 @@ CONFIG_FIRMWARE_EDID=y
764# 756#
765# CONFIG_VGA_CONSOLE is not set 757# CONFIG_VGA_CONSOLE is not set
766CONFIG_DUMMY_CONSOLE=y 758CONFIG_DUMMY_CONSOLE=y
767# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
768 759
769# 760#
770# Sound 761# Sound
@@ -775,6 +766,15 @@ CONFIG_DUMMY_CONSOLE=y
775# HID Devices 766# HID Devices
776# 767#
777CONFIG_HID=y 768CONFIG_HID=y
769# CONFIG_HID_DEBUG is not set
770
771#
772# USB Input Devices
773#
774CONFIG_USB_HID=y
775# CONFIG_USB_HIDINPUT_POWERBOOK is not set
776# CONFIG_HID_FF is not set
777# CONFIG_USB_HIDDEV is not set
778 778
779# 779#
780# USB support 780# USB support
@@ -789,9 +789,8 @@ CONFIG_USB=y
789# Miscellaneous USB options 789# Miscellaneous USB options
790# 790#
791CONFIG_USB_DEVICEFS=y 791CONFIG_USB_DEVICEFS=y
792# CONFIG_USB_BANDWIDTH is not set 792CONFIG_USB_DEVICE_CLASS=y
793# CONFIG_USB_DYNAMIC_MINORS is not set 793# CONFIG_USB_DYNAMIC_MINORS is not set
794# CONFIG_USB_MULTITHREAD_PROBE is not set
795# CONFIG_USB_OTG is not set 794# CONFIG_USB_OTG is not set
796 795
797# 796#
@@ -801,9 +800,12 @@ CONFIG_USB_EHCI_HCD=y
801CONFIG_USB_EHCI_SPLIT_ISO=y 800CONFIG_USB_EHCI_SPLIT_ISO=y
802CONFIG_USB_EHCI_ROOT_HUB_TT=y 801CONFIG_USB_EHCI_ROOT_HUB_TT=y
803# CONFIG_USB_EHCI_TT_NEWSCHED is not set 802# CONFIG_USB_EHCI_TT_NEWSCHED is not set
803# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
804# CONFIG_USB_ISP116X_HCD is not set 804# CONFIG_USB_ISP116X_HCD is not set
805CONFIG_USB_OHCI_HCD=y 805CONFIG_USB_OHCI_HCD=y
806# CONFIG_USB_OHCI_BIG_ENDIAN is not set 806# CONFIG_USB_OHCI_HCD_PPC_OF is not set
807# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
808# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
807CONFIG_USB_OHCI_LITTLE_ENDIAN=y 809CONFIG_USB_OHCI_LITTLE_ENDIAN=y
808CONFIG_USB_UHCI_HCD=y 810CONFIG_USB_UHCI_HCD=y
809# CONFIG_USB_SL811_HCD is not set 811# CONFIG_USB_SL811_HCD is not set
@@ -824,39 +826,9 @@ CONFIG_USB_UHCI_HCD=y
824# CONFIG_USB_LIBUSUAL is not set 826# CONFIG_USB_LIBUSUAL is not set
825 827
826# 828#
827# USB Input Devices
828#
829CONFIG_USB_HID=y
830# CONFIG_USB_HIDINPUT_POWERBOOK is not set
831# CONFIG_HID_FF is not set
832# CONFIG_USB_HIDDEV is not set
833# CONFIG_USB_AIPTEK is not set
834# CONFIG_USB_WACOM is not set
835# CONFIG_USB_ACECAD is not set
836# CONFIG_USB_KBTAB is not set
837# CONFIG_USB_POWERMATE is not set
838# CONFIG_USB_TOUCHSCREEN is not set
839# CONFIG_USB_YEALINK is not set
840# CONFIG_USB_XPAD is not set
841# CONFIG_USB_ATI_REMOTE is not set
842# CONFIG_USB_ATI_REMOTE2 is not set
843# CONFIG_USB_KEYSPAN_REMOTE is not set
844# CONFIG_USB_APPLETOUCH is not set
845
846#
847# USB Imaging devices 829# USB Imaging devices
848# 830#
849# CONFIG_USB_MDC800 is not set 831# CONFIG_USB_MDC800 is not set
850
851#
852# USB Network Adapters
853#
854# CONFIG_USB_CATC is not set
855# CONFIG_USB_KAWETH is not set
856CONFIG_USB_PEGASUS=y
857# CONFIG_USB_RTL8150 is not set
858# CONFIG_USB_USBNET_MII is not set
859# CONFIG_USB_USBNET is not set
860CONFIG_USB_MON=y 832CONFIG_USB_MON=y
861 833
862# 834#
@@ -929,6 +901,7 @@ CONFIG_USB_EZUSB=y
929# CONFIG_USB_RIO500 is not set 901# CONFIG_USB_RIO500 is not set
930# CONFIG_USB_LEGOTOWER is not set 902# CONFIG_USB_LEGOTOWER is not set
931# CONFIG_USB_LCD is not set 903# CONFIG_USB_LCD is not set
904# CONFIG_USB_BERRY_CHARGE is not set
932# CONFIG_USB_LED is not set 905# CONFIG_USB_LED is not set
933# CONFIG_USB_CYPRESS_CY7C63 is not set 906# CONFIG_USB_CYPRESS_CY7C63 is not set
934# CONFIG_USB_CYTHERM is not set 907# CONFIG_USB_CYTHERM is not set
@@ -939,6 +912,7 @@ CONFIG_USB_EZUSB=y
939# CONFIG_USB_SISUSBVGA is not set 912# CONFIG_USB_SISUSBVGA is not set
940# CONFIG_USB_LD is not set 913# CONFIG_USB_LD is not set
941# CONFIG_USB_TRANCEVIBRATOR is not set 914# CONFIG_USB_TRANCEVIBRATOR is not set
915# CONFIG_USB_IOWARRIOR is not set
942# CONFIG_USB_TEST is not set 916# CONFIG_USB_TEST is not set
943 917
944# 918#
@@ -949,10 +923,6 @@ CONFIG_USB_EZUSB=y
949# USB Gadget Support 923# USB Gadget Support
950# 924#
951# CONFIG_USB_GADGET is not set 925# CONFIG_USB_GADGET is not set
952
953#
954# MMC/SD Card support
955#
956# CONFIG_MMC is not set 926# CONFIG_MMC is not set
957 927
958# 928#
@@ -996,10 +966,6 @@ CONFIG_USB_EZUSB=y
996# 966#
997 967
998# 968#
999# Virtualization
1000#
1001
1002#
1003# File systems 969# File systems
1004# 970#
1005CONFIG_EXT2_FS=y 971CONFIG_EXT2_FS=y
@@ -1090,6 +1056,7 @@ CONFIG_NFS_ACL_SUPPORT=y
1090CONFIG_NFS_COMMON=y 1056CONFIG_NFS_COMMON=y
1091CONFIG_SUNRPC=y 1057CONFIG_SUNRPC=y
1092CONFIG_SUNRPC_GSS=y 1058CONFIG_SUNRPC_GSS=y
1059# CONFIG_SUNRPC_BIND34 is not set
1093CONFIG_RPCSEC_GSS_KRB5=y 1060CONFIG_RPCSEC_GSS_KRB5=y
1094# CONFIG_RPCSEC_GSS_SPKM3 is not set 1061# CONFIG_RPCSEC_GSS_SPKM3 is not set
1095# CONFIG_SMB_FS is not set 1062# CONFIG_SMB_FS is not set
@@ -1119,6 +1086,7 @@ CONFIG_MSDOS_PARTITION=y
1119# CONFIG_SUN_PARTITION is not set 1086# CONFIG_SUN_PARTITION is not set
1120# CONFIG_KARMA_PARTITION is not set 1087# CONFIG_KARMA_PARTITION is not set
1121# CONFIG_EFI_PARTITION is not set 1088# CONFIG_EFI_PARTITION is not set
1089# CONFIG_SYSV68_PARTITION is not set
1122 1090
1123# 1091#
1124# Native Language Support 1092# Native Language Support
@@ -1168,6 +1136,7 @@ CONFIG_NLS_UTF8=y
1168# Distributed Lock Manager 1136# Distributed Lock Manager
1169# 1137#
1170# CONFIG_DLM is not set 1138# CONFIG_DLM is not set
1139# CONFIG_UCC_SLOW is not set
1171 1140
1172# 1141#
1173# Library routines 1142# Library routines
@@ -1175,11 +1144,14 @@ CONFIG_NLS_UTF8=y
1175CONFIG_BITREVERSE=y 1144CONFIG_BITREVERSE=y
1176CONFIG_CRC_CCITT=y 1145CONFIG_CRC_CCITT=y
1177# CONFIG_CRC16 is not set 1146# CONFIG_CRC16 is not set
1147# CONFIG_CRC_ITU_T is not set
1178CONFIG_CRC32=y 1148CONFIG_CRC32=y
1179# CONFIG_LIBCRC32C is not set 1149# CONFIG_LIBCRC32C is not set
1180CONFIG_ZLIB_INFLATE=y 1150CONFIG_ZLIB_INFLATE=y
1181CONFIG_PLIST=y 1151CONFIG_PLIST=y
1182CONFIG_IOMAP_COPY=y 1152CONFIG_HAS_IOMEM=y
1153CONFIG_HAS_IOPORT=y
1154CONFIG_HAS_DMA=y
1183 1155
1184# 1156#
1185# Instrumentation Support 1157# Instrumentation Support
@@ -1197,16 +1169,16 @@ CONFIG_MAGIC_SYSRQ=y
1197CONFIG_DEBUG_FS=y 1169CONFIG_DEBUG_FS=y
1198# CONFIG_HEADERS_CHECK is not set 1170# CONFIG_HEADERS_CHECK is not set
1199CONFIG_DEBUG_KERNEL=y 1171CONFIG_DEBUG_KERNEL=y
1200CONFIG_LOG_BUF_SHIFT=17 1172# CONFIG_DEBUG_SHIRQ is not set
1201CONFIG_DETECT_SOFTLOCKUP=y 1173CONFIG_DETECT_SOFTLOCKUP=y
1202# CONFIG_SCHEDSTATS is not set 1174# CONFIG_SCHEDSTATS is not set
1175# CONFIG_TIMER_STATS is not set
1203CONFIG_DEBUG_SLAB=y 1176CONFIG_DEBUG_SLAB=y
1204# CONFIG_DEBUG_SLAB_LEAK is not set 1177# CONFIG_DEBUG_SLAB_LEAK is not set
1205# CONFIG_DEBUG_RT_MUTEXES is not set 1178# CONFIG_DEBUG_RT_MUTEXES is not set
1206# CONFIG_RT_MUTEX_TESTER is not set 1179# CONFIG_RT_MUTEX_TESTER is not set
1207# CONFIG_DEBUG_SPINLOCK is not set 1180# CONFIG_DEBUG_SPINLOCK is not set
1208# CONFIG_DEBUG_MUTEXES is not set 1181# CONFIG_DEBUG_MUTEXES is not set
1209# CONFIG_DEBUG_RWSEMS is not set
1210CONFIG_DEBUG_SPINLOCK_SLEEP=y 1182CONFIG_DEBUG_SPINLOCK_SLEEP=y
1211# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1183# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1212# CONFIG_DEBUG_KOBJECT is not set 1184# CONFIG_DEBUG_KOBJECT is not set
@@ -1216,8 +1188,10 @@ CONFIG_DEBUG_BUGVERBOSE=y
1216# CONFIG_DEBUG_LIST is not set 1188# CONFIG_DEBUG_LIST is not set
1217# CONFIG_FORCED_INLINING is not set 1189# CONFIG_FORCED_INLINING is not set
1218# CONFIG_RCU_TORTURE_TEST is not set 1190# CONFIG_RCU_TORTURE_TEST is not set
1191# CONFIG_FAULT_INJECTION is not set
1219CONFIG_DEBUG_STACKOVERFLOW=y 1192CONFIG_DEBUG_STACKOVERFLOW=y
1220CONFIG_DEBUG_STACK_USAGE=y 1193CONFIG_DEBUG_STACK_USAGE=y
1194# CONFIG_DEBUG_PAGEALLOC is not set
1221CONFIG_DEBUGGER=y 1195CONFIG_DEBUGGER=y
1222CONFIG_XMON=y 1196CONFIG_XMON=y
1223CONFIG_XMON_DEFAULT=y 1197CONFIG_XMON_DEFAULT=y
@@ -1252,8 +1226,11 @@ CONFIG_CRYPTO_MD5=y
1252# CONFIG_CRYPTO_GF128MUL is not set 1226# CONFIG_CRYPTO_GF128MUL is not set
1253CONFIG_CRYPTO_ECB=m 1227CONFIG_CRYPTO_ECB=m
1254CONFIG_CRYPTO_CBC=y 1228CONFIG_CRYPTO_CBC=y
1229CONFIG_CRYPTO_PCBC=m
1255# CONFIG_CRYPTO_LRW is not set 1230# CONFIG_CRYPTO_LRW is not set
1231# CONFIG_CRYPTO_CRYPTD is not set
1256CONFIG_CRYPTO_DES=y 1232CONFIG_CRYPTO_DES=y
1233# CONFIG_CRYPTO_FCRYPT is not set
1257# CONFIG_CRYPTO_BLOWFISH is not set 1234# CONFIG_CRYPTO_BLOWFISH is not set
1258# CONFIG_CRYPTO_TWOFISH is not set 1235# CONFIG_CRYPTO_TWOFISH is not set
1259# CONFIG_CRYPTO_SERPENT is not set 1236# CONFIG_CRYPTO_SERPENT is not set
@@ -1267,6 +1244,7 @@ CONFIG_CRYPTO_DES=y
1267# CONFIG_CRYPTO_DEFLATE is not set 1244# CONFIG_CRYPTO_DEFLATE is not set
1268# CONFIG_CRYPTO_MICHAEL_MIC is not set 1245# CONFIG_CRYPTO_MICHAEL_MIC is not set
1269# CONFIG_CRYPTO_CRC32C is not set 1246# CONFIG_CRYPTO_CRC32C is not set
1247# CONFIG_CRYPTO_CAMELLIA is not set
1270# CONFIG_CRYPTO_TEST is not set 1248# CONFIG_CRYPTO_TEST is not set
1271 1249
1272# 1250#
diff --git a/arch/powerpc/configs/mpc7448_hpc2_defconfig b/arch/powerpc/configs/mpc7448_hpc2_defconfig
index fdf09eabe6..174a290ee7 100644
--- a/arch/powerpc/configs/mpc7448_hpc2_defconfig
+++ b/arch/powerpc/configs/mpc7448_hpc2_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.22-rc7
4# Mon Jan 22 22:20:53 2007 4# Sun Jul 1 23:56:54 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_CLASSIC32=y
34# CONFIG_PPC_83xx is not set 34# CONFIG_PPC_83xx is not set
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_PPC_FPU=y 42CONFIG_PPC_FPU=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_ALTIVEC is not set 45# CONFIG_ALTIVEC is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -63,14 +64,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 68# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -84,14 +88,19 @@ CONFIG_BUG=y
84CONFIG_ELF_CORE=y 88CONFIG_ELF_CORE=y
85CONFIG_BASE_FULL=y 89CONFIG_BASE_FULL=y
86CONFIG_FUTEX=y 90CONFIG_FUTEX=y
91CONFIG_ANON_INODES=y
87CONFIG_EPOLL=y 92CONFIG_EPOLL=y
93CONFIG_SIGNALFD=y
94CONFIG_TIMERFD=y
95CONFIG_EVENTFD=y
88CONFIG_SHMEM=y 96CONFIG_SHMEM=y
89CONFIG_SLAB=y
90CONFIG_VM_EVENT_COUNTERS=y 97CONFIG_VM_EVENT_COUNTERS=y
98CONFIG_SLAB=y
99# CONFIG_SLUB is not set
100# CONFIG_SLOB is not set
91CONFIG_RT_MUTEXES=y 101CONFIG_RT_MUTEXES=y
92# CONFIG_TINY_SHMEM is not set 102# CONFIG_TINY_SHMEM is not set
93CONFIG_BASE_SMALL=0 103CONFIG_BASE_SMALL=0
94# CONFIG_SLOB is not set
95 104
96# 105#
97# Loadable module support 106# Loadable module support
@@ -126,8 +135,18 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
126CONFIG_EMBEDDED6xx=y 135CONFIG_EMBEDDED6xx=y
127# CONFIG_APUS is not set 136# CONFIG_APUS is not set
128# CONFIG_PPC_MPC52xx is not set 137# CONFIG_PPC_MPC52xx is not set
138# CONFIG_PPC_MPC5200 is not set
129# CONFIG_PPC_CELL is not set 139# CONFIG_PPC_CELL is not set
130# CONFIG_PPC_CELL_NATIVE is not set 140# CONFIG_PPC_CELL_NATIVE is not set
141# CONFIG_PQ2ADS is not set
142# CONFIG_LINKSTATION is not set
143CONFIG_MPC7448HPC2=y
144# CONFIG_PPC_HOLLY is not set
145# CONFIG_PPC_PRPMC2800 is not set
146CONFIG_TSI108_BRIDGE=y
147CONFIG_MPIC=y
148CONFIG_MPIC_WEIRD=y
149# CONFIG_PPC_I8259 is not set
131# CONFIG_PPC_RTAS is not set 150# CONFIG_PPC_RTAS is not set
132# CONFIG_MMIO_NVRAM is not set 151# CONFIG_MMIO_NVRAM is not set
133# CONFIG_PPC_MPC106 is not set 152# CONFIG_PPC_MPC106 is not set
@@ -136,36 +155,7 @@ CONFIG_EMBEDDED6xx=y
136# CONFIG_GENERIC_IOMAP is not set 155# CONFIG_GENERIC_IOMAP is not set
137# CONFIG_CPU_FREQ is not set 156# CONFIG_CPU_FREQ is not set
138# CONFIG_TAU is not set 157# CONFIG_TAU is not set
139# CONFIG_KATANA is not set 158# CONFIG_CPM2 is not set
140# CONFIG_WILLOW is not set
141# CONFIG_CPCI690 is not set
142# CONFIG_POWERPMC250 is not set
143# CONFIG_CHESTNUT is not set
144# CONFIG_SPRUCE is not set
145# CONFIG_HDPU is not set
146# CONFIG_EV64260 is not set
147# CONFIG_LOPEC is not set
148# CONFIG_MVME5100 is not set
149# CONFIG_PPLUS is not set
150# CONFIG_PRPMC750 is not set
151# CONFIG_PRPMC800 is not set
152# CONFIG_SANDPOINT is not set
153# CONFIG_LINKSTATION is not set
154CONFIG_MPC7448HPC2=y
155# CONFIG_RADSTONE_PPC7D is not set
156# CONFIG_PAL4 is not set
157# CONFIG_GEMINI is not set
158# CONFIG_EST8260 is not set
159# CONFIG_SBC82xx is not set
160# CONFIG_SBS8260 is not set
161# CONFIG_RPX8260 is not set
162# CONFIG_TQM8260 is not set
163# CONFIG_ADS8272 is not set
164# CONFIG_PQ2FADS is not set
165# CONFIG_EV64360 is not set
166CONFIG_TSI108_BRIDGE=y
167# CONFIG_WANT_EARLY_SERIAL is not set
168CONFIG_MPIC=y
169 159
170# 160#
171# Kernel options 161# Kernel options
@@ -193,31 +183,30 @@ CONFIG_FLAT_NODE_MEM_MAP=y
193# CONFIG_SPARSEMEM_STATIC is not set 183# CONFIG_SPARSEMEM_STATIC is not set
194CONFIG_SPLIT_PTLOCK_CPUS=4 184CONFIG_SPLIT_PTLOCK_CPUS=4
195# CONFIG_RESOURCES_64BIT is not set 185# CONFIG_RESOURCES_64BIT is not set
186CONFIG_ZONE_DMA_FLAG=1
196CONFIG_PROC_DEVICETREE=y 187CONFIG_PROC_DEVICETREE=y
197# CONFIG_CMDLINE_BOOL is not set 188# CONFIG_CMDLINE_BOOL is not set
198# CONFIG_PM is not set 189# CONFIG_PM is not set
199# CONFIG_SECCOMP is not set 190# CONFIG_SECCOMP is not set
191# CONFIG_WANT_DEVICE_TREE is not set
200CONFIG_ISA_DMA_API=y 192CONFIG_ISA_DMA_API=y
201 193
202# 194#
203# Bus options 195# Bus options
204# 196#
197CONFIG_ZONE_DMA=y
205CONFIG_GENERIC_ISA_DMA=y 198CONFIG_GENERIC_ISA_DMA=y
206CONFIG_MPIC_WEIRD=y
207# CONFIG_PPC_I8259 is not set
208# CONFIG_PPC_INDIRECT_PCI is not set 199# CONFIG_PPC_INDIRECT_PCI is not set
209CONFIG_PCI=y 200CONFIG_PCI=y
210CONFIG_PCI_DOMAINS=y 201CONFIG_PCI_DOMAINS=y
211# CONFIG_PCIEPORTBUS is not set 202# CONFIG_PCIEPORTBUS is not set
203CONFIG_ARCH_SUPPORTS_MSI=y
204# CONFIG_PCI_MSI is not set
212 205
213# 206#
214# PCCARD (PCMCIA/CardBus) support 207# PCCARD (PCMCIA/CardBus) support
215# 208#
216# CONFIG_PCCARD is not set 209# CONFIG_PCCARD is not set
217
218#
219# PCI Hotplug Support
220#
221# CONFIG_HOTPLUG_PCI is not set 210# CONFIG_HOTPLUG_PCI is not set
222 211
223# 212#
@@ -242,13 +231,13 @@ CONFIG_NET=y
242# 231#
243# Networking options 232# Networking options
244# 233#
245# CONFIG_NETDEBUG is not set
246CONFIG_PACKET=y 234CONFIG_PACKET=y
247# CONFIG_PACKET_MMAP is not set 235# CONFIG_PACKET_MMAP is not set
248CONFIG_UNIX=y 236CONFIG_UNIX=y
249CONFIG_XFRM=y 237CONFIG_XFRM=y
250CONFIG_XFRM_USER=y 238CONFIG_XFRM_USER=y
251# CONFIG_XFRM_SUB_POLICY is not set 239# CONFIG_XFRM_SUB_POLICY is not set
240# CONFIG_XFRM_MIGRATE is not set
252# CONFIG_NET_KEY is not set 241# CONFIG_NET_KEY is not set
253CONFIG_INET=y 242CONFIG_INET=y
254CONFIG_IP_MULTICAST=y 243CONFIG_IP_MULTICAST=y
@@ -282,20 +271,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
282# CONFIG_INET6_TUNNEL is not set 271# CONFIG_INET6_TUNNEL is not set
283# CONFIG_NETWORK_SECMARK is not set 272# CONFIG_NETWORK_SECMARK is not set
284# CONFIG_NETFILTER is not set 273# CONFIG_NETFILTER is not set
285
286#
287# DCCP Configuration (EXPERIMENTAL)
288#
289# CONFIG_IP_DCCP is not set 274# CONFIG_IP_DCCP is not set
290
291#
292# SCTP Configuration (EXPERIMENTAL)
293#
294# CONFIG_IP_SCTP is not set 275# CONFIG_IP_SCTP is not set
295
296#
297# TIPC Configuration (EXPERIMENTAL)
298#
299# CONFIG_TIPC is not set 276# CONFIG_TIPC is not set
300# CONFIG_ATM is not set 277# CONFIG_ATM is not set
301# CONFIG_BRIDGE is not set 278# CONFIG_BRIDGE is not set
@@ -321,7 +298,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
321# CONFIG_HAMRADIO is not set 298# CONFIG_HAMRADIO is not set
322# CONFIG_IRDA is not set 299# CONFIG_IRDA is not set
323# CONFIG_BT is not set 300# CONFIG_BT is not set
301# CONFIG_AF_RXRPC is not set
302
303#
304# Wireless
305#
306# CONFIG_CFG80211 is not set
307# CONFIG_WIRELESS_EXT is not set
308# CONFIG_MAC80211 is not set
324# CONFIG_IEEE80211 is not set 309# CONFIG_IEEE80211 is not set
310# CONFIG_RFKILL is not set
325 311
326# 312#
327# Device Drivers 313# Device Drivers
@@ -339,10 +325,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
339# Connector - unified userspace <-> kernelspace linker 325# Connector - unified userspace <-> kernelspace linker
340# 326#
341# CONFIG_CONNECTOR is not set 327# CONFIG_CONNECTOR is not set
342
343#
344# Memory Technology Devices (MTD)
345#
346# CONFIG_MTD is not set 328# CONFIG_MTD is not set
347 329
348# 330#
@@ -353,6 +335,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
353# 335#
354# Plug and Play support 336# Plug and Play support
355# 337#
338# CONFIG_PNPACPI is not set
356 339
357# 340#
358# Block devices 341# Block devices
@@ -371,19 +354,16 @@ CONFIG_BLK_DEV_RAM=y
371CONFIG_BLK_DEV_RAM_COUNT=16 354CONFIG_BLK_DEV_RAM_COUNT=16
372CONFIG_BLK_DEV_RAM_SIZE=131072 355CONFIG_BLK_DEV_RAM_SIZE=131072
373CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 356CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
374CONFIG_BLK_DEV_INITRD=y
375# CONFIG_CDROM_PKTCDVD is not set 357# CONFIG_CDROM_PKTCDVD is not set
376# CONFIG_ATA_OVER_ETH is not set 358# CONFIG_ATA_OVER_ETH is not set
377 359
378# 360#
379# Misc devices 361# Misc devices
380# 362#
363# CONFIG_PHANTOM is not set
381# CONFIG_SGI_IOC4 is not set 364# CONFIG_SGI_IOC4 is not set
382# CONFIG_TIFM_CORE is not set 365# CONFIG_TIFM_CORE is not set
383 366# CONFIG_BLINK is not set
384#
385# ATA/ATAPI/MFM/RLL support
386#
387# CONFIG_IDE is not set 367# CONFIG_IDE is not set
388 368
389# 369#
@@ -460,11 +440,8 @@ CONFIG_BLK_DEV_SD=y
460# CONFIG_SCSI_NSP32 is not set 440# CONFIG_SCSI_NSP32 is not set
461# CONFIG_SCSI_DEBUG is not set 441# CONFIG_SCSI_DEBUG is not set
462# CONFIG_SCSI_SRP is not set 442# CONFIG_SCSI_SRP is not set
463
464#
465# Serial ATA (prod) and Parallel ATA (experimental) drivers
466#
467CONFIG_ATA=y 443CONFIG_ATA=y
444# CONFIG_ATA_NONSTANDARD is not set
468# CONFIG_SATA_AHCI is not set 445# CONFIG_SATA_AHCI is not set
469# CONFIG_SATA_SVW is not set 446# CONFIG_SATA_SVW is not set
470# CONFIG_ATA_PIIX is not set 447# CONFIG_ATA_PIIX is not set
@@ -480,10 +457,12 @@ CONFIG_SATA_MV=y
480# CONFIG_SATA_ULI is not set 457# CONFIG_SATA_ULI is not set
481# CONFIG_SATA_VIA is not set 458# CONFIG_SATA_VIA is not set
482# CONFIG_SATA_VITESSE is not set 459# CONFIG_SATA_VITESSE is not set
460# CONFIG_SATA_INIC162X is not set
483# CONFIG_PATA_ALI is not set 461# CONFIG_PATA_ALI is not set
484# CONFIG_PATA_AMD is not set 462# CONFIG_PATA_AMD is not set
485# CONFIG_PATA_ARTOP is not set 463# CONFIG_PATA_ARTOP is not set
486# CONFIG_PATA_ATIIXP is not set 464# CONFIG_PATA_ATIIXP is not set
465# CONFIG_PATA_CMD640_PCI is not set
487# CONFIG_PATA_CMD64X is not set 466# CONFIG_PATA_CMD64X is not set
488# CONFIG_PATA_CS5520 is not set 467# CONFIG_PATA_CS5520 is not set
489# CONFIG_PATA_CS5530 is not set 468# CONFIG_PATA_CS5530 is not set
@@ -495,6 +474,7 @@ CONFIG_SATA_MV=y
495# CONFIG_PATA_HPT3X2N is not set 474# CONFIG_PATA_HPT3X2N is not set
496# CONFIG_PATA_HPT3X3 is not set 475# CONFIG_PATA_HPT3X3 is not set
497# CONFIG_PATA_IT821X is not set 476# CONFIG_PATA_IT821X is not set
477# CONFIG_PATA_IT8213 is not set
498# CONFIG_PATA_JMICRON is not set 478# CONFIG_PATA_JMICRON is not set
499# CONFIG_PATA_TRIFLEX is not set 479# CONFIG_PATA_TRIFLEX is not set
500# CONFIG_PATA_MARVELL is not set 480# CONFIG_PATA_MARVELL is not set
@@ -532,18 +512,14 @@ CONFIG_SATA_MV=y
532# 512#
533# IEEE 1394 (FireWire) support 513# IEEE 1394 (FireWire) support
534# 514#
515# CONFIG_FIREWIRE is not set
535# CONFIG_IEEE1394 is not set 516# CONFIG_IEEE1394 is not set
536 517
537# 518#
538# I2O device support 519# I2O device support
539# 520#
540# CONFIG_I2O is not set 521# CONFIG_I2O is not set
541 522# CONFIG_MACINTOSH_DRIVERS is not set
542#
543# Macintosh device drivers
544#
545# CONFIG_MAC_EMUMOUSEBTN is not set
546# CONFIG_WINDFARM is not set
547 523
548# 524#
549# Network device support 525# Network device support
@@ -553,15 +529,7 @@ CONFIG_NETDEVICES=y
553# CONFIG_BONDING is not set 529# CONFIG_BONDING is not set
554# CONFIG_EQUALIZER is not set 530# CONFIG_EQUALIZER is not set
555# CONFIG_TUN is not set 531# CONFIG_TUN is not set
556
557#
558# ARCnet devices
559#
560# CONFIG_ARCNET is not set 532# CONFIG_ARCNET is not set
561
562#
563# PHY device support
564#
565CONFIG_PHYLIB=y 533CONFIG_PHYLIB=y
566 534
567# 535#
@@ -615,10 +583,8 @@ CONFIG_8139TOO=y
615# CONFIG_SUNDANCE is not set 583# CONFIG_SUNDANCE is not set
616# CONFIG_TLAN is not set 584# CONFIG_TLAN is not set
617# CONFIG_VIA_RHINE is not set 585# CONFIG_VIA_RHINE is not set
618 586# CONFIG_SC92031 is not set
619# 587CONFIG_NETDEV_1000=y
620# Ethernet (1000 Mbit)
621#
622# CONFIG_ACENIC is not set 588# CONFIG_ACENIC is not set
623# CONFIG_DL2K is not set 589# CONFIG_DL2K is not set
624# CONFIG_E1000 is not set 590# CONFIG_E1000 is not set
@@ -635,29 +601,22 @@ CONFIG_8139TOO=y
635# CONFIG_BNX2 is not set 601# CONFIG_BNX2 is not set
636CONFIG_TSI108_ETH=y 602CONFIG_TSI108_ETH=y
637# CONFIG_QLA3XXX is not set 603# CONFIG_QLA3XXX is not set
638 604# CONFIG_ATL1 is not set
639# 605CONFIG_NETDEV_10000=y
640# Ethernet (10000 Mbit)
641#
642# CONFIG_CHELSIO_T1 is not set 606# CONFIG_CHELSIO_T1 is not set
607# CONFIG_CHELSIO_T3 is not set
643# CONFIG_IXGB is not set 608# CONFIG_IXGB is not set
644# CONFIG_S2IO is not set 609# CONFIG_S2IO is not set
645# CONFIG_MYRI10GE is not set 610# CONFIG_MYRI10GE is not set
646# CONFIG_NETXEN_NIC is not set 611# CONFIG_NETXEN_NIC is not set
647 612# CONFIG_MLX4_CORE is not set
648#
649# Token Ring devices
650#
651# CONFIG_TR is not set 613# CONFIG_TR is not set
652 614
653# 615#
654# Wireless LAN (non-hamradio) 616# Wireless LAN
655#
656# CONFIG_NET_RADIO is not set
657
658#
659# Wan interfaces
660# 617#
618# CONFIG_WLAN_PRE80211 is not set
619# CONFIG_WLAN_80211 is not set
661# CONFIG_WAN is not set 620# CONFIG_WAN is not set
662# CONFIG_FDDI is not set 621# CONFIG_FDDI is not set
663# CONFIG_HIPPI is not set 622# CONFIG_HIPPI is not set
@@ -684,6 +643,7 @@ CONFIG_TSI108_ETH=y
684# 643#
685CONFIG_INPUT=y 644CONFIG_INPUT=y
686# CONFIG_INPUT_FF_MEMLESS is not set 645# CONFIG_INPUT_FF_MEMLESS is not set
646# CONFIG_INPUT_POLLDEV is not set
687 647
688# 648#
689# Userland interfaces 649# Userland interfaces
@@ -700,6 +660,7 @@ CONFIG_INPUT=y
700# CONFIG_INPUT_KEYBOARD is not set 660# CONFIG_INPUT_KEYBOARD is not set
701# CONFIG_INPUT_MOUSE is not set 661# CONFIG_INPUT_MOUSE is not set
702# CONFIG_INPUT_JOYSTICK is not set 662# CONFIG_INPUT_JOYSTICK is not set
663# CONFIG_INPUT_TABLET is not set
703# CONFIG_INPUT_TOUCHSCREEN is not set 664# CONFIG_INPUT_TOUCHSCREEN is not set
704# CONFIG_INPUT_MISC is not set 665# CONFIG_INPUT_MISC is not set
705 666
@@ -732,6 +693,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
732CONFIG_SERIAL_CORE=y 693CONFIG_SERIAL_CORE=y
733CONFIG_SERIAL_CORE_CONSOLE=y 694CONFIG_SERIAL_CORE_CONSOLE=y
734# CONFIG_SERIAL_JSM is not set 695# CONFIG_SERIAL_JSM is not set
696# CONFIG_SERIAL_OF_PLATFORM is not set
735CONFIG_UNIX98_PTYS=y 697CONFIG_UNIX98_PTYS=y
736CONFIG_LEGACY_PTYS=y 698CONFIG_LEGACY_PTYS=y
737CONFIG_LEGACY_PTY_COUNT=256 699CONFIG_LEGACY_PTY_COUNT=256
@@ -740,16 +702,11 @@ CONFIG_LEGACY_PTY_COUNT=256
740# IPMI 702# IPMI
741# 703#
742# CONFIG_IPMI_HANDLER is not set 704# CONFIG_IPMI_HANDLER is not set
743
744#
745# Watchdog Cards
746#
747# CONFIG_WATCHDOG is not set 705# CONFIG_WATCHDOG is not set
748# CONFIG_HW_RANDOM is not set 706# CONFIG_HW_RANDOM is not set
749# CONFIG_NVRAM is not set 707# CONFIG_NVRAM is not set
750CONFIG_GEN_RTC=y 708CONFIG_GEN_RTC=y
751# CONFIG_GEN_RTC_X is not set 709# CONFIG_GEN_RTC_X is not set
752# CONFIG_DTLK is not set
753# CONFIG_R3964 is not set 710# CONFIG_R3964 is not set
754# CONFIG_APPLICOM is not set 711# CONFIG_APPLICOM is not set
755# CONFIG_AGP is not set 712# CONFIG_AGP is not set
@@ -760,10 +717,7 @@ CONFIG_GEN_RTC=y
760# TPM devices 717# TPM devices
761# 718#
762# CONFIG_TCG_TPM is not set 719# CONFIG_TCG_TPM is not set
763 720CONFIG_DEVPORT=y
764#
765# I2C support
766#
767# CONFIG_I2C is not set 721# CONFIG_I2C is not set
768 722
769# 723#
@@ -776,35 +730,41 @@ CONFIG_GEN_RTC=y
776# Dallas's 1-wire bus 730# Dallas's 1-wire bus
777# 731#
778# CONFIG_W1 is not set 732# CONFIG_W1 is not set
779
780#
781# Hardware Monitoring support
782#
783CONFIG_HWMON=y 733CONFIG_HWMON=y
784# CONFIG_HWMON_VID is not set 734# CONFIG_HWMON_VID is not set
785# CONFIG_SENSORS_ABITUGURU is not set 735# CONFIG_SENSORS_ABITUGURU is not set
786# CONFIG_SENSORS_F71805F is not set 736# CONFIG_SENSORS_F71805F is not set
787# CONFIG_SENSORS_PC87427 is not set 737# CONFIG_SENSORS_PC87427 is not set
738# CONFIG_SENSORS_SMSC47M1 is not set
739# CONFIG_SENSORS_SMSC47B397 is not set
788# CONFIG_SENSORS_VT1211 is not set 740# CONFIG_SENSORS_VT1211 is not set
741# CONFIG_SENSORS_W83627HF is not set
789# CONFIG_HWMON_DEBUG_CHIP is not set 742# CONFIG_HWMON_DEBUG_CHIP is not set
790 743
791# 744#
745# Multifunction device drivers
746#
747# CONFIG_MFD_SM501 is not set
748
749#
792# Multimedia devices 750# Multimedia devices
793# 751#
794# CONFIG_VIDEO_DEV is not set 752# CONFIG_VIDEO_DEV is not set
753# CONFIG_DVB_CORE is not set
754CONFIG_DAB=y
795 755
796# 756#
797# Digital Video Broadcasting Devices 757# Graphics support
798# 758#
799# CONFIG_DVB is not set 759# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
800 760
801# 761#
802# Graphics support 762# Display device support
803# 763#
804CONFIG_FIRMWARE_EDID=y 764# CONFIG_DISPLAY_SUPPORT is not set
765# CONFIG_VGASTATE is not set
805# CONFIG_FB is not set 766# CONFIG_FB is not set
806# CONFIG_FB_IBM_GXT4500 is not set 767# CONFIG_FB_IBM_GXT4500 is not set
807# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
808 768
809# 769#
810# Sound 770# Sound
@@ -815,6 +775,7 @@ CONFIG_FIRMWARE_EDID=y
815# HID Devices 775# HID Devices
816# 776#
817CONFIG_HID=y 777CONFIG_HID=y
778# CONFIG_HID_DEBUG is not set
818 779
819# 780#
820# USB support 781# USB support
@@ -832,10 +793,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
832# USB Gadget Support 793# USB Gadget Support
833# 794#
834# CONFIG_USB_GADGET is not set 795# CONFIG_USB_GADGET is not set
835
836#
837# MMC/SD Card support
838#
839# CONFIG_MMC is not set 796# CONFIG_MMC is not set
840 797
841# 798#
@@ -879,10 +836,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
879# 836#
880 837
881# 838#
882# Virtualization
883#
884
885#
886# File systems 839# File systems
887# 840#
888CONFIG_EXT2_FS=y 841CONFIG_EXT2_FS=y
@@ -967,6 +920,7 @@ CONFIG_ROOT_NFS=y
967CONFIG_LOCKD=y 920CONFIG_LOCKD=y
968CONFIG_NFS_COMMON=y 921CONFIG_NFS_COMMON=y
969CONFIG_SUNRPC=y 922CONFIG_SUNRPC=y
923# CONFIG_SUNRPC_BIND34 is not set
970# CONFIG_RPCSEC_GSS_KRB5 is not set 924# CONFIG_RPCSEC_GSS_KRB5 is not set
971# CONFIG_RPCSEC_GSS_SPKM3 is not set 925# CONFIG_RPCSEC_GSS_SPKM3 is not set
972# CONFIG_SMB_FS is not set 926# CONFIG_SMB_FS is not set
@@ -996,6 +950,7 @@ CONFIG_MSDOS_PARTITION=y
996# CONFIG_SUN_PARTITION is not set 950# CONFIG_SUN_PARTITION is not set
997# CONFIG_KARMA_PARTITION is not set 951# CONFIG_KARMA_PARTITION is not set
998# CONFIG_EFI_PARTITION is not set 952# CONFIG_EFI_PARTITION is not set
953# CONFIG_SYSV68_PARTITION is not set
999 954
1000# 955#
1001# Native Language Support 956# Native Language Support
@@ -1006,6 +961,7 @@ CONFIG_MSDOS_PARTITION=y
1006# Distributed Lock Manager 961# Distributed Lock Manager
1007# 962#
1008# CONFIG_DLM is not set 963# CONFIG_DLM is not set
964# CONFIG_UCC_SLOW is not set
1009 965
1010# 966#
1011# Library routines 967# Library routines
@@ -1013,10 +969,13 @@ CONFIG_MSDOS_PARTITION=y
1013CONFIG_BITREVERSE=y 969CONFIG_BITREVERSE=y
1014# CONFIG_CRC_CCITT is not set 970# CONFIG_CRC_CCITT is not set
1015# CONFIG_CRC16 is not set 971# CONFIG_CRC16 is not set
972# CONFIG_CRC_ITU_T is not set
1016CONFIG_CRC32=y 973CONFIG_CRC32=y
1017# CONFIG_LIBCRC32C is not set 974# CONFIG_LIBCRC32C is not set
1018CONFIG_PLIST=y 975CONFIG_PLIST=y
1019CONFIG_IOMAP_COPY=y 976CONFIG_HAS_IOMEM=y
977CONFIG_HAS_IOPORT=y
978CONFIG_HAS_DMA=y
1020 979
1021# 980#
1022# Instrumentation Support 981# Instrumentation Support
@@ -1033,7 +992,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1033# CONFIG_DEBUG_FS is not set 992# CONFIG_DEBUG_FS is not set
1034# CONFIG_HEADERS_CHECK is not set 993# CONFIG_HEADERS_CHECK is not set
1035# CONFIG_DEBUG_KERNEL is not set 994# CONFIG_DEBUG_KERNEL is not set
1036CONFIG_LOG_BUF_SHIFT=14
1037# CONFIG_DEBUG_BUGVERBOSE is not set 995# CONFIG_DEBUG_BUGVERBOSE is not set
1038# CONFIG_BOOTX_TEXT is not set 996# CONFIG_BOOTX_TEXT is not set
1039# CONFIG_PPC_EARLY_DEBUG is not set 997# CONFIG_PPC_EARLY_DEBUG is not set
diff --git a/arch/powerpc/configs/mpc8272_ads_defconfig b/arch/powerpc/configs/mpc8272_ads_defconfig
index 2af4502508..4a429294e4 100644
--- a/arch/powerpc/configs/mpc8272_ads_defconfig
+++ b/arch/powerpc/configs/mpc8272_ads_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.17-rc5 3# Linux kernel version: 2.6.22-rc7
4# Fri Jul 14 20:36:35 2006 4# Sun Jul 1 23:56:55 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y 11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y 12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
13CONFIG_GENERIC_HWEIGHT=y 14CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_CALIBRATE_DELAY=y 15CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y 16CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -21,25 +22,31 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
21CONFIG_PPC_OF=y 22CONFIG_PPC_OF=y
22# CONFIG_PPC_UDBG_16550 is not set 23# CONFIG_PPC_UDBG_16550 is not set
23# CONFIG_GENERIC_TBSYNC is not set 24# CONFIG_GENERIC_TBSYNC is not set
24# CONFIG_DEFAULT_UIMAGE is not set 25CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y
25 28
26# 29#
27# Processor support 30# Processor support
28# 31#
29# CONFIG_CLASSIC32 is not set 32# CONFIG_CLASSIC32 is not set
30# CONFIG_PPC_52xx is not set
31CONFIG_PPC_82xx=y 33CONFIG_PPC_82xx=y
32# CONFIG_PPC_83xx is not set 34# CONFIG_PPC_83xx is not set
33# CONFIG_PPC_85xx is not set 35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
34# CONFIG_40x is not set 38# CONFIG_40x is not set
35# CONFIG_44x is not set 39# CONFIG_44x is not set
36# CONFIG_8xx is not set
37# CONFIG_E200 is not set 40# CONFIG_E200 is not set
38CONFIG_6xx=y 41CONFIG_6xx=y
39CONFIG_PPC_FPU=y 42CONFIG_PPC_FPU=y
43# CONFIG_PPC_DCR_NATIVE is not set
44# CONFIG_PPC_DCR_MMIO is not set
40CONFIG_PPC_STD_MMU=y 45CONFIG_PPC_STD_MMU=y
41CONFIG_PPC_STD_MMU_32=y 46CONFIG_PPC_STD_MMU_32=y
47# CONFIG_PPC_MM_SLICES is not set
42# CONFIG_SMP is not set 48# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
43 50
44# 51#
45# Code maturity level options 52# Code maturity level options
@@ -55,14 +62,21 @@ CONFIG_LOCALVERSION="powerpc8272"
55CONFIG_LOCALVERSION_AUTO=y 62CONFIG_LOCALVERSION_AUTO=y
56CONFIG_SWAP=y 63CONFIG_SWAP=y
57CONFIG_SYSVIPC=y 64CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set
66CONFIG_SYSVIPC_SYSCTL=y
58# CONFIG_BSD_PROCESS_ACCT is not set 67# CONFIG_BSD_PROCESS_ACCT is not set
59CONFIG_SYSCTL=y 68# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set
60# CONFIG_AUDIT is not set 70# CONFIG_AUDIT is not set
61CONFIG_IKCONFIG=y 71CONFIG_IKCONFIG=y
62CONFIG_IKCONFIG_PROC=y 72CONFIG_IKCONFIG_PROC=y
73CONFIG_LOG_BUF_SHIFT=14
74CONFIG_SYSFS_DEPRECATED=y
63# CONFIG_RELAY is not set 75# CONFIG_RELAY is not set
64CONFIG_INITRAMFS_SOURCE="" 76# CONFIG_BLK_DEV_INITRD is not set
77CONFIG_SYSCTL=y
65CONFIG_EMBEDDED=y 78CONFIG_EMBEDDED=y
79CONFIG_SYSCTL_SYSCALL=y
66CONFIG_KALLSYMS=y 80CONFIG_KALLSYMS=y
67CONFIG_KALLSYMS_ALL=y 81CONFIG_KALLSYMS_ALL=y
68CONFIG_KALLSYMS_EXTRA_PASS=y 82CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -72,12 +86,19 @@ CONFIG_BUG=y
72CONFIG_ELF_CORE=y 86CONFIG_ELF_CORE=y
73CONFIG_BASE_FULL=y 87CONFIG_BASE_FULL=y
74CONFIG_FUTEX=y 88CONFIG_FUTEX=y
89CONFIG_ANON_INODES=y
75CONFIG_EPOLL=y 90CONFIG_EPOLL=y
91CONFIG_SIGNALFD=y
92CONFIG_TIMERFD=y
93CONFIG_EVENTFD=y
76CONFIG_SHMEM=y 94CONFIG_SHMEM=y
95CONFIG_VM_EVENT_COUNTERS=y
77CONFIG_SLAB=y 96CONFIG_SLAB=y
97# CONFIG_SLUB is not set
98# CONFIG_SLOB is not set
99CONFIG_RT_MUTEXES=y
78# CONFIG_TINY_SHMEM is not set 100# CONFIG_TINY_SHMEM is not set
79CONFIG_BASE_SMALL=0 101CONFIG_BASE_SMALL=0
80# CONFIG_SLOB is not set
81 102
82# 103#
83# Loadable module support 104# Loadable module support
@@ -87,6 +108,7 @@ CONFIG_BASE_SMALL=0
87# 108#
88# Block layer 109# Block layer
89# 110#
111CONFIG_BLOCK=y
90# CONFIG_LBD is not set 112# CONFIG_LBD is not set
91# CONFIG_BLK_DEV_IO_TRACE is not set 113# CONFIG_BLK_DEV_IO_TRACE is not set
92# CONFIG_LSF is not set 114# CONFIG_LSF is not set
@@ -103,17 +125,29 @@ CONFIG_DEFAULT_AS=y
103# CONFIG_DEFAULT_CFQ is not set 125# CONFIG_DEFAULT_CFQ is not set
104# CONFIG_DEFAULT_NOOP is not set 126# CONFIG_DEFAULT_NOOP is not set
105CONFIG_DEFAULT_IOSCHED="anticipatory" 127CONFIG_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 128
113# 129#
114# Platform support 130# Platform support
115# 131#
116CONFIG_ADS8272=y 132# CONFIG_PPC_MPC52xx is not set
133# CONFIG_PPC_MPC5200 is not set
134# CONFIG_PPC_CELL is not set
135# CONFIG_PPC_CELL_NATIVE is not set
136CONFIG_MPC82xx_ADS=y
137CONFIG_PQ2ADS=y
138CONFIG_8260=y
139CONFIG_8272=y
140# CONFIG_MPIC is not set
141# CONFIG_MPIC_WEIRD is not set
142# CONFIG_PPC_I8259 is not set
143# CONFIG_PPC_RTAS is not set
144# CONFIG_MMIO_NVRAM is not set
145# CONFIG_PPC_MPC106 is not set
146# CONFIG_PPC_970_NAP is not set
147# CONFIG_PPC_INDIRECT_IO is not set
148# CONFIG_GENERIC_IOMAP is not set
149# CONFIG_CPU_FREQ is not set
150CONFIG_CPM2=y
117 151
118# 152#
119# Kernel options 153# Kernel options
@@ -121,6 +155,7 @@ CONFIG_ADS8272=y
121# CONFIG_HIGHMEM is not set 155# CONFIG_HIGHMEM is not set
122# CONFIG_HZ_100 is not set 156# CONFIG_HZ_100 is not set
123CONFIG_HZ_250=y 157CONFIG_HZ_250=y
158# CONFIG_HZ_300 is not set
124# CONFIG_HZ_1000 is not set 159# CONFIG_HZ_1000 is not set
125CONFIG_HZ=250 160CONFIG_HZ=250
126CONFIG_PREEMPT_NONE=y 161CONFIG_PREEMPT_NONE=y
@@ -128,26 +163,30 @@ CONFIG_PREEMPT_NONE=y
128# CONFIG_PREEMPT is not set 163# CONFIG_PREEMPT is not set
129CONFIG_BINFMT_ELF=y 164CONFIG_BINFMT_ELF=y
130CONFIG_BINFMT_MISC=y 165CONFIG_BINFMT_MISC=y
131# CONFIG_PC_KEYBOARD is not set 166CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
132CONFIG_ARCH_FLATMEM_ENABLE=y 167CONFIG_ARCH_FLATMEM_ENABLE=y
168CONFIG_ARCH_POPULATES_NODE_MAP=y
133CONFIG_FLATMEM=y 169CONFIG_FLATMEM=y
134CONFIG_FLAT_NODE_MEM_MAP=y 170CONFIG_FLAT_NODE_MEM_MAP=y
135# CONFIG_SPARSEMEM_STATIC is not set 171# CONFIG_SPARSEMEM_STATIC is not set
136CONFIG_SPLIT_PTLOCK_CPUS=4 172CONFIG_SPLIT_PTLOCK_CPUS=4
173# CONFIG_RESOURCES_64BIT is not set
174CONFIG_ZONE_DMA_FLAG=1
137CONFIG_PROC_DEVICETREE=y 175CONFIG_PROC_DEVICETREE=y
138# CONFIG_CMDLINE_BOOL is not set 176# CONFIG_CMDLINE_BOOL is not set
139# CONFIG_PM is not set 177# CONFIG_PM is not set
140# CONFIG_SOFTWARE_SUSPEND is not set
141CONFIG_SECCOMP=y 178CONFIG_SECCOMP=y
179# CONFIG_WANT_DEVICE_TREE is not set
142CONFIG_ISA_DMA_API=y 180CONFIG_ISA_DMA_API=y
143 181
144# 182#
145# Bus options 183# Bus options
146# 184#
147# CONFIG_PPC_I8259 is not set 185CONFIG_ZONE_DMA=y
148CONFIG_FSL_SOC=y 186CONFIG_FSL_SOC=y
149# CONFIG_PCI is not set 187# CONFIG_PCI is not set
150# CONFIG_PCI_DOMAINS is not set 188# CONFIG_PCI_DOMAINS is not set
189# CONFIG_ARCH_SUPPORTS_MSI is not set
151 190
152# 191#
153# PCCARD (PCMCIA/CardBus) support 192# PCCARD (PCMCIA/CardBus) support
@@ -155,10 +194,6 @@ CONFIG_FSL_SOC=y
155# CONFIG_PCCARD is not set 194# CONFIG_PCCARD is not set
156 195
157# 196#
158# PCI Hotplug Support
159#
160
161#
162# Advanced setup 197# Advanced setup
163# 198#
164# CONFIG_ADVANCED_OPTIONS is not set 199# CONFIG_ADVANCED_OPTIONS is not set
@@ -180,10 +215,11 @@ CONFIG_NET=y
180# 215#
181# Networking options 216# Networking options
182# 217#
183# CONFIG_NETDEBUG is not set
184CONFIG_PACKET=y 218CONFIG_PACKET=y
185# CONFIG_PACKET_MMAP is not set 219# CONFIG_PACKET_MMAP is not set
186CONFIG_UNIX=y 220CONFIG_UNIX=y
221CONFIG_XFRM=y
222# CONFIG_XFRM_USER is not set
187# CONFIG_NET_KEY is not set 223# CONFIG_NET_KEY is not set
188CONFIG_INET=y 224CONFIG_INET=y
189CONFIG_IP_MULTICAST=y 225CONFIG_IP_MULTICAST=y
@@ -201,15 +237,15 @@ CONFIG_SYN_COOKIES=y
201# CONFIG_INET_ESP is not set 237# CONFIG_INET_ESP is not set
202# CONFIG_INET_IPCOMP is not set 238# CONFIG_INET_IPCOMP is not set
203# CONFIG_INET_XFRM_TUNNEL is not set 239# CONFIG_INET_XFRM_TUNNEL is not set
204# CONFIG_INET_TUNNEL is not set 240CONFIG_INET_TUNNEL=y
241CONFIG_INET_XFRM_MODE_TRANSPORT=y
242CONFIG_INET_XFRM_MODE_TUNNEL=y
243CONFIG_INET_XFRM_MODE_BEET=y
205CONFIG_INET_DIAG=y 244CONFIG_INET_DIAG=y
206CONFIG_INET_TCP_DIAG=y 245CONFIG_INET_TCP_DIAG=y
207# CONFIG_TCP_CONG_ADVANCED is not set 246# CONFIG_TCP_CONG_ADVANCED is not set
208CONFIG_TCP_CONG_BIC=y 247CONFIG_TCP_CONG_CUBIC=y
209 248CONFIG_DEFAULT_TCP_CONG="cubic"
210#
211# IP: Virtual Server Configuration
212#
213# CONFIG_IP_VS is not set 249# CONFIG_IP_VS is not set
214CONFIG_IPV6=y 250CONFIG_IPV6=y
215# CONFIG_IPV6_PRIVACY is not set 251# CONFIG_IPV6_PRIVACY is not set
@@ -219,7 +255,12 @@ CONFIG_IPV6=y
219# CONFIG_INET6_IPCOMP is not set 255# CONFIG_INET6_IPCOMP is not set
220# CONFIG_INET6_XFRM_TUNNEL is not set 256# CONFIG_INET6_XFRM_TUNNEL is not set
221# CONFIG_INET6_TUNNEL is not set 257# CONFIG_INET6_TUNNEL is not set
258CONFIG_INET6_XFRM_MODE_TRANSPORT=y
259CONFIG_INET6_XFRM_MODE_TUNNEL=y
260CONFIG_INET6_XFRM_MODE_BEET=y
261CONFIG_IPV6_SIT=y
222# CONFIG_IPV6_TUNNEL is not set 262# CONFIG_IPV6_TUNNEL is not set
263# CONFIG_NETWORK_SECMARK is not set
223CONFIG_NETFILTER=y 264CONFIG_NETFILTER=y
224# CONFIG_NETFILTER_DEBUG is not set 265# CONFIG_NETFILTER_DEBUG is not set
225 266
@@ -227,13 +268,16 @@ CONFIG_NETFILTER=y
227# Core Netfilter Configuration 268# Core Netfilter Configuration
228# 269#
229# CONFIG_NETFILTER_NETLINK is not set 270# CONFIG_NETFILTER_NETLINK is not set
271# CONFIG_NF_CONNTRACK_ENABLED is not set
272# CONFIG_NF_CONNTRACK is not set
230# CONFIG_NETFILTER_XTABLES is not set 273# CONFIG_NETFILTER_XTABLES is not set
231 274
232# 275#
233# IP: Netfilter Configuration 276# IP: Netfilter Configuration
234# 277#
235# CONFIG_IP_NF_CONNTRACK is not set
236# CONFIG_IP_NF_QUEUE is not set 278# CONFIG_IP_NF_QUEUE is not set
279# CONFIG_IP_NF_IPTABLES is not set
280# CONFIG_IP_NF_ARPTABLES is not set
237# CONFIG_BRIDGE is not set 281# CONFIG_BRIDGE is not set
238# CONFIG_VLAN_8021Q is not set 282# CONFIG_VLAN_8021Q is not set
239# CONFIG_DECNET is not set 283# CONFIG_DECNET is not set
@@ -253,7 +297,14 @@ CONFIG_NETFILTER=y
253# CONFIG_HAMRADIO is not set 297# CONFIG_HAMRADIO is not set
254# CONFIG_IRDA is not set 298# CONFIG_IRDA is not set
255# CONFIG_BT is not set 299# CONFIG_BT is not set
300
301#
302# Wireless
303#
304# CONFIG_CFG80211 is not set
305# CONFIG_WIRELESS_EXT is not set
256# CONFIG_IEEE80211 is not set 306# CONFIG_IEEE80211 is not set
307# CONFIG_RFKILL is not set
257 308
258# 309#
259# Device Drivers 310# Device Drivers
@@ -266,15 +317,13 @@ CONFIG_STANDALONE=y
266CONFIG_PREVENT_FIRMWARE_BUILD=y 317CONFIG_PREVENT_FIRMWARE_BUILD=y
267# CONFIG_FW_LOADER is not set 318# CONFIG_FW_LOADER is not set
268# CONFIG_DEBUG_DRIVER is not set 319# CONFIG_DEBUG_DRIVER is not set
320# CONFIG_DEBUG_DEVRES is not set
321# CONFIG_SYS_HYPERVISOR is not set
269 322
270# 323#
271# Connector - unified userspace <-> kernelspace linker 324# Connector - unified userspace <-> kernelspace linker
272# 325#
273# CONFIG_CONNECTOR is not set 326# CONFIG_CONNECTOR is not set
274
275#
276# Memory Technology Devices (MTD)
277#
278# CONFIG_MTD is not set 327# CONFIG_MTD is not set
279 328
280# 329#
@@ -285,6 +334,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
285# 334#
286# Plug and Play support 335# Plug and Play support
287# 336#
337# CONFIG_PNPACPI is not set
288 338
289# 339#
290# Block devices 340# Block devices
@@ -295,14 +345,15 @@ CONFIG_BLK_DEV_LOOP=y
295# CONFIG_BLK_DEV_CRYPTOLOOP is not set 345# CONFIG_BLK_DEV_CRYPTOLOOP is not set
296# CONFIG_BLK_DEV_NBD is not set 346# CONFIG_BLK_DEV_NBD is not set
297# CONFIG_BLK_DEV_RAM is not set 347# CONFIG_BLK_DEV_RAM is not set
298# CONFIG_BLK_DEV_INITRD is not set
299# CONFIG_CDROM_PKTCDVD is not set 348# CONFIG_CDROM_PKTCDVD is not set
300# CONFIG_ATA_OVER_ETH is not set 349# CONFIG_ATA_OVER_ETH is not set
301 350
302# 351#
303# ATA/ATAPI/MFM/RLL support 352# Misc devices
304# 353#
354# CONFIG_BLINK is not set
305CONFIG_IDE=y 355CONFIG_IDE=y
356CONFIG_IDE_MAX_HWIFS=4
306CONFIG_BLK_DEV_IDE=y 357CONFIG_BLK_DEV_IDE=y
307 358
308# 359#
@@ -314,14 +365,15 @@ CONFIG_BLK_DEV_IDEDISK=y
314# CONFIG_BLK_DEV_IDECD is not set 365# CONFIG_BLK_DEV_IDECD is not set
315# CONFIG_BLK_DEV_IDEFLOPPY is not set 366# CONFIG_BLK_DEV_IDEFLOPPY is not set
316# CONFIG_IDE_TASK_IOCTL is not set 367# CONFIG_IDE_TASK_IOCTL is not set
368CONFIG_IDE_PROC_FS=y
317 369
318# 370#
319# IDE chipset support/bugfixes 371# IDE chipset support/bugfixes
320# 372#
321# CONFIG_IDE_GENERIC is not set 373# CONFIG_IDE_GENERIC is not set
374# CONFIG_IDEPCI_PCIBUS_ORDER is not set
322# CONFIG_IDE_ARM is not set 375# CONFIG_IDE_ARM is not set
323# CONFIG_BLK_DEV_IDEDMA is not set 376# CONFIG_BLK_DEV_IDEDMA is not set
324# CONFIG_IDEDMA_AUTO is not set
325# CONFIG_BLK_DEV_HD is not set 377# CONFIG_BLK_DEV_HD is not set
326 378
327# 379#
@@ -329,29 +381,14 @@ CONFIG_BLK_DEV_IDEDISK=y
329# 381#
330# CONFIG_RAID_ATTRS is not set 382# CONFIG_RAID_ATTRS is not set
331# CONFIG_SCSI is not set 383# CONFIG_SCSI is not set
384# CONFIG_SCSI_NETLINK is not set
385# CONFIG_ATA is not set
332 386
333# 387#
334# Multi-device support (RAID and LVM) 388# Multi-device support (RAID and LVM)
335# 389#
336# CONFIG_MD is not set 390# CONFIG_MD is not set
337 391# CONFIG_MACINTOSH_DRIVERS is not set
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 392
356# 393#
357# Network device support 394# Network device support
@@ -361,10 +398,6 @@ CONFIG_NETDEVICES=y
361# CONFIG_BONDING is not set 398# CONFIG_BONDING is not set
362# CONFIG_EQUALIZER is not set 399# CONFIG_EQUALIZER is not set
363CONFIG_TUN=y 400CONFIG_TUN=y
364
365#
366# PHY device support
367#
368CONFIG_PHYLIB=y 401CONFIG_PHYLIB=y
369 402
370# 403#
@@ -375,6 +408,9 @@ CONFIG_DAVICOM_PHY=y
375# CONFIG_QSEMI_PHY is not set 408# CONFIG_QSEMI_PHY is not set
376# CONFIG_LXT_PHY is not set 409# CONFIG_LXT_PHY is not set
377# CONFIG_CICADA_PHY is not set 410# CONFIG_CICADA_PHY is not set
411# CONFIG_VITESSE_PHY is not set
412# CONFIG_SMSC_PHY is not set
413# CONFIG_BROADCOM_PHY is not set
378# CONFIG_FIXED_PHY is not set 414# CONFIG_FIXED_PHY is not set
379 415
380# 416#
@@ -385,27 +421,14 @@ CONFIG_MII=y
385CONFIG_FS_ENET=y 421CONFIG_FS_ENET=y
386# CONFIG_FS_ENET_HAS_SCC is not set 422# CONFIG_FS_ENET_HAS_SCC is not set
387CONFIG_FS_ENET_HAS_FCC=y 423CONFIG_FS_ENET_HAS_FCC=y
424CONFIG_NETDEV_1000=y
425CONFIG_NETDEV_10000=y
388 426
389# 427#
390# Ethernet (1000 Mbit) 428# Wireless LAN
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# 429#
430# CONFIG_WLAN_PRE80211 is not set
431# CONFIG_WLAN_80211 is not set
409# CONFIG_WAN is not set 432# CONFIG_WAN is not set
410CONFIG_PPP=y 433CONFIG_PPP=y
411# CONFIG_PPP_FILTER is not set 434# CONFIG_PPP_FILTER is not set
@@ -414,6 +437,7 @@ CONFIG_PPP_SYNC_TTY=y
414CONFIG_PPP_DEFLATE=y 437CONFIG_PPP_DEFLATE=y
415# CONFIG_PPP_BSDCOMP is not set 438# CONFIG_PPP_BSDCOMP is not set
416# CONFIG_SLIP is not set 439# CONFIG_SLIP is not set
440CONFIG_SLHC=y
417# CONFIG_NETPOLL is not set 441# CONFIG_NETPOLL is not set
418# CONFIG_NET_POLL_CONTROLLER is not set 442# CONFIG_NET_POLL_CONTROLLER is not set
419 443
@@ -431,6 +455,8 @@ CONFIG_PPP_DEFLATE=y
431# Input device support 455# Input device support
432# 456#
433CONFIG_INPUT=y 457CONFIG_INPUT=y
458# CONFIG_INPUT_FF_MEMLESS is not set
459# CONFIG_INPUT_POLLDEV is not set
434 460
435# 461#
436# Userland interfaces 462# Userland interfaces
@@ -453,11 +479,19 @@ CONFIG_KEYBOARD_ATKBD=y
453# CONFIG_KEYBOARD_LKKBD is not set 479# CONFIG_KEYBOARD_LKKBD is not set
454# CONFIG_KEYBOARD_XTKBD is not set 480# CONFIG_KEYBOARD_XTKBD is not set
455# CONFIG_KEYBOARD_NEWTON is not set 481# CONFIG_KEYBOARD_NEWTON is not set
482# CONFIG_KEYBOARD_STOWAWAY is not set
456CONFIG_INPUT_MOUSE=y 483CONFIG_INPUT_MOUSE=y
457CONFIG_MOUSE_PS2=y 484CONFIG_MOUSE_PS2=y
485CONFIG_MOUSE_PS2_ALPS=y
486CONFIG_MOUSE_PS2_LOGIPS2PP=y
487CONFIG_MOUSE_PS2_SYNAPTICS=y
488CONFIG_MOUSE_PS2_LIFEBOOK=y
489CONFIG_MOUSE_PS2_TRACKPOINT=y
490# CONFIG_MOUSE_PS2_TOUCHKIT is not set
458# CONFIG_MOUSE_SERIAL is not set 491# CONFIG_MOUSE_SERIAL is not set
459# CONFIG_MOUSE_VSXXXAA is not set 492# CONFIG_MOUSE_VSXXXAA is not set
460# CONFIG_INPUT_JOYSTICK is not set 493# CONFIG_INPUT_JOYSTICK is not set
494# CONFIG_INPUT_TABLET is not set
461# CONFIG_INPUT_TOUCHSCREEN is not set 495# CONFIG_INPUT_TOUCHSCREEN is not set
462# CONFIG_INPUT_MISC is not set 496# CONFIG_INPUT_MISC is not set
463 497
@@ -485,6 +519,7 @@ CONFIG_SERIO_LIBPS2=y
485# 519#
486# Non-8250 serial port support 520# Non-8250 serial port support
487# 521#
522# CONFIG_SERIAL_UARTLITE is not set
488CONFIG_SERIAL_CORE=y 523CONFIG_SERIAL_CORE=y
489CONFIG_SERIAL_CORE_CONSOLE=y 524CONFIG_SERIAL_CORE_CONSOLE=y
490CONFIG_SERIAL_CPM=y 525CONFIG_SERIAL_CPM=y
@@ -503,29 +538,16 @@ CONFIG_LEGACY_PTY_COUNT=256
503# IPMI 538# IPMI
504# 539#
505# CONFIG_IPMI_HANDLER is not set 540# CONFIG_IPMI_HANDLER is not set
506
507#
508# Watchdog Cards
509#
510# CONFIG_WATCHDOG is not set 541# CONFIG_WATCHDOG is not set
542CONFIG_HW_RANDOM=y
511# CONFIG_NVRAM is not set 543# CONFIG_NVRAM is not set
512# CONFIG_GEN_RTC is not set 544# CONFIG_GEN_RTC is not set
513# CONFIG_DTLK is not set
514# CONFIG_R3964 is not set 545# 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 546# CONFIG_RAW_DRIVER is not set
521 547
522# 548#
523# TPM devices 549# TPM devices
524# 550#
525
526#
527# I2C support
528#
529# CONFIG_I2C is not set 551# CONFIG_I2C is not set
530 552
531# 553#
@@ -538,32 +560,32 @@ CONFIG_LEGACY_PTY_COUNT=256
538# Dallas's 1-wire bus 560# Dallas's 1-wire bus
539# 561#
540# CONFIG_W1 is not set 562# CONFIG_W1 is not set
541
542#
543# Hardware Monitoring support
544#
545# CONFIG_HWMON is not set 563# CONFIG_HWMON is not set
546# CONFIG_HWMON_VID is not set
547 564
548# 565#
549# Misc devices 566# Multifunction device drivers
550# 567#
568# CONFIG_MFD_SM501 is not set
551 569
552# 570#
553# Multimedia devices 571# Multimedia devices
554# 572#
555# CONFIG_VIDEO_DEV is not set 573# CONFIG_VIDEO_DEV is not set
556CONFIG_VIDEO_V4L2=y 574# CONFIG_DVB_CORE is not set
575CONFIG_DAB=y
557 576
558# 577#
559# Digital Video Broadcasting Devices 578# Graphics support
560# 579#
561# CONFIG_DVB is not set 580# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
562 581
563# 582#
564# Graphics support 583# Display device support
565# 584#
585# CONFIG_DISPLAY_SUPPORT is not set
586# CONFIG_VGASTATE is not set
566# CONFIG_FB is not set 587# CONFIG_FB is not set
588# CONFIG_FB_IBM_GXT4500 is not set
567 589
568# 590#
569# Sound 591# Sound
@@ -571,6 +593,12 @@ CONFIG_VIDEO_V4L2=y
571# CONFIG_SOUND is not set 593# CONFIG_SOUND is not set
572 594
573# 595#
596# HID Devices
597#
598CONFIG_HID=y
599# CONFIG_HID_DEBUG is not set
600
601#
574# USB support 602# USB support
575# 603#
576# CONFIG_USB_ARCH_HAS_HCD is not set 604# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -586,6 +614,7 @@ CONFIG_VIDEO_V4L2=y
586# 614#
587CONFIG_USB_GADGET=y 615CONFIG_USB_GADGET=y
588# CONFIG_USB_GADGET_DEBUG_FILES is not set 616# CONFIG_USB_GADGET_DEBUG_FILES is not set
617# CONFIG_USB_GADGET_FSL_USB2 is not set
589# CONFIG_USB_GADGET_NET2280 is not set 618# CONFIG_USB_GADGET_NET2280 is not set
590# CONFIG_USB_GADGET_PXA2XX is not set 619# CONFIG_USB_GADGET_PXA2XX is not set
591# CONFIG_USB_GADGET_GOKU is not set 620# CONFIG_USB_GADGET_GOKU is not set
@@ -594,10 +623,6 @@ CONFIG_USB_GADGET=y
594# CONFIG_USB_GADGET_AT91 is not set 623# CONFIG_USB_GADGET_AT91 is not set
595# CONFIG_USB_GADGET_DUMMY_HCD is not set 624# CONFIG_USB_GADGET_DUMMY_HCD is not set
596# CONFIG_USB_GADGET_DUALSPEED is not set 625# CONFIG_USB_GADGET_DUALSPEED is not set
597
598#
599# MMC/SD Card support
600#
601# CONFIG_MMC is not set 626# CONFIG_MMC is not set
602 627
603# 628#
@@ -626,6 +651,19 @@ CONFIG_USB_GADGET=y
626# 651#
627 652
628# 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#
629# File systems 667# File systems
630# 668#
631CONFIG_EXT2_FS=y 669CONFIG_EXT2_FS=y
@@ -645,9 +683,12 @@ CONFIG_XFS_FS=y
645# CONFIG_XFS_QUOTA is not set 683# CONFIG_XFS_QUOTA is not set
646# CONFIG_XFS_SECURITY is not set 684# CONFIG_XFS_SECURITY is not set
647# CONFIG_XFS_POSIX_ACL is not set 685# CONFIG_XFS_POSIX_ACL is not set
686# CONFIG_XFS_RT is not set
687# CONFIG_OCFS2_FS is not set
648# CONFIG_MINIX_FS is not set 688# CONFIG_MINIX_FS is not set
649# CONFIG_ROMFS_FS is not set 689# CONFIG_ROMFS_FS is not set
650CONFIG_INOTIFY=y 690CONFIG_INOTIFY=y
691CONFIG_INOTIFY_USER=y
651# CONFIG_QUOTA is not set 692# CONFIG_QUOTA is not set
652CONFIG_DNOTIFY=y 693CONFIG_DNOTIFY=y
653# CONFIG_AUTOFS_FS is not set 694# CONFIG_AUTOFS_FS is not set
@@ -672,8 +713,10 @@ CONFIG_AUTOFS4_FS=y
672# 713#
673CONFIG_PROC_FS=y 714CONFIG_PROC_FS=y
674CONFIG_PROC_KCORE=y 715CONFIG_PROC_KCORE=y
716CONFIG_PROC_SYSCTL=y
675CONFIG_SYSFS=y 717CONFIG_SYSFS=y
676CONFIG_TMPFS=y 718CONFIG_TMPFS=y
719# CONFIG_TMPFS_POSIX_ACL is not set
677# CONFIG_HUGETLB_PAGE is not set 720# CONFIG_HUGETLB_PAGE is not set
678CONFIG_RAMFS=y 721CONFIG_RAMFS=y
679 722
@@ -694,6 +737,7 @@ CONFIG_CRAMFS=y
694CONFIG_NFS_FS=y 737CONFIG_NFS_FS=y
695CONFIG_NFS_V3=y 738CONFIG_NFS_V3=y
696CONFIG_NFS_V3_ACL=y 739CONFIG_NFS_V3_ACL=y
740# CONFIG_NFS_DIRECTIO is not set
697# CONFIG_NFSD is not set 741# CONFIG_NFSD is not set
698CONFIG_ROOT_NFS=y 742CONFIG_ROOT_NFS=y
699CONFIG_LOCKD=y 743CONFIG_LOCKD=y
@@ -727,6 +771,7 @@ CONFIG_MSDOS_PARTITION=y
727# CONFIG_SUN_PARTITION is not set 771# CONFIG_SUN_PARTITION is not set
728# CONFIG_KARMA_PARTITION is not set 772# CONFIG_KARMA_PARTITION is not set
729# CONFIG_EFI_PARTITION is not set 773# CONFIG_EFI_PARTITION is not set
774# CONFIG_SYSV68_PARTITION is not set
730 775
731# 776#
732# Native Language Support 777# Native Language Support
@@ -771,37 +816,55 @@ CONFIG_NLS_ISO8859_1=y
771# CONFIG_NLS_KOI8_R is not set 816# CONFIG_NLS_KOI8_R is not set
772# CONFIG_NLS_KOI8_U is not set 817# CONFIG_NLS_KOI8_U is not set
773CONFIG_NLS_UTF8=y 818CONFIG_NLS_UTF8=y
819# CONFIG_UCC_SLOW is not set
774 820
775# 821#
776# Library routines 822# Library routines
777# 823#
824CONFIG_BITREVERSE=y
778CONFIG_CRC_CCITT=y 825CONFIG_CRC_CCITT=y
779# CONFIG_CRC16 is not set 826# CONFIG_CRC16 is not set
827# CONFIG_CRC_ITU_T is not set
780CONFIG_CRC32=y 828CONFIG_CRC32=y
781# CONFIG_LIBCRC32C is not set 829# CONFIG_LIBCRC32C is not set
782CONFIG_ZLIB_INFLATE=y 830CONFIG_ZLIB_INFLATE=y
783CONFIG_ZLIB_DEFLATE=y 831CONFIG_ZLIB_DEFLATE=y
832CONFIG_PLIST=y
833CONFIG_HAS_IOMEM=y
834CONFIG_HAS_IOPORT=y
835CONFIG_HAS_DMA=y
784 836
785# 837#
786# Kernel hacking 838# Kernel hacking
787# 839#
788# CONFIG_PRINTK_TIME is not set 840# CONFIG_PRINTK_TIME is not set
841CONFIG_ENABLE_MUST_CHECK=y
789# CONFIG_MAGIC_SYSRQ is not set 842# CONFIG_MAGIC_SYSRQ is not set
843# CONFIG_UNUSED_SYMBOLS is not set
844# CONFIG_DEBUG_FS is not set
845# CONFIG_HEADERS_CHECK is not set
790CONFIG_DEBUG_KERNEL=y 846CONFIG_DEBUG_KERNEL=y
791CONFIG_LOG_BUF_SHIFT=14 847# CONFIG_DEBUG_SHIRQ is not set
792CONFIG_DETECT_SOFTLOCKUP=y 848CONFIG_DETECT_SOFTLOCKUP=y
793# CONFIG_SCHEDSTATS is not set 849# CONFIG_SCHEDSTATS is not set
850# CONFIG_TIMER_STATS is not set
794# CONFIG_DEBUG_SLAB is not set 851# CONFIG_DEBUG_SLAB is not set
795# CONFIG_DEBUG_MUTEXES is not set 852# CONFIG_DEBUG_RT_MUTEXES is not set
853# CONFIG_RT_MUTEX_TESTER is not set
796# CONFIG_DEBUG_SPINLOCK is not set 854# CONFIG_DEBUG_SPINLOCK is not set
855# CONFIG_DEBUG_MUTEXES is not set
797# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 856# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
857# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
798# CONFIG_DEBUG_KOBJECT is not set 858# CONFIG_DEBUG_KOBJECT is not set
859# CONFIG_DEBUG_BUGVERBOSE is not set
799CONFIG_DEBUG_INFO=y 860CONFIG_DEBUG_INFO=y
800# CONFIG_DEBUG_FS is not set
801# CONFIG_DEBUG_VM is not set 861# CONFIG_DEBUG_VM is not set
802# CONFIG_UNWIND_INFO is not set 862# CONFIG_DEBUG_LIST is not set
803CONFIG_FORCED_INLINING=y 863CONFIG_FORCED_INLINING=y
804# CONFIG_RCU_TORTURE_TEST is not set 864# CONFIG_FAULT_INJECTION is not set
865# CONFIG_DEBUG_STACKOVERFLOW is not set
866# CONFIG_DEBUG_STACK_USAGE is not set
867# CONFIG_DEBUG_PAGEALLOC is not set
805# CONFIG_DEBUGGER is not set 868# CONFIG_DEBUGGER is not set
806# CONFIG_KGDB_CONSOLE is not set 869# CONFIG_KGDB_CONSOLE is not set
807CONFIG_BDI_SWITCH=y 870CONFIG_BDI_SWITCH=y
@@ -818,6 +881,9 @@ CONFIG_BDI_SWITCH=y
818# Cryptographic options 881# Cryptographic options
819# 882#
820CONFIG_CRYPTO=y 883CONFIG_CRYPTO=y
884CONFIG_CRYPTO_ALGAPI=y
885CONFIG_CRYPTO_BLKCIPHER=y
886CONFIG_CRYPTO_MANAGER=y
821# CONFIG_CRYPTO_HMAC is not set 887# CONFIG_CRYPTO_HMAC is not set
822# CONFIG_CRYPTO_NULL is not set 888# CONFIG_CRYPTO_NULL is not set
823# CONFIG_CRYPTO_MD4 is not set 889# CONFIG_CRYPTO_MD4 is not set
@@ -827,7 +893,12 @@ CONFIG_CRYPTO_MD5=y
827# CONFIG_CRYPTO_SHA512 is not set 893# CONFIG_CRYPTO_SHA512 is not set
828# CONFIG_CRYPTO_WP512 is not set 894# CONFIG_CRYPTO_WP512 is not set
829# CONFIG_CRYPTO_TGR192 is not set 895# CONFIG_CRYPTO_TGR192 is not set
896CONFIG_CRYPTO_ECB=y
897CONFIG_CRYPTO_CBC=y
898CONFIG_CRYPTO_PCBC=y
899# CONFIG_CRYPTO_CRYPTD is not set
830CONFIG_CRYPTO_DES=y 900CONFIG_CRYPTO_DES=y
901# CONFIG_CRYPTO_FCRYPT is not set
831# CONFIG_CRYPTO_BLOWFISH is not set 902# CONFIG_CRYPTO_BLOWFISH is not set
832# CONFIG_CRYPTO_TWOFISH is not set 903# CONFIG_CRYPTO_TWOFISH is not set
833# CONFIG_CRYPTO_SERPENT is not set 904# CONFIG_CRYPTO_SERPENT is not set
@@ -841,7 +912,7 @@ CONFIG_CRYPTO_DES=y
841# CONFIG_CRYPTO_DEFLATE is not set 912# CONFIG_CRYPTO_DEFLATE is not set
842# CONFIG_CRYPTO_MICHAEL_MIC is not set 913# CONFIG_CRYPTO_MICHAEL_MIC is not set
843# CONFIG_CRYPTO_CRC32C is not set 914# CONFIG_CRYPTO_CRC32C is not set
844# CONFIG_CRYPTO_TEST is not set 915# CONFIG_CRYPTO_CAMELLIA is not set
845 916
846# 917#
847# Hardware crypto devices 918# Hardware crypto devices
diff --git a/arch/powerpc/configs/mpc8313_rdb_defconfig b/arch/powerpc/configs/mpc8313_rdb_defconfig
index f87523716c..b7d3dffc98 100644
--- a/arch/powerpc/configs/mpc8313_rdb_defconfig
+++ b/arch/powerpc/configs/mpc8313_rdb_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20 3# Linux kernel version: 2.6.22-rc7
4# Wed Feb 7 22:08:04 2007 4# Sun Jul 1 23:56:55 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_PPC_DCR_MMIO is not set 45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -63,14 +64,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 68# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -83,14 +87,19 @@ CONFIG_BUG=y
83CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
86# CONFIG_EPOLL is not set 91# CONFIG_EPOLL is not set
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 95CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLAB=y
98# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set
90CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94 103
95# 104#
96# Loadable module support 105# Loadable module support
@@ -122,19 +131,33 @@ CONFIG_DEFAULT_AS=y
122# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
123# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
124CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
125CONFIG_PPC_GEN550=y
126# CONFIG_WANT_EARLY_SERIAL is not set
127 134
128# 135#
129# Platform support 136# Platform support
130# 137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
131CONFIG_MPC8313_RDB=y 143CONFIG_MPC8313_RDB=y
132# CONFIG_MPC832x_MDS is not set 144# CONFIG_MPC832x_MDS is not set
133# CONFIG_MPC834x_SYS is not set 145# CONFIG_MPC832x_RDB is not set
146# CONFIG_MPC834x_MDS is not set
134# CONFIG_MPC834x_ITX is not set 147# CONFIG_MPC834x_ITX is not set
135# CONFIG_MPC8360E_PB is not set 148# CONFIG_MPC836x_MDS is not set
136CONFIG_PPC_MPC831x=y 149CONFIG_PPC_MPC831x=y
137# CONFIG_MPIC is not set 150# CONFIG_MPIC is not set
151# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set
153# CONFIG_PPC_RTAS is not set
154# CONFIG_MMIO_NVRAM is not set
155# CONFIG_PPC_MPC106 is not set
156# CONFIG_PPC_970_NAP is not set
157# CONFIG_PPC_INDIRECT_IO is not set
158# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set
160# CONFIG_CPM2 is not set
138 161
139# 162#
140# Kernel options 163# Kernel options
@@ -162,33 +185,34 @@ CONFIG_FLAT_NODE_MEM_MAP=y
162# CONFIG_SPARSEMEM_STATIC is not set 185# CONFIG_SPARSEMEM_STATIC is not set
163CONFIG_SPLIT_PTLOCK_CPUS=4 186CONFIG_SPLIT_PTLOCK_CPUS=4
164# CONFIG_RESOURCES_64BIT is not set 187# CONFIG_RESOURCES_64BIT is not set
188CONFIG_ZONE_DMA_FLAG=1
165CONFIG_PROC_DEVICETREE=y 189CONFIG_PROC_DEVICETREE=y
166# CONFIG_CMDLINE_BOOL is not set 190# CONFIG_CMDLINE_BOOL is not set
167# CONFIG_PM is not set 191# CONFIG_PM is not set
168CONFIG_SECCOMP=y 192CONFIG_SECCOMP=y
193CONFIG_WANT_DEVICE_TREE=y
194CONFIG_DEVICE_TREE=""
169CONFIG_ISA_DMA_API=y 195CONFIG_ISA_DMA_API=y
170 196
171# 197#
172# Bus options 198# Bus options
173# 199#
200CONFIG_ZONE_DMA=y
174CONFIG_GENERIC_ISA_DMA=y 201CONFIG_GENERIC_ISA_DMA=y
175# CONFIG_MPIC_WEIRD is not set
176# CONFIG_PPC_I8259 is not set
177CONFIG_PPC_INDIRECT_PCI=y 202CONFIG_PPC_INDIRECT_PCI=y
203# CONFIG_PPC_INDIRECT_PCI_BE is not set
178CONFIG_FSL_SOC=y 204CONFIG_FSL_SOC=y
179CONFIG_PCI=y 205CONFIG_PCI=y
180CONFIG_PCI_DOMAINS=y 206CONFIG_PCI_DOMAINS=y
181# CONFIG_PCIEPORTBUS is not set 207# CONFIG_PCIEPORTBUS is not set
208CONFIG_ARCH_SUPPORTS_MSI=y
209# CONFIG_PCI_MSI is not set
182# CONFIG_PCI_DEBUG is not set 210# CONFIG_PCI_DEBUG is not set
183 211
184# 212#
185# PCCARD (PCMCIA/CardBus) support 213# PCCARD (PCMCIA/CardBus) support
186# 214#
187# CONFIG_PCCARD is not set 215# CONFIG_PCCARD is not set
188
189#
190# PCI Hotplug Support
191#
192# CONFIG_HOTPLUG_PCI is not set 216# CONFIG_HOTPLUG_PCI is not set
193 217
194# 218#
@@ -213,13 +237,13 @@ CONFIG_NET=y
213# 237#
214# Networking options 238# Networking options
215# 239#
216# CONFIG_NETDEBUG is not set
217CONFIG_PACKET=y 240CONFIG_PACKET=y
218# CONFIG_PACKET_MMAP is not set 241# CONFIG_PACKET_MMAP is not set
219CONFIG_UNIX=y 242CONFIG_UNIX=y
220CONFIG_XFRM=y 243CONFIG_XFRM=y
221# CONFIG_XFRM_USER is not set 244# CONFIG_XFRM_USER is not set
222# CONFIG_XFRM_SUB_POLICY is not set 245# CONFIG_XFRM_SUB_POLICY is not set
246# CONFIG_XFRM_MIGRATE is not set
223# CONFIG_NET_KEY is not set 247# CONFIG_NET_KEY is not set
224CONFIG_INET=y 248CONFIG_INET=y
225CONFIG_IP_MULTICAST=y 249CONFIG_IP_MULTICAST=y
@@ -253,20 +277,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
253# CONFIG_INET6_TUNNEL is not set 277# CONFIG_INET6_TUNNEL is not set
254# CONFIG_NETWORK_SECMARK is not set 278# CONFIG_NETWORK_SECMARK is not set
255# CONFIG_NETFILTER is not set 279# CONFIG_NETFILTER is not set
256
257#
258# DCCP Configuration (EXPERIMENTAL)
259#
260# CONFIG_IP_DCCP is not set 280# CONFIG_IP_DCCP is not set
261
262#
263# SCTP Configuration (EXPERIMENTAL)
264#
265# CONFIG_IP_SCTP is not set 281# CONFIG_IP_SCTP is not set
266
267#
268# TIPC Configuration (EXPERIMENTAL)
269#
270# CONFIG_TIPC is not set 282# CONFIG_TIPC is not set
271# CONFIG_ATM is not set 283# CONFIG_ATM is not set
272# CONFIG_BRIDGE is not set 284# CONFIG_BRIDGE is not set
@@ -292,7 +304,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
292# CONFIG_HAMRADIO is not set 304# CONFIG_HAMRADIO is not set
293# CONFIG_IRDA is not set 305# CONFIG_IRDA is not set
294# CONFIG_BT is not set 306# CONFIG_BT is not set
307# CONFIG_AF_RXRPC is not set
308
309#
310# Wireless
311#
312# CONFIG_CFG80211 is not set
313# CONFIG_WIRELESS_EXT is not set
314# CONFIG_MAC80211 is not set
295# CONFIG_IEEE80211 is not set 315# CONFIG_IEEE80211 is not set
316# CONFIG_RFKILL is not set
296 317
297# 318#
298# Device Drivers 319# Device Drivers
@@ -305,16 +326,13 @@ CONFIG_STANDALONE=y
305CONFIG_PREVENT_FIRMWARE_BUILD=y 326CONFIG_PREVENT_FIRMWARE_BUILD=y
306# CONFIG_FW_LOADER is not set 327# CONFIG_FW_LOADER is not set
307# CONFIG_DEBUG_DRIVER is not set 328# CONFIG_DEBUG_DRIVER is not set
329# CONFIG_DEBUG_DEVRES is not set
308# CONFIG_SYS_HYPERVISOR is not set 330# CONFIG_SYS_HYPERVISOR is not set
309 331
310# 332#
311# Connector - unified userspace <-> kernelspace linker 333# Connector - unified userspace <-> kernelspace linker
312# 334#
313# CONFIG_CONNECTOR is not set 335# CONFIG_CONNECTOR is not set
314
315#
316# Memory Technology Devices (MTD)
317#
318CONFIG_MTD=y 336CONFIG_MTD=y
319# CONFIG_MTD_DEBUG is not set 337# CONFIG_MTD_DEBUG is not set
320# CONFIG_MTD_CONCAT is not set 338# CONFIG_MTD_CONCAT is not set
@@ -357,7 +375,6 @@ CONFIG_MTD_CFI_UTIL=y
357# CONFIG_MTD_RAM is not set 375# CONFIG_MTD_RAM is not set
358# CONFIG_MTD_ROM is not set 376# CONFIG_MTD_ROM is not set
359# CONFIG_MTD_ABSENT is not set 377# CONFIG_MTD_ABSENT is not set
360# CONFIG_MTD_OBSOLETE_CHIPS is not set
361 378
362# 379#
363# Mapping drivers for chip access 380# Mapping drivers for chip access
@@ -387,17 +404,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
387# CONFIG_MTD_DOC2000 is not set 404# CONFIG_MTD_DOC2000 is not set
388# CONFIG_MTD_DOC2001 is not set 405# CONFIG_MTD_DOC2001 is not set
389# CONFIG_MTD_DOC2001PLUS is not set 406# CONFIG_MTD_DOC2001PLUS is not set
390
391#
392# NAND Flash Device Drivers
393#
394# CONFIG_MTD_NAND is not set 407# CONFIG_MTD_NAND is not set
395# CONFIG_MTD_NAND_CAFE is not set 408# CONFIG_MTD_ONENAND is not set
396 409
397# 410#
398# OneNAND Flash Device Drivers 411# UBI - Unsorted block images
399# 412#
400# CONFIG_MTD_ONENAND is not set 413# CONFIG_MTD_UBI is not set
401 414
402# 415#
403# Parallel port support 416# Parallel port support
@@ -407,6 +420,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
407# 420#
408# Plug and Play support 421# Plug and Play support
409# 422#
423# CONFIG_PNPACPI is not set
410 424
411# 425#
412# Block devices 426# Block devices
@@ -426,19 +440,16 @@ CONFIG_BLK_DEV_RAM=y
426CONFIG_BLK_DEV_RAM_COUNT=16 440CONFIG_BLK_DEV_RAM_COUNT=16
427CONFIG_BLK_DEV_RAM_SIZE=32768 441CONFIG_BLK_DEV_RAM_SIZE=32768
428CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 442CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
429CONFIG_BLK_DEV_INITRD=y
430# CONFIG_CDROM_PKTCDVD is not set 443# CONFIG_CDROM_PKTCDVD is not set
431# CONFIG_ATA_OVER_ETH is not set 444# CONFIG_ATA_OVER_ETH is not set
432 445
433# 446#
434# Misc devices 447# Misc devices
435# 448#
449# CONFIG_PHANTOM is not set
436# CONFIG_SGI_IOC4 is not set 450# CONFIG_SGI_IOC4 is not set
437# CONFIG_TIFM_CORE is not set 451# CONFIG_TIFM_CORE is not set
438 452# CONFIG_BLINK is not set
439#
440# ATA/ATAPI/MFM/RLL support
441#
442# CONFIG_IDE is not set 453# CONFIG_IDE is not set
443 454
444# 455#
@@ -467,6 +478,7 @@ CONFIG_CHR_DEV_SG=y
467# CONFIG_SCSI_CONSTANTS is not set 478# CONFIG_SCSI_CONSTANTS is not set
468# CONFIG_SCSI_LOGGING is not set 479# CONFIG_SCSI_LOGGING is not set
469# CONFIG_SCSI_SCAN_ASYNC is not set 480# CONFIG_SCSI_SCAN_ASYNC is not set
481CONFIG_SCSI_WAIT_SCAN=m
470 482
471# 483#
472# SCSI Transports 484# SCSI Transports
@@ -514,10 +526,6 @@ CONFIG_SCSI_SPI_ATTRS=y
514# CONFIG_SCSI_NSP32 is not set 526# CONFIG_SCSI_NSP32 is not set
515# CONFIG_SCSI_DEBUG is not set 527# CONFIG_SCSI_DEBUG is not set
516# CONFIG_SCSI_SRP is not set 528# CONFIG_SCSI_SRP is not set
517
518#
519# Serial ATA (prod) and Parallel ATA (experimental) drivers
520#
521# CONFIG_ATA is not set 529# CONFIG_ATA is not set
522 530
523# 531#
@@ -545,18 +553,14 @@ CONFIG_MD_RAID1=y
545# 553#
546# IEEE 1394 (FireWire) support 554# IEEE 1394 (FireWire) support
547# 555#
556# CONFIG_FIREWIRE is not set
548# CONFIG_IEEE1394 is not set 557# CONFIG_IEEE1394 is not set
549 558
550# 559#
551# I2O device support 560# I2O device support
552# 561#
553# CONFIG_I2O is not set 562# CONFIG_I2O is not set
554 563# CONFIG_MACINTOSH_DRIVERS is not set
555#
556# Macintosh device drivers
557#
558# CONFIG_MAC_EMUMOUSEBTN is not set
559# CONFIG_WINDFARM is not set
560 564
561# 565#
562# Network device support 566# Network device support
@@ -566,15 +570,7 @@ CONFIG_NETDEVICES=y
566# CONFIG_BONDING is not set 570# CONFIG_BONDING is not set
567# CONFIG_EQUALIZER is not set 571# CONFIG_EQUALIZER is not set
568# CONFIG_TUN is not set 572# CONFIG_TUN is not set
569
570#
571# ARCnet devices
572#
573# CONFIG_ARCNET is not set 573# CONFIG_ARCNET is not set
574
575#
576# PHY device support
577#
578CONFIG_PHYLIB=y 574CONFIG_PHYLIB=y
579 575
580# 576#
@@ -624,10 +620,8 @@ CONFIG_E100=y
624# CONFIG_SUNDANCE is not set 620# CONFIG_SUNDANCE is not set
625# CONFIG_TLAN is not set 621# CONFIG_TLAN is not set
626# CONFIG_VIA_RHINE is not set 622# CONFIG_VIA_RHINE is not set
627 623# CONFIG_SC92031 is not set
628# 624CONFIG_NETDEV_1000=y
629# Ethernet (1000 Mbit)
630#
631# CONFIG_ACENIC is not set 625# CONFIG_ACENIC is not set
632# CONFIG_DL2K is not set 626# CONFIG_DL2K is not set
633# CONFIG_E1000 is not set 627# CONFIG_E1000 is not set
@@ -645,29 +639,32 @@ CONFIG_E100=y
645CONFIG_GIANFAR=y 639CONFIG_GIANFAR=y
646CONFIG_GFAR_NAPI=y 640CONFIG_GFAR_NAPI=y
647# CONFIG_QLA3XXX is not set 641# CONFIG_QLA3XXX is not set
648 642# CONFIG_ATL1 is not set
649# 643CONFIG_NETDEV_10000=y
650# Ethernet (10000 Mbit)
651#
652# CONFIG_CHELSIO_T1 is not set 644# CONFIG_CHELSIO_T1 is not set
645# CONFIG_CHELSIO_T3 is not set
653# CONFIG_IXGB is not set 646# CONFIG_IXGB is not set
654# CONFIG_S2IO is not set 647# CONFIG_S2IO is not set
655# CONFIG_MYRI10GE is not set 648# CONFIG_MYRI10GE is not set
656# CONFIG_NETXEN_NIC is not set 649# CONFIG_NETXEN_NIC is not set
657 650# CONFIG_MLX4_CORE is not set
658#
659# Token Ring devices
660#
661# CONFIG_TR is not set 651# CONFIG_TR is not set
662 652
663# 653#
664# Wireless LAN (non-hamradio) 654# Wireless LAN
665# 655#
666# CONFIG_NET_RADIO is not set 656# CONFIG_WLAN_PRE80211 is not set
657# CONFIG_WLAN_80211 is not set
667 658
668# 659#
669# Wan interfaces 660# USB Network Adapters
670# 661#
662# CONFIG_USB_CATC is not set
663# CONFIG_USB_KAWETH is not set
664# CONFIG_USB_PEGASUS is not set
665# CONFIG_USB_RTL8150 is not set
666# CONFIG_USB_USBNET_MII is not set
667# CONFIG_USB_USBNET is not set
671# CONFIG_WAN is not set 668# CONFIG_WAN is not set
672# CONFIG_FDDI is not set 669# CONFIG_FDDI is not set
673# CONFIG_HIPPI is not set 670# CONFIG_HIPPI is not set
@@ -694,6 +691,7 @@ CONFIG_GFAR_NAPI=y
694# 691#
695CONFIG_INPUT=y 692CONFIG_INPUT=y
696# CONFIG_INPUT_FF_MEMLESS is not set 693# CONFIG_INPUT_FF_MEMLESS is not set
694# CONFIG_INPUT_POLLDEV is not set
697 695
698# 696#
699# Userland interfaces 697# Userland interfaces
@@ -710,6 +708,7 @@ CONFIG_INPUT=y
710# CONFIG_INPUT_KEYBOARD is not set 708# CONFIG_INPUT_KEYBOARD is not set
711# CONFIG_INPUT_MOUSE is not set 709# CONFIG_INPUT_MOUSE is not set
712# CONFIG_INPUT_JOYSTICK is not set 710# CONFIG_INPUT_JOYSTICK is not set
711# CONFIG_INPUT_TABLET is not set
713# CONFIG_INPUT_TOUCHSCREEN is not set 712# CONFIG_INPUT_TOUCHSCREEN is not set
714# CONFIG_INPUT_MISC is not set 713# CONFIG_INPUT_MISC is not set
715 714
@@ -742,6 +741,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
742CONFIG_SERIAL_CORE=y 741CONFIG_SERIAL_CORE=y
743CONFIG_SERIAL_CORE_CONSOLE=y 742CONFIG_SERIAL_CORE_CONSOLE=y
744# CONFIG_SERIAL_JSM is not set 743# CONFIG_SERIAL_JSM is not set
744# CONFIG_SERIAL_OF_PLATFORM is not set
745CONFIG_UNIX98_PTYS=y 745CONFIG_UNIX98_PTYS=y
746CONFIG_LEGACY_PTYS=y 746CONFIG_LEGACY_PTYS=y
747CONFIG_LEGACY_PTY_COUNT=256 747CONFIG_LEGACY_PTY_COUNT=256
@@ -750,10 +750,6 @@ CONFIG_LEGACY_PTY_COUNT=256
750# IPMI 750# IPMI
751# 751#
752# CONFIG_IPMI_HANDLER is not set 752# CONFIG_IPMI_HANDLER is not set
753
754#
755# Watchdog Cards
756#
757CONFIG_WATCHDOG=y 753CONFIG_WATCHDOG=y
758# CONFIG_WATCHDOG_NOWAYOUT is not set 754# CONFIG_WATCHDOG_NOWAYOUT is not set
759 755
@@ -776,7 +772,6 @@ CONFIG_83xx_WDT=y
776CONFIG_HW_RANDOM=y 772CONFIG_HW_RANDOM=y
777# CONFIG_NVRAM is not set 773# CONFIG_NVRAM is not set
778# CONFIG_GEN_RTC is not set 774# CONFIG_GEN_RTC is not set
779# CONFIG_DTLK is not set
780# CONFIG_R3964 is not set 775# CONFIG_R3964 is not set
781# CONFIG_APPLICOM is not set 776# CONFIG_APPLICOM is not set
782# CONFIG_AGP is not set 777# CONFIG_AGP is not set
@@ -787,11 +782,9 @@ CONFIG_HW_RANDOM=y
787# TPM devices 782# TPM devices
788# 783#
789# CONFIG_TCG_TPM is not set 784# CONFIG_TCG_TPM is not set
790 785CONFIG_DEVPORT=y
791#
792# I2C support
793#
794CONFIG_I2C=y 786CONFIG_I2C=y
787CONFIG_I2C_BOARDINFO=y
795CONFIG_I2C_CHARDEV=y 788CONFIG_I2C_CHARDEV=y
796 789
797# 790#
@@ -818,14 +811,15 @@ CONFIG_I2C_MPC=y
818# CONFIG_I2C_PARPORT_LIGHT is not set 811# CONFIG_I2C_PARPORT_LIGHT is not set
819# CONFIG_I2C_PROSAVAGE is not set 812# CONFIG_I2C_PROSAVAGE is not set
820# CONFIG_I2C_SAVAGE4 is not set 813# CONFIG_I2C_SAVAGE4 is not set
814# CONFIG_I2C_SIMTEC is not set
821# CONFIG_I2C_SIS5595 is not set 815# CONFIG_I2C_SIS5595 is not set
822# CONFIG_I2C_SIS630 is not set 816# CONFIG_I2C_SIS630 is not set
823# CONFIG_I2C_SIS96X is not set 817# CONFIG_I2C_SIS96X is not set
824# CONFIG_I2C_STUB is not set 818# CONFIG_I2C_STUB is not set
819# CONFIG_I2C_TINY_USB is not set
825# CONFIG_I2C_VIA is not set 820# CONFIG_I2C_VIA is not set
826# CONFIG_I2C_VIAPRO is not set 821# CONFIG_I2C_VIAPRO is not set
827# CONFIG_I2C_VOODOO3 is not set 822# CONFIG_I2C_VOODOO3 is not set
828# CONFIG_I2C_PCA_ISA is not set
829 823
830# 824#
831# Miscellaneous I2C Chip support 825# Miscellaneous I2C Chip support
@@ -859,21 +853,21 @@ CONFIG_SPI_MPC83xx=y
859# 853#
860# SPI Protocol Masters 854# SPI Protocol Masters
861# 855#
856# CONFIG_SPI_AT25 is not set
857# CONFIG_SPI_SPIDEV is not set
862 858
863# 859#
864# Dallas's 1-wire bus 860# Dallas's 1-wire bus
865# 861#
866# CONFIG_W1 is not set 862# CONFIG_W1 is not set
867
868#
869# Hardware Monitoring support
870#
871CONFIG_HWMON=y 863CONFIG_HWMON=y
872# CONFIG_HWMON_VID is not set 864# CONFIG_HWMON_VID is not set
873# CONFIG_SENSORS_ABITUGURU is not set 865# CONFIG_SENSORS_ABITUGURU is not set
866# CONFIG_SENSORS_AD7418 is not set
874# CONFIG_SENSORS_ADM1021 is not set 867# CONFIG_SENSORS_ADM1021 is not set
875# CONFIG_SENSORS_ADM1025 is not set 868# CONFIG_SENSORS_ADM1025 is not set
876# CONFIG_SENSORS_ADM1026 is not set 869# CONFIG_SENSORS_ADM1026 is not set
870# CONFIG_SENSORS_ADM1029 is not set
877# CONFIG_SENSORS_ADM1031 is not set 871# CONFIG_SENSORS_ADM1031 is not set
878# CONFIG_SENSORS_ADM9240 is not set 872# CONFIG_SENSORS_ADM9240 is not set
879# CONFIG_SENSORS_ASB100 is not set 873# CONFIG_SENSORS_ASB100 is not set
@@ -897,6 +891,7 @@ CONFIG_HWMON=y
897# CONFIG_SENSORS_LM90 is not set 891# CONFIG_SENSORS_LM90 is not set
898# CONFIG_SENSORS_LM92 is not set 892# CONFIG_SENSORS_LM92 is not set
899# CONFIG_SENSORS_MAX1619 is not set 893# CONFIG_SENSORS_MAX1619 is not set
894# CONFIG_SENSORS_MAX6650 is not set
900# CONFIG_SENSORS_PC87360 is not set 895# CONFIG_SENSORS_PC87360 is not set
901# CONFIG_SENSORS_PC87427 is not set 896# CONFIG_SENSORS_PC87427 is not set
902# CONFIG_SENSORS_SIS5595 is not set 897# CONFIG_SENSORS_SIS5595 is not set
@@ -916,23 +911,30 @@ CONFIG_HWMON=y
916# CONFIG_HWMON_DEBUG_CHIP is not set 911# CONFIG_HWMON_DEBUG_CHIP is not set
917 912
918# 913#
919# Multimedia devices 914# Multifunction device drivers
920# 915#
921# CONFIG_VIDEO_DEV is not set 916# CONFIG_MFD_SM501 is not set
922 917
923# 918#
924# Digital Video Broadcasting Devices 919# Multimedia devices
925# 920#
926# CONFIG_DVB is not set 921# CONFIG_VIDEO_DEV is not set
922# CONFIG_DVB_CORE is not set
923CONFIG_DAB=y
927# CONFIG_USB_DABUSB is not set 924# CONFIG_USB_DABUSB is not set
928 925
929# 926#
930# Graphics support 927# Graphics support
931# 928#
932CONFIG_FIRMWARE_EDID=y 929# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
930
931#
932# Display device support
933#
934# CONFIG_DISPLAY_SUPPORT is not set
935# CONFIG_VGASTATE is not set
933# CONFIG_FB is not set 936# CONFIG_FB is not set
934# CONFIG_FB_IBM_GXT4500 is not set 937# CONFIG_FB_IBM_GXT4500 is not set
935# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
936 938
937# 939#
938# Sound 940# Sound
@@ -943,6 +945,18 @@ CONFIG_FIRMWARE_EDID=y
943# HID Devices 945# HID Devices
944# 946#
945CONFIG_HID=y 947CONFIG_HID=y
948# CONFIG_HID_DEBUG is not set
949
950#
951# USB Input Devices
952#
953# CONFIG_USB_HID is not set
954
955#
956# USB HID Boot Protocol drivers
957#
958# CONFIG_USB_KBD is not set
959# CONFIG_USB_MOUSE is not set
946 960
947# 961#
948# USB support 962# USB support
@@ -957,7 +971,7 @@ CONFIG_USB=y
957# Miscellaneous USB options 971# Miscellaneous USB options
958# 972#
959CONFIG_USB_DEVICEFS=y 973CONFIG_USB_DEVICEFS=y
960# CONFIG_USB_BANDWIDTH is not set 974CONFIG_USB_DEVICE_CLASS=y
961# CONFIG_USB_DYNAMIC_MINORS is not set 975# CONFIG_USB_DYNAMIC_MINORS is not set
962# CONFIG_USB_OTG is not set 976# CONFIG_USB_OTG is not set
963 977
@@ -968,9 +982,15 @@ CONFIG_USB_EHCI_HCD=y
968# CONFIG_USB_EHCI_SPLIT_ISO is not set 982# CONFIG_USB_EHCI_SPLIT_ISO is not set
969# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 983# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
970# CONFIG_USB_EHCI_TT_NEWSCHED is not set 984# CONFIG_USB_EHCI_TT_NEWSCHED is not set
985# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
971# CONFIG_USB_ISP116X_HCD is not set 986# CONFIG_USB_ISP116X_HCD is not set
972CONFIG_USB_OHCI_HCD=y 987CONFIG_USB_OHCI_HCD=y
973# CONFIG_USB_OHCI_BIG_ENDIAN is not set 988CONFIG_USB_OHCI_HCD_PPC_OF=y
989CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
990# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
991CONFIG_USB_OHCI_HCD_PCI=y
992CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
993CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
974CONFIG_USB_OHCI_LITTLE_ENDIAN=y 994CONFIG_USB_OHCI_LITTLE_ENDIAN=y
975CONFIG_USB_UHCI_HCD=y 995CONFIG_USB_UHCI_HCD=y
976# CONFIG_USB_SL811_HCD is not set 996# CONFIG_USB_SL811_HCD is not set
@@ -1002,43 +1022,10 @@ CONFIG_USB_STORAGE=y
1002# CONFIG_USB_LIBUSUAL is not set 1022# CONFIG_USB_LIBUSUAL is not set
1003 1023
1004# 1024#
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 1025# USB Imaging devices
1029# 1026#
1030# CONFIG_USB_MDC800 is not set 1027# CONFIG_USB_MDC800 is not set
1031# CONFIG_USB_MICROTEK is not set 1028# 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 1029CONFIG_USB_MON=y
1043 1030
1044# 1031#
@@ -1060,6 +1047,7 @@ CONFIG_USB_MON=y
1060# CONFIG_USB_RIO500 is not set 1047# CONFIG_USB_RIO500 is not set
1061# CONFIG_USB_LEGOTOWER is not set 1048# CONFIG_USB_LEGOTOWER is not set
1062# CONFIG_USB_LCD is not set 1049# CONFIG_USB_LCD is not set
1050# CONFIG_USB_BERRY_CHARGE is not set
1063# CONFIG_USB_LED is not set 1051# CONFIG_USB_LED is not set
1064# CONFIG_USB_CYPRESS_CY7C63 is not set 1052# CONFIG_USB_CYPRESS_CY7C63 is not set
1065# CONFIG_USB_CYTHERM is not set 1053# CONFIG_USB_CYTHERM is not set
@@ -1070,6 +1058,7 @@ CONFIG_USB_MON=y
1070# CONFIG_USB_SISUSBVGA is not set 1058# CONFIG_USB_SISUSBVGA is not set
1071# CONFIG_USB_LD is not set 1059# CONFIG_USB_LD is not set
1072# CONFIG_USB_TRANCEVIBRATOR is not set 1060# CONFIG_USB_TRANCEVIBRATOR is not set
1061# CONFIG_USB_IOWARRIOR is not set
1073# CONFIG_USB_TEST is not set 1062# CONFIG_USB_TEST is not set
1074 1063
1075# 1064#
@@ -1082,6 +1071,7 @@ CONFIG_USB_MON=y
1082CONFIG_USB_GADGET=y 1071CONFIG_USB_GADGET=y
1083# CONFIG_USB_GADGET_DEBUG_FILES is not set 1072# CONFIG_USB_GADGET_DEBUG_FILES is not set
1084CONFIG_USB_GADGET_SELECTED=y 1073CONFIG_USB_GADGET_SELECTED=y
1074# CONFIG_USB_GADGET_FSL_USB2 is not set
1085CONFIG_USB_GADGET_NET2280=y 1075CONFIG_USB_GADGET_NET2280=y
1086CONFIG_USB_NET2280=y 1076CONFIG_USB_NET2280=y
1087# CONFIG_USB_GADGET_PXA2XX is not set 1077# CONFIG_USB_GADGET_PXA2XX is not set
@@ -1098,10 +1088,6 @@ CONFIG_USB_ETH_RNDIS=y
1098# CONFIG_USB_FILE_STORAGE is not set 1088# CONFIG_USB_FILE_STORAGE is not set
1099# CONFIG_USB_G_SERIAL is not set 1089# CONFIG_USB_G_SERIAL is not set
1100# CONFIG_USB_MIDI_GADGET is not set 1090# CONFIG_USB_MIDI_GADGET is not set
1101
1102#
1103# MMC/SD Card support
1104#
1105# CONFIG_MMC is not set 1091# CONFIG_MMC is not set
1106 1092
1107# 1093#
@@ -1142,26 +1128,39 @@ CONFIG_RTC_INTF_SYSFS=y
1142CONFIG_RTC_INTF_PROC=y 1128CONFIG_RTC_INTF_PROC=y
1143CONFIG_RTC_INTF_DEV=y 1129CONFIG_RTC_INTF_DEV=y
1144CONFIG_RTC_INTF_DEV_UIE_EMUL=y 1130CONFIG_RTC_INTF_DEV_UIE_EMUL=y
1131# CONFIG_RTC_DRV_TEST is not set
1145 1132
1146# 1133#
1147# RTC drivers 1134# I2C RTC drivers
1148# 1135#
1149# CONFIG_RTC_DRV_X1205 is not set
1150CONFIG_RTC_DRV_DS1307=y 1136CONFIG_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 1137# CONFIG_RTC_DRV_DS1672 is not set
1154# CONFIG_RTC_DRV_DS1742 is not set 1138# CONFIG_RTC_DRV_MAX6900 is not set
1139# CONFIG_RTC_DRV_RS5C372 is not set
1140# CONFIG_RTC_DRV_ISL1208 is not set
1141# CONFIG_RTC_DRV_X1205 is not set
1155# CONFIG_RTC_DRV_PCF8563 is not set 1142# CONFIG_RTC_DRV_PCF8563 is not set
1156# CONFIG_RTC_DRV_PCF8583 is not set 1143# CONFIG_RTC_DRV_PCF8583 is not set
1144
1145#
1146# SPI RTC drivers
1147#
1157# CONFIG_RTC_DRV_RS5C348 is not set 1148# 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 1149# CONFIG_RTC_DRV_MAX6902 is not set
1150
1151#
1152# Platform RTC drivers
1153#
1154# CONFIG_RTC_DRV_DS1553 is not set
1155# CONFIG_RTC_DRV_DS1742 is not set
1156# CONFIG_RTC_DRV_M48T86 is not set
1162# CONFIG_RTC_DRV_V3020 is not set 1157# CONFIG_RTC_DRV_V3020 is not set
1163 1158
1164# 1159#
1160# on-CPU RTC drivers
1161#
1162
1163#
1165# DMA Engine support 1164# DMA Engine support
1166# 1165#
1167CONFIG_DMA_ENGINE=y 1166CONFIG_DMA_ENGINE=y
@@ -1177,10 +1176,6 @@ CONFIG_NET_DMA=y
1177CONFIG_INTEL_IOATDMA=y 1176CONFIG_INTEL_IOATDMA=y
1178 1177
1179# 1178#
1180# Virtualization
1181#
1182
1183#
1184# File systems 1179# File systems
1185# 1180#
1186CONFIG_EXT2_FS=y 1181CONFIG_EXT2_FS=y
@@ -1269,6 +1264,7 @@ CONFIG_LOCKD_V4=y
1269CONFIG_NFS_COMMON=y 1264CONFIG_NFS_COMMON=y
1270CONFIG_SUNRPC=y 1265CONFIG_SUNRPC=y
1271CONFIG_SUNRPC_GSS=y 1266CONFIG_SUNRPC_GSS=y
1267# CONFIG_SUNRPC_BIND34 is not set
1272CONFIG_RPCSEC_GSS_KRB5=y 1268CONFIG_RPCSEC_GSS_KRB5=y
1273# CONFIG_RPCSEC_GSS_SPKM3 is not set 1269# CONFIG_RPCSEC_GSS_SPKM3 is not set
1274# CONFIG_SMB_FS is not set 1270# CONFIG_SMB_FS is not set
@@ -1298,6 +1294,7 @@ CONFIG_MSDOS_PARTITION=y
1298# CONFIG_SUN_PARTITION is not set 1294# CONFIG_SUN_PARTITION is not set
1299# CONFIG_KARMA_PARTITION is not set 1295# CONFIG_KARMA_PARTITION is not set
1300# CONFIG_EFI_PARTITION is not set 1296# CONFIG_EFI_PARTITION is not set
1297# CONFIG_SYSV68_PARTITION is not set
1301 1298
1302# 1299#
1303# Native Language Support 1300# Native Language Support
@@ -1308,6 +1305,7 @@ CONFIG_MSDOS_PARTITION=y
1308# Distributed Lock Manager 1305# Distributed Lock Manager
1309# 1306#
1310# CONFIG_DLM is not set 1307# CONFIG_DLM is not set
1308# CONFIG_UCC_SLOW is not set
1311 1309
1312# 1310#
1313# Library routines 1311# Library routines
@@ -1315,10 +1313,13 @@ CONFIG_MSDOS_PARTITION=y
1315CONFIG_BITREVERSE=y 1313CONFIG_BITREVERSE=y
1316# CONFIG_CRC_CCITT is not set 1314# CONFIG_CRC_CCITT is not set
1317# CONFIG_CRC16 is not set 1315# CONFIG_CRC16 is not set
1316# CONFIG_CRC_ITU_T is not set
1318CONFIG_CRC32=y 1317CONFIG_CRC32=y
1319# CONFIG_LIBCRC32C is not set 1318# CONFIG_LIBCRC32C is not set
1320CONFIG_PLIST=y 1319CONFIG_PLIST=y
1321CONFIG_IOMAP_COPY=y 1320CONFIG_HAS_IOMEM=y
1321CONFIG_HAS_IOPORT=y
1322CONFIG_HAS_DMA=y
1322 1323
1323# 1324#
1324# Instrumentation Support 1325# Instrumentation Support
@@ -1335,15 +1336,15 @@ CONFIG_ENABLE_MUST_CHECK=y
1335# CONFIG_DEBUG_FS is not set 1336# CONFIG_DEBUG_FS is not set
1336# CONFIG_HEADERS_CHECK is not set 1337# CONFIG_HEADERS_CHECK is not set
1337CONFIG_DEBUG_KERNEL=y 1338CONFIG_DEBUG_KERNEL=y
1338CONFIG_LOG_BUF_SHIFT=14 1339# CONFIG_DEBUG_SHIRQ is not set
1339CONFIG_DETECT_SOFTLOCKUP=y 1340CONFIG_DETECT_SOFTLOCKUP=y
1340# CONFIG_SCHEDSTATS is not set 1341# CONFIG_SCHEDSTATS is not set
1342# CONFIG_TIMER_STATS is not set
1341# CONFIG_DEBUG_SLAB is not set 1343# CONFIG_DEBUG_SLAB is not set
1342# CONFIG_DEBUG_RT_MUTEXES is not set 1344# CONFIG_DEBUG_RT_MUTEXES is not set
1343# CONFIG_RT_MUTEX_TESTER is not set 1345# CONFIG_RT_MUTEX_TESTER is not set
1344# CONFIG_DEBUG_SPINLOCK is not set 1346# CONFIG_DEBUG_SPINLOCK is not set
1345# CONFIG_DEBUG_MUTEXES is not set 1347# CONFIG_DEBUG_MUTEXES is not set
1346# CONFIG_DEBUG_RWSEMS is not set
1347# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1348# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1348# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1349# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1349# CONFIG_DEBUG_KOBJECT is not set 1350# CONFIG_DEBUG_KOBJECT is not set
@@ -1353,12 +1354,13 @@ CONFIG_DETECT_SOFTLOCKUP=y
1353# CONFIG_DEBUG_LIST is not set 1354# CONFIG_DEBUG_LIST is not set
1354CONFIG_FORCED_INLINING=y 1355CONFIG_FORCED_INLINING=y
1355# CONFIG_RCU_TORTURE_TEST is not set 1356# CONFIG_RCU_TORTURE_TEST is not set
1357# CONFIG_FAULT_INJECTION is not set
1356# CONFIG_DEBUG_STACKOVERFLOW is not set 1358# CONFIG_DEBUG_STACKOVERFLOW is not set
1357# CONFIG_DEBUG_STACK_USAGE is not set 1359# CONFIG_DEBUG_STACK_USAGE is not set
1360# CONFIG_DEBUG_PAGEALLOC is not set
1358# CONFIG_DEBUGGER is not set 1361# CONFIG_DEBUGGER is not set
1359# CONFIG_BDI_SWITCH is not set 1362# CONFIG_BDI_SWITCH is not set
1360# CONFIG_BOOTX_TEXT is not set 1363# CONFIG_BOOTX_TEXT is not set
1361# CONFIG_SERIAL_TEXT_DEBUG is not set
1362# CONFIG_PPC_EARLY_DEBUG is not set 1364# CONFIG_PPC_EARLY_DEBUG is not set
1363 1365
1364# 1366#
@@ -1387,8 +1389,11 @@ CONFIG_CRYPTO_MD5=y
1387# CONFIG_CRYPTO_GF128MUL is not set 1389# CONFIG_CRYPTO_GF128MUL is not set
1388# CONFIG_CRYPTO_ECB is not set 1390# CONFIG_CRYPTO_ECB is not set
1389CONFIG_CRYPTO_CBC=y 1391CONFIG_CRYPTO_CBC=y
1392CONFIG_CRYPTO_PCBC=m
1390# CONFIG_CRYPTO_LRW is not set 1393# CONFIG_CRYPTO_LRW is not set
1394# CONFIG_CRYPTO_CRYPTD is not set
1391CONFIG_CRYPTO_DES=y 1395CONFIG_CRYPTO_DES=y
1396# CONFIG_CRYPTO_FCRYPT is not set
1392# CONFIG_CRYPTO_BLOWFISH is not set 1397# CONFIG_CRYPTO_BLOWFISH is not set
1393# CONFIG_CRYPTO_TWOFISH is not set 1398# CONFIG_CRYPTO_TWOFISH is not set
1394# CONFIG_CRYPTO_SERPENT is not set 1399# CONFIG_CRYPTO_SERPENT is not set
@@ -1402,6 +1407,7 @@ CONFIG_CRYPTO_DES=y
1402# CONFIG_CRYPTO_DEFLATE is not set 1407# CONFIG_CRYPTO_DEFLATE is not set
1403# CONFIG_CRYPTO_MICHAEL_MIC is not set 1408# CONFIG_CRYPTO_MICHAEL_MIC is not set
1404# CONFIG_CRYPTO_CRC32C is not set 1409# CONFIG_CRYPTO_CRC32C is not set
1410# CONFIG_CRYPTO_CAMELLIA is not set
1405# CONFIG_CRYPTO_TEST is not set 1411# CONFIG_CRYPTO_TEST is not set
1406 1412
1407# 1413#
diff --git a/arch/powerpc/configs/mpc832x_mds_defconfig b/arch/powerpc/configs/mpc832x_mds_defconfig
index 83192c0dc5..75ce78139a 100644
--- a/arch/powerpc/configs/mpc832x_mds_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.21-rc5 3# Linux kernel version: 2.6.22-rc7
4# Mon Apr 9 16:09:16 2007 4# Sun Jul 1 23:56:55 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_PPC_DCR_MMIO is not set 45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -70,6 +71,7 @@ CONFIG_SYSVIPC_SYSCTL=y
70# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
71# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
73CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
75CONFIG_BLK_DEV_INITRD=y 77CONFIG_BLK_DEV_INITRD=y
@@ -85,14 +87,19 @@ CONFIG_BUG=y
85CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
86CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
87CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
88# CONFIG_EPOLL is not set 91# CONFIG_EPOLL is not set
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 95CONFIG_SHMEM=y
90CONFIG_SLAB=y
91CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLAB=y
98# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set
92CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
93# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
94CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
95# CONFIG_SLOB is not set
96 103
97# 104#
98# Loadable module support 105# Loadable module support
@@ -124,12 +131,15 @@ CONFIG_DEFAULT_AS=y
124# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
125# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
126CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
127CONFIG_QUICC_ENGINE=y
128# CONFIG_WANT_EARLY_SERIAL is not set
129 134
130# 135#
131# Platform support 136# Platform support
132# 137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
133# CONFIG_MPC8313_RDB is not set 143# CONFIG_MPC8313_RDB is not set
134CONFIG_MPC832x_MDS=y 144CONFIG_MPC832x_MDS=y
135# CONFIG_MPC832x_RDB is not set 145# CONFIG_MPC832x_RDB is not set
@@ -138,6 +148,17 @@ CONFIG_MPC832x_MDS=y
138# CONFIG_MPC836x_MDS is not set 148# CONFIG_MPC836x_MDS is not set
139CONFIG_PPC_MPC832x=y 149CONFIG_PPC_MPC832x=y
140# CONFIG_MPIC is not set 150# CONFIG_MPIC is not set
151# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set
153# CONFIG_PPC_RTAS is not set
154# CONFIG_MMIO_NVRAM is not set
155# CONFIG_PPC_MPC106 is not set
156# CONFIG_PPC_970_NAP is not set
157# CONFIG_PPC_INDIRECT_IO is not set
158# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set
160CONFIG_QUICC_ENGINE=y
161# CONFIG_CPM2 is not set
141 162
142# 163#
143# Kernel options 164# Kernel options
@@ -171,6 +192,8 @@ CONFIG_PROC_DEVICETREE=y
171# CONFIG_CMDLINE_BOOL is not set 192# CONFIG_CMDLINE_BOOL is not set
172# CONFIG_PM is not set 193# CONFIG_PM is not set
173CONFIG_SECCOMP=y 194CONFIG_SECCOMP=y
195CONFIG_WANT_DEVICE_TREE=y
196CONFIG_DEVICE_TREE=""
174CONFIG_ISA_DMA_API=y 197CONFIG_ISA_DMA_API=y
175 198
176# 199#
@@ -178,22 +201,19 @@ CONFIG_ISA_DMA_API=y
178# 201#
179CONFIG_ZONE_DMA=y 202CONFIG_ZONE_DMA=y
180CONFIG_GENERIC_ISA_DMA=y 203CONFIG_GENERIC_ISA_DMA=y
181# CONFIG_MPIC_WEIRD is not set
182# CONFIG_PPC_I8259 is not set
183CONFIG_PPC_INDIRECT_PCI=y 204CONFIG_PPC_INDIRECT_PCI=y
205# CONFIG_PPC_INDIRECT_PCI_BE is not set
184CONFIG_FSL_SOC=y 206CONFIG_FSL_SOC=y
185CONFIG_PCI=y 207CONFIG_PCI=y
186CONFIG_PCI_DOMAINS=y 208CONFIG_PCI_DOMAINS=y
187# CONFIG_PCIEPORTBUS is not set 209# CONFIG_PCIEPORTBUS is not set
210CONFIG_ARCH_SUPPORTS_MSI=y
211# CONFIG_PCI_MSI is not set
188 212
189# 213#
190# PCCARD (PCMCIA/CardBus) support 214# PCCARD (PCMCIA/CardBus) support
191# 215#
192# CONFIG_PCCARD is not set 216# CONFIG_PCCARD is not set
193
194#
195# PCI Hotplug Support
196#
197# CONFIG_HOTPLUG_PCI is not set 217# CONFIG_HOTPLUG_PCI is not set
198 218
199# 219#
@@ -218,7 +238,6 @@ CONFIG_NET=y
218# 238#
219# Networking options 239# Networking options
220# 240#
221# CONFIG_NETDEBUG is not set
222CONFIG_PACKET=y 241CONFIG_PACKET=y
223# CONFIG_PACKET_MMAP is not set 242# CONFIG_PACKET_MMAP is not set
224CONFIG_UNIX=y 243CONFIG_UNIX=y
@@ -259,20 +278,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
259# CONFIG_INET6_TUNNEL is not set 278# CONFIG_INET6_TUNNEL is not set
260# CONFIG_NETWORK_SECMARK is not set 279# CONFIG_NETWORK_SECMARK is not set
261# CONFIG_NETFILTER is not set 280# CONFIG_NETFILTER is not set
262
263#
264# DCCP Configuration (EXPERIMENTAL)
265#
266# CONFIG_IP_DCCP is not set 281# CONFIG_IP_DCCP is not set
267
268#
269# SCTP Configuration (EXPERIMENTAL)
270#
271# CONFIG_IP_SCTP is not set 282# CONFIG_IP_SCTP is not set
272
273#
274# TIPC Configuration (EXPERIMENTAL)
275#
276# CONFIG_TIPC is not set 283# CONFIG_TIPC is not set
277# CONFIG_ATM is not set 284# CONFIG_ATM is not set
278# CONFIG_BRIDGE is not set 285# CONFIG_BRIDGE is not set
@@ -298,7 +305,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
298# CONFIG_HAMRADIO is not set 305# CONFIG_HAMRADIO is not set
299# CONFIG_IRDA is not set 306# CONFIG_IRDA is not set
300# CONFIG_BT is not set 307# CONFIG_BT is not set
308# CONFIG_AF_RXRPC is not set
309
310#
311# Wireless
312#
313# CONFIG_CFG80211 is not set
314# CONFIG_WIRELESS_EXT is not set
315# CONFIG_MAC80211 is not set
301# CONFIG_IEEE80211 is not set 316# CONFIG_IEEE80211 is not set
317# CONFIG_RFKILL is not set
302 318
303# 319#
304# Device Drivers 320# Device Drivers
@@ -316,10 +332,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
316# Connector - unified userspace <-> kernelspace linker 332# Connector - unified userspace <-> kernelspace linker
317# 333#
318# CONFIG_CONNECTOR is not set 334# CONFIG_CONNECTOR is not set
319
320#
321# Memory Technology Devices (MTD)
322#
323# CONFIG_MTD is not set 335# CONFIG_MTD is not set
324 336
325# 337#
@@ -355,12 +367,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
355# 367#
356# Misc devices 368# Misc devices
357# 369#
370# CONFIG_PHANTOM is not set
358# CONFIG_SGI_IOC4 is not set 371# CONFIG_SGI_IOC4 is not set
359# CONFIG_TIFM_CORE is not set 372# CONFIG_TIFM_CORE is not set
360 373# CONFIG_BLINK is not set
361#
362# ATA/ATAPI/MFM/RLL support
363#
364# CONFIG_IDE is not set 374# CONFIG_IDE is not set
365 375
366# 376#
@@ -389,6 +399,7 @@ CONFIG_SCSI_PROC_FS=y
389# CONFIG_SCSI_CONSTANTS is not set 399# CONFIG_SCSI_CONSTANTS is not set
390# CONFIG_SCSI_LOGGING is not set 400# CONFIG_SCSI_LOGGING is not set
391# CONFIG_SCSI_SCAN_ASYNC is not set 401# CONFIG_SCSI_SCAN_ASYNC is not set
402CONFIG_SCSI_WAIT_SCAN=m
392 403
393# 404#
394# SCSI Transports 405# SCSI Transports
@@ -436,10 +447,6 @@ CONFIG_SCSI_PROC_FS=y
436# CONFIG_SCSI_NSP32 is not set 447# CONFIG_SCSI_NSP32 is not set
437# CONFIG_SCSI_DEBUG is not set 448# CONFIG_SCSI_DEBUG is not set
438# CONFIG_SCSI_SRP is not set 449# CONFIG_SCSI_SRP is not set
439
440#
441# Serial ATA (prod) and Parallel ATA (experimental) drivers
442#
443# CONFIG_ATA is not set 450# CONFIG_ATA is not set
444 451
445# 452#
@@ -458,18 +465,14 @@ CONFIG_SCSI_PROC_FS=y
458# 465#
459# IEEE 1394 (FireWire) support 466# IEEE 1394 (FireWire) support
460# 467#
468# CONFIG_FIREWIRE is not set
461# CONFIG_IEEE1394 is not set 469# CONFIG_IEEE1394 is not set
462 470
463# 471#
464# I2O device support 472# I2O device support
465# 473#
466# CONFIG_I2O is not set 474# CONFIG_I2O is not set
467 475# CONFIG_MACINTOSH_DRIVERS is not set
468#
469# Macintosh device drivers
470#
471# CONFIG_MAC_EMUMOUSEBTN is not set
472# CONFIG_WINDFARM is not set
473 476
474# 477#
475# Network device support 478# Network device support
@@ -479,15 +482,7 @@ CONFIG_NETDEVICES=y
479# CONFIG_BONDING is not set 482# CONFIG_BONDING is not set
480# CONFIG_EQUALIZER is not set 483# CONFIG_EQUALIZER is not set
481# CONFIG_TUN is not set 484# CONFIG_TUN is not set
482
483#
484# ARCnet devices
485#
486# CONFIG_ARCNET is not set 485# CONFIG_ARCNET is not set
487
488#
489# PHY device support
490#
491CONFIG_PHYLIB=y 486CONFIG_PHYLIB=y
492 487
493# 488#
@@ -501,7 +496,6 @@ CONFIG_DAVICOM_PHY=y
501# CONFIG_VITESSE_PHY is not set 496# CONFIG_VITESSE_PHY is not set
502# CONFIG_SMSC_PHY is not set 497# CONFIG_SMSC_PHY is not set
503# CONFIG_BROADCOM_PHY is not set 498# CONFIG_BROADCOM_PHY is not set
504# CONFIG_ICPLUS_PHY is not set
505# CONFIG_FIXED_PHY is not set 499# CONFIG_FIXED_PHY is not set
506 500
507# 501#
@@ -520,10 +514,7 @@ CONFIG_MII=y
520# CONFIG_NET_TULIP is not set 514# CONFIG_NET_TULIP is not set
521# CONFIG_HP100 is not set 515# CONFIG_HP100 is not set
522# CONFIG_NET_PCI is not set 516# CONFIG_NET_PCI is not set
523 517CONFIG_NETDEV_1000=y
524#
525# Ethernet (1000 Mbit)
526#
527# CONFIG_ACENIC is not set 518# CONFIG_ACENIC is not set
528# CONFIG_DL2K is not set 519# CONFIG_DL2K is not set
529# CONFIG_E1000 is not set 520# CONFIG_E1000 is not set
@@ -535,6 +526,7 @@ CONFIG_MII=y
535# CONFIG_SKGE is not set 526# CONFIG_SKGE is not set
536# CONFIG_SKY2 is not set 527# CONFIG_SKY2 is not set
537# CONFIG_SK98LIN is not set 528# CONFIG_SK98LIN is not set
529# CONFIG_VIA_VELOCITY is not set
538# CONFIG_TIGON3 is not set 530# CONFIG_TIGON3 is not set
539# CONFIG_BNX2 is not set 531# CONFIG_BNX2 is not set
540# CONFIG_GIANFAR is not set 532# CONFIG_GIANFAR is not set
@@ -542,33 +534,24 @@ CONFIG_UCC_GETH=y
542# CONFIG_UGETH_NAPI is not set 534# CONFIG_UGETH_NAPI is not set
543# CONFIG_UGETH_MAGIC_PACKET is not set 535# CONFIG_UGETH_MAGIC_PACKET is not set
544# CONFIG_UGETH_FILTERING is not set 536# CONFIG_UGETH_FILTERING is not set
545# CONFIG_UGETH_TX_ON_DEMOND is not set 537# CONFIG_UGETH_TX_ON_DEMAND is not set
546# CONFIG_QLA3XXX is not set 538# CONFIG_QLA3XXX is not set
547# CONFIG_ATL1 is not set 539# CONFIG_ATL1 is not set
548 540CONFIG_NETDEV_10000=y
549#
550# Ethernet (10000 Mbit)
551#
552# CONFIG_CHELSIO_T1 is not set 541# CONFIG_CHELSIO_T1 is not set
553# CONFIG_CHELSIO_T3 is not set 542# CONFIG_CHELSIO_T3 is not set
554# CONFIG_IXGB is not set 543# CONFIG_IXGB is not set
555# CONFIG_S2IO is not set 544# CONFIG_S2IO is not set
556# CONFIG_MYRI10GE is not set 545# CONFIG_MYRI10GE is not set
557# CONFIG_NETXEN_NIC is not set 546# CONFIG_NETXEN_NIC is not set
558 547# CONFIG_MLX4_CORE is not set
559#
560# Token Ring devices
561#
562# CONFIG_TR is not set 548# CONFIG_TR is not set
563 549
564# 550#
565# Wireless LAN (non-hamradio) 551# Wireless LAN
566#
567# CONFIG_NET_RADIO is not set
568
569#
570# Wan interfaces
571# 552#
553# CONFIG_WLAN_PRE80211 is not set
554# CONFIG_WLAN_80211 is not set
572# CONFIG_WAN is not set 555# CONFIG_WAN is not set
573# CONFIG_FDDI is not set 556# CONFIG_FDDI is not set
574# CONFIG_HIPPI is not set 557# CONFIG_HIPPI is not set
@@ -595,6 +578,7 @@ CONFIG_UCC_GETH=y
595# 578#
596CONFIG_INPUT=y 579CONFIG_INPUT=y
597# CONFIG_INPUT_FF_MEMLESS is not set 580# CONFIG_INPUT_FF_MEMLESS is not set
581# CONFIG_INPUT_POLLDEV is not set
598 582
599# 583#
600# Userland interfaces 584# Userland interfaces
@@ -611,6 +595,7 @@ CONFIG_INPUT=y
611# CONFIG_INPUT_KEYBOARD is not set 595# CONFIG_INPUT_KEYBOARD is not set
612# CONFIG_INPUT_MOUSE is not set 596# CONFIG_INPUT_MOUSE is not set
613# CONFIG_INPUT_JOYSTICK is not set 597# CONFIG_INPUT_JOYSTICK is not set
598# CONFIG_INPUT_TABLET is not set
614# CONFIG_INPUT_TOUCHSCREEN is not set 599# CONFIG_INPUT_TOUCHSCREEN is not set
615# CONFIG_INPUT_MISC is not set 600# CONFIG_INPUT_MISC is not set
616 601
@@ -652,10 +637,6 @@ CONFIG_LEGACY_PTY_COUNT=256
652# IPMI 637# IPMI
653# 638#
654# CONFIG_IPMI_HANDLER is not set 639# CONFIG_IPMI_HANDLER is not set
655
656#
657# Watchdog Cards
658#
659CONFIG_WATCHDOG=y 640CONFIG_WATCHDOG=y
660# CONFIG_WATCHDOG_NOWAYOUT is not set 641# CONFIG_WATCHDOG_NOWAYOUT is not set
661 642
@@ -674,7 +655,6 @@ CONFIG_HW_RANDOM=y
674# CONFIG_NVRAM is not set 655# CONFIG_NVRAM is not set
675CONFIG_GEN_RTC=y 656CONFIG_GEN_RTC=y
676# CONFIG_GEN_RTC_X is not set 657# CONFIG_GEN_RTC_X is not set
677# CONFIG_DTLK is not set
678# CONFIG_R3964 is not set 658# CONFIG_R3964 is not set
679# CONFIG_APPLICOM is not set 659# CONFIG_APPLICOM is not set
680# CONFIG_AGP is not set 660# CONFIG_AGP is not set
@@ -685,11 +665,9 @@ CONFIG_GEN_RTC=y
685# TPM devices 665# TPM devices
686# 666#
687# CONFIG_TCG_TPM is not set 667# CONFIG_TCG_TPM is not set
688 668CONFIG_DEVPORT=y
689#
690# I2C support
691#
692CONFIG_I2C=y 669CONFIG_I2C=y
670CONFIG_I2C_BOARDINFO=y
693CONFIG_I2C_CHARDEV=y 671CONFIG_I2C_CHARDEV=y
694 672
695# 673#
@@ -714,9 +692,9 @@ CONFIG_I2C_MPC=y
714# CONFIG_I2C_NFORCE2 is not set 692# CONFIG_I2C_NFORCE2 is not set
715# CONFIG_I2C_OCORES is not set 693# CONFIG_I2C_OCORES is not set
716# CONFIG_I2C_PARPORT_LIGHT is not set 694# CONFIG_I2C_PARPORT_LIGHT is not set
717# CONFIG_I2C_PASEMI is not set
718# CONFIG_I2C_PROSAVAGE is not set 695# CONFIG_I2C_PROSAVAGE is not set
719# CONFIG_I2C_SAVAGE4 is not set 696# CONFIG_I2C_SAVAGE4 is not set
697# CONFIG_I2C_SIMTEC is not set
720# CONFIG_I2C_SIS5595 is not set 698# CONFIG_I2C_SIS5595 is not set
721# CONFIG_I2C_SIS630 is not set 699# CONFIG_I2C_SIS630 is not set
722# CONFIG_I2C_SIS96X is not set 700# CONFIG_I2C_SIS96X is not set
@@ -724,7 +702,6 @@ CONFIG_I2C_MPC=y
724# CONFIG_I2C_VIA is not set 702# CONFIG_I2C_VIA is not set
725# CONFIG_I2C_VIAPRO is not set 703# CONFIG_I2C_VIAPRO is not set
726# CONFIG_I2C_VOODOO3 is not set 704# CONFIG_I2C_VOODOO3 is not set
727# CONFIG_I2C_PCA_ISA is not set
728 705
729# 706#
730# Miscellaneous I2C Chip support 707# Miscellaneous I2C Chip support
@@ -752,13 +729,10 @@ CONFIG_I2C_MPC=y
752# Dallas's 1-wire bus 729# Dallas's 1-wire bus
753# 730#
754# CONFIG_W1 is not set 731# CONFIG_W1 is not set
755
756#
757# Hardware Monitoring support
758#
759CONFIG_HWMON=y 732CONFIG_HWMON=y
760# CONFIG_HWMON_VID is not set 733# CONFIG_HWMON_VID is not set
761# CONFIG_SENSORS_ABITUGURU is not set 734# CONFIG_SENSORS_ABITUGURU is not set
735# CONFIG_SENSORS_AD7418 is not set
762# CONFIG_SENSORS_ADM1021 is not set 736# CONFIG_SENSORS_ADM1021 is not set
763# CONFIG_SENSORS_ADM1025 is not set 737# CONFIG_SENSORS_ADM1025 is not set
764# CONFIG_SENSORS_ADM1026 is not set 738# CONFIG_SENSORS_ADM1026 is not set
@@ -785,6 +759,7 @@ CONFIG_HWMON=y
785# CONFIG_SENSORS_LM90 is not set 759# CONFIG_SENSORS_LM90 is not set
786# CONFIG_SENSORS_LM92 is not set 760# CONFIG_SENSORS_LM92 is not set
787# CONFIG_SENSORS_MAX1619 is not set 761# CONFIG_SENSORS_MAX1619 is not set
762# CONFIG_SENSORS_MAX6650 is not set
788# CONFIG_SENSORS_PC87360 is not set 763# CONFIG_SENSORS_PC87360 is not set
789# CONFIG_SENSORS_PC87427 is not set 764# CONFIG_SENSORS_PC87427 is not set
790# CONFIG_SENSORS_SIS5595 is not set 765# CONFIG_SENSORS_SIS5595 is not set
@@ -812,16 +787,19 @@ CONFIG_HWMON=y
812# Multimedia devices 787# Multimedia devices
813# 788#
814# CONFIG_VIDEO_DEV is not set 789# CONFIG_VIDEO_DEV is not set
790# CONFIG_DVB_CORE is not set
791CONFIG_DAB=y
815 792
816# 793#
817# Digital Video Broadcasting Devices 794# Graphics support
818# 795#
819# CONFIG_DVB is not set 796# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
820 797
821# 798#
822# Graphics support 799# Display device support
823# 800#
824# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 801# CONFIG_DISPLAY_SUPPORT is not set
802# CONFIG_VGASTATE is not set
825# CONFIG_FB is not set 803# CONFIG_FB is not set
826# CONFIG_FB_IBM_GXT4500 is not set 804# CONFIG_FB_IBM_GXT4500 is not set
827 805
@@ -852,10 +830,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
852# USB Gadget Support 830# USB Gadget Support
853# 831#
854# CONFIG_USB_GADGET is not set 832# CONFIG_USB_GADGET is not set
855
856#
857# MMC/SD Card support
858#
859# CONFIG_MMC is not set 833# CONFIG_MMC is not set
860 834
861# 835#
@@ -899,14 +873,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
899# 873#
900 874
901# 875#
902# Auxiliary Display support
903#
904
905#
906# Virtualization
907#
908
909#
910# File systems 876# File systems
911# 877#
912CONFIG_EXT2_FS=y 878CONFIG_EXT2_FS=y
@@ -994,6 +960,7 @@ CONFIG_LOCKD_V4=y
994CONFIG_NFS_COMMON=y 960CONFIG_NFS_COMMON=y
995CONFIG_SUNRPC=y 961CONFIG_SUNRPC=y
996CONFIG_SUNRPC_GSS=y 962CONFIG_SUNRPC_GSS=y
963# CONFIG_SUNRPC_BIND34 is not set
997CONFIG_RPCSEC_GSS_KRB5=y 964CONFIG_RPCSEC_GSS_KRB5=y
998# CONFIG_RPCSEC_GSS_SPKM3 is not set 965# CONFIG_RPCSEC_GSS_SPKM3 is not set
999# CONFIG_SMB_FS is not set 966# CONFIG_SMB_FS is not set
@@ -1019,6 +986,7 @@ CONFIG_PARTITION_ADVANCED=y
1019# CONFIG_SUN_PARTITION is not set 986# CONFIG_SUN_PARTITION is not set
1020# CONFIG_KARMA_PARTITION is not set 987# CONFIG_KARMA_PARTITION is not set
1021# CONFIG_EFI_PARTITION is not set 988# CONFIG_EFI_PARTITION is not set
989# CONFIG_SYSV68_PARTITION is not set
1022 990
1023# 991#
1024# Native Language Support 992# Native Language Support
@@ -1039,11 +1007,13 @@ CONFIG_UCC=y
1039CONFIG_BITREVERSE=y 1007CONFIG_BITREVERSE=y
1040# CONFIG_CRC_CCITT is not set 1008# CONFIG_CRC_CCITT is not set
1041# CONFIG_CRC16 is not set 1009# CONFIG_CRC16 is not set
1010# CONFIG_CRC_ITU_T is not set
1042CONFIG_CRC32=y 1011CONFIG_CRC32=y
1043# CONFIG_LIBCRC32C is not set 1012# CONFIG_LIBCRC32C is not set
1044CONFIG_PLIST=y 1013CONFIG_PLIST=y
1045CONFIG_HAS_IOMEM=y 1014CONFIG_HAS_IOMEM=y
1046CONFIG_HAS_IOPORT=y 1015CONFIG_HAS_IOPORT=y
1016CONFIG_HAS_DMA=y
1047 1017
1048# 1018#
1049# Instrumentation Support 1019# Instrumentation Support
@@ -1060,7 +1030,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1060# CONFIG_DEBUG_FS is not set 1030# CONFIG_DEBUG_FS is not set
1061# CONFIG_HEADERS_CHECK is not set 1031# CONFIG_HEADERS_CHECK is not set
1062# CONFIG_DEBUG_KERNEL is not set 1032# CONFIG_DEBUG_KERNEL is not set
1063CONFIG_LOG_BUF_SHIFT=14
1064# CONFIG_DEBUG_BUGVERBOSE is not set 1033# CONFIG_DEBUG_BUGVERBOSE is not set
1065# CONFIG_BOOTX_TEXT is not set 1034# CONFIG_BOOTX_TEXT is not set
1066# CONFIG_PPC_EARLY_DEBUG is not set 1035# CONFIG_PPC_EARLY_DEBUG is not set
@@ -1093,6 +1062,7 @@ CONFIG_CRYPTO_ECB=m
1093CONFIG_CRYPTO_CBC=y 1062CONFIG_CRYPTO_CBC=y
1094CONFIG_CRYPTO_PCBC=m 1063CONFIG_CRYPTO_PCBC=m
1095# CONFIG_CRYPTO_LRW is not set 1064# CONFIG_CRYPTO_LRW is not set
1065# CONFIG_CRYPTO_CRYPTD is not set
1096CONFIG_CRYPTO_DES=y 1066CONFIG_CRYPTO_DES=y
1097# CONFIG_CRYPTO_FCRYPT is not set 1067# CONFIG_CRYPTO_FCRYPT is not set
1098# CONFIG_CRYPTO_BLOWFISH is not set 1068# CONFIG_CRYPTO_BLOWFISH is not set
diff --git a/arch/powerpc/configs/mpc832x_rdb_defconfig b/arch/powerpc/configs/mpc832x_rdb_defconfig
index 4a4da875fa..6a83b66dd9 100644
--- a/arch/powerpc/configs/mpc832x_rdb_defconfig
+++ b/arch/powerpc/configs/mpc832x_rdb_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21-rc5 3# Linux kernel version: 2.6.22-rc7
4# Mon Apr 9 16:12:43 2007 4# Sun Jul 1 23:56:56 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_PPC_DCR_MMIO is not set 45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -70,6 +71,7 @@ CONFIG_SYSVIPC_SYSCTL=y
70# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
71# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
73CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
75CONFIG_BLK_DEV_INITRD=y 77CONFIG_BLK_DEV_INITRD=y
@@ -85,14 +87,19 @@ CONFIG_BUG=y
85CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
86CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
87CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
88# CONFIG_EPOLL is not set 91# CONFIG_EPOLL is not set
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 95CONFIG_SHMEM=y
90CONFIG_SLAB=y
91CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLAB=y
98# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set
92CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
93# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
94CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
95# CONFIG_SLOB is not set
96 103
97# 104#
98# Loadable module support 105# Loadable module support
@@ -124,12 +131,15 @@ CONFIG_DEFAULT_AS=y
124# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
125# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
126CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
127CONFIG_QUICC_ENGINE=y
128# CONFIG_WANT_EARLY_SERIAL is not set
129 134
130# 135#
131# Platform support 136# Platform support
132# 137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
133# CONFIG_MPC8313_RDB is not set 143# CONFIG_MPC8313_RDB is not set
134# CONFIG_MPC832x_MDS is not set 144# CONFIG_MPC832x_MDS is not set
135CONFIG_MPC832x_RDB=y 145CONFIG_MPC832x_RDB=y
@@ -138,6 +148,17 @@ CONFIG_MPC832x_RDB=y
138# CONFIG_MPC836x_MDS is not set 148# CONFIG_MPC836x_MDS is not set
139CONFIG_PPC_MPC832x=y 149CONFIG_PPC_MPC832x=y
140# CONFIG_MPIC is not set 150# CONFIG_MPIC is not set
151# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set
153# CONFIG_PPC_RTAS is not set
154# CONFIG_MMIO_NVRAM is not set
155# CONFIG_PPC_MPC106 is not set
156# CONFIG_PPC_970_NAP is not set
157# CONFIG_PPC_INDIRECT_IO is not set
158# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set
160CONFIG_QUICC_ENGINE=y
161# CONFIG_CPM2 is not set
141 162
142# 163#
143# Kernel options 164# Kernel options
@@ -171,6 +192,8 @@ CONFIG_PROC_DEVICETREE=y
171# CONFIG_CMDLINE_BOOL is not set 192# CONFIG_CMDLINE_BOOL is not set
172# CONFIG_PM is not set 193# CONFIG_PM is not set
173CONFIG_SECCOMP=y 194CONFIG_SECCOMP=y
195CONFIG_WANT_DEVICE_TREE=y
196CONFIG_DEVICE_TREE=""
174CONFIG_ISA_DMA_API=y 197CONFIG_ISA_DMA_API=y
175 198
176# 199#
@@ -178,22 +201,19 @@ CONFIG_ISA_DMA_API=y
178# 201#
179CONFIG_ZONE_DMA=y 202CONFIG_ZONE_DMA=y
180CONFIG_GENERIC_ISA_DMA=y 203CONFIG_GENERIC_ISA_DMA=y
181# CONFIG_MPIC_WEIRD is not set
182# CONFIG_PPC_I8259 is not set
183CONFIG_PPC_INDIRECT_PCI=y 204CONFIG_PPC_INDIRECT_PCI=y
205# CONFIG_PPC_INDIRECT_PCI_BE is not set
184CONFIG_FSL_SOC=y 206CONFIG_FSL_SOC=y
185CONFIG_PCI=y 207CONFIG_PCI=y
186CONFIG_PCI_DOMAINS=y 208CONFIG_PCI_DOMAINS=y
187# CONFIG_PCIEPORTBUS is not set 209# CONFIG_PCIEPORTBUS is not set
210CONFIG_ARCH_SUPPORTS_MSI=y
211# CONFIG_PCI_MSI is not set
188 212
189# 213#
190# PCCARD (PCMCIA/CardBus) support 214# PCCARD (PCMCIA/CardBus) support
191# 215#
192# CONFIG_PCCARD is not set 216# CONFIG_PCCARD is not set
193
194#
195# PCI Hotplug Support
196#
197# CONFIG_HOTPLUG_PCI is not set 217# CONFIG_HOTPLUG_PCI is not set
198 218
199# 219#
@@ -218,7 +238,6 @@ CONFIG_NET=y
218# 238#
219# Networking options 239# Networking options
220# 240#
221# CONFIG_NETDEBUG is not set
222CONFIG_PACKET=y 241CONFIG_PACKET=y
223# CONFIG_PACKET_MMAP is not set 242# CONFIG_PACKET_MMAP is not set
224CONFIG_UNIX=y 243CONFIG_UNIX=y
@@ -259,20 +278,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
259# CONFIG_INET6_TUNNEL is not set 278# CONFIG_INET6_TUNNEL is not set
260# CONFIG_NETWORK_SECMARK is not set 279# CONFIG_NETWORK_SECMARK is not set
261# CONFIG_NETFILTER is not set 280# CONFIG_NETFILTER is not set
262
263#
264# DCCP Configuration (EXPERIMENTAL)
265#
266# CONFIG_IP_DCCP is not set 281# CONFIG_IP_DCCP is not set
267
268#
269# SCTP Configuration (EXPERIMENTAL)
270#
271# CONFIG_IP_SCTP is not set 282# CONFIG_IP_SCTP is not set
272
273#
274# TIPC Configuration (EXPERIMENTAL)
275#
276# CONFIG_TIPC is not set 283# CONFIG_TIPC is not set
277# CONFIG_ATM is not set 284# CONFIG_ATM is not set
278# CONFIG_BRIDGE is not set 285# CONFIG_BRIDGE is not set
@@ -298,7 +305,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
298# CONFIG_HAMRADIO is not set 305# CONFIG_HAMRADIO is not set
299# CONFIG_IRDA is not set 306# CONFIG_IRDA is not set
300# CONFIG_BT is not set 307# CONFIG_BT is not set
308# CONFIG_AF_RXRPC is not set
309
310#
311# Wireless
312#
313# CONFIG_CFG80211 is not set
314# CONFIG_WIRELESS_EXT is not set
315# CONFIG_MAC80211 is not set
301# CONFIG_IEEE80211 is not set 316# CONFIG_IEEE80211 is not set
317# CONFIG_RFKILL is not set
302 318
303# 319#
304# Device Drivers 320# Device Drivers
@@ -316,10 +332,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
316# Connector - unified userspace <-> kernelspace linker 332# Connector - unified userspace <-> kernelspace linker
317# 333#
318# CONFIG_CONNECTOR is not set 334# CONFIG_CONNECTOR is not set
319
320#
321# Memory Technology Devices (MTD)
322#
323# CONFIG_MTD is not set 335# CONFIG_MTD is not set
324 336
325# 337#
@@ -356,12 +368,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
356# 368#
357# Misc devices 369# Misc devices
358# 370#
371# CONFIG_PHANTOM is not set
359# CONFIG_SGI_IOC4 is not set 372# CONFIG_SGI_IOC4 is not set
360# CONFIG_TIFM_CORE is not set 373# CONFIG_TIFM_CORE is not set
361 374# CONFIG_BLINK is not set
362#
363# ATA/ATAPI/MFM/RLL support
364#
365# CONFIG_IDE is not set 375# CONFIG_IDE is not set
366 376
367# 377#
@@ -390,6 +400,7 @@ CONFIG_BLK_DEV_SD=y
390# CONFIG_SCSI_CONSTANTS is not set 400# CONFIG_SCSI_CONSTANTS is not set
391# CONFIG_SCSI_LOGGING is not set 401# CONFIG_SCSI_LOGGING is not set
392# CONFIG_SCSI_SCAN_ASYNC is not set 402# CONFIG_SCSI_SCAN_ASYNC is not set
403CONFIG_SCSI_WAIT_SCAN=m
393 404
394# 405#
395# SCSI Transports 406# SCSI Transports
@@ -437,10 +448,6 @@ CONFIG_BLK_DEV_SD=y
437# CONFIG_SCSI_NSP32 is not set 448# CONFIG_SCSI_NSP32 is not set
438# CONFIG_SCSI_DEBUG is not set 449# CONFIG_SCSI_DEBUG is not set
439# CONFIG_SCSI_SRP is not set 450# CONFIG_SCSI_SRP is not set
440
441#
442# Serial ATA (prod) and Parallel ATA (experimental) drivers
443#
444# CONFIG_ATA is not set 451# CONFIG_ATA is not set
445 452
446# 453#
@@ -459,18 +466,14 @@ CONFIG_BLK_DEV_SD=y
459# 466#
460# IEEE 1394 (FireWire) support 467# IEEE 1394 (FireWire) support
461# 468#
469# CONFIG_FIREWIRE is not set
462# CONFIG_IEEE1394 is not set 470# CONFIG_IEEE1394 is not set
463 471
464# 472#
465# I2O device support 473# I2O device support
466# 474#
467# CONFIG_I2O is not set 475# CONFIG_I2O is not set
468 476# CONFIG_MACINTOSH_DRIVERS is not set
469#
470# Macintosh device drivers
471#
472# CONFIG_MAC_EMUMOUSEBTN is not set
473# CONFIG_WINDFARM is not set
474 477
475# 478#
476# Network device support 479# Network device support
@@ -480,15 +483,7 @@ CONFIG_NETDEVICES=y
480# CONFIG_BONDING is not set 483# CONFIG_BONDING is not set
481# CONFIG_EQUALIZER is not set 484# CONFIG_EQUALIZER is not set
482# CONFIG_TUN is not set 485# CONFIG_TUN is not set
483
484#
485# ARCnet devices
486#
487# CONFIG_ARCNET is not set 486# CONFIG_ARCNET is not set
488
489#
490# PHY device support
491#
492CONFIG_PHYLIB=y 487CONFIG_PHYLIB=y
493 488
494# 489#
@@ -502,7 +497,6 @@ CONFIG_PHYLIB=y
502# CONFIG_VITESSE_PHY is not set 497# CONFIG_VITESSE_PHY is not set
503# CONFIG_SMSC_PHY is not set 498# CONFIG_SMSC_PHY is not set
504# CONFIG_BROADCOM_PHY is not set 499# CONFIG_BROADCOM_PHY is not set
505CONFIG_ICPLUS_PHY=y
506# CONFIG_FIXED_PHY is not set 500# CONFIG_FIXED_PHY is not set
507 501
508# 502#
@@ -521,10 +515,7 @@ CONFIG_MII=y
521# CONFIG_NET_TULIP is not set 515# CONFIG_NET_TULIP is not set
522# CONFIG_HP100 is not set 516# CONFIG_HP100 is not set
523# CONFIG_NET_PCI is not set 517# CONFIG_NET_PCI is not set
524 518CONFIG_NETDEV_1000=y
525#
526# Ethernet (1000 Mbit)
527#
528# CONFIG_ACENIC is not set 519# CONFIG_ACENIC is not set
529# CONFIG_DL2K is not set 520# CONFIG_DL2K is not set
530CONFIG_E1000=y 521CONFIG_E1000=y
@@ -538,6 +529,7 @@ CONFIG_E1000=y
538# CONFIG_SKGE is not set 529# CONFIG_SKGE is not set
539# CONFIG_SKY2 is not set 530# CONFIG_SKY2 is not set
540# CONFIG_SK98LIN is not set 531# CONFIG_SK98LIN is not set
532# CONFIG_VIA_VELOCITY is not set
541# CONFIG_TIGON3 is not set 533# CONFIG_TIGON3 is not set
542# CONFIG_BNX2 is not set 534# CONFIG_BNX2 is not set
543# CONFIG_GIANFAR is not set 535# CONFIG_GIANFAR is not set
@@ -545,33 +537,34 @@ CONFIG_UCC_GETH=y
545CONFIG_UGETH_NAPI=y 537CONFIG_UGETH_NAPI=y
546# CONFIG_UGETH_MAGIC_PACKET is not set 538# CONFIG_UGETH_MAGIC_PACKET is not set
547# CONFIG_UGETH_FILTERING is not set 539# CONFIG_UGETH_FILTERING is not set
548# CONFIG_UGETH_TX_ON_DEMOND is not set 540# CONFIG_UGETH_TX_ON_DEMAND is not set
549# CONFIG_QLA3XXX is not set 541# CONFIG_QLA3XXX is not set
550# CONFIG_ATL1 is not set 542# CONFIG_ATL1 is not set
551 543CONFIG_NETDEV_10000=y
552#
553# Ethernet (10000 Mbit)
554#
555# CONFIG_CHELSIO_T1 is not set 544# CONFIG_CHELSIO_T1 is not set
556# CONFIG_CHELSIO_T3 is not set 545# CONFIG_CHELSIO_T3 is not set
557# CONFIG_IXGB is not set 546# CONFIG_IXGB is not set
558# CONFIG_S2IO is not set 547# CONFIG_S2IO is not set
559# CONFIG_MYRI10GE is not set 548# CONFIG_MYRI10GE is not set
560# CONFIG_NETXEN_NIC is not set 549# CONFIG_NETXEN_NIC is not set
561 550# CONFIG_MLX4_CORE is not set
562#
563# Token Ring devices
564#
565# CONFIG_TR is not set 551# CONFIG_TR is not set
566 552
567# 553#
568# Wireless LAN (non-hamradio) 554# Wireless LAN
569# 555#
570# CONFIG_NET_RADIO is not set 556# CONFIG_WLAN_PRE80211 is not set
557# CONFIG_WLAN_80211 is not set
571 558
572# 559#
573# Wan interfaces 560# USB Network Adapters
574# 561#
562# CONFIG_USB_CATC is not set
563# CONFIG_USB_KAWETH is not set
564# CONFIG_USB_PEGASUS is not set
565# CONFIG_USB_RTL8150 is not set
566# CONFIG_USB_USBNET_MII is not set
567# CONFIG_USB_USBNET is not set
575# CONFIG_WAN is not set 568# CONFIG_WAN is not set
576# CONFIG_FDDI is not set 569# CONFIG_FDDI is not set
577# CONFIG_HIPPI is not set 570# CONFIG_HIPPI is not set
@@ -598,6 +591,7 @@ CONFIG_UGETH_NAPI=y
598# 591#
599CONFIG_INPUT=y 592CONFIG_INPUT=y
600# CONFIG_INPUT_FF_MEMLESS is not set 593# CONFIG_INPUT_FF_MEMLESS is not set
594# CONFIG_INPUT_POLLDEV is not set
601 595
602# 596#
603# Userland interfaces 597# Userland interfaces
@@ -614,6 +608,7 @@ CONFIG_INPUT=y
614# CONFIG_INPUT_KEYBOARD is not set 608# CONFIG_INPUT_KEYBOARD is not set
615# CONFIG_INPUT_MOUSE is not set 609# CONFIG_INPUT_MOUSE is not set
616# CONFIG_INPUT_JOYSTICK is not set 610# CONFIG_INPUT_JOYSTICK is not set
611# CONFIG_INPUT_TABLET is not set
617# CONFIG_INPUT_TOUCHSCREEN is not set 612# CONFIG_INPUT_TOUCHSCREEN is not set
618# CONFIG_INPUT_MISC is not set 613# CONFIG_INPUT_MISC is not set
619 614
@@ -655,10 +650,6 @@ CONFIG_LEGACY_PTY_COUNT=256
655# IPMI 650# IPMI
656# 651#
657# CONFIG_IPMI_HANDLER is not set 652# CONFIG_IPMI_HANDLER is not set
658
659#
660# Watchdog Cards
661#
662CONFIG_WATCHDOG=y 653CONFIG_WATCHDOG=y
663# CONFIG_WATCHDOG_NOWAYOUT is not set 654# CONFIG_WATCHDOG_NOWAYOUT is not set
664 655
@@ -682,7 +673,6 @@ CONFIG_HW_RANDOM=y
682# CONFIG_NVRAM is not set 673# CONFIG_NVRAM is not set
683CONFIG_GEN_RTC=y 674CONFIG_GEN_RTC=y
684# CONFIG_GEN_RTC_X is not set 675# CONFIG_GEN_RTC_X is not set
685# CONFIG_DTLK is not set
686# CONFIG_R3964 is not set 676# CONFIG_R3964 is not set
687# CONFIG_APPLICOM is not set 677# CONFIG_APPLICOM is not set
688# CONFIG_AGP is not set 678# CONFIG_AGP is not set
@@ -693,11 +683,9 @@ CONFIG_GEN_RTC=y
693# TPM devices 683# TPM devices
694# 684#
695# CONFIG_TCG_TPM is not set 685# CONFIG_TCG_TPM is not set
696 686CONFIG_DEVPORT=y
697#
698# I2C support
699#
700CONFIG_I2C=y 687CONFIG_I2C=y
688CONFIG_I2C_BOARDINFO=y
701CONFIG_I2C_CHARDEV=y 689CONFIG_I2C_CHARDEV=y
702 690
703# 691#
@@ -722,17 +710,17 @@ CONFIG_I2C_MPC=y
722# CONFIG_I2C_NFORCE2 is not set 710# CONFIG_I2C_NFORCE2 is not set
723# CONFIG_I2C_OCORES is not set 711# CONFIG_I2C_OCORES is not set
724# CONFIG_I2C_PARPORT_LIGHT is not set 712# CONFIG_I2C_PARPORT_LIGHT is not set
725# CONFIG_I2C_PASEMI is not set
726# CONFIG_I2C_PROSAVAGE is not set 713# CONFIG_I2C_PROSAVAGE is not set
727# CONFIG_I2C_SAVAGE4 is not set 714# CONFIG_I2C_SAVAGE4 is not set
715# CONFIG_I2C_SIMTEC is not set
728# CONFIG_I2C_SIS5595 is not set 716# CONFIG_I2C_SIS5595 is not set
729# CONFIG_I2C_SIS630 is not set 717# CONFIG_I2C_SIS630 is not set
730# CONFIG_I2C_SIS96X is not set 718# CONFIG_I2C_SIS96X is not set
731# CONFIG_I2C_STUB is not set 719# CONFIG_I2C_STUB is not set
720# CONFIG_I2C_TINY_USB is not set
732# CONFIG_I2C_VIA is not set 721# CONFIG_I2C_VIA is not set
733# CONFIG_I2C_VIAPRO is not set 722# CONFIG_I2C_VIAPRO is not set
734# CONFIG_I2C_VOODOO3 is not set 723# CONFIG_I2C_VOODOO3 is not set
735# CONFIG_I2C_PCA_ISA is not set
736 724
737# 725#
738# Miscellaneous I2C Chip support 726# Miscellaneous I2C Chip support
@@ -760,13 +748,10 @@ CONFIG_I2C_MPC=y
760# Dallas's 1-wire bus 748# Dallas's 1-wire bus
761# 749#
762# CONFIG_W1 is not set 750# CONFIG_W1 is not set
763
764#
765# Hardware Monitoring support
766#
767CONFIG_HWMON=y 751CONFIG_HWMON=y
768# CONFIG_HWMON_VID is not set 752# CONFIG_HWMON_VID is not set
769# CONFIG_SENSORS_ABITUGURU is not set 753# CONFIG_SENSORS_ABITUGURU is not set
754# CONFIG_SENSORS_AD7418 is not set
770# CONFIG_SENSORS_ADM1021 is not set 755# CONFIG_SENSORS_ADM1021 is not set
771# CONFIG_SENSORS_ADM1025 is not set 756# CONFIG_SENSORS_ADM1025 is not set
772# CONFIG_SENSORS_ADM1026 is not set 757# CONFIG_SENSORS_ADM1026 is not set
@@ -793,6 +778,7 @@ CONFIG_HWMON=y
793# CONFIG_SENSORS_LM90 is not set 778# CONFIG_SENSORS_LM90 is not set
794# CONFIG_SENSORS_LM92 is not set 779# CONFIG_SENSORS_LM92 is not set
795# CONFIG_SENSORS_MAX1619 is not set 780# CONFIG_SENSORS_MAX1619 is not set
781# CONFIG_SENSORS_MAX6650 is not set
796# CONFIG_SENSORS_PC87360 is not set 782# CONFIG_SENSORS_PC87360 is not set
797# CONFIG_SENSORS_PC87427 is not set 783# CONFIG_SENSORS_PC87427 is not set
798# CONFIG_SENSORS_SIS5595 is not set 784# CONFIG_SENSORS_SIS5595 is not set
@@ -820,17 +806,20 @@ CONFIG_HWMON=y
820# Multimedia devices 806# Multimedia devices
821# 807#
822# CONFIG_VIDEO_DEV is not set 808# CONFIG_VIDEO_DEV is not set
823 809# CONFIG_DVB_CORE is not set
824# 810CONFIG_DAB=y
825# Digital Video Broadcasting Devices
826#
827# CONFIG_DVB is not set
828# CONFIG_USB_DABUSB is not set 811# CONFIG_USB_DABUSB is not set
829 812
830# 813#
831# Graphics support 814# Graphics support
832# 815#
833# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 816# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
817
818#
819# Display device support
820#
821# CONFIG_DISPLAY_SUPPORT is not set
822# CONFIG_VGASTATE is not set
834# CONFIG_FB is not set 823# CONFIG_FB is not set
835# CONFIG_FB_IBM_GXT4500 is not set 824# CONFIG_FB_IBM_GXT4500 is not set
836 825
@@ -846,6 +835,17 @@ CONFIG_HID=y
846# CONFIG_HID_DEBUG is not set 835# CONFIG_HID_DEBUG is not set
847 836
848# 837#
838# USB Input Devices
839#
840# CONFIG_USB_HID is not set
841
842#
843# USB HID Boot Protocol drivers
844#
845# CONFIG_USB_KBD is not set
846# CONFIG_USB_MOUSE is not set
847
848#
849# USB support 849# USB support
850# 850#
851CONFIG_USB_ARCH_HAS_HCD=y 851CONFIG_USB_ARCH_HAS_HCD=y
@@ -858,6 +858,7 @@ CONFIG_USB=y
858# Miscellaneous USB options 858# Miscellaneous USB options
859# 859#
860CONFIG_USB_DEVICEFS=y 860CONFIG_USB_DEVICEFS=y
861CONFIG_USB_DEVICE_CLASS=y
861# CONFIG_USB_DYNAMIC_MINORS is not set 862# CONFIG_USB_DYNAMIC_MINORS is not set
862# CONFIG_USB_OTG is not set 863# CONFIG_USB_OTG is not set
863 864
@@ -908,44 +909,10 @@ CONFIG_USB_STORAGE=y
908# CONFIG_USB_LIBUSUAL is not set 909# CONFIG_USB_LIBUSUAL is not set
909 910
910# 911#
911# USB Input Devices
912#
913# CONFIG_USB_HID is not set
914
915#
916# USB HID Boot Protocol drivers
917#
918# CONFIG_USB_KBD is not set
919# CONFIG_USB_MOUSE is not set
920# CONFIG_USB_AIPTEK is not set
921# CONFIG_USB_WACOM is not set
922# CONFIG_USB_ACECAD is not set
923# CONFIG_USB_KBTAB is not set
924# CONFIG_USB_POWERMATE is not set
925# CONFIG_USB_TOUCHSCREEN is not set
926# CONFIG_USB_YEALINK is not set
927# CONFIG_USB_XPAD is not set
928# CONFIG_USB_ATI_REMOTE is not set
929# CONFIG_USB_ATI_REMOTE2 is not set
930# CONFIG_USB_KEYSPAN_REMOTE is not set
931# CONFIG_USB_APPLETOUCH is not set
932# CONFIG_USB_GTCO is not set
933
934#
935# USB Imaging devices 912# USB Imaging devices
936# 913#
937# CONFIG_USB_MDC800 is not set 914# CONFIG_USB_MDC800 is not set
938# CONFIG_USB_MICROTEK is not set 915# CONFIG_USB_MICROTEK is not set
939
940#
941# USB Network Adapters
942#
943# CONFIG_USB_CATC is not set
944# CONFIG_USB_KAWETH is not set
945# CONFIG_USB_PEGASUS is not set
946# CONFIG_USB_RTL8150 is not set
947# CONFIG_USB_USBNET_MII is not set
948# CONFIG_USB_USBNET is not set
949CONFIG_USB_MON=y 916CONFIG_USB_MON=y
950 917
951# 918#
@@ -989,10 +956,6 @@ CONFIG_USB_MON=y
989# USB Gadget Support 956# USB Gadget Support
990# 957#
991# CONFIG_USB_GADGET is not set 958# CONFIG_USB_GADGET is not set
992
993#
994# MMC/SD Card support
995#
996# CONFIG_MMC is not set 959# CONFIG_MMC is not set
997 960
998# 961#
@@ -1036,14 +999,6 @@ CONFIG_USB_MON=y
1036# 999#
1037 1000
1038# 1001#
1039# Auxiliary Display support
1040#
1041
1042#
1043# Virtualization
1044#
1045
1046#
1047# File systems 1002# File systems
1048# 1003#
1049CONFIG_EXT2_FS=y 1004CONFIG_EXT2_FS=y
@@ -1134,6 +1089,7 @@ CONFIG_LOCKD_V4=y
1134CONFIG_NFS_COMMON=y 1089CONFIG_NFS_COMMON=y
1135CONFIG_SUNRPC=y 1090CONFIG_SUNRPC=y
1136CONFIG_SUNRPC_GSS=y 1091CONFIG_SUNRPC_GSS=y
1092# CONFIG_SUNRPC_BIND34 is not set
1137CONFIG_RPCSEC_GSS_KRB5=y 1093CONFIG_RPCSEC_GSS_KRB5=y
1138# CONFIG_RPCSEC_GSS_SPKM3 is not set 1094# CONFIG_RPCSEC_GSS_SPKM3 is not set
1139# CONFIG_SMB_FS is not set 1095# CONFIG_SMB_FS is not set
@@ -1164,6 +1120,7 @@ CONFIG_LDM_PARTITION=y
1164# CONFIG_SUN_PARTITION is not set 1120# CONFIG_SUN_PARTITION is not set
1165# CONFIG_KARMA_PARTITION is not set 1121# CONFIG_KARMA_PARTITION is not set
1166# CONFIG_EFI_PARTITION is not set 1122# CONFIG_EFI_PARTITION is not set
1123# CONFIG_SYSV68_PARTITION is not set
1167 1124
1168# 1125#
1169# Native Language Support 1126# Native Language Support
@@ -1223,11 +1180,13 @@ CONFIG_UCC=y
1223CONFIG_BITREVERSE=y 1180CONFIG_BITREVERSE=y
1224# CONFIG_CRC_CCITT is not set 1181# CONFIG_CRC_CCITT is not set
1225# CONFIG_CRC16 is not set 1182# CONFIG_CRC16 is not set
1183# CONFIG_CRC_ITU_T is not set
1226CONFIG_CRC32=y 1184CONFIG_CRC32=y
1227# CONFIG_LIBCRC32C is not set 1185# CONFIG_LIBCRC32C is not set
1228CONFIG_PLIST=y 1186CONFIG_PLIST=y
1229CONFIG_HAS_IOMEM=y 1187CONFIG_HAS_IOMEM=y
1230CONFIG_HAS_IOPORT=y 1188CONFIG_HAS_IOPORT=y
1189CONFIG_HAS_DMA=y
1231 1190
1232# 1191#
1233# Instrumentation Support 1192# Instrumentation Support
@@ -1244,7 +1203,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1244# CONFIG_DEBUG_FS is not set 1203# CONFIG_DEBUG_FS is not set
1245# CONFIG_HEADERS_CHECK is not set 1204# CONFIG_HEADERS_CHECK is not set
1246# CONFIG_DEBUG_KERNEL is not set 1205# CONFIG_DEBUG_KERNEL is not set
1247CONFIG_LOG_BUF_SHIFT=14
1248# CONFIG_DEBUG_BUGVERBOSE is not set 1206# CONFIG_DEBUG_BUGVERBOSE is not set
1249# CONFIG_BOOTX_TEXT is not set 1207# CONFIG_BOOTX_TEXT is not set
1250# CONFIG_PPC_EARLY_DEBUG is not set 1208# CONFIG_PPC_EARLY_DEBUG is not set
@@ -1277,6 +1235,7 @@ CONFIG_CRYPTO_ECB=m
1277CONFIG_CRYPTO_CBC=y 1235CONFIG_CRYPTO_CBC=y
1278CONFIG_CRYPTO_PCBC=m 1236CONFIG_CRYPTO_PCBC=m
1279# CONFIG_CRYPTO_LRW is not set 1237# CONFIG_CRYPTO_LRW is not set
1238# CONFIG_CRYPTO_CRYPTD is not set
1280CONFIG_CRYPTO_DES=y 1239CONFIG_CRYPTO_DES=y
1281# CONFIG_CRYPTO_FCRYPT is not set 1240# CONFIG_CRYPTO_FCRYPT is not set
1282# CONFIG_CRYPTO_BLOWFISH is not set 1241# CONFIG_CRYPTO_BLOWFISH is not set
diff --git a/arch/powerpc/configs/mpc834x_itx_defconfig b/arch/powerpc/configs/mpc834x_itx_defconfig
index 23d8964846..85470b8cae 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 3# Linux kernel version: 2.6.22-rc7
4# Wed Feb 7 13:12:18 2007 4# Sun Jul 1 23:56:56 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_PPC_DCR_MMIO is not set 45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -63,14 +64,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 68# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -83,14 +87,19 @@ CONFIG_BUG=y
83CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
86# CONFIG_EPOLL is not set 91# CONFIG_EPOLL is not set
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 95CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLAB=y
98# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set
90CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94 103
95# 104#
96# Loadable module support 105# Loadable module support
@@ -122,18 +131,33 @@ CONFIG_DEFAULT_AS=y
122# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
123# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
124CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
125CONFIG_PPC_GEN550=y
126# CONFIG_WANT_EARLY_SERIAL is not set
127 134
128# 135#
129# Platform support 136# Platform support
130# 137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
143# CONFIG_MPC8313_RDB is not set
131# CONFIG_MPC832x_MDS is not set 144# CONFIG_MPC832x_MDS is not set
132# CONFIG_MPC834x_SYS is not set 145# CONFIG_MPC832x_RDB is not set
146# CONFIG_MPC834x_MDS is not set
133CONFIG_MPC834x_ITX=y 147CONFIG_MPC834x_ITX=y
134# CONFIG_MPC8360E_PB is not set 148# CONFIG_MPC836x_MDS is not set
135CONFIG_MPC834x=y 149CONFIG_MPC834x=y
136# CONFIG_MPIC is not set 150# CONFIG_MPIC is not set
151# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set
153# CONFIG_PPC_RTAS is not set
154# CONFIG_MMIO_NVRAM is not set
155# CONFIG_PPC_MPC106 is not set
156# CONFIG_PPC_970_NAP is not set
157# CONFIG_PPC_INDIRECT_IO is not set
158# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set
160# CONFIG_CPM2 is not set
137 161
138# 162#
139# Kernel options 163# Kernel options
@@ -161,32 +185,33 @@ CONFIG_FLAT_NODE_MEM_MAP=y
161# CONFIG_SPARSEMEM_STATIC is not set 185# CONFIG_SPARSEMEM_STATIC is not set
162CONFIG_SPLIT_PTLOCK_CPUS=4 186CONFIG_SPLIT_PTLOCK_CPUS=4
163# CONFIG_RESOURCES_64BIT is not set 187# CONFIG_RESOURCES_64BIT is not set
188CONFIG_ZONE_DMA_FLAG=1
164CONFIG_PROC_DEVICETREE=y 189CONFIG_PROC_DEVICETREE=y
165# CONFIG_CMDLINE_BOOL is not set 190# CONFIG_CMDLINE_BOOL is not set
166# CONFIG_PM is not set 191# CONFIG_PM is not set
167CONFIG_SECCOMP=y 192CONFIG_SECCOMP=y
193CONFIG_WANT_DEVICE_TREE=y
194CONFIG_DEVICE_TREE=""
168CONFIG_ISA_DMA_API=y 195CONFIG_ISA_DMA_API=y
169 196
170# 197#
171# Bus options 198# Bus options
172# 199#
200CONFIG_ZONE_DMA=y
173CONFIG_GENERIC_ISA_DMA=y 201CONFIG_GENERIC_ISA_DMA=y
174# CONFIG_MPIC_WEIRD is not set
175# CONFIG_PPC_I8259 is not set
176CONFIG_PPC_INDIRECT_PCI=y 202CONFIG_PPC_INDIRECT_PCI=y
203# CONFIG_PPC_INDIRECT_PCI_BE is not set
177CONFIG_FSL_SOC=y 204CONFIG_FSL_SOC=y
178CONFIG_PCI=y 205CONFIG_PCI=y
179CONFIG_PCI_DOMAINS=y 206CONFIG_PCI_DOMAINS=y
180# CONFIG_PCIEPORTBUS is not set 207# CONFIG_PCIEPORTBUS is not set
208CONFIG_ARCH_SUPPORTS_MSI=y
209# CONFIG_PCI_MSI is not set
181 210
182# 211#
183# PCCARD (PCMCIA/CardBus) support 212# PCCARD (PCMCIA/CardBus) support
184# 213#
185# CONFIG_PCCARD is not set 214# CONFIG_PCCARD is not set
186
187#
188# PCI Hotplug Support
189#
190# CONFIG_HOTPLUG_PCI is not set 215# CONFIG_HOTPLUG_PCI is not set
191 216
192# 217#
@@ -211,13 +236,13 @@ CONFIG_NET=y
211# 236#
212# Networking options 237# Networking options
213# 238#
214# CONFIG_NETDEBUG is not set
215CONFIG_PACKET=y 239CONFIG_PACKET=y
216# CONFIG_PACKET_MMAP is not set 240# CONFIG_PACKET_MMAP is not set
217CONFIG_UNIX=y 241CONFIG_UNIX=y
218CONFIG_XFRM=y 242CONFIG_XFRM=y
219# CONFIG_XFRM_USER is not set 243# CONFIG_XFRM_USER is not set
220# CONFIG_XFRM_SUB_POLICY is not set 244# CONFIG_XFRM_SUB_POLICY is not set
245# CONFIG_XFRM_MIGRATE is not set
221# CONFIG_NET_KEY is not set 246# CONFIG_NET_KEY is not set
222CONFIG_INET=y 247CONFIG_INET=y
223CONFIG_IP_MULTICAST=y 248CONFIG_IP_MULTICAST=y
@@ -251,20 +276,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
251# CONFIG_INET6_TUNNEL is not set 276# CONFIG_INET6_TUNNEL is not set
252# CONFIG_NETWORK_SECMARK is not set 277# CONFIG_NETWORK_SECMARK is not set
253# CONFIG_NETFILTER is not set 278# CONFIG_NETFILTER is not set
254
255#
256# DCCP Configuration (EXPERIMENTAL)
257#
258# CONFIG_IP_DCCP is not set 279# CONFIG_IP_DCCP is not set
259
260#
261# SCTP Configuration (EXPERIMENTAL)
262#
263# CONFIG_IP_SCTP is not set 280# CONFIG_IP_SCTP is not set
264
265#
266# TIPC Configuration (EXPERIMENTAL)
267#
268# CONFIG_TIPC is not set 281# CONFIG_TIPC is not set
269# CONFIG_ATM is not set 282# CONFIG_ATM is not set
270# CONFIG_BRIDGE is not set 283# CONFIG_BRIDGE is not set
@@ -290,7 +303,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
290# CONFIG_HAMRADIO is not set 303# CONFIG_HAMRADIO is not set
291# CONFIG_IRDA is not set 304# CONFIG_IRDA is not set
292# CONFIG_BT is not set 305# CONFIG_BT is not set
306# CONFIG_AF_RXRPC is not set
307
308#
309# Wireless
310#
311# CONFIG_CFG80211 is not set
312# CONFIG_WIRELESS_EXT is not set
313# CONFIG_MAC80211 is not set
293# CONFIG_IEEE80211 is not set 314# CONFIG_IEEE80211 is not set
315# CONFIG_RFKILL is not set
294 316
295# 317#
296# Device Drivers 318# Device Drivers
@@ -308,10 +330,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
308# Connector - unified userspace <-> kernelspace linker 330# Connector - unified userspace <-> kernelspace linker
309# 331#
310# CONFIG_CONNECTOR is not set 332# CONFIG_CONNECTOR is not set
311
312#
313# Memory Technology Devices (MTD)
314#
315CONFIG_MTD=y 333CONFIG_MTD=y
316# CONFIG_MTD_DEBUG is not set 334# CONFIG_MTD_DEBUG is not set
317# CONFIG_MTD_CONCAT is not set 335# CONFIG_MTD_CONCAT is not set
@@ -354,7 +372,6 @@ CONFIG_MTD_CFI_UTIL=y
354# CONFIG_MTD_RAM is not set 372# CONFIG_MTD_RAM is not set
355# CONFIG_MTD_ROM is not set 373# CONFIG_MTD_ROM is not set
356# CONFIG_MTD_ABSENT is not set 374# CONFIG_MTD_ABSENT is not set
357# CONFIG_MTD_OBSOLETE_CHIPS is not set
358 375
359# 376#
360# Mapping drivers for chip access 377# Mapping drivers for chip access
@@ -384,17 +401,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
384# CONFIG_MTD_DOC2000 is not set 401# CONFIG_MTD_DOC2000 is not set
385# CONFIG_MTD_DOC2001 is not set 402# CONFIG_MTD_DOC2001 is not set
386# CONFIG_MTD_DOC2001PLUS is not set 403# CONFIG_MTD_DOC2001PLUS is not set
387
388#
389# NAND Flash Device Drivers
390#
391# CONFIG_MTD_NAND is not set 404# CONFIG_MTD_NAND is not set
392# CONFIG_MTD_NAND_CAFE is not set 405# CONFIG_MTD_ONENAND is not set
393 406
394# 407#
395# OneNAND Flash Device Drivers 408# UBI - Unsorted block images
396# 409#
397# CONFIG_MTD_ONENAND is not set 410# CONFIG_MTD_UBI is not set
398 411
399# 412#
400# Parallel port support 413# Parallel port support
@@ -404,6 +417,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
404# 417#
405# Plug and Play support 418# Plug and Play support
406# 419#
420# CONFIG_PNPACPI is not set
407 421
408# 422#
409# Block devices 423# Block devices
@@ -423,19 +437,16 @@ CONFIG_BLK_DEV_RAM=y
423CONFIG_BLK_DEV_RAM_COUNT=16 437CONFIG_BLK_DEV_RAM_COUNT=16
424CONFIG_BLK_DEV_RAM_SIZE=32768 438CONFIG_BLK_DEV_RAM_SIZE=32768
425CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 439CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
426CONFIG_BLK_DEV_INITRD=y
427# CONFIG_CDROM_PKTCDVD is not set 440# CONFIG_CDROM_PKTCDVD is not set
428# CONFIG_ATA_OVER_ETH is not set 441# CONFIG_ATA_OVER_ETH is not set
429 442
430# 443#
431# Misc devices 444# Misc devices
432# 445#
446# CONFIG_PHANTOM is not set
433# CONFIG_SGI_IOC4 is not set 447# CONFIG_SGI_IOC4 is not set
434# CONFIG_TIFM_CORE is not set 448# CONFIG_TIFM_CORE is not set
435 449# CONFIG_BLINK is not set
436#
437# ATA/ATAPI/MFM/RLL support
438#
439CONFIG_IDE=y 450CONFIG_IDE=y
440CONFIG_IDE_MAX_HWIFS=4 451CONFIG_IDE_MAX_HWIFS=4
441# CONFIG_BLK_DEV_IDE is not set 452# CONFIG_BLK_DEV_IDE is not set
@@ -468,6 +479,7 @@ CONFIG_CHR_DEV_SG=y
468# CONFIG_SCSI_CONSTANTS is not set 479# CONFIG_SCSI_CONSTANTS is not set
469# CONFIG_SCSI_LOGGING is not set 480# CONFIG_SCSI_LOGGING is not set
470# CONFIG_SCSI_SCAN_ASYNC is not set 481# CONFIG_SCSI_SCAN_ASYNC is not set
482CONFIG_SCSI_WAIT_SCAN=m
471 483
472# 484#
473# SCSI Transports 485# SCSI Transports
@@ -516,10 +528,6 @@ CONFIG_SCSI_SPI_ATTRS=y
516# CONFIG_SCSI_NSP32 is not set 528# CONFIG_SCSI_NSP32 is not set
517# CONFIG_SCSI_DEBUG is not set 529# CONFIG_SCSI_DEBUG is not set
518# CONFIG_SCSI_SRP is not set 530# CONFIG_SCSI_SRP is not set
519
520#
521# Serial ATA (prod) and Parallel ATA (experimental) drivers
522#
523CONFIG_ATA=y 531CONFIG_ATA=y
524# CONFIG_ATA_NONSTANDARD is not set 532# CONFIG_ATA_NONSTANDARD is not set
525# CONFIG_SATA_AHCI is not set 533# CONFIG_SATA_AHCI is not set
@@ -537,10 +545,12 @@ CONFIG_SATA_SIL=y
537# CONFIG_SATA_ULI is not set 545# CONFIG_SATA_ULI is not set
538# CONFIG_SATA_VIA is not set 546# CONFIG_SATA_VIA is not set
539# CONFIG_SATA_VITESSE is not set 547# CONFIG_SATA_VITESSE is not set
548# CONFIG_SATA_INIC162X is not set
540# CONFIG_PATA_ALI is not set 549# CONFIG_PATA_ALI is not set
541# CONFIG_PATA_AMD is not set 550# CONFIG_PATA_AMD is not set
542# CONFIG_PATA_ARTOP is not set 551# CONFIG_PATA_ARTOP is not set
543# CONFIG_PATA_ATIIXP is not set 552# CONFIG_PATA_ATIIXP is not set
553# CONFIG_PATA_CMD640_PCI is not set
544# CONFIG_PATA_CMD64X is not set 554# CONFIG_PATA_CMD64X is not set
545# CONFIG_PATA_CS5520 is not set 555# CONFIG_PATA_CS5520 is not set
546# CONFIG_PATA_CS5530 is not set 556# CONFIG_PATA_CS5530 is not set
@@ -552,6 +562,7 @@ CONFIG_SATA_SIL=y
552# CONFIG_PATA_HPT3X2N is not set 562# CONFIG_PATA_HPT3X2N is not set
553# CONFIG_PATA_HPT3X3 is not set 563# CONFIG_PATA_HPT3X3 is not set
554# CONFIG_PATA_IT821X is not set 564# CONFIG_PATA_IT821X is not set
565# CONFIG_PATA_IT8213 is not set
555# CONFIG_PATA_JMICRON is not set 566# CONFIG_PATA_JMICRON is not set
556# CONFIG_PATA_TRIFLEX is not set 567# CONFIG_PATA_TRIFLEX is not set
557# CONFIG_PATA_MARVELL is not set 568# CONFIG_PATA_MARVELL is not set
@@ -598,18 +609,14 @@ CONFIG_MD_RAID1=y
598# 609#
599# IEEE 1394 (FireWire) support 610# IEEE 1394 (FireWire) support
600# 611#
612# CONFIG_FIREWIRE is not set
601# CONFIG_IEEE1394 is not set 613# CONFIG_IEEE1394 is not set
602 614
603# 615#
604# I2O device support 616# I2O device support
605# 617#
606# CONFIG_I2O is not set 618# CONFIG_I2O is not set
607 619# CONFIG_MACINTOSH_DRIVERS is not set
608#
609# Macintosh device drivers
610#
611# CONFIG_MAC_EMUMOUSEBTN is not set
612# CONFIG_WINDFARM is not set
613 620
614# 621#
615# Network device support 622# Network device support
@@ -619,15 +626,7 @@ CONFIG_NETDEVICES=y
619# CONFIG_BONDING is not set 626# CONFIG_BONDING is not set
620# CONFIG_EQUALIZER is not set 627# CONFIG_EQUALIZER is not set
621# CONFIG_TUN is not set 628# CONFIG_TUN is not set
622
623#
624# ARCnet devices
625#
626# CONFIG_ARCNET is not set 629# CONFIG_ARCNET is not set
627
628#
629# PHY device support
630#
631CONFIG_PHYLIB=y 630CONFIG_PHYLIB=y
632 631
633# 632#
@@ -647,10 +646,7 @@ CONFIG_CICADA_PHY=y
647# Ethernet (10 or 100Mbit) 646# Ethernet (10 or 100Mbit)
648# 647#
649# CONFIG_NET_ETHERNET is not set 648# CONFIG_NET_ETHERNET is not set
650 649CONFIG_NETDEV_1000=y
651#
652# Ethernet (1000 Mbit)
653#
654# CONFIG_ACENIC is not set 650# CONFIG_ACENIC is not set
655# CONFIG_DL2K is not set 651# CONFIG_DL2K is not set
656# CONFIG_E1000 is not set 652# CONFIG_E1000 is not set
@@ -662,34 +658,38 @@ CONFIG_CICADA_PHY=y
662# CONFIG_SKGE is not set 658# CONFIG_SKGE is not set
663# CONFIG_SKY2 is not set 659# CONFIG_SKY2 is not set
664# CONFIG_SK98LIN is not set 660# CONFIG_SK98LIN is not set
661# CONFIG_VIA_VELOCITY is not set
665# CONFIG_TIGON3 is not set 662# CONFIG_TIGON3 is not set
666# CONFIG_BNX2 is not set 663# CONFIG_BNX2 is not set
667CONFIG_GIANFAR=y 664CONFIG_GIANFAR=y
668CONFIG_GFAR_NAPI=y 665CONFIG_GFAR_NAPI=y
669# CONFIG_QLA3XXX is not set 666# CONFIG_QLA3XXX is not set
670 667# CONFIG_ATL1 is not set
671# 668CONFIG_NETDEV_10000=y
672# Ethernet (10000 Mbit)
673#
674# CONFIG_CHELSIO_T1 is not set 669# CONFIG_CHELSIO_T1 is not set
670# CONFIG_CHELSIO_T3 is not set
675# CONFIG_IXGB is not set 671# CONFIG_IXGB is not set
676# CONFIG_S2IO is not set 672# CONFIG_S2IO is not set
677# CONFIG_MYRI10GE is not set 673# CONFIG_MYRI10GE is not set
678# CONFIG_NETXEN_NIC is not set 674# CONFIG_NETXEN_NIC is not set
679 675# CONFIG_MLX4_CORE is not set
680#
681# Token Ring devices
682#
683# CONFIG_TR is not set 676# CONFIG_TR is not set
684 677
685# 678#
686# Wireless LAN (non-hamradio) 679# Wireless LAN
687# 680#
688# CONFIG_NET_RADIO is not set 681# CONFIG_WLAN_PRE80211 is not set
682# CONFIG_WLAN_80211 is not set
689 683
690# 684#
691# Wan interfaces 685# USB Network Adapters
692# 686#
687# CONFIG_USB_CATC is not set
688# CONFIG_USB_KAWETH is not set
689# CONFIG_USB_PEGASUS is not set
690# CONFIG_USB_RTL8150 is not set
691# CONFIG_USB_USBNET_MII is not set
692# CONFIG_USB_USBNET is not set
693# CONFIG_WAN is not set 693# CONFIG_WAN is not set
694# CONFIG_FDDI is not set 694# CONFIG_FDDI is not set
695# CONFIG_HIPPI is not set 695# CONFIG_HIPPI is not set
@@ -745,6 +745,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
745CONFIG_SERIAL_CORE=y 745CONFIG_SERIAL_CORE=y
746CONFIG_SERIAL_CORE_CONSOLE=y 746CONFIG_SERIAL_CORE_CONSOLE=y
747# CONFIG_SERIAL_JSM is not set 747# CONFIG_SERIAL_JSM is not set
748# CONFIG_SERIAL_OF_PLATFORM is not set
748CONFIG_UNIX98_PTYS=y 749CONFIG_UNIX98_PTYS=y
749CONFIG_LEGACY_PTYS=y 750CONFIG_LEGACY_PTYS=y
750CONFIG_LEGACY_PTY_COUNT=256 751CONFIG_LEGACY_PTY_COUNT=256
@@ -753,10 +754,6 @@ CONFIG_LEGACY_PTY_COUNT=256
753# IPMI 754# IPMI
754# 755#
755# CONFIG_IPMI_HANDLER is not set 756# CONFIG_IPMI_HANDLER is not set
756
757#
758# Watchdog Cards
759#
760CONFIG_WATCHDOG=y 757CONFIG_WATCHDOG=y
761# CONFIG_WATCHDOG_NOWAYOUT is not set 758# CONFIG_WATCHDOG_NOWAYOUT is not set
762 759
@@ -779,7 +776,6 @@ CONFIG_83xx_WDT=y
779CONFIG_HW_RANDOM=y 776CONFIG_HW_RANDOM=y
780# CONFIG_NVRAM is not set 777# CONFIG_NVRAM is not set
781# CONFIG_GEN_RTC is not set 778# CONFIG_GEN_RTC is not set
782# CONFIG_DTLK is not set
783# CONFIG_R3964 is not set 779# CONFIG_R3964 is not set
784# CONFIG_APPLICOM is not set 780# CONFIG_APPLICOM is not set
785# CONFIG_AGP is not set 781# CONFIG_AGP is not set
@@ -790,11 +786,9 @@ CONFIG_HW_RANDOM=y
790# TPM devices 786# TPM devices
791# 787#
792# CONFIG_TCG_TPM is not set 788# CONFIG_TCG_TPM is not set
793 789CONFIG_DEVPORT=y
794#
795# I2C support
796#
797CONFIG_I2C=y 790CONFIG_I2C=y
791CONFIG_I2C_BOARDINFO=y
798CONFIG_I2C_CHARDEV=y 792CONFIG_I2C_CHARDEV=y
799 793
800# 794#
@@ -821,14 +815,15 @@ CONFIG_I2C_MPC=y
821# CONFIG_I2C_PARPORT_LIGHT is not set 815# CONFIG_I2C_PARPORT_LIGHT is not set
822# CONFIG_I2C_PROSAVAGE is not set 816# CONFIG_I2C_PROSAVAGE is not set
823# CONFIG_I2C_SAVAGE4 is not set 817# CONFIG_I2C_SAVAGE4 is not set
818# CONFIG_I2C_SIMTEC is not set
824# CONFIG_I2C_SIS5595 is not set 819# CONFIG_I2C_SIS5595 is not set
825# CONFIG_I2C_SIS630 is not set 820# CONFIG_I2C_SIS630 is not set
826# CONFIG_I2C_SIS96X is not set 821# CONFIG_I2C_SIS96X is not set
827# CONFIG_I2C_STUB is not set 822# CONFIG_I2C_STUB is not set
823# CONFIG_I2C_TINY_USB is not set
828# CONFIG_I2C_VIA is not set 824# CONFIG_I2C_VIA is not set
829# CONFIG_I2C_VIAPRO is not set 825# CONFIG_I2C_VIAPRO is not set
830# CONFIG_I2C_VOODOO3 is not set 826# CONFIG_I2C_VOODOO3 is not set
831# CONFIG_I2C_PCA_ISA is not set
832 827
833# 828#
834# Miscellaneous I2C Chip support 829# Miscellaneous I2C Chip support
@@ -861,36 +856,40 @@ CONFIG_SPI_MPC83xx=y
861# 856#
862# SPI Protocol Masters 857# SPI Protocol Masters
863# 858#
859# CONFIG_SPI_AT25 is not set
860# CONFIG_SPI_SPIDEV is not set
864 861
865# 862#
866# Dallas's 1-wire bus 863# Dallas's 1-wire bus
867# 864#
868# CONFIG_W1 is not set 865# CONFIG_W1 is not set
866# CONFIG_HWMON is not set
869 867
870# 868#
871# Hardware Monitoring support 869# Multifunction device drivers
872# 870#
873# CONFIG_HWMON is not set 871# CONFIG_MFD_SM501 is not set
874# CONFIG_HWMON_VID is not set
875 872
876# 873#
877# Multimedia devices 874# Multimedia devices
878# 875#
879# CONFIG_VIDEO_DEV is not set 876# CONFIG_VIDEO_DEV is not set
877# CONFIG_DVB_CORE is not set
878CONFIG_DAB=y
879# CONFIG_USB_DABUSB is not set
880 880
881# 881#
882# Digital Video Broadcasting Devices 882# Graphics support
883# 883#
884# CONFIG_DVB is not set 884# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
885# CONFIG_USB_DABUSB is not set
886 885
887# 886#
888# Graphics support 887# Display device support
889# 888#
890# CONFIG_FIRMWARE_EDID is not set 889# CONFIG_DISPLAY_SUPPORT is not set
890# CONFIG_VGASTATE is not set
891# CONFIG_FB is not set 891# CONFIG_FB is not set
892# CONFIG_FB_IBM_GXT4500 is not set 892# CONFIG_FB_IBM_GXT4500 is not set
893# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
894 893
895# 894#
896# Sound 895# Sound
@@ -910,7 +909,7 @@ CONFIG_USB=y
910# Miscellaneous USB options 909# Miscellaneous USB options
911# 910#
912CONFIG_USB_DEVICEFS=y 911CONFIG_USB_DEVICEFS=y
913# CONFIG_USB_BANDWIDTH is not set 912CONFIG_USB_DEVICE_CLASS=y
914# CONFIG_USB_DYNAMIC_MINORS is not set 913# CONFIG_USB_DYNAMIC_MINORS is not set
915# CONFIG_USB_OTG is not set 914# CONFIG_USB_OTG is not set
916 915
@@ -921,6 +920,7 @@ CONFIG_USB_EHCI_HCD=y
921# CONFIG_USB_EHCI_SPLIT_ISO is not set 920# CONFIG_USB_EHCI_SPLIT_ISO is not set
922# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 921# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
923# 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
924# CONFIG_USB_ISP116X_HCD is not set 924# CONFIG_USB_ISP116X_HCD is not set
925# CONFIG_USB_OHCI_HCD is not set 925# CONFIG_USB_OHCI_HCD is not set
926# CONFIG_USB_UHCI_HCD is not set 926# CONFIG_USB_UHCI_HCD is not set
@@ -953,28 +953,10 @@ CONFIG_USB_STORAGE=y
953# CONFIG_USB_LIBUSUAL is not set 953# CONFIG_USB_LIBUSUAL is not set
954 954
955# 955#
956# USB Input Devices
957#
958
959#
960# USB HID Boot Protocol drivers
961#
962
963#
964# USB Imaging devices 956# USB Imaging devices
965# 957#
966# CONFIG_USB_MDC800 is not set 958# CONFIG_USB_MDC800 is not set
967# CONFIG_USB_MICROTEK is not set 959# CONFIG_USB_MICROTEK is not set
968
969#
970# USB Network Adapters
971#
972# CONFIG_USB_CATC is not set
973# CONFIG_USB_KAWETH is not set
974# CONFIG_USB_PEGASUS is not set
975# CONFIG_USB_RTL8150 is not set
976# CONFIG_USB_USBNET_MII is not set
977# CONFIG_USB_USBNET is not set
978CONFIG_USB_MON=y 960CONFIG_USB_MON=y
979 961
980# 962#
@@ -996,6 +978,7 @@ CONFIG_USB_MON=y
996# CONFIG_USB_RIO500 is not set 978# CONFIG_USB_RIO500 is not set
997# CONFIG_USB_LEGOTOWER is not set 979# CONFIG_USB_LEGOTOWER is not set
998# CONFIG_USB_LCD is not set 980# CONFIG_USB_LCD is not set
981# CONFIG_USB_BERRY_CHARGE is not set
999# CONFIG_USB_LED is not set 982# CONFIG_USB_LED is not set
1000# CONFIG_USB_CYPRESS_CY7C63 is not set 983# CONFIG_USB_CYPRESS_CY7C63 is not set
1001# CONFIG_USB_CYTHERM is not set 984# CONFIG_USB_CYTHERM is not set
@@ -1006,6 +989,7 @@ CONFIG_USB_MON=y
1006# CONFIG_USB_SISUSBVGA is not set 989# CONFIG_USB_SISUSBVGA is not set
1007# CONFIG_USB_LD is not set 990# CONFIG_USB_LD is not set
1008# CONFIG_USB_TRANCEVIBRATOR is not set 991# CONFIG_USB_TRANCEVIBRATOR is not set
992# CONFIG_USB_IOWARRIOR is not set
1009# CONFIG_USB_TEST is not set 993# CONFIG_USB_TEST is not set
1010 994
1011# 995#
@@ -1016,10 +1000,6 @@ CONFIG_USB_MON=y
1016# USB Gadget Support 1000# USB Gadget Support
1017# 1001#
1018# CONFIG_USB_GADGET is not set 1002# CONFIG_USB_GADGET is not set
1019
1020#
1021# MMC/SD Card support
1022#
1023# CONFIG_MMC is not set 1003# CONFIG_MMC is not set
1024 1004
1025# 1005#
@@ -1060,26 +1040,39 @@ CONFIG_RTC_INTF_SYSFS=y
1060CONFIG_RTC_INTF_PROC=y 1040CONFIG_RTC_INTF_PROC=y
1061CONFIG_RTC_INTF_DEV=y 1041CONFIG_RTC_INTF_DEV=y
1062CONFIG_RTC_INTF_DEV_UIE_EMUL=y 1042CONFIG_RTC_INTF_DEV_UIE_EMUL=y
1043# CONFIG_RTC_DRV_TEST is not set
1063 1044
1064# 1045#
1065# RTC drivers 1046# I2C RTC drivers
1066# 1047#
1067# CONFIG_RTC_DRV_X1205 is not set
1068CONFIG_RTC_DRV_DS1307=y 1048CONFIG_RTC_DRV_DS1307=y
1069# CONFIG_RTC_DRV_DS1553 is not set
1070# CONFIG_RTC_DRV_ISL1208 is not set
1071# CONFIG_RTC_DRV_DS1672 is not set 1049# CONFIG_RTC_DRV_DS1672 is not set
1072# CONFIG_RTC_DRV_DS1742 is not set 1050# CONFIG_RTC_DRV_MAX6900 is not set
1051# CONFIG_RTC_DRV_RS5C372 is not set
1052# CONFIG_RTC_DRV_ISL1208 is not set
1053# CONFIG_RTC_DRV_X1205 is not set
1073# CONFIG_RTC_DRV_PCF8563 is not set 1054# CONFIG_RTC_DRV_PCF8563 is not set
1074# CONFIG_RTC_DRV_PCF8583 is not set 1055# CONFIG_RTC_DRV_PCF8583 is not set
1056
1057#
1058# SPI RTC drivers
1059#
1075# CONFIG_RTC_DRV_RS5C348 is not set 1060# CONFIG_RTC_DRV_RS5C348 is not set
1076# CONFIG_RTC_DRV_RS5C372 is not set
1077# CONFIG_RTC_DRV_M48T86 is not set
1078# CONFIG_RTC_DRV_TEST is not set
1079# CONFIG_RTC_DRV_MAX6902 is not set 1061# CONFIG_RTC_DRV_MAX6902 is not set
1062
1063#
1064# Platform RTC drivers
1065#
1066# CONFIG_RTC_DRV_DS1553 is not set
1067# CONFIG_RTC_DRV_DS1742 is not set
1068# CONFIG_RTC_DRV_M48T86 is not set
1080# CONFIG_RTC_DRV_V3020 is not set 1069# CONFIG_RTC_DRV_V3020 is not set
1081 1070
1082# 1071#
1072# on-CPU RTC drivers
1073#
1074
1075#
1083# DMA Engine support 1076# DMA Engine support
1084# 1077#
1085CONFIG_DMA_ENGINE=y 1078CONFIG_DMA_ENGINE=y
@@ -1095,10 +1088,6 @@ CONFIG_NET_DMA=y
1095CONFIG_INTEL_IOATDMA=y 1088CONFIG_INTEL_IOATDMA=y
1096 1089
1097# 1090#
1098# Virtualization
1099#
1100
1101#
1102# File systems 1091# File systems
1103# 1092#
1104CONFIG_EXT2_FS=y 1093CONFIG_EXT2_FS=y
@@ -1190,6 +1179,7 @@ CONFIG_LOCKD_V4=y
1190CONFIG_NFS_COMMON=y 1179CONFIG_NFS_COMMON=y
1191CONFIG_SUNRPC=y 1180CONFIG_SUNRPC=y
1192CONFIG_SUNRPC_GSS=y 1181CONFIG_SUNRPC_GSS=y
1182# CONFIG_SUNRPC_BIND34 is not set
1193CONFIG_RPCSEC_GSS_KRB5=y 1183CONFIG_RPCSEC_GSS_KRB5=y
1194# CONFIG_RPCSEC_GSS_SPKM3 is not set 1184# CONFIG_RPCSEC_GSS_SPKM3 is not set
1195# CONFIG_SMB_FS is not set 1185# CONFIG_SMB_FS is not set
@@ -1219,6 +1209,7 @@ CONFIG_MSDOS_PARTITION=y
1219# CONFIG_SUN_PARTITION is not set 1209# CONFIG_SUN_PARTITION is not set
1220# CONFIG_KARMA_PARTITION is not set 1210# CONFIG_KARMA_PARTITION is not set
1221# CONFIG_EFI_PARTITION is not set 1211# CONFIG_EFI_PARTITION is not set
1212# CONFIG_SYSV68_PARTITION is not set
1222 1213
1223# 1214#
1224# Native Language Support 1215# Native Language Support
@@ -1268,6 +1259,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1268# Distributed Lock Manager 1259# Distributed Lock Manager
1269# 1260#
1270# CONFIG_DLM is not set 1261# CONFIG_DLM is not set
1262# CONFIG_UCC_SLOW is not set
1271 1263
1272# 1264#
1273# Library routines 1265# Library routines
@@ -1275,10 +1267,13 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1275CONFIG_BITREVERSE=y 1267CONFIG_BITREVERSE=y
1276# CONFIG_CRC_CCITT is not set 1268# CONFIG_CRC_CCITT is not set
1277# CONFIG_CRC16 is not set 1269# CONFIG_CRC16 is not set
1270# CONFIG_CRC_ITU_T is not set
1278CONFIG_CRC32=y 1271CONFIG_CRC32=y
1279# CONFIG_LIBCRC32C is not set 1272# CONFIG_LIBCRC32C is not set
1280CONFIG_PLIST=y 1273CONFIG_PLIST=y
1281CONFIG_IOMAP_COPY=y 1274CONFIG_HAS_IOMEM=y
1275CONFIG_HAS_IOPORT=y
1276CONFIG_HAS_DMA=y
1282 1277
1283# 1278#
1284# Instrumentation Support 1279# Instrumentation Support
@@ -1295,10 +1290,8 @@ CONFIG_ENABLE_MUST_CHECK=y
1295# CONFIG_DEBUG_FS is not set 1290# CONFIG_DEBUG_FS is not set
1296# CONFIG_HEADERS_CHECK is not set 1291# CONFIG_HEADERS_CHECK is not set
1297# CONFIG_DEBUG_KERNEL is not set 1292# CONFIG_DEBUG_KERNEL is not set
1298CONFIG_LOG_BUF_SHIFT=14
1299# CONFIG_DEBUG_BUGVERBOSE is not set 1293# CONFIG_DEBUG_BUGVERBOSE is not set
1300# CONFIG_BOOTX_TEXT is not set 1294# CONFIG_BOOTX_TEXT is not set
1301# CONFIG_SERIAL_TEXT_DEBUG is not set
1302# CONFIG_PPC_EARLY_DEBUG is not set 1295# CONFIG_PPC_EARLY_DEBUG is not set
1303 1296
1304# 1297#
@@ -1327,8 +1320,11 @@ CONFIG_CRYPTO_MD5=y
1327# CONFIG_CRYPTO_GF128MUL is not set 1320# CONFIG_CRYPTO_GF128MUL is not set
1328# CONFIG_CRYPTO_ECB is not set 1321# CONFIG_CRYPTO_ECB is not set
1329CONFIG_CRYPTO_CBC=y 1322CONFIG_CRYPTO_CBC=y
1323CONFIG_CRYPTO_PCBC=m
1330# CONFIG_CRYPTO_LRW is not set 1324# CONFIG_CRYPTO_LRW is not set
1325# CONFIG_CRYPTO_CRYPTD is not set
1331CONFIG_CRYPTO_DES=y 1326CONFIG_CRYPTO_DES=y
1327# CONFIG_CRYPTO_FCRYPT is not set
1332# CONFIG_CRYPTO_BLOWFISH is not set 1328# CONFIG_CRYPTO_BLOWFISH is not set
1333# CONFIG_CRYPTO_TWOFISH is not set 1329# CONFIG_CRYPTO_TWOFISH is not set
1334# CONFIG_CRYPTO_SERPENT is not set 1330# CONFIG_CRYPTO_SERPENT is not set
@@ -1342,6 +1338,7 @@ CONFIG_CRYPTO_DES=y
1342# CONFIG_CRYPTO_DEFLATE is not set 1338# CONFIG_CRYPTO_DEFLATE is not set
1343# CONFIG_CRYPTO_MICHAEL_MIC is not set 1339# CONFIG_CRYPTO_MICHAEL_MIC is not set
1344# CONFIG_CRYPTO_CRC32C is not set 1340# CONFIG_CRYPTO_CRC32C is not set
1341# CONFIG_CRYPTO_CAMELLIA is not set
1345# CONFIG_CRYPTO_TEST is not set 1342# CONFIG_CRYPTO_TEST is not set
1346 1343
1347# 1344#
diff --git a/arch/powerpc/configs/mpc834x_itxgp_defconfig b/arch/powerpc/configs/mpc834x_itxgp_defconfig
index 4aa666c9cb..704ee8b285 100644
--- a/arch/powerpc/configs/mpc834x_itxgp_defconfig
+++ b/arch/powerpc/configs/mpc834x_itxgp_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 3# Linux kernel version: 2.6.22-rc7
4# Fri Feb 9 13:28:19 2007 4# Sun Jul 1 23:56:56 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_PPC_DCR_MMIO is not set 45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -63,14 +64,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 68# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -83,14 +87,19 @@ CONFIG_BUG=y
83CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
86# CONFIG_EPOLL is not set 91# CONFIG_EPOLL is not set
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 95CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLAB=y
98# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set
90CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94 103
95# 104#
96# Loadable module support 105# Loadable module support
@@ -122,18 +131,33 @@ CONFIG_DEFAULT_AS=y
122# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
123# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
124CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
125CONFIG_PPC_GEN550=y
126# CONFIG_WANT_EARLY_SERIAL is not set
127 134
128# 135#
129# Platform support 136# Platform support
130# 137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
143# CONFIG_MPC8313_RDB is not set
131# CONFIG_MPC832x_MDS is not set 144# CONFIG_MPC832x_MDS is not set
132# CONFIG_MPC834x_SYS is not set 145# CONFIG_MPC832x_RDB is not set
146# CONFIG_MPC834x_MDS is not set
133CONFIG_MPC834x_ITX=y 147CONFIG_MPC834x_ITX=y
134# CONFIG_MPC8360E_PB is not set 148# CONFIG_MPC836x_MDS is not set
135CONFIG_MPC834x=y 149CONFIG_MPC834x=y
136# CONFIG_MPIC is not set 150# CONFIG_MPIC is not set
151# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set
153# CONFIG_PPC_RTAS is not set
154# CONFIG_MMIO_NVRAM is not set
155# CONFIG_PPC_MPC106 is not set
156# CONFIG_PPC_970_NAP is not set
157# CONFIG_PPC_INDIRECT_IO is not set
158# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set
160# CONFIG_CPM2 is not set
137 161
138# 162#
139# Kernel options 163# Kernel options
@@ -161,32 +185,33 @@ CONFIG_FLAT_NODE_MEM_MAP=y
161# CONFIG_SPARSEMEM_STATIC is not set 185# CONFIG_SPARSEMEM_STATIC is not set
162CONFIG_SPLIT_PTLOCK_CPUS=4 186CONFIG_SPLIT_PTLOCK_CPUS=4
163# CONFIG_RESOURCES_64BIT is not set 187# CONFIG_RESOURCES_64BIT is not set
188CONFIG_ZONE_DMA_FLAG=1
164CONFIG_PROC_DEVICETREE=y 189CONFIG_PROC_DEVICETREE=y
165# CONFIG_CMDLINE_BOOL is not set 190# CONFIG_CMDLINE_BOOL is not set
166# CONFIG_PM is not set 191# CONFIG_PM is not set
167CONFIG_SECCOMP=y 192CONFIG_SECCOMP=y
193CONFIG_WANT_DEVICE_TREE=y
194CONFIG_DEVICE_TREE=""
168CONFIG_ISA_DMA_API=y 195CONFIG_ISA_DMA_API=y
169 196
170# 197#
171# Bus options 198# Bus options
172# 199#
200CONFIG_ZONE_DMA=y
173CONFIG_GENERIC_ISA_DMA=y 201CONFIG_GENERIC_ISA_DMA=y
174# CONFIG_MPIC_WEIRD is not set
175# CONFIG_PPC_I8259 is not set
176CONFIG_PPC_INDIRECT_PCI=y 202CONFIG_PPC_INDIRECT_PCI=y
203# CONFIG_PPC_INDIRECT_PCI_BE is not set
177CONFIG_FSL_SOC=y 204CONFIG_FSL_SOC=y
178CONFIG_PCI=y 205CONFIG_PCI=y
179CONFIG_PCI_DOMAINS=y 206CONFIG_PCI_DOMAINS=y
180# CONFIG_PCIEPORTBUS is not set 207# CONFIG_PCIEPORTBUS is not set
208CONFIG_ARCH_SUPPORTS_MSI=y
209# CONFIG_PCI_MSI is not set
181 210
182# 211#
183# PCCARD (PCMCIA/CardBus) support 212# PCCARD (PCMCIA/CardBus) support
184# 213#
185# CONFIG_PCCARD is not set 214# CONFIG_PCCARD is not set
186
187#
188# PCI Hotplug Support
189#
190# CONFIG_HOTPLUG_PCI is not set 215# CONFIG_HOTPLUG_PCI is not set
191 216
192# 217#
@@ -211,13 +236,13 @@ CONFIG_NET=y
211# 236#
212# Networking options 237# Networking options
213# 238#
214# CONFIG_NETDEBUG is not set
215CONFIG_PACKET=y 239CONFIG_PACKET=y
216# CONFIG_PACKET_MMAP is not set 240# CONFIG_PACKET_MMAP is not set
217CONFIG_UNIX=y 241CONFIG_UNIX=y
218CONFIG_XFRM=y 242CONFIG_XFRM=y
219# CONFIG_XFRM_USER is not set 243# CONFIG_XFRM_USER is not set
220# CONFIG_XFRM_SUB_POLICY is not set 244# CONFIG_XFRM_SUB_POLICY is not set
245# CONFIG_XFRM_MIGRATE is not set
221# CONFIG_NET_KEY is not set 246# CONFIG_NET_KEY is not set
222CONFIG_INET=y 247CONFIG_INET=y
223CONFIG_IP_MULTICAST=y 248CONFIG_IP_MULTICAST=y
@@ -251,20 +276,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
251# CONFIG_INET6_TUNNEL is not set 276# CONFIG_INET6_TUNNEL is not set
252# CONFIG_NETWORK_SECMARK is not set 277# CONFIG_NETWORK_SECMARK is not set
253# CONFIG_NETFILTER is not set 278# CONFIG_NETFILTER is not set
254
255#
256# DCCP Configuration (EXPERIMENTAL)
257#
258# CONFIG_IP_DCCP is not set 279# CONFIG_IP_DCCP is not set
259
260#
261# SCTP Configuration (EXPERIMENTAL)
262#
263# CONFIG_IP_SCTP is not set 280# CONFIG_IP_SCTP is not set
264
265#
266# TIPC Configuration (EXPERIMENTAL)
267#
268# CONFIG_TIPC is not set 281# CONFIG_TIPC is not set
269# CONFIG_ATM is not set 282# CONFIG_ATM is not set
270# CONFIG_BRIDGE is not set 283# CONFIG_BRIDGE is not set
@@ -290,7 +303,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
290# CONFIG_HAMRADIO is not set 303# CONFIG_HAMRADIO is not set
291# CONFIG_IRDA is not set 304# CONFIG_IRDA is not set
292# CONFIG_BT is not set 305# CONFIG_BT is not set
306# CONFIG_AF_RXRPC is not set
307
308#
309# Wireless
310#
311# CONFIG_CFG80211 is not set
312# CONFIG_WIRELESS_EXT is not set
313# CONFIG_MAC80211 is not set
293# CONFIG_IEEE80211 is not set 314# CONFIG_IEEE80211 is not set
315# CONFIG_RFKILL is not set
294 316
295# 317#
296# Device Drivers 318# Device Drivers
@@ -308,10 +330,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
308# Connector - unified userspace <-> kernelspace linker 330# Connector - unified userspace <-> kernelspace linker
309# 331#
310# CONFIG_CONNECTOR is not set 332# CONFIG_CONNECTOR is not set
311
312#
313# Memory Technology Devices (MTD)
314#
315CONFIG_MTD=y 333CONFIG_MTD=y
316# CONFIG_MTD_DEBUG is not set 334# CONFIG_MTD_DEBUG is not set
317# CONFIG_MTD_CONCAT is not set 335# CONFIG_MTD_CONCAT is not set
@@ -354,7 +372,6 @@ CONFIG_MTD_CFI_UTIL=y
354# CONFIG_MTD_RAM is not set 372# CONFIG_MTD_RAM is not set
355# CONFIG_MTD_ROM is not set 373# CONFIG_MTD_ROM is not set
356# CONFIG_MTD_ABSENT is not set 374# CONFIG_MTD_ABSENT is not set
357# CONFIG_MTD_OBSOLETE_CHIPS is not set
358 375
359# 376#
360# Mapping drivers for chip access 377# Mapping drivers for chip access
@@ -384,17 +401,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
384# CONFIG_MTD_DOC2000 is not set 401# CONFIG_MTD_DOC2000 is not set
385# CONFIG_MTD_DOC2001 is not set 402# CONFIG_MTD_DOC2001 is not set
386# CONFIG_MTD_DOC2001PLUS is not set 403# CONFIG_MTD_DOC2001PLUS is not set
387
388#
389# NAND Flash Device Drivers
390#
391# CONFIG_MTD_NAND is not set 404# CONFIG_MTD_NAND is not set
392# CONFIG_MTD_NAND_CAFE is not set 405# CONFIG_MTD_ONENAND is not set
393 406
394# 407#
395# OneNAND Flash Device Drivers 408# UBI - Unsorted block images
396# 409#
397# CONFIG_MTD_ONENAND is not set 410# CONFIG_MTD_UBI is not set
398 411
399# 412#
400# Parallel port support 413# Parallel port support
@@ -404,6 +417,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
404# 417#
405# Plug and Play support 418# Plug and Play support
406# 419#
420# CONFIG_PNPACPI is not set
407 421
408# 422#
409# Block devices 423# Block devices
@@ -422,19 +436,16 @@ CONFIG_BLK_DEV_RAM=y
422CONFIG_BLK_DEV_RAM_COUNT=16 436CONFIG_BLK_DEV_RAM_COUNT=16
423CONFIG_BLK_DEV_RAM_SIZE=32768 437CONFIG_BLK_DEV_RAM_SIZE=32768
424CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 438CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
425CONFIG_BLK_DEV_INITRD=y
426# CONFIG_CDROM_PKTCDVD is not set 439# CONFIG_CDROM_PKTCDVD is not set
427# CONFIG_ATA_OVER_ETH is not set 440# CONFIG_ATA_OVER_ETH is not set
428 441
429# 442#
430# Misc devices 443# Misc devices
431# 444#
445# CONFIG_PHANTOM is not set
432# CONFIG_SGI_IOC4 is not set 446# CONFIG_SGI_IOC4 is not set
433# CONFIG_TIFM_CORE is not set 447# CONFIG_TIFM_CORE is not set
434 448# CONFIG_BLINK is not set
435#
436# ATA/ATAPI/MFM/RLL support
437#
438# CONFIG_IDE is not set 449# CONFIG_IDE is not set
439 450
440# 451#
@@ -463,6 +474,7 @@ CONFIG_CHR_DEV_SG=y
463# CONFIG_SCSI_CONSTANTS is not set 474# CONFIG_SCSI_CONSTANTS is not set
464# CONFIG_SCSI_LOGGING is not set 475# CONFIG_SCSI_LOGGING is not set
465# CONFIG_SCSI_SCAN_ASYNC is not set 476# CONFIG_SCSI_SCAN_ASYNC is not set
477CONFIG_SCSI_WAIT_SCAN=m
466 478
467# 479#
468# SCSI Transports 480# SCSI Transports
@@ -510,10 +522,6 @@ CONFIG_SCSI_SPI_ATTRS=y
510# CONFIG_SCSI_NSP32 is not set 522# CONFIG_SCSI_NSP32 is not set
511# CONFIG_SCSI_DEBUG is not set 523# CONFIG_SCSI_DEBUG is not set
512# CONFIG_SCSI_SRP is not set 524# CONFIG_SCSI_SRP is not set
513
514#
515# Serial ATA (prod) and Parallel ATA (experimental) drivers
516#
517# CONFIG_ATA is not set 525# CONFIG_ATA is not set
518 526
519# 527#
@@ -532,18 +540,14 @@ CONFIG_SCSI_SPI_ATTRS=y
532# 540#
533# IEEE 1394 (FireWire) support 541# IEEE 1394 (FireWire) support
534# 542#
543# CONFIG_FIREWIRE is not set
535# CONFIG_IEEE1394 is not set 544# CONFIG_IEEE1394 is not set
536 545
537# 546#
538# I2O device support 547# I2O device support
539# 548#
540# CONFIG_I2O is not set 549# CONFIG_I2O is not set
541 550# CONFIG_MACINTOSH_DRIVERS is not set
542#
543# Macintosh device drivers
544#
545# CONFIG_MAC_EMUMOUSEBTN is not set
546# CONFIG_WINDFARM is not set
547 551
548# 552#
549# Network device support 553# Network device support
@@ -553,15 +557,7 @@ CONFIG_NETDEVICES=y
553# CONFIG_BONDING is not set 557# CONFIG_BONDING is not set
554# CONFIG_EQUALIZER is not set 558# CONFIG_EQUALIZER is not set
555# CONFIG_TUN is not set 559# CONFIG_TUN is not set
556
557#
558# ARCnet devices
559#
560# CONFIG_ARCNET is not set 560# CONFIG_ARCNET is not set
561
562#
563# PHY device support
564#
565CONFIG_PHYLIB=y 561CONFIG_PHYLIB=y
566 562
567# 563#
@@ -581,10 +577,7 @@ CONFIG_CICADA_PHY=y
581# Ethernet (10 or 100Mbit) 577# Ethernet (10 or 100Mbit)
582# 578#
583# CONFIG_NET_ETHERNET is not set 579# CONFIG_NET_ETHERNET is not set
584 580CONFIG_NETDEV_1000=y
585#
586# Ethernet (1000 Mbit)
587#
588# CONFIG_ACENIC is not set 581# CONFIG_ACENIC is not set
589# CONFIG_DL2K is not set 582# CONFIG_DL2K is not set
590# CONFIG_E1000 is not set 583# CONFIG_E1000 is not set
@@ -596,34 +589,28 @@ CONFIG_CICADA_PHY=y
596# CONFIG_SKGE is not set 589# CONFIG_SKGE is not set
597# CONFIG_SKY2 is not set 590# CONFIG_SKY2 is not set
598# CONFIG_SK98LIN is not set 591# CONFIG_SK98LIN is not set
592# CONFIG_VIA_VELOCITY is not set
599# CONFIG_TIGON3 is not set 593# CONFIG_TIGON3 is not set
600# CONFIG_BNX2 is not set 594# CONFIG_BNX2 is not set
601CONFIG_GIANFAR=y 595CONFIG_GIANFAR=y
602CONFIG_GFAR_NAPI=y 596CONFIG_GFAR_NAPI=y
603# CONFIG_QLA3XXX is not set 597# CONFIG_QLA3XXX is not set
604 598# CONFIG_ATL1 is not set
605# 599CONFIG_NETDEV_10000=y
606# Ethernet (10000 Mbit)
607#
608# CONFIG_CHELSIO_T1 is not set 600# CONFIG_CHELSIO_T1 is not set
601# CONFIG_CHELSIO_T3 is not set
609# CONFIG_IXGB is not set 602# CONFIG_IXGB is not set
610# CONFIG_S2IO is not set 603# CONFIG_S2IO is not set
611# CONFIG_MYRI10GE is not set 604# CONFIG_MYRI10GE is not set
612# CONFIG_NETXEN_NIC is not set 605# CONFIG_NETXEN_NIC is not set
613 606# CONFIG_MLX4_CORE is not set
614#
615# Token Ring devices
616#
617# CONFIG_TR is not set 607# CONFIG_TR is not set
618 608
619# 609#
620# Wireless LAN (non-hamradio) 610# Wireless LAN
621#
622# CONFIG_NET_RADIO is not set
623
624#
625# Wan interfaces
626# 611#
612# CONFIG_WLAN_PRE80211 is not set
613# CONFIG_WLAN_80211 is not set
627# CONFIG_WAN is not set 614# CONFIG_WAN is not set
628# CONFIG_FDDI is not set 615# CONFIG_FDDI is not set
629# CONFIG_HIPPI is not set 616# CONFIG_HIPPI is not set
@@ -679,6 +666,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
679CONFIG_SERIAL_CORE=y 666CONFIG_SERIAL_CORE=y
680CONFIG_SERIAL_CORE_CONSOLE=y 667CONFIG_SERIAL_CORE_CONSOLE=y
681# CONFIG_SERIAL_JSM is not set 668# CONFIG_SERIAL_JSM is not set
669# CONFIG_SERIAL_OF_PLATFORM is not set
682CONFIG_UNIX98_PTYS=y 670CONFIG_UNIX98_PTYS=y
683CONFIG_LEGACY_PTYS=y 671CONFIG_LEGACY_PTYS=y
684CONFIG_LEGACY_PTY_COUNT=256 672CONFIG_LEGACY_PTY_COUNT=256
@@ -687,10 +675,6 @@ CONFIG_LEGACY_PTY_COUNT=256
687# IPMI 675# IPMI
688# 676#
689# CONFIG_IPMI_HANDLER is not set 677# CONFIG_IPMI_HANDLER is not set
690
691#
692# Watchdog Cards
693#
694CONFIG_WATCHDOG=y 678CONFIG_WATCHDOG=y
695# CONFIG_WATCHDOG_NOWAYOUT is not set 679# CONFIG_WATCHDOG_NOWAYOUT is not set
696 680
@@ -708,7 +692,6 @@ CONFIG_83xx_WDT=y
708CONFIG_HW_RANDOM=y 692CONFIG_HW_RANDOM=y
709# CONFIG_NVRAM is not set 693# CONFIG_NVRAM is not set
710# CONFIG_GEN_RTC is not set 694# CONFIG_GEN_RTC is not set
711# CONFIG_DTLK is not set
712# CONFIG_R3964 is not set 695# CONFIG_R3964 is not set
713# CONFIG_APPLICOM is not set 696# CONFIG_APPLICOM is not set
714# CONFIG_AGP is not set 697# CONFIG_AGP is not set
@@ -719,11 +702,9 @@ CONFIG_HW_RANDOM=y
719# TPM devices 702# TPM devices
720# 703#
721# CONFIG_TCG_TPM is not set 704# CONFIG_TCG_TPM is not set
722 705CONFIG_DEVPORT=y
723#
724# I2C support
725#
726CONFIG_I2C=y 706CONFIG_I2C=y
707CONFIG_I2C_BOARDINFO=y
727CONFIG_I2C_CHARDEV=y 708CONFIG_I2C_CHARDEV=y
728 709
729# 710#
@@ -750,6 +731,7 @@ CONFIG_I2C_MPC=y
750# CONFIG_I2C_PARPORT_LIGHT is not set 731# CONFIG_I2C_PARPORT_LIGHT is not set
751# CONFIG_I2C_PROSAVAGE is not set 732# CONFIG_I2C_PROSAVAGE is not set
752# CONFIG_I2C_SAVAGE4 is not set 733# CONFIG_I2C_SAVAGE4 is not set
734# CONFIG_I2C_SIMTEC is not set
753# CONFIG_I2C_SIS5595 is not set 735# CONFIG_I2C_SIS5595 is not set
754# CONFIG_I2C_SIS630 is not set 736# CONFIG_I2C_SIS630 is not set
755# CONFIG_I2C_SIS96X is not set 737# CONFIG_I2C_SIS96X is not set
@@ -757,7 +739,6 @@ CONFIG_I2C_MPC=y
757# CONFIG_I2C_VIA is not set 739# CONFIG_I2C_VIA is not set
758# CONFIG_I2C_VIAPRO is not set 740# CONFIG_I2C_VIAPRO is not set
759# CONFIG_I2C_VOODOO3 is not set 741# CONFIG_I2C_VOODOO3 is not set
760# CONFIG_I2C_PCA_ISA is not set
761 742
762# 743#
763# Miscellaneous I2C Chip support 744# Miscellaneous I2C Chip support
@@ -790,35 +771,39 @@ CONFIG_SPI_MPC83xx=y
790# 771#
791# SPI Protocol Masters 772# SPI Protocol Masters
792# 773#
774# CONFIG_SPI_AT25 is not set
775# CONFIG_SPI_SPIDEV is not set
793 776
794# 777#
795# Dallas's 1-wire bus 778# Dallas's 1-wire bus
796# 779#
797# CONFIG_W1 is not set 780# CONFIG_W1 is not set
781# CONFIG_HWMON is not set
798 782
799# 783#
800# Hardware Monitoring support 784# Multifunction device drivers
801# 785#
802# CONFIG_HWMON is not set 786# CONFIG_MFD_SM501 is not set
803# CONFIG_HWMON_VID is not set
804 787
805# 788#
806# Multimedia devices 789# Multimedia devices
807# 790#
808# CONFIG_VIDEO_DEV is not set 791# CONFIG_VIDEO_DEV is not set
792# CONFIG_DVB_CORE is not set
793CONFIG_DAB=y
809 794
810# 795#
811# Digital Video Broadcasting Devices 796# Graphics support
812# 797#
813# CONFIG_DVB is not set 798# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
814 799
815# 800#
816# Graphics support 801# Display device support
817# 802#
818# CONFIG_FIRMWARE_EDID is not set 803# CONFIG_DISPLAY_SUPPORT is not set
804# CONFIG_VGASTATE is not set
819# CONFIG_FB is not set 805# CONFIG_FB is not set
820# CONFIG_FB_IBM_GXT4500 is not set 806# CONFIG_FB_IBM_GXT4500 is not set
821# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
822 807
823# 808#
824# Sound 809# Sound
@@ -841,10 +826,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
841# USB Gadget Support 826# USB Gadget Support
842# 827#
843# CONFIG_USB_GADGET is not set 828# CONFIG_USB_GADGET is not set
844
845#
846# MMC/SD Card support
847#
848# CONFIG_MMC is not set 829# CONFIG_MMC is not set
849 830
850# 831#
@@ -885,26 +866,39 @@ CONFIG_RTC_INTF_SYSFS=y
885CONFIG_RTC_INTF_PROC=y 866CONFIG_RTC_INTF_PROC=y
886CONFIG_RTC_INTF_DEV=y 867CONFIG_RTC_INTF_DEV=y
887CONFIG_RTC_INTF_DEV_UIE_EMUL=y 868CONFIG_RTC_INTF_DEV_UIE_EMUL=y
869# CONFIG_RTC_DRV_TEST is not set
888 870
889# 871#
890# RTC drivers 872# I2C RTC drivers
891# 873#
892# CONFIG_RTC_DRV_X1205 is not set
893CONFIG_RTC_DRV_DS1307=y 874CONFIG_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 875# CONFIG_RTC_DRV_DS1672 is not set
897# CONFIG_RTC_DRV_DS1742 is not set 876# CONFIG_RTC_DRV_MAX6900 is not set
877# CONFIG_RTC_DRV_RS5C372 is not set
878# CONFIG_RTC_DRV_ISL1208 is not set
879# CONFIG_RTC_DRV_X1205 is not set
898# CONFIG_RTC_DRV_PCF8563 is not set 880# CONFIG_RTC_DRV_PCF8563 is not set
899# CONFIG_RTC_DRV_PCF8583 is not set 881# CONFIG_RTC_DRV_PCF8583 is not set
882
883#
884# SPI RTC drivers
885#
900# CONFIG_RTC_DRV_RS5C348 is not set 886# 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 887# CONFIG_RTC_DRV_MAX6902 is not set
888
889#
890# Platform RTC drivers
891#
892# CONFIG_RTC_DRV_DS1553 is not set
893# CONFIG_RTC_DRV_DS1742 is not set
894# CONFIG_RTC_DRV_M48T86 is not set
905# CONFIG_RTC_DRV_V3020 is not set 895# CONFIG_RTC_DRV_V3020 is not set
906 896
907# 897#
898# on-CPU RTC drivers
899#
900
901#
908# DMA Engine support 902# DMA Engine support
909# 903#
910CONFIG_DMA_ENGINE=y 904CONFIG_DMA_ENGINE=y
@@ -920,10 +914,6 @@ CONFIG_NET_DMA=y
920CONFIG_INTEL_IOATDMA=y 914CONFIG_INTEL_IOATDMA=y
921 915
922# 916#
923# Virtualization
924#
925
926#
927# File systems 917# File systems
928# 918#
929CONFIG_EXT2_FS=y 919CONFIG_EXT2_FS=y
@@ -1015,6 +1005,7 @@ CONFIG_LOCKD_V4=y
1015CONFIG_NFS_COMMON=y 1005CONFIG_NFS_COMMON=y
1016CONFIG_SUNRPC=y 1006CONFIG_SUNRPC=y
1017CONFIG_SUNRPC_GSS=y 1007CONFIG_SUNRPC_GSS=y
1008# CONFIG_SUNRPC_BIND34 is not set
1018CONFIG_RPCSEC_GSS_KRB5=y 1009CONFIG_RPCSEC_GSS_KRB5=y
1019# CONFIG_RPCSEC_GSS_SPKM3 is not set 1010# CONFIG_RPCSEC_GSS_SPKM3 is not set
1020# CONFIG_SMB_FS is not set 1011# CONFIG_SMB_FS is not set
@@ -1044,6 +1035,7 @@ CONFIG_MSDOS_PARTITION=y
1044# CONFIG_SUN_PARTITION is not set 1035# CONFIG_SUN_PARTITION is not set
1045# CONFIG_KARMA_PARTITION is not set 1036# CONFIG_KARMA_PARTITION is not set
1046# CONFIG_EFI_PARTITION is not set 1037# CONFIG_EFI_PARTITION is not set
1038# CONFIG_SYSV68_PARTITION is not set
1047 1039
1048# 1040#
1049# Native Language Support 1041# Native Language Support
@@ -1093,6 +1085,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1093# Distributed Lock Manager 1085# Distributed Lock Manager
1094# 1086#
1095# CONFIG_DLM is not set 1087# CONFIG_DLM is not set
1088# CONFIG_UCC_SLOW is not set
1096 1089
1097# 1090#
1098# Library routines 1091# Library routines
@@ -1100,10 +1093,13 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1100CONFIG_BITREVERSE=y 1093CONFIG_BITREVERSE=y
1101# CONFIG_CRC_CCITT is not set 1094# CONFIG_CRC_CCITT is not set
1102# CONFIG_CRC16 is not set 1095# CONFIG_CRC16 is not set
1096# CONFIG_CRC_ITU_T is not set
1103CONFIG_CRC32=y 1097CONFIG_CRC32=y
1104# CONFIG_LIBCRC32C is not set 1098# CONFIG_LIBCRC32C is not set
1105CONFIG_PLIST=y 1099CONFIG_PLIST=y
1106CONFIG_IOMAP_COPY=y 1100CONFIG_HAS_IOMEM=y
1101CONFIG_HAS_IOPORT=y
1102CONFIG_HAS_DMA=y
1107 1103
1108# 1104#
1109# Instrumentation Support 1105# Instrumentation Support
@@ -1120,10 +1116,8 @@ CONFIG_ENABLE_MUST_CHECK=y
1120# CONFIG_DEBUG_FS is not set 1116# CONFIG_DEBUG_FS is not set
1121# CONFIG_HEADERS_CHECK is not set 1117# CONFIG_HEADERS_CHECK is not set
1122# CONFIG_DEBUG_KERNEL is not set 1118# CONFIG_DEBUG_KERNEL is not set
1123CONFIG_LOG_BUF_SHIFT=14
1124# CONFIG_DEBUG_BUGVERBOSE is not set 1119# CONFIG_DEBUG_BUGVERBOSE is not set
1125# CONFIG_BOOTX_TEXT is not set 1120# CONFIG_BOOTX_TEXT is not set
1126# CONFIG_SERIAL_TEXT_DEBUG is not set
1127# CONFIG_PPC_EARLY_DEBUG is not set 1121# CONFIG_PPC_EARLY_DEBUG is not set
1128 1122
1129# 1123#
@@ -1152,8 +1146,11 @@ CONFIG_CRYPTO_MD5=y
1152# CONFIG_CRYPTO_GF128MUL is not set 1146# CONFIG_CRYPTO_GF128MUL is not set
1153# CONFIG_CRYPTO_ECB is not set 1147# CONFIG_CRYPTO_ECB is not set
1154CONFIG_CRYPTO_CBC=y 1148CONFIG_CRYPTO_CBC=y
1149CONFIG_CRYPTO_PCBC=m
1155# CONFIG_CRYPTO_LRW is not set 1150# CONFIG_CRYPTO_LRW is not set
1151# CONFIG_CRYPTO_CRYPTD is not set
1156CONFIG_CRYPTO_DES=y 1152CONFIG_CRYPTO_DES=y
1153# CONFIG_CRYPTO_FCRYPT is not set
1157# CONFIG_CRYPTO_BLOWFISH is not set 1154# CONFIG_CRYPTO_BLOWFISH is not set
1158# CONFIG_CRYPTO_TWOFISH is not set 1155# CONFIG_CRYPTO_TWOFISH is not set
1159# CONFIG_CRYPTO_SERPENT is not set 1156# CONFIG_CRYPTO_SERPENT is not set
@@ -1167,6 +1164,7 @@ CONFIG_CRYPTO_DES=y
1167# CONFIG_CRYPTO_DEFLATE is not set 1164# CONFIG_CRYPTO_DEFLATE is not set
1168# CONFIG_CRYPTO_MICHAEL_MIC is not set 1165# CONFIG_CRYPTO_MICHAEL_MIC is not set
1169# CONFIG_CRYPTO_CRC32C is not set 1166# CONFIG_CRYPTO_CRC32C is not set
1167# CONFIG_CRYPTO_CAMELLIA is not set
1170# CONFIG_CRYPTO_TEST is not set 1168# CONFIG_CRYPTO_TEST is not set
1171 1169
1172# 1170#
diff --git a/arch/powerpc/configs/mpc834x_mds_defconfig b/arch/powerpc/configs/mpc834x_mds_defconfig
index 2e3f8efb6a..c28b3ee3cb 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 3# Linux kernel version: 2.6.22-rc7
4# Thu Feb 8 01:00:48 2007 4# Sun Jul 1 23:56:57 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_PPC_DCR_MMIO is not set 45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -63,14 +64,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 68# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -83,14 +87,19 @@ CONFIG_BUG=y
83CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
86# CONFIG_EPOLL is not set 91# CONFIG_EPOLL is not set
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 95CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLAB=y
98# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set
90CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94 103
95# 104#
96# Loadable module support 105# Loadable module support
@@ -122,19 +131,33 @@ CONFIG_DEFAULT_AS=y
122# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
123# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
124CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
125CONFIG_PPC_GEN550=y
126# CONFIG_WANT_EARLY_SERIAL is not set
127 134
128# 135#
129# Platform support 136# Platform support
130# 137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
131# CONFIG_MPC8313_RDB is not set 143# CONFIG_MPC8313_RDB is not set
132# CONFIG_MPC832x_MDS is not set 144# CONFIG_MPC832x_MDS is not set
145# CONFIG_MPC832x_RDB is not set
133CONFIG_MPC834x_MDS=y 146CONFIG_MPC834x_MDS=y
134# CONFIG_MPC834x_ITX is not set 147# CONFIG_MPC834x_ITX is not set
135# CONFIG_MPC8360E_PB is not set 148# CONFIG_MPC836x_MDS is not set
136CONFIG_MPC834x=y 149CONFIG_MPC834x=y
137# CONFIG_MPIC is not set 150# CONFIG_MPIC is not set
151# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set
153# CONFIG_PPC_RTAS is not set
154# CONFIG_MMIO_NVRAM is not set
155# CONFIG_PPC_MPC106 is not set
156# CONFIG_PPC_970_NAP is not set
157# CONFIG_PPC_INDIRECT_IO is not set
158# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set
160# CONFIG_CPM2 is not set
138 161
139# 162#
140# Kernel options 163# Kernel options
@@ -162,32 +185,33 @@ CONFIG_FLAT_NODE_MEM_MAP=y
162# CONFIG_SPARSEMEM_STATIC is not set 185# CONFIG_SPARSEMEM_STATIC is not set
163CONFIG_SPLIT_PTLOCK_CPUS=4 186CONFIG_SPLIT_PTLOCK_CPUS=4
164# CONFIG_RESOURCES_64BIT is not set 187# CONFIG_RESOURCES_64BIT is not set
188CONFIG_ZONE_DMA_FLAG=1
165CONFIG_PROC_DEVICETREE=y 189CONFIG_PROC_DEVICETREE=y
166# CONFIG_CMDLINE_BOOL is not set 190# CONFIG_CMDLINE_BOOL is not set
167# CONFIG_PM is not set 191# CONFIG_PM is not set
168CONFIG_SECCOMP=y 192CONFIG_SECCOMP=y
193CONFIG_WANT_DEVICE_TREE=y
194CONFIG_DEVICE_TREE=""
169CONFIG_ISA_DMA_API=y 195CONFIG_ISA_DMA_API=y
170 196
171# 197#
172# Bus options 198# Bus options
173# 199#
200CONFIG_ZONE_DMA=y
174CONFIG_GENERIC_ISA_DMA=y 201CONFIG_GENERIC_ISA_DMA=y
175# CONFIG_MPIC_WEIRD is not set
176# CONFIG_PPC_I8259 is not set
177CONFIG_PPC_INDIRECT_PCI=y 202CONFIG_PPC_INDIRECT_PCI=y
203# CONFIG_PPC_INDIRECT_PCI_BE is not set
178CONFIG_FSL_SOC=y 204CONFIG_FSL_SOC=y
179CONFIG_PCI=y 205CONFIG_PCI=y
180CONFIG_PCI_DOMAINS=y 206CONFIG_PCI_DOMAINS=y
181# CONFIG_PCIEPORTBUS is not set 207# CONFIG_PCIEPORTBUS is not set
208CONFIG_ARCH_SUPPORTS_MSI=y
209# CONFIG_PCI_MSI is not set
182 210
183# 211#
184# PCCARD (PCMCIA/CardBus) support 212# PCCARD (PCMCIA/CardBus) support
185# 213#
186# CONFIG_PCCARD is not set 214# CONFIG_PCCARD is not set
187
188#
189# PCI Hotplug Support
190#
191# CONFIG_HOTPLUG_PCI is not set 215# CONFIG_HOTPLUG_PCI is not set
192 216
193# 217#
@@ -212,13 +236,13 @@ CONFIG_NET=y
212# 236#
213# Networking options 237# Networking options
214# 238#
215# CONFIG_NETDEBUG is not set
216CONFIG_PACKET=y 239CONFIG_PACKET=y
217# CONFIG_PACKET_MMAP is not set 240# CONFIG_PACKET_MMAP is not set
218CONFIG_UNIX=y 241CONFIG_UNIX=y
219CONFIG_XFRM=y 242CONFIG_XFRM=y
220CONFIG_XFRM_USER=m 243CONFIG_XFRM_USER=m
221# CONFIG_XFRM_SUB_POLICY is not set 244# CONFIG_XFRM_SUB_POLICY is not set
245# CONFIG_XFRM_MIGRATE is not set
222# CONFIG_NET_KEY is not set 246# CONFIG_NET_KEY is not set
223CONFIG_INET=y 247CONFIG_INET=y
224CONFIG_IP_MULTICAST=y 248CONFIG_IP_MULTICAST=y
@@ -252,20 +276,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
252# CONFIG_INET6_TUNNEL is not set 276# CONFIG_INET6_TUNNEL is not set
253# CONFIG_NETWORK_SECMARK is not set 277# CONFIG_NETWORK_SECMARK is not set
254# CONFIG_NETFILTER is not set 278# CONFIG_NETFILTER is not set
255
256#
257# DCCP Configuration (EXPERIMENTAL)
258#
259# CONFIG_IP_DCCP is not set 279# CONFIG_IP_DCCP is not set
260
261#
262# SCTP Configuration (EXPERIMENTAL)
263#
264# CONFIG_IP_SCTP is not set 280# CONFIG_IP_SCTP is not set
265
266#
267# TIPC Configuration (EXPERIMENTAL)
268#
269# CONFIG_TIPC is not set 281# CONFIG_TIPC is not set
270# CONFIG_ATM is not set 282# CONFIG_ATM is not set
271# CONFIG_BRIDGE is not set 283# CONFIG_BRIDGE is not set
@@ -291,7 +303,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
291# CONFIG_HAMRADIO is not set 303# CONFIG_HAMRADIO is not set
292# CONFIG_IRDA is not set 304# CONFIG_IRDA is not set
293# CONFIG_BT is not set 305# CONFIG_BT is not set
306# CONFIG_AF_RXRPC is not set
307
308#
309# Wireless
310#
311# CONFIG_CFG80211 is not set
312# CONFIG_WIRELESS_EXT is not set
313# CONFIG_MAC80211 is not set
294# CONFIG_IEEE80211 is not set 314# CONFIG_IEEE80211 is not set
315# CONFIG_RFKILL is not set
295 316
296# 317#
297# Device Drivers 318# Device Drivers
@@ -309,10 +330,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
309# Connector - unified userspace <-> kernelspace linker 330# Connector - unified userspace <-> kernelspace linker
310# 331#
311# CONFIG_CONNECTOR is not set 332# CONFIG_CONNECTOR is not set
312
313#
314# Memory Technology Devices (MTD)
315#
316# CONFIG_MTD is not set 333# CONFIG_MTD is not set
317 334
318# 335#
@@ -323,6 +340,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
323# 340#
324# Plug and Play support 341# Plug and Play support
325# 342#
343# CONFIG_PNPACPI is not set
326 344
327# 345#
328# Block devices 346# Block devices
@@ -341,19 +359,16 @@ CONFIG_BLK_DEV_RAM=y
341CONFIG_BLK_DEV_RAM_COUNT=16 359CONFIG_BLK_DEV_RAM_COUNT=16
342CONFIG_BLK_DEV_RAM_SIZE=32768 360CONFIG_BLK_DEV_RAM_SIZE=32768
343CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 361CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
344CONFIG_BLK_DEV_INITRD=y
345# CONFIG_CDROM_PKTCDVD is not set 362# CONFIG_CDROM_PKTCDVD is not set
346# CONFIG_ATA_OVER_ETH is not set 363# CONFIG_ATA_OVER_ETH is not set
347 364
348# 365#
349# Misc devices 366# Misc devices
350# 367#
368# CONFIG_PHANTOM is not set
351# CONFIG_SGI_IOC4 is not set 369# CONFIG_SGI_IOC4 is not set
352# CONFIG_TIFM_CORE is not set 370# CONFIG_TIFM_CORE is not set
353 371# CONFIG_BLINK is not set
354#
355# ATA/ATAPI/MFM/RLL support
356#
357# CONFIG_IDE is not set 372# CONFIG_IDE is not set
358 373
359# 374#
@@ -362,10 +377,6 @@ CONFIG_BLK_DEV_INITRD=y
362# CONFIG_RAID_ATTRS is not set 377# CONFIG_RAID_ATTRS is not set
363# CONFIG_SCSI is not set 378# CONFIG_SCSI is not set
364# CONFIG_SCSI_NETLINK is not set 379# CONFIG_SCSI_NETLINK is not set
365
366#
367# Serial ATA (prod) and Parallel ATA (experimental) drivers
368#
369# CONFIG_ATA is not set 380# CONFIG_ATA is not set
370 381
371# 382#
@@ -381,18 +392,14 @@ CONFIG_BLK_DEV_INITRD=y
381# 392#
382# IEEE 1394 (FireWire) support 393# IEEE 1394 (FireWire) support
383# 394#
395# CONFIG_FIREWIRE is not set
384# CONFIG_IEEE1394 is not set 396# CONFIG_IEEE1394 is not set
385 397
386# 398#
387# I2O device support 399# I2O device support
388# 400#
389# CONFIG_I2O is not set 401# CONFIG_I2O is not set
390 402# CONFIG_MACINTOSH_DRIVERS is not set
391#
392# Macintosh device drivers
393#
394# CONFIG_MAC_EMUMOUSEBTN is not set
395# CONFIG_WINDFARM is not set
396 403
397# 404#
398# Network device support 405# Network device support
@@ -402,15 +409,7 @@ CONFIG_NETDEVICES=y
402# CONFIG_BONDING is not set 409# CONFIG_BONDING is not set
403# CONFIG_EQUALIZER is not set 410# CONFIG_EQUALIZER is not set
404# CONFIG_TUN is not set 411# CONFIG_TUN is not set
405
406#
407# ARCnet devices
408#
409# CONFIG_ARCNET is not set 412# CONFIG_ARCNET is not set
410
411#
412# PHY device support
413#
414CONFIG_PHYLIB=y 413CONFIG_PHYLIB=y
415 414
416# 415#
@@ -460,10 +459,8 @@ CONFIG_E100=y
460# CONFIG_SUNDANCE is not set 459# CONFIG_SUNDANCE is not set
461# CONFIG_TLAN is not set 460# CONFIG_TLAN is not set
462# CONFIG_VIA_RHINE is not set 461# CONFIG_VIA_RHINE is not set
463 462# CONFIG_SC92031 is not set
464# 463CONFIG_NETDEV_1000=y
465# Ethernet (1000 Mbit)
466#
467# CONFIG_ACENIC is not set 464# CONFIG_ACENIC is not set
468# CONFIG_DL2K is not set 465# CONFIG_DL2K is not set
469# CONFIG_E1000 is not set 466# CONFIG_E1000 is not set
@@ -481,29 +478,22 @@ CONFIG_E100=y
481CONFIG_GIANFAR=y 478CONFIG_GIANFAR=y
482# CONFIG_GFAR_NAPI is not set 479# CONFIG_GFAR_NAPI is not set
483# CONFIG_QLA3XXX is not set 480# CONFIG_QLA3XXX is not set
484 481# CONFIG_ATL1 is not set
485# 482CONFIG_NETDEV_10000=y
486# Ethernet (10000 Mbit)
487#
488# CONFIG_CHELSIO_T1 is not set 483# CONFIG_CHELSIO_T1 is not set
484# CONFIG_CHELSIO_T3 is not set
489# CONFIG_IXGB is not set 485# CONFIG_IXGB is not set
490# CONFIG_S2IO is not set 486# CONFIG_S2IO is not set
491# CONFIG_MYRI10GE is not set 487# CONFIG_MYRI10GE is not set
492# CONFIG_NETXEN_NIC is not set 488# CONFIG_NETXEN_NIC is not set
493 489# CONFIG_MLX4_CORE is not set
494#
495# Token Ring devices
496#
497# CONFIG_TR is not set 490# CONFIG_TR is not set
498 491
499# 492#
500# Wireless LAN (non-hamradio) 493# Wireless LAN
501#
502# CONFIG_NET_RADIO is not set
503
504#
505# Wan interfaces
506# 494#
495# CONFIG_WLAN_PRE80211 is not set
496# CONFIG_WLAN_80211 is not set
507# CONFIG_WAN is not set 497# CONFIG_WAN is not set
508# CONFIG_FDDI is not set 498# CONFIG_FDDI is not set
509# CONFIG_HIPPI is not set 499# CONFIG_HIPPI is not set
@@ -529,6 +519,7 @@ CONFIG_GIANFAR=y
529# 519#
530CONFIG_INPUT=y 520CONFIG_INPUT=y
531# CONFIG_INPUT_FF_MEMLESS is not set 521# CONFIG_INPUT_FF_MEMLESS is not set
522# CONFIG_INPUT_POLLDEV is not set
532 523
533# 524#
534# Userland interfaces 525# Userland interfaces
@@ -545,6 +536,7 @@ CONFIG_INPUT=y
545# CONFIG_INPUT_KEYBOARD is not set 536# CONFIG_INPUT_KEYBOARD is not set
546# CONFIG_INPUT_MOUSE is not set 537# CONFIG_INPUT_MOUSE is not set
547# CONFIG_INPUT_JOYSTICK is not set 538# CONFIG_INPUT_JOYSTICK is not set
539# CONFIG_INPUT_TABLET is not set
548# CONFIG_INPUT_TOUCHSCREEN is not set 540# CONFIG_INPUT_TOUCHSCREEN is not set
549# CONFIG_INPUT_MISC is not set 541# CONFIG_INPUT_MISC is not set
550 542
@@ -577,6 +569,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
577CONFIG_SERIAL_CORE=y 569CONFIG_SERIAL_CORE=y
578CONFIG_SERIAL_CORE_CONSOLE=y 570CONFIG_SERIAL_CORE_CONSOLE=y
579# CONFIG_SERIAL_JSM is not set 571# CONFIG_SERIAL_JSM is not set
572# CONFIG_SERIAL_OF_PLATFORM is not set
580CONFIG_UNIX98_PTYS=y 573CONFIG_UNIX98_PTYS=y
581CONFIG_LEGACY_PTYS=y 574CONFIG_LEGACY_PTYS=y
582CONFIG_LEGACY_PTY_COUNT=256 575CONFIG_LEGACY_PTY_COUNT=256
@@ -585,10 +578,6 @@ CONFIG_LEGACY_PTY_COUNT=256
585# IPMI 578# IPMI
586# 579#
587# CONFIG_IPMI_HANDLER is not set 580# CONFIG_IPMI_HANDLER is not set
588
589#
590# Watchdog Cards
591#
592CONFIG_WATCHDOG=y 581CONFIG_WATCHDOG=y
593# CONFIG_WATCHDOG_NOWAYOUT is not set 582# CONFIG_WATCHDOG_NOWAYOUT is not set
594 583
@@ -607,7 +596,6 @@ CONFIG_83xx_WDT=y
607# CONFIG_NVRAM is not set 596# CONFIG_NVRAM is not set
608CONFIG_GEN_RTC=y 597CONFIG_GEN_RTC=y
609# CONFIG_GEN_RTC_X is not set 598# CONFIG_GEN_RTC_X is not set
610# CONFIG_DTLK is not set
611# CONFIG_R3964 is not set 599# CONFIG_R3964 is not set
612# CONFIG_APPLICOM is not set 600# CONFIG_APPLICOM is not set
613# CONFIG_AGP is not set 601# CONFIG_AGP is not set
@@ -618,11 +606,9 @@ CONFIG_GEN_RTC=y
618# TPM devices 606# TPM devices
619# 607#
620# CONFIG_TCG_TPM is not set 608# CONFIG_TCG_TPM is not set
621 609CONFIG_DEVPORT=y
622#
623# I2C support
624#
625CONFIG_I2C=y 610CONFIG_I2C=y
611CONFIG_I2C_BOARDINFO=y
626CONFIG_I2C_CHARDEV=y 612CONFIG_I2C_CHARDEV=y
627 613
628# 614#
@@ -649,6 +635,7 @@ CONFIG_I2C_MPC=y
649# CONFIG_I2C_PARPORT_LIGHT is not set 635# CONFIG_I2C_PARPORT_LIGHT is not set
650# CONFIG_I2C_PROSAVAGE is not set 636# CONFIG_I2C_PROSAVAGE is not set
651# CONFIG_I2C_SAVAGE4 is not set 637# CONFIG_I2C_SAVAGE4 is not set
638# CONFIG_I2C_SIMTEC is not set
652# CONFIG_I2C_SIS5595 is not set 639# CONFIG_I2C_SIS5595 is not set
653# CONFIG_I2C_SIS630 is not set 640# CONFIG_I2C_SIS630 is not set
654# CONFIG_I2C_SIS96X is not set 641# CONFIG_I2C_SIS96X is not set
@@ -656,7 +643,6 @@ CONFIG_I2C_MPC=y
656# CONFIG_I2C_VIA is not set 643# CONFIG_I2C_VIA is not set
657# CONFIG_I2C_VIAPRO is not set 644# CONFIG_I2C_VIAPRO is not set
658# CONFIG_I2C_VOODOO3 is not set 645# CONFIG_I2C_VOODOO3 is not set
659# CONFIG_I2C_PCA_ISA is not set
660 646
661# 647#
662# Miscellaneous I2C Chip support 648# Miscellaneous I2C Chip support
@@ -684,16 +670,14 @@ CONFIG_I2C_MPC=y
684# Dallas's 1-wire bus 670# Dallas's 1-wire bus
685# 671#
686# CONFIG_W1 is not set 672# CONFIG_W1 is not set
687
688#
689# Hardware Monitoring support
690#
691CONFIG_HWMON=y 673CONFIG_HWMON=y
692# CONFIG_HWMON_VID is not set 674# CONFIG_HWMON_VID is not set
693# CONFIG_SENSORS_ABITUGURU is not set 675# CONFIG_SENSORS_ABITUGURU is not set
676# CONFIG_SENSORS_AD7418 is not set
694# CONFIG_SENSORS_ADM1021 is not set 677# CONFIG_SENSORS_ADM1021 is not set
695# CONFIG_SENSORS_ADM1025 is not set 678# CONFIG_SENSORS_ADM1025 is not set
696# CONFIG_SENSORS_ADM1026 is not set 679# CONFIG_SENSORS_ADM1026 is not set
680# CONFIG_SENSORS_ADM1029 is not set
697# CONFIG_SENSORS_ADM1031 is not set 681# CONFIG_SENSORS_ADM1031 is not set
698# CONFIG_SENSORS_ADM9240 is not set 682# CONFIG_SENSORS_ADM9240 is not set
699# CONFIG_SENSORS_ASB100 is not set 683# CONFIG_SENSORS_ASB100 is not set
@@ -716,6 +700,7 @@ CONFIG_HWMON=y
716# CONFIG_SENSORS_LM90 is not set 700# CONFIG_SENSORS_LM90 is not set
717# CONFIG_SENSORS_LM92 is not set 701# CONFIG_SENSORS_LM92 is not set
718# CONFIG_SENSORS_MAX1619 is not set 702# CONFIG_SENSORS_MAX1619 is not set
703# CONFIG_SENSORS_MAX6650 is not set
719# CONFIG_SENSORS_PC87360 is not set 704# CONFIG_SENSORS_PC87360 is not set
720# CONFIG_SENSORS_PC87427 is not set 705# CONFIG_SENSORS_PC87427 is not set
721# CONFIG_SENSORS_SIS5595 is not set 706# CONFIG_SENSORS_SIS5595 is not set
@@ -735,22 +720,29 @@ CONFIG_HWMON=y
735# CONFIG_HWMON_DEBUG_CHIP is not set 720# CONFIG_HWMON_DEBUG_CHIP is not set
736 721
737# 722#
723# Multifunction device drivers
724#
725# CONFIG_MFD_SM501 is not set
726
727#
738# Multimedia devices 728# Multimedia devices
739# 729#
740# CONFIG_VIDEO_DEV is not set 730# CONFIG_VIDEO_DEV is not set
731# CONFIG_DVB_CORE is not set
732CONFIG_DAB=y
741 733
742# 734#
743# Digital Video Broadcasting Devices 735# Graphics support
744# 736#
745# CONFIG_DVB is not set 737# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
746 738
747# 739#
748# Graphics support 740# Display device support
749# 741#
750CONFIG_FIRMWARE_EDID=y 742# CONFIG_DISPLAY_SUPPORT is not set
743# CONFIG_VGASTATE is not set
751# CONFIG_FB is not set 744# CONFIG_FB is not set
752# CONFIG_FB_IBM_GXT4500 is not set 745# CONFIG_FB_IBM_GXT4500 is not set
753# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
754 746
755# 747#
756# Sound 748# Sound
@@ -761,6 +753,7 @@ CONFIG_FIRMWARE_EDID=y
761# HID Devices 753# HID Devices
762# 754#
763CONFIG_HID=y 755CONFIG_HID=y
756# CONFIG_HID_DEBUG is not set
764 757
765# 758#
766# USB support 759# USB support
@@ -778,10 +771,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
778# USB Gadget Support 771# USB Gadget Support
779# 772#
780# CONFIG_USB_GADGET is not set 773# CONFIG_USB_GADGET is not set
781
782#
783# MMC/SD Card support
784#
785# CONFIG_MMC is not set 774# CONFIG_MMC is not set
786 775
787# 776#
@@ -825,10 +814,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
825# 814#
826 815
827# 816#
828# Virtualization
829#
830
831#
832# File systems 817# File systems
833# 818#
834CONFIG_EXT2_FS=y 819CONFIG_EXT2_FS=y
@@ -916,6 +901,7 @@ CONFIG_LOCKD_V4=y
916CONFIG_NFS_COMMON=y 901CONFIG_NFS_COMMON=y
917CONFIG_SUNRPC=y 902CONFIG_SUNRPC=y
918CONFIG_SUNRPC_GSS=y 903CONFIG_SUNRPC_GSS=y
904# CONFIG_SUNRPC_BIND34 is not set
919CONFIG_RPCSEC_GSS_KRB5=y 905CONFIG_RPCSEC_GSS_KRB5=y
920# CONFIG_RPCSEC_GSS_SPKM3 is not set 906# CONFIG_RPCSEC_GSS_SPKM3 is not set
921# CONFIG_SMB_FS is not set 907# CONFIG_SMB_FS is not set
@@ -941,6 +927,7 @@ CONFIG_PARTITION_ADVANCED=y
941# CONFIG_SUN_PARTITION is not set 927# CONFIG_SUN_PARTITION is not set
942# CONFIG_KARMA_PARTITION is not set 928# CONFIG_KARMA_PARTITION is not set
943# CONFIG_EFI_PARTITION is not set 929# CONFIG_EFI_PARTITION is not set
930# CONFIG_SYSV68_PARTITION is not set
944 931
945# 932#
946# Native Language Support 933# Native Language Support
@@ -951,6 +938,7 @@ CONFIG_PARTITION_ADVANCED=y
951# Distributed Lock Manager 938# Distributed Lock Manager
952# 939#
953# CONFIG_DLM is not set 940# CONFIG_DLM is not set
941# CONFIG_UCC_SLOW is not set
954 942
955# 943#
956# Library routines 944# Library routines
@@ -958,10 +946,13 @@ CONFIG_PARTITION_ADVANCED=y
958CONFIG_BITREVERSE=y 946CONFIG_BITREVERSE=y
959# CONFIG_CRC_CCITT is not set 947# CONFIG_CRC_CCITT is not set
960# CONFIG_CRC16 is not set 948# CONFIG_CRC16 is not set
949# CONFIG_CRC_ITU_T is not set
961CONFIG_CRC32=y 950CONFIG_CRC32=y
962# CONFIG_LIBCRC32C is not set 951# CONFIG_LIBCRC32C is not set
963CONFIG_PLIST=y 952CONFIG_PLIST=y
964CONFIG_IOMAP_COPY=y 953CONFIG_HAS_IOMEM=y
954CONFIG_HAS_IOPORT=y
955CONFIG_HAS_DMA=y
965 956
966# 957#
967# Instrumentation Support 958# Instrumentation Support
@@ -978,10 +969,8 @@ CONFIG_ENABLE_MUST_CHECK=y
978# CONFIG_DEBUG_FS is not set 969# CONFIG_DEBUG_FS is not set
979# CONFIG_HEADERS_CHECK is not set 970# CONFIG_HEADERS_CHECK is not set
980# CONFIG_DEBUG_KERNEL is not set 971# CONFIG_DEBUG_KERNEL is not set
981CONFIG_LOG_BUF_SHIFT=14
982# CONFIG_DEBUG_BUGVERBOSE is not set 972# CONFIG_DEBUG_BUGVERBOSE is not set
983# CONFIG_BOOTX_TEXT is not set 973# CONFIG_BOOTX_TEXT is not set
984# CONFIG_SERIAL_TEXT_DEBUG is not set
985# CONFIG_PPC_EARLY_DEBUG is not set 974# CONFIG_PPC_EARLY_DEBUG is not set
986 975
987# 976#
@@ -1010,8 +999,11 @@ CONFIG_CRYPTO_MD5=y
1010# CONFIG_CRYPTO_GF128MUL is not set 999# CONFIG_CRYPTO_GF128MUL is not set
1011CONFIG_CRYPTO_ECB=m 1000CONFIG_CRYPTO_ECB=m
1012CONFIG_CRYPTO_CBC=y 1001CONFIG_CRYPTO_CBC=y
1002CONFIG_CRYPTO_PCBC=m
1013# CONFIG_CRYPTO_LRW is not set 1003# CONFIG_CRYPTO_LRW is not set
1004# CONFIG_CRYPTO_CRYPTD is not set
1014CONFIG_CRYPTO_DES=y 1005CONFIG_CRYPTO_DES=y
1006# CONFIG_CRYPTO_FCRYPT is not set
1015# CONFIG_CRYPTO_BLOWFISH is not set 1007# CONFIG_CRYPTO_BLOWFISH is not set
1016# CONFIG_CRYPTO_TWOFISH is not set 1008# CONFIG_CRYPTO_TWOFISH is not set
1017# CONFIG_CRYPTO_SERPENT is not set 1009# CONFIG_CRYPTO_SERPENT is not set
@@ -1025,6 +1017,7 @@ CONFIG_CRYPTO_DES=y
1025# CONFIG_CRYPTO_DEFLATE is not set 1017# CONFIG_CRYPTO_DEFLATE is not set
1026# CONFIG_CRYPTO_MICHAEL_MIC is not set 1018# CONFIG_CRYPTO_MICHAEL_MIC is not set
1027# CONFIG_CRYPTO_CRC32C is not set 1019# CONFIG_CRYPTO_CRC32C is not set
1020# CONFIG_CRYPTO_CAMELLIA is not set
1028# CONFIG_CRYPTO_TEST is not set 1021# CONFIG_CRYPTO_TEST is not set
1029 1022
1030# 1023#
diff --git a/arch/powerpc/configs/mpc836x_mds_defconfig b/arch/powerpc/configs/mpc836x_mds_defconfig
index 921a151dc7..bcbbc167f9 100644
--- a/arch/powerpc/configs/mpc836x_mds_defconfig
+++ b/arch/powerpc/configs/mpc836x_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.21-rc5 3# Linux kernel version: 2.6.22-rc7
4# Mon Apr 9 16:14:05 2007 4# Sun Jul 1 23:56:57 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45# CONFIG_PPC_DCR_MMIO is not set 45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 49# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
@@ -70,6 +71,7 @@ CONFIG_SYSVIPC_SYSCTL=y
70# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
71# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
73CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
75CONFIG_BLK_DEV_INITRD=y 77CONFIG_BLK_DEV_INITRD=y
@@ -85,14 +87,19 @@ CONFIG_BUG=y
85CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
86CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
87CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
88# CONFIG_EPOLL is not set 91# CONFIG_EPOLL is not set
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 95CONFIG_SHMEM=y
90CONFIG_SLAB=y
91CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLAB=y
98# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set
92CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
93# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
94CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
95# CONFIG_SLOB is not set
96 103
97# 104#
98# Loadable module support 105# Loadable module support
@@ -124,12 +131,15 @@ CONFIG_DEFAULT_AS=y
124# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
125# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
126CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
127CONFIG_QUICC_ENGINE=y
128# CONFIG_WANT_EARLY_SERIAL is not set
129 134
130# 135#
131# Platform support 136# Platform support
132# 137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
133# CONFIG_MPC8313_RDB is not set 143# CONFIG_MPC8313_RDB is not set
134# CONFIG_MPC832x_MDS is not set 144# CONFIG_MPC832x_MDS is not set
135# CONFIG_MPC832x_RDB is not set 145# CONFIG_MPC832x_RDB is not set
@@ -138,6 +148,17 @@ CONFIG_QUICC_ENGINE=y
138CONFIG_MPC836x_MDS=y 148CONFIG_MPC836x_MDS=y
139CONFIG_PPC_MPC836x=y 149CONFIG_PPC_MPC836x=y
140# CONFIG_MPIC is not set 150# CONFIG_MPIC is not set
151# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set
153# CONFIG_PPC_RTAS is not set
154# CONFIG_MMIO_NVRAM is not set
155# CONFIG_PPC_MPC106 is not set
156# CONFIG_PPC_970_NAP is not set
157# CONFIG_PPC_INDIRECT_IO is not set
158# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set
160CONFIG_QUICC_ENGINE=y
161# CONFIG_CPM2 is not set
141 162
142# 163#
143# Kernel options 164# Kernel options
@@ -170,6 +191,8 @@ CONFIG_PROC_DEVICETREE=y
170# CONFIG_CMDLINE_BOOL is not set 191# CONFIG_CMDLINE_BOOL is not set
171# CONFIG_PM is not set 192# CONFIG_PM is not set
172CONFIG_SECCOMP=y 193CONFIG_SECCOMP=y
194CONFIG_WANT_DEVICE_TREE=y
195CONFIG_DEVICE_TREE=""
173CONFIG_ISA_DMA_API=y 196CONFIG_ISA_DMA_API=y
174 197
175# 198#
@@ -177,22 +200,19 @@ CONFIG_ISA_DMA_API=y
177# 200#
178CONFIG_ZONE_DMA=y 201CONFIG_ZONE_DMA=y
179CONFIG_GENERIC_ISA_DMA=y 202CONFIG_GENERIC_ISA_DMA=y
180# CONFIG_MPIC_WEIRD is not set
181# CONFIG_PPC_I8259 is not set
182CONFIG_PPC_INDIRECT_PCI=y 203CONFIG_PPC_INDIRECT_PCI=y
204# CONFIG_PPC_INDIRECT_PCI_BE is not set
183CONFIG_FSL_SOC=y 205CONFIG_FSL_SOC=y
184CONFIG_PCI=y 206CONFIG_PCI=y
185CONFIG_PCI_DOMAINS=y 207CONFIG_PCI_DOMAINS=y
186# CONFIG_PCIEPORTBUS is not set 208# CONFIG_PCIEPORTBUS is not set
209CONFIG_ARCH_SUPPORTS_MSI=y
210# CONFIG_PCI_MSI is not set
187 211
188# 212#
189# PCCARD (PCMCIA/CardBus) support 213# PCCARD (PCMCIA/CardBus) support
190# 214#
191# CONFIG_PCCARD is not set 215# CONFIG_PCCARD is not set
192
193#
194# PCI Hotplug Support
195#
196# CONFIG_HOTPLUG_PCI is not set 216# CONFIG_HOTPLUG_PCI is not set
197 217
198# 218#
@@ -217,7 +237,6 @@ CONFIG_NET=y
217# 237#
218# Networking options 238# Networking options
219# 239#
220# CONFIG_NETDEBUG is not set
221CONFIG_PACKET=y 240CONFIG_PACKET=y
222# CONFIG_PACKET_MMAP is not set 241# CONFIG_PACKET_MMAP is not set
223CONFIG_UNIX=y 242CONFIG_UNIX=y
@@ -258,20 +277,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
258# CONFIG_INET6_TUNNEL is not set 277# CONFIG_INET6_TUNNEL is not set
259# CONFIG_NETWORK_SECMARK is not set 278# CONFIG_NETWORK_SECMARK is not set
260# CONFIG_NETFILTER is not set 279# CONFIG_NETFILTER is not set
261
262#
263# DCCP Configuration (EXPERIMENTAL)
264#
265# CONFIG_IP_DCCP is not set 280# CONFIG_IP_DCCP is not set
266
267#
268# SCTP Configuration (EXPERIMENTAL)
269#
270# CONFIG_IP_SCTP is not set 281# CONFIG_IP_SCTP is not set
271
272#
273# TIPC Configuration (EXPERIMENTAL)
274#
275# CONFIG_TIPC is not set 282# CONFIG_TIPC is not set
276# CONFIG_ATM is not set 283# CONFIG_ATM is not set
277# CONFIG_BRIDGE is not set 284# CONFIG_BRIDGE is not set
@@ -297,7 +304,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
297# CONFIG_HAMRADIO is not set 304# CONFIG_HAMRADIO is not set
298# CONFIG_IRDA is not set 305# CONFIG_IRDA is not set
299# CONFIG_BT is not set 306# CONFIG_BT is not set
307# CONFIG_AF_RXRPC is not set
308
309#
310# Wireless
311#
312# CONFIG_CFG80211 is not set
313# CONFIG_WIRELESS_EXT is not set
314# CONFIG_MAC80211 is not set
300# CONFIG_IEEE80211 is not set 315# CONFIG_IEEE80211 is not set
316# CONFIG_RFKILL is not set
301 317
302# 318#
303# Device Drivers 319# Device Drivers
@@ -315,10 +331,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
315# Connector - unified userspace <-> kernelspace linker 331# Connector - unified userspace <-> kernelspace linker
316# 332#
317# CONFIG_CONNECTOR is not set 333# CONFIG_CONNECTOR is not set
318
319#
320# Memory Technology Devices (MTD)
321#
322# CONFIG_MTD is not set 334# CONFIG_MTD is not set
323 335
324# 336#
@@ -354,12 +366,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
354# 366#
355# Misc devices 367# Misc devices
356# 368#
369# CONFIG_PHANTOM is not set
357# CONFIG_SGI_IOC4 is not set 370# CONFIG_SGI_IOC4 is not set
358# CONFIG_TIFM_CORE is not set 371# CONFIG_TIFM_CORE is not set
359 372# CONFIG_BLINK is not set
360#
361# ATA/ATAPI/MFM/RLL support
362#
363# CONFIG_IDE is not set 373# CONFIG_IDE is not set
364 374
365# 375#
@@ -388,6 +398,7 @@ CONFIG_SCSI_PROC_FS=y
388# CONFIG_SCSI_CONSTANTS is not set 398# CONFIG_SCSI_CONSTANTS is not set
389# CONFIG_SCSI_LOGGING is not set 399# CONFIG_SCSI_LOGGING is not set
390# CONFIG_SCSI_SCAN_ASYNC is not set 400# CONFIG_SCSI_SCAN_ASYNC is not set
401CONFIG_SCSI_WAIT_SCAN=m
391 402
392# 403#
393# SCSI Transports 404# SCSI Transports
@@ -435,10 +446,6 @@ CONFIG_SCSI_PROC_FS=y
435# CONFIG_SCSI_NSP32 is not set 446# CONFIG_SCSI_NSP32 is not set
436# CONFIG_SCSI_DEBUG is not set 447# CONFIG_SCSI_DEBUG is not set
437# CONFIG_SCSI_SRP is not set 448# CONFIG_SCSI_SRP is not set
438
439#
440# Serial ATA (prod) and Parallel ATA (experimental) drivers
441#
442# CONFIG_ATA is not set 449# CONFIG_ATA is not set
443 450
444# 451#
@@ -457,18 +464,14 @@ CONFIG_SCSI_PROC_FS=y
457# 464#
458# IEEE 1394 (FireWire) support 465# IEEE 1394 (FireWire) support
459# 466#
467# CONFIG_FIREWIRE is not set
460# CONFIG_IEEE1394 is not set 468# CONFIG_IEEE1394 is not set
461 469
462# 470#
463# I2O device support 471# I2O device support
464# 472#
465# CONFIG_I2O is not set 473# CONFIG_I2O is not set
466 474# CONFIG_MACINTOSH_DRIVERS is not set
467#
468# Macintosh device drivers
469#
470# CONFIG_MAC_EMUMOUSEBTN is not set
471# CONFIG_WINDFARM is not set
472 475
473# 476#
474# Network device support 477# Network device support
@@ -478,15 +481,7 @@ CONFIG_NETDEVICES=y
478# CONFIG_BONDING is not set 481# CONFIG_BONDING is not set
479# CONFIG_EQUALIZER is not set 482# CONFIG_EQUALIZER is not set
480# CONFIG_TUN is not set 483# CONFIG_TUN is not set
481
482#
483# ARCnet devices
484#
485# CONFIG_ARCNET is not set 484# CONFIG_ARCNET is not set
486
487#
488# PHY device support
489#
490CONFIG_PHYLIB=y 485CONFIG_PHYLIB=y
491 486
492# 487#
@@ -500,7 +495,6 @@ CONFIG_MARVELL_PHY=y
500# CONFIG_VITESSE_PHY is not set 495# CONFIG_VITESSE_PHY is not set
501# CONFIG_SMSC_PHY is not set 496# CONFIG_SMSC_PHY is not set
502# CONFIG_BROADCOM_PHY is not set 497# CONFIG_BROADCOM_PHY is not set
503# CONFIG_ICPLUS_PHY is not set
504# CONFIG_FIXED_PHY is not set 498# CONFIG_FIXED_PHY is not set
505 499
506# 500#
@@ -519,10 +513,7 @@ CONFIG_MII=y
519# CONFIG_NET_TULIP is not set 513# CONFIG_NET_TULIP is not set
520# CONFIG_HP100 is not set 514# CONFIG_HP100 is not set
521# CONFIG_NET_PCI is not set 515# CONFIG_NET_PCI is not set
522 516CONFIG_NETDEV_1000=y
523#
524# Ethernet (1000 Mbit)
525#
526# CONFIG_ACENIC is not set 517# CONFIG_ACENIC is not set
527# CONFIG_DL2K is not set 518# CONFIG_DL2K is not set
528# CONFIG_E1000 is not set 519# CONFIG_E1000 is not set
@@ -534,6 +525,7 @@ CONFIG_MII=y
534# CONFIG_SKGE is not set 525# CONFIG_SKGE is not set
535# CONFIG_SKY2 is not set 526# CONFIG_SKY2 is not set
536# CONFIG_SK98LIN is not set 527# CONFIG_SK98LIN is not set
528# CONFIG_VIA_VELOCITY is not set
537# CONFIG_TIGON3 is not set 529# CONFIG_TIGON3 is not set
538# CONFIG_BNX2 is not set 530# CONFIG_BNX2 is not set
539# CONFIG_GIANFAR is not set 531# CONFIG_GIANFAR is not set
@@ -541,33 +533,24 @@ CONFIG_UCC_GETH=y
541# CONFIG_UGETH_NAPI is not set 533# CONFIG_UGETH_NAPI is not set
542# CONFIG_UGETH_MAGIC_PACKET is not set 534# CONFIG_UGETH_MAGIC_PACKET is not set
543# CONFIG_UGETH_FILTERING is not set 535# CONFIG_UGETH_FILTERING is not set
544# CONFIG_UGETH_TX_ON_DEMOND is not set 536# CONFIG_UGETH_TX_ON_DEMAND is not set
545# CONFIG_QLA3XXX is not set 537# CONFIG_QLA3XXX is not set
546# CONFIG_ATL1 is not set 538# CONFIG_ATL1 is not set
547 539CONFIG_NETDEV_10000=y
548#
549# Ethernet (10000 Mbit)
550#
551# CONFIG_CHELSIO_T1 is not set 540# CONFIG_CHELSIO_T1 is not set
552# CONFIG_CHELSIO_T3 is not set 541# CONFIG_CHELSIO_T3 is not set
553# CONFIG_IXGB is not set 542# CONFIG_IXGB is not set
554# CONFIG_S2IO is not set 543# CONFIG_S2IO is not set
555# CONFIG_MYRI10GE is not set 544# CONFIG_MYRI10GE is not set
556# CONFIG_NETXEN_NIC is not set 545# CONFIG_NETXEN_NIC is not set
557 546# CONFIG_MLX4_CORE is not set
558#
559# Token Ring devices
560#
561# CONFIG_TR is not set 547# CONFIG_TR is not set
562 548
563# 549#
564# Wireless LAN (non-hamradio) 550# Wireless LAN
565#
566# CONFIG_NET_RADIO is not set
567
568#
569# Wan interfaces
570# 551#
552# CONFIG_WLAN_PRE80211 is not set
553# CONFIG_WLAN_80211 is not set
571# CONFIG_WAN is not set 554# CONFIG_WAN is not set
572# CONFIG_FDDI is not set 555# CONFIG_FDDI is not set
573# CONFIG_HIPPI is not set 556# CONFIG_HIPPI is not set
@@ -594,6 +577,7 @@ CONFIG_UCC_GETH=y
594# 577#
595CONFIG_INPUT=y 578CONFIG_INPUT=y
596# CONFIG_INPUT_FF_MEMLESS is not set 579# CONFIG_INPUT_FF_MEMLESS is not set
580# CONFIG_INPUT_POLLDEV is not set
597 581
598# 582#
599# Userland interfaces 583# Userland interfaces
@@ -610,6 +594,7 @@ CONFIG_INPUT=y
610# CONFIG_INPUT_KEYBOARD is not set 594# CONFIG_INPUT_KEYBOARD is not set
611# CONFIG_INPUT_MOUSE is not set 595# CONFIG_INPUT_MOUSE is not set
612# CONFIG_INPUT_JOYSTICK is not set 596# CONFIG_INPUT_JOYSTICK is not set
597# CONFIG_INPUT_TABLET is not set
613# CONFIG_INPUT_TOUCHSCREEN is not set 598# CONFIG_INPUT_TOUCHSCREEN is not set
614# CONFIG_INPUT_MISC is not set 599# CONFIG_INPUT_MISC is not set
615 600
@@ -651,10 +636,6 @@ CONFIG_LEGACY_PTY_COUNT=256
651# IPMI 636# IPMI
652# 637#
653# CONFIG_IPMI_HANDLER is not set 638# CONFIG_IPMI_HANDLER is not set
654
655#
656# Watchdog Cards
657#
658CONFIG_WATCHDOG=y 639CONFIG_WATCHDOG=y
659# CONFIG_WATCHDOG_NOWAYOUT is not set 640# CONFIG_WATCHDOG_NOWAYOUT is not set
660 641
@@ -673,7 +654,6 @@ CONFIG_HW_RANDOM=y
673# CONFIG_NVRAM is not set 654# CONFIG_NVRAM is not set
674CONFIG_GEN_RTC=y 655CONFIG_GEN_RTC=y
675# CONFIG_GEN_RTC_X is not set 656# CONFIG_GEN_RTC_X is not set
676# CONFIG_DTLK is not set
677# CONFIG_R3964 is not set 657# CONFIG_R3964 is not set
678# CONFIG_APPLICOM is not set 658# CONFIG_APPLICOM is not set
679# CONFIG_AGP is not set 659# CONFIG_AGP is not set
@@ -684,11 +664,9 @@ CONFIG_GEN_RTC=y
684# TPM devices 664# TPM devices
685# 665#
686# CONFIG_TCG_TPM is not set 666# CONFIG_TCG_TPM is not set
687 667CONFIG_DEVPORT=y
688#
689# I2C support
690#
691CONFIG_I2C=y 668CONFIG_I2C=y
669CONFIG_I2C_BOARDINFO=y
692CONFIG_I2C_CHARDEV=y 670CONFIG_I2C_CHARDEV=y
693 671
694# 672#
@@ -713,9 +691,9 @@ CONFIG_I2C_MPC=y
713# CONFIG_I2C_NFORCE2 is not set 691# CONFIG_I2C_NFORCE2 is not set
714# CONFIG_I2C_OCORES is not set 692# CONFIG_I2C_OCORES is not set
715# CONFIG_I2C_PARPORT_LIGHT is not set 693# CONFIG_I2C_PARPORT_LIGHT is not set
716# CONFIG_I2C_PASEMI is not set
717# CONFIG_I2C_PROSAVAGE is not set 694# CONFIG_I2C_PROSAVAGE is not set
718# CONFIG_I2C_SAVAGE4 is not set 695# CONFIG_I2C_SAVAGE4 is not set
696# CONFIG_I2C_SIMTEC is not set
719# CONFIG_I2C_SIS5595 is not set 697# CONFIG_I2C_SIS5595 is not set
720# CONFIG_I2C_SIS630 is not set 698# CONFIG_I2C_SIS630 is not set
721# CONFIG_I2C_SIS96X is not set 699# CONFIG_I2C_SIS96X is not set
@@ -723,7 +701,6 @@ CONFIG_I2C_MPC=y
723# CONFIG_I2C_VIA is not set 701# CONFIG_I2C_VIA is not set
724# CONFIG_I2C_VIAPRO is not set 702# CONFIG_I2C_VIAPRO is not set
725# CONFIG_I2C_VOODOO3 is not set 703# CONFIG_I2C_VOODOO3 is not set
726# CONFIG_I2C_PCA_ISA is not set
727 704
728# 705#
729# Miscellaneous I2C Chip support 706# Miscellaneous I2C Chip support
@@ -751,13 +728,10 @@ CONFIG_I2C_MPC=y
751# Dallas's 1-wire bus 728# Dallas's 1-wire bus
752# 729#
753# CONFIG_W1 is not set 730# CONFIG_W1 is not set
754
755#
756# Hardware Monitoring support
757#
758CONFIG_HWMON=y 731CONFIG_HWMON=y
759# CONFIG_HWMON_VID is not set 732# CONFIG_HWMON_VID is not set
760# CONFIG_SENSORS_ABITUGURU is not set 733# CONFIG_SENSORS_ABITUGURU is not set
734# CONFIG_SENSORS_AD7418 is not set
761# CONFIG_SENSORS_ADM1021 is not set 735# CONFIG_SENSORS_ADM1021 is not set
762# CONFIG_SENSORS_ADM1025 is not set 736# CONFIG_SENSORS_ADM1025 is not set
763# CONFIG_SENSORS_ADM1026 is not set 737# CONFIG_SENSORS_ADM1026 is not set
@@ -784,6 +758,7 @@ CONFIG_HWMON=y
784# CONFIG_SENSORS_LM90 is not set 758# CONFIG_SENSORS_LM90 is not set
785# CONFIG_SENSORS_LM92 is not set 759# CONFIG_SENSORS_LM92 is not set
786# CONFIG_SENSORS_MAX1619 is not set 760# CONFIG_SENSORS_MAX1619 is not set
761# CONFIG_SENSORS_MAX6650 is not set
787# CONFIG_SENSORS_PC87360 is not set 762# CONFIG_SENSORS_PC87360 is not set
788# CONFIG_SENSORS_PC87427 is not set 763# CONFIG_SENSORS_PC87427 is not set
789# CONFIG_SENSORS_SIS5595 is not set 764# CONFIG_SENSORS_SIS5595 is not set
@@ -811,16 +786,19 @@ CONFIG_HWMON=y
811# Multimedia devices 786# Multimedia devices
812# 787#
813# CONFIG_VIDEO_DEV is not set 788# CONFIG_VIDEO_DEV is not set
789# CONFIG_DVB_CORE is not set
790CONFIG_DAB=y
814 791
815# 792#
816# Digital Video Broadcasting Devices 793# Graphics support
817# 794#
818# CONFIG_DVB is not set 795# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
819 796
820# 797#
821# Graphics support 798# Display device support
822# 799#
823# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 800# CONFIG_DISPLAY_SUPPORT is not set
801# CONFIG_VGASTATE is not set
824# CONFIG_FB is not set 802# CONFIG_FB is not set
825# CONFIG_FB_IBM_GXT4500 is not set 803# CONFIG_FB_IBM_GXT4500 is not set
826 804
@@ -851,10 +829,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
851# USB Gadget Support 829# USB Gadget Support
852# 830#
853# CONFIG_USB_GADGET is not set 831# CONFIG_USB_GADGET is not set
854
855#
856# MMC/SD Card support
857#
858# CONFIG_MMC is not set 832# CONFIG_MMC is not set
859 833
860# 834#
@@ -898,14 +872,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
898# 872#
899 873
900# 874#
901# Auxiliary Display support
902#
903
904#
905# Virtualization
906#
907
908#
909# File systems 875# File systems
910# 876#
911CONFIG_EXT2_FS=y 877CONFIG_EXT2_FS=y
@@ -993,6 +959,7 @@ CONFIG_LOCKD_V4=y
993CONFIG_NFS_COMMON=y 959CONFIG_NFS_COMMON=y
994CONFIG_SUNRPC=y 960CONFIG_SUNRPC=y
995CONFIG_SUNRPC_GSS=y 961CONFIG_SUNRPC_GSS=y
962# CONFIG_SUNRPC_BIND34 is not set
996CONFIG_RPCSEC_GSS_KRB5=y 963CONFIG_RPCSEC_GSS_KRB5=y
997# CONFIG_RPCSEC_GSS_SPKM3 is not set 964# CONFIG_RPCSEC_GSS_SPKM3 is not set
998# CONFIG_SMB_FS is not set 965# CONFIG_SMB_FS is not set
@@ -1018,6 +985,7 @@ CONFIG_PARTITION_ADVANCED=y
1018# CONFIG_SUN_PARTITION is not set 985# CONFIG_SUN_PARTITION is not set
1019# CONFIG_KARMA_PARTITION is not set 986# CONFIG_KARMA_PARTITION is not set
1020# CONFIG_EFI_PARTITION is not set 987# CONFIG_EFI_PARTITION is not set
988# CONFIG_SYSV68_PARTITION is not set
1021 989
1022# 990#
1023# Native Language Support 991# Native Language Support
@@ -1038,11 +1006,13 @@ CONFIG_UCC=y
1038CONFIG_BITREVERSE=y 1006CONFIG_BITREVERSE=y
1039# CONFIG_CRC_CCITT is not set 1007# CONFIG_CRC_CCITT is not set
1040# CONFIG_CRC16 is not set 1008# CONFIG_CRC16 is not set
1009# CONFIG_CRC_ITU_T is not set
1041CONFIG_CRC32=y 1010CONFIG_CRC32=y
1042# CONFIG_LIBCRC32C is not set 1011# CONFIG_LIBCRC32C is not set
1043CONFIG_PLIST=y 1012CONFIG_PLIST=y
1044CONFIG_HAS_IOMEM=y 1013CONFIG_HAS_IOMEM=y
1045CONFIG_HAS_IOPORT=y 1014CONFIG_HAS_IOPORT=y
1015CONFIG_HAS_DMA=y
1046 1016
1047# 1017#
1048# Instrumentation Support 1018# Instrumentation Support
@@ -1059,7 +1029,6 @@ CONFIG_ENABLE_MUST_CHECK=y
1059# CONFIG_DEBUG_FS is not set 1029# CONFIG_DEBUG_FS is not set
1060# CONFIG_HEADERS_CHECK is not set 1030# CONFIG_HEADERS_CHECK is not set
1061# CONFIG_DEBUG_KERNEL is not set 1031# CONFIG_DEBUG_KERNEL is not set
1062CONFIG_LOG_BUF_SHIFT=14
1063# CONFIG_DEBUG_BUGVERBOSE is not set 1032# CONFIG_DEBUG_BUGVERBOSE is not set
1064# CONFIG_BOOTX_TEXT is not set 1033# CONFIG_BOOTX_TEXT is not set
1065# CONFIG_PPC_EARLY_DEBUG is not set 1034# CONFIG_PPC_EARLY_DEBUG is not set
@@ -1092,6 +1061,7 @@ CONFIG_CRYPTO_ECB=m
1092CONFIG_CRYPTO_CBC=y 1061CONFIG_CRYPTO_CBC=y
1093CONFIG_CRYPTO_PCBC=m 1062CONFIG_CRYPTO_PCBC=m
1094# CONFIG_CRYPTO_LRW is not set 1063# CONFIG_CRYPTO_LRW is not set
1064# CONFIG_CRYPTO_CRYPTD is not set
1095CONFIG_CRYPTO_DES=y 1065CONFIG_CRYPTO_DES=y
1096# CONFIG_CRYPTO_FCRYPT is not set 1066# CONFIG_CRYPTO_FCRYPT is not set
1097# CONFIG_CRYPTO_BLOWFISH is not set 1067# CONFIG_CRYPTO_BLOWFISH is not set
diff --git a/arch/powerpc/configs/mpc8540_ads_defconfig b/arch/powerpc/configs/mpc8540_ads_defconfig
index 17120c4723..faedcf8d64 100644
--- a/arch/powerpc/configs/mpc8540_ads_defconfig
+++ b/arch/powerpc/configs/mpc8540_ads_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.22-rc7
4# Mon Jan 22 22:25:24 2007 4# Sun Jul 1 23:56:58 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
34# CONFIG_PPC_83xx is not set 34# CONFIG_PPC_83xx is not set
35CONFIG_PPC_85xx=y 35CONFIG_PPC_85xx=y
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_85xx=y 41CONFIG_85xx=y
42CONFIG_E500=y 42CONFIG_E500=y
@@ -46,6 +46,7 @@ CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y 46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set 47# CONFIG_PHYS_64BIT is not set
48CONFIG_SPE=y 48CONFIG_SPE=y
49# CONFIG_PPC_MM_SLICES is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
51# 52#
@@ -63,14 +64,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 68# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -85,14 +89,19 @@ CONFIG_BUG=y
85CONFIG_ELF_CORE=y 89CONFIG_ELF_CORE=y
86CONFIG_BASE_FULL=y 90CONFIG_BASE_FULL=y
87CONFIG_FUTEX=y 91CONFIG_FUTEX=y
92CONFIG_ANON_INODES=y
88CONFIG_EPOLL=y 93CONFIG_EPOLL=y
94CONFIG_SIGNALFD=y
95CONFIG_TIMERFD=y
96CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 97CONFIG_SHMEM=y
90CONFIG_SLAB=y
91CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLAB=y
100# CONFIG_SLUB is not set
101# CONFIG_SLOB is not set
92CONFIG_RT_MUTEXES=y 102CONFIG_RT_MUTEXES=y
93# CONFIG_TINY_SHMEM is not set 103# CONFIG_TINY_SHMEM is not set
94CONFIG_BASE_SMALL=0 104CONFIG_BASE_SMALL=0
95# CONFIG_SLOB is not set
96 105
97# 106#
98# Loadable module support 107# Loadable module support
@@ -119,17 +128,33 @@ CONFIG_DEFAULT_AS=y
119# CONFIG_DEFAULT_CFQ is not set 128# CONFIG_DEFAULT_CFQ is not set
120# CONFIG_DEFAULT_NOOP is not set 129# CONFIG_DEFAULT_NOOP is not set
121CONFIG_DEFAULT_IOSCHED="anticipatory" 130CONFIG_DEFAULT_IOSCHED="anticipatory"
122# CONFIG_WANT_EARLY_SERIAL is not set
123 131
124# 132#
125# Platform support 133# Platform support
126# 134#
135# CONFIG_PPC_MPC52xx is not set
136# CONFIG_PPC_MPC5200 is not set
137# CONFIG_PPC_CELL is not set
138# CONFIG_PPC_CELL_NATIVE is not set
139# CONFIG_PQ2ADS is not set
127CONFIG_MPC8540_ADS=y 140CONFIG_MPC8540_ADS=y
128# CONFIG_MPC8560_ADS is not set 141# CONFIG_MPC8560_ADS is not set
129# CONFIG_MPC85xx_CDS is not set 142# CONFIG_MPC85xx_CDS is not set
143# CONFIG_MPC85xx_MDS is not set
144# CONFIG_MPC8544_DS is not set
130CONFIG_MPC8540=y 145CONFIG_MPC8540=y
131CONFIG_PPC_INDIRECT_PCI_BE=y 146CONFIG_MPC85xx=y
132CONFIG_MPIC=y 147CONFIG_MPIC=y
148# CONFIG_MPIC_WEIRD is not set
149# CONFIG_PPC_I8259 is not set
150# CONFIG_PPC_RTAS is not set
151# CONFIG_MMIO_NVRAM is not set
152# CONFIG_PPC_MPC106 is not set
153# CONFIG_PPC_970_NAP is not set
154# CONFIG_PPC_INDIRECT_IO is not set
155# CONFIG_GENERIC_IOMAP is not set
156# CONFIG_CPU_FREQ is not set
157# CONFIG_CPM2 is not set
133 158
134# 159#
135# Kernel options 160# Kernel options
@@ -158,21 +183,25 @@ CONFIG_FLAT_NODE_MEM_MAP=y
158# CONFIG_SPARSEMEM_STATIC is not set 183# CONFIG_SPARSEMEM_STATIC is not set
159CONFIG_SPLIT_PTLOCK_CPUS=4 184CONFIG_SPLIT_PTLOCK_CPUS=4
160# CONFIG_RESOURCES_64BIT is not set 185# CONFIG_RESOURCES_64BIT is not set
186CONFIG_ZONE_DMA_FLAG=1
161CONFIG_PROC_DEVICETREE=y 187CONFIG_PROC_DEVICETREE=y
162# CONFIG_CMDLINE_BOOL is not set 188# CONFIG_CMDLINE_BOOL is not set
163# CONFIG_PM is not set 189# CONFIG_PM is not set
164# CONFIG_SECCOMP is not set 190# CONFIG_SECCOMP is not set
191CONFIG_WANT_DEVICE_TREE=y
192CONFIG_DEVICE_TREE=""
165CONFIG_ISA_DMA_API=y 193CONFIG_ISA_DMA_API=y
166 194
167# 195#
168# Bus options 196# Bus options
169# 197#
170# CONFIG_MPIC_WEIRD is not set 198CONFIG_ZONE_DMA=y
171# CONFIG_PPC_I8259 is not set
172CONFIG_PPC_INDIRECT_PCI=y 199CONFIG_PPC_INDIRECT_PCI=y
200CONFIG_PPC_INDIRECT_PCI_BE=y
173CONFIG_FSL_SOC=y 201CONFIG_FSL_SOC=y
174# CONFIG_PCI is not set 202# CONFIG_PCI is not set
175# CONFIG_PCI_DOMAINS is not set 203# CONFIG_PCI_DOMAINS is not set
204# CONFIG_ARCH_SUPPORTS_MSI is not set
176 205
177# 206#
178# PCCARD (PCMCIA/CardBus) support 207# PCCARD (PCMCIA/CardBus) support
@@ -180,10 +209,6 @@ CONFIG_FSL_SOC=y
180# CONFIG_PCCARD is not set 209# CONFIG_PCCARD is not set
181 210
182# 211#
183# PCI Hotplug Support
184#
185
186#
187# Advanced setup 212# Advanced setup
188# 213#
189# CONFIG_ADVANCED_OPTIONS is not set 214# CONFIG_ADVANCED_OPTIONS is not set
@@ -205,13 +230,13 @@ CONFIG_NET=y
205# 230#
206# Networking options 231# Networking options
207# 232#
208# CONFIG_NETDEBUG is not set
209CONFIG_PACKET=y 233CONFIG_PACKET=y
210# CONFIG_PACKET_MMAP is not set 234# CONFIG_PACKET_MMAP is not set
211CONFIG_UNIX=y 235CONFIG_UNIX=y
212CONFIG_XFRM=y 236CONFIG_XFRM=y
213CONFIG_XFRM_USER=y 237CONFIG_XFRM_USER=y
214# CONFIG_XFRM_SUB_POLICY is not set 238# CONFIG_XFRM_SUB_POLICY is not set
239# CONFIG_XFRM_MIGRATE is not set
215# CONFIG_NET_KEY is not set 240# CONFIG_NET_KEY is not set
216CONFIG_INET=y 241CONFIG_INET=y
217CONFIG_IP_MULTICAST=y 242CONFIG_IP_MULTICAST=y
@@ -245,20 +270,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
245# CONFIG_INET6_TUNNEL is not set 270# CONFIG_INET6_TUNNEL is not set
246# CONFIG_NETWORK_SECMARK is not set 271# CONFIG_NETWORK_SECMARK is not set
247# CONFIG_NETFILTER is not set 272# CONFIG_NETFILTER is not set
248
249#
250# DCCP Configuration (EXPERIMENTAL)
251#
252# CONFIG_IP_DCCP is not set 273# CONFIG_IP_DCCP is not set
253
254#
255# SCTP Configuration (EXPERIMENTAL)
256#
257# CONFIG_IP_SCTP is not set 274# CONFIG_IP_SCTP is not set
258
259#
260# TIPC Configuration (EXPERIMENTAL)
261#
262# CONFIG_TIPC is not set 275# CONFIG_TIPC is not set
263# CONFIG_ATM is not set 276# CONFIG_ATM is not set
264# CONFIG_BRIDGE is not set 277# CONFIG_BRIDGE is not set
@@ -284,7 +297,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
284# CONFIG_HAMRADIO is not set 297# CONFIG_HAMRADIO is not set
285# CONFIG_IRDA is not set 298# CONFIG_IRDA is not set
286# CONFIG_BT is not set 299# CONFIG_BT is not set
300# CONFIG_AF_RXRPC is not set
301
302#
303# Wireless
304#
305# CONFIG_CFG80211 is not set
306# CONFIG_WIRELESS_EXT is not set
307# CONFIG_MAC80211 is not set
287# CONFIG_IEEE80211 is not set 308# CONFIG_IEEE80211 is not set
309# CONFIG_RFKILL is not set
288 310
289# 311#
290# Device Drivers 312# Device Drivers
@@ -297,16 +319,13 @@ CONFIG_STANDALONE=y
297CONFIG_PREVENT_FIRMWARE_BUILD=y 319CONFIG_PREVENT_FIRMWARE_BUILD=y
298# CONFIG_FW_LOADER is not set 320# CONFIG_FW_LOADER is not set
299# CONFIG_DEBUG_DRIVER is not set 321# CONFIG_DEBUG_DRIVER is not set
322# CONFIG_DEBUG_DEVRES is not set
300# CONFIG_SYS_HYPERVISOR is not set 323# CONFIG_SYS_HYPERVISOR is not set
301 324
302# 325#
303# Connector - unified userspace <-> kernelspace linker 326# Connector - unified userspace <-> kernelspace linker
304# 327#
305# CONFIG_CONNECTOR is not set 328# CONFIG_CONNECTOR is not set
306
307#
308# Memory Technology Devices (MTD)
309#
310# CONFIG_MTD is not set 329# CONFIG_MTD is not set
311 330
312# 331#
@@ -317,6 +336,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
317# 336#
318# Plug and Play support 337# Plug and Play support
319# 338#
339# CONFIG_PNPACPI is not set
320 340
321# 341#
322# Block devices 342# Block devices
@@ -330,18 +350,13 @@ CONFIG_BLK_DEV_RAM=y
330CONFIG_BLK_DEV_RAM_COUNT=16 350CONFIG_BLK_DEV_RAM_COUNT=16
331CONFIG_BLK_DEV_RAM_SIZE=32768 351CONFIG_BLK_DEV_RAM_SIZE=32768
332CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 352CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
333CONFIG_BLK_DEV_INITRD=y
334# CONFIG_CDROM_PKTCDVD is not set 353# CONFIG_CDROM_PKTCDVD is not set
335# CONFIG_ATA_OVER_ETH is not set 354# CONFIG_ATA_OVER_ETH is not set
336 355
337# 356#
338# Misc devices 357# Misc devices
339# 358#
340# CONFIG_TIFM_CORE is not set 359# CONFIG_BLINK is not set
341
342#
343# ATA/ATAPI/MFM/RLL support
344#
345# CONFIG_IDE is not set 360# CONFIG_IDE is not set
346 361
347# 362#
@@ -350,35 +365,13 @@ CONFIG_BLK_DEV_INITRD=y
350# CONFIG_RAID_ATTRS is not set 365# CONFIG_RAID_ATTRS is not set
351# CONFIG_SCSI is not set 366# CONFIG_SCSI is not set
352# CONFIG_SCSI_NETLINK is not set 367# CONFIG_SCSI_NETLINK is not set
353
354#
355# Serial ATA (prod) and Parallel ATA (experimental) drivers
356#
357# CONFIG_ATA is not set 368# CONFIG_ATA is not set
358 369
359# 370#
360# Multi-device support (RAID and LVM) 371# Multi-device support (RAID and LVM)
361# 372#
362# CONFIG_MD is not set 373# CONFIG_MD is not set
363 374# CONFIG_MACINTOSH_DRIVERS is not set
364#
365# Fusion MPT device support
366#
367# CONFIG_FUSION is not set
368
369#
370# IEEE 1394 (FireWire) support
371#
372
373#
374# I2O device support
375#
376
377#
378# Macintosh device drivers
379#
380# CONFIG_MAC_EMUMOUSEBTN is not set
381# CONFIG_WINDFARM is not set
382 375
383# 376#
384# Network device support 377# Network device support
@@ -388,10 +381,6 @@ CONFIG_NETDEVICES=y
388# CONFIG_BONDING is not set 381# CONFIG_BONDING is not set
389# CONFIG_EQUALIZER is not set 382# CONFIG_EQUALIZER is not set
390# CONFIG_TUN is not set 383# CONFIG_TUN is not set
391
392#
393# PHY device support
394#
395CONFIG_PHYLIB=y 384CONFIG_PHYLIB=y
396 385
397# 386#
@@ -412,29 +401,16 @@ CONFIG_PHYLIB=y
412# 401#
413CONFIG_NET_ETHERNET=y 402CONFIG_NET_ETHERNET=y
414CONFIG_MII=y 403CONFIG_MII=y
415 404CONFIG_NETDEV_1000=y
416#
417# Ethernet (1000 Mbit)
418#
419CONFIG_GIANFAR=y 405CONFIG_GIANFAR=y
420CONFIG_GFAR_NAPI=y 406CONFIG_GFAR_NAPI=y
407CONFIG_NETDEV_10000=y
421 408
422# 409#
423# Ethernet (10000 Mbit) 410# Wireless LAN
424#
425
426#
427# Token Ring devices
428#
429
430#
431# Wireless LAN (non-hamradio)
432#
433# CONFIG_NET_RADIO is not set
434
435#
436# Wan interfaces
437# 411#
412# CONFIG_WLAN_PRE80211 is not set
413# CONFIG_WLAN_80211 is not set
438# CONFIG_WAN is not set 414# CONFIG_WAN is not set
439# CONFIG_PPP is not set 415# CONFIG_PPP is not set
440# CONFIG_SLIP is not set 416# CONFIG_SLIP is not set
@@ -458,6 +434,7 @@ CONFIG_GFAR_NAPI=y
458# 434#
459CONFIG_INPUT=y 435CONFIG_INPUT=y
460# CONFIG_INPUT_FF_MEMLESS is not set 436# CONFIG_INPUT_FF_MEMLESS is not set
437# CONFIG_INPUT_POLLDEV is not set
461 438
462# 439#
463# Userland interfaces 440# Userland interfaces
@@ -474,6 +451,7 @@ CONFIG_INPUT=y
474# CONFIG_INPUT_KEYBOARD is not set 451# CONFIG_INPUT_KEYBOARD is not set
475# CONFIG_INPUT_MOUSE is not set 452# CONFIG_INPUT_MOUSE is not set
476# CONFIG_INPUT_JOYSTICK is not set 453# CONFIG_INPUT_JOYSTICK is not set
454# CONFIG_INPUT_TABLET is not set
477# CONFIG_INPUT_TOUCHSCREEN is not set 455# CONFIG_INPUT_TOUCHSCREEN is not set
478# CONFIG_INPUT_MISC is not set 456# CONFIG_INPUT_MISC is not set
479 457
@@ -497,6 +475,7 @@ CONFIG_SERIAL_8250_CONSOLE=y
497CONFIG_SERIAL_8250_NR_UARTS=4 475CONFIG_SERIAL_8250_NR_UARTS=4
498CONFIG_SERIAL_8250_RUNTIME_UARTS=4 476CONFIG_SERIAL_8250_RUNTIME_UARTS=4
499# CONFIG_SERIAL_8250_EXTENDED is not set 477# CONFIG_SERIAL_8250_EXTENDED is not set
478CONFIG_SERIAL_8250_SHARE_IRQ=y
500 479
501# 480#
502# Non-8250 serial port support 481# Non-8250 serial port support
@@ -504,6 +483,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
504# CONFIG_SERIAL_UARTLITE is not set 483# CONFIG_SERIAL_UARTLITE is not set
505CONFIG_SERIAL_CORE=y 484CONFIG_SERIAL_CORE=y
506CONFIG_SERIAL_CORE_CONSOLE=y 485CONFIG_SERIAL_CORE_CONSOLE=y
486# CONFIG_SERIAL_OF_PLATFORM is not set
507CONFIG_UNIX98_PTYS=y 487CONFIG_UNIX98_PTYS=y
508CONFIG_LEGACY_PTYS=y 488CONFIG_LEGACY_PTYS=y
509CONFIG_LEGACY_PTY_COUNT=256 489CONFIG_LEGACY_PTY_COUNT=256
@@ -512,16 +492,11 @@ CONFIG_LEGACY_PTY_COUNT=256
512# IPMI 492# IPMI
513# 493#
514# CONFIG_IPMI_HANDLER is not set 494# CONFIG_IPMI_HANDLER is not set
515
516#
517# Watchdog Cards
518#
519# CONFIG_WATCHDOG is not set 495# CONFIG_WATCHDOG is not set
520# CONFIG_HW_RANDOM is not set 496# CONFIG_HW_RANDOM is not set
521# CONFIG_NVRAM is not set 497# CONFIG_NVRAM is not set
522CONFIG_GEN_RTC=y 498CONFIG_GEN_RTC=y
523# CONFIG_GEN_RTC_X is not set 499# CONFIG_GEN_RTC_X is not set
524# CONFIG_DTLK is not set
525# CONFIG_R3964 is not set 500# CONFIG_R3964 is not set
526# CONFIG_RAW_DRIVER is not set 501# CONFIG_RAW_DRIVER is not set
527 502
@@ -529,10 +504,6 @@ CONFIG_GEN_RTC=y
529# TPM devices 504# TPM devices
530# 505#
531# CONFIG_TCG_TPM is not set 506# CONFIG_TCG_TPM is not set
532
533#
534# I2C support
535#
536# CONFIG_I2C is not set 507# CONFIG_I2C is not set
537 508
538# 509#
@@ -545,35 +516,41 @@ CONFIG_GEN_RTC=y
545# Dallas's 1-wire bus 516# Dallas's 1-wire bus
546# 517#
547# CONFIG_W1 is not set 518# CONFIG_W1 is not set
548
549#
550# Hardware Monitoring support
551#
552CONFIG_HWMON=y 519CONFIG_HWMON=y
553# CONFIG_HWMON_VID is not set 520# CONFIG_HWMON_VID is not set
554# CONFIG_SENSORS_ABITUGURU is not set 521# CONFIG_SENSORS_ABITUGURU is not set
555# CONFIG_SENSORS_F71805F is not set 522# CONFIG_SENSORS_F71805F is not set
556# CONFIG_SENSORS_PC87427 is not set 523# CONFIG_SENSORS_PC87427 is not set
524# CONFIG_SENSORS_SMSC47M1 is not set
525# CONFIG_SENSORS_SMSC47B397 is not set
557# CONFIG_SENSORS_VT1211 is not set 526# CONFIG_SENSORS_VT1211 is not set
527# CONFIG_SENSORS_W83627HF is not set
558# CONFIG_HWMON_DEBUG_CHIP is not set 528# CONFIG_HWMON_DEBUG_CHIP is not set
559 529
560# 530#
531# Multifunction device drivers
532#
533# CONFIG_MFD_SM501 is not set
534
535#
561# Multimedia devices 536# Multimedia devices
562# 537#
563# CONFIG_VIDEO_DEV is not set 538# CONFIG_VIDEO_DEV is not set
539# CONFIG_DVB_CORE is not set
540CONFIG_DAB=y
564 541
565# 542#
566# Digital Video Broadcasting Devices 543# Graphics support
567# 544#
568# CONFIG_DVB is not set 545# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
569 546
570# 547#
571# Graphics support 548# Display device support
572# 549#
573CONFIG_FIRMWARE_EDID=y 550# CONFIG_DISPLAY_SUPPORT is not set
551# CONFIG_VGASTATE is not set
574# CONFIG_FB is not set 552# CONFIG_FB is not set
575# CONFIG_FB_IBM_GXT4500 is not set 553# CONFIG_FB_IBM_GXT4500 is not set
576# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
577 554
578# 555#
579# Sound 556# Sound
@@ -584,6 +561,7 @@ CONFIG_FIRMWARE_EDID=y
584# HID Devices 561# HID Devices
585# 562#
586CONFIG_HID=y 563CONFIG_HID=y
564# CONFIG_HID_DEBUG is not set
587 565
588# 566#
589# USB support 567# USB support
@@ -600,10 +578,6 @@ CONFIG_HID=y
600# USB Gadget Support 578# USB Gadget Support
601# 579#
602# CONFIG_USB_GADGET is not set 580# CONFIG_USB_GADGET is not set
603
604#
605# MMC/SD Card support
606#
607# CONFIG_MMC is not set 581# CONFIG_MMC is not set
608 582
609# 583#
@@ -646,10 +620,6 @@ CONFIG_HID=y
646# 620#
647 621
648# 622#
649# Virtualization
650#
651
652#
653# File systems 623# File systems
654# 624#
655CONFIG_EXT2_FS=y 625CONFIG_EXT2_FS=y
@@ -734,6 +704,7 @@ CONFIG_ROOT_NFS=y
734CONFIG_LOCKD=y 704CONFIG_LOCKD=y
735CONFIG_NFS_COMMON=y 705CONFIG_NFS_COMMON=y
736CONFIG_SUNRPC=y 706CONFIG_SUNRPC=y
707# CONFIG_SUNRPC_BIND34 is not set
737# CONFIG_RPCSEC_GSS_KRB5 is not set 708# CONFIG_RPCSEC_GSS_KRB5 is not set
738# CONFIG_RPCSEC_GSS_SPKM3 is not set 709# CONFIG_RPCSEC_GSS_SPKM3 is not set
739# CONFIG_SMB_FS is not set 710# CONFIG_SMB_FS is not set
@@ -759,6 +730,7 @@ CONFIG_PARTITION_ADVANCED=y
759# CONFIG_SUN_PARTITION is not set 730# CONFIG_SUN_PARTITION is not set
760# CONFIG_KARMA_PARTITION is not set 731# CONFIG_KARMA_PARTITION is not set
761# CONFIG_EFI_PARTITION is not set 732# CONFIG_EFI_PARTITION is not set
733# CONFIG_SYSV68_PARTITION is not set
762 734
763# 735#
764# Native Language Support 736# Native Language Support
@@ -769,6 +741,7 @@ CONFIG_PARTITION_ADVANCED=y
769# Distributed Lock Manager 741# Distributed Lock Manager
770# 742#
771# CONFIG_DLM is not set 743# CONFIG_DLM is not set
744# CONFIG_UCC_SLOW is not set
772 745
773# 746#
774# Library routines 747# Library routines
@@ -776,10 +749,13 @@ CONFIG_PARTITION_ADVANCED=y
776CONFIG_BITREVERSE=y 749CONFIG_BITREVERSE=y
777# CONFIG_CRC_CCITT is not set 750# CONFIG_CRC_CCITT is not set
778# CONFIG_CRC16 is not set 751# CONFIG_CRC16 is not set
752# CONFIG_CRC_ITU_T is not set
779CONFIG_CRC32=y 753CONFIG_CRC32=y
780# CONFIG_LIBCRC32C is not set 754# CONFIG_LIBCRC32C is not set
781CONFIG_PLIST=y 755CONFIG_PLIST=y
782CONFIG_IOMAP_COPY=y 756CONFIG_HAS_IOMEM=y
757CONFIG_HAS_IOPORT=y
758CONFIG_HAS_DMA=y
783 759
784# 760#
785# Instrumentation Support 761# Instrumentation Support
@@ -796,15 +772,15 @@ CONFIG_ENABLE_MUST_CHECK=y
796# CONFIG_DEBUG_FS is not set 772# CONFIG_DEBUG_FS is not set
797# CONFIG_HEADERS_CHECK is not set 773# CONFIG_HEADERS_CHECK is not set
798CONFIG_DEBUG_KERNEL=y 774CONFIG_DEBUG_KERNEL=y
799CONFIG_LOG_BUF_SHIFT=14 775# CONFIG_DEBUG_SHIRQ is not set
800CONFIG_DETECT_SOFTLOCKUP=y 776CONFIG_DETECT_SOFTLOCKUP=y
801# CONFIG_SCHEDSTATS is not set 777# CONFIG_SCHEDSTATS is not set
778# CONFIG_TIMER_STATS is not set
802# CONFIG_DEBUG_SLAB is not set 779# CONFIG_DEBUG_SLAB is not set
803# CONFIG_DEBUG_RT_MUTEXES is not set 780# CONFIG_DEBUG_RT_MUTEXES is not set
804# CONFIG_RT_MUTEX_TESTER is not set 781# CONFIG_RT_MUTEX_TESTER is not set
805# CONFIG_DEBUG_SPINLOCK is not set 782# CONFIG_DEBUG_SPINLOCK is not set
806CONFIG_DEBUG_MUTEXES=y 783CONFIG_DEBUG_MUTEXES=y
807# CONFIG_DEBUG_RWSEMS is not set
808# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 784# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
809# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 785# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
810# CONFIG_DEBUG_KOBJECT is not set 786# CONFIG_DEBUG_KOBJECT is not set
@@ -813,7 +789,10 @@ CONFIG_DEBUG_MUTEXES=y
813# CONFIG_DEBUG_VM is not set 789# CONFIG_DEBUG_VM is not set
814# CONFIG_DEBUG_LIST is not set 790# CONFIG_DEBUG_LIST is not set
815CONFIG_FORCED_INLINING=y 791CONFIG_FORCED_INLINING=y
816# CONFIG_RCU_TORTURE_TEST is not set 792# CONFIG_FAULT_INJECTION is not set
793# CONFIG_DEBUG_STACKOVERFLOW is not set
794# CONFIG_DEBUG_STACK_USAGE is not set
795# CONFIG_DEBUG_PAGEALLOC is not set
817# CONFIG_DEBUGGER is not set 796# CONFIG_DEBUGGER is not set
818# CONFIG_BDI_SWITCH is not set 797# CONFIG_BDI_SWITCH is not set
819# CONFIG_BOOTX_TEXT is not set 798# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/mpc8544_ds_defconfig b/arch/powerpc/configs/mpc8544_ds_defconfig
index b563513cc9..c40a25a79c 100644
--- a/arch/powerpc/configs/mpc8544_ds_defconfig
+++ b/arch/powerpc/configs/mpc8544_ds_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.21-rc3 3# Linux kernel version: 2.6.22-rc7
4# Mon Mar 19 17:18:49 2007 4# Sun Jul 1 23:56:58 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -46,6 +46,7 @@ CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y 46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set 47# CONFIG_PHYS_64BIT is not set
48# CONFIG_SPE is not set 48# CONFIG_SPE is not set
49# CONFIG_PPC_MM_SLICES is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
51# 52#
@@ -73,6 +74,7 @@ CONFIG_AUDIT=y
73# CONFIG_AUDITSYSCALL is not set 74# CONFIG_AUDITSYSCALL is not set
74CONFIG_IKCONFIG=y 75CONFIG_IKCONFIG=y
75CONFIG_IKCONFIG_PROC=y 76CONFIG_IKCONFIG_PROC=y
77CONFIG_LOG_BUF_SHIFT=14
76CONFIG_SYSFS_DEPRECATED=y 78CONFIG_SYSFS_DEPRECATED=y
77# CONFIG_RELAY is not set 79# CONFIG_RELAY is not set
78CONFIG_BLK_DEV_INITRD=y 80CONFIG_BLK_DEV_INITRD=y
@@ -90,14 +92,19 @@ CONFIG_BUG=y
90CONFIG_ELF_CORE=y 92CONFIG_ELF_CORE=y
91CONFIG_BASE_FULL=y 93CONFIG_BASE_FULL=y
92CONFIG_FUTEX=y 94CONFIG_FUTEX=y
95CONFIG_ANON_INODES=y
93CONFIG_EPOLL=y 96CONFIG_EPOLL=y
97CONFIG_SIGNALFD=y
98CONFIG_TIMERFD=y
99CONFIG_EVENTFD=y
94CONFIG_SHMEM=y 100CONFIG_SHMEM=y
95CONFIG_SLAB=y
96CONFIG_VM_EVENT_COUNTERS=y 101CONFIG_VM_EVENT_COUNTERS=y
102CONFIG_SLAB=y
103# CONFIG_SLUB is not set
104# CONFIG_SLOB is not set
97CONFIG_RT_MUTEXES=y 105CONFIG_RT_MUTEXES=y
98# CONFIG_TINY_SHMEM is not set 106# CONFIG_TINY_SHMEM is not set
99CONFIG_BASE_SMALL=0 107CONFIG_BASE_SMALL=0
100# CONFIG_SLOB is not set
101 108
102# 109#
103# Loadable module support 110# Loadable module support
@@ -129,19 +136,32 @@ CONFIG_IOSCHED_CFQ=y
129CONFIG_DEFAULT_CFQ=y 136CONFIG_DEFAULT_CFQ=y
130# CONFIG_DEFAULT_NOOP is not set 137# CONFIG_DEFAULT_NOOP is not set
131CONFIG_DEFAULT_IOSCHED="cfq" 138CONFIG_DEFAULT_IOSCHED="cfq"
132# CONFIG_WANT_EARLY_SERIAL is not set
133 139
134# 140#
135# Platform support 141# Platform support
136# 142#
143# CONFIG_PPC_MPC52xx is not set
144# CONFIG_PPC_MPC5200 is not set
145# CONFIG_PPC_CELL is not set
146# CONFIG_PPC_CELL_NATIVE is not set
147# CONFIG_PQ2ADS is not set
137# CONFIG_MPC8540_ADS is not set 148# CONFIG_MPC8540_ADS is not set
138# CONFIG_MPC8560_ADS is not set 149# CONFIG_MPC8560_ADS is not set
139# CONFIG_MPC85xx_CDS is not set 150# CONFIG_MPC85xx_CDS is not set
140# CONFIG_MPC85xx_MDS is not set 151# CONFIG_MPC85xx_MDS is not set
141CONFIG_MPC8544_DS=y 152CONFIG_MPC8544_DS=y
142CONFIG_MPC85xx=y 153CONFIG_MPC85xx=y
143CONFIG_PPC_INDIRECT_PCI_BE=y
144CONFIG_MPIC=y 154CONFIG_MPIC=y
155# CONFIG_MPIC_WEIRD is not set
156# CONFIG_PPC_I8259 is not set
157# CONFIG_PPC_RTAS is not set
158# CONFIG_MMIO_NVRAM is not set
159# CONFIG_PPC_MPC106 is not set
160# CONFIG_PPC_970_NAP is not set
161# CONFIG_PPC_INDIRECT_IO is not set
162# CONFIG_GENERIC_IOMAP is not set
163# CONFIG_CPU_FREQ is not set
164# CONFIG_CPM2 is not set
145 165
146# 166#
147# Kernel options 167# Kernel options
@@ -176,28 +196,26 @@ CONFIG_CMDLINE_BOOL=y
176CONFIG_CMDLINE="root=/dev/sda3 rw console=ttyS0,115200" 196CONFIG_CMDLINE="root=/dev/sda3 rw console=ttyS0,115200"
177# CONFIG_PM is not set 197# CONFIG_PM is not set
178CONFIG_SECCOMP=y 198CONFIG_SECCOMP=y
199CONFIG_WANT_DEVICE_TREE=y
200CONFIG_DEVICE_TREE=""
179CONFIG_ISA_DMA_API=y 201CONFIG_ISA_DMA_API=y
180 202
181# 203#
182# Bus options 204# Bus options
183# 205#
184CONFIG_ZONE_DMA=y 206CONFIG_ZONE_DMA=y
185# CONFIG_MPIC_WEIRD is not set
186# CONFIG_PPC_I8259 is not set
187CONFIG_PPC_INDIRECT_PCI=y 207CONFIG_PPC_INDIRECT_PCI=y
208CONFIG_PPC_INDIRECT_PCI_BE=y
188CONFIG_FSL_SOC=y 209CONFIG_FSL_SOC=y
189# CONFIG_PCI is not set 210# CONFIG_PCI is not set
190# CONFIG_PCI_DOMAINS is not set 211# CONFIG_PCI_DOMAINS is not set
212# CONFIG_ARCH_SUPPORTS_MSI is not set
191 213
192# 214#
193# PCCARD (PCMCIA/CardBus) support 215# PCCARD (PCMCIA/CardBus) support
194# 216#
195 217
196# 218#
197# PCI Hotplug Support
198#
199
200#
201# Advanced setup 219# Advanced setup
202# 220#
203# CONFIG_ADVANCED_OPTIONS is not set 221# CONFIG_ADVANCED_OPTIONS is not set
@@ -219,7 +237,6 @@ CONFIG_NET=y
219# 237#
220# Networking options 238# Networking options
221# 239#
222# CONFIG_NETDEBUG is not set
223CONFIG_PACKET=y 240CONFIG_PACKET=y
224# CONFIG_PACKET_MMAP is not set 241# CONFIG_PACKET_MMAP is not set
225CONFIG_UNIX=y 242CONFIG_UNIX=y
@@ -270,25 +287,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
270# CONFIG_INET6_TUNNEL is not set 287# CONFIG_INET6_TUNNEL is not set
271# CONFIG_NETWORK_SECMARK is not set 288# CONFIG_NETWORK_SECMARK is not set
272# CONFIG_NETFILTER is not set 289# CONFIG_NETFILTER is not set
273
274#
275# DCCP Configuration (EXPERIMENTAL)
276#
277# CONFIG_IP_DCCP is not set 290# CONFIG_IP_DCCP is not set
278
279#
280# SCTP Configuration (EXPERIMENTAL)
281#
282CONFIG_IP_SCTP=m 291CONFIG_IP_SCTP=m
283# CONFIG_SCTP_DBG_MSG is not set 292# CONFIG_SCTP_DBG_MSG is not set
284# CONFIG_SCTP_DBG_OBJCNT is not set 293# CONFIG_SCTP_DBG_OBJCNT is not set
285# CONFIG_SCTP_HMAC_NONE is not set 294# CONFIG_SCTP_HMAC_NONE is not set
286# CONFIG_SCTP_HMAC_SHA1 is not set 295# CONFIG_SCTP_HMAC_SHA1 is not set
287CONFIG_SCTP_HMAC_MD5=y 296CONFIG_SCTP_HMAC_MD5=y
288
289#
290# TIPC Configuration (EXPERIMENTAL)
291#
292# CONFIG_TIPC is not set 297# CONFIG_TIPC is not set
293# CONFIG_ATM is not set 298# CONFIG_ATM is not set
294# CONFIG_BRIDGE is not set 299# CONFIG_BRIDGE is not set
@@ -314,10 +319,19 @@ CONFIG_SCTP_HMAC_MD5=y
314# CONFIG_HAMRADIO is not set 319# CONFIG_HAMRADIO is not set
315# CONFIG_IRDA is not set 320# CONFIG_IRDA is not set
316# CONFIG_BT is not set 321# CONFIG_BT is not set
317# CONFIG_IEEE80211 is not set 322# CONFIG_AF_RXRPC is not set
318CONFIG_FIB_RULES=y 323CONFIG_FIB_RULES=y
319 324
320# 325#
326# Wireless
327#
328# CONFIG_CFG80211 is not set
329# CONFIG_WIRELESS_EXT is not set
330# CONFIG_MAC80211 is not set
331# CONFIG_IEEE80211 is not set
332# CONFIG_RFKILL is not set
333
334#
321# Device Drivers 335# Device Drivers
322# 336#
323 337
@@ -334,10 +348,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
334# Connector - unified userspace <-> kernelspace linker 348# Connector - unified userspace <-> kernelspace linker
335# 349#
336# CONFIG_CONNECTOR is not set 350# CONFIG_CONNECTOR is not set
337
338#
339# Memory Technology Devices (MTD)
340#
341# CONFIG_MTD is not set 351# CONFIG_MTD is not set
342 352
343# 353#
@@ -368,10 +378,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
368# 378#
369# Misc devices 379# Misc devices
370# 380#
371 381# CONFIG_BLINK is not set
372#
373# ATA/ATAPI/MFM/RLL support
374#
375# CONFIG_IDE is not set 382# CONFIG_IDE is not set
376 383
377# 384#
@@ -400,6 +407,7 @@ CONFIG_SCSI_MULTI_LUN=y
400# CONFIG_SCSI_CONSTANTS is not set 407# CONFIG_SCSI_CONSTANTS is not set
401CONFIG_SCSI_LOGGING=y 408CONFIG_SCSI_LOGGING=y
402# CONFIG_SCSI_SCAN_ASYNC is not set 409# CONFIG_SCSI_SCAN_ASYNC is not set
410CONFIG_SCSI_WAIT_SCAN=m
403 411
404# 412#
405# SCSI Transports 413# SCSI Transports
@@ -415,10 +423,6 @@ CONFIG_SCSI_LOGGING=y
415# 423#
416# CONFIG_ISCSI_TCP is not set 424# CONFIG_ISCSI_TCP is not set
417# CONFIG_SCSI_DEBUG is not set 425# CONFIG_SCSI_DEBUG is not set
418
419#
420# Serial ATA (prod) and Parallel ATA (experimental) drivers
421#
422CONFIG_ATA=y 426CONFIG_ATA=y
423# CONFIG_ATA_NONSTANDARD is not set 427# CONFIG_ATA_NONSTANDARD is not set
424# CONFIG_PATA_PLATFORM is not set 428# CONFIG_PATA_PLATFORM is not set
@@ -427,25 +431,7 @@ CONFIG_ATA=y
427# Multi-device support (RAID and LVM) 431# Multi-device support (RAID and LVM)
428# 432#
429# CONFIG_MD is not set 433# CONFIG_MD is not set
430 434# CONFIG_MACINTOSH_DRIVERS is not set
431#
432# Fusion MPT device support
433#
434# CONFIG_FUSION is not set
435
436#
437# IEEE 1394 (FireWire) support
438#
439
440#
441# I2O device support
442#
443
444#
445# Macintosh device drivers
446#
447# CONFIG_MAC_EMUMOUSEBTN is not set
448# CONFIG_WINDFARM is not set
449 435
450# 436#
451# Network device support 437# Network device support
@@ -455,10 +441,6 @@ CONFIG_NETDEVICES=y
455# CONFIG_BONDING is not set 441# CONFIG_BONDING is not set
456# CONFIG_EQUALIZER is not set 442# CONFIG_EQUALIZER is not set
457# CONFIG_TUN is not set 443# CONFIG_TUN is not set
458
459#
460# PHY device support
461#
462CONFIG_PHYLIB=y 444CONFIG_PHYLIB=y
463 445
464# 446#
@@ -479,29 +461,16 @@ CONFIG_VITESSE_PHY=y
479# 461#
480CONFIG_NET_ETHERNET=y 462CONFIG_NET_ETHERNET=y
481CONFIG_MII=y 463CONFIG_MII=y
482 464CONFIG_NETDEV_1000=y
483#
484# Ethernet (1000 Mbit)
485#
486CONFIG_GIANFAR=y 465CONFIG_GIANFAR=y
487CONFIG_GFAR_NAPI=y 466CONFIG_GFAR_NAPI=y
467CONFIG_NETDEV_10000=y
488 468
489# 469#
490# Ethernet (10000 Mbit) 470# Wireless LAN
491#
492
493#
494# Token Ring devices
495#
496
497#
498# Wireless LAN (non-hamradio)
499#
500# CONFIG_NET_RADIO is not set
501
502#
503# Wan interfaces
504# 471#
472# CONFIG_WLAN_PRE80211 is not set
473# CONFIG_WLAN_80211 is not set
505# CONFIG_WAN is not set 474# CONFIG_WAN is not set
506# CONFIG_PPP is not set 475# CONFIG_PPP is not set
507# CONFIG_SLIP is not set 476# CONFIG_SLIP is not set
@@ -525,6 +494,7 @@ CONFIG_GFAR_NAPI=y
525# 494#
526CONFIG_INPUT=y 495CONFIG_INPUT=y
527# CONFIG_INPUT_FF_MEMLESS is not set 496# CONFIG_INPUT_FF_MEMLESS is not set
497# CONFIG_INPUT_POLLDEV is not set
528 498
529# 499#
530# Userland interfaces 500# Userland interfaces
@@ -541,6 +511,7 @@ CONFIG_INPUT=y
541# CONFIG_INPUT_KEYBOARD is not set 511# CONFIG_INPUT_KEYBOARD is not set
542# CONFIG_INPUT_MOUSE is not set 512# CONFIG_INPUT_MOUSE is not set
543# CONFIG_INPUT_JOYSTICK is not set 513# CONFIG_INPUT_JOYSTICK is not set
514# CONFIG_INPUT_TABLET is not set
544# CONFIG_INPUT_TOUCHSCREEN is not set 515# CONFIG_INPUT_TOUCHSCREEN is not set
545# CONFIG_INPUT_MISC is not set 516# CONFIG_INPUT_MISC is not set
546 517
@@ -571,6 +542,7 @@ CONFIG_SERIAL_8250_CONSOLE=y
571CONFIG_SERIAL_8250_NR_UARTS=4 542CONFIG_SERIAL_8250_NR_UARTS=4
572CONFIG_SERIAL_8250_RUNTIME_UARTS=4 543CONFIG_SERIAL_8250_RUNTIME_UARTS=4
573# CONFIG_SERIAL_8250_EXTENDED is not set 544# CONFIG_SERIAL_8250_EXTENDED is not set
545CONFIG_SERIAL_8250_SHARE_IRQ=y
574 546
575# 547#
576# Non-8250 serial port support 548# Non-8250 serial port support
@@ -587,16 +559,11 @@ CONFIG_LEGACY_PTY_COUNT=256
587# IPMI 559# IPMI
588# 560#
589# CONFIG_IPMI_HANDLER is not set 561# CONFIG_IPMI_HANDLER is not set
590
591#
592# Watchdog Cards
593#
594# CONFIG_WATCHDOG is not set 562# CONFIG_WATCHDOG is not set
595# CONFIG_HW_RANDOM is not set 563# CONFIG_HW_RANDOM is not set
596CONFIG_NVRAM=y 564CONFIG_NVRAM=y
597CONFIG_GEN_RTC=y 565CONFIG_GEN_RTC=y
598CONFIG_GEN_RTC_X=y 566CONFIG_GEN_RTC_X=y
599# CONFIG_DTLK is not set
600# CONFIG_R3964 is not set 567# CONFIG_R3964 is not set
601# CONFIG_RAW_DRIVER is not set 568# CONFIG_RAW_DRIVER is not set
602 569
@@ -604,10 +571,6 @@ CONFIG_GEN_RTC_X=y
604# TPM devices 571# TPM devices
605# 572#
606# CONFIG_TCG_TPM is not set 573# CONFIG_TCG_TPM is not set
607
608#
609# I2C support
610#
611# CONFIG_I2C is not set 574# CONFIG_I2C is not set
612 575
613# 576#
@@ -620,12 +583,7 @@ CONFIG_GEN_RTC_X=y
620# Dallas's 1-wire bus 583# Dallas's 1-wire bus
621# 584#
622# CONFIG_W1 is not set 585# CONFIG_W1 is not set
623
624#
625# Hardware Monitoring support
626#
627# CONFIG_HWMON is not set 586# CONFIG_HWMON is not set
628# CONFIG_HWMON_VID is not set
629 587
630# 588#
631# Multifunction device drivers 589# Multifunction device drivers
@@ -636,13 +594,9 @@ CONFIG_GEN_RTC_X=y
636# Multimedia devices 594# Multimedia devices
637# 595#
638# CONFIG_VIDEO_DEV is not set 596# CONFIG_VIDEO_DEV is not set
639
640#
641# Digital Video Broadcasting Devices
642#
643CONFIG_DVB=y
644CONFIG_DVB_CORE=m 597CONFIG_DVB_CORE=m
645# CONFIG_DVB_CORE_ATTACH is not set 598# CONFIG_DVB_CORE_ATTACH is not set
599CONFIG_DVB_CAPTURE_DRIVERS=y
646 600
647# 601#
648# Supported DVB Frontends 602# Supported DVB Frontends
@@ -676,11 +630,18 @@ CONFIG_DVB_CORE=m
676# 630#
677# Miscellaneous devices 631# Miscellaneous devices
678# 632#
633CONFIG_DAB=y
679 634
680# 635#
681# Graphics support 636# Graphics support
682# 637#
683# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 638# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
639
640#
641# Display device support
642#
643# CONFIG_DISPLAY_SUPPORT is not set
644# CONFIG_VGASTATE is not set
684# CONFIG_FB is not set 645# CONFIG_FB is not set
685# CONFIG_FB_IBM_GXT4500 is not set 646# CONFIG_FB_IBM_GXT4500 is not set
686 647
@@ -716,10 +677,6 @@ CONFIG_HID=y
716# USB Gadget Support 677# USB Gadget Support
717# 678#
718# CONFIG_USB_GADGET is not set 679# CONFIG_USB_GADGET is not set
719
720#
721# MMC/SD Card support
722#
723# CONFIG_MMC is not set 680# CONFIG_MMC is not set
724 681
725# 682#
@@ -759,17 +716,29 @@ CONFIG_RTC_INTF_SYSFS=y
759CONFIG_RTC_INTF_PROC=y 716CONFIG_RTC_INTF_PROC=y
760CONFIG_RTC_INTF_DEV=y 717CONFIG_RTC_INTF_DEV=y
761# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 718# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
719# CONFIG_RTC_DRV_TEST is not set
720
721#
722# I2C RTC drivers
723#
762 724
763# 725#
764# RTC drivers 726# SPI RTC drivers
727#
728
729#
730# Platform RTC drivers
765# 731#
766# CONFIG_RTC_DRV_DS1553 is not set 732# CONFIG_RTC_DRV_DS1553 is not set
767# CONFIG_RTC_DRV_DS1742 is not set 733# CONFIG_RTC_DRV_DS1742 is not set
768# CONFIG_RTC_DRV_M48T86 is not set 734# CONFIG_RTC_DRV_M48T86 is not set
769# CONFIG_RTC_DRV_TEST is not set
770# CONFIG_RTC_DRV_V3020 is not set 735# CONFIG_RTC_DRV_V3020 is not set
771 736
772# 737#
738# on-CPU RTC drivers
739#
740
741#
773# DMA Engine support 742# DMA Engine support
774# 743#
775# CONFIG_DMA_ENGINE is not set 744# CONFIG_DMA_ENGINE is not set
@@ -783,14 +752,6 @@ CONFIG_RTC_INTF_DEV=y
783# 752#
784 753
785# 754#
786# Auxiliary Display support
787#
788
789#
790# Virtualization
791#
792
793#
794# File systems 755# File systems
795# 756#
796CONFIG_EXT2_FS=y 757CONFIG_EXT2_FS=y
@@ -890,6 +851,7 @@ CONFIG_LOCKD_V4=y
890CONFIG_NFS_COMMON=y 851CONFIG_NFS_COMMON=y
891CONFIG_SUNRPC=y 852CONFIG_SUNRPC=y
892CONFIG_SUNRPC_GSS=y 853CONFIG_SUNRPC_GSS=y
854# CONFIG_SUNRPC_BIND34 is not set
893CONFIG_RPCSEC_GSS_KRB5=y 855CONFIG_RPCSEC_GSS_KRB5=y
894# CONFIG_RPCSEC_GSS_SPKM3 is not set 856# CONFIG_RPCSEC_GSS_SPKM3 is not set
895# CONFIG_SMB_FS is not set 857# CONFIG_SMB_FS is not set
@@ -919,6 +881,7 @@ CONFIG_MSDOS_PARTITION=y
919# CONFIG_SUN_PARTITION is not set 881# CONFIG_SUN_PARTITION is not set
920# CONFIG_KARMA_PARTITION is not set 882# CONFIG_KARMA_PARTITION is not set
921# CONFIG_EFI_PARTITION is not set 883# CONFIG_EFI_PARTITION is not set
884# CONFIG_SYSV68_PARTITION is not set
922 885
923# 886#
924# Native Language Support 887# Native Language Support
@@ -968,6 +931,7 @@ CONFIG_NLS_UTF8=m
968# Distributed Lock Manager 931# Distributed Lock Manager
969# 932#
970# CONFIG_DLM is not set 933# CONFIG_DLM is not set
934# CONFIG_UCC_SLOW is not set
971 935
972# 936#
973# Library routines 937# Library routines
@@ -975,12 +939,14 @@ CONFIG_NLS_UTF8=m
975CONFIG_BITREVERSE=y 939CONFIG_BITREVERSE=y
976# CONFIG_CRC_CCITT is not set 940# CONFIG_CRC_CCITT is not set
977# CONFIG_CRC16 is not set 941# CONFIG_CRC16 is not set
942# CONFIG_CRC_ITU_T is not set
978CONFIG_CRC32=y 943CONFIG_CRC32=y
979CONFIG_LIBCRC32C=m 944CONFIG_LIBCRC32C=m
980CONFIG_ZLIB_INFLATE=y 945CONFIG_ZLIB_INFLATE=y
981CONFIG_PLIST=y 946CONFIG_PLIST=y
982CONFIG_HAS_IOMEM=y 947CONFIG_HAS_IOMEM=y
983CONFIG_HAS_IOPORT=y 948CONFIG_HAS_IOPORT=y
949CONFIG_HAS_DMA=y
984 950
985# 951#
986# Instrumentation Support 952# Instrumentation Support
@@ -998,7 +964,6 @@ CONFIG_ENABLE_MUST_CHECK=y
998# CONFIG_HEADERS_CHECK is not set 964# CONFIG_HEADERS_CHECK is not set
999CONFIG_DEBUG_KERNEL=y 965CONFIG_DEBUG_KERNEL=y
1000# CONFIG_DEBUG_SHIRQ is not set 966# CONFIG_DEBUG_SHIRQ is not set
1001CONFIG_LOG_BUF_SHIFT=14
1002CONFIG_DETECT_SOFTLOCKUP=y 967CONFIG_DETECT_SOFTLOCKUP=y
1003# CONFIG_SCHEDSTATS is not set 968# CONFIG_SCHEDSTATS is not set
1004# CONFIG_TIMER_STATS is not set 969# CONFIG_TIMER_STATS is not set
@@ -1020,6 +985,7 @@ CONFIG_FORCED_INLINING=y
1020# CONFIG_FAULT_INJECTION is not set 985# CONFIG_FAULT_INJECTION is not set
1021# CONFIG_DEBUG_STACKOVERFLOW is not set 986# CONFIG_DEBUG_STACKOVERFLOW is not set
1022# CONFIG_DEBUG_STACK_USAGE is not set 987# CONFIG_DEBUG_STACK_USAGE is not set
988# CONFIG_DEBUG_PAGEALLOC is not set
1023# CONFIG_DEBUGGER is not set 989# CONFIG_DEBUGGER is not set
1024# CONFIG_BDI_SWITCH is not set 990# CONFIG_BDI_SWITCH is not set
1025# CONFIG_BOOTX_TEXT is not set 991# CONFIG_BOOTX_TEXT is not set
@@ -1054,6 +1020,7 @@ CONFIG_CRYPTO_MD5=y
1054CONFIG_CRYPTO_CBC=y 1020CONFIG_CRYPTO_CBC=y
1055CONFIG_CRYPTO_PCBC=m 1021CONFIG_CRYPTO_PCBC=m
1056# CONFIG_CRYPTO_LRW is not set 1022# CONFIG_CRYPTO_LRW is not set
1023# CONFIG_CRYPTO_CRYPTD is not set
1057CONFIG_CRYPTO_DES=y 1024CONFIG_CRYPTO_DES=y
1058# CONFIG_CRYPTO_FCRYPT is not set 1025# CONFIG_CRYPTO_FCRYPT is not set
1059# CONFIG_CRYPTO_BLOWFISH is not set 1026# CONFIG_CRYPTO_BLOWFISH is not set
diff --git a/arch/powerpc/configs/mpc8560_ads_defconfig b/arch/powerpc/configs/mpc8560_ads_defconfig
index ecaa267a85..a30bc6f621 100644
--- a/arch/powerpc/configs/mpc8560_ads_defconfig
+++ b/arch/powerpc/configs/mpc8560_ads_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.22-rc7
4# Mon Jan 22 22:25:53 2007 4# Sun Jul 1 23:56:58 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -20,7 +20,7 @@ CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y 21CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 22CONFIG_PPC_OF=y
23# CONFIG_PPC_UDBG_16550 is not set 23CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set 24# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 25CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 26CONFIG_GENERIC_BUG=y
@@ -34,9 +34,9 @@ CONFIG_DEFAULT_UIMAGE=y
34# CONFIG_PPC_83xx is not set 34# CONFIG_PPC_83xx is not set
35CONFIG_PPC_85xx=y 35CONFIG_PPC_85xx=y
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_85xx=y 41CONFIG_85xx=y
42CONFIG_E500=y 42CONFIG_E500=y
@@ -46,6 +46,7 @@ CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y 46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set 47# CONFIG_PHYS_64BIT is not set
48CONFIG_SPE=y 48CONFIG_SPE=y
49# CONFIG_PPC_MM_SLICES is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
51# 52#
@@ -63,14 +64,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 68# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -85,14 +89,19 @@ CONFIG_BUG=y
85CONFIG_ELF_CORE=y 89CONFIG_ELF_CORE=y
86CONFIG_BASE_FULL=y 90CONFIG_BASE_FULL=y
87CONFIG_FUTEX=y 91CONFIG_FUTEX=y
92CONFIG_ANON_INODES=y
88CONFIG_EPOLL=y 93CONFIG_EPOLL=y
94CONFIG_SIGNALFD=y
95CONFIG_TIMERFD=y
96CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 97CONFIG_SHMEM=y
90CONFIG_SLAB=y
91CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLAB=y
100# CONFIG_SLUB is not set
101# CONFIG_SLOB is not set
92CONFIG_RT_MUTEXES=y 102CONFIG_RT_MUTEXES=y
93# CONFIG_TINY_SHMEM is not set 103# CONFIG_TINY_SHMEM is not set
94CONFIG_BASE_SMALL=0 104CONFIG_BASE_SMALL=0
95# CONFIG_SLOB is not set
96 105
97# 106#
98# Loadable module support 107# Loadable module support
@@ -119,18 +128,33 @@ CONFIG_DEFAULT_AS=y
119# CONFIG_DEFAULT_CFQ is not set 128# CONFIG_DEFAULT_CFQ is not set
120# CONFIG_DEFAULT_NOOP is not set 129# CONFIG_DEFAULT_NOOP is not set
121CONFIG_DEFAULT_IOSCHED="anticipatory" 130CONFIG_DEFAULT_IOSCHED="anticipatory"
122CONFIG_CPM2=y
123# CONFIG_WANT_EARLY_SERIAL is not set
124 131
125# 132#
126# Platform support 133# Platform support
127# 134#
135# CONFIG_PPC_MPC52xx is not set
136# CONFIG_PPC_MPC5200 is not set
137# CONFIG_PPC_CELL is not set
138# CONFIG_PPC_CELL_NATIVE is not set
139# CONFIG_PQ2ADS is not set
128# CONFIG_MPC8540_ADS is not set 140# CONFIG_MPC8540_ADS is not set
129CONFIG_MPC8560_ADS=y 141CONFIG_MPC8560_ADS=y
130# CONFIG_MPC85xx_CDS is not set 142# CONFIG_MPC85xx_CDS is not set
143# CONFIG_MPC85xx_MDS is not set
144# CONFIG_MPC8544_DS is not set
131CONFIG_MPC8560=y 145CONFIG_MPC8560=y
132CONFIG_PPC_INDIRECT_PCI_BE=y 146CONFIG_MPC85xx=y
133CONFIG_MPIC=y 147CONFIG_MPIC=y
148# CONFIG_MPIC_WEIRD is not set
149# CONFIG_PPC_I8259 is not set
150# CONFIG_PPC_RTAS is not set
151# CONFIG_MMIO_NVRAM is not set
152# CONFIG_PPC_MPC106 is not set
153# CONFIG_PPC_970_NAP is not set
154# CONFIG_PPC_INDIRECT_IO is not set
155# CONFIG_GENERIC_IOMAP is not set
156# CONFIG_CPU_FREQ is not set
157CONFIG_CPM2=y
134 158
135# 159#
136# Kernel options 160# Kernel options
@@ -148,7 +172,6 @@ CONFIG_BINFMT_ELF=y
148CONFIG_BINFMT_MISC=y 172CONFIG_BINFMT_MISC=y
149# CONFIG_MATH_EMULATION is not set 173# CONFIG_MATH_EMULATION is not set
150CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 174CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
151# CONFIG_PC_KEYBOARD is not set
152CONFIG_ARCH_FLATMEM_ENABLE=y 175CONFIG_ARCH_FLATMEM_ENABLE=y
153CONFIG_ARCH_POPULATES_NODE_MAP=y 176CONFIG_ARCH_POPULATES_NODE_MAP=y
154CONFIG_SELECT_MEMORY_MODEL=y 177CONFIG_SELECT_MEMORY_MODEL=y
@@ -160,32 +183,33 @@ CONFIG_FLAT_NODE_MEM_MAP=y
160# CONFIG_SPARSEMEM_STATIC is not set 183# CONFIG_SPARSEMEM_STATIC is not set
161CONFIG_SPLIT_PTLOCK_CPUS=4 184CONFIG_SPLIT_PTLOCK_CPUS=4
162# CONFIG_RESOURCES_64BIT is not set 185# CONFIG_RESOURCES_64BIT is not set
186CONFIG_ZONE_DMA_FLAG=1
163# CONFIG_PROC_DEVICETREE is not set 187# CONFIG_PROC_DEVICETREE is not set
164# CONFIG_CMDLINE_BOOL is not set 188# CONFIG_CMDLINE_BOOL is not set
165# CONFIG_PM is not set 189# CONFIG_PM is not set
166# CONFIG_SECCOMP is not set 190# CONFIG_SECCOMP is not set
191CONFIG_WANT_DEVICE_TREE=y
192CONFIG_DEVICE_TREE=""
167CONFIG_ISA_DMA_API=y 193CONFIG_ISA_DMA_API=y
168 194
169# 195#
170# Bus options 196# Bus options
171# 197#
172# CONFIG_MPIC_WEIRD is not set 198CONFIG_ZONE_DMA=y
173# CONFIG_PPC_I8259 is not set
174CONFIG_PPC_INDIRECT_PCI=y 199CONFIG_PPC_INDIRECT_PCI=y
200CONFIG_PPC_INDIRECT_PCI_BE=y
175CONFIG_FSL_SOC=y 201CONFIG_FSL_SOC=y
176CONFIG_PCI=y 202CONFIG_PCI=y
177CONFIG_PCI_DOMAINS=y 203CONFIG_PCI_DOMAINS=y
178# CONFIG_PCIEPORTBUS is not set 204# CONFIG_PCIEPORTBUS is not set
205CONFIG_ARCH_SUPPORTS_MSI=y
206# CONFIG_PCI_MSI is not set
179CONFIG_PCI_DEBUG=y 207CONFIG_PCI_DEBUG=y
180 208
181# 209#
182# PCCARD (PCMCIA/CardBus) support 210# PCCARD (PCMCIA/CardBus) support
183# 211#
184# CONFIG_PCCARD is not set 212# CONFIG_PCCARD is not set
185
186#
187# PCI Hotplug Support
188#
189# CONFIG_HOTPLUG_PCI is not set 213# CONFIG_HOTPLUG_PCI is not set
190 214
191# 215#
@@ -210,13 +234,13 @@ CONFIG_NET=y
210# 234#
211# Networking options 235# Networking options
212# 236#
213# CONFIG_NETDEBUG is not set
214CONFIG_PACKET=y 237CONFIG_PACKET=y
215# CONFIG_PACKET_MMAP is not set 238# CONFIG_PACKET_MMAP is not set
216CONFIG_UNIX=y 239CONFIG_UNIX=y
217CONFIG_XFRM=y 240CONFIG_XFRM=y
218# CONFIG_XFRM_USER is not set 241# CONFIG_XFRM_USER is not set
219# CONFIG_XFRM_SUB_POLICY is not set 242# CONFIG_XFRM_SUB_POLICY is not set
243# CONFIG_XFRM_MIGRATE is not set
220# CONFIG_NET_KEY is not set 244# CONFIG_NET_KEY is not set
221CONFIG_INET=y 245CONFIG_INET=y
222CONFIG_IP_MULTICAST=y 246CONFIG_IP_MULTICAST=y
@@ -250,20 +274,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
250# CONFIG_INET6_TUNNEL is not set 274# CONFIG_INET6_TUNNEL is not set
251# CONFIG_NETWORK_SECMARK is not set 275# CONFIG_NETWORK_SECMARK is not set
252# CONFIG_NETFILTER is not set 276# CONFIG_NETFILTER is not set
253
254#
255# DCCP Configuration (EXPERIMENTAL)
256#
257# CONFIG_IP_DCCP is not set 277# CONFIG_IP_DCCP is not set
258
259#
260# SCTP Configuration (EXPERIMENTAL)
261#
262# CONFIG_IP_SCTP is not set 278# CONFIG_IP_SCTP is not set
263
264#
265# TIPC Configuration (EXPERIMENTAL)
266#
267# CONFIG_TIPC is not set 279# CONFIG_TIPC is not set
268# CONFIG_ATM is not set 280# CONFIG_ATM is not set
269# CONFIG_BRIDGE is not set 281# CONFIG_BRIDGE is not set
@@ -289,7 +301,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
289# CONFIG_HAMRADIO is not set 301# CONFIG_HAMRADIO is not set
290# CONFIG_IRDA is not set 302# CONFIG_IRDA is not set
291# CONFIG_BT is not set 303# CONFIG_BT is not set
304# CONFIG_AF_RXRPC is not set
305
306#
307# Wireless
308#
309# CONFIG_CFG80211 is not set
310# CONFIG_WIRELESS_EXT is not set
311# CONFIG_MAC80211 is not set
292# CONFIG_IEEE80211 is not set 312# CONFIG_IEEE80211 is not set
313# CONFIG_RFKILL is not set
293 314
294# 315#
295# Device Drivers 316# Device Drivers
@@ -302,16 +323,13 @@ CONFIG_STANDALONE=y
302CONFIG_PREVENT_FIRMWARE_BUILD=y 323CONFIG_PREVENT_FIRMWARE_BUILD=y
303# CONFIG_FW_LOADER is not set 324# CONFIG_FW_LOADER is not set
304# CONFIG_DEBUG_DRIVER is not set 325# CONFIG_DEBUG_DRIVER is not set
326# CONFIG_DEBUG_DEVRES is not set
305# CONFIG_SYS_HYPERVISOR is not set 327# CONFIG_SYS_HYPERVISOR is not set
306 328
307# 329#
308# Connector - unified userspace <-> kernelspace linker 330# Connector - unified userspace <-> kernelspace linker
309# 331#
310# CONFIG_CONNECTOR is not set 332# CONFIG_CONNECTOR is not set
311
312#
313# Memory Technology Devices (MTD)
314#
315# CONFIG_MTD is not set 333# CONFIG_MTD is not set
316 334
317# 335#
@@ -322,6 +340,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
322# 340#
323# Plug and Play support 341# Plug and Play support
324# 342#
343# CONFIG_PNPACPI is not set
325 344
326# 345#
327# Block devices 346# Block devices
@@ -340,19 +359,16 @@ CONFIG_BLK_DEV_RAM=y
340CONFIG_BLK_DEV_RAM_COUNT=16 359CONFIG_BLK_DEV_RAM_COUNT=16
341CONFIG_BLK_DEV_RAM_SIZE=32768 360CONFIG_BLK_DEV_RAM_SIZE=32768
342CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 361CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
343CONFIG_BLK_DEV_INITRD=y
344# CONFIG_CDROM_PKTCDVD is not set 362# CONFIG_CDROM_PKTCDVD is not set
345# CONFIG_ATA_OVER_ETH is not set 363# CONFIG_ATA_OVER_ETH is not set
346 364
347# 365#
348# Misc devices 366# Misc devices
349# 367#
368# CONFIG_PHANTOM is not set
350# CONFIG_SGI_IOC4 is not set 369# CONFIG_SGI_IOC4 is not set
351# CONFIG_TIFM_CORE is not set 370# CONFIG_TIFM_CORE is not set
352 371# CONFIG_BLINK is not set
353#
354# ATA/ATAPI/MFM/RLL support
355#
356# CONFIG_IDE is not set 372# CONFIG_IDE is not set
357 373
358# 374#
@@ -361,10 +377,6 @@ CONFIG_BLK_DEV_INITRD=y
361# CONFIG_RAID_ATTRS is not set 377# CONFIG_RAID_ATTRS is not set
362# CONFIG_SCSI is not set 378# CONFIG_SCSI is not set
363# CONFIG_SCSI_NETLINK is not set 379# CONFIG_SCSI_NETLINK is not set
364
365#
366# Serial ATA (prod) and Parallel ATA (experimental) drivers
367#
368# CONFIG_ATA is not set 380# CONFIG_ATA is not set
369 381
370# 382#
@@ -380,18 +392,14 @@ CONFIG_BLK_DEV_INITRD=y
380# 392#
381# IEEE 1394 (FireWire) support 393# IEEE 1394 (FireWire) support
382# 394#
395# CONFIG_FIREWIRE is not set
383# CONFIG_IEEE1394 is not set 396# CONFIG_IEEE1394 is not set
384 397
385# 398#
386# I2O device support 399# I2O device support
387# 400#
388# CONFIG_I2O is not set 401# CONFIG_I2O is not set
389 402# CONFIG_MACINTOSH_DRIVERS is not set
390#
391# Macintosh device drivers
392#
393# CONFIG_MAC_EMUMOUSEBTN is not set
394# CONFIG_WINDFARM is not set
395 403
396# 404#
397# Network device support 405# Network device support
@@ -401,15 +409,7 @@ CONFIG_NETDEVICES=y
401# CONFIG_BONDING is not set 409# CONFIG_BONDING is not set
402# CONFIG_EQUALIZER is not set 410# CONFIG_EQUALIZER is not set
403# CONFIG_TUN is not set 411# CONFIG_TUN is not set
404
405#
406# ARCnet devices
407#
408# CONFIG_ARCNET is not set 412# CONFIG_ARCNET is not set
409
410#
411# PHY device support
412#
413CONFIG_PHYLIB=y 413CONFIG_PHYLIB=y
414 414
415# 415#
@@ -444,10 +444,7 @@ CONFIG_MII=y
444CONFIG_FS_ENET=y 444CONFIG_FS_ENET=y
445# CONFIG_FS_ENET_HAS_SCC is not set 445# CONFIG_FS_ENET_HAS_SCC is not set
446CONFIG_FS_ENET_HAS_FCC=y 446CONFIG_FS_ENET_HAS_FCC=y
447 447CONFIG_NETDEV_1000=y
448#
449# Ethernet (1000 Mbit)
450#
451# CONFIG_ACENIC is not set 448# CONFIG_ACENIC is not set
452# CONFIG_DL2K is not set 449# CONFIG_DL2K is not set
453CONFIG_E1000=y 450CONFIG_E1000=y
@@ -461,34 +458,28 @@ CONFIG_E1000_NAPI=y
461# CONFIG_SKGE is not set 458# CONFIG_SKGE is not set
462# CONFIG_SKY2 is not set 459# CONFIG_SKY2 is not set
463# CONFIG_SK98LIN is not set 460# CONFIG_SK98LIN is not set
461# CONFIG_VIA_VELOCITY is not set
464# CONFIG_TIGON3 is not set 462# CONFIG_TIGON3 is not set
465# CONFIG_BNX2 is not set 463# CONFIG_BNX2 is not set
466CONFIG_GIANFAR=y 464CONFIG_GIANFAR=y
467CONFIG_GFAR_NAPI=y 465CONFIG_GFAR_NAPI=y
468# CONFIG_QLA3XXX is not set 466# CONFIG_QLA3XXX is not set
469 467# CONFIG_ATL1 is not set
470# 468CONFIG_NETDEV_10000=y
471# Ethernet (10000 Mbit)
472#
473# CONFIG_CHELSIO_T1 is not set 469# CONFIG_CHELSIO_T1 is not set
470# CONFIG_CHELSIO_T3 is not set
474# CONFIG_IXGB is not set 471# CONFIG_IXGB is not set
475# CONFIG_S2IO is not set 472# CONFIG_S2IO is not set
476# CONFIG_MYRI10GE is not set 473# CONFIG_MYRI10GE is not set
477# CONFIG_NETXEN_NIC is not set 474# CONFIG_NETXEN_NIC is not set
478 475# CONFIG_MLX4_CORE is not set
479#
480# Token Ring devices
481#
482# CONFIG_TR is not set 476# CONFIG_TR is not set
483 477
484# 478#
485# Wireless LAN (non-hamradio) 479# Wireless LAN
486#
487# CONFIG_NET_RADIO is not set
488
489#
490# Wan interfaces
491# 480#
481# CONFIG_WLAN_PRE80211 is not set
482# CONFIG_WLAN_80211 is not set
492# CONFIG_WAN is not set 483# CONFIG_WAN is not set
493# CONFIG_FDDI is not set 484# CONFIG_FDDI is not set
494# CONFIG_HIPPI is not set 485# CONFIG_HIPPI is not set
@@ -514,6 +505,7 @@ CONFIG_GFAR_NAPI=y
514# 505#
515CONFIG_INPUT=y 506CONFIG_INPUT=y
516# CONFIG_INPUT_FF_MEMLESS is not set 507# CONFIG_INPUT_FF_MEMLESS is not set
508# CONFIG_INPUT_POLLDEV is not set
517 509
518# 510#
519# Userland interfaces 511# Userland interfaces
@@ -530,6 +522,7 @@ CONFIG_INPUT=y
530# CONFIG_INPUT_KEYBOARD is not set 522# CONFIG_INPUT_KEYBOARD is not set
531# CONFIG_INPUT_MOUSE is not set 523# CONFIG_INPUT_MOUSE is not set
532# CONFIG_INPUT_JOYSTICK is not set 524# CONFIG_INPUT_JOYSTICK is not set
525# CONFIG_INPUT_TABLET is not set
533# CONFIG_INPUT_TOUCHSCREEN is not set 526# CONFIG_INPUT_TOUCHSCREEN is not set
534# CONFIG_INPUT_MISC is not set 527# CONFIG_INPUT_MISC is not set
535 528
@@ -573,16 +566,11 @@ CONFIG_LEGACY_PTY_COUNT=256
573# IPMI 566# IPMI
574# 567#
575# CONFIG_IPMI_HANDLER is not set 568# CONFIG_IPMI_HANDLER is not set
576
577#
578# Watchdog Cards
579#
580# CONFIG_WATCHDOG is not set 569# CONFIG_WATCHDOG is not set
581CONFIG_HW_RANDOM=y 570CONFIG_HW_RANDOM=y
582# CONFIG_NVRAM is not set 571# CONFIG_NVRAM is not set
583CONFIG_GEN_RTC=y 572CONFIG_GEN_RTC=y
584# CONFIG_GEN_RTC_X is not set 573# CONFIG_GEN_RTC_X is not set
585# CONFIG_DTLK is not set
586# CONFIG_R3964 is not set 574# CONFIG_R3964 is not set
587# CONFIG_APPLICOM is not set 575# CONFIG_APPLICOM is not set
588# CONFIG_AGP is not set 576# CONFIG_AGP is not set
@@ -593,10 +581,7 @@ CONFIG_GEN_RTC=y
593# TPM devices 581# TPM devices
594# 582#
595# CONFIG_TCG_TPM is not set 583# CONFIG_TCG_TPM is not set
596 584CONFIG_DEVPORT=y
597#
598# I2C support
599#
600# CONFIG_I2C is not set 585# CONFIG_I2C is not set
601 586
602# 587#
@@ -609,35 +594,41 @@ CONFIG_GEN_RTC=y
609# Dallas's 1-wire bus 594# Dallas's 1-wire bus
610# 595#
611# CONFIG_W1 is not set 596# CONFIG_W1 is not set
612
613#
614# Hardware Monitoring support
615#
616CONFIG_HWMON=y 597CONFIG_HWMON=y
617# CONFIG_HWMON_VID is not set 598# CONFIG_HWMON_VID is not set
618# CONFIG_SENSORS_ABITUGURU is not set 599# CONFIG_SENSORS_ABITUGURU is not set
619# CONFIG_SENSORS_F71805F is not set 600# CONFIG_SENSORS_F71805F is not set
620# CONFIG_SENSORS_PC87427 is not set 601# CONFIG_SENSORS_PC87427 is not set
602# CONFIG_SENSORS_SMSC47M1 is not set
603# CONFIG_SENSORS_SMSC47B397 is not set
621# CONFIG_SENSORS_VT1211 is not set 604# CONFIG_SENSORS_VT1211 is not set
605# CONFIG_SENSORS_W83627HF is not set
622# CONFIG_HWMON_DEBUG_CHIP is not set 606# CONFIG_HWMON_DEBUG_CHIP is not set
623 607
624# 608#
609# Multifunction device drivers
610#
611# CONFIG_MFD_SM501 is not set
612
613#
625# Multimedia devices 614# Multimedia devices
626# 615#
627# CONFIG_VIDEO_DEV is not set 616# CONFIG_VIDEO_DEV is not set
617# CONFIG_DVB_CORE is not set
618CONFIG_DAB=y
628 619
629# 620#
630# Digital Video Broadcasting Devices 621# Graphics support
631# 622#
632# CONFIG_DVB is not set 623# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
633 624
634# 625#
635# Graphics support 626# Display device support
636# 627#
637CONFIG_FIRMWARE_EDID=y 628# CONFIG_DISPLAY_SUPPORT is not set
629# CONFIG_VGASTATE is not set
638# CONFIG_FB is not set 630# CONFIG_FB is not set
639# CONFIG_FB_IBM_GXT4500 is not set 631# CONFIG_FB_IBM_GXT4500 is not set
640# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
641 632
642# 633#
643# Sound 634# Sound
@@ -648,6 +639,7 @@ CONFIG_FIRMWARE_EDID=y
648# HID Devices 639# HID Devices
649# 640#
650CONFIG_HID=y 641CONFIG_HID=y
642# CONFIG_HID_DEBUG is not set
651 643
652# 644#
653# USB support 645# USB support
@@ -665,10 +657,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
665# USB Gadget Support 657# USB Gadget Support
666# 658#
667# CONFIG_USB_GADGET is not set 659# CONFIG_USB_GADGET is not set
668
669#
670# MMC/SD Card support
671#
672# CONFIG_MMC is not set 660# CONFIG_MMC is not set
673 661
674# 662#
@@ -712,10 +700,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
712# 700#
713 701
714# 702#
715# Virtualization
716#
717
718#
719# File systems 703# File systems
720# 704#
721CONFIG_EXT2_FS=y 705CONFIG_EXT2_FS=y
@@ -800,6 +784,7 @@ CONFIG_ROOT_NFS=y
800CONFIG_LOCKD=y 784CONFIG_LOCKD=y
801CONFIG_NFS_COMMON=y 785CONFIG_NFS_COMMON=y
802CONFIG_SUNRPC=y 786CONFIG_SUNRPC=y
787# CONFIG_SUNRPC_BIND34 is not set
803# CONFIG_RPCSEC_GSS_KRB5 is not set 788# CONFIG_RPCSEC_GSS_KRB5 is not set
804# CONFIG_RPCSEC_GSS_SPKM3 is not set 789# CONFIG_RPCSEC_GSS_SPKM3 is not set
805# CONFIG_SMB_FS is not set 790# CONFIG_SMB_FS is not set
@@ -825,6 +810,7 @@ CONFIG_PARTITION_ADVANCED=y
825# CONFIG_SUN_PARTITION is not set 810# CONFIG_SUN_PARTITION is not set
826# CONFIG_KARMA_PARTITION is not set 811# CONFIG_KARMA_PARTITION is not set
827# CONFIG_EFI_PARTITION is not set 812# CONFIG_EFI_PARTITION is not set
813# CONFIG_SYSV68_PARTITION is not set
828 814
829# 815#
830# Native Language Support 816# Native Language Support
@@ -835,6 +821,7 @@ CONFIG_PARTITION_ADVANCED=y
835# Distributed Lock Manager 821# Distributed Lock Manager
836# 822#
837# CONFIG_DLM is not set 823# CONFIG_DLM is not set
824# CONFIG_UCC_SLOW is not set
838 825
839# 826#
840# Library routines 827# Library routines
@@ -842,10 +829,13 @@ CONFIG_PARTITION_ADVANCED=y
842CONFIG_BITREVERSE=y 829CONFIG_BITREVERSE=y
843# CONFIG_CRC_CCITT is not set 830# CONFIG_CRC_CCITT is not set
844# CONFIG_CRC16 is not set 831# CONFIG_CRC16 is not set
832# CONFIG_CRC_ITU_T is not set
845CONFIG_CRC32=y 833CONFIG_CRC32=y
846# CONFIG_LIBCRC32C is not set 834# CONFIG_LIBCRC32C is not set
847CONFIG_PLIST=y 835CONFIG_PLIST=y
848CONFIG_IOMAP_COPY=y 836CONFIG_HAS_IOMEM=y
837CONFIG_HAS_IOPORT=y
838CONFIG_HAS_DMA=y
849 839
850# 840#
851# Instrumentation Support 841# Instrumentation Support
@@ -862,15 +852,15 @@ CONFIG_ENABLE_MUST_CHECK=y
862# CONFIG_DEBUG_FS is not set 852# CONFIG_DEBUG_FS is not set
863# CONFIG_HEADERS_CHECK is not set 853# CONFIG_HEADERS_CHECK is not set
864CONFIG_DEBUG_KERNEL=y 854CONFIG_DEBUG_KERNEL=y
865CONFIG_LOG_BUF_SHIFT=14 855# CONFIG_DEBUG_SHIRQ is not set
866CONFIG_DETECT_SOFTLOCKUP=y 856CONFIG_DETECT_SOFTLOCKUP=y
867# CONFIG_SCHEDSTATS is not set 857# CONFIG_SCHEDSTATS is not set
858# CONFIG_TIMER_STATS is not set
868# CONFIG_DEBUG_SLAB is not set 859# CONFIG_DEBUG_SLAB is not set
869# CONFIG_DEBUG_RT_MUTEXES is not set 860# CONFIG_DEBUG_RT_MUTEXES is not set
870# CONFIG_RT_MUTEX_TESTER is not set 861# CONFIG_RT_MUTEX_TESTER is not set
871# CONFIG_DEBUG_SPINLOCK is not set 862# CONFIG_DEBUG_SPINLOCK is not set
872CONFIG_DEBUG_MUTEXES=y 863CONFIG_DEBUG_MUTEXES=y
873# CONFIG_DEBUG_RWSEMS is not set
874# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 864# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
875# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 865# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
876# CONFIG_DEBUG_KOBJECT is not set 866# CONFIG_DEBUG_KOBJECT is not set
@@ -879,7 +869,10 @@ CONFIG_DEBUG_MUTEXES=y
879# CONFIG_DEBUG_VM is not set 869# CONFIG_DEBUG_VM is not set
880# CONFIG_DEBUG_LIST is not set 870# CONFIG_DEBUG_LIST is not set
881CONFIG_FORCED_INLINING=y 871CONFIG_FORCED_INLINING=y
882# CONFIG_RCU_TORTURE_TEST is not set 872# CONFIG_FAULT_INJECTION is not set
873# CONFIG_DEBUG_STACKOVERFLOW is not set
874# CONFIG_DEBUG_STACK_USAGE is not set
875# CONFIG_DEBUG_PAGEALLOC is not set
883# CONFIG_DEBUGGER is not set 876# CONFIG_DEBUGGER is not set
884# CONFIG_KGDB_CONSOLE is not set 877# CONFIG_KGDB_CONSOLE is not set
885# CONFIG_BDI_SWITCH is not set 878# CONFIG_BDI_SWITCH is not set
diff --git a/arch/powerpc/configs/mpc8568mds_defconfig b/arch/powerpc/configs/mpc8568mds_defconfig
index 7b3800674c..6451d4dd28 100644
--- a/arch/powerpc/configs/mpc8568mds_defconfig
+++ b/arch/powerpc/configs/mpc8568mds_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 3# Linux kernel version: 2.6.22-rc7
4# Sat Feb 17 16:26:53 2007 4# Sun Jul 1 23:56:59 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -46,6 +46,7 @@ CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y 46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set 47# CONFIG_PHYS_64BIT is not set
48CONFIG_SPE=y 48CONFIG_SPE=y
49# CONFIG_PPC_MM_SLICES is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
51# 52#
@@ -70,8 +71,10 @@ CONFIG_SYSVIPC_SYSCTL=y
70# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
71# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
73CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
75CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
76# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
77CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -84,14 +87,19 @@ CONFIG_BUG=y
84CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
85CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
86CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
87# CONFIG_EPOLL is not set 91# CONFIG_EPOLL is not set
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
88CONFIG_SHMEM=y 95CONFIG_SHMEM=y
89CONFIG_SLAB=y
90CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLAB=y
98# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set
91CONFIG_RT_MUTEXES=y 100CONFIG_RT_MUTEXES=y
92# CONFIG_TINY_SHMEM is not set 101# CONFIG_TINY_SHMEM is not set
93CONFIG_BASE_SMALL=0 102CONFIG_BASE_SMALL=0
94# CONFIG_SLOB is not set
95 103
96# 104#
97# Loadable module support 105# Loadable module support
@@ -123,18 +131,32 @@ CONFIG_DEFAULT_AS=y
123# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
124# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
125CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
126# CONFIG_WANT_EARLY_SERIAL is not set
127 134
128# 135#
129# Platform support 136# Platform support
130# 137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
131# CONFIG_MPC8540_ADS is not set 143# CONFIG_MPC8540_ADS is not set
132# CONFIG_MPC8560_ADS is not set 144# CONFIG_MPC8560_ADS is not set
133# CONFIG_MPC85xx_CDS is not set 145# CONFIG_MPC85xx_CDS is not set
134CONFIG_MPC85xx_MDS=y 146CONFIG_MPC85xx_MDS=y
147# CONFIG_MPC8544_DS is not set
135CONFIG_MPC85xx=y 148CONFIG_MPC85xx=y
136CONFIG_PPC_INDIRECT_PCI_BE=y
137CONFIG_MPIC=y 149CONFIG_MPIC=y
150# CONFIG_MPIC_WEIRD is not set
151# CONFIG_PPC_I8259 is not set
152# CONFIG_PPC_RTAS is not set
153# CONFIG_MMIO_NVRAM is not set
154# CONFIG_PPC_MPC106 is not set
155# CONFIG_PPC_970_NAP is not set
156# CONFIG_PPC_INDIRECT_IO is not set
157# CONFIG_GENERIC_IOMAP is not set
158# CONFIG_CPU_FREQ is not set
159# CONFIG_CPM2 is not set
138 160
139# 161#
140# Kernel options 162# Kernel options
@@ -168,18 +190,20 @@ CONFIG_PROC_DEVICETREE=y
168# CONFIG_CMDLINE_BOOL is not set 190# CONFIG_CMDLINE_BOOL is not set
169# CONFIG_PM is not set 191# CONFIG_PM is not set
170CONFIG_SECCOMP=y 192CONFIG_SECCOMP=y
193CONFIG_WANT_DEVICE_TREE=y
194CONFIG_DEVICE_TREE=""
171CONFIG_ISA_DMA_API=y 195CONFIG_ISA_DMA_API=y
172 196
173# 197#
174# Bus options 198# Bus options
175# 199#
176CONFIG_ZONE_DMA=y 200CONFIG_ZONE_DMA=y
177# CONFIG_MPIC_WEIRD is not set
178# CONFIG_PPC_I8259 is not set
179CONFIG_PPC_INDIRECT_PCI=y 201CONFIG_PPC_INDIRECT_PCI=y
202CONFIG_PPC_INDIRECT_PCI_BE=y
180CONFIG_FSL_SOC=y 203CONFIG_FSL_SOC=y
181# CONFIG_PCI is not set 204# CONFIG_PCI is not set
182# CONFIG_PCI_DOMAINS is not set 205# CONFIG_PCI_DOMAINS is not set
206# CONFIG_ARCH_SUPPORTS_MSI is not set
183 207
184# 208#
185# PCCARD (PCMCIA/CardBus) support 209# PCCARD (PCMCIA/CardBus) support
@@ -187,10 +211,6 @@ CONFIG_FSL_SOC=y
187# CONFIG_PCCARD is not set 211# CONFIG_PCCARD is not set
188 212
189# 213#
190# PCI Hotplug Support
191#
192
193#
194# Advanced setup 214# Advanced setup
195# 215#
196# CONFIG_ADVANCED_OPTIONS is not set 216# CONFIG_ADVANCED_OPTIONS is not set
@@ -212,7 +232,6 @@ CONFIG_NET=y
212# 232#
213# Networking options 233# Networking options
214# 234#
215# CONFIG_NETDEBUG is not set
216CONFIG_PACKET=y 235CONFIG_PACKET=y
217# CONFIG_PACKET_MMAP is not set 236# CONFIG_PACKET_MMAP is not set
218CONFIG_UNIX=y 237CONFIG_UNIX=y
@@ -253,20 +272,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
253# CONFIG_INET6_TUNNEL is not set 272# CONFIG_INET6_TUNNEL is not set
254# CONFIG_NETWORK_SECMARK is not set 273# CONFIG_NETWORK_SECMARK is not set
255# CONFIG_NETFILTER is not set 274# CONFIG_NETFILTER is not set
256
257#
258# DCCP Configuration (EXPERIMENTAL)
259#
260# CONFIG_IP_DCCP is not set 275# CONFIG_IP_DCCP is not set
261
262#
263# SCTP Configuration (EXPERIMENTAL)
264#
265# CONFIG_IP_SCTP is not set 276# CONFIG_IP_SCTP is not set
266
267#
268# TIPC Configuration (EXPERIMENTAL)
269#
270# CONFIG_TIPC is not set 277# CONFIG_TIPC is not set
271# CONFIG_ATM is not set 278# CONFIG_ATM is not set
272# CONFIG_BRIDGE is not set 279# CONFIG_BRIDGE is not set
@@ -292,7 +299,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
292# CONFIG_HAMRADIO is not set 299# CONFIG_HAMRADIO is not set
293# CONFIG_IRDA is not set 300# CONFIG_IRDA is not set
294# CONFIG_BT is not set 301# CONFIG_BT is not set
302# CONFIG_AF_RXRPC is not set
303
304#
305# Wireless
306#
307# CONFIG_CFG80211 is not set
308# CONFIG_WIRELESS_EXT is not set
309# CONFIG_MAC80211 is not set
295# CONFIG_IEEE80211 is not set 310# CONFIG_IEEE80211 is not set
311# CONFIG_RFKILL is not set
296 312
297# 313#
298# Device Drivers 314# Device Drivers
@@ -312,10 +328,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
312# Connector - unified userspace <-> kernelspace linker 328# Connector - unified userspace <-> kernelspace linker
313# 329#
314# CONFIG_CONNECTOR is not set 330# CONFIG_CONNECTOR is not set
315
316#
317# Memory Technology Devices (MTD)
318#
319# CONFIG_MTD is not set 331# CONFIG_MTD is not set
320 332
321# 333#
@@ -326,6 +338,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
326# 338#
327# Plug and Play support 339# Plug and Play support
328# 340#
341# CONFIG_PNPACPI is not set
329 342
330# 343#
331# Block devices 344# Block devices
@@ -339,17 +352,13 @@ CONFIG_BLK_DEV_RAM=y
339CONFIG_BLK_DEV_RAM_COUNT=16 352CONFIG_BLK_DEV_RAM_COUNT=16
340CONFIG_BLK_DEV_RAM_SIZE=32768 353CONFIG_BLK_DEV_RAM_SIZE=32768
341CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 354CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
342CONFIG_BLK_DEV_INITRD=y
343# CONFIG_CDROM_PKTCDVD is not set 355# CONFIG_CDROM_PKTCDVD is not set
344# CONFIG_ATA_OVER_ETH is not set 356# CONFIG_ATA_OVER_ETH is not set
345 357
346# 358#
347# Misc devices 359# Misc devices
348# 360#
349 361# CONFIG_BLINK is not set
350#
351# ATA/ATAPI/MFM/RLL support
352#
353# CONFIG_IDE is not set 362# CONFIG_IDE is not set
354 363
355# 364#
@@ -378,6 +387,7 @@ CONFIG_SCSI_PROC_FS=y
378# CONFIG_SCSI_CONSTANTS is not set 387# CONFIG_SCSI_CONSTANTS is not set
379# CONFIG_SCSI_LOGGING is not set 388# CONFIG_SCSI_LOGGING is not set
380# CONFIG_SCSI_SCAN_ASYNC is not set 389# CONFIG_SCSI_SCAN_ASYNC is not set
390CONFIG_SCSI_WAIT_SCAN=m
381 391
382# 392#
383# SCSI Transports 393# SCSI Transports
@@ -393,35 +403,13 @@ CONFIG_SCSI_PROC_FS=y
393# 403#
394# CONFIG_ISCSI_TCP is not set 404# CONFIG_ISCSI_TCP is not set
395# CONFIG_SCSI_DEBUG is not set 405# CONFIG_SCSI_DEBUG is not set
396
397#
398# Serial ATA (prod) and Parallel ATA (experimental) drivers
399#
400# CONFIG_ATA is not set 406# CONFIG_ATA is not set
401 407
402# 408#
403# Multi-device support (RAID and LVM) 409# Multi-device support (RAID and LVM)
404# 410#
405# CONFIG_MD is not set 411# CONFIG_MD is not set
406 412# CONFIG_MACINTOSH_DRIVERS is not set
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 413
426# 414#
427# Network device support 415# Network device support
@@ -431,10 +419,6 @@ CONFIG_NETDEVICES=y
431# CONFIG_BONDING is not set 419# CONFIG_BONDING is not set
432# CONFIG_EQUALIZER is not set 420# CONFIG_EQUALIZER is not set
433# CONFIG_TUN is not set 421# CONFIG_TUN is not set
434
435#
436# PHY device support
437#
438CONFIG_PHYLIB=y 422CONFIG_PHYLIB=y
439 423
440# 424#
@@ -455,29 +439,16 @@ CONFIG_MARVELL_PHY=y
455# 439#
456CONFIG_NET_ETHERNET=y 440CONFIG_NET_ETHERNET=y
457CONFIG_MII=y 441CONFIG_MII=y
458 442CONFIG_NETDEV_1000=y
459#
460# Ethernet (1000 Mbit)
461#
462CONFIG_GIANFAR=y 443CONFIG_GIANFAR=y
463CONFIG_GFAR_NAPI=y 444CONFIG_GFAR_NAPI=y
445CONFIG_NETDEV_10000=y
464 446
465# 447#
466# Ethernet (10000 Mbit) 448# Wireless LAN
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# 449#
450# CONFIG_WLAN_PRE80211 is not set
451# CONFIG_WLAN_80211 is not set
481# CONFIG_WAN is not set 452# CONFIG_WAN is not set
482# CONFIG_PPP is not set 453# CONFIG_PPP is not set
483# CONFIG_SLIP is not set 454# CONFIG_SLIP is not set
@@ -501,6 +472,7 @@ CONFIG_GFAR_NAPI=y
501# 472#
502CONFIG_INPUT=y 473CONFIG_INPUT=y
503# CONFIG_INPUT_FF_MEMLESS is not set 474# CONFIG_INPUT_FF_MEMLESS is not set
475# CONFIG_INPUT_POLLDEV is not set
504 476
505# 477#
506# Userland interfaces 478# Userland interfaces
@@ -517,6 +489,7 @@ CONFIG_INPUT=y
517# CONFIG_INPUT_KEYBOARD is not set 489# CONFIG_INPUT_KEYBOARD is not set
518# CONFIG_INPUT_MOUSE is not set 490# CONFIG_INPUT_MOUSE is not set
519# CONFIG_INPUT_JOYSTICK is not set 491# CONFIG_INPUT_JOYSTICK is not set
492# CONFIG_INPUT_TABLET is not set
520# CONFIG_INPUT_TOUCHSCREEN is not set 493# CONFIG_INPUT_TOUCHSCREEN is not set
521# CONFIG_INPUT_MISC is not set 494# CONFIG_INPUT_MISC is not set
522 495
@@ -540,6 +513,7 @@ CONFIG_SERIAL_8250_CONSOLE=y
540CONFIG_SERIAL_8250_NR_UARTS=4 513CONFIG_SERIAL_8250_NR_UARTS=4
541CONFIG_SERIAL_8250_RUNTIME_UARTS=4 514CONFIG_SERIAL_8250_RUNTIME_UARTS=4
542# CONFIG_SERIAL_8250_EXTENDED is not set 515# CONFIG_SERIAL_8250_EXTENDED is not set
516CONFIG_SERIAL_8250_SHARE_IRQ=y
543 517
544# 518#
545# Non-8250 serial port support 519# Non-8250 serial port support
@@ -556,10 +530,6 @@ CONFIG_LEGACY_PTY_COUNT=256
556# IPMI 530# IPMI
557# 531#
558# CONFIG_IPMI_HANDLER is not set 532# CONFIG_IPMI_HANDLER is not set
559
560#
561# Watchdog Cards
562#
563CONFIG_WATCHDOG=y 533CONFIG_WATCHDOG=y
564# CONFIG_WATCHDOG_NOWAYOUT is not set 534# CONFIG_WATCHDOG_NOWAYOUT is not set
565 535
@@ -572,7 +542,6 @@ CONFIG_HW_RANDOM=y
572# CONFIG_NVRAM is not set 542# CONFIG_NVRAM is not set
573CONFIG_GEN_RTC=y 543CONFIG_GEN_RTC=y
574# CONFIG_GEN_RTC_X is not set 544# CONFIG_GEN_RTC_X is not set
575# CONFIG_DTLK is not set
576# CONFIG_R3964 is not set 545# CONFIG_R3964 is not set
577# CONFIG_RAW_DRIVER is not set 546# CONFIG_RAW_DRIVER is not set
578 547
@@ -580,11 +549,8 @@ CONFIG_GEN_RTC=y
580# TPM devices 549# TPM devices
581# 550#
582# CONFIG_TCG_TPM is not set 551# CONFIG_TCG_TPM is not set
583
584#
585# I2C support
586#
587CONFIG_I2C=y 552CONFIG_I2C=y
553CONFIG_I2C_BOARDINFO=y
588CONFIG_I2C_CHARDEV=y 554CONFIG_I2C_CHARDEV=y
589 555
590# 556#
@@ -600,8 +566,8 @@ CONFIG_I2C_CHARDEV=y
600CONFIG_I2C_MPC=y 566CONFIG_I2C_MPC=y
601# CONFIG_I2C_OCORES is not set 567# CONFIG_I2C_OCORES is not set
602# CONFIG_I2C_PARPORT_LIGHT is not set 568# CONFIG_I2C_PARPORT_LIGHT is not set
569# CONFIG_I2C_SIMTEC is not set
603# CONFIG_I2C_STUB is not set 570# CONFIG_I2C_STUB is not set
604# CONFIG_I2C_PCA_ISA is not set
605 571
606# 572#
607# Miscellaneous I2C Chip support 573# Miscellaneous I2C Chip support
@@ -629,16 +595,14 @@ CONFIG_I2C_MPC=y
629# Dallas's 1-wire bus 595# Dallas's 1-wire bus
630# 596#
631# CONFIG_W1 is not set 597# CONFIG_W1 is not set
632
633#
634# Hardware Monitoring support
635#
636CONFIG_HWMON=y 598CONFIG_HWMON=y
637# CONFIG_HWMON_VID is not set 599# CONFIG_HWMON_VID is not set
638# CONFIG_SENSORS_ABITUGURU is not set 600# CONFIG_SENSORS_ABITUGURU is not set
601# CONFIG_SENSORS_AD7418 is not set
639# CONFIG_SENSORS_ADM1021 is not set 602# CONFIG_SENSORS_ADM1021 is not set
640# CONFIG_SENSORS_ADM1025 is not set 603# CONFIG_SENSORS_ADM1025 is not set
641# CONFIG_SENSORS_ADM1026 is not set 604# CONFIG_SENSORS_ADM1026 is not set
605# CONFIG_SENSORS_ADM1029 is not set
642# CONFIG_SENSORS_ADM1031 is not set 606# CONFIG_SENSORS_ADM1031 is not set
643# CONFIG_SENSORS_ADM9240 is not set 607# CONFIG_SENSORS_ADM9240 is not set
644# CONFIG_SENSORS_ASB100 is not set 608# CONFIG_SENSORS_ASB100 is not set
@@ -661,6 +625,7 @@ CONFIG_HWMON=y
661# CONFIG_SENSORS_LM90 is not set 625# CONFIG_SENSORS_LM90 is not set
662# CONFIG_SENSORS_LM92 is not set 626# CONFIG_SENSORS_LM92 is not set
663# CONFIG_SENSORS_MAX1619 is not set 627# CONFIG_SENSORS_MAX1619 is not set
628# CONFIG_SENSORS_MAX6650 is not set
664# CONFIG_SENSORS_PC87360 is not set 629# CONFIG_SENSORS_PC87360 is not set
665# CONFIG_SENSORS_PC87427 is not set 630# CONFIG_SENSORS_PC87427 is not set
666# CONFIG_SENSORS_SMSC47M1 is not set 631# CONFIG_SENSORS_SMSC47M1 is not set
@@ -677,22 +642,29 @@ CONFIG_HWMON=y
677# CONFIG_HWMON_DEBUG_CHIP is not set 642# CONFIG_HWMON_DEBUG_CHIP is not set
678 643
679# 644#
645# Multifunction device drivers
646#
647# CONFIG_MFD_SM501 is not set
648
649#
680# Multimedia devices 650# Multimedia devices
681# 651#
682# CONFIG_VIDEO_DEV is not set 652# CONFIG_VIDEO_DEV is not set
653# CONFIG_DVB_CORE is not set
654CONFIG_DAB=y
683 655
684# 656#
685# Digital Video Broadcasting Devices 657# Graphics support
686# 658#
687# CONFIG_DVB is not set 659# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
688 660
689# 661#
690# Graphics support 662# Display device support
691# 663#
692CONFIG_FIRMWARE_EDID=y 664# CONFIG_DISPLAY_SUPPORT is not set
665# CONFIG_VGASTATE is not set
693# CONFIG_FB is not set 666# CONFIG_FB is not set
694# CONFIG_FB_IBM_GXT4500 is not set 667# CONFIG_FB_IBM_GXT4500 is not set
695# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
696 668
697# 669#
698# Sound 670# Sound
@@ -720,10 +692,6 @@ CONFIG_HID=y
720# USB Gadget Support 692# USB Gadget Support
721# 693#
722# CONFIG_USB_GADGET is not set 694# CONFIG_USB_GADGET is not set
723
724#
725# MMC/SD Card support
726#
727# CONFIG_MMC is not set 695# CONFIG_MMC is not set
728 696
729# 697#
@@ -766,14 +734,6 @@ CONFIG_HID=y
766# 734#
767 735
768# 736#
769# Auxiliary Display support
770#
771
772#
773# Virtualization
774#
775
776#
777# File systems 737# File systems
778# 738#
779CONFIG_EXT2_FS=y 739CONFIG_EXT2_FS=y
@@ -861,6 +821,7 @@ CONFIG_LOCKD_V4=y
861CONFIG_NFS_COMMON=y 821CONFIG_NFS_COMMON=y
862CONFIG_SUNRPC=y 822CONFIG_SUNRPC=y
863CONFIG_SUNRPC_GSS=y 823CONFIG_SUNRPC_GSS=y
824# CONFIG_SUNRPC_BIND34 is not set
864CONFIG_RPCSEC_GSS_KRB5=y 825CONFIG_RPCSEC_GSS_KRB5=y
865# CONFIG_RPCSEC_GSS_SPKM3 is not set 826# CONFIG_RPCSEC_GSS_SPKM3 is not set
866# CONFIG_SMB_FS is not set 827# CONFIG_SMB_FS is not set
@@ -886,6 +847,7 @@ CONFIG_PARTITION_ADVANCED=y
886# CONFIG_SUN_PARTITION is not set 847# CONFIG_SUN_PARTITION is not set
887# CONFIG_KARMA_PARTITION is not set 848# CONFIG_KARMA_PARTITION is not set
888# CONFIG_EFI_PARTITION is not set 849# CONFIG_EFI_PARTITION is not set
850# CONFIG_SYSV68_PARTITION is not set
889 851
890# 852#
891# Native Language Support 853# Native Language Support
@@ -896,6 +858,7 @@ CONFIG_PARTITION_ADVANCED=y
896# Distributed Lock Manager 858# Distributed Lock Manager
897# 859#
898# CONFIG_DLM is not set 860# CONFIG_DLM is not set
861# CONFIG_UCC_SLOW is not set
899 862
900# 863#
901# Library routines 864# Library routines
@@ -903,11 +866,13 @@ CONFIG_PARTITION_ADVANCED=y
903CONFIG_BITREVERSE=y 866CONFIG_BITREVERSE=y
904# CONFIG_CRC_CCITT is not set 867# CONFIG_CRC_CCITT is not set
905# CONFIG_CRC16 is not set 868# CONFIG_CRC16 is not set
869# CONFIG_CRC_ITU_T is not set
906CONFIG_CRC32=y 870CONFIG_CRC32=y
907# CONFIG_LIBCRC32C is not set 871# CONFIG_LIBCRC32C is not set
908CONFIG_PLIST=y 872CONFIG_PLIST=y
909CONFIG_HAS_IOMEM=y 873CONFIG_HAS_IOMEM=y
910CONFIG_HAS_IOPORT=y 874CONFIG_HAS_IOPORT=y
875CONFIG_HAS_DMA=y
911 876
912# 877#
913# Instrumentation Support 878# Instrumentation Support
@@ -926,9 +891,9 @@ CONFIG_ENABLE_MUST_CHECK=y
926# CONFIG_HEADERS_CHECK is not set 891# CONFIG_HEADERS_CHECK is not set
927CONFIG_DEBUG_KERNEL=y 892CONFIG_DEBUG_KERNEL=y
928# CONFIG_DEBUG_SHIRQ is not set 893# CONFIG_DEBUG_SHIRQ is not set
929CONFIG_LOG_BUF_SHIFT=14
930CONFIG_DETECT_SOFTLOCKUP=y 894CONFIG_DETECT_SOFTLOCKUP=y
931# CONFIG_SCHEDSTATS is not set 895# CONFIG_SCHEDSTATS is not set
896# CONFIG_TIMER_STATS is not set
932# CONFIG_DEBUG_SLAB is not set 897# CONFIG_DEBUG_SLAB is not set
933# CONFIG_DEBUG_RT_MUTEXES is not set 898# CONFIG_DEBUG_RT_MUTEXES is not set
934# CONFIG_RT_MUTEX_TESTER is not set 899# CONFIG_RT_MUTEX_TESTER is not set
@@ -943,8 +908,10 @@ CONFIG_DETECT_SOFTLOCKUP=y
943# CONFIG_DEBUG_LIST is not set 908# CONFIG_DEBUG_LIST is not set
944CONFIG_FORCED_INLINING=y 909CONFIG_FORCED_INLINING=y
945# CONFIG_RCU_TORTURE_TEST is not set 910# CONFIG_RCU_TORTURE_TEST is not set
911# CONFIG_FAULT_INJECTION is not set
946# CONFIG_DEBUG_STACKOVERFLOW is not set 912# CONFIG_DEBUG_STACKOVERFLOW is not set
947# CONFIG_DEBUG_STACK_USAGE is not set 913# CONFIG_DEBUG_STACK_USAGE is not set
914# CONFIG_DEBUG_PAGEALLOC is not set
948CONFIG_DEBUGGER=y 915CONFIG_DEBUGGER=y
949# CONFIG_XMON is not set 916# CONFIG_XMON is not set
950# CONFIG_BDI_SWITCH is not set 917# CONFIG_BDI_SWITCH is not set
@@ -958,6 +925,7 @@ CONFIG_PPC_EARLY_DEBUG=y
958# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set 925# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
959# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set 926# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
960# CONFIG_PPC_EARLY_DEBUG_BEAT is not set 927# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
928# CONFIG_PPC_EARLY_DEBUG_44x is not set
961 929
962# 930#
963# Security options 931# Security options
@@ -987,6 +955,7 @@ CONFIG_CRYPTO_ECB=m
987CONFIG_CRYPTO_CBC=y 955CONFIG_CRYPTO_CBC=y
988CONFIG_CRYPTO_PCBC=m 956CONFIG_CRYPTO_PCBC=m
989# CONFIG_CRYPTO_LRW is not set 957# CONFIG_CRYPTO_LRW is not set
958# CONFIG_CRYPTO_CRYPTD is not set
990CONFIG_CRYPTO_DES=y 959CONFIG_CRYPTO_DES=y
991# CONFIG_CRYPTO_FCRYPT is not set 960# CONFIG_CRYPTO_FCRYPT is not set
992# CONFIG_CRYPTO_BLOWFISH is not set 961# CONFIG_CRYPTO_BLOWFISH is not set
diff --git a/arch/powerpc/configs/mpc85xx_cds_defconfig b/arch/powerpc/configs/mpc85xx_cds_defconfig
index 1f61bce33e..d9afe7009d 100644
--- a/arch/powerpc/configs/mpc85xx_cds_defconfig
+++ b/arch/powerpc/configs/mpc85xx_cds_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.22-rc7
4# Mon Jan 22 22:26:46 2007 4# Sun Jul 1 23:56:59 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
34# CONFIG_PPC_83xx is not set 34# CONFIG_PPC_83xx is not set
35CONFIG_PPC_85xx=y 35CONFIG_PPC_85xx=y
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_85xx=y 41CONFIG_85xx=y
42CONFIG_E500=y 42CONFIG_E500=y
@@ -46,6 +46,7 @@ CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y 46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set 47# CONFIG_PHYS_64BIT is not set
48CONFIG_SPE=y 48CONFIG_SPE=y
49# CONFIG_PPC_MM_SLICES is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 51
51# 52#
@@ -63,14 +64,17 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 66# CONFIG_IPC_NS is not set
67CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 68# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set 69# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 70# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
72CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y
74CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y 80CONFIG_SYSCTL=y
@@ -85,14 +89,19 @@ CONFIG_BUG=y
85CONFIG_ELF_CORE=y 89CONFIG_ELF_CORE=y
86CONFIG_BASE_FULL=y 90CONFIG_BASE_FULL=y
87CONFIG_FUTEX=y 91CONFIG_FUTEX=y
92CONFIG_ANON_INODES=y
88CONFIG_EPOLL=y 93CONFIG_EPOLL=y
94CONFIG_SIGNALFD=y
95CONFIG_TIMERFD=y
96CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 97CONFIG_SHMEM=y
90CONFIG_SLAB=y
91CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLAB=y
100# CONFIG_SLUB is not set
101# CONFIG_SLOB is not set
92CONFIG_RT_MUTEXES=y 102CONFIG_RT_MUTEXES=y
93# CONFIG_TINY_SHMEM is not set 103# CONFIG_TINY_SHMEM is not set
94CONFIG_BASE_SMALL=0 104CONFIG_BASE_SMALL=0
95# CONFIG_SLOB is not set
96 105
97# 106#
98# Loadable module support 107# Loadable module support
@@ -119,17 +128,33 @@ CONFIG_DEFAULT_AS=y
119# CONFIG_DEFAULT_CFQ is not set 128# CONFIG_DEFAULT_CFQ is not set
120# CONFIG_DEFAULT_NOOP is not set 129# CONFIG_DEFAULT_NOOP is not set
121CONFIG_DEFAULT_IOSCHED="anticipatory" 130CONFIG_DEFAULT_IOSCHED="anticipatory"
122# CONFIG_WANT_EARLY_SERIAL is not set
123 131
124# 132#
125# Platform support 133# Platform support
126# 134#
135# CONFIG_PPC_MPC52xx is not set
136# CONFIG_PPC_MPC5200 is not set
137# CONFIG_PPC_CELL is not set
138# CONFIG_PPC_CELL_NATIVE is not set
139# CONFIG_PQ2ADS is not set
127# CONFIG_MPC8540_ADS is not set 140# CONFIG_MPC8540_ADS is not set
128# CONFIG_MPC8560_ADS is not set 141# CONFIG_MPC8560_ADS is not set
129CONFIG_MPC85xx_CDS=y 142CONFIG_MPC85xx_CDS=y
143# CONFIG_MPC85xx_MDS is not set
144# CONFIG_MPC8544_DS is not set
130CONFIG_MPC8540=y 145CONFIG_MPC8540=y
131CONFIG_PPC_INDIRECT_PCI_BE=y 146CONFIG_MPC85xx=y
132CONFIG_MPIC=y 147CONFIG_MPIC=y
148# CONFIG_MPIC_WEIRD is not set
149# CONFIG_PPC_I8259 is not set
150# CONFIG_PPC_RTAS is not set
151# CONFIG_MMIO_NVRAM is not set
152# CONFIG_PPC_MPC106 is not set
153# CONFIG_PPC_970_NAP is not set
154# CONFIG_PPC_INDIRECT_IO is not set
155# CONFIG_GENERIC_IOMAP is not set
156# CONFIG_CPU_FREQ is not set
157# CONFIG_CPM2 is not set
133 158
134# 159#
135# Kernel options 160# Kernel options
@@ -158,32 +183,33 @@ CONFIG_FLAT_NODE_MEM_MAP=y
158# CONFIG_SPARSEMEM_STATIC is not set 183# CONFIG_SPARSEMEM_STATIC is not set
159CONFIG_SPLIT_PTLOCK_CPUS=4 184CONFIG_SPLIT_PTLOCK_CPUS=4
160# CONFIG_RESOURCES_64BIT is not set 185# CONFIG_RESOURCES_64BIT is not set
186CONFIG_ZONE_DMA_FLAG=1
161CONFIG_PROC_DEVICETREE=y 187CONFIG_PROC_DEVICETREE=y
162# CONFIG_CMDLINE_BOOL is not set 188# CONFIG_CMDLINE_BOOL is not set
163# CONFIG_PM is not set 189# CONFIG_PM is not set
164# CONFIG_SECCOMP is not set 190# CONFIG_SECCOMP is not set
191CONFIG_WANT_DEVICE_TREE=y
192CONFIG_DEVICE_TREE=""
165CONFIG_ISA_DMA_API=y 193CONFIG_ISA_DMA_API=y
166 194
167# 195#
168# Bus options 196# Bus options
169# 197#
170# CONFIG_MPIC_WEIRD is not set 198CONFIG_ZONE_DMA=y
171# CONFIG_PPC_I8259 is not set
172CONFIG_PPC_INDIRECT_PCI=y 199CONFIG_PPC_INDIRECT_PCI=y
200CONFIG_PPC_INDIRECT_PCI_BE=y
173CONFIG_FSL_SOC=y 201CONFIG_FSL_SOC=y
174CONFIG_PCI=y 202CONFIG_PCI=y
175CONFIG_PCI_DOMAINS=y 203CONFIG_PCI_DOMAINS=y
176# CONFIG_PCIEPORTBUS is not set 204# CONFIG_PCIEPORTBUS is not set
205CONFIG_ARCH_SUPPORTS_MSI=y
206# CONFIG_PCI_MSI is not set
177# CONFIG_PCI_DEBUG is not set 207# CONFIG_PCI_DEBUG is not set
178 208
179# 209#
180# PCCARD (PCMCIA/CardBus) support 210# PCCARD (PCMCIA/CardBus) support
181# 211#
182# CONFIG_PCCARD is not set 212# CONFIG_PCCARD is not set
183
184#
185# PCI Hotplug Support
186#
187# CONFIG_HOTPLUG_PCI is not set 213# CONFIG_HOTPLUG_PCI is not set
188 214
189# 215#
@@ -208,13 +234,13 @@ CONFIG_NET=y
208# 234#
209# Networking options 235# Networking options
210# 236#
211# CONFIG_NETDEBUG is not set
212CONFIG_PACKET=y 237CONFIG_PACKET=y
213# CONFIG_PACKET_MMAP is not set 238# CONFIG_PACKET_MMAP is not set
214CONFIG_UNIX=y 239CONFIG_UNIX=y
215CONFIG_XFRM=y 240CONFIG_XFRM=y
216CONFIG_XFRM_USER=y 241CONFIG_XFRM_USER=y
217# CONFIG_XFRM_SUB_POLICY is not set 242# CONFIG_XFRM_SUB_POLICY is not set
243# CONFIG_XFRM_MIGRATE is not set
218# CONFIG_NET_KEY is not set 244# CONFIG_NET_KEY is not set
219CONFIG_INET=y 245CONFIG_INET=y
220CONFIG_IP_MULTICAST=y 246CONFIG_IP_MULTICAST=y
@@ -248,20 +274,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
248# CONFIG_INET6_TUNNEL is not set 274# CONFIG_INET6_TUNNEL is not set
249# CONFIG_NETWORK_SECMARK is not set 275# CONFIG_NETWORK_SECMARK is not set
250# CONFIG_NETFILTER is not set 276# CONFIG_NETFILTER is not set
251
252#
253# DCCP Configuration (EXPERIMENTAL)
254#
255# CONFIG_IP_DCCP is not set 277# CONFIG_IP_DCCP is not set
256
257#
258# SCTP Configuration (EXPERIMENTAL)
259#
260# CONFIG_IP_SCTP is not set 278# CONFIG_IP_SCTP is not set
261
262#
263# TIPC Configuration (EXPERIMENTAL)
264#
265# CONFIG_TIPC is not set 279# CONFIG_TIPC is not set
266# CONFIG_ATM is not set 280# CONFIG_ATM is not set
267# CONFIG_BRIDGE is not set 281# CONFIG_BRIDGE is not set
@@ -287,7 +301,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
287# CONFIG_HAMRADIO is not set 301# CONFIG_HAMRADIO is not set
288# CONFIG_IRDA is not set 302# CONFIG_IRDA is not set
289# CONFIG_BT is not set 303# CONFIG_BT is not set
304# CONFIG_AF_RXRPC is not set
305
306#
307# Wireless
308#
309# CONFIG_CFG80211 is not set
310# CONFIG_WIRELESS_EXT is not set
311# CONFIG_MAC80211 is not set
290# CONFIG_IEEE80211 is not set 312# CONFIG_IEEE80211 is not set
313# CONFIG_RFKILL is not set
291 314
292# 315#
293# Device Drivers 316# Device Drivers
@@ -300,16 +323,13 @@ CONFIG_STANDALONE=y
300CONFIG_PREVENT_FIRMWARE_BUILD=y 323CONFIG_PREVENT_FIRMWARE_BUILD=y
301# CONFIG_FW_LOADER is not set 324# CONFIG_FW_LOADER is not set
302# CONFIG_DEBUG_DRIVER is not set 325# CONFIG_DEBUG_DRIVER is not set
326# CONFIG_DEBUG_DEVRES is not set
303# CONFIG_SYS_HYPERVISOR is not set 327# CONFIG_SYS_HYPERVISOR is not set
304 328
305# 329#
306# Connector - unified userspace <-> kernelspace linker 330# Connector - unified userspace <-> kernelspace linker
307# 331#
308# CONFIG_CONNECTOR is not set 332# CONFIG_CONNECTOR is not set
309
310#
311# Memory Technology Devices (MTD)
312#
313# CONFIG_MTD is not set 333# CONFIG_MTD is not set
314 334
315# 335#
@@ -320,6 +340,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
320# 340#
321# Plug and Play support 341# Plug and Play support
322# 342#
343# CONFIG_PNPACPI is not set
323 344
324# 345#
325# Block devices 346# Block devices
@@ -338,19 +359,16 @@ CONFIG_BLK_DEV_RAM=y
338CONFIG_BLK_DEV_RAM_COUNT=16 359CONFIG_BLK_DEV_RAM_COUNT=16
339CONFIG_BLK_DEV_RAM_SIZE=32768 360CONFIG_BLK_DEV_RAM_SIZE=32768
340CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 361CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
341CONFIG_BLK_DEV_INITRD=y
342# CONFIG_CDROM_PKTCDVD is not set 362# CONFIG_CDROM_PKTCDVD is not set
343# CONFIG_ATA_OVER_ETH is not set 363# CONFIG_ATA_OVER_ETH is not set
344 364
345# 365#
346# Misc devices 366# Misc devices
347# 367#
368# CONFIG_PHANTOM is not set
348# CONFIG_SGI_IOC4 is not set 369# CONFIG_SGI_IOC4 is not set
349# CONFIG_TIFM_CORE is not set 370# CONFIG_TIFM_CORE is not set
350 371# CONFIG_BLINK is not set
351#
352# ATA/ATAPI/MFM/RLL support
353#
354CONFIG_IDE=y 372CONFIG_IDE=y
355CONFIG_IDE_MAX_HWIFS=4 373CONFIG_IDE_MAX_HWIFS=4
356CONFIG_BLK_DEV_IDE=y 374CONFIG_BLK_DEV_IDE=y
@@ -365,6 +383,7 @@ CONFIG_BLK_DEV_IDE=y
365# CONFIG_BLK_DEV_IDETAPE is not set 383# CONFIG_BLK_DEV_IDETAPE is not set
366# CONFIG_BLK_DEV_IDEFLOPPY is not set 384# CONFIG_BLK_DEV_IDEFLOPPY is not set
367# CONFIG_IDE_TASK_IOCTL is not set 385# CONFIG_IDE_TASK_IOCTL is not set
386CONFIG_IDE_PROC_FS=y
368 387
369# 388#
370# IDE chipset support/bugfixes 389# IDE chipset support/bugfixes
@@ -372,12 +391,13 @@ CONFIG_BLK_DEV_IDE=y
372CONFIG_IDE_GENERIC=y 391CONFIG_IDE_GENERIC=y
373CONFIG_BLK_DEV_IDEPCI=y 392CONFIG_BLK_DEV_IDEPCI=y
374CONFIG_IDEPCI_SHARE_IRQ=y 393CONFIG_IDEPCI_SHARE_IRQ=y
394CONFIG_IDEPCI_PCIBUS_ORDER=y
375# CONFIG_BLK_DEV_OFFBOARD is not set 395# CONFIG_BLK_DEV_OFFBOARD is not set
376CONFIG_BLK_DEV_GENERIC=y 396CONFIG_BLK_DEV_GENERIC=y
377# CONFIG_BLK_DEV_OPTI621 is not set 397# CONFIG_BLK_DEV_OPTI621 is not set
378CONFIG_BLK_DEV_IDEDMA_PCI=y 398CONFIG_BLK_DEV_IDEDMA_PCI=y
379# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 399# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
380# CONFIG_IDEDMA_PCI_AUTO is not set 400# CONFIG_IDEDMA_ONLYDISK is not set
381# CONFIG_BLK_DEV_AEC62XX is not set 401# CONFIG_BLK_DEV_AEC62XX is not set
382# CONFIG_BLK_DEV_ALI15X3 is not set 402# CONFIG_BLK_DEV_ALI15X3 is not set
383# CONFIG_BLK_DEV_AMD74XX is not set 403# CONFIG_BLK_DEV_AMD74XX is not set
@@ -391,6 +411,7 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
391# CONFIG_BLK_DEV_JMICRON is not set 411# CONFIG_BLK_DEV_JMICRON is not set
392# CONFIG_BLK_DEV_SC1200 is not set 412# CONFIG_BLK_DEV_SC1200 is not set
393# CONFIG_BLK_DEV_PIIX is not set 413# CONFIG_BLK_DEV_PIIX is not set
414# CONFIG_BLK_DEV_IT8213 is not set
394# CONFIG_BLK_DEV_IT821X is not set 415# CONFIG_BLK_DEV_IT821X is not set
395# CONFIG_BLK_DEV_NS87415 is not set 416# CONFIG_BLK_DEV_NS87415 is not set
396# CONFIG_BLK_DEV_PDC202XX_OLD is not set 417# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -401,10 +422,10 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
401# CONFIG_BLK_DEV_SLC90E66 is not set 422# CONFIG_BLK_DEV_SLC90E66 is not set
402# CONFIG_BLK_DEV_TRM290 is not set 423# CONFIG_BLK_DEV_TRM290 is not set
403CONFIG_BLK_DEV_VIA82CXXX=y 424CONFIG_BLK_DEV_VIA82CXXX=y
425# CONFIG_BLK_DEV_TC86C001 is not set
404# CONFIG_IDE_ARM is not set 426# CONFIG_IDE_ARM is not set
405CONFIG_BLK_DEV_IDEDMA=y 427CONFIG_BLK_DEV_IDEDMA=y
406# CONFIG_IDEDMA_IVB is not set 428# CONFIG_IDEDMA_IVB is not set
407# CONFIG_IDEDMA_AUTO is not set
408# CONFIG_BLK_DEV_HD is not set 429# CONFIG_BLK_DEV_HD is not set
409 430
410# 431#
@@ -413,10 +434,6 @@ CONFIG_BLK_DEV_IDEDMA=y
413# CONFIG_RAID_ATTRS is not set 434# CONFIG_RAID_ATTRS is not set
414# CONFIG_SCSI is not set 435# CONFIG_SCSI is not set
415# CONFIG_SCSI_NETLINK is not set 436# CONFIG_SCSI_NETLINK is not set
416
417#
418# Serial ATA (prod) and Parallel ATA (experimental) drivers
419#
420# CONFIG_ATA is not set 437# CONFIG_ATA is not set
421 438
422# 439#
@@ -432,18 +449,14 @@ CONFIG_BLK_DEV_IDEDMA=y
432# 449#
433# IEEE 1394 (FireWire) support 450# IEEE 1394 (FireWire) support
434# 451#
452# CONFIG_FIREWIRE is not set
435# CONFIG_IEEE1394 is not set 453# CONFIG_IEEE1394 is not set
436 454
437# 455#
438# I2O device support 456# I2O device support
439# 457#
440# CONFIG_I2O is not set 458# CONFIG_I2O is not set
441 459# CONFIG_MACINTOSH_DRIVERS is not set
442#
443# Macintosh device drivers
444#
445# CONFIG_MAC_EMUMOUSEBTN is not set
446# CONFIG_WINDFARM is not set
447 460
448# 461#
449# Network device support 462# Network device support
@@ -453,15 +466,7 @@ CONFIG_NETDEVICES=y
453# CONFIG_BONDING is not set 466# CONFIG_BONDING is not set
454# CONFIG_EQUALIZER is not set 467# CONFIG_EQUALIZER is not set
455# CONFIG_TUN is not set 468# CONFIG_TUN is not set
456
457#
458# ARCnet devices
459#
460# CONFIG_ARCNET is not set 469# CONFIG_ARCNET is not set
461
462#
463# PHY device support
464#
465CONFIG_PHYLIB=y 470CONFIG_PHYLIB=y
466 471
467# 472#
@@ -493,10 +498,7 @@ CONFIG_MII=y
493# CONFIG_NET_TULIP is not set 498# CONFIG_NET_TULIP is not set
494# CONFIG_HP100 is not set 499# CONFIG_HP100 is not set
495# CONFIG_NET_PCI is not set 500# CONFIG_NET_PCI is not set
496 501CONFIG_NETDEV_1000=y
497#
498# Ethernet (1000 Mbit)
499#
500# CONFIG_ACENIC is not set 502# CONFIG_ACENIC is not set
501# CONFIG_DL2K is not set 503# CONFIG_DL2K is not set
502CONFIG_E1000=y 504CONFIG_E1000=y
@@ -510,34 +512,28 @@ CONFIG_E1000_NAPI=y
510# CONFIG_SKGE is not set 512# CONFIG_SKGE is not set
511# CONFIG_SKY2 is not set 513# CONFIG_SKY2 is not set
512# CONFIG_SK98LIN is not set 514# CONFIG_SK98LIN is not set
515# CONFIG_VIA_VELOCITY is not set
513# CONFIG_TIGON3 is not set 516# CONFIG_TIGON3 is not set
514# CONFIG_BNX2 is not set 517# CONFIG_BNX2 is not set
515CONFIG_GIANFAR=y 518CONFIG_GIANFAR=y
516CONFIG_GFAR_NAPI=y 519CONFIG_GFAR_NAPI=y
517# CONFIG_QLA3XXX is not set 520# CONFIG_QLA3XXX is not set
518 521# CONFIG_ATL1 is not set
519# 522CONFIG_NETDEV_10000=y
520# Ethernet (10000 Mbit)
521#
522# CONFIG_CHELSIO_T1 is not set 523# CONFIG_CHELSIO_T1 is not set
524# CONFIG_CHELSIO_T3 is not set
523# CONFIG_IXGB is not set 525# CONFIG_IXGB is not set
524# CONFIG_S2IO is not set 526# CONFIG_S2IO is not set
525# CONFIG_MYRI10GE is not set 527# CONFIG_MYRI10GE is not set
526# CONFIG_NETXEN_NIC is not set 528# CONFIG_NETXEN_NIC is not set
527 529# CONFIG_MLX4_CORE is not set
528#
529# Token Ring devices
530#
531# CONFIG_TR is not set 530# CONFIG_TR is not set
532 531
533# 532#
534# Wireless LAN (non-hamradio) 533# Wireless LAN
535#
536# CONFIG_NET_RADIO is not set
537
538#
539# Wan interfaces
540# 534#
535# CONFIG_WLAN_PRE80211 is not set
536# CONFIG_WLAN_80211 is not set
541# CONFIG_WAN is not set 537# CONFIG_WAN is not set
542# CONFIG_FDDI is not set 538# CONFIG_FDDI is not set
543# CONFIG_HIPPI is not set 539# CONFIG_HIPPI is not set
@@ -563,6 +559,7 @@ CONFIG_GFAR_NAPI=y
563# 559#
564CONFIG_INPUT=y 560CONFIG_INPUT=y
565# CONFIG_INPUT_FF_MEMLESS is not set 561# CONFIG_INPUT_FF_MEMLESS is not set
562# CONFIG_INPUT_POLLDEV is not set
566 563
567# 564#
568# Userland interfaces 565# Userland interfaces
@@ -579,6 +576,7 @@ CONFIG_INPUT=y
579# CONFIG_INPUT_KEYBOARD is not set 576# CONFIG_INPUT_KEYBOARD is not set
580# CONFIG_INPUT_MOUSE is not set 577# CONFIG_INPUT_MOUSE is not set
581# CONFIG_INPUT_JOYSTICK is not set 578# CONFIG_INPUT_JOYSTICK is not set
579# CONFIG_INPUT_TABLET is not set
582# CONFIG_INPUT_TOUCHSCREEN is not set 580# CONFIG_INPUT_TOUCHSCREEN is not set
583# CONFIG_INPUT_MISC is not set 581# CONFIG_INPUT_MISC is not set
584 582
@@ -603,6 +601,7 @@ CONFIG_SERIAL_8250_PCI=y
603CONFIG_SERIAL_8250_NR_UARTS=4 601CONFIG_SERIAL_8250_NR_UARTS=4
604CONFIG_SERIAL_8250_RUNTIME_UARTS=4 602CONFIG_SERIAL_8250_RUNTIME_UARTS=4
605# CONFIG_SERIAL_8250_EXTENDED is not set 603# CONFIG_SERIAL_8250_EXTENDED is not set
604CONFIG_SERIAL_8250_SHARE_IRQ=y
606 605
607# 606#
608# Non-8250 serial port support 607# Non-8250 serial port support
@@ -611,6 +610,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
611CONFIG_SERIAL_CORE=y 610CONFIG_SERIAL_CORE=y
612CONFIG_SERIAL_CORE_CONSOLE=y 611CONFIG_SERIAL_CORE_CONSOLE=y
613# CONFIG_SERIAL_JSM is not set 612# CONFIG_SERIAL_JSM is not set
613# CONFIG_SERIAL_OF_PLATFORM is not set
614CONFIG_UNIX98_PTYS=y 614CONFIG_UNIX98_PTYS=y
615CONFIG_LEGACY_PTYS=y 615CONFIG_LEGACY_PTYS=y
616CONFIG_LEGACY_PTY_COUNT=256 616CONFIG_LEGACY_PTY_COUNT=256
@@ -619,16 +619,11 @@ CONFIG_LEGACY_PTY_COUNT=256
619# IPMI 619# IPMI
620# 620#
621# CONFIG_IPMI_HANDLER is not set 621# CONFIG_IPMI_HANDLER is not set
622
623#
624# Watchdog Cards
625#
626# CONFIG_WATCHDOG is not set 622# CONFIG_WATCHDOG is not set
627# CONFIG_HW_RANDOM is not set 623# CONFIG_HW_RANDOM is not set
628# CONFIG_NVRAM is not set 624# CONFIG_NVRAM is not set
629CONFIG_GEN_RTC=y 625CONFIG_GEN_RTC=y
630# CONFIG_GEN_RTC_X is not set 626# CONFIG_GEN_RTC_X is not set
631# CONFIG_DTLK is not set
632# CONFIG_R3964 is not set 627# CONFIG_R3964 is not set
633# CONFIG_APPLICOM is not set 628# CONFIG_APPLICOM is not set
634# CONFIG_AGP is not set 629# CONFIG_AGP is not set
@@ -639,10 +634,7 @@ CONFIG_GEN_RTC=y
639# TPM devices 634# TPM devices
640# 635#
641# CONFIG_TCG_TPM is not set 636# CONFIG_TCG_TPM is not set
642 637CONFIG_DEVPORT=y
643#
644# I2C support
645#
646# CONFIG_I2C is not set 638# CONFIG_I2C is not set
647 639
648# 640#
@@ -655,35 +647,41 @@ CONFIG_GEN_RTC=y
655# Dallas's 1-wire bus 647# Dallas's 1-wire bus
656# 648#
657# CONFIG_W1 is not set 649# CONFIG_W1 is not set
658
659#
660# Hardware Monitoring support
661#
662CONFIG_HWMON=y 650CONFIG_HWMON=y
663# CONFIG_HWMON_VID is not set 651# CONFIG_HWMON_VID is not set
664# CONFIG_SENSORS_ABITUGURU is not set 652# CONFIG_SENSORS_ABITUGURU is not set
665# CONFIG_SENSORS_F71805F is not set 653# CONFIG_SENSORS_F71805F is not set
666# CONFIG_SENSORS_PC87427 is not set 654# CONFIG_SENSORS_PC87427 is not set
655# CONFIG_SENSORS_SMSC47M1 is not set
656# CONFIG_SENSORS_SMSC47B397 is not set
667# CONFIG_SENSORS_VT1211 is not set 657# CONFIG_SENSORS_VT1211 is not set
658# CONFIG_SENSORS_W83627HF is not set
668# CONFIG_HWMON_DEBUG_CHIP is not set 659# CONFIG_HWMON_DEBUG_CHIP is not set
669 660
670# 661#
662# Multifunction device drivers
663#
664# CONFIG_MFD_SM501 is not set
665
666#
671# Multimedia devices 667# Multimedia devices
672# 668#
673# CONFIG_VIDEO_DEV is not set 669# CONFIG_VIDEO_DEV is not set
670# CONFIG_DVB_CORE is not set
671CONFIG_DAB=y
674 672
675# 673#
676# Digital Video Broadcasting Devices 674# Graphics support
677# 675#
678# CONFIG_DVB is not set 676# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
679 677
680# 678#
681# Graphics support 679# Display device support
682# 680#
683CONFIG_FIRMWARE_EDID=y 681# CONFIG_DISPLAY_SUPPORT is not set
682# CONFIG_VGASTATE is not set
684# CONFIG_FB is not set 683# CONFIG_FB is not set
685# CONFIG_FB_IBM_GXT4500 is not set 684# CONFIG_FB_IBM_GXT4500 is not set
686# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
687 685
688# 686#
689# Sound 687# Sound
@@ -694,6 +692,7 @@ CONFIG_FIRMWARE_EDID=y
694# HID Devices 692# HID Devices
695# 693#
696CONFIG_HID=y 694CONFIG_HID=y
695# CONFIG_HID_DEBUG is not set
697 696
698# 697#
699# USB support 698# USB support
@@ -711,10 +710,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
711# USB Gadget Support 710# USB Gadget Support
712# 711#
713# CONFIG_USB_GADGET is not set 712# CONFIG_USB_GADGET is not set
714
715#
716# MMC/SD Card support
717#
718# CONFIG_MMC is not set 713# CONFIG_MMC is not set
719 714
720# 715#
@@ -758,10 +753,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
758# 753#
759 754
760# 755#
761# Virtualization
762#
763
764#
765# File systems 756# File systems
766# 757#
767CONFIG_EXT2_FS=y 758CONFIG_EXT2_FS=y
@@ -846,6 +837,7 @@ CONFIG_ROOT_NFS=y
846CONFIG_LOCKD=y 837CONFIG_LOCKD=y
847CONFIG_NFS_COMMON=y 838CONFIG_NFS_COMMON=y
848CONFIG_SUNRPC=y 839CONFIG_SUNRPC=y
840# CONFIG_SUNRPC_BIND34 is not set
849# CONFIG_RPCSEC_GSS_KRB5 is not set 841# CONFIG_RPCSEC_GSS_KRB5 is not set
850# CONFIG_RPCSEC_GSS_SPKM3 is not set 842# CONFIG_RPCSEC_GSS_SPKM3 is not set
851# CONFIG_SMB_FS is not set 843# CONFIG_SMB_FS is not set
@@ -871,6 +863,7 @@ CONFIG_PARTITION_ADVANCED=y
871# CONFIG_SUN_PARTITION is not set 863# CONFIG_SUN_PARTITION is not set
872# CONFIG_KARMA_PARTITION is not set 864# CONFIG_KARMA_PARTITION is not set
873# CONFIG_EFI_PARTITION is not set 865# CONFIG_EFI_PARTITION is not set
866# CONFIG_SYSV68_PARTITION is not set
874 867
875# 868#
876# Native Language Support 869# Native Language Support
@@ -881,6 +874,7 @@ CONFIG_PARTITION_ADVANCED=y
881# Distributed Lock Manager 874# Distributed Lock Manager
882# 875#
883# CONFIG_DLM is not set 876# CONFIG_DLM is not set
877# CONFIG_UCC_SLOW is not set
884 878
885# 879#
886# Library routines 880# Library routines
@@ -888,10 +882,13 @@ CONFIG_PARTITION_ADVANCED=y
888CONFIG_BITREVERSE=y 882CONFIG_BITREVERSE=y
889# CONFIG_CRC_CCITT is not set 883# CONFIG_CRC_CCITT is not set
890# CONFIG_CRC16 is not set 884# CONFIG_CRC16 is not set
885# CONFIG_CRC_ITU_T is not set
891CONFIG_CRC32=y 886CONFIG_CRC32=y
892# CONFIG_LIBCRC32C is not set 887# CONFIG_LIBCRC32C is not set
893CONFIG_PLIST=y 888CONFIG_PLIST=y
894CONFIG_IOMAP_COPY=y 889CONFIG_HAS_IOMEM=y
890CONFIG_HAS_IOPORT=y
891CONFIG_HAS_DMA=y
895 892
896# 893#
897# Instrumentation Support 894# Instrumentation Support
@@ -908,15 +905,15 @@ CONFIG_ENABLE_MUST_CHECK=y
908# CONFIG_DEBUG_FS is not set 905# CONFIG_DEBUG_FS is not set
909# CONFIG_HEADERS_CHECK is not set 906# CONFIG_HEADERS_CHECK is not set
910CONFIG_DEBUG_KERNEL=y 907CONFIG_DEBUG_KERNEL=y
911CONFIG_LOG_BUF_SHIFT=14 908# CONFIG_DEBUG_SHIRQ is not set
912CONFIG_DETECT_SOFTLOCKUP=y 909CONFIG_DETECT_SOFTLOCKUP=y
913# CONFIG_SCHEDSTATS is not set 910# CONFIG_SCHEDSTATS is not set
911# CONFIG_TIMER_STATS is not set
914# CONFIG_DEBUG_SLAB is not set 912# CONFIG_DEBUG_SLAB is not set
915# CONFIG_DEBUG_RT_MUTEXES is not set 913# CONFIG_DEBUG_RT_MUTEXES is not set
916# CONFIG_RT_MUTEX_TESTER is not set 914# CONFIG_RT_MUTEX_TESTER is not set
917# CONFIG_DEBUG_SPINLOCK is not set 915# CONFIG_DEBUG_SPINLOCK is not set
918CONFIG_DEBUG_MUTEXES=y 916CONFIG_DEBUG_MUTEXES=y
919# CONFIG_DEBUG_RWSEMS is not set
920# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 917# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
921# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 918# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
922# CONFIG_DEBUG_KOBJECT is not set 919# CONFIG_DEBUG_KOBJECT is not set
@@ -925,7 +922,10 @@ CONFIG_DEBUG_MUTEXES=y
925# CONFIG_DEBUG_VM is not set 922# CONFIG_DEBUG_VM is not set
926# CONFIG_DEBUG_LIST is not set 923# CONFIG_DEBUG_LIST is not set
927CONFIG_FORCED_INLINING=y 924CONFIG_FORCED_INLINING=y
928# CONFIG_RCU_TORTURE_TEST is not set 925# CONFIG_FAULT_INJECTION is not set
926# CONFIG_DEBUG_STACKOVERFLOW is not set
927# CONFIG_DEBUG_STACK_USAGE is not set
928# CONFIG_DEBUG_PAGEALLOC is not set
929# CONFIG_DEBUGGER is not set 929# CONFIG_DEBUGGER is not set
930# CONFIG_BDI_SWITCH is not set 930# CONFIG_BDI_SWITCH is not set
931# CONFIG_BOOTX_TEXT is not set 931# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/mpc8641_hpcn_defconfig b/arch/powerpc/configs/mpc8641_hpcn_defconfig
index 53fcd6932f..1ac94a605b 100644
--- a/arch/powerpc/configs/mpc8641_hpcn_defconfig
+++ b/arch/powerpc/configs/mpc8641_hpcn_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.22-rc7
4# Mon Jan 22 22:27:14 2007 4# Sun Jul 1 23:57:00 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -24,7 +24,7 @@ CONFIG_PPC_UDBG_16550=y
24CONFIG_GENERIC_TBSYNC=y 24CONFIG_GENERIC_TBSYNC=y
25CONFIG_AUDIT_ARCH=y 25CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 26CONFIG_GENERIC_BUG=y
27# CONFIG_DEFAULT_UIMAGE is not set 27CONFIG_DEFAULT_UIMAGE=y
28 28
29# 29#
30# Processor support 30# Processor support
@@ -34,9 +34,9 @@ CONFIG_GENERIC_BUG=y
34# CONFIG_PPC_83xx is not set 34# CONFIG_PPC_83xx is not set
35# CONFIG_PPC_85xx is not set 35# CONFIG_PPC_85xx is not set
36CONFIG_PPC_86xx=y 36CONFIG_PPC_86xx=y
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_PPC_FPU=y 42CONFIG_PPC_FPU=y
@@ -45,6 +45,7 @@ CONFIG_PPC_FPU=y
45CONFIG_ALTIVEC=y 45CONFIG_ALTIVEC=y
46CONFIG_PPC_STD_MMU=y 46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set
48CONFIG_SMP=y 49CONFIG_SMP=y
49CONFIG_NR_CPUS=2 50CONFIG_NR_CPUS=2
50CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 51CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -70,9 +71,11 @@ CONFIG_LOCALVERSION=""
70# CONFIG_AUDIT is not set 71# CONFIG_AUDIT is not set
71CONFIG_IKCONFIG=y 72CONFIG_IKCONFIG=y
72CONFIG_IKCONFIG_PROC=y 73CONFIG_IKCONFIG_PROC=y
74CONFIG_LOG_BUF_SHIFT=14
73# CONFIG_CPUSETS is not set 75# CONFIG_CPUSETS is not set
74CONFIG_SYSFS_DEPRECATED=y 76CONFIG_SYSFS_DEPRECATED=y
75# CONFIG_RELAY is not set 77# CONFIG_RELAY is not set
78CONFIG_BLK_DEV_INITRD=y
76CONFIG_INITRAMFS_SOURCE="" 79CONFIG_INITRAMFS_SOURCE=""
77# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 80# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
78CONFIG_SYSCTL=y 81CONFIG_SYSCTL=y
@@ -87,14 +90,19 @@ CONFIG_BUG=y
87# CONFIG_ELF_CORE is not set 90# CONFIG_ELF_CORE is not set
88CONFIG_BASE_FULL=y 91CONFIG_BASE_FULL=y
89CONFIG_FUTEX=y 92CONFIG_FUTEX=y
93CONFIG_ANON_INODES=y
90CONFIG_EPOLL=y 94CONFIG_EPOLL=y
95CONFIG_SIGNALFD=y
96CONFIG_TIMERFD=y
97CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 98CONFIG_SHMEM=y
92CONFIG_SLAB=y
93CONFIG_VM_EVENT_COUNTERS=y 99CONFIG_VM_EVENT_COUNTERS=y
100CONFIG_SLAB=y
101# CONFIG_SLUB is not set
102# CONFIG_SLOB is not set
94CONFIG_RT_MUTEXES=y 103CONFIG_RT_MUTEXES=y
95# CONFIG_TINY_SHMEM is not set 104# CONFIG_TINY_SHMEM is not set
96CONFIG_BASE_SMALL=0 105CONFIG_BASE_SMALL=0
97# CONFIG_SLOB is not set
98 106
99# 107#
100# Loadable module support 108# Loadable module support
@@ -121,15 +129,28 @@ CONFIG_DEFAULT_DEADLINE=y
121# CONFIG_DEFAULT_CFQ is not set 129# CONFIG_DEFAULT_CFQ is not set
122# CONFIG_DEFAULT_NOOP is not set 130# CONFIG_DEFAULT_NOOP is not set
123CONFIG_DEFAULT_IOSCHED="deadline" 131CONFIG_DEFAULT_IOSCHED="deadline"
124# CONFIG_WANT_EARLY_SERIAL is not set
125CONFIG_PPC_INDIRECT_PCI_BE=y
126CONFIG_MPIC=y
127 132
128# 133#
129# Platform Support 134# Platform support
130# 135#
136# CONFIG_PPC_MPC52xx is not set
137# CONFIG_PPC_MPC5200 is not set
138# CONFIG_PPC_CELL is not set
139# CONFIG_PPC_CELL_NATIVE is not set
140# CONFIG_PQ2ADS is not set
131CONFIG_MPC8641_HPCN=y 141CONFIG_MPC8641_HPCN=y
132CONFIG_MPC8641=y 142CONFIG_MPC8641=y
143CONFIG_MPIC=y
144# CONFIG_MPIC_WEIRD is not set
145CONFIG_PPC_I8259=y
146# CONFIG_PPC_RTAS is not set
147# CONFIG_MMIO_NVRAM is not set
148# CONFIG_PPC_MPC106 is not set
149# CONFIG_PPC_970_NAP is not set
150# CONFIG_PPC_INDIRECT_IO is not set
151# CONFIG_GENERIC_IOMAP is not set
152# CONFIG_CPU_FREQ is not set
153# CONFIG_CPM2 is not set
133 154
134# 155#
135# Kernel options 156# Kernel options
@@ -159,33 +180,34 @@ CONFIG_FLAT_NODE_MEM_MAP=y
159# CONFIG_SPARSEMEM_STATIC is not set 180# CONFIG_SPARSEMEM_STATIC is not set
160CONFIG_SPLIT_PTLOCK_CPUS=4 181CONFIG_SPLIT_PTLOCK_CPUS=4
161# CONFIG_RESOURCES_64BIT is not set 182# CONFIG_RESOURCES_64BIT is not set
183CONFIG_ZONE_DMA_FLAG=1
162CONFIG_PROC_DEVICETREE=y 184CONFIG_PROC_DEVICETREE=y
163# CONFIG_CMDLINE_BOOL is not set 185# CONFIG_CMDLINE_BOOL is not set
164# CONFIG_PM is not set 186# CONFIG_PM is not set
165# CONFIG_SECCOMP is not set 187# CONFIG_SECCOMP is not set
188# CONFIG_WANT_DEVICE_TREE is not set
166CONFIG_ISA_DMA_API=y 189CONFIG_ISA_DMA_API=y
167 190
168# 191#
169# Bus options 192# Bus options
170# 193#
194CONFIG_ZONE_DMA=y
171CONFIG_GENERIC_ISA_DMA=y 195CONFIG_GENERIC_ISA_DMA=y
172# CONFIG_MPIC_WEIRD is not set
173CONFIG_PPC_I8259=y
174CONFIG_PPC_INDIRECT_PCI=y 196CONFIG_PPC_INDIRECT_PCI=y
197CONFIG_PPC_INDIRECT_PCI_BE=y
175CONFIG_FSL_SOC=y 198CONFIG_FSL_SOC=y
199CONFIG_FSL_PCIE=y
176CONFIG_PCI=y 200CONFIG_PCI=y
177CONFIG_PCI_DOMAINS=y 201CONFIG_PCI_DOMAINS=y
178# CONFIG_PCIEPORTBUS is not set 202# CONFIG_PCIEPORTBUS is not set
203CONFIG_ARCH_SUPPORTS_MSI=y
204# CONFIG_PCI_MSI is not set
179# CONFIG_PCI_DEBUG is not set 205# CONFIG_PCI_DEBUG is not set
180 206
181# 207#
182# PCCARD (PCMCIA/CardBus) support 208# PCCARD (PCMCIA/CardBus) support
183# 209#
184# CONFIG_PCCARD is not set 210# CONFIG_PCCARD is not set
185
186#
187# PCI Hotplug Support
188#
189# CONFIG_HOTPLUG_PCI is not set 211# CONFIG_HOTPLUG_PCI is not set
190 212
191# 213#
@@ -210,13 +232,13 @@ CONFIG_NET=y
210# 232#
211# Networking options 233# Networking options
212# 234#
213# CONFIG_NETDEBUG is not set
214CONFIG_PACKET=y 235CONFIG_PACKET=y
215# CONFIG_PACKET_MMAP is not set 236# CONFIG_PACKET_MMAP is not set
216CONFIG_UNIX=y 237CONFIG_UNIX=y
217CONFIG_XFRM=y 238CONFIG_XFRM=y
218CONFIG_XFRM_USER=y 239CONFIG_XFRM_USER=y
219# CONFIG_XFRM_SUB_POLICY is not set 240# CONFIG_XFRM_SUB_POLICY is not set
241# CONFIG_XFRM_MIGRATE is not set
220# CONFIG_NET_KEY is not set 242# CONFIG_NET_KEY is not set
221CONFIG_INET=y 243CONFIG_INET=y
222# CONFIG_IP_MULTICAST is not set 244# CONFIG_IP_MULTICAST is not set
@@ -234,7 +256,7 @@ CONFIG_IP_PNP_RARP=y
234# CONFIG_INET_ESP is not set 256# CONFIG_INET_ESP is not set
235# CONFIG_INET_IPCOMP is not set 257# CONFIG_INET_IPCOMP is not set
236# CONFIG_INET_XFRM_TUNNEL is not set 258# CONFIG_INET_XFRM_TUNNEL is not set
237# CONFIG_INET_TUNNEL is not set 259CONFIG_INET_TUNNEL=y
238CONFIG_INET_XFRM_MODE_TRANSPORT=y 260CONFIG_INET_XFRM_MODE_TRANSPORT=y
239CONFIG_INET_XFRM_MODE_TUNNEL=y 261CONFIG_INET_XFRM_MODE_TUNNEL=y
240CONFIG_INET_XFRM_MODE_BEET=y 262CONFIG_INET_XFRM_MODE_BEET=y
@@ -247,6 +269,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
247CONFIG_IPV6=y 269CONFIG_IPV6=y
248# CONFIG_IPV6_PRIVACY is not set 270# CONFIG_IPV6_PRIVACY is not set
249# CONFIG_IPV6_ROUTER_PREF is not set 271# CONFIG_IPV6_ROUTER_PREF is not set
272# CONFIG_IPV6_OPTIMISTIC_DAD is not set
250# CONFIG_INET6_AH is not set 273# CONFIG_INET6_AH is not set
251# CONFIG_INET6_ESP is not set 274# CONFIG_INET6_ESP is not set
252# CONFIG_INET6_IPCOMP is not set 275# CONFIG_INET6_IPCOMP is not set
@@ -262,20 +285,8 @@ CONFIG_IPV6_SIT=y
262# CONFIG_IPV6_MULTIPLE_TABLES is not set 285# CONFIG_IPV6_MULTIPLE_TABLES is not set
263# CONFIG_NETWORK_SECMARK is not set 286# CONFIG_NETWORK_SECMARK is not set
264# CONFIG_NETFILTER is not set 287# CONFIG_NETFILTER is not set
265
266#
267# DCCP Configuration (EXPERIMENTAL)
268#
269# CONFIG_IP_DCCP is not set 288# CONFIG_IP_DCCP is not set
270
271#
272# SCTP Configuration (EXPERIMENTAL)
273#
274# CONFIG_IP_SCTP is not set 289# CONFIG_IP_SCTP is not set
275
276#
277# TIPC Configuration (EXPERIMENTAL)
278#
279# CONFIG_TIPC is not set 290# CONFIG_TIPC is not set
280# CONFIG_ATM is not set 291# CONFIG_ATM is not set
281# CONFIG_BRIDGE is not set 292# CONFIG_BRIDGE is not set
@@ -301,7 +312,16 @@ CONFIG_IPV6_SIT=y
301# CONFIG_HAMRADIO is not set 312# CONFIG_HAMRADIO is not set
302# CONFIG_IRDA is not set 313# CONFIG_IRDA is not set
303# CONFIG_BT is not set 314# CONFIG_BT is not set
315# CONFIG_AF_RXRPC is not set
316
317#
318# Wireless
319#
320# CONFIG_CFG80211 is not set
321# CONFIG_WIRELESS_EXT is not set
322# CONFIG_MAC80211 is not set
304# CONFIG_IEEE80211 is not set 323# CONFIG_IEEE80211 is not set
324# CONFIG_RFKILL is not set
305 325
306# 326#
307# Device Drivers 327# Device Drivers
@@ -314,16 +334,13 @@ CONFIG_STANDALONE=y
314CONFIG_PREVENT_FIRMWARE_BUILD=y 334CONFIG_PREVENT_FIRMWARE_BUILD=y
315CONFIG_FW_LOADER=y 335CONFIG_FW_LOADER=y
316# CONFIG_DEBUG_DRIVER is not set 336# CONFIG_DEBUG_DRIVER is not set
337# CONFIG_DEBUG_DEVRES is not set
317# CONFIG_SYS_HYPERVISOR is not set 338# CONFIG_SYS_HYPERVISOR is not set
318 339
319# 340#
320# Connector - unified userspace <-> kernelspace linker 341# Connector - unified userspace <-> kernelspace linker
321# 342#
322# CONFIG_CONNECTOR is not set 343# CONFIG_CONNECTOR is not set
323
324#
325# Memory Technology Devices (MTD)
326#
327# CONFIG_MTD is not set 344# CONFIG_MTD is not set
328 345
329# 346#
@@ -334,6 +351,7 @@ CONFIG_FW_LOADER=y
334# 351#
335# Plug and Play support 352# Plug and Play support
336# 353#
354# CONFIG_PNPACPI is not set
337 355
338# 356#
339# Block devices 357# Block devices
@@ -352,19 +370,16 @@ CONFIG_BLK_DEV_RAM=y
352CONFIG_BLK_DEV_RAM_COUNT=16 370CONFIG_BLK_DEV_RAM_COUNT=16
353CONFIG_BLK_DEV_RAM_SIZE=131072 371CONFIG_BLK_DEV_RAM_SIZE=131072
354CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 372CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
355CONFIG_BLK_DEV_INITRD=y
356# CONFIG_CDROM_PKTCDVD is not set 373# CONFIG_CDROM_PKTCDVD is not set
357# CONFIG_ATA_OVER_ETH is not set 374# CONFIG_ATA_OVER_ETH is not set
358 375
359# 376#
360# Misc devices 377# Misc devices
361# 378#
379# CONFIG_PHANTOM is not set
362# CONFIG_SGI_IOC4 is not set 380# CONFIG_SGI_IOC4 is not set
363# CONFIG_TIFM_CORE is not set 381# CONFIG_TIFM_CORE is not set
364 382# CONFIG_BLINK is not set
365#
366# ATA/ATAPI/MFM/RLL support
367#
368# CONFIG_IDE is not set 383# CONFIG_IDE is not set
369 384
370# 385#
@@ -373,10 +388,6 @@ CONFIG_BLK_DEV_INITRD=y
373# CONFIG_RAID_ATTRS is not set 388# CONFIG_RAID_ATTRS is not set
374# CONFIG_SCSI is not set 389# CONFIG_SCSI is not set
375# CONFIG_SCSI_NETLINK is not set 390# CONFIG_SCSI_NETLINK is not set
376
377#
378# Serial ATA (prod) and Parallel ATA (experimental) drivers
379#
380# CONFIG_ATA is not set 391# CONFIG_ATA is not set
381 392
382# 393#
@@ -392,18 +403,14 @@ CONFIG_BLK_DEV_INITRD=y
392# 403#
393# IEEE 1394 (FireWire) support 404# IEEE 1394 (FireWire) support
394# 405#
406# CONFIG_FIREWIRE is not set
395# CONFIG_IEEE1394 is not set 407# CONFIG_IEEE1394 is not set
396 408
397# 409#
398# I2O device support 410# I2O device support
399# 411#
400# CONFIG_I2O is not set 412# CONFIG_I2O is not set
401 413# CONFIG_MACINTOSH_DRIVERS is not set
402#
403# Macintosh device drivers
404#
405# CONFIG_MAC_EMUMOUSEBTN is not set
406# CONFIG_WINDFARM is not set
407 414
408# 415#
409# Network device support 416# Network device support
@@ -413,15 +420,7 @@ CONFIG_DUMMY=y
413# CONFIG_BONDING is not set 420# CONFIG_BONDING is not set
414# CONFIG_EQUALIZER is not set 421# CONFIG_EQUALIZER is not set
415# CONFIG_TUN is not set 422# CONFIG_TUN is not set
416
417#
418# ARCnet devices
419#
420# CONFIG_ARCNET is not set 423# CONFIG_ARCNET is not set
421
422#
423# PHY device support
424#
425CONFIG_PHYLIB=y 424CONFIG_PHYLIB=y
426 425
427# 426#
@@ -453,10 +452,7 @@ CONFIG_MII=y
453# CONFIG_NET_TULIP is not set 452# CONFIG_NET_TULIP is not set
454# CONFIG_HP100 is not set 453# CONFIG_HP100 is not set
455# CONFIG_NET_PCI is not set 454# CONFIG_NET_PCI is not set
456 455CONFIG_NETDEV_1000=y
457#
458# Ethernet (1000 Mbit)
459#
460# CONFIG_ACENIC is not set 456# CONFIG_ACENIC is not set
461# CONFIG_DL2K is not set 457# CONFIG_DL2K is not set
462# CONFIG_E1000 is not set 458# CONFIG_E1000 is not set
@@ -468,34 +464,28 @@ CONFIG_MII=y
468# CONFIG_SKGE is not set 464# CONFIG_SKGE is not set
469# CONFIG_SKY2 is not set 465# CONFIG_SKY2 is not set
470# CONFIG_SK98LIN is not set 466# CONFIG_SK98LIN is not set
467# CONFIG_VIA_VELOCITY is not set
471# CONFIG_TIGON3 is not set 468# CONFIG_TIGON3 is not set
472# CONFIG_BNX2 is not set 469# CONFIG_BNX2 is not set
473CONFIG_GIANFAR=y 470CONFIG_GIANFAR=y
474# CONFIG_GFAR_NAPI is not set 471# CONFIG_GFAR_NAPI is not set
475# CONFIG_QLA3XXX is not set 472# CONFIG_QLA3XXX is not set
476 473# CONFIG_ATL1 is not set
477# 474CONFIG_NETDEV_10000=y
478# Ethernet (10000 Mbit)
479#
480# CONFIG_CHELSIO_T1 is not set 475# CONFIG_CHELSIO_T1 is not set
476# CONFIG_CHELSIO_T3 is not set
481# CONFIG_IXGB is not set 477# CONFIG_IXGB is not set
482# CONFIG_S2IO is not set 478# CONFIG_S2IO is not set
483# CONFIG_MYRI10GE is not set 479# CONFIG_MYRI10GE is not set
484# CONFIG_NETXEN_NIC is not set 480# CONFIG_NETXEN_NIC is not set
485 481# CONFIG_MLX4_CORE is not set
486#
487# Token Ring devices
488#
489# CONFIG_TR is not set 482# CONFIG_TR is not set
490 483
491# 484#
492# Wireless LAN (non-hamradio) 485# Wireless LAN
493#
494# CONFIG_NET_RADIO is not set
495
496#
497# Wan interfaces
498# 486#
487# CONFIG_WLAN_PRE80211 is not set
488# CONFIG_WLAN_80211 is not set
499# CONFIG_WAN is not set 489# CONFIG_WAN is not set
500# CONFIG_FDDI is not set 490# CONFIG_FDDI is not set
501# CONFIG_HIPPI is not set 491# CONFIG_HIPPI is not set
@@ -521,6 +511,7 @@ CONFIG_GIANFAR=y
521# 511#
522CONFIG_INPUT=y 512CONFIG_INPUT=y
523# CONFIG_INPUT_FF_MEMLESS is not set 513# CONFIG_INPUT_FF_MEMLESS is not set
514# CONFIG_INPUT_POLLDEV is not set
524 515
525# 516#
526# Userland interfaces 517# Userland interfaces
@@ -537,6 +528,7 @@ CONFIG_INPUT=y
537# CONFIG_INPUT_KEYBOARD is not set 528# CONFIG_INPUT_KEYBOARD is not set
538# CONFIG_INPUT_MOUSE is not set 529# CONFIG_INPUT_MOUSE is not set
539# CONFIG_INPUT_JOYSTICK is not set 530# CONFIG_INPUT_JOYSTICK is not set
531# CONFIG_INPUT_TABLET is not set
540# CONFIG_INPUT_TOUCHSCREEN is not set 532# CONFIG_INPUT_TOUCHSCREEN is not set
541# CONFIG_INPUT_MISC is not set 533# CONFIG_INPUT_MISC is not set
542 534
@@ -581,6 +573,7 @@ CONFIG_SERIAL_8250_RSA=y
581CONFIG_SERIAL_CORE=y 573CONFIG_SERIAL_CORE=y
582CONFIG_SERIAL_CORE_CONSOLE=y 574CONFIG_SERIAL_CORE_CONSOLE=y
583# CONFIG_SERIAL_JSM is not set 575# CONFIG_SERIAL_JSM is not set
576# CONFIG_SERIAL_OF_PLATFORM is not set
584CONFIG_UNIX98_PTYS=y 577CONFIG_UNIX98_PTYS=y
585# CONFIG_LEGACY_PTYS is not set 578# CONFIG_LEGACY_PTYS is not set
586 579
@@ -588,15 +581,10 @@ CONFIG_UNIX98_PTYS=y
588# IPMI 581# IPMI
589# 582#
590# CONFIG_IPMI_HANDLER is not set 583# CONFIG_IPMI_HANDLER is not set
591
592#
593# Watchdog Cards
594#
595# CONFIG_WATCHDOG is not set 584# CONFIG_WATCHDOG is not set
596# CONFIG_HW_RANDOM is not set 585# CONFIG_HW_RANDOM is not set
597# CONFIG_NVRAM is not set 586# CONFIG_NVRAM is not set
598# CONFIG_GEN_RTC is not set 587# CONFIG_GEN_RTC is not set
599# CONFIG_DTLK is not set
600# CONFIG_R3964 is not set 588# CONFIG_R3964 is not set
601# CONFIG_APPLICOM is not set 589# CONFIG_APPLICOM is not set
602# CONFIG_AGP is not set 590# CONFIG_AGP is not set
@@ -607,11 +595,9 @@ CONFIG_UNIX98_PTYS=y
607# TPM devices 595# TPM devices
608# 596#
609# CONFIG_TCG_TPM is not set 597# CONFIG_TCG_TPM is not set
610 598CONFIG_DEVPORT=y
611#
612# I2C support
613#
614CONFIG_I2C=y 599CONFIG_I2C=y
600CONFIG_I2C_BOARDINFO=y
615# CONFIG_I2C_CHARDEV is not set 601# CONFIG_I2C_CHARDEV is not set
616 602
617# 603#
@@ -638,13 +624,13 @@ CONFIG_I2C_MPC=y
638# CONFIG_I2C_PARPORT_LIGHT is not set 624# CONFIG_I2C_PARPORT_LIGHT is not set
639# CONFIG_I2C_PROSAVAGE is not set 625# CONFIG_I2C_PROSAVAGE is not set
640# CONFIG_I2C_SAVAGE4 is not set 626# CONFIG_I2C_SAVAGE4 is not set
627# CONFIG_I2C_SIMTEC is not set
641# CONFIG_I2C_SIS5595 is not set 628# CONFIG_I2C_SIS5595 is not set
642# CONFIG_I2C_SIS630 is not set 629# CONFIG_I2C_SIS630 is not set
643# CONFIG_I2C_SIS96X is not set 630# CONFIG_I2C_SIS96X is not set
644# CONFIG_I2C_VIA is not set 631# CONFIG_I2C_VIA is not set
645# CONFIG_I2C_VIAPRO is not set 632# CONFIG_I2C_VIAPRO is not set
646# CONFIG_I2C_VOODOO3 is not set 633# CONFIG_I2C_VOODOO3 is not set
647# CONFIG_I2C_PCA_ISA is not set
648 634
649# 635#
650# Miscellaneous I2C Chip support 636# Miscellaneous I2C Chip support
@@ -672,27 +658,30 @@ CONFIG_SENSORS_EEPROM=y
672# Dallas's 1-wire bus 658# Dallas's 1-wire bus
673# 659#
674# CONFIG_W1 is not set 660# CONFIG_W1 is not set
661# CONFIG_HWMON is not set
675 662
676# 663#
677# Hardware Monitoring support 664# Multifunction device drivers
678# 665#
679# CONFIG_HWMON is not set 666# CONFIG_MFD_SM501 is not set
680# CONFIG_HWMON_VID is not set
681 667
682# 668#
683# Multimedia devices 669# Multimedia devices
684# 670#
685# CONFIG_VIDEO_DEV is not set 671# CONFIG_VIDEO_DEV is not set
672# CONFIG_DVB_CORE is not set
673CONFIG_DAB=y
686 674
687# 675#
688# Digital Video Broadcasting Devices 676# Graphics support
689# 677#
690# CONFIG_DVB is not set 678# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
691 679
692# 680#
693# Graphics support 681# Display device support
694# 682#
695CONFIG_FIRMWARE_EDID=y 683# CONFIG_DISPLAY_SUPPORT is not set
684# CONFIG_VGASTATE is not set
696# CONFIG_FB is not set 685# CONFIG_FB is not set
697# CONFIG_FB_IBM_GXT4500 is not set 686# CONFIG_FB_IBM_GXT4500 is not set
698 687
@@ -702,7 +691,6 @@ CONFIG_FIRMWARE_EDID=y
702CONFIG_VGA_CONSOLE=y 691CONFIG_VGA_CONSOLE=y
703# CONFIG_VGACON_SOFT_SCROLLBACK is not set 692# CONFIG_VGACON_SOFT_SCROLLBACK is not set
704CONFIG_DUMMY_CONSOLE=y 693CONFIG_DUMMY_CONSOLE=y
705# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
706 694
707# 695#
708# Sound 696# Sound
@@ -713,6 +701,7 @@ CONFIG_DUMMY_CONSOLE=y
713# HID Devices 701# HID Devices
714# 702#
715CONFIG_HID=y 703CONFIG_HID=y
704# CONFIG_HID_DEBUG is not set
716 705
717# 706#
718# USB support 707# USB support
@@ -730,10 +719,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
730# USB Gadget Support 719# USB Gadget Support
731# 720#
732# CONFIG_USB_GADGET is not set 721# CONFIG_USB_GADGET is not set
733
734#
735# MMC/SD Card support
736#
737# CONFIG_MMC is not set 722# CONFIG_MMC is not set
738 723
739# 724#
@@ -777,10 +762,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
777# 762#
778 763
779# 764#
780# Virtualization
781#
782
783#
784# File systems 765# File systems
785# 766#
786CONFIG_EXT2_FS=y 767CONFIG_EXT2_FS=y
@@ -869,6 +850,7 @@ CONFIG_LOCKD_V4=y
869CONFIG_EXPORTFS=y 850CONFIG_EXPORTFS=y
870CONFIG_NFS_COMMON=y 851CONFIG_NFS_COMMON=y
871CONFIG_SUNRPC=y 852CONFIG_SUNRPC=y
853# CONFIG_SUNRPC_BIND34 is not set
872# CONFIG_RPCSEC_GSS_KRB5 is not set 854# CONFIG_RPCSEC_GSS_KRB5 is not set
873# CONFIG_RPCSEC_GSS_SPKM3 is not set 855# CONFIG_RPCSEC_GSS_SPKM3 is not set
874# CONFIG_SMB_FS is not set 856# CONFIG_SMB_FS is not set
@@ -899,6 +881,7 @@ CONFIG_LDM_PARTITION=y
899# CONFIG_SUN_PARTITION is not set 881# CONFIG_SUN_PARTITION is not set
900# CONFIG_KARMA_PARTITION is not set 882# CONFIG_KARMA_PARTITION is not set
901# CONFIG_EFI_PARTITION is not set 883# CONFIG_EFI_PARTITION is not set
884# CONFIG_SYSV68_PARTITION is not set
902 885
903# 886#
904# Native Language Support 887# Native Language Support
@@ -948,6 +931,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
948# Distributed Lock Manager 931# Distributed Lock Manager
949# 932#
950# CONFIG_DLM is not set 933# CONFIG_DLM is not set
934# CONFIG_UCC_SLOW is not set
951 935
952# 936#
953# Library routines 937# Library routines
@@ -955,10 +939,13 @@ CONFIG_NLS_DEFAULT="iso8859-1"
955CONFIG_BITREVERSE=y 939CONFIG_BITREVERSE=y
956# CONFIG_CRC_CCITT is not set 940# CONFIG_CRC_CCITT is not set
957# CONFIG_CRC16 is not set 941# CONFIG_CRC16 is not set
942# CONFIG_CRC_ITU_T is not set
958CONFIG_CRC32=y 943CONFIG_CRC32=y
959# CONFIG_LIBCRC32C is not set 944# CONFIG_LIBCRC32C is not set
960CONFIG_PLIST=y 945CONFIG_PLIST=y
961CONFIG_IOMAP_COPY=y 946CONFIG_HAS_IOMEM=y
947CONFIG_HAS_IOPORT=y
948CONFIG_HAS_DMA=y
962 949
963# 950#
964# Instrumentation Support 951# Instrumentation Support
@@ -975,15 +962,15 @@ CONFIG_ENABLE_MUST_CHECK=y
975# CONFIG_DEBUG_FS is not set 962# CONFIG_DEBUG_FS is not set
976# CONFIG_HEADERS_CHECK is not set 963# CONFIG_HEADERS_CHECK is not set
977CONFIG_DEBUG_KERNEL=y 964CONFIG_DEBUG_KERNEL=y
978CONFIG_LOG_BUF_SHIFT=14 965# CONFIG_DEBUG_SHIRQ is not set
979CONFIG_DETECT_SOFTLOCKUP=y 966CONFIG_DETECT_SOFTLOCKUP=y
980# CONFIG_SCHEDSTATS is not set 967# CONFIG_SCHEDSTATS is not set
968# CONFIG_TIMER_STATS is not set
981# CONFIG_DEBUG_SLAB is not set 969# CONFIG_DEBUG_SLAB is not set
982# CONFIG_DEBUG_RT_MUTEXES is not set 970# CONFIG_DEBUG_RT_MUTEXES is not set
983# CONFIG_RT_MUTEX_TESTER is not set 971# CONFIG_RT_MUTEX_TESTER is not set
984# CONFIG_DEBUG_SPINLOCK is not set 972# CONFIG_DEBUG_SPINLOCK is not set
985# CONFIG_DEBUG_MUTEXES is not set 973# CONFIG_DEBUG_MUTEXES is not set
986# CONFIG_DEBUG_RWSEMS is not set
987# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 974# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
988# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 975# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
989# CONFIG_DEBUG_KOBJECT is not set 976# CONFIG_DEBUG_KOBJECT is not set
@@ -993,7 +980,10 @@ CONFIG_DETECT_SOFTLOCKUP=y
993# CONFIG_DEBUG_VM is not set 980# CONFIG_DEBUG_VM is not set
994# CONFIG_DEBUG_LIST is not set 981# CONFIG_DEBUG_LIST is not set
995CONFIG_FORCED_INLINING=y 982CONFIG_FORCED_INLINING=y
996# CONFIG_RCU_TORTURE_TEST is not set 983# CONFIG_FAULT_INJECTION is not set
984# CONFIG_DEBUG_STACKOVERFLOW is not set
985# CONFIG_DEBUG_STACK_USAGE is not set
986# CONFIG_DEBUG_PAGEALLOC is not set
997# CONFIG_DEBUGGER is not set 987# CONFIG_DEBUGGER is not set
998# CONFIG_BDI_SWITCH is not set 988# CONFIG_BDI_SWITCH is not set
999# CONFIG_BOOTX_TEXT is not set 989# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/mpc866_ads_defconfig b/arch/powerpc/configs/mpc866_ads_defconfig
index 539d9e3d36..e6b18ea8f6 100644
--- a/arch/powerpc/configs/mpc866_ads_defconfig
+++ b/arch/powerpc/configs/mpc866_ads_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-rc6 3# Linux kernel version: 2.6.22-rc7
4# Fri Nov 24 21:13:55 2006 4# Sun Jul 1 23:57:00 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y 11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y 12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
13CONFIG_GENERIC_HWEIGHT=y 14CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_CALIBRATE_DELAY=y 15CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y 16CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -28,7 +29,6 @@ CONFIG_AUDIT_ARCH=y
28# Processor support 29# Processor support
29# 30#
30# CONFIG_CLASSIC32 is not set 31# CONFIG_CLASSIC32 is not set
31# CONFIG_PPC_52xx is not set
32# CONFIG_PPC_82xx is not set 32# CONFIG_PPC_82xx is not set
33# CONFIG_PPC_83xx is not set 33# CONFIG_PPC_83xx is not set
34# CONFIG_PPC_85xx is not set 34# CONFIG_PPC_85xx is not set
@@ -40,6 +40,7 @@ CONFIG_PPC_8xx=y
40CONFIG_8xx=y 40CONFIG_8xx=y
41# CONFIG_PPC_DCR_NATIVE is not set 41# CONFIG_PPC_DCR_NATIVE is not set
42# CONFIG_PPC_DCR_MMIO is not set 42# CONFIG_PPC_DCR_MMIO is not set
43# CONFIG_PPC_MM_SLICES is not set
43CONFIG_NOT_COHERENT_CACHE=y 44CONFIG_NOT_COHERENT_CACHE=y
44CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 45CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
45 46
@@ -58,14 +59,17 @@ CONFIG_LOCALVERSION_AUTO=y
58# CONFIG_SWAP is not set 59# CONFIG_SWAP is not set
59CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
60# CONFIG_IPC_NS is not set 61# CONFIG_IPC_NS is not set
62CONFIG_SYSVIPC_SYSCTL=y
61# CONFIG_POSIX_MQUEUE is not set 63# CONFIG_POSIX_MQUEUE is not set
62# CONFIG_BSD_PROCESS_ACCT is not set 64# CONFIG_BSD_PROCESS_ACCT is not set
63# CONFIG_TASKSTATS is not set 65# CONFIG_TASKSTATS is not set
64# CONFIG_UTS_NS is not set 66# CONFIG_UTS_NS is not set
65# CONFIG_AUDIT is not set 67# CONFIG_AUDIT is not set
66# CONFIG_IKCONFIG is not set 68# CONFIG_IKCONFIG is not set
69CONFIG_LOG_BUF_SHIFT=14
70CONFIG_SYSFS_DEPRECATED=y
67# CONFIG_RELAY is not set 71# CONFIG_RELAY is not set
68CONFIG_INITRAMFS_SOURCE="" 72# CONFIG_BLK_DEV_INITRD is not set
69# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 73# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
70CONFIG_SYSCTL=y 74CONFIG_SYSCTL=y
71CONFIG_EMBEDDED=y 75CONFIG_EMBEDDED=y
@@ -78,14 +82,19 @@ CONFIG_PRINTK=y
78CONFIG_ELF_CORE=y 82CONFIG_ELF_CORE=y
79# CONFIG_BASE_FULL is not set 83# CONFIG_BASE_FULL is not set
80CONFIG_FUTEX=y 84CONFIG_FUTEX=y
85CONFIG_ANON_INODES=y
81# CONFIG_EPOLL is not set 86# CONFIG_EPOLL is not set
87CONFIG_SIGNALFD=y
88CONFIG_TIMERFD=y
89CONFIG_EVENTFD=y
82CONFIG_SHMEM=y 90CONFIG_SHMEM=y
83CONFIG_SLAB=y
84# CONFIG_VM_EVENT_COUNTERS is not set 91# CONFIG_VM_EVENT_COUNTERS is not set
92CONFIG_SLAB=y
93# CONFIG_SLUB is not set
94# CONFIG_SLOB is not set
85CONFIG_RT_MUTEXES=y 95CONFIG_RT_MUTEXES=y
86# CONFIG_TINY_SHMEM is not set 96# CONFIG_TINY_SHMEM is not set
87CONFIG_BASE_SMALL=1 97CONFIG_BASE_SMALL=1
88# CONFIG_SLOB is not set
89 98
90# 99#
91# Loadable module support 100# Loadable module support
@@ -112,13 +121,14 @@ CONFIG_DEFAULT_AS=y
112# CONFIG_DEFAULT_CFQ is not set 121# CONFIG_DEFAULT_CFQ is not set
113# CONFIG_DEFAULT_NOOP is not set 122# CONFIG_DEFAULT_NOOP is not set
114CONFIG_DEFAULT_IOSCHED="anticipatory" 123CONFIG_DEFAULT_IOSCHED="anticipatory"
115# CONFIG_WANT_EARLY_SERIAL is not set
116CONFIG_EMBEDDEDBOOT=y
117# CONFIG_MPIC is not set
118 124
119# 125#
120# Platform support 126# Platform support
121# 127#
128# CONFIG_PPC_MPC52xx is not set
129# CONFIG_PPC_MPC5200 is not set
130# CONFIG_PPC_CELL is not set
131# CONFIG_PPC_CELL_NATIVE is not set
122CONFIG_CPM1=y 132CONFIG_CPM1=y
123# CONFIG_MPC8XXFADS is not set 133# CONFIG_MPC8XXFADS is not set
124CONFIG_MPC86XADS=y 134CONFIG_MPC86XADS=y
@@ -137,6 +147,18 @@ CONFIG_NO_UCODE_PATCH=y
137# CONFIG_USB_SOF_UCODE_PATCH is not set 147# CONFIG_USB_SOF_UCODE_PATCH is not set
138# CONFIG_I2C_SPI_UCODE_PATCH is not set 148# CONFIG_I2C_SPI_UCODE_PATCH is not set
139# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set 149# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set
150# CONFIG_PQ2ADS is not set
151# CONFIG_MPIC is not set
152# CONFIG_MPIC_WEIRD is not set
153# CONFIG_PPC_I8259 is not set
154# CONFIG_PPC_RTAS is not set
155# CONFIG_MMIO_NVRAM is not set
156# CONFIG_PPC_MPC106 is not set
157# CONFIG_PPC_970_NAP is not set
158# CONFIG_PPC_INDIRECT_IO is not set
159# CONFIG_GENERIC_IOMAP is not set
160# CONFIG_CPU_FREQ is not set
161# CONFIG_CPM2 is not set
140 162
141# 163#
142# Kernel options 164# Kernel options
@@ -144,6 +166,7 @@ CONFIG_NO_UCODE_PATCH=y
144# CONFIG_HIGHMEM is not set 166# CONFIG_HIGHMEM is not set
145# CONFIG_HZ_100 is not set 167# CONFIG_HZ_100 is not set
146# CONFIG_HZ_250 is not set 168# CONFIG_HZ_250 is not set
169# CONFIG_HZ_300 is not set
147CONFIG_HZ_1000=y 170CONFIG_HZ_1000=y
148CONFIG_HZ=1000 171CONFIG_HZ=1000
149CONFIG_PREEMPT_NONE=y 172CONFIG_PREEMPT_NONE=y
@@ -164,31 +187,29 @@ CONFIG_FLAT_NODE_MEM_MAP=y
164# CONFIG_SPARSEMEM_STATIC is not set 187# CONFIG_SPARSEMEM_STATIC is not set
165CONFIG_SPLIT_PTLOCK_CPUS=4 188CONFIG_SPLIT_PTLOCK_CPUS=4
166# CONFIG_RESOURCES_64BIT is not set 189# CONFIG_RESOURCES_64BIT is not set
190CONFIG_ZONE_DMA_FLAG=1
167# CONFIG_PROC_DEVICETREE is not set 191# CONFIG_PROC_DEVICETREE is not set
168# CONFIG_CMDLINE_BOOL is not set 192# CONFIG_CMDLINE_BOOL is not set
169# CONFIG_PM is not set 193# CONFIG_PM is not set
170# CONFIG_SECCOMP is not set 194# CONFIG_SECCOMP is not set
195# CONFIG_WANT_DEVICE_TREE is not set
171CONFIG_ISA_DMA_API=y 196CONFIG_ISA_DMA_API=y
172 197
173# 198#
174# Bus options 199# Bus options
175# 200#
176# CONFIG_MPIC_WEIRD is not set 201CONFIG_ZONE_DMA=y
177# CONFIG_PPC_I8259 is not set
178CONFIG_FSL_SOC=y 202CONFIG_FSL_SOC=y
179# CONFIG_PCI is not set 203# CONFIG_PCI is not set
180# CONFIG_PCI_DOMAINS is not set 204# CONFIG_PCI_DOMAINS is not set
181# CONFIG_PCI_QSPAN is not set 205# CONFIG_PCI_QSPAN is not set
206# CONFIG_ARCH_SUPPORTS_MSI is not set
182 207
183# 208#
184# PCCARD (PCMCIA/CardBus) support 209# PCCARD (PCMCIA/CardBus) support
185# 210#
186 211
187# 212#
188# PCI Hotplug Support
189#
190
191#
192# Advanced setup 213# Advanced setup
193# 214#
194# CONFIG_ADVANCED_OPTIONS is not set 215# CONFIG_ADVANCED_OPTIONS is not set
@@ -212,13 +233,13 @@ CONFIG_NET=y
212# 233#
213# Networking options 234# Networking options
214# 235#
215# CONFIG_NETDEBUG is not set
216CONFIG_PACKET=y 236CONFIG_PACKET=y
217# CONFIG_PACKET_MMAP is not set 237# CONFIG_PACKET_MMAP is not set
218CONFIG_UNIX=y 238CONFIG_UNIX=y
219CONFIG_XFRM=y 239CONFIG_XFRM=y
220# CONFIG_XFRM_USER is not set 240# CONFIG_XFRM_USER is not set
221# CONFIG_XFRM_SUB_POLICY is not set 241# CONFIG_XFRM_SUB_POLICY is not set
242# CONFIG_XFRM_MIGRATE is not set
222# CONFIG_NET_KEY is not set 243# CONFIG_NET_KEY is not set
223CONFIG_INET=y 244CONFIG_INET=y
224CONFIG_IP_MULTICAST=y 245CONFIG_IP_MULTICAST=y
@@ -246,25 +267,14 @@ CONFIG_INET_TCP_DIAG=y
246# CONFIG_TCP_CONG_ADVANCED is not set 267# CONFIG_TCP_CONG_ADVANCED is not set
247CONFIG_TCP_CONG_CUBIC=y 268CONFIG_TCP_CONG_CUBIC=y
248CONFIG_DEFAULT_TCP_CONG="cubic" 269CONFIG_DEFAULT_TCP_CONG="cubic"
270# CONFIG_TCP_MD5SIG is not set
249# CONFIG_IPV6 is not set 271# CONFIG_IPV6 is not set
250# CONFIG_INET6_XFRM_TUNNEL is not set 272# CONFIG_INET6_XFRM_TUNNEL is not set
251# CONFIG_INET6_TUNNEL is not set 273# CONFIG_INET6_TUNNEL is not set
252# CONFIG_NETWORK_SECMARK is not set 274# CONFIG_NETWORK_SECMARK is not set
253# CONFIG_NETFILTER is not set 275# CONFIG_NETFILTER is not set
254
255#
256# DCCP Configuration (EXPERIMENTAL)
257#
258# CONFIG_IP_DCCP is not set 276# CONFIG_IP_DCCP is not set
259
260#
261# SCTP Configuration (EXPERIMENTAL)
262#
263# CONFIG_IP_SCTP is not set 277# CONFIG_IP_SCTP is not set
264
265#
266# TIPC Configuration (EXPERIMENTAL)
267#
268# CONFIG_TIPC is not set 278# CONFIG_TIPC is not set
269# CONFIG_ATM is not set 279# CONFIG_ATM is not set
270# CONFIG_BRIDGE is not set 280# CONFIG_BRIDGE is not set
@@ -290,7 +300,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
290# CONFIG_HAMRADIO is not set 300# CONFIG_HAMRADIO is not set
291# CONFIG_IRDA is not set 301# CONFIG_IRDA is not set
292# CONFIG_BT is not set 302# CONFIG_BT is not set
303# CONFIG_AF_RXRPC is not set
304
305#
306# Wireless
307#
308# CONFIG_CFG80211 is not set
309# CONFIG_WIRELESS_EXT is not set
310# CONFIG_MAC80211 is not set
293# CONFIG_IEEE80211 is not set 311# CONFIG_IEEE80211 is not set
312# CONFIG_RFKILL is not set
294 313
295# 314#
296# Device Drivers 315# Device Drivers
@@ -307,10 +326,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
307# Connector - unified userspace <-> kernelspace linker 326# Connector - unified userspace <-> kernelspace linker
308# 327#
309# CONFIG_CONNECTOR is not set 328# CONFIG_CONNECTOR is not set
310
311#
312# Memory Technology Devices (MTD)
313#
314# CONFIG_MTD is not set 329# CONFIG_MTD is not set
315 330
316# 331#
@@ -321,6 +336,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
321# 336#
322# Plug and Play support 337# Plug and Play support
323# 338#
339# CONFIG_PNPACPI is not set
324 340
325# 341#
326# Block devices 342# Block devices
@@ -331,18 +347,13 @@ CONFIG_BLK_DEV_LOOP=y
331# CONFIG_BLK_DEV_CRYPTOLOOP is not set 347# CONFIG_BLK_DEV_CRYPTOLOOP is not set
332# CONFIG_BLK_DEV_NBD is not set 348# CONFIG_BLK_DEV_NBD is not set
333# CONFIG_BLK_DEV_RAM is not set 349# CONFIG_BLK_DEV_RAM is not set
334# CONFIG_BLK_DEV_INITRD is not set
335# CONFIG_CDROM_PKTCDVD is not set 350# CONFIG_CDROM_PKTCDVD is not set
336# CONFIG_ATA_OVER_ETH is not set 351# CONFIG_ATA_OVER_ETH is not set
337 352
338# 353#
339# Misc devices 354# Misc devices
340# 355#
341# CONFIG_TIFM_CORE is not set 356# CONFIG_BLINK is not set
342
343#
344# ATA/ATAPI/MFM/RLL support
345#
346# CONFIG_IDE is not set 357# CONFIG_IDE is not set
347 358
348# 359#
@@ -351,34 +362,13 @@ CONFIG_BLK_DEV_LOOP=y
351# CONFIG_RAID_ATTRS is not set 362# CONFIG_RAID_ATTRS is not set
352# CONFIG_SCSI is not set 363# CONFIG_SCSI is not set
353# CONFIG_SCSI_NETLINK is not set 364# CONFIG_SCSI_NETLINK is not set
354
355#
356# Serial ATA (prod) and Parallel ATA (experimental) drivers
357#
358# CONFIG_ATA is not set 365# CONFIG_ATA is not set
359 366
360# 367#
361# Multi-device support (RAID and LVM) 368# Multi-device support (RAID and LVM)
362# 369#
363# CONFIG_MD is not set 370# CONFIG_MD is not set
364 371# CONFIG_MACINTOSH_DRIVERS is not set
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 372
383# 373#
384# Network device support 374# Network device support
@@ -388,10 +378,6 @@ CONFIG_NETDEVICES=y
388# CONFIG_BONDING is not set 378# CONFIG_BONDING is not set
389# CONFIG_EQUALIZER is not set 379# CONFIG_EQUALIZER is not set
390# CONFIG_TUN is not set 380# CONFIG_TUN is not set
391
392#
393# PHY device support
394#
395CONFIG_PHYLIB=y 381CONFIG_PHYLIB=y
396 382
397# 383#
@@ -404,6 +390,7 @@ CONFIG_PHYLIB=y
404# CONFIG_CICADA_PHY is not set 390# CONFIG_CICADA_PHY is not set
405# CONFIG_VITESSE_PHY is not set 391# CONFIG_VITESSE_PHY is not set
406# CONFIG_SMSC_PHY is not set 392# CONFIG_SMSC_PHY is not set
393# CONFIG_BROADCOM_PHY is not set
407CONFIG_FIXED_PHY=y 394CONFIG_FIXED_PHY=y
408CONFIG_FIXED_MII_10_FDX=y 395CONFIG_FIXED_MII_10_FDX=y
409CONFIG_FIXED_MII_100_FDX=y 396CONFIG_FIXED_MII_100_FDX=y
@@ -417,27 +404,14 @@ CONFIG_MII=y
417CONFIG_FS_ENET=y 404CONFIG_FS_ENET=y
418CONFIG_FS_ENET_HAS_SCC=y 405CONFIG_FS_ENET_HAS_SCC=y
419CONFIG_FS_ENET_HAS_FEC=y 406CONFIG_FS_ENET_HAS_FEC=y
407CONFIG_NETDEV_1000=y
408CONFIG_NETDEV_10000=y
420 409
421# 410#
422# Ethernet (1000 Mbit) 411# Wireless LAN
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# 412#
413# CONFIG_WLAN_PRE80211 is not set
414# CONFIG_WLAN_80211 is not set
441# CONFIG_WAN is not set 415# CONFIG_WAN is not set
442# CONFIG_PPP is not set 416# CONFIG_PPP is not set
443# CONFIG_SLIP is not set 417# CONFIG_SLIP is not set
@@ -461,6 +435,7 @@ CONFIG_FS_ENET_HAS_FEC=y
461# 435#
462CONFIG_INPUT=y 436CONFIG_INPUT=y
463# CONFIG_INPUT_FF_MEMLESS is not set 437# CONFIG_INPUT_FF_MEMLESS is not set
438# CONFIG_INPUT_POLLDEV is not set
464 439
465# 440#
466# Userland interfaces 441# Userland interfaces
@@ -486,9 +461,16 @@ CONFIG_KEYBOARD_ATKBD=y
486# CONFIG_KEYBOARD_STOWAWAY is not set 461# CONFIG_KEYBOARD_STOWAWAY is not set
487CONFIG_INPUT_MOUSE=y 462CONFIG_INPUT_MOUSE=y
488CONFIG_MOUSE_PS2=y 463CONFIG_MOUSE_PS2=y
464CONFIG_MOUSE_PS2_ALPS=y
465CONFIG_MOUSE_PS2_LOGIPS2PP=y
466CONFIG_MOUSE_PS2_SYNAPTICS=y
467CONFIG_MOUSE_PS2_LIFEBOOK=y
468CONFIG_MOUSE_PS2_TRACKPOINT=y
469# CONFIG_MOUSE_PS2_TOUCHKIT is not set
489# CONFIG_MOUSE_SERIAL is not set 470# CONFIG_MOUSE_SERIAL is not set
490# CONFIG_MOUSE_VSXXXAA is not set 471# CONFIG_MOUSE_VSXXXAA is not set
491# CONFIG_INPUT_JOYSTICK is not set 472# CONFIG_INPUT_JOYSTICK is not set
473# CONFIG_INPUT_TABLET is not set
492# CONFIG_INPUT_TOUCHSCREEN is not set 474# CONFIG_INPUT_TOUCHSCREEN is not set
493# CONFIG_INPUT_MISC is not set 475# CONFIG_INPUT_MISC is not set
494 476
@@ -516,6 +498,7 @@ CONFIG_SERIO_LIBPS2=y
516# 498#
517# Non-8250 serial port support 499# Non-8250 serial port support
518# 500#
501# CONFIG_SERIAL_UARTLITE is not set
519CONFIG_SERIAL_CORE=y 502CONFIG_SERIAL_CORE=y
520CONFIG_SERIAL_CORE_CONSOLE=y 503CONFIG_SERIAL_CORE_CONSOLE=y
521CONFIG_SERIAL_CPM=y 504CONFIG_SERIAL_CPM=y
@@ -533,31 +516,18 @@ CONFIG_UNIX98_PTYS=y
533# IPMI 516# IPMI
534# 517#
535# CONFIG_IPMI_HANDLER is not set 518# CONFIG_IPMI_HANDLER is not set
536
537#
538# Watchdog Cards
539#
540# CONFIG_WATCHDOG is not set 519# CONFIG_WATCHDOG is not set
541CONFIG_HW_RANDOM=y 520CONFIG_HW_RANDOM=y
542# CONFIG_NVRAM is not set 521# CONFIG_NVRAM is not set
543CONFIG_GEN_RTC=y 522CONFIG_GEN_RTC=y
544# CONFIG_GEN_RTC_X is not set 523# CONFIG_GEN_RTC_X is not set
545# CONFIG_DTLK is not set
546# CONFIG_R3964 is not set 524# CONFIG_R3964 is not set
547
548#
549# Ftape, the floppy tape device driver
550#
551# CONFIG_RAW_DRIVER is not set 525# CONFIG_RAW_DRIVER is not set
552 526
553# 527#
554# TPM devices 528# TPM devices
555# 529#
556# CONFIG_TCG_TPM is not set 530# CONFIG_TCG_TPM is not set
557
558#
559# I2C support
560#
561# CONFIG_I2C is not set 531# CONFIG_I2C is not set
562 532
563# 533#
@@ -570,33 +540,41 @@ CONFIG_GEN_RTC=y
570# Dallas's 1-wire bus 540# Dallas's 1-wire bus
571# 541#
572# CONFIG_W1 is not set 542# CONFIG_W1 is not set
573
574#
575# Hardware Monitoring support
576#
577CONFIG_HWMON=y 543CONFIG_HWMON=y
578# CONFIG_HWMON_VID is not set 544# CONFIG_HWMON_VID is not set
579# CONFIG_SENSORS_ABITUGURU is not set 545# CONFIG_SENSORS_ABITUGURU is not set
580# CONFIG_SENSORS_F71805F is not set 546# CONFIG_SENSORS_F71805F is not set
547# CONFIG_SENSORS_PC87427 is not set
548# CONFIG_SENSORS_SMSC47M1 is not set
549# CONFIG_SENSORS_SMSC47B397 is not set
581# CONFIG_SENSORS_VT1211 is not set 550# CONFIG_SENSORS_VT1211 is not set
551# CONFIG_SENSORS_W83627HF is not set
582# CONFIG_HWMON_DEBUG_CHIP is not set 552# CONFIG_HWMON_DEBUG_CHIP is not set
583 553
584# 554#
555# Multifunction device drivers
556#
557# CONFIG_MFD_SM501 is not set
558
559#
585# Multimedia devices 560# Multimedia devices
586# 561#
587# CONFIG_VIDEO_DEV is not set 562# CONFIG_VIDEO_DEV is not set
563# CONFIG_DVB_CORE is not set
564CONFIG_DAB=y
588 565
589# 566#
590# Digital Video Broadcasting Devices 567# Graphics support
591# 568#
592# CONFIG_DVB is not set 569# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
593 570
594# 571#
595# Graphics support 572# Display device support
596# 573#
597CONFIG_FIRMWARE_EDID=y 574# CONFIG_DISPLAY_SUPPORT is not set
575# CONFIG_VGASTATE is not set
598# CONFIG_FB is not set 576# CONFIG_FB is not set
599# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 577# CONFIG_FB_IBM_GXT4500 is not set
600 578
601# 579#
602# Sound 580# Sound
@@ -604,6 +582,12 @@ CONFIG_FIRMWARE_EDID=y
604# CONFIG_SOUND is not set 582# CONFIG_SOUND is not set
605 583
606# 584#
585# HID Devices
586#
587CONFIG_HID=y
588# CONFIG_HID_DEBUG is not set
589
590#
607# USB support 591# USB support
608# 592#
609# CONFIG_USB_ARCH_HAS_HCD is not set 593# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -618,10 +602,6 @@ CONFIG_FIRMWARE_EDID=y
618# USB Gadget Support 602# USB Gadget Support
619# 603#
620# CONFIG_USB_GADGET is not set 604# CONFIG_USB_GADGET is not set
621
622#
623# MMC/SD Card support
624#
625# CONFIG_MMC is not set 605# CONFIG_MMC is not set
626 606
627# 607#
@@ -752,6 +732,7 @@ CONFIG_LOCKD=y
752CONFIG_LOCKD_V4=y 732CONFIG_LOCKD_V4=y
753CONFIG_NFS_COMMON=y 733CONFIG_NFS_COMMON=y
754CONFIG_SUNRPC=y 734CONFIG_SUNRPC=y
735# CONFIG_SUNRPC_BIND34 is not set
755# CONFIG_RPCSEC_GSS_KRB5 is not set 736# CONFIG_RPCSEC_GSS_KRB5 is not set
756# CONFIG_RPCSEC_GSS_SPKM3 is not set 737# CONFIG_RPCSEC_GSS_SPKM3 is not set
757# CONFIG_SMB_FS is not set 738# CONFIG_SMB_FS is not set
@@ -781,6 +762,7 @@ CONFIG_MSDOS_PARTITION=y
781# CONFIG_SUN_PARTITION is not set 762# CONFIG_SUN_PARTITION is not set
782# CONFIG_KARMA_PARTITION is not set 763# CONFIG_KARMA_PARTITION is not set
783# CONFIG_EFI_PARTITION is not set 764# CONFIG_EFI_PARTITION is not set
765# CONFIG_SYSV68_PARTITION is not set
784 766
785# 767#
786# Native Language Support 768# Native Language Support
@@ -788,14 +770,25 @@ CONFIG_MSDOS_PARTITION=y
788# CONFIG_NLS is not set 770# CONFIG_NLS is not set
789 771
790# 772#
773# Distributed Lock Manager
774#
775# CONFIG_DLM is not set
776# CONFIG_UCC_SLOW is not set
777
778#
791# Library routines 779# Library routines
792# 780#
781CONFIG_BITREVERSE=y
793CONFIG_CRC_CCITT=y 782CONFIG_CRC_CCITT=y
794# CONFIG_CRC16 is not set 783# CONFIG_CRC16 is not set
784# CONFIG_CRC_ITU_T is not set
795CONFIG_CRC32=y 785CONFIG_CRC32=y
796# CONFIG_LIBCRC32C is not set 786# CONFIG_LIBCRC32C is not set
797CONFIG_ZLIB_INFLATE=y 787CONFIG_ZLIB_INFLATE=y
798CONFIG_PLIST=y 788CONFIG_PLIST=y
789CONFIG_HAS_IOMEM=y
790CONFIG_HAS_IOPORT=y
791CONFIG_HAS_DMA=y
799 792
800# 793#
801# Instrumentation Support 794# Instrumentation Support
@@ -809,11 +802,9 @@ CONFIG_PLIST=y
809CONFIG_ENABLE_MUST_CHECK=y 802CONFIG_ENABLE_MUST_CHECK=y
810# CONFIG_MAGIC_SYSRQ is not set 803# CONFIG_MAGIC_SYSRQ is not set
811# CONFIG_UNUSED_SYMBOLS is not set 804# 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 805# CONFIG_DEBUG_FS is not set
815# CONFIG_UNWIND_INFO is not set
816# CONFIG_HEADERS_CHECK is not set 806# CONFIG_HEADERS_CHECK is not set
807# CONFIG_DEBUG_KERNEL is not set
817# CONFIG_BOOTX_TEXT is not set 808# CONFIG_BOOTX_TEXT is not set
818# CONFIG_PPC_EARLY_DEBUG is not set 809# CONFIG_PPC_EARLY_DEBUG is not set
819 810
diff --git a/arch/powerpc/configs/mpc885_ads_defconfig b/arch/powerpc/configs/mpc885_ads_defconfig
index e2c17d8da4..fc4f9b766a 100644
--- a/arch/powerpc/configs/mpc885_ads_defconfig
+++ b/arch/powerpc/configs/mpc885_ads_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.22-rc7
4# Fri Nov 10 21:30:40 2006 4# Sun Jul 1 23:57:01 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y 11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y 12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
13CONFIG_GENERIC_HWEIGHT=y 14CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_CALIBRATE_DELAY=y 15CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y 16CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -28,7 +29,6 @@ CONFIG_AUDIT_ARCH=y
28# Processor support 29# Processor support
29# 30#
30# CONFIG_CLASSIC32 is not set 31# CONFIG_CLASSIC32 is not set
31# CONFIG_PPC_52xx is not set
32# CONFIG_PPC_82xx is not set 32# CONFIG_PPC_82xx is not set
33# CONFIG_PPC_83xx is not set 33# CONFIG_PPC_83xx is not set
34# CONFIG_PPC_85xx is not set 34# CONFIG_PPC_85xx is not set
@@ -38,6 +38,9 @@ CONFIG_PPC_8xx=y
38# CONFIG_44x is not set 38# CONFIG_44x is not set
39# CONFIG_E200 is not set 39# CONFIG_E200 is not set
40CONFIG_8xx=y 40CONFIG_8xx=y
41# CONFIG_PPC_DCR_NATIVE is not set
42# CONFIG_PPC_DCR_MMIO is not set
43# CONFIG_PPC_MM_SLICES is not set
41CONFIG_NOT_COHERENT_CACHE=y 44CONFIG_NOT_COHERENT_CACHE=y
42CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 45CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
43 46
@@ -56,14 +59,17 @@ CONFIG_LOCALVERSION_AUTO=y
56# CONFIG_SWAP is not set 59# CONFIG_SWAP is not set
57CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
58# CONFIG_IPC_NS is not set 61# CONFIG_IPC_NS is not set
62CONFIG_SYSVIPC_SYSCTL=y
59# CONFIG_POSIX_MQUEUE is not set 63# CONFIG_POSIX_MQUEUE is not set
60# CONFIG_BSD_PROCESS_ACCT is not set 64# CONFIG_BSD_PROCESS_ACCT is not set
61# CONFIG_TASKSTATS is not set 65# CONFIG_TASKSTATS is not set
62# CONFIG_UTS_NS is not set 66# CONFIG_UTS_NS is not set
63# CONFIG_AUDIT is not set 67# CONFIG_AUDIT is not set
64# CONFIG_IKCONFIG is not set 68# CONFIG_IKCONFIG is not set
69CONFIG_LOG_BUF_SHIFT=14
70CONFIG_SYSFS_DEPRECATED=y
65# CONFIG_RELAY is not set 71# CONFIG_RELAY is not set
66CONFIG_INITRAMFS_SOURCE="" 72# CONFIG_BLK_DEV_INITRD is not set
67# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 73# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
68CONFIG_SYSCTL=y 74CONFIG_SYSCTL=y
69CONFIG_EMBEDDED=y 75CONFIG_EMBEDDED=y
@@ -76,14 +82,19 @@ CONFIG_PRINTK=y
76CONFIG_ELF_CORE=y 82CONFIG_ELF_CORE=y
77# CONFIG_BASE_FULL is not set 83# CONFIG_BASE_FULL is not set
78CONFIG_FUTEX=y 84CONFIG_FUTEX=y
85CONFIG_ANON_INODES=y
79# CONFIG_EPOLL is not set 86# CONFIG_EPOLL is not set
87CONFIG_SIGNALFD=y
88CONFIG_TIMERFD=y
89CONFIG_EVENTFD=y
80CONFIG_SHMEM=y 90CONFIG_SHMEM=y
81CONFIG_SLAB=y
82# CONFIG_VM_EVENT_COUNTERS is not set 91# CONFIG_VM_EVENT_COUNTERS is not set
92CONFIG_SLAB=y
93# CONFIG_SLUB is not set
94# CONFIG_SLOB is not set
83CONFIG_RT_MUTEXES=y 95CONFIG_RT_MUTEXES=y
84# CONFIG_TINY_SHMEM is not set 96# CONFIG_TINY_SHMEM is not set
85CONFIG_BASE_SMALL=1 97CONFIG_BASE_SMALL=1
86# CONFIG_SLOB is not set
87 98
88# 99#
89# Loadable module support 100# Loadable module support
@@ -110,19 +121,27 @@ CONFIG_DEFAULT_AS=y
110# CONFIG_DEFAULT_CFQ is not set 121# CONFIG_DEFAULT_CFQ is not set
111# CONFIG_DEFAULT_NOOP is not set 122# CONFIG_DEFAULT_NOOP is not set
112CONFIG_DEFAULT_IOSCHED="anticipatory" 123CONFIG_DEFAULT_IOSCHED="anticipatory"
113# CONFIG_WANT_EARLY_SERIAL is not set
114CONFIG_EMBEDDEDBOOT=y
115# CONFIG_MPIC is not set
116 124
117# 125#
118# Platform support 126# Platform support
119# 127#
128# CONFIG_PPC_MPC52xx is not set
129# CONFIG_PPC_MPC5200 is not set
130# CONFIG_PPC_CELL is not set
131# CONFIG_PPC_CELL_NATIVE is not set
120CONFIG_CPM1=y 132CONFIG_CPM1=y
121# CONFIG_MPC8XXFADS is not set 133# CONFIG_MPC8XXFADS is not set
122# CONFIG_MPC86XADS is not set 134# CONFIG_MPC86XADS is not set
123CONFIG_MPC885ADS=y 135CONFIG_MPC885ADS=y
124 136
125# 137#
138# Freescale Ethernet driver platform-specific options
139#
140CONFIG_MPC8xx_SECOND_ETH=y
141CONFIG_MPC8xx_SECOND_ETH_FEC2=y
142# CONFIG_MPC8xx_SECOND_ETH_SCC3 is not set
143
144#
126# MPC8xx CPM Options 145# MPC8xx CPM Options
127# 146#
128 147
@@ -135,6 +154,18 @@ CONFIG_NO_UCODE_PATCH=y
135# CONFIG_USB_SOF_UCODE_PATCH is not set 154# CONFIG_USB_SOF_UCODE_PATCH is not set
136# CONFIG_I2C_SPI_UCODE_PATCH is not set 155# CONFIG_I2C_SPI_UCODE_PATCH is not set
137# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set 156# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set
157# CONFIG_PQ2ADS is not set
158# CONFIG_MPIC is not set
159# CONFIG_MPIC_WEIRD is not set
160# CONFIG_PPC_I8259 is not set
161# CONFIG_PPC_RTAS is not set
162# CONFIG_MMIO_NVRAM is not set
163# CONFIG_PPC_MPC106 is not set
164# CONFIG_PPC_970_NAP is not set
165# CONFIG_PPC_INDIRECT_IO is not set
166# CONFIG_GENERIC_IOMAP is not set
167# CONFIG_CPU_FREQ is not set
168# CONFIG_CPM2 is not set
138 169
139# 170#
140# Kernel options 171# Kernel options
@@ -142,6 +173,7 @@ CONFIG_NO_UCODE_PATCH=y
142# CONFIG_HIGHMEM is not set 173# CONFIG_HIGHMEM is not set
143# CONFIG_HZ_100 is not set 174# CONFIG_HZ_100 is not set
144# CONFIG_HZ_250 is not set 175# CONFIG_HZ_250 is not set
176# CONFIG_HZ_300 is not set
145CONFIG_HZ_1000=y 177CONFIG_HZ_1000=y
146CONFIG_HZ=1000 178CONFIG_HZ=1000
147CONFIG_PREEMPT_NONE=y 179CONFIG_PREEMPT_NONE=y
@@ -162,31 +194,29 @@ CONFIG_FLAT_NODE_MEM_MAP=y
162# CONFIG_SPARSEMEM_STATIC is not set 194# CONFIG_SPARSEMEM_STATIC is not set
163CONFIG_SPLIT_PTLOCK_CPUS=4 195CONFIG_SPLIT_PTLOCK_CPUS=4
164# CONFIG_RESOURCES_64BIT is not set 196# CONFIG_RESOURCES_64BIT is not set
197CONFIG_ZONE_DMA_FLAG=1
165# CONFIG_PROC_DEVICETREE is not set 198# CONFIG_PROC_DEVICETREE is not set
166# CONFIG_CMDLINE_BOOL is not set 199# CONFIG_CMDLINE_BOOL is not set
167# CONFIG_PM is not set 200# CONFIG_PM is not set
168# CONFIG_SECCOMP is not set 201# CONFIG_SECCOMP is not set
202# CONFIG_WANT_DEVICE_TREE is not set
169CONFIG_ISA_DMA_API=y 203CONFIG_ISA_DMA_API=y
170 204
171# 205#
172# Bus options 206# Bus options
173# 207#
174# CONFIG_MPIC_WEIRD is not set 208CONFIG_ZONE_DMA=y
175# CONFIG_PPC_I8259 is not set
176CONFIG_FSL_SOC=y 209CONFIG_FSL_SOC=y
177# CONFIG_PCI is not set 210# CONFIG_PCI is not set
178# CONFIG_PCI_DOMAINS is not set 211# CONFIG_PCI_DOMAINS is not set
179# CONFIG_PCI_QSPAN is not set 212# CONFIG_PCI_QSPAN is not set
213# CONFIG_ARCH_SUPPORTS_MSI is not set
180 214
181# 215#
182# PCCARD (PCMCIA/CardBus) support 216# PCCARD (PCMCIA/CardBus) support
183# 217#
184 218
185# 219#
186# PCI Hotplug Support
187#
188
189#
190# Advanced setup 220# Advanced setup
191# 221#
192# CONFIG_ADVANCED_OPTIONS is not set 222# CONFIG_ADVANCED_OPTIONS is not set
@@ -210,13 +240,13 @@ CONFIG_NET=y
210# 240#
211# Networking options 241# Networking options
212# 242#
213# CONFIG_NETDEBUG is not set
214CONFIG_PACKET=y 243CONFIG_PACKET=y
215# CONFIG_PACKET_MMAP is not set 244# CONFIG_PACKET_MMAP is not set
216CONFIG_UNIX=y 245CONFIG_UNIX=y
217CONFIG_XFRM=y 246CONFIG_XFRM=y
218# CONFIG_XFRM_USER is not set 247# CONFIG_XFRM_USER is not set
219# CONFIG_XFRM_SUB_POLICY is not set 248# CONFIG_XFRM_SUB_POLICY is not set
249# CONFIG_XFRM_MIGRATE is not set
220# CONFIG_NET_KEY is not set 250# CONFIG_NET_KEY is not set
221CONFIG_INET=y 251CONFIG_INET=y
222CONFIG_IP_MULTICAST=y 252CONFIG_IP_MULTICAST=y
@@ -244,25 +274,14 @@ CONFIG_INET_TCP_DIAG=y
244# CONFIG_TCP_CONG_ADVANCED is not set 274# CONFIG_TCP_CONG_ADVANCED is not set
245CONFIG_TCP_CONG_CUBIC=y 275CONFIG_TCP_CONG_CUBIC=y
246CONFIG_DEFAULT_TCP_CONG="cubic" 276CONFIG_DEFAULT_TCP_CONG="cubic"
277# CONFIG_TCP_MD5SIG is not set
247# CONFIG_IPV6 is not set 278# CONFIG_IPV6 is not set
248# CONFIG_INET6_XFRM_TUNNEL is not set 279# CONFIG_INET6_XFRM_TUNNEL is not set
249# CONFIG_INET6_TUNNEL is not set 280# CONFIG_INET6_TUNNEL is not set
250# CONFIG_NETWORK_SECMARK is not set 281# CONFIG_NETWORK_SECMARK is not set
251# CONFIG_NETFILTER is not set 282# CONFIG_NETFILTER is not set
252
253#
254# DCCP Configuration (EXPERIMENTAL)
255#
256# CONFIG_IP_DCCP is not set 283# CONFIG_IP_DCCP is not set
257
258#
259# SCTP Configuration (EXPERIMENTAL)
260#
261# CONFIG_IP_SCTP is not set 284# CONFIG_IP_SCTP is not set
262
263#
264# TIPC Configuration (EXPERIMENTAL)
265#
266# CONFIG_TIPC is not set 285# CONFIG_TIPC is not set
267# CONFIG_ATM is not set 286# CONFIG_ATM is not set
268# CONFIG_BRIDGE is not set 287# CONFIG_BRIDGE is not set
@@ -288,7 +307,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
288# CONFIG_HAMRADIO is not set 307# CONFIG_HAMRADIO is not set
289# CONFIG_IRDA is not set 308# CONFIG_IRDA is not set
290# CONFIG_BT is not set 309# CONFIG_BT is not set
310# CONFIG_AF_RXRPC is not set
311
312#
313# Wireless
314#
315# CONFIG_CFG80211 is not set
316# CONFIG_WIRELESS_EXT is not set
317# CONFIG_MAC80211 is not set
291# CONFIG_IEEE80211 is not set 318# CONFIG_IEEE80211 is not set
319# CONFIG_RFKILL is not set
292 320
293# 321#
294# Device Drivers 322# Device Drivers
@@ -305,10 +333,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
305# Connector - unified userspace <-> kernelspace linker 333# Connector - unified userspace <-> kernelspace linker
306# 334#
307# CONFIG_CONNECTOR is not set 335# CONFIG_CONNECTOR is not set
308
309#
310# Memory Technology Devices (MTD)
311#
312# CONFIG_MTD is not set 336# CONFIG_MTD is not set
313 337
314# 338#
@@ -319,6 +343,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
319# 343#
320# Plug and Play support 344# Plug and Play support
321# 345#
346# CONFIG_PNPACPI is not set
322 347
323# 348#
324# Block devices 349# Block devices
@@ -329,18 +354,13 @@ CONFIG_BLK_DEV_LOOP=y
329# CONFIG_BLK_DEV_CRYPTOLOOP is not set 354# CONFIG_BLK_DEV_CRYPTOLOOP is not set
330# CONFIG_BLK_DEV_NBD is not set 355# CONFIG_BLK_DEV_NBD is not set
331# CONFIG_BLK_DEV_RAM is not set 356# CONFIG_BLK_DEV_RAM is not set
332# CONFIG_BLK_DEV_INITRD is not set
333# CONFIG_CDROM_PKTCDVD is not set 357# CONFIG_CDROM_PKTCDVD is not set
334# CONFIG_ATA_OVER_ETH is not set 358# CONFIG_ATA_OVER_ETH is not set
335 359
336# 360#
337# Misc devices 361# Misc devices
338# 362#
339# CONFIG_TIFM_CORE is not set 363# CONFIG_BLINK is not set
340
341#
342# ATA/ATAPI/MFM/RLL support
343#
344# CONFIG_IDE is not set 364# CONFIG_IDE is not set
345 365
346# 366#
@@ -349,34 +369,13 @@ CONFIG_BLK_DEV_LOOP=y
349# CONFIG_RAID_ATTRS is not set 369# CONFIG_RAID_ATTRS is not set
350# CONFIG_SCSI is not set 370# CONFIG_SCSI is not set
351# CONFIG_SCSI_NETLINK is not set 371# CONFIG_SCSI_NETLINK is not set
352
353#
354# Serial ATA (prod) and Parallel ATA (experimental) drivers
355#
356# CONFIG_ATA is not set 372# CONFIG_ATA is not set
357 373
358# 374#
359# Multi-device support (RAID and LVM) 375# Multi-device support (RAID and LVM)
360# 376#
361# CONFIG_MD is not set 377# CONFIG_MD is not set
362 378# CONFIG_MACINTOSH_DRIVERS is not set
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 379
381# 380#
382# Network device support 381# Network device support
@@ -386,10 +385,6 @@ CONFIG_NETDEVICES=y
386# CONFIG_BONDING is not set 385# CONFIG_BONDING is not set
387# CONFIG_EQUALIZER is not set 386# CONFIG_EQUALIZER is not set
388# CONFIG_TUN is not set 387# CONFIG_TUN is not set
389
390#
391# PHY device support
392#
393CONFIG_PHYLIB=y 388CONFIG_PHYLIB=y
394 389
395# 390#
@@ -402,6 +397,7 @@ CONFIG_DAVICOM_PHY=y
402# CONFIG_CICADA_PHY is not set 397# CONFIG_CICADA_PHY is not set
403# CONFIG_VITESSE_PHY is not set 398# CONFIG_VITESSE_PHY is not set
404# CONFIG_SMSC_PHY is not set 399# CONFIG_SMSC_PHY is not set
400# CONFIG_BROADCOM_PHY is not set
405CONFIG_FIXED_PHY=y 401CONFIG_FIXED_PHY=y
406CONFIG_FIXED_MII_10_FDX=y 402CONFIG_FIXED_MII_10_FDX=y
407# CONFIG_FIXED_MII_100_FDX is not set 403# CONFIG_FIXED_MII_100_FDX is not set
@@ -415,27 +411,14 @@ CONFIG_MII=y
415CONFIG_FS_ENET=y 411CONFIG_FS_ENET=y
416CONFIG_FS_ENET_HAS_SCC=y 412CONFIG_FS_ENET_HAS_SCC=y
417CONFIG_FS_ENET_HAS_FEC=y 413CONFIG_FS_ENET_HAS_FEC=y
414CONFIG_NETDEV_1000=y
415CONFIG_NETDEV_10000=y
418 416
419# 417#
420# Ethernet (1000 Mbit) 418# Wireless LAN
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# 419#
420# CONFIG_WLAN_PRE80211 is not set
421# CONFIG_WLAN_80211 is not set
439# CONFIG_WAN is not set 422# CONFIG_WAN is not set
440# CONFIG_PPP is not set 423# CONFIG_PPP is not set
441# CONFIG_SLIP is not set 424# CONFIG_SLIP is not set
@@ -459,6 +442,7 @@ CONFIG_FS_ENET_HAS_FEC=y
459# 442#
460CONFIG_INPUT=y 443CONFIG_INPUT=y
461# CONFIG_INPUT_FF_MEMLESS is not set 444# CONFIG_INPUT_FF_MEMLESS is not set
445# CONFIG_INPUT_POLLDEV is not set
462 446
463# 447#
464# Userland interfaces 448# Userland interfaces
@@ -484,9 +468,16 @@ CONFIG_KEYBOARD_ATKBD=y
484# CONFIG_KEYBOARD_STOWAWAY is not set 468# CONFIG_KEYBOARD_STOWAWAY is not set
485CONFIG_INPUT_MOUSE=y 469CONFIG_INPUT_MOUSE=y
486CONFIG_MOUSE_PS2=y 470CONFIG_MOUSE_PS2=y
471CONFIG_MOUSE_PS2_ALPS=y
472CONFIG_MOUSE_PS2_LOGIPS2PP=y
473CONFIG_MOUSE_PS2_SYNAPTICS=y
474CONFIG_MOUSE_PS2_LIFEBOOK=y
475CONFIG_MOUSE_PS2_TRACKPOINT=y
476# CONFIG_MOUSE_PS2_TOUCHKIT is not set
487# CONFIG_MOUSE_SERIAL is not set 477# CONFIG_MOUSE_SERIAL is not set
488# CONFIG_MOUSE_VSXXXAA is not set 478# CONFIG_MOUSE_VSXXXAA is not set
489# CONFIG_INPUT_JOYSTICK is not set 479# CONFIG_INPUT_JOYSTICK is not set
480# CONFIG_INPUT_TABLET is not set
490# CONFIG_INPUT_TOUCHSCREEN is not set 481# CONFIG_INPUT_TOUCHSCREEN is not set
491# CONFIG_INPUT_MISC is not set 482# CONFIG_INPUT_MISC is not set
492 483
@@ -514,6 +505,7 @@ CONFIG_SERIO_LIBPS2=y
514# 505#
515# Non-8250 serial port support 506# Non-8250 serial port support
516# 507#
508# CONFIG_SERIAL_UARTLITE is not set
517CONFIG_SERIAL_CORE=y 509CONFIG_SERIAL_CORE=y
518CONFIG_SERIAL_CORE_CONSOLE=y 510CONFIG_SERIAL_CORE_CONSOLE=y
519CONFIG_SERIAL_CPM=y 511CONFIG_SERIAL_CPM=y
@@ -531,31 +523,18 @@ CONFIG_UNIX98_PTYS=y
531# IPMI 523# IPMI
532# 524#
533# CONFIG_IPMI_HANDLER is not set 525# CONFIG_IPMI_HANDLER is not set
534
535#
536# Watchdog Cards
537#
538# CONFIG_WATCHDOG is not set 526# CONFIG_WATCHDOG is not set
539CONFIG_HW_RANDOM=y 527CONFIG_HW_RANDOM=y
540# CONFIG_NVRAM is not set 528# CONFIG_NVRAM is not set
541CONFIG_GEN_RTC=y 529CONFIG_GEN_RTC=y
542# CONFIG_GEN_RTC_X is not set 530# CONFIG_GEN_RTC_X is not set
543# CONFIG_DTLK is not set
544# CONFIG_R3964 is not set 531# CONFIG_R3964 is not set
545
546#
547# Ftape, the floppy tape device driver
548#
549# CONFIG_RAW_DRIVER is not set 532# CONFIG_RAW_DRIVER is not set
550 533
551# 534#
552# TPM devices 535# TPM devices
553# 536#
554# CONFIG_TCG_TPM is not set 537# CONFIG_TCG_TPM is not set
555
556#
557# I2C support
558#
559# CONFIG_I2C is not set 538# CONFIG_I2C is not set
560 539
561# 540#
@@ -568,33 +547,41 @@ CONFIG_GEN_RTC=y
568# Dallas's 1-wire bus 547# Dallas's 1-wire bus
569# 548#
570# CONFIG_W1 is not set 549# CONFIG_W1 is not set
571
572#
573# Hardware Monitoring support
574#
575CONFIG_HWMON=y 550CONFIG_HWMON=y
576# CONFIG_HWMON_VID is not set 551# CONFIG_HWMON_VID is not set
577# CONFIG_SENSORS_ABITUGURU is not set 552# CONFIG_SENSORS_ABITUGURU is not set
578# CONFIG_SENSORS_F71805F is not set 553# CONFIG_SENSORS_F71805F is not set
554# CONFIG_SENSORS_PC87427 is not set
555# CONFIG_SENSORS_SMSC47M1 is not set
556# CONFIG_SENSORS_SMSC47B397 is not set
579# CONFIG_SENSORS_VT1211 is not set 557# CONFIG_SENSORS_VT1211 is not set
558# CONFIG_SENSORS_W83627HF is not set
580# CONFIG_HWMON_DEBUG_CHIP is not set 559# CONFIG_HWMON_DEBUG_CHIP is not set
581 560
582# 561#
562# Multifunction device drivers
563#
564# CONFIG_MFD_SM501 is not set
565
566#
583# Multimedia devices 567# Multimedia devices
584# 568#
585# CONFIG_VIDEO_DEV is not set 569# CONFIG_VIDEO_DEV is not set
570# CONFIG_DVB_CORE is not set
571CONFIG_DAB=y
586 572
587# 573#
588# Digital Video Broadcasting Devices 574# Graphics support
589# 575#
590# CONFIG_DVB is not set 576# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
591 577
592# 578#
593# Graphics support 579# Display device support
594# 580#
595CONFIG_FIRMWARE_EDID=y 581# CONFIG_DISPLAY_SUPPORT is not set
582# CONFIG_VGASTATE is not set
596# CONFIG_FB is not set 583# CONFIG_FB is not set
597# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 584# CONFIG_FB_IBM_GXT4500 is not set
598 585
599# 586#
600# Sound 587# Sound
@@ -602,6 +589,12 @@ CONFIG_FIRMWARE_EDID=y
602# CONFIG_SOUND is not set 589# CONFIG_SOUND is not set
603 590
604# 591#
592# HID Devices
593#
594CONFIG_HID=y
595# CONFIG_HID_DEBUG is not set
596
597#
605# USB support 598# USB support
606# 599#
607# CONFIG_USB_ARCH_HAS_HCD is not set 600# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -616,10 +609,6 @@ CONFIG_FIRMWARE_EDID=y
616# USB Gadget Support 609# USB Gadget Support
617# 610#
618# CONFIG_USB_GADGET is not set 611# CONFIG_USB_GADGET is not set
619
620#
621# MMC/SD Card support
622#
623# CONFIG_MMC is not set 612# CONFIG_MMC is not set
624 613
625# 614#
@@ -750,6 +739,7 @@ CONFIG_LOCKD=y
750CONFIG_LOCKD_V4=y 739CONFIG_LOCKD_V4=y
751CONFIG_NFS_COMMON=y 740CONFIG_NFS_COMMON=y
752CONFIG_SUNRPC=y 741CONFIG_SUNRPC=y
742# CONFIG_SUNRPC_BIND34 is not set
753# CONFIG_RPCSEC_GSS_KRB5 is not set 743# CONFIG_RPCSEC_GSS_KRB5 is not set
754# CONFIG_RPCSEC_GSS_SPKM3 is not set 744# CONFIG_RPCSEC_GSS_SPKM3 is not set
755# CONFIG_SMB_FS is not set 745# CONFIG_SMB_FS is not set
@@ -779,6 +769,7 @@ CONFIG_MSDOS_PARTITION=y
779# CONFIG_SUN_PARTITION is not set 769# CONFIG_SUN_PARTITION is not set
780# CONFIG_KARMA_PARTITION is not set 770# CONFIG_KARMA_PARTITION is not set
781# CONFIG_EFI_PARTITION is not set 771# CONFIG_EFI_PARTITION is not set
772# CONFIG_SYSV68_PARTITION is not set
782 773
783# 774#
784# Native Language Support 775# Native Language Support
@@ -786,14 +777,25 @@ CONFIG_MSDOS_PARTITION=y
786# CONFIG_NLS is not set 777# CONFIG_NLS is not set
787 778
788# 779#
780# Distributed Lock Manager
781#
782# CONFIG_DLM is not set
783# CONFIG_UCC_SLOW is not set
784
785#
789# Library routines 786# Library routines
790# 787#
788CONFIG_BITREVERSE=y
791CONFIG_CRC_CCITT=y 789CONFIG_CRC_CCITT=y
792# CONFIG_CRC16 is not set 790# CONFIG_CRC16 is not set
791# CONFIG_CRC_ITU_T is not set
793CONFIG_CRC32=y 792CONFIG_CRC32=y
794# CONFIG_LIBCRC32C is not set 793# CONFIG_LIBCRC32C is not set
795CONFIG_ZLIB_INFLATE=y 794CONFIG_ZLIB_INFLATE=y
796CONFIG_PLIST=y 795CONFIG_PLIST=y
796CONFIG_HAS_IOMEM=y
797CONFIG_HAS_IOPORT=y
798CONFIG_HAS_DMA=y
797 799
798# 800#
799# Instrumentation Support 801# Instrumentation Support
@@ -807,11 +809,9 @@ CONFIG_PLIST=y
807CONFIG_ENABLE_MUST_CHECK=y 809CONFIG_ENABLE_MUST_CHECK=y
808# CONFIG_MAGIC_SYSRQ is not set 810# CONFIG_MAGIC_SYSRQ is not set
809# CONFIG_UNUSED_SYMBOLS is not set 811# 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 812# CONFIG_DEBUG_FS is not set
813# CONFIG_UNWIND_INFO is not set
814# CONFIG_HEADERS_CHECK is not set 813# CONFIG_HEADERS_CHECK is not set
814# CONFIG_DEBUG_KERNEL is not set
815# CONFIG_BOOTX_TEXT is not set 815# CONFIG_BOOTX_TEXT is not set
816# CONFIG_PPC_EARLY_DEBUG is not set 816# CONFIG_PPC_EARLY_DEBUG is not set
817 817
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig
index 0507c8f7bf..905998b925 100644
--- a/arch/powerpc/configs/pasemi_defconfig
+++ b/arch/powerpc/configs/pasemi_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.21 3# Linux kernel version: 2.6.22-rc6
4# Mon May 14 12:55:04 2007 4# Tue Jun 26 13:51:39 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -295,20 +295,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
295# CONFIG_INET6_TUNNEL is not set 295# CONFIG_INET6_TUNNEL is not set
296# CONFIG_NETWORK_SECMARK is not set 296# CONFIG_NETWORK_SECMARK is not set
297# CONFIG_NETFILTER is not set 297# CONFIG_NETFILTER is not set
298
299#
300# DCCP Configuration (EXPERIMENTAL)
301#
302# CONFIG_IP_DCCP is not set 298# CONFIG_IP_DCCP is not set
303
304#
305# SCTP Configuration (EXPERIMENTAL)
306#
307# CONFIG_IP_SCTP is not set 299# CONFIG_IP_SCTP is not set
308
309#
310# TIPC Configuration (EXPERIMENTAL)
311#
312# CONFIG_TIPC is not set 300# CONFIG_TIPC is not set
313# CONFIG_ATM is not set 301# CONFIG_ATM is not set
314# CONFIG_BRIDGE is not set 302# CONFIG_BRIDGE is not set
@@ -466,10 +454,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
466# CONFIG_SGI_IOC4 is not set 454# CONFIG_SGI_IOC4 is not set
467# CONFIG_TIFM_CORE is not set 455# CONFIG_TIFM_CORE is not set
468# CONFIG_BLINK is not set 456# CONFIG_BLINK is not set
469
470#
471# ATA/ATAPI/MFM/RLL support
472#
473CONFIG_IDE=y 457CONFIG_IDE=y
474CONFIG_BLK_DEV_IDE=y 458CONFIG_BLK_DEV_IDE=y
475 459
@@ -571,7 +555,6 @@ CONFIG_SCSI_3W_9XXX=y
571# CONFIG_SCSI_DC395x is not set 555# CONFIG_SCSI_DC395x is not set
572# CONFIG_SCSI_DC390T is not set 556# CONFIG_SCSI_DC390T is not set
573# CONFIG_SCSI_DEBUG is not set 557# CONFIG_SCSI_DEBUG is not set
574# CONFIG_SCSI_ESP_CORE is not set
575# CONFIG_SCSI_SRP is not set 558# CONFIG_SCSI_SRP is not set
576 559
577# 560#
@@ -580,10 +563,6 @@ CONFIG_SCSI_3W_9XXX=y
580# CONFIG_PCMCIA_FDOMAIN is not set 563# CONFIG_PCMCIA_FDOMAIN is not set
581# CONFIG_PCMCIA_QLOGIC is not set 564# CONFIG_PCMCIA_QLOGIC is not set
582# CONFIG_PCMCIA_SYM53C500 is not set 565# CONFIG_PCMCIA_SYM53C500 is not set
583
584#
585# Serial ATA (prod) and Parallel ATA (experimental) drivers
586#
587CONFIG_ATA=y 566CONFIG_ATA=y
588# CONFIG_ATA_NONSTANDARD is not set 567# CONFIG_ATA_NONSTANDARD is not set
589# CONFIG_SATA_AHCI is not set 568# CONFIG_SATA_AHCI is not set
@@ -694,15 +673,7 @@ CONFIG_DUMMY=y
694# CONFIG_BONDING is not set 673# CONFIG_BONDING is not set
695# CONFIG_EQUALIZER is not set 674# CONFIG_EQUALIZER is not set
696# CONFIG_TUN is not set 675# CONFIG_TUN is not set
697
698#
699# ARCnet devices
700#
701# CONFIG_ARCNET is not set 676# CONFIG_ARCNET is not set
702
703#
704# PHY device support
705#
706CONFIG_PHYLIB=y 677CONFIG_PHYLIB=y
707 678
708# 679#
@@ -752,10 +723,7 @@ CONFIG_NET_PCI=y
752# CONFIG_SUNDANCE is not set 723# CONFIG_SUNDANCE is not set
753# CONFIG_VIA_RHINE is not set 724# CONFIG_VIA_RHINE is not set
754# CONFIG_SC92031 is not set 725# CONFIG_SC92031 is not set
755 726CONFIG_NETDEV_1000=y
756#
757# Ethernet (1000 Mbit)
758#
759# CONFIG_ACENIC is not set 727# CONFIG_ACENIC is not set
760# CONFIG_DL2K is not set 728# CONFIG_DL2K is not set
761CONFIG_E1000=y 729CONFIG_E1000=y
@@ -774,10 +742,7 @@ CONFIG_TIGON3=y
774# CONFIG_BNX2 is not set 742# CONFIG_BNX2 is not set
775# CONFIG_QLA3XXX is not set 743# CONFIG_QLA3XXX is not set
776# CONFIG_ATL1 is not set 744# CONFIG_ATL1 is not set
777 745CONFIG_NETDEV_10000=y
778#
779# Ethernet (10000 Mbit)
780#
781# CONFIG_CHELSIO_T1 is not set 746# CONFIG_CHELSIO_T1 is not set
782# CONFIG_CHELSIO_T3 is not set 747# CONFIG_CHELSIO_T3 is not set
783# CONFIG_IXGB is not set 748# CONFIG_IXGB is not set
@@ -786,11 +751,6 @@ CONFIG_TIGON3=y
786# CONFIG_NETXEN_NIC is not set 751# CONFIG_NETXEN_NIC is not set
787CONFIG_PASEMI_MAC=y 752CONFIG_PASEMI_MAC=y
788# CONFIG_MLX4_CORE is not set 753# CONFIG_MLX4_CORE is not set
789CONFIG_MLX4_DEBUG=y
790
791#
792# Token Ring devices
793#
794# CONFIG_TR is not set 754# CONFIG_TR is not set
795 755
796# 756#
@@ -808,15 +768,7 @@ CONFIG_MLX4_DEBUG=y
808# CONFIG_USB_RTL8150 is not set 768# CONFIG_USB_RTL8150 is not set
809# CONFIG_USB_USBNET_MII is not set 769# CONFIG_USB_USBNET_MII is not set
810# CONFIG_USB_USBNET is not set 770# CONFIG_USB_USBNET is not set
811
812#
813# PCMCIA network device support
814#
815# CONFIG_NET_PCMCIA is not set 771# CONFIG_NET_PCMCIA is not set
816
817#
818# Wan interfaces
819#
820# CONFIG_WAN is not set 772# CONFIG_WAN is not set
821# CONFIG_FDDI is not set 773# CONFIG_FDDI is not set
822# CONFIG_HIPPI is not set 774# CONFIG_HIPPI is not set
@@ -843,6 +795,7 @@ CONFIG_MLX4_DEBUG=y
843# 795#
844CONFIG_INPUT=y 796CONFIG_INPUT=y
845# CONFIG_INPUT_FF_MEMLESS is not set 797# CONFIG_INPUT_FF_MEMLESS is not set
798# CONFIG_INPUT_POLLDEV is not set
846 799
847# 800#
848# Userland interfaces 801# Userland interfaces
@@ -1661,7 +1614,6 @@ CONFIG_NLS_ISO8859_1=y
1661# 1614#
1662# CONFIG_DLM is not set 1615# CONFIG_DLM is not set
1663# CONFIG_UCC_SLOW is not set 1616# CONFIG_UCC_SLOW is not set
1664# CONFIG_UCC_FAST is not set
1665 1617
1666# 1618#
1667# Library routines 1619# Library routines
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
index f611df480f..0d8ba623e2 100644
--- a/arch/powerpc/configs/pmac32_defconfig
+++ b/arch/powerpc/configs/pmac32_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-rc5 3# Linux kernel version: 2.6.22-rc6
4# Mon Jan 22 22:28:56 2007 4# Tue Jun 26 14:11:36 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC_PM_NEEDS_RTC_LIB=y
7CONFIG_PPC32=y 8CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 9CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 10CONFIG_MMU=y
@@ -24,6 +25,7 @@ CONFIG_PPC_OF=y
24# CONFIG_GENERIC_TBSYNC is not set 25# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y 26CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y 27CONFIG_GENERIC_BUG=y
28CONFIG_SYS_SUPPORTS_APM_EMULATION=y
27# CONFIG_DEFAULT_UIMAGE is not set 29# CONFIG_DEFAULT_UIMAGE is not set
28 30
29# 31#
@@ -34,9 +36,9 @@ CONFIG_CLASSIC32=y
34# CONFIG_PPC_83xx is not set 36# CONFIG_PPC_83xx is not set
35# CONFIG_PPC_85xx is not set 37# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set 38# CONFIG_PPC_86xx is not set
39# CONFIG_PPC_8xx is not set
37# CONFIG_40x is not set 40# CONFIG_40x is not set
38# CONFIG_44x is not set 41# CONFIG_44x is not set
39# CONFIG_8xx is not set
40# CONFIG_E200 is not set 42# CONFIG_E200 is not set
41CONFIG_6xx=y 43CONFIG_6xx=y
42CONFIG_PPC_FPU=y 44CONFIG_PPC_FPU=y
@@ -45,6 +47,7 @@ CONFIG_PPC_FPU=y
45CONFIG_ALTIVEC=y 47CONFIG_ALTIVEC=y
46CONFIG_PPC_STD_MMU=y 48CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y 49CONFIG_PPC_STD_MMU_32=y
50# CONFIG_PPC_MM_SLICES is not set
48# CONFIG_SMP is not set 51# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 52CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50 53
@@ -63,6 +66,7 @@ CONFIG_LOCALVERSION=""
63CONFIG_SWAP=y 66CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 67CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set 68# CONFIG_IPC_NS is not set
69CONFIG_SYSVIPC_SYSCTL=y
66CONFIG_POSIX_MQUEUE=y 70CONFIG_POSIX_MQUEUE=y
67# CONFIG_BSD_PROCESS_ACCT is not set 71# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 72# CONFIG_TASKSTATS is not set
@@ -70,8 +74,10 @@ CONFIG_POSIX_MQUEUE=y
70# CONFIG_AUDIT is not set 74# CONFIG_AUDIT is not set
71CONFIG_IKCONFIG=y 75CONFIG_IKCONFIG=y
72CONFIG_IKCONFIG_PROC=y 76CONFIG_IKCONFIG_PROC=y
77CONFIG_LOG_BUF_SHIFT=14
73CONFIG_SYSFS_DEPRECATED=y 78CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set 79# CONFIG_RELAY is not set
80CONFIG_BLK_DEV_INITRD=y
75CONFIG_INITRAMFS_SOURCE="" 81CONFIG_INITRAMFS_SOURCE=""
76# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 82# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
77CONFIG_SYSCTL=y 83CONFIG_SYSCTL=y
@@ -86,14 +92,19 @@ CONFIG_BUG=y
86CONFIG_ELF_CORE=y 92CONFIG_ELF_CORE=y
87CONFIG_BASE_FULL=y 93CONFIG_BASE_FULL=y
88CONFIG_FUTEX=y 94CONFIG_FUTEX=y
95CONFIG_ANON_INODES=y
89CONFIG_EPOLL=y 96CONFIG_EPOLL=y
97CONFIG_SIGNALFD=y
98CONFIG_TIMERFD=y
99CONFIG_EVENTFD=y
90CONFIG_SHMEM=y 100CONFIG_SHMEM=y
91CONFIG_SLAB=y
92CONFIG_VM_EVENT_COUNTERS=y 101CONFIG_VM_EVENT_COUNTERS=y
102CONFIG_SLAB=y
103# CONFIG_SLUB is not set
104# CONFIG_SLOB is not set
93CONFIG_RT_MUTEXES=y 105CONFIG_RT_MUTEXES=y
94# CONFIG_TINY_SHMEM is not set 106# CONFIG_TINY_SHMEM is not set
95CONFIG_BASE_SMALL=0 107CONFIG_BASE_SMALL=0
96# CONFIG_SLOB is not set
97 108
98# 109#
99# Loadable module support 110# Loadable module support
@@ -134,12 +145,17 @@ CONFIG_PPC_MULTIPLATFORM=y
134# CONFIG_APUS is not set 145# CONFIG_APUS is not set
135# CONFIG_PPC_CHRP is not set 146# CONFIG_PPC_CHRP is not set
136# CONFIG_PPC_MPC52xx is not set 147# CONFIG_PPC_MPC52xx is not set
148# CONFIG_PPC_MPC5200 is not set
137# CONFIG_PPC_EFIKA is not set 149# CONFIG_PPC_EFIKA is not set
138# CONFIG_PPC_LITE5200 is not set 150# CONFIG_PPC_LITE5200 is not set
139CONFIG_PPC_PMAC=y 151CONFIG_PPC_PMAC=y
140# CONFIG_PPC_CELL is not set 152# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set 153# CONFIG_PPC_CELL_NATIVE is not set
154# CONFIG_PQ2ADS is not set
142CONFIG_PPC_NATIVE=y 155CONFIG_PPC_NATIVE=y
156CONFIG_MPIC=y
157# CONFIG_MPIC_WEIRD is not set
158# CONFIG_PPC_I8259 is not set
143# CONFIG_PPC_RTAS is not set 159# CONFIG_PPC_RTAS is not set
144# CONFIG_MMIO_NVRAM is not set 160# CONFIG_MMIO_NVRAM is not set
145CONFIG_PPC_MPC106=y 161CONFIG_PPC_MPC106=y
@@ -158,11 +174,14 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y
158CONFIG_CPU_FREQ_GOV_USERSPACE=y 174CONFIG_CPU_FREQ_GOV_USERSPACE=y
159# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set 175# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
160# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set 176# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
177
178#
179# CPU Frequency drivers
180#
161CONFIG_CPU_FREQ_PMAC=y 181CONFIG_CPU_FREQ_PMAC=y
162CONFIG_PPC601_SYNC_FIX=y 182CONFIG_PPC601_SYNC_FIX=y
163# CONFIG_TAU is not set 183# CONFIG_TAU is not set
164# CONFIG_WANT_EARLY_SERIAL is not set 184# CONFIG_CPM2 is not set
165CONFIG_MPIC=y
166 185
167# 186#
168# Kernel options 187# Kernel options
@@ -191,6 +210,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
191# CONFIG_SPARSEMEM_STATIC is not set 210# CONFIG_SPARSEMEM_STATIC is not set
192CONFIG_SPLIT_PTLOCK_CPUS=4 211CONFIG_SPLIT_PTLOCK_CPUS=4
193# CONFIG_RESOURCES_64BIT is not set 212# CONFIG_RESOURCES_64BIT is not set
213CONFIG_ZONE_DMA_FLAG=1
194CONFIG_PROC_DEVICETREE=y 214CONFIG_PROC_DEVICETREE=y
195# CONFIG_CMDLINE_BOOL is not set 215# CONFIG_CMDLINE_BOOL is not set
196CONFIG_PM=y 216CONFIG_PM=y
@@ -200,19 +220,23 @@ CONFIG_PM_DEBUG=y
200CONFIG_PM_SYSFS_DEPRECATED=y 220CONFIG_PM_SYSFS_DEPRECATED=y
201CONFIG_SOFTWARE_SUSPEND=y 221CONFIG_SOFTWARE_SUSPEND=y
202CONFIG_PM_STD_PARTITION="" 222CONFIG_PM_STD_PARTITION=""
223CONFIG_APM_EMULATION=y
203CONFIG_SECCOMP=y 224CONFIG_SECCOMP=y
225# CONFIG_WANT_DEVICE_TREE is not set
204CONFIG_ISA_DMA_API=y 226CONFIG_ISA_DMA_API=y
205 227
206# 228#
207# Bus options 229# Bus options
208# 230#
231CONFIG_ZONE_DMA=y
209CONFIG_GENERIC_ISA_DMA=y 232CONFIG_GENERIC_ISA_DMA=y
210# CONFIG_MPIC_WEIRD is not set
211# CONFIG_PPC_I8259 is not set
212CONFIG_PPC_INDIRECT_PCI=y 233CONFIG_PPC_INDIRECT_PCI=y
234# CONFIG_PPC_INDIRECT_PCI_BE is not set
213CONFIG_PCI=y 235CONFIG_PCI=y
214CONFIG_PCI_DOMAINS=y 236CONFIG_PCI_DOMAINS=y
215# CONFIG_PCIEPORTBUS is not set 237# CONFIG_PCIEPORTBUS is not set
238CONFIG_ARCH_SUPPORTS_MSI=y
239# CONFIG_PCI_MSI is not set
216# CONFIG_PCI_DEBUG is not set 240# CONFIG_PCI_DEBUG is not set
217 241
218# 242#
@@ -237,10 +261,6 @@ CONFIG_YENTA_TOSHIBA=y
237# CONFIG_PD6729 is not set 261# CONFIG_PD6729 is not set
238# CONFIG_I82092 is not set 262# CONFIG_I82092 is not set
239CONFIG_PCCARD_NONSTATIC=m 263CONFIG_PCCARD_NONSTATIC=m
240
241#
242# PCI Hotplug Support
243#
244# CONFIG_HOTPLUG_PCI is not set 264# CONFIG_HOTPLUG_PCI is not set
245 265
246# 266#
@@ -265,14 +285,15 @@ CONFIG_NET=y
265# 285#
266# Networking options 286# Networking options
267# 287#
268# CONFIG_NETDEBUG is not set
269CONFIG_PACKET=y 288CONFIG_PACKET=y
270# CONFIG_PACKET_MMAP is not set 289# CONFIG_PACKET_MMAP is not set
271CONFIG_UNIX=y 290CONFIG_UNIX=y
272CONFIG_XFRM=y 291CONFIG_XFRM=y
273CONFIG_XFRM_USER=y 292CONFIG_XFRM_USER=y
274# CONFIG_XFRM_SUB_POLICY is not set 293# CONFIG_XFRM_SUB_POLICY is not set
294# CONFIG_XFRM_MIGRATE is not set
275CONFIG_NET_KEY=y 295CONFIG_NET_KEY=y
296# CONFIG_NET_KEY_MIGRATE is not set
276CONFIG_INET=y 297CONFIG_INET=y
277CONFIG_IP_MULTICAST=y 298CONFIG_IP_MULTICAST=y
278# CONFIG_IP_ADVANCED_ROUTER is not set 299# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -297,10 +318,6 @@ CONFIG_INET_TCP_DIAG=y
297CONFIG_TCP_CONG_CUBIC=y 318CONFIG_TCP_CONG_CUBIC=y
298CONFIG_DEFAULT_TCP_CONG="cubic" 319CONFIG_DEFAULT_TCP_CONG="cubic"
299# CONFIG_TCP_MD5SIG is not set 320# CONFIG_TCP_MD5SIG is not set
300
301#
302# IP: Virtual Server Configuration
303#
304# CONFIG_IP_VS is not set 321# CONFIG_IP_VS is not set
305# CONFIG_IPV6 is not set 322# CONFIG_IPV6 is not set
306# CONFIG_INET6_XFRM_TUNNEL is not set 323# CONFIG_INET6_XFRM_TUNNEL is not set
@@ -314,8 +331,6 @@ CONFIG_NETFILTER=y
314# 331#
315# CONFIG_NETFILTER_NETLINK is not set 332# CONFIG_NETFILTER_NETLINK is not set
316CONFIG_NF_CONNTRACK_ENABLED=m 333CONFIG_NF_CONNTRACK_ENABLED=m
317CONFIG_NF_CONNTRACK_SUPPORT=y
318# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
319CONFIG_NF_CONNTRACK=m 334CONFIG_NF_CONNTRACK=m
320# CONFIG_NF_CT_ACCT is not set 335# CONFIG_NF_CT_ACCT is not set
321# CONFIG_NF_CONNTRACK_MARK is not set 336# CONFIG_NF_CONNTRACK_MARK is not set
@@ -327,16 +342,21 @@ CONFIG_NF_CONNTRACK_FTP=m
327CONFIG_NF_CONNTRACK_IRC=m 342CONFIG_NF_CONNTRACK_IRC=m
328# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set 343# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
329# CONFIG_NF_CONNTRACK_PPTP is not set 344# CONFIG_NF_CONNTRACK_PPTP is not set
345# CONFIG_NF_CONNTRACK_SANE is not set
330# CONFIG_NF_CONNTRACK_SIP is not set 346# CONFIG_NF_CONNTRACK_SIP is not set
331CONFIG_NF_CONNTRACK_TFTP=m 347CONFIG_NF_CONNTRACK_TFTP=m
332CONFIG_NETFILTER_XTABLES=m 348CONFIG_NETFILTER_XTABLES=m
333CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 349CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
350# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set
334# CONFIG_NETFILTER_XT_TARGET_DSCP is not set 351# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
335CONFIG_NETFILTER_XT_TARGET_MARK=m 352CONFIG_NETFILTER_XT_TARGET_MARK=m
336CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 353CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
337CONFIG_NETFILTER_XT_TARGET_NFLOG=m 354CONFIG_NETFILTER_XT_TARGET_NFLOG=m
338CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 355CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
356CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
339CONFIG_NETFILTER_XT_MATCH_COMMENT=m 357CONFIG_NETFILTER_XT_MATCH_COMMENT=m
358# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set
359# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set
340CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 360CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
341CONFIG_NETFILTER_XT_MATCH_DCCP=m 361CONFIG_NETFILTER_XT_MATCH_DCCP=m
342CONFIG_NETFILTER_XT_MATCH_DSCP=m 362CONFIG_NETFILTER_XT_MATCH_DSCP=m
@@ -377,7 +397,6 @@ CONFIG_IP_NF_FILTER=m
377CONFIG_IP_NF_TARGET_REJECT=m 397CONFIG_IP_NF_TARGET_REJECT=m
378CONFIG_IP_NF_TARGET_LOG=m 398CONFIG_IP_NF_TARGET_LOG=m
379CONFIG_IP_NF_TARGET_ULOG=m 399CONFIG_IP_NF_TARGET_ULOG=m
380CONFIG_IP_NF_TARGET_TCPMSS=m
381CONFIG_NF_NAT=m 400CONFIG_NF_NAT=m
382CONFIG_NF_NAT_NEEDED=y 401CONFIG_NF_NAT_NEEDED=y
383CONFIG_IP_NF_TARGET_MASQUERADE=m 402CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -396,14 +415,11 @@ CONFIG_IP_NF_MANGLE=m
396CONFIG_IP_NF_TARGET_TOS=m 415CONFIG_IP_NF_TARGET_TOS=m
397CONFIG_IP_NF_TARGET_ECN=m 416CONFIG_IP_NF_TARGET_ECN=m
398CONFIG_IP_NF_TARGET_TTL=m 417CONFIG_IP_NF_TARGET_TTL=m
418# CONFIG_IP_NF_TARGET_CLUSTERIP is not set
399CONFIG_IP_NF_RAW=m 419CONFIG_IP_NF_RAW=m
400CONFIG_IP_NF_ARPTABLES=m 420CONFIG_IP_NF_ARPTABLES=m
401CONFIG_IP_NF_ARPFILTER=m 421CONFIG_IP_NF_ARPFILTER=m
402CONFIG_IP_NF_ARP_MANGLE=m 422CONFIG_IP_NF_ARP_MANGLE=m
403
404#
405# DCCP Configuration (EXPERIMENTAL)
406#
407CONFIG_IP_DCCP=m 423CONFIG_IP_DCCP=m
408CONFIG_INET_DCCP_DIAG=m 424CONFIG_INET_DCCP_DIAG=m
409CONFIG_IP_DCCP_ACKVEC=y 425CONFIG_IP_DCCP_ACKVEC=y
@@ -422,15 +438,7 @@ CONFIG_IP_DCCP_CCID3_RTO=100
422# DCCP Kernel Hacking 438# DCCP Kernel Hacking
423# 439#
424# CONFIG_IP_DCCP_DEBUG is not set 440# CONFIG_IP_DCCP_DEBUG is not set
425
426#
427# SCTP Configuration (EXPERIMENTAL)
428#
429# CONFIG_IP_SCTP is not set 441# CONFIG_IP_SCTP is not set
430
431#
432# TIPC Configuration (EXPERIMENTAL)
433#
434# CONFIG_TIPC is not set 442# CONFIG_TIPC is not set
435# CONFIG_ATM is not set 443# CONFIG_ATM is not set
436# CONFIG_BRIDGE is not set 444# CONFIG_BRIDGE is not set
@@ -448,6 +456,7 @@ CONFIG_IP_DCCP_CCID3_RTO=100
448# QoS and/or fair queueing 456# QoS and/or fair queueing
449# 457#
450# CONFIG_NET_SCHED is not set 458# CONFIG_NET_SCHED is not set
459CONFIG_NET_SCH_FIFO=y
451CONFIG_NET_CLS_ROUTE=y 460CONFIG_NET_CLS_ROUTE=y
452 461
453# 462#
@@ -485,6 +494,7 @@ CONFIG_IRTTY_SIR=m
485# Dongle support 494# Dongle support
486# 495#
487# CONFIG_DONGLE is not set 496# CONFIG_DONGLE is not set
497# CONFIG_KINGSUN_DONGLE is not set
488 498
489# 499#
490# Old SIR device drivers 500# Old SIR device drivers
@@ -532,13 +542,23 @@ CONFIG_BT_HCIBFUSB=m
532# CONFIG_BT_HCIBLUECARD is not set 542# CONFIG_BT_HCIBLUECARD is not set
533# CONFIG_BT_HCIBTUART is not set 543# CONFIG_BT_HCIBTUART is not set
534# CONFIG_BT_HCIVHCI is not set 544# CONFIG_BT_HCIVHCI is not set
545# CONFIG_AF_RXRPC is not set
546
547#
548# Wireless
549#
550CONFIG_CFG80211=m
551CONFIG_WIRELESS_EXT=y
552CONFIG_MAC80211=m
553CONFIG_MAC80211_LEDS=y
554# CONFIG_MAC80211_DEBUG is not set
535CONFIG_IEEE80211=m 555CONFIG_IEEE80211=m
536# CONFIG_IEEE80211_DEBUG is not set 556# CONFIG_IEEE80211_DEBUG is not set
537CONFIG_IEEE80211_CRYPT_WEP=m 557CONFIG_IEEE80211_CRYPT_WEP=m
538CONFIG_IEEE80211_CRYPT_CCMP=m 558CONFIG_IEEE80211_CRYPT_CCMP=m
539CONFIG_IEEE80211_CRYPT_TKIP=m 559CONFIG_IEEE80211_CRYPT_TKIP=m
540# CONFIG_IEEE80211_SOFTMAC is not set 560# CONFIG_IEEE80211_SOFTMAC is not set
541CONFIG_WIRELESS_EXT=y 561# CONFIG_RFKILL is not set
542 562
543# 563#
544# Device Drivers 564# Device Drivers
@@ -551,6 +571,7 @@ CONFIG_WIRELESS_EXT=y
551CONFIG_PREVENT_FIRMWARE_BUILD=y 571CONFIG_PREVENT_FIRMWARE_BUILD=y
552CONFIG_FW_LOADER=y 572CONFIG_FW_LOADER=y
553# CONFIG_DEBUG_DRIVER is not set 573# CONFIG_DEBUG_DRIVER is not set
574# CONFIG_DEBUG_DEVRES is not set
554# CONFIG_SYS_HYPERVISOR is not set 575# CONFIG_SYS_HYPERVISOR is not set
555 576
556# 577#
@@ -558,10 +579,6 @@ CONFIG_FW_LOADER=y
558# 579#
559CONFIG_CONNECTOR=y 580CONFIG_CONNECTOR=y
560CONFIG_PROC_EVENTS=y 581CONFIG_PROC_EVENTS=y
561
562#
563# Memory Technology Devices (MTD)
564#
565# CONFIG_MTD is not set 582# CONFIG_MTD is not set
566 583
567# 584#
@@ -572,6 +589,7 @@ CONFIG_PROC_EVENTS=y
572# 589#
573# Plug and Play support 590# Plug and Play support
574# 591#
592# CONFIG_PNPACPI is not set
575 593
576# 594#
577# Block devices 595# Block devices
@@ -592,19 +610,16 @@ CONFIG_BLK_DEV_RAM=y
592CONFIG_BLK_DEV_RAM_COUNT=16 610CONFIG_BLK_DEV_RAM_COUNT=16
593CONFIG_BLK_DEV_RAM_SIZE=4096 611CONFIG_BLK_DEV_RAM_SIZE=4096
594CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 612CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
595CONFIG_BLK_DEV_INITRD=y
596# CONFIG_CDROM_PKTCDVD is not set 613# CONFIG_CDROM_PKTCDVD is not set
597# CONFIG_ATA_OVER_ETH is not set 614# CONFIG_ATA_OVER_ETH is not set
598 615
599# 616#
600# Misc devices 617# Misc devices
601# 618#
619# CONFIG_PHANTOM is not set
602# CONFIG_SGI_IOC4 is not set 620# CONFIG_SGI_IOC4 is not set
603# CONFIG_TIFM_CORE is not set 621# CONFIG_TIFM_CORE is not set
604 622# CONFIG_BLINK is not set
605#
606# ATA/ATAPI/MFM/RLL support
607#
608CONFIG_IDE=y 623CONFIG_IDE=y
609CONFIG_BLK_DEV_IDE=y 624CONFIG_BLK_DEV_IDE=y
610 625
@@ -615,11 +630,13 @@ CONFIG_BLK_DEV_IDE=y
615CONFIG_BLK_DEV_IDEDISK=y 630CONFIG_BLK_DEV_IDEDISK=y
616# CONFIG_IDEDISK_MULTI_MODE is not set 631# CONFIG_IDEDISK_MULTI_MODE is not set
617CONFIG_BLK_DEV_IDECS=m 632CONFIG_BLK_DEV_IDECS=m
633# CONFIG_BLK_DEV_DELKIN is not set
618CONFIG_BLK_DEV_IDECD=y 634CONFIG_BLK_DEV_IDECD=y
619# CONFIG_BLK_DEV_IDETAPE is not set 635# CONFIG_BLK_DEV_IDETAPE is not set
620CONFIG_BLK_DEV_IDEFLOPPY=y 636CONFIG_BLK_DEV_IDEFLOPPY=y
621CONFIG_BLK_DEV_IDESCSI=y 637CONFIG_BLK_DEV_IDESCSI=y
622# CONFIG_IDE_TASK_IOCTL is not set 638# CONFIG_IDE_TASK_IOCTL is not set
639CONFIG_IDE_PROC_FS=y
623 640
624# 641#
625# IDE chipset support/bugfixes 642# IDE chipset support/bugfixes
@@ -627,12 +644,12 @@ CONFIG_BLK_DEV_IDESCSI=y
627# CONFIG_IDE_GENERIC is not set 644# CONFIG_IDE_GENERIC is not set
628CONFIG_BLK_DEV_IDEPCI=y 645CONFIG_BLK_DEV_IDEPCI=y
629CONFIG_IDEPCI_SHARE_IRQ=y 646CONFIG_IDEPCI_SHARE_IRQ=y
647CONFIG_IDEPCI_PCIBUS_ORDER=y
630# CONFIG_BLK_DEV_OFFBOARD is not set 648# CONFIG_BLK_DEV_OFFBOARD is not set
631CONFIG_BLK_DEV_GENERIC=y 649CONFIG_BLK_DEV_GENERIC=y
632# CONFIG_BLK_DEV_OPTI621 is not set 650# CONFIG_BLK_DEV_OPTI621 is not set
633CONFIG_BLK_DEV_IDEDMA_PCI=y 651CONFIG_BLK_DEV_IDEDMA_PCI=y
634# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 652# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
635CONFIG_IDEDMA_PCI_AUTO=y
636# CONFIG_IDEDMA_ONLYDISK is not set 653# CONFIG_IDEDMA_ONLYDISK is not set
637# CONFIG_BLK_DEV_AEC62XX is not set 654# CONFIG_BLK_DEV_AEC62XX is not set
638# CONFIG_BLK_DEV_ALI15X3 is not set 655# CONFIG_BLK_DEV_ALI15X3 is not set
@@ -647,6 +664,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
647# CONFIG_BLK_DEV_JMICRON is not set 664# CONFIG_BLK_DEV_JMICRON is not set
648# CONFIG_BLK_DEV_SC1200 is not set 665# CONFIG_BLK_DEV_SC1200 is not set
649# CONFIG_BLK_DEV_PIIX is not set 666# CONFIG_BLK_DEV_PIIX is not set
667# CONFIG_BLK_DEV_IT8213 is not set
650# CONFIG_BLK_DEV_IT821X is not set 668# CONFIG_BLK_DEV_IT821X is not set
651# CONFIG_BLK_DEV_NS87415 is not set 669# CONFIG_BLK_DEV_NS87415 is not set
652# CONFIG_BLK_DEV_PDC202XX_OLD is not set 670# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -657,13 +675,13 @@ CONFIG_BLK_DEV_SL82C105=y
657# CONFIG_BLK_DEV_SLC90E66 is not set 675# CONFIG_BLK_DEV_SLC90E66 is not set
658# CONFIG_BLK_DEV_TRM290 is not set 676# CONFIG_BLK_DEV_TRM290 is not set
659# CONFIG_BLK_DEV_VIA82CXXX is not set 677# CONFIG_BLK_DEV_VIA82CXXX is not set
678# CONFIG_BLK_DEV_TC86C001 is not set
660CONFIG_BLK_DEV_IDE_PMAC=y 679CONFIG_BLK_DEV_IDE_PMAC=y
661CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y 680CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
662CONFIG_BLK_DEV_IDEDMA_PMAC=y 681CONFIG_BLK_DEV_IDEDMA_PMAC=y
663# CONFIG_IDE_ARM is not set 682# CONFIG_IDE_ARM is not set
664CONFIG_BLK_DEV_IDEDMA=y 683CONFIG_BLK_DEV_IDEDMA=y
665# CONFIG_IDEDMA_IVB is not set 684# CONFIG_IDEDMA_IVB is not set
666CONFIG_IDEDMA_AUTO=y
667# CONFIG_BLK_DEV_HD is not set 685# CONFIG_BLK_DEV_HD is not set
668 686
669# 687#
@@ -693,6 +711,7 @@ CONFIG_CHR_DEV_SG=y
693CONFIG_SCSI_CONSTANTS=y 711CONFIG_SCSI_CONSTANTS=y
694# CONFIG_SCSI_LOGGING is not set 712# CONFIG_SCSI_LOGGING is not set
695# CONFIG_SCSI_SCAN_ASYNC is not set 713# CONFIG_SCSI_SCAN_ASYNC is not set
714CONFIG_SCSI_WAIT_SCAN=m
696 715
697# 716#
698# SCSI Transports 717# SCSI Transports
@@ -762,10 +781,6 @@ CONFIG_SCSI_MAC53C94=y
762# CONFIG_PCMCIA_NINJA_SCSI is not set 781# CONFIG_PCMCIA_NINJA_SCSI is not set
763# CONFIG_PCMCIA_QLOGIC is not set 782# CONFIG_PCMCIA_QLOGIC is not set
764# CONFIG_PCMCIA_SYM53C500 is not set 783# CONFIG_PCMCIA_SYM53C500 is not set
765
766#
767# Serial ATA (prod) and Parallel ATA (experimental) drivers
768#
769# CONFIG_ATA is not set 784# CONFIG_ATA is not set
770 785
771# 786#
@@ -787,6 +802,7 @@ CONFIG_DM_SNAPSHOT=m
787CONFIG_DM_MIRROR=m 802CONFIG_DM_MIRROR=m
788CONFIG_DM_ZERO=m 803CONFIG_DM_ZERO=m
789# CONFIG_DM_MULTIPATH is not set 804# CONFIG_DM_MULTIPATH is not set
805# CONFIG_DM_DELAY is not set
790 806
791# 807#
792# Fusion MPT device support 808# Fusion MPT device support
@@ -799,28 +815,26 @@ CONFIG_DM_ZERO=m
799# 815#
800# IEEE 1394 (FireWire) support 816# IEEE 1394 (FireWire) support
801# 817#
818# CONFIG_FIREWIRE is not set
802CONFIG_IEEE1394=m 819CONFIG_IEEE1394=m
803 820
804# 821#
805# Subsystem Options 822# Subsystem Options
806# 823#
807# CONFIG_IEEE1394_VERBOSEDEBUG is not set 824# CONFIG_IEEE1394_VERBOSEDEBUG is not set
808# CONFIG_IEEE1394_OUI_DB is not set
809CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
810CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
811# CONFIG_IEEE1394_EXPORT_FULL_API is not set
812 825
813# 826#
814# Device Drivers 827# Controllers
815# 828#
816# CONFIG_IEEE1394_PCILYNX is not set 829# CONFIG_IEEE1394_PCILYNX is not set
817CONFIG_IEEE1394_OHCI1394=m 830CONFIG_IEEE1394_OHCI1394=m
818 831
819# 832#
820# Protocol Drivers 833# Protocols
821# 834#
822CONFIG_IEEE1394_VIDEO1394=m 835CONFIG_IEEE1394_VIDEO1394=m
823CONFIG_IEEE1394_SBP2=m 836CONFIG_IEEE1394_SBP2=m
837# CONFIG_IEEE1394_ETH1394_ROM_ENTRY is not set
824# CONFIG_IEEE1394_ETH1394 is not set 838# CONFIG_IEEE1394_ETH1394 is not set
825CONFIG_IEEE1394_DV1394=m 839CONFIG_IEEE1394_DV1394=m
826CONFIG_IEEE1394_RAWIO=m 840CONFIG_IEEE1394_RAWIO=m
@@ -829,10 +843,7 @@ CONFIG_IEEE1394_RAWIO=m
829# I2O device support 843# I2O device support
830# 844#
831# CONFIG_I2O is not set 845# CONFIG_I2O is not set
832 846CONFIG_MACINTOSH_DRIVERS=y
833#
834# Macintosh device drivers
835#
836CONFIG_ADB=y 847CONFIG_ADB=y
837CONFIG_ADB_CUDA=y 848CONFIG_ADB_CUDA=y
838CONFIG_ADB_PMU=y 849CONFIG_ADB_PMU=y
@@ -858,15 +869,7 @@ CONFIG_DUMMY=m
858# CONFIG_BONDING is not set 869# CONFIG_BONDING is not set
859# CONFIG_EQUALIZER is not set 870# CONFIG_EQUALIZER is not set
860CONFIG_TUN=m 871CONFIG_TUN=m
861
862#
863# ARCnet devices
864#
865# CONFIG_ARCNET is not set 872# CONFIG_ARCNET is not set
866
867#
868# PHY device support
869#
870# CONFIG_PHYLIB is not set 873# CONFIG_PHYLIB is not set
871 874
872# 875#
@@ -907,10 +910,8 @@ CONFIG_PCNET32=y
907# CONFIG_SUNDANCE is not set 910# CONFIG_SUNDANCE is not set
908# CONFIG_TLAN is not set 911# CONFIG_TLAN is not set
909# CONFIG_VIA_RHINE is not set 912# CONFIG_VIA_RHINE is not set
910 913# CONFIG_SC92031 is not set
911# 914CONFIG_NETDEV_1000=y
912# Ethernet (1000 Mbit)
913#
914# CONFIG_ACENIC is not set 915# CONFIG_ACENIC is not set
915# CONFIG_DL2K is not set 916# CONFIG_DL2K is not set
916# CONFIG_E1000 is not set 917# CONFIG_E1000 is not set
@@ -927,77 +928,62 @@ CONFIG_PCNET32=y
927# CONFIG_BNX2 is not set 928# CONFIG_BNX2 is not set
928# CONFIG_MV643XX_ETH is not set 929# CONFIG_MV643XX_ETH is not set
929# CONFIG_QLA3XXX is not set 930# CONFIG_QLA3XXX is not set
930 931# CONFIG_ATL1 is not set
931# 932CONFIG_NETDEV_10000=y
932# Ethernet (10000 Mbit)
933#
934# CONFIG_CHELSIO_T1 is not set 933# CONFIG_CHELSIO_T1 is not set
934# CONFIG_CHELSIO_T3 is not set
935# CONFIG_IXGB is not set 935# CONFIG_IXGB is not set
936# CONFIG_S2IO is not set 936# CONFIG_S2IO is not set
937# CONFIG_MYRI10GE is not set 937# CONFIG_MYRI10GE is not set
938# CONFIG_NETXEN_NIC is not set 938# CONFIG_NETXEN_NIC is not set
939 939# CONFIG_MLX4_CORE is not set
940#
941# Token Ring devices
942#
943# CONFIG_TR is not set 940# CONFIG_TR is not set
944 941
945# 942#
946# Wireless LAN (non-hamradio) 943# Wireless LAN
947#
948CONFIG_NET_RADIO=y
949# CONFIG_NET_WIRELESS_RTNETLINK is not set
950
951#
952# Obsolete Wireless cards support (pre-802.11)
953#
954# CONFIG_STRIP is not set
955# CONFIG_PCMCIA_WAVELAN is not set
956# CONFIG_PCMCIA_NETWAVE is not set
957
958#
959# Wireless 802.11 Frequency Hopping cards support
960# 944#
945# CONFIG_WLAN_PRE80211 is not set
946CONFIG_WLAN_80211=y
961# CONFIG_PCMCIA_RAYCS is not set 947# CONFIG_PCMCIA_RAYCS is not set
962
963#
964# Wireless 802.11b ISA/PCI cards support
965#
966# CONFIG_IPW2100 is not set 948# CONFIG_IPW2100 is not set
967# CONFIG_IPW2200 is not set 949# CONFIG_IPW2200 is not set
950# CONFIG_LIBERTAS is not set
968# CONFIG_AIRO is not set 951# CONFIG_AIRO is not set
969CONFIG_HERMES=m 952CONFIG_HERMES=m
970CONFIG_APPLE_AIRPORT=m 953CONFIG_APPLE_AIRPORT=m
971# CONFIG_PLX_HERMES is not set 954# CONFIG_PLX_HERMES is not set
972# CONFIG_TMD_HERMES is not set 955# CONFIG_TMD_HERMES is not set
973# CONFIG_NORTEL_HERMES is not set 956# CONFIG_NORTEL_HERMES is not set
974# CONFIG_PCI_HERMES is not set 957CONFIG_PCI_HERMES=m
975# CONFIG_ATMEL is not set 958# CONFIG_ATMEL is not set
976 959CONFIG_PCMCIA_HERMES=m
977#
978# Wireless 802.11b Pcmcia/Cardbus cards support
979#
980# CONFIG_PCMCIA_HERMES is not set
981# CONFIG_PCMCIA_SPECTRUM is not set 960# CONFIG_PCMCIA_SPECTRUM is not set
982# CONFIG_AIRO_CS is not set 961# CONFIG_AIRO_CS is not set
983# CONFIG_PCMCIA_WL3501 is not set 962# CONFIG_PCMCIA_WL3501 is not set
984
985#
986# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
987#
988CONFIG_PRISM54=m 963CONFIG_PRISM54=m
989# CONFIG_USB_ZD1201 is not set 964# CONFIG_USB_ZD1201 is not set
990# CONFIG_HOSTAP is not set 965# CONFIG_HOSTAP is not set
991CONFIG_NET_WIRELESS=y
992 966
993# 967#
994# PCMCIA network device support 968# USB Network Adapters
995# 969#
970# CONFIG_USB_CATC is not set
971# CONFIG_USB_KAWETH is not set
972# CONFIG_USB_PEGASUS is not set
973# CONFIG_USB_RTL8150 is not set
974CONFIG_USB_USBNET_MII=m
975CONFIG_USB_USBNET=m
976CONFIG_USB_NET_AX8817X=m
977CONFIG_USB_NET_CDCETHER=m
978# CONFIG_USB_NET_DM9601 is not set
979# CONFIG_USB_NET_GL620A is not set
980CONFIG_USB_NET_NET1080=m
981# CONFIG_USB_NET_PLUSB is not set
982# CONFIG_USB_NET_MCS7830 is not set
983# CONFIG_USB_NET_RNDIS_HOST is not set
984# CONFIG_USB_NET_CDC_SUBSET is not set
985CONFIG_USB_NET_ZAURUS=m
996# CONFIG_NET_PCMCIA is not set 986# CONFIG_NET_PCMCIA is not set
997
998#
999# Wan interfaces
1000#
1001# CONFIG_WAN is not set 987# CONFIG_WAN is not set
1002# CONFIG_FDDI is not set 988# CONFIG_FDDI is not set
1003# CONFIG_HIPPI is not set 989# CONFIG_HIPPI is not set
@@ -1033,6 +1019,7 @@ CONFIG_SLHC=y
1033# 1019#
1034CONFIG_INPUT=y 1020CONFIG_INPUT=y
1035# CONFIG_INPUT_FF_MEMLESS is not set 1021# CONFIG_INPUT_FF_MEMLESS is not set
1022# CONFIG_INPUT_POLLDEV is not set
1036 1023
1037# 1024#
1038# Userland interfaces 1025# Userland interfaces
@@ -1059,8 +1046,10 @@ CONFIG_INPUT_KEYBOARD=y
1059CONFIG_INPUT_MOUSE=y 1046CONFIG_INPUT_MOUSE=y
1060# CONFIG_MOUSE_PS2 is not set 1047# CONFIG_MOUSE_PS2 is not set
1061# CONFIG_MOUSE_SERIAL is not set 1048# CONFIG_MOUSE_SERIAL is not set
1049# CONFIG_MOUSE_APPLETOUCH is not set
1062# CONFIG_MOUSE_VSXXXAA is not set 1050# CONFIG_MOUSE_VSXXXAA is not set
1063# CONFIG_INPUT_JOYSTICK is not set 1051# CONFIG_INPUT_JOYSTICK is not set
1052# CONFIG_INPUT_TABLET is not set
1064# CONFIG_INPUT_TOUCHSCREEN is not set 1053# CONFIG_INPUT_TOUCHSCREEN is not set
1065# CONFIG_INPUT_MISC is not set 1054# CONFIG_INPUT_MISC is not set
1066 1055
@@ -1100,6 +1089,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
1100CONFIG_SERIAL_CORE=m 1089CONFIG_SERIAL_CORE=m
1101CONFIG_SERIAL_PMACZILOG=m 1090CONFIG_SERIAL_PMACZILOG=m
1102# CONFIG_SERIAL_JSM is not set 1091# CONFIG_SERIAL_JSM is not set
1092# CONFIG_SERIAL_OF_PLATFORM is not set
1103CONFIG_UNIX98_PTYS=y 1093CONFIG_UNIX98_PTYS=y
1104CONFIG_LEGACY_PTYS=y 1094CONFIG_LEGACY_PTYS=y
1105CONFIG_LEGACY_PTY_COUNT=256 1095CONFIG_LEGACY_PTY_COUNT=256
@@ -1108,16 +1098,11 @@ CONFIG_LEGACY_PTY_COUNT=256
1108# IPMI 1098# IPMI
1109# 1099#
1110# CONFIG_IPMI_HANDLER is not set 1100# CONFIG_IPMI_HANDLER is not set
1111
1112#
1113# Watchdog Cards
1114#
1115# CONFIG_WATCHDOG is not set 1101# CONFIG_WATCHDOG is not set
1116# CONFIG_HW_RANDOM is not set 1102# CONFIG_HW_RANDOM is not set
1117CONFIG_NVRAM=y 1103CONFIG_NVRAM=y
1118CONFIG_GEN_RTC=y 1104CONFIG_GEN_RTC=y
1119# CONFIG_GEN_RTC_X is not set 1105# CONFIG_GEN_RTC_X is not set
1120# CONFIG_DTLK is not set
1121# CONFIG_R3964 is not set 1106# CONFIG_R3964 is not set
1122# CONFIG_APPLICOM is not set 1107# CONFIG_APPLICOM is not set
1123CONFIG_AGP=m 1108CONFIG_AGP=m
@@ -1143,11 +1128,9 @@ CONFIG_DRM_RADEON=m
1143# TPM devices 1128# TPM devices
1144# 1129#
1145# CONFIG_TCG_TPM is not set 1130# CONFIG_TCG_TPM is not set
1146 1131CONFIG_DEVPORT=y
1147#
1148# I2C support
1149#
1150CONFIG_I2C=y 1132CONFIG_I2C=y
1133CONFIG_I2C_BOARDINFO=y
1151CONFIG_I2C_CHARDEV=m 1134CONFIG_I2C_CHARDEV=m
1152 1135
1153# 1136#
@@ -1175,14 +1158,15 @@ CONFIG_I2C_POWERMAC=y
1175# CONFIG_I2C_PARPORT_LIGHT is not set 1158# CONFIG_I2C_PARPORT_LIGHT is not set
1176# CONFIG_I2C_PROSAVAGE is not set 1159# CONFIG_I2C_PROSAVAGE is not set
1177# CONFIG_I2C_SAVAGE4 is not set 1160# CONFIG_I2C_SAVAGE4 is not set
1161# CONFIG_I2C_SIMTEC is not set
1178# CONFIG_I2C_SIS5595 is not set 1162# CONFIG_I2C_SIS5595 is not set
1179# CONFIG_I2C_SIS630 is not set 1163# CONFIG_I2C_SIS630 is not set
1180# CONFIG_I2C_SIS96X is not set 1164# CONFIG_I2C_SIS96X is not set
1181# CONFIG_I2C_STUB is not set 1165# CONFIG_I2C_STUB is not set
1166# CONFIG_I2C_TINY_USB is not set
1182# CONFIG_I2C_VIA is not set 1167# CONFIG_I2C_VIA is not set
1183# CONFIG_I2C_VIAPRO is not set 1168# CONFIG_I2C_VIAPRO is not set
1184# CONFIG_I2C_VOODOO3 is not set 1169# CONFIG_I2C_VOODOO3 is not set
1185# CONFIG_I2C_PCA_ISA is not set
1186 1170
1187# 1171#
1188# Miscellaneous I2C Chip support 1172# Miscellaneous I2C Chip support
@@ -1210,37 +1194,56 @@ CONFIG_I2C_POWERMAC=y
1210# Dallas's 1-wire bus 1194# Dallas's 1-wire bus
1211# 1195#
1212# CONFIG_W1 is not set 1196# CONFIG_W1 is not set
1197# CONFIG_HWMON is not set
1213 1198
1214# 1199#
1215# Hardware Monitoring support 1200# Multifunction device drivers
1216# 1201#
1217# CONFIG_HWMON is not set 1202# CONFIG_MFD_SM501 is not set
1218# CONFIG_HWMON_VID is not set
1219 1203
1220# 1204#
1221# Multimedia devices 1205# Multimedia devices
1222# 1206#
1223# CONFIG_VIDEO_DEV is not set 1207# CONFIG_VIDEO_DEV is not set
1208# CONFIG_DVB_CORE is not set
1209# CONFIG_DAB is not set
1224 1210
1225# 1211#
1226# Digital Video Broadcasting Devices 1212# Graphics support
1227# 1213#
1228# CONFIG_DVB is not set 1214CONFIG_BACKLIGHT_LCD_SUPPORT=y
1229# CONFIG_USB_DABUSB is not set 1215CONFIG_BACKLIGHT_CLASS_DEVICE=y
1216CONFIG_LCD_CLASS_DEVICE=m
1230 1217
1231# 1218#
1232# Graphics support 1219# Display device support
1233# 1220#
1234# CONFIG_FIRMWARE_EDID is not set 1221CONFIG_DISPLAY_SUPPORT=y
1222
1223#
1224# Display hardware drivers
1225#
1226CONFIG_VGASTATE=y
1235CONFIG_FB=y 1227CONFIG_FB=y
1228# CONFIG_FIRMWARE_EDID is not set
1236CONFIG_FB_DDC=y 1229CONFIG_FB_DDC=y
1237CONFIG_FB_CFB_FILLRECT=y 1230CONFIG_FB_CFB_FILLRECT=y
1238CONFIG_FB_CFB_COPYAREA=y 1231CONFIG_FB_CFB_COPYAREA=y
1239CONFIG_FB_CFB_IMAGEBLIT=y 1232CONFIG_FB_CFB_IMAGEBLIT=y
1233# CONFIG_FB_SYS_FILLRECT is not set
1234# CONFIG_FB_SYS_COPYAREA is not set
1235# CONFIG_FB_SYS_IMAGEBLIT is not set
1236# CONFIG_FB_SYS_FOPS is not set
1237CONFIG_FB_DEFERRED_IO=y
1238# CONFIG_FB_SVGALIB is not set
1240CONFIG_FB_MACMODES=y 1239CONFIG_FB_MACMODES=y
1241CONFIG_FB_BACKLIGHT=y 1240CONFIG_FB_BACKLIGHT=y
1242CONFIG_FB_MODE_HELPERS=y 1241CONFIG_FB_MODE_HELPERS=y
1243CONFIG_FB_TILEBLITTING=y 1242CONFIG_FB_TILEBLITTING=y
1243
1244#
1245# Frame buffer hardware drivers
1246#
1244# CONFIG_FB_CIRRUS is not set 1247# CONFIG_FB_CIRRUS is not set
1245# CONFIG_FB_PM2 is not set 1248# CONFIG_FB_PM2 is not set
1246# CONFIG_FB_CYBER2000 is not set 1249# CONFIG_FB_CYBER2000 is not set
@@ -1255,6 +1258,7 @@ CONFIG_FB_IMSTT=y
1255# CONFIG_FB_S1D13XXX is not set 1258# CONFIG_FB_S1D13XXX is not set
1256CONFIG_FB_NVIDIA=y 1259CONFIG_FB_NVIDIA=y
1257CONFIG_FB_NVIDIA_I2C=y 1260CONFIG_FB_NVIDIA_I2C=y
1261# CONFIG_FB_NVIDIA_DEBUG is not set
1258CONFIG_FB_NVIDIA_BACKLIGHT=y 1262CONFIG_FB_NVIDIA_BACKLIGHT=y
1259# CONFIG_FB_RIVA is not set 1263# CONFIG_FB_RIVA is not set
1260CONFIG_FB_MATROX=y 1264CONFIG_FB_MATROX=y
@@ -1274,6 +1278,7 @@ CONFIG_FB_ATY_CT=y
1274# CONFIG_FB_ATY_GENERIC_LCD is not set 1278# CONFIG_FB_ATY_GENERIC_LCD is not set
1275CONFIG_FB_ATY_GX=y 1279CONFIG_FB_ATY_GX=y
1276CONFIG_FB_ATY_BACKLIGHT=y 1280CONFIG_FB_ATY_BACKLIGHT=y
1281# CONFIG_FB_S3 is not set
1277# CONFIG_FB_SAVAGE is not set 1282# CONFIG_FB_SAVAGE is not set
1278# CONFIG_FB_SIS is not set 1283# CONFIG_FB_SIS is not set
1279# CONFIG_FB_NEOMAGIC is not set 1284# CONFIG_FB_NEOMAGIC is not set
@@ -1281,7 +1286,10 @@ CONFIG_FB_ATY_BACKLIGHT=y
1281CONFIG_FB_3DFX=y 1286CONFIG_FB_3DFX=y
1282# CONFIG_FB_3DFX_ACCEL is not set 1287# CONFIG_FB_3DFX_ACCEL is not set
1283# CONFIG_FB_VOODOO1 is not set 1288# CONFIG_FB_VOODOO1 is not set
1289# CONFIG_FB_VT8623 is not set
1284# CONFIG_FB_TRIDENT is not set 1290# CONFIG_FB_TRIDENT is not set
1291# CONFIG_FB_ARK is not set
1292# CONFIG_FB_PM3 is not set
1285# CONFIG_FB_IBM_GXT4500 is not set 1293# CONFIG_FB_IBM_GXT4500 is not set
1286# CONFIG_FB_VIRTUAL is not set 1294# CONFIG_FB_VIRTUAL is not set
1287 1295
@@ -1295,26 +1303,15 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
1295# CONFIG_FONTS is not set 1303# CONFIG_FONTS is not set
1296CONFIG_FONT_8x8=y 1304CONFIG_FONT_8x8=y
1297CONFIG_FONT_8x16=y 1305CONFIG_FONT_8x16=y
1298
1299#
1300# Logo configuration
1301#
1302CONFIG_LOGO=y 1306CONFIG_LOGO=y
1303CONFIG_LOGO_LINUX_MONO=y 1307CONFIG_LOGO_LINUX_MONO=y
1304CONFIG_LOGO_LINUX_VGA16=y 1308CONFIG_LOGO_LINUX_VGA16=y
1305CONFIG_LOGO_LINUX_CLUT224=y 1309CONFIG_LOGO_LINUX_CLUT224=y
1306CONFIG_BACKLIGHT_LCD_SUPPORT=y
1307CONFIG_BACKLIGHT_CLASS_DEVICE=y
1308CONFIG_BACKLIGHT_DEVICE=y
1309CONFIG_LCD_CLASS_DEVICE=m
1310CONFIG_LCD_DEVICE=y
1311 1310
1312# 1311#
1313# Sound 1312# Sound
1314# 1313#
1315CONFIG_SOUND=m 1314CONFIG_SOUND=m
1316CONFIG_DMASOUND_PMAC=m
1317CONFIG_DMASOUND=m
1318 1315
1319# 1316#
1320# Advanced Linux Sound Architecture 1317# Advanced Linux Sound Architecture
@@ -1428,6 +1425,7 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m
1428# 1425#
1429CONFIG_SND_USB_AUDIO=m 1426CONFIG_SND_USB_AUDIO=m
1430# CONFIG_SND_USB_USX2Y is not set 1427# CONFIG_SND_USB_USX2Y is not set
1428# CONFIG_SND_USB_CAIAQ is not set
1431 1429
1432# 1430#
1433# PCMCIA devices 1431# PCMCIA devices
@@ -1436,6 +1434,11 @@ CONFIG_SND_USB_AUDIO=m
1436# CONFIG_SND_PDAUDIOCF is not set 1434# CONFIG_SND_PDAUDIOCF is not set
1437 1435
1438# 1436#
1437# System on Chip audio support
1438#
1439# CONFIG_SND_SOC is not set
1440
1441#
1439# Open Sound System 1442# Open Sound System
1440# 1443#
1441# CONFIG_SOUND_PRIME is not set 1444# CONFIG_SOUND_PRIME is not set
@@ -1444,6 +1447,15 @@ CONFIG_SND_USB_AUDIO=m
1444# HID Devices 1447# HID Devices
1445# 1448#
1446CONFIG_HID=y 1449CONFIG_HID=y
1450# CONFIG_HID_DEBUG is not set
1451
1452#
1453# USB Input Devices
1454#
1455CONFIG_USB_HID=y
1456CONFIG_USB_HIDINPUT_POWERBOOK=y
1457# CONFIG_HID_FF is not set
1458# CONFIG_USB_HIDDEV is not set
1447 1459
1448# 1460#
1449# USB support 1461# USB support
@@ -1458,10 +1470,9 @@ CONFIG_USB=y
1458# Miscellaneous USB options 1470# Miscellaneous USB options
1459# 1471#
1460CONFIG_USB_DEVICEFS=y 1472CONFIG_USB_DEVICEFS=y
1461# CONFIG_USB_BANDWIDTH is not set 1473CONFIG_USB_DEVICE_CLASS=y
1462CONFIG_USB_DYNAMIC_MINORS=y 1474CONFIG_USB_DYNAMIC_MINORS=y
1463# CONFIG_USB_SUSPEND is not set 1475# CONFIG_USB_SUSPEND is not set
1464# CONFIG_USB_MULTITHREAD_PROBE is not set
1465# CONFIG_USB_OTG is not set 1476# CONFIG_USB_OTG is not set
1466 1477
1467# 1478#
@@ -1471,9 +1482,12 @@ CONFIG_USB_EHCI_HCD=m
1471CONFIG_USB_EHCI_SPLIT_ISO=y 1482CONFIG_USB_EHCI_SPLIT_ISO=y
1472CONFIG_USB_EHCI_ROOT_HUB_TT=y 1483CONFIG_USB_EHCI_ROOT_HUB_TT=y
1473# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1484# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1485# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1474# CONFIG_USB_ISP116X_HCD is not set 1486# CONFIG_USB_ISP116X_HCD is not set
1475CONFIG_USB_OHCI_HCD=y 1487CONFIG_USB_OHCI_HCD=y
1476# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1488# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1489# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1490# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1477CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1491CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1478# CONFIG_USB_UHCI_HCD is not set 1492# CONFIG_USB_UHCI_HCD is not set
1479# CONFIG_USB_SL811_HCD is not set 1493# CONFIG_USB_SL811_HCD is not set
@@ -1506,49 +1520,10 @@ CONFIG_USB_STORAGE=m
1506# CONFIG_USB_LIBUSUAL is not set 1520# CONFIG_USB_LIBUSUAL is not set
1507 1521
1508# 1522#
1509# USB Input Devices
1510#
1511CONFIG_USB_HID=y
1512CONFIG_USB_HIDINPUT_POWERBOOK=y
1513# CONFIG_HID_FF is not set
1514# CONFIG_USB_HIDDEV is not set
1515# CONFIG_USB_AIPTEK is not set
1516# CONFIG_USB_WACOM is not set
1517# CONFIG_USB_ACECAD is not set
1518# CONFIG_USB_KBTAB is not set
1519# CONFIG_USB_POWERMATE is not set
1520# CONFIG_USB_TOUCHSCREEN is not set
1521# CONFIG_USB_YEALINK is not set
1522# CONFIG_USB_XPAD is not set
1523# CONFIG_USB_ATI_REMOTE is not set
1524# CONFIG_USB_ATI_REMOTE2 is not set
1525# CONFIG_USB_KEYSPAN_REMOTE is not set
1526CONFIG_USB_APPLETOUCH=y
1527
1528#
1529# USB Imaging devices 1523# USB Imaging devices
1530# 1524#
1531# CONFIG_USB_MDC800 is not set 1525# CONFIG_USB_MDC800 is not set
1532# CONFIG_USB_MICROTEK is not set 1526# CONFIG_USB_MICROTEK is not set
1533
1534#
1535# USB Network Adapters
1536#
1537# CONFIG_USB_CATC is not set
1538# CONFIG_USB_KAWETH is not set
1539# CONFIG_USB_PEGASUS is not set
1540# CONFIG_USB_RTL8150 is not set
1541CONFIG_USB_USBNET_MII=m
1542CONFIG_USB_USBNET=m
1543CONFIG_USB_NET_AX8817X=m
1544CONFIG_USB_NET_CDCETHER=m
1545# CONFIG_USB_NET_GL620A is not set
1546CONFIG_USB_NET_NET1080=m
1547# CONFIG_USB_NET_PLUSB is not set
1548# CONFIG_USB_NET_MCS7830 is not set
1549# CONFIG_USB_NET_RNDIS_HOST is not set
1550# CONFIG_USB_NET_CDC_SUBSET is not set
1551CONFIG_USB_NET_ZAURUS=m
1552CONFIG_USB_MON=y 1527CONFIG_USB_MON=y
1553 1528
1554# 1529#
@@ -1620,6 +1595,7 @@ CONFIG_USB_EZUSB=y
1620# CONFIG_USB_RIO500 is not set 1595# CONFIG_USB_RIO500 is not set
1621# CONFIG_USB_LEGOTOWER is not set 1596# CONFIG_USB_LEGOTOWER is not set
1622# CONFIG_USB_LCD is not set 1597# CONFIG_USB_LCD is not set
1598# CONFIG_USB_BERRY_CHARGE is not set
1623# CONFIG_USB_LED is not set 1599# CONFIG_USB_LED is not set
1624# CONFIG_USB_CYPRESS_CY7C63 is not set 1600# CONFIG_USB_CYPRESS_CY7C63 is not set
1625# CONFIG_USB_CYTHERM is not set 1601# CONFIG_USB_CYTHERM is not set
@@ -1630,6 +1606,7 @@ CONFIG_USB_APPLEDISPLAY=m
1630# CONFIG_USB_SISUSBVGA is not set 1606# CONFIG_USB_SISUSBVGA is not set
1631# CONFIG_USB_LD is not set 1607# CONFIG_USB_LD is not set
1632# CONFIG_USB_TRANCEVIBRATOR is not set 1608# CONFIG_USB_TRANCEVIBRATOR is not set
1609# CONFIG_USB_IOWARRIOR is not set
1633# CONFIG_USB_TEST is not set 1610# CONFIG_USB_TEST is not set
1634 1611
1635# 1612#
@@ -1640,10 +1617,6 @@ CONFIG_USB_APPLEDISPLAY=m
1640# USB Gadget Support 1617# USB Gadget Support
1641# 1618#
1642# CONFIG_USB_GADGET is not set 1619# CONFIG_USB_GADGET is not set
1643
1644#
1645# MMC/SD Card support
1646#
1647# CONFIG_MMC is not set 1620# CONFIG_MMC is not set
1648 1621
1649# 1622#
@@ -1676,6 +1649,7 @@ CONFIG_LEDS_TRIGGER_IDE_DISK=y
1676# 1649#
1677# Real Time Clock 1650# Real Time Clock
1678# 1651#
1652CONFIG_RTC_LIB=y
1679# CONFIG_RTC_CLASS is not set 1653# CONFIG_RTC_CLASS is not set
1680 1654
1681# 1655#
@@ -1692,10 +1666,6 @@ CONFIG_LEDS_TRIGGER_IDE_DISK=y
1692# 1666#
1693 1667
1694# 1668#
1695# Virtualization
1696#
1697
1698#
1699# File systems 1669# File systems
1700# 1670#
1701CONFIG_EXT2_FS=y 1671CONFIG_EXT2_FS=y
@@ -1731,7 +1701,6 @@ CONFIG_FUSE_FS=m
1731CONFIG_ISO9660_FS=y 1701CONFIG_ISO9660_FS=y
1732CONFIG_JOLIET=y 1702CONFIG_JOLIET=y
1733CONFIG_ZISOFS=y 1703CONFIG_ZISOFS=y
1734CONFIG_ZISOFS_FS=y
1735CONFIG_UDF_FS=m 1704CONFIG_UDF_FS=m
1736CONFIG_UDF_NLS=y 1705CONFIG_UDF_NLS=y
1737 1706
@@ -1796,6 +1765,7 @@ CONFIG_NFS_ACL_SUPPORT=y
1796CONFIG_NFS_COMMON=y 1765CONFIG_NFS_COMMON=y
1797CONFIG_SUNRPC=y 1766CONFIG_SUNRPC=y
1798CONFIG_SUNRPC_GSS=y 1767CONFIG_SUNRPC_GSS=y
1768# CONFIG_SUNRPC_BIND34 is not set
1799CONFIG_RPCSEC_GSS_KRB5=y 1769CONFIG_RPCSEC_GSS_KRB5=y
1800# CONFIG_RPCSEC_GSS_SPKM3 is not set 1770# CONFIG_RPCSEC_GSS_SPKM3 is not set
1801CONFIG_SMB_FS=m 1771CONFIG_SMB_FS=m
@@ -1826,6 +1796,7 @@ CONFIG_MSDOS_PARTITION=y
1826# CONFIG_SUN_PARTITION is not set 1796# CONFIG_SUN_PARTITION is not set
1827# CONFIG_KARMA_PARTITION is not set 1797# CONFIG_KARMA_PARTITION is not set
1828# CONFIG_EFI_PARTITION is not set 1798# CONFIG_EFI_PARTITION is not set
1799# CONFIG_SYSV68_PARTITION is not set
1829 1800
1830# 1801#
1831# Native Language Support 1802# Native Language Support
@@ -1875,6 +1846,7 @@ CONFIG_NLS_UTF8=m
1875# Distributed Lock Manager 1846# Distributed Lock Manager
1876# 1847#
1877# CONFIG_DLM is not set 1848# CONFIG_DLM is not set
1849# CONFIG_UCC_SLOW is not set
1878 1850
1879# 1851#
1880# Library routines 1852# Library routines
@@ -1882,6 +1854,7 @@ CONFIG_NLS_UTF8=m
1882CONFIG_BITREVERSE=y 1854CONFIG_BITREVERSE=y
1883CONFIG_CRC_CCITT=y 1855CONFIG_CRC_CCITT=y
1884CONFIG_CRC16=y 1856CONFIG_CRC16=y
1857# CONFIG_CRC_ITU_T is not set
1885CONFIG_CRC32=y 1858CONFIG_CRC32=y
1886CONFIG_LIBCRC32C=m 1859CONFIG_LIBCRC32C=m
1887CONFIG_ZLIB_INFLATE=y 1860CONFIG_ZLIB_INFLATE=y
@@ -1891,13 +1864,16 @@ CONFIG_TEXTSEARCH_KMP=m
1891CONFIG_TEXTSEARCH_BM=m 1864CONFIG_TEXTSEARCH_BM=m
1892CONFIG_TEXTSEARCH_FSM=m 1865CONFIG_TEXTSEARCH_FSM=m
1893CONFIG_PLIST=y 1866CONFIG_PLIST=y
1894CONFIG_IOMAP_COPY=y 1867CONFIG_HAS_IOMEM=y
1868CONFIG_HAS_IOPORT=y
1869CONFIG_HAS_DMA=y
1895 1870
1896# 1871#
1897# Instrumentation Support 1872# Instrumentation Support
1898# 1873#
1899CONFIG_PROFILING=y 1874CONFIG_PROFILING=y
1900CONFIG_OPROFILE=y 1875CONFIG_OPROFILE=y
1876# CONFIG_KPROBES is not set
1901 1877
1902# 1878#
1903# Kernel hacking 1879# Kernel hacking
@@ -1909,15 +1885,15 @@ CONFIG_MAGIC_SYSRQ=y
1909# CONFIG_DEBUG_FS is not set 1885# CONFIG_DEBUG_FS is not set
1910# CONFIG_HEADERS_CHECK is not set 1886# CONFIG_HEADERS_CHECK is not set
1911CONFIG_DEBUG_KERNEL=y 1887CONFIG_DEBUG_KERNEL=y
1912CONFIG_LOG_BUF_SHIFT=14 1888# CONFIG_DEBUG_SHIRQ is not set
1913CONFIG_DETECT_SOFTLOCKUP=y 1889CONFIG_DETECT_SOFTLOCKUP=y
1914# CONFIG_SCHEDSTATS is not set 1890# CONFIG_SCHEDSTATS is not set
1891# CONFIG_TIMER_STATS is not set
1915# CONFIG_DEBUG_SLAB is not set 1892# CONFIG_DEBUG_SLAB is not set
1916# CONFIG_DEBUG_RT_MUTEXES is not set 1893# CONFIG_DEBUG_RT_MUTEXES is not set
1917# CONFIG_RT_MUTEX_TESTER is not set 1894# CONFIG_RT_MUTEX_TESTER is not set
1918# CONFIG_DEBUG_SPINLOCK is not set 1895# CONFIG_DEBUG_SPINLOCK is not set
1919# CONFIG_DEBUG_MUTEXES is not set 1896# CONFIG_DEBUG_MUTEXES is not set
1920# CONFIG_DEBUG_RWSEMS is not set
1921# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1897# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1922# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1898# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1923# CONFIG_DEBUG_KOBJECT is not set 1899# CONFIG_DEBUG_KOBJECT is not set
@@ -1927,6 +1903,9 @@ CONFIG_DEBUG_BUGVERBOSE=y
1927# CONFIG_DEBUG_LIST is not set 1903# CONFIG_DEBUG_LIST is not set
1928# CONFIG_FORCED_INLINING is not set 1904# CONFIG_FORCED_INLINING is not set
1929# CONFIG_RCU_TORTURE_TEST is not set 1905# CONFIG_RCU_TORTURE_TEST is not set
1906# CONFIG_FAULT_INJECTION is not set
1907# CONFIG_DEBUG_STACKOVERFLOW is not set
1908# CONFIG_DEBUG_STACK_USAGE is not set
1930CONFIG_DEBUGGER=y 1909CONFIG_DEBUGGER=y
1931CONFIG_XMON=y 1910CONFIG_XMON=y
1932CONFIG_XMON_DEFAULT=y 1911CONFIG_XMON_DEFAULT=y
@@ -1962,8 +1941,11 @@ CONFIG_CRYPTO_TGR192=m
1962# CONFIG_CRYPTO_GF128MUL is not set 1941# CONFIG_CRYPTO_GF128MUL is not set
1963CONFIG_CRYPTO_ECB=m 1942CONFIG_CRYPTO_ECB=m
1964CONFIG_CRYPTO_CBC=y 1943CONFIG_CRYPTO_CBC=y
1944CONFIG_CRYPTO_PCBC=m
1965# CONFIG_CRYPTO_LRW is not set 1945# CONFIG_CRYPTO_LRW is not set
1946# CONFIG_CRYPTO_CRYPTD is not set
1966CONFIG_CRYPTO_DES=y 1947CONFIG_CRYPTO_DES=y
1948# CONFIG_CRYPTO_FCRYPT is not set
1967CONFIG_CRYPTO_BLOWFISH=m 1949CONFIG_CRYPTO_BLOWFISH=m
1968CONFIG_CRYPTO_TWOFISH=m 1950CONFIG_CRYPTO_TWOFISH=m
1969CONFIG_CRYPTO_TWOFISH_COMMON=m 1951CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -1978,6 +1960,7 @@ CONFIG_CRYPTO_ANUBIS=m
1978CONFIG_CRYPTO_DEFLATE=m 1960CONFIG_CRYPTO_DEFLATE=m
1979CONFIG_CRYPTO_MICHAEL_MIC=m 1961CONFIG_CRYPTO_MICHAEL_MIC=m
1980CONFIG_CRYPTO_CRC32C=m 1962CONFIG_CRYPTO_CRC32C=m
1963# CONFIG_CRYPTO_CAMELLIA is not set
1981# CONFIG_CRYPTO_TEST is not set 1964# CONFIG_CRYPTO_TEST is not set
1982 1965
1983# 1966#
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 126b9f87df..6e503d98da 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc5 3# Linux kernel version: 2.6.22-rc6
4# Mon Jan 22 22:28:58 2007 4# Tue Jun 26 14:15:02 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -27,6 +27,7 @@ CONFIG_GENERIC_TBSYNC=y
27CONFIG_AUDIT_ARCH=y 27CONFIG_AUDIT_ARCH=y
28CONFIG_GENERIC_BUG=y 28CONFIG_GENERIC_BUG=y
29# CONFIG_DEFAULT_UIMAGE is not set 29# CONFIG_DEFAULT_UIMAGE is not set
30CONFIG_PPC64_SWSUSP=y
30 31
31# 32#
32# Processor support 33# Processor support
@@ -41,6 +42,7 @@ CONFIG_PPC_DCR=y
41CONFIG_PPC_OF_PLATFORM_PCI=y 42CONFIG_PPC_OF_PLATFORM_PCI=y
42CONFIG_ALTIVEC=y 43CONFIG_ALTIVEC=y
43CONFIG_PPC_STD_MMU=y 44CONFIG_PPC_STD_MMU=y
45CONFIG_PPC_MM_SLICES=y
44CONFIG_VIRT_CPU_ACCOUNTING=y 46CONFIG_VIRT_CPU_ACCOUNTING=y
45CONFIG_SMP=y 47CONFIG_SMP=y
46CONFIG_NR_CPUS=32 48CONFIG_NR_CPUS=32
@@ -61,20 +63,23 @@ CONFIG_LOCALVERSION_AUTO=y
61CONFIG_SWAP=y 63CONFIG_SWAP=y
62CONFIG_SYSVIPC=y 64CONFIG_SYSVIPC=y
63# CONFIG_IPC_NS is not set 65# CONFIG_IPC_NS is not set
66CONFIG_SYSVIPC_SYSCTL=y
64CONFIG_POSIX_MQUEUE=y 67CONFIG_POSIX_MQUEUE=y
65# CONFIG_BSD_PROCESS_ACCT is not set 68# CONFIG_BSD_PROCESS_ACCT is not set
66CONFIG_TASKSTATS=y 69CONFIG_TASKSTATS=y
67CONFIG_TASK_DELAY_ACCT=y 70CONFIG_TASK_DELAY_ACCT=y
71# CONFIG_TASK_XACCT is not set
68# CONFIG_UTS_NS is not set 72# CONFIG_UTS_NS is not set
69# CONFIG_AUDIT is not set 73# CONFIG_AUDIT is not set
70CONFIG_IKCONFIG=y 74CONFIG_IKCONFIG=y
71CONFIG_IKCONFIG_PROC=y 75CONFIG_IKCONFIG_PROC=y
76CONFIG_LOG_BUF_SHIFT=17
72CONFIG_CPUSETS=y 77CONFIG_CPUSETS=y
73CONFIG_SYSFS_DEPRECATED=y 78CONFIG_SYSFS_DEPRECATED=y
74CONFIG_RELAY=y 79CONFIG_RELAY=y
80CONFIG_BLK_DEV_INITRD=y
75CONFIG_INITRAMFS_SOURCE="" 81CONFIG_INITRAMFS_SOURCE=""
76CONFIG_CC_OPTIMIZE_FOR_SIZE=y 82CONFIG_CC_OPTIMIZE_FOR_SIZE=y
77# CONFIG_TASK_XACCT is not set
78CONFIG_SYSCTL=y 83CONFIG_SYSCTL=y
79# CONFIG_EMBEDDED is not set 84# CONFIG_EMBEDDED is not set
80CONFIG_SYSCTL_SYSCALL=y 85CONFIG_SYSCTL_SYSCALL=y
@@ -87,14 +92,19 @@ CONFIG_BUG=y
87CONFIG_ELF_CORE=y 92CONFIG_ELF_CORE=y
88CONFIG_BASE_FULL=y 93CONFIG_BASE_FULL=y
89CONFIG_FUTEX=y 94CONFIG_FUTEX=y
95CONFIG_ANON_INODES=y
90CONFIG_EPOLL=y 96CONFIG_EPOLL=y
97CONFIG_SIGNALFD=y
98CONFIG_TIMERFD=y
99CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 100CONFIG_SHMEM=y
92CONFIG_SLAB=y
93CONFIG_VM_EVENT_COUNTERS=y 101CONFIG_VM_EVENT_COUNTERS=y
102CONFIG_SLAB=y
103# CONFIG_SLUB is not set
104# CONFIG_SLOB is not set
94CONFIG_RT_MUTEXES=y 105CONFIG_RT_MUTEXES=y
95# CONFIG_TINY_SHMEM is not set 106# CONFIG_TINY_SHMEM is not set
96CONFIG_BASE_SMALL=0 107CONFIG_BASE_SMALL=0
97# CONFIG_SLOB is not set
98 108
99# 109#
100# Loadable module support 110# Loadable module support
@@ -133,24 +143,54 @@ CONFIG_PPC_MULTIPLATFORM=y
133# CONFIG_EMBEDDED6xx is not set 143# CONFIG_EMBEDDED6xx is not set
134# CONFIG_APUS is not set 144# CONFIG_APUS is not set
135CONFIG_PPC_PSERIES=y 145CONFIG_PPC_PSERIES=y
146CONFIG_PPC_SPLPAR=y
147CONFIG_EEH=y
148CONFIG_SCANLOG=m
149CONFIG_LPARCFG=y
136CONFIG_PPC_ISERIES=y 150CONFIG_PPC_ISERIES=y
151
152#
153# iSeries device drivers
154#
155CONFIG_VIODASD=y
156CONFIG_VIOCD=m
157CONFIG_VIOTAPE=m
158CONFIG_VIOPATH=y
137# CONFIG_PPC_MPC52xx is not set 159# CONFIG_PPC_MPC52xx is not set
160# CONFIG_PPC_MPC5200 is not set
138CONFIG_PPC_PMAC=y 161CONFIG_PPC_PMAC=y
139CONFIG_PPC_PMAC64=y 162CONFIG_PPC_PMAC64=y
140CONFIG_PPC_MAPLE=y 163CONFIG_PPC_MAPLE=y
141# CONFIG_PPC_PASEMI is not set 164# CONFIG_PPC_PASEMI is not set
165CONFIG_PPC_CELLEB=y
166# CONFIG_PPC_PS3 is not set
142CONFIG_PPC_CELL=y 167CONFIG_PPC_CELL=y
143CONFIG_PPC_CELL_NATIVE=y 168CONFIG_PPC_CELL_NATIVE=y
144CONFIG_PPC_IBM_CELL_BLADE=y 169CONFIG_PPC_IBM_CELL_BLADE=y
145# CONFIG_PPC_PS3 is not set 170
171#
172# Cell Broadband Engine options
173#
174CONFIG_SPU_FS=m
175CONFIG_SPU_FS_64K_LS=y
176CONFIG_SPU_BASE=y
177CONFIG_CBE_RAS=y
178CONFIG_CBE_THERM=m
179CONFIG_CBE_CPUFREQ=m
180# CONFIG_PQ2ADS is not set
146CONFIG_PPC_NATIVE=y 181CONFIG_PPC_NATIVE=y
147CONFIG_UDBG_RTAS_CONSOLE=y 182CONFIG_UDBG_RTAS_CONSOLE=y
183CONFIG_PPC_UDBG_BEAT=y
148CONFIG_XICS=y 184CONFIG_XICS=y
185CONFIG_MPIC=y
186# CONFIG_MPIC_WEIRD is not set
187CONFIG_PPC_I8259=y
149CONFIG_U3_DART=y 188CONFIG_U3_DART=y
150CONFIG_PPC_RTAS=y 189CONFIG_PPC_RTAS=y
151CONFIG_RTAS_ERROR_LOGGING=y 190CONFIG_RTAS_ERROR_LOGGING=y
152CONFIG_RTAS_PROC=y 191CONFIG_RTAS_PROC=y
153CONFIG_RTAS_FLASH=m 192CONFIG_RTAS_FLASH=m
193CONFIG_PPC_PMI=m
154CONFIG_MMIO_NVRAM=y 194CONFIG_MMIO_NVRAM=y
155CONFIG_MPIC_U3_HT_IRQS=y 195CONFIG_MPIC_U3_HT_IRQS=y
156CONFIG_IBMVIO=y 196CONFIG_IBMVIO=y
@@ -171,18 +211,12 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y
171CONFIG_CPU_FREQ_GOV_USERSPACE=y 211CONFIG_CPU_FREQ_GOV_USERSPACE=y
172# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set 212# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
173# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set 213# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
174CONFIG_CPU_FREQ_PMAC64=y
175# CONFIG_WANT_EARLY_SERIAL is not set
176CONFIG_MPIC=y
177 214
178# 215#
179# Cell Broadband Engine options 216# CPU Frequency drivers
180# 217#
181CONFIG_SPU_FS=m 218CONFIG_CPU_FREQ_PMAC64=y
182CONFIG_SPU_BASE=y 219# CONFIG_CPM2 is not set
183CONFIG_CBE_RAS=y
184CONFIG_CBE_THERM=m
185CONFIG_CBE_CPUFREQ=m
186 220
187# 221#
188# Kernel options 222# Kernel options
@@ -205,10 +239,6 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
205CONFIG_KEXEC=y 239CONFIG_KEXEC=y
206# CONFIG_CRASH_DUMP is not set 240# CONFIG_CRASH_DUMP is not set
207CONFIG_IRQ_ALL_CPUS=y 241CONFIG_IRQ_ALL_CPUS=y
208CONFIG_PPC_SPLPAR=y
209CONFIG_EEH=y
210CONFIG_SCANLOG=m
211CONFIG_LPARCFG=y
212# CONFIG_NUMA is not set 242# CONFIG_NUMA is not set
213CONFIG_ARCH_SELECT_MEMORY_MODEL=y 243CONFIG_ARCH_SELECT_MEMORY_MODEL=y
214CONFIG_ARCH_FLATMEM_ENABLE=y 244CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -227,35 +257,35 @@ CONFIG_MEMORY_HOTPLUG=y
227CONFIG_MEMORY_HOTPLUG_SPARSE=y 257CONFIG_MEMORY_HOTPLUG_SPARSE=y
228CONFIG_SPLIT_PTLOCK_CPUS=4 258CONFIG_SPLIT_PTLOCK_CPUS=4
229CONFIG_RESOURCES_64BIT=y 259CONFIG_RESOURCES_64BIT=y
260CONFIG_ZONE_DMA_FLAG=1
230CONFIG_ARCH_MEMORY_PROBE=y 261CONFIG_ARCH_MEMORY_PROBE=y
262CONFIG_PPC_HAS_HASH_64K=y
231# CONFIG_PPC_64K_PAGES is not set 263# CONFIG_PPC_64K_PAGES is not set
232# CONFIG_SCHED_SMT is not set 264# CONFIG_SCHED_SMT is not set
233CONFIG_PROC_DEVICETREE=y 265CONFIG_PROC_DEVICETREE=y
234# CONFIG_CMDLINE_BOOL is not set 266# CONFIG_CMDLINE_BOOL is not set
235# CONFIG_PM is not set 267# CONFIG_PM is not set
236CONFIG_SECCOMP=y 268CONFIG_SECCOMP=y
269# CONFIG_WANT_DEVICE_TREE is not set
237CONFIG_ISA_DMA_API=y 270CONFIG_ISA_DMA_API=y
238 271
239# 272#
240# Bus options 273# Bus options
241# 274#
275CONFIG_ZONE_DMA=y
242CONFIG_GENERIC_ISA_DMA=y 276CONFIG_GENERIC_ISA_DMA=y
243# CONFIG_MPIC_WEIRD is not set
244CONFIG_PPC_I8259=y
245# CONFIG_PPC_INDIRECT_PCI is not set 277# CONFIG_PPC_INDIRECT_PCI is not set
246CONFIG_PCI=y 278CONFIG_PCI=y
247CONFIG_PCI_DOMAINS=y 279CONFIG_PCI_DOMAINS=y
248# CONFIG_PCIEPORTBUS is not set 280# CONFIG_PCIEPORTBUS is not set
281CONFIG_ARCH_SUPPORTS_MSI=y
282CONFIG_PCI_MSI=y
249# CONFIG_PCI_DEBUG is not set 283# CONFIG_PCI_DEBUG is not set
250 284
251# 285#
252# PCCARD (PCMCIA/CardBus) support 286# PCCARD (PCMCIA/CardBus) support
253# 287#
254# CONFIG_PCCARD is not set 288# CONFIG_PCCARD is not set
255
256#
257# PCI Hotplug Support
258#
259CONFIG_HOTPLUG_PCI=m 289CONFIG_HOTPLUG_PCI=m
260# CONFIG_HOTPLUG_PCI_FAKE is not set 290# CONFIG_HOTPLUG_PCI_FAKE is not set
261# CONFIG_HOTPLUG_PCI_CPCI is not set 291# CONFIG_HOTPLUG_PCI_CPCI is not set
@@ -272,14 +302,15 @@ CONFIG_NET=y
272# 302#
273# Networking options 303# Networking options
274# 304#
275# CONFIG_NETDEBUG is not set
276CONFIG_PACKET=y 305CONFIG_PACKET=y
277# CONFIG_PACKET_MMAP is not set 306# CONFIG_PACKET_MMAP is not set
278CONFIG_UNIX=y 307CONFIG_UNIX=y
279CONFIG_XFRM=y 308CONFIG_XFRM=y
280CONFIG_XFRM_USER=m 309CONFIG_XFRM_USER=m
281# CONFIG_XFRM_SUB_POLICY is not set 310# CONFIG_XFRM_SUB_POLICY is not set
311# CONFIG_XFRM_MIGRATE is not set
282CONFIG_NET_KEY=m 312CONFIG_NET_KEY=m
313# CONFIG_NET_KEY_MIGRATE is not set
283CONFIG_INET=y 314CONFIG_INET=y
284CONFIG_IP_MULTICAST=y 315CONFIG_IP_MULTICAST=y
285# CONFIG_IP_ADVANCED_ROUTER is not set 316# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -304,10 +335,6 @@ CONFIG_INET_TCP_DIAG=y
304CONFIG_TCP_CONG_CUBIC=y 335CONFIG_TCP_CONG_CUBIC=y
305CONFIG_DEFAULT_TCP_CONG="cubic" 336CONFIG_DEFAULT_TCP_CONG="cubic"
306# CONFIG_TCP_MD5SIG is not set 337# CONFIG_TCP_MD5SIG is not set
307
308#
309# IP: Virtual Server Configuration
310#
311# CONFIG_IP_VS is not set 338# CONFIG_IP_VS is not set
312# CONFIG_IPV6 is not set 339# CONFIG_IPV6 is not set
313# CONFIG_INET6_XFRM_TUNNEL is not set 340# CONFIG_INET6_XFRM_TUNNEL is not set
@@ -323,8 +350,6 @@ CONFIG_NETFILTER_NETLINK=y
323CONFIG_NETFILTER_NETLINK_QUEUE=m 350CONFIG_NETFILTER_NETLINK_QUEUE=m
324CONFIG_NETFILTER_NETLINK_LOG=m 351CONFIG_NETFILTER_NETLINK_LOG=m
325CONFIG_NF_CONNTRACK_ENABLED=m 352CONFIG_NF_CONNTRACK_ENABLED=m
326CONFIG_NF_CONNTRACK_SUPPORT=y
327# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
328CONFIG_NF_CONNTRACK=m 353CONFIG_NF_CONNTRACK=m
329CONFIG_NF_CT_ACCT=y 354CONFIG_NF_CT_ACCT=y
330CONFIG_NF_CONNTRACK_MARK=y 355CONFIG_NF_CONNTRACK_MARK=y
@@ -337,10 +362,42 @@ CONFIG_NF_CONNTRACK_H323=m
337CONFIG_NF_CONNTRACK_IRC=m 362CONFIG_NF_CONNTRACK_IRC=m
338CONFIG_NF_CONNTRACK_NETBIOS_NS=m 363CONFIG_NF_CONNTRACK_NETBIOS_NS=m
339CONFIG_NF_CONNTRACK_PPTP=m 364CONFIG_NF_CONNTRACK_PPTP=m
365# CONFIG_NF_CONNTRACK_SANE is not set
340CONFIG_NF_CONNTRACK_SIP=m 366CONFIG_NF_CONNTRACK_SIP=m
341CONFIG_NF_CONNTRACK_TFTP=m 367CONFIG_NF_CONNTRACK_TFTP=m
342CONFIG_NF_CT_NETLINK=m 368CONFIG_NF_CT_NETLINK=m
343# CONFIG_NETFILTER_XTABLES is not set 369CONFIG_NETFILTER_XTABLES=m
370CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
371CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
372CONFIG_NETFILTER_XT_TARGET_DSCP=m
373CONFIG_NETFILTER_XT_TARGET_MARK=m
374CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
375CONFIG_NETFILTER_XT_TARGET_NFLOG=m
376CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
377CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
378CONFIG_NETFILTER_XT_MATCH_COMMENT=m
379CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
380CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
381CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
382CONFIG_NETFILTER_XT_MATCH_DCCP=m
383CONFIG_NETFILTER_XT_MATCH_DSCP=m
384CONFIG_NETFILTER_XT_MATCH_ESP=m
385CONFIG_NETFILTER_XT_MATCH_HELPER=m
386CONFIG_NETFILTER_XT_MATCH_LENGTH=m
387CONFIG_NETFILTER_XT_MATCH_LIMIT=m
388CONFIG_NETFILTER_XT_MATCH_MAC=m
389CONFIG_NETFILTER_XT_MATCH_MARK=m
390CONFIG_NETFILTER_XT_MATCH_POLICY=m
391CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
392CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
393CONFIG_NETFILTER_XT_MATCH_QUOTA=m
394CONFIG_NETFILTER_XT_MATCH_REALM=m
395CONFIG_NETFILTER_XT_MATCH_SCTP=m
396CONFIG_NETFILTER_XT_MATCH_STATE=m
397CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
398CONFIG_NETFILTER_XT_MATCH_STRING=m
399CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
400CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
344 401
345# 402#
346# IP: Netfilter Configuration 403# IP: Netfilter Configuration
@@ -348,20 +405,45 @@ CONFIG_NF_CT_NETLINK=m
348CONFIG_NF_CONNTRACK_IPV4=m 405CONFIG_NF_CONNTRACK_IPV4=m
349CONFIG_NF_CONNTRACK_PROC_COMPAT=y 406CONFIG_NF_CONNTRACK_PROC_COMPAT=y
350CONFIG_IP_NF_QUEUE=m 407CONFIG_IP_NF_QUEUE=m
351 408CONFIG_IP_NF_IPTABLES=m
352# 409CONFIG_IP_NF_MATCH_IPRANGE=m
353# DCCP Configuration (EXPERIMENTAL) 410CONFIG_IP_NF_MATCH_TOS=m
354# 411CONFIG_IP_NF_MATCH_RECENT=m
412CONFIG_IP_NF_MATCH_ECN=m
413CONFIG_IP_NF_MATCH_AH=m
414CONFIG_IP_NF_MATCH_TTL=m
415CONFIG_IP_NF_MATCH_OWNER=m
416CONFIG_IP_NF_MATCH_ADDRTYPE=m
417CONFIG_IP_NF_FILTER=m
418CONFIG_IP_NF_TARGET_REJECT=m
419CONFIG_IP_NF_TARGET_LOG=m
420CONFIG_IP_NF_TARGET_ULOG=m
421CONFIG_NF_NAT=m
422CONFIG_NF_NAT_NEEDED=y
423CONFIG_IP_NF_TARGET_MASQUERADE=m
424CONFIG_IP_NF_TARGET_REDIRECT=m
425CONFIG_IP_NF_TARGET_NETMAP=m
426CONFIG_IP_NF_TARGET_SAME=m
427CONFIG_NF_NAT_SNMP_BASIC=m
428CONFIG_NF_NAT_PROTO_GRE=m
429CONFIG_NF_NAT_FTP=m
430CONFIG_NF_NAT_IRC=m
431CONFIG_NF_NAT_TFTP=m
432CONFIG_NF_NAT_AMANDA=m
433CONFIG_NF_NAT_PPTP=m
434CONFIG_NF_NAT_H323=m
435CONFIG_NF_NAT_SIP=m
436CONFIG_IP_NF_MANGLE=m
437CONFIG_IP_NF_TARGET_TOS=m
438CONFIG_IP_NF_TARGET_ECN=m
439CONFIG_IP_NF_TARGET_TTL=m
440CONFIG_IP_NF_TARGET_CLUSTERIP=m
441CONFIG_IP_NF_RAW=m
442CONFIG_IP_NF_ARPTABLES=m
443CONFIG_IP_NF_ARPFILTER=m
444CONFIG_IP_NF_ARP_MANGLE=m
355# CONFIG_IP_DCCP is not set 445# CONFIG_IP_DCCP is not set
356
357#
358# SCTP Configuration (EXPERIMENTAL)
359#
360# CONFIG_IP_SCTP is not set 446# CONFIG_IP_SCTP is not set
361
362#
363# TIPC Configuration (EXPERIMENTAL)
364#
365# CONFIG_TIPC is not set 447# CONFIG_TIPC is not set
366# CONFIG_ATM is not set 448# CONFIG_ATM is not set
367# CONFIG_BRIDGE is not set 449# CONFIG_BRIDGE is not set
@@ -380,6 +462,7 @@ CONFIG_LLC=y
380# QoS and/or fair queueing 462# QoS and/or fair queueing
381# 463#
382# CONFIG_NET_SCHED is not set 464# CONFIG_NET_SCHED is not set
465CONFIG_NET_CLS_ROUTE=y
383 466
384# 467#
385# Network testing 468# Network testing
@@ -388,7 +471,16 @@ CONFIG_LLC=y
388# CONFIG_HAMRADIO is not set 471# CONFIG_HAMRADIO is not set
389# CONFIG_IRDA is not set 472# CONFIG_IRDA is not set
390# CONFIG_BT is not set 473# CONFIG_BT is not set
474# CONFIG_AF_RXRPC is not set
475
476#
477# Wireless
478#
479# CONFIG_CFG80211 is not set
480# CONFIG_WIRELESS_EXT is not set
481# CONFIG_MAC80211 is not set
391# CONFIG_IEEE80211 is not set 482# CONFIG_IEEE80211 is not set
483# CONFIG_RFKILL is not set
392 484
393# 485#
394# Device Drivers 486# Device Drivers
@@ -401,16 +493,13 @@ CONFIG_STANDALONE=y
401CONFIG_PREVENT_FIRMWARE_BUILD=y 493CONFIG_PREVENT_FIRMWARE_BUILD=y
402CONFIG_FW_LOADER=y 494CONFIG_FW_LOADER=y
403# CONFIG_DEBUG_DRIVER is not set 495# CONFIG_DEBUG_DRIVER is not set
496# CONFIG_DEBUG_DEVRES is not set
404# CONFIG_SYS_HYPERVISOR is not set 497# CONFIG_SYS_HYPERVISOR is not set
405 498
406# 499#
407# Connector - unified userspace <-> kernelspace linker 500# Connector - unified userspace <-> kernelspace linker
408# 501#
409# CONFIG_CONNECTOR is not set 502# CONFIG_CONNECTOR is not set
410
411#
412# Memory Technology Devices (MTD)
413#
414# CONFIG_MTD is not set 503# CONFIG_MTD is not set
415 504
416# 505#
@@ -421,6 +510,7 @@ CONFIG_FW_LOADER=y
421# 510#
422# Plug and Play support 511# Plug and Play support
423# 512#
513# CONFIG_PNPACPI is not set
424 514
425# 515#
426# Block devices 516# Block devices
@@ -440,19 +530,16 @@ CONFIG_BLK_DEV_RAM=y
440CONFIG_BLK_DEV_RAM_COUNT=16 530CONFIG_BLK_DEV_RAM_COUNT=16
441CONFIG_BLK_DEV_RAM_SIZE=65536 531CONFIG_BLK_DEV_RAM_SIZE=65536
442CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 532CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
443CONFIG_BLK_DEV_INITRD=y
444# CONFIG_CDROM_PKTCDVD is not set 533# CONFIG_CDROM_PKTCDVD is not set
445# CONFIG_ATA_OVER_ETH is not set 534# CONFIG_ATA_OVER_ETH is not set
446 535
447# 536#
448# Misc devices 537# Misc devices
449# 538#
539# CONFIG_PHANTOM is not set
450# CONFIG_SGI_IOC4 is not set 540# CONFIG_SGI_IOC4 is not set
451# CONFIG_TIFM_CORE is not set 541# CONFIG_TIFM_CORE is not set
452 542# CONFIG_BLINK is not set
453#
454# ATA/ATAPI/MFM/RLL support
455#
456CONFIG_IDE=y 543CONFIG_IDE=y
457CONFIG_BLK_DEV_IDE=y 544CONFIG_BLK_DEV_IDE=y
458 545
@@ -467,6 +554,7 @@ CONFIG_BLK_DEV_IDECD=y
467# CONFIG_BLK_DEV_IDEFLOPPY is not set 554# CONFIG_BLK_DEV_IDEFLOPPY is not set
468# CONFIG_BLK_DEV_IDESCSI is not set 555# CONFIG_BLK_DEV_IDESCSI is not set
469# CONFIG_IDE_TASK_IOCTL is not set 556# CONFIG_IDE_TASK_IOCTL is not set
557CONFIG_IDE_PROC_FS=y
470 558
471# 559#
472# IDE chipset support/bugfixes 560# IDE chipset support/bugfixes
@@ -474,12 +562,12 @@ CONFIG_BLK_DEV_IDECD=y
474CONFIG_IDE_GENERIC=y 562CONFIG_IDE_GENERIC=y
475CONFIG_BLK_DEV_IDEPCI=y 563CONFIG_BLK_DEV_IDEPCI=y
476CONFIG_IDEPCI_SHARE_IRQ=y 564CONFIG_IDEPCI_SHARE_IRQ=y
565CONFIG_IDEPCI_PCIBUS_ORDER=y
477# CONFIG_BLK_DEV_OFFBOARD is not set 566# CONFIG_BLK_DEV_OFFBOARD is not set
478CONFIG_BLK_DEV_GENERIC=y 567CONFIG_BLK_DEV_GENERIC=y
479# CONFIG_BLK_DEV_OPTI621 is not set 568# CONFIG_BLK_DEV_OPTI621 is not set
480CONFIG_BLK_DEV_IDEDMA_PCI=y 569CONFIG_BLK_DEV_IDEDMA_PCI=y
481# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 570# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
482CONFIG_IDEDMA_PCI_AUTO=y
483# CONFIG_IDEDMA_ONLYDISK is not set 571# CONFIG_IDEDMA_ONLYDISK is not set
484# CONFIG_BLK_DEV_AEC62XX is not set 572# CONFIG_BLK_DEV_AEC62XX is not set
485# CONFIG_BLK_DEV_ALI15X3 is not set 573# CONFIG_BLK_DEV_ALI15X3 is not set
@@ -494,6 +582,7 @@ CONFIG_BLK_DEV_AMD74XX=y
494# CONFIG_BLK_DEV_JMICRON is not set 582# CONFIG_BLK_DEV_JMICRON is not set
495# CONFIG_BLK_DEV_SC1200 is not set 583# CONFIG_BLK_DEV_SC1200 is not set
496# CONFIG_BLK_DEV_PIIX is not set 584# CONFIG_BLK_DEV_PIIX is not set
585# CONFIG_BLK_DEV_IT8213 is not set
497# CONFIG_BLK_DEV_IT821X is not set 586# CONFIG_BLK_DEV_IT821X is not set
498# CONFIG_BLK_DEV_NS87415 is not set 587# CONFIG_BLK_DEV_NS87415 is not set
499# CONFIG_BLK_DEV_PDC202XX_OLD is not set 588# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -504,13 +593,14 @@ CONFIG_BLK_DEV_AMD74XX=y
504# CONFIG_BLK_DEV_SLC90E66 is not set 593# CONFIG_BLK_DEV_SLC90E66 is not set
505# CONFIG_BLK_DEV_TRM290 is not set 594# CONFIG_BLK_DEV_TRM290 is not set
506# CONFIG_BLK_DEV_VIA82CXXX is not set 595# CONFIG_BLK_DEV_VIA82CXXX is not set
596# CONFIG_BLK_DEV_TC86C001 is not set
597CONFIG_BLK_DEV_CELLEB=y
507CONFIG_BLK_DEV_IDE_PMAC=y 598CONFIG_BLK_DEV_IDE_PMAC=y
508CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y 599CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
509CONFIG_BLK_DEV_IDEDMA_PMAC=y 600CONFIG_BLK_DEV_IDEDMA_PMAC=y
510# CONFIG_IDE_ARM is not set 601# CONFIG_IDE_ARM is not set
511CONFIG_BLK_DEV_IDEDMA=y 602CONFIG_BLK_DEV_IDEDMA=y
512# CONFIG_IDEDMA_IVB is not set 603# CONFIG_IDEDMA_IVB is not set
513CONFIG_IDEDMA_AUTO=y
514# CONFIG_BLK_DEV_HD is not set 604# CONFIG_BLK_DEV_HD is not set
515 605
516# 606#
@@ -540,6 +630,7 @@ CONFIG_SCSI_MULTI_LUN=y
540CONFIG_SCSI_CONSTANTS=y 630CONFIG_SCSI_CONSTANTS=y
541# CONFIG_SCSI_LOGGING is not set 631# CONFIG_SCSI_LOGGING is not set
542# CONFIG_SCSI_SCAN_ASYNC is not set 632# CONFIG_SCSI_SCAN_ASYNC is not set
633CONFIG_SCSI_WAIT_SCAN=m
543 634
544# 635#
545# SCSI Transports 636# SCSI Transports
@@ -593,11 +684,8 @@ CONFIG_SCSI_LPFC=m
593# CONFIG_SCSI_DC390T is not set 684# CONFIG_SCSI_DC390T is not set
594CONFIG_SCSI_DEBUG=m 685CONFIG_SCSI_DEBUG=m
595# CONFIG_SCSI_SRP is not set 686# CONFIG_SCSI_SRP is not set
596
597#
598# Serial ATA (prod) and Parallel ATA (experimental) drivers
599#
600CONFIG_ATA=y 687CONFIG_ATA=y
688CONFIG_ATA_NONSTANDARD=y
601# CONFIG_SATA_AHCI is not set 689# CONFIG_SATA_AHCI is not set
602CONFIG_SATA_SVW=y 690CONFIG_SATA_SVW=y
603# CONFIG_ATA_PIIX is not set 691# CONFIG_ATA_PIIX is not set
@@ -613,10 +701,12 @@ CONFIG_SATA_SVW=y
613# CONFIG_SATA_ULI is not set 701# CONFIG_SATA_ULI is not set
614# CONFIG_SATA_VIA is not set 702# CONFIG_SATA_VIA is not set
615# CONFIG_SATA_VITESSE is not set 703# CONFIG_SATA_VITESSE is not set
704# CONFIG_SATA_INIC162X is not set
616# CONFIG_PATA_ALI is not set 705# CONFIG_PATA_ALI is not set
617# CONFIG_PATA_AMD is not set 706# CONFIG_PATA_AMD is not set
618# CONFIG_PATA_ARTOP is not set 707# CONFIG_PATA_ARTOP is not set
619# CONFIG_PATA_ATIIXP is not set 708# CONFIG_PATA_ATIIXP is not set
709# CONFIG_PATA_CMD640_PCI is not set
620# CONFIG_PATA_CMD64X is not set 710# CONFIG_PATA_CMD64X is not set
621# CONFIG_PATA_CS5520 is not set 711# CONFIG_PATA_CS5520 is not set
622# CONFIG_PATA_CS5530 is not set 712# CONFIG_PATA_CS5530 is not set
@@ -628,6 +718,7 @@ CONFIG_SATA_SVW=y
628# CONFIG_PATA_HPT3X2N is not set 718# CONFIG_PATA_HPT3X2N is not set
629# CONFIG_PATA_HPT3X3 is not set 719# CONFIG_PATA_HPT3X3 is not set
630# CONFIG_PATA_IT821X is not set 720# CONFIG_PATA_IT821X is not set
721# CONFIG_PATA_IT8213 is not set
631# CONFIG_PATA_JMICRON is not set 722# CONFIG_PATA_JMICRON is not set
632# CONFIG_PATA_TRIFLEX is not set 723# CONFIG_PATA_TRIFLEX is not set
633# CONFIG_PATA_MARVELL is not set 724# CONFIG_PATA_MARVELL is not set
@@ -647,6 +738,7 @@ CONFIG_SATA_SVW=y
647# CONFIG_PATA_SIS is not set 738# CONFIG_PATA_SIS is not set
648# CONFIG_PATA_VIA is not set 739# CONFIG_PATA_VIA is not set
649CONFIG_PATA_WINBOND=y 740CONFIG_PATA_WINBOND=y
741CONFIG_PATA_SCC=y
650 742
651# 743#
652# Multi-device support (RAID and LVM) 744# Multi-device support (RAID and LVM)
@@ -669,6 +761,7 @@ CONFIG_DM_MIRROR=m
669CONFIG_DM_ZERO=m 761CONFIG_DM_ZERO=m
670CONFIG_DM_MULTIPATH=m 762CONFIG_DM_MULTIPATH=m
671CONFIG_DM_MULTIPATH_EMC=m 763CONFIG_DM_MULTIPATH_EMC=m
764# CONFIG_DM_DELAY is not set
672 765
673# 766#
674# Fusion MPT device support 767# Fusion MPT device support
@@ -681,28 +774,26 @@ CONFIG_DM_MULTIPATH_EMC=m
681# 774#
682# IEEE 1394 (FireWire) support 775# IEEE 1394 (FireWire) support
683# 776#
777# CONFIG_FIREWIRE is not set
684CONFIG_IEEE1394=y 778CONFIG_IEEE1394=y
685 779
686# 780#
687# Subsystem Options 781# Subsystem Options
688# 782#
689# CONFIG_IEEE1394_VERBOSEDEBUG is not set 783# CONFIG_IEEE1394_VERBOSEDEBUG is not set
690# CONFIG_IEEE1394_OUI_DB is not set
691CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
692CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
693# CONFIG_IEEE1394_EXPORT_FULL_API is not set
694 784
695# 785#
696# Device Drivers 786# Controllers
697# 787#
698# CONFIG_IEEE1394_PCILYNX is not set 788# CONFIG_IEEE1394_PCILYNX is not set
699CONFIG_IEEE1394_OHCI1394=y 789CONFIG_IEEE1394_OHCI1394=y
700 790
701# 791#
702# Protocol Drivers 792# Protocols
703# 793#
704CONFIG_IEEE1394_VIDEO1394=m 794CONFIG_IEEE1394_VIDEO1394=m
705CONFIG_IEEE1394_SBP2=m 795CONFIG_IEEE1394_SBP2=m
796CONFIG_IEEE1394_ETH1394_ROM_ENTRY=y
706CONFIG_IEEE1394_ETH1394=m 797CONFIG_IEEE1394_ETH1394=m
707CONFIG_IEEE1394_DV1394=m 798CONFIG_IEEE1394_DV1394=m
708CONFIG_IEEE1394_RAWIO=y 799CONFIG_IEEE1394_RAWIO=y
@@ -711,10 +802,7 @@ CONFIG_IEEE1394_RAWIO=y
711# I2O device support 802# I2O device support
712# 803#
713# CONFIG_I2O is not set 804# CONFIG_I2O is not set
714 805CONFIG_MACINTOSH_DRIVERS=y
715#
716# Macintosh device drivers
717#
718CONFIG_ADB_PMU=y 806CONFIG_ADB_PMU=y
719# CONFIG_ADB_PMU_LED is not set 807# CONFIG_ADB_PMU_LED is not set
720CONFIG_PMAC_SMU=y 808CONFIG_PMAC_SMU=y
@@ -734,16 +822,23 @@ CONFIG_DUMMY=m
734CONFIG_BONDING=m 822CONFIG_BONDING=m
735# CONFIG_EQUALIZER is not set 823# CONFIG_EQUALIZER is not set
736CONFIG_TUN=m 824CONFIG_TUN=m
737
738#
739# ARCnet devices
740#
741# CONFIG_ARCNET is not set 825# CONFIG_ARCNET is not set
826CONFIG_PHYLIB=m
742 827
743# 828#
744# PHY device support 829# MII PHY device drivers
745# 830#
746# CONFIG_PHYLIB is not set 831CONFIG_MARVELL_PHY=m
832# CONFIG_DAVICOM_PHY is not set
833# CONFIG_QSEMI_PHY is not set
834# CONFIG_LXT_PHY is not set
835# CONFIG_CICADA_PHY is not set
836# CONFIG_VITESSE_PHY is not set
837# CONFIG_SMSC_PHY is not set
838CONFIG_BROADCOM_PHY=m
839CONFIG_FIXED_PHY=m
840CONFIG_FIXED_MII_10_FDX=y
841CONFIG_FIXED_MII_100_FDX=y
747 842
748# 843#
749# Ethernet (10 or 100Mbit) 844# Ethernet (10 or 100Mbit)
@@ -782,10 +877,8 @@ CONFIG_E100=y
782# CONFIG_EPIC100 is not set 877# CONFIG_EPIC100 is not set
783# CONFIG_SUNDANCE is not set 878# CONFIG_SUNDANCE is not set
784# CONFIG_VIA_RHINE is not set 879# CONFIG_VIA_RHINE is not set
785 880# CONFIG_SC92031 is not set
786# 881CONFIG_NETDEV_1000=y
787# Ethernet (1000 Mbit)
788#
789CONFIG_ACENIC=y 882CONFIG_ACENIC=y
790CONFIG_ACENIC_OMIT_TIGON_I=y 883CONFIG_ACENIC_OMIT_TIGON_I=y
791# CONFIG_DL2K is not set 884# CONFIG_DL2K is not set
@@ -805,33 +898,37 @@ CONFIG_TIGON3=y
805# CONFIG_BNX2 is not set 898# CONFIG_BNX2 is not set
806CONFIG_SPIDER_NET=m 899CONFIG_SPIDER_NET=m
807# CONFIG_QLA3XXX is not set 900# CONFIG_QLA3XXX is not set
808 901# CONFIG_ATL1 is not set
809# 902CONFIG_NETDEV_10000=y
810# Ethernet (10000 Mbit)
811#
812# CONFIG_CHELSIO_T1 is not set 903# CONFIG_CHELSIO_T1 is not set
904# CONFIG_CHELSIO_T3 is not set
813CONFIG_IXGB=m 905CONFIG_IXGB=m
814# CONFIG_IXGB_NAPI is not set 906# CONFIG_IXGB_NAPI is not set
815# CONFIG_S2IO is not set 907# CONFIG_S2IO is not set
816# CONFIG_MYRI10GE is not set 908# CONFIG_MYRI10GE is not set
817# CONFIG_NETXEN_NIC is not set 909# CONFIG_NETXEN_NIC is not set
818 910CONFIG_PASEMI_MAC=m
819# 911# CONFIG_MLX4_CORE is not set
820# Token Ring devices
821#
822CONFIG_TR=y 912CONFIG_TR=y
823CONFIG_IBMOL=y 913CONFIG_IBMOL=y
824# CONFIG_3C359 is not set 914# CONFIG_3C359 is not set
825# CONFIG_TMS380TR is not set 915# CONFIG_TMS380TR is not set
826 916
827# 917#
828# Wireless LAN (non-hamradio) 918# Wireless LAN
829# 919#
830# CONFIG_NET_RADIO is not set 920# CONFIG_WLAN_PRE80211 is not set
921# CONFIG_WLAN_80211 is not set
831 922
832# 923#
833# Wan interfaces 924# USB Network Adapters
834# 925#
926# CONFIG_USB_CATC is not set
927# CONFIG_USB_KAWETH is not set
928# CONFIG_USB_PEGASUS is not set
929# CONFIG_USB_RTL8150 is not set
930# CONFIG_USB_USBNET_MII is not set
931# CONFIG_USB_USBNET is not set
835# CONFIG_WAN is not set 932# CONFIG_WAN is not set
836CONFIG_ISERIES_VETH=m 933CONFIG_ISERIES_VETH=m
837# CONFIG_FDDI is not set 934# CONFIG_FDDI is not set
@@ -851,7 +948,6 @@ CONFIG_SLHC=m
851# CONFIG_SHAPER is not set 948# CONFIG_SHAPER is not set
852CONFIG_NETCONSOLE=y 949CONFIG_NETCONSOLE=y
853CONFIG_NETPOLL=y 950CONFIG_NETPOLL=y
854CONFIG_NETPOLL_RX=y
855CONFIG_NETPOLL_TRAP=y 951CONFIG_NETPOLL_TRAP=y
856CONFIG_NET_POLL_CONTROLLER=y 952CONFIG_NET_POLL_CONTROLLER=y
857 953
@@ -870,6 +966,7 @@ CONFIG_NET_POLL_CONTROLLER=y
870# 966#
871CONFIG_INPUT=y 967CONFIG_INPUT=y
872# CONFIG_INPUT_FF_MEMLESS is not set 968# CONFIG_INPUT_FF_MEMLESS is not set
969# CONFIG_INPUT_POLLDEV is not set
873 970
874# 971#
875# Userland interfaces 972# Userland interfaces
@@ -895,12 +992,25 @@ CONFIG_KEYBOARD_ATKBD=y
895# CONFIG_KEYBOARD_STOWAWAY is not set 992# CONFIG_KEYBOARD_STOWAWAY is not set
896CONFIG_INPUT_MOUSE=y 993CONFIG_INPUT_MOUSE=y
897CONFIG_MOUSE_PS2=y 994CONFIG_MOUSE_PS2=y
995CONFIG_MOUSE_PS2_ALPS=y
996CONFIG_MOUSE_PS2_LOGIPS2PP=y
997CONFIG_MOUSE_PS2_SYNAPTICS=y
998CONFIG_MOUSE_PS2_LIFEBOOK=y
999CONFIG_MOUSE_PS2_TRACKPOINT=y
1000# CONFIG_MOUSE_PS2_TOUCHKIT is not set
898# CONFIG_MOUSE_SERIAL is not set 1001# CONFIG_MOUSE_SERIAL is not set
1002# CONFIG_MOUSE_APPLETOUCH is not set
899# CONFIG_MOUSE_VSXXXAA is not set 1003# CONFIG_MOUSE_VSXXXAA is not set
900# CONFIG_INPUT_JOYSTICK is not set 1004# CONFIG_INPUT_JOYSTICK is not set
1005# CONFIG_INPUT_TABLET is not set
901# CONFIG_INPUT_TOUCHSCREEN is not set 1006# CONFIG_INPUT_TOUCHSCREEN is not set
902CONFIG_INPUT_MISC=y 1007CONFIG_INPUT_MISC=y
903CONFIG_INPUT_PCSPKR=m 1008CONFIG_INPUT_PCSPKR=m
1009# CONFIG_INPUT_ATI_REMOTE is not set
1010# CONFIG_INPUT_ATI_REMOTE2 is not set
1011# CONFIG_INPUT_KEYSPAN_REMOTE is not set
1012# CONFIG_INPUT_POWERMATE is not set
1013# CONFIG_INPUT_YEALINK is not set
904# CONFIG_INPUT_UINPUT is not set 1014# CONFIG_INPUT_UINPUT is not set
905 1015
906# 1016#
@@ -940,7 +1050,12 @@ CONFIG_SERIAL_CORE=y
940CONFIG_SERIAL_CORE_CONSOLE=y 1050CONFIG_SERIAL_CORE_CONSOLE=y
941# CONFIG_SERIAL_PMACZILOG is not set 1051# CONFIG_SERIAL_PMACZILOG is not set
942CONFIG_SERIAL_ICOM=m 1052CONFIG_SERIAL_ICOM=m
1053CONFIG_SERIAL_TXX9=y
1054CONFIG_HAS_TXX9_SERIAL=y
1055CONFIG_SERIAL_TXX9_NR_UARTS=6
1056CONFIG_SERIAL_TXX9_CONSOLE=y
943# CONFIG_SERIAL_JSM is not set 1057# CONFIG_SERIAL_JSM is not set
1058# CONFIG_SERIAL_OF_PLATFORM is not set
944CONFIG_UNIX98_PTYS=y 1059CONFIG_UNIX98_PTYS=y
945CONFIG_LEGACY_PTYS=y 1060CONFIG_LEGACY_PTYS=y
946CONFIG_LEGACY_PTY_COUNT=256 1061CONFIG_LEGACY_PTY_COUNT=256
@@ -948,21 +1063,17 @@ CONFIG_HVC_DRIVER=y
948CONFIG_HVC_CONSOLE=y 1063CONFIG_HVC_CONSOLE=y
949CONFIG_HVC_ISERIES=y 1064CONFIG_HVC_ISERIES=y
950CONFIG_HVC_RTAS=y 1065CONFIG_HVC_RTAS=y
1066CONFIG_HVC_BEAT=y
951CONFIG_HVCS=m 1067CONFIG_HVCS=m
952 1068
953# 1069#
954# IPMI 1070# IPMI
955# 1071#
956# CONFIG_IPMI_HANDLER is not set 1072# CONFIG_IPMI_HANDLER is not set
957
958#
959# Watchdog Cards
960#
961# CONFIG_WATCHDOG is not set 1073# CONFIG_WATCHDOG is not set
962# CONFIG_HW_RANDOM is not set 1074# CONFIG_HW_RANDOM is not set
963CONFIG_GEN_RTC=y 1075CONFIG_GEN_RTC=y
964# CONFIG_GEN_RTC_X is not set 1076# CONFIG_GEN_RTC_X is not set
965# CONFIG_DTLK is not set
966# CONFIG_R3964 is not set 1077# CONFIG_R3964 is not set
967# CONFIG_APPLICOM is not set 1078# CONFIG_APPLICOM is not set
968# CONFIG_AGP is not set 1079# CONFIG_AGP is not set
@@ -975,11 +1086,9 @@ CONFIG_MAX_RAW_DEVS=256
975# TPM devices 1086# TPM devices
976# 1087#
977# CONFIG_TCG_TPM is not set 1088# CONFIG_TCG_TPM is not set
978 1089CONFIG_DEVPORT=y
979#
980# I2C support
981#
982CONFIG_I2C=y 1090CONFIG_I2C=y
1091CONFIG_I2C_BOARDINFO=y
983CONFIG_I2C_CHARDEV=y 1092CONFIG_I2C_CHARDEV=y
984 1093
985# 1094#
@@ -1006,14 +1115,15 @@ CONFIG_I2C_POWERMAC=y
1006# CONFIG_I2C_PARPORT_LIGHT is not set 1115# CONFIG_I2C_PARPORT_LIGHT is not set
1007# CONFIG_I2C_PROSAVAGE is not set 1116# CONFIG_I2C_PROSAVAGE is not set
1008# CONFIG_I2C_SAVAGE4 is not set 1117# CONFIG_I2C_SAVAGE4 is not set
1118# CONFIG_I2C_SIMTEC is not set
1009# CONFIG_I2C_SIS5595 is not set 1119# CONFIG_I2C_SIS5595 is not set
1010# CONFIG_I2C_SIS630 is not set 1120# CONFIG_I2C_SIS630 is not set
1011# CONFIG_I2C_SIS96X is not set 1121# CONFIG_I2C_SIS96X is not set
1012# CONFIG_I2C_STUB is not set 1122# CONFIG_I2C_STUB is not set
1123# CONFIG_I2C_TINY_USB is not set
1013# CONFIG_I2C_VIA is not set 1124# CONFIG_I2C_VIA is not set
1014# CONFIG_I2C_VIAPRO is not set 1125# CONFIG_I2C_VIAPRO is not set
1015# CONFIG_I2C_VOODOO3 is not set 1126# CONFIG_I2C_VOODOO3 is not set
1016# CONFIG_I2C_PCA_ISA is not set
1017 1127
1018# 1128#
1019# Miscellaneous I2C Chip support 1129# Miscellaneous I2C Chip support
@@ -1040,37 +1150,56 @@ CONFIG_I2C_POWERMAC=y
1040# Dallas's 1-wire bus 1150# Dallas's 1-wire bus
1041# 1151#
1042# CONFIG_W1 is not set 1152# CONFIG_W1 is not set
1153# CONFIG_HWMON is not set
1043 1154
1044# 1155#
1045# Hardware Monitoring support 1156# Multifunction device drivers
1046# 1157#
1047# CONFIG_HWMON is not set 1158# CONFIG_MFD_SM501 is not set
1048# CONFIG_HWMON_VID is not set
1049 1159
1050# 1160#
1051# Multimedia devices 1161# Multimedia devices
1052# 1162#
1053# CONFIG_VIDEO_DEV is not set 1163# CONFIG_VIDEO_DEV is not set
1164# CONFIG_DVB_CORE is not set
1165# CONFIG_DAB is not set
1054 1166
1055# 1167#
1056# Digital Video Broadcasting Devices 1168# Graphics support
1057# 1169#
1058# CONFIG_DVB is not set 1170CONFIG_BACKLIGHT_LCD_SUPPORT=y
1059# CONFIG_USB_DABUSB is not set 1171CONFIG_BACKLIGHT_CLASS_DEVICE=y
1172CONFIG_LCD_CLASS_DEVICE=y
1060 1173
1061# 1174#
1062# Graphics support 1175# Display device support
1063# 1176#
1064CONFIG_FIRMWARE_EDID=y 1177CONFIG_DISPLAY_SUPPORT=y
1178
1179#
1180# Display hardware drivers
1181#
1182# CONFIG_VGASTATE is not set
1065CONFIG_FB=y 1183CONFIG_FB=y
1184CONFIG_FIRMWARE_EDID=y
1066CONFIG_FB_DDC=y 1185CONFIG_FB_DDC=y
1067CONFIG_FB_CFB_FILLRECT=y 1186CONFIG_FB_CFB_FILLRECT=y
1068CONFIG_FB_CFB_COPYAREA=y 1187CONFIG_FB_CFB_COPYAREA=y
1069CONFIG_FB_CFB_IMAGEBLIT=y 1188CONFIG_FB_CFB_IMAGEBLIT=y
1189# CONFIG_FB_SYS_FILLRECT is not set
1190# CONFIG_FB_SYS_COPYAREA is not set
1191# CONFIG_FB_SYS_IMAGEBLIT is not set
1192# CONFIG_FB_SYS_FOPS is not set
1193CONFIG_FB_DEFERRED_IO=y
1194# CONFIG_FB_SVGALIB is not set
1070CONFIG_FB_MACMODES=y 1195CONFIG_FB_MACMODES=y
1071# CONFIG_FB_BACKLIGHT is not set 1196CONFIG_FB_BACKLIGHT=y
1072CONFIG_FB_MODE_HELPERS=y 1197CONFIG_FB_MODE_HELPERS=y
1073CONFIG_FB_TILEBLITTING=y 1198CONFIG_FB_TILEBLITTING=y
1199
1200#
1201# Frame buffer hardware drivers
1202#
1074# CONFIG_FB_CIRRUS is not set 1203# CONFIG_FB_CIRRUS is not set
1075# CONFIG_FB_PM2 is not set 1204# CONFIG_FB_PM2 is not set
1076# CONFIG_FB_CYBER2000 is not set 1205# CONFIG_FB_CYBER2000 is not set
@@ -1090,16 +1219,21 @@ CONFIG_FB_MATROX_MAVEN=m
1090CONFIG_FB_MATROX_MULTIHEAD=y 1219CONFIG_FB_MATROX_MULTIHEAD=y
1091CONFIG_FB_RADEON=y 1220CONFIG_FB_RADEON=y
1092CONFIG_FB_RADEON_I2C=y 1221CONFIG_FB_RADEON_I2C=y
1222CONFIG_FB_RADEON_BACKLIGHT=y
1093# CONFIG_FB_RADEON_DEBUG is not set 1223# CONFIG_FB_RADEON_DEBUG is not set
1094# CONFIG_FB_ATY128 is not set 1224# CONFIG_FB_ATY128 is not set
1095# CONFIG_FB_ATY is not set 1225# CONFIG_FB_ATY is not set
1226# CONFIG_FB_S3 is not set
1096# CONFIG_FB_SAVAGE is not set 1227# CONFIG_FB_SAVAGE is not set
1097# CONFIG_FB_SIS is not set 1228# CONFIG_FB_SIS is not set
1098# CONFIG_FB_NEOMAGIC is not set 1229# CONFIG_FB_NEOMAGIC is not set
1099# CONFIG_FB_KYRO is not set 1230# CONFIG_FB_KYRO is not set
1100# CONFIG_FB_3DFX is not set 1231# CONFIG_FB_3DFX is not set
1101# CONFIG_FB_VOODOO1 is not set 1232# CONFIG_FB_VOODOO1 is not set
1233# CONFIG_FB_VT8623 is not set
1102# CONFIG_FB_TRIDENT is not set 1234# CONFIG_FB_TRIDENT is not set
1235# CONFIG_FB_ARK is not set
1236# CONFIG_FB_PM3 is not set
1103CONFIG_FB_IBM_GXT4500=y 1237CONFIG_FB_IBM_GXT4500=y
1104# CONFIG_FB_VIRTUAL is not set 1238# CONFIG_FB_VIRTUAL is not set
1105 1239
@@ -1113,19 +1247,10 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
1113# CONFIG_FONTS is not set 1247# CONFIG_FONTS is not set
1114CONFIG_FONT_8x8=y 1248CONFIG_FONT_8x8=y
1115CONFIG_FONT_8x16=y 1249CONFIG_FONT_8x16=y
1116
1117#
1118# Logo configuration
1119#
1120CONFIG_LOGO=y 1250CONFIG_LOGO=y
1121CONFIG_LOGO_LINUX_MONO=y 1251CONFIG_LOGO_LINUX_MONO=y
1122CONFIG_LOGO_LINUX_VGA16=y 1252CONFIG_LOGO_LINUX_VGA16=y
1123CONFIG_LOGO_LINUX_CLUT224=y 1253CONFIG_LOGO_LINUX_CLUT224=y
1124CONFIG_BACKLIGHT_LCD_SUPPORT=y
1125CONFIG_BACKLIGHT_CLASS_DEVICE=y
1126CONFIG_BACKLIGHT_DEVICE=y
1127CONFIG_LCD_CLASS_DEVICE=y
1128CONFIG_LCD_DEVICE=y
1129 1254
1130# 1255#
1131# Sound 1256# Sound
@@ -1242,6 +1367,12 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m
1242# 1367#
1243# CONFIG_SND_USB_AUDIO is not set 1368# CONFIG_SND_USB_AUDIO is not set
1244# CONFIG_SND_USB_USX2Y is not set 1369# CONFIG_SND_USB_USX2Y is not set
1370# CONFIG_SND_USB_CAIAQ is not set
1371
1372#
1373# System on Chip audio support
1374#
1375# CONFIG_SND_SOC is not set
1245 1376
1246# 1377#
1247# Open Sound System 1378# Open Sound System
@@ -1252,6 +1383,15 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m
1252# HID Devices 1383# HID Devices
1253# 1384#
1254CONFIG_HID=y 1385CONFIG_HID=y
1386# CONFIG_HID_DEBUG is not set
1387
1388#
1389# USB Input Devices
1390#
1391CONFIG_USB_HID=y
1392# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1393# CONFIG_HID_FF is not set
1394CONFIG_USB_HIDDEV=y
1255 1395
1256# 1396#
1257# USB support 1397# USB support
@@ -1266,9 +1406,8 @@ CONFIG_USB=y
1266# Miscellaneous USB options 1406# Miscellaneous USB options
1267# 1407#
1268CONFIG_USB_DEVICEFS=y 1408CONFIG_USB_DEVICEFS=y
1269# CONFIG_USB_BANDWIDTH is not set 1409CONFIG_USB_DEVICE_CLASS=y
1270# CONFIG_USB_DYNAMIC_MINORS is not set 1410# CONFIG_USB_DYNAMIC_MINORS is not set
1271# CONFIG_USB_MULTITHREAD_PROBE is not set
1272# CONFIG_USB_OTG is not set 1411# CONFIG_USB_OTG is not set
1273 1412
1274# 1413#
@@ -1278,9 +1417,12 @@ CONFIG_USB_EHCI_HCD=y
1278# CONFIG_USB_EHCI_SPLIT_ISO is not set 1417# CONFIG_USB_EHCI_SPLIT_ISO is not set
1279# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1418# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1280CONFIG_USB_EHCI_TT_NEWSCHED=y 1419CONFIG_USB_EHCI_TT_NEWSCHED=y
1420CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
1281# CONFIG_USB_ISP116X_HCD is not set 1421# CONFIG_USB_ISP116X_HCD is not set
1282CONFIG_USB_OHCI_HCD=y 1422CONFIG_USB_OHCI_HCD=y
1283# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1423# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1424# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1425CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
1284CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1426CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1285# CONFIG_USB_UHCI_HCD is not set 1427# CONFIG_USB_UHCI_HCD is not set
1286# CONFIG_USB_SL811_HCD is not set 1428# CONFIG_USB_SL811_HCD is not set
@@ -1314,40 +1456,10 @@ CONFIG_USB_STORAGE=m
1314# CONFIG_USB_LIBUSUAL is not set 1456# CONFIG_USB_LIBUSUAL is not set
1315 1457
1316# 1458#
1317# USB Input Devices
1318#
1319CONFIG_USB_HID=y
1320# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1321# CONFIG_HID_FF is not set
1322CONFIG_USB_HIDDEV=y
1323# CONFIG_USB_AIPTEK is not set
1324# CONFIG_USB_WACOM is not set
1325# CONFIG_USB_ACECAD is not set
1326# CONFIG_USB_KBTAB is not set
1327# CONFIG_USB_POWERMATE is not set
1328# CONFIG_USB_TOUCHSCREEN is not set
1329# CONFIG_USB_YEALINK is not set
1330# CONFIG_USB_XPAD is not set
1331# CONFIG_USB_ATI_REMOTE is not set
1332# CONFIG_USB_ATI_REMOTE2 is not set
1333# CONFIG_USB_KEYSPAN_REMOTE is not set
1334# CONFIG_USB_APPLETOUCH is not set
1335
1336#
1337# USB Imaging devices 1459# USB Imaging devices
1338# 1460#
1339# CONFIG_USB_MDC800 is not set 1461# CONFIG_USB_MDC800 is not set
1340# CONFIG_USB_MICROTEK is not set 1462# CONFIG_USB_MICROTEK is not set
1341
1342#
1343# USB Network Adapters
1344#
1345# CONFIG_USB_CATC is not set
1346# CONFIG_USB_KAWETH is not set
1347# CONFIG_USB_PEGASUS is not set
1348# CONFIG_USB_RTL8150 is not set
1349# CONFIG_USB_USBNET_MII is not set
1350# CONFIG_USB_USBNET is not set
1351# CONFIG_USB_MON is not set 1463# CONFIG_USB_MON is not set
1352 1464
1353# 1465#
@@ -1369,6 +1481,7 @@ CONFIG_USB_HIDDEV=y
1369# CONFIG_USB_RIO500 is not set 1481# CONFIG_USB_RIO500 is not set
1370# CONFIG_USB_LEGOTOWER is not set 1482# CONFIG_USB_LEGOTOWER is not set
1371# CONFIG_USB_LCD is not set 1483# CONFIG_USB_LCD is not set
1484# CONFIG_USB_BERRY_CHARGE is not set
1372# CONFIG_USB_LED is not set 1485# CONFIG_USB_LED is not set
1373# CONFIG_USB_CYPRESS_CY7C63 is not set 1486# CONFIG_USB_CYPRESS_CY7C63 is not set
1374# CONFIG_USB_CYTHERM is not set 1487# CONFIG_USB_CYTHERM is not set
@@ -1379,6 +1492,7 @@ CONFIG_USB_APPLEDISPLAY=m
1379# CONFIG_USB_SISUSBVGA is not set 1492# CONFIG_USB_SISUSBVGA is not set
1380# CONFIG_USB_LD is not set 1493# CONFIG_USB_LD is not set
1381# CONFIG_USB_TRANCEVIBRATOR is not set 1494# CONFIG_USB_TRANCEVIBRATOR is not set
1495# CONFIG_USB_IOWARRIOR is not set
1382# CONFIG_USB_TEST is not set 1496# CONFIG_USB_TEST is not set
1383 1497
1384# 1498#
@@ -1389,10 +1503,6 @@ CONFIG_USB_APPLEDISPLAY=m
1389# USB Gadget Support 1503# USB Gadget Support
1390# 1504#
1391# CONFIG_USB_GADGET is not set 1505# CONFIG_USB_GADGET is not set
1392
1393#
1394# MMC/SD Card support
1395#
1396# CONFIG_MMC is not set 1506# CONFIG_MMC is not set
1397 1507
1398# 1508#
@@ -1417,8 +1527,11 @@ CONFIG_INFINIBAND=m
1417CONFIG_INFINIBAND_ADDR_TRANS=y 1527CONFIG_INFINIBAND_ADDR_TRANS=y
1418CONFIG_INFINIBAND_MTHCA=m 1528CONFIG_INFINIBAND_MTHCA=m
1419CONFIG_INFINIBAND_MTHCA_DEBUG=y 1529CONFIG_INFINIBAND_MTHCA_DEBUG=y
1530# CONFIG_INFINIBAND_IPATH is not set
1420# CONFIG_INFINIBAND_AMSO1100 is not set 1531# CONFIG_INFINIBAND_AMSO1100 is not set
1532# CONFIG_MLX4_INFINIBAND is not set
1421CONFIG_INFINIBAND_IPOIB=m 1533CONFIG_INFINIBAND_IPOIB=m
1534# CONFIG_INFINIBAND_IPOIB_CM is not set
1422CONFIG_INFINIBAND_IPOIB_DEBUG=y 1535CONFIG_INFINIBAND_IPOIB_DEBUG=y
1423# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set 1536# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
1424# CONFIG_INFINIBAND_SRP is not set 1537# CONFIG_INFINIBAND_SRP is not set
@@ -1447,10 +1560,6 @@ CONFIG_INFINIBAND_ISER=m
1447# 1560#
1448 1561
1449# 1562#
1450# Virtualization
1451#
1452
1453#
1454# File systems 1563# File systems
1455# 1564#
1456CONFIG_EXT2_FS=y 1565CONFIG_EXT2_FS=y
@@ -1567,6 +1676,7 @@ CONFIG_NFS_ACL_SUPPORT=y
1567CONFIG_NFS_COMMON=y 1676CONFIG_NFS_COMMON=y
1568CONFIG_SUNRPC=y 1677CONFIG_SUNRPC=y
1569CONFIG_SUNRPC_GSS=y 1678CONFIG_SUNRPC_GSS=y
1679# CONFIG_SUNRPC_BIND34 is not set
1570CONFIG_RPCSEC_GSS_KRB5=y 1680CONFIG_RPCSEC_GSS_KRB5=y
1571CONFIG_RPCSEC_GSS_SPKM3=m 1681CONFIG_RPCSEC_GSS_SPKM3=m
1572# CONFIG_SMB_FS is not set 1682# CONFIG_SMB_FS is not set
@@ -1602,6 +1712,7 @@ CONFIG_MSDOS_PARTITION=y
1602# CONFIG_SUN_PARTITION is not set 1712# CONFIG_SUN_PARTITION is not set
1603# CONFIG_KARMA_PARTITION is not set 1713# CONFIG_KARMA_PARTITION is not set
1604# CONFIG_EFI_PARTITION is not set 1714# CONFIG_EFI_PARTITION is not set
1715# CONFIG_SYSV68_PARTITION is not set
1605 1716
1606# 1717#
1607# Native Language Support 1718# Native Language Support
@@ -1651,15 +1762,7 @@ CONFIG_NLS_UTF8=m
1651# Distributed Lock Manager 1762# Distributed Lock Manager
1652# 1763#
1653# CONFIG_DLM is not set 1764# CONFIG_DLM is not set
1654 1765# CONFIG_UCC_SLOW is not set
1655#
1656# iSeries device drivers
1657#
1658# CONFIG_VIOCONS is not set
1659CONFIG_VIODASD=y
1660CONFIG_VIOCD=m
1661CONFIG_VIOTAPE=m
1662CONFIG_VIOPATH=y
1663 1766
1664# 1767#
1665# Library routines 1768# Library routines
@@ -1667,14 +1770,19 @@ CONFIG_VIOPATH=y
1667CONFIG_BITREVERSE=y 1770CONFIG_BITREVERSE=y
1668CONFIG_CRC_CCITT=m 1771CONFIG_CRC_CCITT=m
1669# CONFIG_CRC16 is not set 1772# CONFIG_CRC16 is not set
1773# CONFIG_CRC_ITU_T is not set
1670CONFIG_CRC32=y 1774CONFIG_CRC32=y
1671CONFIG_LIBCRC32C=m 1775CONFIG_LIBCRC32C=m
1672CONFIG_ZLIB_INFLATE=y 1776CONFIG_ZLIB_INFLATE=y
1673CONFIG_ZLIB_DEFLATE=m 1777CONFIG_ZLIB_DEFLATE=m
1674CONFIG_TEXTSEARCH=y 1778CONFIG_TEXTSEARCH=y
1675CONFIG_TEXTSEARCH_KMP=m 1779CONFIG_TEXTSEARCH_KMP=m
1780CONFIG_TEXTSEARCH_BM=m
1781CONFIG_TEXTSEARCH_FSM=m
1676CONFIG_PLIST=y 1782CONFIG_PLIST=y
1677CONFIG_IOMAP_COPY=y 1783CONFIG_HAS_IOMEM=y
1784CONFIG_HAS_IOPORT=y
1785CONFIG_HAS_DMA=y
1678 1786
1679# 1787#
1680# Instrumentation Support 1788# Instrumentation Support
@@ -1693,15 +1801,15 @@ CONFIG_MAGIC_SYSRQ=y
1693CONFIG_DEBUG_FS=y 1801CONFIG_DEBUG_FS=y
1694# CONFIG_HEADERS_CHECK is not set 1802# CONFIG_HEADERS_CHECK is not set
1695CONFIG_DEBUG_KERNEL=y 1803CONFIG_DEBUG_KERNEL=y
1696CONFIG_LOG_BUF_SHIFT=17 1804# CONFIG_DEBUG_SHIRQ is not set
1697CONFIG_DETECT_SOFTLOCKUP=y 1805CONFIG_DETECT_SOFTLOCKUP=y
1698# CONFIG_SCHEDSTATS is not set 1806# CONFIG_SCHEDSTATS is not set
1807# CONFIG_TIMER_STATS is not set
1699# CONFIG_DEBUG_SLAB is not set 1808# CONFIG_DEBUG_SLAB is not set
1700# CONFIG_DEBUG_RT_MUTEXES is not set 1809# CONFIG_DEBUG_RT_MUTEXES is not set
1701# CONFIG_RT_MUTEX_TESTER is not set 1810# CONFIG_RT_MUTEX_TESTER is not set
1702# CONFIG_DEBUG_SPINLOCK is not set 1811# CONFIG_DEBUG_SPINLOCK is not set
1703CONFIG_DEBUG_MUTEXES=y 1812CONFIG_DEBUG_MUTEXES=y
1704# CONFIG_DEBUG_RWSEMS is not set
1705# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1813# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1706# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1814# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1707# CONFIG_DEBUG_KOBJECT is not set 1815# CONFIG_DEBUG_KOBJECT is not set
@@ -1711,8 +1819,10 @@ CONFIG_DEBUG_BUGVERBOSE=y
1711# CONFIG_DEBUG_LIST is not set 1819# CONFIG_DEBUG_LIST is not set
1712CONFIG_FORCED_INLINING=y 1820CONFIG_FORCED_INLINING=y
1713# CONFIG_RCU_TORTURE_TEST is not set 1821# CONFIG_RCU_TORTURE_TEST is not set
1822# CONFIG_FAULT_INJECTION is not set
1714CONFIG_DEBUG_STACKOVERFLOW=y 1823CONFIG_DEBUG_STACKOVERFLOW=y
1715CONFIG_DEBUG_STACK_USAGE=y 1824CONFIG_DEBUG_STACK_USAGE=y
1825# CONFIG_DEBUG_PAGEALLOC is not set
1716# CONFIG_HCALL_STATS is not set 1826# CONFIG_HCALL_STATS is not set
1717CONFIG_DEBUGGER=y 1827CONFIG_DEBUGGER=y
1718CONFIG_XMON=y 1828CONFIG_XMON=y
@@ -1749,8 +1859,11 @@ CONFIG_CRYPTO_TGR192=m
1749# CONFIG_CRYPTO_GF128MUL is not set 1859# CONFIG_CRYPTO_GF128MUL is not set
1750CONFIG_CRYPTO_ECB=m 1860CONFIG_CRYPTO_ECB=m
1751CONFIG_CRYPTO_CBC=y 1861CONFIG_CRYPTO_CBC=y
1862CONFIG_CRYPTO_PCBC=m
1752# CONFIG_CRYPTO_LRW is not set 1863# CONFIG_CRYPTO_LRW is not set
1864# CONFIG_CRYPTO_CRYPTD is not set
1753CONFIG_CRYPTO_DES=y 1865CONFIG_CRYPTO_DES=y
1866# CONFIG_CRYPTO_FCRYPT is not set
1754CONFIG_CRYPTO_BLOWFISH=m 1867CONFIG_CRYPTO_BLOWFISH=m
1755CONFIG_CRYPTO_TWOFISH=m 1868CONFIG_CRYPTO_TWOFISH=m
1756CONFIG_CRYPTO_TWOFISH_COMMON=m 1869CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -1765,6 +1878,7 @@ CONFIG_CRYPTO_ANUBIS=m
1765CONFIG_CRYPTO_DEFLATE=m 1878CONFIG_CRYPTO_DEFLATE=m
1766CONFIG_CRYPTO_MICHAEL_MIC=m 1879CONFIG_CRYPTO_MICHAEL_MIC=m
1767CONFIG_CRYPTO_CRC32C=m 1880CONFIG_CRYPTO_CRC32C=m
1881# CONFIG_CRYPTO_CAMELLIA is not set
1768CONFIG_CRYPTO_TEST=m 1882CONFIG_CRYPTO_TEST=m
1769 1883
1770# 1884#
diff --git a/arch/powerpc/configs/prpmc2800_defconfig b/arch/powerpc/configs/prpmc2800_defconfig
index c70a730820..fb504a7146 100644
--- a/arch/powerpc/configs/prpmc2800_defconfig
+++ b/arch/powerpc/configs/prpmc2800_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.21 3# Linux kernel version: 2.6.22-rc6
4# Wed May 9 09:42:46 2007 4# Tue Jun 26 14:15:11 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -90,7 +90,11 @@ CONFIG_BUG=y
90CONFIG_ELF_CORE=y 90CONFIG_ELF_CORE=y
91CONFIG_BASE_FULL=y 91CONFIG_BASE_FULL=y
92CONFIG_FUTEX=y 92CONFIG_FUTEX=y
93CONFIG_ANON_INODES=y
93CONFIG_EPOLL=y 94CONFIG_EPOLL=y
95CONFIG_SIGNALFD=y
96CONFIG_TIMERFD=y
97CONFIG_EVENTFD=y
94CONFIG_SHMEM=y 98CONFIG_SHMEM=y
95CONFIG_VM_EVENT_COUNTERS=y 99CONFIG_VM_EVENT_COUNTERS=y
96CONFIG_SLAB=y 100CONFIG_SLAB=y
@@ -274,20 +278,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
274# CONFIG_INET6_TUNNEL is not set 278# CONFIG_INET6_TUNNEL is not set
275# CONFIG_NETWORK_SECMARK is not set 279# CONFIG_NETWORK_SECMARK is not set
276# CONFIG_NETFILTER is not set 280# CONFIG_NETFILTER is not set
277
278#
279# DCCP Configuration (EXPERIMENTAL)
280#
281# CONFIG_IP_DCCP is not set 281# CONFIG_IP_DCCP is not set
282
283#
284# SCTP Configuration (EXPERIMENTAL)
285#
286# CONFIG_IP_SCTP is not set 282# CONFIG_IP_SCTP is not set
287
288#
289# TIPC Configuration (EXPERIMENTAL)
290#
291# CONFIG_TIPC is not set 283# CONFIG_TIPC is not set
292# CONFIG_ATM is not set 284# CONFIG_ATM is not set
293# CONFIG_BRIDGE is not set 285# CONFIG_BRIDGE is not set
@@ -383,7 +375,6 @@ CONFIG_MTD_CFI_UTIL=y
383# CONFIG_MTD_RAM is not set 375# CONFIG_MTD_RAM is not set
384# CONFIG_MTD_ROM is not set 376# CONFIG_MTD_ROM is not set
385# CONFIG_MTD_ABSENT is not set 377# CONFIG_MTD_ABSENT is not set
386# CONFIG_MTD_OBSOLETE_CHIPS is not set
387 378
388# 379#
389# Mapping drivers for chip access 380# Mapping drivers for chip access
@@ -454,10 +445,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
454# CONFIG_SGI_IOC4 is not set 445# CONFIG_SGI_IOC4 is not set
455# CONFIG_TIFM_CORE is not set 446# CONFIG_TIFM_CORE is not set
456# CONFIG_BLINK is not set 447# CONFIG_BLINK is not set
457
458#
459# ATA/ATAPI/MFM/RLL support
460#
461CONFIG_IDE=y 448CONFIG_IDE=y
462CONFIG_BLK_DEV_IDE=y 449CONFIG_BLK_DEV_IDE=y
463 450
@@ -472,6 +459,7 @@ CONFIG_BLK_DEV_IDEDISK=y
472# CONFIG_BLK_DEV_IDEFLOPPY is not set 459# CONFIG_BLK_DEV_IDEFLOPPY is not set
473# CONFIG_BLK_DEV_IDESCSI is not set 460# CONFIG_BLK_DEV_IDESCSI is not set
474# CONFIG_IDE_TASK_IOCTL is not set 461# CONFIG_IDE_TASK_IOCTL is not set
462CONFIG_IDE_PROC_FS=y
475 463
476# 464#
477# IDE chipset support/bugfixes 465# IDE chipset support/bugfixes
@@ -479,6 +467,7 @@ CONFIG_BLK_DEV_IDEDISK=y
479CONFIG_IDE_GENERIC=y 467CONFIG_IDE_GENERIC=y
480CONFIG_BLK_DEV_IDEPCI=y 468CONFIG_BLK_DEV_IDEPCI=y
481# CONFIG_IDEPCI_SHARE_IRQ is not set 469# CONFIG_IDEPCI_SHARE_IRQ is not set
470CONFIG_IDEPCI_PCIBUS_ORDER=y
482# CONFIG_BLK_DEV_OFFBOARD is not set 471# CONFIG_BLK_DEV_OFFBOARD is not set
483CONFIG_BLK_DEV_GENERIC=y 472CONFIG_BLK_DEV_GENERIC=y
484# CONFIG_BLK_DEV_OPTI621 is not set 473# CONFIG_BLK_DEV_OPTI621 is not set
@@ -588,12 +577,7 @@ CONFIG_BLK_DEV_SD=y
588# CONFIG_SCSI_DC390T is not set 577# CONFIG_SCSI_DC390T is not set
589# CONFIG_SCSI_NSP32 is not set 578# CONFIG_SCSI_NSP32 is not set
590# CONFIG_SCSI_DEBUG is not set 579# CONFIG_SCSI_DEBUG is not set
591# CONFIG_SCSI_ESP_CORE is not set
592# CONFIG_SCSI_SRP is not set 580# CONFIG_SCSI_SRP is not set
593
594#
595# Serial ATA (prod) and Parallel ATA (experimental) drivers
596#
597CONFIG_ATA=y 581CONFIG_ATA=y
598# CONFIG_ATA_NONSTANDARD is not set 582# CONFIG_ATA_NONSTANDARD is not set
599# CONFIG_SATA_AHCI is not set 583# CONFIG_SATA_AHCI is not set
@@ -665,6 +649,7 @@ CONFIG_SATA_MV=y
665# 649#
666# IEEE 1394 (FireWire) support 650# IEEE 1394 (FireWire) support
667# 651#
652# CONFIG_FIREWIRE is not set
668# CONFIG_IEEE1394 is not set 653# CONFIG_IEEE1394 is not set
669 654
670# 655#
@@ -683,15 +668,7 @@ CONFIG_NETDEVICES=y
683# CONFIG_BONDING is not set 668# CONFIG_BONDING is not set
684# CONFIG_EQUALIZER is not set 669# CONFIG_EQUALIZER is not set
685# CONFIG_TUN is not set 670# CONFIG_TUN is not set
686
687#
688# ARCnet devices
689#
690# CONFIG_ARCNET is not set 671# CONFIG_ARCNET is not set
691
692#
693# PHY device support
694#
695CONFIG_PHYLIB=y 672CONFIG_PHYLIB=y
696 673
697# 674#
@@ -746,10 +723,7 @@ CONFIG_8139TOO=y
746# CONFIG_TLAN is not set 723# CONFIG_TLAN is not set
747# CONFIG_VIA_RHINE is not set 724# CONFIG_VIA_RHINE is not set
748# CONFIG_SC92031 is not set 725# CONFIG_SC92031 is not set
749 726CONFIG_NETDEV_1000=y
750#
751# Ethernet (1000 Mbit)
752#
753# CONFIG_ACENIC is not set 727# CONFIG_ACENIC is not set
754# CONFIG_DL2K is not set 728# CONFIG_DL2K is not set
755CONFIG_E1000=y 729CONFIG_E1000=y
@@ -769,20 +743,14 @@ CONFIG_E1000=y
769CONFIG_MV643XX_ETH=y 743CONFIG_MV643XX_ETH=y
770# CONFIG_QLA3XXX is not set 744# CONFIG_QLA3XXX is not set
771# CONFIG_ATL1 is not set 745# CONFIG_ATL1 is not set
772 746CONFIG_NETDEV_10000=y
773#
774# Ethernet (10000 Mbit)
775#
776# CONFIG_CHELSIO_T1 is not set 747# CONFIG_CHELSIO_T1 is not set
777# CONFIG_CHELSIO_T3 is not set 748# CONFIG_CHELSIO_T3 is not set
778# CONFIG_IXGB is not set 749# CONFIG_IXGB is not set
779# CONFIG_S2IO is not set 750# CONFIG_S2IO is not set
780# CONFIG_MYRI10GE is not set 751# CONFIG_MYRI10GE is not set
781# CONFIG_NETXEN_NIC is not set 752# CONFIG_NETXEN_NIC is not set
782 753# CONFIG_MLX4_CORE is not set
783#
784# Token Ring devices
785#
786# CONFIG_TR is not set 754# CONFIG_TR is not set
787 755
788# 756#
@@ -792,8 +760,14 @@ CONFIG_MV643XX_ETH=y
792# CONFIG_WLAN_80211 is not set 760# CONFIG_WLAN_80211 is not set
793 761
794# 762#
795# Wan interfaces 763# USB Network Adapters
796# 764#
765# CONFIG_USB_CATC is not set
766# CONFIG_USB_KAWETH is not set
767# CONFIG_USB_PEGASUS is not set
768# CONFIG_USB_RTL8150 is not set
769# CONFIG_USB_USBNET_MII is not set
770# CONFIG_USB_USBNET is not set
797# CONFIG_WAN is not set 771# CONFIG_WAN is not set
798# CONFIG_FDDI is not set 772# CONFIG_FDDI is not set
799# CONFIG_HIPPI is not set 773# CONFIG_HIPPI is not set
@@ -820,6 +794,7 @@ CONFIG_MV643XX_ETH=y
820# 794#
821CONFIG_INPUT=y 795CONFIG_INPUT=y
822# CONFIG_INPUT_FF_MEMLESS is not set 796# CONFIG_INPUT_FF_MEMLESS is not set
797# CONFIG_INPUT_POLLDEV is not set
823 798
824# 799#
825# Userland interfaces 800# Userland interfaces
@@ -880,16 +855,11 @@ CONFIG_LEGACY_PTY_COUNT=256
880# IPMI 855# IPMI
881# 856#
882# CONFIG_IPMI_HANDLER is not set 857# CONFIG_IPMI_HANDLER is not set
883
884#
885# Watchdog Cards
886#
887# CONFIG_WATCHDOG is not set 858# CONFIG_WATCHDOG is not set
888# CONFIG_HW_RANDOM is not set 859# CONFIG_HW_RANDOM is not set
889# CONFIG_NVRAM is not set 860# CONFIG_NVRAM is not set
890CONFIG_GEN_RTC=y 861CONFIG_GEN_RTC=y
891# CONFIG_GEN_RTC_X is not set 862# CONFIG_GEN_RTC_X is not set
892# CONFIG_DTLK is not set
893# CONFIG_R3964 is not set 863# CONFIG_R3964 is not set
894# CONFIG_APPLICOM is not set 864# CONFIG_APPLICOM is not set
895# CONFIG_AGP is not set 865# CONFIG_AGP is not set
@@ -1023,12 +993,8 @@ CONFIG_HWMON=y
1023# Multimedia devices 993# Multimedia devices
1024# 994#
1025# CONFIG_VIDEO_DEV is not set 995# CONFIG_VIDEO_DEV is not set
1026 996# CONFIG_DVB_CORE is not set
1027# 997# CONFIG_DAB is not set
1028# Digital Video Broadcasting Devices
1029#
1030# CONFIG_DVB is not set
1031# CONFIG_USB_DABUSB is not set
1032 998
1033# 999#
1034# Graphics support 1000# Graphics support
@@ -1124,16 +1090,6 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1124# 1090#
1125# CONFIG_USB_MDC800 is not set 1091# CONFIG_USB_MDC800 is not set
1126# CONFIG_USB_MICROTEK is not set 1092# CONFIG_USB_MICROTEK is not set
1127
1128#
1129# USB Network Adapters
1130#
1131# CONFIG_USB_CATC is not set
1132# CONFIG_USB_KAWETH is not set
1133# CONFIG_USB_PEGASUS is not set
1134# CONFIG_USB_RTL8150 is not set
1135# CONFIG_USB_USBNET_MII is not set
1136# CONFIG_USB_USBNET is not set
1137CONFIG_USB_MON=y 1093CONFIG_USB_MON=y
1138 1094
1139# 1095#
@@ -1261,14 +1217,6 @@ CONFIG_RTC_DRV_MAX6900=y
1261# 1217#
1262 1218
1263# 1219#
1264# Auxiliary Display support
1265#
1266
1267#
1268# Virtualization
1269#
1270
1271#
1272# File systems 1220# File systems
1273# 1221#
1274CONFIG_EXT2_FS=y 1222CONFIG_EXT2_FS=y
@@ -1396,7 +1344,6 @@ CONFIG_MSDOS_PARTITION=y
1396# 1344#
1397# CONFIG_DLM is not set 1345# CONFIG_DLM is not set
1398# CONFIG_UCC_SLOW is not set 1346# CONFIG_UCC_SLOW is not set
1399# CONFIG_UCC_FAST is not set
1400 1347
1401# 1348#
1402# Library routines 1349# Library routines
@@ -1404,6 +1351,7 @@ CONFIG_MSDOS_PARTITION=y
1404CONFIG_BITREVERSE=y 1351CONFIG_BITREVERSE=y
1405# CONFIG_CRC_CCITT is not set 1352# CONFIG_CRC_CCITT is not set
1406# CONFIG_CRC16 is not set 1353# CONFIG_CRC16 is not set
1354# CONFIG_CRC_ITU_T is not set
1407CONFIG_CRC32=y 1355CONFIG_CRC32=y
1408# CONFIG_LIBCRC32C is not set 1356# CONFIG_LIBCRC32C is not set
1409CONFIG_PLIST=y 1357CONFIG_PLIST=y
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig
index 477934558f..d0b43df444 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.21 3# Linux kernel version: 2.6.22-rc6
4# Fri May 11 10:16:27 2007 4# Tue Jun 26 14:15:19 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -87,7 +87,11 @@ CONFIG_BUG=y
87CONFIG_ELF_CORE=y 87CONFIG_ELF_CORE=y
88CONFIG_BASE_FULL=y 88CONFIG_BASE_FULL=y
89CONFIG_FUTEX=y 89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
90CONFIG_EPOLL=y 91CONFIG_EPOLL=y
92CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 95CONFIG_SHMEM=y
92CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
93CONFIG_SLAB=y 97CONFIG_SLAB=y
@@ -152,7 +156,11 @@ CONFIG_PS3_HTAB_SIZE=20
152CONFIG_PS3_USE_LPAR_ADDR=y 156CONFIG_PS3_USE_LPAR_ADDR=y
153CONFIG_PS3_VUART=y 157CONFIG_PS3_VUART=y
154CONFIG_PS3_PS3AV=y 158CONFIG_PS3_PS3AV=y
155CONFIG_PS3_SYS_MANAGER=y 159CONFIG_PS3_SYS_MANAGER=m
160CONFIG_PS3_STORAGE=y
161CONFIG_PS3_DISK=y
162CONFIG_PS3_ROM=y
163CONFIG_PS3_FLASH=y
156CONFIG_PPC_CELL=y 164CONFIG_PPC_CELL=y
157# CONFIG_PPC_CELL_NATIVE is not set 165# CONFIG_PPC_CELL_NATIVE is not set
158# CONFIG_PPC_IBM_CELL_BLADE is not set 166# CONFIG_PPC_IBM_CELL_BLADE is not set
@@ -301,20 +309,8 @@ CONFIG_IPV6_SIT=y
301# CONFIG_IPV6_MULTIPLE_TABLES is not set 309# CONFIG_IPV6_MULTIPLE_TABLES is not set
302# CONFIG_NETWORK_SECMARK is not set 310# CONFIG_NETWORK_SECMARK is not set
303# CONFIG_NETFILTER is not set 311# CONFIG_NETFILTER is not set
304
305#
306# DCCP Configuration (EXPERIMENTAL)
307#
308# CONFIG_IP_DCCP is not set 312# CONFIG_IP_DCCP is not set
309
310#
311# SCTP Configuration (EXPERIMENTAL)
312#
313# CONFIG_IP_SCTP is not set 313# CONFIG_IP_SCTP is not set
314
315#
316# TIPC Configuration (EXPERIMENTAL)
317#
318# CONFIG_TIPC is not set 314# CONFIG_TIPC is not set
319# CONFIG_ATM is not set 315# CONFIG_ATM is not set
320# CONFIG_BRIDGE is not set 316# CONFIG_BRIDGE is not set
@@ -343,7 +339,7 @@ CONFIG_BT=m
343CONFIG_BT_L2CAP=m 339CONFIG_BT_L2CAP=m
344CONFIG_BT_SCO=m 340CONFIG_BT_SCO=m
345CONFIG_BT_RFCOMM=m 341CONFIG_BT_RFCOMM=m
346# CONFIG_BT_RFCOMM_TTY is not set 342CONFIG_BT_RFCOMM_TTY=y
347# CONFIG_BT_BNEP is not set 343# CONFIG_BT_BNEP is not set
348CONFIG_BT_HIDP=m 344CONFIG_BT_HIDP=m
349 345
@@ -352,7 +348,9 @@ CONFIG_BT_HIDP=m
352# 348#
353CONFIG_BT_HCIUSB=m 349CONFIG_BT_HCIUSB=m
354CONFIG_BT_HCIUSB_SCO=y 350CONFIG_BT_HCIUSB_SCO=y
355# CONFIG_BT_HCIUART is not set 351CONFIG_BT_HCIUART=m
352CONFIG_BT_HCIUART_H4=y
353CONFIG_BT_HCIUART_BCSP=y
356# CONFIG_BT_HCIBCM203X is not set 354# CONFIG_BT_HCIBCM203X is not set
357# CONFIG_BT_HCIBPA10X is not set 355# CONFIG_BT_HCIBPA10X is not set
358# CONFIG_BT_HCIBFUSB is not set 356# CONFIG_BT_HCIBFUSB is not set
@@ -418,10 +416,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
418# Misc devices 416# Misc devices
419# 417#
420# CONFIG_BLINK is not set 418# CONFIG_BLINK is not set
421
422#
423# ATA/ATAPI/MFM/RLL support
424#
425# CONFIG_IDE is not set 419# CONFIG_IDE is not set
426 420
427# 421#
@@ -447,7 +441,7 @@ CONFIG_CHR_DEV_SG=m
447# 441#
448# Some SCSI devices (e.g. CD jukebox) support multiple LUNs 442# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
449# 443#
450# CONFIG_SCSI_MULTI_LUN is not set 444CONFIG_SCSI_MULTI_LUN=y
451# CONFIG_SCSI_CONSTANTS is not set 445# CONFIG_SCSI_CONSTANTS is not set
452# CONFIG_SCSI_LOGGING is not set 446# CONFIG_SCSI_LOGGING is not set
453# CONFIG_SCSI_SCAN_ASYNC is not set 447# CONFIG_SCSI_SCAN_ASYNC is not set
@@ -467,11 +461,6 @@ CONFIG_SCSI_WAIT_SCAN=m
467# 461#
468# CONFIG_ISCSI_TCP is not set 462# CONFIG_ISCSI_TCP is not set
469# CONFIG_SCSI_DEBUG is not set 463# CONFIG_SCSI_DEBUG is not set
470# CONFIG_SCSI_ESP_CORE is not set
471
472#
473# Serial ATA (prod) and Parallel ATA (experimental) drivers
474#
475# CONFIG_ATA is not set 464# CONFIG_ATA is not set
476 465
477# 466#
@@ -490,27 +479,13 @@ CONFIG_NETDEVICES=y
490# CONFIG_TUN is not set 479# CONFIG_TUN is not set
491 480
492# 481#
493# PHY device support
494#
495
496#
497# Ethernet (10 or 100Mbit) 482# Ethernet (10 or 100Mbit)
498# 483#
499# CONFIG_NET_ETHERNET is not set 484# CONFIG_NET_ETHERNET is not set
500CONFIG_MII=m 485CONFIG_MII=m
501 486CONFIG_NETDEV_1000=y
502# 487CONFIG_NETDEV_10000=y
503# Ethernet (1000 Mbit) 488CONFIG_GELIC_NET=y
504#
505
506#
507# Ethernet (10000 Mbit)
508#
509CONFIG_MLX4_DEBUG=y
510
511#
512# Token Ring devices
513#
514 489
515# 490#
516# Wireless LAN 491# Wireless LAN
@@ -536,10 +511,6 @@ CONFIG_USB_NET_MCS7830=m
536# CONFIG_USB_NET_RNDIS_HOST is not set 511# CONFIG_USB_NET_RNDIS_HOST is not set
537# CONFIG_USB_NET_CDC_SUBSET is not set 512# CONFIG_USB_NET_CDC_SUBSET is not set
538# CONFIG_USB_NET_ZAURUS is not set 513# CONFIG_USB_NET_ZAURUS is not set
539
540#
541# Wan interfaces
542#
543# CONFIG_WAN is not set 514# CONFIG_WAN is not set
544# CONFIG_PPP is not set 515# CONFIG_PPP is not set
545# CONFIG_SLIP is not set 516# CONFIG_SLIP is not set
@@ -563,6 +534,7 @@ CONFIG_USB_NET_MCS7830=m
563# 534#
564CONFIG_INPUT=y 535CONFIG_INPUT=y
565# CONFIG_INPUT_FF_MEMLESS is not set 536# CONFIG_INPUT_FF_MEMLESS is not set
537# CONFIG_INPUT_POLLDEV is not set
566 538
567# 539#
568# Userland interfaces 540# Userland interfaces
@@ -581,7 +553,27 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
581# 553#
582# CONFIG_INPUT_KEYBOARD is not set 554# CONFIG_INPUT_KEYBOARD is not set
583# CONFIG_INPUT_MOUSE is not set 555# CONFIG_INPUT_MOUSE is not set
584# CONFIG_INPUT_JOYSTICK is not set 556CONFIG_INPUT_JOYSTICK=y
557# CONFIG_JOYSTICK_ANALOG is not set
558# CONFIG_JOYSTICK_A3D is not set
559# CONFIG_JOYSTICK_ADI is not set
560# CONFIG_JOYSTICK_COBRA is not set
561# CONFIG_JOYSTICK_GF2K is not set
562# CONFIG_JOYSTICK_GRIP is not set
563# CONFIG_JOYSTICK_GRIP_MP is not set
564# CONFIG_JOYSTICK_GUILLEMOT is not set
565# CONFIG_JOYSTICK_INTERACT is not set
566# CONFIG_JOYSTICK_SIDEWINDER is not set
567# CONFIG_JOYSTICK_TMDC is not set
568# CONFIG_JOYSTICK_IFORCE is not set
569# CONFIG_JOYSTICK_WARRIOR is not set
570# CONFIG_JOYSTICK_MAGELLAN is not set
571# CONFIG_JOYSTICK_SPACEORB is not set
572# CONFIG_JOYSTICK_SPACEBALL is not set
573# CONFIG_JOYSTICK_STINGER is not set
574# CONFIG_JOYSTICK_TWIDJOY is not set
575# CONFIG_JOYSTICK_JOYDUMP is not set
576# CONFIG_JOYSTICK_XPAD is not set
585# CONFIG_INPUT_TABLET is not set 577# CONFIG_INPUT_TABLET is not set
586# CONFIG_INPUT_TOUCHSCREEN is not set 578# CONFIG_INPUT_TOUCHSCREEN is not set
587# CONFIG_INPUT_MISC is not set 579# CONFIG_INPUT_MISC is not set
@@ -598,7 +590,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
598CONFIG_VT=y 590CONFIG_VT=y
599CONFIG_VT_CONSOLE=y 591CONFIG_VT_CONSOLE=y
600CONFIG_HW_CONSOLE=y 592CONFIG_HW_CONSOLE=y
601# CONFIG_VT_HW_CONSOLE_BINDING is not set 593CONFIG_VT_HW_CONSOLE_BINDING=y
602# CONFIG_SERIAL_NONSTANDARD is not set 594# CONFIG_SERIAL_NONSTANDARD is not set
603 595
604# 596#
@@ -652,12 +644,8 @@ CONFIG_GEN_RTC=y
652# Multimedia devices 644# Multimedia devices
653# 645#
654# CONFIG_VIDEO_DEV is not set 646# CONFIG_VIDEO_DEV is not set
655 647# CONFIG_DVB_CORE is not set
656# 648# CONFIG_DAB is not set
657# Digital Video Broadcasting Devices
658#
659# CONFIG_DVB is not set
660# CONFIG_USB_DABUSB is not set
661 649
662# 650#
663# Graphics support 651# Graphics support
@@ -672,13 +660,13 @@ CONFIG_GEN_RTC=y
672CONFIG_FB=y 660CONFIG_FB=y
673# CONFIG_FIRMWARE_EDID is not set 661# CONFIG_FIRMWARE_EDID is not set
674# CONFIG_FB_DDC is not set 662# CONFIG_FB_DDC is not set
675CONFIG_FB_CFB_FILLRECT=y 663# CONFIG_FB_CFB_FILLRECT is not set
676CONFIG_FB_CFB_COPYAREA=y 664# CONFIG_FB_CFB_COPYAREA is not set
677CONFIG_FB_CFB_IMAGEBLIT=y 665# CONFIG_FB_CFB_IMAGEBLIT is not set
678# CONFIG_FB_SYS_FILLRECT is not set 666CONFIG_FB_SYS_FILLRECT=y
679# CONFIG_FB_SYS_COPYAREA is not set 667CONFIG_FB_SYS_COPYAREA=y
680# CONFIG_FB_SYS_IMAGEBLIT is not set 668CONFIG_FB_SYS_IMAGEBLIT=y
681# CONFIG_FB_SYS_FOPS is not set 669CONFIG_FB_SYS_FOPS=y
682CONFIG_FB_DEFERRED_IO=y 670CONFIG_FB_DEFERRED_IO=y
683# CONFIG_FB_SVGALIB is not set 671# CONFIG_FB_SVGALIB is not set
684# CONFIG_FB_MACMODES is not set 672# CONFIG_FB_MACMODES is not set
@@ -751,9 +739,10 @@ CONFIG_SND_VERBOSE_PROCFS=y
751# 739#
752# CONFIG_SND_USB_AUDIO is not set 740# CONFIG_SND_USB_AUDIO is not set
753# CONFIG_SND_USB_USX2Y is not set 741# CONFIG_SND_USB_USX2Y is not set
742# CONFIG_SND_USB_CAIAQ is not set
754 743
755# 744#
756# SoC audio support 745# System on Chip audio support
757# 746#
758# CONFIG_SND_SOC is not set 747# CONFIG_SND_SOC is not set
759 748
@@ -1098,7 +1087,6 @@ CONFIG_NLS_ISO8859_1=y
1098# 1087#
1099# CONFIG_DLM is not set 1088# CONFIG_DLM is not set
1100# CONFIG_UCC_SLOW is not set 1089# CONFIG_UCC_SLOW is not set
1101# CONFIG_UCC_FAST is not set
1102 1090
1103# 1091#
1104# Library routines 1092# Library routines
@@ -1125,7 +1113,7 @@ CONFIG_HAS_DMA=y
1125# 1113#
1126# CONFIG_PRINTK_TIME is not set 1114# CONFIG_PRINTK_TIME is not set
1127CONFIG_ENABLE_MUST_CHECK=y 1115CONFIG_ENABLE_MUST_CHECK=y
1128# CONFIG_MAGIC_SYSRQ is not set 1116CONFIG_MAGIC_SYSRQ=y
1129# CONFIG_UNUSED_SYMBOLS is not set 1117# CONFIG_UNUSED_SYMBOLS is not set
1130# CONFIG_DEBUG_FS is not set 1118# CONFIG_DEBUG_FS is not set
1131# CONFIG_HEADERS_CHECK is not set 1119# CONFIG_HEADERS_CHECK is not set
@@ -1155,16 +1143,7 @@ CONFIG_DEBUG_STACKOVERFLOW=y
1155# CONFIG_DEBUGGER is not set 1143# CONFIG_DEBUGGER is not set
1156CONFIG_IRQSTACKS=y 1144CONFIG_IRQSTACKS=y
1157# CONFIG_BOOTX_TEXT is not set 1145# CONFIG_BOOTX_TEXT is not set
1158CONFIG_PPC_EARLY_DEBUG=y 1146# CONFIG_PPC_EARLY_DEBUG is not set
1159# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
1160# CONFIG_PPC_EARLY_DEBUG_G5 is not set
1161# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
1162# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
1163# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
1164# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
1165# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
1166# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
1167# CONFIG_PPC_EARLY_DEBUG_44x is not set
1168 1147
1169# 1148#
1170# Security options 1149# Security options
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index 6e96e50c36..0caf0dd5ea 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc5 3# Linux kernel version: 2.6.22-rc6
4# Mon Jan 22 22:31:27 2007 4# Tue Jun 26 14:17:45 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -40,6 +40,7 @@ CONFIG_PPC_FPU=y
40# CONFIG_PPC_OF_PLATFORM_PCI is not set 40# CONFIG_PPC_OF_PLATFORM_PCI is not set
41CONFIG_ALTIVEC=y 41CONFIG_ALTIVEC=y
42CONFIG_PPC_STD_MMU=y 42CONFIG_PPC_STD_MMU=y
43CONFIG_PPC_MM_SLICES=y
43CONFIG_VIRT_CPU_ACCOUNTING=y 44CONFIG_VIRT_CPU_ACCOUNTING=y
44CONFIG_SMP=y 45CONFIG_SMP=y
45CONFIG_NR_CPUS=128 46CONFIG_NR_CPUS=128
@@ -60,16 +61,23 @@ CONFIG_LOCALVERSION_AUTO=y
60CONFIG_SWAP=y 61CONFIG_SWAP=y
61CONFIG_SYSVIPC=y 62CONFIG_SYSVIPC=y
62# CONFIG_IPC_NS is not set 63# CONFIG_IPC_NS is not set
64CONFIG_SYSVIPC_SYSCTL=y
63CONFIG_POSIX_MQUEUE=y 65CONFIG_POSIX_MQUEUE=y
64# CONFIG_BSD_PROCESS_ACCT is not set 66# CONFIG_BSD_PROCESS_ACCT is not set
67CONFIG_TASKSTATS=y
68CONFIG_TASK_DELAY_ACCT=y
69CONFIG_TASK_XACCT=y
70CONFIG_TASK_IO_ACCOUNTING=y
65# CONFIG_UTS_NS is not set 71# CONFIG_UTS_NS is not set
66CONFIG_AUDIT=y 72CONFIG_AUDIT=y
67CONFIG_AUDITSYSCALL=y 73CONFIG_AUDITSYSCALL=y
68CONFIG_IKCONFIG=y 74CONFIG_IKCONFIG=y
69CONFIG_IKCONFIG_PROC=y 75CONFIG_IKCONFIG_PROC=y
76CONFIG_LOG_BUF_SHIFT=17
70CONFIG_CPUSETS=y 77CONFIG_CPUSETS=y
71CONFIG_SYSFS_DEPRECATED=y 78CONFIG_SYSFS_DEPRECATED=y
72# CONFIG_RELAY is not set 79# CONFIG_RELAY is not set
80CONFIG_BLK_DEV_INITRD=y
73CONFIG_INITRAMFS_SOURCE="" 81CONFIG_INITRAMFS_SOURCE=""
74CONFIG_CC_OPTIMIZE_FOR_SIZE=y 82CONFIG_CC_OPTIMIZE_FOR_SIZE=y
75CONFIG_SYSCTL=y 83CONFIG_SYSCTL=y
@@ -84,14 +92,19 @@ CONFIG_BUG=y
84CONFIG_ELF_CORE=y 92CONFIG_ELF_CORE=y
85CONFIG_BASE_FULL=y 93CONFIG_BASE_FULL=y
86CONFIG_FUTEX=y 94CONFIG_FUTEX=y
95CONFIG_ANON_INODES=y
87CONFIG_EPOLL=y 96CONFIG_EPOLL=y
97CONFIG_SIGNALFD=y
98CONFIG_TIMERFD=y
99CONFIG_EVENTFD=y
88CONFIG_SHMEM=y 100CONFIG_SHMEM=y
89CONFIG_SLAB=y
90CONFIG_VM_EVENT_COUNTERS=y 101CONFIG_VM_EVENT_COUNTERS=y
102CONFIG_SLAB=y
103# CONFIG_SLUB is not set
104# CONFIG_SLOB is not set
91CONFIG_RT_MUTEXES=y 105CONFIG_RT_MUTEXES=y
92# CONFIG_TINY_SHMEM is not set 106# CONFIG_TINY_SHMEM is not set
93CONFIG_BASE_SMALL=0 107CONFIG_BASE_SMALL=0
94# CONFIG_SLOB is not set
95 108
96# 109#
97# Loadable module support 110# Loadable module support
@@ -130,18 +143,28 @@ CONFIG_PPC_MULTIPLATFORM=y
130# CONFIG_EMBEDDED6xx is not set 143# CONFIG_EMBEDDED6xx is not set
131# CONFIG_APUS is not set 144# CONFIG_APUS is not set
132CONFIG_PPC_PSERIES=y 145CONFIG_PPC_PSERIES=y
146CONFIG_PPC_SPLPAR=y
147CONFIG_EEH=y
148CONFIG_SCANLOG=m
149CONFIG_LPARCFG=y
133# CONFIG_PPC_ISERIES is not set 150# CONFIG_PPC_ISERIES is not set
134# CONFIG_PPC_MPC52xx is not set 151# CONFIG_PPC_MPC52xx is not set
152# CONFIG_PPC_MPC5200 is not set
135# CONFIG_PPC_PMAC is not set 153# CONFIG_PPC_PMAC is not set
136# CONFIG_PPC_MAPLE is not set 154# CONFIG_PPC_MAPLE is not set
137# CONFIG_PPC_PASEMI is not set 155# CONFIG_PPC_PASEMI is not set
156# CONFIG_PPC_CELLEB is not set
157# CONFIG_PPC_PS3 is not set
138# CONFIG_PPC_CELL is not set 158# CONFIG_PPC_CELL is not set
139# CONFIG_PPC_CELL_NATIVE is not set 159# CONFIG_PPC_CELL_NATIVE is not set
140# CONFIG_PPC_IBM_CELL_BLADE is not set 160# CONFIG_PPC_IBM_CELL_BLADE is not set
141# CONFIG_PPC_PS3 is not set 161# CONFIG_PQ2ADS is not set
142CONFIG_PPC_NATIVE=y 162CONFIG_PPC_NATIVE=y
143# CONFIG_UDBG_RTAS_CONSOLE is not set 163# CONFIG_UDBG_RTAS_CONSOLE is not set
144CONFIG_XICS=y 164CONFIG_XICS=y
165CONFIG_MPIC=y
166# CONFIG_MPIC_WEIRD is not set
167CONFIG_PPC_I8259=y
145# CONFIG_U3_DART is not set 168# CONFIG_U3_DART is not set
146CONFIG_PPC_RTAS=y 169CONFIG_PPC_RTAS=y
147CONFIG_RTAS_ERROR_LOGGING=y 170CONFIG_RTAS_ERROR_LOGGING=y
@@ -155,8 +178,7 @@ CONFIG_IBMEBUS=y
155# CONFIG_PPC_INDIRECT_IO is not set 178# CONFIG_PPC_INDIRECT_IO is not set
156# CONFIG_GENERIC_IOMAP is not set 179# CONFIG_GENERIC_IOMAP is not set
157# CONFIG_CPU_FREQ is not set 180# CONFIG_CPU_FREQ is not set
158# CONFIG_WANT_EARLY_SERIAL is not set 181# CONFIG_CPM2 is not set
159CONFIG_MPIC=y
160 182
161# 183#
162# Kernel options 184# Kernel options
@@ -179,10 +201,6 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
179CONFIG_KEXEC=y 201CONFIG_KEXEC=y
180# CONFIG_CRASH_DUMP is not set 202# CONFIG_CRASH_DUMP is not set
181CONFIG_IRQ_ALL_CPUS=y 203CONFIG_IRQ_ALL_CPUS=y
182CONFIG_PPC_SPLPAR=y
183CONFIG_EEH=y
184CONFIG_SCANLOG=m
185CONFIG_LPARCFG=y
186CONFIG_NUMA=y 204CONFIG_NUMA=y
187CONFIG_NODES_SHIFT=4 205CONFIG_NODES_SHIFT=4
188CONFIG_ARCH_SELECT_MEMORY_MODEL=y 206CONFIG_ARCH_SELECT_MEMORY_MODEL=y
@@ -202,35 +220,35 @@ CONFIG_SPARSEMEM_EXTREME=y
202CONFIG_SPLIT_PTLOCK_CPUS=4 220CONFIG_SPLIT_PTLOCK_CPUS=4
203CONFIG_MIGRATION=y 221CONFIG_MIGRATION=y
204CONFIG_RESOURCES_64BIT=y 222CONFIG_RESOURCES_64BIT=y
223CONFIG_ZONE_DMA_FLAG=1
205CONFIG_NODES_SPAN_OTHER_NODES=y 224CONFIG_NODES_SPAN_OTHER_NODES=y
225# CONFIG_PPC_HAS_HASH_64K is not set
206# CONFIG_PPC_64K_PAGES is not set 226# CONFIG_PPC_64K_PAGES is not set
207CONFIG_SCHED_SMT=y 227CONFIG_SCHED_SMT=y
208CONFIG_PROC_DEVICETREE=y 228CONFIG_PROC_DEVICETREE=y
209# CONFIG_CMDLINE_BOOL is not set 229# CONFIG_CMDLINE_BOOL is not set
210# CONFIG_PM is not set 230# CONFIG_PM is not set
211CONFIG_SECCOMP=y 231CONFIG_SECCOMP=y
232# CONFIG_WANT_DEVICE_TREE is not set
212CONFIG_ISA_DMA_API=y 233CONFIG_ISA_DMA_API=y
213 234
214# 235#
215# Bus options 236# Bus options
216# 237#
238CONFIG_ZONE_DMA=y
217CONFIG_GENERIC_ISA_DMA=y 239CONFIG_GENERIC_ISA_DMA=y
218# CONFIG_MPIC_WEIRD is not set
219CONFIG_PPC_I8259=y
220# CONFIG_PPC_INDIRECT_PCI is not set 240# CONFIG_PPC_INDIRECT_PCI is not set
221CONFIG_PCI=y 241CONFIG_PCI=y
222CONFIG_PCI_DOMAINS=y 242CONFIG_PCI_DOMAINS=y
223# CONFIG_PCIEPORTBUS is not set 243# CONFIG_PCIEPORTBUS is not set
244CONFIG_ARCH_SUPPORTS_MSI=y
245CONFIG_PCI_MSI=y
224# CONFIG_PCI_DEBUG is not set 246# CONFIG_PCI_DEBUG is not set
225 247
226# 248#
227# PCCARD (PCMCIA/CardBus) support 249# PCCARD (PCMCIA/CardBus) support
228# 250#
229# CONFIG_PCCARD is not set 251# CONFIG_PCCARD is not set
230
231#
232# PCI Hotplug Support
233#
234CONFIG_HOTPLUG_PCI=m 252CONFIG_HOTPLUG_PCI=m
235# CONFIG_HOTPLUG_PCI_FAKE is not set 253# CONFIG_HOTPLUG_PCI_FAKE is not set
236# CONFIG_HOTPLUG_PCI_CPCI is not set 254# CONFIG_HOTPLUG_PCI_CPCI is not set
@@ -247,14 +265,15 @@ CONFIG_NET=y
247# 265#
248# Networking options 266# Networking options
249# 267#
250# CONFIG_NETDEBUG is not set
251CONFIG_PACKET=y 268CONFIG_PACKET=y
252# CONFIG_PACKET_MMAP is not set 269# CONFIG_PACKET_MMAP is not set
253CONFIG_UNIX=y 270CONFIG_UNIX=y
254CONFIG_XFRM=y 271CONFIG_XFRM=y
255CONFIG_XFRM_USER=m 272CONFIG_XFRM_USER=m
256# CONFIG_XFRM_SUB_POLICY is not set 273# CONFIG_XFRM_SUB_POLICY is not set
274# CONFIG_XFRM_MIGRATE is not set
257CONFIG_NET_KEY=m 275CONFIG_NET_KEY=m
276# CONFIG_NET_KEY_MIGRATE is not set
258CONFIG_INET=y 277CONFIG_INET=y
259CONFIG_IP_MULTICAST=y 278CONFIG_IP_MULTICAST=y
260# CONFIG_IP_ADVANCED_ROUTER is not set 279# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -279,10 +298,6 @@ CONFIG_INET_TCP_DIAG=y
279CONFIG_TCP_CONG_CUBIC=y 298CONFIG_TCP_CONG_CUBIC=y
280CONFIG_DEFAULT_TCP_CONG="cubic" 299CONFIG_DEFAULT_TCP_CONG="cubic"
281# CONFIG_TCP_MD5SIG is not set 300# CONFIG_TCP_MD5SIG is not set
282
283#
284# IP: Virtual Server Configuration
285#
286# CONFIG_IP_VS is not set 301# CONFIG_IP_VS is not set
287# CONFIG_IPV6 is not set 302# CONFIG_IPV6 is not set
288# CONFIG_INET6_XFRM_TUNNEL is not set 303# CONFIG_INET6_XFRM_TUNNEL is not set
@@ -298,10 +313,8 @@ CONFIG_NETFILTER_NETLINK=y
298CONFIG_NETFILTER_NETLINK_QUEUE=m 313CONFIG_NETFILTER_NETLINK_QUEUE=m
299CONFIG_NETFILTER_NETLINK_LOG=m 314CONFIG_NETFILTER_NETLINK_LOG=m
300CONFIG_NF_CONNTRACK_ENABLED=m 315CONFIG_NF_CONNTRACK_ENABLED=m
301CONFIG_NF_CONNTRACK_SUPPORT=y
302# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
303CONFIG_NF_CONNTRACK=m 316CONFIG_NF_CONNTRACK=m
304# CONFIG_NF_CT_ACCT is not set 317CONFIG_NF_CT_ACCT=y
305CONFIG_NF_CONNTRACK_MARK=y 318CONFIG_NF_CONNTRACK_MARK=y
306CONFIG_NF_CONNTRACK_EVENTS=y 319CONFIG_NF_CONNTRACK_EVENTS=y
307# CONFIG_NF_CT_PROTO_SCTP is not set 320# CONFIG_NF_CT_PROTO_SCTP is not set
@@ -311,10 +324,39 @@ CONFIG_NF_CONNTRACK_FTP=m
311CONFIG_NF_CONNTRACK_IRC=m 324CONFIG_NF_CONNTRACK_IRC=m
312# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set 325# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
313# CONFIG_NF_CONNTRACK_PPTP is not set 326# CONFIG_NF_CONNTRACK_PPTP is not set
327# CONFIG_NF_CONNTRACK_SANE is not set
314# CONFIG_NF_CONNTRACK_SIP is not set 328# CONFIG_NF_CONNTRACK_SIP is not set
315CONFIG_NF_CONNTRACK_TFTP=m 329CONFIG_NF_CONNTRACK_TFTP=m
316CONFIG_NF_CT_NETLINK=m 330CONFIG_NF_CT_NETLINK=m
317# CONFIG_NETFILTER_XTABLES is not set 331CONFIG_NETFILTER_XTABLES=m
332CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
333CONFIG_NETFILTER_XT_TARGET_MARK=m
334CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
335CONFIG_NETFILTER_XT_TARGET_NFLOG=m
336CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
337CONFIG_NETFILTER_XT_MATCH_COMMENT=m
338CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
339CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
340CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
341CONFIG_NETFILTER_XT_MATCH_DCCP=m
342CONFIG_NETFILTER_XT_MATCH_DSCP=m
343CONFIG_NETFILTER_XT_MATCH_ESP=m
344CONFIG_NETFILTER_XT_MATCH_HELPER=m
345CONFIG_NETFILTER_XT_MATCH_LENGTH=m
346CONFIG_NETFILTER_XT_MATCH_LIMIT=m
347CONFIG_NETFILTER_XT_MATCH_MAC=m
348CONFIG_NETFILTER_XT_MATCH_MARK=m
349CONFIG_NETFILTER_XT_MATCH_POLICY=m
350CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
351CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
352CONFIG_NETFILTER_XT_MATCH_QUOTA=m
353CONFIG_NETFILTER_XT_MATCH_REALM=m
354CONFIG_NETFILTER_XT_MATCH_SCTP=m
355CONFIG_NETFILTER_XT_MATCH_STATE=m
356CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
357CONFIG_NETFILTER_XT_MATCH_STRING=m
358CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
359CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
318 360
319# 361#
320# IP: Netfilter Configuration 362# IP: Netfilter Configuration
@@ -322,20 +364,38 @@ CONFIG_NF_CT_NETLINK=m
322CONFIG_NF_CONNTRACK_IPV4=m 364CONFIG_NF_CONNTRACK_IPV4=m
323CONFIG_NF_CONNTRACK_PROC_COMPAT=y 365CONFIG_NF_CONNTRACK_PROC_COMPAT=y
324CONFIG_IP_NF_QUEUE=m 366CONFIG_IP_NF_QUEUE=m
325 367CONFIG_IP_NF_IPTABLES=m
326# 368CONFIG_IP_NF_MATCH_IPRANGE=m
327# DCCP Configuration (EXPERIMENTAL) 369CONFIG_IP_NF_MATCH_TOS=m
328# 370CONFIG_IP_NF_MATCH_RECENT=m
371CONFIG_IP_NF_MATCH_ECN=m
372CONFIG_IP_NF_MATCH_AH=m
373CONFIG_IP_NF_MATCH_TTL=m
374CONFIG_IP_NF_MATCH_OWNER=m
375CONFIG_IP_NF_MATCH_ADDRTYPE=m
376CONFIG_IP_NF_FILTER=m
377CONFIG_IP_NF_TARGET_REJECT=m
378CONFIG_IP_NF_TARGET_LOG=m
379CONFIG_IP_NF_TARGET_ULOG=m
380CONFIG_NF_NAT=m
381CONFIG_NF_NAT_NEEDED=y
382CONFIG_IP_NF_TARGET_MASQUERADE=m
383CONFIG_IP_NF_TARGET_REDIRECT=m
384CONFIG_IP_NF_TARGET_NETMAP=m
385CONFIG_IP_NF_TARGET_SAME=m
386CONFIG_NF_NAT_SNMP_BASIC=m
387CONFIG_NF_NAT_FTP=m
388CONFIG_NF_NAT_IRC=m
389CONFIG_NF_NAT_TFTP=m
390# CONFIG_NF_NAT_AMANDA is not set
391# CONFIG_NF_NAT_PPTP is not set
392# CONFIG_NF_NAT_H323 is not set
393# CONFIG_NF_NAT_SIP is not set
394# CONFIG_IP_NF_MANGLE is not set
395# CONFIG_IP_NF_RAW is not set
396# CONFIG_IP_NF_ARPTABLES is not set
329# CONFIG_IP_DCCP is not set 397# CONFIG_IP_DCCP is not set
330
331#
332# SCTP Configuration (EXPERIMENTAL)
333#
334# CONFIG_IP_SCTP is not set 398# CONFIG_IP_SCTP is not set
335
336#
337# TIPC Configuration (EXPERIMENTAL)
338#
339# CONFIG_TIPC is not set 399# CONFIG_TIPC is not set
340# CONFIG_ATM is not set 400# CONFIG_ATM is not set
341# CONFIG_BRIDGE is not set 401# CONFIG_BRIDGE is not set
@@ -354,6 +414,7 @@ CONFIG_LLC=y
354# QoS and/or fair queueing 414# QoS and/or fair queueing
355# 415#
356# CONFIG_NET_SCHED is not set 416# CONFIG_NET_SCHED is not set
417CONFIG_NET_CLS_ROUTE=y
357 418
358# 419#
359# Network testing 420# Network testing
@@ -363,7 +424,16 @@ CONFIG_LLC=y
363# CONFIG_HAMRADIO is not set 424# CONFIG_HAMRADIO is not set
364# CONFIG_IRDA is not set 425# CONFIG_IRDA is not set
365# CONFIG_BT is not set 426# CONFIG_BT is not set
427# CONFIG_AF_RXRPC is not set
428
429#
430# Wireless
431#
432# CONFIG_CFG80211 is not set
433# CONFIG_WIRELESS_EXT is not set
434# CONFIG_MAC80211 is not set
366# CONFIG_IEEE80211 is not set 435# CONFIG_IEEE80211 is not set
436# CONFIG_RFKILL is not set
367 437
368# 438#
369# Device Drivers 439# Device Drivers
@@ -376,16 +446,13 @@ CONFIG_STANDALONE=y
376CONFIG_PREVENT_FIRMWARE_BUILD=y 446CONFIG_PREVENT_FIRMWARE_BUILD=y
377CONFIG_FW_LOADER=y 447CONFIG_FW_LOADER=y
378# CONFIG_DEBUG_DRIVER is not set 448# CONFIG_DEBUG_DRIVER is not set
449# CONFIG_DEBUG_DEVRES is not set
379# CONFIG_SYS_HYPERVISOR is not set 450# CONFIG_SYS_HYPERVISOR is not set
380 451
381# 452#
382# Connector - unified userspace <-> kernelspace linker 453# Connector - unified userspace <-> kernelspace linker
383# 454#
384# CONFIG_CONNECTOR is not set 455# CONFIG_CONNECTOR is not set
385
386#
387# Memory Technology Devices (MTD)
388#
389# CONFIG_MTD is not set 456# CONFIG_MTD is not set
390 457
391# 458#
@@ -403,6 +470,7 @@ CONFIG_PARPORT_PC=m
403# 470#
404# Plug and Play support 471# Plug and Play support
405# 472#
473# CONFIG_PNPACPI is not set
406 474
407# 475#
408# Block devices 476# Block devices
@@ -423,19 +491,16 @@ CONFIG_BLK_DEV_RAM=y
423CONFIG_BLK_DEV_RAM_COUNT=16 491CONFIG_BLK_DEV_RAM_COUNT=16
424CONFIG_BLK_DEV_RAM_SIZE=65536 492CONFIG_BLK_DEV_RAM_SIZE=65536
425CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 493CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
426CONFIG_BLK_DEV_INITRD=y
427# CONFIG_CDROM_PKTCDVD is not set 494# CONFIG_CDROM_PKTCDVD is not set
428# CONFIG_ATA_OVER_ETH is not set 495# CONFIG_ATA_OVER_ETH is not set
429 496
430# 497#
431# Misc devices 498# Misc devices
432# 499#
500# CONFIG_PHANTOM is not set
433# CONFIG_SGI_IOC4 is not set 501# CONFIG_SGI_IOC4 is not set
434# CONFIG_TIFM_CORE is not set 502# CONFIG_TIFM_CORE is not set
435 503# CONFIG_BLINK is not set
436#
437# ATA/ATAPI/MFM/RLL support
438#
439CONFIG_IDE=y 504CONFIG_IDE=y
440CONFIG_BLK_DEV_IDE=y 505CONFIG_BLK_DEV_IDE=y
441 506
@@ -450,6 +515,7 @@ CONFIG_BLK_DEV_IDECD=y
450# CONFIG_BLK_DEV_IDEFLOPPY is not set 515# CONFIG_BLK_DEV_IDEFLOPPY is not set
451# CONFIG_BLK_DEV_IDESCSI is not set 516# CONFIG_BLK_DEV_IDESCSI is not set
452# CONFIG_IDE_TASK_IOCTL is not set 517# CONFIG_IDE_TASK_IOCTL is not set
518CONFIG_IDE_PROC_FS=y
453 519
454# 520#
455# IDE chipset support/bugfixes 521# IDE chipset support/bugfixes
@@ -457,12 +523,12 @@ CONFIG_BLK_DEV_IDECD=y
457CONFIG_IDE_GENERIC=y 523CONFIG_IDE_GENERIC=y
458CONFIG_BLK_DEV_IDEPCI=y 524CONFIG_BLK_DEV_IDEPCI=y
459CONFIG_IDEPCI_SHARE_IRQ=y 525CONFIG_IDEPCI_SHARE_IRQ=y
526CONFIG_IDEPCI_PCIBUS_ORDER=y
460# CONFIG_BLK_DEV_OFFBOARD is not set 527# CONFIG_BLK_DEV_OFFBOARD is not set
461CONFIG_BLK_DEV_GENERIC=y 528CONFIG_BLK_DEV_GENERIC=y
462# CONFIG_BLK_DEV_OPTI621 is not set 529# CONFIG_BLK_DEV_OPTI621 is not set
463CONFIG_BLK_DEV_IDEDMA_PCI=y 530CONFIG_BLK_DEV_IDEDMA_PCI=y
464# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 531# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
465CONFIG_IDEDMA_PCI_AUTO=y
466# CONFIG_IDEDMA_ONLYDISK is not set 532# CONFIG_IDEDMA_ONLYDISK is not set
467# CONFIG_BLK_DEV_AEC62XX is not set 533# CONFIG_BLK_DEV_AEC62XX is not set
468# CONFIG_BLK_DEV_ALI15X3 is not set 534# CONFIG_BLK_DEV_ALI15X3 is not set
@@ -477,6 +543,7 @@ CONFIG_BLK_DEV_AMD74XX=y
477# CONFIG_BLK_DEV_JMICRON is not set 543# CONFIG_BLK_DEV_JMICRON is not set
478# CONFIG_BLK_DEV_SC1200 is not set 544# CONFIG_BLK_DEV_SC1200 is not set
479# CONFIG_BLK_DEV_PIIX is not set 545# CONFIG_BLK_DEV_PIIX is not set
546# CONFIG_BLK_DEV_IT8213 is not set
480# CONFIG_BLK_DEV_IT821X is not set 547# CONFIG_BLK_DEV_IT821X is not set
481# CONFIG_BLK_DEV_NS87415 is not set 548# CONFIG_BLK_DEV_NS87415 is not set
482# CONFIG_BLK_DEV_PDC202XX_OLD is not set 549# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -487,10 +554,10 @@ CONFIG_BLK_DEV_AMD74XX=y
487# CONFIG_BLK_DEV_SLC90E66 is not set 554# CONFIG_BLK_DEV_SLC90E66 is not set
488# CONFIG_BLK_DEV_TRM290 is not set 555# CONFIG_BLK_DEV_TRM290 is not set
489# CONFIG_BLK_DEV_VIA82CXXX is not set 556# CONFIG_BLK_DEV_VIA82CXXX is not set
557# CONFIG_BLK_DEV_TC86C001 is not set
490# CONFIG_IDE_ARM is not set 558# CONFIG_IDE_ARM is not set
491CONFIG_BLK_DEV_IDEDMA=y 559CONFIG_BLK_DEV_IDEDMA=y
492# CONFIG_IDEDMA_IVB is not set 560# CONFIG_IDEDMA_IVB is not set
493CONFIG_IDEDMA_AUTO=y
494# CONFIG_BLK_DEV_HD is not set 561# CONFIG_BLK_DEV_HD is not set
495 562
496# 563#
@@ -520,6 +587,7 @@ CONFIG_SCSI_MULTI_LUN=y
520CONFIG_SCSI_CONSTANTS=y 587CONFIG_SCSI_CONSTANTS=y
521# CONFIG_SCSI_LOGGING is not set 588# CONFIG_SCSI_LOGGING is not set
522# CONFIG_SCSI_SCAN_ASYNC is not set 589# CONFIG_SCSI_SCAN_ASYNC is not set
590CONFIG_SCSI_WAIT_SCAN=m
523 591
524# 592#
525# SCSI Transports 593# SCSI Transports
@@ -575,11 +643,8 @@ CONFIG_SCSI_LPFC=m
575# CONFIG_SCSI_DC390T is not set 643# CONFIG_SCSI_DC390T is not set
576# CONFIG_SCSI_DEBUG is not set 644# CONFIG_SCSI_DEBUG is not set
577# CONFIG_SCSI_SRP is not set 645# CONFIG_SCSI_SRP is not set
578
579#
580# Serial ATA (prod) and Parallel ATA (experimental) drivers
581#
582CONFIG_ATA=y 646CONFIG_ATA=y
647# CONFIG_ATA_NONSTANDARD is not set
583# CONFIG_SATA_AHCI is not set 648# CONFIG_SATA_AHCI is not set
584# CONFIG_SATA_SVW is not set 649# CONFIG_SATA_SVW is not set
585# CONFIG_ATA_PIIX is not set 650# CONFIG_ATA_PIIX is not set
@@ -595,10 +660,12 @@ CONFIG_ATA=y
595# CONFIG_SATA_ULI is not set 660# CONFIG_SATA_ULI is not set
596# CONFIG_SATA_VIA is not set 661# CONFIG_SATA_VIA is not set
597# CONFIG_SATA_VITESSE is not set 662# CONFIG_SATA_VITESSE is not set
663# CONFIG_SATA_INIC162X is not set
598# CONFIG_PATA_ALI is not set 664# CONFIG_PATA_ALI is not set
599# CONFIG_PATA_AMD is not set 665# CONFIG_PATA_AMD is not set
600# CONFIG_PATA_ARTOP is not set 666# CONFIG_PATA_ARTOP is not set
601# CONFIG_PATA_ATIIXP is not set 667# CONFIG_PATA_ATIIXP is not set
668# CONFIG_PATA_CMD640_PCI is not set
602# CONFIG_PATA_CMD64X is not set 669# CONFIG_PATA_CMD64X is not set
603# CONFIG_PATA_CS5520 is not set 670# CONFIG_PATA_CS5520 is not set
604# CONFIG_PATA_CS5530 is not set 671# CONFIG_PATA_CS5530 is not set
@@ -610,6 +677,7 @@ CONFIG_ATA=y
610# CONFIG_PATA_HPT3X2N is not set 677# CONFIG_PATA_HPT3X2N is not set
611# CONFIG_PATA_HPT3X3 is not set 678# CONFIG_PATA_HPT3X3 is not set
612# CONFIG_PATA_IT821X is not set 679# CONFIG_PATA_IT821X is not set
680# CONFIG_PATA_IT8213 is not set
613# CONFIG_PATA_JMICRON is not set 681# CONFIG_PATA_JMICRON is not set
614# CONFIG_PATA_TRIFLEX is not set 682# CONFIG_PATA_TRIFLEX is not set
615# CONFIG_PATA_MARVELL is not set 683# CONFIG_PATA_MARVELL is not set
@@ -650,6 +718,7 @@ CONFIG_DM_MIRROR=m
650CONFIG_DM_ZERO=m 718CONFIG_DM_ZERO=m
651CONFIG_DM_MULTIPATH=m 719CONFIG_DM_MULTIPATH=m
652CONFIG_DM_MULTIPATH_EMC=m 720CONFIG_DM_MULTIPATH_EMC=m
721# CONFIG_DM_DELAY is not set
653 722
654# 723#
655# Fusion MPT device support 724# Fusion MPT device support
@@ -662,18 +731,14 @@ CONFIG_DM_MULTIPATH_EMC=m
662# 731#
663# IEEE 1394 (FireWire) support 732# IEEE 1394 (FireWire) support
664# 733#
734# CONFIG_FIREWIRE is not set
665# CONFIG_IEEE1394 is not set 735# CONFIG_IEEE1394 is not set
666 736
667# 737#
668# I2O device support 738# I2O device support
669# 739#
670# CONFIG_I2O is not set 740# CONFIG_I2O is not set
671 741# CONFIG_MACINTOSH_DRIVERS is not set
672#
673# Macintosh device drivers
674#
675# CONFIG_MAC_EMUMOUSEBTN is not set
676# CONFIG_WINDFARM is not set
677 742
678# 743#
679# Network device support 744# Network device support
@@ -683,15 +748,7 @@ CONFIG_DUMMY=m
683CONFIG_BONDING=m 748CONFIG_BONDING=m
684# CONFIG_EQUALIZER is not set 749# CONFIG_EQUALIZER is not set
685CONFIG_TUN=m 750CONFIG_TUN=m
686
687#
688# ARCnet devices
689#
690# CONFIG_ARCNET is not set 751# CONFIG_ARCNET is not set
691
692#
693# PHY device support
694#
695# CONFIG_PHYLIB is not set 752# CONFIG_PHYLIB is not set
696 753
697# 754#
@@ -731,11 +788,9 @@ CONFIG_E100=y
731# CONFIG_EPIC100 is not set 788# CONFIG_EPIC100 is not set
732# CONFIG_SUNDANCE is not set 789# CONFIG_SUNDANCE is not set
733# CONFIG_VIA_RHINE is not set 790# CONFIG_VIA_RHINE is not set
791# CONFIG_SC92031 is not set
734# CONFIG_NET_POCKET is not set 792# CONFIG_NET_POCKET is not set
735 793CONFIG_NETDEV_1000=y
736#
737# Ethernet (1000 Mbit)
738#
739CONFIG_ACENIC=y 794CONFIG_ACENIC=y
740CONFIG_ACENIC_OMIT_TIGON_I=y 795CONFIG_ACENIC_OMIT_TIGON_I=y
741# CONFIG_DL2K is not set 796# CONFIG_DL2K is not set
@@ -754,11 +809,10 @@ CONFIG_E1000=y
754CONFIG_TIGON3=y 809CONFIG_TIGON3=y
755# CONFIG_BNX2 is not set 810# CONFIG_BNX2 is not set
756# CONFIG_QLA3XXX is not set 811# CONFIG_QLA3XXX is not set
757 812# CONFIG_ATL1 is not set
758# 813CONFIG_NETDEV_10000=y
759# Ethernet (10000 Mbit)
760#
761# CONFIG_CHELSIO_T1 is not set 814# CONFIG_CHELSIO_T1 is not set
815# CONFIG_CHELSIO_T3 is not set
762CONFIG_EHEA=m 816CONFIG_EHEA=m
763CONFIG_IXGB=m 817CONFIG_IXGB=m
764# CONFIG_IXGB_NAPI is not set 818# CONFIG_IXGB_NAPI is not set
@@ -766,23 +820,28 @@ CONFIG_S2IO=m
766# CONFIG_S2IO_NAPI is not set 820# CONFIG_S2IO_NAPI is not set
767# CONFIG_MYRI10GE is not set 821# CONFIG_MYRI10GE is not set
768# CONFIG_NETXEN_NIC is not set 822# CONFIG_NETXEN_NIC is not set
769 823# CONFIG_PASEMI_MAC is not set
770# 824# CONFIG_MLX4_CORE is not set
771# Token Ring devices
772#
773CONFIG_TR=y 825CONFIG_TR=y
774CONFIG_IBMOL=y 826CONFIG_IBMOL=y
775# CONFIG_3C359 is not set 827# CONFIG_3C359 is not set
776# CONFIG_TMS380TR is not set 828# CONFIG_TMS380TR is not set
777 829
778# 830#
779# Wireless LAN (non-hamradio) 831# Wireless LAN
780# 832#
781# CONFIG_NET_RADIO is not set 833# CONFIG_WLAN_PRE80211 is not set
834# CONFIG_WLAN_80211 is not set
782 835
783# 836#
784# Wan interfaces 837# USB Network Adapters
785# 838#
839# CONFIG_USB_CATC is not set
840# CONFIG_USB_KAWETH is not set
841# CONFIG_USB_PEGASUS is not set
842# CONFIG_USB_RTL8150 is not set
843# CONFIG_USB_USBNET_MII is not set
844# CONFIG_USB_USBNET is not set
786# CONFIG_WAN is not set 845# CONFIG_WAN is not set
787# CONFIG_FDDI is not set 846# CONFIG_FDDI is not set
788# CONFIG_HIPPI is not set 847# CONFIG_HIPPI is not set
@@ -802,7 +861,6 @@ CONFIG_SLHC=m
802# CONFIG_SHAPER is not set 861# CONFIG_SHAPER is not set
803CONFIG_NETCONSOLE=y 862CONFIG_NETCONSOLE=y
804CONFIG_NETPOLL=y 863CONFIG_NETPOLL=y
805CONFIG_NETPOLL_RX=y
806CONFIG_NETPOLL_TRAP=y 864CONFIG_NETPOLL_TRAP=y
807CONFIG_NET_POLL_CONTROLLER=y 865CONFIG_NET_POLL_CONTROLLER=y
808 866
@@ -821,6 +879,7 @@ CONFIG_NET_POLL_CONTROLLER=y
821# 879#
822CONFIG_INPUT=y 880CONFIG_INPUT=y
823# CONFIG_INPUT_FF_MEMLESS is not set 881# CONFIG_INPUT_FF_MEMLESS is not set
882# CONFIG_INPUT_POLLDEV is not set
824 883
825# 884#
826# Userland interfaces 885# Userland interfaces
@@ -846,12 +905,25 @@ CONFIG_KEYBOARD_ATKBD=y
846# CONFIG_KEYBOARD_STOWAWAY is not set 905# CONFIG_KEYBOARD_STOWAWAY is not set
847CONFIG_INPUT_MOUSE=y 906CONFIG_INPUT_MOUSE=y
848CONFIG_MOUSE_PS2=y 907CONFIG_MOUSE_PS2=y
908CONFIG_MOUSE_PS2_ALPS=y
909CONFIG_MOUSE_PS2_LOGIPS2PP=y
910CONFIG_MOUSE_PS2_SYNAPTICS=y
911CONFIG_MOUSE_PS2_LIFEBOOK=y
912CONFIG_MOUSE_PS2_TRACKPOINT=y
913# CONFIG_MOUSE_PS2_TOUCHKIT is not set
849# CONFIG_MOUSE_SERIAL is not set 914# CONFIG_MOUSE_SERIAL is not set
915# CONFIG_MOUSE_APPLETOUCH is not set
850# CONFIG_MOUSE_VSXXXAA is not set 916# CONFIG_MOUSE_VSXXXAA is not set
851# CONFIG_INPUT_JOYSTICK is not set 917# CONFIG_INPUT_JOYSTICK is not set
918# CONFIG_INPUT_TABLET is not set
852# CONFIG_INPUT_TOUCHSCREEN is not set 919# CONFIG_INPUT_TOUCHSCREEN is not set
853CONFIG_INPUT_MISC=y 920CONFIG_INPUT_MISC=y
854CONFIG_INPUT_PCSPKR=m 921CONFIG_INPUT_PCSPKR=m
922# CONFIG_INPUT_ATI_REMOTE is not set
923# CONFIG_INPUT_ATI_REMOTE2 is not set
924# CONFIG_INPUT_KEYSPAN_REMOTE is not set
925# CONFIG_INPUT_POWERMATE is not set
926# CONFIG_INPUT_YEALINK is not set
855# CONFIG_INPUT_UINPUT is not set 927# CONFIG_INPUT_UINPUT is not set
856 928
857# 929#
@@ -892,6 +964,7 @@ CONFIG_SERIAL_CORE=y
892CONFIG_SERIAL_CORE_CONSOLE=y 964CONFIG_SERIAL_CORE_CONSOLE=y
893CONFIG_SERIAL_ICOM=m 965CONFIG_SERIAL_ICOM=m
894CONFIG_SERIAL_JSM=m 966CONFIG_SERIAL_JSM=m
967# CONFIG_SERIAL_OF_PLATFORM is not set
895CONFIG_UNIX98_PTYS=y 968CONFIG_UNIX98_PTYS=y
896CONFIG_LEGACY_PTYS=y 969CONFIG_LEGACY_PTYS=y
897CONFIG_LEGACY_PTY_COUNT=256 970CONFIG_LEGACY_PTY_COUNT=256
@@ -907,15 +980,10 @@ CONFIG_HVCS=m
907# IPMI 980# IPMI
908# 981#
909# CONFIG_IPMI_HANDLER is not set 982# CONFIG_IPMI_HANDLER is not set
910
911#
912# Watchdog Cards
913#
914# CONFIG_WATCHDOG is not set 983# CONFIG_WATCHDOG is not set
915# CONFIG_HW_RANDOM is not set 984# CONFIG_HW_RANDOM is not set
916CONFIG_GEN_RTC=y 985CONFIG_GEN_RTC=y
917# CONFIG_GEN_RTC_X is not set 986# CONFIG_GEN_RTC_X is not set
918# CONFIG_DTLK is not set
919# CONFIG_R3964 is not set 987# CONFIG_R3964 is not set
920# CONFIG_APPLICOM is not set 988# CONFIG_APPLICOM is not set
921# CONFIG_AGP is not set 989# CONFIG_AGP is not set
@@ -928,11 +996,9 @@ CONFIG_MAX_RAW_DEVS=1024
928# TPM devices 996# TPM devices
929# 997#
930# CONFIG_TCG_TPM is not set 998# CONFIG_TCG_TPM is not set
931 999CONFIG_DEVPORT=y
932#
933# I2C support
934#
935CONFIG_I2C=y 1000CONFIG_I2C=y
1001CONFIG_I2C_BOARDINFO=y
936# CONFIG_I2C_CHARDEV is not set 1002# CONFIG_I2C_CHARDEV is not set
937 1003
938# 1004#
@@ -959,14 +1025,15 @@ CONFIG_I2C_ALGOBIT=y
959# CONFIG_I2C_PARPORT_LIGHT is not set 1025# CONFIG_I2C_PARPORT_LIGHT is not set
960# CONFIG_I2C_PROSAVAGE is not set 1026# CONFIG_I2C_PROSAVAGE is not set
961# CONFIG_I2C_SAVAGE4 is not set 1027# CONFIG_I2C_SAVAGE4 is not set
1028# CONFIG_I2C_SIMTEC is not set
962# CONFIG_I2C_SIS5595 is not set 1029# CONFIG_I2C_SIS5595 is not set
963# CONFIG_I2C_SIS630 is not set 1030# CONFIG_I2C_SIS630 is not set
964# CONFIG_I2C_SIS96X is not set 1031# CONFIG_I2C_SIS96X is not set
965# CONFIG_I2C_STUB is not set 1032# CONFIG_I2C_STUB is not set
1033# CONFIG_I2C_TINY_USB is not set
966# CONFIG_I2C_VIA is not set 1034# CONFIG_I2C_VIA is not set
967# CONFIG_I2C_VIAPRO is not set 1035# CONFIG_I2C_VIAPRO is not set
968# CONFIG_I2C_VOODOO3 is not set 1036# CONFIG_I2C_VOODOO3 is not set
969# CONFIG_I2C_PCA_ISA is not set
970 1037
971# 1038#
972# Miscellaneous I2C Chip support 1039# Miscellaneous I2C Chip support
@@ -993,37 +1060,56 @@ CONFIG_I2C_ALGOBIT=y
993# Dallas's 1-wire bus 1060# Dallas's 1-wire bus
994# 1061#
995# CONFIG_W1 is not set 1062# CONFIG_W1 is not set
1063# CONFIG_HWMON is not set
996 1064
997# 1065#
998# Hardware Monitoring support 1066# Multifunction device drivers
999# 1067#
1000# CONFIG_HWMON is not set 1068# CONFIG_MFD_SM501 is not set
1001# CONFIG_HWMON_VID is not set
1002 1069
1003# 1070#
1004# Multimedia devices 1071# Multimedia devices
1005# 1072#
1006# CONFIG_VIDEO_DEV is not set 1073# CONFIG_VIDEO_DEV is not set
1074# CONFIG_DVB_CORE is not set
1075# CONFIG_DAB is not set
1007 1076
1008# 1077#
1009# Digital Video Broadcasting Devices 1078# Graphics support
1010# 1079#
1011# CONFIG_DVB is not set 1080CONFIG_BACKLIGHT_LCD_SUPPORT=y
1012# CONFIG_USB_DABUSB is not set 1081CONFIG_BACKLIGHT_CLASS_DEVICE=y
1082CONFIG_LCD_CLASS_DEVICE=m
1013 1083
1014# 1084#
1015# Graphics support 1085# Display device support
1016# 1086#
1017CONFIG_FIRMWARE_EDID=y 1087CONFIG_DISPLAY_SUPPORT=y
1088
1089#
1090# Display hardware drivers
1091#
1092# CONFIG_VGASTATE is not set
1018CONFIG_FB=y 1093CONFIG_FB=y
1094CONFIG_FIRMWARE_EDID=y
1019CONFIG_FB_DDC=y 1095CONFIG_FB_DDC=y
1020CONFIG_FB_CFB_FILLRECT=y 1096CONFIG_FB_CFB_FILLRECT=y
1021CONFIG_FB_CFB_COPYAREA=y 1097CONFIG_FB_CFB_COPYAREA=y
1022CONFIG_FB_CFB_IMAGEBLIT=y 1098CONFIG_FB_CFB_IMAGEBLIT=y
1099# CONFIG_FB_SYS_FILLRECT is not set
1100# CONFIG_FB_SYS_COPYAREA is not set
1101# CONFIG_FB_SYS_IMAGEBLIT is not set
1102# CONFIG_FB_SYS_FOPS is not set
1103CONFIG_FB_DEFERRED_IO=y
1104# CONFIG_FB_SVGALIB is not set
1023CONFIG_FB_MACMODES=y 1105CONFIG_FB_MACMODES=y
1024# CONFIG_FB_BACKLIGHT is not set 1106CONFIG_FB_BACKLIGHT=y
1025CONFIG_FB_MODE_HELPERS=y 1107CONFIG_FB_MODE_HELPERS=y
1026CONFIG_FB_TILEBLITTING=y 1108CONFIG_FB_TILEBLITTING=y
1109
1110#
1111# Frame buffer hardware drivers
1112#
1027# CONFIG_FB_CIRRUS is not set 1113# CONFIG_FB_CIRRUS is not set
1028# CONFIG_FB_PM2 is not set 1114# CONFIG_FB_PM2 is not set
1029# CONFIG_FB_CYBER2000 is not set 1115# CONFIG_FB_CYBER2000 is not set
@@ -1042,16 +1128,21 @@ CONFIG_FB_MATROX_G=y
1042CONFIG_FB_MATROX_MULTIHEAD=y 1128CONFIG_FB_MATROX_MULTIHEAD=y
1043CONFIG_FB_RADEON=y 1129CONFIG_FB_RADEON=y
1044CONFIG_FB_RADEON_I2C=y 1130CONFIG_FB_RADEON_I2C=y
1131CONFIG_FB_RADEON_BACKLIGHT=y
1045# CONFIG_FB_RADEON_DEBUG is not set 1132# CONFIG_FB_RADEON_DEBUG is not set
1046# CONFIG_FB_ATY128 is not set 1133# CONFIG_FB_ATY128 is not set
1047# CONFIG_FB_ATY is not set 1134# CONFIG_FB_ATY is not set
1135# CONFIG_FB_S3 is not set
1048# CONFIG_FB_SAVAGE is not set 1136# CONFIG_FB_SAVAGE is not set
1049# CONFIG_FB_SIS is not set 1137# CONFIG_FB_SIS is not set
1050# CONFIG_FB_NEOMAGIC is not set 1138# CONFIG_FB_NEOMAGIC is not set
1051# CONFIG_FB_KYRO is not set 1139# CONFIG_FB_KYRO is not set
1052# CONFIG_FB_3DFX is not set 1140# CONFIG_FB_3DFX is not set
1053# CONFIG_FB_VOODOO1 is not set 1141# CONFIG_FB_VOODOO1 is not set
1142# CONFIG_FB_VT8623 is not set
1054# CONFIG_FB_TRIDENT is not set 1143# CONFIG_FB_TRIDENT is not set
1144# CONFIG_FB_ARK is not set
1145# CONFIG_FB_PM3 is not set
1055CONFIG_FB_IBM_GXT4500=y 1146CONFIG_FB_IBM_GXT4500=y
1056# CONFIG_FB_VIRTUAL is not set 1147# CONFIG_FB_VIRTUAL is not set
1057 1148
@@ -1065,19 +1156,10 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
1065# CONFIG_FONTS is not set 1156# CONFIG_FONTS is not set
1066CONFIG_FONT_8x8=y 1157CONFIG_FONT_8x8=y
1067CONFIG_FONT_8x16=y 1158CONFIG_FONT_8x16=y
1068
1069#
1070# Logo configuration
1071#
1072CONFIG_LOGO=y 1159CONFIG_LOGO=y
1073CONFIG_LOGO_LINUX_MONO=y 1160CONFIG_LOGO_LINUX_MONO=y
1074CONFIG_LOGO_LINUX_VGA16=y 1161CONFIG_LOGO_LINUX_VGA16=y
1075CONFIG_LOGO_LINUX_CLUT224=y 1162CONFIG_LOGO_LINUX_CLUT224=y
1076CONFIG_BACKLIGHT_LCD_SUPPORT=y
1077CONFIG_BACKLIGHT_CLASS_DEVICE=m
1078CONFIG_BACKLIGHT_DEVICE=y
1079CONFIG_LCD_CLASS_DEVICE=m
1080CONFIG_LCD_DEVICE=y
1081 1163
1082# 1164#
1083# Sound 1165# Sound
@@ -1088,6 +1170,15 @@ CONFIG_LCD_DEVICE=y
1088# HID Devices 1170# HID Devices
1089# 1171#
1090CONFIG_HID=y 1172CONFIG_HID=y
1173# CONFIG_HID_DEBUG is not set
1174
1175#
1176# USB Input Devices
1177#
1178CONFIG_USB_HID=y
1179# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1180# CONFIG_HID_FF is not set
1181CONFIG_USB_HIDDEV=y
1091 1182
1092# 1183#
1093# USB support 1184# USB support
@@ -1102,9 +1193,8 @@ CONFIG_USB=y
1102# Miscellaneous USB options 1193# Miscellaneous USB options
1103# 1194#
1104CONFIG_USB_DEVICEFS=y 1195CONFIG_USB_DEVICEFS=y
1105# CONFIG_USB_BANDWIDTH is not set 1196CONFIG_USB_DEVICE_CLASS=y
1106# CONFIG_USB_DYNAMIC_MINORS is not set 1197# CONFIG_USB_DYNAMIC_MINORS is not set
1107# CONFIG_USB_MULTITHREAD_PROBE is not set
1108# CONFIG_USB_OTG is not set 1198# CONFIG_USB_OTG is not set
1109 1199
1110# 1200#
@@ -1114,9 +1204,12 @@ CONFIG_USB_EHCI_HCD=y
1114# CONFIG_USB_EHCI_SPLIT_ISO is not set 1204# CONFIG_USB_EHCI_SPLIT_ISO is not set
1115# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1205# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1116# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1206# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1207# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1117# CONFIG_USB_ISP116X_HCD is not set 1208# CONFIG_USB_ISP116X_HCD is not set
1118CONFIG_USB_OHCI_HCD=y 1209CONFIG_USB_OHCI_HCD=y
1119# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1210# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1211# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1212# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1120CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1213CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1121# CONFIG_USB_UHCI_HCD is not set 1214# CONFIG_USB_UHCI_HCD is not set
1122# CONFIG_USB_SL811_HCD is not set 1215# CONFIG_USB_SL811_HCD is not set
@@ -1149,40 +1242,10 @@ CONFIG_USB_STORAGE=y
1149# CONFIG_USB_LIBUSUAL is not set 1242# CONFIG_USB_LIBUSUAL is not set
1150 1243
1151# 1244#
1152# USB Input Devices
1153#
1154CONFIG_USB_HID=y
1155# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1156# CONFIG_HID_FF is not set
1157CONFIG_USB_HIDDEV=y
1158# CONFIG_USB_AIPTEK is not set
1159# CONFIG_USB_WACOM is not set
1160# CONFIG_USB_ACECAD is not set
1161# CONFIG_USB_KBTAB is not set
1162# CONFIG_USB_POWERMATE is not set
1163# CONFIG_USB_TOUCHSCREEN is not set
1164# CONFIG_USB_YEALINK is not set
1165# CONFIG_USB_XPAD is not set
1166# CONFIG_USB_ATI_REMOTE is not set
1167# CONFIG_USB_ATI_REMOTE2 is not set
1168# CONFIG_USB_KEYSPAN_REMOTE is not set
1169# CONFIG_USB_APPLETOUCH is not set
1170
1171#
1172# USB Imaging devices 1245# USB Imaging devices
1173# 1246#
1174# CONFIG_USB_MDC800 is not set 1247# CONFIG_USB_MDC800 is not set
1175# CONFIG_USB_MICROTEK is not set 1248# CONFIG_USB_MICROTEK is not set
1176
1177#
1178# USB Network Adapters
1179#
1180# CONFIG_USB_CATC is not set
1181# CONFIG_USB_KAWETH is not set
1182# CONFIG_USB_PEGASUS is not set
1183# CONFIG_USB_RTL8150 is not set
1184# CONFIG_USB_USBNET_MII is not set
1185# CONFIG_USB_USBNET is not set
1186CONFIG_USB_MON=y 1249CONFIG_USB_MON=y
1187 1250
1188# 1251#
@@ -1205,6 +1268,7 @@ CONFIG_USB_MON=y
1205# CONFIG_USB_RIO500 is not set 1268# CONFIG_USB_RIO500 is not set
1206# CONFIG_USB_LEGOTOWER is not set 1269# CONFIG_USB_LEGOTOWER is not set
1207# CONFIG_USB_LCD is not set 1270# CONFIG_USB_LCD is not set
1271# CONFIG_USB_BERRY_CHARGE is not set
1208# CONFIG_USB_LED is not set 1272# CONFIG_USB_LED is not set
1209# CONFIG_USB_CYPRESS_CY7C63 is not set 1273# CONFIG_USB_CYPRESS_CY7C63 is not set
1210# CONFIG_USB_CYTHERM is not set 1274# CONFIG_USB_CYTHERM is not set
@@ -1215,6 +1279,7 @@ CONFIG_USB_MON=y
1215# CONFIG_USB_SISUSBVGA is not set 1279# CONFIG_USB_SISUSBVGA is not set
1216# CONFIG_USB_LD is not set 1280# CONFIG_USB_LD is not set
1217# CONFIG_USB_TRANCEVIBRATOR is not set 1281# CONFIG_USB_TRANCEVIBRATOR is not set
1282# CONFIG_USB_IOWARRIOR is not set
1218# CONFIG_USB_TEST is not set 1283# CONFIG_USB_TEST is not set
1219 1284
1220# 1285#
@@ -1225,10 +1290,6 @@ CONFIG_USB_MON=y
1225# USB Gadget Support 1290# USB Gadget Support
1226# 1291#
1227# CONFIG_USB_GADGET is not set 1292# CONFIG_USB_GADGET is not set
1228
1229#
1230# MMC/SD Card support
1231#
1232# CONFIG_MMC is not set 1293# CONFIG_MMC is not set
1233 1294
1234# 1295#
@@ -1250,13 +1311,16 @@ CONFIG_USB_MON=y
1250CONFIG_INFINIBAND=m 1311CONFIG_INFINIBAND=m
1251CONFIG_INFINIBAND_USER_MAD=m 1312CONFIG_INFINIBAND_USER_MAD=m
1252CONFIG_INFINIBAND_USER_ACCESS=m 1313CONFIG_INFINIBAND_USER_ACCESS=m
1314CONFIG_INFINIBAND_USER_MEM=y
1253CONFIG_INFINIBAND_ADDR_TRANS=y 1315CONFIG_INFINIBAND_ADDR_TRANS=y
1254CONFIG_INFINIBAND_MTHCA=m 1316CONFIG_INFINIBAND_MTHCA=m
1255CONFIG_INFINIBAND_MTHCA_DEBUG=y 1317CONFIG_INFINIBAND_MTHCA_DEBUG=y
1318# CONFIG_INFINIBAND_IPATH is not set
1256CONFIG_INFINIBAND_EHCA=m 1319CONFIG_INFINIBAND_EHCA=m
1257CONFIG_INFINIBAND_EHCA_SCALING=y
1258# CONFIG_INFINIBAND_AMSO1100 is not set 1320# CONFIG_INFINIBAND_AMSO1100 is not set
1321# CONFIG_MLX4_INFINIBAND is not set
1259CONFIG_INFINIBAND_IPOIB=m 1322CONFIG_INFINIBAND_IPOIB=m
1323# CONFIG_INFINIBAND_IPOIB_CM is not set
1260CONFIG_INFINIBAND_IPOIB_DEBUG=y 1324CONFIG_INFINIBAND_IPOIB_DEBUG=y
1261# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set 1325# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
1262CONFIG_INFINIBAND_SRP=m 1326CONFIG_INFINIBAND_SRP=m
@@ -1285,8 +1349,9 @@ CONFIG_INFINIBAND_SRP=m
1285# 1349#
1286 1350
1287# 1351#
1288# Virtualization 1352# Auxiliary Display support
1289# 1353#
1354# CONFIG_KS0108 is not set
1290 1355
1291# 1356#
1292# File systems 1357# File systems
@@ -1341,7 +1406,6 @@ CONFIG_FUSE_FS=m
1341CONFIG_ISO9660_FS=y 1406CONFIG_ISO9660_FS=y
1342CONFIG_JOLIET=y 1407CONFIG_JOLIET=y
1343CONFIG_ZISOFS=y 1408CONFIG_ZISOFS=y
1344CONFIG_ZISOFS_FS=y
1345CONFIG_UDF_FS=m 1409CONFIG_UDF_FS=m
1346CONFIG_UDF_NLS=y 1410CONFIG_UDF_NLS=y
1347 1411
@@ -1407,6 +1471,7 @@ CONFIG_NFS_ACL_SUPPORT=y
1407CONFIG_NFS_COMMON=y 1471CONFIG_NFS_COMMON=y
1408CONFIG_SUNRPC=y 1472CONFIG_SUNRPC=y
1409CONFIG_SUNRPC_GSS=y 1473CONFIG_SUNRPC_GSS=y
1474# CONFIG_SUNRPC_BIND34 is not set
1410CONFIG_RPCSEC_GSS_KRB5=y 1475CONFIG_RPCSEC_GSS_KRB5=y
1411CONFIG_RPCSEC_GSS_SPKM3=m 1476CONFIG_RPCSEC_GSS_SPKM3=m
1412# CONFIG_SMB_FS is not set 1477# CONFIG_SMB_FS is not set
@@ -1476,6 +1541,7 @@ CONFIG_NLS_ISO8859_1=y
1476# Distributed Lock Manager 1541# Distributed Lock Manager
1477# 1542#
1478# CONFIG_DLM is not set 1543# CONFIG_DLM is not set
1544# CONFIG_UCC_SLOW is not set
1479 1545
1480# 1546#
1481# Library routines 1547# Library routines
@@ -1483,12 +1549,19 @@ CONFIG_NLS_ISO8859_1=y
1483CONFIG_BITREVERSE=y 1549CONFIG_BITREVERSE=y
1484CONFIG_CRC_CCITT=m 1550CONFIG_CRC_CCITT=m
1485# CONFIG_CRC16 is not set 1551# CONFIG_CRC16 is not set
1552# CONFIG_CRC_ITU_T is not set
1486CONFIG_CRC32=y 1553CONFIG_CRC32=y
1487CONFIG_LIBCRC32C=m 1554CONFIG_LIBCRC32C=m
1488CONFIG_ZLIB_INFLATE=y 1555CONFIG_ZLIB_INFLATE=y
1489CONFIG_ZLIB_DEFLATE=m 1556CONFIG_ZLIB_DEFLATE=m
1557CONFIG_TEXTSEARCH=y
1558CONFIG_TEXTSEARCH_KMP=m
1559CONFIG_TEXTSEARCH_BM=m
1560CONFIG_TEXTSEARCH_FSM=m
1490CONFIG_PLIST=y 1561CONFIG_PLIST=y
1491CONFIG_IOMAP_COPY=y 1562CONFIG_HAS_IOMEM=y
1563CONFIG_HAS_IOPORT=y
1564CONFIG_HAS_DMA=y
1492 1565
1493# 1566#
1494# Instrumentation Support 1567# Instrumentation Support
@@ -1507,15 +1580,15 @@ CONFIG_MAGIC_SYSRQ=y
1507CONFIG_DEBUG_FS=y 1580CONFIG_DEBUG_FS=y
1508# CONFIG_HEADERS_CHECK is not set 1581# CONFIG_HEADERS_CHECK is not set
1509CONFIG_DEBUG_KERNEL=y 1582CONFIG_DEBUG_KERNEL=y
1510CONFIG_LOG_BUF_SHIFT=17 1583# CONFIG_DEBUG_SHIRQ is not set
1511CONFIG_DETECT_SOFTLOCKUP=y 1584CONFIG_DETECT_SOFTLOCKUP=y
1512# CONFIG_SCHEDSTATS is not set 1585# CONFIG_SCHEDSTATS is not set
1586# CONFIG_TIMER_STATS is not set
1513# CONFIG_DEBUG_SLAB is not set 1587# CONFIG_DEBUG_SLAB is not set
1514# CONFIG_DEBUG_RT_MUTEXES is not set 1588# CONFIG_DEBUG_RT_MUTEXES is not set
1515# CONFIG_RT_MUTEX_TESTER is not set 1589# CONFIG_RT_MUTEX_TESTER is not set
1516# CONFIG_DEBUG_SPINLOCK is not set 1590# CONFIG_DEBUG_SPINLOCK is not set
1517# CONFIG_DEBUG_MUTEXES is not set 1591# CONFIG_DEBUG_MUTEXES is not set
1518# CONFIG_DEBUG_RWSEMS is not set
1519# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1592# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1520# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1593# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1521# CONFIG_DEBUG_KOBJECT is not set 1594# CONFIG_DEBUG_KOBJECT is not set
@@ -1526,8 +1599,10 @@ CONFIG_DEBUG_BUGVERBOSE=y
1526CONFIG_FORCED_INLINING=y 1599CONFIG_FORCED_INLINING=y
1527# CONFIG_RCU_TORTURE_TEST is not set 1600# CONFIG_RCU_TORTURE_TEST is not set
1528# CONFIG_LKDTM is not set 1601# CONFIG_LKDTM is not set
1602# CONFIG_FAULT_INJECTION is not set
1529CONFIG_DEBUG_STACKOVERFLOW=y 1603CONFIG_DEBUG_STACKOVERFLOW=y
1530# CONFIG_DEBUG_STACK_USAGE is not set 1604# CONFIG_DEBUG_STACK_USAGE is not set
1605# CONFIG_DEBUG_PAGEALLOC is not set
1531CONFIG_HCALL_STATS=y 1606CONFIG_HCALL_STATS=y
1532CONFIG_DEBUGGER=y 1607CONFIG_DEBUGGER=y
1533CONFIG_XMON=y 1608CONFIG_XMON=y
@@ -1564,8 +1639,11 @@ CONFIG_CRYPTO_TGR192=m
1564# CONFIG_CRYPTO_GF128MUL is not set 1639# CONFIG_CRYPTO_GF128MUL is not set
1565CONFIG_CRYPTO_ECB=m 1640CONFIG_CRYPTO_ECB=m
1566CONFIG_CRYPTO_CBC=y 1641CONFIG_CRYPTO_CBC=y
1642CONFIG_CRYPTO_PCBC=m
1567# CONFIG_CRYPTO_LRW is not set 1643# CONFIG_CRYPTO_LRW is not set
1644# CONFIG_CRYPTO_CRYPTD is not set
1568CONFIG_CRYPTO_DES=y 1645CONFIG_CRYPTO_DES=y
1646# CONFIG_CRYPTO_FCRYPT is not set
1569CONFIG_CRYPTO_BLOWFISH=m 1647CONFIG_CRYPTO_BLOWFISH=m
1570CONFIG_CRYPTO_TWOFISH=m 1648CONFIG_CRYPTO_TWOFISH=m
1571CONFIG_CRYPTO_TWOFISH_COMMON=m 1649CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -1580,6 +1658,7 @@ CONFIG_CRYPTO_ANUBIS=m
1580CONFIG_CRYPTO_DEFLATE=m 1658CONFIG_CRYPTO_DEFLATE=m
1581CONFIG_CRYPTO_MICHAEL_MIC=m 1659CONFIG_CRYPTO_MICHAEL_MIC=m
1582CONFIG_CRYPTO_CRC32C=m 1660CONFIG_CRYPTO_CRC32C=m
1661# CONFIG_CRYPTO_CAMELLIA is not set
1583CONFIG_CRYPTO_TEST=m 1662CONFIG_CRYPTO_TEST=m
1584 1663
1585# 1664#
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 3e779f07f2..42c42ecad0 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -12,7 +12,8 @@ endif
12 12
13obj-y := semaphore.o cputable.o ptrace.o syscalls.o \ 13obj-y := semaphore.o cputable.o ptrace.o syscalls.o \
14 irq.o align.o signal_32.o pmc.o vdso.o \ 14 irq.o align.o signal_32.o pmc.o vdso.o \
15 init_task.o process.o systbl.o idle.o 15 init_task.o process.o systbl.o idle.o \
16 signal.o
16obj-y += vdso32/ 17obj-y += vdso32/
17obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \ 18obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \
18 signal_64.o ptrace32.o \ 19 signal_64.o ptrace32.o \
@@ -65,9 +66,9 @@ obj-$(CONFIG_PPC_UDBG_16550) += legacy_serial.o udbg_16550.o
65module-$(CONFIG_PPC64) += module_64.o 66module-$(CONFIG_PPC64) += module_64.o
66obj-$(CONFIG_MODULES) += $(module-y) 67obj-$(CONFIG_MODULES) += $(module-y)
67 68
68pci64-$(CONFIG_PPC64) += pci_64.o pci_dn.o 69pci64-$(CONFIG_PPC64) += pci_64.o pci_dn.o isa-bridge.o
69pci32-$(CONFIG_PPC32) := pci_32.o 70pci32-$(CONFIG_PPC32) := pci_32.o
70obj-$(CONFIG_PCI) += $(pci64-y) $(pci32-y) 71obj-$(CONFIG_PCI) += $(pci64-y) $(pci32-y) pci-common.o
71obj-$(CONFIG_PCI_MSI) += msi.o 72obj-$(CONFIG_PCI_MSI) += msi.o
72kexec-$(CONFIG_PPC64) := machine_kexec_64.o 73kexec-$(CONFIG_PPC64) := machine_kexec_64.o
73kexec-$(CONFIG_PPC32) := machine_kexec_32.o 74kexec-$(CONFIG_PPC32) := machine_kexec_32.o
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index b2b5d664d3..b1f8000952 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -294,6 +294,21 @@ static struct cpu_spec cpu_specs[] = {
294 .oprofile_mmcra_sipr = MMCRA_SIPR, 294 .oprofile_mmcra_sipr = MMCRA_SIPR,
295 .platform = "power5", 295 .platform = "power5",
296 }, 296 },
297 { /* Power5++ */
298 .pvr_mask = 0xffffff00,
299 .pvr_value = 0x003b0300,
300 .cpu_name = "POWER5+ (gs)",
301 .cpu_features = CPU_FTRS_POWER5,
302 .cpu_user_features = COMMON_USER_POWER5_PLUS,
303 .icache_bsize = 128,
304 .dcache_bsize = 128,
305 .num_pmcs = 6,
306 .oprofile_cpu_type = "ppc64/power5++",
307 .oprofile_type = PPC_OPROFILE_POWER4,
308 .oprofile_mmcra_sihv = MMCRA_SIHV,
309 .oprofile_mmcra_sipr = MMCRA_SIPR,
310 .platform = "power5+",
311 },
297 { /* Power5 GS */ 312 { /* Power5 GS */
298 .pvr_mask = 0xffff0000, 313 .pvr_mask = 0xffff0000,
299 .pvr_value = 0x003b0000, 314 .pvr_value = 0x003b0000,
@@ -1178,8 +1193,8 @@ static struct cpu_spec cpu_specs[] = {
1178 .platform = "ppc440", 1193 .platform = "ppc440",
1179 }, 1194 },
1180 { /* 440SP Rev. A */ 1195 { /* 440SP Rev. A */
1181 .pvr_mask = 0xff000fff, 1196 .pvr_mask = 0xfff00fff,
1182 .pvr_value = 0x53000891, 1197 .pvr_value = 0x53200891,
1183 .cpu_name = "440SP Rev. A", 1198 .cpu_name = "440SP Rev. A",
1184 .cpu_features = CPU_FTRS_44X, 1199 .cpu_features = CPU_FTRS_44X,
1185 .cpu_user_features = COMMON_USER_BOOKE, 1200 .cpu_user_features = COMMON_USER_BOOKE,
@@ -1188,9 +1203,19 @@ static struct cpu_spec cpu_specs[] = {
1188 .platform = "ppc440", 1203 .platform = "ppc440",
1189 }, 1204 },
1190 { /* 440SPe Rev. A */ 1205 { /* 440SPe Rev. A */
1191 .pvr_mask = 0xff000fff, 1206 .pvr_mask = 0xfff00fff,
1192 .pvr_value = 0x53000890, 1207 .pvr_value = 0x53400890,
1193 .cpu_name = "440SPe Rev. A", 1208 .cpu_name = "440SPe Rev. A",
1209 .cpu_features = CPU_FTRS_44X,
1210 .cpu_user_features = COMMON_USER_BOOKE,
1211 .icache_bsize = 32,
1212 .dcache_bsize = 32,
1213 .platform = "ppc440",
1214 },
1215 { /* 440SPe Rev. B */
1216 .pvr_mask = 0xfff00fff,
1217 .pvr_value = 0x53400891,
1218 .cpu_name = "440SPe Rev. B",
1194 .cpu_features = CPU_FTRS_44X, 1219 .cpu_features = CPU_FTRS_44X,
1195 .cpu_user_features = COMMON_USER_BOOKE, 1220 .cpu_user_features = COMMON_USER_BOOKE,
1196 .icache_bsize = 32, 1221 .icache_bsize = 32,
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index c897203198..7d73a13450 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -9,7 +9,6 @@
9 * rewritten by Paul Mackerras. 9 * rewritten by Paul Mackerras.
10 * Copyright (C) 1996 Paul Mackerras. 10 * Copyright (C) 1996 Paul Mackerras.
11 * MPC8xx modifications Copyright (C) 1997 Dan Malek (dmalek@jlc.net). 11 * MPC8xx modifications Copyright (C) 1997 Dan Malek (dmalek@jlc.net).
12 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
13 * 12 *
14 * This file contains the low-level support and setup for the 13 * This file contains the low-level support and setup for the
15 * PowerPC platform, including trap and interrupt dispatch. 14 * PowerPC platform, including trap and interrupt dispatch.
@@ -32,10 +31,6 @@
32#include <asm/ppc_asm.h> 31#include <asm/ppc_asm.h>
33#include <asm/asm-offsets.h> 32#include <asm/asm-offsets.h>
34 33
35#ifdef CONFIG_APUS
36#include <asm/amigappc.h>
37#endif
38
39/* 601 only have IBAT; cr0.eq is set on 601 when using this macro */ 34/* 601 only have IBAT; cr0.eq is set on 601 when using this macro */
40#define LOAD_BAT(n, reg, RA, RB) \ 35#define LOAD_BAT(n, reg, RA, RB) \
41 /* see the comment for clear_bats() -- Cort */ \ 36 /* see the comment for clear_bats() -- Cort */ \
@@ -92,11 +87,6 @@ _start:
92 * r4: virtual address of boot_infos_t 87 * r4: virtual address of boot_infos_t
93 * r5: 0 88 * r5: 0
94 * 89 *
95 * APUS
96 * r3: 'APUS'
97 * r4: physical address of memory base
98 * Linux/m68k style BootInfo structure at &_end.
99 *
100 * PREP 90 * PREP
101 * This is jumped to on prep systems right after the kernel is relocated 91 * This is jumped to on prep systems right after the kernel is relocated
102 * to its proper place in memory by the boot loader. The expected layout 92 * to its proper place in memory by the boot loader. The expected layout
@@ -150,14 +140,6 @@ __start:
150 */ 140 */
151 bl early_init 141 bl early_init
152 142
153#ifdef CONFIG_APUS
154/* On APUS the __va/__pa constants need to be set to the correct
155 * values before continuing.
156 */
157 mr r4,r30
158 bl fix_mem_constants
159#endif /* CONFIG_APUS */
160
161/* Switch MMU off, clear BATs and flush TLB. At this point, r3 contains 143/* Switch MMU off, clear BATs and flush TLB. At this point, r3 contains
162 * the physical address we are running at, returned by early_init() 144 * the physical address we are running at, returned by early_init()
163 */ 145 */
@@ -167,7 +149,7 @@ __after_mmu_off:
167 bl flush_tlbs 149 bl flush_tlbs
168 150
169 bl initial_bats 151 bl initial_bats
170#if !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT) 152#if defined(CONFIG_BOOTX_TEXT)
171 bl setup_disp_bat 153 bl setup_disp_bat
172#endif 154#endif
173 155
@@ -183,7 +165,6 @@ __after_mmu_off:
183#endif /* CONFIG_6xx */ 165#endif /* CONFIG_6xx */
184 166
185 167
186#ifndef CONFIG_APUS
187/* 168/*
188 * We need to run with _start at physical address 0. 169 * We need to run with _start at physical address 0.
189 * On CHRP, we are loaded at 0x10000 since OF on CHRP uses 170 * On CHRP, we are loaded at 0x10000 since OF on CHRP uses
@@ -196,7 +177,6 @@ __after_mmu_off:
196 addis r4,r3,KERNELBASE@h /* current address of _start */ 177 addis r4,r3,KERNELBASE@h /* current address of _start */
197 cmpwi 0,r4,0 /* are we already running at 0? */ 178 cmpwi 0,r4,0 /* are we already running at 0? */
198 bne relocate_kernel 179 bne relocate_kernel
199#endif /* CONFIG_APUS */
200/* 180/*
201 * we now have the 1st 16M of ram mapped with the bats. 181 * we now have the 1st 16M of ram mapped with the bats.
202 * prep needs the mmu to be turned on here, but pmac already has it on. 182 * prep needs the mmu to be turned on here, but pmac already has it on.
@@ -881,85 +861,6 @@ _GLOBAL(copy_and_flush)
881 addi r6,r6,4 861 addi r6,r6,4
882 blr 862 blr
883 863
884#ifdef CONFIG_APUS
885/*
886 * On APUS the physical base address of the kernel is not known at compile
887 * time, which means the __pa/__va constants used are incorrect. In the
888 * __init section is recorded the virtual addresses of instructions using
889 * these constants, so all that has to be done is fix these before
890 * continuing the kernel boot.
891 *
892 * r4 = The physical address of the kernel base.
893 */
894fix_mem_constants:
895 mr r10,r4
896 addis r10,r10,-KERNELBASE@h /* virt_to_phys constant */
897 neg r11,r10 /* phys_to_virt constant */
898
899 lis r12,__vtop_table_begin@h
900 ori r12,r12,__vtop_table_begin@l
901 add r12,r12,r10 /* table begin phys address */
902 lis r13,__vtop_table_end@h
903 ori r13,r13,__vtop_table_end@l
904 add r13,r13,r10 /* table end phys address */
905 subi r12,r12,4
906 subi r13,r13,4
9071: lwzu r14,4(r12) /* virt address of instruction */
908 add r14,r14,r10 /* phys address of instruction */
909 lwz r15,0(r14) /* instruction, now insert top */
910 rlwimi r15,r10,16,16,31 /* half of vp const in low half */
911 stw r15,0(r14) /* of instruction and restore. */
912 dcbst r0,r14 /* write it to memory */
913 sync
914 icbi r0,r14 /* flush the icache line */
915 cmpw r12,r13
916 bne 1b
917 sync /* additional sync needed on g4 */
918 isync
919
920/*
921 * Map the memory where the exception handlers will
922 * be copied to when hash constants have been patched.
923 */
924#ifdef CONFIG_APUS_FAST_EXCEPT
925 lis r8,0xfff0
926#else
927 lis r8,0
928#endif
929 ori r8,r8,0x2 /* 128KB, supervisor */
930 mtspr SPRN_DBAT3U,r8
931 mtspr SPRN_DBAT3L,r8
932
933 lis r12,__ptov_table_begin@h
934 ori r12,r12,__ptov_table_begin@l
935 add r12,r12,r10 /* table begin phys address */
936 lis r13,__ptov_table_end@h
937 ori r13,r13,__ptov_table_end@l
938 add r13,r13,r10 /* table end phys address */
939 subi r12,r12,4
940 subi r13,r13,4
9411: lwzu r14,4(r12) /* virt address of instruction */
942 add r14,r14,r10 /* phys address of instruction */
943 lwz r15,0(r14) /* instruction, now insert top */
944 rlwimi r15,r11,16,16,31 /* half of pv const in low half*/
945 stw r15,0(r14) /* of instruction and restore. */
946 dcbst r0,r14 /* write it to memory */
947 sync
948 icbi r0,r14 /* flush the icache line */
949 cmpw r12,r13
950 bne 1b
951
952 sync /* additional sync needed on g4 */
953 isync /* No speculative loading until now */
954 blr
955
956/***********************************************************************
957 * Please note that on APUS the exception handlers are located at the
958 * physical address 0xfff0000. For this reason, the exception handlers
959 * cannot use relative branches to access the code below.
960 ***********************************************************************/
961#endif /* CONFIG_APUS */
962
963#ifdef CONFIG_SMP 864#ifdef CONFIG_SMP
964#ifdef CONFIG_GEMINI 865#ifdef CONFIG_GEMINI
965 .globl __secondary_start_gemini 866 .globl __secondary_start_gemini
@@ -1135,19 +1036,6 @@ start_here:
1135 bl __save_cpu_setup 1036 bl __save_cpu_setup
1136 bl MMU_init 1037 bl MMU_init
1137 1038
1138#ifdef CONFIG_APUS
1139 /* Copy exception code to exception vector base on APUS. */
1140 lis r4,KERNELBASE@h
1141#ifdef CONFIG_APUS_FAST_EXCEPT
1142 lis r3,0xfff0 /* Copy to 0xfff00000 */
1143#else
1144 lis r3,0 /* Copy to 0x00000000 */
1145#endif
1146 li r5,0x4000 /* # bytes of memory to copy */
1147 li r6,0
1148 bl copy_and_flush /* copy the first 0x4000 bytes */
1149#endif /* CONFIG_APUS */
1150
1151/* 1039/*
1152 * Go back to running unmapped so we can load up new values 1040 * Go back to running unmapped so we can load up new values
1153 * for SDR1 (hash table pointer) and the segment registers 1041 * for SDR1 (hash table pointer) and the segment registers
@@ -1324,11 +1212,7 @@ initial_bats:
1324#else 1212#else
1325 ori r8,r8,2 /* R/W access */ 1213 ori r8,r8,2 /* R/W access */
1326#endif /* CONFIG_SMP */ 1214#endif /* CONFIG_SMP */
1327#ifdef CONFIG_APUS
1328 ori r11,r11,BL_8M<<2|0x2 /* set up 8MB BAT registers for 604 */
1329#else
1330 ori r11,r11,BL_256M<<2|0x2 /* set up BAT registers for 604 */ 1215 ori r11,r11,BL_256M<<2|0x2 /* set up BAT registers for 604 */
1331#endif /* CONFIG_APUS */
1332 1216
1333 mtspr SPRN_DBAT0L,r8 /* N.B. 6xx (not 601) have valid */ 1217 mtspr SPRN_DBAT0L,r8 /* N.B. 6xx (not 601) have valid */
1334 mtspr SPRN_DBAT0U,r11 /* bit in upper BAT register */ 1218 mtspr SPRN_DBAT0U,r11 /* bit in upper BAT register */
@@ -1338,7 +1222,7 @@ initial_bats:
1338 blr 1222 blr
1339 1223
1340 1224
1341#if !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT) 1225#ifdef CONFIG_BOOTX_TEXT
1342setup_disp_bat: 1226setup_disp_bat:
1343 /* 1227 /*
1344 * setup the display bat prepared for us in prom.c 1228 * setup the display bat prepared for us in prom.c
@@ -1362,7 +1246,7 @@ setup_disp_bat:
13621: mtspr SPRN_IBAT3L,r8 12461: mtspr SPRN_IBAT3L,r8
1363 mtspr SPRN_IBAT3U,r11 1247 mtspr SPRN_IBAT3U,r11
1364 blr 1248 blr
1365#endif /* !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT) */ 1249#endif /* CONFIG_BOOTX_TEXT */
1366 1250
1367#ifdef CONFIG_8260 1251#ifdef CONFIG_8260
1368/* Jump into the system reset for the rom. 1252/* Jump into the system reset for the rom.
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 1111fcec76..8cdd48ea43 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -103,8 +103,8 @@ __secondary_hold_acknowledge:
103 103
104 . = 0x60 104 . = 0x60
105/* 105/*
106 * The following code is used on pSeries to hold secondary processors 106 * The following code is used to hold secondary processors
107 * in a spin loop after they have been freed from OpenFirmware, but 107 * in a spin loop after they have entered the kernel, but
108 * before the bulk of the kernel has been relocated. This code 108 * before the bulk of the kernel has been relocated. This code
109 * is relocated to physical address 0x60 before prom_init is run. 109 * is relocated to physical address 0x60 before prom_init is run.
110 * All of it must fit below the first exception vector at 0x100. 110 * All of it must fit below the first exception vector at 0x100.
diff --git a/arch/powerpc/kernel/io.c b/arch/powerpc/kernel/io.c
index 34ae11494d..e31aca9208 100644
--- a/arch/powerpc/kernel/io.c
+++ b/arch/powerpc/kernel/io.c
@@ -35,7 +35,7 @@ void _insb(const volatile u8 __iomem *port, void *buf, long count)
35 asm volatile("sync"); 35 asm volatile("sync");
36 do { 36 do {
37 tmp = *port; 37 tmp = *port;
38 asm volatile("eieio"); 38 eieio();
39 *tbuf++ = tmp; 39 *tbuf++ = tmp;
40 } while (--count != 0); 40 } while (--count != 0);
41 asm volatile("twi 0,%0,0; isync" : : "r" (tmp)); 41 asm volatile("twi 0,%0,0; isync" : : "r" (tmp));
@@ -66,7 +66,7 @@ void _insw_ns(const volatile u16 __iomem *port, void *buf, long count)
66 asm volatile("sync"); 66 asm volatile("sync");
67 do { 67 do {
68 tmp = *port; 68 tmp = *port;
69 asm volatile("eieio"); 69 eieio();
70 *tbuf++ = tmp; 70 *tbuf++ = tmp;
71 } while (--count != 0); 71 } while (--count != 0);
72 asm volatile("twi 0,%0,0; isync" : : "r" (tmp)); 72 asm volatile("twi 0,%0,0; isync" : : "r" (tmp));
@@ -97,7 +97,7 @@ void _insl_ns(const volatile u32 __iomem *port, void *buf, long count)
97 asm volatile("sync"); 97 asm volatile("sync");
98 do { 98 do {
99 tmp = *port; 99 tmp = *port;
100 asm volatile("eieio"); 100 eieio();
101 *tbuf++ = tmp; 101 *tbuf++ = tmp;
102 } while (--count != 0); 102 } while (--count != 0);
103 asm volatile("twi 0,%0,0; isync" : : "r" (tmp)); 103 asm volatile("twi 0,%0,0; isync" : : "r" (tmp));
@@ -155,21 +155,21 @@ void _memcpy_fromio(void *dest, const volatile void __iomem *src,
155 __asm__ __volatile__ ("sync" : : : "memory"); 155 __asm__ __volatile__ ("sync" : : : "memory");
156 while(n && (!IO_CHECK_ALIGN(vsrc, 4) || !IO_CHECK_ALIGN(dest, 4))) { 156 while(n && (!IO_CHECK_ALIGN(vsrc, 4) || !IO_CHECK_ALIGN(dest, 4))) {
157 *((u8 *)dest) = *((volatile u8 *)vsrc); 157 *((u8 *)dest) = *((volatile u8 *)vsrc);
158 __asm__ __volatile__ ("eieio" : : : "memory"); 158 eieio();
159 vsrc++; 159 vsrc++;
160 dest++; 160 dest++;
161 n--; 161 n--;
162 } 162 }
163 while(n > 4) { 163 while(n > 4) {
164 *((u32 *)dest) = *((volatile u32 *)vsrc); 164 *((u32 *)dest) = *((volatile u32 *)vsrc);
165 __asm__ __volatile__ ("eieio" : : : "memory"); 165 eieio();
166 vsrc += 4; 166 vsrc += 4;
167 dest += 4; 167 dest += 4;
168 n -= 4; 168 n -= 4;
169 } 169 }
170 while(n) { 170 while(n) {
171 *((u8 *)dest) = *((volatile u8 *)vsrc); 171 *((u8 *)dest) = *((volatile u8 *)vsrc);
172 __asm__ __volatile__ ("eieio" : : : "memory"); 172 eieio();
173 vsrc++; 173 vsrc++;
174 dest++; 174 dest++;
175 n--; 175 n--;
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 42c8ed6ed5..2fc8786214 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -7,7 +7,6 @@
7 * Copyright (C) 1996-2001 Cort Dougan 7 * Copyright (C) 1996-2001 Cort Dougan
8 * Adapted for Power Macintosh by Paul Mackerras 8 * Adapted for Power Macintosh by Paul Mackerras
9 * Copyright (C) 1996 Paul Mackerras (paulus@cs.anu.edu.au) 9 * Copyright (C) 1996 Paul Mackerras (paulus@cs.anu.edu.au)
10 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
11 * 10 *
12 * This program is free software; you can redistribute it and/or 11 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License 12 * modify it under the terms of the GNU General Public License
@@ -337,7 +336,8 @@ void do_IRQ(struct pt_regs *regs)
337 336
338void __init init_IRQ(void) 337void __init init_IRQ(void)
339{ 338{
340 ppc_md.init_IRQ(); 339 if (ppc_md.init_IRQ)
340 ppc_md.init_IRQ();
341#ifdef CONFIG_PPC64 341#ifdef CONFIG_PPC64
342 irq_ctx_init(); 342 irq_ctx_init();
343#endif 343#endif
@@ -412,6 +412,12 @@ struct irq_map_entry irq_map[NR_IRQS];
412static unsigned int irq_virq_count = NR_IRQS; 412static unsigned int irq_virq_count = NR_IRQS;
413static struct irq_host *irq_default_host; 413static struct irq_host *irq_default_host;
414 414
415irq_hw_number_t virq_to_hw(unsigned int virq)
416{
417 return irq_map[virq].hwirq;
418}
419EXPORT_SYMBOL_GPL(virq_to_hw);
420
415struct irq_host *irq_alloc_host(unsigned int revmap_type, 421struct irq_host *irq_alloc_host(unsigned int revmap_type,
416 unsigned int revmap_arg, 422 unsigned int revmap_arg,
417 struct irq_host_ops *ops, 423 struct irq_host_ops *ops,
@@ -591,6 +597,49 @@ static void irq_radix_rdunlock(unsigned long flags)
591 local_irq_restore(flags); 597 local_irq_restore(flags);
592} 598}
593 599
600static int irq_setup_virq(struct irq_host *host, unsigned int virq,
601 irq_hw_number_t hwirq)
602{
603 /* Clear IRQ_NOREQUEST flag */
604 get_irq_desc(virq)->status &= ~IRQ_NOREQUEST;
605
606 /* map it */
607 smp_wmb();
608 irq_map[virq].hwirq = hwirq;
609 smp_mb();
610
611 if (host->ops->map(host, virq, hwirq)) {
612 pr_debug("irq: -> mapping failed, freeing\n");
613 irq_free_virt(virq, 1);
614 return -1;
615 }
616
617 return 0;
618}
619
620unsigned int irq_create_direct_mapping(struct irq_host *host)
621{
622 unsigned int virq;
623
624 if (host == NULL)
625 host = irq_default_host;
626
627 BUG_ON(host == NULL);
628 WARN_ON(host->revmap_type != IRQ_HOST_MAP_NOMAP);
629
630 virq = irq_alloc_virt(host, 1, 0);
631 if (virq == NO_IRQ) {
632 pr_debug("irq: create_direct virq allocation failed\n");
633 return NO_IRQ;
634 }
635
636 pr_debug("irq: create_direct obtained virq %d\n", virq);
637
638 if (irq_setup_virq(host, virq, virq))
639 return NO_IRQ;
640
641 return virq;
642}
594 643
595unsigned int irq_create_mapping(struct irq_host *host, 644unsigned int irq_create_mapping(struct irq_host *host,
596 irq_hw_number_t hwirq) 645 irq_hw_number_t hwirq)
@@ -639,18 +688,9 @@ unsigned int irq_create_mapping(struct irq_host *host,
639 } 688 }
640 pr_debug("irq: -> obtained virq %d\n", virq); 689 pr_debug("irq: -> obtained virq %d\n", virq);
641 690
642 /* Clear IRQ_NOREQUEST flag */ 691 if (irq_setup_virq(host, virq, hwirq))
643 get_irq_desc(virq)->status &= ~IRQ_NOREQUEST;
644
645 /* map it */
646 smp_wmb();
647 irq_map[virq].hwirq = hwirq;
648 smp_mb();
649 if (host->ops->map(host, virq, hwirq)) {
650 pr_debug("irq: -> mapping failed, freeing\n");
651 irq_free_virt(virq, 1);
652 return NO_IRQ; 692 return NO_IRQ;
653 } 693
654 return virq; 694 return virq;
655} 695}
656EXPORT_SYMBOL_GPL(irq_create_mapping); 696EXPORT_SYMBOL_GPL(irq_create_mapping);
diff --git a/arch/powerpc/kernel/isa-bridge.c b/arch/powerpc/kernel/isa-bridge.c
new file mode 100644
index 0000000000..f0f49d1be3
--- /dev/null
+++ b/arch/powerpc/kernel/isa-bridge.c
@@ -0,0 +1,271 @@
1/*
2 * Routines for tracking a legacy ISA bridge
3 *
4 * Copyrigh 2007 Benjamin Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
5 *
6 * Some bits and pieces moved over from pci_64.c
7 *
8 * Copyrigh 2003 Anton Blanchard <anton@au.ibm.com>, IBM Corp.
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version
13 * 2 of the License, or (at your option) any later version.
14 */
15
16#define DEBUG
17
18#include <linux/kernel.h>
19#include <linux/pci.h>
20#include <linux/string.h>
21#include <linux/init.h>
22#include <linux/mm.h>
23#include <linux/notifier.h>
24
25#include <asm/processor.h>
26#include <asm/io.h>
27#include <asm/prom.h>
28#include <asm/pci-bridge.h>
29#include <asm/machdep.h>
30#include <asm/ppc-pci.h>
31#include <asm/firmware.h>
32
33unsigned long isa_io_base; /* NULL if no ISA bus */
34EXPORT_SYMBOL(isa_io_base);
35
36/* Cached ISA bridge dev. */
37static struct device_node *isa_bridge_devnode;
38struct pci_dev *isa_bridge_pcidev;
39EXPORT_SYMBOL_GPL(isa_bridge_pcidev);
40
41#define ISA_SPACE_MASK 0x1
42#define ISA_SPACE_IO 0x1
43
44static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node,
45 unsigned long phb_io_base_phys)
46{
47 /* We should get some saner parsing here and remove these structs */
48 struct pci_address {
49 u32 a_hi;
50 u32 a_mid;
51 u32 a_lo;
52 };
53
54 struct isa_address {
55 u32 a_hi;
56 u32 a_lo;
57 };
58
59 struct isa_range {
60 struct isa_address isa_addr;
61 struct pci_address pci_addr;
62 unsigned int size;
63 };
64
65 const struct isa_range *range;
66 unsigned long pci_addr;
67 unsigned int isa_addr;
68 unsigned int size;
69 int rlen = 0;
70
71 range = of_get_property(isa_node, "ranges", &rlen);
72 if (range == NULL || (rlen < sizeof(struct isa_range)))
73 goto inval_range;
74
75 /* From "ISA Binding to 1275"
76 * The ranges property is laid out as an array of elements,
77 * each of which comprises:
78 * cells 0 - 1: an ISA address
79 * cells 2 - 4: a PCI address
80 * (size depending on dev->n_addr_cells)
81 * cell 5: the size of the range
82 */
83 if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO) {
84 range++;
85 rlen -= sizeof(struct isa_range);
86 if (rlen < sizeof(struct isa_range))
87 goto inval_range;
88 }
89 if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO)
90 goto inval_range;
91
92 isa_addr = range->isa_addr.a_lo;
93 pci_addr = (unsigned long) range->pci_addr.a_mid << 32 |
94 range->pci_addr.a_lo;
95
96 /* Assume these are both zero. Note: We could fix that and
97 * do a proper parsing instead ... oh well, that will do for
98 * now as nobody uses fancy mappings for ISA bridges
99 */
100 if ((pci_addr != 0) || (isa_addr != 0)) {
101 printk(KERN_ERR "unexpected isa to pci mapping: %s\n",
102 __FUNCTION__);
103 return;
104 }
105
106 /* Align size and make sure it's cropped to 64K */
107 size = PAGE_ALIGN(range->size);
108 if (size > 0x10000)
109 size = 0x10000;
110
111 printk(KERN_ERR "no ISA IO ranges or unexpected isa range,"
112 "mapping 64k\n");
113
114 __ioremap_at(phb_io_base_phys, (void *)ISA_IO_BASE,
115 size, _PAGE_NO_CACHE|_PAGE_GUARDED);
116 return;
117
118inval_range:
119 printk(KERN_ERR "no ISA IO ranges or unexpected isa range,"
120 "mapping 64k\n");
121 __ioremap_at(phb_io_base_phys, (void *)ISA_IO_BASE,
122 0x10000, _PAGE_NO_CACHE|_PAGE_GUARDED);
123}
124
125
126/**
127 * isa_bridge_find_early - Find and map the ISA IO space early before
128 * main PCI discovery. This is optionally called by
129 * the arch code when adding PCI PHBs to get early
130 * access to ISA IO ports
131 */
132void __init isa_bridge_find_early(struct pci_controller *hose)
133{
134 struct device_node *np, *parent = NULL, *tmp;
135
136 /* If we already have an ISA bridge, bail off */
137 if (isa_bridge_devnode != NULL)
138 return;
139
140 /* For each "isa" node in the system. Note : we do a search by
141 * type and not by name. It might be better to do by name but that's
142 * what the code used to do and I don't want to break too much at
143 * once. We can look into changing that separately
144 */
145 for_each_node_by_type(np, "isa") {
146 /* Look for our hose being a parent */
147 for (parent = of_get_parent(np); parent;) {
148 if (parent == hose->arch_data) {
149 of_node_put(parent);
150 break;
151 }
152 tmp = parent;
153 parent = of_get_parent(parent);
154 of_node_put(tmp);
155 }
156 if (parent != NULL)
157 break;
158 }
159 if (np == NULL)
160 return;
161 isa_bridge_devnode = np;
162
163 /* Now parse the "ranges" property and setup the ISA mapping */
164 pci_process_ISA_OF_ranges(np, hose->io_base_phys);
165
166 /* Set the global ISA io base to indicate we have an ISA bridge */
167 isa_io_base = ISA_IO_BASE;
168
169 pr_debug("ISA bridge (early) is %s\n", np->full_name);
170}
171
172/**
173 * isa_bridge_find_late - Find and map the ISA IO space upon discovery of
174 * a new ISA bridge
175 */
176static void __devinit isa_bridge_find_late(struct pci_dev *pdev,
177 struct device_node *devnode)
178{
179 struct pci_controller *hose = pci_bus_to_host(pdev->bus);
180
181 /* Store ISA device node and PCI device */
182 isa_bridge_devnode = of_node_get(devnode);
183 isa_bridge_pcidev = pdev;
184
185 /* Now parse the "ranges" property and setup the ISA mapping */
186 pci_process_ISA_OF_ranges(devnode, hose->io_base_phys);
187
188 /* Set the global ISA io base to indicate we have an ISA bridge */
189 isa_io_base = ISA_IO_BASE;
190
191 pr_debug("ISA bridge (late) is %s on %s\n",
192 devnode->full_name, pci_name(pdev));
193}
194
195/**
196 * isa_bridge_remove - Remove/unmap an ISA bridge
197 */
198static void isa_bridge_remove(void)
199{
200 pr_debug("ISA bridge removed !\n");
201
202 /* Clear the global ISA io base to indicate that we have no more
203 * ISA bridge. Note that drivers don't quite handle that, though
204 * we should probably do something about it. But do we ever really
205 * have ISA bridges being removed on machines using legacy devices ?
206 */
207 isa_io_base = ISA_IO_BASE;
208
209 /* Clear references to the bridge */
210 of_node_put(isa_bridge_devnode);
211 isa_bridge_devnode = NULL;
212 isa_bridge_pcidev = NULL;
213
214 /* Unmap the ISA area */
215 __iounmap_at((void *)ISA_IO_BASE, 0x10000);
216}
217
218/**
219 * isa_bridge_notify - Get notified of PCI devices addition/removal
220 */
221static int __devinit isa_bridge_notify(struct notifier_block *nb,
222 unsigned long action, void *data)
223{
224 struct device *dev = data;
225 struct pci_dev *pdev = to_pci_dev(dev);
226 struct device_node *devnode = pci_device_to_OF_node(pdev);
227
228 switch(action) {
229 case BUS_NOTIFY_ADD_DEVICE:
230 /* Check if we have an early ISA device, without PCI dev */
231 if (isa_bridge_devnode && isa_bridge_devnode == devnode &&
232 !isa_bridge_pcidev) {
233 pr_debug("ISA bridge PCI attached: %s\n",
234 pci_name(pdev));
235 isa_bridge_pcidev = pdev;
236 }
237
238 /* Check if we have no ISA device, and this happens to be one,
239 * register it as such if it has an OF device
240 */
241 if (!isa_bridge_devnode && devnode && devnode->type &&
242 !strcmp(devnode->type, "isa"))
243 isa_bridge_find_late(pdev, devnode);
244
245 return 0;
246 case BUS_NOTIFY_DEL_DEVICE:
247 /* Check if this our existing ISA device */
248 if (pdev == isa_bridge_pcidev ||
249 (devnode && devnode == isa_bridge_devnode))
250 isa_bridge_remove();
251 return 0;
252 }
253 return 0;
254}
255
256static struct notifier_block isa_bridge_notifier = {
257 .notifier_call = isa_bridge_notify
258};
259
260/**
261 * isa_bridge_init - register to be notified of ISA bridge addition/removal
262 *
263 */
264static int __init isa_bridge_init(void)
265{
266 if (firmware_has_feature(FW_FEATURE_ISERIES))
267 return 0;
268 bus_register_notifier(&pci_bus_type, &isa_bridge_notifier);
269 return 0;
270}
271arch_initcall(isa_bridge_init);
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
index 98decf8ebf..e708ab7ca9 100644
--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -392,7 +392,7 @@ BEGIN_FTR_SECTION
392 mtspr SPRN_L1CSR0,r3 392 mtspr SPRN_L1CSR0,r3
393 isync 393 isync
394 blr 394 blr
395END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 395END_FTR_SECTION_IFSET(CPU_FTR_UNIFIED_ID_CACHE)
396 mfspr r3,SPRN_L1CSR1 396 mfspr r3,SPRN_L1CSR1
397 ori r3,r3,L1CSR1_ICFI|L1CSR1_ICLFR 397 ori r3,r3,L1CSR1_ICFI|L1CSR1_ICLFR
398 mtspr SPRN_L1CSR1,r3 398 mtspr SPRN_L1CSR1,r3
@@ -419,7 +419,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE)
419_GLOBAL(__flush_icache_range) 419_GLOBAL(__flush_icache_range)
420BEGIN_FTR_SECTION 420BEGIN_FTR_SECTION
421 blr /* for 601, do nothing */ 421 blr /* for 601, do nothing */
422END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 422END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
423 li r5,L1_CACHE_BYTES-1 423 li r5,L1_CACHE_BYTES-1
424 andc r3,r3,r5 424 andc r3,r3,r5
425 subf r4,r3,r4 425 subf r4,r3,r4
@@ -514,8 +514,8 @@ _GLOBAL(invalidate_dcache_range)
514 */ 514 */
515_GLOBAL(__flush_dcache_icache) 515_GLOBAL(__flush_dcache_icache)
516BEGIN_FTR_SECTION 516BEGIN_FTR_SECTION
517 blr /* for 601, do nothing */ 517 blr
518END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 518END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
519 rlwinm r3,r3,0,0,19 /* Get page base address */ 519 rlwinm r3,r3,0,0,19 /* Get page base address */
520 li r4,4096/L1_CACHE_BYTES /* Number of lines in a page */ 520 li r4,4096/L1_CACHE_BYTES /* Number of lines in a page */
521 mtctr r4 521 mtctr r4
@@ -543,7 +543,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE)
543_GLOBAL(__flush_dcache_icache_phys) 543_GLOBAL(__flush_dcache_icache_phys)
544BEGIN_FTR_SECTION 544BEGIN_FTR_SECTION
545 blr /* for 601, do nothing */ 545 blr /* for 601, do nothing */
546END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 546END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
547 mfmsr r10 547 mfmsr r10
548 rlwinm r0,r10,0,28,26 /* clear DR */ 548 rlwinm r0,r10,0,28,26 /* clear DR */
549 mtmsr r0 549 mtmsr r0
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index 519861da04..bbb3ba54c5 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -646,6 +646,19 @@ _GLOBAL(kexec_sequence)
646 /* turn off mmu */ 646 /* turn off mmu */
647 bl real_mode 647 bl real_mode
648 648
649 /* copy 0x100 bytes starting at start to 0 */
650 li r3,0
651 mr r4,r30 /* start, aka phys mem offset */
652 li r5,0x100
653 li r6,0
654 bl .copy_and_flush /* (dest, src, copy limit, start offset) */
6551: /* assume normal blr return */
656
657 /* release other cpus to the new kernel secondary start at 0x60 */
658 mflr r5
659 li r6,1
660 stw r6,kexec_flag-1b(5)
661
649 /* clear out hardware hash page table and tlb */ 662 /* clear out hardware hash page table and tlb */
650 ld r5,0(r27) /* deref function descriptor */ 663 ld r5,0(r27) /* deref function descriptor */
651 mtctr r5 664 mtctr r5
@@ -676,19 +689,6 @@ _GLOBAL(kexec_sequence)
676 * are the boot cpu ????? 689 * are the boot cpu ?????
677 * other device tree differences (prop sizes, va vs pa, etc)... 690 * other device tree differences (prop sizes, va vs pa, etc)...
678 */ 691 */
679
680 /* copy 0x100 bytes starting at start to 0 */
681 li r3,0
682 mr r4,r30
683 li r5,0x100
684 li r6,0
685 bl .copy_and_flush /* (dest, src, copy limit, start offset) */
6861: /* assume normal blr return */
687
688 /* release other cpus to the new kernel secondary start at 0x60 */
689 mflr r5
690 li r6,1
691 stw r6,kexec_flag-1b(5)
692 mr r3,r25 # my phys cpu 692 mr r3,r25 # my phys cpu
693 mr r4,r30 # start, aka phys mem offset 693 mr r4,r30 # start, aka phys mem offset
694 mtlr 4 694 mtlr 4
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index d454f61c9c..9536ed7f24 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -427,14 +427,6 @@ static int __devinit of_pci_phb_probe(struct of_device *dev,
427 /* Process "ranges" property */ 427 /* Process "ranges" property */
428 pci_process_bridge_OF_ranges(phb, dev->node, 0); 428 pci_process_bridge_OF_ranges(phb, dev->node, 0);
429 429
430 /* Setup IO space. We use the non-dynamic version of that code here,
431 * which doesn't quite support unplugging. Next kernel release will
432 * have a better fix for this.
433 * Note also that we don't do ISA, this will also be fixed with a
434 * more massive rework.
435 */
436 pci_setup_phb_io(phb, pci_io_base == 0);
437
438 /* Init pci_dn data structures */ 430 /* Init pci_dn data structures */
439 pci_devs_phb_init_dynamic(phb); 431 pci_devs_phb_init_dynamic(phb);
440 432
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
new file mode 100644
index 0000000000..94b4a02823
--- /dev/null
+++ b/arch/powerpc/kernel/pci-common.c
@@ -0,0 +1,457 @@
1/*
2 * Contains common pci routines for ALL ppc platform
3 * (based on pci_32.c and pci_64.c)
4 *
5 * Port for PPC64 David Engebretsen, IBM Corp.
6 * Contains common pci routines for ppc64 platform, pSeries and iSeries brands.
7 *
8 * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM
9 * Rework, based on alpha PCI code.
10 *
11 * Common pmac/prep/chrp pci routines. -- Cort
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version
16 * 2 of the License, or (at your option) any later version.
17 */
18
19#undef DEBUG
20
21#include <linux/kernel.h>
22#include <linux/pci.h>
23#include <linux/string.h>
24#include <linux/init.h>
25#include <linux/bootmem.h>
26#include <linux/mm.h>
27#include <linux/list.h>
28#include <linux/syscalls.h>
29#include <linux/irq.h>
30#include <linux/vmalloc.h>
31
32#include <asm/processor.h>
33#include <asm/io.h>
34#include <asm/prom.h>
35#include <asm/pci-bridge.h>
36#include <asm/byteorder.h>
37#include <asm/machdep.h>
38#include <asm/ppc-pci.h>
39#include <asm/firmware.h>
40
41#ifdef DEBUG
42#include <asm/udbg.h>
43#define DBG(fmt...) printk(fmt)
44#else
45#define DBG(fmt...)
46#endif
47
48static DEFINE_SPINLOCK(hose_spinlock);
49
50/* XXX kill that some day ... */
51int global_phb_number; /* Global phb counter */
52
53extern struct list_head hose_list;
54
55/*
56 * pci_controller(phb) initialized common variables.
57 */
58static void __devinit pci_setup_pci_controller(struct pci_controller *hose)
59{
60 memset(hose, 0, sizeof(struct pci_controller));
61
62 spin_lock(&hose_spinlock);
63 hose->global_number = global_phb_number++;
64 list_add_tail(&hose->list_node, &hose_list);
65 spin_unlock(&hose_spinlock);
66}
67
68struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
69{
70 struct pci_controller *phb;
71
72 if (mem_init_done)
73 phb = kmalloc(sizeof(struct pci_controller), GFP_KERNEL);
74 else
75 phb = alloc_bootmem(sizeof (struct pci_controller));
76 if (phb == NULL)
77 return NULL;
78 pci_setup_pci_controller(phb);
79 phb->arch_data = dev;
80 phb->is_dynamic = mem_init_done;
81#ifdef CONFIG_PPC64
82 if (dev) {
83 int nid = of_node_to_nid(dev);
84
85 if (nid < 0 || !node_online(nid))
86 nid = -1;
87
88 PHB_SET_NODE(phb, nid);
89 }
90#endif
91 return phb;
92}
93
94void pcibios_free_controller(struct pci_controller *phb)
95{
96 spin_lock(&hose_spinlock);
97 list_del(&phb->list_node);
98 spin_unlock(&hose_spinlock);
99
100 if (phb->is_dynamic)
101 kfree(phb);
102}
103
104/*
105 * Return the domain number for this bus.
106 */
107int pci_domain_nr(struct pci_bus *bus)
108{
109 if (firmware_has_feature(FW_FEATURE_ISERIES))
110 return 0;
111 else {
112 struct pci_controller *hose = pci_bus_to_host(bus);
113
114 return hose->global_number;
115 }
116}
117
118EXPORT_SYMBOL(pci_domain_nr);
119
120#ifdef CONFIG_PPC_OF
121
122/* This routine is meant to be used early during boot, when the
123 * PCI bus numbers have not yet been assigned, and you need to
124 * issue PCI config cycles to an OF device.
125 * It could also be used to "fix" RTAS config cycles if you want
126 * to set pci_assign_all_buses to 1 and still use RTAS for PCI
127 * config cycles.
128 */
129struct pci_controller* pci_find_hose_for_OF_device(struct device_node* node)
130{
131 if (!have_of)
132 return NULL;
133 while(node) {
134 struct pci_controller *hose, *tmp;
135 list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
136 if (hose->arch_data == node)
137 return hose;
138 node = node->parent;
139 }
140 return NULL;
141}
142
143static ssize_t pci_show_devspec(struct device *dev,
144 struct device_attribute *attr, char *buf)
145{
146 struct pci_dev *pdev;
147 struct device_node *np;
148
149 pdev = to_pci_dev (dev);
150 np = pci_device_to_OF_node(pdev);
151 if (np == NULL || np->full_name == NULL)
152 return 0;
153 return sprintf(buf, "%s", np->full_name);
154}
155static DEVICE_ATTR(devspec, S_IRUGO, pci_show_devspec, NULL);
156#endif /* CONFIG_PPC_OF */
157
158/* Add sysfs properties */
159int pcibios_add_platform_entries(struct pci_dev *pdev)
160{
161#ifdef CONFIG_PPC_OF
162 return device_create_file(&pdev->dev, &dev_attr_devspec);
163#else
164 return 0;
165#endif /* CONFIG_PPC_OF */
166
167}
168
169char __init *pcibios_setup(char *str)
170{
171 return str;
172}
173
174/*
175 * Reads the interrupt pin to determine if interrupt is use by card.
176 * If the interrupt is used, then gets the interrupt line from the
177 * openfirmware and sets it in the pci_dev and pci_config line.
178 */
179int pci_read_irq_line(struct pci_dev *pci_dev)
180{
181 struct of_irq oirq;
182 unsigned int virq;
183
184 DBG("Try to map irq for %s...\n", pci_name(pci_dev));
185
186#ifdef DEBUG
187 memset(&oirq, 0xff, sizeof(oirq));
188#endif
189 /* Try to get a mapping from the device-tree */
190 if (of_irq_map_pci(pci_dev, &oirq)) {
191 u8 line, pin;
192
193 /* If that fails, lets fallback to what is in the config
194 * space and map that through the default controller. We
195 * also set the type to level low since that's what PCI
196 * interrupts are. If your platform does differently, then
197 * either provide a proper interrupt tree or don't use this
198 * function.
199 */
200 if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_PIN, &pin))
201 return -1;
202 if (pin == 0)
203 return -1;
204 if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &line) ||
205 line == 0xff) {
206 return -1;
207 }
208 DBG(" -> no map ! Using irq line %d from PCI config\n", line);
209
210 virq = irq_create_mapping(NULL, line);
211 if (virq != NO_IRQ)
212 set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
213 } else {
214 DBG(" -> got one, spec %d cells (0x%08x 0x%08x...) on %s\n",
215 oirq.size, oirq.specifier[0], oirq.specifier[1],
216 oirq.controller->full_name);
217
218 virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
219 oirq.size);
220 }
221 if(virq == NO_IRQ) {
222 DBG(" -> failed to map !\n");
223 return -1;
224 }
225
226 DBG(" -> mapped to linux irq %d\n", virq);
227
228 pci_dev->irq = virq;
229
230 return 0;
231}
232EXPORT_SYMBOL(pci_read_irq_line);
233
234/*
235 * Platform support for /proc/bus/pci/X/Y mmap()s,
236 * modelled on the sparc64 implementation by Dave Miller.
237 * -- paulus.
238 */
239
240/*
241 * Adjust vm_pgoff of VMA such that it is the physical page offset
242 * corresponding to the 32-bit pci bus offset for DEV requested by the user.
243 *
244 * Basically, the user finds the base address for his device which he wishes
245 * to mmap. They read the 32-bit value from the config space base register,
246 * add whatever PAGE_SIZE multiple offset they wish, and feed this into the
247 * offset parameter of mmap on /proc/bus/pci/XXX for that device.
248 *
249 * Returns negative error code on failure, zero on success.
250 */
251static struct resource *__pci_mmap_make_offset(struct pci_dev *dev,
252 resource_size_t *offset,
253 enum pci_mmap_state mmap_state)
254{
255 struct pci_controller *hose = pci_bus_to_host(dev->bus);
256 unsigned long io_offset = 0;
257 int i, res_bit;
258
259 if (hose == 0)
260 return NULL; /* should never happen */
261
262 /* If memory, add on the PCI bridge address offset */
263 if (mmap_state == pci_mmap_mem) {
264#if 0 /* See comment in pci_resource_to_user() for why this is disabled */
265 *offset += hose->pci_mem_offset;
266#endif
267 res_bit = IORESOURCE_MEM;
268 } else {
269 io_offset = (unsigned long)hose->io_base_virt - _IO_BASE;
270 *offset += io_offset;
271 res_bit = IORESOURCE_IO;
272 }
273
274 /*
275 * Check that the offset requested corresponds to one of the
276 * resources of the device.
277 */
278 for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
279 struct resource *rp = &dev->resource[i];
280 int flags = rp->flags;
281
282 /* treat ROM as memory (should be already) */
283 if (i == PCI_ROM_RESOURCE)
284 flags |= IORESOURCE_MEM;
285
286 /* Active and same type? */
287 if ((flags & res_bit) == 0)
288 continue;
289
290 /* In the range of this resource? */
291 if (*offset < (rp->start & PAGE_MASK) || *offset > rp->end)
292 continue;
293
294 /* found it! construct the final physical address */
295 if (mmap_state == pci_mmap_io)
296 *offset += hose->io_base_phys - io_offset;
297 return rp;
298 }
299
300 return NULL;
301}
302
303/*
304 * Set vm_page_prot of VMA, as appropriate for this architecture, for a pci
305 * device mapping.
306 */
307static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp,
308 pgprot_t protection,
309 enum pci_mmap_state mmap_state,
310 int write_combine)
311{
312 unsigned long prot = pgprot_val(protection);
313
314 /* Write combine is always 0 on non-memory space mappings. On
315 * memory space, if the user didn't pass 1, we check for a
316 * "prefetchable" resource. This is a bit hackish, but we use
317 * this to workaround the inability of /sysfs to provide a write
318 * combine bit
319 */
320 if (mmap_state != pci_mmap_mem)
321 write_combine = 0;
322 else if (write_combine == 0) {
323 if (rp->flags & IORESOURCE_PREFETCH)
324 write_combine = 1;
325 }
326
327 /* XXX would be nice to have a way to ask for write-through */
328 prot |= _PAGE_NO_CACHE;
329 if (write_combine)
330 prot &= ~_PAGE_GUARDED;
331 else
332 prot |= _PAGE_GUARDED;
333
334 return __pgprot(prot);
335}
336
337/*
338 * This one is used by /dev/mem and fbdev who have no clue about the
339 * PCI device, it tries to find the PCI device first and calls the
340 * above routine
341 */
342pgprot_t pci_phys_mem_access_prot(struct file *file,
343 unsigned long pfn,
344 unsigned long size,
345 pgprot_t protection)
346{
347 struct pci_dev *pdev = NULL;
348 struct resource *found = NULL;
349 unsigned long prot = pgprot_val(protection);
350 unsigned long offset = pfn << PAGE_SHIFT;
351 int i;
352
353 if (page_is_ram(pfn))
354 return __pgprot(prot);
355
356 prot |= _PAGE_NO_CACHE | _PAGE_GUARDED;
357
358 for_each_pci_dev(pdev) {
359 for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
360 struct resource *rp = &pdev->resource[i];
361 int flags = rp->flags;
362
363 /* Active and same type? */
364 if ((flags & IORESOURCE_MEM) == 0)
365 continue;
366 /* In the range of this resource? */
367 if (offset < (rp->start & PAGE_MASK) ||
368 offset > rp->end)
369 continue;
370 found = rp;
371 break;
372 }
373 if (found)
374 break;
375 }
376 if (found) {
377 if (found->flags & IORESOURCE_PREFETCH)
378 prot &= ~_PAGE_GUARDED;
379 pci_dev_put(pdev);
380 }
381
382 DBG("non-PCI map for %lx, prot: %lx\n", offset, prot);
383
384 return __pgprot(prot);
385}
386
387
388/*
389 * Perform the actual remap of the pages for a PCI device mapping, as
390 * appropriate for this architecture. The region in the process to map
391 * is described by vm_start and vm_end members of VMA, the base physical
392 * address is found in vm_pgoff.
393 * The pci device structure is provided so that architectures may make mapping
394 * decisions on a per-device or per-bus basis.
395 *
396 * Returns a negative error code on failure, zero on success.
397 */
398int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
399 enum pci_mmap_state mmap_state, int write_combine)
400{
401 resource_size_t offset = vma->vm_pgoff << PAGE_SHIFT;
402 struct resource *rp;
403 int ret;
404
405 rp = __pci_mmap_make_offset(dev, &offset, mmap_state);
406 if (rp == NULL)
407 return -EINVAL;
408
409 vma->vm_pgoff = offset >> PAGE_SHIFT;
410 vma->vm_page_prot = __pci_mmap_set_pgprot(dev, rp,
411 vma->vm_page_prot,
412 mmap_state, write_combine);
413
414 ret = remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
415 vma->vm_end - vma->vm_start, vma->vm_page_prot);
416
417 return ret;
418}
419
420void pci_resource_to_user(const struct pci_dev *dev, int bar,
421 const struct resource *rsrc,
422 resource_size_t *start, resource_size_t *end)
423{
424 struct pci_controller *hose = pci_bus_to_host(dev->bus);
425 resource_size_t offset = 0;
426
427 if (hose == NULL)
428 return;
429
430 if (rsrc->flags & IORESOURCE_IO)
431 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
432
433 /* We pass a fully fixed up address to userland for MMIO instead of
434 * a BAR value because X is lame and expects to be able to use that
435 * to pass to /dev/mem !
436 *
437 * That means that we'll have potentially 64 bits values where some
438 * userland apps only expect 32 (like X itself since it thinks only
439 * Sparc has 64 bits MMIO) but if we don't do that, we break it on
440 * 32 bits CHRPs :-(
441 *
442 * Hopefully, the sysfs insterface is immune to that gunk. Once X
443 * has been fixed (and the fix spread enough), we can re-enable the
444 * 2 lines below and pass down a BAR value to userland. In that case
445 * we'll also have to re-enable the matching code in
446 * __pci_mmap_make_offset().
447 *
448 * BenH.
449 */
450#if 0
451 else if (rsrc->flags & IORESOURCE_MEM)
452 offset = hose->pci_mem_offset;
453#endif
454
455 *start = rsrc->start - offset;
456 *end = rsrc->end - offset;
457}
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index e66064b509..0adf077f3f 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -55,8 +55,7 @@ static u8* pci_to_OF_bus_map;
55 */ 55 */
56int pci_assign_all_buses; 56int pci_assign_all_buses;
57 57
58struct pci_controller* hose_head; 58LIST_HEAD(hose_list);
59struct pci_controller** hose_tail = &hose_head;
60 59
61static int pci_bus_count; 60static int pci_bus_count;
62 61
@@ -573,58 +572,6 @@ pcibios_assign_resources(void)
573 } 572 }
574} 573}
575 574
576
577int
578pcibios_enable_resources(struct pci_dev *dev, int mask)
579{
580 u16 cmd, old_cmd;
581 int idx;
582 struct resource *r;
583
584 pci_read_config_word(dev, PCI_COMMAND, &cmd);
585 old_cmd = cmd;
586 for (idx=0; idx<6; idx++) {
587 /* Only set up the requested stuff */
588 if (!(mask & (1<<idx)))
589 continue;
590
591 r = &dev->resource[idx];
592 if (r->flags & IORESOURCE_UNSET) {
593 printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev));
594 return -EINVAL;
595 }
596 if (r->flags & IORESOURCE_IO)
597 cmd |= PCI_COMMAND_IO;
598 if (r->flags & IORESOURCE_MEM)
599 cmd |= PCI_COMMAND_MEMORY;
600 }
601 if (dev->resource[PCI_ROM_RESOURCE].start)
602 cmd |= PCI_COMMAND_MEMORY;
603 if (cmd != old_cmd) {
604 printk("PCI: Enabling device %s (%04x -> %04x)\n", pci_name(dev), old_cmd, cmd);
605 pci_write_config_word(dev, PCI_COMMAND, cmd);
606 }
607 return 0;
608}
609
610static int next_controller_index;
611
612struct pci_controller * __init
613pcibios_alloc_controller(void)
614{
615 struct pci_controller *hose;
616
617 hose = (struct pci_controller *)alloc_bootmem(sizeof(*hose));
618 memset(hose, 0, sizeof(struct pci_controller));
619
620 *hose_tail = hose;
621 hose_tail = &hose->next;
622
623 hose->index = next_controller_index++;
624
625 return hose;
626}
627
628#ifdef CONFIG_PPC_OF 575#ifdef CONFIG_PPC_OF
629/* 576/*
630 * Functions below are used on OpenFirmware machines. 577 * Functions below are used on OpenFirmware machines.
@@ -670,7 +617,7 @@ void
670pcibios_make_OF_bus_map(void) 617pcibios_make_OF_bus_map(void)
671{ 618{
672 int i; 619 int i;
673 struct pci_controller* hose; 620 struct pci_controller *hose, *tmp;
674 struct property *map_prop; 621 struct property *map_prop;
675 struct device_node *dn; 622 struct device_node *dn;
676 623
@@ -687,7 +634,7 @@ pcibios_make_OF_bus_map(void)
687 pci_to_OF_bus_map[i] = 0xff; 634 pci_to_OF_bus_map[i] = 0xff;
688 635
689 /* For each hose, we begin searching bridges */ 636 /* For each hose, we begin searching bridges */
690 for(hose=hose_head; hose; hose=hose->next) { 637 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
691 struct device_node* node; 638 struct device_node* node;
692 node = (struct device_node *)hose->arch_data; 639 node = (struct device_node *)hose->arch_data;
693 if (!node) 640 if (!node)
@@ -765,7 +712,7 @@ static struct device_node *scan_OF_for_pci_bus(struct pci_bus *bus)
765 712
766 /* Are we a root bus ? */ 713 /* Are we a root bus ? */
767 if (bus->self == NULL || bus->parent == NULL) { 714 if (bus->self == NULL || bus->parent == NULL) {
768 struct pci_controller *hose = pci_bus_to_hose(bus->number); 715 struct pci_controller *hose = pci_bus_to_host(bus);
769 if (hose == NULL) 716 if (hose == NULL)
770 return NULL; 717 return NULL;
771 return of_node_get(hose->arch_data); 718 return of_node_get(hose->arch_data);
@@ -818,27 +765,6 @@ pci_device_to_OF_node(struct pci_dev *dev)
818} 765}
819EXPORT_SYMBOL(pci_device_to_OF_node); 766EXPORT_SYMBOL(pci_device_to_OF_node);
820 767
821/* This routine is meant to be used early during boot, when the
822 * PCI bus numbers have not yet been assigned, and you need to
823 * issue PCI config cycles to an OF device.
824 * It could also be used to "fix" RTAS config cycles if you want
825 * to set pci_assign_all_buses to 1 and still use RTAS for PCI
826 * config cycles.
827 */
828struct pci_controller* pci_find_hose_for_OF_device(struct device_node* node)
829{
830 if (!have_of)
831 return NULL;
832 while(node) {
833 struct pci_controller* hose;
834 for (hose=hose_head;hose;hose=hose->next)
835 if (hose->arch_data == node)
836 return hose;
837 node=node->parent;
838 }
839 return NULL;
840}
841
842static int 768static int
843find_OF_pci_device_filter(struct device_node* node, void* data) 769find_OF_pci_device_filter(struct device_node* node, void* data)
844{ 770{
@@ -1027,34 +953,12 @@ pci_create_OF_bus_map(void)
1027 } 953 }
1028} 954}
1029 955
1030static ssize_t pci_show_devspec(struct device *dev, struct device_attribute *attr, char *buf)
1031{
1032 struct pci_dev *pdev;
1033 struct device_node *np;
1034
1035 pdev = to_pci_dev (dev);
1036 np = pci_device_to_OF_node(pdev);
1037 if (np == NULL || np->full_name == NULL)
1038 return 0;
1039 return sprintf(buf, "%s", np->full_name);
1040}
1041static DEVICE_ATTR(devspec, S_IRUGO, pci_show_devspec, NULL);
1042
1043#else /* CONFIG_PPC_OF */ 956#else /* CONFIG_PPC_OF */
1044void pcibios_make_OF_bus_map(void) 957void pcibios_make_OF_bus_map(void)
1045{ 958{
1046} 959}
1047#endif /* CONFIG_PPC_OF */ 960#endif /* CONFIG_PPC_OF */
1048 961
1049/* Add sysfs properties */
1050void pcibios_add_platform_entries(struct pci_dev *pdev)
1051{
1052#ifdef CONFIG_PPC_OF
1053 device_create_file(&pdev->dev, &dev_attr_devspec);
1054#endif /* CONFIG_PPC_OF */
1055}
1056
1057
1058#ifdef CONFIG_PPC_PMAC 962#ifdef CONFIG_PPC_PMAC
1059/* 963/*
1060 * This set of routines checks for PCI<->PCI bridges that have closed 964 * This set of routines checks for PCI<->PCI bridges that have closed
@@ -1269,14 +1173,14 @@ pcibios_fixup_p2p_bridges(void)
1269static int __init 1173static int __init
1270pcibios_init(void) 1174pcibios_init(void)
1271{ 1175{
1272 struct pci_controller *hose; 1176 struct pci_controller *hose, *tmp;
1273 struct pci_bus *bus; 1177 struct pci_bus *bus;
1274 int next_busno; 1178 int next_busno = 0;
1275 1179
1276 printk(KERN_INFO "PCI: Probing PCI hardware\n"); 1180 printk(KERN_INFO "PCI: Probing PCI hardware\n");
1277 1181
1278 /* Scan all of the recorded PCI controllers. */ 1182 /* Scan all of the recorded PCI controllers. */
1279 for (next_busno = 0, hose = hose_head; hose; hose = hose->next) { 1183 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
1280 if (pci_assign_all_buses) 1184 if (pci_assign_all_buses)
1281 hose->first_busno = next_busno; 1185 hose->first_busno = next_busno;
1282 hose->last_busno = 0xff; 1186 hose->last_busno = 0xff;
@@ -1319,12 +1223,6 @@ pcibios_init(void)
1319 1223
1320subsys_initcall(pcibios_init); 1224subsys_initcall(pcibios_init);
1321 1225
1322unsigned long resource_fixup(struct pci_dev * dev, struct resource * res,
1323 unsigned long start, unsigned long size)
1324{
1325 return start;
1326}
1327
1328void __init pcibios_fixup_bus(struct pci_bus *bus) 1226void __init pcibios_fixup_bus(struct pci_bus *bus)
1329{ 1227{
1330 struct pci_controller *hose = (struct pci_controller *) bus->sysdata; 1228 struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
@@ -1342,7 +1240,7 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
1342 if (!res->flags) { 1240 if (!res->flags) {
1343 if (io_offset) 1241 if (io_offset)
1344 printk(KERN_ERR "I/O resource not set for host" 1242 printk(KERN_ERR "I/O resource not set for host"
1345 " bridge %d\n", hose->index); 1243 " bridge %d\n", hose->global_number);
1346 res->start = 0; 1244 res->start = 0;
1347 res->end = IO_SPACE_LIMIT; 1245 res->end = IO_SPACE_LIMIT;
1348 res->flags = IORESOURCE_IO; 1246 res->flags = IORESOURCE_IO;
@@ -1356,7 +1254,7 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
1356 if (i > 0) 1254 if (i > 0)
1357 continue; 1255 continue;
1358 printk(KERN_ERR "Memory resource not set for " 1256 printk(KERN_ERR "Memory resource not set for "
1359 "host bridge %d\n", hose->index); 1257 "host bridge %d\n", hose->global_number);
1360 res->start = hose->pci_mem_offset; 1258 res->start = hose->pci_mem_offset;
1361 res->end = ~0U; 1259 res->end = ~0U;
1362 res->flags = IORESOURCE_MEM; 1260 res->flags = IORESOURCE_MEM;
@@ -1370,7 +1268,7 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
1370 for (i = 0; i < 4; ++i) { 1268 for (i = 0; i < 4; ++i) {
1371 if ((res = bus->resource[i]) == NULL) 1269 if ((res = bus->resource[i]) == NULL)
1372 continue; 1270 continue;
1373 if (!res->flags) 1271 if (!res->flags || bus->self->transparent)
1374 continue; 1272 continue;
1375 if (io_offset && (res->flags & IORESOURCE_IO)) { 1273 if (io_offset && (res->flags & IORESOURCE_IO)) {
1376 res->start += io_offset; 1274 res->start += io_offset;
@@ -1395,11 +1293,6 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
1395 } 1293 }
1396} 1294}
1397 1295
1398char __init *pcibios_setup(char *str)
1399{
1400 return str;
1401}
1402
1403/* the next one is stolen from the alpha port... */ 1296/* the next one is stolen from the alpha port... */
1404void __init 1297void __init
1405pcibios_update_irq(struct pci_dev *dev, int irq) 1298pcibios_update_irq(struct pci_dev *dev, int irq)
@@ -1408,64 +1301,6 @@ pcibios_update_irq(struct pci_dev *dev, int irq)
1408 /* XXX FIXME - update OF device tree node interrupt property */ 1301 /* XXX FIXME - update OF device tree node interrupt property */
1409} 1302}
1410 1303
1411#ifdef CONFIG_PPC_MERGE
1412/* XXX This is a copy of the ppc64 version. This is temporary until we start
1413 * merging the 2 PCI layers
1414 */
1415/*
1416 * Reads the interrupt pin to determine if interrupt is use by card.
1417 * If the interrupt is used, then gets the interrupt line from the
1418 * openfirmware and sets it in the pci_dev and pci_config line.
1419 */
1420int pci_read_irq_line(struct pci_dev *pci_dev)
1421{
1422 struct of_irq oirq;
1423 unsigned int virq;
1424
1425 DBG("Try to map irq for %s...\n", pci_name(pci_dev));
1426
1427 /* Try to get a mapping from the device-tree */
1428 if (of_irq_map_pci(pci_dev, &oirq)) {
1429 u8 line, pin;
1430
1431 /* If that fails, lets fallback to what is in the config
1432 * space and map that through the default controller. We
1433 * also set the type to level low since that's what PCI
1434 * interrupts are. If your platform does differently, then
1435 * either provide a proper interrupt tree or don't use this
1436 * function.
1437 */
1438 if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_PIN, &pin))
1439 return -1;
1440 if (pin == 0)
1441 return -1;
1442 if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &line) ||
1443 line == 0xff) {
1444 return -1;
1445 }
1446 DBG(" -> no map ! Using irq line %d from PCI config\n", line);
1447
1448 virq = irq_create_mapping(NULL, line);
1449 if (virq != NO_IRQ)
1450 set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
1451 } else {
1452 DBG(" -> got one, spec %d cells (0x%08x...) on %s\n",
1453 oirq.size, oirq.specifier[0], oirq.controller->full_name);
1454
1455 virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
1456 oirq.size);
1457 }
1458 if(virq == NO_IRQ) {
1459 DBG(" -> failed to map !\n");
1460 return -1;
1461 }
1462 pci_dev->irq = virq;
1463
1464 return 0;
1465}
1466EXPORT_SYMBOL(pci_read_irq_line);
1467#endif /* CONFIG_PPC_MERGE */
1468
1469int pcibios_enable_device(struct pci_dev *dev, int mask) 1304int pcibios_enable_device(struct pci_dev *dev, int mask)
1470{ 1305{
1471 u16 cmd, old_cmd; 1306 u16 cmd, old_cmd;
@@ -1497,281 +1332,17 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
1497 return 0; 1332 return 0;
1498} 1333}
1499 1334
1500struct pci_controller* 1335static struct pci_controller*
1501pci_bus_to_hose(int bus) 1336pci_bus_to_hose(int bus)
1502{ 1337{
1503 struct pci_controller* hose = hose_head; 1338 struct pci_controller *hose, *tmp;
1504 1339
1505 for (; hose; hose = hose->next) 1340 list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
1506 if (bus >= hose->first_busno && bus <= hose->last_busno) 1341 if (bus >= hose->first_busno && bus <= hose->last_busno)
1507 return hose; 1342 return hose;
1508 return NULL; 1343 return NULL;
1509} 1344}
1510 1345
1511void __iomem *
1512pci_bus_io_base(unsigned int bus)
1513{
1514 struct pci_controller *hose;
1515
1516 hose = pci_bus_to_hose(bus);
1517 if (!hose)
1518 return NULL;
1519 return hose->io_base_virt;
1520}
1521
1522unsigned long
1523pci_bus_io_base_phys(unsigned int bus)
1524{
1525 struct pci_controller *hose;
1526
1527 hose = pci_bus_to_hose(bus);
1528 if (!hose)
1529 return 0;
1530 return hose->io_base_phys;
1531}
1532
1533unsigned long
1534pci_bus_mem_base_phys(unsigned int bus)
1535{
1536 struct pci_controller *hose;
1537
1538 hose = pci_bus_to_hose(bus);
1539 if (!hose)
1540 return 0;
1541 return hose->pci_mem_offset;
1542}
1543
1544unsigned long
1545pci_resource_to_bus(struct pci_dev *pdev, struct resource *res)
1546{
1547 /* Hack alert again ! See comments in chrp_pci.c
1548 */
1549 struct pci_controller* hose =
1550 (struct pci_controller *)pdev->sysdata;
1551 if (hose && res->flags & IORESOURCE_MEM)
1552 return res->start - hose->pci_mem_offset;
1553 /* We may want to do something with IOs here... */
1554 return res->start;
1555}
1556
1557
1558static struct resource *__pci_mmap_make_offset(struct pci_dev *dev,
1559 resource_size_t *offset,
1560 enum pci_mmap_state mmap_state)
1561{
1562 struct pci_controller *hose = pci_bus_to_hose(dev->bus->number);
1563 unsigned long io_offset = 0;
1564 int i, res_bit;
1565
1566 if (hose == 0)
1567 return NULL; /* should never happen */
1568
1569 /* If memory, add on the PCI bridge address offset */
1570 if (mmap_state == pci_mmap_mem) {
1571#if 0 /* See comment in pci_resource_to_user() for why this is disabled */
1572 *offset += hose->pci_mem_offset;
1573#endif
1574 res_bit = IORESOURCE_MEM;
1575 } else {
1576 io_offset = hose->io_base_virt - (void __iomem *)_IO_BASE;
1577 *offset += io_offset;
1578 res_bit = IORESOURCE_IO;
1579 }
1580
1581 /*
1582 * Check that the offset requested corresponds to one of the
1583 * resources of the device.
1584 */
1585 for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
1586 struct resource *rp = &dev->resource[i];
1587 int flags = rp->flags;
1588
1589 /* treat ROM as memory (should be already) */
1590 if (i == PCI_ROM_RESOURCE)
1591 flags |= IORESOURCE_MEM;
1592
1593 /* Active and same type? */
1594 if ((flags & res_bit) == 0)
1595 continue;
1596
1597 /* In the range of this resource? */
1598 if (*offset < (rp->start & PAGE_MASK) || *offset > rp->end)
1599 continue;
1600
1601 /* found it! construct the final physical address */
1602 if (mmap_state == pci_mmap_io)
1603 *offset += hose->io_base_phys - io_offset;
1604 return rp;
1605 }
1606
1607 return NULL;
1608}
1609
1610/*
1611 * Set vm_page_prot of VMA, as appropriate for this architecture, for a pci
1612 * device mapping.
1613 */
1614static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp,
1615 pgprot_t protection,
1616 enum pci_mmap_state mmap_state,
1617 int write_combine)
1618{
1619 unsigned long prot = pgprot_val(protection);
1620
1621 /* Write combine is always 0 on non-memory space mappings. On
1622 * memory space, if the user didn't pass 1, we check for a
1623 * "prefetchable" resource. This is a bit hackish, but we use
1624 * this to workaround the inability of /sysfs to provide a write
1625 * combine bit
1626 */
1627 if (mmap_state != pci_mmap_mem)
1628 write_combine = 0;
1629 else if (write_combine == 0) {
1630 if (rp->flags & IORESOURCE_PREFETCH)
1631 write_combine = 1;
1632 }
1633
1634 /* XXX would be nice to have a way to ask for write-through */
1635 prot |= _PAGE_NO_CACHE;
1636 if (write_combine)
1637 prot &= ~_PAGE_GUARDED;
1638 else
1639 prot |= _PAGE_GUARDED;
1640
1641 return __pgprot(prot);
1642}
1643
1644/*
1645 * This one is used by /dev/mem and fbdev who have no clue about the
1646 * PCI device, it tries to find the PCI device first and calls the
1647 * above routine
1648 */
1649pgprot_t pci_phys_mem_access_prot(struct file *file,
1650 unsigned long pfn,
1651 unsigned long size,
1652 pgprot_t protection)
1653{
1654 struct pci_dev *pdev = NULL;
1655 struct resource *found = NULL;
1656 unsigned long prot = pgprot_val(protection);
1657 unsigned long offset = pfn << PAGE_SHIFT;
1658 int i;
1659
1660 if (page_is_ram(pfn))
1661 return __pgprot(prot);
1662
1663 prot |= _PAGE_NO_CACHE | _PAGE_GUARDED;
1664
1665 for_each_pci_dev(pdev) {
1666 for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
1667 struct resource *rp = &pdev->resource[i];
1668 int flags = rp->flags;
1669
1670 /* Active and same type? */
1671 if ((flags & IORESOURCE_MEM) == 0)
1672 continue;
1673 /* In the range of this resource? */
1674 if (offset < (rp->start & PAGE_MASK) ||
1675 offset > rp->end)
1676 continue;
1677 found = rp;
1678 break;
1679 }
1680 if (found)
1681 break;
1682 }
1683 if (found) {
1684 if (found->flags & IORESOURCE_PREFETCH)
1685 prot &= ~_PAGE_GUARDED;
1686 pci_dev_put(pdev);
1687 }
1688
1689 DBG("non-PCI map for %lx, prot: %lx\n", offset, prot);
1690
1691 return __pgprot(prot);
1692}
1693
1694
1695/*
1696 * Perform the actual remap of the pages for a PCI device mapping, as
1697 * appropriate for this architecture. The region in the process to map
1698 * is described by vm_start and vm_end members of VMA, the base physical
1699 * address is found in vm_pgoff.
1700 * The pci device structure is provided so that architectures may make mapping
1701 * decisions on a per-device or per-bus basis.
1702 *
1703 * Returns a negative error code on failure, zero on success.
1704 */
1705int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
1706 enum pci_mmap_state mmap_state,
1707 int write_combine)
1708{
1709 resource_size_t offset = vma->vm_pgoff << PAGE_SHIFT;
1710 struct resource *rp;
1711 int ret;
1712
1713 rp = __pci_mmap_make_offset(dev, &offset, mmap_state);
1714 if (rp == NULL)
1715 return -EINVAL;
1716
1717 vma->vm_pgoff = offset >> PAGE_SHIFT;
1718 vma->vm_page_prot = __pci_mmap_set_pgprot(dev, rp,
1719 vma->vm_page_prot,
1720 mmap_state, write_combine);
1721
1722 ret = remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
1723 vma->vm_end - vma->vm_start, vma->vm_page_prot);
1724
1725 return ret;
1726}
1727
1728/* Obsolete functions. Should be removed once the symbios driver
1729 * is fixed
1730 */
1731unsigned long
1732phys_to_bus(unsigned long pa)
1733{
1734 struct pci_controller *hose;
1735 int i;
1736
1737 for (hose = hose_head; hose; hose = hose->next) {
1738 for (i = 0; i < 3; ++i) {
1739 if (pa >= hose->mem_resources[i].start
1740 && pa <= hose->mem_resources[i].end) {
1741 /*
1742 * XXX the hose->pci_mem_offset really
1743 * only applies to mem_resources[0].
1744 * We need a way to store an offset for
1745 * the others. -- paulus
1746 */
1747 if (i == 0)
1748 pa -= hose->pci_mem_offset;
1749 return pa;
1750 }
1751 }
1752 }
1753 /* hmmm, didn't find it */
1754 return 0;
1755}
1756
1757unsigned long
1758pci_phys_to_bus(unsigned long pa, int busnr)
1759{
1760 struct pci_controller* hose = pci_bus_to_hose(busnr);
1761 if (!hose)
1762 return pa;
1763 return pa - hose->pci_mem_offset;
1764}
1765
1766unsigned long
1767pci_bus_to_phys(unsigned int ba, int busnr)
1768{
1769 struct pci_controller* hose = pci_bus_to_hose(busnr);
1770 if (!hose)
1771 return ba;
1772 return ba + hose->pci_mem_offset;
1773}
1774
1775/* Provide information on locations of various I/O regions in physical 1346/* Provide information on locations of various I/O regions in physical
1776 * memory. Do this on a per-card basis so that we choose the right 1347 * memory. Do this on a per-card basis so that we choose the right
1777 * root bridge. 1348 * root bridge.
@@ -1814,62 +1385,11 @@ long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn)
1814 return result; 1385 return result;
1815} 1386}
1816 1387
1817void pci_resource_to_user(const struct pci_dev *dev, int bar,
1818 const struct resource *rsrc,
1819 resource_size_t *start, resource_size_t *end)
1820{
1821 struct pci_controller *hose = pci_bus_to_hose(dev->bus->number);
1822 resource_size_t offset = 0;
1823
1824 if (hose == NULL)
1825 return;
1826
1827 if (rsrc->flags & IORESOURCE_IO)
1828 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
1829
1830 /* We pass a fully fixed up address to userland for MMIO instead of
1831 * a BAR value because X is lame and expects to be able to use that
1832 * to pass to /dev/mem !
1833 *
1834 * That means that we'll have potentially 64 bits values where some
1835 * userland apps only expect 32 (like X itself since it thinks only
1836 * Sparc has 64 bits MMIO) but if we don't do that, we break it on
1837 * 32 bits CHRPs :-(
1838 *
1839 * Hopefully, the sysfs insterface is immune to that gunk. Once X
1840 * has been fixed (and the fix spread enough), we can re-enable the
1841 * 2 lines below and pass down a BAR value to userland. In that case
1842 * we'll also have to re-enable the matching code in
1843 * __pci_mmap_make_offset().
1844 *
1845 * BenH.
1846 */
1847#if 0
1848 else if (rsrc->flags & IORESOURCE_MEM)
1849 offset = hose->pci_mem_offset;
1850#endif
1851
1852 *start = rsrc->start - offset;
1853 *end = rsrc->end - offset;
1854}
1855
1856void __init pci_init_resource(struct resource *res, resource_size_t start,
1857 resource_size_t end, int flags, char *name)
1858{
1859 res->start = start;
1860 res->end = end;
1861 res->flags = flags;
1862 res->name = name;
1863 res->parent = NULL;
1864 res->sibling = NULL;
1865 res->child = NULL;
1866}
1867
1868unsigned long pci_address_to_pio(phys_addr_t address) 1388unsigned long pci_address_to_pio(phys_addr_t address)
1869{ 1389{
1870 struct pci_controller* hose = hose_head; 1390 struct pci_controller *hose, *tmp;
1871 1391
1872 for (; hose; hose = hose->next) { 1392 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
1873 unsigned int size = hose->io_resource.end - 1393 unsigned int size = hose->io_resource.end -
1874 hose->io_resource.start + 1; 1394 hose->io_resource.start + 1;
1875 if (address >= hose->io_base_phys && 1395 if (address >= hose->io_base_phys &&
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 249cca27a9..a97e23ac19 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -22,6 +22,7 @@
22#include <linux/list.h> 22#include <linux/list.h>
23#include <linux/syscalls.h> 23#include <linux/syscalls.h>
24#include <linux/irq.h> 24#include <linux/irq.h>
25#include <linux/vmalloc.h>
25 26
26#include <asm/processor.h> 27#include <asm/processor.h>
27#include <asm/io.h> 28#include <asm/io.h>
@@ -41,35 +42,23 @@
41 42
42unsigned long pci_probe_only = 1; 43unsigned long pci_probe_only = 1;
43int pci_assign_all_buses = 0; 44int pci_assign_all_buses = 0;
44static int pci_initial_scan_done;
45 45
46static void fixup_resource(struct resource *res, struct pci_dev *dev); 46static void fixup_resource(struct resource *res, struct pci_dev *dev);
47static void do_bus_setup(struct pci_bus *bus); 47static void do_bus_setup(struct pci_bus *bus);
48static void phbs_remap_io(void);
49 48
50/* pci_io_base -- the base address from which io bars are offsets. 49/* pci_io_base -- the base address from which io bars are offsets.
51 * This is the lowest I/O base address (so bar values are always positive), 50 * This is the lowest I/O base address (so bar values are always positive),
52 * and it *must* be the start of ISA space if an ISA bus exists because 51 * and it *must* be the start of ISA space if an ISA bus exists because
53 * ISA drivers use hard coded offsets. If no ISA bus exists a dummy 52 * ISA drivers use hard coded offsets. If no ISA bus exists nothing
54 * page is mapped and isa_io_limit prevents access to it. 53 * is mapped on the first 64K of IO space
55 */ 54 */
56unsigned long isa_io_base; /* NULL if no ISA bus */ 55unsigned long pci_io_base = ISA_IO_BASE;
57EXPORT_SYMBOL(isa_io_base);
58unsigned long pci_io_base;
59EXPORT_SYMBOL(pci_io_base); 56EXPORT_SYMBOL(pci_io_base);
60 57
61void iSeries_pcibios_init(void);
62
63LIST_HEAD(hose_list); 58LIST_HEAD(hose_list);
64 59
65static struct dma_mapping_ops *pci_dma_ops; 60static struct dma_mapping_ops *pci_dma_ops;
66 61
67int global_phb_number; /* Global phb counter */
68
69/* Cached ISA bridge dev. */
70struct pci_dev *ppc64_isabridge_dev = NULL;
71EXPORT_SYMBOL_GPL(ppc64_isabridge_dev);
72
73void set_pci_dma_ops(struct dma_mapping_ops *dma_ops) 62void set_pci_dma_ops(struct dma_mapping_ops *dma_ops)
74{ 63{
75 pci_dma_ops = dma_ops; 64 pci_dma_ops = dma_ops;
@@ -100,7 +89,7 @@ void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region
100 return; 89 return;
101 90
102 if (res->flags & IORESOURCE_IO) 91 if (res->flags & IORESOURCE_IO)
103 offset = (unsigned long)hose->io_base_virt - pci_io_base; 92 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
104 93
105 if (res->flags & IORESOURCE_MEM) 94 if (res->flags & IORESOURCE_MEM)
106 offset = hose->pci_mem_offset; 95 offset = hose->pci_mem_offset;
@@ -119,7 +108,7 @@ void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
119 return; 108 return;
120 109
121 if (res->flags & IORESOURCE_IO) 110 if (res->flags & IORESOURCE_IO)
122 offset = (unsigned long)hose->io_base_virt - pci_io_base; 111 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
123 112
124 if (res->flags & IORESOURCE_MEM) 113 if (res->flags & IORESOURCE_MEM)
125 offset = hose->pci_mem_offset; 114 offset = hose->pci_mem_offset;
@@ -156,7 +145,7 @@ void pcibios_align_resource(void *data, struct resource *res,
156 145
157 if (res->flags & IORESOURCE_IO) { 146 if (res->flags & IORESOURCE_IO) {
158 unsigned long offset = (unsigned long)hose->io_base_virt - 147 unsigned long offset = (unsigned long)hose->io_base_virt -
159 pci_io_base; 148 _IO_BASE;
160 /* Make sure we start at our min on all hoses */ 149 /* Make sure we start at our min on all hoses */
161 if (start - offset < PCIBIOS_MIN_IO) 150 if (start - offset < PCIBIOS_MIN_IO)
162 start = PCIBIOS_MIN_IO + offset; 151 start = PCIBIOS_MIN_IO + offset;
@@ -180,55 +169,6 @@ void pcibios_align_resource(void *data, struct resource *res,
180 res->start = start; 169 res->start = start;
181} 170}
182 171
183static DEFINE_SPINLOCK(hose_spinlock);
184
185/*
186 * pci_controller(phb) initialized common variables.
187 */
188static void __devinit pci_setup_pci_controller(struct pci_controller *hose)
189{
190 memset(hose, 0, sizeof(struct pci_controller));
191
192 spin_lock(&hose_spinlock);
193 hose->global_number = global_phb_number++;
194 list_add_tail(&hose->list_node, &hose_list);
195 spin_unlock(&hose_spinlock);
196}
197
198struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
199{
200 struct pci_controller *phb;
201
202 if (mem_init_done)
203 phb = kmalloc(sizeof(struct pci_controller), GFP_KERNEL);
204 else
205 phb = alloc_bootmem(sizeof (struct pci_controller));
206 if (phb == NULL)
207 return NULL;
208 pci_setup_pci_controller(phb);
209 phb->arch_data = dev;
210 phb->is_dynamic = mem_init_done;
211 if (dev) {
212 int nid = of_node_to_nid(dev);
213
214 if (nid < 0 || !node_online(nid))
215 nid = -1;
216
217 PHB_SET_NODE(phb, nid);
218 }
219 return phb;
220}
221
222void pcibios_free_controller(struct pci_controller *phb)
223{
224 spin_lock(&hose_spinlock);
225 list_del(&phb->list_node);
226 spin_unlock(&hose_spinlock);
227
228 if (phb->is_dynamic)
229 kfree(phb);
230}
231
232void __devinit pcibios_claim_one_bus(struct pci_bus *b) 172void __devinit pcibios_claim_one_bus(struct pci_bus *b)
233{ 173{
234 struct pci_dev *dev; 174 struct pci_dev *dev;
@@ -291,7 +231,6 @@ static unsigned int pci_parse_of_flags(u32 addr0)
291 return flags; 231 return flags;
292} 232}
293 233
294#define GET_64BIT(prop, i) ((((u64) (prop)[(i)]) << 32) | (prop)[(i)+1])
295 234
296static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev) 235static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev)
297{ 236{
@@ -310,8 +249,8 @@ static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev)
310 flags = pci_parse_of_flags(addrs[0]); 249 flags = pci_parse_of_flags(addrs[0]);
311 if (!flags) 250 if (!flags)
312 continue; 251 continue;
313 base = GET_64BIT(addrs, 1); 252 base = of_read_number(&addrs[1], 2);
314 size = GET_64BIT(addrs, 3); 253 size = of_read_number(&addrs[3], 2);
315 if (!size) 254 if (!size)
316 continue; 255 continue;
317 i = addrs[0] & 0xff; 256 i = addrs[0] & 0xff;
@@ -367,8 +306,10 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
367 sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), 306 sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus),
368 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); 307 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn));
369 dev->class = get_int_prop(node, "class-code", 0); 308 dev->class = get_int_prop(node, "class-code", 0);
309 dev->revision = get_int_prop(node, "revision-id", 0);
370 310
371 DBG(" class: 0x%x\n", dev->class); 311 DBG(" class: 0x%x\n", dev->class);
312 DBG(" revision: 0x%x\n", dev->revision);
372 313
373 dev->current_state = 4; /* unknown power state */ 314 dev->current_state = 4; /* unknown power state */
374 dev->error_state = pci_channel_io_normal; 315 dev->error_state = pci_channel_io_normal;
@@ -477,7 +418,7 @@ void __devinit of_scan_pci_bridge(struct device_node *node,
477 i = 1; 418 i = 1;
478 for (; len >= 32; len -= 32, ranges += 8) { 419 for (; len >= 32; len -= 32, ranges += 8) {
479 flags = pci_parse_of_flags(ranges[0]); 420 flags = pci_parse_of_flags(ranges[0]);
480 size = GET_64BIT(ranges, 6); 421 size = of_read_number(&ranges[6], 2);
481 if (flags == 0 || size == 0) 422 if (flags == 0 || size == 0)
482 continue; 423 continue;
483 if (flags & IORESOURCE_IO) { 424 if (flags & IORESOURCE_IO) {
@@ -496,7 +437,7 @@ void __devinit of_scan_pci_bridge(struct device_node *node,
496 res = bus->resource[i]; 437 res = bus->resource[i];
497 ++i; 438 ++i;
498 } 439 }
499 res->start = GET_64BIT(ranges, 1); 440 res->start = of_read_number(&ranges[1], 2);
500 res->end = res->start + size - 1; 441 res->end = res->start + size - 1;
501 res->flags = flags; 442 res->flags = flags;
502 fixup_resource(res, dev); 443 fixup_resource(res, dev);
@@ -535,10 +476,16 @@ void __devinit scan_phb(struct pci_controller *hose)
535 bus->secondary = hose->first_busno; 476 bus->secondary = hose->first_busno;
536 hose->bus = bus; 477 hose->bus = bus;
537 478
479 if (!firmware_has_feature(FW_FEATURE_ISERIES))
480 pcibios_map_io_space(bus);
481
538 bus->resource[0] = res = &hose->io_resource; 482 bus->resource[0] = res = &hose->io_resource;
539 if (res->flags && request_resource(&ioport_resource, res)) 483 if (res->flags && request_resource(&ioport_resource, res)) {
540 printk(KERN_ERR "Failed to request PCI IO region " 484 printk(KERN_ERR "Failed to request PCI IO region "
541 "on PCI domain %04x\n", hose->global_number); 485 "on PCI domain %04x\n", hose->global_number);
486 DBG("res->start = 0x%016lx, res->end = 0x%016lx\n",
487 res->start, res->end);
488 }
542 489
543 for (i = 0; i < 3; ++i) { 490 for (i = 0; i < 3; ++i) {
544 res = &hose->mem_resources[i]; 491 res = &hose->mem_resources[i];
@@ -596,17 +543,6 @@ static int __init pcibios_init(void)
596 if (ppc_md.pcibios_fixup) 543 if (ppc_md.pcibios_fixup)
597 ppc_md.pcibios_fixup(); 544 ppc_md.pcibios_fixup();
598 545
599 /* Cache the location of the ISA bridge (if we have one) */
600 ppc64_isabridge_dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL);
601 if (ppc64_isabridge_dev != NULL)
602 printk(KERN_DEBUG "ISA bridge at %s\n", pci_name(ppc64_isabridge_dev));
603
604 if (!firmware_has_feature(FW_FEATURE_ISERIES))
605 /* map in PCI I/O space */
606 phbs_remap_io();
607
608 pci_initial_scan_done = 1;
609
610 printk(KERN_DEBUG "PCI: Probing PCI hardware done\n"); 546 printk(KERN_DEBUG "PCI: Probing PCI hardware done\n");
611 547
612 return 0; 548 return 0;
@@ -614,11 +550,6 @@ static int __init pcibios_init(void)
614 550
615subsys_initcall(pcibios_init); 551subsys_initcall(pcibios_init);
616 552
617char __init *pcibios_setup(char *str)
618{
619 return str;
620}
621
622int pcibios_enable_device(struct pci_dev *dev, int mask) 553int pcibios_enable_device(struct pci_dev *dev, int mask)
623{ 554{
624 u16 cmd, oldcmd; 555 u16 cmd, oldcmd;
@@ -649,22 +580,6 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
649 return 0; 580 return 0;
650} 581}
651 582
652/*
653 * Return the domain number for this bus.
654 */
655int pci_domain_nr(struct pci_bus *bus)
656{
657 if (firmware_has_feature(FW_FEATURE_ISERIES))
658 return 0;
659 else {
660 struct pci_controller *hose = pci_bus_to_host(bus);
661
662 return hose->global_number;
663 }
664}
665
666EXPORT_SYMBOL(pci_domain_nr);
667
668/* Decide whether to display the domain number in /proc */ 583/* Decide whether to display the domain number in /proc */
669int pci_proc_domain(struct pci_bus *bus) 584int pci_proc_domain(struct pci_bus *bus)
670{ 585{
@@ -676,281 +591,6 @@ int pci_proc_domain(struct pci_bus *bus)
676 } 591 }
677} 592}
678 593
679/*
680 * Platform support for /proc/bus/pci/X/Y mmap()s,
681 * modelled on the sparc64 implementation by Dave Miller.
682 * -- paulus.
683 */
684
685/*
686 * Adjust vm_pgoff of VMA such that it is the physical page offset
687 * corresponding to the 32-bit pci bus offset for DEV requested by the user.
688 *
689 * Basically, the user finds the base address for his device which he wishes
690 * to mmap. They read the 32-bit value from the config space base register,
691 * add whatever PAGE_SIZE multiple offset they wish, and feed this into the
692 * offset parameter of mmap on /proc/bus/pci/XXX for that device.
693 *
694 * Returns negative error code on failure, zero on success.
695 */
696static struct resource *__pci_mmap_make_offset(struct pci_dev *dev,
697 resource_size_t *offset,
698 enum pci_mmap_state mmap_state)
699{
700 struct pci_controller *hose = pci_bus_to_host(dev->bus);
701 unsigned long io_offset = 0;
702 int i, res_bit;
703
704 if (hose == 0)
705 return NULL; /* should never happen */
706
707 /* If memory, add on the PCI bridge address offset */
708 if (mmap_state == pci_mmap_mem) {
709#if 0 /* See comment in pci_resource_to_user() for why this is disabled */
710 *offset += hose->pci_mem_offset;
711#endif
712 res_bit = IORESOURCE_MEM;
713 } else {
714 io_offset = (unsigned long)hose->io_base_virt - pci_io_base;
715 *offset += io_offset;
716 res_bit = IORESOURCE_IO;
717 }
718
719 /*
720 * Check that the offset requested corresponds to one of the
721 * resources of the device.
722 */
723 for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
724 struct resource *rp = &dev->resource[i];
725 int flags = rp->flags;
726
727 /* treat ROM as memory (should be already) */
728 if (i == PCI_ROM_RESOURCE)
729 flags |= IORESOURCE_MEM;
730
731 /* Active and same type? */
732 if ((flags & res_bit) == 0)
733 continue;
734
735 /* In the range of this resource? */
736 if (*offset < (rp->start & PAGE_MASK) || *offset > rp->end)
737 continue;
738
739 /* found it! construct the final physical address */
740 if (mmap_state == pci_mmap_io)
741 *offset += hose->io_base_phys - io_offset;
742 return rp;
743 }
744
745 return NULL;
746}
747
748/*
749 * Set vm_page_prot of VMA, as appropriate for this architecture, for a pci
750 * device mapping.
751 */
752static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp,
753 pgprot_t protection,
754 enum pci_mmap_state mmap_state,
755 int write_combine)
756{
757 unsigned long prot = pgprot_val(protection);
758
759 /* Write combine is always 0 on non-memory space mappings. On
760 * memory space, if the user didn't pass 1, we check for a
761 * "prefetchable" resource. This is a bit hackish, but we use
762 * this to workaround the inability of /sysfs to provide a write
763 * combine bit
764 */
765 if (mmap_state != pci_mmap_mem)
766 write_combine = 0;
767 else if (write_combine == 0) {
768 if (rp->flags & IORESOURCE_PREFETCH)
769 write_combine = 1;
770 }
771
772 /* XXX would be nice to have a way to ask for write-through */
773 prot |= _PAGE_NO_CACHE;
774 if (write_combine)
775 prot &= ~_PAGE_GUARDED;
776 else
777 prot |= _PAGE_GUARDED;
778
779 return __pgprot(prot);
780}
781
782/*
783 * This one is used by /dev/mem and fbdev who have no clue about the
784 * PCI device, it tries to find the PCI device first and calls the
785 * above routine
786 */
787pgprot_t pci_phys_mem_access_prot(struct file *file,
788 unsigned long pfn,
789 unsigned long size,
790 pgprot_t protection)
791{
792 struct pci_dev *pdev = NULL;
793 struct resource *found = NULL;
794 unsigned long prot = pgprot_val(protection);
795 unsigned long offset = pfn << PAGE_SHIFT;
796 int i;
797
798 if (page_is_ram(pfn))
799 return __pgprot(prot);
800
801 prot |= _PAGE_NO_CACHE | _PAGE_GUARDED;
802
803 for_each_pci_dev(pdev) {
804 for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
805 struct resource *rp = &pdev->resource[i];
806 int flags = rp->flags;
807
808 /* Active and same type? */
809 if ((flags & IORESOURCE_MEM) == 0)
810 continue;
811 /* In the range of this resource? */
812 if (offset < (rp->start & PAGE_MASK) ||
813 offset > rp->end)
814 continue;
815 found = rp;
816 break;
817 }
818 if (found)
819 break;
820 }
821 if (found) {
822 if (found->flags & IORESOURCE_PREFETCH)
823 prot &= ~_PAGE_GUARDED;
824 pci_dev_put(pdev);
825 }
826
827 DBG("non-PCI map for %lx, prot: %lx\n", offset, prot);
828
829 return __pgprot(prot);
830}
831
832
833/*
834 * Perform the actual remap of the pages for a PCI device mapping, as
835 * appropriate for this architecture. The region in the process to map
836 * is described by vm_start and vm_end members of VMA, the base physical
837 * address is found in vm_pgoff.
838 * The pci device structure is provided so that architectures may make mapping
839 * decisions on a per-device or per-bus basis.
840 *
841 * Returns a negative error code on failure, zero on success.
842 */
843int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
844 enum pci_mmap_state mmap_state, int write_combine)
845{
846 resource_size_t offset = vma->vm_pgoff << PAGE_SHIFT;
847 struct resource *rp;
848 int ret;
849
850 rp = __pci_mmap_make_offset(dev, &offset, mmap_state);
851 if (rp == NULL)
852 return -EINVAL;
853
854 vma->vm_pgoff = offset >> PAGE_SHIFT;
855 vma->vm_page_prot = __pci_mmap_set_pgprot(dev, rp,
856 vma->vm_page_prot,
857 mmap_state, write_combine);
858
859 ret = remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
860 vma->vm_end - vma->vm_start, vma->vm_page_prot);
861
862 return ret;
863}
864
865static ssize_t pci_show_devspec(struct device *dev,
866 struct device_attribute *attr, char *buf)
867{
868 struct pci_dev *pdev;
869 struct device_node *np;
870
871 pdev = to_pci_dev (dev);
872 np = pci_device_to_OF_node(pdev);
873 if (np == NULL || np->full_name == NULL)
874 return 0;
875 return sprintf(buf, "%s", np->full_name);
876}
877static DEVICE_ATTR(devspec, S_IRUGO, pci_show_devspec, NULL);
878
879void pcibios_add_platform_entries(struct pci_dev *pdev)
880{
881 device_create_file(&pdev->dev, &dev_attr_devspec);
882}
883
884#define ISA_SPACE_MASK 0x1
885#define ISA_SPACE_IO 0x1
886
887static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node,
888 unsigned long phb_io_base_phys,
889 void __iomem * phb_io_base_virt)
890{
891 /* Remove these asap */
892
893 struct pci_address {
894 u32 a_hi;
895 u32 a_mid;
896 u32 a_lo;
897 };
898
899 struct isa_address {
900 u32 a_hi;
901 u32 a_lo;
902 };
903
904 struct isa_range {
905 struct isa_address isa_addr;
906 struct pci_address pci_addr;
907 unsigned int size;
908 };
909
910 const struct isa_range *range;
911 unsigned long pci_addr;
912 unsigned int isa_addr;
913 unsigned int size;
914 int rlen = 0;
915
916 range = of_get_property(isa_node, "ranges", &rlen);
917 if (range == NULL || (rlen < sizeof(struct isa_range))) {
918 printk(KERN_ERR "no ISA ranges or unexpected isa range size,"
919 "mapping 64k\n");
920 __ioremap_explicit(phb_io_base_phys,
921 (unsigned long)phb_io_base_virt,
922 0x10000, _PAGE_NO_CACHE | _PAGE_GUARDED);
923 return;
924 }
925
926 /* From "ISA Binding to 1275"
927 * The ranges property is laid out as an array of elements,
928 * each of which comprises:
929 * cells 0 - 1: an ISA address
930 * cells 2 - 4: a PCI address
931 * (size depending on dev->n_addr_cells)
932 * cell 5: the size of the range
933 */
934 if ((range->isa_addr.a_hi && ISA_SPACE_MASK) == ISA_SPACE_IO) {
935 isa_addr = range->isa_addr.a_lo;
936 pci_addr = (unsigned long) range->pci_addr.a_mid << 32 |
937 range->pci_addr.a_lo;
938
939 /* Assume these are both zero */
940 if ((pci_addr != 0) || (isa_addr != 0)) {
941 printk(KERN_ERR "unexpected isa to pci mapping: %s\n",
942 __FUNCTION__);
943 return;
944 }
945
946 size = PAGE_ALIGN(range->size);
947
948 __ioremap_explicit(phb_io_base_phys,
949 (unsigned long) phb_io_base_virt,
950 size, _PAGE_NO_CACHE | _PAGE_GUARDED);
951 }
952}
953
954void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose, 594void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
955 struct device_node *dev, int prim) 595 struct device_node *dev, int prim)
956{ 596{
@@ -1045,155 +685,122 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
1045 } 685 }
1046} 686}
1047 687
1048void __devinit pci_setup_phb_io(struct pci_controller *hose, int primary) 688#ifdef CONFIG_HOTPLUG
689
690int pcibios_unmap_io_space(struct pci_bus *bus)
1049{ 691{
1050 unsigned long size = hose->pci_io_size; 692 struct pci_controller *hose;
1051 unsigned long io_virt_offset;
1052 struct resource *res;
1053 struct device_node *isa_dn;
1054 693
1055 if (size == 0) 694 WARN_ON(bus == NULL);
1056 return;
1057 695
1058 hose->io_base_virt = reserve_phb_iospace(size); 696 /* If this is not a PHB, we only flush the hash table over
1059 DBG("phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n", 697 * the area mapped by this bridge. We don't play with the PTE
1060 hose->global_number, hose->io_base_phys, 698 * mappings since we might have to deal with sub-page alignemnts
1061 (unsigned long) hose->io_base_virt); 699 * so flushing the hash table is the only sane way to make sure
1062 700 * that no hash entries are covering that removed bridge area
1063 if (primary) { 701 * while still allowing other busses overlapping those pages
1064 pci_io_base = (unsigned long)hose->io_base_virt; 702 */
1065 isa_dn = of_find_node_by_type(NULL, "isa"); 703 if (bus->self) {
1066 if (isa_dn) { 704 struct resource *res = bus->resource[0];
1067 isa_io_base = pci_io_base;
1068 pci_process_ISA_OF_ranges(isa_dn, hose->io_base_phys,
1069 hose->io_base_virt);
1070 of_node_put(isa_dn);
1071 }
1072 }
1073 705
1074 io_virt_offset = (unsigned long)hose->io_base_virt - pci_io_base; 706 DBG("IO unmapping for PCI-PCI bridge %s\n",
1075 res = &hose->io_resource; 707 pci_name(bus->self));
1076 res->start += io_virt_offset;
1077 res->end += io_virt_offset;
1078 708
1079 /* If this is called after the initial PCI scan, then we need to 709 __flush_hash_table_range(&init_mm, res->start + _IO_BASE,
1080 * proceed to IO mappings now 710 res->end - res->start + 1);
1081 */ 711 return 0;
1082 if (pci_initial_scan_done) 712 }
1083 __ioremap_explicit(hose->io_base_phys,
1084 (unsigned long)hose->io_base_virt,
1085 hose->pci_io_size,
1086 _PAGE_NO_CACHE | _PAGE_GUARDED);
1087}
1088 713
1089void __devinit pci_setup_phb_io_dynamic(struct pci_controller *hose, 714 /* Get the host bridge */
1090 int primary) 715 hose = pci_bus_to_host(bus);
1091{
1092 unsigned long size = hose->pci_io_size;
1093 unsigned long io_virt_offset;
1094 struct resource *res;
1095 716
1096 if (size == 0) 717 /* Check if we have IOs allocated */
1097 return; 718 if (hose->io_base_alloc == 0)
719 return 0;
1098 720
1099 hose->io_base_virt = __ioremap(hose->io_base_phys, size, 721 DBG("IO unmapping for PHB %s\n",
1100 _PAGE_NO_CACHE | _PAGE_GUARDED); 722 ((struct device_node *)hose->arch_data)->full_name);
1101 DBG("phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n", 723 DBG(" alloc=0x%p\n", hose->io_base_alloc);
1102 hose->global_number, hose->io_base_phys,
1103 (unsigned long) hose->io_base_virt);
1104 724
1105 if (primary) 725 /* This is a PHB, we fully unmap the IO area */
1106 pci_io_base = (unsigned long)hose->io_base_virt; 726 vunmap(hose->io_base_alloc);
1107 727
1108 io_virt_offset = (unsigned long)hose->io_base_virt - pci_io_base; 728 return 0;
1109 res = &hose->io_resource;
1110 res->start += io_virt_offset;
1111 res->end += io_virt_offset;
1112} 729}
730EXPORT_SYMBOL_GPL(pcibios_unmap_io_space);
1113 731
732#endif /* CONFIG_HOTPLUG */
1114 733
1115static int get_bus_io_range(struct pci_bus *bus, unsigned long *start_phys, 734int __devinit pcibios_map_io_space(struct pci_bus *bus)
1116 unsigned long *start_virt, unsigned long *size)
1117{ 735{
1118 struct pci_controller *hose = pci_bus_to_host(bus); 736 struct vm_struct *area;
1119 struct resource *res; 737 unsigned long phys_page;
1120 738 unsigned long size_page;
1121 if (bus->self) 739 unsigned long io_virt_offset;
1122 res = bus->resource[0]; 740 struct pci_controller *hose;
1123 else
1124 /* Root Bus */
1125 res = &hose->io_resource;
1126
1127 if (res->end == 0 && res->start == 0)
1128 return 1;
1129 741
1130 *start_virt = pci_io_base + res->start; 742 WARN_ON(bus == NULL);
1131 *start_phys = *start_virt + hose->io_base_phys
1132 - (unsigned long) hose->io_base_virt;
1133 743
1134 if (res->end > res->start) 744 /* If this not a PHB, nothing to do, page tables still exist and
1135 *size = res->end - res->start + 1; 745 * thus HPTEs will be faulted in when needed
1136 else { 746 */
1137 printk("%s(): unexpected region 0x%lx->0x%lx\n", 747 if (bus->self) {
1138 __FUNCTION__, res->start, res->end); 748 DBG("IO mapping for PCI-PCI bridge %s\n",
1139 return 1; 749 pci_name(bus->self));
750 DBG(" virt=0x%016lx...0x%016lx\n",
751 bus->resource[0]->start + _IO_BASE,
752 bus->resource[0]->end + _IO_BASE);
753 return 0;
1140 } 754 }
1141 755
1142 return 0; 756 /* Get the host bridge */
1143} 757 hose = pci_bus_to_host(bus);
1144 758 phys_page = _ALIGN_DOWN(hose->io_base_phys, PAGE_SIZE);
1145int unmap_bus_range(struct pci_bus *bus) 759 size_page = _ALIGN_UP(hose->pci_io_size, PAGE_SIZE);
1146{
1147 unsigned long start_phys;
1148 unsigned long start_virt;
1149 unsigned long size;
1150 760
1151 if (!bus) { 761 /* Make sure IO area address is clear */
1152 printk(KERN_ERR "%s() expected bus\n", __FUNCTION__); 762 hose->io_base_alloc = NULL;
1153 return 1;
1154 }
1155
1156 if (get_bus_io_range(bus, &start_phys, &start_virt, &size))
1157 return 1;
1158 if (__iounmap_explicit((void __iomem *) start_virt, size))
1159 return 1;
1160
1161 return 0;
1162}
1163EXPORT_SYMBOL(unmap_bus_range);
1164 763
1165int remap_bus_range(struct pci_bus *bus) 764 /* If there's no IO to map on that bus, get away too */
1166{ 765 if (hose->pci_io_size == 0 || hose->io_base_phys == 0)
1167 unsigned long start_phys; 766 return 0;
1168 unsigned long start_virt;
1169 unsigned long size;
1170 767
1171 if (!bus) { 768 /* Let's allocate some IO space for that guy. We don't pass
1172 printk(KERN_ERR "%s() expected bus\n", __FUNCTION__); 769 * VM_IOREMAP because we don't care about alignment tricks that
1173 return 1; 770 * the core does in that case. Maybe we should due to stupid card
1174 } 771 * with incomplete address decoding but I'd rather not deal with
1175 772 * those outside of the reserved 64K legacy region.
1176 773 */
1177 if (get_bus_io_range(bus, &start_phys, &start_virt, &size)) 774 area = __get_vm_area(size_page, 0, PHB_IO_BASE, PHB_IO_END);
1178 return 1; 775 if (area == NULL)
1179 if (start_phys == 0) 776 return -ENOMEM;
1180 return 1; 777 hose->io_base_alloc = area->addr;
1181 printk(KERN_DEBUG "mapping IO %lx -> %lx, size: %lx\n", start_phys, start_virt, size); 778 hose->io_base_virt = (void __iomem *)(area->addr +
1182 if (__ioremap_explicit(start_phys, start_virt, size, 779 hose->io_base_phys - phys_page);
1183 _PAGE_NO_CACHE | _PAGE_GUARDED)) 780
1184 return 1; 781 DBG("IO mapping for PHB %s\n",
782 ((struct device_node *)hose->arch_data)->full_name);
783 DBG(" phys=0x%016lx, virt=0x%p (alloc=0x%p)\n",
784 hose->io_base_phys, hose->io_base_virt, hose->io_base_alloc);
785 DBG(" size=0x%016lx (alloc=0x%016lx)\n",
786 hose->pci_io_size, size_page);
787
788 /* Establish the mapping */
789 if (__ioremap_at(phys_page, area->addr, size_page,
790 _PAGE_NO_CACHE | _PAGE_GUARDED) == NULL)
791 return -ENOMEM;
792
793 /* Fixup hose IO resource */
794 io_virt_offset = (unsigned long)hose->io_base_virt - _IO_BASE;
795 hose->io_resource.start += io_virt_offset;
796 hose->io_resource.end += io_virt_offset;
797
798 DBG(" hose->io_resource=0x%016lx...0x%016lx\n",
799 hose->io_resource.start, hose->io_resource.end);
1185 800
1186 return 0; 801 return 0;
1187} 802}
1188EXPORT_SYMBOL(remap_bus_range); 803EXPORT_SYMBOL_GPL(pcibios_map_io_space);
1189
1190static void phbs_remap_io(void)
1191{
1192 struct pci_controller *hose, *tmp;
1193
1194 list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
1195 remap_bus_range(hose->bus);
1196}
1197 804
1198static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev) 805static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
1199{ 806{
@@ -1201,8 +808,7 @@ static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
1201 unsigned long offset; 808 unsigned long offset;
1202 809
1203 if (res->flags & IORESOURCE_IO) { 810 if (res->flags & IORESOURCE_IO) {
1204 offset = (unsigned long)hose->io_base_virt - pci_io_base; 811 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
1205
1206 res->start += offset; 812 res->start += offset;
1207 res->end += offset; 813 res->end += offset;
1208 } else if (res->flags & IORESOURCE_MEM) { 814 } else if (res->flags & IORESOURCE_MEM) {
@@ -1217,9 +823,20 @@ void __devinit pcibios_fixup_device_resources(struct pci_dev *dev,
1217 /* Update device resources. */ 823 /* Update device resources. */
1218 int i; 824 int i;
1219 825
1220 for (i = 0; i < PCI_NUM_RESOURCES; i++) 826 DBG("%s: Fixup resources:\n", pci_name(dev));
1221 if (dev->resource[i].flags) 827 for (i = 0; i < PCI_NUM_RESOURCES; i++) {
1222 fixup_resource(&dev->resource[i], dev); 828 struct resource *res = &dev->resource[i];
829 if (!res->flags)
830 continue;
831
832 DBG(" 0x%02x < %08lx:0x%016lx...0x%016lx\n",
833 i, res->flags, res->start, res->end);
834
835 fixup_resource(res, dev);
836
837 DBG(" > %08lx:0x%016lx...0x%016lx\n",
838 res->flags, res->start, res->end);
839 }
1223} 840}
1224EXPORT_SYMBOL(pcibios_fixup_device_resources); 841EXPORT_SYMBOL(pcibios_fixup_device_resources);
1225 842
@@ -1289,119 +906,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
1289} 906}
1290EXPORT_SYMBOL(pcibios_fixup_bus); 907EXPORT_SYMBOL(pcibios_fixup_bus);
1291 908
1292/*
1293 * Reads the interrupt pin to determine if interrupt is use by card.
1294 * If the interrupt is used, then gets the interrupt line from the
1295 * openfirmware and sets it in the pci_dev and pci_config line.
1296 */
1297int pci_read_irq_line(struct pci_dev *pci_dev)
1298{
1299 struct of_irq oirq;
1300 unsigned int virq;
1301
1302 DBG("Try to map irq for %s...\n", pci_name(pci_dev));
1303
1304#ifdef DEBUG
1305 memset(&oirq, 0xff, sizeof(oirq));
1306#endif
1307 /* Try to get a mapping from the device-tree */
1308 if (of_irq_map_pci(pci_dev, &oirq)) {
1309 u8 line, pin;
1310
1311 /* If that fails, lets fallback to what is in the config
1312 * space and map that through the default controller. We
1313 * also set the type to level low since that's what PCI
1314 * interrupts are. If your platform does differently, then
1315 * either provide a proper interrupt tree or don't use this
1316 * function.
1317 */
1318 if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_PIN, &pin))
1319 return -1;
1320 if (pin == 0)
1321 return -1;
1322 if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &line) ||
1323 line == 0xff) {
1324 return -1;
1325 }
1326 DBG(" -> no map ! Using irq line %d from PCI config\n", line);
1327
1328 virq = irq_create_mapping(NULL, line);
1329 if (virq != NO_IRQ)
1330 set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
1331 } else {
1332 DBG(" -> got one, spec %d cells (0x%08x 0x%08x...) on %s\n",
1333 oirq.size, oirq.specifier[0], oirq.specifier[1],
1334 oirq.controller->full_name);
1335
1336 virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
1337 oirq.size);
1338 }
1339 if(virq == NO_IRQ) {
1340 DBG(" -> failed to map !\n");
1341 return -1;
1342 }
1343
1344 DBG(" -> mapped to linux irq %d\n", virq);
1345
1346 pci_dev->irq = virq;
1347
1348 return 0;
1349}
1350EXPORT_SYMBOL(pci_read_irq_line);
1351
1352void pci_resource_to_user(const struct pci_dev *dev, int bar,
1353 const struct resource *rsrc,
1354 resource_size_t *start, resource_size_t *end)
1355{
1356 struct pci_controller *hose = pci_bus_to_host(dev->bus);
1357 resource_size_t offset = 0;
1358
1359 if (hose == NULL)
1360 return;
1361
1362 if (rsrc->flags & IORESOURCE_IO)
1363 offset = (unsigned long)hose->io_base_virt - pci_io_base;
1364
1365 /* We pass a fully fixed up address to userland for MMIO instead of
1366 * a BAR value because X is lame and expects to be able to use that
1367 * to pass to /dev/mem !
1368 *
1369 * That means that we'll have potentially 64 bits values where some
1370 * userland apps only expect 32 (like X itself since it thinks only
1371 * Sparc has 64 bits MMIO) but if we don't do that, we break it on
1372 * 32 bits CHRPs :-(
1373 *
1374 * Hopefully, the sysfs insterface is immune to that gunk. Once X
1375 * has been fixed (and the fix spread enough), we can re-enable the
1376 * 2 lines below and pass down a BAR value to userland. In that case
1377 * we'll also have to re-enable the matching code in
1378 * __pci_mmap_make_offset().
1379 *
1380 * BenH.
1381 */
1382#if 0
1383 else if (rsrc->flags & IORESOURCE_MEM)
1384 offset = hose->pci_mem_offset;
1385#endif
1386
1387 *start = rsrc->start - offset;
1388 *end = rsrc->end - offset;
1389}
1390
1391struct pci_controller* pci_find_hose_for_OF_device(struct device_node* node)
1392{
1393 if (!have_of)
1394 return NULL;
1395 while(node) {
1396 struct pci_controller *hose, *tmp;
1397 list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
1398 if (hose->arch_data == node)
1399 return hose;
1400 node = node->parent;
1401 }
1402 return NULL;
1403}
1404
1405unsigned long pci_address_to_pio(phys_addr_t address) 909unsigned long pci_address_to_pio(phys_addr_t address)
1406{ 910{
1407 struct pci_controller *hose, *tmp; 911 struct pci_controller *hose, *tmp;
@@ -1410,7 +914,7 @@ unsigned long pci_address_to_pio(phys_addr_t address)
1410 if (address >= hose->io_base_phys && 914 if (address >= hose->io_base_phys &&
1411 address < (hose->io_base_phys + hose->pci_io_size)) { 915 address < (hose->io_base_phys + hose->pci_io_size)) {
1412 unsigned long base = 916 unsigned long base =
1413 (unsigned long)hose->io_base_virt - pci_io_base; 917 (unsigned long)hose->io_base_virt - _IO_BASE;
1414 return base + (address - hose->io_base_phys); 918 return base + (address - hose->io_base_phys);
1415 } 919 }
1416 } 920 }
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index c96fa9bd35..a20f1951a5 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -67,7 +67,6 @@ EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
67EXPORT_SYMBOL(DMA_MODE_READ); 67EXPORT_SYMBOL(DMA_MODE_READ);
68EXPORT_SYMBOL(DMA_MODE_WRITE); 68EXPORT_SYMBOL(DMA_MODE_WRITE);
69 69
70EXPORT_SYMBOL(do_signal);
71EXPORT_SYMBOL(transfer_to_handler); 70EXPORT_SYMBOL(transfer_to_handler);
72EXPORT_SYMBOL(do_IRQ); 71EXPORT_SYMBOL(do_IRQ);
73EXPORT_SYMBOL(machine_check_exception); 72EXPORT_SYMBOL(machine_check_exception);
@@ -106,10 +105,6 @@ EXPORT_SYMBOL(isa_mem_base);
106EXPORT_SYMBOL(pci_dram_offset); 105EXPORT_SYMBOL(pci_dram_offset);
107EXPORT_SYMBOL(pci_alloc_consistent); 106EXPORT_SYMBOL(pci_alloc_consistent);
108EXPORT_SYMBOL(pci_free_consistent); 107EXPORT_SYMBOL(pci_free_consistent);
109EXPORT_SYMBOL(pci_bus_io_base);
110EXPORT_SYMBOL(pci_bus_io_base_phys);
111EXPORT_SYMBOL(pci_bus_mem_base_phys);
112EXPORT_SYMBOL(pci_bus_to_hose);
113#endif /* CONFIG_PCI */ 108#endif /* CONFIG_PCI */
114 109
115EXPORT_SYMBOL(start_thread); 110EXPORT_SYMBOL(start_thread);
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 6e2f03566b..84f000a45e 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -219,22 +219,26 @@ void discard_lazy_cpu_state(void)
219} 219}
220#endif /* CONFIG_SMP */ 220#endif /* CONFIG_SMP */
221 221
222#ifdef CONFIG_PPC_MERGE /* XXX for now */
223int set_dabr(unsigned long dabr) 222int set_dabr(unsigned long dabr)
224{ 223{
224#ifdef CONFIG_PPC_MERGE /* XXX for now */
225 if (ppc_md.set_dabr) 225 if (ppc_md.set_dabr)
226 return ppc_md.set_dabr(dabr); 226 return ppc_md.set_dabr(dabr);
227#endif
227 228
229 /* XXX should we have a CPU_FTR_HAS_DABR ? */
230#if defined(CONFIG_PPC64) || defined(CONFIG_6xx)
228 mtspr(SPRN_DABR, dabr); 231 mtspr(SPRN_DABR, dabr);
232#endif
229 return 0; 233 return 0;
230} 234}
231#endif
232 235
233#ifdef CONFIG_PPC64 236#ifdef CONFIG_PPC64
234DEFINE_PER_CPU(struct cpu_usage, cpu_usage_array); 237DEFINE_PER_CPU(struct cpu_usage, cpu_usage_array);
235static DEFINE_PER_CPU(unsigned long, current_dabr);
236#endif 238#endif
237 239
240static DEFINE_PER_CPU(unsigned long, current_dabr);
241
238struct task_struct *__switch_to(struct task_struct *prev, 242struct task_struct *__switch_to(struct task_struct *prev,
239 struct task_struct *new) 243 struct task_struct *new)
240{ 244{
@@ -299,12 +303,10 @@ struct task_struct *__switch_to(struct task_struct *prev,
299 303
300#endif /* CONFIG_SMP */ 304#endif /* CONFIG_SMP */
301 305
302#ifdef CONFIG_PPC64 /* for now */
303 if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) { 306 if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) {
304 set_dabr(new->thread.dabr); 307 set_dabr(new->thread.dabr);
305 __get_cpu_var(current_dabr) = new->thread.dabr; 308 __get_cpu_var(current_dabr) = new->thread.dabr;
306 } 309 }
307#endif /* CONFIG_PPC64 */
308 310
309 new_thread = &new->thread; 311 new_thread = &new->thread;
310 old_thread = &current->thread; 312 old_thread = &current->thread;
@@ -473,12 +475,10 @@ void flush_thread(void)
473 475
474 discard_lazy_cpu_state(); 476 discard_lazy_cpu_state();
475 477
476#ifdef CONFIG_PPC64 /* for now */
477 if (current->thread.dabr) { 478 if (current->thread.dabr) {
478 current->thread.dabr = 0; 479 current->thread.dabr = 0;
479 set_dabr(0); 480 set_dabr(0);
480 } 481 }
481#endif
482} 482}
483 483
484void 484void
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index af42ddab3a..37ff99bd98 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -52,6 +52,7 @@
52#include <asm/pSeries_reconfig.h> 52#include <asm/pSeries_reconfig.h>
53#include <asm/pci-bridge.h> 53#include <asm/pci-bridge.h>
54#include <asm/kexec.h> 54#include <asm/kexec.h>
55#include <asm/system.h>
55 56
56#ifdef DEBUG 57#ifdef DEBUG
57#define DBG(fmt...) printk(KERN_ERR fmt) 58#define DBG(fmt...) printk(KERN_ERR fmt)
@@ -1005,7 +1006,7 @@ static void __init early_reserve_mem(void)
1005 1006
1006void __init early_init_devtree(void *params) 1007void __init early_init_devtree(void *params)
1007{ 1008{
1008 DBG(" -> early_init_devtree()\n"); 1009 DBG(" -> early_init_devtree(%p)\n", params);
1009 1010
1010 /* Setup flat device-tree pointer */ 1011 /* Setup flat device-tree pointer */
1011 initial_boot_params = params; 1012 initial_boot_params = params;
@@ -1055,8 +1056,6 @@ void __init early_init_devtree(void *params)
1055 DBG(" <- early_init_devtree()\n"); 1056 DBG(" <- early_init_devtree()\n");
1056} 1057}
1057 1058
1058#undef printk
1059
1060int of_n_addr_cells(struct device_node* np) 1059int of_n_addr_cells(struct device_node* np)
1061{ 1060{
1062 const int *ip; 1061 const int *ip;
@@ -1375,8 +1374,17 @@ static void of_node_release(struct kref *kref)
1375 struct device_node *node = kref_to_device_node(kref); 1374 struct device_node *node = kref_to_device_node(kref);
1376 struct property *prop = node->properties; 1375 struct property *prop = node->properties;
1377 1376
1378 if (!OF_IS_DYNAMIC(node)) 1377 /* We should never be releasing nodes that haven't been detached. */
1378 if (!of_node_check_flag(node, OF_DETACHED)) {
1379 printk("WARNING: Bad of_node_put() on %s\n", node->full_name);
1380 dump_stack();
1381 kref_init(&node->kref);
1382 return;
1383 }
1384
1385 if (!of_node_check_flag(node, OF_DYNAMIC))
1379 return; 1386 return;
1387
1380 while (prop) { 1388 while (prop) {
1381 struct property *next = prop->next; 1389 struct property *next = prop->next;
1382 kfree(prop->name); 1390 kfree(prop->name);
@@ -1432,6 +1440,8 @@ void of_detach_node(const struct device_node *np)
1432 write_lock(&devtree_lock); 1440 write_lock(&devtree_lock);
1433 1441
1434 parent = np->parent; 1442 parent = np->parent;
1443 if (!parent)
1444 goto out_unlock;
1435 1445
1436 if (allnodes == np) 1446 if (allnodes == np)
1437 allnodes = np->allnext; 1447 allnodes = np->allnext;
@@ -1455,6 +1465,9 @@ void of_detach_node(const struct device_node *np)
1455 prevsib->sibling = np->sibling; 1465 prevsib->sibling = np->sibling;
1456 } 1466 }
1457 1467
1468 of_node_set_flag(np, OF_DETACHED);
1469
1470out_unlock:
1458 write_unlock(&devtree_lock); 1471 write_unlock(&devtree_lock);
1459} 1472}
1460 1473
@@ -1716,22 +1729,18 @@ struct device_node *of_get_cpu_node(int cpu, unsigned int *thread)
1716} 1729}
1717EXPORT_SYMBOL(of_get_cpu_node); 1730EXPORT_SYMBOL(of_get_cpu_node);
1718 1731
1719#ifdef DEBUG 1732#if defined(CONFIG_DEBUG_FS) && defined(DEBUG)
1720static struct debugfs_blob_wrapper flat_dt_blob; 1733static struct debugfs_blob_wrapper flat_dt_blob;
1721 1734
1722static int __init export_flat_device_tree(void) 1735static int __init export_flat_device_tree(void)
1723{ 1736{
1724 struct dentry *d; 1737 struct dentry *d;
1725 1738
1726 d = debugfs_create_dir("powerpc", NULL);
1727 if (!d)
1728 return 1;
1729
1730 flat_dt_blob.data = initial_boot_params; 1739 flat_dt_blob.data = initial_boot_params;
1731 flat_dt_blob.size = initial_boot_params->totalsize; 1740 flat_dt_blob.size = initial_boot_params->totalsize;
1732 1741
1733 d = debugfs_create_blob("flat-device-tree", S_IFREG | S_IRUSR, 1742 d = debugfs_create_blob("flat-device-tree", S_IFREG | S_IRUSR,
1734 d, &flat_dt_blob); 1743 powerpc_debugfs_root, &flat_dt_blob);
1735 if (!d) 1744 if (!d)
1736 return 1; 1745 return 1;
1737 1746
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index d6047c4410..a1d582e386 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -635,6 +635,7 @@ static void __init early_cmdline_parse(void)
635/* ibm,dynamic-reconfiguration-memory property supported */ 635/* ibm,dynamic-reconfiguration-memory property supported */
636#define OV5_DRCONF_MEMORY 0x20 636#define OV5_DRCONF_MEMORY 0x20
637#define OV5_LARGE_PAGES 0x10 /* large pages supported */ 637#define OV5_LARGE_PAGES 0x10 /* large pages supported */
638#define OV5_DONATE_DEDICATE_CPU 0x02 /* donate dedicated CPU support */
638/* PCIe/MSI support. Without MSI full PCIe is not supported */ 639/* PCIe/MSI support. Without MSI full PCIe is not supported */
639#ifdef CONFIG_PCI_MSI 640#ifdef CONFIG_PCI_MSI
640#define OV5_MSI 0x01 /* PCIe/MSI support */ 641#define OV5_MSI 0x01 /* PCIe/MSI support */
@@ -685,7 +686,8 @@ static unsigned char ibm_architecture_vec[] = {
685 /* option vector 5: PAPR/OF options */ 686 /* option vector 5: PAPR/OF options */
686 3 - 2, /* length */ 687 3 - 2, /* length */
687 0, /* don't ignore, don't halt */ 688 0, /* don't ignore, don't halt */
688 OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES | OV5_DRCONF_MEMORY | OV5_MSI, 689 OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES | OV5_DRCONF_MEMORY |
690 OV5_DONATE_DEDICATE_CPU | OV5_MSI,
689}; 691};
690 692
691/* Old method - ELF header with PT_NOTE sections */ 693/* Old method - ELF header with PT_NOTE sections */
diff --git a/arch/powerpc/kernel/ptrace-common.h b/arch/powerpc/kernel/ptrace-common.h
deleted file mode 100644
index 8797ae737a..0000000000
--- a/arch/powerpc/kernel/ptrace-common.h
+++ /dev/null
@@ -1,161 +0,0 @@
1/*
2 * Copyright (c) 2002 Stephen Rothwell, IBM Coproration
3 * Extracted from ptrace.c and ptrace32.c
4 *
5 * This file is subject to the terms and conditions of the GNU General
6 * Public License. See the file README.legal in the main directory of
7 * this archive for more details.
8 */
9
10#ifndef _PPC64_PTRACE_COMMON_H
11#define _PPC64_PTRACE_COMMON_H
12
13#include <asm/system.h>
14
15/*
16 * Set of msr bits that gdb can change on behalf of a process.
17 */
18#define MSR_DEBUGCHANGE (MSR_FE0 | MSR_SE | MSR_BE | MSR_FE1)
19
20/*
21 * Get contents of register REGNO in task TASK.
22 */
23static inline unsigned long get_reg(struct task_struct *task, int regno)
24{
25 unsigned long tmp = 0;
26
27 /*
28 * Put the correct FP bits in, they might be wrong as a result
29 * of our lazy FP restore.
30 */
31 if (regno == PT_MSR) {
32 tmp = ((unsigned long *)task->thread.regs)[PT_MSR];
33 tmp |= task->thread.fpexc_mode;
34 } else if (regno < (sizeof(struct pt_regs) / sizeof(unsigned long))) {
35 tmp = ((unsigned long *)task->thread.regs)[regno];
36 }
37
38 return tmp;
39}
40
41/*
42 * Write contents of register REGNO in task TASK.
43 */
44static inline int put_reg(struct task_struct *task, int regno,
45 unsigned long data)
46{
47 if (regno < PT_SOFTE) {
48 if (regno == PT_MSR)
49 data = (data & MSR_DEBUGCHANGE)
50 | (task->thread.regs->msr & ~MSR_DEBUGCHANGE);
51 ((unsigned long *)task->thread.regs)[regno] = data;
52 return 0;
53 }
54 return -EIO;
55}
56
57static inline void set_single_step(struct task_struct *task)
58{
59 struct pt_regs *regs = task->thread.regs;
60 if (regs != NULL)
61 regs->msr |= MSR_SE;
62 set_tsk_thread_flag(task, TIF_SINGLESTEP);
63}
64
65static inline void clear_single_step(struct task_struct *task)
66{
67 struct pt_regs *regs = task->thread.regs;
68 if (regs != NULL)
69 regs->msr &= ~MSR_SE;
70 clear_tsk_thread_flag(task, TIF_SINGLESTEP);
71}
72
73#ifdef CONFIG_ALTIVEC
74/*
75 * Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go.
76 * The transfer totals 34 quadword. Quadwords 0-31 contain the
77 * corresponding vector registers. Quadword 32 contains the vscr as the
78 * last word (offset 12) within that quadword. Quadword 33 contains the
79 * vrsave as the first word (offset 0) within the quadword.
80 *
81 * This definition of the VMX state is compatible with the current PPC32
82 * ptrace interface. This allows signal handling and ptrace to use the
83 * same structures. This also simplifies the implementation of a bi-arch
84 * (combined (32- and 64-bit) gdb.
85 */
86
87/*
88 * Get contents of AltiVec register state in task TASK
89 */
90static inline int get_vrregs(unsigned long __user *data,
91 struct task_struct *task)
92{
93 unsigned long regsize;
94
95 /* copy AltiVec registers VR[0] .. VR[31] */
96 regsize = 32 * sizeof(vector128);
97 if (copy_to_user(data, task->thread.vr, regsize))
98 return -EFAULT;
99 data += (regsize / sizeof(unsigned long));
100
101 /* copy VSCR */
102 regsize = 1 * sizeof(vector128);
103 if (copy_to_user(data, &task->thread.vscr, regsize))
104 return -EFAULT;
105 data += (regsize / sizeof(unsigned long));
106
107 /* copy VRSAVE */
108 if (put_user(task->thread.vrsave, (u32 __user *)data))
109 return -EFAULT;
110
111 return 0;
112}
113
114/*
115 * Write contents of AltiVec register state into task TASK.
116 */
117static inline int set_vrregs(struct task_struct *task,
118 unsigned long __user *data)
119{
120 unsigned long regsize;
121
122 /* copy AltiVec registers VR[0] .. VR[31] */
123 regsize = 32 * sizeof(vector128);
124 if (copy_from_user(task->thread.vr, data, regsize))
125 return -EFAULT;
126 data += (regsize / sizeof(unsigned long));
127
128 /* copy VSCR */
129 regsize = 1 * sizeof(vector128);
130 if (copy_from_user(&task->thread.vscr, data, regsize))
131 return -EFAULT;
132 data += (regsize / sizeof(unsigned long));
133
134 /* copy VRSAVE */
135 if (get_user(task->thread.vrsave, (u32 __user *)data))
136 return -EFAULT;
137
138 return 0;
139}
140#endif
141
142static inline int ptrace_set_debugreg(struct task_struct *task,
143 unsigned long addr, unsigned long data)
144{
145 /* We only support one DABR and no IABRS at the moment */
146 if (addr > 0)
147 return -EINVAL;
148
149 /* The bottom 3 bits are flags */
150 if ((data & ~0x7UL) >= TASK_SIZE)
151 return -EIO;
152
153 /* Ensure translation is on */
154 if (data && !(data & DABR_TRANSLATION))
155 return -EIO;
156
157 task->thread.dabr = data;
158 return 0;
159}
160
161#endif /* _PPC64_PTRACE_COMMON_H */
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index bf76562167..8a177bd9ea 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -35,11 +35,11 @@
35#include <asm/pgtable.h> 35#include <asm/pgtable.h>
36#include <asm/system.h> 36#include <asm/system.h>
37 37
38#ifdef CONFIG_PPC64 38/*
39#include "ptrace-common.h" 39 * does not yet catch signals sent when the child dies.
40#endif 40 * in exit.c or in signal.c.
41 */
41 42
42#ifdef CONFIG_PPC32
43/* 43/*
44 * Set of msr bits that gdb can change on behalf of a process. 44 * Set of msr bits that gdb can change on behalf of a process.
45 */ 45 */
@@ -48,65 +48,117 @@
48#else 48#else
49#define MSR_DEBUGCHANGE (MSR_SE | MSR_BE) 49#define MSR_DEBUGCHANGE (MSR_SE | MSR_BE)
50#endif 50#endif
51#endif /* CONFIG_PPC32 */
52 51
53/* 52/*
54 * does not yet catch signals sent when the child dies. 53 * Max register writeable via put_reg
55 * in exit.c or in signal.c.
56 */ 54 */
57
58#ifdef CONFIG_PPC32 55#ifdef CONFIG_PPC32
56#define PT_MAX_PUT_REG PT_MQ
57#else
58#define PT_MAX_PUT_REG PT_CCR
59#endif
60
59/* 61/*
60 * Get contents of register REGNO in task TASK. 62 * Get contents of register REGNO in task TASK.
61 */ 63 */
62static inline unsigned long get_reg(struct task_struct *task, int regno) 64unsigned long ptrace_get_reg(struct task_struct *task, int regno)
63{ 65{
64 if (regno < sizeof(struct pt_regs) / sizeof(unsigned long) 66 unsigned long tmp = 0;
65 && task->thread.regs != NULL) 67
68 if (task->thread.regs == NULL)
69 return -EIO;
70
71 if (regno == PT_MSR) {
72 tmp = ((unsigned long *)task->thread.regs)[PT_MSR];
73 return tmp | task->thread.fpexc_mode;
74 }
75
76 if (regno < (sizeof(struct pt_regs) / sizeof(unsigned long)))
66 return ((unsigned long *)task->thread.regs)[regno]; 77 return ((unsigned long *)task->thread.regs)[regno];
67 return (0); 78
79 return -EIO;
68} 80}
69 81
70/* 82/*
71 * Write contents of register REGNO in task TASK. 83 * Write contents of register REGNO in task TASK.
72 */ 84 */
73static inline int put_reg(struct task_struct *task, int regno, 85int ptrace_put_reg(struct task_struct *task, int regno, unsigned long data)
74 unsigned long data)
75{ 86{
76 if (regno <= PT_MQ && task->thread.regs != NULL) { 87 if (task->thread.regs == NULL)
88 return -EIO;
89
90 if (regno <= PT_MAX_PUT_REG || regno == PT_TRAP) {
77 if (regno == PT_MSR) 91 if (regno == PT_MSR)
78 data = (data & MSR_DEBUGCHANGE) 92 data = (data & MSR_DEBUGCHANGE)
79 | (task->thread.regs->msr & ~MSR_DEBUGCHANGE); 93 | (task->thread.regs->msr & ~MSR_DEBUGCHANGE);
94 /* We prevent mucking around with the reserved area of trap
95 * which are used internally by the kernel
96 */
97 if (regno == PT_TRAP)
98 data &= 0xfff0;
80 ((unsigned long *)task->thread.regs)[regno] = data; 99 ((unsigned long *)task->thread.regs)[regno] = data;
81 return 0; 100 return 0;
82 } 101 }
83 return -EIO; 102 return -EIO;
84} 103}
85 104
105
106static int get_fpregs(void __user *data, struct task_struct *task,
107 int has_fpscr)
108{
109 unsigned int count = has_fpscr ? 33 : 32;
110
111 if (copy_to_user(data, task->thread.fpr, count * sizeof(double)))
112 return -EFAULT;
113 return 0;
114}
115
116static int set_fpregs(void __user *data, struct task_struct *task,
117 int has_fpscr)
118{
119 unsigned int count = has_fpscr ? 33 : 32;
120
121 if (copy_from_user(task->thread.fpr, data, count * sizeof(double)))
122 return -EFAULT;
123 return 0;
124}
125
126
86#ifdef CONFIG_ALTIVEC 127#ifdef CONFIG_ALTIVEC
87/* 128/*
129 * Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go.
130 * The transfer totals 34 quadword. Quadwords 0-31 contain the
131 * corresponding vector registers. Quadword 32 contains the vscr as the
132 * last word (offset 12) within that quadword. Quadword 33 contains the
133 * vrsave as the first word (offset 0) within the quadword.
134 *
135 * This definition of the VMX state is compatible with the current PPC32
136 * ptrace interface. This allows signal handling and ptrace to use the
137 * same structures. This also simplifies the implementation of a bi-arch
138 * (combined (32- and 64-bit) gdb.
139 */
140
141/*
88 * Get contents of AltiVec register state in task TASK 142 * Get contents of AltiVec register state in task TASK
89 */ 143 */
90static inline int get_vrregs(unsigned long __user *data, struct task_struct *task) 144static int get_vrregs(unsigned long __user *data, struct task_struct *task)
91{ 145{
92 int i, j; 146 unsigned long regsize;
93
94 if (!access_ok(VERIFY_WRITE, data, 133 * sizeof(unsigned long)))
95 return -EFAULT;
96 147
97 /* copy AltiVec registers VR[0] .. VR[31] */ 148 /* copy AltiVec registers VR[0] .. VR[31] */
98 for (i = 0; i < 32; i++) 149 regsize = 32 * sizeof(vector128);
99 for (j = 0; j < 4; j++, data++) 150 if (copy_to_user(data, task->thread.vr, regsize))
100 if (__put_user(task->thread.vr[i].u[j], data)) 151 return -EFAULT;
101 return -EFAULT; 152 data += (regsize / sizeof(unsigned long));
102 153
103 /* copy VSCR */ 154 /* copy VSCR */
104 for (i = 0; i < 4; i++, data++) 155 regsize = 1 * sizeof(vector128);
105 if (__put_user(task->thread.vscr.u[i], data)) 156 if (copy_to_user(data, &task->thread.vscr, regsize))
106 return -EFAULT; 157 return -EFAULT;
158 data += (regsize / sizeof(unsigned long));
107 159
108 /* copy VRSAVE */ 160 /* copy VRSAVE */
109 if (__put_user(task->thread.vrsave, data)) 161 if (put_user(task->thread.vrsave, (u32 __user *)data))
110 return -EFAULT; 162 return -EFAULT;
111 163
112 return 0; 164 return 0;
@@ -115,31 +167,29 @@ static inline int get_vrregs(unsigned long __user *data, struct task_struct *tas
115/* 167/*
116 * Write contents of AltiVec register state into task TASK. 168 * Write contents of AltiVec register state into task TASK.
117 */ 169 */
118static inline int set_vrregs(struct task_struct *task, unsigned long __user *data) 170static int set_vrregs(struct task_struct *task, unsigned long __user *data)
119{ 171{
120 int i, j; 172 unsigned long regsize;
121
122 if (!access_ok(VERIFY_READ, data, 133 * sizeof(unsigned long)))
123 return -EFAULT;
124 173
125 /* copy AltiVec registers VR[0] .. VR[31] */ 174 /* copy AltiVec registers VR[0] .. VR[31] */
126 for (i = 0; i < 32; i++) 175 regsize = 32 * sizeof(vector128);
127 for (j = 0; j < 4; j++, data++) 176 if (copy_from_user(task->thread.vr, data, regsize))
128 if (__get_user(task->thread.vr[i].u[j], data)) 177 return -EFAULT;
129 return -EFAULT; 178 data += (regsize / sizeof(unsigned long));
130 179
131 /* copy VSCR */ 180 /* copy VSCR */
132 for (i = 0; i < 4; i++, data++) 181 regsize = 1 * sizeof(vector128);
133 if (__get_user(task->thread.vscr.u[i], data)) 182 if (copy_from_user(&task->thread.vscr, data, regsize))
134 return -EFAULT; 183 return -EFAULT;
184 data += (regsize / sizeof(unsigned long));
135 185
136 /* copy VRSAVE */ 186 /* copy VRSAVE */
137 if (__get_user(task->thread.vrsave, data)) 187 if (get_user(task->thread.vrsave, (u32 __user *)data))
138 return -EFAULT; 188 return -EFAULT;
139 189
140 return 0; 190 return 0;
141} 191}
142#endif 192#endif /* CONFIG_ALTIVEC */
143 193
144#ifdef CONFIG_SPE 194#ifdef CONFIG_SPE
145 195
@@ -156,7 +206,7 @@ static inline int set_vrregs(struct task_struct *task, unsigned long __user *dat
156/* 206/*
157 * Get contents of SPE register state in task TASK. 207 * Get contents of SPE register state in task TASK.
158 */ 208 */
159static inline int get_evrregs(unsigned long *data, struct task_struct *task) 209static int get_evrregs(unsigned long *data, struct task_struct *task)
160{ 210{
161 int i; 211 int i;
162 212
@@ -182,7 +232,7 @@ static inline int get_evrregs(unsigned long *data, struct task_struct *task)
182/* 232/*
183 * Write contents of SPE register state into task TASK. 233 * Write contents of SPE register state into task TASK.
184 */ 234 */
185static inline int set_evrregs(struct task_struct *task, unsigned long *data) 235static int set_evrregs(struct task_struct *task, unsigned long *data)
186{ 236{
187 int i; 237 int i;
188 238
@@ -205,8 +255,8 @@ static inline int set_evrregs(struct task_struct *task, unsigned long *data)
205} 255}
206#endif /* CONFIG_SPE */ 256#endif /* CONFIG_SPE */
207 257
208static inline void 258
209set_single_step(struct task_struct *task) 259static void set_single_step(struct task_struct *task)
210{ 260{
211 struct pt_regs *regs = task->thread.regs; 261 struct pt_regs *regs = task->thread.regs;
212 262
@@ -221,8 +271,7 @@ set_single_step(struct task_struct *task)
221 set_tsk_thread_flag(task, TIF_SINGLESTEP); 271 set_tsk_thread_flag(task, TIF_SINGLESTEP);
222} 272}
223 273
224static inline void 274static void clear_single_step(struct task_struct *task)
225clear_single_step(struct task_struct *task)
226{ 275{
227 struct pt_regs *regs = task->thread.regs; 276 struct pt_regs *regs = task->thread.regs;
228 277
@@ -236,7 +285,25 @@ clear_single_step(struct task_struct *task)
236 } 285 }
237 clear_tsk_thread_flag(task, TIF_SINGLESTEP); 286 clear_tsk_thread_flag(task, TIF_SINGLESTEP);
238} 287}
239#endif /* CONFIG_PPC32 */ 288
289static int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,
290 unsigned long data)
291{
292 /* We only support one DABR and no IABRS at the moment */
293 if (addr > 0)
294 return -EINVAL;
295
296 /* The bottom 3 bits are flags */
297 if ((data & ~0x7UL) >= TASK_SIZE)
298 return -EIO;
299
300 /* Ensure translation is on */
301 if (data && !(data & DABR_TRANSLATION))
302 return -EIO;
303
304 task->thread.dabr = data;
305 return 0;
306}
240 307
241/* 308/*
242 * Called by kernel/ptrace.c when detaching.. 309 * Called by kernel/ptrace.c when detaching..
@@ -249,6 +316,62 @@ void ptrace_disable(struct task_struct *child)
249 clear_single_step(child); 316 clear_single_step(child);
250} 317}
251 318
319/*
320 * Here are the old "legacy" powerpc specific getregs/setregs ptrace calls,
321 * we mark them as obsolete now, they will be removed in a future version
322 */
323static long arch_ptrace_old(struct task_struct *child, long request, long addr,
324 long data)
325{
326 int ret = -EPERM;
327
328 switch(request) {
329 case PPC_PTRACE_GETREGS: { /* Get GPRs 0 - 31. */
330 int i;
331 unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
332 unsigned long __user *tmp = (unsigned long __user *)addr;
333
334 for (i = 0; i < 32; i++) {
335 ret = put_user(*reg, tmp);
336 if (ret)
337 break;
338 reg++;
339 tmp++;
340 }
341 break;
342 }
343
344 case PPC_PTRACE_SETREGS: { /* Set GPRs 0 - 31. */
345 int i;
346 unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
347 unsigned long __user *tmp = (unsigned long __user *)addr;
348
349 for (i = 0; i < 32; i++) {
350 ret = get_user(*reg, tmp);
351 if (ret)
352 break;
353 reg++;
354 tmp++;
355 }
356 break;
357 }
358
359 case PPC_PTRACE_GETFPREGS: { /* Get FPRs 0 - 31. */
360 flush_fp_to_thread(child);
361 ret = get_fpregs((void __user *)addr, child, 0);
362 break;
363 }
364
365 case PPC_PTRACE_SETFPREGS: { /* Get FPRs 0 - 31. */
366 flush_fp_to_thread(child);
367 ret = set_fpregs((void __user *)addr, child, 0);
368 break;
369 }
370
371 }
372 return ret;
373}
374
252long arch_ptrace(struct task_struct *child, long request, long addr, long data) 375long arch_ptrace(struct task_struct *child, long request, long addr, long data)
253{ 376{
254 int ret = -EPERM; 377 int ret = -EPERM;
@@ -256,17 +379,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
256 switch (request) { 379 switch (request) {
257 /* when I and D space are separate, these will need to be fixed. */ 380 /* when I and D space are separate, these will need to be fixed. */
258 case PTRACE_PEEKTEXT: /* read word at location addr. */ 381 case PTRACE_PEEKTEXT: /* read word at location addr. */
259 case PTRACE_PEEKDATA: { 382 case PTRACE_PEEKDATA:
260 unsigned long tmp; 383 ret = generic_ptrace_peekdata(child, addr, data);
261 int copied;
262
263 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
264 ret = -EIO;
265 if (copied != sizeof(tmp))
266 break;
267 ret = put_user(tmp,(unsigned long __user *) data);
268 break; 384 break;
269 }
270 385
271 /* read the word at location addr in the USER area. */ 386 /* read the word at location addr in the USER area. */
272 case PTRACE_PEEKUSR: { 387 case PTRACE_PEEKUSR: {
@@ -284,11 +399,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
284#endif 399#endif
285 break; 400 break;
286 401
287#ifdef CONFIG_PPC32
288 CHECK_FULL_REGS(child->thread.regs); 402 CHECK_FULL_REGS(child->thread.regs);
289#endif
290 if (index < PT_FPR0) { 403 if (index < PT_FPR0) {
291 tmp = get_reg(child, (int) index); 404 tmp = ptrace_get_reg(child, (int) index);
292 } else { 405 } else {
293 flush_fp_to_thread(child); 406 flush_fp_to_thread(child);
294 tmp = ((unsigned long *)child->thread.fpr)[index - PT_FPR0]; 407 tmp = ((unsigned long *)child->thread.fpr)[index - PT_FPR0];
@@ -300,11 +413,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
300 /* If I and D space are separate, this will have to be fixed. */ 413 /* If I and D space are separate, this will have to be fixed. */
301 case PTRACE_POKETEXT: /* write the word at location addr. */ 414 case PTRACE_POKETEXT: /* write the word at location addr. */
302 case PTRACE_POKEDATA: 415 case PTRACE_POKEDATA:
303 ret = 0; 416 ret = generic_ptrace_pokedata(child, addr, data);
304 if (access_process_vm(child, addr, &data, sizeof(data), 1)
305 == sizeof(data))
306 break;
307 ret = -EIO;
308 break; 417 break;
309 418
310 /* write the word at location addr in the USER area */ 419 /* write the word at location addr in the USER area */
@@ -323,13 +432,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
323#endif 432#endif
324 break; 433 break;
325 434
326#ifdef CONFIG_PPC32
327 CHECK_FULL_REGS(child->thread.regs); 435 CHECK_FULL_REGS(child->thread.regs);
328#endif
329 if (index == PT_ORIG_R3)
330 break;
331 if (index < PT_FPR0) { 436 if (index < PT_FPR0) {
332 ret = put_reg(child, index, data); 437 ret = ptrace_put_reg(child, index, data);
333 } else { 438 } else {
334 flush_fp_to_thread(child); 439 flush_fp_to_thread(child);
335 ((unsigned long *)child->thread.fpr)[index - PT_FPR0] = data; 440 ((unsigned long *)child->thread.fpr)[index - PT_FPR0] = data;
@@ -384,7 +489,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
384 break; 489 break;
385 } 490 }
386 491
387#ifdef CONFIG_PPC64
388 case PTRACE_GET_DEBUGREG: { 492 case PTRACE_GET_DEBUGREG: {
389 ret = -EINVAL; 493 ret = -EINVAL;
390 /* We only support one DABR and no IABRS at the moment */ 494 /* We only support one DABR and no IABRS at the moment */
@@ -398,73 +502,61 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
398 case PTRACE_SET_DEBUGREG: 502 case PTRACE_SET_DEBUGREG:
399 ret = ptrace_set_debugreg(child, addr, data); 503 ret = ptrace_set_debugreg(child, addr, data);
400 break; 504 break;
401#endif
402 505
403 case PTRACE_DETACH: 506 case PTRACE_DETACH:
404 ret = ptrace_detach(child, data); 507 ret = ptrace_detach(child, data);
405 break; 508 break;
406 509
407 case PPC_PTRACE_GETREGS: { /* Get GPRs 0 - 31. */ 510#ifdef CONFIG_PPC64
408 int i; 511 case PTRACE_GETREGS64:
409 unsigned long *reg = &((unsigned long *)child->thread.regs)[0]; 512#endif
410 unsigned long __user *tmp = (unsigned long __user *)addr; 513 case PTRACE_GETREGS: { /* Get all pt_regs from the child. */
411 514 int ui;
412 for (i = 0; i < 32; i++) { 515 if (!access_ok(VERIFY_WRITE, (void __user *)data,
413 ret = put_user(*reg, tmp); 516 sizeof(struct pt_regs))) {
414 if (ret) 517 ret = -EIO;
415 break; 518 break;
416 reg++; 519 }
417 tmp++; 520 ret = 0;
521 for (ui = 0; ui < PT_REGS_COUNT; ui ++) {
522 ret |= __put_user(ptrace_get_reg(child, ui),
523 (unsigned long __user *) data);
524 data += sizeof(long);
418 } 525 }
419 break; 526 break;
420 } 527 }
421 528
422 case PPC_PTRACE_SETREGS: { /* Set GPRs 0 - 31. */ 529#ifdef CONFIG_PPC64
423 int i; 530 case PTRACE_SETREGS64:
424 unsigned long *reg = &((unsigned long *)child->thread.regs)[0]; 531#endif
425 unsigned long __user *tmp = (unsigned long __user *)addr; 532 case PTRACE_SETREGS: { /* Set all gp regs in the child. */
426 533 unsigned long tmp;
427 for (i = 0; i < 32; i++) { 534 int ui;
428 ret = get_user(*reg, tmp); 535 if (!access_ok(VERIFY_READ, (void __user *)data,
536 sizeof(struct pt_regs))) {
537 ret = -EIO;
538 break;
539 }
540 ret = 0;
541 for (ui = 0; ui < PT_REGS_COUNT; ui ++) {
542 ret = __get_user(tmp, (unsigned long __user *) data);
429 if (ret) 543 if (ret)
430 break; 544 break;
431 reg++; 545 ptrace_put_reg(child, ui, tmp);
432 tmp++; 546 data += sizeof(long);
433 } 547 }
434 break; 548 break;
435 } 549 }
436 550
437 case PPC_PTRACE_GETFPREGS: { /* Get FPRs 0 - 31. */ 551 case PTRACE_GETFPREGS: { /* Get the child FPU state (FPR0...31 + FPSCR) */
438 int i;
439 unsigned long *reg = &((unsigned long *)child->thread.fpr)[0];
440 unsigned long __user *tmp = (unsigned long __user *)addr;
441
442 flush_fp_to_thread(child); 552 flush_fp_to_thread(child);
443 553 ret = get_fpregs((void __user *)data, child, 1);
444 for (i = 0; i < 32; i++) {
445 ret = put_user(*reg, tmp);
446 if (ret)
447 break;
448 reg++;
449 tmp++;
450 }
451 break; 554 break;
452 } 555 }
453 556
454 case PPC_PTRACE_SETFPREGS: { /* Get FPRs 0 - 31. */ 557 case PTRACE_SETFPREGS: { /* Set the child FPU state (FPR0...31 + FPSCR) */
455 int i;
456 unsigned long *reg = &((unsigned long *)child->thread.fpr)[0];
457 unsigned long __user *tmp = (unsigned long __user *)addr;
458
459 flush_fp_to_thread(child); 558 flush_fp_to_thread(child);
460 559 ret = set_fpregs((void __user *)data, child, 1);
461 for (i = 0; i < 32; i++) {
462 ret = get_user(*reg, tmp);
463 if (ret)
464 break;
465 reg++;
466 tmp++;
467 }
468 break; 560 break;
469 } 561 }
470 562
@@ -499,11 +591,18 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
499 break; 591 break;
500#endif 592#endif
501 593
594 /* Old reverse args ptrace callss */
595 case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */
596 case PPC_PTRACE_SETREGS: /* Set GPRs 0 - 31. */
597 case PPC_PTRACE_GETFPREGS: /* Get FPRs 0 - 31. */
598 case PPC_PTRACE_SETFPREGS: /* Get FPRs 0 - 31. */
599 ret = arch_ptrace_old(child, request, addr, data);
600 break;
601
502 default: 602 default:
503 ret = ptrace_request(child, request, addr, data); 603 ret = ptrace_request(child, request, addr, data);
504 break; 604 break;
505 } 605 }
506
507 return ret; 606 return ret;
508} 607}
509 608
diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c
index 9b9a230349..9e6baeac0f 100644
--- a/arch/powerpc/kernel/ptrace32.c
+++ b/arch/powerpc/kernel/ptrace32.c
@@ -33,13 +33,55 @@
33#include <asm/pgtable.h> 33#include <asm/pgtable.h>
34#include <asm/system.h> 34#include <asm/system.h>
35 35
36#include "ptrace-common.h"
37
38/* 36/*
39 * does not yet catch signals sent when the child dies. 37 * does not yet catch signals sent when the child dies.
40 * in exit.c or in signal.c. 38 * in exit.c or in signal.c.
41 */ 39 */
42 40
41/*
42 * Here are the old "legacy" powerpc specific getregs/setregs ptrace calls,
43 * we mark them as obsolete now, they will be removed in a future version
44 */
45static long compat_ptrace_old(struct task_struct *child, long request,
46 long addr, long data)
47{
48 int ret = -EPERM;
49
50 switch(request) {
51 case PPC_PTRACE_GETREGS: { /* Get GPRs 0 - 31. */
52 int i;
53 unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
54 unsigned int __user *tmp = (unsigned int __user *)addr;
55
56 for (i = 0; i < 32; i++) {
57 ret = put_user(*reg, tmp);
58 if (ret)
59 break;
60 reg++;
61 tmp++;
62 }
63 break;
64 }
65
66 case PPC_PTRACE_SETREGS: { /* Set GPRs 0 - 31. */
67 int i;
68 unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
69 unsigned int __user *tmp = (unsigned int __user *)addr;
70
71 for (i = 0; i < 32; i++) {
72 ret = get_user(*reg, tmp);
73 if (ret)
74 break;
75 reg++;
76 tmp++;
77 }
78 break;
79 }
80
81 }
82 return ret;
83}
84
43long compat_sys_ptrace(int request, int pid, unsigned long addr, 85long compat_sys_ptrace(int request, int pid, unsigned long addr,
44 unsigned long data) 86 unsigned long data)
45{ 87{
@@ -123,7 +165,7 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
123 break; 165 break;
124 166
125 if (index < PT_FPR0) { 167 if (index < PT_FPR0) {
126 tmp = get_reg(child, index); 168 tmp = ptrace_get_reg(child, index);
127 } else { 169 } else {
128 flush_fp_to_thread(child); 170 flush_fp_to_thread(child);
129 /* 171 /*
@@ -162,7 +204,9 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
162 else 204 else
163 part = 0; /* want the 1st half of the register (left-most). */ 205 part = 0; /* want the 1st half of the register (left-most). */
164 206
165 /* Validate the input - check to see if address is on the wrong boundary or beyond the end of the user area */ 207 /* Validate the input - check to see if address is on the wrong boundary
208 * or beyond the end of the user area
209 */
166 if ((addr & 3) || numReg > PT_FPSCR) 210 if ((addr & 3) || numReg > PT_FPSCR)
167 break; 211 break;
168 212
@@ -170,7 +214,7 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
170 flush_fp_to_thread(child); 214 flush_fp_to_thread(child);
171 tmp = ((unsigned long int *)child->thread.fpr)[numReg - PT_FPR0]; 215 tmp = ((unsigned long int *)child->thread.fpr)[numReg - PT_FPR0];
172 } else { /* register within PT_REGS struct */ 216 } else { /* register within PT_REGS struct */
173 tmp = get_reg(child, numReg); 217 tmp = ptrace_get_reg(child, numReg);
174 } 218 }
175 reg32bits = ((u32*)&tmp)[part]; 219 reg32bits = ((u32*)&tmp)[part];
176 ret = put_user(reg32bits, (u32 __user *)data); 220 ret = put_user(reg32bits, (u32 __user *)data);
@@ -226,10 +270,8 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
226 if ((addr & 3) || (index > PT_FPSCR32)) 270 if ((addr & 3) || (index > PT_FPSCR32))
227 break; 271 break;
228 272
229 if (index == PT_ORIG_R3)
230 break;
231 if (index < PT_FPR0) { 273 if (index < PT_FPR0) {
232 ret = put_reg(child, index, data); 274 ret = ptrace_put_reg(child, index, data);
233 } else { 275 } else {
234 flush_fp_to_thread(child); 276 flush_fp_to_thread(child);
235 /* 277 /*
@@ -258,70 +300,25 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
258 /* Determine which register the user wants */ 300 /* Determine which register the user wants */
259 index = (u64)addr >> 2; 301 index = (u64)addr >> 2;
260 numReg = index / 2; 302 numReg = index / 2;
303
261 /* 304 /*
262 * Validate the input - check to see if address is on the 305 * Validate the input - check to see if address is on the
263 * wrong boundary or beyond the end of the user area 306 * wrong boundary or beyond the end of the user area
264 */ 307 */
265 if ((addr & 3) || (numReg > PT_FPSCR)) 308 if ((addr & 3) || (numReg > PT_FPSCR))
266 break; 309 break;
267 /* Insure it is a register we let them change */ 310 if (numReg < PT_FPR0) {
268 if ((numReg == PT_ORIG_R3) 311 unsigned long freg = ptrace_get_reg(child, numReg);
269 || ((numReg > PT_CCR) && (numReg < PT_FPR0))) 312 if (index % 2)
270 break; 313 freg = (freg & ~0xfffffffful) | (data & 0xfffffffful);
271 if (numReg >= PT_FPR0) { 314 else
315 freg = (freg & 0xfffffffful) | (data << 32);
316 ret = ptrace_put_reg(child, numReg, freg);
317 } else {
272 flush_fp_to_thread(child); 318 flush_fp_to_thread(child);
319 ((unsigned int *)child->thread.regs)[index] = data;
320 ret = 0;
273 } 321 }
274 if (numReg == PT_MSR)
275 data = (data & MSR_DEBUGCHANGE)
276 | (child->thread.regs->msr & ~MSR_DEBUGCHANGE);
277 ((u32*)child->thread.regs)[index] = data;
278 ret = 0;
279 break;
280 }
281
282 case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
283 case PTRACE_CONT: { /* restart after signal. */
284 ret = -EIO;
285 if (!valid_signal(data))
286 break;
287 if (request == PTRACE_SYSCALL)
288 set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
289 else
290 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
291 child->exit_code = data;
292 /* make sure the single step bit is not set. */
293 clear_single_step(child);
294 wake_up_process(child);
295 ret = 0;
296 break;
297 }
298
299 /*
300 * make the child exit. Best I can do is send it a sigkill.
301 * perhaps it should be put in the status that it wants to
302 * exit.
303 */
304 case PTRACE_KILL: {
305 ret = 0;
306 if (child->exit_state == EXIT_ZOMBIE) /* already dead */
307 break;
308 child->exit_code = SIGKILL;
309 /* make sure the single step bit is not set. */
310 clear_single_step(child);
311 wake_up_process(child);
312 break;
313 }
314
315 case PTRACE_SINGLESTEP: { /* set the trap flag. */
316 ret = -EIO;
317 if (!valid_signal(data))
318 break;
319 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
320 set_single_step(child);
321 child->exit_code = data;
322 /* give it a chance to run. */
323 wake_up_process(child);
324 ret = 0;
325 break; 322 break;
326 } 323 }
327 324
@@ -334,95 +331,67 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
334 break; 331 break;
335 } 332 }
336 333
337 case PTRACE_SET_DEBUGREG: 334 case PTRACE_GETEVENTMSG:
338 ret = ptrace_set_debugreg(child, addr, data); 335 ret = put_user(child->ptrace_message, (unsigned int __user *) data);
339 break;
340
341 case PTRACE_DETACH:
342 ret = ptrace_detach(child, data);
343 break; 336 break;
344 337
345 case PPC_PTRACE_GETREGS: { /* Get GPRs 0 - 31. */ 338 case PTRACE_GETREGS: { /* Get all pt_regs from the child. */
346 int i; 339 int ui;
347 unsigned long *reg = &((unsigned long *)child->thread.regs)[0]; 340 if (!access_ok(VERIFY_WRITE, (void __user *)data,
348 unsigned int __user *tmp = (unsigned int __user *)addr; 341 PT_REGS_COUNT * sizeof(int))) {
349 342 ret = -EIO;
350 for (i = 0; i < 32; i++) { 343 break;
351 ret = put_user(*reg, tmp);
352 if (ret)
353 break;
354 reg++;
355 tmp++;
356 } 344 }
357 break; 345 ret = 0;
358 } 346 for (ui = 0; ui < PT_REGS_COUNT; ui ++) {
359 347 ret |= __put_user(ptrace_get_reg(child, ui),
360 case PPC_PTRACE_SETREGS: { /* Set GPRs 0 - 31. */ 348 (unsigned int __user *) data);
361 int i; 349 data += sizeof(int);
362 unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
363 unsigned int __user *tmp = (unsigned int __user *)addr;
364
365 for (i = 0; i < 32; i++) {
366 ret = get_user(*reg, tmp);
367 if (ret)
368 break;
369 reg++;
370 tmp++;
371 } 350 }
372 break; 351 break;
373 } 352 }
374 353
375 case PPC_PTRACE_GETFPREGS: { /* Get FPRs 0 - 31. */ 354 case PTRACE_SETREGS: { /* Set all gp regs in the child. */
376 int i; 355 unsigned long tmp;
377 unsigned long *reg = &((unsigned long *)child->thread.fpr)[0]; 356 int ui;
378 unsigned int __user *tmp = (unsigned int __user *)addr; 357 if (!access_ok(VERIFY_READ, (void __user *)data,
379 358 PT_REGS_COUNT * sizeof(int))) {
380 flush_fp_to_thread(child); 359 ret = -EIO;
381 360 break;
382 for (i = 0; i < 32; i++) {
383 ret = put_user(*reg, tmp);
384 if (ret)
385 break;
386 reg++;
387 tmp++;
388 } 361 }
389 break; 362 ret = 0;
390 } 363 for (ui = 0; ui < PT_REGS_COUNT; ui ++) {
391 364 ret = __get_user(tmp, (unsigned int __user *) data);
392 case PPC_PTRACE_SETFPREGS: { /* Get FPRs 0 - 31. */
393 int i;
394 unsigned long *reg = &((unsigned long *)child->thread.fpr)[0];
395 unsigned int __user *tmp = (unsigned int __user *)addr;
396
397 flush_fp_to_thread(child);
398
399 for (i = 0; i < 32; i++) {
400 ret = get_user(*reg, tmp);
401 if (ret) 365 if (ret)
402 break; 366 break;
403 reg++; 367 ptrace_put_reg(child, ui, tmp);
404 tmp++; 368 data += sizeof(int);
405 } 369 }
406 break; 370 break;
407 } 371 }
408 372
409 case PTRACE_GETEVENTMSG: 373 case PTRACE_GETFPREGS:
410 ret = put_user(child->ptrace_message, (unsigned int __user *) data); 374 case PTRACE_SETFPREGS:
411 break;
412
413#ifdef CONFIG_ALTIVEC
414 case PTRACE_GETVRREGS: 375 case PTRACE_GETVRREGS:
415 /* Get the child altivec register state. */ 376 case PTRACE_SETVRREGS:
416 flush_altivec_to_thread(child); 377 case PTRACE_GETREGS64:
417 ret = get_vrregs((unsigned long __user *)data, child); 378 case PTRACE_SETREGS64:
379 case PPC_PTRACE_GETFPREGS:
380 case PPC_PTRACE_SETFPREGS:
381 case PTRACE_KILL:
382 case PTRACE_SINGLESTEP:
383 case PTRACE_DETACH:
384 case PTRACE_SET_DEBUGREG:
385 case PTRACE_SYSCALL:
386 case PTRACE_CONT:
387 ret = arch_ptrace(child, request, addr, data);
418 break; 388 break;
419 389
420 case PTRACE_SETVRREGS: 390 /* Old reverse args ptrace callss */
421 /* Set the child altivec register state. */ 391 case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */
422 flush_altivec_to_thread(child); 392 case PPC_PTRACE_SETREGS: /* Set GPRs 0 - 31. */
423 ret = set_vrregs(child, (unsigned long __user *)data); 393 ret = compat_ptrace_old(child, request, addr, data);
424 break; 394 break;
425#endif
426 395
427 default: 396 default:
428 ret = ptrace_request(child, request, addr, data); 397 ret = ptrace_request(child, request, addr, data);
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c
index f2286822be..a5de6211b9 100644
--- a/arch/powerpc/kernel/rtas_pci.c
+++ b/arch/powerpc/kernel/rtas_pci.c
@@ -278,10 +278,8 @@ void __init find_and_init_phbs(void)
278{ 278{
279 struct device_node *node; 279 struct device_node *node;
280 struct pci_controller *phb; 280 struct pci_controller *phb;
281 unsigned int index;
282 struct device_node *root = of_find_node_by_path("/"); 281 struct device_node *root = of_find_node_by_path("/");
283 282
284 index = 0;
285 for (node = of_get_next_child(root, NULL); 283 for (node = of_get_next_child(root, NULL);
286 node != NULL; 284 node != NULL;
287 node = of_get_next_child(root, node)) { 285 node = of_get_next_child(root, node)) {
@@ -295,8 +293,7 @@ void __init find_and_init_phbs(void)
295 continue; 293 continue;
296 rtas_setup_phb(phb); 294 rtas_setup_phb(phb);
297 pci_process_bridge_OF_ranges(phb, node, 0); 295 pci_process_bridge_OF_ranges(phb, node, 0);
298 pci_setup_phb_io(phb, index == 0); 296 isa_bridge_find_early(phb);
299 index++;
300 } 297 }
301 298
302 of_node_put(root); 299 of_node_put(root);
@@ -335,7 +332,7 @@ int pcibios_remove_root_bus(struct pci_controller *phb)
335 return 1; 332 return 1;
336 } 333 }
337 334
338 rc = unmap_bus_range(b); 335 rc = pcibios_unmap_io_space(b);
339 if (rc) { 336 if (rc) {
340 printk(KERN_ERR "%s: failed to unmap IO on bus %s\n", 337 printk(KERN_ERR "%s: failed to unmap IO on bus %s\n",
341 __FUNCTION__, b->name); 338 __FUNCTION__, b->name);
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index ed07a198f8..4924c48cb1 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -32,6 +32,7 @@
32#include <linux/unistd.h> 32#include <linux/unistd.h>
33#include <linux/serial.h> 33#include <linux/serial.h>
34#include <linux/serial_8250.h> 34#include <linux/serial_8250.h>
35#include <linux/debugfs.h>
35#include <asm/io.h> 36#include <asm/io.h>
36#include <asm/prom.h> 37#include <asm/prom.h>
37#include <asm/processor.h> 38#include <asm/processor.h>
@@ -486,6 +487,14 @@ int check_legacy_ioport(unsigned long base_port)
486 487
487 switch(base_port) { 488 switch(base_port) {
488 case I8042_DATA_REG: 489 case I8042_DATA_REG:
490 if (!(np = of_find_compatible_node(NULL, NULL, "pnpPNP,303")))
491 np = of_find_compatible_node(NULL, NULL, "pnpPNP,f03");
492 if (np) {
493 parent = of_get_parent(np);
494 of_node_put(np);
495 np = parent;
496 break;
497 }
489 np = of_find_node_by_type(NULL, "8042"); 498 np = of_find_node_by_type(NULL, "8042");
490 break; 499 break;
491 case FDC_BASE: /* FDC1 */ 500 case FDC_BASE: /* FDC1 */
@@ -571,3 +580,15 @@ static int __init check_cache_coherency(void)
571 580
572late_initcall(check_cache_coherency); 581late_initcall(check_cache_coherency);
573#endif /* CONFIG_CHECK_CACHE_COHERENCY */ 582#endif /* CONFIG_CHECK_CACHE_COHERENCY */
583
584#ifdef CONFIG_DEBUG_FS
585struct dentry *powerpc_debugfs_root;
586
587static int powerpc_debugfs_init(void)
588{
589 powerpc_debugfs_root = debugfs_create_dir("powerpc", NULL);
590
591 return powerpc_debugfs_root == NULL;
592}
593arch_initcall(powerpc_debugfs_init);
594#endif
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 35f8f443c1..7ec6ba56d8 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -262,13 +262,11 @@ void __init setup_arch(char **cmdline_p)
262 * Systems with OF can look in the properties on the cpu node(s) 262 * Systems with OF can look in the properties on the cpu node(s)
263 * for a possibly more accurate value. 263 * for a possibly more accurate value.
264 */ 264 */
265 if (cpu_has_feature(CPU_FTR_SPLIT_ID_CACHE)) { 265 dcache_bsize = cur_cpu_spec->dcache_bsize;
266 dcache_bsize = cur_cpu_spec->dcache_bsize; 266 icache_bsize = cur_cpu_spec->icache_bsize;
267 icache_bsize = cur_cpu_spec->icache_bsize; 267 ucache_bsize = 0;
268 ucache_bsize = 0; 268 if (cpu_has_feature(CPU_FTR_UNIFIED_ID_CACHE))
269 } else 269 ucache_bsize = icache_bsize = dcache_bsize;
270 ucache_bsize = dcache_bsize = icache_bsize
271 = cur_cpu_spec->dcache_bsize;
272 270
273 /* reboot on panic */ 271 /* reboot on panic */
274 panic_timeout = 180; 272 panic_timeout = 180;
diff --git a/arch/powerpc/kernel/signal.c b/arch/powerpc/kernel/signal.c
new file mode 100644
index 0000000000..c434d6c4e4
--- /dev/null
+++ b/arch/powerpc/kernel/signal.c
@@ -0,0 +1,180 @@
1/*
2 * Common signal handling code for both 32 and 64 bits
3 *
4 * Copyright (c) 2007 Benjamin Herrenschmidt, IBM Coproration
5 * Extracted from signal_32.c and signal_64.c
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file README.legal in the main directory of
9 * this archive for more details.
10 */
11
12#include <linux/ptrace.h>
13#include <linux/signal.h>
14#include <asm/uaccess.h>
15#include <asm/unistd.h>
16
17#include "signal.h"
18
19/*
20 * Allocate space for the signal frame
21 */
22void __user * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
23 size_t frame_size)
24{
25 unsigned long oldsp, newsp;
26
27 /* Default to using normal stack */
28 oldsp = regs->gpr[1];
29
30 /* Check for alt stack */
31 if ((ka->sa.sa_flags & SA_ONSTACK) &&
32 current->sas_ss_size && !on_sig_stack(oldsp))
33 oldsp = (current->sas_ss_sp + current->sas_ss_size);
34
35 /* Get aligned frame */
36 newsp = (oldsp - frame_size) & ~0xFUL;
37
38 /* Check access */
39 if (!access_ok(VERIFY_WRITE, (void __user *)newsp, oldsp - newsp))
40 return NULL;
41
42 return (void __user *)newsp;
43}
44
45
46/*
47 * Restore the user process's signal mask
48 */
49void restore_sigmask(sigset_t *set)
50{
51 sigdelsetmask(set, ~_BLOCKABLE);
52 spin_lock_irq(&current->sighand->siglock);
53 current->blocked = *set;
54 recalc_sigpending();
55 spin_unlock_irq(&current->sighand->siglock);
56}
57
58static void check_syscall_restart(struct pt_regs *regs, struct k_sigaction *ka,
59 int has_handler)
60{
61 unsigned long ret = regs->gpr[3];
62 int restart = 1;
63
64 /* syscall ? */
65 if (TRAP(regs) != 0x0C00)
66 return;
67
68 /* error signalled ? */
69 if (!(regs->ccr & 0x10000000))
70 return;
71
72 switch (ret) {
73 case ERESTART_RESTARTBLOCK:
74 case ERESTARTNOHAND:
75 /* ERESTARTNOHAND means that the syscall should only be
76 * restarted if there was no handler for the signal, and since
77 * we only get here if there is a handler, we dont restart.
78 */
79 restart = !has_handler;
80 break;
81 case ERESTARTSYS:
82 /* ERESTARTSYS means to restart the syscall if there is no
83 * handler or the handler was registered with SA_RESTART
84 */
85 restart = !has_handler || (ka->sa.sa_flags & SA_RESTART) != 0;
86 break;
87 case ERESTARTNOINTR:
88 /* ERESTARTNOINTR means that the syscall should be
89 * called again after the signal handler returns.
90 */
91 break;
92 default:
93 return;
94 }
95 if (restart) {
96 if (ret == ERESTART_RESTARTBLOCK)
97 regs->gpr[0] = __NR_restart_syscall;
98 else
99 regs->gpr[3] = regs->orig_gpr3;
100 regs->nip -= 4;
101 regs->result = 0;
102 } else {
103 regs->result = -EINTR;
104 regs->gpr[3] = EINTR;
105 regs->ccr |= 0x10000000;
106 }
107}
108
109int do_signal(sigset_t *oldset, struct pt_regs *regs)
110{
111 siginfo_t info;
112 int signr;
113 struct k_sigaction ka;
114 int ret;
115 int is32 = is_32bit_task();
116
117 if (test_thread_flag(TIF_RESTORE_SIGMASK))
118 oldset = &current->saved_sigmask;
119 else if (!oldset)
120 oldset = &current->blocked;
121
122 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
123
124 /* Is there any syscall restart business here ? */
125 check_syscall_restart(regs, &ka, signr > 0);
126
127 if (signr <= 0) {
128 /* No signal to deliver -- put the saved sigmask back */
129 if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
130 clear_thread_flag(TIF_RESTORE_SIGMASK);
131 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
132 }
133 return 0; /* no signals delivered */
134 }
135
136 /*
137 * Reenable the DABR before delivering the signal to
138 * user space. The DABR will have been cleared if it
139 * triggered inside the kernel.
140 */
141 if (current->thread.dabr)
142 set_dabr(current->thread.dabr);
143
144 if (is32) {
145 if (ka.sa.sa_flags & SA_SIGINFO)
146 ret = handle_rt_signal32(signr, &ka, &info, oldset,
147 regs);
148 else
149 ret = handle_signal32(signr, &ka, &info, oldset,
150 regs);
151 } else {
152 ret = handle_rt_signal64(signr, &ka, &info, oldset, regs);
153 }
154
155 if (ret) {
156 spin_lock_irq(&current->sighand->siglock);
157 sigorsets(&current->blocked, &current->blocked,
158 &ka.sa.sa_mask);
159 if (!(ka.sa.sa_flags & SA_NODEFER))
160 sigaddset(&current->blocked, signr);
161 recalc_sigpending();
162 spin_unlock_irq(&current->sighand->siglock);
163
164 /*
165 * A signal was successfully delivered; the saved sigmask is in
166 * its frame, and we can clear the TIF_RESTORE_SIGMASK flag.
167 */
168 if (test_thread_flag(TIF_RESTORE_SIGMASK))
169 clear_thread_flag(TIF_RESTORE_SIGMASK);
170 }
171
172 return ret;
173}
174
175long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
176 unsigned long r5, unsigned long r6, unsigned long r7,
177 unsigned long r8, struct pt_regs *regs)
178{
179 return do_sigaltstack(uss, uoss, regs->gpr[1]);
180}
diff --git a/arch/powerpc/kernel/signal.h b/arch/powerpc/kernel/signal.h
new file mode 100644
index 0000000000..77efb3d546
--- /dev/null
+++ b/arch/powerpc/kernel/signal.h
@@ -0,0 +1,55 @@
1/*
2 * Copyright (c) 2007 Benjamin Herrenschmidt, IBM Coproration
3 * Extracted from signal_32.c and signal_64.c
4 *
5 * This file is subject to the terms and conditions of the GNU General
6 * Public License. See the file README.legal in the main directory of
7 * this archive for more details.
8 */
9
10#ifndef _POWERPC_ARCH_SIGNAL_H
11#define _POWERPC_ARCH_SIGNAL_H
12
13#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
14
15extern void __user * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
16 size_t frame_size);
17extern void restore_sigmask(sigset_t *set);
18
19extern int handle_signal32(unsigned long sig, struct k_sigaction *ka,
20 siginfo_t *info, sigset_t *oldset,
21 struct pt_regs *regs);
22
23extern int handle_rt_signal32(unsigned long sig, struct k_sigaction *ka,
24 siginfo_t *info, sigset_t *oldset,
25 struct pt_regs *regs);
26
27
28#ifdef CONFIG_PPC64
29
30static inline int is_32bit_task(void)
31{
32 return test_thread_flag(TIF_32BIT);
33}
34
35extern int handle_rt_signal64(int signr, struct k_sigaction *ka,
36 siginfo_t *info, sigset_t *set,
37 struct pt_regs *regs);
38
39#else /* CONFIG_PPC64 */
40
41static inline int is_32bit_task(void)
42{
43 return 1;
44}
45
46static inline int handle_rt_signal64(int signr, struct k_sigaction *ka,
47 siginfo_t *info, sigset_t *set,
48 struct pt_regs *regs)
49{
50 return -EFAULT;
51}
52
53#endif /* !defined(CONFIG_PPC64) */
54
55#endif /* _POWERPC_ARCH_SIGNAL_H */
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index dd1dca5bfa..590057e9e9 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -51,12 +51,11 @@
51#include <asm/pgtable.h> 51#include <asm/pgtable.h>
52#endif 52#endif
53 53
54#undef DEBUG_SIG 54#include "signal.h"
55 55
56#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) 56#undef DEBUG_SIG
57 57
58#ifdef CONFIG_PPC64 58#ifdef CONFIG_PPC64
59#define do_signal do_signal32
60#define sys_sigsuspend compat_sys_sigsuspend 59#define sys_sigsuspend compat_sys_sigsuspend
61#define sys_rt_sigsuspend compat_sys_rt_sigsuspend 60#define sys_rt_sigsuspend compat_sys_rt_sigsuspend
62#define sys_rt_sigreturn compat_sys_rt_sigreturn 61#define sys_rt_sigreturn compat_sys_rt_sigreturn
@@ -231,8 +230,6 @@ static inline int restore_general_regs(struct pt_regs *regs,
231 230
232#endif /* CONFIG_PPC64 */ 231#endif /* CONFIG_PPC64 */
233 232
234int do_signal(sigset_t *oldset, struct pt_regs *regs);
235
236/* 233/*
237 * Atomically swap in the new signal mask, and wait for a signal. 234 * Atomically swap in the new signal mask, and wait for a signal.
238 */ 235 */
@@ -251,14 +248,6 @@ long sys_sigsuspend(old_sigset_t mask)
251 return -ERESTARTNOHAND; 248 return -ERESTARTNOHAND;
252} 249}
253 250
254#ifdef CONFIG_PPC32
255long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, int r5,
256 int r6, int r7, int r8, struct pt_regs *regs)
257{
258 return do_sigaltstack(uss, uoss, regs->gpr[1]);
259}
260#endif
261
262long sys_sigaction(int sig, struct old_sigaction __user *act, 251long sys_sigaction(int sig, struct old_sigaction __user *act,
263 struct old_sigaction __user *oact) 252 struct old_sigaction __user *oact)
264{ 253{
@@ -293,14 +282,17 @@ long sys_sigaction(int sig, struct old_sigaction __user *act,
293/* 282/*
294 * When we have signals to deliver, we set up on the 283 * When we have signals to deliver, we set up on the
295 * user stack, going down from the original stack pointer: 284 * user stack, going down from the original stack pointer:
296 * a sigregs struct 285 * an ABI gap of 56 words
286 * an mcontext struct
297 * a sigcontext struct 287 * a sigcontext struct
298 * a gap of __SIGNAL_FRAMESIZE bytes 288 * a gap of __SIGNAL_FRAMESIZE bytes
299 * 289 *
300 * Each of these things must be a multiple of 16 bytes in size. 290 * Each of these things must be a multiple of 16 bytes in size. The following
291 * structure represent all of this except the __SIGNAL_FRAMESIZE gap
301 * 292 *
302 */ 293 */
303struct sigregs { 294struct sigframe {
295 struct sigcontext sctx; /* the sigcontext */
304 struct mcontext mctx; /* all the register values */ 296 struct mcontext mctx; /* all the register values */
305 /* 297 /*
306 * Programs using the rs6000/xcoff abi can save up to 19 gp 298 * Programs using the rs6000/xcoff abi can save up to 19 gp
@@ -703,44 +695,22 @@ int compat_sys_sigaltstack(u32 __new, u32 __old, int r5,
703} 695}
704#endif /* CONFIG_PPC64 */ 696#endif /* CONFIG_PPC64 */
705 697
706
707/*
708 * Restore the user process's signal mask
709 */
710#ifdef CONFIG_PPC64
711extern void restore_sigmask(sigset_t *set);
712#else /* CONFIG_PPC64 */
713static void restore_sigmask(sigset_t *set)
714{
715 sigdelsetmask(set, ~_BLOCKABLE);
716 spin_lock_irq(&current->sighand->siglock);
717 current->blocked = *set;
718 recalc_sigpending();
719 spin_unlock_irq(&current->sighand->siglock);
720}
721#endif
722
723/* 698/*
724 * Set up a signal frame for a "real-time" signal handler 699 * Set up a signal frame for a "real-time" signal handler
725 * (one which gets siginfo). 700 * (one which gets siginfo).
726 */ 701 */
727static int handle_rt_signal(unsigned long sig, struct k_sigaction *ka, 702int handle_rt_signal32(unsigned long sig, struct k_sigaction *ka,
728 siginfo_t *info, sigset_t *oldset, 703 siginfo_t *info, sigset_t *oldset,
729 struct pt_regs *regs, unsigned long newsp) 704 struct pt_regs *regs)
730{ 705{
731 struct rt_sigframe __user *rt_sf; 706 struct rt_sigframe __user *rt_sf;
732 struct mcontext __user *frame; 707 struct mcontext __user *frame;
733 unsigned long origsp = newsp; 708 unsigned long newsp = 0;
734 709
735 /* Set up Signal Frame */ 710 /* Set up Signal Frame */
736 /* Put a Real Time Context onto stack */ 711 /* Put a Real Time Context onto stack */
737 newsp -= sizeof(*rt_sf); 712 rt_sf = get_sigframe(ka, regs, sizeof(*rt_sf));
738 rt_sf = (struct rt_sigframe __user *)newsp; 713 if (unlikely(rt_sf == NULL))
739
740 /* create a stack frame for the caller of the handler */
741 newsp -= __SIGNAL_FRAMESIZE + 16;
742
743 if (!access_ok(VERIFY_WRITE, (void __user *)newsp, origsp - newsp))
744 goto badframe; 714 goto badframe;
745 715
746 /* Put the siginfo & fill in most of the ucontext */ 716 /* Put the siginfo & fill in most of the ucontext */
@@ -770,8 +740,12 @@ static int handle_rt_signal(unsigned long sig, struct k_sigaction *ka,
770 740
771 current->thread.fpscr.val = 0; /* turn off all fp exceptions */ 741 current->thread.fpscr.val = 0; /* turn off all fp exceptions */
772 742
743 /* create a stack frame for the caller of the handler */
744 newsp = ((unsigned long)rt_sf) - (__SIGNAL_FRAMESIZE + 16);
773 if (put_user(regs->gpr[1], (u32 __user *)newsp)) 745 if (put_user(regs->gpr[1], (u32 __user *)newsp))
774 goto badframe; 746 goto badframe;
747
748 /* Fill registers for signal handler */
775 regs->gpr[1] = newsp; 749 regs->gpr[1] = newsp;
776 regs->gpr[3] = sig; 750 regs->gpr[3] = sig;
777 regs->gpr[4] = (unsigned long) &rt_sf->info; 751 regs->gpr[4] = (unsigned long) &rt_sf->info;
@@ -1015,27 +989,18 @@ int sys_debug_setcontext(struct ucontext __user *ctx,
1015/* 989/*
1016 * OK, we're invoking a handler 990 * OK, we're invoking a handler
1017 */ 991 */
1018static int handle_signal(unsigned long sig, struct k_sigaction *ka, 992int handle_signal32(unsigned long sig, struct k_sigaction *ka,
1019 siginfo_t *info, sigset_t *oldset, struct pt_regs *regs, 993 siginfo_t *info, sigset_t *oldset, struct pt_regs *regs)
1020 unsigned long newsp)
1021{ 994{
1022 struct sigcontext __user *sc; 995 struct sigcontext __user *sc;
1023 struct sigregs __user *frame; 996 struct sigframe __user *frame;
1024 unsigned long origsp = newsp; 997 unsigned long newsp = 0;
1025 998
1026 /* Set up Signal Frame */ 999 /* Set up Signal Frame */
1027 newsp -= sizeof(struct sigregs); 1000 frame = get_sigframe(ka, regs, sizeof(*frame));
1028 frame = (struct sigregs __user *) newsp; 1001 if (unlikely(frame == NULL))
1029
1030 /* Put a sigcontext on the stack */
1031 newsp -= sizeof(*sc);
1032 sc = (struct sigcontext __user *) newsp;
1033
1034 /* create a stack frame for the caller of the handler */
1035 newsp -= __SIGNAL_FRAMESIZE;
1036
1037 if (!access_ok(VERIFY_WRITE, (void __user *) newsp, origsp - newsp))
1038 goto badframe; 1002 goto badframe;
1003 sc = (struct sigcontext __user *) &frame->sctx;
1039 1004
1040#if _NSIG != 64 1005#if _NSIG != 64
1041#error "Please adjust handle_signal()" 1006#error "Please adjust handle_signal()"
@@ -1047,7 +1012,7 @@ static int handle_signal(unsigned long sig, struct k_sigaction *ka,
1047#else 1012#else
1048 || __put_user(oldset->sig[1], &sc->_unused[3]) 1013 || __put_user(oldset->sig[1], &sc->_unused[3])
1049#endif 1014#endif
1050 || __put_user(to_user_ptr(frame), &sc->regs) 1015 || __put_user(to_user_ptr(&frame->mctx), &sc->regs)
1051 || __put_user(sig, &sc->signal)) 1016 || __put_user(sig, &sc->signal))
1052 goto badframe; 1017 goto badframe;
1053 1018
@@ -1063,8 +1028,11 @@ static int handle_signal(unsigned long sig, struct k_sigaction *ka,
1063 1028
1064 current->thread.fpscr.val = 0; /* turn off all fp exceptions */ 1029 current->thread.fpscr.val = 0; /* turn off all fp exceptions */
1065 1030
1031 /* create a stack frame for the caller of the handler */
1032 newsp = ((unsigned long)frame) - __SIGNAL_FRAMESIZE;
1066 if (put_user(regs->gpr[1], (u32 __user *)newsp)) 1033 if (put_user(regs->gpr[1], (u32 __user *)newsp))
1067 goto badframe; 1034 goto badframe;
1035
1068 regs->gpr[1] = newsp; 1036 regs->gpr[1] = newsp;
1069 regs->gpr[3] = sig; 1037 regs->gpr[3] = sig;
1070 regs->gpr[4] = (unsigned long) sc; 1038 regs->gpr[4] = (unsigned long) sc;
@@ -1126,106 +1094,3 @@ badframe:
1126 force_sig(SIGSEGV, current); 1094 force_sig(SIGSEGV, current);
1127 return 0; 1095 return 0;
1128} 1096}
1129
1130/*
1131 * Note that 'init' is a special process: it doesn't get signals it doesn't
1132 * want to handle. Thus you cannot kill init even with a SIGKILL even by
1133 * mistake.
1134 */
1135int do_signal(sigset_t *oldset, struct pt_regs *regs)
1136{
1137 siginfo_t info;
1138 struct k_sigaction ka;
1139 unsigned int newsp;
1140 int signr, ret;
1141
1142#ifdef CONFIG_PPC32
1143 if (try_to_freeze()) {
1144 signr = 0;
1145 if (!signal_pending(current))
1146 goto no_signal;
1147 }
1148#endif
1149
1150 if (test_thread_flag(TIF_RESTORE_SIGMASK))
1151 oldset = &current->saved_sigmask;
1152 else if (!oldset)
1153 oldset = &current->blocked;
1154
1155 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
1156#ifdef CONFIG_PPC32
1157no_signal:
1158#endif
1159 if (TRAP(regs) == 0x0C00 /* System Call! */
1160 && regs->ccr & 0x10000000 /* error signalled */
1161 && ((ret = regs->gpr[3]) == ERESTARTSYS
1162 || ret == ERESTARTNOHAND || ret == ERESTARTNOINTR
1163 || ret == ERESTART_RESTARTBLOCK)) {
1164
1165 if (signr > 0
1166 && (ret == ERESTARTNOHAND || ret == ERESTART_RESTARTBLOCK
1167 || (ret == ERESTARTSYS
1168 && !(ka.sa.sa_flags & SA_RESTART)))) {
1169 /* make the system call return an EINTR error */
1170 regs->result = -EINTR;
1171 regs->gpr[3] = EINTR;
1172 /* note that the cr0.SO bit is already set */
1173 } else {
1174 regs->nip -= 4; /* Back up & retry system call */
1175 regs->result = 0;
1176 regs->trap = 0;
1177 if (ret == ERESTART_RESTARTBLOCK)
1178 regs->gpr[0] = __NR_restart_syscall;
1179 else
1180 regs->gpr[3] = regs->orig_gpr3;
1181 }
1182 }
1183
1184 if (signr == 0) {
1185 /* No signal to deliver -- put the saved sigmask back */
1186 if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
1187 clear_thread_flag(TIF_RESTORE_SIGMASK);
1188 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
1189 }
1190 return 0; /* no signals delivered */
1191 }
1192
1193 if ((ka.sa.sa_flags & SA_ONSTACK) && current->sas_ss_size
1194 && !on_sig_stack(regs->gpr[1]))
1195 newsp = current->sas_ss_sp + current->sas_ss_size;
1196 else
1197 newsp = regs->gpr[1];
1198 newsp &= ~0xfUL;
1199
1200#ifdef CONFIG_PPC64
1201 /*
1202 * Reenable the DABR before delivering the signal to
1203 * user space. The DABR will have been cleared if it
1204 * triggered inside the kernel.
1205 */
1206 if (current->thread.dabr)
1207 set_dabr(current->thread.dabr);
1208#endif
1209
1210 /* Whee! Actually deliver the signal. */
1211 if (ka.sa.sa_flags & SA_SIGINFO)
1212 ret = handle_rt_signal(signr, &ka, &info, oldset, regs, newsp);
1213 else
1214 ret = handle_signal(signr, &ka, &info, oldset, regs, newsp);
1215
1216 if (ret) {
1217 spin_lock_irq(&current->sighand->siglock);
1218 sigorsets(&current->blocked, &current->blocked,
1219 &ka.sa.sa_mask);
1220 if (!(ka.sa.sa_flags & SA_NODEFER))
1221 sigaddset(&current->blocked, signr);
1222 recalc_sigpending();
1223 spin_unlock_irq(&current->sighand->siglock);
1224 /* A signal was successfully delivered; the saved sigmask is in
1225 its frame, and we can clear the TIF_RESTORE_SIGMASK flag */
1226 if (test_thread_flag(TIF_RESTORE_SIGMASK))
1227 clear_thread_flag(TIF_RESTORE_SIGMASK);
1228 }
1229
1230 return ret;
1231}
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index 1ce0ae3f6f..de895e6d8c 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -34,9 +34,9 @@
34#include <asm/syscalls.h> 34#include <asm/syscalls.h>
35#include <asm/vdso.h> 35#include <asm/vdso.h>
36 36
37#define DEBUG_SIG 0 37#include "signal.h"
38 38
39#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) 39#define DEBUG_SIG 0
40 40
41#define GP_REGS_SIZE min(sizeof(elf_gregset_t), sizeof(struct pt_regs)) 41#define GP_REGS_SIZE min(sizeof(elf_gregset_t), sizeof(struct pt_regs))
42#define FP_REGS_SIZE sizeof(elf_fpregset_t) 42#define FP_REGS_SIZE sizeof(elf_fpregset_t)
@@ -64,14 +64,6 @@ struct rt_sigframe {
64 char abigap[288]; 64 char abigap[288];
65} __attribute__ ((aligned (16))); 65} __attribute__ ((aligned (16)));
66 66
67long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, unsigned long r5,
68 unsigned long r6, unsigned long r7, unsigned long r8,
69 struct pt_regs *regs)
70{
71 return do_sigaltstack(uss, uoss, regs->gpr[1]);
72}
73
74
75/* 67/*
76 * Set up the sigcontext for the signal frame. 68 * Set up the sigcontext for the signal frame.
77 */ 69 */
@@ -176,6 +168,13 @@ static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig,
176 */ 168 */
177 discard_lazy_cpu_state(); 169 discard_lazy_cpu_state();
178 170
171 /*
172 * Force reload of FP/VEC.
173 * This has to be done before copying stuff into current->thread.fpr/vr
174 * for the reasons explained in the previous comment.
175 */
176 regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1 | MSR_VEC);
177
179 err |= __copy_from_user(&current->thread.fpr, &sc->fp_regs, FP_REGS_SIZE); 178 err |= __copy_from_user(&current->thread.fpr, &sc->fp_regs, FP_REGS_SIZE);
180 179
181#ifdef CONFIG_ALTIVEC 180#ifdef CONFIG_ALTIVEC
@@ -197,32 +196,10 @@ static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig,
197 current->thread.vrsave = 0; 196 current->thread.vrsave = 0;
198#endif /* CONFIG_ALTIVEC */ 197#endif /* CONFIG_ALTIVEC */
199 198
200 /* Force reload of FP/VEC */
201 regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1 | MSR_VEC);
202
203 return err; 199 return err;
204} 200}
205 201
206/* 202/*
207 * Allocate space for the signal frame
208 */
209static inline void __user * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
210 size_t frame_size)
211{
212 unsigned long newsp;
213
214 /* Default to using normal stack */
215 newsp = regs->gpr[1];
216
217 if ((ka->sa.sa_flags & SA_ONSTACK) && current->sas_ss_size) {
218 if (! on_sig_stack(regs->gpr[1]))
219 newsp = (current->sas_ss_sp + current->sas_ss_size);
220 }
221
222 return (void __user *)((newsp - frame_size) & -16ul);
223}
224
225/*
226 * Setup the trampoline code on the stack 203 * Setup the trampoline code on the stack
227 */ 204 */
228static long setup_trampoline(unsigned int syscall, unsigned int __user *tramp) 205static long setup_trampoline(unsigned int syscall, unsigned int __user *tramp)
@@ -249,19 +226,6 @@ static long setup_trampoline(unsigned int syscall, unsigned int __user *tramp)
249} 226}
250 227
251/* 228/*
252 * Restore the user process's signal mask (also used by signal32.c)
253 */
254void restore_sigmask(sigset_t *set)
255{
256 sigdelsetmask(set, ~_BLOCKABLE);
257 spin_lock_irq(&current->sighand->siglock);
258 current->blocked = *set;
259 recalc_sigpending();
260 spin_unlock_irq(&current->sighand->siglock);
261}
262
263
264/*
265 * Handle {get,set,swap}_context operations 229 * Handle {get,set,swap}_context operations
266 */ 230 */
267int sys_swapcontext(struct ucontext __user *old_ctx, 231int sys_swapcontext(struct ucontext __user *old_ctx,
@@ -355,7 +319,7 @@ badframe:
355 return 0; 319 return 0;
356} 320}
357 321
358static int setup_rt_frame(int signr, struct k_sigaction *ka, siginfo_t *info, 322int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info,
359 sigset_t *set, struct pt_regs *regs) 323 sigset_t *set, struct pt_regs *regs)
360{ 324{
361 /* Handler is *really* a pointer to the function descriptor for 325 /* Handler is *really* a pointer to the function descriptor for
@@ -369,8 +333,7 @@ static int setup_rt_frame(int signr, struct k_sigaction *ka, siginfo_t *info,
369 long err = 0; 333 long err = 0;
370 334
371 frame = get_sigframe(ka, regs, sizeof(*frame)); 335 frame = get_sigframe(ka, regs, sizeof(*frame));
372 336 if (unlikely(frame == NULL))
373 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
374 goto badframe; 337 goto badframe;
375 338
376 err |= __put_user(&frame->info, &frame->pinfo); 339 err |= __put_user(&frame->info, &frame->pinfo);
@@ -407,7 +370,7 @@ static int setup_rt_frame(int signr, struct k_sigaction *ka, siginfo_t *info,
407 funct_desc_ptr = (func_descr_t __user *) ka->sa.sa_handler; 370 funct_desc_ptr = (func_descr_t __user *) ka->sa.sa_handler;
408 371
409 /* Allocate a dummy caller frame for the signal handler. */ 372 /* Allocate a dummy caller frame for the signal handler. */
410 newsp = (unsigned long)frame - __SIGNAL_FRAMESIZE; 373 newsp = ((unsigned long)frame) - __SIGNAL_FRAMESIZE;
411 err |= put_user(regs->gpr[1], (unsigned long __user *)newsp); 374 err |= put_user(regs->gpr[1], (unsigned long __user *)newsp);
412 375
413 /* Set up "regs" so we "return" to the signal handler. */ 376 /* Set up "regs" so we "return" to the signal handler. */
@@ -438,134 +401,3 @@ badframe:
438 force_sigsegv(signr, current); 401 force_sigsegv(signr, current);
439 return 0; 402 return 0;
440} 403}
441
442
443/*
444 * OK, we're invoking a handler
445 */
446static int handle_signal(unsigned long sig, struct k_sigaction *ka,
447 siginfo_t *info, sigset_t *oldset, struct pt_regs *regs)
448{
449 int ret;
450
451 /* Set up Signal Frame */
452 ret = setup_rt_frame(sig, ka, info, oldset, regs);
453
454 if (ret) {
455 spin_lock_irq(&current->sighand->siglock);
456 sigorsets(&current->blocked, &current->blocked, &ka->sa.sa_mask);
457 if (!(ka->sa.sa_flags & SA_NODEFER))
458 sigaddset(&current->blocked,sig);
459 recalc_sigpending();
460 spin_unlock_irq(&current->sighand->siglock);
461 }
462
463 return ret;
464}
465
466static inline void syscall_restart(struct pt_regs *regs, struct k_sigaction *ka)
467{
468 switch ((int)regs->result) {
469 case -ERESTART_RESTARTBLOCK:
470 case -ERESTARTNOHAND:
471 /* ERESTARTNOHAND means that the syscall should only be
472 * restarted if there was no handler for the signal, and since
473 * we only get here if there is a handler, we dont restart.
474 */
475 regs->result = -EINTR;
476 regs->gpr[3] = EINTR;
477 regs->ccr |= 0x10000000;
478 break;
479 case -ERESTARTSYS:
480 /* ERESTARTSYS means to restart the syscall if there is no
481 * handler or the handler was registered with SA_RESTART
482 */
483 if (!(ka->sa.sa_flags & SA_RESTART)) {
484 regs->result = -EINTR;
485 regs->gpr[3] = EINTR;
486 regs->ccr |= 0x10000000;
487 break;
488 }
489 /* fallthrough */
490 case -ERESTARTNOINTR:
491 /* ERESTARTNOINTR means that the syscall should be
492 * called again after the signal handler returns.
493 */
494 regs->gpr[3] = regs->orig_gpr3;
495 regs->nip -= 4;
496 regs->result = 0;
497 break;
498 }
499}
500
501/*
502 * Note that 'init' is a special process: it doesn't get signals it doesn't
503 * want to handle. Thus you cannot kill init even with a SIGKILL even by
504 * mistake.
505 */
506int do_signal(sigset_t *oldset, struct pt_regs *regs)
507{
508 siginfo_t info;
509 int signr;
510 struct k_sigaction ka;
511
512 /*
513 * If the current thread is 32 bit - invoke the
514 * 32 bit signal handling code
515 */
516 if (test_thread_flag(TIF_32BIT))
517 return do_signal32(oldset, regs);
518
519 if (test_thread_flag(TIF_RESTORE_SIGMASK))
520 oldset = &current->saved_sigmask;
521 else if (!oldset)
522 oldset = &current->blocked;
523
524 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
525 if (signr > 0) {
526 int ret;
527
528 /* Whee! Actually deliver the signal. */
529 if (TRAP(regs) == 0x0C00)
530 syscall_restart(regs, &ka);
531
532 /*
533 * Reenable the DABR before delivering the signal to
534 * user space. The DABR will have been cleared if it
535 * triggered inside the kernel.
536 */
537 if (current->thread.dabr)
538 set_dabr(current->thread.dabr);
539
540 ret = handle_signal(signr, &ka, &info, oldset, regs);
541
542 /* If a signal was successfully delivered, the saved sigmask is in
543 its frame, and we can clear the TIF_RESTORE_SIGMASK flag */
544 if (ret && test_thread_flag(TIF_RESTORE_SIGMASK))
545 clear_thread_flag(TIF_RESTORE_SIGMASK);
546
547 return ret;
548 }
549
550 if (TRAP(regs) == 0x0C00) { /* System Call! */
551 if ((int)regs->result == -ERESTARTNOHAND ||
552 (int)regs->result == -ERESTARTSYS ||
553 (int)regs->result == -ERESTARTNOINTR) {
554 regs->gpr[3] = regs->orig_gpr3;
555 regs->nip -= 4; /* Back up & retry system call */
556 regs->result = 0;
557 } else if ((int)regs->result == -ERESTART_RESTARTBLOCK) {
558 regs->gpr[0] = __NR_restart_syscall;
559 regs->nip -= 4;
560 regs->result = 0;
561 }
562 }
563 /* No signal to deliver -- put the saved sigmask back */
564 if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
565 clear_thread_flag(TIF_RESTORE_SIGMASK);
566 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
567 }
568
569 return 0;
570}
571EXPORT_SYMBOL(do_signal);
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index 047246ad4f..bd85b5fd08 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -773,6 +773,13 @@ asmlinkage int compat_sys_truncate64(const char __user * path, u32 reg4,
773 return sys_truncate(path, (high << 32) | low); 773 return sys_truncate(path, (high << 32) | low);
774} 774}
775 775
776asmlinkage long compat_sys_fallocate(int fd, int mode, u32 offhi, u32 offlo,
777 u32 lenhi, u32 lenlo)
778{
779 return sys_fallocate(fd, mode, ((loff_t)offhi << 32) | offlo,
780 ((loff_t)lenhi << 32) | lenlo);
781}
782
776asmlinkage int compat_sys_ftruncate64(unsigned int fd, u32 reg4, unsigned long high, 783asmlinkage int compat_sys_ftruncate64(unsigned int fd, u32 reg4, unsigned long high,
777 unsigned long low) 784 unsigned long low)
778{ 785{
@@ -810,3 +817,12 @@ asmlinkage long compat_sys_request_key(const char __user *_type,
810 return sys_request_key(_type, _description, _callout_info, destringid); 817 return sys_request_key(_type, _description, _callout_info, destringid);
811} 818}
812 819
820asmlinkage long compat_sys_sync_file_range2(int fd, unsigned int flags,
821 unsigned offset_hi, unsigned offset_lo,
822 unsigned nbytes_hi, unsigned nbytes_lo)
823{
824 loff_t offset = ((loff_t)offset_hi << 32) | offset_lo;
825 loff_t nbytes = ((loff_t)nbytes_hi << 32) | nbytes_lo;
826
827 return sys_sync_file_range(fd, offset, nbytes, flags);
828}
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index 68991c2d4a..55d29ed4b7 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -442,12 +442,14 @@ int sysfs_add_device_to_node(struct sys_device *dev, int nid)
442 return sysfs_create_link(&node->sysdev.kobj, &dev->kobj, 442 return sysfs_create_link(&node->sysdev.kobj, &dev->kobj,
443 kobject_name(&dev->kobj)); 443 kobject_name(&dev->kobj));
444} 444}
445EXPORT_SYMBOL_GPL(sysfs_add_device_to_node);
445 446
446void sysfs_remove_device_from_node(struct sys_device *dev, int nid) 447void sysfs_remove_device_from_node(struct sys_device *dev, int nid)
447{ 448{
448 struct node *node = &node_devices[nid]; 449 struct node *node = &node_devices[nid];
449 sysfs_remove_link(&node->sysdev.kobj, kobject_name(&dev->kobj)); 450 sysfs_remove_link(&node->sysdev.kobj, kobject_name(&dev->kobj));
450} 451}
452EXPORT_SYMBOL_GPL(sysfs_remove_device_from_node);
451 453
452#else 454#else
453static void register_nodes(void) 455static void register_nodes(void)
@@ -457,9 +459,6 @@ static void register_nodes(void)
457 459
458#endif 460#endif
459 461
460EXPORT_SYMBOL_GPL(sysfs_add_device_to_node);
461EXPORT_SYMBOL_GPL(sysfs_remove_device_from_node);
462
463/* Only valid if CPU is present. */ 462/* Only valid if CPU is present. */
464static ssize_t show_physical_id(struct sys_device *dev, char *buf) 463static ssize_t show_physical_id(struct sys_device *dev, char *buf)
465{ 464{
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 2c8564d54e..e5df167f78 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -77,9 +77,8 @@
77/* keep track of when we need to update the rtc */ 77/* keep track of when we need to update the rtc */
78time_t last_rtc_update; 78time_t last_rtc_update;
79#ifdef CONFIG_PPC_ISERIES 79#ifdef CONFIG_PPC_ISERIES
80unsigned long iSeries_recal_titan = 0; 80static unsigned long __initdata iSeries_recal_titan;
81unsigned long iSeries_recal_tb = 0; 81static signed long __initdata iSeries_recal_tb;
82static unsigned long first_settimeofday = 1;
83#endif 82#endif
84 83
85/* The decrementer counts down by 128 every 128ns on a 601. */ 84/* The decrementer counts down by 128 every 128ns on a 601. */
@@ -113,8 +112,9 @@ u64 ticklen_to_xs; /* 0.64 fraction */
113DEFINE_SPINLOCK(rtc_lock); 112DEFINE_SPINLOCK(rtc_lock);
114EXPORT_SYMBOL_GPL(rtc_lock); 113EXPORT_SYMBOL_GPL(rtc_lock);
115 114
116u64 tb_to_ns_scale; 115static u64 tb_to_ns_scale __read_mostly;
117unsigned tb_to_ns_shift; 116static unsigned tb_to_ns_shift __read_mostly;
117static unsigned long boot_tb __read_mostly;
118 118
119struct gettimeofday_struct do_gtod; 119struct gettimeofday_struct do_gtod;
120 120
@@ -214,7 +214,6 @@ static void account_process_time(struct pt_regs *regs)
214 run_posix_cpu_timers(current); 214 run_posix_cpu_timers(current);
215} 215}
216 216
217#ifdef CONFIG_PPC_SPLPAR
218/* 217/*
219 * Stuff for accounting stolen time. 218 * Stuff for accounting stolen time.
220 */ 219 */
@@ -222,19 +221,28 @@ struct cpu_purr_data {
222 int initialized; /* thread is running */ 221 int initialized; /* thread is running */
223 u64 tb; /* last TB value read */ 222 u64 tb; /* last TB value read */
224 u64 purr; /* last PURR value read */ 223 u64 purr; /* last PURR value read */
225 spinlock_t lock;
226}; 224};
227 225
226/*
227 * Each entry in the cpu_purr_data array is manipulated only by its
228 * "owner" cpu -- usually in the timer interrupt but also occasionally
229 * in process context for cpu online. As long as cpus do not touch
230 * each others' cpu_purr_data, disabling local interrupts is
231 * sufficient to serialize accesses.
232 */
228static DEFINE_PER_CPU(struct cpu_purr_data, cpu_purr_data); 233static DEFINE_PER_CPU(struct cpu_purr_data, cpu_purr_data);
229 234
230static void snapshot_tb_and_purr(void *data) 235static void snapshot_tb_and_purr(void *data)
231{ 236{
237 unsigned long flags;
232 struct cpu_purr_data *p = &__get_cpu_var(cpu_purr_data); 238 struct cpu_purr_data *p = &__get_cpu_var(cpu_purr_data);
233 239
240 local_irq_save(flags);
234 p->tb = mftb(); 241 p->tb = mftb();
235 p->purr = mfspr(SPRN_PURR); 242 p->purr = mfspr(SPRN_PURR);
236 wmb(); 243 wmb();
237 p->initialized = 1; 244 p->initialized = 1;
245 local_irq_restore(flags);
238} 246}
239 247
240/* 248/*
@@ -242,15 +250,14 @@ static void snapshot_tb_and_purr(void *data)
242 */ 250 */
243void snapshot_timebases(void) 251void snapshot_timebases(void)
244{ 252{
245 int cpu;
246
247 if (!cpu_has_feature(CPU_FTR_PURR)) 253 if (!cpu_has_feature(CPU_FTR_PURR))
248 return; 254 return;
249 for_each_possible_cpu(cpu)
250 spin_lock_init(&per_cpu(cpu_purr_data, cpu).lock);
251 on_each_cpu(snapshot_tb_and_purr, NULL, 0, 1); 255 on_each_cpu(snapshot_tb_and_purr, NULL, 0, 1);
252} 256}
253 257
258/*
259 * Must be called with interrupts disabled.
260 */
254void calculate_steal_time(void) 261void calculate_steal_time(void)
255{ 262{
256 u64 tb, purr; 263 u64 tb, purr;
@@ -262,7 +269,6 @@ void calculate_steal_time(void)
262 pme = &per_cpu(cpu_purr_data, smp_processor_id()); 269 pme = &per_cpu(cpu_purr_data, smp_processor_id());
263 if (!pme->initialized) 270 if (!pme->initialized)
264 return; /* this can happen in early boot */ 271 return; /* this can happen in early boot */
265 spin_lock(&pme->lock);
266 tb = mftb(); 272 tb = mftb();
267 purr = mfspr(SPRN_PURR); 273 purr = mfspr(SPRN_PURR);
268 stolen = (tb - pme->tb) - (purr - pme->purr); 274 stolen = (tb - pme->tb) - (purr - pme->purr);
@@ -270,9 +276,9 @@ void calculate_steal_time(void)
270 account_steal_time(current, stolen); 276 account_steal_time(current, stolen);
271 pme->tb = tb; 277 pme->tb = tb;
272 pme->purr = purr; 278 pme->purr = purr;
273 spin_unlock(&pme->lock);
274} 279}
275 280
281#ifdef CONFIG_PPC_SPLPAR
276/* 282/*
277 * Must be called before the cpu is added to the online map when 283 * Must be called before the cpu is added to the online map when
278 * a cpu is being brought up at runtime. 284 * a cpu is being brought up at runtime.
@@ -284,12 +290,12 @@ static void snapshot_purr(void)
284 290
285 if (!cpu_has_feature(CPU_FTR_PURR)) 291 if (!cpu_has_feature(CPU_FTR_PURR))
286 return; 292 return;
293 local_irq_save(flags);
287 pme = &per_cpu(cpu_purr_data, smp_processor_id()); 294 pme = &per_cpu(cpu_purr_data, smp_processor_id());
288 spin_lock_irqsave(&pme->lock, flags);
289 pme->tb = mftb(); 295 pme->tb = mftb();
290 pme->purr = mfspr(SPRN_PURR); 296 pme->purr = mfspr(SPRN_PURR);
291 pme->initialized = 1; 297 pme->initialized = 1;
292 spin_unlock_irqrestore(&pme->lock, flags); 298 local_irq_restore(flags);
293} 299}
294 300
295#endif /* CONFIG_PPC_SPLPAR */ 301#endif /* CONFIG_PPC_SPLPAR */
@@ -550,10 +556,15 @@ EXPORT_SYMBOL(profile_pc);
550 * returned by the service processor for the timebase frequency. 556 * returned by the service processor for the timebase frequency.
551 */ 557 */
552 558
553static void iSeries_tb_recal(void) 559static int __init iSeries_tb_recal(void)
554{ 560{
555 struct div_result divres; 561 struct div_result divres;
556 unsigned long titan, tb; 562 unsigned long titan, tb;
563
564 /* Make sure we only run on iSeries */
565 if (!firmware_has_feature(FW_FEATURE_ISERIES))
566 return -ENODEV;
567
557 tb = get_tb(); 568 tb = get_tb();
558 titan = HvCallXm_loadTod(); 569 titan = HvCallXm_loadTod();
559 if ( iSeries_recal_titan ) { 570 if ( iSeries_recal_titan ) {
@@ -594,8 +605,18 @@ static void iSeries_tb_recal(void)
594 } 605 }
595 iSeries_recal_titan = titan; 606 iSeries_recal_titan = titan;
596 iSeries_recal_tb = tb; 607 iSeries_recal_tb = tb;
608
609 return 0;
597} 610}
598#endif 611late_initcall(iSeries_tb_recal);
612
613/* Called from platform early init */
614void __init iSeries_time_init_early(void)
615{
616 iSeries_recal_tb = get_tb();
617 iSeries_recal_titan = HvCallXm_loadTod();
618}
619#endif /* CONFIG_PPC_ISERIES */
599 620
600/* 621/*
601 * For iSeries shared processors, we have to let the hypervisor 622 * For iSeries shared processors, we have to let the hypervisor
@@ -735,7 +756,7 @@ unsigned long long sched_clock(void)
735{ 756{
736 if (__USE_RTC()) 757 if (__USE_RTC())
737 return get_rtc(); 758 return get_rtc();
738 return mulhdu(get_tb(), tb_to_ns_scale) << tb_to_ns_shift; 759 return mulhdu(get_tb() - boot_tb, tb_to_ns_scale) << tb_to_ns_shift;
739} 760}
740 761
741int do_settimeofday(struct timespec *tv) 762int do_settimeofday(struct timespec *tv)
@@ -759,12 +780,6 @@ int do_settimeofday(struct timespec *tv)
759 * to the RTC again, or write to the RTC but then they don't call 780 * to the RTC again, or write to the RTC but then they don't call
760 * settimeofday to perform this operation. 781 * settimeofday to perform this operation.
761 */ 782 */
762#ifdef CONFIG_PPC_ISERIES
763 if (firmware_has_feature(FW_FEATURE_ISERIES) && first_settimeofday) {
764 iSeries_tb_recal();
765 first_settimeofday = 0;
766 }
767#endif
768 783
769 /* Make userspace gettimeofday spin until we're done. */ 784 /* Make userspace gettimeofday spin until we're done. */
770 ++vdso_data->tb_update_count; 785 ++vdso_data->tb_update_count;
@@ -960,6 +975,8 @@ void __init time_init(void)
960 } 975 }
961 tb_to_ns_scale = scale; 976 tb_to_ns_scale = scale;
962 tb_to_ns_shift = shift; 977 tb_to_ns_shift = shift;
978 /* Save the current timebase to pretty up CONFIG_PRINTK_TIME */
979 boot_tb = get_tb();
963 980
964 tm = get_boot_time(); 981 tm = get_boot_time();
965 982
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index bf6445ac9f..2bb1cb9117 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -149,6 +149,7 @@ int die(const char *str, struct pt_regs *regs, long err)
149 149
150 bust_spinlocks(0); 150 bust_spinlocks(0);
151 die.lock_owner = -1; 151 die.lock_owner = -1;
152 add_taint(TAINT_DIE);
152 spin_unlock_irqrestore(&die.lock, flags); 153 spin_unlock_irqrestore(&die.lock, flags);
153 154
154 if (kexec_should_crash(current) || 155 if (kexec_should_crash(current) ||
@@ -777,7 +778,7 @@ void __kprobes program_check_exception(struct pt_regs *regs)
777 return; 778 return;
778 779
779 if (!(regs->msr & MSR_PR) && /* not user-mode */ 780 if (!(regs->msr & MSR_PR) && /* not user-mode */
780 report_bug(regs->nip) == BUG_TRAP_TYPE_WARN) { 781 report_bug(regs->nip, regs) == BUG_TRAP_TYPE_WARN) {
781 regs->nip += 4; 782 regs->nip += 4;
782 return; 783 return;
783 } 784 }
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index 4245579edb..cef01e4e89 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -670,7 +670,7 @@ static int __init vdso_init(void)
670 /* 670 /*
671 * Fill up the "systemcfg" stuff for backward compatiblity 671 * Fill up the "systemcfg" stuff for backward compatiblity
672 */ 672 */
673 strcpy(vdso_data->eye_catcher, "SYSTEMCFG:PPC64"); 673 strcpy((char *)vdso_data->eye_catcher, "SYSTEMCFG:PPC64");
674 vdso_data->version.major = SYSTEMCFG_MAJOR; 674 vdso_data->version.major = SYSTEMCFG_MAJOR;
675 vdso_data->version.minor = SYSTEMCFG_MINOR; 675 vdso_data->version.minor = SYSTEMCFG_MINOR;
676 vdso_data->processor = mfspr(SPRN_PVR); 676 vdso_data->processor = mfspr(SPRN_PVR);
diff --git a/arch/powerpc/kernel/vdso32/gettimeofday.S b/arch/powerpc/kernel/vdso32/gettimeofday.S
index 05909f7543..72ca26df45 100644
--- a/arch/powerpc/kernel/vdso32/gettimeofday.S
+++ b/arch/powerpc/kernel/vdso32/gettimeofday.S
@@ -32,6 +32,8 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
32 mr r11,r4 /* r11 saves tz */ 32 mr r11,r4 /* r11 saves tz */
33 bl __get_datapage@local /* get data page */ 33 bl __get_datapage@local /* get data page */
34 mr r9, r3 /* datapage ptr in r9 */ 34 mr r9, r3 /* datapage ptr in r9 */
35 cmplwi r10,0 /* check if tv is NULL */
36 beq 3f
35 bl __do_get_xsec@local /* get xsec from tb & kernel */ 37 bl __do_get_xsec@local /* get xsec from tb & kernel */
36 bne- 2f /* out of line -> do syscall */ 38 bne- 2f /* out of line -> do syscall */
37 39
@@ -50,7 +52,7 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
50 mulhwu r5,r5,r6 52 mulhwu r5,r5,r6
51 stw r5,TVAL32_TV_USEC(r10) 53 stw r5,TVAL32_TV_USEC(r10)
52 54
53 cmpli cr0,r11,0 /* check if tz is NULL */ 553: cmplwi r11,0 /* check if tz is NULL */
54 beq 1f 56 beq 1f
55 lwz r4,CFG_TZ_MINUTEWEST(r9)/* fill tz */ 57 lwz r4,CFG_TZ_MINUTEWEST(r9)/* fill tz */
56 lwz r5,CFG_TZ_DSTTIME(r9) 58 lwz r5,CFG_TZ_DSTTIME(r9)
diff --git a/arch/powerpc/kernel/vdso64/gettimeofday.S b/arch/powerpc/kernel/vdso64/gettimeofday.S
index 40ffd9b6ce..c6401f9e37 100644
--- a/arch/powerpc/kernel/vdso64/gettimeofday.S
+++ b/arch/powerpc/kernel/vdso64/gettimeofday.S
@@ -1,5 +1,4 @@
1 1/*
2 /*
3 * Userland implementation of gettimeofday() for 64 bits processes in a 2 * Userland implementation of gettimeofday() for 64 bits processes in a
4 * ppc64 kernel for use in the vDSO 3 * ppc64 kernel for use in the vDSO
5 * 4 *
@@ -32,6 +31,8 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
32 mr r11,r3 /* r11 holds tv */ 31 mr r11,r3 /* r11 holds tv */
33 mr r10,r4 /* r10 holds tz */ 32 mr r10,r4 /* r10 holds tz */
34 bl V_LOCAL_FUNC(__get_datapage) /* get data page */ 33 bl V_LOCAL_FUNC(__get_datapage) /* get data page */
34 cmpldi r11,0 /* check if tv is NULL */
35 beq 2f
35 bl V_LOCAL_FUNC(__do_get_xsec) /* get xsec from tb & kernel */ 36 bl V_LOCAL_FUNC(__do_get_xsec) /* get xsec from tb & kernel */
36 lis r7,15 /* r7 = 1000000 = USEC_PER_SEC */ 37 lis r7,15 /* r7 = 1000000 = USEC_PER_SEC */
37 ori r7,r7,16960 38 ori r7,r7,16960
@@ -43,8 +44,8 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
43 * XSEC_PER_SEC 44 * XSEC_PER_SEC
44 */ 45 */
45 rldicl r0,r0,44,20 46 rldicl r0,r0,44,20
46 cmpldi cr0,r10,0 /* check if tz is NULL */
47 std r0,TVAL64_TV_USEC(r11) /* store usec in tv */ 47 std r0,TVAL64_TV_USEC(r11) /* store usec in tv */
482: cmpldi r10,0 /* check if tz is NULL */
48 beq 1f 49 beq 1f
49 lwz r4,CFG_TZ_MINUTEWEST(r3)/* fill tz */ 50 lwz r4,CFG_TZ_MINUTEWEST(r3)/* fill tz */
50 lwz r5,CFG_TZ_DSTTIME(r3) 51 lwz r5,CFG_TZ_DSTTIME(r3)
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 21c39ff2dc..ae4acd8414 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -7,6 +7,7 @@
7#define PROVIDE32(x) PROVIDE(x) 7#define PROVIDE32(x) PROVIDE(x)
8#endif 8#endif
9#include <asm-generic/vmlinux.lds.h> 9#include <asm-generic/vmlinux.lds.h>
10#include <asm/cache.h>
10 11
11ENTRY(_stext) 12ENTRY(_stext)
12 13
@@ -211,6 +212,11 @@ SECTIONS
211 *(.data.cacheline_aligned) 212 *(.data.cacheline_aligned)
212 } 213 }
213 214
215 . = ALIGN(L1_CACHE_BYTES);
216 .data.read_mostly : {
217 *(.data.read_mostly)
218 }
219
214 . = ALIGN(PAGE_SIZE); 220 . = ALIGN(PAGE_SIZE);
215 __data_nosave : { 221 __data_nosave : {
216 __nosave_begin = .; 222 __nosave_begin = .;
diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c
index ca4dcb07a9..c3df504765 100644
--- a/arch/powerpc/mm/44x_mmu.c
+++ b/arch/powerpc/mm/44x_mmu.c
@@ -12,7 +12,6 @@
12 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 12 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
13 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 13 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
14 * Copyright (C) 1996 Paul Mackerras 14 * Copyright (C) 1996 Paul Mackerras
15 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
16 * 15 *
17 * Derived from "arch/i386/mm/init.c" 16 * Derived from "arch/i386/mm/init.c"
18 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 17 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
diff --git a/arch/powerpc/mm/4xx_mmu.c b/arch/powerpc/mm/4xx_mmu.c
index 838e09db71..7ff2609b64 100644
--- a/arch/powerpc/mm/4xx_mmu.c
+++ b/arch/powerpc/mm/4xx_mmu.c
@@ -9,7 +9,6 @@
9 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 9 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
10 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 10 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
11 * Copyright (C) 1996 Paul Mackerras 11 * Copyright (C) 1996 Paul Mackerras
12 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
13 * 12 *
14 * Derived from "arch/i386/mm/init.c" 13 * Derived from "arch/i386/mm/init.c"
15 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 14 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
index 4f839c6a97..7e4d27ad3d 100644
--- a/arch/powerpc/mm/Makefile
+++ b/arch/powerpc/mm/Makefile
@@ -11,8 +11,7 @@ obj-$(CONFIG_PPC32) += init_32.o pgtable_32.o mmu_context_32.o
11hash-$(CONFIG_PPC_NATIVE) := hash_native_64.o 11hash-$(CONFIG_PPC_NATIVE) := hash_native_64.o
12obj-$(CONFIG_PPC64) += init_64.o pgtable_64.o mmu_context_64.o \ 12obj-$(CONFIG_PPC64) += init_64.o pgtable_64.o mmu_context_64.o \
13 hash_utils_64.o hash_low_64.o tlb_64.o \ 13 hash_utils_64.o hash_low_64.o tlb_64.o \
14 slb_low.o slb.o stab.o mmap.o imalloc.o \ 14 slb_low.o slb.o stab.o mmap.o $(hash-y)
15 $(hash-y)
16obj-$(CONFIG_PPC_STD_MMU_32) += ppc_mmu_32.o hash_low_32.o tlb_32.o 15obj-$(CONFIG_PPC_STD_MMU_32) += ppc_mmu_32.o hash_low_32.o tlb_32.o
17obj-$(CONFIG_40x) += 4xx_mmu.o 16obj-$(CONFIG_40x) += 4xx_mmu.o
18obj-$(CONFIG_44x) += 44x_mmu.o 17obj-$(CONFIG_44x) += 44x_mmu.o
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index 115b25f50b..0ece51310b 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -380,7 +380,7 @@ out_of_memory:
380 } 380 }
381 printk("VM: killing process %s\n", current->comm); 381 printk("VM: killing process %s\n", current->comm);
382 if (user_mode(regs)) 382 if (user_mode(regs))
383 do_exit(SIGKILL); 383 do_group_exit(SIGKILL);
384 return SIGKILL; 384 return SIGKILL;
385 385
386do_sigbus: 386do_sigbus:
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c
index 123da03ab1..afab247d47 100644
--- a/arch/powerpc/mm/fsl_booke_mmu.c
+++ b/arch/powerpc/mm/fsl_booke_mmu.c
@@ -14,7 +14,6 @@
14 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 14 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
15 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 15 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
16 * Copyright (C) 1996 Paul Mackerras 16 * Copyright (C) 1996 Paul Mackerras
17 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
18 * 17 *
19 * Derived from "arch/i386/mm/init.c" 18 * Derived from "arch/i386/mm/init.c"
20 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 19 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c
index 4a20d890e2..6ba9b47e55 100644
--- a/arch/powerpc/mm/hash_native_64.c
+++ b/arch/powerpc/mm/hash_native_64.c
@@ -104,7 +104,7 @@ static inline void tlbie(unsigned long va, int psize, int local)
104 spin_unlock(&native_tlbie_lock); 104 spin_unlock(&native_tlbie_lock);
105} 105}
106 106
107static inline void native_lock_hpte(hpte_t *hptep) 107static inline void native_lock_hpte(struct hash_pte *hptep)
108{ 108{
109 unsigned long *word = &hptep->v; 109 unsigned long *word = &hptep->v;
110 110
@@ -116,7 +116,7 @@ static inline void native_lock_hpte(hpte_t *hptep)
116 } 116 }
117} 117}
118 118
119static inline void native_unlock_hpte(hpte_t *hptep) 119static inline void native_unlock_hpte(struct hash_pte *hptep)
120{ 120{
121 unsigned long *word = &hptep->v; 121 unsigned long *word = &hptep->v;
122 122
@@ -128,7 +128,7 @@ static long native_hpte_insert(unsigned long hpte_group, unsigned long va,
128 unsigned long pa, unsigned long rflags, 128 unsigned long pa, unsigned long rflags,
129 unsigned long vflags, int psize) 129 unsigned long vflags, int psize)
130{ 130{
131 hpte_t *hptep = htab_address + hpte_group; 131 struct hash_pte *hptep = htab_address + hpte_group;
132 unsigned long hpte_v, hpte_r; 132 unsigned long hpte_v, hpte_r;
133 int i; 133 int i;
134 134
@@ -163,7 +163,7 @@ static long native_hpte_insert(unsigned long hpte_group, unsigned long va,
163 163
164 hptep->r = hpte_r; 164 hptep->r = hpte_r;
165 /* Guarantee the second dword is visible before the valid bit */ 165 /* Guarantee the second dword is visible before the valid bit */
166 __asm__ __volatile__ ("eieio" : : : "memory"); 166 eieio();
167 /* 167 /*
168 * Now set the first dword including the valid bit 168 * Now set the first dword including the valid bit
169 * NOTE: this also unlocks the hpte 169 * NOTE: this also unlocks the hpte
@@ -177,7 +177,7 @@ static long native_hpte_insert(unsigned long hpte_group, unsigned long va,
177 177
178static long native_hpte_remove(unsigned long hpte_group) 178static long native_hpte_remove(unsigned long hpte_group)
179{ 179{
180 hpte_t *hptep; 180 struct hash_pte *hptep;
181 int i; 181 int i;
182 int slot_offset; 182 int slot_offset;
183 unsigned long hpte_v; 183 unsigned long hpte_v;
@@ -217,7 +217,7 @@ static long native_hpte_remove(unsigned long hpte_group)
217static long native_hpte_updatepp(unsigned long slot, unsigned long newpp, 217static long native_hpte_updatepp(unsigned long slot, unsigned long newpp,
218 unsigned long va, int psize, int local) 218 unsigned long va, int psize, int local)
219{ 219{
220 hpte_t *hptep = htab_address + slot; 220 struct hash_pte *hptep = htab_address + slot;
221 unsigned long hpte_v, want_v; 221 unsigned long hpte_v, want_v;
222 int ret = 0; 222 int ret = 0;
223 223
@@ -233,15 +233,14 @@ static long native_hpte_updatepp(unsigned long slot, unsigned long newpp,
233 /* Even if we miss, we need to invalidate the TLB */ 233 /* Even if we miss, we need to invalidate the TLB */
234 if (!HPTE_V_COMPARE(hpte_v, want_v) || !(hpte_v & HPTE_V_VALID)) { 234 if (!HPTE_V_COMPARE(hpte_v, want_v) || !(hpte_v & HPTE_V_VALID)) {
235 DBG_LOW(" -> miss\n"); 235 DBG_LOW(" -> miss\n");
236 native_unlock_hpte(hptep);
237 ret = -1; 236 ret = -1;
238 } else { 237 } else {
239 DBG_LOW(" -> hit\n"); 238 DBG_LOW(" -> hit\n");
240 /* Update the HPTE */ 239 /* Update the HPTE */
241 hptep->r = (hptep->r & ~(HPTE_R_PP | HPTE_R_N)) | 240 hptep->r = (hptep->r & ~(HPTE_R_PP | HPTE_R_N)) |
242 (newpp & (HPTE_R_PP | HPTE_R_N | HPTE_R_C)); 241 (newpp & (HPTE_R_PP | HPTE_R_N | HPTE_R_C));
243 native_unlock_hpte(hptep);
244 } 242 }
243 native_unlock_hpte(hptep);
245 244
246 /* Ensure it is out of the tlb too. */ 245 /* Ensure it is out of the tlb too. */
247 tlbie(va, psize, local); 246 tlbie(va, psize, local);
@@ -251,7 +250,7 @@ static long native_hpte_updatepp(unsigned long slot, unsigned long newpp,
251 250
252static long native_hpte_find(unsigned long va, int psize) 251static long native_hpte_find(unsigned long va, int psize)
253{ 252{
254 hpte_t *hptep; 253 struct hash_pte *hptep;
255 unsigned long hash; 254 unsigned long hash;
256 unsigned long i, j; 255 unsigned long i, j;
257 long slot; 256 long slot;
@@ -294,7 +293,7 @@ static void native_hpte_updateboltedpp(unsigned long newpp, unsigned long ea,
294{ 293{
295 unsigned long vsid, va; 294 unsigned long vsid, va;
296 long slot; 295 long slot;
297 hpte_t *hptep; 296 struct hash_pte *hptep;
298 297
299 vsid = get_kernel_vsid(ea); 298 vsid = get_kernel_vsid(ea);
300 va = (vsid << 28) | (ea & 0x0fffffff); 299 va = (vsid << 28) | (ea & 0x0fffffff);
@@ -315,7 +314,7 @@ static void native_hpte_updateboltedpp(unsigned long newpp, unsigned long ea,
315static void native_hpte_invalidate(unsigned long slot, unsigned long va, 314static void native_hpte_invalidate(unsigned long slot, unsigned long va,
316 int psize, int local) 315 int psize, int local)
317{ 316{
318 hpte_t *hptep = htab_address + slot; 317 struct hash_pte *hptep = htab_address + slot;
319 unsigned long hpte_v; 318 unsigned long hpte_v;
320 unsigned long want_v; 319 unsigned long want_v;
321 unsigned long flags; 320 unsigned long flags;
@@ -345,7 +344,7 @@ static void native_hpte_invalidate(unsigned long slot, unsigned long va,
345#define LP_BITS 8 344#define LP_BITS 8
346#define LP_MASK(i) ((0xFF >> (i)) << LP_SHIFT) 345#define LP_MASK(i) ((0xFF >> (i)) << LP_SHIFT)
347 346
348static void hpte_decode(hpte_t *hpte, unsigned long slot, 347static void hpte_decode(struct hash_pte *hpte, unsigned long slot,
349 int *psize, unsigned long *va) 348 int *psize, unsigned long *va)
350{ 349{
351 unsigned long hpte_r = hpte->r; 350 unsigned long hpte_r = hpte->r;
@@ -415,7 +414,7 @@ static void hpte_decode(hpte_t *hpte, unsigned long slot,
415static void native_hpte_clear(void) 414static void native_hpte_clear(void)
416{ 415{
417 unsigned long slot, slots, flags; 416 unsigned long slot, slots, flags;
418 hpte_t *hptep = htab_address; 417 struct hash_pte *hptep = htab_address;
419 unsigned long hpte_v, va; 418 unsigned long hpte_v, va;
420 unsigned long pteg_count; 419 unsigned long pteg_count;
421 int psize; 420 int psize;
@@ -462,7 +461,7 @@ static void native_hpte_clear(void)
462static void native_flush_hash_range(unsigned long number, int local) 461static void native_flush_hash_range(unsigned long number, int local)
463{ 462{
464 unsigned long va, hash, index, hidx, shift, slot; 463 unsigned long va, hash, index, hidx, shift, slot;
465 hpte_t *hptep; 464 struct hash_pte *hptep;
466 unsigned long hpte_v; 465 unsigned long hpte_v;
467 unsigned long want_v; 466 unsigned long want_v;
468 unsigned long flags; 467 unsigned long flags;
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 4f2f4534a9..2ce9491b48 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -87,7 +87,7 @@ extern unsigned long dart_tablebase;
87static unsigned long _SDR1; 87static unsigned long _SDR1;
88struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; 88struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT];
89 89
90hpte_t *htab_address; 90struct hash_pte *htab_address;
91unsigned long htab_size_bytes; 91unsigned long htab_size_bytes;
92unsigned long htab_hash_mask; 92unsigned long htab_hash_mask;
93int mmu_linear_psize = MMU_PAGE_4K; 93int mmu_linear_psize = MMU_PAGE_4K;
diff --git a/arch/powerpc/mm/imalloc.c b/arch/powerpc/mm/imalloc.c
deleted file mode 100644
index c831815c31..0000000000
--- a/arch/powerpc/mm/imalloc.c
+++ /dev/null
@@ -1,313 +0,0 @@
1/*
2 * c 2001 PPC 64 Team, IBM Corp
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 <linux/slab.h>
11#include <linux/vmalloc.h>
12
13#include <asm/uaccess.h>
14#include <asm/pgalloc.h>
15#include <asm/pgtable.h>
16#include <linux/mutex.h>
17#include <asm/cacheflush.h>
18
19#include "mmu_decl.h"
20
21static DEFINE_MUTEX(imlist_mutex);
22struct vm_struct * imlist = NULL;
23
24static int get_free_im_addr(unsigned long size, unsigned long *im_addr)
25{
26 unsigned long addr;
27 struct vm_struct **p, *tmp;
28
29 addr = ioremap_bot;
30 for (p = &imlist; (tmp = *p) ; p = &tmp->next) {
31 if (size + addr < (unsigned long) tmp->addr)
32 break;
33 if ((unsigned long)tmp->addr >= ioremap_bot)
34 addr = tmp->size + (unsigned long) tmp->addr;
35 if (addr >= IMALLOC_END-size)
36 return 1;
37 }
38 *im_addr = addr;
39
40 return 0;
41}
42
43/* Return whether the region described by v_addr and size is a subset
44 * of the region described by parent
45 */
46static inline int im_region_is_subset(unsigned long v_addr, unsigned long size,
47 struct vm_struct *parent)
48{
49 return (int) (v_addr >= (unsigned long) parent->addr &&
50 v_addr < (unsigned long) parent->addr + parent->size &&
51 size < parent->size);
52}
53
54/* Return whether the region described by v_addr and size is a superset
55 * of the region described by child
56 */
57static int im_region_is_superset(unsigned long v_addr, unsigned long size,
58 struct vm_struct *child)
59{
60 struct vm_struct parent;
61
62 parent.addr = (void *) v_addr;
63 parent.size = size;
64
65 return im_region_is_subset((unsigned long) child->addr, child->size,
66 &parent);
67}
68
69/* Return whether the region described by v_addr and size overlaps
70 * the region described by vm. Overlapping regions meet the
71 * following conditions:
72 * 1) The regions share some part of the address space
73 * 2) The regions aren't identical
74 * 3) Neither region is a subset of the other
75 */
76static int im_region_overlaps(unsigned long v_addr, unsigned long size,
77 struct vm_struct *vm)
78{
79 if (im_region_is_superset(v_addr, size, vm))
80 return 0;
81
82 return (v_addr + size > (unsigned long) vm->addr + vm->size &&
83 v_addr < (unsigned long) vm->addr + vm->size) ||
84 (v_addr < (unsigned long) vm->addr &&
85 v_addr + size > (unsigned long) vm->addr);
86}
87
88/* Determine imalloc status of region described by v_addr and size.
89 * Can return one of the following:
90 * IM_REGION_UNUSED - Entire region is unallocated in imalloc space.
91 * IM_REGION_SUBSET - Region is a subset of a region that is already
92 * allocated in imalloc space.
93 * vm will be assigned to a ptr to the parent region.
94 * IM_REGION_EXISTS - Exact region already allocated in imalloc space.
95 * vm will be assigned to a ptr to the existing imlist
96 * member.
97 * IM_REGION_OVERLAPS - Region overlaps an allocated region in imalloc space.
98 * IM_REGION_SUPERSET - Region is a superset of a region that is already
99 * allocated in imalloc space.
100 */
101static int im_region_status(unsigned long v_addr, unsigned long size,
102 struct vm_struct **vm)
103{
104 struct vm_struct *tmp;
105
106 for (tmp = imlist; tmp; tmp = tmp->next)
107 if (v_addr < (unsigned long) tmp->addr + tmp->size)
108 break;
109
110 *vm = NULL;
111 if (tmp) {
112 if (im_region_overlaps(v_addr, size, tmp))
113 return IM_REGION_OVERLAP;
114
115 *vm = tmp;
116 if (im_region_is_subset(v_addr, size, tmp)) {
117 /* Return with tmp pointing to superset */
118 return IM_REGION_SUBSET;
119 }
120 if (im_region_is_superset(v_addr, size, tmp)) {
121 /* Return with tmp pointing to first subset */
122 return IM_REGION_SUPERSET;
123 }
124 else if (v_addr == (unsigned long) tmp->addr &&
125 size == tmp->size) {
126 /* Return with tmp pointing to exact region */
127 return IM_REGION_EXISTS;
128 }
129 }
130
131 return IM_REGION_UNUSED;
132}
133
134static struct vm_struct * split_im_region(unsigned long v_addr,
135 unsigned long size, struct vm_struct *parent)
136{
137 struct vm_struct *vm1 = NULL;
138 struct vm_struct *vm2 = NULL;
139 struct vm_struct *new_vm = NULL;
140
141 vm1 = kmalloc(sizeof(*vm1), GFP_KERNEL);
142 if (vm1 == NULL) {
143 printk(KERN_ERR "%s() out of memory\n", __FUNCTION__);
144 return NULL;
145 }
146
147 if (v_addr == (unsigned long) parent->addr) {
148 /* Use existing parent vm_struct to represent child, allocate
149 * new one for the remainder of parent range
150 */
151 vm1->size = parent->size - size;
152 vm1->addr = (void *) (v_addr + size);
153 vm1->next = parent->next;
154
155 parent->size = size;
156 parent->next = vm1;
157 new_vm = parent;
158 } else if (v_addr + size == (unsigned long) parent->addr +
159 parent->size) {
160 /* Allocate new vm_struct to represent child, use existing
161 * parent one for remainder of parent range
162 */
163 vm1->size = size;
164 vm1->addr = (void *) v_addr;
165 vm1->next = parent->next;
166 new_vm = vm1;
167
168 parent->size -= size;
169 parent->next = vm1;
170 } else {
171 /* Allocate two new vm_structs for the new child and
172 * uppermost remainder, and use existing parent one for the
173 * lower remainder of parent range
174 */
175 vm2 = kmalloc(sizeof(*vm2), GFP_KERNEL);
176 if (vm2 == NULL) {
177 printk(KERN_ERR "%s() out of memory\n", __FUNCTION__);
178 kfree(vm1);
179 return NULL;
180 }
181
182 vm1->size = size;
183 vm1->addr = (void *) v_addr;
184 vm1->next = vm2;
185 new_vm = vm1;
186
187 vm2->size = ((unsigned long) parent->addr + parent->size) -
188 (v_addr + size);
189 vm2->addr = (void *) v_addr + size;
190 vm2->next = parent->next;
191
192 parent->size = v_addr - (unsigned long) parent->addr;
193 parent->next = vm1;
194 }
195
196 return new_vm;
197}
198
199static struct vm_struct * __add_new_im_area(unsigned long req_addr,
200 unsigned long size)
201{
202 struct vm_struct **p, *tmp, *area;
203
204 for (p = &imlist; (tmp = *p) ; p = &tmp->next) {
205 if (req_addr + size <= (unsigned long)tmp->addr)
206 break;
207 }
208
209 area = kmalloc(sizeof(*area), GFP_KERNEL);
210 if (!area)
211 return NULL;
212 area->flags = 0;
213 area->addr = (void *)req_addr;
214 area->size = size;
215 area->next = *p;
216 *p = area;
217
218 return area;
219}
220
221static struct vm_struct * __im_get_area(unsigned long req_addr,
222 unsigned long size,
223 int criteria)
224{
225 struct vm_struct *tmp;
226 int status;
227
228 status = im_region_status(req_addr, size, &tmp);
229 if ((criteria & status) == 0) {
230 return NULL;
231 }
232
233 switch (status) {
234 case IM_REGION_UNUSED:
235 tmp = __add_new_im_area(req_addr, size);
236 break;
237 case IM_REGION_SUBSET:
238 tmp = split_im_region(req_addr, size, tmp);
239 break;
240 case IM_REGION_EXISTS:
241 /* Return requested region */
242 break;
243 case IM_REGION_SUPERSET:
244 /* Return first existing subset of requested region */
245 break;
246 default:
247 printk(KERN_ERR "%s() unexpected imalloc region status\n",
248 __FUNCTION__);
249 tmp = NULL;
250 }
251
252 return tmp;
253}
254
255struct vm_struct * im_get_free_area(unsigned long size)
256{
257 struct vm_struct *area;
258 unsigned long addr;
259
260 mutex_lock(&imlist_mutex);
261 if (get_free_im_addr(size, &addr)) {
262 printk(KERN_ERR "%s() cannot obtain addr for size 0x%lx\n",
263 __FUNCTION__, size);
264 area = NULL;
265 goto next_im_done;
266 }
267
268 area = __im_get_area(addr, size, IM_REGION_UNUSED);
269 if (area == NULL) {
270 printk(KERN_ERR
271 "%s() cannot obtain area for addr 0x%lx size 0x%lx\n",
272 __FUNCTION__, addr, size);
273 }
274next_im_done:
275 mutex_unlock(&imlist_mutex);
276 return area;
277}
278
279struct vm_struct * im_get_area(unsigned long v_addr, unsigned long size,
280 int criteria)
281{
282 struct vm_struct *area;
283
284 mutex_lock(&imlist_mutex);
285 area = __im_get_area(v_addr, size, criteria);
286 mutex_unlock(&imlist_mutex);
287 return area;
288}
289
290void im_free(void * addr)
291{
292 struct vm_struct **p, *tmp;
293
294 if (!addr)
295 return;
296 if ((unsigned long) addr & ~PAGE_MASK) {
297 printk(KERN_ERR "Trying to %s bad address (%p)\n", __FUNCTION__, addr);
298 return;
299 }
300 mutex_lock(&imlist_mutex);
301 for (p = &imlist ; (tmp = *p) ; p = &tmp->next) {
302 if (tmp->addr == addr) {
303 *p = tmp->next;
304 unmap_vm_area(tmp);
305 kfree(tmp);
306 mutex_unlock(&imlist_mutex);
307 return;
308 }
309 }
310 mutex_unlock(&imlist_mutex);
311 printk(KERN_ERR "Trying to %s nonexistent area (%p)\n", __FUNCTION__,
312 addr);
313}
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index 5fce6ccecb..e1f5ded851 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -5,7 +5,6 @@
5 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 5 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
6 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 6 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
7 * Copyright (C) 1996 Paul Mackerras 7 * Copyright (C) 1996 Paul Mackerras
8 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
9 * PPC44x/36-bit changes by Matt Porter (mporter@mvista.com) 8 * PPC44x/36-bit changes by Matt Porter (mporter@mvista.com)
10 * 9 *
11 * Derived from "arch/i386/mm/init.c" 10 * Derived from "arch/i386/mm/init.c"
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index 7312a26554..1d6edf724c 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -5,7 +5,6 @@
5 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 5 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
6 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 6 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
7 * Copyright (C) 1996 Paul Mackerras 7 * Copyright (C) 1996 Paul Mackerras
8 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
9 * 8 *
10 * Derived from "arch/i386/mm/init.c" 9 * Derived from "arch/i386/mm/init.c"
11 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 10 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 0266a94d83..f0e7eedb1b 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -5,7 +5,6 @@
5 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 5 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
6 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 6 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
7 * Copyright (C) 1996 Paul Mackerras 7 * Copyright (C) 1996 Paul Mackerras
8 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
9 * PPC44x/36-bit changes by Matt Porter (mporter@mvista.com) 8 * PPC44x/36-bit changes by Matt Porter (mporter@mvista.com)
10 * 9 *
11 * Derived from "arch/i386/mm/init.c" 10 * Derived from "arch/i386/mm/init.c"
@@ -129,8 +128,6 @@ int __devinit arch_add_memory(int nid, u64 start, u64 size)
129 zone = pgdata->node_zones; 128 zone = pgdata->node_zones;
130 129
131 return __add_pages(zone, start_pfn, nr_pages); 130 return __add_pages(zone, start_pfn, nr_pages);
132
133 return 0;
134} 131}
135 132
136/* 133/*
diff --git a/arch/powerpc/mm/mmu_context_32.c b/arch/powerpc/mm/mmu_context_32.c
index 792086b010..cc32ba41d9 100644
--- a/arch/powerpc/mm/mmu_context_32.c
+++ b/arch/powerpc/mm/mmu_context_32.c
@@ -11,7 +11,6 @@
11 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 11 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
12 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 12 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
13 * Copyright (C) 1996 Paul Mackerras 13 * Copyright (C) 1996 Paul Mackerras
14 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
15 * 14 *
16 * Derived from "arch/i386/mm/init.c" 15 * Derived from "arch/i386/mm/init.c"
17 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 16 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
index 2558c34eed..c94a64fd3c 100644
--- a/arch/powerpc/mm/mmu_decl.h
+++ b/arch/powerpc/mm/mmu_decl.h
@@ -8,7 +8,6 @@
8 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 8 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
9 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 9 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
10 * Copyright (C) 1996 Paul Mackerras 10 * Copyright (C) 1996 Paul Mackerras
11 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
12 * 11 *
13 * Derived from "arch/i386/mm/init.c" 12 * Derived from "arch/i386/mm/init.c"
14 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 13 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
@@ -40,8 +39,8 @@ extern int __map_without_bats;
40extern unsigned long ioremap_base; 39extern unsigned long ioremap_base;
41extern unsigned int rtas_data, rtas_size; 40extern unsigned int rtas_data, rtas_size;
42 41
43struct _PTE; 42struct hash_pte;
44extern struct _PTE *Hash, *Hash_end; 43extern struct hash_pte *Hash, *Hash_end;
45extern unsigned long Hash_size, Hash_mask; 44extern unsigned long Hash_size, Hash_mask;
46 45
47extern unsigned int num_tlbcam_entries; 46extern unsigned int num_tlbcam_entries;
@@ -90,16 +89,4 @@ static inline void flush_HPTE(unsigned context, unsigned long va,
90 else 89 else
91 _tlbie(va); 90 _tlbie(va);
92} 91}
93#else /* CONFIG_PPC64 */
94/* imalloc region types */
95#define IM_REGION_UNUSED 0x1
96#define IM_REGION_SUBSET 0x2
97#define IM_REGION_EXISTS 0x4
98#define IM_REGION_OVERLAP 0x8
99#define IM_REGION_SUPERSET 0x10
100
101extern struct vm_struct * im_get_free_area(unsigned long size);
102extern struct vm_struct * im_get_area(unsigned long v_addr, unsigned long size,
103 int region_type);
104extern void im_free(void *addr);
105#endif 92#endif
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index f6ae1a57d6..6448872316 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -8,7 +8,6 @@
8 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 8 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
9 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 9 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
10 * Copyright (C) 1996 Paul Mackerras 10 * Copyright (C) 1996 Paul Mackerras
11 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
12 * 11 *
13 * Derived from "arch/i386/mm/init.c" 12 * Derived from "arch/i386/mm/init.c"
14 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 13 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
@@ -37,7 +36,6 @@
37unsigned long ioremap_base; 36unsigned long ioremap_base;
38unsigned long ioremap_bot; 37unsigned long ioremap_bot;
39EXPORT_SYMBOL(ioremap_bot); /* aka VMALLOC_END */ 38EXPORT_SYMBOL(ioremap_bot); /* aka VMALLOC_END */
40int io_bat_index;
41 39
42#if defined(CONFIG_6xx) || defined(CONFIG_POWER3) 40#if defined(CONFIG_6xx) || defined(CONFIG_POWER3)
43#define HAVE_BATS 1 41#define HAVE_BATS 1
@@ -300,51 +298,6 @@ void __init mapin_ram(void)
300 } 298 }
301} 299}
302 300
303/* is x a power of 4? */
304#define is_power_of_4(x) is_power_of_2(x) && (ffs(x) & 1)
305
306/*
307 * Set up a mapping for a block of I/O.
308 * virt, phys, size must all be page-aligned.
309 * This should only be called before ioremap is called.
310 */
311void __init io_block_mapping(unsigned long virt, phys_addr_t phys,
312 unsigned int size, int flags)
313{
314 int i;
315
316 if (virt > KERNELBASE && virt < ioremap_bot)
317 ioremap_bot = ioremap_base = virt;
318
319#ifdef HAVE_BATS
320 /*
321 * Use a BAT for this if possible...
322 */
323 if (io_bat_index < 2 && is_power_of_2(size)
324 && (virt & (size - 1)) == 0 && (phys & (size - 1)) == 0) {
325 setbat(io_bat_index, virt, phys, size, flags);
326 ++io_bat_index;
327 return;
328 }
329#endif /* HAVE_BATS */
330
331#ifdef HAVE_TLBCAM
332 /*
333 * Use a CAM for this if possible...
334 */
335 if (tlbcam_index < num_tlbcam_entries && is_power_of_4(size)
336 && (virt & (size - 1)) == 0 && (phys & (size - 1)) == 0) {
337 settlbcam(tlbcam_index, virt, phys, size, flags, 0);
338 ++tlbcam_index;
339 return;
340 }
341#endif /* HAVE_TLBCAM */
342
343 /* No BATs available, put it in the page tables. */
344 for (i = 0; i < size; i += PAGE_SIZE)
345 map_page(virt + i, phys + i, flags);
346}
347
348/* Scan the real Linux page tables and return a PTE pointer for 301/* Scan the real Linux page tables and return a PTE pointer for
349 * a virtual address in a context. 302 * a virtual address in a context.
350 * Returns true (1) if PTE was found, zero otherwise. The pointer to 303 * Returns true (1) if PTE was found, zero otherwise. The pointer to
@@ -379,82 +332,6 @@ get_pteptr(struct mm_struct *mm, unsigned long addr, pte_t **ptep, pmd_t **pmdp)
379 return(retval); 332 return(retval);
380} 333}
381 334
382/* Find physical address for this virtual address. Normally used by
383 * I/O functions, but anyone can call it.
384 */
385unsigned long iopa(unsigned long addr)
386{
387 unsigned long pa;
388
389 /* I don't know why this won't work on PMacs or CHRP. It
390 * appears there is some bug, or there is some implicit
391 * mapping done not properly represented by BATs or in page
392 * tables.......I am actively working on resolving this, but
393 * can't hold up other stuff. -- Dan
394 */
395 pte_t *pte;
396 struct mm_struct *mm;
397
398 /* Check the BATs */
399 pa = v_mapped_by_bats(addr);
400 if (pa)
401 return pa;
402
403 /* Allow mapping of user addresses (within the thread)
404 * for DMA if necessary.
405 */
406 if (addr < TASK_SIZE)
407 mm = current->mm;
408 else
409 mm = &init_mm;
410
411 pa = 0;
412 if (get_pteptr(mm, addr, &pte, NULL)) {
413 pa = (pte_val(*pte) & PAGE_MASK) | (addr & ~PAGE_MASK);
414 pte_unmap(pte);
415 }
416
417 return(pa);
418}
419
420/* This is will find the virtual address for a physical one....
421 * Swiped from APUS, could be dangerous :-).
422 * This is only a placeholder until I really find a way to make this
423 * work. -- Dan
424 */
425unsigned long
426mm_ptov (unsigned long paddr)
427{
428 unsigned long ret;
429#if 0
430 if (paddr < 16*1024*1024)
431 ret = ZTWO_VADDR(paddr);
432 else {
433 int i;
434
435 for (i = 0; i < kmap_chunk_count;){
436 unsigned long phys = kmap_chunks[i++];
437 unsigned long size = kmap_chunks[i++];
438 unsigned long virt = kmap_chunks[i++];
439 if (paddr >= phys
440 && paddr < (phys + size)){
441 ret = virt + paddr - phys;
442 goto exit;
443 }
444 }
445
446 ret = (unsigned long) __va(paddr);
447 }
448exit:
449#ifdef DEBUGPV
450 printk ("PTOV(%lx)=%lx\n", paddr, ret);
451#endif
452#else
453 ret = (unsigned long)paddr + KERNELBASE;
454#endif
455 return ret;
456}
457
458#ifdef CONFIG_DEBUG_PAGEALLOC 335#ifdef CONFIG_DEBUG_PAGEALLOC
459 336
460static int __change_page_attr(struct page *page, pgprot_t prot) 337static int __change_page_attr(struct page *page, pgprot_t prot)
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c
index ad6e135bf2..3dfd10db93 100644
--- a/arch/powerpc/mm/pgtable_64.c
+++ b/arch/powerpc/mm/pgtable_64.c
@@ -7,7 +7,6 @@
7 * Modifications by Paul Mackerras (PowerMac) (paulus@samba.org) 7 * Modifications by Paul Mackerras (PowerMac) (paulus@samba.org)
8 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 8 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
9 * Copyright (C) 1996 Paul Mackerras 9 * Copyright (C) 1996 Paul Mackerras
10 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
11 * 10 *
12 * Derived from "arch/i386/mm/init.c" 11 * Derived from "arch/i386/mm/init.c"
13 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 12 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
@@ -34,41 +33,27 @@
34#include <linux/stddef.h> 33#include <linux/stddef.h>
35#include <linux/vmalloc.h> 34#include <linux/vmalloc.h>
36#include <linux/init.h> 35#include <linux/init.h>
37#include <linux/delay.h>
38#include <linux/bootmem.h>
39#include <linux/highmem.h>
40#include <linux/idr.h>
41#include <linux/nodemask.h>
42#include <linux/module.h>
43 36
44#include <asm/pgalloc.h> 37#include <asm/pgalloc.h>
45#include <asm/page.h> 38#include <asm/page.h>
46#include <asm/prom.h> 39#include <asm/prom.h>
47#include <asm/lmb.h>
48#include <asm/rtas.h>
49#include <asm/io.h> 40#include <asm/io.h>
50#include <asm/mmu_context.h> 41#include <asm/mmu_context.h>
51#include <asm/pgtable.h> 42#include <asm/pgtable.h>
52#include <asm/mmu.h> 43#include <asm/mmu.h>
53#include <asm/uaccess.h>
54#include <asm/smp.h> 44#include <asm/smp.h>
55#include <asm/machdep.h> 45#include <asm/machdep.h>
56#include <asm/tlb.h> 46#include <asm/tlb.h>
57#include <asm/eeh.h>
58#include <asm/processor.h> 47#include <asm/processor.h>
59#include <asm/mmzone.h>
60#include <asm/cputable.h> 48#include <asm/cputable.h>
61#include <asm/sections.h> 49#include <asm/sections.h>
62#include <asm/system.h> 50#include <asm/system.h>
63#include <asm/iommu.h>
64#include <asm/abs_addr.h> 51#include <asm/abs_addr.h>
65#include <asm/vdso.h>
66#include <asm/firmware.h> 52#include <asm/firmware.h>
67 53
68#include "mmu_decl.h" 54#include "mmu_decl.h"
69 55
70unsigned long ioremap_bot = IMALLOC_BASE; 56unsigned long ioremap_bot = IOREMAP_BASE;
71static unsigned long phbs_io_bot = PHBS_IO_BASE;
72 57
73/* 58/*
74 * map_io_page currently only called by __ioremap 59 * map_io_page currently only called by __ioremap
@@ -102,8 +87,8 @@ static int map_io_page(unsigned long ea, unsigned long pa, int flags)
102 * entry in the hardware page table. 87 * entry in the hardware page table.
103 * 88 *
104 */ 89 */
105 if (htab_bolt_mapping(ea, ea + PAGE_SIZE, pa, flags, 90 if (htab_bolt_mapping(ea, (unsigned long)ea + PAGE_SIZE,
106 mmu_io_psize)) { 91 pa, flags, mmu_io_psize)) {
107 printk(KERN_ERR "Failed to do bolted mapping IO " 92 printk(KERN_ERR "Failed to do bolted mapping IO "
108 "memory at %016lx !\n", pa); 93 "memory at %016lx !\n", pa);
109 return -ENOMEM; 94 return -ENOMEM;
@@ -113,8 +98,11 @@ static int map_io_page(unsigned long ea, unsigned long pa, int flags)
113} 98}
114 99
115 100
116static void __iomem * __ioremap_com(phys_addr_t addr, unsigned long pa, 101/**
117 unsigned long ea, unsigned long size, 102 * __ioremap_at - Low level function to establish the page tables
103 * for an IO mapping
104 */
105void __iomem * __ioremap_at(phys_addr_t pa, void *ea, unsigned long size,
118 unsigned long flags) 106 unsigned long flags)
119{ 107{
120 unsigned long i; 108 unsigned long i;
@@ -122,17 +110,35 @@ static void __iomem * __ioremap_com(phys_addr_t addr, unsigned long pa,
122 if ((flags & _PAGE_PRESENT) == 0) 110 if ((flags & _PAGE_PRESENT) == 0)
123 flags |= pgprot_val(PAGE_KERNEL); 111 flags |= pgprot_val(PAGE_KERNEL);
124 112
113 WARN_ON(pa & ~PAGE_MASK);
114 WARN_ON(((unsigned long)ea) & ~PAGE_MASK);
115 WARN_ON(size & ~PAGE_MASK);
116
125 for (i = 0; i < size; i += PAGE_SIZE) 117 for (i = 0; i < size; i += PAGE_SIZE)
126 if (map_io_page(ea+i, pa+i, flags)) 118 if (map_io_page((unsigned long)ea+i, pa+i, flags))
127 return NULL; 119 return NULL;
128 120
129 return (void __iomem *) (ea + (addr & ~PAGE_MASK)); 121 return (void __iomem *)ea;
122}
123
124/**
125 * __iounmap_from - Low level function to tear down the page tables
126 * for an IO mapping. This is used for mappings that
127 * are manipulated manually, like partial unmapping of
128 * PCI IOs or ISA space.
129 */
130void __iounmap_at(void *ea, unsigned long size)
131{
132 WARN_ON(((unsigned long)ea) & ~PAGE_MASK);
133 WARN_ON(size & ~PAGE_MASK);
134
135 unmap_kernel_range((unsigned long)ea, size);
130} 136}
131 137
132void __iomem * __ioremap(phys_addr_t addr, unsigned long size, 138void __iomem * __ioremap(phys_addr_t addr, unsigned long size,
133 unsigned long flags) 139 unsigned long flags)
134{ 140{
135 unsigned long pa, ea; 141 phys_addr_t paligned;
136 void __iomem *ret; 142 void __iomem *ret;
137 143
138 /* 144 /*
@@ -144,27 +150,30 @@ void __iomem * __ioremap(phys_addr_t addr, unsigned long size,
144 * IMALLOC_END 150 * IMALLOC_END
145 * 151 *
146 */ 152 */
147 pa = addr & PAGE_MASK; 153 paligned = addr & PAGE_MASK;
148 size = PAGE_ALIGN(addr + size) - pa; 154 size = PAGE_ALIGN(addr + size) - paligned;
149 155
150 if ((size == 0) || (pa == 0)) 156 if ((size == 0) || (paligned == 0))
151 return NULL; 157 return NULL;
152 158
153 if (mem_init_done) { 159 if (mem_init_done) {
154 struct vm_struct *area; 160 struct vm_struct *area;
155 area = im_get_free_area(size); 161
162 area = __get_vm_area(size, VM_IOREMAP,
163 ioremap_bot, IOREMAP_END);
156 if (area == NULL) 164 if (area == NULL)
157 return NULL; 165 return NULL;
158 ea = (unsigned long)(area->addr); 166 ret = __ioremap_at(paligned, area->addr, size, flags);
159 ret = __ioremap_com(addr, pa, ea, size, flags);
160 if (!ret) 167 if (!ret)
161 im_free(area->addr); 168 vunmap(area->addr);
162 } else { 169 } else {
163 ea = ioremap_bot; 170 ret = __ioremap_at(paligned, (void *)ioremap_bot, size, flags);
164 ret = __ioremap_com(addr, pa, ea, size, flags);
165 if (ret) 171 if (ret)
166 ioremap_bot += size; 172 ioremap_bot += size;
167 } 173 }
174
175 if (ret)
176 ret += addr & ~PAGE_MASK;
168 return ret; 177 return ret;
169} 178}
170 179
@@ -187,62 +196,9 @@ void __iomem * ioremap_flags(phys_addr_t addr, unsigned long size,
187} 196}
188 197
189 198
190#define IS_PAGE_ALIGNED(_val) ((_val) == ((_val) & PAGE_MASK))
191
192int __ioremap_explicit(phys_addr_t pa, unsigned long ea,
193 unsigned long size, unsigned long flags)
194{
195 struct vm_struct *area;
196 void __iomem *ret;
197
198 /* For now, require page-aligned values for pa, ea, and size */
199 if (!IS_PAGE_ALIGNED(pa) || !IS_PAGE_ALIGNED(ea) ||
200 !IS_PAGE_ALIGNED(size)) {
201 printk(KERN_ERR "unaligned value in %s\n", __FUNCTION__);
202 return 1;
203 }
204
205 if (!mem_init_done) {
206 /* Two things to consider in this case:
207 * 1) No records will be kept (imalloc, etc) that the region
208 * has been remapped
209 * 2) It won't be easy to iounmap() the region later (because
210 * of 1)
211 */
212 ;
213 } else {
214 area = im_get_area(ea, size,
215 IM_REGION_UNUSED|IM_REGION_SUBSET|IM_REGION_EXISTS);
216 if (area == NULL) {
217 /* Expected when PHB-dlpar is in play */
218 return 1;
219 }
220 if (ea != (unsigned long) area->addr) {
221 printk(KERN_ERR "unexpected addr return from "
222 "im_get_area\n");
223 return 1;
224 }
225 }
226
227 ret = __ioremap_com(pa, pa, ea, size, flags);
228 if (ret == NULL) {
229 printk(KERN_ERR "ioremap_explicit() allocation failure !\n");
230 return 1;
231 }
232 if (ret != (void *) ea) {
233 printk(KERN_ERR "__ioremap_com() returned unexpected addr\n");
234 return 1;
235 }
236
237 return 0;
238}
239
240/* 199/*
241 * Unmap an IO region and remove it from imalloc'd list. 200 * Unmap an IO region and remove it from imalloc'd list.
242 * Access to IO memory should be serialized by driver. 201 * Access to IO memory should be serialized by driver.
243 * This code is modeled after vmalloc code - unmap_vm_area()
244 *
245 * XXX what about calls before mem_init_done (ie python_countermeasures())
246 */ 202 */
247void __iounmap(volatile void __iomem *token) 203void __iounmap(volatile void __iomem *token)
248{ 204{
@@ -251,9 +207,14 @@ void __iounmap(volatile void __iomem *token)
251 if (!mem_init_done) 207 if (!mem_init_done)
252 return; 208 return;
253 209
254 addr = (void *) ((unsigned long __force) token & PAGE_MASK); 210 addr = (void *) ((unsigned long __force)
255 211 PCI_FIX_ADDR(token) & PAGE_MASK);
256 im_free(addr); 212 if ((unsigned long)addr < ioremap_bot) {
213 printk(KERN_WARNING "Attempt to iounmap early bolted mapping"
214 " at 0x%p\n", addr);
215 return;
216 }
217 vunmap(addr);
257} 218}
258 219
259void iounmap(volatile void __iomem *token) 220void iounmap(volatile void __iomem *token)
@@ -264,77 +225,8 @@ void iounmap(volatile void __iomem *token)
264 __iounmap(token); 225 __iounmap(token);
265} 226}
266 227
267static int iounmap_subset_regions(unsigned long addr, unsigned long size)
268{
269 struct vm_struct *area;
270
271 /* Check whether subsets of this region exist */
272 area = im_get_area(addr, size, IM_REGION_SUPERSET);
273 if (area == NULL)
274 return 1;
275
276 while (area) {
277 iounmap((void __iomem *) area->addr);
278 area = im_get_area(addr, size,
279 IM_REGION_SUPERSET);
280 }
281
282 return 0;
283}
284
285int __iounmap_explicit(volatile void __iomem *start, unsigned long size)
286{
287 struct vm_struct *area;
288 unsigned long addr;
289 int rc;
290
291 addr = (unsigned long __force) start & PAGE_MASK;
292
293 /* Verify that the region either exists or is a subset of an existing
294 * region. In the latter case, split the parent region to create
295 * the exact region
296 */
297 area = im_get_area(addr, size,
298 IM_REGION_EXISTS | IM_REGION_SUBSET);
299 if (area == NULL) {
300 /* Determine whether subset regions exist. If so, unmap */
301 rc = iounmap_subset_regions(addr, size);
302 if (rc) {
303 printk(KERN_ERR
304 "%s() cannot unmap nonexistent range 0x%lx\n",
305 __FUNCTION__, addr);
306 return 1;
307 }
308 } else {
309 iounmap((void __iomem *) area->addr);
310 }
311 /*
312 * FIXME! This can't be right:
313 iounmap(area->addr);
314 * Maybe it should be "iounmap(area);"
315 */
316 return 0;
317}
318
319EXPORT_SYMBOL(ioremap); 228EXPORT_SYMBOL(ioremap);
320EXPORT_SYMBOL(ioremap_flags); 229EXPORT_SYMBOL(ioremap_flags);
321EXPORT_SYMBOL(__ioremap); 230EXPORT_SYMBOL(__ioremap);
322EXPORT_SYMBOL(iounmap); 231EXPORT_SYMBOL(iounmap);
323EXPORT_SYMBOL(__iounmap); 232EXPORT_SYMBOL(__iounmap);
324
325static DEFINE_SPINLOCK(phb_io_lock);
326
327void __iomem * reserve_phb_iospace(unsigned long size)
328{
329 void __iomem *virt_addr;
330
331 if (phbs_io_bot >= IMALLOC_BASE)
332 panic("reserve_phb_iospace(): phb io space overflow\n");
333
334 spin_lock(&phb_io_lock);
335 virt_addr = (void __iomem *) phbs_io_bot;
336 phbs_io_bot += size;
337 spin_unlock(&phb_io_lock);
338
339 return virt_addr;
340}
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index ec1421a20a..5c45d474cf 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -11,7 +11,6 @@
11 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 11 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
12 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 12 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
13 * Copyright (C) 1996 Paul Mackerras 13 * Copyright (C) 1996 Paul Mackerras
14 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
15 * 14 *
16 * Derived from "arch/i386/mm/init.c" 15 * Derived from "arch/i386/mm/init.c"
17 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 16 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
@@ -35,12 +34,12 @@
35 34
36#include "mmu_decl.h" 35#include "mmu_decl.h"
37 36
38PTE *Hash, *Hash_end; 37struct hash_pte *Hash, *Hash_end;
39unsigned long Hash_size, Hash_mask; 38unsigned long Hash_size, Hash_mask;
40unsigned long _SDR1; 39unsigned long _SDR1;
41 40
42union ubat { /* BAT register values to be loaded */ 41union ubat { /* BAT register values to be loaded */
43 BAT bat; 42 struct ppc_bat bat;
44 u32 word[2]; 43 u32 word[2];
45} BATS[8][2]; /* 8 pairs of IBAT, DBAT */ 44} BATS[8][2]; /* 8 pairs of IBAT, DBAT */
46 45
@@ -245,7 +244,7 @@ void __init MMU_init_hw(void)
245 cacheable_memzero(Hash, Hash_size); 244 cacheable_memzero(Hash, Hash_size);
246 _SDR1 = __pa(Hash) | SDR1_LOW_BITS; 245 _SDR1 = __pa(Hash) | SDR1_LOW_BITS;
247 246
248 Hash_end = (PTE *) ((unsigned long)Hash + Hash_size); 247 Hash_end = (struct hash_pte *) ((unsigned long)Hash + Hash_size);
249 248
250 printk("Total memory = %ldMB; using %ldkB for hash table (at %p)\n", 249 printk("Total memory = %ldMB; using %ldkB for hash table (at %p)\n",
251 total_memory >> 20, Hash_size >> 10, Hash); 250 total_memory >> 20, Hash_size >> 10, Hash);
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c
index 132c6bc66c..28492bbdee 100644
--- a/arch/powerpc/mm/stab.c
+++ b/arch/powerpc/mm/stab.c
@@ -55,7 +55,7 @@ static int make_ste(unsigned long stab, unsigned long esid, unsigned long vsid)
55 for (entry = 0; entry < 8; entry++, ste++) { 55 for (entry = 0; entry < 8; entry++, ste++) {
56 if (!(ste->esid_data & STE_ESID_V)) { 56 if (!(ste->esid_data & STE_ESID_V)) {
57 ste->vsid_data = vsid_data; 57 ste->vsid_data = vsid_data;
58 asm volatile("eieio":::"memory"); 58 eieio();
59 ste->esid_data = esid_data; 59 ste->esid_data = esid_data;
60 return (global_entry | entry); 60 return (global_entry | entry);
61 } 61 }
@@ -101,7 +101,7 @@ static int make_ste(unsigned long stab, unsigned long esid, unsigned long vsid)
101 asm volatile("sync" : : : "memory"); /* Order update */ 101 asm volatile("sync" : : : "memory"); /* Order update */
102 102
103 castout_ste->vsid_data = vsid_data; 103 castout_ste->vsid_data = vsid_data;
104 asm volatile("eieio" : : : "memory"); /* Order update */ 104 eieio(); /* Order update */
105 castout_ste->esid_data = esid_data; 105 castout_ste->esid_data = esid_data;
106 106
107 asm volatile("slbie %0" : : "r" (old_esid << SID_SHIFT)); 107 asm volatile("slbie %0" : : "r" (old_esid << SID_SHIFT));
diff --git a/arch/powerpc/mm/tlb_32.c b/arch/powerpc/mm/tlb_32.c
index 6a69417cbc..06c7e77e09 100644
--- a/arch/powerpc/mm/tlb_32.c
+++ b/arch/powerpc/mm/tlb_32.c
@@ -11,7 +11,6 @@
11 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 11 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
12 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 12 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
13 * Copyright (C) 1996 Paul Mackerras 13 * Copyright (C) 1996 Paul Mackerras
14 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
15 * 14 *
16 * Derived from "arch/i386/mm/init.c" 15 * Derived from "arch/i386/mm/init.c"
17 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 16 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
diff --git a/arch/powerpc/mm/tlb_64.c b/arch/powerpc/mm/tlb_64.c
index 2bfc4d7e1a..cbd34fc813 100644
--- a/arch/powerpc/mm/tlb_64.c
+++ b/arch/powerpc/mm/tlb_64.c
@@ -8,7 +8,6 @@
8 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) 8 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
9 * and Cort Dougan (PReP) (cort@cs.nmt.edu) 9 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
10 * Copyright (C) 1996 Paul Mackerras 10 * Copyright (C) 1996 Paul Mackerras
11 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
12 * 11 *
13 * Derived from "arch/i386/mm/init.c" 12 * Derived from "arch/i386/mm/init.c"
14 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 13 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
@@ -239,3 +238,59 @@ void pte_free_finish(void)
239 pte_free_submit(*batchp); 238 pte_free_submit(*batchp);
240 *batchp = NULL; 239 *batchp = NULL;
241} 240}
241
242/**
243 * __flush_hash_table_range - Flush all HPTEs for a given address range
244 * from the hash table (and the TLB). But keeps
245 * the linux PTEs intact.
246 *
247 * @mm : mm_struct of the target address space (generally init_mm)
248 * @start : starting address
249 * @end : ending address (not included in the flush)
250 *
251 * This function is mostly to be used by some IO hotplug code in order
252 * to remove all hash entries from a given address range used to map IO
253 * space on a removed PCI-PCI bidge without tearing down the full mapping
254 * since 64K pages may overlap with other bridges when using 64K pages
255 * with 4K HW pages on IO space.
256 *
257 * Because of that usage pattern, it's only available with CONFIG_HOTPLUG
258 * and is implemented for small size rather than speed.
259 */
260#ifdef CONFIG_HOTPLUG
261
262void __flush_hash_table_range(struct mm_struct *mm, unsigned long start,
263 unsigned long end)
264{
265 unsigned long flags;
266
267 start = _ALIGN_DOWN(start, PAGE_SIZE);
268 end = _ALIGN_UP(end, PAGE_SIZE);
269
270 BUG_ON(!mm->pgd);
271
272 /* Note: Normally, we should only ever use a batch within a
273 * PTE locked section. This violates the rule, but will work
274 * since we don't actually modify the PTEs, we just flush the
275 * hash while leaving the PTEs intact (including their reference
276 * to being hashed). This is not the most performance oriented
277 * way to do things but is fine for our needs here.
278 */
279 local_irq_save(flags);
280 arch_enter_lazy_mmu_mode();
281 for (; start < end; start += PAGE_SIZE) {
282 pte_t *ptep = find_linux_pte(mm->pgd, start);
283 unsigned long pte;
284
285 if (ptep == NULL)
286 continue;
287 pte = pte_val(*ptep);
288 if (!(pte & _PAGE_HASHPTE))
289 continue;
290 hpte_need_flush(mm, start, ptep, pte, 0);
291 }
292 arch_leave_lazy_mmu_mode();
293 local_irq_restore(flags);
294}
295
296#endif /* CONFIG_HOTPLUG */
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c
index fe597a154d..a7c206b665 100644
--- a/arch/powerpc/oprofile/op_model_power4.c
+++ b/arch/powerpc/oprofile/op_model_power4.c
@@ -1,5 +1,7 @@
1/* 1/*
2 * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM 2 * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM
3 * Added mmcra[slot] support:
4 * Copyright (C) 2006-2007 Will Schmidt <willschm@us.ibm.com>, IBM
3 * 5 *
4 * This program is free software; you can redistribute it and/or 6 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License 7 * modify it under the terms of the GNU General Public License
@@ -181,11 +183,17 @@ static void __attribute_used__ kernel_unknown_bucket(void)
181 * On GQ and newer the MMCRA stores the HV and PR bits at the time 183 * On GQ and newer the MMCRA stores the HV and PR bits at the time
182 * the SIAR was sampled. We use that to work out if the SIAR was sampled in 184 * the SIAR was sampled. We use that to work out if the SIAR was sampled in
183 * the hypervisor, our exception vectors or RTAS. 185 * the hypervisor, our exception vectors or RTAS.
186 * If the MMCRA_SAMPLE_ENABLE bit is set, we can use the MMCRA[slot] bits
187 * to more accurately identify the address of the sampled instruction. The
188 * mmcra[slot] bits represent the slot number of a sampled instruction
189 * within an instruction group. The slot will contain a value between 1
190 * and 5 if MMCRA_SAMPLE_ENABLE is set, otherwise 0.
184 */ 191 */
185static unsigned long get_pc(struct pt_regs *regs) 192static unsigned long get_pc(struct pt_regs *regs)
186{ 193{
187 unsigned long pc = mfspr(SPRN_SIAR); 194 unsigned long pc = mfspr(SPRN_SIAR);
188 unsigned long mmcra; 195 unsigned long mmcra;
196 unsigned long slot;
189 197
190 /* Cant do much about it */ 198 /* Cant do much about it */
191 if (!cur_cpu_spec->oprofile_mmcra_sihv) 199 if (!cur_cpu_spec->oprofile_mmcra_sihv)
@@ -193,6 +201,12 @@ static unsigned long get_pc(struct pt_regs *regs)
193 201
194 mmcra = mfspr(SPRN_MMCRA); 202 mmcra = mfspr(SPRN_MMCRA);
195 203
204 if (mmcra & MMCRA_SAMPLE_ENABLE) {
205 slot = ((mmcra & MMCRA_SLOT) >> MMCRA_SLOT_SHIFT);
206 if (slot > 1)
207 pc += 4 * (slot - 1);
208 }
209
196 /* Were we in the hypervisor? */ 210 /* Were we in the hypervisor? */
197 if (firmware_has_feature(FW_FEATURE_LPAR) && 211 if (firmware_has_feature(FW_FEATURE_LPAR) &&
198 (mmcra & cur_cpu_spec->oprofile_mmcra_sihv)) 212 (mmcra & cur_cpu_spec->oprofile_mmcra_sihv))
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c
index f591a9fc19..4be6e7a17b 100644
--- a/arch/powerpc/platforms/52xx/efika.c
+++ b/arch/powerpc/platforms/52xx/efika.c
@@ -54,7 +54,7 @@ static int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
54 struct pci_controller *hose = bus->sysdata; 54 struct pci_controller *hose = bus->sysdata;
55 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) 55 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
56 | (((bus->number - hose->first_busno) & 0xff) << 16) 56 | (((bus->number - hose->first_busno) & 0xff) << 16)
57 | (hose->index << 24); 57 | (hose->global_number << 24);
58 int ret = -1; 58 int ret = -1;
59 int rval; 59 int rval;
60 60
@@ -69,7 +69,7 @@ static int rtas_write_config(struct pci_bus *bus, unsigned int devfn,
69 struct pci_controller *hose = bus->sysdata; 69 struct pci_controller *hose = bus->sysdata;
70 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) 70 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
71 | (((bus->number - hose->first_busno) & 0xff) << 16) 71 | (((bus->number - hose->first_busno) & 0xff) << 16)
72 | (hose->index << 24); 72 | (hose->global_number << 24);
73 int rval; 73 int rval;
74 74
75 rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL, 75 rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL,
@@ -83,7 +83,7 @@ static struct pci_ops rtas_pci_ops = {
83}; 83};
84 84
85 85
86void __init efika_pcisetup(void) 86static void __init efika_pcisetup(void)
87{ 87{
88 const int *bus_range; 88 const int *bus_range;
89 int len; 89 int len;
@@ -128,7 +128,7 @@ void __init efika_pcisetup(void)
128 printk(" controlled by %s\n", pcictrl->full_name); 128 printk(" controlled by %s\n", pcictrl->full_name);
129 printk("\n"); 129 printk("\n");
130 130
131 hose = pcibios_alloc_controller(); 131 hose = pcibios_alloc_controller(of_node_get(pcictrl));
132 if (!hose) { 132 if (!hose) {
133 printk(KERN_WARNING EFIKA_PLATFORM_NAME 133 printk(KERN_WARNING EFIKA_PLATFORM_NAME
134 ": Can't allocate PCI controller structure for %s\n", 134 ": Can't allocate PCI controller structure for %s\n",
@@ -136,7 +136,6 @@ void __init efika_pcisetup(void)
136 return; 136 return;
137 } 137 }
138 138
139 hose->arch_data = of_node_get(pcictrl);
140 hose->first_busno = bus_range[0]; 139 hose->first_busno = bus_range[0];
141 hose->last_busno = bus_range[1]; 140 hose->last_busno = bus_range[1];
142 hose->ops = &rtas_pci_ops; 141 hose->ops = &rtas_pci_ops;
@@ -145,7 +144,7 @@ void __init efika_pcisetup(void)
145} 144}
146 145
147#else 146#else
148void __init efika_pcisetup(void) 147static void __init efika_pcisetup(void)
149{} 148{}
150#endif 149#endif
151 150
@@ -252,6 +251,8 @@ define_machine(efika)
252 .progress = rtas_progress, 251 .progress = rtas_progress,
253 .get_boot_time = rtas_get_boot_time, 252 .get_boot_time = rtas_get_boot_time,
254 .calibrate_decr = generic_calibrate_decr, 253 .calibrate_decr = generic_calibrate_decr,
254#ifdef CONFIG_PCI
255 .phys_mem_access_prot = pci_phys_mem_access_prot, 255 .phys_mem_access_prot = pci_phys_mem_access_prot,
256#endif
256}; 257};
257 258
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index 1cfc00dfb9..5c46e898fd 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -156,7 +156,7 @@ static void __init lite5200_setup_arch(void)
156 156
157} 157}
158 158
159void lite5200_show_cpuinfo(struct seq_file *m) 159static void lite5200_show_cpuinfo(struct seq_file *m)
160{ 160{
161 struct device_node* np = of_find_all_nodes(NULL); 161 struct device_node* np = of_find_all_nodes(NULL);
162 const char *model = NULL; 162 const char *model = NULL;
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index 34d34a26d3..4c6c82a684 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -112,18 +112,18 @@ mpc52xx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
112 u32 value; 112 u32 value;
113 113
114 if (ppc_md.pci_exclude_device) 114 if (ppc_md.pci_exclude_device)
115 if (ppc_md.pci_exclude_device(bus->number, devfn)) 115 if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
116 return PCIBIOS_DEVICE_NOT_FOUND; 116 return PCIBIOS_DEVICE_NOT_FOUND;
117 117
118 out_be32(hose->cfg_addr, 118 out_be32(hose->cfg_addr,
119 (1 << 31) | 119 (1 << 31) |
120 ((bus->number - hose->bus_offset) << 16) | 120 (bus->number << 16) |
121 (devfn << 8) | 121 (devfn << 8) |
122 (offset & 0xfc)); 122 (offset & 0xfc));
123 mb(); 123 mb();
124 124
125#if defined(CONFIG_PPC_MPC5200_BUGFIX) 125#if defined(CONFIG_PPC_MPC5200_BUGFIX)
126 if (bus->number != hose->bus_offset) { 126 if (bus->number) {
127 /* workaround for the bug 435 of the MPC5200 (L25R); 127 /* workaround for the bug 435 of the MPC5200 (L25R);
128 * Don't do 32 bits config access during type-1 cycles */ 128 * Don't do 32 bits config access during type-1 cycles */
129 switch (len) { 129 switch (len) {
@@ -169,18 +169,18 @@ mpc52xx_pci_write_config(struct pci_bus *bus, unsigned int devfn,
169 u32 value, mask; 169 u32 value, mask;
170 170
171 if (ppc_md.pci_exclude_device) 171 if (ppc_md.pci_exclude_device)
172 if (ppc_md.pci_exclude_device(bus->number, devfn)) 172 if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
173 return PCIBIOS_DEVICE_NOT_FOUND; 173 return PCIBIOS_DEVICE_NOT_FOUND;
174 174
175 out_be32(hose->cfg_addr, 175 out_be32(hose->cfg_addr,
176 (1 << 31) | 176 (1 << 31) |
177 ((bus->number - hose->bus_offset) << 16) | 177 (bus->number << 16) |
178 (devfn << 8) | 178 (devfn << 8) |
179 (offset & 0xfc)); 179 (offset & 0xfc));
180 mb(); 180 mb();
181 181
182#if defined(CONFIG_PPC_MPC5200_BUGFIX) 182#if defined(CONFIG_PPC_MPC5200_BUGFIX)
183 if (bus->number != hose->bus_offset) { 183 if (bus->number) {
184 /* workaround for the bug 435 of the MPC5200 (L25R); 184 /* workaround for the bug 435 of the MPC5200 (L25R);
185 * Don't do 32 bits config access during type-1 cycles */ 185 * Don't do 32 bits config access during type-1 cycles */
186 switch (len) { 186 switch (len) {
@@ -385,17 +385,13 @@ mpc52xx_add_bridge(struct device_node *node)
385 * tree are needed to configure the 52xx PCI controller. Rather 385 * tree are needed to configure the 52xx PCI controller. Rather
386 * than parse the tree here, let pci_process_bridge_OF_ranges() 386 * than parse the tree here, let pci_process_bridge_OF_ranges()
387 * do it for us and extract the values after the fact */ 387 * do it for us and extract the values after the fact */
388 hose = pcibios_alloc_controller(); 388 hose = pcibios_alloc_controller(node);
389 if (!hose) 389 if (!hose)
390 return -ENOMEM; 390 return -ENOMEM;
391 391
392 hose->arch_data = node;
393 hose->set_cfg_type = 1;
394
395 hose->first_busno = bus_range ? bus_range[0] : 0; 392 hose->first_busno = bus_range ? bus_range[0] : 0;
396 hose->last_busno = bus_range ? bus_range[1] : 0xff; 393 hose->last_busno = bus_range ? bus_range[1] : 0xff;
397 394
398 hose->bus_offset = 0;
399 hose->ops = &mpc52xx_pci_ops; 395 hose->ops = &mpc52xx_pci_ops;
400 396
401 pci_regs = ioremap(rsrc.start, rsrc.end - rsrc.start + 1); 397 pci_regs = ioremap(rsrc.start, rsrc.end - rsrc.start + 1);
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pm.c b/arch/powerpc/platforms/52xx/mpc52xx_pm.c
index fd40044d16..ee2e7639c6 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pm.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pm.c
@@ -9,8 +9,8 @@
9 9
10 10
11/* these are defined in mpc52xx_sleep.S, and only used here */ 11/* these are defined in mpc52xx_sleep.S, and only used here */
12extern void mpc52xx_deep_sleep(void *sram, void *sdram_regs, 12extern void mpc52xx_deep_sleep(void __iomem *sram, void __iomem *sdram_regs,
13 struct mpc52xx_cdm *, struct mpc52xx_intr *); 13 struct mpc52xx_cdm __iomem *, struct mpc52xx_intr __iomem*);
14extern void mpc52xx_ds_sram(void); 14extern void mpc52xx_ds_sram(void);
15extern const long mpc52xx_ds_sram_size; 15extern const long mpc52xx_ds_sram_size;
16extern void mpc52xx_ds_cached(void); 16extern void mpc52xx_ds_cached(void);
@@ -21,7 +21,7 @@ static void __iomem *sdram;
21static struct mpc52xx_cdm __iomem *cdm; 21static struct mpc52xx_cdm __iomem *cdm;
22static struct mpc52xx_intr __iomem *intr; 22static struct mpc52xx_intr __iomem *intr;
23static struct mpc52xx_gpio_wkup __iomem *gpiow; 23static struct mpc52xx_gpio_wkup __iomem *gpiow;
24static void *sram; 24static void __iomem *sram;
25static int sram_size; 25static int sram_size;
26 26
27struct mpc52xx_suspend mpc52xx_suspend; 27struct mpc52xx_suspend mpc52xx_suspend;
@@ -100,7 +100,7 @@ int mpc52xx_pm_enter(suspend_state_t state)
100 u32 clk_enables; 100 u32 clk_enables;
101 u32 msr, hid0; 101 u32 msr, hid0;
102 u32 intr_main_mask; 102 u32 intr_main_mask;
103 void __iomem * irq_0x500 = (void *)CONFIG_KERNEL_START + 0x500; 103 void __iomem * irq_0x500 = (void __iomem *)CONFIG_KERNEL_START + 0x500;
104 unsigned long irq_0x500_stop = (unsigned long)irq_0x500 + mpc52xx_ds_cached_size; 104 unsigned long irq_0x500_stop = (unsigned long)irq_0x500 + mpc52xx_ds_cached_size;
105 char saved_0x500[mpc52xx_ds_cached_size]; 105 char saved_0x500[mpc52xx_ds_cached_size];
106 106
diff --git a/arch/powerpc/platforms/82xx/Kconfig b/arch/powerpc/platforms/82xx/Kconfig
index de7fce9cb6..89fde43895 100644
--- a/arch/powerpc/platforms/82xx/Kconfig
+++ b/arch/powerpc/platforms/82xx/Kconfig
@@ -1,5 +1,5 @@
1choice 1choice
2 prompt "Machine Type" 2 prompt "82xx Board Type"
3 depends on PPC_82xx 3 depends on PPC_82xx
4 default MPC82xx_ADS 4 default MPC82xx_ADS
5 5
diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
index 47cb09f080..da20832b27 100644
--- a/arch/powerpc/platforms/82xx/mpc82xx_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
@@ -49,7 +49,7 @@
49#include <linux/fs_enet_pd.h> 49#include <linux/fs_enet_pd.h>
50 50
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.h" 54#include "pq2ads.h"
55 55
@@ -507,7 +507,8 @@ void m82xx_pci_init_irq(void)
507 return; 507 return;
508} 508}
509 509
510static int m82xx_pci_exclude_device(u_char bus, u_char devfn) 510static int m82xx_pci_exclude_device(struct pci_controller *hose,
511 u_char bus, u_char devfn)
511{ 512{
512 if (bus == 0 && PCI_SLOT(devfn) == 0) 513 if (bus == 0 && PCI_SLOT(devfn) == 0)
513 return PCIBIOS_DEVICE_NOT_FOUND; 514 return PCIBIOS_DEVICE_NOT_FOUND;
@@ -515,7 +516,7 @@ static int m82xx_pci_exclude_device(u_char bus, u_char devfn)
515 return PCIBIOS_SUCCESSFUL; 516 return PCIBIOS_SUCCESSFUL;
516} 517}
517 518
518void __init add_bridge(struct device_node *np) 519static void __init mpc82xx_add_bridge(struct device_node *np)
519{ 520{
520 int len; 521 int len;
521 struct pci_controller *hose; 522 struct pci_controller *hose;
@@ -542,19 +543,13 @@ void __init add_bridge(struct device_node *np)
542 543
543 pci_assign_all_buses = 1; 544 pci_assign_all_buses = 1;
544 545
545 hose = pcibios_alloc_controller(); 546 hose = pcibios_alloc_controller(np);
546 547
547 if (!hose) 548 if (!hose)
548 return; 549 return;
549 550
550 hose->arch_data = np;
551 hose->set_cfg_type = 1;
552
553 hose->first_busno = bus_range ? bus_range[0] : 0; 551 hose->first_busno = bus_range ? bus_range[0] : 0;
554 hose->last_busno = bus_range ? bus_range[1] : 0xff; 552 hose->last_busno = bus_range ? bus_range[1] : 0xff;
555 hose->bus_offset = 0;
556
557 hose->set_cfg_type = 1;
558 553
559 setup_indirect_pci(hose, 554 setup_indirect_pci(hose,
560 r.start + offsetof(pci_cpm2_t, pci_cfg_addr), 555 r.start + offsetof(pci_cpm2_t, pci_cfg_addr),
@@ -584,7 +579,7 @@ static void __init mpc82xx_ads_setup_arch(void)
584#ifdef CONFIG_PCI 579#ifdef CONFIG_PCI
585 ppc_md.pci_exclude_device = m82xx_pci_exclude_device; 580 ppc_md.pci_exclude_device = m82xx_pci_exclude_device;
586 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 581 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
587 add_bridge(np); 582 mpc82xx_add_bridge(np);
588 583
589 of_node_put(np); 584 of_node_put(np);
590#endif 585#endif
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index 19cafdf6df..ec305f18ab 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -1,5 +1,5 @@
1choice 1choice
2 prompt "Machine Type" 2 prompt "83xx Board Type"
3 depends on PPC_83xx 3 depends on PPC_83xx
4 default MPC834x_MDS 4 default MPC834x_MDS
5 5
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile
index 31a91b53f5..5a98f88577 100644
--- a/arch/powerpc/platforms/83xx/Makefile
+++ b/arch/powerpc/platforms/83xx/Makefile
@@ -1,7 +1,7 @@
1# 1#
2# Makefile for the PowerPC 83xx linux kernel. 2# Makefile for the PowerPC 83xx linux kernel.
3# 3#
4obj-y := misc.o 4obj-y := misc.o usb.o
5obj-$(CONFIG_PCI) += pci.o 5obj-$(CONFIG_PCI) += pci.o
6obj-$(CONFIG_MPC8313_RDB) += mpc8313_rdb.o 6obj-$(CONFIG_MPC8313_RDB) += mpc8313_rdb.o
7obj-$(CONFIG_MPC832x_RDB) += mpc832x_rdb.o 7obj-$(CONFIG_MPC832x_RDB) += mpc832x_rdb.o
diff --git a/arch/powerpc/platforms/83xx/mpc8313_rdb.c b/arch/powerpc/platforms/83xx/mpc8313_rdb.c
index 96970ac887..3edfe170a0 100644
--- a/arch/powerpc/platforms/83xx/mpc8313_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc8313_rdb.c
@@ -28,11 +28,6 @@
28#define DBG(fmt...) 28#define DBG(fmt...)
29#endif 29#endif
30 30
31#ifndef CONFIG_PCI
32unsigned long isa_io_base = 0;
33unsigned long isa_mem_base = 0;
34#endif
35
36/* ************************************************************************ 31/* ************************************************************************
37 * 32 *
38 * Setup the architecture 33 * Setup the architecture
@@ -49,10 +44,11 @@ static void __init mpc8313_rdb_setup_arch(void)
49 44
50#ifdef CONFIG_PCI 45#ifdef CONFIG_PCI
51 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 46 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
52 add_bridge(np); 47 mpc83xx_add_bridge(np);
53 48
54 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 49 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
55#endif 50#endif
51 mpc831x_usb_cfg();
56} 52}
57 53
58void __init mpc8313_rdb_init_IRQ(void) 54void __init mpc8313_rdb_init_IRQ(void)
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c
index 94843ed52a..b39cb52c6f 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
@@ -49,11 +49,6 @@
49#define DBG(fmt...) 49#define DBG(fmt...)
50#endif 50#endif
51 51
52#ifndef CONFIG_PCI
53unsigned long isa_io_base = 0;
54unsigned long isa_mem_base = 0;
55#endif
56
57static u8 *bcsr_regs = NULL; 52static u8 *bcsr_regs = NULL;
58 53
59/* ************************************************************************ 54/* ************************************************************************
@@ -80,7 +75,7 @@ static void __init mpc832x_sys_setup_arch(void)
80 75
81#ifdef CONFIG_PCI 76#ifdef CONFIG_PCI
82 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 77 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
83 add_bridge(np); 78 mpc83xx_add_bridge(np);
84 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 79 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
85#endif 80#endif
86 81
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
index 3db68b73fc..b2b28a4473 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -32,11 +32,6 @@
32#define DBG(fmt...) 32#define DBG(fmt...)
33#endif 33#endif
34 34
35#ifndef CONFIG_PCI
36unsigned long isa_io_base = 0;
37unsigned long isa_mem_base = 0;
38#endif
39
40/* ************************************************************************ 35/* ************************************************************************
41 * 36 *
42 * Setup the architecture 37 * Setup the architecture
@@ -53,7 +48,7 @@ static void __init mpc832x_rdb_setup_arch(void)
53 48
54#ifdef CONFIG_PCI 49#ifdef CONFIG_PCI
55 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 50 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
56 add_bridge(np); 51 mpc83xx_add_bridge(np);
57 52
58 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 53 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
59#endif 54#endif
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
index 40a01947d6..47ba5446f6 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -38,11 +38,6 @@
38 38
39#include "mpc83xx.h" 39#include "mpc83xx.h"
40 40
41#ifndef CONFIG_PCI
42unsigned long isa_io_base = 0;
43unsigned long isa_mem_base = 0;
44#endif
45
46/* ************************************************************************ 41/* ************************************************************************
47 * 42 *
48 * Setup the architecture 43 * Setup the architecture
@@ -59,10 +54,12 @@ static void __init mpc834x_itx_setup_arch(void)
59 54
60#ifdef CONFIG_PCI 55#ifdef CONFIG_PCI
61 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 56 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
62 add_bridge(np); 57 mpc83xx_add_bridge(np);
63 58
64 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 59 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
65#endif 60#endif
61
62 mpc834x_usb_cfg();
66} 63}
67 64
68static void __init mpc834x_itx_init_IRQ(void) 65static void __init mpc834x_itx_init_IRQ(void)
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c
index 10394b2d7e..4c9ff9cadf 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c
@@ -38,61 +38,17 @@
38 38
39#include "mpc83xx.h" 39#include "mpc83xx.h"
40 40
41#ifndef CONFIG_PCI
42unsigned long isa_io_base = 0;
43unsigned long isa_mem_base = 0;
44#endif
45
46#define BCSR5_INT_USB 0x02 41#define BCSR5_INT_USB 0x02
47/* Note: This is only for PB, not for PB+PIB 42static int mpc834xemds_usb_cfg(void)
48 * On PB only port0 is connected using ULPI */
49static int mpc834x_usb_cfg(void)
50{ 43{
51 unsigned long sccr, sicrl; 44 struct device_node *np;
52 void __iomem *immap;
53 void __iomem *bcsr_regs = NULL; 45 void __iomem *bcsr_regs = NULL;
54 u8 bcsr5; 46 u8 bcsr5;
55 struct device_node *np = NULL;
56 int port0_is_dr = 0;
57
58 if ((np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr")) != NULL)
59 port0_is_dr = 1;
60 if ((np = of_find_compatible_node(NULL, "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 47
48 mpc834x_usb_cfg();
93 /* Map BCSR area */ 49 /* Map BCSR area */
94 np = of_find_node_by_name(NULL, "bcsr"); 50 np = of_find_node_by_name(NULL, "bcsr");
95 if (np != 0) { 51 if (np) {
96 struct resource res; 52 struct resource res;
97 53
98 of_address_to_resource(np, 0, &res); 54 of_address_to_resource(np, 0, &res);
@@ -129,12 +85,12 @@ static void __init mpc834x_mds_setup_arch(void)
129 85
130#ifdef CONFIG_PCI 86#ifdef CONFIG_PCI
131 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 87 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
132 add_bridge(np); 88 mpc83xx_add_bridge(np);
133 89
134 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 90 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
135#endif 91#endif
136 92
137 mpc834x_usb_cfg(); 93 mpc834xemds_usb_cfg();
138} 94}
139 95
140static void __init mpc834x_mds_init_IRQ(void) 96static void __init mpc834x_mds_init_IRQ(void)
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c
index bceeff8bbf..0e615fd65c 100644
--- a/arch/powerpc/platforms/83xx/mpc836x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
@@ -55,11 +55,6 @@
55#define DBG(fmt...) 55#define DBG(fmt...)
56#endif 56#endif
57 57
58#ifndef CONFIG_PCI
59unsigned long isa_io_base = 0;
60unsigned long isa_mem_base = 0;
61#endif
62
63static u8 *bcsr_regs = NULL; 58static u8 *bcsr_regs = NULL;
64 59
65/* ************************************************************************ 60/* ************************************************************************
@@ -86,7 +81,7 @@ static void __init mpc836x_mds_setup_arch(void)
86 81
87#ifdef CONFIG_PCI 82#ifdef CONFIG_PCI
88 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 83 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
89 add_bridge(np); 84 mpc83xx_add_bridge(np);
90 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 85 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
91#endif 86#endif
92 87
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index 9cd03b59c8..589ee55730 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -3,9 +3,11 @@
3 3
4#include <linux/init.h> 4#include <linux/init.h>
5#include <linux/device.h> 5#include <linux/device.h>
6#include <asm/pci-bridge.h>
6 7
7/* System Clock Control Register */ 8/* System Clock Control Register */
8#define MPC83XX_SCCR_OFFS 0xA08 9#define MPC83XX_SCCR_OFFS 0xA08
10#define MPC83XX_SCCR_USB_MASK 0x00f00000
9#define MPC83XX_SCCR_USB_MPHCM_11 0x00c00000 11#define MPC83XX_SCCR_USB_MPHCM_11 0x00c00000
10#define MPC83XX_SCCR_USB_MPHCM_01 0x00400000 12#define MPC83XX_SCCR_USB_MPHCM_01 0x00400000
11#define MPC83XX_SCCR_USB_MPHCM_10 0x00800000 13#define MPC83XX_SCCR_USB_MPHCM_10 0x00800000
@@ -15,21 +17,43 @@
15 17
16/* system i/o configuration register low */ 18/* system i/o configuration register low */
17#define MPC83XX_SICRL_OFFS 0x114 19#define MPC83XX_SICRL_OFFS 0x114
18#define MPC83XX_SICRL_USB0 0x40000000 20#define MPC834X_SICRL_USB_MASK 0x60000000
19#define MPC83XX_SICRL_USB1 0x20000000 21#define MPC834X_SICRL_USB0 0x40000000
22#define MPC834X_SICRL_USB1 0x20000000
23#define MPC831X_SICRL_USB_MASK 0x00000c00
24#define MPC831X_SICRL_USB_ULPI 0x00000800
20 25
21/* system i/o configuration register high */ 26/* system i/o configuration register high */
22#define MPC83XX_SICRH_OFFS 0x118 27#define MPC83XX_SICRH_OFFS 0x118
23#define MPC83XX_SICRH_USB_UTMI 0x00020000 28#define MPC834X_SICRH_USB_UTMI 0x00020000
29#define MPC831X_SICRH_USB_MASK 0x000000e0
30#define MPC831X_SICRH_USB_ULPI 0x000000a0
31
32/* USB Control Register */
33#define FSL_USB2_CONTROL_OFFS 0x500
34#define CONTROL_UTMI_PHY_EN 0x00000200
35#define CONTROL_REFSEL_48MHZ 0x00000080
36#define CONTROL_PHY_CLK_SEL_ULPI 0x00000400
37#define CONTROL_OTG_PORT 0x00000020
38
39/* USB PORTSC Registers */
40#define FSL_USB2_PORTSC1_OFFS 0x184
41#define FSL_USB2_PORTSC2_OFFS 0x188
42#define PORTSCX_PTW_16BIT 0x10000000
43#define PORTSCX_PTS_UTMI 0x00000000
44#define PORTSCX_PTS_ULPI 0x80000000
24 45
25/* 46/*
26 * Declaration for the various functions exported by the 47 * Declaration for the various functions exported by the
27 * mpc83xx_* files. Mostly for use by mpc83xx_setup 48 * mpc83xx_* files. Mostly for use by mpc83xx_setup
28 */ 49 */
29 50
30extern int add_bridge(struct device_node *dev); 51extern int mpc83xx_add_bridge(struct device_node *dev);
31extern int mpc83xx_exclude_device(u_char bus, u_char devfn); 52extern int mpc83xx_exclude_device(struct pci_controller *hose,
53 u_char bus, u_char devfn);
32extern void mpc83xx_restart(char *cmd); 54extern void mpc83xx_restart(char *cmd);
33extern long mpc83xx_time_init(void); 55extern long mpc83xx_time_init(void);
56extern int mpc834x_usb_cfg(void);
57extern int mpc831x_usb_cfg(void);
34 58
35#endif /* __MPC83XX_H__ */ 59#endif /* __MPC83XX_H__ */
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c
index 774457d09e..c0e2b89154 100644
--- a/arch/powerpc/platforms/83xx/pci.c
+++ b/arch/powerpc/platforms/83xx/pci.c
@@ -33,19 +33,14 @@
33#define DBG(x...) 33#define DBG(x...)
34#endif 34#endif
35 35
36int mpc83xx_pci2_busno; 36int mpc83xx_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn)
37
38int mpc83xx_exclude_device(u_char bus, u_char devfn)
39{ 37{
40 if (bus == 0 && PCI_SLOT(devfn) == 0) 38 if ((bus == hose->first_busno) && PCI_SLOT(devfn) == 0)
41 return PCIBIOS_DEVICE_NOT_FOUND; 39 return PCIBIOS_DEVICE_NOT_FOUND;
42 if (mpc83xx_pci2_busno)
43 if (bus == (mpc83xx_pci2_busno) && PCI_SLOT(devfn) == 0)
44 return PCIBIOS_DEVICE_NOT_FOUND;
45 return PCIBIOS_SUCCESSFUL; 40 return PCIBIOS_SUCCESSFUL;
46} 41}
47 42
48int __init add_bridge(struct device_node *dev) 43int __init mpc83xx_add_bridge(struct device_node *dev)
49{ 44{
50 int len; 45 int len;
51 struct pci_controller *hose; 46 struct pci_controller *hose;
@@ -66,11 +61,10 @@ int __init add_bridge(struct device_node *dev)
66 " bus 0\n", dev->full_name); 61 " bus 0\n", dev->full_name);
67 } 62 }
68 63
69 hose = pcibios_alloc_controller(); 64 pci_assign_all_buses = 1;
65 hose = pcibios_alloc_controller(dev);
70 if (!hose) 66 if (!hose)
71 return -ENOMEM; 67 return -ENOMEM;
72 hose->arch_data = dev;
73 hose->set_cfg_type = 1;
74 68
75 hose->first_busno = bus_range ? bus_range[0] : 0; 69 hose->first_busno = bus_range ? bus_range[0] : 0;
76 hose->last_busno = bus_range ? bus_range[1] : 0xff; 70 hose->last_busno = bus_range ? bus_range[1] : 0xff;
@@ -86,8 +80,6 @@ int __init add_bridge(struct device_node *dev)
86 if ((rsrc.start & 0xfffff) == 0x8600) { 80 if ((rsrc.start & 0xfffff) == 0x8600) {
87 setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384); 81 setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384);
88 primary = 0; 82 primary = 0;
89 hose->bus_offset = hose->first_busno;
90 mpc83xx_pci2_busno = hose->first_busno;
91 } 83 }
92 84
93 printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. " 85 printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. "
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c
new file mode 100644
index 0000000000..e7fdf013cd
--- /dev/null
+++ b/arch/powerpc/platforms/83xx/usb.c
@@ -0,0 +1,181 @@
1/*
2 * Freescale 83xx USB SOC setup code
3 *
4 * Copyright (C) 2007 Freescale Semiconductor, Inc.
5 * Author: Li Yang
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13
14#include <linux/stddef.h>
15#include <linux/kernel.h>
16#include <linux/errno.h>
17
18#include <asm/io.h>
19#include <asm/prom.h>
20#include <sysdev/fsl_soc.h>
21
22#include "mpc83xx.h"
23
24
25#ifdef CONFIG_MPC834x
26int mpc834x_usb_cfg(void)
27{
28 unsigned long sccr, sicrl, sicrh;
29 void __iomem *immap;
30 struct device_node *np = NULL;
31 int port0_is_dr = 0, port1_is_dr = 0;
32 const void *prop, *dr_mode;
33
34 immap = ioremap(get_immrbase(), 0x1000);
35 if (!immap)
36 return -ENOMEM;
37
38 /* Read registers */
39 /* Note: DR and MPH must use the same clock setting in SCCR */
40 sccr = in_be32(immap + MPC83XX_SCCR_OFFS) & ~MPC83XX_SCCR_USB_MASK;
41 sicrl = in_be32(immap + MPC83XX_SICRL_OFFS) & ~MPC834X_SICRL_USB_MASK;
42 sicrh = in_be32(immap + MPC83XX_SICRH_OFFS) & ~MPC834X_SICRH_USB_UTMI;
43
44 np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
45 if (np) {
46 sccr |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */
47
48 prop = of_get_property(np, "phy_type", NULL);
49 if (prop && (!strcmp(prop, "utmi") ||
50 !strcmp(prop, "utmi_wide"))) {
51 sicrl |= MPC834X_SICRL_USB0 | MPC834X_SICRL_USB1;
52 sicrh |= MPC834X_SICRH_USB_UTMI;
53 port1_is_dr = 1;
54 } else if (prop && !strcmp(prop, "serial")) {
55 dr_mode = of_get_property(np, "dr_mode", NULL);
56 if (dr_mode && !strcmp(dr_mode, "otg")) {
57 sicrl |= MPC834X_SICRL_USB0 | MPC834X_SICRL_USB1;
58 port1_is_dr = 1;
59 } else {
60 sicrl |= MPC834X_SICRL_USB0;
61 }
62 } else if (prop && !strcmp(prop, "ulpi")) {
63 sicrl |= MPC834X_SICRL_USB0;
64 } else {
65 printk(KERN_WARNING "834x USB PHY type not supported\n");
66 }
67 port0_is_dr = 1;
68 of_node_put(np);
69 }
70 np = of_find_compatible_node(NULL, "usb", "fsl-usb2-mph");
71 if (np) {
72 sccr |= MPC83XX_SCCR_USB_MPHCM_11; /* 1:3 */
73
74 prop = of_get_property(np, "port0", NULL);
75 if (prop) {
76 if (port0_is_dr)
77 printk(KERN_WARNING
78 "834x USB port0 can't be used by both DR and MPH!\n");
79 sicrl |= MPC834X_SICRL_USB0;
80 }
81 prop = of_get_property(np, "port1", NULL);
82 if (prop) {
83 if (port1_is_dr)
84 printk(KERN_WARNING
85 "834x USB port1 can't be used by both DR and MPH!\n");
86 sicrl |= MPC834X_SICRL_USB1;
87 }
88 of_node_put(np);
89 }
90
91 /* Write back */
92 out_be32(immap + MPC83XX_SCCR_OFFS, sccr);
93 out_be32(immap + MPC83XX_SICRL_OFFS, sicrl);
94 out_be32(immap + MPC83XX_SICRH_OFFS, sicrh);
95
96 iounmap(immap);
97 return 0;
98}
99#endif /* CONFIG_MPC834x */
100
101#ifdef CONFIG_PPC_MPC831x
102int mpc831x_usb_cfg(void)
103{
104 u32 temp;
105 void __iomem *immap, *usb_regs;
106 struct device_node *np = NULL;
107 const void *prop;
108 struct resource res;
109 int ret = 0;
110#ifdef CONFIG_USB_OTG
111 const void *dr_mode;
112#endif
113
114 np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
115 if (!np)
116 return -ENODEV;
117 prop = of_get_property(np, "phy_type", NULL);
118
119 /* Map IMMR space for pin and clock settings */
120 immap = ioremap(get_immrbase(), 0x1000);
121 if (!immap) {
122 of_node_put(np);
123 return -ENOMEM;
124 }
125
126 /* Configure clock */
127 temp = in_be32(immap + MPC83XX_SCCR_OFFS);
128 temp &= ~MPC83XX_SCCR_USB_MASK;
129 temp |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */
130 out_be32(immap + MPC83XX_SCCR_OFFS, temp);
131
132 /* Configure pin mux for ULPI. There is no pin mux for UTMI */
133 if (!strcmp(prop, "ulpi")) {
134 temp = in_be32(immap + MPC83XX_SICRL_OFFS);
135 temp &= ~MPC831X_SICRL_USB_MASK;
136 temp |= MPC831X_SICRL_USB_ULPI;
137 out_be32(immap + MPC83XX_SICRL_OFFS, temp);
138
139 temp = in_be32(immap + MPC83XX_SICRH_OFFS);
140 temp &= ~MPC831X_SICRH_USB_MASK;
141 temp |= MPC831X_SICRH_USB_ULPI;
142 out_be32(immap + MPC83XX_SICRH_OFFS, temp);
143 }
144
145 iounmap(immap);
146
147 /* Map USB SOC space */
148 ret = of_address_to_resource(np, 0, &res);
149 if (ret) {
150 of_node_put(np);
151 return ret;
152 }
153 usb_regs = ioremap(res.start, res.end - res.start + 1);
154
155 /* Using on-chip PHY */
156 if (!strcmp(prop, "utmi_wide") ||
157 !strcmp(prop, "utmi")) {
158 /* Set UTMI_PHY_EN, REFSEL to 48MHZ */
159 out_be32(usb_regs + FSL_USB2_CONTROL_OFFS,
160 CONTROL_UTMI_PHY_EN | CONTROL_REFSEL_48MHZ);
161 /* Using external UPLI PHY */
162 } else if (!strcmp(prop, "ulpi")) {
163 /* Set PHY_CLK_SEL to ULPI */
164 temp = CONTROL_PHY_CLK_SEL_ULPI;
165#ifdef CONFIG_USB_OTG
166 /* Set OTG_PORT */
167 dr_mode = of_get_property(np, "dr_mode", NULL);
168 if (dr_mode && !strcmp(dr_mode, "otg"))
169 temp |= CONTROL_OTG_PORT;
170#endif /* CONFIG_USB_OTG */
171 out_be32(usb_regs + FSL_USB2_CONTROL_OFFS, temp);
172 } else {
173 printk(KERN_WARNING "831x USB PHY type not supported\n");
174 ret = -EINVAL;
175 }
176
177 iounmap(usb_regs);
178 of_node_put(np);
179 return ret;
180}
181#endif /* CONFIG_PPC_MPC831x */
diff --git a/arch/powerpc/platforms/85xx/misc.c b/arch/powerpc/platforms/85xx/misc.c
index 3e62fcb04c..4fe376e9c3 100644
--- a/arch/powerpc/platforms/85xx/misc.c
+++ b/arch/powerpc/platforms/85xx/misc.c
@@ -13,11 +13,43 @@
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <asm/irq.h> 15#include <asm/irq.h>
16#include <asm/io.h>
17#include <asm/prom.h>
18#include <sysdev/fsl_soc.h>
19
20static __be32 __iomem *rstcr;
16 21
17extern void abort(void); 22extern void abort(void);
18 23
24static int __init mpc85xx_rstcr(void)
25{
26 struct device_node *np;
27 np = of_find_node_by_name(NULL, "global-utilities");
28 if ((np && of_get_property(np, "fsl,has-rstcr", NULL))) {
29 const u32 *prop = of_get_property(np, "reg", NULL);
30 if (prop) {
31 /* map reset control register
32 * 0xE00B0 is offset of reset control register
33 */
34 rstcr = ioremap(get_immrbase() + *prop + 0xB0, 0xff);
35 if (!rstcr)
36 printk (KERN_EMERG "Error: reset control "
37 "register not mapped!\n");
38 }
39 } else
40 printk (KERN_INFO "rstcr compatible register does not exist!\n");
41 if (np)
42 of_node_put(np);
43 return 0;
44}
45
46arch_initcall(mpc85xx_rstcr);
47
19void mpc85xx_restart(char *cmd) 48void mpc85xx_restart(char *cmd)
20{ 49{
21 local_irq_disable(); 50 local_irq_disable();
51 if (rstcr)
52 /* set reset control register */
53 out_be32(rstcr, 0x2); /* HRESET_REQ */
22 abort(); 54 abort();
23} 55}
diff --git a/arch/powerpc/platforms/85xx/mpc8544_ds.c b/arch/powerpc/platforms/85xx/mpc8544_ds.c
index bec84ffe70..6fb90aab87 100644
--- a/arch/powerpc/platforms/85xx/mpc8544_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc8544_ds.c
@@ -61,24 +61,11 @@ void __init mpc8544_ds_pic_init(void)
61 return; 61 return;
62 } 62 }
63 63
64 /* Alloc mpic structure and per isu has 16 INT entries. */
65 mpic = mpic_alloc(np, r.start, 64 mpic = mpic_alloc(np, r.start,
66 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 65 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
67 16, 64, " OPENPIC "); 66 0, 256, " OpenPIC ");
68 BUG_ON(mpic == NULL); 67 BUG_ON(mpic == NULL);
69 68
70 /*
71 * 48 Internal Interrupts
72 */
73 mpic_assign_isu(mpic, 0, r.start + 0x10200);
74 mpic_assign_isu(mpic, 1, r.start + 0x10400);
75 mpic_assign_isu(mpic, 2, r.start + 0x10600);
76
77 /*
78 * 16 External interrupts
79 */
80 mpic_assign_isu(mpic, 3, r.start + 0x10000);
81
82 mpic_init(mpic); 69 mpic_init(mpic);
83 70
84#ifdef CONFIG_PPC_I8259 71#ifdef CONFIG_PPC_I8259
diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms/85xx/mpc85xx.h
index 83415db333..7286ffac2c 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx.h
+++ b/arch/powerpc/platforms/85xx/mpc85xx.h
@@ -15,4 +15,4 @@
15 */ 15 */
16 16
17extern void mpc85xx_restart(char *); 17extern void mpc85xx_restart(char *);
18extern int add_bridge(struct device_node *dev); 18extern int mpc85xx_add_bridge(struct device_node *dev);
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 5d27621f09..7235f70239 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -38,13 +38,9 @@
38#include <asm/fs_pd.h> 38#include <asm/fs_pd.h>
39#endif 39#endif
40 40
41#ifndef CONFIG_PCI
42unsigned long isa_io_base = 0;
43unsigned long isa_mem_base = 0;
44#endif
45
46#ifdef CONFIG_PCI 41#ifdef CONFIG_PCI
47static int mpc85xx_exclude_device(u_char bus, u_char devfn) 42static int mpc85xx_exclude_device(struct pci_controller *hose,
43 u_char bus, u_char devfn)
48{ 44{
49 if (bus == 0 && PCI_SLOT(devfn) == 0) 45 if (bus == 0 && PCI_SLOT(devfn) == 0)
50 return PCIBIOS_DEVICE_NOT_FOUND; 46 return PCIBIOS_DEVICE_NOT_FOUND;
@@ -91,30 +87,10 @@ static void __init mpc85xx_ads_pic_init(void)
91 87
92 mpic = mpic_alloc(np, r.start, 88 mpic = mpic_alloc(np, r.start,
93 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 89 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
94 4, 0, " OpenPIC "); 90 0, 256, " OpenPIC ");
95 BUG_ON(mpic == NULL); 91 BUG_ON(mpic == NULL);
96 of_node_put(np); 92 of_node_put(np);
97 93
98 mpic_assign_isu(mpic, 0, r.start + 0x10200);
99 mpic_assign_isu(mpic, 1, r.start + 0x10280);
100 mpic_assign_isu(mpic, 2, r.start + 0x10300);
101 mpic_assign_isu(mpic, 3, r.start + 0x10380);
102 mpic_assign_isu(mpic, 4, r.start + 0x10400);
103 mpic_assign_isu(mpic, 5, r.start + 0x10480);
104 mpic_assign_isu(mpic, 6, r.start + 0x10500);
105 mpic_assign_isu(mpic, 7, r.start + 0x10580);
106
107 /* Unused on this platform (leave room for 8548) */
108 mpic_assign_isu(mpic, 8, r.start + 0x10600);
109 mpic_assign_isu(mpic, 9, r.start + 0x10680);
110 mpic_assign_isu(mpic, 10, r.start + 0x10700);
111 mpic_assign_isu(mpic, 11, r.start + 0x10780);
112
113 /* External Interrupts */
114 mpic_assign_isu(mpic, 12, r.start + 0x10000);
115 mpic_assign_isu(mpic, 13, r.start + 0x10080);
116 mpic_assign_isu(mpic, 14, r.start + 0x10100);
117
118 mpic_init(mpic); 94 mpic_init(mpic);
119 95
120#ifdef CONFIG_CPM2 96#ifdef CONFIG_CPM2
@@ -241,7 +217,7 @@ static void __init mpc85xx_ads_setup_arch(void)
241 217
242#ifdef CONFIG_PCI 218#ifdef CONFIG_PCI
243 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 219 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
244 add_bridge(np); 220 mpc85xx_add_bridge(np);
245 ppc_md.pci_exclude_device = mpc85xx_exclude_device; 221 ppc_md.pci_exclude_device = mpc85xx_exclude_device;
246#endif 222#endif
247} 223}
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 1490eb3ce0..50c8d64583 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -47,11 +47,6 @@
47#include <sysdev/fsl_soc.h> 47#include <sysdev/fsl_soc.h>
48#include "mpc85xx.h" 48#include "mpc85xx.h"
49 49
50#ifndef CONFIG_PCI
51unsigned long isa_io_base = 0;
52unsigned long isa_mem_base = 0;
53#endif
54
55static int cds_pci_slot = 2; 50static int cds_pci_slot = 2;
56static volatile u8 *cadmus; 51static volatile u8 *cadmus;
57 52
@@ -60,15 +55,11 @@ static volatile u8 *cadmus;
60#define ARCADIA_HOST_BRIDGE_IDSEL 17 55#define ARCADIA_HOST_BRIDGE_IDSEL 17
61#define ARCADIA_2ND_BRIDGE_IDSEL 3 56#define ARCADIA_2ND_BRIDGE_IDSEL 3
62 57
63extern int mpc85xx_pci2_busno; 58static int mpc85xx_exclude_device(struct pci_controller *hose,
64 59 u_char bus, u_char devfn)
65static int mpc85xx_exclude_device(u_char bus, u_char devfn)
66{ 60{
67 if (bus == 0 && PCI_SLOT(devfn) == 0) 61 if ((bus == hose->first_busno) && PCI_SLOT(devfn) == 0)
68 return PCIBIOS_DEVICE_NOT_FOUND; 62 return PCIBIOS_DEVICE_NOT_FOUND;
69 if (mpc85xx_pci2_busno)
70 if (bus == (mpc85xx_pci2_busno) && PCI_SLOT(devfn) == 0)
71 return PCIBIOS_DEVICE_NOT_FOUND;
72 /* We explicitly do not go past the Tundra 320 Bridge */ 63 /* We explicitly do not go past the Tundra 320 Bridge */
73 if ((bus == 1) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL)) 64 if ((bus == 1) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL))
74 return PCIBIOS_DEVICE_NOT_FOUND; 65 return PCIBIOS_DEVICE_NOT_FOUND;
@@ -78,52 +69,44 @@ static int mpc85xx_exclude_device(u_char bus, u_char devfn)
78 return PCIBIOS_SUCCESSFUL; 69 return PCIBIOS_SUCCESSFUL;
79} 70}
80 71
81static void __init mpc85xx_cds_pcibios_fixup(void) 72static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev)
82{ 73{
83 struct pci_dev *dev; 74 u_char c;
84 u_char c; 75 if (dev->vendor == PCI_VENDOR_ID_VIA) {
85 76 switch (dev->device) {
86 if ((dev = pci_get_device(PCI_VENDOR_ID_VIA, 77 case PCI_DEVICE_ID_VIA_82C586_1:
87 PCI_DEVICE_ID_VIA_82C586_1, NULL))) { 78 /*
79 * U-Boot does not set the enable bits
80 * for the IDE device. Force them on here.
81 */
82 pci_read_config_byte(dev, 0x40, &c);
83 c |= 0x03; /* IDE: Chip Enable Bits */
84 pci_write_config_byte(dev, 0x40, c);
85
86 /*
87 * Since only primary interface works, force the
88 * IDE function to standard primary IDE interrupt
89 * w/ 8259 offset
90 */
91 dev->irq = 14;
92 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
93 break;
88 /* 94 /*
89 * U-Boot does not set the enable bits 95 * Force legacy USB interrupt routing
90 * for the IDE device. Force them on here.
91 */ 96 */
92 pci_read_config_byte(dev, 0x40, &c); 97 case PCI_DEVICE_ID_VIA_82C586_2:
93 c |= 0x03; /* IDE: Chip Enable Bits */ 98 /* There are two USB controllers.
94 pci_write_config_byte(dev, 0x40, c); 99 * Identify them by functon number
95
96 /*
97 * Since only primary interface works, force the
98 * IDE function to standard primary IDE interrupt
99 * w/ 8259 offset
100 */ 100 */
101 dev->irq = 14; 101 if (PCI_FUNC(dev->devfn))
102 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); 102 dev->irq = 11;
103 pci_dev_put(dev); 103 else
104 } 104 dev->irq = 10;
105 105 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
106 /* 106 default:
107 * Force legacy USB interrupt routing 107 break;
108 */ 108 }
109 if ((dev = pci_get_device(PCI_VENDOR_ID_VIA,
110 PCI_DEVICE_ID_VIA_82C586_2, NULL))) {
111 dev->irq = 10;
112 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 10);
113 pci_dev_put(dev);
114 }
115
116 if ((dev = pci_get_device(PCI_VENDOR_ID_VIA,
117 PCI_DEVICE_ID_VIA_82C586_2, dev))) {
118 dev->irq = 11;
119 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 11);
120 pci_dev_put(dev);
121 } 109 }
122
123 /* Now map all the PCI irqs */
124 dev = NULL;
125 for_each_pci_dev(dev)
126 pci_read_irq_line(dev);
127} 110}
128 111
129#ifdef CONFIG_PPC_I8259 112#ifdef CONFIG_PPC_I8259
@@ -165,33 +148,12 @@ static void __init mpc85xx_cds_pic_init(void)
165 148
166 mpic = mpic_alloc(np, r.start, 149 mpic = mpic_alloc(np, r.start,
167 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 150 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
168 4, 0, " OpenPIC "); 151 0, 256, " OpenPIC ");
169 BUG_ON(mpic == NULL); 152 BUG_ON(mpic == NULL);
170 153
171 /* Return the mpic node */ 154 /* Return the mpic node */
172 of_node_put(np); 155 of_node_put(np);
173 156
174 mpic_assign_isu(mpic, 0, r.start + 0x10200);
175 mpic_assign_isu(mpic, 1, r.start + 0x10280);
176 mpic_assign_isu(mpic, 2, r.start + 0x10300);
177 mpic_assign_isu(mpic, 3, r.start + 0x10380);
178 mpic_assign_isu(mpic, 4, r.start + 0x10400);
179 mpic_assign_isu(mpic, 5, r.start + 0x10480);
180 mpic_assign_isu(mpic, 6, r.start + 0x10500);
181 mpic_assign_isu(mpic, 7, r.start + 0x10580);
182
183 /* Used only for 8548 so far, but no harm in
184 * allocating them for everyone */
185 mpic_assign_isu(mpic, 8, r.start + 0x10600);
186 mpic_assign_isu(mpic, 9, r.start + 0x10680);
187 mpic_assign_isu(mpic, 10, r.start + 0x10700);
188 mpic_assign_isu(mpic, 11, r.start + 0x10780);
189
190 /* External Interrupts */
191 mpic_assign_isu(mpic, 12, r.start + 0x10000);
192 mpic_assign_isu(mpic, 13, r.start + 0x10080);
193 mpic_assign_isu(mpic, 14, r.start + 0x10100);
194
195 mpic_init(mpic); 157 mpic_init(mpic);
196 158
197#ifdef CONFIG_PPC_I8259 159#ifdef CONFIG_PPC_I8259
@@ -257,9 +219,9 @@ static void __init mpc85xx_cds_setup_arch(void)
257 219
258#ifdef CONFIG_PCI 220#ifdef CONFIG_PCI
259 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 221 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
260 add_bridge(np); 222 mpc85xx_add_bridge(np);
261 223
262 ppc_md.pcibios_fixup = mpc85xx_cds_pcibios_fixup; 224 ppc_md.pci_irq_fixup = mpc85xx_cds_pci_irq_fixup;
263 ppc_md.pci_exclude_device = mpc85xx_exclude_device; 225 ppc_md.pci_exclude_device = mpc85xx_exclude_device;
264#endif 226#endif
265} 227}
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index e3dddbfe66..004b80bd0b 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -59,11 +59,6 @@
59#define DBG(fmt...) 59#define DBG(fmt...)
60#endif 60#endif
61 61
62#ifndef CONFIG_PCI
63unsigned long isa_io_base = 0;
64unsigned long isa_mem_base = 0;
65#endif
66
67/* ************************************************************************ 62/* ************************************************************************
68 * 63 *
69 * Setup the architecture 64 * Setup the architecture
@@ -100,7 +95,7 @@ static void __init mpc85xx_mds_setup_arch(void)
100 95
101#ifdef CONFIG_PCI 96#ifdef CONFIG_PCI
102 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) { 97 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) {
103 add_bridge(np); 98 mpc85xx_add_bridge(np);
104 } 99 }
105 of_node_put(np); 100 of_node_put(np);
106#endif 101#endif
@@ -181,29 +176,10 @@ static void __init mpc85xx_mds_pic_init(void)
181 176
182 mpic = mpic_alloc(np, r.start, 177 mpic = mpic_alloc(np, r.start,
183 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 178 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
184 4, 0, " OpenPIC "); 179 0, 256, " OpenPIC ");
185 BUG_ON(mpic == NULL); 180 BUG_ON(mpic == NULL);
186 of_node_put(np); 181 of_node_put(np);
187 182
188 /* Internal Interrupts */
189 mpic_assign_isu(mpic, 0, r.start + 0x10200);
190 mpic_assign_isu(mpic, 1, r.start + 0x10280);
191 mpic_assign_isu(mpic, 2, r.start + 0x10300);
192 mpic_assign_isu(mpic, 3, r.start + 0x10380);
193 mpic_assign_isu(mpic, 4, r.start + 0x10400);
194 mpic_assign_isu(mpic, 5, r.start + 0x10480);
195 mpic_assign_isu(mpic, 6, r.start + 0x10500);
196 mpic_assign_isu(mpic, 7, r.start + 0x10580);
197 mpic_assign_isu(mpic, 8, r.start + 0x10600);
198 mpic_assign_isu(mpic, 9, r.start + 0x10680);
199 mpic_assign_isu(mpic, 10, r.start + 0x10700);
200 mpic_assign_isu(mpic, 11, r.start + 0x10780);
201
202 /* External Interrupts */
203 mpic_assign_isu(mpic, 12, r.start + 0x10000);
204 mpic_assign_isu(mpic, 13, r.start + 0x10080);
205 mpic_assign_isu(mpic, 14, r.start + 0x10100);
206
207 mpic_init(mpic); 183 mpic_init(mpic);
208 184
209#ifdef CONFIG_QUICC_ENGINE 185#ifdef CONFIG_QUICC_ENGINE
diff --git a/arch/powerpc/platforms/85xx/pci.c b/arch/powerpc/platforms/85xx/pci.c
index 48f17e23d7..8118417b73 100644
--- a/arch/powerpc/platforms/85xx/pci.c
+++ b/arch/powerpc/platforms/85xx/pci.c
@@ -33,10 +33,8 @@
33#define DBG(x...) 33#define DBG(x...)
34#endif 34#endif
35 35
36int mpc85xx_pci2_busno = 0;
37
38#ifdef CONFIG_PCI 36#ifdef CONFIG_PCI
39int __init add_bridge(struct device_node *dev) 37int __init mpc85xx_add_bridge(struct device_node *dev)
40{ 38{
41 int len; 39 int len;
42 struct pci_controller *hose; 40 struct pci_controller *hose;
@@ -57,11 +55,10 @@ int __init add_bridge(struct device_node *dev)
57 " bus 0\n", dev->full_name); 55 " bus 0\n", dev->full_name);
58 } 56 }
59 57
60 hose = pcibios_alloc_controller(); 58 pci_assign_all_buses = 1;
59 hose = pcibios_alloc_controller(dev);
61 if (!hose) 60 if (!hose)
62 return -ENOMEM; 61 return -ENOMEM;
63 hose->arch_data = dev;
64 hose->set_cfg_type = 1;
65 62
66 hose->first_busno = bus_range ? bus_range[0] : 0; 63 hose->first_busno = bus_range ? bus_range[0] : 0;
67 hose->last_busno = bus_range ? bus_range[1] : 0xff; 64 hose->last_busno = bus_range ? bus_range[1] : 0xff;
@@ -74,8 +71,6 @@ int __init add_bridge(struct device_node *dev)
74 if ((rsrc.start & 0xfffff) == 0x9000) { 71 if ((rsrc.start & 0xfffff) == 0x9000) {
75 setup_indirect_pci(hose, immr + 0x9000, immr + 0x9004); 72 setup_indirect_pci(hose, immr + 0x9000, immr + 0x9004);
76 primary = 0; 73 primary = 0;
77 hose->bus_offset = hose->first_busno;
78 mpc85xx_pci2_busno = hose->first_busno;
79 } 74 }
80 75
81 printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%016llx. " 76 printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%016llx. "
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
index d1bcff5004..0faebfdc15 100644
--- a/arch/powerpc/platforms/86xx/Kconfig
+++ b/arch/powerpc/platforms/86xx/Kconfig
@@ -1,5 +1,5 @@
1choice 1choice
2 prompt "Machine Type" 2 prompt "86xx Board Type"
3 depends on PPC_86xx 3 depends on PPC_86xx
4 default MPC8641_HPCN 4 default MPC8641_HPCN
5 5
diff --git a/arch/powerpc/platforms/86xx/mpc86xx.h b/arch/powerpc/platforms/86xx/mpc86xx.h
index 2834462590..23f7ed2a7f 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx.h
+++ b/arch/powerpc/platforms/86xx/mpc86xx.h
@@ -15,15 +15,10 @@
15 * mpc86xx_* files. Mostly for use by mpc86xx_setup(). 15 * mpc86xx_* files. Mostly for use by mpc86xx_setup().
16 */ 16 */
17 17
18extern int add_bridge(struct device_node *dev); 18extern int mpc86xx_add_bridge(struct device_node *dev);
19 19
20extern int mpc86xx_exclude_device(u_char bus, u_char devfn); 20extern int mpc86xx_exclude_device(struct pci_controller *hose,
21 21 u_char bus, u_char devfn);
22extern void setup_indirect_pcie(struct pci_controller *hose,
23 u32 cfg_addr, u32 cfg_data);
24extern void setup_indirect_pcie_nomap(struct pci_controller *hose,
25 void __iomem *cfg_addr,
26 void __iomem *cfg_data);
27 22
28extern void __init mpc86xx_smp_init(void); 23extern void __init mpc86xx_smp_init(void);
29 24
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 1051702c8d..5b01ec7c13 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -44,13 +44,6 @@
44#define DBG(fmt...) do { } while(0) 44#define DBG(fmt...) do { } while(0)
45#endif 45#endif
46 46
47#ifndef CONFIG_PCI
48unsigned long isa_io_base = 0;
49unsigned long isa_mem_base = 0;
50unsigned long pci_dram_offset = 0;
51#endif
52
53
54#ifdef CONFIG_PCI 47#ifdef CONFIG_PCI
55static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc) 48static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
56{ 49{
@@ -81,22 +74,9 @@ mpc86xx_hpcn_init_irq(void)
81 /* Alloc mpic structure and per isu has 16 INT entries. */ 74 /* Alloc mpic structure and per isu has 16 INT entries. */
82 mpic1 = mpic_alloc(np, res.start, 75 mpic1 = mpic_alloc(np, res.start,
83 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 76 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
84 16, NR_IRQS - 4, 77 0, 256, " MPIC ");
85 " MPIC ");
86 BUG_ON(mpic1 == NULL); 78 BUG_ON(mpic1 == NULL);
87 79
88 mpic_assign_isu(mpic1, 0, res.start + 0x10000);
89
90 /* 48 Internal Interrupts */
91 mpic_assign_isu(mpic1, 1, res.start + 0x10200);
92 mpic_assign_isu(mpic1, 2, res.start + 0x10400);
93 mpic_assign_isu(mpic1, 3, res.start + 0x10600);
94
95 /* 16 External interrupts
96 * Moving them from [0 - 15] to [64 - 79]
97 */
98 mpic_assign_isu(mpic1, 4, res.start + 0x10000);
99
100 mpic_init(mpic1); 80 mpic_init(mpic1);
101 81
102#ifdef CONFIG_PCI 82#ifdef CONFIG_PCI
@@ -319,6 +299,7 @@ static void __devinit quirk_uli5229(struct pci_dev *dev)
319{ 299{
320 unsigned short temp; 300 unsigned short temp;
321 pci_write_config_word(dev, 0x04, 0x0405); 301 pci_write_config_word(dev, 0x04, 0x0405);
302 dev->class &= ~0x5;
322 pci_read_config_word(dev, 0x4a, &temp); 303 pci_read_config_word(dev, 0x4a, &temp);
323 temp |= 0x1000; 304 temp |= 0x1000;
324 pci_write_config_word(dev, 0x4a, temp); 305 pci_write_config_word(dev, 0x4a, temp);
@@ -364,9 +345,7 @@ mpc86xx_hpcn_setup_arch(void)
364 345
365#ifdef CONFIG_PCI 346#ifdef CONFIG_PCI
366 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 347 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
367 add_bridge(np); 348 mpc86xx_add_bridge(np);
368
369 ppc_md.pci_exclude_device = mpc86xx_exclude_device;
370#endif 349#endif
371 350
372 printk("MPC86xx HPCN board from Freescale Semiconductor\n"); 351 printk("MPC86xx HPCN board from Freescale Semiconductor\n");
diff --git a/arch/powerpc/platforms/86xx/pci.c b/arch/powerpc/platforms/86xx/pci.c
index 8235c56266..73cd5b05a8 100644
--- a/arch/powerpc/platforms/86xx/pci.c
+++ b/arch/powerpc/platforms/86xx/pci.c
@@ -122,7 +122,6 @@ static void __init
122mpc86xx_setup_pcie(struct pci_controller *hose, u32 pcie_offset, u32 pcie_size) 122mpc86xx_setup_pcie(struct pci_controller *hose, u32 pcie_offset, u32 pcie_size)
123{ 123{
124 u16 cmd; 124 u16 cmd;
125 unsigned int temps;
126 125
127 DBG("PCIE host controller register offset 0x%08x, size 0x%08x.\n", 126 DBG("PCIE host controller register offset 0x%08x, size 0x%08x.\n",
128 pcie_offset, pcie_size); 127 pcie_offset, pcie_size);
@@ -133,22 +132,49 @@ mpc86xx_setup_pcie(struct pci_controller *hose, u32 pcie_offset, u32 pcie_size)
133 early_write_config_word(hose, 0, 0, PCI_COMMAND, cmd); 132 early_write_config_word(hose, 0, 0, PCI_COMMAND, cmd);
134 133
135 early_write_config_byte(hose, 0, 0, PCI_LATENCY_TIMER, 0x80); 134 early_write_config_byte(hose, 0, 0, PCI_LATENCY_TIMER, 0x80);
136
137 /* PCIE Bus, Fix the MPC8641D host bridge's location to bus 0xFF. */
138 early_read_config_dword(hose, 0, 0, PCI_PRIMARY_BUS, &temps);
139 temps = (temps & 0xff000000) | (0xff) | (0x0 << 8) | (0xfe << 16);
140 early_write_config_dword(hose, 0, 0, PCI_PRIMARY_BUS, temps);
141} 135}
142 136
143int mpc86xx_exclude_device(u_char bus, u_char devfn) 137static void __devinit quirk_fsl_pcie_transparent(struct pci_dev *dev)
144{ 138{
145 if (bus == 0 && PCI_SLOT(devfn) == 0) 139 struct resource *res;
146 return PCIBIOS_DEVICE_NOT_FOUND; 140 int i, res_idx = PCI_BRIDGE_RESOURCES;
141 struct pci_controller *hose;
147 142
148 return PCIBIOS_SUCCESSFUL; 143 /*
144 * Make the bridge be transparent.
145 */
146 dev->transparent = 1;
147
148 hose = pci_bus_to_host(dev->bus);
149 if (!hose) {
150 printk(KERN_ERR "Can't find hose for bus %d\n",
151 dev->bus->number);
152 return;
153 }
154
155 if (hose->io_resource.flags) {
156 res = &dev->resource[res_idx++];
157 res->start = hose->io_resource.start;
158 res->end = hose->io_resource.end;
159 res->flags = hose->io_resource.flags;
160 }
161
162 for (i = 0; i < 3; i++) {
163 res = &dev->resource[res_idx + i];
164 res->start = hose->mem_resources[i].start;
165 res->end = hose->mem_resources[i].end;
166 res->flags = hose->mem_resources[i].flags;
167 }
149} 168}
150 169
151int __init add_bridge(struct device_node *dev) 170
171DECLARE_PCI_FIXUP_EARLY(0x1957, 0x7010, quirk_fsl_pcie_transparent);
172DECLARE_PCI_FIXUP_EARLY(0x1957, 0x7011, quirk_fsl_pcie_transparent);
173
174#define PCIE_LTSSM 0x404 /* PCIe Link Training and Status */
175#define PCIE_LTSSM_L0 0x16 /* L0 state */
176
177int __init mpc86xx_add_bridge(struct device_node *dev)
152{ 178{
153 int len; 179 int len;
154 struct pci_controller *hose; 180 struct pci_controller *hose;
@@ -156,6 +182,7 @@ int __init add_bridge(struct device_node *dev)
156 const int *bus_range; 182 const int *bus_range;
157 int has_address = 0; 183 int has_address = 0;
158 int primary = 0; 184 int primary = 0;
185 u16 val;
159 186
160 DBG("Adding PCIE host bridge %s\n", dev->full_name); 187 DBG("Adding PCIE host bridge %s\n", dev->full_name);
161 188
@@ -168,17 +195,23 @@ int __init add_bridge(struct device_node *dev)
168 printk(KERN_WARNING "Can't get bus-range for %s, assume" 195 printk(KERN_WARNING "Can't get bus-range for %s, assume"
169 " bus 0\n", dev->full_name); 196 " bus 0\n", dev->full_name);
170 197
171 hose = pcibios_alloc_controller(); 198 pci_assign_all_buses = 1;
199 hose = pcibios_alloc_controller(dev);
172 if (!hose) 200 if (!hose)
173 return -ENOMEM; 201 return -ENOMEM;
174 hose->arch_data = dev;
175 hose->set_cfg_type = 1;
176 202
177 /* last_busno = 0xfe cause by MPC8641 PCIE bug */ 203 hose->indirect_type = PPC_INDIRECT_TYPE_EXT_REG |
204 PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS;
205
178 hose->first_busno = bus_range ? bus_range[0] : 0x0; 206 hose->first_busno = bus_range ? bus_range[0] : 0x0;
179 hose->last_busno = bus_range ? bus_range[1] : 0xfe; 207 hose->last_busno = bus_range ? bus_range[1] : 0xff;
208
209 setup_indirect_pci(hose, rsrc.start, rsrc.start + 0x4);
180 210
181 setup_indirect_pcie(hose, rsrc.start, rsrc.start + 0x4); 211 /* Probe the hose link training status */
212 early_read_config_word(hose, 0, 0, PCIE_LTSSM, &val);
213 if (val < PCIE_LTSSM_L0)
214 return -ENXIO;
182 215
183 /* Setup the PCIE host controller. */ 216 /* Setup the PCIE host controller. */
184 mpc86xx_setup_pcie(hose, rsrc.start, rsrc.end - rsrc.start + 1); 217 mpc86xx_setup_pcie(hose, rsrc.start, rsrc.end - rsrc.start + 1);
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c
index 0901dbada3..f1693550c7 100644
--- a/arch/powerpc/platforms/8xx/m8xx_setup.c
+++ b/arch/powerpc/platforms/8xx/m8xx_setup.c
@@ -32,6 +32,7 @@
32#include <linux/root_dev.h> 32#include <linux/root_dev.h>
33#include <linux/time.h> 33#include <linux/time.h>
34#include <linux/rtc.h> 34#include <linux/rtc.h>
35#include <linux/fsl_devices.h>
35 36
36#include <asm/mmu.h> 37#include <asm/mmu.h>
37#include <asm/reg.h> 38#include <asm/reg.h>
@@ -49,6 +50,10 @@
49 50
50#include "sysdev/mpc8xx_pic.h" 51#include "sysdev/mpc8xx_pic.h"
51 52
53#ifdef CONFIG_PCMCIA_M8XX
54struct mpc8xx_pcmcia_ops m8xx_pcmcia_ops;
55#endif
56
52void m8xx_calibrate_decr(void); 57void m8xx_calibrate_decr(void);
53extern void m8xx_wdt_handler_install(bd_t *bp); 58extern void m8xx_wdt_handler_install(bd_t *bp);
54extern int cpm_pic_init(void); 59extern int cpm_pic_init(void);
diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
index c36e475d93..5a808d611a 100644
--- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c
+++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
@@ -22,6 +22,7 @@
22 22
23#include <linux/fs_enet_pd.h> 23#include <linux/fs_enet_pd.h>
24#include <linux/fs_uart_pd.h> 24#include <linux/fs_uart_pd.h>
25#include <linux/fsl_devices.h>
25#include <linux/mii.h> 26#include <linux/mii.h>
26 27
27#include <asm/delay.h> 28#include <asm/delay.h>
@@ -39,7 +40,7 @@
39#include <asm/prom.h> 40#include <asm/prom.h>
40 41
41extern void cpm_reset(void); 42extern void cpm_reset(void);
42extern void mpc8xx_show_cpuinfo(struct seq_file*); 43extern void mpc8xx_show_cpuinfo(struct seq_file *);
43extern void mpc8xx_restart(char *cmd); 44extern void mpc8xx_restart(char *cmd);
44extern void mpc8xx_calibrate_decr(void); 45extern void mpc8xx_calibrate_decr(void);
45extern int mpc8xx_set_rtc_time(struct rtc_time *tm); 46extern int mpc8xx_set_rtc_time(struct rtc_time *tm);
@@ -47,9 +48,73 @@ extern void mpc8xx_get_rtc_time(struct rtc_time *tm);
47extern void m8xx_pic_init(void); 48extern void m8xx_pic_init(void);
48extern unsigned int mpc8xx_get_irq(void); 49extern unsigned int mpc8xx_get_irq(void);
49 50
50static void init_smc1_uart_ioports(struct fs_uart_platform_info* fpi); 51static 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_smc2_uart_ioports(struct fs_uart_platform_info *fpi);
52static void init_scc3_ioports(struct fs_platform_info* ptr); 53static void init_scc3_ioports(struct fs_platform_info *ptr);
54
55#ifdef CONFIG_PCMCIA_M8XX
56static void pcmcia_hw_setup(int slot, int enable)
57{
58 unsigned *bcsr_io;
59
60 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
61 if (enable)
62 clrbits32(bcsr_io, BCSR1_PCCEN);
63 else
64 setbits32(bcsr_io, BCSR1_PCCEN);
65
66 iounmap(bcsr_io);
67}
68
69static int pcmcia_set_voltage(int slot, int vcc, int vpp)
70{
71 u32 reg = 0;
72 unsigned *bcsr_io;
73
74 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
75
76 switch (vcc) {
77 case 0:
78 break;
79 case 33:
80 reg |= BCSR1_PCCVCC0;
81 break;
82 case 50:
83 reg |= BCSR1_PCCVCC1;
84 break;
85 default:
86 return 1;
87 }
88
89 switch (vpp) {
90 case 0:
91 break;
92 case 33:
93 case 50:
94 if (vcc == vpp)
95 reg |= BCSR1_PCCVPP1;
96 else
97 return 1;
98 break;
99 case 120:
100 if ((vcc == 33) || (vcc == 50))
101 reg |= BCSR1_PCCVPP0;
102 else
103 return 1;
104 default:
105 return 1;
106 }
107
108 /* first, turn off all power */
109 clrbits32(bcsr_io, 0x00610000);
110
111 /* enable new powersettings */
112 setbits32(bcsr_io, reg);
113
114 iounmap(bcsr_io);
115 return 0;
116}
117#endif
53 118
54void __init mpc885ads_board_setup(void) 119void __init mpc885ads_board_setup(void)
55{ 120{
@@ -62,7 +127,7 @@ void __init mpc885ads_board_setup(void)
62#endif 127#endif
63 128
64 bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); 129 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
65 cp = (cpm8xx_t *)immr_map(im_cpm); 130 cp = (cpm8xx_t *) immr_map(im_cpm);
66 131
67 if (bcsr_io == NULL) { 132 if (bcsr_io == NULL) {
68 printk(KERN_CRIT "Could not remap BCSR\n"); 133 printk(KERN_CRIT "Could not remap BCSR\n");
@@ -75,13 +140,13 @@ void __init mpc885ads_board_setup(void)
75 out_8(&(cp->cp_smc[0].smc_smcm), tmpval8); 140 out_8(&(cp->cp_smc[0].smc_smcm), tmpval8);
76 clrbits16(&cp->cp_smc[0].smc_smcmr, SMCMR_REN | SMCMR_TEN); /* brg1 */ 141 clrbits16(&cp->cp_smc[0].smc_smcmr, SMCMR_REN | SMCMR_TEN); /* brg1 */
77#else 142#else
78 setbits32(bcsr_io,BCSR1_RS232EN_1); 143 setbits32(bcsr_io, BCSR1_RS232EN_1);
79 out_be16(&cp->cp_smc[0].smc_smcmr, 0); 144 out_be16(&cp->cp_smc[0].smc_smcmr, 0);
80 out_8(&cp->cp_smc[0].smc_smce, 0); 145 out_8(&cp->cp_smc[0].smc_smce, 0);
81#endif 146#endif
82 147
83#ifdef CONFIG_SERIAL_CPM_SMC2 148#ifdef CONFIG_SERIAL_CPM_SMC2
84 clrbits32(bcsr_io,BCSR1_RS232EN_2); 149 clrbits32(bcsr_io, BCSR1_RS232EN_2);
85 clrbits32(&cp->cp_simode, 0xe0000000 >> 1); 150 clrbits32(&cp->cp_simode, 0xe0000000 >> 1);
86 setbits32(&cp->cp_simode, 0x20000000 >> 1); /* brg2 */ 151 setbits32(&cp->cp_simode, 0x20000000 >> 1); /* brg2 */
87 tmpval8 = in_8(&(cp->cp_smc[1].smc_smcm)) | (SMCM_RX | SMCM_TX); 152 tmpval8 = in_8(&(cp->cp_smc[1].smc_smcm)) | (SMCM_RX | SMCM_TX);
@@ -90,7 +155,7 @@ void __init mpc885ads_board_setup(void)
90 155
91 init_smc2_uart_ioports(0); 156 init_smc2_uart_ioports(0);
92#else 157#else
93 setbits32(bcsr_io,BCSR1_RS232EN_2); 158 setbits32(bcsr_io, BCSR1_RS232EN_2);
94 out_be16(&cp->cp_smc[1].smc_smcmr, 0); 159 out_be16(&cp->cp_smc[1].smc_smcmr, 0);
95 out_8(&cp->cp_smc[1].smc_smce, 0); 160 out_8(&cp->cp_smc[1].smc_smce, 0);
96#endif 161#endif
@@ -99,29 +164,34 @@ void __init mpc885ads_board_setup(void)
99 164
100#ifdef CONFIG_FS_ENET 165#ifdef CONFIG_FS_ENET
101 /* use MDC for MII (common) */ 166 /* use MDC for MII (common) */
102 io_port = (iop8xx_t*)immr_map(im_ioport); 167 io_port = (iop8xx_t *) immr_map(im_ioport);
103 setbits16(&io_port->iop_pdpar, 0x0080); 168 setbits16(&io_port->iop_pdpar, 0x0080);
104 clrbits16(&io_port->iop_pddir, 0x0080); 169 clrbits16(&io_port->iop_pddir, 0x0080);
105 170
106 bcsr_io = ioremap(BCSR5, sizeof(unsigned long)); 171 bcsr_io = ioremap(BCSR5, sizeof(unsigned long));
107 clrbits32(bcsr_io,BCSR5_MII1_EN); 172 clrbits32(bcsr_io, BCSR5_MII1_EN);
108 clrbits32(bcsr_io,BCSR5_MII1_RST); 173 clrbits32(bcsr_io, BCSR5_MII1_RST);
109#ifndef CONFIG_FC_ENET_HAS_SCC 174#ifndef CONFIG_FC_ENET_HAS_SCC
110 clrbits32(bcsr_io,BCSR5_MII2_EN); 175 clrbits32(bcsr_io, BCSR5_MII2_EN);
111 clrbits32(bcsr_io,BCSR5_MII2_RST); 176 clrbits32(bcsr_io, BCSR5_MII2_RST);
112 177
113#endif 178#endif
114 iounmap(bcsr_io); 179 iounmap(bcsr_io);
115 immr_unmap(io_port); 180 immr_unmap(io_port);
116 181
117#endif 182#endif
118}
119 183
184#ifdef CONFIG_PCMCIA_M8XX
185 /*Set up board specific hook-ups */
186 m8xx_pcmcia_ops.hw_ctrl = pcmcia_hw_setup;
187 m8xx_pcmcia_ops.voltage_set = pcmcia_set_voltage;
188#endif
189}
120 190
121static void init_fec1_ioports(struct fs_platform_info* ptr) 191static void init_fec1_ioports(struct fs_platform_info *ptr)
122{ 192{
123 cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm); 193 cpm8xx_t *cp = (cpm8xx_t *) immr_map(im_cpm);
124 iop8xx_t *io_port = (iop8xx_t *)immr_map(im_ioport); 194 iop8xx_t *io_port = (iop8xx_t *) immr_map(im_ioport);
125 195
126 /* configure FEC1 pins */ 196 /* configure FEC1 pins */
127 setbits16(&io_port->iop_papar, 0xf830); 197 setbits16(&io_port->iop_papar, 0xf830);
@@ -143,11 +213,10 @@ static void init_fec1_ioports(struct fs_platform_info* ptr)
143 immr_unmap(cp); 213 immr_unmap(cp);
144} 214}
145 215
146 216static void init_fec2_ioports(struct fs_platform_info *ptr)
147static void init_fec2_ioports(struct fs_platform_info* ptr)
148{ 217{
149 cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm); 218 cpm8xx_t *cp = (cpm8xx_t *) immr_map(im_cpm);
150 iop8xx_t *io_port = (iop8xx_t *)immr_map(im_ioport); 219 iop8xx_t *io_port = (iop8xx_t *) immr_map(im_ioport);
151 220
152 /* configure FEC2 pins */ 221 /* configure FEC2 pins */
153 setbits32(&cp->cp_pepar, 0x0003fffc); 222 setbits32(&cp->cp_pepar, 0x0003fffc);
@@ -177,15 +246,15 @@ void init_fec_ioports(struct fs_platform_info *fpi)
177 } 246 }
178} 247}
179 248
180static void init_scc3_ioports(struct fs_platform_info* fpi) 249static void init_scc3_ioports(struct fs_platform_info *fpi)
181{ 250{
182 unsigned *bcsr_io; 251 unsigned *bcsr_io;
183 iop8xx_t *io_port; 252 iop8xx_t *io_port;
184 cpm8xx_t *cp; 253 cpm8xx_t *cp;
185 254
186 bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE); 255 bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE);
187 io_port = (iop8xx_t *)immr_map(im_ioport); 256 io_port = (iop8xx_t *) immr_map(im_ioport);
188 cp = (cpm8xx_t *)immr_map(im_cpm); 257 cp = (cpm8xx_t *) immr_map(im_cpm);
189 258
190 if (bcsr_io == NULL) { 259 if (bcsr_io == NULL) {
191 printk(KERN_CRIT "Could not remap BCSR\n"); 260 printk(KERN_CRIT "Could not remap BCSR\n");
@@ -194,9 +263,9 @@ static void init_scc3_ioports(struct fs_platform_info* fpi)
194 263
195 /* Enable the PHY. 264 /* Enable the PHY.
196 */ 265 */
197 clrbits32(bcsr_io+4, BCSR4_ETH10_RST); 266 clrbits32(bcsr_io + 4, BCSR4_ETH10_RST);
198 udelay(1000); 267 udelay(1000);
199 setbits32(bcsr_io+4, BCSR4_ETH10_RST); 268 setbits32(bcsr_io + 4, BCSR4_ETH10_RST);
200 /* Configure port A pins for Txd and Rxd. 269 /* Configure port A pins for Txd and Rxd.
201 */ 270 */
202 setbits16(&io_port->iop_papar, PA_ENET_RXD | PA_ENET_TXD); 271 setbits16(&io_port->iop_papar, PA_ENET_RXD | PA_ENET_TXD);
@@ -212,8 +281,7 @@ static void init_scc3_ioports(struct fs_platform_info* fpi)
212 */ 281 */
213 setbits32(&cp->cp_pepar, PE_ENET_TCLK | PE_ENET_RCLK); 282 setbits32(&cp->cp_pepar, PE_ENET_TCLK | PE_ENET_RCLK);
214 clrbits32(&cp->cp_pepar, PE_ENET_TENA); 283 clrbits32(&cp->cp_pepar, PE_ENET_TENA);
215 clrbits32(&cp->cp_pedir, 284 clrbits32(&cp->cp_pedir, PE_ENET_TCLK | PE_ENET_RCLK | PE_ENET_TENA);
216 PE_ENET_TCLK | PE_ENET_RCLK | PE_ENET_TENA);
217 clrbits32(&cp->cp_peso, PE_ENET_TCLK | PE_ENET_RCLK); 285 clrbits32(&cp->cp_peso, PE_ENET_TCLK | PE_ENET_RCLK);
218 setbits32(&cp->cp_peso, PE_ENET_TENA); 286 setbits32(&cp->cp_peso, PE_ENET_TENA);
219 287
@@ -237,7 +305,7 @@ static void init_scc3_ioports(struct fs_platform_info* fpi)
237 clrbits32(&cp->cp_pedir, PE_ENET_TENA); 305 clrbits32(&cp->cp_pedir, PE_ENET_TENA);
238 setbits32(&cp->cp_peso, PE_ENET_TENA); 306 setbits32(&cp->cp_peso, PE_ENET_TENA);
239 307
240 setbits32(bcsr_io+4, BCSR1_ETHEN); 308 setbits32(bcsr_io + 4, BCSR1_ETHEN);
241 iounmap(bcsr_io); 309 iounmap(bcsr_io);
242 immr_unmap(io_port); 310 immr_unmap(io_port);
243 immr_unmap(cp); 311 immr_unmap(cp);
@@ -257,50 +325,48 @@ void init_scc_ioports(struct fs_platform_info *fpi)
257 } 325 }
258} 326}
259 327
260 328static void init_smc1_uart_ioports(struct fs_uart_platform_info *ptr)
261
262static void init_smc1_uart_ioports(struct fs_uart_platform_info* ptr)
263{ 329{
264 unsigned *bcsr_io; 330 unsigned *bcsr_io;
265 cpm8xx_t *cp; 331 cpm8xx_t *cp;
266 332
267 cp = (cpm8xx_t *)immr_map(im_cpm); 333 cp = (cpm8xx_t *) immr_map(im_cpm);
268 setbits32(&cp->cp_pepar, 0x000000c0); 334 setbits32(&cp->cp_pepar, 0x000000c0);
269 clrbits32(&cp->cp_pedir, 0x000000c0); 335 clrbits32(&cp->cp_pedir, 0x000000c0);
270 clrbits32(&cp->cp_peso, 0x00000040); 336 clrbits32(&cp->cp_peso, 0x00000040);
271 setbits32(&cp->cp_peso, 0x00000080); 337 setbits32(&cp->cp_peso, 0x00000080);
272 immr_unmap(cp); 338 immr_unmap(cp);
273 339
274 bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); 340 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
275 341
276 if (bcsr_io == NULL) { 342 if (bcsr_io == NULL) {
277 printk(KERN_CRIT "Could not remap BCSR1\n"); 343 printk(KERN_CRIT "Could not remap BCSR1\n");
278 return; 344 return;
279 } 345 }
280 clrbits32(bcsr_io,BCSR1_RS232EN_1); 346 clrbits32(bcsr_io, BCSR1_RS232EN_1);
281 iounmap(bcsr_io); 347 iounmap(bcsr_io);
282} 348}
283 349
284static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi) 350static void init_smc2_uart_ioports(struct fs_uart_platform_info *fpi)
285{ 351{
286 unsigned *bcsr_io; 352 unsigned *bcsr_io;
287 cpm8xx_t *cp; 353 cpm8xx_t *cp;
288 354
289 cp = (cpm8xx_t *)immr_map(im_cpm); 355 cp = (cpm8xx_t *) immr_map(im_cpm);
290 setbits32(&cp->cp_pepar, 0x00000c00); 356 setbits32(&cp->cp_pepar, 0x00000c00);
291 clrbits32(&cp->cp_pedir, 0x00000c00); 357 clrbits32(&cp->cp_pedir, 0x00000c00);
292 clrbits32(&cp->cp_peso, 0x00000400); 358 clrbits32(&cp->cp_peso, 0x00000400);
293 setbits32(&cp->cp_peso, 0x00000800); 359 setbits32(&cp->cp_peso, 0x00000800);
294 immr_unmap(cp); 360 immr_unmap(cp);
295 361
296 bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); 362 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
297 363
298 if (bcsr_io == NULL) { 364 if (bcsr_io == NULL) {
299 printk(KERN_CRIT "Could not remap BCSR1\n"); 365 printk(KERN_CRIT "Could not remap BCSR1\n");
300 return; 366 return;
301 } 367 }
302 clrbits32(bcsr_io,BCSR1_RS232EN_2); 368 clrbits32(bcsr_io, BCSR1_RS232EN_2);
303 iounmap(bcsr_io); 369 iounmap(bcsr_io);
304} 370}
305 371
306void init_smc_ioports(struct fs_uart_platform_info *data) 372void init_smc_ioports(struct fs_uart_platform_info *data)
@@ -373,15 +439,11 @@ static int __init mpc885ads_probe(void)
373 return 1; 439 return 1;
374} 440}
375 441
376define_machine(mpc885_ads) { 442define_machine(mpc885_ads)
377 .name = "MPC885 ADS", 443{
378 .probe = mpc885ads_probe, 444.name = "MPC885 ADS",.probe = mpc885ads_probe,.setup_arch =
379 .setup_arch = mpc885ads_setup_arch, 445 mpc885ads_setup_arch,.init_IRQ =
380 .init_IRQ = m8xx_pic_init, 446 m8xx_pic_init,.show_cpuinfo = mpc8xx_show_cpuinfo,.get_irq =
381 .show_cpuinfo = mpc8xx_show_cpuinfo, 447 mpc8xx_get_irq,.restart = mpc8xx_restart,.calibrate_decr =
382 .get_irq = mpc8xx_get_irq, 448 mpc8xx_calibrate_decr,.set_rtc_time =
383 .restart = mpc8xx_restart, 449 mpc8xx_set_rtc_time,.get_rtc_time = mpc8xx_get_rtc_time,};
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/Kconfig b/arch/powerpc/platforms/Kconfig
index 361acfa289..33545d352e 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -2,7 +2,7 @@ menu "Platform support"
2 2
3choice 3choice
4 prompt "Machine type" 4 prompt "Machine type"
5 depends on PPC64 || CLASSIC32 5 depends on PPC64 || 6xx
6 default PPC_MULTIPLATFORM 6 default PPC_MULTIPLATFORM
7 7
8config PPC_MULTIPLATFORM 8config PPC_MULTIPLATFORM
@@ -16,15 +16,30 @@ config EMBEDDED6xx
16 bool "Embedded 6xx/7xx/7xxx-based board" 16 bool "Embedded 6xx/7xx/7xxx-based board"
17 depends on PPC32 && (BROKEN||BROKEN_ON_SMP) 17 depends on PPC32 && (BROKEN||BROKEN_ON_SMP)
18 18
19config APUS 19config PPC_82xx
20 bool "Amiga-APUS" 20 bool "Freescale 82xx"
21 depends on PPC32 && BROKEN 21 depends on 6xx
22
23config PPC_83xx
24 bool "Freescale 83xx"
25 depends on 6xx
26 select FSL_SOC
27 select 83xx
28 select WANT_DEVICE_TREE
29
30config PPC_86xx
31 bool "Freescale 86xx"
32 depends on 6xx
33 select FSL_SOC
34 select ALTIVEC
22 help 35 help
23 Select APUS if configuring for a PowerUP Amiga. 36 The Freescale E600 SoCs have 74xx cores.
24 More information is available at:
25 <http://linux-apus.sourceforge.net/>.
26endchoice 37endchoice
27 38
39config CLASSIC32
40 def_bool y
41 depends on 6xx && PPC_MULTIPLATFORM
42
28source "arch/powerpc/platforms/pseries/Kconfig" 43source "arch/powerpc/platforms/pseries/Kconfig"
29source "arch/powerpc/platforms/iseries/Kconfig" 44source "arch/powerpc/platforms/iseries/Kconfig"
30source "arch/powerpc/platforms/chrp/Kconfig" 45source "arch/powerpc/platforms/chrp/Kconfig"
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
new file mode 100644
index 0000000000..b8b5fde946
--- /dev/null
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -0,0 +1,221 @@
1config PPC64
2 bool "64-bit kernel"
3 default n
4 help
5 This option selects whether a 32-bit or a 64-bit kernel
6 will be built.
7
8menu "Processor support"
9choice
10 prompt "Processor Type"
11 depends on PPC32
12 default 6xx
13 help
14 There are five families of 32 bit PowerPC chips supported.
15 The most common ones are the desktop and server CPUs (601, 603,
16 604, 740, 750, 74xx) CPUs from Freescale and IBM, with their
17 embedded 52xx/82xx/83xx/86xx counterparts.
18 The other embeeded parts, namely 4xx, 8xx, e200 (55xx) and e500
19 (85xx) each form a family of their own that is not compatible
20 with the others.
21
22 If unsure, select 52xx/6xx/7xx/74xx/82xx/83xx/86xx.
23
24config 6xx
25 bool "52xx/6xx/7xx/74xx/82xx/83xx/86xx"
26 select PPC_FPU
27
28config PPC_85xx
29 bool "Freescale 85xx"
30 select E500
31 select FSL_SOC
32 select 85xx
33 select WANT_DEVICE_TREE
34
35config PPC_8xx
36 bool "Freescale 8xx"
37 select FSL_SOC
38 select 8xx
39
40config 40x
41 bool "AMCC 40x"
42 select PPC_DCR_NATIVE
43
44config 44x
45 bool "AMCC 44x"
46 select PPC_DCR_NATIVE
47 select WANT_DEVICE_TREE
48
49config E200
50 bool "Freescale e200"
51
52endchoice
53
54config POWER4_ONLY
55 bool "Optimize for POWER4"
56 depends on PPC64
57 default n
58 ---help---
59 Cause the compiler to optimize for POWER4/POWER5/PPC970 processors.
60 The resulting binary will not work on POWER3 or RS64 processors
61 when compiled with binutils 2.15 or later.
62
63config POWER3
64 bool
65 depends on PPC64
66 default y if !POWER4_ONLY
67
68config POWER4
69 depends on PPC64
70 def_bool y
71
72config 6xx
73 bool
74
75# this is temp to handle compat with arch=ppc
76config 8xx
77 bool
78
79# this is temp to handle compat with arch=ppc
80config 83xx
81 bool
82
83# this is temp to handle compat with arch=ppc
84config 85xx
85 bool
86
87config E500
88 bool
89
90config PPC_FPU
91 bool
92 default y if PPC64
93
94config 4xx
95 bool
96 depends on 40x || 44x
97 default y
98
99config BOOKE
100 bool
101 depends on E200 || E500 || 44x
102 default y
103
104config FSL_BOOKE
105 bool
106 depends on E200 || E500
107 default y
108
109config PTE_64BIT
110 bool
111 depends on 44x || E500
112 default y if 44x
113 default y if E500 && PHYS_64BIT
114
115config PHYS_64BIT
116 bool 'Large physical address support' if E500
117 depends on 44x || E500
118 select RESOURCES_64BIT
119 default y if 44x
120 ---help---
121 This option enables kernel support for larger than 32-bit physical
122 addresses. This features is not be available on all e500 cores.
123
124 If in doubt, say N here.
125
126config ALTIVEC
127 bool "AltiVec Support"
128 depends on CLASSIC32 || POWER4
129 ---help---
130 This option enables kernel support for the Altivec extensions to the
131 PowerPC processor. The kernel currently supports saving and restoring
132 altivec registers, and turning on the 'altivec enable' bit so user
133 processes can execute altivec instructions.
134
135 This option is only usefully if you have a processor that supports
136 altivec (G4, otherwise known as 74xx series), but does not have
137 any affect on a non-altivec cpu (it does, however add code to the
138 kernel).
139
140 If in doubt, say Y here.
141
142config SPE
143 bool "SPE Support"
144 depends on E200 || E500
145 default y
146 ---help---
147 This option enables kernel support for the Signal Processing
148 Extensions (SPE) to the PowerPC processor. The kernel currently
149 supports saving and restoring SPE registers, and turning on the
150 'spe enable' bit so user processes can execute SPE instructions.
151
152 This option is only useful if you have a processor that supports
153 SPE (e500, otherwise known as 85xx series), but does not have any
154 effect on a non-spe cpu (it does, however add code to the kernel).
155
156 If in doubt, say Y here.
157
158config PPC_STD_MMU
159 bool
160 depends on 6xx || POWER3 || POWER4 || PPC64
161 default y
162
163config PPC_STD_MMU_32
164 def_bool y
165 depends on PPC_STD_MMU && PPC32
166
167config PPC_MM_SLICES
168 bool
169 default y if HUGETLB_PAGE
170 default n
171
172config VIRT_CPU_ACCOUNTING
173 bool "Deterministic task and CPU time accounting"
174 depends on PPC64
175 default y
176 help
177 Select this option to enable more accurate task and CPU time
178 accounting. This is done by reading a CPU counter on each
179 kernel entry and exit and on transitions within the kernel
180 between system, softirq and hardirq state, so there is a
181 small performance impact. This also enables accounting of
182 stolen time on logically-partitioned systems running on
183 IBM POWER5-based machines.
184
185 If in doubt, say Y here.
186
187config SMP
188 depends on PPC_STD_MMU
189 bool "Symmetric multi-processing support"
190 ---help---
191 This enables support for systems with more than one CPU. If you have
192 a system with only one CPU, say N. If you have a system with more
193 than one CPU, say Y. Note that the kernel does not currently
194 support SMP machines with 603/603e/603ev or PPC750 ("G3") processors
195 since they have inadequate hardware support for multiprocessor
196 operation.
197
198 If you say N here, the kernel will run on single and multiprocessor
199 machines, but will use only one CPU of a multiprocessor machine. If
200 you say Y here, the kernel will run on single-processor machines.
201 On a single-processor machine, the kernel will run faster if you say
202 N here.
203
204 If you don't know what to do here, say N.
205
206config NR_CPUS
207 int "Maximum number of CPUs (2-128)"
208 range 2 128
209 depends on SMP
210 default "32" if PPC64
211 default "4"
212
213config NOT_COHERENT_CACHE
214 bool
215 depends on 4xx || 8xx || E200
216 default y
217
218config CONFIG_CHECK_CACHE_COHERENCY
219 bool
220
221endmenu
diff --git a/arch/powerpc/platforms/apus/Kconfig b/arch/powerpc/platforms/apus/Kconfig
deleted file mode 100644
index 6bde3bffed..0000000000
--- a/arch/powerpc/platforms/apus/Kconfig
+++ /dev/null
@@ -1,130 +0,0 @@
1
2config AMIGA
3 bool
4 depends on APUS
5 default y
6 help
7 This option enables support for the Amiga series of computers.
8
9config ZORRO
10 bool
11 depends on APUS
12 default y
13 help
14 This enables support for the Zorro bus in the Amiga. If you have
15 expansion cards in your Amiga that conform to the Amiga
16 AutoConfig(tm) specification, say Y, otherwise N. Note that even
17 expansion cards that do not fit in the Zorro slots but fit in e.g.
18 the CPU slot may fall in this category, so you have to say Y to let
19 Linux use these.
20
21config ABSTRACT_CONSOLE
22 bool
23 depends on APUS
24 default y
25
26config APUS_FAST_EXCEPT
27 bool
28 depends on APUS
29 default y
30
31config AMIGA_PCMCIA
32 bool "Amiga 1200/600 PCMCIA support"
33 depends on APUS && EXPERIMENTAL
34 help
35 Include support in the kernel for pcmcia on Amiga 1200 and Amiga
36 600. If you intend to use pcmcia cards say Y; otherwise say N.
37
38config AMIGA_BUILTIN_SERIAL
39 tristate "Amiga builtin serial support"
40 depends on APUS
41 help
42 If you want to use your Amiga's built-in serial port in Linux,
43 answer Y.
44
45 To compile this driver as a module, choose M here.
46
47config GVPIOEXT
48 tristate "GVP IO-Extender support"
49 depends on APUS
50 help
51 If you want to use a GVP IO-Extender serial card in Linux, say Y.
52 Otherwise, say N.
53
54config GVPIOEXT_LP
55 tristate "GVP IO-Extender parallel printer support"
56 depends on GVPIOEXT
57 help
58 Say Y to enable driving a printer from the parallel port on your
59 GVP IO-Extender card, N otherwise.
60
61config GVPIOEXT_PLIP
62 tristate "GVP IO-Extender PLIP support"
63 depends on GVPIOEXT
64 help
65 Say Y to enable doing IP over the parallel port on your GVP
66 IO-Extender card, N otherwise.
67
68config MULTIFACE_III_TTY
69 tristate "Multiface Card III serial support"
70 depends on APUS
71 help
72 If you want to use a Multiface III card's serial port in Linux,
73 answer Y.
74
75 To compile this driver as a module, choose M here.
76
77config A2232
78 tristate "Commodore A2232 serial support (EXPERIMENTAL)"
79 depends on EXPERIMENTAL && APUS
80 ---help---
81 This option supports the 2232 7-port serial card shipped with the
82 Amiga 2000 and other Zorro-bus machines, dating from 1989. At
83 a max of 19,200 bps, the ports are served by a 6551 ACIA UART chip
84 each, plus a 8520 CIA, and a master 6502 CPU and buffer as well. The
85 ports were connected with 8 pin DIN connectors on the card bracket,
86 for which 8 pin to DB25 adapters were supplied. The card also had
87 jumpers internally to toggle various pinning configurations.
88
89 This driver can be built as a module; but then "generic_serial"
90 will also be built as a module. This has to be loaded before
91 "ser_a2232". If you want to do this, answer M here.
92
93config WHIPPET_SERIAL
94 tristate "Hisoft Whippet PCMCIA serial support"
95 depends on AMIGA_PCMCIA
96 help
97 HiSoft has a web page at <http://www.hisoft.co.uk/>, but there
98 is no listing for the Whippet in their Amiga section.
99
100config APNE
101 tristate "PCMCIA NE2000 support"
102 depends on AMIGA_PCMCIA
103 help
104 If you have a PCMCIA NE2000 compatible adapter, say Y. Otherwise,
105 say N.
106
107 To compile this driver as a module, choose M here: the
108 module will be called apne.
109
110config SERIAL_CONSOLE
111 bool "Support for serial port console"
112 depends on APUS && (AMIGA_BUILTIN_SERIAL=y || GVPIOEXT=y || MULTIFACE_III_TTY=y)
113
114config HEARTBEAT
115 bool "Use power LED as a heartbeat"
116 depends on APUS
117 help
118 Use the power-on LED on your machine as a load meter. The exact
119 behavior is platform-dependent, but normally the flash frequency is
120 a hyperbolic function of the 5-minute load average.
121
122config PROC_HARDWARE
123 bool "/proc/hardware support"
124 depends on APUS
125
126source "drivers/zorro/Kconfig"
127
128config PCI_PERMEDIA
129 bool "PCI for Permedia2"
130 depends on !4xx && !8xx && APUS
diff --git a/arch/powerpc/platforms/cell/cbe_cpufreq.c b/arch/powerpc/platforms/cell/cbe_cpufreq.c
index ac445998d8..ab511d5b65 100644
--- a/arch/powerpc/platforms/cell/cbe_cpufreq.c
+++ b/arch/powerpc/platforms/cell/cbe_cpufreq.c
@@ -74,6 +74,7 @@ static unsigned int pmi_frequency_limit = 0;
74 74
75static struct of_device *pmi_dev; 75static struct of_device *pmi_dev;
76 76
77#ifdef CONFIG_PPC_PMI
77static int set_pmode_pmi(int cpu, unsigned int pmode) 78static int set_pmode_pmi(int cpu, unsigned int pmode)
78{ 79{
79 int ret; 80 int ret;
@@ -102,7 +103,7 @@ static int set_pmode_pmi(int cpu, unsigned int pmode)
102#endif 103#endif
103 return ret; 104 return ret;
104} 105}
105 106#endif
106 107
107static int get_pmode(int cpu) 108static int get_pmode(int cpu)
108{ 109{
@@ -157,9 +158,11 @@ static int set_pmode_reg(int cpu, unsigned int pmode)
157} 158}
158 159
159static int set_pmode(int cpu, unsigned int slow_mode) { 160static int set_pmode(int cpu, unsigned int slow_mode) {
161#ifdef CONFIG_PPC_PMI
160 if (pmi_dev) 162 if (pmi_dev)
161 return set_pmode_pmi(cpu, slow_mode); 163 return set_pmode_pmi(cpu, slow_mode);
162 else 164 else
165#endif
163 return set_pmode_reg(cpu, slow_mode); 166 return set_pmode_reg(cpu, slow_mode);
164} 167}
165 168
@@ -323,26 +326,28 @@ static struct cpufreq_driver cbe_cpufreq_driver = {
323 326
324static int __init cbe_cpufreq_init(void) 327static int __init cbe_cpufreq_init(void)
325{ 328{
329#ifdef CONFIG_PPC_PMI
326 struct device_node *np; 330 struct device_node *np;
327 331#endif
328 if (!machine_is(cell)) 332 if (!machine_is(cell))
329 return -ENODEV; 333 return -ENODEV;
330 334#ifdef CONFIG_PPC_PMI
331 np = of_find_node_by_type(NULL, "ibm,pmi"); 335 np = of_find_node_by_type(NULL, "ibm,pmi");
332 336
333 pmi_dev = of_find_device_by_node(np); 337 pmi_dev = of_find_device_by_node(np);
334 338
335 if (pmi_dev) 339 if (pmi_dev)
336 pmi_register_handler(pmi_dev, &cbe_pmi_handler); 340 pmi_register_handler(pmi_dev, &cbe_pmi_handler);
337 341#endif
338 return cpufreq_register_driver(&cbe_cpufreq_driver); 342 return cpufreq_register_driver(&cbe_cpufreq_driver);
339} 343}
340 344
341static void __exit cbe_cpufreq_exit(void) 345static void __exit cbe_cpufreq_exit(void)
342{ 346{
347#ifdef CONFIG_PPC_PMI
343 if (pmi_dev) 348 if (pmi_dev)
344 pmi_unregister_handler(pmi_dev, &cbe_pmi_handler); 349 pmi_unregister_handler(pmi_dev, &cbe_pmi_handler);
345 350#endif
346 cpufreq_unregister_driver(&cbe_cpufreq_driver); 351 cpufreq_unregister_driver(&cbe_cpufreq_driver);
347} 352}
348 353
diff --git a/arch/powerpc/platforms/cell/io-workarounds.c b/arch/powerpc/platforms/cell/io-workarounds.c
index 7fb92f23f3..9d7c2ef940 100644
--- a/arch/powerpc/platforms/cell/io-workarounds.c
+++ b/arch/powerpc/platforms/cell/io-workarounds.c
@@ -102,7 +102,7 @@ static void spider_io_flush(const volatile void __iomem *addr)
102 vaddr = (unsigned long)PCI_FIX_ADDR(addr); 102 vaddr = (unsigned long)PCI_FIX_ADDR(addr);
103 103
104 /* Check if it's in allowed range for PIO */ 104 /* Check if it's in allowed range for PIO */
105 if (vaddr < PHBS_IO_BASE || vaddr >= IMALLOC_BASE) 105 if (vaddr < PHB_IO_BASE || vaddr > PHB_IO_END)
106 return; 106 return;
107 107
108 /* Try to find a PTE. If not, clear the paddr, we'll do 108 /* Try to find a PTE. If not, clear the paddr, we'll do
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index a7f5a7653c..96a8f60969 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -31,6 +31,7 @@
31#include <linux/mm.h> 31#include <linux/mm.h>
32#include <linux/io.h> 32#include <linux/io.h>
33#include <linux/mutex.h> 33#include <linux/mutex.h>
34#include <linux/linux_logo.h>
34#include <asm/spu.h> 35#include <asm/spu.h>
35#include <asm/spu_priv1.h> 36#include <asm/spu_priv1.h>
36#include <asm/xmon.h> 37#include <asm/xmon.h>
@@ -183,7 +184,7 @@ static int __spu_trap_data_seg(struct spu *spu, unsigned long ea)
183 spu->slb_replace = 0; 184 spu->slb_replace = 0;
184 185
185 spu_restart_dma(spu); 186 spu_restart_dma(spu);
186 187 spu->stats.slb_flt++;
187 return 0; 188 return 0;
188} 189}
189 190
@@ -332,6 +333,7 @@ spu_irq_class_2(int irq, void *data)
332 if (stat & 0x10) /* SPU mailbox threshold */ 333 if (stat & 0x10) /* SPU mailbox threshold */
333 spu->wbox_callback(spu); 334 spu->wbox_callback(spu);
334 335
336 spu->stats.class2_intr++;
335 return stat ? IRQ_HANDLED : IRQ_NONE; 337 return stat ? IRQ_HANDLED : IRQ_NONE;
336} 338}
337 339
@@ -462,8 +464,18 @@ void spu_free(struct spu *spu)
462} 464}
463EXPORT_SYMBOL_GPL(spu_free); 465EXPORT_SYMBOL_GPL(spu_free);
464 466
467static int spu_shutdown(struct sys_device *sysdev)
468{
469 struct spu *spu = container_of(sysdev, struct spu, sysdev);
470
471 spu_free_irqs(spu);
472 spu_destroy_spu(spu);
473 return 0;
474}
475
465struct sysdev_class spu_sysdev_class = { 476struct sysdev_class spu_sysdev_class = {
466 set_kset_name("spu") 477 set_kset_name("spu"),
478 .shutdown = spu_shutdown,
467}; 479};
468 480
469int spu_add_sysdev_attr(struct sysdev_attribute *attr) 481int spu_add_sysdev_attr(struct sysdev_attribute *attr)
@@ -574,6 +586,9 @@ static int __init create_spu(void *data)
574 spin_unlock_irqrestore(&spu_list_lock, flags); 586 spin_unlock_irqrestore(&spu_list_lock, flags);
575 mutex_unlock(&spu_mutex); 587 mutex_unlock(&spu_mutex);
576 588
589 spu->stats.utilization_state = SPU_UTIL_IDLE;
590 spu->stats.tstamp = jiffies;
591
577 goto out; 592 goto out;
578 593
579out_free_irqs: 594out_free_irqs:
@@ -586,6 +601,45 @@ out:
586 return ret; 601 return ret;
587} 602}
588 603
604static const char *spu_state_names[] = {
605 "user", "system", "iowait", "idle"
606};
607
608static unsigned long long spu_acct_time(struct spu *spu,
609 enum spu_utilization_state state)
610{
611 unsigned long long time = spu->stats.times[state];
612
613 if (spu->stats.utilization_state == state)
614 time += jiffies - spu->stats.tstamp;
615
616 return jiffies_to_msecs(time);
617}
618
619
620static ssize_t spu_stat_show(struct sys_device *sysdev, char *buf)
621{
622 struct spu *spu = container_of(sysdev, struct spu, sysdev);
623
624 return sprintf(buf, "%s %llu %llu %llu %llu "
625 "%llu %llu %llu %llu %llu %llu %llu %llu\n",
626 spu_state_names[spu->stats.utilization_state],
627 spu_acct_time(spu, SPU_UTIL_USER),
628 spu_acct_time(spu, SPU_UTIL_SYSTEM),
629 spu_acct_time(spu, SPU_UTIL_IOWAIT),
630 spu_acct_time(spu, SPU_UTIL_IDLE),
631 spu->stats.vol_ctx_switch,
632 spu->stats.invol_ctx_switch,
633 spu->stats.slb_flt,
634 spu->stats.hash_flt,
635 spu->stats.min_flt,
636 spu->stats.maj_flt,
637 spu->stats.class2_intr,
638 spu->stats.libassist);
639}
640
641static SYSDEV_ATTR(stat, 0644, spu_stat_show, NULL);
642
589static int __init init_spu_base(void) 643static int __init init_spu_base(void)
590{ 644{
591 int i, ret = 0; 645 int i, ret = 0;
@@ -603,14 +657,28 @@ static int __init init_spu_base(void)
603 657
604 ret = spu_enumerate_spus(create_spu); 658 ret = spu_enumerate_spus(create_spu);
605 659
606 if (ret) { 660 if (ret < 0) {
607 printk(KERN_WARNING "%s: Error initializing spus\n", 661 printk(KERN_WARNING "%s: Error initializing spus\n",
608 __FUNCTION__); 662 __FUNCTION__);
609 goto out_unregister_sysdev_class; 663 goto out_unregister_sysdev_class;
610 } 664 }
611 665
666 if (ret > 0) {
667 /*
668 * We cannot put the forward declaration in
669 * <linux/linux_logo.h> because of conflicting session type
670 * conflicts for const and __initdata with different compiler
671 * versions
672 */
673 extern const struct linux_logo logo_spe_clut224;
674
675 fb_append_extra_logo(&logo_spe_clut224, ret);
676 }
677
612 xmon_register_spus(&spu_full_list); 678 xmon_register_spus(&spu_full_list);
613 679
680 spu_add_sysdev_attr(&attr_stat);
681
614 return 0; 682 return 0;
615 683
616 out_unregister_sysdev_class: 684 out_unregister_sysdev_class:
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c
index 1d4562ae46..75ed50fcc3 100644
--- a/arch/powerpc/platforms/cell/spu_manage.c
+++ b/arch/powerpc/platforms/cell/spu_manage.c
@@ -279,6 +279,7 @@ static int __init of_enumerate_spus(int (*fn)(void *data))
279{ 279{
280 int ret; 280 int ret;
281 struct device_node *node; 281 struct device_node *node;
282 unsigned int n = 0;
282 283
283 ret = -ENODEV; 284 ret = -ENODEV;
284 for (node = of_find_node_by_type(NULL, "spe"); 285 for (node = of_find_node_by_type(NULL, "spe");
@@ -289,8 +290,9 @@ static int __init of_enumerate_spus(int (*fn)(void *data))
289 __FUNCTION__, node->name); 290 __FUNCTION__, node->name);
290 break; 291 break;
291 } 292 }
293 n++;
292 } 294 }
293 return ret; 295 return ret ? ret : n;
294} 296}
295 297
296static int __init of_create_spu(struct spu *spu, void *data) 298static int __init of_create_spu(struct spu *spu, void *data)
diff --git a/arch/powerpc/platforms/cell/spufs/backing_ops.c b/arch/powerpc/platforms/cell/spufs/backing_ops.c
index d32db9ffc6..07a0e815ab 100644
--- a/arch/powerpc/platforms/cell/spufs/backing_ops.c
+++ b/arch/powerpc/platforms/cell/spufs/backing_ops.c
@@ -320,6 +320,12 @@ static int spu_backing_set_mfc_query(struct spu_context * ctx, u32 mask,
320 /* FIXME: what are the side-effects of this? */ 320 /* FIXME: what are the side-effects of this? */
321 prob->dma_querymask_RW = mask; 321 prob->dma_querymask_RW = mask;
322 prob->dma_querytype_RW = mode; 322 prob->dma_querytype_RW = mode;
323 /* In the current implementation, the SPU context is always
324 * acquired in runnable state when new bits are added to the
325 * mask (tagwait), so it's sufficient just to mask
326 * dma_tagstatus_R with the 'mask' parameter here.
327 */
328 ctx->csa.prob.dma_tagstatus_R &= mask;
323out: 329out:
324 spin_unlock(&ctx->csa.register_lock); 330 spin_unlock(&ctx->csa.register_lock);
325 331
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c
index 7c51cb54bc..6d7bd60f53 100644
--- a/arch/powerpc/platforms/cell/spufs/context.c
+++ b/arch/powerpc/platforms/cell/spufs/context.c
@@ -23,10 +23,14 @@
23#include <linux/fs.h> 23#include <linux/fs.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <asm/atomic.h>
26#include <asm/spu.h> 27#include <asm/spu.h>
27#include <asm/spu_csa.h> 28#include <asm/spu_csa.h>
28#include "spufs.h" 29#include "spufs.h"
29 30
31
32atomic_t nr_spu_contexts = ATOMIC_INIT(0);
33
30struct spu_context *alloc_spu_context(struct spu_gang *gang) 34struct spu_context *alloc_spu_context(struct spu_gang *gang)
31{ 35{
32 struct spu_context *ctx; 36 struct spu_context *ctx;
@@ -53,10 +57,12 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang)
53 INIT_LIST_HEAD(&ctx->rq); 57 INIT_LIST_HEAD(&ctx->rq);
54 if (gang) 58 if (gang)
55 spu_gang_add_ctx(gang, ctx); 59 spu_gang_add_ctx(gang, ctx);
56 ctx->rt_priority = current->rt_priority; 60 ctx->cpus_allowed = current->cpus_allowed;
57 ctx->policy = current->policy; 61 spu_set_timeslice(ctx);
58 ctx->prio = current->prio; 62 ctx->stats.execution_state = SPUCTX_UTIL_USER;
59 INIT_DELAYED_WORK(&ctx->sched_work, spu_sched_tick); 63 ctx->stats.tstamp = jiffies;
64
65 atomic_inc(&nr_spu_contexts);
60 goto out; 66 goto out;
61out_free: 67out_free:
62 kfree(ctx); 68 kfree(ctx);
@@ -76,6 +82,7 @@ void destroy_spu_context(struct kref *kref)
76 if (ctx->gang) 82 if (ctx->gang)
77 spu_gang_remove_ctx(ctx->gang, ctx); 83 spu_gang_remove_ctx(ctx->gang, ctx);
78 BUG_ON(!list_empty(&ctx->rq)); 84 BUG_ON(!list_empty(&ctx->rq));
85 atomic_dec(&nr_spu_contexts);
79 kfree(ctx); 86 kfree(ctx);
80} 87}
81 88
diff --git a/arch/powerpc/platforms/cell/spufs/fault.c b/arch/powerpc/platforms/cell/spufs/fault.c
index 0f75c07e29..e064d0c0d8 100644
--- a/arch/powerpc/platforms/cell/spufs/fault.c
+++ b/arch/powerpc/platforms/cell/spufs/fault.c
@@ -33,7 +33,8 @@
33 * function. Currently, there are a few corner cases that we haven't had 33 * function. Currently, there are a few corner cases that we haven't had
34 * to handle fortunately. 34 * to handle fortunately.
35 */ 35 */
36static int spu_handle_mm_fault(struct mm_struct *mm, unsigned long ea, unsigned long dsisr) 36static int spu_handle_mm_fault(struct mm_struct *mm, unsigned long ea,
37 unsigned long dsisr, unsigned *flt)
37{ 38{
38 struct vm_area_struct *vma; 39 struct vm_area_struct *vma;
39 unsigned long is_write; 40 unsigned long is_write;
@@ -73,7 +74,8 @@ good_area:
73 goto bad_area; 74 goto bad_area;
74 } 75 }
75 ret = 0; 76 ret = 0;
76 switch (handle_mm_fault(mm, vma, ea, is_write)) { 77 *flt = handle_mm_fault(mm, vma, ea, is_write);
78 switch (*flt) {
77 case VM_FAULT_MINOR: 79 case VM_FAULT_MINOR:
78 current->min_flt++; 80 current->min_flt++;
79 break; 81 break;
@@ -153,6 +155,7 @@ int spufs_handle_class1(struct spu_context *ctx)
153{ 155{
154 u64 ea, dsisr, access; 156 u64 ea, dsisr, access;
155 unsigned long flags; 157 unsigned long flags;
158 unsigned flt = 0;
156 int ret; 159 int ret;
157 160
158 /* 161 /*
@@ -178,9 +181,17 @@ int spufs_handle_class1(struct spu_context *ctx)
178 if (!(dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED))) 181 if (!(dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED)))
179 return 0; 182 return 0;
180 183
184 spuctx_switch_state(ctx, SPUCTX_UTIL_IOWAIT);
185
181 pr_debug("ctx %p: ea %016lx, dsisr %016lx state %d\n", ctx, ea, 186 pr_debug("ctx %p: ea %016lx, dsisr %016lx state %d\n", ctx, ea,
182 dsisr, ctx->state); 187 dsisr, ctx->state);
183 188
189 ctx->stats.hash_flt++;
190 if (ctx->state == SPU_STATE_RUNNABLE) {
191 ctx->spu->stats.hash_flt++;
192 spu_switch_state(ctx->spu, SPU_UTIL_IOWAIT);
193 }
194
184 /* we must not hold the lock when entering spu_handle_mm_fault */ 195 /* we must not hold the lock when entering spu_handle_mm_fault */
185 spu_release(ctx); 196 spu_release(ctx);
186 197
@@ -192,7 +203,7 @@ int spufs_handle_class1(struct spu_context *ctx)
192 203
193 /* hashing failed, so try the actual fault handler */ 204 /* hashing failed, so try the actual fault handler */
194 if (ret) 205 if (ret)
195 ret = spu_handle_mm_fault(current->mm, ea, dsisr); 206 ret = spu_handle_mm_fault(current->mm, ea, dsisr, &flt);
196 207
197 spu_acquire(ctx); 208 spu_acquire(ctx);
198 /* 209 /*
@@ -201,11 +212,23 @@ int spufs_handle_class1(struct spu_context *ctx)
201 * In case of unhandled error report the problem to user space. 212 * In case of unhandled error report the problem to user space.
202 */ 213 */
203 if (!ret) { 214 if (!ret) {
215 if (flt == VM_FAULT_MINOR)
216 ctx->stats.min_flt++;
217 else
218 ctx->stats.maj_flt++;
219 if (ctx->state == SPU_STATE_RUNNABLE) {
220 if (flt == VM_FAULT_MINOR)
221 ctx->spu->stats.min_flt++;
222 else
223 ctx->spu->stats.maj_flt++;
224 }
225
204 if (ctx->spu) 226 if (ctx->spu)
205 ctx->ops->restart_dma(ctx); 227 ctx->ops->restart_dma(ctx);
206 } else 228 } else
207 spufs_handle_dma_error(ctx, ea, SPE_EVENT_SPE_DATA_STORAGE); 229 spufs_handle_dma_error(ctx, ea, SPE_EVENT_SPE_DATA_STORAGE);
208 230
231 spuctx_switch_state(ctx, SPUCTX_UTIL_SYSTEM);
209 return ret; 232 return ret;
210} 233}
211EXPORT_SYMBOL_GPL(spufs_handle_class1); 234EXPORT_SYMBOL_GPL(spufs_handle_class1);
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index b1e7e2f8a2..c2814ea96a 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -28,6 +28,7 @@
28#include <linux/pagemap.h> 28#include <linux/pagemap.h>
29#include <linux/poll.h> 29#include <linux/poll.h>
30#include <linux/ptrace.h> 30#include <linux/ptrace.h>
31#include <linux/seq_file.h>
31 32
32#include <asm/io.h> 33#include <asm/io.h>
33#include <asm/semaphore.h> 34#include <asm/semaphore.h>
@@ -39,6 +40,7 @@
39 40
40#define SPUFS_MMAP_4K (PAGE_SIZE == 0x1000) 41#define SPUFS_MMAP_4K (PAGE_SIZE == 0x1000)
41 42
43
42static int 44static int
43spufs_mem_open(struct inode *inode, struct file *file) 45spufs_mem_open(struct inode *inode, struct file *file)
44{ 46{
@@ -216,12 +218,12 @@ unsigned long spufs_get_unmapped_area(struct file *file, unsigned long addr,
216#endif /* CONFIG_SPU_FS_64K_LS */ 218#endif /* CONFIG_SPU_FS_64K_LS */
217 219
218static const struct file_operations spufs_mem_fops = { 220static const struct file_operations spufs_mem_fops = {
219 .open = spufs_mem_open, 221 .open = spufs_mem_open,
220 .release = spufs_mem_release, 222 .release = spufs_mem_release,
221 .read = spufs_mem_read, 223 .read = spufs_mem_read,
222 .write = spufs_mem_write, 224 .write = spufs_mem_write,
223 .llseek = generic_file_llseek, 225 .llseek = generic_file_llseek,
224 .mmap = spufs_mem_mmap, 226 .mmap = spufs_mem_mmap,
225#ifdef CONFIG_SPU_FS_64K_LS 227#ifdef CONFIG_SPU_FS_64K_LS
226 .get_unmapped_area = spufs_get_unmapped_area, 228 .get_unmapped_area = spufs_get_unmapped_area,
227#endif 229#endif
@@ -1497,14 +1499,15 @@ static ssize_t spufs_mfc_write(struct file *file, const char __user *buffer,
1497 if (status) 1499 if (status)
1498 ret = status; 1500 ret = status;
1499 } 1501 }
1500 spu_release(ctx);
1501 1502
1502 if (ret) 1503 if (ret)
1503 goto out; 1504 goto out_unlock;
1504 1505
1505 ctx->tagwait |= 1 << cmd.tag; 1506 ctx->tagwait |= 1 << cmd.tag;
1506 ret = size; 1507 ret = size;
1507 1508
1509out_unlock:
1510 spu_release(ctx);
1508out: 1511out:
1509 return ret; 1512 return ret;
1510} 1513}
@@ -1515,14 +1518,14 @@ static unsigned int spufs_mfc_poll(struct file *file,poll_table *wait)
1515 u32 free_elements, tagstatus; 1518 u32 free_elements, tagstatus;
1516 unsigned int mask; 1519 unsigned int mask;
1517 1520
1521 poll_wait(file, &ctx->mfc_wq, wait);
1522
1518 spu_acquire(ctx); 1523 spu_acquire(ctx);
1519 ctx->ops->set_mfc_query(ctx, ctx->tagwait, 2); 1524 ctx->ops->set_mfc_query(ctx, ctx->tagwait, 2);
1520 free_elements = ctx->ops->get_mfc_free_elements(ctx); 1525 free_elements = ctx->ops->get_mfc_free_elements(ctx);
1521 tagstatus = ctx->ops->read_mfc_tagstatus(ctx); 1526 tagstatus = ctx->ops->read_mfc_tagstatus(ctx);
1522 spu_release(ctx); 1527 spu_release(ctx);
1523 1528
1524 poll_wait(file, &ctx->mfc_wq, wait);
1525
1526 mask = 0; 1529 mask = 0;
1527 if (free_elements & 0xffff) 1530 if (free_elements & 0xffff)
1528 mask |= POLLOUT | POLLWRNORM; 1531 mask |= POLLOUT | POLLWRNORM;
@@ -1797,6 +1800,29 @@ static int spufs_info_open(struct inode *inode, struct file *file)
1797 return 0; 1800 return 0;
1798} 1801}
1799 1802
1803static int spufs_caps_show(struct seq_file *s, void *private)
1804{
1805 struct spu_context *ctx = s->private;
1806
1807 if (!(ctx->flags & SPU_CREATE_NOSCHED))
1808 seq_puts(s, "sched\n");
1809 if (!(ctx->flags & SPU_CREATE_ISOLATE))
1810 seq_puts(s, "step\n");
1811 return 0;
1812}
1813
1814static int spufs_caps_open(struct inode *inode, struct file *file)
1815{
1816 return single_open(file, spufs_caps_show, SPUFS_I(inode)->i_ctx);
1817}
1818
1819static const struct file_operations spufs_caps_fops = {
1820 .open = spufs_caps_open,
1821 .read = seq_read,
1822 .llseek = seq_lseek,
1823 .release = single_release,
1824};
1825
1800static ssize_t __spufs_mbox_info_read(struct spu_context *ctx, 1826static ssize_t __spufs_mbox_info_read(struct spu_context *ctx,
1801 char __user *buf, size_t len, loff_t *pos) 1827 char __user *buf, size_t len, loff_t *pos)
1802{ 1828{
@@ -2014,7 +2040,105 @@ static const struct file_operations spufs_proxydma_info_fops = {
2014 .read = spufs_proxydma_info_read, 2040 .read = spufs_proxydma_info_read,
2015}; 2041};
2016 2042
2043static int spufs_show_tid(struct seq_file *s, void *private)
2044{
2045 struct spu_context *ctx = s->private;
2046
2047 seq_printf(s, "%d\n", ctx->tid);
2048 return 0;
2049}
2050
2051static int spufs_tid_open(struct inode *inode, struct file *file)
2052{
2053 return single_open(file, spufs_show_tid, SPUFS_I(inode)->i_ctx);
2054}
2055
2056static const struct file_operations spufs_tid_fops = {
2057 .open = spufs_tid_open,
2058 .read = seq_read,
2059 .llseek = seq_lseek,
2060 .release = single_release,
2061};
2062
2063static const char *ctx_state_names[] = {
2064 "user", "system", "iowait", "loaded"
2065};
2066
2067static unsigned long long spufs_acct_time(struct spu_context *ctx,
2068 enum spuctx_execution_state state)
2069{
2070 unsigned long time = ctx->stats.times[state];
2071
2072 if (ctx->stats.execution_state == state)
2073 time += jiffies - ctx->stats.tstamp;
2074
2075 return jiffies_to_msecs(time);
2076}
2077
2078static unsigned long long spufs_slb_flts(struct spu_context *ctx)
2079{
2080 unsigned long long slb_flts = ctx->stats.slb_flt;
2081
2082 if (ctx->state == SPU_STATE_RUNNABLE) {
2083 slb_flts += (ctx->spu->stats.slb_flt -
2084 ctx->stats.slb_flt_base);
2085 }
2086
2087 return slb_flts;
2088}
2089
2090static unsigned long long spufs_class2_intrs(struct spu_context *ctx)
2091{
2092 unsigned long long class2_intrs = ctx->stats.class2_intr;
2093
2094 if (ctx->state == SPU_STATE_RUNNABLE) {
2095 class2_intrs += (ctx->spu->stats.class2_intr -
2096 ctx->stats.class2_intr_base);
2097 }
2098
2099 return class2_intrs;
2100}
2101
2102
2103static int spufs_show_stat(struct seq_file *s, void *private)
2104{
2105 struct spu_context *ctx = s->private;
2106
2107 spu_acquire(ctx);
2108 seq_printf(s, "%s %llu %llu %llu %llu "
2109 "%llu %llu %llu %llu %llu %llu %llu %llu\n",
2110 ctx_state_names[ctx->stats.execution_state],
2111 spufs_acct_time(ctx, SPUCTX_UTIL_USER),
2112 spufs_acct_time(ctx, SPUCTX_UTIL_SYSTEM),
2113 spufs_acct_time(ctx, SPUCTX_UTIL_IOWAIT),
2114 spufs_acct_time(ctx, SPUCTX_UTIL_LOADED),
2115 ctx->stats.vol_ctx_switch,
2116 ctx->stats.invol_ctx_switch,
2117 spufs_slb_flts(ctx),
2118 ctx->stats.hash_flt,
2119 ctx->stats.min_flt,
2120 ctx->stats.maj_flt,
2121 spufs_class2_intrs(ctx),
2122 ctx->stats.libassist);
2123 spu_release(ctx);
2124 return 0;
2125}
2126
2127static int spufs_stat_open(struct inode *inode, struct file *file)
2128{
2129 return single_open(file, spufs_show_stat, SPUFS_I(inode)->i_ctx);
2130}
2131
2132static const struct file_operations spufs_stat_fops = {
2133 .open = spufs_stat_open,
2134 .read = seq_read,
2135 .llseek = seq_lseek,
2136 .release = single_release,
2137};
2138
2139
2017struct tree_descr spufs_dir_contents[] = { 2140struct tree_descr spufs_dir_contents[] = {
2141 { "capabilities", &spufs_caps_fops, 0444, },
2018 { "mem", &spufs_mem_fops, 0666, }, 2142 { "mem", &spufs_mem_fops, 0666, },
2019 { "regs", &spufs_regs_fops, 0666, }, 2143 { "regs", &spufs_regs_fops, 0666, },
2020 { "mbox", &spufs_mbox_fops, 0444, }, 2144 { "mbox", &spufs_mbox_fops, 0444, },
@@ -2046,10 +2170,13 @@ struct tree_descr spufs_dir_contents[] = {
2046 { "wbox_info", &spufs_wbox_info_fops, 0444, }, 2170 { "wbox_info", &spufs_wbox_info_fops, 0444, },
2047 { "dma_info", &spufs_dma_info_fops, 0444, }, 2171 { "dma_info", &spufs_dma_info_fops, 0444, },
2048 { "proxydma_info", &spufs_proxydma_info_fops, 0444, }, 2172 { "proxydma_info", &spufs_proxydma_info_fops, 0444, },
2173 { "tid", &spufs_tid_fops, 0444, },
2174 { "stat", &spufs_stat_fops, 0444, },
2049 {}, 2175 {},
2050}; 2176};
2051 2177
2052struct tree_descr spufs_dir_nosched_contents[] = { 2178struct tree_descr spufs_dir_nosched_contents[] = {
2179 { "capabilities", &spufs_caps_fops, 0444, },
2053 { "mem", &spufs_mem_fops, 0666, }, 2180 { "mem", &spufs_mem_fops, 0666, },
2054 { "mbox", &spufs_mbox_fops, 0444, }, 2181 { "mbox", &spufs_mbox_fops, 0444, },
2055 { "ibox", &spufs_ibox_fops, 0444, }, 2182 { "ibox", &spufs_ibox_fops, 0444, },
@@ -2068,6 +2195,8 @@ struct tree_descr spufs_dir_nosched_contents[] = {
2068 { "psmap", &spufs_psmap_fops, 0666, }, 2195 { "psmap", &spufs_psmap_fops, 0666, },
2069 { "phys-id", &spufs_id_ops, 0666, }, 2196 { "phys-id", &spufs_id_ops, 0666, },
2070 { "object-id", &spufs_object_id_ops, 0666, }, 2197 { "object-id", &spufs_object_id_ops, 0666, },
2198 { "tid", &spufs_tid_fops, 0444, },
2199 { "stat", &spufs_stat_fops, 0444, },
2071 {}, 2200 {},
2072}; 2201};
2073 2202
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 9807206e02..f37460e5bf 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -232,10 +232,6 @@ static int spufs_dir_close(struct inode *inode, struct file *file)
232 return dcache_dir_close(inode, file); 232 return dcache_dir_close(inode, file);
233} 233}
234 234
235const struct inode_operations spufs_dir_inode_operations = {
236 .lookup = simple_lookup,
237};
238
239const struct file_operations spufs_context_fops = { 235const struct file_operations spufs_context_fops = {
240 .open = dcache_dir_open, 236 .open = dcache_dir_open,
241 .release = spufs_dir_close, 237 .release = spufs_dir_close,
@@ -269,7 +265,7 @@ spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags,
269 goto out_iput; 265 goto out_iput;
270 266
271 ctx->flags = flags; 267 ctx->flags = flags;
272 inode->i_op = &spufs_dir_inode_operations; 268 inode->i_op = &simple_dir_inode_operations;
273 inode->i_fop = &simple_dir_operations; 269 inode->i_fop = &simple_dir_operations;
274 if (flags & SPU_CREATE_NOSCHED) 270 if (flags & SPU_CREATE_NOSCHED)
275 ret = spufs_fill_dir(dentry, spufs_dir_nosched_contents, 271 ret = spufs_fill_dir(dentry, spufs_dir_nosched_contents,
@@ -386,7 +382,7 @@ spufs_mkgang(struct inode *dir, struct dentry *dentry, int mode)
386 if (!gang) 382 if (!gang)
387 goto out_iput; 383 goto out_iput;
388 384
389 inode->i_op = &spufs_dir_inode_operations; 385 inode->i_op = &simple_dir_inode_operations;
390 inode->i_fop = &simple_dir_operations; 386 inode->i_fop = &simple_dir_operations;
391 387
392 d_instantiate(dentry, inode); 388 d_instantiate(dentry, inode);
@@ -593,7 +589,7 @@ spufs_create_root(struct super_block *sb, void *data)
593 if (!inode) 589 if (!inode)
594 goto out; 590 goto out;
595 591
596 inode->i_op = &spufs_dir_inode_operations; 592 inode->i_op = &simple_dir_inode_operations;
597 inode->i_fop = &simple_dir_operations; 593 inode->i_fop = &simple_dir_operations;
598 SPUFS_I(inode)->i_ctx = NULL; 594 SPUFS_I(inode)->i_ctx = NULL;
599 595
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
index 57626600b1..58ae13b7de 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -29,7 +29,8 @@ static inline int spu_stopped(struct spu_context *ctx, u32 * stat)
29 spu = ctx->spu; 29 spu = ctx->spu;
30 pte_fault = spu->dsisr & 30 pte_fault = spu->dsisr &
31 (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED); 31 (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED);
32 return (!(*stat & 0x1) || pte_fault || spu->class_0_pending) ? 1 : 0; 32 return (!(*stat & SPU_STATUS_RUNNING) || pte_fault || spu->class_0_pending) ?
33 1 : 0;
33} 34}
34 35
35static int spu_setup_isolated(struct spu_context *ctx) 36static int spu_setup_isolated(struct spu_context *ctx)
@@ -142,8 +143,11 @@ static int spu_run_init(struct spu_context *ctx, u32 * npc)
142 runcntl = SPU_RUNCNTL_RUNNABLE; 143 runcntl = SPU_RUNCNTL_RUNNABLE;
143 ctx->ops->runcntl_write(ctx, runcntl); 144 ctx->ops->runcntl_write(ctx, runcntl);
144 } else { 145 } else {
145 spu_start_tick(ctx); 146 unsigned long mode = SPU_PRIVCNTL_MODE_NORMAL;
146 ctx->ops->npc_write(ctx, *npc); 147 ctx->ops->npc_write(ctx, *npc);
148 if (test_thread_flag(TIF_SINGLESTEP))
149 mode = SPU_PRIVCNTL_MODE_SINGLE_STEP;
150 out_be64(&ctx->spu->priv2->spu_privcntl_RW, mode);
147 ctx->ops->runcntl_write(ctx, SPU_RUNCNTL_RUNNABLE); 151 ctx->ops->runcntl_write(ctx, SPU_RUNCNTL_RUNNABLE);
148 } 152 }
149 153
@@ -155,7 +159,6 @@ static int spu_run_fini(struct spu_context *ctx, u32 * npc,
155{ 159{
156 int ret = 0; 160 int ret = 0;
157 161
158 spu_stop_tick(ctx);
159 *status = ctx->ops->status_read(ctx); 162 *status = ctx->ops->status_read(ctx);
160 *npc = ctx->ops->npc_read(ctx); 163 *npc = ctx->ops->npc_read(ctx);
161 spu_release(ctx); 164 spu_release(ctx);
@@ -298,9 +301,22 @@ long spufs_run_spu(struct file *file, struct spu_context *ctx,
298 ctx->ops->master_start(ctx); 301 ctx->ops->master_start(ctx);
299 ctx->event_return = 0; 302 ctx->event_return = 0;
300 303
301 ret = spu_acquire_runnable(ctx, 0); 304 spu_acquire(ctx);
302 if (ret) 305 if (ctx->state == SPU_STATE_SAVED) {
303 return ret; 306 __spu_update_sched_info(ctx);
307
308 ret = spu_activate(ctx, 0);
309 if (ret) {
310 spu_release(ctx);
311 goto out;
312 }
313 } else {
314 /*
315 * We have to update the scheduling priority under active_mutex
316 * to protect against find_victim().
317 */
318 spu_update_sched_info(ctx);
319 }
304 320
305 ret = spu_run_init(ctx, npc); 321 ret = spu_run_init(ctx, npc);
306 if (ret) { 322 if (ret) {
@@ -325,16 +341,20 @@ long spufs_run_spu(struct file *file, struct spu_context *ctx,
325 341
326 if (unlikely(ctx->state != SPU_STATE_RUNNABLE)) { 342 if (unlikely(ctx->state != SPU_STATE_RUNNABLE)) {
327 ret = spu_reacquire_runnable(ctx, npc, &status); 343 ret = spu_reacquire_runnable(ctx, npc, &status);
328 if (ret) { 344 if (ret)
329 spu_stop_tick(ctx);
330 goto out2; 345 goto out2;
331 }
332 continue; 346 continue;
333 } 347 }
334 ret = spu_process_events(ctx); 348 ret = spu_process_events(ctx);
335 349
336 } while (!ret && !(status & (SPU_STATUS_STOPPED_BY_STOP | 350 } while (!ret && !(status & (SPU_STATUS_STOPPED_BY_STOP |
337 SPU_STATUS_STOPPED_BY_HALT))); 351 SPU_STATUS_STOPPED_BY_HALT |
352 SPU_STATUS_SINGLE_STEP)));
353
354 if ((status & SPU_STATUS_STOPPED_BY_STOP) &&
355 (((status >> SPU_STOP_STATUS_SHIFT) & 0x3f00) == 0x2100) &&
356 (ctx->state == SPU_STATE_RUNNABLE))
357 ctx->stats.libassist++;
338 358
339 ctx->ops->master_stop(ctx); 359 ctx->ops->master_stop(ctx);
340 ret = spu_run_fini(ctx, npc, &status); 360 ret = spu_run_fini(ctx, npc, &status);
@@ -344,10 +364,15 @@ out2:
344 if ((ret == 0) || 364 if ((ret == 0) ||
345 ((ret == -ERESTARTSYS) && 365 ((ret == -ERESTARTSYS) &&
346 ((status & SPU_STATUS_STOPPED_BY_HALT) || 366 ((status & SPU_STATUS_STOPPED_BY_HALT) ||
367 (status & SPU_STATUS_SINGLE_STEP) ||
347 ((status & SPU_STATUS_STOPPED_BY_STOP) && 368 ((status & SPU_STATUS_STOPPED_BY_STOP) &&
348 (status >> SPU_STOP_STATUS_SHIFT != 0x2104))))) 369 (status >> SPU_STOP_STATUS_SHIFT != 0x2104)))))
349 ret = status; 370 ret = status;
350 371
372 /* Note: we don't need to force_sig SIGTRAP on single-step
373 * since we have TIF_SINGLESTEP set, thus the kernel will do
374 * it upon return from the syscall anyawy
375 */
351 if ((status & SPU_STATUS_STOPPED_BY_STOP) 376 if ((status & SPU_STATUS_STOPPED_BY_STOP)
352 && (status >> SPU_STOP_STATUS_SHIFT) == 0x3fff) { 377 && (status >> SPU_STOP_STATUS_SHIFT) == 0x3fff) {
353 force_sig(SIGTRAP, current); 378 force_sig(SIGTRAP, current);
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 3b831e07f1..e5b4dd1db2 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -35,6 +35,10 @@
35#include <linux/numa.h> 35#include <linux/numa.h>
36#include <linux/mutex.h> 36#include <linux/mutex.h>
37#include <linux/notifier.h> 37#include <linux/notifier.h>
38#include <linux/kthread.h>
39#include <linux/pid_namespace.h>
40#include <linux/proc_fs.h>
41#include <linux/seq_file.h>
38 42
39#include <asm/io.h> 43#include <asm/io.h>
40#include <asm/mmu_context.h> 44#include <asm/mmu_context.h>
@@ -43,54 +47,126 @@
43#include <asm/spu_priv1.h> 47#include <asm/spu_priv1.h>
44#include "spufs.h" 48#include "spufs.h"
45 49
46#define SPU_TIMESLICE (HZ)
47
48struct spu_prio_array { 50struct spu_prio_array {
49 DECLARE_BITMAP(bitmap, MAX_PRIO); 51 DECLARE_BITMAP(bitmap, MAX_PRIO);
50 struct list_head runq[MAX_PRIO]; 52 struct list_head runq[MAX_PRIO];
51 spinlock_t runq_lock; 53 spinlock_t runq_lock;
52 struct list_head active_list[MAX_NUMNODES]; 54 struct list_head active_list[MAX_NUMNODES];
53 struct mutex active_mutex[MAX_NUMNODES]; 55 struct mutex active_mutex[MAX_NUMNODES];
56 int nr_active[MAX_NUMNODES];
57 int nr_waiting;
54}; 58};
55 59
60static unsigned long spu_avenrun[3];
56static struct spu_prio_array *spu_prio; 61static struct spu_prio_array *spu_prio;
57static struct workqueue_struct *spu_sched_wq; 62static struct task_struct *spusched_task;
63static struct timer_list spusched_timer;
64
65/*
66 * Priority of a normal, non-rt, non-niced'd process (aka nice level 0).
67 */
68#define NORMAL_PRIO 120
69
70/*
71 * Frequency of the spu scheduler tick. By default we do one SPU scheduler
72 * tick for every 10 CPU scheduler ticks.
73 */
74#define SPUSCHED_TICK (10)
58 75
59static inline int node_allowed(int node) 76/*
77 * These are the 'tuning knobs' of the scheduler:
78 *
79 * Minimum timeslice is 5 msecs (or 1 spu scheduler tick, whichever is
80 * larger), default timeslice is 100 msecs, maximum timeslice is 800 msecs.
81 */
82#define MIN_SPU_TIMESLICE max(5 * HZ / (1000 * SPUSCHED_TICK), 1)
83#define DEF_SPU_TIMESLICE (100 * HZ / (1000 * SPUSCHED_TICK))
84
85#define MAX_USER_PRIO (MAX_PRIO - MAX_RT_PRIO)
86#define SCALE_PRIO(x, prio) \
87 max(x * (MAX_PRIO - prio) / (MAX_USER_PRIO / 2), MIN_SPU_TIMESLICE)
88
89/*
90 * scale user-nice values [ -20 ... 0 ... 19 ] to time slice values:
91 * [800ms ... 100ms ... 5ms]
92 *
93 * The higher a thread's priority, the bigger timeslices
94 * it gets during one round of execution. But even the lowest
95 * priority thread gets MIN_TIMESLICE worth of execution time.
96 */
97void spu_set_timeslice(struct spu_context *ctx)
60{ 98{
61 cpumask_t mask; 99 if (ctx->prio < NORMAL_PRIO)
100 ctx->time_slice = SCALE_PRIO(DEF_SPU_TIMESLICE * 4, ctx->prio);
101 else
102 ctx->time_slice = SCALE_PRIO(DEF_SPU_TIMESLICE, ctx->prio);
103}
62 104
63 if (!nr_cpus_node(node)) 105/*
64 return 0; 106 * Update scheduling information from the owning thread.
65 mask = node_to_cpumask(node); 107 */
66 if (!cpus_intersects(mask, current->cpus_allowed)) 108void __spu_update_sched_info(struct spu_context *ctx)
67 return 0; 109{
68 return 1; 110 /*
111 * 32-Bit assignment are atomic on powerpc, and we don't care about
112 * memory ordering here because retriving the controlling thread is
113 * per defintion racy.
114 */
115 ctx->tid = current->pid;
116
117 /*
118 * We do our own priority calculations, so we normally want
119 * ->static_prio to start with. Unfortunately thies field
120 * contains junk for threads with a realtime scheduling
121 * policy so we have to look at ->prio in this case.
122 */
123 if (rt_prio(current->prio))
124 ctx->prio = current->prio;
125 else
126 ctx->prio = current->static_prio;
127 ctx->policy = current->policy;
128
129 /*
130 * A lot of places that don't hold active_mutex poke into
131 * cpus_allowed, including grab_runnable_context which
132 * already holds the runq_lock. So abuse runq_lock
133 * to protect this field aswell.
134 */
135 spin_lock(&spu_prio->runq_lock);
136 ctx->cpus_allowed = current->cpus_allowed;
137 spin_unlock(&spu_prio->runq_lock);
69} 138}
70 139
71void spu_start_tick(struct spu_context *ctx) 140void spu_update_sched_info(struct spu_context *ctx)
72{ 141{
73 if (ctx->policy == SCHED_RR) { 142 int node = ctx->spu->node;
74 /* 143
75 * Make sure the exiting bit is cleared. 144 mutex_lock(&spu_prio->active_mutex[node]);
76 */ 145 __spu_update_sched_info(ctx);
77 clear_bit(SPU_SCHED_EXITING, &ctx->sched_flags); 146 mutex_unlock(&spu_prio->active_mutex[node]);
78 mb();
79 queue_delayed_work(spu_sched_wq, &ctx->sched_work, SPU_TIMESLICE);
80 }
81} 147}
82 148
83void spu_stop_tick(struct spu_context *ctx) 149static int __node_allowed(struct spu_context *ctx, int node)
84{ 150{
85 if (ctx->policy == SCHED_RR) { 151 if (nr_cpus_node(node)) {
86 /* 152 cpumask_t mask = node_to_cpumask(node);
87 * While the work can be rearming normally setting this flag 153
88 * makes sure it does not rearm itself anymore. 154 if (cpus_intersects(mask, ctx->cpus_allowed))
89 */ 155 return 1;
90 set_bit(SPU_SCHED_EXITING, &ctx->sched_flags);
91 mb();
92 cancel_delayed_work(&ctx->sched_work);
93 } 156 }
157
158 return 0;
159}
160
161static int node_allowed(struct spu_context *ctx, int node)
162{
163 int rval;
164
165 spin_lock(&spu_prio->runq_lock);
166 rval = __node_allowed(ctx, node);
167 spin_unlock(&spu_prio->runq_lock);
168
169 return rval;
94} 170}
95 171
96/** 172/**
@@ -99,9 +175,18 @@ void spu_stop_tick(struct spu_context *ctx)
99 */ 175 */
100static void spu_add_to_active_list(struct spu *spu) 176static void spu_add_to_active_list(struct spu *spu)
101{ 177{
102 mutex_lock(&spu_prio->active_mutex[spu->node]); 178 int node = spu->node;
103 list_add_tail(&spu->list, &spu_prio->active_list[spu->node]); 179
104 mutex_unlock(&spu_prio->active_mutex[spu->node]); 180 mutex_lock(&spu_prio->active_mutex[node]);
181 spu_prio->nr_active[node]++;
182 list_add_tail(&spu->list, &spu_prio->active_list[node]);
183 mutex_unlock(&spu_prio->active_mutex[node]);
184}
185
186static void __spu_remove_from_active_list(struct spu *spu)
187{
188 list_del_init(&spu->list);
189 spu_prio->nr_active[spu->node]--;
105} 190}
106 191
107/** 192/**
@@ -113,7 +198,7 @@ static void spu_remove_from_active_list(struct spu *spu)
113 int node = spu->node; 198 int node = spu->node;
114 199
115 mutex_lock(&spu_prio->active_mutex[node]); 200 mutex_lock(&spu_prio->active_mutex[node]);
116 list_del_init(&spu->list); 201 __spu_remove_from_active_list(spu);
117 mutex_unlock(&spu_prio->active_mutex[node]); 202 mutex_unlock(&spu_prio->active_mutex[node]);
118} 203}
119 204
@@ -144,6 +229,10 @@ static void spu_bind_context(struct spu *spu, struct spu_context *ctx)
144{ 229{
145 pr_debug("%s: pid=%d SPU=%d NODE=%d\n", __FUNCTION__, current->pid, 230 pr_debug("%s: pid=%d SPU=%d NODE=%d\n", __FUNCTION__, current->pid,
146 spu->number, spu->node); 231 spu->number, spu->node);
232
233 ctx->stats.slb_flt_base = spu->stats.slb_flt;
234 ctx->stats.class2_intr_base = spu->stats.class2_intr;
235
147 spu->ctx = ctx; 236 spu->ctx = ctx;
148 spu->flags = 0; 237 spu->flags = 0;
149 ctx->spu = spu; 238 ctx->spu = spu;
@@ -161,8 +250,8 @@ static void spu_bind_context(struct spu *spu, struct spu_context *ctx)
161 spu->timestamp = jiffies; 250 spu->timestamp = jiffies;
162 spu_cpu_affinity_set(spu, raw_smp_processor_id()); 251 spu_cpu_affinity_set(spu, raw_smp_processor_id());
163 spu_switch_notify(spu, ctx); 252 spu_switch_notify(spu, ctx);
164 spu_add_to_active_list(spu);
165 ctx->state = SPU_STATE_RUNNABLE; 253 ctx->state = SPU_STATE_RUNNABLE;
254 spu_switch_state(spu, SPU_UTIL_SYSTEM);
166} 255}
167 256
168/** 257/**
@@ -175,7 +264,8 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
175 pr_debug("%s: unbind pid=%d SPU=%d NODE=%d\n", __FUNCTION__, 264 pr_debug("%s: unbind pid=%d SPU=%d NODE=%d\n", __FUNCTION__,
176 spu->pid, spu->number, spu->node); 265 spu->pid, spu->number, spu->node);
177 266
178 spu_remove_from_active_list(spu); 267 spu_switch_state(spu, SPU_UTIL_IDLE);
268
179 spu_switch_notify(spu, NULL); 269 spu_switch_notify(spu, NULL);
180 spu_unmap_mappings(ctx); 270 spu_unmap_mappings(ctx);
181 spu_save(&ctx->csa, spu); 271 spu_save(&ctx->csa, spu);
@@ -192,6 +282,11 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
192 ctx->spu = NULL; 282 ctx->spu = NULL;
193 spu->flags = 0; 283 spu->flags = 0;
194 spu->ctx = NULL; 284 spu->ctx = NULL;
285
286 ctx->stats.slb_flt +=
287 (spu->stats.slb_flt - ctx->stats.slb_flt_base);
288 ctx->stats.class2_intr +=
289 (spu->stats.class2_intr - ctx->stats.class2_intr_base);
195} 290}
196 291
197/** 292/**
@@ -200,20 +295,39 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
200 */ 295 */
201static void __spu_add_to_rq(struct spu_context *ctx) 296static void __spu_add_to_rq(struct spu_context *ctx)
202{ 297{
203 int prio = ctx->prio; 298 /*
204 299 * Unfortunately this code path can be called from multiple threads
205 list_add_tail(&ctx->rq, &spu_prio->runq[prio]); 300 * on behalf of a single context due to the way the problem state
206 set_bit(prio, spu_prio->bitmap); 301 * mmap support works.
302 *
303 * Fortunately we need to wake up all these threads at the same time
304 * and can simply skip the runqueue addition for every but the first
305 * thread getting into this codepath.
306 *
307 * It's still quite hacky, and long-term we should proxy all other
308 * threads through the owner thread so that spu_run is in control
309 * of all the scheduling activity for a given context.
310 */
311 if (list_empty(&ctx->rq)) {
312 list_add_tail(&ctx->rq, &spu_prio->runq[ctx->prio]);
313 set_bit(ctx->prio, spu_prio->bitmap);
314 if (!spu_prio->nr_waiting++)
315 __mod_timer(&spusched_timer, jiffies + SPUSCHED_TICK);
316 }
207} 317}
208 318
209static void __spu_del_from_rq(struct spu_context *ctx) 319static void __spu_del_from_rq(struct spu_context *ctx)
210{ 320{
211 int prio = ctx->prio; 321 int prio = ctx->prio;
212 322
213 if (!list_empty(&ctx->rq)) 323 if (!list_empty(&ctx->rq)) {
324 if (!--spu_prio->nr_waiting)
325 del_timer(&spusched_timer);
214 list_del_init(&ctx->rq); 326 list_del_init(&ctx->rq);
215 if (list_empty(&spu_prio->runq[prio])) 327
216 clear_bit(prio, spu_prio->bitmap); 328 if (list_empty(&spu_prio->runq[prio]))
329 clear_bit(prio, spu_prio->bitmap);
330 }
217} 331}
218 332
219static void spu_prio_wait(struct spu_context *ctx) 333static void spu_prio_wait(struct spu_context *ctx)
@@ -244,7 +358,7 @@ static struct spu *spu_get_idle(struct spu_context *ctx)
244 358
245 for (n = 0; n < MAX_NUMNODES; n++, node++) { 359 for (n = 0; n < MAX_NUMNODES; n++, node++) {
246 node = (node < MAX_NUMNODES) ? node : 0; 360 node = (node < MAX_NUMNODES) ? node : 0;
247 if (!node_allowed(node)) 361 if (!node_allowed(ctx, node))
248 continue; 362 continue;
249 spu = spu_alloc_node(node); 363 spu = spu_alloc_node(node);
250 if (spu) 364 if (spu)
@@ -276,15 +390,15 @@ static struct spu *find_victim(struct spu_context *ctx)
276 node = cpu_to_node(raw_smp_processor_id()); 390 node = cpu_to_node(raw_smp_processor_id());
277 for (n = 0; n < MAX_NUMNODES; n++, node++) { 391 for (n = 0; n < MAX_NUMNODES; n++, node++) {
278 node = (node < MAX_NUMNODES) ? node : 0; 392 node = (node < MAX_NUMNODES) ? node : 0;
279 if (!node_allowed(node)) 393 if (!node_allowed(ctx, node))
280 continue; 394 continue;
281 395
282 mutex_lock(&spu_prio->active_mutex[node]); 396 mutex_lock(&spu_prio->active_mutex[node]);
283 list_for_each_entry(spu, &spu_prio->active_list[node], list) { 397 list_for_each_entry(spu, &spu_prio->active_list[node], list) {
284 struct spu_context *tmp = spu->ctx; 398 struct spu_context *tmp = spu->ctx;
285 399
286 if (tmp->rt_priority < ctx->rt_priority && 400 if (tmp->prio > ctx->prio &&
287 (!victim || tmp->rt_priority < victim->rt_priority)) 401 (!victim || tmp->prio > victim->prio))
288 victim = spu->ctx; 402 victim = spu->ctx;
289 } 403 }
290 mutex_unlock(&spu_prio->active_mutex[node]); 404 mutex_unlock(&spu_prio->active_mutex[node]);
@@ -312,7 +426,10 @@ static struct spu *find_victim(struct spu_context *ctx)
312 victim = NULL; 426 victim = NULL;
313 goto restart; 427 goto restart;
314 } 428 }
429 spu_remove_from_active_list(spu);
315 spu_unbind_context(spu, victim); 430 spu_unbind_context(spu, victim);
431 victim->stats.invol_ctx_switch++;
432 spu->stats.invol_ctx_switch++;
316 mutex_unlock(&victim->state_mutex); 433 mutex_unlock(&victim->state_mutex);
317 /* 434 /*
318 * We need to break out of the wait loop in spu_run 435 * We need to break out of the wait loop in spu_run
@@ -338,22 +455,30 @@ static struct spu *find_victim(struct spu_context *ctx)
338 */ 455 */
339int spu_activate(struct spu_context *ctx, unsigned long flags) 456int spu_activate(struct spu_context *ctx, unsigned long flags)
340{ 457{
341 458 spuctx_switch_state(ctx, SPUCTX_UTIL_SYSTEM);
342 if (ctx->spu)
343 return 0;
344 459
345 do { 460 do {
346 struct spu *spu; 461 struct spu *spu;
347 462
463 /*
464 * If there are multiple threads waiting for a single context
465 * only one actually binds the context while the others will
466 * only be able to acquire the state_mutex once the context
467 * already is in runnable state.
468 */
469 if (ctx->spu)
470 return 0;
471
348 spu = spu_get_idle(ctx); 472 spu = spu_get_idle(ctx);
349 /* 473 /*
350 * If this is a realtime thread we try to get it running by 474 * If this is a realtime thread we try to get it running by
351 * preempting a lower priority thread. 475 * preempting a lower priority thread.
352 */ 476 */
353 if (!spu && ctx->rt_priority) 477 if (!spu && rt_prio(ctx->prio))
354 spu = find_victim(ctx); 478 spu = find_victim(ctx);
355 if (spu) { 479 if (spu) {
356 spu_bind_context(spu, ctx); 480 spu_bind_context(spu, ctx);
481 spu_add_to_active_list(spu);
357 return 0; 482 return 0;
358 } 483 }
359 484
@@ -369,23 +494,28 @@ int spu_activate(struct spu_context *ctx, unsigned long flags)
369 * Remove the highest priority context on the runqueue and return it 494 * Remove the highest priority context on the runqueue and return it
370 * to the caller. Returns %NULL if no runnable context was found. 495 * to the caller. Returns %NULL if no runnable context was found.
371 */ 496 */
372static struct spu_context *grab_runnable_context(int prio) 497static struct spu_context *grab_runnable_context(int prio, int node)
373{ 498{
374 struct spu_context *ctx = NULL; 499 struct spu_context *ctx;
375 int best; 500 int best;
376 501
377 spin_lock(&spu_prio->runq_lock); 502 spin_lock(&spu_prio->runq_lock);
378 best = sched_find_first_bit(spu_prio->bitmap); 503 best = sched_find_first_bit(spu_prio->bitmap);
379 if (best < prio) { 504 while (best < prio) {
380 struct list_head *rq = &spu_prio->runq[best]; 505 struct list_head *rq = &spu_prio->runq[best];
381 506
382 BUG_ON(list_empty(rq)); 507 list_for_each_entry(ctx, rq, rq) {
383 508 /* XXX(hch): check for affinity here aswell */
384 ctx = list_entry(rq->next, struct spu_context, rq); 509 if (__node_allowed(ctx, node)) {
385 __spu_del_from_rq(ctx); 510 __spu_del_from_rq(ctx);
511 goto found;
512 }
513 }
514 best++;
386 } 515 }
516 ctx = NULL;
517 found:
387 spin_unlock(&spu_prio->runq_lock); 518 spin_unlock(&spu_prio->runq_lock);
388
389 return ctx; 519 return ctx;
390} 520}
391 521
@@ -395,9 +525,12 @@ static int __spu_deactivate(struct spu_context *ctx, int force, int max_prio)
395 struct spu_context *new = NULL; 525 struct spu_context *new = NULL;
396 526
397 if (spu) { 527 if (spu) {
398 new = grab_runnable_context(max_prio); 528 new = grab_runnable_context(max_prio, spu->node);
399 if (new || force) { 529 if (new || force) {
530 spu_remove_from_active_list(spu);
400 spu_unbind_context(spu, ctx); 531 spu_unbind_context(spu, ctx);
532 ctx->stats.vol_ctx_switch++;
533 spu->stats.vol_ctx_switch++;
401 spu_free(spu); 534 spu_free(spu);
402 if (new) 535 if (new)
403 wake_up(&new->stop_wq); 536 wake_up(&new->stop_wq);
@@ -417,7 +550,17 @@ static int __spu_deactivate(struct spu_context *ctx, int force, int max_prio)
417 */ 550 */
418void spu_deactivate(struct spu_context *ctx) 551void spu_deactivate(struct spu_context *ctx)
419{ 552{
553 /*
554 * We must never reach this for a nosched context,
555 * but handle the case gracefull instead of panicing.
556 */
557 if (ctx->flags & SPU_CREATE_NOSCHED) {
558 WARN_ON(1);
559 return;
560 }
561
420 __spu_deactivate(ctx, 1, MAX_PRIO); 562 __spu_deactivate(ctx, 1, MAX_PRIO);
563 spuctx_switch_state(ctx, SPUCTX_UTIL_USER);
421} 564}
422 565
423/** 566/**
@@ -432,56 +575,178 @@ void spu_yield(struct spu_context *ctx)
432{ 575{
433 if (!(ctx->flags & SPU_CREATE_NOSCHED)) { 576 if (!(ctx->flags & SPU_CREATE_NOSCHED)) {
434 mutex_lock(&ctx->state_mutex); 577 mutex_lock(&ctx->state_mutex);
435 __spu_deactivate(ctx, 0, MAX_PRIO); 578 if (__spu_deactivate(ctx, 0, MAX_PRIO))
579 spuctx_switch_state(ctx, SPUCTX_UTIL_USER);
580 else {
581 spuctx_switch_state(ctx, SPUCTX_UTIL_LOADED);
582 spu_switch_state(ctx->spu, SPU_UTIL_USER);
583 }
436 mutex_unlock(&ctx->state_mutex); 584 mutex_unlock(&ctx->state_mutex);
437 } 585 }
438} 586}
439 587
440void spu_sched_tick(struct work_struct *work) 588static void spusched_tick(struct spu_context *ctx)
441{ 589{
442 struct spu_context *ctx = 590 if (ctx->flags & SPU_CREATE_NOSCHED)
443 container_of(work, struct spu_context, sched_work.work); 591 return;
444 int preempted; 592 if (ctx->policy == SCHED_FIFO)
593 return;
594
595 if (--ctx->time_slice)
596 return;
445 597
446 /* 598 /*
447 * If this context is being stopped avoid rescheduling from the 599 * Unfortunately active_mutex ranks outside of state_mutex, so
448 * scheduler tick because we would block on the state_mutex. 600 * we have to trylock here. If we fail give the context another
449 * The caller will yield the spu later on anyway. 601 * tick and try again.
450 */ 602 */
451 if (test_bit(SPU_SCHED_EXITING, &ctx->sched_flags)) 603 if (mutex_trylock(&ctx->state_mutex)) {
452 return; 604 struct spu *spu = ctx->spu;
605 struct spu_context *new;
453 606
454 mutex_lock(&ctx->state_mutex); 607 new = grab_runnable_context(ctx->prio + 1, spu->node);
455 preempted = __spu_deactivate(ctx, 0, ctx->prio + 1); 608 if (new) {
456 mutex_unlock(&ctx->state_mutex);
457 609
458 if (preempted) { 610 __spu_remove_from_active_list(spu);
459 /* 611 spu_unbind_context(spu, ctx);
460 * We need to break out of the wait loop in spu_run manually 612 ctx->stats.invol_ctx_switch++;
461 * to ensure this context gets put on the runqueue again 613 spu->stats.invol_ctx_switch++;
462 * ASAP. 614 spu_free(spu);
463 */ 615 wake_up(&new->stop_wq);
464 wake_up(&ctx->stop_wq); 616 /*
617 * We need to break out of the wait loop in
618 * spu_run manually to ensure this context
619 * gets put on the runqueue again ASAP.
620 */
621 wake_up(&ctx->stop_wq);
622 }
623 spu_set_timeslice(ctx);
624 mutex_unlock(&ctx->state_mutex);
465 } else { 625 } else {
466 spu_start_tick(ctx); 626 ctx->time_slice++;
467 } 627 }
468} 628}
469 629
470int __init spu_sched_init(void) 630/**
631 * count_active_contexts - count nr of active tasks
632 *
633 * Return the number of tasks currently running or waiting to run.
634 *
635 * Note that we don't take runq_lock / active_mutex here. Reading
636 * a single 32bit value is atomic on powerpc, and we don't care
637 * about memory ordering issues here.
638 */
639static unsigned long count_active_contexts(void)
471{ 640{
472 int i; 641 int nr_active = 0, node;
473 642
474 spu_sched_wq = create_singlethread_workqueue("spusched"); 643 for (node = 0; node < MAX_NUMNODES; node++)
475 if (!spu_sched_wq) 644 nr_active += spu_prio->nr_active[node];
476 return 1; 645 nr_active += spu_prio->nr_waiting;
477 646
478 spu_prio = kzalloc(sizeof(struct spu_prio_array), GFP_KERNEL); 647 return nr_active;
479 if (!spu_prio) { 648}
480 printk(KERN_WARNING "%s: Unable to allocate priority queue.\n", 649
481 __FUNCTION__); 650/**
482 destroy_workqueue(spu_sched_wq); 651 * spu_calc_load - given tick count, update the avenrun load estimates.
483 return 1; 652 * @tick: tick count
653 *
654 * No locking against reading these values from userspace, as for
655 * the CPU loadavg code.
656 */
657static void spu_calc_load(unsigned long ticks)
658{
659 unsigned long active_tasks; /* fixed-point */
660 static int count = LOAD_FREQ;
661
662 count -= ticks;
663
664 if (unlikely(count < 0)) {
665 active_tasks = count_active_contexts() * FIXED_1;
666 do {
667 CALC_LOAD(spu_avenrun[0], EXP_1, active_tasks);
668 CALC_LOAD(spu_avenrun[1], EXP_5, active_tasks);
669 CALC_LOAD(spu_avenrun[2], EXP_15, active_tasks);
670 count += LOAD_FREQ;
671 } while (count < 0);
484 } 672 }
673}
674
675static void spusched_wake(unsigned long data)
676{
677 mod_timer(&spusched_timer, jiffies + SPUSCHED_TICK);
678 wake_up_process(spusched_task);
679 spu_calc_load(SPUSCHED_TICK);
680}
681
682static int spusched_thread(void *unused)
683{
684 struct spu *spu, *next;
685 int node;
686
687 while (!kthread_should_stop()) {
688 set_current_state(TASK_INTERRUPTIBLE);
689 schedule();
690 for (node = 0; node < MAX_NUMNODES; node++) {
691 mutex_lock(&spu_prio->active_mutex[node]);
692 list_for_each_entry_safe(spu, next,
693 &spu_prio->active_list[node],
694 list)
695 spusched_tick(spu->ctx);
696 mutex_unlock(&spu_prio->active_mutex[node]);
697 }
698 }
699
700 return 0;
701}
702
703#define LOAD_INT(x) ((x) >> FSHIFT)
704#define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
705
706static int show_spu_loadavg(struct seq_file *s, void *private)
707{
708 int a, b, c;
709
710 a = spu_avenrun[0] + (FIXED_1/200);
711 b = spu_avenrun[1] + (FIXED_1/200);
712 c = spu_avenrun[2] + (FIXED_1/200);
713
714 /*
715 * Note that last_pid doesn't really make much sense for the
716 * SPU loadavg (it even seems very odd on the CPU side..),
717 * but we include it here to have a 100% compatible interface.
718 */
719 seq_printf(s, "%d.%02d %d.%02d %d.%02d %ld/%d %d\n",
720 LOAD_INT(a), LOAD_FRAC(a),
721 LOAD_INT(b), LOAD_FRAC(b),
722 LOAD_INT(c), LOAD_FRAC(c),
723 count_active_contexts(),
724 atomic_read(&nr_spu_contexts),
725 current->nsproxy->pid_ns->last_pid);
726 return 0;
727}
728
729static int spu_loadavg_open(struct inode *inode, struct file *file)
730{
731 return single_open(file, show_spu_loadavg, NULL);
732}
733
734static const struct file_operations spu_loadavg_fops = {
735 .open = spu_loadavg_open,
736 .read = seq_read,
737 .llseek = seq_lseek,
738 .release = single_release,
739};
740
741int __init spu_sched_init(void)
742{
743 struct proc_dir_entry *entry;
744 int err = -ENOMEM, i;
745
746 spu_prio = kzalloc(sizeof(struct spu_prio_array), GFP_KERNEL);
747 if (!spu_prio)
748 goto out;
749
485 for (i = 0; i < MAX_PRIO; i++) { 750 for (i = 0; i < MAX_PRIO; i++) {
486 INIT_LIST_HEAD(&spu_prio->runq[i]); 751 INIT_LIST_HEAD(&spu_prio->runq[i]);
487 __clear_bit(i, spu_prio->bitmap); 752 __clear_bit(i, spu_prio->bitmap);
@@ -492,7 +757,30 @@ int __init spu_sched_init(void)
492 INIT_LIST_HEAD(&spu_prio->active_list[i]); 757 INIT_LIST_HEAD(&spu_prio->active_list[i]);
493 } 758 }
494 spin_lock_init(&spu_prio->runq_lock); 759 spin_lock_init(&spu_prio->runq_lock);
760
761 setup_timer(&spusched_timer, spusched_wake, 0);
762
763 spusched_task = kthread_run(spusched_thread, NULL, "spusched");
764 if (IS_ERR(spusched_task)) {
765 err = PTR_ERR(spusched_task);
766 goto out_free_spu_prio;
767 }
768
769 entry = create_proc_entry("spu_loadavg", 0, NULL);
770 if (!entry)
771 goto out_stop_kthread;
772 entry->proc_fops = &spu_loadavg_fops;
773
774 pr_debug("spusched: tick: %d, min ticks: %d, default ticks: %d\n",
775 SPUSCHED_TICK, MIN_SPU_TIMESLICE, DEF_SPU_TIMESLICE);
495 return 0; 776 return 0;
777
778 out_stop_kthread:
779 kthread_stop(spusched_task);
780 out_free_spu_prio:
781 kfree(spu_prio);
782 out:
783 return err;
496} 784}
497 785
498void __exit spu_sched_exit(void) 786void __exit spu_sched_exit(void)
@@ -500,6 +788,11 @@ void __exit spu_sched_exit(void)
500 struct spu *spu, *tmp; 788 struct spu *spu, *tmp;
501 int node; 789 int node;
502 790
791 remove_proc_entry("spu_loadavg", NULL);
792
793 del_timer_sync(&spusched_timer);
794 kthread_stop(spusched_task);
795
503 for (node = 0; node < MAX_NUMNODES; node++) { 796 for (node = 0; node < MAX_NUMNODES; node++) {
504 mutex_lock(&spu_prio->active_mutex[node]); 797 mutex_lock(&spu_prio->active_mutex[node]);
505 list_for_each_entry_safe(spu, tmp, &spu_prio->active_list[node], 798 list_for_each_entry_safe(spu, tmp, &spu_prio->active_list[node],
@@ -510,5 +803,4 @@ void __exit spu_sched_exit(void)
510 mutex_unlock(&spu_prio->active_mutex[node]); 803 mutex_unlock(&spu_prio->active_mutex[node]);
511 } 804 }
512 kfree(spu_prio); 805 kfree(spu_prio);
513 destroy_workqueue(spu_sched_wq);
514} 806}
diff --git a/arch/powerpc/platforms/cell/spufs/spu_restore.c b/arch/powerpc/platforms/cell/spufs/spu_restore.c
index 0bf723dcd6..4e19ed7a07 100644
--- a/arch/powerpc/platforms/cell/spufs/spu_restore.c
+++ b/arch/powerpc/platforms/cell/spufs/spu_restore.c
@@ -296,7 +296,7 @@ static inline void restore_complete(void)
296 * This code deviates from the documented sequence in the 296 * This code deviates from the documented sequence in the
297 * following aspects: 297 * following aspects:
298 * 298 *
299 * 1. The EA for LSCSA is passed from PPE in the 299 * 1. The EA for LSCSA is passed from PPE in the
300 * signal notification channels. 300 * signal notification channels.
301 * 2. The register spill area is pulled by SPU 301 * 2. The register spill area is pulled by SPU
302 * into LS, rather than pushed by PPE. 302 * into LS, rather than pushed by PPE.
diff --git a/arch/powerpc/platforms/cell/spufs/spu_save.c b/arch/powerpc/platforms/cell/spufs/spu_save.c
index 196033b8a5..ae95cc1701 100644
--- a/arch/powerpc/platforms/cell/spufs/spu_save.c
+++ b/arch/powerpc/platforms/cell/spufs/spu_save.c
@@ -44,7 +44,7 @@ static inline void save_event_mask(void)
44 * Read the SPU_RdEventMsk channel and save to the LSCSA. 44 * Read the SPU_RdEventMsk channel and save to the LSCSA.
45 */ 45 */
46 offset = LSCSA_QW_OFFSET(event_mask); 46 offset = LSCSA_QW_OFFSET(event_mask);
47 regs_spill[offset].slot[0] = spu_readch(SPU_RdEventStatMask); 47 regs_spill[offset].slot[0] = spu_readch(SPU_RdEventMask);
48} 48}
49 49
50static inline void save_tag_mask(void) 50static inline void save_tag_mask(void)
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h
index 47617e8014..08b3530288 100644
--- a/arch/powerpc/platforms/cell/spufs/spufs.h
+++ b/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -26,6 +26,7 @@
26#include <linux/mutex.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#include <linux/cpumask.h>
29 30
30#include <asm/spu.h> 31#include <asm/spu.h>
31#include <asm/spu_csa.h> 32#include <asm/spu_csa.h>
@@ -39,9 +40,17 @@ enum {
39struct spu_context_ops; 40struct spu_context_ops;
40struct spu_gang; 41struct spu_gang;
41 42
42/* ctx->sched_flags */ 43/*
43enum { 44 * This is the state for spu utilization reporting to userspace.
44 SPU_SCHED_EXITING = 0, 45 * Because this state is visible to userspace it must never change and needs
46 * to be kept strictly separate from any internal state kept by the kernel.
47 */
48enum spuctx_execution_state {
49 SPUCTX_UTIL_USER = 0,
50 SPUCTX_UTIL_SYSTEM,
51 SPUCTX_UTIL_IOWAIT,
52 SPUCTX_UTIL_LOADED,
53 SPUCTX_UTIL_MAX
45}; 54};
46 55
47struct spu_context { 56struct spu_context {
@@ -81,13 +90,34 @@ struct spu_context {
81 struct list_head gang_list; 90 struct list_head gang_list;
82 struct spu_gang *gang; 91 struct spu_gang *gang;
83 92
93 /* owner thread */
94 pid_t tid;
95
84 /* scheduler fields */ 96 /* scheduler fields */
85 struct list_head rq; 97 struct list_head rq;
86 struct delayed_work sched_work; 98 unsigned int time_slice;
87 unsigned long sched_flags; 99 unsigned long sched_flags;
88 unsigned long rt_priority; 100 cpumask_t cpus_allowed;
89 int policy; 101 int policy;
90 int prio; 102 int prio;
103
104 /* statistics */
105 struct {
106 /* updates protected by ctx->state_mutex */
107 enum spuctx_execution_state execution_state;
108 unsigned long tstamp; /* time of last ctx switch */
109 unsigned long times[SPUCTX_UTIL_MAX];
110 unsigned long long vol_ctx_switch;
111 unsigned long long invol_ctx_switch;
112 unsigned long long min_flt;
113 unsigned long long maj_flt;
114 unsigned long long hash_flt;
115 unsigned long long slb_flt;
116 unsigned long long slb_flt_base; /* # at last ctx switch */
117 unsigned long long class2_intr;
118 unsigned long long class2_intr_base; /* # at last ctx switch */
119 unsigned long long libassist;
120 } stats;
91}; 121};
92 122
93struct spu_gang { 123struct spu_gang {
@@ -177,6 +207,7 @@ void spu_gang_add_ctx(struct spu_gang *gang, struct spu_context *ctx);
177int spufs_handle_class1(struct spu_context *ctx); 207int spufs_handle_class1(struct spu_context *ctx);
178 208
179/* context management */ 209/* context management */
210extern atomic_t nr_spu_contexts;
180static inline void spu_acquire(struct spu_context *ctx) 211static inline void spu_acquire(struct spu_context *ctx)
181{ 212{
182 mutex_lock(&ctx->state_mutex); 213 mutex_lock(&ctx->state_mutex);
@@ -200,9 +231,9 @@ void spu_acquire_saved(struct spu_context *ctx);
200int spu_activate(struct spu_context *ctx, unsigned long flags); 231int spu_activate(struct spu_context *ctx, unsigned long flags);
201void spu_deactivate(struct spu_context *ctx); 232void spu_deactivate(struct spu_context *ctx);
202void spu_yield(struct spu_context *ctx); 233void spu_yield(struct spu_context *ctx);
203void spu_start_tick(struct spu_context *ctx); 234void spu_set_timeslice(struct spu_context *ctx);
204void spu_stop_tick(struct spu_context *ctx); 235void spu_update_sched_info(struct spu_context *ctx);
205void spu_sched_tick(struct work_struct *work); 236void __spu_update_sched_info(struct spu_context *ctx);
206int __init spu_sched_init(void); 237int __init spu_sched_init(void);
207void __exit spu_sched_exit(void); 238void __exit spu_sched_exit(void);
208 239
@@ -210,7 +241,7 @@ extern char *isolated_loader;
210 241
211/* 242/*
212 * spufs_wait 243 * spufs_wait
213 * Same as wait_event_interruptible(), except that here 244 * Same as wait_event_interruptible(), except that here
214 * we need to call spu_release(ctx) before sleeping, and 245 * we need to call spu_release(ctx) before sleeping, and
215 * then spu_acquire(ctx) when awoken. 246 * then spu_acquire(ctx) when awoken.
216 */ 247 */
@@ -256,4 +287,37 @@ struct spufs_coredump_reader {
256extern struct spufs_coredump_reader spufs_coredump_read[]; 287extern struct spufs_coredump_reader spufs_coredump_read[];
257extern int spufs_coredump_num_notes; 288extern int spufs_coredump_num_notes;
258 289
290/*
291 * This function is a little bit too large for an inline, but
292 * as fault.c is built into the kernel we can't move it out of
293 * line.
294 */
295static inline void spuctx_switch_state(struct spu_context *ctx,
296 enum spuctx_execution_state new_state)
297{
298 WARN_ON(!mutex_is_locked(&ctx->state_mutex));
299
300 if (ctx->stats.execution_state != new_state) {
301 unsigned long curtime = jiffies;
302
303 ctx->stats.times[ctx->stats.execution_state] +=
304 curtime - ctx->stats.tstamp;
305 ctx->stats.tstamp = curtime;
306 ctx->stats.execution_state = new_state;
307 }
308}
309
310static inline void spu_switch_state(struct spu *spu,
311 enum spuctx_execution_state new_state)
312{
313 if (spu->stats.utilization_state != new_state) {
314 unsigned long curtime = jiffies;
315
316 spu->stats.times[spu->stats.utilization_state] +=
317 curtime - spu->stats.tstamp;
318 spu->stats.tstamp = curtime;
319 spu->stats.utilization_state = new_state;
320 }
321}
322
259#endif 323#endif
diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c
index 71a0b41adb..9c506ba08c 100644
--- a/arch/powerpc/platforms/cell/spufs/switch.c
+++ b/arch/powerpc/platforms/cell/spufs/switch.c
@@ -70,7 +70,7 @@
70 } 70 }
71#endif /* debug */ 71#endif /* debug */
72 72
73#define POLL_WHILE_FALSE(_c) POLL_WHILE_TRUE(!(_c)) 73#define POLL_WHILE_FALSE(_c) POLL_WHILE_TRUE(!(_c))
74 74
75static inline void acquire_spu_lock(struct spu *spu) 75static inline void acquire_spu_lock(struct spu *spu)
76{ 76{
@@ -387,6 +387,19 @@ static inline void save_ppu_querytype(struct spu_state *csa, struct spu *spu)
387 csa->prob.dma_querytype_RW = in_be32(&prob->dma_querytype_RW); 387 csa->prob.dma_querytype_RW = in_be32(&prob->dma_querytype_RW);
388} 388}
389 389
390static inline void save_ppu_tagstatus(struct spu_state *csa, struct spu *spu)
391{
392 struct spu_problem __iomem *prob = spu->problem;
393
394 /* Save the Prxy_TagStatus register in the CSA.
395 *
396 * It is unnecessary to restore dma_tagstatus_R, however,
397 * dma_tagstatus_R in the CSA is accessed via backing_ops, so
398 * we must save it.
399 */
400 csa->prob.dma_tagstatus_R = in_be32(&prob->dma_tagstatus_R);
401}
402
390static inline void save_mfc_csr_tsq(struct spu_state *csa, struct spu *spu) 403static inline void save_mfc_csr_tsq(struct spu_state *csa, struct spu *spu)
391{ 404{
392 struct spu_priv2 __iomem *priv2 = spu->priv2; 405 struct spu_priv2 __iomem *priv2 = spu->priv2;
@@ -1812,6 +1825,7 @@ static void save_csa(struct spu_state *prev, struct spu *spu)
1812 save_mfc_queues(prev, spu); /* Step 19. */ 1825 save_mfc_queues(prev, spu); /* Step 19. */
1813 save_ppu_querymask(prev, spu); /* Step 20. */ 1826 save_ppu_querymask(prev, spu); /* Step 20. */
1814 save_ppu_querytype(prev, spu); /* Step 21. */ 1827 save_ppu_querytype(prev, spu); /* Step 21. */
1828 save_ppu_tagstatus(prev, spu); /* NEW. */
1815 save_mfc_csr_tsq(prev, spu); /* Step 22. */ 1829 save_mfc_csr_tsq(prev, spu); /* Step 22. */
1816 save_mfc_csr_cmd(prev, spu); /* Step 23. */ 1830 save_mfc_csr_cmd(prev, spu); /* Step 23. */
1817 save_mfc_csr_ato(prev, spu); /* Step 24. */ 1831 save_mfc_csr_ato(prev, spu); /* Step 24. */
@@ -1930,7 +1944,7 @@ static void harvest(struct spu_state *prev, struct spu *spu)
1930 reset_spu_privcntl(prev, spu); /* Step 16. */ 1944 reset_spu_privcntl(prev, spu); /* Step 16. */
1931 reset_spu_lslr(prev, spu); /* Step 17. */ 1945 reset_spu_lslr(prev, spu); /* Step 17. */
1932 setup_mfc_sr1(prev, spu); /* Step 18. */ 1946 setup_mfc_sr1(prev, spu); /* Step 18. */
1933 spu_invalidate_slbs(spu); /* Step 19. */ 1947 spu_invalidate_slbs(spu); /* Step 19. */
1934 reset_ch_part1(prev, spu); /* Step 20. */ 1948 reset_ch_part1(prev, spu); /* Step 20. */
1935 reset_ch_part2(prev, spu); /* Step 21. */ 1949 reset_ch_part2(prev, spu); /* Step 21. */
1936 enable_interrupts(prev, spu); /* Step 22. */ 1950 enable_interrupts(prev, spu); /* Step 22. */
diff --git a/arch/powerpc/platforms/chrp/Kconfig b/arch/powerpc/platforms/chrp/Kconfig
index d2c6905319..22b4b4e3b6 100644
--- a/arch/powerpc/platforms/chrp/Kconfig
+++ b/arch/powerpc/platforms/chrp/Kconfig
@@ -8,4 +8,5 @@ config PPC_CHRP
8 select PPC_MPC106 8 select PPC_MPC106
9 select PPC_UDBG_16550 9 select PPC_UDBG_16550
10 select PPC_NATIVE 10 select PPC_NATIVE
11 select PCI
11 default y 12 default y
diff --git a/arch/powerpc/platforms/chrp/Makefile b/arch/powerpc/platforms/chrp/Makefile
index 902feb1ac4..4b3bfadc70 100644
--- a/arch/powerpc/platforms/chrp/Makefile
+++ b/arch/powerpc/platforms/chrp/Makefile
@@ -1,4 +1,3 @@
1obj-y += setup.o time.o pegasos_eth.o 1obj-y += setup.o time.o pegasos_eth.o pci.o
2obj-$(CONFIG_PCI) += pci.o
3obj-$(CONFIG_SMP) += smp.o 2obj-$(CONFIG_SMP) += smp.o
4obj-$(CONFIG_NVRAM) += nvram.o 3obj-$(CONFIG_NVRAM) += nvram.o
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c
index d32fedc991..3690624e49 100644
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -99,7 +99,7 @@ int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
99 struct pci_controller *hose = bus->sysdata; 99 struct pci_controller *hose = bus->sysdata;
100 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) 100 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
101 | (((bus->number - hose->first_busno) & 0xff) << 16) 101 | (((bus->number - hose->first_busno) & 0xff) << 16)
102 | (hose->index << 24); 102 | (hose->global_number << 24);
103 int ret = -1; 103 int ret = -1;
104 int rval; 104 int rval;
105 105
@@ -114,7 +114,7 @@ int rtas_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
114 struct pci_controller *hose = bus->sysdata; 114 struct pci_controller *hose = bus->sysdata;
115 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) 115 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
116 | (((bus->number - hose->first_busno) & 0xff) << 16) 116 | (((bus->number - hose->first_busno) & 0xff) << 16)
117 | (hose->index << 24); 117 | (hose->global_number << 24);
118 int rval; 118 int rval;
119 119
120 rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL, 120 rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL,
@@ -254,13 +254,12 @@ chrp_find_bridges(void)
254 printk(" at %llx", (unsigned long long)r.start); 254 printk(" at %llx", (unsigned long long)r.start);
255 printk("\n"); 255 printk("\n");
256 256
257 hose = pcibios_alloc_controller(); 257 hose = pcibios_alloc_controller(dev);
258 if (!hose) { 258 if (!hose) {
259 printk("Can't allocate PCI controller structure for %s\n", 259 printk("Can't allocate PCI controller structure for %s\n",
260 dev->full_name); 260 dev->full_name);
261 continue; 261 continue;
262 } 262 }
263 hose->arch_data = dev;
264 hose->first_busno = bus_range[0]; 263 hose->first_busno = bus_range[0];
265 hose->last_busno = bus_range[1]; 264 hose->last_busno = bus_range[1];
266 265
diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig
index f2d26268ca..bec772674e 100644
--- a/arch/powerpc/platforms/embedded6xx/Kconfig
+++ b/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -28,6 +28,7 @@ config PPC_HOLLY
28 bool "PPC750GX/CL with TSI10x bridge (Hickory/Holly)" 28 bool "PPC750GX/CL with TSI10x bridge (Hickory/Holly)"
29 select TSI108_BRIDGE 29 select TSI108_BRIDGE
30 select PPC_UDBG_16550 30 select PPC_UDBG_16550
31 select WANT_DEVICE_TREE
31 help 32 help
32 Select PPC_HOLLY if configuring for an IBM 750GX/CL Eval 33 Select PPC_HOLLY if configuring for an IBM 750GX/CL Eval
33 Board with TSI108/9 bridge (Hickory/Holly) 34 Board with TSI108/9 bridge (Hickory/Holly)
@@ -44,6 +45,7 @@ endchoice
44config TSI108_BRIDGE 45config TSI108_BRIDGE
45 bool 46 bool
46 depends on MPC7448HPC2 || PPC_HOLLY 47 depends on MPC7448HPC2 || PPC_HOLLY
48 select PCI
47 select MPIC 49 select MPIC
48 select MPIC_WEIRD 50 select MPIC_WEIRD
49 default y 51 default y
diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
index 3a0b4a0140..6292e36dc5 100644
--- a/arch/powerpc/platforms/embedded6xx/holly.c
+++ b/arch/powerpc/platforms/embedded6xx/holly.c
@@ -45,7 +45,7 @@
45 45
46#define HOLLY_PCI_CFG_PHYS 0x7c000000 46#define HOLLY_PCI_CFG_PHYS 0x7c000000
47 47
48int holly_exclude_device(u_char bus, u_char devfn) 48int holly_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn)
49{ 49{
50 if (bus == 0 && PCI_SLOT(devfn) == 0) 50 if (bus == 0 && PCI_SLOT(devfn) == 0)
51 return PCIBIOS_DEVICE_NOT_FOUND; 51 return PCIBIOS_DEVICE_NOT_FOUND;
diff --git a/arch/powerpc/platforms/embedded6xx/linkstation.c b/arch/powerpc/platforms/embedded6xx/linkstation.c
index b412f006a9..f4d0a7a603 100644
--- a/arch/powerpc/platforms/embedded6xx/linkstation.c
+++ b/arch/powerpc/platforms/embedded6xx/linkstation.c
@@ -54,8 +54,9 @@ static struct mtd_partition linkstation_physmap_partitions[] = {
54 }, 54 },
55}; 55};
56 56
57static int __init add_bridge(struct device_node *dev) 57static int __init linkstation_add_bridge(struct device_node *dev)
58{ 58{
59#ifdef CONFIG_PCI
59 int len; 60 int len;
60 struct pci_controller *hose; 61 struct pci_controller *hose;
61 const int *bus_range; 62 const int *bus_range;
@@ -67,18 +68,17 @@ static int __init add_bridge(struct device_node *dev)
67 printk(KERN_WARNING "Can't get bus-range for %s, assume" 68 printk(KERN_WARNING "Can't get bus-range for %s, assume"
68 " bus 0\n", dev->full_name); 69 " bus 0\n", dev->full_name);
69 70
70 hose = pcibios_alloc_controller(); 71 hose = pcibios_alloc_controller(dev);
71 if (hose == NULL) 72 if (hose == NULL)
72 return -ENOMEM; 73 return -ENOMEM;
73 hose->first_busno = bus_range ? bus_range[0] : 0; 74 hose->first_busno = bus_range ? bus_range[0] : 0;
74 hose->last_busno = bus_range ? bus_range[1] : 0xff; 75 hose->last_busno = bus_range ? bus_range[1] : 0xff;
75 hose->arch_data = dev;
76 setup_indirect_pci(hose, 0xfec00000, 0xfee00000); 76 setup_indirect_pci(hose, 0xfec00000, 0xfee00000);
77 77
78 /* Interpret the "ranges" property */ 78 /* Interpret the "ranges" property */
79 /* This also maps the I/O region and sets isa_io/mem_base */ 79 /* This also maps the I/O region and sets isa_io/mem_base */
80 pci_process_bridge_OF_ranges(hose, dev, 1); 80 pci_process_bridge_OF_ranges(hose, dev, 1);
81 81#endif
82 return 0; 82 return 0;
83} 83}
84 84
@@ -92,7 +92,7 @@ static void __init linkstation_setup_arch(void)
92 92
93 /* Lookup PCI host bridges */ 93 /* Lookup PCI host bridges */
94 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;)
95 add_bridge(np); 95 linkstation_add_bridge(np);
96 96
97 printk(KERN_INFO "BUFFALO Network Attached Storage Series\n"); 97 printk(KERN_INFO "BUFFALO Network Attached Storage Series\n");
98 printk(KERN_INFO "(C) 2002-2005 BUFFALO INC.\n"); 98 printk(KERN_INFO "(C) 2002-2005 BUFFALO INC.\n");
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
index 4542e0c837..1e3cc69487 100644
--- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
+++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
@@ -54,15 +54,10 @@
54 54
55#define MPC7448HPC2_PCI_CFG_PHYS 0xfb000000 55#define MPC7448HPC2_PCI_CFG_PHYS 0xfb000000
56 56
57#ifndef CONFIG_PCI
58isa_io_base = MPC7448_HPC2_ISA_IO_BASE;
59isa_mem_base = MPC7448_HPC2_ISA_MEM_BASE;
60pci_dram_offset = MPC7448_HPC2_PCI_MEM_OFFSET;
61#endif
62
63extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val); 57extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
64 58
65int mpc7448_hpc2_exclude_device(u_char bus, u_char devfn) 59int mpc7448_hpc2_exclude_device(struct pci_controller *hose,
60 u_char bus, u_char devfn)
66{ 61{
67 if (bus == 0 && PCI_SLOT(devfn) == 0) 62 if (bus == 0 && PCI_SLOT(devfn) == 0)
68 return PCIBIOS_DEVICE_NOT_FOUND; 63 return PCIBIOS_DEVICE_NOT_FOUND;
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h
index a543a5242e..f7e0e0c7f8 100644
--- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h
+++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h
@@ -18,9 +18,4 @@
18 18
19#include <asm/ppcboot.h> 19#include <asm/ppcboot.h>
20 20
21/* Base Addresses for the PCI bus
22 */
23#define MPC7448_HPC2_PCI_MEM_OFFSET (0x00000000)
24#define MPC7448_HPC2_ISA_IO_BASE (0x00000000)
25#define MPC7448_HPC2_ISA_MEM_BASE (0x00000000)
26#endif /* __PPC_PLATFORMS_MPC7448_HPC2_H */ 21#endif /* __PPC_PLATFORMS_MPC7448_HPC2_H */
diff --git a/arch/powerpc/platforms/iseries/call_hpt.h b/arch/powerpc/platforms/iseries/call_hpt.h
index a843b0f87b..8d95fe4b55 100644
--- a/arch/powerpc/platforms/iseries/call_hpt.h
+++ b/arch/powerpc/platforms/iseries/call_hpt.h
@@ -76,24 +76,25 @@ static inline u64 HvCallHpt_invalidateSetSwBitsGet(u32 hpteIndex, u8 bitson,
76 return compressedStatus; 76 return compressedStatus;
77} 77}
78 78
79static inline u64 HvCallHpt_findValid(hpte_t *hpte, u64 vpn) 79static inline u64 HvCallHpt_findValid(struct hash_pte *hpte, u64 vpn)
80{ 80{
81 return HvCall3Ret16(HvCallHptFindValid, hpte, vpn, 0, 0); 81 return HvCall3Ret16(HvCallHptFindValid, hpte, vpn, 0, 0);
82} 82}
83 83
84static inline u64 HvCallHpt_findNextValid(hpte_t *hpte, u32 hpteIndex, 84static inline u64 HvCallHpt_findNextValid(struct hash_pte *hpte, u32 hpteIndex,
85 u8 bitson, u8 bitsoff) 85 u8 bitson, u8 bitsoff)
86{ 86{
87 return HvCall3Ret16(HvCallHptFindNextValid, hpte, hpteIndex, 87 return HvCall3Ret16(HvCallHptFindNextValid, hpte, hpteIndex,
88 bitson, bitsoff); 88 bitson, bitsoff);
89} 89}
90 90
91static inline void HvCallHpt_get(hpte_t *hpte, u32 hpteIndex) 91static inline void HvCallHpt_get(struct hash_pte *hpte, u32 hpteIndex)
92{ 92{
93 HvCall2Ret16(HvCallHptGet, hpte, hpteIndex, 0); 93 HvCall2Ret16(HvCallHptGet, hpte, hpteIndex, 0);
94} 94}
95 95
96static inline void HvCallHpt_addValidate(u32 hpteIndex, u32 hBit, hpte_t *hpte) 96static inline void HvCallHpt_addValidate(u32 hpteIndex, u32 hBit,
97 struct hash_pte *hpte)
97{ 98{
98 HvCall4(HvCallHptAddValidate, hpteIndex, hBit, hpte->v, hpte->r); 99 HvCall4(HvCallHptAddValidate, hpteIndex, hBit, hpte->v, hpte->r);
99} 100}
diff --git a/arch/powerpc/platforms/iseries/htab.c b/arch/powerpc/platforms/iseries/htab.c
index ed44dfceaa..b4e2c7a038 100644
--- a/arch/powerpc/platforms/iseries/htab.c
+++ b/arch/powerpc/platforms/iseries/htab.c
@@ -44,7 +44,7 @@ long iSeries_hpte_insert(unsigned long hpte_group, unsigned long va,
44 unsigned long vflags, int psize) 44 unsigned long vflags, int psize)
45{ 45{
46 long slot; 46 long slot;
47 hpte_t lhpte; 47 struct hash_pte lhpte;
48 int secondary = 0; 48 int secondary = 0;
49 49
50 BUG_ON(psize != MMU_PAGE_4K); 50 BUG_ON(psize != MMU_PAGE_4K);
@@ -99,7 +99,7 @@ long iSeries_hpte_insert(unsigned long hpte_group, unsigned long va,
99 99
100static unsigned long iSeries_hpte_getword0(unsigned long slot) 100static unsigned long iSeries_hpte_getword0(unsigned long slot)
101{ 101{
102 hpte_t hpte; 102 struct hash_pte hpte;
103 103
104 HvCallHpt_get(&hpte, slot); 104 HvCallHpt_get(&hpte, slot);
105 return hpte.v; 105 return hpte.v;
@@ -144,7 +144,7 @@ static long iSeries_hpte_remove(unsigned long hpte_group)
144static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp, 144static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp,
145 unsigned long va, int psize, int local) 145 unsigned long va, int psize, int local)
146{ 146{
147 hpte_t hpte; 147 struct hash_pte hpte;
148 unsigned long want_v; 148 unsigned long want_v;
149 149
150 iSeries_hlock(slot); 150 iSeries_hlock(slot);
@@ -176,7 +176,7 @@ static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp,
176 */ 176 */
177static long iSeries_hpte_find(unsigned long vpn) 177static long iSeries_hpte_find(unsigned long vpn)
178{ 178{
179 hpte_t hpte; 179 struct hash_pte hpte;
180 long slot; 180 long slot;
181 181
182 /* 182 /*
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
index 9c97422715..da87162000 100644
--- a/arch/powerpc/platforms/iseries/pci.c
+++ b/arch/powerpc/platforms/iseries/pci.c
@@ -742,6 +742,11 @@ void __init iSeries_pcibios_init(void)
742 /* Install IO hooks */ 742 /* Install IO hooks */
743 ppc_pci_io = iseries_pci_io; 743 ppc_pci_io = iseries_pci_io;
744 744
745 /* iSeries has no IO space in the common sense, it needs to set
746 * the IO base to 0
747 */
748 pci_io_base = 0;
749
745 if (root == NULL) { 750 if (root == NULL) {
746 printk(KERN_CRIT "iSeries_pcibios_init: can't find root " 751 printk(KERN_CRIT "iSeries_pcibios_init: can't find root "
747 "of device tree\n"); 752 "of device tree\n");
@@ -763,7 +768,7 @@ void __init iSeries_pcibios_init(void)
763 if (phb == NULL) 768 if (phb == NULL)
764 continue; 769 continue;
765 770
766 phb->pci_mem_offset = phb->local_number = bus; 771 phb->pci_mem_offset = bus;
767 phb->first_busno = bus; 772 phb->first_busno = bus;
768 phb->last_busno = bus; 773 phb->last_busno = bus;
769 phb->ops = &iSeries_pci_ops; 774 phb->ops = &iSeries_pci_ops;
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c
index 7f5dcee814..13a8b1908d 100644
--- a/arch/powerpc/platforms/iseries/setup.c
+++ b/arch/powerpc/platforms/iseries/setup.c
@@ -79,8 +79,6 @@ extern void iSeries_pci_final_fixup(void);
79static void iSeries_pci_final_fixup(void) { } 79static void iSeries_pci_final_fixup(void) { }
80#endif 80#endif
81 81
82extern unsigned long iSeries_recal_tb;
83extern unsigned long iSeries_recal_titan;
84 82
85struct MemoryBlock { 83struct MemoryBlock {
86 unsigned long absStart; 84 unsigned long absStart;
@@ -292,8 +290,8 @@ static void __init iSeries_init_early(void)
292{ 290{
293 DBG(" -> iSeries_init_early()\n"); 291 DBG(" -> iSeries_init_early()\n");
294 292
295 iSeries_recal_tb = get_tb(); 293 /* Snapshot the timebase, for use in later recalibration */
296 iSeries_recal_titan = HvCallXm_loadTod(); 294 iSeries_time_init_early();
297 295
298 /* 296 /*
299 * Initialize the DMA/TCE management 297 * Initialize the DMA/TCE management
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 7aaa5bbc93..fceaae40fe 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -444,7 +444,7 @@ static void __init setup_u3_ht(struct pci_controller* hose)
444 u3_ht = hose; 444 u3_ht = hose;
445} 445}
446 446
447static int __init add_bridge(struct device_node *dev) 447static int __init maple_add_bridge(struct device_node *dev)
448{ 448{
449 int len; 449 int len;
450 struct pci_controller *hose; 450 struct pci_controller *hose;
@@ -519,23 +519,6 @@ void __devinit maple_pci_irq_fixup(struct pci_dev *dev)
519 DBG(" <- maple_pci_irq_fixup\n"); 519 DBG(" <- maple_pci_irq_fixup\n");
520} 520}
521 521
522static void __init maple_fixup_phb_resources(void)
523{
524 struct pci_controller *hose, *tmp;
525
526 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
527 unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base;
528
529 hose->io_resource.start += offset;
530 hose->io_resource.end += offset;
531
532 printk(KERN_INFO "PCI Host %d, io start: %llx; io end: %llx\n",
533 hose->global_number,
534 (unsigned long long)hose->io_resource.start,
535 (unsigned long long)hose->io_resource.end);
536 }
537}
538
539void __init maple_pci_init(void) 522void __init maple_pci_init(void)
540{ 523{
541 struct device_node *np, *root; 524 struct device_node *np, *root;
@@ -558,7 +541,7 @@ void __init maple_pci_init(void)
558 continue; 541 continue;
559 if ((of_device_is_compatible(np, "u4-pcie") || 542 if ((of_device_is_compatible(np, "u4-pcie") ||
560 of_device_is_compatible(np, "u3-agp")) && 543 of_device_is_compatible(np, "u3-agp")) &&
561 add_bridge(np) == 0) 544 maple_add_bridge(np) == 0)
562 of_node_get(np); 545 of_node_get(np);
563 546
564 if (of_device_is_compatible(np, "u3-ht")) { 547 if (of_device_is_compatible(np, "u3-ht")) {
@@ -570,27 +553,9 @@ void __init maple_pci_init(void)
570 553
571 /* Now setup the HyperTransport host if we found any 554 /* Now setup the HyperTransport host if we found any
572 */ 555 */
573 if (ht && add_bridge(ht) != 0) 556 if (ht && maple_add_bridge(ht) != 0)
574 of_node_put(ht); 557 of_node_put(ht);
575 558
576 /*
577 * We need to call pci_setup_phb_io for the HT bridge first
578 * so it gets the I/O port numbers starting at 0, and we
579 * need to call it for the AGP bridge after that so it gets
580 * small positive I/O port numbers.
581 */
582 if (u3_ht)
583 pci_setup_phb_io(u3_ht, 1);
584 if (u3_agp)
585 pci_setup_phb_io(u3_agp, 0);
586 if (u4_pcie)
587 pci_setup_phb_io(u4_pcie, 0);
588
589 /* Fixup the IO resources on our host bridges as the common code
590 * does it only for childs of the host bridges
591 */
592 maple_fixup_phb_resources();
593
594 /* Setup the linkage between OF nodes and PHBs */ 559 /* Setup the linkage between OF nodes and PHBs */
595 pci_devs_phb_init(); 560 pci_devs_phb_init();
596 561
diff --git a/arch/powerpc/platforms/pasemi/Kconfig b/arch/powerpc/platforms/pasemi/Kconfig
index 7c5076e38e..95cd90fd81 100644
--- a/arch/powerpc/platforms/pasemi/Kconfig
+++ b/arch/powerpc/platforms/pasemi/Kconfig
@@ -25,4 +25,13 @@ config PPC_PASEMI_MDIO
25 help 25 help
26 Driver for MDIO via GPIO on PWRficient platforms 26 Driver for MDIO via GPIO on PWRficient platforms
27 27
28config ELECTRA_IDE
29 tristate "Electra IDE driver"
30 default y
31 depends on PPC_PASEMI && ATA
32 select PATA_PLATFORM
33 help
34 This includes driver support for the Electra on-board IDE
35 interface.
36
28endmenu 37endmenu
diff --git a/arch/powerpc/platforms/pasemi/Makefile b/arch/powerpc/platforms/pasemi/Makefile
index 2cd2a4f26a..f47fcac7e5 100644
--- a/arch/powerpc/platforms/pasemi/Makefile
+++ b/arch/powerpc/platforms/pasemi/Makefile
@@ -1,3 +1,4 @@
1obj-y += setup.o pci.o time.o idle.o powersave.o iommu.o 1obj-y += setup.o pci.o time.o idle.o powersave.o iommu.o
2obj-$(CONFIG_PPC_PASEMI_MDIO) += gpio_mdio.o 2obj-$(CONFIG_PPC_PASEMI_MDIO) += gpio_mdio.o
3obj-$(CONFIG_ELECTRA_IDE) += electra_ide.o
3obj-$(CONFIG_PPC_PASEMI_CPUFREQ) += cpufreq.o 4obj-$(CONFIG_PPC_PASEMI_CPUFREQ) += cpufreq.o
diff --git a/arch/powerpc/platforms/pasemi/electra_ide.c b/arch/powerpc/platforms/pasemi/electra_ide.c
new file mode 100644
index 0000000000..12fb0c9492
--- /dev/null
+++ b/arch/powerpc/platforms/pasemi/electra_ide.c
@@ -0,0 +1,96 @@
1/*
2 * Copyright (C) 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#include <linux/platform_device.h>
21
22#include <asm/prom.h>
23#include <asm/system.h>
24
25/* The electra IDE interface is incredibly simple: Just a device on the localbus
26 * with interrupts hooked up to one of the GPIOs. The device tree contains the
27 * address window and interrupt mappings already, and the pata_platform driver handles
28 * the rest. We just need to hook the two up.
29 */
30
31#define MAX_IFS 4 /* really, we have only one */
32
33static struct platform_device *pdevs[MAX_IFS];
34
35static int __devinit electra_ide_init(void)
36{
37 struct device_node *np;
38 struct resource r[3];
39 int ret = 0;
40 int i;
41
42 np = of_find_compatible_node(NULL, "ide", "electra-ide");
43 i = 0;
44
45 while (np && i < MAX_IFS) {
46 memset(r, 0, sizeof(r));
47
48 /* pata_platform wants two address ranges: one for the base registers,
49 * another for the control (altstatus). It's located at offset 0x3f6 in
50 * the window, but the device tree only has one large register window
51 * that covers both ranges. So we need to split it up by hand here:
52 */
53
54 ret = of_address_to_resource(np, 0, &r[0]);
55 if (ret)
56 goto out;
57 ret = of_address_to_resource(np, 0, &r[1]);
58 if (ret)
59 goto out;
60
61 r[1].start += 0x3f6;
62 r[0].end = r[1].start-1;
63
64 r[2].start = irq_of_parse_and_map(np, 0);
65 r[2].end = irq_of_parse_and_map(np, 0);
66 r[2].flags = IORESOURCE_IRQ;
67
68 pr_debug("registering platform device at 0x%lx/0x%lx, irq is %ld\n",
69 r[0].start, r[1].start, r[2].start);
70 pdevs[i] = platform_device_register_simple("pata_platform", i, r, 3);
71 if (IS_ERR(pdevs[i])) {
72 ret = PTR_ERR(pdevs[i]);
73 pdevs[i] = NULL;
74 goto out;
75 }
76 np = of_find_compatible_node(np, "ide", "electra-ide");
77 }
78out:
79 return ret;
80}
81module_init(electra_ide_init);
82
83static void __devexit electra_ide_exit(void)
84{
85 int i;
86
87 for (i = 0; i < MAX_IFS; i++)
88 if (pdevs[i])
89 platform_device_unregister(pdevs[i]);
90}
91module_exit(electra_ide_exit);
92
93
94MODULE_LICENSE("GPL");
95MODULE_AUTHOR ("Olof Johansson <olof@lixom.net>");
96MODULE_DESCRIPTION("PA Semi Electra IDE driver");
diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c
index bbc6dfcfaa..ab1f5f62bc 100644
--- a/arch/powerpc/platforms/pasemi/pci.c
+++ b/arch/powerpc/platforms/pasemi/pci.c
@@ -132,7 +132,7 @@ static void __init setup_pa_pxp(struct pci_controller *hose)
132 hose->cfg_data = ioremap(0xe0000000, 0x10000000); 132 hose->cfg_data = ioremap(0xe0000000, 0x10000000);
133} 133}
134 134
135static int __init add_bridge(struct device_node *dev) 135static int __init pas_add_bridge(struct device_node *dev)
136{ 136{
137 struct pci_controller *hose; 137 struct pci_controller *hose;
138 138
@@ -150,29 +150,11 @@ static int __init add_bridge(struct device_node *dev)
150 printk(KERN_INFO "Found PA-PXP PCI host bridge.\n"); 150 printk(KERN_INFO "Found PA-PXP PCI host bridge.\n");
151 151
152 /* Interpret the "ranges" property */ 152 /* Interpret the "ranges" property */
153 /* This also maps the I/O region and sets isa_io/mem_base */
154 pci_process_bridge_OF_ranges(hose, dev, 1); 153 pci_process_bridge_OF_ranges(hose, dev, 1);
155 pci_setup_phb_io(hose, 1);
156 154
157 return 0; 155 return 0;
158} 156}
159 157
160
161static void __init pas_fixup_phb_resources(void)
162{
163 struct pci_controller *hose, *tmp;
164
165 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
166 unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base;
167 hose->io_resource.start += offset;
168 hose->io_resource.end += offset;
169 printk(KERN_INFO "PCI Host %d, io start: %lx; io end: %lx\n",
170 hose->global_number,
171 hose->io_resource.start, hose->io_resource.end);
172 }
173}
174
175
176void __init pas_pci_init(void) 158void __init pas_pci_init(void)
177{ 159{
178 struct device_node *np, *root; 160 struct device_node *np, *root;
@@ -185,13 +167,11 @@ void __init pas_pci_init(void)
185 } 167 }
186 168
187 for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) 169 for (np = NULL; (np = of_get_next_child(root, np)) != NULL;)
188 if (np->name && !strcmp(np->name, "pxp") && !add_bridge(np)) 170 if (np->name && !strcmp(np->name, "pxp") && !pas_add_bridge(np))
189 of_node_get(np); 171 of_node_get(np);
190 172
191 of_node_put(root); 173 of_node_put(root);
192 174
193 pas_fixup_phb_resources();
194
195 /* Setup the linkage between OF nodes and PHBs */ 175 /* Setup the linkage between OF nodes and PHBs */
196 pci_devs_phb_init(); 176 pci_devs_phb_init();
197 177
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index c5a3f61f8d..ffe6528048 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -239,7 +239,7 @@ static int __init pas_probe(void)
239 return 1; 239 return 1;
240} 240}
241 241
242define_machine(pas) { 242define_machine(pasemi) {
243 .name = "PA Semi PA6T-1682M", 243 .name = "PA Semi PA6T-1682M",
244 .probe = pas_probe, 244 .probe = pas_probe,
245 .setup_arch = pas_setup_arch, 245 .setup_arch = pas_setup_arch,
diff --git a/arch/powerpc/platforms/powermac/Kconfig b/arch/powerpc/platforms/powermac/Kconfig
index 5b7afe5003..055990ca8c 100644
--- a/arch/powerpc/platforms/powermac/Kconfig
+++ b/arch/powerpc/platforms/powermac/Kconfig
@@ -2,6 +2,7 @@ config PPC_PMAC
2 bool "Apple PowerMac based machines" 2 bool "Apple PowerMac based machines"
3 depends on PPC_MULTIPLATFORM 3 depends on PPC_MULTIPLATFORM
4 select MPIC 4 select MPIC
5 select PCI
5 select PPC_INDIRECT_PCI if PPC32 6 select PPC_INDIRECT_PCI if PPC32
6 select PPC_MPC106 if PPC32 7 select PPC_MPC106 if PPC32
7 select PPC_NATIVE 8 select PPC_NATIVE
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
index 3f507ab9c5..efdf5eb81e 100644
--- a/arch/powerpc/platforms/powermac/low_i2c.c
+++ b/arch/powerpc/platforms/powermac/low_i2c.c
@@ -42,6 +42,7 @@
42#include <linux/interrupt.h> 42#include <linux/interrupt.h>
43#include <linux/completion.h> 43#include <linux/completion.h>
44#include <linux/timer.h> 44#include <linux/timer.h>
45#include <linux/mutex.h>
45#include <asm/keylargo.h> 46#include <asm/keylargo.h>
46#include <asm/uninorth.h> 47#include <asm/uninorth.h>
47#include <asm/io.h> 48#include <asm/io.h>
@@ -84,7 +85,7 @@ struct pmac_i2c_bus
84 void *hostdata; 85 void *hostdata;
85 int channel; /* some hosts have multiple */ 86 int channel; /* some hosts have multiple */
86 int mode; /* current mode */ 87 int mode; /* current mode */
87 struct semaphore sem; 88 struct mutex mutex;
88 int opened; 89 int opened;
89 int polled; /* open mode */ 90 int polled; /* open mode */
90 struct platform_device *platform_dev; 91 struct platform_device *platform_dev;
@@ -104,7 +105,7 @@ static LIST_HEAD(pmac_i2c_busses);
104 105
105struct pmac_i2c_host_kw 106struct pmac_i2c_host_kw
106{ 107{
107 struct semaphore mutex; /* Access mutex for use by 108 struct mutex mutex; /* Access mutex for use by
108 * i2c-keywest */ 109 * i2c-keywest */
109 void __iomem *base; /* register base address */ 110 void __iomem *base; /* register base address */
110 int bsteps; /* register stepping */ 111 int bsteps; /* register stepping */
@@ -375,14 +376,14 @@ static void kw_i2c_timeout(unsigned long data)
375static int kw_i2c_open(struct pmac_i2c_bus *bus) 376static int kw_i2c_open(struct pmac_i2c_bus *bus)
376{ 377{
377 struct pmac_i2c_host_kw *host = bus->hostdata; 378 struct pmac_i2c_host_kw *host = bus->hostdata;
378 down(&host->mutex); 379 mutex_lock(&host->mutex);
379 return 0; 380 return 0;
380} 381}
381 382
382static void kw_i2c_close(struct pmac_i2c_bus *bus) 383static void kw_i2c_close(struct pmac_i2c_bus *bus)
383{ 384{
384 struct pmac_i2c_host_kw *host = bus->hostdata; 385 struct pmac_i2c_host_kw *host = bus->hostdata;
385 up(&host->mutex); 386 mutex_unlock(&host->mutex);
386} 387}
387 388
388static int kw_i2c_xfer(struct pmac_i2c_bus *bus, u8 addrdir, int subsize, 389static int kw_i2c_xfer(struct pmac_i2c_bus *bus, u8 addrdir, int subsize,
@@ -498,7 +499,7 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np)
498 kfree(host); 499 kfree(host);
499 return NULL; 500 return NULL;
500 } 501 }
501 init_MUTEX(&host->mutex); 502 mutex_init(&host->mutex);
502 init_completion(&host->complete); 503 init_completion(&host->complete);
503 spin_lock_init(&host->lock); 504 spin_lock_init(&host->lock);
504 init_timer(&host->timeout_timer); 505 init_timer(&host->timeout_timer);
@@ -571,7 +572,7 @@ static void __init kw_i2c_add(struct pmac_i2c_host_kw *host,
571 bus->open = kw_i2c_open; 572 bus->open = kw_i2c_open;
572 bus->close = kw_i2c_close; 573 bus->close = kw_i2c_close;
573 bus->xfer = kw_i2c_xfer; 574 bus->xfer = kw_i2c_xfer;
574 init_MUTEX(&bus->sem); 575 mutex_init(&bus->mutex);
575 if (controller == busnode) 576 if (controller == busnode)
576 bus->flags = pmac_i2c_multibus; 577 bus->flags = pmac_i2c_multibus;
577 list_add(&bus->link, &pmac_i2c_busses); 578 list_add(&bus->link, &pmac_i2c_busses);
@@ -798,7 +799,7 @@ static void __init pmu_i2c_probe(void)
798 bus->mode = pmac_i2c_mode_std; 799 bus->mode = pmac_i2c_mode_std;
799 bus->hostdata = bus + 1; 800 bus->hostdata = bus + 1;
800 bus->xfer = pmu_i2c_xfer; 801 bus->xfer = pmu_i2c_xfer;
801 init_MUTEX(&bus->sem); 802 mutex_init(&bus->mutex);
802 bus->flags = pmac_i2c_multibus; 803 bus->flags = pmac_i2c_multibus;
803 list_add(&bus->link, &pmac_i2c_busses); 804 list_add(&bus->link, &pmac_i2c_busses);
804 805
@@ -921,7 +922,7 @@ static void __init smu_i2c_probe(void)
921 bus->mode = pmac_i2c_mode_std; 922 bus->mode = pmac_i2c_mode_std;
922 bus->hostdata = bus + 1; 923 bus->hostdata = bus + 1;
923 bus->xfer = smu_i2c_xfer; 924 bus->xfer = smu_i2c_xfer;
924 init_MUTEX(&bus->sem); 925 mutex_init(&bus->mutex);
925 bus->flags = 0; 926 bus->flags = 0;
926 list_add(&bus->link, &pmac_i2c_busses); 927 list_add(&bus->link, &pmac_i2c_busses);
927 928
@@ -1093,13 +1094,13 @@ int pmac_i2c_open(struct pmac_i2c_bus *bus, int polled)
1093{ 1094{
1094 int rc; 1095 int rc;
1095 1096
1096 down(&bus->sem); 1097 mutex_lock(&bus->mutex);
1097 bus->polled = polled || pmac_i2c_force_poll; 1098 bus->polled = polled || pmac_i2c_force_poll;
1098 bus->opened = 1; 1099 bus->opened = 1;
1099 bus->mode = pmac_i2c_mode_std; 1100 bus->mode = pmac_i2c_mode_std;
1100 if (bus->open && (rc = bus->open(bus)) != 0) { 1101 if (bus->open && (rc = bus->open(bus)) != 0) {
1101 bus->opened = 0; 1102 bus->opened = 0;
1102 up(&bus->sem); 1103 mutex_unlock(&bus->mutex);
1103 return rc; 1104 return rc;
1104 } 1105 }
1105 return 0; 1106 return 0;
@@ -1112,7 +1113,7 @@ void pmac_i2c_close(struct pmac_i2c_bus *bus)
1112 if (bus->close) 1113 if (bus->close)
1113 bus->close(bus); 1114 bus->close(bus);
1114 bus->opened = 0; 1115 bus->opened = 0;
1115 up(&bus->sem); 1116 mutex_unlock(&bus->mutex);
1116} 1117}
1117EXPORT_SYMBOL_GPL(pmac_i2c_close); 1118EXPORT_SYMBOL_GPL(pmac_i2c_close);
1118 1119
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index c4af9e21ac..92586db197 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -35,8 +35,6 @@
35#define DBG(x...) 35#define DBG(x...)
36#endif 36#endif
37 37
38static int add_bridge(struct device_node *dev);
39
40/* XXX Could be per-controller, but I don't think we risk anything by 38/* XXX Could be per-controller, but I don't think we risk anything by
41 * assuming we won't have both UniNorth and Bandit */ 39 * assuming we won't have both UniNorth and Bandit */
42static int has_uninorth; 40static int has_uninorth;
@@ -897,7 +895,7 @@ static void __init setup_u3_ht(struct pci_controller* hose)
897 * "pci" (a MPC106) and no bandit or chaos bridges, and contrariwise, 895 * "pci" (a MPC106) and no bandit or chaos bridges, and contrariwise,
898 * if we have one or more bandit or chaos bridges, we don't have a MPC106. 896 * if we have one or more bandit or chaos bridges, we don't have a MPC106.
899 */ 897 */
900static int __init add_bridge(struct device_node *dev) 898static int __init pmac_add_bridge(struct device_node *dev)
901{ 899{
902 int len; 900 int len;
903 struct pci_controller *hose; 901 struct pci_controller *hose;
@@ -918,15 +916,9 @@ static int __init add_bridge(struct device_node *dev)
918 " bus 0\n", dev->full_name); 916 " bus 0\n", dev->full_name);
919 } 917 }
920 918
921 /* XXX Different prototypes, to be merged */
922#ifdef CONFIG_PPC64
923 hose = pcibios_alloc_controller(dev); 919 hose = pcibios_alloc_controller(dev);
924#else
925 hose = pcibios_alloc_controller();
926#endif
927 if (!hose) 920 if (!hose)
928 return -ENOMEM; 921 return -ENOMEM;
929 hose->arch_data = dev;
930 hose->first_busno = bus_range ? bus_range[0] : 0; 922 hose->first_busno = bus_range ? bus_range[0] : 0;
931 hose->last_busno = bus_range ? bus_range[1] : 0xff; 923 hose->last_busno = bus_range ? bus_range[1] : 0xff;
932 924
@@ -1006,19 +998,6 @@ void __devinit pmac_pci_irq_fixup(struct pci_dev *dev)
1006#endif /* CONFIG_PPC32 */ 998#endif /* CONFIG_PPC32 */
1007} 999}
1008 1000
1009#ifdef CONFIG_PPC64
1010static void __init pmac_fixup_phb_resources(void)
1011{
1012 struct pci_controller *hose, *tmp;
1013
1014 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
1015 printk(KERN_INFO "PCI Host %d, io start: %lx; io end: %lx\n",
1016 hose->global_number,
1017 hose->io_resource.start, hose->io_resource.end);
1018 }
1019}
1020#endif
1021
1022void __init pmac_pci_init(void) 1001void __init pmac_pci_init(void)
1023{ 1002{
1024 struct device_node *np, *root; 1003 struct device_node *np, *root;
@@ -1036,7 +1015,7 @@ void __init pmac_pci_init(void)
1036 if (strcmp(np->name, "bandit") == 0 1015 if (strcmp(np->name, "bandit") == 0
1037 || strcmp(np->name, "chaos") == 0 1016 || strcmp(np->name, "chaos") == 0
1038 || strcmp(np->name, "pci") == 0) { 1017 || strcmp(np->name, "pci") == 0) {
1039 if (add_bridge(np) == 0) 1018 if (pmac_add_bridge(np) == 0)
1040 of_node_get(np); 1019 of_node_get(np);
1041 } 1020 }
1042 if (strcmp(np->name, "ht") == 0) { 1021 if (strcmp(np->name, "ht") == 0) {
@@ -1050,28 +1029,9 @@ void __init pmac_pci_init(void)
1050 /* Probe HT last as it relies on the agp resources to be already 1029 /* Probe HT last as it relies on the agp resources to be already
1051 * setup 1030 * setup
1052 */ 1031 */
1053 if (ht && add_bridge(ht) != 0) 1032 if (ht && pmac_add_bridge(ht) != 0)
1054 of_node_put(ht); 1033 of_node_put(ht);
1055 1034
1056 /*
1057 * We need to call pci_setup_phb_io for the HT bridge first
1058 * so it gets the I/O port numbers starting at 0, and we
1059 * need to call it for the AGP bridge after that so it gets
1060 * small positive I/O port numbers.
1061 */
1062 if (u3_ht)
1063 pci_setup_phb_io(u3_ht, 1);
1064 if (u3_agp)
1065 pci_setup_phb_io(u3_agp, 0);
1066 if (u4_pcie)
1067 pci_setup_phb_io(u4_pcie, 0);
1068
1069 /*
1070 * On ppc64, fixup the IO resources on our host bridges as
1071 * the common code does it only for children of the host bridges
1072 */
1073 pmac_fixup_phb_resources();
1074
1075 /* Setup the linkage between OF nodes and PHBs */ 1035 /* Setup the linkage between OF nodes and PHBs */
1076 pci_devs_phb_init(); 1036 pci_devs_phb_init();
1077 1037
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig
index 40f0008af4..a05079b076 100644
--- a/arch/powerpc/platforms/ps3/Kconfig
+++ b/arch/powerpc/platforms/ps3/Kconfig
@@ -7,6 +7,7 @@ config PPC_PS3
7 select USB_OHCI_BIG_ENDIAN_MMIO 7 select USB_OHCI_BIG_ENDIAN_MMIO
8 select USB_ARCH_HAS_EHCI 8 select USB_ARCH_HAS_EHCI
9 select USB_EHCI_BIG_ENDIAN_MMIO 9 select USB_EHCI_BIG_ENDIAN_MMIO
10 select MEMORY_HOTPLUG
10 help 11 help
11 This option enables support for the Sony PS3 game console 12 This option enables support for the Sony PS3 game console
12 and other platforms using the PS3 hypervisor. 13 and other platforms using the PS3 hypervisor.
@@ -73,18 +74,12 @@ config PS3_USE_LPAR_ADDR
73 74
74config PS3_VUART 75config PS3_VUART
75 depends on PPC_PS3 76 depends on PPC_PS3
76 bool "PS3 Virtual UART support" if PS3_ADVANCED 77 tristate
77 default y
78 help
79 Include support for the PS3 Virtual UART.
80
81 This support is required for several system services
82 including the System Manager and AV Settings. In
83 general, all users will say Y.
84 78
85config PS3_PS3AV 79config PS3_PS3AV
80 depends on PPC_PS3
86 tristate "PS3 AV settings driver" if PS3_ADVANCED 81 tristate "PS3 AV settings driver" if PS3_ADVANCED
87 depends on PS3_VUART 82 select PS3_VUART
88 default y 83 default y
89 help 84 help
90 Include support for the PS3 AV Settings driver. 85 Include support for the PS3 AV Settings driver.
@@ -93,13 +88,18 @@ config PS3_PS3AV
93 general, all users will say Y or M. 88 general, all users will say Y or M.
94 89
95config PS3_SYS_MANAGER 90config PS3_SYS_MANAGER
96 bool "PS3 System Manager driver" if PS3_ADVANCED 91 depends on PPC_PS3
97 depends on PS3_VUART 92 tristate "PS3 System Manager driver" if PS3_ADVANCED
98 default y 93 select PS3_VUART
94 default m
99 help 95 help
100 Include support for the PS3 System Manager. 96 Include support for the PS3 System Manager.
101 97
102 This support is required for system control. In 98 This support is required for system control. In
103 general, all users will say Y. 99 general, all users will say Y or M.
100
101config PS3_STORAGE
102 depends on PPC_PS3
103 tristate
104 104
105endmenu 105endmenu
diff --git a/arch/powerpc/platforms/ps3/Makefile b/arch/powerpc/platforms/ps3/Makefile
index a0048fcf08..ac1bdf844e 100644
--- a/arch/powerpc/platforms/ps3/Makefile
+++ b/arch/powerpc/platforms/ps3/Makefile
@@ -4,3 +4,4 @@ obj-y += system-bus.o
4 4
5obj-$(CONFIG_SMP) += smp.o 5obj-$(CONFIG_SMP) += smp.o
6obj-$(CONFIG_SPU_BASE) += spu.o 6obj-$(CONFIG_SPU_BASE) += spu.o
7obj-y += device-init.o
diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c
new file mode 100644
index 0000000000..825ebb2cbc
--- /dev/null
+++ b/arch/powerpc/platforms/ps3/device-init.c
@@ -0,0 +1,785 @@
1/*
2 * PS3 device registration routines.
3 *
4 * Copyright (C) 2007 Sony Computer Entertainment Inc.
5 * Copyright 2007 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/delay.h>
22#include <linux/freezer.h>
23#include <linux/kernel.h>
24#include <linux/kthread.h>
25#include <linux/init.h>
26
27#include <asm/firmware.h>
28#include <asm/lv1call.h>
29#include <asm/ps3stor.h>
30
31#include "platform.h"
32
33/**
34 * ps3_setup_gelic_device - Setup and register a gelic device instance.
35 *
36 * Allocates memory for a struct ps3_system_bus_device instance, initialises the
37 * structure members, and registers the device instance with the system bus.
38 */
39
40static int __init ps3_setup_gelic_device(
41 const struct ps3_repository_device *repo)
42{
43 int result;
44 struct layout {
45 struct ps3_system_bus_device dev;
46 struct ps3_dma_region d_region;
47 } *p;
48
49 pr_debug(" -> %s:%d\n", __func__, __LINE__);
50
51 BUG_ON(repo->bus_type != PS3_BUS_TYPE_SB);
52 BUG_ON(repo->dev_type != PS3_DEV_TYPE_SB_GELIC);
53
54 p = kzalloc(sizeof(struct layout), GFP_KERNEL);
55
56 if (!p) {
57 result = -ENOMEM;
58 goto fail_malloc;
59 }
60
61 p->dev.match_id = PS3_MATCH_ID_GELIC;
62 p->dev.dev_type = PS3_DEVICE_TYPE_SB;
63 p->dev.bus_id = repo->bus_id;
64 p->dev.dev_id = repo->dev_id;
65 p->dev.d_region = &p->d_region;
66
67 result = ps3_repository_find_interrupt(repo,
68 PS3_INTERRUPT_TYPE_EVENT_PORT, &p->dev.interrupt_id);
69
70 if (result) {
71 pr_debug("%s:%d ps3_repository_find_interrupt failed\n",
72 __func__, __LINE__);
73 goto fail_find_interrupt;
74 }
75
76 BUG_ON(p->dev.interrupt_id != 0);
77
78 result = ps3_dma_region_init(&p->dev, p->dev.d_region, PS3_DMA_64K,
79 PS3_DMA_OTHER, NULL, 0);
80
81 if (result) {
82 pr_debug("%s:%d ps3_dma_region_init failed\n",
83 __func__, __LINE__);
84 goto fail_dma_init;
85 }
86
87 result = ps3_system_bus_device_register(&p->dev);
88
89 if (result) {
90 pr_debug("%s:%d ps3_system_bus_device_register failed\n",
91 __func__, __LINE__);
92 goto fail_device_register;
93 }
94
95 pr_debug(" <- %s:%d\n", __func__, __LINE__);
96 return result;
97
98fail_device_register:
99fail_dma_init:
100fail_find_interrupt:
101 kfree(p);
102fail_malloc:
103 pr_debug(" <- %s:%d: fail.\n", __func__, __LINE__);
104 return result;
105}
106
107static int __init_refok ps3_setup_uhc_device(
108 const struct ps3_repository_device *repo, enum ps3_match_id match_id,
109 enum ps3_interrupt_type interrupt_type, enum ps3_reg_type reg_type)
110{
111 int result;
112 struct layout {
113 struct ps3_system_bus_device dev;
114 struct ps3_dma_region d_region;
115 struct ps3_mmio_region m_region;
116 } *p;
117 u64 bus_addr;
118 u64 len;
119
120 pr_debug(" -> %s:%d\n", __func__, __LINE__);
121
122 BUG_ON(repo->bus_type != PS3_BUS_TYPE_SB);
123 BUG_ON(repo->dev_type != PS3_DEV_TYPE_SB_USB);
124
125 p = kzalloc(sizeof(struct layout), GFP_KERNEL);
126
127 if (!p) {
128 result = -ENOMEM;
129 goto fail_malloc;
130 }
131
132 p->dev.match_id = match_id;
133 p->dev.dev_type = PS3_DEVICE_TYPE_SB;
134 p->dev.bus_id = repo->bus_id;
135 p->dev.dev_id = repo->dev_id;
136 p->dev.d_region = &p->d_region;
137 p->dev.m_region = &p->m_region;
138
139 result = ps3_repository_find_interrupt(repo,
140 interrupt_type, &p->dev.interrupt_id);
141
142 if (result) {
143 pr_debug("%s:%d ps3_repository_find_interrupt failed\n",
144 __func__, __LINE__);
145 goto fail_find_interrupt;
146 }
147
148 result = ps3_repository_find_reg(repo, reg_type,
149 &bus_addr, &len);
150
151 if (result) {
152 pr_debug("%s:%d ps3_repository_find_reg failed\n",
153 __func__, __LINE__);
154 goto fail_find_reg;
155 }
156
157 result = ps3_dma_region_init(&p->dev, p->dev.d_region, PS3_DMA_64K,
158 PS3_DMA_INTERNAL, NULL, 0);
159
160 if (result) {
161 pr_debug("%s:%d ps3_dma_region_init failed\n",
162 __func__, __LINE__);
163 goto fail_dma_init;
164 }
165
166 result = ps3_mmio_region_init(&p->dev, p->dev.m_region, bus_addr, len,
167 PS3_MMIO_4K);
168
169 if (result) {
170 pr_debug("%s:%d ps3_mmio_region_init failed\n",
171 __func__, __LINE__);
172 goto fail_mmio_init;
173 }
174
175 result = ps3_system_bus_device_register(&p->dev);
176
177 if (result) {
178 pr_debug("%s:%d ps3_system_bus_device_register failed\n",
179 __func__, __LINE__);
180 goto fail_device_register;
181 }
182
183 pr_debug(" <- %s:%d\n", __func__, __LINE__);
184 return result;
185
186fail_device_register:
187fail_mmio_init:
188fail_dma_init:
189fail_find_reg:
190fail_find_interrupt:
191 kfree(p);
192fail_malloc:
193 pr_debug(" <- %s:%d: fail.\n", __func__, __LINE__);
194 return result;
195}
196
197static int __init ps3_setup_ehci_device(
198 const struct ps3_repository_device *repo)
199{
200 return ps3_setup_uhc_device(repo, PS3_MATCH_ID_EHCI,
201 PS3_INTERRUPT_TYPE_SB_EHCI, PS3_REG_TYPE_SB_EHCI);
202}
203
204static int __init ps3_setup_ohci_device(
205 const struct ps3_repository_device *repo)
206{
207 return ps3_setup_uhc_device(repo, PS3_MATCH_ID_OHCI,
208 PS3_INTERRUPT_TYPE_SB_OHCI, PS3_REG_TYPE_SB_OHCI);
209}
210
211static int __init ps3_setup_vuart_device(enum ps3_match_id match_id,
212 unsigned int port_number)
213{
214 int result;
215 struct layout {
216 struct ps3_system_bus_device dev;
217 } *p;
218
219 pr_debug(" -> %s:%d: match_id %u, port %u\n", __func__, __LINE__,
220 match_id, port_number);
221
222 p = kzalloc(sizeof(struct layout), GFP_KERNEL);
223
224 if (!p)
225 return -ENOMEM;
226
227 p->dev.match_id = match_id;
228 p->dev.dev_type = PS3_DEVICE_TYPE_VUART;
229 p->dev.port_number = port_number;
230
231 result = ps3_system_bus_device_register(&p->dev);
232
233 if (result)
234 pr_debug("%s:%d ps3_system_bus_device_register failed\n",
235 __func__, __LINE__);
236
237 pr_debug(" <- %s:%d\n", __func__, __LINE__);
238 return result;
239}
240
241static int ps3stor_wait_for_completion(u64 dev_id, u64 tag,
242 unsigned int timeout)
243{
244 int result = -1;
245 unsigned int retries = 0;
246 u64 status;
247
248 for (retries = 0; retries < timeout; retries++) {
249 result = lv1_storage_check_async_status(dev_id, tag, &status);
250 if (!result)
251 break;
252
253 msleep(1);
254 }
255
256 if (result)
257 pr_debug("%s:%u: check_async_status: %s, status %lx\n",
258 __func__, __LINE__, ps3_result(result), status);
259
260 return result;
261}
262
263/**
264 * ps3_storage_wait_for_device - Wait for a storage device to become ready.
265 * @repo: The repository device to wait for.
266 *
267 * Uses the hypervisor's storage device notification mechanism to wait until
268 * a storage device is ready. The device notification mechanism uses a
269 * psuedo device (id = -1) to asynchronously notify the guest when storage
270 * devices become ready. The notification device has a block size of 512
271 * bytes.
272 */
273
274static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo)
275{
276 int result;
277 const u64 notification_dev_id = (u64)-1LL;
278 const unsigned int timeout = HZ;
279 u64 lpar;
280 u64 tag;
281 struct {
282 u64 operation_code; /* must be zero */
283 u64 event_mask; /* 1 = device ready */
284 } *notify_cmd;
285 struct {
286 u64 event_type; /* notify_device_ready */
287 u64 bus_id;
288 u64 dev_id;
289 u64 dev_type;
290 u64 dev_port;
291 } *notify_event;
292 enum {
293 notify_device_ready = 1
294 };
295
296 pr_debug(" -> %s:%u: bus_id %u, dev_id %u, dev_type %u\n", __func__,
297 __LINE__, repo->bus_id, repo->dev_id, repo->dev_type);
298
299 notify_cmd = kzalloc(512, GFP_KERNEL);
300 notify_event = (void *)notify_cmd;
301 if (!notify_cmd)
302 return -ENOMEM;
303
304 lpar = ps3_mm_phys_to_lpar(__pa(notify_cmd));
305
306 result = lv1_open_device(repo->bus_id, notification_dev_id, 0);
307 if (result) {
308 printk(KERN_ERR "%s:%u: lv1_open_device %s\n", __func__,
309 __LINE__, ps3_result(result));
310 result = -ENODEV;
311 goto fail_free;
312 }
313
314 /* Setup and write the request for device notification. */
315
316 notify_cmd->operation_code = 0; /* must be zero */
317 notify_cmd->event_mask = 0x01; /* device ready */
318
319 result = lv1_storage_write(notification_dev_id, 0, 0, 1, 0, lpar,
320 &tag);
321 if (result) {
322 printk(KERN_ERR "%s:%u: write failed %s\n", __func__, __LINE__,
323 ps3_result(result));
324 result = -ENODEV;
325 goto fail_close;
326 }
327
328 /* Wait for the write completion */
329
330 result = ps3stor_wait_for_completion(notification_dev_id, tag,
331 timeout);
332 if (result) {
333 printk(KERN_ERR "%s:%u: write not completed %s\n", __func__,
334 __LINE__, ps3_result(result));
335 result = -ENODEV;
336 goto fail_close;
337 }
338
339 /* Loop here processing the requested notification events. */
340
341 result = -ENODEV;
342 while (1) {
343 memset(notify_event, 0, sizeof(*notify_event));
344
345 result = lv1_storage_read(notification_dev_id, 0, 0, 1, 0,
346 lpar, &tag);
347 if (result) {
348 printk(KERN_ERR "%s:%u: write failed %s\n", __func__,
349 __LINE__, ps3_result(result));
350 break;
351 }
352
353 result = ps3stor_wait_for_completion(notification_dev_id, tag,
354 timeout);
355 if (result) {
356 printk(KERN_ERR "%s:%u: read not completed %s\n",
357 __func__, __LINE__, ps3_result(result));
358 break;
359 }
360
361 if (notify_event->event_type != notify_device_ready ||
362 notify_event->bus_id != repo->bus_id) {
363 pr_debug("%s:%u: bad notify_event: event %lu, "
364 "dev_id %lu, dev_type %lu\n",
365 __func__, __LINE__, notify_event->event_type,
366 notify_event->dev_id, notify_event->dev_type);
367 break;
368 }
369
370 if (notify_event->dev_id == repo->dev_id &&
371 notify_event->dev_type == repo->dev_type) {
372 pr_debug("%s:%u: device ready: dev_id %u\n", __func__,
373 __LINE__, repo->dev_id);
374 result = 0;
375 break;
376 }
377
378 if (notify_event->dev_id == repo->dev_id &&
379 notify_event->dev_type == PS3_DEV_TYPE_NOACCESS) {
380 pr_debug("%s:%u: no access: dev_id %u\n", __func__,
381 __LINE__, repo->dev_id);
382 break;
383 }
384 }
385
386fail_close:
387 lv1_close_device(repo->bus_id, notification_dev_id);
388fail_free:
389 kfree(notify_cmd);
390 pr_debug(" <- %s:%u\n", __func__, __LINE__);
391 return result;
392}
393
394static int ps3_setup_storage_dev(const struct ps3_repository_device *repo,
395 enum ps3_match_id match_id)
396{
397 int result;
398 struct ps3_storage_device *p;
399 u64 port, blk_size, num_blocks;
400 unsigned int num_regions, i;
401
402 pr_debug(" -> %s:%u: match_id %u\n", __func__, __LINE__, match_id);
403
404 result = ps3_repository_read_stor_dev_info(repo->bus_index,
405 repo->dev_index, &port,
406 &blk_size, &num_blocks,
407 &num_regions);
408 if (result) {
409 printk(KERN_ERR "%s:%u: _read_stor_dev_info failed %d\n",
410 __func__, __LINE__, result);
411 return -ENODEV;
412 }
413
414 pr_debug("%s:%u: index %u:%u: port %lu blk_size %lu num_blocks %lu "
415 "num_regions %u\n", __func__, __LINE__, repo->bus_index,
416 repo->dev_index, port, blk_size, num_blocks, num_regions);
417
418 p = kzalloc(sizeof(struct ps3_storage_device) +
419 num_regions * sizeof(struct ps3_storage_region),
420 GFP_KERNEL);
421 if (!p) {
422 result = -ENOMEM;
423 goto fail_malloc;
424 }
425
426 p->sbd.match_id = match_id;
427 p->sbd.dev_type = PS3_DEVICE_TYPE_SB;
428 p->sbd.bus_id = repo->bus_id;
429 p->sbd.dev_id = repo->dev_id;
430 p->sbd.d_region = &p->dma_region;
431 p->blk_size = blk_size;
432 p->num_regions = num_regions;
433
434 result = ps3_repository_find_interrupt(repo,
435 PS3_INTERRUPT_TYPE_EVENT_PORT,
436 &p->sbd.interrupt_id);
437 if (result) {
438 printk(KERN_ERR "%s:%u: find_interrupt failed %d\n", __func__,
439 __LINE__, result);
440 result = -ENODEV;
441 goto fail_find_interrupt;
442 }
443
444 /* FIXME: Arrange to only do this on a 'cold' boot */
445
446 result = ps3_storage_wait_for_device(repo);
447 if (result) {
448 printk(KERN_ERR "%s:%u: storage_notification failed %d\n",
449 __func__, __LINE__, result);
450 result = -ENODEV;
451 goto fail_probe_notification;
452 }
453
454 for (i = 0; i < num_regions; i++) {
455 unsigned int id;
456 u64 start, size;
457
458 result = ps3_repository_read_stor_dev_region(repo->bus_index,
459 repo->dev_index,
460 i, &id, &start,
461 &size);
462 if (result) {
463 printk(KERN_ERR
464 "%s:%u: read_stor_dev_region failed %d\n",
465 __func__, __LINE__, result);
466 result = -ENODEV;
467 goto fail_read_region;
468 }
469 pr_debug("%s:%u: region %u: id %u start %lu size %lu\n",
470 __func__, __LINE__, i, id, start, size);
471
472 p->regions[i].id = id;
473 p->regions[i].start = start;
474 p->regions[i].size = size;
475 }
476
477 result = ps3_system_bus_device_register(&p->sbd);
478 if (result) {
479 pr_debug("%s:%u ps3_system_bus_device_register failed\n",
480 __func__, __LINE__);
481 goto fail_device_register;
482 }
483
484 pr_debug(" <- %s:%u\n", __func__, __LINE__);
485 return 0;
486
487fail_device_register:
488fail_read_region:
489fail_probe_notification:
490fail_find_interrupt:
491 kfree(p);
492fail_malloc:
493 pr_debug(" <- %s:%u: fail.\n", __func__, __LINE__);
494 return result;
495}
496
497static int __init ps3_register_vuart_devices(void)
498{
499 int result;
500 unsigned int port_number;
501
502 pr_debug(" -> %s:%d\n", __func__, __LINE__);
503
504 result = ps3_repository_read_vuart_av_port(&port_number);
505 if (result)
506 port_number = 0; /* av default */
507
508 result = ps3_setup_vuart_device(PS3_MATCH_ID_AV_SETTINGS, port_number);
509 WARN_ON(result);
510
511 result = ps3_repository_read_vuart_sysmgr_port(&port_number);
512 if (result)
513 port_number = 2; /* sysmgr default */
514
515 result = ps3_setup_vuart_device(PS3_MATCH_ID_SYSTEM_MANAGER,
516 port_number);
517 WARN_ON(result);
518
519 pr_debug(" <- %s:%d\n", __func__, __LINE__);
520 return result;
521}
522
523static int __init ps3_register_sound_devices(void)
524{
525 int result;
526 struct layout {
527 struct ps3_system_bus_device dev;
528 struct ps3_dma_region d_region;
529 struct ps3_mmio_region m_region;
530 } *p;
531
532 pr_debug(" -> %s:%d\n", __func__, __LINE__);
533
534 p = kzalloc(sizeof(*p), GFP_KERNEL);
535 if (!p)
536 return -ENOMEM;
537
538 p->dev.match_id = PS3_MATCH_ID_SOUND;
539 p->dev.dev_type = PS3_DEVICE_TYPE_IOC0;
540 p->dev.d_region = &p->d_region;
541 p->dev.m_region = &p->m_region;
542
543 result = ps3_system_bus_device_register(&p->dev);
544
545 if (result)
546 pr_debug("%s:%d ps3_system_bus_device_register failed\n",
547 __func__, __LINE__);
548
549 pr_debug(" <- %s:%d\n", __func__, __LINE__);
550 return result;
551}
552
553static int __init ps3_register_graphics_devices(void)
554{
555 int result;
556 struct layout {
557 struct ps3_system_bus_device dev;
558 } *p;
559
560 pr_debug(" -> %s:%d\n", __func__, __LINE__);
561
562 p = kzalloc(sizeof(struct layout), GFP_KERNEL);
563
564 if (!p)
565 return -ENOMEM;
566
567 p->dev.match_id = PS3_MATCH_ID_GRAPHICS;
568 p->dev.dev_type = PS3_DEVICE_TYPE_IOC0;
569
570 result = ps3_system_bus_device_register(&p->dev);
571
572 if (result)
573 pr_debug("%s:%d ps3_system_bus_device_register failed\n",
574 __func__, __LINE__);
575
576 pr_debug(" <- %s:%d\n", __func__, __LINE__);
577 return result;
578}
579
580/**
581 * ps3_register_repository_device - Register a device from the repositiory info.
582 *
583 */
584
585static int ps3_register_repository_device(
586 const struct ps3_repository_device *repo)
587{
588 int result;
589
590 switch (repo->dev_type) {
591 case PS3_DEV_TYPE_SB_GELIC:
592 result = ps3_setup_gelic_device(repo);
593 if (result) {
594 pr_debug("%s:%d ps3_setup_gelic_device failed\n",
595 __func__, __LINE__);
596 }
597 break;
598 case PS3_DEV_TYPE_SB_USB:
599
600 /* Each USB device has both an EHCI and an OHCI HC */
601
602 result = ps3_setup_ehci_device(repo);
603
604 if (result) {
605 pr_debug("%s:%d ps3_setup_ehci_device failed\n",
606 __func__, __LINE__);
607 }
608
609 result = ps3_setup_ohci_device(repo);
610
611 if (result) {
612 pr_debug("%s:%d ps3_setup_ohci_device failed\n",
613 __func__, __LINE__);
614 }
615 break;
616 case PS3_DEV_TYPE_STOR_DISK:
617 result = ps3_setup_storage_dev(repo, PS3_MATCH_ID_STOR_DISK);
618
619 /* Some devices are not accessable from the Other OS lpar. */
620 if (result == -ENODEV) {
621 result = 0;
622 pr_debug("%s:%u: not accessable\n", __func__,
623 __LINE__);
624 }
625
626 if (result)
627 pr_debug("%s:%u ps3_setup_storage_dev failed\n",
628 __func__, __LINE__);
629 break;
630
631 case PS3_DEV_TYPE_STOR_ROM:
632 result = ps3_setup_storage_dev(repo, PS3_MATCH_ID_STOR_ROM);
633 if (result)
634 pr_debug("%s:%u ps3_setup_storage_dev failed\n",
635 __func__, __LINE__);
636 break;
637
638 case PS3_DEV_TYPE_STOR_FLASH:
639 result = ps3_setup_storage_dev(repo, PS3_MATCH_ID_STOR_FLASH);
640 if (result)
641 pr_debug("%s:%u ps3_setup_storage_dev failed\n",
642 __func__, __LINE__);
643 break;
644
645 default:
646 result = 0;
647 pr_debug("%s:%u: unsupported dev_type %u\n", __func__, __LINE__,
648 repo->dev_type);
649 }
650
651 return result;
652}
653
654/**
655 * ps3_probe_thread - Background repository probing at system startup.
656 *
657 * This implementation only supports background probing on a single bus.
658 */
659
660static int ps3_probe_thread(void *data)
661{
662 struct ps3_repository_device *repo = data;
663 int result;
664 unsigned int ms = 250;
665
666 pr_debug(" -> %s:%u: kthread started\n", __func__, __LINE__);
667
668 do {
669 try_to_freeze();
670
671 pr_debug("%s:%u: probing...\n", __func__, __LINE__);
672
673 do {
674 result = ps3_repository_find_device(repo);
675
676 if (result == -ENODEV)
677 pr_debug("%s:%u: nothing new\n", __func__,
678 __LINE__);
679 else if (result)
680 pr_debug("%s:%u: find device error.\n",
681 __func__, __LINE__);
682 else {
683 pr_debug("%s:%u: found device\n", __func__,
684 __LINE__);
685 ps3_register_repository_device(repo);
686 ps3_repository_bump_device(repo);
687 ms = 250;
688 }
689 } while (!result);
690
691 pr_debug("%s:%u: ms %u\n", __func__, __LINE__, ms);
692
693 if ( ms > 60000)
694 break;
695
696 msleep_interruptible(ms);
697
698 /* An exponential backoff. */
699 ms <<= 1;
700
701 } while (!kthread_should_stop());
702
703 pr_debug(" <- %s:%u: kthread finished\n", __func__, __LINE__);
704
705 return 0;
706}
707
708/**
709 * ps3_start_probe_thread - Starts the background probe thread.
710 *
711 */
712
713static int __init ps3_start_probe_thread(enum ps3_bus_type bus_type)
714{
715 int result;
716 struct task_struct *task;
717 static struct ps3_repository_device repo; /* must be static */
718
719 pr_debug(" -> %s:%d\n", __func__, __LINE__);
720
721 memset(&repo, 0, sizeof(repo));
722
723 repo.bus_type = bus_type;
724
725 result = ps3_repository_find_bus(repo.bus_type, 0, &repo.bus_index);
726
727 if (result) {
728 printk(KERN_ERR "%s: Cannot find bus (%d)\n", __func__, result);
729 return -ENODEV;
730 }
731
732 result = ps3_repository_read_bus_id(repo.bus_index, &repo.bus_id);
733
734 if (result) {
735 printk(KERN_ERR "%s: read_bus_id failed %d\n", __func__,
736 result);
737 return -ENODEV;
738 }
739
740 task = kthread_run(ps3_probe_thread, &repo, "ps3-probe-%u", bus_type);
741
742 if (IS_ERR(task)) {
743 result = PTR_ERR(task);
744 printk(KERN_ERR "%s: kthread_run failed %d\n", __func__,
745 result);
746 return result;
747 }
748
749 pr_debug(" <- %s:%d\n", __func__, __LINE__);
750 return 0;
751}
752
753/**
754 * ps3_register_devices - Probe the system and register devices found.
755 *
756 * A device_initcall() routine.
757 */
758
759static int __init ps3_register_devices(void)
760{
761 int result;
762
763 if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
764 return -ENODEV;
765
766 pr_debug(" -> %s:%d\n", __func__, __LINE__);
767
768 /* ps3_repository_dump_bus_info(); */
769
770 result = ps3_start_probe_thread(PS3_BUS_TYPE_STORAGE);
771
772 ps3_register_vuart_devices();
773
774 ps3_register_graphics_devices();
775
776 ps3_repository_find_devices(PS3_BUS_TYPE_SB,
777 ps3_register_repository_device);
778
779 ps3_register_sound_devices();
780
781 pr_debug(" <- %s:%d\n", __func__, __LINE__);
782 return 0;
783}
784
785device_initcall(ps3_register_devices);
diff --git a/arch/powerpc/platforms/ps3/htab.c b/arch/powerpc/platforms/ps3/htab.c
index a1409e450c..5d2e176a1b 100644
--- a/arch/powerpc/platforms/ps3/htab.c
+++ b/arch/powerpc/platforms/ps3/htab.c
@@ -29,12 +29,12 @@
29#include "platform.h" 29#include "platform.h"
30 30
31#if defined(DEBUG) 31#if defined(DEBUG)
32#define DBG(fmt...) udbg_printf(fmt) 32#define DBG udbg_printf
33#else 33#else
34#define DBG(fmt...) do{if(0)printk(fmt);}while(0) 34#define DBG pr_debug
35#endif 35#endif
36 36
37static hpte_t *htab; 37static struct hash_pte *htab;
38static unsigned long htab_addr; 38static unsigned long htab_addr;
39static unsigned char *bolttab; 39static unsigned char *bolttab;
40static unsigned char *inusetab; 40static unsigned char *inusetab;
@@ -44,8 +44,8 @@ static DEFINE_SPINLOCK(ps3_bolttab_lock);
44#define debug_dump_hpte(_a, _b, _c, _d, _e, _f, _g) \ 44#define debug_dump_hpte(_a, _b, _c, _d, _e, _f, _g) \
45 _debug_dump_hpte(_a, _b, _c, _d, _e, _f, _g, __func__, __LINE__) 45 _debug_dump_hpte(_a, _b, _c, _d, _e, _f, _g, __func__, __LINE__)
46static void _debug_dump_hpte(unsigned long pa, unsigned long va, 46static void _debug_dump_hpte(unsigned long pa, unsigned long va,
47 unsigned long group, unsigned long bitmap, hpte_t lhpte, int psize, 47 unsigned long group, unsigned long bitmap, struct hash_pte lhpte,
48 unsigned long slot, const char* func, int line) 48 int psize, unsigned long slot, const char* func, int line)
49{ 49{
50 DBG("%s:%d: pa = %lxh\n", func, line, pa); 50 DBG("%s:%d: pa = %lxh\n", func, line, pa);
51 DBG("%s:%d: lpar = %lxh\n", func, line, 51 DBG("%s:%d: lpar = %lxh\n", func, line,
@@ -63,7 +63,7 @@ static long ps3_hpte_insert(unsigned long hpte_group, unsigned long va,
63 unsigned long pa, unsigned long rflags, unsigned long vflags, int psize) 63 unsigned long pa, unsigned long rflags, unsigned long vflags, int psize)
64{ 64{
65 unsigned long slot; 65 unsigned long slot;
66 hpte_t lhpte; 66 struct hash_pte lhpte;
67 int secondary = 0; 67 int secondary = 0;
68 unsigned long result; 68 unsigned long result;
69 unsigned long bitmap; 69 unsigned long bitmap;
@@ -234,10 +234,17 @@ 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 */ 237 int result;
238 ps3fb_cleanup();
239 238
240 lv1_unmap_htab(htab_addr); 239 DBG(" -> %s:%d\n", __func__, __LINE__);
240
241 result = lv1_unmap_htab(htab_addr);
242 BUG_ON(result);
243
244 ps3_mm_shutdown();
245 ps3_mm_vas_destroy();
246
247 DBG(" <- %s:%d\n", __func__, __LINE__);
241} 248}
242 249
243void __init ps3_hpte_init(unsigned long htab_size) 250void __init ps3_hpte_init(unsigned long htab_size)
@@ -255,7 +262,7 @@ void __init ps3_hpte_init(unsigned long htab_size)
255 262
256 ppc64_pft_size = __ilog2(htab_size); 263 ppc64_pft_size = __ilog2(htab_size);
257 264
258 bitmap_size = htab_size / sizeof(hpte_t) / 8; 265 bitmap_size = htab_size / sizeof(struct hash_pte) / 8;
259 266
260 bolttab = __va(lmb_alloc(bitmap_size, 1)); 267 bolttab = __va(lmb_alloc(bitmap_size, 1));
261 inusetab = __va(lmb_alloc(bitmap_size, 1)); 268 inusetab = __va(lmb_alloc(bitmap_size, 1));
@@ -273,8 +280,8 @@ void __init ps3_map_htab(void)
273 280
274 result = lv1_map_htab(0, &htab_addr); 281 result = lv1_map_htab(0, &htab_addr);
275 282
276 htab = (hpte_t *)__ioremap(htab_addr, htab_size, 283 htab = (__force struct hash_pte *)ioremap_flags(htab_addr, htab_size,
277 pgprot_val(PAGE_READONLY_X)); 284 pgprot_val(PAGE_READONLY_X));
278 285
279 DBG("%s:%d: lpar %016lxh, virt %016lxh\n", __func__, __LINE__, 286 DBG("%s:%d: lpar %016lxh, virt %016lxh\n", __func__, __LINE__,
280 htab_addr, (unsigned long)htab); 287 htab_addr, (unsigned long)htab);
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c
index ec9030dbb5..67e32ec9b3 100644
--- a/arch/powerpc/platforms/ps3/interrupt.c
+++ b/arch/powerpc/platforms/ps3/interrupt.c
@@ -30,9 +30,9 @@
30#include "platform.h" 30#include "platform.h"
31 31
32#if defined(DEBUG) 32#if defined(DEBUG)
33#define DBG(fmt...) udbg_printf(fmt) 33#define DBG udbg_printf
34#else 34#else
35#define DBG(fmt...) do{if(0)printk(fmt);}while(0) 35#define DBG pr_debug
36#endif 36#endif
37 37
38/** 38/**
@@ -78,19 +78,85 @@ struct ps3_bmp {
78/** 78/**
79 * struct ps3_private - a per cpu data structure 79 * struct ps3_private - a per cpu data structure
80 * @bmp: ps3_bmp structure 80 * @bmp: ps3_bmp structure
81 * @node: HV logical_ppe_id 81 * @ppe_id: HV logical_ppe_id
82 * @cpu: HV thread_id 82 * @thread_id: HV thread_id
83 */ 83 */
84 84
85struct ps3_private { 85struct ps3_private {
86 struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN))); 86 struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN)));
87 u64 node; 87 u64 ppe_id;
88 unsigned int cpu; 88 u64 thread_id;
89}; 89};
90 90
91static DEFINE_PER_CPU(struct ps3_private, ps3_private); 91static DEFINE_PER_CPU(struct ps3_private, ps3_private);
92 92
93/** 93/**
94 * ps3_chip_mask - Set an interrupt mask bit in ps3_bmp.
95 * @virq: The assigned Linux virq.
96 *
97 * Sets ps3_bmp.mask and calls lv1_did_update_interrupt_mask().
98 */
99
100static void ps3_chip_mask(unsigned int virq)
101{
102 struct ps3_private *pd = get_irq_chip_data(virq);
103 unsigned long flags;
104
105 pr_debug("%s:%d: thread_id %lu, virq %d\n", __func__, __LINE__,
106 pd->thread_id, virq);
107
108 local_irq_save(flags);
109 clear_bit(63 - virq, &pd->bmp.mask);
110 lv1_did_update_interrupt_mask(pd->ppe_id, pd->thread_id);
111 local_irq_restore(flags);
112}
113
114/**
115 * ps3_chip_unmask - Clear an interrupt mask bit in ps3_bmp.
116 * @virq: The assigned Linux virq.
117 *
118 * Clears ps3_bmp.mask and calls lv1_did_update_interrupt_mask().
119 */
120
121static void ps3_chip_unmask(unsigned int virq)
122{
123 struct ps3_private *pd = get_irq_chip_data(virq);
124 unsigned long flags;
125
126 pr_debug("%s:%d: thread_id %lu, virq %d\n", __func__, __LINE__,
127 pd->thread_id, virq);
128
129 local_irq_save(flags);
130 set_bit(63 - virq, &pd->bmp.mask);
131 lv1_did_update_interrupt_mask(pd->ppe_id, pd->thread_id);
132 local_irq_restore(flags);
133}
134
135/**
136 * ps3_chip_eoi - HV end-of-interrupt.
137 * @virq: The assigned Linux virq.
138 *
139 * Calls lv1_end_of_interrupt_ext().
140 */
141
142static void ps3_chip_eoi(unsigned int virq)
143{
144 const struct ps3_private *pd = get_irq_chip_data(virq);
145 lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, virq);
146}
147
148/**
149 * ps3_irq_chip - Represents the ps3_bmp as a Linux struct irq_chip.
150 */
151
152static struct irq_chip ps3_irq_chip = {
153 .typename = "ps3",
154 .mask = ps3_chip_mask,
155 .unmask = ps3_chip_unmask,
156 .eoi = ps3_chip_eoi,
157};
158
159/**
94 * ps3_virq_setup - virq related setup. 160 * ps3_virq_setup - virq related setup.
95 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be 161 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be
96 * serviced on. 162 * serviced on.
@@ -134,6 +200,8 @@ int ps3_virq_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
134 goto fail_set; 200 goto fail_set;
135 } 201 }
136 202
203 ps3_chip_mask(*virq);
204
137 return result; 205 return result;
138 206
139fail_set: 207fail_set:
@@ -153,8 +221,8 @@ int ps3_virq_destroy(unsigned int virq)
153{ 221{
154 const struct ps3_private *pd = get_irq_chip_data(virq); 222 const struct ps3_private *pd = get_irq_chip_data(virq);
155 223
156 pr_debug("%s:%d: node %lu, cpu %d, virq %u\n", __func__, __LINE__, 224 pr_debug("%s:%d: ppe_id %lu, thread_id %lu, virq %u\n", __func__,
157 pd->node, pd->cpu, virq); 225 __LINE__, pd->ppe_id, pd->thread_id, virq);
158 226
159 set_irq_chip_data(virq, NULL); 227 set_irq_chip_data(virq, NULL);
160 irq_dispose_mapping(virq); 228 irq_dispose_mapping(virq);
@@ -190,7 +258,8 @@ int ps3_irq_plug_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
190 258
191 /* Binds outlet to cpu + virq. */ 259 /* Binds outlet to cpu + virq. */
192 260
193 result = lv1_connect_irq_plug_ext(pd->node, pd->cpu, *virq, outlet, 0); 261 result = lv1_connect_irq_plug_ext(pd->ppe_id, pd->thread_id, *virq,
262 outlet, 0);
194 263
195 if (result) { 264 if (result) {
196 pr_info("%s:%d: lv1_connect_irq_plug_ext failed: %s\n", 265 pr_info("%s:%d: lv1_connect_irq_plug_ext failed: %s\n",
@@ -222,10 +291,12 @@ int ps3_irq_plug_destroy(unsigned int virq)
222 int result; 291 int result;
223 const struct ps3_private *pd = get_irq_chip_data(virq); 292 const struct ps3_private *pd = get_irq_chip_data(virq);
224 293
225 pr_debug("%s:%d: node %lu, cpu %d, virq %u\n", __func__, __LINE__, 294 pr_debug("%s:%d: ppe_id %lu, thread_id %lu, virq %u\n", __func__,
226 pd->node, pd->cpu, virq); 295 __LINE__, pd->ppe_id, pd->thread_id, virq);
296
297 ps3_chip_mask(virq);
227 298
228 result = lv1_disconnect_irq_plug_ext(pd->node, pd->cpu, virq); 299 result = lv1_disconnect_irq_plug_ext(pd->ppe_id, pd->thread_id, virq);
229 300
230 if (result) 301 if (result)
231 pr_info("%s:%d: lv1_disconnect_irq_plug_ext failed: %s\n", 302 pr_info("%s:%d: lv1_disconnect_irq_plug_ext failed: %s\n",
@@ -282,7 +353,9 @@ int ps3_event_receive_port_destroy(unsigned int virq)
282{ 353{
283 int result; 354 int result;
284 355
285 pr_debug(" -> %s:%d virq: %u\n", __func__, __LINE__, virq); 356 pr_debug(" -> %s:%d virq %u\n", __func__, __LINE__, virq);
357
358 ps3_chip_mask(virq);
286 359
287 result = lv1_destruct_event_receive_port(virq_to_hw(virq)); 360 result = lv1_destruct_event_receive_port(virq_to_hw(virq));
288 361
@@ -290,17 +363,14 @@ int ps3_event_receive_port_destroy(unsigned int virq)
290 pr_debug("%s:%d: lv1_destruct_event_receive_port failed: %s\n", 363 pr_debug("%s:%d: lv1_destruct_event_receive_port failed: %s\n",
291 __func__, __LINE__, ps3_result(result)); 364 __func__, __LINE__, ps3_result(result));
292 365
293 /* lv1_destruct_event_receive_port() destroys the IRQ plug, 366 /*
294 * so don't call ps3_irq_plug_destroy() here. 367 * Don't call ps3_virq_destroy() here since ps3_smp_cleanup_cpu()
368 * calls from interrupt context (smp_call_function) when kexecing.
295 */ 369 */
296 370
297 result = ps3_virq_destroy(virq);
298 BUG_ON(result);
299
300 pr_debug(" <- %s:%d\n", __func__, __LINE__); 371 pr_debug(" <- %s:%d\n", __func__, __LINE__);
301 return result; 372 return result;
302} 373}
303EXPORT_SYMBOL_GPL(ps3_event_receive_port_destroy);
304 374
305int ps3_send_event_locally(unsigned int virq) 375int ps3_send_event_locally(unsigned int virq)
306{ 376{
@@ -311,17 +381,15 @@ int ps3_send_event_locally(unsigned int virq)
311 * ps3_sb_event_receive_port_setup - Setup a system bus event receive port. 381 * ps3_sb_event_receive_port_setup - Setup a system bus event receive port.
312 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be 382 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be
313 * serviced on. 383 * serviced on.
314 * @did: The HV device identifier read from the system repository. 384 * @dev: The system bus device instance.
315 * @interrupt_id: The device interrupt id read from the system repository.
316 * @virq: The assigned Linux virq. 385 * @virq: The assigned Linux virq.
317 * 386 *
318 * An event irq represents a virtual device interrupt. The interrupt_id 387 * An event irq represents a virtual device interrupt. The interrupt_id
319 * coresponds to the software interrupt number. 388 * coresponds to the software interrupt number.
320 */ 389 */
321 390
322int ps3_sb_event_receive_port_setup(enum ps3_cpu_binding cpu, 391int ps3_sb_event_receive_port_setup(struct ps3_system_bus_device *dev,
323 const struct ps3_device_id *did, unsigned int interrupt_id, 392 enum ps3_cpu_binding cpu, unsigned int *virq)
324 unsigned int *virq)
325{ 393{
326 /* this should go in system-bus.c */ 394 /* this should go in system-bus.c */
327 395
@@ -332,8 +400,8 @@ int ps3_sb_event_receive_port_setup(enum ps3_cpu_binding cpu,
332 if (result) 400 if (result)
333 return result; 401 return result;
334 402
335 result = lv1_connect_interrupt_event_receive_port(did->bus_id, 403 result = lv1_connect_interrupt_event_receive_port(dev->bus_id,
336 did->dev_id, virq_to_hw(*virq), interrupt_id); 404 dev->dev_id, virq_to_hw(*virq), dev->interrupt_id);
337 405
338 if (result) { 406 if (result) {
339 pr_debug("%s:%d: lv1_connect_interrupt_event_receive_port" 407 pr_debug("%s:%d: lv1_connect_interrupt_event_receive_port"
@@ -345,24 +413,24 @@ int ps3_sb_event_receive_port_setup(enum ps3_cpu_binding cpu,
345 } 413 }
346 414
347 pr_debug("%s:%d: interrupt_id %u, virq %u\n", __func__, __LINE__, 415 pr_debug("%s:%d: interrupt_id %u, virq %u\n", __func__, __LINE__,
348 interrupt_id, *virq); 416 dev->interrupt_id, *virq);
349 417
350 return 0; 418 return 0;
351} 419}
352EXPORT_SYMBOL(ps3_sb_event_receive_port_setup); 420EXPORT_SYMBOL(ps3_sb_event_receive_port_setup);
353 421
354int ps3_sb_event_receive_port_destroy(const struct ps3_device_id *did, 422int ps3_sb_event_receive_port_destroy(struct ps3_system_bus_device *dev,
355 unsigned int interrupt_id, unsigned int virq) 423 unsigned int virq)
356{ 424{
357 /* this should go in system-bus.c */ 425 /* this should go in system-bus.c */
358 426
359 int result; 427 int result;
360 428
361 pr_debug(" -> %s:%d: interrupt_id %u, virq %u\n", __func__, __LINE__, 429 pr_debug(" -> %s:%d: interrupt_id %u, virq %u\n", __func__, __LINE__,
362 interrupt_id, virq); 430 dev->interrupt_id, virq);
363 431
364 result = lv1_disconnect_interrupt_event_receive_port(did->bus_id, 432 result = lv1_disconnect_interrupt_event_receive_port(dev->bus_id,
365 did->dev_id, virq_to_hw(virq), interrupt_id); 433 dev->dev_id, virq_to_hw(virq), dev->interrupt_id);
366 434
367 if (result) 435 if (result)
368 pr_debug("%s:%d: lv1_disconnect_interrupt_event_receive_port" 436 pr_debug("%s:%d: lv1_disconnect_interrupt_event_receive_port"
@@ -372,6 +440,14 @@ int ps3_sb_event_receive_port_destroy(const struct ps3_device_id *did,
372 result = ps3_event_receive_port_destroy(virq); 440 result = ps3_event_receive_port_destroy(virq);
373 BUG_ON(result); 441 BUG_ON(result);
374 442
443 /*
444 * ps3_event_receive_port_destroy() destroys the IRQ plug,
445 * so don't call ps3_irq_plug_destroy() here.
446 */
447
448 result = ps3_virq_destroy(virq);
449 BUG_ON(result);
450
375 pr_debug(" <- %s:%d\n", __func__, __LINE__); 451 pr_debug(" <- %s:%d\n", __func__, __LINE__);
376 return result; 452 return result;
377} 453}
@@ -412,16 +488,24 @@ EXPORT_SYMBOL_GPL(ps3_io_irq_setup);
412int ps3_io_irq_destroy(unsigned int virq) 488int ps3_io_irq_destroy(unsigned int virq)
413{ 489{
414 int result; 490 int result;
491 unsigned long outlet = virq_to_hw(virq);
415 492
416 result = lv1_destruct_io_irq_outlet(virq_to_hw(virq)); 493 ps3_chip_mask(virq);
417 494
418 if (result) 495 /*
419 pr_debug("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n", 496 * lv1_destruct_io_irq_outlet() will destroy the IRQ plug,
420 __func__, __LINE__, ps3_result(result)); 497 * so call ps3_irq_plug_destroy() first.
498 */
421 499
422 result = ps3_irq_plug_destroy(virq); 500 result = ps3_irq_plug_destroy(virq);
423 BUG_ON(result); 501 BUG_ON(result);
424 502
503 result = lv1_destruct_io_irq_outlet(outlet);
504
505 if (result)
506 pr_debug("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n",
507 __func__, __LINE__, ps3_result(result));
508
425 return result; 509 return result;
426} 510}
427EXPORT_SYMBOL_GPL(ps3_io_irq_destroy); 511EXPORT_SYMBOL_GPL(ps3_io_irq_destroy);
@@ -461,11 +545,13 @@ int ps3_vuart_irq_setup(enum ps3_cpu_binding cpu, void* virt_addr_bmp,
461 545
462 return result; 546 return result;
463} 547}
548EXPORT_SYMBOL_GPL(ps3_vuart_irq_setup);
464 549
465int ps3_vuart_irq_destroy(unsigned int virq) 550int ps3_vuart_irq_destroy(unsigned int virq)
466{ 551{
467 int result; 552 int result;
468 553
554 ps3_chip_mask(virq);
469 result = lv1_deconfigure_virtual_uart_irq(); 555 result = lv1_deconfigure_virtual_uart_irq();
470 556
471 if (result) { 557 if (result) {
@@ -479,6 +565,7 @@ int ps3_vuart_irq_destroy(unsigned int virq)
479 565
480 return result; 566 return result;
481} 567}
568EXPORT_SYMBOL_GPL(ps3_vuart_irq_destroy);
482 569
483/** 570/**
484 * ps3_spe_irq_setup - Setup an spe virq. 571 * ps3_spe_irq_setup - Setup an spe virq.
@@ -514,9 +601,14 @@ int ps3_spe_irq_setup(enum ps3_cpu_binding cpu, unsigned long spe_id,
514 601
515int ps3_spe_irq_destroy(unsigned int virq) 602int ps3_spe_irq_destroy(unsigned int virq)
516{ 603{
517 int result = ps3_irq_plug_destroy(virq); 604 int result;
605
606 ps3_chip_mask(virq);
607
608 result = ps3_irq_plug_destroy(virq);
518 BUG_ON(result); 609 BUG_ON(result);
519 return 0; 610
611 return result;
520} 612}
521 613
522 614
@@ -533,7 +625,7 @@ static void _dump_64_bmp(const char *header, const u64 *p, unsigned cpu,
533 *p & 0xffff); 625 *p & 0xffff);
534} 626}
535 627
536static void __attribute__ ((unused)) _dump_256_bmp(const char *header, 628static void __maybe_unused _dump_256_bmp(const char *header,
537 const u64 *p, unsigned cpu, const char* func, int line) 629 const u64 *p, unsigned cpu, const char* func, int line)
538{ 630{
539 pr_debug("%s:%d: %s %u {%016lx:%016lx:%016lx:%016lx}\n", 631 pr_debug("%s:%d: %s %u {%016lx:%016lx:%016lx:%016lx}\n",
@@ -546,86 +638,25 @@ static void _dump_bmp(struct ps3_private* pd, const char* func, int line)
546 unsigned long flags; 638 unsigned long flags;
547 639
548 spin_lock_irqsave(&pd->bmp.lock, flags); 640 spin_lock_irqsave(&pd->bmp.lock, flags);
549 _dump_64_bmp("stat", &pd->bmp.status, pd->cpu, func, line); 641 _dump_64_bmp("stat", &pd->bmp.status, pd->thread_id, func, line);
550 _dump_64_bmp("mask", &pd->bmp.mask, pd->cpu, func, line); 642 _dump_64_bmp("mask", &pd->bmp.mask, pd->thread_id, func, line);
551 spin_unlock_irqrestore(&pd->bmp.lock, flags); 643 spin_unlock_irqrestore(&pd->bmp.lock, flags);
552} 644}
553 645
554#define dump_mask(_x) _dump_mask(_x, __func__, __LINE__) 646#define dump_mask(_x) _dump_mask(_x, __func__, __LINE__)
555static void __attribute__ ((unused)) _dump_mask(struct ps3_private* pd, 647static void __maybe_unused _dump_mask(struct ps3_private *pd,
556 const char* func, int line) 648 const char* func, int line)
557{ 649{
558 unsigned long flags; 650 unsigned long flags;
559 651
560 spin_lock_irqsave(&pd->bmp.lock, flags); 652 spin_lock_irqsave(&pd->bmp.lock, flags);
561 _dump_64_bmp("mask", &pd->bmp.mask, pd->cpu, func, line); 653 _dump_64_bmp("mask", &pd->bmp.mask, pd->thread_id, func, line);
562 spin_unlock_irqrestore(&pd->bmp.lock, flags); 654 spin_unlock_irqrestore(&pd->bmp.lock, flags);
563} 655}
564#else 656#else
565static void dump_bmp(struct ps3_private* pd) {}; 657static void dump_bmp(struct ps3_private* pd) {};
566#endif /* defined(DEBUG) */ 658#endif /* defined(DEBUG) */
567 659
568static void ps3_chip_mask(unsigned int virq)
569{
570 struct ps3_private *pd = get_irq_chip_data(virq);
571 u64 bit = 0x8000000000000000UL >> virq;
572 u64 *p = &pd->bmp.mask;
573 u64 old;
574 unsigned long flags;
575
576 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq);
577
578 local_irq_save(flags);
579 asm volatile(
580 "1: ldarx %0,0,%3\n"
581 "andc %0,%0,%2\n"
582 "stdcx. %0,0,%3\n"
583 "bne- 1b"
584 : "=&r" (old), "+m" (*p)
585 : "r" (bit), "r" (p)
586 : "cc" );
587
588 lv1_did_update_interrupt_mask(pd->node, pd->cpu);
589 local_irq_restore(flags);
590}
591
592static void ps3_chip_unmask(unsigned int virq)
593{
594 struct ps3_private *pd = get_irq_chip_data(virq);
595 u64 bit = 0x8000000000000000UL >> virq;
596 u64 *p = &pd->bmp.mask;
597 u64 old;
598 unsigned long flags;
599
600 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq);
601
602 local_irq_save(flags);
603 asm volatile(
604 "1: ldarx %0,0,%3\n"
605 "or %0,%0,%2\n"
606 "stdcx. %0,0,%3\n"
607 "bne- 1b"
608 : "=&r" (old), "+m" (*p)
609 : "r" (bit), "r" (p)
610 : "cc" );
611
612 lv1_did_update_interrupt_mask(pd->node, pd->cpu);
613 local_irq_restore(flags);
614}
615
616static void ps3_chip_eoi(unsigned int virq)
617{
618 const struct ps3_private *pd = get_irq_chip_data(virq);
619 lv1_end_of_interrupt_ext(pd->node, pd->cpu, virq);
620}
621
622static struct irq_chip irq_chip = {
623 .typename = "ps3",
624 .mask = ps3_chip_mask,
625 .unmask = ps3_chip_unmask,
626 .eoi = ps3_chip_eoi,
627};
628
629static void ps3_host_unmap(struct irq_host *h, unsigned int virq) 660static void ps3_host_unmap(struct irq_host *h, unsigned int virq)
630{ 661{
631 set_irq_chip_data(virq, NULL); 662 set_irq_chip_data(virq, NULL);
@@ -637,7 +668,7 @@ static int ps3_host_map(struct irq_host *h, unsigned int virq,
637 pr_debug("%s:%d: hwirq %lu, virq %u\n", __func__, __LINE__, hwirq, 668 pr_debug("%s:%d: hwirq %lu, virq %u\n", __func__, __LINE__, hwirq,
638 virq); 669 virq);
639 670
640 set_irq_chip_and_handler(virq, &irq_chip, handle_fasteoi_irq); 671 set_irq_chip_and_handler(virq, &ps3_irq_chip, handle_fasteoi_irq);
641 672
642 return 0; 673 return 0;
643} 674}
@@ -657,7 +688,7 @@ void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq)
657 cpu, virq, pd->bmp.ipi_debug_brk_mask); 688 cpu, virq, pd->bmp.ipi_debug_brk_mask);
658} 689}
659 690
660unsigned int ps3_get_irq(void) 691static unsigned int ps3_get_irq(void)
661{ 692{
662 struct ps3_private *pd = &__get_cpu_var(ps3_private); 693 struct ps3_private *pd = &__get_cpu_var(ps3_private);
663 u64 x = (pd->bmp.status & pd->bmp.mask); 694 u64 x = (pd->bmp.status & pd->bmp.mask);
@@ -672,8 +703,8 @@ unsigned int ps3_get_irq(void)
672 plug &= 0x3f; 703 plug &= 0x3f;
673 704
674 if (unlikely(plug) == NO_IRQ) { 705 if (unlikely(plug) == NO_IRQ) {
675 pr_debug("%s:%d: no plug found: cpu %u\n", __func__, __LINE__, 706 pr_debug("%s:%d: no plug found: thread_id %lu\n", __func__,
676 pd->cpu); 707 __LINE__, pd->thread_id);
677 dump_bmp(&per_cpu(ps3_private, 0)); 708 dump_bmp(&per_cpu(ps3_private, 0));
678 dump_bmp(&per_cpu(ps3_private, 1)); 709 dump_bmp(&per_cpu(ps3_private, 1));
679 return NO_IRQ; 710 return NO_IRQ;
@@ -703,16 +734,16 @@ void __init ps3_init_IRQ(void)
703 for_each_possible_cpu(cpu) { 734 for_each_possible_cpu(cpu) {
704 struct ps3_private *pd = &per_cpu(ps3_private, cpu); 735 struct ps3_private *pd = &per_cpu(ps3_private, cpu);
705 736
706 lv1_get_logical_ppe_id(&pd->node); 737 lv1_get_logical_ppe_id(&pd->ppe_id);
707 pd->cpu = get_hard_smp_processor_id(cpu); 738 pd->thread_id = get_hard_smp_processor_id(cpu);
708 spin_lock_init(&pd->bmp.lock); 739 spin_lock_init(&pd->bmp.lock);
709 740
710 pr_debug("%s:%d: node %lu, cpu %d, bmp %lxh\n", __func__, 741 pr_debug("%s:%d: ppe_id %lu, thread_id %lu, bmp %lxh\n",
711 __LINE__, pd->node, pd->cpu, 742 __func__, __LINE__, pd->ppe_id, pd->thread_id,
712 ps3_mm_phys_to_lpar(__pa(&pd->bmp))); 743 ps3_mm_phys_to_lpar(__pa(&pd->bmp)));
713 744
714 result = lv1_configure_irq_state_bitmap(pd->node, pd->cpu, 745 result = lv1_configure_irq_state_bitmap(pd->ppe_id,
715 ps3_mm_phys_to_lpar(__pa(&pd->bmp))); 746 pd->thread_id, ps3_mm_phys_to_lpar(__pa(&pd->bmp)));
716 747
717 if (result) 748 if (result)
718 pr_debug("%s:%d: lv1_configure_irq_state_bitmap failed:" 749 pr_debug("%s:%d: lv1_configure_irq_state_bitmap failed:"
@@ -722,3 +753,16 @@ void __init ps3_init_IRQ(void)
722 753
723 ppc_md.get_irq = ps3_get_irq; 754 ppc_md.get_irq = ps3_get_irq;
724} 755}
756
757void ps3_shutdown_IRQ(int cpu)
758{
759 int result;
760 u64 ppe_id;
761 u64 thread_id = get_hard_smp_processor_id(cpu);
762
763 lv1_get_logical_ppe_id(&ppe_id);
764 result = lv1_configure_irq_state_bitmap(ppe_id, thread_id, 0);
765
766 DBG("%s:%d: lv1_configure_irq_state_bitmap (%lu:%lu/%d) %s\n", __func__,
767 __LINE__, ppe_id, thread_id, cpu, ps3_result(result));
768}
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
index f8a3e206c5..7bb3e16209 100644
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -30,9 +30,9 @@
30#include "platform.h" 30#include "platform.h"
31 31
32#if defined(DEBUG) 32#if defined(DEBUG)
33#define DBG(fmt...) udbg_printf(fmt) 33#define DBG udbg_printf
34#else 34#else
35#define DBG(fmt...) do{if(0)printk(fmt);}while(0) 35#define DBG pr_debug
36#endif 36#endif
37 37
38enum { 38enum {
@@ -115,7 +115,8 @@ struct map {
115}; 115};
116 116
117#define debug_dump_map(x) _debug_dump_map(x, __func__, __LINE__) 117#define debug_dump_map(x) _debug_dump_map(x, __func__, __LINE__)
118static void _debug_dump_map(const struct map* m, const char* func, int line) 118static void __maybe_unused _debug_dump_map(const struct map *m,
119 const char *func, int line)
119{ 120{
120 DBG("%s:%d: map.total = %lxh\n", func, line, m->total); 121 DBG("%s:%d: map.total = %lxh\n", func, line, m->total);
121 DBG("%s:%d: map.rm.size = %lxh\n", func, line, m->rm.size); 122 DBG("%s:%d: map.rm.size = %lxh\n", func, line, m->rm.size);
@@ -212,9 +213,15 @@ fail:
212 213
213void ps3_mm_vas_destroy(void) 214void ps3_mm_vas_destroy(void)
214{ 215{
216 int result;
217
218 DBG("%s:%d: map.vas_id = %lu\n", __func__, __LINE__, map.vas_id);
219
215 if (map.vas_id) { 220 if (map.vas_id) {
216 lv1_select_virtual_address_space(0); 221 result = lv1_select_virtual_address_space(0);
217 lv1_destruct_virtual_address_space(map.vas_id); 222 BUG_ON(result);
223 result = lv1_destruct_virtual_address_space(map.vas_id);
224 BUG_ON(result);
218 map.vas_id = 0; 225 map.vas_id = 0;
219 } 226 }
220} 227}
@@ -232,7 +239,7 @@ void ps3_mm_vas_destroy(void)
232 * @size is rounded down to a multiple of the vas large page size. 239 * @size is rounded down to a multiple of the vas large page size.
233 */ 240 */
234 241
235int ps3_mm_region_create(struct mem_region *r, unsigned long size) 242static int ps3_mm_region_create(struct mem_region *r, unsigned long size)
236{ 243{
237 int result; 244 int result;
238 unsigned long muid; 245 unsigned long muid;
@@ -273,10 +280,14 @@ zero_region:
273 * @r: pointer to struct mem_region 280 * @r: pointer to struct mem_region
274 */ 281 */
275 282
276void ps3_mm_region_destroy(struct mem_region *r) 283static void ps3_mm_region_destroy(struct mem_region *r)
277{ 284{
285 int result;
286
287 DBG("%s:%d: r->base = %lxh\n", __func__, __LINE__, r->base);
278 if (r->base) { 288 if (r->base) {
279 lv1_release_memory(r->base); 289 result = lv1_release_memory(r->base);
290 BUG_ON(result);
280 r->size = r->base = r->offset = 0; 291 r->size = r->base = r->offset = 0;
281 map.total = map.rm.size; 292 map.total = map.rm.size;
282 } 293 }
@@ -329,31 +340,34 @@ core_initcall(ps3_mm_add_memory);
329/*============================================================================*/ 340/*============================================================================*/
330 341
331/** 342/**
332 * dma_lpar_to_bus - Translate an lpar address to ioc mapped bus address. 343 * dma_sb_lpar_to_bus - Translate an lpar address to ioc mapped bus address.
333 * @r: pointer to dma region structure 344 * @r: pointer to dma region structure
334 * @lpar_addr: HV lpar address 345 * @lpar_addr: HV lpar address
335 */ 346 */
336 347
337static unsigned long dma_lpar_to_bus(struct ps3_dma_region *r, 348static unsigned long dma_sb_lpar_to_bus(struct ps3_dma_region *r,
338 unsigned long lpar_addr) 349 unsigned long lpar_addr)
339{ 350{
340 BUG_ON(lpar_addr >= map.r1.base + map.r1.size); 351 if (lpar_addr >= map.rm.size)
341 return r->bus_addr + (lpar_addr <= map.rm.size ? lpar_addr 352 lpar_addr -= map.r1.offset;
342 : lpar_addr - map.r1.offset); 353 BUG_ON(lpar_addr < r->offset);
354 BUG_ON(lpar_addr >= r->offset + r->len);
355 return r->bus_addr + lpar_addr - r->offset;
343} 356}
344 357
345#define dma_dump_region(_a) _dma_dump_region(_a, __func__, __LINE__) 358#define dma_dump_region(_a) _dma_dump_region(_a, __func__, __LINE__)
346static void _dma_dump_region(const struct ps3_dma_region *r, const char* func, 359static void __maybe_unused _dma_dump_region(const struct ps3_dma_region *r,
347 int line) 360 const char *func, int line)
348{ 361{
349 DBG("%s:%d: dev %u:%u\n", func, line, r->did.bus_id, 362 DBG("%s:%d: dev %u:%u\n", func, line, r->dev->bus_id,
350 r->did.dev_id); 363 r->dev->dev_id);
351 DBG("%s:%d: page_size %u\n", func, line, r->page_size); 364 DBG("%s:%d: page_size %u\n", func, line, r->page_size);
352 DBG("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr); 365 DBG("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr);
353 DBG("%s:%d: len %lxh\n", func, line, r->len); 366 DBG("%s:%d: len %lxh\n", func, line, r->len);
367 DBG("%s:%d: offset %lxh\n", func, line, r->offset);
354} 368}
355 369
356/** 370 /**
357 * dma_chunk - A chunk of dma pages mapped by the io controller. 371 * dma_chunk - A chunk of dma pages mapped by the io controller.
358 * @region - The dma region that owns this chunk. 372 * @region - The dma region that owns this chunk.
359 * @lpar_addr: Starting lpar address of the area to map. 373 * @lpar_addr: Starting lpar address of the area to map.
@@ -381,10 +395,11 @@ static void _dma_dump_chunk (const struct dma_chunk* c, const char* func,
381 int line) 395 int line)
382{ 396{
383 DBG("%s:%d: r.dev %u:%u\n", func, line, 397 DBG("%s:%d: r.dev %u:%u\n", func, line,
384 c->region->did.bus_id, c->region->did.dev_id); 398 c->region->dev->bus_id, c->region->dev->dev_id);
385 DBG("%s:%d: r.bus_addr %lxh\n", func, line, c->region->bus_addr); 399 DBG("%s:%d: r.bus_addr %lxh\n", func, line, c->region->bus_addr);
386 DBG("%s:%d: r.page_size %u\n", func, line, c->region->page_size); 400 DBG("%s:%d: r.page_size %u\n", func, line, c->region->page_size);
387 DBG("%s:%d: r.len %lxh\n", func, line, c->region->len); 401 DBG("%s:%d: r.len %lxh\n", func, line, c->region->len);
402 DBG("%s:%d: r.offset %lxh\n", func, line, c->region->offset);
388 DBG("%s:%d: c.lpar_addr %lxh\n", func, line, c->lpar_addr); 403 DBG("%s:%d: c.lpar_addr %lxh\n", func, line, c->lpar_addr);
389 DBG("%s:%d: c.bus_addr %lxh\n", func, line, c->bus_addr); 404 DBG("%s:%d: c.bus_addr %lxh\n", func, line, c->bus_addr);
390 DBG("%s:%d: c.len %lxh\n", func, line, c->len); 405 DBG("%s:%d: c.len %lxh\n", func, line, c->len);
@@ -395,39 +410,68 @@ static struct dma_chunk * dma_find_chunk(struct ps3_dma_region *r,
395{ 410{
396 struct dma_chunk *c; 411 struct dma_chunk *c;
397 unsigned long aligned_bus = _ALIGN_DOWN(bus_addr, 1 << r->page_size); 412 unsigned long aligned_bus = _ALIGN_DOWN(bus_addr, 1 << r->page_size);
398 unsigned long aligned_len = _ALIGN_UP(len, 1 << r->page_size); 413 unsigned long aligned_len = _ALIGN_UP(len+bus_addr-aligned_bus,
414 1 << r->page_size);
399 415
400 list_for_each_entry(c, &r->chunk_list.head, link) { 416 list_for_each_entry(c, &r->chunk_list.head, link) {
401 /* intersection */ 417 /* intersection */
402 if (aligned_bus >= c->bus_addr 418 if (aligned_bus >= c->bus_addr &&
403 && aligned_bus < c->bus_addr + c->len 419 aligned_bus + aligned_len <= c->bus_addr + c->len)
404 && aligned_bus + aligned_len <= c->bus_addr + c->len) {
405 return c; 420 return c;
406 } 421
407 /* below */ 422 /* below */
408 if (aligned_bus + aligned_len <= c->bus_addr) { 423 if (aligned_bus + aligned_len <= c->bus_addr)
409 continue; 424 continue;
410 } 425
411 /* above */ 426 /* above */
412 if (aligned_bus >= c->bus_addr + c->len) { 427 if (aligned_bus >= c->bus_addr + c->len)
413 continue; 428 continue;
414 }
415 429
416 /* we don't handle the multi-chunk case for now */ 430 /* we don't handle the multi-chunk case for now */
417
418 dma_dump_chunk(c); 431 dma_dump_chunk(c);
419 BUG(); 432 BUG();
420 } 433 }
421 return NULL; 434 return NULL;
422} 435}
423 436
424static int dma_free_chunk(struct dma_chunk *c) 437static struct dma_chunk *dma_find_chunk_lpar(struct ps3_dma_region *r,
438 unsigned long lpar_addr, unsigned long len)
439{
440 struct dma_chunk *c;
441 unsigned long aligned_lpar = _ALIGN_DOWN(lpar_addr, 1 << r->page_size);
442 unsigned long aligned_len = _ALIGN_UP(len + lpar_addr - aligned_lpar,
443 1 << r->page_size);
444
445 list_for_each_entry(c, &r->chunk_list.head, link) {
446 /* intersection */
447 if (c->lpar_addr <= aligned_lpar &&
448 aligned_lpar < c->lpar_addr + c->len) {
449 if (aligned_lpar + aligned_len <= c->lpar_addr + c->len)
450 return c;
451 else {
452 dma_dump_chunk(c);
453 BUG();
454 }
455 }
456 /* below */
457 if (aligned_lpar + aligned_len <= c->lpar_addr) {
458 continue;
459 }
460 /* above */
461 if (c->lpar_addr + c->len <= aligned_lpar) {
462 continue;
463 }
464 }
465 return NULL;
466}
467
468static int dma_sb_free_chunk(struct dma_chunk *c)
425{ 469{
426 int result = 0; 470 int result = 0;
427 471
428 if (c->bus_addr) { 472 if (c->bus_addr) {
429 result = lv1_unmap_device_dma_region(c->region->did.bus_id, 473 result = lv1_unmap_device_dma_region(c->region->dev->bus_id,
430 c->region->did.dev_id, c->bus_addr, c->len); 474 c->region->dev->dev_id, c->bus_addr, c->len);
431 BUG_ON(result); 475 BUG_ON(result);
432 } 476 }
433 477
@@ -435,8 +479,39 @@ static int dma_free_chunk(struct dma_chunk *c)
435 return result; 479 return result;
436} 480}
437 481
482static int dma_ioc0_free_chunk(struct dma_chunk *c)
483{
484 int result = 0;
485 int iopage;
486 unsigned long offset;
487 struct ps3_dma_region *r = c->region;
488
489 DBG("%s:start\n", __func__);
490 for (iopage = 0; iopage < (c->len >> r->page_size); iopage++) {
491 offset = (1 << r->page_size) * iopage;
492 /* put INVALID entry */
493 result = lv1_put_iopte(0,
494 c->bus_addr + offset,
495 c->lpar_addr + offset,
496 r->ioid,
497 0);
498 DBG("%s: bus=%#lx, lpar=%#lx, ioid=%d\n", __func__,
499 c->bus_addr + offset,
500 c->lpar_addr + offset,
501 r->ioid);
502
503 if (result) {
504 DBG("%s:%d: lv1_put_iopte failed: %s\n", __func__,
505 __LINE__, ps3_result(result));
506 }
507 }
508 kfree(c);
509 DBG("%s:end\n", __func__);
510 return result;
511}
512
438/** 513/**
439 * dma_map_pages - Maps dma pages into the io controller bus address space. 514 * dma_sb_map_pages - Maps dma pages into the io controller bus address space.
440 * @r: Pointer to a struct ps3_dma_region. 515 * @r: Pointer to a struct ps3_dma_region.
441 * @phys_addr: Starting physical address of the area to map. 516 * @phys_addr: Starting physical address of the area to map.
442 * @len: Length in bytes of the area to map. 517 * @len: Length in bytes of the area to map.
@@ -446,8 +521,8 @@ static int dma_free_chunk(struct dma_chunk *c)
446 * make the HV call to add the pages into the io controller address space. 521 * make the HV call to add the pages into the io controller address space.
447 */ 522 */
448 523
449static int dma_map_pages(struct ps3_dma_region *r, unsigned long phys_addr, 524static int dma_sb_map_pages(struct ps3_dma_region *r, unsigned long phys_addr,
450 unsigned long len, struct dma_chunk **c_out) 525 unsigned long len, struct dma_chunk **c_out, u64 iopte_flag)
451{ 526{
452 int result; 527 int result;
453 struct dma_chunk *c; 528 struct dma_chunk *c;
@@ -461,13 +536,13 @@ static int dma_map_pages(struct ps3_dma_region *r, unsigned long phys_addr,
461 536
462 c->region = r; 537 c->region = r;
463 c->lpar_addr = ps3_mm_phys_to_lpar(phys_addr); 538 c->lpar_addr = ps3_mm_phys_to_lpar(phys_addr);
464 c->bus_addr = dma_lpar_to_bus(r, c->lpar_addr); 539 c->bus_addr = dma_sb_lpar_to_bus(r, c->lpar_addr);
465 c->len = len; 540 c->len = len;
466 541
467 result = lv1_map_device_dma_region(c->region->did.bus_id, 542 BUG_ON(iopte_flag != 0xf800000000000000UL);
468 c->region->did.dev_id, c->lpar_addr, c->bus_addr, c->len, 543 result = lv1_map_device_dma_region(c->region->dev->bus_id,
469 0xf800000000000000UL); 544 c->region->dev->dev_id, c->lpar_addr,
470 545 c->bus_addr, c->len, iopte_flag);
471 if (result) { 546 if (result) {
472 DBG("%s:%d: lv1_map_device_dma_region failed: %s\n", 547 DBG("%s:%d: lv1_map_device_dma_region failed: %s\n",
473 __func__, __LINE__, ps3_result(result)); 548 __func__, __LINE__, ps3_result(result));
@@ -487,26 +562,120 @@ fail_alloc:
487 return result; 562 return result;
488} 563}
489 564
565static int dma_ioc0_map_pages(struct ps3_dma_region *r, unsigned long phys_addr,
566 unsigned long len, struct dma_chunk **c_out,
567 u64 iopte_flag)
568{
569 int result;
570 struct dma_chunk *c, *last;
571 int iopage, pages;
572 unsigned long offset;
573
574 DBG(KERN_ERR "%s: phy=%#lx, lpar%#lx, len=%#lx\n", __func__,
575 phys_addr, ps3_mm_phys_to_lpar(phys_addr), len);
576 c = kzalloc(sizeof(struct dma_chunk), GFP_ATOMIC);
577
578 if (!c) {
579 result = -ENOMEM;
580 goto fail_alloc;
581 }
582
583 c->region = r;
584 c->len = len;
585 c->lpar_addr = ps3_mm_phys_to_lpar(phys_addr);
586 /* allocate IO address */
587 if (list_empty(&r->chunk_list.head)) {
588 /* first one */
589 c->bus_addr = r->bus_addr;
590 } else {
591 /* derive from last bus addr*/
592 last = list_entry(r->chunk_list.head.next,
593 struct dma_chunk, link);
594 c->bus_addr = last->bus_addr + last->len;
595 DBG("%s: last bus=%#lx, len=%#lx\n", __func__,
596 last->bus_addr, last->len);
597 }
598
599 /* FIXME: check whether length exceeds region size */
600
601 /* build ioptes for the area */
602 pages = len >> r->page_size;
603 DBG("%s: pgsize=%#x len=%#lx pages=%#x iopteflag=%#lx\n", __func__,
604 r->page_size, r->len, pages, iopte_flag);
605 for (iopage = 0; iopage < pages; iopage++) {
606 offset = (1 << r->page_size) * iopage;
607 result = lv1_put_iopte(0,
608 c->bus_addr + offset,
609 c->lpar_addr + offset,
610 r->ioid,
611 iopte_flag);
612 if (result) {
613 printk(KERN_WARNING "%s:%d: lv1_map_device_dma_region "
614 "failed: %s\n", __func__, __LINE__,
615 ps3_result(result));
616 goto fail_map;
617 }
618 DBG("%s: pg=%d bus=%#lx, lpar=%#lx, ioid=%#x\n", __func__,
619 iopage, c->bus_addr + offset, c->lpar_addr + offset,
620 r->ioid);
621 }
622
623 /* be sure that last allocated one is inserted at head */
624 list_add(&c->link, &r->chunk_list.head);
625
626 *c_out = c;
627 DBG("%s: end\n", __func__);
628 return 0;
629
630fail_map:
631 for (iopage--; 0 <= iopage; iopage--) {
632 lv1_put_iopte(0,
633 c->bus_addr + offset,
634 c->lpar_addr + offset,
635 r->ioid,
636 0);
637 }
638 kfree(c);
639fail_alloc:
640 *c_out = NULL;
641 return result;
642}
643
490/** 644/**
491 * dma_region_create - Create a device dma region. 645 * dma_sb_region_create - Create a device dma region.
492 * @r: Pointer to a struct ps3_dma_region. 646 * @r: Pointer to a struct ps3_dma_region.
493 * 647 *
494 * This is the lowest level dma region create routine, and is the one that 648 * This is the lowest level dma region create routine, and is the one that
495 * will make the HV call to create the region. 649 * will make the HV call to create the region.
496 */ 650 */
497 651
498static int dma_region_create(struct ps3_dma_region* r) 652static int dma_sb_region_create(struct ps3_dma_region *r)
499{ 653{
500 int result; 654 int result;
501 655
502 r->len = _ALIGN_UP(map.total, 1 << r->page_size); 656 pr_info(" -> %s:%d:\n", __func__, __LINE__);
657
658 BUG_ON(!r);
659
660 if (!r->dev->bus_id) {
661 pr_info("%s:%d: %u:%u no dma\n", __func__, __LINE__,
662 r->dev->bus_id, r->dev->dev_id);
663 return 0;
664 }
665
666 DBG("%s:%u: len = 0x%lx, page_size = %u, offset = 0x%lx\n", __func__,
667 __LINE__, r->len, r->page_size, r->offset);
668
669 BUG_ON(!r->len);
670 BUG_ON(!r->page_size);
671 BUG_ON(!r->region_ops);
672
503 INIT_LIST_HEAD(&r->chunk_list.head); 673 INIT_LIST_HEAD(&r->chunk_list.head);
504 spin_lock_init(&r->chunk_list.lock); 674 spin_lock_init(&r->chunk_list.lock);
505 675
506 result = lv1_allocate_device_dma_region(r->did.bus_id, r->did.dev_id, 676 result = lv1_allocate_device_dma_region(r->dev->bus_id, r->dev->dev_id,
507 r->len, r->page_size, r->region_type, &r->bus_addr); 677 roundup_pow_of_two(r->len), r->page_size, r->region_type,
508 678 &r->bus_addr);
509 dma_dump_region(r);
510 679
511 if (result) { 680 if (result) {
512 DBG("%s:%d: lv1_allocate_device_dma_region failed: %s\n", 681 DBG("%s:%d: lv1_allocate_device_dma_region failed: %s\n",
@@ -517,6 +686,27 @@ static int dma_region_create(struct ps3_dma_region* r)
517 return result; 686 return result;
518} 687}
519 688
689static int dma_ioc0_region_create(struct ps3_dma_region *r)
690{
691 int result;
692
693 INIT_LIST_HEAD(&r->chunk_list.head);
694 spin_lock_init(&r->chunk_list.lock);
695
696 result = lv1_allocate_io_segment(0,
697 r->len,
698 r->page_size,
699 &r->bus_addr);
700 if (result) {
701 DBG("%s:%d: lv1_allocate_io_segment failed: %s\n",
702 __func__, __LINE__, ps3_result(result));
703 r->len = r->bus_addr = 0;
704 }
705 DBG("%s: len=%#lx, pg=%d, bus=%#lx\n", __func__,
706 r->len, r->page_size, r->bus_addr);
707 return result;
708}
709
520/** 710/**
521 * dma_region_free - Free a device dma region. 711 * dma_region_free - Free a device dma region.
522 * @r: Pointer to a struct ps3_dma_region. 712 * @r: Pointer to a struct ps3_dma_region.
@@ -525,31 +715,62 @@ static int dma_region_create(struct ps3_dma_region* r)
525 * will make the HV call to free the region. 715 * will make the HV call to free the region.
526 */ 716 */
527 717
528static int dma_region_free(struct ps3_dma_region* r) 718static int dma_sb_region_free(struct ps3_dma_region *r)
529{ 719{
530 int result; 720 int result;
531 struct dma_chunk *c; 721 struct dma_chunk *c;
532 struct dma_chunk *tmp; 722 struct dma_chunk *tmp;
533 723
724 BUG_ON(!r);
725
726 if (!r->dev->bus_id) {
727 pr_info("%s:%d: %u:%u no dma\n", __func__, __LINE__,
728 r->dev->bus_id, r->dev->dev_id);
729 return 0;
730 }
731
534 list_for_each_entry_safe(c, tmp, &r->chunk_list.head, link) { 732 list_for_each_entry_safe(c, tmp, &r->chunk_list.head, link) {
535 list_del(&c->link); 733 list_del(&c->link);
536 dma_free_chunk(c); 734 dma_sb_free_chunk(c);
537 } 735 }
538 736
539 result = lv1_free_device_dma_region(r->did.bus_id, r->did.dev_id, 737 result = lv1_free_device_dma_region(r->dev->bus_id, r->dev->dev_id,
540 r->bus_addr); 738 r->bus_addr);
541 739
542 if (result) 740 if (result)
543 DBG("%s:%d: lv1_free_device_dma_region failed: %s\n", 741 DBG("%s:%d: lv1_free_device_dma_region failed: %s\n",
544 __func__, __LINE__, ps3_result(result)); 742 __func__, __LINE__, ps3_result(result));
545 743
546 r->len = r->bus_addr = 0; 744 r->bus_addr = 0;
745
746 return result;
747}
748
749static int dma_ioc0_region_free(struct ps3_dma_region *r)
750{
751 int result;
752 struct dma_chunk *c, *n;
753
754 DBG("%s: start\n", __func__);
755 list_for_each_entry_safe(c, n, &r->chunk_list.head, link) {
756 list_del(&c->link);
757 dma_ioc0_free_chunk(c);
758 }
759
760 result = lv1_release_io_segment(0, r->bus_addr);
761
762 if (result)
763 DBG("%s:%d: lv1_free_device_dma_region failed: %s\n",
764 __func__, __LINE__, ps3_result(result));
765
766 r->bus_addr = 0;
767 DBG("%s: end\n", __func__);
547 768
548 return result; 769 return result;
549} 770}
550 771
551/** 772/**
552 * dma_map_area - Map an area of memory into a device dma region. 773 * dma_sb_map_area - Map an area of memory into a device dma region.
553 * @r: Pointer to a struct ps3_dma_region. 774 * @r: Pointer to a struct ps3_dma_region.
554 * @virt_addr: Starting virtual address of the area to map. 775 * @virt_addr: Starting virtual address of the area to map.
555 * @len: Length in bytes of the area to map. 776 * @len: Length in bytes of the area to map.
@@ -559,16 +780,19 @@ static int dma_region_free(struct ps3_dma_region* r)
559 * This is the common dma mapping routine. 780 * This is the common dma mapping routine.
560 */ 781 */
561 782
562static int dma_map_area(struct ps3_dma_region *r, unsigned long virt_addr, 783static int dma_sb_map_area(struct ps3_dma_region *r, unsigned long virt_addr,
563 unsigned long len, unsigned long *bus_addr) 784 unsigned long len, unsigned long *bus_addr,
785 u64 iopte_flag)
564{ 786{
565 int result; 787 int result;
566 unsigned long flags; 788 unsigned long flags;
567 struct dma_chunk *c; 789 struct dma_chunk *c;
568 unsigned long phys_addr = is_kernel_addr(virt_addr) ? __pa(virt_addr) 790 unsigned long phys_addr = is_kernel_addr(virt_addr) ? __pa(virt_addr)
569 : virt_addr; 791 : virt_addr;
570 792 unsigned long aligned_phys = _ALIGN_DOWN(phys_addr, 1 << r->page_size);
571 *bus_addr = dma_lpar_to_bus(r, ps3_mm_phys_to_lpar(phys_addr)); 793 unsigned long aligned_len = _ALIGN_UP(len + phys_addr - aligned_phys,
794 1 << r->page_size);
795 *bus_addr = dma_sb_lpar_to_bus(r, ps3_mm_phys_to_lpar(phys_addr));
572 796
573 if (!USE_DYNAMIC_DMA) { 797 if (!USE_DYNAMIC_DMA) {
574 unsigned long lpar_addr = ps3_mm_phys_to_lpar(phys_addr); 798 unsigned long lpar_addr = ps3_mm_phys_to_lpar(phys_addr);
@@ -588,17 +812,18 @@ static int dma_map_area(struct ps3_dma_region *r, unsigned long virt_addr,
588 c = dma_find_chunk(r, *bus_addr, len); 812 c = dma_find_chunk(r, *bus_addr, len);
589 813
590 if (c) { 814 if (c) {
815 DBG("%s:%d: reusing mapped chunk", __func__, __LINE__);
816 dma_dump_chunk(c);
591 c->usage_count++; 817 c->usage_count++;
592 spin_unlock_irqrestore(&r->chunk_list.lock, flags); 818 spin_unlock_irqrestore(&r->chunk_list.lock, flags);
593 return 0; 819 return 0;
594 } 820 }
595 821
596 result = dma_map_pages(r, _ALIGN_DOWN(phys_addr, 1 << r->page_size), 822 result = dma_sb_map_pages(r, aligned_phys, aligned_len, &c, iopte_flag);
597 _ALIGN_UP(len, 1 << r->page_size), &c);
598 823
599 if (result) { 824 if (result) {
600 *bus_addr = 0; 825 *bus_addr = 0;
601 DBG("%s:%d: dma_map_pages failed (%d)\n", 826 DBG("%s:%d: dma_sb_map_pages failed (%d)\n",
602 __func__, __LINE__, result); 827 __func__, __LINE__, result);
603 spin_unlock_irqrestore(&r->chunk_list.lock, flags); 828 spin_unlock_irqrestore(&r->chunk_list.lock, flags);
604 return result; 829 return result;
@@ -610,8 +835,57 @@ static int dma_map_area(struct ps3_dma_region *r, unsigned long virt_addr,
610 return result; 835 return result;
611} 836}
612 837
838static int dma_ioc0_map_area(struct ps3_dma_region *r, unsigned long virt_addr,
839 unsigned long len, unsigned long *bus_addr,
840 u64 iopte_flag)
841{
842 int result;
843 unsigned long flags;
844 struct dma_chunk *c;
845 unsigned long phys_addr = is_kernel_addr(virt_addr) ? __pa(virt_addr)
846 : virt_addr;
847 unsigned long aligned_phys = _ALIGN_DOWN(phys_addr, 1 << r->page_size);
848 unsigned long aligned_len = _ALIGN_UP(len + phys_addr - aligned_phys,
849 1 << r->page_size);
850
851 DBG(KERN_ERR "%s: vaddr=%#lx, len=%#lx\n", __func__,
852 virt_addr, len);
853 DBG(KERN_ERR "%s: ph=%#lx a_ph=%#lx a_l=%#lx\n", __func__,
854 phys_addr, aligned_phys, aligned_len);
855
856 spin_lock_irqsave(&r->chunk_list.lock, flags);
857 c = dma_find_chunk_lpar(r, ps3_mm_phys_to_lpar(phys_addr), len);
858
859 if (c) {
860 /* FIXME */
861 BUG();
862 *bus_addr = c->bus_addr + phys_addr - aligned_phys;
863 c->usage_count++;
864 spin_unlock_irqrestore(&r->chunk_list.lock, flags);
865 return 0;
866 }
867
868 result = dma_ioc0_map_pages(r, aligned_phys, aligned_len, &c,
869 iopte_flag);
870
871 if (result) {
872 *bus_addr = 0;
873 DBG("%s:%d: dma_ioc0_map_pages failed (%d)\n",
874 __func__, __LINE__, result);
875 spin_unlock_irqrestore(&r->chunk_list.lock, flags);
876 return result;
877 }
878 *bus_addr = c->bus_addr + phys_addr - aligned_phys;
879 DBG("%s: va=%#lx pa=%#lx a_pa=%#lx bus=%#lx\n", __func__,
880 virt_addr, phys_addr, aligned_phys, *bus_addr);
881 c->usage_count = 1;
882
883 spin_unlock_irqrestore(&r->chunk_list.lock, flags);
884 return result;
885}
886
613/** 887/**
614 * dma_unmap_area - Unmap an area of memory from a device dma region. 888 * dma_sb_unmap_area - Unmap an area of memory from a device dma region.
615 * @r: Pointer to a struct ps3_dma_region. 889 * @r: Pointer to a struct ps3_dma_region.
616 * @bus_addr: The starting ioc bus address of the area to unmap. 890 * @bus_addr: The starting ioc bus address of the area to unmap.
617 * @len: Length in bytes of the area to unmap. 891 * @len: Length in bytes of the area to unmap.
@@ -619,7 +893,7 @@ static int dma_map_area(struct ps3_dma_region *r, unsigned long virt_addr,
619 * This is the common dma unmap routine. 893 * This is the common dma unmap routine.
620 */ 894 */
621 895
622int dma_unmap_area(struct ps3_dma_region *r, unsigned long bus_addr, 896static int dma_sb_unmap_area(struct ps3_dma_region *r, unsigned long bus_addr,
623 unsigned long len) 897 unsigned long len)
624{ 898{
625 unsigned long flags; 899 unsigned long flags;
@@ -631,7 +905,8 @@ int dma_unmap_area(struct ps3_dma_region *r, unsigned long bus_addr,
631 if (!c) { 905 if (!c) {
632 unsigned long aligned_bus = _ALIGN_DOWN(bus_addr, 906 unsigned long aligned_bus = _ALIGN_DOWN(bus_addr,
633 1 << r->page_size); 907 1 << r->page_size);
634 unsigned long aligned_len = _ALIGN_UP(len, 1 << r->page_size); 908 unsigned long aligned_len = _ALIGN_UP(len + bus_addr
909 - aligned_bus, 1 << r->page_size);
635 DBG("%s:%d: not found: bus_addr %lxh\n", 910 DBG("%s:%d: not found: bus_addr %lxh\n",
636 __func__, __LINE__, bus_addr); 911 __func__, __LINE__, bus_addr);
637 DBG("%s:%d: not found: len %lxh\n", 912 DBG("%s:%d: not found: len %lxh\n",
@@ -647,94 +922,166 @@ int dma_unmap_area(struct ps3_dma_region *r, unsigned long bus_addr,
647 922
648 if (!c->usage_count) { 923 if (!c->usage_count) {
649 list_del(&c->link); 924 list_del(&c->link);
650 dma_free_chunk(c); 925 dma_sb_free_chunk(c);
651 } 926 }
652 927
653 spin_unlock_irqrestore(&r->chunk_list.lock, flags); 928 spin_unlock_irqrestore(&r->chunk_list.lock, flags);
654 return 0; 929 return 0;
655} 930}
656 931
932static int dma_ioc0_unmap_area(struct ps3_dma_region *r,
933 unsigned long bus_addr, unsigned long len)
934{
935 unsigned long flags;
936 struct dma_chunk *c;
937
938 DBG("%s: start a=%#lx l=%#lx\n", __func__, bus_addr, len);
939 spin_lock_irqsave(&r->chunk_list.lock, flags);
940 c = dma_find_chunk(r, bus_addr, len);
941
942 if (!c) {
943 unsigned long aligned_bus = _ALIGN_DOWN(bus_addr,
944 1 << r->page_size);
945 unsigned long aligned_len = _ALIGN_UP(len + bus_addr
946 - aligned_bus,
947 1 << r->page_size);
948 DBG("%s:%d: not found: bus_addr %lxh\n",
949 __func__, __LINE__, bus_addr);
950 DBG("%s:%d: not found: len %lxh\n",
951 __func__, __LINE__, len);
952 DBG("%s:%d: not found: aligned_bus %lxh\n",
953 __func__, __LINE__, aligned_bus);
954 DBG("%s:%d: not found: aligned_len %lxh\n",
955 __func__, __LINE__, aligned_len);
956 BUG();
957 }
958
959 c->usage_count--;
960
961 if (!c->usage_count) {
962 list_del(&c->link);
963 dma_ioc0_free_chunk(c);
964 }
965
966 spin_unlock_irqrestore(&r->chunk_list.lock, flags);
967 DBG("%s: end\n", __func__);
968 return 0;
969}
970
657/** 971/**
658 * dma_region_create_linear - Setup a linear dma maping for a device. 972 * dma_sb_region_create_linear - Setup a linear dma mapping for a device.
659 * @r: Pointer to a struct ps3_dma_region. 973 * @r: Pointer to a struct ps3_dma_region.
660 * 974 *
661 * This routine creates an HV dma region for the device and maps all available 975 * This routine creates an HV dma region for the device and maps all available
662 * ram into the io controller bus address space. 976 * ram into the io controller bus address space.
663 */ 977 */
664 978
665static int dma_region_create_linear(struct ps3_dma_region *r) 979static int dma_sb_region_create_linear(struct ps3_dma_region *r)
666{ 980{
667 int result; 981 int result;
668 unsigned long tmp; 982 unsigned long virt_addr, len, tmp;
669 983
670 /* force 16M dma pages for linear mapping */ 984 if (r->len > 16*1024*1024) { /* FIXME: need proper fix */
671 985 /* force 16M dma pages for linear mapping */
672 if (r->page_size != PS3_DMA_16M) { 986 if (r->page_size != PS3_DMA_16M) {
673 pr_info("%s:%d: forcing 16M pages for linear map\n", 987 pr_info("%s:%d: forcing 16M pages for linear map\n",
674 __func__, __LINE__); 988 __func__, __LINE__);
675 r->page_size = PS3_DMA_16M; 989 r->page_size = PS3_DMA_16M;
990 r->len = _ALIGN_UP(r->len, 1 << r->page_size);
991 }
676 } 992 }
677 993
678 result = dma_region_create(r); 994 result = dma_sb_region_create(r);
679 BUG_ON(result); 995 BUG_ON(result);
680 996
681 result = dma_map_area(r, map.rm.base, map.rm.size, &tmp); 997 if (r->offset < map.rm.size) {
682 BUG_ON(result); 998 /* Map (part of) 1st RAM chunk */
683 999 virt_addr = map.rm.base + r->offset;
684 if (USE_LPAR_ADDR) 1000 len = map.rm.size - r->offset;
685 result = dma_map_area(r, map.r1.base, map.r1.size, 1001 if (len > r->len)
686 &tmp); 1002 len = r->len;
687 else 1003 result = dma_sb_map_area(r, virt_addr, len, &tmp,
688 result = dma_map_area(r, map.rm.size, map.r1.size, 1004 IOPTE_PP_W | IOPTE_PP_R | IOPTE_SO_RW | IOPTE_M);
689 &tmp); 1005 BUG_ON(result);
1006 }
690 1007
691 BUG_ON(result); 1008 if (r->offset + r->len > map.rm.size) {
1009 /* Map (part of) 2nd RAM chunk */
1010 virt_addr = USE_LPAR_ADDR ? map.r1.base : map.rm.size;
1011 len = r->len;
1012 if (r->offset >= map.rm.size)
1013 virt_addr += r->offset - map.rm.size;
1014 else
1015 len -= map.rm.size - r->offset;
1016 result = dma_sb_map_area(r, virt_addr, len, &tmp,
1017 IOPTE_PP_W | IOPTE_PP_R | IOPTE_SO_RW | IOPTE_M);
1018 BUG_ON(result);
1019 }
692 1020
693 return result; 1021 return result;
694} 1022}
695 1023
696/** 1024/**
697 * dma_region_free_linear - Free a linear dma mapping for a device. 1025 * dma_sb_region_free_linear - Free a linear dma mapping for a device.
698 * @r: Pointer to a struct ps3_dma_region. 1026 * @r: Pointer to a struct ps3_dma_region.
699 * 1027 *
700 * This routine will unmap all mapped areas and free the HV dma region. 1028 * This routine will unmap all mapped areas and free the HV dma region.
701 */ 1029 */
702 1030
703static int dma_region_free_linear(struct ps3_dma_region *r) 1031static int dma_sb_region_free_linear(struct ps3_dma_region *r)
704{ 1032{
705 int result; 1033 int result;
1034 unsigned long bus_addr, len, lpar_addr;
1035
1036 if (r->offset < map.rm.size) {
1037 /* Unmap (part of) 1st RAM chunk */
1038 lpar_addr = map.rm.base + r->offset;
1039 len = map.rm.size - r->offset;
1040 if (len > r->len)
1041 len = r->len;
1042 bus_addr = dma_sb_lpar_to_bus(r, lpar_addr);
1043 result = dma_sb_unmap_area(r, bus_addr, len);
1044 BUG_ON(result);
1045 }
706 1046
707 result = dma_unmap_area(r, dma_lpar_to_bus(r, 0), map.rm.size); 1047 if (r->offset + r->len > map.rm.size) {
708 BUG_ON(result); 1048 /* Unmap (part of) 2nd RAM chunk */
709 1049 lpar_addr = map.r1.base;
710 result = dma_unmap_area(r, dma_lpar_to_bus(r, map.r1.base), 1050 len = r->len;
711 map.r1.size); 1051 if (r->offset >= map.rm.size)
712 BUG_ON(result); 1052 lpar_addr += r->offset - map.rm.size;
1053 else
1054 len -= map.rm.size - r->offset;
1055 bus_addr = dma_sb_lpar_to_bus(r, lpar_addr);
1056 result = dma_sb_unmap_area(r, bus_addr, len);
1057 BUG_ON(result);
1058 }
713 1059
714 result = dma_region_free(r); 1060 result = dma_sb_region_free(r);
715 BUG_ON(result); 1061 BUG_ON(result);
716 1062
717 return result; 1063 return result;
718} 1064}
719 1065
720/** 1066/**
721 * dma_map_area_linear - Map an area of memory into a device dma region. 1067 * dma_sb_map_area_linear - Map an area of memory into a device dma region.
722 * @r: Pointer to a struct ps3_dma_region. 1068 * @r: Pointer to a struct ps3_dma_region.
723 * @virt_addr: Starting virtual address of the area to map. 1069 * @virt_addr: Starting virtual address of the area to map.
724 * @len: Length in bytes of the area to map. 1070 * @len: Length in bytes of the area to map.
725 * @bus_addr: A pointer to return the starting ioc bus address of the area to 1071 * @bus_addr: A pointer to return the starting ioc bus address of the area to
726 * map. 1072 * map.
727 * 1073 *
728 * This routine just returns the coresponding bus address. Actual mapping 1074 * This routine just returns the corresponding bus address. Actual mapping
729 * occurs in dma_region_create_linear(). 1075 * occurs in dma_region_create_linear().
730 */ 1076 */
731 1077
732static int dma_map_area_linear(struct ps3_dma_region *r, 1078static int dma_sb_map_area_linear(struct ps3_dma_region *r,
733 unsigned long virt_addr, unsigned long len, unsigned long *bus_addr) 1079 unsigned long virt_addr, unsigned long len, unsigned long *bus_addr,
1080 u64 iopte_flag)
734{ 1081{
735 unsigned long phys_addr = is_kernel_addr(virt_addr) ? __pa(virt_addr) 1082 unsigned long phys_addr = is_kernel_addr(virt_addr) ? __pa(virt_addr)
736 : virt_addr; 1083 : virt_addr;
737 *bus_addr = dma_lpar_to_bus(r, ps3_mm_phys_to_lpar(phys_addr)); 1084 *bus_addr = dma_sb_lpar_to_bus(r, ps3_mm_phys_to_lpar(phys_addr));
738 return 0; 1085 return 0;
739} 1086}
740 1087
@@ -744,42 +1091,98 @@ static int dma_map_area_linear(struct ps3_dma_region *r,
744 * @bus_addr: The starting ioc bus address of the area to unmap. 1091 * @bus_addr: The starting ioc bus address of the area to unmap.
745 * @len: Length in bytes of the area to unmap. 1092 * @len: Length in bytes of the area to unmap.
746 * 1093 *
747 * This routine does nothing. Unmapping occurs in dma_region_free_linear(). 1094 * This routine does nothing. Unmapping occurs in dma_sb_region_free_linear().
748 */ 1095 */
749 1096
750static int dma_unmap_area_linear(struct ps3_dma_region *r, 1097static int dma_sb_unmap_area_linear(struct ps3_dma_region *r,
751 unsigned long bus_addr, unsigned long len) 1098 unsigned long bus_addr, unsigned long len)
752{ 1099{
753 return 0; 1100 return 0;
1101};
1102
1103static const struct ps3_dma_region_ops ps3_dma_sb_region_ops = {
1104 .create = dma_sb_region_create,
1105 .free = dma_sb_region_free,
1106 .map = dma_sb_map_area,
1107 .unmap = dma_sb_unmap_area
1108};
1109
1110static const struct ps3_dma_region_ops ps3_dma_sb_region_linear_ops = {
1111 .create = dma_sb_region_create_linear,
1112 .free = dma_sb_region_free_linear,
1113 .map = dma_sb_map_area_linear,
1114 .unmap = dma_sb_unmap_area_linear
1115};
1116
1117static const struct ps3_dma_region_ops ps3_dma_ioc0_region_ops = {
1118 .create = dma_ioc0_region_create,
1119 .free = dma_ioc0_region_free,
1120 .map = dma_ioc0_map_area,
1121 .unmap = dma_ioc0_unmap_area
1122};
1123
1124int ps3_dma_region_init(struct ps3_system_bus_device *dev,
1125 struct ps3_dma_region *r, enum ps3_dma_page_size page_size,
1126 enum ps3_dma_region_type region_type, void *addr, unsigned long len)
1127{
1128 unsigned long lpar_addr;
1129
1130 lpar_addr = addr ? ps3_mm_phys_to_lpar(__pa(addr)) : 0;
1131
1132 r->dev = dev;
1133 r->page_size = page_size;
1134 r->region_type = region_type;
1135 r->offset = lpar_addr;
1136 if (r->offset >= map.rm.size)
1137 r->offset -= map.r1.offset;
1138 r->len = len ? len : _ALIGN_UP(map.total, 1 << r->page_size);
1139
1140 switch (dev->dev_type) {
1141 case PS3_DEVICE_TYPE_SB:
1142 r->region_ops = (USE_DYNAMIC_DMA)
1143 ? &ps3_dma_sb_region_ops
1144 : &ps3_dma_sb_region_linear_ops;
1145 break;
1146 case PS3_DEVICE_TYPE_IOC0:
1147 r->region_ops = &ps3_dma_ioc0_region_ops;
1148 break;
1149 default:
1150 BUG();
1151 return -EINVAL;
1152 }
1153 return 0;
754} 1154}
1155EXPORT_SYMBOL(ps3_dma_region_init);
755 1156
756int ps3_dma_region_create(struct ps3_dma_region *r) 1157int ps3_dma_region_create(struct ps3_dma_region *r)
757{ 1158{
758 return (USE_DYNAMIC_DMA) 1159 BUG_ON(!r);
759 ? dma_region_create(r) 1160 BUG_ON(!r->region_ops);
760 : dma_region_create_linear(r); 1161 BUG_ON(!r->region_ops->create);
1162 return r->region_ops->create(r);
761} 1163}
1164EXPORT_SYMBOL(ps3_dma_region_create);
762 1165
763int ps3_dma_region_free(struct ps3_dma_region *r) 1166int ps3_dma_region_free(struct ps3_dma_region *r)
764{ 1167{
765 return (USE_DYNAMIC_DMA) 1168 BUG_ON(!r);
766 ? dma_region_free(r) 1169 BUG_ON(!r->region_ops);
767 : dma_region_free_linear(r); 1170 BUG_ON(!r->region_ops->free);
1171 return r->region_ops->free(r);
768} 1172}
1173EXPORT_SYMBOL(ps3_dma_region_free);
769 1174
770int ps3_dma_map(struct ps3_dma_region *r, unsigned long virt_addr, 1175int ps3_dma_map(struct ps3_dma_region *r, unsigned long virt_addr,
771 unsigned long len, unsigned long *bus_addr) 1176 unsigned long len, unsigned long *bus_addr,
1177 u64 iopte_flag)
772{ 1178{
773 return (USE_DYNAMIC_DMA) 1179 return r->region_ops->map(r, virt_addr, len, bus_addr, iopte_flag);
774 ? dma_map_area(r, virt_addr, len, bus_addr)
775 : dma_map_area_linear(r, virt_addr, len, bus_addr);
776} 1180}
777 1181
778int ps3_dma_unmap(struct ps3_dma_region *r, unsigned long bus_addr, 1182int ps3_dma_unmap(struct ps3_dma_region *r, unsigned long bus_addr,
779 unsigned long len) 1183 unsigned long len)
780{ 1184{
781 return (USE_DYNAMIC_DMA) ? dma_unmap_area(r, bus_addr, len) 1185 return r->region_ops->unmap(r, bus_addr, len);
782 : dma_unmap_area_linear(r, bus_addr, len);
783} 1186}
784 1187
785/*============================================================================*/ 1188/*============================================================================*/
@@ -810,12 +1213,13 @@ void __init ps3_mm_init(void)
810 BUG_ON(map.rm.base); 1213 BUG_ON(map.rm.base);
811 BUG_ON(!map.rm.size); 1214 BUG_ON(!map.rm.size);
812 1215
813 lmb_add(map.rm.base, map.rm.size);
814 lmb_analyze();
815 1216
816 /* arrange to do this in ps3_mm_add_memory */ 1217 /* arrange to do this in ps3_mm_add_memory */
817 ps3_mm_region_create(&map.r1, map.total - map.rm.size); 1218 ps3_mm_region_create(&map.r1, map.total - map.rm.size);
818 1219
1220 /* correct map.total for the real total amount of memory we use */
1221 map.total = map.rm.size + map.r1.size;
1222
819 DBG(" <- %s:%d\n", __func__, __LINE__); 1223 DBG(" <- %s:%d\n", __func__, __LINE__);
820} 1224}
821 1225
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c
index 5c3da08bc0..b70e474014 100644
--- a/arch/powerpc/platforms/ps3/os-area.c
+++ b/arch/powerpc/platforms/ps3/os-area.c
@@ -133,7 +133,7 @@ struct saved_params {
133} static saved_params; 133} static saved_params;
134 134
135#define dump_header(_a) _dump_header(_a, __func__, __LINE__) 135#define dump_header(_a) _dump_header(_a, __func__, __LINE__)
136static void _dump_header(const struct os_area_header __iomem *h, const char* func, 136static void _dump_header(const struct os_area_header *h, const char *func,
137 int line) 137 int line)
138{ 138{
139 pr_debug("%s:%d: h.magic_num: '%s'\n", func, line, 139 pr_debug("%s:%d: h.magic_num: '%s'\n", func, line,
@@ -151,7 +151,7 @@ static void _dump_header(const struct os_area_header __iomem *h, const char* fun
151} 151}
152 152
153#define dump_params(_a) _dump_params(_a, __func__, __LINE__) 153#define dump_params(_a) _dump_params(_a, __func__, __LINE__)
154static void _dump_params(const struct os_area_params __iomem *p, const char* func, 154static void _dump_params(const struct os_area_params *p, const char *func,
155 int line) 155 int line)
156{ 156{
157 pr_debug("%s:%d: p.boot_flag: %u\n", func, line, p->boot_flag); 157 pr_debug("%s:%d: p.boot_flag: %u\n", func, line, p->boot_flag);
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index ca04f03305..87d52060fe 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -41,6 +41,7 @@ void ps3_mm_shutdown(void);
41/* irq */ 41/* irq */
42 42
43void ps3_init_IRQ(void); 43void ps3_init_IRQ(void);
44void ps3_shutdown_IRQ(int cpu);
44void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq); 45void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq);
45 46
46/* smp */ 47/* smp */
@@ -82,6 +83,7 @@ enum ps3_dev_type {
82 PS3_DEV_TYPE_STOR_ROM = TYPE_ROM, /* 5 */ 83 PS3_DEV_TYPE_STOR_ROM = TYPE_ROM, /* 5 */
83 PS3_DEV_TYPE_SB_GPIO = 6, 84 PS3_DEV_TYPE_SB_GPIO = 6,
84 PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC, /* 14 */ 85 PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC, /* 14 */
86 PS3_DEV_TYPE_NOACCESS = 255,
85}; 87};
86 88
87int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str, 89int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str,
@@ -129,24 +131,28 @@ int ps3_repository_read_dev_reg(unsigned int bus_index,
129/* repository bus enumerators */ 131/* repository bus enumerators */
130 132
131struct ps3_repository_device { 133struct ps3_repository_device {
134 enum ps3_bus_type bus_type;
132 unsigned int bus_index; 135 unsigned int bus_index;
136 unsigned int bus_id;
137 enum ps3_dev_type dev_type;
133 unsigned int dev_index; 138 unsigned int dev_index;
134 struct ps3_device_id did; 139 unsigned int dev_id;
135}; 140};
136 141
137int ps3_repository_find_device(enum ps3_bus_type bus_type, 142static inline struct ps3_repository_device *ps3_repository_bump_device(
138 enum ps3_dev_type dev_type, 143 struct ps3_repository_device *repo)
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{ 144{
145 return ps3_repository_find_device(bus_type, dev_type, NULL, dev); 145 repo->dev_index++;
146 return repo;
146} 147}
147int ps3_repository_find_interrupt(const struct ps3_repository_device *dev, 148int ps3_repository_find_device(struct ps3_repository_device *repo);
149int ps3_repository_find_devices(enum ps3_bus_type bus_type,
150 int (*callback)(const struct ps3_repository_device *repo));
151int ps3_repository_find_bus(enum ps3_bus_type bus_type, unsigned int from,
152 unsigned int *bus_index);
153int ps3_repository_find_interrupt(const struct ps3_repository_device *repo,
148 enum ps3_interrupt_type intr_type, unsigned int *interrupt_id); 154 enum ps3_interrupt_type intr_type, unsigned int *interrupt_id);
149int ps3_repository_find_reg(const struct ps3_repository_device *dev, 155int ps3_repository_find_reg(const struct ps3_repository_device *repo,
150 enum ps3_reg_type reg_type, u64 *bus_addr, u64 *len); 156 enum ps3_reg_type reg_type, u64 *bus_addr, u64 *len);
151 157
152/* repository block device info */ 158/* repository block device info */
@@ -216,4 +222,19 @@ int ps3_repository_read_num_spu_resource_id(unsigned int *num_resource_id);
216int ps3_repository_read_spu_resource_id(unsigned int res_index, 222int ps3_repository_read_spu_resource_id(unsigned int res_index,
217 enum ps3_spu_resource_type* resource_type, unsigned int *resource_id); 223 enum ps3_spu_resource_type* resource_type, unsigned int *resource_id);
218 224
225/* repository vuart info */
226
227int ps3_repository_read_vuart_av_port(unsigned int *port);
228int ps3_repository_read_vuart_sysmgr_port(unsigned int *port);
229
230/* Page table entries */
231#define IOPTE_PP_W 0x8000000000000000ul /* protection: write */
232#define IOPTE_PP_R 0x4000000000000000ul /* protection: read */
233#define IOPTE_M 0x2000000000000000ul /* coherency required */
234#define IOPTE_SO_R 0x1000000000000000ul /* ordering: writes */
235#define IOPTE_SO_RW 0x1800000000000000ul /* ordering: r & w */
236#define IOPTE_RPN_Mask 0x07fffffffffff000ul /* RPN */
237#define IOPTE_H 0x0000000000000800ul /* cache hint */
238#define IOPTE_IOID_Mask 0x00000000000007fful /* ioid */
239
219#endif 240#endif
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c
index ae586a0e5d..8cc37cfea0 100644
--- a/arch/powerpc/platforms/ps3/repository.c
+++ b/arch/powerpc/platforms/ps3/repository.c
@@ -138,7 +138,7 @@ static int read_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4,
138 pr_debug("%s:%d: lv1_get_repository_node_value failed: %s\n", 138 pr_debug("%s:%d: lv1_get_repository_node_value failed: %s\n",
139 __func__, __LINE__, ps3_result(result)); 139 __func__, __LINE__, ps3_result(result));
140 dump_node_name(lpar_id, n1, n2, n3, n4); 140 dump_node_name(lpar_id, n1, n2, n3, n4);
141 return result; 141 return -ENOENT;
142 } 142 }
143 143
144 dump_node(lpar_id, n1, n2, n3, n4, v1, v2); 144 dump_node(lpar_id, n1, n2, n3, n4, v1, v2);
@@ -155,7 +155,7 @@ static int read_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4,
155 pr_debug("%s:%d: warning: discarding non-zero v2: %016lx\n", 155 pr_debug("%s:%d: warning: discarding non-zero v2: %016lx\n",
156 __func__, __LINE__, v2); 156 __func__, __LINE__, v2);
157 157
158 return result; 158 return 0;
159} 159}
160 160
161int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str, 161int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str,
@@ -314,324 +314,140 @@ int ps3_repository_read_dev_reg(unsigned int bus_index,
314 reg_index, bus_addr, len); 314 reg_index, bus_addr, len);
315} 315}
316 316
317#if defined(DEBUG)
318int ps3_repository_dump_resource_info(unsigned int bus_index,
319 unsigned int dev_index)
320{
321 int result = 0;
322 unsigned int res_index;
323 317
324 pr_debug(" -> %s:%d: (%u:%u)\n", __func__, __LINE__,
325 bus_index, dev_index);
326 318
327 for (res_index = 0; res_index < 10; res_index++) { 319int ps3_repository_find_device(struct ps3_repository_device *repo)
328 enum ps3_interrupt_type intr_type; 320{
329 unsigned int interrupt_id; 321 int result;
322 struct ps3_repository_device tmp = *repo;
323 unsigned int num_dev;
330 324
331 result = ps3_repository_read_dev_intr(bus_index, dev_index, 325 BUG_ON(repo->bus_index > 10);
332 res_index, &intr_type, &interrupt_id); 326 BUG_ON(repo->dev_index > 10);
333 327
334 if (result) { 328 result = ps3_repository_read_bus_num_dev(tmp.bus_index, &num_dev);
335 if (result != LV1_NO_ENTRY)
336 pr_debug("%s:%d ps3_repository_read_dev_intr"
337 " (%u:%u) failed\n", __func__, __LINE__,
338 bus_index, dev_index);
339 break;
340 }
341 329
342 pr_debug("%s:%d (%u:%u) intr_type %u, interrupt_id %u\n", 330 if (result) {
343 __func__, __LINE__, bus_index, dev_index, intr_type, 331 pr_debug("%s:%d read_bus_num_dev failed\n", __func__, __LINE__);
344 interrupt_id); 332 return result;
345 } 333 }
346 334
347 for (res_index = 0; res_index < 10; res_index++) { 335 pr_debug("%s:%d: bus_type %u, bus_index %u, bus_id %u, num_dev %u\n",
348 enum ps3_reg_type reg_type; 336 __func__, __LINE__, tmp.bus_type, tmp.bus_index, tmp.bus_id,
349 u64 bus_addr; 337 num_dev);
350 u64 len;
351
352 result = ps3_repository_read_dev_reg(bus_index, dev_index,
353 res_index, &reg_type, &bus_addr, &len);
354 338
355 if (result) { 339 if (tmp.dev_index >= num_dev) {
356 if (result != LV1_NO_ENTRY) 340 pr_debug("%s:%d: no device found\n", __func__, __LINE__);
357 pr_debug("%s:%d ps3_repository_read_dev_reg" 341 return -ENODEV;
358 " (%u:%u) failed\n", __func__, __LINE__,
359 bus_index, dev_index);
360 break;
361 }
362
363 pr_debug("%s:%d (%u:%u) reg_type %u, bus_addr %lxh, len %lxh\n",
364 __func__, __LINE__, bus_index, dev_index, reg_type,
365 bus_addr, len);
366 } 342 }
367 343
368 pr_debug(" <- %s:%d\n", __func__, __LINE__); 344 result = ps3_repository_read_dev_type(tmp.bus_index, tmp.dev_index,
369 return result; 345 &tmp.dev_type);
370}
371
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 346
381 result = ps3_repository_read_stor_dev_info(bus_index, dev_index, &port,
382 &blk_size, &num_blocks, &num_regions);
383 if (result) { 347 if (result) {
384 pr_debug("%s:%d ps3_repository_read_stor_dev_info" 348 pr_debug("%s:%d read_dev_type failed\n", __func__, __LINE__);
385 " (%u:%u) failed\n", __func__, __LINE__, 349 return result;
386 bus_index, dev_index);
387 goto out;
388 } 350 }
389 351
390 pr_debug("%s:%d (%u:%u): port %lu, blk_size %lu, num_blocks " 352 result = ps3_repository_read_dev_id(tmp.bus_index, tmp.dev_index,
391 "%lu, num_regions %u\n", 353 &tmp.dev_id);
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 354
409 pr_debug("%s:%d (%u:%u) region_id %u, start %lxh, size %lxh\n", 355 if (result) {
410 __func__, __LINE__, bus_index, dev_index, region_id, 356 pr_debug("%s:%d ps3_repository_read_dev_id failed\n", __func__,
411 region_start, region_size); 357 __LINE__);
358 return result;
412 } 359 }
413 360
414out: 361 pr_debug("%s:%d: found: dev_type %u, dev_index %u, dev_id %u\n",
415 pr_debug(" <- %s:%d\n", __func__, __LINE__); 362 __func__, __LINE__, tmp.dev_type, tmp.dev_index, tmp.dev_id);
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)
421{
422 int result = 0;
423 unsigned int dev_index;
424
425 pr_debug(" -> %s:%d: bus_%u\n", __func__, __LINE__, bus_index);
426
427 for (dev_index = 0; dev_index < num_dev; dev_index++) {
428 enum ps3_dev_type dev_type;
429 unsigned int dev_id;
430
431 result = ps3_repository_read_dev_type(bus_index, dev_index,
432 &dev_type);
433
434 if (result) {
435 pr_debug("%s:%d ps3_repository_read_dev_type"
436 " (%u:%u) failed\n", __func__, __LINE__,
437 bus_index, dev_index);
438 break;
439 }
440
441 result = ps3_repository_read_dev_id(bus_index, dev_index,
442 &dev_id);
443
444 if (result) {
445 pr_debug("%s:%d ps3_repository_read_dev_id"
446 " (%u:%u) failed\n", __func__, __LINE__,
447 bus_index, dev_index);
448 continue;
449 }
450 363
451 pr_debug("%s:%d (%u:%u): dev_type %u, dev_id %u\n", __func__, 364 *repo = tmp;
452 __LINE__, bus_index, dev_index, dev_type, dev_id); 365 return 0;
453
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);
458 }
459
460 pr_debug(" <- %s:%d\n", __func__, __LINE__);
461 return result;
462} 366}
463 367
464int ps3_repository_dump_bus_info(void) 368int __devinit ps3_repository_find_devices(enum ps3_bus_type bus_type,
369 int (*callback)(const struct ps3_repository_device *repo))
465{ 370{
466 int result = 0; 371 int result = 0;
467 unsigned int bus_index; 372 struct ps3_repository_device repo;
468 373
469 pr_debug(" -> %s:%d\n", __func__, __LINE__); 374 pr_debug(" -> %s:%d: find bus_type %u\n", __func__, __LINE__, bus_type);
470 375
471 for (bus_index = 0; bus_index < 10; bus_index++) { 376 for (repo.bus_index = 0; repo.bus_index < 10; repo.bus_index++) {
472 enum ps3_bus_type bus_type;
473 unsigned int bus_id;
474 unsigned int num_dev;
475 377
476 result = ps3_repository_read_bus_type(bus_index, &bus_type); 378 result = ps3_repository_read_bus_type(repo.bus_index,
379 &repo.bus_type);
477 380
478 if (result) { 381 if (result) {
479 pr_debug("%s:%d read_bus_type(%u) failed\n", 382 pr_debug("%s:%d read_bus_type(%u) failed\n",
480 __func__, __LINE__, bus_index); 383 __func__, __LINE__, repo.bus_index);
481 break; 384 break;
482 } 385 }
483 386
484 result = ps3_repository_read_bus_id(bus_index, &bus_id); 387 if (repo.bus_type != bus_type) {
485 388 pr_debug("%s:%d: skip, bus_type %u\n", __func__,
486 if (result) { 389 __LINE__, repo.bus_type);
487 pr_debug("%s:%d read_bus_id(%u) failed\n",
488 __func__, __LINE__, bus_index);
489 continue; 390 continue;
490 } 391 }
491 392
492 if (bus_index != bus_id) 393 result = ps3_repository_read_bus_id(repo.bus_index,
493 pr_debug("%s:%d bus_index != bus_id\n", 394 &repo.bus_id);
494 __func__, __LINE__);
495
496 result = ps3_repository_read_bus_num_dev(bus_index, &num_dev);
497 395
498 if (result) { 396 if (result) {
499 pr_debug("%s:%d read_bus_num_dev(%u) failed\n", 397 pr_debug("%s:%d read_bus_id(%u) failed\n",
500 __func__, __LINE__, bus_index); 398 __func__, __LINE__, repo.bus_index);
501 continue; 399 continue;
502 } 400 }
503 401
504 pr_debug("%s:%d bus_%u: bus_type %u, bus_id %u, num_dev %u\n", 402 for (repo.dev_index = 0; ; repo.dev_index++) {
505 __func__, __LINE__, bus_index, bus_type, bus_id, 403 result = ps3_repository_find_device(&repo);
506 num_dev);
507 404
508 dump_device_info(bus_index, bus_type, num_dev); 405 if (result == -ENODEV) {
509 } 406 result = 0;
407 break;
408 } else if (result)
409 break;
510 410
511 pr_debug(" <- %s:%d\n", __func__, __LINE__); 411 result = callback(&repo);
512 return result;
513}
514#endif /* defined(DEBUG) */
515
516static int find_device(unsigned int bus_index, unsigned int num_dev,
517 unsigned int start_dev_index, enum ps3_dev_type dev_type,
518 struct ps3_repository_device *dev)
519{
520 int result = 0;
521 unsigned int dev_index;
522 412
523 pr_debug("%s:%d: find dev_type %u\n", __func__, __LINE__, dev_type); 413 if (result) {
524 414 pr_debug("%s:%d: abort at callback\n", __func__,
525 dev->dev_index = UINT_MAX; 415 __LINE__);
526 416 break;
527 for (dev_index = start_dev_index; dev_index < num_dev; dev_index++) { 417 }
528 enum ps3_dev_type x;
529
530 result = ps3_repository_read_dev_type(bus_index, dev_index,
531 &x);
532
533 if (result) {
534 pr_debug("%s:%d read_dev_type failed\n",
535 __func__, __LINE__);
536 return result;
537 } 418 }
538 419 break;
539 if (x == dev_type)
540 break;
541 }
542
543 if (dev_index == num_dev)
544 return -1;
545
546 pr_debug("%s:%d: found dev_type %u at dev_index %u\n",
547 __func__, __LINE__, dev_type, dev_index);
548
549 result = ps3_repository_read_dev_id(bus_index, dev_index,
550 &dev->did.dev_id);
551
552 if (result) {
553 pr_debug("%s:%d read_dev_id failed\n",
554 __func__, __LINE__);
555 return result;
556 } 420 }
557 421
558 dev->dev_index = dev_index; 422 pr_debug(" <- %s:%d\n", __func__, __LINE__);
559
560 pr_debug("%s:%d found: dev_id %u\n", __func__, __LINE__,
561 dev->did.dev_id);
562
563 return result; 423 return result;
564} 424}
565 425
566int ps3_repository_find_device (enum ps3_bus_type bus_type, 426int ps3_repository_find_bus(enum ps3_bus_type bus_type, unsigned int from,
567 enum ps3_dev_type dev_type, 427 unsigned int *bus_index)
568 const struct ps3_repository_device *start_dev,
569 struct ps3_repository_device *dev)
570{ 428{
571 int result = 0; 429 unsigned int i;
572 unsigned int bus_index; 430 enum ps3_bus_type type;
573 unsigned int num_dev; 431 int error;
574
575 pr_debug("%s:%d: find bus_type %u, dev_type %u\n", __func__, __LINE__,
576 bus_type, dev_type);
577
578 BUG_ON(start_dev && start_dev->bus_index > 10);
579
580 for (bus_index = start_dev ? start_dev->bus_index : 0; bus_index < 10;
581 bus_index++) {
582 enum ps3_bus_type x;
583
584 result = ps3_repository_read_bus_type(bus_index, &x);
585 432
586 if (result) { 433 for (i = from; i < 10; i++) {
434 error = ps3_repository_read_bus_type(i, &type);
435 if (error) {
587 pr_debug("%s:%d read_bus_type failed\n", 436 pr_debug("%s:%d read_bus_type failed\n",
588 __func__, __LINE__); 437 __func__, __LINE__);
589 dev->bus_index = UINT_MAX; 438 *bus_index = UINT_MAX;
590 return result; 439 return error;
440 }
441 if (type == bus_type) {
442 *bus_index = i;
443 return 0;
591 } 444 }
592 if (x == bus_type)
593 break;
594 }
595
596 if (bus_index >= 10)
597 return -ENODEV;
598
599 pr_debug("%s:%d: found bus_type %u at bus_index %u\n",
600 __func__, __LINE__, bus_type, bus_index);
601
602 result = ps3_repository_read_bus_num_dev(bus_index, &num_dev);
603
604 if (result) {
605 pr_debug("%s:%d read_bus_num_dev failed\n",
606 __func__, __LINE__);
607 return result;
608 }
609
610 result = find_device(bus_index, num_dev, start_dev
611 ? start_dev->dev_index + 1 : 0, dev_type, dev);
612
613 if (result) {
614 pr_debug("%s:%d get_did failed\n", __func__, __LINE__);
615 return result;
616 }
617
618 result = ps3_repository_read_bus_id(bus_index, &dev->did.bus_id);
619
620 if (result) {
621 pr_debug("%s:%d read_bus_id failed\n",
622 __func__, __LINE__);
623 return result;
624 } 445 }
625 446 *bus_index = UINT_MAX;
626 dev->bus_index = bus_index; 447 return -ENODEV;
627
628 pr_debug("%s:%d found: bus_id %u, dev_id %u\n",
629 __func__, __LINE__, dev->did.bus_id, dev->did.dev_id);
630
631 return result;
632} 448}
633 449
634int ps3_repository_find_interrupt(const struct ps3_repository_device *dev, 450int ps3_repository_find_interrupt(const struct ps3_repository_device *repo,
635 enum ps3_interrupt_type intr_type, unsigned int *interrupt_id) 451 enum ps3_interrupt_type intr_type, unsigned int *interrupt_id)
636{ 452{
637 int result = 0; 453 int result = 0;
@@ -645,8 +461,8 @@ int ps3_repository_find_interrupt(const struct ps3_repository_device *dev,
645 enum ps3_interrupt_type t; 461 enum ps3_interrupt_type t;
646 unsigned int id; 462 unsigned int id;
647 463
648 result = ps3_repository_read_dev_intr(dev->bus_index, 464 result = ps3_repository_read_dev_intr(repo->bus_index,
649 dev->dev_index, res_index, &t, &id); 465 repo->dev_index, res_index, &t, &id);
650 466
651 if (result) { 467 if (result) {
652 pr_debug("%s:%d read_dev_intr failed\n", 468 pr_debug("%s:%d read_dev_intr failed\n",
@@ -669,7 +485,7 @@ int ps3_repository_find_interrupt(const struct ps3_repository_device *dev,
669 return result; 485 return result;
670} 486}
671 487
672int ps3_repository_find_reg(const struct ps3_repository_device *dev, 488int ps3_repository_find_reg(const struct ps3_repository_device *repo,
673 enum ps3_reg_type reg_type, u64 *bus_addr, u64 *len) 489 enum ps3_reg_type reg_type, u64 *bus_addr, u64 *len)
674{ 490{
675 int result = 0; 491 int result = 0;
@@ -684,8 +500,8 @@ int ps3_repository_find_reg(const struct ps3_repository_device *dev,
684 u64 a; 500 u64 a;
685 u64 l; 501 u64 l;
686 502
687 result = ps3_repository_read_dev_reg(dev->bus_index, 503 result = ps3_repository_read_dev_reg(repo->bus_index,
688 dev->dev_index, res_index, &t, &a, &l); 504 repo->dev_index, res_index, &t, &a, &l);
689 505
690 if (result) { 506 if (result) {
691 pr_debug("%s:%d read_dev_reg failed\n", 507 pr_debug("%s:%d read_dev_reg failed\n",
@@ -965,6 +781,36 @@ int ps3_repository_read_boot_dat_size(unsigned int *size)
965 return result; 781 return result;
966} 782}
967 783
784int ps3_repository_read_vuart_av_port(unsigned int *port)
785{
786 int result;
787 u64 v1;
788
789 result = read_node(PS3_LPAR_ID_CURRENT,
790 make_first_field("bi", 0),
791 make_field("vir_uart", 0),
792 make_field("port", 0),
793 make_field("avset", 0),
794 &v1, 0);
795 *port = v1;
796 return result;
797}
798
799int ps3_repository_read_vuart_sysmgr_port(unsigned int *port)
800{
801 int result;
802 u64 v1;
803
804 result = read_node(PS3_LPAR_ID_CURRENT,
805 make_first_field("bi", 0),
806 make_field("vir_uart", 0),
807 make_field("port", 0),
808 make_field("sysmgr", 0),
809 &v1, 0);
810 *port = v1;
811 return result;
812}
813
968/** 814/**
969 * ps3_repository_read_boot_dat_info - Get address and size of cell_ext_os_area. 815 * ps3_repository_read_boot_dat_info - Get address and size of cell_ext_os_area.
970 * address: lpar address of cell_ext_os_area 816 * address: lpar address of cell_ext_os_area
@@ -1026,3 +872,205 @@ int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq)
1026 return result ? result 872 return result ? result
1027 : ps3_repository_read_tb_freq(node_id, tb_freq); 873 : ps3_repository_read_tb_freq(node_id, tb_freq);
1028} 874}
875
876#if defined(DEBUG)
877
878int ps3_repository_dump_resource_info(const struct ps3_repository_device *repo)
879{
880 int result = 0;
881 unsigned int res_index;
882
883 pr_debug(" -> %s:%d: (%u:%u)\n", __func__, __LINE__,
884 repo->bus_index, repo->dev_index);
885
886 for (res_index = 0; res_index < 10; res_index++) {
887 enum ps3_interrupt_type intr_type;
888 unsigned int interrupt_id;
889
890 result = ps3_repository_read_dev_intr(repo->bus_index,
891 repo->dev_index, res_index, &intr_type, &interrupt_id);
892
893 if (result) {
894 if (result != LV1_NO_ENTRY)
895 pr_debug("%s:%d ps3_repository_read_dev_intr"
896 " (%u:%u) failed\n", __func__, __LINE__,
897 repo->bus_index, repo->dev_index);
898 break;
899 }
900
901 pr_debug("%s:%d (%u:%u) intr_type %u, interrupt_id %u\n",
902 __func__, __LINE__, repo->bus_index, repo->dev_index,
903 intr_type, interrupt_id);
904 }
905
906 for (res_index = 0; res_index < 10; res_index++) {
907 enum ps3_reg_type reg_type;
908 u64 bus_addr;
909 u64 len;
910
911 result = ps3_repository_read_dev_reg(repo->bus_index,
912 repo->dev_index, res_index, &reg_type, &bus_addr, &len);
913
914 if (result) {
915 if (result != LV1_NO_ENTRY)
916 pr_debug("%s:%d ps3_repository_read_dev_reg"
917 " (%u:%u) failed\n", __func__, __LINE__,
918 repo->bus_index, repo->dev_index);
919 break;
920 }
921
922 pr_debug("%s:%d (%u:%u) reg_type %u, bus_addr %lxh, len %lxh\n",
923 __func__, __LINE__, repo->bus_index, repo->dev_index,
924 reg_type, bus_addr, len);
925 }
926
927 pr_debug(" <- %s:%d\n", __func__, __LINE__);
928 return result;
929}
930
931static int dump_stor_dev_info(struct ps3_repository_device *repo)
932{
933 int result = 0;
934 unsigned int num_regions, region_index;
935 u64 port, blk_size, num_blocks;
936
937 pr_debug(" -> %s:%d: (%u:%u)\n", __func__, __LINE__,
938 repo->bus_index, repo->dev_index);
939
940 result = ps3_repository_read_stor_dev_info(repo->bus_index,
941 repo->dev_index, &port, &blk_size, &num_blocks, &num_regions);
942 if (result) {
943 pr_debug("%s:%d ps3_repository_read_stor_dev_info"
944 " (%u:%u) failed\n", __func__, __LINE__,
945 repo->bus_index, repo->dev_index);
946 goto out;
947 }
948
949 pr_debug("%s:%d (%u:%u): port %lu, blk_size %lu, num_blocks "
950 "%lu, num_regions %u\n",
951 __func__, __LINE__, repo->bus_index, repo->dev_index, port,
952 blk_size, num_blocks, num_regions);
953
954 for (region_index = 0; region_index < num_regions; region_index++) {
955 unsigned int region_id;
956 u64 region_start, region_size;
957
958 result = ps3_repository_read_stor_dev_region(repo->bus_index,
959 repo->dev_index, region_index, &region_id,
960 &region_start, &region_size);
961 if (result) {
962 pr_debug("%s:%d ps3_repository_read_stor_dev_region"
963 " (%u:%u) failed\n", __func__, __LINE__,
964 repo->bus_index, repo->dev_index);
965 break;
966 }
967
968 pr_debug("%s:%d (%u:%u) region_id %u, start %lxh, size %lxh\n",
969 __func__, __LINE__, repo->bus_index, repo->dev_index,
970 region_id, region_start, region_size);
971 }
972
973out:
974 pr_debug(" <- %s:%d\n", __func__, __LINE__);
975 return result;
976}
977
978static int dump_device_info(struct ps3_repository_device *repo,
979 unsigned int num_dev)
980{
981 int result = 0;
982
983 pr_debug(" -> %s:%d: bus_%u\n", __func__, __LINE__, repo->bus_index);
984
985 for (repo->dev_index = 0; repo->dev_index < num_dev;
986 repo->dev_index++) {
987
988 result = ps3_repository_read_dev_type(repo->bus_index,
989 repo->dev_index, &repo->dev_type);
990
991 if (result) {
992 pr_debug("%s:%d ps3_repository_read_dev_type"
993 " (%u:%u) failed\n", __func__, __LINE__,
994 repo->bus_index, repo->dev_index);
995 break;
996 }
997
998 result = ps3_repository_read_dev_id(repo->bus_index,
999 repo->dev_index, &repo->dev_id);
1000
1001 if (result) {
1002 pr_debug("%s:%d ps3_repository_read_dev_id"
1003 " (%u:%u) failed\n", __func__, __LINE__,
1004 repo->bus_index, repo->dev_index);
1005 continue;
1006 }
1007
1008 pr_debug("%s:%d (%u:%u): dev_type %u, dev_id %u\n", __func__,
1009 __LINE__, repo->bus_index, repo->dev_index,
1010 repo->dev_type, repo->dev_id);
1011
1012 ps3_repository_dump_resource_info(repo);
1013
1014 if (repo->bus_type == PS3_BUS_TYPE_STORAGE)
1015 dump_stor_dev_info(repo);
1016 }
1017
1018 pr_debug(" <- %s:%d\n", __func__, __LINE__);
1019 return result;
1020}
1021
1022int ps3_repository_dump_bus_info(void)
1023{
1024 int result = 0;
1025 struct ps3_repository_device repo;
1026
1027 pr_debug(" -> %s:%d\n", __func__, __LINE__);
1028
1029 memset(&repo, 0, sizeof(repo));
1030
1031 for (repo.bus_index = 0; repo.bus_index < 10; repo.bus_index++) {
1032 unsigned int num_dev;
1033
1034 result = ps3_repository_read_bus_type(repo.bus_index,
1035 &repo.bus_type);
1036
1037 if (result) {
1038 pr_debug("%s:%d read_bus_type(%u) failed\n",
1039 __func__, __LINE__, repo.bus_index);
1040 break;
1041 }
1042
1043 result = ps3_repository_read_bus_id(repo.bus_index,
1044 &repo.bus_id);
1045
1046 if (result) {
1047 pr_debug("%s:%d read_bus_id(%u) failed\n",
1048 __func__, __LINE__, repo.bus_index);
1049 continue;
1050 }
1051
1052 if (repo.bus_index != repo.bus_id)
1053 pr_debug("%s:%d bus_index != bus_id\n",
1054 __func__, __LINE__);
1055
1056 result = ps3_repository_read_bus_num_dev(repo.bus_index,
1057 &num_dev);
1058
1059 if (result) {
1060 pr_debug("%s:%d read_bus_num_dev(%u) failed\n",
1061 __func__, __LINE__, repo.bus_index);
1062 continue;
1063 }
1064
1065 pr_debug("%s:%d bus_%u: bus_type %u, bus_id %u, num_dev %u\n",
1066 __func__, __LINE__, repo.bus_index, repo.bus_type,
1067 repo.bus_id, num_dev);
1068
1069 dump_device_info(&repo, num_dev);
1070 }
1071
1072 pr_debug(" <- %s:%d\n", __func__, __LINE__);
1073 return result;
1074}
1075
1076#endif /* defined(DEBUG) */
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index 9353967666..aa05288de6 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -37,27 +37,35 @@
37#include "platform.h" 37#include "platform.h"
38 38
39#if defined(DEBUG) 39#if defined(DEBUG)
40#define DBG(fmt...) udbg_printf(fmt) 40#define DBG udbg_printf
41#else 41#else
42#define DBG(fmt...) do{if(0)printk(fmt);}while(0) 42#define DBG pr_debug
43#endif 43#endif
44 44
45#if !defined(CONFIG_SMP) 45#if !defined(CONFIG_SMP)
46static void smp_send_stop(void) {} 46static void smp_send_stop(void) {}
47#endif 47#endif
48 48
49int ps3_get_firmware_version(union ps3_firmware_version *v) 49static union ps3_firmware_version ps3_firmware_version;
50
51void ps3_get_firmware_version(union ps3_firmware_version *v)
50{ 52{
51 int result = lv1_get_version_info(&v->raw); 53 *v = ps3_firmware_version;
54}
55EXPORT_SYMBOL_GPL(ps3_get_firmware_version);
52 56
53 if (result) { 57int ps3_compare_firmware_version(u16 major, u16 minor, u16 rev)
54 v->raw = 0; 58{
55 return -1; 59 union ps3_firmware_version x;
56 } 60
61 x.pad = 0;
62 x.major = major;
63 x.minor = minor;
64 x.rev = rev;
57 65
58 return result; 66 return (ps3_firmware_version.raw - x.raw);
59} 67}
60EXPORT_SYMBOL_GPL(ps3_get_firmware_version); 68EXPORT_SYMBOL_GPL(ps3_compare_firmware_version);
61 69
62static void ps3_power_save(void) 70static void ps3_power_save(void)
63{ 71{
@@ -99,7 +107,8 @@ static void ps3_panic(char *str)
99 while(1); 107 while(1);
100} 108}
101 109
102#ifdef CONFIG_FB_PS3 110#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE) || \
111 defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE)
103static void prealloc(struct ps3_prealloc *p) 112static void prealloc(struct ps3_prealloc *p)
104{ 113{
105 if (!p->size) 114 if (!p->size)
@@ -115,12 +124,15 @@ static void prealloc(struct ps3_prealloc *p)
115 printk(KERN_INFO "%s: %lu bytes at %p\n", p->name, p->size, 124 printk(KERN_INFO "%s: %lu bytes at %p\n", p->name, p->size,
116 p->address); 125 p->address);
117} 126}
127#endif
118 128
129#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE)
119struct ps3_prealloc ps3fb_videomemory = { 130struct ps3_prealloc ps3fb_videomemory = {
120 .name = "ps3fb videomemory", 131 .name = "ps3fb videomemory",
121 .size = CONFIG_FB_PS3_DEFAULT_SIZE_M*1024*1024, 132 .size = CONFIG_FB_PS3_DEFAULT_SIZE_M*1024*1024,
122 .align = 1024*1024 /* the GPU requires 1 MiB alignment */ 133 .align = 1024*1024 /* the GPU requires 1 MiB alignment */
123}; 134};
135EXPORT_SYMBOL_GPL(ps3fb_videomemory);
124#define prealloc_ps3fb_videomemory() prealloc(&ps3fb_videomemory) 136#define prealloc_ps3fb_videomemory() prealloc(&ps3fb_videomemory)
125 137
126static int __init early_parse_ps3fb(char *p) 138static int __init early_parse_ps3fb(char *p)
@@ -137,6 +149,30 @@ early_param("ps3fb", early_parse_ps3fb);
137#define prealloc_ps3fb_videomemory() do { } while (0) 149#define prealloc_ps3fb_videomemory() do { } while (0)
138#endif 150#endif
139 151
152#if defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE)
153struct ps3_prealloc ps3flash_bounce_buffer = {
154 .name = "ps3flash bounce buffer",
155 .size = 256*1024,
156 .align = 256*1024
157};
158EXPORT_SYMBOL_GPL(ps3flash_bounce_buffer);
159#define prealloc_ps3flash_bounce_buffer() prealloc(&ps3flash_bounce_buffer)
160
161static int __init early_parse_ps3flash(char *p)
162{
163 if (!p)
164 return 1;
165
166 if (!strcmp(p, "off"))
167 ps3flash_bounce_buffer.size = 0;
168
169 return 0;
170}
171early_param("ps3flash", early_parse_ps3flash);
172#else
173#define prealloc_ps3flash_bounce_buffer() do { } while (0)
174#endif
175
140static int ps3_set_dabr(u64 dabr) 176static int ps3_set_dabr(u64 dabr)
141{ 177{
142 enum {DABR_USER = 1, DABR_KERNEL = 2,}; 178 enum {DABR_USER = 1, DABR_KERNEL = 2,};
@@ -146,13 +182,13 @@ static int ps3_set_dabr(u64 dabr)
146 182
147static void __init ps3_setup_arch(void) 183static void __init ps3_setup_arch(void)
148{ 184{
149 union ps3_firmware_version v;
150 185
151 DBG(" -> %s:%d\n", __func__, __LINE__); 186 DBG(" -> %s:%d\n", __func__, __LINE__);
152 187
153 ps3_get_firmware_version(&v); 188 lv1_get_version_info(&ps3_firmware_version.raw);
154 printk(KERN_INFO "PS3 firmware version %u.%u.%u\n", v.major, v.minor, 189 printk(KERN_INFO "PS3 firmware version %u.%u.%u\n",
155 v.rev); 190 ps3_firmware_version.major, ps3_firmware_version.minor,
191 ps3_firmware_version.rev);
156 192
157 ps3_spu_set_platform(); 193 ps3_spu_set_platform();
158 ps3_map_htab(); 194 ps3_map_htab();
@@ -166,6 +202,8 @@ static void __init ps3_setup_arch(void)
166#endif 202#endif
167 203
168 prealloc_ps3fb_videomemory(); 204 prealloc_ps3fb_videomemory();
205 prealloc_ps3flash_bounce_buffer();
206
169 ppc_md.power_save = ps3_power_save; 207 ppc_md.power_save = ps3_power_save;
170 208
171 DBG(" <- %s:%d\n", __func__, __LINE__); 209 DBG(" <- %s:%d\n", __func__, __LINE__);
@@ -184,7 +222,7 @@ static int __init ps3_probe(void)
184 DBG(" -> %s:%d\n", __func__, __LINE__); 222 DBG(" -> %s:%d\n", __func__, __LINE__);
185 223
186 dt_root = of_get_flat_dt_root(); 224 dt_root = of_get_flat_dt_root();
187 if (!of_flat_dt_is_compatible(dt_root, "PS3")) 225 if (!of_flat_dt_is_compatible(dt_root, "sony,ps3"))
188 return 0; 226 return 0;
189 227
190 powerpc_firmware_features |= FW_FEATURE_PS3_POSSIBLE; 228 powerpc_firmware_features |= FW_FEATURE_PS3_POSSIBLE;
@@ -201,31 +239,12 @@ static int __init ps3_probe(void)
201#if defined(CONFIG_KEXEC) 239#if defined(CONFIG_KEXEC)
202static void ps3_kexec_cpu_down(int crash_shutdown, int secondary) 240static void ps3_kexec_cpu_down(int crash_shutdown, int secondary)
203{ 241{
204 DBG(" -> %s:%d\n", __func__, __LINE__); 242 int cpu = smp_processor_id();
205
206 if (secondary) {
207 int cpu;
208 for_each_online_cpu(cpu)
209 if (cpu)
210 ps3_smp_cleanup_cpu(cpu);
211 } else
212 ps3_smp_cleanup_cpu(0);
213
214 DBG(" <- %s:%d\n", __func__, __LINE__);
215}
216
217static void ps3_machine_kexec(struct kimage *image)
218{
219 unsigned long ppe_id;
220
221 DBG(" -> %s:%d\n", __func__, __LINE__);
222 243
223 lv1_get_logical_ppe_id(&ppe_id); 244 DBG(" -> %s:%d: (%d)\n", __func__, __LINE__, cpu);
224 lv1_configure_irq_state_bitmap(ppe_id, 0, 0);
225 ps3_mm_shutdown();
226 ps3_mm_vas_destroy();
227 245
228 default_machine_kexec(image); 246 ps3_smp_cleanup_cpu(cpu);
247 ps3_shutdown_IRQ(cpu);
229 248
230 DBG(" <- %s:%d\n", __func__, __LINE__); 249 DBG(" <- %s:%d\n", __func__, __LINE__);
231} 250}
@@ -247,7 +266,7 @@ define_machine(ps3) {
247 .power_off = ps3_power_off, 266 .power_off = ps3_power_off,
248#if defined(CONFIG_KEXEC) 267#if defined(CONFIG_KEXEC)
249 .kexec_cpu_down = ps3_kexec_cpu_down, 268 .kexec_cpu_down = ps3_kexec_cpu_down,
250 .machine_kexec = ps3_machine_kexec, 269 .machine_kexec = default_machine_kexec,
251 .machine_kexec_prepare = default_machine_kexec_prepare, 270 .machine_kexec_prepare = default_machine_kexec_prepare,
252 .machine_crash_shutdown = default_machine_crash_shutdown, 271 .machine_crash_shutdown = default_machine_crash_shutdown,
253#endif 272#endif
diff --git a/arch/powerpc/platforms/ps3/smp.c b/arch/powerpc/platforms/ps3/smp.c
index 53416ec519..f0b12f2123 100644
--- a/arch/powerpc/platforms/ps3/smp.c
+++ b/arch/powerpc/platforms/ps3/smp.c
@@ -27,9 +27,9 @@
27#include "platform.h" 27#include "platform.h"
28 28
29#if defined(DEBUG) 29#if defined(DEBUG)
30#define DBG(fmt...) udbg_printf(fmt) 30#define DBG udbg_printf
31#else 31#else
32#define DBG(fmt...) do{if(0)printk(fmt);}while(0) 32#define DBG pr_debug
33#endif 33#endif
34 34
35static irqreturn_t ipi_function_handler(int irq, void *msg) 35static irqreturn_t ipi_function_handler(int irq, void *msg)
@@ -39,11 +39,11 @@ static irqreturn_t ipi_function_handler(int irq, void *msg)
39} 39}
40 40
41/** 41/**
42 * virqs - a per cpu array of virqs for ipi use 42 * ps3_ipi_virqs - a per cpu array of virqs for ipi use
43 */ 43 */
44 44
45#define MSG_COUNT 4 45#define MSG_COUNT 4
46static DEFINE_PER_CPU(unsigned int, virqs[MSG_COUNT]); 46static DEFINE_PER_CPU(unsigned int, ps3_ipi_virqs[MSG_COUNT]);
47 47
48static const char *names[MSG_COUNT] = { 48static const char *names[MSG_COUNT] = {
49 "ipi call", 49 "ipi call",
@@ -62,7 +62,7 @@ static void do_message_pass(int target, int msg)
62 return; 62 return;
63 } 63 }
64 64
65 virq = per_cpu(virqs, target)[msg]; 65 virq = per_cpu(ps3_ipi_virqs, target)[msg];
66 result = ps3_send_event_locally(virq); 66 result = ps3_send_event_locally(virq);
67 67
68 if (result) 68 if (result)
@@ -94,13 +94,13 @@ static int ps3_smp_probe(void)
94static void __init ps3_smp_setup_cpu(int cpu) 94static void __init ps3_smp_setup_cpu(int cpu)
95{ 95{
96 int result; 96 int result;
97 unsigned int *virqs = per_cpu(virqs, cpu); 97 unsigned int *virqs = per_cpu(ps3_ipi_virqs, cpu);
98 int i; 98 int i;
99 99
100 DBG(" -> %s:%d: (%d)\n", __func__, __LINE__, cpu); 100 DBG(" -> %s:%d: (%d)\n", __func__, __LINE__, cpu);
101 101
102 /* 102 /*
103 * Check assumptions on virqs[] indexing. If this 103 * Check assumptions on ps3_ipi_virqs[] indexing. If this
104 * check fails, then a different mapping of PPC_MSG_ 104 * check fails, then a different mapping of PPC_MSG_
105 * to index needs to be setup. 105 * to index needs to be setup.
106 */ 106 */
@@ -132,13 +132,13 @@ static void __init ps3_smp_setup_cpu(int cpu)
132 132
133void ps3_smp_cleanup_cpu(int cpu) 133void ps3_smp_cleanup_cpu(int cpu)
134{ 134{
135 unsigned int *virqs = per_cpu(virqs, cpu); 135 unsigned int *virqs = per_cpu(ps3_ipi_virqs, cpu);
136 int i; 136 int i;
137 137
138 DBG(" -> %s:%d: (%d)\n", __func__, __LINE__, cpu); 138 DBG(" -> %s:%d: (%d)\n", __func__, __LINE__, cpu);
139 139
140 for (i = 0; i < MSG_COUNT; i++) { 140 for (i = 0; i < MSG_COUNT; i++) {
141 free_irq(virqs[i], (void*)(long)i); 141 /* Can't call free_irq from interrupt context. */
142 ps3_event_receive_port_destroy(virqs[i]); 142 ps3_event_receive_port_destroy(virqs[i]);
143 virqs[i] = NO_IRQ; 143 virqs[i] = NO_IRQ;
144 } 144 }
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c
index 651437cb2c..502d80ed98 100644
--- a/arch/powerpc/platforms/ps3/spu.c
+++ b/arch/powerpc/platforms/ps3/spu.c
@@ -182,15 +182,18 @@ static int __init setup_areas(struct spu *spu)
182{ 182{
183 struct table {char* name; unsigned long addr; unsigned long size;}; 183 struct table {char* name; unsigned long addr; unsigned long size;};
184 184
185 spu_pdata(spu)->shadow = __ioremap( 185 spu_pdata(spu)->shadow = ioremap_flags(spu_pdata(spu)->shadow_addr,
186 spu_pdata(spu)->shadow_addr, sizeof(struct spe_shadow), 186 sizeof(struct spe_shadow),
187 pgprot_val(PAGE_READONLY) | _PAGE_NO_CACHE | _PAGE_GUARDED); 187 pgprot_val(PAGE_READONLY) |
188 _PAGE_NO_CACHE);
188 if (!spu_pdata(spu)->shadow) { 189 if (!spu_pdata(spu)->shadow) {
189 pr_debug("%s:%d: ioremap shadow failed\n", __func__, __LINE__); 190 pr_debug("%s:%d: ioremap shadow failed\n", __func__, __LINE__);
190 goto fail_ioremap; 191 goto fail_ioremap;
191 } 192 }
192 193
193 spu->local_store = ioremap(spu->local_store_phys, LS_SIZE); 194 spu->local_store = (__force void *)ioremap_flags(spu->local_store_phys,
195 LS_SIZE, _PAGE_NO_CACHE);
196
194 if (!spu->local_store) { 197 if (!spu->local_store) {
195 pr_debug("%s:%d: ioremap local_store failed\n", 198 pr_debug("%s:%d: ioremap local_store failed\n",
196 __func__, __LINE__); 199 __func__, __LINE__);
@@ -199,6 +202,7 @@ static int __init setup_areas(struct spu *spu)
199 202
200 spu->problem = ioremap(spu->problem_phys, 203 spu->problem = ioremap(spu->problem_phys,
201 sizeof(struct spu_problem)); 204 sizeof(struct spu_problem));
205
202 if (!spu->problem) { 206 if (!spu->problem) {
203 pr_debug("%s:%d: ioremap problem failed\n", __func__, __LINE__); 207 pr_debug("%s:%d: ioremap problem failed\n", __func__, __LINE__);
204 goto fail_ioremap; 208 goto fail_ioremap;
@@ -206,6 +210,7 @@ static int __init setup_areas(struct spu *spu)
206 210
207 spu->priv2 = ioremap(spu_pdata(spu)->priv2_addr, 211 spu->priv2 = ioremap(spu_pdata(spu)->priv2_addr,
208 sizeof(struct spu_priv2)); 212 sizeof(struct spu_priv2));
213
209 if (!spu->priv2) { 214 if (!spu->priv2) {
210 pr_debug("%s:%d: ioremap priv2 failed\n", __func__, __LINE__); 215 pr_debug("%s:%d: ioremap priv2 failed\n", __func__, __LINE__);
211 goto fail_ioremap; 216 goto fail_ioremap;
@@ -400,11 +405,13 @@ static int __init ps3_enumerate_spus(int (*fn)(void *data))
400 } 405 }
401 } 406 }
402 407
403 if (result) 408 if (result) {
404 printk(KERN_WARNING "%s:%d: Error initializing spus\n", 409 printk(KERN_WARNING "%s:%d: Error initializing spus\n",
405 __func__, __LINE__); 410 __func__, __LINE__);
411 return result;
412 }
406 413
407 return result; 414 return num_resource_id;
408} 415}
409 416
410const struct spu_management_ops spu_management_ps3_ops = { 417const struct spu_management_ops spu_management_ps3_ops = {
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
index 6bda51027c..4bb634a17e 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -30,22 +30,228 @@
30 30
31#include "platform.h" 31#include "platform.h"
32 32
33static struct device ps3_system_bus = {
34 .bus_id = "ps3_system",
35};
36
37/* FIXME: need device usage counters! */
38struct {
39 struct mutex mutex;
40 int sb_11; /* usb 0 */
41 int sb_12; /* usb 0 */
42 int gpu;
43} static usage_hack;
44
45static int ps3_is_device(struct ps3_system_bus_device *dev,
46 unsigned int bus_id, unsigned int dev_id)
47{
48 return dev->bus_id == bus_id && dev->dev_id == dev_id;
49}
50
51static int ps3_open_hv_device_sb(struct ps3_system_bus_device *dev)
52{
53 int result;
54
55 BUG_ON(!dev->bus_id);
56 mutex_lock(&usage_hack.mutex);
57
58 if (ps3_is_device(dev, 1, 1)) {
59 usage_hack.sb_11++;
60 if (usage_hack.sb_11 > 1) {
61 result = 0;
62 goto done;
63 }
64 }
65
66 if (ps3_is_device(dev, 1, 2)) {
67 usage_hack.sb_12++;
68 if (usage_hack.sb_12 > 1) {
69 result = 0;
70 goto done;
71 }
72 }
73
74 result = lv1_open_device(dev->bus_id, dev->dev_id, 0);
75
76 if (result) {
77 pr_debug("%s:%d: lv1_open_device failed: %s\n", __func__,
78 __LINE__, ps3_result(result));
79 result = -EPERM;
80 }
81
82done:
83 mutex_unlock(&usage_hack.mutex);
84 return result;
85}
86
87static int ps3_close_hv_device_sb(struct ps3_system_bus_device *dev)
88{
89 int result;
90
91 BUG_ON(!dev->bus_id);
92 mutex_lock(&usage_hack.mutex);
93
94 if (ps3_is_device(dev, 1, 1)) {
95 usage_hack.sb_11--;
96 if (usage_hack.sb_11) {
97 result = 0;
98 goto done;
99 }
100 }
101
102 if (ps3_is_device(dev, 1, 2)) {
103 usage_hack.sb_12--;
104 if (usage_hack.sb_12) {
105 result = 0;
106 goto done;
107 }
108 }
109
110 result = lv1_close_device(dev->bus_id, dev->dev_id);
111 BUG_ON(result);
112
113done:
114 mutex_unlock(&usage_hack.mutex);
115 return result;
116}
117
118static int ps3_open_hv_device_gpu(struct ps3_system_bus_device *dev)
119{
120 int result;
121
122 mutex_lock(&usage_hack.mutex);
123
124 usage_hack.gpu++;
125 if (usage_hack.gpu > 1) {
126 result = 0;
127 goto done;
128 }
129
130 result = lv1_gpu_open(0);
131
132 if (result) {
133 pr_debug("%s:%d: lv1_gpu_open failed: %s\n", __func__,
134 __LINE__, ps3_result(result));
135 result = -EPERM;
136 }
137
138done:
139 mutex_unlock(&usage_hack.mutex);
140 return result;
141}
142
143static int ps3_close_hv_device_gpu(struct ps3_system_bus_device *dev)
144{
145 int result;
146
147 mutex_lock(&usage_hack.mutex);
148
149 usage_hack.gpu--;
150 if (usage_hack.gpu) {
151 result = 0;
152 goto done;
153 }
154
155 result = lv1_gpu_close();
156 BUG_ON(result);
157
158done:
159 mutex_unlock(&usage_hack.mutex);
160 return result;
161}
162
163int ps3_open_hv_device(struct ps3_system_bus_device *dev)
164{
165 BUG_ON(!dev);
166 pr_debug("%s:%d: match_id: %u\n", __func__, __LINE__, dev->match_id);
167
168 switch (dev->match_id) {
169 case PS3_MATCH_ID_EHCI:
170 case PS3_MATCH_ID_OHCI:
171 case PS3_MATCH_ID_GELIC:
172 case PS3_MATCH_ID_STOR_DISK:
173 case PS3_MATCH_ID_STOR_ROM:
174 case PS3_MATCH_ID_STOR_FLASH:
175 return ps3_open_hv_device_sb(dev);
176
177 case PS3_MATCH_ID_SOUND:
178 case PS3_MATCH_ID_GRAPHICS:
179 return ps3_open_hv_device_gpu(dev);
180
181 case PS3_MATCH_ID_AV_SETTINGS:
182 case PS3_MATCH_ID_SYSTEM_MANAGER:
183 pr_debug("%s:%d: unsupported match_id: %u\n", __func__,
184 __LINE__, dev->match_id);
185 pr_debug("%s:%d: bus_id: %u\n", __func__,
186 __LINE__, dev->bus_id);
187 BUG();
188 return -EINVAL;
189
190 default:
191 break;
192 }
193
194 pr_debug("%s:%d: unknown match_id: %u\n", __func__, __LINE__,
195 dev->match_id);
196 BUG();
197 return -ENODEV;
198}
199EXPORT_SYMBOL_GPL(ps3_open_hv_device);
200
201int ps3_close_hv_device(struct ps3_system_bus_device *dev)
202{
203 BUG_ON(!dev);
204 pr_debug("%s:%d: match_id: %u\n", __func__, __LINE__, dev->match_id);
205
206 switch (dev->match_id) {
207 case PS3_MATCH_ID_EHCI:
208 case PS3_MATCH_ID_OHCI:
209 case PS3_MATCH_ID_GELIC:
210 case PS3_MATCH_ID_STOR_DISK:
211 case PS3_MATCH_ID_STOR_ROM:
212 case PS3_MATCH_ID_STOR_FLASH:
213 return ps3_close_hv_device_sb(dev);
214
215 case PS3_MATCH_ID_SOUND:
216 case PS3_MATCH_ID_GRAPHICS:
217 return ps3_close_hv_device_gpu(dev);
218
219 case PS3_MATCH_ID_AV_SETTINGS:
220 case PS3_MATCH_ID_SYSTEM_MANAGER:
221 pr_debug("%s:%d: unsupported match_id: %u\n", __func__,
222 __LINE__, dev->match_id);
223 pr_debug("%s:%d: bus_id: %u\n", __func__,
224 __LINE__, dev->bus_id);
225 BUG();
226 return -EINVAL;
227
228 default:
229 break;
230 }
231
232 pr_debug("%s:%d: unknown match_id: %u\n", __func__, __LINE__,
233 dev->match_id);
234 BUG();
235 return -ENODEV;
236}
237EXPORT_SYMBOL_GPL(ps3_close_hv_device);
238
33#define dump_mmio_region(_a) _dump_mmio_region(_a, __func__, __LINE__) 239#define dump_mmio_region(_a) _dump_mmio_region(_a, __func__, __LINE__)
34static void _dump_mmio_region(const struct ps3_mmio_region* r, 240static void _dump_mmio_region(const struct ps3_mmio_region* r,
35 const char* func, int line) 241 const char* func, int line)
36{ 242{
37 pr_debug("%s:%d: dev %u:%u\n", func, line, r->did.bus_id, 243 pr_debug("%s:%d: dev %u:%u\n", func, line, r->dev->bus_id,
38 r->did.dev_id); 244 r->dev->dev_id);
39 pr_debug("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr); 245 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); 246 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); 247 pr_debug("%s:%d: lpar_addr %lxh\n", func, line, r->lpar_addr);
42} 248}
43 249
44int ps3_mmio_region_create(struct ps3_mmio_region *r) 250static int ps3_sb_mmio_region_create(struct ps3_mmio_region *r)
45{ 251{
46 int result; 252 int result;
47 253
48 result = lv1_map_device_mmio_region(r->did.bus_id, r->did.dev_id, 254 result = lv1_map_device_mmio_region(r->dev->bus_id, r->dev->dev_id,
49 r->bus_addr, r->len, r->page_size, &r->lpar_addr); 255 r->bus_addr, r->len, r->page_size, &r->lpar_addr);
50 256
51 if (result) { 257 if (result) {
@@ -57,13 +263,26 @@ int ps3_mmio_region_create(struct ps3_mmio_region *r)
57 dump_mmio_region(r); 263 dump_mmio_region(r);
58 return result; 264 return result;
59} 265}
266
267static int ps3_ioc0_mmio_region_create(struct ps3_mmio_region *r)
268{
269 /* device specific; do nothing currently */
270 return 0;
271}
272
273int ps3_mmio_region_create(struct ps3_mmio_region *r)
274{
275 return r->mmio_ops->create(r);
276}
60EXPORT_SYMBOL_GPL(ps3_mmio_region_create); 277EXPORT_SYMBOL_GPL(ps3_mmio_region_create);
61 278
62int ps3_free_mmio_region(struct ps3_mmio_region *r) 279static int ps3_sb_free_mmio_region(struct ps3_mmio_region *r)
63{ 280{
64 int result; 281 int result;
65 282
66 result = lv1_unmap_device_mmio_region(r->did.bus_id, r->did.dev_id, 283 dump_mmio_region(r);
284;
285 result = lv1_unmap_device_mmio_region(r->dev->bus_id, r->dev->dev_id,
67 r->lpar_addr); 286 r->lpar_addr);
68 287
69 if (result) 288 if (result)
@@ -73,14 +292,60 @@ int ps3_free_mmio_region(struct ps3_mmio_region *r)
73 r->lpar_addr = 0; 292 r->lpar_addr = 0;
74 return result; 293 return result;
75} 294}
295
296static int ps3_ioc0_free_mmio_region(struct ps3_mmio_region *r)
297{
298 /* device specific; do nothing currently */
299 return 0;
300}
301
302
303int ps3_free_mmio_region(struct ps3_mmio_region *r)
304{
305 return r->mmio_ops->free(r);
306}
307
76EXPORT_SYMBOL_GPL(ps3_free_mmio_region); 308EXPORT_SYMBOL_GPL(ps3_free_mmio_region);
77 309
310static const struct ps3_mmio_region_ops ps3_mmio_sb_region_ops = {
311 .create = ps3_sb_mmio_region_create,
312 .free = ps3_sb_free_mmio_region
313};
314
315static const struct ps3_mmio_region_ops ps3_mmio_ioc0_region_ops = {
316 .create = ps3_ioc0_mmio_region_create,
317 .free = ps3_ioc0_free_mmio_region
318};
319
320int ps3_mmio_region_init(struct ps3_system_bus_device *dev,
321 struct ps3_mmio_region *r, unsigned long bus_addr, unsigned long len,
322 enum ps3_mmio_page_size page_size)
323{
324 r->dev = dev;
325 r->bus_addr = bus_addr;
326 r->len = len;
327 r->page_size = page_size;
328 switch (dev->dev_type) {
329 case PS3_DEVICE_TYPE_SB:
330 r->mmio_ops = &ps3_mmio_sb_region_ops;
331 break;
332 case PS3_DEVICE_TYPE_IOC0:
333 r->mmio_ops = &ps3_mmio_ioc0_region_ops;
334 break;
335 default:
336 BUG();
337 return -EINVAL;
338 }
339 return 0;
340}
341EXPORT_SYMBOL_GPL(ps3_mmio_region_init);
342
78static int ps3_system_bus_match(struct device *_dev, 343static int ps3_system_bus_match(struct device *_dev,
79 struct device_driver *_drv) 344 struct device_driver *_drv)
80{ 345{
81 int result; 346 int result;
82 struct ps3_system_bus_driver *drv = to_ps3_system_bus_driver(_drv); 347 struct ps3_system_bus_driver *drv = ps3_drv_to_system_bus_drv(_drv);
83 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 348 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
84 349
85 result = dev->match_id == drv->match_id; 350 result = dev->match_id == drv->match_id;
86 351
@@ -92,32 +357,14 @@ static int ps3_system_bus_match(struct device *_dev,
92 357
93static int ps3_system_bus_probe(struct device *_dev) 358static int ps3_system_bus_probe(struct device *_dev)
94{ 359{
95 int result; 360 int result = 0;
96 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 361 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
97 struct ps3_system_bus_driver *drv = 362 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 363
112 if (result) { 364 BUG_ON(!dev);
113 pr_debug("%s:%d: ps3_dma_region_create failed (%d)\n", 365 pr_info(" -> %s:%d: %s\n", __func__, __LINE__, _dev->bus_id);
114 __func__, __LINE__, result);
115 BUG_ON("check region type");
116 result = -EINVAL;
117 goto clean_device;
118 }
119 }
120 366
367 drv = ps3_system_bus_dev_to_system_bus_drv(dev);
121 BUG_ON(!drv); 368 BUG_ON(!drv);
122 369
123 if (drv->probe) 370 if (drv->probe)
@@ -126,56 +373,127 @@ static int ps3_system_bus_probe(struct device *_dev)
126 pr_info("%s:%d: %s no probe method\n", __func__, __LINE__, 373 pr_info("%s:%d: %s no probe method\n", __func__, __LINE__,
127 dev->core.bus_id); 374 dev->core.bus_id);
128 375
129 if (result) { 376 pr_info(" <- %s:%d: %s\n", __func__, __LINE__, dev->core.bus_id);
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; 377 return result;
142} 378}
143 379
144static int ps3_system_bus_remove(struct device *_dev) 380static int ps3_system_bus_remove(struct device *_dev)
145{ 381{
146 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 382 int result = 0;
147 struct ps3_system_bus_driver *drv = 383 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
148 to_ps3_system_bus_driver(_dev->driver); 384 struct ps3_system_bus_driver *drv;
385
386 BUG_ON(!dev);
387 pr_info(" -> %s:%d: %s\n", __func__, __LINE__, _dev->bus_id);
388
389 drv = ps3_system_bus_dev_to_system_bus_drv(dev);
390 BUG_ON(!drv);
149 391
150 if (drv->remove) 392 if (drv->remove)
151 drv->remove(dev); 393 result = drv->remove(dev);
152 else 394 else
153 pr_info("%s:%d: %s no remove method\n", __func__, __LINE__, 395 dev_dbg(&dev->core, "%s:%d %s: no remove method\n",
154 dev->core.bus_id); 396 __func__, __LINE__, drv->core.name);
397
398 pr_info(" <- %s:%d: %s\n", __func__, __LINE__, dev->core.bus_id);
399 return result;
400}
401
402static void ps3_system_bus_shutdown(struct device *_dev)
403{
404 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
405 struct ps3_system_bus_driver *drv;
406
407 BUG_ON(!dev);
408
409 dev_dbg(&dev->core, " -> %s:%d: match_id %d\n", __func__, __LINE__,
410 dev->match_id);
411
412 if (!dev->core.driver) {
413 dev_dbg(&dev->core, "%s:%d: no driver bound\n", __func__,
414 __LINE__);
415 return;
416 }
417
418 drv = ps3_system_bus_dev_to_system_bus_drv(dev);
419
420 BUG_ON(!drv);
421
422 dev_dbg(&dev->core, "%s:%d: %s -> %s\n", __func__, __LINE__,
423 dev->core.bus_id, drv->core.name);
424
425 if (drv->shutdown)
426 drv->shutdown(dev);
427 else if (drv->remove) {
428 dev_dbg(&dev->core, "%s:%d %s: no shutdown, calling remove\n",
429 __func__, __LINE__, drv->core.name);
430 drv->remove(dev);
431 } else {
432 dev_dbg(&dev->core, "%s:%d %s: no shutdown method\n",
433 __func__, __LINE__, drv->core.name);
434 BUG();
435 }
436
437 dev_dbg(&dev->core, " <- %s:%d\n", __func__, __LINE__);
438}
439
440static int ps3_system_bus_uevent(struct device *_dev, char **envp,
441 int num_envp, char *buffer, int buffer_size)
442{
443 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
444 int i = 0, length = 0;
155 445
156 ps3_dma_region_free(dev->d_region); 446 if (add_uevent_var(envp, num_envp, &i, buffer, buffer_size,
157 ps3_free_mmio_region(dev->m_region); 447 &length, "MODALIAS=ps3:%d",
158 lv1_close_device(dev->did.bus_id, dev->did.dev_id); 448 dev->match_id))
449 return -ENOMEM;
159 450
451 envp[i] = NULL;
160 return 0; 452 return 0;
161} 453}
162 454
455static ssize_t modalias_show(struct device *_dev, struct device_attribute *a,
456 char *buf)
457{
458 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
459 int len = snprintf(buf, PAGE_SIZE, "ps3:%d\n", dev->match_id);
460
461 return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len;
462}
463
464static struct device_attribute ps3_system_bus_dev_attrs[] = {
465 __ATTR_RO(modalias),
466 __ATTR_NULL,
467};
468
163struct bus_type ps3_system_bus_type = { 469struct bus_type ps3_system_bus_type = {
164 .name = "ps3_system_bus", 470 .name = "ps3_system_bus",
165 .match = ps3_system_bus_match, 471 .match = ps3_system_bus_match,
472 .uevent = ps3_system_bus_uevent,
166 .probe = ps3_system_bus_probe, 473 .probe = ps3_system_bus_probe,
167 .remove = ps3_system_bus_remove, 474 .remove = ps3_system_bus_remove,
475 .shutdown = ps3_system_bus_shutdown,
476 .dev_attrs = ps3_system_bus_dev_attrs,
168}; 477};
169 478
170int __init ps3_system_bus_init(void) 479static int __init ps3_system_bus_init(void)
171{ 480{
172 int result; 481 int result;
173 482
174 if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) 483 if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
175 return -ENODEV; 484 return -ENODEV;
176 485
486 pr_debug(" -> %s:%d\n", __func__, __LINE__);
487
488 mutex_init(&usage_hack.mutex);
489
490 result = device_register(&ps3_system_bus);
491 BUG_ON(result);
492
177 result = bus_register(&ps3_system_bus_type); 493 result = bus_register(&ps3_system_bus_type);
178 BUG_ON(result); 494 BUG_ON(result);
495
496 pr_debug(" <- %s:%d\n", __func__, __LINE__);
179 return result; 497 return result;
180} 498}
181 499
@@ -185,16 +503,13 @@ core_initcall(ps3_system_bus_init);
185 * Returns the virtual address of the buffer and sets dma_handle 503 * Returns the virtual address of the buffer and sets dma_handle
186 * to the dma address (mapping) of the first page. 504 * to the dma address (mapping) of the first page.
187 */ 505 */
188
189static void * ps3_alloc_coherent(struct device *_dev, size_t size, 506static void * ps3_alloc_coherent(struct device *_dev, size_t size,
190 dma_addr_t *dma_handle, gfp_t flag) 507 dma_addr_t *dma_handle, gfp_t flag)
191{ 508{
192 int result; 509 int result;
193 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 510 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
194 unsigned long virt_addr; 511 unsigned long virt_addr;
195 512
196 BUG_ON(!dev->d_region->bus_addr);
197
198 flag &= ~(__GFP_DMA | __GFP_HIGHMEM); 513 flag &= ~(__GFP_DMA | __GFP_HIGHMEM);
199 flag |= __GFP_ZERO; 514 flag |= __GFP_ZERO;
200 515
@@ -205,7 +520,8 @@ static void * ps3_alloc_coherent(struct device *_dev, size_t size,
205 goto clean_none; 520 goto clean_none;
206 } 521 }
207 522
208 result = ps3_dma_map(dev->d_region, virt_addr, size, dma_handle); 523 result = ps3_dma_map(dev->d_region, virt_addr, size, dma_handle,
524 IOPTE_PP_W | IOPTE_PP_R | IOPTE_SO_RW | IOPTE_M);
209 525
210 if (result) { 526 if (result) {
211 pr_debug("%s:%d: ps3_dma_map failed (%d)\n", 527 pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
@@ -226,7 +542,7 @@ clean_none:
226static void ps3_free_coherent(struct device *_dev, size_t size, void *vaddr, 542static void ps3_free_coherent(struct device *_dev, size_t size, void *vaddr,
227 dma_addr_t dma_handle) 543 dma_addr_t dma_handle)
228{ 544{
229 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 545 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
230 546
231 ps3_dma_unmap(dev->d_region, dma_handle, size); 547 ps3_dma_unmap(dev->d_region, dma_handle, size);
232 free_pages((unsigned long)vaddr, get_order(size)); 548 free_pages((unsigned long)vaddr, get_order(size));
@@ -239,15 +555,16 @@ static void ps3_free_coherent(struct device *_dev, size_t size, void *vaddr,
239 * byte within the page as vaddr. 555 * byte within the page as vaddr.
240 */ 556 */
241 557
242static dma_addr_t ps3_map_single(struct device *_dev, void *ptr, size_t size, 558static dma_addr_t ps3_sb_map_single(struct device *_dev, void *ptr, size_t size,
243 enum dma_data_direction direction) 559 enum dma_data_direction direction)
244{ 560{
245 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 561 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
246 int result; 562 int result;
247 unsigned long bus_addr; 563 unsigned long bus_addr;
248 564
249 result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size, 565 result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size,
250 &bus_addr); 566 &bus_addr,
567 IOPTE_PP_R | IOPTE_PP_W | IOPTE_SO_RW | IOPTE_M);
251 568
252 if (result) { 569 if (result) {
253 pr_debug("%s:%d: ps3_dma_map failed (%d)\n", 570 pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
@@ -257,10 +574,44 @@ static dma_addr_t ps3_map_single(struct device *_dev, void *ptr, size_t size,
257 return bus_addr; 574 return bus_addr;
258} 575}
259 576
577static dma_addr_t ps3_ioc0_map_single(struct device *_dev, void *ptr,
578 size_t size,
579 enum dma_data_direction direction)
580{
581 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
582 int result;
583 unsigned long bus_addr;
584 u64 iopte_flag;
585
586 iopte_flag = IOPTE_M;
587 switch (direction) {
588 case DMA_BIDIRECTIONAL:
589 iopte_flag |= IOPTE_PP_R | IOPTE_PP_W | IOPTE_SO_RW;
590 break;
591 case DMA_TO_DEVICE:
592 iopte_flag |= IOPTE_PP_R | IOPTE_SO_R;
593 break;
594 case DMA_FROM_DEVICE:
595 iopte_flag |= IOPTE_PP_W | IOPTE_SO_RW;
596 break;
597 default:
598 /* not happned */
599 BUG();
600 };
601 result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size,
602 &bus_addr, iopte_flag);
603
604 if (result) {
605 pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
606 __func__, __LINE__, result);
607 }
608 return bus_addr;
609}
610
260static void ps3_unmap_single(struct device *_dev, dma_addr_t dma_addr, 611static void ps3_unmap_single(struct device *_dev, dma_addr_t dma_addr,
261 size_t size, enum dma_data_direction direction) 612 size_t size, enum dma_data_direction direction)
262{ 613{
263 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 614 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
264 int result; 615 int result;
265 616
266 result = ps3_dma_unmap(dev->d_region, dma_addr, size); 617 result = ps3_dma_unmap(dev->d_region, dma_addr, size);
@@ -271,20 +622,20 @@ static void ps3_unmap_single(struct device *_dev, dma_addr_t dma_addr,
271 } 622 }
272} 623}
273 624
274static int ps3_map_sg(struct device *_dev, struct scatterlist *sg, int nents, 625static int ps3_sb_map_sg(struct device *_dev, struct scatterlist *sg, int nents,
275 enum dma_data_direction direction) 626 enum dma_data_direction direction)
276{ 627{
277#if defined(CONFIG_PS3_DYNAMIC_DMA) 628#if defined(CONFIG_PS3_DYNAMIC_DMA)
278 BUG_ON("do"); 629 BUG_ON("do");
279 return -EPERM; 630 return -EPERM;
280#else 631#else
281 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 632 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
282 int i; 633 int i;
283 634
284 for (i = 0; i < nents; i++, sg++) { 635 for (i = 0; i < nents; i++, sg++) {
285 int result = ps3_dma_map(dev->d_region, 636 int result = ps3_dma_map(dev->d_region,
286 page_to_phys(sg->page) + sg->offset, sg->length, 637 page_to_phys(sg->page) + sg->offset, sg->length,
287 &sg->dma_address); 638 &sg->dma_address, 0);
288 639
289 if (result) { 640 if (result) {
290 pr_debug("%s:%d: ps3_dma_map failed (%d)\n", 641 pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
@@ -299,7 +650,15 @@ static int ps3_map_sg(struct device *_dev, struct scatterlist *sg, int nents,
299#endif 650#endif
300} 651}
301 652
302static void ps3_unmap_sg(struct device *_dev, struct scatterlist *sg, 653static int ps3_ioc0_map_sg(struct device *_dev, struct scatterlist *sg,
654 int nents,
655 enum dma_data_direction direction)
656{
657 BUG();
658 return 0;
659}
660
661static void ps3_sb_unmap_sg(struct device *_dev, struct scatterlist *sg,
303 int nents, enum dma_data_direction direction) 662 int nents, enum dma_data_direction direction)
304{ 663{
305#if defined(CONFIG_PS3_DYNAMIC_DMA) 664#if defined(CONFIG_PS3_DYNAMIC_DMA)
@@ -307,18 +666,34 @@ static void ps3_unmap_sg(struct device *_dev, struct scatterlist *sg,
307#endif 666#endif
308} 667}
309 668
669static void ps3_ioc0_unmap_sg(struct device *_dev, struct scatterlist *sg,
670 int nents, enum dma_data_direction direction)
671{
672 BUG();
673}
674
310static int ps3_dma_supported(struct device *_dev, u64 mask) 675static int ps3_dma_supported(struct device *_dev, u64 mask)
311{ 676{
312 return mask >= DMA_32BIT_MASK; 677 return mask >= DMA_32BIT_MASK;
313} 678}
314 679
315static struct dma_mapping_ops ps3_dma_ops = { 680static struct dma_mapping_ops ps3_sb_dma_ops = {
316 .alloc_coherent = ps3_alloc_coherent, 681 .alloc_coherent = ps3_alloc_coherent,
317 .free_coherent = ps3_free_coherent, 682 .free_coherent = ps3_free_coherent,
318 .map_single = ps3_map_single, 683 .map_single = ps3_sb_map_single,
319 .unmap_single = ps3_unmap_single, 684 .unmap_single = ps3_unmap_single,
320 .map_sg = ps3_map_sg, 685 .map_sg = ps3_sb_map_sg,
321 .unmap_sg = ps3_unmap_sg, 686 .unmap_sg = ps3_sb_unmap_sg,
687 .dma_supported = ps3_dma_supported
688};
689
690static struct dma_mapping_ops ps3_ioc0_dma_ops = {
691 .alloc_coherent = ps3_alloc_coherent,
692 .free_coherent = ps3_free_coherent,
693 .map_single = ps3_ioc0_map_single,
694 .unmap_single = ps3_unmap_single,
695 .map_sg = ps3_ioc0_map_sg,
696 .unmap_sg = ps3_ioc0_unmap_sg,
322 .dma_supported = ps3_dma_supported 697 .dma_supported = ps3_dma_supported
323}; 698};
324 699
@@ -328,7 +703,7 @@ static struct dma_mapping_ops ps3_dma_ops = {
328 703
329static void ps3_system_bus_release_device(struct device *_dev) 704static void ps3_system_bus_release_device(struct device *_dev)
330{ 705{
331 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev); 706 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
332 kfree(dev); 707 kfree(dev);
333} 708}
334 709
@@ -343,19 +718,38 @@ static void ps3_system_bus_release_device(struct device *_dev)
343int ps3_system_bus_device_register(struct ps3_system_bus_device *dev) 718int ps3_system_bus_device_register(struct ps3_system_bus_device *dev)
344{ 719{
345 int result; 720 int result;
346 static unsigned int dev_count = 1; 721 static unsigned int dev_ioc0_count;
722 static unsigned int dev_sb_count;
723 static unsigned int dev_vuart_count;
347 724
348 dev->core.parent = NULL; 725 if (!dev->core.parent)
726 dev->core.parent = &ps3_system_bus;
349 dev->core.bus = &ps3_system_bus_type; 727 dev->core.bus = &ps3_system_bus_type;
350 dev->core.release = ps3_system_bus_release_device; 728 dev->core.release = ps3_system_bus_release_device;
351 729
730 switch (dev->dev_type) {
731 case PS3_DEVICE_TYPE_IOC0:
732 dev->core.archdata.dma_ops = &ps3_ioc0_dma_ops;
733 snprintf(dev->core.bus_id, sizeof(dev->core.bus_id),
734 "ioc0_%02x", ++dev_ioc0_count);
735 break;
736 case PS3_DEVICE_TYPE_SB:
737 dev->core.archdata.dma_ops = &ps3_sb_dma_ops;
738 snprintf(dev->core.bus_id, sizeof(dev->core.bus_id),
739 "sb_%02x", ++dev_sb_count);
740
741 break;
742 case PS3_DEVICE_TYPE_VUART:
743 snprintf(dev->core.bus_id, sizeof(dev->core.bus_id),
744 "vuart_%02x", ++dev_vuart_count);
745 break;
746 default:
747 BUG();
748 };
749
352 dev->core.archdata.of_node = NULL; 750 dev->core.archdata.of_node = NULL;
353 dev->core.archdata.dma_ops = &ps3_dma_ops;
354 dev->core.archdata.numa_node = 0; 751 dev->core.archdata.numa_node = 0;
355 752
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); 753 pr_debug("%s:%d add %s\n", __func__, __LINE__, dev->core.bus_id);
360 754
361 result = device_register(&dev->core); 755 result = device_register(&dev->core);
@@ -368,9 +762,15 @@ int ps3_system_bus_driver_register(struct ps3_system_bus_driver *drv)
368{ 762{
369 int result; 763 int result;
370 764
765 pr_debug(" -> %s:%d: %s\n", __func__, __LINE__, drv->core.name);
766
767 if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
768 return -ENODEV;
769
371 drv->core.bus = &ps3_system_bus_type; 770 drv->core.bus = &ps3_system_bus_type;
372 771
373 result = driver_register(&drv->core); 772 result = driver_register(&drv->core);
773 pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, drv->core.name);
374 return result; 774 return result;
375} 775}
376 776
@@ -378,7 +778,9 @@ EXPORT_SYMBOL_GPL(ps3_system_bus_driver_register);
378 778
379void ps3_system_bus_driver_unregister(struct ps3_system_bus_driver *drv) 779void ps3_system_bus_driver_unregister(struct ps3_system_bus_driver *drv)
380{ 780{
781 pr_debug(" -> %s:%d: %s\n", __func__, __LINE__, drv->core.name);
381 driver_unregister(&drv->core); 782 driver_unregister(&drv->core);
783 pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, drv->core.name);
382} 784}
383 785
384EXPORT_SYMBOL_GPL(ps3_system_bus_driver_unregister); 786EXPORT_SYMBOL_GPL(ps3_system_bus_driver_unregister);
diff --git a/arch/powerpc/platforms/ps3/time.c b/arch/powerpc/platforms/ps3/time.c
index 1bae8b19b3..802a9ccacb 100644
--- a/arch/powerpc/platforms/ps3/time.c
+++ b/arch/powerpc/platforms/ps3/time.c
@@ -39,7 +39,7 @@ static void _dump_tm(const struct rtc_time *tm, const char* func, int line)
39} 39}
40 40
41#define dump_time(_a) _dump_time(_a, __func__, __LINE__) 41#define dump_time(_a) _dump_time(_a, __func__, __LINE__)
42static void __attribute__ ((unused)) _dump_time(int time, const char* func, 42static void __maybe_unused _dump_time(int time, const char *func,
43 int line) 43 int line)
44{ 44{
45 struct rtc_time tm; 45 struct rtc_time tm;
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile
index ae1fc92dc1..992ba6753c 100644
--- a/arch/powerpc/platforms/pseries/Makefile
+++ b/arch/powerpc/platforms/pseries/Makefile
@@ -8,7 +8,7 @@ obj-y := lpar.o hvCall.o nvram.o reconfig.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 eeh_sysfs.o
12obj-$(CONFIG_KEXEC) += kexec.o 12obj-$(CONFIG_KEXEC) += kexec.o
13obj-$(CONFIG_PCI) += pci.o pci_dlpar.o 13obj-$(CONFIG_PCI) += pci.o pci_dlpar.o
14obj-$(CONFIG_PCI_MSI) += msi.o 14obj-$(CONFIG_PCI_MSI) += msi.o
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 5f3e6d8659..b877039501 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -1,6 +1,8 @@
1/* 1/*
2 * eeh.c 2 * eeh.c
3 * Copyright (C) 2001 Dave Engebretsen & Todd Inglett IBM Corporation 3 * Copyright IBM Corporation 2001, 2005, 2006
4 * Copyright Dave Engebretsen & Todd Inglett 2001
5 * Copyright Linas Vepstas 2005, 2006
4 * 6 *
5 * 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
6 * 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
@@ -15,6 +17,8 @@
15 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 * Please address comments and feedback to Linas Vepstas <linas@austin.ibm.com>
18 */ 22 */
19 23
20#include <linux/delay.h> 24#include <linux/delay.h>
@@ -117,7 +121,6 @@ static unsigned long no_cfg_addr;
117static unsigned long ignored_check; 121static unsigned long ignored_check;
118static unsigned long total_mmio_ffs; 122static unsigned long total_mmio_ffs;
119static unsigned long false_positives; 123static unsigned long false_positives;
120static unsigned long ignored_failures;
121static unsigned long slot_resets; 124static unsigned long slot_resets;
122 125
123#define IS_BRIDGE(class_code) (((class_code)<<16) == PCI_BASE_CLASS_BRIDGE) 126#define IS_BRIDGE(class_code) (((class_code)<<16) == PCI_BASE_CLASS_BRIDGE)
@@ -505,6 +508,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
505 printk(KERN_WARNING "EEH: read_slot_reset_state() failed; rc=%d dn=%s\n", 508 printk(KERN_WARNING "EEH: read_slot_reset_state() failed; rc=%d dn=%s\n",
506 ret, dn->full_name); 509 ret, dn->full_name);
507 false_positives++; 510 false_positives++;
511 pdn->eeh_false_positives ++;
508 rc = 0; 512 rc = 0;
509 goto dn_unlock; 513 goto dn_unlock;
510 } 514 }
@@ -513,6 +517,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
513 * they are empty when they don't have children. */ 517 * they are empty when they don't have children. */
514 if ((rets[0] == 5) && (dn->child == NULL)) { 518 if ((rets[0] == 5) && (dn->child == NULL)) {
515 false_positives++; 519 false_positives++;
520 pdn->eeh_false_positives ++;
516 rc = 0; 521 rc = 0;
517 goto dn_unlock; 522 goto dn_unlock;
518 } 523 }
@@ -522,6 +527,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
522 printk(KERN_WARNING "EEH: event on unsupported device, rc=%d dn=%s\n", 527 printk(KERN_WARNING "EEH: event on unsupported device, rc=%d dn=%s\n",
523 ret, dn->full_name); 528 ret, dn->full_name);
524 false_positives++; 529 false_positives++;
530 pdn->eeh_false_positives ++;
525 rc = 0; 531 rc = 0;
526 goto dn_unlock; 532 goto dn_unlock;
527 } 533 }
@@ -529,6 +535,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
529 /* If not the kind of error we know about, punt. */ 535 /* If not the kind of error we know about, punt. */
530 if (rets[0] != 1 && rets[0] != 2 && rets[0] != 4 && rets[0] != 5) { 536 if (rets[0] != 1 && rets[0] != 2 && rets[0] != 4 && rets[0] != 5) {
531 false_positives++; 537 false_positives++;
538 pdn->eeh_false_positives ++;
532 rc = 0; 539 rc = 0;
533 goto dn_unlock; 540 goto dn_unlock;
534 } 541 }
@@ -921,6 +928,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
921 pdn->eeh_mode = 0; 928 pdn->eeh_mode = 0;
922 pdn->eeh_check_count = 0; 929 pdn->eeh_check_count = 0;
923 pdn->eeh_freeze_count = 0; 930 pdn->eeh_freeze_count = 0;
931 pdn->eeh_false_positives = 0;
924 932
925 if (status && strcmp(status, "ok") != 0) 933 if (status && strcmp(status, "ok") != 0)
926 return NULL; /* ignore devices with bad status */ 934 return NULL; /* ignore devices with bad status */
@@ -1139,7 +1147,8 @@ static void eeh_add_device_late(struct pci_dev *dev)
1139 pdn = PCI_DN(dn); 1147 pdn = PCI_DN(dn);
1140 pdn->pcidev = dev; 1148 pdn->pcidev = dev;
1141 1149
1142 pci_addr_cache_insert_device (dev); 1150 pci_addr_cache_insert_device(dev);
1151 eeh_sysfs_add_device(dev);
1143} 1152}
1144 1153
1145void eeh_add_device_tree_late(struct pci_bus *bus) 1154void eeh_add_device_tree_late(struct pci_bus *bus)
@@ -1178,6 +1187,7 @@ static void eeh_remove_device(struct pci_dev *dev)
1178 printk(KERN_DEBUG "EEH: remove device %s\n", pci_name(dev)); 1187 printk(KERN_DEBUG "EEH: remove device %s\n", pci_name(dev));
1179#endif 1188#endif
1180 pci_addr_cache_remove_device(dev); 1189 pci_addr_cache_remove_device(dev);
1190 eeh_sysfs_remove_device(dev);
1181 1191
1182 dn = pci_device_to_OF_node(dev); 1192 dn = pci_device_to_OF_node(dev);
1183 if (PCI_DN(dn)->pcidev) { 1193 if (PCI_DN(dn)->pcidev) {
@@ -1214,11 +1224,10 @@ static int proc_eeh_show(struct seq_file *m, void *v)
1214 "check not wanted=%ld\n" 1224 "check not wanted=%ld\n"
1215 "eeh_total_mmio_ffs=%ld\n" 1225 "eeh_total_mmio_ffs=%ld\n"
1216 "eeh_false_positives=%ld\n" 1226 "eeh_false_positives=%ld\n"
1217 "eeh_ignored_failures=%ld\n"
1218 "eeh_slot_resets=%ld\n", 1227 "eeh_slot_resets=%ld\n",
1219 no_device, no_dn, no_cfg_addr, 1228 no_device, no_dn, no_cfg_addr,
1220 ignored_check, total_mmio_ffs, 1229 ignored_check, total_mmio_ffs,
1221 false_positives, ignored_failures, 1230 false_positives,
1222 slot_resets); 1231 slot_resets);
1223 } 1232 }
1224 1233
diff --git a/arch/powerpc/platforms/pseries/eeh_cache.c b/arch/powerpc/platforms/pseries/eeh_cache.c
index f2bae04424..e49c815eae 100644
--- a/arch/powerpc/platforms/pseries/eeh_cache.c
+++ b/arch/powerpc/platforms/pseries/eeh_cache.c
@@ -2,7 +2,8 @@
2 * eeh_cache.c 2 * eeh_cache.c
3 * PCI address cache; allows the lookup of PCI devices based on I/O address 3 * PCI address cache; allows the lookup of PCI devices based on I/O address
4 * 4 *
5 * Copyright (C) 2004 Linas Vepstas <linas@austin.ibm.com> IBM Corporation 5 * Copyright IBM Corporation 2004
6 * Copyright Linas Vepstas <linas@austin.ibm.com> 2004
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
@@ -295,6 +296,8 @@ void __init pci_addr_cache_build(void)
295 continue; 296 continue;
296 pci_dev_get (dev); /* matching put is in eeh_remove_device() */ 297 pci_dev_get (dev); /* matching put is in eeh_remove_device() */
297 PCI_DN(dn)->pcidev = dev; 298 PCI_DN(dn)->pcidev = dev;
299
300 eeh_sysfs_add_device(dev);
298 } 301 }
299 302
300#ifdef DEBUG 303#ifdef DEBUG
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index 161a5844ab..15e015ef68 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -1,6 +1,7 @@
1/* 1/*
2 * PCI Error Recovery Driver for RPA-compliant PPC64 platform. 2 * PCI Error Recovery Driver for RPA-compliant PPC64 platform.
3 * Copyright (C) 2004, 2005 Linas Vepstas <linas@linas.org> 3 * Copyright IBM Corp. 2004 2005
4 * Copyright Linas Vepstas <linas@linas.org> 2004, 2005
4 * 5 *
5 * All rights reserved. 6 * All rights reserved.
6 * 7 *
@@ -19,8 +20,7 @@
19 * along with this program; if not, write to the Free Software 20 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * 22 *
22 * Send feedback to <linas@us.ibm.com> 23 * Send comments and feedback to Linas Vepstas <linas@austin.ibm.com>
23 *
24 */ 24 */
25#include <linux/delay.h> 25#include <linux/delay.h>
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
diff --git a/arch/powerpc/platforms/pseries/eeh_sysfs.c b/arch/powerpc/platforms/pseries/eeh_sysfs.c
new file mode 100644
index 0000000000..15e13b5689
--- /dev/null
+++ b/arch/powerpc/platforms/pseries/eeh_sysfs.c
@@ -0,0 +1,87 @@
1/*
2 * Sysfs entries for PCI Error Recovery for PAPR-compliant platform.
3 * Copyright IBM Corporation 2007
4 * Copyright Linas Vepstas <linas@austin.ibm.com> 2007
5 *
6 * All rights reserved.
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 (at
11 * your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
16 * NON INFRINGEMENT. See the GNU General Public License for more
17 * details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 * Send comments and feedback to Linas Vepstas <linas@austin.ibm.com>
24 */
25#include <linux/pci.h>
26#include <asm/ppc-pci.h>
27#include <asm/pci-bridge.h>
28#include <linux/kobject.h>
29
30/**
31 * EEH_SHOW_ATTR -- create sysfs entry for eeh statistic
32 * @_name: name of file in sysfs directory
33 * @_memb: name of member in struct pci_dn to access
34 * @_format: printf format for display
35 *
36 * All of the attributes look very similar, so just
37 * auto-gen a cut-n-paste routine to display them.
38 */
39#define EEH_SHOW_ATTR(_name,_memb,_format) \
40static ssize_t eeh_show_##_name(struct device *dev, \
41 struct device_attribute *attr, char *buf) \
42{ \
43 struct pci_dev *pdev = to_pci_dev(dev); \
44 struct device_node *dn = pci_device_to_OF_node(pdev); \
45 struct pci_dn *pdn; \
46 \
47 if (!dn || PCI_DN(dn) == NULL) \
48 return 0; \
49 \
50 pdn = PCI_DN(dn); \
51 return sprintf(buf, _format "\n", pdn->_memb); \
52} \
53static DEVICE_ATTR(_name, S_IRUGO, eeh_show_##_name, NULL);
54
55
56EEH_SHOW_ATTR(eeh_mode, eeh_mode, "0x%x");
57EEH_SHOW_ATTR(eeh_config_addr, eeh_config_addr, "0x%x");
58EEH_SHOW_ATTR(eeh_pe_config_addr, eeh_pe_config_addr, "0x%x");
59EEH_SHOW_ATTR(eeh_check_count, eeh_check_count, "%d");
60EEH_SHOW_ATTR(eeh_freeze_count, eeh_freeze_count, "%d");
61EEH_SHOW_ATTR(eeh_false_positives, eeh_false_positives, "%d");
62
63void eeh_sysfs_add_device(struct pci_dev *pdev)
64{
65 int rc=0;
66
67 rc += device_create_file(&pdev->dev, &dev_attr_eeh_mode);
68 rc += device_create_file(&pdev->dev, &dev_attr_eeh_config_addr);
69 rc += device_create_file(&pdev->dev, &dev_attr_eeh_pe_config_addr);
70 rc += device_create_file(&pdev->dev, &dev_attr_eeh_check_count);
71 rc += device_create_file(&pdev->dev, &dev_attr_eeh_false_positives);
72 rc += device_create_file(&pdev->dev, &dev_attr_eeh_freeze_count);
73
74 if (rc)
75 printk(KERN_WARNING "EEH: Unable to create sysfs entries\n");
76}
77
78void eeh_sysfs_remove_device(struct pci_dev *pdev)
79{
80 device_remove_file(&pdev->dev, &dev_attr_eeh_mode);
81 device_remove_file(&pdev->dev, &dev_attr_eeh_config_addr);
82 device_remove_file(&pdev->dev, &dev_attr_eeh_pe_config_addr);
83 device_remove_file(&pdev->dev, &dev_attr_eeh_check_count);
84 device_remove_file(&pdev->dev, &dev_attr_eeh_false_positives);
85 device_remove_file(&pdev->dev, &dev_attr_eeh_freeze_count);
86}
87
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 362dfbc260..8cc6eeeaae 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -373,12 +373,23 @@ static void pSeries_lpar_hptab_clear(void)
373{ 373{
374 unsigned long size_bytes = 1UL << ppc64_pft_size; 374 unsigned long size_bytes = 1UL << ppc64_pft_size;
375 unsigned long hpte_count = size_bytes >> 4; 375 unsigned long hpte_count = size_bytes >> 4;
376 unsigned long dummy1, dummy2; 376 unsigned long dummy1, dummy2, dword0;
377 long lpar_rc;
377 int i; 378 int i;
378 379
379 /* TODO: Use bulk call */ 380 /* TODO: Use bulk call */
380 for (i = 0; i < hpte_count; i++) 381 for (i = 0; i < hpte_count; i++) {
381 plpar_pte_remove_raw(0, i, 0, &dummy1, &dummy2); 382 /* dont remove HPTEs with VRMA mappings */
383 lpar_rc = plpar_pte_remove_raw(H_ANDCOND, i, HPTE_V_1TB_SEG,
384 &dummy1, &dummy2);
385 if (lpar_rc == H_NOT_FOUND) {
386 lpar_rc = plpar_pte_read_raw(0, i, &dword0, &dummy1);
387 if (!lpar_rc && ((dword0 & HPTE_V_VRMA_MASK)
388 != HPTE_V_VRMA_MASK))
389 /* Can be hpte for 1TB Seg. So remove it */
390 plpar_pte_remove_raw(0, i, 0, &dummy1, &dummy2);
391 }
392 }
382} 393}
383 394
384/* 395/*
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c
index ffaf6c5c51..47f0e0857f 100644
--- a/arch/powerpc/platforms/pseries/pci_dlpar.c
+++ b/arch/powerpc/platforms/pseries/pci_dlpar.c
@@ -110,8 +110,6 @@ pcibios_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus)
110 } 110 }
111 } 111 }
112 } 112 }
113
114 eeh_add_device_tree_late(bus);
115} 113}
116EXPORT_SYMBOL_GPL(pcibios_fixup_new_pci_devices); 114EXPORT_SYMBOL_GPL(pcibios_fixup_new_pci_devices);
117 115
@@ -139,6 +137,8 @@ pcibios_pci_config_bridge(struct pci_dev *dev)
139 137
140 /* Make the discovered devices available */ 138 /* Make the discovered devices available */
141 pci_bus_add_devices(child_bus); 139 pci_bus_add_devices(child_bus);
140
141 eeh_add_device_tree_late(child_bus);
142 return 0; 142 return 0;
143} 143}
144 144
@@ -171,6 +171,7 @@ pcibios_add_pci_devices(struct pci_bus * bus)
171 if (!list_empty(&bus->devices)) { 171 if (!list_empty(&bus->devices)) {
172 pcibios_fixup_new_pci_devices(bus, 0); 172 pcibios_fixup_new_pci_devices(bus, 0);
173 pci_bus_add_devices(bus); 173 pci_bus_add_devices(bus);
174 eeh_add_device_tree_late(bus);
174 } 175 }
175 } else if (mode == PCI_PROBE_NORMAL) { 176 } else if (mode == PCI_PROBE_NORMAL) {
176 /* use legacy probe */ 177 /* use legacy probe */
@@ -179,6 +180,7 @@ pcibios_add_pci_devices(struct pci_bus * bus)
179 if (num) { 180 if (num) {
180 pcibios_fixup_new_pci_devices(bus, 1); 181 pcibios_fixup_new_pci_devices(bus, 1);
181 pci_bus_add_devices(bus); 182 pci_bus_add_devices(bus);
183 eeh_add_device_tree_late(bus);
182 } 184 }
183 185
184 list_for_each_entry(dev, &bus->devices, bus_list) 186 list_for_each_entry(dev, &bus->devices, bus_list)
@@ -200,8 +202,6 @@ struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn)
200 rtas_setup_phb(phb); 202 rtas_setup_phb(phb);
201 pci_process_bridge_OF_ranges(phb, dn, 0); 203 pci_process_bridge_OF_ranges(phb, dn, 0);
202 204
203 pci_setup_phb_io_dynamic(phb, primary);
204
205 pci_devs_phb_init_dynamic(phb); 205 pci_devs_phb_init_dynamic(phb);
206 206
207 if (dn->child) 207 if (dn->child)
@@ -210,6 +210,7 @@ struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn)
210 scan_phb(phb); 210 scan_phb(phb);
211 pcibios_fixup_new_pci_devices(phb->bus, 0); 211 pcibios_fixup_new_pci_devices(phb->bus, 0);
212 pci_bus_add_devices(phb->bus); 212 pci_bus_add_devices(phb->bus);
213 eeh_add_device_tree_late(phb->bus);
213 214
214 return phb; 215 return phb;
215} 216}
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h
index 2e4d10c9ee..d003c80fa3 100644
--- a/arch/powerpc/platforms/pseries/plpar_wrappers.h
+++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h
@@ -108,6 +108,21 @@ static inline long plpar_pte_read(unsigned long flags, unsigned long ptex,
108 return rc; 108 return rc;
109} 109}
110 110
111/* plpar_pte_read_raw can be called in real mode. It calls plpar_hcall_raw */
112static inline long plpar_pte_read_raw(unsigned long flags, unsigned long ptex,
113 unsigned long *old_pteh_ret, unsigned long *old_ptel_ret)
114{
115 long rc;
116 unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
117
118 rc = plpar_hcall_raw(H_READ, retbuf, flags, ptex);
119
120 *old_pteh_ret = retbuf[0];
121 *old_ptel_ret = retbuf[1];
122
123 return rc;
124}
125
111static inline long plpar_pte_protect(unsigned long flags, unsigned long ptex, 126static inline long plpar_pte_protect(unsigned long flags, unsigned long ptex,
112 unsigned long avpn) 127 unsigned long avpn)
113{ 128{
diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
index 2729d559fd..61e19f78b9 100644
--- a/arch/powerpc/platforms/pseries/pseries.h
+++ b/arch/powerpc/platforms/pseries/pseries.h
@@ -33,6 +33,8 @@ static inline void setup_kexec_cpu_down_xics(void) { }
33static inline void setup_kexec_cpu_down_mpic(void) { } 33static inline void setup_kexec_cpu_down_mpic(void) { }
34#endif 34#endif
35 35
36extern void pSeries_final_fixup(void);
37
36/* Poweron flag used for enabling auto ups restart */ 38/* Poweron flag used for enabling auto ups restart */
37extern unsigned long rtas_poweron_auto; 39extern unsigned long rtas_poweron_auto;
38 40
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
index 5aa97aff33..c02f8742c5 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -123,7 +123,7 @@ static int pSeries_reconfig_add_node(const char *path, struct property *proplist
123 strcpy(np->full_name, path); 123 strcpy(np->full_name, path);
124 124
125 np->properties = proplist; 125 np->properties = proplist;
126 OF_MARK_DYNAMIC(np); 126 of_node_set_flag(np, OF_DYNAMIC);
127 kref_init(&np->kref); 127 kref_init(&np->kref);
128 128
129 np->parent = derive_parent(path); 129 np->parent = derive_parent(path);
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 470db6efae..59e69f085c 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -176,7 +176,7 @@ static void __init pseries_mpic_init_IRQ(void)
176 return; 176 return;
177 177
178 cascade_irq = irq_of_parse_and_map(cascade, 0); 178 cascade_irq = irq_of_parse_and_map(cascade, 0);
179 if (cascade == NO_IRQ) { 179 if (cascade_irq == NO_IRQ) {
180 printk(KERN_ERR "mpic: failed to map cascade interrupt"); 180 printk(KERN_ERR "mpic: failed to map cascade interrupt");
181 return; 181 return;
182 } 182 }
@@ -399,6 +399,7 @@ static void pseries_dedicated_idle_sleep(void)
399 * a good time to find other work to dispatch. 399 * a good time to find other work to dispatch.
400 */ 400 */
401 get_lppaca()->idle = 1; 401 get_lppaca()->idle = 1;
402 get_lppaca()->donate_dedicated_cpu = 1;
402 403
403 /* 404 /*
404 * We come in with interrupts disabled, and need_resched() 405 * We come in with interrupts disabled, and need_resched()
@@ -431,6 +432,7 @@ static void pseries_dedicated_idle_sleep(void)
431 432
432out: 433out:
433 HMT_medium(); 434 HMT_medium();
435 get_lppaca()->donate_dedicated_cpu = 0;
434 get_lppaca()->idle = 0; 436 get_lppaca()->idle = 0;
435} 437}
436 438
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index f1df942072..5bd90a7eb7 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -156,9 +156,9 @@ static inline void lpar_qirr_info(int n_cpu , u8 value)
156 156
157 157
158#ifdef CONFIG_SMP 158#ifdef CONFIG_SMP
159static int get_irq_server(unsigned int virq) 159static int get_irq_server(unsigned int virq, unsigned int strict_check)
160{ 160{
161 unsigned int server; 161 int server;
162 /* For the moment only implement delivery to all cpus or one cpu */ 162 /* For the moment only implement delivery to all cpus or one cpu */
163 cpumask_t cpumask = irq_desc[virq].affinity; 163 cpumask_t cpumask = irq_desc[virq].affinity;
164 cpumask_t tmp = CPU_MASK_NONE; 164 cpumask_t tmp = CPU_MASK_NONE;
@@ -166,22 +166,25 @@ static int get_irq_server(unsigned int virq)
166 if (!distribute_irqs) 166 if (!distribute_irqs)
167 return default_server; 167 return default_server;
168 168
169 if (cpus_equal(cpumask, CPU_MASK_ALL)) { 169 if (!cpus_equal(cpumask, CPU_MASK_ALL)) {
170 server = default_distrib_server;
171 } else {
172 cpus_and(tmp, cpu_online_map, cpumask); 170 cpus_and(tmp, cpu_online_map, cpumask);
173 171
174 if (cpus_empty(tmp)) 172 server = first_cpu(tmp);
175 server = default_distrib_server; 173
176 else 174 if (server < NR_CPUS)
177 server = get_hard_smp_processor_id(first_cpu(tmp)); 175 return get_hard_smp_processor_id(server);
176
177 if (strict_check)
178 return -1;
178 } 179 }
179 180
180 return server; 181 if (cpus_equal(cpu_online_map, cpu_present_map))
182 return default_distrib_server;
181 183
184 return default_server;
182} 185}
183#else 186#else
184static int get_irq_server(unsigned int virq) 187static int get_irq_server(unsigned int virq, unsigned int strict_check)
185{ 188{
186 return default_server; 189 return default_server;
187} 190}
@@ -192,7 +195,7 @@ static void xics_unmask_irq(unsigned int virq)
192{ 195{
193 unsigned int irq; 196 unsigned int irq;
194 int call_status; 197 int call_status;
195 unsigned int server; 198 int server;
196 199
197 pr_debug("xics: unmask virq %d\n", virq); 200 pr_debug("xics: unmask virq %d\n", virq);
198 201
@@ -201,7 +204,7 @@ static void xics_unmask_irq(unsigned int virq)
201 if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) 204 if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS)
202 return; 205 return;
203 206
204 server = get_irq_server(virq); 207 server = get_irq_server(virq, 0);
205 208
206 call_status = rtas_call(ibm_set_xive, 3, 1, NULL, irq, server, 209 call_status = rtas_call(ibm_set_xive, 3, 1, NULL, irq, server,
207 DEFAULT_PRIORITY); 210 DEFAULT_PRIORITY);
@@ -398,8 +401,7 @@ static void xics_set_affinity(unsigned int virq, cpumask_t cpumask)
398 unsigned int irq; 401 unsigned int irq;
399 int status; 402 int status;
400 int xics_status[2]; 403 int xics_status[2];
401 unsigned long newmask; 404 int irq_server;
402 cpumask_t tmp = CPU_MASK_NONE;
403 405
404 irq = (unsigned int)irq_map[virq].hwirq; 406 irq = (unsigned int)irq_map[virq].hwirq;
405 if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) 407 if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS)
@@ -413,18 +415,21 @@ static void xics_set_affinity(unsigned int virq, cpumask_t cpumask)
413 return; 415 return;
414 } 416 }
415 417
416 /* For the moment only implement delivery to all cpus or one cpu */ 418 /*
417 if (cpus_equal(cpumask, CPU_MASK_ALL)) { 419 * For the moment only implement delivery to all cpus or one cpu.
418 newmask = default_distrib_server; 420 * Get current irq_server for the given irq
419 } else { 421 */
420 cpus_and(tmp, cpu_online_map, cpumask); 422 irq_server = get_irq_server(irq, 1);
421 if (cpus_empty(tmp)) 423 if (irq_server == -1) {
422 return; 424 char cpulist[128];
423 newmask = get_hard_smp_processor_id(first_cpu(tmp)); 425 cpumask_scnprintf(cpulist, sizeof(cpulist), cpumask);
426 printk(KERN_WARNING "xics_set_affinity: No online cpus in "
427 "the mask %s for irq %d\n", cpulist, virq);
428 return;
424 } 429 }
425 430
426 status = rtas_call(ibm_set_xive, 3, 1, NULL, 431 status = rtas_call(ibm_set_xive, 3, 1, NULL,
427 irq, newmask, xics_status[1]); 432 irq, irq_server, xics_status[1]);
428 433
429 if (status) { 434 if (status) {
430 printk(KERN_ERR "xics_set_affinity: irq=%u ibm,set-xive " 435 printk(KERN_ERR "xics_set_affinity: irq=%u ibm,set-xive "
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index c3ce0bd12c..f65078c3d3 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -5,7 +5,6 @@ endif
5mpic-msi-obj-$(CONFIG_PCI_MSI) += mpic_msi.o mpic_u3msi.o 5mpic-msi-obj-$(CONFIG_PCI_MSI) += mpic_msi.o mpic_u3msi.o
6obj-$(CONFIG_MPIC) += mpic.o $(mpic-msi-obj-y) 6obj-$(CONFIG_MPIC) += mpic.o $(mpic-msi-obj-y)
7 7
8obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
9obj-$(CONFIG_PPC_MPC106) += grackle.o 8obj-$(CONFIG_PPC_MPC106) += grackle.o
10obj-$(CONFIG_PPC_DCR) += dcr.o 9obj-$(CONFIG_PPC_DCR) += dcr.o
11obj-$(CONFIG_PPC_DCR_NATIVE) += dcr-low.o 10obj-$(CONFIG_PPC_DCR_NATIVE) += dcr-low.o
@@ -13,16 +12,19 @@ obj-$(CONFIG_PPC_PMI) += pmi.o
13obj-$(CONFIG_U3_DART) += dart_iommu.o 12obj-$(CONFIG_U3_DART) += dart_iommu.o
14obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o 13obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o
15obj-$(CONFIG_FSL_SOC) += fsl_soc.o 14obj-$(CONFIG_FSL_SOC) += fsl_soc.o
16obj-$(CONFIG_FSL_PCIE) += fsl_pcie.o
17obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o 15obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o
18obj-$(CONFIG_QUICC_ENGINE) += qe_lib/ 16obj-$(CONFIG_QUICC_ENGINE) += qe_lib/
19mv64x60-$(CONFIG_PCI) += mv64x60_pci.o 17mv64x60-$(CONFIG_PCI) += mv64x60_pci.o
20obj-$(CONFIG_MV64X60) += $(mv64x60-y) mv64x60_pic.o mv64x60_dev.o 18obj-$(CONFIG_MV64X60) += $(mv64x60-y) mv64x60_pic.o mv64x60_dev.o
19obj-$(CONFIG_RTC_DRV_CMOS) += rtc_cmos_setup.o
21 20
22# contains only the suspend handler for time 21# contains only the suspend handler for time
22ifeq ($(CONFIG_RTC_CLASS),)
23obj-$(CONFIG_PM) += timer.o 23obj-$(CONFIG_PM) += timer.o
24endif
24 25
25ifeq ($(CONFIG_PPC_MERGE),y) 26ifeq ($(CONFIG_PPC_MERGE),y)
27obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
26obj-$(CONFIG_PPC_I8259) += i8259.o 28obj-$(CONFIG_PPC_I8259) += i8259.o
27obj-$(CONFIG_PPC_83xx) += ipic.o 29obj-$(CONFIG_PPC_83xx) += ipic.o
28obj-$(CONFIG_4xx) += uic.o 30obj-$(CONFIG_4xx) += uic.o
diff --git a/arch/powerpc/sysdev/fsl_pcie.c b/arch/powerpc/sysdev/fsl_pcie.c
deleted file mode 100644
index 041c07e8b6..0000000000
--- a/arch/powerpc/sysdev/fsl_pcie.c
+++ /dev/null
@@ -1,171 +0,0 @@
1/*
2 * Support for indirect PCI bridges.
3 *
4 * Copyright (C) 1998 Gabriel Paubert.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 *
11 * "Temporary" MPC8548 Errata file -
12 * The standard indirect_pci code should work with future silicon versions.
13 */
14
15#include <linux/kernel.h>
16#include <linux/pci.h>
17#include <linux/delay.h>
18#include <linux/string.h>
19#include <linux/init.h>
20#include <linux/bootmem.h>
21
22#include <asm/io.h>
23#include <asm/prom.h>
24#include <asm/pci-bridge.h>
25#include <asm/machdep.h>
26
27#define PCI_CFG_OUT out_be32
28
29/* ERRATA PCI-Ex 14 PCIE Controller timeout */
30#define PCIE_FIX out_be32(hose->cfg_addr+0x4, 0x0400ffff)
31
32
33static int
34indirect_read_config_pcie(struct pci_bus *bus, unsigned int devfn, int offset,
35 int len, u32 *val)
36{
37 struct pci_controller *hose = bus->sysdata;
38 volatile void __iomem *cfg_data;
39 u32 temp;
40
41 if (ppc_md.pci_exclude_device)
42 if (ppc_md.pci_exclude_device(bus->number, devfn))
43 return PCIBIOS_DEVICE_NOT_FOUND;
44
45 /* Possible artifact of CDCpp50937 needs further investigation */
46 if (devfn != 0x0 && bus->number == 0xff)
47 return PCIBIOS_DEVICE_NOT_FOUND;
48
49 PCIE_FIX;
50 if (bus->number == 0xff) {
51 PCI_CFG_OUT(hose->cfg_addr,
52 (0x80000000 | ((offset & 0xf00) << 16) |
53 ((bus->number - hose->bus_offset) << 16)
54 | (devfn << 8) | ((offset & 0xfc) )));
55 } else {
56 PCI_CFG_OUT(hose->cfg_addr,
57 (0x80000001 | ((offset & 0xf00) << 16) |
58 ((bus->number - hose->bus_offset) << 16)
59 | (devfn << 8) | ((offset & 0xfc) )));
60 }
61
62 /*
63 * Note: the caller has already checked that offset is
64 * suitably aligned and that len is 1, 2 or 4.
65 */
66 /* ERRATA PCI-Ex 12 - Configuration Address/Data Alignment */
67 cfg_data = hose->cfg_data;
68 PCIE_FIX;
69 temp = in_le32(cfg_data);
70 switch (len) {
71 case 1:
72 *val = (temp >> (((offset & 3))*8)) & 0xff;
73 break;
74 case 2:
75 *val = (temp >> (((offset & 3))*8)) & 0xffff;
76 break;
77 default:
78 *val = temp;
79 break;
80 }
81 return PCIBIOS_SUCCESSFUL;
82}
83
84static int
85indirect_write_config_pcie(struct pci_bus *bus, unsigned int devfn, int offset,
86 int len, u32 val)
87{
88 struct pci_controller *hose = bus->sysdata;
89 volatile void __iomem *cfg_data;
90 u32 temp;
91
92 if (ppc_md.pci_exclude_device)
93 if (ppc_md.pci_exclude_device(bus->number, devfn))
94 return PCIBIOS_DEVICE_NOT_FOUND;
95
96 /* Possible artifact of CDCpp50937 needs further investigation */
97 if (devfn != 0x0 && bus->number == 0xff)
98 return PCIBIOS_DEVICE_NOT_FOUND;
99
100 PCIE_FIX;
101 if (bus->number == 0xff) {
102 PCI_CFG_OUT(hose->cfg_addr,
103 (0x80000000 | ((offset & 0xf00) << 16) |
104 ((bus->number - hose->bus_offset) << 16)
105 | (devfn << 8) | ((offset & 0xfc) )));
106 } else {
107 PCI_CFG_OUT(hose->cfg_addr,
108 (0x80000001 | ((offset & 0xf00) << 16) |
109 ((bus->number - hose->bus_offset) << 16)
110 | (devfn << 8) | ((offset & 0xfc) )));
111 }
112
113 /*
114 * Note: the caller has already checked that offset is
115 * suitably aligned and that len is 1, 2 or 4.
116 */
117 /* ERRATA PCI-Ex 12 - Configuration Address/Data Alignment */
118 cfg_data = hose->cfg_data;
119 switch (len) {
120 case 1:
121 PCIE_FIX;
122 temp = in_le32(cfg_data);
123 temp = (temp & ~(0xff << ((offset & 3) * 8))) |
124 (val << ((offset & 3) * 8));
125 PCIE_FIX;
126 out_le32(cfg_data, temp);
127 break;
128 case 2:
129 PCIE_FIX;
130 temp = in_le32(cfg_data);
131 temp = (temp & ~(0xffff << ((offset & 3) * 8)));
132 temp |= (val << ((offset & 3) * 8)) ;
133 PCIE_FIX;
134 out_le32(cfg_data, temp);
135 break;
136 default:
137 PCIE_FIX;
138 out_le32(cfg_data, val);
139 break;
140 }
141 PCIE_FIX;
142 return PCIBIOS_SUCCESSFUL;
143}
144
145static struct pci_ops indirect_pcie_ops = {
146 indirect_read_config_pcie,
147 indirect_write_config_pcie
148};
149
150void __init
151setup_indirect_pcie_nomap(struct pci_controller* hose, void __iomem * cfg_addr,
152 void __iomem * cfg_data)
153{
154 hose->cfg_addr = cfg_addr;
155 hose->cfg_data = cfg_data;
156 hose->ops = &indirect_pcie_ops;
157}
158
159void __init
160setup_indirect_pcie(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
161{
162 unsigned long base = cfg_addr & PAGE_MASK;
163 void __iomem *mbase, *addr, *data;
164
165 mbase = ioremap(base, PAGE_SIZE);
166 addr = mbase + (cfg_addr & ~PAGE_MASK);
167 if ((cfg_data & PAGE_MASK) != base)
168 mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE);
169 data = mbase + (cfg_data & ~PAGE_MASK);
170 setup_indirect_pcie_nomap(hose, addr, data);
171}
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index cad1757243..c0ddc80d81 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -1028,6 +1028,19 @@ err:
1028 1028
1029arch_initcall(fs_enet_of_init); 1029arch_initcall(fs_enet_of_init);
1030 1030
1031static int __init fsl_pcmcia_of_init(void)
1032{
1033 struct device_node *np = NULL;
1034 /*
1035 * Register all the devices which type is "pcmcia"
1036 */
1037 while ((np = of_find_compatible_node(np,
1038 "pcmcia", "fsl,pq-pcmcia")) != NULL)
1039 of_platform_device_create(np, "m8xx-pcmcia", NULL);
1040 return 0;
1041}
1042
1043arch_initcall(fsl_pcmcia_of_init);
1031 1044
1032static const char *smc_regs = "regs"; 1045static const char *smc_regs = "regs";
1033static const char *smc_pram = "pram"; 1046static const char *smc_pram = "pram";
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c
index e714884697..c7e6e859b3 100644
--- a/arch/powerpc/sysdev/indirect_pci.c
+++ b/arch/powerpc/sysdev/indirect_pci.c
@@ -33,18 +33,27 @@ indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
33 struct pci_controller *hose = bus->sysdata; 33 struct pci_controller *hose = bus->sysdata;
34 volatile void __iomem *cfg_data; 34 volatile void __iomem *cfg_data;
35 u8 cfg_type = 0; 35 u8 cfg_type = 0;
36 u32 bus_no, reg;
36 37
37 if (ppc_md.pci_exclude_device) 38 if (ppc_md.pci_exclude_device)
38 if (ppc_md.pci_exclude_device(bus->number, devfn)) 39 if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
39 return PCIBIOS_DEVICE_NOT_FOUND; 40 return PCIBIOS_DEVICE_NOT_FOUND;
40 41
41 if (hose->set_cfg_type) 42 if (hose->indirect_type & PPC_INDIRECT_TYPE_SET_CFG_TYPE)
42 if (bus->number != hose->first_busno) 43 if (bus->number != hose->first_busno)
43 cfg_type = 1; 44 cfg_type = 1;
44 45
45 PCI_CFG_OUT(hose->cfg_addr, 46 bus_no = (bus->number == hose->first_busno) ?
46 (0x80000000 | ((bus->number - hose->bus_offset) << 16) 47 hose->self_busno : bus->number;
47 | (devfn << 8) | ((offset & 0xfc) | cfg_type))); 48
49 if (hose->indirect_type & PPC_INDIRECT_TYPE_EXT_REG)
50 reg = ((offset & 0xf00) << 16) | (offset & 0xfc);
51 else
52 reg = offset & 0xfc;
53
54 PCI_CFG_OUT(hose->cfg_addr,
55 (0x80000000 | (bus_no << 16)
56 | (devfn << 8) | reg | cfg_type));
48 57
49 /* 58 /*
50 * Note: the caller has already checked that offset is 59 * Note: the caller has already checked that offset is
@@ -72,18 +81,33 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
72 struct pci_controller *hose = bus->sysdata; 81 struct pci_controller *hose = bus->sysdata;
73 volatile void __iomem *cfg_data; 82 volatile void __iomem *cfg_data;
74 u8 cfg_type = 0; 83 u8 cfg_type = 0;
84 u32 bus_no, reg;
75 85
76 if (ppc_md.pci_exclude_device) 86 if (ppc_md.pci_exclude_device)
77 if (ppc_md.pci_exclude_device(bus->number, devfn)) 87 if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
78 return PCIBIOS_DEVICE_NOT_FOUND; 88 return PCIBIOS_DEVICE_NOT_FOUND;
79 89
80 if (hose->set_cfg_type) 90 if (hose->indirect_type & PPC_INDIRECT_TYPE_SET_CFG_TYPE)
81 if (bus->number != hose->first_busno) 91 if (bus->number != hose->first_busno)
82 cfg_type = 1; 92 cfg_type = 1;
83 93
84 PCI_CFG_OUT(hose->cfg_addr, 94 bus_no = (bus->number == hose->first_busno) ?
85 (0x80000000 | ((bus->number - hose->bus_offset) << 16) 95 hose->self_busno : bus->number;
86 | (devfn << 8) | ((offset & 0xfc) | cfg_type))); 96
97 if (hose->indirect_type & PPC_INDIRECT_TYPE_EXT_REG)
98 reg = ((offset & 0xf00) << 16) | (offset & 0xfc);
99 else
100 reg = offset & 0xfc;
101
102 PCI_CFG_OUT(hose->cfg_addr,
103 (0x80000000 | (bus_no << 16)
104 | (devfn << 8) | reg | cfg_type));
105
106 /* surpress setting of PCI_PRIMARY_BUS */
107 if (hose->indirect_type & PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS)
108 if ((offset == PCI_PRIMARY_BUS) &&
109 (bus->number == hose->first_busno))
110 val &= 0xffffff00;
87 111
88 /* 112 /*
89 * Note: the caller has already checked that offset is 113 * Note: the caller has already checked that offset is
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.h b/arch/powerpc/sysdev/mpc8xx_pic.h
index afa2ee6717..9fe00eebdc 100644
--- a/arch/powerpc/sysdev/mpc8xx_pic.h
+++ b/arch/powerpc/sysdev/mpc8xx_pic.h
@@ -4,9 +4,16 @@
4#include <linux/irq.h> 4#include <linux/irq.h>
5#include <linux/interrupt.h> 5#include <linux/interrupt.h>
6 6
7extern struct hw_interrupt_type mpc8xx_pic;
8
9int mpc8xx_pic_init(void); 7int mpc8xx_pic_init(void);
10unsigned int mpc8xx_get_irq(void); 8unsigned int mpc8xx_get_irq(void);
11 9
10/*
11 * Some internal interrupt registers use an 8-bit mask for the interrupt
12 * level instead of a number.
13 */
14static inline uint mk_int_int_mask(uint mask)
15{
16 return (1 << (7 - (mask/2)));
17}
18
12#endif /* _PPC_KERNEL_PPC8xx_H */ 19#endif /* _PPC_KERNEL_PPC8xx_H */
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c
index 4b0a9c88ee..b618fa60ae 100644
--- a/arch/powerpc/sysdev/mv64x60_dev.c
+++ b/arch/powerpc/sysdev/mv64x60_dev.c
@@ -12,6 +12,7 @@
12#include <linux/stddef.h> 12#include <linux/stddef.h>
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/console.h>
15#include <linux/mv643xx.h> 16#include <linux/mv643xx.h>
16#include <linux/platform_device.h> 17#include <linux/platform_device.h>
17 18
@@ -420,3 +421,30 @@ error:
420 return err; 421 return err;
421} 422}
422arch_initcall(mv64x60_device_setup); 423arch_initcall(mv64x60_device_setup);
424
425static int __init mv64x60_add_mpsc_console(void)
426{
427 struct device_node *np = NULL;
428 const char *prop;
429
430 prop = of_get_property(of_chosen, "linux,stdout-path", NULL);
431 if (prop == NULL)
432 goto not_mpsc;
433
434 np = of_find_node_by_path(prop);
435 if (!np)
436 goto not_mpsc;
437
438 if (!of_device_is_compatible(np, "marvell,mpsc"))
439 goto not_mpsc;
440
441 prop = of_get_property(np, "block-index", NULL);
442 if (!prop)
443 goto not_mpsc;
444
445 add_preferred_console("ttyMM", *(int *)prop, NULL);
446
447not_mpsc:
448 return 0;
449}
450console_initcall(mv64x60_add_mpsc_console);
diff --git a/arch/powerpc/sysdev/mv64x60_pci.c b/arch/powerpc/sysdev/mv64x60_pci.c
index b5aef4cbc8..45db86c236 100644
--- a/arch/powerpc/sysdev/mv64x60_pci.c
+++ b/arch/powerpc/sysdev/mv64x60_pci.c
@@ -137,18 +137,15 @@ static int __init mv64x60_add_bridge(struct device_node *dev)
137 printk(KERN_WARNING "Can't get bus-range for %s, assume" 137 printk(KERN_WARNING "Can't get bus-range for %s, assume"
138 " bus 0\n", dev->full_name); 138 " bus 0\n", dev->full_name);
139 139
140 hose = pcibios_alloc_controller(); 140 hose = pcibios_alloc_controller(dev);
141 if (!hose) 141 if (!hose)
142 return -ENOMEM; 142 return -ENOMEM;
143 143
144 hose->arch_data = dev;
145 hose->set_cfg_type = 1;
146
147 hose->first_busno = bus_range ? bus_range[0] : 0; 144 hose->first_busno = bus_range ? bus_range[0] : 0;
148 hose->last_busno = bus_range ? bus_range[1] : 0xff; 145 hose->last_busno = bus_range ? bus_range[1] : 0xff;
149 146
150 setup_indirect_pci(hose, rsrc.start, rsrc.start + 4); 147 setup_indirect_pci(hose, rsrc.start, rsrc.start + 4);
151 hose->bus_offset = hose->first_busno; 148 hose->self_busno = hose->first_busno;
152 149
153 printk(KERN_INFO "Found MV64x60 PCI host bridge at 0x%016llx. " 150 printk(KERN_INFO "Found MV64x60 PCI host bridge at 0x%016llx. "
154 "Firmware bus number: %d->%d\n", 151 "Firmware bus number: %d->%d\n",
diff --git a/arch/powerpc/sysdev/qe_lib/ucc.c b/arch/powerpc/sysdev/qe_lib/ucc.c
index ac12a44d51..f970e5415a 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc.c
@@ -18,6 +18,7 @@
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20#include <linux/stddef.h> 20#include <linux/stddef.h>
21#include <linux/module.h>
21 22
22#include <asm/irq.h> 23#include <asm/irq.h>
23#include <asm/io.h> 24#include <asm/io.h>
@@ -40,6 +41,7 @@ int ucc_set_qe_mux_mii_mng(int ucc_num)
40 41
41 return 0; 42 return 0;
42} 43}
44EXPORT_SYMBOL(ucc_set_qe_mux_mii_mng);
43 45
44int ucc_set_type(int ucc_num, struct ucc_common *regs, 46int ucc_set_type(int ucc_num, struct ucc_common *regs,
45 enum ucc_speed_type speed) 47 enum ucc_speed_type speed)
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_fast.c b/arch/powerpc/sysdev/qe_lib/ucc_fast.c
index 9143236853..3df202e8d3 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc_fast.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc_fast.c
@@ -19,6 +19,7 @@
19#include <linux/stddef.h> 19#include <linux/stddef.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21#include <linux/err.h> 21#include <linux/err.h>
22#include <linux/module.h>
22 23
23#include <asm/io.h> 24#include <asm/io.h>
24#include <asm/immap_qe.h> 25#include <asm/immap_qe.h>
@@ -70,6 +71,7 @@ void ucc_fast_dump_regs(struct ucc_fast_private * uccf)
70 printk(KERN_INFO "guemr : addr - 0x%08x, val - 0x%02x", 71 printk(KERN_INFO "guemr : addr - 0x%08x, val - 0x%02x",
71 (u32) & uccf->uf_regs->guemr, uccf->uf_regs->guemr); 72 (u32) & uccf->uf_regs->guemr, uccf->uf_regs->guemr);
72} 73}
74EXPORT_SYMBOL(ucc_fast_dump_regs);
73 75
74u32 ucc_fast_get_qe_cr_subblock(int uccf_num) 76u32 ucc_fast_get_qe_cr_subblock(int uccf_num)
75{ 77{
@@ -85,11 +87,13 @@ u32 ucc_fast_get_qe_cr_subblock(int uccf_num)
85 default: return QE_CR_SUBBLOCK_INVALID; 87 default: return QE_CR_SUBBLOCK_INVALID;
86 } 88 }
87} 89}
90EXPORT_SYMBOL(ucc_fast_get_qe_cr_subblock);
88 91
89void ucc_fast_transmit_on_demand(struct ucc_fast_private * uccf) 92void ucc_fast_transmit_on_demand(struct ucc_fast_private * uccf)
90{ 93{
91 out_be16(&uccf->uf_regs->utodr, UCC_FAST_TOD); 94 out_be16(&uccf->uf_regs->utodr, UCC_FAST_TOD);
92} 95}
96EXPORT_SYMBOL(ucc_fast_transmit_on_demand);
93 97
94void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir mode) 98void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir mode)
95{ 99{
@@ -110,6 +114,7 @@ void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir mode)
110 } 114 }
111 out_be32(&uf_regs->gumr, gumr); 115 out_be32(&uf_regs->gumr, gumr);
112} 116}
117EXPORT_SYMBOL(ucc_fast_enable);
113 118
114void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir mode) 119void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir mode)
115{ 120{
@@ -130,6 +135,7 @@ void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir mode)
130 } 135 }
131 out_be32(&uf_regs->gumr, gumr); 136 out_be32(&uf_regs->gumr, gumr);
132} 137}
138EXPORT_SYMBOL(ucc_fast_disable);
133 139
134int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** uccf_ret) 140int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** uccf_ret)
135{ 141{
@@ -341,6 +347,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
341 *uccf_ret = uccf; 347 *uccf_ret = uccf;
342 return 0; 348 return 0;
343} 349}
350EXPORT_SYMBOL(ucc_fast_init);
344 351
345void ucc_fast_free(struct ucc_fast_private * uccf) 352void ucc_fast_free(struct ucc_fast_private * uccf)
346{ 353{
@@ -355,3 +362,4 @@ void ucc_fast_free(struct ucc_fast_private * uccf)
355 362
356 kfree(uccf); 363 kfree(uccf);
357} 364}
365EXPORT_SYMBOL(ucc_fast_free);
diff --git a/arch/powerpc/sysdev/rtc_cmos_setup.c b/arch/powerpc/sysdev/rtc_cmos_setup.c
new file mode 100644
index 0000000000..e276048b8c
--- /dev/null
+++ b/arch/powerpc/sysdev/rtc_cmos_setup.c
@@ -0,0 +1,49 @@
1/*
2 * Setup code for PC-style Real-Time Clock.
3 *
4 * Author: Wade Farnsworth <wfarnsworth@mvista.com>
5 *
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11
12#include <linux/platform_device.h>
13#include <linux/err.h>
14#include <linux/init.h>
15#include <linux/mc146818rtc.h>
16
17#include <asm/prom.h>
18
19static int __init add_rtc(void)
20{
21 struct device_node *np;
22 struct platform_device *pd;
23 struct resource res;
24 int ret;
25
26 np = of_find_compatible_node(NULL, NULL, "pnpPNP,b00");
27 if (!np)
28 return -ENODEV;
29
30 ret = of_address_to_resource(np, 0, &res);
31 of_node_put(np);
32 if (ret)
33 return ret;
34
35 /*
36 * RTC_PORT(x) is hardcoded in asm/mc146818rtc.h. Verify that the
37 * address provided by the device node matches.
38 */
39 if (res.start != RTC_PORT(0))
40 return -EINVAL;
41
42 pd = platform_device_register_simple("rtc_cmos", -1,
43 &res, 1);
44 if (IS_ERR(pd))
45 return PTR_ERR(pd);
46
47 return 0;
48}
49fs_initcall(add_rtc);
diff --git a/arch/powerpc/sysdev/timer.c b/arch/powerpc/sysdev/timer.c
index 4a01748b42..e81e7ec2e7 100644
--- a/arch/powerpc/sysdev/timer.c
+++ b/arch/powerpc/sysdev/timer.c
@@ -24,7 +24,12 @@ static int timer_resume(struct sys_device *dev)
24 24
25 /* get current RTC time and convert to seconds */ 25 /* get current RTC time and convert to seconds */
26 get_rtc_time(&cur_rtc_tm); 26 get_rtc_time(&cur_rtc_tm);
27 rtc_tm_to_time(&cur_rtc_tm, &cur_rtc_time); 27 cur_rtc_time = mktime(cur_rtc_tm.tm_year + 1900,
28 cur_rtc_tm.tm_mon + 1,
29 cur_rtc_tm.tm_mday,
30 cur_rtc_tm.tm_hour,
31 cur_rtc_tm.tm_min,
32 cur_rtc_tm.tm_sec);
28 33
29 diff = cur_rtc_time - suspend_rtc_time; 34 diff = cur_rtc_time - suspend_rtc_time;
30 35
@@ -44,7 +49,12 @@ static int timer_suspend(struct sys_device *dev, pm_message_t state)
44 WARN_ON(!ppc_md.get_rtc_time); 49 WARN_ON(!ppc_md.get_rtc_time);
45 50
46 get_rtc_time(&suspend_rtc_tm); 51 get_rtc_time(&suspend_rtc_tm);
47 rtc_tm_to_time(&suspend_rtc_tm, &suspend_rtc_time); 52 suspend_rtc_time = mktime(suspend_rtc_tm.tm_year + 1900,
53 suspend_rtc_tm.tm_mon + 1,
54 suspend_rtc_tm.tm_mday,
55 suspend_rtc_tm.tm_hour,
56 suspend_rtc_tm.tm_min,
57 suspend_rtc_tm.tm_sec);
48 58
49 return 0; 59 return 0;
50} 60}
diff --git a/arch/powerpc/sysdev/tsi108_dev.c b/arch/powerpc/sysdev/tsi108_dev.c
index 7d3b09b7d5..a113d800cb 100644
--- a/arch/powerpc/sysdev/tsi108_dev.c
+++ b/arch/powerpc/sysdev/tsi108_dev.c
@@ -72,12 +72,11 @@ static int __init tsi108_eth_of_init(void)
72 int ret; 72 int ret;
73 73
74 for (np = NULL, i = 0; 74 for (np = NULL, i = 0;
75 (np = of_find_compatible_node(np, "network", "tsi-ethernet")) != NULL; 75 (np = of_find_compatible_node(np, "network", "tsi108-ethernet")) != NULL;
76 i++) { 76 i++) {
77 struct resource r[2]; 77 struct resource r[2];
78 struct device_node *phy; 78 struct device_node *phy, *mdio;
79 hw_info tsi_eth_data; 79 hw_info tsi_eth_data;
80 const unsigned int *id;
81 const unsigned int *phy_id; 80 const unsigned int *phy_id;
82 const void *mac_addr; 81 const void *mac_addr;
83 const phandle *ph; 82 const phandle *ph;
@@ -111,6 +110,13 @@ static int __init tsi108_eth_of_init(void)
111 if (mac_addr) 110 if (mac_addr)
112 memcpy(tsi_eth_data.mac_addr, mac_addr, 6); 111 memcpy(tsi_eth_data.mac_addr, mac_addr, 6);
113 112
113 ph = of_get_property(np, "mdio-handle", NULL);
114 mdio = of_find_node_by_phandle(*ph);
115 ret = of_address_to_resource(mdio, 0, &res);
116 of_node_put(mdio);
117 if (ret)
118 goto unreg;
119
114 ph = of_get_property(np, "phy-handle", NULL); 120 ph = of_get_property(np, "phy-handle", NULL);
115 phy = of_find_node_by_phandle(*ph); 121 phy = of_find_node_by_phandle(*ph);
116 122
@@ -119,20 +125,25 @@ static int __init tsi108_eth_of_init(void)
119 goto unreg; 125 goto unreg;
120 } 126 }
121 127
122 id = of_get_property(phy, "reg", NULL); 128 phy_id = of_get_property(phy, "reg", NULL);
123 phy_id = of_get_property(phy, "phy-id", NULL); 129
124 ret = of_address_to_resource(phy, 0, &res);
125 if (ret) {
126 of_node_put(phy);
127 goto unreg;
128 }
129 tsi_eth_data.regs = r[0].start; 130 tsi_eth_data.regs = r[0].start;
130 tsi_eth_data.phyregs = res.start; 131 tsi_eth_data.phyregs = res.start;
131 tsi_eth_data.phy = *phy_id; 132 tsi_eth_data.phy = *phy_id;
132 tsi_eth_data.irq_num = irq_of_parse_and_map(np, 0); 133 tsi_eth_data.irq_num = irq_of_parse_and_map(np, 0);
133 if (of_device_is_compatible(phy, "bcm54xx")) 134
135 /* Some boards with the TSI108 bridge (e.g. Holly)
136 * have a miswiring of the ethernet PHYs which
137 * requires a workaround. The special
138 * "txc-rxc-delay-disable" property enables this
139 * workaround. FIXME: Need to port the tsi108_eth
140 * driver itself to phylib and use a non-misleading
141 * name for the workaround flag - it's not actually to
142 * do with the model of PHY in use */
143 if (of_get_property(phy, "txc-rxc-delay-disable", NULL))
134 tsi_eth_data.phy_type = TSI108_PHY_BCM54XX; 144 tsi_eth_data.phy_type = TSI108_PHY_BCM54XX;
135 of_node_put(phy); 145 of_node_put(phy);
146
136 ret = 147 ret =
137 platform_device_add_data(tsi_eth_dev, &tsi_eth_data, 148 platform_device_add_data(tsi_eth_dev, &tsi_eth_data,
138 sizeof(hw_info)); 149 sizeof(hw_info));
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c
index 2153163fa5..90db8a720f 100644
--- a/arch/powerpc/sysdev/tsi108_pci.c
+++ b/arch/powerpc/sysdev/tsi108_pci.c
@@ -64,9 +64,10 @@ tsi108_direct_write_config(struct pci_bus *bus, unsigned int devfunc,
64 int offset, int len, u32 val) 64 int offset, int len, u32 val)
65{ 65{
66 volatile unsigned char *cfg_addr; 66 volatile unsigned char *cfg_addr;
67 struct pci_controller *hose = bus->sysdata;
67 68
68 if (ppc_md.pci_exclude_device) 69 if (ppc_md.pci_exclude_device)
69 if (ppc_md.pci_exclude_device(bus->number, devfunc)) 70 if (ppc_md.pci_exclude_device(hose, bus->number, devfunc))
70 return PCIBIOS_DEVICE_NOT_FOUND; 71 return PCIBIOS_DEVICE_NOT_FOUND;
71 72
72 cfg_addr = (unsigned char *)(tsi_mk_config_addr(bus->number, 73 cfg_addr = (unsigned char *)(tsi_mk_config_addr(bus->number,
@@ -149,10 +150,11 @@ tsi108_direct_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
149 int len, u32 * val) 150 int len, u32 * val)
150{ 151{
151 volatile unsigned char *cfg_addr; 152 volatile unsigned char *cfg_addr;
153 struct pci_controller *hose = bus->sysdata;
152 u32 temp; 154 u32 temp;
153 155
154 if (ppc_md.pci_exclude_device) 156 if (ppc_md.pci_exclude_device)
155 if (ppc_md.pci_exclude_device(bus->number, devfn)) 157 if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
156 return PCIBIOS_DEVICE_NOT_FOUND; 158 return PCIBIOS_DEVICE_NOT_FOUND;
157 159
158 cfg_addr = (unsigned char *)(tsi_mk_config_addr(bus->number, 160 cfg_addr = (unsigned char *)(tsi_mk_config_addr(bus->number,
@@ -219,14 +221,12 @@ int __init tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary)
219 " bus 0\n", dev->full_name); 221 " bus 0\n", dev->full_name);
220 } 222 }
221 223
222 hose = pcibios_alloc_controller(); 224 hose = pcibios_alloc_controller(dev);
223 225
224 if (!hose) { 226 if (!hose) {
225 printk("PCI Host bridge init failed\n"); 227 printk("PCI Host bridge init failed\n");
226 return -ENOMEM; 228 return -ENOMEM;
227 } 229 }
228 hose->arch_data = dev;
229 hose->set_cfg_type = 1;
230 230
231 hose->first_busno = bus_range ? bus_range[0] : 0; 231 hose->first_busno = bus_range ? bus_range[0] : 0;
232 hose->last_busno = bus_range ? bus_range[1] : 0xff; 232 hose->last_busno = bus_range ? bus_range[1] : 0xff;
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 28fdf4f50c..669e6566ad 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -2634,7 +2634,7 @@ static int __init setup_xmon_sysrq(void)
2634__initcall(setup_xmon_sysrq); 2634__initcall(setup_xmon_sysrq);
2635#endif /* CONFIG_MAGIC_SYSRQ */ 2635#endif /* CONFIG_MAGIC_SYSRQ */
2636 2636
2637int __initdata xmon_early, xmon_off; 2637static int __initdata xmon_early, xmon_off;
2638 2638
2639static int __init early_parse_xmon(char *p) 2639static int __init early_parse_xmon(char *p)
2640{ 2640{
diff --git a/arch/ppc/8260_io/enet.c b/arch/ppc/8260_io/enet.c
index 4c0a7d732f..615b6583d9 100644
--- a/arch/ppc/8260_io/enet.c
+++ b/arch/ppc/8260_io/enet.c
@@ -477,9 +477,9 @@ for (;;) {
477 } 477 }
478 else { 478 else {
479 skb_put(skb,pkt_len-4); /* Make room */ 479 skb_put(skb,pkt_len-4); /* Make room */
480 eth_copy_and_sum(skb, 480 skb_copy_to_linear_data(skb,
481 (unsigned char *)__va(bdp->cbd_bufaddr), 481 (unsigned char *)__va(bdp->cbd_bufaddr),
482 pkt_len-4, 0); 482 pkt_len-4);
483 skb->protocol=eth_type_trans(skb,dev); 483 skb->protocol=eth_type_trans(skb,dev);
484 netif_rx(skb); 484 netif_rx(skb);
485 } 485 }
diff --git a/arch/ppc/8260_io/fcc_enet.c b/arch/ppc/8260_io/fcc_enet.c
index cab395da25..6f3ed6a72e 100644
--- a/arch/ppc/8260_io/fcc_enet.c
+++ b/arch/ppc/8260_io/fcc_enet.c
@@ -734,9 +734,9 @@ for (;;) {
734 } 734 }
735 else { 735 else {
736 skb_put(skb,pkt_len); /* Make room */ 736 skb_put(skb,pkt_len); /* Make room */
737 eth_copy_and_sum(skb, 737 skb_copy_to_linear_data(skb,
738 (unsigned char *)__va(bdp->cbd_bufaddr), 738 (unsigned char *)__va(bdp->cbd_bufaddr),
739 pkt_len, 0); 739 pkt_len);
740 skb->protocol=eth_type_trans(skb,dev); 740 skb->protocol=eth_type_trans(skb,dev);
741 netif_rx(skb); 741 netif_rx(skb);
742 } 742 }
diff --git a/arch/ppc/8xx_io/enet.c b/arch/ppc/8xx_io/enet.c
index e58288e143..703d47eee4 100644
--- a/arch/ppc/8xx_io/enet.c
+++ b/arch/ppc/8xx_io/enet.c
@@ -506,9 +506,9 @@ for (;;) {
506 } 506 }
507 else { 507 else {
508 skb_put(skb,pkt_len-4); /* Make room */ 508 skb_put(skb,pkt_len-4); /* Make room */
509 eth_copy_and_sum(skb, 509 skb_copy_to_linear_data(skb,
510 cep->rx_vaddr[bdp - cep->rx_bd_base], 510 cep->rx_vaddr[bdp - cep->rx_bd_base],
511 pkt_len-4, 0); 511 pkt_len-4);
512 skb->protocol=eth_type_trans(skb,dev); 512 skb->protocol=eth_type_trans(skb,dev);
513 netif_rx(skb); 513 netif_rx(skb);
514 } 514 }
diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c
index d38335d2d7..0288279be9 100644
--- a/arch/ppc/8xx_io/fec.c
+++ b/arch/ppc/8xx_io/fec.c
@@ -725,7 +725,7 @@ while (!(bdp->cbd_sc & BD_ENET_RX_EMPTY)) {
725 fep->stats.rx_dropped++; 725 fep->stats.rx_dropped++;
726 } else { 726 } else {
727 skb_put(skb,pkt_len-4); /* Make room */ 727 skb_put(skb,pkt_len-4); /* Make room */
728 eth_copy_and_sum(skb, data, pkt_len-4, 0); 728 skb_copy_to_linear_data(skb, data, pkt_len-4);
729 skb->protocol=eth_type_trans(skb,dev); 729 skb->protocol=eth_type_trans(skb,dev);
730 netif_rx(skb); 730 netif_rx(skb);
731 } 731 }
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index ccce2a4a15..6bdeeb70b1 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -1237,8 +1237,10 @@ config PCI
1237 infrastructure code to support PCI bus devices. 1237 infrastructure code to support PCI bus devices.
1238 1238
1239config PCI_DOMAINS 1239config PCI_DOMAINS
1240 bool 1240 def_bool PCI
1241 default PCI 1241
1242config PCI_SYSCALL
1243 def_bool PCI
1242 1244
1243config MPC83xx_PCI2 1245config MPC83xx_PCI2
1244 bool "Support for 2nd PCI host controller" 1246 bool "Support for 2nd PCI host controller"
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S
index d319f9ba23..0da5536865 100644
--- a/arch/ppc/kernel/misc.S
+++ b/arch/ppc/kernel/misc.S
@@ -328,7 +328,7 @@ BEGIN_FTR_SECTION
328 mtspr SPRN_L1CSR0,r3 328 mtspr SPRN_L1CSR0,r3
329 isync 329 isync
330 blr 330 blr
331END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 331END_FTR_SECTION_IFSET(CPU_FTR_UNIFIED_ID_CACHE)
332 mfspr r3,SPRN_L1CSR1 332 mfspr r3,SPRN_L1CSR1
333 ori r3,r3,L1CSR1_ICFI|L1CSR1_ICLFR 333 ori r3,r3,L1CSR1_ICFI|L1CSR1_ICLFR
334 mtspr SPRN_L1CSR1,r3 334 mtspr SPRN_L1CSR1,r3
@@ -355,7 +355,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE)
355_GLOBAL(__flush_icache_range) 355_GLOBAL(__flush_icache_range)
356BEGIN_FTR_SECTION 356BEGIN_FTR_SECTION
357 blr /* for 601, do nothing */ 357 blr /* for 601, do nothing */
358END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 358END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
359 li r5,L1_CACHE_BYTES-1 359 li r5,L1_CACHE_BYTES-1
360 andc r3,r3,r5 360 andc r3,r3,r5
361 subf r4,r3,r4 361 subf r4,r3,r4
@@ -472,7 +472,7 @@ _GLOBAL(flush_dcache_all)
472_GLOBAL(__flush_dcache_icache) 472_GLOBAL(__flush_dcache_icache)
473BEGIN_FTR_SECTION 473BEGIN_FTR_SECTION
474 blr /* for 601, do nothing */ 474 blr /* for 601, do nothing */
475END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 475END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
476 rlwinm r3,r3,0,0,19 /* Get page base address */ 476 rlwinm r3,r3,0,0,19 /* Get page base address */
477 li r4,4096/L1_CACHE_BYTES /* Number of lines in a page */ 477 li r4,4096/L1_CACHE_BYTES /* Number of lines in a page */
478 mtctr r4 478 mtctr r4
@@ -500,7 +500,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE)
500_GLOBAL(__flush_dcache_icache_phys) 500_GLOBAL(__flush_dcache_icache_phys)
501BEGIN_FTR_SECTION 501BEGIN_FTR_SECTION
502 blr /* for 601, do nothing */ 502 blr /* for 601, do nothing */
503END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 503END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
504 mfmsr r10 504 mfmsr r10
505 rlwinm r0,r10,0,28,26 /* clear DR */ 505 rlwinm r0,r10,0,28,26 /* clear DR */
506 mtmsr r0 506 mtmsr r0
diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c
index 5e723c4c25..c2ec13bea0 100644
--- a/arch/ppc/kernel/pci.c
+++ b/arch/ppc/kernel/pci.c
@@ -633,12 +633,6 @@ void pcibios_make_OF_bus_map(void)
633{ 633{
634} 634}
635 635
636/* Add sysfs properties */
637void pcibios_add_platform_entries(struct pci_dev *pdev)
638{
639}
640
641
642static int __init 636static int __init
643pcibios_init(void) 637pcibios_init(void)
644{ 638{
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index a4165209ac..63f0a98713 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -64,7 +64,6 @@ extern unsigned long mm_ptov (unsigned long paddr);
64 64
65EXPORT_SYMBOL(clear_pages); 65EXPORT_SYMBOL(clear_pages);
66EXPORT_SYMBOL(clear_user_page); 66EXPORT_SYMBOL(clear_user_page);
67EXPORT_SYMBOL(do_signal);
68EXPORT_SYMBOL(transfer_to_handler); 67EXPORT_SYMBOL(transfer_to_handler);
69EXPORT_SYMBOL(do_IRQ); 68EXPORT_SYMBOL(do_IRQ);
70EXPORT_SYMBOL(machine_check_exception); 69EXPORT_SYMBOL(machine_check_exception);
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
index c79704f540..967c1ef59a 100644
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -526,7 +526,7 @@ void __init setup_arch(char **cmdline_p)
526 * Systems with OF can look in the properties on the cpu node(s) 526 * Systems with OF can look in the properties on the cpu node(s)
527 * for a possibly more accurate value. 527 * for a possibly more accurate value.
528 */ 528 */
529 if (cpu_has_feature(CPU_FTR_SPLIT_ID_CACHE)) { 529 if (! cpu_has_feature(CPU_FTR_UNIFIED_ID_CACHE)) {
530 dcache_bsize = cur_cpu_spec->dcache_bsize; 530 dcache_bsize = cur_cpu_spec->dcache_bsize;
531 icache_bsize = cur_cpu_spec->icache_bsize; 531 icache_bsize = cur_cpu_spec->icache_bsize;
532 ucache_bsize = 0; 532 ucache_bsize = 0;
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c
index aea100be52..3f3b292eb7 100644
--- a/arch/ppc/kernel/traps.c
+++ b/arch/ppc/kernel/traps.c
@@ -92,6 +92,7 @@ int die(const char * str, struct pt_regs * fp, long err)
92 if (nl) 92 if (nl)
93 printk("\n"); 93 printk("\n");
94 show_regs(fp); 94 show_regs(fp);
95 add_taint(TAINT_DIE);
95 spin_unlock_irq(&die_lock); 96 spin_unlock_irq(&die_lock);
96 /* do_exit() should take care of panic'ing from an interrupt 97 /* do_exit() should take care of panic'ing from an interrupt
97 * context so we don't handle it here 98 * context so we don't handle it here
@@ -619,7 +620,7 @@ void program_check_exception(struct pt_regs *regs)
619 return; 620 return;
620 621
621 if (!(regs->msr & MSR_PR) && /* not user-mode */ 622 if (!(regs->msr & MSR_PR) && /* not user-mode */
622 report_bug(regs->nip) == BUG_TRAP_TYPE_WARN) { 623 report_bug(regs->nip, regs) == BUG_TRAP_TYPE_WARN) {
623 regs->nip += 4; 624 regs->nip += 4;
624 return; 625 return;
625 } 626 }
diff --git a/arch/ppc/mm/tlb.c b/arch/ppc/mm/tlb.c
index fa29740a28..4ff260bc9d 100644
--- a/arch/ppc/mm/tlb.c
+++ b/arch/ppc/mm/tlb.c
@@ -27,6 +27,7 @@
27#include <linux/mm.h> 27#include <linux/mm.h>
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/highmem.h> 29#include <linux/highmem.h>
30#include <linux/pagemap.h>
30#include <asm/tlbflush.h> 31#include <asm/tlbflush.h>
31#include <asm/tlb.h> 32#include <asm/tlb.h>
32 33
diff --git a/arch/ppc/platforms/4xx/bamboo.c b/arch/ppc/platforms/4xx/bamboo.c
index 349660b84a..017623c9bc 100644
--- a/arch/ppc/platforms/4xx/bamboo.c
+++ b/arch/ppc/platforms/4xx/bamboo.c
@@ -29,6 +29,7 @@
29#include <linux/tty.h> 29#include <linux/tty.h>
30#include <linux/serial.h> 30#include <linux/serial.h>
31#include <linux/serial_core.h> 31#include <linux/serial_core.h>
32#include <linux/serial_8250.h>
32#include <linux/ethtool.h> 33#include <linux/ethtool.h>
33 34
34#include <asm/system.h> 35#include <asm/system.h>
diff --git a/arch/ppc/platforms/4xx/bubinga.c b/arch/ppc/platforms/4xx/bubinga.c
index 1a7f075b75..cd696be55a 100644
--- a/arch/ppc/platforms/4xx/bubinga.c
+++ b/arch/ppc/platforms/4xx/bubinga.c
@@ -21,6 +21,7 @@
21#include <linux/tty.h> 21#include <linux/tty.h>
22#include <linux/serial.h> 22#include <linux/serial.h>
23#include <linux/serial_core.h> 23#include <linux/serial_core.h>
24#include <linux/serial_8250.h>
24 25
25#include <asm/system.h> 26#include <asm/system.h>
26#include <asm/pci-bridge.h> 27#include <asm/pci-bridge.h>
diff --git a/arch/ppc/platforms/4xx/cpci405.c b/arch/ppc/platforms/4xx/cpci405.c
index 8474b05b79..2e7e25dd84 100644
--- a/arch/ppc/platforms/4xx/cpci405.c
+++ b/arch/ppc/platforms/4xx/cpci405.c
@@ -23,6 +23,7 @@
23#include <asm/todc.h> 23#include <asm/todc.h>
24#include <linux/serial.h> 24#include <linux/serial.h>
25#include <linux/serial_core.h> 25#include <linux/serial_core.h>
26#include <linux/serial_8250.h>
26#include <asm/ocp.h> 27#include <asm/ocp.h>
27#include <asm/ibm_ocp_pci.h> 28#include <asm/ibm_ocp_pci.h>
28#include <platforms/4xx/ibm405gp.h> 29#include <platforms/4xx/ibm405gp.h>
diff --git a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c
index f0f9cc8480..05d7184d7e 100644
--- a/arch/ppc/platforms/4xx/ebony.c
+++ b/arch/ppc/platforms/4xx/ebony.c
@@ -32,6 +32,7 @@
32#include <linux/tty.h> 32#include <linux/tty.h>
33#include <linux/serial.h> 33#include <linux/serial.h>
34#include <linux/serial_core.h> 34#include <linux/serial_core.h>
35#include <linux/serial_8250.h>
35 36
36#include <asm/system.h> 37#include <asm/system.h>
37#include <asm/pgtable.h> 38#include <asm/pgtable.h>
diff --git a/arch/ppc/platforms/4xx/luan.c b/arch/ppc/platforms/4xx/luan.c
index 61706ef371..4b169610f1 100644
--- a/arch/ppc/platforms/4xx/luan.c
+++ b/arch/ppc/platforms/4xx/luan.c
@@ -30,6 +30,7 @@
30#include <linux/tty.h> 30#include <linux/tty.h>
31#include <linux/serial.h> 31#include <linux/serial.h>
32#include <linux/serial_core.h> 32#include <linux/serial_core.h>
33#include <linux/serial_8250.h>
33 34
34#include <asm/system.h> 35#include <asm/system.h>
35#include <asm/pgtable.h> 36#include <asm/pgtable.h>
diff --git a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c
index 5e994e146b..fd0f971881 100644
--- a/arch/ppc/platforms/4xx/ocotea.c
+++ b/arch/ppc/platforms/4xx/ocotea.c
@@ -30,6 +30,7 @@
30#include <linux/tty.h> 30#include <linux/tty.h>
31#include <linux/serial.h> 31#include <linux/serial.h>
32#include <linux/serial_core.h> 32#include <linux/serial_core.h>
33#include <linux/serial_8250.h>
33 34
34#include <asm/system.h> 35#include <asm/system.h>
35#include <asm/pgtable.h> 36#include <asm/pgtable.h>
diff --git a/arch/ppc/platforms/4xx/taishan.c b/arch/ppc/platforms/4xx/taishan.c
index 5d9af8ddb1..888c492b4a 100644
--- a/arch/ppc/platforms/4xx/taishan.c
+++ b/arch/ppc/platforms/4xx/taishan.c
@@ -30,6 +30,7 @@
30#include <linux/tty.h> 30#include <linux/tty.h>
31#include <linux/serial.h> 31#include <linux/serial.h>
32#include <linux/serial_core.h> 32#include <linux/serial_core.h>
33#include <linux/serial_8250.h>
33#include <linux/platform_device.h> 34#include <linux/platform_device.h>
34#include <linux/mtd/partitions.h> 35#include <linux/mtd/partitions.h>
35#include <linux/mtd/nand.h> 36#include <linux/mtd/nand.h>
diff --git a/arch/ppc/platforms/4xx/yucca.c b/arch/ppc/platforms/4xx/yucca.c
index 346787df0d..a83b0baea0 100644
--- a/arch/ppc/platforms/4xx/yucca.c
+++ b/arch/ppc/platforms/4xx/yucca.c
@@ -31,6 +31,7 @@
31#include <linux/tty.h> 31#include <linux/tty.h>
32#include <linux/serial.h> 32#include <linux/serial.h>
33#include <linux/serial_core.h> 33#include <linux/serial_core.h>
34#include <linux/serial_8250.h>
34 35
35#include <asm/system.h> 36#include <asm/system.h>
36#include <asm/pgtable.h> 37#include <asm/pgtable.h>
diff --git a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c
index 1d10ab98f6..3d7addbdec 100644
--- a/arch/ppc/platforms/85xx/sbc8560.c
+++ b/arch/ppc/platforms/85xx/sbc8560.c
@@ -26,6 +26,7 @@
26#include <linux/serial.h> 26#include <linux/serial.h>
27#include <linux/tty.h> /* for linux/serial_core.h */ 27#include <linux/tty.h> /* for linux/serial_core.h */
28#include <linux/serial_core.h> 28#include <linux/serial_core.h>
29#include <linux/serial_8250.h>
29#include <linux/initrd.h> 30#include <linux/initrd.h>
30#include <linux/module.h> 31#include <linux/module.h>
31#include <linux/fsl_devices.h> 32#include <linux/fsl_devices.h>
diff --git a/arch/ppc/platforms/chestnut.c b/arch/ppc/platforms/chestnut.c
index a764ae71cb..248684f50d 100644
--- a/arch/ppc/platforms/chestnut.c
+++ b/arch/ppc/platforms/chestnut.c
@@ -25,6 +25,7 @@
25#include <linux/ide.h> 25#include <linux/ide.h>
26#include <linux/serial.h> 26#include <linux/serial.h>
27#include <linux/serial_core.h> 27#include <linux/serial_core.h>
28#include <linux/serial_8250.h>
28#include <linux/mtd/physmap.h> 29#include <linux/mtd/physmap.h>
29#include <asm/system.h> 30#include <asm/system.h>
30#include <asm/pgtable.h> 31#include <asm/pgtable.h>
diff --git a/arch/ppc/platforms/ev64260.c b/arch/ppc/platforms/ev64260.c
index 4957a7bcde..976270d537 100644
--- a/arch/ppc/platforms/ev64260.c
+++ b/arch/ppc/platforms/ev64260.c
@@ -35,6 +35,7 @@
35#include <linux/serial.h> 35#include <linux/serial.h>
36#include <linux/tty.h> 36#include <linux/tty.h>
37#include <linux/serial_core.h> 37#include <linux/serial_core.h>
38#include <linux/serial_8250.h>
38#else 39#else
39#include <linux/mv643xx.h> 40#include <linux/mv643xx.h>
40#endif 41#endif
diff --git a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c
index 6f21110a97..3c56654bfc 100644
--- a/arch/ppc/platforms/prep_setup.c
+++ b/arch/ppc/platforms/prep_setup.c
@@ -69,9 +69,6 @@
69 69
70TODC_ALLOC(); 70TODC_ALLOC();
71 71
72unsigned char ucBoardRev;
73unsigned char ucBoardRevMaj, ucBoardRevMin;
74
75extern unsigned char prep_nvram_read_val(int addr); 72extern unsigned char prep_nvram_read_val(int addr);
76extern void prep_nvram_write_val(int addr, 73extern void prep_nvram_write_val(int addr,
77 unsigned char val); 74 unsigned char val);
diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c
index b55860734a..44d4398a36 100644
--- a/arch/ppc/platforms/radstone_ppc7d.c
+++ b/arch/ppc/platforms/radstone_ppc7d.c
@@ -35,6 +35,7 @@
35#include <linux/serial.h> 35#include <linux/serial.h>
36#include <linux/tty.h> /* for linux/serial_core.h */ 36#include <linux/tty.h> /* for linux/serial_core.h */
37#include <linux/serial_core.h> 37#include <linux/serial_core.h>
38#include <linux/serial_8250.h>
38#include <linux/mv643xx.h> 39#include <linux/mv643xx.h>
39#include <linux/netdevice.h> 40#include <linux/netdevice.h>
40#include <linux/platform_device.h> 41#include <linux/platform_device.h>
diff --git a/arch/ppc/platforms/spruce.c b/arch/ppc/platforms/spruce.c
index 3c78427848..f4de50ba29 100644
--- a/arch/ppc/platforms/spruce.c
+++ b/arch/ppc/platforms/spruce.c
@@ -27,6 +27,7 @@
27#include <linux/serial.h> 27#include <linux/serial.h>
28#include <linux/tty.h> 28#include <linux/tty.h>
29#include <linux/serial_core.h> 29#include <linux/serial_core.h>
30#include <linux/serial_8250.h>
30 31
31#include <asm/system.h> 32#include <asm/system.h>
32#include <asm/pgtable.h> 33#include <asm/pgtable.h>
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile
index 95694159b2..543795be58 100644
--- a/arch/ppc/syslib/Makefile
+++ b/arch/ppc/syslib/Makefile
@@ -7,6 +7,7 @@ CFLAGS_btext.o += -fPIC
7 7
8wdt-mpc8xx-$(CONFIG_8xx_WDT) += m8xx_wdt.o 8wdt-mpc8xx-$(CONFIG_8xx_WDT) += m8xx_wdt.o
9 9
10obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
10obj-$(CONFIG_PPCBUG_NVRAM) += prep_nvram.o 11obj-$(CONFIG_PPCBUG_NVRAM) += prep_nvram.o
11obj-$(CONFIG_PPC_OCP) += ocp.o 12obj-$(CONFIG_PPC_OCP) += ocp.o
12obj-$(CONFIG_IBM_OCP) += ibm_ocp.o 13obj-$(CONFIG_IBM_OCP) += ibm_ocp.o
diff --git a/arch/ppc/syslib/indirect_pci.c b/arch/ppc/syslib/indirect_pci.c
new file mode 100644
index 0000000000..83b323a7d0
--- /dev/null
+++ b/arch/ppc/syslib/indirect_pci.c
@@ -0,0 +1,134 @@
1/*
2 * Support for indirect PCI bridges.
3 *
4 * Copyright (C) 1998 Gabriel Paubert.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
12#include <linux/kernel.h>
13#include <linux/pci.h>
14#include <linux/delay.h>
15#include <linux/string.h>
16#include <linux/init.h>
17
18#include <asm/io.h>
19#include <asm/prom.h>
20#include <asm/pci-bridge.h>
21#include <asm/machdep.h>
22
23#ifdef CONFIG_PPC_INDIRECT_PCI_BE
24#define PCI_CFG_OUT out_be32
25#else
26#define PCI_CFG_OUT out_le32
27#endif
28
29static int
30indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
31 int len, u32 *val)
32{
33 struct pci_controller *hose = bus->sysdata;
34 volatile void __iomem *cfg_data;
35 u8 cfg_type = 0;
36
37 if (ppc_md.pci_exclude_device)
38 if (ppc_md.pci_exclude_device(bus->number, devfn))
39 return PCIBIOS_DEVICE_NOT_FOUND;
40
41 if (hose->set_cfg_type)
42 if (bus->number != hose->first_busno)
43 cfg_type = 1;
44
45 PCI_CFG_OUT(hose->cfg_addr,
46 (0x80000000 | ((bus->number - hose->bus_offset) << 16)
47 | (devfn << 8) | ((offset & 0xfc) | cfg_type)));
48
49 /*
50 * Note: the caller has already checked that offset is
51 * suitably aligned and that len is 1, 2 or 4.
52 */
53 cfg_data = hose->cfg_data + (offset & 3);
54 switch (len) {
55 case 1:
56 *val = in_8(cfg_data);
57 break;
58 case 2:
59 *val = in_le16(cfg_data);
60 break;
61 default:
62 *val = in_le32(cfg_data);
63 break;
64 }
65 return PCIBIOS_SUCCESSFUL;
66}
67
68static int
69indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
70 int len, u32 val)
71{
72 struct pci_controller *hose = bus->sysdata;
73 volatile void __iomem *cfg_data;
74 u8 cfg_type = 0;
75
76 if (ppc_md.pci_exclude_device)
77 if (ppc_md.pci_exclude_device(bus->number, devfn))
78 return PCIBIOS_DEVICE_NOT_FOUND;
79
80 if (hose->set_cfg_type)
81 if (bus->number != hose->first_busno)
82 cfg_type = 1;
83
84 PCI_CFG_OUT(hose->cfg_addr,
85 (0x80000000 | ((bus->number - hose->bus_offset) << 16)
86 | (devfn << 8) | ((offset & 0xfc) | cfg_type)));
87
88 /*
89 * Note: the caller has already checked that offset is
90 * suitably aligned and that len is 1, 2 or 4.
91 */
92 cfg_data = hose->cfg_data + (offset & 3);
93 switch (len) {
94 case 1:
95 out_8(cfg_data, val);
96 break;
97 case 2:
98 out_le16(cfg_data, val);
99 break;
100 default:
101 out_le32(cfg_data, val);
102 break;
103 }
104 return PCIBIOS_SUCCESSFUL;
105}
106
107static struct pci_ops indirect_pci_ops =
108{
109 indirect_read_config,
110 indirect_write_config
111};
112
113void __init
114setup_indirect_pci_nomap(struct pci_controller* hose, void __iomem * cfg_addr,
115 void __iomem * cfg_data)
116{
117 hose->cfg_addr = cfg_addr;
118 hose->cfg_data = cfg_data;
119 hose->ops = &indirect_pci_ops;
120}
121
122void __init
123setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
124{
125 unsigned long base = cfg_addr & PAGE_MASK;
126 void __iomem *mbase, *addr, *data;
127
128 mbase = ioremap(base, PAGE_SIZE);
129 addr = mbase + (cfg_addr & ~PAGE_MASK);
130 if ((cfg_data & PAGE_MASK) != base)
131 mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE);
132 data = mbase + (cfg_data & ~PAGE_MASK);
133 setup_indirect_pci_nomap(hose, addr, data);
134}
diff --git a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c
index 8485a68cd4..032f4b7f42 100644
--- a/arch/ppc/syslib/mv64x60.c
+++ b/arch/ppc/syslib/mv64x60.c
@@ -2415,7 +2415,6 @@ static struct bin_attribute mv64xxx_hs_reg_attr = { /* Hotswap register */
2415 .attr = { 2415 .attr = {
2416 .name = "hs_reg", 2416 .name = "hs_reg",
2417 .mode = S_IRUGO | S_IWUSR, 2417 .mode = S_IRUGO | S_IWUSR,
2418 .owner = THIS_MODULE,
2419 }, 2418 },
2420 .size = VAL_LEN_MAX, 2419 .size = VAL_LEN_MAX,
2421 .read = mv64xxx_hs_reg_read, 2420 .read = mv64xxx_hs_reg_read,
diff --git a/arch/ppc/syslib/virtex_devices.c b/arch/ppc/syslib/virtex_devices.c
index 16546788e2..ace4ec08de 100644
--- a/arch/ppc/syslib/virtex_devices.c
+++ b/arch/ppc/syslib/virtex_devices.c
@@ -71,6 +71,21 @@
71 }, \ 71 }, \
72} 72}
73 73
74/*
75 * ML300/ML403 Video Device: shortcut macro for single instance
76 */
77#define XPAR_TFT(num) { \
78 .name = "xilinxfb", \
79 .id = num, \
80 .num_resources = 1, \
81 .resource = (struct resource[]) { \
82 { \
83 .start = XPAR_TFT_##num##_BASEADDR, \
84 .end = XPAR_TFT_##num##_BASEADDR+7, \
85 .flags = IORESOURCE_IO, \
86 }, \
87 }, \
88}
74 89
75/* UART 8250 driver platform data table */ 90/* UART 8250 driver platform data table */
76struct plat_serial8250_port virtex_serial_platform_data[] = { 91struct plat_serial8250_port virtex_serial_platform_data[] = {
@@ -146,20 +161,17 @@ struct platform_device virtex_platform_devices[] = {
146 XPAR_SYSACE(1), 161 XPAR_SYSACE(1),
147#endif 162#endif
148 163
149 /* ML300/403 reference design framebuffer */
150#if defined(XPAR_TFT_0_BASEADDR) 164#if defined(XPAR_TFT_0_BASEADDR)
151 { 165 XPAR_TFT(0),
152 .name = "xilinxfb", 166#endif
153 .id = 0, 167#if defined(XPAR_TFT_1_BASEADDR)
154 .num_resources = 1, 168 XPAR_TFT(1),
155 .resource = (struct resource[]) { 169#endif
156 { 170#if defined(XPAR_TFT_2_BASEADDR)
157 .start = XPAR_TFT_0_BASEADDR, 171 XPAR_TFT(2),
158 .end = XPAR_TFT_0_BASEADDR+7, 172#endif
159 .flags = IORESOURCE_IO, 173#if defined(XPAR_TFT_3_BASEADDR)
160 }, 174 XPAR_TFT(3),
161 },
162 },
163#endif 175#endif
164}; 176};
165 177
diff --git a/arch/ppc/syslib/virtex_devices.h b/arch/ppc/syslib/virtex_devices.h
index 3d4be1412f..9f38d92ae5 100644
--- a/arch/ppc/syslib/virtex_devices.h
+++ b/arch/ppc/syslib/virtex_devices.h
@@ -31,4 +31,11 @@ void __init virtex_early_serial_map(void);
31 */ 31 */
32int virtex_device_fixup(struct platform_device *dev); 32int virtex_device_fixup(struct platform_device *dev);
33 33
34/* SPI Controller IP */
35struct xspi_platform_data {
36 s16 bus_num;
37 u16 num_chipselect;
38 u32 speed_hz;
39};
40
34#endif /* __ASM_VIRTEX_DEVICES_H__ */ 41#endif /* __ASM_VIRTEX_DEVICES_H__ */
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index 68441e0e74..143ed8e154 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -19,7 +19,7 @@ CFLAGS += -m31
19AFLAGS += -m31 19AFLAGS += -m31
20UTS_MACHINE := s390 20UTS_MACHINE := s390
21STACK_SIZE := 8192 21STACK_SIZE := 8192
22CHECKFLAGS += -D__s390__ 22CHECKFLAGS += -D__s390__ -msize-long
23else 23else
24LDFLAGS := -m elf64_s390 24LDFLAGS := -m elf64_s390
25MODFLAGS += -fpic -D__PIC__ 25MODFLAGS += -fpic -D__PIC__
diff --git a/arch/s390/crypto/crypt_s390.h b/arch/s390/crypto/crypt_s390.h
index 2775d26183..95f5160df2 100644
--- a/arch/s390/crypto/crypt_s390.h
+++ b/arch/s390/crypto/crypt_s390.h
@@ -24,7 +24,7 @@
24#define CRYPT_S390_PRIORITY 300 24#define CRYPT_S390_PRIORITY 300
25#define CRYPT_S390_COMPOSITE_PRIORITY 400 25#define CRYPT_S390_COMPOSITE_PRIORITY 400
26 26
27/* s930 cryptographic operations */ 27/* s390 cryptographic operations */
28enum crypt_s390_operations { 28enum crypt_s390_operations {
29 CRYPT_S390_KM = 0x0100, 29 CRYPT_S390_KM = 0x0100,
30 CRYPT_S390_KMC = 0x0200, 30 CRYPT_S390_KMC = 0x0200,
diff --git a/arch/s390/defconfig b/arch/s390/defconfig
index 485b60c198..2aae23dba4 100644
--- a/arch/s390/defconfig
+++ b/arch/s390/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.21 3# Linux kernel version: 2.6.22
4# Thu May 10 15:18:19 2007 4# Tue Jul 17 12:50:23 2007
5# 5#
6CONFIG_MMU=y 6CONFIG_MMU=y
7CONFIG_ZONE_DMA=y 7CONFIG_ZONE_DMA=y
@@ -32,12 +32,11 @@ CONFIG_LOCALVERSION=""
32CONFIG_LOCALVERSION_AUTO=y 32CONFIG_LOCALVERSION_AUTO=y
33CONFIG_SWAP=y 33CONFIG_SWAP=y
34CONFIG_SYSVIPC=y 34CONFIG_SYSVIPC=y
35# CONFIG_IPC_NS is not set
36CONFIG_SYSVIPC_SYSCTL=y 35CONFIG_SYSVIPC_SYSCTL=y
37CONFIG_POSIX_MQUEUE=y 36CONFIG_POSIX_MQUEUE=y
38# CONFIG_BSD_PROCESS_ACCT is not set 37# CONFIG_BSD_PROCESS_ACCT is not set
39# CONFIG_TASKSTATS is not set 38# CONFIG_TASKSTATS is not set
40# CONFIG_UTS_NS is not set 39# CONFIG_USER_NS is not set
41CONFIG_AUDIT=y 40CONFIG_AUDIT=y
42# CONFIG_AUDITSYSCALL is not set 41# CONFIG_AUDITSYSCALL is not set
43CONFIG_IKCONFIG=y 42CONFIG_IKCONFIG=y
@@ -61,20 +60,19 @@ CONFIG_BUG=y
61CONFIG_ELF_CORE=y 60CONFIG_ELF_CORE=y
62CONFIG_BASE_FULL=y 61CONFIG_BASE_FULL=y
63CONFIG_FUTEX=y 62CONFIG_FUTEX=y
63CONFIG_ANON_INODES=y
64CONFIG_EPOLL=y 64CONFIG_EPOLL=y
65CONFIG_SIGNALFD=y
66CONFIG_TIMERFD=y
67CONFIG_EVENTFD=y
65CONFIG_SHMEM=y 68CONFIG_SHMEM=y
66CONFIG_VM_EVENT_COUNTERS=y 69CONFIG_VM_EVENT_COUNTERS=y
67CONFIG_SLUB_DEBUG=y
68CONFIG_SLAB=y 70CONFIG_SLAB=y
69# CONFIG_SLUB is not set 71# CONFIG_SLUB is not set
70# CONFIG_SLOB is not set 72# CONFIG_SLOB is not set
71CONFIG_RT_MUTEXES=y 73CONFIG_RT_MUTEXES=y
72# CONFIG_TINY_SHMEM is not set 74# CONFIG_TINY_SHMEM is not set
73CONFIG_BASE_SMALL=0 75CONFIG_BASE_SMALL=0
74
75#
76# Loadable module support
77#
78CONFIG_MODULES=y 76CONFIG_MODULES=y
79CONFIG_MODULE_UNLOAD=y 77CONFIG_MODULE_UNLOAD=y
80# CONFIG_MODULE_FORCE_UNLOAD is not set 78# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -82,12 +80,9 @@ CONFIG_MODVERSIONS=y
82# CONFIG_MODULE_SRCVERSION_ALL is not set 80# CONFIG_MODULE_SRCVERSION_ALL is not set
83CONFIG_KMOD=y 81CONFIG_KMOD=y
84CONFIG_STOP_MACHINE=y 82CONFIG_STOP_MACHINE=y
85
86#
87# Block layer
88#
89CONFIG_BLOCK=y 83CONFIG_BLOCK=y
90# CONFIG_BLK_DEV_IO_TRACE is not set 84# CONFIG_BLK_DEV_IO_TRACE is not set
85CONFIG_BLK_DEV_BSG=y
91 86
92# 87#
93# IO Schedulers 88# IO Schedulers
@@ -151,6 +146,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
151CONFIG_SPLIT_PTLOCK_CPUS=4 146CONFIG_SPLIT_PTLOCK_CPUS=4
152CONFIG_RESOURCES_64BIT=y 147CONFIG_RESOURCES_64BIT=y
153CONFIG_ZONE_DMA_FLAG=1 148CONFIG_ZONE_DMA_FLAG=1
149CONFIG_VIRT_TO_BUS=y
154CONFIG_HOLES_IN_ZONE=y 150CONFIG_HOLES_IN_ZONE=y
155 151
156# 152#
@@ -248,25 +244,13 @@ CONFIG_IPV6_SIT=y
248# CONFIG_IPV6_MULTIPLE_TABLES is not set 244# CONFIG_IPV6_MULTIPLE_TABLES is not set
249# CONFIG_NETWORK_SECMARK is not set 245# CONFIG_NETWORK_SECMARK is not set
250# CONFIG_NETFILTER is not set 246# CONFIG_NETFILTER is not set
251
252#
253# DCCP Configuration (EXPERIMENTAL)
254#
255# CONFIG_IP_DCCP is not set 247# CONFIG_IP_DCCP is not set
256
257#
258# SCTP Configuration (EXPERIMENTAL)
259#
260CONFIG_IP_SCTP=m 248CONFIG_IP_SCTP=m
261# CONFIG_SCTP_DBG_MSG is not set 249# CONFIG_SCTP_DBG_MSG is not set
262# CONFIG_SCTP_DBG_OBJCNT is not set 250# CONFIG_SCTP_DBG_OBJCNT is not set
263# CONFIG_SCTP_HMAC_NONE is not set 251# CONFIG_SCTP_HMAC_NONE is not set
264# CONFIG_SCTP_HMAC_SHA1 is not set 252# CONFIG_SCTP_HMAC_SHA1 is not set
265CONFIG_SCTP_HMAC_MD5=y 253CONFIG_SCTP_HMAC_MD5=y
266
267#
268# TIPC Configuration (EXPERIMENTAL)
269#
270# CONFIG_TIPC is not set 254# CONFIG_TIPC is not set
271# CONFIG_ATM is not set 255# CONFIG_ATM is not set
272# CONFIG_BRIDGE is not set 256# CONFIG_BRIDGE is not set
@@ -293,6 +277,7 @@ CONFIG_NET_SCH_CBQ=m
293# CONFIG_NET_SCH_HTB is not set 277# CONFIG_NET_SCH_HTB is not set
294# CONFIG_NET_SCH_HFSC is not set 278# CONFIG_NET_SCH_HFSC is not set
295CONFIG_NET_SCH_PRIO=m 279CONFIG_NET_SCH_PRIO=m
280CONFIG_NET_SCH_RR=m
296CONFIG_NET_SCH_RED=m 281CONFIG_NET_SCH_RED=m
297CONFIG_NET_SCH_SFQ=m 282CONFIG_NET_SCH_SFQ=m
298CONFIG_NET_SCH_TEQL=m 283CONFIG_NET_SCH_TEQL=m
@@ -317,10 +302,14 @@ CONFIG_CLS_U32_MARK=y
317CONFIG_NET_CLS_RSVP=m 302CONFIG_NET_CLS_RSVP=m
318CONFIG_NET_CLS_RSVP6=m 303CONFIG_NET_CLS_RSVP6=m
319# CONFIG_NET_EMATCH is not set 304# CONFIG_NET_EMATCH is not set
320# CONFIG_NET_CLS_ACT is not set 305CONFIG_NET_CLS_ACT=y
306CONFIG_NET_ACT_POLICE=y
307# CONFIG_NET_ACT_GACT is not set
308# CONFIG_NET_ACT_MIRRED is not set
309# CONFIG_NET_ACT_PEDIT is not set
310# CONFIG_NET_ACT_SIMP is not set
321CONFIG_NET_CLS_POLICE=y 311CONFIG_NET_CLS_POLICE=y
322# CONFIG_NET_CLS_IND is not set 312# CONFIG_NET_CLS_IND is not set
323CONFIG_NET_ESTIMATOR=y
324 313
325# 314#
326# Network testing 315# Network testing
@@ -329,6 +318,7 @@ CONFIG_NET_ESTIMATOR=y
329# CONFIG_NET_TCPPROBE is not set 318# CONFIG_NET_TCPPROBE is not set
330# CONFIG_AF_RXRPC is not set 319# CONFIG_AF_RXRPC is not set
331# CONFIG_RFKILL is not set 320# CONFIG_RFKILL is not set
321# CONFIG_NET_9P is not set
332# CONFIG_PCMCIA is not set 322# CONFIG_PCMCIA is not set
333CONFIG_CCW=y 323CONFIG_CCW=y
334 324
@@ -345,15 +335,8 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
345# CONFIG_DEBUG_DRIVER is not set 335# CONFIG_DEBUG_DRIVER is not set
346# CONFIG_DEBUG_DEVRES is not set 336# CONFIG_DEBUG_DEVRES is not set
347CONFIG_SYS_HYPERVISOR=y 337CONFIG_SYS_HYPERVISOR=y
348
349#
350# Connector - unified userspace <-> kernelspace linker
351#
352# CONFIG_CONNECTOR is not set 338# CONFIG_CONNECTOR is not set
353 339CONFIG_BLK_DEV=y
354#
355# Block devices
356#
357# CONFIG_BLK_DEV_COW_COMMON is not set 340# CONFIG_BLK_DEV_COW_COMMON is not set
358CONFIG_BLK_DEV_LOOP=m 341CONFIG_BLK_DEV_LOOP=m
359# CONFIG_BLK_DEV_CRYPTOLOOP is not set 342# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -376,17 +359,15 @@ CONFIG_DASD_ECKD=y
376CONFIG_DASD_FBA=y 359CONFIG_DASD_FBA=y
377CONFIG_DASD_DIAG=y 360CONFIG_DASD_DIAG=y
378CONFIG_DASD_EER=y 361CONFIG_DASD_EER=y
379 362CONFIG_MISC_DEVICES=y
380# 363# CONFIG_EEPROM_93CX6 is not set
381# Misc devices
382#
383# CONFIG_BLINK is not set
384 364
385# 365#
386# SCSI device support 366# SCSI device support
387# 367#
388# CONFIG_RAID_ATTRS is not set 368# CONFIG_RAID_ATTRS is not set
389CONFIG_SCSI=y 369CONFIG_SCSI=y
370# CONFIG_SCSI_DMA is not set
390# CONFIG_SCSI_TGT is not set 371# CONFIG_SCSI_TGT is not set
391CONFIG_SCSI_NETLINK=y 372CONFIG_SCSI_NETLINK=y
392CONFIG_SCSI_PROC_FS=y 373CONFIG_SCSI_PROC_FS=y
@@ -447,40 +428,21 @@ CONFIG_DM_MIRROR=y
447CONFIG_DM_ZERO=y 428CONFIG_DM_ZERO=y
448CONFIG_DM_MULTIPATH=y 429CONFIG_DM_MULTIPATH=y
449# CONFIG_DM_MULTIPATH_EMC is not set 430# CONFIG_DM_MULTIPATH_EMC is not set
431# CONFIG_DM_MULTIPATH_RDAC is not set
450# CONFIG_DM_DELAY is not set 432# CONFIG_DM_DELAY is not set
451
452#
453# Network device support
454#
455CONFIG_NETDEVICES=y 433CONFIG_NETDEVICES=y
434# CONFIG_NETDEVICES_MULTIQUEUE is not set
435# CONFIG_IFB is not set
456CONFIG_DUMMY=m 436CONFIG_DUMMY=m
457CONFIG_BONDING=m 437CONFIG_BONDING=m
438# CONFIG_MACVLAN is not set
458CONFIG_EQUALIZER=m 439CONFIG_EQUALIZER=m
459CONFIG_TUN=m 440CONFIG_TUN=m
460
461#
462# Ethernet (10 or 100Mbit)
463#
464CONFIG_NET_ETHERNET=y 441CONFIG_NET_ETHERNET=y
465# CONFIG_MII is not set 442# CONFIG_MII is not set
466 443CONFIG_NETDEV_1000=y
467# 444CONFIG_NETDEV_10000=y
468# Ethernet (1000 Mbit)
469#
470
471#
472# Ethernet (10000 Mbit)
473#
474CONFIG_MLX4_DEBUG=y
475
476#
477# Token Ring devices
478#
479# CONFIG_TR is not set 445# CONFIG_TR is not set
480
481#
482# Wan interfaces
483#
484# CONFIG_WAN is not set 446# CONFIG_WAN is not set
485 447
486# 448#
@@ -511,10 +473,6 @@ CONFIG_CCWGROUP=y
511CONFIG_UNIX98_PTYS=y 473CONFIG_UNIX98_PTYS=y
512CONFIG_LEGACY_PTYS=y 474CONFIG_LEGACY_PTYS=y
513CONFIG_LEGACY_PTY_COUNT=256 475CONFIG_LEGACY_PTY_COUNT=256
514
515#
516# Watchdog Cards
517#
518# CONFIG_WATCHDOG is not set 476# CONFIG_WATCHDOG is not set
519CONFIG_HW_RANDOM=m 477CONFIG_HW_RANDOM=m
520# CONFIG_R3964 is not set 478# CONFIG_R3964 is not set
@@ -554,6 +512,8 @@ CONFIG_S390_TAPE_34XX=m
554# CONFIG_VMCP is not set 512# CONFIG_VMCP is not set
555# CONFIG_MONREADER is not set 513# CONFIG_MONREADER is not set
556CONFIG_MONWRITER=m 514CONFIG_MONWRITER=m
515CONFIG_S390_VMUR=m
516# CONFIG_POWER_SUPPLY is not set
557 517
558# 518#
559# File systems 519# File systems
@@ -655,7 +615,6 @@ CONFIG_SUNRPC=y
655# CONFIG_NCP_FS is not set 615# CONFIG_NCP_FS is not set
656# CONFIG_CODA_FS is not set 616# CONFIG_CODA_FS is not set
657# CONFIG_AFS_FS is not set 617# CONFIG_AFS_FS is not set
658# CONFIG_9P_FS is not set
659 618
660# 619#
661# Partition Types 620# Partition Types
@@ -712,6 +671,7 @@ CONFIG_MAGIC_SYSRQ=y
712CONFIG_DEBUG_FS=y 671CONFIG_DEBUG_FS=y
713CONFIG_HEADERS_CHECK=y 672CONFIG_HEADERS_CHECK=y
714CONFIG_DEBUG_KERNEL=y 673CONFIG_DEBUG_KERNEL=y
674# CONFIG_SCHED_DEBUG is not set
715# CONFIG_SCHEDSTATS is not set 675# CONFIG_SCHEDSTATS is not set
716# CONFIG_TIMER_STATS is not set 676# CONFIG_TIMER_STATS is not set
717# CONFIG_DEBUG_SLAB is not set 677# CONFIG_DEBUG_SLAB is not set
@@ -740,10 +700,6 @@ CONFIG_FORCED_INLINING=y
740# 700#
741# CONFIG_KEYS is not set 701# CONFIG_KEYS is not set
742# CONFIG_SECURITY is not set 702# CONFIG_SECURITY is not set
743
744#
745# Cryptographic options
746#
747CONFIG_CRYPTO=y 703CONFIG_CRYPTO=y
748CONFIG_CRYPTO_ALGAPI=y 704CONFIG_CRYPTO_ALGAPI=y
749CONFIG_CRYPTO_BLKCIPHER=y 705CONFIG_CRYPTO_BLKCIPHER=y
@@ -782,10 +738,7 @@ CONFIG_CRYPTO_FCRYPT=m
782# CONFIG_CRYPTO_CRC32C is not set 738# CONFIG_CRYPTO_CRC32C is not set
783CONFIG_CRYPTO_CAMELLIA=m 739CONFIG_CRYPTO_CAMELLIA=m
784# CONFIG_CRYPTO_TEST is not set 740# CONFIG_CRYPTO_TEST is not set
785 741CONFIG_CRYPTO_HW=y
786#
787# Hardware crypto devices
788#
789# CONFIG_CRYPTO_SHA1_S390 is not set 742# CONFIG_CRYPTO_SHA1_S390 is not set
790# CONFIG_CRYPTO_SHA256_S390 is not set 743# CONFIG_CRYPTO_SHA256_S390 is not set
791# CONFIG_CRYPTO_DES_S390 is not set 744# CONFIG_CRYPTO_DES_S390 is not set
@@ -800,6 +753,7 @@ CONFIG_ZCRYPT=m
800CONFIG_BITREVERSE=m 753CONFIG_BITREVERSE=m
801# CONFIG_CRC_CCITT is not set 754# CONFIG_CRC_CCITT is not set
802# CONFIG_CRC16 is not set 755# CONFIG_CRC16 is not set
756# CONFIG_CRC_ITU_T is not set
803CONFIG_CRC32=m 757CONFIG_CRC32=m
804# CONFIG_LIBCRC32C is not set 758# CONFIG_LIBCRC32C is not set
805CONFIG_PLIST=y 759CONFIG_PLIST=y
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c
index a057ebf108..d3057318f2 100644
--- a/arch/s390/kernel/dis.c
+++ b/arch/s390/kernel/dis.c
@@ -240,8 +240,8 @@ static const unsigned char formats[][7] = {
240 [INSTR_RXY_FRRD] = { 0xff, F_8,D20_20,X_12,B_16,0,0 },/* e.g. ley */ 240 [INSTR_RXY_FRRD] = { 0xff, F_8,D20_20,X_12,B_16,0,0 },/* e.g. ley */
241 [INSTR_RX_FRRD] = { 0xff, F_8,D_20,X_12,B_16,0,0 }, /* e.g. ae */ 241 [INSTR_RX_FRRD] = { 0xff, F_8,D_20,X_12,B_16,0,0 }, /* e.g. ae */
242 [INSTR_RX_RRRD] = { 0xff, R_8,D_20,X_12,B_16,0,0 }, /* e.g. l */ 242 [INSTR_RX_RRRD] = { 0xff, R_8,D_20,X_12,B_16,0,0 }, /* e.g. l */
243 [INSTR_RX_URRD] = { 0x00, U4_8,D_20,X_12,B_16,0,0 }, /* e.g. bc */ 243 [INSTR_RX_URRD] = { 0xff, U4_8,D_20,X_12,B_16,0,0 }, /* e.g. bc */
244 [INSTR_SI_URD] = { 0x00, D_20,B_16,U8_8,0,0,0 }, /* e.g. cli */ 244 [INSTR_SI_URD] = { 0xff, D_20,B_16,U8_8,0,0,0 }, /* e.g. cli */
245 [INSTR_SIY_URD] = { 0xff, D20_20,B_16,U8_8,0,0,0 }, /* e.g. tmy */ 245 [INSTR_SIY_URD] = { 0xff, D20_20,B_16,U8_8,0,0,0 }, /* e.g. tmy */
246 [INSTR_SSE_RDRD] = { 0xff, D_20,B_16,D_36,B_32,0,0 }, /* e.g. mvsdk */ 246 [INSTR_SSE_RDRD] = { 0xff, D_20,B_16,D_36,B_32,0,0 }, /* e.g. mvsdk */
247 [INSTR_SS_L0RDRD] = { 0xff, D_20,L8_8,B_16,D_36,B_32,0 }, 247 [INSTR_SS_L0RDRD] = { 0xff, D_20,L8_8,B_16,D_36,B_32,0 },
@@ -1190,7 +1190,8 @@ static int print_insn(char *buffer, unsigned char *code, unsigned long addr)
1190 else if (operand->flags & OPERAND_CR) 1190 else if (operand->flags & OPERAND_CR)
1191 ptr += sprintf(ptr, "%%c%i", value); 1191 ptr += sprintf(ptr, "%%c%i", value);
1192 else if (operand->flags & OPERAND_PCREL) 1192 else if (operand->flags & OPERAND_PCREL)
1193 ptr += sprintf(ptr, "%lx", value + addr); 1193 ptr += sprintf(ptr, "%lx", (signed int) value
1194 + addr);
1194 else if (operand->flags & OPERAND_SIGNED) 1195 else if (operand->flags & OPERAND_SIGNED)
1195 ptr += sprintf(ptr, "%i", value); 1196 ptr += sprintf(ptr, "%i", value);
1196 else 1197 else
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index 50538e5456..e6289ee74e 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -171,37 +171,6 @@ static inline int memory_fast_detect(void)
171} 171}
172#endif 172#endif
173 173
174#define ADDR2G (1UL << 31)
175
176static noinline __init unsigned long sclp_memory_detect(void)
177{
178 struct sclp_readinfo_sccb *sccb;
179 unsigned long long memsize;
180
181 sccb = &s390_readinfo_sccb;
182
183 if (sccb->header.response_code != 0x10)
184 return 0;
185
186 if (sccb->rnsize)
187 memsize = sccb->rnsize << 20;
188 else
189 memsize = sccb->rnsize2 << 20;
190 if (sccb->rnmax)
191 memsize *= sccb->rnmax;
192 else
193 memsize *= sccb->rnmax2;
194#ifndef CONFIG_64BIT
195 /*
196 * Can't deal with more than 2G in 31 bit addressing mode, so
197 * limit the value in order to avoid strange side effects.
198 */
199 if (memsize > ADDR2G)
200 memsize = ADDR2G;
201#endif
202 return (unsigned long) memsize;
203}
204
205static inline __init unsigned long __tprot(unsigned long addr) 174static inline __init unsigned long __tprot(unsigned long addr)
206{ 175{
207 int cc = -1; 176 int cc = -1;
@@ -218,6 +187,7 @@ static inline __init unsigned long __tprot(unsigned long addr)
218 187
219/* Checking memory in 128KB increments. */ 188/* Checking memory in 128KB increments. */
220#define CHUNK_INCR (1UL << 17) 189#define CHUNK_INCR (1UL << 17)
190#define ADDR2G (1UL << 31)
221 191
222static noinline __init void find_memory_chunks(unsigned long memsize) 192static noinline __init void find_memory_chunks(unsigned long memsize)
223{ 193{
@@ -293,7 +263,7 @@ static noinline __init void setup_lowcore_early(void)
293 */ 263 */
294void __init startup_init(void) 264void __init startup_init(void)
295{ 265{
296 unsigned long memsize; 266 unsigned long long memsize;
297 267
298 ipl_save_parameters(); 268 ipl_save_parameters();
299 clear_bss_section(); 269 clear_bss_section();
@@ -305,8 +275,17 @@ void __init startup_init(void)
305 sort_main_extable(); 275 sort_main_extable();
306 setup_lowcore_early(); 276 setup_lowcore_early();
307 sclp_readinfo_early(); 277 sclp_readinfo_early();
278 sclp_facilities_detect();
308 memsize = sclp_memory_detect(); 279 memsize = sclp_memory_detect();
280#ifndef CONFIG_64BIT
281 /*
282 * Can't deal with more than 2G in 31 bit addressing mode, so
283 * limit the value in order to avoid strange side effects.
284 */
285 if (memsize > ADDR2G)
286 memsize = ADDR2G;
287#endif
309 if (memory_fast_detect() < 0) 288 if (memory_fast_detect() < 0)
310 find_memory_chunks(memsize); 289 find_memory_chunks((unsigned long) memsize);
311 lockdep_on(); 290 lockdep_on();
312} 291}
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index 6234c6978a..bc7ff3658c 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -107,6 +107,11 @@ STACK_SIZE = 1 << STACK_SHIFT
107 l %r13,__LC_SVC_NEW_PSW+4 # load &system_call to %r13 107 l %r13,__LC_SVC_NEW_PSW+4 # load &system_call to %r13
108 .endm 108 .endm
109 109
110 .macro SAVE_ALL_SVC psworg,savearea
111 la %r12,\psworg
112 l %r15,__LC_KERNEL_STACK # problem state -> load ksp
113 .endm
114
110 .macro SAVE_ALL_SYNC psworg,savearea 115 .macro SAVE_ALL_SYNC psworg,savearea
111 la %r12,\psworg 116 la %r12,\psworg
112 tm \psworg+1,0x01 # test problem state bit 117 tm \psworg+1,0x01 # test problem state bit
@@ -218,7 +223,7 @@ system_call:
218 STORE_TIMER __LC_SYNC_ENTER_TIMER 223 STORE_TIMER __LC_SYNC_ENTER_TIMER
219sysc_saveall: 224sysc_saveall:
220 SAVE_ALL_BASE __LC_SAVE_AREA 225 SAVE_ALL_BASE __LC_SAVE_AREA
221 SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA 226 SAVE_ALL_SVC __LC_SVC_OLD_PSW,__LC_SAVE_AREA
222 CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA 227 CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA
223 lh %r7,0x8a # get svc number from lowcore 228 lh %r7,0x8a # get svc number from lowcore
224#ifdef CONFIG_VIRT_CPU_ACCOUNTING 229#ifdef CONFIG_VIRT_CPU_ACCOUNTING
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S
index 685f11faa4..2a7b130441 100644
--- a/arch/s390/kernel/entry64.S
+++ b/arch/s390/kernel/entry64.S
@@ -99,6 +99,11 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \
99 larl %r13,system_call 99 larl %r13,system_call
100 .endm 100 .endm
101 101
102 .macro SAVE_ALL_SVC psworg,savearea
103 la %r12,\psworg
104 lg %r15,__LC_KERNEL_STACK # problem state -> load ksp
105 .endm
106
102 .macro SAVE_ALL_SYNC psworg,savearea 107 .macro SAVE_ALL_SYNC psworg,savearea
103 la %r12,\psworg 108 la %r12,\psworg
104 tm \psworg+1,0x01 # test problem state bit 109 tm \psworg+1,0x01 # test problem state bit
@@ -207,7 +212,7 @@ system_call:
207 STORE_TIMER __LC_SYNC_ENTER_TIMER 212 STORE_TIMER __LC_SYNC_ENTER_TIMER
208sysc_saveall: 213sysc_saveall:
209 SAVE_ALL_BASE __LC_SAVE_AREA 214 SAVE_ALL_BASE __LC_SAVE_AREA
210 SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA 215 SAVE_ALL_SVC __LC_SVC_OLD_PSW,__LC_SAVE_AREA
211 CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA 216 CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA
212 llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore 217 llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore
213#ifdef CONFIG_VIRT_CPU_ACCOUNTING 218#ifdef CONFIG_VIRT_CPU_ACCOUNTING
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index 367caf92ea..8b8f136d9c 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -25,10 +25,6 @@
25 25
26#define IPL_PARM_BLOCK_VERSION 0 26#define IPL_PARM_BLOCK_VERSION 0
27 27
28#define SCCB_VALID (s390_readinfo_sccb.header.response_code == 0x10)
29#define SCCB_LOADPARM (&s390_readinfo_sccb.loadparm)
30#define SCCB_FLAG (s390_readinfo_sccb.flags)
31
32#define IPL_UNKNOWN_STR "unknown" 28#define IPL_UNKNOWN_STR "unknown"
33#define IPL_CCW_STR "ccw" 29#define IPL_CCW_STR "ccw"
34#define IPL_FCP_STR "fcp" 30#define IPL_FCP_STR "fcp"
@@ -146,6 +142,8 @@ static struct ipl_parameter_block *dump_block_ccw;
146 142
147static enum shutdown_action on_panic_action = SHUTDOWN_STOP; 143static enum shutdown_action on_panic_action = SHUTDOWN_STOP;
148 144
145static struct sclp_ipl_info sclp_ipl_info;
146
149int diag308(unsigned long subcode, void *addr) 147int diag308(unsigned long subcode, void *addr)
150{ 148{
151 register unsigned long _addr asm("0") = (unsigned long) addr; 149 register unsigned long _addr asm("0") = (unsigned long) addr;
@@ -297,8 +295,8 @@ static ssize_t sys_ipl_device_show(struct kset *kset, char *page)
297static struct subsys_attribute sys_ipl_device_attr = 295static struct subsys_attribute sys_ipl_device_attr =
298 __ATTR(device, S_IRUGO, sys_ipl_device_show, NULL); 296 __ATTR(device, S_IRUGO, sys_ipl_device_show, NULL);
299 297
300static ssize_t ipl_parameter_read(struct kobject *kobj, char *buf, loff_t off, 298static ssize_t ipl_parameter_read(struct kobject *kobj, struct bin_attribute *attr,
301 size_t count) 299 char *buf, loff_t off, size_t count)
302{ 300{
303 unsigned int size = IPL_PARMBLOCK_SIZE; 301 unsigned int size = IPL_PARMBLOCK_SIZE;
304 302
@@ -314,14 +312,13 @@ static struct bin_attribute ipl_parameter_attr = {
314 .attr = { 312 .attr = {
315 .name = "binary_parameter", 313 .name = "binary_parameter",
316 .mode = S_IRUGO, 314 .mode = S_IRUGO,
317 .owner = THIS_MODULE,
318 }, 315 },
319 .size = PAGE_SIZE, 316 .size = PAGE_SIZE,
320 .read = &ipl_parameter_read, 317 .read = &ipl_parameter_read,
321}; 318};
322 319
323static ssize_t ipl_scp_data_read(struct kobject *kobj, char *buf, loff_t off, 320static ssize_t ipl_scp_data_read(struct kobject *kobj, struct bin_attribute *attr,
324 size_t count) 321 char *buf, loff_t off, size_t count)
325{ 322{
326 unsigned int size = IPL_PARMBLOCK_START->ipl_info.fcp.scp_data_len; 323 unsigned int size = IPL_PARMBLOCK_START->ipl_info.fcp.scp_data_len;
327 void *scp_data = &IPL_PARMBLOCK_START->ipl_info.fcp.scp_data; 324 void *scp_data = &IPL_PARMBLOCK_START->ipl_info.fcp.scp_data;
@@ -338,10 +335,9 @@ static struct bin_attribute ipl_scp_data_attr = {
338 .attr = { 335 .attr = {
339 .name = "scp_data", 336 .name = "scp_data",
340 .mode = S_IRUGO, 337 .mode = S_IRUGO,
341 .owner = THIS_MODULE,
342 }, 338 },
343 .size = PAGE_SIZE, 339 .size = PAGE_SIZE,
344 .read = &ipl_scp_data_read, 340 .read = ipl_scp_data_read,
345}; 341};
346 342
347/* FCP ipl device attributes */ 343/* FCP ipl device attributes */
@@ -375,9 +371,9 @@ static ssize_t ipl_ccw_loadparm_show(struct kset *kset, char *page)
375{ 371{
376 char loadparm[LOADPARM_LEN + 1] = {}; 372 char loadparm[LOADPARM_LEN + 1] = {};
377 373
378 if (!SCCB_VALID) 374 if (!sclp_ipl_info.is_valid)
379 return sprintf(page, "#unknown#\n"); 375 return sprintf(page, "#unknown#\n");
380 memcpy(loadparm, SCCB_LOADPARM, LOADPARM_LEN); 376 memcpy(loadparm, &sclp_ipl_info.loadparm, LOADPARM_LEN);
381 EBCASC(loadparm, LOADPARM_LEN); 377 EBCASC(loadparm, LOADPARM_LEN);
382 strstrip(loadparm); 378 strstrip(loadparm);
383 return sprintf(page, "%s\n", loadparm); 379 return sprintf(page, "%s\n", loadparm);
@@ -910,9 +906,9 @@ static int __init reipl_ccw_init(void)
910 reipl_block_ccw->hdr.blk0_len = IPL_PARM_BLK0_CCW_LEN; 906 reipl_block_ccw->hdr.blk0_len = IPL_PARM_BLK0_CCW_LEN;
911 reipl_block_ccw->hdr.pbt = DIAG308_IPL_TYPE_CCW; 907 reipl_block_ccw->hdr.pbt = DIAG308_IPL_TYPE_CCW;
912 /* check if read scp info worked and set loadparm */ 908 /* check if read scp info worked and set loadparm */
913 if (SCCB_VALID) 909 if (sclp_ipl_info.is_valid)
914 memcpy(reipl_block_ccw->ipl_info.ccw.load_param, 910 memcpy(reipl_block_ccw->ipl_info.ccw.load_param,
915 SCCB_LOADPARM, LOADPARM_LEN); 911 &sclp_ipl_info.loadparm, LOADPARM_LEN);
916 else 912 else
917 /* read scp info failed: set empty loadparm (EBCDIC blanks) */ 913 /* read scp info failed: set empty loadparm (EBCDIC blanks) */
918 memset(reipl_block_ccw->ipl_info.ccw.load_param, 0x40, 914 memset(reipl_block_ccw->ipl_info.ccw.load_param, 0x40,
@@ -1007,7 +1003,7 @@ static int __init dump_fcp_init(void)
1007{ 1003{
1008 int rc; 1004 int rc;
1009 1005
1010 if(!(SCCB_FLAG & 0x2) || !SCCB_VALID) 1006 if (!sclp_ipl_info.has_dump)
1011 return 0; /* LDIPL DUMP is not installed */ 1007 return 0; /* LDIPL DUMP is not installed */
1012 if (!diag308_set_works) 1008 if (!diag308_set_works)
1013 return 0; 1009 return 0;
@@ -1088,6 +1084,7 @@ static int __init s390_ipl_init(void)
1088{ 1084{
1089 int rc; 1085 int rc;
1090 1086
1087 sclp_get_ipl_info(&sclp_ipl_info);
1091 reipl_probe(); 1088 reipl_probe();
1092 rc = ipl_init(); 1089 rc = ipl_init();
1093 if (rc) 1090 if (rc)
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index eb43c3b312..441975b796 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -93,8 +93,8 @@ void do_monitor_call(struct pt_regs *regs, long interruption_code)
93 /* disable monitor call class 0 */ 93 /* disable monitor call class 0 */
94 __ctl_clear_bit(8, 15); 94 __ctl_clear_bit(8, 15);
95 95
96 atomic_notifier_call_chain(&idle_chain, CPU_NOT_IDLE, 96 atomic_notifier_call_chain(&idle_chain, S390_CPU_NOT_IDLE,
97 (void *)(long) smp_processor_id()); 97 (void *)(long) smp_processor_id());
98} 98}
99 99
100extern void s390_handle_mcck(void); 100extern void s390_handle_mcck(void);
@@ -115,7 +115,7 @@ static void default_idle(void)
115 } 115 }
116 116
117 rc = atomic_notifier_call_chain(&idle_chain, 117 rc = atomic_notifier_call_chain(&idle_chain,
118 CPU_IDLE, (void *)(long) cpu); 118 S390_CPU_IDLE, (void *)(long) cpu);
119 if (rc != NOTIFY_OK && rc != NOTIFY_DONE) 119 if (rc != NOTIFY_OK && rc != NOTIFY_DONE)
120 BUG(); 120 BUG();
121 if (rc != NOTIFY_OK) { 121 if (rc != NOTIFY_OK) {
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
index 2a8f0872ea..f4503ca276 100644
--- a/arch/s390/kernel/ptrace.c
+++ b/arch/s390/kernel/ptrace.c
@@ -294,7 +294,6 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data)
294static int 294static int
295do_ptrace_normal(struct task_struct *child, long request, long addr, long data) 295do_ptrace_normal(struct task_struct *child, long request, long addr, long data)
296{ 296{
297 unsigned long tmp;
298 ptrace_area parea; 297 ptrace_area parea;
299 int copied, ret; 298 int copied, ret;
300 299
@@ -304,10 +303,7 @@ do_ptrace_normal(struct task_struct *child, long request, long addr, long data)
304 /* Remove high order bit from address (only for 31 bit). */ 303 /* Remove high order bit from address (only for 31 bit). */
305 addr &= PSW_ADDR_INSN; 304 addr &= PSW_ADDR_INSN;
306 /* read word at location addr. */ 305 /* read word at location addr. */
307 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); 306 return generic_ptrace_peekdata(child, addr, data);
308 if (copied != sizeof(tmp))
309 return -EIO;
310 return put_user(tmp, (unsigned long __force __user *) data);
311 307
312 case PTRACE_PEEKUSR: 308 case PTRACE_PEEKUSR:
313 /* read the word at location addr in the USER area. */ 309 /* read the word at location addr in the USER area. */
@@ -318,10 +314,7 @@ do_ptrace_normal(struct task_struct *child, long request, long addr, long data)
318 /* Remove high order bit from address (only for 31 bit). */ 314 /* Remove high order bit from address (only for 31 bit). */
319 addr &= PSW_ADDR_INSN; 315 addr &= PSW_ADDR_INSN;
320 /* write the word at location addr. */ 316 /* write the word at location addr. */
321 copied = access_process_vm(child, addr, &data, sizeof(data),1); 317 return generic_ptrace_pokedata(child, addr, data);
322 if (copied != sizeof(data))
323 return -EIO;
324 return 0;
325 318
326 case PTRACE_POKEUSR: 319 case PTRACE_POKEUSR:
327 /* write the word at location addr in the USER area */ 320 /* write the word at location addr in the USER area */
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 8ff2feaf9b..182c085ae4 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -410,58 +410,40 @@ EXPORT_SYMBOL(smp_ctl_clear_bit);
410unsigned int zfcpdump_prefix_array[NR_CPUS + 1] \ 410unsigned int zfcpdump_prefix_array[NR_CPUS + 1] \
411 __attribute__((__section__(".data"))); 411 __attribute__((__section__(".data")));
412 412
413static void __init smp_get_save_areas(void) 413static void __init smp_get_save_area(unsigned int cpu, unsigned int phy_cpu)
414{ 414{
415 unsigned int cpu, cpu_num, rc;
416 __u16 boot_cpu_addr;
417
418 if (ipl_info.type != IPL_TYPE_FCP_DUMP) 415 if (ipl_info.type != IPL_TYPE_FCP_DUMP)
419 return; 416 return;
420 boot_cpu_addr = S390_lowcore.cpu_data.cpu_addr; 417 if (cpu >= NR_CPUS) {
421 cpu_num = 1; 418 printk(KERN_WARNING "Registers for cpu %i not saved since dump "
422 for (cpu = 0; cpu <= 65535; cpu++) { 419 "kernel was compiled with NR_CPUS=%i\n", cpu, NR_CPUS);
423 if ((u16) cpu == boot_cpu_addr) 420 return;
424 continue;
425 __cpu_logical_map[1] = (__u16) cpu;
426 if (signal_processor(1, sigp_sense) == sigp_not_operational)
427 continue;
428 if (cpu_num >= NR_CPUS) {
429 printk("WARNING: Registers for cpu %i are not "
430 "saved, since dump kernel was compiled with"
431 "NR_CPUS=%i!\n", cpu_num, NR_CPUS);
432 continue;
433 }
434 zfcpdump_save_areas[cpu_num] =
435 alloc_bootmem(sizeof(union save_area));
436 while (1) {
437 rc = signal_processor(1, sigp_stop_and_store_status);
438 if (rc != sigp_busy)
439 break;
440 cpu_relax();
441 }
442 memcpy(zfcpdump_save_areas[cpu_num],
443 (void *)(unsigned long) store_prefix() +
444 SAVE_AREA_BASE, SAVE_AREA_SIZE);
445#ifdef __s390x__
446 /* copy original prefix register */
447 zfcpdump_save_areas[cpu_num]->s390x.pref_reg =
448 zfcpdump_prefix_array[cpu_num];
449#endif
450 cpu_num++;
451 } 421 }
422 zfcpdump_save_areas[cpu] = alloc_bootmem(sizeof(union save_area));
423 __cpu_logical_map[1] = (__u16) phy_cpu;
424 while (signal_processor(1, sigp_stop_and_store_status) == sigp_busy)
425 cpu_relax();
426 memcpy(zfcpdump_save_areas[cpu],
427 (void *)(unsigned long) store_prefix() + SAVE_AREA_BASE,
428 SAVE_AREA_SIZE);
429#ifdef CONFIG_64BIT
430 /* copy original prefix register */
431 zfcpdump_save_areas[cpu]->s390x.pref_reg = zfcpdump_prefix_array[cpu];
432#endif
452} 433}
453 434
454union save_area *zfcpdump_save_areas[NR_CPUS + 1]; 435union save_area *zfcpdump_save_areas[NR_CPUS + 1];
455EXPORT_SYMBOL_GPL(zfcpdump_save_areas); 436EXPORT_SYMBOL_GPL(zfcpdump_save_areas);
456 437
457#else 438#else
458#define smp_get_save_areas() do { } while (0) 439
459#endif 440static inline void smp_get_save_area(unsigned int cpu, unsigned int phy_cpu) { }
441
442#endif /* CONFIG_ZFCPDUMP || CONFIG_ZFCPDUMP_MODULE */
460 443
461/* 444/*
462 * Lets check how many CPUs we have. 445 * Lets check how many CPUs we have.
463 */ 446 */
464
465static unsigned int __init smp_count_cpus(void) 447static unsigned int __init smp_count_cpus(void)
466{ 448{
467 unsigned int cpu, num_cpus; 449 unsigned int cpu, num_cpus;
@@ -470,7 +452,6 @@ static unsigned int __init smp_count_cpus(void)
470 /* 452 /*
471 * cpu 0 is the boot cpu. See smp_prepare_boot_cpu. 453 * cpu 0 is the boot cpu. See smp_prepare_boot_cpu.
472 */ 454 */
473
474 boot_cpu_addr = S390_lowcore.cpu_data.cpu_addr; 455 boot_cpu_addr = S390_lowcore.cpu_data.cpu_addr;
475 current_thread_info()->cpu = 0; 456 current_thread_info()->cpu = 0;
476 num_cpus = 1; 457 num_cpus = 1;
@@ -480,12 +461,11 @@ static unsigned int __init smp_count_cpus(void)
480 __cpu_logical_map[1] = (__u16) cpu; 461 __cpu_logical_map[1] = (__u16) cpu;
481 if (signal_processor(1, sigp_sense) == sigp_not_operational) 462 if (signal_processor(1, sigp_sense) == sigp_not_operational)
482 continue; 463 continue;
464 smp_get_save_area(num_cpus, cpu);
483 num_cpus++; 465 num_cpus++;
484 } 466 }
485
486 printk("Detected %d CPU's\n", (int) num_cpus); 467 printk("Detected %d CPU's\n", (int) num_cpus);
487 printk("Boot cpu address %2X\n", boot_cpu_addr); 468 printk("Boot cpu address %2X\n", boot_cpu_addr);
488
489 return num_cpus; 469 return num_cpus;
490} 470}
491 471
@@ -606,7 +586,6 @@ void __init smp_setup_cpu_possible_map(void)
606{ 586{
607 unsigned int phy_cpus, pos_cpus, cpu; 587 unsigned int phy_cpus, pos_cpus, cpu;
608 588
609 smp_get_save_areas();
610 phy_cpus = smp_count_cpus(); 589 phy_cpus = smp_count_cpus();
611 pos_cpus = min(phy_cpus + additional_cpus, (unsigned int) NR_CPUS); 590 pos_cpus = min(phy_cpus + additional_cpus, (unsigned int) NR_CPUS);
612 591
diff --git a/arch/s390/kernel/stacktrace.c b/arch/s390/kernel/stacktrace.c
index 515ff9011d..da69247299 100644
--- a/arch/s390/kernel/stacktrace.c
+++ b/arch/s390/kernel/stacktrace.c
@@ -12,7 +12,6 @@
12#include <linux/kallsyms.h> 12#include <linux/kallsyms.h>
13 13
14static unsigned long save_context_stack(struct stack_trace *trace, 14static unsigned long save_context_stack(struct stack_trace *trace,
15 unsigned int *skip,
16 unsigned long sp, 15 unsigned long sp,
17 unsigned long low, 16 unsigned long low,
18 unsigned long high) 17 unsigned long high)
@@ -28,10 +27,10 @@ static unsigned long save_context_stack(struct stack_trace *trace,
28 sf = (struct stack_frame *)sp; 27 sf = (struct stack_frame *)sp;
29 while(1) { 28 while(1) {
30 addr = sf->gprs[8] & PSW_ADDR_INSN; 29 addr = sf->gprs[8] & PSW_ADDR_INSN;
31 if (!(*skip)) 30 if (!trace->skip)
32 trace->entries[trace->nr_entries++] = addr; 31 trace->entries[trace->nr_entries++] = addr;
33 else 32 else
34 (*skip)--; 33 trace->skip--;
35 if (trace->nr_entries >= trace->max_entries) 34 if (trace->nr_entries >= trace->max_entries)
36 return sp; 35 return sp;
37 low = sp; 36 low = sp;
@@ -48,10 +47,10 @@ static unsigned long save_context_stack(struct stack_trace *trace,
48 return sp; 47 return sp;
49 regs = (struct pt_regs *)sp; 48 regs = (struct pt_regs *)sp;
50 addr = regs->psw.addr & PSW_ADDR_INSN; 49 addr = regs->psw.addr & PSW_ADDR_INSN;
51 if (!(*skip)) 50 if (!trace->skip)
52 trace->entries[trace->nr_entries++] = addr; 51 trace->entries[trace->nr_entries++] = addr;
53 else 52 else
54 (*skip)--; 53 trace->skip--;
55 if (trace->nr_entries >= trace->max_entries) 54 if (trace->nr_entries >= trace->max_entries)
56 return sp; 55 return sp;
57 low = sp; 56 low = sp;
@@ -65,20 +64,17 @@ void save_stack_trace(struct stack_trace *trace)
65 unsigned long orig_sp, new_sp; 64 unsigned long orig_sp, new_sp;
66 65
67 orig_sp = sp & PSW_ADDR_INSN; 66 orig_sp = sp & PSW_ADDR_INSN;
68 67 new_sp = save_context_stack(trace, orig_sp,
69 new_sp = save_context_stack(trace, &trace->skip, orig_sp, 68 S390_lowcore.panic_stack - PAGE_SIZE,
70 S390_lowcore.panic_stack - PAGE_SIZE, 69 S390_lowcore.panic_stack);
71 S390_lowcore.panic_stack);
72 if (new_sp != orig_sp) 70 if (new_sp != orig_sp)
73 return; 71 return;
74 new_sp = save_context_stack(trace, &trace->skip, new_sp, 72 new_sp = save_context_stack(trace, new_sp,
75 S390_lowcore.async_stack - ASYNC_SIZE, 73 S390_lowcore.async_stack - ASYNC_SIZE,
76 S390_lowcore.async_stack); 74 S390_lowcore.async_stack);
77 if (new_sp != orig_sp) 75 if (new_sp != orig_sp)
78 return; 76 return;
79 77 save_context_stack(trace, new_sp,
80 save_context_stack(trace, &trace->skip, new_sp,
81 S390_lowcore.thread_info, 78 S390_lowcore.thread_info,
82 S390_lowcore.thread_info + THREAD_SIZE); 79 S390_lowcore.thread_info + THREAD_SIZE);
83 return;
84} 80}
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 9c2872a7cc..48dae49bc1 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -226,10 +226,10 @@ static int nohz_idle_notify(struct notifier_block *self,
226 unsigned long action, void *hcpu) 226 unsigned long action, void *hcpu)
227{ 227{
228 switch (action) { 228 switch (action) {
229 case CPU_IDLE: 229 case S390_CPU_IDLE:
230 stop_hz_timer(); 230 stop_hz_timer();
231 break; 231 break;
232 case CPU_NOT_IDLE: 232 case S390_CPU_NOT_IDLE:
233 start_hz_timer(); 233 start_hz_timer();
234 break; 234 break;
235 } 235 }
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index ee9186f8fb..8ec9def83c 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -262,6 +262,7 @@ void die(const char * str, struct pt_regs * regs, long err)
262 print_modules(); 262 print_modules();
263 show_regs(regs); 263 show_regs(regs);
264 bust_spinlocks(0); 264 bust_spinlocks(0);
265 add_taint(TAINT_DIE);
265 spin_unlock_irq(&die_lock); 266 spin_unlock_irq(&die_lock);
266 if (in_interrupt()) 267 if (in_interrupt())
267 panic("Fatal exception in interrupt"); 268 panic("Fatal exception in interrupt");
@@ -319,7 +320,7 @@ static void __kprobes inline do_trap(long interruption_code, int signr,
319 else { 320 else {
320 enum bug_trap_type btt; 321 enum bug_trap_type btt;
321 322
322 btt = report_bug(regs->psw.addr & PSW_ADDR_INSN); 323 btt = report_bug(regs->psw.addr & PSW_ADDR_INSN, regs);
323 if (btt == BUG_TRAP_TYPE_WARN) 324 if (btt == BUG_TRAP_TYPE_WARN)
324 return; 325 return;
325 die(str, regs, interruption_code); 326 die(str, regs, interruption_code);
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index 1e1a6ee2ca..b6ed143e85 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -545,10 +545,10 @@ static int vtimer_idle_notify(struct notifier_block *self,
545 unsigned long action, void *hcpu) 545 unsigned long action, void *hcpu)
546{ 546{
547 switch (action) { 547 switch (action) {
548 case CPU_IDLE: 548 case S390_CPU_IDLE:
549 stop_cpu_timer(); 549 stop_cpu_timer();
550 break; 550 break;
551 case CPU_NOT_IDLE: 551 case S390_CPU_NOT_IDLE:
552 start_cpu_timer(); 552 start_cpu_timer();
553 break; 553 break;
554 } 554 }
diff --git a/arch/s390/lib/Makefile b/arch/s390/lib/Makefile
index 59aea65ce9..52084436ab 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 qrnnd.o 7lib-y += delay.o string.o uaccess_std.o uaccess_pt.o
8obj-$(CONFIG_32BIT) += div64.o 8obj-$(CONFIG_32BIT) += div64.o qrnnd.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/sh/Kconfig b/arch/sh/Kconfig
index 038179ecf6..d8ed6676ae 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -55,8 +55,21 @@ config GENERIC_TIME
55config GENERIC_CLOCKEVENTS 55config GENERIC_CLOCKEVENTS
56 def_bool n 56 def_bool n
57 57
58config SYS_SUPPORTS_PM
59 bool
60
58config SYS_SUPPORTS_APM_EMULATION 61config SYS_SUPPORTS_APM_EMULATION
59 bool 62 bool
63 select SYS_SUPPORTS_PM
64
65config SYS_SUPPORTS_SMP
66 bool
67
68config SYS_SUPPORTS_NUMA
69 bool
70
71config SYS_SUPPORTS_PCI
72 bool
60 73
61config ARCH_MAY_HAVE_PC_FDC 74config ARCH_MAY_HAVE_PC_FDC
62 bool 75 bool
@@ -81,24 +94,146 @@ source "init/Kconfig"
81 94
82menu "System type" 95menu "System type"
83 96
84config SOLUTION_ENGINE 97source "arch/sh/mm/Kconfig"
85 bool 98
99menu "Processor features"
86 100
87choice 101choice
88 prompt "SuperH system type" 102 prompt "Endianess selection"
89 default SH_UNKNOWN 103 default CPU_LITTLE_ENDIAN
104 help
105 Some SuperH machines can be configured for either little or big
106 endian byte order. These modes require different kernels.
107
108config CPU_LITTLE_ENDIAN
109 bool "Little Endian"
110
111config CPU_BIG_ENDIAN
112 bool "Big Endian"
113
114endchoice
115
116config SH_FPU
117 bool "FPU support"
118 depends on CPU_SH4
119 default y
120 help
121 Selecting this option will enable support for SH processors that
122 have FPU units (ie, SH77xx).
123
124 This option must be set in order to enable the FPU.
125
126config SH_FPU_EMU
127 bool "FPU emulation support"
128 depends on !SH_FPU && EXPERIMENTAL
129 default n
130 help
131 Selecting this option will enable support for software FPU emulation.
132 Most SH-3 users will want to say Y here, whereas most SH-4 users will
133 want to say N.
134
135config SH_DSP
136 bool "DSP support"
137 default y if SH4AL_DSP || !CPU_SH4
138 default n
139 help
140 Selecting this option will enable support for SH processors that
141 have DSP units (ie, SH2-DSP, SH3-DSP, and SH4AL-DSP).
142
143 This option must be set in order to enable the DSP.
144
145config SH_ADC
146 bool "ADC support"
147 depends on CPU_SH3
148 default y
149 help
150 Selecting this option will allow the Linux kernel to use SH3 on-chip
151 ADC module.
152
153 If unsure, say N.
154
155config SH_STORE_QUEUES
156 bool "Support for Store Queues"
157 depends on CPU_SH4
158 help
159 Selecting this option will enable an in-kernel API for manipulating
160 the store queues integrated in the SH-4 processors.
161
162config SPECULATIVE_EXECUTION
163 bool "Speculative subroutine return"
164 depends on CPU_SUBTYPE_SH7780 && EXPERIMENTAL
165 help
166 This enables support for a speculative instruction fetch for
167 subroutine return. There are various pitfalls associated with
168 this, as outlined in the SH7780 hardware manual.
169
170 If unsure, say N.
171
172config CPU_HAS_INTEVT
173 bool
174
175config CPU_HAS_PINT_IRQ
176 bool
177
178config CPU_HAS_MASKREG_IRQ
179 bool
180
181config CPU_HAS_INTC2_IRQ
182 bool
183
184config CPU_HAS_IPR_IRQ
185 bool
186
187config CPU_HAS_SR_RB
188 bool "CPU has SR.RB"
189 depends on CPU_SH3 || CPU_SH4
190 default y
191 help
192 This will enable the use of SR.RB register bank usage. Processors
193 that are lacking this bit must have another method in place for
194 accomplishing what is taken care of by the banked registers.
195
196 See <file:Documentation/sh/register-banks.txt> for further
197 information on SR.RB and register banking in the kernel in general.
198
199config CPU_HAS_PTEA
200 bool
201
202endmenu
203
204menu "Board support"
205
206config SOLUTION_ENGINE
207 bool
90 208
91config SH_SOLUTION_ENGINE 209config SH_SOLUTION_ENGINE
92 bool "SolutionEngine" 210 bool "SolutionEngine"
93 select SOLUTION_ENGINE 211 select SOLUTION_ENGINE
212 depends on CPU_SUBTYPE_SH7709 || CPU_SUBTYPE_SH7750
94 help 213 help
95 Select SolutionEngine if configuring for a Hitachi SH7709 214 Select SolutionEngine if configuring for a Hitachi SH7709
96 or SH7750 evaluation board. 215 or SH7750 evaluation board.
97 216
217config SH_7206_SOLUTION_ENGINE
218 bool "SolutionEngine7206"
219 select SOLUTION_ENGINE
220 depends on CPU_SUBTYPE_SH7206
221 help
222 Select 7206 SolutionEngine if configuring for a Hitachi SH7206
223 evaluation board.
224
225config SH_7619_SOLUTION_ENGINE
226 bool "SolutionEngine7619"
227 select SOLUTION_ENGINE
228 depends on CPU_SUBTYPE_SH7619
229 help
230 Select 7619 SolutionEngine if configuring for a Hitachi SH7619
231 evaluation board.
232
98config SH_7722_SOLUTION_ENGINE 233config SH_7722_SOLUTION_ENGINE
99 bool "SolutionEngine7722" 234 bool "SolutionEngine7722"
100 select SOLUTION_ENGINE 235 select SOLUTION_ENGINE
101 select CPU_SUBTYPE_SH7722 236 depends on CPU_SUBTYPE_SH7722
102 help 237 help
103 Select 7722 SolutionEngine if configuring for a Hitachi SH772 238 Select 7722 SolutionEngine if configuring for a Hitachi SH772
104 evaluation board. 239 evaluation board.
@@ -106,7 +241,7 @@ config SH_7722_SOLUTION_ENGINE
106config SH_7751_SOLUTION_ENGINE 241config SH_7751_SOLUTION_ENGINE
107 bool "SolutionEngine7751" 242 bool "SolutionEngine7751"
108 select SOLUTION_ENGINE 243 select SOLUTION_ENGINE
109 select CPU_SUBTYPE_SH7751 244 depends on CPU_SUBTYPE_SH7751
110 help 245 help
111 Select 7751 SolutionEngine if configuring for a Hitachi SH7751 246 Select 7751 SolutionEngine if configuring for a Hitachi SH7751
112 evaluation board. 247 evaluation board.
@@ -114,7 +249,8 @@ config SH_7751_SOLUTION_ENGINE
114config SH_7780_SOLUTION_ENGINE 249config SH_7780_SOLUTION_ENGINE
115 bool "SolutionEngine7780" 250 bool "SolutionEngine7780"
116 select SOLUTION_ENGINE 251 select SOLUTION_ENGINE
117 select CPU_SUBTYPE_SH7780 252 select SYS_SUPPORTS_PCI
253 depends on CPU_SUBTYPE_SH7780
118 help 254 help
119 Select 7780 SolutionEngine if configuring for a Renesas SH7780 255 Select 7780 SolutionEngine if configuring for a Renesas SH7780
120 evaluation board. 256 evaluation board.
@@ -122,7 +258,7 @@ config SH_7780_SOLUTION_ENGINE
122config SH_7300_SOLUTION_ENGINE 258config SH_7300_SOLUTION_ENGINE
123 bool "SolutionEngine7300" 259 bool "SolutionEngine7300"
124 select SOLUTION_ENGINE 260 select SOLUTION_ENGINE
125 select CPU_SUBTYPE_SH7300 261 depends on CPU_SUBTYPE_SH7300
126 help 262 help
127 Select 7300 SolutionEngine if configuring for a Hitachi 263 Select 7300 SolutionEngine if configuring for a Hitachi
128 SH7300(SH-Mobile V) evaluation board. 264 SH7300(SH-Mobile V) evaluation board.
@@ -130,22 +266,22 @@ config SH_7300_SOLUTION_ENGINE
130config SH_7343_SOLUTION_ENGINE 266config SH_7343_SOLUTION_ENGINE
131 bool "SolutionEngine7343" 267 bool "SolutionEngine7343"
132 select SOLUTION_ENGINE 268 select SOLUTION_ENGINE
133 select CPU_SUBTYPE_SH7343 269 depends on CPU_SUBTYPE_SH7343
134 help 270 help
135 Select 7343 SolutionEngine if configuring for a Hitachi 271 Select 7343 SolutionEngine if configuring for a Hitachi
136 SH7343 (SH-Mobile 3AS) evaluation board. 272 SH7343 (SH-Mobile 3AS) evaluation board.
137 273
138config SH_73180_SOLUTION_ENGINE 274config SH_73180_SOLUTION_ENGINE
139 bool "SolutionEngine73180" 275 bool "SolutionEngine73180"
140 select SOLUTION_ENGINE 276 select SOLUTION_ENGINE
141 select CPU_SUBTYPE_SH73180 277 depends on CPU_SUBTYPE_SH73180
142 help 278 help
143 Select 73180 SolutionEngine if configuring for a Hitachi 279 Select 73180 SolutionEngine if configuring for a Hitachi
144 SH73180(SH-Mobile 3) evaluation board. 280 SH73180(SH-Mobile 3) evaluation board.
145 281
146config SH_7751_SYSTEMH 282config SH_7751_SYSTEMH
147 bool "SystemH7751R" 283 bool "SystemH7751R"
148 select CPU_SUBTYPE_SH7751R 284 depends on CPU_SUBTYPE_SH7751R
149 help 285 help
150 Select SystemH if you are configuring for a Renesas SystemH 286 Select SystemH if you are configuring for a Renesas SystemH
151 7751R evaluation board. 287 7751R evaluation board.
@@ -153,20 +289,17 @@ config SH_7751_SYSTEMH
153config SH_HP6XX 289config SH_HP6XX
154 bool "HP6XX" 290 bool "HP6XX"
155 select SYS_SUPPORTS_APM_EMULATION 291 select SYS_SUPPORTS_APM_EMULATION
292 select HD6446X_SERIES
293 depends on CPU_SUBTYPE_SH7709
156 help 294 help
157 Select HP6XX if configuring for a HP jornada HP6xx. 295 Select HP6XX if configuring for a HP jornada HP6xx.
158 More information (hardware only) at 296 More information (hardware only) at
159 <http://www.hp.com/jornada/>. 297 <http://www.hp.com/jornada/>.
160 298
161config SH_SATURN
162 bool "Saturn"
163 select CPU_SUBTYPE_SH7604
164 help
165 Select Saturn if configuring for a SEGA Saturn.
166
167config SH_DREAMCAST 299config SH_DREAMCAST
168 bool "Dreamcast" 300 bool "Dreamcast"
169 select CPU_SUBTYPE_SH7091 301 select SYS_SUPPORTS_PCI
302 depends on CPU_SUBTYPE_SH7091
170 help 303 help
171 Select Dreamcast if configuring for a SEGA Dreamcast. 304 Select Dreamcast if configuring for a SEGA Dreamcast.
172 More information at 305 More information at
@@ -175,6 +308,7 @@ config SH_DREAMCAST
175 308
176config SH_MPC1211 309config SH_MPC1211
177 bool "Interface MPC1211" 310 bool "Interface MPC1211"
311 depends on CPU_SUBTYPE_SH7751 && BROKEN
178 help 312 help
179 CTP/PCI-SH02 is a CPU module computer that is produced 313 CTP/PCI-SH02 is a CPU module computer that is produced
180 by Interface Corporation. 314 by Interface Corporation.
@@ -182,6 +316,8 @@ config SH_MPC1211
182 316
183config SH_SH03 317config SH_SH03
184 bool "Interface CTP/PCI-SH03" 318 bool "Interface CTP/PCI-SH03"
319 depends on CPU_SUBTYPE_SH7751 && BROKEN
320 select SYS_SUPPORTS_PCI
185 help 321 help
186 CTP/PCI-SH03 is a CPU module computer that is produced 322 CTP/PCI-SH03 is a CPU module computer that is produced
187 by Interface Corporation. 323 by Interface Corporation.
@@ -189,7 +325,8 @@ config SH_SH03
189 325
190config SH_SECUREEDGE5410 326config SH_SECUREEDGE5410
191 bool "SecureEdge5410" 327 bool "SecureEdge5410"
192 select CPU_SUBTYPE_SH7751R 328 depends on CPU_SUBTYPE_SH7751R
329 select SYS_SUPPORTS_PCI
193 help 330 help
194 Select SecureEdge5410 if configuring for a SnapGear SH board. 331 Select SecureEdge5410 if configuring for a SnapGear SH board.
195 This includes both the OEM SecureEdge products as well as the 332 This includes both the OEM SecureEdge products as well as the
@@ -197,246 +334,76 @@ config SH_SECUREEDGE5410
197 334
198config SH_HS7751RVOIP 335config SH_HS7751RVOIP
199 bool "HS7751RVOIP" 336 bool "HS7751RVOIP"
200 select CPU_SUBTYPE_SH7751R 337 depends on CPU_SUBTYPE_SH7751R
201 help 338 help
202 Select HS7751RVOIP if configuring for a Renesas Technology 339 Select HS7751RVOIP if configuring for a Renesas Technology
203 Sales VoIP board. 340 Sales VoIP board.
204 341
205config SH_7710VOIPGW 342config SH_7710VOIPGW
206 bool "SH7710-VOIP-GW" 343 bool "SH7710-VOIP-GW"
207 select CPU_SUBTYPE_SH7710 344 depends on CPU_SUBTYPE_SH7710
208 help 345 help
209 Select this option to build a kernel for the SH7710 based 346 Select this option to build a kernel for the SH7710 based
210 VOIP GW. 347 VOIP GW.
211 348
212config SH_RTS7751R2D 349config SH_RTS7751R2D
213 bool "RTS7751R2D" 350 bool "RTS7751R2D"
214 select CPU_SUBTYPE_SH7751R 351 depends on CPU_SUBTYPE_SH7751R
352 select SYS_SUPPORTS_PCI
215 help 353 help
216 Select RTS7751R2D if configuring for a Renesas Technology 354 Select RTS7751R2D if configuring for a Renesas Technology
217 Sales SH-Graphics board. 355 Sales SH-Graphics board.
218 356
219config SH_HIGHLANDER 357config SH_HIGHLANDER
220 bool "Highlander" 358 bool "Highlander"
359 depends on CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785
360 select SYS_SUPPORTS_PCI
221 361
222config SH_EDOSK7705 362config SH_EDOSK7705
223 bool "EDOSK7705" 363 bool "EDOSK7705"
224 select CPU_SUBTYPE_SH7705 364 depends on CPU_SUBTYPE_SH7705
225 365
226config SH_SH4202_MICRODEV 366config SH_SH4202_MICRODEV
227 bool "SH4-202 MicroDev" 367 bool "SH4-202 MicroDev"
228 select CPU_SUBTYPE_SH4_202 368 depends on CPU_SUBTYPE_SH4_202
229 help 369 help
230 Select SH4-202 MicroDev if configuring for a SuperH MicroDev board 370 Select SH4-202 MicroDev if configuring for a SuperH MicroDev board
231 with an SH4-202 CPU. 371 with an SH4-202 CPU.
232 372
233config SH_LANDISK 373config SH_LANDISK
234 bool "LANDISK" 374 bool "LANDISK"
235 select CPU_SUBTYPE_SH7751R 375 depends on CPU_SUBTYPE_SH7751R
376 select SYS_SUPPORTS_PCI
236 help 377 help
237 I-O DATA DEVICE, INC. "LANDISK Series" support. 378 I-O DATA DEVICE, INC. "LANDISK Series" support.
238 379
239config SH_TITAN 380config SH_TITAN
240 bool "TITAN" 381 bool "TITAN"
241 select CPU_SUBTYPE_SH7751R 382 depends on CPU_SUBTYPE_SH7751R
383 select SYS_SUPPORTS_PCI
242 help 384 help
243 Select Titan if you are configuring for a Nimble Microsystems 385 Select Titan if you are configuring for a Nimble Microsystems
244 NetEngine NP51R. 386 NetEngine NP51R.
245 387
246config SH_SHMIN 388config SH_SHMIN
247 bool "SHMIN" 389 bool "SHMIN"
248 select CPU_SUBTYPE_SH7706 390 depends on CPU_SUBTYPE_SH7706
249 help 391 help
250 Select SHMIN if configuring for the SHMIN board. 392 Select SHMIN if configuring for the SHMIN board.
251 393
252config SH_7206_SOLUTION_ENGINE
253 bool "SolutionEngine7206"
254 select CPU_SUBTYPE_SH7206
255 help
256 Select 7206 SolutionEngine if configuring for a Hitachi SH7206
257 evaluation board.
258
259config SH_7619_SOLUTION_ENGINE
260 bool "SolutionEngine7619"
261 select CPU_SUBTYPE_SH7619
262 help
263 Select 7619 SolutionEngine if configuring for a Hitachi SH7619
264 evaluation board.
265
266config SH_LBOX_RE2 394config SH_LBOX_RE2
267 bool "L-BOX RE2" 395 bool "L-BOX RE2"
268 select CPU_SUBTYPE_SH7751R 396 depends on CPU_SUBTYPE_SH7751R
397 select SYS_SUPPORTS_PCI
269 help 398 help
270 Select L-BOX RE2 if configuring for the NTT COMWARE L-BOX RE2. 399 Select L-BOX RE2 if configuring for the NTT COMWARE L-BOX RE2.
271 400
272config SH_UNKNOWN 401endmenu
273 bool "BareCPU"
274 help
275 "Bare CPU" aka "unknown" means an SH-based system which is not one
276 of the specific ones mentioned above, which means you need to enter
277 all sorts of stuff like CONFIG_MEMORY_START because the config
278 system doesn't already know what it is. You get a machine vector
279 without any platform-specific code in it, so things like the RTC may
280 not work.
281
282 This option is for the early stages of porting to a new machine.
283
284endchoice
285 402
286source "arch/sh/boards/renesas/hs7751rvoip/Kconfig" 403source "arch/sh/boards/renesas/hs7751rvoip/Kconfig"
287source "arch/sh/boards/renesas/rts7751r2d/Kconfig" 404source "arch/sh/boards/renesas/rts7751r2d/Kconfig"
288source "arch/sh/boards/renesas/r7780rp/Kconfig" 405source "arch/sh/boards/renesas/r7780rp/Kconfig"
289 406
290source "arch/sh/mm/Kconfig"
291
292config CF_ENABLER
293 bool "Compact Flash Enabler support"
294 depends on SH_SOLUTION_ENGINE || SH_UNKNOWN || SH_SH03
295 ---help---
296 Compact Flash is a small, removable mass storage device introduced
297 in 1994 originally as a PCMCIA device. If you say `Y' here, you
298 compile in support for Compact Flash devices directly connected to
299 a SuperH processor. A Compact Flash FAQ is available at
300 <http://www.compactflash.org/faqs/faq.htm>.
301
302 If your board has "Directly Connected" CompactFlash at area 5 or 6,
303 you may want to enable this option. Then, you can use CF as
304 primary IDE drive (only tested for SanDisk).
305
306 If in doubt, select 'N'.
307
308choice
309 prompt "Compact Flash Connection Area"
310 depends on CF_ENABLER
311 default CF_AREA6
312
313config CF_AREA5
314 bool "Area5"
315 help
316 If your board has "Directly Connected" CompactFlash, You should
317 select the area where your CF is connected to.
318
319 - "Area5" if CompactFlash is connected to Area 5 (0x14000000)
320 - "Area6" if it is connected to Area 6 (0x18000000)
321
322 "Area6" will work for most boards.
323
324config CF_AREA6
325 bool "Area6"
326
327endchoice
328
329config CF_BASE_ADDR
330 hex
331 depends on CF_ENABLER
332 default "0xb8000000" if CF_AREA6
333 default "0xb4000000" if CF_AREA5
334
335menu "Processor features"
336
337choice
338 prompt "Endianess selection"
339 default CPU_LITTLE_ENDIAN
340 help
341 Some SuperH machines can be configured for either little or big
342 endian byte order. These modes require different kernels.
343
344config CPU_LITTLE_ENDIAN
345 bool "Little Endian"
346
347config CPU_BIG_ENDIAN
348 bool "Big Endian"
349
350endchoice
351
352config SH_FPU
353 bool "FPU support"
354 depends on !CPU_SH3
355 default y
356 help
357 Selecting this option will enable support for SH processors that
358 have FPU units (ie, SH77xx).
359
360 This option must be set in order to enable the FPU.
361
362config SH_FPU_EMU
363 bool "FPU emulation support"
364 depends on !SH_FPU && EXPERIMENTAL
365 default n
366 help
367 Selecting this option will enable support for software FPU emulation.
368 Most SH-3 users will want to say Y here, whereas most SH-4 users will
369 want to say N.
370
371config SH_DSP
372 bool "DSP support"
373 default y if SH4AL_DSP || !CPU_SH4
374 default n
375 help
376 Selecting this option will enable support for SH processors that
377 have DSP units (ie, SH2-DSP, SH3-DSP, and SH4AL-DSP).
378
379 This option must be set in order to enable the DSP.
380
381config SH_ADC
382 bool "ADC support"
383 depends on CPU_SH3
384 default y
385 help
386 Selecting this option will allow the Linux kernel to use SH3 on-chip
387 ADC module.
388
389 If unsure, say N.
390
391config SH_STORE_QUEUES
392 bool "Support for Store Queues"
393 depends on CPU_SH4
394 help
395 Selecting this option will enable an in-kernel API for manipulating
396 the store queues integrated in the SH-4 processors.
397
398config SPECULATIVE_EXECUTION
399 bool "Speculative subroutine return"
400 depends on CPU_SUBTYPE_SH7780 && EXPERIMENTAL
401 help
402 This enables support for a speculative instruction fetch for
403 subroutine return. There are various pitfalls associated with
404 this, as outlined in the SH7780 hardware manual.
405
406 If unsure, say N.
407
408config CPU_HAS_INTEVT
409 bool
410
411config CPU_HAS_PINT_IRQ
412 bool
413
414config CPU_HAS_MASKREG_IRQ
415 bool
416
417config CPU_HAS_INTC2_IRQ
418 bool
419
420config CPU_HAS_IPR_IRQ
421 bool
422
423config CPU_HAS_SR_RB
424 bool "CPU has SR.RB"
425 depends on CPU_SH3 || CPU_SH4
426 default y
427 help
428 This will enable the use of SR.RB register bank usage. Processors
429 that are lacking this bit must have another method in place for
430 accomplishing what is taken care of by the banked registers.
431
432 See <file:Documentation/sh/register-banks.txt> for further
433 information on SR.RB and register banking in the kernel in general.
434
435config CPU_HAS_PTEA
436 bool
437
438endmenu
439
440menu "Timer and clock configuration" 407menu "Timer and clock configuration"
441 408
442config SH_TMU 409config SH_TMU
@@ -473,13 +440,13 @@ config SH_PCLK_FREQ
473 int "Peripheral clock frequency (in Hz)" 440 int "Peripheral clock frequency (in Hz)"
474 default "27000000" if CPU_SUBTYPE_SH73180 || CPU_SUBTYPE_SH7343 441 default "27000000" if CPU_SUBTYPE_SH73180 || CPU_SUBTYPE_SH7343
475 default "31250000" if CPU_SUBTYPE_SH7619 442 default "31250000" if CPU_SUBTYPE_SH7619
443 default "32000000" if CPU_SUBTYPE_SH7722
476 default "33333333" if CPU_SUBTYPE_SH7300 || CPU_SUBTYPE_SH7770 || \ 444 default "33333333" if CPU_SUBTYPE_SH7300 || CPU_SUBTYPE_SH7770 || \
477 CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7705 || \ 445 CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7705 || \
478 CPU_SUBTYPE_SH7206 446 CPU_SUBTYPE_SH7206
479 default "50000000" if CPU_SUBTYPE_SH7750 || CPU_SUBTYPE_SH7780 || \ 447 default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
480 CPU_SUBTYPE_SH7785
481 default "60000000" if CPU_SUBTYPE_SH7751
482 default "66000000" if CPU_SUBTYPE_SH4_202 448 default "66000000" if CPU_SUBTYPE_SH4_202
449 default "50000000"
483 help 450 help
484 This option is used to specify the peripheral clock frequency. 451 This option is used to specify the peripheral clock frequency.
485 This is necessary for determining the reference clock value on 452 This is necessary for determining the reference clock value on
@@ -487,8 +454,10 @@ config SH_PCLK_FREQ
487 454
488config SH_CLK_MD 455config SH_CLK_MD
489 int "CPU Mode Pin Setting" 456 int "CPU Mode Pin Setting"
490 default 0
491 depends on CPU_SUBTYPE_SH7619 || CPU_SUBTYPE_SH7206 457 depends on CPU_SUBTYPE_SH7619 || CPU_SUBTYPE_SH7206
458 default 6 if CPU_SUBTYPE_SH7206
459 default 5 if CPU_SUBTYPE_SH7619
460 default 0
492 help 461 help
493 MD2 - MD0 pin setting. 462 MD2 - MD0 pin setting.
494 463
@@ -560,6 +529,7 @@ config CRASH_DUMP
560 529
561config SMP 530config SMP
562 bool "Symmetric multi-processing support" 531 bool "Symmetric multi-processing support"
532 depends on SYS_SUPPORTS_SMP
563 ---help--- 533 ---help---
564 This enables support for systems with more than one CPU. If you have 534 This enables support for systems with more than one CPU. If you have
565 a system with only one CPU, like most personal computers, say N. If 535 a system with only one CPU, like most personal computers, say N. If
@@ -584,6 +554,7 @@ config NR_CPUS
584 int "Maximum number of CPUs (2-32)" 554 int "Maximum number of CPUs (2-32)"
585 range 2 32 555 range 2 32
586 depends on SMP 556 depends on SMP
557 default "4" if CPU_SHX3
587 default "2" 558 default "2"
588 help 559 help
589 This allows you to specify the maximum number of CPUs which this 560 This allows you to specify the maximum number of CPUs which this
@@ -623,6 +594,7 @@ config BOOT_LINK_OFFSET
623 594
624config UBC_WAKEUP 595config UBC_WAKEUP
625 bool "Wakeup UBC on startup" 596 bool "Wakeup UBC on startup"
597 depends on CPU_SH4
626 help 598 help
627 Selecting this option will wakeup the User Break Controller (UBC) on 599 Selecting this option will wakeup the User Break Controller (UBC) on
628 startup. Although the UBC is left in an awake state when the processor 600 startup. Although the UBC is left in an awake state when the processor
@@ -651,8 +623,8 @@ menu "Bus options"
651# we're not using PCMCIA, so we make it dependent on 623# we're not using PCMCIA, so we make it dependent on
652# PCMCIA outright. -- PFM. 624# PCMCIA outright. -- PFM.
653config ISA 625config ISA
654 bool 626 def_bool y
655 default y if PCMCIA 627 depends on PCMCIA && HD6446X_SERIES
656 help 628 help
657 Find out whether you have ISA slots on your motherboard. ISA is the 629 Find out whether you have ISA slots on your motherboard. ISA is the
658 name of a bus system, i.e. the way the CPU talks to the other stuff 630 name of a bus system, i.e. the way the CPU talks to the other stuff
@@ -690,6 +662,49 @@ config SUPERHYWAY
690 tristate "SuperHyway Bus support" 662 tristate "SuperHyway Bus support"
691 depends on CPU_SUBTYPE_SH4_202 663 depends on CPU_SUBTYPE_SH4_202
692 664
665config CF_ENABLER
666 bool "Compact Flash Enabler support"
667 depends on SOLUTION_ENGINE || SH_SH03
668 ---help---
669 Compact Flash is a small, removable mass storage device introduced
670 in 1994 originally as a PCMCIA device. If you say `Y' here, you
671 compile in support for Compact Flash devices directly connected to
672 a SuperH processor. A Compact Flash FAQ is available at
673 <http://www.compactflash.org/faqs/faq.htm>.
674
675 If your board has "Directly Connected" CompactFlash at area 5 or 6,
676 you may want to enable this option. Then, you can use CF as
677 primary IDE drive (only tested for SanDisk).
678
679 If in doubt, select 'N'.
680
681choice
682 prompt "Compact Flash Connection Area"
683 depends on CF_ENABLER
684 default CF_AREA6
685
686config CF_AREA5
687 bool "Area5"
688 help
689 If your board has "Directly Connected" CompactFlash, You should
690 select the area where your CF is connected to.
691
692 - "Area5" if CompactFlash is connected to Area 5 (0x14000000)
693 - "Area6" if it is connected to Area 6 (0x18000000)
694
695 "Area6" will work for most boards.
696
697config CF_AREA6
698 bool "Area6"
699
700endchoice
701
702config CF_BASE_ADDR
703 hex
704 depends on CF_ENABLER
705 default "0xb8000000" if CF_AREA6
706 default "0xb4000000" if CF_AREA5
707
693source "arch/sh/drivers/pci/Kconfig" 708source "arch/sh/drivers/pci/Kconfig"
694 709
695source "drivers/pci/Kconfig" 710source "drivers/pci/Kconfig"
@@ -707,7 +722,7 @@ source "fs/Kconfig.binfmt"
707endmenu 722endmenu
708 723
709menu "Power management options (EXPERIMENTAL)" 724menu "Power management options (EXPERIMENTAL)"
710depends on EXPERIMENTAL 725depends on EXPERIMENTAL && SYS_SUPPORTS_PM
711 726
712source kernel/power/Kconfig 727source kernel/power/Kconfig
713 728
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index b56307294b..52f6a99c8e 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -52,6 +52,10 @@ config EARLY_PRINTK
52 select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using 52 select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using
53 the kernel command line option to toggle back and forth. 53 the kernel command line option to toggle back and forth.
54 54
55config DEBUG_BOOTMEM
56 depends on DEBUG_KERNEL
57 bool "Debug BOOTMEM initialization"
58
55config DEBUG_STACKOVERFLOW 59config DEBUG_STACKOVERFLOW
56 bool "Check for stack overflows" 60 bool "Check for stack overflows"
57 depends on DEBUG_KERNEL 61 depends on DEBUG_KERNEL
@@ -82,6 +86,7 @@ config SH_KGDB
82 bool "Include KGDB kernel debugger" 86 bool "Include KGDB kernel debugger"
83 select FRAME_POINTER 87 select FRAME_POINTER
84 select DEBUG_INFO 88 select DEBUG_INFO
89 depends on CPU_SH3 || CPU_SH4
85 help 90 help
86 Include in-kernel hooks for kgdb, the Linux kernel source level 91 Include in-kernel hooks for kgdb, the Linux kernel source level
87 debugger. See <http://kgdb.sourceforge.net/> for more information. 92 debugger. See <http://kgdb.sourceforge.net/> for more information.
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 883b03b040..77fecc62a0 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -34,20 +34,20 @@ isa-y := $(isa-y)-nofpu
34endif 34endif
35endif 35endif
36 36
37cflags-$(CONFIG_CPU_SH2) := -m2 37cflags-$(CONFIG_CPU_SH2) := $(call cc-option,-m2,)
38cflags-$(CONFIG_CPU_SH2A) := -m2a $(call cc-option,-m2a-nofpu,) 38cflags-$(CONFIG_CPU_SH2A) += $(call cc-option,-m2a,) \
39cflags-$(CONFIG_CPU_SH3) := -m3 39 $(call cc-option,-m2a-nofpu,)
40cflags-$(CONFIG_CPU_SH4) := -m4 \ 40cflags-$(CONFIG_CPU_SH3) := $(call cc-option,-m3,)
41cflags-$(CONFIG_CPU_SH4) := $(call cc-option,-m4,) \
41 $(call cc-option,-mno-implicit-fp,-m4-nofpu) 42 $(call cc-option,-mno-implicit-fp,-m4-nofpu)
42cflags-$(CONFIG_CPU_SH4A) := $(call cc-option,-m4a,) $(call cc-option,-m4a-nofpu,) 43cflags-$(CONFIG_CPU_SH4A) += $(call cc-option,-m4a,) \
44 $(call cc-option,-m4a-nofpu,)
43 45
44cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb 46cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb
45cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml 47cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml
46 48
47cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),) -ffreestanding 49cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),) -ffreestanding
48 50
49cflags-$(CONFIG_SH_DSP) += -Wa,-dsp
50
51cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \ 51cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \
52 $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g') 52 $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
53 53
@@ -87,39 +87,37 @@ core-y += arch/sh/kernel/ arch/sh/mm/
87core-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/ 87core-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/
88 88
89# Boards 89# Boards
90machdir-$(CONFIG_SH_SOLUTION_ENGINE) := se/770x 90machdir-$(CONFIG_SH_SOLUTION_ENGINE) += se/770x
91machdir-$(CONFIG_SH_7722_SOLUTION_ENGINE) := se/7722 91machdir-$(CONFIG_SH_7722_SOLUTION_ENGINE) += se/7722
92machdir-$(CONFIG_SH_7751_SOLUTION_ENGINE) := se/7751 92machdir-$(CONFIG_SH_7751_SOLUTION_ENGINE) += se/7751
93machdir-$(CONFIG_SH_7780_SOLUTION_ENGINE) := se/7780 93machdir-$(CONFIG_SH_7780_SOLUTION_ENGINE) += se/7780
94machdir-$(CONFIG_SH_7300_SOLUTION_ENGINE) := se/7300 94machdir-$(CONFIG_SH_7300_SOLUTION_ENGINE) += se/7300
95machdir-$(CONFIG_SH_7343_SOLUTION_ENGINE) := se/7343 95machdir-$(CONFIG_SH_7343_SOLUTION_ENGINE) += se/7343
96machdir-$(CONFIG_SH_73180_SOLUTION_ENGINE) := se/73180 96machdir-$(CONFIG_SH_73180_SOLUTION_ENGINE) += se/73180
97machdir-$(CONFIG_SH_HP6XX) := hp6xx 97machdir-$(CONFIG_SH_HP6XX) += hp6xx
98machdir-$(CONFIG_SH_SATURN) := saturn 98machdir-$(CONFIG_SH_DREAMCAST) += dreamcast
99machdir-$(CONFIG_SH_DREAMCAST) := dreamcast 99machdir-$(CONFIG_SH_MPC1211) += mpc1211
100machdir-$(CONFIG_SH_MPC1211) := mpc1211 100machdir-$(CONFIG_SH_SH03) += sh03
101machdir-$(CONFIG_SH_SH03) := sh03 101machdir-$(CONFIG_SH_SECUREEDGE5410) += snapgear
102machdir-$(CONFIG_SH_SECUREEDGE5410) := snapgear 102machdir-$(CONFIG_SH_HS7751RVOIP) += renesas/hs7751rvoip
103machdir-$(CONFIG_SH_HS7751RVOIP) := renesas/hs7751rvoip 103machdir-$(CONFIG_SH_RTS7751R2D) += renesas/rts7751r2d
104machdir-$(CONFIG_SH_RTS7751R2D) := renesas/rts7751r2d 104machdir-$(CONFIG_SH_7751_SYSTEMH) += renesas/systemh
105machdir-$(CONFIG_SH_7751_SYSTEMH) := renesas/systemh 105machdir-$(CONFIG_SH_EDOSK7705) += renesas/edosk7705
106machdir-$(CONFIG_SH_EDOSK7705) := renesas/edosk7705 106machdir-$(CONFIG_SH_HIGHLANDER) += renesas/r7780rp
107machdir-$(CONFIG_SH_HIGHLANDER) := renesas/r7780rp 107machdir-$(CONFIG_SH_7710VOIPGW) += renesas/sh7710voipgw
108machdir-$(CONFIG_SH_7710VOIPGW) := renesas/sh7710voipgw 108machdir-$(CONFIG_SH_SH4202_MICRODEV) += superh/microdev
109machdir-$(CONFIG_SH_SH4202_MICRODEV) := superh/microdev 109machdir-$(CONFIG_SH_LANDISK) += landisk
110machdir-$(CONFIG_SH_LANDISK) := landisk 110machdir-$(CONFIG_SH_TITAN) += titan
111machdir-$(CONFIG_SH_TITAN) := titan 111machdir-$(CONFIG_SH_SHMIN) += shmin
112machdir-$(CONFIG_SH_SHMIN) := shmin 112machdir-$(CONFIG_SH_7206_SOLUTION_ENGINE) += se/7206
113machdir-$(CONFIG_SH_7206_SOLUTION_ENGINE) := se/7206 113machdir-$(CONFIG_SH_7619_SOLUTION_ENGINE) += se/7619
114machdir-$(CONFIG_SH_7619_SOLUTION_ENGINE) := se/7619 114machdir-$(CONFIG_SH_LBOX_RE2) += lboxre2
115machdir-$(CONFIG_SH_LBOX_RE2) := lboxre2 115
116machdir-$(CONFIG_SH_UNKNOWN) := unknown 116incdir-y := $(notdir $(machdir-y))
117
118incdir-y := $(notdir $(machdir-y))
119incdir-$(CONFIG_SH_HP6XX) := hp6xx
120 117
121ifneq ($(machdir-y),) 118ifneq ($(machdir-y),)
122core-y += arch/sh/boards/$(machdir-y)/ 119core-y += $(addprefix arch/sh/boards/, \
120 $(filter-out ., $(patsubst %,%/,$(machdir-y))))
123endif 121endif
124 122
125# Companion chips 123# Companion chips
@@ -157,19 +155,31 @@ include/asm-sh/.cpu: $(wildcard include/config/cpu/*.h) \
157# Most boards have their own mach directories. For the ones that 155# Most boards have their own mach directories. For the ones that
158# don't, just reference the parent directory so the semantics are 156# don't, just reference the parent directory so the semantics are
159# kept roughly the same. 157# kept roughly the same.
158#
159# When multiple boards are compiled in at the same time, preference
160# for the mach link is given to whichever has a directory for its
161# headers. However, this is only a workaround until platforms that
162# can live in the same kernel image back away from relying on the
163# mach link.
160 164
161include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \ 165include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \
162 include/config/auto.conf FORCE 166 include/config/auto.conf FORCE
163 @echo -n ' SYMLINK include/asm-sh/mach -> '
164 $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi 167 $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi
165 $(Q)if [ -d $(incdir-prefix)$(incdir-y) ]; then \ 168 $(Q)rm -f include/asm-sh/mach
166 echo -e 'include/asm-sh/$(incdir-y)'; \ 169 $(Q)for i in $(incdir-y); do \
167 ln -fsn $(incdir-prefix)$(incdir-y) \ 170 if [ -d $(incdir-prefix)$$i ]; then \
171 echo -n ' SYMLINK include/asm-sh/mach -> '; \
172 echo -e "include/asm-sh/$$i"; \
173 ln -fsn $(incdir-prefix)$$i \
168 include/asm-sh/mach; \ 174 include/asm-sh/mach; \
169 else \ 175 else \
170 echo -e 'include/asm-sh'; \ 176 if [ ! -d include/asm-sh/mach ]; then \
171 ln -fsn $(incdir-prefix) include/asm-sh/mach; \ 177 echo -n ' SYMLINK include/asm-sh/mach -> '; \
172 fi 178 echo -e 'include/asm-sh'; \
179 ln -fsn $(incdir-prefix) include/asm-sh/mach; \
180 fi; \
181 fi; \
182 done
173 @touch $@ 183 @touch $@
174 184
175archprepare: include/asm-sh/.cpu include/asm-sh/.mach maketools 185archprepare: include/asm-sh/.cpu include/asm-sh/.mach maketools
@@ -188,7 +198,9 @@ compressed: zImage
188archclean: 198archclean:
189 $(Q)$(MAKE) $(clean)=$(boot) 199 $(Q)$(MAKE) $(clean)=$(boot)
190 200
191CLEAN_FILES += include/asm-sh/machtypes.h 201CLEAN_FILES += include/asm-sh/machtypes.h \
202 include/asm-sh/cpu include/asm-sh/.cpu \
203 include/asm-sh/mach include/asm-sh/.mach
192 204
193define archhelp 205define archhelp
194 @echo '* zImage - Compressed kernel image' 206 @echo '* zImage - Compressed kernel image'
diff --git a/arch/sh/boards/dreamcast/setup.c b/arch/sh/boards/dreamcast/setup.c
index f13017eeeb..8799df6e86 100644
--- a/arch/sh/boards/dreamcast/setup.c
+++ b/arch/sh/boards/dreamcast/setup.c
@@ -60,7 +60,7 @@ static void __init dreamcast_setup(char **cmdline_p)
60#endif 60#endif
61} 61}
62 62
63struct sh_machine_vector mv_dreamcast __initmv = { 63static struct sh_machine_vector mv_dreamcast __initmv = {
64 .mv_name = "Sega Dreamcast", 64 .mv_name = "Sega Dreamcast",
65 .mv_setup = dreamcast_setup, 65 .mv_setup = dreamcast_setup,
66 .mv_irq_demux = systemasic_irq_demux, 66 .mv_irq_demux = systemasic_irq_demux,
@@ -70,4 +70,3 @@ struct sh_machine_vector mv_dreamcast __initmv = {
70 .mv_consistent_free = dreamcast_consistent_free, 70 .mv_consistent_free = dreamcast_consistent_free,
71#endif 71#endif
72}; 72};
73ALIAS_MV(dreamcast)
diff --git a/arch/sh/boards/hp6xx/mach.c b/arch/sh/boards/hp6xx/mach.c
deleted file mode 100644
index 08dbba910f..0000000000
--- a/arch/sh/boards/hp6xx/mach.c
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * linux/arch/sh/boards/hp6xx/mach.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 * Machine vector for the HP680
10 */
11#include <asm/machvec.h>
12#include <asm/hd64461.h>
13#include <asm/io.h>
14#include <asm/irq.h>
15
16struct sh_machine_vector mv_hp6xx __initmv = {
17 .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM,
18
19 .mv_inb = hd64461_inb,
20 .mv_inw = hd64461_inw,
21 .mv_inl = hd64461_inl,
22 .mv_outb = hd64461_outb,
23 .mv_outw = hd64461_outw,
24 .mv_outl = hd64461_outl,
25
26 .mv_inb_p = hd64461_inb_p,
27 .mv_inw_p = hd64461_inw,
28 .mv_inl_p = hd64461_inl,
29 .mv_outb_p = hd64461_outb_p,
30 .mv_outw_p = hd64461_outw,
31 .mv_outl_p = hd64461_outl,
32
33 .mv_insb = hd64461_insb,
34 .mv_insw = hd64461_insw,
35 .mv_insl = hd64461_insl,
36 .mv_outsb = hd64461_outsb,
37 .mv_outsw = hd64461_outsw,
38 .mv_outsl = hd64461_outsl,
39
40 .mv_readw = hd64461_readw,
41 .mv_writew = hd64461_writew,
42
43 .mv_irq_demux = hd64461_irq_demux,
44};
45
46ALIAS_MV(hp6xx)
diff --git a/arch/sh/boards/hp6xx/setup.c b/arch/sh/boards/hp6xx/setup.c
index 6aeee85c97..7ae708930b 100644
--- a/arch/sh/boards/hp6xx/setup.c
+++ b/arch/sh/boards/hp6xx/setup.c
@@ -98,10 +98,9 @@ static void __init hp6xx_setup(char **cmdline_p)
98} 98}
99device_initcall(hp6xx_devices_setup); 99device_initcall(hp6xx_devices_setup);
100 100
101struct sh_machine_vector mv_hp6xx __initmv = { 101static struct sh_machine_vector mv_hp6xx __initmv = {
102 .mv_name = "hp6xx", 102 .mv_name = "hp6xx",
103 .mv_setup = hp6xx_setup, 103 .mv_setup = hp6xx_setup,
104 .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM, 104 .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM,
105 .mv_irq_demux = hd64461_irq_demux, 105 .mv_irq_demux = hd64461_irq_demux,
106}; 106};
107ALIAS_MV(hp6xx)
diff --git a/arch/sh/boards/landisk/setup.c b/arch/sh/boards/landisk/setup.c
index f953c74277..eda71763ec 100644
--- a/arch/sh/boards/landisk/setup.c
+++ b/arch/sh/boards/landisk/setup.c
@@ -97,10 +97,9 @@ static void __init landisk_setup(char **cmdline_p)
97/* 97/*
98 * The Machine Vector 98 * The Machine Vector
99 */ 99 */
100struct sh_machine_vector mv_landisk __initmv = { 100static struct sh_machine_vector mv_landisk __initmv = {
101 .mv_name = "LANDISK", 101 .mv_name = "LANDISK",
102 .mv_nr_irqs = 72, 102 .mv_nr_irqs = 72,
103 .mv_setup = landisk_setup, 103 .mv_setup = landisk_setup,
104 .mv_init_irq = init_landisk_IRQ, 104 .mv_init_irq = init_landisk_IRQ,
105}; 105};
106ALIAS_MV(landisk)
diff --git a/arch/sh/boards/lboxre2/setup.c b/arch/sh/boards/lboxre2/setup.c
index 4e20f7c63b..9c830fdc41 100644
--- a/arch/sh/boards/lboxre2/setup.c
+++ b/arch/sh/boards/lboxre2/setup.c
@@ -77,9 +77,8 @@ device_initcall(lboxre2_devices_setup);
77/* 77/*
78 * The Machine Vector 78 * The Machine Vector
79 */ 79 */
80struct sh_machine_vector mv_lboxre2 __initmv = { 80static struct sh_machine_vector mv_lboxre2 __initmv = {
81 .mv_name = "L-BOX RE2", 81 .mv_name = "L-BOX RE2",
82 .mv_nr_irqs = 72, 82 .mv_nr_irqs = 72,
83 .mv_init_irq = init_lboxre2_IRQ, 83 .mv_init_irq = init_lboxre2_IRQ,
84}; 84};
85ALIAS_MV(lboxre2)
diff --git a/arch/sh/boards/mpc1211/setup.c b/arch/sh/boards/mpc1211/setup.c
index 1a0604b23c..8ce03e00b0 100644
--- a/arch/sh/boards/mpc1211/setup.c
+++ b/arch/sh/boards/mpc1211/setup.c
@@ -338,11 +338,10 @@ static void __init mpc1211_setup(char **cmdline_p)
338/* 338/*
339 * The Machine Vector 339 * The Machine Vector
340 */ 340 */
341struct sh_machine_vector mv_mpc1211 __initmv = { 341static struct sh_machine_vector mv_mpc1211 __initmv = {
342 .mv_name = "Interface MPC-1211(CTP/PCI/MPC-SH02)", 342 .mv_name = "Interface MPC-1211(CTP/PCI/MPC-SH02)",
343 .mv_setup = mpc1211_setup, 343 .mv_setup = mpc1211_setup,
344 .mv_nr_irqs = 48, 344 .mv_nr_irqs = 48,
345 .mv_irq_demux = mpc1211_irq_demux, 345 .mv_irq_demux = mpc1211_irq_demux,
346 .mv_init_irq = init_mpc1211_IRQ, 346 .mv_init_irq = init_mpc1211_IRQ,
347}; 347};
348ALIAS_MV(mpc1211)
diff --git a/arch/sh/boards/renesas/edosk7705/setup.c b/arch/sh/boards/renesas/edosk7705/setup.c
index ec5be01077..f076c45308 100644
--- a/arch/sh/boards/renesas/edosk7705/setup.c
+++ b/arch/sh/boards/renesas/edosk7705/setup.c
@@ -21,7 +21,7 @@ static void __init sh_edosk7705_init_irq(void)
21/* 21/*
22 * The Machine Vector 22 * The Machine Vector
23 */ 23 */
24struct sh_machine_vector mv_edosk7705 __initmv = { 24static struct sh_machine_vector mv_edosk7705 __initmv = {
25 .mv_name = "EDOSK7705", 25 .mv_name = "EDOSK7705",
26 .mv_nr_irqs = 80, 26 .mv_nr_irqs = 80,
27 27
@@ -41,4 +41,3 @@ struct sh_machine_vector mv_edosk7705 __initmv = {
41 .mv_isa_port2addr = sh_edosk7705_isa_port2addr, 41 .mv_isa_port2addr = sh_edosk7705_isa_port2addr,
42 .mv_init_irq = sh_edosk7705_init_irq, 42 .mv_init_irq = sh_edosk7705_init_irq,
43}; 43};
44ALIAS_MV(edosk7705)
diff --git a/arch/sh/boards/renesas/hs7751rvoip/setup.c b/arch/sh/boards/renesas/hs7751rvoip/setup.c
index f7d0e304d8..fa5fa39202 100644
--- a/arch/sh/boards/renesas/hs7751rvoip/setup.c
+++ b/arch/sh/boards/renesas/hs7751rvoip/setup.c
@@ -89,7 +89,7 @@ static void __init hs7751rvoip_setup(char **cmdline_p)
89 printk(KERN_INFO "Renesas Technology Sales HS7751RVoIP-2 support.\n"); 89 printk(KERN_INFO "Renesas Technology Sales HS7751RVoIP-2 support.\n");
90} 90}
91 91
92struct sh_machine_vector mv_hs7751rvoip __initmv = { 92static struct sh_machine_vector mv_hs7751rvoip __initmv = {
93 .mv_name = "HS7751RVoIP", 93 .mv_name = "HS7751RVoIP",
94 .mv_setup = hs7751rvoip_setup, 94 .mv_setup = hs7751rvoip_setup,
95 .mv_nr_irqs = 72, 95 .mv_nr_irqs = 72,
@@ -118,4 +118,3 @@ struct sh_machine_vector mv_hs7751rvoip __initmv = {
118 .mv_init_irq = hs7751rvoip_init_irq, 118 .mv_init_irq = hs7751rvoip_init_irq,
119 .mv_ioport_map = hs7751rvoip_ioport_map, 119 .mv_ioport_map = hs7751rvoip_ioport_map,
120}; 120};
121ALIAS_MV(hs7751rvoip)
diff --git a/arch/sh/boards/renesas/r7780rp/Kconfig b/arch/sh/boards/renesas/r7780rp/Kconfig
index 9fb11641fe..fc8f28e04b 100644
--- a/arch/sh/boards/renesas/r7780rp/Kconfig
+++ b/arch/sh/boards/renesas/r7780rp/Kconfig
@@ -6,18 +6,18 @@ choice
6 6
7config SH_R7780RP 7config SH_R7780RP
8 bool "R7780RP-1 board support" 8 bool "R7780RP-1 board support"
9 select CPU_SUBTYPE_SH7780 9 depends on CPU_SUBTYPE_SH7780
10 10
11config SH_R7780MP 11config SH_R7780MP
12 bool "R7780MP board support" 12 bool "R7780MP board support"
13 select CPU_SUBTYPE_SH7780 13 depends on CPU_SUBTYPE_SH7780
14 help 14 help
15 Selecting this option will enable support for the mass-production 15 Selecting this option will enable support for the mass-production
16 version of the R7780RP. If in doubt, say Y. 16 version of the R7780RP. If in doubt, say Y.
17 17
18config SH_R7785RP 18config SH_R7785RP
19 bool "R7785RP board support" 19 bool "R7785RP board support"
20 select CPU_SUBTYPE_SH7785 20 depends on CPU_SUBTYPE_SH7785
21 21
22endchoice 22endchoice
23 23
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c
index 0727ef92f2..5afb864a1e 100644
--- a/arch/sh/boards/renesas/r7780rp/setup.c
+++ b/arch/sh/boards/renesas/r7780rp/setup.c
@@ -166,10 +166,9 @@ static void __init highlander_setup(char **cmdline_p)
166/* 166/*
167 * The Machine Vector 167 * The Machine Vector
168 */ 168 */
169struct sh_machine_vector mv_highlander __initmv = { 169static struct sh_machine_vector mv_highlander __initmv = {
170 .mv_name = "Highlander", 170 .mv_name = "Highlander",
171 .mv_nr_irqs = 109, 171 .mv_nr_irqs = 109,
172 .mv_setup = highlander_setup, 172 .mv_setup = highlander_setup,
173 .mv_init_irq = highlander_init_irq, 173 .mv_init_irq = highlander_init_irq,
174}; 174};
175ALIAS_MV(highlander)
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c
index 593f26a85e..656fda30ef 100644
--- a/arch/sh/boards/renesas/rts7751r2d/setup.c
+++ b/arch/sh/boards/renesas/rts7751r2d/setup.c
@@ -176,7 +176,7 @@ static void __init rts7751r2d_setup(char **cmdline_p)
176/* 176/*
177 * The Machine Vector 177 * The Machine Vector
178 */ 178 */
179struct sh_machine_vector mv_rts7751r2d __initmv = { 179static struct sh_machine_vector mv_rts7751r2d __initmv = {
180 .mv_name = "RTS7751R2D", 180 .mv_name = "RTS7751R2D",
181 .mv_setup = rts7751r2d_setup, 181 .mv_setup = rts7751r2d_setup,
182 .mv_nr_irqs = 72, 182 .mv_nr_irqs = 72,
@@ -189,4 +189,3 @@ struct sh_machine_vector mv_rts7751r2d __initmv = {
189 .mv_consistent_free = voyagergx_consistent_free, 189 .mv_consistent_free = voyagergx_consistent_free,
190#endif 190#endif
191}; 191};
192ALIAS_MV(rts7751r2d)
diff --git a/arch/sh/boards/renesas/sh7710voipgw/setup.c b/arch/sh/boards/renesas/sh7710voipgw/setup.c
index 180810b121..2dce8bd97f 100644
--- a/arch/sh/boards/renesas/sh7710voipgw/setup.c
+++ b/arch/sh/boards/renesas/sh7710voipgw/setup.c
@@ -88,9 +88,8 @@ static void __init sh7710voipgw_init_irq(void)
88/* 88/*
89 * The Machine Vector 89 * The Machine Vector
90 */ 90 */
91struct sh_machine_vector mv_sh7710voipgw __initmv = { 91static struct sh_machine_vector mv_sh7710voipgw __initmv = {
92 .mv_name = "SH7710 VoIP Gateway", 92 .mv_name = "SH7710 VoIP Gateway",
93 .mv_nr_irqs = 104, 93 .mv_nr_irqs = 104,
94 .mv_init_irq = sh7710voipgw_init_irq, 94 .mv_init_irq = sh7710voipgw_init_irq,
95}; 95};
96ALIAS_MV(sh7710voipgw)
diff --git a/arch/sh/boards/renesas/systemh/setup.c b/arch/sh/boards/renesas/systemh/setup.c
index 936117659b..ee78af8427 100644
--- a/arch/sh/boards/renesas/systemh/setup.c
+++ b/arch/sh/boards/renesas/systemh/setup.c
@@ -28,7 +28,7 @@ static void __init sh7751systemh_init_irq(void)
28 make_systemh_irq(0xb); /* Ethernet interrupt */ 28 make_systemh_irq(0xb); /* Ethernet interrupt */
29} 29}
30 30
31struct sh_machine_vector mv_7751systemh __initmv = { 31static struct sh_machine_vector mv_7751systemh __initmv = {
32 .mv_name = "7751 SystemH", 32 .mv_name = "7751 SystemH",
33 .mv_nr_irqs = 72, 33 .mv_nr_irqs = 72,
34 34
@@ -55,4 +55,3 @@ struct sh_machine_vector mv_7751systemh __initmv = {
55 55
56 .mv_init_irq = sh7751systemh_init_irq, 56 .mv_init_irq = sh7751systemh_init_irq,
57}; 57};
58ALIAS_MV(7751systemh)
diff --git a/arch/sh/boards/saturn/Makefile b/arch/sh/boards/saturn/Makefile
deleted file mode 100644
index 75a3042e25..0000000000
--- a/arch/sh/boards/saturn/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
1#
2# Makefile for the Sega Saturn specific parts of the kernel
3#
4
5obj-y := setup.o io.o irq.o
6
7obj-$(CONFIG_SMP) += smp.o
8
diff --git a/arch/sh/boards/saturn/io.c b/arch/sh/boards/saturn/io.c
deleted file mode 100644
index c6e4f7f2e6..0000000000
--- a/arch/sh/boards/saturn/io.c
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * arch/sh/boards/saturn/io.c
3 *
4 * I/O routines for the Sega Saturn.
5 *
6 * Copyright (C) 2002 Paul Mundt
7 *
8 * Released under the terms of the GNU GPL v2.0.
9 */
10#include <asm/saturn/io.h>
11#include <asm/machvec.h>
12
13unsigned long saturn_isa_port2addr(unsigned long offset)
14{
15 return offset;
16}
17
18void *saturn_ioremap(unsigned long offset, unsigned long size)
19{
20 return (void *)offset;
21}
22
23void saturn_iounmap(void *addr)
24{
25}
26
diff --git a/arch/sh/boards/saturn/irq.c b/arch/sh/boards/saturn/irq.c
deleted file mode 100644
index 15d1d3f0f7..0000000000
--- a/arch/sh/boards/saturn/irq.c
+++ /dev/null
@@ -1,118 +0,0 @@
1/*
2 * arch/sh/boards/saturn/irq.c
3 *
4 * Copyright (C) 2002 Paul Mundt
5 *
6 * Released under the terms of the GNU GPL v2.0.
7 */
8#include <linux/kernel.h>
9#include <linux/init.h>
10#include <linux/interrupt.h>
11#include <asm/irq.h>
12#include <asm/io.h>
13
14/*
15 * Interrupts map out as follows:
16 *
17 * Vector Name Mask
18 *
19 * 64 VBLANKIN 0x0001
20 * 65 VBLANKOUT 0x0002
21 * 66 HBLANKIN 0x0004
22 * 67 TIMER0 0x0008
23 * 68 TIMER1 0x0010
24 * 69 DSPEND 0x0020
25 * 70 SOUNDREQUEST 0x0040
26 * 71 SYSTEMMANAGER 0x0080
27 * 72 PAD 0x0100
28 * 73 LEVEL2DMAEND 0x0200
29 * 74 LEVEL1DMAEND 0x0400
30 * 75 LEVEL0DMAEND 0x0800
31 * 76 DMAILLEGAL 0x1000
32 * 77 SRITEDRAWEND 0x2000
33 * 78 ABUS 0x8000
34 *
35 */
36#define SATURN_IRQ_MIN 64 /* VBLANKIN */
37#define SATURN_IRQ_MAX 78 /* ABUS */
38
39#define SATURN_IRQ_MASK 0xbfff
40
41static inline u32 saturn_irq_mask(unsigned int irq_nr)
42{
43 u32 mask;
44
45 mask = (1 << (irq_nr - SATURN_IRQ_MIN));
46 mask <<= (irq_nr == SATURN_IRQ_MAX);
47 mask &= SATURN_IRQ_MASK;
48
49 return mask;
50}
51
52static inline void mask_saturn_irq(unsigned int irq_nr)
53{
54 u32 mask;
55
56 mask = ctrl_inl(SATURN_IMR);
57 mask |= saturn_irq_mask(irq_nr);
58 ctrl_outl(mask, SATURN_IMR);
59}
60
61static inline void unmask_saturn_irq(unsigned int irq_nr)
62{
63 u32 mask;
64
65 mask = ctrl_inl(SATURN_IMR);
66 mask &= ~saturn_irq_mask(irq_nr);
67 ctrl_outl(mask, SATURN_IMR);
68}
69
70static void disable_saturn_irq(unsigned int irq_nr)
71{
72 mask_saturn_irq(irq_nr);
73}
74
75static void enable_saturn_irq(unsigned int irq_nr)
76{
77 unmask_saturn_irq(irq_nr);
78}
79
80static void mask_and_ack_saturn_irq(unsigned int irq_nr)
81{
82 mask_saturn_irq(irq_nr);
83}
84
85static void end_saturn_irq(unsigned int irq_nr)
86{
87 if (!(irq_desc[irq_nr].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
88 unmask_saturn_irq(irq_nr);
89}
90
91static unsigned int startup_saturn_irq(unsigned int irq_nr)
92{
93 unmask_saturn_irq(irq_nr);
94
95 return 0;
96}
97
98static void shutdown_saturn_irq(unsigned int irq_nr)
99{
100 mask_saturn_irq(irq_nr);
101}
102
103static struct hw_interrupt_type saturn_int = {
104 .typename = "Saturn",
105 .enable = enable_saturn_irq,
106 .disable = disable_saturn_irq,
107 .ack = mask_and_ack_saturn_irq,
108 .end = end_saturn_irq,
109 .startup = startup_saturn_irq,
110 .shutdown = shutdown_saturn_irq,
111};
112
113int saturn_irq_demux(int irq_nr)
114{
115 /* FIXME */
116 return irq_nr;
117}
118
diff --git a/arch/sh/boards/saturn/setup.c b/arch/sh/boards/saturn/setup.c
deleted file mode 100644
index a3a37c9aad..0000000000
--- a/arch/sh/boards/saturn/setup.c
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * arch/sh/boards/saturn/setup.c
3 *
4 * Hardware support for the Sega Saturn.
5 *
6 * Copyright (c) 2002 Paul Mundt
7 *
8 * Released under the terms of the GNU GPL v2.0.
9 */
10#include <linux/kernel.h>
11#include <linux/init.h>
12#include <asm/io.h>
13#include <asm/machvec.h>
14#include <asm/mach/io.h>
15
16extern int saturn_irq_demux(int irq_nr);
17
18/*
19 * The Machine Vector
20 */
21struct sh_machine_vector mv_saturn __initmv = {
22 .mv_name = "Sega Saturn",
23 .mv_nr_irqs = 80, /* Fix this later */
24
25 .mv_isa_port2addr = saturn_isa_port2addr,
26 .mv_irq_demux = saturn_irq_demux,
27
28 .mv_ioremap = saturn_ioremap,
29 .mv_iounmap = saturn_iounmap,
30};
31ALIAS_MV(saturn)
diff --git a/arch/sh/boards/saturn/smp.c b/arch/sh/boards/saturn/smp.c
deleted file mode 100644
index 76460918c9..0000000000
--- a/arch/sh/boards/saturn/smp.c
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2 * arch/sh/boards/saturn/smp.c
3 *
4 * SMP support for the Sega Saturn.
5 *
6 * Copyright (c) 2002 Paul Mundt
7 *
8 * Released under the terms of the GNU GPL v2.0.
9 */
10#include <linux/kernel.h>
11#include <linux/init.h>
12#include <linux/smp.h>
13
14#include <asm/saturn/smpc.h>
15
16extern void start_secondary(void);
17
18void __smp_send_ipi(unsigned int cpu, unsigned int action)
19{
20 /* Nothing here yet .. */
21}
22
23unsigned int __smp_probe_cpus(void)
24{
25 /*
26 * This is just a straightforward master/slave configuration,
27 * and probing isn't really supported..
28 */
29 return 2;
30}
31
32/*
33 * We're only allowed to do byte-access to SMPC registers. In
34 * addition to which, we treat them as write-only, since
35 * reading from them will return undefined data.
36 */
37static inline void smpc_slave_stop(unsigned int cpu)
38{
39 smpc_barrier();
40 ctrl_outb(1, SMPC_STATUS);
41
42 ctrl_outb(SMPC_CMD_SSHOFF, SMPC_COMMAND);
43 smpc_barrier();
44}
45
46static inline void smpc_slave_start(unsigned int cpu)
47{
48 ctrl_outb(1, SMPC_STATUS);
49 ctrl_outb(SMPC_CMD_SSHON, SMPC_COMMAND);
50
51 smpc_barrier();
52}
53
54void __smp_slave_init(unsigned int cpu)
55{
56 register unsigned long vbr;
57 void **entry;
58
59 __asm__ __volatile__ ("stc vbr, %0\n\t" : "=r" (vbr));
60 entry = (void **)(vbr + 0x310 + 0x94);
61
62 smpc_slave_stop(cpu);
63
64 *(void **)entry = (void *)start_secondary;
65
66 smpc_slave_start(cpu);
67}
68
diff --git a/arch/sh/boards/se/7206/setup.c b/arch/sh/boards/se/7206/setup.c
index ca714879f5..a074b62505 100644
--- a/arch/sh/boards/se/7206/setup.c
+++ b/arch/sh/boards/se/7206/setup.c
@@ -70,7 +70,7 @@ __initcall(se7206_devices_setup);
70 * The Machine Vector 70 * The Machine Vector
71 */ 71 */
72 72
73struct sh_machine_vector mv_se __initmv = { 73static struct sh_machine_vector mv_se __initmv = {
74 .mv_name = "SolutionEngine", 74 .mv_name = "SolutionEngine",
75 .mv_nr_irqs = 256, 75 .mv_nr_irqs = 256,
76 .mv_inb = se7206_inb, 76 .mv_inb = se7206_inb,
@@ -96,4 +96,3 @@ struct sh_machine_vector mv_se __initmv = {
96 96
97 .mv_init_irq = init_se7206_IRQ, 97 .mv_init_irq = init_se7206_IRQ,
98}; 98};
99ALIAS_MV(se)
diff --git a/arch/sh/boards/se/7300/setup.c b/arch/sh/boards/se/7300/setup.c
index f1960956ba..eb469f5b6e 100644
--- a/arch/sh/boards/se/7300/setup.c
+++ b/arch/sh/boards/se/7300/setup.c
@@ -46,7 +46,7 @@ __initcall(se7300_devices_setup);
46/* 46/*
47 * The Machine Vector 47 * The Machine Vector
48 */ 48 */
49struct sh_machine_vector mv_7300se __initmv = { 49static struct sh_machine_vector mv_7300se __initmv = {
50 .mv_name = "SolutionEngine 7300", 50 .mv_name = "SolutionEngine 7300",
51 .mv_nr_irqs = 109, 51 .mv_nr_irqs = 109,
52 .mv_inb = sh7300se_inb, 52 .mv_inb = sh7300se_inb,
@@ -72,4 +72,3 @@ struct sh_machine_vector mv_7300se __initmv = {
72 72
73 .mv_init_irq = init_7300se_IRQ, 73 .mv_init_irq = init_7300se_IRQ,
74}; 74};
75ALIAS_MV(7300se)
diff --git a/arch/sh/boards/se/73180/setup.c b/arch/sh/boards/se/73180/setup.c
index e143017c89..1deee85566 100644
--- a/arch/sh/boards/se/73180/setup.c
+++ b/arch/sh/boards/se/73180/setup.c
@@ -46,7 +46,7 @@ __initcall(se73180_devices_setup);
46/* 46/*
47 * The Machine Vector 47 * The Machine Vector
48 */ 48 */
49struct sh_machine_vector mv_73180se __initmv = { 49static struct sh_machine_vector mv_73180se __initmv = {
50 .mv_name = "SolutionEngine 73180", 50 .mv_name = "SolutionEngine 73180",
51 .mv_nr_irqs = 108, 51 .mv_nr_irqs = 108,
52 .mv_inb = sh73180se_inb, 52 .mv_inb = sh73180se_inb,
@@ -73,4 +73,3 @@ struct sh_machine_vector mv_73180se __initmv = {
73 .mv_init_irq = init_73180se_IRQ, 73 .mv_init_irq = init_73180se_IRQ,
74 .mv_irq_demux = shmse_irq_demux, 74 .mv_irq_demux = shmse_irq_demux,
75}; 75};
76ALIAS_MV(73180se)
diff --git a/arch/sh/boards/se/7343/setup.c b/arch/sh/boards/se/7343/setup.c
index 3fdb16f2ce..8fec155e2f 100644
--- a/arch/sh/boards/se/7343/setup.c
+++ b/arch/sh/boards/se/7343/setup.c
@@ -64,7 +64,7 @@ static void __init sh7343se_setup(char **cmdline_p)
64/* 64/*
65 * The Machine Vector 65 * The Machine Vector
66 */ 66 */
67struct sh_machine_vector mv_7343se __initmv = { 67static struct sh_machine_vector mv_7343se __initmv = {
68 .mv_name = "SolutionEngine 7343", 68 .mv_name = "SolutionEngine 7343",
69 .mv_setup = sh7343se_setup, 69 .mv_setup = sh7343se_setup,
70 .mv_nr_irqs = 108, 70 .mv_nr_irqs = 108,
@@ -92,4 +92,3 @@ struct sh_machine_vector mv_7343se __initmv = {
92 .mv_init_irq = init_7343se_IRQ, 92 .mv_init_irq = init_7343se_IRQ,
93 .mv_irq_demux = shmse_irq_demux, 93 .mv_irq_demux = shmse_irq_demux,
94}; 94};
95ALIAS_MV(7343se)
diff --git a/arch/sh/boards/se/7619/setup.c b/arch/sh/boards/se/7619/setup.c
index 52d2c4d5d2..1d0ef7faa1 100644
--- a/arch/sh/boards/se/7619/setup.c
+++ b/arch/sh/boards/se/7619/setup.c
@@ -15,8 +15,7 @@
15 * The Machine Vector 15 * The Machine Vector
16 */ 16 */
17 17
18struct sh_machine_vector mv_se __initmv = { 18static struct sh_machine_vector mv_se __initmv = {
19 .mv_name = "SolutionEngine", 19 .mv_name = "SolutionEngine",
20 .mv_nr_irqs = 108, 20 .mv_nr_irqs = 108,
21}; 21};
22ALIAS_MV(se)
diff --git a/arch/sh/boards/se/770x/irq.c b/arch/sh/boards/se/770x/irq.c
index c8eccff77a..cdb0807928 100644
--- a/arch/sh/boards/se/770x/irq.c
+++ b/arch/sh/boards/se/770x/irq.c
@@ -15,46 +15,7 @@
15#include <asm/io.h> 15#include <asm/io.h>
16#include <asm/se.h> 16#include <asm/se.h>
17 17
18/* 18static struct ipr_data ipr_irq_table[] = {
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
57static struct ipr_data se770x_ipr_map[] = {
58 /* 19 /*
59 * Super I/O (Just mimic PC): 20 * Super I/O (Just mimic PC):
60 * 1: keyboard 21 * 1: keyboard
@@ -68,46 +29,67 @@ static struct ipr_data se770x_ipr_map[] = {
68 */ 29 */
69#if defined(CONFIG_CPU_SUBTYPE_SH7705) 30#if defined(CONFIG_CPU_SUBTYPE_SH7705)
70 /* This is default value */ 31 /* This is default value */
71 { 13, 0, 8, 0x0f-13 ,BCR_ILCRA}, 32 { 13, 0, 8, 0x0f-13, },
72 { 5 , 0, 4, 0x0f- 5 ,BCR_ILCRA}, 33 { 5 , 0, 4, 0x0f- 5, },
73 { 10, 0, 0, 0x0f-10, BCR_ILCRB}, 34 { 10, 1, 0, 0x0f-10, },
74 { 7 , 0, 4, 0x0f- 7, BCR_ILCRC}, 35 { 7 , 2, 4, 0x0f- 7, },
75 { 3 , 0, 0, 0x0f- 3, BCR_ILCRC}, 36 { 3 , 2, 0, 0x0f- 3, },
76 { 1 , 0, 12, 0x0f- 1, BCR_ILCRD}, 37 { 1 , 3, 12, 0x0f- 1, },
77 { 12, 0, 4, 0x0f-12, BCR_ILCRD}, /* LAN */ 38 { 12, 3, 4, 0x0f-12, }, /* LAN */
78 { 2 , 0, 8, 0x0f- 2, BCR_ILCRE}, /* PCIRQ2 */ 39 { 2 , 4, 8, 0x0f- 2, }, /* PCIRQ2 */
79 { 6 , 0, 4, 0x0f- 6, BCR_ILCRE}, /* PCIRQ1 */ 40 { 6 , 4, 4, 0x0f- 6, }, /* PCIRQ1 */
80 { 14, 0, 0, 0x0f-14, BCR_ILCRE}, /* PCIRQ0 */ 41 { 14, 4, 0, 0x0f-14, }, /* PCIRQ0 */
81 { 0 , 0, 12, 0x0f , BCR_ILCRF}, 42 { 0 , 5, 12, 0x0f , },
82 { 4 , 0, 4, 0x0f- 4, BCR_ILCRF}, 43 { 4 , 5, 4, 0x0f- 4, },
83 { 8 , 0, 12, 0x0f- 8, BCR_ILCRG}, 44 { 8 , 6, 12, 0x0f- 8, },
84 { 9 , 0, 8, 0x0f- 9, BCR_ILCRG}, 45 { 9 , 6, 8, 0x0f- 9, },
85 { 11, 0, 4, 0x0f-11, BCR_ILCRG}, 46 { 11, 6, 4, 0x0f-11, },
86#else 47#else
87 { 14, 0, 8, 0x0f-14 ,BCR_ILCRA}, 48 { 14, 0, 8, 0x0f-14, },
88 { 12, 0, 4, 0x0f-12 ,BCR_ILCRA}, 49 { 12, 0, 4, 0x0f-12, },
89 { 8, 0, 4, 0x0f- 8 ,BCR_ILCRB}, 50 { 8, 1, 4, 0x0f- 8, },
90 { 6, 0, 12, 0x0f- 6 ,BCR_ILCRC}, 51 { 6, 2, 12, 0x0f- 6, },
91 { 5, 0, 8, 0x0f- 5 ,BCR_ILCRC}, 52 { 5, 2, 8, 0x0f- 5, },
92 { 4, 0, 4, 0x0f- 4 ,BCR_ILCRC}, 53 { 4, 2, 4, 0x0f- 4, },
93 { 3, 0, 0, 0x0f- 3 ,BCR_ILCRC}, 54 { 3, 2, 0, 0x0f- 3, },
94 { 1, 0, 12, 0x0f- 1 ,BCR_ILCRD}, 55 { 1, 3, 12, 0x0f- 1, },
95#if defined(CONFIG_STNIC) 56#if defined(CONFIG_STNIC)
96 /* ST NIC */ 57 /* ST NIC */
97 { 10, 0, 4, 0x0f-10 ,BCR_ILCRD}, /* LAN */ 58 { 10, 3, 4, 0x0f-10, }, /* LAN */
98#endif 59#endif
99 /* MRSHPC IRQs setting */ 60 /* MRSHPC IRQs setting */
100 { 0, 0, 12, 0x0f- 0 ,BCR_ILCRE}, /* PCIRQ3 */ 61 { 0, 4, 12, 0x0f- 0, }, /* PCIRQ3 */
101 { 11, 0, 8, 0x0f-11 ,BCR_ILCRE}, /* PCIRQ2 */ 62 { 11, 4, 8, 0x0f-11, }, /* PCIRQ2 */
102 { 9, 0, 4, 0x0f- 9 ,BCR_ILCRE}, /* PCIRQ1 */ 63 { 9, 4, 4, 0x0f- 9, }, /* PCIRQ1 */
103 { 7, 0, 0, 0x0f- 7 ,BCR_ILCRE}, /* PCIRQ0 */ 64 { 7, 4, 0, 0x0f- 7, }, /* PCIRQ0 */
104 /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */ 65 /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */
105 /* NOTE: #2 and #13 are not used on PC */ 66 /* NOTE: #2 and #13 are not used on PC */
106 { 13, 0, 4, 0x0f-13 ,BCR_ILCRG}, /* SLOTIRQ2 */ 67 { 13, 6, 4, 0x0f-13, }, /* SLOTIRQ2 */
107 { 2, 0, 0, 0x0f- 2 ,BCR_ILCRG}, /* SLOTIRQ1 */ 68 { 2, 6, 0, 0x0f- 2, }, /* SLOTIRQ1 */
108#endif 69#endif
109}; 70};
110 71
72static unsigned long ipr_offsets[] = {
73 BCR_ILCRA,
74 BCR_ILCRB,
75 BCR_ILCRC,
76 BCR_ILCRD,
77 BCR_ILCRE,
78 BCR_ILCRF,
79 BCR_ILCRG,
80};
81
82static struct ipr_desc ipr_irq_desc = {
83 .ipr_offsets = ipr_offsets,
84 .nr_offsets = ARRAY_SIZE(ipr_offsets),
85
86 .ipr_data = ipr_irq_table,
87 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
88 .chip = {
89 .name = "IPR-se770x",
90 },
91};
92
111/* 93/*
112 * Initialize IRQ setting 94 * Initialize IRQ setting
113 */ 95 */
@@ -122,5 +104,5 @@ void __init init_se_IRQ(void)
122 ctrl_outw(0, BCR_ILCRF); 104 ctrl_outw(0, BCR_ILCRF);
123 ctrl_outw(0, BCR_ILCRG); 105 ctrl_outw(0, BCR_ILCRG);
124 106
125 make_se770x_irq(se770x_ipr_map, ARRAY_SIZE(se770x_ipr_map)); 107 register_ipr_controller(&ipr_irq_desc);
126} 108}
diff --git a/arch/sh/boards/se/770x/setup.c b/arch/sh/boards/se/770x/setup.c
index 17a2631de3..2962da148f 100644
--- a/arch/sh/boards/se/770x/setup.c
+++ b/arch/sh/boards/se/770x/setup.c
@@ -122,7 +122,7 @@ device_initcall(se_devices_setup);
122/* 122/*
123 * The Machine Vector 123 * The Machine Vector
124 */ 124 */
125struct sh_machine_vector mv_se __initmv = { 125static struct sh_machine_vector mv_se __initmv = {
126 .mv_name = "SolutionEngine", 126 .mv_name = "SolutionEngine",
127 .mv_setup = smsc_setup, 127 .mv_setup = smsc_setup,
128#if defined(CONFIG_CPU_SH4) 128#if defined(CONFIG_CPU_SH4)
@@ -160,4 +160,3 @@ struct sh_machine_vector mv_se __initmv = {
160 160
161 .mv_init_irq = init_se_IRQ, 161 .mv_init_irq = init_se_IRQ,
162}; 162};
163ALIAS_MV(se)
diff --git a/arch/sh/boards/se/7722/irq.c b/arch/sh/boards/se/7722/irq.c
index 099e5deb77..26cff0efda 100644
--- a/arch/sh/boards/se/7722/irq.c
+++ b/arch/sh/boards/se/7722/irq.c
@@ -19,15 +19,24 @@
19#define INTC_INTMSK0 0xFFD00044 19#define INTC_INTMSK0 0xFFD00044
20#define INTC_INTMSKCLR0 0xFFD00064 20#define INTC_INTMSKCLR0 0xFFD00064
21 21
22struct se7722_data {
23 unsigned char irq;
24 unsigned char ipr_idx;
25 unsigned char shift;
26 unsigned short priority;
27 unsigned long addr;
28};
29
30
22static void disable_se7722_irq(unsigned int irq) 31static void disable_se7722_irq(unsigned int irq)
23{ 32{
24 struct ipr_data *p = get_irq_chip_data(irq); 33 struct se7722_data *p = get_irq_chip_data(irq);
25 ctrl_outw( ctrl_inw( p->addr ) | p->priority , p->addr ); 34 ctrl_outw( ctrl_inw( p->addr ) | p->priority , p->addr );
26} 35}
27 36
28static void enable_se7722_irq(unsigned int irq) 37static void enable_se7722_irq(unsigned int irq)
29{ 38{
30 struct ipr_data *p = get_irq_chip_data(irq); 39 struct se7722_data *p = get_irq_chip_data(irq);
31 ctrl_outw( ctrl_inw( p->addr ) & ~p->priority , p->addr ); 40 ctrl_outw( ctrl_inw( p->addr ) & ~p->priority , p->addr );
32} 41}
33 42
@@ -38,7 +47,7 @@ static struct irq_chip se7722_irq_chip __read_mostly = {
38 .mask_ack = disable_se7722_irq, 47 .mask_ack = disable_se7722_irq,
39}; 48};
40 49
41static struct ipr_data ipr_irq_table[] = { 50static struct se7722_data ipr_irq_table[] = {
42 /* irq ,idx,sft, priority , addr */ 51 /* irq ,idx,sft, priority , addr */
43 { MRSHPC_IRQ0 , 0 , 0 , MRSHPC_BIT0 , IRQ01_MASK } , 52 { MRSHPC_IRQ0 , 0 , 0 , MRSHPC_BIT0 , IRQ01_MASK } ,
44 { MRSHPC_IRQ1 , 0 , 0 , MRSHPC_BIT1 , IRQ01_MASK } , 53 { MRSHPC_IRQ1 , 0 , 0 , MRSHPC_BIT1 , IRQ01_MASK } ,
diff --git a/arch/sh/boards/se/7722/setup.c b/arch/sh/boards/se/7722/setup.c
index 636ca6c987..6cca6cbc80 100644
--- a/arch/sh/boards/se/7722/setup.c
+++ b/arch/sh/boards/se/7722/setup.c
@@ -137,7 +137,7 @@ static void __init se7722_setup(char **cmdline_p)
137/* 137/*
138 * The Machine Vector 138 * The Machine Vector
139 */ 139 */
140struct sh_machine_vector mv_se7722 __initmv = { 140static struct sh_machine_vector mv_se7722 __initmv = {
141 .mv_name = "Solution Engine 7722" , 141 .mv_name = "Solution Engine 7722" ,
142 .mv_setup = se7722_setup , 142 .mv_setup = se7722_setup ,
143 .mv_nr_irqs = 109 , 143 .mv_nr_irqs = 109 ,
@@ -145,4 +145,3 @@ struct sh_machine_vector mv_se7722 __initmv = {
145 .mv_irq_demux = se7722_irq_demux, 145 .mv_irq_demux = se7722_irq_demux,
146 146
147}; 147};
148ALIAS_MV(se7722)
diff --git a/arch/sh/boards/se/7751/irq.c b/arch/sh/boards/se/7751/irq.c
index e4c63a4829..c3d12590e5 100644
--- a/arch/sh/boards/se/7751/irq.c
+++ b/arch/sh/boards/se/7751/irq.c
@@ -14,44 +14,31 @@
14#include <asm/irq.h> 14#include <asm/irq.h>
15#include <asm/se7751.h> 15#include <asm/se7751.h>
16 16
17static struct ipr_data se7751_ipr_map[] = { 17static struct ipr_data ipr_irq_table[] = {
18 /* Leave old Solution Engine code in for reference. */ 18 { 13, 3, 3, 2 },
19#if defined(CONFIG_SH_SOLUTION_ENGINE) 19 /* Add additional entries here as drivers are added and tested. */
20 /* 20};
21 * Super I/O (Just mimic PC):
22 * 1: keyboard
23 * 3: serial 0
24 * 4: serial 1
25 * 5: printer
26 * 6: floppy
27 * 8: rtc
28 * 12: mouse
29 * 14: ide0
30 */
31 { 14, BCR_ILCRA, 2, 0x0f-14 },
32 { 12, BCR_ILCRA, 1, 0x0f-12 },
33 { 8, BCR_ILCRB, 1, 0x0f- 8 },
34 { 6, BCR_ILCRC, 3, 0x0f- 6 },
35 { 5, BCR_ILCRC, 2, 0x0f- 5 },
36 { 4, BCR_ILCRC, 1, 0x0f- 4 },
37 { 3, BCR_ILCRC, 0, 0x0f- 3 },
38 { 1, BCR_ILCRD, 3, 0x0f- 1 },
39 21
40 { 10, BCR_ILCRD, 1, 0x0f-10 }, /* LAN */ 22static unsigned long ipr_offsets[] = {
23 BCR_ILCRA,
24 BCR_ILCRB,
25 BCR_ILCRC,
26 BCR_ILCRD,
27 BCR_ILCRE,
28 BCR_ILCRF,
29 BCR_ILCRG,
30};
41 31
42 { 0, BCR_ILCRE, 3, 0x0f- 0 }, /* PCIRQ3 */ 32static struct ipr_desc ipr_irq_desc = {
43 { 11, BCR_ILCRE, 2, 0x0f-11 }, /* PCIRQ2 */ 33 .ipr_offsets = ipr_offsets,
44 { 9, BCR_ILCRE, 1, 0x0f- 9 }, /* PCIRQ1 */ 34 .nr_offsets = ARRAY_SIZE(ipr_offsets),
45 { 7, BCR_ILCRE, 0, 0x0f- 7 }, /* PCIRQ0 */
46 35
47 /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */ 36 .ipr_data = ipr_irq_table,
48 /* NOTE: #2 and #13 are not used on PC */ 37 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
49 { 13, BCR_ILCRG, 1, 0x0f-13 }, /* SLOTIRQ2 */ 38
50 { 2, BCR_ILCRG, 0, 0x0f- 2 }, /* SLOTIRQ1 */ 39 .chip = {
51#elif defined(CONFIG_SH_7751_SOLUTION_ENGINE) 40 .name = "IPR-se7751",
52 { 13, BCR_ILCRD, 3, 2 }, 41 },
53 /* Add additional entries here as drivers are added and tested. */
54#endif
55}; 42};
56 43
57/* 44/*
@@ -59,5 +46,5 @@ static struct ipr_data se7751_ipr_map[] = {
59 */ 46 */
60void __init init_7751se_IRQ(void) 47void __init init_7751se_IRQ(void)
61{ 48{
62 make_ipr_irq(se7751_ipr_map, ARRAY_SIZE(se7751_ipr_map)); 49 register_ipr_controller(&ipr_irq_desc);
63} 50}
diff --git a/arch/sh/boards/se/7751/setup.c b/arch/sh/boards/se/7751/setup.c
index 52c7bfa57c..7873d07e40 100644
--- a/arch/sh/boards/se/7751/setup.c
+++ b/arch/sh/boards/se/7751/setup.c
@@ -48,7 +48,7 @@ __initcall(se7751_devices_setup);
48/* 48/*
49 * The Machine Vector 49 * The Machine Vector
50 */ 50 */
51struct sh_machine_vector mv_7751se __initmv = { 51static struct sh_machine_vector mv_7751se __initmv = {
52 .mv_name = "7751 SolutionEngine", 52 .mv_name = "7751 SolutionEngine",
53 .mv_nr_irqs = 72, 53 .mv_nr_irqs = 72,
54 54
@@ -71,4 +71,3 @@ struct sh_machine_vector mv_7751se __initmv = {
71 71
72 .mv_init_irq = init_7751se_IRQ, 72 .mv_init_irq = init_7751se_IRQ,
73}; 73};
74ALIAS_MV(7751se)
diff --git a/arch/sh/boards/se/7780/irq.c b/arch/sh/boards/se/7780/irq.c
index 3d0625c2d0..8749147460 100644
--- a/arch/sh/boards/se/7780/irq.c
+++ b/arch/sh/boards/se/7780/irq.c
@@ -16,28 +16,6 @@
16#include <asm/io.h> 16#include <asm/io.h>
17#include <asm/se7780.h> 17#include <asm/se7780.h>
18 18
19#define INTC_INTMSK0 0xFFD00044
20#define INTC_INTMSKCLR0 0xFFD00064
21
22static void disable_se7780_irq(unsigned int irq)
23{
24 struct intc2_data *p = get_irq_chip_data(irq);
25 ctrl_outl(1 << p->msk_shift, INTC_INTMSK0 + p->msk_offset);
26}
27
28static void enable_se7780_irq(unsigned int irq)
29{
30 struct intc2_data *p = get_irq_chip_data(irq);
31 ctrl_outl(1 << p->msk_shift, INTC_INTMSKCLR0 + p->msk_offset);
32}
33
34static struct irq_chip se7780_irq_chip __read_mostly = {
35 .name = "SE7780",
36 .mask = disable_se7780_irq,
37 .unmask = enable_se7780_irq,
38 .mask_ack = disable_se7780_irq,
39};
40
41static struct intc2_data intc2_irq_table[] = { 19static struct intc2_data intc2_irq_table[] = {
42 { 2, 0, 31, 0, 31, 3 }, /* daughter board EXTINT1 */ 20 { 2, 0, 31, 0, 31, 3 }, /* daughter board EXTINT1 */
43 { 4, 0, 30, 0, 30, 3 }, /* daughter board EXTINT2 */ 21 { 4, 0, 30, 0, 30, 3 }, /* daughter board EXTINT2 */
@@ -51,13 +29,24 @@ static struct intc2_data intc2_irq_table[] = {
51 { 0 , 0, 24, 0, 24, 3 }, /* SM501 */ 29 { 0 , 0, 24, 0, 24, 3 }, /* SM501 */
52}; 30};
53 31
32static struct intc2_desc intc2_irq_desc __read_mostly = {
33 .prio_base = 0, /* N/A */
34 .msk_base = 0xffd00044,
35 .mskclr_base = 0xffd00064,
36
37 .intc2_data = intc2_irq_table,
38 .nr_irqs = ARRAY_SIZE(intc2_irq_table),
39
40 .chip = {
41 .name = "INTC2-se7780",
42 },
43};
44
54/* 45/*
55 * Initialize IRQ setting 46 * Initialize IRQ setting
56 */ 47 */
57void __init init_se7780_IRQ(void) 48void __init init_se7780_IRQ(void)
58{ 49{
59 int i ;
60
61 /* enable all interrupt at FPGA */ 50 /* enable all interrupt at FPGA */
62 ctrl_outw(0, FPGA_INTMSK1); 51 ctrl_outw(0, FPGA_INTMSK1);
63 /* mask SM501 interrupt */ 52 /* mask SM501 interrupt */
@@ -79,11 +68,5 @@ void __init init_se7780_IRQ(void)
79 /* FPGA + 0x0A */ 68 /* FPGA + 0x0A */
80 ctrl_outw((IRQPIN_PCCPW << IRQPOS_PCCPW), FPGA_INTSEL3); 69 ctrl_outw((IRQPIN_PCCPW << IRQPOS_PCCPW), FPGA_INTSEL3);
81 70
82 for (i = 0; i < ARRAY_SIZE(intc2_irq_table); i++) { 71 register_intc2_controller(&intc2_irq_desc);
83 disable_irq_nosync(intc2_irq_table[i].irq);
84 set_irq_chip_and_handler_name( intc2_irq_table[i].irq, &se7780_irq_chip,
85 handle_level_irq, "level");
86 set_irq_chip_data( intc2_irq_table[i].irq, &intc2_irq_table[i] );
87 disable_se7780_irq(intc2_irq_table[i].irq);
88 }
89} 72}
diff --git a/arch/sh/boards/se/7780/setup.c b/arch/sh/boards/se/7780/setup.c
index df7d08a24c..723f2fd4d5 100644
--- a/arch/sh/boards/se/7780/setup.c
+++ b/arch/sh/boards/se/7780/setup.c
@@ -113,10 +113,9 @@ static void __init se7780_setup(char **cmdline_p)
113/* 113/*
114 * The Machine Vector 114 * The Machine Vector
115 */ 115 */
116struct sh_machine_vector mv_se7780 __initmv = { 116static struct sh_machine_vector mv_se7780 __initmv = {
117 .mv_name = "Solution Engine 7780" , 117 .mv_name = "Solution Engine 7780" ,
118 .mv_setup = se7780_setup , 118 .mv_setup = se7780_setup ,
119 .mv_nr_irqs = 111 , 119 .mv_nr_irqs = 111 ,
120 .mv_init_irq = init_se7780_IRQ, 120 .mv_init_irq = init_se7780_IRQ,
121}; 121};
122ALIAS_MV(se7780)
diff --git a/arch/sh/boards/sh03/setup.c b/arch/sh/boards/sh03/setup.c
index c069c444b4..9c031a8c0a 100644
--- a/arch/sh/boards/sh03/setup.c
+++ b/arch/sh/boards/sh03/setup.c
@@ -15,17 +15,33 @@
15#include <asm/sh03/sh03.h> 15#include <asm/sh03/sh03.h>
16#include <asm/addrspace.h> 16#include <asm/addrspace.h>
17 17
18static struct ipr_data sh03_ipr_map[] = { 18static struct ipr_data ipr_irq_table[] = {
19 { IRL0_IRQ, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY }, 19 { IRL0_IRQ, 0, IRL0_IPR_POS, IRL0_PRIORITY },
20 { IRL1_IRQ, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY }, 20 { IRL1_IRQ, 0, IRL1_IPR_POS, IRL1_PRIORITY },
21 { IRL2_IRQ, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY }, 21 { IRL2_IRQ, 0, IRL2_IPR_POS, IRL2_PRIORITY },
22 { IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY }, 22 { IRL3_IRQ, 0, IRL3_IPR_POS, IRL3_PRIORITY },
23};
24
25static unsigned long ipr_offsets[] = {
26 INTC_IPRD,
27};
28
29static struct ipr_desc ipr_irq_desc = {
30 .ipr_offsets = ipr_offsets,
31 .nr_offsets = ARRAY_SIZE(ipr_offsets),
32
33 .ipr_data = ipr_irq_table,
34 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
35
36 .chip = {
37 .name = "IPR-sh03",
38 },
23}; 39};
24 40
25static void __init init_sh03_IRQ(void) 41static void __init init_sh03_IRQ(void)
26{ 42{
27 ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); 43 ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR);
28 make_ipr_irq(sh03_ipr_map, ARRAY_SIZE(sh03_ipr_map)); 44 register_ipr_controller(&ipr_irq_desc);
29} 45}
30 46
31extern void *cf_io_base; 47extern void *cf_io_base;
@@ -74,11 +90,10 @@ static int __init sh03_devices_setup(void)
74} 90}
75__initcall(sh03_devices_setup); 91__initcall(sh03_devices_setup);
76 92
77struct sh_machine_vector mv_sh03 __initmv = { 93static struct sh_machine_vector mv_sh03 __initmv = {
78 .mv_name = "Interface (CTP/PCI-SH03)", 94 .mv_name = "Interface (CTP/PCI-SH03)",
79 .mv_setup = sh03_setup, 95 .mv_setup = sh03_setup,
80 .mv_nr_irqs = 48, 96 .mv_nr_irqs = 48,
81 .mv_ioport_map = sh03_ioport_map, 97 .mv_ioport_map = sh03_ioport_map,
82 .mv_init_irq = init_sh03_IRQ, 98 .mv_init_irq = init_sh03_IRQ,
83}; 99};
84ALIAS_MV(sh03)
diff --git a/arch/sh/boards/shmin/setup.c b/arch/sh/boards/shmin/setup.c
index 4a9df4a6b0..dfd124509f 100644
--- a/arch/sh/boards/shmin/setup.c
+++ b/arch/sh/boards/shmin/setup.c
@@ -6,28 +6,44 @@
6 * SHMIN Support. 6 * SHMIN Support.
7 */ 7 */
8#include <linux/init.h> 8#include <linux/init.h>
9#include <linux/irq.h>
9#include <asm/machvec.h> 10#include <asm/machvec.h>
10#include <asm/shmin.h> 11#include <asm/shmin.h>
11#include <asm/clock.h> 12#include <asm/clock.h>
12#include <asm/irq.h>
13#include <asm/io.h> 13#include <asm/io.h>
14 14
15#define PFC_PHCR 0xa400010eUL 15#define PFC_PHCR 0xa400010eUL
16#define INTC_ICR1 0xa4000010UL 16#define INTC_ICR1 0xa4000010UL
17#define INTC_IPRC 0xa4000016UL 17#define INTC_IPRC 0xa4000016UL
18 18
19static struct ipr_data shmin_ipr_map[] = { 19static struct ipr_data ipr_irq_table[] = {
20 { .irq=32, .addr=INTC_IPRC, .shift= 0, .priority=0 }, 20 { 32, 0, 0, 0 },
21 { .irq=33, .addr=INTC_IPRC, .shift= 4, .priority=0 }, 21 { 33, 0, 4, 0 },
22 { .irq=34, .addr=INTC_IPRC, .shift= 8, .priority=8 }, 22 { 34, 0, 8, 8 },
23 { .irq=35, .addr=INTC_IPRC, .shift=12, .priority=0 }, 23 { 35, 0, 12, 0 },
24};
25
26static unsigned long ipr_offsets[] = {
27 INTC_IPRC,
28};
29
30static struct ipr_desc ipr_irq_desc = {
31 .ipr_offsets = ipr_offsets,
32 .nr_offsets = ARRAY_SIZE(ipr_offsets),
33
34 .ipr_data = ipr_irq_table,
35 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
36
37 .chip = {
38 .name = "IPR-shmin",
39 },
24}; 40};
25 41
26static void __init init_shmin_irq(void) 42static void __init init_shmin_irq(void)
27{ 43{
28 ctrl_outw(0x2a00, PFC_PHCR); // IRQ0-3=IRQ 44 ctrl_outw(0x2a00, PFC_PHCR); // IRQ0-3=IRQ
29 ctrl_outw(0x0aaa, INTC_ICR1); // IRQ0-3=IRQ-mode,Low-active. 45 ctrl_outw(0x0aaa, INTC_ICR1); // IRQ0-3=IRQ-mode,Low-active.
30 make_ipr_irq(shmin_ipr_map, ARRAY_SIZE(shmin_ipr_map)); 46 register_ipr_controller(&ipr_irq_desc);
31} 47}
32 48
33static void __iomem *shmin_ioport_map(unsigned long port, unsigned int size) 49static void __iomem *shmin_ioport_map(unsigned long port, unsigned int size)
@@ -43,9 +59,8 @@ static void __iomem *shmin_ioport_map(unsigned long port, unsigned int size)
43 59
44} 60}
45 61
46struct sh_machine_vector mv_shmin __initmv = { 62static struct sh_machine_vector mv_shmin __initmv = {
47 .mv_name = "SHMIN", 63 .mv_name = "SHMIN",
48 .mv_init_irq = init_shmin_irq, 64 .mv_init_irq = init_shmin_irq,
49 .mv_ioport_map = shmin_ioport_map, 65 .mv_ioport_map = shmin_ioport_map,
50}; 66};
51ALIAS_MV(shmin)
diff --git a/arch/sh/boards/snapgear/setup.c b/arch/sh/boards/snapgear/setup.c
index 650fb36459..84271d85a8 100644
--- a/arch/sh/boards/snapgear/setup.c
+++ b/arch/sh/boards/snapgear/setup.c
@@ -68,11 +68,27 @@ module_init(eraseconfig_init);
68 * IRL3 = crypto 68 * IRL3 = crypto
69 */ 69 */
70 70
71static struct ipr_data snapgear_ipr_map[] = { 71static struct ipr_data ipr_irq_table[] = {
72 make_ipr_irq(IRL0_IRQ, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY); 72 { IRL0_IRQ, 0, IRL0_IPR_POS, IRL0_PRIORITY },
73 make_ipr_irq(IRL1_IRQ, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY); 73 { IRL1_IRQ, 0, IRL1_IPR_POS, IRL1_PRIORITY },
74 make_ipr_irq(IRL2_IRQ, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY); 74 { IRL2_IRQ, 0, IRL2_IPR_POS, IRL2_PRIORITY },
75 make_ipr_irq(IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY); 75 { IRL3_IRQ, 0, IRL3_IPR_POS, IRL3_PRIORITY },
76};
77
78static unsigned long ipr_offsets[] = {
79 INTC_IPRD,
80};
81
82static struct ipr_desc ipr_irq_desc = {
83 .ipr_offsets = ipr_offsets,
84 .nr_offsets = ARRAY_SIZE(ipr_offsets),
85
86 .ipr_data = ipr_irq_table,
87 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
88
89 .chip = {
90 .name = "IPR-snapgear",
91 },
76}; 92};
77 93
78static void __init init_snapgear_IRQ(void) 94static void __init init_snapgear_IRQ(void)
@@ -82,7 +98,7 @@ static void __init init_snapgear_IRQ(void)
82 98
83 printk("Setup SnapGear IRQ/IPR ...\n"); 99 printk("Setup SnapGear IRQ/IPR ...\n");
84 100
85 make_ipr_irq(snapgear_ipr_map, ARRAY_SIZE(snapgear_ipr_map)); 101 register_ipr_controller(&ipr_irq_desc);
86} 102}
87 103
88/* 104/*
@@ -96,7 +112,7 @@ static void __init snapgear_setup(char **cmdline_p)
96/* 112/*
97 * The Machine Vector 113 * The Machine Vector
98 */ 114 */
99struct sh_machine_vector mv_snapgear __initmv = { 115static struct sh_machine_vector mv_snapgear __initmv = {
100 .mv_name = "SnapGear SecureEdge5410", 116 .mv_name = "SnapGear SecureEdge5410",
101 .mv_setup = snapgear_setup, 117 .mv_setup = snapgear_setup,
102 .mv_nr_irqs = 72, 118 .mv_nr_irqs = 72,
@@ -117,4 +133,3 @@ struct sh_machine_vector mv_snapgear __initmv = {
117 133
118 .mv_init_irq = init_snapgear_IRQ, 134 .mv_init_irq = init_snapgear_IRQ,
119}; 135};
120ALIAS_MV(snapgear)
diff --git a/arch/sh/boards/superh/microdev/setup.c b/arch/sh/boards/superh/microdev/setup.c
index 6396cea1c8..fc8cd06d66 100644
--- a/arch/sh/boards/superh/microdev/setup.c
+++ b/arch/sh/boards/superh/microdev/setup.c
@@ -371,7 +371,7 @@ static void __init microdev_setup(char **cmdline_p)
371/* 371/*
372 * The Machine Vector 372 * The Machine Vector
373 */ 373 */
374struct sh_machine_vector mv_sh4202_microdev __initmv = { 374static struct sh_machine_vector mv_sh4202_microdev __initmv = {
375 .mv_name = "SH4-202 MicroDev", 375 .mv_name = "SH4-202 MicroDev",
376 .mv_setup = microdev_setup, 376 .mv_setup = microdev_setup,
377 .mv_nr_irqs = 72, /* QQQ need to check this - use the MACRO */ 377 .mv_nr_irqs = 72, /* QQQ need to check this - use the MACRO */
@@ -403,4 +403,3 @@ struct sh_machine_vector mv_sh4202_microdev __initmv = {
403 .mv_heartbeat = microdev_heartbeat, 403 .mv_heartbeat = microdev_heartbeat,
404#endif 404#endif
405}; 405};
406ALIAS_MV(sh4202_microdev)
diff --git a/arch/sh/boards/titan/setup.c b/arch/sh/boards/titan/setup.c
index 6bcd939bfa..606d25a4b8 100644
--- a/arch/sh/boards/titan/setup.c
+++ b/arch/sh/boards/titan/setup.c
@@ -12,7 +12,7 @@
12#include <asm/titan.h> 12#include <asm/titan.h>
13#include <asm/io.h> 13#include <asm/io.h>
14 14
15static struct ipr_data titan_ipr_map[] = { 15static struct ipr_data ipr_irq_table[] = {
16 /* IRQ, IPR idx, shift, prio */ 16 /* IRQ, IPR idx, shift, prio */
17 { TITAN_IRQ_WAN, 3, 12, 8 }, /* eth0 (WAN) */ 17 { TITAN_IRQ_WAN, 3, 12, 8 }, /* eth0 (WAN) */
18 { TITAN_IRQ_LAN, 3, 8, 8 }, /* eth1 (LAN) */ 18 { TITAN_IRQ_LAN, 3, 8, 8 }, /* eth1 (LAN) */
@@ -20,15 +20,33 @@ static struct ipr_data titan_ipr_map[] = {
20 { TITAN_IRQ_USB, 3, 0, 8 }, /* mPCI B (bottom), USB */ 20 { TITAN_IRQ_USB, 3, 0, 8 }, /* mPCI B (bottom), USB */
21}; 21};
22 22
23static unsigned long ipr_offsets[] = { /* stolen from setup-sh7750.c */
24 0xffd00004UL, /* 0: IPRA */
25 0xffd00008UL, /* 1: IPRB */
26 0xffd0000cUL, /* 2: IPRC */
27 0xffd00010UL, /* 3: IPRD */
28};
29
30static struct ipr_desc ipr_irq_desc = {
31 .ipr_offsets = ipr_offsets,
32 .nr_offsets = ARRAY_SIZE(ipr_offsets),
33
34 .ipr_data = ipr_irq_table,
35 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
36
37 .chip = {
38 .name = "IPR-titan",
39 },
40};
23static void __init init_titan_irq(void) 41static void __init init_titan_irq(void)
24{ 42{
25 /* enable individual interrupt mode for externals */ 43 /* enable individual interrupt mode for externals */
26 ipr_irq_enable_irlm(); 44 ipr_irq_enable_irlm();
27 /* register ipr irqs */ 45 /* register ipr irqs */
28 make_ipr_irq(titan_ipr_map, ARRAY_SIZE(titan_ipr_map)); 46 register_ipr_controller(&ipr_irq_desc);
29} 47}
30 48
31struct sh_machine_vector mv_titan __initmv = { 49static struct sh_machine_vector mv_titan __initmv = {
32 .mv_name = "Titan", 50 .mv_name = "Titan",
33 51
34 .mv_inb = titan_inb, 52 .mv_inb = titan_inb,
@@ -52,4 +70,3 @@ struct sh_machine_vector mv_titan __initmv = {
52 70
53 .mv_init_irq = init_titan_irq, 71 .mv_init_irq = init_titan_irq,
54}; 72};
55ALIAS_MV(titan)
diff --git a/arch/sh/boards/unknown/Makefile b/arch/sh/boards/unknown/Makefile
deleted file mode 100644
index 7d18f408b0..0000000000
--- a/arch/sh/boards/unknown/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
1#
2# Makefile for unknown SH boards
3#
4
5obj-y := setup.o
6
diff --git a/arch/sh/boards/unknown/setup.c b/arch/sh/boards/unknown/setup.c
deleted file mode 100644
index bee4612de5..0000000000
--- a/arch/sh/boards/unknown/setup.c
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * linux/arch/sh/boards/unknown/setup.c
3 *
4 * Copyright (C) 2002 Paul Mundt
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 * Setup code for an unknown machine (internal peripherals only)
10 *
11 * This is the simplest of all boards, and serves only as a quick and dirty
12 * method to start debugging a new board during bring-up until proper board
13 * setup code is written.
14 */
15#include <linux/init.h>
16#include <asm/machvec.h>
17
18struct sh_machine_vector mv_unknown __initmv = {
19 .mv_name = "Unknown",
20};
21ALIAS_MV(unknown)
diff --git a/arch/sh/cchips/Kconfig b/arch/sh/cchips/Kconfig
index 0582ca8346..2e516e9a6e 100644
--- a/arch/sh/cchips/Kconfig
+++ b/arch/sh/cchips/Kconfig
@@ -13,10 +13,8 @@ config VOYAGERGX
13 are additional GPIO bits that can be used to interface to 13 are additional GPIO bits that can be used to interface to
14 external as well. 14 external as well.
15 15
16# A board must have defined HD6446X_SERIES in order to see these
17config HD6446X_SERIES 16config HD6446X_SERIES
18 bool "HD6446x support" 17 bool
19 default n
20 18
21choice 19choice
22 prompt "HD6446x options" 20 prompt "HD6446x options"
@@ -25,7 +23,6 @@ choice
25 23
26config HD64461 24config HD64461
27 bool "Hitachi HD64461 companion chip support" 25 bool "Hitachi HD64461 companion chip support"
28 depends on CPU_SUBTYPE_SH7709
29 ---help--- 26 ---help---
30 The Hitachi HD64461 provides an interface for 27 The Hitachi HD64461 provides an interface for
31 the SH7709 CPU, supporting a LCD controller, 28 the SH7709 CPU, supporting a LCD controller,
@@ -40,7 +37,6 @@ config HD64461
40 37
41config HD64465 38config HD64465
42 bool "Hitachi HD64465 companion chip support" 39 bool "Hitachi HD64465 companion chip support"
43 depends on CPU_SUBTYPE_SH7750
44 ---help--- 40 ---help---
45 The Hitachi HD64465 provides an interface for 41 The Hitachi HD64465 provides an interface for
46 the SH7750 CPU, supporting a LCD controller, 42 the SH7750 CPU, supporting a LCD controller,
diff --git a/arch/sh/configs/dreamcast_defconfig b/arch/sh/configs/dreamcast_defconfig
index 8b6b5a779d..3fdd270eec 100644
--- a/arch/sh/configs/dreamcast_defconfig
+++ b/arch/sh/configs/dreamcast_defconfig
@@ -1,15 +1,23 @@
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.22-rc4
4# Tue Oct 3 10:51:55 2006 4# Sat Jul 7 03:47:45 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8CONFIG_GENERIC_BUG=y
8CONFIG_GENERIC_FIND_NEXT_BIT=y 9CONFIG_GENERIC_FIND_NEXT_BIT=y
9CONFIG_GENERIC_HWEIGHT=y 10CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_HARDIRQS=y 11CONFIG_GENERIC_HARDIRQS=y
11CONFIG_GENERIC_IRQ_PROBE=y 12CONFIG_GENERIC_IRQ_PROBE=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
14CONFIG_GENERIC_TIME=y
15CONFIG_GENERIC_CLOCKEVENTS=y
16CONFIG_SYS_SUPPORTS_PCI=y
17CONFIG_STACKTRACE_SUPPORT=y
18CONFIG_LOCKDEP_SUPPORT=y
19# CONFIG_ARCH_HAS_ILOG2_U32 is not set
20# CONFIG_ARCH_HAS_ILOG2_U64 is not set
13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
14 22
15# 23#
@@ -28,6 +36,7 @@ CONFIG_LOCALVERSION_AUTO=y
28CONFIG_SWAP=y 36CONFIG_SWAP=y
29CONFIG_SYSVIPC=y 37CONFIG_SYSVIPC=y
30# CONFIG_IPC_NS is not set 38# CONFIG_IPC_NS is not set
39CONFIG_SYSVIPC_SYSCTL=y
31# CONFIG_POSIX_MQUEUE is not set 40# CONFIG_POSIX_MQUEUE is not set
32CONFIG_BSD_PROCESS_ACCT=y 41CONFIG_BSD_PROCESS_ACCT=y
33# CONFIG_BSD_PROCESS_ACCT_V3 is not set 42# CONFIG_BSD_PROCESS_ACCT_V3 is not set
@@ -35,8 +44,10 @@ CONFIG_BSD_PROCESS_ACCT=y
35# CONFIG_UTS_NS is not set 44# CONFIG_UTS_NS is not set
36# CONFIG_AUDIT is not set 45# CONFIG_AUDIT is not set
37# CONFIG_IKCONFIG is not set 46# CONFIG_IKCONFIG is not set
47CONFIG_LOG_BUF_SHIFT=14
48CONFIG_SYSFS_DEPRECATED=y
38# CONFIG_RELAY is not set 49# CONFIG_RELAY is not set
39CONFIG_INITRAMFS_SOURCE="" 50# CONFIG_BLK_DEV_INITRD is not set
40CONFIG_CC_OPTIMIZE_FOR_SIZE=y 51CONFIG_CC_OPTIMIZE_FOR_SIZE=y
41CONFIG_SYSCTL=y 52CONFIG_SYSCTL=y
42CONFIG_EMBEDDED=y 53CONFIG_EMBEDDED=y
@@ -50,14 +61,19 @@ CONFIG_BUG=y
50CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
51CONFIG_BASE_FULL=y 62CONFIG_BASE_FULL=y
52CONFIG_FUTEX=y 63CONFIG_FUTEX=y
64CONFIG_ANON_INODES=y
53CONFIG_EPOLL=y 65CONFIG_EPOLL=y
66CONFIG_SIGNALFD=y
67CONFIG_TIMERFD=y
68CONFIG_EVENTFD=y
54CONFIG_SHMEM=y 69CONFIG_SHMEM=y
55CONFIG_SLAB=y
56CONFIG_VM_EVENT_COUNTERS=y 70CONFIG_VM_EVENT_COUNTERS=y
71CONFIG_SLAB=y
72# CONFIG_SLUB is not set
73# CONFIG_SLOB is not set
57CONFIG_RT_MUTEXES=y 74CONFIG_RT_MUTEXES=y
58# CONFIG_TINY_SHMEM is not set 75# CONFIG_TINY_SHMEM is not set
59CONFIG_BASE_SMALL=0 76CONFIG_BASE_SMALL=0
60# CONFIG_SLOB is not set
61 77
62# 78#
63# Loadable module support 79# Loadable module support
@@ -93,44 +109,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
93# 109#
94# System type 110# System type
95# 111#
96# CONFIG_SH_SOLUTION_ENGINE is not set
97# CONFIG_SH_7751_SOLUTION_ENGINE is not set
98# CONFIG_SH_7300_SOLUTION_ENGINE is not set
99# CONFIG_SH_7343_SOLUTION_ENGINE is not set
100# CONFIG_SH_73180_SOLUTION_ENGINE is not set
101# CONFIG_SH_7751_SYSTEMH is not set
102# CONFIG_SH_HP6XX is not set
103# CONFIG_SH_EC3104 is not set
104# CONFIG_SH_SATURN is not set
105CONFIG_SH_DREAMCAST=y
106# CONFIG_SH_BIGSUR is not set
107# CONFIG_SH_MPC1211 is not set
108# CONFIG_SH_SH03 is not set
109# CONFIG_SH_SECUREEDGE5410 is not set
110# CONFIG_SH_HS7751RVOIP is not set
111# CONFIG_SH_7710VOIPGW is not set
112# CONFIG_SH_RTS7751R2D is not set
113# CONFIG_SH_R7780RP is not set
114# CONFIG_SH_EDOSK7705 is not set
115# CONFIG_SH_SH4202_MICRODEV is not set
116# CONFIG_SH_LANDISK is not set
117# CONFIG_SH_TITAN is not set
118# CONFIG_SH_SHMIN is not set
119# CONFIG_SH_UNKNOWN is not set
120
121#
122# Processor selection
123#
124CONFIG_CPU_SH4=y 112CONFIG_CPU_SH4=y
125 113# CONFIG_CPU_SUBTYPE_SH7619 is not set
126# 114# CONFIG_CPU_SUBTYPE_SH7206 is not set
127# SH-2 Processor Support
128#
129# CONFIG_CPU_SUBTYPE_SH7604 is not set
130
131#
132# SH-3 Processor Support
133#
134# CONFIG_CPU_SUBTYPE_SH7300 is not set 115# CONFIG_CPU_SUBTYPE_SH7300 is not set
135# CONFIG_CPU_SUBTYPE_SH7705 is not set 116# CONFIG_CPU_SUBTYPE_SH7705 is not set
136# CONFIG_CPU_SUBTYPE_SH7706 is not set 117# CONFIG_CPU_SUBTYPE_SH7706 is not set
@@ -138,79 +119,93 @@ CONFIG_CPU_SH4=y
138# CONFIG_CPU_SUBTYPE_SH7708 is not set 119# CONFIG_CPU_SUBTYPE_SH7708 is not set
139# CONFIG_CPU_SUBTYPE_SH7709 is not set 120# CONFIG_CPU_SUBTYPE_SH7709 is not set
140# CONFIG_CPU_SUBTYPE_SH7710 is not set 121# CONFIG_CPU_SUBTYPE_SH7710 is not set
141 122# CONFIG_CPU_SUBTYPE_SH7712 is not set
142# 123# CONFIG_CPU_SUBTYPE_SH7750 is not set
143# SH-4 Processor Support
144#
145CONFIG_CPU_SUBTYPE_SH7750=y
146CONFIG_CPU_SUBTYPE_SH7091=y 124CONFIG_CPU_SUBTYPE_SH7091=y
147CONFIG_CPU_SUBTYPE_SH7750R=y 125# CONFIG_CPU_SUBTYPE_SH7750R is not set
148# CONFIG_CPU_SUBTYPE_SH7750S is not set 126# CONFIG_CPU_SUBTYPE_SH7750S is not set
149# CONFIG_CPU_SUBTYPE_SH7751 is not set 127# CONFIG_CPU_SUBTYPE_SH7751 is not set
150# CONFIG_CPU_SUBTYPE_SH7751R is not set 128# CONFIG_CPU_SUBTYPE_SH7751R is not set
151# CONFIG_CPU_SUBTYPE_SH7760 is not set 129# CONFIG_CPU_SUBTYPE_SH7760 is not set
152# CONFIG_CPU_SUBTYPE_SH4_202 is not set 130# CONFIG_CPU_SUBTYPE_SH4_202 is not set
153
154#
155# ST40 Processor Support
156#
157# CONFIG_CPU_SUBTYPE_ST40STB1 is not set 131# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
158# CONFIG_CPU_SUBTYPE_ST40GX1 is not set 132# CONFIG_CPU_SUBTYPE_ST40GX1 is not set
159
160#
161# SH-4A Processor Support
162#
163# CONFIG_CPU_SUBTYPE_SH7770 is not set 133# CONFIG_CPU_SUBTYPE_SH7770 is not set
164# CONFIG_CPU_SUBTYPE_SH7780 is not set 134# CONFIG_CPU_SUBTYPE_SH7780 is not set
165 135# CONFIG_CPU_SUBTYPE_SH7785 is not set
166# 136# CONFIG_CPU_SUBTYPE_SHX3 is not set
167# SH4AL-DSP Processor Support
168#
169# CONFIG_CPU_SUBTYPE_SH73180 is not set 137# CONFIG_CPU_SUBTYPE_SH73180 is not set
170# CONFIG_CPU_SUBTYPE_SH7343 is not set 138# CONFIG_CPU_SUBTYPE_SH7343 is not set
139# CONFIG_CPU_SUBTYPE_SH7722 is not set
171 140
172# 141#
173# Memory management options 142# Memory management options
174# 143#
144CONFIG_QUICKLIST=y
175CONFIG_MMU=y 145CONFIG_MMU=y
176CONFIG_PAGE_OFFSET=0x80000000 146CONFIG_PAGE_OFFSET=0x80000000
177CONFIG_MEMORY_START=0x0c000000 147CONFIG_MEMORY_START=0x0c000000
178CONFIG_MEMORY_SIZE=0x01000000 148CONFIG_MEMORY_SIZE=0x01000000
179CONFIG_VSYSCALL=y 149CONFIG_VSYSCALL=y
150CONFIG_ARCH_FLATMEM_ENABLE=y
151CONFIG_ARCH_SPARSEMEM_ENABLE=y
152CONFIG_ARCH_SPARSEMEM_DEFAULT=y
153CONFIG_MAX_ACTIVE_REGIONS=1
154CONFIG_ARCH_POPULATES_NODE_MAP=y
155CONFIG_ARCH_SELECT_MEMORY_MODEL=y
156CONFIG_PAGE_SIZE_4KB=y
157# CONFIG_PAGE_SIZE_8KB is not set
158# CONFIG_PAGE_SIZE_64KB is not set
180CONFIG_HUGETLB_PAGE_SIZE_64K=y 159CONFIG_HUGETLB_PAGE_SIZE_64K=y
160# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
181# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set 161# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
162# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set
163# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set
182CONFIG_SELECT_MEMORY_MODEL=y 164CONFIG_SELECT_MEMORY_MODEL=y
183CONFIG_FLATMEM_MANUAL=y 165CONFIG_FLATMEM_MANUAL=y
184# CONFIG_DISCONTIGMEM_MANUAL is not set 166# CONFIG_DISCONTIGMEM_MANUAL is not set
185# CONFIG_SPARSEMEM_MANUAL is not set 167# CONFIG_SPARSEMEM_MANUAL is not set
186CONFIG_FLATMEM=y 168CONFIG_FLATMEM=y
187CONFIG_FLAT_NODE_MEM_MAP=y 169CONFIG_FLAT_NODE_MEM_MAP=y
188# CONFIG_SPARSEMEM_STATIC is not set 170CONFIG_SPARSEMEM_STATIC=y
189CONFIG_SPLIT_PTLOCK_CPUS=4 171CONFIG_SPLIT_PTLOCK_CPUS=4
190# CONFIG_RESOURCES_64BIT is not set 172# CONFIG_RESOURCES_64BIT is not set
173CONFIG_ZONE_DMA_FLAG=0
174CONFIG_NR_QUICK=2
191 175
192# 176#
193# Cache configuration 177# Cache configuration
194# 178#
195# CONFIG_SH_DIRECT_MAPPED is not set 179# CONFIG_SH_DIRECT_MAPPED is not set
196# CONFIG_SH_WRITETHROUGH is not set 180# CONFIG_SH_WRITETHROUGH is not set
197# CONFIG_SH_OCRAM is not set
198 181
199# 182#
200# Processor features 183# Processor features
201# 184#
202CONFIG_CPU_LITTLE_ENDIAN=y 185CONFIG_CPU_LITTLE_ENDIAN=y
186# CONFIG_CPU_BIG_ENDIAN is not set
203CONFIG_SH_FPU=y 187CONFIG_SH_FPU=y
204# CONFIG_SH_DSP is not set 188# CONFIG_SH_DSP is not set
205CONFIG_SH_STORE_QUEUES=y 189CONFIG_SH_STORE_QUEUES=y
206CONFIG_CPU_HAS_INTEVT=y 190CONFIG_CPU_HAS_INTEVT=y
191CONFIG_CPU_HAS_IPR_IRQ=y
207CONFIG_CPU_HAS_SR_RB=y 192CONFIG_CPU_HAS_SR_RB=y
193CONFIG_CPU_HAS_PTEA=y
208 194
209# 195#
210# Timer support 196# Board support
197#
198CONFIG_SH_DREAMCAST=y
199
200#
201# Timer and clock configuration
211# 202#
212CONFIG_SH_TMU=y 203CONFIG_SH_TMU=y
204CONFIG_SH_TIMER_IRQ=16
213CONFIG_SH_PCLK_FREQ=49876504 205CONFIG_SH_PCLK_FREQ=49876504
206# CONFIG_TICK_ONESHOT is not set
207# CONFIG_NO_HZ is not set
208# CONFIG_HIGH_RES_TIMERS is not set
214 209
215# 210#
216# CPU Frequency scaling 211# CPU Frequency scaling
@@ -232,6 +227,7 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y
232# 227#
233# DMA support 228# DMA support
234# 229#
230CONFIG_SH_DMA_API=y
235CONFIG_SH_DMA=y 231CONFIG_SH_DMA=y
236CONFIG_NR_ONCHIP_DMA_CHANNELS=4 232CONFIG_NR_ONCHIP_DMA_CHANNELS=4
237CONFIG_NR_DMA_CHANNELS_BOOL=y 233CONFIG_NR_DMA_CHANNELS_BOOL=y
@@ -240,17 +236,23 @@ CONFIG_NR_DMA_CHANNELS=9
240# 236#
241# Companion Chips 237# Companion Chips
242# 238#
243# CONFIG_HD6446X_SERIES is not set 239
240#
241# Additional SuperH Device Drivers
242#
243# CONFIG_HEARTBEAT is not set
244# CONFIG_PUSH_SWITCH is not set
244 245
245# 246#
246# Kernel features 247# Kernel features
247# 248#
248# CONFIG_HZ_100 is not set 249# CONFIG_HZ_100 is not set
249CONFIG_HZ_250=y 250CONFIG_HZ_250=y
251# CONFIG_HZ_300 is not set
250# CONFIG_HZ_1000 is not set 252# CONFIG_HZ_1000 is not set
251CONFIG_HZ=250 253CONFIG_HZ=250
252# CONFIG_KEXEC is not set 254# CONFIG_KEXEC is not set
253# CONFIG_SMP is not set 255# CONFIG_CRASH_DUMP is not set
254# CONFIG_PREEMPT_NONE is not set 256# CONFIG_PREEMPT_NONE is not set
255# CONFIG_PREEMPT_VOLUNTARY is not set 257# CONFIG_PREEMPT_VOLUNTARY is not set
256CONFIG_PREEMPT=y 258CONFIG_PREEMPT=y
@@ -269,33 +271,23 @@ CONFIG_CMDLINE="console=ttySC1,115200 panic=3"
269# Bus options 271# Bus options
270# 272#
271CONFIG_PCI=y 273CONFIG_PCI=y
272# CONFIG_SH_PCIDMA_NONCOHERENT is not set 274CONFIG_SH_PCIDMA_NONCOHERENT=y
273CONFIG_PCI_AUTO=y 275CONFIG_PCI_AUTO=y
274# CONFIG_PCI_MULTITHREAD_PROBE is not set 276# CONFIG_ARCH_SUPPORTS_MSI is not set
275 277
276# 278#
277# PCCARD (PCMCIA/CardBus) support 279# PCCARD (PCMCIA/CardBus) support
278# 280#
279# CONFIG_PCCARD is not set 281# CONFIG_PCCARD is not set
280
281#
282# PCI Hotplug Support
283#
284# CONFIG_HOTPLUG_PCI is not set 282# CONFIG_HOTPLUG_PCI is not set
285 283
286# 284#
287# Executable file formats 285# Executable file formats
288# 286#
289CONFIG_BINFMT_ELF=y 287CONFIG_BINFMT_ELF=y
290# CONFIG_BINFMT_FLAT is not set
291# CONFIG_BINFMT_MISC is not set 288# CONFIG_BINFMT_MISC is not set
292 289
293# 290#
294# Power management options (EXPERIMENTAL)
295#
296# CONFIG_PM is not set
297
298#
299# Networking 291# Networking
300# 292#
301CONFIG_NET=y 293CONFIG_NET=y
@@ -303,13 +295,13 @@ CONFIG_NET=y
303# 295#
304# Networking options 296# Networking options
305# 297#
306# CONFIG_NETDEBUG is not set
307CONFIG_PACKET=y 298CONFIG_PACKET=y
308# CONFIG_PACKET_MMAP is not set 299# CONFIG_PACKET_MMAP is not set
309CONFIG_UNIX=y 300CONFIG_UNIX=y
310CONFIG_XFRM=y 301CONFIG_XFRM=y
311# CONFIG_XFRM_USER is not set 302# CONFIG_XFRM_USER is not set
312# CONFIG_XFRM_SUB_POLICY is not set 303# CONFIG_XFRM_SUB_POLICY is not set
304# CONFIG_XFRM_MIGRATE is not set
313# CONFIG_NET_KEY is not set 305# CONFIG_NET_KEY is not set
314CONFIG_INET=y 306CONFIG_INET=y
315# CONFIG_IP_MULTICAST is not set 307# CONFIG_IP_MULTICAST is not set
@@ -327,30 +319,20 @@ CONFIG_IP_FIB_HASH=y
327# CONFIG_INET_TUNNEL is not set 319# CONFIG_INET_TUNNEL is not set
328CONFIG_INET_XFRM_MODE_TRANSPORT=y 320CONFIG_INET_XFRM_MODE_TRANSPORT=y
329CONFIG_INET_XFRM_MODE_TUNNEL=y 321CONFIG_INET_XFRM_MODE_TUNNEL=y
322CONFIG_INET_XFRM_MODE_BEET=y
330CONFIG_INET_DIAG=y 323CONFIG_INET_DIAG=y
331CONFIG_INET_TCP_DIAG=y 324CONFIG_INET_TCP_DIAG=y
332# CONFIG_TCP_CONG_ADVANCED is not set 325# CONFIG_TCP_CONG_ADVANCED is not set
333CONFIG_TCP_CONG_CUBIC=y 326CONFIG_TCP_CONG_CUBIC=y
334CONFIG_DEFAULT_TCP_CONG="cubic" 327CONFIG_DEFAULT_TCP_CONG="cubic"
328# CONFIG_TCP_MD5SIG is not set
335# CONFIG_IPV6 is not set 329# CONFIG_IPV6 is not set
336# CONFIG_INET6_XFRM_TUNNEL is not set 330# CONFIG_INET6_XFRM_TUNNEL is not set
337# CONFIG_INET6_TUNNEL is not set 331# CONFIG_INET6_TUNNEL is not set
338# CONFIG_NETWORK_SECMARK is not set 332# CONFIG_NETWORK_SECMARK is not set
339# CONFIG_NETFILTER is not set 333# CONFIG_NETFILTER is not set
340
341#
342# DCCP Configuration (EXPERIMENTAL)
343#
344# CONFIG_IP_DCCP is not set 334# CONFIG_IP_DCCP is not set
345
346#
347# SCTP Configuration (EXPERIMENTAL)
348#
349# CONFIG_IP_SCTP is not set 335# CONFIG_IP_SCTP is not set
350
351#
352# TIPC Configuration (EXPERIMENTAL)
353#
354# CONFIG_TIPC is not set 336# CONFIG_TIPC is not set
355# CONFIG_ATM is not set 337# CONFIG_ATM is not set
356# CONFIG_BRIDGE is not set 338# CONFIG_BRIDGE is not set
@@ -376,7 +358,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
376# CONFIG_HAMRADIO is not set 358# CONFIG_HAMRADIO is not set
377# CONFIG_IRDA is not set 359# CONFIG_IRDA is not set
378# CONFIG_BT is not set 360# CONFIG_BT is not set
361# CONFIG_AF_RXRPC is not set
362
363#
364# Wireless
365#
366# CONFIG_CFG80211 is not set
367# CONFIG_WIRELESS_EXT is not set
368# CONFIG_MAC80211 is not set
379# CONFIG_IEEE80211 is not set 369# CONFIG_IEEE80211 is not set
370# CONFIG_RFKILL is not set
380 371
381# 372#
382# Device Drivers 373# Device Drivers
@@ -394,10 +385,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
394# Connector - unified userspace <-> kernelspace linker 385# Connector - unified userspace <-> kernelspace linker
395# 386#
396# CONFIG_CONNECTOR is not set 387# CONFIG_CONNECTOR is not set
397
398#
399# Memory Technology Devices (MTD)
400#
401# CONFIG_MTD is not set 388# CONFIG_MTD is not set
402 389
403# 390#
@@ -408,6 +395,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
408# 395#
409# Plug and Play support 396# Plug and Play support
410# 397#
398# CONFIG_PNPACPI is not set
411 399
412# 400#
413# Block devices 401# Block devices
@@ -421,13 +409,16 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
421# CONFIG_BLK_DEV_NBD is not set 409# CONFIG_BLK_DEV_NBD is not set
422# CONFIG_BLK_DEV_SX8 is not set 410# CONFIG_BLK_DEV_SX8 is not set
423# CONFIG_BLK_DEV_RAM is not set 411# CONFIG_BLK_DEV_RAM is not set
424# CONFIG_BLK_DEV_INITRD is not set
425# CONFIG_CDROM_PKTCDVD is not set 412# CONFIG_CDROM_PKTCDVD is not set
426# CONFIG_ATA_OVER_ETH is not set 413# CONFIG_ATA_OVER_ETH is not set
427 414
428# 415#
429# ATA/ATAPI/MFM/RLL support 416# Misc devices
430# 417#
418# CONFIG_PHANTOM is not set
419# CONFIG_SGI_IOC4 is not set
420# CONFIG_TIFM_CORE is not set
421# CONFIG_BLINK is not set
431# CONFIG_IDE is not set 422# CONFIG_IDE is not set
432 423
433# 424#
@@ -436,10 +427,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
436# CONFIG_RAID_ATTRS is not set 427# CONFIG_RAID_ATTRS is not set
437# CONFIG_SCSI is not set 428# CONFIG_SCSI is not set
438# CONFIG_SCSI_NETLINK is not set 429# CONFIG_SCSI_NETLINK is not set
439
440#
441# Serial ATA (prod) and Parallel ATA (experimental) drivers
442#
443# CONFIG_ATA is not set 430# CONFIG_ATA is not set
444 431
445# 432#
@@ -455,6 +442,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
455# 442#
456# IEEE 1394 (FireWire) support 443# IEEE 1394 (FireWire) support
457# 444#
445# CONFIG_FIREWIRE is not set
458# CONFIG_IEEE1394 is not set 446# CONFIG_IEEE1394 is not set
459 447
460# 448#
@@ -470,15 +458,7 @@ CONFIG_NETDEVICES=y
470# CONFIG_BONDING is not set 458# CONFIG_BONDING is not set
471# CONFIG_EQUALIZER is not set 459# CONFIG_EQUALIZER is not set
472# CONFIG_TUN is not set 460# CONFIG_TUN is not set
473
474#
475# ARCnet devices
476#
477# CONFIG_ARCNET is not set 461# CONFIG_ARCNET is not set
478
479#
480# PHY device support
481#
482# CONFIG_PHYLIB is not set 462# CONFIG_PHYLIB is not set
483 463
484# 464#
@@ -521,47 +501,16 @@ CONFIG_8139TOO=y
521# CONFIG_SUNDANCE is not set 501# CONFIG_SUNDANCE is not set
522# CONFIG_TLAN is not set 502# CONFIG_TLAN is not set
523# CONFIG_VIA_RHINE is not set 503# CONFIG_VIA_RHINE is not set
524 504# CONFIG_SC92031 is not set
525# 505# CONFIG_NETDEV_1000 is not set
526# Ethernet (1000 Mbit) 506# CONFIG_NETDEV_10000 is not set
527#
528# CONFIG_ACENIC is not set
529# CONFIG_DL2K is not set
530# CONFIG_E1000 is not set
531# CONFIG_NS83820 is not set
532# CONFIG_HAMACHI is not set
533# CONFIG_YELLOWFIN is not set
534# CONFIG_R8169 is not set
535# CONFIG_SIS190 is not set
536# CONFIG_SKGE is not set
537# CONFIG_SKY2 is not set
538# CONFIG_SK98LIN is not set
539# CONFIG_VIA_VELOCITY is not set
540# CONFIG_TIGON3 is not set
541# CONFIG_BNX2 is not set
542# CONFIG_QLA3XXX is not set
543
544#
545# Ethernet (10000 Mbit)
546#
547# CONFIG_CHELSIO_T1 is not set
548# CONFIG_IXGB is not set
549# CONFIG_S2IO is not set
550# CONFIG_MYRI10GE is not set
551
552#
553# Token Ring devices
554#
555# CONFIG_TR is not set 507# CONFIG_TR is not set
556 508
557# 509#
558# Wireless LAN (non-hamradio) 510# Wireless LAN
559#
560# CONFIG_NET_RADIO is not set
561
562#
563# Wan interfaces
564# 511#
512# CONFIG_WLAN_PRE80211 is not set
513# CONFIG_WLAN_80211 is not set
565# CONFIG_WAN is not set 514# CONFIG_WAN is not set
566# CONFIG_FDDI is not set 515# CONFIG_FDDI is not set
567# CONFIG_HIPPI is not set 516# CONFIG_HIPPI is not set
@@ -604,17 +553,19 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
604# Input Device Drivers 553# Input Device Drivers
605# 554#
606CONFIG_INPUT_KEYBOARD=y 555CONFIG_INPUT_KEYBOARD=y
607CONFIG_KEYBOARD_ATKBD=y 556# CONFIG_KEYBOARD_ATKBD is not set
608# CONFIG_KEYBOARD_SUNKBD is not set 557# CONFIG_KEYBOARD_SUNKBD is not set
609# CONFIG_KEYBOARD_LKKBD is not set 558# CONFIG_KEYBOARD_LKKBD is not set
610# CONFIG_KEYBOARD_XTKBD is not set 559# CONFIG_KEYBOARD_XTKBD is not set
611# CONFIG_KEYBOARD_NEWTON is not set 560# CONFIG_KEYBOARD_NEWTON is not set
612# CONFIG_KEYBOARD_STOWAWAY is not set 561# CONFIG_KEYBOARD_STOWAWAY is not set
613CONFIG_INPUT_MOUSE=y 562CONFIG_INPUT_MOUSE=y
614CONFIG_MOUSE_PS2=y 563# CONFIG_MOUSE_PS2 is not set
615# CONFIG_MOUSE_SERIAL is not set 564# CONFIG_MOUSE_SERIAL is not set
565# CONFIG_MOUSE_APPLETOUCH is not set
616# CONFIG_MOUSE_VSXXXAA is not set 566# CONFIG_MOUSE_VSXXXAA is not set
617# CONFIG_INPUT_JOYSTICK is not set 567# CONFIG_INPUT_JOYSTICK is not set
568# CONFIG_INPUT_TABLET is not set
618# CONFIG_INPUT_TOUCHSCREEN is not set 569# CONFIG_INPUT_TOUCHSCREEN is not set
619# CONFIG_INPUT_MISC is not set 570# CONFIG_INPUT_MISC is not set
620 571
@@ -660,10 +611,6 @@ CONFIG_LEGACY_PTY_COUNT=256
660# IPMI 611# IPMI
661# 612#
662# CONFIG_IPMI_HANDLER is not set 613# CONFIG_IPMI_HANDLER is not set
663
664#
665# Watchdog Cards
666#
667CONFIG_WATCHDOG=y 614CONFIG_WATCHDOG=y
668# CONFIG_WATCHDOG_NOWAYOUT is not set 615# CONFIG_WATCHDOG_NOWAYOUT is not set
669 616
@@ -680,14 +627,8 @@ CONFIG_SH_WDT=y
680# CONFIG_PCIPCWATCHDOG is not set 627# CONFIG_PCIPCWATCHDOG is not set
681# CONFIG_WDTPCI is not set 628# CONFIG_WDTPCI is not set
682CONFIG_HW_RANDOM=y 629CONFIG_HW_RANDOM=y
683# CONFIG_GEN_RTC is not set
684# CONFIG_DTLK is not set
685# CONFIG_R3964 is not set 630# CONFIG_R3964 is not set
686# CONFIG_APPLICOM is not set 631# CONFIG_APPLICOM is not set
687
688#
689# Ftape, the floppy tape device driver
690#
691# CONFIG_DRM is not set 632# CONFIG_DRM is not set
692# CONFIG_RAW_DRIVER is not set 633# CONFIG_RAW_DRIVER is not set
693 634
@@ -695,11 +636,7 @@ CONFIG_HW_RANDOM=y
695# TPM devices 636# TPM devices
696# 637#
697# CONFIG_TCG_TPM is not set 638# CONFIG_TCG_TPM is not set
698# CONFIG_TELCLOCK is not set 639CONFIG_DEVPORT=y
699
700#
701# I2C support
702#
703# CONFIG_I2C is not set 640# CONFIG_I2C is not set
704 641
705# 642#
@@ -711,44 +648,51 @@ CONFIG_HW_RANDOM=y
711# 648#
712# Dallas's 1-wire bus 649# Dallas's 1-wire bus
713# 650#
651# CONFIG_W1 is not set
652# CONFIG_HWMON is not set
714 653
715# 654#
716# Hardware Monitoring support 655# Multifunction device drivers
717#
718CONFIG_HWMON=y
719# CONFIG_HWMON_VID is not set
720# CONFIG_SENSORS_ABITUGURU is not set
721# CONFIG_SENSORS_F71805F is not set
722# CONFIG_SENSORS_VT1211 is not set
723# CONFIG_HWMON_DEBUG_CHIP is not set
724
725#
726# Misc devices
727# 656#
657# CONFIG_MFD_SM501 is not set
728 658
729# 659#
730# Multimedia devices 660# Multimedia devices
731# 661#
732# CONFIG_VIDEO_DEV is not set 662# CONFIG_VIDEO_DEV is not set
733CONFIG_VIDEO_V4L2=y 663# CONFIG_DVB_CORE is not set
664# CONFIG_DAB is not set
734 665
735# 666#
736# Digital Video Broadcasting Devices 667# Graphics support
737# 668#
738# CONFIG_DVB is not set 669# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
739 670
740# 671#
741# Graphics support 672# Display device support
742# 673#
743CONFIG_FIRMWARE_EDID=y 674# CONFIG_DISPLAY_SUPPORT is not set
675# CONFIG_VGASTATE is not set
744CONFIG_FB=y 676CONFIG_FB=y
677CONFIG_FIRMWARE_EDID=y
678# CONFIG_FB_DDC is not set
745CONFIG_FB_CFB_FILLRECT=y 679CONFIG_FB_CFB_FILLRECT=y
746CONFIG_FB_CFB_COPYAREA=y 680CONFIG_FB_CFB_COPYAREA=y
747CONFIG_FB_CFB_IMAGEBLIT=y 681CONFIG_FB_CFB_IMAGEBLIT=y
682# CONFIG_FB_SYS_FILLRECT is not set
683# CONFIG_FB_SYS_COPYAREA is not set
684# CONFIG_FB_SYS_IMAGEBLIT is not set
685# CONFIG_FB_SYS_FOPS is not set
686CONFIG_FB_DEFERRED_IO=y
687# CONFIG_FB_SVGALIB is not set
748# CONFIG_FB_MACMODES is not set 688# CONFIG_FB_MACMODES is not set
749# CONFIG_FB_BACKLIGHT is not set 689# CONFIG_FB_BACKLIGHT is not set
750# CONFIG_FB_MODE_HELPERS is not set 690# CONFIG_FB_MODE_HELPERS is not set
751# CONFIG_FB_TILEBLITTING is not set 691# CONFIG_FB_TILEBLITTING is not set
692
693#
694# Frame buffer hardware drivers
695#
752# CONFIG_FB_CIRRUS is not set 696# CONFIG_FB_CIRRUS is not set
753# CONFIG_FB_PM2 is not set 697# CONFIG_FB_PM2 is not set
754# CONFIG_FB_CYBER2000 is not set 698# CONFIG_FB_CYBER2000 is not set
@@ -763,13 +707,17 @@ CONFIG_FB_PVR2=y
763# CONFIG_FB_RADEON is not set 707# CONFIG_FB_RADEON is not set
764# CONFIG_FB_ATY128 is not set 708# CONFIG_FB_ATY128 is not set
765# CONFIG_FB_ATY is not set 709# CONFIG_FB_ATY is not set
710# CONFIG_FB_S3 is not set
766# CONFIG_FB_SAVAGE is not set 711# CONFIG_FB_SAVAGE is not set
767# CONFIG_FB_SIS is not set 712# CONFIG_FB_SIS is not set
768# CONFIG_FB_NEOMAGIC is not set 713# CONFIG_FB_NEOMAGIC is not set
769# CONFIG_FB_KYRO is not set 714# CONFIG_FB_KYRO is not set
770# CONFIG_FB_3DFX is not set 715# CONFIG_FB_3DFX is not set
771# CONFIG_FB_VOODOO1 is not set 716# CONFIG_FB_VOODOO1 is not set
717# CONFIG_FB_VT8623 is not set
772# CONFIG_FB_TRIDENT is not set 718# CONFIG_FB_TRIDENT is not set
719# CONFIG_FB_ARK is not set
720# CONFIG_FB_PM3 is not set
773# CONFIG_FB_VIRTUAL is not set 721# CONFIG_FB_VIRTUAL is not set
774 722
775# 723#
@@ -789,10 +737,6 @@ CONFIG_FONT_8x16=y
789# CONFIG_FONT_SUN8x16 is not set 737# CONFIG_FONT_SUN8x16 is not set
790# CONFIG_FONT_SUN12x22 is not set 738# CONFIG_FONT_SUN12x22 is not set
791# CONFIG_FONT_10x18 is not set 739# CONFIG_FONT_10x18 is not set
792
793#
794# Logo configuration
795#
796CONFIG_LOGO=y 740CONFIG_LOGO=y
797# CONFIG_LOGO_LINUX_MONO is not set 741# CONFIG_LOGO_LINUX_MONO is not set
798# CONFIG_LOGO_LINUX_VGA16 is not set 742# CONFIG_LOGO_LINUX_VGA16 is not set
@@ -800,7 +744,6 @@ CONFIG_LOGO=y
800# CONFIG_LOGO_SUPERH_MONO is not set 744# CONFIG_LOGO_SUPERH_MONO is not set
801# CONFIG_LOGO_SUPERH_VGA16 is not set 745# CONFIG_LOGO_SUPERH_VGA16 is not set
802CONFIG_LOGO_SUPERH_CLUT224=y 746CONFIG_LOGO_SUPERH_CLUT224=y
803# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
804 747
805# 748#
806# Sound 749# Sound
@@ -808,6 +751,12 @@ CONFIG_LOGO_SUPERH_CLUT224=y
808# CONFIG_SOUND is not set 751# CONFIG_SOUND is not set
809 752
810# 753#
754# HID Devices
755#
756CONFIG_HID=y
757# CONFIG_HID_DEBUG is not set
758
759#
811# USB support 760# USB support
812# 761#
813CONFIG_USB_ARCH_HAS_HCD=y 762CONFIG_USB_ARCH_HAS_HCD=y
@@ -823,10 +772,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
823# USB Gadget Support 772# USB Gadget Support
824# 773#
825# CONFIG_USB_GADGET is not set 774# CONFIG_USB_GADGET is not set
826
827#
828# MMC/SD Card support
829#
830# CONFIG_MMC is not set 775# CONFIG_MMC is not set
831 776
832# 777#
@@ -874,10 +819,12 @@ CONFIG_USB_ARCH_HAS_EHCI=y
874# 819#
875# CONFIG_EXT2_FS is not set 820# CONFIG_EXT2_FS is not set
876# CONFIG_EXT3_FS is not set 821# CONFIG_EXT3_FS is not set
822# CONFIG_EXT4DEV_FS is not set
877# CONFIG_REISERFS_FS is not set 823# CONFIG_REISERFS_FS is not set
878# CONFIG_JFS_FS is not set 824# CONFIG_JFS_FS is not set
879# CONFIG_FS_POSIX_ACL is not set 825# CONFIG_FS_POSIX_ACL is not set
880# CONFIG_XFS_FS is not set 826# CONFIG_XFS_FS is not set
827# CONFIG_GFS2_FS is not set
881# CONFIG_OCFS2_FS is not set 828# CONFIG_OCFS2_FS is not set
882# CONFIG_MINIX_FS is not set 829# CONFIG_MINIX_FS is not set
883# CONFIG_ROMFS_FS is not set 830# CONFIG_ROMFS_FS is not set
@@ -957,6 +904,11 @@ CONFIG_MSDOS_PARTITION=y
957# CONFIG_NLS is not set 904# CONFIG_NLS is not set
958 905
959# 906#
907# Distributed Lock Manager
908#
909# CONFIG_DLM is not set
910
911#
960# Profiling support 912# Profiling support
961# 913#
962CONFIG_PROFILING=y 914CONFIG_PROFILING=y
@@ -965,17 +917,18 @@ CONFIG_PROFILING=y
965# 917#
966# Kernel hacking 918# Kernel hacking
967# 919#
920CONFIG_TRACE_IRQFLAGS_SUPPORT=y
968# CONFIG_PRINTK_TIME is not set 921# CONFIG_PRINTK_TIME is not set
969CONFIG_ENABLE_MUST_CHECK=y 922CONFIG_ENABLE_MUST_CHECK=y
970# CONFIG_MAGIC_SYSRQ is not set 923# CONFIG_MAGIC_SYSRQ is not set
971# CONFIG_UNUSED_SYMBOLS is not set 924# CONFIG_UNUSED_SYMBOLS is not set
925# CONFIG_DEBUG_FS is not set
926# CONFIG_HEADERS_CHECK is not set
972# CONFIG_DEBUG_KERNEL is not set 927# CONFIG_DEBUG_KERNEL is not set
973CONFIG_LOG_BUF_SHIFT=14
974# CONFIG_DEBUG_BUGVERBOSE is not set 928# CONFIG_DEBUG_BUGVERBOSE is not set
975# CONFIG_DEBUG_FS is not set
976# CONFIG_SH_STANDARD_BIOS is not set 929# CONFIG_SH_STANDARD_BIOS is not set
977# CONFIG_EARLY_SCIF_CONSOLE is not set 930# CONFIG_EARLY_SCIF_CONSOLE is not set
978# CONFIG_KGDB is not set 931# CONFIG_SH_KGDB is not set
979 932
980# 933#
981# Security options 934# Security options
@@ -991,8 +944,13 @@ CONFIG_LOG_BUF_SHIFT=14
991# 944#
992# Library routines 945# Library routines
993# 946#
947CONFIG_BITREVERSE=y
994# CONFIG_CRC_CCITT is not set 948# CONFIG_CRC_CCITT is not set
995# CONFIG_CRC16 is not set 949# CONFIG_CRC16 is not set
950# CONFIG_CRC_ITU_T is not set
996CONFIG_CRC32=y 951CONFIG_CRC32=y
997# CONFIG_LIBCRC32C is not set 952# CONFIG_LIBCRC32C is not set
998CONFIG_PLIST=y 953CONFIG_PLIST=y
954CONFIG_HAS_IOMEM=y
955CONFIG_HAS_IOPORT=y
956CONFIG_HAS_DMA=y
diff --git a/arch/sh/configs/r7780mp_defconfig b/arch/sh/configs/r7780mp_defconfig
new file mode 100644
index 0000000000..17f7402b31
--- /dev/null
+++ b/arch/sh/configs/r7780mp_defconfig
@@ -0,0 +1,1223 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc4
4# Mon Jun 11 10:24:57 2007
5#
6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8CONFIG_GENERIC_BUG=y
9CONFIG_GENERIC_FIND_NEXT_BIT=y
10CONFIG_GENERIC_HWEIGHT=y
11CONFIG_GENERIC_HARDIRQS=y
12CONFIG_GENERIC_IRQ_PROBE=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y
14CONFIG_GENERIC_TIME=y
15CONFIG_GENERIC_CLOCKEVENTS=y
16CONFIG_STACKTRACE_SUPPORT=y
17CONFIG_LOCKDEP_SUPPORT=y
18# CONFIG_ARCH_HAS_ILOG2_U32 is not set
19# CONFIG_ARCH_HAS_ILOG2_U64 is not set
20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
21
22#
23# Code maturity level options
24#
25CONFIG_EXPERIMENTAL=y
26CONFIG_BROKEN_ON_SMP=y
27CONFIG_LOCK_KERNEL=y
28CONFIG_INIT_ENV_ARG_LIMIT=32
29
30#
31# General setup
32#
33CONFIG_LOCALVERSION=""
34CONFIG_LOCALVERSION_AUTO=y
35CONFIG_SWAP=y
36CONFIG_SYSVIPC=y
37# CONFIG_IPC_NS is not set
38CONFIG_SYSVIPC_SYSCTL=y
39# CONFIG_POSIX_MQUEUE is not set
40CONFIG_BSD_PROCESS_ACCT=y
41# CONFIG_BSD_PROCESS_ACCT_V3 is not set
42# CONFIG_TASKSTATS is not set
43# CONFIG_UTS_NS is not set
44# CONFIG_AUDIT is not set
45CONFIG_IKCONFIG=y
46CONFIG_IKCONFIG_PROC=y
47CONFIG_LOG_BUF_SHIFT=14
48# CONFIG_SYSFS_DEPRECATED is not set
49# CONFIG_RELAY is not set
50# CONFIG_BLK_DEV_INITRD is not set
51CONFIG_CC_OPTIMIZE_FOR_SIZE=y
52CONFIG_SYSCTL=y
53CONFIG_EMBEDDED=y
54CONFIG_UID16=y
55# CONFIG_SYSCTL_SYSCALL is not set
56CONFIG_KALLSYMS=y
57# CONFIG_KALLSYMS_ALL is not set
58# CONFIG_KALLSYMS_EXTRA_PASS is not set
59CONFIG_HOTPLUG=y
60CONFIG_PRINTK=y
61CONFIG_BUG=y
62CONFIG_ELF_CORE=y
63CONFIG_BASE_FULL=y
64# CONFIG_FUTEX is not set
65CONFIG_ANON_INODES=y
66# CONFIG_EPOLL is not set
67CONFIG_SIGNALFD=y
68CONFIG_TIMERFD=y
69CONFIG_EVENTFD=y
70CONFIG_SHMEM=y
71CONFIG_VM_EVENT_COUNTERS=y
72CONFIG_SLAB=y
73# CONFIG_SLUB is not set
74# CONFIG_SLOB is not set
75# CONFIG_TINY_SHMEM is not set
76CONFIG_BASE_SMALL=0
77
78#
79# Loadable module support
80#
81CONFIG_MODULES=y
82CONFIG_MODULE_UNLOAD=y
83# CONFIG_MODULE_FORCE_UNLOAD is not set
84# CONFIG_MODVERSIONS is not set
85# CONFIG_MODULE_SRCVERSION_ALL is not set
86CONFIG_KMOD=y
87
88#
89# Block layer
90#
91CONFIG_BLOCK=y
92# CONFIG_LBD is not set
93# CONFIG_BLK_DEV_IO_TRACE is not set
94# CONFIG_LSF is not set
95
96#
97# IO Schedulers
98#
99CONFIG_IOSCHED_NOOP=y
100# CONFIG_IOSCHED_AS is not set
101# CONFIG_IOSCHED_DEADLINE is not set
102# CONFIG_IOSCHED_CFQ is not set
103# CONFIG_DEFAULT_AS is not set
104# CONFIG_DEFAULT_DEADLINE is not set
105# CONFIG_DEFAULT_CFQ is not set
106CONFIG_DEFAULT_NOOP=y
107CONFIG_DEFAULT_IOSCHED="noop"
108
109#
110# System type
111#
112CONFIG_CPU_SH4=y
113CONFIG_CPU_SH4A=y
114# CONFIG_CPU_SUBTYPE_SH7619 is not set
115# CONFIG_CPU_SUBTYPE_SH7206 is not set
116# CONFIG_CPU_SUBTYPE_SH7300 is not set
117# CONFIG_CPU_SUBTYPE_SH7705 is not set
118# CONFIG_CPU_SUBTYPE_SH7706 is not set
119# CONFIG_CPU_SUBTYPE_SH7707 is not set
120# CONFIG_CPU_SUBTYPE_SH7708 is not set
121# CONFIG_CPU_SUBTYPE_SH7709 is not set
122# CONFIG_CPU_SUBTYPE_SH7710 is not set
123# CONFIG_CPU_SUBTYPE_SH7712 is not set
124# CONFIG_CPU_SUBTYPE_SH7750 is not set
125# CONFIG_CPU_SUBTYPE_SH7091 is not set
126# CONFIG_CPU_SUBTYPE_SH7750R is not set
127# CONFIG_CPU_SUBTYPE_SH7750S is not set
128# CONFIG_CPU_SUBTYPE_SH7751 is not set
129# CONFIG_CPU_SUBTYPE_SH7751R is not set
130# CONFIG_CPU_SUBTYPE_SH7760 is not set
131# CONFIG_CPU_SUBTYPE_SH4_202 is not set
132# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
133# CONFIG_CPU_SUBTYPE_ST40GX1 is not set
134# CONFIG_CPU_SUBTYPE_SH7770 is not set
135CONFIG_CPU_SUBTYPE_SH7780=y
136# CONFIG_CPU_SUBTYPE_SH7785 is not set
137# CONFIG_CPU_SUBTYPE_SH73180 is not set
138# CONFIG_CPU_SUBTYPE_SH7343 is not set
139# CONFIG_CPU_SUBTYPE_SH7722 is not set
140
141#
142# Memory management options
143#
144CONFIG_QUICKLIST=y
145CONFIG_MMU=y
146CONFIG_PAGE_OFFSET=0x80000000
147CONFIG_MEMORY_START=0x08000000
148CONFIG_MEMORY_SIZE=0x08000000
149# CONFIG_32BIT is not set
150CONFIG_VSYSCALL=y
151CONFIG_ARCH_FLATMEM_ENABLE=y
152CONFIG_ARCH_SPARSEMEM_ENABLE=y
153CONFIG_ARCH_SPARSEMEM_DEFAULT=y
154CONFIG_MAX_ACTIVE_REGIONS=1
155CONFIG_ARCH_POPULATES_NODE_MAP=y
156CONFIG_ARCH_SELECT_MEMORY_MODEL=y
157CONFIG_PAGE_SIZE_4KB=y
158# CONFIG_PAGE_SIZE_8KB is not set
159# CONFIG_PAGE_SIZE_64KB is not set
160CONFIG_HUGETLB_PAGE_SIZE_64K=y
161# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
162# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
163# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set
164# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set
165CONFIG_SELECT_MEMORY_MODEL=y
166CONFIG_FLATMEM_MANUAL=y
167# CONFIG_DISCONTIGMEM_MANUAL is not set
168# CONFIG_SPARSEMEM_MANUAL is not set
169CONFIG_FLATMEM=y
170CONFIG_FLAT_NODE_MEM_MAP=y
171CONFIG_SPARSEMEM_STATIC=y
172CONFIG_SPLIT_PTLOCK_CPUS=4
173# CONFIG_RESOURCES_64BIT is not set
174CONFIG_ZONE_DMA_FLAG=0
175CONFIG_NR_QUICK=2
176
177#
178# Cache configuration
179#
180# CONFIG_SH_DIRECT_MAPPED is not set
181# CONFIG_SH_WRITETHROUGH is not set
182# CONFIG_SH_OCRAM is not set
183
184#
185# Processor features
186#
187CONFIG_CPU_LITTLE_ENDIAN=y
188# CONFIG_CPU_BIG_ENDIAN is not set
189CONFIG_SH_FPU=y
190# CONFIG_SH_DSP is not set
191CONFIG_SH_STORE_QUEUES=y
192CONFIG_SPECULATIVE_EXECUTION=y
193CONFIG_CPU_HAS_INTEVT=y
194CONFIG_CPU_HAS_INTC2_IRQ=y
195CONFIG_CPU_HAS_SR_RB=y
196
197#
198# Board support
199#
200# CONFIG_SH_7780_SOLUTION_ENGINE is not set
201CONFIG_SH_HIGHLANDER=y
202# CONFIG_SH_R7780RP is not set
203CONFIG_SH_R7780MP=y
204# CONFIG_SH_R7785RP is not set
205
206#
207# Timer and clock configuration
208#
209CONFIG_SH_TMU=y
210CONFIG_SH_TIMER_IRQ=28
211CONFIG_SH_PCLK_FREQ=32000000
212# CONFIG_TICK_ONESHOT is not set
213# CONFIG_NO_HZ is not set
214# CONFIG_HIGH_RES_TIMERS is not set
215
216#
217# CPU Frequency scaling
218#
219# CONFIG_CPU_FREQ is not set
220
221#
222# DMA support
223#
224# CONFIG_SH_DMA is not set
225
226#
227# Companion Chips
228#
229# CONFIG_HD6446X_SERIES is not set
230
231#
232# Additional SuperH Device Drivers
233#
234# CONFIG_HEARTBEAT is not set
235CONFIG_PUSH_SWITCH=y
236
237#
238# Kernel features
239#
240# CONFIG_HZ_100 is not set
241CONFIG_HZ_250=y
242# CONFIG_HZ_300 is not set
243# CONFIG_HZ_1000 is not set
244CONFIG_HZ=250
245CONFIG_KEXEC=y
246# CONFIG_CRASH_DUMP is not set
247# CONFIG_SMP is not set
248# CONFIG_PREEMPT_NONE is not set
249# CONFIG_PREEMPT_VOLUNTARY is not set
250CONFIG_PREEMPT=y
251CONFIG_PREEMPT_BKL=y
252
253#
254# Boot options
255#
256CONFIG_ZERO_PAGE_OFFSET=0x00001000
257CONFIG_BOOT_LINK_OFFSET=0x00800000
258# CONFIG_UBC_WAKEUP is not set
259CONFIG_CMDLINE_BOOL=y
260CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1"
261
262#
263# Bus options
264#
265CONFIG_PCI=y
266CONFIG_SH_PCIDMA_NONCOHERENT=y
267CONFIG_PCI_AUTO=y
268CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
269# CONFIG_ARCH_SUPPORTS_MSI is not set
270# CONFIG_PCI_DEBUG is not set
271
272#
273# PCCARD (PCMCIA/CardBus) support
274#
275# CONFIG_PCCARD is not set
276# CONFIG_HOTPLUG_PCI is not set
277
278#
279# Executable file formats
280#
281CONFIG_BINFMT_ELF=y
282# CONFIG_BINFMT_MISC is not set
283
284#
285# Power management options (EXPERIMENTAL)
286#
287# CONFIG_PM is not set
288
289#
290# Networking
291#
292CONFIG_NET=y
293
294#
295# Networking options
296#
297CONFIG_PACKET=y
298# CONFIG_PACKET_MMAP is not set
299CONFIG_UNIX=y
300CONFIG_XFRM=y
301# CONFIG_XFRM_USER is not set
302# CONFIG_XFRM_SUB_POLICY is not set
303# CONFIG_XFRM_MIGRATE is not set
304# CONFIG_NET_KEY is not set
305CONFIG_INET=y
306# CONFIG_IP_MULTICAST is not set
307CONFIG_IP_ADVANCED_ROUTER=y
308CONFIG_ASK_IP_FIB_HASH=y
309# CONFIG_IP_FIB_TRIE is not set
310CONFIG_IP_FIB_HASH=y
311# CONFIG_IP_MULTIPLE_TABLES is not set
312# CONFIG_IP_ROUTE_MULTIPATH is not set
313# CONFIG_IP_ROUTE_VERBOSE is not set
314CONFIG_IP_PNP=y
315CONFIG_IP_PNP_DHCP=y
316# CONFIG_IP_PNP_BOOTP is not set
317# CONFIG_IP_PNP_RARP is not set
318# CONFIG_NET_IPIP is not set
319# CONFIG_NET_IPGRE is not set
320# CONFIG_ARPD is not set
321# CONFIG_SYN_COOKIES is not set
322# CONFIG_INET_AH is not set
323# CONFIG_INET_ESP is not set
324# CONFIG_INET_IPCOMP is not set
325# CONFIG_INET_XFRM_TUNNEL is not set
326# CONFIG_INET_TUNNEL is not set
327CONFIG_INET_XFRM_MODE_TRANSPORT=y
328CONFIG_INET_XFRM_MODE_TUNNEL=y
329CONFIG_INET_XFRM_MODE_BEET=y
330CONFIG_INET_DIAG=y
331CONFIG_INET_TCP_DIAG=y
332# CONFIG_TCP_CONG_ADVANCED is not set
333CONFIG_TCP_CONG_CUBIC=y
334CONFIG_DEFAULT_TCP_CONG="cubic"
335# CONFIG_TCP_MD5SIG is not set
336# CONFIG_IPV6 is not set
337# CONFIG_INET6_XFRM_TUNNEL is not set
338# CONFIG_INET6_TUNNEL is not set
339# CONFIG_NETWORK_SECMARK is not set
340# CONFIG_NETFILTER is not set
341# CONFIG_IP_DCCP is not set
342# CONFIG_IP_SCTP is not set
343# CONFIG_TIPC is not set
344# CONFIG_ATM is not set
345CONFIG_BRIDGE=m
346# CONFIG_VLAN_8021Q is not set
347# CONFIG_DECNET is not set
348CONFIG_LLC=m
349# CONFIG_LLC2 is not set
350# CONFIG_IPX is not set
351# CONFIG_ATALK is not set
352# CONFIG_X25 is not set
353# CONFIG_LAPB is not set
354# CONFIG_ECONET is not set
355# CONFIG_WAN_ROUTER is not set
356
357#
358# QoS and/or fair queueing
359#
360# CONFIG_NET_SCHED is not set
361
362#
363# Network testing
364#
365# CONFIG_NET_PKTGEN is not set
366# CONFIG_HAMRADIO is not set
367# CONFIG_IRDA is not set
368# CONFIG_BT is not set
369# CONFIG_AF_RXRPC is not set
370
371#
372# Wireless
373#
374# CONFIG_CFG80211 is not set
375CONFIG_WIRELESS_EXT=y
376# CONFIG_MAC80211 is not set
377# CONFIG_IEEE80211 is not set
378# CONFIG_RFKILL is not set
379
380#
381# Device Drivers
382#
383
384#
385# Generic Driver Options
386#
387CONFIG_STANDALONE=y
388CONFIG_PREVENT_FIRMWARE_BUILD=y
389CONFIG_FW_LOADER=m
390# CONFIG_DEBUG_DRIVER is not set
391# CONFIG_DEBUG_DEVRES is not set
392# CONFIG_SYS_HYPERVISOR is not set
393
394#
395# Connector - unified userspace <-> kernelspace linker
396#
397# CONFIG_CONNECTOR is not set
398# CONFIG_MTD is not set
399
400#
401# Parallel port support
402#
403# CONFIG_PARPORT is not set
404
405#
406# Plug and Play support
407#
408# CONFIG_PNPACPI is not set
409
410#
411# Block devices
412#
413# CONFIG_BLK_CPQ_DA is not set
414# CONFIG_BLK_CPQ_CISS_DA is not set
415# CONFIG_BLK_DEV_DAC960 is not set
416# CONFIG_BLK_DEV_UMEM is not set
417# CONFIG_BLK_DEV_COW_COMMON is not set
418# CONFIG_BLK_DEV_LOOP 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=4096
424CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
425# CONFIG_CDROM_PKTCDVD is not set
426# CONFIG_ATA_OVER_ETH is not set
427
428#
429# Misc devices
430#
431# CONFIG_PHANTOM is not set
432# CONFIG_SGI_IOC4 is not set
433# CONFIG_TIFM_CORE is not set
434# CONFIG_BLINK is not set
435# CONFIG_IDE is not set
436
437#
438# SCSI device support
439#
440# CONFIG_RAID_ATTRS is not set
441CONFIG_SCSI=y
442# CONFIG_SCSI_TGT is not set
443# CONFIG_SCSI_NETLINK is not set
444CONFIG_SCSI_PROC_FS=y
445
446#
447# SCSI support type (disk, tape, CD-ROM)
448#
449CONFIG_BLK_DEV_SD=y
450# CONFIG_CHR_DEV_ST is not set
451# CONFIG_CHR_DEV_OSST is not set
452# CONFIG_BLK_DEV_SR is not set
453CONFIG_CHR_DEV_SG=m
454# CONFIG_CHR_DEV_SCH is not set
455
456#
457# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
458#
459# CONFIG_SCSI_MULTI_LUN is not set
460# CONFIG_SCSI_CONSTANTS is not set
461# CONFIG_SCSI_LOGGING is not set
462# CONFIG_SCSI_SCAN_ASYNC is not set
463CONFIG_SCSI_WAIT_SCAN=m
464
465#
466# SCSI Transports
467#
468# CONFIG_SCSI_SPI_ATTRS is not set
469# CONFIG_SCSI_FC_ATTRS is not set
470# CONFIG_SCSI_ISCSI_ATTRS is not set
471# CONFIG_SCSI_SAS_ATTRS is not set
472# CONFIG_SCSI_SAS_LIBSAS is not set
473
474#
475# SCSI low-level drivers
476#
477# CONFIG_ISCSI_TCP is not set
478# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
479# CONFIG_SCSI_3W_9XXX is not set
480# CONFIG_SCSI_ACARD is not set
481# CONFIG_SCSI_AACRAID is not set
482# CONFIG_SCSI_AIC7XXX is not set
483# CONFIG_SCSI_AIC7XXX_OLD is not set
484# CONFIG_SCSI_AIC79XX is not set
485# CONFIG_SCSI_AIC94XX is not set
486# CONFIG_SCSI_DPT_I2O is not set
487# CONFIG_SCSI_ARCMSR is not set
488# CONFIG_MEGARAID_NEWGEN is not set
489# CONFIG_MEGARAID_LEGACY is not set
490# CONFIG_MEGARAID_SAS is not set
491# CONFIG_SCSI_HPTIOP is not set
492# CONFIG_SCSI_DMX3191D is not set
493# CONFIG_SCSI_FUTURE_DOMAIN is not set
494# CONFIG_SCSI_IPS is not set
495# CONFIG_SCSI_INITIO is not set
496# CONFIG_SCSI_INIA100 is not set
497# CONFIG_SCSI_STEX is not set
498# CONFIG_SCSI_SYM53C8XX_2 is not set
499# CONFIG_SCSI_IPR is not set
500# CONFIG_SCSI_QLOGIC_1280 is not set
501# CONFIG_SCSI_QLA_FC is not set
502# CONFIG_SCSI_QLA_ISCSI is not set
503# CONFIG_SCSI_LPFC is not set
504# CONFIG_SCSI_DC395x is not set
505# CONFIG_SCSI_DC390T is not set
506# CONFIG_SCSI_NSP32 is not set
507# CONFIG_SCSI_DEBUG is not set
508# CONFIG_SCSI_SRP is not set
509CONFIG_ATA=y
510# CONFIG_ATA_NONSTANDARD is not set
511# CONFIG_SATA_AHCI is not set
512# CONFIG_SATA_SVW is not set
513# CONFIG_ATA_PIIX is not set
514# CONFIG_SATA_MV is not set
515# CONFIG_SATA_NV is not set
516# CONFIG_PDC_ADMA is not set
517# CONFIG_SATA_QSTOR is not set
518# CONFIG_SATA_PROMISE is not set
519# CONFIG_SATA_SX4 is not set
520CONFIG_SATA_SIL=y
521# CONFIG_SATA_SIL24 is not set
522# CONFIG_SATA_SIS is not set
523# CONFIG_SATA_ULI is not set
524# CONFIG_SATA_VIA is not set
525# CONFIG_SATA_VITESSE is not set
526# CONFIG_SATA_INIC162X is not set
527# CONFIG_PATA_ALI is not set
528# CONFIG_PATA_AMD is not set
529# CONFIG_PATA_ARTOP is not set
530# CONFIG_PATA_ATIIXP is not set
531# CONFIG_PATA_CMD640_PCI is not set
532# CONFIG_PATA_CMD64X is not set
533# CONFIG_PATA_CS5520 is not set
534# CONFIG_PATA_CS5530 is not set
535# CONFIG_PATA_CYPRESS is not set
536# CONFIG_PATA_EFAR is not set
537# CONFIG_ATA_GENERIC is not set
538# CONFIG_PATA_HPT366 is not set
539# CONFIG_PATA_HPT37X is not set
540# CONFIG_PATA_HPT3X2N is not set
541# CONFIG_PATA_HPT3X3 is not set
542# CONFIG_PATA_IT821X is not set
543# CONFIG_PATA_IT8213 is not set
544# CONFIG_PATA_JMICRON is not set
545# CONFIG_PATA_TRIFLEX is not set
546# CONFIG_PATA_MARVELL is not set
547# CONFIG_PATA_MPIIX is not set
548# CONFIG_PATA_OLDPIIX is not set
549# CONFIG_PATA_NETCELL is not set
550# CONFIG_PATA_NS87410 is not set
551# CONFIG_PATA_OPTI is not set
552# CONFIG_PATA_OPTIDMA is not set
553# CONFIG_PATA_PDC_OLD is not set
554# CONFIG_PATA_RADISYS is not set
555# CONFIG_PATA_RZ1000 is not set
556# CONFIG_PATA_SC1200 is not set
557# CONFIG_PATA_SERVERWORKS is not set
558# CONFIG_PATA_PDC2027X is not set
559# CONFIG_PATA_SIL680 is not set
560# CONFIG_PATA_SIS is not set
561# CONFIG_PATA_VIA is not set
562# CONFIG_PATA_WINBOND is not set
563CONFIG_PATA_PLATFORM=y
564
565#
566# Multi-device support (RAID and LVM)
567#
568# CONFIG_MD is not set
569
570#
571# Fusion MPT device support
572#
573# CONFIG_FUSION is not set
574# CONFIG_FUSION_SPI is not set
575# CONFIG_FUSION_FC is not set
576# CONFIG_FUSION_SAS is not set
577
578#
579# IEEE 1394 (FireWire) support
580#
581# CONFIG_FIREWIRE is not set
582# CONFIG_IEEE1394 is not set
583
584#
585# I2O device support
586#
587# CONFIG_I2O is not set
588
589#
590# Network device support
591#
592CONFIG_NETDEVICES=y
593# CONFIG_DUMMY is not set
594# CONFIG_BONDING is not set
595# CONFIG_EQUALIZER is not set
596# CONFIG_TUN is not set
597# CONFIG_ARCNET is not set
598# CONFIG_PHYLIB is not set
599
600#
601# Ethernet (10 or 100Mbit)
602#
603CONFIG_NET_ETHERNET=y
604CONFIG_MII=y
605# CONFIG_STNIC is not set
606# CONFIG_HAPPYMEAL is not set
607# CONFIG_SUNGEM is not set
608# CONFIG_CASSINI is not set
609# CONFIG_NET_VENDOR_3COM is not set
610# CONFIG_SMC91X is not set
611
612#
613# Tulip family network device support
614#
615# CONFIG_NET_TULIP is not set
616# CONFIG_HP100 is not set
617CONFIG_NET_PCI=y
618CONFIG_PCNET32=m
619# CONFIG_PCNET32_NAPI is not set
620# CONFIG_AMD8111_ETH is not set
621# CONFIG_ADAPTEC_STARFIRE is not set
622# CONFIG_B44 is not set
623# CONFIG_FORCEDETH is not set
624# CONFIG_DGRS is not set
625# CONFIG_EEPRO100 is not set
626# CONFIG_E100 is not set
627# CONFIG_FEALNX is not set
628# CONFIG_NATSEMI is not set
629# CONFIG_NE2K_PCI is not set
630CONFIG_8139CP=m
631CONFIG_8139TOO=m
632# CONFIG_8139TOO_PIO is not set
633# CONFIG_8139TOO_TUNE_TWISTER is not set
634CONFIG_8139TOO_8129=y
635# CONFIG_8139_OLD_RX_RESET is not set
636# CONFIG_SIS900 is not set
637# CONFIG_EPIC100 is not set
638# CONFIG_SUNDANCE is not set
639# CONFIG_TLAN is not set
640CONFIG_VIA_RHINE=m
641CONFIG_VIA_RHINE_MMIO=y
642# CONFIG_VIA_RHINE_NAPI is not set
643# CONFIG_SC92031 is not set
644CONFIG_NETDEV_1000=y
645# CONFIG_ACENIC is not set
646# CONFIG_DL2K is not set
647CONFIG_E1000=m
648# CONFIG_E1000_NAPI is not set
649# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
650# CONFIG_NS83820 is not set
651# CONFIG_HAMACHI is not set
652# CONFIG_YELLOWFIN is not set
653CONFIG_R8169=y
654# CONFIG_R8169_NAPI is not set
655# CONFIG_SIS190 is not set
656# CONFIG_SKGE is not set
657# CONFIG_SKY2 is not set
658# CONFIG_SK98LIN is not set
659# CONFIG_VIA_VELOCITY is not set
660# CONFIG_TIGON3 is not set
661# CONFIG_BNX2 is not set
662# CONFIG_QLA3XXX is not set
663# CONFIG_ATL1 is not set
664CONFIG_NETDEV_10000=y
665# CONFIG_CHELSIO_T1 is not set
666# CONFIG_CHELSIO_T3 is not set
667# CONFIG_IXGB is not set
668# CONFIG_S2IO is not set
669# CONFIG_MYRI10GE is not set
670# CONFIG_NETXEN_NIC is not set
671# CONFIG_MLX4_CORE is not set
672# CONFIG_TR is not set
673
674#
675# Wireless LAN
676#
677# CONFIG_WLAN_PRE80211 is not set
678# CONFIG_WLAN_80211 is not set
679# CONFIG_WAN is not set
680# CONFIG_FDDI is not set
681# CONFIG_HIPPI is not set
682# CONFIG_PPP is not set
683# CONFIG_SLIP is not set
684# CONFIG_NET_FC is not set
685# CONFIG_SHAPER is not set
686# CONFIG_NETCONSOLE is not set
687# CONFIG_NETPOLL is not set
688# CONFIG_NET_POLL_CONTROLLER is not set
689
690#
691# ISDN subsystem
692#
693# CONFIG_ISDN is not set
694
695#
696# Telephony Support
697#
698# CONFIG_PHONE is not set
699
700#
701# Input device support
702#
703CONFIG_INPUT=y
704# CONFIG_INPUT_FF_MEMLESS is not set
705
706#
707# Userland interfaces
708#
709CONFIG_INPUT_MOUSEDEV=y
710# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
711CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
712CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
713# CONFIG_INPUT_JOYDEV is not set
714# CONFIG_INPUT_TSDEV is not set
715# CONFIG_INPUT_EVDEV is not set
716# CONFIG_INPUT_EVBUG is not set
717
718#
719# Input Device Drivers
720#
721CONFIG_INPUT_KEYBOARD=y
722CONFIG_KEYBOARD_ATKBD=y
723# CONFIG_KEYBOARD_SUNKBD is not set
724# CONFIG_KEYBOARD_LKKBD is not set
725# CONFIG_KEYBOARD_XTKBD is not set
726# CONFIG_KEYBOARD_NEWTON is not set
727# CONFIG_KEYBOARD_STOWAWAY is not set
728# CONFIG_INPUT_MOUSE is not set
729# CONFIG_INPUT_JOYSTICK is not set
730# CONFIG_INPUT_TABLET is not set
731# CONFIG_INPUT_TOUCHSCREEN is not set
732# CONFIG_INPUT_MISC is not set
733
734#
735# Hardware I/O ports
736#
737CONFIG_SERIO=y
738# CONFIG_SERIO_I8042 is not set
739# CONFIG_SERIO_SERPORT is not set
740# CONFIG_SERIO_PCIPS2 is not set
741CONFIG_SERIO_LIBPS2=y
742# CONFIG_SERIO_RAW is not set
743# CONFIG_GAMEPORT is not set
744
745#
746# Character devices
747#
748# CONFIG_VT is not set
749# CONFIG_SERIAL_NONSTANDARD is not set
750
751#
752# Serial drivers
753#
754# CONFIG_SERIAL_8250 is not set
755
756#
757# Non-8250 serial port support
758#
759CONFIG_SERIAL_SH_SCI=y
760CONFIG_SERIAL_SH_SCI_NR_UARTS=2
761CONFIG_SERIAL_SH_SCI_CONSOLE=y
762CONFIG_SERIAL_CORE=y
763CONFIG_SERIAL_CORE_CONSOLE=y
764# CONFIG_SERIAL_JSM is not set
765CONFIG_UNIX98_PTYS=y
766CONFIG_LEGACY_PTYS=y
767CONFIG_LEGACY_PTY_COUNT=256
768
769#
770# IPMI
771#
772# CONFIG_IPMI_HANDLER is not set
773# CONFIG_WATCHDOG is not set
774CONFIG_HW_RANDOM=y
775# CONFIG_R3964 is not set
776# CONFIG_APPLICOM is not set
777# CONFIG_DRM is not set
778# CONFIG_RAW_DRIVER is not set
779
780#
781# TPM devices
782#
783# CONFIG_TCG_TPM is not set
784CONFIG_DEVPORT=y
785# CONFIG_I2C is not set
786
787#
788# SPI support
789#
790# CONFIG_SPI is not set
791# CONFIG_SPI_MASTER is not set
792
793#
794# Dallas's 1-wire bus
795#
796# CONFIG_W1 is not set
797CONFIG_HWMON=y
798# CONFIG_HWMON_VID is not set
799# CONFIG_SENSORS_ABITUGURU is not set
800# CONFIG_SENSORS_F71805F is not set
801# CONFIG_SENSORS_PC87427 is not set
802# CONFIG_SENSORS_SMSC47M1 is not set
803# CONFIG_SENSORS_SMSC47B397 is not set
804# CONFIG_SENSORS_VT1211 is not set
805# CONFIG_SENSORS_W83627HF is not set
806# CONFIG_HWMON_DEBUG_CHIP is not set
807
808#
809# Multifunction device drivers
810#
811# CONFIG_MFD_SM501 is not set
812
813#
814# Multimedia devices
815#
816# CONFIG_VIDEO_DEV is not set
817# CONFIG_DVB_CORE is not set
818CONFIG_DAB=y
819
820#
821# Graphics support
822#
823# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
824
825#
826# Display device support
827#
828# CONFIG_DISPLAY_SUPPORT is not set
829# CONFIG_VGASTATE is not set
830# CONFIG_FB is not set
831
832#
833# Sound
834#
835CONFIG_SOUND=m
836
837#
838# Advanced Linux Sound Architecture
839#
840# CONFIG_SND is not set
841
842#
843# Open Sound System
844#
845CONFIG_SOUND_PRIME=m
846# CONFIG_OSS_OBSOLETE is not set
847# CONFIG_SOUND_TRIDENT is not set
848# CONFIG_SOUND_MSNDCLAS is not set
849# CONFIG_SOUND_MSNDPIN is not set
850
851#
852# HID Devices
853#
854CONFIG_HID=y
855# CONFIG_HID_DEBUG is not set
856
857#
858# USB support
859#
860CONFIG_USB_ARCH_HAS_HCD=y
861CONFIG_USB_ARCH_HAS_OHCI=y
862CONFIG_USB_ARCH_HAS_EHCI=y
863# CONFIG_USB is not set
864
865#
866# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
867#
868
869#
870# USB Gadget Support
871#
872# CONFIG_USB_GADGET is not set
873# CONFIG_MMC is not set
874
875#
876# LED devices
877#
878# CONFIG_NEW_LEDS is not set
879
880#
881# LED drivers
882#
883
884#
885# LED Triggers
886#
887
888#
889# InfiniBand support
890#
891# CONFIG_INFINIBAND is not set
892
893#
894# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
895#
896
897#
898# Real Time Clock
899#
900CONFIG_RTC_LIB=y
901CONFIG_RTC_CLASS=y
902CONFIG_RTC_HCTOSYS=y
903CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
904# CONFIG_RTC_DEBUG is not set
905
906#
907# RTC interfaces
908#
909CONFIG_RTC_INTF_SYSFS=y
910CONFIG_RTC_INTF_PROC=y
911CONFIG_RTC_INTF_DEV=y
912# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
913# CONFIG_RTC_DRV_TEST is not set
914
915#
916# I2C RTC drivers
917#
918
919#
920# SPI RTC drivers
921#
922
923#
924# Platform RTC drivers
925#
926# CONFIG_RTC_DRV_DS1553 is not set
927# CONFIG_RTC_DRV_DS1742 is not set
928# CONFIG_RTC_DRV_M48T86 is not set
929# CONFIG_RTC_DRV_V3020 is not set
930
931#
932# on-CPU RTC drivers
933#
934CONFIG_RTC_DRV_SH=y
935
936#
937# DMA Engine support
938#
939# CONFIG_DMA_ENGINE is not set
940
941#
942# DMA Clients
943#
944
945#
946# DMA Devices
947#
948
949#
950# File systems
951#
952CONFIG_EXT2_FS=y
953# CONFIG_EXT2_FS_XATTR is not set
954# CONFIG_EXT2_FS_XIP is not set
955CONFIG_EXT3_FS=y
956CONFIG_EXT3_FS_XATTR=y
957# CONFIG_EXT3_FS_POSIX_ACL is not set
958# CONFIG_EXT3_FS_SECURITY is not set
959# CONFIG_EXT4DEV_FS is not set
960CONFIG_JBD=y
961# CONFIG_JBD_DEBUG is not set
962CONFIG_FS_MBCACHE=y
963# CONFIG_REISERFS_FS is not set
964# CONFIG_JFS_FS is not set
965CONFIG_FS_POSIX_ACL=y
966# CONFIG_XFS_FS is not set
967# CONFIG_GFS2_FS is not set
968# CONFIG_OCFS2_FS is not set
969CONFIG_MINIX_FS=y
970# CONFIG_ROMFS_FS is not set
971CONFIG_INOTIFY=y
972CONFIG_INOTIFY_USER=y
973# CONFIG_QUOTA is not set
974CONFIG_DNOTIFY=y
975# CONFIG_AUTOFS_FS is not set
976# CONFIG_AUTOFS4_FS is not set
977CONFIG_FUSE_FS=m
978
979#
980# CD-ROM/DVD Filesystems
981#
982# CONFIG_ISO9660_FS is not set
983# CONFIG_UDF_FS is not set
984
985#
986# DOS/FAT/NT Filesystems
987#
988CONFIG_FAT_FS=y
989CONFIG_MSDOS_FS=y
990CONFIG_VFAT_FS=y
991CONFIG_FAT_DEFAULT_CODEPAGE=437
992CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
993CONFIG_NTFS_FS=y
994# CONFIG_NTFS_DEBUG is not set
995CONFIG_NTFS_RW=y
996
997#
998# Pseudo filesystems
999#
1000CONFIG_PROC_FS=y
1001CONFIG_PROC_KCORE=y
1002CONFIG_PROC_SYSCTL=y
1003CONFIG_SYSFS=y
1004CONFIG_TMPFS=y
1005# CONFIG_TMPFS_POSIX_ACL is not set
1006CONFIG_HUGETLBFS=y
1007CONFIG_HUGETLB_PAGE=y
1008CONFIG_RAMFS=y
1009CONFIG_CONFIGFS_FS=m
1010
1011#
1012# Miscellaneous filesystems
1013#
1014# CONFIG_ADFS_FS is not set
1015# CONFIG_AFFS_FS is not set
1016# CONFIG_HFS_FS is not set
1017# CONFIG_HFSPLUS_FS is not set
1018# CONFIG_BEFS_FS is not set
1019# CONFIG_BFS_FS is not set
1020# CONFIG_EFS_FS is not set
1021# CONFIG_CRAMFS is not set
1022# CONFIG_VXFS_FS is not set
1023# CONFIG_HPFS_FS is not set
1024# CONFIG_QNX4FS_FS is not set
1025# CONFIG_SYSV_FS is not set
1026# CONFIG_UFS_FS is not set
1027
1028#
1029# Network File Systems
1030#
1031CONFIG_NFS_FS=y
1032CONFIG_NFS_V3=y
1033# CONFIG_NFS_V3_ACL is not set
1034CONFIG_NFS_V4=y
1035# CONFIG_NFS_DIRECTIO is not set
1036CONFIG_NFSD=y
1037CONFIG_NFSD_V3=y
1038# CONFIG_NFSD_V3_ACL is not set
1039CONFIG_NFSD_V4=y
1040CONFIG_NFSD_TCP=y
1041CONFIG_ROOT_NFS=y
1042CONFIG_LOCKD=y
1043CONFIG_LOCKD_V4=y
1044CONFIG_EXPORTFS=y
1045CONFIG_NFS_COMMON=y
1046CONFIG_SUNRPC=y
1047CONFIG_SUNRPC_GSS=y
1048# CONFIG_SUNRPC_BIND34 is not set
1049CONFIG_RPCSEC_GSS_KRB5=y
1050# CONFIG_RPCSEC_GSS_SPKM3 is not set
1051# CONFIG_SMB_FS is not set
1052# CONFIG_CIFS is not set
1053# CONFIG_NCP_FS is not set
1054# CONFIG_CODA_FS is not set
1055# CONFIG_AFS_FS is not set
1056# CONFIG_9P_FS is not set
1057
1058#
1059# Partition Types
1060#
1061# CONFIG_PARTITION_ADVANCED is not set
1062CONFIG_MSDOS_PARTITION=y
1063
1064#
1065# Native Language Support
1066#
1067CONFIG_NLS=y
1068CONFIG_NLS_DEFAULT="iso8859-1"
1069CONFIG_NLS_CODEPAGE_437=y
1070# CONFIG_NLS_CODEPAGE_737 is not set
1071# CONFIG_NLS_CODEPAGE_775 is not set
1072# CONFIG_NLS_CODEPAGE_850 is not set
1073# CONFIG_NLS_CODEPAGE_852 is not set
1074# CONFIG_NLS_CODEPAGE_855 is not set
1075# CONFIG_NLS_CODEPAGE_857 is not set
1076# CONFIG_NLS_CODEPAGE_860 is not set
1077# CONFIG_NLS_CODEPAGE_861 is not set
1078# CONFIG_NLS_CODEPAGE_862 is not set
1079# CONFIG_NLS_CODEPAGE_863 is not set
1080# CONFIG_NLS_CODEPAGE_864 is not set
1081# CONFIG_NLS_CODEPAGE_865 is not set
1082# CONFIG_NLS_CODEPAGE_866 is not set
1083# CONFIG_NLS_CODEPAGE_869 is not set
1084# CONFIG_NLS_CODEPAGE_936 is not set
1085# CONFIG_NLS_CODEPAGE_950 is not set
1086CONFIG_NLS_CODEPAGE_932=y
1087# CONFIG_NLS_CODEPAGE_949 is not set
1088# CONFIG_NLS_CODEPAGE_874 is not set
1089# CONFIG_NLS_ISO8859_8 is not set
1090# CONFIG_NLS_CODEPAGE_1250 is not set
1091# CONFIG_NLS_CODEPAGE_1251 is not set
1092# CONFIG_NLS_ASCII is not set
1093CONFIG_NLS_ISO8859_1=y
1094# CONFIG_NLS_ISO8859_2 is not set
1095# CONFIG_NLS_ISO8859_3 is not set
1096# CONFIG_NLS_ISO8859_4 is not set
1097# CONFIG_NLS_ISO8859_5 is not set
1098# CONFIG_NLS_ISO8859_6 is not set
1099# CONFIG_NLS_ISO8859_7 is not set
1100# CONFIG_NLS_ISO8859_9 is not set
1101# CONFIG_NLS_ISO8859_13 is not set
1102# CONFIG_NLS_ISO8859_14 is not set
1103# CONFIG_NLS_ISO8859_15 is not set
1104# CONFIG_NLS_KOI8_R is not set
1105# CONFIG_NLS_KOI8_U is not set
1106# CONFIG_NLS_UTF8 is not set
1107
1108#
1109# Distributed Lock Manager
1110#
1111# CONFIG_DLM is not set
1112
1113#
1114# Profiling support
1115#
1116CONFIG_PROFILING=y
1117CONFIG_OPROFILE=m
1118
1119#
1120# Kernel hacking
1121#
1122CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1123# CONFIG_PRINTK_TIME is not set
1124CONFIG_ENABLE_MUST_CHECK=y
1125CONFIG_MAGIC_SYSRQ=y
1126# CONFIG_UNUSED_SYMBOLS is not set
1127CONFIG_DEBUG_FS=y
1128# CONFIG_HEADERS_CHECK is not set
1129CONFIG_DEBUG_KERNEL=y
1130# CONFIG_DEBUG_SHIRQ is not set
1131CONFIG_DETECT_SOFTLOCKUP=y
1132# CONFIG_SCHEDSTATS is not set
1133# CONFIG_TIMER_STATS is not set
1134# CONFIG_DEBUG_SLAB is not set
1135# CONFIG_DEBUG_PREEMPT is not set
1136# CONFIG_DEBUG_SPINLOCK is not set
1137# CONFIG_DEBUG_MUTEXES is not set
1138# CONFIG_DEBUG_LOCK_ALLOC is not set
1139# CONFIG_PROVE_LOCKING is not set
1140# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1141# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1142# CONFIG_DEBUG_KOBJECT is not set
1143CONFIG_DEBUG_BUGVERBOSE=y
1144CONFIG_DEBUG_INFO=y
1145# CONFIG_DEBUG_VM is not set
1146# CONFIG_DEBUG_LIST is not set
1147# CONFIG_FRAME_POINTER is not set
1148CONFIG_FORCED_INLINING=y
1149# CONFIG_RCU_TORTURE_TEST is not set
1150# CONFIG_FAULT_INJECTION is not set
1151CONFIG_SH_STANDARD_BIOS=y
1152# CONFIG_EARLY_SCIF_CONSOLE is not set
1153CONFIG_EARLY_PRINTK=y
1154# CONFIG_DEBUG_BOOTMEM is not set
1155CONFIG_DEBUG_STACKOVERFLOW=y
1156# CONFIG_DEBUG_STACK_USAGE is not set
1157# CONFIG_4KSTACKS is not set
1158# CONFIG_SH_KGDB is not set
1159
1160#
1161# Security options
1162#
1163# CONFIG_KEYS is not set
1164# CONFIG_SECURITY is not set
1165
1166#
1167# Cryptographic options
1168#
1169CONFIG_CRYPTO=y
1170CONFIG_CRYPTO_ALGAPI=y
1171CONFIG_CRYPTO_BLKCIPHER=y
1172CONFIG_CRYPTO_HASH=y
1173CONFIG_CRYPTO_MANAGER=y
1174CONFIG_CRYPTO_HMAC=y
1175# CONFIG_CRYPTO_XCBC is not set
1176# CONFIG_CRYPTO_NULL is not set
1177# CONFIG_CRYPTO_MD4 is not set
1178CONFIG_CRYPTO_MD5=y
1179# CONFIG_CRYPTO_SHA1 is not set
1180# CONFIG_CRYPTO_SHA256 is not set
1181# CONFIG_CRYPTO_SHA512 is not set
1182# CONFIG_CRYPTO_WP512 is not set
1183# CONFIG_CRYPTO_TGR192 is not set
1184# CONFIG_CRYPTO_GF128MUL is not set
1185CONFIG_CRYPTO_ECB=m
1186CONFIG_CRYPTO_CBC=y
1187CONFIG_CRYPTO_PCBC=m
1188# CONFIG_CRYPTO_LRW is not set
1189# CONFIG_CRYPTO_CRYPTD is not set
1190CONFIG_CRYPTO_DES=y
1191# CONFIG_CRYPTO_FCRYPT is not set
1192# CONFIG_CRYPTO_BLOWFISH is not set
1193# CONFIG_CRYPTO_TWOFISH is not set
1194# CONFIG_CRYPTO_SERPENT is not set
1195# CONFIG_CRYPTO_AES is not set
1196# CONFIG_CRYPTO_CAST5 is not set
1197# CONFIG_CRYPTO_CAST6 is not set
1198# CONFIG_CRYPTO_TEA is not set
1199# CONFIG_CRYPTO_ARC4 is not set
1200# CONFIG_CRYPTO_KHAZAD is not set
1201# CONFIG_CRYPTO_ANUBIS is not set
1202# CONFIG_CRYPTO_DEFLATE is not set
1203# CONFIG_CRYPTO_MICHAEL_MIC is not set
1204# CONFIG_CRYPTO_CRC32C is not set
1205# CONFIG_CRYPTO_CAMELLIA is not set
1206# CONFIG_CRYPTO_TEST is not set
1207
1208#
1209# Hardware crypto devices
1210#
1211
1212#
1213# Library routines
1214#
1215CONFIG_BITREVERSE=y
1216# CONFIG_CRC_CCITT is not set
1217# CONFIG_CRC16 is not set
1218# CONFIG_CRC_ITU_T is not set
1219CONFIG_CRC32=y
1220# CONFIG_LIBCRC32C is not set
1221CONFIG_HAS_IOMEM=y
1222CONFIG_HAS_IOPORT=y
1223CONFIG_HAS_DMA=y
diff --git a/arch/sh/configs/r7785rp_defconfig b/arch/sh/configs/r7785rp_defconfig
index 0f5ec649da..5c29338532 100644
--- a/arch/sh/configs/r7785rp_defconfig
+++ b/arch/sh/configs/r7785rp_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.21-rc3 3# Linux kernel version: 2.6.22-rc4
4# Mon Mar 12 14:26:33 2007 4# Thu Jul 12 12:33:15 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
@@ -11,7 +11,9 @@ CONFIG_GENERIC_HWEIGHT=y
11CONFIG_GENERIC_HARDIRQS=y 11CONFIG_GENERIC_HARDIRQS=y
12CONFIG_GENERIC_IRQ_PROBE=y 12CONFIG_GENERIC_IRQ_PROBE=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
14# CONFIG_GENERIC_TIME is not set 14CONFIG_GENERIC_TIME=y
15CONFIG_GENERIC_CLOCKEVENTS=y
16CONFIG_SYS_SUPPORTS_PCI=y
15CONFIG_STACKTRACE_SUPPORT=y 17CONFIG_STACKTRACE_SUPPORT=y
16CONFIG_LOCKDEP_SUPPORT=y 18CONFIG_LOCKDEP_SUPPORT=y
17# CONFIG_ARCH_HAS_ILOG2_U32 is not set 19# CONFIG_ARCH_HAS_ILOG2_U32 is not set
@@ -43,6 +45,7 @@ CONFIG_BSD_PROCESS_ACCT=y
43# CONFIG_AUDIT is not set 45# CONFIG_AUDIT is not set
44CONFIG_IKCONFIG=y 46CONFIG_IKCONFIG=y
45CONFIG_IKCONFIG_PROC=y 47CONFIG_IKCONFIG_PROC=y
48CONFIG_LOG_BUF_SHIFT=14
46# CONFIG_SYSFS_DEPRECATED is not set 49# CONFIG_SYSFS_DEPRECATED is not set
47# CONFIG_RELAY is not set 50# CONFIG_RELAY is not set
48# CONFIG_BLK_DEV_INITRD is not set 51# CONFIG_BLK_DEV_INITRD is not set
@@ -60,13 +63,18 @@ CONFIG_BUG=y
60CONFIG_ELF_CORE=y 63CONFIG_ELF_CORE=y
61CONFIG_BASE_FULL=y 64CONFIG_BASE_FULL=y
62# CONFIG_FUTEX is not set 65# CONFIG_FUTEX is not set
66CONFIG_ANON_INODES=y
63# CONFIG_EPOLL is not set 67# CONFIG_EPOLL is not set
68CONFIG_SIGNALFD=y
69CONFIG_TIMERFD=y
70CONFIG_EVENTFD=y
64CONFIG_SHMEM=y 71CONFIG_SHMEM=y
65CONFIG_SLAB=y
66CONFIG_VM_EVENT_COUNTERS=y 72CONFIG_VM_EVENT_COUNTERS=y
73CONFIG_SLAB=y
74# CONFIG_SLUB is not set
75# CONFIG_SLOB is not set
67# CONFIG_TINY_SHMEM is not set 76# CONFIG_TINY_SHMEM is not set
68CONFIG_BASE_SMALL=0 77CONFIG_BASE_SMALL=0
69# CONFIG_SLOB is not set
70 78
71# 79#
72# Loadable module support 80# Loadable module support
@@ -102,55 +110,11 @@ CONFIG_DEFAULT_IOSCHED="noop"
102# 110#
103# System type 111# System type
104# 112#
105# CONFIG_SH_SOLUTION_ENGINE is not set
106# CONFIG_SH_7751_SOLUTION_ENGINE is not set
107# CONFIG_SH_7300_SOLUTION_ENGINE is not set
108# CONFIG_SH_7343_SOLUTION_ENGINE is not set
109# CONFIG_SH_73180_SOLUTION_ENGINE is not set
110# CONFIG_SH_7751_SYSTEMH is not set
111# CONFIG_SH_HP6XX is not set
112# CONFIG_SH_SATURN is not set
113# CONFIG_SH_DREAMCAST is not set
114# CONFIG_SH_MPC1211 is not set
115# CONFIG_SH_SH03 is not set
116# CONFIG_SH_SECUREEDGE5410 is not set
117# CONFIG_SH_HS7751RVOIP is not set
118# CONFIG_SH_7710VOIPGW is not set
119# CONFIG_SH_RTS7751R2D is not set
120CONFIG_SH_HIGHLANDER=y
121# CONFIG_SH_EDOSK7705 is not set
122# CONFIG_SH_SH4202_MICRODEV is not set
123# CONFIG_SH_LANDISK is not set
124# CONFIG_SH_TITAN is not set
125# CONFIG_SH_SHMIN is not set
126# CONFIG_SH_7206_SOLUTION_ENGINE is not set
127# CONFIG_SH_7619_SOLUTION_ENGINE is not set
128# CONFIG_SH_UNKNOWN is not set
129# CONFIG_SH_R7780RP is not set
130# CONFIG_SH_R7780MP is not set
131CONFIG_SH_R7785RP=y
132
133#
134# Processor selection
135#
136CONFIG_CPU_SH4=y 113CONFIG_CPU_SH4=y
137CONFIG_CPU_SH4A=y 114CONFIG_CPU_SH4A=y
138CONFIG_CPU_SHX2=y 115CONFIG_CPU_SHX2=y
139
140#
141# SH-2 Processor Support
142#
143# CONFIG_CPU_SUBTYPE_SH7604 is not set
144# CONFIG_CPU_SUBTYPE_SH7619 is not set 116# CONFIG_CPU_SUBTYPE_SH7619 is not set
145
146#
147# SH-2A Processor Support
148#
149# CONFIG_CPU_SUBTYPE_SH7206 is not set 117# CONFIG_CPU_SUBTYPE_SH7206 is not set
150
151#
152# SH-3 Processor Support
153#
154# CONFIG_CPU_SUBTYPE_SH7300 is not set 118# CONFIG_CPU_SUBTYPE_SH7300 is not set
155# CONFIG_CPU_SUBTYPE_SH7705 is not set 119# CONFIG_CPU_SUBTYPE_SH7705 is not set
156# CONFIG_CPU_SUBTYPE_SH7706 is not set 120# CONFIG_CPU_SUBTYPE_SH7706 is not set
@@ -158,10 +122,7 @@ CONFIG_CPU_SHX2=y
158# CONFIG_CPU_SUBTYPE_SH7708 is not set 122# CONFIG_CPU_SUBTYPE_SH7708 is not set
159# CONFIG_CPU_SUBTYPE_SH7709 is not set 123# CONFIG_CPU_SUBTYPE_SH7709 is not set
160# CONFIG_CPU_SUBTYPE_SH7710 is not set 124# CONFIG_CPU_SUBTYPE_SH7710 is not set
161 125# CONFIG_CPU_SUBTYPE_SH7712 is not set
162#
163# SH-4 Processor Support
164#
165# CONFIG_CPU_SUBTYPE_SH7750 is not set 126# CONFIG_CPU_SUBTYPE_SH7750 is not set
166# CONFIG_CPU_SUBTYPE_SH7091 is not set 127# CONFIG_CPU_SUBTYPE_SH7091 is not set
167# CONFIG_CPU_SUBTYPE_SH7750R is not set 128# CONFIG_CPU_SUBTYPE_SH7750R is not set
@@ -170,23 +131,12 @@ CONFIG_CPU_SHX2=y
170# CONFIG_CPU_SUBTYPE_SH7751R is not set 131# CONFIG_CPU_SUBTYPE_SH7751R is not set
171# CONFIG_CPU_SUBTYPE_SH7760 is not set 132# CONFIG_CPU_SUBTYPE_SH7760 is not set
172# CONFIG_CPU_SUBTYPE_SH4_202 is not set 133# CONFIG_CPU_SUBTYPE_SH4_202 is not set
173
174#
175# ST40 Processor Support
176#
177# CONFIG_CPU_SUBTYPE_ST40STB1 is not set 134# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
178# CONFIG_CPU_SUBTYPE_ST40GX1 is not set 135# CONFIG_CPU_SUBTYPE_ST40GX1 is not set
179
180#
181# SH-4A Processor Support
182#
183# CONFIG_CPU_SUBTYPE_SH7770 is not set 136# CONFIG_CPU_SUBTYPE_SH7770 is not set
184# CONFIG_CPU_SUBTYPE_SH7780 is not set 137# CONFIG_CPU_SUBTYPE_SH7780 is not set
185CONFIG_CPU_SUBTYPE_SH7785=y 138CONFIG_CPU_SUBTYPE_SH7785=y
186 139# CONFIG_CPU_SUBTYPE_SHX3 is not set
187#
188# SH4AL-DSP Processor Support
189#
190# CONFIG_CPU_SUBTYPE_SH73180 is not set 140# CONFIG_CPU_SUBTYPE_SH73180 is not set
191# CONFIG_CPU_SUBTYPE_SH7343 is not set 141# CONFIG_CPU_SUBTYPE_SH7343 is not set
192# CONFIG_CPU_SUBTYPE_SH7722 is not set 142# CONFIG_CPU_SUBTYPE_SH7722 is not set
@@ -194,6 +144,7 @@ CONFIG_CPU_SUBTYPE_SH7785=y
194# 144#
195# Memory management options 145# Memory management options
196# 146#
147CONFIG_QUICKLIST=y
197CONFIG_MMU=y 148CONFIG_MMU=y
198CONFIG_PAGE_OFFSET=0x80000000 149CONFIG_PAGE_OFFSET=0x80000000
199CONFIG_MEMORY_START=0x08000000 150CONFIG_MEMORY_START=0x08000000
@@ -201,6 +152,12 @@ CONFIG_MEMORY_SIZE=0x08000000
201CONFIG_32BIT=y 152CONFIG_32BIT=y
202# CONFIG_X2TLB is not set 153# CONFIG_X2TLB is not set
203CONFIG_VSYSCALL=y 154CONFIG_VSYSCALL=y
155CONFIG_ARCH_FLATMEM_ENABLE=y
156CONFIG_ARCH_SPARSEMEM_ENABLE=y
157CONFIG_ARCH_SPARSEMEM_DEFAULT=y
158CONFIG_MAX_ACTIVE_REGIONS=1
159CONFIG_ARCH_POPULATES_NODE_MAP=y
160CONFIG_ARCH_SELECT_MEMORY_MODEL=y
204CONFIG_PAGE_SIZE_4KB=y 161CONFIG_PAGE_SIZE_4KB=y
205# CONFIG_PAGE_SIZE_8KB is not set 162# CONFIG_PAGE_SIZE_8KB is not set
206# CONFIG_PAGE_SIZE_64KB is not set 163# CONFIG_PAGE_SIZE_64KB is not set
@@ -215,17 +172,17 @@ CONFIG_FLATMEM_MANUAL=y
215# CONFIG_SPARSEMEM_MANUAL is not set 172# CONFIG_SPARSEMEM_MANUAL is not set
216CONFIG_FLATMEM=y 173CONFIG_FLATMEM=y
217CONFIG_FLAT_NODE_MEM_MAP=y 174CONFIG_FLAT_NODE_MEM_MAP=y
218# CONFIG_SPARSEMEM_STATIC is not set 175CONFIG_SPARSEMEM_STATIC=y
219CONFIG_SPLIT_PTLOCK_CPUS=4 176CONFIG_SPLIT_PTLOCK_CPUS=4
220# CONFIG_RESOURCES_64BIT is not set 177# CONFIG_RESOURCES_64BIT is not set
221CONFIG_ZONE_DMA_FLAG=0 178CONFIG_ZONE_DMA_FLAG=0
179CONFIG_NR_QUICK=2
222 180
223# 181#
224# Cache configuration 182# Cache configuration
225# 183#
226# CONFIG_SH_DIRECT_MAPPED is not set 184# CONFIG_SH_DIRECT_MAPPED is not set
227# CONFIG_SH_WRITETHROUGH is not set 185# CONFIG_SH_WRITETHROUGH is not set
228# CONFIG_SH_OCRAM is not set
229 186
230# 187#
231# Processor features 188# Processor features
@@ -241,12 +198,22 @@ CONFIG_CPU_HAS_SR_RB=y
241CONFIG_CPU_HAS_PTEA=y 198CONFIG_CPU_HAS_PTEA=y
242 199
243# 200#
201# Board support
202#
203CONFIG_SH_HIGHLANDER=y
204# CONFIG_SH_R7780RP is not set
205# CONFIG_SH_R7780MP is not set
206CONFIG_SH_R7785RP=y
207
208#
244# Timer and clock configuration 209# Timer and clock configuration
245# 210#
246CONFIG_SH_TMU=y 211CONFIG_SH_TMU=y
247CONFIG_SH_TIMER_IRQ=28 212CONFIG_SH_TIMER_IRQ=28
248CONFIG_NO_IDLE_HZ=y
249CONFIG_SH_PCLK_FREQ=50000000 213CONFIG_SH_PCLK_FREQ=50000000
214# CONFIG_TICK_ONESHOT is not set
215# CONFIG_NO_HZ is not set
216# CONFIG_HIGH_RES_TIMERS is not set
250 217
251# 218#
252# CPU Frequency scaling 219# CPU Frequency scaling
@@ -261,7 +228,6 @@ CONFIG_SH_PCLK_FREQ=50000000
261# 228#
262# Companion Chips 229# Companion Chips
263# 230#
264# CONFIG_HD6446X_SERIES is not set
265 231
266# 232#
267# Additional SuperH Device Drivers 233# Additional SuperH Device Drivers
@@ -278,7 +244,7 @@ CONFIG_HZ_250=y
278# CONFIG_HZ_1000 is not set 244# CONFIG_HZ_1000 is not set
279CONFIG_HZ=250 245CONFIG_HZ=250
280CONFIG_KEXEC=y 246CONFIG_KEXEC=y
281# CONFIG_SMP is not set 247# CONFIG_CRASH_DUMP is not set
282# CONFIG_PREEMPT_NONE is not set 248# CONFIG_PREEMPT_NONE is not set
283# CONFIG_PREEMPT_VOLUNTARY is not set 249# CONFIG_PREEMPT_VOLUNTARY is not set
284CONFIG_PREEMPT=y 250CONFIG_PREEMPT=y
@@ -300,31 +266,22 @@ CONFIG_PCI=y
300CONFIG_SH_PCIDMA_NONCOHERENT=y 266CONFIG_SH_PCIDMA_NONCOHERENT=y
301CONFIG_PCI_AUTO=y 267CONFIG_PCI_AUTO=y
302CONFIG_PCI_AUTO_UPDATE_RESOURCES=y 268CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
269# CONFIG_ARCH_SUPPORTS_MSI is not set
303# CONFIG_PCI_DEBUG is not set 270# CONFIG_PCI_DEBUG is not set
304 271
305# 272#
306# PCCARD (PCMCIA/CardBus) support 273# PCCARD (PCMCIA/CardBus) support
307# 274#
308# CONFIG_PCCARD is not set 275# CONFIG_PCCARD is not set
309
310#
311# PCI Hotplug Support
312#
313# CONFIG_HOTPLUG_PCI is not set 276# CONFIG_HOTPLUG_PCI is not set
314 277
315# 278#
316# Executable file formats 279# Executable file formats
317# 280#
318CONFIG_BINFMT_ELF=y 281CONFIG_BINFMT_ELF=y
319# CONFIG_BINFMT_FLAT is not set
320# CONFIG_BINFMT_MISC is not set 282# CONFIG_BINFMT_MISC is not set
321 283
322# 284#
323# Power management options (EXPERIMENTAL)
324#
325# CONFIG_PM is not set
326
327#
328# Networking 285# Networking
329# 286#
330CONFIG_NET=y 287CONFIG_NET=y
@@ -332,7 +289,6 @@ CONFIG_NET=y
332# 289#
333# Networking options 290# Networking options
334# 291#
335# CONFIG_NETDEBUG is not set
336CONFIG_PACKET=y 292CONFIG_PACKET=y
337# CONFIG_PACKET_MMAP is not set 293# CONFIG_PACKET_MMAP is not set
338CONFIG_UNIX=y 294CONFIG_UNIX=y
@@ -377,20 +333,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
377# CONFIG_INET6_TUNNEL is not set 333# CONFIG_INET6_TUNNEL is not set
378# CONFIG_NETWORK_SECMARK is not set 334# CONFIG_NETWORK_SECMARK is not set
379# CONFIG_NETFILTER is not set 335# CONFIG_NETFILTER is not set
380
381#
382# DCCP Configuration (EXPERIMENTAL)
383#
384# CONFIG_IP_DCCP is not set 336# CONFIG_IP_DCCP is not set
385
386#
387# SCTP Configuration (EXPERIMENTAL)
388#
389# CONFIG_IP_SCTP is not set 337# CONFIG_IP_SCTP is not set
390
391#
392# TIPC Configuration (EXPERIMENTAL)
393#
394# CONFIG_TIPC is not set 338# CONFIG_TIPC is not set
395# CONFIG_ATM is not set 339# CONFIG_ATM is not set
396CONFIG_BRIDGE=m 340CONFIG_BRIDGE=m
@@ -417,8 +361,16 @@ CONFIG_LLC=m
417# CONFIG_HAMRADIO is not set 361# CONFIG_HAMRADIO is not set
418# CONFIG_IRDA is not set 362# CONFIG_IRDA is not set
419# CONFIG_BT is not set 363# CONFIG_BT is not set
420# CONFIG_IEEE80211 is not set 364# CONFIG_AF_RXRPC is not set
365
366#
367# Wireless
368#
369# CONFIG_CFG80211 is not set
421CONFIG_WIRELESS_EXT=y 370CONFIG_WIRELESS_EXT=y
371# CONFIG_MAC80211 is not set
372# CONFIG_IEEE80211 is not set
373# CONFIG_RFKILL is not set
422 374
423# 375#
424# Device Drivers 376# Device Drivers
@@ -438,10 +390,6 @@ CONFIG_FW_LOADER=m
438# Connector - unified userspace <-> kernelspace linker 390# Connector - unified userspace <-> kernelspace linker
439# 391#
440# CONFIG_CONNECTOR is not set 392# CONFIG_CONNECTOR is not set
441
442#
443# Memory Technology Devices (MTD)
444#
445# CONFIG_MTD is not set 393# CONFIG_MTD is not set
446 394
447# 395#
@@ -475,12 +423,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
475# 423#
476# Misc devices 424# Misc devices
477# 425#
426# CONFIG_PHANTOM is not set
478# CONFIG_SGI_IOC4 is not set 427# CONFIG_SGI_IOC4 is not set
479# CONFIG_TIFM_CORE is not set 428# CONFIG_TIFM_CORE is not set
480 429# CONFIG_BLINK is not set
481#
482# ATA/ATAPI/MFM/RLL support
483#
484# CONFIG_IDE is not set 430# CONFIG_IDE is not set
485 431
486# 432#
@@ -509,6 +455,7 @@ CONFIG_CHR_DEV_SG=m
509# CONFIG_SCSI_CONSTANTS is not set 455# CONFIG_SCSI_CONSTANTS is not set
510# CONFIG_SCSI_LOGGING is not set 456# CONFIG_SCSI_LOGGING is not set
511# CONFIG_SCSI_SCAN_ASYNC is not set 457# CONFIG_SCSI_SCAN_ASYNC is not set
458CONFIG_SCSI_WAIT_SCAN=m
512 459
513# 460#
514# SCSI Transports 461# SCSI Transports
@@ -554,10 +501,6 @@ CONFIG_CHR_DEV_SG=m
554# CONFIG_SCSI_NSP32 is not set 501# CONFIG_SCSI_NSP32 is not set
555# CONFIG_SCSI_DEBUG is not set 502# CONFIG_SCSI_DEBUG is not set
556# CONFIG_SCSI_SRP is not set 503# CONFIG_SCSI_SRP is not set
557
558#
559# Serial ATA (prod) and Parallel ATA (experimental) drivers
560#
561CONFIG_ATA=y 504CONFIG_ATA=y
562# CONFIG_ATA_NONSTANDARD is not set 505# CONFIG_ATA_NONSTANDARD is not set
563# CONFIG_SATA_AHCI is not set 506# CONFIG_SATA_AHCI is not set
@@ -580,6 +523,7 @@ CONFIG_SATA_SIL=y
580# CONFIG_PATA_AMD is not set 523# CONFIG_PATA_AMD is not set
581# CONFIG_PATA_ARTOP is not set 524# CONFIG_PATA_ARTOP is not set
582# CONFIG_PATA_ATIIXP is not set 525# CONFIG_PATA_ATIIXP is not set
526# CONFIG_PATA_CMD640_PCI is not set
583# CONFIG_PATA_CMD64X is not set 527# CONFIG_PATA_CMD64X is not set
584# CONFIG_PATA_CS5520 is not set 528# CONFIG_PATA_CS5520 is not set
585# CONFIG_PATA_CS5530 is not set 529# CONFIG_PATA_CS5530 is not set
@@ -629,6 +573,7 @@ CONFIG_PATA_PLATFORM=y
629# 573#
630# IEEE 1394 (FireWire) support 574# IEEE 1394 (FireWire) support
631# 575#
576# CONFIG_FIREWIRE is not set
632# CONFIG_IEEE1394 is not set 577# CONFIG_IEEE1394 is not set
633 578
634# 579#
@@ -644,15 +589,7 @@ CONFIG_NETDEVICES=y
644# CONFIG_BONDING is not set 589# CONFIG_BONDING is not set
645# CONFIG_EQUALIZER is not set 590# CONFIG_EQUALIZER is not set
646# CONFIG_TUN is not set 591# CONFIG_TUN is not set
647
648#
649# ARCnet devices
650#
651# CONFIG_ARCNET is not set 592# CONFIG_ARCNET is not set
652
653#
654# PHY device support
655#
656# CONFIG_PHYLIB is not set 593# CONFIG_PHYLIB is not set
657 594
658# 595#
@@ -673,10 +610,7 @@ CONFIG_MII=y
673# CONFIG_NET_TULIP is not set 610# CONFIG_NET_TULIP is not set
674# CONFIG_HP100 is not set 611# CONFIG_HP100 is not set
675# CONFIG_NET_PCI is not set 612# CONFIG_NET_PCI is not set
676 613CONFIG_NETDEV_1000=y
677#
678# Ethernet (1000 Mbit)
679#
680# CONFIG_ACENIC is not set 614# CONFIG_ACENIC is not set
681# CONFIG_DL2K is not set 615# CONFIG_DL2K is not set
682# CONFIG_E1000 is not set 616# CONFIG_E1000 is not set
@@ -689,55 +623,26 @@ CONFIG_R8169=y
689# CONFIG_SKGE is not set 623# CONFIG_SKGE is not set
690# CONFIG_SKY2 is not set 624# CONFIG_SKY2 is not set
691# CONFIG_SK98LIN is not set 625# CONFIG_SK98LIN is not set
626# CONFIG_VIA_VELOCITY is not set
692# CONFIG_TIGON3 is not set 627# CONFIG_TIGON3 is not set
693# CONFIG_BNX2 is not set 628# CONFIG_BNX2 is not set
694# CONFIG_QLA3XXX is not set 629# CONFIG_QLA3XXX is not set
695# CONFIG_ATL1 is not set 630# CONFIG_ATL1 is not set
696 631CONFIG_NETDEV_10000=y
697#
698# Ethernet (10000 Mbit)
699#
700# CONFIG_CHELSIO_T1 is not set 632# CONFIG_CHELSIO_T1 is not set
701# CONFIG_CHELSIO_T3 is not set 633# CONFIG_CHELSIO_T3 is not set
702# CONFIG_IXGB is not set 634# CONFIG_IXGB is not set
703# CONFIG_S2IO is not set 635# CONFIG_S2IO is not set
704# CONFIG_MYRI10GE is not set 636# CONFIG_MYRI10GE is not set
705# CONFIG_NETXEN_NIC is not set 637# CONFIG_NETXEN_NIC is not set
706 638# CONFIG_MLX4_CORE is not set
707#
708# Token Ring devices
709#
710# CONFIG_TR is not set 639# CONFIG_TR is not set
711 640
712# 641#
713# Wireless LAN (non-hamradio) 642# Wireless LAN
714#
715CONFIG_NET_RADIO=y
716# CONFIG_NET_WIRELESS_RTNETLINK is not set
717
718#
719# Obsolete Wireless cards support (pre-802.11)
720#
721# CONFIG_STRIP is not set
722
723#
724# Wireless 802.11b ISA/PCI cards support
725#
726# CONFIG_IPW2100 is not set
727# CONFIG_IPW2200 is not set
728# CONFIG_HERMES is not set
729# CONFIG_ATMEL is not set
730
731#
732# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
733#
734# CONFIG_PRISM54 is not set
735# CONFIG_HOSTAP is not set
736CONFIG_NET_WIRELESS=y
737
738#
739# Wan interfaces
740# 643#
644# CONFIG_WLAN_PRE80211 is not set
645# CONFIG_WLAN_80211 is not set
741# CONFIG_WAN is not set 646# CONFIG_WAN is not set
742# CONFIG_FDDI is not set 647# CONFIG_FDDI is not set
743# CONFIG_HIPPI is not set 648# CONFIG_HIPPI is not set
@@ -789,6 +694,7 @@ CONFIG_KEYBOARD_ATKBD=y
789# CONFIG_KEYBOARD_STOWAWAY is not set 694# CONFIG_KEYBOARD_STOWAWAY is not set
790# CONFIG_INPUT_MOUSE is not set 695# CONFIG_INPUT_MOUSE is not set
791# CONFIG_INPUT_JOYSTICK is not set 696# CONFIG_INPUT_JOYSTICK is not set
697# CONFIG_INPUT_TABLET is not set
792# CONFIG_INPUT_TOUCHSCREEN is not set 698# CONFIG_INPUT_TOUCHSCREEN is not set
793# CONFIG_INPUT_MISC is not set 699# CONFIG_INPUT_MISC is not set
794 700
@@ -831,14 +737,8 @@ CONFIG_LEGACY_PTY_COUNT=256
831# IPMI 737# IPMI
832# 738#
833# CONFIG_IPMI_HANDLER is not set 739# CONFIG_IPMI_HANDLER is not set
834
835#
836# Watchdog Cards
837#
838# CONFIG_WATCHDOG is not set 740# CONFIG_WATCHDOG is not set
839CONFIG_HW_RANDOM=y 741CONFIG_HW_RANDOM=y
840# CONFIG_GEN_RTC is not set
841# CONFIG_DTLK is not set
842# CONFIG_R3964 is not set 742# CONFIG_R3964 is not set
843# CONFIG_APPLICOM is not set 743# CONFIG_APPLICOM is not set
844# CONFIG_DRM is not set 744# CONFIG_DRM is not set
@@ -848,10 +748,7 @@ CONFIG_HW_RANDOM=y
848# TPM devices 748# TPM devices
849# 749#
850# CONFIG_TCG_TPM is not set 750# CONFIG_TCG_TPM is not set
851 751CONFIG_DEVPORT=y
852#
853# I2C support
854#
855# CONFIG_I2C is not set 752# CONFIG_I2C is not set
856 753
857# 754#
@@ -864,16 +761,15 @@ CONFIG_HW_RANDOM=y
864# Dallas's 1-wire bus 761# Dallas's 1-wire bus
865# 762#
866# CONFIG_W1 is not set 763# CONFIG_W1 is not set
867
868#
869# Hardware Monitoring support
870#
871CONFIG_HWMON=y 764CONFIG_HWMON=y
872# CONFIG_HWMON_VID is not set 765# CONFIG_HWMON_VID is not set
873# CONFIG_SENSORS_ABITUGURU is not set 766# CONFIG_SENSORS_ABITUGURU is not set
874# CONFIG_SENSORS_F71805F is not set 767# CONFIG_SENSORS_F71805F is not set
875# CONFIG_SENSORS_PC87427 is not set 768# CONFIG_SENSORS_PC87427 is not set
769# CONFIG_SENSORS_SMSC47M1 is not set
770# CONFIG_SENSORS_SMSC47B397 is not set
876# CONFIG_SENSORS_VT1211 is not set 771# CONFIG_SENSORS_VT1211 is not set
772# CONFIG_SENSORS_W83627HF is not set
877# CONFIG_HWMON_DEBUG_CHIP is not set 773# CONFIG_HWMON_DEBUG_CHIP is not set
878 774
879# 775#
@@ -885,22 +781,30 @@ CONFIG_HWMON=y
885# Multimedia devices 781# Multimedia devices
886# 782#
887# CONFIG_VIDEO_DEV is not set 783# CONFIG_VIDEO_DEV is not set
784# CONFIG_DVB_CORE is not set
785# CONFIG_DAB is not set
888 786
889# 787#
890# Digital Video Broadcasting Devices 788# Graphics support
891# 789#
892# CONFIG_DVB is not set 790# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
893 791
894# 792#
895# Graphics support 793# Display device support
896# 794#
897# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 795# CONFIG_DISPLAY_SUPPORT is not set
796# CONFIG_VGASTATE is not set
898CONFIG_FB=y 797CONFIG_FB=y
899# CONFIG_FIRMWARE_EDID is not set 798# CONFIG_FIRMWARE_EDID is not set
900# CONFIG_FB_DDC is not set 799# CONFIG_FB_DDC is not set
901# CONFIG_FB_CFB_FILLRECT is not set 800# CONFIG_FB_CFB_FILLRECT is not set
902# CONFIG_FB_CFB_COPYAREA is not set 801# CONFIG_FB_CFB_COPYAREA is not set
903# CONFIG_FB_CFB_IMAGEBLIT is not set 802# CONFIG_FB_CFB_IMAGEBLIT is not set
803# CONFIG_FB_SYS_FILLRECT is not set
804# CONFIG_FB_SYS_COPYAREA is not set
805# CONFIG_FB_SYS_IMAGEBLIT is not set
806# CONFIG_FB_SYS_FOPS is not set
807CONFIG_FB_DEFERRED_IO=y
904# CONFIG_FB_SVGALIB is not set 808# CONFIG_FB_SVGALIB is not set
905# CONFIG_FB_MACMODES is not set 809# CONFIG_FB_MACMODES is not set
906# CONFIG_FB_BACKLIGHT is not set 810# CONFIG_FB_BACKLIGHT is not set
@@ -908,7 +812,7 @@ CONFIG_FB=y
908# CONFIG_FB_TILEBLITTING is not set 812# CONFIG_FB_TILEBLITTING is not set
909 813
910# 814#
911# Frambuffer hardware drivers 815# Frame buffer hardware drivers
912# 816#
913# CONFIG_FB_CIRRUS is not set 817# CONFIG_FB_CIRRUS is not set
914# CONFIG_FB_PM2 is not set 818# CONFIG_FB_PM2 is not set
@@ -930,12 +834,11 @@ CONFIG_FB=y
930# CONFIG_FB_KYRO is not set 834# CONFIG_FB_KYRO is not set
931# CONFIG_FB_3DFX is not set 835# CONFIG_FB_3DFX is not set
932# CONFIG_FB_VOODOO1 is not set 836# CONFIG_FB_VOODOO1 is not set
837# CONFIG_FB_VT8623 is not set
933# CONFIG_FB_TRIDENT is not set 838# CONFIG_FB_TRIDENT is not set
839# CONFIG_FB_ARK is not set
840# CONFIG_FB_PM3 is not set
934# CONFIG_FB_VIRTUAL is not set 841# CONFIG_FB_VIRTUAL is not set
935
936#
937# Logo configuration
938#
939# CONFIG_LOGO is not set 842# CONFIG_LOGO is not set
940 843
941# 844#
@@ -952,13 +855,10 @@ CONFIG_SOUND=m
952# Open Sound System 855# Open Sound System
953# 856#
954CONFIG_SOUND_PRIME=m 857CONFIG_SOUND_PRIME=m
955# CONFIG_OBSOLETE_OSS is not set 858# CONFIG_OSS_OBSOLETE is not set
956# CONFIG_SOUND_BT878 is not set
957# CONFIG_SOUND_ICH is not set
958# CONFIG_SOUND_TRIDENT is not set 859# CONFIG_SOUND_TRIDENT is not set
959# CONFIG_SOUND_MSNDCLAS is not set 860# CONFIG_SOUND_MSNDCLAS is not set
960# CONFIG_SOUND_MSNDPIN is not set 861# CONFIG_SOUND_MSNDPIN is not set
961# CONFIG_SOUND_VIA82CXXX is not set
962 862
963# 863#
964# HID Devices 864# HID Devices
@@ -982,10 +882,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
982# USB Gadget Support 882# USB Gadget Support
983# 883#
984# CONFIG_USB_GADGET is not set 884# CONFIG_USB_GADGET is not set
985
986#
987# MMC/SD Card support
988#
989# CONFIG_MMC is not set 885# CONFIG_MMC is not set
990 886
991# 887#
@@ -1026,18 +922,30 @@ CONFIG_RTC_INTF_SYSFS=y
1026CONFIG_RTC_INTF_PROC=y 922CONFIG_RTC_INTF_PROC=y
1027CONFIG_RTC_INTF_DEV=y 923CONFIG_RTC_INTF_DEV=y
1028# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 924# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
925# CONFIG_RTC_DRV_TEST is not set
926
927#
928# I2C RTC drivers
929#
1029 930
1030# 931#
1031# RTC drivers 932# SPI RTC drivers
933#
934
935#
936# Platform RTC drivers
1032# 937#
1033# CONFIG_RTC_DRV_DS1553 is not set 938# CONFIG_RTC_DRV_DS1553 is not set
1034# CONFIG_RTC_DRV_DS1742 is not set 939# CONFIG_RTC_DRV_DS1742 is not set
1035# CONFIG_RTC_DRV_M48T86 is not set 940# CONFIG_RTC_DRV_M48T86 is not set
1036CONFIG_RTC_DRV_SH=y
1037# CONFIG_RTC_DRV_TEST is not set
1038# CONFIG_RTC_DRV_V3020 is not set 941# CONFIG_RTC_DRV_V3020 is not set
1039 942
1040# 943#
944# on-CPU RTC drivers
945#
946CONFIG_RTC_DRV_SH=y
947
948#
1041# DMA Engine support 949# DMA Engine support
1042# 950#
1043# CONFIG_DMA_ENGINE is not set 951# CONFIG_DMA_ENGINE is not set
@@ -1051,14 +959,6 @@ CONFIG_RTC_DRV_SH=y
1051# 959#
1052 960
1053# 961#
1054# Auxiliary Display support
1055#
1056
1057#
1058# Virtualization
1059#
1060
1061#
1062# File systems 962# File systems
1063# 963#
1064CONFIG_EXT2_FS=y 964CONFIG_EXT2_FS=y
@@ -1157,6 +1057,7 @@ CONFIG_EXPORTFS=y
1157CONFIG_NFS_COMMON=y 1057CONFIG_NFS_COMMON=y
1158CONFIG_SUNRPC=y 1058CONFIG_SUNRPC=y
1159CONFIG_SUNRPC_GSS=y 1059CONFIG_SUNRPC_GSS=y
1060# CONFIG_SUNRPC_BIND34 is not set
1160CONFIG_RPCSEC_GSS_KRB5=y 1061CONFIG_RPCSEC_GSS_KRB5=y
1161# CONFIG_RPCSEC_GSS_SPKM3 is not set 1062# CONFIG_RPCSEC_GSS_SPKM3 is not set
1162# CONFIG_SMB_FS is not set 1063# CONFIG_SMB_FS is not set
@@ -1239,7 +1140,6 @@ CONFIG_DEBUG_FS=y
1239# CONFIG_HEADERS_CHECK is not set 1140# CONFIG_HEADERS_CHECK is not set
1240CONFIG_DEBUG_KERNEL=y 1141CONFIG_DEBUG_KERNEL=y
1241# CONFIG_DEBUG_SHIRQ is not set 1142# CONFIG_DEBUG_SHIRQ is not set
1242CONFIG_LOG_BUF_SHIFT=14
1243# CONFIG_DETECT_SOFTLOCKUP is not set 1143# CONFIG_DETECT_SOFTLOCKUP is not set
1244# CONFIG_SCHEDSTATS is not set 1144# CONFIG_SCHEDSTATS is not set
1245# CONFIG_TIMER_STATS is not set 1145# CONFIG_TIMER_STATS is not set
@@ -1266,6 +1166,7 @@ CONFIG_FORCED_INLINING=y
1266CONFIG_SH_STANDARD_BIOS=y 1166CONFIG_SH_STANDARD_BIOS=y
1267# CONFIG_EARLY_SCIF_CONSOLE is not set 1167# CONFIG_EARLY_SCIF_CONSOLE is not set
1268CONFIG_EARLY_PRINTK=y 1168CONFIG_EARLY_PRINTK=y
1169# CONFIG_DEBUG_BOOTMEM is not set
1269CONFIG_DEBUG_STACKOVERFLOW=y 1170CONFIG_DEBUG_STACKOVERFLOW=y
1270CONFIG_DEBUG_STACK_USAGE=y 1171CONFIG_DEBUG_STACK_USAGE=y
1271# CONFIG_4KSTACKS is not set 1172# CONFIG_4KSTACKS is not set
@@ -1300,6 +1201,7 @@ CONFIG_CRYPTO_ECB=m
1300CONFIG_CRYPTO_CBC=y 1201CONFIG_CRYPTO_CBC=y
1301CONFIG_CRYPTO_PCBC=m 1202CONFIG_CRYPTO_PCBC=m
1302# CONFIG_CRYPTO_LRW is not set 1203# CONFIG_CRYPTO_LRW is not set
1204# CONFIG_CRYPTO_CRYPTD is not set
1303CONFIG_CRYPTO_DES=y 1205CONFIG_CRYPTO_DES=y
1304# CONFIG_CRYPTO_FCRYPT is not set 1206# CONFIG_CRYPTO_FCRYPT is not set
1305# CONFIG_CRYPTO_BLOWFISH is not set 1207# CONFIG_CRYPTO_BLOWFISH is not set
@@ -1328,7 +1230,9 @@ CONFIG_CRYPTO_DES=y
1328CONFIG_BITREVERSE=y 1230CONFIG_BITREVERSE=y
1329# CONFIG_CRC_CCITT is not set 1231# CONFIG_CRC_CCITT is not set
1330# CONFIG_CRC16 is not set 1232# CONFIG_CRC16 is not set
1233# CONFIG_CRC_ITU_T is not set
1331CONFIG_CRC32=y 1234CONFIG_CRC32=y
1332# CONFIG_LIBCRC32C is not set 1235# CONFIG_LIBCRC32C is not set
1333CONFIG_HAS_IOMEM=y 1236CONFIG_HAS_IOMEM=y
1334CONFIG_HAS_IOPORT=y 1237CONFIG_HAS_IOPORT=y
1238CONFIG_HAS_DMA=y
diff --git a/arch/sh/configs/se7206_defconfig b/arch/sh/configs/se7206_defconfig
index 87ab9080fd..f2f2a3c9c3 100644
--- a/arch/sh/configs/se7206_defconfig
+++ b/arch/sh/configs/se7206_defconfig
@@ -1,18 +1,22 @@
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.22-rc4
4# Wed Dec 6 14:40:15 2006 4# Fri Jun 15 19:37:46 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8CONFIG_GENERIC_BUG=y
8CONFIG_GENERIC_FIND_NEXT_BIT=y 9CONFIG_GENERIC_FIND_NEXT_BIT=y
9CONFIG_GENERIC_HWEIGHT=y 10CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_HARDIRQS=y 11CONFIG_GENERIC_HARDIRQS=y
11CONFIG_GENERIC_IRQ_PROBE=y 12CONFIG_GENERIC_IRQ_PROBE=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
13# CONFIG_GENERIC_TIME is not set 14# CONFIG_GENERIC_TIME is not set
15# CONFIG_GENERIC_CLOCKEVENTS is not set
14CONFIG_STACKTRACE_SUPPORT=y 16CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y 17CONFIG_LOCKDEP_SUPPORT=y
18# CONFIG_ARCH_HAS_ILOG2_U32 is not set
19# CONFIG_ARCH_HAS_ILOG2_U64 is not set
16CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
17 21
18# 22#
@@ -34,8 +38,10 @@ CONFIG_LOCALVERSION=""
34# CONFIG_UTS_NS is not set 38# CONFIG_UTS_NS is not set
35# CONFIG_AUDIT is not set 39# CONFIG_AUDIT is not set
36# CONFIG_IKCONFIG is not set 40# CONFIG_IKCONFIG is not set
41CONFIG_LOG_BUF_SHIFT=14
42CONFIG_SYSFS_DEPRECATED=y
37# CONFIG_RELAY is not set 43# CONFIG_RELAY is not set
38CONFIG_INITRAMFS_SOURCE="" 44# CONFIG_BLK_DEV_INITRD is not set
39CONFIG_CC_OPTIMIZE_FOR_SIZE=y 45CONFIG_CC_OPTIMIZE_FOR_SIZE=y
40CONFIG_SYSCTL=y 46CONFIG_SYSCTL=y
41CONFIG_EMBEDDED=y 47CONFIG_EMBEDDED=y
@@ -48,12 +54,17 @@ CONFIG_BUG=y
48# CONFIG_ELF_CORE is not set 54# CONFIG_ELF_CORE is not set
49# CONFIG_BASE_FULL is not set 55# CONFIG_BASE_FULL is not set
50# CONFIG_FUTEX is not set 56# CONFIG_FUTEX is not set
57CONFIG_ANON_INODES=y
51# CONFIG_EPOLL is not set 58# CONFIG_EPOLL is not set
52CONFIG_SLAB=y 59CONFIG_SIGNALFD=y
60CONFIG_TIMERFD=y
61CONFIG_EVENTFD=y
53# CONFIG_VM_EVENT_COUNTERS is not set 62# CONFIG_VM_EVENT_COUNTERS is not set
63CONFIG_SLAB=y
64# CONFIG_SLUB is not set
65# CONFIG_SLOB is not set
54CONFIG_TINY_SHMEM=y 66CONFIG_TINY_SHMEM=y
55CONFIG_BASE_SMALL=1 67CONFIG_BASE_SMALL=1
56# CONFIG_SLOB is not set
57 68
58# 69#
59# Loadable module support 70# Loadable module support
@@ -83,53 +94,10 @@ CONFIG_DEFAULT_IOSCHED="noop"
83# 94#
84# System type 95# System type
85# 96#
86# CONFIG_SH_SOLUTION_ENGINE is not set
87# CONFIG_SH_7751_SOLUTION_ENGINE is not set
88# CONFIG_SH_7300_SOLUTION_ENGINE is not set
89# CONFIG_SH_7343_SOLUTION_ENGINE is not set
90# CONFIG_SH_73180_SOLUTION_ENGINE is not set
91# CONFIG_SH_7751_SYSTEMH is not set
92# CONFIG_SH_HP6XX is not set
93# CONFIG_SH_EC3104 is not set
94# CONFIG_SH_SATURN is not set
95# CONFIG_SH_DREAMCAST is not set
96# CONFIG_SH_BIGSUR is not set
97# CONFIG_SH_MPC1211 is not set
98# CONFIG_SH_SH03 is not set
99# CONFIG_SH_SECUREEDGE5410 is not set
100# CONFIG_SH_HS7751RVOIP is not set
101# CONFIG_SH_7710VOIPGW is not set
102# CONFIG_SH_RTS7751R2D is not set
103# CONFIG_SH_R7780RP is not set
104# CONFIG_SH_EDOSK7705 is not set
105# CONFIG_SH_SH4202_MICRODEV is not set
106# CONFIG_SH_LANDISK is not set
107# CONFIG_SH_TITAN is not set
108# CONFIG_SH_SHMIN is not set
109CONFIG_SH_7206_SOLUTION_ENGINE=y
110# CONFIG_SH_7619_SOLUTION_ENGINE is not set
111# CONFIG_SH_UNKNOWN is not set
112
113#
114# Processor selection
115#
116CONFIG_CPU_SH2=y 97CONFIG_CPU_SH2=y
117CONFIG_CPU_SH2A=y 98CONFIG_CPU_SH2A=y
118
119#
120# SH-2 Processor Support
121#
122# CONFIG_CPU_SUBTYPE_SH7604 is not set
123# CONFIG_CPU_SUBTYPE_SH7619 is not set 99# CONFIG_CPU_SUBTYPE_SH7619 is not set
124
125#
126# SH-2A Processor Support
127#
128CONFIG_CPU_SUBTYPE_SH7206=y 100CONFIG_CPU_SUBTYPE_SH7206=y
129
130#
131# SH-3 Processor Support
132#
133# CONFIG_CPU_SUBTYPE_SH7300 is not set 101# CONFIG_CPU_SUBTYPE_SH7300 is not set
134# CONFIG_CPU_SUBTYPE_SH7705 is not set 102# CONFIG_CPU_SUBTYPE_SH7705 is not set
135# CONFIG_CPU_SUBTYPE_SH7706 is not set 103# CONFIG_CPU_SUBTYPE_SH7706 is not set
@@ -137,10 +105,7 @@ CONFIG_CPU_SUBTYPE_SH7206=y
137# CONFIG_CPU_SUBTYPE_SH7708 is not set 105# CONFIG_CPU_SUBTYPE_SH7708 is not set
138# CONFIG_CPU_SUBTYPE_SH7709 is not set 106# CONFIG_CPU_SUBTYPE_SH7709 is not set
139# CONFIG_CPU_SUBTYPE_SH7710 is not set 107# CONFIG_CPU_SUBTYPE_SH7710 is not set
140 108# CONFIG_CPU_SUBTYPE_SH7712 is not set
141#
142# SH-4 Processor Support
143#
144# CONFIG_CPU_SUBTYPE_SH7750 is not set 109# CONFIG_CPU_SUBTYPE_SH7750 is not set
145# CONFIG_CPU_SUBTYPE_SH7091 is not set 110# CONFIG_CPU_SUBTYPE_SH7091 is not set
146# CONFIG_CPU_SUBTYPE_SH7750R is not set 111# CONFIG_CPU_SUBTYPE_SH7750R is not set
@@ -149,32 +114,28 @@ CONFIG_CPU_SUBTYPE_SH7206=y
149# CONFIG_CPU_SUBTYPE_SH7751R is not set 114# CONFIG_CPU_SUBTYPE_SH7751R is not set
150# CONFIG_CPU_SUBTYPE_SH7760 is not set 115# CONFIG_CPU_SUBTYPE_SH7760 is not set
151# CONFIG_CPU_SUBTYPE_SH4_202 is not set 116# CONFIG_CPU_SUBTYPE_SH4_202 is not set
152
153#
154# ST40 Processor Support
155#
156# CONFIG_CPU_SUBTYPE_ST40STB1 is not set 117# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
157# CONFIG_CPU_SUBTYPE_ST40GX1 is not set 118# CONFIG_CPU_SUBTYPE_ST40GX1 is not set
158
159#
160# SH-4A Processor Support
161#
162# CONFIG_CPU_SUBTYPE_SH7770 is not set 119# CONFIG_CPU_SUBTYPE_SH7770 is not set
163# CONFIG_CPU_SUBTYPE_SH7780 is not set 120# CONFIG_CPU_SUBTYPE_SH7780 is not set
164# CONFIG_CPU_SUBTYPE_SH7785 is not set 121# CONFIG_CPU_SUBTYPE_SH7785 is not set
165
166#
167# SH4AL-DSP Processor Support
168#
169# CONFIG_CPU_SUBTYPE_SH73180 is not set 122# CONFIG_CPU_SUBTYPE_SH73180 is not set
170# CONFIG_CPU_SUBTYPE_SH7343 is not set 123# CONFIG_CPU_SUBTYPE_SH7343 is not set
124# CONFIG_CPU_SUBTYPE_SH7722 is not set
171 125
172# 126#
173# Memory management options 127# Memory management options
174# 128#
129CONFIG_QUICKLIST=y
175CONFIG_PAGE_OFFSET=0x00000000 130CONFIG_PAGE_OFFSET=0x00000000
176CONFIG_MEMORY_START=0x0c000000 131CONFIG_MEMORY_START=0x0c000000
177CONFIG_MEMORY_SIZE=0x04000000 132CONFIG_MEMORY_SIZE=0x04000000
133CONFIG_ARCH_FLATMEM_ENABLE=y
134CONFIG_ARCH_SPARSEMEM_ENABLE=y
135CONFIG_ARCH_SPARSEMEM_DEFAULT=y
136CONFIG_MAX_ACTIVE_REGIONS=1
137CONFIG_ARCH_POPULATES_NODE_MAP=y
138CONFIG_ARCH_SELECT_MEMORY_MODEL=y
178CONFIG_PAGE_SIZE_4KB=y 139CONFIG_PAGE_SIZE_4KB=y
179# CONFIG_PAGE_SIZE_8KB is not set 140# CONFIG_PAGE_SIZE_8KB is not set
180# CONFIG_PAGE_SIZE_64KB is not set 141# CONFIG_PAGE_SIZE_64KB is not set
@@ -184,35 +145,42 @@ CONFIG_FLATMEM_MANUAL=y
184# CONFIG_SPARSEMEM_MANUAL is not set 145# CONFIG_SPARSEMEM_MANUAL is not set
185CONFIG_FLATMEM=y 146CONFIG_FLATMEM=y
186CONFIG_FLAT_NODE_MEM_MAP=y 147CONFIG_FLAT_NODE_MEM_MAP=y
187# CONFIG_SPARSEMEM_STATIC is not set 148CONFIG_SPARSEMEM_STATIC=y
188CONFIG_SPLIT_PTLOCK_CPUS=4 149CONFIG_SPLIT_PTLOCK_CPUS=4
189# CONFIG_RESOURCES_64BIT is not set 150# CONFIG_RESOURCES_64BIT is not set
151CONFIG_ZONE_DMA_FLAG=0
152CONFIG_NR_QUICK=2
190 153
191# 154#
192# Cache configuration 155# Cache configuration
193# 156#
194# CONFIG_SH_DIRECT_MAPPED is not set 157# CONFIG_SH_DIRECT_MAPPED is not set
195# CONFIG_SH_WRITETHROUGH is not set 158# CONFIG_SH_WRITETHROUGH is not set
196# CONFIG_SH_OCRAM is not set
197 159
198# 160#
199# Processor features 161# Processor features
200# 162#
201# CONFIG_CPU_LITTLE_ENDIAN is not set 163# CONFIG_CPU_LITTLE_ENDIAN is not set
202CONFIG_CPU_BIG_ENDIAN=y 164CONFIG_CPU_BIG_ENDIAN=y
203# CONFIG_SH_FPU is not set
204# CONFIG_SH_FPU_EMU is not set 165# CONFIG_SH_FPU_EMU is not set
205# CONFIG_SH_DSP is not set 166# CONFIG_SH_DSP is not set
167CONFIG_CPU_HAS_IPR_IRQ=y
168
169#
170# Board support
171#
172CONFIG_SOLUTION_ENGINE=y
173CONFIG_SH_7206_SOLUTION_ENGINE=y
206 174
207# 175#
208# Timer support 176# Timer and clock configuration
209# 177#
210CONFIG_SH_CMT=y 178CONFIG_SH_CMT=y
211# CONFIG_SH_MTU2 is not set 179# CONFIG_SH_MTU2 is not set
212CONFIG_SH_TIMER_IRQ=140 180CONFIG_SH_TIMER_IRQ=140
213# CONFIG_NO_IDLE_HZ is not set
214CONFIG_SH_PCLK_FREQ=33333333 181CONFIG_SH_PCLK_FREQ=33333333
215CONFIG_SH_CLK_MD=6 182CONFIG_SH_CLK_MD=6
183# CONFIG_TICK_ONESHOT is not set
216 184
217# 185#
218# CPU Frequency scaling 186# CPU Frequency scaling
@@ -227,11 +195,11 @@ CONFIG_SH_CLK_MD=6
227# 195#
228# Companion Chips 196# Companion Chips
229# 197#
230# CONFIG_HD6446X_SERIES is not set
231 198
232# 199#
233# Additional SuperH Device Drivers 200# Additional SuperH Device Drivers
234# 201#
202# CONFIG_HEARTBEAT is not set
235# CONFIG_PUSH_SWITCH is not set 203# CONFIG_PUSH_SWITCH is not set
236 204
237# 205#
@@ -239,10 +207,11 @@ CONFIG_SH_CLK_MD=6
239# 207#
240CONFIG_HZ_100=y 208CONFIG_HZ_100=y
241# CONFIG_HZ_250 is not set 209# CONFIG_HZ_250 is not set
210# CONFIG_HZ_300 is not set
242# CONFIG_HZ_1000 is not set 211# CONFIG_HZ_1000 is not set
243CONFIG_HZ=100 212CONFIG_HZ=100
244# CONFIG_KEXEC is not set 213# CONFIG_KEXEC is not set
245# CONFIG_SMP is not set 214# CONFIG_CRASH_DUMP is not set
246CONFIG_PREEMPT_NONE=y 215CONFIG_PREEMPT_NONE=y
247# CONFIG_PREEMPT_VOLUNTARY is not set 216# CONFIG_PREEMPT_VOLUNTARY is not set
248# CONFIG_PREEMPT is not set 217# CONFIG_PREEMPT is not set
@@ -252,23 +221,18 @@ CONFIG_PREEMPT_NONE=y
252# 221#
253CONFIG_ZERO_PAGE_OFFSET=0x00001000 222CONFIG_ZERO_PAGE_OFFSET=0x00001000
254CONFIG_BOOT_LINK_OFFSET=0x00800000 223CONFIG_BOOT_LINK_OFFSET=0x00800000
255# CONFIG_UBC_WAKEUP is not set
256# CONFIG_CMDLINE_BOOL is not set 224# CONFIG_CMDLINE_BOOL is not set
257 225
258# 226#
259# Bus options 227# Bus options
260# 228#
261# CONFIG_PCI is not set 229# CONFIG_ARCH_SUPPORTS_MSI is not set
262 230
263# 231#
264# PCCARD (PCMCIA/CardBus) support 232# PCCARD (PCMCIA/CardBus) support
265# 233#
266 234
267# 235#
268# PCI Hotplug Support
269#
270
271#
272# Executable file formats 236# Executable file formats
273# 237#
274CONFIG_BINFMT_FLAT=y 238CONFIG_BINFMT_FLAT=y
@@ -277,11 +241,6 @@ CONFIG_BINFMT_ZFLAT=y
277# CONFIG_BINFMT_MISC is not set 241# CONFIG_BINFMT_MISC is not set
278 242
279# 243#
280# Power management options (EXPERIMENTAL)
281#
282# CONFIG_PM is not set
283
284#
285# Networking 244# Networking
286# 245#
287CONFIG_NET=y 246CONFIG_NET=y
@@ -289,7 +248,6 @@ CONFIG_NET=y
289# 248#
290# Networking options 249# Networking options
291# 250#
292# CONFIG_NETDEBUG is not set
293# CONFIG_PACKET is not set 251# CONFIG_PACKET is not set
294# CONFIG_UNIX is not set 252# CONFIG_UNIX is not set
295# CONFIG_NET_KEY is not set 253# CONFIG_NET_KEY is not set
@@ -314,25 +272,14 @@ CONFIG_IP_FIB_HASH=y
314# CONFIG_TCP_CONG_ADVANCED is not set 272# CONFIG_TCP_CONG_ADVANCED is not set
315CONFIG_TCP_CONG_CUBIC=y 273CONFIG_TCP_CONG_CUBIC=y
316CONFIG_DEFAULT_TCP_CONG="cubic" 274CONFIG_DEFAULT_TCP_CONG="cubic"
275# CONFIG_TCP_MD5SIG is not set
317# CONFIG_IPV6 is not set 276# CONFIG_IPV6 is not set
318# CONFIG_INET6_XFRM_TUNNEL is not set 277# CONFIG_INET6_XFRM_TUNNEL is not set
319# CONFIG_INET6_TUNNEL is not set 278# CONFIG_INET6_TUNNEL is not set
320# CONFIG_NETWORK_SECMARK is not set 279# CONFIG_NETWORK_SECMARK is not set
321# CONFIG_NETFILTER is not set 280# CONFIG_NETFILTER is not set
322
323#
324# DCCP Configuration (EXPERIMENTAL)
325#
326# CONFIG_IP_DCCP is not set 281# CONFIG_IP_DCCP is not set
327
328#
329# SCTP Configuration (EXPERIMENTAL)
330#
331# CONFIG_IP_SCTP is not set 282# CONFIG_IP_SCTP is not set
332
333#
334# TIPC Configuration (EXPERIMENTAL)
335#
336# CONFIG_TIPC is not set 283# CONFIG_TIPC is not set
337# CONFIG_ATM is not set 284# CONFIG_ATM is not set
338# CONFIG_BRIDGE is not set 285# CONFIG_BRIDGE is not set
@@ -358,7 +305,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
358# CONFIG_HAMRADIO is not set 305# CONFIG_HAMRADIO is not set
359# CONFIG_IRDA is not set 306# CONFIG_IRDA is not set
360# CONFIG_BT is not set 307# CONFIG_BT is not set
308# CONFIG_AF_RXRPC is not set
309
310#
311# Wireless
312#
313# CONFIG_CFG80211 is not set
314# CONFIG_WIRELESS_EXT is not set
315# CONFIG_MAC80211 is not set
361# CONFIG_IEEE80211 is not set 316# CONFIG_IEEE80211 is not set
317# CONFIG_RFKILL is not set
362 318
363# 319#
364# Device Drivers 320# Device Drivers
@@ -375,10 +331,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
375# Connector - unified userspace <-> kernelspace linker 331# Connector - unified userspace <-> kernelspace linker
376# 332#
377# CONFIG_CONNECTOR is not set 333# CONFIG_CONNECTOR is not set
378
379#
380# Memory Technology Devices (MTD)
381#
382CONFIG_MTD=y 334CONFIG_MTD=y
383# CONFIG_MTD_DEBUG is not set 335# CONFIG_MTD_DEBUG is not set
384CONFIG_MTD_CONCAT=y 336CONFIG_MTD_CONCAT=y
@@ -393,6 +345,7 @@ CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
393# User Modules And Translation Layers 345# User Modules And Translation Layers
394# 346#
395CONFIG_MTD_CHAR=y 347CONFIG_MTD_CHAR=y
348CONFIG_MTD_BLKDEVS=y
396CONFIG_MTD_BLOCK=y 349CONFIG_MTD_BLOCK=y
397# CONFIG_FTL is not set 350# CONFIG_FTL is not set
398# CONFIG_NFTL is not set 351# CONFIG_NFTL is not set
@@ -424,7 +377,6 @@ CONFIG_MTD_CFI_UTIL=y
424# CONFIG_MTD_RAM is not set 377# CONFIG_MTD_RAM is not set
425# CONFIG_MTD_ROM is not set 378# CONFIG_MTD_ROM is not set
426# CONFIG_MTD_ABSENT is not set 379# CONFIG_MTD_ABSENT is not set
427# CONFIG_MTD_OBSOLETE_CHIPS is not set
428 380
429# 381#
430# Mapping drivers for chip access 382# Mapping drivers for chip access
@@ -452,16 +404,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4
452# CONFIG_MTD_DOC2000 is not set 404# CONFIG_MTD_DOC2000 is not set
453# CONFIG_MTD_DOC2001 is not set 405# CONFIG_MTD_DOC2001 is not set
454# CONFIG_MTD_DOC2001PLUS is not set 406# CONFIG_MTD_DOC2001PLUS is not set
455
456#
457# NAND Flash Device Drivers
458#
459# CONFIG_MTD_NAND is not set 407# CONFIG_MTD_NAND is not set
408# CONFIG_MTD_ONENAND is not set
460 409
461# 410#
462# OneNAND Flash Device Drivers 411# UBI - Unsorted block images
463# 412#
464# CONFIG_MTD_ONENAND is not set 413# CONFIG_MTD_UBI is not set
465 414
466# 415#
467# Parallel port support 416# Parallel port support
@@ -471,6 +420,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4
471# 420#
472# Plug and Play support 421# Plug and Play support
473# 422#
423# CONFIG_PNPACPI is not set
474 424
475# 425#
476# Block devices 426# Block devices
@@ -479,18 +429,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4
479# CONFIG_BLK_DEV_LOOP is not set 429# CONFIG_BLK_DEV_LOOP is not set
480# CONFIG_BLK_DEV_NBD is not set 430# CONFIG_BLK_DEV_NBD is not set
481# CONFIG_BLK_DEV_RAM is not set 431# CONFIG_BLK_DEV_RAM is not set
482# CONFIG_BLK_DEV_INITRD is not set
483# CONFIG_CDROM_PKTCDVD is not set 432# CONFIG_CDROM_PKTCDVD is not set
484# CONFIG_ATA_OVER_ETH is not set 433# CONFIG_ATA_OVER_ETH is not set
485 434
486# 435#
487# Misc devices 436# Misc devices
488# 437#
489# CONFIG_TIFM_CORE is not set 438# CONFIG_BLINK is not set
490
491#
492# ATA/ATAPI/MFM/RLL support
493#
494# CONFIG_IDE is not set 439# CONFIG_IDE is not set
495 440
496# 441#
@@ -499,10 +444,6 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4
499# CONFIG_RAID_ATTRS is not set 444# CONFIG_RAID_ATTRS is not set
500# CONFIG_SCSI is not set 445# CONFIG_SCSI is not set
501# CONFIG_SCSI_NETLINK is not set 446# CONFIG_SCSI_NETLINK is not set
502
503#
504# Serial ATA (prod) and Parallel ATA (experimental) drivers
505#
506# CONFIG_ATA is not set 447# CONFIG_ATA is not set
507 448
508# 449#
@@ -511,19 +452,6 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4
511# CONFIG_MD is not set 452# CONFIG_MD is not set
512 453
513# 454#
514# Fusion MPT device support
515#
516# CONFIG_FUSION is not set
517
518#
519# IEEE 1394 (FireWire) support
520#
521
522#
523# I2O device support
524#
525
526#
527# Network device support 455# Network device support
528# 456#
529CONFIG_NETDEVICES=y 457CONFIG_NETDEVICES=y
@@ -531,10 +459,6 @@ CONFIG_NETDEVICES=y
531# CONFIG_BONDING is not set 459# CONFIG_BONDING is not set
532# CONFIG_EQUALIZER is not set 460# CONFIG_EQUALIZER is not set
533# CONFIG_TUN is not set 461# CONFIG_TUN is not set
534
535#
536# PHY device support
537#
538# CONFIG_PHYLIB is not set 462# CONFIG_PHYLIB is not set
539 463
540# 464#
@@ -544,27 +468,14 @@ CONFIG_NET_ETHERNET=y
544CONFIG_MII=y 468CONFIG_MII=y
545# CONFIG_STNIC is not set 469# CONFIG_STNIC is not set
546CONFIG_SMC91X=y 470CONFIG_SMC91X=y
471CONFIG_NETDEV_1000=y
472CONFIG_NETDEV_10000=y
547 473
548# 474#
549# Ethernet (1000 Mbit) 475# Wireless LAN
550#
551
552#
553# Ethernet (10000 Mbit)
554#
555
556#
557# Token Ring devices
558#
559
560#
561# Wireless LAN (non-hamradio)
562#
563# CONFIG_NET_RADIO is not set
564
565#
566# Wan interfaces
567# 476#
477# CONFIG_WLAN_PRE80211 is not set
478# CONFIG_WLAN_80211 is not set
568# CONFIG_WAN is not set 479# CONFIG_WAN is not set
569# CONFIG_PPP is not set 480# CONFIG_PPP is not set
570# CONFIG_SLIP is not set 481# CONFIG_SLIP is not set
@@ -604,6 +515,7 @@ CONFIG_INPUT=y
604# CONFIG_INPUT_KEYBOARD is not set 515# CONFIG_INPUT_KEYBOARD is not set
605# CONFIG_INPUT_MOUSE is not set 516# CONFIG_INPUT_MOUSE is not set
606# CONFIG_INPUT_JOYSTICK is not set 517# CONFIG_INPUT_JOYSTICK is not set
518# CONFIG_INPUT_TABLET is not set
607# CONFIG_INPUT_TOUCHSCREEN is not set 519# CONFIG_INPUT_TOUCHSCREEN is not set
608# CONFIG_INPUT_MISC is not set 520# CONFIG_INPUT_MISC is not set
609 521
@@ -639,29 +551,15 @@ CONFIG_SERIAL_CORE_CONSOLE=y
639# IPMI 551# IPMI
640# 552#
641# CONFIG_IPMI_HANDLER is not set 553# CONFIG_IPMI_HANDLER is not set
642
643#
644# Watchdog Cards
645#
646# CONFIG_WATCHDOG is not set 554# CONFIG_WATCHDOG is not set
647# CONFIG_HW_RANDOM is not set 555# CONFIG_HW_RANDOM is not set
648# CONFIG_GEN_RTC is not set
649# CONFIG_DTLK is not set
650# CONFIG_R3964 is not set 556# CONFIG_R3964 is not set
651
652#
653# Ftape, the floppy tape device driver
654#
655# CONFIG_RAW_DRIVER is not set 557# CONFIG_RAW_DRIVER is not set
656 558
657# 559#
658# TPM devices 560# TPM devices
659# 561#
660# CONFIG_TCG_TPM is not set 562# CONFIG_TCG_TPM is not set
661
662#
663# I2C support
664#
665# CONFIG_I2C is not set 563# CONFIG_I2C is not set
666 564
667# 565#
@@ -674,27 +572,30 @@ CONFIG_SERIAL_CORE_CONSOLE=y
674# Dallas's 1-wire bus 572# Dallas's 1-wire bus
675# 573#
676# CONFIG_W1 is not set 574# CONFIG_W1 is not set
575# CONFIG_HWMON is not set
677 576
678# 577#
679# Hardware Monitoring support 578# Multifunction device drivers
680# 579#
681# CONFIG_HWMON is not set 580# CONFIG_MFD_SM501 is not set
682# CONFIG_HWMON_VID is not set
683 581
684# 582#
685# Multimedia devices 583# Multimedia devices
686# 584#
687# CONFIG_VIDEO_DEV is not set 585# CONFIG_VIDEO_DEV is not set
586# CONFIG_DVB_CORE is not set
587CONFIG_DAB=y
688 588
689# 589#
690# Digital Video Broadcasting Devices 590# Graphics support
691# 591#
692# CONFIG_DVB is not set 592# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
693 593
694# 594#
695# Graphics support 595# Display device support
696# 596#
697# CONFIG_FIRMWARE_EDID is not set 597# CONFIG_DISPLAY_SUPPORT is not set
598# CONFIG_VGASTATE is not set
698# CONFIG_FB is not set 599# CONFIG_FB is not set
699 600
700# 601#
@@ -703,6 +604,12 @@ CONFIG_SERIAL_CORE_CONSOLE=y
703# CONFIG_SOUND is not set 604# CONFIG_SOUND is not set
704 605
705# 606#
607# HID Devices
608#
609CONFIG_HID=y
610# CONFIG_HID_DEBUG is not set
611
612#
706# USB support 613# USB support
707# 614#
708# CONFIG_USB_ARCH_HAS_HCD is not set 615# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -717,10 +624,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
717# USB Gadget Support 624# USB Gadget Support
718# 625#
719# CONFIG_USB_GADGET is not set 626# CONFIG_USB_GADGET is not set
720
721#
722# MMC/SD Card support
723#
724# CONFIG_MMC is not set 627# CONFIG_MMC is not set
725 628
726# 629#
@@ -802,7 +705,6 @@ CONFIG_PROC_FS=y
802CONFIG_PROC_SYSCTL=y 705CONFIG_PROC_SYSCTL=y
803# CONFIG_SYSFS is not set 706# CONFIG_SYSFS is not set
804# CONFIG_TMPFS is not set 707# CONFIG_TMPFS is not set
805# CONFIG_HUGETLBFS is not set
806# CONFIG_HUGETLB_PAGE is not set 708# CONFIG_HUGETLB_PAGE is not set
807CONFIG_RAMFS=y 709CONFIG_RAMFS=y
808 710
@@ -816,7 +718,6 @@ CONFIG_RAMFS=y
816# CONFIG_BEFS_FS is not set 718# CONFIG_BEFS_FS is not set
817# CONFIG_BFS_FS is not set 719# CONFIG_BFS_FS is not set
818# CONFIG_EFS_FS is not set 720# CONFIG_EFS_FS is not set
819# CONFIG_JFFS_FS is not set
820# CONFIG_JFFS2_FS is not set 721# CONFIG_JFFS2_FS is not set
821# CONFIG_CRAMFS is not set 722# CONFIG_CRAMFS is not set
822# CONFIG_VXFS_FS is not set 723# CONFIG_VXFS_FS is not set
@@ -849,6 +750,11 @@ CONFIG_MSDOS_PARTITION=y
849# CONFIG_NLS is not set 750# CONFIG_NLS is not set
850 751
851# 752#
753# Distributed Lock Manager
754#
755# CONFIG_DLM is not set
756
757#
852# Profiling support 758# Profiling support
853# 759#
854# CONFIG_PROFILING is not set 760# CONFIG_PROFILING is not set
@@ -861,14 +767,11 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
861# CONFIG_ENABLE_MUST_CHECK is not set 767# CONFIG_ENABLE_MUST_CHECK is not set
862# CONFIG_MAGIC_SYSRQ is not set 768# CONFIG_MAGIC_SYSRQ is not set
863# CONFIG_UNUSED_SYMBOLS is not set 769# CONFIG_UNUSED_SYMBOLS is not set
770# CONFIG_HEADERS_CHECK is not set
864# CONFIG_DEBUG_KERNEL is not set 771# CONFIG_DEBUG_KERNEL is not set
865CONFIG_LOG_BUF_SHIFT=14
866# CONFIG_DEBUG_BUGVERBOSE is not set 772# CONFIG_DEBUG_BUGVERBOSE is not set
867# CONFIG_UNWIND_INFO is not set
868# CONFIG_HEADERS_CHECK is not set
869# CONFIG_SH_STANDARD_BIOS is not set 773# CONFIG_SH_STANDARD_BIOS is not set
870# CONFIG_EARLY_SCIF_CONSOLE is not set 774# CONFIG_EARLY_SCIF_CONSOLE is not set
871# CONFIG_KGDB is not set
872 775
873# 776#
874# Security options 777# Security options
@@ -883,8 +786,13 @@ CONFIG_LOG_BUF_SHIFT=14
883# 786#
884# Library routines 787# Library routines
885# 788#
789CONFIG_BITREVERSE=y
886# CONFIG_CRC_CCITT is not set 790# CONFIG_CRC_CCITT is not set
887# CONFIG_CRC16 is not set 791# CONFIG_CRC16 is not set
792# CONFIG_CRC_ITU_T is not set
888CONFIG_CRC32=y 793CONFIG_CRC32=y
889# CONFIG_LIBCRC32C is not set 794# CONFIG_LIBCRC32C is not set
890CONFIG_ZLIB_INFLATE=y 795CONFIG_ZLIB_INFLATE=y
796CONFIG_HAS_IOMEM=y
797CONFIG_HAS_IOPORT=y
798CONFIG_HAS_DMA=y
diff --git a/arch/sh/configs/se7619_defconfig b/arch/sh/configs/se7619_defconfig
index 20ac7f4c53..3a3c3c1f50 100644
--- a/arch/sh/configs/se7619_defconfig
+++ b/arch/sh/configs/se7619_defconfig
@@ -1,18 +1,22 @@
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.22-rc4
4# Wed Dec 6 16:35:36 2006 4# Fri Jun 15 19:43:06 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8CONFIG_GENERIC_BUG=y
8CONFIG_GENERIC_FIND_NEXT_BIT=y 9CONFIG_GENERIC_FIND_NEXT_BIT=y
9CONFIG_GENERIC_HWEIGHT=y 10CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_HARDIRQS=y 11CONFIG_GENERIC_HARDIRQS=y
11CONFIG_GENERIC_IRQ_PROBE=y 12CONFIG_GENERIC_IRQ_PROBE=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
13# CONFIG_GENERIC_TIME is not set 14# CONFIG_GENERIC_TIME is not set
15# CONFIG_GENERIC_CLOCKEVENTS is not set
14CONFIG_STACKTRACE_SUPPORT=y 16CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y 17CONFIG_LOCKDEP_SUPPORT=y
18# CONFIG_ARCH_HAS_ILOG2_U32 is not set
19# CONFIG_ARCH_HAS_ILOG2_U64 is not set
16CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
17 21
18# 22#
@@ -31,8 +35,10 @@ CONFIG_LOCALVERSION=""
31# CONFIG_BSD_PROCESS_ACCT is not set 35# CONFIG_BSD_PROCESS_ACCT is not set
32# CONFIG_UTS_NS is not set 36# CONFIG_UTS_NS is not set
33# CONFIG_IKCONFIG is not set 37# CONFIG_IKCONFIG is not set
38CONFIG_LOG_BUF_SHIFT=14
39CONFIG_SYSFS_DEPRECATED=y
34# CONFIG_RELAY is not set 40# CONFIG_RELAY is not set
35CONFIG_INITRAMFS_SOURCE="" 41# CONFIG_BLK_DEV_INITRD is not set
36CONFIG_CC_OPTIMIZE_FOR_SIZE=y 42CONFIG_CC_OPTIMIZE_FOR_SIZE=y
37CONFIG_SYSCTL=y 43CONFIG_SYSCTL=y
38CONFIG_EMBEDDED=y 44CONFIG_EMBEDDED=y
@@ -45,12 +51,17 @@ CONFIG_BUG=y
45# CONFIG_ELF_CORE is not set 51# CONFIG_ELF_CORE is not set
46# CONFIG_BASE_FULL is not set 52# CONFIG_BASE_FULL is not set
47# CONFIG_FUTEX is not set 53# CONFIG_FUTEX is not set
54CONFIG_ANON_INODES=y
48# CONFIG_EPOLL is not set 55# CONFIG_EPOLL is not set
49CONFIG_SLAB=y 56CONFIG_SIGNALFD=y
57CONFIG_TIMERFD=y
58CONFIG_EVENTFD=y
50# CONFIG_VM_EVENT_COUNTERS is not set 59# CONFIG_VM_EVENT_COUNTERS is not set
60CONFIG_SLAB=y
61# CONFIG_SLUB is not set
62# CONFIG_SLOB is not set
51CONFIG_TINY_SHMEM=y 63CONFIG_TINY_SHMEM=y
52CONFIG_BASE_SMALL=1 64CONFIG_BASE_SMALL=1
53# CONFIG_SLOB is not set
54 65
55# 66#
56# Loadable module support 67# Loadable module support
@@ -80,52 +91,9 @@ CONFIG_DEFAULT_IOSCHED="noop"
80# 91#
81# System type 92# System type
82# 93#
83# CONFIG_SH_SOLUTION_ENGINE is not set
84# CONFIG_SH_7751_SOLUTION_ENGINE is not set
85# CONFIG_SH_7300_SOLUTION_ENGINE is not set
86# CONFIG_SH_7343_SOLUTION_ENGINE is not set
87# CONFIG_SH_73180_SOLUTION_ENGINE is not set
88# CONFIG_SH_7751_SYSTEMH is not set
89# CONFIG_SH_HP6XX is not set
90# CONFIG_SH_EC3104 is not set
91# CONFIG_SH_SATURN is not set
92# CONFIG_SH_DREAMCAST is not set
93# CONFIG_SH_BIGSUR is not set
94# CONFIG_SH_MPC1211 is not set
95# CONFIG_SH_SH03 is not set
96# CONFIG_SH_SECUREEDGE5410 is not set
97# CONFIG_SH_HS7751RVOIP is not set
98# CONFIG_SH_7710VOIPGW is not set
99# CONFIG_SH_RTS7751R2D is not set
100# CONFIG_SH_R7780RP is not set
101# CONFIG_SH_EDOSK7705 is not set
102# CONFIG_SH_SH4202_MICRODEV is not set
103# CONFIG_SH_LANDISK is not set
104# CONFIG_SH_TITAN is not set
105# CONFIG_SH_SHMIN is not set
106# CONFIG_SH_7206_SOLUTION_ENGINE is not set
107CONFIG_SH_7619_SOLUTION_ENGINE=y
108# CONFIG_SH_UNKNOWN is not set
109
110#
111# Processor selection
112#
113CONFIG_CPU_SH2=y 94CONFIG_CPU_SH2=y
114
115#
116# SH-2 Processor Support
117#
118# CONFIG_CPU_SUBTYPE_SH7604 is not set
119CONFIG_CPU_SUBTYPE_SH7619=y 95CONFIG_CPU_SUBTYPE_SH7619=y
120
121#
122# SH-2A Processor Support
123#
124# CONFIG_CPU_SUBTYPE_SH7206 is not set 96# CONFIG_CPU_SUBTYPE_SH7206 is not set
125
126#
127# SH-3 Processor Support
128#
129# CONFIG_CPU_SUBTYPE_SH7300 is not set 97# CONFIG_CPU_SUBTYPE_SH7300 is not set
130# CONFIG_CPU_SUBTYPE_SH7705 is not set 98# CONFIG_CPU_SUBTYPE_SH7705 is not set
131# CONFIG_CPU_SUBTYPE_SH7706 is not set 99# CONFIG_CPU_SUBTYPE_SH7706 is not set
@@ -133,10 +101,7 @@ CONFIG_CPU_SUBTYPE_SH7619=y
133# CONFIG_CPU_SUBTYPE_SH7708 is not set 101# CONFIG_CPU_SUBTYPE_SH7708 is not set
134# CONFIG_CPU_SUBTYPE_SH7709 is not set 102# CONFIG_CPU_SUBTYPE_SH7709 is not set
135# CONFIG_CPU_SUBTYPE_SH7710 is not set 103# CONFIG_CPU_SUBTYPE_SH7710 is not set
136 104# CONFIG_CPU_SUBTYPE_SH7712 is not set
137#
138# SH-4 Processor Support
139#
140# CONFIG_CPU_SUBTYPE_SH7750 is not set 105# CONFIG_CPU_SUBTYPE_SH7750 is not set
141# CONFIG_CPU_SUBTYPE_SH7091 is not set 106# CONFIG_CPU_SUBTYPE_SH7091 is not set
142# CONFIG_CPU_SUBTYPE_SH7750R is not set 107# CONFIG_CPU_SUBTYPE_SH7750R is not set
@@ -145,32 +110,28 @@ CONFIG_CPU_SUBTYPE_SH7619=y
145# CONFIG_CPU_SUBTYPE_SH7751R is not set 110# CONFIG_CPU_SUBTYPE_SH7751R is not set
146# CONFIG_CPU_SUBTYPE_SH7760 is not set 111# CONFIG_CPU_SUBTYPE_SH7760 is not set
147# CONFIG_CPU_SUBTYPE_SH4_202 is not set 112# CONFIG_CPU_SUBTYPE_SH4_202 is not set
148
149#
150# ST40 Processor Support
151#
152# CONFIG_CPU_SUBTYPE_ST40STB1 is not set 113# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
153# CONFIG_CPU_SUBTYPE_ST40GX1 is not set 114# CONFIG_CPU_SUBTYPE_ST40GX1 is not set
154
155#
156# SH-4A Processor Support
157#
158# CONFIG_CPU_SUBTYPE_SH7770 is not set 115# CONFIG_CPU_SUBTYPE_SH7770 is not set
159# CONFIG_CPU_SUBTYPE_SH7780 is not set 116# CONFIG_CPU_SUBTYPE_SH7780 is not set
160# CONFIG_CPU_SUBTYPE_SH7785 is not set 117# CONFIG_CPU_SUBTYPE_SH7785 is not set
161
162#
163# SH4AL-DSP Processor Support
164#
165# CONFIG_CPU_SUBTYPE_SH73180 is not set 118# CONFIG_CPU_SUBTYPE_SH73180 is not set
166# CONFIG_CPU_SUBTYPE_SH7343 is not set 119# CONFIG_CPU_SUBTYPE_SH7343 is not set
120# CONFIG_CPU_SUBTYPE_SH7722 is not set
167 121
168# 122#
169# Memory management options 123# Memory management options
170# 124#
125CONFIG_QUICKLIST=y
171CONFIG_PAGE_OFFSET=0x00000000 126CONFIG_PAGE_OFFSET=0x00000000
172CONFIG_MEMORY_START=0x0c000000 127CONFIG_MEMORY_START=0x0c000000
173CONFIG_MEMORY_SIZE=0x04000000 128CONFIG_MEMORY_SIZE=0x04000000
129CONFIG_ARCH_FLATMEM_ENABLE=y
130CONFIG_ARCH_SPARSEMEM_ENABLE=y
131CONFIG_ARCH_SPARSEMEM_DEFAULT=y
132CONFIG_MAX_ACTIVE_REGIONS=1
133CONFIG_ARCH_POPULATES_NODE_MAP=y
134CONFIG_ARCH_SELECT_MEMORY_MODEL=y
174CONFIG_PAGE_SIZE_4KB=y 135CONFIG_PAGE_SIZE_4KB=y
175# CONFIG_PAGE_SIZE_8KB is not set 136# CONFIG_PAGE_SIZE_8KB is not set
176# CONFIG_PAGE_SIZE_64KB is not set 137# CONFIG_PAGE_SIZE_64KB is not set
@@ -180,34 +141,41 @@ CONFIG_FLATMEM_MANUAL=y
180# CONFIG_SPARSEMEM_MANUAL is not set 141# CONFIG_SPARSEMEM_MANUAL is not set
181CONFIG_FLATMEM=y 142CONFIG_FLATMEM=y
182CONFIG_FLAT_NODE_MEM_MAP=y 143CONFIG_FLAT_NODE_MEM_MAP=y
183# CONFIG_SPARSEMEM_STATIC is not set 144CONFIG_SPARSEMEM_STATIC=y
184CONFIG_SPLIT_PTLOCK_CPUS=4 145CONFIG_SPLIT_PTLOCK_CPUS=4
185# CONFIG_RESOURCES_64BIT is not set 146# CONFIG_RESOURCES_64BIT is not set
147CONFIG_ZONE_DMA_FLAG=0
148CONFIG_NR_QUICK=2
186 149
187# 150#
188# Cache configuration 151# Cache configuration
189# 152#
190# CONFIG_SH_DIRECT_MAPPED is not set 153# CONFIG_SH_DIRECT_MAPPED is not set
191CONFIG_SH_WRITETHROUGH=y 154CONFIG_SH_WRITETHROUGH=y
192# CONFIG_SH_OCRAM is not set
193 155
194# 156#
195# Processor features 157# Processor features
196# 158#
197# CONFIG_CPU_LITTLE_ENDIAN is not set 159# CONFIG_CPU_LITTLE_ENDIAN is not set
198CONFIG_CPU_BIG_ENDIAN=y 160CONFIG_CPU_BIG_ENDIAN=y
199# CONFIG_SH_FPU is not set
200# CONFIG_SH_FPU_EMU is not set 161# CONFIG_SH_FPU_EMU is not set
201# CONFIG_SH_DSP is not set 162# CONFIG_SH_DSP is not set
163CONFIG_CPU_HAS_IPR_IRQ=y
164
165#
166# Board support
167#
168CONFIG_SOLUTION_ENGINE=y
169CONFIG_SH_7619_SOLUTION_ENGINE=y
202 170
203# 171#
204# Timer support 172# Timer and clock configuration
205# 173#
206CONFIG_SH_CMT=y 174CONFIG_SH_CMT=y
207CONFIG_SH_TIMER_IRQ=86 175CONFIG_SH_TIMER_IRQ=86
208# CONFIG_NO_IDLE_HZ is not set
209CONFIG_SH_PCLK_FREQ=31250000 176CONFIG_SH_PCLK_FREQ=31250000
210CONFIG_SH_CLK_MD=5 177CONFIG_SH_CLK_MD=5
178# CONFIG_TICK_ONESHOT is not set
211 179
212# 180#
213# CPU Frequency scaling 181# CPU Frequency scaling
@@ -222,11 +190,11 @@ CONFIG_SH_CLK_MD=5
222# 190#
223# Companion Chips 191# Companion Chips
224# 192#
225# CONFIG_HD6446X_SERIES is not set
226 193
227# 194#
228# Additional SuperH Device Drivers 195# Additional SuperH Device Drivers
229# 196#
197# CONFIG_HEARTBEAT is not set
230# CONFIG_PUSH_SWITCH is not set 198# CONFIG_PUSH_SWITCH is not set
231 199
232# 200#
@@ -234,10 +202,11 @@ CONFIG_SH_CLK_MD=5
234# 202#
235CONFIG_HZ_100=y 203CONFIG_HZ_100=y
236# CONFIG_HZ_250 is not set 204# CONFIG_HZ_250 is not set
205# CONFIG_HZ_300 is not set
237# CONFIG_HZ_1000 is not set 206# CONFIG_HZ_1000 is not set
238CONFIG_HZ=100 207CONFIG_HZ=100
239# CONFIG_KEXEC is not set 208# CONFIG_KEXEC is not set
240# CONFIG_SMP is not set 209# CONFIG_CRASH_DUMP is not set
241CONFIG_PREEMPT_NONE=y 210CONFIG_PREEMPT_NONE=y
242# CONFIG_PREEMPT_VOLUNTARY is not set 211# CONFIG_PREEMPT_VOLUNTARY is not set
243# CONFIG_PREEMPT is not set 212# CONFIG_PREEMPT is not set
@@ -247,23 +216,18 @@ CONFIG_PREEMPT_NONE=y
247# 216#
248CONFIG_ZERO_PAGE_OFFSET=0x00001000 217CONFIG_ZERO_PAGE_OFFSET=0x00001000
249CONFIG_BOOT_LINK_OFFSET=0x00800000 218CONFIG_BOOT_LINK_OFFSET=0x00800000
250# CONFIG_UBC_WAKEUP is not set
251# CONFIG_CMDLINE_BOOL is not set 219# CONFIG_CMDLINE_BOOL is not set
252 220
253# 221#
254# Bus options 222# Bus options
255# 223#
256# CONFIG_PCI is not set 224# CONFIG_ARCH_SUPPORTS_MSI is not set
257 225
258# 226#
259# PCCARD (PCMCIA/CardBus) support 227# PCCARD (PCMCIA/CardBus) support
260# 228#
261 229
262# 230#
263# PCI Hotplug Support
264#
265
266#
267# Executable file formats 231# Executable file formats
268# 232#
269CONFIG_BINFMT_FLAT=y 233CONFIG_BINFMT_FLAT=y
@@ -272,11 +236,6 @@ CONFIG_BINFMT_ZFLAT=y
272# CONFIG_BINFMT_MISC is not set 236# CONFIG_BINFMT_MISC is not set
273 237
274# 238#
275# Power management options (EXPERIMENTAL)
276#
277# CONFIG_PM is not set
278
279#
280# Networking 239# Networking
281# 240#
282# CONFIG_NET is not set 241# CONFIG_NET is not set
@@ -295,10 +254,6 @@ CONFIG_BINFMT_ZFLAT=y
295# 254#
296# Connector - unified userspace <-> kernelspace linker 255# Connector - unified userspace <-> kernelspace linker
297# 256#
298
299#
300# Memory Technology Devices (MTD)
301#
302CONFIG_MTD=y 257CONFIG_MTD=y
303# CONFIG_MTD_DEBUG is not set 258# CONFIG_MTD_DEBUG is not set
304CONFIG_MTD_CONCAT=y 259CONFIG_MTD_CONCAT=y
@@ -313,6 +268,7 @@ CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
313# User Modules And Translation Layers 268# User Modules And Translation Layers
314# 269#
315CONFIG_MTD_CHAR=y 270CONFIG_MTD_CHAR=y
271CONFIG_MTD_BLKDEVS=y
316CONFIG_MTD_BLOCK=y 272CONFIG_MTD_BLOCK=y
317# CONFIG_FTL is not set 273# CONFIG_FTL is not set
318# CONFIG_NFTL is not set 274# CONFIG_NFTL is not set
@@ -344,7 +300,6 @@ CONFIG_MTD_CFI_UTIL=y
344# CONFIG_MTD_RAM is not set 300# CONFIG_MTD_RAM is not set
345# CONFIG_MTD_ROM is not set 301# CONFIG_MTD_ROM is not set
346# CONFIG_MTD_ABSENT is not set 302# CONFIG_MTD_ABSENT is not set
347# CONFIG_MTD_OBSOLETE_CHIPS is not set
348 303
349# 304#
350# Mapping drivers for chip access 305# Mapping drivers for chip access
@@ -372,16 +327,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
372# CONFIG_MTD_DOC2000 is not set 327# CONFIG_MTD_DOC2000 is not set
373# CONFIG_MTD_DOC2001 is not set 328# CONFIG_MTD_DOC2001 is not set
374# CONFIG_MTD_DOC2001PLUS is not set 329# CONFIG_MTD_DOC2001PLUS is not set
375
376#
377# NAND Flash Device Drivers
378#
379# CONFIG_MTD_NAND is not set 330# CONFIG_MTD_NAND is not set
331# CONFIG_MTD_ONENAND is not set
380 332
381# 333#
382# OneNAND Flash Device Drivers 334# UBI - Unsorted block images
383# 335#
384# CONFIG_MTD_ONENAND is not set 336# CONFIG_MTD_UBI is not set
385 337
386# 338#
387# Parallel port support 339# Parallel port support
@@ -391,6 +343,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
391# 343#
392# Plug and Play support 344# Plug and Play support
393# 345#
346# CONFIG_PNPACPI is not set
394 347
395# 348#
396# Block devices 349# Block devices
@@ -398,17 +351,12 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
398# CONFIG_BLK_DEV_COW_COMMON is not set 351# CONFIG_BLK_DEV_COW_COMMON is not set
399# CONFIG_BLK_DEV_LOOP is not set 352# CONFIG_BLK_DEV_LOOP is not set
400# CONFIG_BLK_DEV_RAM is not set 353# CONFIG_BLK_DEV_RAM is not set
401# CONFIG_BLK_DEV_INITRD is not set
402# CONFIG_CDROM_PKTCDVD is not set 354# CONFIG_CDROM_PKTCDVD is not set
403 355
404# 356#
405# Misc devices 357# Misc devices
406# 358#
407# CONFIG_TIFM_CORE is not set 359# CONFIG_BLINK is not set
408
409#
410# ATA/ATAPI/MFM/RLL support
411#
412# CONFIG_IDE is not set 360# CONFIG_IDE is not set
413 361
414# 362#
@@ -417,10 +365,6 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
417# CONFIG_RAID_ATTRS is not set 365# CONFIG_RAID_ATTRS is not set
418# CONFIG_SCSI is not set 366# CONFIG_SCSI is not set
419# CONFIG_SCSI_NETLINK is not set 367# CONFIG_SCSI_NETLINK is not set
420
421#
422# Serial ATA (prod) and Parallel ATA (experimental) drivers
423#
424# CONFIG_ATA is not set 368# CONFIG_ATA is not set
425 369
426# 370#
@@ -429,19 +373,6 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
429# CONFIG_MD is not set 373# CONFIG_MD is not set
430 374
431# 375#
432# Fusion MPT device support
433#
434# CONFIG_FUSION is not set
435
436#
437# IEEE 1394 (FireWire) support
438#
439
440#
441# I2O device support
442#
443
444#
445# ISDN subsystem 376# ISDN subsystem
446# 377#
447 378
@@ -471,6 +402,7 @@ CONFIG_INPUT=y
471# CONFIG_INPUT_KEYBOARD is not set 402# CONFIG_INPUT_KEYBOARD is not set
472# CONFIG_INPUT_MOUSE is not set 403# CONFIG_INPUT_MOUSE is not set
473# CONFIG_INPUT_JOYSTICK is not set 404# CONFIG_INPUT_JOYSTICK is not set
405# CONFIG_INPUT_TABLET is not set
474# CONFIG_INPUT_TOUCHSCREEN is not set 406# CONFIG_INPUT_TOUCHSCREEN is not set
475# CONFIG_INPUT_MISC is not set 407# CONFIG_INPUT_MISC is not set
476 408
@@ -506,29 +438,15 @@ CONFIG_SERIAL_CORE_CONSOLE=y
506# IPMI 438# IPMI
507# 439#
508# CONFIG_IPMI_HANDLER is not set 440# CONFIG_IPMI_HANDLER is not set
509
510#
511# Watchdog Cards
512#
513# CONFIG_WATCHDOG is not set 441# CONFIG_WATCHDOG is not set
514# CONFIG_HW_RANDOM is not set 442# CONFIG_HW_RANDOM is not set
515# CONFIG_GEN_RTC is not set
516# CONFIG_DTLK is not set
517# CONFIG_R3964 is not set 443# CONFIG_R3964 is not set
518
519#
520# Ftape, the floppy tape device driver
521#
522# CONFIG_RAW_DRIVER is not set 444# CONFIG_RAW_DRIVER is not set
523 445
524# 446#
525# TPM devices 447# TPM devices
526# 448#
527# CONFIG_TCG_TPM is not set 449# CONFIG_TCG_TPM is not set
528
529#
530# I2C support
531#
532# CONFIG_I2C is not set 450# CONFIG_I2C is not set
533 451
534# 452#
@@ -541,26 +459,29 @@ CONFIG_SERIAL_CORE_CONSOLE=y
541# Dallas's 1-wire bus 459# Dallas's 1-wire bus
542# 460#
543# CONFIG_W1 is not set 461# CONFIG_W1 is not set
462# CONFIG_HWMON is not set
544 463
545# 464#
546# Hardware Monitoring support 465# Multifunction device drivers
547# 466#
548# CONFIG_HWMON is not set 467# CONFIG_MFD_SM501 is not set
549# CONFIG_HWMON_VID is not set
550 468
551# 469#
552# Multimedia devices 470# Multimedia devices
553# 471#
554# CONFIG_VIDEO_DEV is not set 472# CONFIG_VIDEO_DEV is not set
473CONFIG_DAB=y
555 474
556# 475#
557# Digital Video Broadcasting Devices 476# Graphics support
558# 477#
478# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
559 479
560# 480#
561# Graphics support 481# Display device support
562# 482#
563# CONFIG_FIRMWARE_EDID is not set 483# CONFIG_DISPLAY_SUPPORT is not set
484# CONFIG_VGASTATE is not set
564# CONFIG_FB is not set 485# CONFIG_FB is not set
565 486
566# 487#
@@ -569,6 +490,12 @@ CONFIG_SERIAL_CORE_CONSOLE=y
569# CONFIG_SOUND is not set 490# CONFIG_SOUND is not set
570 491
571# 492#
493# HID Devices
494#
495CONFIG_HID=y
496# CONFIG_HID_DEBUG is not set
497
498#
572# USB support 499# USB support
573# 500#
574# CONFIG_USB_ARCH_HAS_HCD is not set 501# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -583,10 +510,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
583# USB Gadget Support 510# USB Gadget Support
584# 511#
585# CONFIG_USB_GADGET is not set 512# CONFIG_USB_GADGET is not set
586
587#
588# MMC/SD Card support
589#
590# CONFIG_MMC is not set 513# CONFIG_MMC is not set
591 514
592# 515#
@@ -668,7 +591,6 @@ CONFIG_PROC_FS=y
668CONFIG_PROC_SYSCTL=y 591CONFIG_PROC_SYSCTL=y
669# CONFIG_SYSFS is not set 592# CONFIG_SYSFS is not set
670# CONFIG_TMPFS is not set 593# CONFIG_TMPFS is not set
671# CONFIG_HUGETLBFS is not set
672# CONFIG_HUGETLB_PAGE is not set 594# CONFIG_HUGETLB_PAGE is not set
673CONFIG_RAMFS=y 595CONFIG_RAMFS=y
674 596
@@ -682,7 +604,6 @@ CONFIG_RAMFS=y
682# CONFIG_BEFS_FS is not set 604# CONFIG_BEFS_FS is not set
683# CONFIG_BFS_FS is not set 605# CONFIG_BFS_FS is not set
684# CONFIG_EFS_FS is not set 606# CONFIG_EFS_FS is not set
685# CONFIG_JFFS_FS is not set
686# CONFIG_JFFS2_FS is not set 607# CONFIG_JFFS2_FS is not set
687# CONFIG_CRAMFS is not set 608# CONFIG_CRAMFS is not set
688# CONFIG_VXFS_FS is not set 609# CONFIG_VXFS_FS is not set
@@ -715,14 +636,11 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
715# CONFIG_ENABLE_MUST_CHECK is not set 636# CONFIG_ENABLE_MUST_CHECK is not set
716# CONFIG_MAGIC_SYSRQ is not set 637# CONFIG_MAGIC_SYSRQ is not set
717# CONFIG_UNUSED_SYMBOLS is not set 638# CONFIG_UNUSED_SYMBOLS is not set
639# CONFIG_HEADERS_CHECK is not set
718# CONFIG_DEBUG_KERNEL is not set 640# CONFIG_DEBUG_KERNEL is not set
719CONFIG_LOG_BUF_SHIFT=14
720# CONFIG_DEBUG_BUGVERBOSE is not set 641# CONFIG_DEBUG_BUGVERBOSE is not set
721# CONFIG_UNWIND_INFO is not set
722# CONFIG_HEADERS_CHECK is not set
723# CONFIG_SH_STANDARD_BIOS is not set 642# CONFIG_SH_STANDARD_BIOS is not set
724# CONFIG_EARLY_SCIF_CONSOLE is not set 643# CONFIG_EARLY_SCIF_CONSOLE is not set
725# CONFIG_KGDB is not set
726 644
727# 645#
728# Security options 646# Security options
@@ -737,8 +655,13 @@ CONFIG_LOG_BUF_SHIFT=14
737# 655#
738# Library routines 656# Library routines
739# 657#
658CONFIG_BITREVERSE=y
740# CONFIG_CRC_CCITT is not set 659# CONFIG_CRC_CCITT is not set
741# CONFIG_CRC16 is not set 660# CONFIG_CRC16 is not set
661# CONFIG_CRC_ITU_T is not set
742CONFIG_CRC32=y 662CONFIG_CRC32=y
743# CONFIG_LIBCRC32C is not set 663# CONFIG_LIBCRC32C is not set
744CONFIG_ZLIB_INFLATE=y 664CONFIG_ZLIB_INFLATE=y
665CONFIG_HAS_IOMEM=y
666CONFIG_HAS_IOPORT=y
667CONFIG_HAS_DMA=y
diff --git a/arch/sh/configs/se7722_defconfig b/arch/sh/configs/se7722_defconfig
index ca4c663dfa..764b813c40 100644
--- a/arch/sh/configs/se7722_defconfig
+++ b/arch/sh/configs/se7722_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.21-rc7 3# Linux kernel version: 2.6.22-rc4
4# Fri Apr 27 16:30:30 2007 4# Wed Jun 20 18:08:04 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
@@ -11,7 +11,9 @@ CONFIG_GENERIC_HWEIGHT=y
11CONFIG_GENERIC_HARDIRQS=y 11CONFIG_GENERIC_HARDIRQS=y
12CONFIG_GENERIC_IRQ_PROBE=y 12CONFIG_GENERIC_IRQ_PROBE=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
14# CONFIG_GENERIC_TIME is not set 14CONFIG_GENERIC_TIME=y
15CONFIG_GENERIC_CLOCKEVENTS=y
16CONFIG_SYS_SUPPORTS_NUMA=y
15CONFIG_STACKTRACE_SUPPORT=y 17CONFIG_STACKTRACE_SUPPORT=y
16CONFIG_LOCKDEP_SUPPORT=y 18CONFIG_LOCKDEP_SUPPORT=y
17# CONFIG_ARCH_HAS_ILOG2_U32 is not set 19# CONFIG_ARCH_HAS_ILOG2_U32 is not set
@@ -43,6 +45,7 @@ CONFIG_BSD_PROCESS_ACCT=y
43# CONFIG_AUDIT is not set 45# CONFIG_AUDIT is not set
44CONFIG_IKCONFIG=y 46CONFIG_IKCONFIG=y
45CONFIG_IKCONFIG_PROC=y 47CONFIG_IKCONFIG_PROC=y
48CONFIG_LOG_BUF_SHIFT=14
46# CONFIG_SYSFS_DEPRECATED is not set 49# CONFIG_SYSFS_DEPRECATED is not set
47# CONFIG_RELAY is not set 50# CONFIG_RELAY is not set
48CONFIG_BLK_DEV_INITRD=y 51CONFIG_BLK_DEV_INITRD=y
@@ -60,14 +63,20 @@ CONFIG_BUG=y
60CONFIG_ELF_CORE=y 63CONFIG_ELF_CORE=y
61CONFIG_BASE_FULL=y 64CONFIG_BASE_FULL=y
62CONFIG_FUTEX=y 65CONFIG_FUTEX=y
66CONFIG_ANON_INODES=y
63CONFIG_EPOLL=y 67CONFIG_EPOLL=y
68CONFIG_SIGNALFD=y
69CONFIG_TIMERFD=y
70CONFIG_EVENTFD=y
64CONFIG_SHMEM=y 71CONFIG_SHMEM=y
65CONFIG_SLAB=y
66CONFIG_VM_EVENT_COUNTERS=y 72CONFIG_VM_EVENT_COUNTERS=y
73CONFIG_SLUB_DEBUG=y
74# CONFIG_SLAB is not set
75CONFIG_SLUB=y
76# CONFIG_SLOB is not set
67CONFIG_RT_MUTEXES=y 77CONFIG_RT_MUTEXES=y
68# CONFIG_TINY_SHMEM is not set 78# CONFIG_TINY_SHMEM is not set
69CONFIG_BASE_SMALL=0 79CONFIG_BASE_SMALL=0
70# CONFIG_SLOB is not set
71 80
72# 81#
73# Loadable module support 82# Loadable module support
@@ -103,57 +112,12 @@ CONFIG_DEFAULT_IOSCHED="noop"
103# 112#
104# System type 113# System type
105# 114#
106CONFIG_SOLUTION_ENGINE=y
107# CONFIG_SH_SOLUTION_ENGINE is not set
108CONFIG_SH_7722_SOLUTION_ENGINE=y
109# CONFIG_SH_7751_SOLUTION_ENGINE is not set
110# CONFIG_SH_7780_SOLUTION_ENGINE is not set
111# CONFIG_SH_7300_SOLUTION_ENGINE is not set
112# CONFIG_SH_7343_SOLUTION_ENGINE is not set
113# CONFIG_SH_73180_SOLUTION_ENGINE is not set
114# CONFIG_SH_7751_SYSTEMH is not set
115# CONFIG_SH_HP6XX is not set
116# CONFIG_SH_SATURN is not set
117# CONFIG_SH_DREAMCAST is not set
118# CONFIG_SH_MPC1211 is not set
119# CONFIG_SH_SH03 is not set
120# CONFIG_SH_SECUREEDGE5410 is not set
121# CONFIG_SH_HS7751RVOIP is not set
122# CONFIG_SH_7710VOIPGW is not set
123# CONFIG_SH_RTS7751R2D is not set
124# CONFIG_SH_HIGHLANDER is not set
125# CONFIG_SH_EDOSK7705 is not set
126# CONFIG_SH_SH4202_MICRODEV is not set
127# CONFIG_SH_LANDISK is not set
128# CONFIG_SH_TITAN is not set
129# CONFIG_SH_SHMIN is not set
130# CONFIG_SH_7206_SOLUTION_ENGINE is not set
131# CONFIG_SH_7619_SOLUTION_ENGINE is not set
132# CONFIG_SH_LBOX_RE2 is not set
133# CONFIG_SH_UNKNOWN is not set
134
135#
136# Processor selection
137#
138CONFIG_CPU_SH4=y 115CONFIG_CPU_SH4=y
139CONFIG_CPU_SH4A=y 116CONFIG_CPU_SH4A=y
140CONFIG_CPU_SH4AL_DSP=y 117CONFIG_CPU_SH4AL_DSP=y
141CONFIG_CPU_SHX2=y 118CONFIG_CPU_SHX2=y
142
143#
144# SH-2 Processor Support
145#
146# CONFIG_CPU_SUBTYPE_SH7604 is not set
147# CONFIG_CPU_SUBTYPE_SH7619 is not set 119# CONFIG_CPU_SUBTYPE_SH7619 is not set
148
149#
150# SH-2A Processor Support
151#
152# CONFIG_CPU_SUBTYPE_SH7206 is not set 120# CONFIG_CPU_SUBTYPE_SH7206 is not set
153
154#
155# SH-3 Processor Support
156#
157# CONFIG_CPU_SUBTYPE_SH7300 is not set 121# CONFIG_CPU_SUBTYPE_SH7300 is not set
158# CONFIG_CPU_SUBTYPE_SH7705 is not set 122# CONFIG_CPU_SUBTYPE_SH7705 is not set
159# CONFIG_CPU_SUBTYPE_SH7706 is not set 123# CONFIG_CPU_SUBTYPE_SH7706 is not set
@@ -162,10 +126,6 @@ CONFIG_CPU_SHX2=y
162# CONFIG_CPU_SUBTYPE_SH7709 is not set 126# CONFIG_CPU_SUBTYPE_SH7709 is not set
163# CONFIG_CPU_SUBTYPE_SH7710 is not set 127# CONFIG_CPU_SUBTYPE_SH7710 is not set
164# CONFIG_CPU_SUBTYPE_SH7712 is not set 128# CONFIG_CPU_SUBTYPE_SH7712 is not set
165
166#
167# SH-4 Processor Support
168#
169# CONFIG_CPU_SUBTYPE_SH7750 is not set 129# CONFIG_CPU_SUBTYPE_SH7750 is not set
170# CONFIG_CPU_SUBTYPE_SH7091 is not set 130# CONFIG_CPU_SUBTYPE_SH7091 is not set
171# CONFIG_CPU_SUBTYPE_SH7750R is not set 131# CONFIG_CPU_SUBTYPE_SH7750R is not set
@@ -174,23 +134,11 @@ CONFIG_CPU_SHX2=y
174# CONFIG_CPU_SUBTYPE_SH7751R is not set 134# CONFIG_CPU_SUBTYPE_SH7751R is not set
175# CONFIG_CPU_SUBTYPE_SH7760 is not set 135# CONFIG_CPU_SUBTYPE_SH7760 is not set
176# CONFIG_CPU_SUBTYPE_SH4_202 is not set 136# CONFIG_CPU_SUBTYPE_SH4_202 is not set
177
178#
179# ST40 Processor Support
180#
181# CONFIG_CPU_SUBTYPE_ST40STB1 is not set 137# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
182# CONFIG_CPU_SUBTYPE_ST40GX1 is not set 138# CONFIG_CPU_SUBTYPE_ST40GX1 is not set
183
184#
185# SH-4A Processor Support
186#
187# CONFIG_CPU_SUBTYPE_SH7770 is not set 139# CONFIG_CPU_SUBTYPE_SH7770 is not set
188# CONFIG_CPU_SUBTYPE_SH7780 is not set 140# CONFIG_CPU_SUBTYPE_SH7780 is not set
189# CONFIG_CPU_SUBTYPE_SH7785 is not set 141# CONFIG_CPU_SUBTYPE_SH7785 is not set
190
191#
192# SH4AL-DSP Processor Support
193#
194# CONFIG_CPU_SUBTYPE_SH73180 is not set 142# CONFIG_CPU_SUBTYPE_SH73180 is not set
195# CONFIG_CPU_SUBTYPE_SH7343 is not set 143# CONFIG_CPU_SUBTYPE_SH7343 is not set
196CONFIG_CPU_SUBTYPE_SH7722=y 144CONFIG_CPU_SUBTYPE_SH7722=y
@@ -198,15 +146,21 @@ CONFIG_CPU_SUBTYPE_SH7722=y
198# 146#
199# Memory management options 147# Memory management options
200# 148#
149CONFIG_QUICKLIST=y
201CONFIG_MMU=y 150CONFIG_MMU=y
202CONFIG_PAGE_OFFSET=0x80000000 151CONFIG_PAGE_OFFSET=0x80000000
203CONFIG_MEMORY_START=0x0c000000 152CONFIG_MEMORY_START=0x0c000000
204CONFIG_MEMORY_SIZE=0x04000000 153CONFIG_MEMORY_SIZE=0x04000000
205# CONFIG_32BIT is not set
206# CONFIG_X2TLB is not set 154# CONFIG_X2TLB is not set
207CONFIG_VSYSCALL=y 155CONFIG_VSYSCALL=y
208CONFIG_ARCH_FLATMEM_ENABLE=y 156CONFIG_NUMA=y
157CONFIG_NODES_SHIFT=1
158CONFIG_ARCH_SPARSEMEM_ENABLE=y
159CONFIG_ARCH_SPARSEMEM_DEFAULT=y
160CONFIG_MAX_ACTIVE_REGIONS=2
209CONFIG_ARCH_POPULATES_NODE_MAP=y 161CONFIG_ARCH_POPULATES_NODE_MAP=y
162CONFIG_ARCH_SELECT_MEMORY_MODEL=y
163CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
210CONFIG_PAGE_SIZE_4KB=y 164CONFIG_PAGE_SIZE_4KB=y
211# CONFIG_PAGE_SIZE_8KB is not set 165# CONFIG_PAGE_SIZE_8KB is not set
212# CONFIG_PAGE_SIZE_64KB is not set 166# CONFIG_PAGE_SIZE_64KB is not set
@@ -216,26 +170,25 @@ CONFIG_HUGETLB_PAGE_SIZE_64K=y
216# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set 170# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set
217# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set 171# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set
218CONFIG_SELECT_MEMORY_MODEL=y 172CONFIG_SELECT_MEMORY_MODEL=y
219CONFIG_FLATMEM_MANUAL=y 173# CONFIG_FLATMEM_MANUAL is not set
220# CONFIG_DISCONTIGMEM_MANUAL is not set 174# CONFIG_DISCONTIGMEM_MANUAL is not set
221# CONFIG_SPARSEMEM_MANUAL is not set 175CONFIG_SPARSEMEM_MANUAL=y
222CONFIG_FLATMEM=y 176CONFIG_SPARSEMEM=y
223CONFIG_FLAT_NODE_MEM_MAP=y 177CONFIG_NEED_MULTIPLE_NODES=y
224# CONFIG_SPARSEMEM_STATIC is not set 178CONFIG_HAVE_MEMORY_PRESENT=y
179CONFIG_SPARSEMEM_STATIC=y
180# CONFIG_MEMORY_HOTPLUG is not set
225CONFIG_SPLIT_PTLOCK_CPUS=4 181CONFIG_SPLIT_PTLOCK_CPUS=4
182CONFIG_MIGRATION=y
226# CONFIG_RESOURCES_64BIT is not set 183# CONFIG_RESOURCES_64BIT is not set
227CONFIG_ZONE_DMA_FLAG=0 184CONFIG_ZONE_DMA_FLAG=0
185CONFIG_NR_QUICK=2
228 186
229# 187#
230# Cache configuration 188# Cache configuration
231# 189#
232# CONFIG_SH_DIRECT_MAPPED is not set 190# CONFIG_SH_DIRECT_MAPPED is not set
233# CONFIG_SH_WRITETHROUGH is not set 191# CONFIG_SH_WRITETHROUGH is not set
234# CONFIG_SH_OCRAM is not set
235CONFIG_CF_ENABLER=y
236# CONFIG_CF_AREA5 is not set
237CONFIG_CF_AREA6=y
238CONFIG_CF_BASE_ADDR=0xb8000000
239 192
240# 193#
241# Processor features 194# Processor features
@@ -252,12 +205,20 @@ CONFIG_CPU_HAS_SR_RB=y
252CONFIG_CPU_HAS_PTEA=y 205CONFIG_CPU_HAS_PTEA=y
253 206
254# 207#
208# Board support
209#
210CONFIG_SOLUTION_ENGINE=y
211CONFIG_SH_7722_SOLUTION_ENGINE=y
212
213#
255# Timer and clock configuration 214# Timer and clock configuration
256# 215#
257CONFIG_SH_TMU=y 216CONFIG_SH_TMU=y
258CONFIG_SH_TIMER_IRQ=16 217CONFIG_SH_TIMER_IRQ=16
259CONFIG_NO_IDLE_HZ=y
260CONFIG_SH_PCLK_FREQ=33333333 218CONFIG_SH_PCLK_FREQ=33333333
219CONFIG_TICK_ONESHOT=y
220CONFIG_NO_HZ=y
221CONFIG_HIGH_RES_TIMERS=y
261 222
262# 223#
263# CPU Frequency scaling 224# CPU Frequency scaling
@@ -272,7 +233,6 @@ CONFIG_SH_PCLK_FREQ=33333333
272# 233#
273# Companion Chips 234# Companion Chips
274# 235#
275# CONFIG_HD6446X_SERIES is not set
276 236
277# 237#
278# Additional SuperH Device Drivers 238# Additional SuperH Device Drivers
@@ -290,7 +250,6 @@ CONFIG_HZ_250=y
290CONFIG_HZ=250 250CONFIG_HZ=250
291CONFIG_KEXEC=y 251CONFIG_KEXEC=y
292# CONFIG_CRASH_DUMP is not set 252# CONFIG_CRASH_DUMP is not set
293# CONFIG_SMP is not set
294# CONFIG_PREEMPT_NONE is not set 253# CONFIG_PREEMPT_NONE is not set
295# CONFIG_PREEMPT_VOLUNTARY is not set 254# CONFIG_PREEMPT_VOLUNTARY is not set
296CONFIG_PREEMPT=y 255CONFIG_PREEMPT=y
@@ -307,7 +266,11 @@ CONFIG_BOOT_LINK_OFFSET=0x00800000
307# 266#
308# Bus options 267# Bus options
309# 268#
310# CONFIG_PCI is not set 269CONFIG_CF_ENABLER=y
270# CONFIG_CF_AREA5 is not set
271CONFIG_CF_AREA6=y
272CONFIG_CF_BASE_ADDR=0xb8000000
273# CONFIG_ARCH_SUPPORTS_MSI is not set
311 274
312# 275#
313# PCCARD (PCMCIA/CardBus) support 276# PCCARD (PCMCIA/CardBus) support
@@ -315,22 +278,12 @@ CONFIG_BOOT_LINK_OFFSET=0x00800000
315# CONFIG_PCCARD is not set 278# CONFIG_PCCARD is not set
316 279
317# 280#
318# PCI Hotplug Support
319#
320
321#
322# Executable file formats 281# Executable file formats
323# 282#
324CONFIG_BINFMT_ELF=y 283CONFIG_BINFMT_ELF=y
325# CONFIG_BINFMT_FLAT is not set
326# CONFIG_BINFMT_MISC is not set 284# CONFIG_BINFMT_MISC is not set
327 285
328# 286#
329# Power management options (EXPERIMENTAL)
330#
331# CONFIG_PM is not set
332
333#
334# Networking 287# Networking
335# 288#
336CONFIG_NET=y 289CONFIG_NET=y
@@ -338,7 +291,6 @@ CONFIG_NET=y
338# 291#
339# Networking options 292# Networking options
340# 293#
341# CONFIG_NETDEBUG is not set
342CONFIG_PACKET=y 294CONFIG_PACKET=y
343CONFIG_PACKET_MMAP=y 295CONFIG_PACKET_MMAP=y
344CONFIG_UNIX=y 296CONFIG_UNIX=y
@@ -375,20 +327,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
375# CONFIG_INET6_TUNNEL is not set 327# CONFIG_INET6_TUNNEL is not set
376# CONFIG_NETWORK_SECMARK is not set 328# CONFIG_NETWORK_SECMARK is not set
377# CONFIG_NETFILTER is not set 329# CONFIG_NETFILTER is not set
378
379#
380# DCCP Configuration (EXPERIMENTAL)
381#
382# CONFIG_IP_DCCP is not set 330# CONFIG_IP_DCCP is not set
383
384#
385# SCTP Configuration (EXPERIMENTAL)
386#
387# CONFIG_IP_SCTP is not set 331# CONFIG_IP_SCTP is not set
388
389#
390# TIPC Configuration (EXPERIMENTAL)
391#
392# CONFIG_TIPC is not set 332# CONFIG_TIPC is not set
393# CONFIG_ATM is not set 333# CONFIG_ATM is not set
394# CONFIG_BRIDGE is not set 334# CONFIG_BRIDGE is not set
@@ -414,7 +354,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
414# CONFIG_HAMRADIO is not set 354# CONFIG_HAMRADIO is not set
415# CONFIG_IRDA is not set 355# CONFIG_IRDA is not set
416# CONFIG_BT is not set 356# CONFIG_BT is not set
357# CONFIG_AF_RXRPC is not set
358
359#
360# Wireless
361#
362# CONFIG_CFG80211 is not set
363# CONFIG_WIRELESS_EXT is not set
364# CONFIG_MAC80211 is not set
417# CONFIG_IEEE80211 is not set 365# CONFIG_IEEE80211 is not set
366# CONFIG_RFKILL is not set
418 367
419# 368#
420# Device Drivers 369# Device Drivers
@@ -432,10 +381,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
432# Connector - unified userspace <-> kernelspace linker 381# Connector - unified userspace <-> kernelspace linker
433# 382#
434# CONFIG_CONNECTOR is not set 383# CONFIG_CONNECTOR is not set
435
436#
437# Memory Technology Devices (MTD)
438#
439# CONFIG_MTD is not set 384# CONFIG_MTD is not set
440 385
441# 386#
@@ -464,10 +409,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
464# 409#
465# Misc devices 410# Misc devices
466# 411#
467 412# CONFIG_BLINK is not set
468#
469# ATA/ATAPI/MFM/RLL support
470#
471# CONFIG_IDE is not set 413# CONFIG_IDE is not set
472 414
473# 415#
@@ -496,6 +438,7 @@ CONFIG_BLK_DEV_SD=y
496# CONFIG_SCSI_CONSTANTS is not set 438# CONFIG_SCSI_CONSTANTS is not set
497# CONFIG_SCSI_LOGGING is not set 439# CONFIG_SCSI_LOGGING is not set
498# CONFIG_SCSI_SCAN_ASYNC is not set 440# CONFIG_SCSI_SCAN_ASYNC is not set
441CONFIG_SCSI_WAIT_SCAN=m
499 442
500# 443#
501# SCSI Transports 444# SCSI Transports
@@ -511,10 +454,6 @@ CONFIG_BLK_DEV_SD=y
511# 454#
512# CONFIG_ISCSI_TCP is not set 455# CONFIG_ISCSI_TCP is not set
513# CONFIG_SCSI_DEBUG is not set 456# CONFIG_SCSI_DEBUG is not set
514
515#
516# Serial ATA (prod) and Parallel ATA (experimental) drivers
517#
518CONFIG_ATA=y 457CONFIG_ATA=y
519# CONFIG_ATA_NONSTANDARD is not set 458# CONFIG_ATA_NONSTANDARD is not set
520CONFIG_PATA_PLATFORM=y 459CONFIG_PATA_PLATFORM=y
@@ -525,19 +464,6 @@ CONFIG_PATA_PLATFORM=y
525# CONFIG_MD is not set 464# CONFIG_MD is not set
526 465
527# 466#
528# Fusion MPT device support
529#
530# CONFIG_FUSION is not set
531
532#
533# IEEE 1394 (FireWire) support
534#
535
536#
537# I2O device support
538#
539
540#
541# Network device support 467# Network device support
542# 468#
543CONFIG_NETDEVICES=y 469CONFIG_NETDEVICES=y
@@ -545,10 +471,6 @@ CONFIG_NETDEVICES=y
545# CONFIG_BONDING is not set 471# CONFIG_BONDING is not set
546# CONFIG_EQUALIZER is not set 472# CONFIG_EQUALIZER is not set
547# CONFIG_TUN is not set 473# CONFIG_TUN is not set
548
549#
550# PHY device support
551#
552# CONFIG_PHYLIB is not set 474# CONFIG_PHYLIB is not set
553 475
554# 476#
@@ -558,27 +480,14 @@ CONFIG_NET_ETHERNET=y
558CONFIG_MII=y 480CONFIG_MII=y
559# CONFIG_STNIC is not set 481# CONFIG_STNIC is not set
560CONFIG_SMC91X=y 482CONFIG_SMC91X=y
483CONFIG_NETDEV_1000=y
484CONFIG_NETDEV_10000=y
561 485
562# 486#
563# Ethernet (1000 Mbit) 487# Wireless LAN
564#
565
566#
567# Ethernet (10000 Mbit)
568#
569
570#
571# Token Ring devices
572#
573
574#
575# Wireless LAN (non-hamradio)
576#
577# CONFIG_NET_RADIO is not set
578
579#
580# Wan interfaces
581# 488#
489# CONFIG_WLAN_PRE80211 is not set
490# CONFIG_WLAN_80211 is not set
582# CONFIG_WAN is not set 491# CONFIG_WAN is not set
583# CONFIG_PPP is not set 492# CONFIG_PPP is not set
584# CONFIG_SLIP is not set 493# CONFIG_SLIP is not set
@@ -627,6 +536,7 @@ CONFIG_KEYBOARD_ATKBD=y
627# CONFIG_KEYBOARD_STOWAWAY is not set 536# CONFIG_KEYBOARD_STOWAWAY is not set
628# CONFIG_INPUT_MOUSE is not set 537# CONFIG_INPUT_MOUSE is not set
629# CONFIG_INPUT_JOYSTICK is not set 538# CONFIG_INPUT_JOYSTICK is not set
539# CONFIG_INPUT_TABLET is not set
630# CONFIG_INPUT_TOUCHSCREEN is not set 540# CONFIG_INPUT_TOUCHSCREEN is not set
631# CONFIG_INPUT_MISC is not set 541# CONFIG_INPUT_MISC is not set
632 542
@@ -667,14 +577,8 @@ CONFIG_LEGACY_PTY_COUNT=256
667# IPMI 577# IPMI
668# 578#
669# CONFIG_IPMI_HANDLER is not set 579# CONFIG_IPMI_HANDLER is not set
670
671#
672# Watchdog Cards
673#
674# CONFIG_WATCHDOG is not set 580# CONFIG_WATCHDOG is not set
675CONFIG_HW_RANDOM=y 581CONFIG_HW_RANDOM=y
676# CONFIG_GEN_RTC is not set
677# CONFIG_DTLK is not set
678# CONFIG_R3964 is not set 582# CONFIG_R3964 is not set
679# CONFIG_RAW_DRIVER is not set 583# CONFIG_RAW_DRIVER is not set
680 584
@@ -682,10 +586,6 @@ CONFIG_HW_RANDOM=y
682# TPM devices 586# TPM devices
683# 587#
684# CONFIG_TCG_TPM is not set 588# CONFIG_TCG_TPM is not set
685
686#
687# I2C support
688#
689# CONFIG_I2C is not set 589# CONFIG_I2C is not set
690 590
691# 591#
@@ -698,16 +598,15 @@ CONFIG_HW_RANDOM=y
698# Dallas's 1-wire bus 598# Dallas's 1-wire bus
699# 599#
700# CONFIG_W1 is not set 600# CONFIG_W1 is not set
701
702#
703# Hardware Monitoring support
704#
705CONFIG_HWMON=y 601CONFIG_HWMON=y
706# CONFIG_HWMON_VID is not set 602# CONFIG_HWMON_VID is not set
707# CONFIG_SENSORS_ABITUGURU is not set 603# CONFIG_SENSORS_ABITUGURU is not set
708# CONFIG_SENSORS_F71805F is not set 604# CONFIG_SENSORS_F71805F is not set
709# CONFIG_SENSORS_PC87427 is not set 605# CONFIG_SENSORS_PC87427 is not set
606# CONFIG_SENSORS_SMSC47M1 is not set
607# CONFIG_SENSORS_SMSC47B397 is not set
710# CONFIG_SENSORS_VT1211 is not set 608# CONFIG_SENSORS_VT1211 is not set
609# CONFIG_SENSORS_W83627HF is not set
711# CONFIG_HWMON_DEBUG_CHIP is not set 610# CONFIG_HWMON_DEBUG_CHIP is not set
712 611
713# 612#
@@ -719,16 +618,19 @@ CONFIG_HWMON=y
719# Multimedia devices 618# Multimedia devices
720# 619#
721# CONFIG_VIDEO_DEV is not set 620# CONFIG_VIDEO_DEV is not set
621# CONFIG_DVB_CORE is not set
622CONFIG_DAB=y
722 623
723# 624#
724# Digital Video Broadcasting Devices 625# Graphics support
725# 626#
726# CONFIG_DVB is not set 627# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
727 628
728# 629#
729# Graphics support 630# Display device support
730# 631#
731# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 632# CONFIG_DISPLAY_SUPPORT is not set
633# CONFIG_VGASTATE is not set
732# CONFIG_FB is not set 634# CONFIG_FB is not set
733 635
734# 636#
@@ -757,10 +659,6 @@ CONFIG_HID=y
757# USB Gadget Support 659# USB Gadget Support
758# 660#
759# CONFIG_USB_GADGET is not set 661# CONFIG_USB_GADGET is not set
760
761#
762# MMC/SD Card support
763#
764# CONFIG_MMC is not set 662# CONFIG_MMC is not set
765 663
766# 664#
@@ -800,18 +698,30 @@ CONFIG_RTC_INTF_SYSFS=y
800CONFIG_RTC_INTF_PROC=y 698CONFIG_RTC_INTF_PROC=y
801CONFIG_RTC_INTF_DEV=y 699CONFIG_RTC_INTF_DEV=y
802# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 700# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
701# CONFIG_RTC_DRV_TEST is not set
803 702
804# 703#
805# RTC drivers 704# I2C RTC drivers
705#
706
707#
708# SPI RTC drivers
709#
710
711#
712# Platform RTC drivers
806# 713#
807# CONFIG_RTC_DRV_DS1553 is not set 714# CONFIG_RTC_DRV_DS1553 is not set
808# CONFIG_RTC_DRV_DS1742 is not set 715# CONFIG_RTC_DRV_DS1742 is not set
809# CONFIG_RTC_DRV_M48T86 is not set 716# CONFIG_RTC_DRV_M48T86 is not set
810CONFIG_RTC_DRV_SH=y
811# CONFIG_RTC_DRV_TEST is not set
812# CONFIG_RTC_DRV_V3020 is not set 717# CONFIG_RTC_DRV_V3020 is not set
813 718
814# 719#
720# on-CPU RTC drivers
721#
722CONFIG_RTC_DRV_SH=y
723
724#
815# DMA Engine support 725# DMA Engine support
816# 726#
817# CONFIG_DMA_ENGINE is not set 727# CONFIG_DMA_ENGINE is not set
@@ -825,14 +735,6 @@ CONFIG_RTC_DRV_SH=y
825# 735#
826 736
827# 737#
828# Auxiliary Display support
829#
830
831#
832# Virtualization
833#
834
835#
836# File systems 738# File systems
837# 739#
838CONFIG_EXT2_FS=y 740CONFIG_EXT2_FS=y
@@ -937,23 +839,24 @@ CONFIG_MSDOS_PARTITION=y
937# 839#
938# Profiling support 840# Profiling support
939# 841#
940# CONFIG_PROFILING is not set 842CONFIG_PROFILING=y
843# CONFIG_OPROFILE is not set
941 844
942# 845#
943# Kernel hacking 846# Kernel hacking
944# 847#
945CONFIG_TRACE_IRQFLAGS_SUPPORT=y 848CONFIG_TRACE_IRQFLAGS_SUPPORT=y
946# CONFIG_PRINTK_TIME is not set 849CONFIG_PRINTK_TIME=y
947# CONFIG_ENABLE_MUST_CHECK is not set 850# CONFIG_ENABLE_MUST_CHECK is not set
948# CONFIG_MAGIC_SYSRQ is not set 851CONFIG_MAGIC_SYSRQ=y
949# CONFIG_UNUSED_SYMBOLS is not set 852# CONFIG_UNUSED_SYMBOLS is not set
950# CONFIG_DEBUG_FS is not set 853CONFIG_DEBUG_FS=y
951# CONFIG_HEADERS_CHECK is not set 854# CONFIG_HEADERS_CHECK is not set
952# CONFIG_DEBUG_KERNEL is not set 855# CONFIG_DEBUG_KERNEL is not set
953CONFIG_LOG_BUF_SHIFT=14
954# CONFIG_DEBUG_BUGVERBOSE is not set 856# CONFIG_DEBUG_BUGVERBOSE is not set
955# CONFIG_SH_STANDARD_BIOS is not set 857CONFIG_SH_STANDARD_BIOS=y
956# CONFIG_EARLY_SCIF_CONSOLE is not set 858# CONFIG_EARLY_SCIF_CONSOLE is not set
859# CONFIG_EARLY_PRINTK is not set
957# CONFIG_SH_KGDB is not set 860# CONFIG_SH_KGDB is not set
958 861
959# 862#
@@ -973,8 +876,10 @@ CONFIG_LOG_BUF_SHIFT=14
973CONFIG_BITREVERSE=y 876CONFIG_BITREVERSE=y
974# CONFIG_CRC_CCITT is not set 877# CONFIG_CRC_CCITT is not set
975# CONFIG_CRC16 is not set 878# CONFIG_CRC16 is not set
879# CONFIG_CRC_ITU_T is not set
976CONFIG_CRC32=y 880CONFIG_CRC32=y
977# CONFIG_LIBCRC32C is not set 881# CONFIG_LIBCRC32C is not set
978CONFIG_PLIST=y 882CONFIG_PLIST=y
979CONFIG_HAS_IOMEM=y 883CONFIG_HAS_IOMEM=y
980CONFIG_HAS_IOPORT=y 884CONFIG_HAS_IOPORT=y
885CONFIG_HAS_DMA=y
diff --git a/arch/sh/configs/shx3_defconfig b/arch/sh/configs/shx3_defconfig
new file mode 100644
index 0000000000..219bad558b
--- /dev/null
+++ b/arch/sh/configs/shx3_defconfig
@@ -0,0 +1,756 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc4
4# Wed Jun 20 14:09:27 2007
5#
6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8CONFIG_GENERIC_BUG=y
9CONFIG_GENERIC_FIND_NEXT_BIT=y
10CONFIG_GENERIC_HWEIGHT=y
11CONFIG_GENERIC_HARDIRQS=y
12CONFIG_GENERIC_IRQ_PROBE=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y
14CONFIG_GENERIC_TIME=y
15CONFIG_GENERIC_CLOCKEVENTS=y
16CONFIG_STACKTRACE_SUPPORT=y
17CONFIG_LOCKDEP_SUPPORT=y
18# CONFIG_ARCH_HAS_ILOG2_U32 is not set
19# CONFIG_ARCH_HAS_ILOG2_U64 is not set
20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
21
22#
23# Code maturity level options
24#
25CONFIG_EXPERIMENTAL=y
26CONFIG_BROKEN_ON_SMP=y
27CONFIG_LOCK_KERNEL=y
28CONFIG_INIT_ENV_ARG_LIMIT=32
29
30#
31# General setup
32#
33CONFIG_LOCALVERSION=""
34CONFIG_LOCALVERSION_AUTO=y
35CONFIG_SWAP=y
36CONFIG_SYSVIPC=y
37# CONFIG_IPC_NS is not set
38CONFIG_SYSVIPC_SYSCTL=y
39CONFIG_BSD_PROCESS_ACCT=y
40# CONFIG_BSD_PROCESS_ACCT_V3 is not set
41# CONFIG_UTS_NS is not set
42CONFIG_IKCONFIG=y
43CONFIG_IKCONFIG_PROC=y
44CONFIG_LOG_BUF_SHIFT=14
45# CONFIG_SYSFS_DEPRECATED is not set
46# CONFIG_RELAY is not set
47CONFIG_BLK_DEV_INITRD=y
48CONFIG_INITRAMFS_SOURCE=""
49CONFIG_CC_OPTIMIZE_FOR_SIZE=y
50CONFIG_SYSCTL=y
51CONFIG_EMBEDDED=y
52CONFIG_UID16=y
53CONFIG_SYSCTL_SYSCALL=y
54CONFIG_KALLSYMS=y
55CONFIG_KALLSYMS_ALL=y
56# CONFIG_KALLSYMS_EXTRA_PASS is not set
57CONFIG_HOTPLUG=y
58CONFIG_PRINTK=y
59CONFIG_BUG=y
60CONFIG_ELF_CORE=y
61CONFIG_BASE_FULL=y
62CONFIG_FUTEX=y
63CONFIG_ANON_INODES=y
64CONFIG_EPOLL=y
65CONFIG_SIGNALFD=y
66CONFIG_TIMERFD=y
67CONFIG_EVENTFD=y
68CONFIG_SHMEM=y
69CONFIG_VM_EVENT_COUNTERS=y
70CONFIG_SLAB=y
71# CONFIG_SLUB is not set
72# CONFIG_SLOB is not set
73CONFIG_RT_MUTEXES=y
74# CONFIG_TINY_SHMEM is not set
75CONFIG_BASE_SMALL=0
76
77#
78# Loadable module support
79#
80CONFIG_MODULES=y
81CONFIG_MODULE_UNLOAD=y
82# CONFIG_MODULE_FORCE_UNLOAD is not set
83# CONFIG_MODVERSIONS is not set
84# CONFIG_MODULE_SRCVERSION_ALL is not set
85CONFIG_KMOD=y
86
87#
88# Block layer
89#
90CONFIG_BLOCK=y
91# CONFIG_LBD is not set
92# CONFIG_BLK_DEV_IO_TRACE is not set
93# CONFIG_LSF is not set
94
95#
96# IO Schedulers
97#
98CONFIG_IOSCHED_NOOP=y
99# CONFIG_IOSCHED_AS is not set
100# CONFIG_IOSCHED_DEADLINE is not set
101# CONFIG_IOSCHED_CFQ is not set
102# CONFIG_DEFAULT_AS is not set
103# CONFIG_DEFAULT_DEADLINE is not set
104# CONFIG_DEFAULT_CFQ is not set
105CONFIG_DEFAULT_NOOP=y
106CONFIG_DEFAULT_IOSCHED="noop"
107
108#
109# System type
110#
111CONFIG_CPU_SH4=y
112CONFIG_CPU_SH4A=y
113CONFIG_CPU_SHX3=y
114# CONFIG_CPU_SUBTYPE_SH7619 is not set
115# CONFIG_CPU_SUBTYPE_SH7206 is not set
116# CONFIG_CPU_SUBTYPE_SH7300 is not set
117# CONFIG_CPU_SUBTYPE_SH7705 is not set
118# CONFIG_CPU_SUBTYPE_SH7706 is not set
119# CONFIG_CPU_SUBTYPE_SH7707 is not set
120# CONFIG_CPU_SUBTYPE_SH7708 is not set
121# CONFIG_CPU_SUBTYPE_SH7709 is not set
122# CONFIG_CPU_SUBTYPE_SH7710 is not set
123# CONFIG_CPU_SUBTYPE_SH7712 is not set
124# CONFIG_CPU_SUBTYPE_SH7750 is not set
125# CONFIG_CPU_SUBTYPE_SH7091 is not set
126# CONFIG_CPU_SUBTYPE_SH7750R is not set
127# CONFIG_CPU_SUBTYPE_SH7750S is not set
128# CONFIG_CPU_SUBTYPE_SH7751 is not set
129# CONFIG_CPU_SUBTYPE_SH7751R is not set
130# CONFIG_CPU_SUBTYPE_SH7760 is not set
131# CONFIG_CPU_SUBTYPE_SH4_202 is not set
132# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
133# CONFIG_CPU_SUBTYPE_ST40GX1 is not set
134# CONFIG_CPU_SUBTYPE_SH7770 is not set
135# CONFIG_CPU_SUBTYPE_SH7780 is not set
136# CONFIG_CPU_SUBTYPE_SH7785 is not set
137CONFIG_CPU_SUBTYPE_SHX3=y
138# CONFIG_CPU_SUBTYPE_SH73180 is not set
139# CONFIG_CPU_SUBTYPE_SH7343 is not set
140# CONFIG_CPU_SUBTYPE_SH7722 is not set
141
142#
143# Memory management options
144#
145CONFIG_QUICKLIST=y
146CONFIG_MMU=y
147CONFIG_PAGE_OFFSET=0x80000000
148CONFIG_MEMORY_START=0x0c000000
149CONFIG_MEMORY_SIZE=0x04000000
150CONFIG_VSYSCALL=y
151CONFIG_ARCH_FLATMEM_ENABLE=y
152CONFIG_ARCH_SPARSEMEM_ENABLE=y
153CONFIG_ARCH_SPARSEMEM_DEFAULT=y
154CONFIG_MAX_ACTIVE_REGIONS=1
155CONFIG_ARCH_POPULATES_NODE_MAP=y
156CONFIG_ARCH_SELECT_MEMORY_MODEL=y
157CONFIG_PAGE_SIZE_4KB=y
158# CONFIG_PAGE_SIZE_8KB is not set
159# CONFIG_PAGE_SIZE_64KB is not set
160CONFIG_HUGETLB_PAGE_SIZE_64K=y
161# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
162# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
163# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set
164# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set
165CONFIG_SELECT_MEMORY_MODEL=y
166CONFIG_FLATMEM_MANUAL=y
167# CONFIG_DISCONTIGMEM_MANUAL is not set
168# CONFIG_SPARSEMEM_MANUAL is not set
169CONFIG_FLATMEM=y
170CONFIG_FLAT_NODE_MEM_MAP=y
171CONFIG_SPARSEMEM_STATIC=y
172CONFIG_SPLIT_PTLOCK_CPUS=4
173# CONFIG_RESOURCES_64BIT is not set
174CONFIG_ZONE_DMA_FLAG=0
175CONFIG_NR_QUICK=2
176
177#
178# Cache configuration
179#
180# CONFIG_SH_DIRECT_MAPPED is not set
181# CONFIG_SH_WRITETHROUGH is not set
182
183#
184# Processor features
185#
186CONFIG_CPU_LITTLE_ENDIAN=y
187# CONFIG_CPU_BIG_ENDIAN is not set
188# CONFIG_SH_FPU is not set
189# CONFIG_SH_FPU_EMU is not set
190CONFIG_SH_DSP=y
191CONFIG_SH_STORE_QUEUES=y
192CONFIG_CPU_HAS_INTEVT=y
193CONFIG_CPU_HAS_INTC2_IRQ=y
194CONFIG_CPU_HAS_SR_RB=y
195
196#
197# Board support
198#
199
200#
201# Timer and clock configuration
202#
203CONFIG_SH_TMU=y
204CONFIG_SH_TIMER_IRQ=16
205CONFIG_SH_PCLK_FREQ=50000000
206CONFIG_TICK_ONESHOT=y
207CONFIG_NO_HZ=y
208CONFIG_HIGH_RES_TIMERS=y
209
210#
211# CPU Frequency scaling
212#
213# CONFIG_CPU_FREQ is not set
214
215#
216# DMA support
217#
218# CONFIG_SH_DMA is not set
219
220#
221# Companion Chips
222#
223
224#
225# Additional SuperH Device Drivers
226#
227CONFIG_HEARTBEAT=y
228# CONFIG_PUSH_SWITCH is not set
229
230#
231# Kernel features
232#
233# CONFIG_HZ_100 is not set
234CONFIG_HZ_250=y
235# CONFIG_HZ_300 is not set
236# CONFIG_HZ_1000 is not set
237CONFIG_HZ=250
238CONFIG_KEXEC=y
239# CONFIG_CRASH_DUMP is not set
240# CONFIG_PREEMPT_NONE is not set
241# CONFIG_PREEMPT_VOLUNTARY is not set
242CONFIG_PREEMPT=y
243CONFIG_PREEMPT_BKL=y
244
245#
246# Boot options
247#
248CONFIG_ZERO_PAGE_OFFSET=0x00001000
249CONFIG_BOOT_LINK_OFFSET=0x00800000
250# CONFIG_UBC_WAKEUP is not set
251CONFIG_CMDLINE_BOOL=y
252CONFIG_CMDLINE="console=ttySC0,115200 ip=192.168.1.2:::255.255.255.0 root=/dev/nfs nfsroot=192.168.1.1:/exports/devel/rfs/mobiler noaliencache earlyprintk=bios ignore_loglevel"
253
254#
255# Bus options
256#
257# CONFIG_ARCH_SUPPORTS_MSI is not set
258
259#
260# PCCARD (PCMCIA/CardBus) support
261#
262# CONFIG_PCCARD is not set
263
264#
265# Executable file formats
266#
267CONFIG_BINFMT_ELF=y
268# CONFIG_BINFMT_MISC is not set
269
270#
271# Networking
272#
273# CONFIG_NET is not set
274
275#
276# Device Drivers
277#
278
279#
280# Generic Driver Options
281#
282CONFIG_STANDALONE=y
283CONFIG_PREVENT_FIRMWARE_BUILD=y
284# CONFIG_FW_LOADER is not set
285# CONFIG_DEBUG_DRIVER is not set
286# CONFIG_DEBUG_DEVRES is not set
287# CONFIG_SYS_HYPERVISOR is not set
288
289#
290# Connector - unified userspace <-> kernelspace linker
291#
292# CONFIG_MTD is not set
293
294#
295# Parallel port support
296#
297# CONFIG_PARPORT is not set
298
299#
300# Plug and Play support
301#
302# CONFIG_PNPACPI is not set
303
304#
305# Block devices
306#
307# CONFIG_BLK_DEV_COW_COMMON is not set
308# CONFIG_BLK_DEV_LOOP is not set
309CONFIG_BLK_DEV_RAM=y
310CONFIG_BLK_DEV_RAM_COUNT=16
311CONFIG_BLK_DEV_RAM_SIZE=4096
312CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
313# CONFIG_CDROM_PKTCDVD is not set
314
315#
316# Misc devices
317#
318# CONFIG_BLINK is not set
319# CONFIG_IDE is not set
320
321#
322# SCSI device support
323#
324# CONFIG_RAID_ATTRS is not set
325CONFIG_SCSI=y
326# CONFIG_SCSI_TGT is not set
327# CONFIG_SCSI_NETLINK is not set
328CONFIG_SCSI_PROC_FS=y
329
330#
331# SCSI support type (disk, tape, CD-ROM)
332#
333CONFIG_BLK_DEV_SD=y
334# CONFIG_CHR_DEV_ST is not set
335# CONFIG_CHR_DEV_OSST is not set
336# CONFIG_BLK_DEV_SR is not set
337# CONFIG_CHR_DEV_SG is not set
338# CONFIG_CHR_DEV_SCH is not set
339
340#
341# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
342#
343# CONFIG_SCSI_MULTI_LUN is not set
344# CONFIG_SCSI_CONSTANTS is not set
345# CONFIG_SCSI_LOGGING is not set
346# CONFIG_SCSI_SCAN_ASYNC is not set
347CONFIG_SCSI_WAIT_SCAN=m
348
349#
350# SCSI Transports
351#
352# CONFIG_SCSI_SPI_ATTRS is not set
353# CONFIG_SCSI_FC_ATTRS is not set
354# CONFIG_SCSI_SAS_ATTRS is not set
355# CONFIG_SCSI_SAS_LIBSAS is not set
356
357#
358# SCSI low-level drivers
359#
360# CONFIG_SCSI_DEBUG is not set
361CONFIG_ATA=y
362# CONFIG_ATA_NONSTANDARD is not set
363CONFIG_PATA_PLATFORM=y
364
365#
366# Multi-device support (RAID and LVM)
367#
368# CONFIG_MD is not set
369
370#
371# ISDN subsystem
372#
373
374#
375# Telephony Support
376#
377# CONFIG_PHONE is not set
378
379#
380# Input device support
381#
382CONFIG_INPUT=y
383# CONFIG_INPUT_FF_MEMLESS is not set
384
385#
386# Userland interfaces
387#
388CONFIG_INPUT_MOUSEDEV=y
389# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
390CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
391CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
392# CONFIG_INPUT_JOYDEV is not set
393# CONFIG_INPUT_TSDEV is not set
394# CONFIG_INPUT_EVDEV is not set
395# CONFIG_INPUT_EVBUG is not set
396
397#
398# Input Device Drivers
399#
400CONFIG_INPUT_KEYBOARD=y
401CONFIG_KEYBOARD_ATKBD=y
402# CONFIG_KEYBOARD_SUNKBD is not set
403# CONFIG_KEYBOARD_LKKBD is not set
404# CONFIG_KEYBOARD_XTKBD is not set
405# CONFIG_KEYBOARD_NEWTON is not set
406# CONFIG_KEYBOARD_STOWAWAY is not set
407# CONFIG_INPUT_MOUSE is not set
408# CONFIG_INPUT_JOYSTICK is not set
409# CONFIG_INPUT_TABLET is not set
410# CONFIG_INPUT_TOUCHSCREEN is not set
411# CONFIG_INPUT_MISC is not set
412
413#
414# Hardware I/O ports
415#
416CONFIG_SERIO=y
417# CONFIG_SERIO_I8042 is not set
418# CONFIG_SERIO_SERPORT is not set
419CONFIG_SERIO_LIBPS2=y
420# CONFIG_SERIO_RAW is not set
421# CONFIG_GAMEPORT is not set
422
423#
424# Character devices
425#
426# CONFIG_VT is not set
427# CONFIG_SERIAL_NONSTANDARD is not set
428
429#
430# Serial drivers
431#
432# CONFIG_SERIAL_8250 is not set
433
434#
435# Non-8250 serial port support
436#
437CONFIG_SERIAL_SH_SCI=y
438CONFIG_SERIAL_SH_SCI_NR_UARTS=2
439CONFIG_SERIAL_SH_SCI_CONSOLE=y
440CONFIG_SERIAL_CORE=y
441CONFIG_SERIAL_CORE_CONSOLE=y
442CONFIG_UNIX98_PTYS=y
443CONFIG_LEGACY_PTYS=y
444CONFIG_LEGACY_PTY_COUNT=256
445
446#
447# IPMI
448#
449# CONFIG_IPMI_HANDLER is not set
450# CONFIG_WATCHDOG is not set
451CONFIG_HW_RANDOM=y
452# CONFIG_R3964 is not set
453# CONFIG_RAW_DRIVER is not set
454
455#
456# TPM devices
457#
458# CONFIG_TCG_TPM is not set
459# CONFIG_I2C is not set
460
461#
462# SPI support
463#
464# CONFIG_SPI is not set
465# CONFIG_SPI_MASTER is not set
466
467#
468# Dallas's 1-wire bus
469#
470# CONFIG_W1 is not set
471# CONFIG_HWMON is not set
472
473#
474# Multifunction device drivers
475#
476# CONFIG_MFD_SM501 is not set
477
478#
479# Multimedia devices
480#
481# CONFIG_VIDEO_DEV is not set
482# CONFIG_DAB is not set
483
484#
485# Graphics support
486#
487# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
488
489#
490# Display device support
491#
492# CONFIG_DISPLAY_SUPPORT is not set
493# CONFIG_VGASTATE is not set
494# CONFIG_FB is not set
495
496#
497# Sound
498#
499# CONFIG_SOUND is not set
500
501#
502# HID Devices
503#
504# CONFIG_HID is not set
505
506#
507# USB support
508#
509# CONFIG_USB_ARCH_HAS_HCD is not set
510# CONFIG_USB_ARCH_HAS_OHCI is not set
511# CONFIG_USB_ARCH_HAS_EHCI is not set
512
513#
514# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
515#
516
517#
518# USB Gadget Support
519#
520# CONFIG_USB_GADGET is not set
521# CONFIG_MMC is not set
522
523#
524# LED devices
525#
526# CONFIG_NEW_LEDS is not set
527
528#
529# LED drivers
530#
531
532#
533# LED Triggers
534#
535
536#
537# InfiniBand support
538#
539
540#
541# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
542#
543
544#
545# Real Time Clock
546#
547CONFIG_RTC_LIB=y
548CONFIG_RTC_CLASS=y
549CONFIG_RTC_HCTOSYS=y
550CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
551# CONFIG_RTC_DEBUG is not set
552
553#
554# RTC interfaces
555#
556CONFIG_RTC_INTF_SYSFS=y
557CONFIG_RTC_INTF_PROC=y
558CONFIG_RTC_INTF_DEV=y
559# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
560# CONFIG_RTC_DRV_TEST is not set
561
562#
563# I2C RTC drivers
564#
565
566#
567# SPI RTC drivers
568#
569
570#
571# Platform RTC drivers
572#
573# CONFIG_RTC_DRV_DS1553 is not set
574# CONFIG_RTC_DRV_DS1742 is not set
575# CONFIG_RTC_DRV_M48T86 is not set
576# CONFIG_RTC_DRV_V3020 is not set
577
578#
579# on-CPU RTC drivers
580#
581CONFIG_RTC_DRV_SH=y
582
583#
584# DMA Engine support
585#
586# CONFIG_DMA_ENGINE is not set
587
588#
589# DMA Clients
590#
591
592#
593# DMA Devices
594#
595
596#
597# File systems
598#
599CONFIG_EXT2_FS=y
600# CONFIG_EXT2_FS_XATTR is not set
601# CONFIG_EXT2_FS_XIP is not set
602CONFIG_EXT3_FS=y
603CONFIG_EXT3_FS_XATTR=y
604# CONFIG_EXT3_FS_POSIX_ACL is not set
605# CONFIG_EXT3_FS_SECURITY is not set
606# CONFIG_EXT4DEV_FS is not set
607CONFIG_JBD=y
608# CONFIG_JBD_DEBUG is not set
609CONFIG_FS_MBCACHE=y
610# CONFIG_REISERFS_FS is not set
611# CONFIG_JFS_FS is not set
612# CONFIG_FS_POSIX_ACL is not set
613# CONFIG_XFS_FS is not set
614# CONFIG_GFS2_FS is not set
615# CONFIG_MINIX_FS is not set
616# CONFIG_ROMFS_FS is not set
617CONFIG_INOTIFY=y
618CONFIG_INOTIFY_USER=y
619# CONFIG_QUOTA is not set
620CONFIG_DNOTIFY=y
621# CONFIG_AUTOFS_FS is not set
622# CONFIG_AUTOFS4_FS is not set
623# CONFIG_FUSE_FS is not set
624
625#
626# CD-ROM/DVD Filesystems
627#
628# CONFIG_ISO9660_FS is not set
629# CONFIG_UDF_FS is not set
630
631#
632# DOS/FAT/NT Filesystems
633#
634# CONFIG_MSDOS_FS is not set
635# CONFIG_VFAT_FS is not set
636# CONFIG_NTFS_FS is not set
637
638#
639# Pseudo filesystems
640#
641CONFIG_PROC_FS=y
642CONFIG_PROC_KCORE=y
643CONFIG_PROC_SYSCTL=y
644CONFIG_SYSFS=y
645CONFIG_TMPFS=y
646# CONFIG_TMPFS_POSIX_ACL is not set
647CONFIG_HUGETLBFS=y
648CONFIG_HUGETLB_PAGE=y
649CONFIG_RAMFS=y
650# CONFIG_CONFIGFS_FS is not set
651
652#
653# Miscellaneous filesystems
654#
655# CONFIG_ADFS_FS is not set
656# CONFIG_AFFS_FS is not set
657# CONFIG_HFS_FS is not set
658# CONFIG_HFSPLUS_FS is not set
659# CONFIG_BEFS_FS is not set
660# CONFIG_BFS_FS is not set
661# CONFIG_EFS_FS is not set
662# CONFIG_CRAMFS is not set
663# CONFIG_VXFS_FS is not set
664# CONFIG_HPFS_FS is not set
665# CONFIG_QNX4FS_FS is not set
666# CONFIG_SYSV_FS is not set
667# CONFIG_UFS_FS is not set
668
669#
670# Partition Types
671#
672# CONFIG_PARTITION_ADVANCED is not set
673CONFIG_MSDOS_PARTITION=y
674
675#
676# Native Language Support
677#
678# CONFIG_NLS is not set
679
680#
681# Profiling support
682#
683CONFIG_PROFILING=y
684# CONFIG_OPROFILE is not set
685
686#
687# Kernel hacking
688#
689CONFIG_TRACE_IRQFLAGS_SUPPORT=y
690CONFIG_PRINTK_TIME=y
691# CONFIG_ENABLE_MUST_CHECK is not set
692CONFIG_MAGIC_SYSRQ=y
693# CONFIG_UNUSED_SYMBOLS is not set
694CONFIG_DEBUG_FS=y
695# CONFIG_HEADERS_CHECK is not set
696CONFIG_DEBUG_KERNEL=y
697# CONFIG_DEBUG_SHIRQ is not set
698CONFIG_DETECT_SOFTLOCKUP=y
699# CONFIG_SCHEDSTATS is not set
700# CONFIG_TIMER_STATS is not set
701CONFIG_DEBUG_SLAB=y
702CONFIG_DEBUG_SLAB_LEAK=y
703CONFIG_DEBUG_PREEMPT=y
704# CONFIG_DEBUG_RT_MUTEXES is not set
705# CONFIG_RT_MUTEX_TESTER is not set
706CONFIG_DEBUG_SPINLOCK=y
707CONFIG_DEBUG_MUTEXES=y
708CONFIG_DEBUG_LOCK_ALLOC=y
709# CONFIG_PROVE_LOCKING is not set
710CONFIG_LOCKDEP=y
711CONFIG_DEBUG_LOCKDEP=y
712# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
713# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
714CONFIG_STACKTRACE=y
715# CONFIG_DEBUG_KOBJECT is not set
716CONFIG_DEBUG_BUGVERBOSE=y
717# CONFIG_DEBUG_INFO is not set
718CONFIG_DEBUG_VM=y
719# CONFIG_DEBUG_LIST is not set
720CONFIG_FRAME_POINTER=y
721CONFIG_FORCED_INLINING=y
722# CONFIG_RCU_TORTURE_TEST is not set
723# CONFIG_FAULT_INJECTION is not set
724CONFIG_SH_STANDARD_BIOS=y
725# CONFIG_EARLY_SCIF_CONSOLE is not set
726CONFIG_EARLY_PRINTK=y
727# CONFIG_DEBUG_BOOTMEM is not set
728CONFIG_DEBUG_STACKOVERFLOW=y
729CONFIG_DEBUG_STACK_USAGE=y
730# CONFIG_4KSTACKS is not set
731# CONFIG_SH_KGDB is not set
732
733#
734# Security options
735#
736# CONFIG_KEYS is not set
737# CONFIG_SECURITY is not set
738
739#
740# Cryptographic options
741#
742# CONFIG_CRYPTO is not set
743
744#
745# Library routines
746#
747CONFIG_BITREVERSE=y
748# CONFIG_CRC_CCITT is not set
749# CONFIG_CRC16 is not set
750# CONFIG_CRC_ITU_T is not set
751CONFIG_CRC32=y
752# CONFIG_LIBCRC32C is not set
753CONFIG_PLIST=y
754CONFIG_HAS_IOMEM=y
755CONFIG_HAS_IOPORT=y
756CONFIG_HAS_DMA=y
diff --git a/arch/sh/drivers/dma/Kconfig b/arch/sh/drivers/dma/Kconfig
index 99935f9daf..333898077c 100644
--- a/arch/sh/drivers/dma/Kconfig
+++ b/arch/sh/drivers/dma/Kconfig
@@ -36,23 +36,6 @@ config NR_DMA_CHANNELS
36 support. Setting this to a higher value allows for cascading DMACs 36 support. Setting this to a higher value allows for cascading DMACs
37 with additional channels. 37 with additional channels.
38 38
39config DMA_PAGE_OPS
40 bool "Use DMAC for page copy/clear"
41 depends on SH_DMA && BROKEN
42 help
43 Selecting this option will use a dual-address mode configured channel
44 in the SH DMAC for copy_page()/clear_page(). Primarily a performance
45 hack.
46
47config DMA_PAGE_OPS_CHANNEL
48 depends on DMA_PAGE_OPS
49 int "DMA channel for sh memory-manager page copy/clear"
50 default "3"
51 help
52 This allows the specification of the dual address dma channel,
53 in case channel 3 is unavailable. On the SH4, channels 1,2, and 3
54 are dual-address capable.
55
56config SH_DMABRG 39config SH_DMABRG
57 bool "SH7760 DMABRG support" 40 bool "SH7760 DMABRG support"
58 depends on CPU_SUBTYPE_SH7760 41 depends on CPU_SUBTYPE_SH7760
diff --git a/arch/sh/drivers/pci/Kconfig b/arch/sh/drivers/pci/Kconfig
index 6d1cbbe674..fbc6f2c864 100644
--- a/arch/sh/drivers/pci/Kconfig
+++ b/arch/sh/drivers/pci/Kconfig
@@ -1,5 +1,6 @@
1config PCI 1config PCI
2 bool "PCI support" 2 bool "PCI support"
3 depends on SYS_SUPPORTS_PCI
3 help 4 help
4 Find out whether you have a PCI motherboard. PCI is the name of a 5 Find out whether you have a PCI motherboard. PCI is the name of a
5 bus system, i.e. the way the CPU talks to the other stuff inside 6 bus system, i.e. the way the CPU talks to the other stuff inside
diff --git a/arch/sh/kernel/Makefile b/arch/sh/kernel/Makefile
index 9104b62576..1f141a8ba1 100644
--- a/arch/sh/kernel/Makefile
+++ b/arch/sh/kernel/Makefile
@@ -4,10 +4,9 @@
4 4
5extra-y := head.o init_task.o vmlinux.lds 5extra-y := head.o init_task.o vmlinux.lds
6 6
7obj-y := process.o signal.o traps.o irq.o \ 7obj-y := debugtraps.o io.o io_generic.o irq.o machvec.o process.o ptrace.o \
8 ptrace.o setup.o time.o sys_sh.o semaphore.o \ 8 semaphore.o setup.o signal.o sys_sh.o syscalls.o \
9 io.o io_generic.o sh_ksyms.o syscalls.o \ 9 time.o topology.o traps.o
10 debugtraps.o
11 10
12obj-y += cpu/ timers/ 11obj-y += cpu/ timers/
13obj-$(CONFIG_VSYSCALL) += vsyscall/ 12obj-$(CONFIG_VSYSCALL) += vsyscall/
@@ -17,7 +16,7 @@ obj-$(CONFIG_CF_ENABLER) += cf-enabler.o
17obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o 16obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o
18obj-$(CONFIG_SH_KGDB) += kgdb_stub.o kgdb_jmp.o 17obj-$(CONFIG_SH_KGDB) += kgdb_stub.o kgdb_jmp.o
19obj-$(CONFIG_SH_CPU_FREQ) += cpufreq.o 18obj-$(CONFIG_SH_CPU_FREQ) += cpufreq.o
20obj-$(CONFIG_MODULES) += module.o 19obj-$(CONFIG_MODULES) += sh_ksyms.o module.o
21obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 20obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
22obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o 21obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
23obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 22obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
diff --git a/arch/sh/kernel/cf-enabler.c b/arch/sh/kernel/cf-enabler.c
index ebc73b8509..1c3b99642e 100644
--- a/arch/sh/kernel/cf-enabler.c
+++ b/arch/sh/kernel/cf-enabler.c
@@ -75,11 +75,7 @@ static int __init cf_init_default(void)
75#if defined(CONFIG_CPU_SH4) 75#if defined(CONFIG_CPU_SH4)
76 allocate_cf_area(); 76 allocate_cf_area();
77#endif 77#endif
78#if defined(CONFIG_SH_UNKNOWN) 78
79 /* This should be done in each board's init_xxx_irq. */
80 make_imask_irq(14);
81 disable_irq(14);
82#endif
83 return 0; 79 return 0;
84} 80}
85 81
diff --git a/arch/sh/kernel/cpu/init.c b/arch/sh/kernel/cpu/init.c
index 6451ad6301..9172e97dc2 100644
--- a/arch/sh/kernel/cpu/init.c
+++ b/arch/sh/kernel/cpu/init.c
@@ -21,8 +21,7 @@
21#include <asm/cacheflush.h> 21#include <asm/cacheflush.h>
22#include <asm/cache.h> 22#include <asm/cache.h>
23#include <asm/io.h> 23#include <asm/io.h>
24 24#include <asm/ubc.h>
25extern void detect_cpu_and_cache_system(void);
26 25
27/* 26/*
28 * Generic wrapper for command line arguments to disable on-chip 27 * Generic wrapper for command line arguments to disable on-chip
@@ -152,15 +151,6 @@ static void __init cache_init(void)
152 flags |= CCR_CACHE_CB; 151 flags |= CCR_CACHE_CB;
153#endif 152#endif
154 153
155#ifdef CONFIG_SH_OCRAM
156 /* Turn on OCRAM -- halve the OC */
157 flags |= CCR_CACHE_ORA;
158 current_cpu_data.dcache.sets >>= 1;
159
160 current_cpu_data.dcache.way_size = current_cpu_data.dcache.sets *
161 current_cpu_data.dcache.linesz;
162#endif
163
164 ctrl_outl(flags, CCR); 154 ctrl_outl(flags, CCR);
165 back_to_P1(); 155 back_to_P1();
166} 156}
@@ -269,7 +259,6 @@ asmlinkage void __init sh_cpu_init(void)
269 } 259 }
270#endif 260#endif
271 261
272#ifdef CONFIG_UBC_WAKEUP
273 /* 262 /*
274 * Some brain-damaged loaders decided it would be a good idea to put 263 * Some brain-damaged loaders decided it would be a good idea to put
275 * the UBC to sleep. This causes some issues when it comes to things 264 * the UBC to sleep. This causes some issues when it comes to things
@@ -277,7 +266,5 @@ asmlinkage void __init sh_cpu_init(void)
277 * we wake it up and hope that all is well. 266 * we wake it up and hope that all is well.
278 */ 267 */
279 ubc_wakeup(); 268 ubc_wakeup();
280#endif
281
282 speculative_execution_init(); 269 speculative_execution_init();
283} 270}
diff --git a/arch/sh/kernel/cpu/irq/intc2.c b/arch/sh/kernel/cpu/irq/intc2.c
index d8e22f4ff0..cc5221390e 100644
--- a/arch/sh/kernel/cpu/irq/intc2.c
+++ b/arch/sh/kernel/cpu/irq/intc2.c
@@ -13,36 +13,31 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/io.h> 15#include <linux/io.h>
16#include <asm/smp.h>
16 17
17#if defined(CONFIG_CPU_SUBTYPE_SH7760) 18static inline struct intc2_desc *get_intc2_desc(unsigned int irq)
18#define INTC2_BASE 0xfe080000 19{
19#define INTC2_INTMSK (INTC2_BASE + 0x40) 20 struct irq_chip *chip = get_irq_chip(irq);
20#define INTC2_INTMSKCLR (INTC2_BASE + 0x60) 21 return (void *)((char *)chip - offsetof(struct intc2_desc, chip));
21#elif defined(CONFIG_CPU_SUBTYPE_SH7780) || \ 22}
22 defined(CONFIG_CPU_SUBTYPE_SH7785)
23#define INTC2_BASE 0xffd40000
24#define INTC2_INTMSK (INTC2_BASE + 0x38)
25#define INTC2_INTMSKCLR (INTC2_BASE + 0x3c)
26#endif
27 23
28static void disable_intc2_irq(unsigned int irq) 24static void disable_intc2_irq(unsigned int irq)
29{ 25{
30 struct intc2_data *p = get_irq_chip_data(irq); 26 struct intc2_data *p = get_irq_chip_data(irq);
31 ctrl_outl(1 << p->msk_shift, INTC2_INTMSK + p->msk_offset); 27 struct intc2_desc *d = get_intc2_desc(irq);
28
29 ctrl_outl(1 << p->msk_shift, d->msk_base + p->msk_offset +
30 (hard_smp_processor_id() * 4));
32} 31}
33 32
34static void enable_intc2_irq(unsigned int irq) 33static void enable_intc2_irq(unsigned int irq)
35{ 34{
36 struct intc2_data *p = get_irq_chip_data(irq); 35 struct intc2_data *p = get_irq_chip_data(irq);
37 ctrl_outl(1 << p->msk_shift, INTC2_INTMSKCLR + p->msk_offset); 36 struct intc2_desc *d = get_intc2_desc(irq);
38}
39 37
40static struct irq_chip intc2_irq_chip = { 38 ctrl_outl(1 << p->msk_shift, d->mskclr_base + p->msk_offset +
41 .name = "INTC2", 39 (hard_smp_processor_id() * 4));
42 .mask = disable_intc2_irq, 40}
43 .unmask = enable_intc2_irq,
44 .mask_ack = disable_intc2_irq,
45};
46 41
47/* 42/*
48 * Setup an INTC2 style interrupt. 43 * Setup an INTC2 style interrupt.
@@ -56,30 +51,36 @@ static struct irq_chip intc2_irq_chip = {
56 * 51 *
57 * in the intc2_data table. 52 * in the intc2_data table.
58 */ 53 */
59void make_intc2_irq(struct intc2_data *table, unsigned int nr_irqs) 54void register_intc2_controller(struct intc2_desc *desc)
60{ 55{
61 int i; 56 int i;
62 57
63 for (i = 0; i < nr_irqs; i++) { 58 desc->chip.mask = disable_intc2_irq;
59 desc->chip.unmask = enable_intc2_irq;
60 desc->chip.mask_ack = disable_intc2_irq;
61
62 for (i = 0; i < desc->nr_irqs; i++) {
64 unsigned long ipr, flags; 63 unsigned long ipr, flags;
65 struct intc2_data *p = table + i; 64 struct intc2_data *p = desc->intc2_data + i;
66 65
67 disable_irq_nosync(p->irq); 66 disable_irq_nosync(p->irq);
68 67
69 /* Set the priority level */ 68 if (desc->prio_base) {
70 local_irq_save(flags); 69 /* Set the priority level */
70 local_irq_save(flags);
71 71
72 ipr = ctrl_inl(INTC2_BASE + p->ipr_offset); 72 ipr = ctrl_inl(desc->prio_base + p->ipr_offset);
73 ipr &= ~(0xf << p->ipr_shift); 73 ipr &= ~(0xf << p->ipr_shift);
74 ipr |= p->priority << p->ipr_shift; 74 ipr |= p->priority << p->ipr_shift;
75 ctrl_outl(ipr, INTC2_BASE + p->ipr_offset); 75 ctrl_outl(ipr, desc->prio_base + p->ipr_offset);
76 76
77 local_irq_restore(flags); 77 local_irq_restore(flags);
78 }
78 79
79 set_irq_chip_and_handler_name(p->irq, &intc2_irq_chip, 80 set_irq_chip_and_handler_name(p->irq, &desc->chip,
80 handle_level_irq, "level"); 81 handle_level_irq, "level");
81 set_irq_chip_data(p->irq, p); 82 set_irq_chip_data(p->irq, p);
82 83
83 enable_intc2_irq(p->irq); 84 disable_intc2_irq(p->irq);
84 } 85 }
85} 86}
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c
index 210280b6fd..98e84f40c7 100644
--- a/arch/sh/kernel/cpu/irq/ipr.c
+++ b/arch/sh/kernel/cpu/irq/ipr.c
@@ -22,58 +22,57 @@
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24 24
25static inline struct ipr_desc *get_ipr_desc(unsigned int irq)
26{
27 struct irq_chip *chip = get_irq_chip(irq);
28 return (void *)((char *)chip - offsetof(struct ipr_desc, chip));
29}
30
25static void disable_ipr_irq(unsigned int irq) 31static void disable_ipr_irq(unsigned int irq)
26{ 32{
27 struct ipr_data *p = get_irq_chip_data(irq); 33 struct ipr_data *p = get_irq_chip_data(irq);
34 unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx];
28 /* Set the priority in IPR to 0 */ 35 /* Set the priority in IPR to 0 */
29 ctrl_outw(ctrl_inw(p->addr) & (0xffff ^ (0xf << p->shift)), p->addr); 36 ctrl_outw(ctrl_inw(addr) & (0xffff ^ (0xf << p->shift)), addr);
30} 37}
31 38
32static void enable_ipr_irq(unsigned int irq) 39static void enable_ipr_irq(unsigned int irq)
33{ 40{
34 struct ipr_data *p = get_irq_chip_data(irq); 41 struct ipr_data *p = get_irq_chip_data(irq);
42 unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx];
35 /* Set priority in IPR back to original value */ 43 /* Set priority in IPR back to original value */
36 ctrl_outw(ctrl_inw(p->addr) | (p->priority << p->shift), p->addr); 44 ctrl_outw(ctrl_inw(addr) | (p->priority << p->shift), addr);
37} 45}
38 46
39static struct irq_chip ipr_irq_chip = { 47/*
40 .name = "IPR", 48 * The shift value is now the number of bits to shift, not the number of
41 .mask = disable_ipr_irq, 49 * bits/4. This is to make it easier to read the value directly from the
42 .unmask = enable_ipr_irq, 50 * datasheets. The IPR address is calculated using the ipr_offset table.
43 .mask_ack = disable_ipr_irq, 51 */
44};
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 52
52void make_ipr_irq(struct ipr_data *table, unsigned int nr_irqs) 53void register_ipr_controller(struct ipr_desc *desc)
53{ 54{
54 int i; 55 int i;
55 56
56 for (i = 0; i < nr_irqs; i++) { 57 desc->chip.mask = disable_ipr_irq;
57 unsigned int irq = table[i].irq; 58 desc->chip.unmask = enable_ipr_irq;
59 desc->chip.mask_ack = disable_ipr_irq;
58 60
59 if (!irq) 61 for (i = 0; i < desc->nr_irqs; i++) {
60 irq = table[i].irq = i; 62 struct ipr_data *p = desc->ipr_data + i;
61 63
62 /* could the IPR index be mapped, if not we ignore this */ 64 BUG_ON(p->ipr_idx >= desc->nr_offsets);
63 if (!table[i].addr) { 65 BUG_ON(!desc->ipr_offsets[p->ipr_idx]);
64 table[i].addr = map_ipridx_to_addr(table[i].ipr_idx);
65 if (!table[i].addr)
66 continue;
67 }
68 66
69 disable_irq_nosync(irq); 67 disable_irq_nosync(p->irq);
70 set_irq_chip_and_handler_name(irq, &ipr_irq_chip, 68 set_irq_chip_and_handler_name(p->irq, &desc->chip,
71 handle_level_irq, "level"); 69 handle_level_irq, "level");
72 set_irq_chip_data(irq, &table[i]); 70 set_irq_chip_data(p->irq, p);
73 enable_ipr_irq(irq); 71 disable_ipr_irq(p->irq);
74 } 72 }
75} 73}
76EXPORT_SYMBOL(make_ipr_irq); 74
75EXPORT_SYMBOL(register_ipr_controller);
77 76
78#if !defined(CONFIG_CPU_HAS_PINT_IRQ) 77#if !defined(CONFIG_CPU_HAS_PINT_IRQ)
79int ipr_irq_demux(int irq) 78int ipr_irq_demux(int irq)
diff --git a/arch/sh/kernel/cpu/sh2/entry.S b/arch/sh/kernel/cpu/sh2/entry.S
index c16dc8fec4..ee8f1fe84b 100644
--- a/arch/sh/kernel/cpu/sh2/entry.S
+++ b/arch/sh/kernel/cpu/sh2/entry.S
@@ -311,6 +311,7 @@ restore_all:
311 rte 311 rte
312 nop 312 nop
313 313
314 .align 2
314#ifdef CONFIG_TRACE_IRQFLAGS 315#ifdef CONFIG_TRACE_IRQFLAGS
3151: .long trace_hardirqs_off 3161: .long trace_hardirqs_off
316#endif 317#endif
diff --git a/arch/sh/kernel/cpu/sh2/probe.c b/arch/sh/kernel/cpu/sh2/probe.c
index 108e81b682..abbf17427e 100644
--- a/arch/sh/kernel/cpu/sh2/probe.c
+++ b/arch/sh/kernel/cpu/sh2/probe.c
@@ -9,23 +9,14 @@
9 * License. See the file "COPYING" in the main directory of this archive 9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details. 10 * for more details.
11 */ 11 */
12
13
14#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/smp.h>
15#include <asm/processor.h> 14#include <asm/processor.h>
16#include <asm/cache.h> 15#include <asm/cache.h>
17 16
18int __init detect_cpu_and_cache_system(void) 17int __init detect_cpu_and_cache_system(void)
19{ 18{
20#if defined(CONFIG_CPU_SUBTYPE_SH7604) 19#if defined(CONFIG_CPU_SUBTYPE_SH7619)
21 current_cpu_data.type = CPU_SH7604;
22 current_cpu_data.dcache.ways = 4;
23 current_cpu_data.dcache.way_incr = (1<<10);
24 current_cpu_data.dcache.sets = 64;
25 current_cpu_data.dcache.entry_shift = 4;
26 current_cpu_data.dcache.linesz = L1_CACHE_BYTES;
27 current_cpu_data.dcache.flags = 0;
28#elif defined(CONFIG_CPU_SUBTYPE_SH7619)
29 current_cpu_data.type = CPU_SH7619; 20 current_cpu_data.type = CPU_SH7619;
30 current_cpu_data.dcache.ways = 4; 21 current_cpu_data.dcache.ways = 4;
31 current_cpu_data.dcache.way_incr = (1<<12); 22 current_cpu_data.dcache.way_incr = (1<<12);
diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
index f83ff8a68f..1a107fe22d 100644
--- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c
+++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
@@ -52,7 +52,7 @@ static int __init sh7619_devices_setup(void)
52} 52}
53__initcall(sh7619_devices_setup); 53__initcall(sh7619_devices_setup);
54 54
55static struct ipr_data sh7619_ipr_map[] = { 55static struct ipr_data ipr_irq_table[] = {
56 { 86, 0, 4, 2 }, /* CMI0 */ 56 { 86, 0, 4, 2 }, /* CMI0 */
57 { 88, 1, 12, 3 }, /* SCIF0_ERI */ 57 { 88, 1, 12, 3 }, /* SCIF0_ERI */
58 { 89, 1, 12, 3 }, /* SCIF0_RXI */ 58 { 89, 1, 12, 3 }, /* SCIF0_RXI */
@@ -68,7 +68,7 @@ static struct ipr_data sh7619_ipr_map[] = {
68 { 99, 1, 4, 3 }, /* SCIF2_TXI */ 68 { 99, 1, 4, 3 }, /* SCIF2_TXI */
69}; 69};
70 70
71static unsigned int ipr_offsets[] = { 71static unsigned long ipr_offsets[] = {
72 0xf8080000, /* IPRC */ 72 0xf8080000, /* IPRC */
73 0xf8080002, /* IPRD */ 73 0xf8080002, /* IPRD */
74 0xf8080004, /* IPRE */ 74 0xf8080004, /* IPRE */
@@ -76,15 +76,19 @@ static unsigned int ipr_offsets[] = {
76 0xf8080008, /* IPRG */ 76 0xf8080008, /* IPRG */
77}; 77};
78 78
79/* given the IPR index return the address of the IPR register */ 79static struct ipr_desc ipr_irq_desc = {
80unsigned int map_ipridx_to_addr(int idx) 80 .ipr_offsets = ipr_offsets,
81{ 81 .nr_offsets = ARRAY_SIZE(ipr_offsets),
82 if (unlikely(idx >= ARRAY_SIZE(ipr_offsets))) 82
83 return 0; 83 .ipr_data = ipr_irq_table,
84 return ipr_offsets[idx]; 84 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
85} 85
86 .chip = {
87 .name = "IPR-sh7619",
88 },
89};
86 90
87void __init init_IRQ_ipr(void) 91void __init init_IRQ_ipr(void)
88{ 92{
89 make_ipr_irq(sh7619_ipr_map, ARRAY_SIZE(sh7619_ipr_map)); 93 register_ipr_controller(&ipr_irq_desc);
90} 94}
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
index 4ed9110632..b6e3a6351f 100644
--- a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
@@ -57,7 +57,7 @@ static int __init sh7206_devices_setup(void)
57} 57}
58__initcall(sh7206_devices_setup); 58__initcall(sh7206_devices_setup);
59 59
60static struct ipr_data sh7206_ipr_map[] = { 60static struct ipr_data ipr_irq_table[] = {
61 { 140, 7, 12, 2 }, /* CMI0 */ 61 { 140, 7, 12, 2 }, /* CMI0 */
62 { 164, 8, 4, 2 }, /* MTU2_TGI1A */ 62 { 164, 8, 4, 2 }, /* MTU2_TGI1A */
63 { 240, 13, 12, 3 }, /* SCIF0_BRI */ 63 { 240, 13, 12, 3 }, /* SCIF0_BRI */
@@ -78,7 +78,7 @@ static struct ipr_data sh7206_ipr_map[] = {
78 { 255, 13, 0, 3 }, /* SCIF3_TXI */ 78 { 255, 13, 0, 3 }, /* SCIF3_TXI */
79}; 79};
80 80
81static unsigned int ipr_offsets[] = { 81static unsigned long ipr_offsets[] = {
82 0xfffe0818, /* IPR01 */ 82 0xfffe0818, /* IPR01 */
83 0xfffe081a, /* IPR02 */ 83 0xfffe081a, /* IPR02 */
84 0, /* unused */ 84 0, /* unused */
@@ -95,15 +95,19 @@ static unsigned int ipr_offsets[] = {
95 0xfffe0c10, /* IPR14 */ 95 0xfffe0c10, /* IPR14 */
96}; 96};
97 97
98/* given the IPR index return the address of the IPR register */ 98static struct ipr_desc ipr_irq_desc = {
99unsigned int map_ipridx_to_addr(int idx) 99 .ipr_offsets = ipr_offsets,
100{ 100 .nr_offsets = ARRAY_SIZE(ipr_offsets),
101 if (unlikely(idx >= ARRAY_SIZE(ipr_offsets))) 101
102 return 0; 102 .ipr_data = ipr_irq_table,
103 return ipr_offsets[idx]; 103 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
104} 104
105 .chip = {
106 .name = "IPR-sh7206",
107 },
108};
105 109
106void __init init_IRQ_ipr(void) 110void __init init_IRQ_ipr(void)
107{ 111{
108 make_ipr_irq(sh7206_ipr_map, ARRAY_SIZE(sh7206_ipr_map)); 112 register_ipr_controller(&ipr_irq_desc);
109} 113}
diff --git a/arch/sh/kernel/cpu/sh3/entry.S b/arch/sh/kernel/cpu/sh3/entry.S
index b0b59d4a33..d8e122971c 100644
--- a/arch/sh/kernel/cpu/sh3/entry.S
+++ b/arch/sh/kernel/cpu/sh3/entry.S
@@ -340,8 +340,27 @@ ENTRY(vbr_base)
340general_exception: 340general_exception:
341 mov.l 1f, k2 341 mov.l 1f, k2
342 mov.l 2f, k3 342 mov.l 2f, k3
343#ifdef CONFIG_CPU_SUBTYPE_SHX3
344 mov.l @k2, k2
345
346 ! Is EXPEVT larger than 0x800?
347 mov #0x8, k0
348 shll8 k0
349 cmp/hs k0, k2
350 bf 0f
351
352 ! then add 0x580 (k2 is 0xd80 or 0xda0)
353 mov #0x58, k0
354 shll2 k0
355 shll2 k0
356 add k0, k2
3570:
358 bra handle_exception
359 nop
360#else
343 bra handle_exception 361 bra handle_exception
344 mov.l @k2, k2 362 mov.l @k2, k2
363#endif
345 .align 2 364 .align 2
3461: .long EXPEVT 3651: .long EXPEVT
3472: .long ret_from_exception 3662: .long ret_from_exception
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7705.c b/arch/sh/kernel/cpu/sh3/setup-sh7705.c
index 1983fb7ad6..a55b8ce2c5 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7705.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7705.c
@@ -48,7 +48,7 @@ static int __init sh7705_devices_setup(void)
48} 48}
49__initcall(sh7705_devices_setup); 49__initcall(sh7705_devices_setup);
50 50
51static struct ipr_data sh7705_ipr_map[] = { 51static struct ipr_data ipr_irq_table[] = {
52 /* IRQ, IPR-idx, shift, priority */ 52 /* IRQ, IPR-idx, shift, priority */
53 { 16, 0, 12, 2 }, /* TMU0 TUNI*/ 53 { 16, 0, 12, 2 }, /* TMU0 TUNI*/
54 { 17, 0, 8, 2 }, /* TMU1 TUNI */ 54 { 17, 0, 8, 2 }, /* TMU1 TUNI */
@@ -70,25 +70,29 @@ static struct ipr_data sh7705_ipr_map[] = {
70}; 70};
71 71
72static unsigned long ipr_offsets[] = { 72static unsigned long ipr_offsets[] = {
73 0xFFFFFEE2 /* 0: IPRA */ 73 0xFFFFFEE2, /* 0: IPRA */
74, 0xFFFFFEE4 /* 1: IPRB */ 74 0xFFFFFEE4, /* 1: IPRB */
75, 0xA4000016 /* 2: IPRC */ 75 0xA4000016, /* 2: IPRC */
76, 0xA4000018 /* 3: IPRD */ 76 0xA4000018, /* 3: IPRD */
77, 0xA400001A /* 4: IPRE */ 77 0xA400001A, /* 4: IPRE */
78, 0xA4080000 /* 5: IPRF */ 78 0xA4080000, /* 5: IPRF */
79, 0xA4080002 /* 6: IPRG */ 79 0xA4080002, /* 6: IPRG */
80, 0xA4080004 /* 7: IPRH */ 80 0xA4080004, /* 7: IPRH */
81}; 81};
82 82
83/* given the IPR index return the address of the IPR register */ 83static struct ipr_desc ipr_irq_desc = {
84unsigned int map_ipridx_to_addr(int idx) 84 .ipr_offsets = ipr_offsets,
85{ 85 .nr_offsets = ARRAY_SIZE(ipr_offsets),
86 if (idx >= ARRAY_SIZE(ipr_offsets)) 86
87 return 0; 87 .ipr_data = ipr_irq_table,
88 return ipr_offsets[idx]; 88 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
89} 89
90 .chip = {
91 .name = "IPR-sh7705",
92 },
93};
90 94
91void __init init_IRQ_ipr() 95void __init init_IRQ_ipr(void)
92{ 96{
93 make_ipr_irq(sh7705_ipr_map, ARRAY_SIZE(sh7705_ipr_map)); 97 register_ipr_controller(&ipr_irq_desc);
94} 98}
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7709.c b/arch/sh/kernel/cpu/sh3/setup-sh7709.c
index c7d7c35fc8..d79ec0c052 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7709.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7709.c
@@ -12,6 +12,26 @@
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <asm/sci.h> 13#include <asm/sci.h>
14 14
15static struct resource rtc_resources[] = {
16 [0] = {
17 .start = 0xfffffec0,
18 .end = 0xfffffec0 + 0x1e,
19 .flags = IORESOURCE_IO,
20 },
21 [1] = {
22 .start = 20,
23 .flags = IORESOURCE_IRQ,
24 },
25 [2] = {
26 .start = 21,
27 .flags = IORESOURCE_IRQ,
28 },
29 [3] = {
30 .start = 22,
31 .flags = IORESOURCE_IRQ,
32 },
33};
34
15static struct plat_sci_port sci_platform_data[] = { 35static struct plat_sci_port sci_platform_data[] = {
16 { 36 {
17 .mapbase = 0xfffffe80, 37 .mapbase = 0xfffffe80,
@@ -41,8 +61,16 @@ static struct platform_device sci_device = {
41 }, 61 },
42}; 62};
43 63
64static struct platform_device rtc_device = {
65 .name = "sh-rtc",
66 .id = -1,
67 .num_resources = ARRAY_SIZE(rtc_resources),
68 .resource = rtc_resources,
69};
70
44static struct platform_device *sh7709_devices[] __initdata = { 71static struct platform_device *sh7709_devices[] __initdata = {
45 &sci_device, 72 &sci_device,
73 &rtc_device,
46}; 74};
47 75
48static int __init sh7709_devices_setup(void) 76static int __init sh7709_devices_setup(void)
@@ -52,32 +80,66 @@ static int __init sh7709_devices_setup(void)
52} 80}
53__initcall(sh7709_devices_setup); 81__initcall(sh7709_devices_setup);
54 82
55#define IPRx(A,N) .addr=A, .shift=N 83static struct ipr_data ipr_irq_table[] = {
56#define IPRA(N) IPRx(0xfffffee2UL,N) 84 { 16, 0, 12, 2 }, /* TMU TUNI0 */
57#define IPRB(N) IPRx(0xfffffee4UL,N) 85 { 17, 0, 8, 4 }, /* TMU TUNI1 */
58#define IPRC(N) IPRx(0xa4000016UL,N) 86 { 18, 0, 4, 1 }, /* TMU TUNI1 */
59#define IPRD(N) IPRx(0xa4000018UL,N) 87 { 19, 0, 4, 1 }, /* TMU TUNI1 */
60#define IPRE(N) IPRx(0xa400001aUL,N) 88 { 20, 0, 0, 2 }, /* RTC CUI */
61 89 { 21, 0, 0, 2 }, /* RTC CUI */
62static struct ipr_data sh7709_ipr_map[] = { 90 { 22, 0, 0, 2 }, /* RTC CUI */
63 [16] = { IPRA(12), 2 }, /* TMU TUNI0 */ 91
64 [17] = { IPRA(8), 4 }, /* TMU TUNI1 */ 92 { 23, 1, 4, 3 }, /* SCI */
65 [18 ... 19] = { IPRA(4), 1 }, /* TMU TUNI1 */ 93 { 24, 1, 4, 3 }, /* SCI */
66 [20 ... 22] = { IPRA(0), 2 }, /* RTC CUI */ 94 { 25, 1, 4, 3 }, /* SCI */
67 [23 ... 26] = { IPRB(4), 3 }, /* SCI */ 95 { 26, 1, 4, 3 }, /* SCI */
68 [27] = { IPRB(12), 2 }, /* WDT ITI */ 96 { 27, 1, 12, 3 }, /* WDT ITI */
69 [32] = { IPRC(0), 1 }, /* IRQ 0 */ 97
70 [33] = { IPRC(4), 1 }, /* IRQ 1 */ 98 { 32, 2, 0, 1 }, /* IRQ 0 */
71 [34] = { IPRC(8), 1 }, /* IRQ 2 APM */ 99 { 33, 2, 4, 1 }, /* IRQ 1 */
72 [35] = { IPRC(12), 1 }, /* IRQ 3 TOUCHSCREEN */ 100 { 34, 2, 8, 1 }, /* IRQ 2 APM */
73 [36] = { IPRD(0), 1 }, /* IRQ 4 */ 101 { 35, 2, 12, 1 }, /* IRQ 3 TOUCHSCREEN */
74 [37] = { IPRD(4), 1 }, /* IRQ 5 */ 102
75 [48 ... 51] = { IPRE(12), 7 }, /* DMA */ 103 { 36, 3, 0, 1 }, /* IRQ 4 */
76 [52 ... 55] = { IPRE(8), 3 }, /* IRDA */ 104 { 37, 3, 4, 1 }, /* IRQ 5 */
77 [56 ... 59] = { IPRE(4), 3 }, /* SCIF */ 105
106 { 48, 4, 12, 7 }, /* DMA */
107 { 49, 4, 12, 7 }, /* DMA */
108 { 50, 4, 12, 7 }, /* DMA */
109 { 51, 4, 12, 7 }, /* DMA */
110
111 { 52, 4, 8, 3 }, /* IRDA */
112 { 53, 4, 8, 3 }, /* IRDA */
113 { 54, 4, 8, 3 }, /* IRDA */
114 { 55, 4, 8, 3 }, /* IRDA */
115
116 { 56, 4, 4, 3 }, /* SCIF */
117 { 57, 4, 4, 3 }, /* SCIF */
118 { 58, 4, 4, 3 }, /* SCIF */
119 { 59, 4, 4, 3 }, /* SCIF */
120};
121
122static unsigned long ipr_offsets[] = {
123 0xfffffee2, /* 0: IPRA */
124 0xfffffee4, /* 1: IPRB */
125 0xa4000016, /* 2: IPRC */
126 0xa4000018, /* 3: IPRD */
127 0xa400001a, /* 4: IPRE */
128};
129
130static struct ipr_desc ipr_irq_desc = {
131 .ipr_offsets = ipr_offsets,
132 .nr_offsets = ARRAY_SIZE(ipr_offsets),
133
134 .ipr_data = ipr_irq_table,
135 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
136
137 .chip = {
138 .name = "IPR-sh7709",
139 },
78}; 140};
79 141
80void __init init_IRQ_ipr() 142void __init init_IRQ_ipr(void)
81{ 143{
82 make_ipr_irq(sh7709_ipr_map, ARRAY_SIZE(sh7709_ipr_map)); 144 register_ipr_controller(&ipr_irq_desc);
83} 145}
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7710.c b/arch/sh/kernel/cpu/sh3/setup-sh7710.c
index 51760a7e7f..f40e6dac33 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7710.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7710.c
@@ -49,7 +49,7 @@ static int __init sh7710_devices_setup(void)
49} 49}
50__initcall(sh7710_devices_setup); 50__initcall(sh7710_devices_setup);
51 51
52static struct ipr_data sh7710_ipr_map[] = { 52static struct ipr_data ipr_irq_table[] = {
53 /* IRQ, IPR-idx, shift, priority */ 53 /* IRQ, IPR-idx, shift, priority */
54 { 16, 0, 12, 2 }, /* TMU0 TUNI*/ 54 { 16, 0, 12, 2 }, /* TMU0 TUNI*/
55 { 17, 0, 8, 2 }, /* TMU1 TUNI */ 55 { 17, 0, 8, 2 }, /* TMU1 TUNI */
@@ -78,26 +78,30 @@ static struct ipr_data sh7710_ipr_map[] = {
78}; 78};
79 79
80static unsigned long ipr_offsets[] = { 80static unsigned long ipr_offsets[] = {
81 0xA414FEE2 /* 0: IPRA */ 81 0xA414FEE2, /* 0: IPRA */
82, 0xA414FEE4 /* 1: IPRB */ 82 0xA414FEE4, /* 1: IPRB */
83, 0xA4140016 /* 2: IPRC */ 83 0xA4140016, /* 2: IPRC */
84, 0xA4140018 /* 3: IPRD */ 84 0xA4140018, /* 3: IPRD */
85, 0xA414001A /* 4: IPRE */ 85 0xA414001A, /* 4: IPRE */
86, 0xA4080000 /* 5: IPRF */ 86 0xA4080000, /* 5: IPRF */
87, 0xA4080002 /* 6: IPRG */ 87 0xA4080002, /* 6: IPRG */
88, 0xA4080004 /* 7: IPRH */ 88 0xA4080004, /* 7: IPRH */
89, 0xA4080006 /* 8: IPRI */ 89 0xA4080006, /* 8: IPRI */
90}; 90};
91 91
92/* given the IPR index return the address of the IPR register */ 92static struct ipr_desc ipr_irq_desc = {
93unsigned int map_ipridx_to_addr(int idx) 93 .ipr_offsets = ipr_offsets,
94{ 94 .nr_offsets = ARRAY_SIZE(ipr_offsets),
95 if (idx >= ARRAY_SIZE(ipr_offsets)) 95
96 return 0; 96 .ipr_data = ipr_irq_table,
97 return ipr_offsets[idx]; 97 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
98} 98
99 .chip = {
100 .name = "IPR-sh7710",
101 },
102};
99 103
100void __init init_IRQ_ipr() 104void __init init_IRQ_ipr(void)
101{ 105{
102 make_ipr_irq(sh7710_ipr_map, ARRAY_SIZE(sh7710_ipr_map)); 106 register_ipr_controller(&ipr_irq_desc);
103} 107}
diff --git a/arch/sh/kernel/cpu/sh4/Makefile b/arch/sh/kernel/cpu/sh4/Makefile
index 8add10bd82..dadd6bffc1 100644
--- a/arch/sh/kernel/cpu/sh4/Makefile
+++ b/arch/sh/kernel/cpu/sh4/Makefile
@@ -10,7 +10,11 @@ obj-$(CONFIG_SH_STORE_QUEUES) += sq.o
10 10
11# CPU subtype setup 11# CPU subtype setup
12obj-$(CONFIG_CPU_SUBTYPE_SH7750) += setup-sh7750.o 12obj-$(CONFIG_CPU_SUBTYPE_SH7750) += setup-sh7750.o
13obj-$(CONFIG_CPU_SUBTYPE_SH7750R) += setup-sh7750.o
14obj-$(CONFIG_CPU_SUBTYPE_SH7750S) += setup-sh7750.o
15obj-$(CONFIG_CPU_SUBTYPE_SH7091) += setup-sh7750.o
13obj-$(CONFIG_CPU_SUBTYPE_SH7751) += setup-sh7750.o 16obj-$(CONFIG_CPU_SUBTYPE_SH7751) += setup-sh7750.o
17obj-$(CONFIG_CPU_SUBTYPE_SH7751R) += setup-sh7750.o
14obj-$(CONFIG_CPU_SUBTYPE_SH7760) += setup-sh7760.o 18obj-$(CONFIG_CPU_SUBTYPE_SH7760) += setup-sh7760.o
15obj-$(CONFIG_CPU_SUBTYPE_SH4_202) += setup-sh4-202.o 19obj-$(CONFIG_CPU_SUBTYPE_SH4_202) += setup-sh4-202.o
16 20
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c
index fab2eb0719..66c3f75647 100644
--- a/arch/sh/kernel/cpu/sh4/probe.c
+++ b/arch/sh/kernel/cpu/sh4/probe.c
@@ -141,6 +141,14 @@ int __init detect_cpu_and_cache_system(void)
141 current_cpu_data.flags |= CPU_HAS_LLSC; 141 current_cpu_data.flags |= CPU_HAS_LLSC;
142 } 142 }
143 break; 143 break;
144 case 0x4000: /* 1st cut */
145 case 0x4001: /* 2nd cut */
146 current_cpu_data.type = CPU_SHX3;
147 current_cpu_data.icache.ways = 4;
148 current_cpu_data.dcache.ways = 4;
149 current_cpu_data.flags |= CPU_HAS_FPU | CPU_HAS_PERF_COUNTER |
150 CPU_HAS_LLSC;
151 break;
144 case 0x8000: 152 case 0x8000:
145 current_cpu_data.type = CPU_ST40RA; 153 current_cpu_data.type = CPU_ST40RA;
146 current_cpu_data.flags |= CPU_HAS_FPU; 154 current_cpu_data.flags |= CPU_HAS_FPU;
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c
index 03b14cf78d..da153bcdfe 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c
@@ -82,7 +82,7 @@ static int __init sh7750_devices_setup(void)
82} 82}
83__initcall(sh7750_devices_setup); 83__initcall(sh7750_devices_setup);
84 84
85static struct ipr_data sh7750_ipr_map[] = { 85static struct ipr_data ipr_irq_table[] = {
86 /* IRQ, IPR-idx, shift, priority */ 86 /* IRQ, IPR-idx, shift, priority */
87 { 16, 0, 12, 2 }, /* TMU0 TUNI*/ 87 { 16, 0, 12, 2 }, /* TMU0 TUNI*/
88 { 17, 0, 12, 2 }, /* TMU1 TUNI */ 88 { 17, 0, 12, 2 }, /* TMU1 TUNI */
@@ -106,8 +106,27 @@ static struct ipr_data sh7750_ipr_map[] = {
106 { 38, 2, 8, 7 }, /* DMAC DMAE */ 106 { 38, 2, 8, 7 }, /* DMAC DMAE */
107}; 107};
108 108
109static unsigned long ipr_offsets[] = {
110 0xffd00004UL, /* 0: IPRA */
111 0xffd00008UL, /* 1: IPRB */
112 0xffd0000cUL, /* 2: IPRC */
113 0xffd00010UL, /* 3: IPRD */
114};
115
116static struct ipr_desc ipr_irq_desc = {
117 .ipr_offsets = ipr_offsets,
118 .nr_offsets = ARRAY_SIZE(ipr_offsets),
119
120 .ipr_data = ipr_irq_table,
121 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
122
123 .chip = {
124 .name = "IPR-sh7750",
125 },
126};
127
109#ifdef CONFIG_CPU_SUBTYPE_SH7751 128#ifdef CONFIG_CPU_SUBTYPE_SH7751
110static struct ipr_data sh7751_ipr_map[] = { 129static struct ipr_data ipr_irq_table_sh7751[] = {
111 { 44, 2, 8, 7 }, /* DMAC DMTE4 */ 130 { 44, 2, 8, 7 }, /* DMAC DMTE4 */
112 { 45, 2, 8, 7 }, /* DMAC DMTE5 */ 131 { 45, 2, 8, 7 }, /* DMAC DMTE5 */
113 { 46, 2, 8, 7 }, /* DMAC DMTE6 */ 132 { 46, 2, 8, 7 }, /* DMAC DMTE6 */
@@ -118,21 +137,26 @@ static struct ipr_data sh7751_ipr_map[] = {
118 /*{ 72, INTPRI00, 8, ? },*/ /* TMU3 TUNI */ 137 /*{ 72, INTPRI00, 8, ? },*/ /* TMU3 TUNI */
119 /*{ 76, INTPRI00, 12, ? },*/ /* TMU4 TUNI */ 138 /*{ 76, INTPRI00, 12, ? },*/ /* TMU4 TUNI */
120}; 139};
121#endif
122 140
123static unsigned long ipr_offsets[] = { 141static struct ipr_desc ipr_irq_desc_sh7751 = {
124 0xffd00004UL, /* 0: IPRA */ 142 .ipr_offsets = ipr_offsets,
125 0xffd00008UL, /* 1: IPRB */ 143 .nr_offsets = ARRAY_SIZE(ipr_offsets),
126 0xffd0000cUL, /* 2: IPRC */ 144
127 0xffd00010UL, /* 3: IPRD */ 145 .ipr_data = ipr_irq_table_sh7751,
146 .nr_irqs = ARRAY_SIZE(ipr_irq_table_sh7751),
147
148 .chip = {
149 .name = "IPR-sh7751",
150 },
128}; 151};
152#endif
129 153
130/* given the IPR index return the address of the IPR register */ 154void __init init_IRQ_ipr(void)
131unsigned int map_ipridx_to_addr(int idx)
132{ 155{
133 if (idx >= ARRAY_SIZE(ipr_offsets)) 156 register_ipr_controller(&ipr_irq_desc);
134 return 0; 157#ifdef CONFIG_CPU_SUBTYPE_SH7751
135 return ipr_offsets[idx]; 158 register_ipr_controller(&ipr_irq_desc_sh7751);
159#endif
136} 160}
137 161
138#define INTC_ICR 0xffd00000UL 162#define INTC_ICR 0xffd00000UL
@@ -143,11 +167,3 @@ void ipr_irq_enable_irlm(void)
143{ 167{
144 ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); 168 ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR);
145} 169}
146
147void __init init_IRQ_ipr()
148{
149 make_ipr_irq(sh7750_ipr_map, ARRAY_SIZE(sh7750_ipr_map));
150#ifdef CONFIG_CPU_SUBTYPE_SH7751
151 make_ipr_irq(sh7751_ipr_map, ARRAY_SIZE(sh7751_ipr_map));
152#endif
153}
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
index b7c702821e..3df1697556 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
@@ -96,7 +96,25 @@ static struct intc2_data intc2_irq_table[] = {
96 {109,12, 0, 4, 0, 3}, /* CMTI */ 96 {109,12, 0, 4, 0, 3}, /* CMTI */
97}; 97};
98 98
99static struct ipr_data sh7760_ipr_map[] = { 99static struct intc2_desc intc2_irq_desc __read_mostly = {
100 .prio_base = 0xfe080000,
101 .msk_base = 0xfe080040,
102 .mskclr_base = 0xfe080060,
103
104 .intc2_data = intc2_irq_table,
105 .nr_irqs = ARRAY_SIZE(intc2_irq_table),
106
107 .chip = {
108 .name = "INTC2-sh7760",
109 },
110};
111
112void __init init_IRQ_intc2(void)
113{
114 register_intc2_controller(&intc2_irq_desc);
115}
116
117static struct ipr_data ipr_irq_table[] = {
100 /* IRQ, IPR-idx, shift, priority */ 118 /* IRQ, IPR-idx, shift, priority */
101 { 16, 0, 12, 2 }, /* TMU0 TUNI*/ 119 { 16, 0, 12, 2 }, /* TMU0 TUNI*/
102 { 17, 0, 8, 2 }, /* TMU1 TUNI */ 120 { 17, 0, 8, 2 }, /* TMU1 TUNI */
@@ -133,20 +151,19 @@ static unsigned long ipr_offsets[] = {
133 0xffd00010UL, /* 3: IPRD */ 151 0xffd00010UL, /* 3: IPRD */
134}; 152};
135 153
136/* given the IPR index return the address of the IPR register */ 154static struct ipr_desc ipr_irq_desc = {
137unsigned int map_ipridx_to_addr(int idx) 155 .ipr_offsets = ipr_offsets,
138{ 156 .nr_offsets = ARRAY_SIZE(ipr_offsets),
139 if (idx >= ARRAY_SIZE(ipr_offsets))
140 return 0;
141 return ipr_offsets[idx];
142}
143 157
144void __init init_IRQ_intc2(void) 158 .ipr_data = ipr_irq_table,
145{ 159 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
146 make_intc2_irq(intc2_irq_table, ARRAY_SIZE(intc2_irq_table)); 160
147} 161 .chip = {
162 .name = "IPR-sh7760",
163 },
164};
148 165
149void __init init_IRQ_ipr(void) 166void __init init_IRQ_ipr(void)
150{ 167{
151 make_ipr_irq(sh7760_ipr_map, ARRAY_SIZE(sh7760_ipr_map)); 168 register_ipr_controller(&ipr_irq_desc);
152} 169}
diff --git a/arch/sh/kernel/cpu/sh4a/Makefile b/arch/sh/kernel/cpu/sh4a/Makefile
index ab7422f8f8..4006232864 100644
--- a/arch/sh/kernel/cpu/sh4a/Makefile
+++ b/arch/sh/kernel/cpu/sh4a/Makefile
@@ -9,6 +9,7 @@ obj-$(CONFIG_CPU_SUBTYPE_SH7785) += setup-sh7785.o
9obj-$(CONFIG_CPU_SUBTYPE_SH73180) += setup-sh73180.o 9obj-$(CONFIG_CPU_SUBTYPE_SH73180) += setup-sh73180.o
10obj-$(CONFIG_CPU_SUBTYPE_SH7343) += setup-sh7343.o 10obj-$(CONFIG_CPU_SUBTYPE_SH7343) += setup-sh7343.o
11obj-$(CONFIG_CPU_SUBTYPE_SH7722) += setup-sh7722.o 11obj-$(CONFIG_CPU_SUBTYPE_SH7722) += setup-sh7722.o
12obj-$(CONFIG_CPU_SUBTYPE_SHX3) += setup-shx3.o
12 13
13# Primary on-chip clocks (common) 14# Primary on-chip clocks (common)
14clock-$(CONFIG_CPU_SUBTYPE_SH73180) := clock-sh73180.o 15clock-$(CONFIG_CPU_SUBTYPE_SH73180) := clock-sh73180.o
@@ -17,5 +18,6 @@ clock-$(CONFIG_CPU_SUBTYPE_SH7780) := clock-sh7780.o
17clock-$(CONFIG_CPU_SUBTYPE_SH7785) := clock-sh7785.o 18clock-$(CONFIG_CPU_SUBTYPE_SH7785) := clock-sh7785.o
18clock-$(CONFIG_CPU_SUBTYPE_SH7343) := clock-sh7343.o 19clock-$(CONFIG_CPU_SUBTYPE_SH7343) := clock-sh7343.o
19clock-$(CONFIG_CPU_SUBTYPE_SH7722) := clock-sh7722.o 20clock-$(CONFIG_CPU_SUBTYPE_SH7722) := clock-sh7722.o
21clock-$(CONFIG_CPU_SUBTYPE_SHX3) := clock-shx3.o
20 22
21obj-y += $(clock-y) 23obj-y += $(clock-y)
diff --git a/arch/sh/kernel/cpu/sh4a/clock-shx3.c b/arch/sh/kernel/cpu/sh4a/clock-shx3.c
new file mode 100644
index 0000000000..c630b29e06
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh4a/clock-shx3.c
@@ -0,0 +1,135 @@
1/*
2 * arch/sh/kernel/cpu/sh4/clock-shx3.c
3 *
4 * SH-X3 support for the clock framework
5 *
6 * Copyright (C) 2006-2007 Renesas Technology Corp.
7 * Copyright (C) 2006-2007 Renesas Solutions Corp.
8 * Copyright (C) 2006-2007 Paul Mundt
9 *
10 * This file is subject to the terms and conditions of the GNU General Public
11 * License. See the file "COPYING" in the main directory of this archive
12 * for more details.
13 */
14#include <linux/init.h>
15#include <linux/kernel.h>
16#include <asm/clock.h>
17#include <asm/freq.h>
18#include <asm/io.h>
19
20static int ifc_divisors[] = { 1, 2, 4 ,6 };
21static int bfc_divisors[] = { 1, 1, 1, 1, 1, 12, 16, 18, 24, 32, 36, 48 };
22static int pfc_divisors[] = { 1, 1, 1, 1, 1, 1, 1, 18, 24, 32, 36, 48 };
23static int cfc_divisors[] = { 1, 1, 4, 6 };
24
25#define IFC_POS 28
26#define IFC_MSK 0x0003
27#define BFC_MSK 0x000f
28#define PFC_MSK 0x000f
29#define CFC_MSK 0x0003
30#define BFC_POS 16
31#define PFC_POS 0
32#define CFC_POS 20
33
34static void master_clk_init(struct clk *clk)
35{
36 clk->rate *= pfc_divisors[(ctrl_inl(FRQCR) >> PFC_POS) & PFC_MSK];
37}
38
39static struct clk_ops shx3_master_clk_ops = {
40 .init = master_clk_init,
41};
42
43static void module_clk_recalc(struct clk *clk)
44{
45 int idx = ((ctrl_inl(FRQCR) >> PFC_POS) & PFC_MSK);
46 clk->rate = clk->parent->rate / pfc_divisors[idx];
47}
48
49static struct clk_ops shx3_module_clk_ops = {
50 .recalc = module_clk_recalc,
51};
52
53static void bus_clk_recalc(struct clk *clk)
54{
55 int idx = ((ctrl_inl(FRQCR) >> BFC_POS) & BFC_MSK);
56 clk->rate = clk->parent->rate / bfc_divisors[idx];
57}
58
59static struct clk_ops shx3_bus_clk_ops = {
60 .recalc = bus_clk_recalc,
61};
62
63static void cpu_clk_recalc(struct clk *clk)
64{
65 int idx = ((ctrl_inl(FRQCR) >> IFC_POS) & IFC_MSK);
66 clk->rate = clk->parent->rate / ifc_divisors[idx];
67}
68
69static struct clk_ops shx3_cpu_clk_ops = {
70 .recalc = cpu_clk_recalc,
71};
72
73static struct clk_ops *shx3_clk_ops[] = {
74 &shx3_master_clk_ops,
75 &shx3_module_clk_ops,
76 &shx3_bus_clk_ops,
77 &shx3_cpu_clk_ops,
78};
79
80void __init arch_init_clk_ops(struct clk_ops **ops, int idx)
81{
82 if (idx < ARRAY_SIZE(shx3_clk_ops))
83 *ops = shx3_clk_ops[idx];
84}
85
86static void shyway_clk_recalc(struct clk *clk)
87{
88 int idx = ((ctrl_inl(FRQCR) >> CFC_POS) & CFC_MSK);
89 clk->rate = clk->parent->rate / cfc_divisors[idx];
90}
91
92static struct clk_ops shx3_shyway_clk_ops = {
93 .recalc = shyway_clk_recalc,
94};
95
96static struct clk shx3_shyway_clk = {
97 .name = "shyway_clk",
98 .flags = CLK_ALWAYS_ENABLED,
99 .ops = &shx3_shyway_clk_ops,
100};
101
102/*
103 * Additional SHx3-specific on-chip clocks that aren't already part of the
104 * clock framework
105 */
106static struct clk *shx3_onchip_clocks[] = {
107 &shx3_shyway_clk,
108};
109
110static int __init shx3_clk_init(void)
111{
112 struct clk *clk = clk_get(NULL, "master_clk");
113 int i;
114
115 for (i = 0; i < ARRAY_SIZE(shx3_onchip_clocks); i++) {
116 struct clk *clkp = shx3_onchip_clocks[i];
117
118 clkp->parent = clk;
119 clk_register(clkp);
120 clk_enable(clkp);
121 }
122
123 /*
124 * Now that we have the rest of the clocks registered, we need to
125 * force the parent clock to propagate so that these clocks will
126 * automatically figure out their rate. We cheat by handing the
127 * parent clock its current rate and forcing child propagation.
128 */
129 clk_set_rate(clk, clk_get_rate(clk));
130
131 clk_put(clk);
132
133 return 0;
134}
135arch_initcall(shx3_clk_init);
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index 1143fbf65f..a3e159ef6d 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * SH7722 Setup 2 * SH7722 Setup
3 * 3 *
4 * Copyright (C) 2006 Paul Mundt 4 * Copyright (C) 2006 - 2007 Paul Mundt
5 * 5 *
6 * This file is subject to the terms and conditions of the GNU General Public 6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive 7 * License. See the file "COPYING" in the main directory of this archive
@@ -10,6 +10,8 @@
10#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <linux/mm.h>
14#include <asm/mmzone.h>
13#include <asm/sci.h> 15#include <asm/sci.h>
14 16
15static struct plat_sci_port sci_platform_data[] = { 17static struct plat_sci_port sci_platform_data[] = {
@@ -42,7 +44,7 @@ static int __init sh7722_devices_setup(void)
42} 44}
43__initcall(sh7722_devices_setup); 45__initcall(sh7722_devices_setup);
44 46
45static struct ipr_data sh7722_ipr_map[] = { 47static struct ipr_data ipr_irq_table[] = {
46 /* IRQ, IPR-idx, shift, prio */ 48 /* IRQ, IPR-idx, shift, prio */
47 { 16, 0, 12, 2 }, /* TMU0 */ 49 { 16, 0, 12, 2 }, /* TMU0 */
48 { 17, 0, 8, 2 }, /* TMU1 */ 50 { 17, 0, 8, 2 }, /* TMU1 */
@@ -67,14 +69,25 @@ static unsigned long ipr_offsets[] = {
67 0xa408002c, /* 11: IPRL */ 69 0xa408002c, /* 11: IPRL */
68}; 70};
69 71
70unsigned int map_ipridx_to_addr(int idx) 72static struct ipr_desc ipr_irq_desc = {
73 .ipr_offsets = ipr_offsets,
74 .nr_offsets = ARRAY_SIZE(ipr_offsets),
75
76 .ipr_data = ipr_irq_table,
77 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
78
79 .chip = {
80 .name = "IPR-sh7722",
81 },
82};
83
84void __init init_IRQ_ipr(void)
71{ 85{
72 if (unlikely(idx >= ARRAY_SIZE(ipr_offsets))) 86 register_ipr_controller(&ipr_irq_desc);
73 return 0;
74 return ipr_offsets[idx];
75} 87}
76 88
77void __init init_IRQ_ipr(void) 89void __init plat_mem_setup(void)
78{ 90{
79 make_ipr_irq(sh7722_ipr_map, ARRAY_SIZE(sh7722_ipr_map)); 91 /* Register the URAM space as Node 1 */
92 setup_bootmem_node(1, 0x055f0000, 0x05610000);
80} 93}
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
index 9aeaa2ddaa..b57c760bff 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
@@ -102,7 +102,20 @@ static struct intc2_data intc2_irq_table[] = {
102 { 68, 0x14, 8, 0, 18, 2 }, /* PCIC4 */ 102 { 68, 0x14, 8, 0, 18, 2 }, /* PCIC4 */
103}; 103};
104 104
105static struct intc2_desc intc2_irq_desc __read_mostly = {
106 .prio_base = 0xffd40000,
107 .msk_base = 0xffd40038,
108 .mskclr_base = 0xffd4003c,
109
110 .intc2_data = intc2_irq_table,
111 .nr_irqs = ARRAY_SIZE(intc2_irq_table),
112
113 .chip = {
114 .name = "INTC2-sh7780",
115 },
116};
117
105void __init init_IRQ_intc2(void) 118void __init init_IRQ_intc2(void)
106{ 119{
107 make_intc2_irq(intc2_irq_table, ARRAY_SIZE(intc2_irq_table)); 120 register_intc2_controller(&intc2_irq_desc);
108} 121}
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
index 07b0de82cf..ce10ec5d69 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
@@ -97,7 +97,21 @@ static struct intc2_data intc2_irq_table[] = {
97 { 60, 12, 16, 0, 7, 3 }, /* SCIF5 ERI, RXI, BRI, TXI */ 97 { 60, 12, 16, 0, 7, 3 }, /* SCIF5 ERI, RXI, BRI, TXI */
98}; 98};
99 99
100static struct intc2_desc intc2_irq_desc __read_mostly = {
101 .prio_base = 0xffd40000,
102 .msk_base = 0xffd40038,
103 .mskclr_base = 0xffd4003c,
104
105 .intc2_data = intc2_irq_table,
106 .nr_irqs = ARRAY_SIZE(intc2_irq_table),
107
108 .chip = {
109 .name = "INTC2-sh7785",
110 },
111};
112
100void __init init_IRQ_intc2(void) 113void __init init_IRQ_intc2(void)
101{ 114{
102 make_intc2_irq(intc2_irq_table, ARRAY_SIZE(intc2_irq_table)); 115 register_intc2_controller(&intc2_irq_desc);
103} 116}
117
diff --git a/arch/sh/kernel/cpu/sh4a/setup-shx3.c b/arch/sh/kernel/cpu/sh4a/setup-shx3.c
new file mode 100644
index 0000000000..70683ea12b
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh4a/setup-shx3.c
@@ -0,0 +1,85 @@
1/*
2 * SH-X3 Setup
3 *
4 * Copyright (C) 2007 Paul Mundt
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10#include <linux/platform_device.h>
11#include <linux/init.h>
12#include <linux/serial.h>
13#include <linux/io.h>
14#include <asm/sci.h>
15
16static struct plat_sci_port sci_platform_data[] = {
17 {
18 .mapbase = 0xffc30000,
19 .flags = UPF_BOOT_AUTOCONF,
20 .type = PORT_SCIF,
21 .irqs = { 40, 41, 43, 42 },
22 }, {
23 .mapbase = 0xffc40000,
24 .flags = UPF_BOOT_AUTOCONF,
25 .type = PORT_SCIF,
26 .irqs = { 44, 45, 47, 46 },
27 }, {
28 .mapbase = 0xffc50000,
29 .flags = UPF_BOOT_AUTOCONF,
30 .type = PORT_SCIF,
31 .irqs = { 48, 49, 51, 50 },
32 }, {
33 .mapbase = 0xffc60000,
34 .flags = UPF_BOOT_AUTOCONF,
35 .type = PORT_SCIF,
36 .irqs = { 52, 53, 55, 54 },
37 }, {
38 .flags = 0,
39 }
40};
41
42static struct platform_device sci_device = {
43 .name = "sh-sci",
44 .id = -1,
45 .dev = {
46 .platform_data = sci_platform_data,
47 },
48};
49
50static struct platform_device *shx3_devices[] __initdata = {
51 &sci_device,
52};
53
54static int __init shx3_devices_setup(void)
55{
56 return platform_add_devices(shx3_devices,
57 ARRAY_SIZE(shx3_devices));
58}
59__initcall(shx3_devices_setup);
60
61static struct intc2_data intc2_irq_table[] = {
62 { 16, 0, 0, 0, 1, 2 }, /* TMU0 */
63 { 40, 4, 0, 0x20, 0, 3 }, /* SCIF0 ERI */
64 { 41, 4, 0, 0x20, 1, 3 }, /* SCIF0 RXI */
65 { 42, 4, 0, 0x20, 2, 3 }, /* SCIF0 BRI */
66 { 43, 4, 0, 0x20, 3, 3 }, /* SCIF0 TXI */
67};
68
69static struct intc2_desc intc2_irq_desc __read_mostly = {
70 .prio_base = 0xfe410000,
71 .msk_base = 0xfe410820,
72 .mskclr_base = 0xfe410850,
73
74 .intc2_data = intc2_irq_table,
75 .nr_irqs = ARRAY_SIZE(intc2_irq_table),
76
77 .chip = {
78 .name = "INTC2-SHX3",
79 },
80};
81
82void __init init_IRQ_intc2(void)
83{
84 register_intc2_controller(&intc2_irq_desc);
85}
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
index 27b923c45b..2789779886 100644
--- a/arch/sh/kernel/irq.c
+++ b/arch/sh/kernel/irq.c
@@ -158,15 +158,11 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
158} 158}
159 159
160#ifdef CONFIG_4KSTACKS 160#ifdef CONFIG_4KSTACKS
161/*
162 * These should really be __section__(".bss.page_aligned") as well, but
163 * gcc's 3.0 and earlier don't handle that correctly.
164 */
165static char softirq_stack[NR_CPUS * THREAD_SIZE] 161static char softirq_stack[NR_CPUS * THREAD_SIZE]
166 __attribute__((__aligned__(THREAD_SIZE))); 162 __attribute__((__section__(".bss.page_aligned")));
167 163
168static char hardirq_stack[NR_CPUS * THREAD_SIZE] 164static char hardirq_stack[NR_CPUS * THREAD_SIZE]
169 __attribute__((__aligned__(THREAD_SIZE))); 165 __attribute__((__section__(".bss.page_aligned")));
170 166
171/* 167/*
172 * allocate per-cpu stacks for hardirq and for softirq processing 168 * allocate per-cpu stacks for hardirq and for softirq processing
diff --git a/arch/sh/kernel/machvec.c b/arch/sh/kernel/machvec.c
new file mode 100644
index 0000000000..23c5948f01
--- /dev/null
+++ b/arch/sh/kernel/machvec.c
@@ -0,0 +1,130 @@
1/*
2 * arch/sh/kernel/machvec.c
3 *
4 * The SuperH machine vector setup handlers, yanked from setup.c
5 *
6 * Copyright (C) 1999 Niibe Yutaka
7 * Copyright (C) 2002 - 2007 Paul Mundt
8 *
9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file "COPYING" in the main directory of this archive
11 * for more details.
12 */
13#include <linux/init.h>
14#include <linux/string.h>
15#include <asm/machvec.h>
16#include <asm/sections.h>
17#include <asm/io.h>
18#include <asm/irq.h>
19
20#define MV_NAME_SIZE 32
21
22#define for_each_mv(mv) \
23 for ((mv) = (struct sh_machine_vector *)&__machvec_start; \
24 (mv) && (unsigned long)(mv) < (unsigned long)&__machvec_end; \
25 (mv)++)
26
27static struct sh_machine_vector * __init get_mv_byname(const char *name)
28{
29 struct sh_machine_vector *mv;
30
31 for_each_mv(mv)
32 if (strcasecmp(name, mv->mv_name) == 0)
33 return mv;
34
35 return NULL;
36}
37
38static unsigned int __initdata machvec_selected;
39
40static int __init early_parse_mv(char *from)
41{
42 char mv_name[MV_NAME_SIZE] = "";
43 char *mv_end;
44 char *mv_comma;
45 int mv_len;
46 struct sh_machine_vector *mvp;
47
48 mv_end = strchr(from, ' ');
49 if (mv_end == NULL)
50 mv_end = from + strlen(from);
51
52 mv_comma = strchr(from, ',');
53 mv_len = mv_end - from;
54 if (mv_len > (MV_NAME_SIZE-1))
55 mv_len = MV_NAME_SIZE-1;
56 memcpy(mv_name, from, mv_len);
57 mv_name[mv_len] = '\0';
58 from = mv_end;
59
60 machvec_selected = 1;
61
62 /* Boot with the generic vector */
63 if (strcmp(mv_name, "generic") == 0)
64 return 0;
65
66 mvp = get_mv_byname(mv_name);
67 if (unlikely(!mvp)) {
68 printk("Available vectors:\n\n\t'%s', ", sh_mv.mv_name);
69 for_each_mv(mvp)
70 printk("'%s', ", mvp->mv_name);
71 printk("\n\n");
72 panic("Failed to select machvec '%s' -- halting.\n",
73 mv_name);
74 } else
75 sh_mv = *mvp;
76
77 return 0;
78}
79early_param("sh_mv", early_parse_mv);
80
81void __init sh_mv_setup(void)
82{
83 /*
84 * Only overload the machvec if one hasn't been selected on
85 * the command line with sh_mv=
86 */
87 if (!machvec_selected) {
88 unsigned long machvec_size;
89
90 machvec_size = ((unsigned long)&__machvec_end -
91 (unsigned long)&__machvec_start);
92
93 /*
94 * If the machvec hasn't been preselected, use the first
95 * vector (usually the only one) from .machvec.init.
96 */
97 if (machvec_size >= sizeof(struct sh_machine_vector))
98 sh_mv = *(struct sh_machine_vector *)&__machvec_start;
99 }
100
101 printk(KERN_NOTICE "Booting machvec: %s\n", get_system_type());
102
103 /*
104 * Manually walk the vec, fill in anything that the board hasn't yet
105 * by hand, wrapping to the generic implementation.
106 */
107#define mv_set(elem) do { \
108 if (!sh_mv.mv_##elem) \
109 sh_mv.mv_##elem = generic_##elem; \
110} while (0)
111
112 mv_set(inb); mv_set(inw); mv_set(inl);
113 mv_set(outb); mv_set(outw); mv_set(outl);
114
115 mv_set(inb_p); mv_set(inw_p); mv_set(inl_p);
116 mv_set(outb_p); mv_set(outw_p); mv_set(outl_p);
117
118 mv_set(insb); mv_set(insw); mv_set(insl);
119 mv_set(outsb); mv_set(outsw); mv_set(outsl);
120
121 mv_set(readb); mv_set(readw); mv_set(readl);
122 mv_set(writeb); mv_set(writew); mv_set(writel);
123
124 mv_set(ioport_map);
125 mv_set(ioport_unmap);
126 mv_set(irq_demux);
127
128 if (!sh_mv.mv_nr_irqs)
129 sh_mv.mv_nr_irqs = NR_IRQS;
130}
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
index a11e2aa73c..6334a4c54c 100644
--- a/arch/sh/kernel/process.c
+++ b/arch/sh/kernel/process.c
@@ -17,6 +17,7 @@
17#include <linux/kexec.h> 17#include <linux/kexec.h>
18#include <linux/kdebug.h> 18#include <linux/kdebug.h>
19#include <linux/tick.h> 19#include <linux/tick.h>
20#include <linux/reboot.h>
20#include <asm/uaccess.h> 21#include <asm/uaccess.h>
21#include <asm/mmu_context.h> 22#include <asm/mmu_context.h>
22#include <asm/pgalloc.h> 23#include <asm/pgalloc.h>
@@ -319,9 +320,7 @@ static void ubc_set_tracing(int asid, unsigned long pc)
319 ctrl_outl(pc, UBC_BARA); 320 ctrl_outl(pc, UBC_BARA);
320 321
321#ifdef CONFIG_MMU 322#ifdef CONFIG_MMU
322 /* We don't have any ASID settings for the SH-2! */ 323 ctrl_outb(asid, UBC_BASRA);
323 if (current_cpu_data.type != CPU_SH7604)
324 ctrl_outb(asid, UBC_BASRA);
325#endif 324#endif
326 325
327 ctrl_outl(0, UBC_BAMRA); 326 ctrl_outl(0, UBC_BAMRA);
@@ -405,8 +404,8 @@ asmlinkage int sys_fork(unsigned long r4, unsigned long r5,
405 unsigned long r6, unsigned long r7, 404 unsigned long r6, unsigned long r7,
406 struct pt_regs __regs) 405 struct pt_regs __regs)
407{ 406{
408 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
409#ifdef CONFIG_MMU 407#ifdef CONFIG_MMU
408 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
410 return do_fork(SIGCHLD, regs->regs[15], regs, 0, NULL, NULL); 409 return do_fork(SIGCHLD, regs->regs[15], regs, 0, NULL, NULL);
411#else 410#else
412 /* fork almost works, enough to trick you into looking elsewhere :-( */ 411 /* fork almost works, enough to trick you into looking elsewhere :-( */
@@ -449,23 +448,20 @@ asmlinkage int sys_vfork(unsigned long r4, unsigned long r5,
449/* 448/*
450 * sys_execve() executes a new program. 449 * sys_execve() executes a new program.
451 */ 450 */
452asmlinkage int sys_execve(char *ufilename, char **uargv, 451asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv,
453 char **uenvp, unsigned long r7, 452 char __user * __user *uenvp, unsigned long r7,
454 struct pt_regs __regs) 453 struct pt_regs __regs)
455{ 454{
456 struct pt_regs *regs = RELOC_HIDE(&__regs, 0); 455 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
457 int error; 456 int error;
458 char *filename; 457 char *filename;
459 458
460 filename = getname((char __user *)ufilename); 459 filename = getname(ufilename);
461 error = PTR_ERR(filename); 460 error = PTR_ERR(filename);
462 if (IS_ERR(filename)) 461 if (IS_ERR(filename))
463 goto out; 462 goto out;
464 463
465 error = do_execve(filename, 464 error = do_execve(filename, uargv, uenvp, regs);
466 (char __user * __user *)uargv,
467 (char __user * __user *)uenvp,
468 regs);
469 if (error == 0) { 465 if (error == 0) {
470 task_lock(current); 466 task_lock(current);
471 current->ptrace &= ~PT_DTRACE; 467 current->ptrace &= ~PT_DTRACE;
diff --git a/arch/sh/kernel/ptrace.c b/arch/sh/kernel/ptrace.c
index 3fb5fc0b55..891d1d46c9 100644
--- a/arch/sh/kernel/ptrace.c
+++ b/arch/sh/kernel/ptrace.c
@@ -91,17 +91,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
91 switch (request) { 91 switch (request) {
92 /* when I and D space are separate, these will need to be fixed. */ 92 /* when I and D space are separate, these will need to be fixed. */
93 case PTRACE_PEEKTEXT: /* read word at location addr. */ 93 case PTRACE_PEEKTEXT: /* read word at location addr. */
94 case PTRACE_PEEKDATA: { 94 case PTRACE_PEEKDATA:
95 unsigned long tmp; 95 ret = generic_ptrace_peekdata(child, addr, data);
96 int copied;
97
98 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
99 ret = -EIO;
100 if (copied != sizeof(tmp))
101 break;
102 ret = put_user(tmp,(unsigned long *) data);
103 break;
104 }
105 96
106 /* read the word at location addr in the USER area. */ 97 /* read the word at location addr in the USER area. */
107 case PTRACE_PEEKUSR: { 98 case PTRACE_PEEKUSR: {
@@ -128,17 +119,14 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
128 tmp = !!tsk_used_math(child); 119 tmp = !!tsk_used_math(child);
129 else 120 else
130 tmp = 0; 121 tmp = 0;
131 ret = put_user(tmp, (unsigned long *)data); 122 ret = put_user(tmp, (unsigned long __user *)data);
132 break; 123 break;
133 } 124 }
134 125
135 /* when I and D space are separate, this will have to be fixed. */ 126 /* when I and D space are separate, this will have to be fixed. */
136 case PTRACE_POKETEXT: /* write the word at location addr. */ 127 case PTRACE_POKETEXT: /* write the word at location addr. */
137 case PTRACE_POKEDATA: 128 case PTRACE_POKEDATA:
138 ret = 0; 129 ret = generic_ptrace_pokedata(child, addr, data);
139 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
140 break;
141 ret = -EIO;
142 break; 130 break;
143 131
144 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ 132 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
@@ -196,7 +184,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
196 184
197 case PTRACE_SINGLESTEP: { /* set the trap flag. */ 185 case PTRACE_SINGLESTEP: { /* set the trap flag. */
198 long pc; 186 long pc;
199 struct pt_regs *dummy = NULL; 187 struct pt_regs *regs = NULL;
200 188
201 ret = -EIO; 189 ret = -EIO;
202 if (!valid_signal(data)) 190 if (!valid_signal(data))
@@ -207,7 +195,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
207 child->ptrace |= PT_DTRACE; 195 child->ptrace |= PT_DTRACE;
208 } 196 }
209 197
210 pc = get_stack_long(child, (long)&dummy->pc); 198 pc = get_stack_long(child, (long)&regs->pc);
211 199
212 /* Next scheduling will set up UBC */ 200 /* Next scheduling will set up UBC */
213 if (child->thread.ubc_pc == 0) 201 if (child->thread.ubc_pc == 0)
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index c277291359..de8e6e2f2c 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -23,6 +23,7 @@
23#include <linux/kexec.h> 23#include <linux/kexec.h>
24#include <asm/uaccess.h> 24#include <asm/uaccess.h>
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/page.h>
26#include <asm/sections.h> 27#include <asm/sections.h>
27#include <asm/irq.h> 28#include <asm/irq.h>
28#include <asm/setup.h> 29#include <asm/setup.h>
@@ -41,20 +42,19 @@ extern void * __rd_start, * __rd_end;
41 * The bigger value means no problem. 42 * The bigger value means no problem.
42 */ 43 */
43struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, }; 44struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, };
45
46/*
47 * The machine vector. First entry in .machvec.init, or clobbered by
48 * sh_mv= on the command line, prior to .machvec.init teardown.
49 */
50struct sh_machine_vector sh_mv = { .mv_name = "generic", };
51
44#ifdef CONFIG_VT 52#ifdef CONFIG_VT
45struct screen_info screen_info; 53struct screen_info screen_info;
46#endif 54#endif
47 55
48#if defined(CONFIG_SH_UNKNOWN)
49struct sh_machine_vector sh_mv;
50#endif
51
52extern int root_mountflags; 56extern int root_mountflags;
53 57
54#define MV_NAME_SIZE 32
55
56static struct sh_machine_vector* __init get_mv_byname(const char* name);
57
58/* 58/*
59 * This is set up by the setup-routine at boot-time 59 * This is set up by the setup-routine at boot-time
60 */ 60 */
@@ -80,131 +80,17 @@ static struct resource data_resource = { .name = "Kernel data", };
80 80
81unsigned long memory_start, memory_end; 81unsigned long memory_start, memory_end;
82 82
83static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], 83static int __init early_parse_mem(char *p)
84 struct sh_machine_vector** mvp,
85 unsigned long *mv_io_base)
86{ 84{
87 char c = ' ', *to = command_line, *from = COMMAND_LINE; 85 unsigned long size;
88 int len = 0;
89
90 /* Save unparsed command line copy for /proc/cmdline */
91 memcpy(boot_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
92 boot_command_line[COMMAND_LINE_SIZE-1] = '\0';
93 86
94 memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START; 87 memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START;
95 memory_end = memory_start + __MEMORY_SIZE; 88 size = memparse(p, &p);
96 89 memory_end = memory_start + size;
97 for (;;) {
98 /*
99 * "mem=XXX[kKmM]" defines a size of memory.
100 */
101 if (c == ' ' && !memcmp(from, "mem=", 4)) {
102 if (to != command_line)
103 to--;
104 {
105 unsigned long mem_size;
106
107 mem_size = memparse(from+4, &from);
108 memory_end = memory_start + mem_size;
109 }
110 }
111
112 if (c == ' ' && !memcmp(from, "sh_mv=", 6)) {
113 char* mv_end;
114 char* mv_comma;
115 int mv_len;
116 if (to != command_line)
117 to--;
118 from += 6;
119 mv_end = strchr(from, ' ');
120 if (mv_end == NULL)
121 mv_end = from + strlen(from);
122
123 mv_comma = strchr(from, ',');
124 if ((mv_comma != NULL) && (mv_comma < mv_end)) {
125 int ints[3];
126 get_options(mv_comma+1, ARRAY_SIZE(ints), ints);
127 *mv_io_base = ints[1];
128 mv_len = mv_comma - from;
129 } else {
130 mv_len = mv_end - from;
131 }
132 if (mv_len > (MV_NAME_SIZE-1))
133 mv_len = MV_NAME_SIZE-1;
134 memcpy(mv_name, from, mv_len);
135 mv_name[mv_len] = '\0';
136 from = mv_end;
137
138 *mvp = get_mv_byname(mv_name);
139 }
140
141 c = *(from++);
142 if (!c)
143 break;
144 if (COMMAND_LINE_SIZE <= ++len)
145 break;
146 *(to++) = c;
147 }
148 *to = '\0';
149 *cmdline_p = command_line;
150}
151
152static int __init sh_mv_setup(char **cmdline_p)
153{
154#ifdef CONFIG_SH_UNKNOWN
155 extern struct sh_machine_vector mv_unknown;
156#endif
157 struct sh_machine_vector *mv = NULL;
158 char mv_name[MV_NAME_SIZE] = "";
159 unsigned long mv_io_base = 0;
160
161 parse_cmdline(cmdline_p, mv_name, &mv, &mv_io_base);
162
163#ifdef CONFIG_SH_UNKNOWN
164 if (mv == NULL) {
165 mv = &mv_unknown;
166 if (*mv_name != '\0') {
167 printk("Warning: Unsupported machine %s, using unknown\n",
168 mv_name);
169 }
170 }
171 sh_mv = *mv;
172#endif
173
174 /*
175 * Manually walk the vec, fill in anything that the board hasn't yet
176 * by hand, wrapping to the generic implementation.
177 */
178#define mv_set(elem) do { \
179 if (!sh_mv.mv_##elem) \
180 sh_mv.mv_##elem = generic_##elem; \
181} while (0)
182
183 mv_set(inb); mv_set(inw); mv_set(inl);
184 mv_set(outb); mv_set(outw); mv_set(outl);
185
186 mv_set(inb_p); mv_set(inw_p); mv_set(inl_p);
187 mv_set(outb_p); mv_set(outw_p); mv_set(outl_p);
188
189 mv_set(insb); mv_set(insw); mv_set(insl);
190 mv_set(outsb); mv_set(outsw); mv_set(outsl);
191
192 mv_set(readb); mv_set(readw); mv_set(readl);
193 mv_set(writeb); mv_set(writew); mv_set(writel);
194
195 mv_set(ioport_map);
196 mv_set(ioport_unmap);
197 mv_set(irq_demux);
198
199#ifdef CONFIG_SH_UNKNOWN
200 __set_io_port_base(mv_io_base);
201#endif
202
203 if (!sh_mv.mv_nr_irqs)
204 sh_mv.mv_nr_irqs = NR_IRQS;
205 90
206 return 0; 91 return 0;
207} 92}
93early_param("mem", early_parse_mem);
208 94
209/* 95/*
210 * Register fully available low RAM pages with the bootmem allocator. 96 * Register fully available low RAM pages with the bootmem allocator.
@@ -230,7 +116,7 @@ static void __init register_bootmem_low_pages(void)
230 free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(pages)); 116 free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(pages));
231} 117}
232 118
233void __init setup_bootmem_allocator(unsigned long start_pfn) 119void __init setup_bootmem_allocator(unsigned long free_pfn)
234{ 120{
235 unsigned long bootmap_size; 121 unsigned long bootmap_size;
236 122
@@ -239,9 +125,10 @@ void __init setup_bootmem_allocator(unsigned long start_pfn)
239 * bootstrap step all allocations (until the page allocator 125 * bootstrap step all allocations (until the page allocator
240 * is intact) must be done via bootmem_alloc(). 126 * is intact) must be done via bootmem_alloc().
241 */ 127 */
242 bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn, 128 bootmap_size = init_bootmem_node(NODE_DATA(0), free_pfn,
243 min_low_pfn, max_low_pfn); 129 min_low_pfn, max_low_pfn);
244 130
131 add_active_range(0, min_low_pfn, max_low_pfn);
245 register_bootmem_low_pages(); 132 register_bootmem_low_pages();
246 133
247 node_set_online(0); 134 node_set_online(0);
@@ -254,7 +141,7 @@ void __init setup_bootmem_allocator(unsigned long start_pfn)
254 * an invalid RAM area. 141 * an invalid RAM area.
255 */ 142 */
256 reserve_bootmem(__MEMORY_START+PAGE_SIZE, 143 reserve_bootmem(__MEMORY_START+PAGE_SIZE,
257 (PFN_PHYS(start_pfn)+bootmap_size+PAGE_SIZE-1)-__MEMORY_START); 144 (PFN_PHYS(free_pfn)+bootmap_size+PAGE_SIZE-1)-__MEMORY_START);
258 145
259 /* 146 /*
260 * reserve physical page 0 - it's a special BIOS page on many boxes, 147 * reserve physical page 0 - it's a special BIOS page on many boxes,
@@ -262,6 +149,8 @@ void __init setup_bootmem_allocator(unsigned long start_pfn)
262 */ 149 */
263 reserve_bootmem(__MEMORY_START, PAGE_SIZE); 150 reserve_bootmem(__MEMORY_START, PAGE_SIZE);
264 151
152 sparse_memory_present_with_active_regions(0);
153
265#ifdef CONFIG_BLK_DEV_INITRD 154#ifdef CONFIG_BLK_DEV_INITRD
266 ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0); 155 ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0);
267 if (&__rd_start != &__rd_end) { 156 if (&__rd_start != &__rd_end) {
@@ -315,10 +204,6 @@ void __init setup_arch(char **cmdline_p)
315{ 204{
316 enable_mmu(); 205 enable_mmu();
317 206
318#ifdef CONFIG_CMDLINE_BOOL
319 strcpy(COMMAND_LINE, CONFIG_CMDLINE);
320#endif
321
322 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); 207 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
323 208
324#ifdef CONFIG_BLK_DEV_RAM 209#ifdef CONFIG_BLK_DEV_RAM
@@ -339,9 +224,22 @@ void __init setup_arch(char **cmdline_p)
339 data_resource.start = virt_to_phys(_etext); 224 data_resource.start = virt_to_phys(_etext);
340 data_resource.end = virt_to_phys(_edata)-1; 225 data_resource.end = virt_to_phys(_edata)-1;
341 226
227 memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START;
228 memory_end = memory_start + __MEMORY_SIZE;
229
230#ifdef CONFIG_CMDLINE_BOOL
231 strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line));
232#else
233 strlcpy(command_line, COMMAND_LINE, sizeof(command_line));
234#endif
235
236 /* Save unparsed command line copy for /proc/cmdline */
237 memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
238 *cmdline_p = command_line;
239
342 parse_early_param(); 240 parse_early_param();
343 241
344 sh_mv_setup(cmdline_p); 242 sh_mv_setup();
345 243
346 /* 244 /*
347 * Find the highest page frame number we have available 245 * Find the highest page frame number we have available
@@ -355,8 +253,9 @@ void __init setup_arch(char **cmdline_p)
355 min_low_pfn = __MEMORY_START >> PAGE_SHIFT; 253 min_low_pfn = __MEMORY_START >> PAGE_SHIFT;
356 254
357 nodes_clear(node_online_map); 255 nodes_clear(node_online_map);
256
257 /* Setup bootmem with available RAM */
358 setup_memory(); 258 setup_memory();
359 paging_init();
360 sparse_init(); 259 sparse_init();
361 260
362#ifdef CONFIG_DUMMY_CONSOLE 261#ifdef CONFIG_DUMMY_CONSOLE
@@ -366,46 +265,13 @@ void __init setup_arch(char **cmdline_p)
366 /* Perform the machine specific initialisation */ 265 /* Perform the machine specific initialisation */
367 if (likely(sh_mv.mv_setup)) 266 if (likely(sh_mv.mv_setup))
368 sh_mv.mv_setup(cmdline_p); 267 sh_mv.mv_setup(cmdline_p);
369}
370
371struct sh_machine_vector* __init get_mv_byname(const char* name)
372{
373 extern long __machvec_start, __machvec_end;
374 struct sh_machine_vector *all_vecs =
375 (struct sh_machine_vector *)&__machvec_start;
376
377 int i, n = ((unsigned long)&__machvec_end
378 - (unsigned long)&__machvec_start)/
379 sizeof(struct sh_machine_vector);
380
381 for (i = 0; i < n; ++i) {
382 struct sh_machine_vector *mv = &all_vecs[i];
383 if (mv == NULL)
384 continue;
385 if (strcasecmp(name, get_system_type()) == 0) {
386 return mv;
387 }
388 }
389 return NULL;
390}
391
392static struct cpu cpu[NR_CPUS];
393
394static int __init topology_init(void)
395{
396 int cpu_id;
397 268
398 for_each_possible_cpu(cpu_id) 269 paging_init();
399 register_cpu(&cpu[cpu_id], cpu_id);
400
401 return 0;
402} 270}
403 271
404subsys_initcall(topology_init);
405
406static const char *cpu_name[] = { 272static const char *cpu_name[] = {
407 [CPU_SH7206] = "SH7206", [CPU_SH7619] = "SH7619", 273 [CPU_SH7206] = "SH7206", [CPU_SH7619] = "SH7619",
408 [CPU_SH7604] = "SH7604", [CPU_SH7300] = "SH7300", 274 [CPU_SH7300] = "SH7300",
409 [CPU_SH7705] = "SH7705", [CPU_SH7706] = "SH7706", 275 [CPU_SH7705] = "SH7705", [CPU_SH7706] = "SH7706",
410 [CPU_SH7707] = "SH7707", [CPU_SH7708] = "SH7708", 276 [CPU_SH7707] = "SH7707", [CPU_SH7708] = "SH7708",
411 [CPU_SH7709] = "SH7709", [CPU_SH7710] = "SH7710", 277 [CPU_SH7709] = "SH7709", [CPU_SH7710] = "SH7710",
@@ -419,7 +285,7 @@ static const char *cpu_name[] = {
419 [CPU_SH7770] = "SH7770", [CPU_SH7780] = "SH7780", 285 [CPU_SH7770] = "SH7770", [CPU_SH7780] = "SH7780",
420 [CPU_SH7781] = "SH7781", [CPU_SH7343] = "SH7343", 286 [CPU_SH7781] = "SH7781", [CPU_SH7343] = "SH7343",
421 [CPU_SH7785] = "SH7785", [CPU_SH7722] = "SH7722", 287 [CPU_SH7785] = "SH7785", [CPU_SH7722] = "SH7722",
422 [CPU_SH_NONE] = "Unknown" 288 [CPU_SHX3] = "SH-X3", [CPU_SH_NONE] = "Unknown"
423}; 289};
424 290
425const char *get_cpu_subtype(struct sh_cpuinfo *c) 291const char *get_cpu_subtype(struct sh_cpuinfo *c)
diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c
index c1cfcb9f04..c968dcf09e 100644
--- a/arch/sh/kernel/sh_ksyms.c
+++ b/arch/sh/kernel/sh_ksyms.c
@@ -78,6 +78,16 @@ DECLARE_EXPORT(__movstr);
78DECLARE_EXPORT(__movmem_i4_even); 78DECLARE_EXPORT(__movmem_i4_even);
79DECLARE_EXPORT(__movmem_i4_odd); 79DECLARE_EXPORT(__movmem_i4_odd);
80DECLARE_EXPORT(__movmemSI12_i4); 80DECLARE_EXPORT(__movmemSI12_i4);
81
82#if (__GNUC_MINOR__ == 2 || defined(__GNUC_STM_RELEASE__))
83/*
84 * GCC 4.2 emits these for division, as do GCC 4.1.x versions of the ST
85 * compiler which include backported patches.
86 */
87DECLARE_EXPORT(__sdivsi3_i4i);
88DECLARE_EXPORT(__udiv_qrnnd_16);
89DECLARE_EXPORT(__udivsi3_i4i);
90#endif
81#else /* GCC 3.x */ 91#else /* GCC 3.x */
82DECLARE_EXPORT(__movstr_i4_even); 92DECLARE_EXPORT(__movstr_i4_even);
83DECLARE_EXPORT(__movstr_i4_odd); 93DECLARE_EXPORT(__movstr_i4_odd);
diff --git a/arch/sh/kernel/signal.c b/arch/sh/kernel/signal.c
index e323e29987..706d81ccd1 100644
--- a/arch/sh/kernel/signal.c
+++ b/arch/sh/kernel/signal.c
@@ -23,6 +23,7 @@
23#include <linux/personality.h> 23#include <linux/personality.h>
24#include <linux/binfmts.h> 24#include <linux/binfmts.h>
25#include <linux/freezer.h> 25#include <linux/freezer.h>
26#include <linux/io.h>
26#include <asm/system.h> 27#include <asm/system.h>
27#include <asm/ucontext.h> 28#include <asm/ucontext.h>
28#include <asm/uaccess.h> 29#include <asm/uaccess.h>
@@ -261,7 +262,7 @@ asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5,
261 goto badframe; 262 goto badframe;
262 /* It is more difficult to avoid calling this function than to 263 /* It is more difficult to avoid calling this function than to
263 call it and ignore errors. */ 264 call it and ignore errors. */
264 do_sigaltstack(&st, NULL, regs->regs[15]); 265 do_sigaltstack((const stack_t __user *)&st, NULL, (unsigned long)frame);
265 266
266 return r0; 267 return r0;
267 268
diff --git a/arch/sh/kernel/syscalls.S b/arch/sh/kernel/syscalls.S
index 7db1c2dc59..ff5656e60c 100644
--- a/arch/sh/kernel/syscalls.S
+++ b/arch/sh/kernel/syscalls.S
@@ -308,9 +308,9 @@ ENTRY(sys_call_table)
308 .long sys_utimes 308 .long sys_utimes
309 .long sys_fadvise64_64_wrapper 309 .long sys_fadvise64_64_wrapper
310 .long sys_ni_syscall /* Reserved for vserver */ 310 .long sys_ni_syscall /* Reserved for vserver */
311 .long sys_ni_syscall /* Reserved for mbind */ 311 .long sys_mbind
312 .long sys_ni_syscall /* 275 - get_mempolicy */ 312 .long sys_get_mempolicy /* 275 */
313 .long sys_ni_syscall /* set_mempolicy */ 313 .long sys_set_mempolicy
314 .long sys_mq_open 314 .long sys_mq_open
315 .long sys_mq_unlink 315 .long sys_mq_unlink
316 .long sys_mq_timedsend 316 .long sys_mq_timedsend
diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c
index 2d997e2a5b..097ebd49f1 100644
--- a/arch/sh/kernel/timers/timer-tmu.c
+++ b/arch/sh/kernel/timers/timer-tmu.c
@@ -30,7 +30,7 @@
30 30
31static int tmu_timer_start(void) 31static int tmu_timer_start(void)
32{ 32{
33 ctrl_outb(ctrl_inb(TMU_TSTR) | 0x3, TMU_TSTR); 33 ctrl_outb(ctrl_inb(TMU_012_TSTR) | 0x3, TMU_012_TSTR);
34 return 0; 34 return 0;
35} 35}
36 36
@@ -52,7 +52,7 @@ static void tmu0_timer_set_interval(unsigned long interval, unsigned int reload)
52 52
53static int tmu_timer_stop(void) 53static int tmu_timer_stop(void)
54{ 54{
55 ctrl_outb(ctrl_inb(TMU_TSTR) & ~0x3, TMU_TSTR); 55 ctrl_outb(ctrl_inb(TMU_012_TSTR) & ~0x3, TMU_012_TSTR);
56 return 0; 56 return 0;
57} 57}
58 58
@@ -174,7 +174,8 @@ static int tmu_timer_init(void)
174 174
175#if !defined(CONFIG_CPU_SUBTYPE_SH7300) && \ 175#if !defined(CONFIG_CPU_SUBTYPE_SH7300) && \
176 !defined(CONFIG_CPU_SUBTYPE_SH7760) && \ 176 !defined(CONFIG_CPU_SUBTYPE_SH7760) && \
177 !defined(CONFIG_CPU_SUBTYPE_SH7785) 177 !defined(CONFIG_CPU_SUBTYPE_SH7785) && \
178 !defined(CONFIG_CPU_SUBTYPE_SHX3)
178 ctrl_outb(TMU_TOCR_INIT, TMU_TOCR); 179 ctrl_outb(TMU_TOCR_INIT, TMU_TOCR);
179#endif 180#endif
180 181
diff --git a/arch/sh/kernel/topology.c b/arch/sh/kernel/topology.c
new file mode 100644
index 0000000000..9b5844a1bd
--- /dev/null
+++ b/arch/sh/kernel/topology.c
@@ -0,0 +1,49 @@
1/*
2 * arch/sh/kernel/topology.c
3 *
4 * Copyright (C) 2007 Paul Mundt
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10#include <linux/cpu.h>
11#include <linux/cpumask.h>
12#include <linux/init.h>
13#include <linux/percpu.h>
14#include <linux/node.h>
15#include <linux/nodemask.h>
16
17static DEFINE_PER_CPU(struct cpu, cpu_devices);
18
19static int __init topology_init(void)
20{
21 int i, ret;
22
23#ifdef CONFIG_NEED_MULTIPLE_NODES
24 for_each_online_node(i)
25 register_one_node(i);
26#endif
27
28 for_each_present_cpu(i) {
29 ret = register_cpu(&per_cpu(cpu_devices, i), i);
30 if (unlikely(ret))
31 printk(KERN_WARNING "%s: register_cpu %d failed (%d)\n",
32 __FUNCTION__, i, ret);
33 }
34
35#if defined(CONFIG_NUMA) && !defined(CONFIG_SMP)
36 /*
37 * In the UP case, make sure the CPU association is still
38 * registered under each node. Without this, sysfs fails
39 * to make the connection between nodes other than node0
40 * and cpu0.
41 */
42 for_each_online_node(i)
43 if (i != numa_node_id())
44 register_cpu_under_node(raw_smp_processor_id(), i);
45#endif
46
47 return 0;
48}
49subsys_initcall(topology_init);
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c
index 8f18930d5b..502d43e478 100644
--- a/arch/sh/kernel/traps.c
+++ b/arch/sh/kernel/traps.c
@@ -103,6 +103,7 @@ void die(const char * str, struct pt_regs * regs, long err)
103 (unsigned long)task_stack_page(current)); 103 (unsigned long)task_stack_page(current));
104 104
105 bust_spinlocks(0); 105 bust_spinlocks(0);
106 add_taint(TAINT_DIE);
106 spin_unlock_irq(&die_lock); 107 spin_unlock_irq(&die_lock);
107 108
108 if (kexec_should_crash(current)) 109 if (kexec_should_crash(current))
@@ -584,7 +585,7 @@ uspace_segv:
584 info.si_signo = SIGBUS; 585 info.si_signo = SIGBUS;
585 info.si_errno = 0; 586 info.si_errno = 0;
586 info.si_code = si_code; 587 info.si_code = si_code;
587 info.si_addr = (void *) address; 588 info.si_addr = (void __user *)address;
588 force_sig_info(SIGBUS, &info, current); 589 force_sig_info(SIGBUS, &info, current);
589 } else { 590 } else {
590 if (regs->pc & 1) 591 if (regs->pc & 1)
@@ -617,7 +618,7 @@ uspace_segv:
617 */ 618 */
618int is_dsp_inst(struct pt_regs *regs) 619int is_dsp_inst(struct pt_regs *regs)
619{ 620{
620 unsigned short inst; 621 unsigned short inst = 0;
621 622
622 /* 623 /*
623 * Safe guard if DSP mode is already enabled or we're lacking 624 * Safe guard if DSP mode is already enabled or we're lacking
@@ -645,7 +646,6 @@ asmlinkage void do_divide_error(unsigned long r4, unsigned long r5,
645 unsigned long r6, unsigned long r7, 646 unsigned long r6, unsigned long r7,
646 struct pt_regs __regs) 647 struct pt_regs __regs)
647{ 648{
648 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
649 siginfo_t info; 649 siginfo_t info;
650 650
651 switch (r4) { 651 switch (r4) {
@@ -874,7 +874,7 @@ void __init trap_init(void)
874void handle_BUG(struct pt_regs *regs) 874void handle_BUG(struct pt_regs *regs)
875{ 875{
876 enum bug_trap_type tt; 876 enum bug_trap_type tt;
877 tt = report_bug(regs->pc); 877 tt = report_bug(regs->pc, regs);
878 if (tt == BUG_TRAP_TYPE_WARN) { 878 if (tt == BUG_TRAP_TYPE_WARN) {
879 regs->pc += 2; 879 regs->pc += 2;
880 return; 880 return;
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S
index 4c5b57e9c3..0696402f44 100644
--- a/arch/sh/kernel/vmlinux.lds.S
+++ b/arch/sh/kernel/vmlinux.lds.S
@@ -97,18 +97,20 @@ SECTIONS
97 __initramfs_end = .; 97 __initramfs_end = .;
98#endif 98#endif
99 99
100 . = ALIGN(4);
100 __machvec_start = .; 101 __machvec_start = .;
101 .init.machvec : { *(.init.machvec) } 102 .machvec.init : { *(.machvec.init) }
102 __machvec_end = .; 103 __machvec_end = .;
103 . = ALIGN(PAGE_SIZE);
104 __init_end = .;
105
106 . = ALIGN(4);
107 __bss_start = .; /* BSS */
108 .bss : { *(.bss) }
109 104
110 . = ALIGN(4); 105 . = ALIGN(PAGE_SIZE);
111 _end = . ; 106 .bss : {
107 __init_end = .;
108 __bss_start = .; /* BSS */
109 *(.bss.page_aligned)
110 *(.bss)
111 . = ALIGN(4);
112 _end = . ;
113 }
112 114
113 /* When something in the kernel is NOT compiled as a module, the 115 /* When something in the kernel is NOT compiled as a module, the
114 * module cleanup code and data are put into these segments. Both 116 * module cleanup code and data are put into these segments. Both
diff --git a/arch/sh/lib/div64-generic.c b/arch/sh/lib/div64-generic.c
index c02473afd5..4bef3b5d96 100644
--- a/arch/sh/lib/div64-generic.c
+++ b/arch/sh/lib/div64-generic.c
@@ -4,16 +4,15 @@
4 4
5#include <linux/types.h> 5#include <linux/types.h>
6 6
7extern u64 __xdiv64_32(u64 n, u32 d); 7extern uint64_t __xdiv64_32(u64 n, u32 d);
8 8
9u64 __div64_32(u64 *xp, u32 y) 9uint32_t __div64_32(u64 *xp, u32 y)
10{ 10{
11 u64 rem; 11 uint32_t rem;
12 u64 q = __xdiv64_32(*xp, y); 12 uint64_t q = __xdiv64_32(*xp, y);
13 13
14 rem = *xp - q * y; 14 rem = *xp - q * y;
15 *xp = q; 15 *xp = q;
16 16
17 return rem; 17 return rem;
18} 18}
19
diff --git a/arch/sh/lib/div64.S b/arch/sh/lib/div64.S
index eefc275d64..5ee7334ea6 100644
--- a/arch/sh/lib/div64.S
+++ b/arch/sh/lib/div64.S
@@ -1,12 +1,12 @@
1/* 1/*
2 * unsigned long long __xdiv64_32(unsigned long long n, unsigned long d); 2 * unsigned long __xdiv64_32(unsigned long long n, unsigned long d);
3 */ 3 */
4 4
5#include <linux/linkage.h> 5#include <linux/linkage.h>
6 6
7.text 7.text
8ENTRY(__xdiv64_32) 8ENTRY(__xdiv64_32)
9#ifdef __LITTLE_ENDIAN__ 9#ifdef CONFIG_CPU_LITTLE_ENDIAN
10 mov r4, r0 10 mov r4, r0
11 mov r5, r1 11 mov r5, r1
12#else 12#else
@@ -34,7 +34,7 @@ ENTRY(__xdiv64_32)
34 rotcl r0 34 rotcl r0
35 div1 r6, r1 35 div1 r6, r1
36 .endr 36 .endr
37#ifdef __LITTLE_ENDIAN__ 37#ifdef CONFIG_CPU_LITTLE_ENDIAN
38 mov r2, r1 38 mov r2, r1
39 rts 39 rts
40 rotcl r0 40 rotcl r0
diff --git a/arch/sh/math-emu/math.c b/arch/sh/math-emu/math.c
index a38e1eed9e..ac2d7abd25 100644
--- a/arch/sh/math-emu/math.c
+++ b/arch/sh/math-emu/math.c
@@ -507,6 +507,7 @@ static int ieee_fpe_handler(struct pt_regs *regs)
507 unsigned short insn = *(unsigned short *)regs->pc; 507 unsigned short insn = *(unsigned short *)regs->pc;
508 unsigned short finsn; 508 unsigned short finsn;
509 unsigned long nextpc; 509 unsigned long nextpc;
510 siginfo_t info;
510 int nib[4] = { 511 int nib[4] = {
511 (insn >> 12) & 0xf, 512 (insn >> 12) & 0xf,
512 (insn >> 8) & 0xf, 513 (insn >> 8) & 0xf,
@@ -559,9 +560,11 @@ static int ieee_fpe_handler(struct pt_regs *regs)
559 ~(FPSCR_CAUSE_MASK | FPSCR_FLAG_MASK); 560 ~(FPSCR_CAUSE_MASK | FPSCR_FLAG_MASK);
560 set_tsk_thread_flag(tsk, TIF_USEDFPU); 561 set_tsk_thread_flag(tsk, TIF_USEDFPU);
561 } else { 562 } else {
562 tsk->thread.trap_no = 11; 563 info.si_signo = SIGFPE;
563 tsk->thread.error_code = 0; 564 info.si_errno = 0;
564 force_sig(SIGFPE, tsk); 565 info.si_code = FPE_FLTINV;
566 info.si_addr = (void __user *)regs->pc;
567 force_sig_info(SIGFPE, &info, tsk);
565 } 568 }
566 569
567 regs->pc = nextpc; 570 regs->pc = nextpc;
@@ -576,14 +579,17 @@ asmlinkage void do_fpu_error(unsigned long r4, unsigned long r5,
576 struct pt_regs regs) 579 struct pt_regs regs)
577{ 580{
578 struct task_struct *tsk = current; 581 struct task_struct *tsk = current;
582 siginfo_t info;
579 583
580 if (ieee_fpe_handler (&regs)) 584 if (ieee_fpe_handler (&regs))
581 return; 585 return;
582 586
583 regs.pc += 2; 587 regs.pc += 2;
584 tsk->thread.trap_no = 11; 588 info.si_signo = SIGFPE;
585 tsk->thread.error_code = 0; 589 info.si_errno = 0;
586 force_sig(SIGFPE, tsk); 590 info.si_code = FPE_FLTINV;
591 info.si_addr = (void __user *)regs.pc;
592 force_sig_info(SIGFPE, &info, tsk);
587} 593}
588 594
589/** 595/**
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig
index 253346d7b3..28d79a474c 100644
--- a/arch/sh/mm/Kconfig
+++ b/arch/sh/mm/Kconfig
@@ -1,5 +1,3 @@
1menu "Processor selection"
2
3# 1#
4# Processor families 2# Processor families
5# 3#
@@ -38,27 +36,31 @@ config CPU_SUBTYPE_ST40
38config CPU_SHX2 36config CPU_SHX2
39 bool 37 bool
40 38
39config CPU_SHX3
40 bool
41
42choice
43 prompt "Processor sub-type selection"
44
41# 45#
42# Processor subtypes 46# Processor subtypes
43# 47#
44 48
45comment "SH-2 Processor Support" 49# SH-2 Processor Support
46
47config CPU_SUBTYPE_SH7604
48 bool "Support SH7604 processor"
49 select CPU_SH2
50 50
51config CPU_SUBTYPE_SH7619 51config CPU_SUBTYPE_SH7619
52 bool "Support SH7619 processor" 52 bool "Support SH7619 processor"
53 select CPU_SH2 53 select CPU_SH2
54 select CPU_HAS_IPR_IRQ
54 55
55comment "SH-2A Processor Support" 56# SH-2A Processor Support
56 57
57config CPU_SUBTYPE_SH7206 58config CPU_SUBTYPE_SH7206
58 bool "Support SH7206 processor" 59 bool "Support SH7206 processor"
59 select CPU_SH2A 60 select CPU_SH2A
61 select CPU_HAS_IPR_IRQ
60 62
61comment "SH-3 Processor Support" 63# SH-3 Processor Support
62 64
63config CPU_SUBTYPE_SH7300 65config CPU_SUBTYPE_SH7300
64 bool "Support SH7300 processor" 66 bool "Support SH7300 processor"
@@ -113,7 +115,7 @@ config CPU_SUBTYPE_SH7712
113 help 115 help
114 Select SH7712 if you have a SH3-DSP SH7712 CPU. 116 Select SH7712 if you have a SH3-DSP SH7712 CPU.
115 117
116comment "SH-4 Processor Support" 118# SH-4 Processor Support
117 119
118config CPU_SUBTYPE_SH7750 120config CPU_SUBTYPE_SH7750
119 bool "Support SH7750 processor" 121 bool "Support SH7750 processor"
@@ -125,7 +127,7 @@ config CPU_SUBTYPE_SH7750
125config CPU_SUBTYPE_SH7091 127config CPU_SUBTYPE_SH7091
126 bool "Support SH7091 processor" 128 bool "Support SH7091 processor"
127 select CPU_SH4 129 select CPU_SH4
128 select CPU_SUBTYPE_SH7750 130 select CPU_HAS_IPR_IRQ
129 help 131 help
130 Select SH7091 if you have an SH-4 based Sega device (such as 132 Select SH7091 if you have an SH-4 based Sega device (such as
131 the Dreamcast, Naomi, and Naomi 2). 133 the Dreamcast, Naomi, and Naomi 2).
@@ -133,13 +135,11 @@ config CPU_SUBTYPE_SH7091
133config CPU_SUBTYPE_SH7750R 135config CPU_SUBTYPE_SH7750R
134 bool "Support SH7750R processor" 136 bool "Support SH7750R processor"
135 select CPU_SH4 137 select CPU_SH4
136 select CPU_SUBTYPE_SH7750
137 select CPU_HAS_IPR_IRQ 138 select CPU_HAS_IPR_IRQ
138 139
139config CPU_SUBTYPE_SH7750S 140config CPU_SUBTYPE_SH7750S
140 bool "Support SH7750S processor" 141 bool "Support SH7750S processor"
141 select CPU_SH4 142 select CPU_SH4
142 select CPU_SUBTYPE_SH7750
143 select CPU_HAS_IPR_IRQ 143 select CPU_HAS_IPR_IRQ
144 144
145config CPU_SUBTYPE_SH7751 145config CPU_SUBTYPE_SH7751
@@ -153,7 +153,6 @@ config CPU_SUBTYPE_SH7751
153config CPU_SUBTYPE_SH7751R 153config CPU_SUBTYPE_SH7751R
154 bool "Support SH7751R processor" 154 bool "Support SH7751R processor"
155 select CPU_SH4 155 select CPU_SH4
156 select CPU_SUBTYPE_SH7751
157 select CPU_HAS_IPR_IRQ 156 select CPU_HAS_IPR_IRQ
158 157
159config CPU_SUBTYPE_SH7760 158config CPU_SUBTYPE_SH7760
@@ -166,7 +165,7 @@ config CPU_SUBTYPE_SH4_202
166 bool "Support SH4-202 processor" 165 bool "Support SH4-202 processor"
167 select CPU_SH4 166 select CPU_SH4
168 167
169comment "ST40 Processor Support" 168# ST40 Processor Support
170 169
171config CPU_SUBTYPE_ST40STB1 170config CPU_SUBTYPE_ST40STB1
172 bool "Support ST40STB1/ST40RA processors" 171 bool "Support ST40STB1/ST40RA processors"
@@ -181,7 +180,7 @@ config CPU_SUBTYPE_ST40GX1
181 help 180 help
182 Select ST40GX1 if you have a ST40GX1 CPU. 181 Select ST40GX1 if you have a ST40GX1 CPU.
183 182
184comment "SH-4A Processor Support" 183# SH-4A Processor Support
185 184
186config CPU_SUBTYPE_SH7770 185config CPU_SUBTYPE_SH7770
187 bool "Support SH7770 processor" 186 bool "Support SH7770 processor"
@@ -198,7 +197,13 @@ config CPU_SUBTYPE_SH7785
198 select CPU_SHX2 197 select CPU_SHX2
199 select CPU_HAS_INTC2_IRQ 198 select CPU_HAS_INTC2_IRQ
200 199
201comment "SH4AL-DSP Processor Support" 200config CPU_SUBTYPE_SHX3
201 bool "Support SH-X3 processor"
202 select CPU_SH4A
203 select CPU_SHX3
204 select CPU_HAS_INTC2_IRQ
205
206# SH4AL-DSP Processor Support
202 207
203config CPU_SUBTYPE_SH73180 208config CPU_SUBTYPE_SH73180
204 bool "Support SH73180 processor" 209 bool "Support SH73180 processor"
@@ -213,8 +218,10 @@ config CPU_SUBTYPE_SH7722
213 select CPU_SH4AL_DSP 218 select CPU_SH4AL_DSP
214 select CPU_SHX2 219 select CPU_SHX2
215 select CPU_HAS_IPR_IRQ 220 select CPU_HAS_IPR_IRQ
221 select ARCH_SPARSEMEM_ENABLE
222 select SYS_SUPPORTS_NUMA
216 223
217endmenu 224endchoice
218 225
219menu "Memory management options" 226menu "Memory management options"
220 227
@@ -266,7 +273,7 @@ config MEMORY_SIZE
266 273
267config 32BIT 274config 32BIT
268 bool "Support 32-bit physical addressing through PMB" 275 bool "Support 32-bit physical addressing through PMB"
269 depends on CPU_SH4A && MMU && (!X2TLB || BROKEN) 276 depends on MMU && (CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785)
270 default y 277 default y
271 help 278 help
272 If you say Y here, physical addressing will be extended to 279 If you say Y here, physical addressing will be extended to
@@ -295,6 +302,17 @@ config VSYSCALL
295 For systems with an MMU that can afford to give up a page, 302 For systems with an MMU that can afford to give up a page,
296 (the default value) say Y. 303 (the default value) say Y.
297 304
305config NUMA
306 bool "Non Uniform Memory Access (NUMA) Support"
307 depends on MMU && SYS_SUPPORTS_NUMA && EXPERIMENTAL
308 default n
309 help
310 Some SH systems have many various memories scattered around
311 the address space, each with varying latencies. This enables
312 support for these blocks by binding them to nodes and allowing
313 memory policies to be used for prioritizing and controlling
314 allocation behaviour.
315
298config NODES_SHIFT 316config NODES_SHIFT
299 int 317 int
300 default "1" 318 default "1"
@@ -302,14 +320,34 @@ config NODES_SHIFT
302 320
303config ARCH_FLATMEM_ENABLE 321config ARCH_FLATMEM_ENABLE
304 def_bool y 322 def_bool y
323 depends on !NUMA
324
325config ARCH_SPARSEMEM_ENABLE
326 def_bool y
327 select SPARSEMEM_STATIC
328
329config ARCH_SPARSEMEM_DEFAULT
330 def_bool y
305 331
306config MAX_ACTIVE_REGIONS 332config MAX_ACTIVE_REGIONS
307 int 333 int
334 default "2" if (CPU_SUBTYPE_SH7722 && SPARSEMEM)
308 default "1" 335 default "1"
309 336
310config ARCH_POPULATES_NODE_MAP 337config ARCH_POPULATES_NODE_MAP
311 def_bool y 338 def_bool y
312 339
340config ARCH_SELECT_MEMORY_MODEL
341 def_bool y
342
343config ARCH_ENABLE_MEMORY_HOTPLUG
344 def_bool y
345 depends on SPARSEMEM
346
347config ARCH_MEMORY_PROBE
348 def_bool y
349 depends on MEMORY_HOTPLUG
350
313choice 351choice
314 prompt "Kernel page size" 352 prompt "Kernel page size"
315 default PAGE_SIZE_4KB 353 default PAGE_SIZE_4KB
@@ -394,15 +432,4 @@ config SH_WRITETHROUGH
394 432
395 If unsure, say N. 433 If unsure, say N.
396 434
397config SH_OCRAM
398 bool "Operand Cache RAM (OCRAM) support"
399 help
400 Selecting this option will automatically tear down the number of
401 sets in the dcache by half, which in turn exposes a memory range.
402
403 The addresses for the OC RAM base will vary according to the
404 processor version. Consult vendor documentation for specifics.
405
406 If unsure, say N.
407
408endmenu 435endmenu
diff --git a/arch/sh/mm/Makefile b/arch/sh/mm/Makefile
index 3ffd7f68c0..d677d7f3af 100644
--- a/arch/sh/mm/Makefile
+++ b/arch/sh/mm/Makefile
@@ -8,9 +8,6 @@ obj-$(CONFIG_CPU_SH2) += cache-sh2.o
8obj-$(CONFIG_CPU_SH3) += cache-sh3.o 8obj-$(CONFIG_CPU_SH3) += cache-sh3.o
9obj-$(CONFIG_CPU_SH4) += cache-sh4.o 9obj-$(CONFIG_CPU_SH4) += cache-sh4.o
10 10
11obj-$(CONFIG_DMA_PAGE_OPS) += pg-dma.o
12obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
13
14mmu-y := fault-nommu.o tlb-nommu.o pg-nommu.o 11mmu-y := fault-nommu.o tlb-nommu.o pg-nommu.o
15mmu-$(CONFIG_MMU) := fault.o clear_page.o copy_page.o tlb-flush.o \ 12mmu-$(CONFIG_MMU) := fault.o clear_page.o copy_page.o tlb-flush.o \
16 ioremap.o 13 ioremap.o
@@ -27,5 +24,7 @@ obj-$(CONFIG_CPU_SH4) += tlb-sh4.o pg-sh4.o
27obj-$(CONFIG_SH7705_CACHE_32KB) += pg-sh7705.o 24obj-$(CONFIG_SH7705_CACHE_32KB) += pg-sh7705.o
28endif 25endif
29 26
27obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
30obj-$(CONFIG_SH7705_CACHE_32KB) += cache-sh7705.o 28obj-$(CONFIG_SH7705_CACHE_32KB) += cache-sh7705.o
31obj-$(CONFIG_32BIT) += pmb.o 29obj-$(CONFIG_32BIT) += pmb.o
30obj-$(CONFIG_NUMA) += numa.o
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c
index c878faa4ae..0b3eaf6fbb 100644
--- a/arch/sh/mm/fault.c
+++ b/arch/sh/mm/fault.c
@@ -32,7 +32,6 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
32 struct task_struct *tsk; 32 struct task_struct *tsk;
33 struct mm_struct *mm; 33 struct mm_struct *mm;
34 struct vm_area_struct * vma; 34 struct vm_area_struct * vma;
35 unsigned long page;
36 int si_code; 35 int si_code;
37 siginfo_t info; 36 siginfo_t info;
38 37
@@ -170,24 +169,38 @@ no_context:
170 * terminate things with extreme prejudice. 169 * terminate things with extreme prejudice.
171 * 170 *
172 */ 171 */
173 if (address < PAGE_SIZE) 172
174 printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference"); 173 bust_spinlocks(1);
175 else 174
176 printk(KERN_ALERT "Unable to handle kernel paging request"); 175 if (oops_may_print()) {
177 printk(" at virtual address %08lx\n", address); 176 __typeof__(pte_val(__pte(0))) page;
178 printk(KERN_ALERT "pc = %08lx\n", regs->pc); 177
179 page = (unsigned long)get_TTB(); 178 if (address < PAGE_SIZE)
180 if (page) { 179 printk(KERN_ALERT "Unable to handle kernel NULL "
181 page = ((unsigned long *) page)[address >> PGDIR_SHIFT]; 180 "pointer dereference");
182 printk(KERN_ALERT "*pde = %08lx\n", page); 181 else
183 if (page & _PAGE_PRESENT) { 182 printk(KERN_ALERT "Unable to handle kernel paging "
184 page &= PAGE_MASK; 183 "request");
185 address &= 0x003ff000; 184 printk(" at virtual address %08lx\n", address);
186 page = ((unsigned long *) __va(page))[address >> PAGE_SHIFT]; 185 printk(KERN_ALERT "pc = %08lx\n", regs->pc);
187 printk(KERN_ALERT "*pte = %08lx\n", page); 186 page = (unsigned long)get_TTB();
187 if (page) {
188 page = ((__typeof__(page) *) __va(page))[address >>
189 PGDIR_SHIFT];
190 printk(KERN_ALERT "*pde = %08lx\n", page);
191 if (page & _PAGE_PRESENT) {
192 page &= PAGE_MASK;
193 address &= 0x003ff000;
194 page = ((__typeof__(page) *)
195 __va(page))[address >>
196 PAGE_SHIFT];
197 printk(KERN_ALERT "*pte = %08lx\n", page);
198 }
188 } 199 }
189 } 200 }
201
190 die("Oops", regs, writeaccess); 202 die("Oops", regs, writeaccess);
203 bust_spinlocks(0);
191 do_exit(SIGKILL); 204 do_exit(SIGKILL);
192 205
193/* 206/*
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index e0e644ff32..82b68c789a 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -18,6 +18,7 @@
18#include <asm/mmu_context.h> 18#include <asm/mmu_context.h>
19#include <asm/tlb.h> 19#include <asm/tlb.h>
20#include <asm/cacheflush.h> 20#include <asm/cacheflush.h>
21#include <asm/sections.h>
21#include <asm/cache.h> 22#include <asm/cache.h>
22 23
23DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 24DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
@@ -36,14 +37,11 @@ void show_mem(void)
36 show_free_areas(); 37 show_free_areas();
37 38
38 for_each_online_pgdat(pgdat) { 39 for_each_online_pgdat(pgdat) {
39 struct page *page, *end; 40 unsigned long flags, i;
40 unsigned long flags;
41 41
42 pgdat_resize_lock(pgdat, &flags); 42 pgdat_resize_lock(pgdat, &flags);
43 page = pgdat->node_mem_map; 43 for (i = 0; i < pgdat->node_spanned_pages; i++) {
44 end = page + pgdat->node_spanned_pages; 44 struct page *page = pgdat_page_nr(pgdat, i);
45
46 do {
47 total++; 45 total++;
48 if (PageReserved(page)) 46 if (PageReserved(page))
49 reserved++; 47 reserved++;
@@ -55,9 +53,7 @@ void show_mem(void)
55 free++; 53 free++;
56 else 54 else
57 shared += page_count(page) - 1; 55 shared += page_count(page) - 1;
58 page++; 56 }
59 } while (page < end);
60
61 pgdat_resize_unlock(pgdat, &flags); 57 pgdat_resize_unlock(pgdat, &flags);
62 } 58 }
63 59
@@ -137,16 +133,12 @@ void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
137} 133}
138#endif /* CONFIG_MMU */ 134#endif /* CONFIG_MMU */
139 135
140/* References to section boundaries */
141
142extern char _text, _etext, _edata, __bss_start, _end;
143extern char __init_begin, __init_end;
144
145/* 136/*
146 * paging_init() sets up the page tables 137 * paging_init() sets up the page tables
147 */ 138 */
148void __init paging_init(void) 139void __init paging_init(void)
149{ 140{
141 unsigned long max_zone_pfns[MAX_NR_ZONES];
150 int nid; 142 int nid;
151 143
152 /* We don't need to map the kernel through the TLB, as 144 /* We don't need to map the kernel through the TLB, as
@@ -158,43 +150,39 @@ void __init paging_init(void)
158 * check for a null value. */ 150 * check for a null value. */
159 set_TTB(swapper_pg_dir); 151 set_TTB(swapper_pg_dir);
160 152
153 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
154
161 for_each_online_node(nid) { 155 for_each_online_node(nid) {
162 pg_data_t *pgdat = NODE_DATA(nid); 156 pg_data_t *pgdat = NODE_DATA(nid);
163 unsigned long max_zone_pfns[MAX_NR_ZONES];
164 unsigned long low, start_pfn; 157 unsigned long low, start_pfn;
165 158
166 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
167
168 start_pfn = pgdat->bdata->node_boot_start >> PAGE_SHIFT; 159 start_pfn = pgdat->bdata->node_boot_start >> PAGE_SHIFT;
169 low = pgdat->bdata->node_low_pfn; 160 low = pgdat->bdata->node_low_pfn;
170 161
171 max_zone_pfns[ZONE_NORMAL] = low; 162 if (max_zone_pfns[ZONE_NORMAL] < low)
172 add_active_range(nid, start_pfn, low); 163 max_zone_pfns[ZONE_NORMAL] = low;
173 164
174 printk("Node %u: start_pfn = 0x%lx, low = 0x%lx\n", 165 printk("Node %u: start_pfn = 0x%lx, low = 0x%lx\n",
175 nid, start_pfn, low); 166 nid, start_pfn, low);
176
177 free_area_init_nodes(max_zone_pfns);
178
179 printk("Node %u: mem_map starts at %p\n",
180 pgdat->node_id, pgdat->node_mem_map);
181 } 167 }
168
169 free_area_init_nodes(max_zone_pfns);
182} 170}
183 171
184static struct kcore_list kcore_mem, kcore_vmalloc; 172static struct kcore_list kcore_mem, kcore_vmalloc;
185 173
186void __init mem_init(void) 174void __init mem_init(void)
187{ 175{
188 int codesize, reservedpages, datasize, initsize; 176 int codesize, datasize, initsize;
189 int nid; 177 int nid;
190 178
191 reservedpages = 0; 179 num_physpages = 0;
180 high_memory = NULL;
192 181
193 for_each_online_node(nid) { 182 for_each_online_node(nid) {
194 pg_data_t *pgdat = NODE_DATA(nid); 183 pg_data_t *pgdat = NODE_DATA(nid);
195 unsigned long node_pages = 0; 184 unsigned long node_pages = 0;
196 void *node_high_memory; 185 void *node_high_memory;
197 int i;
198 186
199 num_physpages += pgdat->node_present_pages; 187 num_physpages += pgdat->node_present_pages;
200 188
@@ -203,13 +191,9 @@ void __init mem_init(void)
203 191
204 totalram_pages += node_pages; 192 totalram_pages += node_pages;
205 193
206 for (i = 0; i < node_pages; i++) 194 node_high_memory = (void *)__va((pgdat->node_start_pfn +
207 if (PageReserved(pgdat->node_mem_map + i)) 195 pgdat->node_spanned_pages) <<
208 reservedpages++; 196 PAGE_SHIFT);
209
210 node_high_memory = (void *)((pgdat->node_start_pfn +
211 pgdat->node_spanned_pages) <<
212 PAGE_SHIFT);
213 if (node_high_memory > high_memory) 197 if (node_high_memory > high_memory)
214 high_memory = node_high_memory; 198 high_memory = node_high_memory;
215 } 199 }
@@ -239,11 +223,10 @@ void __init mem_init(void)
239 VMALLOC_END - VMALLOC_START); 223 VMALLOC_END - VMALLOC_START);
240 224
241 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, " 225 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, "
242 "%dk reserved, %dk data, %dk init)\n", 226 "%dk data, %dk init)\n",
243 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), 227 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
244 totalram_pages << (PAGE_SHIFT-10), 228 num_physpages << (PAGE_SHIFT-10),
245 codesize >> 10, 229 codesize >> 10,
246 reservedpages << (PAGE_SHIFT-10),
247 datasize >> 10, 230 datasize >> 10,
248 initsize >> 10); 231 initsize >> 10);
249 232
@@ -264,7 +247,9 @@ void free_initmem(void)
264 free_page(addr); 247 free_page(addr);
265 totalram_pages++; 248 totalram_pages++;
266 } 249 }
267 printk ("Freeing unused kernel memory: %dk freed\n", (&__init_end - &__init_begin) >> 10); 250 printk("Freeing unused kernel memory: %ldk freed\n",
251 ((unsigned long)&__init_end -
252 (unsigned long)&__init_begin) >> 10);
268} 253}
269 254
270#ifdef CONFIG_BLK_DEV_INITRD 255#ifdef CONFIG_BLK_DEV_INITRD
@@ -277,6 +262,50 @@ void free_initrd_mem(unsigned long start, unsigned long end)
277 free_page(p); 262 free_page(p);
278 totalram_pages++; 263 totalram_pages++;
279 } 264 }
280 printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); 265 printk("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
266}
267#endif
268
269#ifdef CONFIG_MEMORY_HOTPLUG
270void online_page(struct page *page)
271{
272 ClearPageReserved(page);
273 init_page_count(page);
274 __free_page(page);
275 totalram_pages++;
276 num_physpages++;
281} 277}
278
279int arch_add_memory(int nid, u64 start, u64 size)
280{
281 pg_data_t *pgdat;
282 unsigned long start_pfn = start >> PAGE_SHIFT;
283 unsigned long nr_pages = size >> PAGE_SHIFT;
284 int ret;
285
286 pgdat = NODE_DATA(nid);
287
288 /* We only have ZONE_NORMAL, so this is easy.. */
289 ret = __add_pages(pgdat->node_zones + ZONE_NORMAL, start_pfn, nr_pages);
290 if (unlikely(ret))
291 printk("%s: Failed, __add_pages() == %d\n", __FUNCTION__, ret);
292
293 return ret;
294}
295EXPORT_SYMBOL_GPL(arch_add_memory);
296
297int remove_memory(u64 start, u64 size)
298{
299 return -EINVAL;
300}
301EXPORT_SYMBOL_GPL(remove_memory);
302
303#ifdef CONFIG_NUMA
304int memory_add_physaddr_to_nid(u64 addr)
305{
306 /* Node 0 for now.. */
307 return 0;
308}
309EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
310#endif
282#endif 311#endif
diff --git a/arch/sh/mm/numa.c b/arch/sh/mm/numa.c
new file mode 100644
index 0000000000..8aff065dd3
--- /dev/null
+++ b/arch/sh/mm/numa.c
@@ -0,0 +1,92 @@
1/*
2 * arch/sh/mm/numa.c - Multiple node support for SH machines
3 *
4 * Copyright (C) 2007 Paul Mundt
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10#include <linux/module.h>
11#include <linux/bootmem.h>
12#include <linux/mm.h>
13#include <linux/numa.h>
14#include <linux/pfn.h>
15#include <asm/sections.h>
16
17static bootmem_data_t plat_node_bdata[MAX_NUMNODES];
18struct pglist_data *node_data[MAX_NUMNODES] __read_mostly;
19EXPORT_SYMBOL_GPL(node_data);
20
21/*
22 * On SH machines the conventional approach is to stash system RAM
23 * in node 0, and other memory blocks in to node 1 and up, ordered by
24 * latency. Each node's pgdat is node-local at the beginning of the node,
25 * immediately followed by the node mem map.
26 */
27void __init setup_memory(void)
28{
29 unsigned long free_pfn = PFN_UP(__pa(_end));
30
31 /*
32 * Node 0 sets up its pgdat at the first available pfn,
33 * and bumps it up before setting up the bootmem allocator.
34 */
35 NODE_DATA(0) = pfn_to_kaddr(free_pfn);
36 memset(NODE_DATA(0), 0, sizeof(struct pglist_data));
37 free_pfn += PFN_UP(sizeof(struct pglist_data));
38 NODE_DATA(0)->bdata = &plat_node_bdata[0];
39
40 /* Set up node 0 */
41 setup_bootmem_allocator(free_pfn);
42
43 /* Give the platforms a chance to hook up their nodes */
44 plat_mem_setup();
45}
46
47void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end)
48{
49 unsigned long bootmap_pages, bootmap_start, bootmap_size;
50 unsigned long start_pfn, free_pfn, end_pfn;
51
52 /* Don't allow bogus node assignment */
53 BUG_ON(nid > MAX_NUMNODES || nid == 0);
54
55 /*
56 * The free pfn starts at the beginning of the range, and is
57 * advanced as necessary for pgdat and node map allocations.
58 */
59 free_pfn = start_pfn = start >> PAGE_SHIFT;
60 end_pfn = end >> PAGE_SHIFT;
61
62 add_active_range(nid, start_pfn, end_pfn);
63
64 /* Node-local pgdat */
65 NODE_DATA(nid) = pfn_to_kaddr(free_pfn);
66 free_pfn += PFN_UP(sizeof(struct pglist_data));
67 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
68
69 NODE_DATA(nid)->bdata = &plat_node_bdata[nid];
70 NODE_DATA(nid)->node_start_pfn = start_pfn;
71 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn;
72
73 /* Node-local bootmap */
74 bootmap_pages = bootmem_bootmap_pages(end_pfn - start_pfn);
75 bootmap_start = (unsigned long)pfn_to_kaddr(free_pfn);
76 bootmap_size = init_bootmem_node(NODE_DATA(nid), free_pfn, start_pfn,
77 end_pfn);
78
79 free_bootmem_with_active_regions(nid, end_pfn);
80
81 /* Reserve the pgdat and bootmap space with the bootmem allocator */
82 reserve_bootmem_node(NODE_DATA(nid), start_pfn << PAGE_SHIFT,
83 sizeof(struct pglist_data));
84 reserve_bootmem_node(NODE_DATA(nid), free_pfn << PAGE_SHIFT,
85 bootmap_pages << PAGE_SHIFT);
86
87 /* It's up */
88 node_set_online(nid);
89
90 /* Kick sparsemem */
91 sparse_memory_present_with_active_regions(nid);
92}
diff --git a/arch/sh/mm/pg-dma.c b/arch/sh/mm/pg-dma.c
deleted file mode 100644
index bb23679369..0000000000
--- a/arch/sh/mm/pg-dma.c
+++ /dev/null
@@ -1,95 +0,0 @@
1/*
2 * arch/sh/mm/pg-dma.c
3 *
4 * Fast clear_page()/copy_page() implementation using the SH DMAC
5 *
6 * Copyright (C) 2003 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/init.h>
13#include <linux/kernel.h>
14#include <linux/module.h>
15#include <asm/semaphore.h>
16#include <asm/mmu_context.h>
17#include <asm/addrspace.h>
18#include <asm/atomic.h>
19#include <asm/page.h>
20#include <asm/dma.h>
21#include <asm/io.h>
22
23/* Channel to use for page ops, must be dual-address mode capable. */
24static int dma_channel = CONFIG_DMA_PAGE_OPS_CHANNEL;
25
26static void copy_page_dma(void *to, void *from)
27{
28 /*
29 * This doesn't seem to get triggered until further along in the
30 * boot process, at which point the DMAC is already initialized.
31 * Fix this in the same fashion as clear_page_dma() in the event
32 * that this crashes due to the DMAC not being initialized.
33 */
34
35 flush_icache_range((unsigned long)from, PAGE_SIZE);
36 dma_write_page(dma_channel, (unsigned long)from, (unsigned long)to);
37 dma_wait_for_completion(dma_channel);
38}
39
40static void clear_page_dma(void *to)
41{
42 /*
43 * We get invoked quite early on, if the DMAC hasn't been initialized
44 * yet, fall back on the slow manual implementation.
45 */
46 if (dma_info[dma_channel].chan != dma_channel) {
47 clear_page_slow(to);
48 return;
49 }
50
51 dma_write_page(dma_channel, (unsigned long)empty_zero_page,
52 (unsigned long)to);
53
54 /*
55 * FIXME: Something is a bit racy here, if we poll the counter right
56 * away, we seem to lock. flushing the page from the dcache doesn't
57 * seem to make a difference one way or the other, though either a full
58 * icache or dcache flush does.
59 *
60 * The location of this is important as well, and must happen prior to
61 * the completion loop but after the transfer was initiated.
62 *
63 * Oddly enough, this doesn't appear to be an issue for copy_page()..
64 */
65 flush_icache_range((unsigned long)to, PAGE_SIZE);
66
67 dma_wait_for_completion(dma_channel);
68}
69
70static int __init pg_dma_init(void)
71{
72 int ret;
73
74 ret = request_dma(dma_channel, "page ops");
75 if (ret != 0)
76 return ret;
77
78 copy_page = copy_page_dma;
79 clear_page = clear_page_dma;
80
81 return ret;
82}
83
84static void __exit pg_dma_exit(void)
85{
86 free_dma(dma_channel);
87}
88
89module_init(pg_dma_init);
90module_exit(pg_dma_exit);
91
92MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>");
93MODULE_DESCRIPTION("Optimized page copy/clear routines using a dual-address mode capable DMAC channel");
94MODULE_LICENSE("GPL");
95
diff --git a/arch/sh/tools/Makefile b/arch/sh/tools/Makefile
index 3c370a1132..567516b58a 100644
--- a/arch/sh/tools/Makefile
+++ b/arch/sh/tools/Makefile
@@ -12,4 +12,5 @@
12 12
13include/asm-sh/machtypes.h: $(src)/gen-mach-types $(src)/mach-types 13include/asm-sh/machtypes.h: $(src)/gen-mach-types $(src)/mach-types
14 @echo ' Generating $@' 14 @echo ' Generating $@'
15 $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi
15 $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; } 16 $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
diff --git a/arch/sh/tools/mach-types b/arch/sh/tools/mach-types
index fb40f188af..4b5e930509 100644
--- a/arch/sh/tools/mach-types
+++ b/arch/sh/tools/mach-types
@@ -18,7 +18,6 @@ SE SH_SOLUTION_ENGINE
18HP6XX SH_HP6XX 18HP6XX SH_HP6XX
19HD64461 HD64461 19HD64461 HD64461
20HD64465 HD64465 20HD64465 HD64465
21SATURN SH_SATURN
22DREAMCAST SH_DREAMCAST 21DREAMCAST SH_DREAMCAST
23MPC1211 SH_MPC1211 22MPC1211 SH_MPC1211
24SNAPGEAR SH_SECUREEDGE5410 23SNAPGEAR SH_SECUREEDGE5410
@@ -34,3 +33,4 @@ R7785RP SH_R7785RP
34TITAN SH_TITAN 33TITAN SH_TITAN
35SHMIN SH_SHMIN 34SHMIN SH_SHMIN
367710VOIPGW SH_7710VOIPGW 357710VOIPGW SH_7710VOIPGW
36LBOXRE2 SH_LBOX_RE2
diff --git a/arch/sh64/kernel/ptrace.c b/arch/sh64/kernel/ptrace.c
index 4e95e18b46..df06c64774 100644
--- a/arch/sh64/kernel/ptrace.c
+++ b/arch/sh64/kernel/ptrace.c
@@ -129,17 +129,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
129 switch (request) { 129 switch (request) {
130 /* when I and D space are separate, these will need to be fixed. */ 130 /* when I and D space are separate, these will need to be fixed. */
131 case PTRACE_PEEKTEXT: /* read word at location addr. */ 131 case PTRACE_PEEKTEXT: /* read word at location addr. */
132 case PTRACE_PEEKDATA: { 132 case PTRACE_PEEKDATA:
133 unsigned long tmp; 133 ret = generic_ptrace_peekdata(child, addr, data);
134 int copied;
135
136 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
137 ret = -EIO;
138 if (copied != sizeof(tmp))
139 break;
140 ret = put_user(tmp,(unsigned long *) data);
141 break; 134 break;
142 }
143 135
144 /* read the word at location addr in the USER area. */ 136 /* read the word at location addr in the USER area. */
145 case PTRACE_PEEKUSR: { 137 case PTRACE_PEEKUSR: {
@@ -166,10 +158,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
166 /* when I and D space are separate, this will have to be fixed. */ 158 /* when I and D space are separate, this will have to be fixed. */
167 case PTRACE_POKETEXT: /* write the word at location addr. */ 159 case PTRACE_POKETEXT: /* write the word at location addr. */
168 case PTRACE_POKEDATA: 160 case PTRACE_POKEDATA:
169 ret = 0; 161 ret = generic_ptrace_pokedata(child, addr, data);
170 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
171 break;
172 ret = -EIO;
173 break; 162 break;
174 163
175 case PTRACE_POKEUSR: 164 case PTRACE_POKEUSR:
diff --git a/arch/sh64/lib/c-checksum.c b/arch/sh64/lib/c-checksum.c
index 4b2676380d..bd55017602 100644
--- a/arch/sh64/lib/c-checksum.c
+++ b/arch/sh64/lib/c-checksum.c
@@ -213,3 +213,4 @@ __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
213 213
214 return (__wsum)result; 214 return (__wsum)result;
215} 215}
216EXPORT_SYMBOL(csum_tcpudp_nofold);
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index fbcc00c6c0..603d83ad65 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -21,6 +21,9 @@ config GENERIC_ISA_DMA
21 bool 21 bool
22 default y 22 default y
23 23
24config ARCH_NO_VIRT_TO_BUS
25 def_bool y
26
24source "init/Kconfig" 27source "init/Kconfig"
25 28
26menu "General machine setup" 29menu "General machine setup"
@@ -210,10 +213,16 @@ config PCI
210 CP-1200, JavaEngine-1, Corona, Red October, and Serengeti SGSC. 213 CP-1200, JavaEngine-1, Corona, Red October, and Serengeti SGSC.
211 All of these platforms are extremely obscure, so say N if unsure. 214 All of these platforms are extremely obscure, so say N if unsure.
212 215
216config PCI_SYSCALL
217 def_bool PCI
218
213source "drivers/pci/Kconfig" 219source "drivers/pci/Kconfig"
214 220
215endif 221endif
216 222
223config NO_DMA
224 def_bool !PCI
225
217config SUN_OPENPROMFS 226config SUN_OPENPROMFS
218 tristate "Openprom tree appears in /proc/openprom" 227 tristate "Openprom tree appears in /proc/openprom"
219 help 228 help
diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c
index 4d9ad59031..4fea3ac7bf 100644
--- a/arch/sparc/kernel/smp.c
+++ b/arch/sparc/kernel/smp.c
@@ -68,16 +68,6 @@ void __cpuinit smp_store_cpu_info(int id)
68 cpu_data(id).prom_node = cpu_node; 68 cpu_data(id).prom_node = cpu_node;
69 cpu_data(id).mid = cpu_get_hwmid(cpu_node); 69 cpu_data(id).mid = cpu_get_hwmid(cpu_node);
70 70
71 /* this is required to tune the scheduler correctly */
72 /* is it possible to have CPUs with different cache sizes? */
73 if (id == boot_cpu_id) {
74 int cache_line,cache_nlines;
75 cache_line = 0x20;
76 cache_line = prom_getintdefault(cpu_node, "ecache-line-size", cache_line);
77 cache_nlines = 0x8000;
78 cache_nlines = prom_getintdefault(cpu_node, "ecache-nlines", cache_nlines);
79 max_cache_size = cache_line * cache_nlines;
80 }
81 if (cpu_data(id).mid < 0) 71 if (cpu_data(id).mid < 0)
82 panic("No MID found for CPU%d at node 0x%08d", id, cpu_node); 72 panic("No MID found for CPU%d at node 0x%08d", id, cpu_node);
83} 73}
diff --git a/arch/sparc/kernel/traps.c b/arch/sparc/kernel/traps.c
index dc9ffea2a4..3bc3bff51e 100644
--- a/arch/sparc/kernel/traps.c
+++ b/arch/sparc/kernel/traps.c
@@ -101,6 +101,7 @@ void die_if_kernel(char *str, struct pt_regs *regs)
101 101
102 printk("%s(%d): %s [#%d]\n", current->comm, current->pid, str, ++die_counter); 102 printk("%s(%d): %s [#%d]\n", current->comm, current->pid, str, ++die_counter);
103 show_regs(regs); 103 show_regs(regs);
104 add_taint(TAINT_DIE);
104 105
105 __SAVE; __SAVE; __SAVE; __SAVE; 106 __SAVE; __SAVE; __SAVE; __SAVE;
106 __SAVE; __SAVE; __SAVE; __SAVE; 107 __SAVE; __SAVE; __SAVE; __SAVE;
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index e5eaa8072a..ca26232da7 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -160,9 +160,6 @@ static inline int srmmu_pte_none(pte_t pte)
160static inline int srmmu_pte_present(pte_t pte) 160static inline int srmmu_pte_present(pte_t pte)
161{ return ((pte_val(pte) & SRMMU_ET_MASK) == SRMMU_ET_PTE); } 161{ return ((pte_val(pte) & SRMMU_ET_MASK) == SRMMU_ET_PTE); }
162 162
163static inline int srmmu_pte_read(pte_t pte)
164{ return !(pte_val(pte) & SRMMU_NOREAD); }
165
166static inline void srmmu_pte_clear(pte_t *ptep) 163static inline void srmmu_pte_clear(pte_t *ptep)
167{ srmmu_set_pte(ptep, __pte(0)); } 164{ srmmu_set_pte(ptep, __pte(0)); }
168 165
@@ -2181,7 +2178,6 @@ void __init ld_mmu_srmmu(void)
2181 2178
2182 BTFIXUPSET_CALL(pte_present, srmmu_pte_present, BTFIXUPCALL_NORM); 2179 BTFIXUPSET_CALL(pte_present, srmmu_pte_present, BTFIXUPCALL_NORM);
2183 BTFIXUPSET_CALL(pte_clear, srmmu_pte_clear, BTFIXUPCALL_SWAPO0G0); 2180 BTFIXUPSET_CALL(pte_clear, srmmu_pte_clear, BTFIXUPCALL_SWAPO0G0);
2184 BTFIXUPSET_CALL(pte_read, srmmu_pte_read, BTFIXUPCALL_NORM);
2185 2181
2186 BTFIXUPSET_CALL(pmd_bad, srmmu_pmd_bad, BTFIXUPCALL_NORM); 2182 BTFIXUPSET_CALL(pmd_bad, srmmu_pmd_bad, BTFIXUPCALL_NORM);
2187 BTFIXUPSET_CALL(pmd_present, srmmu_pmd_present, BTFIXUPCALL_NORM); 2183 BTFIXUPSET_CALL(pmd_present, srmmu_pmd_present, BTFIXUPCALL_NORM);
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c
index 436021ceb2..bdd835fba0 100644
--- a/arch/sparc/mm/sun4c.c
+++ b/arch/sparc/mm/sun4c.c
@@ -1748,11 +1748,6 @@ static int sun4c_pte_present(pte_t pte)
1748} 1748}
1749static void sun4c_pte_clear(pte_t *ptep) { *ptep = __pte(0); } 1749static void sun4c_pte_clear(pte_t *ptep) { *ptep = __pte(0); }
1750 1750
1751static int sun4c_pte_read(pte_t pte)
1752{
1753 return (pte_val(pte) & _SUN4C_PAGE_READ);
1754}
1755
1756static int sun4c_pmd_bad(pmd_t pmd) 1751static int sun4c_pmd_bad(pmd_t pmd)
1757{ 1752{
1758 return (((pmd_val(pmd) & ~PAGE_MASK) != PGD_TABLE) || 1753 return (((pmd_val(pmd) & ~PAGE_MASK) != PGD_TABLE) ||
@@ -2212,7 +2207,6 @@ void __init ld_mmu_sun4c(void)
2212 2207
2213 BTFIXUPSET_CALL(pte_present, sun4c_pte_present, BTFIXUPCALL_NORM); 2208 BTFIXUPSET_CALL(pte_present, sun4c_pte_present, BTFIXUPCALL_NORM);
2214 BTFIXUPSET_CALL(pte_clear, sun4c_pte_clear, BTFIXUPCALL_STG0O0); 2209 BTFIXUPSET_CALL(pte_clear, sun4c_pte_clear, BTFIXUPCALL_STG0O0);
2215 BTFIXUPSET_CALL(pte_read, sun4c_pte_read, BTFIXUPCALL_NORM);
2216 2210
2217 BTFIXUPSET_CALL(pmd_bad, sun4c_pmd_bad, BTFIXUPCALL_NORM); 2211 BTFIXUPSET_CALL(pmd_bad, sun4c_pmd_bad, BTFIXUPCALL_NORM);
2218 BTFIXUPSET_CALL(pmd_present, sun4c_pmd_present, BTFIXUPCALL_NORM); 2212 BTFIXUPSET_CALL(pmd_present, sun4c_pmd_present, BTFIXUPCALL_NORM);
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index 89a1b469b9..df6ee71894 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -62,6 +62,9 @@ config AUDIT_ARCH
62 bool 62 bool
63 default y 63 default y
64 64
65config ARCH_NO_VIRT_TO_BUS
66 def_bool y
67
65choice 68choice
66 prompt "Kernel page size" 69 prompt "Kernel page size"
67 default SPARC64_PAGE_SIZE_8KB 70 default SPARC64_PAGE_SIZE_8KB
@@ -108,6 +111,15 @@ config SECCOMP
108 111
109source kernel/Kconfig.hz 112source kernel/Kconfig.hz
110 113
114config HOTPLUG_CPU
115 bool "Support for hot-pluggable CPUs"
116 depends on SMP
117 select HOTPLUG
118 ---help---
119 Say Y here to experiment with turning CPUs off and on. CPUs
120 can be controlled through /sys/devices/system/cpu/cpu#.
121 Say N if you want to disable CPU hotplug.
122
111source "init/Kconfig" 123source "init/Kconfig"
112 124
113config SYSVIPC_COMPAT 125config SYSVIPC_COMPAT
@@ -305,6 +317,12 @@ config SUN_IO
305 bool 317 bool
306 default y 318 default y
307 319
320config SUN_LDOMS
321 bool "Sun Logical Domains support"
322 help
323 Say Y here is you want to support virtual devices via
324 Logical Domains.
325
308config PCI 326config PCI
309 bool "PCI support" 327 bool "PCI support"
310 select ARCH_SUPPORTS_MSI 328 select ARCH_SUPPORTS_MSI
@@ -320,8 +338,10 @@ config PCI
320 doesn't. 338 doesn't.
321 339
322config PCI_DOMAINS 340config PCI_DOMAINS
323 bool 341 def_bool PCI
324 default PCI 342
343config PCI_SYSCALL
344 def_bool PCI
325 345
326source "drivers/pci/Kconfig" 346source "drivers/pci/Kconfig"
327 347
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig
index 65840a62bb..45ebf91a28 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.22-rc1 3# Linux kernel version: 2.6.22
4# Mon May 14 04:17:48 2007 4# Tue Jul 17 01:19:52 2007
5# 5#
6CONFIG_SPARC=y 6CONFIG_SPARC=y
7CONFIG_SPARC64=y 7CONFIG_SPARC64=y
@@ -42,12 +42,11 @@ CONFIG_LOCALVERSION=""
42# CONFIG_LOCALVERSION_AUTO is not set 42# CONFIG_LOCALVERSION_AUTO is not set
43CONFIG_SWAP=y 43CONFIG_SWAP=y
44CONFIG_SYSVIPC=y 44CONFIG_SYSVIPC=y
45# CONFIG_IPC_NS is not set
46CONFIG_SYSVIPC_SYSCTL=y 45CONFIG_SYSVIPC_SYSCTL=y
47CONFIG_POSIX_MQUEUE=y 46CONFIG_POSIX_MQUEUE=y
48# CONFIG_BSD_PROCESS_ACCT is not set 47# CONFIG_BSD_PROCESS_ACCT is not set
49# CONFIG_TASKSTATS is not set 48# CONFIG_TASKSTATS is not set
50# CONFIG_UTS_NS is not set 49# CONFIG_USER_NS is not set
51# CONFIG_AUDIT is not set 50# CONFIG_AUDIT is not set
52# CONFIG_IKCONFIG is not set 51# CONFIG_IKCONFIG is not set
53CONFIG_LOG_BUF_SHIFT=18 52CONFIG_LOG_BUF_SHIFT=18
@@ -82,22 +81,15 @@ CONFIG_SLUB=y
82CONFIG_RT_MUTEXES=y 81CONFIG_RT_MUTEXES=y
83# CONFIG_TINY_SHMEM is not set 82# CONFIG_TINY_SHMEM is not set
84CONFIG_BASE_SMALL=0 83CONFIG_BASE_SMALL=0
85
86#
87# Loadable module support
88#
89CONFIG_MODULES=y 84CONFIG_MODULES=y
90CONFIG_MODULE_UNLOAD=y 85CONFIG_MODULE_UNLOAD=y
91CONFIG_MODULE_FORCE_UNLOAD=y 86CONFIG_MODULE_FORCE_UNLOAD=y
92CONFIG_MODVERSIONS=y 87CONFIG_MODVERSIONS=y
93CONFIG_MODULE_SRCVERSION_ALL=y 88CONFIG_MODULE_SRCVERSION_ALL=y
94CONFIG_KMOD=y 89CONFIG_KMOD=y
95
96#
97# Block layer
98#
99CONFIG_BLOCK=y 90CONFIG_BLOCK=y
100CONFIG_BLK_DEV_IO_TRACE=y 91CONFIG_BLK_DEV_IO_TRACE=y
92CONFIG_BLK_DEV_BSG=y
101 93
102# 94#
103# IO Schedulers 95# IO Schedulers
@@ -156,12 +148,15 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
156CONFIG_RESOURCES_64BIT=y 148CONFIG_RESOURCES_64BIT=y
157CONFIG_ZONE_DMA_FLAG=0 149CONFIG_ZONE_DMA_FLAG=0
158CONFIG_NR_QUICK=1 150CONFIG_NR_QUICK=1
151CONFIG_VIRT_TO_BUS=y
159CONFIG_SBUS=y 152CONFIG_SBUS=y
160CONFIG_SBUSCHAR=y 153CONFIG_SBUSCHAR=y
161CONFIG_SUN_AUXIO=y 154CONFIG_SUN_AUXIO=y
162CONFIG_SUN_IO=y 155CONFIG_SUN_IO=y
156# CONFIG_SUN_LDOMS is not set
163CONFIG_PCI=y 157CONFIG_PCI=y
164CONFIG_PCI_DOMAINS=y 158CONFIG_PCI_DOMAINS=y
159CONFIG_PCI_SYSCALL=y
165CONFIG_ARCH_SUPPORTS_MSI=y 160CONFIG_ARCH_SUPPORTS_MSI=y
166CONFIG_PCI_MSI=y 161CONFIG_PCI_MSI=y
167# CONFIG_PCI_DEBUG is not set 162# CONFIG_PCI_DEBUG is not set
@@ -246,10 +241,6 @@ CONFIG_IPV6_TUNNEL=m
246# CONFIG_IPV6_MULTIPLE_TABLES is not set 241# CONFIG_IPV6_MULTIPLE_TABLES is not set
247# CONFIG_NETWORK_SECMARK is not set 242# CONFIG_NETWORK_SECMARK is not set
248# CONFIG_NETFILTER is not set 243# CONFIG_NETFILTER is not set
249
250#
251# DCCP Configuration (EXPERIMENTAL)
252#
253CONFIG_IP_DCCP=m 244CONFIG_IP_DCCP=m
254CONFIG_INET_DCCP_DIAG=m 245CONFIG_INET_DCCP_DIAG=m
255CONFIG_IP_DCCP_ACKVEC=y 246CONFIG_IP_DCCP_ACKVEC=y
@@ -269,15 +260,7 @@ CONFIG_IP_DCCP_CCID3_RTO=100
269# 260#
270# CONFIG_IP_DCCP_DEBUG is not set 261# CONFIG_IP_DCCP_DEBUG is not set
271# CONFIG_NET_DCCPPROBE is not set 262# CONFIG_NET_DCCPPROBE is not set
272
273#
274# SCTP Configuration (EXPERIMENTAL)
275#
276# CONFIG_IP_SCTP is not set 263# CONFIG_IP_SCTP is not set
277
278#
279# TIPC Configuration (EXPERIMENTAL)
280#
281# CONFIG_TIPC is not set 264# CONFIG_TIPC is not set
282# CONFIG_ATM is not set 265# CONFIG_ATM is not set
283# CONFIG_BRIDGE is not set 266# CONFIG_BRIDGE is not set
@@ -314,6 +297,7 @@ CONFIG_NET_TCPPROBE=m
314# CONFIG_MAC80211 is not set 297# CONFIG_MAC80211 is not set
315# CONFIG_IEEE80211 is not set 298# CONFIG_IEEE80211 is not set
316# CONFIG_RFKILL is not set 299# CONFIG_RFKILL is not set
300# CONFIG_NET_9P is not set
317 301
318# 302#
319# Device Drivers 303# Device Drivers
@@ -328,26 +312,10 @@ CONFIG_FW_LOADER=y
328# CONFIG_DEBUG_DRIVER is not set 312# CONFIG_DEBUG_DRIVER is not set
329# CONFIG_DEBUG_DEVRES is not set 313# CONFIG_DEBUG_DEVRES is not set
330# CONFIG_SYS_HYPERVISOR is not set 314# CONFIG_SYS_HYPERVISOR is not set
331
332#
333# Connector - unified userspace <-> kernelspace linker
334#
335CONFIG_CONNECTOR=m 315CONFIG_CONNECTOR=m
336# CONFIG_MTD is not set 316# CONFIG_MTD is not set
337
338#
339# Parallel port support
340#
341# CONFIG_PARPORT is not set 317# CONFIG_PARPORT is not set
342 318CONFIG_BLK_DEV=y
343#
344# Plug and Play support
345#
346# CONFIG_PNPACPI is not set
347
348#
349# Block devices
350#
351# CONFIG_BLK_DEV_FD is not set 319# CONFIG_BLK_DEV_FD is not set
352# CONFIG_BLK_CPQ_DA is not set 320# CONFIG_BLK_CPQ_DA is not set
353# CONFIG_BLK_CPQ_CISS_DA is not set 321# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -364,18 +332,11 @@ CONFIG_CDROM_PKTCDVD=m
364CONFIG_CDROM_PKTCDVD_BUFFERS=8 332CONFIG_CDROM_PKTCDVD_BUFFERS=8
365CONFIG_CDROM_PKTCDVD_WCACHE=y 333CONFIG_CDROM_PKTCDVD_WCACHE=y
366CONFIG_ATA_OVER_ETH=m 334CONFIG_ATA_OVER_ETH=m
367 335CONFIG_MISC_DEVICES=y
368#
369# Misc devices
370#
371# CONFIG_PHANTOM is not set 336# CONFIG_PHANTOM is not set
337# CONFIG_EEPROM_93CX6 is not set
372# CONFIG_SGI_IOC4 is not set 338# CONFIG_SGI_IOC4 is not set
373# CONFIG_TIFM_CORE is not set 339# CONFIG_TIFM_CORE is not set
374# CONFIG_BLINK is not set
375
376#
377# ATA/ATAPI/MFM/RLL support
378#
379CONFIG_IDE=y 340CONFIG_IDE=y
380CONFIG_BLK_DEV_IDE=y 341CONFIG_BLK_DEV_IDE=y
381 342
@@ -440,6 +401,7 @@ CONFIG_BLK_DEV_IDEDMA=y
440# 401#
441CONFIG_RAID_ATTRS=m 402CONFIG_RAID_ATTRS=m
442CONFIG_SCSI=y 403CONFIG_SCSI=y
404CONFIG_SCSI_DMA=y
443# CONFIG_SCSI_TGT is not set 405# CONFIG_SCSI_TGT is not set
444CONFIG_SCSI_NETLINK=y 406CONFIG_SCSI_NETLINK=y
445CONFIG_SCSI_PROC_FS=y 407CONFIG_SCSI_PROC_FS=y
@@ -505,7 +467,6 @@ CONFIG_ISCSI_TCP=m
505# CONFIG_SCSI_DC395x is not set 467# CONFIG_SCSI_DC395x is not set
506# CONFIG_SCSI_DC390T is not set 468# CONFIG_SCSI_DC390T is not set
507# CONFIG_SCSI_DEBUG is not set 469# CONFIG_SCSI_DEBUG is not set
508# CONFIG_SCSI_ESP_CORE is not set
509# CONFIG_SCSI_SUNESP is not set 470# CONFIG_SCSI_SUNESP is not set
510# CONFIG_SCSI_SRP is not set 471# CONFIG_SCSI_SRP is not set
511# CONFIG_ATA is not set 472# CONFIG_ATA is not set
@@ -545,30 +506,16 @@ CONFIG_DM_ZERO=m
545# 506#
546# CONFIG_FIREWIRE is not set 507# CONFIG_FIREWIRE is not set
547# CONFIG_IEEE1394 is not set 508# CONFIG_IEEE1394 is not set
548
549#
550# I2O device support
551#
552# CONFIG_I2O is not set 509# CONFIG_I2O is not set
553
554#
555# Network device support
556#
557CONFIG_NETDEVICES=y 510CONFIG_NETDEVICES=y
511# CONFIG_NETDEVICES_MULTIQUEUE is not set
558CONFIG_DUMMY=m 512CONFIG_DUMMY=m
559# CONFIG_BONDING is not set 513# CONFIG_BONDING is not set
514# CONFIG_MACVLAN is not set
560# CONFIG_EQUALIZER is not set 515# CONFIG_EQUALIZER is not set
561# CONFIG_TUN is not set 516# CONFIG_TUN is not set
562
563#
564# ARCnet devices
565#
566# CONFIG_ARCNET is not set 517# CONFIG_ARCNET is not set
567# CONFIG_PHYLIB is not set 518# CONFIG_PHYLIB is not set
568
569#
570# Ethernet (10 or 100Mbit)
571#
572CONFIG_NET_ETHERNET=y 519CONFIG_NET_ETHERNET=y
573CONFIG_MII=m 520CONFIG_MII=m
574# CONFIG_SUNLANCE is not set 521# CONFIG_SUNLANCE is not set
@@ -578,10 +525,6 @@ CONFIG_MII=m
578# CONFIG_SUNGEM is not set 525# CONFIG_SUNGEM is not set
579CONFIG_CASSINI=m 526CONFIG_CASSINI=m
580# CONFIG_NET_VENDOR_3COM is not set 527# CONFIG_NET_VENDOR_3COM is not set
581
582#
583# Tulip family network device support
584#
585# CONFIG_NET_TULIP is not set 528# CONFIG_NET_TULIP is not set
586# CONFIG_HP100 is not set 529# CONFIG_HP100 is not set
587CONFIG_NET_PCI=y 530CONFIG_NET_PCI=y
@@ -617,7 +560,6 @@ CONFIG_E1000_NAPI=y
617# CONFIG_SIS190 is not set 560# CONFIG_SIS190 is not set
618# CONFIG_SKGE is not set 561# CONFIG_SKGE is not set
619# CONFIG_SKY2 is not set 562# CONFIG_SKY2 is not set
620# CONFIG_SK98LIN is not set
621# CONFIG_VIA_VELOCITY is not set 563# CONFIG_VIA_VELOCITY is not set
622CONFIG_TIGON3=m 564CONFIG_TIGON3=m
623CONFIG_BNX2=m 565CONFIG_BNX2=m
@@ -631,11 +573,6 @@ CONFIG_NETDEV_10000=y
631# CONFIG_MYRI10GE is not set 573# CONFIG_MYRI10GE is not set
632# CONFIG_NETXEN_NIC is not set 574# CONFIG_NETXEN_NIC is not set
633# CONFIG_MLX4_CORE is not set 575# CONFIG_MLX4_CORE is not set
634CONFIG_MLX4_DEBUG=y
635
636#
637# Token Ring devices
638#
639# CONFIG_TR is not set 576# CONFIG_TR is not set
640 577
641# 578#
@@ -665,6 +602,7 @@ CONFIG_PPP_DEFLATE=m
665CONFIG_PPP_BSDCOMP=m 602CONFIG_PPP_BSDCOMP=m
666CONFIG_PPP_MPPE=m 603CONFIG_PPP_MPPE=m
667CONFIG_PPPOE=m 604CONFIG_PPPOE=m
605# CONFIG_PPPOL2TP is not set
668# CONFIG_SLIP is not set 606# CONFIG_SLIP is not set
669CONFIG_SLHC=m 607CONFIG_SLHC=m
670# CONFIG_NET_FC is not set 608# CONFIG_NET_FC is not set
@@ -677,10 +615,6 @@ CONFIG_SLHC=m
677# ISDN subsystem 615# ISDN subsystem
678# 616#
679# CONFIG_ISDN is not set 617# CONFIG_ISDN is not set
680
681#
682# Telephony Support
683#
684# CONFIG_PHONE is not set 618# CONFIG_PHONE is not set
685 619
686# 620#
@@ -688,6 +622,7 @@ CONFIG_SLHC=m
688# 622#
689CONFIG_INPUT=y 623CONFIG_INPUT=y
690# CONFIG_INPUT_FF_MEMLESS is not set 624# CONFIG_INPUT_FF_MEMLESS is not set
625# CONFIG_INPUT_POLLDEV is not set
691 626
692# 627#
693# Userland interfaces 628# Userland interfaces
@@ -733,7 +668,6 @@ CONFIG_INPUT_SPARCSPKR=y
733# CONFIG_INPUT_POWERMATE is not set 668# CONFIG_INPUT_POWERMATE is not set
734# CONFIG_INPUT_YEALINK is not set 669# CONFIG_INPUT_YEALINK is not set
735# CONFIG_INPUT_UINPUT is not set 670# CONFIG_INPUT_UINPUT is not set
736# CONFIG_INPUT_POLLDEV is not set
737 671
738# 672#
739# Hardware I/O ports 673# Hardware I/O ports
@@ -773,10 +707,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
773# CONFIG_SERIAL_JSM is not set 707# CONFIG_SERIAL_JSM is not set
774CONFIG_UNIX98_PTYS=y 708CONFIG_UNIX98_PTYS=y
775# CONFIG_LEGACY_PTYS is not set 709# CONFIG_LEGACY_PTYS is not set
776
777#
778# IPMI
779#
780# CONFIG_IPMI_HANDLER is not set 710# CONFIG_IPMI_HANDLER is not set
781# CONFIG_WATCHDOG is not set 711# CONFIG_WATCHDOG is not set
782# CONFIG_HW_RANDOM is not set 712# CONFIG_HW_RANDOM is not set
@@ -785,10 +715,6 @@ CONFIG_RTC=y
785# CONFIG_APPLICOM is not set 715# CONFIG_APPLICOM is not set
786# CONFIG_DRM is not set 716# CONFIG_DRM is not set
787# CONFIG_RAW_DRIVER is not set 717# CONFIG_RAW_DRIVER is not set
788
789#
790# TPM devices
791#
792# CONFIG_TCG_TPM is not set 718# CONFIG_TCG_TPM is not set
793CONFIG_DEVPORT=y 719CONFIG_DEVPORT=y
794CONFIG_I2C=y 720CONFIG_I2C=y
@@ -822,6 +748,7 @@ CONFIG_I2C_ALGOBIT=y
822# CONFIG_I2C_SIS5595 is not set 748# CONFIG_I2C_SIS5595 is not set
823# CONFIG_I2C_SIS630 is not set 749# CONFIG_I2C_SIS630 is not set
824# CONFIG_I2C_SIS96X is not set 750# CONFIG_I2C_SIS96X is not set
751# CONFIG_I2C_TAOS_EVM is not set
825# CONFIG_I2C_STUB is not set 752# CONFIG_I2C_STUB is not set
826# CONFIG_I2C_TINY_USB is not set 753# CONFIG_I2C_TINY_USB is not set
827# CONFIG_I2C_VIA is not set 754# CONFIG_I2C_VIA is not set
@@ -833,11 +760,13 @@ CONFIG_I2C_ALGOBIT=y
833# 760#
834# CONFIG_SENSORS_DS1337 is not set 761# CONFIG_SENSORS_DS1337 is not set
835# CONFIG_SENSORS_DS1374 is not set 762# CONFIG_SENSORS_DS1374 is not set
763# CONFIG_DS1682 is not set
836# CONFIG_SENSORS_EEPROM is not set 764# CONFIG_SENSORS_EEPROM is not set
837# CONFIG_SENSORS_PCF8574 is not set 765# CONFIG_SENSORS_PCF8574 is not set
838# CONFIG_SENSORS_PCA9539 is not set 766# CONFIG_SENSORS_PCA9539 is not set
839# CONFIG_SENSORS_PCF8591 is not set 767# CONFIG_SENSORS_PCF8591 is not set
840# CONFIG_SENSORS_MAX6875 is not set 768# CONFIG_SENSORS_MAX6875 is not set
769# CONFIG_SENSORS_TSL2550 is not set
841# CONFIG_I2C_DEBUG_CORE is not set 770# CONFIG_I2C_DEBUG_CORE is not set
842# CONFIG_I2C_DEBUG_ALGO is not set 771# CONFIG_I2C_DEBUG_ALGO is not set
843# CONFIG_I2C_DEBUG_BUS is not set 772# CONFIG_I2C_DEBUG_BUS is not set
@@ -848,11 +777,8 @@ CONFIG_I2C_ALGOBIT=y
848# 777#
849# CONFIG_SPI is not set 778# CONFIG_SPI is not set
850# CONFIG_SPI_MASTER is not set 779# CONFIG_SPI_MASTER is not set
851
852#
853# Dallas's 1-wire bus
854#
855# CONFIG_W1 is not set 780# CONFIG_W1 is not set
781# CONFIG_POWER_SUPPLY is not set
856CONFIG_HWMON=y 782CONFIG_HWMON=y
857# CONFIG_HWMON_VID is not set 783# CONFIG_HWMON_VID is not set
858# CONFIG_SENSORS_ABITUGURU is not set 784# CONFIG_SENSORS_ABITUGURU is not set
@@ -949,6 +875,8 @@ CONFIG_FB_TILEBLITTING=y
949# CONFIG_FB_ASILIANT is not set 875# CONFIG_FB_ASILIANT is not set
950# CONFIG_FB_IMSTT is not set 876# CONFIG_FB_IMSTT is not set
951# CONFIG_FB_SBUS is not set 877# CONFIG_FB_SBUS is not set
878# CONFIG_FB_XVR500 is not set
879# CONFIG_FB_XVR2500 is not set
952# CONFIG_FB_S1D13XXX is not set 880# CONFIG_FB_S1D13XXX is not set
953# CONFIG_FB_NVIDIA is not set 881# CONFIG_FB_NVIDIA is not set
954# CONFIG_FB_RIVA is not set 882# CONFIG_FB_RIVA is not set
@@ -970,9 +898,6 @@ CONFIG_FB_RADEON_I2C=y
970# CONFIG_FB_TRIDENT is not set 898# CONFIG_FB_TRIDENT is not set
971# CONFIG_FB_ARK is not set 899# CONFIG_FB_ARK is not set
972# CONFIG_FB_PM3 is not set 900# CONFIG_FB_PM3 is not set
973# CONFIG_FB_XVR500 is not set
974# CONFIG_FB_XVR2500 is not set
975# CONFIG_FB_PCI is not set
976# CONFIG_FB_VIRTUAL is not set 901# CONFIG_FB_VIRTUAL is not set
977 902
978# 903#
@@ -1118,10 +1043,7 @@ CONFIG_SND_SUN_CS4231=m
1118# 1043#
1119# CONFIG_SOUND_PRIME is not set 1044# CONFIG_SOUND_PRIME is not set
1120CONFIG_AC97_BUS=m 1045CONFIG_AC97_BUS=m
1121 1046CONFIG_HID_SUPPORT=y
1122#
1123# HID Devices
1124#
1125CONFIG_HID=y 1047CONFIG_HID=y
1126# CONFIG_HID_DEBUG is not set 1048# CONFIG_HID_DEBUG is not set
1127 1049
@@ -1132,10 +1054,7 @@ CONFIG_USB_HID=y
1132# CONFIG_USB_HIDINPUT_POWERBOOK is not set 1054# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1133# CONFIG_HID_FF is not set 1055# CONFIG_HID_FF is not set
1134CONFIG_USB_HIDDEV=y 1056CONFIG_USB_HIDDEV=y
1135 1057CONFIG_USB_SUPPORT=y
1136#
1137# USB support
1138#
1139CONFIG_USB_ARCH_HAS_HCD=y 1058CONFIG_USB_ARCH_HAS_HCD=y
1140CONFIG_USB_ARCH_HAS_OHCI=y 1059CONFIG_USB_ARCH_HAS_OHCI=y
1141CONFIG_USB_ARCH_HAS_EHCI=y 1060CONFIG_USB_ARCH_HAS_EHCI=y
@@ -1157,7 +1076,6 @@ CONFIG_USB_EHCI_HCD=m
1157# CONFIG_USB_EHCI_SPLIT_ISO is not set 1076# CONFIG_USB_EHCI_SPLIT_ISO is not set
1158# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1077# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1159# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1078# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1160# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1161# CONFIG_USB_ISP116X_HCD is not set 1079# CONFIG_USB_ISP116X_HCD is not set
1162CONFIG_USB_OHCI_HCD=y 1080CONFIG_USB_OHCI_HCD=y
1163# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1081# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -1165,6 +1083,7 @@ CONFIG_USB_OHCI_HCD=y
1165CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1083CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1166CONFIG_USB_UHCI_HCD=m 1084CONFIG_USB_UHCI_HCD=m
1167# CONFIG_USB_SL811_HCD is not set 1085# CONFIG_USB_SL811_HCD is not set
1086# CONFIG_USB_R8A66597_HCD is not set
1168 1087
1169# 1088#
1170# USB Device Class drivers 1089# USB Device Class drivers
@@ -1256,17 +1175,9 @@ CONFIG_USB_STORAGE=m
1256# 1175#
1257# LED Triggers 1176# LED Triggers
1258# 1177#
1259
1260#
1261# InfiniBand support
1262#
1263# CONFIG_INFINIBAND is not set 1178# CONFIG_INFINIBAND is not set
1264 1179
1265# 1180#
1266# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1267#
1268
1269#
1270# Real Time Clock 1181# Real Time Clock
1271# 1182#
1272# CONFIG_RTC_CLASS is not set 1183# CONFIG_RTC_CLASS is not set
@@ -1387,7 +1298,6 @@ CONFIG_RAMFS=y
1387# CONFIG_NCP_FS is not set 1298# CONFIG_NCP_FS is not set
1388# CONFIG_CODA_FS is not set 1299# CONFIG_CODA_FS is not set
1389# CONFIG_AFS_FS is not set 1300# CONFIG_AFS_FS is not set
1390# CONFIG_9P_FS is not set
1391 1301
1392# 1302#
1393# Partition Types 1303# Partition Types
@@ -1465,8 +1375,10 @@ CONFIG_DEBUG_FS=y
1465CONFIG_DEBUG_KERNEL=y 1375CONFIG_DEBUG_KERNEL=y
1466# CONFIG_DEBUG_SHIRQ is not set 1376# CONFIG_DEBUG_SHIRQ is not set
1467CONFIG_DETECT_SOFTLOCKUP=y 1377CONFIG_DETECT_SOFTLOCKUP=y
1378# CONFIG_SCHED_DEBUG is not set
1468CONFIG_SCHEDSTATS=y 1379CONFIG_SCHEDSTATS=y
1469# CONFIG_TIMER_STATS is not set 1380# CONFIG_TIMER_STATS is not set
1381# CONFIG_SLUB_DEBUG_ON is not set
1470# CONFIG_DEBUG_RT_MUTEXES is not set 1382# CONFIG_DEBUG_RT_MUTEXES is not set
1471# CONFIG_RT_MUTEX_TESTER is not set 1383# CONFIG_RT_MUTEX_TESTER is not set
1472# CONFIG_DEBUG_SPINLOCK is not set 1384# CONFIG_DEBUG_SPINLOCK is not set
@@ -1496,10 +1408,10 @@ CONFIG_FORCED_INLINING=y
1496CONFIG_KEYS=y 1408CONFIG_KEYS=y
1497# CONFIG_KEYS_DEBUG_PROC_KEYS is not set 1409# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
1498# CONFIG_SECURITY is not set 1410# CONFIG_SECURITY is not set
1499 1411CONFIG_XOR_BLOCKS=m
1500# 1412CONFIG_ASYNC_CORE=m
1501# Cryptographic options 1413CONFIG_ASYNC_MEMCPY=m
1502# 1414CONFIG_ASYNC_XOR=m
1503CONFIG_CRYPTO=y 1415CONFIG_CRYPTO=y
1504CONFIG_CRYPTO_ALGAPI=y 1416CONFIG_CRYPTO_ALGAPI=y
1505CONFIG_CRYPTO_BLKCIPHER=y 1417CONFIG_CRYPTO_BLKCIPHER=y
@@ -1539,10 +1451,7 @@ CONFIG_CRYPTO_MICHAEL_MIC=m
1539CONFIG_CRYPTO_CRC32C=m 1451CONFIG_CRYPTO_CRC32C=m
1540CONFIG_CRYPTO_CAMELLIA=m 1452CONFIG_CRYPTO_CAMELLIA=m
1541CONFIG_CRYPTO_TEST=m 1453CONFIG_CRYPTO_TEST=m
1542 1454CONFIG_CRYPTO_HW=y
1543#
1544# Hardware crypto devices
1545#
1546 1455
1547# 1456#
1548# Library routines 1457# Library routines
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile
index f964bf28d2..b66876bf41 100644
--- a/arch/sparc64/kernel/Makefile
+++ b/arch/sparc64/kernel/Makefile
@@ -18,7 +18,7 @@ obj-$(CONFIG_STACKTRACE) += stacktrace.o
18obj-$(CONFIG_PCI) += ebus.o isa.o pci_common.o pci_iommu.o \ 18obj-$(CONFIG_PCI) += ebus.o isa.o pci_common.o pci_iommu.o \
19 pci_psycho.o pci_sabre.o pci_schizo.o \ 19 pci_psycho.o pci_sabre.o pci_schizo.o \
20 pci_sun4v.o pci_sun4v_asm.o pci_fire.o 20 pci_sun4v.o pci_sun4v_asm.o pci_fire.o
21obj-$(CONFIG_SMP) += smp.o trampoline.o 21obj-$(CONFIG_SMP) += smp.o trampoline.o hvtramp.o
22obj-$(CONFIG_SPARC32_COMPAT) += sys32.o sys_sparc32.o signal32.o 22obj-$(CONFIG_SPARC32_COMPAT) += sys32.o sys_sparc32.o signal32.o
23obj-$(CONFIG_BINFMT_ELF32) += binfmt_elf32.o 23obj-$(CONFIG_BINFMT_ELF32) += binfmt_elf32.o
24obj-$(CONFIG_BINFMT_AOUT32) += binfmt_aout32.o 24obj-$(CONFIG_BINFMT_AOUT32) += binfmt_aout32.o
@@ -26,6 +26,7 @@ obj-$(CONFIG_MODULES) += module.o
26obj-$(CONFIG_US3_FREQ) += us3_cpufreq.o 26obj-$(CONFIG_US3_FREQ) += us3_cpufreq.o
27obj-$(CONFIG_US2E_FREQ) += us2e_cpufreq.o 27obj-$(CONFIG_US2E_FREQ) += us2e_cpufreq.o
28obj-$(CONFIG_KPROBES) += kprobes.o 28obj-$(CONFIG_KPROBES) += kprobes.o
29obj-$(CONFIG_SUN_LDOMS) += ldc.o vio.o viohs.o ds.o
29obj-$(CONFIG_AUDIT) += audit.o 30obj-$(CONFIG_AUDIT) += audit.o
30obj-$(CONFIG_AUDIT)$(CONFIG_SPARC32_COMPAT) += compat_audit.o 31obj-$(CONFIG_AUDIT)$(CONFIG_SPARC32_COMPAT) += compat_audit.o
31obj-y += $(obj-yy) 32obj-y += $(obj-yy)
diff --git a/arch/sparc64/kernel/ds.c b/arch/sparc64/kernel/ds.c
new file mode 100644
index 0000000000..fa1f04d756
--- /dev/null
+++ b/arch/sparc64/kernel/ds.c
@@ -0,0 +1,1187 @@
1/* ds.c: Domain Services driver for Logical Domains
2 *
3 * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
4 */
5
6#include <linux/kernel.h>
7#include <linux/module.h>
8#include <linux/types.h>
9#include <linux/module.h>
10#include <linux/string.h>
11#include <linux/slab.h>
12#include <linux/sched.h>
13#include <linux/delay.h>
14#include <linux/mutex.h>
15#include <linux/kthread.h>
16#include <linux/cpu.h>
17
18#include <asm/ldc.h>
19#include <asm/vio.h>
20#include <asm/power.h>
21#include <asm/mdesc.h>
22#include <asm/head.h>
23#include <asm/irq.h>
24
25#define DRV_MODULE_NAME "ds"
26#define PFX DRV_MODULE_NAME ": "
27#define DRV_MODULE_VERSION "1.0"
28#define DRV_MODULE_RELDATE "Jul 11, 2007"
29
30static char version[] __devinitdata =
31 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
32MODULE_AUTHOR("David S. Miller (davem@davemloft.net)");
33MODULE_DESCRIPTION("Sun LDOM domain services driver");
34MODULE_LICENSE("GPL");
35MODULE_VERSION(DRV_MODULE_VERSION);
36
37struct ds_msg_tag {
38 __u32 type;
39#define DS_INIT_REQ 0x00
40#define DS_INIT_ACK 0x01
41#define DS_INIT_NACK 0x02
42#define DS_REG_REQ 0x03
43#define DS_REG_ACK 0x04
44#define DS_REG_NACK 0x05
45#define DS_UNREG_REQ 0x06
46#define DS_UNREG_ACK 0x07
47#define DS_UNREG_NACK 0x08
48#define DS_DATA 0x09
49#define DS_NACK 0x0a
50
51 __u32 len;
52};
53
54/* Result codes */
55#define DS_OK 0x00
56#define DS_REG_VER_NACK 0x01
57#define DS_REG_DUP 0x02
58#define DS_INV_HDL 0x03
59#define DS_TYPE_UNKNOWN 0x04
60
61struct ds_version {
62 __u16 major;
63 __u16 minor;
64};
65
66struct ds_ver_req {
67 struct ds_msg_tag tag;
68 struct ds_version ver;
69};
70
71struct ds_ver_ack {
72 struct ds_msg_tag tag;
73 __u16 minor;
74};
75
76struct ds_ver_nack {
77 struct ds_msg_tag tag;
78 __u16 major;
79};
80
81struct ds_reg_req {
82 struct ds_msg_tag tag;
83 __u64 handle;
84 __u16 major;
85 __u16 minor;
86 char svc_id[0];
87};
88
89struct ds_reg_ack {
90 struct ds_msg_tag tag;
91 __u64 handle;
92 __u16 minor;
93};
94
95struct ds_reg_nack {
96 struct ds_msg_tag tag;
97 __u64 handle;
98 __u16 major;
99};
100
101struct ds_unreg_req {
102 struct ds_msg_tag tag;
103 __u64 handle;
104};
105
106struct ds_unreg_ack {
107 struct ds_msg_tag tag;
108 __u64 handle;
109};
110
111struct ds_unreg_nack {
112 struct ds_msg_tag tag;
113 __u64 handle;
114};
115
116struct ds_data {
117 struct ds_msg_tag tag;
118 __u64 handle;
119};
120
121struct ds_data_nack {
122 struct ds_msg_tag tag;
123 __u64 handle;
124 __u64 result;
125};
126
127struct ds_cap_state {
128 __u64 handle;
129
130 void (*data)(struct ldc_channel *lp,
131 struct ds_cap_state *cp,
132 void *buf, int len);
133
134 const char *service_id;
135
136 u8 state;
137#define CAP_STATE_UNKNOWN 0x00
138#define CAP_STATE_REG_SENT 0x01
139#define CAP_STATE_REGISTERED 0x02
140};
141
142static void md_update_data(struct ldc_channel *lp, struct ds_cap_state *cp,
143 void *buf, int len);
144static void domain_shutdown_data(struct ldc_channel *lp,
145 struct ds_cap_state *cp,
146 void *buf, int len);
147static void domain_panic_data(struct ldc_channel *lp,
148 struct ds_cap_state *cp,
149 void *buf, int len);
150#ifdef CONFIG_HOTPLUG_CPU
151static void dr_cpu_data(struct ldc_channel *lp,
152 struct ds_cap_state *cp,
153 void *buf, int len);
154#endif
155static void ds_pri_data(struct ldc_channel *lp,
156 struct ds_cap_state *cp,
157 void *buf, int len);
158static void ds_var_data(struct ldc_channel *lp,
159 struct ds_cap_state *cp,
160 void *buf, int len);
161
162struct ds_cap_state ds_states[] = {
163 {
164 .service_id = "md-update",
165 .data = md_update_data,
166 },
167 {
168 .service_id = "domain-shutdown",
169 .data = domain_shutdown_data,
170 },
171 {
172 .service_id = "domain-panic",
173 .data = domain_panic_data,
174 },
175#ifdef CONFIG_HOTPLUG_CPU
176 {
177 .service_id = "dr-cpu",
178 .data = dr_cpu_data,
179 },
180#endif
181 {
182 .service_id = "pri",
183 .data = ds_pri_data,
184 },
185 {
186 .service_id = "var-config",
187 .data = ds_var_data,
188 },
189 {
190 .service_id = "var-config-backup",
191 .data = ds_var_data,
192 },
193};
194
195static DEFINE_SPINLOCK(ds_lock);
196
197struct ds_info {
198 struct ldc_channel *lp;
199 u8 hs_state;
200#define DS_HS_START 0x01
201#define DS_HS_DONE 0x02
202
203 void *rcv_buf;
204 int rcv_buf_len;
205};
206
207static struct ds_info *ds_info;
208
209static struct ds_cap_state *find_cap(u64 handle)
210{
211 unsigned int index = handle >> 32;
212
213 if (index >= ARRAY_SIZE(ds_states))
214 return NULL;
215 return &ds_states[index];
216}
217
218static struct ds_cap_state *find_cap_by_string(const char *name)
219{
220 int i;
221
222 for (i = 0; i < ARRAY_SIZE(ds_states); i++) {
223 if (strcmp(ds_states[i].service_id, name))
224 continue;
225
226 return &ds_states[i];
227 }
228 return NULL;
229}
230
231static int __ds_send(struct ldc_channel *lp, void *data, int len)
232{
233 int err, limit = 1000;
234
235 err = -EINVAL;
236 while (limit-- > 0) {
237 err = ldc_write(lp, data, len);
238 if (!err || (err != -EAGAIN))
239 break;
240 udelay(1);
241 }
242
243 return err;
244}
245
246static int ds_send(struct ldc_channel *lp, void *data, int len)
247{
248 unsigned long flags;
249 int err;
250
251 spin_lock_irqsave(&ds_lock, flags);
252 err = __ds_send(lp, data, len);
253 spin_unlock_irqrestore(&ds_lock, flags);
254
255 return err;
256}
257
258struct ds_md_update_req {
259 __u64 req_num;
260};
261
262struct ds_md_update_res {
263 __u64 req_num;
264 __u32 result;
265};
266
267static void md_update_data(struct ldc_channel *lp,
268 struct ds_cap_state *dp,
269 void *buf, int len)
270{
271 struct ds_data *dpkt = buf;
272 struct ds_md_update_req *rp;
273 struct {
274 struct ds_data data;
275 struct ds_md_update_res res;
276 } pkt;
277
278 rp = (struct ds_md_update_req *) (dpkt + 1);
279
280 printk(KERN_INFO PFX "Machine description update.\n");
281
282 mdesc_update();
283
284 memset(&pkt, 0, sizeof(pkt));
285 pkt.data.tag.type = DS_DATA;
286 pkt.data.tag.len = sizeof(pkt) - sizeof(struct ds_msg_tag);
287 pkt.data.handle = dp->handle;
288 pkt.res.req_num = rp->req_num;
289 pkt.res.result = DS_OK;
290
291 ds_send(lp, &pkt, sizeof(pkt));
292}
293
294struct ds_shutdown_req {
295 __u64 req_num;
296 __u32 ms_delay;
297};
298
299struct ds_shutdown_res {
300 __u64 req_num;
301 __u32 result;
302 char reason[1];
303};
304
305static void domain_shutdown_data(struct ldc_channel *lp,
306 struct ds_cap_state *dp,
307 void *buf, int len)
308{
309 struct ds_data *dpkt = buf;
310 struct ds_shutdown_req *rp;
311 struct {
312 struct ds_data data;
313 struct ds_shutdown_res res;
314 } pkt;
315
316 rp = (struct ds_shutdown_req *) (dpkt + 1);
317
318 printk(KERN_ALERT PFX "Shutdown request from "
319 "LDOM manager received.\n");
320
321 memset(&pkt, 0, sizeof(pkt));
322 pkt.data.tag.type = DS_DATA;
323 pkt.data.tag.len = sizeof(pkt) - sizeof(struct ds_msg_tag);
324 pkt.data.handle = dp->handle;
325 pkt.res.req_num = rp->req_num;
326 pkt.res.result = DS_OK;
327 pkt.res.reason[0] = 0;
328
329 ds_send(lp, &pkt, sizeof(pkt));
330
331 wake_up_powerd();
332}
333
334struct ds_panic_req {
335 __u64 req_num;
336};
337
338struct ds_panic_res {
339 __u64 req_num;
340 __u32 result;
341 char reason[1];
342};
343
344static void domain_panic_data(struct ldc_channel *lp,
345 struct ds_cap_state *dp,
346 void *buf, int len)
347{
348 struct ds_data *dpkt = buf;
349 struct ds_panic_req *rp;
350 struct {
351 struct ds_data data;
352 struct ds_panic_res res;
353 } pkt;
354
355 rp = (struct ds_panic_req *) (dpkt + 1);
356
357 printk(KERN_ALERT PFX "Panic request from "
358 "LDOM manager received.\n");
359
360 memset(&pkt, 0, sizeof(pkt));
361 pkt.data.tag.type = DS_DATA;
362 pkt.data.tag.len = sizeof(pkt) - sizeof(struct ds_msg_tag);
363 pkt.data.handle = dp->handle;
364 pkt.res.req_num = rp->req_num;
365 pkt.res.result = DS_OK;
366 pkt.res.reason[0] = 0;
367
368 ds_send(lp, &pkt, sizeof(pkt));
369
370 panic("PANIC requested by LDOM manager.");
371}
372
373#ifdef CONFIG_HOTPLUG_CPU
374struct dr_cpu_tag {
375 __u64 req_num;
376 __u32 type;
377#define DR_CPU_CONFIGURE 0x43
378#define DR_CPU_UNCONFIGURE 0x55
379#define DR_CPU_FORCE_UNCONFIGURE 0x46
380#define DR_CPU_STATUS 0x53
381
382/* Responses */
383#define DR_CPU_OK 0x6f
384#define DR_CPU_ERROR 0x65
385
386 __u32 num_records;
387};
388
389struct dr_cpu_resp_entry {
390 __u32 cpu;
391 __u32 result;
392#define DR_CPU_RES_OK 0x00
393#define DR_CPU_RES_FAILURE 0x01
394#define DR_CPU_RES_BLOCKED 0x02
395#define DR_CPU_RES_CPU_NOT_RESPONDING 0x03
396#define DR_CPU_RES_NOT_IN_MD 0x04
397
398 __u32 stat;
399#define DR_CPU_STAT_NOT_PRESENT 0x00
400#define DR_CPU_STAT_UNCONFIGURED 0x01
401#define DR_CPU_STAT_CONFIGURED 0x02
402
403 __u32 str_off;
404};
405
406static void __dr_cpu_send_error(struct ds_cap_state *cp, struct ds_data *data)
407{
408 struct dr_cpu_tag *tag = (struct dr_cpu_tag *) (data + 1);
409 struct ds_info *dp = ds_info;
410 struct {
411 struct ds_data data;
412 struct dr_cpu_tag tag;
413 } pkt;
414 int msg_len;
415
416 memset(&pkt, 0, sizeof(pkt));
417 pkt.data.tag.type = DS_DATA;
418 pkt.data.handle = cp->handle;
419 pkt.tag.req_num = tag->req_num;
420 pkt.tag.type = DR_CPU_ERROR;
421 pkt.tag.num_records = 0;
422
423 msg_len = (sizeof(struct ds_data) +
424 sizeof(struct dr_cpu_tag));
425
426 pkt.data.tag.len = msg_len - sizeof(struct ds_msg_tag);
427
428 __ds_send(dp->lp, &pkt, msg_len);
429}
430
431static void dr_cpu_send_error(struct ds_cap_state *cp, struct ds_data *data)
432{
433 unsigned long flags;
434
435 spin_lock_irqsave(&ds_lock, flags);
436 __dr_cpu_send_error(cp, data);
437 spin_unlock_irqrestore(&ds_lock, flags);
438}
439
440#define CPU_SENTINEL 0xffffffff
441
442static void purge_dups(u32 *list, u32 num_ents)
443{
444 unsigned int i;
445
446 for (i = 0; i < num_ents; i++) {
447 u32 cpu = list[i];
448 unsigned int j;
449
450 if (cpu == CPU_SENTINEL)
451 continue;
452
453 for (j = i + 1; j < num_ents; j++) {
454 if (list[j] == cpu)
455 list[j] = CPU_SENTINEL;
456 }
457 }
458}
459
460static int dr_cpu_size_response(int ncpus)
461{
462 return (sizeof(struct ds_data) +
463 sizeof(struct dr_cpu_tag) +
464 (sizeof(struct dr_cpu_resp_entry) * ncpus));
465}
466
467static void dr_cpu_init_response(struct ds_data *resp, u64 req_num,
468 u64 handle, int resp_len, int ncpus,
469 cpumask_t *mask, u32 default_stat)
470{
471 struct dr_cpu_resp_entry *ent;
472 struct dr_cpu_tag *tag;
473 int i, cpu;
474
475 tag = (struct dr_cpu_tag *) (resp + 1);
476 ent = (struct dr_cpu_resp_entry *) (tag + 1);
477
478 resp->tag.type = DS_DATA;
479 resp->tag.len = resp_len - sizeof(struct ds_msg_tag);
480 resp->handle = handle;
481 tag->req_num = req_num;
482 tag->type = DR_CPU_OK;
483 tag->num_records = ncpus;
484
485 i = 0;
486 for_each_cpu_mask(cpu, *mask) {
487 ent[i].cpu = cpu;
488 ent[i].result = DR_CPU_RES_OK;
489 ent[i].stat = default_stat;
490 i++;
491 }
492 BUG_ON(i != ncpus);
493}
494
495static void dr_cpu_mark(struct ds_data *resp, int cpu, int ncpus,
496 u32 res, u32 stat)
497{
498 struct dr_cpu_resp_entry *ent;
499 struct dr_cpu_tag *tag;
500 int i;
501
502 tag = (struct dr_cpu_tag *) (resp + 1);
503 ent = (struct dr_cpu_resp_entry *) (tag + 1);
504
505 for (i = 0; i < ncpus; i++) {
506 if (ent[i].cpu != cpu)
507 continue;
508 ent[i].result = res;
509 ent[i].stat = stat;
510 break;
511 }
512}
513
514static int dr_cpu_configure(struct ds_cap_state *cp, u64 req_num,
515 cpumask_t *mask)
516{
517 struct ds_data *resp;
518 int resp_len, ncpus, cpu;
519 unsigned long flags;
520
521 ncpus = cpus_weight(*mask);
522 resp_len = dr_cpu_size_response(ncpus);
523 resp = kzalloc(resp_len, GFP_KERNEL);
524 if (!resp)
525 return -ENOMEM;
526
527 dr_cpu_init_response(resp, req_num, cp->handle,
528 resp_len, ncpus, mask,
529 DR_CPU_STAT_CONFIGURED);
530
531 mdesc_fill_in_cpu_data(*mask);
532
533 for_each_cpu_mask(cpu, *mask) {
534 int err;
535
536 printk(KERN_INFO PFX "Starting cpu %d...\n", cpu);
537 err = cpu_up(cpu);
538 if (err) {
539 __u32 res = DR_CPU_RES_FAILURE;
540 __u32 stat = DR_CPU_STAT_UNCONFIGURED;
541
542 if (!cpu_present(cpu)) {
543 /* CPU not present in MD */
544 res = DR_CPU_RES_NOT_IN_MD;
545 stat = DR_CPU_STAT_NOT_PRESENT;
546 } else if (err == -ENODEV) {
547 /* CPU did not call in successfully */
548 res = DR_CPU_RES_CPU_NOT_RESPONDING;
549 }
550
551 printk(KERN_INFO PFX "CPU startup failed err=%d\n",
552 err);
553 dr_cpu_mark(resp, cpu, ncpus, res, stat);
554 }
555 }
556
557 spin_lock_irqsave(&ds_lock, flags);
558 __ds_send(ds_info->lp, resp, resp_len);
559 spin_unlock_irqrestore(&ds_lock, flags);
560
561 kfree(resp);
562
563 /* Redistribute IRQs, taking into account the new cpus. */
564 fixup_irqs();
565
566 return 0;
567}
568
569static int dr_cpu_unconfigure(struct ds_cap_state *cp, u64 req_num,
570 cpumask_t *mask)
571{
572 struct ds_data *resp;
573 int resp_len, ncpus, cpu;
574 unsigned long flags;
575
576 ncpus = cpus_weight(*mask);
577 resp_len = dr_cpu_size_response(ncpus);
578 resp = kzalloc(resp_len, GFP_KERNEL);
579 if (!resp)
580 return -ENOMEM;
581
582 dr_cpu_init_response(resp, req_num, cp->handle,
583 resp_len, ncpus, mask,
584 DR_CPU_STAT_UNCONFIGURED);
585
586 for_each_cpu_mask(cpu, *mask) {
587 int err;
588
589 printk(KERN_INFO PFX "CPU[%d]: Shutting down cpu %d...\n",
590 smp_processor_id(), cpu);
591 err = cpu_down(cpu);
592 if (err)
593 dr_cpu_mark(resp, cpu, ncpus,
594 DR_CPU_RES_FAILURE,
595 DR_CPU_STAT_CONFIGURED);
596 }
597
598 spin_lock_irqsave(&ds_lock, flags);
599 __ds_send(ds_info->lp, resp, resp_len);
600 spin_unlock_irqrestore(&ds_lock, flags);
601
602 kfree(resp);
603
604 return 0;
605}
606
607static void dr_cpu_data(struct ldc_channel *lp,
608 struct ds_cap_state *cp,
609 void *buf, int len)
610{
611 struct ds_data *data = buf;
612 struct dr_cpu_tag *tag = (struct dr_cpu_tag *) (data + 1);
613 u32 *cpu_list = (u32 *) (tag + 1);
614 u64 req_num = tag->req_num;
615 cpumask_t mask;
616 unsigned int i;
617 int err;
618
619 switch (tag->type) {
620 case DR_CPU_CONFIGURE:
621 case DR_CPU_UNCONFIGURE:
622 case DR_CPU_FORCE_UNCONFIGURE:
623 break;
624
625 default:
626 dr_cpu_send_error(cp, data);
627 return;
628 }
629
630 purge_dups(cpu_list, tag->num_records);
631
632 cpus_clear(mask);
633 for (i = 0; i < tag->num_records; i++) {
634 if (cpu_list[i] == CPU_SENTINEL)
635 continue;
636
637 if (cpu_list[i] < NR_CPUS)
638 cpu_set(cpu_list[i], mask);
639 }
640
641 if (tag->type == DR_CPU_CONFIGURE)
642 err = dr_cpu_configure(cp, req_num, &mask);
643 else
644 err = dr_cpu_unconfigure(cp, req_num, &mask);
645
646 if (err)
647 dr_cpu_send_error(cp, data);
648}
649#endif /* CONFIG_HOTPLUG_CPU */
650
651struct ds_pri_msg {
652 __u64 req_num;
653 __u64 type;
654#define DS_PRI_REQUEST 0x00
655#define DS_PRI_DATA 0x01
656#define DS_PRI_UPDATE 0x02
657};
658
659static void ds_pri_data(struct ldc_channel *lp,
660 struct ds_cap_state *dp,
661 void *buf, int len)
662{
663 struct ds_data *dpkt = buf;
664 struct ds_pri_msg *rp;
665
666 rp = (struct ds_pri_msg *) (dpkt + 1);
667
668 printk(KERN_INFO PFX "PRI REQ [%lx:%lx], len=%d\n",
669 rp->req_num, rp->type, len);
670}
671
672struct ds_var_hdr {
673 __u32 type;
674#define DS_VAR_SET_REQ 0x00
675#define DS_VAR_DELETE_REQ 0x01
676#define DS_VAR_SET_RESP 0x02
677#define DS_VAR_DELETE_RESP 0x03
678};
679
680struct ds_var_set_msg {
681 struct ds_var_hdr hdr;
682 char name_and_value[0];
683};
684
685struct ds_var_delete_msg {
686 struct ds_var_hdr hdr;
687 char name[0];
688};
689
690struct ds_var_resp {
691 struct ds_var_hdr hdr;
692 __u32 result;
693#define DS_VAR_SUCCESS 0x00
694#define DS_VAR_NO_SPACE 0x01
695#define DS_VAR_INVALID_VAR 0x02
696#define DS_VAR_INVALID_VAL 0x03
697#define DS_VAR_NOT_PRESENT 0x04
698};
699
700static DEFINE_MUTEX(ds_var_mutex);
701static int ds_var_doorbell;
702static int ds_var_response;
703
704static void ds_var_data(struct ldc_channel *lp,
705 struct ds_cap_state *dp,
706 void *buf, int len)
707{
708 struct ds_data *dpkt = buf;
709 struct ds_var_resp *rp;
710
711 rp = (struct ds_var_resp *) (dpkt + 1);
712
713 if (rp->hdr.type != DS_VAR_SET_RESP &&
714 rp->hdr.type != DS_VAR_DELETE_RESP)
715 return;
716
717 ds_var_response = rp->result;
718 wmb();
719 ds_var_doorbell = 1;
720}
721
722void ldom_set_var(const char *var, const char *value)
723{
724 struct ds_info *dp = ds_info;
725 struct ds_cap_state *cp;
726
727 cp = find_cap_by_string("var-config");
728 if (cp->state != CAP_STATE_REGISTERED)
729 cp = find_cap_by_string("var-config-backup");
730
731 if (cp->state == CAP_STATE_REGISTERED) {
732 union {
733 struct {
734 struct ds_data data;
735 struct ds_var_set_msg msg;
736 } header;
737 char all[512];
738 } pkt;
739 unsigned long flags;
740 char *base, *p;
741 int msg_len, loops;
742
743 memset(&pkt, 0, sizeof(pkt));
744 pkt.header.data.tag.type = DS_DATA;
745 pkt.header.data.handle = cp->handle;
746 pkt.header.msg.hdr.type = DS_VAR_SET_REQ;
747 base = p = &pkt.header.msg.name_and_value[0];
748 strcpy(p, var);
749 p += strlen(var) + 1;
750 strcpy(p, value);
751 p += strlen(value) + 1;
752
753 msg_len = (sizeof(struct ds_data) +
754 sizeof(struct ds_var_set_msg) +
755 (p - base));
756 msg_len = (msg_len + 3) & ~3;
757 pkt.header.data.tag.len = msg_len - sizeof(struct ds_msg_tag);
758
759 mutex_lock(&ds_var_mutex);
760
761 spin_lock_irqsave(&ds_lock, flags);
762 ds_var_doorbell = 0;
763 ds_var_response = -1;
764
765 __ds_send(dp->lp, &pkt, msg_len);
766 spin_unlock_irqrestore(&ds_lock, flags);
767
768 loops = 1000;
769 while (ds_var_doorbell == 0) {
770 if (loops-- < 0)
771 break;
772 barrier();
773 udelay(100);
774 }
775
776 mutex_unlock(&ds_var_mutex);
777
778 if (ds_var_doorbell == 0 ||
779 ds_var_response != DS_VAR_SUCCESS)
780 printk(KERN_ERR PFX "var-config [%s:%s] "
781 "failed, response(%d).\n",
782 var, value,
783 ds_var_response);
784 } else {
785 printk(KERN_ERR PFX "var-config not registered so "
786 "could not set (%s) variable to (%s).\n",
787 var, value);
788 }
789}
790
791void ldom_reboot(const char *boot_command)
792{
793 /* Don't bother with any of this if the boot_command
794 * is empty.
795 */
796 if (boot_command && strlen(boot_command)) {
797 char full_boot_str[256];
798
799 strcpy(full_boot_str, "boot ");
800 strcpy(full_boot_str + strlen("boot "), boot_command);
801
802 ldom_set_var("reboot-command", full_boot_str);
803 }
804 sun4v_mach_sir();
805}
806
807void ldom_power_off(void)
808{
809 sun4v_mach_exit(0);
810}
811
812static void ds_conn_reset(struct ds_info *dp)
813{
814 printk(KERN_ERR PFX "ds_conn_reset() from %p\n",
815 __builtin_return_address(0));
816}
817
818static int register_services(struct ds_info *dp)
819{
820 struct ldc_channel *lp = dp->lp;
821 int i;
822
823 for (i = 0; i < ARRAY_SIZE(ds_states); i++) {
824 struct {
825 struct ds_reg_req req;
826 u8 id_buf[256];
827 } pbuf;
828 struct ds_cap_state *cp = &ds_states[i];
829 int err, msg_len;
830 u64 new_count;
831
832 if (cp->state == CAP_STATE_REGISTERED)
833 continue;
834
835 new_count = sched_clock() & 0xffffffff;
836 cp->handle = ((u64) i << 32) | new_count;
837
838 msg_len = (sizeof(struct ds_reg_req) +
839 strlen(cp->service_id));
840
841 memset(&pbuf, 0, sizeof(pbuf));
842 pbuf.req.tag.type = DS_REG_REQ;
843 pbuf.req.tag.len = (msg_len - sizeof(struct ds_msg_tag));
844 pbuf.req.handle = cp->handle;
845 pbuf.req.major = 1;
846 pbuf.req.minor = 0;
847 strcpy(pbuf.req.svc_id, cp->service_id);
848
849 err = __ds_send(lp, &pbuf, msg_len);
850 if (err > 0)
851 cp->state = CAP_STATE_REG_SENT;
852 }
853 return 0;
854}
855
856static int ds_handshake(struct ds_info *dp, struct ds_msg_tag *pkt)
857{
858
859 if (dp->hs_state == DS_HS_START) {
860 if (pkt->type != DS_INIT_ACK)
861 goto conn_reset;
862
863 dp->hs_state = DS_HS_DONE;
864
865 return register_services(dp);
866 }
867
868 if (dp->hs_state != DS_HS_DONE)
869 goto conn_reset;
870
871 if (pkt->type == DS_REG_ACK) {
872 struct ds_reg_ack *ap = (struct ds_reg_ack *) pkt;
873 struct ds_cap_state *cp = find_cap(ap->handle);
874
875 if (!cp) {
876 printk(KERN_ERR PFX "REG ACK for unknown handle %lx\n",
877 ap->handle);
878 return 0;
879 }
880 printk(KERN_INFO PFX "Registered %s service.\n",
881 cp->service_id);
882 cp->state = CAP_STATE_REGISTERED;
883 } else if (pkt->type == DS_REG_NACK) {
884 struct ds_reg_nack *np = (struct ds_reg_nack *) pkt;
885 struct ds_cap_state *cp = find_cap(np->handle);
886
887 if (!cp) {
888 printk(KERN_ERR PFX "REG NACK for "
889 "unknown handle %lx\n",
890 np->handle);
891 return 0;
892 }
893 printk(KERN_INFO PFX "Could not register %s service\n",
894 cp->service_id);
895 cp->state = CAP_STATE_UNKNOWN;
896 }
897
898 return 0;
899
900conn_reset:
901 ds_conn_reset(dp);
902 return -ECONNRESET;
903}
904
905static void __send_ds_nack(struct ds_info *dp, u64 handle)
906{
907 struct ds_data_nack nack = {
908 .tag = {
909 .type = DS_NACK,
910 .len = (sizeof(struct ds_data_nack) -
911 sizeof(struct ds_msg_tag)),
912 },
913 .handle = handle,
914 .result = DS_INV_HDL,
915 };
916
917 __ds_send(dp->lp, &nack, sizeof(nack));
918}
919
920static LIST_HEAD(ds_work_list);
921static DECLARE_WAIT_QUEUE_HEAD(ds_wait);
922
923struct ds_queue_entry {
924 struct list_head list;
925 int req_len;
926 int __pad;
927 u64 req[0];
928};
929
930static void process_ds_work(void)
931{
932 struct ds_queue_entry *qp, *tmp;
933 static struct ds_info *dp;
934 unsigned long flags;
935 LIST_HEAD(todo);
936
937 spin_lock_irqsave(&ds_lock, flags);
938 list_splice(&ds_work_list, &todo);
939 INIT_LIST_HEAD(&ds_work_list);
940 spin_unlock_irqrestore(&ds_lock, flags);
941
942 dp = ds_info;
943
944 list_for_each_entry_safe(qp, tmp, &todo, list) {
945 struct ds_data *dpkt = (struct ds_data *) qp->req;
946 struct ds_cap_state *cp = find_cap(dpkt->handle);
947 int req_len = qp->req_len;
948
949 if (!cp) {
950 printk(KERN_ERR PFX "Data for unknown handle %lu\n",
951 dpkt->handle);
952
953 spin_lock_irqsave(&ds_lock, flags);
954 __send_ds_nack(dp, dpkt->handle);
955 spin_unlock_irqrestore(&ds_lock, flags);
956 } else {
957 cp->data(dp->lp, cp, dpkt, req_len);
958 }
959
960 list_del(&qp->list);
961 kfree(qp);
962 }
963}
964
965static int ds_thread(void *__unused)
966{
967 DEFINE_WAIT(wait);
968
969 while (1) {
970 prepare_to_wait(&ds_wait, &wait, TASK_INTERRUPTIBLE);
971 if (list_empty(&ds_work_list))
972 schedule();
973 finish_wait(&ds_wait, &wait);
974
975 if (kthread_should_stop())
976 break;
977
978 process_ds_work();
979 }
980
981 return 0;
982}
983
984static int ds_data(struct ds_info *dp, struct ds_msg_tag *pkt, int len)
985{
986 struct ds_data *dpkt = (struct ds_data *) pkt;
987 struct ds_queue_entry *qp;
988
989 qp = kmalloc(sizeof(struct ds_queue_entry) + len, GFP_ATOMIC);
990 if (!qp) {
991 __send_ds_nack(dp, dpkt->handle);
992 } else {
993 memcpy(&qp->req, pkt, len);
994 list_add_tail(&qp->list, &ds_work_list);
995 wake_up(&ds_wait);
996 }
997 return 0;
998}
999
1000static void ds_up(struct ds_info *dp)
1001{
1002 struct ldc_channel *lp = dp->lp;
1003 struct ds_ver_req req;
1004 int err;
1005
1006 req.tag.type = DS_INIT_REQ;
1007 req.tag.len = sizeof(req) - sizeof(struct ds_msg_tag);
1008 req.ver.major = 1;
1009 req.ver.minor = 0;
1010
1011 err = __ds_send(lp, &req, sizeof(req));
1012 if (err > 0)
1013 dp->hs_state = DS_HS_START;
1014}
1015
1016static void ds_reset(struct ds_info *dp)
1017{
1018 int i;
1019
1020 dp->hs_state = 0;
1021
1022 for (i = 0; i < ARRAY_SIZE(ds_states); i++) {
1023 struct ds_cap_state *cp = &ds_states[i];
1024
1025 cp->state = CAP_STATE_UNKNOWN;
1026 }
1027}
1028
1029static void ds_event(void *arg, int event)
1030{
1031 struct ds_info *dp = arg;
1032 struct ldc_channel *lp = dp->lp;
1033 unsigned long flags;
1034 int err;
1035
1036 spin_lock_irqsave(&ds_lock, flags);
1037
1038 if (event == LDC_EVENT_UP) {
1039 ds_up(dp);
1040 spin_unlock_irqrestore(&ds_lock, flags);
1041 return;
1042 }
1043
1044 if (event == LDC_EVENT_RESET) {
1045 ds_reset(dp);
1046 spin_unlock_irqrestore(&ds_lock, flags);
1047 return;
1048 }
1049
1050 if (event != LDC_EVENT_DATA_READY) {
1051 printk(KERN_WARNING PFX "Unexpected LDC event %d\n", event);
1052 spin_unlock_irqrestore(&ds_lock, flags);
1053 return;
1054 }
1055
1056 err = 0;
1057 while (1) {
1058 struct ds_msg_tag *tag;
1059
1060 err = ldc_read(lp, dp->rcv_buf, sizeof(*tag));
1061
1062 if (unlikely(err < 0)) {
1063 if (err == -ECONNRESET)
1064 ds_conn_reset(dp);
1065 break;
1066 }
1067 if (err == 0)
1068 break;
1069
1070 tag = dp->rcv_buf;
1071 err = ldc_read(lp, tag + 1, tag->len);
1072
1073 if (unlikely(err < 0)) {
1074 if (err == -ECONNRESET)
1075 ds_conn_reset(dp);
1076 break;
1077 }
1078 if (err < tag->len)
1079 break;
1080
1081 if (tag->type < DS_DATA)
1082 err = ds_handshake(dp, dp->rcv_buf);
1083 else
1084 err = ds_data(dp, dp->rcv_buf,
1085 sizeof(*tag) + err);
1086 if (err == -ECONNRESET)
1087 break;
1088 }
1089
1090 spin_unlock_irqrestore(&ds_lock, flags);
1091}
1092
1093static int __devinit ds_probe(struct vio_dev *vdev,
1094 const struct vio_device_id *id)
1095{
1096 static int ds_version_printed;
1097 struct ldc_channel_config ds_cfg = {
1098 .event = ds_event,
1099 .mtu = 4096,
1100 .mode = LDC_MODE_STREAM,
1101 };
1102 struct ldc_channel *lp;
1103 struct ds_info *dp;
1104 int err;
1105
1106 if (ds_version_printed++ == 0)
1107 printk(KERN_INFO "%s", version);
1108
1109 dp = kzalloc(sizeof(*dp), GFP_KERNEL);
1110 err = -ENOMEM;
1111 if (!dp)
1112 goto out_err;
1113
1114 dp->rcv_buf = kzalloc(4096, GFP_KERNEL);
1115 if (!dp->rcv_buf)
1116 goto out_free_dp;
1117
1118 dp->rcv_buf_len = 4096;
1119
1120 ds_cfg.tx_irq = vdev->tx_irq;
1121 ds_cfg.rx_irq = vdev->rx_irq;
1122
1123 lp = ldc_alloc(vdev->channel_id, &ds_cfg, dp);
1124 if (IS_ERR(lp)) {
1125 err = PTR_ERR(lp);
1126 goto out_free_rcv_buf;
1127 }
1128 dp->lp = lp;
1129
1130 err = ldc_bind(lp, "DS");
1131 if (err)
1132 goto out_free_ldc;
1133
1134 ds_info = dp;
1135
1136 start_powerd();
1137
1138 return err;
1139
1140out_free_ldc:
1141 ldc_free(dp->lp);
1142
1143out_free_rcv_buf:
1144 kfree(dp->rcv_buf);
1145
1146out_free_dp:
1147 kfree(dp);
1148
1149out_err:
1150 return err;
1151}
1152
1153static int ds_remove(struct vio_dev *vdev)
1154{
1155 return 0;
1156}
1157
1158static struct vio_device_id ds_match[] = {
1159 {
1160 .type = "domain-services-port",
1161 },
1162 {},
1163};
1164
1165static struct vio_driver ds_driver = {
1166 .id_table = ds_match,
1167 .probe = ds_probe,
1168 .remove = ds_remove,
1169 .driver = {
1170 .name = "ds",
1171 .owner = THIS_MODULE,
1172 }
1173};
1174
1175static int __init ds_init(void)
1176{
1177 int i;
1178
1179 for (i = 0; i < ARRAY_SIZE(ds_states); i++)
1180 ds_states[i].handle = ((u64)i << 32);
1181
1182 kthread_run(ds_thread, NULL, "kldomd");
1183
1184 return vio_register_driver(&ds_driver);
1185}
1186
1187subsys_initcall(ds_init);
diff --git a/arch/sparc64/kernel/hvtramp.S b/arch/sparc64/kernel/hvtramp.S
new file mode 100644
index 0000000000..a55c252e18
--- /dev/null
+++ b/arch/sparc64/kernel/hvtramp.S
@@ -0,0 +1,140 @@
1/* hvtramp.S: Hypervisor start-cpu trampoline code.
2 *
3 * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
4 */
5
6#include <asm/thread_info.h>
7#include <asm/hypervisor.h>
8#include <asm/scratchpad.h>
9#include <asm/spitfire.h>
10#include <asm/hvtramp.h>
11#include <asm/pstate.h>
12#include <asm/ptrace.h>
13#include <asm/head.h>
14#include <asm/asi.h>
15
16 .text
17 .align 8
18 .globl hv_cpu_startup, hv_cpu_startup_end
19
20 /* This code executes directly out of the hypervisor
21 * with physical addressing (va==pa). %o0 contains
22 * our client argument which for Linux points to
23 * a descriptor data structure which defines the
24 * MMU entries we need to load up.
25 *
26 * After we set things up we enable the MMU and call
27 * into the kernel.
28 *
29 * First setup basic privileged cpu state.
30 */
31hv_cpu_startup:
32 SET_GL(0)
33 wrpr %g0, 15, %pil
34 wrpr %g0, 0, %canrestore
35 wrpr %g0, 0, %otherwin
36 wrpr %g0, 6, %cansave
37 wrpr %g0, 6, %cleanwin
38 wrpr %g0, 0, %cwp
39 wrpr %g0, 0, %wstate
40 wrpr %g0, 0, %tl
41
42 sethi %hi(sparc64_ttable_tl0), %g1
43 wrpr %g1, %tba
44
45 mov %o0, %l0
46
47 lduw [%l0 + HVTRAMP_DESCR_CPU], %g1
48 mov SCRATCHPAD_CPUID, %g2
49 stxa %g1, [%g2] ASI_SCRATCHPAD
50
51 ldx [%l0 + HVTRAMP_DESCR_FAULT_INFO_VA], %g2
52 stxa %g2, [%g0] ASI_SCRATCHPAD
53
54 mov 0, %l1
55 lduw [%l0 + HVTRAMP_DESCR_NUM_MAPPINGS], %l2
56 add %l0, HVTRAMP_DESCR_MAPS, %l3
57
581: ldx [%l3 + HVTRAMP_MAPPING_VADDR], %o0
59 clr %o1
60 ldx [%l3 + HVTRAMP_MAPPING_TTE], %o2
61 mov HV_MMU_IMMU | HV_MMU_DMMU, %o3
62 mov HV_FAST_MMU_MAP_PERM_ADDR, %o5
63 ta HV_FAST_TRAP
64
65 brnz,pn %o0, 80f
66 nop
67
68 add %l1, 1, %l1
69 cmp %l1, %l2
70 blt,a,pt %xcc, 1b
71 add %l3, HVTRAMP_MAPPING_SIZE, %l3
72
73 ldx [%l0 + HVTRAMP_DESCR_FAULT_INFO_PA], %o0
74 mov HV_FAST_MMU_FAULT_AREA_CONF, %o5
75 ta HV_FAST_TRAP
76
77 brnz,pn %o0, 80f
78 nop
79
80 wrpr %g0, (PSTATE_PRIV | PSTATE_PEF), %pstate
81
82 ldx [%l0 + HVTRAMP_DESCR_THREAD_REG], %l6
83
84 mov 1, %o0
85 set 1f, %o1
86 mov HV_FAST_MMU_ENABLE, %o5
87 ta HV_FAST_TRAP
88
89 ba,pt %xcc, 80f
90 nop
91
921:
93 wr %g0, 0, %fprs
94 wr %g0, ASI_P, %asi
95
96 mov PRIMARY_CONTEXT, %g7
97 stxa %g0, [%g7] ASI_MMU
98 membar #Sync
99
100 mov SECONDARY_CONTEXT, %g7
101 stxa %g0, [%g7] ASI_MMU
102 membar #Sync
103
104 mov %l6, %g6
105 ldx [%g6 + TI_TASK], %g4
106
107 mov 1, %g5
108 sllx %g5, THREAD_SHIFT, %g5
109 sub %g5, (STACKFRAME_SZ + STACK_BIAS), %g5
110 add %g6, %g5, %sp
111 mov 0, %fp
112
113 call init_irqwork_curcpu
114 nop
115 call hard_smp_processor_id
116 nop
117
118 mov %o0, %o1
119 mov 0, %o0
120 mov 0, %o2
121 call sun4v_init_mondo_queues
122 mov 1, %o3
123
124 call init_cur_cpu_trap
125 mov %g6, %o0
126
127 wrpr %g0, (PSTATE_PRIV | PSTATE_PEF | PSTATE_IE), %pstate
128
129 call smp_callin
130 nop
131 call cpu_idle
132 mov 0, %o0
133 call cpu_panic
134 nop
135
13680: ba,pt %xcc, 80b
137 nop
138
139 .align 8
140hv_cpu_startup_end:
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index e60d283f60..8cb3358674 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -293,6 +293,11 @@ static void sun4u_irq_enable(unsigned int virt_irq)
293 } 293 }
294} 294}
295 295
296static void sun4u_set_affinity(unsigned int virt_irq, cpumask_t mask)
297{
298 sun4u_irq_enable(virt_irq);
299}
300
296static void sun4u_irq_disable(unsigned int virt_irq) 301static void sun4u_irq_disable(unsigned int virt_irq)
297{ 302{
298 struct irq_handler_data *data = get_irq_chip_data(virt_irq); 303 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
@@ -309,6 +314,10 @@ static void sun4u_irq_disable(unsigned int virt_irq)
309static void sun4u_irq_end(unsigned int virt_irq) 314static void sun4u_irq_end(unsigned int virt_irq)
310{ 315{
311 struct irq_handler_data *data = get_irq_chip_data(virt_irq); 316 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
317 struct irq_desc *desc = irq_desc + virt_irq;
318
319 if (unlikely(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
320 return;
312 321
313 if (likely(data)) 322 if (likely(data))
314 upa_writeq(ICLR_IDLE, data->iclr); 323 upa_writeq(ICLR_IDLE, data->iclr);
@@ -329,6 +338,10 @@ static void sun4v_irq_enable(unsigned int virt_irq)
329 if (err != HV_EOK) 338 if (err != HV_EOK)
330 printk("sun4v_intr_settarget(%x,%lu): err(%d)\n", 339 printk("sun4v_intr_settarget(%x,%lu): err(%d)\n",
331 ino, cpuid, err); 340 ino, cpuid, err);
341 err = sun4v_intr_setstate(ino, HV_INTR_STATE_IDLE);
342 if (err != HV_EOK)
343 printk("sun4v_intr_setstate(%x): "
344 "err(%d)\n", ino, err);
332 err = sun4v_intr_setenabled(ino, HV_INTR_ENABLED); 345 err = sun4v_intr_setenabled(ino, HV_INTR_ENABLED);
333 if (err != HV_EOK) 346 if (err != HV_EOK)
334 printk("sun4v_intr_setenabled(%x): err(%d)\n", 347 printk("sun4v_intr_setenabled(%x): err(%d)\n",
@@ -336,6 +349,24 @@ static void sun4v_irq_enable(unsigned int virt_irq)
336 } 349 }
337} 350}
338 351
352static void sun4v_set_affinity(unsigned int virt_irq, cpumask_t mask)
353{
354 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
355 unsigned int ino = bucket - &ivector_table[0];
356
357 if (likely(bucket)) {
358 unsigned long cpuid;
359 int err;
360
361 cpuid = irq_choose_cpu(virt_irq);
362
363 err = sun4v_intr_settarget(ino, cpuid);
364 if (err != HV_EOK)
365 printk("sun4v_intr_settarget(%x,%lu): err(%d)\n",
366 ino, cpuid, err);
367 }
368}
369
339static void sun4v_irq_disable(unsigned int virt_irq) 370static void sun4v_irq_disable(unsigned int virt_irq)
340{ 371{
341 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); 372 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
@@ -369,6 +400,10 @@ static void sun4v_irq_end(unsigned int virt_irq)
369{ 400{
370 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); 401 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
371 unsigned int ino = bucket - &ivector_table[0]; 402 unsigned int ino = bucket - &ivector_table[0];
403 struct irq_desc *desc = irq_desc + virt_irq;
404
405 if (unlikely(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
406 return;
372 407
373 if (likely(bucket)) { 408 if (likely(bucket)) {
374 int err; 409 int err;
@@ -400,6 +435,12 @@ static void sun4v_virq_enable(unsigned int virt_irq)
400 "err(%d)\n", 435 "err(%d)\n",
401 dev_handle, dev_ino, cpuid, err); 436 dev_handle, dev_ino, cpuid, err);
402 err = sun4v_vintr_set_state(dev_handle, dev_ino, 437 err = sun4v_vintr_set_state(dev_handle, dev_ino,
438 HV_INTR_STATE_IDLE);
439 if (err != HV_EOK)
440 printk("sun4v_vintr_set_state(%lx,%lx,"
441 "HV_INTR_STATE_IDLE): err(%d)\n",
442 dev_handle, dev_ino, err);
443 err = sun4v_vintr_set_valid(dev_handle, dev_ino,
403 HV_INTR_ENABLED); 444 HV_INTR_ENABLED);
404 if (err != HV_EOK) 445 if (err != HV_EOK)
405 printk("sun4v_vintr_set_state(%lx,%lx," 446 printk("sun4v_vintr_set_state(%lx,%lx,"
@@ -408,6 +449,28 @@ static void sun4v_virq_enable(unsigned int virt_irq)
408 } 449 }
409} 450}
410 451
452static void sun4v_virt_set_affinity(unsigned int virt_irq, cpumask_t mask)
453{
454 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
455 unsigned int ino = bucket - &ivector_table[0];
456
457 if (likely(bucket)) {
458 unsigned long cpuid, dev_handle, dev_ino;
459 int err;
460
461 cpuid = irq_choose_cpu(virt_irq);
462
463 dev_handle = ino & IMAP_IGN;
464 dev_ino = ino & IMAP_INO;
465
466 err = sun4v_vintr_set_target(dev_handle, dev_ino, cpuid);
467 if (err != HV_EOK)
468 printk("sun4v_vintr_set_target(%lx,%lx,%lu): "
469 "err(%d)\n",
470 dev_handle, dev_ino, cpuid, err);
471 }
472}
473
411static void sun4v_virq_disable(unsigned int virt_irq) 474static void sun4v_virq_disable(unsigned int virt_irq)
412{ 475{
413 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); 476 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
@@ -420,7 +483,7 @@ static void sun4v_virq_disable(unsigned int virt_irq)
420 dev_handle = ino & IMAP_IGN; 483 dev_handle = ino & IMAP_IGN;
421 dev_ino = ino & IMAP_INO; 484 dev_ino = ino & IMAP_INO;
422 485
423 err = sun4v_vintr_set_state(dev_handle, dev_ino, 486 err = sun4v_vintr_set_valid(dev_handle, dev_ino,
424 HV_INTR_DISABLED); 487 HV_INTR_DISABLED);
425 if (err != HV_EOK) 488 if (err != HV_EOK)
426 printk("sun4v_vintr_set_state(%lx,%lx," 489 printk("sun4v_vintr_set_state(%lx,%lx,"
@@ -433,6 +496,10 @@ static void sun4v_virq_end(unsigned int virt_irq)
433{ 496{
434 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); 497 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
435 unsigned int ino = bucket - &ivector_table[0]; 498 unsigned int ino = bucket - &ivector_table[0];
499 struct irq_desc *desc = irq_desc + virt_irq;
500
501 if (unlikely(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
502 return;
436 503
437 if (likely(bucket)) { 504 if (likely(bucket)) {
438 unsigned long dev_handle, dev_ino; 505 unsigned long dev_handle, dev_ino;
@@ -467,6 +534,7 @@ static struct irq_chip sun4u_irq = {
467 .enable = sun4u_irq_enable, 534 .enable = sun4u_irq_enable,
468 .disable = sun4u_irq_disable, 535 .disable = sun4u_irq_disable,
469 .end = sun4u_irq_end, 536 .end = sun4u_irq_end,
537 .set_affinity = sun4u_set_affinity,
470}; 538};
471 539
472static struct irq_chip sun4u_irq_ack = { 540static struct irq_chip sun4u_irq_ack = {
@@ -475,6 +543,7 @@ static struct irq_chip sun4u_irq_ack = {
475 .disable = sun4u_irq_disable, 543 .disable = sun4u_irq_disable,
476 .ack = run_pre_handler, 544 .ack = run_pre_handler,
477 .end = sun4u_irq_end, 545 .end = sun4u_irq_end,
546 .set_affinity = sun4u_set_affinity,
478}; 547};
479 548
480static struct irq_chip sun4v_irq = { 549static struct irq_chip sun4v_irq = {
@@ -482,6 +551,7 @@ static struct irq_chip sun4v_irq = {
482 .enable = sun4v_irq_enable, 551 .enable = sun4v_irq_enable,
483 .disable = sun4v_irq_disable, 552 .disable = sun4v_irq_disable,
484 .end = sun4v_irq_end, 553 .end = sun4v_irq_end,
554 .set_affinity = sun4v_set_affinity,
485}; 555};
486 556
487static struct irq_chip sun4v_irq_ack = { 557static struct irq_chip sun4v_irq_ack = {
@@ -490,6 +560,7 @@ static struct irq_chip sun4v_irq_ack = {
490 .disable = sun4v_irq_disable, 560 .disable = sun4v_irq_disable,
491 .ack = run_pre_handler, 561 .ack = run_pre_handler,
492 .end = sun4v_irq_end, 562 .end = sun4v_irq_end,
563 .set_affinity = sun4v_set_affinity,
493}; 564};
494 565
495#ifdef CONFIG_PCI_MSI 566#ifdef CONFIG_PCI_MSI
@@ -501,6 +572,7 @@ static struct irq_chip sun4v_msi = {
501 .disable = sun4v_msi_disable, 572 .disable = sun4v_msi_disable,
502 .ack = run_pre_handler, 573 .ack = run_pre_handler,
503 .end = sun4v_irq_end, 574 .end = sun4v_irq_end,
575 .set_affinity = sun4v_set_affinity,
504}; 576};
505#endif 577#endif
506 578
@@ -509,6 +581,7 @@ static struct irq_chip sun4v_virq = {
509 .enable = sun4v_virq_enable, 581 .enable = sun4v_virq_enable,
510 .disable = sun4v_virq_disable, 582 .disable = sun4v_virq_disable,
511 .end = sun4v_virq_end, 583 .end = sun4v_virq_end,
584 .set_affinity = sun4v_virt_set_affinity,
512}; 585};
513 586
514static struct irq_chip sun4v_virq_ack = { 587static struct irq_chip sun4v_virq_ack = {
@@ -517,6 +590,7 @@ static struct irq_chip sun4v_virq_ack = {
517 .disable = sun4v_virq_disable, 590 .disable = sun4v_virq_disable,
518 .ack = run_pre_handler, 591 .ack = run_pre_handler,
519 .end = sun4v_virq_end, 592 .end = sun4v_virq_end,
593 .set_affinity = sun4v_virt_set_affinity,
520}; 594};
521 595
522void irq_install_pre_handler(int virt_irq, 596void irq_install_pre_handler(int virt_irq,
@@ -729,6 +803,26 @@ void handler_irq(int irq, struct pt_regs *regs)
729 set_irq_regs(old_regs); 803 set_irq_regs(old_regs);
730} 804}
731 805
806#ifdef CONFIG_HOTPLUG_CPU
807void fixup_irqs(void)
808{
809 unsigned int irq;
810
811 for (irq = 0; irq < NR_IRQS; irq++) {
812 unsigned long flags;
813
814 spin_lock_irqsave(&irq_desc[irq].lock, flags);
815 if (irq_desc[irq].action &&
816 !(irq_desc[irq].status & IRQ_PER_CPU)) {
817 if (irq_desc[irq].chip->set_affinity)
818 irq_desc[irq].chip->set_affinity(irq,
819 irq_desc[irq].affinity);
820 }
821 spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
822 }
823}
824#endif
825
732struct sun5_timer { 826struct sun5_timer {
733 u64 count0; 827 u64 count0;
734 u64 limit0; 828 u64 limit0;
diff --git a/arch/sparc64/kernel/ldc.c b/arch/sparc64/kernel/ldc.c
new file mode 100644
index 0000000000..85a2be0b09
--- /dev/null
+++ b/arch/sparc64/kernel/ldc.c
@@ -0,0 +1,2373 @@
1/* ldc.c: Logical Domain Channel link-layer protocol driver.
2 *
3 * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
4 */
5
6#include <linux/kernel.h>
7#include <linux/module.h>
8#include <linux/slab.h>
9#include <linux/spinlock.h>
10#include <linux/delay.h>
11#include <linux/errno.h>
12#include <linux/string.h>
13#include <linux/scatterlist.h>
14#include <linux/interrupt.h>
15#include <linux/list.h>
16#include <linux/init.h>
17
18#include <asm/hypervisor.h>
19#include <asm/iommu.h>
20#include <asm/page.h>
21#include <asm/ldc.h>
22#include <asm/mdesc.h>
23
24#define DRV_MODULE_NAME "ldc"
25#define PFX DRV_MODULE_NAME ": "
26#define DRV_MODULE_VERSION "1.0"
27#define DRV_MODULE_RELDATE "June 25, 2007"
28
29static char version[] __devinitdata =
30 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
31#define LDC_PACKET_SIZE 64
32
33/* Packet header layout for unreliable and reliable mode frames.
34 * When in RAW mode, packets are simply straight 64-byte payloads
35 * with no headers.
36 */
37struct ldc_packet {
38 u8 type;
39#define LDC_CTRL 0x01
40#define LDC_DATA 0x02
41#define LDC_ERR 0x10
42
43 u8 stype;
44#define LDC_INFO 0x01
45#define LDC_ACK 0x02
46#define LDC_NACK 0x04
47
48 u8 ctrl;
49#define LDC_VERS 0x01 /* Link Version */
50#define LDC_RTS 0x02 /* Request To Send */
51#define LDC_RTR 0x03 /* Ready To Receive */
52#define LDC_RDX 0x04 /* Ready for Data eXchange */
53#define LDC_CTRL_MSK 0x0f
54
55 u8 env;
56#define LDC_LEN 0x3f
57#define LDC_FRAG_MASK 0xc0
58#define LDC_START 0x40
59#define LDC_STOP 0x80
60
61 u32 seqid;
62
63 union {
64 u8 u_data[LDC_PACKET_SIZE - 8];
65 struct {
66 u32 pad;
67 u32 ackid;
68 u8 r_data[LDC_PACKET_SIZE - 8 - 8];
69 } r;
70 } u;
71};
72
73struct ldc_version {
74 u16 major;
75 u16 minor;
76};
77
78/* Ordered from largest major to lowest. */
79static struct ldc_version ver_arr[] = {
80 { .major = 1, .minor = 0 },
81};
82
83#define LDC_DEFAULT_MTU (4 * LDC_PACKET_SIZE)
84#define LDC_DEFAULT_NUM_ENTRIES (PAGE_SIZE / LDC_PACKET_SIZE)
85
86struct ldc_channel;
87
88struct ldc_mode_ops {
89 int (*write)(struct ldc_channel *, const void *, unsigned int);
90 int (*read)(struct ldc_channel *, void *, unsigned int);
91};
92
93static const struct ldc_mode_ops raw_ops;
94static const struct ldc_mode_ops nonraw_ops;
95static const struct ldc_mode_ops stream_ops;
96
97int ldom_domaining_enabled;
98
99struct ldc_iommu {
100 /* Protects arena alloc/free. */
101 spinlock_t lock;
102 struct iommu_arena arena;
103 struct ldc_mtable_entry *page_table;
104};
105
106struct ldc_channel {
107 /* Protects all operations that depend upon channel state. */
108 spinlock_t lock;
109
110 unsigned long id;
111
112 u8 *mssbuf;
113 u32 mssbuf_len;
114 u32 mssbuf_off;
115
116 struct ldc_packet *tx_base;
117 unsigned long tx_head;
118 unsigned long tx_tail;
119 unsigned long tx_num_entries;
120 unsigned long tx_ra;
121
122 unsigned long tx_acked;
123
124 struct ldc_packet *rx_base;
125 unsigned long rx_head;
126 unsigned long rx_tail;
127 unsigned long rx_num_entries;
128 unsigned long rx_ra;
129
130 u32 rcv_nxt;
131 u32 snd_nxt;
132
133 unsigned long chan_state;
134
135 struct ldc_channel_config cfg;
136 void *event_arg;
137
138 const struct ldc_mode_ops *mops;
139
140 struct ldc_iommu iommu;
141
142 struct ldc_version ver;
143
144 u8 hs_state;
145#define LDC_HS_CLOSED 0x00
146#define LDC_HS_OPEN 0x01
147#define LDC_HS_GOTVERS 0x02
148#define LDC_HS_SENTRTR 0x03
149#define LDC_HS_GOTRTR 0x04
150#define LDC_HS_COMPLETE 0x10
151
152 u8 flags;
153#define LDC_FLAG_ALLOCED_QUEUES 0x01
154#define LDC_FLAG_REGISTERED_QUEUES 0x02
155#define LDC_FLAG_REGISTERED_IRQS 0x04
156#define LDC_FLAG_RESET 0x10
157
158 u8 mss;
159 u8 state;
160
161#define LDC_IRQ_NAME_MAX 32
162 char rx_irq_name[LDC_IRQ_NAME_MAX];
163 char tx_irq_name[LDC_IRQ_NAME_MAX];
164
165 struct hlist_head mh_list;
166
167 struct hlist_node list;
168};
169
170#define ldcdbg(TYPE, f, a...) \
171do { if (lp->cfg.debug & LDC_DEBUG_##TYPE) \
172 printk(KERN_INFO PFX "ID[%lu] " f, lp->id, ## a); \
173} while (0)
174
175static const char *state_to_str(u8 state)
176{
177 switch (state) {
178 case LDC_STATE_INVALID:
179 return "INVALID";
180 case LDC_STATE_INIT:
181 return "INIT";
182 case LDC_STATE_BOUND:
183 return "BOUND";
184 case LDC_STATE_READY:
185 return "READY";
186 case LDC_STATE_CONNECTED:
187 return "CONNECTED";
188 default:
189 return "<UNKNOWN>";
190 }
191}
192
193static void ldc_set_state(struct ldc_channel *lp, u8 state)
194{
195 ldcdbg(STATE, "STATE (%s) --> (%s)\n",
196 state_to_str(lp->state),
197 state_to_str(state));
198
199 lp->state = state;
200}
201
202static unsigned long __advance(unsigned long off, unsigned long num_entries)
203{
204 off += LDC_PACKET_SIZE;
205 if (off == (num_entries * LDC_PACKET_SIZE))
206 off = 0;
207
208 return off;
209}
210
211static unsigned long rx_advance(struct ldc_channel *lp, unsigned long off)
212{
213 return __advance(off, lp->rx_num_entries);
214}
215
216static unsigned long tx_advance(struct ldc_channel *lp, unsigned long off)
217{
218 return __advance(off, lp->tx_num_entries);
219}
220
221static struct ldc_packet *handshake_get_tx_packet(struct ldc_channel *lp,
222 unsigned long *new_tail)
223{
224 struct ldc_packet *p;
225 unsigned long t;
226
227 t = tx_advance(lp, lp->tx_tail);
228 if (t == lp->tx_head)
229 return NULL;
230
231 *new_tail = t;
232
233 p = lp->tx_base;
234 return p + (lp->tx_tail / LDC_PACKET_SIZE);
235}
236
237/* When we are in reliable or stream mode, have to track the next packet
238 * we haven't gotten an ACK for in the TX queue using tx_acked. We have
239 * to be careful not to stomp over the queue past that point. During
240 * the handshake, we don't have TX data packets pending in the queue
241 * and that's why handshake_get_tx_packet() need not be mindful of
242 * lp->tx_acked.
243 */
244static unsigned long head_for_data(struct ldc_channel *lp)
245{
246 if (lp->cfg.mode == LDC_MODE_STREAM)
247 return lp->tx_acked;
248 return lp->tx_head;
249}
250
251static int tx_has_space_for(struct ldc_channel *lp, unsigned int size)
252{
253 unsigned long limit, tail, new_tail, diff;
254 unsigned int mss;
255
256 limit = head_for_data(lp);
257 tail = lp->tx_tail;
258 new_tail = tx_advance(lp, tail);
259 if (new_tail == limit)
260 return 0;
261
262 if (limit > new_tail)
263 diff = limit - new_tail;
264 else
265 diff = (limit +
266 ((lp->tx_num_entries * LDC_PACKET_SIZE) - new_tail));
267 diff /= LDC_PACKET_SIZE;
268 mss = lp->mss;
269
270 if (diff * mss < size)
271 return 0;
272
273 return 1;
274}
275
276static struct ldc_packet *data_get_tx_packet(struct ldc_channel *lp,
277 unsigned long *new_tail)
278{
279 struct ldc_packet *p;
280 unsigned long h, t;
281
282 h = head_for_data(lp);
283 t = tx_advance(lp, lp->tx_tail);
284 if (t == h)
285 return NULL;
286
287 *new_tail = t;
288
289 p = lp->tx_base;
290 return p + (lp->tx_tail / LDC_PACKET_SIZE);
291}
292
293static int set_tx_tail(struct ldc_channel *lp, unsigned long tail)
294{
295 unsigned long orig_tail = lp->tx_tail;
296 int limit = 1000;
297
298 lp->tx_tail = tail;
299 while (limit-- > 0) {
300 unsigned long err;
301
302 err = sun4v_ldc_tx_set_qtail(lp->id, tail);
303 if (!err)
304 return 0;
305
306 if (err != HV_EWOULDBLOCK) {
307 lp->tx_tail = orig_tail;
308 return -EINVAL;
309 }
310 udelay(1);
311 }
312
313 lp->tx_tail = orig_tail;
314 return -EBUSY;
315}
316
317/* This just updates the head value in the hypervisor using
318 * a polling loop with a timeout. The caller takes care of
319 * upating software state representing the head change, if any.
320 */
321static int __set_rx_head(struct ldc_channel *lp, unsigned long head)
322{
323 int limit = 1000;
324
325 while (limit-- > 0) {
326 unsigned long err;
327
328 err = sun4v_ldc_rx_set_qhead(lp->id, head);
329 if (!err)
330 return 0;
331
332 if (err != HV_EWOULDBLOCK)
333 return -EINVAL;
334
335 udelay(1);
336 }
337
338 return -EBUSY;
339}
340
341static int send_tx_packet(struct ldc_channel *lp,
342 struct ldc_packet *p,
343 unsigned long new_tail)
344{
345 BUG_ON(p != (lp->tx_base + (lp->tx_tail / LDC_PACKET_SIZE)));
346
347 return set_tx_tail(lp, new_tail);
348}
349
350static struct ldc_packet *handshake_compose_ctrl(struct ldc_channel *lp,
351 u8 stype, u8 ctrl,
352 void *data, int dlen,
353 unsigned long *new_tail)
354{
355 struct ldc_packet *p = handshake_get_tx_packet(lp, new_tail);
356
357 if (p) {
358 memset(p, 0, sizeof(*p));
359 p->type = LDC_CTRL;
360 p->stype = stype;
361 p->ctrl = ctrl;
362 if (data)
363 memcpy(p->u.u_data, data, dlen);
364 }
365 return p;
366}
367
368static int start_handshake(struct ldc_channel *lp)
369{
370 struct ldc_packet *p;
371 struct ldc_version *ver;
372 unsigned long new_tail;
373
374 ver = &ver_arr[0];
375
376 ldcdbg(HS, "SEND VER INFO maj[%u] min[%u]\n",
377 ver->major, ver->minor);
378
379 p = handshake_compose_ctrl(lp, LDC_INFO, LDC_VERS,
380 ver, sizeof(*ver), &new_tail);
381 if (p) {
382 int err = send_tx_packet(lp, p, new_tail);
383 if (!err)
384 lp->flags &= ~LDC_FLAG_RESET;
385 return err;
386 }
387 return -EBUSY;
388}
389
390static int send_version_nack(struct ldc_channel *lp,
391 u16 major, u16 minor)
392{
393 struct ldc_packet *p;
394 struct ldc_version ver;
395 unsigned long new_tail;
396
397 ver.major = major;
398 ver.minor = minor;
399
400 p = handshake_compose_ctrl(lp, LDC_NACK, LDC_VERS,
401 &ver, sizeof(ver), &new_tail);
402 if (p) {
403 ldcdbg(HS, "SEND VER NACK maj[%u] min[%u]\n",
404 ver.major, ver.minor);
405
406 return send_tx_packet(lp, p, new_tail);
407 }
408 return -EBUSY;
409}
410
411static int send_version_ack(struct ldc_channel *lp,
412 struct ldc_version *vp)
413{
414 struct ldc_packet *p;
415 unsigned long new_tail;
416
417 p = handshake_compose_ctrl(lp, LDC_ACK, LDC_VERS,
418 vp, sizeof(*vp), &new_tail);
419 if (p) {
420 ldcdbg(HS, "SEND VER ACK maj[%u] min[%u]\n",
421 vp->major, vp->minor);
422
423 return send_tx_packet(lp, p, new_tail);
424 }
425 return -EBUSY;
426}
427
428static int send_rts(struct ldc_channel *lp)
429{
430 struct ldc_packet *p;
431 unsigned long new_tail;
432
433 p = handshake_compose_ctrl(lp, LDC_INFO, LDC_RTS, NULL, 0,
434 &new_tail);
435 if (p) {
436 p->env = lp->cfg.mode;
437 p->seqid = 0;
438 lp->rcv_nxt = 0;
439
440 ldcdbg(HS, "SEND RTS env[0x%x] seqid[0x%x]\n",
441 p->env, p->seqid);
442
443 return send_tx_packet(lp, p, new_tail);
444 }
445 return -EBUSY;
446}
447
448static int send_rtr(struct ldc_channel *lp)
449{
450 struct ldc_packet *p;
451 unsigned long new_tail;
452
453 p = handshake_compose_ctrl(lp, LDC_INFO, LDC_RTR, NULL, 0,
454 &new_tail);
455 if (p) {
456 p->env = lp->cfg.mode;
457 p->seqid = 0;
458
459 ldcdbg(HS, "SEND RTR env[0x%x] seqid[0x%x]\n",
460 p->env, p->seqid);
461
462 return send_tx_packet(lp, p, new_tail);
463 }
464 return -EBUSY;
465}
466
467static int send_rdx(struct ldc_channel *lp)
468{
469 struct ldc_packet *p;
470 unsigned long new_tail;
471
472 p = handshake_compose_ctrl(lp, LDC_INFO, LDC_RDX, NULL, 0,
473 &new_tail);
474 if (p) {
475 p->env = 0;
476 p->seqid = ++lp->snd_nxt;
477 p->u.r.ackid = lp->rcv_nxt;
478
479 ldcdbg(HS, "SEND RDX env[0x%x] seqid[0x%x] ackid[0x%x]\n",
480 p->env, p->seqid, p->u.r.ackid);
481
482 return send_tx_packet(lp, p, new_tail);
483 }
484 return -EBUSY;
485}
486
487static int send_data_nack(struct ldc_channel *lp, struct ldc_packet *data_pkt)
488{
489 struct ldc_packet *p;
490 unsigned long new_tail;
491 int err;
492
493 p = data_get_tx_packet(lp, &new_tail);
494 if (!p)
495 return -EBUSY;
496 memset(p, 0, sizeof(*p));
497 p->type = data_pkt->type;
498 p->stype = LDC_NACK;
499 p->ctrl = data_pkt->ctrl & LDC_CTRL_MSK;
500 p->seqid = lp->snd_nxt + 1;
501 p->u.r.ackid = lp->rcv_nxt;
502
503 ldcdbg(HS, "SEND DATA NACK type[0x%x] ctl[0x%x] seq[0x%x] ack[0x%x]\n",
504 p->type, p->ctrl, p->seqid, p->u.r.ackid);
505
506 err = send_tx_packet(lp, p, new_tail);
507 if (!err)
508 lp->snd_nxt++;
509
510 return err;
511}
512
513static int ldc_abort(struct ldc_channel *lp)
514{
515 unsigned long hv_err;
516
517 ldcdbg(STATE, "ABORT\n");
518
519 /* We report but do not act upon the hypervisor errors because
520 * there really isn't much we can do if they fail at this point.
521 */
522 hv_err = sun4v_ldc_tx_qconf(lp->id, lp->tx_ra, lp->tx_num_entries);
523 if (hv_err)
524 printk(KERN_ERR PFX "ldc_abort: "
525 "sun4v_ldc_tx_qconf(%lx,%lx,%lx) failed, err=%lu\n",
526 lp->id, lp->tx_ra, lp->tx_num_entries, hv_err);
527
528 hv_err = sun4v_ldc_tx_get_state(lp->id,
529 &lp->tx_head,
530 &lp->tx_tail,
531 &lp->chan_state);
532 if (hv_err)
533 printk(KERN_ERR PFX "ldc_abort: "
534 "sun4v_ldc_tx_get_state(%lx,...) failed, err=%lu\n",
535 lp->id, hv_err);
536
537 hv_err = sun4v_ldc_rx_qconf(lp->id, lp->rx_ra, lp->rx_num_entries);
538 if (hv_err)
539 printk(KERN_ERR PFX "ldc_abort: "
540 "sun4v_ldc_rx_qconf(%lx,%lx,%lx) failed, err=%lu\n",
541 lp->id, lp->rx_ra, lp->rx_num_entries, hv_err);
542
543 /* Refetch the RX queue state as well, because we could be invoked
544 * here in the queue processing context.
545 */
546 hv_err = sun4v_ldc_rx_get_state(lp->id,
547 &lp->rx_head,
548 &lp->rx_tail,
549 &lp->chan_state);
550 if (hv_err)
551 printk(KERN_ERR PFX "ldc_abort: "
552 "sun4v_ldc_rx_get_state(%lx,...) failed, err=%lu\n",
553 lp->id, hv_err);
554
555 return -ECONNRESET;
556}
557
558static struct ldc_version *find_by_major(u16 major)
559{
560 struct ldc_version *ret = NULL;
561 int i;
562
563 for (i = 0; i < ARRAY_SIZE(ver_arr); i++) {
564 struct ldc_version *v = &ver_arr[i];
565 if (v->major <= major) {
566 ret = v;
567 break;
568 }
569 }
570 return ret;
571}
572
573static int process_ver_info(struct ldc_channel *lp, struct ldc_version *vp)
574{
575 struct ldc_version *vap;
576 int err;
577
578 ldcdbg(HS, "GOT VERSION INFO major[%x] minor[%x]\n",
579 vp->major, vp->minor);
580
581 if (lp->hs_state == LDC_HS_GOTVERS) {
582 lp->hs_state = LDC_HS_OPEN;
583 memset(&lp->ver, 0, sizeof(lp->ver));
584 }
585
586 vap = find_by_major(vp->major);
587 if (!vap) {
588 err = send_version_nack(lp, 0, 0);
589 } else if (vap->major != vp->major) {
590 err = send_version_nack(lp, vap->major, vap->minor);
591 } else {
592 struct ldc_version ver = *vp;
593 if (ver.minor > vap->minor)
594 ver.minor = vap->minor;
595 err = send_version_ack(lp, &ver);
596 if (!err) {
597 lp->ver = ver;
598 lp->hs_state = LDC_HS_GOTVERS;
599 }
600 }
601 if (err)
602 return ldc_abort(lp);
603
604 return 0;
605}
606
607static int process_ver_ack(struct ldc_channel *lp, struct ldc_version *vp)
608{
609 ldcdbg(HS, "GOT VERSION ACK major[%x] minor[%x]\n",
610 vp->major, vp->minor);
611
612 if (lp->hs_state == LDC_HS_GOTVERS) {
613 if (lp->ver.major != vp->major ||
614 lp->ver.minor != vp->minor)
615 return ldc_abort(lp);
616 } else {
617 lp->ver = *vp;
618 lp->hs_state = LDC_HS_GOTVERS;
619 }
620 if (send_rts(lp))
621 return ldc_abort(lp);
622 return 0;
623}
624
625static int process_ver_nack(struct ldc_channel *lp, struct ldc_version *vp)
626{
627 struct ldc_version *vap;
628
629 if ((vp->major == 0 && vp->minor == 0) ||
630 !(vap = find_by_major(vp->major))) {
631 return ldc_abort(lp);
632 } else {
633 struct ldc_packet *p;
634 unsigned long new_tail;
635
636 p = handshake_compose_ctrl(lp, LDC_INFO, LDC_VERS,
637 vap, sizeof(*vap),
638 &new_tail);
639 if (p)
640 return send_tx_packet(lp, p, new_tail);
641 else
642 return ldc_abort(lp);
643 }
644}
645
646static int process_version(struct ldc_channel *lp,
647 struct ldc_packet *p)
648{
649 struct ldc_version *vp;
650
651 vp = (struct ldc_version *) p->u.u_data;
652
653 switch (p->stype) {
654 case LDC_INFO:
655 return process_ver_info(lp, vp);
656
657 case LDC_ACK:
658 return process_ver_ack(lp, vp);
659
660 case LDC_NACK:
661 return process_ver_nack(lp, vp);
662
663 default:
664 return ldc_abort(lp);
665 }
666}
667
668static int process_rts(struct ldc_channel *lp,
669 struct ldc_packet *p)
670{
671 ldcdbg(HS, "GOT RTS stype[%x] seqid[%x] env[%x]\n",
672 p->stype, p->seqid, p->env);
673
674 if (p->stype != LDC_INFO ||
675 lp->hs_state != LDC_HS_GOTVERS ||
676 p->env != lp->cfg.mode)
677 return ldc_abort(lp);
678
679 lp->snd_nxt = p->seqid;
680 lp->rcv_nxt = p->seqid;
681 lp->hs_state = LDC_HS_SENTRTR;
682 if (send_rtr(lp))
683 return ldc_abort(lp);
684
685 return 0;
686}
687
688static int process_rtr(struct ldc_channel *lp,
689 struct ldc_packet *p)
690{
691 ldcdbg(HS, "GOT RTR stype[%x] seqid[%x] env[%x]\n",
692 p->stype, p->seqid, p->env);
693
694 if (p->stype != LDC_INFO ||
695 p->env != lp->cfg.mode)
696 return ldc_abort(lp);
697
698 lp->snd_nxt = p->seqid;
699 lp->hs_state = LDC_HS_COMPLETE;
700 ldc_set_state(lp, LDC_STATE_CONNECTED);
701 send_rdx(lp);
702
703 return LDC_EVENT_UP;
704}
705
706static int rx_seq_ok(struct ldc_channel *lp, u32 seqid)
707{
708 return lp->rcv_nxt + 1 == seqid;
709}
710
711static int process_rdx(struct ldc_channel *lp,
712 struct ldc_packet *p)
713{
714 ldcdbg(HS, "GOT RDX stype[%x] seqid[%x] env[%x] ackid[%x]\n",
715 p->stype, p->seqid, p->env, p->u.r.ackid);
716
717 if (p->stype != LDC_INFO ||
718 !(rx_seq_ok(lp, p->seqid)))
719 return ldc_abort(lp);
720
721 lp->rcv_nxt = p->seqid;
722
723 lp->hs_state = LDC_HS_COMPLETE;
724 ldc_set_state(lp, LDC_STATE_CONNECTED);
725
726 return LDC_EVENT_UP;
727}
728
729static int process_control_frame(struct ldc_channel *lp,
730 struct ldc_packet *p)
731{
732 switch (p->ctrl) {
733 case LDC_VERS:
734 return process_version(lp, p);
735
736 case LDC_RTS:
737 return process_rts(lp, p);
738
739 case LDC_RTR:
740 return process_rtr(lp, p);
741
742 case LDC_RDX:
743 return process_rdx(lp, p);
744
745 default:
746 return ldc_abort(lp);
747 }
748}
749
750static int process_error_frame(struct ldc_channel *lp,
751 struct ldc_packet *p)
752{
753 return ldc_abort(lp);
754}
755
756static int process_data_ack(struct ldc_channel *lp,
757 struct ldc_packet *ack)
758{
759 unsigned long head = lp->tx_acked;
760 u32 ackid = ack->u.r.ackid;
761
762 while (1) {
763 struct ldc_packet *p = lp->tx_base + (head / LDC_PACKET_SIZE);
764
765 head = tx_advance(lp, head);
766
767 if (p->seqid == ackid) {
768 lp->tx_acked = head;
769 return 0;
770 }
771 if (head == lp->tx_tail)
772 return ldc_abort(lp);
773 }
774
775 return 0;
776}
777
778static void send_events(struct ldc_channel *lp, unsigned int event_mask)
779{
780 if (event_mask & LDC_EVENT_RESET)
781 lp->cfg.event(lp->event_arg, LDC_EVENT_RESET);
782 if (event_mask & LDC_EVENT_UP)
783 lp->cfg.event(lp->event_arg, LDC_EVENT_UP);
784 if (event_mask & LDC_EVENT_DATA_READY)
785 lp->cfg.event(lp->event_arg, LDC_EVENT_DATA_READY);
786}
787
788static irqreturn_t ldc_rx(int irq, void *dev_id)
789{
790 struct ldc_channel *lp = dev_id;
791 unsigned long orig_state, hv_err, flags;
792 unsigned int event_mask;
793
794 spin_lock_irqsave(&lp->lock, flags);
795
796 orig_state = lp->chan_state;
797 hv_err = sun4v_ldc_rx_get_state(lp->id,
798 &lp->rx_head,
799 &lp->rx_tail,
800 &lp->chan_state);
801
802 ldcdbg(RX, "RX state[0x%02lx:0x%02lx] head[0x%04lx] tail[0x%04lx]\n",
803 orig_state, lp->chan_state, lp->rx_head, lp->rx_tail);
804
805 event_mask = 0;
806
807 if (lp->cfg.mode == LDC_MODE_RAW &&
808 lp->chan_state == LDC_CHANNEL_UP) {
809 lp->hs_state = LDC_HS_COMPLETE;
810 ldc_set_state(lp, LDC_STATE_CONNECTED);
811
812 event_mask |= LDC_EVENT_UP;
813
814 orig_state = lp->chan_state;
815 }
816
817 /* If we are in reset state, flush the RX queue and ignore
818 * everything.
819 */
820 if (lp->flags & LDC_FLAG_RESET) {
821 (void) __set_rx_head(lp, lp->rx_tail);
822 goto out;
823 }
824
825 /* Once we finish the handshake, we let the ldc_read()
826 * paths do all of the control frame and state management.
827 * Just trigger the callback.
828 */
829 if (lp->hs_state == LDC_HS_COMPLETE) {
830handshake_complete:
831 if (lp->chan_state != orig_state) {
832 unsigned int event = LDC_EVENT_RESET;
833
834 if (lp->chan_state == LDC_CHANNEL_UP)
835 event = LDC_EVENT_UP;
836
837 event_mask |= event;
838 }
839 if (lp->rx_head != lp->rx_tail)
840 event_mask |= LDC_EVENT_DATA_READY;
841
842 goto out;
843 }
844
845 if (lp->chan_state != orig_state)
846 goto out;
847
848 while (lp->rx_head != lp->rx_tail) {
849 struct ldc_packet *p;
850 unsigned long new;
851 int err;
852
853 p = lp->rx_base + (lp->rx_head / LDC_PACKET_SIZE);
854
855 switch (p->type) {
856 case LDC_CTRL:
857 err = process_control_frame(lp, p);
858 if (err > 0)
859 event_mask |= err;
860 break;
861
862 case LDC_DATA:
863 event_mask |= LDC_EVENT_DATA_READY;
864 err = 0;
865 break;
866
867 case LDC_ERR:
868 err = process_error_frame(lp, p);
869 break;
870
871 default:
872 err = ldc_abort(lp);
873 break;
874 }
875
876 if (err < 0)
877 break;
878
879 new = lp->rx_head;
880 new += LDC_PACKET_SIZE;
881 if (new == (lp->rx_num_entries * LDC_PACKET_SIZE))
882 new = 0;
883 lp->rx_head = new;
884
885 err = __set_rx_head(lp, new);
886 if (err < 0) {
887 (void) ldc_abort(lp);
888 break;
889 }
890 if (lp->hs_state == LDC_HS_COMPLETE)
891 goto handshake_complete;
892 }
893
894out:
895 spin_unlock_irqrestore(&lp->lock, flags);
896
897 send_events(lp, event_mask);
898
899 return IRQ_HANDLED;
900}
901
902static irqreturn_t ldc_tx(int irq, void *dev_id)
903{
904 struct ldc_channel *lp = dev_id;
905 unsigned long flags, hv_err, orig_state;
906 unsigned int event_mask = 0;
907
908 spin_lock_irqsave(&lp->lock, flags);
909
910 orig_state = lp->chan_state;
911 hv_err = sun4v_ldc_tx_get_state(lp->id,
912 &lp->tx_head,
913 &lp->tx_tail,
914 &lp->chan_state);
915
916 ldcdbg(TX, " TX state[0x%02lx:0x%02lx] head[0x%04lx] tail[0x%04lx]\n",
917 orig_state, lp->chan_state, lp->tx_head, lp->tx_tail);
918
919 if (lp->cfg.mode == LDC_MODE_RAW &&
920 lp->chan_state == LDC_CHANNEL_UP) {
921 lp->hs_state = LDC_HS_COMPLETE;
922 ldc_set_state(lp, LDC_STATE_CONNECTED);
923
924 event_mask |= LDC_EVENT_UP;
925 }
926
927 spin_unlock_irqrestore(&lp->lock, flags);
928
929 send_events(lp, event_mask);
930
931 return IRQ_HANDLED;
932}
933
934/* XXX ldc_alloc() and ldc_free() needs to run under a mutex so
935 * XXX that addition and removal from the ldc_channel_list has
936 * XXX atomicity, otherwise the __ldc_channel_exists() check is
937 * XXX totally pointless as another thread can slip into ldc_alloc()
938 * XXX and add a channel with the same ID. There also needs to be
939 * XXX a spinlock for ldc_channel_list.
940 */
941static HLIST_HEAD(ldc_channel_list);
942
943static int __ldc_channel_exists(unsigned long id)
944{
945 struct ldc_channel *lp;
946 struct hlist_node *n;
947
948 hlist_for_each_entry(lp, n, &ldc_channel_list, list) {
949 if (lp->id == id)
950 return 1;
951 }
952 return 0;
953}
954
955static int alloc_queue(const char *name, unsigned long num_entries,
956 struct ldc_packet **base, unsigned long *ra)
957{
958 unsigned long size, order;
959 void *q;
960
961 size = num_entries * LDC_PACKET_SIZE;
962 order = get_order(size);
963
964 q = (void *) __get_free_pages(GFP_KERNEL, order);
965 if (!q) {
966 printk(KERN_ERR PFX "Alloc of %s queue failed with "
967 "size=%lu order=%lu\n", name, size, order);
968 return -ENOMEM;
969 }
970
971 memset(q, 0, PAGE_SIZE << order);
972
973 *base = q;
974 *ra = __pa(q);
975
976 return 0;
977}
978
979static void free_queue(unsigned long num_entries, struct ldc_packet *q)
980{
981 unsigned long size, order;
982
983 if (!q)
984 return;
985
986 size = num_entries * LDC_PACKET_SIZE;
987 order = get_order(size);
988
989 free_pages((unsigned long)q, order);
990}
991
992/* XXX Make this configurable... XXX */
993#define LDC_IOTABLE_SIZE (8 * 1024)
994
995static int ldc_iommu_init(struct ldc_channel *lp)
996{
997 unsigned long sz, num_tsb_entries, tsbsize, order;
998 struct ldc_iommu *iommu = &lp->iommu;
999 struct ldc_mtable_entry *table;
1000 unsigned long hv_err;
1001 int err;
1002
1003 num_tsb_entries = LDC_IOTABLE_SIZE;
1004 tsbsize = num_tsb_entries * sizeof(struct ldc_mtable_entry);
1005
1006 spin_lock_init(&iommu->lock);
1007
1008 sz = num_tsb_entries / 8;
1009 sz = (sz + 7UL) & ~7UL;
1010 iommu->arena.map = kzalloc(sz, GFP_KERNEL);
1011 if (!iommu->arena.map) {
1012 printk(KERN_ERR PFX "Alloc of arena map failed, sz=%lu\n", sz);
1013 return -ENOMEM;
1014 }
1015
1016 iommu->arena.limit = num_tsb_entries;
1017
1018 order = get_order(tsbsize);
1019
1020 table = (struct ldc_mtable_entry *)
1021 __get_free_pages(GFP_KERNEL, order);
1022 err = -ENOMEM;
1023 if (!table) {
1024 printk(KERN_ERR PFX "Alloc of MTE table failed, "
1025 "size=%lu order=%lu\n", tsbsize, order);
1026 goto out_free_map;
1027 }
1028
1029 memset(table, 0, PAGE_SIZE << order);
1030
1031 iommu->page_table = table;
1032
1033 hv_err = sun4v_ldc_set_map_table(lp->id, __pa(table),
1034 num_tsb_entries);
1035 err = -EINVAL;
1036 if (hv_err)
1037 goto out_free_table;
1038
1039 return 0;
1040
1041out_free_table:
1042 free_pages((unsigned long) table, order);
1043 iommu->page_table = NULL;
1044
1045out_free_map:
1046 kfree(iommu->arena.map);
1047 iommu->arena.map = NULL;
1048
1049 return err;
1050}
1051
1052static void ldc_iommu_release(struct ldc_channel *lp)
1053{
1054 struct ldc_iommu *iommu = &lp->iommu;
1055 unsigned long num_tsb_entries, tsbsize, order;
1056
1057 (void) sun4v_ldc_set_map_table(lp->id, 0, 0);
1058
1059 num_tsb_entries = iommu->arena.limit;
1060 tsbsize = num_tsb_entries * sizeof(struct ldc_mtable_entry);
1061 order = get_order(tsbsize);
1062
1063 free_pages((unsigned long) iommu->page_table, order);
1064 iommu->page_table = NULL;
1065
1066 kfree(iommu->arena.map);
1067 iommu->arena.map = NULL;
1068}
1069
1070struct ldc_channel *ldc_alloc(unsigned long id,
1071 const struct ldc_channel_config *cfgp,
1072 void *event_arg)
1073{
1074 struct ldc_channel *lp;
1075 const struct ldc_mode_ops *mops;
1076 unsigned long dummy1, dummy2, hv_err;
1077 u8 mss, *mssbuf;
1078 int err;
1079
1080 err = -ENODEV;
1081 if (!ldom_domaining_enabled)
1082 goto out_err;
1083
1084 err = -EINVAL;
1085 if (!cfgp)
1086 goto out_err;
1087
1088 switch (cfgp->mode) {
1089 case LDC_MODE_RAW:
1090 mops = &raw_ops;
1091 mss = LDC_PACKET_SIZE;
1092 break;
1093
1094 case LDC_MODE_UNRELIABLE:
1095 mops = &nonraw_ops;
1096 mss = LDC_PACKET_SIZE - 8;
1097 break;
1098
1099 case LDC_MODE_STREAM:
1100 mops = &stream_ops;
1101 mss = LDC_PACKET_SIZE - 8 - 8;
1102 break;
1103
1104 default:
1105 goto out_err;
1106 }
1107
1108 if (!cfgp->event || !event_arg || !cfgp->rx_irq || !cfgp->tx_irq)
1109 goto out_err;
1110
1111 hv_err = sun4v_ldc_tx_qinfo(id, &dummy1, &dummy2);
1112 err = -ENODEV;
1113 if (hv_err == HV_ECHANNEL)
1114 goto out_err;
1115
1116 err = -EEXIST;
1117 if (__ldc_channel_exists(id))
1118 goto out_err;
1119
1120 mssbuf = NULL;
1121
1122 lp = kzalloc(sizeof(*lp), GFP_KERNEL);
1123 err = -ENOMEM;
1124 if (!lp)
1125 goto out_err;
1126
1127 spin_lock_init(&lp->lock);
1128
1129 lp->id = id;
1130
1131 err = ldc_iommu_init(lp);
1132 if (err)
1133 goto out_free_ldc;
1134
1135 lp->mops = mops;
1136 lp->mss = mss;
1137
1138 lp->cfg = *cfgp;
1139 if (!lp->cfg.mtu)
1140 lp->cfg.mtu = LDC_DEFAULT_MTU;
1141
1142 if (lp->cfg.mode == LDC_MODE_STREAM) {
1143 mssbuf = kzalloc(lp->cfg.mtu, GFP_KERNEL);
1144 if (!mssbuf) {
1145 err = -ENOMEM;
1146 goto out_free_iommu;
1147 }
1148 lp->mssbuf = mssbuf;
1149 }
1150
1151 lp->event_arg = event_arg;
1152
1153 /* XXX allow setting via ldc_channel_config to override defaults
1154 * XXX or use some formula based upon mtu
1155 */
1156 lp->tx_num_entries = LDC_DEFAULT_NUM_ENTRIES;
1157 lp->rx_num_entries = LDC_DEFAULT_NUM_ENTRIES;
1158
1159 err = alloc_queue("TX", lp->tx_num_entries,
1160 &lp->tx_base, &lp->tx_ra);
1161 if (err)
1162 goto out_free_mssbuf;
1163
1164 err = alloc_queue("RX", lp->rx_num_entries,
1165 &lp->rx_base, &lp->rx_ra);
1166 if (err)
1167 goto out_free_txq;
1168
1169 lp->flags |= LDC_FLAG_ALLOCED_QUEUES;
1170
1171 lp->hs_state = LDC_HS_CLOSED;
1172 ldc_set_state(lp, LDC_STATE_INIT);
1173
1174 INIT_HLIST_NODE(&lp->list);
1175 hlist_add_head(&lp->list, &ldc_channel_list);
1176
1177 INIT_HLIST_HEAD(&lp->mh_list);
1178
1179 return lp;
1180
1181out_free_txq:
1182 free_queue(lp->tx_num_entries, lp->tx_base);
1183
1184out_free_mssbuf:
1185 if (mssbuf)
1186 kfree(mssbuf);
1187
1188out_free_iommu:
1189 ldc_iommu_release(lp);
1190
1191out_free_ldc:
1192 kfree(lp);
1193
1194out_err:
1195 return ERR_PTR(err);
1196}
1197EXPORT_SYMBOL(ldc_alloc);
1198
1199void ldc_free(struct ldc_channel *lp)
1200{
1201 if (lp->flags & LDC_FLAG_REGISTERED_IRQS) {
1202 free_irq(lp->cfg.rx_irq, lp);
1203 free_irq(lp->cfg.tx_irq, lp);
1204 }
1205
1206 if (lp->flags & LDC_FLAG_REGISTERED_QUEUES) {
1207 sun4v_ldc_tx_qconf(lp->id, 0, 0);
1208 sun4v_ldc_rx_qconf(lp->id, 0, 0);
1209 lp->flags &= ~LDC_FLAG_REGISTERED_QUEUES;
1210 }
1211 if (lp->flags & LDC_FLAG_ALLOCED_QUEUES) {
1212 free_queue(lp->tx_num_entries, lp->tx_base);
1213 free_queue(lp->rx_num_entries, lp->rx_base);
1214 lp->flags &= ~LDC_FLAG_ALLOCED_QUEUES;
1215 }
1216
1217 hlist_del(&lp->list);
1218
1219 if (lp->mssbuf)
1220 kfree(lp->mssbuf);
1221
1222 ldc_iommu_release(lp);
1223
1224 kfree(lp);
1225}
1226EXPORT_SYMBOL(ldc_free);
1227
1228/* Bind the channel. This registers the LDC queues with
1229 * the hypervisor and puts the channel into a pseudo-listening
1230 * state. This does not initiate a handshake, ldc_connect() does
1231 * that.
1232 */
1233int ldc_bind(struct ldc_channel *lp, const char *name)
1234{
1235 unsigned long hv_err, flags;
1236 int err = -EINVAL;
1237
1238 spin_lock_irqsave(&lp->lock, flags);
1239
1240 if (!name)
1241 goto out_err;
1242
1243 if (lp->state != LDC_STATE_INIT)
1244 goto out_err;
1245
1246 snprintf(lp->rx_irq_name, LDC_IRQ_NAME_MAX, "%s RX", name);
1247 snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name);
1248
1249 err = request_irq(lp->cfg.rx_irq, ldc_rx,
1250 IRQF_SAMPLE_RANDOM | IRQF_SHARED,
1251 lp->rx_irq_name, lp);
1252 if (err)
1253 goto out_err;
1254
1255 err = request_irq(lp->cfg.tx_irq, ldc_tx,
1256 IRQF_SAMPLE_RANDOM | IRQF_SHARED,
1257 lp->tx_irq_name, lp);
1258 if (err)
1259 goto out_free_rx_irq;
1260
1261
1262 lp->flags |= LDC_FLAG_REGISTERED_IRQS;
1263
1264 err = -ENODEV;
1265 hv_err = sun4v_ldc_tx_qconf(lp->id, 0, 0);
1266 if (hv_err)
1267 goto out_free_tx_irq;
1268
1269 hv_err = sun4v_ldc_tx_qconf(lp->id, lp->tx_ra, lp->tx_num_entries);
1270 if (hv_err)
1271 goto out_free_tx_irq;
1272
1273 hv_err = sun4v_ldc_rx_qconf(lp->id, 0, 0);
1274 if (hv_err)
1275 goto out_unmap_tx;
1276
1277 hv_err = sun4v_ldc_rx_qconf(lp->id, lp->rx_ra, lp->rx_num_entries);
1278 if (hv_err)
1279 goto out_unmap_tx;
1280
1281 lp->flags |= LDC_FLAG_REGISTERED_QUEUES;
1282
1283 hv_err = sun4v_ldc_tx_get_state(lp->id,
1284 &lp->tx_head,
1285 &lp->tx_tail,
1286 &lp->chan_state);
1287 err = -EBUSY;
1288 if (hv_err)
1289 goto out_unmap_rx;
1290
1291 lp->tx_acked = lp->tx_head;
1292
1293 lp->hs_state = LDC_HS_OPEN;
1294 ldc_set_state(lp, LDC_STATE_BOUND);
1295
1296 spin_unlock_irqrestore(&lp->lock, flags);
1297
1298 return 0;
1299
1300out_unmap_rx:
1301 lp->flags &= ~LDC_FLAG_REGISTERED_QUEUES;
1302 sun4v_ldc_rx_qconf(lp->id, 0, 0);
1303
1304out_unmap_tx:
1305 sun4v_ldc_tx_qconf(lp->id, 0, 0);
1306
1307out_free_tx_irq:
1308 lp->flags &= ~LDC_FLAG_REGISTERED_IRQS;
1309 free_irq(lp->cfg.tx_irq, lp);
1310
1311out_free_rx_irq:
1312 free_irq(lp->cfg.rx_irq, lp);
1313
1314out_err:
1315 spin_unlock_irqrestore(&lp->lock, flags);
1316
1317 return err;
1318}
1319EXPORT_SYMBOL(ldc_bind);
1320
1321int ldc_connect(struct ldc_channel *lp)
1322{
1323 unsigned long flags;
1324 int err;
1325
1326 if (lp->cfg.mode == LDC_MODE_RAW)
1327 return -EINVAL;
1328
1329 spin_lock_irqsave(&lp->lock, flags);
1330
1331 if (!(lp->flags & LDC_FLAG_ALLOCED_QUEUES) ||
1332 !(lp->flags & LDC_FLAG_REGISTERED_QUEUES) ||
1333 lp->hs_state != LDC_HS_OPEN)
1334 err = -EINVAL;
1335 else
1336 err = start_handshake(lp);
1337
1338 spin_unlock_irqrestore(&lp->lock, flags);
1339
1340 return err;
1341}
1342EXPORT_SYMBOL(ldc_connect);
1343
1344int ldc_disconnect(struct ldc_channel *lp)
1345{
1346 unsigned long hv_err, flags;
1347 int err;
1348
1349 if (lp->cfg.mode == LDC_MODE_RAW)
1350 return -EINVAL;
1351
1352 if (!(lp->flags & LDC_FLAG_ALLOCED_QUEUES) ||
1353 !(lp->flags & LDC_FLAG_REGISTERED_QUEUES))
1354 return -EINVAL;
1355
1356 spin_lock_irqsave(&lp->lock, flags);
1357
1358 err = -ENODEV;
1359 hv_err = sun4v_ldc_tx_qconf(lp->id, 0, 0);
1360 if (hv_err)
1361 goto out_err;
1362
1363 hv_err = sun4v_ldc_tx_qconf(lp->id, lp->tx_ra, lp->tx_num_entries);
1364 if (hv_err)
1365 goto out_err;
1366
1367 hv_err = sun4v_ldc_rx_qconf(lp->id, 0, 0);
1368 if (hv_err)
1369 goto out_err;
1370
1371 hv_err = sun4v_ldc_rx_qconf(lp->id, lp->rx_ra, lp->rx_num_entries);
1372 if (hv_err)
1373 goto out_err;
1374
1375 ldc_set_state(lp, LDC_STATE_BOUND);
1376 lp->hs_state = LDC_HS_OPEN;
1377 lp->flags |= LDC_FLAG_RESET;
1378
1379 spin_unlock_irqrestore(&lp->lock, flags);
1380
1381 return 0;
1382
1383out_err:
1384 sun4v_ldc_tx_qconf(lp->id, 0, 0);
1385 sun4v_ldc_rx_qconf(lp->id, 0, 0);
1386 free_irq(lp->cfg.tx_irq, lp);
1387 free_irq(lp->cfg.rx_irq, lp);
1388 lp->flags &= ~(LDC_FLAG_REGISTERED_IRQS |
1389 LDC_FLAG_REGISTERED_QUEUES);
1390 ldc_set_state(lp, LDC_STATE_INIT);
1391
1392 spin_unlock_irqrestore(&lp->lock, flags);
1393
1394 return err;
1395}
1396EXPORT_SYMBOL(ldc_disconnect);
1397
1398int ldc_state(struct ldc_channel *lp)
1399{
1400 return lp->state;
1401}
1402EXPORT_SYMBOL(ldc_state);
1403
1404static int write_raw(struct ldc_channel *lp, const void *buf, unsigned int size)
1405{
1406 struct ldc_packet *p;
1407 unsigned long new_tail;
1408 int err;
1409
1410 if (size > LDC_PACKET_SIZE)
1411 return -EMSGSIZE;
1412
1413 p = data_get_tx_packet(lp, &new_tail);
1414 if (!p)
1415 return -EAGAIN;
1416
1417 memcpy(p, buf, size);
1418
1419 err = send_tx_packet(lp, p, new_tail);
1420 if (!err)
1421 err = size;
1422
1423 return err;
1424}
1425
1426static int read_raw(struct ldc_channel *lp, void *buf, unsigned int size)
1427{
1428 struct ldc_packet *p;
1429 unsigned long hv_err, new;
1430 int err;
1431
1432 if (size < LDC_PACKET_SIZE)
1433 return -EINVAL;
1434
1435 hv_err = sun4v_ldc_rx_get_state(lp->id,
1436 &lp->rx_head,
1437 &lp->rx_tail,
1438 &lp->chan_state);
1439 if (hv_err)
1440 return ldc_abort(lp);
1441
1442 if (lp->chan_state == LDC_CHANNEL_DOWN ||
1443 lp->chan_state == LDC_CHANNEL_RESETTING)
1444 return -ECONNRESET;
1445
1446 if (lp->rx_head == lp->rx_tail)
1447 return 0;
1448
1449 p = lp->rx_base + (lp->rx_head / LDC_PACKET_SIZE);
1450 memcpy(buf, p, LDC_PACKET_SIZE);
1451
1452 new = rx_advance(lp, lp->rx_head);
1453 lp->rx_head = new;
1454
1455 err = __set_rx_head(lp, new);
1456 if (err < 0)
1457 err = -ECONNRESET;
1458 else
1459 err = LDC_PACKET_SIZE;
1460
1461 return err;
1462}
1463
1464static const struct ldc_mode_ops raw_ops = {
1465 .write = write_raw,
1466 .read = read_raw,
1467};
1468
1469static int write_nonraw(struct ldc_channel *lp, const void *buf,
1470 unsigned int size)
1471{
1472 unsigned long hv_err, tail;
1473 unsigned int copied;
1474 u32 seq;
1475 int err;
1476
1477 hv_err = sun4v_ldc_tx_get_state(lp->id, &lp->tx_head, &lp->tx_tail,
1478 &lp->chan_state);
1479 if (unlikely(hv_err))
1480 return -EBUSY;
1481
1482 if (unlikely(lp->chan_state != LDC_CHANNEL_UP))
1483 return ldc_abort(lp);
1484
1485 if (!tx_has_space_for(lp, size))
1486 return -EAGAIN;
1487
1488 seq = lp->snd_nxt;
1489 copied = 0;
1490 tail = lp->tx_tail;
1491 while (copied < size) {
1492 struct ldc_packet *p = lp->tx_base + (tail / LDC_PACKET_SIZE);
1493 u8 *data = ((lp->cfg.mode == LDC_MODE_UNRELIABLE) ?
1494 p->u.u_data :
1495 p->u.r.r_data);
1496 int data_len;
1497
1498 p->type = LDC_DATA;
1499 p->stype = LDC_INFO;
1500 p->ctrl = 0;
1501
1502 data_len = size - copied;
1503 if (data_len > lp->mss)
1504 data_len = lp->mss;
1505
1506 BUG_ON(data_len > LDC_LEN);
1507
1508 p->env = (data_len |
1509 (copied == 0 ? LDC_START : 0) |
1510 (data_len == size - copied ? LDC_STOP : 0));
1511
1512 p->seqid = ++seq;
1513
1514 ldcdbg(DATA, "SENT DATA [%02x:%02x:%02x:%02x:%08x]\n",
1515 p->type,
1516 p->stype,
1517 p->ctrl,
1518 p->env,
1519 p->seqid);
1520
1521 memcpy(data, buf, data_len);
1522 buf += data_len;
1523 copied += data_len;
1524
1525 tail = tx_advance(lp, tail);
1526 }
1527
1528 err = set_tx_tail(lp, tail);
1529 if (!err) {
1530 lp->snd_nxt = seq;
1531 err = size;
1532 }
1533
1534 return err;
1535}
1536
1537static int rx_bad_seq(struct ldc_channel *lp, struct ldc_packet *p,
1538 struct ldc_packet *first_frag)
1539{
1540 int err;
1541
1542 if (first_frag)
1543 lp->rcv_nxt = first_frag->seqid - 1;
1544
1545 err = send_data_nack(lp, p);
1546 if (err)
1547 return err;
1548
1549 err = __set_rx_head(lp, lp->rx_tail);
1550 if (err < 0)
1551 return ldc_abort(lp);
1552
1553 return 0;
1554}
1555
1556static int data_ack_nack(struct ldc_channel *lp, struct ldc_packet *p)
1557{
1558 if (p->stype & LDC_ACK) {
1559 int err = process_data_ack(lp, p);
1560 if (err)
1561 return err;
1562 }
1563 if (p->stype & LDC_NACK)
1564 return ldc_abort(lp);
1565
1566 return 0;
1567}
1568
1569static int rx_data_wait(struct ldc_channel *lp, unsigned long cur_head)
1570{
1571 unsigned long dummy;
1572 int limit = 1000;
1573
1574 ldcdbg(DATA, "DATA WAIT cur_head[%lx] rx_head[%lx] rx_tail[%lx]\n",
1575 cur_head, lp->rx_head, lp->rx_tail);
1576 while (limit-- > 0) {
1577 unsigned long hv_err;
1578
1579 hv_err = sun4v_ldc_rx_get_state(lp->id,
1580 &dummy,
1581 &lp->rx_tail,
1582 &lp->chan_state);
1583 if (hv_err)
1584 return ldc_abort(lp);
1585
1586 if (lp->chan_state == LDC_CHANNEL_DOWN ||
1587 lp->chan_state == LDC_CHANNEL_RESETTING)
1588 return -ECONNRESET;
1589
1590 if (cur_head != lp->rx_tail) {
1591 ldcdbg(DATA, "DATA WAIT DONE "
1592 "head[%lx] tail[%lx] chan_state[%lx]\n",
1593 dummy, lp->rx_tail, lp->chan_state);
1594 return 0;
1595 }
1596
1597 udelay(1);
1598 }
1599 return -EAGAIN;
1600}
1601
1602static int rx_set_head(struct ldc_channel *lp, unsigned long head)
1603{
1604 int err = __set_rx_head(lp, head);
1605
1606 if (err < 0)
1607 return ldc_abort(lp);
1608
1609 lp->rx_head = head;
1610 return 0;
1611}
1612
1613static void send_data_ack(struct ldc_channel *lp)
1614{
1615 unsigned long new_tail;
1616 struct ldc_packet *p;
1617
1618 p = data_get_tx_packet(lp, &new_tail);
1619 if (likely(p)) {
1620 int err;
1621
1622 memset(p, 0, sizeof(*p));
1623 p->type = LDC_DATA;
1624 p->stype = LDC_ACK;
1625 p->ctrl = 0;
1626 p->seqid = lp->snd_nxt + 1;
1627 p->u.r.ackid = lp->rcv_nxt;
1628
1629 err = send_tx_packet(lp, p, new_tail);
1630 if (!err)
1631 lp->snd_nxt++;
1632 }
1633}
1634
1635static int read_nonraw(struct ldc_channel *lp, void *buf, unsigned int size)
1636{
1637 struct ldc_packet *first_frag;
1638 unsigned long hv_err, new;
1639 int err, copied;
1640
1641 hv_err = sun4v_ldc_rx_get_state(lp->id,
1642 &lp->rx_head,
1643 &lp->rx_tail,
1644 &lp->chan_state);
1645 if (hv_err)
1646 return ldc_abort(lp);
1647
1648 if (lp->chan_state == LDC_CHANNEL_DOWN ||
1649 lp->chan_state == LDC_CHANNEL_RESETTING)
1650 return -ECONNRESET;
1651
1652 if (lp->rx_head == lp->rx_tail)
1653 return 0;
1654
1655 first_frag = NULL;
1656 copied = err = 0;
1657 new = lp->rx_head;
1658 while (1) {
1659 struct ldc_packet *p;
1660 int pkt_len;
1661
1662 BUG_ON(new == lp->rx_tail);
1663 p = lp->rx_base + (new / LDC_PACKET_SIZE);
1664
1665 ldcdbg(RX, "RX read pkt[%02x:%02x:%02x:%02x:%08x:%08x] "
1666 "rcv_nxt[%08x]\n",
1667 p->type,
1668 p->stype,
1669 p->ctrl,
1670 p->env,
1671 p->seqid,
1672 p->u.r.ackid,
1673 lp->rcv_nxt);
1674
1675 if (unlikely(!rx_seq_ok(lp, p->seqid))) {
1676 err = rx_bad_seq(lp, p, first_frag);
1677 copied = 0;
1678 break;
1679 }
1680
1681 if (p->type & LDC_CTRL) {
1682 err = process_control_frame(lp, p);
1683 if (err < 0)
1684 break;
1685 err = 0;
1686 }
1687
1688 lp->rcv_nxt = p->seqid;
1689
1690 if (!(p->type & LDC_DATA)) {
1691 new = rx_advance(lp, new);
1692 goto no_data;
1693 }
1694 if (p->stype & (LDC_ACK | LDC_NACK)) {
1695 err = data_ack_nack(lp, p);
1696 if (err)
1697 break;
1698 }
1699 if (!(p->stype & LDC_INFO)) {
1700 new = rx_advance(lp, new);
1701 err = rx_set_head(lp, new);
1702 if (err)
1703 break;
1704 goto no_data;
1705 }
1706
1707 pkt_len = p->env & LDC_LEN;
1708
1709 /* Every initial packet starts with the START bit set.
1710 *
1711 * Singleton packets will have both START+STOP set.
1712 *
1713 * Fragments will have START set in the first frame, STOP
1714 * set in the last frame, and neither bit set in middle
1715 * frames of the packet.
1716 *
1717 * Therefore if we are at the beginning of a packet and
1718 * we don't see START, or we are in the middle of a fragmented
1719 * packet and do see START, we are unsynchronized and should
1720 * flush the RX queue.
1721 */
1722 if ((first_frag == NULL && !(p->env & LDC_START)) ||
1723 (first_frag != NULL && (p->env & LDC_START))) {
1724 if (!first_frag)
1725 new = rx_advance(lp, new);
1726
1727 err = rx_set_head(lp, new);
1728 if (err)
1729 break;
1730
1731 if (!first_frag)
1732 goto no_data;
1733 }
1734 if (!first_frag)
1735 first_frag = p;
1736
1737 if (pkt_len > size - copied) {
1738 /* User didn't give us a big enough buffer,
1739 * what to do? This is a pretty serious error.
1740 *
1741 * Since we haven't updated the RX ring head to
1742 * consume any of the packets, signal the error
1743 * to the user and just leave the RX ring alone.
1744 *
1745 * This seems the best behavior because this allows
1746 * a user of the LDC layer to start with a small
1747 * RX buffer for ldc_read() calls and use -EMSGSIZE
1748 * as a cue to enlarge it's read buffer.
1749 */
1750 err = -EMSGSIZE;
1751 break;
1752 }
1753
1754 /* Ok, we are gonna eat this one. */
1755 new = rx_advance(lp, new);
1756
1757 memcpy(buf,
1758 (lp->cfg.mode == LDC_MODE_UNRELIABLE ?
1759 p->u.u_data : p->u.r.r_data), pkt_len);
1760 buf += pkt_len;
1761 copied += pkt_len;
1762
1763 if (p->env & LDC_STOP)
1764 break;
1765
1766no_data:
1767 if (new == lp->rx_tail) {
1768 err = rx_data_wait(lp, new);
1769 if (err)
1770 break;
1771 }
1772 }
1773
1774 if (!err)
1775 err = rx_set_head(lp, new);
1776
1777 if (err && first_frag)
1778 lp->rcv_nxt = first_frag->seqid - 1;
1779
1780 if (!err) {
1781 err = copied;
1782 if (err > 0 && lp->cfg.mode != LDC_MODE_UNRELIABLE)
1783 send_data_ack(lp);
1784 }
1785
1786 return err;
1787}
1788
1789static const struct ldc_mode_ops nonraw_ops = {
1790 .write = write_nonraw,
1791 .read = read_nonraw,
1792};
1793
1794static int write_stream(struct ldc_channel *lp, const void *buf,
1795 unsigned int size)
1796{
1797 if (size > lp->cfg.mtu)
1798 size = lp->cfg.mtu;
1799 return write_nonraw(lp, buf, size);
1800}
1801
1802static int read_stream(struct ldc_channel *lp, void *buf, unsigned int size)
1803{
1804 if (!lp->mssbuf_len) {
1805 int err = read_nonraw(lp, lp->mssbuf, lp->cfg.mtu);
1806 if (err < 0)
1807 return err;
1808
1809 lp->mssbuf_len = err;
1810 lp->mssbuf_off = 0;
1811 }
1812
1813 if (size > lp->mssbuf_len)
1814 size = lp->mssbuf_len;
1815 memcpy(buf, lp->mssbuf + lp->mssbuf_off, size);
1816
1817 lp->mssbuf_off += size;
1818 lp->mssbuf_len -= size;
1819
1820 return size;
1821}
1822
1823static const struct ldc_mode_ops stream_ops = {
1824 .write = write_stream,
1825 .read = read_stream,
1826};
1827
1828int ldc_write(struct ldc_channel *lp, const void *buf, unsigned int size)
1829{
1830 unsigned long flags;
1831 int err;
1832
1833 if (!buf)
1834 return -EINVAL;
1835
1836 if (!size)
1837 return 0;
1838
1839 spin_lock_irqsave(&lp->lock, flags);
1840
1841 if (lp->hs_state != LDC_HS_COMPLETE)
1842 err = -ENOTCONN;
1843 else
1844 err = lp->mops->write(lp, buf, size);
1845
1846 spin_unlock_irqrestore(&lp->lock, flags);
1847
1848 return err;
1849}
1850EXPORT_SYMBOL(ldc_write);
1851
1852int ldc_read(struct ldc_channel *lp, void *buf, unsigned int size)
1853{
1854 unsigned long flags;
1855 int err;
1856
1857 if (!buf)
1858 return -EINVAL;
1859
1860 if (!size)
1861 return 0;
1862
1863 spin_lock_irqsave(&lp->lock, flags);
1864
1865 if (lp->hs_state != LDC_HS_COMPLETE)
1866 err = -ENOTCONN;
1867 else
1868 err = lp->mops->read(lp, buf, size);
1869
1870 spin_unlock_irqrestore(&lp->lock, flags);
1871
1872 return err;
1873}
1874EXPORT_SYMBOL(ldc_read);
1875
1876static long arena_alloc(struct ldc_iommu *iommu, unsigned long npages)
1877{
1878 struct iommu_arena *arena = &iommu->arena;
1879 unsigned long n, i, start, end, limit;
1880 int pass;
1881
1882 limit = arena->limit;
1883 start = arena->hint;
1884 pass = 0;
1885
1886again:
1887 n = find_next_zero_bit(arena->map, limit, start);
1888 end = n + npages;
1889 if (unlikely(end >= limit)) {
1890 if (likely(pass < 1)) {
1891 limit = start;
1892 start = 0;
1893 pass++;
1894 goto again;
1895 } else {
1896 /* Scanned the whole thing, give up. */
1897 return -1;
1898 }
1899 }
1900
1901 for (i = n; i < end; i++) {
1902 if (test_bit(i, arena->map)) {
1903 start = i + 1;
1904 goto again;
1905 }
1906 }
1907
1908 for (i = n; i < end; i++)
1909 __set_bit(i, arena->map);
1910
1911 arena->hint = end;
1912
1913 return n;
1914}
1915
1916#define COOKIE_PGSZ_CODE 0xf000000000000000ULL
1917#define COOKIE_PGSZ_CODE_SHIFT 60ULL
1918
1919static u64 pagesize_code(void)
1920{
1921 switch (PAGE_SIZE) {
1922 default:
1923 case (8ULL * 1024ULL):
1924 return 0;
1925 case (64ULL * 1024ULL):
1926 return 1;
1927 case (512ULL * 1024ULL):
1928 return 2;
1929 case (4ULL * 1024ULL * 1024ULL):
1930 return 3;
1931 case (32ULL * 1024ULL * 1024ULL):
1932 return 4;
1933 case (256ULL * 1024ULL * 1024ULL):
1934 return 5;
1935 }
1936}
1937
1938static u64 make_cookie(u64 index, u64 pgsz_code, u64 page_offset)
1939{
1940 return ((pgsz_code << COOKIE_PGSZ_CODE_SHIFT) |
1941 (index << PAGE_SHIFT) |
1942 page_offset);
1943}
1944
1945static u64 cookie_to_index(u64 cookie, unsigned long *shift)
1946{
1947 u64 szcode = cookie >> COOKIE_PGSZ_CODE_SHIFT;
1948
1949 cookie &= ~COOKIE_PGSZ_CODE;
1950
1951 *shift = szcode * 3;
1952
1953 return (cookie >> (13ULL + (szcode * 3ULL)));
1954}
1955
1956static struct ldc_mtable_entry *alloc_npages(struct ldc_iommu *iommu,
1957 unsigned long npages)
1958{
1959 long entry;
1960
1961 entry = arena_alloc(iommu, npages);
1962 if (unlikely(entry < 0))
1963 return NULL;
1964
1965 return iommu->page_table + entry;
1966}
1967
1968static u64 perm_to_mte(unsigned int map_perm)
1969{
1970 u64 mte_base;
1971
1972 mte_base = pagesize_code();
1973
1974 if (map_perm & LDC_MAP_SHADOW) {
1975 if (map_perm & LDC_MAP_R)
1976 mte_base |= LDC_MTE_COPY_R;
1977 if (map_perm & LDC_MAP_W)
1978 mte_base |= LDC_MTE_COPY_W;
1979 }
1980 if (map_perm & LDC_MAP_DIRECT) {
1981 if (map_perm & LDC_MAP_R)
1982 mte_base |= LDC_MTE_READ;
1983 if (map_perm & LDC_MAP_W)
1984 mte_base |= LDC_MTE_WRITE;
1985 if (map_perm & LDC_MAP_X)
1986 mte_base |= LDC_MTE_EXEC;
1987 }
1988 if (map_perm & LDC_MAP_IO) {
1989 if (map_perm & LDC_MAP_R)
1990 mte_base |= LDC_MTE_IOMMU_R;
1991 if (map_perm & LDC_MAP_W)
1992 mte_base |= LDC_MTE_IOMMU_W;
1993 }
1994
1995 return mte_base;
1996}
1997
1998static int pages_in_region(unsigned long base, long len)
1999{
2000 int count = 0;
2001
2002 do {
2003 unsigned long new = (base + PAGE_SIZE) & PAGE_MASK;
2004
2005 len -= (new - base);
2006 base = new;
2007 count++;
2008 } while (len > 0);
2009
2010 return count;
2011}
2012
2013struct cookie_state {
2014 struct ldc_mtable_entry *page_table;
2015 struct ldc_trans_cookie *cookies;
2016 u64 mte_base;
2017 u64 prev_cookie;
2018 u32 pte_idx;
2019 u32 nc;
2020};
2021
2022static void fill_cookies(struct cookie_state *sp, unsigned long pa,
2023 unsigned long off, unsigned long len)
2024{
2025 do {
2026 unsigned long tlen, new = pa + PAGE_SIZE;
2027 u64 this_cookie;
2028
2029 sp->page_table[sp->pte_idx].mte = sp->mte_base | pa;
2030
2031 tlen = PAGE_SIZE;
2032 if (off)
2033 tlen = PAGE_SIZE - off;
2034 if (tlen > len)
2035 tlen = len;
2036
2037 this_cookie = make_cookie(sp->pte_idx,
2038 pagesize_code(), off);
2039
2040 off = 0;
2041
2042 if (this_cookie == sp->prev_cookie) {
2043 sp->cookies[sp->nc - 1].cookie_size += tlen;
2044 } else {
2045 sp->cookies[sp->nc].cookie_addr = this_cookie;
2046 sp->cookies[sp->nc].cookie_size = tlen;
2047 sp->nc++;
2048 }
2049 sp->prev_cookie = this_cookie + tlen;
2050
2051 sp->pte_idx++;
2052
2053 len -= tlen;
2054 pa = new;
2055 } while (len > 0);
2056}
2057
2058static int sg_count_one(struct scatterlist *sg)
2059{
2060 unsigned long base = page_to_pfn(sg->page) << PAGE_SHIFT;
2061 long len = sg->length;
2062
2063 if ((sg->offset | len) & (8UL - 1))
2064 return -EFAULT;
2065
2066 return pages_in_region(base + sg->offset, len);
2067}
2068
2069static int sg_count_pages(struct scatterlist *sg, int num_sg)
2070{
2071 int count;
2072 int i;
2073
2074 count = 0;
2075 for (i = 0; i < num_sg; i++) {
2076 int err = sg_count_one(sg + i);
2077 if (err < 0)
2078 return err;
2079 count += err;
2080 }
2081
2082 return count;
2083}
2084
2085int ldc_map_sg(struct ldc_channel *lp,
2086 struct scatterlist *sg, int num_sg,
2087 struct ldc_trans_cookie *cookies, int ncookies,
2088 unsigned int map_perm)
2089{
2090 unsigned long i, npages, flags;
2091 struct ldc_mtable_entry *base;
2092 struct cookie_state state;
2093 struct ldc_iommu *iommu;
2094 int err;
2095
2096 if (map_perm & ~LDC_MAP_ALL)
2097 return -EINVAL;
2098
2099 err = sg_count_pages(sg, num_sg);
2100 if (err < 0)
2101 return err;
2102
2103 npages = err;
2104 if (err > ncookies)
2105 return -EMSGSIZE;
2106
2107 iommu = &lp->iommu;
2108
2109 spin_lock_irqsave(&iommu->lock, flags);
2110 base = alloc_npages(iommu, npages);
2111 spin_unlock_irqrestore(&iommu->lock, flags);
2112
2113 if (!base)
2114 return -ENOMEM;
2115
2116 state.page_table = iommu->page_table;
2117 state.cookies = cookies;
2118 state.mte_base = perm_to_mte(map_perm);
2119 state.prev_cookie = ~(u64)0;
2120 state.pte_idx = (base - iommu->page_table);
2121 state.nc = 0;
2122
2123 for (i = 0; i < num_sg; i++)
2124 fill_cookies(&state, page_to_pfn(sg[i].page) << PAGE_SHIFT,
2125 sg[i].offset, sg[i].length);
2126
2127 return state.nc;
2128}
2129EXPORT_SYMBOL(ldc_map_sg);
2130
2131int ldc_map_single(struct ldc_channel *lp,
2132 void *buf, unsigned int len,
2133 struct ldc_trans_cookie *cookies, int ncookies,
2134 unsigned int map_perm)
2135{
2136 unsigned long npages, pa, flags;
2137 struct ldc_mtable_entry *base;
2138 struct cookie_state state;
2139 struct ldc_iommu *iommu;
2140
2141 if ((map_perm & ~LDC_MAP_ALL) || (ncookies < 1))
2142 return -EINVAL;
2143
2144 pa = __pa(buf);
2145 if ((pa | len) & (8UL - 1))
2146 return -EFAULT;
2147
2148 npages = pages_in_region(pa, len);
2149
2150 iommu = &lp->iommu;
2151
2152 spin_lock_irqsave(&iommu->lock, flags);
2153 base = alloc_npages(iommu, npages);
2154 spin_unlock_irqrestore(&iommu->lock, flags);
2155
2156 if (!base)
2157 return -ENOMEM;
2158
2159 state.page_table = iommu->page_table;
2160 state.cookies = cookies;
2161 state.mte_base = perm_to_mte(map_perm);
2162 state.prev_cookie = ~(u64)0;
2163 state.pte_idx = (base - iommu->page_table);
2164 state.nc = 0;
2165 fill_cookies(&state, (pa & PAGE_MASK), (pa & ~PAGE_MASK), len);
2166 BUG_ON(state.nc != 1);
2167
2168 return state.nc;
2169}
2170EXPORT_SYMBOL(ldc_map_single);
2171
2172static void free_npages(unsigned long id, struct ldc_iommu *iommu,
2173 u64 cookie, u64 size)
2174{
2175 struct iommu_arena *arena = &iommu->arena;
2176 unsigned long i, shift, index, npages;
2177 struct ldc_mtable_entry *base;
2178
2179 npages = PAGE_ALIGN(((cookie & ~PAGE_MASK) + size)) >> PAGE_SHIFT;
2180 index = cookie_to_index(cookie, &shift);
2181 base = iommu->page_table + index;
2182
2183 BUG_ON(index > arena->limit ||
2184 (index + npages) > arena->limit);
2185
2186 for (i = 0; i < npages; i++) {
2187 if (base->cookie)
2188 sun4v_ldc_revoke(id, cookie + (i << shift),
2189 base->cookie);
2190 base->mte = 0;
2191 __clear_bit(index + i, arena->map);
2192 }
2193}
2194
2195void ldc_unmap(struct ldc_channel *lp, struct ldc_trans_cookie *cookies,
2196 int ncookies)
2197{
2198 struct ldc_iommu *iommu = &lp->iommu;
2199 unsigned long flags;
2200 int i;
2201
2202 spin_lock_irqsave(&iommu->lock, flags);
2203 for (i = 0; i < ncookies; i++) {
2204 u64 addr = cookies[i].cookie_addr;
2205 u64 size = cookies[i].cookie_size;
2206
2207 free_npages(lp->id, iommu, addr, size);
2208 }
2209 spin_unlock_irqrestore(&iommu->lock, flags);
2210}
2211EXPORT_SYMBOL(ldc_unmap);
2212
2213int ldc_copy(struct ldc_channel *lp, int copy_dir,
2214 void *buf, unsigned int len, unsigned long offset,
2215 struct ldc_trans_cookie *cookies, int ncookies)
2216{
2217 unsigned int orig_len;
2218 unsigned long ra;
2219 int i;
2220
2221 if (copy_dir != LDC_COPY_IN && copy_dir != LDC_COPY_OUT) {
2222 printk(KERN_ERR PFX "ldc_copy: ID[%lu] Bad copy_dir[%d]\n",
2223 lp->id, copy_dir);
2224 return -EINVAL;
2225 }
2226
2227 ra = __pa(buf);
2228 if ((ra | len | offset) & (8UL - 1)) {
2229 printk(KERN_ERR PFX "ldc_copy: ID[%lu] Unaligned buffer "
2230 "ra[%lx] len[%x] offset[%lx]\n",
2231 lp->id, ra, len, offset);
2232 return -EFAULT;
2233 }
2234
2235 if (lp->hs_state != LDC_HS_COMPLETE ||
2236 (lp->flags & LDC_FLAG_RESET)) {
2237 printk(KERN_ERR PFX "ldc_copy: ID[%lu] Link down hs_state[%x] "
2238 "flags[%x]\n", lp->id, lp->hs_state, lp->flags);
2239 return -ECONNRESET;
2240 }
2241
2242 orig_len = len;
2243 for (i = 0; i < ncookies; i++) {
2244 unsigned long cookie_raddr = cookies[i].cookie_addr;
2245 unsigned long this_len = cookies[i].cookie_size;
2246 unsigned long actual_len;
2247
2248 if (unlikely(offset)) {
2249 unsigned long this_off = offset;
2250
2251 if (this_off > this_len)
2252 this_off = this_len;
2253
2254 offset -= this_off;
2255 this_len -= this_off;
2256 if (!this_len)
2257 continue;
2258 cookie_raddr += this_off;
2259 }
2260
2261 if (this_len > len)
2262 this_len = len;
2263
2264 while (1) {
2265 unsigned long hv_err;
2266
2267 hv_err = sun4v_ldc_copy(lp->id, copy_dir,
2268 cookie_raddr, ra,
2269 this_len, &actual_len);
2270 if (unlikely(hv_err)) {
2271 printk(KERN_ERR PFX "ldc_copy: ID[%lu] "
2272 "HV error %lu\n",
2273 lp->id, hv_err);
2274 if (lp->hs_state != LDC_HS_COMPLETE ||
2275 (lp->flags & LDC_FLAG_RESET))
2276 return -ECONNRESET;
2277 else
2278 return -EFAULT;
2279 }
2280
2281 cookie_raddr += actual_len;
2282 ra += actual_len;
2283 len -= actual_len;
2284 if (actual_len == this_len)
2285 break;
2286
2287 this_len -= actual_len;
2288 }
2289
2290 if (!len)
2291 break;
2292 }
2293
2294 /* It is caller policy what to do about short copies.
2295 * For example, a networking driver can declare the
2296 * packet a runt and drop it.
2297 */
2298
2299 return orig_len - len;
2300}
2301EXPORT_SYMBOL(ldc_copy);
2302
2303void *ldc_alloc_exp_dring(struct ldc_channel *lp, unsigned int len,
2304 struct ldc_trans_cookie *cookies, int *ncookies,
2305 unsigned int map_perm)
2306{
2307 void *buf;
2308 int err;
2309
2310 if (len & (8UL - 1))
2311 return ERR_PTR(-EINVAL);
2312
2313 buf = kzalloc(len, GFP_KERNEL);
2314 if (!buf)
2315 return ERR_PTR(-ENOMEM);
2316
2317 err = ldc_map_single(lp, buf, len, cookies, *ncookies, map_perm);
2318 if (err < 0) {
2319 kfree(buf);
2320 return ERR_PTR(err);
2321 }
2322 *ncookies = err;
2323
2324 return buf;
2325}
2326EXPORT_SYMBOL(ldc_alloc_exp_dring);
2327
2328void ldc_free_exp_dring(struct ldc_channel *lp, void *buf, unsigned int len,
2329 struct ldc_trans_cookie *cookies, int ncookies)
2330{
2331 ldc_unmap(lp, cookies, ncookies);
2332 kfree(buf);
2333}
2334EXPORT_SYMBOL(ldc_free_exp_dring);
2335
2336static int __init ldc_init(void)
2337{
2338 unsigned long major, minor;
2339 struct mdesc_handle *hp;
2340 const u64 *v;
2341 u64 mp;
2342
2343 hp = mdesc_grab();
2344 if (!hp)
2345 return -ENODEV;
2346
2347 mp = mdesc_node_by_name(hp, MDESC_NODE_NULL, "platform");
2348 if (mp == MDESC_NODE_NULL)
2349 return -ENODEV;
2350
2351 v = mdesc_get_property(hp, mp, "domaining-enabled", NULL);
2352 if (!v)
2353 return -ENODEV;
2354
2355 major = 1;
2356 minor = 0;
2357 if (sun4v_hvapi_register(HV_GRP_LDOM, major, &minor)) {
2358 printk(KERN_INFO PFX "Could not register LDOM hvapi.\n");
2359 return -ENODEV;
2360 }
2361
2362 printk(KERN_INFO "%s", version);
2363
2364 if (!*v) {
2365 printk(KERN_INFO PFX "Domaining disabled.\n");
2366 return -ENODEV;
2367 }
2368 ldom_domaining_enabled = 1;
2369
2370 return 0;
2371}
2372
2373core_initcall(ldc_init);
diff --git a/arch/sparc64/kernel/mdesc.c b/arch/sparc64/kernel/mdesc.c
index f0e16045fb..302ba5e5a0 100644
--- a/arch/sparc64/kernel/mdesc.c
+++ b/arch/sparc64/kernel/mdesc.c
@@ -6,6 +6,9 @@
6#include <linux/types.h> 6#include <linux/types.h>
7#include <linux/bootmem.h> 7#include <linux/bootmem.h>
8#include <linux/log2.h> 8#include <linux/log2.h>
9#include <linux/list.h>
10#include <linux/slab.h>
11#include <linux/mm.h>
9 12
10#include <asm/hypervisor.h> 13#include <asm/hypervisor.h>
11#include <asm/mdesc.h> 14#include <asm/mdesc.h>
@@ -29,7 +32,7 @@ struct mdesc_hdr {
29 u32 node_sz; /* node block size */ 32 u32 node_sz; /* node block size */
30 u32 name_sz; /* name block size */ 33 u32 name_sz; /* name block size */
31 u32 data_sz; /* data block size */ 34 u32 data_sz; /* data block size */
32}; 35} __attribute__((aligned(16)));
33 36
34struct mdesc_elem { 37struct mdesc_elem {
35 u8 tag; 38 u8 tag;
@@ -53,306 +56,468 @@ struct mdesc_elem {
53 } d; 56 } d;
54}; 57};
55 58
56static struct mdesc_hdr *main_mdesc; 59struct mdesc_mem_ops {
57static struct mdesc_node *allnodes; 60 struct mdesc_handle *(*alloc)(unsigned int mdesc_size);
61 void (*free)(struct mdesc_handle *handle);
62};
58 63
59static struct mdesc_node *allnodes_tail; 64struct mdesc_handle {
60static unsigned int unique_id; 65 struct list_head list;
66 struct mdesc_mem_ops *mops;
67 void *self_base;
68 atomic_t refcnt;
69 unsigned int handle_size;
70 struct mdesc_hdr mdesc;
71};
61 72
62static struct mdesc_node **mdesc_hash; 73static void mdesc_handle_init(struct mdesc_handle *hp,
63static unsigned int mdesc_hash_size; 74 unsigned int handle_size,
75 void *base)
76{
77 BUG_ON(((unsigned long)&hp->mdesc) & (16UL - 1));
64 78
65static inline unsigned int node_hashfn(u64 node) 79 memset(hp, 0, handle_size);
80 INIT_LIST_HEAD(&hp->list);
81 hp->self_base = base;
82 atomic_set(&hp->refcnt, 1);
83 hp->handle_size = handle_size;
84}
85
86static struct mdesc_handle *mdesc_bootmem_alloc(unsigned int mdesc_size)
66{ 87{
67 return ((unsigned int) (node ^ (node >> 8) ^ (node >> 16))) 88 struct mdesc_handle *hp;
68 & (mdesc_hash_size - 1); 89 unsigned int handle_size, alloc_size;
90
91 handle_size = (sizeof(struct mdesc_handle) -
92 sizeof(struct mdesc_hdr) +
93 mdesc_size);
94 alloc_size = PAGE_ALIGN(handle_size);
95
96 hp = __alloc_bootmem(alloc_size, PAGE_SIZE, 0UL);
97 if (hp)
98 mdesc_handle_init(hp, handle_size, hp);
99
100 return hp;
69} 101}
70 102
71static inline void hash_node(struct mdesc_node *mp) 103static void mdesc_bootmem_free(struct mdesc_handle *hp)
72{ 104{
73 struct mdesc_node **head = &mdesc_hash[node_hashfn(mp->node)]; 105 unsigned int alloc_size, handle_size = hp->handle_size;
106 unsigned long start, end;
74 107
75 mp->hash_next = *head; 108 BUG_ON(atomic_read(&hp->refcnt) != 0);
76 *head = mp; 109 BUG_ON(!list_empty(&hp->list));
77 110
78 if (allnodes_tail) { 111 alloc_size = PAGE_ALIGN(handle_size);
79 allnodes_tail->allnodes_next = mp; 112
80 allnodes_tail = mp; 113 start = (unsigned long) hp;
81 } else { 114 end = start + alloc_size;
82 allnodes = allnodes_tail = mp; 115
116 while (start < end) {
117 struct page *p;
118
119 p = virt_to_page(start);
120 ClearPageReserved(p);
121 __free_page(p);
122 start += PAGE_SIZE;
83 } 123 }
84} 124}
85 125
86static struct mdesc_node *find_node(u64 node) 126static struct mdesc_mem_ops bootmem_mdesc_memops = {
127 .alloc = mdesc_bootmem_alloc,
128 .free = mdesc_bootmem_free,
129};
130
131static struct mdesc_handle *mdesc_kmalloc(unsigned int mdesc_size)
87{ 132{
88 struct mdesc_node *mp = mdesc_hash[node_hashfn(node)]; 133 unsigned int handle_size;
134 void *base;
135
136 handle_size = (sizeof(struct mdesc_handle) -
137 sizeof(struct mdesc_hdr) +
138 mdesc_size);
139
140 base = kmalloc(handle_size + 15, GFP_KERNEL | __GFP_NOFAIL);
141 if (base) {
142 struct mdesc_handle *hp;
143 unsigned long addr;
89 144
90 while (mp) { 145 addr = (unsigned long)base;
91 if (mp->node == node) 146 addr = (addr + 15UL) & ~15UL;
92 return mp; 147 hp = (struct mdesc_handle *) addr;
93 148
94 mp = mp->hash_next; 149 mdesc_handle_init(hp, handle_size, base);
150 return hp;
95 } 151 }
152
96 return NULL; 153 return NULL;
97} 154}
98 155
99struct property *md_find_property(const struct mdesc_node *mp, 156static void mdesc_kfree(struct mdesc_handle *hp)
100 const char *name,
101 int *lenp)
102{ 157{
103 struct property *pp; 158 BUG_ON(atomic_read(&hp->refcnt) != 0);
159 BUG_ON(!list_empty(&hp->list));
104 160
105 for (pp = mp->properties; pp != 0; pp = pp->next) { 161 kfree(hp->self_base);
106 if (strcasecmp(pp->name, name) == 0) {
107 if (lenp)
108 *lenp = pp->length;
109 break;
110 }
111 }
112 return pp;
113} 162}
114EXPORT_SYMBOL(md_find_property);
115 163
116/* 164static struct mdesc_mem_ops kmalloc_mdesc_memops = {
117 * Find a property with a given name for a given node 165 .alloc = mdesc_kmalloc,
118 * and return the value. 166 .free = mdesc_kfree,
119 */ 167};
120const void *md_get_property(const struct mdesc_node *mp, const char *name, 168
121 int *lenp) 169static struct mdesc_handle *mdesc_alloc(unsigned int mdesc_size,
170 struct mdesc_mem_ops *mops)
122{ 171{
123 struct property *pp = md_find_property(mp, name, lenp); 172 struct mdesc_handle *hp = mops->alloc(mdesc_size);
124 return pp ? pp->value : NULL; 173
174 if (hp)
175 hp->mops = mops;
176
177 return hp;
125} 178}
126EXPORT_SYMBOL(md_get_property);
127 179
128struct mdesc_node *md_find_node_by_name(struct mdesc_node *from, 180static void mdesc_free(struct mdesc_handle *hp)
129 const char *name)
130{ 181{
131 struct mdesc_node *mp; 182 hp->mops->free(hp);
183}
132 184
133 mp = from ? from->allnodes_next : allnodes; 185static struct mdesc_handle *cur_mdesc;
134 for (; mp != NULL; mp = mp->allnodes_next) { 186static LIST_HEAD(mdesc_zombie_list);
135 if (strcmp(mp->name, name) == 0) 187static DEFINE_SPINLOCK(mdesc_lock);
136 break; 188
189struct mdesc_handle *mdesc_grab(void)
190{
191 struct mdesc_handle *hp;
192 unsigned long flags;
193
194 spin_lock_irqsave(&mdesc_lock, flags);
195 hp = cur_mdesc;
196 if (hp)
197 atomic_inc(&hp->refcnt);
198 spin_unlock_irqrestore(&mdesc_lock, flags);
199
200 return hp;
201}
202EXPORT_SYMBOL(mdesc_grab);
203
204void mdesc_release(struct mdesc_handle *hp)
205{
206 unsigned long flags;
207
208 spin_lock_irqsave(&mdesc_lock, flags);
209 if (atomic_dec_and_test(&hp->refcnt)) {
210 list_del_init(&hp->list);
211 hp->mops->free(hp);
137 } 212 }
138 return mp; 213 spin_unlock_irqrestore(&mdesc_lock, flags);
139} 214}
140EXPORT_SYMBOL(md_find_node_by_name); 215EXPORT_SYMBOL(mdesc_release);
141 216
142static unsigned int mdesc_early_allocated; 217static DEFINE_MUTEX(mdesc_mutex);
218static struct mdesc_notifier_client *client_list;
143 219
144static void * __init mdesc_early_alloc(unsigned long size) 220void mdesc_register_notifier(struct mdesc_notifier_client *client)
145{ 221{
146 void *ret; 222 u64 node;
147 223
148 ret = __alloc_bootmem(size, SMP_CACHE_BYTES, 0UL); 224 mutex_lock(&mdesc_mutex);
149 if (ret == NULL) { 225 client->next = client_list;
150 prom_printf("MDESC: alloc of %lu bytes failed.\n", size); 226 client_list = client;
151 prom_halt();
152 }
153 227
154 memset(ret, 0, size); 228 mdesc_for_each_node_by_name(cur_mdesc, node, client->node_name)
229 client->add(cur_mdesc, node);
155 230
156 mdesc_early_allocated += size; 231 mutex_unlock(&mdesc_mutex);
232}
157 233
158 return ret; 234/* Run 'func' on nodes which are in A but not in B. */
235static void invoke_on_missing(const char *name,
236 struct mdesc_handle *a,
237 struct mdesc_handle *b,
238 void (*func)(struct mdesc_handle *, u64))
239{
240 u64 node;
241
242 mdesc_for_each_node_by_name(a, node, name) {
243 const u64 *id = mdesc_get_property(a, node, "id", NULL);
244 int found = 0;
245 u64 fnode;
246
247 mdesc_for_each_node_by_name(b, fnode, name) {
248 const u64 *fid = mdesc_get_property(b, fnode,
249 "id", NULL);
250
251 if (*id == *fid) {
252 found = 1;
253 break;
254 }
255 }
256 if (!found)
257 func(a, node);
258 }
159} 259}
160 260
161static unsigned int __init count_arcs(struct mdesc_elem *ep) 261static void notify_one(struct mdesc_notifier_client *p,
262 struct mdesc_handle *old_hp,
263 struct mdesc_handle *new_hp)
162{ 264{
163 unsigned int ret = 0; 265 invoke_on_missing(p->node_name, old_hp, new_hp, p->remove);
266 invoke_on_missing(p->node_name, new_hp, old_hp, p->add);
267}
164 268
165 ep++; 269static void mdesc_notify_clients(struct mdesc_handle *old_hp,
166 while (ep->tag != MD_NODE_END) { 270 struct mdesc_handle *new_hp)
167 if (ep->tag == MD_PROP_ARC) 271{
168 ret++; 272 struct mdesc_notifier_client *p = client_list;
169 ep++; 273
274 while (p) {
275 notify_one(p, old_hp, new_hp);
276 p = p->next;
170 } 277 }
171 return ret;
172} 278}
173 279
174static void __init mdesc_node_alloc(u64 node, struct mdesc_elem *ep, const char *names) 280void mdesc_update(void)
175{ 281{
176 unsigned int num_arcs = count_arcs(ep); 282 unsigned long len, real_len, status;
177 struct mdesc_node *mp; 283 struct mdesc_handle *hp, *orig_hp;
284 unsigned long flags;
178 285
179 mp = mdesc_early_alloc(sizeof(*mp) + 286 mutex_lock(&mdesc_mutex);
180 (num_arcs * sizeof(struct mdesc_arc)));
181 mp->name = names + ep->name_offset;
182 mp->node = node;
183 mp->unique_id = unique_id++;
184 mp->num_arcs = num_arcs;
185 287
186 hash_node(mp); 288 (void) sun4v_mach_desc(0UL, 0UL, &len);
289
290 hp = mdesc_alloc(len, &kmalloc_mdesc_memops);
291 if (!hp) {
292 printk(KERN_ERR "MD: mdesc alloc fails\n");
293 goto out;
294 }
295
296 status = sun4v_mach_desc(__pa(&hp->mdesc), len, &real_len);
297 if (status != HV_EOK || real_len > len) {
298 printk(KERN_ERR "MD: mdesc reread fails with %lu\n",
299 status);
300 atomic_dec(&hp->refcnt);
301 mdesc_free(hp);
302 goto out;
303 }
304
305 spin_lock_irqsave(&mdesc_lock, flags);
306 orig_hp = cur_mdesc;
307 cur_mdesc = hp;
308 spin_unlock_irqrestore(&mdesc_lock, flags);
309
310 mdesc_notify_clients(orig_hp, hp);
311
312 spin_lock_irqsave(&mdesc_lock, flags);
313 if (atomic_dec_and_test(&orig_hp->refcnt))
314 mdesc_free(orig_hp);
315 else
316 list_add(&orig_hp->list, &mdesc_zombie_list);
317 spin_unlock_irqrestore(&mdesc_lock, flags);
318
319out:
320 mutex_unlock(&mdesc_mutex);
187} 321}
188 322
189static inline struct mdesc_elem *node_block(struct mdesc_hdr *mdesc) 323static struct mdesc_elem *node_block(struct mdesc_hdr *mdesc)
190{ 324{
191 return (struct mdesc_elem *) (mdesc + 1); 325 return (struct mdesc_elem *) (mdesc + 1);
192} 326}
193 327
194static inline void *name_block(struct mdesc_hdr *mdesc) 328static void *name_block(struct mdesc_hdr *mdesc)
195{ 329{
196 return ((void *) node_block(mdesc)) + mdesc->node_sz; 330 return ((void *) node_block(mdesc)) + mdesc->node_sz;
197} 331}
198 332
199static inline void *data_block(struct mdesc_hdr *mdesc) 333static void *data_block(struct mdesc_hdr *mdesc)
200{ 334{
201 return ((void *) name_block(mdesc)) + mdesc->name_sz; 335 return ((void *) name_block(mdesc)) + mdesc->name_sz;
202} 336}
203 337
204/* In order to avoid recursion (the graph can be very deep) we use a 338u64 mdesc_node_by_name(struct mdesc_handle *hp,
205 * two pass algorithm. First we allocate all the nodes and hash them. 339 u64 from_node, const char *name)
206 * Then we iterate over each node, filling in the arcs and properties.
207 */
208static void __init build_all_nodes(struct mdesc_hdr *mdesc)
209{ 340{
210 struct mdesc_elem *start, *ep; 341 struct mdesc_elem *ep = node_block(&hp->mdesc);
211 struct mdesc_node *mp; 342 const char *names = name_block(&hp->mdesc);
212 const char *names; 343 u64 last_node = hp->mdesc.node_sz / 16;
213 void *data; 344 u64 ret;
214 u64 last_node; 345
346 if (from_node == MDESC_NODE_NULL) {
347 ret = from_node = 0;
348 } else if (from_node >= last_node) {
349 return MDESC_NODE_NULL;
350 } else {
351 ret = ep[from_node].d.val;
352 }
215 353
216 start = ep = node_block(mdesc); 354 while (ret < last_node) {
217 last_node = mdesc->node_sz / 16; 355 if (ep[ret].tag != MD_NODE)
356 return MDESC_NODE_NULL;
357 if (!strcmp(names + ep[ret].name_offset, name))
358 break;
359 ret = ep[ret].d.val;
360 }
361 if (ret >= last_node)
362 ret = MDESC_NODE_NULL;
363 return ret;
364}
365EXPORT_SYMBOL(mdesc_node_by_name);
218 366
219 names = name_block(mdesc); 367const void *mdesc_get_property(struct mdesc_handle *hp, u64 node,
368 const char *name, int *lenp)
369{
370 const char *names = name_block(&hp->mdesc);
371 u64 last_node = hp->mdesc.node_sz / 16;
372 void *data = data_block(&hp->mdesc);
373 struct mdesc_elem *ep;
220 374
221 while (1) { 375 if (node == MDESC_NODE_NULL || node >= last_node)
222 u64 node = ep - start; 376 return NULL;
223 377
224 if (ep->tag == MD_LIST_END) 378 ep = node_block(&hp->mdesc) + node;
379 ep++;
380 for (; ep->tag != MD_NODE_END; ep++) {
381 void *val = NULL;
382 int len = 0;
383
384 switch (ep->tag) {
385 case MD_PROP_VAL:
386 val = &ep->d.val;
387 len = 8;
225 break; 388 break;
226 389
227 if (ep->tag != MD_NODE) { 390 case MD_PROP_STR:
228 prom_printf("MDESC: Inconsistent element list.\n"); 391 case MD_PROP_DATA:
229 prom_halt(); 392 val = data + ep->d.data.data_offset;
230 } 393 len = ep->d.data.data_len;
231 394 break;
232 mdesc_node_alloc(node, ep, names);
233 395
234 if (ep->d.val >= last_node) { 396 default:
235 printk("MDESC: Warning, early break out of node scan.\n");
236 printk("MDESC: Next node [%lu] last_node [%lu].\n",
237 node, last_node);
238 break; 397 break;
239 } 398 }
399 if (!val)
400 continue;
240 401
241 ep = start + ep->d.val; 402 if (!strcmp(names + ep->name_offset, name)) {
403 if (lenp)
404 *lenp = len;
405 return val;
406 }
242 } 407 }
243 408
244 data = data_block(mdesc); 409 return NULL;
245 for (mp = allnodes; mp; mp = mp->allnodes_next) { 410}
246 struct mdesc_elem *ep = start + mp->node; 411EXPORT_SYMBOL(mdesc_get_property);
247 struct property **link = &mp->properties;
248 unsigned int this_arc = 0;
249
250 ep++;
251 while (ep->tag != MD_NODE_END) {
252 switch (ep->tag) {
253 case MD_PROP_ARC: {
254 struct mdesc_node *target;
255
256 if (this_arc >= mp->num_arcs) {
257 prom_printf("MDESC: ARC overrun [%u:%u]\n",
258 this_arc, mp->num_arcs);
259 prom_halt();
260 }
261 target = find_node(ep->d.val);
262 if (!target) {
263 printk("MDESC: Warning, arc points to "
264 "missing node, ignoring.\n");
265 break;
266 }
267 mp->arcs[this_arc].name =
268 (names + ep->name_offset);
269 mp->arcs[this_arc].arc = target;
270 this_arc++;
271 break;
272 }
273 412
274 case MD_PROP_VAL: 413u64 mdesc_next_arc(struct mdesc_handle *hp, u64 from, const char *arc_type)
275 case MD_PROP_STR: 414{
276 case MD_PROP_DATA: { 415 struct mdesc_elem *ep, *base = node_block(&hp->mdesc);
277 struct property *p = mdesc_early_alloc(sizeof(*p)); 416 const char *names = name_block(&hp->mdesc);
278 417 u64 last_node = hp->mdesc.node_sz / 16;
279 p->unique_id = unique_id++;
280 p->name = (char *) names + ep->name_offset;
281 if (ep->tag == MD_PROP_VAL) {
282 p->value = &ep->d.val;
283 p->length = 8;
284 } else {
285 p->value = data + ep->d.data.data_offset;
286 p->length = ep->d.data.data_len;
287 }
288 *link = p;
289 link = &p->next;
290 break;
291 }
292 418
293 case MD_NOOP: 419 if (from == MDESC_NODE_NULL || from >= last_node)
294 break; 420 return MDESC_NODE_NULL;
295 421
296 default: 422 ep = base + from;
297 printk("MDESC: Warning, ignoring unknown tag type %02x\n", 423
298 ep->tag); 424 ep++;
299 } 425 for (; ep->tag != MD_NODE_END; ep++) {
300 ep++; 426 if (ep->tag != MD_PROP_ARC)
301 } 427 continue;
428
429 if (strcmp(names + ep->name_offset, arc_type))
430 continue;
431
432 return ep - base;
302 } 433 }
434
435 return MDESC_NODE_NULL;
303} 436}
437EXPORT_SYMBOL(mdesc_next_arc);
304 438
305static unsigned int __init count_nodes(struct mdesc_hdr *mdesc) 439u64 mdesc_arc_target(struct mdesc_handle *hp, u64 arc)
306{ 440{
307 struct mdesc_elem *ep = node_block(mdesc); 441 struct mdesc_elem *ep, *base = node_block(&hp->mdesc);
308 struct mdesc_elem *end;
309 unsigned int cnt = 0;
310 442
311 end = ((void *)ep) + mdesc->node_sz; 443 ep = base + arc;
312 while (ep < end) { 444
313 if (ep->tag == MD_NODE) 445 return ep->d.val;
314 cnt++;
315 ep++;
316 }
317 return cnt;
318} 446}
447EXPORT_SYMBOL(mdesc_arc_target);
448
449const char *mdesc_node_name(struct mdesc_handle *hp, u64 node)
450{
451 struct mdesc_elem *ep, *base = node_block(&hp->mdesc);
452 const char *names = name_block(&hp->mdesc);
453 u64 last_node = hp->mdesc.node_sz / 16;
454
455 if (node == MDESC_NODE_NULL || node >= last_node)
456 return NULL;
457
458 ep = base + node;
459 if (ep->tag != MD_NODE)
460 return NULL;
461
462 return names + ep->name_offset;
463}
464EXPORT_SYMBOL(mdesc_node_name);
319 465
320static void __init report_platform_properties(void) 466static void __init report_platform_properties(void)
321{ 467{
322 struct mdesc_node *pn = md_find_node_by_name(NULL, "platform"); 468 struct mdesc_handle *hp = mdesc_grab();
469 u64 pn = mdesc_node_by_name(hp, MDESC_NODE_NULL, "platform");
323 const char *s; 470 const char *s;
324 const u64 *v; 471 const u64 *v;
325 472
326 if (!pn) { 473 if (pn == MDESC_NODE_NULL) {
327 prom_printf("No platform node in machine-description.\n"); 474 prom_printf("No platform node in machine-description.\n");
328 prom_halt(); 475 prom_halt();
329 } 476 }
330 477
331 s = md_get_property(pn, "banner-name", NULL); 478 s = mdesc_get_property(hp, pn, "banner-name", NULL);
332 printk("PLATFORM: banner-name [%s]\n", s); 479 printk("PLATFORM: banner-name [%s]\n", s);
333 s = md_get_property(pn, "name", NULL); 480 s = mdesc_get_property(hp, pn, "name", NULL);
334 printk("PLATFORM: name [%s]\n", s); 481 printk("PLATFORM: name [%s]\n", s);
335 482
336 v = md_get_property(pn, "hostid", NULL); 483 v = mdesc_get_property(hp, pn, "hostid", NULL);
337 if (v) 484 if (v)
338 printk("PLATFORM: hostid [%08lx]\n", *v); 485 printk("PLATFORM: hostid [%08lx]\n", *v);
339 v = md_get_property(pn, "serial#", NULL); 486 v = mdesc_get_property(hp, pn, "serial#", NULL);
340 if (v) 487 if (v)
341 printk("PLATFORM: serial# [%08lx]\n", *v); 488 printk("PLATFORM: serial# [%08lx]\n", *v);
342 v = md_get_property(pn, "stick-frequency", NULL); 489 v = mdesc_get_property(hp, pn, "stick-frequency", NULL);
343 printk("PLATFORM: stick-frequency [%08lx]\n", *v); 490 printk("PLATFORM: stick-frequency [%08lx]\n", *v);
344 v = md_get_property(pn, "mac-address", NULL); 491 v = mdesc_get_property(hp, pn, "mac-address", NULL);
345 if (v) 492 if (v)
346 printk("PLATFORM: mac-address [%lx]\n", *v); 493 printk("PLATFORM: mac-address [%lx]\n", *v);
347 v = md_get_property(pn, "watchdog-resolution", NULL); 494 v = mdesc_get_property(hp, pn, "watchdog-resolution", NULL);
348 if (v) 495 if (v)
349 printk("PLATFORM: watchdog-resolution [%lu ms]\n", *v); 496 printk("PLATFORM: watchdog-resolution [%lu ms]\n", *v);
350 v = md_get_property(pn, "watchdog-max-timeout", NULL); 497 v = mdesc_get_property(hp, pn, "watchdog-max-timeout", NULL);
351 if (v) 498 if (v)
352 printk("PLATFORM: watchdog-max-timeout [%lu ms]\n", *v); 499 printk("PLATFORM: watchdog-max-timeout [%lu ms]\n", *v);
353 v = md_get_property(pn, "max-cpus", NULL); 500 v = mdesc_get_property(hp, pn, "max-cpus", NULL);
354 if (v) 501 if (v)
355 printk("PLATFORM: max-cpus [%lu]\n", *v); 502 printk("PLATFORM: max-cpus [%lu]\n", *v);
503
504#ifdef CONFIG_SMP
505 {
506 int max_cpu, i;
507
508 if (v) {
509 max_cpu = *v;
510 if (max_cpu > NR_CPUS)
511 max_cpu = NR_CPUS;
512 } else {
513 max_cpu = NR_CPUS;
514 }
515 for (i = 0; i < max_cpu; i++)
516 cpu_set(i, cpu_possible_map);
517 }
518#endif
519
520 mdesc_release(hp);
356} 521}
357 522
358static int inline find_in_proplist(const char *list, const char *match, int len) 523static int inline find_in_proplist(const char *list, const char *match, int len)
@@ -369,15 +534,17 @@ static int inline find_in_proplist(const char *list, const char *match, int len)
369 return 0; 534 return 0;
370} 535}
371 536
372static void __init fill_in_one_cache(cpuinfo_sparc *c, struct mdesc_node *mp) 537static void __devinit fill_in_one_cache(cpuinfo_sparc *c,
538 struct mdesc_handle *hp,
539 u64 mp)
373{ 540{
374 const u64 *level = md_get_property(mp, "level", NULL); 541 const u64 *level = mdesc_get_property(hp, mp, "level", NULL);
375 const u64 *size = md_get_property(mp, "size", NULL); 542 const u64 *size = mdesc_get_property(hp, mp, "size", NULL);
376 const u64 *line_size = md_get_property(mp, "line-size", NULL); 543 const u64 *line_size = mdesc_get_property(hp, mp, "line-size", NULL);
377 const char *type; 544 const char *type;
378 int type_len; 545 int type_len;
379 546
380 type = md_get_property(mp, "type", &type_len); 547 type = mdesc_get_property(hp, mp, "type", &type_len);
381 548
382 switch (*level) { 549 switch (*level) {
383 case 1: 550 case 1:
@@ -400,48 +567,45 @@ static void __init fill_in_one_cache(cpuinfo_sparc *c, struct mdesc_node *mp)
400 } 567 }
401 568
402 if (*level == 1) { 569 if (*level == 1) {
403 unsigned int i; 570 u64 a;
404 571
405 for (i = 0; i < mp->num_arcs; i++) { 572 mdesc_for_each_arc(a, hp, mp, MDESC_ARC_TYPE_FWD) {
406 struct mdesc_node *t = mp->arcs[i].arc; 573 u64 target = mdesc_arc_target(hp, a);
407 574 const char *name = mdesc_node_name(hp, target);
408 if (strcmp(mp->arcs[i].name, "fwd"))
409 continue;
410 575
411 if (!strcmp(t->name, "cache")) 576 if (!strcmp(name, "cache"))
412 fill_in_one_cache(c, t); 577 fill_in_one_cache(c, hp, target);
413 } 578 }
414 } 579 }
415} 580}
416 581
417static void __init mark_core_ids(struct mdesc_node *mp, int core_id) 582static void __devinit mark_core_ids(struct mdesc_handle *hp, u64 mp,
583 int core_id)
418{ 584{
419 unsigned int i; 585 u64 a;
420 586
421 for (i = 0; i < mp->num_arcs; i++) { 587 mdesc_for_each_arc(a, hp, mp, MDESC_ARC_TYPE_BACK) {
422 struct mdesc_node *t = mp->arcs[i].arc; 588 u64 t = mdesc_arc_target(hp, a);
589 const char *name;
423 const u64 *id; 590 const u64 *id;
424 591
425 if (strcmp(mp->arcs[i].name, "back")) 592 name = mdesc_node_name(hp, t);
426 continue; 593 if (!strcmp(name, "cpu")) {
427 594 id = mdesc_get_property(hp, t, "id", NULL);
428 if (!strcmp(t->name, "cpu")) {
429 id = md_get_property(t, "id", NULL);
430 if (*id < NR_CPUS) 595 if (*id < NR_CPUS)
431 cpu_data(*id).core_id = core_id; 596 cpu_data(*id).core_id = core_id;
432 } else { 597 } else {
433 unsigned int j; 598 u64 j;
434 599
435 for (j = 0; j < t->num_arcs; j++) { 600 mdesc_for_each_arc(j, hp, t, MDESC_ARC_TYPE_BACK) {
436 struct mdesc_node *n = t->arcs[j].arc; 601 u64 n = mdesc_arc_target(hp, j);
437 602 const char *n_name;
438 if (strcmp(t->arcs[j].name, "back"))
439 continue;
440 603
441 if (strcmp(n->name, "cpu")) 604 n_name = mdesc_node_name(hp, n);
605 if (strcmp(n_name, "cpu"))
442 continue; 606 continue;
443 607
444 id = md_get_property(n, "id", NULL); 608 id = mdesc_get_property(hp, n, "id", NULL);
445 if (*id < NR_CPUS) 609 if (*id < NR_CPUS)
446 cpu_data(*id).core_id = core_id; 610 cpu_data(*id).core_id = core_id;
447 } 611 }
@@ -449,78 +613,81 @@ static void __init mark_core_ids(struct mdesc_node *mp, int core_id)
449 } 613 }
450} 614}
451 615
452static void __init set_core_ids(void) 616static void __devinit set_core_ids(struct mdesc_handle *hp)
453{ 617{
454 struct mdesc_node *mp;
455 int idx; 618 int idx;
619 u64 mp;
456 620
457 idx = 1; 621 idx = 1;
458 md_for_each_node_by_name(mp, "cache") { 622 mdesc_for_each_node_by_name(hp, mp, "cache") {
459 const u64 *level = md_get_property(mp, "level", NULL); 623 const u64 *level;
460 const char *type; 624 const char *type;
461 int len; 625 int len;
462 626
627 level = mdesc_get_property(hp, mp, "level", NULL);
463 if (*level != 1) 628 if (*level != 1)
464 continue; 629 continue;
465 630
466 type = md_get_property(mp, "type", &len); 631 type = mdesc_get_property(hp, mp, "type", &len);
467 if (!find_in_proplist(type, "instn", len)) 632 if (!find_in_proplist(type, "instn", len))
468 continue; 633 continue;
469 634
470 mark_core_ids(mp, idx); 635 mark_core_ids(hp, mp, idx);
471 636
472 idx++; 637 idx++;
473 } 638 }
474} 639}
475 640
476static void __init mark_proc_ids(struct mdesc_node *mp, int proc_id) 641static void __devinit mark_proc_ids(struct mdesc_handle *hp, u64 mp,
642 int proc_id)
477{ 643{
478 int i; 644 u64 a;
479 645
480 for (i = 0; i < mp->num_arcs; i++) { 646 mdesc_for_each_arc(a, hp, mp, MDESC_ARC_TYPE_BACK) {
481 struct mdesc_node *t = mp->arcs[i].arc; 647 u64 t = mdesc_arc_target(hp, a);
648 const char *name;
482 const u64 *id; 649 const u64 *id;
483 650
484 if (strcmp(mp->arcs[i].name, "back")) 651 name = mdesc_node_name(hp, t);
652 if (strcmp(name, "cpu"))
485 continue; 653 continue;
486 654
487 if (strcmp(t->name, "cpu")) 655 id = mdesc_get_property(hp, t, "id", NULL);
488 continue;
489
490 id = md_get_property(t, "id", NULL);
491 if (*id < NR_CPUS) 656 if (*id < NR_CPUS)
492 cpu_data(*id).proc_id = proc_id; 657 cpu_data(*id).proc_id = proc_id;
493 } 658 }
494} 659}
495 660
496static void __init __set_proc_ids(const char *exec_unit_name) 661static void __devinit __set_proc_ids(struct mdesc_handle *hp,
662 const char *exec_unit_name)
497{ 663{
498 struct mdesc_node *mp;
499 int idx; 664 int idx;
665 u64 mp;
500 666
501 idx = 0; 667 idx = 0;
502 md_for_each_node_by_name(mp, exec_unit_name) { 668 mdesc_for_each_node_by_name(hp, mp, exec_unit_name) {
503 const char *type; 669 const char *type;
504 int len; 670 int len;
505 671
506 type = md_get_property(mp, "type", &len); 672 type = mdesc_get_property(hp, mp, "type", &len);
507 if (!find_in_proplist(type, "int", len) && 673 if (!find_in_proplist(type, "int", len) &&
508 !find_in_proplist(type, "integer", len)) 674 !find_in_proplist(type, "integer", len))
509 continue; 675 continue;
510 676
511 mark_proc_ids(mp, idx); 677 mark_proc_ids(hp, mp, idx);
512 678
513 idx++; 679 idx++;
514 } 680 }
515} 681}
516 682
517static void __init set_proc_ids(void) 683static void __devinit set_proc_ids(struct mdesc_handle *hp)
518{ 684{
519 __set_proc_ids("exec_unit"); 685 __set_proc_ids(hp, "exec_unit");
520 __set_proc_ids("exec-unit"); 686 __set_proc_ids(hp, "exec-unit");
521} 687}
522 688
523static void __init get_one_mondo_bits(const u64 *p, unsigned int *mask, unsigned char def) 689static void __devinit get_one_mondo_bits(const u64 *p, unsigned int *mask,
690 unsigned char def)
524{ 691{
525 u64 val; 692 u64 val;
526 693
@@ -538,35 +705,37 @@ use_default:
538 *mask = ((1U << def) * 64U) - 1U; 705 *mask = ((1U << def) * 64U) - 1U;
539} 706}
540 707
541static void __init get_mondo_data(struct mdesc_node *mp, struct trap_per_cpu *tb) 708static void __devinit get_mondo_data(struct mdesc_handle *hp, u64 mp,
709 struct trap_per_cpu *tb)
542{ 710{
543 const u64 *val; 711 const u64 *val;
544 712
545 val = md_get_property(mp, "q-cpu-mondo-#bits", NULL); 713 val = mdesc_get_property(hp, mp, "q-cpu-mondo-#bits", NULL);
546 get_one_mondo_bits(val, &tb->cpu_mondo_qmask, 7); 714 get_one_mondo_bits(val, &tb->cpu_mondo_qmask, 7);
547 715
548 val = md_get_property(mp, "q-dev-mondo-#bits", NULL); 716 val = mdesc_get_property(hp, mp, "q-dev-mondo-#bits", NULL);
549 get_one_mondo_bits(val, &tb->dev_mondo_qmask, 7); 717 get_one_mondo_bits(val, &tb->dev_mondo_qmask, 7);
550 718
551 val = md_get_property(mp, "q-resumable-#bits", NULL); 719 val = mdesc_get_property(hp, mp, "q-resumable-#bits", NULL);
552 get_one_mondo_bits(val, &tb->resum_qmask, 6); 720 get_one_mondo_bits(val, &tb->resum_qmask, 6);
553 721
554 val = md_get_property(mp, "q-nonresumable-#bits", NULL); 722 val = mdesc_get_property(hp, mp, "q-nonresumable-#bits", NULL);
555 get_one_mondo_bits(val, &tb->nonresum_qmask, 2); 723 get_one_mondo_bits(val, &tb->nonresum_qmask, 2);
556} 724}
557 725
558static void __init mdesc_fill_in_cpu_data(void) 726void __devinit mdesc_fill_in_cpu_data(cpumask_t mask)
559{ 727{
560 struct mdesc_node *mp; 728 struct mdesc_handle *hp = mdesc_grab();
729 u64 mp;
561 730
562 ncpus_probed = 0; 731 ncpus_probed = 0;
563 md_for_each_node_by_name(mp, "cpu") { 732 mdesc_for_each_node_by_name(hp, mp, "cpu") {
564 const u64 *id = md_get_property(mp, "id", NULL); 733 const u64 *id = mdesc_get_property(hp, mp, "id", NULL);
565 const u64 *cfreq = md_get_property(mp, "clock-frequency", NULL); 734 const u64 *cfreq = mdesc_get_property(hp, mp, "clock-frequency", NULL);
566 struct trap_per_cpu *tb; 735 struct trap_per_cpu *tb;
567 cpuinfo_sparc *c; 736 cpuinfo_sparc *c;
568 unsigned int i;
569 int cpuid; 737 int cpuid;
738 u64 a;
570 739
571 ncpus_probed++; 740 ncpus_probed++;
572 741
@@ -575,6 +744,8 @@ static void __init mdesc_fill_in_cpu_data(void)
575#ifdef CONFIG_SMP 744#ifdef CONFIG_SMP
576 if (cpuid >= NR_CPUS) 745 if (cpuid >= NR_CPUS)
577 continue; 746 continue;
747 if (!cpu_isset(cpuid, mask))
748 continue;
578#else 749#else
579 /* On uniprocessor we only want the values for the 750 /* On uniprocessor we only want the values for the
580 * real physical cpu the kernel booted onto, however 751 * real physical cpu the kernel booted onto, however
@@ -589,35 +760,30 @@ static void __init mdesc_fill_in_cpu_data(void)
589 c->clock_tick = *cfreq; 760 c->clock_tick = *cfreq;
590 761
591 tb = &trap_block[cpuid]; 762 tb = &trap_block[cpuid];
592 get_mondo_data(mp, tb); 763 get_mondo_data(hp, mp, tb);
593
594 for (i = 0; i < mp->num_arcs; i++) {
595 struct mdesc_node *t = mp->arcs[i].arc;
596 unsigned int j;
597 764
598 if (strcmp(mp->arcs[i].name, "fwd")) 765 mdesc_for_each_arc(a, hp, mp, MDESC_ARC_TYPE_FWD) {
599 continue; 766 u64 j, t = mdesc_arc_target(hp, a);
767 const char *t_name;
600 768
601 if (!strcmp(t->name, "cache")) { 769 t_name = mdesc_node_name(hp, t);
602 fill_in_one_cache(c, t); 770 if (!strcmp(t_name, "cache")) {
771 fill_in_one_cache(c, hp, t);
603 continue; 772 continue;
604 } 773 }
605 774
606 for (j = 0; j < t->num_arcs; j++) { 775 mdesc_for_each_arc(j, hp, t, MDESC_ARC_TYPE_FWD) {
607 struct mdesc_node *n; 776 u64 n = mdesc_arc_target(hp, j);
608 777 const char *n_name;
609 n = t->arcs[j].arc;
610 if (strcmp(t->arcs[j].name, "fwd"))
611 continue;
612 778
613 if (!strcmp(n->name, "cache")) 779 n_name = mdesc_node_name(hp, n);
614 fill_in_one_cache(c, n); 780 if (!strcmp(n_name, "cache"))
781 fill_in_one_cache(c, hp, n);
615 } 782 }
616 } 783 }
617 784
618#ifdef CONFIG_SMP 785#ifdef CONFIG_SMP
619 cpu_set(cpuid, cpu_present_map); 786 cpu_set(cpuid, cpu_present_map);
620 cpu_set(cpuid, phys_cpu_present_map);
621#endif 787#endif
622 788
623 c->core_id = 0; 789 c->core_id = 0;
@@ -628,45 +794,43 @@ static void __init mdesc_fill_in_cpu_data(void)
628 sparc64_multi_core = 1; 794 sparc64_multi_core = 1;
629#endif 795#endif
630 796
631 set_core_ids(); 797 set_core_ids(hp);
632 set_proc_ids(); 798 set_proc_ids(hp);
633 799
634 smp_fill_in_sib_core_maps(); 800 smp_fill_in_sib_core_maps();
801
802 mdesc_release(hp);
635} 803}
636 804
637void __init sun4v_mdesc_init(void) 805void __init sun4v_mdesc_init(void)
638{ 806{
807 struct mdesc_handle *hp;
639 unsigned long len, real_len, status; 808 unsigned long len, real_len, status;
809 cpumask_t mask;
640 810
641 (void) sun4v_mach_desc(0UL, 0UL, &len); 811 (void) sun4v_mach_desc(0UL, 0UL, &len);
642 812
643 printk("MDESC: Size is %lu bytes.\n", len); 813 printk("MDESC: Size is %lu bytes.\n", len);
644 814
645 main_mdesc = mdesc_early_alloc(len); 815 hp = mdesc_alloc(len, &bootmem_mdesc_memops);
816 if (hp == NULL) {
817 prom_printf("MDESC: alloc of %lu bytes failed.\n", len);
818 prom_halt();
819 }
646 820
647 status = sun4v_mach_desc(__pa(main_mdesc), len, &real_len); 821 status = sun4v_mach_desc(__pa(&hp->mdesc), len, &real_len);
648 if (status != HV_EOK || real_len > len) { 822 if (status != HV_EOK || real_len > len) {
649 prom_printf("sun4v_mach_desc fails, err(%lu), " 823 prom_printf("sun4v_mach_desc fails, err(%lu), "
650 "len(%lu), real_len(%lu)\n", 824 "len(%lu), real_len(%lu)\n",
651 status, len, real_len); 825 status, len, real_len);
826 mdesc_free(hp);
652 prom_halt(); 827 prom_halt();
653 } 828 }
654 829
655 len = count_nodes(main_mdesc); 830 cur_mdesc = hp;
656 printk("MDESC: %lu nodes.\n", len);
657
658 len = roundup_pow_of_two(len);
659
660 mdesc_hash = mdesc_early_alloc(len * sizeof(struct mdesc_node *));
661 mdesc_hash_size = len;
662
663 printk("MDESC: Hash size %lu entries.\n", len);
664
665 build_all_nodes(main_mdesc);
666
667 printk("MDESC: Built graph with %u bytes of memory.\n",
668 mdesc_early_allocated);
669 831
670 report_platform_properties(); 832 report_platform_properties();
671 mdesc_fill_in_cpu_data(); 833
834 cpus_setall(mask);
835 mdesc_fill_in_cpu_data(mask);
672} 836}
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
index 81f4a5ea05..55ad1b899b 100644
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -448,6 +448,7 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
448 */ 448 */
449 pci_read_config_dword(dev, PCI_CLASS_REVISION, &class); 449 pci_read_config_dword(dev, PCI_CLASS_REVISION, &class);
450 dev->class = class >> 8; 450 dev->class = class >> 8;
451 dev->revision = class & 0xff;
451 452
452 sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), 453 sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus),
453 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); 454 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn));
diff --git a/arch/sparc64/kernel/power.c b/arch/sparc64/kernel/power.c
index 5d6adea396..8dd4294ad2 100644
--- a/arch/sparc64/kernel/power.c
+++ b/arch/sparc64/kernel/power.c
@@ -1,7 +1,6 @@
1/* $Id: power.c,v 1.10 2001/12/11 01:57:16 davem Exp $ 1/* power.c: Power management driver.
2 * power.c: Power management driver.
3 * 2 *
4 * Copyright (C) 1999 David S. Miller (davem@redhat.com) 3 * Copyright (C) 1999, 2007 David S. Miller (davem@davemloft.net)
5 */ 4 */
6 5
7#include <linux/kernel.h> 6#include <linux/kernel.h>
@@ -19,6 +18,7 @@
19#include <asm/prom.h> 18#include <asm/prom.h>
20#include <asm/of_device.h> 19#include <asm/of_device.h>
21#include <asm/io.h> 20#include <asm/io.h>
21#include <asm/power.h>
22#include <asm/sstate.h> 22#include <asm/sstate.h>
23 23
24#include <linux/unistd.h> 24#include <linux/unistd.h>
@@ -29,24 +29,26 @@
29 */ 29 */
30int scons_pwroff = 1; 30int scons_pwroff = 1;
31 31
32#ifdef CONFIG_PCI
33#include <linux/pci.h>
34static void __iomem *power_reg; 32static void __iomem *power_reg;
35 33
36static DECLARE_WAIT_QUEUE_HEAD(powerd_wait); 34static DECLARE_WAIT_QUEUE_HEAD(powerd_wait);
37static int button_pressed; 35static int button_pressed;
38 36
39static irqreturn_t power_handler(int irq, void *dev_id) 37void wake_up_powerd(void)
40{ 38{
41 if (button_pressed == 0) { 39 if (button_pressed == 0) {
42 button_pressed = 1; 40 button_pressed = 1;
43 wake_up(&powerd_wait); 41 wake_up(&powerd_wait);
44 } 42 }
43}
44
45static irqreturn_t power_handler(int irq, void *dev_id)
46{
47 wake_up_powerd();
45 48
46 /* FIXME: Check registers for status... */ 49 /* FIXME: Check registers for status... */
47 return IRQ_HANDLED; 50 return IRQ_HANDLED;
48} 51}
49#endif /* CONFIG_PCI */
50 52
51extern void machine_halt(void); 53extern void machine_halt(void);
52extern void machine_alt_power_off(void); 54extern void machine_alt_power_off(void);
@@ -56,19 +58,18 @@ void machine_power_off(void)
56{ 58{
57 sstate_poweroff(); 59 sstate_poweroff();
58 if (!serial_console || scons_pwroff) { 60 if (!serial_console || scons_pwroff) {
59#ifdef CONFIG_PCI
60 if (power_reg) { 61 if (power_reg) {
61 /* Both register bits seem to have the 62 /* Both register bits seem to have the
62 * same effect, so until I figure out 63 * same effect, so until I figure out
63 * what the difference is... 64 * what the difference is...
64 */ 65 */
65 writel(AUXIO_PCIO_CPWR_OFF | AUXIO_PCIO_SPWR_OFF, power_reg); 66 writel(AUXIO_PCIO_CPWR_OFF | AUXIO_PCIO_SPWR_OFF, power_reg);
66 } else 67 } else {
67#endif /* CONFIG_PCI */
68 if (poweroff_method != NULL) { 68 if (poweroff_method != NULL) {
69 poweroff_method(); 69 poweroff_method();
70 /* not reached */ 70 /* not reached */
71 } 71 }
72 }
72 } 73 }
73 machine_halt(); 74 machine_halt();
74} 75}
@@ -76,7 +77,6 @@ void machine_power_off(void)
76void (*pm_power_off)(void) = machine_power_off; 77void (*pm_power_off)(void) = machine_power_off;
77EXPORT_SYMBOL(pm_power_off); 78EXPORT_SYMBOL(pm_power_off);
78 79
79#ifdef CONFIG_PCI
80static int powerd(void *__unused) 80static int powerd(void *__unused)
81{ 81{
82 static char *envp[] = { "HOME=/", "TERM=linux", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL }; 82 static char *envp[] = { "HOME=/", "TERM=linux", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL };
@@ -86,7 +86,7 @@ static int powerd(void *__unused)
86 daemonize("powerd"); 86 daemonize("powerd");
87 87
88 add_wait_queue(&powerd_wait, &wait); 88 add_wait_queue(&powerd_wait, &wait);
89again: 89
90 for (;;) { 90 for (;;) {
91 set_task_state(current, TASK_INTERRUPTIBLE); 91 set_task_state(current, TASK_INTERRUPTIBLE);
92 if (button_pressed) 92 if (button_pressed)
@@ -100,16 +100,28 @@ again:
100 /* Ok, down we go... */ 100 /* Ok, down we go... */
101 button_pressed = 0; 101 button_pressed = 0;
102 if (kernel_execve("/sbin/shutdown", argv, envp) < 0) { 102 if (kernel_execve("/sbin/shutdown", argv, envp) < 0) {
103 printk("powerd: shutdown execution failed\n"); 103 printk(KERN_ERR "powerd: shutdown execution failed\n");
104 add_wait_queue(&powerd_wait, &wait); 104 machine_power_off();
105 goto again;
106 } 105 }
107 return 0; 106 return 0;
108} 107}
109 108
109int start_powerd(void)
110{
111 int err;
112
113 err = kernel_thread(powerd, NULL, CLONE_FS);
114 if (err < 0)
115 printk(KERN_ERR "power: Failed to start power daemon.\n");
116 else
117 printk(KERN_INFO "power: powerd running.\n");
118
119 return err;
120}
121
110static int __init has_button_interrupt(unsigned int irq, struct device_node *dp) 122static int __init has_button_interrupt(unsigned int irq, struct device_node *dp)
111{ 123{
112 if (irq == PCI_IRQ_NONE) 124 if (irq == 0xffffffff)
113 return 0; 125 return 0;
114 if (!of_find_property(dp, "button", NULL)) 126 if (!of_find_property(dp, "button", NULL))
115 return 0; 127 return 0;
@@ -130,17 +142,14 @@ static int __devinit power_probe(struct of_device *op, const struct of_device_id
130 poweroff_method = machine_halt; /* able to use the standard halt */ 142 poweroff_method = machine_halt; /* able to use the standard halt */
131 143
132 if (has_button_interrupt(irq, op->node)) { 144 if (has_button_interrupt(irq, op->node)) {
133 if (kernel_thread(powerd, NULL, CLONE_FS) < 0) { 145 if (start_powerd() < 0)
134 printk("Failed to start power daemon.\n");
135 return 0; 146 return 0;
136 }
137 printk("powerd running.\n");
138 147
139 if (request_irq(irq, 148 if (request_irq(irq,
140 power_handler, 0, "power", NULL) < 0) 149 power_handler, 0, "power", NULL) < 0)
141 printk("power: Error, cannot register IRQ handler.\n"); 150 printk(KERN_ERR "power: Cannot setup IRQ handler.\n");
142 } else { 151 } else {
143 printk("not using powerd.\n"); 152 printk(KERN_INFO "power: Not using powerd.\n");
144 } 153 }
145 154
146 return 0; 155 return 0;
@@ -164,4 +173,3 @@ void __init power_init(void)
164 of_register_driver(&power_driver, &of_bus_type); 173 of_register_driver(&power_driver, &of_bus_type);
165 return; 174 return;
166} 175}
167#endif /* CONFIG_PCI */
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index f5f97e2c66..93557507ec 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -29,6 +29,7 @@
29#include <linux/compat.h> 29#include <linux/compat.h>
30#include <linux/tick.h> 30#include <linux/tick.h>
31#include <linux/init.h> 31#include <linux/init.h>
32#include <linux/cpu.h>
32 33
33#include <asm/oplib.h> 34#include <asm/oplib.h>
34#include <asm/uaccess.h> 35#include <asm/uaccess.h>
@@ -49,7 +50,7 @@
49 50
50/* #define VERBOSE_SHOWREGS */ 51/* #define VERBOSE_SHOWREGS */
51 52
52static void sparc64_yield(void) 53static void sparc64_yield(int cpu)
53{ 54{
54 if (tlb_type != hypervisor) 55 if (tlb_type != hypervisor)
55 return; 56 return;
@@ -57,7 +58,7 @@ static void sparc64_yield(void)
57 clear_thread_flag(TIF_POLLING_NRFLAG); 58 clear_thread_flag(TIF_POLLING_NRFLAG);
58 smp_mb__after_clear_bit(); 59 smp_mb__after_clear_bit();
59 60
60 while (!need_resched()) { 61 while (!need_resched() && !cpu_is_offline(cpu)) {
61 unsigned long pstate; 62 unsigned long pstate;
62 63
63 /* Disable interrupts. */ 64 /* Disable interrupts. */
@@ -68,7 +69,7 @@ static void sparc64_yield(void)
68 : "=&r" (pstate) 69 : "=&r" (pstate)
69 : "i" (PSTATE_IE)); 70 : "i" (PSTATE_IE));
70 71
71 if (!need_resched()) 72 if (!need_resched() && !cpu_is_offline(cpu))
72 sun4v_cpu_yield(); 73 sun4v_cpu_yield();
73 74
74 /* Re-enable interrupts. */ 75 /* Re-enable interrupts. */
@@ -86,15 +87,25 @@ static void sparc64_yield(void)
86/* The idle loop on sparc64. */ 87/* The idle loop on sparc64. */
87void cpu_idle(void) 88void cpu_idle(void)
88{ 89{
90 int cpu = smp_processor_id();
91
89 set_thread_flag(TIF_POLLING_NRFLAG); 92 set_thread_flag(TIF_POLLING_NRFLAG);
90 93
91 while(1) { 94 while(1) {
92 tick_nohz_stop_sched_tick(); 95 tick_nohz_stop_sched_tick();
93 while (!need_resched()) 96
94 sparc64_yield(); 97 while (!need_resched() && !cpu_is_offline(cpu))
98 sparc64_yield(cpu);
99
95 tick_nohz_restart_sched_tick(); 100 tick_nohz_restart_sched_tick();
96 101
97 preempt_enable_no_resched(); 102 preempt_enable_no_resched();
103
104#ifdef CONFIG_HOTPLUG_CPU
105 if (cpu_is_offline(cpu))
106 cpu_play_dead();
107#endif
108
98 schedule(); 109 schedule();
99 preempt_disable(); 110 preempt_disable();
100 } 111 }
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c
index 61036b3466..5d220302cd 100644
--- a/arch/sparc64/kernel/prom.c
+++ b/arch/sparc64/kernel/prom.c
@@ -1808,7 +1808,7 @@ static void __init of_fill_in_cpu_data(void)
1808 1808
1809#ifdef CONFIG_SMP 1809#ifdef CONFIG_SMP
1810 cpu_set(cpuid, cpu_present_map); 1810 cpu_set(cpuid, cpu_present_map);
1811 cpu_set(cpuid, phys_cpu_present_map); 1811 cpu_set(cpuid, cpu_possible_map);
1812#endif 1812#endif
1813 } 1813 }
1814 1814
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c
index 7490cc670a..aafde3dd9f 100644
--- a/arch/sparc64/kernel/setup.c
+++ b/arch/sparc64/kernel/setup.c
@@ -442,7 +442,6 @@ static int show_cpuinfo(struct seq_file *m, void *__unused)
442 "D$ parity tl1\t: %u\n" 442 "D$ parity tl1\t: %u\n"
443 "I$ parity tl1\t: %u\n" 443 "I$ parity tl1\t: %u\n"
444#ifndef CONFIG_SMP 444#ifndef CONFIG_SMP
445 "Cpu0Bogo\t: %lu.%02lu\n"
446 "Cpu0ClkTck\t: %016lx\n" 445 "Cpu0ClkTck\t: %016lx\n"
447#endif 446#endif
448 , 447 ,
@@ -457,9 +456,7 @@ static int show_cpuinfo(struct seq_file *m, void *__unused)
457 dcache_parity_tl1_occurred, 456 dcache_parity_tl1_occurred,
458 icache_parity_tl1_occurred 457 icache_parity_tl1_occurred
459#ifndef CONFIG_SMP 458#ifndef CONFIG_SMP
460 , cpu_data(0).udelay_val/(500000/HZ), 459 , cpu_data(0).clock_tick
461 (cpu_data(0).udelay_val/(5000/HZ)) % 100,
462 cpu_data(0).clock_tick
463#endif 460#endif
464 ); 461 );
465#ifdef CONFIG_SMP 462#ifdef CONFIG_SMP
diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c
index 203e873010..fb13775b36 100644
--- a/arch/sparc64/kernel/signal.c
+++ b/arch/sparc64/kernel/signal.c
@@ -289,9 +289,7 @@ void do_rt_sigreturn(struct pt_regs *regs)
289 struct rt_signal_frame __user *sf; 289 struct rt_signal_frame __user *sf;
290 unsigned long tpc, tnpc, tstate; 290 unsigned long tpc, tnpc, tstate;
291 __siginfo_fpu_t __user *fpu_save; 291 __siginfo_fpu_t __user *fpu_save;
292 mm_segment_t old_fs;
293 sigset_t set; 292 sigset_t set;
294 stack_t st;
295 int err; 293 int err;
296 294
297 /* Always make any pending restarted system calls return -EINTR */ 295 /* Always make any pending restarted system calls return -EINTR */
@@ -327,20 +325,13 @@ void do_rt_sigreturn(struct pt_regs *regs)
327 err |= restore_fpu_state(regs, &sf->fpu_state); 325 err |= restore_fpu_state(regs, &sf->fpu_state);
328 326
329 err |= __copy_from_user(&set, &sf->mask, sizeof(sigset_t)); 327 err |= __copy_from_user(&set, &sf->mask, sizeof(sigset_t));
330 err |= __copy_from_user(&st, &sf->stack, sizeof(stack_t)); 328 err |= do_sigaltstack(&sf->stack, NULL, (unsigned long)sf);
331 329
332 if (err) 330 if (err)
333 goto segv; 331 goto segv;
334 332
335 regs->tpc = tpc; 333 regs->tpc = tpc;
336 regs->tnpc = tnpc; 334 regs->tnpc = tnpc;
337
338 /* It is more difficult to avoid calling this function than to
339 call it and ignore errors. */
340 old_fs = get_fs();
341 set_fs(KERNEL_DS);
342 do_sigaltstack((const stack_t __user *) &st, NULL, (unsigned long)sf);
343 set_fs(old_fs);
344 335
345 sigdelsetmask(&set, ~_BLOCKABLE); 336 sigdelsetmask(&set, ~_BLOCKABLE);
346 spin_lock_irq(&current->sighand->siglock); 337 spin_lock_irq(&current->sighand->siglock);
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index 4dcd7d0b60..b448d33321 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -1,6 +1,6 @@
1/* smp.c: Sparc64 SMP support. 1/* smp.c: Sparc64 SMP support.
2 * 2 *
3 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 3 * Copyright (C) 1997, 2007 David S. Miller (davem@davemloft.net)
4 */ 4 */
5 5
6#include <linux/module.h> 6#include <linux/module.h>
@@ -28,6 +28,8 @@
28#include <asm/tlbflush.h> 28#include <asm/tlbflush.h>
29#include <asm/mmu_context.h> 29#include <asm/mmu_context.h>
30#include <asm/cpudata.h> 30#include <asm/cpudata.h>
31#include <asm/hvtramp.h>
32#include <asm/io.h>
31 33
32#include <asm/irq.h> 34#include <asm/irq.h>
33#include <asm/irq_regs.h> 35#include <asm/irq_regs.h>
@@ -41,22 +43,26 @@
41#include <asm/sections.h> 43#include <asm/sections.h>
42#include <asm/prom.h> 44#include <asm/prom.h>
43#include <asm/mdesc.h> 45#include <asm/mdesc.h>
46#include <asm/ldc.h>
47#include <asm/hypervisor.h>
44 48
45extern void calibrate_delay(void); 49extern void calibrate_delay(void);
46 50
47int sparc64_multi_core __read_mostly; 51int sparc64_multi_core __read_mostly;
48 52
49/* Please don't make this stuff initdata!!! --DaveM */ 53cpumask_t cpu_possible_map __read_mostly = CPU_MASK_NONE;
50unsigned char boot_cpu_id;
51
52cpumask_t cpu_online_map __read_mostly = CPU_MASK_NONE; 54cpumask_t cpu_online_map __read_mostly = CPU_MASK_NONE;
53cpumask_t phys_cpu_present_map __read_mostly = CPU_MASK_NONE;
54cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly = 55cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly =
55 { [0 ... NR_CPUS-1] = CPU_MASK_NONE }; 56 { [0 ... NR_CPUS-1] = CPU_MASK_NONE };
56cpumask_t cpu_core_map[NR_CPUS] __read_mostly = 57cpumask_t cpu_core_map[NR_CPUS] __read_mostly =
57 { [0 ... NR_CPUS-1] = CPU_MASK_NONE }; 58 { [0 ... NR_CPUS-1] = CPU_MASK_NONE };
59
60EXPORT_SYMBOL(cpu_possible_map);
61EXPORT_SYMBOL(cpu_online_map);
62EXPORT_SYMBOL(cpu_sibling_map);
63EXPORT_SYMBOL(cpu_core_map);
64
58static cpumask_t smp_commenced_mask; 65static cpumask_t smp_commenced_mask;
59static cpumask_t cpu_callout_map;
60 66
61void smp_info(struct seq_file *m) 67void smp_info(struct seq_file *m)
62{ 68{
@@ -73,18 +79,17 @@ void smp_bogo(struct seq_file *m)
73 79
74 for_each_online_cpu(i) 80 for_each_online_cpu(i)
75 seq_printf(m, 81 seq_printf(m,
76 "Cpu%dBogo\t: %lu.%02lu\n"
77 "Cpu%dClkTck\t: %016lx\n", 82 "Cpu%dClkTck\t: %016lx\n",
78 i, cpu_data(i).udelay_val / (500000/HZ),
79 (cpu_data(i).udelay_val / (5000/HZ)) % 100,
80 i, cpu_data(i).clock_tick); 83 i, cpu_data(i).clock_tick);
81} 84}
82 85
86static __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_lock);
87
83extern void setup_sparc64_timer(void); 88extern void setup_sparc64_timer(void);
84 89
85static volatile unsigned long callin_flag = 0; 90static volatile unsigned long callin_flag = 0;
86 91
87void __init smp_callin(void) 92void __devinit smp_callin(void)
88{ 93{
89 int cpuid = hard_smp_processor_id(); 94 int cpuid = hard_smp_processor_id();
90 95
@@ -102,8 +107,6 @@ void __init smp_callin(void)
102 107
103 local_irq_enable(); 108 local_irq_enable();
104 109
105 calibrate_delay();
106 cpu_data(cpuid).udelay_val = loops_per_jiffy;
107 callin_flag = 1; 110 callin_flag = 1;
108 __asm__ __volatile__("membar #Sync\n\t" 111 __asm__ __volatile__("membar #Sync\n\t"
109 "flush %%g6" : : : "memory"); 112 "flush %%g6" : : : "memory");
@@ -120,7 +123,9 @@ void __init smp_callin(void)
120 while (!cpu_isset(cpuid, smp_commenced_mask)) 123 while (!cpu_isset(cpuid, smp_commenced_mask))
121 rmb(); 124 rmb();
122 125
126 spin_lock(&call_lock);
123 cpu_set(cpuid, cpu_online_map); 127 cpu_set(cpuid, cpu_online_map);
128 spin_unlock(&call_lock);
124 129
125 /* idle thread is expected to have preempt disabled */ 130 /* idle thread is expected to have preempt disabled */
126 preempt_disable(); 131 preempt_disable();
@@ -268,6 +273,67 @@ static void smp_synchronize_one_tick(int cpu)
268 spin_unlock_irqrestore(&itc_sync_lock, flags); 273 spin_unlock_irqrestore(&itc_sync_lock, flags);
269} 274}
270 275
276#if defined(CONFIG_SUN_LDOMS) && defined(CONFIG_HOTPLUG_CPU)
277/* XXX Put this in some common place. XXX */
278static unsigned long kimage_addr_to_ra(void *p)
279{
280 unsigned long val = (unsigned long) p;
281
282 return kern_base + (val - KERNBASE);
283}
284
285static void ldom_startcpu_cpuid(unsigned int cpu, unsigned long thread_reg)
286{
287 extern unsigned long sparc64_ttable_tl0;
288 extern unsigned long kern_locked_tte_data;
289 extern int bigkernel;
290 struct hvtramp_descr *hdesc;
291 unsigned long trampoline_ra;
292 struct trap_per_cpu *tb;
293 u64 tte_vaddr, tte_data;
294 unsigned long hv_err;
295
296 hdesc = kzalloc(sizeof(*hdesc), GFP_KERNEL);
297 if (!hdesc) {
298 printk(KERN_ERR "ldom_startcpu_cpuid: Cannot allocate "
299 "hvtramp_descr.\n");
300 return;
301 }
302
303 hdesc->cpu = cpu;
304 hdesc->num_mappings = (bigkernel ? 2 : 1);
305
306 tb = &trap_block[cpu];
307 tb->hdesc = hdesc;
308
309 hdesc->fault_info_va = (unsigned long) &tb->fault_info;
310 hdesc->fault_info_pa = kimage_addr_to_ra(&tb->fault_info);
311
312 hdesc->thread_reg = thread_reg;
313
314 tte_vaddr = (unsigned long) KERNBASE;
315 tte_data = kern_locked_tte_data;
316
317 hdesc->maps[0].vaddr = tte_vaddr;
318 hdesc->maps[0].tte = tte_data;
319 if (bigkernel) {
320 tte_vaddr += 0x400000;
321 tte_data += 0x400000;
322 hdesc->maps[1].vaddr = tte_vaddr;
323 hdesc->maps[1].tte = tte_data;
324 }
325
326 trampoline_ra = kimage_addr_to_ra(hv_cpu_startup);
327
328 hv_err = sun4v_cpu_start(cpu, trampoline_ra,
329 kimage_addr_to_ra(&sparc64_ttable_tl0),
330 __pa(hdesc));
331 if (hv_err)
332 printk(KERN_ERR "ldom_startcpu_cpuid: sun4v_cpu_start() "
333 "gives error %lu\n", hv_err);
334}
335#endif
336
271extern void sun4v_init_mondo_queues(int use_bootmem, int cpu, int alloc, int load); 337extern void sun4v_init_mondo_queues(int use_bootmem, int cpu, int alloc, int load);
272 338
273extern unsigned long sparc64_cpu_startup; 339extern unsigned long sparc64_cpu_startup;
@@ -280,6 +346,7 @@ static struct thread_info *cpu_new_thread = NULL;
280 346
281static int __devinit smp_boot_one_cpu(unsigned int cpu) 347static int __devinit smp_boot_one_cpu(unsigned int cpu)
282{ 348{
349 struct trap_per_cpu *tb = &trap_block[cpu];
283 unsigned long entry = 350 unsigned long entry =
284 (unsigned long)(&sparc64_cpu_startup); 351 (unsigned long)(&sparc64_cpu_startup);
285 unsigned long cookie = 352 unsigned long cookie =
@@ -290,20 +357,25 @@ static int __devinit smp_boot_one_cpu(unsigned int cpu)
290 p = fork_idle(cpu); 357 p = fork_idle(cpu);
291 callin_flag = 0; 358 callin_flag = 0;
292 cpu_new_thread = task_thread_info(p); 359 cpu_new_thread = task_thread_info(p);
293 cpu_set(cpu, cpu_callout_map);
294 360
295 if (tlb_type == hypervisor) { 361 if (tlb_type == hypervisor) {
296 /* Alloc the mondo queues, cpu will load them. */ 362 /* Alloc the mondo queues, cpu will load them. */
297 sun4v_init_mondo_queues(0, cpu, 1, 0); 363 sun4v_init_mondo_queues(0, cpu, 1, 0);
298 364
299 prom_startcpu_cpuid(cpu, entry, cookie); 365#if defined(CONFIG_SUN_LDOMS) && defined(CONFIG_HOTPLUG_CPU)
366 if (ldom_domaining_enabled)
367 ldom_startcpu_cpuid(cpu,
368 (unsigned long) cpu_new_thread);
369 else
370#endif
371 prom_startcpu_cpuid(cpu, entry, cookie);
300 } else { 372 } else {
301 struct device_node *dp = of_find_node_by_cpuid(cpu); 373 struct device_node *dp = of_find_node_by_cpuid(cpu);
302 374
303 prom_startcpu(dp->node, entry, cookie); 375 prom_startcpu(dp->node, entry, cookie);
304 } 376 }
305 377
306 for (timeout = 0; timeout < 5000000; timeout++) { 378 for (timeout = 0; timeout < 50000; timeout++) {
307 if (callin_flag) 379 if (callin_flag)
308 break; 380 break;
309 udelay(100); 381 udelay(100);
@@ -313,11 +385,15 @@ static int __devinit smp_boot_one_cpu(unsigned int cpu)
313 ret = 0; 385 ret = 0;
314 } else { 386 } else {
315 printk("Processor %d is stuck.\n", cpu); 387 printk("Processor %d is stuck.\n", cpu);
316 cpu_clear(cpu, cpu_callout_map);
317 ret = -ENODEV; 388 ret = -ENODEV;
318 } 389 }
319 cpu_new_thread = NULL; 390 cpu_new_thread = NULL;
320 391
392 if (tb->hdesc) {
393 kfree(tb->hdesc);
394 tb->hdesc = NULL;
395 }
396
321 return ret; 397 return ret;
322} 398}
323 399
@@ -720,7 +796,6 @@ struct call_data_struct {
720 int wait; 796 int wait;
721}; 797};
722 798
723static __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_lock);
724static struct call_data_struct *call_data; 799static struct call_data_struct *call_data;
725 800
726extern unsigned long xcall_call_function; 801extern unsigned long xcall_call_function;
@@ -1152,61 +1227,14 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs)
1152 preempt_enable(); 1227 preempt_enable();
1153} 1228}
1154 1229
1155void __init smp_tick_init(void)
1156{
1157 boot_cpu_id = hard_smp_processor_id();
1158}
1159
1160/* /proc/profile writes can call this, don't __init it please. */ 1230/* /proc/profile writes can call this, don't __init it please. */
1161int setup_profiling_timer(unsigned int multiplier) 1231int setup_profiling_timer(unsigned int multiplier)
1162{ 1232{
1163 return -EINVAL; 1233 return -EINVAL;
1164} 1234}
1165 1235
1166static void __init smp_tune_scheduling(void)
1167{
1168 unsigned int smallest = ~0U;
1169 int i;
1170
1171 for (i = 0; i < NR_CPUS; i++) {
1172 unsigned int val = cpu_data(i).ecache_size;
1173
1174 if (val && val < smallest)
1175 smallest = val;
1176 }
1177
1178 /* Any value less than 256K is nonsense. */
1179 if (smallest < (256U * 1024U))
1180 smallest = 256 * 1024;
1181
1182 max_cache_size = smallest;
1183
1184 if (smallest < 1U * 1024U * 1024U)
1185 printk(KERN_INFO "Using max_cache_size of %uKB\n",
1186 smallest / 1024U);
1187 else
1188 printk(KERN_INFO "Using max_cache_size of %uMB\n",
1189 smallest / 1024U / 1024U);
1190}
1191
1192/* Constrain the number of cpus to max_cpus. */
1193void __init smp_prepare_cpus(unsigned int max_cpus) 1236void __init smp_prepare_cpus(unsigned int max_cpus)
1194{ 1237{
1195 int i;
1196
1197 if (num_possible_cpus() > max_cpus) {
1198 for_each_possible_cpu(i) {
1199 if (i != boot_cpu_id) {
1200 cpu_clear(i, phys_cpu_present_map);
1201 cpu_clear(i, cpu_present_map);
1202 if (num_possible_cpus() <= max_cpus)
1203 break;
1204 }
1205 }
1206 }
1207
1208 cpu_data(boot_cpu_id).udelay_val = loops_per_jiffy;
1209 smp_tune_scheduling();
1210} 1238}
1211 1239
1212void __devinit smp_prepare_boot_cpu(void) 1240void __devinit smp_prepare_boot_cpu(void)
@@ -1217,30 +1245,32 @@ void __devinit smp_fill_in_sib_core_maps(void)
1217{ 1245{
1218 unsigned int i; 1246 unsigned int i;
1219 1247
1220 for_each_possible_cpu(i) { 1248 for_each_present_cpu(i) {
1221 unsigned int j; 1249 unsigned int j;
1222 1250
1251 cpus_clear(cpu_core_map[i]);
1223 if (cpu_data(i).core_id == 0) { 1252 if (cpu_data(i).core_id == 0) {
1224 cpu_set(i, cpu_core_map[i]); 1253 cpu_set(i, cpu_core_map[i]);
1225 continue; 1254 continue;
1226 } 1255 }
1227 1256
1228 for_each_possible_cpu(j) { 1257 for_each_present_cpu(j) {
1229 if (cpu_data(i).core_id == 1258 if (cpu_data(i).core_id ==
1230 cpu_data(j).core_id) 1259 cpu_data(j).core_id)
1231 cpu_set(j, cpu_core_map[i]); 1260 cpu_set(j, cpu_core_map[i]);
1232 } 1261 }
1233 } 1262 }
1234 1263
1235 for_each_possible_cpu(i) { 1264 for_each_present_cpu(i) {
1236 unsigned int j; 1265 unsigned int j;
1237 1266
1267 cpus_clear(cpu_sibling_map[i]);
1238 if (cpu_data(i).proc_id == -1) { 1268 if (cpu_data(i).proc_id == -1) {
1239 cpu_set(i, cpu_sibling_map[i]); 1269 cpu_set(i, cpu_sibling_map[i]);
1240 continue; 1270 continue;
1241 } 1271 }
1242 1272
1243 for_each_possible_cpu(j) { 1273 for_each_present_cpu(j) {
1244 if (cpu_data(i).proc_id == 1274 if (cpu_data(i).proc_id ==
1245 cpu_data(j).proc_id) 1275 cpu_data(j).proc_id)
1246 cpu_set(j, cpu_sibling_map[i]); 1276 cpu_set(j, cpu_sibling_map[i]);
@@ -1269,18 +1299,112 @@ int __cpuinit __cpu_up(unsigned int cpu)
1269 return ret; 1299 return ret;
1270} 1300}
1271 1301
1272void __init smp_cpus_done(unsigned int max_cpus) 1302#ifdef CONFIG_HOTPLUG_CPU
1303void cpu_play_dead(void)
1273{ 1304{
1274 unsigned long bogosum = 0; 1305 int cpu = smp_processor_id();
1306 unsigned long pstate;
1307
1308 idle_task_exit();
1309
1310 if (tlb_type == hypervisor) {
1311 struct trap_per_cpu *tb = &trap_block[cpu];
1312
1313 sun4v_cpu_qconf(HV_CPU_QUEUE_CPU_MONDO,
1314 tb->cpu_mondo_pa, 0);
1315 sun4v_cpu_qconf(HV_CPU_QUEUE_DEVICE_MONDO,
1316 tb->dev_mondo_pa, 0);
1317 sun4v_cpu_qconf(HV_CPU_QUEUE_RES_ERROR,
1318 tb->resum_mondo_pa, 0);
1319 sun4v_cpu_qconf(HV_CPU_QUEUE_NONRES_ERROR,
1320 tb->nonresum_mondo_pa, 0);
1321 }
1322
1323 cpu_clear(cpu, smp_commenced_mask);
1324 membar_safe("#Sync");
1325
1326 local_irq_disable();
1327
1328 __asm__ __volatile__(
1329 "rdpr %%pstate, %0\n\t"
1330 "wrpr %0, %1, %%pstate"
1331 : "=r" (pstate)
1332 : "i" (PSTATE_IE));
1333
1334 while (1)
1335 barrier();
1336}
1337
1338int __cpu_disable(void)
1339{
1340 int cpu = smp_processor_id();
1341 cpuinfo_sparc *c;
1275 int i; 1342 int i;
1276 1343
1277 for_each_online_cpu(i) 1344 for_each_cpu_mask(i, cpu_core_map[cpu])
1278 bogosum += cpu_data(i).udelay_val; 1345 cpu_clear(cpu, cpu_core_map[i]);
1279 printk("Total of %ld processors activated " 1346 cpus_clear(cpu_core_map[cpu]);
1280 "(%lu.%02lu BogoMIPS).\n", 1347
1281 (long) num_online_cpus(), 1348 for_each_cpu_mask(i, cpu_sibling_map[cpu])
1282 bogosum/(500000/HZ), 1349 cpu_clear(cpu, cpu_sibling_map[i]);
1283 (bogosum/(5000/HZ))%100); 1350 cpus_clear(cpu_sibling_map[cpu]);
1351
1352 c = &cpu_data(cpu);
1353
1354 c->core_id = 0;
1355 c->proc_id = -1;
1356
1357 spin_lock(&call_lock);
1358 cpu_clear(cpu, cpu_online_map);
1359 spin_unlock(&call_lock);
1360
1361 smp_wmb();
1362
1363 /* Make sure no interrupts point to this cpu. */
1364 fixup_irqs();
1365
1366 local_irq_enable();
1367 mdelay(1);
1368 local_irq_disable();
1369
1370 return 0;
1371}
1372
1373void __cpu_die(unsigned int cpu)
1374{
1375 int i;
1376
1377 for (i = 0; i < 100; i++) {
1378 smp_rmb();
1379 if (!cpu_isset(cpu, smp_commenced_mask))
1380 break;
1381 msleep(100);
1382 }
1383 if (cpu_isset(cpu, smp_commenced_mask)) {
1384 printk(KERN_ERR "CPU %u didn't die...\n", cpu);
1385 } else {
1386#if defined(CONFIG_SUN_LDOMS)
1387 unsigned long hv_err;
1388 int limit = 100;
1389
1390 do {
1391 hv_err = sun4v_cpu_stop(cpu);
1392 if (hv_err == HV_EOK) {
1393 cpu_clear(cpu, cpu_present_map);
1394 break;
1395 }
1396 } while (--limit > 0);
1397 if (limit <= 0) {
1398 printk(KERN_ERR "sun4v_cpu_stop() fails err=%lu\n",
1399 hv_err);
1400 }
1401#endif
1402 }
1403}
1404#endif
1405
1406void __init smp_cpus_done(unsigned int max_cpus)
1407{
1284} 1408}
1285 1409
1286void smp_send_reschedule(int cpu) 1410void smp_send_reschedule(int cpu)
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
index 6fa7616128..719d676c2d 100644
--- a/arch/sparc64/kernel/sparc64_ksyms.c
+++ b/arch/sparc64/kernel/sparc64_ksyms.c
@@ -1,7 +1,6 @@
1/* $Id: sparc64_ksyms.c,v 1.121 2002/02/09 19:49:31 davem Exp $ 1/* arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
2 * arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
3 * 2 *
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 3 * Copyright (C) 1996, 2007 David S. Miller (davem@davemloft.net)
5 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) 4 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
6 * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz) 5 * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz)
7 */ 6 */
@@ -28,7 +27,6 @@
28#include <net/compat.h> 27#include <net/compat.h>
29 28
30#include <asm/oplib.h> 29#include <asm/oplib.h>
31#include <asm/delay.h>
32#include <asm/system.h> 30#include <asm/system.h>
33#include <asm/auxio.h> 31#include <asm/auxio.h>
34#include <asm/pgtable.h> 32#include <asm/pgtable.h>
@@ -124,10 +122,6 @@ EXPORT_SYMBOL(__write_lock);
124EXPORT_SYMBOL(__write_unlock); 122EXPORT_SYMBOL(__write_unlock);
125EXPORT_SYMBOL(__write_trylock); 123EXPORT_SYMBOL(__write_trylock);
126 124
127/* CPU online map and active count. */
128EXPORT_SYMBOL(cpu_online_map);
129EXPORT_SYMBOL(phys_cpu_present_map);
130
131EXPORT_SYMBOL(smp_call_function); 125EXPORT_SYMBOL(smp_call_function);
132#endif /* CONFIG_SMP */ 126#endif /* CONFIG_SMP */
133 127
@@ -330,12 +324,6 @@ EXPORT_SYMBOL(memset);
330EXPORT_SYMBOL(memmove); 324EXPORT_SYMBOL(memmove);
331EXPORT_SYMBOL(strncmp); 325EXPORT_SYMBOL(strncmp);
332 326
333/* Delay routines. */
334EXPORT_SYMBOL(__udelay);
335EXPORT_SYMBOL(__ndelay);
336EXPORT_SYMBOL(__const_udelay);
337EXPORT_SYMBOL(__delay);
338
339void VISenter(void); 327void VISenter(void);
340/* RAID code needs this */ 328/* RAID code needs this */
341EXPORT_SYMBOL(VISenter); 329EXPORT_SYMBOL(VISenter);
diff --git a/arch/sparc64/kernel/sysfs.c b/arch/sparc64/kernel/sysfs.c
index cdb1477af8..52816c7be0 100644
--- a/arch/sparc64/kernel/sysfs.c
+++ b/arch/sparc64/kernel/sysfs.c
@@ -193,7 +193,6 @@ static ssize_t show_##NAME(struct sys_device *dev, char *buf) \
193} 193}
194 194
195SHOW_CPUDATA_ULONG_NAME(clock_tick, clock_tick); 195SHOW_CPUDATA_ULONG_NAME(clock_tick, clock_tick);
196SHOW_CPUDATA_ULONG_NAME(udelay_val, udelay_val);
197SHOW_CPUDATA_UINT_NAME(l1_dcache_size, dcache_size); 196SHOW_CPUDATA_UINT_NAME(l1_dcache_size, dcache_size);
198SHOW_CPUDATA_UINT_NAME(l1_dcache_line_size, dcache_line_size); 197SHOW_CPUDATA_UINT_NAME(l1_dcache_line_size, dcache_line_size);
199SHOW_CPUDATA_UINT_NAME(l1_icache_size, icache_size); 198SHOW_CPUDATA_UINT_NAME(l1_icache_size, icache_size);
@@ -203,7 +202,6 @@ SHOW_CPUDATA_UINT_NAME(l2_cache_line_size, ecache_line_size);
203 202
204static struct sysdev_attribute cpu_core_attrs[] = { 203static struct sysdev_attribute cpu_core_attrs[] = {
205 _SYSDEV_ATTR(clock_tick, 0444, show_clock_tick, NULL), 204 _SYSDEV_ATTR(clock_tick, 0444, show_clock_tick, NULL),
206 _SYSDEV_ATTR(udelay_val, 0444, show_udelay_val, NULL),
207 _SYSDEV_ATTR(l1_dcache_size, 0444, show_l1_dcache_size, NULL), 205 _SYSDEV_ATTR(l1_dcache_size, 0444, show_l1_dcache_size, NULL),
208 _SYSDEV_ATTR(l1_dcache_line_size, 0444, show_l1_dcache_line_size, NULL), 206 _SYSDEV_ATTR(l1_dcache_line_size, 0444, show_l1_dcache_line_size, NULL),
209 _SYSDEV_ATTR(l1_icache_size, 0444, show_l1_icache_size, NULL), 207 _SYSDEV_ATTR(l1_icache_size, 0444, show_l1_icache_size, NULL),
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index a31a043924..62e316ab13 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -849,9 +849,6 @@ static unsigned long sparc64_init_timers(void)
849{ 849{
850 struct device_node *dp; 850 struct device_node *dp;
851 unsigned long clock; 851 unsigned long clock;
852#ifdef CONFIG_SMP
853 extern void smp_tick_init(void);
854#endif
855 852
856 dp = of_find_node_by_path("/"); 853 dp = of_find_node_by_path("/");
857 if (tlb_type == spitfire) { 854 if (tlb_type == spitfire) {
@@ -874,10 +871,6 @@ static unsigned long sparc64_init_timers(void)
874 clock = of_getintprop_default(dp, "stick-frequency", 0); 871 clock = of_getintprop_default(dp, "stick-frequency", 0);
875 } 872 }
876 873
877#ifdef CONFIG_SMP
878 smp_tick_init();
879#endif
880
881 return clock; 874 return clock;
882} 875}
883 876
@@ -1038,10 +1031,31 @@ static void __init setup_clockevent_multiplier(unsigned long hz)
1038 sparc64_clockevent.mult = mult; 1031 sparc64_clockevent.mult = mult;
1039} 1032}
1040 1033
1034static unsigned long tb_ticks_per_usec __read_mostly;
1035
1036void __delay(unsigned long loops)
1037{
1038 unsigned long bclock, now;
1039
1040 bclock = tick_ops->get_tick();
1041 do {
1042 now = tick_ops->get_tick();
1043 } while ((now-bclock) < loops);
1044}
1045EXPORT_SYMBOL(__delay);
1046
1047void udelay(unsigned long usecs)
1048{
1049 __delay(tb_ticks_per_usec * usecs);
1050}
1051EXPORT_SYMBOL(udelay);
1052
1041void __init time_init(void) 1053void __init time_init(void)
1042{ 1054{
1043 unsigned long clock = sparc64_init_timers(); 1055 unsigned long clock = sparc64_init_timers();
1044 1056
1057 tb_ticks_per_usec = clock / USEC_PER_SEC;
1058
1045 timer_ticks_per_nsec_quotient = 1059 timer_ticks_per_nsec_quotient =
1046 clocksource_hz2mult(clock, SPARC64_NSEC_PER_CYC_SHIFT); 1060 clocksource_hz2mult(clock, SPARC64_NSEC_PER_CYC_SHIFT);
1047 1061
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index 00a9e3286c..6ef2d299fb 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -2225,6 +2225,7 @@ void die_if_kernel(char *str, struct pt_regs *regs)
2225 notify_die(DIE_OOPS, str, regs, 0, 255, SIGSEGV); 2225 notify_die(DIE_OOPS, str, regs, 0, 255, SIGSEGV);
2226 __asm__ __volatile__("flushw"); 2226 __asm__ __volatile__("flushw");
2227 __show_regs(regs); 2227 __show_regs(regs);
2228 add_taint(TAINT_DIE);
2228 if (regs->tstate & TSTATE_PRIV) { 2229 if (regs->tstate & TSTATE_PRIV) {
2229 struct reg_window *rw = (struct reg_window *) 2230 struct reg_window *rw = (struct reg_window *)
2230 (regs->u_regs[UREG_FP] + STACK_BIAS); 2231 (regs->u_regs[UREG_FP] + STACK_BIAS);
diff --git a/arch/sparc64/kernel/vio.c b/arch/sparc64/kernel/vio.c
new file mode 100644
index 0000000000..8d3cc4fdb5
--- /dev/null
+++ b/arch/sparc64/kernel/vio.c
@@ -0,0 +1,423 @@
1/* vio.c: Virtual I/O channel devices probing infrastructure.
2 *
3 * Copyright (c) 2003-2005 IBM Corp.
4 * Dave Engebretsen engebret@us.ibm.com
5 * Santiago Leon santil@us.ibm.com
6 * Hollis Blanchard <hollisb@us.ibm.com>
7 * Stephen Rothwell
8 *
9 * Adapted to sparc64 by David S. Miller davem@davemloft.net
10 */
11
12#include <linux/kernel.h>
13#include <linux/irq.h>
14#include <linux/init.h>
15
16#include <asm/mdesc.h>
17#include <asm/vio.h>
18
19static inline int find_in_proplist(const char *list, const char *match,
20 int len)
21{
22 while (len > 0) {
23 int l;
24
25 if (!strcmp(list, match))
26 return 1;
27 l = strlen(list) + 1;
28 list += l;
29 len -= l;
30 }
31 return 0;
32}
33
34static const struct vio_device_id *vio_match_device(
35 const struct vio_device_id *matches,
36 const struct vio_dev *dev)
37{
38 const char *type, *compat;
39 int len;
40
41 type = dev->type;
42 compat = dev->compat;
43 len = dev->compat_len;
44
45 while (matches->type[0] || matches->compat[0]) {
46 int match = 1;
47 if (matches->type[0])
48 match &= !strcmp(matches->type, type);
49
50 if (matches->compat[0]) {
51 match &= len &&
52 find_in_proplist(compat, matches->compat, len);
53 }
54 if (match)
55 return matches;
56 matches++;
57 }
58 return NULL;
59}
60
61static int vio_bus_match(struct device *dev, struct device_driver *drv)
62{
63 struct vio_dev *vio_dev = to_vio_dev(dev);
64 struct vio_driver *vio_drv = to_vio_driver(drv);
65 const struct vio_device_id *matches = vio_drv->id_table;
66
67 if (!matches)
68 return 0;
69
70 return vio_match_device(matches, vio_dev) != NULL;
71}
72
73static int vio_device_probe(struct device *dev)
74{
75 struct vio_dev *vdev = to_vio_dev(dev);
76 struct vio_driver *drv = to_vio_driver(dev->driver);
77 const struct vio_device_id *id;
78 int error = -ENODEV;
79
80 if (drv->probe) {
81 id = vio_match_device(drv->id_table, vdev);
82 if (id)
83 error = drv->probe(vdev, id);
84 }
85
86 return error;
87}
88
89static int vio_device_remove(struct device *dev)
90{
91 struct vio_dev *vdev = to_vio_dev(dev);
92 struct vio_driver *drv = to_vio_driver(dev->driver);
93
94 if (drv->remove)
95 return drv->remove(vdev);
96
97 return 1;
98}
99
100static ssize_t devspec_show(struct device *dev,
101 struct device_attribute *attr, char *buf)
102{
103 struct vio_dev *vdev = to_vio_dev(dev);
104 const char *str = "none";
105
106 if (!strcmp(vdev->type, "network"))
107 str = "vnet";
108 else if (!strcmp(vdev->type, "block"))
109 str = "vdisk";
110
111 return sprintf(buf, "%s\n", str);
112}
113
114static ssize_t type_show(struct device *dev,
115 struct device_attribute *attr, char *buf)
116{
117 struct vio_dev *vdev = to_vio_dev(dev);
118 return sprintf(buf, "%s\n", vdev->type);
119}
120
121static struct device_attribute vio_dev_attrs[] = {
122 __ATTR_RO(devspec),
123 __ATTR_RO(type),
124 __ATTR_NULL
125};
126
127static struct bus_type vio_bus_type = {
128 .name = "vio",
129 .dev_attrs = vio_dev_attrs,
130 .match = vio_bus_match,
131 .probe = vio_device_probe,
132 .remove = vio_device_remove,
133};
134
135int vio_register_driver(struct vio_driver *viodrv)
136{
137 viodrv->driver.bus = &vio_bus_type;
138
139 return driver_register(&viodrv->driver);
140}
141EXPORT_SYMBOL(vio_register_driver);
142
143void vio_unregister_driver(struct vio_driver *viodrv)
144{
145 driver_unregister(&viodrv->driver);
146}
147EXPORT_SYMBOL(vio_unregister_driver);
148
149static void __devinit vio_dev_release(struct device *dev)
150{
151 kfree(to_vio_dev(dev));
152}
153
154static ssize_t
155show_pciobppath_attr(struct device *dev, struct device_attribute *attr,
156 char *buf)
157{
158 struct vio_dev *vdev;
159 struct device_node *dp;
160
161 vdev = to_vio_dev(dev);
162 dp = vdev->dp;
163
164 return snprintf (buf, PAGE_SIZE, "%s\n", dp->full_name);
165}
166
167static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH,
168 show_pciobppath_attr, NULL);
169
170struct device_node *cdev_node;
171
172static struct vio_dev *root_vdev;
173static u64 cdev_cfg_handle;
174
175static void vio_fill_channel_info(struct mdesc_handle *hp, u64 mp,
176 struct vio_dev *vdev)
177{
178 u64 a;
179
180 mdesc_for_each_arc(a, hp, mp, MDESC_ARC_TYPE_FWD) {
181 const u64 *chan_id;
182 const u64 *irq;
183 u64 target;
184
185 target = mdesc_arc_target(hp, a);
186
187 irq = mdesc_get_property(hp, target, "tx-ino", NULL);
188 if (irq)
189 vdev->tx_irq = sun4v_build_virq(cdev_cfg_handle, *irq);
190
191 irq = mdesc_get_property(hp, target, "rx-ino", NULL);
192 if (irq)
193 vdev->rx_irq = sun4v_build_virq(cdev_cfg_handle, *irq);
194
195 chan_id = mdesc_get_property(hp, target, "id", NULL);
196 if (chan_id)
197 vdev->channel_id = *chan_id;
198 }
199}
200
201static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp,
202 struct device *parent)
203{
204 const char *type, *compat, *bus_id_name;
205 struct device_node *dp;
206 struct vio_dev *vdev;
207 int err, tlen, clen;
208 const u64 *id;
209
210 type = mdesc_get_property(hp, mp, "device-type", &tlen);
211 if (!type) {
212 type = mdesc_get_property(hp, mp, "name", &tlen);
213 if (!type) {
214 type = mdesc_node_name(hp, mp);
215 tlen = strlen(type) + 1;
216 }
217 }
218 if (tlen > VIO_MAX_TYPE_LEN) {
219 printk(KERN_ERR "VIO: Type string [%s] is too long.\n",
220 type);
221 return NULL;
222 }
223
224 bus_id_name = type;
225 if (!strcmp(type, "domain-services-port"))
226 bus_id_name = "ds";
227
228 if (strlen(bus_id_name) >= KOBJ_NAME_LEN - 4) {
229 printk(KERN_ERR "VIO: bus_id_name [%s] is too long.\n",
230 bus_id_name);
231 return NULL;
232 }
233
234 compat = mdesc_get_property(hp, mp, "device-type", &clen);
235 if (!compat) {
236 clen = 0;
237 } else if (clen > VIO_MAX_COMPAT_LEN) {
238 printk(KERN_ERR "VIO: Compat len %d for [%s] is too long.\n",
239 clen, type);
240 return NULL;
241 }
242
243 vdev = kzalloc(sizeof(*vdev), GFP_KERNEL);
244 if (!vdev) {
245 printk(KERN_ERR "VIO: Could not allocate vio_dev\n");
246 return NULL;
247 }
248
249 vdev->mp = mp;
250 memcpy(vdev->type, type, tlen);
251 if (compat)
252 memcpy(vdev->compat, compat, clen);
253 else
254 memset(vdev->compat, 0, sizeof(vdev->compat));
255 vdev->compat_len = clen;
256
257 vdev->channel_id = ~0UL;
258 vdev->tx_irq = ~0;
259 vdev->rx_irq = ~0;
260
261 vio_fill_channel_info(hp, mp, vdev);
262
263 id = mdesc_get_property(hp, mp, "id", NULL);
264 if (!id)
265 snprintf(vdev->dev.bus_id, BUS_ID_SIZE, "%s",
266 bus_id_name);
267 else
268 snprintf(vdev->dev.bus_id, BUS_ID_SIZE, "%s-%lu",
269 bus_id_name, *id);
270
271 vdev->dev.parent = parent;
272 vdev->dev.bus = &vio_bus_type;
273 vdev->dev.release = vio_dev_release;
274
275 if (parent == NULL) {
276 dp = cdev_node;
277 } else if (to_vio_dev(parent) == root_vdev) {
278 dp = of_get_next_child(cdev_node, NULL);
279 while (dp) {
280 if (!strcmp(dp->type, type))
281 break;
282
283 dp = of_get_next_child(cdev_node, dp);
284 }
285 } else {
286 dp = to_vio_dev(parent)->dp;
287 }
288 vdev->dp = dp;
289
290 printk(KERN_ERR "VIO: Adding device %s\n", vdev->dev.bus_id);
291
292 err = device_register(&vdev->dev);
293 if (err) {
294 printk(KERN_ERR "VIO: Could not register device %s, err=%d\n",
295 vdev->dev.bus_id, err);
296 kfree(vdev);
297 return NULL;
298 }
299 if (vdev->dp)
300 err = sysfs_create_file(&vdev->dev.kobj,
301 &dev_attr_obppath.attr);
302
303 return vdev;
304}
305
306static void vio_add(struct mdesc_handle *hp, u64 node)
307{
308 (void) vio_create_one(hp, node, &root_vdev->dev);
309}
310
311static int vio_md_node_match(struct device *dev, void *arg)
312{
313 struct vio_dev *vdev = to_vio_dev(dev);
314
315 if (vdev->mp == (u64) arg)
316 return 1;
317
318 return 0;
319}
320
321static void vio_remove(struct mdesc_handle *hp, u64 node)
322{
323 struct device *dev;
324
325 dev = device_find_child(&root_vdev->dev, (void *) node,
326 vio_md_node_match);
327 if (dev) {
328 printk(KERN_INFO "VIO: Removing device %s\n", dev->bus_id);
329
330 device_unregister(dev);
331 }
332}
333
334static struct mdesc_notifier_client vio_device_notifier = {
335 .add = vio_add,
336 .remove = vio_remove,
337 .node_name = "virtual-device-port",
338};
339
340static struct mdesc_notifier_client vio_ds_notifier = {
341 .add = vio_add,
342 .remove = vio_remove,
343 .node_name = "domain-services-port",
344};
345
346const char *channel_devices_node = "channel-devices";
347const char *channel_devices_compat = "SUNW,sun4v-channel-devices";
348const char *cfg_handle_prop = "cfg-handle";
349
350static int __init vio_init(void)
351{
352 struct mdesc_handle *hp;
353 const char *compat;
354 const u64 *cfg_handle;
355 int err, len;
356 u64 root;
357
358 err = bus_register(&vio_bus_type);
359 if (err) {
360 printk(KERN_ERR "VIO: Could not register bus type err=%d\n",
361 err);
362 return err;
363 }
364
365 hp = mdesc_grab();
366 if (!hp)
367 return 0;
368
369 root = mdesc_node_by_name(hp, MDESC_NODE_NULL, channel_devices_node);
370 if (root == MDESC_NODE_NULL) {
371 printk(KERN_INFO "VIO: No channel-devices MDESC node.\n");
372 mdesc_release(hp);
373 return 0;
374 }
375
376 cdev_node = of_find_node_by_name(NULL, "channel-devices");
377 err = -ENODEV;
378 if (!cdev_node) {
379 printk(KERN_INFO "VIO: No channel-devices OBP node.\n");
380 goto out_release;
381 }
382
383 compat = mdesc_get_property(hp, root, "compatible", &len);
384 if (!compat) {
385 printk(KERN_ERR "VIO: Channel devices lacks compatible "
386 "property\n");
387 goto out_release;
388 }
389 if (!find_in_proplist(compat, channel_devices_compat, len)) {
390 printk(KERN_ERR "VIO: Channel devices node lacks (%s) "
391 "compat entry.\n", channel_devices_compat);
392 goto out_release;
393 }
394
395 cfg_handle = mdesc_get_property(hp, root, cfg_handle_prop, NULL);
396 if (!cfg_handle) {
397 printk(KERN_ERR "VIO: Channel devices lacks %s property\n",
398 cfg_handle_prop);
399 goto out_release;
400 }
401
402 cdev_cfg_handle = *cfg_handle;
403
404 root_vdev = vio_create_one(hp, root, NULL);
405 err = -ENODEV;
406 if (!root_vdev) {
407 printk(KERN_ERR "VIO: Coult not create root device.\n");
408 goto out_release;
409 }
410
411 mdesc_register_notifier(&vio_device_notifier);
412 mdesc_register_notifier(&vio_ds_notifier);
413
414 mdesc_release(hp);
415
416 return err;
417
418out_release:
419 mdesc_release(hp);
420 return err;
421}
422
423postcore_initcall(vio_init);
diff --git a/arch/sparc64/kernel/viohs.c b/arch/sparc64/kernel/viohs.c
new file mode 100644
index 0000000000..09126fc338
--- /dev/null
+++ b/arch/sparc64/kernel/viohs.c
@@ -0,0 +1,822 @@
1/* viohs.c: LDOM Virtual I/O handshake helper layer.
2 *
3 * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
4 */
5
6#include <linux/kernel.h>
7#include <linux/module.h>
8#include <linux/string.h>
9#include <linux/delay.h>
10#include <linux/sched.h>
11#include <linux/slab.h>
12
13#include <asm/ldc.h>
14#include <asm/vio.h>
15
16int vio_ldc_send(struct vio_driver_state *vio, void *data, int len)
17{
18 int err, limit = 1000;
19
20 err = -EINVAL;
21 while (limit-- > 0) {
22 err = ldc_write(vio->lp, data, len);
23 if (!err || (err != -EAGAIN))
24 break;
25 udelay(1);
26 }
27
28 return err;
29}
30EXPORT_SYMBOL(vio_ldc_send);
31
32static int send_ctrl(struct vio_driver_state *vio,
33 struct vio_msg_tag *tag, int len)
34{
35 tag->sid = vio_send_sid(vio);
36 return vio_ldc_send(vio, tag, len);
37}
38
39static void init_tag(struct vio_msg_tag *tag, u8 type, u8 stype, u16 stype_env)
40{
41 tag->type = type;
42 tag->stype = stype;
43 tag->stype_env = stype_env;
44}
45
46static int send_version(struct vio_driver_state *vio, u16 major, u16 minor)
47{
48 struct vio_ver_info pkt;
49
50 vio->_local_sid = (u32) sched_clock();
51
52 memset(&pkt, 0, sizeof(pkt));
53 init_tag(&pkt.tag, VIO_TYPE_CTRL, VIO_SUBTYPE_INFO, VIO_VER_INFO);
54 pkt.major = major;
55 pkt.minor = minor;
56 pkt.dev_class = vio->dev_class;
57
58 viodbg(HS, "SEND VERSION INFO maj[%u] min[%u] devclass[%u]\n",
59 major, minor, vio->dev_class);
60
61 return send_ctrl(vio, &pkt.tag, sizeof(pkt));
62}
63
64static int start_handshake(struct vio_driver_state *vio)
65{
66 int err;
67
68 viodbg(HS, "START HANDSHAKE\n");
69
70 vio->hs_state = VIO_HS_INVALID;
71
72 err = send_version(vio,
73 vio->ver_table[0].major,
74 vio->ver_table[0].minor);
75 if (err < 0)
76 return err;
77
78 return 0;
79}
80
81static void flush_rx_dring(struct vio_driver_state *vio)
82{
83 struct vio_dring_state *dr;
84 u64 ident;
85
86 BUG_ON(!(vio->dr_state & VIO_DR_STATE_RXREG));
87
88 dr = &vio->drings[VIO_DRIVER_RX_RING];
89 ident = dr->ident;
90
91 BUG_ON(!vio->desc_buf);
92 kfree(vio->desc_buf);
93 vio->desc_buf = NULL;
94
95 memset(dr, 0, sizeof(*dr));
96 dr->ident = ident;
97}
98
99void vio_link_state_change(struct vio_driver_state *vio, int event)
100{
101 if (event == LDC_EVENT_UP) {
102 vio->hs_state = VIO_HS_INVALID;
103
104 switch (vio->dev_class) {
105 case VDEV_NETWORK:
106 case VDEV_NETWORK_SWITCH:
107 vio->dr_state = (VIO_DR_STATE_TXREQ |
108 VIO_DR_STATE_RXREQ);
109 break;
110
111 case VDEV_DISK:
112 vio->dr_state = VIO_DR_STATE_TXREQ;
113 break;
114 case VDEV_DISK_SERVER:
115 vio->dr_state = VIO_DR_STATE_RXREQ;
116 break;
117 }
118 start_handshake(vio);
119 } else if (event == LDC_EVENT_RESET) {
120 vio->hs_state = VIO_HS_INVALID;
121
122 if (vio->dr_state & VIO_DR_STATE_RXREG)
123 flush_rx_dring(vio);
124
125 vio->dr_state = 0x00;
126 memset(&vio->ver, 0, sizeof(vio->ver));
127
128 ldc_disconnect(vio->lp);
129 }
130}
131EXPORT_SYMBOL(vio_link_state_change);
132
133static int handshake_failure(struct vio_driver_state *vio)
134{
135 struct vio_dring_state *dr;
136
137 /* XXX Put policy here... Perhaps start a timer to fire
138 * XXX in 100 ms, which will bring the link up and retry
139 * XXX the handshake.
140 */
141
142 viodbg(HS, "HANDSHAKE FAILURE\n");
143
144 vio->dr_state &= ~(VIO_DR_STATE_TXREG |
145 VIO_DR_STATE_RXREG);
146
147 dr = &vio->drings[VIO_DRIVER_RX_RING];
148 memset(dr, 0, sizeof(*dr));
149
150 kfree(vio->desc_buf);
151 vio->desc_buf = NULL;
152 vio->desc_buf_len = 0;
153
154 vio->hs_state = VIO_HS_INVALID;
155
156 return -ECONNRESET;
157}
158
159static int process_unknown(struct vio_driver_state *vio, void *arg)
160{
161 struct vio_msg_tag *pkt = arg;
162
163 viodbg(HS, "UNKNOWN CONTROL [%02x:%02x:%04x:%08x]\n",
164 pkt->type, pkt->stype, pkt->stype_env, pkt->sid);
165
166 printk(KERN_ERR "vio: ID[%lu] Resetting connection.\n",
167 vio->vdev->channel_id);
168
169 ldc_disconnect(vio->lp);
170
171 return -ECONNRESET;
172}
173
174static int send_dreg(struct vio_driver_state *vio)
175{
176 struct vio_dring_state *dr = &vio->drings[VIO_DRIVER_TX_RING];
177 union {
178 struct vio_dring_register pkt;
179 char all[sizeof(struct vio_dring_register) +
180 (sizeof(struct ldc_trans_cookie) *
181 dr->ncookies)];
182 } u;
183 int i;
184
185 memset(&u, 0, sizeof(u));
186 init_tag(&u.pkt.tag, VIO_TYPE_CTRL, VIO_SUBTYPE_INFO, VIO_DRING_REG);
187 u.pkt.dring_ident = 0;
188 u.pkt.num_descr = dr->num_entries;
189 u.pkt.descr_size = dr->entry_size;
190 u.pkt.options = VIO_TX_DRING;
191 u.pkt.num_cookies = dr->ncookies;
192
193 viodbg(HS, "SEND DRING_REG INFO ndesc[%u] dsz[%u] opt[0x%x] "
194 "ncookies[%u]\n",
195 u.pkt.num_descr, u.pkt.descr_size, u.pkt.options,
196 u.pkt.num_cookies);
197
198 for (i = 0; i < dr->ncookies; i++) {
199 u.pkt.cookies[i] = dr->cookies[i];
200
201 viodbg(HS, "DRING COOKIE(%d) [%016llx:%016llx]\n",
202 i,
203 (unsigned long long) u.pkt.cookies[i].cookie_addr,
204 (unsigned long long) u.pkt.cookies[i].cookie_size);
205 }
206
207 return send_ctrl(vio, &u.pkt.tag, sizeof(u));
208}
209
210static int send_rdx(struct vio_driver_state *vio)
211{
212 struct vio_rdx pkt;
213
214 memset(&pkt, 0, sizeof(pkt));
215
216 init_tag(&pkt.tag, VIO_TYPE_CTRL, VIO_SUBTYPE_INFO, VIO_RDX);
217
218 viodbg(HS, "SEND RDX INFO\n");
219
220 return send_ctrl(vio, &pkt.tag, sizeof(pkt));
221}
222
223static int send_attr(struct vio_driver_state *vio)
224{
225 return vio->ops->send_attr(vio);
226}
227
228static struct vio_version *find_by_major(struct vio_driver_state *vio,
229 u16 major)
230{
231 struct vio_version *ret = NULL;
232 int i;
233
234 for (i = 0; i < vio->ver_table_entries; i++) {
235 struct vio_version *v = &vio->ver_table[i];
236 if (v->major <= major) {
237 ret = v;
238 break;
239 }
240 }
241 return ret;
242}
243
244static int process_ver_info(struct vio_driver_state *vio,
245 struct vio_ver_info *pkt)
246{
247 struct vio_version *vap;
248 int err;
249
250 viodbg(HS, "GOT VERSION INFO maj[%u] min[%u] devclass[%u]\n",
251 pkt->major, pkt->minor, pkt->dev_class);
252
253 if (vio->hs_state != VIO_HS_INVALID) {
254 /* XXX Perhaps invoke start_handshake? XXX */
255 memset(&vio->ver, 0, sizeof(vio->ver));
256 vio->hs_state = VIO_HS_INVALID;
257 }
258
259 vap = find_by_major(vio, pkt->major);
260
261 vio->_peer_sid = pkt->tag.sid;
262
263 if (!vap) {
264 pkt->tag.stype = VIO_SUBTYPE_NACK;
265 pkt->major = 0;
266 pkt->minor = 0;
267 viodbg(HS, "SEND VERSION NACK maj[0] min[0]\n");
268 err = send_ctrl(vio, &pkt->tag, sizeof(*pkt));
269 } else if (vap->major != pkt->major) {
270 pkt->tag.stype = VIO_SUBTYPE_NACK;
271 pkt->major = vap->major;
272 pkt->minor = vap->minor;
273 viodbg(HS, "SEND VERSION NACK maj[%u] min[%u]\n",
274 pkt->major, pkt->minor);
275 err = send_ctrl(vio, &pkt->tag, sizeof(*pkt));
276 } else {
277 struct vio_version ver = {
278 .major = pkt->major,
279 .minor = pkt->minor,
280 };
281 if (ver.minor > vap->minor)
282 ver.minor = vap->minor;
283 pkt->minor = ver.minor;
284 pkt->tag.stype = VIO_SUBTYPE_ACK;
285 viodbg(HS, "SEND VERSION ACK maj[%u] min[%u]\n",
286 pkt->major, pkt->minor);
287 err = send_ctrl(vio, &pkt->tag, sizeof(*pkt));
288 if (err > 0) {
289 vio->ver = ver;
290 vio->hs_state = VIO_HS_GOTVERS;
291 }
292 }
293 if (err < 0)
294 return handshake_failure(vio);
295
296 return 0;
297}
298
299static int process_ver_ack(struct vio_driver_state *vio,
300 struct vio_ver_info *pkt)
301{
302 viodbg(HS, "GOT VERSION ACK maj[%u] min[%u] devclass[%u]\n",
303 pkt->major, pkt->minor, pkt->dev_class);
304
305 if (vio->hs_state & VIO_HS_GOTVERS) {
306 if (vio->ver.major != pkt->major ||
307 vio->ver.minor != pkt->minor) {
308 pkt->tag.stype = VIO_SUBTYPE_NACK;
309 (void) send_ctrl(vio, &pkt->tag, sizeof(*pkt));
310 return handshake_failure(vio);
311 }
312 } else {
313 vio->ver.major = pkt->major;
314 vio->ver.minor = pkt->minor;
315 vio->hs_state = VIO_HS_GOTVERS;
316 }
317
318 switch (vio->dev_class) {
319 case VDEV_NETWORK:
320 case VDEV_DISK:
321 if (send_attr(vio) < 0)
322 return handshake_failure(vio);
323 break;
324
325 default:
326 break;
327 }
328
329 return 0;
330}
331
332static int process_ver_nack(struct vio_driver_state *vio,
333 struct vio_ver_info *pkt)
334{
335 struct vio_version *nver;
336
337 viodbg(HS, "GOT VERSION NACK maj[%u] min[%u] devclass[%u]\n",
338 pkt->major, pkt->minor, pkt->dev_class);
339
340 if ((pkt->major == 0 && pkt->minor == 0) ||
341 !(nver = find_by_major(vio, pkt->major)))
342 return handshake_failure(vio);
343
344 if (send_version(vio, nver->major, nver->minor) < 0)
345 return handshake_failure(vio);
346
347 return 0;
348}
349
350static int process_ver(struct vio_driver_state *vio, struct vio_ver_info *pkt)
351{
352 switch (pkt->tag.stype) {
353 case VIO_SUBTYPE_INFO:
354 return process_ver_info(vio, pkt);
355
356 case VIO_SUBTYPE_ACK:
357 return process_ver_ack(vio, pkt);
358
359 case VIO_SUBTYPE_NACK:
360 return process_ver_nack(vio, pkt);
361
362 default:
363 return handshake_failure(vio);
364 };
365}
366
367static int process_attr(struct vio_driver_state *vio, void *pkt)
368{
369 int err;
370
371 if (!(vio->hs_state & VIO_HS_GOTVERS))
372 return handshake_failure(vio);
373
374 err = vio->ops->handle_attr(vio, pkt);
375 if (err < 0) {
376 return handshake_failure(vio);
377 } else {
378 vio->hs_state |= VIO_HS_GOT_ATTR;
379
380 if ((vio->dr_state & VIO_DR_STATE_TXREQ) &&
381 !(vio->hs_state & VIO_HS_SENT_DREG)) {
382 if (send_dreg(vio) < 0)
383 return handshake_failure(vio);
384
385 vio->hs_state |= VIO_HS_SENT_DREG;
386 }
387 }
388 return 0;
389}
390
391static int all_drings_registered(struct vio_driver_state *vio)
392{
393 int need_rx, need_tx;
394
395 need_rx = (vio->dr_state & VIO_DR_STATE_RXREQ);
396 need_tx = (vio->dr_state & VIO_DR_STATE_TXREQ);
397
398 if (need_rx &&
399 !(vio->dr_state & VIO_DR_STATE_RXREG))
400 return 0;
401
402 if (need_tx &&
403 !(vio->dr_state & VIO_DR_STATE_TXREG))
404 return 0;
405
406 return 1;
407}
408
409static int process_dreg_info(struct vio_driver_state *vio,
410 struct vio_dring_register *pkt)
411{
412 struct vio_dring_state *dr;
413 int i, len;
414
415 viodbg(HS, "GOT DRING_REG INFO ident[%llx] "
416 "ndesc[%u] dsz[%u] opt[0x%x] ncookies[%u]\n",
417 (unsigned long long) pkt->dring_ident,
418 pkt->num_descr, pkt->descr_size, pkt->options,
419 pkt->num_cookies);
420
421 if (!(vio->dr_state & VIO_DR_STATE_RXREQ))
422 goto send_nack;
423
424 if (vio->dr_state & VIO_DR_STATE_RXREG)
425 goto send_nack;
426
427 BUG_ON(vio->desc_buf);
428
429 vio->desc_buf = kzalloc(pkt->descr_size, GFP_ATOMIC);
430 if (!vio->desc_buf)
431 goto send_nack;
432
433 vio->desc_buf_len = pkt->descr_size;
434
435 dr = &vio->drings[VIO_DRIVER_RX_RING];
436
437 dr->num_entries = pkt->num_descr;
438 dr->entry_size = pkt->descr_size;
439 dr->ncookies = pkt->num_cookies;
440 for (i = 0; i < dr->ncookies; i++) {
441 dr->cookies[i] = pkt->cookies[i];
442
443 viodbg(HS, "DRING COOKIE(%d) [%016llx:%016llx]\n",
444 i,
445 (unsigned long long)
446 pkt->cookies[i].cookie_addr,
447 (unsigned long long)
448 pkt->cookies[i].cookie_size);
449 }
450
451 pkt->tag.stype = VIO_SUBTYPE_ACK;
452 pkt->dring_ident = ++dr->ident;
453
454 viodbg(HS, "SEND DRING_REG ACK ident[%llx]\n",
455 (unsigned long long) pkt->dring_ident);
456
457 len = (sizeof(*pkt) +
458 (dr->ncookies * sizeof(struct ldc_trans_cookie)));
459 if (send_ctrl(vio, &pkt->tag, len) < 0)
460 goto send_nack;
461
462 vio->dr_state |= VIO_DR_STATE_RXREG;
463
464 return 0;
465
466send_nack:
467 pkt->tag.stype = VIO_SUBTYPE_NACK;
468 viodbg(HS, "SEND DRING_REG NACK\n");
469 (void) send_ctrl(vio, &pkt->tag, sizeof(*pkt));
470
471 return handshake_failure(vio);
472}
473
474static int process_dreg_ack(struct vio_driver_state *vio,
475 struct vio_dring_register *pkt)
476{
477 struct vio_dring_state *dr;
478
479 viodbg(HS, "GOT DRING_REG ACK ident[%llx] "
480 "ndesc[%u] dsz[%u] opt[0x%x] ncookies[%u]\n",
481 (unsigned long long) pkt->dring_ident,
482 pkt->num_descr, pkt->descr_size, pkt->options,
483 pkt->num_cookies);
484
485 dr = &vio->drings[VIO_DRIVER_TX_RING];
486
487 if (!(vio->dr_state & VIO_DR_STATE_TXREQ))
488 return handshake_failure(vio);
489
490 dr->ident = pkt->dring_ident;
491 vio->dr_state |= VIO_DR_STATE_TXREG;
492
493 if (all_drings_registered(vio)) {
494 if (send_rdx(vio) < 0)
495 return handshake_failure(vio);
496 vio->hs_state = VIO_HS_SENT_RDX;
497 }
498 return 0;
499}
500
501static int process_dreg_nack(struct vio_driver_state *vio,
502 struct vio_dring_register *pkt)
503{
504 viodbg(HS, "GOT DRING_REG NACK ident[%llx] "
505 "ndesc[%u] dsz[%u] opt[0x%x] ncookies[%u]\n",
506 (unsigned long long) pkt->dring_ident,
507 pkt->num_descr, pkt->descr_size, pkt->options,
508 pkt->num_cookies);
509
510 return handshake_failure(vio);
511}
512
513static int process_dreg(struct vio_driver_state *vio,
514 struct vio_dring_register *pkt)
515{
516 if (!(vio->hs_state & VIO_HS_GOTVERS))
517 return handshake_failure(vio);
518
519 switch (pkt->tag.stype) {
520 case VIO_SUBTYPE_INFO:
521 return process_dreg_info(vio, pkt);
522
523 case VIO_SUBTYPE_ACK:
524 return process_dreg_ack(vio, pkt);
525
526 case VIO_SUBTYPE_NACK:
527 return process_dreg_nack(vio, pkt);
528
529 default:
530 return handshake_failure(vio);
531 }
532}
533
534static int process_dunreg(struct vio_driver_state *vio,
535 struct vio_dring_unregister *pkt)
536{
537 struct vio_dring_state *dr = &vio->drings[VIO_DRIVER_RX_RING];
538
539 viodbg(HS, "GOT DRING_UNREG\n");
540
541 if (pkt->dring_ident != dr->ident)
542 return 0;
543
544 vio->dr_state &= ~VIO_DR_STATE_RXREG;
545
546 memset(dr, 0, sizeof(*dr));
547
548 kfree(vio->desc_buf);
549 vio->desc_buf = NULL;
550 vio->desc_buf_len = 0;
551
552 return 0;
553}
554
555static int process_rdx_info(struct vio_driver_state *vio, struct vio_rdx *pkt)
556{
557 viodbg(HS, "GOT RDX INFO\n");
558
559 pkt->tag.stype = VIO_SUBTYPE_ACK;
560 viodbg(HS, "SEND RDX ACK\n");
561 if (send_ctrl(vio, &pkt->tag, sizeof(*pkt)) < 0)
562 return handshake_failure(vio);
563
564 vio->hs_state |= VIO_HS_SENT_RDX_ACK;
565 return 0;
566}
567
568static int process_rdx_ack(struct vio_driver_state *vio, struct vio_rdx *pkt)
569{
570 viodbg(HS, "GOT RDX ACK\n");
571
572 if (!(vio->hs_state & VIO_HS_SENT_RDX))
573 return handshake_failure(vio);
574
575 vio->hs_state |= VIO_HS_GOT_RDX_ACK;
576 return 0;
577}
578
579static int process_rdx_nack(struct vio_driver_state *vio, struct vio_rdx *pkt)
580{
581 viodbg(HS, "GOT RDX NACK\n");
582
583 return handshake_failure(vio);
584}
585
586static int process_rdx(struct vio_driver_state *vio, struct vio_rdx *pkt)
587{
588 if (!all_drings_registered(vio))
589 handshake_failure(vio);
590
591 switch (pkt->tag.stype) {
592 case VIO_SUBTYPE_INFO:
593 return process_rdx_info(vio, pkt);
594
595 case VIO_SUBTYPE_ACK:
596 return process_rdx_ack(vio, pkt);
597
598 case VIO_SUBTYPE_NACK:
599 return process_rdx_nack(vio, pkt);
600
601 default:
602 return handshake_failure(vio);
603 }
604}
605
606int vio_control_pkt_engine(struct vio_driver_state *vio, void *pkt)
607{
608 struct vio_msg_tag *tag = pkt;
609 u8 prev_state = vio->hs_state;
610 int err;
611
612 switch (tag->stype_env) {
613 case VIO_VER_INFO:
614 err = process_ver(vio, pkt);
615 break;
616
617 case VIO_ATTR_INFO:
618 err = process_attr(vio, pkt);
619 break;
620
621 case VIO_DRING_REG:
622 err = process_dreg(vio, pkt);
623 break;
624
625 case VIO_DRING_UNREG:
626 err = process_dunreg(vio, pkt);
627 break;
628
629 case VIO_RDX:
630 err = process_rdx(vio, pkt);
631 break;
632
633 default:
634 err = process_unknown(vio, pkt);
635 break;
636 }
637 if (!err &&
638 vio->hs_state != prev_state &&
639 (vio->hs_state & VIO_HS_COMPLETE))
640 vio->ops->handshake_complete(vio);
641
642 return err;
643}
644EXPORT_SYMBOL(vio_control_pkt_engine);
645
646void vio_conn_reset(struct vio_driver_state *vio)
647{
648}
649EXPORT_SYMBOL(vio_conn_reset);
650
651/* The issue is that the Solaris virtual disk server just mirrors the
652 * SID values it gets from the client peer. So we work around that
653 * here in vio_{validate,send}_sid() so that the drivers don't need
654 * to be aware of this crap.
655 */
656int vio_validate_sid(struct vio_driver_state *vio, struct vio_msg_tag *tp)
657{
658 u32 sid;
659
660 /* Always let VERSION+INFO packets through unchecked, they
661 * define the new SID.
662 */
663 if (tp->type == VIO_TYPE_CTRL &&
664 tp->stype == VIO_SUBTYPE_INFO &&
665 tp->stype_env == VIO_VER_INFO)
666 return 0;
667
668 /* Ok, now figure out which SID to use. */
669 switch (vio->dev_class) {
670 case VDEV_NETWORK:
671 case VDEV_NETWORK_SWITCH:
672 case VDEV_DISK_SERVER:
673 default:
674 sid = vio->_peer_sid;
675 break;
676
677 case VDEV_DISK:
678 sid = vio->_local_sid;
679 break;
680 }
681
682 if (sid == tp->sid)
683 return 0;
684 viodbg(DATA, "BAD SID tag->sid[%08x] peer_sid[%08x] local_sid[%08x]\n",
685 tp->sid, vio->_peer_sid, vio->_local_sid);
686 return -EINVAL;
687}
688EXPORT_SYMBOL(vio_validate_sid);
689
690u32 vio_send_sid(struct vio_driver_state *vio)
691{
692 switch (vio->dev_class) {
693 case VDEV_NETWORK:
694 case VDEV_NETWORK_SWITCH:
695 case VDEV_DISK:
696 default:
697 return vio->_local_sid;
698
699 case VDEV_DISK_SERVER:
700 return vio->_peer_sid;
701 }
702}
703EXPORT_SYMBOL(vio_send_sid);
704
705extern int vio_ldc_alloc(struct vio_driver_state *vio,
706 struct ldc_channel_config *base_cfg,
707 void *event_arg)
708{
709 struct ldc_channel_config cfg = *base_cfg;
710 struct ldc_channel *lp;
711
712 cfg.tx_irq = vio->vdev->tx_irq;
713 cfg.rx_irq = vio->vdev->rx_irq;
714
715 lp = ldc_alloc(vio->vdev->channel_id, &cfg, event_arg);
716 if (IS_ERR(lp))
717 return PTR_ERR(lp);
718
719 vio->lp = lp;
720
721 return 0;
722}
723EXPORT_SYMBOL(vio_ldc_alloc);
724
725void vio_ldc_free(struct vio_driver_state *vio)
726{
727 ldc_free(vio->lp);
728 vio->lp = NULL;
729
730 kfree(vio->desc_buf);
731 vio->desc_buf = NULL;
732 vio->desc_buf_len = 0;
733}
734EXPORT_SYMBOL(vio_ldc_free);
735
736void vio_port_up(struct vio_driver_state *vio)
737{
738 unsigned long flags;
739 int err, state;
740
741 spin_lock_irqsave(&vio->lock, flags);
742
743 state = ldc_state(vio->lp);
744
745 err = 0;
746 if (state == LDC_STATE_INIT) {
747 err = ldc_bind(vio->lp, vio->name);
748 if (err)
749 printk(KERN_WARNING "%s: Port %lu bind failed, "
750 "err=%d\n",
751 vio->name, vio->vdev->channel_id, err);
752 }
753
754 if (!err) {
755 err = ldc_connect(vio->lp);
756 if (err)
757 printk(KERN_WARNING "%s: Port %lu connect failed, "
758 "err=%d\n",
759 vio->name, vio->vdev->channel_id, err);
760 }
761 if (err) {
762 unsigned long expires = jiffies + HZ;
763
764 expires = round_jiffies(expires);
765 mod_timer(&vio->timer, expires);
766 }
767
768 spin_unlock_irqrestore(&vio->lock, flags);
769}
770EXPORT_SYMBOL(vio_port_up);
771
772static void vio_port_timer(unsigned long _arg)
773{
774 struct vio_driver_state *vio = (struct vio_driver_state *) _arg;
775
776 vio_port_up(vio);
777}
778
779int vio_driver_init(struct vio_driver_state *vio, struct vio_dev *vdev,
780 u8 dev_class, struct vio_version *ver_table,
781 int ver_table_size, struct vio_driver_ops *ops,
782 char *name)
783{
784 switch (dev_class) {
785 case VDEV_NETWORK:
786 case VDEV_NETWORK_SWITCH:
787 case VDEV_DISK:
788 case VDEV_DISK_SERVER:
789 break;
790
791 default:
792 return -EINVAL;
793 }
794
795 if (!ops->send_attr ||
796 !ops->handle_attr ||
797 !ops->handshake_complete)
798 return -EINVAL;
799
800 if (!ver_table || ver_table_size < 0)
801 return -EINVAL;
802
803 if (!name)
804 return -EINVAL;
805
806 spin_lock_init(&vio->lock);
807
808 vio->name = name;
809
810 vio->dev_class = dev_class;
811 vio->vdev = vdev;
812
813 vio->ver_table = ver_table;
814 vio->ver_table_entries = ver_table_size;
815
816 vio->ops = ops;
817
818 setup_timer(&vio->timer, vio_port_timer, (unsigned long) vio);
819
820 return 0;
821}
822EXPORT_SYMBOL(vio_driver_init);
diff --git a/arch/sparc64/lib/Makefile b/arch/sparc64/lib/Makefile
index 4a725d8985..c4a6d6e7d0 100644
--- a/arch/sparc64/lib/Makefile
+++ b/arch/sparc64/lib/Makefile
@@ -14,6 +14,6 @@ lib-y := PeeCeeI.o copy_page.o clear_page.o strlen.o strncmp.o \
14 NGmemcpy.o NGcopy_from_user.o NGcopy_to_user.o NGpatch.o \ 14 NGmemcpy.o NGcopy_from_user.o NGcopy_to_user.o NGpatch.o \
15 NGpage.o NGbzero.o \ 15 NGpage.o NGbzero.o \
16 copy_in_user.o user_fixup.o memmove.o \ 16 copy_in_user.o user_fixup.o memmove.o \
17 mcount.o ipcsum.o rwsem.o xor.o delay.o 17 mcount.o ipcsum.o rwsem.o xor.o
18 18
19obj-y += iomap.o 19obj-y += iomap.o
diff --git a/arch/sparc64/lib/delay.c b/arch/sparc64/lib/delay.c
deleted file mode 100644
index fb27e54a03..0000000000
--- a/arch/sparc64/lib/delay.c
+++ /dev/null
@@ -1,46 +0,0 @@
1/* delay.c: Delay loops for sparc64
2 *
3 * Copyright (C) 2004, 2006 David S. Miller <davem@davemloft.net>
4 *
5 * Based heavily upon x86 variant which is:
6 * Copyright (C) 1993 Linus Torvalds
7 * Copyright (C) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
8 */
9
10#include <linux/delay.h>
11#include <asm/timer.h>
12
13void __delay(unsigned long loops)
14{
15 unsigned long bclock, now;
16
17 bclock = tick_ops->get_tick();
18 do {
19 now = tick_ops->get_tick();
20 } while ((now-bclock) < loops);
21}
22
23/* We used to multiply by HZ after shifting down by 32 bits
24 * but that runs into problems for higher values of HZ and
25 * slow cpus.
26 */
27void __const_udelay(unsigned long n)
28{
29 n *= 4;
30
31 n *= (cpu_data(raw_smp_processor_id()).udelay_val * (HZ/4));
32 n >>= 32;
33
34 __delay(n + 1);
35}
36
37void __udelay(unsigned long n)
38{
39 __const_udelay(n * 0x10c7UL);
40}
41
42
43void __ndelay(unsigned long n)
44{
45 __const_udelay(n * 0x5UL);
46}
diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c
index f3e0c14e9e..33c5b7da31 100644
--- a/arch/sparc64/prom/misc.c
+++ b/arch/sparc64/prom/misc.c
@@ -14,6 +14,7 @@
14#include <asm/openprom.h> 14#include <asm/openprom.h>
15#include <asm/oplib.h> 15#include <asm/oplib.h>
16#include <asm/system.h> 16#include <asm/system.h>
17#include <asm/ldc.h>
17 18
18int prom_service_exists(const char *service_name) 19int prom_service_exists(const char *service_name)
19{ 20{
@@ -37,6 +38,10 @@ void prom_sun4v_guest_soft_state(void)
37/* Reset and reboot the machine with the command 'bcommand'. */ 38/* Reset and reboot the machine with the command 'bcommand'. */
38void prom_reboot(const char *bcommand) 39void prom_reboot(const char *bcommand)
39{ 40{
41#ifdef CONFIG_SUN_LDOMS
42 if (ldom_domaining_enabled)
43 ldom_reboot(bcommand);
44#endif
40 p1275_cmd("boot", P1275_ARG(0, P1275_ARG_IN_STRING) | 45 p1275_cmd("boot", P1275_ARG(0, P1275_ARG_IN_STRING) |
41 P1275_INOUT(1, 0), bcommand); 46 P1275_INOUT(1, 0), bcommand);
42} 47}
@@ -91,6 +96,10 @@ void prom_cmdline(void)
91 */ 96 */
92void prom_halt(void) 97void prom_halt(void)
93{ 98{
99#ifdef CONFIG_SUN_LDOMS
100 if (ldom_domaining_enabled)
101 ldom_power_off();
102#endif
94again: 103again:
95 p1275_cmd("exit", P1275_INOUT(0, 0)); 104 p1275_cmd("exit", P1275_INOUT(0, 0));
96 goto again; /* PROM is out to get me -DaveM */ 105 goto again; /* PROM is out to get me -DaveM */
@@ -98,6 +107,10 @@ again:
98 107
99void prom_halt_power_off(void) 108void prom_halt_power_off(void)
100{ 109{
110#ifdef CONFIG_SUN_LDOMS
111 if (ldom_domaining_enabled)
112 ldom_power_off();
113#endif
101 p1275_cmd("SUNW,power-off", P1275_INOUT(0, 0)); 114 p1275_cmd("SUNW,power-off", P1275_INOUT(0, 0));
102 115
103 /* if nothing else helps, we just halt */ 116 /* if nothing else helps, we just halt */
diff --git a/arch/sparc64/prom/p1275.c b/arch/sparc64/prom/p1275.c
index 2b32c48986..7fcccc0e19 100644
--- a/arch/sparc64/prom/p1275.c
+++ b/arch/sparc64/prom/p1275.c
@@ -16,6 +16,7 @@
16#include <asm/system.h> 16#include <asm/system.h>
17#include <asm/spitfire.h> 17#include <asm/spitfire.h>
18#include <asm/pstate.h> 18#include <asm/pstate.h>
19#include <asm/ldc.h>
19 20
20struct { 21struct {
21 long prom_callback; /* 0x00 */ 22 long prom_callback; /* 0x00 */
diff --git a/arch/sparc64/prom/tree.c b/arch/sparc64/prom/tree.c
index 500f05e2cf..17b7ecfe7c 100644
--- a/arch/sparc64/prom/tree.c
+++ b/arch/sparc64/prom/tree.c
@@ -13,6 +13,7 @@
13 13
14#include <asm/openprom.h> 14#include <asm/openprom.h>
15#include <asm/oplib.h> 15#include <asm/oplib.h>
16#include <asm/ldc.h>
16 17
17/* Return the child of node 'node' or zero if no this node has no 18/* Return the child of node 'node' or zero if no this node has no
18 * direct descendent. 19 * direct descendent.
@@ -261,9 +262,17 @@ int prom_node_has_property(int node, const char *prop)
261int 262int
262prom_setprop(int node, const char *pname, char *value, int size) 263prom_setprop(int node, const char *pname, char *value, int size)
263{ 264{
264 if(size == 0) return 0; 265 if (size == 0)
265 if((pname == 0) || (value == 0)) return 0; 266 return 0;
267 if ((pname == 0) || (value == 0))
268 return 0;
266 269
270#ifdef CONFIG_SUN_LDOMS
271 if (ldom_domaining_enabled) {
272 ldom_set_var(pname, value);
273 return 0;
274 }
275#endif
267 return p1275_cmd ("setprop", P1275_ARG(1,P1275_ARG_IN_STRING)| 276 return p1275_cmd ("setprop", P1275_ARG(1,P1275_ARG_IN_STRING)|
268 P1275_ARG(2,P1275_ARG_IN_BUF)| 277 P1275_ARG(2,P1275_ARG_IN_BUF)|
269 P1275_INOUT(4, 1), 278 P1275_INOUT(4, 1),
diff --git a/arch/um/Kconfig.debug b/arch/um/Kconfig.debug
index 09c1aca633..c86f5eb29f 100644
--- a/arch/um/Kconfig.debug
+++ b/arch/um/Kconfig.debug
@@ -47,4 +47,13 @@ config GCOV
47 If you're involved in UML kernel development and want to use gcov, 47 If you're involved in UML kernel development and want to use gcov,
48 say Y. If you're unsure, say N. 48 say Y. If you're unsure, say N.
49 49
50config DEBUG_STACK_USAGE
51 bool "Stack utilization instrumentation"
52 default N
53 help
54 Track the maximum kernel stack usage - this will look at each
55 kernel stack at process exit and log it if it's the deepest
56 stack seen so far.
57
58 This option will slow down process creation and destruction somewhat.
50endmenu 59endmenu
diff --git a/arch/um/config.release b/arch/um/config.release
deleted file mode 100644
index fc68bcb929..0000000000
--- a/arch/um/config.release
+++ /dev/null
@@ -1,333 +0,0 @@
1#
2# Automatically generated make config: don't edit
3#
4CONFIG_USERMODE=y
5# CONFIG_ISA is not set
6# CONFIG_SBUS is not set
7# CONFIG_PCI is not set
8CONFIG_UID16=y
9CONFIG_RWSEM_XCHGADD_ALGORITHM=y
10
11#
12# Code maturity level options
13#
14CONFIG_EXPERIMENTAL=y
15
16#
17# General Setup
18#
19CONFIG_STDIO_CONSOLE=y
20CONFIG_NET=y
21CONFIG_SYSVIPC=y
22CONFIG_BSD_PROCESS_ACCT=y
23CONFIG_SYSCTL=y
24CONFIG_BINFMT_AOUT=y
25CONFIG_BINFMT_ELF=y
26CONFIG_BINFMT_MISC=y
27CONFIG_UNIX98_PTYS=y
28CONFIG_UNIX98_PTY_COUNT=256
29CONFIG_SSL=y
30CONFIG_HOSTFS=y
31CONFIG_MCONSOLE=y
32CONFIG_MAGIC_SYSRQ=y
33# CONFIG_HOST_2G_2G is not set
34# CONFIG_UML_SMP is not set
35# CONFIG_SMP is not set
36CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
37CONFIG_CON_CHAN="xterm"
38CONFIG_SSL_CHAN="pty"
39CONFIG_NEST_LEVEL=0
40CONFIG_KERNEL_HALF_GIGS=1
41
42#
43# Loadable module support
44#
45CONFIG_MODULES=y
46CONFIG_KMOD=y
47
48#
49# Devices
50#
51CONFIG_BLK_DEV_UBD=y
52# CONFIG_BLK_DEV_UBD_SYNC is not set
53CONFIG_BLK_DEV_LOOP=y
54CONFIG_BLK_DEV_NBD=y
55CONFIG_BLK_DEV_RAM=y
56CONFIG_BLK_DEV_RAM_SIZE=4096
57CONFIG_BLK_DEV_INITRD=y
58# CONFIG_MMAPPER is not set
59CONFIG_UML_SOUND=y
60CONFIG_SOUND=y
61CONFIG_HOSTAUDIO=y
62# CONFIG_UML_WATCHDOG is not set
63# CONFIG_TTY_LOG is not set
64CONFIG_FD_CHAN=y
65# CONFIG_NULL_CHAN is not set
66CONFIG_PORT_CHAN=y
67CONFIG_PTY_CHAN=y
68CONFIG_TTY_CHAN=y
69CONFIG_XTERM_CHAN=y
70
71#
72# Networking options
73#
74CONFIG_PACKET=y
75CONFIG_PACKET_MMAP=y
76# CONFIG_NETLINK_DEV is not set
77# CONFIG_NETFILTER is not set
78# CONFIG_FILTER is not set
79CONFIG_UNIX=y
80CONFIG_INET=y
81# CONFIG_IP_MULTICAST is not set
82# CONFIG_IP_ADVANCED_ROUTER is not set
83# CONFIG_IP_PNP is not set
84# CONFIG_NET_IPIP is not set
85# CONFIG_NET_IPGRE is not set
86# CONFIG_ARPD is not set
87# CONFIG_INET_ECN is not set
88# CONFIG_SYN_COOKIES is not set
89# CONFIG_IPV6 is not set
90# CONFIG_KHTTPD is not set
91# CONFIG_ATM is not set
92# CONFIG_VLAN_8021Q is not set
93
94#
95#
96#
97# CONFIG_IPX is not set
98# CONFIG_ATALK is not set
99# CONFIG_DECNET is not set
100# CONFIG_BRIDGE is not set
101# CONFIG_X25 is not set
102# CONFIG_LAPB is not set
103# CONFIG_LLC is not set
104# CONFIG_NET_DIVERT is not set
105# CONFIG_ECONET is not set
106# CONFIG_WAN_ROUTER is not set
107# CONFIG_NET_HW_FLOWCONTROL is not set
108
109#
110# QoS and/or fair queueing
111#
112# CONFIG_NET_SCHED is not set
113
114#
115# Network device support
116#
117CONFIG_UML_NET=y
118CONFIG_UML_NET_ETHERTAP=y
119CONFIG_UML_NET_TUNTAP=y
120CONFIG_UML_NET_SLIP=y
121CONFIG_UML_NET_DAEMON=y
122CONFIG_UML_NET_MCAST=y
123CONFIG_NETDEVICES=y
124
125#
126# ARCnet devices
127#
128# CONFIG_ARCNET is not set
129CONFIG_DUMMY=y
130CONFIG_BONDING=m
131CONFIG_EQUALIZER=m
132CONFIG_TUN=y
133# CONFIG_ETHERTAP is not set
134
135#
136# Ethernet (10 or 100Mbit)
137#
138# CONFIG_NET_ETHERNET is not set
139
140#
141# Ethernet (1000 Mbit)
142#
143# CONFIG_ACENIC is not set
144# CONFIG_DL2K is not set
145# CONFIG_MYRI_SBUS is not set
146# CONFIG_NS83820 is not set
147# CONFIG_HAMACHI is not set
148# CONFIG_YELLOWFIN is not set
149# CONFIG_SK98LIN is not set
150# CONFIG_FDDI is not set
151# CONFIG_HIPPI is not set
152CONFIG_PLIP=m
153CONFIG_PPP=m
154CONFIG_PPP_MULTILINK=y
155# CONFIG_PPP_FILTER is not set
156# CONFIG_PPP_ASYNC is not set
157CONFIG_PPP_SYNC_TTY=m
158CONFIG_PPP_DEFLATE=m
159CONFIG_PPP_BSDCOMP=m
160CONFIG_PPPOE=m
161CONFIG_SLIP=m
162CONFIG_SLIP_COMPRESSED=y
163CONFIG_SLIP_SMART=y
164# CONFIG_SLIP_MODE_SLIP6 is not set
165
166#
167# Wireless LAN (non-hamradio)
168#
169# CONFIG_NET_RADIO is not set
170
171#
172# Token Ring devices
173#
174# CONFIG_TR is not set
175# CONFIG_NET_FC is not set
176# CONFIG_RCPCI is not set
177CONFIG_SHAPER=m
178
179#
180# Wan interfaces
181#
182# CONFIG_WAN is not set
183
184#
185# File systems
186#
187CONFIG_QUOTA=y
188CONFIG_AUTOFS_FS=m
189CONFIG_AUTOFS4_FS=m
190CONFIG_REISERFS_FS=m
191# CONFIG_REISERFS_CHECK is not set
192# CONFIG_REISERFS_PROC_INFO is not set
193CONFIG_ADFS_FS=m
194# CONFIG_ADFS_FS_RW is not set
195CONFIG_AFFS_FS=m
196CONFIG_HFS_FS=m
197CONFIG_BFS_FS=m
198CONFIG_EXT3_FS=y
199CONFIG_JBD=y
200# CONFIG_JBD_DEBUG is not set
201CONFIG_FAT_FS=y
202CONFIG_MSDOS_FS=y
203CONFIG_UMSDOS_FS=y
204CONFIG_VFAT_FS=y
205CONFIG_EFS_FS=m
206# CONFIG_JFFS_FS is not set
207# CONFIG_JFFS2_FS is not set
208CONFIG_CRAMFS=m
209CONFIG_TMPFS=y
210CONFIG_RAMFS=m
211CONFIG_ISO9660_FS=y
212# CONFIG_JOLIET is not set
213# CONFIG_ZISOFS is not set
214CONFIG_MINIX_FS=m
215CONFIG_VXFS_FS=m
216# CONFIG_NTFS_FS is not set
217# CONFIG_NTFS_RW is not set
218CONFIG_HPFS_FS=m
219CONFIG_PROC_FS=y
220CONFIG_DEVFS_FS=y
221CONFIG_DEVFS_MOUNT=y
222# CONFIG_DEVFS_DEBUG is not set
223CONFIG_DEVPTS_FS=y
224CONFIG_QNX4FS_FS=m
225# CONFIG_QNX4FS_RW is not set
226CONFIG_ROMFS_FS=m
227CONFIG_EXT2_FS=y
228CONFIG_SYSV_FS=m
229CONFIG_UDF_FS=m
230CONFIG_UFS_FS=m
231# CONFIG_UFS_FS_WRITE is not set
232
233#
234# Network File Systems
235#
236# CONFIG_CODA_FS is not set
237# CONFIG_INTERMEZZO_FS is not set
238CONFIG_NFS_FS=y
239CONFIG_NFS_V3=y
240# CONFIG_ROOT_NFS is not set
241CONFIG_NFSD=y
242CONFIG_NFSD_V3=y
243CONFIG_SUNRPC=y
244CONFIG_LOCKD=y
245CONFIG_LOCKD_V4=y
246# CONFIG_SMB_FS is not set
247# CONFIG_NCP_FS is not set
248# CONFIG_NCPFS_PACKET_SIGNING is not set
249# CONFIG_NCPFS_IOCTL_LOCKING is not set
250# CONFIG_NCPFS_STRONG is not set
251# CONFIG_NCPFS_NFS_NS is not set
252# CONFIG_NCPFS_OS2_NS is not set
253# CONFIG_NCPFS_SMALLDOS is not set
254# CONFIG_NCPFS_NLS is not set
255# CONFIG_NCPFS_EXTRAS is not set
256# CONFIG_ZISOFS_FS is not set
257CONFIG_ZLIB_FS_INFLATE=m
258
259#
260# Partition Types
261#
262# CONFIG_PARTITION_ADVANCED is not set
263CONFIG_MSDOS_PARTITION=y
264# CONFIG_SMB_NLS is not set
265CONFIG_NLS=y
266
267#
268# Native Language Support
269#
270CONFIG_NLS_DEFAULT="iso8859-1"
271# CONFIG_NLS_CODEPAGE_437 is not set
272# CONFIG_NLS_CODEPAGE_737 is not set
273# CONFIG_NLS_CODEPAGE_775 is not set
274# CONFIG_NLS_CODEPAGE_850 is not set
275# CONFIG_NLS_CODEPAGE_852 is not set
276# CONFIG_NLS_CODEPAGE_855 is not set
277# CONFIG_NLS_CODEPAGE_857 is not set
278# CONFIG_NLS_CODEPAGE_860 is not set
279# CONFIG_NLS_CODEPAGE_861 is not set
280# CONFIG_NLS_CODEPAGE_862 is not set
281# CONFIG_NLS_CODEPAGE_863 is not set
282# CONFIG_NLS_CODEPAGE_864 is not set
283# CONFIG_NLS_CODEPAGE_865 is not set
284# CONFIG_NLS_CODEPAGE_866 is not set
285# CONFIG_NLS_CODEPAGE_869 is not set
286# CONFIG_NLS_CODEPAGE_936 is not set
287# CONFIG_NLS_CODEPAGE_950 is not set
288# CONFIG_NLS_CODEPAGE_932 is not set
289# CONFIG_NLS_CODEPAGE_949 is not set
290# CONFIG_NLS_CODEPAGE_874 is not set
291# CONFIG_NLS_ISO8859_8 is not set
292# CONFIG_NLS_CODEPAGE_1250 is not set
293# CONFIG_NLS_CODEPAGE_1251 is not set
294# CONFIG_NLS_ISO8859_1 is not set
295# CONFIG_NLS_ISO8859_2 is not set
296# CONFIG_NLS_ISO8859_3 is not set
297# CONFIG_NLS_ISO8859_4 is not set
298# CONFIG_NLS_ISO8859_5 is not set
299# CONFIG_NLS_ISO8859_6 is not set
300# CONFIG_NLS_ISO8859_7 is not set
301# CONFIG_NLS_ISO8859_9 is not set
302# CONFIG_NLS_ISO8859_13 is not set
303# CONFIG_NLS_ISO8859_14 is not set
304# CONFIG_NLS_ISO8859_15 is not set
305# CONFIG_NLS_KOI8_R is not set
306# CONFIG_NLS_KOI8_U is not set
307# CONFIG_NLS_UTF8 is not set
308
309#
310# Multi-device support (RAID and LVM)
311#
312# CONFIG_MD is not set
313# CONFIG_BLK_DEV_MD is not set
314# CONFIG_MD_LINEAR is not set
315# CONFIG_MD_RAID0 is not set
316# CONFIG_MD_RAID1 is not set
317# CONFIG_MD_RAID5 is not set
318# CONFIG_MD_MULTIPATH is not set
319# CONFIG_BLK_DEV_LVM is not set
320
321#
322# Memory Technology Devices (MTD)
323#
324# CONFIG_MTD is not set
325
326#
327# Kernel hacking
328#
329# CONFIG_DEBUG_SLAB is not set
330# CONFIG_DEBUG_INFO is not set
331# CONFIG_PT_PROXY is not set
332# CONFIG_GPROF is not set
333# CONFIG_GCOV is not set
diff --git a/arch/um/defconfig b/arch/um/defconfig
index a54d0efeca..a25cd25d55 100644
--- a/arch/um/defconfig
+++ b/arch/um/defconfig
@@ -189,7 +189,7 @@ CONFIG_XTERM_CHAN=y
189# CONFIG_NOCONFIG_CHAN is not set 189# CONFIG_NOCONFIG_CHAN is not set
190CONFIG_CON_ZERO_CHAN="fd:0,fd:1" 190CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
191CONFIG_CON_CHAN="xterm" 191CONFIG_CON_CHAN="xterm"
192CONFIG_SSL_CHAN="pty" 192CONFIG_SSL_CHAN="pts"
193CONFIG_UNIX98_PTYS=y 193CONFIG_UNIX98_PTYS=y
194CONFIG_LEGACY_PTYS=y 194CONFIG_LEGACY_PTYS=y
195CONFIG_LEGACY_PTY_COUNT=256 195CONFIG_LEGACY_PTY_COUNT=256
@@ -527,3 +527,4 @@ CONFIG_FORCED_INLINING=y
527# CONFIG_RCU_TORTURE_TEST is not set 527# CONFIG_RCU_TORTURE_TEST is not set
528# CONFIG_GPROF is not set 528# CONFIG_GPROF is not set
529# CONFIG_GCOV is not set 529# CONFIG_GCOV is not set
530# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c
index 3aa3516117..368d3e97df 100644
--- a/arch/um/drivers/chan_kern.c
+++ b/arch/um/drivers/chan_kern.c
@@ -203,22 +203,37 @@ void chan_enable_winch(struct list_head *chans, struct tty_struct *tty)
203 } 203 }
204} 204}
205 205
206void enable_chan(struct line *line) 206int enable_chan(struct line *line)
207{ 207{
208 struct list_head *ele; 208 struct list_head *ele;
209 struct chan *chan; 209 struct chan *chan;
210 int err;
210 211
211 list_for_each(ele, &line->chan_list){ 212 list_for_each(ele, &line->chan_list){
212 chan = list_entry(ele, struct chan, list); 213 chan = list_entry(ele, struct chan, list);
213 if(open_one_chan(chan)) 214 err = open_one_chan(chan);
215 if (err) {
216 if (chan->primary)
217 goto out_close;
218
214 continue; 219 continue;
220 }
215 221
216 if(chan->enabled) 222 if(chan->enabled)
217 continue; 223 continue;
218 line_setup_irq(chan->fd, chan->input, chan->output, line, 224 err = line_setup_irq(chan->fd, chan->input, chan->output, line,
219 chan); 225 chan);
226 if (err)
227 goto out_close;
228
220 chan->enabled = 1; 229 chan->enabled = 1;
221 } 230 }
231
232 return 0;
233
234 out_close:
235 close_chan(&line->chan_list, 0);
236 return err;
222} 237}
223 238
224/* Items are added in IRQ context, when free_irq can't be called, and 239/* Items are added in IRQ context, when free_irq can't be called, and
diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c
index 13f0bf852b..4d438f36ea 100644
--- a/arch/um/drivers/chan_user.c
+++ b/arch/um/drivers/chan_user.c
@@ -51,19 +51,21 @@ error:
51/* 51/*
52 * UML SIGWINCH handling 52 * UML SIGWINCH handling
53 * 53 *
54 * The point of this is to handle SIGWINCH on consoles which have host ttys and 54 * The point of this is to handle SIGWINCH on consoles which have host
55 * relay them inside UML to whatever might be running on the console and cares 55 * ttys and relay them inside UML to whatever might be running on the
56 * about the window size (since SIGWINCH notifies about terminal size changes). 56 * console and cares about the window size (since SIGWINCH notifies
57 * about terminal size changes).
57 * 58 *
58 * So, we have a separate thread for each host tty attached to a UML device 59 * So, we have a separate thread for each host tty attached to a UML
59 * (side-issue - I'm annoyed that one thread can't have multiple controlling 60 * device (side-issue - I'm annoyed that one thread can't have
60 * ttys for purposed of handling SIGWINCH, but I imagine there are other reasons 61 * multiple controlling ttys for the purpose of handling SIGWINCH, but
61 * that doesn't make any sense). 62 * I imagine there are other reasons that doesn't make any sense).
62 * 63 *
63 * SIGWINCH can't be received synchronously, so you have to set up to receive it 64 * SIGWINCH can't be received synchronously, so you have to set up to
64 * as a signal. That being the case, if you are going to wait for it, it is 65 * receive it as a signal. That being the case, if you are going to
65 * convenient to sit in sigsuspend() and wait for the signal to bounce you out of 66 * wait for it, it is convenient to sit in sigsuspend() and wait for
66 * it (see below for how we make sure to exit only on SIGWINCH). 67 * the signal to bounce you out of it (see below for how we make sure
68 * to exit only on SIGWINCH).
67 */ 69 */
68 70
69static void winch_handler(int sig) 71static void winch_handler(int sig)
@@ -112,7 +114,8 @@ static int winch_thread(void *arg)
112 114
113 err = os_new_tty_pgrp(pty_fd, os_getpid()); 115 err = os_new_tty_pgrp(pty_fd, os_getpid());
114 if(err < 0){ 116 if(err < 0){
115 printk("winch_thread : new_tty_pgrp failed, err = %d\n", -err); 117 printk("winch_thread : new_tty_pgrp failed on fd %d, "
118 "err = %d\n", pty_fd, -err);
116 exit(1); 119 exit(1);
117 } 120 }
118 121
@@ -126,8 +129,9 @@ static int winch_thread(void *arg)
126 "err = %d\n", -count); 129 "err = %d\n", -count);
127 130
128 while(1){ 131 while(1){
129 /* This will be interrupted by SIGWINCH only, since other signals 132 /* This will be interrupted by SIGWINCH only, since
130 * are blocked.*/ 133 * other signals are blocked.
134 */
131 sigsuspend(&sigs); 135 sigsuspend(&sigs);
132 136
133 count = os_write_file(pipe_fd, &c, sizeof(c)); 137 count = os_write_file(pipe_fd, &c, sizeof(c));
@@ -137,10 +141,10 @@ static int winch_thread(void *arg)
137 } 141 }
138} 142}
139 143
140static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out) 144static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out,
145 unsigned long *stack_out)
141{ 146{
142 struct winch_data data; 147 struct winch_data data;
143 unsigned long stack;
144 int fds[2], n, err; 148 int fds[2], n, err;
145 char c; 149 char c;
146 150
@@ -153,9 +157,11 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out)
153 data = ((struct winch_data) { .pty_fd = fd, 157 data = ((struct winch_data) { .pty_fd = fd,
154 .pipe_fd = fds[1] } ); 158 .pipe_fd = fds[1] } );
155 /* CLONE_FILES so this thread doesn't hold open files which are open 159 /* CLONE_FILES so this thread doesn't hold open files which are open
156 * now, but later closed. This is a problem with /dev/net/tun. 160 * now, but later closed in a different thread. This is a
161 * problem with /dev/net/tun, which if held open by this
162 * thread, prevents the TUN/TAP device from being reused.
157 */ 163 */
158 err = run_helper_thread(winch_thread, &data, CLONE_FILES, &stack, 0); 164 err = run_helper_thread(winch_thread, &data, CLONE_FILES, stack_out);
159 if(err < 0){ 165 if(err < 0){
160 printk("fork of winch_thread failed - errno = %d\n", -err); 166 printk("fork of winch_thread failed - errno = %d\n", -err);
161 goto out_close; 167 goto out_close;
@@ -170,7 +176,13 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out)
170 err = -EINVAL; 176 err = -EINVAL;
171 goto out_close; 177 goto out_close;
172 } 178 }
173 return err ; 179
180 if (os_set_fd_block(*fd_out, 0)) {
181 printk("winch_tramp: failed to set thread_fd non-blocking.\n");
182 goto out_close;
183 }
184
185 return err;
174 186
175 out_close: 187 out_close:
176 os_close_file(fds[1]); 188 os_close_file(fds[1]);
@@ -181,25 +193,25 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out)
181 193
182void register_winch(int fd, struct tty_struct *tty) 194void register_winch(int fd, struct tty_struct *tty)
183{ 195{
184 int pid, thread, thread_fd = -1; 196 unsigned long stack;
185 int count; 197 int pid, thread, count, thread_fd = -1;
186 char c = 1; 198 char c = 1;
187 199
188 if(!isatty(fd)) 200 if(!isatty(fd))
189 return; 201 return;
190 202
191 pid = tcgetpgrp(fd); 203 pid = tcgetpgrp(fd);
192 if(!CHOOSE_MODE_PROC(is_tracer_winch, is_skas_winch, pid, fd, 204 if (!CHOOSE_MODE_PROC(is_tracer_winch, is_skas_winch, pid, fd, tty) &&
193 tty) && (pid == -1)){ 205 (pid == -1)) {
194 thread = winch_tramp(fd, tty, &thread_fd); 206 thread = winch_tramp(fd, tty, &thread_fd, &stack);
195 if(thread > 0){ 207 if (thread < 0)
196 register_winch_irq(thread_fd, fd, thread, tty); 208 return;
197 209
198 count = os_write_file(thread_fd, &c, sizeof(c)); 210 register_winch_irq(thread_fd, fd, thread, tty, stack);
199 if(count != sizeof(c)) 211
200 printk("register_winch : failed to write " 212 count = os_write_file(thread_fd, &c, sizeof(c));
201 "synchronization byte, err = %d\n", 213 if(count != sizeof(c))
202 -count); 214 printk("register_winch : failed to write "
203 } 215 "synchronization byte, err = %d\n", -count);
204 } 216 }
205} 217}
diff --git a/arch/um/drivers/cow_sys.h b/arch/um/drivers/cow_sys.h
index 15453845d2..ca8c9e11a3 100644
--- a/arch/um/drivers/cow_sys.h
+++ b/arch/um/drivers/cow_sys.h
@@ -8,7 +8,7 @@
8 8
9static inline void *cow_malloc(int size) 9static inline void *cow_malloc(int size)
10{ 10{
11 return um_kmalloc(size); 11 return kmalloc(size, UM_GFP_KERNEL);
12} 12}
13 13
14static inline void cow_free(void *ptr) 14static inline void cow_free(void *ptr)
diff --git a/arch/um/drivers/daemon_user.c b/arch/um/drivers/daemon_user.c
index b869e38996..8d2008f066 100644
--- a/arch/um/drivers/daemon_user.c
+++ b/arch/um/drivers/daemon_user.c
@@ -35,7 +35,7 @@ static struct sockaddr_un *new_addr(void *name, int len)
35{ 35{
36 struct sockaddr_un *sun; 36 struct sockaddr_un *sun;
37 37
38 sun = um_kmalloc(sizeof(struct sockaddr_un)); 38 sun = kmalloc(sizeof(struct sockaddr_un), UM_GFP_KERNEL);
39 if(sun == NULL){ 39 if(sun == NULL){
40 printk("new_addr: allocation of sockaddr_un failed\n"); 40 printk("new_addr: allocation of sockaddr_un failed\n");
41 return NULL; 41 return NULL;
@@ -83,7 +83,7 @@ static int connect_to_switch(struct daemon_data *pri)
83 goto out_close; 83 goto out_close;
84 } 84 }
85 85
86 sun = um_kmalloc(sizeof(struct sockaddr_un)); 86 sun = kmalloc(sizeof(struct sockaddr_un), UM_GFP_KERNEL);
87 if(sun == NULL){ 87 if(sun == NULL){
88 printk("new_addr: allocation of sockaddr_un failed\n"); 88 printk("new_addr: allocation of sockaddr_un failed\n");
89 err = -ENOMEM; 89 err = -ENOMEM;
diff --git a/arch/um/drivers/fd.c b/arch/um/drivers/fd.c
index 7f083ec47a..39c01ffd45 100644
--- a/arch/um/drivers/fd.c
+++ b/arch/um/drivers/fd.c
@@ -37,7 +37,7 @@ static void *fd_init(char *str, int device, const struct chan_opts *opts)
37 printk("fd_init : couldn't parse file descriptor '%s'\n", str); 37 printk("fd_init : couldn't parse file descriptor '%s'\n", str);
38 return(NULL); 38 return(NULL);
39 } 39 }
40 data = um_kmalloc(sizeof(*data)); 40 data = kmalloc(sizeof(*data), UM_GFP_KERNEL);
41 if(data == NULL) return(NULL); 41 if(data == NULL) return(NULL);
42 *data = ((struct fd_chan) { .fd = n, 42 *data = ((struct fd_chan) { .fd = n,
43 .raw = opts->raw }); 43 .raw = opts->raw });
diff --git a/arch/um/drivers/harddog_user.c b/arch/um/drivers/harddog_user.c
index 5eeecf8917..1171790f74 100644
--- a/arch/um/drivers/harddog_user.c
+++ b/arch/um/drivers/harddog_user.c
@@ -68,7 +68,7 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock)
68 args = pid_args; 68 args = pid_args;
69 } 69 }
70 70
71 pid = run_helper(pre_exec, &data, args, NULL); 71 pid = run_helper(pre_exec, &data, args);
72 72
73 os_close_file(out_fds[0]); 73 os_close_file(out_fds[0]);
74 os_close_file(in_fds[1]); 74 os_close_file(in_fds[1]);
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index 4bd40bb43e..3e0b68e297 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -454,7 +454,10 @@ int line_open(struct line *lines, struct tty_struct *tty)
454 tty->driver_data = line; 454 tty->driver_data = line;
455 line->tty = tty; 455 line->tty = tty;
456 456
457 enable_chan(line); 457 err = enable_chan(line);
458 if (err)
459 return err;
460
458 INIT_DELAYED_WORK(&line->task, line_timer_cb); 461 INIT_DELAYED_WORK(&line->task, line_timer_cb);
459 462
460 if(!line->sigio){ 463 if(!line->sigio){
@@ -746,8 +749,24 @@ struct winch {
746 int tty_fd; 749 int tty_fd;
747 int pid; 750 int pid;
748 struct tty_struct *tty; 751 struct tty_struct *tty;
752 unsigned long stack;
749}; 753};
750 754
755static void free_winch(struct winch *winch, int free_irq_ok)
756{
757 list_del(&winch->list);
758
759 if (winch->pid != -1)
760 os_kill_process(winch->pid, 1);
761 if (winch->fd != -1)
762 os_close_file(winch->fd);
763 if (winch->stack != 0)
764 free_stack(winch->stack, 0);
765 if (free_irq_ok)
766 free_irq(WINCH_IRQ, winch);
767 kfree(winch);
768}
769
751static irqreturn_t winch_interrupt(int irq, void *data) 770static irqreturn_t winch_interrupt(int irq, void *data)
752{ 771{
753 struct winch *winch = data; 772 struct winch *winch = data;
@@ -764,12 +783,13 @@ static irqreturn_t winch_interrupt(int irq, void *data)
764 "errno = %d\n", -err); 783 "errno = %d\n", -err);
765 printk("fd %d is losing SIGWINCH support\n", 784 printk("fd %d is losing SIGWINCH support\n",
766 winch->tty_fd); 785 winch->tty_fd);
786 free_winch(winch, 0);
767 return IRQ_HANDLED; 787 return IRQ_HANDLED;
768 } 788 }
769 goto out; 789 goto out;
770 } 790 }
771 } 791 }
772 tty = winch->tty; 792 tty = winch->tty;
773 if (tty != NULL) { 793 if (tty != NULL) {
774 line = tty->driver_data; 794 line = tty->driver_data;
775 chan_window_size(&line->chan_list, &tty->winsize.ws_row, 795 chan_window_size(&line->chan_list, &tty->winsize.ws_row,
@@ -782,43 +802,44 @@ static irqreturn_t winch_interrupt(int irq, void *data)
782 return IRQ_HANDLED; 802 return IRQ_HANDLED;
783} 803}
784 804
785void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty) 805void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty,
806 unsigned long stack)
786{ 807{
787 struct winch *winch; 808 struct winch *winch;
788 809
789 winch = kmalloc(sizeof(*winch), GFP_KERNEL); 810 winch = kmalloc(sizeof(*winch), GFP_KERNEL);
790 if (winch == NULL) { 811 if (winch == NULL) {
791 printk("register_winch_irq - kmalloc failed\n"); 812 printk("register_winch_irq - kmalloc failed\n");
792 return; 813 goto cleanup;
793 } 814 }
794 815
795 *winch = ((struct winch) { .list = LIST_HEAD_INIT(winch->list), 816 *winch = ((struct winch) { .list = LIST_HEAD_INIT(winch->list),
796 .fd = fd, 817 .fd = fd,
797 .tty_fd = tty_fd, 818 .tty_fd = tty_fd,
798 .pid = pid, 819 .pid = pid,
799 .tty = tty }); 820 .tty = tty,
821 .stack = stack });
822
823 if (um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt,
824 IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
825 "winch", winch) < 0) {
826 printk("register_winch_irq - failed to register IRQ\n");
827 goto out_free;
828 }
800 829
801 spin_lock(&winch_handler_lock); 830 spin_lock(&winch_handler_lock);
802 list_add(&winch->list, &winch_handlers); 831 list_add(&winch->list, &winch_handlers);
803 spin_unlock(&winch_handler_lock); 832 spin_unlock(&winch_handler_lock);
804 833
805 if(um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt, 834 return;
806 IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
807 "winch", winch) < 0)
808 printk("register_winch_irq - failed to register IRQ\n");
809}
810
811static void free_winch(struct winch *winch)
812{
813 list_del(&winch->list);
814
815 if(winch->pid != -1)
816 os_kill_process(winch->pid, 1);
817 if(winch->fd != -1)
818 os_close_file(winch->fd);
819 835
820 free_irq(WINCH_IRQ, winch); 836 out_free:
821 kfree(winch); 837 kfree(winch);
838 cleanup:
839 os_kill_process(pid, 1);
840 os_close_file(fd);
841 if (stack != 0)
842 free_stack(stack, 0);
822} 843}
823 844
824static void unregister_winch(struct tty_struct *tty) 845static void unregister_winch(struct tty_struct *tty)
@@ -831,7 +852,7 @@ static void unregister_winch(struct tty_struct *tty)
831 list_for_each(ele, &winch_handlers){ 852 list_for_each(ele, &winch_handlers){
832 winch = list_entry(ele, struct winch, list); 853 winch = list_entry(ele, struct winch, list);
833 if(winch->tty == tty){ 854 if(winch->tty == tty){
834 free_winch(winch); 855 free_winch(winch, 1);
835 break; 856 break;
836 } 857 }
837 } 858 }
@@ -847,7 +868,7 @@ static void winch_cleanup(void)
847 868
848 list_for_each_safe(ele, next, &winch_handlers){ 869 list_for_each_safe(ele, next, &winch_handlers){
849 winch = list_entry(ele, struct winch, list); 870 winch = list_entry(ele, struct winch, list);
850 free_winch(winch); 871 free_winch(winch, 1);
851 } 872 }
852 873
853 spin_unlock(&winch_handler_lock); 874 spin_unlock(&winch_handler_lock);
diff --git a/arch/um/drivers/mcast_user.c b/arch/um/drivers/mcast_user.c
index d319db16d4..236a3dfc29 100644
--- a/arch/um/drivers/mcast_user.c
+++ b/arch/um/drivers/mcast_user.c
@@ -30,7 +30,7 @@ static struct sockaddr_in *new_addr(char *addr, unsigned short port)
30{ 30{
31 struct sockaddr_in *sin; 31 struct sockaddr_in *sin;
32 32
33 sin = um_kmalloc(sizeof(struct sockaddr_in)); 33 sin = kmalloc(sizeof(struct sockaddr_in), UM_GFP_KERNEL);
34 if(sin == NULL){ 34 if(sin == NULL){
35 printk("new_addr: allocation of sockaddr_in failed\n"); 35 printk("new_addr: allocation of sockaddr_in failed\n");
36 return NULL; 36 return NULL;
diff --git a/arch/um/drivers/mconsole_user.c b/arch/um/drivers/mconsole_user.c
index 62e5ad6318..f31e71546e 100644
--- a/arch/um/drivers/mconsole_user.c
+++ b/arch/um/drivers/mconsole_user.c
@@ -86,8 +86,9 @@ int mconsole_get_request(int fd, struct mc_request *req)
86 int len; 86 int len;
87 87
88 req->originlen = sizeof(req->origin); 88 req->originlen = sizeof(req->origin);
89 req->len = recvfrom(fd, &req->request, sizeof(req->request), 0, 89 req->len = recvfrom(fd, &req->request, sizeof(req->request),
90 (struct sockaddr *) req->origin, &req->originlen); 90 MSG_DONTWAIT, (struct sockaddr *) req->origin,
91 &req->originlen);
91 if (req->len < 0) 92 if (req->len < 0)
92 return 0; 93 return 0;
93 94
diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c
index 3503cff867..da946e3e1b 100644
--- a/arch/um/drivers/net_user.c
+++ b/arch/um/drivers/net_user.c
@@ -187,7 +187,7 @@ static int change_tramp(char **argv, char *output, int output_len)
187 } 187 }
188 pe_data.close_me = fds[0]; 188 pe_data.close_me = fds[0];
189 pe_data.stdout = fds[1]; 189 pe_data.stdout = fds[1];
190 pid = run_helper(change_pre_exec, &pe_data, argv, NULL); 190 pid = run_helper(change_pre_exec, &pe_data, argv);
191 191
192 if (pid > 0) /* Avoid hang as we won't get data in failure case. */ 192 if (pid > 0) /* Avoid hang as we won't get data in failure case. */
193 read_output(fds[0], output, output_len); 193 read_output(fds[0], output, output_len);
@@ -217,7 +217,7 @@ static void change(char *dev, char *what, unsigned char *addr,
217 netmask[2], netmask[3]); 217 netmask[2], netmask[3]);
218 218
219 output_len = UM_KERN_PAGE_SIZE; 219 output_len = UM_KERN_PAGE_SIZE;
220 output = um_kmalloc(output_len); 220 output = kmalloc(output_len, UM_GFP_KERNEL);
221 if(output == NULL) 221 if(output == NULL)
222 printk("change : failed to allocate output buffer\n"); 222 printk("change : failed to allocate output buffer\n");
223 223
diff --git a/arch/um/drivers/pcap_user.c b/arch/um/drivers/pcap_user.c
index 483aa15222..1316456e2a 100644
--- a/arch/um/drivers/pcap_user.c
+++ b/arch/um/drivers/pcap_user.c
@@ -53,7 +53,7 @@ static int pcap_open(void *data)
53 return -EIO; 53 return -EIO;
54 } 54 }
55 55
56 pri->compiled = um_kmalloc(sizeof(struct bpf_program)); 56 pri->compiled = kmalloc(sizeof(struct bpf_program), UM_GFP_KERNEL);
57 if(pri->compiled == NULL){ 57 if(pri->compiled == NULL){
58 printk(UM_KERN_ERR "pcap_open : kmalloc failed\n"); 58 printk(UM_KERN_ERR "pcap_open : kmalloc failed\n");
59 return -ENOMEM; 59 return -ENOMEM;
diff --git a/arch/um/drivers/port_user.c b/arch/um/drivers/port_user.c
index 3f6357d24b..c799b00012 100644
--- a/arch/um/drivers/port_user.c
+++ b/arch/um/drivers/port_user.c
@@ -50,7 +50,7 @@ static void *port_init(char *str, int device, const struct chan_opts *opts)
50 if(kern_data == NULL) 50 if(kern_data == NULL)
51 return NULL; 51 return NULL;
52 52
53 data = um_kmalloc(sizeof(*data)); 53 data = kmalloc(sizeof(*data), UM_GFP_KERNEL);
54 if(data == NULL) 54 if(data == NULL)
55 goto err; 55 goto err;
56 56
@@ -188,7 +188,7 @@ int port_connection(int fd, int *socket, int *pid_out)
188 { .sock_fd = new, 188 { .sock_fd = new,
189 .pipe_fd = socket[1] }); 189 .pipe_fd = socket[1] });
190 190
191 err = run_helper(port_pre_exec, &data, argv, NULL); 191 err = run_helper(port_pre_exec, &data, argv);
192 if(err < 0) 192 if(err < 0)
193 goto out_shutdown; 193 goto out_shutdown;
194 194
diff --git a/arch/um/drivers/pty.c b/arch/um/drivers/pty.c
index df4976c9ee..1e3fd619a8 100644
--- a/arch/um/drivers/pty.c
+++ b/arch/um/drivers/pty.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
@@ -7,12 +7,14 @@
7#include <stdlib.h> 7#include <stdlib.h>
8#include <unistd.h> 8#include <unistd.h>
9#include <string.h> 9#include <string.h>
10#include <fcntl.h>
10#include <errno.h> 11#include <errno.h>
11#include <termios.h> 12#include <termios.h>
13#include <sys/stat.h>
12#include "chan_user.h" 14#include "chan_user.h"
13#include "user.h"
14#include "kern_util.h"
15#include "os.h" 15#include "os.h"
16#include "user.h"
17#include "kern_constants.h"
16#include "um_malloc.h" 18#include "um_malloc.h"
17 19
18struct pty_chan { 20struct pty_chan {
@@ -27,12 +29,14 @@ static void *pty_chan_init(char *str, int device, const struct chan_opts *opts)
27{ 29{
28 struct pty_chan *data; 30 struct pty_chan *data;
29 31
30 data = um_kmalloc(sizeof(*data)); 32 data = kmalloc(sizeof(*data), UM_GFP_KERNEL);
31 if(data == NULL) return(NULL); 33 if (data == NULL)
34 return NULL;
35
32 *data = ((struct pty_chan) { .announce = opts->announce, 36 *data = ((struct pty_chan) { .announce = opts->announce,
33 .dev = device, 37 .dev = device,
34 .raw = opts->raw }); 38 .raw = opts->raw });
35 return(data); 39 return data;
36} 40}
37 41
38static int pts_open(int input, int output, int primary, void *d, 42static int pts_open(int input, int output, int primary, void *d,
@@ -43,31 +47,35 @@ static int pts_open(int input, int output, int primary, void *d,
43 int fd, err; 47 int fd, err;
44 48
45 fd = get_pty(); 49 fd = get_pty();
46 if(fd < 0){ 50 if (fd < 0) {
47 err = -errno; 51 err = -errno;
48 printk("open_pts : Failed to open pts\n"); 52 printk(UM_KERN_ERR "open_pts : Failed to open pts\n");
49 return err; 53 return err;
50 } 54 }
51 if(data->raw){ 55
56 if (data->raw) {
52 CATCH_EINTR(err = tcgetattr(fd, &data->tt)); 57 CATCH_EINTR(err = tcgetattr(fd, &data->tt));
53 if(err) 58 if (err)
54 return(err); 59 return err;
55 60
56 err = raw(fd); 61 err = raw(fd);
57 if(err) 62 if (err)
58 return(err); 63 return err;
59 } 64 }
60 65
61 dev = ptsname(fd); 66 dev = ptsname(fd);
62 sprintf(data->dev_name, "%s", dev); 67 sprintf(data->dev_name, "%s", dev);
63 *dev_out = data->dev_name; 68 *dev_out = data->dev_name;
69
64 if (data->announce) 70 if (data->announce)
65 (*data->announce)(dev, data->dev); 71 (*data->announce)(dev, data->dev);
66 return(fd); 72
73 return fd;
67} 74}
68 75
69static int getmaster(char *line) 76static int getmaster(char *line)
70{ 77{
78 struct stat buf;
71 char *pty, *bank, *cp; 79 char *pty, *bank, *cp;
72 int master, err; 80 int master, err;
73 81
@@ -75,24 +83,29 @@ static int getmaster(char *line)
75 for (bank = "pqrs"; *bank; bank++) { 83 for (bank = "pqrs"; *bank; bank++) {
76 line[strlen("/dev/pty")] = *bank; 84 line[strlen("/dev/pty")] = *bank;
77 *pty = '0'; 85 *pty = '0';
78 if (os_stat_file(line, NULL) < 0) 86 /* Did we hit the end ? */
87 if ((stat(line, &buf) < 0) && (errno == ENOENT))
79 break; 88 break;
89
80 for (cp = "0123456789abcdef"; *cp; cp++) { 90 for (cp = "0123456789abcdef"; *cp; cp++) {
81 *pty = *cp; 91 *pty = *cp;
82 master = os_open_file(line, of_rdwr(OPENFLAGS()), 0); 92 master = open(line, O_RDWR);
83 if (master >= 0) { 93 if (master >= 0) {
84 char *tp = &line[strlen("/dev/")]; 94 char *tp = &line[strlen("/dev/")];
85 95
86 /* verify slave side is usable */ 96 /* verify slave side is usable */
87 *tp = 't'; 97 *tp = 't';
88 err = os_access(line, OS_ACC_RW_OK); 98 err = access(line, R_OK | W_OK);
89 *tp = 'p'; 99 *tp = 'p';
90 if(err == 0) return(master); 100 if(!err)
91 (void) os_close_file(master); 101 return master;
102 close(master);
92 } 103 }
93 } 104 }
94 } 105 }
95 return(-1); 106
107 printk(UM_KERN_ERR "getmaster - no usable host pty devices\n");
108 return -ENOENT;
96} 109}
97 110
98static int pty_open(int input, int output, int primary, void *d, 111static int pty_open(int input, int output, int primary, void *d,
@@ -103,20 +116,22 @@ static int pty_open(int input, int output, int primary, void *d,
103 char dev[sizeof("/dev/ptyxx\0")] = "/dev/ptyxx"; 116 char dev[sizeof("/dev/ptyxx\0")] = "/dev/ptyxx";
104 117
105 fd = getmaster(dev); 118 fd = getmaster(dev);
106 if(fd < 0) 119 if (fd < 0)
107 return(-errno); 120 return fd;
108 121
109 if(data->raw){ 122 if(data->raw){
110 err = raw(fd); 123 err = raw(fd);
111 if(err) 124 if (err)
112 return(err); 125 return err;
113 } 126 }
114 127
115 if(data->announce) (*data->announce)(dev, data->dev); 128 if (data->announce)
129 (*data->announce)(dev, data->dev);
116 130
117 sprintf(data->dev_name, "%s", dev); 131 sprintf(data->dev_name, "%s", dev);
118 *dev_out = data->dev_name; 132 *dev_out = data->dev_name;
119 return(fd); 133
134 return fd;
120} 135}
121 136
122const struct chan_ops pty_ops = { 137const struct chan_ops pty_ops = {
@@ -144,14 +159,3 @@ const struct chan_ops pts_ops = {
144 .free = generic_free, 159 .free = generic_free,
145 .winch = 0, 160 .winch = 0,
146}; 161};
147
148/*
149 * Overrides for Emacs so that we follow Linus's tabbing style.
150 * Emacs will notice this stuff at the end of the file and automatically
151 * adjust the settings for this buffer only. This must remain at the end
152 * of the file.
153 * ---------------------------------------------------------------------------
154 * Local variables:
155 * c-file-style: "linux"
156 * End:
157 */
diff --git a/arch/um/drivers/slip_user.c b/arch/um/drivers/slip_user.c
index 78f0e515da..c0b73c28cf 100644
--- a/arch/um/drivers/slip_user.c
+++ b/arch/um/drivers/slip_user.c
@@ -85,13 +85,13 @@ static int slip_tramp(char **argv, int fd)
85 pe_data.stdin = fd; 85 pe_data.stdin = fd;
86 pe_data.stdout = fds[1]; 86 pe_data.stdout = fds[1];
87 pe_data.close_me = fds[0]; 87 pe_data.close_me = fds[0];
88 err = run_helper(slip_pre_exec, &pe_data, argv, NULL); 88 err = run_helper(slip_pre_exec, &pe_data, argv);
89 if(err < 0) 89 if(err < 0)
90 goto out_close; 90 goto out_close;
91 pid = err; 91 pid = err;
92 92
93 output_len = UM_KERN_PAGE_SIZE; 93 output_len = UM_KERN_PAGE_SIZE;
94 output = um_kmalloc(output_len); 94 output = kmalloc(output_len, UM_GFP_KERNEL);
95 if(output == NULL){ 95 if(output == NULL){
96 printk("slip_tramp : failed to allocate output buffer\n"); 96 printk("slip_tramp : failed to allocate output buffer\n");
97 os_kill_process(pid, 1); 97 os_kill_process(pid, 1);
diff --git a/arch/um/drivers/slirp_user.c b/arch/um/drivers/slirp_user.c
index 39f889fe99..0e462f64f2 100644
--- a/arch/um/drivers/slirp_user.c
+++ b/arch/um/drivers/slirp_user.c
@@ -42,7 +42,7 @@ static int slirp_tramp(char **argv, int fd)
42 42
43 pe_data.stdin = fd; 43 pe_data.stdin = fd;
44 pe_data.stdout = fd; 44 pe_data.stdout = fd;
45 pid = run_helper(slirp_pre_exec, &pe_data, argv, NULL); 45 pid = run_helper(slirp_pre_exec, &pe_data, argv);
46 46
47 return(pid); 47 return(pid);
48} 48}
diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c
index fd09ad9e9c..875d60d0c6 100644
--- a/arch/um/drivers/ssl.c
+++ b/arch/um/drivers/ssl.c
@@ -42,8 +42,6 @@ static struct chan_opts opts = {
42 .announce = ssl_announce, 42 .announce = ssl_announce,
43 .xterm_title = "Serial Line #%d", 43 .xterm_title = "Serial Line #%d",
44 .raw = 1, 44 .raw = 1,
45 .tramp_stack = 0,
46 .in_kernel = 1,
47}; 45};
48 46
49static int ssl_config(char *str, char **error_out); 47static int ssl_config(char *str, char **error_out);
@@ -99,7 +97,13 @@ static int ssl_remove(int n, char **error_out)
99 97
100static int ssl_open(struct tty_struct *tty, struct file *filp) 98static int ssl_open(struct tty_struct *tty, struct file *filp)
101{ 99{
102 return line_open(serial_lines, tty); 100 int err = line_open(serial_lines, tty);
101
102 if (err)
103 printk(KERN_ERR "Failed to open serial line %d, err = %d\n",
104 tty->index, err);
105
106 return err;
103} 107}
104 108
105#if 0 109#if 0
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c
index 2bb4193ac1..656036e90b 100644
--- a/arch/um/drivers/stdio_console.c
+++ b/arch/um/drivers/stdio_console.c
@@ -46,8 +46,6 @@ static struct chan_opts opts = {
46 .announce = stdio_announce, 46 .announce = stdio_announce,
47 .xterm_title = "Virtual Console #%d", 47 .xterm_title = "Virtual Console #%d",
48 .raw = 1, 48 .raw = 1,
49 .tramp_stack = 0,
50 .in_kernel = 1,
51}; 49};
52 50
53static int con_config(char *str, char **error_out); 51static int con_config(char *str, char **error_out);
@@ -101,7 +99,12 @@ static int con_remove(int n, char **error_out)
101 99
102static int con_open(struct tty_struct *tty, struct file *filp) 100static int con_open(struct tty_struct *tty, struct file *filp)
103{ 101{
104 return line_open(vts, tty); 102 int err = line_open(vts, tty);
103 if (err)
104 printk(KERN_ERR "Failed to open console %d, err = %d\n",
105 tty->index, err);
106
107 return err;
105} 108}
106 109
107/* Set in an initcall, checked in an exitcall */ 110/* Set in an initcall, checked in an exitcall */
diff --git a/arch/um/drivers/tty.c b/arch/um/drivers/tty.c
index c07d0d5627..a9f87e19c5 100644
--- a/arch/um/drivers/tty.c
+++ b/arch/um/drivers/tty.c
@@ -29,7 +29,7 @@ static void *tty_chan_init(char *str, int device, const struct chan_opts *opts)
29 } 29 }
30 str++; 30 str++;
31 31
32 data = um_kmalloc(sizeof(*data)); 32 data = kmalloc(sizeof(*data), UM_GFP_KERNEL);
33 if(data == NULL) 33 if(data == NULL)
34 return NULL; 34 return NULL;
35 *data = ((struct tty_chan) { .dev = str, 35 *data = ((struct tty_chan) { .dev = str,
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 2e09f162c4..fc27f6c72b 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -712,6 +712,8 @@ static int ubd_add(int n, char **error_out)
712 ubd_dev->queue->queuedata = ubd_dev; 712 ubd_dev->queue->queuedata = ubd_dev;
713 713
714 blk_queue_max_hw_segments(ubd_dev->queue, MAX_SG); 714 blk_queue_max_hw_segments(ubd_dev->queue, MAX_SG);
715 if(ubd_dev->cow.file != NULL)
716 blk_queue_max_sectors(ubd_dev->queue, 8 * sizeof(long));
715 err = ubd_disk_register(MAJOR_NR, ubd_dev->size, n, &ubd_gendisk[n]); 717 err = ubd_disk_register(MAJOR_NR, ubd_dev->size, n, &ubd_gendisk[n]);
716 if(err){ 718 if(err){
717 *error_out = "Failed to register device"; 719 *error_out = "Failed to register device";
@@ -1083,7 +1085,7 @@ static void do_ubd_request(request_queue_t *q)
1083{ 1085{
1084 struct io_thread_req *io_req; 1086 struct io_thread_req *io_req;
1085 struct request *req; 1087 struct request *req;
1086 int n; 1088 int n, last_sectors;
1087 1089
1088 while(1){ 1090 while(1){
1089 struct ubd *dev = q->queuedata; 1091 struct ubd *dev = q->queuedata;
@@ -1099,9 +1101,11 @@ static void do_ubd_request(request_queue_t *q)
1099 } 1101 }
1100 1102
1101 req = dev->request; 1103 req = dev->request;
1104 last_sectors = 0;
1102 while(dev->start_sg < dev->end_sg){ 1105 while(dev->start_sg < dev->end_sg){
1103 struct scatterlist *sg = &dev->sg[dev->start_sg]; 1106 struct scatterlist *sg = &dev->sg[dev->start_sg];
1104 1107
1108 req->sector += last_sectors;
1105 io_req = kmalloc(sizeof(struct io_thread_req), 1109 io_req = kmalloc(sizeof(struct io_thread_req),
1106 GFP_ATOMIC); 1110 GFP_ATOMIC);
1107 if(io_req == NULL){ 1111 if(io_req == NULL){
@@ -1113,6 +1117,7 @@ static void do_ubd_request(request_queue_t *q)
1113 (unsigned long long) req->sector << 9, 1117 (unsigned long long) req->sector << 9,
1114 sg->offset, sg->length, sg->page); 1118 sg->offset, sg->length, sg->page);
1115 1119
1120 last_sectors = sg->length >> 9;
1116 n = os_write_file(thread_fd, &io_req, 1121 n = os_write_file(thread_fd, &io_req,
1117 sizeof(struct io_thread_req *)); 1122 sizeof(struct io_thread_req *));
1118 if(n != sizeof(struct io_thread_req *)){ 1123 if(n != sizeof(struct io_thread_req *)){
@@ -1124,7 +1129,6 @@ static void do_ubd_request(request_queue_t *q)
1124 return; 1129 return;
1125 } 1130 }
1126 1131
1127 req->sector += sg->length >> 9;
1128 dev->start_sg++; 1132 dev->start_sg++;
1129 } 1133 }
1130 dev->end_sg = 0; 1134 dev->end_sg = 0;
diff --git a/arch/um/drivers/ubd_user.c b/arch/um/drivers/ubd_user.c
index 4707b3f14c..41d254bd38 100644
--- a/arch/um/drivers/ubd_user.c
+++ b/arch/um/drivers/ubd_user.c
@@ -43,6 +43,12 @@ int start_io_thread(unsigned long sp, int *fd_out)
43 kernel_fd = fds[0]; 43 kernel_fd = fds[0];
44 *fd_out = fds[1]; 44 *fd_out = fds[1];
45 45
46 err = os_set_fd_block(*fd_out, 0);
47 if (err) {
48 printk("start_io_thread - failed to set nonblocking I/O.\n");
49 goto out_close;
50 }
51
46 pid = clone(io_thread, (void *) sp, CLONE_FILES | CLONE_VM | SIGCHLD, 52 pid = clone(io_thread, (void *) sp, CLONE_FILES | CLONE_VM | SIGCHLD,
47 NULL); 53 NULL);
48 if(pid < 0){ 54 if(pid < 0){
diff --git a/arch/um/drivers/xterm.c b/arch/um/drivers/xterm.c
index 571c2b3325..fd817e5415 100644
--- a/arch/um/drivers/xterm.c
+++ b/arch/um/drivers/xterm.c
@@ -1,22 +1,20 @@
1/* 1/*
2 * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include <stdio.h>
7#include <stdlib.h> 6#include <stdlib.h>
7#include <stdio.h>
8#include <unistd.h> 8#include <unistd.h>
9#include <string.h> 9#include <string.h>
10#include <errno.h> 10#include <errno.h>
11#include <termios.h> 11#include <termios.h>
12#include <signal.h>
13#include <sched.h>
14#include <sys/socket.h>
15#include "kern_util.h"
16#include "chan_user.h" 12#include "chan_user.h"
17#include "user.h"
18#include "os.h" 13#include "os.h"
14#include "init.h"
15#include "user.h"
19#include "xterm.h" 16#include "xterm.h"
17#include "kern_constants.h"
20 18
21struct xterm_chan { 19struct xterm_chan {
22 int pid; 20 int pid;
@@ -25,25 +23,21 @@ struct xterm_chan {
25 int device; 23 int device;
26 int raw; 24 int raw;
27 struct termios tt; 25 struct termios tt;
28 unsigned long stack;
29 int direct_rcv;
30}; 26};
31 27
32/* Not static because it's called directly by the tt mode gdb code */ 28static void *xterm_init(char *str, int device, const struct chan_opts *opts)
33void *xterm_init(char *str, int device, const struct chan_opts *opts)
34{ 29{
35 struct xterm_chan *data; 30 struct xterm_chan *data;
36 31
37 data = malloc(sizeof(*data)); 32 data = malloc(sizeof(*data));
38 if(data == NULL) return(NULL); 33 if (data == NULL)
39 *data = ((struct xterm_chan) { .pid = -1, 34 return NULL;
35 *data = ((struct xterm_chan) { .pid = -1,
40 .helper_pid = -1, 36 .helper_pid = -1,
41 .device = device, 37 .device = device,
42 .title = opts->xterm_title, 38 .title = opts->xterm_title,
43 .raw = opts->raw, 39 .raw = opts->raw } );
44 .stack = opts->tramp_stack, 40 return data;
45 .direct_rcv = !opts->in_kernel } );
46 return(data);
47} 41}
48 42
49/* Only changed by xterm_setup, which is a setup */ 43/* Only changed by xterm_setup, which is a setup */
@@ -57,16 +51,22 @@ static int __init xterm_setup(char *line, int *add)
57 terminal_emulator = line; 51 terminal_emulator = line;
58 52
59 line = strchr(line, ','); 53 line = strchr(line, ',');
60 if(line == NULL) return(0); 54 if (line == NULL)
55 return 0;
56
61 *line++ = '\0'; 57 *line++ = '\0';
62 if(*line) title_switch = line; 58 if (*line)
59 title_switch = line;
63 60
64 line = strchr(line, ','); 61 line = strchr(line, ',');
65 if(line == NULL) return(0); 62 if (line == NULL)
63 return 0;
64
66 *line++ = '\0'; 65 *line++ = '\0';
67 if(*line) exec_switch = line; 66 if (*line)
67 exec_switch = line;
68 68
69 return(0); 69 return 0;
70} 70}
71 71
72__uml_setup("xterm=", xterm_setup, 72__uml_setup("xterm=", xterm_setup,
@@ -82,107 +82,128 @@ __uml_setup("xterm=", xterm_setup,
82" are 'xterm=gnome-terminal,-t,-x'.\n\n" 82" are 'xterm=gnome-terminal,-t,-x'.\n\n"
83); 83);
84 84
85/* XXX This badly needs some cleaning up in the error paths 85static int xterm_open(int input, int output, int primary, void *d,
86 * Not static because it's called directly by the tt mode gdb code
87 */
88int xterm_open(int input, int output, int primary, void *d,
89 char **dev_out) 86 char **dev_out)
90{ 87{
91 struct xterm_chan *data = d; 88 struct xterm_chan *data = d;
92 unsigned long stack;
93 int pid, fd, new, err; 89 int pid, fd, new, err;
94 char title[256], file[] = "/tmp/xterm-pipeXXXXXX"; 90 char title[256], file[] = "/tmp/xterm-pipeXXXXXX";
95 char *argv[] = { terminal_emulator, title_switch, title, exec_switch, 91 char *argv[] = { terminal_emulator, title_switch, title, exec_switch,
96 "/usr/lib/uml/port-helper", "-uml-socket", 92 "/usr/lib/uml/port-helper", "-uml-socket",
97 file, NULL }; 93 file, NULL };
98 94
99 if(os_access(argv[4], OS_ACC_X_OK) < 0) 95 if (access(argv[4], X_OK) < 0)
100 argv[4] = "port-helper"; 96 argv[4] = "port-helper";
101 97
102 /* Check that DISPLAY is set, this doesn't guarantee the xterm 98 /* Check that DISPLAY is set, this doesn't guarantee the xterm
103 * will work but w/o it we can be pretty sure it won't. */ 99 * will work but w/o it we can be pretty sure it won't. */
104 if (!getenv("DISPLAY")) { 100 if (getenv("DISPLAY") == NULL) {
105 printk("xterm_open: $DISPLAY not set.\n"); 101 printk(UM_KERN_ERR "xterm_open: $DISPLAY not set.\n");
106 return -ENODEV; 102 return -ENODEV;
107 } 103 }
108 104
105 /*
106 * This business of getting a descriptor to a temp file,
107 * deleting the file and closing the descriptor is just to get
108 * a known-unused name for the Unix socket that we really
109 * want.
110 */
109 fd = mkstemp(file); 111 fd = mkstemp(file);
110 if(fd < 0){ 112 if (fd < 0) {
111 err = -errno; 113 err = -errno;
112 printk("xterm_open : mkstemp failed, errno = %d\n", errno); 114 printk(UM_KERN_ERR "xterm_open : mkstemp failed, errno = %d\n",
115 errno);
113 return err; 116 return err;
114 } 117 }
115 118
116 if(unlink(file)){ 119 if (unlink(file)) {
117 err = -errno; 120 err = -errno;
118 printk("xterm_open : unlink failed, errno = %d\n", errno); 121 printk(UM_KERN_ERR "xterm_open : unlink failed, errno = %d\n",
122 errno);
119 return err; 123 return err;
120 } 124 }
121 os_close_file(fd); 125 close(fd);
122 126
123 fd = os_create_unix_socket(file, sizeof(file), 1); 127 fd = os_create_unix_socket(file, sizeof(file), 1);
124 if(fd < 0){ 128 if (fd < 0) {
125 printk("xterm_open : create_unix_socket failed, errno = %d\n", 129 printk(UM_KERN_ERR "xterm_open : create_unix_socket failed, "
126 -fd); 130 "errno = %d\n", -fd);
127 return(fd); 131 return fd;
128 } 132 }
129 133
130 sprintf(title, data->title, data->device); 134 sprintf(title, data->title, data->device);
131 stack = data->stack; 135 pid = run_helper(NULL, NULL, argv);
132 pid = run_helper(NULL, NULL, argv, &stack); 136 if (pid < 0) {
133 if(pid < 0){ 137 err = pid;
134 printk("xterm_open : run_helper failed, errno = %d\n", -pid); 138 printk(UM_KERN_ERR "xterm_open : run_helper failed, "
135 return(pid); 139 "errno = %d\n", -err);
140 goto out_close1;
136 } 141 }
137 142
138 if (data->direct_rcv) { 143 err = os_set_fd_block(fd, 0);
139 new = os_rcv_fd(fd, &data->helper_pid); 144 if (err < 0) {
140 } else { 145 printk(UM_KERN_ERR "xterm_open : failed to set descriptor "
141 err = os_set_fd_block(fd, 0); 146 "non-blocking, err = %d\n", -err);
142 if(err < 0){ 147 goto out_kill;
143 printk("xterm_open : failed to set descriptor "
144 "non-blocking, err = %d\n", -err);
145 return(err);
146 }
147 new = xterm_fd(fd, &data->helper_pid);
148 } 148 }
149 if(new < 0){ 149
150 printk("xterm_open : os_rcv_fd failed, err = %d\n", -new); 150 new = xterm_fd(fd, &data->helper_pid);
151 goto out; 151 if (new < 0) {
152 err = new;
153 printk(UM_KERN_ERR "xterm_open : os_rcv_fd failed, err = %d\n",
154 -err);
155 goto out_kill;
156 }
157
158 err = os_set_fd_block(new, 0);
159 if (err) {
160 printk(UM_KERN_ERR "xterm_open : failed to set xterm "
161 "descriptor non-blocking, err = %d\n", -err);
162 goto out_close2;
152 } 163 }
153 164
154 CATCH_EINTR(err = tcgetattr(new, &data->tt)); 165 CATCH_EINTR(err = tcgetattr(new, &data->tt));
155 if(err){ 166 if (err) {
156 new = err; 167 new = err;
157 goto out; 168 goto out_close2;
158 } 169 }
159 170
160 if(data->raw){ 171 if (data->raw) {
161 err = raw(new); 172 err = raw(new);
162 if(err){ 173 if (err) {
163 new = err; 174 new = err;
164 goto out; 175 goto out_close2;
165 } 176 }
166 } 177 }
167 178
179 unlink(file);
168 data->pid = pid; 180 data->pid = pid;
169 *dev_out = NULL; 181 *dev_out = NULL;
170 out: 182
171 unlink(file); 183 return new;
172 return(new); 184
185 out_close2:
186 close(new);
187 out_kill:
188 os_kill_process(pid, 1);
189 out_close1:
190 close(fd);
191
192 return err;
173} 193}
174 194
175/* Not static because it's called directly by the tt mode gdb code */ 195static void xterm_close(int fd, void *d)
176void xterm_close(int fd, void *d)
177{ 196{
178 struct xterm_chan *data = d; 197 struct xterm_chan *data = d;
179 198
180 if(data->pid != -1) 199 if (data->pid != -1)
181 os_kill_process(data->pid, 1); 200 os_kill_process(data->pid, 1);
182 data->pid = -1; 201 data->pid = -1;
183 if(data->helper_pid != -1) 202
203 if (data->helper_pid != -1)
184 os_kill_process(data->helper_pid, 0); 204 os_kill_process(data->helper_pid, 0);
185 data->helper_pid = -1; 205 data->helper_pid = -1;
206
186 os_close_file(fd); 207 os_close_file(fd);
187} 208}
188 209
@@ -203,14 +224,3 @@ const struct chan_ops xterm_ops = {
203 .free = xterm_free, 224 .free = xterm_free,
204 .winch = 1, 225 .winch = 1,
205}; 226};
206
207/*
208 * Overrides for Emacs so that we follow Linus's tabbing style.
209 * Emacs will notice this stuff at the end of the file and automatically
210 * adjust the settings for this buffer only. This must remain at the end
211 * of the file.
212 * ---------------------------------------------------------------------------
213 * Local variables:
214 * c-file-style: "linux"
215 * End:
216 */
diff --git a/arch/um/drivers/xterm_kern.c b/arch/um/drivers/xterm_kern.c
index a4ce7058e1..b646bccef3 100644
--- a/arch/um/drivers/xterm_kern.c
+++ b/arch/um/drivers/xterm_kern.c
@@ -1,18 +1,14 @@
1/* 1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/errno.h" 6#include <linux/slab.h>
7#include "linux/slab.h" 7#include <linux/completion.h>
8#include "linux/signal.h" 8#include <linux/irqreturn.h>
9#include "linux/interrupt.h" 9#include <asm/irq.h>
10#include "asm/irq.h"
11#include "irq_user.h"
12#include "irq_kern.h" 10#include "irq_kern.h"
13#include "kern_util.h"
14#include "os.h" 11#include "os.h"
15#include "xterm.h"
16 12
17struct xterm_wait { 13struct xterm_wait {
18 struct completion ready; 14 struct completion ready;
@@ -27,12 +23,13 @@ static irqreturn_t xterm_interrupt(int irq, void *data)
27 int fd; 23 int fd;
28 24
29 fd = os_rcv_fd(xterm->fd, &xterm->pid); 25 fd = os_rcv_fd(xterm->fd, &xterm->pid);
30 if(fd == -EAGAIN) 26 if (fd == -EAGAIN)
31 return(IRQ_NONE); 27 return IRQ_NONE;
32 28
33 xterm->new_fd = fd; 29 xterm->new_fd = fd;
34 complete(&xterm->ready); 30 complete(&xterm->ready);
35 return(IRQ_HANDLED); 31
32 return IRQ_HANDLED;
36} 33}
37 34
38int xterm_fd(int socket, int *pid_out) 35int xterm_fd(int socket, int *pid_out)
@@ -41,22 +38,21 @@ int xterm_fd(int socket, int *pid_out)
41 int err, ret; 38 int err, ret;
42 39
43 data = kmalloc(sizeof(*data), GFP_KERNEL); 40 data = kmalloc(sizeof(*data), GFP_KERNEL);
44 if(data == NULL){ 41 if (data == NULL) {
45 printk(KERN_ERR "xterm_fd : failed to allocate xterm_wait\n"); 42 printk(KERN_ERR "xterm_fd : failed to allocate xterm_wait\n");
46 return(-ENOMEM); 43 return -ENOMEM;
47 } 44 }
48 45
49 /* This is a locked semaphore... */ 46 /* This is a locked semaphore... */
50 *data = ((struct xterm_wait) 47 *data = ((struct xterm_wait) { .fd = socket,
51 { .fd = socket, 48 .pid = -1,
52 .pid = -1, 49 .new_fd = -1 });
53 .new_fd = -1 });
54 init_completion(&data->ready); 50 init_completion(&data->ready);
55 51
56 err = um_request_irq(XTERM_IRQ, socket, IRQ_READ, xterm_interrupt, 52 err = um_request_irq(XTERM_IRQ, socket, IRQ_READ, xterm_interrupt,
57 IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, 53 IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
58 "xterm", data); 54 "xterm", data);
59 if (err){ 55 if (err) {
60 printk(KERN_ERR "xterm_fd : failed to get IRQ for xterm, " 56 printk(KERN_ERR "xterm_fd : failed to get IRQ for xterm, "
61 "err = %d\n", err); 57 "err = %d\n", err);
62 ret = err; 58 ret = err;
@@ -76,16 +72,5 @@ int xterm_fd(int socket, int *pid_out)
76 out: 72 out:
77 kfree(data); 73 kfree(data);
78 74
79 return(ret); 75 return ret;
80} 76}
81
82/*
83 * Overrides for Emacs so that we follow Linus's tabbing style.
84 * Emacs will notice this stuff at the end of the file and automatically
85 * adjust the settings for this buffer only. This must remain at the end
86 * of the file.
87 * ---------------------------------------------------------------------------
88 * Local variables:
89 * c-file-style: "linux"
90 * End:
91 */
diff --git a/arch/um/include/chan_kern.h b/arch/um/include/chan_kern.h
index c4b41bb103..624b5100a3 100644
--- a/arch/um/include/chan_kern.h
+++ b/arch/um/include/chan_kern.h
@@ -40,7 +40,7 @@ extern int console_open_chan(struct line *line, struct console *co);
40extern void deactivate_chan(struct list_head *chans, int irq); 40extern void deactivate_chan(struct list_head *chans, int irq);
41extern void reactivate_chan(struct list_head *chans, int irq); 41extern void reactivate_chan(struct list_head *chans, int irq);
42extern 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);
43extern void enable_chan(struct line *line); 43extern int enable_chan(struct line *line);
44extern void close_chan(struct list_head *chans, int delay_free_irq); 44extern void close_chan(struct list_head *chans, int delay_free_irq);
45extern int chan_window_size(struct list_head *chans, 45extern int chan_window_size(struct list_head *chans,
46 unsigned short *rows_out, 46 unsigned short *rows_out,
diff --git a/arch/um/include/chan_user.h b/arch/um/include/chan_user.h
index 38f16d812e..5a2263e05b 100644
--- a/arch/um/include/chan_user.h
+++ b/arch/um/include/chan_user.h
@@ -12,8 +12,6 @@ struct chan_opts {
12 void (*const announce)(char *dev_name, int dev); 12 void (*const announce)(char *dev_name, int dev);
13 char *xterm_title; 13 char *xterm_title;
14 const int raw; 14 const int raw;
15 const unsigned long tramp_stack;
16 const int in_kernel;
17}; 15};
18 16
19enum chan_init_pri { INIT_STATIC, INIT_ALL, INIT_ONE }; 17enum chan_init_pri { INIT_STATIC, INIT_ALL, INIT_ONE };
@@ -44,7 +42,8 @@ extern void generic_free(void *data);
44 42
45struct tty_struct; 43struct tty_struct;
46extern void register_winch(int fd, struct tty_struct *tty); 44extern void register_winch(int fd, struct tty_struct *tty);
47extern void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty); 45extern void register_winch_irq(int fd, int tty_fd, int pid,
46 struct tty_struct *tty, unsigned long stack);
48 47
49#define __channel_help(fn, prefix) \ 48#define __channel_help(fn, prefix) \
50__uml_help(fn, prefix "[0-9]*=<channel description>\n" \ 49__uml_help(fn, prefix "[0-9]*=<channel description>\n" \
diff --git a/arch/um/include/common-offsets.h b/arch/um/include/common-offsets.h
index 7376ee44e3..6eee343e53 100644
--- a/arch/um/include/common-offsets.h
+++ b/arch/um/include/common-offsets.h
@@ -27,6 +27,9 @@ DEFINE(UM_ELFCLASS64, ELFCLASS64);
27 27
28DEFINE(UM_NR_CPUS, NR_CPUS); 28DEFINE(UM_NR_CPUS, NR_CPUS);
29 29
30DEFINE(UM_GFP_KERNEL, GFP_KERNEL);
31DEFINE(UM_GFP_ATOMIC, GFP_ATOMIC);
32
30/* For crypto assembler code. */ 33/* For crypto assembler code. */
31DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx)); 34DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx));
32 35
diff --git a/arch/um/include/os.h b/arch/um/include/os.h
index 4d9fb26387..930b261ea4 100644
--- a/arch/um/include/os.h
+++ b/arch/um/include/os.h
@@ -239,11 +239,9 @@ extern unsigned long __do_user_copy(void *to, const void *from, int n,
239/* execvp.c */ 239/* execvp.c */
240extern int execvp_noalloc(char *buf, const char *file, char *const argv[]); 240extern int execvp_noalloc(char *buf, const char *file, char *const argv[]);
241/* helper.c */ 241/* helper.c */
242extern int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv, 242extern int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv);
243 unsigned long *stack_out);
244extern int run_helper_thread(int (*proc)(void *), void *arg, 243extern int run_helper_thread(int (*proc)(void *), void *arg,
245 unsigned int flags, unsigned long *stack_out, 244 unsigned int flags, unsigned long *stack_out);
246 int stack_order);
247extern int helper_wait(int pid); 245extern int helper_wait(int pid);
248 246
249 247
diff --git a/arch/um/include/um_malloc.h b/arch/um/include/um_malloc.h
index e6d7c5aa3f..0ad17cb83d 100644
--- a/arch/um/include/um_malloc.h
+++ b/arch/um/include/um_malloc.h
@@ -6,11 +6,17 @@
6#ifndef __UM_MALLOC_H__ 6#ifndef __UM_MALLOC_H__
7#define __UM_MALLOC_H__ 7#define __UM_MALLOC_H__
8 8
9extern void *um_kmalloc(int size); 9#include "kern_constants.h"
10extern void *um_kmalloc_atomic(int size); 10
11extern void *__kmalloc(int size, int flags);
12static inline void *kmalloc(int size, int flags)
13{
14 return __kmalloc(size, flags);
15}
16
11extern void kfree(const void *ptr); 17extern void kfree(const void *ptr);
12 18
13extern void *um_vmalloc(int size); 19extern void *vmalloc(unsigned long size);
14extern void vfree(void *ptr); 20extern void vfree(void *ptr);
15 21
16#endif /* __UM_MALLOC_H__ */ 22#endif /* __UM_MALLOC_H__ */
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index dba04d88b4..9870febdbe 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -30,7 +30,6 @@
30#include "irq_kern.h" 30#include "irq_kern.h"
31#include "os.h" 31#include "os.h"
32#include "sigio.h" 32#include "sigio.h"
33#include "um_malloc.h"
34#include "misc_constants.h" 33#include "misc_constants.h"
35#include "as-layout.h" 34#include "as-layout.h"
36 35
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index 8d2c549653..bfa52f206b 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -46,7 +46,6 @@
46#include "mode.h" 46#include "mode.h"
47#include "mode_kern.h" 47#include "mode_kern.h"
48#include "choose-mode.h" 48#include "choose-mode.h"
49#include "um_malloc.h"
50 49
51/* This is a per-cpu array. A processor only modifies its entry and it only 50/* This is a per-cpu array. A processor only modifies its entry and it only
52 * cares about its entry, so it's OK if another processor is modifying its 51 * cares about its entry, so it's OK if another processor is modifying its
@@ -262,21 +261,6 @@ void dump_thread(struct pt_regs *regs, struct user *u)
262{ 261{
263} 262}
264 263
265void *um_kmalloc(int size)
266{
267 return kmalloc(size, GFP_KERNEL);
268}
269
270void *um_kmalloc_atomic(int size)
271{
272 return kmalloc(size, GFP_ATOMIC);
273}
274
275void *um_vmalloc(int size)
276{
277 return vmalloc(size);
278}
279
280int __cant_sleep(void) { 264int __cant_sleep(void) {
281 return in_atomic() || irqs_disabled() || in_interrupt(); 265 return in_atomic() || irqs_disabled() || in_interrupt();
282 /* Is in_interrupt() really needed? */ 266 /* Is in_interrupt() really needed? */
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c
index 627742d894..6916c8888d 100644
--- a/arch/um/kernel/ptrace.c
+++ b/arch/um/kernel/ptrace.c
@@ -52,17 +52,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
52 switch (request) { 52 switch (request) {
53 /* when I and D space are separate, these will need to be fixed. */ 53 /* when I and D space are separate, these will need to be fixed. */
54 case PTRACE_PEEKTEXT: /* read word at location addr. */ 54 case PTRACE_PEEKTEXT: /* read word at location addr. */
55 case PTRACE_PEEKDATA: { 55 case PTRACE_PEEKDATA:
56 unsigned long tmp; 56 ret = generic_ptrace_peekdata(child, addr, data);
57 int copied;
58
59 ret = -EIO;
60 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
61 if (copied != sizeof(tmp))
62 break;
63 ret = put_user(tmp, p);
64 break; 57 break;
65 }
66 58
67 /* read the word at location addr in the USER area. */ 59 /* read the word at location addr in the USER area. */
68 case PTRACE_PEEKUSR: 60 case PTRACE_PEEKUSR:
@@ -72,11 +64,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
72 /* when I and D space are separate, this will have to be fixed. */ 64 /* when I and D space are separate, this will have to be fixed. */
73 case PTRACE_POKETEXT: /* write the word at location addr. */ 65 case PTRACE_POKETEXT: /* write the word at location addr. */
74 case PTRACE_POKEDATA: 66 case PTRACE_POKEDATA:
75 ret = -EIO; 67 ret = generic_ptrace_pokedata(child, addr, data);
76 if (access_process_vm(child, addr, &data, sizeof(data),
77 1) != sizeof(data))
78 break;
79 ret = 0;
80 break; 68 break;
81 69
82 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ 70 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c
index 9bf944f6a1..b126df4ea1 100644
--- a/arch/um/os-Linux/aio.c
+++ b/arch/um/os-Linux/aio.c
@@ -177,6 +177,7 @@ static int do_not_aio(struct aio_thread_req *req)
177static int aio_req_fd_r = -1; 177static int aio_req_fd_r = -1;
178static int aio_req_fd_w = -1; 178static int aio_req_fd_w = -1;
179static int aio_pid = -1; 179static int aio_pid = -1;
180static unsigned long aio_stack;
180 181
181static int not_aio_thread(void *arg) 182static int not_aio_thread(void *arg)
182{ 183{
@@ -212,7 +213,6 @@ static int not_aio_thread(void *arg)
212 213
213static int init_aio_24(void) 214static int init_aio_24(void)
214{ 215{
215 unsigned long stack;
216 int fds[2], err; 216 int fds[2], err;
217 217
218 err = os_pipe(fds, 1, 1); 218 err = os_pipe(fds, 1, 1);
@@ -227,7 +227,7 @@ static int init_aio_24(void)
227 goto out_close_pipe; 227 goto out_close_pipe;
228 228
229 err = run_helper_thread(not_aio_thread, NULL, 229 err = run_helper_thread(not_aio_thread, NULL,
230 CLONE_FILES | CLONE_VM | SIGCHLD, &stack, 0); 230 CLONE_FILES | CLONE_VM | SIGCHLD, &aio_stack);
231 if(err < 0) 231 if(err < 0)
232 goto out_close_pipe; 232 goto out_close_pipe;
233 233
@@ -252,7 +252,6 @@ out:
252#define DEFAULT_24_AIO 0 252#define DEFAULT_24_AIO 0
253static int init_aio_26(void) 253static int init_aio_26(void)
254{ 254{
255 unsigned long stack;
256 int err; 255 int err;
257 256
258 if(io_setup(256, &ctx)){ 257 if(io_setup(256, &ctx)){
@@ -263,7 +262,7 @@ static int init_aio_26(void)
263 } 262 }
264 263
265 err = run_helper_thread(aio_thread, NULL, 264 err = run_helper_thread(aio_thread, NULL,
266 CLONE_FILES | CLONE_VM | SIGCHLD, &stack, 0); 265 CLONE_FILES | CLONE_VM | SIGCHLD, &aio_stack);
267 if(err < 0) 266 if(err < 0)
268 return err; 267 return err;
269 268
@@ -365,8 +364,10 @@ __initcall(init_aio);
365 364
366static void exit_aio(void) 365static void exit_aio(void)
367{ 366{
368 if(aio_pid != -1) 367 if (aio_pid != -1) {
369 os_kill_process(aio_pid, 1); 368 os_kill_process(aio_pid, 1);
369 free_stack(aio_stack, 0);
370 }
370} 371}
371 372
372__uml_exitcall(exit_aio); 373__uml_exitcall(exit_aio);
diff --git a/arch/um/os-Linux/drivers/ethertap_user.c b/arch/um/os-Linux/drivers/ethertap_user.c
index acba301612..61d3953c7a 100644
--- a/arch/um/os-Linux/drivers/ethertap_user.c
+++ b/arch/um/os-Linux/drivers/ethertap_user.c
@@ -54,7 +54,7 @@ static void etap_change(int op, unsigned char *addr, unsigned char *netmask,
54 return; 54 return;
55 } 55 }
56 56
57 output = um_kmalloc(UM_KERN_PAGE_SIZE); 57 output = kmalloc(UM_KERN_PAGE_SIZE, UM_GFP_KERNEL);
58 if(output == NULL) 58 if(output == NULL)
59 printk("etap_change : Failed to allocate output buffer\n"); 59 printk("etap_change : Failed to allocate output buffer\n");
60 read_output(fd, output, UM_KERN_PAGE_SIZE); 60 read_output(fd, output, UM_KERN_PAGE_SIZE);
@@ -117,7 +117,7 @@ static int etap_tramp(char *dev, char *gate, int control_me,
117 pe_data.control_remote = control_remote; 117 pe_data.control_remote = control_remote;
118 pe_data.control_me = control_me; 118 pe_data.control_me = control_me;
119 pe_data.data_me = data_me; 119 pe_data.data_me = data_me;
120 pid = run_helper(etap_pre_exec, &pe_data, args, NULL); 120 pid = run_helper(etap_pre_exec, &pe_data, args);
121 121
122 if(pid < 0) 122 if(pid < 0)
123 err = pid; 123 err = pid;
@@ -166,7 +166,7 @@ static int etap_open(void *data)
166 err = etap_tramp(pri->dev_name, pri->gate_addr, control_fds[0], 166 err = etap_tramp(pri->dev_name, pri->gate_addr, control_fds[0],
167 control_fds[1], data_fds[0], data_fds[1]); 167 control_fds[1], data_fds[0], data_fds[1]);
168 output_len = UM_KERN_PAGE_SIZE; 168 output_len = UM_KERN_PAGE_SIZE;
169 output = um_kmalloc(output_len); 169 output = kmalloc(output_len, UM_GFP_KERNEL);
170 read_output(control_fds[0], output, output_len); 170 read_output(control_fds[0], output, output_len);
171 171
172 if(output == NULL) 172 if(output == NULL)
diff --git a/arch/um/os-Linux/drivers/tuntap_user.c b/arch/um/os-Linux/drivers/tuntap_user.c
index 11a9779dc9..f848b4ea93 100644
--- a/arch/um/os-Linux/drivers/tuntap_user.c
+++ b/arch/um/os-Linux/drivers/tuntap_user.c
@@ -83,7 +83,7 @@ static int tuntap_open_tramp(char *gate, int *fd_out, int me, int remote,
83 data.stdout = remote; 83 data.stdout = remote;
84 data.close_me = me; 84 data.close_me = me;
85 85
86 pid = run_helper(tuntap_pre_exec, &data, argv, NULL); 86 pid = run_helper(tuntap_pre_exec, &data, argv);
87 87
88 if(pid < 0) 88 if(pid < 0)
89 return -pid; 89 return -pid;
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c
index 97bed16bf4..d81af7b858 100644
--- a/arch/um/os-Linux/helper.c
+++ b/arch/um/os-Linux/helper.c
@@ -44,17 +44,13 @@ static int helper_child(void *arg)
44/* Returns either the pid of the child process we run or -E* on failure. 44/* Returns either the pid of the child process we run or -E* on failure.
45 * XXX The alloc_stack here breaks if this is called in the tracing thread, so 45 * XXX The alloc_stack here breaks if this is called in the tracing thread, so
46 * we need to receive a preallocated stack (a local buffer is ok). */ 46 * we need to receive a preallocated stack (a local buffer is ok). */
47int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv, 47int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv)
48 unsigned long *stack_out)
49{ 48{
50 struct helper_data data; 49 struct helper_data data;
51 unsigned long stack, sp; 50 unsigned long stack, sp;
52 int pid, fds[2], ret, n; 51 int pid, fds[2], ret, n;
53 52
54 if ((stack_out != NULL) && (*stack_out != 0)) 53 stack = alloc_stack(0, __cant_sleep());
55 stack = *stack_out;
56 else
57 stack = alloc_stack(0, __cant_sleep());
58 if (stack == 0) 54 if (stack == 0)
59 return -ENOMEM; 55 return -ENOMEM;
60 56
@@ -76,8 +72,8 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv,
76 data.pre_data = pre_data; 72 data.pre_data = pre_data;
77 data.argv = argv; 73 data.argv = argv;
78 data.fd = fds[1]; 74 data.fd = fds[1];
79 data.buf = __cant_sleep() ? um_kmalloc_atomic(PATH_MAX) : 75 data.buf = __cant_sleep() ? kmalloc(PATH_MAX, UM_GFP_ATOMIC) :
80 um_kmalloc(PATH_MAX); 76 kmalloc(PATH_MAX, UM_GFP_KERNEL);
81 pid = clone(helper_child, (void *) sp, CLONE_VM | SIGCHLD, &data); 77 pid = clone(helper_child, (void *) sp, CLONE_VM | SIGCHLD, &data);
82 if (pid < 0) { 78 if (pid < 0) {
83 ret = -errno; 79 ret = -errno;
@@ -113,22 +109,21 @@ out_close:
113 close(fds[1]); 109 close(fds[1]);
114 close(fds[0]); 110 close(fds[0]);
115out_free: 111out_free:
116 if ((stack_out == NULL) || (*stack_out == 0)) 112 free_stack(stack, 0);
117 free_stack(stack, 0);
118 return ret; 113 return ret;
119} 114}
120 115
121int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags, 116int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags,
122 unsigned long *stack_out, int stack_order) 117 unsigned long *stack_out)
123{ 118{
124 unsigned long stack, sp; 119 unsigned long stack, sp;
125 int pid, status, err; 120 int pid, status, err;
126 121
127 stack = alloc_stack(stack_order, __cant_sleep()); 122 stack = alloc_stack(0, __cant_sleep());
128 if (stack == 0) 123 if (stack == 0)
129 return -ENOMEM; 124 return -ENOMEM;
130 125
131 sp = stack + (UM_KERN_PAGE_SIZE << stack_order) - sizeof(void *); 126 sp = stack + UM_KERN_PAGE_SIZE - sizeof(void *);
132 pid = clone(proc, (void *) sp, flags | SIGCHLD, arg); 127 pid = clone(proc, (void *) sp, flags | SIGCHLD, arg);
133 if (pid < 0) { 128 if (pid < 0) {
134 err = -errno; 129 err = -errno;
@@ -147,7 +142,7 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags,
147 if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) 142 if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0))
148 printk("run_helper_thread - thread returned status " 143 printk("run_helper_thread - thread returned status "
149 "0x%x\n", status); 144 "0x%x\n", status);
150 free_stack(stack, stack_order); 145 free_stack(stack, 0);
151 } else 146 } else
152 *stack_out = stack; 147 *stack_out = stack;
153 return pid; 148 return pid;
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c
index fb510d4048..e85f4995a0 100644
--- a/arch/um/os-Linux/main.c
+++ b/arch/um/os-Linux/main.c
@@ -235,8 +235,8 @@ void *__wrap_malloc(int size)
235 return __real_malloc(size); 235 return __real_malloc(size);
236 else if(size <= UM_KERN_PAGE_SIZE) 236 else if(size <= UM_KERN_PAGE_SIZE)
237 /* finding contiguous pages can be hard*/ 237 /* finding contiguous pages can be hard*/
238 ret = um_kmalloc(size); 238 ret = kmalloc(size, UM_GFP_KERNEL);
239 else ret = um_vmalloc(size); 239 else ret = vmalloc(size);
240 240
241 /* glibc people insist that if malloc fails, errno should be 241 /* glibc people insist that if malloc fails, errno should be
242 * set by malloc as well. So we do. 242 * set by malloc as well. So we do.
diff --git a/arch/um/os-Linux/sigio.c b/arch/um/os-Linux/sigio.c
index 8d4e0c6b8c..dc03e9cccb 100644
--- a/arch/um/os-Linux/sigio.c
+++ b/arch/um/os-Linux/sigio.c
@@ -26,6 +26,7 @@
26 * exitcall. 26 * exitcall.
27 */ 27 */
28static int write_sigio_pid = -1; 28static int write_sigio_pid = -1;
29static unsigned long write_sigio_stack;
29 30
30/* These arrays are initialized before the sigio thread is started, and 31/* These arrays are initialized before the sigio thread is started, and
31 * the descriptors closed after it is killed. So, it can't see them change. 32 * the descriptors closed after it is killed. So, it can't see them change.
@@ -104,7 +105,7 @@ static int need_poll(struct pollfds *polls, int n)
104 if(n <= polls->size) 105 if(n <= polls->size)
105 return 0; 106 return 0;
106 107
107 new = um_kmalloc_atomic(n * sizeof(struct pollfd)); 108 new = kmalloc(n * sizeof(struct pollfd), UM_GFP_ATOMIC);
108 if(new == NULL){ 109 if(new == NULL){
109 printk("need_poll : failed to allocate new pollfds\n"); 110 printk("need_poll : failed to allocate new pollfds\n");
110 return -ENOMEM; 111 return -ENOMEM;
@@ -144,8 +145,10 @@ static void update_thread(void)
144 return; 145 return;
145 fail: 146 fail:
146 /* Critical section start */ 147 /* Critical section start */
147 if(write_sigio_pid != -1) 148 if (write_sigio_pid != -1) {
148 os_kill_process(write_sigio_pid, 1); 149 os_kill_process(write_sigio_pid, 1);
150 free_stack(write_sigio_stack, 0);
151 }
149 write_sigio_pid = -1; 152 write_sigio_pid = -1;
150 close(sigio_private[0]); 153 close(sigio_private[0]);
151 close(sigio_private[1]); 154 close(sigio_private[1]);
@@ -230,7 +233,7 @@ static struct pollfd *setup_initial_poll(int fd)
230{ 233{
231 struct pollfd *p; 234 struct pollfd *p;
232 235
233 p = um_kmalloc(sizeof(struct pollfd)); 236 p = kmalloc(sizeof(struct pollfd), UM_GFP_KERNEL);
234 if (p == NULL) { 237 if (p == NULL) {
235 printk("setup_initial_poll : failed to allocate poll\n"); 238 printk("setup_initial_poll : failed to allocate poll\n");
236 return NULL; 239 return NULL;
@@ -243,7 +246,6 @@ static struct pollfd *setup_initial_poll(int fd)
243 246
244static void write_sigio_workaround(void) 247static void write_sigio_workaround(void)
245{ 248{
246 unsigned long stack;
247 struct pollfd *p; 249 struct pollfd *p;
248 int err; 250 int err;
249 int l_write_sigio_fds[2]; 251 int l_write_sigio_fds[2];
@@ -293,7 +295,8 @@ static void write_sigio_workaround(void)
293 memcpy(sigio_private, l_sigio_private, sizeof(l_sigio_private)); 295 memcpy(sigio_private, l_sigio_private, sizeof(l_sigio_private));
294 296
295 write_sigio_pid = run_helper_thread(write_sigio_thread, NULL, 297 write_sigio_pid = run_helper_thread(write_sigio_thread, NULL,
296 CLONE_FILES | CLONE_VM, &stack, 0); 298 CLONE_FILES | CLONE_VM,
299 &write_sigio_stack);
297 300
298 if (write_sigio_pid < 0) 301 if (write_sigio_pid < 0)
299 goto out_clear; 302 goto out_clear;
@@ -356,10 +359,12 @@ out:
356 359
357static void sigio_cleanup(void) 360static void sigio_cleanup(void)
358{ 361{
359 if(write_sigio_pid != -1){ 362 if (write_sigio_pid == -1)
360 os_kill_process(write_sigio_pid, 1); 363 return;
361 write_sigio_pid = -1; 364
362 } 365 os_kill_process(write_sigio_pid, 1);
366 free_stack(write_sigio_stack, 0);
367 write_sigio_pid = -1;
363} 368}
364 369
365__uml_exitcall(sigio_cleanup); 370__uml_exitcall(sigio_cleanup);
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index 46c00cc429..ba9af8d620 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -41,7 +41,7 @@ int is_skas_winch(int pid, int fd, void *data)
41 if(pid != os_getpgrp()) 41 if(pid != os_getpgrp())
42 return(0); 42 return(0);
43 43
44 register_winch_irq(-1, fd, -1, data); 44 register_winch_irq(-1, fd, -1, data, 0);
45 return(1); 45 return(1);
46} 46}
47 47
diff --git a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c
index 3f33165ada..419b2d5ff6 100644
--- a/arch/um/os-Linux/user_syms.c
+++ b/arch/um/os-Linux/user_syms.c
@@ -5,7 +5,8 @@
5 * so I *must* declare good prototypes for them and then EXPORT them. 5 * so I *must* declare good prototypes for them and then EXPORT them.
6 * The kernel code uses the macro defined by include/linux/string.h, 6 * The kernel code uses the macro defined by include/linux/string.h,
7 * so I undef macros; the userspace code does not include that and I 7 * so I undef macros; the userspace code does not include that and I
8 * add an EXPORT for the glibc one.*/ 8 * add an EXPORT for the glibc one.
9 */
9 10
10#undef strlen 11#undef strlen
11#undef strstr 12#undef strstr
@@ -61,12 +62,18 @@ EXPORT_SYMBOL_PROTO(dup2);
61EXPORT_SYMBOL_PROTO(__xstat); 62EXPORT_SYMBOL_PROTO(__xstat);
62EXPORT_SYMBOL_PROTO(__lxstat); 63EXPORT_SYMBOL_PROTO(__lxstat);
63EXPORT_SYMBOL_PROTO(__lxstat64); 64EXPORT_SYMBOL_PROTO(__lxstat64);
65EXPORT_SYMBOL_PROTO(__fxstat64);
64EXPORT_SYMBOL_PROTO(lseek); 66EXPORT_SYMBOL_PROTO(lseek);
65EXPORT_SYMBOL_PROTO(lseek64); 67EXPORT_SYMBOL_PROTO(lseek64);
66EXPORT_SYMBOL_PROTO(chown); 68EXPORT_SYMBOL_PROTO(chown);
69EXPORT_SYMBOL_PROTO(fchown);
67EXPORT_SYMBOL_PROTO(truncate); 70EXPORT_SYMBOL_PROTO(truncate);
71EXPORT_SYMBOL_PROTO(ftruncate64);
68EXPORT_SYMBOL_PROTO(utime); 72EXPORT_SYMBOL_PROTO(utime);
73EXPORT_SYMBOL_PROTO(utimes);
74EXPORT_SYMBOL_PROTO(futimes);
69EXPORT_SYMBOL_PROTO(chmod); 75EXPORT_SYMBOL_PROTO(chmod);
76EXPORT_SYMBOL_PROTO(fchmod);
70EXPORT_SYMBOL_PROTO(rename); 77EXPORT_SYMBOL_PROTO(rename);
71EXPORT_SYMBOL_PROTO(__xmknod); 78EXPORT_SYMBOL_PROTO(__xmknod);
72 79
@@ -102,14 +109,3 @@ EXPORT_SYMBOL(__stack_smash_handler);
102 109
103extern long __guard __attribute__((weak)); 110extern long __guard __attribute__((weak));
104EXPORT_SYMBOL(__guard); 111EXPORT_SYMBOL(__guard);
105
106/*
107 * Overrides for Emacs so that we follow Linus's tabbing style.
108 * Emacs will notice this stuff at the end of the file and automatically
109 * adjust the settings for this buffer only. This must remain at the end
110 * of the file.
111 * ---------------------------------------------------------------------------
112 * Local variables:
113 * c-file-style: "linux"
114 * End:
115 */
diff --git a/arch/v850/kernel/ptrace.c b/arch/v850/kernel/ptrace.c
index a9b0934309..a458ac941b 100644
--- a/arch/v850/kernel/ptrace.c
+++ b/arch/v850/kernel/ptrace.c
@@ -117,24 +117,16 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
117 int rval; 117 int rval;
118 118
119 switch (request) { 119 switch (request) {
120 unsigned long val, copied; 120 unsigned long val;
121 121
122 case PTRACE_PEEKTEXT: /* read word at location addr. */ 122 case PTRACE_PEEKTEXT: /* read word at location addr. */
123 case PTRACE_PEEKDATA: 123 case PTRACE_PEEKDATA:
124 copied = access_process_vm(child, addr, &val, sizeof(val), 0); 124 rval = generic_ptrace_peekdata(child, addr, data);
125 rval = -EIO;
126 if (copied != sizeof(val))
127 break;
128 rval = put_user(val, (unsigned long *)data);
129 goto out; 125 goto out;
130 126
131 case PTRACE_POKETEXT: /* write the word at location addr. */ 127 case PTRACE_POKETEXT: /* write the word at location addr. */
132 case PTRACE_POKEDATA: 128 case PTRACE_POKEDATA:
133 rval = 0; 129 rval = generic_ptrace_pokedata(child, addr, data);
134 if (access_process_vm(child, addr, &data, sizeof(data), 1)
135 == sizeof(data))
136 break;
137 rval = -EIO;
138 goto out; 130 goto out;
139 131
140 /* Read/write the word at location ADDR in the registers. */ 132 /* Read/write the word at location ADDR in the registers. */
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
index 5ce94430c0..14bf8ce3ea 100644
--- a/arch/x86_64/Kconfig
+++ b/arch/x86_64/Kconfig
@@ -427,6 +427,10 @@ config NR_CPUS
427 This is purely to save memory - each supported CPU requires 427 This is purely to save memory - each supported CPU requires
428 memory in the static kernel configuration. 428 memory in the static kernel configuration.
429 429
430config PHYSICAL_ALIGN
431 hex
432 default "0x200000"
433
430config HOTPLUG_CPU 434config HOTPLUG_CPU
431 bool "Support for suspend on SMP and hot-pluggable CPUs (EXPERIMENTAL)" 435 bool "Support for suspend on SMP and hot-pluggable CPUs (EXPERIMENTAL)"
432 depends on SMP && HOTPLUG && EXPERIMENTAL 436 depends on SMP && HOTPLUG && EXPERIMENTAL
@@ -770,8 +774,8 @@ menu "Instrumentation Support"
770source "arch/x86_64/oprofile/Kconfig" 774source "arch/x86_64/oprofile/Kconfig"
771 775
772config KPROBES 776config KPROBES
773 bool "Kprobes (EXPERIMENTAL)" 777 bool "Kprobes"
774 depends on KALLSYMS && EXPERIMENTAL && MODULES 778 depends on KALLSYMS && MODULES
775 help 779 help
776 Kprobes allows you to trap at almost any kernel address and 780 Kprobes allows you to trap at almost any kernel address and
777 execute a callback function. register_kprobe() establishes 781 execute a callback function. register_kprobe() establishes
diff --git a/arch/x86_64/boot/Makefile b/arch/x86_64/boot/Makefile
index ee6f6505f9..67096389de 100644
--- a/arch/x86_64/boot/Makefile
+++ b/arch/x86_64/boot/Makefile
@@ -1,135 +1,9 @@
1# 1#
2# arch/x86_64/boot/Makefile 2# arch/x86_64/boot/Makefile
3# 3#
4# This file is subject to the terms and conditions of the GNU General Public 4# The actual boot code is shared with i386 including the Makefile.
5# License. See the file "COPYING" in the main directory of this archive 5# So tell kbuild that we fetch the code from i386 and include the
6# for more details. 6# Makefile from i386 too.
7#
8# Copyright (C) 1994 by Linus Torvalds
9#
10
11# ROOT_DEV specifies the default root-device when making the image.
12# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
13# the default of FLOPPY is used by 'build'.
14
15ROOT_DEV := CURRENT
16
17# If you want to preset the SVGA mode, uncomment the next line and
18# set SVGA_MODE to whatever number you want.
19# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
20# The number is the same as you would ordinarily press at bootup.
21
22SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
23
24# If you want the RAM disk device, define this to be the size in blocks.
25
26#RAMDISK := -DRAMDISK=512
27
28targets := vmlinux.bin bootsect bootsect.o \
29 setup setup.o bzImage mtools.conf
30
31EXTRA_CFLAGS := -m32
32
33hostprogs-y := tools/build
34HOST_EXTRACFLAGS += $(LINUXINCLUDE)
35subdir- := compressed/ #Let make clean descend in compressed/
36# ---------------------------------------------------------------------------
37
38$(obj)/bzImage: IMAGE_OFFSET := 0x100000
39$(obj)/bzImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__
40$(obj)/bzImage: BUILDFLAGS := -b
41
42quiet_cmd_image = BUILD $@
43cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/bootsect $(obj)/setup \
44 $(obj)/vmlinux.bin $(ROOT_DEV) > $@
45
46$(obj)/bzImage: $(obj)/bootsect $(obj)/setup \
47 $(obj)/vmlinux.bin $(obj)/tools/build FORCE
48 $(call if_changed,image)
49 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
50
51$(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE
52 $(call if_changed,objcopy)
53
54LDFLAGS_bootsect := -Ttext 0x0 -s --oformat binary
55LDFLAGS_setup := -Ttext 0x0 -s --oformat binary -e begtext
56
57$(obj)/setup $(obj)/bootsect: %: %.o FORCE
58 $(call if_changed,ld)
59
60$(obj)/compressed/vmlinux: FORCE
61 $(Q)$(MAKE) $(build)=$(obj)/compressed IMAGE_OFFSET=$(IMAGE_OFFSET) $@
62
63# Set this if you want to pass append arguments to the zdisk/fdimage/isoimage kernel
64FDARGS =
65# Set this if you want an initrd included with the zdisk/fdimage/isoimage kernel
66FDINITRD =
67
68image_cmdline = default linux $(FDARGS) $(if $(FDINITRD),initrd=initrd.img,)
69
70$(obj)/mtools.conf: $(src)/mtools.conf.in
71 sed -e 's|@OBJ@|$(obj)|g' < $< > $@
72
73# This requires write access to /dev/fd0
74zdisk: $(BOOTIMAGE) $(obj)/mtools.conf
75 MTOOLSRC=$(obj)/mtools.conf mformat a: ; sync
76 syslinux /dev/fd0 ; sync
77 echo '$(image_cmdline)' | \
78 MTOOLSRC=$(obj)/mtools.conf mcopy - a:syslinux.cfg
79 if [ -f '$(FDINITRD)' ] ; then \
80 MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' a:initrd.img ; \
81 fi
82 MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) a:linux ; sync
83
84# These require being root or having syslinux 2.02 or higher installed
85fdimage fdimage144: $(BOOTIMAGE) $(obj)/mtools.conf
86 dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=1440
87 MTOOLSRC=$(obj)/mtools.conf mformat v: ; sync
88 syslinux $(obj)/fdimage ; sync
89 echo '$(image_cmdline)' | \
90 MTOOLSRC=$(obj)/mtools.conf mcopy - v:syslinux.cfg
91 if [ -f '$(FDINITRD)' ] ; then \
92 MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' v:initrd.img ; \
93 fi
94 MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) v:linux ; sync
95
96fdimage288: $(BOOTIMAGE) $(obj)/mtools.conf
97 dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=2880
98 MTOOLSRC=$(obj)/mtools.conf mformat w: ; sync
99 syslinux $(obj)/fdimage ; sync
100 echo '$(image_cmdline)' | \
101 MTOOLSRC=$(obj)/mtools.conf mcopy - w:syslinux.cfg
102 if [ -f '$(FDINITRD)' ] ; then \
103 MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' w:initrd.img ; \
104 fi
105 MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) w:linux ; sync
106
107isoimage: $(BOOTIMAGE)
108 -rm -rf $(obj)/isoimage
109 mkdir $(obj)/isoimage
110 for i in lib lib64 share end ; do \
111 if [ -f /usr/$$i/syslinux/isolinux.bin ] ; then \
112 cp /usr/$$i/syslinux/isolinux.bin $(obj)/isoimage ; \
113 break ; \
114 fi ; \
115 if [ $$i = end ] ; then exit 1 ; fi ; \
116 done
117 cp $(BOOTIMAGE) $(obj)/isoimage/linux
118 echo '$(image_cmdline)' > $(obj)/isoimage/isolinux.cfg
119 if [ -f '$(FDINITRD)' ] ; then \
120 cp '$(FDINITRD)' $(obj)/isoimage/initrd.img ; \
121 fi
122 mkisofs -J -r -o $(obj)/image.iso -b isolinux.bin -c boot.cat \
123 -no-emul-boot -boot-load-size 4 -boot-info-table \
124 $(obj)/isoimage
125 rm -rf $(obj)/isoimage
126
127zlilo: $(BOOTIMAGE)
128 if [ -f $(INSTALL_PATH)/vmlinuz ]; then mv $(INSTALL_PATH)/vmlinuz $(INSTALL_PATH)/vmlinuz.old; fi
129 if [ -f $(INSTALL_PATH)/System.map ]; then mv $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
130 cat $(BOOTIMAGE) > $(INSTALL_PATH)/vmlinuz
131 cp System.map $(INSTALL_PATH)/
132 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
133 7
134install: 8src := arch/i386/boot
135 sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)" 9include $(src)/Makefile
diff --git a/arch/x86_64/boot/bootsect.S b/arch/x86_64/boot/bootsect.S
deleted file mode 100644
index 011b7a4993..0000000000
--- a/arch/x86_64/boot/bootsect.S
+++ /dev/null
@@ -1,98 +0,0 @@
1/*
2 * bootsect.S Copyright (C) 1991, 1992 Linus Torvalds
3 *
4 * modified by Drew Eckhardt
5 * modified by Bruce Evans (bde)
6 * modified by Chris Noe (May 1999) (as86 -> gas)
7 * gutted by H. Peter Anvin (Jan 2003)
8 *
9 * BIG FAT NOTE: We're in real mode using 64k segments. Therefore segment
10 * addresses must be multiplied by 16 to obtain their respective linear
11 * addresses. To avoid confusion, linear addresses are written using leading
12 * hex while segment addresses are written as segment:offset.
13 *
14 */
15
16#include <asm/boot.h>
17
18SETUPSECTS = 4 /* default nr of setup-sectors */
19BOOTSEG = 0x07C0 /* original address of boot-sector */
20INITSEG = DEF_INITSEG /* we move boot here - out of the way */
21SETUPSEG = DEF_SETUPSEG /* setup starts here */
22SYSSEG = DEF_SYSSEG /* system loaded at 0x10000 (65536) */
23SYSSIZE = DEF_SYSSIZE /* system size: # of 16-byte clicks */
24 /* to be loaded */
25ROOT_DEV = 0 /* ROOT_DEV is now written by "build" */
26SWAP_DEV = 0 /* SWAP_DEV is now written by "build" */
27
28#ifndef SVGA_MODE
29#define SVGA_MODE ASK_VGA
30#endif
31
32#ifndef RAMDISK
33#define RAMDISK 0
34#endif
35
36#ifndef ROOT_RDONLY
37#define ROOT_RDONLY 1
38#endif
39
40.code16
41.text
42
43.global _start
44_start:
45
46 # Normalize the start address
47 jmpl $BOOTSEG, $start2
48
49start2:
50 movw %cs, %ax
51 movw %ax, %ds
52 movw %ax, %es
53 movw %ax, %ss
54 movw $0x7c00, %sp
55 sti
56 cld
57
58 movw $bugger_off_msg, %si
59
60msg_loop:
61 lodsb
62 andb %al, %al
63 jz die
64 movb $0xe, %ah
65 movw $7, %bx
66 int $0x10
67 jmp msg_loop
68
69die:
70 # Allow the user to press a key, then reboot
71 xorw %ax, %ax
72 int $0x16
73 int $0x19
74
75 # int 0x19 should never return. In case it does anyway,
76 # invoke the BIOS reset code...
77 ljmp $0xf000,$0xfff0
78
79
80bugger_off_msg:
81 .ascii "Direct booting from floppy is no longer supported.\r\n"
82 .ascii "Please use a boot loader program instead.\r\n"
83 .ascii "\n"
84 .ascii "Remove disk and press any key to reboot . . .\r\n"
85 .byte 0
86
87
88 # Kernel attributes; used by setup
89
90 .org 497
91setup_sects: .byte SETUPSECTS
92root_flags: .word ROOT_RDONLY
93syssize: .word SYSSIZE
94swap_dev: .word SWAP_DEV
95ram_size: .word RAMDISK
96vid_mode: .word SVGA_MODE
97root_dev: .word ROOT_DEV
98boot_flag: .word 0xAA55
diff --git a/arch/x86_64/boot/compressed/Makefile b/arch/x86_64/boot/compressed/Makefile
index 705a3e33d7..c9f2da7496 100644
--- a/arch/x86_64/boot/compressed/Makefile
+++ b/arch/x86_64/boot/compressed/Makefile
@@ -7,11 +7,12 @@
7# 7#
8 8
9targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o 9targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o
10EXTRA_AFLAGS := -traditional
11 10
12# cannot use EXTRA_CFLAGS because base CFLAGS contains -mkernel which conflicts with 11CFLAGS := -m64 -D__KERNEL__ $(LINUXINCLUDE) -O2 \
13# -m32 12 -fno-strict-aliasing -fPIC -mcmodel=small \
14CFLAGS := -m64 -D__KERNEL__ -Iinclude -O2 -fno-strict-aliasing -fPIC -mcmodel=small -fno-builtin 13 $(call cc-option, -ffreestanding) \
14 $(call cc-option, -fno-stack-protector)
15AFLAGS := $(CFLAGS) -D__ASSEMBLY__
15LDFLAGS := -m elf_x86_64 16LDFLAGS := -m elf_x86_64
16 17
17LDFLAGS_vmlinux := -T 18LDFLAGS_vmlinux := -T
diff --git a/arch/x86_64/boot/compressed/head.S b/arch/x86_64/boot/compressed/head.S
index f9d5692a01..1312bfaff3 100644
--- a/arch/x86_64/boot/compressed/head.S
+++ b/arch/x86_64/boot/compressed/head.S
@@ -46,10 +46,10 @@ startup_32:
46 * at and where we were actually loaded at. This can only be done 46 * at and where we were actually loaded at. This can only be done
47 * with a short local call on x86. Nothing else will tell us what 47 * with a short local call on x86. Nothing else will tell us what
48 * address we are running at. The reserved chunk of the real-mode 48 * address we are running at. The reserved chunk of the real-mode
49 * data at 0x34-0x3f are used as the stack for this calculation. 49 * data at 0x1e4 (defined as a scratch field) are used as the stack
50 * Only 4 bytes are needed. 50 * for this calculation. Only 4 bytes are needed.
51 */ 51 */
52 leal 0x40(%esi), %esp 52 leal (0x1e4+4)(%esi), %esp
53 call 1f 53 call 1f
541: popl %ebp 541: popl %ebp
55 subl $1b, %ebp 55 subl $1b, %ebp
diff --git a/arch/x86_64/boot/install.sh b/arch/x86_64/boot/install.sh
deleted file mode 100644
index baaa2369bd..0000000000
--- a/arch/x86_64/boot/install.sh
+++ /dev/null
@@ -1,2 +0,0 @@
1#!/bin/sh
2. $srctree/arch/i386/boot/install.sh
diff --git a/arch/x86_64/boot/mtools.conf.in b/arch/x86_64/boot/mtools.conf.in
deleted file mode 100644
index efd6d2490c..0000000000
--- a/arch/x86_64/boot/mtools.conf.in
+++ /dev/null
@@ -1,17 +0,0 @@
1#
2# mtools configuration file for "make (b)zdisk"
3#
4
5# Actual floppy drive
6drive a:
7 file="/dev/fd0"
8
9# 1.44 MB floppy disk image
10drive v:
11 file="@OBJ@/fdimage" cylinders=80 heads=2 sectors=18 filter
12
13# 2.88 MB floppy disk image (mostly for virtual uses)
14drive w:
15 file="@OBJ@/fdimage" cylinders=80 heads=2 sectors=36 filter
16
17
diff --git a/arch/x86_64/boot/setup.S b/arch/x86_64/boot/setup.S
deleted file mode 100644
index e9e33f9496..0000000000
--- a/arch/x86_64/boot/setup.S
+++ /dev/null
@@ -1,826 +0,0 @@
1/*
2 * setup.S Copyright (C) 1991, 1992 Linus Torvalds
3 *
4 * setup.s is responsible for getting the system data from the BIOS,
5 * and putting them into the appropriate places in system memory.
6 * both setup.s and system has been loaded by the bootblock.
7 *
8 * This code asks the bios for memory/disk/other parameters, and
9 * puts them in a "safe" place: 0x90000-0x901FF, ie where the
10 * boot-block used to be. It is then up to the protected mode
11 * system to read them from there before the area is overwritten
12 * for buffer-blocks.
13 *
14 * Move PS/2 aux init code to psaux.c
15 * (troyer@saifr00.cfsat.Honeywell.COM) 03Oct92
16 *
17 * some changes and additional features by Christoph Niemann,
18 * March 1993/June 1994 (Christoph.Niemann@linux.org)
19 *
20 * add APM BIOS checking by Stephen Rothwell, May 1994
21 * (sfr@canb.auug.org.au)
22 *
23 * High load stuff, initrd support and position independency
24 * by Hans Lermen & Werner Almesberger, February 1996
25 * <lermen@elserv.ffm.fgan.de>, <almesber@lrc.epfl.ch>
26 *
27 * Video handling moved to video.S by Martin Mares, March 1996
28 * <mj@k332.feld.cvut.cz>
29 *
30 * Extended memory detection scheme retwiddled by orc@pell.chi.il.us (david
31 * parsons) to avoid loadlin confusion, July 1997
32 *
33 * Transcribed from Intel (as86) -> AT&T (gas) by Chris Noe, May 1999.
34 * <stiker@northlink.com>
35 *
36 * Fix to work around buggy BIOSes which don't use carry bit correctly
37 * and/or report extended memory in CX/DX for e801h memory size detection
38 * call. As a result the kernel got wrong figures. The int15/e801h docs
39 * from Ralf Brown interrupt list seem to indicate AX/BX should be used
40 * anyway. So to avoid breaking many machines (presumably there was a reason
41 * to orginally use CX/DX instead of AX/BX), we do a kludge to see
42 * if CX/DX have been changed in the e801 call and if so use AX/BX .
43 * Michael Miller, April 2001 <michaelm@mjmm.org>
44 *
45 * Added long mode checking and SSE force. March 2003, Andi Kleen.
46 */
47
48#include <asm/segment.h>
49#include <linux/utsrelease.h>
50#include <linux/compile.h>
51#include <asm/boot.h>
52#include <asm/e820.h>
53#include <asm/page.h>
54#include <asm/setup.h>
55
56/* Signature words to ensure LILO loaded us right */
57#define SIG1 0xAA55
58#define SIG2 0x5A5A
59
60INITSEG = DEF_INITSEG # 0x9000, we move boot here, out of the way
61SYSSEG = DEF_SYSSEG # 0x1000, system loaded at 0x10000 (65536).
62SETUPSEG = DEF_SETUPSEG # 0x9020, this is the current segment
63 # ... and the former contents of CS
64
65DELTA_INITSEG = SETUPSEG - INITSEG # 0x0020
66
67.code16
68.globl begtext, begdata, begbss, endtext, enddata, endbss
69
70.text
71begtext:
72.data
73begdata:
74.bss
75begbss:
76.text
77
78start:
79 jmp trampoline
80
81# This is the setup header, and it must start at %cs:2 (old 0x9020:2)
82
83 .ascii "HdrS" # header signature
84 .word 0x0206 # header version number (>= 0x0105)
85 # or else old loadlin-1.5 will fail)
86realmode_swtch: .word 0, 0 # default_switch, SETUPSEG
87start_sys_seg: .word SYSSEG
88 .word kernel_version # pointing to kernel version string
89 # above section of header is compatible
90 # with loadlin-1.5 (header v1.5). Don't
91 # change it.
92
93type_of_loader: .byte 0 # = 0, old one (LILO, Loadlin,
94 # Bootlin, SYSLX, bootsect...)
95 # See Documentation/i386/boot.txt for
96 # assigned ids
97
98# flags, unused bits must be zero (RFU) bit within loadflags
99loadflags:
100LOADED_HIGH = 1 # If set, the kernel is loaded high
101CAN_USE_HEAP = 0x80 # If set, the loader also has set
102 # heap_end_ptr to tell how much
103 # space behind setup.S can be used for
104 # heap purposes.
105 # Only the loader knows what is free
106#ifndef __BIG_KERNEL__
107 .byte 0
108#else
109 .byte LOADED_HIGH
110#endif
111
112setup_move_size: .word 0x8000 # size to move, when setup is not
113 # loaded at 0x90000. We will move setup
114 # to 0x90000 then just before jumping
115 # into the kernel. However, only the
116 # loader knows how much data behind
117 # us also needs to be loaded.
118
119code32_start: # here loaders can put a different
120 # start address for 32-bit code.
121#ifndef __BIG_KERNEL__
122 .long 0x1000 # 0x1000 = default for zImage
123#else
124 .long 0x100000 # 0x100000 = default for big kernel
125#endif
126
127ramdisk_image: .long 0 # address of loaded ramdisk image
128 # Here the loader puts the 32-bit
129 # address where it loaded the image.
130 # This only will be read by the kernel.
131
132ramdisk_size: .long 0 # its size in bytes
133
134bootsect_kludge:
135 .long 0 # obsolete
136
137heap_end_ptr: .word modelist+1024 # (Header version 0x0201 or later)
138 # space from here (exclusive) down to
139 # end of setup code can be used by setup
140 # for local heap purposes.
141
142pad1: .word 0
143cmd_line_ptr: .long 0 # (Header version 0x0202 or later)
144 # If nonzero, a 32-bit pointer
145 # to the kernel command line.
146 # The command line should be
147 # located between the start of
148 # setup and the end of low
149 # memory (0xa0000), or it may
150 # get overwritten before it
151 # gets read. If this field is
152 # used, there is no longer
153 # anything magical about the
154 # 0x90000 segment; the setup
155 # can be located anywhere in
156 # low memory 0x10000 or higher.
157
158ramdisk_max: .long 0xffffffff
159kernel_alignment: .long 0x200000 # physical addr alignment required for
160 # protected mode relocatable kernel
161#ifdef CONFIG_RELOCATABLE
162relocatable_kernel: .byte 1
163#else
164relocatable_kernel: .byte 0
165#endif
166pad2: .byte 0
167pad3: .word 0
168
169cmdline_size: .long COMMAND_LINE_SIZE-1 #length of the command line,
170 #added with boot protocol
171 #version 2.06
172
173trampoline: call start_of_setup
174 .align 16
175 # The offset at this point is 0x240
176 .space (0xeff-0x240+1) # E820 & EDD space (ending at 0xeff)
177# End of setup header #####################################################
178
179start_of_setup:
180# Bootlin depends on this being done early
181 movw $0x01500, %ax
182 movb $0x81, %dl
183 int $0x13
184
185#ifdef SAFE_RESET_DISK_CONTROLLER
186# Reset the disk controller.
187 movw $0x0000, %ax
188 movb $0x80, %dl
189 int $0x13
190#endif
191
192# Set %ds = %cs, we know that SETUPSEG = %cs at this point
193 movw %cs, %ax # aka SETUPSEG
194 movw %ax, %ds
195# Check signature at end of setup
196 cmpw $SIG1, setup_sig1
197 jne bad_sig
198
199 cmpw $SIG2, setup_sig2
200 jne bad_sig
201
202 jmp good_sig1
203
204# Routine to print asciiz string at ds:si
205prtstr:
206 lodsb
207 andb %al, %al
208 jz fin
209
210 call prtchr
211 jmp prtstr
212
213fin: ret
214
215# Space printing
216prtsp2: call prtspc # Print double space
217prtspc: movb $0x20, %al # Print single space (note: fall-thru)
218
219prtchr:
220 pushw %ax
221 pushw %cx
222 movw $0007,%bx
223 movw $0x01, %cx
224 movb $0x0e, %ah
225 int $0x10
226 popw %cx
227 popw %ax
228 ret
229
230beep: movb $0x07, %al
231 jmp prtchr
232
233no_sig_mess: .string "No setup signature found ..."
234
235good_sig1:
236 jmp good_sig
237
238# We now have to find the rest of the setup code/data
239bad_sig:
240 movw %cs, %ax # SETUPSEG
241 subw $DELTA_INITSEG, %ax # INITSEG
242 movw %ax, %ds
243 xorb %bh, %bh
244 movb (497), %bl # get setup sect from bootsect
245 subw $4, %bx # LILO loads 4 sectors of setup
246 shlw $8, %bx # convert to words (1sect=2^8 words)
247 movw %bx, %cx
248 shrw $3, %bx # convert to segment
249 addw $SYSSEG, %bx
250 movw %bx, %cs:start_sys_seg
251# Move rest of setup code/data to here
252 movw $2048, %di # four sectors loaded by LILO
253 subw %si, %si
254 movw %cs, %ax # aka SETUPSEG
255 movw %ax, %es
256 movw $SYSSEG, %ax
257 movw %ax, %ds
258 rep
259 movsw
260 movw %cs, %ax # aka SETUPSEG
261 movw %ax, %ds
262 cmpw $SIG1, setup_sig1
263 jne no_sig
264
265 cmpw $SIG2, setup_sig2
266 jne no_sig
267
268 jmp good_sig
269
270no_sig:
271 lea no_sig_mess, %si
272 call prtstr
273
274no_sig_loop:
275 jmp no_sig_loop
276
277good_sig:
278 movw %cs, %ax # aka SETUPSEG
279 subw $DELTA_INITSEG, %ax # aka INITSEG
280 movw %ax, %ds
281# Check if an old loader tries to load a big-kernel
282 testb $LOADED_HIGH, %cs:loadflags # Do we have a big kernel?
283 jz loader_ok # No, no danger for old loaders.
284
285 cmpb $0, %cs:type_of_loader # Do we have a loader that
286 # can deal with us?
287 jnz loader_ok # Yes, continue.
288
289 pushw %cs # No, we have an old loader,
290 popw %ds # die.
291 lea loader_panic_mess, %si
292 call prtstr
293
294 jmp no_sig_loop
295
296loader_panic_mess: .string "Wrong loader, giving up..."
297
298loader_ok:
299 /* check for long mode. */
300 /* we have to do this before the VESA setup, otherwise the user
301 can't see the error message. */
302
303 pushw %ds
304 movw %cs,%ax
305 movw %ax,%ds
306
307 call verify_cpu
308 testl %eax,%eax
309 jz sse_ok
310
311no_longmode:
312 call beep
313 lea long_mode_panic,%si
314 call prtstr
315no_longmode_loop:
316 jmp no_longmode_loop
317long_mode_panic:
318 .string "Your CPU does not support long mode. Use a 32bit distribution."
319 .byte 0
320
321#include "../kernel/verify_cpu.S"
322sse_ok:
323 popw %ds
324
325# tell BIOS we want to go to long mode
326 movl $0xec00,%eax # declare target operating mode
327 movl $2,%ebx # long mode
328 int $0x15
329
330# Get memory size (extended mem, kB)
331
332 xorl %eax, %eax
333 movl %eax, (0x1e0)
334#ifndef STANDARD_MEMORY_BIOS_CALL
335 movb %al, (E820NR)
336# Try three different memory detection schemes. First, try
337# e820h, which lets us assemble a memory map, then try e801h,
338# which returns a 32-bit memory size, and finally 88h, which
339# returns 0-64m
340
341# method E820H:
342# the memory map from hell. e820h returns memory classified into
343# a whole bunch of different types, and allows memory holes and
344# everything. We scan through this memory map and build a list
345# of the first 32 memory areas, which we return at [E820MAP].
346# This is documented at http://www.acpi.info/, in the ACPI 2.0 specification.
347
348#define SMAP 0x534d4150
349
350meme820:
351 xorl %ebx, %ebx # continuation counter
352 movw $E820MAP, %di # point into the whitelist
353 # so we can have the bios
354 # directly write into it.
355
356jmpe820:
357 movl $0x0000e820, %eax # e820, upper word zeroed
358 movl $SMAP, %edx # ascii 'SMAP'
359 movl $20, %ecx # size of the e820rec
360 pushw %ds # data record.
361 popw %es
362 int $0x15 # make the call
363 jc bail820 # fall to e801 if it fails
364
365 cmpl $SMAP, %eax # check the return is `SMAP'
366 jne bail820 # fall to e801 if it fails
367
368# cmpl $1, 16(%di) # is this usable memory?
369# jne again820
370
371 # If this is usable memory, we save it by simply advancing %di by
372 # sizeof(e820rec).
373 #
374good820:
375 movb (E820NR), %al # up to 128 entries
376 cmpb $E820MAX, %al
377 jae bail820
378
379 incb (E820NR)
380 movw %di, %ax
381 addw $20, %ax
382 movw %ax, %di
383again820:
384 cmpl $0, %ebx # check to see if
385 jne jmpe820 # %ebx is set to EOF
386bail820:
387
388
389# method E801H:
390# memory size is in 1k chunksizes, to avoid confusing loadlin.
391# we store the 0xe801 memory size in a completely different place,
392# because it will most likely be longer than 16 bits.
393# (use 1e0 because that's what Larry Augustine uses in his
394# alternative new memory detection scheme, and it's sensible
395# to write everything into the same place.)
396
397meme801:
398 stc # fix to work around buggy
399 xorw %cx,%cx # BIOSes which don't clear/set
400 xorw %dx,%dx # carry on pass/error of
401 # e801h memory size call
402 # or merely pass cx,dx though
403 # without changing them.
404 movw $0xe801, %ax
405 int $0x15
406 jc mem88
407
408 cmpw $0x0, %cx # Kludge to handle BIOSes
409 jne e801usecxdx # which report their extended
410 cmpw $0x0, %dx # memory in AX/BX rather than
411 jne e801usecxdx # CX/DX. The spec I have read
412 movw %ax, %cx # seems to indicate AX/BX
413 movw %bx, %dx # are more reasonable anyway...
414
415e801usecxdx:
416 andl $0xffff, %edx # clear sign extend
417 shll $6, %edx # and go from 64k to 1k chunks
418 movl %edx, (0x1e0) # store extended memory size
419 andl $0xffff, %ecx # clear sign extend
420 addl %ecx, (0x1e0) # and add lower memory into
421 # total size.
422
423# Ye Olde Traditional Methode. Returns the memory size (up to 16mb or
424# 64mb, depending on the bios) in ax.
425mem88:
426
427#endif
428 movb $0x88, %ah
429 int $0x15
430 movw %ax, (2)
431
432# Set the keyboard repeat rate to the max
433 movw $0x0305, %ax
434 xorw %bx, %bx
435 int $0x16
436
437# Check for video adapter and its parameters and allow the
438# user to browse video modes.
439 call video # NOTE: we need %ds pointing
440 # to bootsector
441
442# Get hd0 data...
443 xorw %ax, %ax
444 movw %ax, %ds
445 ldsw (4 * 0x41), %si
446 movw %cs, %ax # aka SETUPSEG
447 subw $DELTA_INITSEG, %ax # aka INITSEG
448 pushw %ax
449 movw %ax, %es
450 movw $0x0080, %di
451 movw $0x10, %cx
452 pushw %cx
453 cld
454 rep
455 movsb
456# Get hd1 data...
457 xorw %ax, %ax
458 movw %ax, %ds
459 ldsw (4 * 0x46), %si
460 popw %cx
461 popw %es
462 movw $0x0090, %di
463 rep
464 movsb
465# Check that there IS a hd1 :-)
466 movw $0x01500, %ax
467 movb $0x81, %dl
468 int $0x13
469 jc no_disk1
470
471 cmpb $3, %ah
472 je is_disk1
473
474no_disk1:
475 movw %cs, %ax # aka SETUPSEG
476 subw $DELTA_INITSEG, %ax # aka INITSEG
477 movw %ax, %es
478 movw $0x0090, %di
479 movw $0x10, %cx
480 xorw %ax, %ax
481 cld
482 rep
483 stosb
484is_disk1:
485
486# Check for PS/2 pointing device
487 movw %cs, %ax # aka SETUPSEG
488 subw $DELTA_INITSEG, %ax # aka INITSEG
489 movw %ax, %ds
490 movb $0, (0x1ff) # default is no pointing device
491 int $0x11 # int 0x11: equipment list
492 testb $0x04, %al # check if mouse installed
493 jz no_psmouse
494
495 movb $0xAA, (0x1ff) # device present
496no_psmouse:
497
498#include "../../i386/boot/edd.S"
499
500# Now we want to move to protected mode ...
501 cmpw $0, %cs:realmode_swtch
502 jz rmodeswtch_normal
503
504 lcall *%cs:realmode_swtch
505
506 jmp rmodeswtch_end
507
508rmodeswtch_normal:
509 pushw %cs
510 call default_switch
511
512rmodeswtch_end:
513# we get the code32 start address and modify the below 'jmpi'
514# (loader may have changed it)
515 movl %cs:code32_start, %eax
516 movl %eax, %cs:code32
517
518# Now we move the system to its rightful place ... but we check if we have a
519# big-kernel. In that case we *must* not move it ...
520 testb $LOADED_HIGH, %cs:loadflags
521 jz do_move0 # .. then we have a normal low
522 # loaded zImage
523 # .. or else we have a high
524 # loaded bzImage
525 jmp end_move # ... and we skip moving
526
527do_move0:
528 movw $0x100, %ax # start of destination segment
529 movw %cs, %bp # aka SETUPSEG
530 subw $DELTA_INITSEG, %bp # aka INITSEG
531 movw %cs:start_sys_seg, %bx # start of source segment
532 cld
533do_move:
534 movw %ax, %es # destination segment
535 incb %ah # instead of add ax,#0x100
536 movw %bx, %ds # source segment
537 addw $0x100, %bx
538 subw %di, %di
539 subw %si, %si
540 movw $0x800, %cx
541 rep
542 movsw
543 cmpw %bp, %bx # assume start_sys_seg > 0x200,
544 # so we will perhaps read one
545 # page more than needed, but
546 # never overwrite INITSEG
547 # because destination is a
548 # minimum one page below source
549 jb do_move
550
551end_move:
552# then we load the segment descriptors
553 movw %cs, %ax # aka SETUPSEG
554 movw %ax, %ds
555
556# Check whether we need to be downward compatible with version <=201
557 cmpl $0, cmd_line_ptr
558 jne end_move_self # loader uses version >=202 features
559 cmpb $0x20, type_of_loader
560 je end_move_self # bootsect loader, we know of it
561
562# Boot loader doesnt support boot protocol version 2.02.
563# If we have our code not at 0x90000, we need to move it there now.
564# We also then need to move the params behind it (commandline)
565# Because we would overwrite the code on the current IP, we move
566# it in two steps, jumping high after the first one.
567 movw %cs, %ax
568 cmpw $SETUPSEG, %ax
569 je end_move_self
570
571 cli # make sure we really have
572 # interrupts disabled !
573 # because after this the stack
574 # should not be used
575 subw $DELTA_INITSEG, %ax # aka INITSEG
576 movw %ss, %dx
577 cmpw %ax, %dx
578 jb move_self_1
579
580 addw $INITSEG, %dx
581 subw %ax, %dx # this will go into %ss after
582 # the move
583move_self_1:
584 movw %ax, %ds
585 movw $INITSEG, %ax # real INITSEG
586 movw %ax, %es
587 movw %cs:setup_move_size, %cx
588 std # we have to move up, so we use
589 # direction down because the
590 # areas may overlap
591 movw %cx, %di
592 decw %di
593 movw %di, %si
594 subw $move_self_here+0x200, %cx
595 rep
596 movsb
597 ljmp $SETUPSEG, $move_self_here
598
599move_self_here:
600 movw $move_self_here+0x200, %cx
601 rep
602 movsb
603 movw $SETUPSEG, %ax
604 movw %ax, %ds
605 movw %dx, %ss
606end_move_self: # now we are at the right place
607 lidt idt_48 # load idt with 0,0
608 xorl %eax, %eax # Compute gdt_base
609 movw %ds, %ax # (Convert %ds:gdt to a linear ptr)
610 shll $4, %eax
611 addl $gdt, %eax
612 movl %eax, (gdt_48+2)
613 lgdt gdt_48 # load gdt with whatever is
614 # appropriate
615
616# that was painless, now we enable a20
617 call empty_8042
618
619 movb $0xD1, %al # command write
620 outb %al, $0x64
621 call empty_8042
622
623 movb $0xDF, %al # A20 on
624 outb %al, $0x60
625 call empty_8042
626
627#
628# You must preserve the other bits here. Otherwise embarrasing things
629# like laptops powering off on boot happen. Corrected version by Kira
630# Brown from Linux 2.2
631#
632 inb $0x92, %al #
633 orb $02, %al # "fast A20" version
634 outb %al, $0x92 # some chips have only this
635
636# wait until a20 really *is* enabled; it can take a fair amount of
637# time on certain systems; Toshiba Tecras are known to have this
638# problem. The memory location used here (0x200) is the int 0x80
639# vector, which should be safe to use.
640
641 xorw %ax, %ax # segment 0x0000
642 movw %ax, %fs
643 decw %ax # segment 0xffff (HMA)
644 movw %ax, %gs
645a20_wait:
646 incw %ax # unused memory location <0xfff0
647 movw %ax, %fs:(0x200) # we use the "int 0x80" vector
648 cmpw %gs:(0x210), %ax # and its corresponding HMA addr
649 je a20_wait # loop until no longer aliased
650
651# make sure any possible coprocessor is properly reset..
652 xorw %ax, %ax
653 outb %al, $0xf0
654 call delay
655
656 outb %al, $0xf1
657 call delay
658
659# well, that went ok, I hope. Now we mask all interrupts - the rest
660# is done in init_IRQ().
661 movb $0xFF, %al # mask all interrupts for now
662 outb %al, $0xA1
663 call delay
664
665 movb $0xFB, %al # mask all irq's but irq2 which
666 outb %al, $0x21 # is cascaded
667
668# Well, that certainly wasn't fun :-(. Hopefully it works, and we don't
669# need no steenking BIOS anyway (except for the initial loading :-).
670# The BIOS-routine wants lots of unnecessary data, and it's less
671# "interesting" anyway. This is how REAL programmers do it.
672#
673# Well, now's the time to actually move into protected mode. To make
674# things as simple as possible, we do no register set-up or anything,
675# we let the gnu-compiled 32-bit programs do that. We just jump to
676# absolute address 0x1000 (or the loader supplied one),
677# in 32-bit protected mode.
678#
679# Note that the short jump isn't strictly needed, although there are
680# reasons why it might be a good idea. It won't hurt in any case.
681 movw $1, %ax # protected mode (PE) bit
682 lmsw %ax # This is it!
683 jmp flush_instr
684
685flush_instr:
686 xorw %bx, %bx # Flag to indicate a boot
687 xorl %esi, %esi # Pointer to real-mode code
688 movw %cs, %si
689 subw $DELTA_INITSEG, %si
690 shll $4, %esi # Convert to 32-bit pointer
691# NOTE: For high loaded big kernels we need a
692# jmpi 0x100000,__KERNEL_CS
693#
694# but we yet haven't reloaded the CS register, so the default size
695# of the target offset still is 16 bit.
696# However, using an operand prefix (0x66), the CPU will properly
697# take our 48 bit far pointer. (INTeL 80386 Programmer's Reference
698# Manual, Mixing 16-bit and 32-bit code, page 16-6)
699
700 .byte 0x66, 0xea # prefix + jmpi-opcode
701code32: .long 0x1000 # will be set to 0x100000
702 # for big kernels
703 .word __KERNEL_CS
704
705# Here's a bunch of information about your current kernel..
706kernel_version: .ascii UTS_RELEASE
707 .ascii " ("
708 .ascii LINUX_COMPILE_BY
709 .ascii "@"
710 .ascii LINUX_COMPILE_HOST
711 .ascii ") "
712 .ascii UTS_VERSION
713 .byte 0
714
715# This is the default real mode switch routine.
716# to be called just before protected mode transition
717default_switch:
718 cli # no interrupts allowed !
719 movb $0x80, %al # disable NMI for bootup
720 # sequence
721 outb %al, $0x70
722 lret
723
724
725# This routine checks that the keyboard command queue is empty
726# (after emptying the output buffers)
727#
728# Some machines have delusions that the keyboard buffer is always full
729# with no keyboard attached...
730#
731# If there is no keyboard controller, we will usually get 0xff
732# to all the reads. With each IO taking a microsecond and
733# a timeout of 100,000 iterations, this can take about half a
734# second ("delay" == outb to port 0x80). That should be ok,
735# and should also be plenty of time for a real keyboard controller
736# to empty.
737#
738
739empty_8042:
740 pushl %ecx
741 movl $100000, %ecx
742
743empty_8042_loop:
744 decl %ecx
745 jz empty_8042_end_loop
746
747 call delay
748
749 inb $0x64, %al # 8042 status port
750 testb $1, %al # output buffer?
751 jz no_output
752
753 call delay
754 inb $0x60, %al # read it
755 jmp empty_8042_loop
756
757no_output:
758 testb $2, %al # is input buffer full?
759 jnz empty_8042_loop # yes - loop
760empty_8042_end_loop:
761 popl %ecx
762 ret
763
764# Read the cmos clock. Return the seconds in al
765gettime:
766 pushw %cx
767 movb $0x02, %ah
768 int $0x1a
769 movb %dh, %al # %dh contains the seconds
770 andb $0x0f, %al
771 movb %dh, %ah
772 movb $0x04, %cl
773 shrb %cl, %ah
774 aad
775 popw %cx
776 ret
777
778# Delay is needed after doing I/O
779delay:
780 outb %al,$0x80
781 ret
782
783# Descriptor tables
784gdt:
785 .word 0, 0, 0, 0 # dummy
786
787 .word 0, 0, 0, 0 # unused
788
789 .word 0xFFFF # 4Gb - (0x100000*0x1000 = 4Gb)
790 .word 0 # base address = 0
791 .word 0x9A00 # code read/exec
792 .word 0x00CF # granularity = 4096, 386
793 # (+5th nibble of limit)
794
795 .word 0xFFFF # 4Gb - (0x100000*0x1000 = 4Gb)
796 .word 0 # base address = 0
797 .word 0x9200 # data read/write
798 .word 0x00CF # granularity = 4096, 386
799 # (+5th nibble of limit)
800gdt_end:
801idt_48:
802 .word 0 # idt limit = 0
803 .word 0, 0 # idt base = 0L
804gdt_48:
805 .word gdt_end-gdt-1 # gdt limit
806 .word 0, 0 # gdt base (filled in later)
807
808# Include video setup & detection code
809
810#include "../../i386/boot/video.S"
811
812# Setup signature -- must be last
813setup_sig1: .word SIG1
814setup_sig2: .word SIG2
815
816# After this point, there is some free space which is used by the video mode
817# handling code to store the temporary mode table (not used by the kernel).
818
819modelist:
820
821.text
822endtext:
823.data
824enddata:
825.bss
826endbss:
diff --git a/arch/x86_64/boot/tools/build.c b/arch/x86_64/boot/tools/build.c
deleted file mode 100644
index eae8669170..0000000000
--- a/arch/x86_64/boot/tools/build.c
+++ /dev/null
@@ -1,185 +0,0 @@
1/*
2 * Copyright (C) 1991, 1992 Linus Torvalds
3 * Copyright (C) 1997 Martin Mares
4 */
5
6/*
7 * This file builds a disk-image from three different files:
8 *
9 * - bootsect: compatibility mbr which prints an error message if
10 * someone tries to boot the kernel directly.
11 * - setup: 8086 machine code, sets up system parm
12 * - system: 80386 code for actual system
13 *
14 * It does some checking that all files are of the correct type, and
15 * just writes the result to stdout, removing headers and padding to
16 * the right amount. It also writes some system data to stderr.
17 */
18
19/*
20 * Changes by tytso to allow root device specification
21 * High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996
22 * Cross compiling fixes by Gertjan van Wingerde, July 1996
23 * Rewritten by Martin Mares, April 1997
24 */
25
26#include <stdio.h>
27#include <string.h>
28#include <stdlib.h>
29#include <stdarg.h>
30#include <sys/types.h>
31#include <sys/stat.h>
32#include <sys/sysmacros.h>
33#include <unistd.h>
34#include <fcntl.h>
35#include <asm/boot.h>
36
37typedef unsigned char byte;
38typedef unsigned short word;
39typedef unsigned long u32;
40
41#define DEFAULT_MAJOR_ROOT 0
42#define DEFAULT_MINOR_ROOT 0
43
44/* Minimal number of setup sectors (see also bootsect.S) */
45#define SETUP_SECTS 4
46
47byte buf[1024];
48int fd;
49int is_big_kernel;
50
51void die(const char * str, ...)
52{
53 va_list args;
54 va_start(args, str);
55 vfprintf(stderr, str, args);
56 fputc('\n', stderr);
57 exit(1);
58}
59
60void file_open(const char *name)
61{
62 if ((fd = open(name, O_RDONLY, 0)) < 0)
63 die("Unable to open `%s': %m", name);
64}
65
66void usage(void)
67{
68 die("Usage: build [-b] bootsect setup system [rootdev] [> image]");
69}
70
71int main(int argc, char ** argv)
72{
73 unsigned int i, c, sz, setup_sectors;
74 u32 sys_size;
75 byte major_root, minor_root;
76 struct stat sb;
77
78 if (argc > 2 && !strcmp(argv[1], "-b"))
79 {
80 is_big_kernel = 1;
81 argc--, argv++;
82 }
83 if ((argc < 4) || (argc > 5))
84 usage();
85 if (argc > 4) {
86 if (!strcmp(argv[4], "CURRENT")) {
87 if (stat("/", &sb)) {
88 perror("/");
89 die("Couldn't stat /");
90 }
91 major_root = major(sb.st_dev);
92 minor_root = minor(sb.st_dev);
93 } else if (strcmp(argv[4], "FLOPPY")) {
94 if (stat(argv[4], &sb)) {
95 perror(argv[4]);
96 die("Couldn't stat root device.");
97 }
98 major_root = major(sb.st_rdev);
99 minor_root = minor(sb.st_rdev);
100 } else {
101 major_root = 0;
102 minor_root = 0;
103 }
104 } else {
105 major_root = DEFAULT_MAJOR_ROOT;
106 minor_root = DEFAULT_MINOR_ROOT;
107 }
108 fprintf(stderr, "Root device is (%d, %d)\n", major_root, minor_root);
109
110 file_open(argv[1]);
111 i = read(fd, buf, sizeof(buf));
112 fprintf(stderr,"Boot sector %d bytes.\n",i);
113 if (i != 512)
114 die("Boot block must be exactly 512 bytes");
115 if (buf[510] != 0x55 || buf[511] != 0xaa)
116 die("Boot block hasn't got boot flag (0xAA55)");
117 buf[508] = minor_root;
118 buf[509] = major_root;
119 if (write(1, buf, 512) != 512)
120 die("Write call failed");
121 close (fd);
122
123 file_open(argv[2]); /* Copy the setup code */
124 for (i=0 ; (c=read(fd, buf, sizeof(buf)))>0 ; i+=c )
125 if (write(1, buf, c) != c)
126 die("Write call failed");
127 if (c != 0)
128 die("read-error on `setup'");
129 close (fd);
130
131 setup_sectors = (i + 511) / 512; /* Pad unused space with zeros */
132 /* for compatibility with ancient versions of LILO. */
133 if (setup_sectors < SETUP_SECTS)
134 setup_sectors = SETUP_SECTS;
135 fprintf(stderr, "Setup is %d bytes.\n", i);
136 memset(buf, 0, sizeof(buf));
137 while (i < setup_sectors * 512) {
138 c = setup_sectors * 512 - i;
139 if (c > sizeof(buf))
140 c = sizeof(buf);
141 if (write(1, buf, c) != c)
142 die("Write call failed");
143 i += c;
144 }
145
146 file_open(argv[3]);
147 if (fstat (fd, &sb))
148 die("Unable to stat `%s': %m", argv[3]);
149 sz = sb.st_size;
150 fprintf (stderr, "System is %d kB\n", sz/1024);
151 sys_size = (sz + 15) / 16;
152 if (!is_big_kernel && sys_size > DEF_SYSSIZE)
153 die("System is too big. Try using bzImage or modules.");
154 while (sz > 0) {
155 int l, n;
156
157 l = (sz > sizeof(buf)) ? sizeof(buf) : sz;
158 if ((n=read(fd, buf, l)) != l) {
159 if (n < 0)
160 die("Error reading %s: %m", argv[3]);
161 else
162 die("%s: Unexpected EOF", argv[3]);
163 }
164 if (write(1, buf, l) != l)
165 die("Write failed");
166 sz -= l;
167 }
168 close(fd);
169
170 if (lseek(1, 497, SEEK_SET) != 497) /* Write sizes to the bootsector */
171 die("Output: seek failed");
172 buf[0] = setup_sectors;
173 if (write(1, buf, 1) != 1)
174 die("Write of setup sector count failed");
175 if (lseek(1, 500, SEEK_SET) != 500)
176 die("Output: seek failed");
177 buf[0] = (sys_size & 0xff);
178 buf[1] = ((sys_size >> 8) & 0xff);
179 buf[2] = ((sys_size >> 16) & 0xff);
180 buf[3] = ((sys_size >> 24) & 0xff);
181 if (write(1, buf, 4) != 4)
182 die("Write of image length failed");
183
184 return 0; /* Everything is OK */
185}
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S
index 47565c3345..3f66e970d8 100644
--- a/arch/x86_64/ia32/ia32entry.S
+++ b/arch/x86_64/ia32/ia32entry.S
@@ -526,7 +526,7 @@ ia32_sys_call_table:
526 .quad sys_init_module 526 .quad sys_init_module
527 .quad sys_delete_module 527 .quad sys_delete_module
528 .quad quiet_ni_syscall /* 130 get_kernel_syms */ 528 .quad quiet_ni_syscall /* 130 get_kernel_syms */
529 .quad sys_quotactl 529 .quad sys32_quotactl
530 .quad sys_getpgid 530 .quad sys_getpgid
531 .quad sys_fchdir 531 .quad sys_fchdir
532 .quad quiet_ni_syscall /* bdflush */ 532 .quad quiet_ni_syscall /* bdflush */
@@ -719,4 +719,5 @@ ia32_sys_call_table:
719 .quad compat_sys_signalfd 719 .quad compat_sys_signalfd
720 .quad compat_sys_timerfd 720 .quad compat_sys_timerfd
721 .quad sys_eventfd 721 .quad sys_eventfd
722 .quad sys32_fallocate
722ia32_syscall_end: 723ia32_syscall_end:
diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c
index 99a78a3cce..bee96d6144 100644
--- a/arch/x86_64/ia32/sys_ia32.c
+++ b/arch/x86_64/ia32/sys_ia32.c
@@ -879,3 +879,11 @@ asmlinkage long sys32_fadvise64(int fd, unsigned offset_lo, unsigned offset_hi,
879 return sys_fadvise64_64(fd, ((u64)offset_hi << 32) | offset_lo, 879 return sys_fadvise64_64(fd, ((u64)offset_hi << 32) | offset_lo,
880 len, advice); 880 len, advice);
881} 881}
882
883asmlinkage long sys32_fallocate(int fd, int mode, unsigned offset_lo,
884 unsigned offset_hi, unsigned len_lo,
885 unsigned len_hi)
886{
887 return sys_fallocate(fd, mode, ((u64)offset_hi << 32) | offset_lo,
888 ((u64)len_hi << 32) | len_lo);
889}
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index de1de8a2fd..47f1dc30bf 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -44,6 +44,7 @@ obj-$(CONFIG_PCI) += early-quirks.o
44 44
45obj-y += topology.o 45obj-y += topology.o
46obj-y += intel_cacheinfo.o 46obj-y += intel_cacheinfo.o
47obj-y += addon_cpuid_features.o
47obj-y += pcspeaker.o 48obj-y += pcspeaker.o
48 49
49CFLAGS_vsyscall.o := $(PROFILING) -g0 50CFLAGS_vsyscall.o := $(PROFILING) -g0
@@ -55,6 +56,7 @@ cpuid-$(subst m,y,$(CONFIG_X86_CPUID)) += ../../i386/kernel/cpuid.o
55topology-y += ../../i386/kernel/topology.o 56topology-y += ../../i386/kernel/topology.o
56microcode-$(subst m,y,$(CONFIG_MICROCODE)) += ../../i386/kernel/microcode.o 57microcode-$(subst m,y,$(CONFIG_MICROCODE)) += ../../i386/kernel/microcode.o
57intel_cacheinfo-y += ../../i386/kernel/cpu/intel_cacheinfo.o 58intel_cacheinfo-y += ../../i386/kernel/cpu/intel_cacheinfo.o
59addon_cpuid_features-y += ../../i386/kernel/cpu/addon_cpuid_features.o
58quirks-y += ../../i386/kernel/quirks.o 60quirks-y += ../../i386/kernel/quirks.o
59i8237-y += ../../i386/kernel/i8237.o 61i8237-y += ../../i386/kernel/i8237.o
60msr-$(subst m,y,$(CONFIG_X86_MSR)) += ../../i386/kernel/msr.o 62msr-$(subst m,y,$(CONFIG_X86_MSR)) += ../../i386/kernel/msr.o
diff --git a/arch/x86_64/kernel/cpufreq/Kconfig b/arch/x86_64/kernel/cpufreq/Kconfig
index c0749d2479..a3fd51926c 100644
--- a/arch/x86_64/kernel/cpufreq/Kconfig
+++ b/arch/x86_64/kernel/cpufreq/Kconfig
@@ -48,10 +48,6 @@ config X86_SPEEDSTEP_CENTRINO
48 48
49 If in doubt, say N. 49 If in doubt, say N.
50 50
51config X86_SPEEDSTEP_CENTRINO_ACPI
52 bool
53 depends on X86_SPEEDSTEP_CENTRINO
54
55config X86_ACPI_CPUFREQ 51config X86_ACPI_CPUFREQ
56 tristate "ACPI Processor P-States driver" 52 tristate "ACPI Processor P-States driver"
57 select CPU_FREQ_TABLE 53 select CPU_FREQ_TABLE
@@ -73,7 +69,7 @@ comment "shared options"
73config X86_ACPI_CPUFREQ_PROC_INTF 69config X86_ACPI_CPUFREQ_PROC_INTF
74 bool "/proc/acpi/processor/../performance interface (deprecated)" 70 bool "/proc/acpi/processor/../performance interface (deprecated)"
75 depends on PROC_FS 71 depends on PROC_FS
76 depends on X86_ACPI_CPUFREQ || X86_SPEEDSTEP_CENTRINO_ACPI || X86_POWERNOW_K8_ACPI 72 depends on X86_ACPI_CPUFREQ || X86_POWERNOW_K8_ACPI
77 help 73 help
78 This enables the deprecated /proc/acpi/processor/../performance 74 This enables the deprecated /proc/acpi/processor/../performance
79 interface. While it is helpful for debugging, the generic, 75 interface. While it is helpful for debugging, the generic,
diff --git a/arch/x86_64/kernel/early_printk.c b/arch/x86_64/kernel/early_printk.c
index 296d2b0c5d..fd9aff3f38 100644
--- a/arch/x86_64/kernel/early_printk.c
+++ b/arch/x86_64/kernel/early_printk.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/fcntl.h> 8#include <asm/fcntl.h>
9#include <xen/hvc-console.h>
9 10
10/* Simple VGA output */ 11/* Simple VGA output */
11 12
@@ -242,6 +243,10 @@ static int __init setup_early_printk(char *buf)
242 simnow_init(buf + 6); 243 simnow_init(buf + 6);
243 early_console = &simnow_console; 244 early_console = &simnow_console;
244 keep_early = 1; 245 keep_early = 1;
246#ifdef CONFIG_HVC_XEN
247 } else if (!strncmp(buf, "xen", 3)) {
248 early_console = &xenboot_console;
249#endif
245 } 250 }
246 251
247 if (keep_early) 252 if (keep_early)
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S
index 1fab487dee..941c84baec 100644
--- a/arch/x86_64/kernel/head.S
+++ b/arch/x86_64/kernel/head.S
@@ -73,7 +73,11 @@ startup_64:
73 addq %rbp, init_level4_pgt + (511*8)(%rip) 73 addq %rbp, init_level4_pgt + (511*8)(%rip)
74 74
75 addq %rbp, level3_ident_pgt + 0(%rip) 75 addq %rbp, level3_ident_pgt + 0(%rip)
76
76 addq %rbp, level3_kernel_pgt + (510*8)(%rip) 77 addq %rbp, level3_kernel_pgt + (510*8)(%rip)
78 addq %rbp, level3_kernel_pgt + (511*8)(%rip)
79
80 addq %rbp, level2_fixmap_pgt + (506*8)(%rip)
77 81
78 /* Add an Identity mapping if I am above 1G */ 82 /* Add an Identity mapping if I am above 1G */
79 leaq _text(%rip), %rdi 83 leaq _text(%rip), %rdi
@@ -314,7 +318,16 @@ NEXT_PAGE(level3_kernel_pgt)
314 .fill 510,8,0 318 .fill 510,8,0
315 /* (2^48-(2*1024*1024*1024)-((2^39)*511))/(2^30) = 510 */ 319 /* (2^48-(2*1024*1024*1024)-((2^39)*511))/(2^30) = 510 */
316 .quad level2_kernel_pgt - __START_KERNEL_map + _KERNPG_TABLE 320 .quad level2_kernel_pgt - __START_KERNEL_map + _KERNPG_TABLE
317 .fill 1,8,0 321 .quad level2_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE
322
323NEXT_PAGE(level2_fixmap_pgt)
324 .fill 506,8,0
325 .quad level1_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE
326 /* 8MB reserved for vsyscalls + a 2MB hole = 4 + 1 entries */
327 .fill 5,8,0
328
329NEXT_PAGE(level1_fixmap_pgt)
330 .fill 512,8,0
318 331
319NEXT_PAGE(level2_ident_pgt) 332NEXT_PAGE(level2_ident_pgt)
320 /* Since I easily can, map the first 1G. 333 /* Since I easily can, map the first 1G.
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index d8bfe31547..1c6c6f7245 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -1492,6 +1492,7 @@ static void ack_lapic_irq (unsigned int irq)
1492static void end_lapic_irq (unsigned int i) { /* nothing */ } 1492static void end_lapic_irq (unsigned int i) { /* nothing */ }
1493 1493
1494static struct hw_interrupt_type lapic_irq_type __read_mostly = { 1494static struct hw_interrupt_type lapic_irq_type __read_mostly = {
1495 .name = "local-APIC",
1495 .typename = "local-APIC-edge", 1496 .typename = "local-APIC-edge",
1496 .startup = NULL, /* startup_irq() not used for IRQ0 */ 1497 .startup = NULL, /* startup_irq() not used for IRQ0 */
1497 .shutdown = NULL, /* shutdown_irq() not used for IRQ0 */ 1498 .shutdown = NULL, /* shutdown_irq() not used for IRQ0 */
diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c
index 3eaceac324..39cb3fa83e 100644
--- a/arch/x86_64/kernel/irq.c
+++ b/arch/x86_64/kernel/irq.c
@@ -144,17 +144,43 @@ void fixup_irqs(cpumask_t map)
144 144
145 for (irq = 0; irq < NR_IRQS; irq++) { 145 for (irq = 0; irq < NR_IRQS; irq++) {
146 cpumask_t mask; 146 cpumask_t mask;
147 int break_affinity = 0;
148 int set_affinity = 1;
149
147 if (irq == 2) 150 if (irq == 2)
148 continue; 151 continue;
149 152
153 /* interrupt's are disabled at this point */
154 spin_lock(&irq_desc[irq].lock);
155
156 if (!irq_has_action(irq) ||
157 cpus_equal(irq_desc[irq].affinity, map)) {
158 spin_unlock(&irq_desc[irq].lock);
159 continue;
160 }
161
150 cpus_and(mask, irq_desc[irq].affinity, map); 162 cpus_and(mask, irq_desc[irq].affinity, map);
151 if (any_online_cpu(mask) == NR_CPUS) { 163 if (cpus_empty(mask)) {
152 printk("Breaking affinity for irq %i\n", irq); 164 break_affinity = 1;
153 mask = map; 165 mask = map;
154 } 166 }
167
168 if (irq_desc[irq].chip->mask)
169 irq_desc[irq].chip->mask(irq);
170
155 if (irq_desc[irq].chip->set_affinity) 171 if (irq_desc[irq].chip->set_affinity)
156 irq_desc[irq].chip->set_affinity(irq, mask); 172 irq_desc[irq].chip->set_affinity(irq, mask);
157 else if (irq_desc[irq].action && !(warned++)) 173 else if (!(warned++))
174 set_affinity = 0;
175
176 if (irq_desc[irq].chip->unmask)
177 irq_desc[irq].chip->unmask(irq);
178
179 spin_unlock(&irq_desc[irq].lock);
180
181 if (break_affinity && set_affinity)
182 printk("Broke affinity for irq %i\n", irq);
183 else if (!set_affinity)
158 printk("Cannot set affinity for irq %i\n", irq); 184 printk("Cannot set affinity for irq %i\n", irq);
159 } 185 }
160 186
diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c
index a14375dd54..f3fb817455 100644
--- a/arch/x86_64/kernel/mce.c
+++ b/arch/x86_64/kernel/mce.c
@@ -174,7 +174,7 @@ static void do_mce_trigger(void)
174 if (events != atomic_read(&mce_logged) && trigger[0]) { 174 if (events != atomic_read(&mce_logged) && trigger[0]) {
175 /* Small race window, but should be harmless. */ 175 /* Small race window, but should be harmless. */
176 atomic_set(&mce_logged, events); 176 atomic_set(&mce_logged, events);
177 call_usermodehelper(trigger, trigger_argv, NULL, -1); 177 call_usermodehelper(trigger, trigger_argv, NULL, UMH_NO_WAIT);
178 } 178 }
179} 179}
180 180
@@ -497,15 +497,17 @@ static ssize_t mce_read(struct file *filp, char __user *ubuf, size_t usize, loff
497 for (i = 0; i < next; i++) { 497 for (i = 0; i < next; i++) {
498 unsigned long start = jiffies; 498 unsigned long start = jiffies;
499 while (!mcelog.entry[i].finished) { 499 while (!mcelog.entry[i].finished) {
500 if (!time_before(jiffies, start + 2)) { 500 if (time_after_eq(jiffies, start + 2)) {
501 memset(mcelog.entry + i,0, sizeof(struct mce)); 501 memset(mcelog.entry + i,0, sizeof(struct mce));
502 continue; 502 goto timeout;
503 } 503 }
504 cpu_relax(); 504 cpu_relax();
505 } 505 }
506 smp_rmb(); 506 smp_rmb();
507 err |= copy_to_user(buf, mcelog.entry + i, sizeof(struct mce)); 507 err |= copy_to_user(buf, mcelog.entry + i, sizeof(struct mce));
508 buf += sizeof(struct mce); 508 buf += sizeof(struct mce);
509 timeout:
510 ;
509 } 511 }
510 512
511 memset(mcelog.entry, 0, next * sizeof(struct mce)); 513 memset(mcelog.entry, 0, next * sizeof(struct mce));
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c
index 931c64bad5..edbbc59b75 100644
--- a/arch/x86_64/kernel/nmi.c
+++ b/arch/x86_64/kernel/nmi.c
@@ -296,7 +296,7 @@ static DEFINE_PER_CPU(unsigned, last_irq_sum);
296static DEFINE_PER_CPU(local_t, alert_counter); 296static DEFINE_PER_CPU(local_t, alert_counter);
297static DEFINE_PER_CPU(int, nmi_touch); 297static DEFINE_PER_CPU(int, nmi_touch);
298 298
299void touch_nmi_watchdog (void) 299void touch_nmi_watchdog(void)
300{ 300{
301 if (nmi_watchdog > 0) { 301 if (nmi_watchdog > 0) {
302 unsigned cpu; 302 unsigned cpu;
@@ -306,8 +306,10 @@ void touch_nmi_watchdog (void)
306 * do it ourselves because the alert count increase is not 306 * do it ourselves because the alert count increase is not
307 * atomic. 307 * atomic.
308 */ 308 */
309 for_each_present_cpu (cpu) 309 for_each_present_cpu(cpu) {
310 per_cpu(nmi_touch, cpu) = 1; 310 if (per_cpu(nmi_touch, cpu) != 1)
311 per_cpu(nmi_touch, cpu) = 1;
312 }
311 } 313 }
312 314
313 touch_softlockup_watchdog(); 315 touch_softlockup_watchdog();
diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c
index 9f80aad3fe..90f6315d02 100644
--- a/arch/x86_64/kernel/pci-dma.c
+++ b/arch/x86_64/kernel/pci-dma.c
@@ -22,8 +22,7 @@ EXPORT_SYMBOL(bad_dma_address);
22int iommu_bio_merge __read_mostly = 0; 22int iommu_bio_merge __read_mostly = 0;
23EXPORT_SYMBOL(iommu_bio_merge); 23EXPORT_SYMBOL(iommu_bio_merge);
24 24
25int iommu_sac_force __read_mostly = 0; 25static int iommu_sac_force __read_mostly = 0;
26EXPORT_SYMBOL(iommu_sac_force);
27 26
28int no_iommu __read_mostly; 27int no_iommu __read_mostly;
29#ifdef CONFIG_IOMMU_DEBUG 28#ifdef CONFIG_IOMMU_DEBUG
diff --git a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c
index 9409117b9f..e83cc67155 100644
--- a/arch/x86_64/kernel/ptrace.c
+++ b/arch/x86_64/kernel/ptrace.c
@@ -102,16 +102,25 @@ unsigned long convert_rip_to_linear(struct task_struct *child, struct pt_regs *r
102 u32 *desc; 102 u32 *desc;
103 unsigned long base; 103 unsigned long base;
104 104
105 down(&child->mm->context.sem); 105 seg &= ~7UL;
106 desc = child->mm->context.ldt + (seg & ~7);
107 base = (desc[0] >> 16) | ((desc[1] & 0xff) << 16) | (desc[1] & 0xff000000);
108 106
109 /* 16-bit code segment? */ 107 down(&child->mm->context.sem);
110 if (!((desc[1] >> 22) & 1)) 108 if (unlikely((seg >> 3) >= child->mm->context.size))
111 addr &= 0xffff; 109 addr = -1L; /* bogus selector, access would fault */
112 addr += base; 110 else {
111 desc = child->mm->context.ldt + seg;
112 base = ((desc[0] >> 16) |
113 ((desc[1] & 0xff) << 16) |
114 (desc[1] & 0xff000000));
115
116 /* 16-bit code segment? */
117 if (!((desc[1] >> 22) & 1))
118 addr &= 0xffff;
119 addr += base;
120 }
113 up(&child->mm->context.sem); 121 up(&child->mm->context.sem);
114 } 122 }
123
115 return addr; 124 return addr;
116} 125}
117 126
@@ -313,17 +322,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
313 switch (request) { 322 switch (request) {
314 /* when I and D space are separate, these will need to be fixed. */ 323 /* when I and D space are separate, these will need to be fixed. */
315 case PTRACE_PEEKTEXT: /* read word at location addr. */ 324 case PTRACE_PEEKTEXT: /* read word at location addr. */
316 case PTRACE_PEEKDATA: { 325 case PTRACE_PEEKDATA:
317 unsigned long tmp; 326 ret = generic_ptrace_peekdata(child, addr, data);
318 int copied;
319
320 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
321 ret = -EIO;
322 if (copied != sizeof(tmp))
323 break;
324 ret = put_user(tmp,(unsigned long __user *) data);
325 break; 327 break;
326 }
327 328
328 /* read the word at location addr in the USER area. */ 329 /* read the word at location addr in the USER area. */
329 case PTRACE_PEEKUSR: { 330 case PTRACE_PEEKUSR: {
@@ -367,10 +368,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
367 /* when I and D space are separate, this will have to be fixed. */ 368 /* when I and D space are separate, this will have to be fixed. */
368 case PTRACE_POKETEXT: /* write the word at location addr. */ 369 case PTRACE_POKETEXT: /* write the word at location addr. */
369 case PTRACE_POKEDATA: 370 case PTRACE_POKEDATA:
370 ret = 0; 371 ret = generic_ptrace_pokedata(child, addr, data);
371 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
372 break;
373 ret = -EIO;
374 break; 372 break;
375 373
376 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ 374 case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index eb6524f3ac..33ef718f8c 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -846,6 +846,8 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
846 c->x86_capability[2] = cpuid_edx(0x80860001); 846 c->x86_capability[2] = cpuid_edx(0x80860001);
847 } 847 }
848 848
849 init_scattered_cpuid_features(c);
850
849 c->apicid = phys_pkg_id(0); 851 c->apicid = phys_pkg_id(0);
850 852
851 /* 853 /*
@@ -931,7 +933,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
931 "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", 933 "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce",
932 "cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov", 934 "cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov",
933 "pat", "pse36", "pn", "clflush", NULL, "dts", "acpi", "mmx", 935 "pat", "pse36", "pn", "clflush", NULL, "dts", "acpi", "mmx",
934 "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", NULL, 936 "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", "pbe",
935 937
936 /* AMD-defined */ 938 /* AMD-defined */
937 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 939 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -947,10 +949,11 @@ static int show_cpuinfo(struct seq_file *m, void *v)
947 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 949 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
948 950
949 /* Other (Linux-defined) */ 951 /* Other (Linux-defined) */
950 "cxmmx", NULL, "cyrix_arr", "centaur_mcr", NULL, 952 "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr",
951 "constant_tsc", NULL, NULL, 953 NULL, NULL, NULL, NULL,
952 "up", NULL, NULL, NULL, NULL, NULL, NULL, NULL, 954 "constant_tsc", "up", NULL, "arch_perfmon",
953 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 955 "pebs", "bts", NULL, "sync_rdtsc",
956 "rep_good", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
954 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 957 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
955 958
956 /* Intel-defined (#2) */ 959 /* Intel-defined (#2) */
@@ -961,7 +964,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
961 964
962 /* VIA/Cyrix/Centaur-defined */ 965 /* VIA/Cyrix/Centaur-defined */
963 NULL, NULL, "rng", "rng_en", NULL, NULL, "ace", "ace_en", 966 NULL, NULL, "rng", "rng_en", NULL, NULL, "ace", "ace_en",
964 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 967 "ace2", "ace2_en", "phe", "phe_en", "pmm", "pmm_en", NULL, NULL,
965 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 968 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
966 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 969 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
967 970
@@ -972,6 +975,12 @@ static int show_cpuinfo(struct seq_file *m, void *v)
972 "osvw", "ibs", NULL, NULL, NULL, NULL, 975 "osvw", "ibs", NULL, NULL, NULL, NULL,
973 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 976 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
974 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 977 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
978
979 /* Auxiliary (Linux-defined) */
980 "ida", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
981 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
982 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
983 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
975 }; 984 };
976 static char *x86_power_flags[] = { 985 static char *x86_power_flags[] = {
977 "ts", /* temperature sensor */ 986 "ts", /* temperature sensor */
diff --git a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c
index 2ff4685916..0694940b2e 100644
--- a/arch/x86_64/kernel/smp.c
+++ b/arch/x86_64/kernel/smp.c
@@ -357,7 +357,7 @@ __smp_call_function_single(int cpu, void (*func) (void *info), void *info,
357} 357}
358 358
359/* 359/*
360 * smp_call_function_single - Run a function on another CPU 360 * smp_call_function_single - Run a function on a specific CPU
361 * @func: The function to run. This must be fast and non-blocking. 361 * @func: The function to run. This must be fast and non-blocking.
362 * @info: An arbitrary pointer to pass to the function. 362 * @info: An arbitrary pointer to pass to the function.
363 * @nonatomic: Currently unused. 363 * @nonatomic: Currently unused.
@@ -374,14 +374,18 @@ int smp_call_function_single (int cpu, void (*func) (void *info), void *info,
374{ 374{
375 /* prevent preemption and reschedule on another processor */ 375 /* prevent preemption and reschedule on another processor */
376 int me = get_cpu(); 376 int me = get_cpu();
377
378 /* Can deadlock when called with interrupts disabled */
379 WARN_ON(irqs_disabled());
380
377 if (cpu == me) { 381 if (cpu == me) {
382 local_irq_disable();
383 func(info);
384 local_irq_enable();
378 put_cpu(); 385 put_cpu();
379 return 0; 386 return 0;
380 } 387 }
381 388
382 /* Can deadlock when called with interrupts disabled */
383 WARN_ON(irqs_disabled());
384
385 spin_lock_bh(&call_lock); 389 spin_lock_bh(&call_lock);
386 __smp_call_function_single(cpu, func, info, nonatomic, wait); 390 __smp_call_function_single(cpu, func, info, nonatomic, wait);
387 spin_unlock_bh(&call_lock); 391 spin_unlock_bh(&call_lock);
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
index aac1c0be54..74cbeb2e99 100644
--- a/arch/x86_64/kernel/traps.c
+++ b/arch/x86_64/kernel/traps.c
@@ -330,6 +330,7 @@ static int print_trace_stack(void *data, char *name)
330 330
331static void print_trace_address(void *data, unsigned long addr) 331static void print_trace_address(void *data, unsigned long addr)
332{ 332{
333 touch_nmi_watchdog();
333 printk_address(addr); 334 printk_address(addr);
334} 335}
335 336
@@ -518,6 +519,7 @@ void __kprobes __die(const char * str, struct pt_regs * regs, long err)
518 printk("\n"); 519 printk("\n");
519 notify_die(DIE_OOPS, str, regs, err, current->thread.trap_no, SIGSEGV); 520 notify_die(DIE_OOPS, str, regs, err, current->thread.trap_no, SIGSEGV);
520 show_registers(regs); 521 show_registers(regs);
522 add_taint(TAINT_DIE);
521 /* Executive summary in case the oops scrolled away */ 523 /* Executive summary in case the oops scrolled away */
522 printk(KERN_ALERT "RIP "); 524 printk(KERN_ALERT "RIP ");
523 printk_address(regs->rip); 525 printk_address(regs->rip);
@@ -531,7 +533,7 @@ void die(const char * str, struct pt_regs * regs, long err)
531 unsigned long flags = oops_begin(); 533 unsigned long flags = oops_begin();
532 534
533 if (!user_mode(regs)) 535 if (!user_mode(regs))
534 report_bug(regs->rip); 536 report_bug(regs->rip, regs);
535 537
536 __die(str, regs, err); 538 __die(str, regs, err);
537 oops_end(flags); 539 oops_end(flags);
diff --git a/arch/x86_64/kernel/verify_cpu.S b/arch/x86_64/kernel/verify_cpu.S
index e035f59481..45b6f8a975 100644
--- a/arch/x86_64/kernel/verify_cpu.S
+++ b/arch/x86_64/kernel/verify_cpu.S
@@ -37,20 +37,6 @@ verify_cpu:
37 pushl $0 # Kill any dangerous flags 37 pushl $0 # Kill any dangerous flags
38 popfl 38 popfl
39 39
40 /* minimum CPUID flags for x86-64 as defined by AMD */
41#define M(x) (1<<(x))
42#define M2(a,b) M(a)|M(b)
43#define M4(a,b,c,d) M(a)|M(b)|M(c)|M(d)
44
45#define SSE_MASK \
46 (M2(X86_FEATURE_XMM,X86_FEATURE_XMM2))
47#define REQUIRED_MASK1 \
48 (M4(X86_FEATURE_FPU,X86_FEATURE_PSE,X86_FEATURE_TSC,X86_FEATURE_MSR)|\
49 M4(X86_FEATURE_PAE,X86_FEATURE_CX8,X86_FEATURE_PGE,X86_FEATURE_CMOV)|\
50 M(X86_FEATURE_FXSR))
51#define REQUIRED_MASK2 \
52 (M(X86_FEATURE_LM - 32))
53
54 pushfl # standard way to check for cpuid 40 pushfl # standard way to check for cpuid
55 popl %eax 41 popl %eax
56 movl %eax,%ebx 42 movl %eax,%ebx
@@ -79,8 +65,8 @@ verify_cpu:
79verify_cpu_noamd: 65verify_cpu_noamd:
80 movl $0x1,%eax # Does the cpu have what it takes 66 movl $0x1,%eax # Does the cpu have what it takes
81 cpuid 67 cpuid
82 andl $REQUIRED_MASK1,%edx 68 andl $REQUIRED_MASK0,%edx
83 xorl $REQUIRED_MASK1,%edx 69 xorl $REQUIRED_MASK0,%edx
84 jnz verify_cpu_no_longmode 70 jnz verify_cpu_no_longmode
85 71
86 movl $0x80000000,%eax # See if extended cpuid is implemented 72 movl $0x80000000,%eax # See if extended cpuid is implemented
@@ -90,8 +76,8 @@ verify_cpu_noamd:
90 76
91 movl $0x80000001,%eax # Does the cpu have what it takes 77 movl $0x80000001,%eax # Does the cpu have what it takes
92 cpuid 78 cpuid
93 andl $REQUIRED_MASK2,%edx 79 andl $REQUIRED_MASK1,%edx
94 xorl $REQUIRED_MASK2,%edx 80 xorl $REQUIRED_MASK1,%edx
95 jnz verify_cpu_no_longmode 81 jnz verify_cpu_no_longmode
96 82
97verify_cpu_sse_test: 83verify_cpu_sse_test:
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c
index 14104ff630..06a13d9b69 100644
--- a/arch/xtensa/kernel/ptrace.c
+++ b/arch/xtensa/kernel/ptrace.c
@@ -50,18 +50,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
50 switch (request) { 50 switch (request) {
51 case PTRACE_PEEKTEXT: /* read word at location addr. */ 51 case PTRACE_PEEKTEXT: /* read word at location addr. */
52 case PTRACE_PEEKDATA: 52 case PTRACE_PEEKDATA:
53 { 53 ret = generic_ptrace_peekdata(child, addr, data);
54 unsigned long tmp;
55 int copied;
56
57 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
58 ret = -EIO;
59 if (copied != sizeof(tmp))
60 break;
61 ret = put_user(tmp,(unsigned long *) data);
62
63 goto out; 54 goto out;
64 }
65 55
66 /* Read the word at location addr in the USER area. */ 56 /* Read the word at location addr in the USER area. */
67 57
@@ -138,10 +128,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
138 128
139 case PTRACE_POKETEXT: /* write the word at location addr. */ 129 case PTRACE_POKETEXT: /* write the word at location addr. */
140 case PTRACE_POKEDATA: 130 case PTRACE_POKEDATA:
141 if (access_process_vm(child, addr, &data, sizeof(data), 1) 131 ret = generic_ptrace_pokedata(child, addr, data);
142 == sizeof(data))
143 break;
144 ret = -EIO;
145 goto out; 132 goto out;
146 133
147 case PTRACE_POKEUSR: 134 case PTRACE_POKEUSR:
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c
index 693ab26848..c5e62f9d9f 100644
--- a/arch/xtensa/kernel/traps.c
+++ b/arch/xtensa/kernel/traps.c
@@ -482,6 +482,7 @@ void die(const char * str, struct pt_regs * regs, long err)
482 if (!user_mode(regs)) 482 if (!user_mode(regs))
483 show_stack(NULL, (unsigned long*)regs->areg[1]); 483 show_stack(NULL, (unsigned long*)regs->areg[1]);
484 484
485 add_taint(TAINT_DIE);
485 spin_unlock_irq(&die_lock); 486 spin_unlock_irq(&die_lock);
486 487
487 if (in_interrupt()) 488 if (in_interrupt())