Merge branch 'for-2.6.25' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerp...
authorPaul Mackerras <paulus@samba.org>
Thu, 24 Jan 2008 04:29:14 +0000 (15:29 +1100)
committerPaul Mackerras <paulus@samba.org>
Thu, 24 Jan 2008 04:29:14 +0000 (15:29 +1100)
491 files changed:
Documentation/kernel-parameters.txt
Documentation/local_ops.txt
Documentation/networking/driver.txt
Documentation/networking/wavelan.txt
Documentation/nfsroot.txt
Documentation/watchdog/watchdog-api.txt
MAINTAINERS
Makefile
arch/.gitignore [new file with mode: 0644]
arch/alpha/math-emu/math.c
arch/arm/Kconfig
arch/arm/Kconfig.instrumentation [new file with mode: 0644]
arch/arm/mach-at91/board-ek.c
arch/arm/mach-omap1/board-fsample.c
arch/arm/mach-omap1/board-nokia770.c
arch/arm/mach-omap1/board-perseus2.c
arch/arm/mach-pxa/pxa25x.c
arch/arm/mach-pxa/sleep.S
arch/arm/vfp/vfp.h
arch/arm/vfp/vfpdouble.c
arch/blackfin/Kconfig
arch/cris/arch-v10/drivers/ds1302.c
arch/cris/arch-v10/kernel/io_interface_mux.c
arch/cris/arch-v10/kernel/signal.c
arch/cris/arch-v10/kernel/time.c
arch/cris/arch-v10/vmlinux.lds.S
arch/ia64/kernel/unaligned.c
arch/ia64/sn/kernel/xp_nofault.S
arch/mips/Kconfig
arch/mips/au1000/common/pci.c
arch/mips/cobalt/console.c
arch/mips/kernel/head.S
arch/mips/kernel/setup.c
arch/mips/kernel/time.c
arch/mips/lasat/image/Makefile
arch/mips/mips-boards/generic/memory.c
arch/mips/mips-boards/generic/reset.c
arch/mips/mips-boards/malta/malta_setup.c
arch/mips/mm/dma-default.c
arch/mips/pci/fixup-cobalt.c
arch/mips/pci/ops-au1000.c
arch/mips/pci/ops-mace.c
arch/mips/pci/pci-ip32.c
arch/mips/philips/pnx8550/common/time.c
arch/mips/sgi-ip32/ip32-irq.c
arch/mips/sgi-ip32/ip32-platform.c
arch/mips/tx4938/toshiba_rbtx4938/setup.c
arch/powerpc/Kconfig
arch/powerpc/boot/dts/cm5200.dts [new file with mode: 0644]
arch/powerpc/boot/dts/lite5200.dts
arch/powerpc/boot/dts/lite5200b.dts
arch/powerpc/boot/dts/motionpro.dts [new file with mode: 0644]
arch/powerpc/boot/dts/tqm5200.dts [new file with mode: 0644]
arch/powerpc/boot/flatdevtree_env.h
arch/powerpc/configs/mpc5200_defconfig [moved from arch/powerpc/configs/lite5200_defconfig with 58% similarity]
arch/powerpc/kernel/head_64.S
arch/powerpc/kernel/iommu.c
arch/powerpc/kernel/prom_init.c
arch/powerpc/mm/Makefile
arch/powerpc/mm/hash_low_64.S
arch/powerpc/mm/hash_utils_64.c
arch/powerpc/mm/slb.c
arch/powerpc/mm/subpage-prot.c [new file with mode: 0644]
arch/powerpc/platforms/52xx/Kconfig
arch/powerpc/platforms/52xx/Makefile
arch/powerpc/platforms/52xx/lite5200.c
arch/powerpc/platforms/52xx/lite5200_pm.c
arch/powerpc/platforms/52xx/mpc5200_simple.c [new file with mode: 0644]
arch/powerpc/platforms/52xx/mpc52xx_common.c
arch/powerpc/platforms/52xx/mpc52xx_pci.c
arch/powerpc/platforms/52xx/mpc52xx_pic.c
arch/powerpc/platforms/52xx/mpc52xx_pm.c
arch/powerpc/platforms/cell/Kconfig
arch/powerpc/platforms/cell/Makefile
arch/powerpc/platforms/cell/spu_notify.c [new file with mode: 0644]
arch/powerpc/platforms/cell/spu_syscalls.c
arch/powerpc/platforms/cell/spufs/context.c
arch/powerpc/platforms/cell/spufs/sched.c
arch/powerpc/platforms/cell/spufs/syscalls.c
arch/powerpc/platforms/ps3/os-area.c
arch/powerpc/platforms/pseries/hotplug-cpu.c
arch/sparc/kernel/ptrace.c
arch/sparc/kernel/time.c
arch/sparc64/kernel/ktlb.S
arch/sparc64/kernel/pci.c
arch/sparc64/kernel/pci_schizo.c
arch/sparc64/kernel/sun4v_tlb_miss.S
arch/sparc64/kernel/traps.c
arch/um/drivers/harddog_user.c
arch/x86/kernel/apm_32.c
arch/x86/kernel/head_32.S
arch/x86/kernel/hpet.c
arch/x86/kernel/io_apic_32.c
arch/x86/kernel/mfgpt_32.c
arch/x86/kernel/nmi_32.c
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c
arch/x86/kernel/smpboot_64.c
arch/x86/kernel/traps_32.c
arch/x86/kernel/traps_64.c
arch/x86/mm/init_32.c
arch/x86/oprofile/nmi_int.c
block/blktrace.c
drivers/acpi/Kconfig
drivers/acpi/ac.c
drivers/acpi/battery.c
drivers/acpi/bus.c
drivers/acpi/ec.c
drivers/acpi/events/evregion.c
drivers/acpi/pci_irq.c
drivers/acpi/processor_idle.c
drivers/acpi/sbs.c
drivers/acpi/scan.c
drivers/ata/ata_piix.c
drivers/ata/libata-core.c
drivers/ata/libata-eh.c
drivers/ata/libata-pmp.c
drivers/ata/libata-scsi.c
drivers/ata/libata-sff.c
drivers/ata/pata_bf54x.c
drivers/ata/pata_ixp4xx_cf.c
drivers/ata/pata_legacy.c
drivers/ata/pata_pdc202xx_old.c
drivers/ata/pata_qdi.c
drivers/ata/pata_winbond.c
drivers/ata/sata_qstor.c
drivers/ata/sata_sil24.c
drivers/atm/firestream.c
drivers/atm/idt77105.c
drivers/atm/nicstar.c
drivers/atm/suni.c
drivers/block/cciss.c
drivers/block/loop.c
drivers/bluetooth/hci_ll.c
drivers/char/Kconfig
drivers/char/tpm/tpm.c
drivers/char/tty_ioctl.c
drivers/connector/cn_queue.c
drivers/connector/connector.c
drivers/cpufreq/cpufreq_conservative.c
drivers/cpufreq/cpufreq_ondemand.c
drivers/cpufreq/cpufreq_userspace.c
drivers/crypto/padlock-aes.c
drivers/firmware/dmi-id.c
drivers/hwmon/it87.c
drivers/hwmon/w83627ehf.c
drivers/i2c/busses/i2c-at91.c
drivers/i2c/busses/i2c-omap.c
drivers/i2c/busses/i2c-powermac.c
drivers/i2c/busses/i2c-sibyte.c
drivers/i2c/i2c-dev.c
drivers/ide/ide-acpi.c
drivers/ide/ide-cd.c
drivers/ide/ide-cd.h
drivers/ide/ide-iops.c
drivers/ide/pci/cmd64x.c
drivers/ide/pci/cs5535.c
drivers/ide/pci/trm290.c
drivers/infiniband/hw/ipath/ipath_ud.c
drivers/infiniband/hw/mlx4/cq.c
drivers/infiniband/ulp/srp/ib_srp.c
drivers/input/gameport/gameport.c
drivers/input/input.c
drivers/input/keyboard/Kconfig
drivers/input/keyboard/jornada680_kbd.c
drivers/input/keyboard/spitzkbd.c
drivers/input/mouse/alps.c
drivers/input/mouse/lifebook.c
drivers/input/mouse/psmouse-base.c
drivers/input/mousedev.c
drivers/input/touchscreen/Kconfig
drivers/input/touchscreen/usbtouchscreen.c
drivers/isdn/i4l/isdn_common.c
drivers/isdn/i4l/isdn_tty.c
drivers/leds/led-class.c
drivers/leds/led-core.c
drivers/leds/led-triggers.c
drivers/leds/leds-locomo.c
drivers/leds/leds.h
drivers/lguest/Kconfig
drivers/macintosh/adbhid.c
drivers/md/raid5.c
drivers/media/dvb/ttpci/av7110.c
drivers/media/video/bt8xx/bttv-driver.c
drivers/media/video/cx23885/Kconfig
drivers/media/video/ivtv/ivtv-i2c.c
drivers/media/video/saa7134/saa7134-core.c
drivers/mtd/chips/cfi_cmdset_0001.c
drivers/net/3c509.c
drivers/net/3c515.c
drivers/net/Kconfig
drivers/net/atl1/atl1_main.c
drivers/net/bonding/bond_alb.c
drivers/net/bonding/bond_main.c
drivers/net/bonding/bond_sysfs.c
drivers/net/bonding/bonding.h
drivers/net/cassini.c
drivers/net/cassini.h
drivers/net/cpmac.c
drivers/net/dl2k.c
drivers/net/dl2k.h
drivers/net/e100.c
drivers/net/e1000/e1000_main.c
drivers/net/e1000e/netdev.c
drivers/net/epic100.c
drivers/net/fec_8xx/fec_main.c
drivers/net/fec_mpc52xx.c
drivers/net/forcedeth.c
drivers/net/fs_enet/fs_enet-main.c
drivers/net/ipg.c
drivers/net/ixgb/ixgb_main.c
drivers/net/ixgbe/ixgbe_main.c
drivers/net/ixp2000/ixpdev.c
drivers/net/loopback.c
drivers/net/macb.c
drivers/net/macvlan.c
drivers/net/meth.c
drivers/net/myri10ge/myri10ge.c
drivers/net/natsemi.c
drivers/net/netx-eth.c
drivers/net/netxen/netxen_nic.h
drivers/net/netxen/netxen_nic_init.c
drivers/net/netxen/netxen_nic_main.c
drivers/net/netxen/netxen_nic_niu.c
drivers/net/niu.c
drivers/net/niu.h
drivers/net/pcmcia/3c574_cs.c
drivers/net/pcmcia/3c589_cs.c
drivers/net/pcnet32.c
drivers/net/qla3xxx.c
drivers/net/r8169.c
drivers/net/rrunner.c
drivers/net/rrunner.h
drivers/net/s2io.c
drivers/net/sky2.c
drivers/net/sky2.h
drivers/net/tc35815.c
drivers/net/tg3.c
drivers/net/tokenring/3c359.c
drivers/net/tokenring/3c359.h
drivers/net/tulip/de4x5.c
drivers/net/tulip/interrupt.c
drivers/net/tulip/tulip_core.c
drivers/net/tulip/xircom_cb.c
drivers/net/tun.c
drivers/net/typhoon.c
drivers/net/typhoon.h
drivers/net/usb/asix.c
drivers/net/usb/kaweth.c
drivers/net/usb/mcs7830.c
drivers/net/veth.c
drivers/net/wan/cycx_x25.c
drivers/net/wan/dscc4.c
drivers/net/wan/lmc/lmc_media.c
drivers/net/wan/sbni.h
drivers/net/wireless/Kconfig
drivers/net/wireless/b43/b43.h
drivers/net/wireless/b43/main.h
drivers/net/wireless/b43/rfkill.c
drivers/net/wireless/b43/xmit.c
drivers/net/wireless/b43/xmit.h
drivers/net/wireless/hostap/hostap_plx.c
drivers/net/wireless/ipw2200.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/iwlwifi/iwl4965-base.c
drivers/net/wireless/libertas/if_sdio.c
drivers/net/wireless/rt2x00/rt2500usb.c
drivers/net/wireless/rt2x00/rt2x00pci.c
drivers/net/wireless/rt2x00/rt2x00usb.c
drivers/net/wireless/rt2x00/rt61pci.c
drivers/net/wireless/rtl8187_dev.c
drivers/net/xen-netfront.c
drivers/net/yellowfin.c
drivers/pci/probe.c
drivers/pci/quirks.c
drivers/pcmcia/pxa2xx_lubbock.c
drivers/pnp/pnpacpi/rsparser.c
drivers/ps3/ps3-vuart.c
drivers/scsi/Kconfig
drivers/scsi/advansys.c
drivers/scsi/qla1280.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_priv.h
drivers/scsi/scsi_sysfs.c
drivers/scsi/scsi_transport_srp.c
drivers/serial/mpc52xx_uart.c
drivers/serial/suncore.c
drivers/spi/mpc52xx_psc_spi.c
drivers/spi/spi_bitbang.c
drivers/ssb/scan.c
drivers/usb/gadget/fsl_usb2_udc.c
drivers/usb/serial/cp2101.c
drivers/usb/serial/keyspan.c
drivers/usb/serial/pl2303.c
drivers/usb/serial/sierra.c
drivers/video/atmel_lcdfb.c
drivers/video/modedb.c
drivers/video/ps3fb.c
drivers/video/s3c2410fb.c
drivers/video/uvesafb.c
drivers/w1/slaves/w1_therm.c
drivers/w1/w1.c
drivers/watchdog/w83697hf_wdt.c
fs/Kconfig
fs/binfmt_elf.c
fs/compat_ioctl.c
fs/dquot.c
fs/ecryptfs/crypto.c
fs/ecryptfs/inode.c
fs/ecryptfs/main.c
fs/ecryptfs/messaging.c
fs/ecryptfs/super.c
fs/fat/fatent.c
fs/fs-writeback.c
fs/hfs/bfind.c
fs/hfs/brec.c
fs/hfs/btree.c
fs/hfs/hfs.h
fs/jbd/transaction.c
fs/namei.c
fs/nfs/nfs4_fs.h
fs/nfs/nfs4proc.c
fs/nfs/nfs4renewd.c
fs/nfs/nfs4state.c
fs/nfs/super.c
fs/nfsd/nfs3xdr.c
fs/nfsd/nfsxdr.c
fs/proc/array.c
fs/proc/base.c
fs/proc/internal.h
fs/proc/proc_misc.c
fs/proc/task_mmu.c
fs/proc/task_nommu.c
fs/sysfs/dir.c
fs/xfs/linux-2.6/xfs_file.c
include/asm-arm/arch-pxa/hardware.h
include/asm-arm/system.h
include/asm-cris/page.h
include/asm-cris/unistd.h
include/asm-generic/tlb.h
include/asm-ia64/sn/xpc.h
include/asm-mips/cacheops.h
include/asm-mips/smtc_ipi.h
include/asm-powerpc/mmu-hash64.h
include/asm-powerpc/mpc52xx.h
include/asm-powerpc/mpc52xx_psc.h
include/asm-powerpc/pgalloc-64.h
include/asm-powerpc/pgtable-64k.h
include/asm-powerpc/spu.h
include/asm-powerpc/systbl.h
include/asm-powerpc/unistd.h
include/asm-ppc/mpc52xx_psc.h
include/asm-sh/cacheflush.h
include/asm-sh/uaccess.h
include/asm-sparc64/dma-mapping.h
include/asm-sparc64/pci.h
include/asm-x86/byteorder.h
include/asm-x86/msr.h
include/linux/Kbuild
include/linux/ata.h
include/linux/cpu.h
include/linux/cpumask.h
include/linux/i2c-id.h
include/linux/key.h
include/linux/netdevice.h
include/linux/pci_ids.h
include/linux/pm.h
include/linux/pm_legacy.h
include/linux/pnp.h
include/linux/ptrace.h
include/linux/quicklist.h
include/linux/scatterlist.h
include/linux/sched.h
include/linux/slab.h
include/linux/slab_def.h
include/linux/tc_act/Kbuild
include/linux/tty.h
include/linux/veth.h [moved from include/net/veth.h with 100% similarity]
include/linux/workqueue.h
include/linux/writeback.h
include/net/ax25.h
include/net/ip6_tunnel.h
include/net/irda/discovery.h
include/net/netfilter/nf_conntrack.h
include/net/sch_generic.h
include/net/sctp/structs.h
include/net/sctp/user.h
include/net/sock.h
include/net/xfrm.h
init/Kconfig
kernel/acct.c
kernel/futex.c
kernel/hrtimer.c
kernel/kexec.c
kernel/kmod.c
kernel/lockdep.c
kernel/module.c
kernel/params.c
kernel/power/main.c
kernel/power/pm.c
kernel/printk.c
kernel/ptrace.c
kernel/rcupdate.c
kernel/sched.c
kernel/sched_debug.c
kernel/sys_ni.c
kernel/timer.c
kernel/workqueue.c
lib/proportions.c
mm/filemap_xip.c
mm/hugetlb.c
mm/memory.c
mm/page-writeback.c
mm/page_alloc.c
mm/quicklist.c
mm/slab.c
mm/slub.c
net/802/tr.c
net/8021q/vlan.c
net/atm/mpc.c
net/ax25/af_ax25.c
net/ax25/ax25_in.c
net/bluetooth/hci_conn.c
net/bluetooth/hci_sysfs.c
net/bluetooth/rfcomm/tty.c
net/bridge/br_netfilter.c
net/compat.c
net/core/dev.c
net/core/rtnetlink.c
net/core/scm.c
net/core/skbuff.c
net/dccp/ackvec.h
net/dccp/ccids/ccid3.c
net/decnet/dn_route.c
net/ipv4/arp.c
net/ipv4/devinet.c
net/ipv4/fib_frontend.c
net/ipv4/fib_hash.c
net/ipv4/fib_trie.c
net/ipv4/icmp.c
net/ipv4/inet_lro.c
net/ipv4/ip_gre.c
net/ipv4/ipconfig.c
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
net/ipv4/netfilter/nf_nat_sip.c
net/ipv4/raw.c
net/ipv4/route.c
net/ipv4/tcp_input.c
net/ipv6/datagram.c
net/ipv6/icmp.c
net/ipv6/inet6_hashtables.c
net/ipv6/ndisc.c
net/ipv6/netfilter/ip6t_eui64.c
net/ipv6/proc.c
net/ipv6/route.c
net/irda/af_irda.c
net/irda/ircomm/ircomm_param.c
net/irda/irlan/irlan_eth.c
net/irda/irlap_frame.c
net/irda/parameters.c
net/irda/wrapper.c
net/key/af_key.c
net/mac80211/ieee80211.c
net/mac80211/ieee80211_ioctl.c
net/mac80211/ieee80211_rate.c
net/mac80211/ieee80211_sta.c
net/mac80211/rx.c
net/mac80211/sta_info.c
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_sip.c
net/netfilter/xt_helper.c
net/netlabel/netlabel_mgmt.c
net/netrom/nr_dev.c
net/rfkill/rfkill.c
net/sched/sch_hfsc.c
net/sctp/sm_make_chunk.c
net/sctp/sm_statefuns.c
net/sctp/ulpevent.c
net/sunrpc/auth_gss/auth_gss.c
net/x25/x25_forward.c
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_state.c
net/xfrm/xfrm_user.c
scripts/kconfig/conf.c
security/commoncap.c
security/selinux/netlabel.c
security/selinux/ss/services.c
sound/core/oss/mixer_oss.c
sound/oss/Kconfig
sound/oss/msnd.h

index 2fc1fb896afce11e356860462b3372a6e802a4d1..db122df5e77debb1aae836334ca2b7de90c870c9 100644 (file)
@@ -527,29 +527,30 @@ and is between 256 and 4096 characters. It is defined in the file
                        Format: <area>[,<node>]
                        See also Documentation/networking/decnet.txt.
 
-       default_blu=    [VT]
+       vt.default_blu= [VT]
                        Format: <blue0>,<blue1>,<blue2>,...,<blue15>
                        Change the default blue palette of the console.
                        This is a 16-member array composed of values
                        ranging from 0-255.
 
-       default_grn=    [VT]
+       vt.default_grn= [VT]
                        Format: <green0>,<green1>,<green2>,...,<green15>
                        Change the default green palette of the console.
                        This is a 16-member array composed of values
                        ranging from 0-255.
 
-       default_red=    [VT]
+       vt.default_red= [VT]
                        Format: <red0>,<red1>,<red2>,...,<red15>
                        Change the default red palette of the console.
                        This is a 16-member array composed of values
                        ranging from 0-255.
 
-       default_utf8=   [VT]
+       vt.default_utf8=
+                       [VT]
                        Format=<0|1>
                        Set system-wide default UTF-8 mode for all tty's.
-                       Default is 0 and by setting to 1, it enables UTF-8
-                       mode for all newly opened or allocated terminals.
+                       Default is 1, i.e. UTF-8 mode is enabled for all
+                       newly opened terminals.
 
        dhash_entries=  [KNL]
                        Set number of hash buckets for dentry cache.
@@ -883,6 +884,14 @@ and is between 256 and 4096 characters. It is defined in the file
        lapic_timer_c2_ok       [X86-32,x86-64,APIC] trust the local apic timer in
                        C2 power state.
 
+       libata.dma=     [LIBATA] DMA control
+                       libata.dma=0      Disable all PATA and SATA DMA
+                       libata.dma=1      PATA and SATA Disk DMA only
+                       libata.dma=2      ATAPI (CDROM) DMA only
+                       libata.dma=4      Compact Flash DMA only 
+                       Combinations also work, so libata.dma=3 enables DMA
+                       for disks and CDROMs, but not CFs.
+
        libata.noacpi   [LIBATA] Disables use of ACPI in libata suspend/resume
                        when set.
                        Format: <int>
index 1a45f11e645e978f445ba7396f0c5411a1695e06..4269a1105b378fafcc689435a2531b9d9d4287db 100644 (file)
@@ -45,29 +45,6 @@ long fails. The definition looks like :
 typedef struct { atomic_long_t a; } local_t;
 
 
-* Rules to follow when using local atomic operations
-
-- Variables touched by local ops must be per cpu variables.
-- _Only_ the CPU owner of these variables must write to them.
-- This CPU can use local ops from any context (process, irq, softirq, nmi, ...)
-  to update its local_t variables.
-- Preemption (or interrupts) must be disabled when using local ops in
-  process context to   make sure the process won't be migrated to a
-  different CPU between getting the per-cpu variable and doing the
-  actual local op.
-- When using local ops in interrupt context, no special care must be
-  taken on a mainline kernel, since they will run on the local CPU with
-  preemption already disabled. I suggest, however, to explicitly
-  disable preemption anyway to make sure it will still work correctly on
-  -rt kernels.
-- Reading the local cpu variable will provide the current copy of the
-  variable.
-- Reads of these variables can be done from any CPU, because updates to
-  "long", aligned, variables are always atomic. Since no memory
-  synchronization is done by the writer CPU, an outdated copy of the
-  variable can be read when reading some _other_ cpu's variables.
-
-
 * Rules to follow when using local atomic operations
 
 - Variables touched by local ops must be per cpu variables.
index 4f7da5a2bf4f8ce7c3300f49fae7e073cdf51380..ea72d2e66ca81a62fa493b695ed0e5cf94fc92a4 100644 (file)
@@ -61,7 +61,10 @@ Transmit path guidelines:
 2) Do not forget to update netdev->trans_start to jiffies after
    each new tx packet is given to the hardware.
 
-3) Do not forget that once you return 0 from your hard_start_xmit
+3) A hard_start_xmit method must not modify the shared parts of a
+   cloned SKB.
+
+4) Do not forget that once you return 0 from your hard_start_xmit
    method, it is your driver's responsibility to free up the SKB
    and in some finite amount of time.
 
index c1acf5eb3712a4b03d0be47e2bf31f2cd6793a33..afa6e521c685812591f1ec6770c00439b814d940 100644 (file)
@@ -12,8 +12,8 @@ and many Linux driver to support it.
 "wavelan" driver (old ISA Wavelan)
 ----------------
        o Config :      Network device -> Wireless LAN -> AT&T WaveLAN
-       o Location :    .../drivers/net/wavelan*
-       o in-line doc : .../drivers/net/wavelan.p.h
+       o Location :    .../drivers/net/wireless/wavelan*
+       o in-line doc : .../drivers/net/wireless/wavelan.p.h
        o on-line doc :
            http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wavelan.html
 
index 9b956a96936204c19545a3871b42b949a48a842a..31b329172343546e8f1e1fb4a30549298d45ee68 100644 (file)
@@ -97,10 +97,6 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
   autoconfiguration will take place.  The most common way to use this
   is "ip=dhcp".
 
-  Note that "ip=off" is not the same thing as "ip=::::::off", because in
-  the latter autoconfiguration will take place if any of DHCP, BOOTP or RARP
-  are compiled in the kernel.
-
   <client-ip>  IP address of the client.
 
                Default:  Determined using autoconfiguration.
@@ -149,7 +145,9 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
                this option.
 
                   off or none: don't use autoconfiguration
+                               (do static IP assignment instead)
                  on or any:   use any protocol available in the kernel
+                              (default)
                  dhcp:        use DHCP
                  bootp:       use BOOTP
                  rarp:        use RARP
index bb7cb1d31ec70f3424e41e7b99b15c0ce5dbc87a..4cc4ba9d71500a4b5dd55b70ed9f54dc099b4ddd 100644 (file)
@@ -42,23 +42,27 @@ like this source file:  see Documentation/watchdog/src/watchdog-simple.c
 A more advanced driver could for example check that a HTTP server is
 still responding before doing the write call to ping the watchdog.
 
-When the device is closed, the watchdog is disabled.  This is not
-always such a good idea, since if there is a bug in the watchdog
-daemon and it crashes the system will not reboot.  Because of this,
-some of the drivers support the configuration option "Disable watchdog
-shutdown on close", CONFIG_WATCHDOG_NOWAYOUT.  If it is set to Y when
-compiling the kernel, there is no way of disabling the watchdog once
-it has been started.  So, if the watchdog daemon crashes, the system
-will reboot after the timeout has passed. Watchdog devices also usually
-support the nowayout module parameter so that this option can be controlled
-at runtime.
-
-Drivers will not disable the watchdog, unless a specific magic character 'V'
-has been sent /dev/watchdog just before closing the file.  If the userspace
-daemon closes the file without sending this special character, the driver
-will assume that the daemon (and userspace in general) died, and will stop
-pinging the watchdog without disabling it first.  This will then cause a
-reboot if the watchdog is not re-opened in sufficient time.
+When the device is closed, the watchdog is disabled, unless the "Magic
+Close" feature is supported (see below).  This is not always such a
+good idea, since if there is a bug in the watchdog daemon and it
+crashes the system will not reboot.  Because of this, some of the
+drivers support the configuration option "Disable watchdog shutdown on
+close", CONFIG_WATCHDOG_NOWAYOUT.  If it is set to Y when compiling
+the kernel, there is no way of disabling the watchdog once it has been
+started.  So, if the watchdog daemon crashes, the system will reboot
+after the timeout has passed. Watchdog devices also usually support
+the nowayout module parameter so that this option can be controlled at
+runtime.
+
+Magic Close feature:
+
+If a driver supports "Magic Close", the driver will not disable the
+watchdog unless a specific magic character 'V' has been sent to
+/dev/watchdog just before closing the file.  If the userspace daemon
+closes the file without sending this special character, the driver
+will assume that the daemon (and userspace in general) died, and will
+stop pinging the watchdog without disabling it first.  This will then
+cause a reboot if the watchdog is not re-opened in sufficient time.
 
 The ioctl API:
 
index 3c7db6222f86c9c83653533004648988c1e42c1f..2340cfb1e25d3d361e7fab799f23249fc124a245 100644 (file)
@@ -665,12 +665,18 @@ S:        Maintained
 
 ATMEL AT91 MCI DRIVER
 P:     Nicolas Ferre
-M:     nicolas.ferre@rfo.atmel.com
+M:     nicolas.ferre@atmel.com
 L:     linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
 W:     http://www.atmel.com/products/AT91/
 W:     http://www.at91.com/
 S:     Maintained
 
+ATMEL LCDFB DRIVER
+P:     Nicolas Ferre
+M:     nicolas.ferre@atmel.com
+L:     linux-fbdev-devel@lists.sourceforge.net (subscribers-only)
+S:     Maintained
+
 ATMEL MACB ETHERNET DRIVER
 P:     Haavard Skinnemoen
 M:     hskinnemoen@atmel.com
@@ -1870,8 +1876,10 @@ T:       quilt kernel.org/pub/linux/kernel/people/bart/pata-2.6/
 S:     Maintained
 
 IDE/ATAPI CDROM DRIVER
+P:     Borislav Petkov
+M:     bbpetkov@yahoo.de
 L:     linux-ide@vger.kernel.org
-S:     Unmaintained
+S:     Maintained
 
 IDE/ATAPI FLOPPY DRIVERS
 P:     Paul Bristow
@@ -1917,7 +1925,7 @@ INFINIBAND SUBSYSTEM
 P:     Roland Dreier
 M:     rolandd@cisco.com
 P:     Sean Hefty
-M:     mshefty@ichips.intel.com
+M:     sean.hefty@intel.com
 P:     Hal Rosenstock
 M:     hal.rosenstock@gmail.com 
 L:     general@lists.openfabrics.org
@@ -1982,29 +1990,27 @@ L:      netdev@vger.kernel.org
 S:     Maintained
 
 INTEL PRO/100 ETHERNET SUPPORT
-P:     John Ronciak
-M:     john.ronciak@intel.com
+P:     Auke Kok
+M:     auke-jan.h.kok@intel.com
 P:     Jesse Brandeburg
 M:     jesse.brandeburg@intel.com
 P:     Jeff Kirsher
 M:     jeffrey.t.kirsher@intel.com
-P:     Auke Kok
-M:     auke-jan.h.kok@intel.com
+P:     John Ronciak
+M:     john.ronciak@intel.com
 L:     e1000-devel@lists.sourceforge.net
 W:     http://sourceforge.net/projects/e1000/
 S:     Supported
 
 INTEL PRO/1000 GIGABIT ETHERNET SUPPORT
-P:     Jeb Cramer
-M:     cramerj@intel.com
-P:     John Ronciak
-M:     john.ronciak@intel.com
+P:     Auke Kok
+M:     auke-jan.h.kok@intel.com
 P:     Jesse Brandeburg
 M:     jesse.brandeburg@intel.com
 P:     Jeff Kirsher
 M:     jeffrey.t.kirsher@intel.com
-P:     Auke Kok
-M:     auke-jan.h.kok@intel.com
+P:     John Ronciak
+M:     john.ronciak@intel.com
 L:     e1000-devel@lists.sourceforge.net
 W:     http://sourceforge.net/projects/e1000/
 S:     Supported
@@ -2029,7 +2035,7 @@ P:        James Ketrenos
 M:     jketreno@linux.intel.com
 L:     linux-wireless@vger.kernel.org
 L:     ipw2100-devel@lists.sourceforge.net
-L:     http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
+W:     http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
 W:     http://ipw2100.sourceforge.net
 S:     Supported
 
@@ -2040,7 +2046,7 @@ P:        James Ketrenos
 M:     jketreno@linux.intel.com
 L:     linux-wireless@vger.kernel.org
 L:     ipw2100-devel@lists.sourceforge.net
-L:     http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
+W:     http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
 W:     http://ipw2200.sourceforge.net
 S:     Supported
 
@@ -2597,7 +2603,7 @@ S:        Maintained
 MSI LAPTOP SUPPORT
 P:     Lennart Poettering
 M:     mzxreary@0pointer.de
-L:     https://tango.0pointer.de/mailman/listinfo/s270-linux
+W:     https://tango.0pointer.de/mailman/listinfo/s270-linux
 W:     http://0pointer.de/lennart/tchibo.html
 S:     Maintained
 
@@ -2739,8 +2745,8 @@ T:        git kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.git
 S:     Maintained
 
 NETXEN (1/10) GbE SUPPORT
-P:     Amit S. Kale
-M:     amitkale@netxen.com
+P:     Dhananjay Phadke
+M:     dhananjay@netxen.com
 L:     netdev@vger.kernel.org
 W:     http://www.netxen.com
 S:     Supported
@@ -3611,8 +3617,10 @@ L:       linux-kernel@vger.kernel.org ?
 S:     Supported
 
 SPIDERNET NETWORK DRIVER for CELL
-P:     Linas Vepstas
-M:     linas@austin.ibm.com
+P:     Ishizaki Kou
+M:     kou.ishizaki@toshiba.co.jp
+P:     Jens Osterkamp
+M:     jens@de.ibm.com
 L:     netdev@vger.kernel.org
 S:     Supported
 
@@ -4054,6 +4062,14 @@ L:       user-mode-linux-user@lists.sourceforge.net
 W:     http://user-mode-linux.sourceforge.net
 S:     Maintained
 
+USERSPACE I/O (UIO)
+P:     Hans J. Koch
+M:     hjk@linutronix.de
+P:     Greg Kroah-Hartman
+M:     gregkh@suse.de
+L:     linux-kernel@vger.kernel.org
+S:     Maintained
+
 FAT/VFAT/MSDOS FILESYSTEM:
 P:     OGAWA Hirofumi
 M:     hirofumi@mail.parknet.co.jp
index fbb8dfc063d36070bc8b3336e7f696d0b15d3d61..ce641ebee25ab7f2872ce064f5748c2bef0359df 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 24
-EXTRAVERSION = -rc6
+EXTRAVERSION = -rc8
 NAME = Arr Matey! A Hairy Bilge Rat!
 
 # *DOCUMENTATION*
@@ -12,7 +12,7 @@ NAME = Arr Matey! A Hairy Bilge Rat!
 
 # Do not:
 # o  use make's built-in rules and variables
-#    (this increases performance and avoid hard-to-debug behavour);
+#    (this increases performance and avoids hard-to-debug behaviour);
 # o  print "Entering directory ...";
 MAKEFLAGS += -rR --no-print-directory
 
@@ -1329,7 +1329,7 @@ else
 ALLINCLUDE_ARCHS := $(SRCARCH)
 endif
 else
-#Allow user to specify only ALLSOURCE_PATHS on the command line, keeping existing behavour.
+#Allow user to specify only ALLSOURCE_PATHS on the command line, keeping existing behaviour.
 ALLINCLUDE_ARCHS := $(ALLSOURCE_ARCHS)
 endif
 
diff --git a/arch/.gitignore b/arch/.gitignore
new file mode 100644 (file)
index 0000000..7414689
--- /dev/null
@@ -0,0 +1,2 @@
+i386
+x86_64
index ae79dd970b021ff84ca59d3b5f6b14a4b19ce25f..58c2669a1dd4fa431f32ecbe8416c24a540525ba 100644 (file)
@@ -225,7 +225,7 @@ alpha_fp_emul (unsigned long pc)
                                FP_UNPACK_SP(SB, &vb);
                                DR_c = DB_c;
                                DR_s = DB_s;
-                               DR_e = DB_e;
+                               DR_e = DB_e + (1024 - 128);
                                DR_f = SB_f << (52 - 23);
                                goto pack_d;
                        }
index c4de2d4664d7d504fd63715fb84ec7450ac53496..a04f507e7f2ca94f1b959d0e03dac7f0a3c73575 100644 (file)
@@ -1072,11 +1072,13 @@ source "drivers/rtc/Kconfig"
 
 source "drivers/dma/Kconfig"
 
+source "drivers/dca/Kconfig"
+
 endmenu
 
 source "fs/Kconfig"
 
-source "kernel/Kconfig.instrumentation"
+source "arch/arm/Kconfig.instrumentation"
 
 source "arch/arm/Kconfig.debug"
 
diff --git a/arch/arm/Kconfig.instrumentation b/arch/arm/Kconfig.instrumentation
new file mode 100644 (file)
index 0000000..63b8c6d
--- /dev/null
@@ -0,0 +1,52 @@
+menuconfig INSTRUMENTATION
+       bool "Instrumentation Support"
+       default y
+       ---help---
+         Say Y here to get to see options related to performance measurement,
+         system-wide debugging, and testing. This option alone does not add any
+         kernel code.
+
+         If you say N, all options in this submenu will be skipped and
+         disabled. If you're trying to debug the kernel itself, go see the
+         Kernel Hacking menu.
+
+if INSTRUMENTATION
+
+config PROFILING
+       bool "Profiling support (EXPERIMENTAL)"
+       help
+         Say Y here to enable the extended profiling support mechanisms used
+         by profilers such as OProfile.
+
+config OPROFILE
+       tristate "OProfile system profiling (EXPERIMENTAL)"
+       depends on PROFILING && !UML
+       help
+         OProfile is a profiling system capable of profiling the
+         whole system, include the kernel, kernel modules, libraries,
+         and applications.
+
+         If unsure, say N.
+
+config OPROFILE_ARMV6
+       bool
+       depends on OPROFILE && CPU_V6 && !SMP
+       default y
+       select OPROFILE_ARM11_CORE
+
+config OPROFILE_MPCORE
+       bool
+       depends on OPROFILE && CPU_V6 && SMP
+       default y
+       select OPROFILE_ARM11_CORE
+
+config OPROFILE_ARM11_CORE
+       bool
+
+config MARKERS
+       bool "Activate markers"
+       help
+         Place an empty function call at each marker site. Can be
+         dynamically changed for a probe function.
+
+endif # INSTRUMENTATION
index d05b1b2be9fbe34fd70a0c2912a8372f999f13bc..53a5ef9e72eeec7844007282896002f0e0f8552e 100644 (file)
@@ -109,6 +109,15 @@ static struct spi_board_info ek_spi_devices[] = {
 #endif
 };
 
+static struct i2c_board_info __initdata ek_i2c_devices[] = {
+       {
+               I2C_BOARD_INFO("ics1523", 0x26),
+       },
+       {
+               I2C_BOARD_INFO("dac3550", 0x4d),
+       }
+};
+
 #define EK_FLASH_BASE  AT91_CHIPSELECT_0
 #define EK_FLASH_SIZE  0x200000
 
index f65baa95986ea9717632690404dd77c47a1cc1c5..d5f6ea14fc7bdf241cbc9f26568d0abc3ac57e03 100644 (file)
@@ -40,31 +40,29 @@ static int fsample_keymap[] = {
        KEY(0,1,KEY_RIGHT),
        KEY(0,2,KEY_LEFT),
        KEY(0,3,KEY_DOWN),
-       KEY(0,4,KEY_CENTER),
-       KEY(0,5,KEY_0_5),
-       KEY(1,0,KEY_SOFT2),
+       KEY(0,4,KEY_ENTER),
+       KEY(1,0,KEY_F10),
        KEY(1,1,KEY_SEND),
        KEY(1,2,KEY_END),
        KEY(1,3,KEY_VOLUMEDOWN),
        KEY(1,4,KEY_VOLUMEUP),
        KEY(1,5,KEY_RECORD),
-       KEY(2,0,KEY_SOFT1),
+       KEY(2,0,KEY_F9),
        KEY(2,1,KEY_3),
        KEY(2,2,KEY_6),
        KEY(2,3,KEY_9),
-       KEY(2,4,KEY_SHARP),
-       KEY(2,5,KEY_2_5),
+       KEY(2,4,KEY_KPDOT),
        KEY(3,0,KEY_BACK),
        KEY(3,1,KEY_2),
        KEY(3,2,KEY_5),
        KEY(3,3,KEY_8),
        KEY(3,4,KEY_0),
-       KEY(3,5,KEY_HEADSETHOOK),
+       KEY(3,5,KEY_KPSLASH),
        KEY(4,0,KEY_HOME),
        KEY(4,1,KEY_1),
        KEY(4,2,KEY_4),
        KEY(4,3,KEY_7),
-       KEY(4,4,KEY_STAR),
+       KEY(4,4,KEY_KPASTERISK),
        KEY(4,5,KEY_POWER),
        0
 };
index 22db19a536478d3ad9f9a5ee1b96ad567f776ab2..182a98a9df4c9e33cd55169bdae113d01daed629 100644 (file)
@@ -36,8 +36,6 @@
 #include <asm/arch/omapfb.h>
 #include <asm/arch/lcd_mipid.h>
 
-#include "../plat-omap/dsp/dsp_common.h"
-
 #define ADS7846_PENDOWN_GPIO   15
 
 static void __init omap_nokia770_init_irq(void)
@@ -318,6 +316,8 @@ static __init int omap_dsp_init(void)
  out:
        return ret;
 }
+#else
+#define omap_dsp_init()                do {} while (0)
 #endif /* CONFIG_OMAP_DSP */
 
 static void __init omap_nokia770_init(void)
index 1d5c8d5097222ad1289b4edf8664febb66434b61..e44437e10eefe7a751230c4f72097f4f63b96508 100644 (file)
@@ -39,31 +39,29 @@ static int p2_keymap[] = {
        KEY(0,1,KEY_RIGHT),
        KEY(0,2,KEY_LEFT),
        KEY(0,3,KEY_DOWN),
-       KEY(0,4,KEY_CENTER),
-       KEY(0,5,KEY_0_5),
-       KEY(1,0,KEY_SOFT2),
+       KEY(0,4,KEY_ENTER),
+       KEY(1,0,KEY_F10),
        KEY(1,1,KEY_SEND),
        KEY(1,2,KEY_END),
        KEY(1,3,KEY_VOLUMEDOWN),
        KEY(1,4,KEY_VOLUMEUP),
        KEY(1,5,KEY_RECORD),
-       KEY(2,0,KEY_SOFT1),
+       KEY(2,0,KEY_F9),
        KEY(2,1,KEY_3),
        KEY(2,2,KEY_6),
        KEY(2,3,KEY_9),
-       KEY(2,4,KEY_SHARP),
-       KEY(2,5,KEY_2_5),
+       KEY(2,4,KEY_KPDOT),
        KEY(3,0,KEY_BACK),
        KEY(3,1,KEY_2),
        KEY(3,2,KEY_5),
        KEY(3,3,KEY_8),
        KEY(3,4,KEY_0),
-       KEY(3,5,KEY_HEADSETHOOK),
+       KEY(3,5,KEY_KPSLASH),
        KEY(4,0,KEY_HOME),
        KEY(4,1,KEY_1),
        KEY(4,2,KEY_4),
        KEY(4,3,KEY_7),
-       KEY(4,4,KEY_STAR),
+       KEY(4,4,KEY_KPASTERISK),
        KEY(4,5,KEY_POWER),
        0
 };
index dcd81f8d0833f28da844c3e468bf89ea8becfa40..9732d5d9466b1381fdb1b6ce416403af4215675d 100644 (file)
@@ -178,13 +178,19 @@ static void pxa25x_cpu_pm_save(unsigned long *sleep_save)
        SAVE(GAFR1_L); SAVE(GAFR1_U);
        SAVE(GAFR2_L); SAVE(GAFR2_U);
 
-       SAVE(ICMR);
+       SAVE(ICMR); ICMR = 0;
        SAVE(CKEN);
        SAVE(PSTR);
+
+       /* Clear GPIO transition detect bits */
+       GEDR0 = GEDR0; GEDR1 = GEDR1; GEDR2 = GEDR2;
 }
 
 static void pxa25x_cpu_pm_restore(unsigned long *sleep_save)
 {
+       /* ensure not to come back here if it wasn't intended */
+       PSPR = 0;
+
        /* restore registers */
        RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); RESTORE_GPLEVEL(2);
        RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2);
@@ -195,7 +201,12 @@ static void pxa25x_cpu_pm_restore(unsigned long *sleep_save)
        RESTORE(GFER0); RESTORE(GFER1); RESTORE(GFER2);
        RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2);
 
+       PSSR = PSSR_RDH | PSSR_PH;
+
        RESTORE(CKEN);
+
+       ICLR = 0;
+       ICCR = 1;
        RESTORE(ICMR);
        RESTORE(PSTR);
 }
index aff71fec618ac7468cd3aca861873d86edb578a1..d0447723b73a111ea9b8edf5a531edfa36a473be 100644 (file)
@@ -43,11 +43,11 @@ pxa_cpu_save_cp:
 pxa_cpu_save_sp:
        @ preserve phys address of stack
        mov     r0, sp
-       mov     r2, lr
+       str     lr, [sp, #-4]!
        bl      sleep_phys_sp
        ldr     r1, =sleep_save_sp
        str     r0, [r1]
-       mov     pc, r2
+       ldr     pc, [sp], #4
 
 /*
  * pxa27x_cpu_suspend()
@@ -270,5 +270,3 @@ resume_after_mmu:
        mar     acc0, r2, r3
 #endif
        ldmfd   sp!, {r4 - r12, pc}             @ return to caller
-
-
index 54a2ad6d9ca25a314514b6e99543c392a37ddde9..791d0238c68f133d48664663c4812074737b0247 100644 (file)
@@ -361,10 +361,12 @@ u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand);
  *  OP_SCALAR - this operation always operates in scalar mode
  *  OP_SD - the instruction exceptionally writes to a single precision result.
  *  OP_DD - the instruction exceptionally writes to a double precision result.
+ *  OP_SM - the instruction exceptionally reads from a single precision operand.
  */
 #define OP_SCALAR      (1 << 0)
 #define OP_SD          (1 << 1)
 #define OP_DD          (1 << 1)
+#define OP_SM          (1 << 2)
 
 struct op {
        u32 (* const fn)(int dd, int dn, int dm, u32 fpscr);
index 190a09ad18ebe87217222c7eecc2c05823bec86f..6cac43bd1d86c63638993bafa8ba989fea52e91f 100644 (file)
@@ -668,8 +668,8 @@ static struct op fops_ext[32] = {
        [FEXT_TO_IDX(FEXT_FCMPZ)]       = { vfp_double_fcmpz,  OP_SCALAR },
        [FEXT_TO_IDX(FEXT_FCMPEZ)]      = { vfp_double_fcmpez, OP_SCALAR },
        [FEXT_TO_IDX(FEXT_FCVT)]        = { vfp_double_fcvts,  OP_SCALAR|OP_SD },
-       [FEXT_TO_IDX(FEXT_FUITO)]       = { vfp_double_fuito,  OP_SCALAR },
-       [FEXT_TO_IDX(FEXT_FSITO)]       = { vfp_double_fsito,  OP_SCALAR },
+       [FEXT_TO_IDX(FEXT_FUITO)]       = { vfp_double_fuito,  OP_SCALAR|OP_SM },
+       [FEXT_TO_IDX(FEXT_FSITO)]       = { vfp_double_fsito,  OP_SCALAR|OP_SM },
        [FEXT_TO_IDX(FEXT_FTOUI)]       = { vfp_double_ftoui,  OP_SCALAR|OP_SD },
        [FEXT_TO_IDX(FEXT_FTOUIZ)]      = { vfp_double_ftouiz, OP_SCALAR|OP_SD },
        [FEXT_TO_IDX(FEXT_FTOSI)]       = { vfp_double_ftosi,  OP_SCALAR|OP_SD },
@@ -1128,7 +1128,7 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr)
        u32 exceptions = 0;
        unsigned int dest;
        unsigned int dn = vfp_get_dn(inst);
-       unsigned int dm = vfp_get_dm(inst);
+       unsigned int dm;
        unsigned int vecitr, veclen, vecstride;
        struct op *fop;
 
@@ -1145,6 +1145,14 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr)
        else
                dest = vfp_get_dd(inst);
 
+       /*
+        * f[us]ito takes a sN operand, not a dN operand.
+        */
+       if (fop->flags & OP_SM)
+               dm = vfp_get_sm(inst);
+       else
+               dm = vfp_get_dm(inst);
+
        /*
         * If destination bank is zero, vector length is always '1'.
         * ARM DDI0100F C5.1.3, C5.3.2.
index 2a3a7ea5958c004085e034bd5c9091a87ea751b3..25232ba081193fca739fcb9bb1fef89deb96795b 100644 (file)
@@ -65,6 +65,10 @@ config GENERIC_CALIBRATE_DELAY
        bool
        default y
 
+config HARDWARE_PM
+       def_bool y
+       depends on OPROFILE
+
 source "init/Kconfig"
 source "kernel/Kconfig.preempt"
 
index 88eff7f54ea6cc17ab28e70b33155957ba3acdb1..1d1936a18133d36376186baea9a1d76434f408dc 100644 (file)
@@ -6,136 +6,9 @@
 *!
 *! Functions exported: ds1302_readreg, ds1302_writereg, ds1302_init
 *!
-*! $Log: ds1302.c,v $
-*! Revision 1.18  2005/01/24 09:11:26  mikaelam
-*! Minor changes to get DS1302 RTC chip driver to work
-*!
-*! Revision 1.17  2005/01/05 06:11:22  starvik
-*! No need to do local_irq_disable after local_irq_save.
-*!
-*! Revision 1.16  2004/12/13 12:21:52  starvik
-*! Added I/O and DMA allocators from Linux 2.4
-*!
-*! Revision 1.14  2004/08/24 06:48:43  starvik
-*! Whitespace cleanup
-*!
-*! Revision 1.13  2004/05/28 09:26:59  starvik
-*! Modified I2C initialization to work in 2.6.
-*!
-*! Revision 1.12  2004/05/14 07:58:03  starvik
-*! Merge of changes from 2.4
-*!
-*! Revision 1.10  2004/02/04 09:25:12  starvik
-*! Merge of Linux 2.6.2
-*!
-*! Revision 1.9  2003/07/04 08:27:37  starvik
-*! Merge of Linux 2.5.74
-*!
-*! Revision 1.8  2003/04/09 05:20:47  starvik
-*! Merge of Linux 2.5.67
-*!
-*! Revision 1.6  2003/01/09 14:42:51  starvik
-*! Merge of Linux 2.5.55
-*!
-*! Revision 1.4  2002/12/11 13:13:57  starvik
-*! Added arch/ to v10 specific includes
-*! Added fix from Linux 2.4 in serial.c (flush_to_flip_buffer)
-*!
-*! Revision 1.3  2002/11/20 11:56:10  starvik
-*! Merge of Linux 2.5.48
-*!
-*! Revision 1.2  2002/11/18 13:16:06  starvik
-*! Linux 2.5 port of latest 2.4 drivers
-*!
-*! Revision 1.15  2002/10/11 16:14:33  johana
-*! Added CONFIG_ETRAX_DS1302_TRICKLE_CHARGE and initial setting of the
-*! trcklecharge register.
-*!
-*! Revision 1.14  2002/10/10 12:15:38  magnusmn
-*! Added support for having the RST signal on bit g0
-*!
-*! Revision 1.13  2002/05/29 15:16:08  johana
-*! Removed unused variables.
-*!
-*! Revision 1.12  2002/04/10 15:35:25  johana
-*! Moved probe function closer to init function and marked it __init.
-*!
-*! Revision 1.11  2001/06/14 12:35:52  jonashg
-*! The ATA hack is back. It is unfortunately the only way to set g27 to output.
-*!
-*! Revision 1.9  2001/06/14 10:00:14  jonashg
-*! No need for tempudelay to be inline anymore (had to adjust the usec to
-*! loops conversion because of this to make it slow enough to be a udelay).
-*!
-*! Revision 1.8  2001/06/14 08:06:32  jonashg
-*! Made tempudelay delay usecs (well, just a tad more).
-*!
-*! Revision 1.7  2001/06/13 14:18:11  jonashg
-*! Only allow processes with SYS_TIME capability to set time and charge.
-*!
-*! Revision 1.6  2001/06/12 15:22:07  jonashg
-*! * Made init function __init.
-*! * Parameter to out_byte() is unsigned char.
-*! * The magic number 42 has got a name.
-*! * Removed comment about /proc (nothing is exported there).
-*!
-*! Revision 1.5  2001/06/12 14:35:13  jonashg
-*! Gave the module a name and added it to printk's.
-*!
-*! Revision 1.4  2001/05/31 14:53:40  jonashg
-*! Made tempudelay() inline so that the watchdog doesn't reset (see
-*! function comment).
-*!
-*! Revision 1.3  2001/03/26 16:03:06  bjornw
-*! Needs linux/config.h
-*!
-*! Revision 1.2  2001/03/20 19:42:00  bjornw
-*! Use the ETRAX prefix on the DS1302 options
-*!
-*! Revision 1.1  2001/03/20 09:13:50  magnusmn
-*! Linux 2.4 port
-*!
-*! Revision 1.10  2000/07/05 15:38:23  bjornw
-*! Dont update kernel time when a RTC_SET_TIME is done
-*!
-*! Revision 1.9  2000/03/02 15:42:59  macce
-*! * Hack to make RTC work on all 2100/2400
-*!
-*! Revision 1.8  2000/02/23 16:59:18  torbjore
-*! added setup of R_GEN_CONFIG when RTC is connected to the generic port.
-*!
-*! Revision 1.7  2000/01/17 15:51:43  johana
-*! Added RTC_SET_CHARGE ioctl to enable trickle charger.
-*!
-*! Revision 1.6  1999/10/27 13:19:47  bjornw
-*! Added update_xtime_from_cmos which reads back the updated RTC into the kernel.
-*! /dev/rtc calls it now.
-*!
-*! Revision 1.5  1999/10/27 12:39:37  bjornw
-*! Disabled superuser check. Anyone can now set the time.
-*!
-*! Revision 1.4  1999/09/02 13:27:46  pkj
-*! Added shadow for R_PORT_PB_CONFIG.
-*! Renamed port_g_shadow to port_g_data_shadow.
-*!
-*! Revision 1.3  1999/09/02 08:28:06  pkj
-*! Made it possible to select either port PB or the generic port for the RST
-*! signal line to the DS1302 RTC.
-*! Also make sure the RST bit is configured as output on Port PB (if used).
-*!
-*! Revision 1.2  1999/09/01 14:47:20  bjornw
-*! Added support for /dev/rtc operations with ioctl RD_TIME and SET_TIME to read
-*! and set the date. Register as major 121.
-*!
-*! Revision 1.1  1999/09/01 09:45:29  bjornw
-*! Implemented a DS1302 RTC driver.
-*!
-*!
 *! ---------------------------------------------------------------------------
 *!
-*! (C) Copyright 1999, 2000, 2001, 2002, 2003, 2004  Axis Communications AB, LUND, SWEDEN
-*!
-*! $Id: ds1302.c,v 1.18 2005/01/24 09:11:26 mikaelam Exp $
+*! (C) Copyright 1999-2007 Axis Communications AB, LUND, SWEDEN
 *!
 *!***************************************************************************/
 
 #include <asm/rtc.h>
 #include <asm/arch/io_interface_mux.h>
 
+#include "i2c.h"
+
 #define RTC_MAJOR_NR 121 /* local major, change later */
 
 static const char ds1302_name[] = "ds1302";
index 3a9114e89edfcc1f2ef6e87b8e7c7bc6ca1fd35d..f3b327d4ed9cf912040a56310b69cad7063f7fd8 100644 (file)
@@ -392,6 +392,7 @@ int cris_request_io_interface(enum cris_io_interface ioif, const char *device_id
        if (((interfaces[ioif].gpio_g_in & gpio_in_pins) != interfaces[ioif].gpio_g_in) ||
            ((interfaces[ioif].gpio_g_out & gpio_out_pins) != interfaces[ioif].gpio_g_out) ||
            ((interfaces[ioif].gpio_b & gpio_pb_pins) != interfaces[ioif].gpio_b)) {
+               local_irq_restore(flags);
                printk(KERN_CRIT "cris_request_io_interface: Could not get required pins for interface %u\n",
                       ioif);
                return -EBUSY;
index 41d4a5f93284abe34e1838c1e5379d1ab120956a..b6be705c2a3e6fb7ec2994600e47deaebfcadbfa 100644 (file)
@@ -7,7 +7,7 @@
  *
  *  Ideas also taken from arch/arm.
  *
- *  Copyright (C) 2000, 2001 Axis Communications AB
+ *  Copyright (C) 2000-2007 Axis Communications AB
  *
  *  Authors:  Bjorn Wesen (bjornw@axis.com)
  *
  */
 #define RESTART_CRIS_SYS(regs) regs->r10 = regs->orig_r10; regs->irp -= 2;
 
-int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs);
+void do_signal(int canrestart, struct pt_regs *regs);
 
 /*
- * Atomically swap in the new signal mask, and wait for a signal.  Define 
+ * Atomically swap in the new signal mask, and wait for a signal.  Define
  * dummy arguments to be able to reach the regs argument.  (Note that this
  * arrangement relies on old_sigset_t occupying one register.)
  */
-int
-sys_sigsuspend(old_sigset_t mask, long r11, long r12, long r13, long mof, 
-               long srp, struct pt_regs *regs)
+int sys_sigsuspend(old_sigset_t mask, long r11, long r12, long r13, long mof,
+       long srp, struct pt_regs *regs)
 {
-       sigset_t saveset;
-
        mask &= _BLOCKABLE;
        spin_lock_irq(&current->sighand->siglock);
-       saveset = current->blocked;
+       current->saved_sigmask = current->blocked;
        siginitset(&current->blocked, mask);
        recalc_sigpending();
        spin_unlock_irq(&current->sighand->siglock);
-
-       regs->r10 = -EINTR;
-       while (1) {
-               current->state = TASK_INTERRUPTIBLE;
-               schedule();
-               if (do_signal(0, &saveset, regs))
-                       /* We will get here twice: once to call the signal
-                          handler, then again to return from the
-                          sigsuspend system call.  When calling the
-                          signal handler, R10 holds the signal number as
-                          set through do_signal.  The sigsuspend call
-                          will return with the restored value set above;
-                          always -EINTR.  */
-                       return regs->r10;
-       }
+       current->state = TASK_INTERRUPTIBLE;
+       schedule();
+       set_thread_flag(TIF_RESTORE_SIGMASK);
+       return -ERESTARTNOHAND;
 }
 
-/* Define dummy arguments to be able to reach the regs argument.  (Note that
- * this arrangement relies on size_t occupying one register.)
- */
-int
-sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, long r12, long r13, 
-                  long mof, long srp, struct pt_regs *regs)
-{
-       sigset_t saveset, newset;
-
-       /* XXX: Don't preclude handling different sized sigset_t's.  */
-       if (sigsetsize != sizeof(sigset_t))
-               return -EINVAL;
-
-       if (copy_from_user(&newset, unewset, sizeof(newset)))
-               return -EFAULT;
-       sigdelsetmask(&newset, ~_BLOCKABLE);
-
-       spin_lock_irq(&current->sighand->siglock);
-       saveset = current->blocked;
-       current->blocked = newset;
-       recalc_sigpending();
-       spin_unlock_irq(&current->sighand->siglock);
-
-       regs->r10 = -EINTR;
-       while (1) {
-               current->state = TASK_INTERRUPTIBLE;
-               schedule();
-               if (do_signal(0, &saveset, regs))
-                       /* We will get here twice: once to call the signal
-                          handler, then again to return from the
-                          sigsuspend system call.  When calling the
-                          signal handler, R10 holds the signal number as
-                          set through do_signal.  The sigsuspend call
-                          will return with the restored value set above;
-                          always -EINTR.  */
-                       return regs->r10;
-       }
-}
-
-int 
-sys_sigaction(int sig, const struct old_sigaction __user *act,
-             struct old_sigaction *oact)
+int sys_sigaction(int sig, const struct old_sigaction __user *act,
+       struct old_sigaction *oact)
 {
        struct k_sigaction new_ka, old_ka;
        int ret;
@@ -147,8 +93,7 @@ sys_sigaction(int sig, const struct old_sigaction __user *act,
        return ret;
 }
 
-int
-sys_sigaltstack(const stack_t *uss, stack_t __user *uoss)
+int sys_sigaltstack(const stack_t *uss, stack_t __user *uoss)
 {
        return do_sigaltstack(uss, uoss, rdusp());
 }
@@ -205,7 +150,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
 
        /* TODO: the other ports use regs->orig_XX to disable syscall checks
         * after this completes, but we don't use that mechanism. maybe we can
-        * use it now ? 
+        * use it now ?
         */
 
        return err;
@@ -216,7 +161,7 @@ badframe:
 
 /* Define dummy arguments to be able to reach the regs argument.  */
 
-asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof, 
+asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof,
                              long srp, struct pt_regs *regs)
 {
        struct sigframe __user *frame = (struct sigframe *)rdusp();
@@ -243,7 +188,7 @@ asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof,
        current->blocked = set;
        recalc_sigpending();
        spin_unlock_irq(&current->sighand->siglock);
-       
+
        if (restore_sigcontext(regs, &frame->sc))
                goto badframe;
 
@@ -254,11 +199,11 @@ asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof,
 badframe:
        force_sig(SIGSEGV, current);
        return 0;
-}      
+}
 
 /* Define dummy arguments to be able to reach the regs argument.  */
 
-asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13, 
+asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13,
                                 long mof, long srp, struct pt_regs *regs)
 {
        struct rt_sigframe __user *frame = (struct rt_sigframe *)rdusp();
@@ -282,7 +227,7 @@ asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13,
        current->blocked = set;
        recalc_sigpending();
        spin_unlock_irq(&current->sighand->siglock);
-       
+
        if (restore_sigcontext(regs, &frame->uc.uc_mcontext))
                goto badframe;
 
@@ -294,14 +239,14 @@ asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13,
 badframe:
        force_sig(SIGSEGV, current);
        return 0;
-}      
+}
 
 /*
  * Set up a signal frame.
  */
 
-static int
-setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, unsigned long mask)
+static int setup_sigcontext(struct sigcontext __user *sc,
+       struct pt_regs *regs, unsigned long mask)
 {
        int err = 0;
        unsigned long usp = rdusp();
@@ -324,10 +269,11 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, unsigned lo
        return err;
 }
 
-/* figure out where we want to put the new signal frame - usually on the stack */
+/* Figure out where we want to put the new signal frame
+ * - usually on the stack. */
 
 static inline void __user *
-get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
+get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size)
 {
        unsigned long sp = rdusp();
 
@@ -345,15 +291,15 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
 }
 
 /* grab and setup a signal frame.
- * 
+ *
  * basically we stack a lot of state info, and arrange for the
  * user-mode program to return to the kernel using either a
  * trampoline which performs the syscall sigreturn, or a provided
  * user-mode trampoline.
  */
 
-static void setup_frame(int sig, struct k_sigaction *ka,
-                       sigset_t *set, struct pt_regs * regs)
+static int setup_frame(int sig, struct k_sigaction *ka,
+                      sigset_t *set, struct pt_regs *regs)
 {
        struct sigframe __user *frame;
        unsigned long return_ip;
@@ -401,14 +347,15 @@ static void setup_frame(int sig, struct k_sigaction *ka,
 
        wrusp((unsigned long)frame);
 
-       return;
+       return 0;
 
 give_sigsegv:
        force_sigsegv(sig, current);
+       return -EFAULT;
 }
 
-static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
-                          sigset_t *set, struct pt_regs * regs)
+static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
+       sigset_t *set, struct pt_regs *regs)
 {
        struct rt_sigframe __user *frame;
        unsigned long return_ip;
@@ -443,9 +390,10 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
                /* trampoline - the desired return ip is the retcode itself */
                return_ip = (unsigned long)&frame->retcode;
                /* This is movu.w __NR_rt_sigreturn, r9; break 13; */
-               err |= __put_user(0x9c5f,            (short __user*)(frame->retcode+0));
-               err |= __put_user(__NR_rt_sigreturn, (short __user*)(frame->retcode+2));
-               err |= __put_user(0xe93d,            (short __user*)(frame->retcode+4));
+               err |= __put_user(0x9c5f, (short __user *)(frame->retcode+0));
+               err |= __put_user(__NR_rt_sigreturn,
+                       (short __user *)(frame->retcode+2));
+               err |= __put_user(0xe93d, (short __user *)(frame->retcode+4));
        }
 
        if (err)
@@ -455,73 +403,81 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
 
        /* Set up registers for signal handler */
 
-       regs->irp = (unsigned long) ka->sa.sa_handler;  /* what we enter NOW   */
-       regs->srp = return_ip;                          /* what we enter LATER */
-       regs->r10 = sig;                                /* first argument is signo */
-        regs->r11 = (unsigned long) &frame->info;       /* second argument is (siginfo_t *) */
-        regs->r12 = 0;                                  /* third argument is unused */
-
-       /* actually move the usp to reflect the stacked frame */
-
+       /* What we enter NOW   */
+       regs->irp = (unsigned long) ka->sa.sa_handler;
+       /* What we enter LATER */
+       regs->srp = return_ip;
+       /* First argument is signo */
+       regs->r10 = sig;
+       /* Second argument is (siginfo_t *) */
+       regs->r11 = (unsigned long)&frame->info;
+       /* Third argument is unused */
+       regs->r12 = 0;
+
+       /* Actually move the usp to reflect the stacked frame */
        wrusp((unsigned long)frame);
 
-       return;
+       return 0;
 
 give_sigsegv:
        force_sigsegv(sig, current);
+       return -EFAULT;
 }
 
 /*
  * OK, we're invoking a handler
- */    
+ */
 
-static inline void
-handle_signal(int canrestart, unsigned long sig,
-             siginfo_t *info, struct k_sigaction *ka,
-              sigset_t *oldset, struct pt_regs * regs)
+static inline int handle_signal(int canrestart, unsigned long sig,
+       siginfo_t *info, struct k_sigaction *ka,
+       sigset_t *oldset, struct pt_regs *regs)
 {
+       int ret;
+
        /* Are we from a system call? */
        if (canrestart) {
                /* If so, check system call restarting.. */
                switch (regs->r10) {
-                       case -ERESTART_RESTARTBLOCK:
-                       case -ERESTARTNOHAND:
-                               /* ERESTARTNOHAND means that the syscall should only be
-                                  restarted if there was no handler for the signal, and since
-                                  we only get here if there is a handler, we don't restart */
+               case -ERESTART_RESTARTBLOCK:
+               case -ERESTARTNOHAND:
+                       /* ERESTARTNOHAND means that the syscall should
+                        * only be restarted if there was no handler for
+                        * the signal, and since we only get here if there
+                        * is a handler, we don't restart */
+                       regs->r10 = -EINTR;
+                       break;
+               case -ERESTARTSYS:
+                       /* ERESTARTSYS means to restart the syscall if
+                        * there is no handler or the handler was
+                        * registered with SA_RESTART */
+                       if (!(ka->sa.sa_flags & SA_RESTART)) {
                                regs->r10 = -EINTR;
                                break;
-
-                       case -ERESTARTSYS:
-                               /* ERESTARTSYS means to restart the syscall if there is no
-                                  handler or the handler was registered with SA_RESTART */
-                               if (!(ka->sa.sa_flags & SA_RESTART)) {
-                                       regs->r10 = -EINTR;
-                                       break;
-                               }
-                       /* fallthrough */
-                       case -ERESTARTNOINTR:
-                               /* ERESTARTNOINTR means that the syscall should be called again
-                                  after the signal handler returns. */
-                               RESTART_CRIS_SYS(regs);
+                       }
+               /* fallthrough */
+               case -ERESTARTNOINTR:
+                       /* ERESTARTNOINTR means that the syscall should
+                        * be called again after the signal handler returns. */
+                       RESTART_CRIS_SYS(regs);
                }
        }
 
        /* Set up the stack frame */
        if (ka->sa.sa_flags & SA_SIGINFO)
-               setup_rt_frame(sig, ka, info, oldset, regs);
+               ret = setup_rt_frame(sig, ka, info, oldset, regs);
        else
-               setup_frame(sig, ka, oldset, regs);
-
-       if (ka->sa.sa_flags & SA_ONESHOT)
-               ka->sa.sa_handler = SIG_DFL;
-
-       spin_lock_irq(&current->sighand->siglock);
-       sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
-       if (!(ka->sa.sa_flags & SA_NODEFER))
-               sigaddset(&current->blocked,sig);
-       recalc_sigpending();
-       spin_unlock_irq(&current->sighand->siglock);
+               ret = setup_frame(sig, ka, oldset, regs);
+
+       if (ret == 0) {
+               spin_lock_irq(&current->sighand->siglock);
+               sigorsets(&current->blocked, &current->blocked,
+                       &ka->sa.sa_mask);
+               if (!(ka->sa.sa_flags & SA_NODEFER))
+                       sigaddset(&current->blocked, sig);
+               recalc_sigpending();
+               spin_unlock_irq(&current->sighand->siglock);
+       }
+       return ret;
 }
 
 /*
@@ -536,11 +492,12 @@ handle_signal(int canrestart, unsigned long sig,
  * mode below.
  */
 
-int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs)
+void do_signal(int canrestart, struct pt_regs *regs)
 {
        siginfo_t info;
        int signr;
         struct k_sigaction ka;
+       sigset_t *oldset;
 
        /*
         * We want the common case to go fast, which
@@ -549,16 +506,26 @@ int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs)
         * if so.
         */
        if (!user_mode(regs))
-               return 1;
+               return;
 
-       if (!oldset)
+       if (test_thread_flag(TIF_RESTORE_SIGMASK))
+               oldset = &current->saved_sigmask;
+       else
                oldset = &current->blocked;
 
        signr = get_signal_to_deliver(&info, &ka, regs, NULL);
        if (signr > 0) {
                /* Whee!  Actually deliver the signal.  */
-               handle_signal(canrestart, signr, &info, &ka, oldset, regs);
-               return 1;
+               if (handle_signal(canrestart, signr, &info, &ka,
+                               oldset, regs)) {
+                       /* a signal was successfully delivered; the saved
+                        * sigmask will have been stored in the signal frame,
+                        * and will be restored by sigreturn, so we can simply
+                        * clear the TIF_RESTORE_SIGMASK flag */
+                       if (test_thread_flag(TIF_RESTORE_SIGMASK))
+                               clear_thread_flag(TIF_RESTORE_SIGMASK);
+               }
+               return;
        }
 
        /* Did we come from a system call? */
@@ -569,10 +536,16 @@ int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs)
                    regs->r10 == -ERESTARTNOINTR) {
                        RESTART_CRIS_SYS(regs);
                }
-               if (regs->r10 == -ERESTART_RESTARTBLOCK){
+               if (regs->r10 == -ERESTART_RESTARTBLOCK) {
                        regs->r10 = __NR_restart_syscall;
                        regs->irp -= 2;
                }
        }
-       return 0;
+
+       /* if there's no signal to deliver, we just put the saved sigmask
+        * back */
+       if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
+               clear_thread_flag(TIF_RESTORE_SIGMASK);
+               sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
+       }
 }
index 5976f6199c47237937b2e7a4bd15709203472cf9..9310a7b476e95cf6353180de4e88bc8ba4f9f592 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/swap.h>
 #include <linux/sched.h>
 #include <linux/init.h>
+#include <linux/vmstat.h>
 #include <asm/arch/svinto.h>
 #include <asm/types.h>
 #include <asm/signal.h>
index 9859d49d088bfb0c714bc71180279df06babf8b6..97a7876ed6819061fec0a9be042f60be1d260d77 100644 (file)
@@ -9,7 +9,8 @@
  */    
 
 #include <asm-generic/vmlinux.lds.h>
-               
+#include <asm/page.h>
+
 jiffies = jiffies_64;
 SECTIONS
 {
@@ -23,7 +24,7 @@ SECTIONS
        _stext = .;
        __stext = .;
        .text : {
-               *(.text)
+               TEXT_TEXT
                SCHED_TEXT
                LOCK_TEXT
                *(.fixup)
@@ -49,10 +50,10 @@ SECTIONS
        __edata = . ;                 /* End of data section */
        _edata = . ;
 
-       . = ALIGN(8192);              /* init_task and stack, must be aligned */
+       . = ALIGN(PAGE_SIZE);   /* init_task and stack, must be aligned */
        .data.init_task : { *(.data.init_task) }
 
-       . = ALIGN(8192);              /* Init code and data */
+       . = ALIGN(PAGE_SIZE);   /* Init code and data */
        __init_begin = .;
        .init.text : { 
                   _sinittext = .;
@@ -66,13 +67,7 @@ SECTIONS
        __setup_end = .;
        .initcall.init : {
                __initcall_start = .;
-               *(.initcall1.init);
-               *(.initcall2.init);
-               *(.initcall3.init);
-               *(.initcall4.init);
-               *(.initcall5.init);
-               *(.initcall6.init);
-               *(.initcall7.init);
+               INITCALLS
                __initcall_end = .;     
        }
 
@@ -88,16 +83,18 @@ SECTIONS
                __initramfs_start = .;
                *(.init.ramfs)
                __initramfs_end = .;
-               /* We fill to the next page, so we can discard all init
-                  pages without needing to consider what payload might be
-                  appended to the kernel image.  */
-               FILL (0); 
-               . = ALIGN (8192);
        }
 #endif
-       
        __vmlinux_end = .;            /* last address of the physical file */
-       __init_end = .;
+
+       /*
+        * We fill to the next page, so we can discard all init
+        * pages without needing to consider what payload might be
+        * appended to the kernel image.
+        */
+       . = ALIGN(PAGE_SIZE);
+
+       __init_end = .;
 
        __data_end = . ;              /* Move to _edata ? */
        __bss_start = .;              /* BSS */
index 2173de9fe9173773a960dbd9347367242968011f..f6a1aeb742b3827acce249f7e5c84137678be1e6 100644 (file)
@@ -1488,16 +1488,19 @@ ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs)
              case LDFA_OP:
              case LDFCCLR_OP:
              case LDFCNC_OP:
-             case LDF_IMM_OP:
-             case LDFA_IMM_OP:
-             case LDFCCLR_IMM_OP:
-             case LDFCNC_IMM_OP:
                if (u.insn.x)
                        ret = emulate_load_floatpair(ifa, u.insn, regs);
                else
                        ret = emulate_load_float(ifa, u.insn, regs);
                break;
 
+             case LDF_IMM_OP:
+             case LDFA_IMM_OP:
+             case LDFCCLR_IMM_OP:
+             case LDFCNC_IMM_OP:
+               ret = emulate_load_float(ifa, u.insn, regs);
+               break;
+
              case STF_OP:
              case STF_IMM_OP:
                ret = emulate_store_float(ifa, u.insn, regs);
index 54e8973b6e99d21679c2083d76c8c0ea2cdfaedf..98e7c7dbfdd84082d5b2adf72d19b6b3309f2762 100644 (file)
@@ -3,7 +3,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (c) 2004-2005 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2004-2007 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 
  * PIO read fails, the MCA handler will force the error to look
  * corrected and vector to the xp_error_PIOR which will return an error.
  *
+ * The definition of "consumption" and the time it takes for an MCA
+ * to surface is processor implementation specific.  This code
+ * is sufficient on Itanium through the Montvale processor family.
+ * It may need to be adjusted for future processor implementations.
+ *
  *     extern int xp_nofault_PIOR(void *remote_register);
  */
 
@@ -22,11 +27,10 @@ xp_nofault_PIOR:
        mov     r8=r0                   // Stage a success return value
        ld8.acq r9=[r32];;              // PIO Read the specified register
        adds    r9=1,r9;;               // Add to force consumption
-       or      r9=r9,r9;;              // Or to force consumption
+       srlz.i;;                        // Allow time for MCA to surface
        br.ret.sptk.many b0;;           // Return success
 
        .global xp_error_PIOR
 xp_error_PIOR:
        mov     r8=1                    // Return value of 1
        br.ret.sptk.many b0;;           // Return failure
-
index c6fc405a6c8e33348bfe69c1720dada4df2ab4be..b22c043b6ef8e311702a6d8ac0b7064b10336c84 100644 (file)
@@ -59,6 +59,8 @@ config BCM47XX
        select SYS_SUPPORTS_LITTLE_ENDIAN
        select SSB
        select SSB_DRIVER_MIPS
+       select SSB_DRIVER_EXTIF
+       select SSB_PCICORE_HOSTMODE if PCI
        select GENERIC_GPIO
        select SYS_HAS_EARLY_PRINTK
        select CFE
@@ -992,8 +994,6 @@ config BOOT_ELF64
 
 menu "CPU selection"
 
-source "kernel/time/Kconfig"
-
 choice
        prompt "CPU type"
        default CPU_R4X00
@@ -1768,6 +1768,8 @@ config NR_CPUS
          performance should round up your number of processors to the next
          power of two.
 
+source "kernel/time/Kconfig"
+
 #
 # Timer Interrupt Frequency Configuration
 #
index 6fa70a36a250aaf4eb8ab3b8482244daefedca9d..ce771487567d5e3ee29fc4bd01a9211e23bd8554 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * BRIEF MODULE DESCRIPTION
- *     Alchemy/AMD Au1x00 pci support.
+ *     Alchemy/AMD Au1x00 PCI support.
  *
- * Copyright 2001,2002,2003 MontaVista Software Inc.
+ * Copyright 2001-2003, 2007 MontaVista Software Inc.
  * Author: MontaVista Software, Inc.
  *             ppopov@mvista.com or source@mvista.com
  *
@@ -66,6 +66,8 @@ static unsigned long virt_io_addr;
 
 static int __init au1x_pci_setup(void)
 {
+       extern void au1x_pci_cfg_init(void);
+
 #if defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550)
        virt_io_addr = (unsigned long)ioremap(Au1500_PCI_IO_START,
                        Au1500_PCI_IO_END - Au1500_PCI_IO_START + 1);
@@ -94,6 +96,8 @@ static int __init au1x_pci_setup(void)
        set_io_port_base(virt_io_addr);
 #endif
 
+       au1x_pci_cfg_init();
+
        register_pci_controller(&au1x_controller);
        return 0;
 }
index db330e811025d36cf9a33a1b2a2c6d169d1a9e23..d1ba701c9dd195fdcfaf9a2bea47f81703450260 100644 (file)
@@ -4,10 +4,15 @@
 #include <linux/io.h>
 #include <linux/serial_reg.h>
 
+#include <cobalt.h>
+
 #define UART_BASE      ((void __iomem *)CKSEG1ADDR(0x1c800000))
 
 void prom_putchar(char c)
 {
+       if (cobalt_board_id <= COBALT_BRD_ID_QUBE1)
+               return;
+
        while (!(readb(UART_BASE + UART_LSR) & UART_LSR_THRE))
                ;
 
index 2367687310630c40a68b11423a21dab45cc6b2a9..50be56c9e9ef590e9960337de7da248f5eaed575 100644 (file)
@@ -136,7 +136,8 @@ EXPORT(_stext)
         * kernel load address.  This is needed because this platform does
         * not have a ELF loader yet.
         */
-       __INIT
+FEXPORT(__kernel_entry)
+       j       kernel_entry
 #endif
 
        __INIT_REFOK
index 7f6ddcb5d48532657a52b80461644dd05c467551..f8a535afce3943d434ae0fe42a727f9aba654694 100644 (file)
@@ -269,7 +269,7 @@ static void __init bootmem_init(void)
 
 static void __init bootmem_init(void)
 {
-       unsigned long init_begin, reserved_end;
+       unsigned long reserved_end;
        unsigned long mapstart = ~0UL;
        unsigned long bootmap_size;
        int i;
@@ -344,7 +344,6 @@ static void __init bootmem_init(void)
                                         min_low_pfn, max_low_pfn);
 
 
-       init_begin = PFN_UP(__pa_symbol(&__init_begin));
        for (i = 0; i < boot_mem_map.nr_map; i++) {
                unsigned long start, end;
 
@@ -352,8 +351,8 @@ static void __init bootmem_init(void)
                end = PFN_DOWN(boot_mem_map.map[i].addr
                                + boot_mem_map.map[i].size);
 
-               if (start <= init_begin)
-                       start = init_begin;
+               if (start <= min_low_pfn)
+                       start = min_low_pfn;
                if (start >= end)
                        continue;
 
index 1ecfbb7eba6cd25f0637137b6b6272a9ccdd0bc8..2995be1ab3cada3d9771e46cb95727f601cbad53 100644 (file)
@@ -147,9 +147,9 @@ static __init int cpu_has_mfc0_count_bug(void)
                        return 1;
 
                /*
-                * I don't have erratas for newer R4400 so be paranoid.
+                * we assume newer revisions are ok
                 */
-               return 1;
+               return 0;
        }
 
        return 0;
index 5332449ec040fcc08769407b799101ee12d1a603..460626b6d62fc4cce318667032ccefa1f0de80aa 100644 (file)
@@ -12,11 +12,11 @@ endif
 
 MKLASATIMG = mklasatimg
 MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200
-KERNEL_IMAGE = $(TOPDIR)/vmlinux
+KERNEL_IMAGE = vmlinux
 KERNEL_START = $(shell $(NM) $(KERNEL_IMAGE) | grep " _text" | cut -f1 -d\ )
 KERNEL_ENTRY = $(shell $(NM) $(KERNEL_IMAGE) | grep kernel_entry | cut -f1 -d\ )
 
-LDSCRIPT= -L$(obj) -Tromscript.normal
+LDSCRIPT= -L$(srctree)/$(src) -Tromscript.normal
 
 HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \
                -D_kernel_entry=0x$(KERNEL_ENTRY) \
@@ -24,7 +24,7 @@ HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \
                -D TIMESTAMP=$(shell date +%s)
 
 $(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE)
-       $(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $<
+       $(CC) -fno-pic $(HEAD_DEFINES) $(LINUXINCLUDE) -c -o $@ $<
 
 OBJECTS = head.o kImage.o
 
index 2c5c27c8e86df597681f0afd216a0af26f64f1c4..dc272c1882337167a0350d87afc978702b1c0f0a 100644 (file)
@@ -169,7 +169,6 @@ void __init prom_meminit(void)
 
 void __init prom_free_prom_memory(void)
 {
-#if 0 /* for now ...  */
        unsigned long addr;
        int i;
 
@@ -181,5 +180,4 @@ void __init prom_free_prom_memory(void)
                free_init_pages("prom memory",
                                addr, addr + boot_mem_map.map[i].size);
        }
-#endif
 }
index 7a1bb51f81ee150e1b5ec38d6b645da8bc1605c3..583d468d98a947cfc95e4cd09872911128f1fa34 100644 (file)
@@ -39,16 +39,18 @@ static void atlas_machine_power_off(void);
 
 static void mips_machine_restart(char *command)
 {
-       unsigned int __iomem *softres_reg = ioremap(SOFTRES_REG, sizeof(unsigned int));
+       unsigned int __iomem *softres_reg =
+               ioremap(SOFTRES_REG, sizeof(unsigned int));
 
-       writew(GORESET, softres_reg);
+       __raw_writel(GORESET, softres_reg);
 }
 
 static void mips_machine_halt(void)
 {
-        unsigned int __iomem *softres_reg = ioremap(SOFTRES_REG, sizeof(unsigned int));
+       unsigned int __iomem *softres_reg =
+               ioremap(SOFTRES_REG, sizeof(unsigned int));
 
-       writew(GORESET, softres_reg);
+       __raw_writel(GORESET, softres_reg);
 }
 
 #if defined(CONFIG_MIPS_ATLAS)
index 9a2636e5624378fc1d9cefef136f1c271b80937e..bc43a5c2224dec370d3aeab2fb25cb0eb84c7ff1 100644 (file)
@@ -149,7 +149,7 @@ void __init plat_mem_setup(void)
        /* Check PCI clock */
        {
                unsigned int __iomem *jmpr_p = (unsigned int *) ioremap(MALTA_JMPRS_REG, sizeof(unsigned int));
-               int jmpr = (readw(jmpr_p) >> 2) & 0x07;
+               int jmpr = (__raw_readl(jmpr_p) >> 2) & 0x07;
                static const int pciclocks[] __initdata = {
                        33, 20, 25, 30, 12, 16, 37, 10
                };
index ae76795685cc2ee2789596dfbdfeba6c40b47808..810535dd091be1f1aaff24c6403f0686b8b01d63 100644 (file)
@@ -45,7 +45,7 @@ static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp)
        /* ignore region specifiers */
        gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM);
 
-#ifdef CONFIG_ZONE_DMA32
+#ifdef CONFIG_ZONE_DMA
        if (dev == NULL)
                gfp |= __GFP_DMA;
        else if (dev->coherent_dma_mask < DMA_BIT_MASK(24))
index f7df1142912b27266066273d6344cd760a264480..9553b14002dda51a757cf06ccb0bca5483b86c1a 100644 (file)
@@ -177,7 +177,7 @@ static char irq_tab_raq2[] __initdata = {
 
 int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       if (cobalt_board_id < COBALT_BRD_ID_QUBE2)
+       if (cobalt_board_id <= COBALT_BRD_ID_QUBE1)
                return irq_tab_qube1[slot];
 
        if (cobalt_board_id == COBALT_BRD_ID_RAQ2)
index 6b29904acf451936093ccbaa8d2af9b759502325..1314bd58f0365415a4553a8282d981e36ff54c73 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * BRIEF MODULE DESCRIPTION
- *     Alchemy/AMD Au1x00 pci support.
+ *     Alchemy/AMD Au1x00 PCI support.
  *
- * Copyright 2001,2002,2003 MontaVista Software Inc.
+ * Copyright 2001-2003, 2007 MontaVista Software Inc.
  * Author: MontaVista Software, Inc.
  *             ppopov@mvista.com or source@mvista.com
  *
@@ -69,10 +69,27 @@ void mod_wired_entry(int entry, unsigned long entrylo0,
        write_c0_pagemask(old_pagemask);
 }
 
-struct vm_struct *pci_cfg_vm;
+static struct vm_struct *pci_cfg_vm;
 static int pci_cfg_wired_entry;
-static int first_cfg = 1;
-unsigned long last_entryLo0, last_entryLo1;
+static unsigned long last_entryLo0, last_entryLo1;
+
+/*
+ * We can't ioremap the entire pci config space because it's too large.
+ * Nor can we call ioremap dynamically because some device drivers use
+ * the PCI config routines from within interrupt handlers and that
+ * becomes a problem in get_vm_area().  We use one wired TLB to handle
+ * all config accesses for all busses.
+ */
+void __init au1x_pci_cfg_init(void)
+{
+       /* Reserve a wired entry for PCI config accesses */
+       pci_cfg_vm = get_vm_area(0x2000, VM_IOREMAP);
+       if (!pci_cfg_vm)
+               panic(KERN_ERR "PCI unable to get vm area\n");
+       pci_cfg_wired_entry = read_c0_wired();
+       add_wired_entry(0, 0, (unsigned long)pci_cfg_vm->addr, PM_4K);
+       last_entryLo0 = last_entryLo1 = 0xffffffff;
+}
 
 static int config_access(unsigned char access_type, struct pci_bus *bus,
                         unsigned int dev_fn, unsigned char where,
@@ -97,27 +114,6 @@ static int config_access(unsigned char access_type, struct pci_bus *bus,
                        Au1500_PCI_STATCMD);
        au_sync_udelay(1);
 
-       /*
-        * We can't ioremap the entire pci config space because it's
-        * too large. Nor can we call ioremap dynamically because some
-        * device drivers use the pci config routines from within
-        * interrupt handlers and that becomes a problem in get_vm_area().
-        * We use one wired tlb to handle all config accesses for all
-        * busses. To improve performance, if the current device
-        * is the same as the last device accessed, we don't touch the
-        * tlb.
-        */
-       if (first_cfg) {
-               /* reserve a wired entry for pci config accesses */
-               first_cfg = 0;
-               pci_cfg_vm = get_vm_area(0x2000, VM_IOREMAP);
-               if (!pci_cfg_vm)
-                       panic(KERN_ERR "PCI unable to get vm area\n");
-               pci_cfg_wired_entry = read_c0_wired();
-               add_wired_entry(0, 0, (unsigned long)pci_cfg_vm->addr, PM_4K);
-               last_entryLo0  = last_entryLo1 = 0xffffffff;
-       }
-
        /* Allow board vendors to implement their own off-chip idsel.
         * If it doesn't succeed, may as well bail out at this point.
         */
@@ -144,9 +140,12 @@ static int config_access(unsigned char access_type, struct pci_bus *bus,
        /* page boundary */
        cfg_base = cfg_base & PAGE_MASK;
 
+       /*
+        * To improve performance, if the current device is the same as
+        * the last device accessed, we don't touch the TLB.
+        */
        entryLo0 = (6 << 26)  | (cfg_base >> 6) | (2 << 3) | 7;
        entryLo1 = (6 << 26)  | (cfg_base >> 6) | (0x1000 >> 6) | (2 << 3) | 7;
-
        if ((entryLo0 != last_entryLo0) || (entryLo1 != last_entryLo1)) {
                mod_wired_entry(pci_cfg_wired_entry, entryLo0, entryLo1,
                                (unsigned long)pci_cfg_vm->addr, PM_4K);
index fe54514493044d8a9c70d9686518617531838d23..e95881897ec904b0489233f3fb1fd771a7da20e3 100644 (file)
@@ -42,6 +42,10 @@ static int
 mace_pci_read_config(struct pci_bus *bus, unsigned int devfn,
                     int reg, int size, u32 *val)
 {
+       u32 control = mace->pci.control;
+
+       /* disable master aborts interrupts during config read */
+       mace->pci.control = control & ~MACEPCI_CONTROL_MAR_INT;
        mace->pci.config_addr = mkaddr(bus, devfn, reg);
        switch (size) {
        case 1:
@@ -54,6 +58,9 @@ mace_pci_read_config(struct pci_bus *bus, unsigned int devfn,
                *val = mace->pci.config_data.l;
                break;
        }
+       /* ack possible master abort */
+       mace->pci.error &= ~MACEPCI_ERROR_MASTER_ABORT;
+       mace->pci.control = control;
 
        DPRINTK("read%d: reg=%08x,val=%02x\n", size * 8, reg, *val);
 
index 618ea7dbc47444535cc53095f5f738fda0470b4c..532b561b44425d5fa58c951b0bbce8d25b2069eb 100644 (file)
@@ -119,6 +119,7 @@ static struct pci_controller mace_pci_controller = {
        .iommu          = 0,
        .mem_offset     = MACE_PCI_MEM_OFFSET,
        .io_offset      = 0,
+       .io_map_base    = CKSEG1ADDR(MACEPCI_LOW_IO),
 };
 
 static int __init mace_init(void)
@@ -135,7 +136,8 @@ static int __init mace_init(void)
        BUG_ON(request_irq(MACE_PCI_BRIDGE_IRQ, macepci_error, 0,
                           "MACE PCI error", NULL));
 
-       iomem_resource = mace_pci_mem_resource;
+       /* extend memory resources */
+       iomem_resource.end = mace_pci_mem_resource.end;
        ioport_resource = mace_pci_io_resource;
 
        register_pci_controller(&mace_pci_controller);
index e818fd0f1584f0938a467791be9492c2c4607821..6d494e0de3d97cb60beea553a515d8a9c65281ec 100644 (file)
@@ -22,7 +22,6 @@
 #include <linux/kernel_stat.h>
 #include <linux/spinlock.h>
 #include <linux/interrupt.h>
-#include <linux/module.h>
 
 #include <asm/bootinfo.h>
 #include <asm/cpu.h>
@@ -41,11 +40,60 @@ static cycle_t hpt_read(void)
        return read_c0_count2();
 }
 
+static struct clocksource pnx_clocksource = {
+       .name           = "pnx8xxx",
+       .rating         = 200,
+       .read           = hpt_read,
+       .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
+};
+
 static void timer_ack(void)
 {
        write_c0_compare(cpj);
 }
 
+static irqreturn_t pnx8xxx_timer_interrupt(int irq, void *dev_id)
+{
+       struct clock_event_device *c = dev_id;
+
+       /* clear MATCH, signal the event */
+       c->event_handler(c);
+
+       return IRQ_HANDLED;
+}
+
+static struct irqaction pnx8xxx_timer_irq = {
+       .handler        = pnx8xxx_timer_interrupt,
+       .flags          = IRQF_DISABLED | IRQF_PERCPU,
+       .name           = "pnx8xxx_timer",
+};
+
+static irqreturn_t monotonic_interrupt(int irq, void *dev_id)
+{
+       /* Timer 2 clear interrupt */
+       write_c0_compare2(-1);
+       return IRQ_HANDLED;
+}
+
+static struct irqaction monotonic_irqaction = {
+       .handler = monotonic_interrupt,
+       .flags = IRQF_DISABLED,
+       .name = "Monotonic timer",
+};
+
+static int pnx8xxx_set_next_event(unsigned long delta,
+                               struct clock_event_device *evt)
+{
+       write_c0_compare(delta);
+       return 0;
+}
+
+static struct clock_event_device pnx8xxx_clockevent = {
+       .name           = "pnx8xxx_clockevent",
+       .features       = CLOCK_EVT_FEAT_ONESHOT,
+       .set_next_event = pnx8xxx_set_next_event,
+};
+
 /*
  * plat_time_init() - it does the following things:
  *
@@ -58,11 +106,34 @@ static void timer_ack(void)
 
 __init void plat_time_init(void)
 {
+       unsigned int             configPR;
        unsigned int             n;
        unsigned int             m;
        unsigned int             p;
        unsigned int             pow2p;
 
+       clockevents_register_device(&pnx8xxx_clockevent);
+       clocksource_register(&pnx_clocksource);
+
+       setup_irq(PNX8550_INT_TIMER1, &pnx8xxx_timer_irq);
+       setup_irq(PNX8550_INT_TIMER2, &monotonic_irqaction);
+
+       /* Timer 1 start */
+       configPR = read_c0_config7();
+       configPR &= ~0x00000008;
+       write_c0_config7(configPR);
+
+       /* Timer 2 start */
+       configPR = read_c0_config7();
+       configPR &= ~0x00000010;
+       write_c0_config7(configPR);
+
+       /* Timer 3 stop */
+       configPR = read_c0_config7();
+       configPR |= 0x00000020;
+       write_c0_config7(configPR);
+
+
         /* PLL0 sets MIPS clock (PLL1 <=> TM1, PLL6 <=> TM2, PLL5 <=> mem) */
         /* (but only if CLK_MIPS_CTL select value [bits 3:1] is 1:  FIXME) */
 
@@ -87,42 +158,6 @@ __init void plat_time_init(void)
        write_c0_count2(0);
        write_c0_compare2(0xffffffff);
 
-       clocksource_mips.read = hpt_read;
-       mips_timer_ack = timer_ack;
-}
-
-static irqreturn_t monotonic_interrupt(int irq, void *dev_id)
-{
-       /* Timer 2 clear interrupt */
-       write_c0_compare2(-1);
-       return IRQ_HANDLED;
 }
 
-static struct irqaction monotonic_irqaction = {
-       .handler = monotonic_interrupt,
-       .flags = IRQF_DISABLED,
-       .name = "Monotonic timer",
-};
 
-void __init plat_timer_setup(struct irqaction *irq)
-{
-       int configPR;
-
-       setup_irq(PNX8550_INT_TIMER1, irq);
-       setup_irq(PNX8550_INT_TIMER2, &monotonic_irqaction);
-
-       /* Timer 1 start */
-       configPR = read_c0_config7();
-       configPR &= ~0x00000008;
-       write_c0_config7(configPR);
-
-       /* Timer 2 start */
-       configPR = read_c0_config7();
-       configPR &= ~0x00000010;
-       write_c0_config7(configPR);
-
-       /* Timer 3 stop */
-       configPR = read_c0_config7();
-       configPR |= 0x00000020;
-       write_c0_config7(configPR);
-}
index cab7cc22ab67407a8f2f37d4706a574c303ed3fb..b0ea0e43ba482b542f533d172277c6c03cee7bbd 100644 (file)
@@ -426,7 +426,6 @@ static void ip32_irq0(void)
 
        crime_int = crime->istat & crime_mask;
        irq = MACE_VID_IN1_IRQ + __ffs(crime_int);
-       crime_int = 1 << irq;
 
        if (crime_int & CRIME_MACEISA_INT_MASK) {
                unsigned long mace_int = mace->perif.ctrl.istat;
index 77febd68fcd47ec0ea6b5bcd7876b62fe283121e..89a71f49b692a31450911cc2be04f378c71f079d 100644 (file)
 #include <asm/ip32/mace.h>
 #include <asm/ip32/ip32_ints.h>
 
-/*
- * .iobase isn't a constant (in the sense of C) so we fill it in at runtime.
- */
-#define MACE_PORT(int)                                                 \
+#define MACEISA_SERIAL1_OFFS   offsetof(struct sgi_mace, isa.serial1)
+#define MACEISA_SERIAL2_OFFS   offsetof(struct sgi_mace, isa.serial2)
+
+#define MACE_PORT(offset,_irq)                                         \
 {                                                                      \
-       .irq            = int,                                          \
+       .mapbase        = MACE_BASE + offset,                           \
+       .irq            = _irq,                                         \
        .uartclk        = 1843200,                                      \
        .iotype         = UPIO_MEM,                                     \
-       .flags          = UPF_SKIP_TEST,                                \
+       .flags          = UPF_SKIP_TEST|UPF_IOREMAP,                    \
        .regshift       = 8,                                            \
 }
 
 static struct plat_serial8250_port uart8250_data[] = {
-       MACE_PORT(MACEISA_SERIAL1_IRQ),
-       MACE_PORT(MACEISA_SERIAL2_IRQ),
+       MACE_PORT(MACEISA_SERIAL1_OFFS, MACEISA_SERIAL1_IRQ),
+       MACE_PORT(MACEISA_SERIAL2_OFFS, MACEISA_SERIAL2_IRQ),
        { },
 };
 
@@ -41,9 +42,6 @@ static struct platform_device uart8250_device = {
 
 static int __init uart8250_init(void)
 {
-       uart8250_data[0].membase = (void __iomem *) &mace->isa.serial1;
-       uart8250_data[1].membase = (void __iomem *) &mace->isa.serial2;
-
        return platform_device_register(&uart8250_device);
 }
 
index 4a8152375efe2614a3947cca200b96006f92d6f8..632e5d201353ca9bf92613487f2545e75c3cf34f 100644 (file)
@@ -598,8 +598,8 @@ static int __init rbtx4938_ethaddr_init(void)
                        printk(KERN_WARNING "seeprom: bad checksum.\n");
        }
        for (i = 0; i < 2; i++) {
-               unsigned int slot = TX4938_PCIC_IDSEL_AD_TO_SLOT(31 - i);
-               unsigned int id = (1 << 8) | PCI_DEVFN(slot, 0); /* bus 1 */
+               unsigned int id =
+                       TXX9_IRQ_BASE + (i ? TX4938_IR_ETH1 : TX4938_IR_ETH0);
                struct platform_device *pdev;
                if (!(tx4938_ccfgptr->pcfg &
                      (i ? TX4938_PCFG_ETH1_SEL : TX4938_PCFG_ETH0_SEL)))
index 47fe2560138c1678b8b6e73e917964182a7a5a04..9ae800d81f890b80e9725e8ff911aff59c20a369 100644 (file)
@@ -345,6 +345,14 @@ config PPC_64K_PAGES
          while on hardware with such support, it will be used to map
          normal application pages.
 
+config PPC_SUBPAGE_PROT
+       bool "Support setting protections for 4k subpages"
+       depends on PPC_64K_PAGES
+       help
+         This option adds support for a system call to allow user programs
+         to set access permissions (read/write, readonly, or no access)
+         on the 4k subpages of each 64k page.
+
 config SCHED_SMT
        bool "SMT (Hyperthreading) scheduler support"
        depends on PPC64 && SMP
diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
new file mode 100644 (file)
index 0000000..9295083
--- /dev/null
@@ -0,0 +1,236 @@
+/*
+ * CM5200 board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * Marian Balakowicz <m8@semihalf.com>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+/*
+ * WARNING: Do not depend on this tree layout remaining static just yet.
+ * The MPC5200 device tree conventions are still in flux
+ * Keep an eye on the linuxppc-dev mailing list for more details
+ */
+
+/ {
+       model = "schindler,cm5200";
+       compatible = "schindler,cm5200";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               PowerPC,5200@0 {
+                       device_type = "cpu";
+                       reg = <0>;
+                       d-cache-line-size = <20>;
+                       i-cache-line-size = <20>;
+                       d-cache-size = <4000>;          // L1, 16K
+                       i-cache-size = <4000>;          // L1, 16K
+                       timebase-frequency = <0>;       // from bootloader
+                       bus-frequency = <0>;            // from bootloader
+                       clock-frequency = <0>;          // from bootloader
+               };
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <00000000 04000000>;      // 64MB
+       };
+
+       soc5200@f0000000 {
+               model = "fsl,mpc5200b";
+               compatible = "fsl,mpc5200b";
+               revision = "";                  // from bootloader
+               device_type = "soc";
+               ranges = <0 f0000000 0000c000>;
+               reg = <f0000000 00000100>;
+               bus-frequency = <0>;            // from bootloader
+               system-frequency = <0>;         // from bootloader
+
+               cdm@200 {
+                       compatible = "mpc5200b-cdm","mpc5200-cdm";
+                       reg = <200 38>;
+               };
+
+               mpc5200_pic: pic@500 {
+                       // 5200 interrupts are encoded into two levels;
+                       interrupt-controller;
+                       #interrupt-cells = <3>;
+                       compatible = "mpc5200b-pic","mpc5200-pic";
+                       reg = <500 80>;
+               };
+
+               gpt@600 {       // General Purpose Timer
+                       compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+                       reg = <600 10>;
+                       interrupts = <1 9 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+                       fsl,has-wdt;
+               };
+
+               gpt@610 {       // General Purpose Timer
+                       compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+                       reg = <610 10>;
+                       interrupts = <1 a 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               gpt@620 {       // General Purpose Timer
+                       compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+                       reg = <620 10>;
+                       interrupts = <1 b 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               gpt@630 {       // General Purpose Timer
+                       compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+                       reg = <630 10>;
+                       interrupts = <1 c 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               gpt@640 {       // General Purpose Timer
+                       compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+                       reg = <640 10>;
+                       interrupts = <1 d 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               gpt@650 {       // General Purpose Timer
+                       compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+                       reg = <650 10>;
+                       interrupts = <1 e 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               gpt@660 {       // General Purpose Timer
+                       compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+                       reg = <660 10>;
+                       interrupts = <1 f 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               gpt@670 {       // General Purpose Timer
+                       compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+                       reg = <670 10>;
+                       interrupts = <1 10 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               rtc@800 {       // Real time clock
+                       compatible = "mpc5200b-rtc","mpc5200-rtc";
+                       reg = <800 100>;
+                       interrupts = <1 5 0 1 6 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               gpio@b00 {
+                       compatible = "mpc5200b-gpio","mpc5200-gpio";
+                       reg = <b00 40>;
+                       interrupts = <1 7 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               gpio-wkup@c00 {
+                       compatible = "mpc5200b-gpio-wkup","mpc5200-gpio-wkup";
+                       reg = <c00 40>;
+                       interrupts = <1 8 0 0 3 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               spi@f00 {
+                       compatible = "mpc5200b-spi","mpc5200-spi";
+                       reg = <f00 20>;
+                       interrupts = <2 d 0 2 e 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               usb@1000 {
+                       device_type = "usb-ohci-be";
+                       compatible = "mpc5200b-ohci","mpc5200-ohci","ohci-be";
+                       reg = <1000 ff>;
+                       interrupts = <2 6 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               dma-controller@1200 {
+                       compatible = "mpc5200b-bestcomm","mpc5200-bestcomm";
+                       reg = <1200 80>;
+                       interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
+                                     3 4 0  3 5 0  3 6 0  3 7 0
+                                     3 8 0  3 9 0  3 a 0  3 b 0
+                                     3 c 0  3 d 0  3 e 0  3 f 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               xlb@1f00 {
+                       compatible = "mpc5200b-xlb","mpc5200-xlb";
+                       reg = <1f00 100>;
+               };
+
+               serial@2000 {           // PSC1
+                       device_type = "serial";
+                       compatible = "mpc5200b-psc-uart","mpc5200-psc-uart";
+                       port-number = <0>;  // Logical port assignment
+                       reg = <2000 100>;
+                       interrupts = <2 1 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               serial@2200 {           // PSC2
+                       device_type = "serial";
+                       compatible = "mpc5200-psc-uart";
+                       port-number = <1>;  // Logical port assignment
+                       reg = <2200 100>;
+                       interrupts = <2 2 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               serial@2400 {           // PSC3
+                       device_type = "serial";
+                       compatible = "mpc5200-psc-uart";
+                       port-number = <2>;  // Logical port assignment
+                       reg = <2400 100>;
+                       interrupts = <2 3 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               serial@2c00 {           // PSC6
+                       device_type = "serial";
+                       compatible = "mpc5200b-psc-uart","mpc5200-psc-uart";
+                       port-number = <5>;  // Logical port assignment
+                       reg = <2c00 100>;
+                       interrupts = <2 4 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               ethernet@3000 {
+                       device_type = "network";
+                       compatible = "mpc5200b-fec","mpc5200-fec";
+                       reg = <3000 800>;
+                       local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in by U-Boot */
+                       interrupts = <2 5 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               i2c@3d40 {
+                       compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
+                       reg = <3d40 40>;
+                       interrupts = <2 10 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+                       fsl5200-clocking;
+               };
+
+               sram@8000 {
+                       compatible = "mpc5200b-sram","mpc5200-sram";
+                       reg = <8000 4000>;
+               };
+       };
+};
index 23eeeb1fc61eccc350cf554eefea3a9ca67e8f2a..e1d6f441532ff3bf3f7e911d44dfa548cf7793d4 100644 (file)
@@ -19,7 +19,7 @@
 / {
        model = "fsl,lite5200";
        // revision = "1.0";
-       compatible = "fsl,lite5200","generic-mpc5200";
+       compatible = "fsl,lite5200";
        #address-cells = <1>;
        #size-cells = <1>;
 
index f94e073de9a79bed7ac615580f7bc6154fd61e67..3e06f58a0a71af1a11e64b3087d6ce4f28f8b570 100644 (file)
@@ -19,7 +19,7 @@
 / {
        model = "fsl,lite5200b";
        // revision = "1.0";
-       compatible = "fsl,lite5200b","generic-mpc5200";
+       compatible = "fsl,lite5200b";
        #address-cells = <1>;
        #size-cells = <1>;
 
diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts
new file mode 100644 (file)
index 0000000..d8c316a
--- /dev/null
@@ -0,0 +1,309 @@
+/*
+ * Motion-PRO board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * Marian Balakowicz <m8@semihalf.com>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+/*
+ * WARNING: Do not depend on this tree layout remaining static just yet.
+ * The MPC5200 device tree conventions are still in flux
+ * Keep an eye on the linuxppc-dev mailing list for more details
+ */
+
+/ {
+       model = "promess,motionpro";
+       compatible = "promess,motionpro";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               PowerPC,5200@0 {
+                       device_type = "cpu";
+                       reg = <0>;
+                       d-cache-line-size = <20>;
+                       i-cache-line-size = <20>;
+                       d-cache-size = <4000>;          // L1, 16K
+                       i-cache-size = <4000>;          // L1, 16K
+                       timebase-frequency = <0>;       // from bootloader
+                       bus-frequency = <0>;            // from bootloader
+                       clock-frequency = <0>;          // from bootloader
+               };
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <00000000 04000000>;      // 64MB
+       };
+
+       soc5200@f0000000 {
+               model = "fsl,mpc5200b";
+               compatible = "fsl,mpc5200b";
+               revision = "";                  // from bootloader
+               device_type = "soc";
+               ranges = <0 f0000000 0000c000>;
+               reg = <f0000000 00000100>;
+               bus-frequency = <0>;            // from bootloader
+               system-frequency = <0>;         // from bootloader
+
+               cdm@200 {
+                       compatible = "mpc5200b-cdm","mpc5200-cdm";
+                       reg = <200 38>;
+               };
+
+               mpc5200_pic: pic@500 {
+                       // 5200 interrupts are encoded into two levels;
+                       interrupt-controller;
+                       #interrupt-cells = <3>;
+                       compatible = "mpc5200b-pic","mpc5200-pic";
+                       reg = <500 80>;
+               };
+
+               gpt@600 {       // General Purpose Timer
+                       compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+                       reg = <600 10>;
+                       interrupts = <1 9 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+                       fsl,has-wdt;
+               };
+
+               gpt@610 {       // General Purpose Timer
+                       compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+                       reg = <610 10>;
+                       interrupts = <1 a 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               gpt@620 {       // General Purpose Timer
+                       compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+                       reg = <620 10>;
+                       interrupts = <1 b 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               gpt@630 {       // General Purpose Timer
+                       compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+                       reg = <630 10>;
+                       interrupts = <1 c 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               gpt@640 {       // General Purpose Timer
+                       compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+                       reg = <640 10>;
+                       interrupts = <1 d 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               gpt@650 {       // General Purpose Timer
+                       compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+                       reg = <650 10>;
+                       interrupts = <1 e 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               motionpro-led@660 {     // Motion-PRO status LED
+                       compatible = "promess,motionpro-led";
+                       label = "motionpro-statusled";
+                       reg = <660 10>;
+                       interrupts = <1 f 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+                       blink-delay = <64>; // 100 msec
+               };
+
+               motionpro-led@670 {     // Motion-PRO ready LED
+                       compatible = "promess,motionpro-led";
+                       label = "motionpro-readyled";
+                       reg = <670 10>;
+                       interrupts = <1 10 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               rtc@800 {       // Real time clock
+                       compatible = "mpc5200b-rtc","mpc5200-rtc";
+                       reg = <800 100>;
+                       interrupts = <1 5 0 1 6 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               mscan@980 {
+                       compatible = "mpc5200b-mscan","mpc5200-mscan";
+                       interrupts = <2 12 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+                       reg = <980 80>;
+               };
+
+               gpio@b00 {
+                       compatible = "mpc5200b-gpio","mpc5200-gpio";
+                       reg = <b00 40>;
+                       interrupts = <1 7 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               gpio-wkup@c00 {
+                       compatible = "mpc5200b-gpio-wkup","mpc5200-gpio-wkup";
+                       reg = <c00 40>;
+                       interrupts = <1 8 0 0 3 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+
+               spi@f00 {
+                       compatible = "mpc5200b-spi","mpc5200-spi";
+                       reg = <f00 20>;
+                       interrupts = <2 d 0 2 e 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               usb@1000 {
+                       compatible = "mpc5200b-ohci","mpc5200-ohci","ohci-be";
+                       reg = <1000 ff>;
+                       interrupts = <2 6 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               dma-controller@1200 {
+                       compatible = "mpc5200b-bestcomm","mpc5200-bestcomm";
+                       reg = <1200 80>;
+                       interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
+                                     3 4 0  3 5 0  3 6 0  3 7 0
+                                     3 8 0  3 9 0  3 a 0  3 b 0
+                                     3 c 0  3 d 0  3 e 0  3 f 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               xlb@1f00 {
+                       compatible = "mpc5200b-xlb","mpc5200-xlb";
+                       reg = <1f00 100>;
+               };
+
+               serial@2000 {           // PSC1
+                       device_type = "serial";
+                       compatible = "mpc5200b-psc-uart","mpc5200-psc-uart";
+                       port-number = <0>;  // Logical port assignment
+                       reg = <2000 100>;
+                       interrupts = <2 1 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               // PSC2 in spi master mode 
+               spi@2200 {              // PSC2
+                       compatible = "mpc5200b-psc-spi","mpc5200-psc-spi";
+                       cell-index = <1>;
+                       reg = <2200 100>;
+                       interrupts = <2 2 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               // PSC5 in uart mode
+               serial@2800 {           // PSC5
+                       device_type = "serial";
+                       compatible = "mpc5200b-psc-uart","mpc5200-psc-uart";
+                       port-number = <4>;  // Logical port assignment
+                       reg = <2800 100>;
+                       interrupts = <2 c 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               ethernet@3000 {
+                       device_type = "network";
+                       compatible = "mpc5200b-fec","mpc5200-fec";
+                       reg = <3000 800>;
+                       local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in by U-Boot */
+                       interrupts = <2 5 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               ata@3a00 {
+                       compatible = "mpc5200b-ata","mpc5200-ata";
+                       reg = <3a00 100>;
+                       interrupts = <2 7 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               i2c@3d40 {
+                       compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
+                       reg = <3d40 40>;
+                       interrupts = <2 10 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+                       fsl5200-clocking;
+               };
+
+               sram@8000 {
+                       compatible = "mpc5200b-sram","mpc5200-sram";
+                       reg = <8000 4000>;
+               };
+       };
+
+       lpb {
+               model = "fsl,lpb";
+               compatible = "fsl,lpb";
+               #address-cells = <2>;
+               #size-cells = <1>;
+               ranges = <1 0 50000000 00010000
+                         2 0 50010000 00010000
+                         3 0 50020000 00010000>;
+
+               // 8-bit DualPort SRAM on LocalPlus Bus CS1
+               kollmorgen@1,0 {
+                       compatible = "promess,motionpro-kollmorgen";
+                       reg = <1 0 10000>;
+                       interrupts = <1 1 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               // 8-bit board CPLD on LocalPlus Bus CS2
+               cpld@2,0 {
+                       compatible = "promess,motionpro-cpld";
+                       reg = <2 0 10000>;
+               };
+
+               // 8-bit custom Anybus Module on LocalPlus Bus CS3
+               anybus@3,0 {
+                       compatible = "promess,motionpro-anybus";
+                       reg = <3 0 10000>;
+               };
+               pro_module_general@3,0 {
+                       compatible = "promess,pro_module_general";
+                       reg = <3 0 3>;
+               };
+               pro_module_dio@3,800 {
+                       compatible = "promess,pro_module_dio";
+                       reg = <3 800 2>;
+               };
+       };
+
+       pci@f0000d00 {
+               #interrupt-cells = <1>;
+               #size-cells = <2>;
+               #address-cells = <3>;
+               device_type = "pci";
+               compatible = "mpc5200b-pci","mpc5200-pci";
+               reg = <f0000d00 100>;
+               interrupt-map-mask = <f800 0 0 7>;
+               interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot
+                                c000 0 0 2 &mpc5200_pic 1 1 3
+                                c000 0 0 3 &mpc5200_pic 1 2 3
+                                c000 0 0 4 &mpc5200_pic 1 3 3
+
+                                c800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot
+                                c800 0 0 2 &mpc5200_pic 1 2 3
+                                c800 0 0 3 &mpc5200_pic 1 3 3
+                                c800 0 0 4 &mpc5200_pic 0 0 3>;
+               clock-frequency = <0>; // From boot loader
+               interrupts = <2 8 0 2 9 0 2 a 0>;
+               interrupt-parent = <&mpc5200_pic>;
+               bus-range = <0 0>;
+               ranges = <42000000 0 80000000 80000000 0 20000000
+                         02000000 0 a0000000 a0000000 0 10000000
+                         01000000 0 00000000 b0000000 0 01000000>;
+       };
+};
diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
new file mode 100644 (file)
index 0000000..5017cec
--- /dev/null
@@ -0,0 +1,184 @@
+/*
+ * TQM5200 board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * Marian Balakowicz <m8@semihalf.com>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+/*
+ * WARNING: Do not depend on this tree layout remaining static just yet.
+ * The MPC5200 device tree conventions are still in flux
+ * Keep an eye on the linuxppc-dev mailing list for more details
+ */
+
+/ {
+       model = "tqc,tqm5200";
+       compatible = "tqc,tqm5200";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               PowerPC,5200@0 {
+                       device_type = "cpu";
+                       reg = <0>;
+                       d-cache-line-size = <20>;
+                       i-cache-line-size = <20>;
+                       d-cache-size = <4000>;          // L1, 16K
+                       i-cache-size = <4000>;          // L1, 16K
+                       timebase-frequency = <0>;       // from bootloader
+                       bus-frequency = <0>;            // from bootloader
+                       clock-frequency = <0>;          // from bootloader
+               };
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <00000000 04000000>;      // 64MB
+       };
+
+       soc5200@f0000000 {
+               model = "fsl,mpc5200";
+               compatible = "fsl,mpc5200";
+               revision = "";                  // from bootloader
+               device_type = "soc";
+               ranges = <0 f0000000 0000c000>;
+               reg = <f0000000 00000100>;
+               bus-frequency = <0>;            // from bootloader
+               system-frequency = <0>;         // from bootloader
+
+               cdm@200 {
+                       compatible = "mpc5200-cdm";
+                       reg = <200 38>;
+               };
+
+               mpc5200_pic: pic@500 {
+                       // 5200 interrupts are encoded into two levels;
+                       interrupt-controller;
+                       #interrupt-cells = <3>;
+                       compatible = "mpc5200-pic";
+                       reg = <500 80>;
+               };
+
+               gpt@600 {       // General Purpose Timer
+                       compatible = "fsl,mpc5200-gpt";
+                       reg = <600 10>;
+                       interrupts = <1 9 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+                       fsl,has-wdt;
+               };
+
+               gpio@b00 {
+                       compatible = "mpc5200-gpio";
+                       reg = <b00 40>;
+                       interrupts = <1 7 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               usb@1000 {
+                       compatible = "mpc5200-ohci","ohci-be";
+                       reg = <1000 ff>;
+                       interrupts = <2 6 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               dma-controller@1200 {
+                       compatible = "mpc5200-bestcomm";
+                       reg = <1200 80>;
+                       interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
+                                     3 4 0  3 5 0  3 6 0  3 7 0
+                                     3 8 0  3 9 0  3 a 0  3 b 0
+                                     3 c 0  3 d 0  3 e 0  3 f 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               xlb@1f00 {
+                       compatible = "mpc5200-xlb";
+                       reg = <1f00 100>;
+               };
+
+               serial@2000 {           // PSC1
+                       device_type = "serial";
+                       compatible = "mpc5200-psc-uart";
+                       port-number = <0>;  // Logical port assignment
+                       reg = <2000 100>;
+                       interrupts = <2 1 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               serial@2200 {           // PSC2
+                       device_type = "serial";
+                       compatible = "mpc5200-psc-uart";
+                       port-number = <1>;  // Logical port assignment
+                       reg = <2200 100>;
+                       interrupts = <2 2 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               serial@2400 {           // PSC3
+                       device_type = "serial";
+                       compatible = "mpc5200-psc-uart";
+                       port-number = <2>;  // Logical port assignment
+                       reg = <2400 100>;
+                       interrupts = <2 3 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               ethernet@3000 {
+                       device_type = "network";
+                       compatible = "mpc5200-fec";
+                       reg = <3000 800>;
+                       local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in by U-Boot */
+                       interrupts = <2 5 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               ata@3a00 {
+                       compatible = "mpc5200-ata";
+                       reg = <3a00 100>;
+                       interrupts = <2 7 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+               };
+
+               i2c@3d40 {
+                       compatible = "mpc5200-i2c","fsl-i2c";
+                       reg = <3d40 40>;
+                       interrupts = <2 10 0>;
+                       interrupt-parent = <&mpc5200_pic>;
+                       fsl5200-clocking;
+               };
+
+               sram@8000 {
+                       compatible = "mpc5200-sram";
+                       reg = <8000 4000>;
+               };
+       };
+
+       pci@f0000d00 {
+               #interrupt-cells = <1>;
+               #size-cells = <2>;
+               #address-cells = <3>;
+               device_type = "pci";
+               compatible = "fsl,mpc5200-pci";
+               reg = <f0000d00 100>;
+               interrupt-map-mask = <f800 0 0 7>;
+               interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3
+                                c000 0 0 2 &mpc5200_pic 0 0 3
+                                c000 0 0 3 &mpc5200_pic 0 0 3
+                                c000 0 0 4 &mpc5200_pic 0 0 3>;
+               clock-frequency = <0>; // From boot loader
+               interrupts = <2 8 0 2 9 0 2 a 0>;
+               interrupt-parent = <&mpc5200_pic>;
+               bus-range = <0 0>;
+               ranges = <42000000 0 80000000 80000000 0 10000000
+                         02000000 0 90000000 90000000 0 10000000
+                         01000000 0 00000000 a0000000 0 01000000>;
+       };
+};
index ad0420da8921616f3c74c668a3c862b9048530a4..66e0ebb1a36487ec10dba9404e8f9f7e15b4ca73 100644 (file)
@@ -2,7 +2,7 @@
  * This file adds the header file glue so that the shared files
  * flatdevicetree.[ch] can compile and work in the powerpc bootwrapper.
  *
- * strncmp & strchr copied from <file:lib/strings.c>
+ * strncmp & strchr copied from <file:lib/string.c>
  * Copyright (C) 1991, 1992  Linus Torvalds
  *
  * Maintained by: Mark A. Greer <mgreer@mvista.com>
similarity index 58%
rename from arch/powerpc/configs/lite5200_defconfig
rename to arch/powerpc/configs/mpc5200_defconfig
index 02bb7e5d8ed51f970f8151b97eeb13383569afc0..740c9f2b7de612b1c2cfd7e27d489d18436489f2 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.24-rc4
-# Thu Dec  6 16:48:24 2007
+# Linux kernel version: 2.6.24-rc6
+# Fri Jan 18 14:19:54 2008
 #
 # CONFIG_PPC64 is not set
 
@@ -72,7 +72,9 @@ CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_IKCONFIG is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_CGROUPS is not set
-# CONFIG_FAIR_GROUP_SCHED is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
 CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_BLK_DEV_INITRD=y
@@ -138,17 +140,22 @@ CONFIG_CLASSIC32=y
 CONFIG_PPC_MPC52xx=y
 CONFIG_PPC_MPC5200=y
 CONFIG_PPC_MPC5200_BUGFIX=y
-# CONFIG_PPC_EFIKA is not set
+CONFIG_PPC_MPC5200_SIMPLE=y
+CONFIG_PPC_EFIKA=y
 CONFIG_PPC_LITE5200=y
 # CONFIG_PPC_PMAC is not set
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
 # CONFIG_PQ2ADS is not set
 # CONFIG_EMBEDDED6xx is not set
+CONFIG_PPC_NATIVE=y
+# CONFIG_UDBG_RTAS_CONSOLE is not set
 # CONFIG_MPIC is not set
 # CONFIG_MPIC_WEIRD is not set
 # CONFIG_PPC_I8259 is not set
-# CONFIG_PPC_RTAS is not set
+CONFIG_PPC_RTAS=y
+# CONFIG_RTAS_ERROR_LOGGING is not set
+CONFIG_RTAS_PROC=y
 # CONFIG_MMIO_NVRAM is not set
 # CONFIG_PPC_MPC106 is not set
 # CONFIG_PPC_970_NAP is not set
@@ -344,7 +351,82 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_DEBUG_DEVRES is not set
 # CONFIG_SYS_HYPERVISOR is not set
 # CONFIG_CONNECTOR is not set
-# CONFIG_MTD is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+CONFIG_MTD_RAM=y
+CONFIG_MTD_ROM=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_PHYSMAP_OF=y
+# CONFIG_MTD_INTEL_VR_NOR is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
 CONFIG_OF_DEVICE=y
 # CONFIG_PARPORT is not set
 CONFIG_BLK_DEV=y
@@ -358,6 +440,7 @@ CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
+# CONFIG_BLK_DEV_UB is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=32768
@@ -377,18 +460,18 @@ CONFIG_MISC_DEVICES=y
 # CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
 CONFIG_SCSI_DMA=y
-# CONFIG_SCSI_TGT is not set
+CONFIG_SCSI_TGT=y
 # CONFIG_SCSI_NETLINK is not set
-# CONFIG_SCSI_PROC_FS is not set
+CONFIG_SCSI_PROC_FS=y
 
 #
 # SCSI support type (disk, tape, CD-ROM)
 #
-# CONFIG_BLK_DEV_SD is not set
+CONFIG_BLK_DEV_SD=y
 # CONFIG_CHR_DEV_ST is not set
 # CONFIG_CHR_DEV_OSST is not set
 # CONFIG_BLK_DEV_SR is not set
-# CONFIG_CHR_DEV_SG is not set
+CONFIG_CHR_DEV_SG=y
 # CONFIG_CHR_DEV_SCH is not set
 
 #
@@ -501,7 +584,8 @@ CONFIG_PATA_MPC52xx=y
 # CONFIG_PATA_SIS is not set
 # CONFIG_PATA_VIA is not set
 # CONFIG_PATA_WINBOND is not set
-# CONFIG_PATA_PLATFORM is not set
+CONFIG_PATA_PLATFORM=y
+# CONFIG_PATA_OF_PLATFORM is not set
 # CONFIG_MD is not set
 # CONFIG_FUSION is not set
 
@@ -522,37 +606,40 @@ CONFIG_NETDEVICES=y
 # CONFIG_VETH is not set
 # CONFIG_IP1000 is not set
 # CONFIG_ARCNET is not set
-# CONFIG_NET_ETHERNET is not set
-CONFIG_NETDEV_1000=y
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
-# CONFIG_E1000E is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SIS190 is not set
-# CONFIG_SKGE is not set
-# CONFIG_SKY2 is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_VIA_VELOCITY is not set
-# CONFIG_TIGON3 is not set
-# CONFIG_BNX2 is not set
-# CONFIG_MV643XX_ETH is not set
-# CONFIG_QLA3XXX is not set
-# CONFIG_ATL1 is not set
-CONFIG_NETDEV_10000=y
-# CONFIG_CHELSIO_T1 is not set
-# CONFIG_CHELSIO_T3 is not set
-# CONFIG_IXGBE is not set
-# CONFIG_IXGB is not set
-# CONFIG_S2IO is not set
-# CONFIG_MYRI10GE is not set
-# CONFIG_NETXEN_NIC is not set
-# CONFIG_NIU is not set
-# CONFIG_MLX4_CORE is not set
-# CONFIG_TEHUTI is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_B44 is not set
+CONFIG_FEC_MPC52xx=y
+CONFIG_FEC_MPC52xx_MDIO=y
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
 # CONFIG_TR is not set
 
 #
@@ -560,6 +647,15 @@ CONFIG_NETDEV_10000=y
 #
 # CONFIG_WLAN_PRE80211 is not set
 # CONFIG_WLAN_80211 is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
 # CONFIG_WAN is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
@@ -603,21 +699,78 @@ CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_SERIAL_MPC52xx=y
 CONFIG_SERIAL_MPC52xx_CONSOLE=y
-CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=9600
+CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200
 # CONFIG_SERIAL_JSM is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_HVC_RTAS is not set
 # CONFIG_IPMI_HANDLER is not set
 # CONFIG_HW_RANDOM is not set
 # CONFIG_NVRAM is not set
-# CONFIG_GEN_RTC is not set
+CONFIG_GEN_RTC=y
+# CONFIG_GEN_RTC_X is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
 # CONFIG_RAW_DRIVER is not set
 # CONFIG_TCG_TPM is not set
 CONFIG_DEVPORT=y
-# CONFIG_I2C is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_PIIX4 is not set
+CONFIG_I2C_MPC=y
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_M41T00 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
 
 #
 # SPI support
@@ -626,8 +779,77 @@ CONFIG_DEVPORT=y
 # CONFIG_SPI_MASTER is not set
 # CONFIG_W1 is not set
 # CONFIG_POWER_SUPPLY is not set
-# CONFIG_HWMON is not set
-# CONFIG_WATCHDOG is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_AD7418 is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_I5K_AMB is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_F75375S is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SIS5595 is not set
+# CONFIG_SENSORS_DME1737 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_VT8231 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_MPC5200_WDT is not set
+# CONFIG_WATCHDOG_RTAS is not set
+
+#
+# PCI-based Watchdog Cards
+#
+# CONFIG_PCIPCWATCHDOG is not set
+# CONFIG_WDTPCI is not set
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
 
 #
 # Sonics Silicon Backplane
@@ -645,7 +867,8 @@ CONFIG_SSB_POSSIBLE=y
 #
 # CONFIG_VIDEO_DEV is not set
 # CONFIG_DVB_CORE is not set
-# CONFIG_DAB is not set
+CONFIG_DAB=y
+# CONFIG_USB_DABUSB is not set
 
 #
 # Graphics support
@@ -670,18 +893,125 @@ CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
 CONFIG_USB_ARCH_HAS_EHCI=y
-# CONFIG_USB is not set
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+# CONFIG_USB_DEVICE_CLASS is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_EHCI_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PPC_SOC=y
+CONFIG_USB_OHCI_HCD_PPC_OF=y
+CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
+# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
+CONFIG_USB_OHCI_HCD_PCI=y
+CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
+CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_UHCI_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
 
 #
 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
 #
 
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=y
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
 #
 # USB Gadget Support
 #
 # CONFIG_USB_GADGET is not set
 # CONFIG_MMC is not set
-# CONFIG_NEW_LEDS is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
 # CONFIG_INFINIBAND is not set
 # CONFIG_EDAC is not set
 # CONFIG_RTC_CLASS is not set
@@ -729,8 +1059,11 @@ CONFIG_DNOTIFY=y
 #
 # DOS/FAT/NT Filesystems
 #
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 # CONFIG_NTFS_FS is not set
 
 #
@@ -755,15 +1088,39 @@ CONFIG_TMPFS=y
 # CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_CRAMFS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+CONFIG_CRAMFS=y
 # CONFIG_VXFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
 CONFIG_NETWORK_FILESYSTEMS=y
-# CONFIG_NFS_FS is not set
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
 # CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
@@ -775,19 +1132,61 @@ CONFIG_NETWORK_FILESYSTEMS=y
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_NLS is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
 # CONFIG_DLM is not set
 # CONFIG_UCC_SLOW is not set
 
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
 # CONFIG_CRC_ITU_T is not set
-# CONFIG_CRC32 is not set
+CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
 # CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
 CONFIG_PLIST=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
@@ -842,6 +1241,46 @@ CONFIG_FORCED_INLINING=y
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
-# CONFIG_CRYPTO is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_ECB is not set
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+CONFIG_CRYPTO_HW=y
 CONFIG_PPC_CLOCK=y
 CONFIG_PPC_LIB_RHEAP=y
index c34986835a4e6f80593ed4588b0bf681f5628c9c..11b4f6d9ffcecfb3fde2d60cd4c05dcee66ad832 100644 (file)
@@ -903,6 +903,7 @@ handle_page_fault:
  * the PTE insertion
  */
 12:    bl      .save_nvgprs
+       mr      r5,r3
        addi    r3,r1,STACK_FRAME_OVERHEAD
        ld      r4,_DAR(r1)
        bl      .low_hash_fault
index 47c3fe55242faa388703bb4ac7a59e7884ba4e04..a3c406aca6643d04ed6a7351086bfa0d1a4b2738 100644 (file)
@@ -278,6 +278,7 @@ int iommu_map_sg(struct iommu_table *tbl, struct scatterlist *sglist,
        unsigned long flags;
        struct scatterlist *s, *outs, *segstart;
        int outcount, incount, i;
+       unsigned int align;
        unsigned long handle;
 
        BUG_ON(direction == DMA_NONE);
@@ -309,7 +310,12 @@ int iommu_map_sg(struct iommu_table *tbl, struct scatterlist *sglist,
                /* Allocate iommu entries for that segment */
                vaddr = (unsigned long) sg_virt(s);
                npages = iommu_num_pages(vaddr, slen);
-               entry = iommu_range_alloc(tbl, npages, &handle, mask >> IOMMU_PAGE_SHIFT, 0);
+               align = 0;
+               if (IOMMU_PAGE_SHIFT < PAGE_SHIFT && slen >= PAGE_SIZE &&
+                   (vaddr & ~PAGE_MASK) == 0)
+                       align = PAGE_SHIFT - IOMMU_PAGE_SHIFT;
+               entry = iommu_range_alloc(tbl, npages, &handle,
+                                         mask >> IOMMU_PAGE_SHIFT, align);
 
                DBG("  - vaddr: %lx, size: %lx\n", vaddr, slen);
 
@@ -570,7 +576,7 @@ dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr,
 {
        dma_addr_t dma_handle = DMA_ERROR_CODE;
        unsigned long uaddr;
-       unsigned int npages;
+       unsigned int npages, align;
 
        BUG_ON(direction == DMA_NONE);
 
@@ -578,8 +584,13 @@ dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr,
        npages = iommu_num_pages(uaddr, size);
 
        if (tbl) {
+               align = 0;
+               if (IOMMU_PAGE_SHIFT < PAGE_SHIFT && size >= PAGE_SIZE &&
+                   ((unsigned long)vaddr & ~PAGE_MASK) == 0)
+                       align = PAGE_SHIFT - IOMMU_PAGE_SHIFT;
+
                dma_handle = iommu_alloc(tbl, vaddr, npages, direction,
-                                        mask >> IOMMU_PAGE_SHIFT, 0);
+                                        mask >> IOMMU_PAGE_SHIFT, align);
                if (dma_handle == DMA_ERROR_CODE) {
                        if (printk_ratelimit())  {
                                printk(KERN_INFO "iommu_alloc failed, "
index 1add6efdb315065e4b424114944911ddb89a3c0e..5d89a21dd0d69b793989c79d169e6ce6fab60020 100644 (file)
@@ -2216,6 +2216,45 @@ static void __init fixup_device_tree_efika(void)
                        prom_printf("fixup_device_tree_efika: ",
                                "skipped entry %x - setprop error\n", i);
        }
+
+       /* Make sure ethernet mdio bus node exists */
+       node = call_prom("finddevice", 1, 1, ADDR("/builtin/mdio"));
+       if (!PHANDLE_VALID(node)) {
+               prom_printf("Adding Ethernet MDIO node\n");
+               call_prom("interpret", 1, 1,
+                       " s\" /builtin\" find-device"
+                       " new-device"
+                               " 1 encode-int s\" #address-cells\" property"
+                               " 0 encode-int s\" #size-cells\" property"
+                               " s\" mdio\" 2dup device-name device-type"
+                               " s\" mpc5200b-fec-phy\" encode-string"
+                               " s\" compatible\" property"
+                               " 0xf0003000 0x400 reg"
+                               " 0x2 encode-int"
+                               " 0x5 encode-int encode+"
+                               " 0x3 encode-int encode+"
+                               " s\" interrupts\" property"
+                       " finish-device");
+       };
+
+       /* Make sure ethernet phy device node exist */
+       node = call_prom("finddevice", 1, 1, ADDR("/builtin/mdio/ethernet-phy"));
+       if (!PHANDLE_VALID(node)) {
+               prom_printf("Adding Ethernet PHY node\n");
+               call_prom("interpret", 1, 1,
+                       " s\" /builtin/mdio\" find-device"
+                       " new-device"
+                               " s\" ethernet-phy\" device-name"
+                               " 0x10 encode-int s\" reg\" property"
+                               " my-self"
+                               " ihandle>phandle"
+                       " finish-device"
+                       " s\" /builtin/ethernet\" find-device"
+                               " encode-int"
+                               " s\" phy-handle\" property"
+                       " device-end");
+       }
+
 }
 #else
 #define fixup_device_tree_efika()
index 20629ae95c50102f146190d968280edaf07a168d..41649a5d3602c97201021ff8ff35ec408d0e7515 100644 (file)
@@ -22,3 +22,4 @@ obj-$(CONFIG_FSL_BOOKE)               += fsl_booke_mmu.o
 obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o
 obj-$(CONFIG_PPC_MM_SLICES)    += slice.o
 obj-$(CONFIG_HUGETLB_PAGE)     += hugetlbpage.o
+obj-$(CONFIG_PPC_SUBPAGE_PROT) += subpage-prot.o
index e935edd6b72b44645ddf9a6d82af9c8e0b02c13b..21d248486479e29b2f6e59d026b29e812ab26c67 100644 (file)
@@ -331,7 +331,8 @@ htab_pte_insert_failure:
  *****************************************************************************/
 
 /* _hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid,
- *              pte_t *ptep, unsigned long trap, int local, int ssize)
+ *              pte_t *ptep, unsigned long trap, int local, int ssize,
+ *              int subpg_prot)
  */
 
 /*
@@ -429,12 +430,19 @@ END_FTR_SECTION_IFSET(CPU_FTR_1T_SEGMENT)
        xor     r28,r28,r0              /* hash */
 
        /* Convert linux PTE bits into HW equivalents */
-4:     andi.   r3,r30,0x1fe            /* Get basic set of flags */
-       xori    r3,r3,HPTE_R_N          /* _PAGE_EXEC -> NOEXEC */
+4:
+#ifdef CONFIG_PPC_SUBPAGE_PROT
+       andc    r10,r30,r10
+       andi.   r3,r10,0x1fe            /* Get basic set of flags */
+       rlwinm  r0,r10,32-9+1,30,30     /* _PAGE_RW -> _PAGE_USER (r0) */
+#else
+       andi.   r3,r30,0x1fe            /* Get basic set of flags */
        rlwinm  r0,r30,32-9+1,30,30     /* _PAGE_RW -> _PAGE_USER (r0) */
+#endif
+       xori    r3,r3,HPTE_R_N          /* _PAGE_EXEC -> NOEXEC */
        rlwinm  r4,r30,32-7+1,30,30     /* _PAGE_DIRTY -> _PAGE_USER (r4) */
        and     r0,r0,r4                /* _PAGE_RW & _PAGE_DIRTY ->r0 bit 30*/
-       andc    r0,r30,r0               /* r0 = pte & ~r0 */
+       andc    r0,r3,r0                /* r0 = pte & ~r0 */
        rlwimi  r3,r0,32-1,31,31        /* Insert result into PP lsb */
        ori     r3,r3,HPTE_R_C          /* Always add "C" bit for perf. */
 
index 9326a6962b42987ab991c412760a70d8f49a10cd..7b4cacb0d4ba7f0079416cdf979aa9761fed2693 100644 (file)
@@ -637,7 +637,7 @@ unsigned int hash_page_do_lazy_icache(unsigned int pp, pte_t pte, int trap)
  * For now this makes the whole process use 4k pages.
  */
 #ifdef CONFIG_PPC_64K_PAGES
-static void demote_segment_4k(struct mm_struct *mm, unsigned long addr)
+void demote_segment_4k(struct mm_struct *mm, unsigned long addr)
 {
        if (mm->context.user_psize == MMU_PAGE_4K)
                return;
@@ -645,13 +645,62 @@ static void demote_segment_4k(struct mm_struct *mm, unsigned long addr)
 #ifdef CONFIG_SPU_BASE
        spu_flush_all_slbs(mm);
 #endif
+       if (get_paca()->context.user_psize != MMU_PAGE_4K) {
+               get_paca()->context = mm->context;
+               slb_flush_and_rebolt();
+       }
 }
 #endif /* CONFIG_PPC_64K_PAGES */
 
+#ifdef CONFIG_PPC_SUBPAGE_PROT
+/*
+ * This looks up a 2-bit protection code for a 4k subpage of a 64k page.
+ * Userspace sets the subpage permissions using the subpage_prot system call.
+ *
+ * Result is 0: full permissions, _PAGE_RW: read-only,
+ * _PAGE_USER or _PAGE_USER|_PAGE_RW: no access.
+ */
+static int subpage_protection(pgd_t *pgdir, unsigned long ea)
+{
+       struct subpage_prot_table *spt = pgd_subpage_prot(pgdir);
+       u32 spp = 0;
+       u32 **sbpm, *sbpp;
+
+       if (ea >= spt->maxaddr)
+               return 0;
+       if (ea < 0x100000000) {
+               /* addresses below 4GB use spt->low_prot */
+               sbpm = spt->low_prot;
+       } else {
+               sbpm = spt->protptrs[ea >> SBP_L3_SHIFT];
+               if (!sbpm)
+                       return 0;
+       }
+       sbpp = sbpm[(ea >> SBP_L2_SHIFT) & (SBP_L2_COUNT - 1)];
+       if (!sbpp)
+               return 0;
+       spp = sbpp[(ea >> PAGE_SHIFT) & (SBP_L1_COUNT - 1)];
+
+       /* extract 2-bit bitfield for this 4k subpage */
+       spp >>= 30 - 2 * ((ea >> 12) & 0xf);
+
+       /* turn 0,1,2,3 into combination of _PAGE_USER and _PAGE_RW */
+       spp = ((spp & 2) ? _PAGE_USER : 0) | ((spp & 1) ? _PAGE_RW : 0);
+       return spp;
+}
+
+#else /* CONFIG_PPC_SUBPAGE_PROT */
+static inline int subpage_protection(pgd_t *pgdir, unsigned long ea)
+{
+       return 0;
+}
+#endif
+
 /* Result code is:
  *  0 - handled
  *  1 - normal page fault
  * -1 - critical hash insertion error
+ * -2 - access not permitted by subpage protection mechanism
  */
 int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
 {
@@ -802,7 +851,14 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
                rc = __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize);
        else
 #endif /* CONFIG_PPC_HAS_HASH_64K */
-               rc = __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize);
+       {
+               int spp = subpage_protection(pgdir, ea);
+               if (access & spp)
+                       rc = -2;
+               else
+                       rc = __hash_page_4K(ea, access, vsid, ptep, trap,
+                                           local, ssize, spp);
+       }
 
 #ifndef CONFIG_PPC_64K_PAGES
        DBG_LOW(" o-pte: %016lx\n", pte_val(*ptep));
@@ -874,7 +930,8 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
                __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize);
        else
 #endif /* CONFIG_PPC_HAS_HASH_64K */
-               __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize);
+               __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize,
+                              subpage_protection(pgdir, ea));
 
        local_irq_restore(flags);
 }
@@ -919,19 +976,17 @@ void flush_hash_range(unsigned long number, int local)
  * low_hash_fault is called when we the low level hash code failed
  * to instert a PTE due to an hypervisor error
  */
-void low_hash_fault(struct pt_regs *regs, unsigned long address)
+void low_hash_fault(struct pt_regs *regs, unsigned long address, int rc)
 {
        if (user_mode(regs)) {
-               siginfo_t info;
-
-               info.si_signo = SIGBUS;
-               info.si_errno = 0;
-               info.si_code = BUS_ADRERR;
-               info.si_addr = (void __user *)address;
-               force_sig_info(SIGBUS, &info, current);
-               return;
-       }
-       bad_page_fault(regs, address, SIGBUS);
+#ifdef CONFIG_PPC_SUBPAGE_PROT
+               if (rc == -2)
+                       _exception(SIGSEGV, regs, SEGV_ACCERR, address);
+               else
+#endif
+                       _exception(SIGBUS, regs, BUS_ADRERR, address);
+       } else
+               bad_page_fault(regs, address, SIGBUS);
 }
 
 #ifdef CONFIG_DEBUG_PAGEALLOC
index 3cf0802cd2b6b23078dc3d12aeb254480a563771..47b06bad24adbb8e4c857f782df2fdc30ac779fb 100644 (file)
@@ -295,6 +295,8 @@ void slb_initialize(void)
 
        create_shadowed_slbe(VMALLOC_START, mmu_kernel_ssize, vflags, 1);
 
+       slb_shadow_clear(2);
+
        /* We don't bolt the stack for the time being - we're in boot,
         * so the stack is in the bolted segment.  By the time it goes
         * elsewhere, we'll call _switch() which will bolt in the new
diff --git a/arch/powerpc/mm/subpage-prot.c b/arch/powerpc/mm/subpage-prot.c
new file mode 100644 (file)
index 0000000..4cafc0c
--- /dev/null
@@ -0,0 +1,213 @@
+/*
+ * Copyright 2007-2008 Paul Mackerras, IBM Corp.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/errno.h>
+#include <linux/kernel.h>
+#include <linux/gfp.h>
+#include <linux/slab.h>
+#include <linux/types.h>
+#include <linux/mm.h>
+#include <linux/hugetlb.h>
+
+#include <asm/pgtable.h>
+#include <asm/uaccess.h>
+#include <asm/tlbflush.h>
+
+/*
+ * Free all pages allocated for subpage protection maps and pointers.
+ * Also makes sure that the subpage_prot_table structure is
+ * reinitialized for the next user.
+ */
+void subpage_prot_free(pgd_t *pgd)
+{
+       struct subpage_prot_table *spt = pgd_subpage_prot(pgd);
+       unsigned long i, j, addr;
+       u32 **p;
+
+       for (i = 0; i < 4; ++i) {
+               if (spt->low_prot[i]) {
+                       free_page((unsigned long)spt->low_prot[i]);
+                       spt->low_prot[i] = NULL;
+               }
+       }
+       addr = 0;
+       for (i = 0; i < 2; ++i) {
+               p = spt->protptrs[i];
+               if (!p)
+                       continue;
+               spt->protptrs[i] = NULL;
+               for (j = 0; j < SBP_L2_COUNT && addr < spt->maxaddr;
+                    ++j, addr += PAGE_SIZE)
+                       if (p[j])
+                               free_page((unsigned long)p[j]);
+               free_page((unsigned long)p);
+       }
+       spt->maxaddr = 0;
+}
+
+static void hpte_flush_range(struct mm_struct *mm, unsigned long addr,
+                            int npages)
+{
+       pgd_t *pgd;
+       pud_t *pud;
+       pmd_t *pmd;
+       pte_t *pte;
+       spinlock_t *ptl;
+
+       pgd = pgd_offset(mm, addr);
+       if (pgd_none(*pgd))
+               return;
+       pud = pud_offset(pgd, addr);
+       if (pud_none(*pud))
+               return;
+       pmd = pmd_offset(pud, addr);
+       if (pmd_none(*pmd))
+               return;
+       pte = pte_offset_map_lock(mm, pmd, addr, &ptl);
+       arch_enter_lazy_mmu_mode();
+       for (; npages > 0; --npages) {
+               pte_update(mm, addr, pte, 0, 0);
+               addr += PAGE_SIZE;
+               ++pte;
+       }
+       arch_leave_lazy_mmu_mode();
+       pte_unmap_unlock(pte - 1, ptl);
+}
+
+/*
+ * Clear the subpage protection map for an address range, allowing
+ * all accesses that are allowed by the pte permissions.
+ */
+static void subpage_prot_clear(unsigned long addr, unsigned long len)
+{
+       struct mm_struct *mm = current->mm;
+       struct subpage_prot_table *spt = pgd_subpage_prot(mm->pgd);
+       u32 **spm, *spp;
+       int i, nw;
+       unsigned long next, limit;
+
+       down_write(&mm->mmap_sem);
+       limit = addr + len;
+       if (limit > spt->maxaddr)
+               limit = spt->maxaddr;
+       for (; addr < limit; addr = next) {
+               next = pmd_addr_end(addr, limit);
+               if (addr < 0x100000000) {
+                       spm = spt->low_prot;
+               } else {
+                       spm = spt->protptrs[addr >> SBP_L3_SHIFT];
+                       if (!spm)
+                               continue;
+               }
+               spp = spm[(addr >> SBP_L2_SHIFT) & (SBP_L2_COUNT - 1)];
+               if (!spp)
+                       continue;
+               spp += (addr >> PAGE_SHIFT) & (SBP_L1_COUNT - 1);
+
+               i = (addr >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
+               nw = PTRS_PER_PTE - i;
+               if (addr + (nw << PAGE_SHIFT) > next)
+                       nw = (next - addr) >> PAGE_SHIFT;
+
+               memset(spp, 0, nw * sizeof(u32));
+
+               /* now flush any existing HPTEs for the range */
+               hpte_flush_range(mm, addr, nw);
+       }
+       up_write(&mm->mmap_sem);
+}
+
+/*
+ * Copy in a subpage protection map for an address range.
+ * The map has 2 bits per 4k subpage, so 32 bits per 64k page.
+ * Each 2-bit field is 0 to allow any access, 1 to prevent writes,
+ * 2 or 3 to prevent all accesses.
+ * Note that the normal page protections also apply; the subpage
+ * protection mechanism is an additional constraint, so putting 0
+ * in a 2-bit field won't allow writes to a page that is otherwise
+ * write-protected.
+ */
+long sys_subpage_prot(unsigned long addr, unsigned long len, u32 __user *map)
+{
+       struct mm_struct *mm = current->mm;
+       struct subpage_prot_table *spt = pgd_subpage_prot(mm->pgd);
+       u32 **spm, *spp;
+       int i, nw;
+       unsigned long next, limit;
+       int err;
+
+       /* Check parameters */
+       if ((addr & ~PAGE_MASK) || (len & ~PAGE_MASK) ||
+           addr >= TASK_SIZE || len >= TASK_SIZE || addr + len > TASK_SIZE)
+               return -EINVAL;
+
+       if (is_hugepage_only_range(mm, addr, len))
+               return -EINVAL;
+
+       if (!map) {
+               /* Clear out the protection map for the address range */
+               subpage_prot_clear(addr, len);
+               return 0;
+       }
+
+       if (!access_ok(VERIFY_READ, map, (len >> PAGE_SHIFT) * sizeof(u32)))
+               return -EFAULT;
+
+       down_write(&mm->mmap_sem);
+       for (limit = addr + len; addr < limit; addr = next) {
+               next = pmd_addr_end(addr, limit);
+               err = -ENOMEM;
+               if (addr < 0x100000000) {
+                       spm = spt->low_prot;
+               } else {
+                       spm = spt->protptrs[addr >> SBP_L3_SHIFT];
+                       if (!spm) {
+                               spm = (u32 **)get_zeroed_page(GFP_KERNEL);
+                               if (!spm)
+                                       goto out;
+                               spt->protptrs[addr >> SBP_L3_SHIFT] = spm;
+                       }
+               }
+               spm += (addr >> SBP_L2_SHIFT) & (SBP_L2_COUNT - 1);
+               spp = *spm;
+               if (!spp) {
+                       spp = (u32 *)get_zeroed_page(GFP_KERNEL);
+                       if (!spp)
+                               goto out;
+                       *spm = spp;
+               }
+               spp += (addr >> PAGE_SHIFT) & (SBP_L1_COUNT - 1);
+
+               local_irq_disable();
+               demote_segment_4k(mm, addr);
+               local_irq_enable();
+
+               i = (addr >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
+               nw = PTRS_PER_PTE - i;
+               if (addr + (nw << PAGE_SHIFT) > next)
+                       nw = (next - addr) >> PAGE_SHIFT;
+
+               up_write(&mm->mmap_sem);
+               err = -EFAULT;
+               if (__copy_from_user(spp, map, nw * sizeof(u32)))
+                       goto out2;
+               map += nw;
+               down_write(&mm->mmap_sem);
+
+               /* now flush any existing HPTEs for the range */
+               hpte_flush_range(mm, addr, nw);
+       }
+       if (limit > spt->maxaddr)
+               spt->maxaddr = limit;
+       err = 0;
+ out:
+       up_write(&mm->mmap_sem);
+ out2:
+       return err;
+}
index 2938d4927b83b0e20879dbbaa84c25557362d833..733a8063d40099ea0d42bc9f7c9c5ace3507134c 100644 (file)
@@ -19,6 +19,28 @@ config PPC_MPC5200_BUGFIX
 
          It is safe to say 'Y' here
 
+config PPC_MPC5200_SIMPLE
+       bool "Generic support for simple MPC5200 based boards"
+       depends on PPC_MULTIPLATFORM && PPC32
+       select PPC_MPC5200
+       select DEFAULT_UIMAGE
+       select WANT_DEVICE_TREE
+       default n
+       help
+         This option enables support for a simple MPC52xx based boards which
+         do not need a custom platform specific setup. Such boards are
+         supported assuming the following:
+
+         - GPIO pins are configured by the firmware,
+         - CDM configuration (clocking) is setup correctly by firmware,
+         - if the 'fsl,has-wdt' property is present in one of the
+           gpt nodes, then it is safe to use such gpt to reset the board,
+         - PCI is supported if enabled in the kernel configuration
+           and if there is a PCI bus node defined in the device tree.
+
+         Boards that are compatible with this generic platform support
+         are: 'tqc,tqm5200', 'promess,motionpro', 'schindler,cm5200'.
+
 config PPC_EFIKA
        bool "bPlan Efika 5k2. MPC5200B based computer"
        depends on PPC_MULTIPLATFORM && PPC32
@@ -31,8 +53,7 @@ config PPC_EFIKA
 config PPC_LITE5200
        bool "Freescale Lite5200 Eval Board"
        depends on PPC_MULTIPLATFORM && PPC32
-       select WANT_DEVICE_TREE
        select PPC_MPC5200
+       select DEFAULT_UIMAGE
+       select WANT_DEVICE_TREE
        default n
-
-
index 307dbc178091954ef91f9afb2a0d08bbc8d301c1..fe1b81bb522426d5678dbbe8f127152718c4f98f 100644 (file)
@@ -6,6 +6,7 @@ obj-y                           += mpc52xx_pic.o mpc52xx_common.o
 obj-$(CONFIG_PCI)              += mpc52xx_pci.o
 endif
 
+obj-$(CONFIG_PPC_MPC5200_SIMPLE) += mpc5200_simple.o
 obj-$(CONFIG_PPC_EFIKA)                += efika.o
 obj-$(CONFIG_PPC_LITE5200)     += lite5200.o
 
index 25d2bfa3d9dc0237c0c7d2299e94c863eaeade20..5a8d190f53e4303a86037d4eaa6e688f050d1614 100644 (file)
 static void __init
 lite5200_fix_clock_config(void)
 {
+       struct device_node *np;
        struct mpc52xx_cdm  __iomem *cdm;
 
        /* Map zones */
-       cdm = mpc52xx_find_and_map("mpc5200-cdm");
+       np = of_find_compatible_node(NULL, NULL, "mpc5200-cdm");
+       cdm = of_iomap(np, 0);
+       of_node_put(np);
        if (!cdm) {
                printk(KERN_ERR "%s() failed; expect abnormal behaviour\n",
                       __FUNCTION__);
@@ -74,10 +77,13 @@ lite5200_fix_clock_config(void)
 static void __init
 lite5200_fix_port_config(void)
 {
+       struct device_node *np;
        struct mpc52xx_gpio __iomem *gpio;
        u32 port_config;
 
-       gpio = mpc52xx_find_and_map("mpc5200-gpio");
+       np = of_find_compatible_node(NULL, NULL, "mpc5200-gpio");
+       gpio = of_iomap(np, 0);
+       of_node_put(np);
        if (!gpio) {
                printk(KERN_ERR "%s() failed. expect abnormal behavior\n",
                       __FUNCTION__);
@@ -131,10 +137,6 @@ static void lite5200_resume_finish(void __iomem *mbar)
 
 static void __init lite5200_setup_arch(void)
 {
-#ifdef CONFIG_PCI
-       struct device_node *np;
-#endif
-
        if (ppc_md.progress)
                ppc_md.progress("lite5200_setup_arch()", 0);
 
@@ -154,13 +156,7 @@ static void __init lite5200_setup_arch(void)
        lite5200_pm_init();
 #endif
 
-#ifdef CONFIG_PCI
-       np = of_find_node_by_type(NULL, "pci");
-       if (np) {
-               mpc52xx_add_bridge(np);
-               of_node_put(np);
-       }
-#endif
+       mpc52xx_setup_pci();
 }
 
 /*
index ffa14aff5248f7d18193c9fa20ba247533bb454c..c3ada1e340d255ab05f8c711bb02545fd768af47 100644 (file)
@@ -42,6 +42,8 @@ static int lite5200_pm_set_target(suspend_state_t state)
 
 static int lite5200_pm_prepare(void)
 {
+       struct device_node *np;
+
        /* deep sleep? let mpc52xx code handle that */
        if (lite5200_pm_target_state == PM_SUSPEND_STANDBY)
                return mpc52xx_pm_prepare();
@@ -50,7 +52,9 @@ static int lite5200_pm_prepare(void)
                return -EINVAL;
 
        /* map registers */
-       mbar = mpc52xx_find_and_map("mpc5200");
+       np = of_find_compatible_node(NULL, NULL, "mpc5200");
+       mbar = of_iomap(np, 0);
+       of_node_put(np);
        if (!mbar) {
                printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__);
                return -ENOSYS;
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c
new file mode 100644 (file)
index 0000000..754aa93
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Support for 'mpc5200-simple-platform' compatible boards.
+ *
+ * Written by Marian Balakowicz <m8@semihalf.com>
+ * Copyright (C) 2007 Semihalf
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ * Description:
+ * This code implements support for a simple MPC52xx based boards which
+ * do not need a custom platform specific setup. Such boards are
+ * supported assuming the following:
+ *
+ * - GPIO pins are configured by the firmware,
+ * - CDM configuration (clocking) is setup correctly by firmware,
+ * - if the 'fsl,has-wdt' property is present in one of the
+ *   gpt nodes, then it is safe to use such gpt to reset the board,
+ * - PCI is supported if enabled in the kernel configuration
+ *   and if there is a PCI bus node defined in the device tree.
+ *
+ * Boards that are compatible with this generic platform support
+ * are listed in a 'board' table.
+ */
+
+#undef DEBUG
+#include <asm/time.h>
+#include <asm/prom.h>
+#include <asm/machdep.h>
+#include <asm/mpc52xx.h>
+
+/*
+ * Setup the architecture
+ */
+static void __init mpc5200_simple_setup_arch(void)
+{
+       if (ppc_md.progress)
+               ppc_md.progress("mpc5200_simple_setup_arch()", 0);
+
+       /* Some mpc5200 & mpc5200b related configuration */
+       mpc5200_setup_xlb_arbiter();
+
+       /* Map wdt for mpc52xx_restart() */
+       mpc52xx_map_wdt();
+
+       mpc52xx_setup_pci();
+}
+
+/* list of the supported boards */
+static char *board[] __initdata = {
+       "promess,motionpro",
+       "schindler,cm5200",
+       "tqc,tqm5200",
+       NULL
+};
+
+/*
+ * Called very early, MMU is off, device-tree isn't unflattened
+ */
+static int __init mpc5200_simple_probe(void)
+{
+       unsigned long node = of_get_flat_dt_root();
+       int i = 0;
+
+       while (board[i]) {
+               if (of_flat_dt_is_compatible(node, board[i]))
+                       break;
+               i++;
+       }
+       
+       return (board[i] != NULL);
+}
+
+define_machine(mpc5200_simple_platform) {
+       .name           = "mpc5200-simple-platform",
+       .probe          = mpc5200_simple_probe,
+       .setup_arch     = mpc5200_simple_setup_arch,
+       .init           = mpc52xx_declare_of_platform_devices,
+       .init_IRQ       = mpc52xx_init_irq,
+       .get_irq        = mpc52xx_get_irq,
+       .restart        = mpc52xx_restart,
+       .calibrate_decr = generic_calibrate_decr,
+};
index 9850685c542999c69a89ee65c94cba2b750e7b5e..66955937be2a9d32ffc3e4ad1888fbee7df9df4b 100644 (file)
  */
 static volatile struct mpc52xx_gpt *mpc52xx_wdt = NULL;
 
-static void __iomem *
-mpc52xx_map_node(struct device_node *ofn)
-{
-       const u32 *regaddr_p;
-       u64 regaddr64, size64;
-
-       if (!ofn)
-               return NULL;
-
-       regaddr_p = of_get_address(ofn, 0, &size64, NULL);
-       if (!regaddr_p) {
-               of_node_put(ofn);
-               return NULL;
-       }
-
-       regaddr64 = of_translate_address(ofn, regaddr_p);
-
-       of_node_put(ofn);
-
-       return ioremap((u32)regaddr64, (u32)size64);
-}
-
-void __iomem *
-mpc52xx_find_and_map(const char *compatible)
-{
-       return mpc52xx_map_node(
-               of_find_compatible_node(NULL, NULL, compatible));
-}
-
-EXPORT_SYMBOL(mpc52xx_find_and_map);
-
-void __iomem *
-mpc52xx_find_and_map_path(const char *path)
-{
-       return mpc52xx_map_node(of_find_node_by_path(path));
-}
-
-EXPORT_SYMBOL(mpc52xx_find_and_map_path);
-
 /**
  *     mpc52xx_find_ipb_freq - Find the IPB bus frequency for a device
  *     @node:  device node
@@ -101,9 +62,12 @@ EXPORT_SYMBOL(mpc52xx_find_ipb_freq);
 void __init
 mpc5200_setup_xlb_arbiter(void)
 {
+       struct device_node *np;
        struct mpc52xx_xlb  __iomem *xlb;
 
-       xlb = mpc52xx_find_and_map("mpc5200-xlb");
+       np = of_find_compatible_node(NULL, NULL, "mpc5200-xlb");
+       xlb = of_iomap(np, 0);
+       of_node_put(np);
        if (!xlb) {
                printk(KERN_ERR __FILE__ ": "
                        "Error mapping XLB in mpc52xx_setup_cpu().  "
@@ -124,11 +88,21 @@ mpc5200_setup_xlb_arbiter(void)
        iounmap(xlb);
 }
 
+static struct of_device_id mpc52xx_bus_ids[] __initdata= {
+       { .compatible = "fsl,mpc5200-immr", },
+       { .compatible = "fsl,lpb", },
+
+       /* depreciated matches; shouldn't be used in new device trees */
+       { .type = "builtin", .compatible = "mpc5200", }, /* efika */
+       { .type = "soc", .compatible = "mpc5200", }, /* lite5200 */
+       {},
+};
+
 void __init
 mpc52xx_declare_of_platform_devices(void)
 {
        /* Find every child of the SOC node and add it to of_platform */
-       if (of_platform_bus_probe(NULL, NULL, NULL))
+       if (of_platform_bus_probe(NULL, mpc52xx_bus_ids, NULL))
                printk(KERN_ERR __FILE__ ": "
                        "Error while probing of_platform bus\n");
 }
@@ -146,16 +120,19 @@ mpc52xx_map_wdt(void)
        for_each_compatible_node(np, NULL, "fsl,mpc5200-gpt") {
                has_wdt = of_get_property(np, "fsl,has-wdt", NULL);
                if (has_wdt) {
-                       mpc52xx_wdt = mpc52xx_map_node(np);
+                       mpc52xx_wdt = of_iomap(np, 0);
+                       of_node_put(np);
                        return;
                }
        }
        for_each_compatible_node(np, NULL, "mpc5200-gpt") {
                has_wdt = of_get_property(np, "has-wdt", NULL);
                if (has_wdt) {
-                       mpc52xx_wdt = mpc52xx_map_node(np);
+                       mpc52xx_wdt = of_iomap(np, 0);
+                       of_node_put(np);
                        return;
                }
+
        }
 }
 
index 262eda8659d07ef31be4cc715153f5cc5943032d..4b79398b2e406e6301750b9987f180fc0b90d0eb 100644 (file)
@@ -406,3 +406,17 @@ mpc52xx_add_bridge(struct device_node *node)
 
        return 0;
 }
+
+void __init mpc52xx_setup_pci(void)
+{
+       struct device_node *pci;
+
+       pci = of_find_compatible_node(NULL, NULL, "fsl,mpc5200-pci");
+       if (!pci)
+               pci = of_find_compatible_node(NULL, NULL, "mpc5200-pci");
+       if (!pci)
+               return;
+
+       mpc52xx_add_bridge(pci);
+       of_node_put(pci);
+}
index 61100f270c6872a0fd6fdec0e409c701dee69427..07e89876d5829f281a4263041450b0339c8e9d2d 100644 (file)
@@ -364,16 +364,18 @@ void __init mpc52xx_init_irq(void)
 {
        u32 intr_ctrl;
        struct device_node *picnode;
+       struct device_node *np;
 
        /* Remap the necessary zones */
        picnode = of_find_compatible_node(NULL, NULL, "mpc5200-pic");
-
-       intr = mpc52xx_find_and_map("mpc5200-pic");
+       intr = of_iomap(picnode, 0);
        if (!intr)
                panic(__FILE__  ": find_and_map failed on 'mpc5200-pic'. "
                                "Check node !");
 
-       sdma = mpc52xx_find_and_map("mpc5200-bestcomm");
+       np = of_find_compatible_node(NULL, NULL, "mpc5200-bestcomm");
+       sdma = of_iomap(np, 0);
+       of_node_put(np);
        if (!sdma)
                panic(__FILE__  ": find_and_map failed on 'mpc5200-bestcomm'. "
                                "Check node !");
index 7ffa7babf25416a8f43a98b7595a468391c75472..52f027789c8f96e3070ef1aaf6ecb215c04088a9 100644 (file)
@@ -59,10 +59,14 @@ int mpc52xx_set_wakeup_gpio(u8 pin, u8 level)
 
 int mpc52xx_pm_prepare(void)
 {
+       struct device_node *np;
+
        /* map the whole register space */
-       mbar = mpc52xx_find_and_map("mpc5200");
+       np = of_find_compatible_node(NULL, NULL, "mpc5200");
+       mbar = of_iomap(np, 0);
+       of_node_put(np);
        if (!mbar) {
-               printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__);
+               pr_err("mpc52xx_pm_prepare(): could not map registers\n");
                return -ENOSYS;
        }
        /* these offsets are from mpc5200 users manual */
index e1e2f6a43019d9618f5da854c07a07bc982de49a..3a963b4a9be0fcca0457e97a980f37bc6a63f4a9 100644 (file)
@@ -88,3 +88,8 @@ config CBE_CPUFREQ_PMI
          but also at lower core voltage.
 
 endmenu
+
+config OPROFILE_CELL
+       def_bool y
+       depends on PPC_CELL_NATIVE && (OPROFILE = m || OPROFILE = y)
+
index 3cd565a04d0a919b901de9faae5996ec4b6b0366..c89964c6fb1fc6c66166af182c6a9735e2cb857b 100644 (file)
@@ -19,6 +19,7 @@ spu-manage-$(CONFIG_PPC_CELLEB)               += spu_manage.o
 spu-manage-$(CONFIG_PPC_CELL_NATIVE)   += spu_manage.o
 
 obj-$(CONFIG_SPU_BASE)                 += spu_callbacks.o spu_base.o \
+                                          spu_notify.o \
                                           spu_syscalls.o spu_fault.o \
                                           $(spu-priv1-y) \
                                           $(spu-manage-y) \
diff --git a/arch/powerpc/platforms/cell/spu_notify.c b/arch/powerpc/platforms/cell/spu_notify.c
new file mode 100644 (file)
index 0000000..34d1569
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Move OProfile dependencies from spufs module to the kernel so it
+ * can run on non-cell PPC.
+ *
+ * Copyright (C) IBM 2005
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#undef DEBUG
+
+#include <linux/module.h>
+#include <asm/spu.h>
+#include "spufs/spufs.h"
+
+static BLOCKING_NOTIFIER_HEAD(spu_switch_notifier);
+
+void spu_switch_notify(struct spu *spu, struct spu_context *ctx)
+{
+       blocking_notifier_call_chain(&spu_switch_notifier,
+                                    ctx ? ctx->object_id : 0, spu);
+}
+EXPORT_SYMBOL_GPL(spu_switch_notify);
+
+int spu_switch_event_register(struct notifier_block *n)
+{
+       int ret;
+       ret = blocking_notifier_chain_register(&spu_switch_notifier, n);
+       if (!ret)
+               notify_spus_active();
+       return ret;
+}
+EXPORT_SYMBOL_GPL(spu_switch_event_register);
+
+int spu_switch_event_unregister(struct notifier_block *n)
+{
+       return blocking_notifier_chain_unregister(&spu_switch_notifier, n);
+}
+EXPORT_SYMBOL_GPL(spu_switch_event_unregister);
+
+void spu_set_profile_private_kref(struct spu_context *ctx,
+                                 struct kref *prof_info_kref,
+                                 void (* prof_info_release) (struct kref *kref))
+{
+       ctx->prof_priv_kref = prof_info_kref;
+       ctx->prof_priv_release = prof_info_release;
+}
+EXPORT_SYMBOL_GPL(spu_set_profile_private_kref);
+
+void *spu_get_profile_private_kref(struct spu_context *ctx)
+{
+       return ctx->prof_priv_kref;
+}
+EXPORT_SYMBOL_GPL(spu_get_profile_private_kref);
+