]> Pileus Git - ~andy/linux/commitdiff
Merge tag 'imx35-cam-fb' of git://git.pengutronix.de/git/imx/linux-2.6 into next...
authorArnd Bergmann <arnd@arndb.de>
Thu, 15 Mar 2012 16:27:01 +0000 (16:27 +0000)
committerArnd Bergmann <arnd@arndb.de>
Thu, 15 Mar 2012 16:27:01 +0000 (16:27 +0000)
* tag 'imx35-cam-fb' of git://git.pengutronix.de/git/imx/linux-2.6:
  i.MX35-PDK: Add Camera support
  ARM : mx35: 3ds-board: add framebuffer device

420 files changed:
Documentation/devicetree/bindings/gpio/led.txt
Documentation/devicetree/bindings/vendor-prefixes.txt
Documentation/hwmon/jc42
Documentation/input/alps.txt
Documentation/kernel-parameters.txt
MAINTAINERS
Makefile
arch/alpha/include/asm/futex.h
arch/arm/Kconfig
arch/arm/Kconfig.debug
arch/arm/boot/.gitignore
arch/arm/boot/dts/kirkwood-dreamplug.dts [new file with mode: 0644]
arch/arm/boot/dts/kirkwood.dtsi [new file with mode: 0644]
arch/arm/boot/dts/tegra-paz00.dts
arch/arm/include/asm/pmu.h
arch/arm/include/asm/system.h
arch/arm/kernel/ecard.c
arch/arm/kernel/perf_event.c
arch/arm/kernel/perf_event_v6.c
arch/arm/kernel/perf_event_v7.c
arch/arm/kernel/perf_event_xscale.c
arch/arm/kernel/process.c
arch/arm/mach-at91/at91cap9.c
arch/arm/mach-at91/at91rm9200.c
arch/arm/mach-at91/at91sam9260.c
arch/arm/mach-at91/at91sam9261.c
arch/arm/mach-at91/at91sam9263.c
arch/arm/mach-at91/at91sam9g45.c
arch/arm/mach-at91/at91sam9g45_devices.c
arch/arm/mach-at91/at91sam9rl.c
arch/arm/mach-at91/at91sam9rl_devices.c
arch/arm/mach-at91/at91x40.c
arch/arm/mach-at91/include/mach/system.h [deleted file]
arch/arm/mach-bcmring/core.c
arch/arm/mach-bcmring/include/mach/system.h [deleted file]
arch/arm/mach-clps711x/common.c
arch/arm/mach-clps711x/include/mach/system.h [deleted file]
arch/arm/mach-cns3xxx/include/mach/system.h [deleted file]
arch/arm/mach-davinci/include/mach/system.h [deleted file]
arch/arm/mach-dove/include/mach/system.h [deleted file]
arch/arm/mach-ebsa110/core.c
arch/arm/mach-ebsa110/include/mach/system.h [deleted file]
arch/arm/mach-ep93xx/core.c
arch/arm/mach-ep93xx/include/mach/system.h [deleted file]
arch/arm/mach-ep93xx/vision_ep9307.c
arch/arm/mach-exynos/Kconfig
arch/arm/mach-exynos/common.c
arch/arm/mach-exynos/dma.c
arch/arm/mach-exynos/include/mach/system.h [deleted file]
arch/arm/mach-exynos/mach-nuri.c
arch/arm/mach-exynos/mach-origen.c
arch/arm/mach-exynos/mach-smdkv310.c
arch/arm/mach-exynos/mach-universal_c210.c
arch/arm/mach-footbridge/include/mach/system.h [deleted file]
arch/arm/mach-gemini/Makefile
arch/arm/mach-gemini/idle.c [new file with mode: 0644]
arch/arm/mach-gemini/include/mach/system.h
arch/arm/mach-gemini/irq.c
arch/arm/mach-h720x/common.c
arch/arm/mach-h720x/include/mach/system.h [deleted file]
arch/arm/mach-highbank/include/mach/system.h [deleted file]
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/mach-imx27_visstrim_m10.c
arch/arm/mach-imx/mach-mx31moboard.c
arch/arm/mach-imx/mm-imx3.c
arch/arm/mach-imx/mm-imx5.c
arch/arm/mach-imx/pm-imx27.c
arch/arm/mach-integrator/core.c
arch/arm/mach-integrator/impd1.c
arch/arm/mach-integrator/include/mach/system.h [deleted file]
arch/arm/mach-integrator/integrator_cp.c
arch/arm/mach-iop13xx/include/mach/system.h [deleted file]
arch/arm/mach-iop32x/include/mach/system.h [deleted file]
arch/arm/mach-iop33x/include/mach/system.h [deleted file]
arch/arm/mach-ixp2000/include/mach/system.h [deleted file]
arch/arm/mach-ixp23xx/core.c
arch/arm/mach-ixp23xx/include/mach/system.h [deleted file]
arch/arm/mach-ixp4xx/common.c
arch/arm/mach-ixp4xx/include/mach/system.h [deleted file]
arch/arm/mach-kirkwood/Kconfig
arch/arm/mach-kirkwood/Makefile
arch/arm/mach-kirkwood/Makefile.boot
arch/arm/mach-kirkwood/board-dt.c [new file with mode: 0644]
arch/arm/mach-kirkwood/include/mach/system.h [deleted file]
arch/arm/mach-ks8695/include/mach/system.h [deleted file]
arch/arm/mach-lpc32xx/include/mach/system.h [deleted file]
arch/arm/mach-lpc32xx/phy3250.c
arch/arm/mach-mmp/include/mach/system.h [deleted file]
arch/arm/mach-mmp/mmp2.c
arch/arm/mach-mmp/pxa168.c
arch/arm/mach-mmp/pxa910.c
arch/arm/mach-msm/idle.S [deleted file]
arch/arm/mach-msm/idle.c [new file with mode: 0644]
arch/arm/mach-msm/include/mach/system.h
arch/arm/mach-mv78xx0/include/mach/system.h [deleted file]
arch/arm/mach-mxs/Kconfig
arch/arm/mach-mxs/Makefile
arch/arm/mach-mxs/devices.c
arch/arm/mach-mxs/devices/amba-duart.c
arch/arm/mach-mxs/include/mach/digctl.h
arch/arm/mach-mxs/include/mach/mxs.h
arch/arm/mach-mxs/include/mach/system.h [deleted file]
arch/arm/mach-mxs/include/mach/uncompress.h
arch/arm/mach-mxs/mach-apx4devkit.c [new file with mode: 0644]
arch/arm/mach-mxs/mach-m28evk.c
arch/arm/mach-mxs/mach-mx28evk.c
arch/arm/mach-mxs/pm.c
arch/arm/mach-netx/fb.c
arch/arm/mach-netx/include/mach/system.h [deleted file]
arch/arm/mach-nomadik/board-nhk8815.c
arch/arm/mach-nomadik/cpu-8815.c
arch/arm/mach-nomadik/include/mach/system.h [deleted file]
arch/arm/mach-omap1/Kconfig
arch/arm/mach-omap1/board-ams-delta.c
arch/arm/mach-omap1/include/mach/system.h [deleted file]
arch/arm/mach-omap1/pm.c
arch/arm/mach-omap2/Kconfig
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/am35xx-emac.c [new file with mode: 0644]
arch/arm/mach-omap2/am35xx-emac.h [new file with mode: 0644]
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-am3517evm.c
arch/arm/mach-omap2/board-cm-t3517.c
arch/arm/mach-omap2/board-omap3logic.c
arch/arm/mach-omap2/board-omap3pandora.c
arch/arm/mach-omap2/board-omap4panda.c
arch/arm/mach-omap2/board-rm680.c
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-omap2/emu.c
arch/arm/mach-omap2/id.c
arch/arm/mach-omap2/include/mach/system.h [deleted file]
arch/arm/mach-omap2/mailbox.c
arch/arm/mach-omap2/omap-iommu.c
arch/arm/mach-omap2/omap4-common.c
arch/arm/mach-omap2/pm24xx.c
arch/arm/mach-omap2/pm34xx.c
arch/arm/mach-omap2/pm44xx.c
arch/arm/mach-omap2/prm_common.c
arch/arm/mach-omap2/twl-common.c
arch/arm/mach-orion5x/include/mach/system.h [deleted file]
arch/arm/mach-picoxcell/include/mach/system.h [deleted file]
arch/arm/mach-pnx4008/include/mach/system.h [deleted file]
arch/arm/mach-prima2/include/mach/system.h [deleted file]
arch/arm/mach-pxa/generic.h
arch/arm/mach-pxa/hx4700.c
arch/arm/mach-pxa/include/mach/mfp-pxa27x.h
arch/arm/mach-pxa/include/mach/system.h [deleted file]
arch/arm/mach-pxa/mfp-pxa2xx.c
arch/arm/mach-pxa/pxa25x.c
arch/arm/mach-pxa/pxa27x.c
arch/arm/mach-pxa/pxa3xx.c
arch/arm/mach-pxa/pxa95x.c
arch/arm/mach-realview/core.h
arch/arm/mach-realview/include/mach/irqs-pb1176.h
arch/arm/mach-realview/include/mach/system.h [deleted file]
arch/arm/mach-realview/realview_eb.c
arch/arm/mach-realview/realview_pb1176.c
arch/arm/mach-realview/realview_pb11mp.c
arch/arm/mach-realview/realview_pba8.c
arch/arm/mach-realview/realview_pbx.c
arch/arm/mach-rpc/include/mach/system.h [deleted file]
arch/arm/mach-s3c2410/include/mach/system.h [deleted file]
arch/arm/mach-s3c2412/s3c2412.c
arch/arm/mach-s3c2416/s3c2416.c
arch/arm/mach-s3c2440/common.h
arch/arm/mach-s3c2440/mach-anubis.c
arch/arm/mach-s3c2440/mach-at2440evb.c
arch/arm/mach-s3c2440/mach-gta02.c
arch/arm/mach-s3c2440/mach-mini2440.c
arch/arm/mach-s3c2440/mach-nexcoder.c
arch/arm/mach-s3c2440/mach-osiris.c
arch/arm/mach-s3c2440/mach-rx1950.c
arch/arm/mach-s3c2440/mach-rx3715.c
arch/arm/mach-s3c2440/mach-smdk2440.c
arch/arm/mach-s3c2440/s3c2440.c
arch/arm/mach-s3c2440/s3c244x.c
arch/arm/mach-s3c64xx/Kconfig
arch/arm/mach-s3c64xx/include/mach/system.h [deleted file]
arch/arm/mach-s3c64xx/mach-crag6410-module.c
arch/arm/mach-s3c64xx/mach-crag6410.c
arch/arm/mach-s5p64x0/common.c
arch/arm/mach-s5p64x0/dma.c
arch/arm/mach-s5p64x0/include/mach/system.h [deleted file]
arch/arm/mach-s5pc100/common.c
arch/arm/mach-s5pc100/dma.c
arch/arm/mach-s5pc100/include/mach/system.h [deleted file]
arch/arm/mach-s5pv210/Kconfig
arch/arm/mach-s5pv210/clock.c
arch/arm/mach-s5pv210/common.c
arch/arm/mach-s5pv210/dma.c
arch/arm/mach-s5pv210/include/mach/map.h
arch/arm/mach-s5pv210/include/mach/system.h [deleted file]
arch/arm/mach-s5pv210/mach-aquila.c
arch/arm/mach-s5pv210/mach-smdkc110.c
arch/arm/mach-s5pv210/mach-smdkv210.c
arch/arm/mach-sa1100/include/mach/system.h [deleted file]
arch/arm/mach-shark/core.c
arch/arm/mach-shark/include/mach/system.h [deleted file]
arch/arm/mach-shmobile/include/mach/system.h
arch/arm/mach-spear3xx/include/mach/system.h [deleted file]
arch/arm/mach-spear3xx/spear300.c
arch/arm/mach-spear3xx/spear3xx.c
arch/arm/mach-spear6xx/include/mach/system.h [deleted file]
arch/arm/mach-spear6xx/spear6xx.c
arch/arm/mach-tegra/board-dt-tegra20.c
arch/arm/mach-tegra/board-dt-tegra30.c
arch/arm/mach-tegra/board-harmony-power.c
arch/arm/mach-tegra/common.c
arch/arm/mach-tegra/include/mach/system.h [deleted file]
arch/arm/mach-u300/core.c
arch/arm/mach-u300/include/mach/system.h [deleted file]
arch/arm/mach-ux500/Kconfig
arch/arm/mach-ux500/devices-common.c
arch/arm/mach-ux500/include/mach/system.h [deleted file]
arch/arm/mach-versatile/core.c
arch/arm/mach-versatile/core.h
arch/arm/mach-versatile/include/mach/system.h [deleted file]
arch/arm/mach-versatile/versatile_pb.c
arch/arm/mach-vexpress/Kconfig
arch/arm/mach-vexpress/core.h
arch/arm/mach-vexpress/ct-ca9x4.c
arch/arm/mach-vexpress/include/mach/ct-ca9x4.h
arch/arm/mach-vexpress/include/mach/system.h [deleted file]
arch/arm/mach-vexpress/v2m.c
arch/arm/mach-vt8500/include/mach/system.h
arch/arm/mach-w90x900/dev.c
arch/arm/mach-w90x900/include/mach/system.h [deleted file]
arch/arm/mach-zynq/include/mach/system.h [deleted file]
arch/arm/mm/proc-v7.S
arch/arm/plat-mxc/include/mach/system.h [deleted file]
arch/arm/plat-omap/include/plat/board-ams-delta.h
arch/arm/plat-omap/include/plat/irqs.h
arch/arm/plat-omap/include/plat/system.h [deleted file]
arch/arm/plat-omap/include/plat/uncompress.h
arch/arm/plat-s3c24xx/cpu.c
arch/arm/plat-s3c24xx/dma.c
arch/arm/plat-samsung/devs.c
arch/arm/plat-spear/include/plat/system.h [deleted file]
arch/arm/plat-spear/time.c
arch/c6x/include/asm/processor.h
arch/mips/alchemy/common/time.c
arch/mips/ath79/dev-wmac.c
arch/mips/configs/nlm_xlp_defconfig
arch/mips/configs/nlm_xlr_defconfig
arch/mips/configs/powertv_defconfig
arch/mips/include/asm/mach-au1x00/gpio-au1300.h
arch/mips/include/asm/page.h
arch/mips/kernel/smp-bmips.c
arch/mips/kernel/traps.c
arch/mips/kernel/vmlinux.lds.S
arch/mips/mm/fault.c
arch/mips/pci/pci.c
arch/mips/pmc-sierra/yosemite/ht-irq.c
arch/mips/txx9/generic/7segled.c
arch/x86/ia32/ia32_aout.c
arch/x86/lib/delay.c
arch/x86/mm/hugetlbpage.c
arch/x86/pci/acpi.c
drivers/amba/bus.c
drivers/block/floppy.c
drivers/gpu/drm/gma500/cdv_device.c
drivers/gpu/drm/gma500/framebuffer.c
drivers/gpu/drm/gma500/gtt.c
drivers/gpu/drm/radeon/r600.c
drivers/gpu/drm/radeon/r600_blit_shaders.c
drivers/gpu/drm/radeon/r600d.h
drivers/gpu/drm/radeon/radeon_connectors.c
drivers/gpu/drm/radeon/radeon_display.c
drivers/gpu/drm/radeon/radeon_encoders.c
drivers/gpu/drm/radeon/radeon_fb.c
drivers/gpu/drm/radeon/radeon_mode.h
drivers/hid/hid-ids.h
drivers/hid/hid-input.c
drivers/hid/usbhid/hid-quirks.c
drivers/hwmon/Kconfig
drivers/hwmon/jc42.c
drivers/hwmon/pmbus/pmbus_core.c
drivers/hwmon/pmbus/zl6100.c
drivers/input/evdev.c
drivers/input/misc/twl4030-vibra.c
drivers/input/mouse/alps.c
drivers/input/serio/ams_delta_serio.c
drivers/input/tablet/Kconfig
drivers/input/tablet/wacom_wac.c
drivers/iommu/amd_iommu_init.c
drivers/leds/Kconfig
drivers/leds/Makefile
drivers/leds/leds-ams-delta.c [deleted file]
drivers/md/dm-flakey.c
drivers/md/dm-io.c
drivers/md/dm-ioctl.c
drivers/md/dm-raid.c
drivers/md/dm-thin-metadata.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/mfd/ab8500-core.c
drivers/mfd/mfd-core.c
drivers/mfd/s5m-core.c
drivers/mfd/tps65910.c
drivers/mfd/tps65912-core.c
drivers/mfd/wm8350-irq.c
drivers/mfd/wm8994-core.c
drivers/mfd/wm8994-regmap.c
drivers/misc/c2port/core.c
drivers/mmc/core/core.c
drivers/mmc/core/host.c
drivers/mmc/core/mmc.c
drivers/mmc/core/sd.c
drivers/mmc/core/sdio.c
drivers/mmc/host/atmel-mci.c
drivers/mmc/host/mmci.c
drivers/mmc/host/sdhci-esdhc-imx.c
drivers/mtd/nand/ams-delta.c
drivers/net/caif/caif_hsi.c
drivers/net/ethernet/atheros/atl1c/atl1c_main.c
drivers/net/ethernet/broadcom/tg3.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
drivers/net/ethernet/cisco/enic/enic.h
drivers/net/ethernet/cisco/enic/enic_main.c
drivers/net/ethernet/ibm/ehea/ehea_main.c
drivers/net/ethernet/mellanox/mlx4/qp.c
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c
drivers/net/ethernet/packetengines/Kconfig
drivers/net/ethernet/qlogic/qla3xxx.c
drivers/net/ethernet/realtek/r8169.c
drivers/net/hyperv/netvsc_drv.c
drivers/net/usb/usbnet.c
drivers/net/vmxnet3/vmxnet3_drv.c
drivers/net/vmxnet3/vmxnet3_int.h
drivers/net/wireless/ath/ath9k/ar5008_phy.c
drivers/net/wireless/ath/ath9k/ar9002_hw.c
drivers/net/wireless/ath/ath9k/hw.h
drivers/net/wireless/ath/carl9170/tx.c
drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
drivers/net/wireless/iwlwifi/iwl-agn-lib.c
drivers/net/wireless/iwlwifi/iwl-agn-sta.c
drivers/net/wireless/mwifiex/cfg80211.c
drivers/net/wireless/rt2x00/rt2x00dev.c
drivers/of/fdt.c
drivers/of/of_mdio.c
drivers/of/platform.c
drivers/pps/pps.c
drivers/rapidio/devices/tsi721.c
drivers/regulator/da9052-regulator.c
drivers/regulator/tps65910-regulator.c
drivers/rtc/rtc-r9701.c
drivers/s390/cio/qdio_main.c
drivers/scsi/sd_dif.c
drivers/spi/spi-pl022.c
drivers/tty/Kconfig
drivers/usb/host/ehci-fsl.c
drivers/usb/host/ehci-fsl.h
drivers/video/omap/lcd_ams_delta.c
fs/aio.c
fs/binfmt_aout.c
fs/btrfs/backref.c
fs/btrfs/reada.c
fs/cifs/dir.c
fs/cifs/inode.c
fs/dcache.c
fs/exec.c
include/linux/amba/bus.h
include/linux/amba/serial.h
include/linux/dcache.h
include/linux/kmsg_dump.h
include/linux/memcontrol.h
include/linux/of.h
include/linux/percpu.h
include/linux/sched.h
include/linux/tcp.h
include/net/inetpeer.h
include/net/tcp.h
kernel/fork.c
kernel/hung_task.c
kernel/irq/manage.c
kernel/kprobes.c
kernel/printk.c
kernel/sched/core.c
lib/debugobjects.c
lib/vsprintf.c
mm/huge_memory.c
mm/hugetlb.c
mm/ksm.c
mm/memcontrol.c
mm/mempolicy.c
mm/migrate.c
mm/mlock.c
mm/mmap.c
mm/mprotect.c
mm/page_cgroup.c
mm/percpu-vm.c
mm/swap.c
mm/swap_state.c
net/bridge/br_multicast.c
net/bridge/br_netfilter.c
net/bridge/br_stp.c
net/bridge/br_stp_if.c
net/bridge/netfilter/ebtables.c
net/core/rtnetlink.c
net/ipv4/inetpeer.c
net/ipv4/route.c
net/ipv4/tcp_input.c
net/ipv6/addrconf.c
net/mac80211/iface.c
net/mac80211/rate.c
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_netlink.c
net/openvswitch/actions.c
net/openvswitch/datapath.c
sound/pci/hda/patch_realtek.c
sound/pci/rme9652/hdspm.c
sound/soc/omap/ams-delta.c
sound/soc/samsung/neo1973_wm8753.c
tools/perf/builtin-record.c
tools/perf/builtin-top.c
tools/perf/perf.h
tools/perf/util/top.h
tools/perf/util/util.c

index 141087cf3107733b8bb4e2c33a8fcd5dbba8076c..fd2bd56e7195a809dcab552cd070e29aefed2840 100644 (file)
@@ -7,9 +7,9 @@ Each LED is represented as a sub-node of the gpio-leds device.  Each
 node's name represents the name of the corresponding LED.
 
 LED sub-node properties:
-- gpios :  Should specify the LED's GPIO, see "Specifying GPIO information
-  for devices" in Documentation/devicetree/booting-without-of.txt.  Active
-  low LEDs should be indicated using flags in the GPIO specifier.
+- gpios :  Should specify the LED's GPIO, see "gpios property" in
+  Documentation/devicetree/gpio.txt.  Active low LEDs should be
+  indicated using flags in the GPIO specifier.
 - label :  (optional) The label for this LED.  If omitted, the label is
   taken from the node name (excluding the unit address).
 - linux,default-trigger :  (optional) This parameter, if present, is a
index ecc6a6cd26c198ff412ce2af839cc3b602d73a29..a20008ab319a9d5acba2f57bdaff0a5338a1d547 100644 (file)
@@ -30,6 +30,7 @@ national      National Semiconductor
 nintendo       Nintendo
 nvidia NVIDIA
 nxp    NXP Semiconductors
+picochip       Picochip Ltd
 powervr        Imagination Technologies
 qcom   Qualcomm, Inc.
 ramtron        Ramtron International
index a22ecf48f255c24220eec21cb1769e29c5db11c7..52729a756c1b55374ef7521898e6ded4753b61b9 100644 (file)
@@ -7,21 +7,29 @@ Supported chips:
     Addresses scanned: I2C 0x18 - 0x1f
     Datasheets:
        http://www.analog.com/static/imported-files/data_sheets/ADT7408.pdf
-  * IDT TSE2002B3, TS3000B3
-    Prefix: 'tse2002b3', 'ts3000b3'
+  * Atmel AT30TS00
+    Prefix: 'at30ts00'
     Addresses scanned: I2C 0x18 - 0x1f
     Datasheets:
-       http://www.idt.com/products/getdoc.cfm?docid=18715691
-       http://www.idt.com/products/getdoc.cfm?docid=18715692
+       http://www.atmel.com/Images/doc8585.pdf
+  * IDT TSE2002B3, TSE2002GB2, TS3000B3, TS3000GB2
+    Prefix: 'tse2002', 'ts3000'
+    Addresses scanned: I2C 0x18 - 0x1f
+    Datasheets:
+       http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf
+       http://www.idt.com/sites/default/files/documents/IDT_TSE2002GB2A1_DST_20111107_120303145914.pdf
+       http://www.idt.com/sites/default/files/documents/IDT_TS3000B3A_DST_20101129_120303152013.pdf
+       http://www.idt.com/sites/default/files/documents/IDT_TS3000GB2A1_DST_20111104_120303151012.pdf
   * Maxim MAX6604
     Prefix: 'max6604'
     Addresses scanned: I2C 0x18 - 0x1f
     Datasheets:
        http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf
-  * Microchip MCP9805, MCP98242, MCP98243, MCP9843
-    Prefixes: 'mcp9805', 'mcp98242', 'mcp98243', 'mcp9843'
+  * Microchip MCP9804, MCP9805, MCP98242, MCP98243, MCP9843
+    Prefixes: 'mcp9804', 'mcp9805', 'mcp98242', 'mcp98243', 'mcp9843'
     Addresses scanned: I2C 0x18 - 0x1f
     Datasheets:
+       http://ww1.microchip.com/downloads/en/DeviceDoc/22203C.pdf
        http://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf
        http://ww1.microchip.com/downloads/en/DeviceDoc/21996a.pdf
        http://ww1.microchip.com/downloads/en/DeviceDoc/22153c.pdf
@@ -48,6 +56,12 @@ Supported chips:
     Datasheets:
        http://www.st.com/stonline/products/literature/ds/13447/stts424.pdf
        http://www.st.com/stonline/products/literature/ds/13448/stts424e02.pdf
+  * ST Microelectronics STTS2002, STTS3000
+    Prefix: 'stts2002', 'stts3000'
+    Addresses scanned: I2C 0x18 - 0x1f
+    Datasheets:
+       http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00225278.pdf
+       http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATA_BRIEF/CD00270920.pdf
   * JEDEC JC 42.4 compliant temperature sensor chips
     Prefix: 'jc42'
     Addresses scanned: I2C 0x18 - 0x1f
index f274c28b510355dde7c2bfca3c9fc5a4ecd0b400..2f95308251d4162ac21d4ccd3fc9454c371cb217 100644 (file)
@@ -13,7 +13,8 @@ Detection
 
 All ALPS touchpads should respond to the "E6 report" command sequence:
 E8-E6-E6-E6-E9. An ALPS touchpad should respond with either 00-00-0A or
-00-00-64.
+00-00-64 if no buttons are pressed. The bits 0-2 of the first byte will be 1s
+if some buttons are pressed.
 
 If the E6 report is successful, the touchpad model is identified using the "E7
 report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is
index 033d4e69b43b107d9780ec959105823e6cefd07c..d99fd9c0ec0e16900663e1378eac9911d4afc845 100644 (file)
@@ -2211,6 +2211,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 
                        default: off.
 
+       printk.always_kmsg_dump=
+                       Trigger kmsg_dump for cases other than kernel oops or
+                       panics
+                       Format: <bool>  (1/Y/y=enable, 0/N/n=disable)
+                       default: disabled
+
        printk.time=    Show timing data prefixed to each printk message line
                        Format: <bool>  (1/Y/y=enable, 0/N/n=disable)
 
index 4e41d5255d7235662633f1e16af2b82a744dc85c..3321d75c6c7ffc3f32a8b5a3a3cd279a45913cfd 100644 (file)
@@ -962,7 +962,7 @@ F:  drivers/tty/serial/msm_serial.c
 F:     drivers/platform/msm/
 F:     drivers/*/pm8???-*
 F:     include/linux/mfd/pm8xxx/
-T:     git git://codeaurora.org/quic/kernel/davidb/linux-msm.git
+T:     git git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm.git
 S:     Maintained
 
 ARM/TOSA MACHINE SUPPORT
@@ -1310,7 +1310,7 @@ F:        drivers/atm/
 F:     include/linux/atm*
 
 ATMEL AT91 MCI DRIVER
-M:     Nicolas Ferre <nicolas.ferre@atmel.com>
+M:     Ludovic Desroches <ludovic.desroches@atmel.com>
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 W:     http://www.atmel.com/products/AT91/
 W:     http://www.at91.com/
@@ -1318,7 +1318,7 @@ S:        Maintained
 F:     drivers/mmc/host/at91_mci.c
 
 ATMEL AT91 / AT32 MCI DRIVER
-M:     Nicolas Ferre <nicolas.ferre@atmel.com>
+M:     Ludovic Desroches <ludovic.desroches@atmel.com>
 S:     Maintained
 F:     drivers/mmc/host/atmel-mci.c
 F:     drivers/mmc/host/atmel-mci-regs.h
index 66d13c917bc7db231daa3d084a6eded9bd764f10..56d481727c30641827c3b420ed4e997186e8326f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 3
 PATCHLEVEL = 3
 SUBLEVEL = 0
-EXTRAVERSION = -rc6
+EXTRAVERSION = -rc7
 NAME = Saber-toothed Squirrel
 
 # *DOCUMENTATION*
index e8a761aee088a9bc5a8d2ce62d6bf1fde2183a92..f939794363ac6f94ad82a192ede6b9410f7bc002 100644 (file)
@@ -108,7 +108,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
        "       lda     $31,3b-2b(%0)\n"
        "       .previous\n"
        :       "+r"(ret), "=&r"(prev), "=&r"(cmp)
-       :       "r"(uaddr), "r"((long)oldval), "r"(newval)
+       :       "r"(uaddr), "r"((long)(int)oldval), "r"(newval)
        :       "memory");
 
        *uval = prev;
index a48aecc17eacc2e3d3f5cf4b0ff4183f29b33440..3cc5897650d2a1e80154e79e99cc51fa9e2999b9 100644 (file)
@@ -1280,7 +1280,7 @@ config ARM_ERRATA_743622
        depends on CPU_V7
        help
          This option enables the workaround for the 743622 Cortex-A9
-         (r2p0..r2p2) erratum. Under very rare conditions, a faulty
+         (r2p*) erratum. Under very rare conditions, a faulty
          optimisation in the Cortex-A9 Store Buffer may lead to data
          corruption. This workaround sets a specific bit in the diagnostic
          register of the Cortex-A9 which disables the Store Buffer
@@ -1578,6 +1578,7 @@ config ARCH_NR_GPIO
        int
        default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
        default 350 if ARCH_U8500
+       default 264 if MACH_H4700
        default 0
        help
          Maximum number of GPIOs in the system.
index e0d236d7ff7344b28291b37acae16169c955db8c..03646c4c13d18becdccfcbf3897a25fa53e3a31e 100644 (file)
@@ -81,25 +81,6 @@ choice
        prompt "Kernel low-level debugging port"
        depends on DEBUG_LL
 
-       config DEBUG_LL_UART_NONE
-               bool "No low-level debugging UART"
-               help
-                 Say Y here if your platform doesn't provide a UART option
-                 below. This relies on your platform choosing the right UART
-                 definition internally in order for low-level debugging to
-                 work.
-
-       config DEBUG_ICEDCC
-               bool "Kernel low-level debugging via EmbeddedICE DCC channel"
-               help
-                 Say Y here if you want the debug print routines to direct
-                 their output to the EmbeddedICE macrocell's DCC channel using
-                 co-processor 14. This is known to work on the ARM9 style ICE
-                 channel and on the XScale with the PEEDI.
-
-                 Note that the system will appear to hang during boot if there
-                 is nothing connected to read from the DCC.
-
        config AT91_DEBUG_LL_DBGU0
                bool "Kernel low-level debugging on rm9200, 9260/9g20, 9261/9g10 and 9rl"
                depends on HAVE_AT91_DBGU0
@@ -108,20 +89,6 @@ choice
                bool "Kernel low-level debugging on 9263, 9g45 and cap9"
                depends on HAVE_AT91_DBGU1
 
-       config DEBUG_FOOTBRIDGE_COM1
-               bool "Kernel low-level debugging messages via footbridge 8250 at PCI COM1"
-               depends on FOOTBRIDGE
-               help
-                 Say Y here if you want the debug print routines to direct
-                 their output to the 8250 at PCI COM1.
-
-       config DEBUG_DC21285_PORT
-               bool "Kernel low-level debugging messages via footbridge serial port"
-               depends on FOOTBRIDGE
-               help
-                 Say Y here if you want the debug print routines to direct
-                 their output to the serial port in the DC21285 (Footbridge).
-
        config DEBUG_CLPS711X_UART1
                bool "Kernel low-level debugging messages via UART1"
                depends on ARCH_CLPS711X
@@ -136,6 +103,20 @@ choice
                  Say Y here if you want the debug print routines to direct
                  their output to the second serial port on these devices.
 
+       config DEBUG_DC21285_PORT
+               bool "Kernel low-level debugging messages via footbridge serial port"
+               depends on FOOTBRIDGE
+               help
+                 Say Y here if you want the debug print routines to direct
+                 their output to the serial port in the DC21285 (Footbridge).
+
+       config DEBUG_FOOTBRIDGE_COM1
+               bool "Kernel low-level debugging messages via footbridge 8250 at PCI COM1"
+               depends on FOOTBRIDGE
+               help
+                 Say Y here if you want the debug print routines to direct
+                 their output to the 8250 at PCI COM1.
+
        config DEBUG_HIGHBANK_UART
                bool "Kernel low-level debugging messages via Highbank UART"
                depends on ARCH_HIGHBANK
@@ -206,38 +187,42 @@ choice
                  Say Y here if you want kernel low-level debugging support
                  on i.MX6Q.
 
-       config DEBUG_S3C_UART0
-               depends on PLAT_SAMSUNG
-               bool "Use S3C UART 0 for low-level debug"
+       config DEBUG_MSM_UART1
+               bool "Kernel low-level debugging messages via MSM UART1"
+               depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
                help
                  Say Y here if you want the debug print routines to direct
-                 their output to UART 0. The port must have been initialised
-                 by the boot-loader before use.
-
-                 The uncompressor code port configuration is now handled
-                 by CONFIG_S3C_LOWLEVEL_UART_PORT.
+                 their output to the first serial port on MSM devices.
 
-       config DEBUG_S3C_UART1
-               depends on PLAT_SAMSUNG
-               bool "Use S3C UART 1 for low-level debug"
+       config DEBUG_MSM_UART2
+               bool "Kernel low-level debugging messages via MSM UART2"
+               depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
                help
                  Say Y here if you want the debug print routines to direct
-                 their output to UART 1. The port must have been initialised
-                 by the boot-loader before use.
+                 their output to the second serial port on MSM devices.
 
-                 The uncompressor code port configuration is now handled
-                 by CONFIG_S3C_LOWLEVEL_UART_PORT.
+       config DEBUG_MSM_UART3
+               bool "Kernel low-level debugging messages via MSM UART3"
+               depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
+               help
+                 Say Y here if you want the debug print routines to direct
+                 their output to the third serial port on MSM devices.
 
-       config DEBUG_S3C_UART2
-               depends on PLAT_SAMSUNG
-               bool "Use S3C UART 2 for low-level debug"
+       config DEBUG_MSM8660_UART
+               bool "Kernel low-level debugging messages via MSM 8660 UART"
+               depends on ARCH_MSM8X60
+               select MSM_HAS_DEBUG_UART_HS
                help
                  Say Y here if you want the debug print routines to direct
-                 their output to UART 2. The port must have been initialised
-                 by the boot-loader before use.
+                 their output to the serial port on MSM 8660 devices.
 
-                 The uncompressor code port configuration is now handled
-                 by CONFIG_S3C_LOWLEVEL_UART_PORT.
+       config DEBUG_MSM8960_UART
+               bool "Kernel low-level debugging messages via MSM 8960 UART"
+               depends on ARCH_MSM8960
+               select MSM_HAS_DEBUG_UART_HS
+               help
+                 Say Y here if you want the debug print routines to direct
+                 their output to the serial port on MSM 8960 devices.
 
        config DEBUG_REALVIEW_STD_PORT
                bool "RealView Default UART"
@@ -255,42 +240,57 @@ choice
                  their output to the standard serial port on the RealView
                  PB1176 platform.
 
-       config DEBUG_MSM_UART1
-               bool "Kernel low-level debugging messages via MSM UART1"
-               depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
+       config DEBUG_S3C_UART0
+               depends on PLAT_SAMSUNG
+               bool "Use S3C UART 0 for low-level debug"
                help
                  Say Y here if you want the debug print routines to direct
-                 their output to the first serial port on MSM devices.
+                 their output to UART 0. The port must have been initialised
+                 by the boot-loader before use.
 
-       config DEBUG_MSM_UART2
-               bool "Kernel low-level debugging messages via MSM UART2"
-               depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
+                 The uncompressor code port configuration is now handled
+                 by CONFIG_S3C_LOWLEVEL_UART_PORT.
+
+       config DEBUG_S3C_UART1
+               depends on PLAT_SAMSUNG
+               bool "Use S3C UART 1 for low-level debug"
                help
                  Say Y here if you want the debug print routines to direct
-                 their output to the second serial port on MSM devices.
+                 their output to UART 1. The port must have been initialised
+                 by the boot-loader before use.
 
-       config DEBUG_MSM_UART3
-               bool "Kernel low-level debugging messages via MSM UART3"
-               depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
+                 The uncompressor code port configuration is now handled
+                 by CONFIG_S3C_LOWLEVEL_UART_PORT.
+
+       config DEBUG_S3C_UART2
+               depends on PLAT_SAMSUNG
+               bool "Use S3C UART 2 for low-level debug"
                help
                  Say Y here if you want the debug print routines to direct
-                 their output to the third serial port on MSM devices.
+                 their output to UART 2. The port must have been initialised
+                 by the boot-loader before use.
 
-       config DEBUG_MSM8660_UART
-               bool "Kernel low-level debugging messages via MSM 8660 UART"
-               depends on ARCH_MSM8X60
-               select MSM_HAS_DEBUG_UART_HS
+                 The uncompressor code port configuration is now handled
+                 by CONFIG_S3C_LOWLEVEL_UART_PORT.
+
+       config DEBUG_LL_UART_NONE
+               bool "No low-level debugging UART"
                help
-                 Say Y here if you want the debug print routines to direct
-                 their output to the serial port on MSM 8660 devices.
+                 Say Y here if your platform doesn't provide a UART option
+                 below. This relies on your platform choosing the right UART
+                 definition internally in order for low-level debugging to
+                 work.
 
-       config DEBUG_MSM8960_UART
-               bool "Kernel low-level debugging messages via MSM 8960 UART"
-               depends on ARCH_MSM8960
-               select MSM_HAS_DEBUG_UART_HS
+       config DEBUG_ICEDCC
+               bool "Kernel low-level debugging via EmbeddedICE DCC channel"
                help
                  Say Y here if you want the debug print routines to direct
-                 their output to the serial port on MSM 8960 devices.
+                 their output to the EmbeddedICE macrocell's DCC channel using
+                 co-processor 14. This is known to work on the ARM9 style ICE
+                 channel and on the XScale with the PEEDI.
+
+                 Note that the system will appear to hang during boot if there
+                 is nothing connected to read from the DCC.
 
 endchoice
 
index ce1c5ff746e7d2930fc0ec2005b6e65b35bd9a91..3c79f85975aaa26c7c2e353fefc54d71d89bc5bf 100644 (file)
@@ -3,3 +3,4 @@ zImage
 xipImage
 bootpImage
 uImage
+*.dtb
diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts
new file mode 100644 (file)
index 0000000..8a5dff8
--- /dev/null
@@ -0,0 +1,25 @@
+/dts-v1/;
+
+/include/ "kirkwood.dtsi"
+
+/ {
+       model = "Globalscale Technologies Dreamplug";
+       compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x20000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,115200n8 earlyprintk";
+       };
+
+       serial@f1012000 {
+               compatible = "ns16550a";
+               reg = <0xf1012000 0xff>;
+               reg-shift = <2>;
+               interrupts = <33>;
+               clock-frequency = <200000000>;
+       };
+};
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
new file mode 100644 (file)
index 0000000..771c6bb
--- /dev/null
@@ -0,0 +1,6 @@
+/include/ "skeleton.dtsi"
+
+/ {
+       compatible = "marvell,kirkwood";
+};
+
index 825d2957da0b819a8ac9204df02dff60fee9dbbc..61f385809970a27d455dfe49b33ffceb938980c0 100644 (file)
 
        i2c@7000d000 {
                clock-frequency = <400000>;
+
+               adt7461@4c {
+                       compatible = "adi,adt7461";
+                       reg = <0x4c>;
+               };
        };
 
        serial@70006000 {
        sdhci@c8000600 {
                support-8bit;
        };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+
+               power {
+                       label = "Power";
+                       gpios = <&gpio 79 1>; /* gpio PJ7, active low */
+                       linux,code = <116>; /* KEY_POWER */
+                       gpio-key,wakeup;
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               wifi {
+                       label = "wifi-led";
+                       gpios = <&gpio 24 0>;
+                       linux,default-trigger = "rfkill0";
+               };
+       };
 };
index b5a5be2536c1158acf5a9c979eccb0f5588bb97c..90114faa9f3c7c087f6fce6b871b16ab5e433b44 100644 (file)
@@ -134,7 +134,7 @@ int __init armpmu_register(struct arm_pmu *armpmu, char *name, int type);
 
 u64 armpmu_event_update(struct perf_event *event,
                        struct hw_perf_event *hwc,
-                       int idx, int overflow);
+                       int idx);
 
 int armpmu_event_set_period(struct perf_event *event,
                            struct hw_perf_event *hwc,
index e4c96cc6ec0cf470e214a00e72008925379c74bb..424aa458c4873dd8556f655115946d5c898c3e47 100644 (file)
@@ -110,6 +110,7 @@ extern void cpu_init(void);
 
 void soft_restart(unsigned long);
 extern void (*arm_pm_restart)(char str, const char *cmd);
+extern void (*arm_pm_idle)(void);
 
 #define UDBG_UNDEFINED (1 << 0)
 #define UDBG_SYSCALL   (1 << 1)
index 4dd0edab6a658880ed505145fff2c5ce001ae639..1651d49507444267e1d5bf5783837e0f1d483420 100644 (file)
@@ -242,6 +242,7 @@ static void ecard_init_pgtables(struct mm_struct *mm)
 
        memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (EASI_SIZE / PGDIR_SIZE));
 
+       vma.vm_flags = VM_EXEC;
        vma.vm_mm = mm;
 
        flush_tlb_range(&vma, IO_START, IO_START + IO_SIZE);
index 5bb91bf3d47f24c9c6fb75324535c39e54b2c62e..b2abfa18f1378d9cea0b790e3933c60999c4eaa0 100644 (file)
@@ -180,7 +180,7 @@ armpmu_event_set_period(struct perf_event *event,
 u64
 armpmu_event_update(struct perf_event *event,
                    struct hw_perf_event *hwc,
-                   int idx, int overflow)
+                   int idx)
 {
        struct arm_pmu *armpmu = to_arm_pmu(event->pmu);
        u64 delta, prev_raw_count, new_raw_count;
@@ -193,13 +193,7 @@ again:
                             new_raw_count) != prev_raw_count)
                goto again;
 
-       new_raw_count &= armpmu->max_period;
-       prev_raw_count &= armpmu->max_period;
-
-       if (overflow)
-               delta = armpmu->max_period - prev_raw_count + new_raw_count + 1;
-       else
-               delta = new_raw_count - prev_raw_count;
+       delta = (new_raw_count - prev_raw_count) & armpmu->max_period;
 
        local64_add(delta, &event->count);
        local64_sub(delta, &hwc->period_left);
@@ -216,7 +210,7 @@ armpmu_read(struct perf_event *event)
        if (hwc->idx < 0)
                return;
 
-       armpmu_event_update(event, hwc, hwc->idx, 0);
+       armpmu_event_update(event, hwc, hwc->idx);
 }
 
 static void
@@ -232,7 +226,7 @@ armpmu_stop(struct perf_event *event, int flags)
        if (!(hwc->state & PERF_HES_STOPPED)) {
                armpmu->disable(hwc, hwc->idx);
                barrier(); /* why? */
-               armpmu_event_update(event, hwc, hwc->idx, 0);
+               armpmu_event_update(event, hwc, hwc->idx);
                hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE;
        }
 }
@@ -518,7 +512,13 @@ __hw_perf_event_init(struct perf_event *event)
        hwc->config_base            |= (unsigned long)mapping;
 
        if (!hwc->sample_period) {
-               hwc->sample_period  = armpmu->max_period;
+               /*
+                * For non-sampling runs, limit the sample_period to half
+                * of the counter width. That way, the new counter value
+                * is far less likely to overtake the previous one unless
+                * you have some serious IRQ latency issues.
+                */
+               hwc->sample_period  = armpmu->max_period >> 1;
                hwc->last_period    = hwc->sample_period;
                local64_set(&hwc->period_left, hwc->sample_period);
        }
@@ -679,6 +679,28 @@ static void __init cpu_pmu_init(struct arm_pmu *armpmu)
        armpmu->type = ARM_PMU_DEVICE_CPU;
 }
 
+/*
+ * PMU hardware loses all context when a CPU goes offline.
+ * When a CPU is hotplugged back in, since some hardware registers are
+ * UNKNOWN at reset, the PMU must be explicitly reset to avoid reading
+ * junk values out of them.
+ */
+static int __cpuinit pmu_cpu_notify(struct notifier_block *b,
+                                       unsigned long action, void *hcpu)
+{
+       if ((action & ~CPU_TASKS_FROZEN) != CPU_STARTING)
+               return NOTIFY_DONE;
+
+       if (cpu_pmu && cpu_pmu->reset)
+               cpu_pmu->reset(NULL);
+
+       return NOTIFY_OK;
+}
+
+static struct notifier_block __cpuinitdata pmu_cpu_notifier = {
+       .notifier_call = pmu_cpu_notify,
+};
+
 /*
  * CPU PMU identification and registration.
  */
@@ -730,6 +752,7 @@ init_hw_perf_events(void)
                pr_info("enabled with %s PMU driver, %d counters available\n",
                        cpu_pmu->name, cpu_pmu->num_events);
                cpu_pmu_init(cpu_pmu);
+               register_cpu_notifier(&pmu_cpu_notifier);
                armpmu_register(cpu_pmu, "cpu", PERF_TYPE_RAW);
        } else {
                pr_info("no hardware support available\n");
index 533be9930ec22f803e672a2e57217b8c65bfc40b..b78af0cc6ef36ddf8b371c9b57541b19caab5677 100644 (file)
@@ -467,23 +467,6 @@ armv6pmu_enable_event(struct hw_perf_event *hwc,
        raw_spin_unlock_irqrestore(&events->pmu_lock, flags);
 }
 
-static int counter_is_active(unsigned long pmcr, int idx)
-{
-       unsigned long mask = 0;
-       if (idx == ARMV6_CYCLE_COUNTER)
-               mask = ARMV6_PMCR_CCOUNT_IEN;
-       else if (idx == ARMV6_COUNTER0)
-               mask = ARMV6_PMCR_COUNT0_IEN;
-       else if (idx == ARMV6_COUNTER1)
-               mask = ARMV6_PMCR_COUNT1_IEN;
-
-       if (mask)
-               return pmcr & mask;
-
-       WARN_ONCE(1, "invalid counter number (%d)\n", idx);
-       return 0;
-}
-
 static irqreturn_t
 armv6pmu_handle_irq(int irq_num,
                    void *dev)
@@ -513,7 +496,8 @@ armv6pmu_handle_irq(int irq_num,
                struct perf_event *event = cpuc->events[idx];
                struct hw_perf_event *hwc;
 
-               if (!counter_is_active(pmcr, idx))
+               /* Ignore if we don't have an event. */
+               if (!event)
                        continue;
 
                /*
@@ -524,7 +508,7 @@ armv6pmu_handle_irq(int irq_num,
                        continue;
 
                hwc = &event->hw;
-               armpmu_event_update(event, hwc, idx, 1);
+               armpmu_event_update(event, hwc, idx);
                data.period = event->hw.last_period;
                if (!armpmu_event_set_period(event, hwc, idx))
                        continue;
index 6933244c68f964ffed73f11cfbdaac1ca13b2f74..4d7095af2ab3a55075f080b3d4fee66b84d39f17 100644 (file)
@@ -809,6 +809,11 @@ static inline int armv7_pmnc_disable_intens(int idx)
 
        counter = ARMV7_IDX_TO_COUNTER(idx);
        asm volatile("mcr p15, 0, %0, c9, c14, 2" : : "r" (BIT(counter)));
+       isb();
+       /* Clear the overflow flag in case an interrupt is pending. */
+       asm volatile("mcr p15, 0, %0, c9, c12, 3" : : "r" (BIT(counter)));
+       isb();
+
        return idx;
 }
 
@@ -955,6 +960,10 @@ static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev)
                struct perf_event *event = cpuc->events[idx];
                struct hw_perf_event *hwc;
 
+               /* Ignore if we don't have an event. */
+               if (!event)
+                       continue;
+
                /*
                 * We have a single interrupt for all counters. Check that
                 * each counter has overflowed before we process it.
@@ -963,7 +972,7 @@ static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev)
                        continue;
 
                hwc = &event->hw;
-               armpmu_event_update(event, hwc, idx, 1);
+               armpmu_event_update(event, hwc, idx);
                data.period = event->hw.last_period;
                if (!armpmu_event_set_period(event, hwc, idx))
                        continue;
index 3b99d8269829b971db3d8f0618629c77d8317c5a..71a21e6712f5356daa77aa134796701101ce1a13 100644 (file)
@@ -255,11 +255,14 @@ xscale1pmu_handle_irq(int irq_num, void *dev)
                struct perf_event *event = cpuc->events[idx];
                struct hw_perf_event *hwc;
 
+               if (!event)
+                       continue;
+
                if (!xscale1_pmnc_counter_has_overflowed(pmnc, idx))
                        continue;
 
                hwc = &event->hw;
-               armpmu_event_update(event, hwc, idx, 1);
+               armpmu_event_update(event, hwc, idx);
                data.period = event->hw.last_period;
                if (!armpmu_event_set_period(event, hwc, idx))
                        continue;
@@ -592,11 +595,14 @@ xscale2pmu_handle_irq(int irq_num, void *dev)
                struct perf_event *event = cpuc->events[idx];
                struct hw_perf_event *hwc;
 
-               if (!xscale2_pmnc_counter_has_overflowed(pmnc, idx))
+               if (!event)
+                       continue;
+
+               if (!xscale2_pmnc_counter_has_overflowed(of_flags, idx))
                        continue;
 
                hwc = &event->hw;
-               armpmu_event_update(event, hwc, idx, 1);
+               armpmu_event_update(event, hwc, idx);
                data.period = event->hw.last_period;
                if (!armpmu_event_set_period(event, hwc, idx))
                        continue;
@@ -663,7 +669,7 @@ xscale2pmu_enable_event(struct hw_perf_event *hwc, int idx)
 static void
 xscale2pmu_disable_event(struct hw_perf_event *hwc, int idx)
 {
-       unsigned long flags, ien, evtsel;
+       unsigned long flags, ien, evtsel, of_flags;
        struct pmu_hw_events *events = cpu_pmu->get_hw_events();
 
        ien = xscale2pmu_read_int_enable();
@@ -672,26 +678,31 @@ xscale2pmu_disable_event(struct hw_perf_event *hwc, int idx)
        switch (idx) {
        case XSCALE_CYCLE_COUNTER:
                ien &= ~XSCALE2_CCOUNT_INT_EN;
+               of_flags = XSCALE2_CCOUNT_OVERFLOW;
                break;
        case XSCALE_COUNTER0:
                ien &= ~XSCALE2_COUNT0_INT_EN;
                evtsel &= ~XSCALE2_COUNT0_EVT_MASK;
                evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT0_EVT_SHFT;
+               of_flags = XSCALE2_COUNT0_OVERFLOW;
                break;
        case XSCALE_COUNTER1:
                ien &= ~XSCALE2_COUNT1_INT_EN;
                evtsel &= ~XSCALE2_COUNT1_EVT_MASK;
                evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT1_EVT_SHFT;
+               of_flags = XSCALE2_COUNT1_OVERFLOW;
                break;
        case XSCALE_COUNTER2:
                ien &= ~XSCALE2_COUNT2_INT_EN;
                evtsel &= ~XSCALE2_COUNT2_EVT_MASK;
                evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT2_EVT_SHFT;
+               of_flags = XSCALE2_COUNT2_OVERFLOW;
                break;
        case XSCALE_COUNTER3:
                ien &= ~XSCALE2_COUNT3_INT_EN;
                evtsel &= ~XSCALE2_COUNT3_EVT_MASK;
                evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT3_EVT_SHFT;
+               of_flags = XSCALE2_COUNT3_OVERFLOW;
                break;
        default:
                WARN_ONCE(1, "invalid counter number (%d)\n", idx);
@@ -701,6 +712,7 @@ xscale2pmu_disable_event(struct hw_perf_event *hwc, int idx)
        raw_spin_lock_irqsave(&events->pmu_lock, flags);
        xscale2pmu_write_event_select(evtsel);
        xscale2pmu_write_int_enable(ien);
+       xscale2pmu_write_overflow_flags(of_flags);
        raw_spin_unlock_irqrestore(&events->pmu_lock, flags);
 }
 
index 971d65c253a920c682f818f3f341a0102450f0ba..008e7ce766a758be5c76204be2399095485d6eea 100644 (file)
@@ -61,8 +61,6 @@ extern void setup_mm_for_reboot(void);
 
 static volatile int hlt_counter;
 
-#include <mach/system.h>
-
 void disable_hlt(void)
 {
        hlt_counter++;
@@ -181,13 +179,17 @@ void cpu_idle_wait(void)
 EXPORT_SYMBOL_GPL(cpu_idle_wait);
 
 /*
- * This is our default idle handler.  We need to disable
- * interrupts here to ensure we don't miss a wakeup call.
+ * This is our default idle handler.
  */
+
+void (*arm_pm_idle)(void);
+
 static void default_idle(void)
 {
-       if (!need_resched())
-               arch_idle();
+       if (arm_pm_idle)
+               arm_pm_idle();
+       else
+               cpu_do_idle();
        local_irq_enable();
 }
 
@@ -215,6 +217,10 @@ void cpu_idle(void)
                                cpu_die();
 #endif
 
+                       /*
+                        * We need to disable interrupts here
+                        * to ensure we don't miss a wakeup call.
+                        */
                        local_irq_disable();
 #ifdef CONFIG_PL310_ERRATA_769419
                        wmb();
@@ -222,19 +228,18 @@ void cpu_idle(void)
                        if (hlt_counter) {
                                local_irq_enable();
                                cpu_relax();
-                       } else {
+                       } else if (!need_resched()) {
                                stop_critical_timings();
                                if (cpuidle_idle_call())
                                        pm_idle();
                                start_critical_timings();
                                /*
-                                * This will eventually be removed - pm_idle
-                                * functions should always return with IRQs
-                                * enabled.
+                                * pm_idle functions must always
+                                * return with IRQs enabled.
                                 */
                                WARN_ON(irqs_disabled());
+                       } else
                                local_irq_enable();
-                       }
                }
                leds_event(led_idle_end);
                rcu_idle_exit();
index a42edc25a87e693aea85b2b494515c14e4d32c42..8967d75c2ea3d4c4570efa8c77709b97d623eada 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <linux/module.h>
 
+#include <asm/proc-fns.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -313,6 +314,12 @@ static struct at91_gpio_bank at91cap9_gpio[] __initdata = {
        }
 };
 
+static void at91cap9_idle(void)
+{
+       at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
+       cpu_do_idle();
+}
+
 /* --------------------------------------------------------------------
  *  AT91CAP9 processor initialization
  * -------------------------------------------------------------------- */
@@ -332,6 +339,7 @@ static void __init at91cap9_ioremap_registers(void)
 
 static void __init at91cap9_initialize(void)
 {
+       arm_pm_idle = at91cap9_idle;
        arm_pm_restart = at91sam9g45_restart;
        at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1);
 
index 99c3174e24a2262d1ff4e5d2cef8a7e54ecef33b..dd6e2de134204a5ccf5c28df3bfe41d9b8170314 100644 (file)
@@ -289,6 +289,15 @@ static struct at91_gpio_bank at91rm9200_gpio[] __initdata = {
        }
 };
 
+static void at91rm9200_idle(void)
+{
+       /*
+        * Disable the processor clock.  The processor will be automatically
+        * re-enabled by an interrupt or by a reset.
+        */
+       at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
+}
+
 static void at91rm9200_restart(char mode, const char *cmd)
 {
        /*
@@ -314,6 +323,7 @@ static void __init at91rm9200_ioremap_registers(void)
 
 static void __init at91rm9200_initialize(void)
 {
+       arm_pm_idle = at91rm9200_idle;
        arm_pm_restart = at91rm9200_restart;
        at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1)
                        | (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3)
index d4036ba43612afe85f7b74ce58f55ae35e1882d0..9ac8c6fe3363b6af723c8366108d6d863bcb9415 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <linux/module.h>
 
+#include <asm/proc-fns.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -328,8 +329,15 @@ static void __init at91sam9260_ioremap_registers(void)
        at91sam9_ioremap_smc(0, AT91SAM9260_BASE_SMC);
 }
 
+static void at91sam9260_idle(void)
+{
+       at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
+       cpu_do_idle();
+}
+
 static void __init at91sam9260_initialize(void)
 {
+       arm_pm_idle = at91sam9260_idle;
        arm_pm_restart = at91sam9_alt_restart;
        at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1)
                        | (1 << AT91SAM9260_ID_IRQ2);
index 023c2ff138df8a9228b4cb45c514d6e02f938918..ab76868f01f5ee8e48b80359d3064e531ae3c86d 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <linux/module.h>
 
+#include <asm/proc-fns.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -286,8 +287,15 @@ static void __init at91sam9261_ioremap_registers(void)
        at91sam9_ioremap_smc(0, AT91SAM9261_BASE_SMC);
 }
 
+static void at91sam9261_idle(void)
+{
+       at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
+       cpu_do_idle();
+}
+
 static void __init at91sam9261_initialize(void)
 {
+       arm_pm_idle = at91sam9261_idle;
        arm_pm_restart = at91sam9_alt_restart;
        at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1)
                        | (1 << AT91SAM9261_ID_IRQ2);
index 75e876c258afed33b87ba50ccdb8dafee2523d79..247ab633abccc72918d0e23be60c7e937deb5b61 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <linux/module.h>
 
+#include <asm/proc-fns.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -307,8 +308,15 @@ static void __init at91sam9263_ioremap_registers(void)
        at91sam9_ioremap_smc(1, AT91SAM9263_BASE_SMC1);
 }
 
+static void at91sam9263_idle(void)
+{
+       at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
+       cpu_do_idle();
+}
+
 static void __init at91sam9263_initialize(void)
 {
+       arm_pm_idle = at91sam9263_idle;
        arm_pm_restart = at91sam9_alt_restart;
        at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1);
 
index 1cb6a96b1c1e3a7ec44cbde4129992b1f54da5eb..5b12192e52ecc59e8fde425146f8811469149179 100644 (file)
@@ -317,6 +317,12 @@ static struct at91_gpio_bank at91sam9g45_gpio[] __initdata = {
        }
 };
 
+static void at91sam9g45_idle(void)
+{
+       at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
+       cpu_do_idle();
+}
+
 /* --------------------------------------------------------------------
  *  AT91SAM9G45 processor initialization
  * -------------------------------------------------------------------- */
@@ -337,6 +343,7 @@ static void __init at91sam9g45_ioremap_registers(void)
 
 static void __init at91sam9g45_initialize(void)
 {
+       arm_pm_idle = at91sam9g45_idle;
        arm_pm_restart = at91sam9g45_restart;
        at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0);
 
index b7582dd10dc3bd86c577a59b5ef3c1be3269dd23..96e2adcd5a841907be15beda7bdbb67dd87b5259 100644 (file)
 #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE)
 static u64 hdmac_dmamask = DMA_BIT_MASK(32);
 
-static struct at_dma_platform_data atdma_pdata = {
-       .nr_channels    = 8,
-};
-
 static struct resource hdmac_resources[] = {
        [0] = {
                .start  = AT91SAM9G45_BASE_DMA,
@@ -56,12 +52,11 @@ static struct resource hdmac_resources[] = {
 };
 
 static struct platform_device at_hdmac_device = {
-       .name           = "at_hdmac",
+       .name           = "at91sam9g45_dma",
        .id             = -1,
        .dev            = {
                                .dma_mask               = &hdmac_dmamask,
                                .coherent_dma_mask      = DMA_BIT_MASK(32),
-                               .platform_data          = &atdma_pdata,
        },
        .resource       = hdmac_resources,
        .num_resources  = ARRAY_SIZE(hdmac_resources),
@@ -69,9 +64,15 @@ static struct platform_device at_hdmac_device = {
 
 void __init at91_add_device_hdmac(void)
 {
-       dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask);
-       dma_cap_set(DMA_SLAVE, atdma_pdata.cap_mask);
-       platform_device_register(&at_hdmac_device);
+#if defined(CONFIG_OF)
+       struct device_node *of_node =
+               of_find_node_by_name(NULL, "dma-controller");
+
+       if (of_node)
+               of_node_put(of_node);
+       else
+#endif
+               platform_device_register(&at_hdmac_device);
 }
 #else
 void __init at91_add_device_hdmac(void) {}
index d2c91a841cb8c5fe73b1d5a6682e9d6626cb4f74..fd60e226a987d1533504327dfe22e17a6a08b9d2 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <linux/module.h>
 
+#include <asm/proc-fns.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -291,8 +292,15 @@ static void __init at91sam9rl_ioremap_registers(void)
        at91sam9_ioremap_smc(0, AT91SAM9RL_BASE_SMC);
 }
 
+static void at91sam9rl_idle(void)
+{
+       at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
+       cpu_do_idle();
+}
+
 static void __init at91sam9rl_initialize(void)
 {
+       arm_pm_idle = at91sam9rl_idle;
        arm_pm_restart = at91sam9_alt_restart;
        at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0);
 
index 61908dce978447156f557866055fe93da689fe52..9be71c11d0f098ddaadf4528cc2cdc1d17b52a3c 100644 (file)
 #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE)
 static u64 hdmac_dmamask = DMA_BIT_MASK(32);
 
-static struct at_dma_platform_data atdma_pdata = {
-       .nr_channels    = 2,
-};
-
 static struct resource hdmac_resources[] = {
        [0] = {
                .start  = AT91SAM9RL_BASE_DMA,
@@ -51,12 +47,11 @@ static struct resource hdmac_resources[] = {
 };
 
 static struct platform_device at_hdmac_device = {
-       .name           = "at_hdmac",
+       .name           = "at91sam9rl_dma",
        .id             = -1,
        .dev            = {
                                .dma_mask               = &hdmac_dmamask,
                                .coherent_dma_mask      = DMA_BIT_MASK(32),
-                               .platform_data          = &atdma_pdata,
        },
        .resource       = hdmac_resources,
        .num_resources  = ARRAY_SIZE(hdmac_resources),
@@ -64,7 +59,6 @@ static struct platform_device at_hdmac_device = {
 
 void __init at91_add_device_hdmac(void)
 {
-       dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask);
        platform_device_register(&at_hdmac_device);
 }
 #else
index 56ba3bd035aeff76f6bc0db6459c20d47ab9d09f..0154b7f44ff199a72483c70a94dcffe11bfb60cf 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/irq.h>
+#include <asm/proc-fns.h>
 #include <asm/mach/arch.h>
 #include <mach/at91x40.h>
 #include <mach/at91_st.h>
@@ -37,8 +38,19 @@ unsigned long clk_get_rate(struct clk *clk)
        return AT91X40_MASTER_CLOCK;
 }
 
+static void at91x40_idle(void)
+{
+       /*
+        * Disable the processor clock.  The processor will be automatically
+        * re-enabled by an interrupt or by a reset.
+        */
+       at91_sys_write(AT91_PS_CR, AT91_PS_CR_CPU);
+       cpu_do_idle();
+}
+
 void __init at91x40_initialize(unsigned long main_clock)
 {
+       arm_pm_idle = at91x40_idle;
        at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1)
                        | (1 << AT91X40_ID_IRQ2);
 }
diff --git a/arch/arm/mach-at91/include/mach/system.h b/arch/arm/mach-at91/include/mach/system.h
deleted file mode 100644 (file)
index cbd64f3..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * arch/arm/mach-at91/include/mach/system.h
- *
- *  Copyright (C) 2003 SAN People
- *
- * 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.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-#include <mach/hardware.h>
-#include <mach/at91_st.h>
-#include <mach/at91_dbgu.h>
-#include <mach/at91_pmc.h>
-
-static inline void arch_idle(void)
-{
-       /*
-        * Disable the processor clock.  The processor will be automatically
-        * re-enabled by an interrupt or by a reset.
-        */
-#ifdef AT91_PS
-       at91_sys_write(AT91_PS_CR, AT91_PS_CR_CPU);
-#else
-       at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
-#endif
-#ifndef CONFIG_CPU_ARM920T
-       /*
-        * Set the processor (CP15) into 'Wait for Interrupt' mode.
-        * Post-RM9200 processors need this in conjunction with the above
-        * to save power when idle.
-        */
-       cpu_do_idle();
-#endif
-}
-
-#endif
index 6b67b7e8426ce8d313b84b910237b9848f5b7c23..22e4e0a28ad1eae0e549f43e47e548b9a36945dd 100644 (file)
 #include <mach/csp/chipcHw_inline.h>
 #include <mach/csp/tmrHw_reg.h>
 
-#define AMBA_DEVICE(name, initname, base, plat, size)       \
-static struct amba_device name##_device = {     \
-   .dev = {                                     \
-      .coherent_dma_mask = ~0,                  \
-      .init_name = initname,                    \
-      .platform_data = plat                     \
-   },                                           \
-   .res = {                                     \
-      .start = MM_ADDR_IO_##base,               \
-               .end = MM_ADDR_IO_##base + (size) - 1,    \
-      .flags = IORESOURCE_MEM                   \
-   },                                           \
-   .dma_mask = ~0,                              \
-   .irq = {                                     \
-      IRQ_##base                                \
-   }                                            \
-}
-
-
-AMBA_DEVICE(uartA, "uarta", UARTA, NULL, SZ_4K);
-AMBA_DEVICE(uartB, "uartb", UARTB, NULL, SZ_4K);
+static AMBA_APB_DEVICE(uartA, "uarta", MM_ADDR_IO_UARTA, { IRQ_UARTA }, NULL);
+static AMBA_APB_DEVICE(uartB, "uartb", MM_ADDR_IO_UARTB, { IRQ_UARTB }, NULL);
 
 static struct clk pll1_clk = {
        .name = "PLL1",
diff --git a/arch/arm/mach-bcmring/include/mach/system.h b/arch/arm/mach-bcmring/include/mach/system.h
deleted file mode 100644 (file)
index cb78250..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- *
- *  Copyright (C) 1999 ARM Limited
- *  Copyright (C) 2000 Deep Blue Solutions Ltd
- *
- * 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.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
-#endif
index ab1711b9b4d6324f039dfc12a63802b53937daf9..8736c1acc166c7bf826e9c112ecb67de650a175a 100644 (file)
@@ -225,3 +225,19 @@ void clps711x_restart(char mode, const char *cmd)
 {
        soft_restart(0);
 }
+
+static void clps711x_idle(void)
+{
+       clps_writel(1, HALT);
+       __asm__ __volatile__(
+       "mov    r0, r0\n\
+       mov     r0, r0");
+}
+
+static int __init clps711x_idle_init(void)
+{
+       arm_pm_idle = clps711x_idle;
+       return 0;
+}
+
+arch_initcall(clps711x_idle_init);
diff --git a/arch/arm/mach-clps711x/include/mach/system.h b/arch/arm/mach-clps711x/include/mach/system.h
deleted file mode 100644 (file)
index 23d6ef8..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *  arch/arm/mach-clps711x/include/mach/system.h
- *
- *  Copyright (C) 2000 Deep Blue Solutions Ltd
- *
- * 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.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-#include <linux/io.h>
-#include <mach/hardware.h>
-#include <asm/hardware/clps7111.h>
-
-static inline void arch_idle(void)
-{
-       clps_writel(1, HALT);
-       __asm__ __volatile__(
-       "mov    r0, r0\n\
-       mov     r0, r0");
-}
-
-#endif
diff --git a/arch/arm/mach-cns3xxx/include/mach/system.h b/arch/arm/mach-cns3xxx/include/mach/system.h
deleted file mode 100644 (file)
index 9e56b7d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2000 Deep Blue Solutions Ltd
- * Copyright 2003 ARM Limited
- * Copyright 2008 Cavium Networks
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, Version 2, as
- * published by the Free Software Foundation.
- */
-
-#ifndef __MACH_SYSTEM_H
-#define __MACH_SYSTEM_H
-
-#include <asm/proc-fns.h>
-
-static inline void arch_idle(void)
-{
-       /*
-        * This should do all the clock switching
-        * and wait for interrupt tricks
-        */
-       cpu_do_idle();
-}
-
-#endif
diff --git a/arch/arm/mach-davinci/include/mach/system.h b/arch/arm/mach-davinci/include/mach/system.h
deleted file mode 100644 (file)
index fcb7a01..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * DaVinci system defines
- *
- * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
- *
- * 2007 (c) MontaVista Software, Inc. This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
- */
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-#include <mach/common.h>
-
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
-#endif /* __ASM_ARCH_SYSTEM_H */
diff --git a/arch/arm/mach-dove/include/mach/system.h b/arch/arm/mach-dove/include/mach/system.h
deleted file mode 100644 (file)
index 3027954..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * arch/arm/mach-dove/include/mach/system.h
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
-#endif
index 294aad07f7a05eaabcfe9b6fb7ac8d48ca1cfe10..804c9122b7b3626e76eadcd3c950429612e87969 100644 (file)
@@ -271,8 +271,33 @@ static struct platform_device *ebsa110_devices[] = {
        &am79c961_device,
 };
 
+/*
+ * EBSA110 idling methodology:
+ *
+ * We can not execute the "wait for interrupt" instruction since that
+ * will stop our MCLK signal (which provides the clock for the glue
+ * logic, and therefore the timer interrupt).
+ *
+ * Instead, we spin, polling the IRQ_STAT register for the occurrence
+ * of any interrupt with core clock down to the memory clock.
+ */
+static void ebsa110_idle(void)
+{
+       const char *irq_stat = (char *)0xff000000;
+
+       /* disable clock switching */
+       asm volatile ("mcr p15, 0, ip, c15, c2, 2" : : : "cc");
+
+       /* wait for an interrupt to occur */
+       while (!*irq_stat);
+
+       /* enable clock switching */
+       asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
+}
+
 static int __init ebsa110_init(void)
 {
+       arm_pm_idle = ebsa110_idle;
        return platform_add_devices(ebsa110_devices, ARRAY_SIZE(ebsa110_devices));
 }
 
diff --git a/arch/arm/mach-ebsa110/include/mach/system.h b/arch/arm/mach-ebsa110/include/mach/system.h
deleted file mode 100644 (file)
index 2e4af65..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *  arch/arm/mach-ebsa110/include/mach/system.h
- *
- *  Copyright (C) 1996-2000 Russell King.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-/*
- * EBSA110 idling methodology:
- *
- * We can not execute the "wait for interrupt" instruction since that
- * will stop our MCLK signal (which provides the clock for the glue
- * logic, and therefore the timer interrupt).
- *
- * Instead, we spin, polling the IRQ_STAT register for the occurrence
- * of any interrupt with core clock down to the memory clock.
- */
-static inline void arch_idle(void)
-{
-       const char *irq_stat = (char *)0xff000000;
-
-       /* disable clock switching */
-       asm volatile ("mcr p15, 0, ip, c15, c2, 2" : : : "cc");
-
-       /* wait for an interrupt to occur */
-       while (!*irq_stat);
-
-       /* enable clock switching */
-       asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
-}
-
-#endif
index 24203f9a67967df314a6d3776d6ac581a8d22fb3..903edb02fe4f54c2c50ade7248f5e676f7675d7b 100644 (file)
@@ -279,48 +279,14 @@ static struct amba_pl010_data ep93xx_uart_data = {
        .set_mctrl      = ep93xx_uart_set_mctrl,
 };
 
-static struct amba_device uart1_device = {
-       .dev            = {
-               .init_name      = "apb:uart1",
-               .platform_data  = &ep93xx_uart_data,
-       },
-       .res            = {
-               .start  = EP93XX_UART1_PHYS_BASE,
-               .end    = EP93XX_UART1_PHYS_BASE + 0x0fff,
-               .flags  = IORESOURCE_MEM,
-       },
-       .irq            = { IRQ_EP93XX_UART1, NO_IRQ },
-       .periphid       = 0x00041010,
-};
-
-static struct amba_device uart2_device = {
-       .dev            = {
-               .init_name      = "apb:uart2",
-               .platform_data  = &ep93xx_uart_data,
-       },
-       .res            = {
-               .start  = EP93XX_UART2_PHYS_BASE,
-               .end    = EP93XX_UART2_PHYS_BASE + 0x0fff,
-               .flags  = IORESOURCE_MEM,
-       },
-       .irq            = { IRQ_EP93XX_UART2, NO_IRQ },
-       .periphid       = 0x00041010,
-};
+static AMBA_APB_DEVICE(uart1, "apb:uart1", 0x00041010, EP93XX_UART1_PHYS_BASE,
+       { IRQ_EP93XX_UART1 }, &ep93xx_uart_data);
 
-static struct amba_device uart3_device = {
-       .dev            = {
-               .init_name      = "apb:uart3",
-               .platform_data  = &ep93xx_uart_data,
-       },
-       .res            = {
-               .start  = EP93XX_UART3_PHYS_BASE,
-               .end    = EP93XX_UART3_PHYS_BASE + 0x0fff,
-               .flags  = IORESOURCE_MEM,
-       },
-       .irq            = { IRQ_EP93XX_UART3, NO_IRQ },
-       .periphid       = 0x00041010,
-};
+static AMBA_APB_DEVICE(uart2, "apb:uart2", 0x00041010, EP93XX_UART2_PHYS_BASE,
+       { IRQ_EP93XX_UART2 }, &ep93xx_uart_data);
 
+static AMBA_APB_DEVICE(uart3, "apb:uart3", 0x00041010, EP93XX_UART3_PHYS_BASE,
+       { IRQ_EP93XX_UART3 }, &ep93xx_uart_data);
 
 static struct resource ep93xx_rtc_resource[] = {
        {
diff --git a/arch/arm/mach-ep93xx/include/mach/system.h b/arch/arm/mach-ep93xx/include/mach/system.h
deleted file mode 100644 (file)
index b5bec7c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * arch/arm/mach-ep93xx/include/mach/system.h
- */
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
index d5fb44f16d317e4796e9c2c08fae5cd16344f4d3..d67d0b4feb6f3fa2266e66cb878444724d97c069 100644 (file)
@@ -34,6 +34,7 @@
 #include <mach/ep93xx_spi.h>
 #include <mach/gpio-ep93xx.h>
 
+#include <asm/hardware/vic.h>
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
@@ -361,6 +362,7 @@ MACHINE_START(VISION_EP9307, "Vision Engraving Systems EP9307")
        .atag_offset    = 0x100,
        .map_io         = vision_map_io,
        .init_irq       = ep93xx_init_irq,
+       .handle_irq     = vic_handle_irq,
        .timer          = &ep93xx_timer,
        .init_machine   = vision_init_machine,
        .restart        = ep93xx_restart,
index 5d602f68a0e88735d5cee2bf0e2b7f3da4fc95f2..1f81bfa15ff944c9f89db33eb51e54087d1f974f 100644 (file)
@@ -183,7 +183,9 @@ config MACH_SMDKV310
        select S5P_DEV_FIMC1
        select S5P_DEV_FIMC2
        select S5P_DEV_FIMC3
+       select S5P_DEV_G2D
        select S5P_DEV_I2C_HDMIPHY
+       select S5P_DEV_JPEG
        select S5P_DEV_MFC
        select S5P_DEV_TV
        select S5P_DEV_USB_EHCI
@@ -230,7 +232,9 @@ config MACH_UNIVERSAL_C210
        select S5P_DEV_FIMC1
        select S5P_DEV_FIMC2
        select S5P_DEV_FIMC3
+       select S5P_DEV_G2D
        select S5P_DEV_CSIS0
+       select S5P_DEV_JPEG
        select S5P_DEV_FIMD0
        select S3C_DEV_HSMMC
        select S3C_DEV_HSMMC2
@@ -268,11 +272,14 @@ config MACH_NURI
        select S3C_DEV_I2C1
        select S3C_DEV_I2C3
        select S3C_DEV_I2C5
+       select S3C_DEV_I2C6
        select S5P_DEV_CSIS0
+       select S5P_DEV_JPEG
        select S5P_DEV_FIMC0
        select S5P_DEV_FIMC1
        select S5P_DEV_FIMC2
        select S5P_DEV_FIMC3
+       select S5P_DEV_G2D
        select S5P_DEV_MFC
        select S5P_DEV_USB_EHCI
        select S5P_SETUP_MIPIPHY
@@ -283,6 +290,7 @@ config MACH_NURI
        select EXYNOS4_SETUP_I2C1
        select EXYNOS4_SETUP_I2C3
        select EXYNOS4_SETUP_I2C5
+       select EXYNOS4_SETUP_I2C6
        select EXYNOS4_SETUP_SDHCI
        select EXYNOS4_SETUP_USB_PHY
        select S5P_SETUP_MIPIPHY
@@ -303,7 +311,9 @@ config MACH_ORIGEN
        select S5P_DEV_FIMC2
        select S5P_DEV_FIMC3
        select S5P_DEV_FIMD0
+       select S5P_DEV_G2D
        select S5P_DEV_I2C_HDMIPHY
+       select S5P_DEV_JPEG
        select S5P_DEV_MFC
        select S5P_DEV_TV
        select S5P_DEV_USB_EHCI
index c59e18871006a601af8d061b58d3f205cb7d5d28..031c1e5b3dfe7281bc501bda41956c9093b593ea 100644 (file)
@@ -201,14 +201,6 @@ static struct map_desc exynos4_iodesc1[] __initdata = {
        },
 };
 
-static void exynos_idle(void)
-{
-       if (!need_resched())
-               cpu_do_idle();
-
-       local_irq_enable();
-}
-
 void exynos4_restart(char mode, const char *cmd)
 {
        __raw_writel(0x1, S5P_SWRESET);
@@ -467,10 +459,6 @@ early_initcall(exynos4_l2x0_cache_init);
 int __init exynos_init(void)
 {
        printk(KERN_INFO "EXYNOS: Initializing architecture\n");
-
-       /* set idle function */
-       pm_idle = exynos_idle;
-
        return device_register(&exynos4_dev);
 }
 
index b10fcd270f071397aaf6bf38dccdcc9bdff5df35..91370def4a70997fa2a8aea0f3184115a052bc0c 100644 (file)
@@ -74,21 +74,8 @@ struct dma_pl330_platdata exynos4_pdma0_pdata = {
        .peri_id = pdma0_peri,
 };
 
-struct amba_device exynos4_device_pdma0 = {
-       .dev = {
-               .init_name = "dma-pl330.0",
-               .dma_mask = &dma_dmamask,
-               .coherent_dma_mask = DMA_BIT_MASK(32),
-               .platform_data = &exynos4_pdma0_pdata,
-       },
-       .res = {
-               .start = EXYNOS4_PA_PDMA0,
-               .end = EXYNOS4_PA_PDMA0 + SZ_4K,
-               .flags = IORESOURCE_MEM,
-       },
-       .irq = {IRQ_PDMA0, NO_IRQ},
-       .periphid = 0x00041330,
-};
+AMBA_AHB_DEVICE(exynos4_pdma0, "dma-pl330.0", 0x00041330, EXYNOS4_PA_PDMA0,
+       {IRQ_PDMA0}, &exynos4_pdma0_pdata);
 
 u8 pdma1_peri[] = {
        DMACH_PCM0_RX,
@@ -123,21 +110,8 @@ struct dma_pl330_platdata exynos4_pdma1_pdata = {
        .peri_id = pdma1_peri,
 };
 
-struct amba_device exynos4_device_pdma1 = {
-       .dev = {
-               .init_name = "dma-pl330.1",
-               .dma_mask = &dma_dmamask,
-               .coherent_dma_mask = DMA_BIT_MASK(32),
-               .platform_data = &exynos4_pdma1_pdata,
-       },
-       .res = {
-               .start = EXYNOS4_PA_PDMA1,
-               .end = EXYNOS4_PA_PDMA1 + SZ_4K,
-               .flags = IORESOURCE_MEM,
-       },
-       .irq = {IRQ_PDMA1, NO_IRQ},
-       .periphid = 0x00041330,
-};
+AMBA_AHB_DEVICE(exynos4_pdma1,  "dma-pl330.1", 0x00041330, EXYNOS4_PA_PDMA1,
+       {IRQ_PDMA1}, &exynos4_pdma1_pdata);
 
 static int __init exynos4_dma_init(void)
 {
@@ -146,11 +120,11 @@ static int __init exynos4_dma_init(void)
 
        dma_cap_set(DMA_SLAVE, exynos4_pdma0_pdata.cap_mask);
        dma_cap_set(DMA_CYCLIC, exynos4_pdma0_pdata.cap_mask);
-       amba_device_register(&exynos4_device_pdma0, &iomem_resource);
+       amba_device_register(&exynos4_pdma0_device, &iomem_resource);
 
        dma_cap_set(DMA_SLAVE, exynos4_pdma1_pdata.cap_mask);
        dma_cap_set(DMA_CYCLIC, exynos4_pdma1_pdata.cap_mask);
-       amba_device_register(&exynos4_device_pdma1, &iomem_resource);
+       amba_device_register(&exynos4_pdma1_device, &iomem_resource);
 
        return 0;
 }
diff --git a/arch/arm/mach-exynos/include/mach/system.h b/arch/arm/mach-exynos/include/mach/system.h
deleted file mode 100644 (file)
index 0063a6d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/* linux/arch/arm/mach-exynos4/include/mach/system.h
- *
- * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
- *             http://www.samsung.com
- *
- * EXYNOS4 - system support header
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H __FILE__
-
-static void arch_idle(void)
-{
-       /* nothing here yet */
-}
-#endif /* __ASM_ARCH_SYSTEM_H */
index 435261f83f46d5d8ada440e17bdc65a0b1e19a1f..32bb7b37975c2623bd774ddcc05795231f114e7d 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <video/platform_lcd.h>
 #include <media/m5mols.h>
+#include <media/s5k6aa.h>
 #include <media/s5p_fimc.h>
 #include <media/v4l2-mediabus.h>
 
@@ -75,6 +76,7 @@ enum fixed_regulator_id {
        FIXED_REG_ID_MAX8903,
        FIXED_REG_ID_CAM_A28V,
        FIXED_REG_ID_CAM_12V,
+       FIXED_REG_ID_CAM_VT_15V,
 };
 
 static struct s3c2410_uartcfg nuri_uartcfgs[] __initdata = {
@@ -399,6 +401,9 @@ static struct regulator_consumer_supply __initdata max8997_ldo4_[] = {
 static struct regulator_consumer_supply __initdata max8997_ldo5_[] = {
        REGULATOR_SUPPLY("vhsic", "modemctl"), /* MODEM */
 };
+static struct regulator_consumer_supply nuri_max8997_ldo6_consumer[] = {
+       REGULATOR_SUPPLY("vdd_reg", "6-003c"), /* S5K6AA camera */
+};
 static struct regulator_consumer_supply __initdata max8997_ldo7_[] = {
        REGULATOR_SUPPLY("dig_18", "0-001f"), /* HCD803 */
 };
@@ -431,7 +436,7 @@ static struct regulator_consumer_supply __initdata max8997_buck1_[] = {
        REGULATOR_SUPPLY("vdd_arm", NULL), /* CPUFREQ */
 };
 static struct regulator_consumer_supply __initdata max8997_buck2_[] = {
-       REGULATOR_SUPPLY("vdd_int", NULL), /* CPUFREQ */
+       REGULATOR_SUPPLY("vdd_int", "exynos4210-busfreq.0"), /* CPUFREQ */
 };
 static struct regulator_consumer_supply __initdata max8997_buck3_[] = {
        REGULATOR_SUPPLY("vdd", "mali_dev.0"), /* G3D of Exynos 4 */
@@ -546,6 +551,8 @@ static struct regulator_init_data __initdata max8997_ldo6_data = {
                        .enabled        = 1,
                },
        },
+       .num_consumer_supplies  = ARRAY_SIZE(nuri_max8997_ldo6_consumer),
+       .consumer_supplies      = nuri_max8997_ldo6_consumer,
 };
 
 static struct regulator_init_data __initdata max8997_ldo7_data = {
@@ -742,7 +749,7 @@ static struct regulator_init_data __initdata max8997_buck2_data = {
        .constraints    = {
                .name           = "VINT_1.1V_C210",
                .min_uV         = 900000,
-               .max_uV         = 1100000,
+               .max_uV         = 1200000,
                .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
                .always_on      = 1,
                .state_mem      = {
@@ -957,7 +964,6 @@ static struct max8997_platform_data __initdata nuri_max8997_pdata = {
        .regulators             = nuri_max8997_regulators,
 
        .buck125_gpios = { EXYNOS4_GPX0(5), EXYNOS4_GPX0(6), EXYNOS4_GPL0(0) },
-       .buck2_gpiodvs = true,
 
        .buck1_voltage[0] = 1350000, /* 1.35V */
        .buck1_voltage[1] = 1300000, /* 1.3V */
@@ -1116,7 +1122,30 @@ static void __init nuri_ehci_init(void)
 }
 
 /* CAMERA */
+static struct regulator_consumer_supply cam_vt_cam15_supply =
+       REGULATOR_SUPPLY("vdd_core", "6-003c");
+
+static struct regulator_init_data cam_vt_cam15_reg_init_data = {
+       .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS },
+       .num_consumer_supplies = 1,
+       .consumer_supplies = &cam_vt_cam15_supply,
+};
+
+static struct fixed_voltage_config cam_vt_cam15_fixed_voltage_cfg = {
+       .supply_name    = "VT_CAM_1.5V",
+       .microvolts     = 1500000,
+       .gpio           = EXYNOS4_GPE2(2), /* VT_CAM_1.5V_EN */
+       .enable_high    = 1,
+       .init_data      = &cam_vt_cam15_reg_init_data,
+};
+
+static struct platform_device cam_vt_cam15_fixed_rdev = {
+       .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_VT_15V,
+       .dev = { .platform_data = &cam_vt_cam15_fixed_voltage_cfg },
+};
+
 static struct regulator_consumer_supply cam_vdda_supply[] = {
+       REGULATOR_SUPPLY("vdda", "6-003c"),
        REGULATOR_SUPPLY("a_sensor", "0-001f"),
 };
 
@@ -1173,6 +1202,21 @@ static struct s5p_platform_mipi_csis mipi_csis_platdata = {
 
 #define GPIO_CAM_MEGA_RST      EXYNOS4_GPY3(7) /* ISP_RESET */
 #define GPIO_CAM_8M_ISP_INT    EXYNOS4_GPL2(5)
+#define GPIO_CAM_VT_NSTBY      EXYNOS4_GPL2(0)
+#define GPIO_CAM_VT_NRST       EXYNOS4_GPL2(1)
+
+static struct s5k6aa_platform_data s5k6aa_pldata = {
+       .mclk_frequency = 24000000UL,
+       .gpio_reset     = { GPIO_CAM_VT_NRST, 0 },
+       .gpio_stby      = { GPIO_CAM_VT_NSTBY, 0 },
+       .bus_type       = V4L2_MBUS_PARALLEL,
+       .horiz_flip     = 1,
+};
+
+static struct i2c_board_info s5k6aa_board_info = {
+       I2C_BOARD_INFO("S5K6AA", 0x3c),
+       .platform_data = &s5k6aa_pldata,
+};
 
 static struct m5mols_platform_data m5mols_platdata = {
        .gpio_reset = GPIO_CAM_MEGA_RST,
@@ -1185,6 +1229,13 @@ static struct i2c_board_info m5mols_board_info = {
 
 static struct s5p_fimc_isp_info nuri_camera_sensors[] = {
        {
+               .flags          = V4L2_MBUS_PCLK_SAMPLE_RISING |
+                                 V4L2_MBUS_VSYNC_ACTIVE_LOW,
+               .bus_type       = FIMC_ITU_601,
+               .board_info     = &s5k6aa_board_info,
+               .clk_frequency  = 24000000UL,
+               .i2c_bus_num    = 6,
+       }, {
                .flags          = V4L2_MBUS_PCLK_SAMPLE_FALLING |
                                  V4L2_MBUS_VSYNC_ACTIVE_LOW,
                .bus_type       = FIMC_MIPI_CSI2,
@@ -1200,11 +1251,13 @@ static struct s5p_platform_fimc fimc_md_platdata = {
 };
 
 static struct gpio nuri_camera_gpios[] = {
+       { GPIO_CAM_VT_NSTBY,    GPIOF_OUT_INIT_LOW, "CAM_VGA_NSTBY" },
+       { GPIO_CAM_VT_NRST,     GPIOF_OUT_INIT_LOW, "CAM_VGA_NRST"  },
        { GPIO_CAM_8M_ISP_INT,  GPIOF_IN,           "8M_ISP_INT"  },
        { GPIO_CAM_MEGA_RST,    GPIOF_OUT_INIT_LOW, "CAM_8M_NRST" },
 };
 
-static void nuri_camera_init(void)
+static void __init nuri_camera_init(void)
 {
        s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata),
                         &s5p_device_mipi_csis0);
@@ -1224,6 +1277,8 @@ static void nuri_camera_init(void)
                pr_err("%s: Failed to configure 8M_ISP_INT GPIO\n", __func__);
 
        /* Free GPIOs controlled directly by the sensor drivers. */
+       gpio_free(GPIO_CAM_VT_NRST);
+       gpio_free(GPIO_CAM_VT_NSTBY);
        gpio_free(GPIO_CAM_MEGA_RST);
 
        if (exynos4_fimc_setup_gpio(S5P_CAMPORT_A)) {
@@ -1234,15 +1289,27 @@ static void nuri_camera_init(void)
        s5p_gpio_set_drvstr(EXYNOS4_GPJ1(3), S5P_GPIO_DRVSTR_LV4);
 }
 
+static struct s3c2410_platform_i2c nuri_i2c6_platdata __initdata = {
+       .frequency      = 400000U,
+       .sda_delay      = 200,
+       .bus_num        = 6,
+};
+
 static struct s3c2410_platform_i2c nuri_i2c0_platdata __initdata = {
        .frequency      = 400000U,
        .sda_delay      = 200,
 };
 
+/* DEVFREQ controlling memory/bus */
+static struct platform_device exynos4_bus_devfreq = {
+       .name                   = "exynos4210-busfreq",
+};
+
 static struct platform_device *nuri_devices[] __initdata = {
        /* Samsung Platform Devices */
        &s3c_device_i2c5, /* PMIC should initialize first */
        &s3c_device_i2c0,
+       &s3c_device_i2c6,
        &emmc_fixed_voltage,
        &s5p_device_mipi_csis0,
        &s5p_device_fimc0,
@@ -1259,6 +1326,8 @@ static struct platform_device *nuri_devices[] __initdata = {
        &s3c_device_i2c3,
        &i2c9_gpio,
        &s3c_device_adc,
+       &s5p_device_g2d,
+       &s5p_device_jpeg,
        &s3c_device_rtc,
        &s5p_device_mfc,
        &s5p_device_mfc_l,
@@ -1274,8 +1343,10 @@ static struct platform_device *nuri_devices[] __initdata = {
        &nuri_backlight_device,
        &max8903_fixed_reg_dev,
        &nuri_max8903_device,
+       &cam_vt_cam15_fixed_rdev,
        &cam_vdda_fixed_rdev,
        &cam_8m_12v_fixed_rdev,
+       &exynos4_bus_devfreq,
 };
 
 static void __init nuri_map_io(void)
@@ -1305,6 +1376,7 @@ static void __init nuri_machine_init(void)
        i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
        i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3));
        i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs));
+       s3c_i2c6_set_platdata(&nuri_i2c6_platdata);
 
        s5p_fimd0_set_platdata(&nuri_fb_pdata);
 
index 0679b8ad2d1e1a4263521f805d7afd246334a037..686d1826c058526bc3124f8299dd5bc1a3358edb 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/regulator/machine.h>
 #include <linux/mfd/max8997.h>
 #include <linux/lcd.h>
+#include <linux/rfkill-gpio.h>
 
 #include <asm/mach/arch.h>
 #include <asm/hardware/gic.h>
@@ -235,6 +236,7 @@ static struct regulator_init_data __initdata max8997_ldo9_data = {
                .min_uV         = 2800000,
                .max_uV         = 2800000,
                .apply_uV       = 1,
+               .always_on      = 1,
                .valid_ops_mask = REGULATOR_CHANGE_STATUS,
                .state_mem      = {
                        .disabled       = 1,
@@ -278,6 +280,7 @@ static struct regulator_init_data __initdata max8997_ldo14_data = {
                .min_uV         = 1800000,
                .max_uV         = 1800000,
                .apply_uV       = 1,
+               .always_on      = 1,
                .valid_ops_mask = REGULATOR_CHANGE_STATUS,
                .state_mem      = {
                        .disabled       = 1,
@@ -293,6 +296,7 @@ static struct regulator_init_data __initdata max8997_ldo17_data = {
                .min_uV         = 3300000,
                .max_uV         = 3300000,
                .apply_uV       = 1,
+               .always_on      = 1,
                .valid_ops_mask = REGULATOR_CHANGE_STATUS,
                .state_mem      = {
                        .disabled       = 1,
@@ -602,6 +606,23 @@ static struct s3c_fb_platdata origen_lcd_pdata __initdata = {
        .setup_gpio     = exynos4_fimd0_gpio_setup_24bpp,
 };
 
+/* Bluetooth rfkill gpio platform data */
+struct rfkill_gpio_platform_data origen_bt_pdata = {
+       .reset_gpio     = EXYNOS4_GPX2(2),
+       .shutdown_gpio  = -1,
+       .type           = RFKILL_TYPE_BLUETOOTH,
+       .name           = "origen-bt",
+};
+
+/* Bluetooth Platform device */
+static struct platform_device origen_device_bluetooth = {
+       .name           = "rfkill_gpio",
+       .id             = -1,
+       .dev            = {
+               .platform_data  = &origen_bt_pdata,
+       },
+};
+
 static struct platform_device *origen_devices[] __initdata = {
        &s3c_device_hsmmc2,
        &s3c_device_hsmmc0,
@@ -613,9 +634,12 @@ static struct platform_device *origen_devices[] __initdata = {
        &s5p_device_fimc1,
        &s5p_device_fimc2,
        &s5p_device_fimc3,
+       &s5p_device_fimc_md,
        &s5p_device_fimd0,
+       &s5p_device_g2d,
        &s5p_device_hdmi,
        &s5p_device_i2c_hdmiphy,
+       &s5p_device_jpeg,
        &s5p_device_mfc,
        &s5p_device_mfc_l,
        &s5p_device_mfc_r,
@@ -630,6 +654,7 @@ static struct platform_device *origen_devices[] __initdata = {
        &exynos4_device_pd[PD_MFC],
        &origen_device_gpiokeys,
        &origen_lcd_hv070wsa,
+       &origen_device_bluetooth,
 };
 
 /* LCD Backlight data */
@@ -643,6 +668,16 @@ static struct platform_pwm_backlight_data origen_bl_data = {
        .pwm_period_ns  = 1000,
 };
 
+static void __init origen_bt_setup(void)
+{
+       gpio_request(EXYNOS4_GPA0(0), "GPIO BT_UART");
+       /* 4 UART Pins configuration */
+       s3c_gpio_cfgrange_nopull(EXYNOS4_GPA0(0), 4, S3C_GPIO_SFN(2));
+       /* Setup BT Reset, this gpio will be requesed by rfkill-gpio */
+       s3c_gpio_cfgpin(EXYNOS4_GPX2(2), S3C_GPIO_OUTPUT);
+       s3c_gpio_setpull(EXYNOS4_GPX2(2), S3C_GPIO_PULL_NONE);
+}
+
 static void s5p_tv_setup(void)
 {
        /* Direct HPD to HDMI chip */
@@ -703,6 +738,8 @@ static void __init origen_machine_init(void)
        s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
 
        samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data);
+
+       origen_bt_setup();
 }
 
 MACHINE_START(ORIGEN, "ORIGEN")
index b2c5557f50e42e1c39c3b0d2f7cfc8f4035a44fd..5a2a21e6938769972301670b533d37db91464206 100644 (file)
@@ -270,6 +270,9 @@ static struct platform_device *smdkv310_devices[] __initdata = {
        &s5p_device_fimc1,
        &s5p_device_fimc2,
        &s5p_device_fimc3,
+       &s5p_device_fimc_md,
+       &s5p_device_g2d,
+       &s5p_device_jpeg,
        &exynos4_device_ac97,
        &exynos4_device_i2s0,
        &exynos4_device_ohci,
index 0fc65ffde8ff7526f0f9362c8e18e3e27e3c6539..bdc7a220a81d1590dc7c6f3627e5e30529dd31a4 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/i2c.h>
 #include <linux/gpio_keys.h>
 #include <linux/gpio.h>
+#include <linux/interrupt.h>
 #include <linux/fb.h>
 #include <linux/mfd/max8998.h>
 #include <linux/regulator/machine.h>
@@ -46,6 +47,7 @@
 #include <media/v4l2-mediabus.h>
 #include <media/s5p_fimc.h>
 #include <media/m5mols.h>
+#include <media/s5k6aa.h>
 
 #include "common.h"
 
@@ -122,8 +124,10 @@ static struct regulator_consumer_supply lp3974_buck1_consumer =
 static struct regulator_consumer_supply lp3974_buck2_consumer =
        REGULATOR_SUPPLY("vddg3d", NULL);
 
-static struct regulator_consumer_supply lp3974_buck3_consumer =
-       REGULATOR_SUPPLY("vdet", "s5p-sdo");
+static struct regulator_consumer_supply lp3974_buck3_consumer[] = {
+       REGULATOR_SUPPLY("vdet", "s5p-sdo"),
+       REGULATOR_SUPPLY("vdd_reg", "0-003c"),
+};
 
 static struct regulator_init_data lp3974_buck1_data = {
        .constraints    = {
@@ -168,8 +172,8 @@ static struct regulator_init_data lp3974_buck3_data = {
                        .enabled        = 1,
                },
        },
-       .num_consumer_supplies = 1,
-       .consumer_supplies = &lp3974_buck3_consumer,
+       .num_consumer_supplies = ARRAY_SIZE(lp3974_buck3_consumer),
+       .consumer_supplies = lp3974_buck3_consumer,
 };
 
 static struct regulator_init_data lp3974_buck4_data = {
@@ -302,6 +306,9 @@ static struct regulator_init_data lp3974_ldo8_data = {
        .consumer_supplies = lp3974_ldo8_consumer,
 };
 
+static struct regulator_consumer_supply lp3974_ldo9_consumer =
+       REGULATOR_SUPPLY("vddio", "0-003c");
+
 static struct regulator_init_data lp3974_ldo9_data = {
        .constraints    = {
                .name           = "VCC_2.8V",
@@ -313,6 +320,8 @@ static struct regulator_init_data lp3974_ldo9_data = {
                        .enabled        = 1,
                },
        },
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &lp3974_ldo9_consumer,
 };
 
 static struct regulator_init_data lp3974_ldo10_data = {
@@ -411,6 +420,7 @@ static struct regulator_init_data lp3974_ldo15_data = {
 };
 
 static struct regulator_consumer_supply lp3974_ldo16_consumer[] = {
+       REGULATOR_SUPPLY("vdda", "0-003c"),
        REGULATOR_SUPPLY("a_sensor", "0-001f"),
 };
 
@@ -595,6 +605,7 @@ static struct mxt_platform_data qt602240_platform_data = {
        .threshold      = 0x28,
        .voltage        = 2800000,              /* 2.8V */
        .orient         = MXT_DIAGONAL,
+       .irqflags       = IRQF_TRIGGER_FALLING,
 };
 
 static struct i2c_board_info i2c3_devs[] __initdata = {
@@ -817,6 +828,8 @@ static struct s3c_fb_pd_win universal_fb_win0 = {
        },
        .max_bpp        = 32,
        .default_bpp    = 16,
+       .virtual_x      = 480,
+       .virtual_y      = 2 * 800,
 };
 
 static struct s3c_fb_platdata universal_lcd_pdata __initdata = {
@@ -828,6 +841,28 @@ static struct s3c_fb_platdata universal_lcd_pdata __initdata = {
        .setup_gpio     = exynos4_fimd0_gpio_setup_24bpp,
 };
 
+static struct regulator_consumer_supply cam_vt_dio_supply =
+       REGULATOR_SUPPLY("vdd_core", "0-003c");
+
+static struct regulator_init_data cam_vt_dio_reg_init_data = {
+       .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS },
+       .num_consumer_supplies = 1,
+       .consumer_supplies = &cam_vt_dio_supply,
+};
+
+static struct fixed_voltage_config cam_vt_dio_fixed_voltage_cfg = {
+       .supply_name    = "CAM_VT_D_IO",
+       .microvolts     = 2800000,
+       .gpio           = EXYNOS4_GPE2(1), /* CAM_PWR_EN2 */
+       .enable_high    = 1,
+       .init_data      = &cam_vt_dio_reg_init_data,
+};
+
+static struct platform_device cam_vt_dio_fixed_reg_dev = {
+       .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_VT_DIO,
+       .dev = { .platform_data = &cam_vt_dio_fixed_voltage_cfg },
+};
+
 static struct regulator_consumer_supply cam_i_core_supply =
        REGULATOR_SUPPLY("core", "0-001f");
 
@@ -883,6 +918,28 @@ static struct s5p_platform_mipi_csis mipi_csis_platdata = {
 #define GPIO_CAM_LEVEL_EN(n)   EXYNOS4_GPE4(n + 3)
 #define GPIO_CAM_8M_ISP_INT    EXYNOS4_GPX1(5) /* XEINT_13 */
 #define GPIO_CAM_MEGA_nRST     EXYNOS4_GPE2(5)
+#define GPIO_CAM_VGA_NRST      EXYNOS4_GPE4(7)
+#define GPIO_CAM_VGA_NSTBY     EXYNOS4_GPE4(6)
+
+static int s5k6aa_set_power(int on)
+{
+       gpio_set_value(GPIO_CAM_LEVEL_EN(2), !!on);
+       return 0;
+}
+
+static struct s5k6aa_platform_data s5k6aa_platdata = {
+       .mclk_frequency = 21600000UL,
+       .gpio_reset     = { GPIO_CAM_VGA_NRST, 0 },
+       .gpio_stby      = { GPIO_CAM_VGA_NSTBY, 0 },
+       .bus_type       = V4L2_MBUS_PARALLEL,
+       .horiz_flip     = 1,
+       .set_power      = s5k6aa_set_power,
+};
+
+static struct i2c_board_info s5k6aa_board_info = {
+       I2C_BOARD_INFO("S5K6AA", 0x3C),
+       .platform_data = &s5k6aa_platdata,
+};
 
 static int m5mols_set_power(struct device *dev, int on)
 {
@@ -904,6 +961,14 @@ static struct i2c_board_info m5mols_board_info = {
 
 static struct s5p_fimc_isp_info universal_camera_sensors[] = {
        {
+               .mux_id         = 0,
+               .flags          = V4L2_MBUS_PCLK_SAMPLE_FALLING |
+                                 V4L2_MBUS_VSYNC_ACTIVE_LOW,
+               .bus_type       = FIMC_ITU_601,
+               .board_info     = &s5k6aa_board_info,
+               .i2c_bus_num    = 0,
+               .clk_frequency  = 24000000UL,
+       }, {
                .mux_id         = 0,
                .flags          = V4L2_MBUS_PCLK_SAMPLE_FALLING |
                                  V4L2_MBUS_VSYNC_ACTIVE_LOW,
@@ -925,9 +990,11 @@ static struct gpio universal_camera_gpios[] = {
        { GPIO_CAM_LEVEL_EN(2), GPIOF_OUT_INIT_LOW,  "CAM_LVL_EN2" },
        { GPIO_CAM_8M_ISP_INT,  GPIOF_IN,            "8M_ISP_INT"  },
        { GPIO_CAM_MEGA_nRST,   GPIOF_OUT_INIT_LOW,  "CAM_8M_NRST" },
+       { GPIO_CAM_VGA_NRST,    GPIOF_OUT_INIT_LOW,  "CAM_VGA_NRST"  },
+       { GPIO_CAM_VGA_NSTBY,   GPIOF_OUT_INIT_LOW,  "CAM_VGA_NSTBY" },
 };
 
-static void universal_camera_init(void)
+static void __init universal_camera_init(void)
 {
        s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata),
                         &s5p_device_mipi_csis0);
@@ -948,6 +1015,8 @@ static void universal_camera_init(void)
        /* Free GPIOs controlled directly by the sensor drivers. */
        gpio_free(GPIO_CAM_MEGA_nRST);
        gpio_free(GPIO_CAM_8M_ISP_INT);
+       gpio_free(GPIO_CAM_VGA_NRST);
+       gpio_free(GPIO_CAM_VGA_NSTBY);
 
        if (exynos4_fimc_setup_gpio(S5P_CAMPORT_A))
                pr_err("Camera port A setup failed\n");
@@ -960,6 +1029,7 @@ static struct platform_device *universal_devices[] __initdata = {
        &s5p_device_fimc1,
        &s5p_device_fimc2,
        &s5p_device_fimc3,
+       &s5p_device_g2d,
        &mmc0_fixed_voltage,
        &s3c_device_hsmmc0,
        &s3c_device_hsmmc2,
@@ -979,12 +1049,14 @@ static struct platform_device *universal_devices[] __initdata = {
        &universal_gpio_keys,
        &s5p_device_onenand,
        &s5p_device_fimd0,
+       &s5p_device_jpeg,
        &s5p_device_mfc,
        &s5p_device_mfc_l,
        &s5p_device_mfc_r,
        &exynos4_device_pd[PD_MFC],
        &exynos4_device_pd[PD_LCD0],
        &exynos4_device_pd[PD_CAM],
+       &cam_vt_dio_fixed_reg_dev,
        &cam_i_core_fixed_reg_dev,
        &cam_s_if_fixed_reg_dev,
        &s5p_device_fimc_md,
diff --git a/arch/arm/mach-footbridge/include/mach/system.h b/arch/arm/mach-footbridge/include/mach/system.h
deleted file mode 100644 (file)
index a174a58..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- *  arch/arm/mach-footbridge/include/mach/system.h
- *
- *  Copyright (C) 1996-1999 Russell King.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
index c5b24b95a76ed78552b4fb0c679c6d62e71b0f52..7355c0bbcb5ec5c2072e0ab6e7ddf277a580467c 100644 (file)
@@ -4,7 +4,7 @@
 
 # Object file lists.
 
-obj-y                  := irq.o mm.o time.o devices.o gpio.o
+obj-y                  := irq.o mm.o time.o devices.o gpio.o idle.o
 
 # Board-specific support
 obj-$(CONFIG_MACH_NAS4220B)    += board-nas4220b.o
diff --git a/arch/arm/mach-gemini/idle.c b/arch/arm/mach-gemini/idle.c
new file mode 100644 (file)
index 0000000..92bbd6b
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * arch/arm/mach-gemini/idle.c
+ */
+
+#include <linux/init.h>
+#include <asm/system.h>
+#include <asm/proc-fns.h>
+
+static void gemini_idle(void)
+{
+       /*
+        * Because of broken hardware we have to enable interrupts or the CPU
+        * will never wakeup... Acctualy it is not very good to enable
+        * interrupts first since scheduler can miss a tick, but there is
+        * no other way around this. Platforms that needs it for power saving
+        * should call enable_hlt() in init code, since by default it is
+        * disabled.
+        */
+       local_irq_enable();
+       cpu_do_idle();
+}
+
+static int __init gemini_idle_init(void)
+{
+       arm_pm_idle = gemini_idle;
+       return 0;
+}
+
+arch_initcall(gemini_idle_init);
index 4d9c1f872472a8e89abf73e8f1633990598d95ee..a33b5a1f8ab480d3756391bd2416eb5a799f3aad 100644 (file)
 #include <mach/hardware.h>
 #include <mach/global_reg.h>
 
-static inline void arch_idle(void)
-{
-       /*
-        * Because of broken hardware we have to enable interrupts or the CPU
-        * will never wakeup... Acctualy it is not very good to enable
-        * interrupts here since scheduler can miss a tick, but there is
-        * no other way around this. Platforms that needs it for power saving
-        * should call enable_hlt() in init code, since by default it is
-        * disabled.
-        */
-       local_irq_enable();
-       cpu_do_idle();
-}
-
 static inline void arch_reset(char mode, const char *cmd)
 {
        __raw_writel(RESET_GLOBAL | RESET_CPU1,
index 9485a8fdf851cf2a6c50f7530dd9d3c8b330fc16..ca70e5fcc7ac12cbd519d9d8a1b246253fe7f12a 100644 (file)
@@ -73,8 +73,8 @@ void __init gemini_init_irq(void)
        unsigned int i, mode = 0, level = 0;
 
        /*
-        * Disable arch_idle() by default since it is buggy
-        * For more info see arch/arm/mach-gemini/include/mach/system.h
+        * Disable the idle handler by default since it is buggy
+        * For more info see arch/arm/mach-gemini/idle.c
         */
        disable_hlt();
 
index f8a2f6bb548358a08bce3596beaf83eb0bffa37f..e756d1ac00c22b06c9cb278ffeb0e3a8b19664ac 100644 (file)
@@ -247,3 +247,21 @@ void h720x_restart(char mode, const char *cmd)
 {
        CPU_REG (PMU_BASE, PMU_STAT) |= PMU_WARMRESET;
 }
+
+static void h720x__idle(void)
+{
+       CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_IDLE;
+       nop();
+       nop();
+       CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_RUN;
+       nop();
+       nop();
+}
+
+static int __init h720x_idle_init(void)
+{
+       arm_pm_idle = h720x__idle;
+       return 0;
+}
+
+arch_initcall(h720x_idle_init);
diff --git a/arch/arm/mach-h720x/include/mach/system.h b/arch/arm/mach-h720x/include/mach/system.h
deleted file mode 100644 (file)
index 16ac46e..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * arch/arm/mach-h720x/include/mach/system.h
- *
- * Copyright (C) 2001-2002 Jungjun Kim, Hynix Semiconductor Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- * arch/arm/mach-h720x/include/mach/system.h
- *
- */
-
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-#include <mach/hardware.h>
-
-static void arch_idle(void)
-{
-       CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_IDLE;
-       nop();
-       nop();
-       CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_RUN;
-       nop();
-       nop();
-}
-
-#endif
diff --git a/arch/arm/mach-highbank/include/mach/system.h b/arch/arm/mach-highbank/include/mach/system.h
deleted file mode 100644 (file)
index b1d8b5f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2010-2011 Calxeda, Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope 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, see <http://www.gnu.org/licenses/>.
- */
-#ifndef __MACH_SYSTEM_H
-#define __MACH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
-#endif
index 4defb97bbfc866400fe57fe4c5178a778c30a91f..96b1f62c39297186db4be84c7f44294504c98a92 100644 (file)
@@ -320,8 +320,10 @@ config MACH_IMX27_VISSTRIM_M10
        select IMX_HAVE_PLATFORM_IMX_I2C
        select IMX_HAVE_PLATFORM_IMX_SSI
        select IMX_HAVE_PLATFORM_IMX_UART
-       select IMX_HAVE_PLATFORM_MXC_MMC
+       select IMX_HAVE_PLATFORM_MX2_CAMERA
        select IMX_HAVE_PLATFORM_MXC_EHCI
+       select IMX_HAVE_PLATFORM_MXC_MMC
+       select LEDS_GPIO_REGISTER
        help
          Include support for Visstrim_m10 platform and its different variants.
          This includes specific configurations for the board and its
@@ -492,6 +494,7 @@ config MACH_MX31MOBOARD
        bool "Support mx31moboard platforms (EPFL Mobots group)"
        select SOC_IMX31
        select IMX_HAVE_PLATFORM_FSL_USB2_UDC
+       select IMX_HAVE_PLATFORM_IMX2_WDT
        select IMX_HAVE_PLATFORM_IMX_I2C
        select IMX_HAVE_PLATFORM_IMX_UART
        select IMX_HAVE_PLATFORM_IPU_CORE
index c2766ae02b4f049f6bfa6ecf79a312226e35a909..0a1643c3f17d49686d5b262b2a1b1c520a08f678 100644 (file)
 #include <linux/input.h>
 #include <linux/gpio.h>
 #include <linux/delay.h>
+#include <linux/dma-mapping.h>
+#include <linux/leds.h>
+#include <linux/memblock.h>
+#include <media/soc_camera.h>
 #include <sound/tlv320aic32x4.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -39,6 +43,8 @@
 
 #include "devices-imx27.h"
 
+#define TVP5150_RSTN (GPIO_PORTC + 18)
+#define TVP5150_PWDN (GPIO_PORTC + 19)
 #define OTG_PHY_CS_GPIO (GPIO_PORTF + 17)
 #define SDHC1_IRQ IRQ_GPIOB(25)
 
@@ -100,8 +106,99 @@ static const int visstrim_m10_pins[] __initconst = {
        PE1_PF_USBOTG_STP,
        PB23_PF_USB_PWR,
        PB24_PF_USB_OC,
+       /* CSI */
+       PB10_PF_CSI_D0,
+       PB11_PF_CSI_D1,
+       PB12_PF_CSI_D2,
+       PB13_PF_CSI_D3,
+       PB14_PF_CSI_D4,
+       PB15_PF_CSI_MCLK,
+       PB16_PF_CSI_PIXCLK,
+       PB17_PF_CSI_D5,
+       PB18_PF_CSI_D6,
+       PB19_PF_CSI_D7,
+       PB20_PF_CSI_VSYNC,
+       PB21_PF_CSI_HSYNC,
 };
 
+/* Camera */
+static int visstrim_camera_power(struct device *dev, int on)
+{
+       gpio_set_value(TVP5150_PWDN, on);
+
+       return 0;
+};
+
+static int visstrim_camera_reset(struct device *dev)
+{
+       gpio_set_value(TVP5150_RSTN, 0);
+       ndelay(500);
+       gpio_set_value(TVP5150_RSTN, 1);
+
+       return 0;
+};
+
+static struct i2c_board_info visstrim_i2c_camera =  {
+       I2C_BOARD_INFO("tvp5150", 0x5d),
+};
+
+static struct soc_camera_link iclink_tvp5150 = {
+       .bus_id         = 0,
+       .board_info     = &visstrim_i2c_camera,
+       .i2c_adapter_id = 0,
+       .power = visstrim_camera_power,
+       .reset = visstrim_camera_reset,
+};
+
+static struct mx2_camera_platform_data visstrim_camera = {
+       .flags = MX2_CAMERA_CCIR | MX2_CAMERA_CCIR_INTERLACE |
+                       MX2_CAMERA_SWAP16 | MX2_CAMERA_PCLK_SAMPLE_RISING,
+       .clk = 100000,
+};
+
+static phys_addr_t mx2_camera_base __initdata;
+#define MX2_CAMERA_BUF_SIZE SZ_8M
+
+static void __init visstrim_camera_init(void)
+{
+       struct platform_device *pdev;
+       int dma;
+
+       /* Initialize tvp5150 gpios */
+       mxc_gpio_mode(TVP5150_RSTN | GPIO_GPIO | GPIO_OUT);
+       mxc_gpio_mode(TVP5150_PWDN | GPIO_GPIO | GPIO_OUT);
+       gpio_set_value(TVP5150_RSTN, 1);
+       gpio_set_value(TVP5150_PWDN, 0);
+       ndelay(1);
+
+       gpio_set_value(TVP5150_PWDN, 1);
+       ndelay(1);
+       gpio_set_value(TVP5150_RSTN, 0);
+       ndelay(500);
+       gpio_set_value(TVP5150_RSTN, 1);
+       ndelay(200000);
+
+       pdev = imx27_add_mx2_camera(&visstrim_camera);
+       if (IS_ERR(pdev))
+               return;
+
+       dma = dma_declare_coherent_memory(&pdev->dev,
+                               mx2_camera_base, mx2_camera_base,
+                               MX2_CAMERA_BUF_SIZE,
+                               DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
+       if (!(dma & DMA_MEMORY_MAP))
+               return;
+}
+
+static void __init visstrim_reserve(void)
+{
+       /* reserve 4 MiB for mx2-camera */
+       mx2_camera_base = memblock_alloc(MX2_CAMERA_BUF_SIZE,
+                       MX2_CAMERA_BUF_SIZE);
+       memblock_free(mx2_camera_base, MX2_CAMERA_BUF_SIZE);
+       memblock_remove(mx2_camera_base, MX2_CAMERA_BUF_SIZE);
+}
+
 /* GPIOs used as events for applications */
 static struct gpio_keys_button visstrim_gpio_keys[] = {
        {
@@ -136,6 +233,35 @@ static const struct gpio_keys_platform_data
        .nbuttons       = ARRAY_SIZE(visstrim_gpio_keys),
 };
 
+/* led */
+static const struct gpio_led visstrim_m10_leds[] __initconst = {
+       {
+               .name = "visstrim:ld0",
+               .default_trigger = "nand-disk",
+               .gpio = (GPIO_PORTC + 29),
+       },
+       {
+               .name = "visstrim:ld1",
+               .default_trigger = "nand-disk",
+               .gpio = (GPIO_PORTC + 24),
+       },
+       {
+               .name = "visstrim:ld2",
+               .default_trigger = "nand-disk",
+               .gpio = (GPIO_PORTC + 28),
+       },
+       {
+               .name = "visstrim:ld3",
+               .default_trigger = "nand-disk",
+               .gpio = (GPIO_PORTC + 25),
+       },
+};
+
+static const struct gpio_led_platform_data visstrim_m10_led_data __initconst = {
+       .leds = visstrim_m10_leds,
+       .num_leds = ARRAY_SIZE(visstrim_m10_leds),
+};
+
 /* Visstrim_SM10 has a microSD slot connected to sdhc1 */
 static int visstrim_m10_sdhc1_init(struct device *dev,
                irq_handler_t detect_irq, void *data)
@@ -216,6 +342,9 @@ static struct i2c_board_info visstrim_m10_i2c_devices[] = {
        {
                I2C_BOARD_INFO("tlv320aic32x4", 0x18),
                .platform_data = &visstrim_m10_aic32x4_pdata,
+       },
+       {
+                I2C_BOARD_INFO("m41t00", 0x68),
        }
 };
 
@@ -254,15 +383,20 @@ static void __init visstrim_m10_board_init(void)
        imx27_add_imx_ssi(0, &visstrim_m10_ssi_pdata);
        imx27_add_imx_uart0(&uart_pdata);
 
-       i2c_register_board_info(0, visstrim_m10_i2c_devices,
-                               ARRAY_SIZE(visstrim_m10_i2c_devices));
        imx27_add_imx_i2c(0, &visstrim_m10_i2c_data);
        imx27_add_imx_i2c(1, &visstrim_m10_i2c_data);
+       i2c_register_board_info(0, visstrim_m10_i2c_devices,
+                               ARRAY_SIZE(visstrim_m10_i2c_devices));
+
        imx27_add_mxc_mmc(0, &visstrim_m10_sdhc_pdata);
        imx27_add_mxc_ehci_otg(&visstrim_m10_usbotg_pdata);
        imx27_add_fec(NULL);
        imx_add_gpio_keys(&visstrim_gpio_keys_platform_data);
        platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
+       platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0,
+                                     &iclink_tvp5150, sizeof(iclink_tvp5150));
+       gpio_led_register_device(0, &visstrim_m10_led_data);
+       visstrim_camera_init();
 }
 
 static void __init visstrim_m10_timer_init(void)
@@ -276,6 +410,7 @@ static struct sys_timer visstrim_m10_timer = {
 
 MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10")
        .atag_offset = 0x100,
+       .reserve = visstrim_reserve,
        .map_io = mx27_map_io,
        .init_early = imx27_init_early,
        .init_irq = mx27_init_irq,
index f225262b5c38551cb6ec424e01cb71139f9a551f..c0511fb1a5f9dffb860b584421fa421c4cc31ebc 100644 (file)
@@ -530,6 +530,8 @@ static void __init mx31moboard_init(void)
        platform_add_devices(devices, ARRAY_SIZE(devices));
        gpio_led_register_device(-1, &mx31moboard_led_pdata);
 
+       imx31_add_imx2_wdt(NULL);
+
        imx31_add_imx_uart0(&uart0_pdata);
        imx31_add_imx_uart4(&uart4_pdata);
 
@@ -590,7 +592,7 @@ static void __init mx31moboard_reserve(void)
 }
 
 MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
-       /* Maintainer: Valentin Longchamp, EPFL Mobots group */
+       /* Maintainer: Philippe Retornaz, EPFL Mobots group */
        .atag_offset = 0x100,
        .reserve = mx31moboard_reserve,
        .map_io = mx31_map_io,
index 31807d2a8b7bf1a65d57c8f4cb748bb9e6697934..8404ee72555ac4dda154e27d33b9c6f7804afaab 100644 (file)
@@ -34,31 +34,29 @@ static void imx3_idle(void)
 {
        unsigned long reg = 0;
 
-       if (!need_resched())
-               __asm__ __volatile__(
-                       /* disable I and D cache */
-                       "mrc p15, 0, %0, c1, c0, 0\n"
-                       "bic %0, %0, #0x00001000\n"
-                       "bic %0, %0, #0x00000004\n"
-                       "mcr p15, 0, %0, c1, c0, 0\n"
-                       /* invalidate I cache */
-                       "mov %0, #0\n"
-                       "mcr p15, 0, %0, c7, c5, 0\n"
-                       /* clear and invalidate D cache */
-                       "mov %0, #0\n"
-                       "mcr p15, 0, %0, c7, c14, 0\n"
-                       /* WFI */
-                       "mov %0, #0\n"
-                       "mcr p15, 0, %0, c7, c0, 4\n"
-                       "nop\n" "nop\n" "nop\n" "nop\n"
-                       "nop\n" "nop\n" "nop\n"
-                       /* enable I and D cache */
-                       "mrc p15, 0, %0, c1, c0, 0\n"
-                       "orr %0, %0, #0x00001000\n"
-                       "orr %0, %0, #0x00000004\n"
-                       "mcr p15, 0, %0, c1, c0, 0\n"
-                       : "=r" (reg));
-       local_irq_enable();
+       __asm__ __volatile__(
+               /* disable I and D cache */
+               "mrc p15, 0, %0, c1, c0, 0\n"
+               "bic %0, %0, #0x00001000\n"
+               "bic %0, %0, #0x00000004\n"
+               "mcr p15, 0, %0, c1, c0, 0\n"
+               /* invalidate I cache */
+               "mov %0, #0\n"
+               "mcr p15, 0, %0, c7, c5, 0\n"
+               /* clear and invalidate D cache */
+               "mov %0, #0\n"
+               "mcr p15, 0, %0, c7, c14, 0\n"
+               /* WFI */
+               "mov %0, #0\n"
+               "mcr p15, 0, %0, c7, c0, 4\n"
+               "nop\n" "nop\n" "nop\n" "nop\n"
+               "nop\n" "nop\n" "nop\n"
+               /* enable I and D cache */
+               "mrc p15, 0, %0, c1, c0, 0\n"
+               "orr %0, %0, #0x00001000\n"
+               "orr %0, %0, #0x00000004\n"
+               "mcr p15, 0, %0, c1, c0, 0\n"
+               : "=r" (reg));
 }
 
 static void __iomem *imx3_ioremap(unsigned long phys_addr, size_t size,
@@ -134,8 +132,8 @@ void __init imx31_init_early(void)
 {
        mxc_set_cpu_type(MXC_CPU_MX31);
        mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
-       pm_idle = imx3_idle;
        imx_ioremap = imx3_ioremap;
+       arm_pm_idle = imx3_idle;
 }
 
 void __init mx31_init_irq(void)
@@ -197,7 +195,7 @@ void __init imx35_init_early(void)
        mxc_set_cpu_type(MXC_CPU_MX35);
        mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
        mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
-       pm_idle = imx3_idle;
+       arm_pm_idle = imx3_idle;
        imx_ioremap = imx3_ioremap;
 }
 
index bc17dfea38170872c24216165715e8af60144feb..49549a72dc7dbb2de0c8d1e75af06deddbef2a59 100644 (file)
@@ -26,23 +26,17 @@ static struct clk *gpc_dvfs_clk;
 
 static void imx5_idle(void)
 {
-       if (!need_resched()) {
-               /* gpc clock is needed for SRPG */
-               if (gpc_dvfs_clk == NULL) {
-                       gpc_dvfs_clk = clk_get(NULL, "gpc_dvfs");
-                       if (IS_ERR(gpc_dvfs_clk))
-                               goto err0;
-               }
-               clk_enable(gpc_dvfs_clk);
-               mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
-               if (tzic_enable_wake())
-                       goto err1;
-               cpu_do_idle();
-err1:
-               clk_disable(gpc_dvfs_clk);
+       /* gpc clock is needed for SRPG */
+       if (gpc_dvfs_clk == NULL) {
+               gpc_dvfs_clk = clk_get(NULL, "gpc_dvfs");
+               if (IS_ERR(gpc_dvfs_clk))
+                       return;
        }
-err0:
-       local_irq_enable();
+       clk_enable(gpc_dvfs_clk);
+       mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
+       if (tzic_enable_wake() != 0)
+               cpu_do_idle();
+       clk_disable(gpc_dvfs_clk);
 }
 
 /*
@@ -108,7 +102,7 @@ void __init imx51_init_early(void)
        mxc_set_cpu_type(MXC_CPU_MX51);
        mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR));
        mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR));
-       pm_idle = imx5_idle;
+       arm_pm_idle = imx5_idle;
 }
 
 void __init imx53_init_early(void)
index e455d2f855bf1cb5e88a7ff3710c31e347d22bf1..6fcffa7db978d4b025bf6eed72ea4b0b99c417c7 100644 (file)
@@ -10,7 +10,6 @@
 #include <linux/kernel.h>
 #include <linux/suspend.h>
 #include <linux/io.h>
-#include <mach/system.h>
 #include <mach/hardware.h>
 
 static int mx27_suspend_enter(suspend_state_t state)
@@ -23,7 +22,7 @@ static int mx27_suspend_enter(suspend_state_t state)
                cscr &= 0xFFFFFFFC;
                __raw_writel(cscr, MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR));
                /* Executes WFI */
-               arch_idle();
+               cpu_do_idle();
                break;
 
        default:
index 019f0ab08f66fabc6d58a18961c62d66bbb79b68..15b87f26ac963567f396532055eccbae42af15b1 100644 (file)
 
 static struct amba_pl010_data integrator_uart_data;
 
-static struct amba_device rtc_device = {
-       .dev            = {
-               .init_name = "mb:15",
-       },
-       .res            = {
-               .start  = INTEGRATOR_RTC_BASE,
-               .end    = INTEGRATOR_RTC_BASE + SZ_4K - 1,
-               .flags  = IORESOURCE_MEM,
-       },
-       .irq            = { IRQ_RTCINT, NO_IRQ },
-};
+#define INTEGRATOR_RTC_IRQ     { IRQ_RTCINT }
+#define INTEGRATOR_UART0_IRQ   { IRQ_UARTINT0 }
+#define INTEGRATOR_UART1_IRQ   { IRQ_UARTINT1 }
+#define KMI0_IRQ               { IRQ_KMIINT0 }
+#define KMI1_IRQ               { IRQ_KMIINT1 }
 
-static struct amba_device uart0_device = {
-       .dev            = {
-               .init_name = "mb:16",
-               .platform_data = &integrator_uart_data,
-       },
-       .res            = {
-               .start  = INTEGRATOR_UART0_BASE,
-               .end    = INTEGRATOR_UART0_BASE + SZ_4K - 1,
-               .flags  = IORESOURCE_MEM,
-       },
-       .irq            = { IRQ_UARTINT0, NO_IRQ },
-};
+static AMBA_APB_DEVICE(rtc, "mb:15", 0,
+       INTEGRATOR_RTC_BASE, INTEGRATOR_RTC_IRQ, NULL);
 
-static struct amba_device uart1_device = {
-       .dev            = {
-               .init_name = "mb:17",
-               .platform_data = &integrator_uart_data,
-       },
-       .res            = {
-               .start  = INTEGRATOR_UART1_BASE,
-               .end    = INTEGRATOR_UART1_BASE + SZ_4K - 1,
-               .flags  = IORESOURCE_MEM,
-       },
-       .irq            = { IRQ_UARTINT1, NO_IRQ },
-};
+static AMBA_APB_DEVICE(uart0, "mb:16", 0,
+       INTEGRATOR_UART0_BASE, INTEGRATOR_UART0_IRQ, &integrator_uart_data);
 
-static struct amba_device kmi0_device = {
-       .dev            = {
-               .init_name = "mb:18",
-       },
-       .res            = {
-               .start  = KMI0_BASE,
-               .end    = KMI0_BASE + SZ_4K - 1,
-               .flags  = IORESOURCE_MEM,
-       },
-       .irq            = { IRQ_KMIINT0, NO_IRQ },
-};
+static AMBA_APB_DEVICE(uart1, "mb:17", 0,
+       INTEGRATOR_UART1_BASE, INTEGRATOR_UART1_IRQ, &integrator_uart_data);
 
-static struct amba_device kmi1_device = {
-       .dev            = {
-               .init_name = "mb:19",
-       },
-       .res            = {
-               .start  = KMI1_BASE,
-               .end    = KMI1_BASE + SZ_4K - 1,
-               .flags  = IORESOURCE_MEM,
-       },
-       .irq            = { IRQ_KMIINT1, NO_IRQ },
-};
+static AMBA_APB_DEVICE(kmi0, "mb:18", 0, KMI0_BASE, KMI0_IRQ, NULL);
+static AMBA_APB_DEVICE(kmi1, "mb:19", 0, KMI1_BASE, KMI1_IRQ, NULL);
 
 static struct amba_device *amba_devs[] __initdata = {
        &rtc_device,
index 8cbb75a96bd4b3140c3007f0393e06fe6194d807..3e538da6cb1f756396314fbe71efee0221dd1874 100644 (file)
@@ -401,24 +401,21 @@ static int impd1_probe(struct lm_device *dev)
 
                pc_base = dev->resource.start + idev->offset;
 
-               d = kzalloc(sizeof(struct amba_device), GFP_KERNEL);
+               d = amba_device_alloc(NULL, pc_base, SZ_4K);
                if (!d)
                        continue;
 
                dev_set_name(&d->dev, "lm%x:%5.5lx", dev->id, idev->offset >> 12);
                d->dev.parent   = &dev->dev;
-               d->res.start    = dev->resource.start + idev->offset;
-               d->res.end      = d->res.start + SZ_4K - 1;
-               d->res.flags    = IORESOURCE_MEM;
                d->irq[0]       = dev->irq;
                d->irq[1]       = dev->irq;
                d->periphid     = idev->id;
                d->dev.platform_data = idev->platform_data;
 
-               ret = amba_device_register(d, &dev->resource);
+               ret = amba_device_add(d, &dev->resource);
                if (ret) {
                        dev_err(&d->dev, "unable to register device: %d\n", ret);
-                       kfree(d);
+                       amba_device_put(d);
                }
        }
 
diff --git a/arch/arm/mach-integrator/include/mach/system.h b/arch/arm/mach-integrator/include/mach/system.h
deleted file mode 100644 (file)
index 901514e..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *  arch/arm/mach-integrator/include/mach/system.h
- *
- *  Copyright (C) 1999 ARM Limited
- *  Copyright (C) 2000 Deep Blue Solutions Ltd
- *
- * 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.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-       /*
-        * This should do all the clock switching
-        * and wait for interrupt tricks
-        */
-       cpu_do_idle();
-}
-
-#endif
index a8b6aa6003f35493cd8afa8b92212ee3510d9e6c..be9ead4a3bcc3b55a44634fbdc6eabcb37733a32 100644 (file)
@@ -347,32 +347,14 @@ static struct mmci_platform_data mmc_data = {
        .gpio_cd        = -1,
 };
 
-static struct amba_device mmc_device = {
-       .dev            = {
-               .init_name = "mb:1c",
-               .platform_data = &mmc_data,
-       },
-       .res            = {
-               .start  = INTEGRATOR_CP_MMC_BASE,
-               .end    = INTEGRATOR_CP_MMC_BASE + SZ_4K - 1,
-               .flags  = IORESOURCE_MEM,
-       },
-       .irq            = { IRQ_CP_MMCIINT0, IRQ_CP_MMCIINT1 },
-       .periphid       = 0,
-};
+#define INTEGRATOR_CP_MMC_IRQS { IRQ_CP_MMCIINT0, IRQ_CP_MMCIINT1 }
+#define INTEGRATOR_CP_AACI_IRQS        { IRQ_CP_AACIINT }
 
-static struct amba_device aaci_device = {
-       .dev            = {
-               .init_name = "mb:1d",
-       },
-       .res            = {
-               .start  = INTEGRATOR_CP_AACI_BASE,
-               .end    = INTEGRATOR_CP_AACI_BASE + SZ_4K - 1,
-               .flags  = IORESOURCE_MEM,
-       },
-       .irq            = { IRQ_CP_AACIINT, NO_IRQ },
-       .periphid       = 0,
-};
+static AMBA_APB_DEVICE(mmc, "mb:1c", 0, INTEGRATOR_CP_MMC_BASE,
+       INTEGRATOR_CP_MMC_IRQS, &mmc_data);
+
+static AMBA_APB_DEVICE(aaci, "mb:1d", 0, INTEGRATOR_CP_AACI_BASE,
+       INTEGRATOR_CP_AACI_IRQS, NULL);
 
 
 /*
@@ -425,21 +407,8 @@ static struct clcd_board clcd_data = {
        .remove         = versatile_clcd_remove_dma,
 };
 
-static struct amba_device clcd_device = {
-       .dev            = {
-               .init_name = "mb:c0",
-               .coherent_dma_mask = ~0,
-               .platform_data = &clcd_data,
-       },
-       .res            = {
-               .start  = INTCP_PA_CLCD_BASE,
-               .end    = INTCP_PA_CLCD_BASE + SZ_4K - 1,
-               .flags  = IORESOURCE_MEM,
-       },
-       .dma_mask       = ~0,
-       .irq            = { IRQ_CP_CLCDCINT, NO_IRQ },
-       .periphid       = 0,
-};
+static AMBA_AHB_DEVICE(clcd, "mb:c0", 0, INTCP_PA_CLCD_BASE,
+       { IRQ_CP_CLCDCINT }, &clcd_data);
 
 static struct amba_device *amba_devs[] __initdata = {
        &mmc_device,
diff --git a/arch/arm/mach-iop13xx/include/mach/system.h b/arch/arm/mach-iop13xx/include/mach/system.h
deleted file mode 100644 (file)
index 1f31ed3..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * arch/arm/mach-iop13xx/include/mach/system.h
- *
- *  Copyright (C) 2004 Intel Corp.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h
deleted file mode 100644 (file)
index 4a88727..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * arch/arm/mach-iop32x/include/mach/system.h
- *
- * Copyright (C) 2001 MontaVista Software, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-iop33x/include/mach/system.h
deleted file mode 100644 (file)
index 4f98e76..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * arch/arm/mach-iop33x/include/mach/system.h
- *
- * Copyright (C) 2001 MontaVista Software, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
diff --git a/arch/arm/mach-ixp2000/include/mach/system.h b/arch/arm/mach-ixp2000/include/mach/system.h
deleted file mode 100644 (file)
index a7fb08b..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * arch/arm/mach-ixp2000/include/mach/system.h
- *
- * Copyright (C) 2002 Intel Corp.
- * Copyricht (C) 2003-2005 MontaVista Software, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
index 0923bb905cc0ce917bf1df1a249c482bb3f27c10..7c1495e4fe7abeabc9379f9bd022b3460dfd45ec 100644 (file)
@@ -441,6 +441,9 @@ static struct platform_device *ixp23xx_devices[] __initdata = {
 
 void __init ixp23xx_sys_init(void)
 {
+       /* by default, the idle code is disabled */
+       disable_hlt();
+
        *IXP23XX_EXP_UNIT_FUSE |= 0xf;
        platform_add_devices(ixp23xx_devices, ARRAY_SIZE(ixp23xx_devices));
 }
diff --git a/arch/arm/mach-ixp23xx/include/mach/system.h b/arch/arm/mach-ixp23xx/include/mach/system.h
deleted file mode 100644 (file)
index 277dda7..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * arch/arm/mach-ixp23xx/include/mach/system.h
- *
- * Copyright (C) 2003 Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-static inline void arch_idle(void)
-{
-#if 0
-       if (!hlt_counter)
-               cpu_do_idle();
-#endif
-}
index 3841ab4146ba6cd30300eb6946a4fb75c32d431a..a6329a0a8ec4b3dc0522df2bc130e683cd171f5a 100644 (file)
@@ -236,6 +236,12 @@ void __init ixp4xx_init_irq(void)
 {
        int i = 0;
 
+       /*
+        * ixp4xx does not implement the XScale PWRMODE register
+        * so it must not call cpu_do_idle().
+        */
+       disable_hlt();
+
        /* Route all sources to IRQ instead of FIQ */
        *IXP4XX_ICLR = 0x0;
 
diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h
deleted file mode 100644 (file)
index 140a9be..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-ixp4xx/include/mach/system.h
- *
- * Copyright (C) 2002 Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- */
-static inline void arch_idle(void)
-{
-       /* ixp4xx does not implement the XScale PWRMODE register,
-        * so it must not call cpu_do_idle() here.
-        */
-#if 0
-       cpu_do_idle();
-#endif
-}
index 7fc603b468916014d12499c26825e945655a1941..90ceab761929e7839c3968e9e7403c1c56dc7710 100644 (file)
@@ -44,6 +44,20 @@ config MACH_GURUPLUG
          Say 'Y' here if you want your kernel to support the
          Marvell GuruPlug Reference Board.
 
+config ARCH_KIRKWOOD_DT
+       bool "Marvell Kirkwood Flattened Device Tree"
+       select USE_OF
+       help
+         Say 'Y' here if you want your kernel to support the
+         Marvell Kirkwood using flattened device tree.
+
+config MACH_DREAMPLUG_DT
+       bool "Marvell DreamPlug (Flattened Device Tree)"
+       select ARCH_KIRKWOOD_DT
+       help
+         Say 'Y' here if you want your kernel to support the
+         Marvell DreamPlug (Flattened Device Tree).
+
 config MACH_TS219
        bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
        help
index 5dcaa81a2ec39f0f6b60a13438651ab381fc6eb4..acbc5e1db06f1c195762d1275e2ebc5294d64830 100644 (file)
@@ -20,3 +20,4 @@ obj-$(CONFIG_MACH_NET5BIG_V2)         += netxbig_v2-setup.o lacie_v2-common.o
 obj-$(CONFIG_MACH_T5325)               += t5325-setup.o
 
 obj-$(CONFIG_CPU_IDLE)                 += cpuidle.o
+obj-$(CONFIG_ARCH_KIRKWOOD_DT)         += board-dt.o
index 760a0efe7580b0dd194ff9bfe4295624336bb806..16f938522304ededdb6a498730e0616f082d3ff6 100644 (file)
@@ -1,3 +1,5 @@
    zreladdr-y  += 0x00008000
 params_phys-y  := 0x00000100
 initrd_phys-y  := 0x00800000
+
+dtb-$(CONFIG_MACH_DREAMPLUG_DT) += kirkwood-dreamplug.dtb
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
new file mode 100644 (file)
index 0000000..fbe6405
--- /dev/null
@@ -0,0 +1,180 @@
+/*
+ * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net>
+ *
+ * arch/arm/mach-kirkwood/board-dt.c
+ *
+ * Marvell DreamPlug Reference Board Setup
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/partitions.h>
+#include <linux/ata_platform.h>
+#include <linux/mv643xx_eth.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/of_fdt.h>
+#include <linux/of_irq.h>
+#include <linux/of_platform.h>
+#include <linux/gpio.h>
+#include <linux/leds.h>
+#include <linux/mtd/physmap.h>
+#include <linux/spi/flash.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/orion_spi.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <mach/kirkwood.h>
+#include <plat/mvsdio.h>
+#include "common.h"
+#include "mpp.h"
+
+static struct of_device_id kirkwood_dt_match_table[] __initdata = {
+       { .compatible = "simple-bus", },
+       { }
+};
+
+struct mtd_partition dreamplug_partitions[] = {
+       {
+               .name   = "u-boot",
+               .size   = SZ_512K,
+               .offset = 0,
+       },
+       {
+               .name   = "u-boot env",
+               .size   = SZ_64K,
+               .offset = SZ_512K + SZ_512K,
+       },
+       {
+               .name   = "dtb",
+               .size   = SZ_64K,
+               .offset = SZ_512K + SZ_512K + SZ_512K,
+       },
+};
+
+static const struct flash_platform_data dreamplug_spi_slave_data = {
+       .type           = "mx25l1606e",
+       .name           = "spi_flash",
+       .parts          = dreamplug_partitions,
+       .nr_parts       = ARRAY_SIZE(dreamplug_partitions),
+};
+
+static struct spi_board_info __initdata dreamplug_spi_slave_info[] = {
+       {
+               .modalias       = "m25p80",
+               .platform_data  = &dreamplug_spi_slave_data,
+               .irq            = -1,
+               .max_speed_hz   = 50000000,
+               .bus_num        = 0,
+               .chip_select    = 0,
+       },
+};
+
+static struct mv643xx_eth_platform_data dreamplug_ge00_data = {
+       .phy_addr       = MV643XX_ETH_PHY_ADDR(0),
+};
+
+static struct mv643xx_eth_platform_data dreamplug_ge01_data = {
+       .phy_addr       = MV643XX_ETH_PHY_ADDR(1),
+};
+
+static struct mv_sata_platform_data dreamplug_sata_data = {
+       .n_ports        = 1,
+};
+
+static struct mvsdio_platform_data dreamplug_mvsdio_data = {
+       /* unfortunately the CD signal has not been connected */
+};
+
+static struct gpio_led dreamplug_led_pins[] = {
+       {
+               .name                   = "dreamplug:blue:bluetooth",
+               .gpio                   = 47,
+               .active_low             = 1,
+       },
+       {
+               .name                   = "dreamplug:green:wifi",
+               .gpio                   = 48,
+               .active_low             = 1,
+       },
+       {
+               .name                   = "dreamplug:green:wifi_ap",
+               .gpio                   = 49,
+               .active_low             = 1,
+       },
+};
+
+static struct gpio_led_platform_data dreamplug_led_data = {
+       .leds           = dreamplug_led_pins,
+       .num_leds       = ARRAY_SIZE(dreamplug_led_pins),
+};
+
+static struct platform_device dreamplug_leds = {
+       .name   = "leds-gpio",
+       .id     = -1,
+       .dev    = {
+               .platform_data  = &dreamplug_led_data,
+       }
+};
+
+static unsigned int dreamplug_mpp_config[] __initdata = {
+       MPP0_SPI_SCn,
+       MPP1_SPI_MOSI,
+       MPP2_SPI_SCK,
+       MPP3_SPI_MISO,
+       MPP47_GPIO,     /* Bluetooth LED */
+       MPP48_GPIO,     /* Wifi LED */
+       MPP49_GPIO,     /* Wifi AP LED */
+       0
+};
+
+static void __init dreamplug_init(void)
+{
+       /*
+        * Basic setup. Needs to be called early.
+        */
+       kirkwood_mpp_conf(dreamplug_mpp_config);
+
+       spi_register_board_info(dreamplug_spi_slave_info,
+                               ARRAY_SIZE(dreamplug_spi_slave_info));
+       kirkwood_spi_init();
+
+       kirkwood_ehci_init();
+       kirkwood_ge00_init(&dreamplug_ge00_data);
+       kirkwood_ge01_init(&dreamplug_ge01_data);
+       kirkwood_sata_init(&dreamplug_sata_data);
+       kirkwood_sdio_init(&dreamplug_mvsdio_data);
+
+       platform_device_register(&dreamplug_leds);
+}
+
+static void __init kirkwood_dt_init(void)
+{
+       kirkwood_init();
+
+       if (of_machine_is_compatible("globalscale,dreamplug"))
+               dreamplug_init();
+
+       of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL);
+}
+
+static const char *kirkwood_dt_board_compat[] = {
+       "globalscale,dreamplug",
+       NULL
+};
+
+DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)")
+       /* Maintainer: Jason Cooper <jason@lakedaemon.net> */
+       .map_io         = kirkwood_map_io,
+       .init_early     = kirkwood_init_early,
+       .init_irq       = kirkwood_init_irq,
+       .timer          = &kirkwood_timer,
+       .init_machine   = kirkwood_dt_init,
+       .restart        = kirkwood_restart,
+       .dt_compat      = kirkwood_dt_board_compat,
+MACHINE_END
diff --git a/arch/arm/mach-kirkwood/include/mach/system.h b/arch/arm/mach-kirkwood/include/mach/system.h
deleted file mode 100644 (file)
index 5fddde0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * arch/arm/mach-kirkwood/include/mach/system.h
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
-#endif
diff --git a/arch/arm/mach-ks8695/include/mach/system.h b/arch/arm/mach-ks8695/include/mach/system.h
deleted file mode 100644 (file)
index 59fe992..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * arch/arm/mach-s3c2410/include/mach/system.h
- *
- * Copyright (C) 2006 Simtec Electronics
- *     Ben Dooks <ben@simtec.co.uk>
- *
- * KS8695 - System function defines and includes
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static void arch_idle(void)
-{
-       /*
-        * This should do all the clock switching
-        * and wait for interrupt tricks,
-        */
-       cpu_do_idle();
-
-}
-
-#endif
diff --git a/arch/arm/mach-lpc32xx/include/mach/system.h b/arch/arm/mach-lpc32xx/include/mach/system.h
deleted file mode 100644 (file)
index bf176c9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * arch/arm/mach-lpc32xx/include/mach/system.h
- *
- * Author: Kevin Wells <kevin.wells@nxp.com>
- *
- * Copyright (C) 2010 NXP Semiconductors
- *
- * 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.
- *
- * 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.
- */
-
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
-#endif
index bfee5b4551055b2f7c5e1e68b7b07710361b2db0..5d51c102c255ba8d7f71c58ee728fb79d15c980f 100644 (file)
@@ -149,20 +149,8 @@ static struct clcd_board lpc32xx_clcd_data = {
        .remove         = lpc32xx_clcd_remove,
 };
 
-static struct amba_device lpc32xx_clcd_device = {
-       .dev                            = {
-               .coherent_dma_mask      = ~0,
-               .init_name              = "dev:clcd",
-               .platform_data          = &lpc32xx_clcd_data,
-       },
-       .res                            = {
-               .start                  = LPC32XX_LCD_BASE,
-               .end                    = (LPC32XX_LCD_BASE + SZ_4K - 1),
-               .flags                  = IORESOURCE_MEM,
-       },
-       .dma_mask                       = ~0,
-       .irq                            = {IRQ_LPC32XX_LCD, NO_IRQ},
-};
+static AMBA_AHB_DEVICE(lpc32xx_clcd, "dev:clcd", 0,
+       LPC32XX_LCD_BASE, { IRQ_LPC32XX_LCD }, &lpc32xx_clcd_data);
 
 /*
  * AMBA SSP (SPI)
@@ -191,20 +179,8 @@ static struct pl022_ssp_controller lpc32xx_ssp0_data = {
        .enable_dma             = 0,
 };
 
-static struct amba_device lpc32xx_ssp0_device = {
-       .dev                            = {
-               .coherent_dma_mask      = ~0,
-               .init_name              = "dev:ssp0",
-               .platform_data          = &lpc32xx_ssp0_data,
-       },
-       .res                            = {
-               .start                  = LPC32XX_SSP0_BASE,
-               .end                    = (LPC32XX_SSP0_BASE + SZ_4K - 1),
-               .flags                  = IORESOURCE_MEM,
-       },
-       .dma_mask                       = ~0,
-       .irq                            = {IRQ_LPC32XX_SSP0, NO_IRQ},
-};
+static AMBA_APB_DEVICE(lpc32xx_ssp0, "dev:ssp0", 0,
+       LPC32XX_SSP0_BASE, { IRQ_LPC32XX_SSP0 }, &lpc32xx_ssp0_data);
 
 /* AT25 driver registration */
 static int __init phy3250_spi_board_register(void)
diff --git a/arch/arm/mach-mmp/include/mach/system.h b/arch/arm/mach-mmp/include/mach/system.h
deleted file mode 100644 (file)
index 1d001ea..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * linux/arch/arm/mach-mmp/include/mach/system.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __ASM_MACH_SYSTEM_H
-#define __ASM_MACH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
-#endif /* __ASM_MACH_SYSTEM_H */
index 617c60a170a4c1787327e738d428c042ada56869..c709a24a9d256fceaab077914ccc0e8cffc7b634 100644 (file)
@@ -223,6 +223,7 @@ struct resource mmp2_resource_gpio[] = {
        }, {
                .start  = IRQ_MMP2_GPIO,
                .end    = IRQ_MMP2_GPIO,
+               .name   = "gpio_mux",
                .flags  = IORESOURCE_IRQ,
        },
 };
index ada1213982b4a6da1d3abae4235385a724c3e235..f10f87d8b6677b468fd1371026c1972f361ce46d 100644 (file)
@@ -166,6 +166,7 @@ struct resource pxa168_resource_gpio[] = {
        }, {
                .start  = IRQ_PXA168_GPIOX,
                .end    = IRQ_PXA168_GPIOX,
+               .name   = "gpio_mux",
                .flags  = IORESOURCE_IRQ,
        },
 };
index 3241a25784d09b6c5ba83ba88752fcee5c7f9dd0..0c87e69adf9fa6da1a9df2b10cc6dda8a1d132ea 100644 (file)
@@ -173,6 +173,7 @@ struct resource pxa910_resource_gpio[] = {
        }, {
                .start  = IRQ_PXA910_AP_GPIO,
                .end    = IRQ_PXA910_AP_GPIO,
+               .name   = "gpio_mux",
                .flags  = IORESOURCE_IRQ,
        },
 };
diff --git a/arch/arm/mach-msm/idle.S b/arch/arm/mach-msm/idle.S
deleted file mode 100644 (file)
index 6a94f05..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* arch/arm/mach-msm/include/mach/idle.S
- *
- * Idle processing for MSM7K - work around bugs with SWFI.
- *
- * Copyright (c) 2007 QUALCOMM Incorporated.
- * Copyright (C) 2007 Google, Inc. 
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * 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.
- *
- */ 
-               
-#include <linux/linkage.h>
-#include <asm/assembler.h>
-
-ENTRY(arch_idle)
-#ifdef CONFIG_MSM7X00A_IDLE
-       mrc     p15, 0, r1, c1, c0, 0    /* read current CR    */
-       bic     r0, r1, #(1 << 2)        /* clear dcache bit   */
-       bic     r0, r0, #(1 << 12)       /* clear icache bit   */
-       mcr     p15, 0, r0, c1, c0, 0    /* disable d/i cache  */
-
-       mov     r0, #0                   /* prepare wfi value  */
-       mcr     p15, 0, r0, c7, c10, 0   /* flush the cache    */
-       mcr     p15, 0, r0, c7, c10, 4   /* memory barrier     */
-       mcr     p15, 0, r0, c7, c0, 4    /* wait for interrupt */
-
-       mcr     p15, 0, r1, c1, c0, 0    /* restore d/i cache  */
-#endif
-       mov     pc, lr
diff --git a/arch/arm/mach-msm/idle.c b/arch/arm/mach-msm/idle.c
new file mode 100644 (file)
index 0000000..0c9e13c
--- /dev/null
@@ -0,0 +1,49 @@
+/* arch/arm/mach-msm/idle.c
+ *
+ * Idle processing for MSM7K - work around bugs with SWFI.
+ *
+ * Copyright (c) 2007 QUALCOMM Incorporated.
+ * Copyright (C) 2007 Google, Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * 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.
+ *
+ */
+
+#include <linux/init.h>
+#include <asm/system.h>
+
+static void msm_idle(void)
+{
+#ifdef CONFIG_MSM7X00A_IDLE
+       asm volatile (
+
+       "mrc     p15, 0, r1, c1, c0, 0    /* read current CR    */ \n\t"
+       "bic     r0, r1, #(1 << 2)        /* clear dcache bit   */ \n\t"
+       "bic     r0, r0, #(1 << 12)       /* clear icache bit   */ \n\t"
+       "mcr     p15, 0, r0, c1, c0, 0    /* disable d/i cache  */ \n\t"
+
+       "mov     r0, #0                   /* prepare wfi value  */ \n\t"
+       "mcr     p15, 0, r0, c7, c10, 0   /* flush the cache    */ \n\t"
+       "mcr     p15, 0, r0, c7, c10, 4   /* memory barrier     */ \n\t"
+       "mcr     p15, 0, r0, c7, c0, 4    /* wait for interrupt */ \n\t"
+
+       "mcr     p15, 0, r1, c1, c0, 0    /* restore d/i cache  */ \n\t"
+
+       : : : "r0","r1" );
+#endif
+}
+
+static int __init msm_idle_init(void)
+{
+       arm_pm_idle = msm_idle;
+       return 0;
+}
+
+arch_initcall(msm_idle_init);
index 311db2b35da0e025c4b808c381a1d2a4928035a5..f5fb2ec87ffe62010a5c06b0a725777e93f39da5 100644 (file)
@@ -12,7 +12,6 @@
  * GNU General Public License for more details.
  *
  */
-void arch_idle(void);
 
 /* low level hardware reset hook -- for example, hitting the
  * PSHOLD line on the PMIC to hard reset the system
diff --git a/arch/arm/mach-mv78xx0/include/mach/system.h b/arch/arm/mach-mv78xx0/include/mach/system.h
deleted file mode 100644 (file)
index 8c3a538..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * arch/arm/mach-mv78xx0/include/mach/system.h
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
-#endif
index cf00b3e3be85177cd089bee0ec41b876069bf7da..c57f9964a713677ac0a5d93fdc0c89d0e16fe048 100644 (file)
@@ -83,6 +83,18 @@ config MODULE_M28
        select MXS_HAVE_PLATFORM_MXSFB
        select MXS_OCOTP
 
+config MODULE_APX4
+       bool
+       select SOC_IMX28
+       select LEDS_GPIO_REGISTER
+       select MXS_HAVE_AMBA_DUART
+       select MXS_HAVE_PLATFORM_AUART
+       select MXS_HAVE_PLATFORM_FEC
+       select MXS_HAVE_PLATFORM_MXS_I2C
+       select MXS_HAVE_PLATFORM_MXS_MMC
+       select MXS_HAVE_PLATFORM_MXS_SAIF
+       select MXS_OCOTP
+
 config MACH_TX28
        bool "Ka-Ro TX28 module"
        select MODULE_TX28
@@ -91,4 +103,8 @@ config MACH_M28EVK
        bool "Support DENX M28EVK Platform"
        select MODULE_M28
 
+config MACH_APX4DEVKIT
+       bool "Support Bluegiga APX4 Development Kit"
+       select MODULE_APX4
+
 endif
index 8c93b24896bf8571c02614cc5cc163d5eb0b888e..908bf9a567f18f490a81c708be9ddb9c4744fc40 100644 (file)
@@ -11,6 +11,7 @@ obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o
 obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o
 obj-$(CONFIG_MACH_MX28EVK) += mach-mx28evk.o
 obj-$(CONFIG_MACH_M28EVK)    += mach-m28evk.o
+obj-$(CONFIG_MACH_APX4DEVKIT) += mach-apx4devkit.o
 obj-$(CONFIG_MODULE_TX28) += module-tx28.o
 obj-$(CONFIG_MACH_TX28)    += mach-tx28.o
 
index fe3e847930c9ff514fb3ca735e6c9a6530986246..01faffec30644727f6c5f2a67b3dcf6b098f1d1d 100644 (file)
@@ -77,16 +77,18 @@ err:
 
 int __init mxs_add_amba_device(const struct amba_device *dev)
 {
-       struct amba_device *adev = kmalloc(sizeof(*adev), GFP_KERNEL);
+       struct amba_device *adev = amba_device_alloc(dev->dev.init_name,
+               dev->res.start, resource_size(&dev->res));
 
        if (!adev) {
                pr_err("%s: failed to allocate memory", __func__);
                return -ENOMEM;
        }
 
-       *adev = *dev;
+       adev->irq[0] = dev->irq[0];
+       adev->irq[1] = dev->irq[1];
 
-       return amba_device_register(adev, &iomem_resource);
+       return amba_device_add(adev, &iomem_resource);
 }
 
 struct device mxs_apbh_bus = {
index a559db09b49ce1f3009524c7c087f4470d92c8e7..a5479f7660469946071dccfacae3637d8d8106d1 100644 (file)
@@ -23,7 +23,7 @@ const struct amba_device name##_device __initconst = {                \
                .end = (soc ## _DUART_BASE_ADDR) + SZ_8K - 1,   \
                .flags = IORESOURCE_MEM,                        \
        },                                                      \
-       .irq = {soc ## _INT_DUART, NO_IRQ},                     \
+       .irq = {soc ## _INT_DUART},                             \
 }
 
 #ifdef CONFIG_SOC_IMX23
index 49a888c65d6df5d2b55c044e0f82099a9ab2dd06..17964066303f4f5b21ae80d56605148f00e70af5 100644 (file)
@@ -18,4 +18,5 @@
 #define HW_DIGCTL_CTRL                 0x0
 #define  BP_DIGCTL_CTRL_SAIF_CLKMUX    10
 #define  BM_DIGCTL_CTRL_SAIF_CLKMUX    (0x3 << 10)
+#define HW_DIGCTL_CHIPID               0x310
 #endif
index bde5f6634747c639af514ecf9d699b1176891802..7d4fb6d0afdafd189515639c01ffb0e86d6ea4e5 100644 (file)
 #include <linux/io.h>
 #endif
 #include <asm/mach-types.h>
+#include <mach/digctl.h>
 #include <mach/hardware.h>
 
-/*
- * MXS CPU types
- */
-#define cpu_is_mx23()          (                                       \
-               machine_is_mx23evk() ||                                 \
-               machine_is_stmp378x() ||                                \
-               0)
-#define cpu_is_mx28()          (                                       \
-               machine_is_mx28evk() ||                                 \
-               machine_is_m28evk() ||                                  \
-               machine_is_tx28() ||                                    \
-               0)
-
 /*
  * IO addresses common to MXS-based
  */
@@ -109,6 +97,21 @@ static inline void __mxs_togl(u32 mask, void __iomem *reg)
 {
        __raw_writel(mask, reg + MXS_TOG_ADDR);
 }
+
+/*
+ * MXS CPU types
+ */
+#define MXS_CHIPID (MXS_IO_ADDRESS(MXS_DIGCTL_BASE_ADDR) + HW_DIGCTL_CHIPID)
+
+static inline int cpu_is_mx23(void)
+{
+       return ((__raw_readl(MXS_CHIPID) >> 16) == 0x3780);
+}
+
+static inline int cpu_is_mx28(void)
+{
+       return ((__raw_readl(MXS_CHIPID) >> 16) == 0x2800);
+}
 #endif
 
 #endif /* __MACH_MXS_H__ */
diff --git a/arch/arm/mach-mxs/include/mach/system.h b/arch/arm/mach-mxs/include/mach/system.h
deleted file mode 100644 (file)
index e7ad1bb..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- *  Copyright (C) 1999 ARM Limited
- *  Copyright (C) 2000 Deep Blue Solutions Ltd
- *  Copyright 2004-2008 Freescale Semiconductor, Inc. All Rights Reserved.
- *
- * 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.
- *
- * 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.
- */
-
-#ifndef __MACH_MXS_SYSTEM_H__
-#define __MACH_MXS_SYSTEM_H__
-
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
-#endif /* __MACH_MXS_SYSTEM_H__ */
index 67776746f143df5c4e2669cd5e10621aee0b90bf..ef28114954467007d2d6083a7b3540e5309ba490 100644 (file)
@@ -18,8 +18,6 @@
 #ifndef __MACH_MXS_UNCOMPRESS_H__
 #define __MACH_MXS_UNCOMPRESS_H__
 
-#include <asm/mach-types.h>
-
 unsigned long mxs_duart_base;
 
 #define MXS_DUART(x)   (*(volatile unsigned long *)(mxs_duart_base + (x)))
@@ -55,16 +53,17 @@ static inline void flush(void)
 
 #define MX23_DUART_BASE_ADDR   0x80070000
 #define MX28_DUART_BASE_ADDR   0x80074000
+#define MXS_DIGCTL_CHIPID      0x8001c310
 
 static inline void __arch_decomp_setup(unsigned long arch_id)
 {
-       switch (arch_id) {
-       case MACH_TYPE_MX23EVK:
+       u16 chipid = (*(volatile unsigned long *) MXS_DIGCTL_CHIPID) >> 16;
+
+       switch (chipid) {
+       case 0x3780:
                mxs_duart_base = MX23_DUART_BASE_ADDR;
                break;
-       case MACH_TYPE_MX28EVK:
-       case MACH_TYPE_M28EVK:
-       case MACH_TYPE_TX28:
+       case 0x2800:
                mxs_duart_base = MX28_DUART_BASE_ADDR;
                break;
        default:
diff --git a/arch/arm/mach-mxs/mach-apx4devkit.c b/arch/arm/mach-mxs/mach-apx4devkit.c
new file mode 100644 (file)
index 0000000..48a7fab
--- /dev/null
@@ -0,0 +1,260 @@
+/*
+ * Copyright (C) 2011-2012
+ * Lauri Hintsala, Bluegiga, <lauri.hintsala@bluegiga.com>
+ * Veli-Pekka Peltola, Bluegiga, <veli-pekka.peltola@bluegiga.com>
+ *
+ * based on: mach-mx28evk.c
+ * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+#include <linux/delay.h>
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+#include <linux/leds.h>
+#include <linux/clk.h>
+#include <linux/i2c.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
+#include <linux/micrel_phy.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/time.h>
+
+#include <mach/common.h>
+#include <mach/digctl.h>
+#include <mach/iomux-mx28.h>
+
+#include "devices-mx28.h"
+
+#define APX4DEVKIT_GPIO_USERLED        MXS_GPIO_NR(3, 28)
+
+static const iomux_cfg_t apx4devkit_pads[] __initconst = {
+       /* duart */
+       MX28_PAD_PWM0__DUART_RX | MXS_PAD_CTRL,
+       MX28_PAD_PWM1__DUART_TX | MXS_PAD_CTRL,
+
+       /* auart0 */
+       MX28_PAD_AUART0_RX__AUART0_RX | MXS_PAD_CTRL,
+       MX28_PAD_AUART0_TX__AUART0_TX | MXS_PAD_CTRL,
+       MX28_PAD_AUART0_CTS__AUART0_CTS | MXS_PAD_CTRL,
+       MX28_PAD_AUART0_RTS__AUART0_RTS | MXS_PAD_CTRL,
+
+       /* auart1 */
+       MX28_PAD_AUART1_RX__AUART1_RX | MXS_PAD_CTRL,
+       MX28_PAD_AUART1_TX__AUART1_TX | MXS_PAD_CTRL,
+
+       /* auart2 */
+       MX28_PAD_SSP2_SCK__AUART2_RX | MXS_PAD_CTRL,
+       MX28_PAD_SSP2_MOSI__AUART2_TX | MXS_PAD_CTRL,
+
+       /* auart3 */
+       MX28_PAD_SSP2_MISO__AUART3_RX | MXS_PAD_CTRL,
+       MX28_PAD_SSP2_SS0__AUART3_TX | MXS_PAD_CTRL,
+
+#define MXS_PAD_FEC    (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP)
+       /* fec0 */
+       MX28_PAD_ENET0_MDC__ENET0_MDC | MXS_PAD_FEC,
+       MX28_PAD_ENET0_MDIO__ENET0_MDIO | MXS_PAD_FEC,
+       MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | MXS_PAD_FEC,
+       MX28_PAD_ENET0_RXD0__ENET0_RXD0 | MXS_PAD_FEC,
+       MX28_PAD_ENET0_RXD1__ENET0_RXD1 | MXS_PAD_FEC,
+       MX28_PAD_ENET0_TX_EN__ENET0_TX_EN | MXS_PAD_FEC,
+       MX28_PAD_ENET0_TXD0__ENET0_TXD0 | MXS_PAD_FEC,
+       MX28_PAD_ENET0_TXD1__ENET0_TXD1 | MXS_PAD_FEC,
+       MX28_PAD_ENET_CLK__CLKCTRL_ENET | MXS_PAD_FEC,
+
+       /* i2c */
+       MX28_PAD_I2C0_SCL__I2C0_SCL,
+       MX28_PAD_I2C0_SDA__I2C0_SDA,
+
+       /* mmc0 */
+       MX28_PAD_SSP0_DATA0__SSP0_D0 |
+               (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+       MX28_PAD_SSP0_DATA1__SSP0_D1 |
+               (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+       MX28_PAD_SSP0_DATA2__SSP0_D2 |
+               (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+       MX28_PAD_SSP0_DATA3__SSP0_D3 |
+               (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+       MX28_PAD_SSP0_DATA4__SSP0_D4 |
+               (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+       MX28_PAD_SSP0_DATA5__SSP0_D5 |
+               (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+       MX28_PAD_SSP0_DATA6__SSP0_D6 |
+               (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+       MX28_PAD_SSP0_DATA7__SSP0_D7 |
+               (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+       MX28_PAD_SSP0_CMD__SSP0_CMD |
+               (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+       MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT |
+               (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
+       MX28_PAD_SSP0_SCK__SSP0_SCK |
+               (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
+
+       /* led */
+       MX28_PAD_PWM3__GPIO_3_28 | MXS_PAD_CTRL,
+
+       /* saif0 & saif1 */
+       MX28_PAD_SAIF0_MCLK__SAIF0_MCLK |
+               (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+       MX28_PAD_SAIF0_LRCLK__SAIF0_LRCLK |
+               (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+       MX28_PAD_SAIF0_BITCLK__SAIF0_BITCLK |
+               (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+       MX28_PAD_SAIF0_SDATA0__SAIF0_SDATA0 |
+               (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+       MX28_PAD_SAIF1_SDATA0__SAIF1_SDATA0 |
+               (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+};
+
+/* led */
+static const struct gpio_led apx4devkit_leds[] __initconst = {
+       {
+               .name = "user-led",
+               .default_trigger = "heartbeat",
+               .gpio = APX4DEVKIT_GPIO_USERLED,
+       },
+};
+
+static const struct gpio_led_platform_data apx4devkit_led_data __initconst = {
+       .leds = apx4devkit_leds,
+       .num_leds = ARRAY_SIZE(apx4devkit_leds),
+};
+
+static const struct fec_platform_data mx28_fec_pdata __initconst = {
+       .phy = PHY_INTERFACE_MODE_RMII,
+};
+
+static const struct mxs_mmc_platform_data apx4devkit_mmc_pdata __initconst = {
+       .wp_gpio = -EINVAL,
+       .flags = SLOTF_4_BIT_CAPABLE,
+};
+
+static const struct i2c_board_info apx4devkit_i2c_boardinfo[] __initconst = {
+       { I2C_BOARD_INFO("sgtl5000", 0x0a) }, /* ASoC */
+       { I2C_BOARD_INFO("pcf8563", 0x51) }, /* RTC */
+};
+
+#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || \
+               defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
+static struct regulator_consumer_supply apx4devkit_audio_consumer_supplies[] = {
+       REGULATOR_SUPPLY("VDDA", "0-000a"),
+       REGULATOR_SUPPLY("VDDIO", "0-000a"),
+};
+
+static struct regulator_init_data apx4devkit_vdd_reg_init_data = {
+       .constraints    = {
+               .name   = "3V3",
+               .always_on = 1,
+       },
+       .consumer_supplies = apx4devkit_audio_consumer_supplies,
+       .num_consumer_supplies = ARRAY_SIZE(apx4devkit_audio_consumer_supplies),
+};
+
+static struct fixed_voltage_config apx4devkit_vdd_pdata = {
+       .supply_name    = "board-3V3",
+       .microvolts     = 3300000,
+       .gpio           = -EINVAL,
+       .enabled_at_boot = 1,
+       .init_data      = &apx4devkit_vdd_reg_init_data,
+};
+
+static struct platform_device apx4devkit_voltage_regulator = {
+       .name           = "reg-fixed-voltage",
+       .id             = -1,
+       .num_resources  = 0,
+       .dev            = {
+               .platform_data  = &apx4devkit_vdd_pdata,
+       },
+};
+
+static void __init apx4devkit_add_regulators(void)
+{
+       platform_device_register(&apx4devkit_voltage_regulator);
+}
+#else
+static void __init apx4devkit_add_regulators(void) {}
+#endif
+
+static const struct mxs_saif_platform_data
+                       apx4devkit_mxs_saif_pdata[] __initconst = {
+       /* working on EXTMSTR0 mode (saif0 master, saif1 slave) */
+       {
+               .master_mode = 1,
+               .master_id = 0,
+       }, {
+               .master_mode = 0,
+               .master_id = 0,
+       },
+};
+
+static int apx4devkit_phy_fixup(struct phy_device *phy)
+{
+       phy->dev_flags |= MICREL_PHY_50MHZ_CLK;
+       return 0;
+}
+
+static void __init apx4devkit_init(void)
+{
+       mxs_iomux_setup_multiple_pads(apx4devkit_pads,
+                       ARRAY_SIZE(apx4devkit_pads));
+
+       mx28_add_duart();
+       mx28_add_auart0();
+       mx28_add_auart1();
+       mx28_add_auart2();
+       mx28_add_auart3();
+
+       /*
+        * Register fixup for the Micrel KS8031 PHY clock
+        * (shares same ID with KS8051)
+        */
+       phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK,
+                       apx4devkit_phy_fixup);
+
+       mx28_add_fec(0, &mx28_fec_pdata);
+
+       mx28_add_mxs_mmc(0, &apx4devkit_mmc_pdata);
+
+       gpio_led_register_device(0, &apx4devkit_led_data);
+
+       mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0);
+       mx28_add_saif(0, &apx4devkit_mxs_saif_pdata[0]);
+       mx28_add_saif(1, &apx4devkit_mxs_saif_pdata[1]);
+
+       apx4devkit_add_regulators();
+
+       mx28_add_mxs_i2c(0);
+       i2c_register_board_info(0, apx4devkit_i2c_boardinfo,
+                       ARRAY_SIZE(apx4devkit_i2c_boardinfo));
+
+       mxs_add_platform_device("mxs-sgtl5000", 0, NULL, 0, NULL, 0);
+}
+
+static void __init apx4devkit_timer_init(void)
+{
+       mx28_clocks_init();
+}
+
+static struct sys_timer apx4devkit_timer = {
+       .init   = apx4devkit_timer_init,
+};
+
+MACHINE_START(APX4DEVKIT, "Bluegiga APX4 Development Kit")
+       .map_io         = mx28_map_io,
+       .init_irq       = mx28_init_irq,
+       .timer          = &apx4devkit_timer,
+       .init_machine   = apx4devkit_init,
+       .restart        = mxs_restart,
+MACHINE_END
index 2f2758230edf83f4cd98ae5a80817dd2b6c4e0ad..06d79963611ca0e4c0c174ad5a979280fc78b4e1 100644 (file)
@@ -247,18 +247,15 @@ static int __init m28evk_fec_get_mac(void)
        u32 val;
        const u32 *ocotp = mxs_get_ocotp();
 
-       if (!ocotp) {
-               pr_err("%s: timeout when reading fec mac from OCOTP\n",
-                       __func__);
+       if (!ocotp)
                return -ETIMEDOUT;
-       }
 
        /*
         * OCOTP only stores the last 4 octets for each mac address,
         * so hard-code DENX OUI (C0:E5:4E) here.
         */
        for (i = 0; i < 2; i++) {
-               val = ocotp[i * 4];
+               val = ocotp[i];
                mx28_fec_pdata[i].mac[0] = 0xC0;
                mx28_fec_pdata[i].mac[1] = 0xE5;
                mx28_fec_pdata[i].mac[2] = 0x4E;
index fdb0a5664dd68f7af7b6158c9db5ca94ffc1e174..e386c142f93c3f48286b5266e48fd56af788b63b 100644 (file)
@@ -223,7 +223,6 @@ static const struct gpio_led_platform_data mx28evk_led_data __initconst = {
 /* fec */
 static void __init mx28evk_fec_reset(void)
 {
-       int ret;
        struct clk *clk;
 
        /* Enable fec phy clock */
@@ -231,32 +230,7 @@ static void __init mx28evk_fec_reset(void)
        if (!IS_ERR(clk))
                clk_prepare_enable(clk);
 
-       /* Power up fec phy */
-       ret = gpio_request(MX28EVK_FEC_PHY_POWER, "fec-phy-power");
-       if (ret) {
-               pr_err("Failed to request gpio fec-phy-%s: %d\n", "power", ret);
-               return;
-       }
-
-       ret = gpio_direction_output(MX28EVK_FEC_PHY_POWER, 0);
-       if (ret) {
-               pr_err("Failed to drive gpio fec-phy-%s: %d\n", "power", ret);
-               return;
-       }
-
-       /* Reset fec phy */
-       ret = gpio_request(MX28EVK_FEC_PHY_RESET, "fec-phy-reset");
-       if (ret) {
-               pr_err("Failed to request gpio fec-phy-%s: %d\n", "reset", ret);
-               return;
-       }
-
-       gpio_direction_output(MX28EVK_FEC_PHY_RESET, 0);
-       if (ret) {
-               pr_err("Failed to drive gpio fec-phy-%s: %d\n", "reset", ret);
-               return;
-       }
-
+       gpio_set_value(MX28EVK_FEC_PHY_RESET, 0);
        mdelay(1);
        gpio_set_value(MX28EVK_FEC_PHY_RESET, 1);
 }
@@ -278,14 +252,14 @@ static int __init mx28evk_fec_get_mac(void)
        const u32 *ocotp = mxs_get_ocotp();
 
        if (!ocotp)
-               goto error;
+               return -ETIMEDOUT;
 
        /*
         * OCOTP only stores the last 4 octets for each mac address,
         * so hard-code Freescale OUI (00:04:9f) here.
         */
        for (i = 0; i < 2; i++) {
-               val = ocotp[i * 4];
+               val = ocotp[i];
                mx28_fec_pdata[i].mac[0] = 0x00;
                mx28_fec_pdata[i].mac[1] = 0x04;
                mx28_fec_pdata[i].mac[2] = 0x9f;
@@ -295,10 +269,6 @@ static int __init mx28evk_fec_get_mac(void)
        }
 
        return 0;
-
-error:
-       pr_err("%s: timeout when reading fec mac from OCOTP\n", __func__);
-       return -ETIMEDOUT;
 }
 
 /*
@@ -417,9 +387,14 @@ static void __init mx28evk_add_regulators(void)
 static void __init mx28evk_add_regulators(void) {}
 #endif
 
-static struct gpio mx28evk_lcd_gpios[] = {
+static const struct gpio mx28evk_gpios[] __initconst = {
        { MX28EVK_LCD_ENABLE, GPIOF_OUT_INIT_HIGH, "lcd-enable" },
        { MX28EVK_BL_ENABLE, GPIOF_OUT_INIT_HIGH, "bl-enable" },
+       { MX28EVK_FLEXCAN_SWITCH, GPIOF_DIR_OUT, "flexcan-switch" },
+       { MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW, "mmc0-slot-power" },
+       { MX28EVK_MMC1_SLOT_POWER, GPIOF_OUT_INIT_LOW, "mmc1-slot-power" },
+       { MX28EVK_FEC_PHY_POWER, GPIOF_OUT_INIT_LOW, "fec-phy-power" },
+       { MX28EVK_FEC_PHY_RESET, GPIOF_DIR_OUT, "fec-phy-reset" },
 };
 
 static const struct mxs_saif_platform_data
@@ -447,25 +422,18 @@ static void __init mx28evk_init(void)
        if (mx28evk_fec_get_mac())
                pr_warn("%s: failed on fec mac setup\n", __func__);
 
+       ret = gpio_request_array(mx28evk_gpios, ARRAY_SIZE(mx28evk_gpios));
+       if (ret)
+               pr_err("One or more GPIOs failed to be requested: %d\n", ret);
+
        mx28evk_fec_reset();
        mx28_add_fec(0, &mx28_fec_pdata[0]);
        mx28_add_fec(1, &mx28_fec_pdata[1]);
 
-       ret = gpio_request_one(MX28EVK_FLEXCAN_SWITCH, GPIOF_DIR_OUT,
-                               "flexcan-switch");
-       if (ret) {
-               pr_err("failed to request gpio flexcan-switch: %d\n", ret);
-       } else {
-               mx28_add_flexcan(0, &mx28evk_flexcan_pdata[0]);
-               mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]);
-       }
+       mx28_add_flexcan(0, &mx28evk_flexcan_pdata[0]);
+       mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]);
 
-       ret = gpio_request_array(mx28evk_lcd_gpios,
-                                ARRAY_SIZE(mx28evk_lcd_gpios));
-       if (ret)
-               pr_warn("failed to request gpio pins for lcd: %d\n", ret);
-       else
-               mx28_add_mxsfb(&mx28evk_mxsfb_pdata);
+       mx28_add_mxsfb(&mx28evk_mxsfb_pdata);
 
        mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0);
        mx28_add_saif(0, &mx28evk_mxs_saif_pdata[0]);
@@ -480,20 +448,8 @@ static void __init mx28evk_init(void)
        mxs_add_platform_device("mxs-sgtl5000", 0, NULL, 0,
                        NULL, 0);
 
-       /* power on mmc slot by writing 0 to the gpio */
-       ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW,
-                              "mmc0-slot-power");
-       if (ret)
-               pr_warn("failed to request gpio mmc0-slot-power: %d\n", ret);
-       else
-               mx28_add_mxs_mmc(0, &mx28evk_mmc_pdata[0]);
-
-       ret = gpio_request_one(MX28EVK_MMC1_SLOT_POWER, GPIOF_OUT_INIT_LOW,
-                              "mmc1-slot-power");
-       if (ret)
-               pr_warn("failed to request gpio mmc1-slot-power: %d\n", ret);
-       else
-               mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);
+       mx28_add_mxs_mmc(0, &mx28evk_mmc_pdata[0]);
+       mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);
 
        mx28_add_rtc_stmp3xxx();
 
index fb042da29bda7f7d58f7a3bcff9556c4d423d177..a9b4bbcdafb41b87cf542fdeed22fe625bb9512d 100644 (file)
 #include <linux/kernel.h>
 #include <linux/suspend.h>
 #include <linux/io.h>
-#include <mach/system.h>
 
 static int mxs_suspend_enter(suspend_state_t state)
 {
        switch (state) {
        case PM_SUSPEND_MEM:
-               arch_idle();
+               cpu_do_idle();
                break;
 
        default:
index b9913234bbf66458e93740aa1fd1e9c2004d42a1..2cdf6ef69beea89fa97c444e9ffa00473dd0e793 100644 (file)
@@ -92,18 +92,7 @@ void clk_put(struct clk *clk)
 {
 }
 
-static struct amba_device fb_device = {
-       .dev            = {
-               .init_name = "fb",
-               .coherent_dma_mask = ~0,
-       },
-       .res            = {
-               .start  = 0x00104000,
-               .end    = 0x00104fff,
-               .flags  = IORESOURCE_MEM,
-       },
-       .irq            = { NETX_IRQ_LCD, NO_IRQ },
-};
+static AMBA_AHB_DEVICE(fb, "fb", 0, 0x00104000, { NETX_IRQ_LCD }, NULL);
 
 int netx_fb_init(struct clcd_board *board, struct clcd_panel *panel)
 {
diff --git a/arch/arm/mach-netx/include/mach/system.h b/arch/arm/mach-netx/include/mach/system.h
deleted file mode 100644 (file)
index b38fa36..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * arch/arm/mach-netx/include/mach/system.h
- *
- * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
-#endif
-
index 7c878bf0034094fbbc8e31a933f9d091b4ae95f0..f6f74adbe8c40ea7861abf8f3ed87297c3a56472 100644 (file)
@@ -185,20 +185,11 @@ static void __init nhk8815_onenand_init(void)
 #endif
 }
 
-#define __MEM_4K_RESOURCE(x) \
-       .res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM}
+static AMBA_APB_DEVICE(uart0, "uart0", 0, NOMADIK_UART0_BASE,
+       { IRQ_UART0 }, NULL);
 
-static struct amba_device uart0_device = {
-       .dev = { .init_name = "uart0" },
-       __MEM_4K_RESOURCE(NOMADIK_UART0_BASE),
-       .irq = {IRQ_UART0, NO_IRQ},
-};
-
-static struct amba_device uart1_device = {
-       .dev = { .init_name = "uart1" },
-       __MEM_4K_RESOURCE(NOMADIK_UART1_BASE),
-       .irq = {IRQ_UART1, NO_IRQ},
-};
+static AMBA_APB_DEVICE(uart1, "uart1", 0, NOMADIK_UART1_BASE,
+       { IRQ_UART1 }, NULL);
 
 static struct amba_device *amba_devs[] __initdata = {
        &uart0_device,
index 65df7b4fdd3ede7326d3ef0b747e642a269fe99e..27f43a46985ee15c33551ab582bafb45f5783fdd 100644 (file)
@@ -97,12 +97,7 @@ static struct platform_device cpu8815_platform_gpio[] = {
        GPIO_DEVICE(3),
 };
 
-static struct amba_device cpu8815_amba_rng = {
-       .dev = {
-               .init_name = "rng",
-       },
-       __MEM_4K_RESOURCE(NOMADIK_RNG_BASE),
-};
+static AMBA_APB_DEVICE(cpu8815_amba_rng, "rng", 0, NOMADIK_RNG_BASE, { }, NULL);
 
 static struct platform_device *platform_devs[] __initdata = {
        cpu8815_platform_gpio + 0,
@@ -112,7 +107,7 @@ static struct platform_device *platform_devs[] __initdata = {
 };
 
 static struct amba_device *amba_devs[] __initdata = {
-       &cpu8815_amba_rng
+       &cpu8815_amba_rng_device
 };
 
 static int __init cpu8815_init(void)
diff --git a/arch/arm/mach-nomadik/include/mach/system.h b/arch/arm/mach-nomadik/include/mach/system.h
deleted file mode 100644 (file)
index 25e198b..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *  mach-nomadik/include/mach/system.h
- *
- *  Copyright (C) 2008 STMicroelectronics
- *
- * 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.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-       /*
-        * This should do all the clock switching
-        * and wait for interrupt tricks
-        */
-       cpu_do_idle();
-}
-
-#endif
index 4f8d66f044e7b90ef64fc40e27441f063ac1afa9..4b6a774606cbc268d9eee5e3ee07614f862abcb6 100644 (file)
@@ -155,6 +155,10 @@ config MACH_AMS_DELTA
        bool "Amstrad E3 (Delta)"
        depends on ARCH_OMAP1 && ARCH_OMAP15XX
        select FIQ
+       select GPIO_GENERIC_PLATFORM
+       select LEDS_GPIO_REGISTER
+       select REGULATOR
+       select REGULATOR_FIXED_VOLTAGE
        help
          Support for the Amstrad E3 (codename Delta) videophone. Say Y here
          if you have such a device.
index 88909cc0b25407eada87f91b651525fa35cf30fe..cb6afe6704688ab65e88e68ff2eb2b21cfb5a8da 100644 (file)
@@ -11,6 +11,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/basic_mmio_gpio.h>
 #include <linux/gpio.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
@@ -18,6 +19,9 @@
 #include <linux/interrupt.h>
 #include <linux/leds.h>
 #include <linux/platform_device.h>
+#include <linux/regulator/consumer.h>
+#include <linux/regulator/fixed.h>
+#include <linux/regulator/machine.h>
 #include <linux/serial_8250.h>
 #include <linux/export.h>
 
@@ -40,9 +44,6 @@
 
 #include <mach/ams-delta-fiq.h>
 
-static u8 ams_delta_latch1_reg;
-static u16 ams_delta_latch2_reg;
-
 static const unsigned int ams_delta_keymap[] = {
        KEY(0, 0, KEY_F1),              /* Advert    */
 
@@ -121,49 +122,42 @@ static const unsigned int ams_delta_keymap[] = {
        KEY(7, 3, KEY_LEFTCTRL),        /* Vol down  */
 };
 
-void ams_delta_latch1_write(u8 mask, u8 value)
-{
-       ams_delta_latch1_reg &= ~mask;
-       ams_delta_latch1_reg |= value;
-       *(volatile __u8 *) AMS_DELTA_LATCH1_VIRT = ams_delta_latch1_reg;
-}
-
-void ams_delta_latch2_write(u16 mask, u16 value)
-{
-       ams_delta_latch2_reg &= ~mask;
-       ams_delta_latch2_reg |= value;
-       *(volatile __u16 *) AMS_DELTA_LATCH2_VIRT = ams_delta_latch2_reg;
-}
+#define LATCH1_PHYS    0x01000000
+#define LATCH1_VIRT    0xEA000000
+#define MODEM_PHYS     0x04000000
+#define MODEM_VIRT     0xEB000000
+#define LATCH2_PHYS    0x08000000
+#define LATCH2_VIRT    0xEC000000
 
 static struct map_desc ams_delta_io_desc[] __initdata = {
        /* AMS_DELTA_LATCH1 */
        {
-               .virtual        = AMS_DELTA_LATCH1_VIRT,
-               .pfn            = __phys_to_pfn(AMS_DELTA_LATCH1_PHYS),
+               .virtual        = LATCH1_VIRT,
+               .pfn            = __phys_to_pfn(LATCH1_PHYS),
                .length         = 0x01000000,
                .type           = MT_DEVICE
        },
        /* AMS_DELTA_LATCH2 */
        {
-               .virtual        = AMS_DELTA_LATCH2_VIRT,
-               .pfn            = __phys_to_pfn(AMS_DELTA_LATCH2_PHYS),
+               .virtual        = LATCH2_VIRT,
+               .pfn            = __phys_to_pfn(LATCH2_PHYS),
                .length         = 0x01000000,
                .type           = MT_DEVICE
        },
        /* AMS_DELTA_MODEM */
        {
-               .virtual        = AMS_DELTA_MODEM_VIRT,
-               .pfn            = __phys_to_pfn(AMS_DELTA_MODEM_PHYS),
+               .virtual        = MODEM_VIRT,
+               .pfn            = __phys_to_pfn(MODEM_PHYS),
                .length         = 0x01000000,
                .type           = MT_DEVICE
        }
 };
 
-static struct omap_lcd_config ams_delta_lcd_config = {
+static struct omap_lcd_config ams_delta_lcd_config __initdata = {
        .ctrl_name      = "internal",
 };
 
-static struct omap_usb_config ams_delta_usb_config __initdata = {
+static struct omap_usb_config ams_delta_usb_config = {
        .register_host  = 1,
        .hmc_mode       = 16,
        .pins[0]        = 2,
@@ -173,6 +167,147 @@ static struct omap_board_config_kernel ams_delta_config[] __initdata = {
        { OMAP_TAG_LCD,         &ams_delta_lcd_config },
 };
 
+#define LATCH1_GPIO_BASE       232
+#define LATCH1_NGPIO           8
+
+static struct resource latch1_resources[] = {
+       [0] = {
+               .name   = "dat",
+               .start  = LATCH1_PHYS,
+               .end    = LATCH1_PHYS + (LATCH1_NGPIO - 1) / 8,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct bgpio_pdata latch1_pdata = {
+       .base   = LATCH1_GPIO_BASE,
+       .ngpio  = LATCH1_NGPIO,
+};
+
+static struct platform_device latch1_gpio_device = {
+       .name           = "basic-mmio-gpio",
+       .id             = 0,
+       .resource       = latch1_resources,
+       .num_resources  = ARRAY_SIZE(latch1_resources),
+       .dev            = {
+               .platform_data  = &latch1_pdata,
+       },
+};
+
+static struct resource latch2_resources[] = {
+       [0] = {
+               .name   = "dat",
+               .start  = LATCH2_PHYS,
+               .end    = LATCH2_PHYS + (AMS_DELTA_LATCH2_NGPIO - 1) / 8,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct bgpio_pdata latch2_pdata = {
+       .base   = AMS_DELTA_LATCH2_GPIO_BASE,
+       .ngpio  = AMS_DELTA_LATCH2_NGPIO,
+};
+
+static struct platform_device latch2_gpio_device = {
+       .name           = "basic-mmio-gpio",
+       .id             = 1,
+       .resource       = latch2_resources,
+       .num_resources  = ARRAY_SIZE(latch2_resources),
+       .dev            = {
+               .platform_data  = &latch2_pdata,
+       },
+};
+
+static const struct gpio latch_gpios[] __initconst = {
+       {
+               .gpio   = LATCH1_GPIO_BASE + 6,
+               .flags  = GPIOF_OUT_INIT_LOW,
+               .label  = "dockit1",
+       },
+       {
+               .gpio   = LATCH1_GPIO_BASE + 7,
+               .flags  = GPIOF_OUT_INIT_LOW,
+               .label  = "dockit2",
+       },
+       {
+               .gpio   = AMS_DELTA_GPIO_PIN_SCARD_RSTIN,
+               .flags  = GPIOF_OUT_INIT_LOW,
+               .label  = "scard_rstin",
+       },
+       {
+               .gpio   = AMS_DELTA_GPIO_PIN_SCARD_CMDVCC,
+               .flags  = GPIOF_OUT_INIT_LOW,
+               .label  = "scard_cmdvcc",
+       },
+       {
+               .gpio   = AMS_DELTA_GPIO_PIN_MODEM_CODEC,
+               .flags  = GPIOF_OUT_INIT_LOW,
+               .label  = "modem_codec",
+       },
+       {
+               .gpio   = AMS_DELTA_LATCH2_GPIO_BASE + 14,
+               .flags  = GPIOF_OUT_INIT_LOW,
+               .label  = "hookflash1",
+       },
+       {
+               .gpio   = AMS_DELTA_LATCH2_GPIO_BASE + 15,
+               .flags  = GPIOF_OUT_INIT_LOW,
+               .label  = "hookflash2",
+       },
+};
+
+static struct regulator_consumer_supply modem_nreset_consumers[] = {
+       REGULATOR_SUPPLY("RESET#", "serial8250.1"),
+       REGULATOR_SUPPLY("POR", "cx20442-codec"),
+};
+
+static struct regulator_init_data modem_nreset_data = {
+       .constraints            = {
+               .valid_ops_mask         = REGULATOR_CHANGE_STATUS,
+               .boot_on                = 1,
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(modem_nreset_consumers),
+       .consumer_supplies      = modem_nreset_consumers,
+};
+
+static struct fixed_voltage_config modem_nreset_config = {
+       .supply_name            = "modem_nreset",
+       .microvolts             = 3300000,
+       .gpio                   = AMS_DELTA_GPIO_PIN_MODEM_NRESET,
+       .startup_delay          = 25000,
+       .enable_high            = 1,
+       .enabled_at_boot        = 1,
+       .init_data              = &modem_nreset_data,
+};
+
+static struct platform_device modem_nreset_device = {
+       .name   = "reg-fixed-voltage",
+       .id     = -1,
+       .dev    = {
+               .platform_data  = &modem_nreset_config,
+       },
+};
+
+struct modem_private_data {
+       struct regulator *regulator;
+};
+
+static struct modem_private_data modem_priv;
+
+void ams_delta_latch_write(int base, int ngpio, u16 mask, u16 value)
+{
+       int bit = 0;
+       u16 bitpos = 1 << bit;
+
+       for (; bit < ngpio; bit++, bitpos = bitpos << 1) {
+               if (!(mask & bitpos))
+                       continue;
+               else
+                       gpio_set_value(base + bit, (value & bitpos) != 0);
+       }
+}
+EXPORT_SYMBOL(ams_delta_latch_write);
+
 static struct resource ams_delta_nand_resources[] = {
        [0] = {
                .start  = OMAP1_MPUIO_BASE,
@@ -202,7 +337,7 @@ static const struct matrix_keymap_data ams_delta_keymap_data = {
        .keymap_size    = ARRAY_SIZE(ams_delta_keymap),
 };
 
-static struct omap_kp_platform_data ams_delta_kp_data __initdata = {
+static struct omap_kp_platform_data ams_delta_kp_data = {
        .rows           = 8,
        .cols           = 8,
        .keymap_data    = &ams_delta_keymap_data,
@@ -224,9 +359,45 @@ static struct platform_device ams_delta_lcd_device = {
        .id     = -1,
 };
 
-static struct platform_device ams_delta_led_device = {
-       .name   = "ams-delta-led",
-       .id     = -1
+static const struct gpio_led gpio_leds[] __initconst = {
+       {
+               .name            = "camera",
+               .gpio            = LATCH1_GPIO_BASE + 0,
+               .default_state   = LEDS_GPIO_DEFSTATE_OFF,
+#ifdef CONFIG_LEDS_TRIGGERS
+               .default_trigger = "ams_delta_camera",
+#endif
+       },
+       {
+               .name            = "advert",
+               .gpio            = LATCH1_GPIO_BASE + 1,
+               .default_state   = LEDS_GPIO_DEFSTATE_OFF,
+       },
+       {
+               .name            = "email",
+               .gpio            = LATCH1_GPIO_BASE + 2,
+               .default_state   = LEDS_GPIO_DEFSTATE_OFF,
+       },
+       {
+               .name            = "handsfree",
+               .gpio            = LATCH1_GPIO_BASE + 3,
+               .default_state   = LEDS_GPIO_DEFSTATE_OFF,
+       },
+       {
+               .name            = "voicemail",
+               .gpio            = LATCH1_GPIO_BASE + 4,
+               .default_state   = LEDS_GPIO_DEFSTATE_OFF,
+       },
+       {
+               .name            = "voice",
+               .gpio            = LATCH1_GPIO_BASE + 5,
+               .default_state   = LEDS_GPIO_DEFSTATE_OFF,
+       },
+};
+
+static const struct gpio_led_platform_data leds_pdata __initconst = {
+       .leds           = gpio_leds,
+       .num_leds       = ARRAY_SIZE(gpio_leds),
 };
 
 static struct i2c_board_info ams_delta_camera_board_info[] = {
@@ -275,13 +446,17 @@ static struct omap1_cam_platform_data ams_delta_camera_platform_data = {
 };
 
 static struct platform_device *ams_delta_devices[] __initdata = {
-       &ams_delta_nand_device,
+       &latch1_gpio_device,
+       &latch2_gpio_device,
        &ams_delta_kp_device,
-       &ams_delta_lcd_device,
-       &ams_delta_led_device,
        &ams_delta_camera_device,
 };
 
+static struct platform_device *late_devices[] __initdata = {
+       &ams_delta_nand_device,
+       &ams_delta_lcd_device,
+};
+
 static void __init ams_delta_init(void)
 {
        /* mux pins for uarts */
@@ -307,15 +482,13 @@ static void __init ams_delta_init(void)
        omap_serial_init();
        omap_register_i2c_bus(1, 100, NULL, 0);
 
-       /* Clear latch2 (NAND, LCD, modem enable) */
-       ams_delta_latch2_write(~0, 0);
-
        omap1_usb_init(&ams_delta_usb_config);
        omap1_set_camera_info(&ams_delta_camera_platform_data);
 #ifdef CONFIG_LEDS_TRIGGERS
        led_trigger_register_simple("ams_delta_camera",
                        &ams_delta_camera_led_trigger);
 #endif
+       gpio_led_register_device(-1, &leds_pdata);
        platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));
 
        ams_delta_init_fiq();
@@ -323,16 +496,34 @@ static void __init ams_delta_init(void)
        omap_writew(omap_readw(ARM_RSTCT1) | 0x0004, ARM_RSTCT1);
 }
 
+static void modem_pm(struct uart_port *port, unsigned int state, unsigned old)
+{
+       struct modem_private_data *priv = port->private_data;
+
+       if (IS_ERR(priv->regulator))
+               return;
+
+       if (state == old)
+               return;
+
+       if (state == 0)
+               regulator_enable(priv->regulator);
+       else if (old == 0)
+               regulator_disable(priv->regulator);
+}
+
 static struct plat_serial8250_port ams_delta_modem_ports[] = {
        {
-               .membase        = IOMEM(AMS_DELTA_MODEM_VIRT),
-               .mapbase        = AMS_DELTA_MODEM_PHYS,
+               .membase        = IOMEM(MODEM_VIRT),
+               .mapbase        = MODEM_PHYS,
                .irq            = -EINVAL, /* changed later */
                .flags          = UPF_BOOT_AUTOCONF,
                .irqflags       = IRQF_TRIGGER_RISING,
                .iotype         = UPIO_MEM,
                .regshift       = 1,
                .uartclk        = BASE_BAUD * 16,
+               .pm             = modem_pm,
+               .private_data   = &modem_priv,
        },
        { },
 };
@@ -345,13 +536,27 @@ static struct platform_device ams_delta_modem_device = {
        },
 };
 
-static int __init ams_delta_modem_init(void)
+static int __init late_init(void)
 {
        int err;
 
        if (!machine_is_ams_delta())
                return -ENODEV;
 
+       err = gpio_request_array(latch_gpios, ARRAY_SIZE(latch_gpios));
+       if (err) {
+               pr_err("Couldn't take over latch1/latch2 GPIO pins\n");
+               return err;
+       }
+
+       platform_add_devices(late_devices, ARRAY_SIZE(late_devices));
+
+       err = platform_device_register(&modem_nreset_device);
+       if (err) {
+               pr_err("Couldn't register the modem regulator device\n");
+               return err;
+       }
+
        omap_cfg_reg(M14_1510_GPIO2);
        ams_delta_modem_ports[0].irq =
                        gpio_to_irq(AMS_DELTA_GPIO_PIN_MODEM_IRQ);
@@ -363,13 +568,35 @@ static int __init ams_delta_modem_init(void)
        }
        gpio_direction_input(AMS_DELTA_GPIO_PIN_MODEM_IRQ);
 
-       ams_delta_latch2_write(
-               AMS_DELTA_LATCH2_MODEM_NRESET | AMS_DELTA_LATCH2_MODEM_CODEC,
-               AMS_DELTA_LATCH2_MODEM_NRESET | AMS_DELTA_LATCH2_MODEM_CODEC);
+       /* Initialize the modem_nreset regulator consumer before use */
+       modem_priv.regulator = ERR_PTR(-ENODEV);
+
+       ams_delta_latch2_write(AMS_DELTA_LATCH2_MODEM_CODEC,
+                       AMS_DELTA_LATCH2_MODEM_CODEC);
+
+       err = platform_device_register(&ams_delta_modem_device);
+       if (err)
+               goto gpio_free;
 
-       return platform_device_register(&ams_delta_modem_device);
+       /*
+        * Once the modem device is registered, the modem_nreset
+        * regulator can be requested on behalf of that device.
+        */
+       modem_priv.regulator = regulator_get(&ams_delta_modem_device.dev,
+                       "RESET#");
+       if (IS_ERR(modem_priv.regulator)) {
+               err = PTR_ERR(modem_priv.regulator);
+               goto unregister;
+       }
+       return 0;
+
+unregister:
+       platform_device_unregister(&ams_delta_modem_device);
+gpio_free:
+       gpio_free(AMS_DELTA_GPIO_PIN_MODEM_IRQ);
+       return err;
 }
-arch_initcall(ams_delta_modem_init);
+late_initcall(late_init);
 
 static void __init ams_delta_map_io(void)
 {
@@ -388,6 +615,3 @@ MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)")
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
 MACHINE_END
-
-EXPORT_SYMBOL(ams_delta_latch1_write);
-EXPORT_SYMBOL(ams_delta_latch2_write);
diff --git a/arch/arm/mach-omap1/include/mach/system.h b/arch/arm/mach-omap1/include/mach/system.h
deleted file mode 100644 (file)
index a6c1b3a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * arch/arm/mach-omap1/include/mach/system.h
- */
-
-#include <plat/system.h>
index 89ea20ca0cccbc02c0ccba365547942e8c41ea93..0c2c3669d594db171cd855b4a03247f9f88b9267 100644 (file)
@@ -42,9 +42,9 @@
 #include <linux/sysfs.h>
 #include <linux/module.h>
 #include <linux/io.h>
+#include <linux/atomic.h>
 
 #include <asm/irq.h>
-#include <linux/atomic.h>
 #include <asm/mach/time.h>
 #include <asm/mach/irq.h>
 
@@ -108,13 +108,7 @@ void omap1_pm_idle(void)
        __u32 use_idlect1 = arm_idlect1_mask;
        int do_sleep = 0;
 
-       local_irq_disable();
        local_fiq_disable();
-       if (need_resched()) {
-               local_fiq_enable();
-               local_irq_enable();
-               return;
-       }
 
 #if defined(CONFIG_OMAP_MPU_TIMER) && !defined(CONFIG_OMAP_DM_TIMER)
 #warning Enable 32kHz OS timer in order to allow sleep states in idle
@@ -157,14 +151,12 @@ void omap1_pm_idle(void)
                omap_writel(saved_idlect1, ARM_IDLECT1);
 
                local_fiq_enable();
-               local_irq_enable();
                return;
        }
        omap_sram_suspend(omap_readl(ARM_IDLECT1),
                          omap_readl(ARM_IDLECT2));
 
        local_fiq_enable();
-       local_irq_enable();
 }
 
 /*
@@ -583,8 +575,6 @@ static void omap_pm_init_proc(void)
 
 #endif /* DEBUG && CONFIG_PROC_FS */
 
-static void (*saved_idle)(void) = NULL;
-
 /*
  *     omap_pm_prepare - Do preliminary suspend work.
  *
@@ -592,8 +582,7 @@ static void (*saved_idle)(void) = NULL;
 static int omap_pm_prepare(void)
 {
        /* We cannot sleep in idle until we have resumed */
-       saved_idle = pm_idle;
-       pm_idle = NULL;
+       disable_hlt();
 
        return 0;
 }
@@ -630,7 +619,7 @@ static int omap_pm_enter(suspend_state_t state)
 
 static void omap_pm_finish(void)
 {
-       pm_idle = saved_idle;
+       enable_hlt();
 }
 
 
@@ -687,7 +676,7 @@ static int __init omap_pm_init(void)
                return -ENODEV;
        }
 
-       pm_idle = omap1_pm_idle;
+       arm_pm_idle = omap1_pm_idle;
 
        if (cpu_is_omap7xx())
                setup_irq(INT_7XX_WAKE_UP_REQ, &omap_wakeup_irq);
index e20c8ab80b0e189e4960599a1b7ee79875815a9f..b740c2e88e5a781c66bb50d1378a282a25f94db7 100644 (file)
@@ -245,10 +245,11 @@ config MACH_NOKIA_N8X0
        select MACH_NOKIA_N810_WIMAX
 
 config MACH_NOKIA_RM680
-       bool "Nokia RM-680 board"
+       bool "Nokia RM-680/696 board"
        depends on ARCH_OMAP3
        default y
        select OMAP_PACKAGE_CBB
+       select MACH_NOKIA_RM696
 
 config MACH_NOKIA_RX51
        bool "Nokia RX-51 board"
index bd76394ccaf8c90de32b824dc5dc65675a73fb18..8d6bcca653b50cc5cf9f07d2aa51db2f195a8d06 100644 (file)
@@ -270,4 +270,7 @@ smsc911x-$(CONFIG_SMSC911X)         := gpmc-smsc911x.o
 obj-y                                  += $(smsc911x-m) $(smsc911x-y)
 obj-$(CONFIG_ARCH_OMAP4)               += hwspinlock.o
 
+emac-$(CONFIG_TI_DAVINCI_EMAC)         := am35xx-emac.o
+obj-y                                  += $(emac-m) $(emac-y)
+
 obj-y                                  += common-board-devices.o twl-common.o
diff --git a/arch/arm/mach-omap2/am35xx-emac.c b/arch/arm/mach-omap2/am35xx-emac.c
new file mode 100644 (file)
index 0000000..1f97e74
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2011 Ilya Yanok, Emcraft Systems
+ *
+ * Based on mach-omap2/board-am3517evm.c
+ * Copyright (C) 2009 Texas Instruments Incorporated
+ * Author: Ranjith Lohithakshan <ranjithl@ti.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
+ * whether express or implied; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ */
+
+#include <linux/clk.h>
+#include <linux/davinci_emac.h>
+#include <linux/platform_device.h>
+#include <plat/irqs.h>
+#include <mach/am35xx.h>
+
+#include "control.h"
+
+static struct mdio_platform_data am35xx_emac_mdio_pdata;
+
+static struct resource am35xx_emac_mdio_resources[] = {
+       DEFINE_RES_MEM(AM35XX_IPSS_EMAC_BASE + AM35XX_EMAC_MDIO_OFFSET, SZ_4K),
+};
+
+static struct platform_device am35xx_emac_mdio_device = {
+       .name           = "davinci_mdio",
+       .id             = 0,
+       .num_resources  = ARRAY_SIZE(am35xx_emac_mdio_resources),
+       .resource       = am35xx_emac_mdio_resources,
+       .dev.platform_data = &am35xx_emac_mdio_pdata,
+};
+
+static void am35xx_enable_emac_int(void)
+{
+       u32 regval;
+
+       regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
+       regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR |
+                 AM35XX_CPGMAC_C0_TX_PULSE_CLR |
+                 AM35XX_CPGMAC_C0_MISC_PULSE_CLR |
+                 AM35XX_CPGMAC_C0_RX_THRESH_CLR);
+       omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
+       regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
+}
+
+static void am35xx_disable_emac_int(void)
+{
+       u32 regval;
+
+       regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
+       regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR |
+                 AM35XX_CPGMAC_C0_TX_PULSE_CLR);
+       omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
+       regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
+}
+
+static struct emac_platform_data am35xx_emac_pdata = {
+       .ctrl_reg_offset        = AM35XX_EMAC_CNTRL_OFFSET,
+       .ctrl_mod_reg_offset    = AM35XX_EMAC_CNTRL_MOD_OFFSET,
+       .ctrl_ram_offset        = AM35XX_EMAC_CNTRL_RAM_OFFSET,
+       .ctrl_ram_size          = AM35XX_EMAC_CNTRL_RAM_SIZE,
+       .hw_ram_addr            = AM35XX_EMAC_HW_RAM_ADDR,
+       .version                = EMAC_VERSION_2,
+       .interrupt_enable       = am35xx_enable_emac_int,
+       .interrupt_disable      = am35xx_disable_emac_int,
+};
+
+static struct resource am35xx_emac_resources[] = {
+       DEFINE_RES_MEM(AM35XX_IPSS_EMAC_BASE, 0x30000),
+       DEFINE_RES_IRQ(INT_35XX_EMAC_C0_RXTHRESH_IRQ),
+       DEFINE_RES_IRQ(INT_35XX_EMAC_C0_RX_PULSE_IRQ),
+       DEFINE_RES_IRQ(INT_35XX_EMAC_C0_TX_PULSE_IRQ),
+       DEFINE_RES_IRQ(INT_35XX_EMAC_C0_MISC_PULSE_IRQ),
+};
+
+static struct platform_device am35xx_emac_device = {
+       .name           = "davinci_emac",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(am35xx_emac_resources),
+       .resource       = am35xx_emac_resources,
+       .dev            = {
+               .platform_data  = &am35xx_emac_pdata,
+       },
+};
+
+void __init am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en)
+{
+       unsigned int regval;
+       int err;
+
+       am35xx_emac_pdata.rmii_en = rmii_en;
+       am35xx_emac_mdio_pdata.bus_freq = mdio_bus_freq;
+       err = platform_device_register(&am35xx_emac_device);
+       if (err) {
+               pr_err("AM35x: failed registering EMAC device: %d\n", err);
+               return;
+       }
+
+       err = platform_device_register(&am35xx_emac_mdio_device);
+       if (err) {
+               pr_err("AM35x: failed registering EMAC MDIO device: %d\n", err);
+               platform_device_unregister(&am35xx_emac_device);
+               return;
+       }
+
+       regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
+       regval = regval & (~(AM35XX_CPGMACSS_SW_RST));
+       omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET);
+       regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
+}
diff --git a/arch/arm/mach-omap2/am35xx-emac.h b/arch/arm/mach-omap2/am35xx-emac.h
new file mode 100644 (file)
index 0000000..15c6f9c
--- /dev/null
@@ -0,0 +1,15 @@
+/*
+ * Copyright (C) 2011 Ilya Yanok, Emcraft Systems
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#define AM35XX_DEFAULT_MDIO_FREQUENCY  1000000
+
+#if defined(CONFIG_TI_DAVINCI_EMAC) || defined(CONFIG_TI_DAVINCI_EMAC_MODULE)
+void am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en);
+#else
+static inline void am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en) {}
+#endif
index 4e9071589bfb60ac3bfb5a222eefcfebc700bd03..766f7e47771c9c37c9035db06b0f3e4bb9630181 100644 (file)
@@ -322,7 +322,10 @@ static struct spi_board_info sdp4430_spi_board_info[] __initdata = {
                .bus_num                = 1,
                .chip_select            = 0,
                .max_speed_hz           = 24000000,
-               .irq                    = ETH_KS8851_IRQ,
+               /*
+                * .irq is set to gpio_to_irq(ETH_KS8851_IRQ)
+                * in omap_4430sdp_init
+                */
        },
 };
 
index 4b1cfe32e6baf4b4ab4e6d0eeb41f0c4f4d17ffa..005905b6ef2ba880d8e59c7fca37825aa256acde 100644 (file)
 #include <video/omap-panel-generic-dpi.h>
 #include <video/omap-panel-dvi.h>
 
+#include "am35xx-emac.h"
 #include "mux.h"
 #include "control.h"
 #include "hsmmc.h"
 
-#define AM35XX_EVM_MDIO_FREQUENCY      (1000000)
-
-static struct mdio_platform_data am3517_evm_mdio_pdata = {
-       .bus_freq       = AM35XX_EVM_MDIO_FREQUENCY,
-};
-
-static struct resource am3517_mdio_resources[] = {
-       {
-               .start  = AM35XX_IPSS_EMAC_BASE + AM35XX_EMAC_MDIO_OFFSET,
-               .end    = AM35XX_IPSS_EMAC_BASE + AM35XX_EMAC_MDIO_OFFSET +
-                         SZ_4K - 1,
-               .flags  = IORESOURCE_MEM,
-       },
-};
-
-static struct platform_device am3517_mdio_device = {
-       .name           = "davinci_mdio",
-       .id             = 0,
-       .num_resources  = ARRAY_SIZE(am3517_mdio_resources),
-       .resource       = am3517_mdio_resources,
-       .dev.platform_data = &am3517_evm_mdio_pdata,
-};
-
-static struct emac_platform_data am3517_evm_emac_pdata = {
-       .rmii_en        = 1,
-};
-
-static struct resource am3517_emac_resources[] = {
-       {
-               .start  = AM35XX_IPSS_EMAC_BASE,
-               .end    = AM35XX_IPSS_EMAC_BASE + 0x2FFFF,
-               .flags  = IORESOURCE_MEM,
-       },
-       {
-               .start  = INT_35XX_EMAC_C0_RXTHRESH_IRQ,
-               .end    = INT_35XX_EMAC_C0_RXTHRESH_IRQ,
-               .flags  = IORESOURCE_IRQ,
-       },
-       {
-               .start  = INT_35XX_EMAC_C0_RX_PULSE_IRQ,
-               .end    = INT_35XX_EMAC_C0_RX_PULSE_IRQ,
-               .flags  = IORESOURCE_IRQ,
-       },
-       {
-               .start  = INT_35XX_EMAC_C0_TX_PULSE_IRQ,
-               .end    = INT_35XX_EMAC_C0_TX_PULSE_IRQ,
-               .flags  = IORESOURCE_IRQ,
-       },
-       {
-               .start  = INT_35XX_EMAC_C0_MISC_PULSE_IRQ,
-               .end    = INT_35XX_EMAC_C0_MISC_PULSE_IRQ,
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device am3517_emac_device = {
-       .name           = "davinci_emac",
-       .id             = -1,
-       .num_resources  = ARRAY_SIZE(am3517_emac_resources),
-       .resource       = am3517_emac_resources,
-};
-
-static void am3517_enable_ethernet_int(void)
-{
-       u32 regval;
-
-       regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
-       regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR |
-               AM35XX_CPGMAC_C0_TX_PULSE_CLR |
-               AM35XX_CPGMAC_C0_MISC_PULSE_CLR |
-               AM35XX_CPGMAC_C0_RX_THRESH_CLR);
-       omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
-       regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
-}
-
-static void am3517_disable_ethernet_int(void)
-{
-       u32 regval;
-
-       regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
-       regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR |
-               AM35XX_CPGMAC_C0_TX_PULSE_CLR);
-       omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
-       regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
-}
-
-static void am3517_evm_ethernet_init(struct emac_platform_data *pdata)
-{
-       unsigned int regval;
-
-       pdata->ctrl_reg_offset          = AM35XX_EMAC_CNTRL_OFFSET;
-       pdata->ctrl_mod_reg_offset      = AM35XX_EMAC_CNTRL_MOD_OFFSET;
-       pdata->ctrl_ram_offset          = AM35XX_EMAC_CNTRL_RAM_OFFSET;
-       pdata->ctrl_ram_size            = AM35XX_EMAC_CNTRL_RAM_SIZE;
-       pdata->version                  = EMAC_VERSION_2;
-       pdata->hw_ram_addr              = AM35XX_EMAC_HW_RAM_ADDR;
-       pdata->interrupt_enable         = am3517_enable_ethernet_int;
-       pdata->interrupt_disable        = am3517_disable_ethernet_int;
-       am3517_emac_device.dev.platform_data    = pdata;
-       platform_device_register(&am3517_emac_device);
-       platform_device_register(&am3517_mdio_device);
-       clk_add_alias(NULL, dev_name(&am3517_mdio_device.dev),
-                     NULL, &am3517_emac_device.dev);
-
-       regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
-       regval = regval & (~(AM35XX_CPGMACSS_SW_RST));
-       omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET);
-       regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
-
-       return ;
-}
-
-
-
 #define LCD_PANEL_PWR          176
 #define LCD_PANEL_BKLIGHT_PWR  182
 #define LCD_PANEL_PWM          181
@@ -498,7 +385,7 @@ static void __init am3517_evm_init(void)
        i2c_register_board_info(1, am3517evm_i2c1_boardinfo,
                                ARRAY_SIZE(am3517evm_i2c1_boardinfo));
        /*Ethernet*/
-       am3517_evm_ethernet_init(&am3517_evm_emac_pdata);
+       am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1);
 
        /* MUSB */
        am3517_evm_musb_init();
index f36d694d21590e069aa390a66eb56024d113d8f7..9e66e167e4f39f67a75b4a130e6207a3ec7edcf1 100644 (file)
@@ -49,6 +49,7 @@
 #include "mux.h"
 #include "control.h"
 #include "common-board-devices.h"
+#include "am35xx-emac.h"
 
 #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
 static struct gpio_led cm_t3517_leds[] = {
@@ -291,6 +292,7 @@ static void __init cm_t3517_init(void)
        cm_t3517_init_rtc();
        cm_t3517_init_usbh();
        cm_t3517_init_hecc();
+       am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1);
 }
 
 MACHINE_START(CM_T3517, "Compulab CM-T3517")
index 4198dd017d8fdfde7fd00b2a8a00d5f9d7e766fb..221214fa1ce770c60f683a120c6052d08181acca 100644 (file)
@@ -205,6 +205,7 @@ static void __init omap3logic_init(void)
 
 MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
        .atag_offset    = 0x100,
+       .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap35xx_init_early,
        .init_irq       = omap3_init_irq,
@@ -216,6 +217,7 @@ MACHINE_END
 
 MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
        .atag_offset    = 0x100,
+       .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap35xx_init_early,
        .init_irq       = omap3_init_irq,
index 1644b73017fcafbdc0e7b87a503ac35f92e8f992..94dbf081207f17960d24f7c793b9c8853e1059b5 100644 (file)
@@ -121,6 +121,11 @@ static struct platform_device pandora_leds_gpio = {
        },
 };
 
+static struct platform_device pandora_backlight = {
+       .name   = "pandora-backlight",
+       .id     = -1,
+};
+
 #define GPIO_BUTTON(gpio_num, ev_type, ev_code, act_low, descr)        \
 {                                                              \
        .gpio           = gpio_num,                             \
@@ -476,6 +481,10 @@ static struct platform_device pandora_vwlan_device = {
 
 static struct twl4030_bci_platform_data pandora_bci_data;
 
+static struct twl4030_power_data pandora_power_data = {
+       .use_poweroff   = true,
+};
+
 static struct twl4030_platform_data omap3pandora_twldata = {
        .gpio           = &omap3pandora_gpio_data,
        .vmmc1          = &pandora_vmmc1,
@@ -486,6 +495,7 @@ static struct twl4030_platform_data omap3pandora_twldata = {
        .vsim           = &pandora_vsim,
        .keypad         = &pandora_kp_data,
        .bci            = &pandora_bci_data,
+       .power          = &pandora_power_data,
 };
 
 static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = {
@@ -557,6 +567,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = {
        &pandora_leds_gpio,
        &pandora_keys_gpio,
        &pandora_vwlan_device,
+       &pandora_backlight,
 };
 
 static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
index 28fc271f70316510b5268c2a212adcac3718fce1..b1d74d6b02e62c8f90ccfc6dd4b330ed24995830 100644 (file)
@@ -91,9 +91,15 @@ static struct platform_device leds_gpio = {
        },
 };
 
+static struct platform_device btwilink_device = {
+       .name   = "btwilink",
+       .id     = -1,
+};
+
 static struct platform_device *panda_devices[] __initdata = {
        &leds_gpio,
        &wl1271_device,
+       &btwilink_device,
 };
 
 static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
index 8678b386c6a2ab8e7a0b664546f837eb9966d36f..094473e2a81f5da05083293438118694d1cf62d5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Board support file for Nokia RM-680.
+ * Board support file for Nokia RM-680/696.
  *
  * Copyright (C) 2010 Nokia
  *
@@ -154,3 +154,15 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
        .timer          = &omap3_timer,
        .restart        = omap_prcm_restart,
 MACHINE_END
+
+MACHINE_START(NOKIA_RM696, "Nokia RM-696 board")
+       .atag_offset    = 0x100,
+       .reserve        = omap_reserve,
+       .map_io         = omap3_map_io,
+       .init_early     = omap3630_init_early,
+       .init_irq       = omap3_init_irq,
+       .handle_irq     = omap3_intc_handle_irq,
+       .init_machine   = rm680_init,
+       .timer          = &omap3_timer,
+       .restart        = omap_prcm_restart,
+MACHINE_END
index acb4e77b39efd088538ef6d7c6542f64ab6411e1..33c1f8c50353ef1ed0c5091707c522289e8d9bf0 100644 (file)
@@ -1105,6 +1105,11 @@ static struct tsc2005_platform_data tsc2005_pdata = {
        .esd_timeout_ms         = 8000,
 };
 
+static struct gpio rx51_tsc2005_gpios[] __initdata = {
+       { RX51_TSC2005_IRQ_GPIO,   GPIOF_IN,            "tsc2005 IRQ"   },
+       { RX51_TSC2005_RESET_GPIO, GPIOF_OUT_INIT_HIGH, "tsc2005 reset" },
+};
+
 static void rx51_tsc2005_set_reset(bool enable)
 {
        gpio_set_value(RX51_TSC2005_RESET_GPIO, enable);
@@ -1114,20 +1119,18 @@ static void __init rx51_init_tsc2005(void)
 {
        int r;
 
-       r = gpio_request_one(RX51_TSC2005_IRQ_GPIO, GPIOF_IN, "tsc2005 IRQ");
-       if (r < 0) {
-               printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 IRQ");
-               rx51_peripherals_spi_board_info[RX51_SPI_TSC2005].irq = 0;
-       }
+       omap_mux_init_gpio(RX51_TSC2005_RESET_GPIO, OMAP_PIN_OUTPUT);
+       omap_mux_init_gpio(RX51_TSC2005_IRQ_GPIO, OMAP_PIN_INPUT_PULLUP);
 
-       r = gpio_request_one(RX51_TSC2005_RESET_GPIO, GPIOF_OUT_INIT_HIGH,
-               "tsc2005 reset");
-       if (r >= 0) {
-               tsc2005_pdata.set_reset = rx51_tsc2005_set_reset;
-       } else {
-               printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 reset");
+       r = gpio_request_array(rx51_tsc2005_gpios,
+                              ARRAY_SIZE(rx51_tsc2005_gpios));
+       if (r < 0) {
+               printk(KERN_ERR "tsc2005 board initialization failed\n");
                tsc2005_pdata.esd_timeout_ms = 0;
+               return;
        }
+
+       tsc2005_pdata.set_reset = rx51_tsc2005_set_reset;
 }
 
 void __init rx51_peripherals_init(void)
index 9c442e290ccbf9523a03f6d00d22b6dd1ab51243..ce91aad4cdad5048548c28c8e224f93e2e28bf48 100644 (file)
@@ -30,29 +30,8 @@ MODULE_AUTHOR("Alexander Shishkin");
 #define ETB_BASE       (L4_EMU_34XX_PHYS + 0x1b000)
 #define DAPCTL         (L4_EMU_34XX_PHYS + 0x1d000)
 
-static struct amba_device omap3_etb_device = {
-       .dev            = {
-               .init_name = "etb",
-       },
-       .res            = {
-               .start  = ETB_BASE,
-               .end    = ETB_BASE + SZ_4K - 1,
-               .flags  = IORESOURCE_MEM,
-       },
-       .periphid       = 0x000bb907,
-};
-
-static struct amba_device omap3_etm_device = {
-       .dev            = {
-               .init_name = "etm",
-       },
-       .res            = {
-               .start  = ETM_BASE,
-               .end    = ETM_BASE + SZ_4K - 1,
-               .flags  = IORESOURCE_MEM,
-       },
-       .periphid       = 0x102bb921,
-};
+static AMBA_APB_DEVICE(omap3_etb, "etb", 0x000bb907, ETB_BASE, { }, NULL);
+static AMBA_APB_DEVICE(omap3_etm, "etm", 0x102bb921, ETM_BASE, { }, NULL);
 
 static int __init emu_init(void)
 {
@@ -66,4 +45,3 @@ static int __init emu_init(void)
 }
 
 subsys_initcall(emu_init);
-
index 6c5826605eaec5792b5f93c137fc9e32c2bc9f9f..719ee423abe22be6439cb4b3dd0ce78dcecb41b5 100644 (file)
@@ -343,6 +343,7 @@ static void __init omap3_check_revision(const char **cpu_rev)
        case 0xb944:
                omap_revision = AM335X_REV_ES1_0;
                *cpu_rev = "1.0";
+               break;
        case 0xb8f2:
                switch (rev) {
                case 0:
diff --git a/arch/arm/mach-omap2/include/mach/system.h b/arch/arm/mach-omap2/include/mach/system.h
deleted file mode 100644 (file)
index d488721..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * arch/arm/mach-omap2/include/mach/system.h
- */
-
-#include <plat/system.h>
index 2cc1aa004b9457a92d26175c2770d1653ec355e4..415a6f1cf419dc8a5ab86f2ccff1bce06324b3c0 100644 (file)
@@ -420,8 +420,7 @@ static void __exit omap2_mbox_exit(void)
        platform_driver_unregister(&omap2_mbox_driver);
 }
 
-/* must be ready before omap3isp is probed */
-subsys_initcall(omap2_mbox_init);
+module_init(omap2_mbox_init);
 module_exit(omap2_mbox_exit);
 
 MODULE_LICENSE("GPL v2");
index b8822048e409c490c949bd8eb4e7329967ac12c9..ac49384d028521deceb8e11355b46fbd4a2ec1b9 100644 (file)
@@ -150,7 +150,8 @@ err_out:
                platform_device_put(omap_iommu_pdev[i]);
        return err;
 }
-module_init(omap_iommu_init);
+/* must be ready before omap3isp is probed */
+subsys_initcall(omap_iommu_init);
 
 static void __exit omap_iommu_exit(void)
 {
index ebc595091312f325cff5638263dd72a09de9962e..70de277f5c152199a66a7b9682acdc51a386bdc6 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "common.h"
 #include "omap4-sar-layout.h"
+#include <linux/export.h>
 
 #ifdef CONFIG_CACHE_L2X0
 static void __iomem *l2cache_base;
@@ -55,6 +56,7 @@ void omap_bus_sync(void)
                isb();
        }
 }
+EXPORT_SYMBOL(omap_bus_sync);
 
 /* Steal one page physical memory for barrier implementation */
 int __init omap_barrier_reserve_memblock(void)
index 23de98d0384151b76274f67a99a10a005d4b3541..a4eb5c280435701d571b25a2b5f95c2d7f2b6fec 100644 (file)
@@ -226,7 +226,6 @@ static int omap2_can_sleep(void)
 
 static void omap2_pm_idle(void)
 {
-       local_irq_disable();
        local_fiq_disable();
 
        if (!omap2_can_sleep()) {
@@ -243,7 +242,6 @@ static void omap2_pm_idle(void)
 
 out:
        local_fiq_enable();
-       local_irq_enable();
 }
 
 #ifdef CONFIG_SUSPEND
@@ -462,7 +460,7 @@ static int __init omap2_pm_init(void)
        }
 
        suspend_set_ops(&omap_pm_ops);
-       pm_idle = omap2_pm_idle;
+       arm_pm_idle = omap2_pm_idle;
 
        return 0;
 }
index fc6987578920c942ef66fd9f4dfb806f40bde8c1..b77df735fa6c760c56bcae09643008cc49c93e22 100644 (file)
@@ -418,10 +418,9 @@ void omap_sram_idle(void)
 
 static void omap3_pm_idle(void)
 {
-       local_irq_disable();
        local_fiq_disable();
 
-       if (omap_irq_pending() || need_resched())
+       if (omap_irq_pending())
                goto out;
 
        trace_power_start(POWER_CSTATE, 1, smp_processor_id());
@@ -434,7 +433,6 @@ static void omap3_pm_idle(void)
 
 out:
        local_fiq_enable();
-       local_irq_enable();
 }
 
 #ifdef CONFIG_SUSPEND
@@ -848,7 +846,7 @@ static int __init omap3_pm_init(void)
        suspend_set_ops(&omap_pm_ops);
 #endif /* CONFIG_SUSPEND */
 
-       pm_idle = omap3_pm_idle;
+       arm_pm_idle = omap3_pm_idle;
        omap3_idle_init();
 
        /*
index c264ef7219c171c38471a35dc7a1475fd5c5baa1..c840689df24ae5256da6e81c4fd232d28fcf6fa2 100644 (file)
@@ -173,18 +173,16 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
  * omap_default_idle - OMAP4 default ilde routine.'
  *
  * Implements OMAP4 memory, IO ordering requirements which can't be addressed
- * with default arch_idle() hook. Used by all CPUs with !CONFIG_CPUIDLE and
+ * with default cpu_do_idle() hook. Used by all CPUs with !CONFIG_CPUIDLE and
  * by secondary CPU with CONFIG_CPUIDLE.
  */
 static void omap_default_idle(void)
 {
-       local_irq_disable();
        local_fiq_disable();
 
        omap_do_wfi();
 
        local_fiq_enable();
-       local_irq_enable();
 }
 
 /**
@@ -255,8 +253,8 @@ static int __init omap4_pm_init(void)
        suspend_set_ops(&omap_pm_ops);
 #endif /* CONFIG_SUSPEND */
 
-       /* Overwrite the default arch_idle() */
-       pm_idle = omap_default_idle;
+       /* Overwrite the default cpu_do_idle() */
+       arm_pm_idle = omap_default_idle;
 
        omap4_idle_init();
 
index 860118ab43e2fe096780ddd9fa44f688ddf7024f..873b51d494eace09418ad9da30e35d15642b6ef8 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/interrupt.h>
 #include <linux/slab.h>
 
-#include <mach/system.h>
 #include <plat/common.h>
 #include <plat/prcm.h>
 #include <plat/irqs.h>
index 10b20c652e5dc390026bc1eec5042ff351c387f4..4b57757bf9d1200cf4e47e099734ec424cad47d2 100644 (file)
@@ -270,7 +270,6 @@ static struct regulator_init_data omap4_vusb_idata = {
        .constraints = {
                .min_uV                 = 3300000,
                .max_uV                 = 3300000,
-               .apply_uV               = true,
                .valid_modes_mask       = REGULATOR_MODE_NORMAL
                                        | REGULATOR_MODE_STANDBY,
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
diff --git a/arch/arm/mach-orion5x/include/mach/system.h b/arch/arm/mach-orion5x/include/mach/system.h
deleted file mode 100644 (file)
index 825a265..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-orion5x/include/mach/system.h
- *
- * Tzachi Perelstein <tzachi@marvell.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
-#endif
diff --git a/arch/arm/mach-picoxcell/include/mach/system.h b/arch/arm/mach-picoxcell/include/mach/system.h
deleted file mode 100644 (file)
index 1a5d8cb..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2011 Picochip Ltd., Jamie Iles
- *
- * 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.
- *
- * 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.
- */
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-       /*
-        * This should do all the clock switching and wait for interrupt
-        * tricks.
-        */
-       cpu_do_idle();
-}
-
-#endif /* __ASM_ARCH_SYSTEM_H */
diff --git a/arch/arm/mach-pnx4008/include/mach/system.h b/arch/arm/mach-pnx4008/include/mach/system.h
deleted file mode 100644 (file)
index 60cfe71..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * arch/arm/mach-pnx4008/include/mach/system.h
- *
- * Copyright (C) 2003 Philips Semiconductors
- * Copyright (C) 2005 MontaVista Software, Inc.
- *
- * 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.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
-#endif
diff --git a/arch/arm/mach-prima2/include/mach/system.h b/arch/arm/mach-prima2/include/mach/system.h
deleted file mode 100644 (file)
index 2c7d2a9..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * arch/arm/mach-prima2/include/mach/system.h
- *
- * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
- *
- * Licensed under GPLv2 or later.
- */
-
-#ifndef __MACH_SYSTEM_H__
-#define __MACH_SYSTEM_H__
-
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
-#endif
index 0d729e6619dfb411c6b4a5e875cc4e75a1928731..42d5cca66257bd1be97cb0c0b37c8569476d0795 100644 (file)
@@ -49,7 +49,6 @@ extern unsigned pxa3xx_get_clk_frequency_khz(int);
 #endif
 
 extern struct syscore_ops pxa_irq_syscore_ops;
-extern struct syscore_ops pxa_gpio_syscore_ops;
 extern struct syscore_ops pxa2xx_mfp_syscore_ops;
 extern struct syscore_ops pxa3xx_mfp_syscore_ops;
 
index 208eef1c04858a8ec76c40adcaddc131e5b5fb7f..f309bf975202e2cd89921092a33bb684f209f5df 100644 (file)
@@ -97,9 +97,9 @@ static unsigned long hx4700_pin_config[] __initdata = {
 
        /* BTUART */
        GPIO42_BTUART_RXD,
-       GPIO43_BTUART_TXD,
+       GPIO43_BTUART_TXD_LPM_LOW,
        GPIO44_BTUART_CTS,
-       GPIO45_BTUART_RTS,
+       GPIO45_BTUART_RTS_LPM_LOW,
 
        /* PWM 1 (Backlight) */
        GPIO17_PWM1_OUT,
@@ -245,6 +245,21 @@ static u16 asic3_gpio_config[] = {
        ASIC3_GPIOD15_nPIOW,
 };
 
+static struct asic3_led asic3_leds[ASIC3_NUM_LEDS] = {
+       [0] = {
+               .name = "hx4700:amber",
+               .default_trigger = "ds2760-battery.0-charging-blink-full-solid",
+       },
+       [1] = {
+               .name = "hx4700:green",
+               .default_trigger = "unused",
+       },
+       [2] = {
+               .name = "hx4700:blue",
+               .default_trigger = "hx4700-radio",
+       },
+};
+
 static struct resource asic3_resources[] = {
        /* GPIO part */
        [0] = {
@@ -275,6 +290,7 @@ static struct asic3_platform_data asic3_platform_data = {
        .gpio_config_num = ARRAY_SIZE(asic3_gpio_config),
        .irq_base        = IRQ_BOARD_START,
        .gpio_base       = HX4700_ASIC3_GPIO_BASE,
+       .leds            = asic3_leds,
 };
 
 static struct platform_device asic3 = {
@@ -705,10 +721,9 @@ static void hx4700_set_vpp(struct platform_device *pdev, int vpp)
        gpio_set_value(GPIO91_HX4700_FLASH_VPEN, vpp);
 }
 
-static struct resource strataflash_resource = {
-       .start = PXA_CS0_PHYS,
-       .end   = PXA_CS0_PHYS + SZ_128M - 1,
-       .flags = IORESOURCE_MEM,
+static struct resource strataflash_resource[] = {
+       [0] = DEFINE_RES_MEM(PXA_CS0_PHYS, SZ_64M),
+       [1] = DEFINE_RES_MEM(PXA_CS0_PHYS + SZ_64M, SZ_64M),
 };
 
 static struct physmap_flash_data strataflash_data = {
@@ -719,8 +734,8 @@ static struct physmap_flash_data strataflash_data = {
 static struct platform_device strataflash = {
        .name          = "physmap-flash",
        .id            = -1,
-       .resource      = &strataflash_resource,
-       .num_resources = 1,
+       .resource      = strataflash_resource,
+       .num_resources = ARRAY_SIZE(strataflash_resource),
        .dev = {
                .platform_data = &strataflash_data,
        },
@@ -787,17 +802,6 @@ static struct platform_device audio = {
 };
 
 
-/*
- * PCMCIA
- */
-
-static struct platform_device pcmcia = {
-       .name = "hx4700-pcmcia",
-       .dev  = {
-               .parent = &asic3.dev,
-       },
-};
-
 /*
  * Platform devices
  */
@@ -814,7 +818,6 @@ static struct platform_device *devices[] __initdata = {
        &power_supply,
        &strataflash,
        &audio,
-       &pcmcia,
 };
 
 static struct gpio global_gpios[] = {
@@ -830,7 +833,6 @@ static struct gpio global_gpios[] = {
        { GPIO32_HX4700_RS232_ON,         GPIOF_OUT_INIT_HIGH, "RS232_ON" },
        { GPIO71_HX4700_ASIC3_nRESET,     GPIOF_OUT_INIT_HIGH, "ASIC3_nRESET" },
        { GPIO82_HX4700_EUART_RESET,      GPIOF_OUT_INIT_HIGH, "EUART_RESET" },
-       { GPIO105_HX4700_nIR_ON,          GPIOF_OUT_INIT_HIGH, "nIR_EN" },
 };
 
 static void __init hx4700_init(void)
index ec0f0b0b6744b9afba76c6b482cf888b7b530b81..a65867209aa0da3e251b3791377e4f8966b37d72 100644 (file)
 #define GPIO44_BTUART_CTS      MFP_CFG_IN(GPIO44, AF1)
 #define GPIO42_BTUART_RXD      MFP_CFG_IN(GPIO42, AF1)
 #define GPIO45_BTUART_RTS      MFP_CFG_OUT(GPIO45, AF2, DRIVE_HIGH)
+#define GPIO45_BTUART_RTS_LPM_LOW      MFP_CFG_OUT(GPIO45, AF2, DRIVE_LOW)
 #define GPIO43_BTUART_TXD      MFP_CFG_OUT(GPIO43, AF2, DRIVE_HIGH)
+#define GPIO43_BTUART_TXD_LPM_LOW      MFP_CFG_OUT(GPIO43, AF2, DRIVE_LOW)
 
 /* STUART */
 #define GPIO46_STUART_RXD      MFP_CFG_IN(GPIO46, AF2)
diff --git a/arch/arm/mach-pxa/include/mach/system.h b/arch/arm/mach-pxa/include/mach/system.h
deleted file mode 100644 (file)
index c5afacd..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * arch/arm/mach-pxa/include/mach/system.h
- *
- * Author:     Nicolas Pitre
- * Created:    Jun 15, 2001
- * Copyright:  MontaVista Software Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
index f14775536b8385172e929791a627c3a689fb94ac..29b62afc6f7ca3d219b4f4498c4b62b3a6fee223 100644 (file)
@@ -226,6 +226,12 @@ static void __init pxa25x_mfp_init(void)
 {
        int i;
 
+       /* running before pxa_gpio_probe() */
+#ifdef CONFIG_CPU_PXA26x
+       pxa_last_gpio = 89;
+#else
+       pxa_last_gpio = 84;
+#endif
        for (i = 0; i <= pxa_last_gpio; i++)
                gpio_desc[i].valid = 1;
 
@@ -295,6 +301,7 @@ static void __init pxa27x_mfp_init(void)
 {
        int i, gpio;
 
+       pxa_last_gpio = 120;    /* running before pxa_gpio_probe() */
        for (i = 0; i <= pxa_last_gpio; i++) {
                /* skip GPIO2, 5, 6, 7, 8, they are not
                 * valid pins allow configuration
index 00d6eacab8e4dbb7f765a04a2fbaa44c6348f320..3352b37b60cf8218025ab54df4af1358ed62ae1f 100644 (file)
@@ -208,6 +208,7 @@ static struct clk_lookup pxa25x_clkregs[] = {
        INIT_CLKREG(&clk_pxa25x_gpio11, NULL, "GPIO11_CLK"),
        INIT_CLKREG(&clk_pxa25x_gpio12, NULL, "GPIO12_CLK"),
        INIT_CLKREG(&clk_pxa25x_mem, "pxa2xx-pcmcia", NULL),
+       INIT_CLKREG(&clk_dummy, "pxa-gpio", NULL),
 };
 
 static struct clk_lookup pxa25x_hwuart_clkreg =
@@ -367,7 +368,6 @@ static int __init pxa25x_init(void)
 
                register_syscore_ops(&pxa_irq_syscore_ops);
                register_syscore_ops(&pxa2xx_mfp_syscore_ops);
-               register_syscore_ops(&pxa_gpio_syscore_ops);
                register_syscore_ops(&pxa2xx_clock_syscore_ops);
 
                ret = platform_add_devices(pxa25x_devices,
index c1673b3441d4c9c3db04e50ac9f6a2ba4660b871..6bce78edce7a3c070b197b57f1fcb16197c3ba7f 100644 (file)
@@ -229,6 +229,7 @@ static struct clk_lookup pxa27x_clkregs[] = {
        INIT_CLKREG(&clk_pxa27x_im, NULL, "IMCLK"),
        INIT_CLKREG(&clk_pxa27x_memc, NULL, "MEMCLK"),
        INIT_CLKREG(&clk_pxa27x_mem, "pxa2xx-pcmcia", NULL),
+       INIT_CLKREG(&clk_dummy, "pxa-gpio", NULL),
 };
 
 #ifdef CONFIG_PM
@@ -455,7 +456,6 @@ static int __init pxa27x_init(void)
 
                register_syscore_ops(&pxa_irq_syscore_ops);
                register_syscore_ops(&pxa2xx_mfp_syscore_ops);
-               register_syscore_ops(&pxa_gpio_syscore_ops);
                register_syscore_ops(&pxa2xx_clock_syscore_ops);
 
                ret = platform_add_devices(devices, ARRAY_SIZE(devices));
index 4f402afa6609c0ed584100d951347ec1272f8531..3918a672238e4a368f0474c699ebc1c2cb680bb7 100644 (file)
@@ -462,7 +462,6 @@ static int __init pxa3xx_init(void)
 
                register_syscore_ops(&pxa_irq_syscore_ops);
                register_syscore_ops(&pxa3xx_mfp_syscore_ops);
-               register_syscore_ops(&pxa_gpio_syscore_ops);
                register_syscore_ops(&pxa3xx_clock_syscore_ops);
 
                ret = platform_add_devices(devices, ARRAY_SIZE(devices));
index d082a583df78a14c0bc4074db270bb8ce2393ca1..5ce434b95e87a52941f38ca8e023753b940802e5 100644 (file)
@@ -283,7 +283,6 @@ static int __init pxa95x_init(void)
                        return ret;
 
                register_syscore_ops(&pxa_irq_syscore_ops);
-               register_syscore_ops(&pxa_gpio_syscore_ops);
                register_syscore_ops(&pxa3xx_clock_syscore_ops);
 
                ret = platform_add_devices(devices, ARRAY_SIZE(devices));
index 735b57aaf2d6030bf50d81eaadcb1c072307d69d..f8f2c0ac4c01531d495b62817cfc01af202f7b8e 100644 (file)
 #include <asm/setup.h>
 #include <asm/leds.h>
 
-#define AMBA_DEVICE(name,busid,base,plat)                      \
-static struct amba_device name##_device = {                    \
-       .dev            = {                                     \
-               .coherent_dma_mask = ~0,                        \
-               .init_name = busid,                             \
-               .platform_data = plat,                          \
-       },                                                      \
-       .res            = {                                     \
-               .start  = REALVIEW_##base##_BASE,               \
-               .end    = (REALVIEW_##base##_BASE) + SZ_4K - 1, \
-               .flags  = IORESOURCE_MEM,                       \
-       },                                                      \
-       .dma_mask       = ~0,                                   \
-       .irq            = base##_IRQ,                           \
-}
+#define APB_DEVICE(name, busid, base, plat)                    \
+static AMBA_APB_DEVICE(name, busid, 0, REALVIEW_##base##_BASE, base##_IRQ, plat)
+
+#define AHB_DEVICE(name, busid, base, plat)                    \
+static AMBA_AHB_DEVICE(name, busid, 0, REALVIEW_##base##_BASE, base##_IRQ, plat)
 
 struct machine_desc;
 
index 5c3c625e3e04f3b84db19f25a3c1c849f3833a5b..708f84156f2c6479cf9ea0cbe7a7ad13fe577334 100644 (file)
@@ -40,6 +40,7 @@
 #define IRQ_DC1176_L2CC                (IRQ_DC1176_GIC_START + 13)
 #define IRQ_DC1176_RTC         (IRQ_DC1176_GIC_START + 14)
 #define IRQ_DC1176_CLCD                (IRQ_DC1176_GIC_START + 15)     /* CLCD controller */
+#define IRQ_DC1176_GPIO0       (IRQ_DC1176_GIC_START + 16)
 #define IRQ_DC1176_SSP         (IRQ_DC1176_GIC_START + 17)     /* SSP port */
 #define IRQ_DC1176_UART0       (IRQ_DC1176_GIC_START + 18)     /* UART 0 on development chip */
 #define IRQ_DC1176_UART1       (IRQ_DC1176_GIC_START + 19)     /* UART 1 on development chip */
@@ -73,7 +74,6 @@
 #define IRQ_PB1176_DMAC                (IRQ_PB1176_GIC_START + 24)     /* DMA controller */
 #define IRQ_PB1176_RTC         (IRQ_PB1176_GIC_START + 25)     /* Real Time Clock */
 
-#define IRQ_PB1176_GPIO0       -1
 #define IRQ_PB1176_SCTL                -1
 
 #define NR_GIC_PB1176          2
diff --git a/arch/arm/mach-realview/include/mach/system.h b/arch/arm/mach-realview/include/mach/system.h
deleted file mode 100644 (file)
index 471b671..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *  arch/arm/mach-realview/include/mach/system.h
- *
- *  Copyright (C) 2003 ARM Limited
- *  Copyright (C) 2000 Deep Blue Solutions Ltd
- *
- * 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.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-       /*
-        * This should do all the clock switching
-        * and wait for interrupt tricks
-        */
-       cpu_do_idle();
-}
-
-#endif
index 9578145f2df031f33d8e13c277e405073cc3d197..157e1bc6e83c17197ffbdbc48d4cdbe2572404c5 100644 (file)
@@ -135,63 +135,63 @@ static struct pl022_ssp_controller ssp0_plat_data = {
 /*
  * These devices are connected via the core APB bridge
  */
-#define GPIO2_IRQ      { IRQ_EB_GPIO2, NO_IRQ }
-#define GPIO3_IRQ      { IRQ_EB_GPIO3, NO_IRQ }
+#define GPIO2_IRQ      { IRQ_EB_GPIO2 }
+#define GPIO3_IRQ      { IRQ_EB_GPIO3 }
 
-#define AACI_IRQ       { IRQ_EB_AACI, NO_IRQ }
+#define AACI_IRQ       { IRQ_EB_AACI }
 #define MMCI0_IRQ      { IRQ_EB_MMCI0A, IRQ_EB_MMCI0B }
-#define KMI0_IRQ       { IRQ_EB_KMI0, NO_IRQ }
-#define KMI1_IRQ       { IRQ_EB_KMI1, NO_IRQ }
+#define KMI0_IRQ       { IRQ_EB_KMI0 }
+#define KMI1_IRQ       { IRQ_EB_KMI1 }
 
 /*
  * These devices are connected directly to the multi-layer AHB switch
  */
-#define EB_SMC_IRQ     { NO_IRQ, NO_IRQ }
-#define MPMC_IRQ       { NO_IRQ, NO_IRQ }
-#define EB_CLCD_IRQ    { IRQ_EB_CLCD, NO_IRQ }
-#define DMAC_IRQ       { IRQ_EB_DMA, NO_IRQ }
+#define EB_SMC_IRQ     { }
+#define MPMC_IRQ       { }
+#define EB_CLCD_IRQ    { IRQ_EB_CLCD }
+#define DMAC_IRQ       { IRQ_EB_DMA }
 
 /*
  * These devices are connected via the core APB bridge
  */
-#define SCTL_IRQ       { NO_IRQ, NO_IRQ }
-#define EB_WATCHDOG_IRQ        { IRQ_EB_WDOG, NO_IRQ }
-#define EB_GPIO0_IRQ   { IRQ_EB_GPIO0, NO_IRQ }
-#define GPIO1_IRQ      { IRQ_EB_GPIO1, NO_IRQ }
-#define EB_RTC_IRQ     { IRQ_EB_RTC, NO_IRQ }
+#define SCTL_IRQ       { }
+#define EB_WATCHDOG_IRQ        { IRQ_EB_WDOG }
+#define EB_GPIO0_IRQ   { IRQ_EB_GPIO0 }
+#define GPIO1_IRQ      { IRQ_EB_GPIO1 }
+#define EB_RTC_IRQ     { IRQ_EB_RTC }
 
 /*
  * These devices are connected via the DMA APB bridge
  */
-#define SCI_IRQ                { IRQ_EB_SCI, NO_IRQ }
-#define EB_UART0_IRQ   { IRQ_EB_UART0, NO_IRQ }
-#define EB_UART1_IRQ   { IRQ_EB_UART1, NO_IRQ }
-#define EB_UART2_IRQ   { IRQ_EB_UART2, NO_IRQ }
-#define EB_UART3_IRQ   { IRQ_EB_UART3, NO_IRQ }
-#define EB_SSP_IRQ     { IRQ_EB_SSP, NO_IRQ }
+#define SCI_IRQ                { IRQ_EB_SCI }
+#define EB_UART0_IRQ   { IRQ_EB_UART0 }
+#define EB_UART1_IRQ   { IRQ_EB_UART1 }
+#define EB_UART2_IRQ   { IRQ_EB_UART2 }
+#define EB_UART3_IRQ   { IRQ_EB_UART3 }
+#define EB_SSP_IRQ     { IRQ_EB_SSP }
 
 /* FPGA Primecells */
-AMBA_DEVICE(aaci,  "fpga:aaci",  AACI,     NULL);
-AMBA_DEVICE(mmc0,  "fpga:mmc0",  MMCI0,    &realview_mmc0_plat_data);
-AMBA_DEVICE(kmi0,  "fpga:kmi0",  KMI0,     NULL);
-AMBA_DEVICE(kmi1,  "fpga:kmi1",  KMI1,     NULL);
-AMBA_DEVICE(uart3, "fpga:uart3", EB_UART3, NULL);
+APB_DEVICE(aaci,  "fpga:aaci",  AACI,     NULL);
+APB_DEVICE(mmc0,  "fpga:mmc0",  MMCI0,    &realview_mmc0_plat_data);
+APB_DEVICE(kmi0,  "fpga:kmi0",  KMI0,     NULL);
+APB_DEVICE(kmi1,  "fpga:kmi1",  KMI1,     NULL);
+APB_DEVICE(uart3, "fpga:uart3", EB_UART3, NULL);
 
 /* DevChip Primecells */
-AMBA_DEVICE(smc,   "dev:smc",   EB_SMC,   NULL);
-AMBA_DEVICE(clcd,  "dev:clcd",  EB_CLCD,  &clcd_plat_data);
-AMBA_DEVICE(dmac,  "dev:dmac",  DMAC,     NULL);
-AMBA_DEVICE(sctl,  "dev:sctl",  SCTL,     NULL);
-AMBA_DEVICE(wdog,  "dev:wdog",  EB_WATCHDOG, NULL);
-AMBA_DEVICE(gpio0, "dev:gpio0", EB_GPIO0, &gpio0_plat_data);
-AMBA_DEVICE(gpio1, "dev:gpio1", GPIO1,    &gpio1_plat_data);
-AMBA_DEVICE(gpio2, "dev:gpio2", GPIO2,    &gpio2_plat_data);
-AMBA_DEVICE(rtc,   "dev:rtc",   EB_RTC,   NULL);
-AMBA_DEVICE(sci0,  "dev:sci0",  SCI,      NULL);
-AMBA_DEVICE(uart0, "dev:uart0", EB_UART0, NULL);
-AMBA_DEVICE(uart1, "dev:uart1", EB_UART1, NULL);
-AMBA_DEVICE(uart2, "dev:uart2", EB_UART2, NULL);
-AMBA_DEVICE(ssp0,  "dev:ssp0",  EB_SSP,   &ssp0_plat_data);
+AHB_DEVICE(smc,   "dev:smc",   EB_SMC,   NULL);
+AHB_DEVICE(clcd,  "dev:clcd",  EB_CLCD,  &clcd_plat_data);
+AHB_DEVICE(dmac,  "dev:dmac",  DMAC,     NULL);
+AHB_DEVICE(sctl,  "dev:sctl",  SCTL,     NULL);
+APB_DEVICE(wdog,  "dev:wdog",  EB_WATCHDOG, NULL);
+APB_DEVICE(gpio0, "dev:gpio0", EB_GPIO0, &gpio0_plat_data);
+APB_DEVICE(gpio1, "dev:gpio1", GPIO1,    &gpio1_plat_data);
+APB_DEVICE(gpio2, "dev:gpio2", GPIO2,    &gpio2_plat_data);
+APB_DEVICE(rtc,   "dev:rtc",   EB_RTC,   NULL);
+APB_DEVICE(sci0,  "dev:sci0",  SCI,      NULL);
+APB_DEVICE(uart0, "dev:uart0", EB_UART0, NULL);
+APB_DEVICE(uart1, "dev:uart1", EB_UART1, NULL);
+APB_DEVICE(uart2, "dev:uart2", EB_UART2, NULL);
+APB_DEVICE(ssp0,  "dev:ssp0",  EB_SSP,   &ssp0_plat_data);
 
 static struct amba_device *amba_devs[] __initdata = {
        &dmac_device,
index e4abe94fb11ab4b0f0969bc565d8359aafeb17f2..b1d7cafa1a6d2e295c2f95529b1d556df4b85db1 100644 (file)
@@ -132,50 +132,50 @@ static struct pl022_ssp_controller ssp0_plat_data = {
 /*
  * RealView PB1176 AMBA devices
  */
-#define GPIO2_IRQ      { IRQ_PB1176_GPIO2, NO_IRQ }
-#define GPIO3_IRQ      { IRQ_PB1176_GPIO3, NO_IRQ }
-#define AACI_IRQ       { IRQ_PB1176_AACI, NO_IRQ }
+#define GPIO2_IRQ      { IRQ_PB1176_GPIO2 }
+#define GPIO3_IRQ      { IRQ_PB1176_GPIO3 }
+#define AACI_IRQ       { IRQ_PB1176_AACI }
 #define MMCI0_IRQ      { IRQ_PB1176_MMCI0A, IRQ_PB1176_MMCI0B }
-#define KMI0_IRQ       { IRQ_PB1176_KMI0, NO_IRQ }
-#define KMI1_IRQ       { IRQ_PB1176_KMI1, NO_IRQ }
-#define PB1176_SMC_IRQ { NO_IRQ, NO_IRQ }
-#define MPMC_IRQ       { NO_IRQ, NO_IRQ }
-#define PB1176_CLCD_IRQ        { IRQ_DC1176_CLCD, NO_IRQ }
-#define SCTL_IRQ       { NO_IRQ, NO_IRQ }
-#define PB1176_WATCHDOG_IRQ    { IRQ_DC1176_WATCHDOG, NO_IRQ }
-#define PB1176_GPIO0_IRQ       { IRQ_PB1176_GPIO0, NO_IRQ }
-#define GPIO1_IRQ      { IRQ_PB1176_GPIO1, NO_IRQ }
-#define PB1176_RTC_IRQ { IRQ_DC1176_RTC, NO_IRQ }
-#define SCI_IRQ                { IRQ_PB1176_SCI, NO_IRQ }
-#define PB1176_UART0_IRQ       { IRQ_DC1176_UART0, NO_IRQ }
-#define PB1176_UART1_IRQ       { IRQ_DC1176_UART1, NO_IRQ }
-#define PB1176_UART2_IRQ       { IRQ_DC1176_UART2, NO_IRQ }
-#define PB1176_UART3_IRQ       { IRQ_DC1176_UART3, NO_IRQ }
-#define PB1176_UART4_IRQ       { IRQ_PB1176_UART4, NO_IRQ }
-#define PB1176_SSP_IRQ         { IRQ_DC1176_SSP, NO_IRQ }
+#define KMI0_IRQ       { IRQ_PB1176_KMI0 }
+#define KMI1_IRQ       { IRQ_PB1176_KMI1 }
+#define PB1176_SMC_IRQ { }
+#define MPMC_IRQ       { }
+#define PB1176_CLCD_IRQ        { IRQ_DC1176_CLCD }
+#define SCTL_IRQ       { }
+#define PB1176_WATCHDOG_IRQ    { IRQ_DC1176_WATCHDOG }
+#define PB1176_GPIO0_IRQ       { IRQ_DC1176_GPIO0 }
+#define GPIO1_IRQ      { IRQ_PB1176_GPIO1 }
+#define PB1176_RTC_IRQ { IRQ_DC1176_RTC }
+#define SCI_IRQ                { IRQ_PB1176_SCI }
+#define PB1176_UART0_IRQ       { IRQ_DC1176_UART0 }
+#define PB1176_UART1_IRQ       { IRQ_DC1176_UART1 }
+#define PB1176_UART2_IRQ       { IRQ_DC1176_UART2 }
+#define PB1176_UART3_IRQ       { IRQ_DC1176_UART3 }
+#define PB1176_UART4_IRQ       { IRQ_PB1176_UART4 }
+#define PB1176_SSP_IRQ         { IRQ_DC1176_SSP }
 
 /* FPGA Primecells */
-AMBA_DEVICE(aaci,      "fpga:aaci",    AACI,           NULL);
-AMBA_DEVICE(mmc0,      "fpga:mmc0",    MMCI0,          &realview_mmc0_plat_data);
-AMBA_DEVICE(kmi0,      "fpga:kmi0",    KMI0,           NULL);
-AMBA_DEVICE(kmi1,      "fpga:kmi1",    KMI1,           NULL);
-AMBA_DEVICE(uart4,     "fpga:uart4",   PB1176_UART4,   NULL);
+APB_DEVICE(aaci,       "fpga:aaci",    AACI,           NULL);
+APB_DEVICE(mmc0,       "fpga:mmc0",    MMCI0,          &realview_mmc0_plat_data);
+APB_DEVICE(kmi0,       "fpga:kmi0",    KMI0,           NULL);
+APB_DEVICE(kmi1,       "fpga:kmi1",    KMI1,           NULL);
+APB_DEVICE(uart4,      "fpga:uart4",   PB1176_UART4,   NULL);
 
 /* DevChip Primecells */
-AMBA_DEVICE(smc,       "dev:smc",      PB1176_SMC,     NULL);
-AMBA_DEVICE(sctl,      "dev:sctl",     SCTL,           NULL);
-AMBA_DEVICE(wdog,      "dev:wdog",     PB1176_WATCHDOG,        NULL);
-AMBA_DEVICE(gpio0,     "dev:gpio0",    PB1176_GPIO0,   &gpio0_plat_data);
-AMBA_DEVICE(gpio1,     "dev:gpio1",    GPIO1,          &gpio1_plat_data);
-AMBA_DEVICE(gpio2,     "dev:gpio2",    GPIO2,          &gpio2_plat_data);
-AMBA_DEVICE(rtc,       "dev:rtc",      PB1176_RTC,     NULL);
-AMBA_DEVICE(sci0,      "dev:sci0",     SCI,            NULL);
-AMBA_DEVICE(uart0,     "dev:uart0",    PB1176_UART0,   NULL);
-AMBA_DEVICE(uart1,     "dev:uart1",    PB1176_UART1,   NULL);
-AMBA_DEVICE(uart2,     "dev:uart2",    PB1176_UART2,   NULL);
-AMBA_DEVICE(uart3,     "dev:uart3",    PB1176_UART3,   NULL);
-AMBA_DEVICE(ssp0,      "dev:ssp0",     PB1176_SSP,     &ssp0_plat_data);
-AMBA_DEVICE(clcd,      "dev:clcd",     PB1176_CLCD,    &clcd_plat_data);
+AHB_DEVICE(smc,                "dev:smc",      PB1176_SMC,     NULL);
+AHB_DEVICE(sctl,       "dev:sctl",     SCTL,           NULL);
+APB_DEVICE(wdog,       "dev:wdog",     PB1176_WATCHDOG,        NULL);
+APB_DEVICE(gpio0,      "dev:gpio0",    PB1176_GPIO0,   &gpio0_plat_data);
+APB_DEVICE(gpio1,      "dev:gpio1",    GPIO1,          &gpio1_plat_data);
+APB_DEVICE(gpio2,      "dev:gpio2",    GPIO2,          &gpio2_plat_data);
+APB_DEVICE(rtc,                "dev:rtc",      PB1176_RTC,     NULL);
+APB_DEVICE(sci0,       "dev:sci0",     SCI,            NULL);
+APB_DEVICE(uart0,      "dev:uart0",    PB1176_UART0,   NULL);
+APB_DEVICE(uart1,      "dev:uart1",    PB1176_UART1,   NULL);
+APB_DEVICE(uart2,      "dev:uart2",    PB1176_UART2,   NULL);
+APB_DEVICE(uart3,      "dev:uart3",    PB1176_UART3,   NULL);
+APB_DEVICE(ssp0,       "dev:ssp0",     PB1176_SSP,     &ssp0_plat_data);
+AHB_DEVICE(clcd,       "dev:clcd",     PB1176_CLCD,    &clcd_plat_data);
 
 static struct amba_device *amba_devs[] __initdata = {
        &uart0_device,
index 2147335f66f5d63bcc38772983aff10fb7d27166..ae7fe54f6eb635ce3312423d77a5f9c6bc7b1186 100644 (file)
@@ -127,52 +127,52 @@ static struct pl022_ssp_controller ssp0_plat_data = {
  * RealView PB11MPCore AMBA devices
  */
 
-#define GPIO2_IRQ              { IRQ_PB11MP_GPIO2, NO_IRQ }
-#define GPIO3_IRQ              { IRQ_PB11MP_GPIO3, NO_IRQ }
-#define AACI_IRQ               { IRQ_TC11MP_AACI, NO_IRQ }
+#define GPIO2_IRQ              { IRQ_PB11MP_GPIO2 }
+#define GPIO3_IRQ              { IRQ_PB11MP_GPIO3 }
+#define AACI_IRQ               { IRQ_TC11MP_AACI }
 #define MMCI0_IRQ              { IRQ_TC11MP_MMCI0A, IRQ_TC11MP_MMCI0B }
-#define KMI0_IRQ               { IRQ_TC11MP_KMI0, NO_IRQ }
-#define KMI1_IRQ               { IRQ_TC11MP_KMI1, NO_IRQ }
-#define PB11MP_SMC_IRQ         { NO_IRQ, NO_IRQ }
-#define MPMC_IRQ               { NO_IRQ, NO_IRQ }
-#define PB11MP_CLCD_IRQ                { IRQ_PB11MP_CLCD, NO_IRQ }
-#define DMAC_IRQ               { IRQ_PB11MP_DMAC, NO_IRQ }
-#define SCTL_IRQ               { NO_IRQ, NO_IRQ }
-#define PB11MP_WATCHDOG_IRQ    { IRQ_PB11MP_WATCHDOG, NO_IRQ }
-#define PB11MP_GPIO0_IRQ       { IRQ_PB11MP_GPIO0, NO_IRQ }
-#define GPIO1_IRQ              { IRQ_PB11MP_GPIO1, NO_IRQ }
-#define PB11MP_RTC_IRQ         { IRQ_TC11MP_RTC, NO_IRQ }
-#define SCI_IRQ                        { IRQ_PB11MP_SCI, NO_IRQ }
-#define PB11MP_UART0_IRQ       { IRQ_TC11MP_UART0, NO_IRQ }
-#define PB11MP_UART1_IRQ       { IRQ_TC11MP_UART1, NO_IRQ }
-#define PB11MP_UART2_IRQ       { IRQ_PB11MP_UART2, NO_IRQ }
-#define PB11MP_UART3_IRQ       { IRQ_PB11MP_UART3, NO_IRQ }
-#define PB11MP_SSP_IRQ         { IRQ_PB11MP_SSP, NO_IRQ }
+#define KMI0_IRQ               { IRQ_TC11MP_KMI0 }
+#define KMI1_IRQ               { IRQ_TC11MP_KMI1 }
+#define PB11MP_SMC_IRQ         { }
+#define MPMC_IRQ               { }
+#define PB11MP_CLCD_IRQ                { IRQ_PB11MP_CLCD }
+#define DMAC_IRQ               { IRQ_PB11MP_DMAC }
+#define SCTL_IRQ               { }
+#define PB11MP_WATCHDOG_IRQ    { IRQ_PB11MP_WATCHDOG }
+#define PB11MP_GPIO0_IRQ       { IRQ_PB11MP_GPIO0 }
+#define GPIO1_IRQ              { IRQ_PB11MP_GPIO1 }
+#define PB11MP_RTC_IRQ         { IRQ_TC11MP_RTC }
+#define SCI_IRQ                        { IRQ_PB11MP_SCI }
+#define PB11MP_UART0_IRQ       { IRQ_TC11MP_UART0 }
+#define PB11MP_UART1_IRQ       { IRQ_TC11MP_UART1 }
+#define PB11MP_UART2_IRQ       { IRQ_PB11MP_UART2 }
+#define PB11MP_UART3_IRQ       { IRQ_PB11MP_UART3 }
+#define PB11MP_SSP_IRQ         { IRQ_PB11MP_SSP }
 
 /* FPGA Primecells */
-AMBA_DEVICE(aaci,      "fpga:aaci",    AACI,           NULL);
-AMBA_DEVICE(mmc0,      "fpga:mmc0",    MMCI0,          &realview_mmc0_plat_data);
-AMBA_DEVICE(kmi0,      "fpga:kmi0",    KMI0,           NULL);
-AMBA_DEVICE(kmi1,      "fpga:kmi1",    KMI1,           NULL);
-AMBA_DEVICE(uart3,     "fpga:uart3",   PB11MP_UART3,   NULL);
+APB_DEVICE(aaci,       "fpga:aaci",    AACI,           NULL);
+APB_DEVICE(mmc0,       "fpga:mmc0",    MMCI0,          &realview_mmc0_plat_data);
+APB_DEVICE(kmi0,       "fpga:kmi0",    KMI0,           NULL);
+APB_DEVICE(kmi1,       "fpga:kmi1",    KMI1,           NULL);
+APB_DEVICE(uart3,      "fpga:uart3",   PB11MP_UART3,   NULL);
 
 /* DevChip Primecells */
-AMBA_DEVICE(smc,       "dev:smc",      PB11MP_SMC,     NULL);
-AMBA_DEVICE(sctl,      "dev:sctl",     SCTL,           NULL);
-AMBA_DEVICE(wdog,      "dev:wdog",     PB11MP_WATCHDOG, NULL);
-AMBA_DEVICE(gpio0,     "dev:gpio0",    PB11MP_GPIO0,   &gpio0_plat_data);
-AMBA_DEVICE(gpio1,     "dev:gpio1",    GPIO1,          &gpio1_plat_data);
-AMBA_DEVICE(gpio2,     "dev:gpio2",    GPIO2,          &gpio2_plat_data);
-AMBA_DEVICE(rtc,       "dev:rtc",      PB11MP_RTC,     NULL);
-AMBA_DEVICE(sci0,      "dev:sci0",     SCI,            NULL);
-AMBA_DEVICE(uart0,     "dev:uart0",    PB11MP_UART0,   NULL);
-AMBA_DEVICE(uart1,     "dev:uart1",    PB11MP_UART1,   NULL);
-AMBA_DEVICE(uart2,     "dev:uart2",    PB11MP_UART2,   NULL);
-AMBA_DEVICE(ssp0,      "dev:ssp0",     PB11MP_SSP,     &ssp0_plat_data);
+AHB_DEVICE(smc,                "dev:smc",      PB11MP_SMC,     NULL);
+AHB_DEVICE(sctl,       "dev:sctl",     SCTL,           NULL);
+APB_DEVICE(wdog,       "dev:wdog",     PB11MP_WATCHDOG, NULL);
+APB_DEVICE(gpio0,      "dev:gpio0",    PB11MP_GPIO0,   &gpio0_plat_data);
+APB_DEVICE(gpio1,      "dev:gpio1",    GPIO1,          &gpio1_plat_data);
+APB_DEVICE(gpio2,      "dev:gpio2",    GPIO2,          &gpio2_plat_data);
+APB_DEVICE(rtc,                "dev:rtc",      PB11MP_RTC,     NULL);
+APB_DEVICE(sci0,       "dev:sci0",     SCI,            NULL);
+APB_DEVICE(uart0,      "dev:uart0",    PB11MP_UART0,   NULL);
+APB_DEVICE(uart1,      "dev:uart1",    PB11MP_UART1,   NULL);
+APB_DEVICE(uart2,      "dev:uart2",    PB11MP_UART2,   NULL);
+APB_DEVICE(ssp0,       "dev:ssp0",     PB11MP_SSP,     &ssp0_plat_data);
 
 /* Primecells on the NEC ISSP chip */
-AMBA_DEVICE(clcd,      "issp:clcd",    PB11MP_CLCD,    &clcd_plat_data);
-AMBA_DEVICE(dmac,      "issp:dmac",    DMAC,           NULL);
+AHB_DEVICE(clcd,       "issp:clcd",    PB11MP_CLCD,    &clcd_plat_data);
+AHB_DEVICE(dmac,       "issp:dmac",    DMAC,           NULL);
 
 static struct amba_device *amba_devs[] __initdata = {
        &dmac_device,
index 25b2e59296f8d7a5721595f2523b152e69a0034e..59650174e6ed39e9c3bc9e44441beb48b22a4214 100644 (file)
@@ -122,52 +122,52 @@ static struct pl022_ssp_controller ssp0_plat_data = {
  * RealView PBA8Core AMBA devices
  */
 
-#define GPIO2_IRQ              { IRQ_PBA8_GPIO2, NO_IRQ }
-#define GPIO3_IRQ              { IRQ_PBA8_GPIO3, NO_IRQ }
-#define AACI_IRQ               { IRQ_PBA8_AACI, NO_IRQ }
+#define GPIO2_IRQ              { IRQ_PBA8_GPIO2 }
+#define GPIO3_IRQ              { IRQ_PBA8_GPIO3 }
+#define AACI_IRQ               { IRQ_PBA8_AACI }
 #define MMCI0_IRQ              { IRQ_PBA8_MMCI0A, IRQ_PBA8_MMCI0B }
-#define KMI0_IRQ               { IRQ_PBA8_KMI0, NO_IRQ }
-#define KMI1_IRQ               { IRQ_PBA8_KMI1, NO_IRQ }
-#define PBA8_SMC_IRQ           { NO_IRQ, NO_IRQ }
-#define MPMC_IRQ               { NO_IRQ, NO_IRQ }
-#define PBA8_CLCD_IRQ          { IRQ_PBA8_CLCD, NO_IRQ }
-#define DMAC_IRQ               { IRQ_PBA8_DMAC, NO_IRQ }
-#define SCTL_IRQ               { NO_IRQ, NO_IRQ }
-#define PBA8_WATCHDOG_IRQ      { IRQ_PBA8_WATCHDOG, NO_IRQ }
-#define PBA8_GPIO0_IRQ         { IRQ_PBA8_GPIO0, NO_IRQ }
-#define GPIO1_IRQ              { IRQ_PBA8_GPIO1, NO_IRQ }
-#define PBA8_RTC_IRQ           { IRQ_PBA8_RTC, NO_IRQ }
-#define SCI_IRQ                        { IRQ_PBA8_SCI, NO_IRQ }
-#define PBA8_UART0_IRQ         { IRQ_PBA8_UART0, NO_IRQ }
-#define PBA8_UART1_IRQ         { IRQ_PBA8_UART1, NO_IRQ }
-#define PBA8_UART2_IRQ         { IRQ_PBA8_UART2, NO_IRQ }
-#define PBA8_UART3_IRQ         { IRQ_PBA8_UART3, NO_IRQ }
-#define PBA8_SSP_IRQ           { IRQ_PBA8_SSP, NO_IRQ }
+#define KMI0_IRQ               { IRQ_PBA8_KMI0 }
+#define KMI1_IRQ               { IRQ_PBA8_KMI1 }
+#define PBA8_SMC_IRQ           { }
+#define MPMC_IRQ               { }
+#define PBA8_CLCD_IRQ          { IRQ_PBA8_CLCD }
+#define DMAC_IRQ               { IRQ_PBA8_DMAC }
+#define SCTL_IRQ               { }
+#define PBA8_WATCHDOG_IRQ      { IRQ_PBA8_WATCHDOG }
+#define PBA8_GPIO0_IRQ         { IRQ_PBA8_GPIO0 }
+#define GPIO1_IRQ              { IRQ_PBA8_GPIO1 }
+#define PBA8_RTC_IRQ           { IRQ_PBA8_RTC }
+#define SCI_IRQ                        { IRQ_PBA8_SCI }
+#define PBA8_UART0_IRQ         { IRQ_PBA8_UART0 }
+#define PBA8_UART1_IRQ         { IRQ_PBA8_UART1 }
+#define PBA8_UART2_IRQ         { IRQ_PBA8_UART2 }
+#define PBA8_UART3_IRQ         { IRQ_PBA8_UART3 }
+#define PBA8_SSP_IRQ           { IRQ_PBA8_SSP }
 
 /* FPGA Primecells */
-AMBA_DEVICE(aaci,      "fpga:aaci",    AACI,           NULL);
-AMBA_DEVICE(mmc0,      "fpga:mmc0",    MMCI0,          &realview_mmc0_plat_data);
-AMBA_DEVICE(kmi0,      "fpga:kmi0",    KMI0,           NULL);
-AMBA_DEVICE(kmi1,      "fpga:kmi1",    KMI1,           NULL);
-AMBA_DEVICE(uart3,     "fpga:uart3",   PBA8_UART3,     NULL);
+APB_DEVICE(aaci,       "fpga:aaci",    AACI,           NULL);
+APB_DEVICE(mmc0,       "fpga:mmc0",    MMCI0,          &realview_mmc0_plat_data);
+APB_DEVICE(kmi0,       "fpga:kmi0",    KMI0,           NULL);
+APB_DEVICE(kmi1,       "fpga:kmi1",    KMI1,           NULL);
+APB_DEVICE(uart3,      "fpga:uart3",   PBA8_UART3,     NULL);
 
 /* DevChip Primecells */
-AMBA_DEVICE(smc,       "dev:smc",      PBA8_SMC,       NULL);
-AMBA_DEVICE(sctl,      "dev:sctl",     SCTL,           NULL);
-AMBA_DEVICE(wdog,      "dev:wdog",     PBA8_WATCHDOG, NULL);
-AMBA_DEVICE(gpio0,     "dev:gpio0",    PBA8_GPIO0,     &gpio0_plat_data);
-AMBA_DEVICE(gpio1,     "dev:gpio1",    GPIO1,          &gpio1_plat_data);
-AMBA_DEVICE(gpio2,     "dev:gpio2",    GPIO2,          &gpio2_plat_data);
-AMBA_DEVICE(rtc,       "dev:rtc",      PBA8_RTC,       NULL);
-AMBA_DEVICE(sci0,      "dev:sci0",     SCI,            NULL);
-AMBA_DEVICE(uart0,     "dev:uart0",    PBA8_UART0,     NULL);
-AMBA_DEVICE(uart1,     "dev:uart1",    PBA8_UART1,     NULL);
-AMBA_DEVICE(uart2,     "dev:uart2",    PBA8_UART2,     NULL);
-AMBA_DEVICE(ssp0,      "dev:ssp0",     PBA8_SSP,       &ssp0_plat_data);
+AHB_DEVICE(smc,                "dev:smc",      PBA8_SMC,       NULL);
+AHB_DEVICE(sctl,       "dev:sctl",     SCTL,           NULL);
+APB_DEVICE(wdog,       "dev:wdog",     PBA8_WATCHDOG, NULL);
+APB_DEVICE(gpio0,      "dev:gpio0",    PBA8_GPIO0,     &gpio0_plat_data);
+APB_DEVICE(gpio1,      "dev:gpio1",    GPIO1,          &gpio1_plat_data);
+APB_DEVICE(gpio2,      "dev:gpio2",    GPIO2,          &gpio2_plat_data);
+APB_DEVICE(rtc,                "dev:rtc",      PBA8_RTC,       NULL);
+APB_DEVICE(sci0,       "dev:sci0",     SCI,            NULL);
+APB_DEVICE(uart0,      "dev:uart0",    PBA8_UART0,     NULL);
+APB_DEVICE(uart1,      "dev:uart1",    PBA8_UART1,     NULL);
+APB_DEVICE(uart2,      "dev:uart2",    PBA8_UART2,     NULL);
+APB_DEVICE(ssp0,       "dev:ssp0",     PBA8_SSP,       &ssp0_plat_data);
 
 /* Primecells on the NEC ISSP chip */
-AMBA_DEVICE(clcd,      "issp:clcd",    PBA8_CLCD,      &clcd_plat_data);
-AMBA_DEVICE(dmac,      "issp:dmac",    DMAC,           NULL);
+AHB_DEVICE(clcd,       "issp:clcd",    PBA8_CLCD,      &clcd_plat_data);
+AHB_DEVICE(dmac,       "issp:dmac",    DMAC,           NULL);
 
 static struct amba_device *amba_devs[] __initdata = {
        &dmac_device,
index ac715645b8606aeee172fee74ee555823881b009..1cd9956f58751f81c004895d352951b237422574 100644 (file)
@@ -144,52 +144,52 @@ static struct pl022_ssp_controller ssp0_plat_data = {
  * RealView PBXCore AMBA devices
  */
 
-#define GPIO2_IRQ              { IRQ_PBX_GPIO2, NO_IRQ }
-#define GPIO3_IRQ              { IRQ_PBX_GPIO3, NO_IRQ }
-#define AACI_IRQ               { IRQ_PBX_AACI, NO_IRQ }
+#define GPIO2_IRQ              { IRQ_PBX_GPIO2 }
+#define GPIO3_IRQ              { IRQ_PBX_GPIO3 }
+#define AACI_IRQ               { IRQ_PBX_AACI }
 #define MMCI0_IRQ              { IRQ_PBX_MMCI0A, IRQ_PBX_MMCI0B }
-#define KMI0_IRQ               { IRQ_PBX_KMI0, NO_IRQ }
-#define KMI1_IRQ               { IRQ_PBX_KMI1, NO_IRQ }
-#define PBX_SMC_IRQ            { NO_IRQ, NO_IRQ }
-#define MPMC_IRQ               { NO_IRQ, NO_IRQ }
-#define PBX_CLCD_IRQ           { IRQ_PBX_CLCD, NO_IRQ }
-#define DMAC_IRQ               { IRQ_PBX_DMAC, NO_IRQ }
-#define SCTL_IRQ               { NO_IRQ, NO_IRQ }
-#define PBX_WATCHDOG_IRQ       { IRQ_PBX_WATCHDOG, NO_IRQ }
-#define PBX_GPIO0_IRQ          { IRQ_PBX_GPIO0, NO_IRQ }
-#define GPIO1_IRQ              { IRQ_PBX_GPIO1, NO_IRQ }
-#define PBX_RTC_IRQ            { IRQ_PBX_RTC, NO_IRQ }
-#define SCI_IRQ                        { IRQ_PBX_SCI, NO_IRQ }
-#define PBX_UART0_IRQ          { IRQ_PBX_UART0, NO_IRQ }
-#define PBX_UART1_IRQ          { IRQ_PBX_UART1, NO_IRQ }
-#define PBX_UART2_IRQ          { IRQ_PBX_UART2, NO_IRQ }
-#define PBX_UART3_IRQ          { IRQ_PBX_UART3, NO_IRQ }
-#define PBX_SSP_IRQ            { IRQ_PBX_SSP, NO_IRQ }
+#define KMI0_IRQ               { IRQ_PBX_KMI0 }
+#define KMI1_IRQ               { IRQ_PBX_KMI1 }
+#define PBX_SMC_IRQ            { }
+#define MPMC_IRQ               { }
+#define PBX_CLCD_IRQ           { IRQ_PBX_CLCD }
+#define DMAC_IRQ               { IRQ_PBX_DMAC }
+#define SCTL_IRQ               { }
+#define PBX_WATCHDOG_IRQ       { IRQ_PBX_WATCHDOG }
+#define PBX_GPIO0_IRQ          { IRQ_PBX_GPIO0 }
+#define GPIO1_IRQ              { IRQ_PBX_GPIO1 }
+#define PBX_RTC_IRQ            { IRQ_PBX_RTC }
+#define SCI_IRQ                        { IRQ_PBX_SCI }
+#define PBX_UART0_IRQ          { IRQ_PBX_UART0 }
+#define PBX_UART1_IRQ          { IRQ_PBX_UART1 }
+#define PBX_UART2_IRQ          { IRQ_PBX_UART2 }
+#define PBX_UART3_IRQ          { IRQ_PBX_UART3 }
+#define PBX_SSP_IRQ            { IRQ_PBX_SSP }
 
 /* FPGA Primecells */
-AMBA_DEVICE(aaci,      "fpga:aaci",    AACI,           NULL);
-AMBA_DEVICE(mmc0,      "fpga:mmc0",    MMCI0,          &realview_mmc0_plat_data);
-AMBA_DEVICE(kmi0,      "fpga:kmi0",    KMI0,           NULL);
-AMBA_DEVICE(kmi1,      "fpga:kmi1",    KMI1,           NULL);
-AMBA_DEVICE(uart3,     "fpga:uart3",   PBX_UART3,      NULL);
+APB_DEVICE(aaci,       "fpga:aaci",    AACI,           NULL);
+APB_DEVICE(mmc0,       "fpga:mmc0",    MMCI0,          &realview_mmc0_plat_data);
+APB_DEVICE(kmi0,       "fpga:kmi0",    KMI0,           NULL);
+APB_DEVICE(kmi1,       "fpga:kmi1",    KMI1,           NULL);
+APB_DEVICE(uart3,      "fpga:uart3",   PBX_UART3,      NULL);
 
 /* DevChip Primecells */
-AMBA_DEVICE(smc,       "dev:smc",      PBX_SMC,        NULL);
-AMBA_DEVICE(sctl,      "dev:sctl",     SCTL,           NULL);
-AMBA_DEVICE(wdog,      "dev:wdog",     PBX_WATCHDOG,   NULL);
-AMBA_DEVICE(gpio0,     "dev:gpio0",    PBX_GPIO0,      &gpio0_plat_data);
-AMBA_DEVICE(gpio1,     "dev:gpio1",    GPIO1,          &gpio1_plat_data);
-AMBA_DEVICE(gpio2,     "dev:gpio2",    GPIO2,          &gpio2_plat_data);
-AMBA_DEVICE(rtc,       "dev:rtc",      PBX_RTC,        NULL);
-AMBA_DEVICE(sci0,      "dev:sci0",     SCI,            NULL);
-AMBA_DEVICE(uart0,     "dev:uart0",    PBX_UART0,      NULL);
-AMBA_DEVICE(uart1,     "dev:uart1",    PBX_UART1,      NULL);
-AMBA_DEVICE(uart2,     "dev:uart2",    PBX_UART2,      NULL);
-AMBA_DEVICE(ssp0,      "dev:ssp0",     PBX_SSP,        &ssp0_plat_data);
+AHB_DEVICE(smc,        "dev:smc",      PBX_SMC,        NULL);
+AHB_DEVICE(sctl,       "dev:sctl",     SCTL,           NULL);
+APB_DEVICE(wdog,       "dev:wdog",     PBX_WATCHDOG,   NULL);
+APB_DEVICE(gpio0,      "dev:gpio0",    PBX_GPIO0,      &gpio0_plat_data);
+APB_DEVICE(gpio1,      "dev:gpio1",    GPIO1,          &gpio1_plat_data);
+APB_DEVICE(gpio2,      "dev:gpio2",    GPIO2,          &gpio2_plat_data);
+APB_DEVICE(rtc,                "dev:rtc",      PBX_RTC,        NULL);
+APB_DEVICE(sci0,       "dev:sci0",     SCI,            NULL);
+APB_DEVICE(uart0,      "dev:uart0",    PBX_UART0,      NULL);
+APB_DEVICE(uart1,      "dev:uart1",    PBX_UART1,      NULL);
+APB_DEVICE(uart2,      "dev:uart2",    PBX_UART2,      NULL);
+APB_DEVICE(ssp0,       "dev:ssp0",     PBX_SSP,        &ssp0_plat_data);
 
 /* Primecells on the NEC ISSP chip */
-AMBA_DEVICE(clcd,      "issp:clcd",    PBX_CLCD,       &clcd_plat_data);
-AMBA_DEVICE(dmac,      "issp:dmac",    DMAC,           NULL);
+AHB_DEVICE(clcd,       "issp:clcd",    PBX_CLCD,       &clcd_plat_data);
+AHB_DEVICE(dmac,       "issp:dmac",    DMAC,           NULL);
 
 static struct amba_device *amba_devs[] __initdata = {
        &dmac_device,
diff --git a/arch/arm/mach-rpc/include/mach/system.h b/arch/arm/mach-rpc/include/mach/system.h
deleted file mode 100644 (file)
index 359bab9..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- *  arch/arm/mach-rpc/include/mach/system.h
- *
- *  Copyright (C) 1996-1999 Russell King.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
diff --git a/arch/arm/mach-s3c2410/include/mach/system.h b/arch/arm/mach-s3c2410/include/mach/system.h
deleted file mode 100644 (file)
index 5e215c1..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/* arch/arm/mach-s3c2410/include/mach/system.h
- *
- * Copyright (c) 2003 Simtec Electronics
- *     Ben Dooks <ben@simtec.co.uk>
- *
- * S3C2410 - System function defines and includes
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#include <linux/io.h>
-#include <mach/hardware.h>
-
-#include <mach/map.h>
-#include <mach/idle.h>
-
-#include <mach/regs-clock.h>
-
-void (*s3c24xx_idle)(void);
-
-void s3c24xx_default_idle(void)
-{
-       unsigned long tmp;
-       int i;
-
-       /* idle the system by using the idle mode which will wait for an
-        * interrupt to happen before restarting the system.
-        */
-
-       /* Warning: going into idle state upsets jtag scanning */
-
-       __raw_writel(__raw_readl(S3C2410_CLKCON) | S3C2410_CLKCON_IDLE,
-                    S3C2410_CLKCON);
-
-       /* the samsung port seems to do a loop and then unset idle.. */
-       for (i = 0; i < 50; i++) {
-               tmp += __raw_readl(S3C2410_CLKCON); /* ensure loop not optimised out */
-       }
-
-       /* this bit is not cleared on re-start... */
-
-       __raw_writel(__raw_readl(S3C2410_CLKCON) & ~S3C2410_CLKCON_IDLE,
-                    S3C2410_CLKCON);
-}
-
-static void arch_idle(void)
-{
-       if (s3c24xx_idle != NULL)
-               (s3c24xx_idle)();
-       else
-               s3c24xx_default_idle();
-}
index aff6e85a97c65d7ebd5ffd26cace1e863b080cb2..c6eac98710934b23bd7a91a29826f1a600de34d0 100644 (file)
@@ -32,8 +32,6 @@
 #include <asm/proc-fns.h>
 #include <asm/irq.h>
 
-#include <mach/idle.h>
-
 #include <plat/cpu-freq.h>
 
 #include <mach/regs-clock.h>
@@ -164,7 +162,7 @@ void __init s3c2412_map_io(void)
 
        /* set our idle function */
 
-       s3c24xx_idle = s3c2412_idle;
+       arm_pm_idle = s3c2412_idle;
 
        /* register our io-tables */
 
index 5287d2808d3ef1f1c471545cd54b64132b2f1e1f..08bb0355159db059934eac0c57458553ec1e5286 100644 (file)
@@ -44,7 +44,6 @@
 #include <asm/proc-fns.h>
 #include <asm/irq.h>
 
-#include <mach/idle.h>
 #include <mach/regs-s3c2443-clock.h>
 
 #include <plat/gpio-core.h>
@@ -88,8 +87,6 @@ int __init s3c2416_init(void)
 {
        printk(KERN_INFO "S3C2416: Initializing architecture\n");
 
-       /* s3c24xx_idle = s3c2416_idle; */
-
        /* change WDT IRQ number */
        s3c_device_wdt.resource[1].start = IRQ_S3C2443_WDT;
        s3c_device_wdt.resource[1].end   = IRQ_S3C2443_WDT;
index db8a98ac68c54dea4e51e526fa0f7ed809e4e8c7..0c1eb1dfc534ac3d564d660d855d8ab32bea4a73 100644 (file)
@@ -12,6 +12,6 @@
 #ifndef __ARCH_ARM_MACH_S3C2440_COMMON_H
 #define __ARCH_ARM_MACH_S3C2440_COMMON_H
 
-void s3c2440_restart(char mode, const char *cmd);
+void s3c244x_restart(char mode, const char *cmd);
 
 #endif /* __ARCH_ARM_MACH_S3C2440_COMMON_H */
index 24569550de1aa4967d9c2748310496c7425500b6..19b577bc09b80cbc3789c511c9f0c9d19c618c1e 100644 (file)
@@ -487,5 +487,5 @@ MACHINE_START(ANUBIS, "Simtec-Anubis")
        .init_machine   = anubis_init,
        .init_irq       = s3c24xx_init_irq,
        .timer          = &s3c24xx_timer,
-       .restart        = s3c2440_restart,
+       .restart        = s3c244x_restart,
 MACHINE_END
index d6a9763110cdccaa22e543eeea09d1d8faa6a321..d7ae49c90118443cf0cc218f04a687945b6d1ab4 100644 (file)
@@ -222,5 +222,5 @@ MACHINE_START(AT2440EVB, "AT2440EVB")
        .init_machine   = at2440evb_init,
        .init_irq       = s3c24xx_init_irq,
        .timer          = &s3c24xx_timer,
-       .restart        = s3c2440_restart,
+       .restart        = s3c244x_restart,
 MACHINE_END
index 5859e609d28c51382009a01a9ced278054985987..9a4a5bc008e66149433ca0edc9147f14cfdc96f6 100644 (file)
@@ -601,5 +601,5 @@ MACHINE_START(NEO1973_GTA02, "GTA02")
        .init_irq       = s3c24xx_init_irq,
        .init_machine   = gta02_machine_init,
        .timer          = &s3c24xx_timer,
-       .restart        = s3c2440_restart,
+       .restart        = s3c244x_restart,
 MACHINE_END
index adbbb85bc4cdd636f4196c4bf50468a21d7f0974..5d66fb218a41bcb121c5845e201009ffe0a0bbab 100644 (file)
@@ -701,5 +701,5 @@ MACHINE_START(MINI2440, "MINI2440")
        .init_machine   = mini2440_init,
        .init_irq       = s3c24xx_init_irq,
        .timer          = &s3c24xx_timer,
-       .restart        = s3c2440_restart,
+       .restart        = s3c244x_restart,
 MACHINE_END
index 40eaf844bc1f61aa92b4dd33250850025bf380e8..5198e3e1c5bedb1fcf5d60820d6ffd4ef30675a1 100644 (file)
@@ -158,5 +158,5 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440")
        .init_machine   = nexcoder_init,
        .init_irq       = s3c24xx_init_irq,
        .timer          = &s3c24xx_timer,
-       .restart        = s3c2440_restart,
+       .restart        = s3c244x_restart,
 MACHINE_END
index 4c480ef734f64ed97d5a8953f632ceb877464147..c5daeb612a88a35235c0f879e6789e0a94f0c1c1 100644 (file)
@@ -436,5 +436,5 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS")
        .init_irq       = s3c24xx_init_irq,
        .init_machine   = osiris_init,
        .timer          = &s3c24xx_timer,
-       .restart        = s3c2440_restart,
+       .restart        = s3c244x_restart,
 MACHINE_END
index 80077f6472ee7d7d4acfc1084a10ca94a85b0bbf..6f68abf44fab75156f6be5b69f7b32ba07582780 100644 (file)
@@ -822,5 +822,5 @@ MACHINE_START(RX1950, "HP iPAQ RX1950")
        .init_irq = s3c24xx_init_irq,
        .init_machine = rx1950_init_machine,
        .timer = &s3c24xx_timer,
-       .restart        = s3c2440_restart,
+       .restart        = s3c244x_restart,
 MACHINE_END
index 20103bafbd4bfa34b2e6d58e14b0d10d4486b3cd..56af354475984edf7af488359991fb6041baef9b 100644 (file)
@@ -213,5 +213,5 @@ MACHINE_START(RX3715, "IPAQ-RX3715")
        .init_irq       = rx3715_init_irq,
        .init_machine   = rx3715_init_machine,
        .timer          = &s3c24xx_timer,
-       .restart        = s3c2440_restart,
+       .restart        = s3c244x_restart,
 MACHINE_END
index 1deb60d12a60612284c3e1c0e6c141f5509dd9e4..83a1036d7dcbe5a7d329ba1f12856ccf4d657795 100644 (file)
@@ -183,5 +183,5 @@ MACHINE_START(S3C2440, "SMDK2440")
        .map_io         = smdk2440_map_io,
        .init_machine   = smdk2440_machine_init,
        .timer          = &s3c24xx_timer,
-       .restart        = s3c2440_restart,
+       .restart        = s3c244x_restart,
 MACHINE_END
index 517623a09fc5464f9c7209baa7ef3d8e0aa9fcce..2b3dddb49af75939d397d1f395cf2cc068ded504 100644 (file)
@@ -35,7 +35,6 @@
 #include <plat/cpu.h>
 #include <plat/s3c244x.h>
 #include <plat/pm.h>
-#include <plat/watchdog-reset.h>
 
 #include <plat/gpio-core.h>
 #include <plat/gpio-cfg.h>
@@ -74,15 +73,3 @@ void __init s3c2440_map_io(void)
        s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up;
        s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up;
 }
-
-void s3c2440_restart(char mode, const char *cmd)
-{
-       if (mode == 's') {
-               soft_restart(0);
-       }
-
-       arch_wdt_reset();
-
-       /* we'll take a jump through zero as a poor second */
-       soft_restart(0);
-}
index 36bc60f61d0a46b9dfa9d74fd4a91d5be0425485..d15852f642b7db8ca5fe5169a36a02fe29eb067a 100644 (file)
@@ -46,6 +46,7 @@
 #include <plat/pm.h>
 #include <plat/pll.h>
 #include <plat/nand-core.h>
+#include <plat/watchdog-reset.h>
 
 static struct map_desc s3c244x_iodesc[] __initdata = {
        IODESC_ENT(CLKPWR),
@@ -196,3 +197,14 @@ struct syscore_ops s3c244x_pm_syscore_ops = {
        .suspend        = s3c244x_suspend,
        .resume         = s3c244x_resume,
 };
+
+void s3c244x_restart(char mode, const char *cmd)
+{
+       if (mode == 's')
+               soft_restart(0);
+
+       arch_wdt_reset();
+
+       /* we'll take a jump through zero as a poor second */
+       soft_restart(0);
+}
index dd20c66cd700b1a9739509245e92a6f91426a31f..dc451232cf47fbf2e34d59f2f4d4d3d958920dc4 100644 (file)
@@ -296,5 +296,6 @@ config MACH_WLF_CRAGG_6410
        select S3C64XX_DEV_SPI0
        select SAMSUNG_GPIO_EXTRA128
        select I2C
+       select LEDS_GPIO_REGISTER
        help
          Machine support for the Wolfson Cragganmore S3C6410 variant.
diff --git a/arch/arm/mach-s3c64xx/include/mach/system.h b/arch/arm/mach-s3c64xx/include/mach/system.h
deleted file mode 100644 (file)
index 353ed43..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* linux/arch/arm/mach-s3c6400/include/mach/system.h
- *
- * Copyright 2008 Openmoko, Inc.
- * Copyright 2008 Simtec Electronics
- *      Ben Dooks <ben@simtec.co.uk>
- *      http://armlinux.simtec.co.uk/
- *
- * S3C6400 - system implementation
- */
-
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H __FILE__
-
-static void arch_idle(void)
-{
-       /* nothing here yet */
-}
-
-#endif /* __ASM_ARCH_IRQ_H */
index cd3c97e2ee75045afb4a855f7adf03066bca478b..f64c7b91f62eec34bcb3526324de0cde5f2fadf4 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/export.h>
 #include <linux/interrupt.h>
 #include <linux/i2c.h>
+#include <linux/spi/spi.h>
 
 #include <linux/mfd/wm831x/irq.h>
 #include <linux/mfd/wm831x/gpio.h>
 #include <sound/wm8962.h>
 #include <sound/wm9081.h>
 
+#include <plat/s3c64xx-spi.h>
+
 #include <mach/crag6410.h>
 
+static struct s3c64xx_spi_csinfo wm0010_spi_csinfo = {
+       .set_level = gpio_set_value,
+       .line = S3C64XX_GPC(3),
+};
+
+static struct spi_board_info wm1253_devs[] = {
+       [0] = {
+               .modalias       = "wm0010",
+               .bus_num        = 0,
+               .chip_select    = 0,
+               .mode           = SPI_MODE_0,
+               .controller_data = &wm0010_spi_csinfo,
+       },
+};
+
 static struct wm5100_pdata wm5100_pdata = {
        .ldo_ena = S3C64XX_GPN(7),
        .irq_flags = IRQF_TRIGGER_HIGH,
@@ -158,14 +176,21 @@ static __devinitdata const struct {
        const char *name;
        const struct i2c_board_info *i2c_devs;
        int num_i2c_devs;
+       const struct spi_board_info *spi_devs;
+       int num_spi_devs;
 } gf_mods[] = {
        { .id = 0x01, .name = "1250-EV1 Springbank" },
        { .id = 0x02, .name = "1251-EV1 Jura" },
        { .id = 0x03, .name = "1252-EV1 Glenlivet" },
        { .id = 0x11, .name = "6249-EV2 Glenfarclas", },
+       { .id = 0x14, .name = "6271-EV1 Lochnagar" },
+       { .id = 0x15, .name = "XXXX-EV1 Bells" },
        { .id = 0x21, .name = "1275-EV1 Mortlach" },
        { .id = 0x25, .name = "1274-EV1 Glencadam" },
-       { .id = 0x31, .name = "1253-EV1 Tomatin", },
+       { .id = 0x31, .name = "1253-EV1 Tomatin",
+         .spi_devs = wm1253_devs, .num_spi_devs = ARRAY_SIZE(wm1253_devs) },
+       { .id = 0x32, .name = "XXXX-EV1 Caol Illa" },
+       { .id = 0x33, .name = "XXXX-EV1 Oban" },
        { .id = 0x39, .name = "1254-EV1 Dallas Dhu",
          .i2c_devs = wm1254_devs, .num_i2c_devs = ARRAY_SIZE(wm1254_devs) },
        { .id = 0x3a, .name = "1259-EV1 Tobermory",
@@ -197,12 +222,16 @@ static __devinit int wlf_gf_module_probe(struct i2c_client *i2c,
        if (i < ARRAY_SIZE(gf_mods)) {
                dev_info(&i2c->dev, "%s revision %d\n",
                         gf_mods[i].name, rev + 1);
+
                for (j = 0; j < gf_mods[i].num_i2c_devs; j++) {
                        if (!i2c_new_device(i2c->adapter,
                                            &(gf_mods[i].i2c_devs[j])))
                                dev_err(&i2c->dev,
                                        "Failed to register dev: %d\n", ret);
                }
+
+               spi_register_board_info(gf_mods[i].spi_devs,
+                                       gf_mods[i].num_spi_devs);
        } else {
                dev_warn(&i2c->dev, "Unknown module ID 0x%x revision %d\n",
                         id, rev + 1);
index 8077f650eb0e6c291ac607aff70a02b35dfa62b8..e991127fda03a279ed4357917ddb816886957977 100644 (file)
@@ -19,7 +19,9 @@
 #include <linux/io.h>
 #include <linux/init.h>
 #include <linux/gpio.h>
+#include <linux/leds.h>
 #include <linux/delay.h>
+#include <linux/mmc/host.h>
 #include <linux/regulator/machine.h>
 #include <linux/regulator/fixed.h>
 #include <linux/pwm_backlight.h>
@@ -298,6 +300,7 @@ static struct platform_device littlemill_device = {
 };
 
 static struct regulator_consumer_supply wallvdd_consumers[] = {
+       REGULATOR_SUPPLY("SPKVDD", "1-001a"),
        REGULATOR_SUPPLY("SPKVDD1", "1-001a"),
        REGULATOR_SUPPLY("SPKVDD2", "1-001a"),
        REGULATOR_SUPPLY("SPKVDDL", "1-001a"),
@@ -574,11 +577,19 @@ static struct s3c2410_platform_i2c i2c0_pdata = {
        .frequency = 400000,
 };
 
+static struct regulator_consumer_supply pvdd_1v2_consumers[] __initdata = {
+       REGULATOR_SUPPLY("DCVDD", "spi0.0"),
+       REGULATOR_SUPPLY("AVDD", "spi0.0"),
+};
+
 static struct regulator_init_data pvdd_1v2 __initdata = {
        .constraints = {
                .name = "PVDD_1V2",
-               .always_on = 1,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
        },
+
+       .consumer_supplies = pvdd_1v2_consumers,
+       .num_consumer_supplies = ARRAY_SIZE(pvdd_1v2_consumers),
 };
 
 static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = {
@@ -592,6 +603,7 @@ static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = {
        REGULATOR_SUPPLY("AVDD2", "1-001a"),
        REGULATOR_SUPPLY("DCVDD", "1-001a"),
        REGULATOR_SUPPLY("AVDD", "1-001a"),
+       REGULATOR_SUPPLY("DBVDD", "spi0.0"),
 };
 
 static struct regulator_init_data pvdd_1v8 __initdata = {
@@ -681,6 +693,7 @@ static void __init crag6410_map_io(void)
 static struct s3c_sdhci_platdata crag6410_hsmmc2_pdata = {
        .max_width              = 4,
        .cd_type                = S3C_SDHCI_CD_PERMANENT,
+       .host_caps              = MMC_CAP_POWER_OFF_CARD,
 };
 
 static void crag6410_cfg_sdhci0(struct platform_device *dev, int width)
@@ -696,6 +709,55 @@ static struct s3c_sdhci_platdata crag6410_hsmmc0_pdata = {
        .max_width              = 4,
        .cd_type                = S3C_SDHCI_CD_INTERNAL,
        .cfg_gpio               = crag6410_cfg_sdhci0,
+       .host_caps              = MMC_CAP_POWER_OFF_CARD,
+};
+
+static const struct gpio_led gpio_leds[] = {
+       {
+               .name = "d13:green:",
+               .gpio = MMGPIO_GPIO_BASE + 0,
+               .default_state = LEDS_GPIO_DEFSTATE_ON,
+       },
+       {
+               .name = "d14:green:",
+               .gpio = MMGPIO_GPIO_BASE + 1,
+               .default_state = LEDS_GPIO_DEFSTATE_ON,
+       },
+       {
+               .name = "d15:green:",
+               .gpio = MMGPIO_GPIO_BASE + 2,
+               .default_state = LEDS_GPIO_DEFSTATE_ON,
+       },
+       {
+               .name = "d16:green:",
+               .gpio = MMGPIO_GPIO_BASE + 3,
+               .default_state = LEDS_GPIO_DEFSTATE_ON,
+       },
+       {
+               .name = "d17:green:",
+               .gpio = MMGPIO_GPIO_BASE + 4,
+               .default_state = LEDS_GPIO_DEFSTATE_ON,
+       },
+       {
+               .name = "d18:green:",
+               .gpio = MMGPIO_GPIO_BASE + 5,
+               .default_state = LEDS_GPIO_DEFSTATE_ON,
+       },
+       {
+               .name = "d19:green:",
+               .gpio = MMGPIO_GPIO_BASE + 6,
+               .default_state = LEDS_GPIO_DEFSTATE_ON,
+       },
+       {
+               .name = "d20:green:",
+               .gpio = MMGPIO_GPIO_BASE + 7,
+               .default_state = LEDS_GPIO_DEFSTATE_ON,
+       },
+};
+
+static const struct gpio_led_platform_data gpio_leds_pdata = {
+       .leds = gpio_leds,
+       .num_leds = ARRAY_SIZE(gpio_leds),
 };
 
 static void __init crag6410_machine_init(void)
@@ -727,9 +789,12 @@ static void __init crag6410_machine_init(void)
        i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
 
        samsung_keypad_set_platdata(&crag6410_keypad_data);
+       s3c64xx_spi0_set_platdata(&s3c64xx_spi0_pdata, 0, 1);
 
        platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices));
 
+       gpio_led_register_device(-1, &gpio_leds_pdata);
+
        regulator_has_full_constraints();
 
        s3c64xx_pm_init();
index 52b89a376447b5d74a3fe52a2c7bf6a918802092..9143f8b19962c315b8d7e2ac6395fbe660bfb7e6 100644 (file)
@@ -146,15 +146,12 @@ static void s5p64x0_idle(void)
 {
        unsigned long val;
 
-       if (!need_resched()) {
-               val = __raw_readl(S5P64X0_PWR_CFG);
-               val &= ~(0x3 << 5);
-               val |= (0x1 << 5);
-               __raw_writel(val, S5P64X0_PWR_CFG);
+       val = __raw_readl(S5P64X0_PWR_CFG);
+       val &= ~(0x3 << 5);
+       val |= (0x1 << 5);
+       __raw_writel(val, S5P64X0_PWR_CFG);
 
-               cpu_do_idle();
-       }
-       local_irq_enable();
+       cpu_do_idle();
 }
 
 /*
@@ -286,7 +283,7 @@ int __init s5p64x0_init(void)
        printk(KERN_INFO "S5P64X0(S5P6440/S5P6450): Initializing architecture\n");
 
        /* set idle function */
-       pm_idle = s5p64x0_idle;
+       arm_pm_idle = s5p64x0_idle;
 
        return device_register(&s5p64x0_dev);
 }
index f820c07444054c7d1698e22160e0cf77fddc1fc4..f7f68ad77910662e494904d2f40db60b228b83a7 100644 (file)
@@ -108,34 +108,22 @@ struct dma_pl330_platdata s5p6450_pdma_pdata = {
        .peri_id = s5p6450_pdma_peri,
 };
 
-struct amba_device s5p64x0_device_pdma = {
-       .dev = {
-               .init_name = "dma-pl330",
-               .dma_mask = &dma_dmamask,
-               .coherent_dma_mask = DMA_BIT_MASK(32),
-       },
-       .res = {
-               .start = S5P64X0_PA_PDMA,
-               .end = S5P64X0_PA_PDMA + SZ_4K,
-               .flags = IORESOURCE_MEM,
-       },
-       .irq = {IRQ_DMA0, NO_IRQ},
-       .periphid = 0x00041330,
-};
+AMBA_AHB_DEVICE(s5p64x0_pdma, "dma-pl330", 0x00041330, S5P64X0_PA_PDMA,
+       {IRQ_DMA0}, NULL);
 
 static int __init s5p64x0_dma_init(void)
 {
        if (soc_is_s5p6450()) {
                dma_cap_set(DMA_SLAVE, s5p6450_pdma_pdata.cap_mask);
                dma_cap_set(DMA_CYCLIC, s5p6450_pdma_pdata.cap_mask);
-               s5p64x0_device_pdma.dev.platform_data = &s5p6450_pdma_pdata;
+               s5p64x0_pdma_device.dev.platform_data = &s5p6450_pdma_pdata;
        } else {
                dma_cap_set(DMA_SLAVE, s5p6440_pdma_pdata.cap_mask);
                dma_cap_set(DMA_CYCLIC, s5p6440_pdma_pdata.cap_mask);
-               s5p64x0_device_pdma.dev.platform_data = &s5p6440_pdma_pdata;
+               s5p64x0_pdma_device.dev.platform_data = &s5p6440_pdma_pdata;
        }
 
-       amba_device_register(&s5p64x0_device_pdma, &iomem_resource);
+       amba_device_register(&s5p64x0_pdma_device, &iomem_resource);
 
        return 0;
 }
diff --git a/arch/arm/mach-s5p64x0/include/mach/system.h b/arch/arm/mach-s5p64x0/include/mach/system.h
deleted file mode 100644 (file)
index cf26e09..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/* linux/arch/arm/mach-s5p64x0/include/mach/system.h
- *
- * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
- *             http://www.samsung.com
- *
- * S5P64X0 - system support header
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H __FILE__
-
-static void arch_idle(void)
-{
-       /* nothing here yet */
-}
-
-#endif /* __ASM_ARCH_SYSTEM_H */
index c9095730a7f58ec31f4cf34ee3863f32a848dd6a..ff71e2d467c606375a23e63e38c61f088a8f68d3 100644 (file)
@@ -129,14 +129,6 @@ static struct map_desc s5pc100_iodesc[] __initdata = {
        }
 };
 
-static void s5pc100_idle(void)
-{
-       if (!need_resched())
-               cpu_do_idle();
-
-       local_irq_enable();
-}
-
 /*
  * s5pc100_map_io
  *
@@ -210,10 +202,6 @@ core_initcall(s5pc100_core_init);
 int __init s5pc100_init(void)
 {
        printk(KERN_INFO "S5PC100: Initializing architecture\n");
-
-       /* set idle function */
-       pm_idle = s5pc100_idle;
-
        return device_register(&s5pc100_dev);
 }
 
index c841f4d313f2ac898f9c1a6c1e319a68c9f687ec..96b1ab3dcd48365237520e27697897b3e683c890 100644 (file)
@@ -73,21 +73,8 @@ struct dma_pl330_platdata s5pc100_pdma0_pdata = {
        .peri_id = pdma0_peri,
 };
 
-struct amba_device s5pc100_device_pdma0 = {
-       .dev = {
-               .init_name = "dma-pl330.0",
-               .dma_mask = &dma_dmamask,
-               .coherent_dma_mask = DMA_BIT_MASK(32),
-               .platform_data = &s5pc100_pdma0_pdata,
-       },
-       .res = {
-               .start = S5PC100_PA_PDMA0,
-               .end = S5PC100_PA_PDMA0 + SZ_4K,
-               .flags = IORESOURCE_MEM,
-       },
-       .irq = {IRQ_PDMA0, NO_IRQ},
-       .periphid = 0x00041330,
-};
+AMBA_AHB_DEVICE(s5pc100_pdma0,  "dma-pl330.0", 0x00041330, S5PC100_PA_PDMA0,
+       {IRQ_PDMA0}, &s5pc100_pdma0_pdata);
 
 u8 pdma1_peri[] = {
        DMACH_UART0_RX,
@@ -127,31 +114,18 @@ struct dma_pl330_platdata s5pc100_pdma1_pdata = {
        .peri_id = pdma1_peri,
 };
 
-struct amba_device s5pc100_device_pdma1 = {
-       .dev = {
-               .init_name = "dma-pl330.1",
-               .dma_mask = &dma_dmamask,
-               .coherent_dma_mask = DMA_BIT_MASK(32),
-               .platform_data = &s5pc100_pdma1_pdata,
-       },
-       .res = {
-               .start = S5PC100_PA_PDMA1,
-               .end = S5PC100_PA_PDMA1 + SZ_4K,
-               .flags = IORESOURCE_MEM,
-       },
-       .irq = {IRQ_PDMA1, NO_IRQ},
-       .periphid = 0x00041330,
-};
+AMBA_AHB_DEVICE(s5pc100_pdma1, "dma-pl330.1", 0x00041330, S5PC100_PA_PDMA1,
+       {IRQ_PDMA1}, &s5pc100_pdma1_pdata);
 
 static int __init s5pc100_dma_init(void)
 {
        dma_cap_set(DMA_SLAVE, s5pc100_pdma0_pdata.cap_mask);
        dma_cap_set(DMA_CYCLIC, s5pc100_pdma0_pdata.cap_mask);
-       amba_device_register(&s5pc100_device_pdma0, &iomem_resource);
+       amba_device_register(&s5pc100_pdma0_device, &iomem_resource);
 
        dma_cap_set(DMA_SLAVE, s5pc100_pdma1_pdata.cap_mask);
        dma_cap_set(DMA_CYCLIC, s5pc100_pdma1_pdata.cap_mask);
-       amba_device_register(&s5pc100_device_pdma1, &iomem_resource);
+       amba_device_register(&s5pc100_pdma1_device, &iomem_resource);
 
        return 0;
 }
diff --git a/arch/arm/mach-s5pc100/include/mach/system.h b/arch/arm/mach-s5pc100/include/mach/system.h
deleted file mode 100644 (file)
index afc96c2..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* linux/arch/arm/mach-s5pc100/include/mach/system.h
- *
- * Copyright 2009 Samsung Electronics Co.
- *      Byungho Min <bhmin@samsung.com>
- *
- * S5PC100 - system implementation
- *
- * Based on mach-s3c6400/include/mach/system.h
- */
-
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H __FILE__
-
-static void arch_idle(void)
-{
-       /* nothing here yet */
-}
-
-#endif /* __ASM_ARCH_IRQ_H */
index 2cdc42e838b8deb663395966096f0f7b9ca6dd4b..4c4ca1ade86e5bb7d4920539b8360cf1f08ba129 100644 (file)
@@ -118,6 +118,10 @@ config MACH_SMDKC110
        select S3C_DEV_I2C2
        select S3C_DEV_RTC
        select S3C_DEV_WDT
+       select S5P_DEV_FIMC0
+       select S5P_DEV_FIMC1
+       select S5P_DEV_FIMC2
+       select S5P_DEV_MFC
        select SAMSUNG_DEV_IDE
        select S5PV210_SETUP_I2C1
        select S5PV210_SETUP_I2C2
@@ -142,6 +146,11 @@ config MACH_SMDKV210
        select S3C_DEV_I2C2
        select S3C_DEV_RTC
        select S3C_DEV_WDT
+       select S5P_DEV_FIMC0
+       select S5P_DEV_FIMC1
+       select S5P_DEV_FIMC2
+       select S5P_DEV_JPEG
+       select S5P_DEV_MFC
        select SAMSUNG_DEV_ADC
        select SAMSUNG_DEV_BACKLIGHT
        select SAMSUNG_DEV_IDE
index b9ec0c35379f572ebf63fc9dd4d2af97c5a0d377..09609d50961d491c09f0f2e8926453e3db7cd0ce 100644 (file)
@@ -339,6 +339,11 @@ static struct clk init_clocks_off[] = {
                .parent         = &clk_hclk_dsys.clk,
                .enable         = s5pv210_clk_ip0_ctrl,
                .ctrlbit        = (1 << 26),
+       }, {
+               .name           = "jpeg",
+               .parent         = &clk_hclk_dsys.clk,
+               .enable         = s5pv210_clk_ip0_ctrl,
+               .ctrlbit        = (1 << 28),
        }, {
                .name           = "mfc",
                .devname        = "s5p-mfc",
index 9c1bcdcc12c3bfd8e479f21fe66b2d393be49616..4c9e9027df9aed2cbd0314ec1cebc0d80a1d3530 100644 (file)
@@ -142,14 +142,6 @@ static struct map_desc s5pv210_iodesc[] __initdata = {
        }
 };
 
-static void s5pv210_idle(void)
-{
-       if (!need_resched())
-               cpu_do_idle();
-
-       local_irq_enable();
-}
-
 void s5pv210_restart(char mode, const char *cmd)
 {
        __raw_writel(0x1, S5P_SWRESET);
@@ -247,10 +239,6 @@ core_initcall(s5pv210_core_init);
 int __init s5pv210_init(void)
 {
        printk(KERN_INFO "S5PV210: Initializing architecture\n");
-
-       /* set idle function */
-       pm_idle = s5pv210_idle;
-
        return device_register(&s5pv210_dev);
 }
 
index a6113e0267f2e720027b1c2bb64f0ccd8e6298cc..f6885d247d143ac6ae34d58b5796970cd04fd9e5 100644 (file)
@@ -71,21 +71,8 @@ struct dma_pl330_platdata s5pv210_pdma0_pdata = {
        .peri_id = pdma0_peri,
 };
 
-struct amba_device s5pv210_device_pdma0 = {
-       .dev = {
-               .init_name = "dma-pl330.0",
-               .dma_mask = &dma_dmamask,
-               .coherent_dma_mask = DMA_BIT_MASK(32),
-               .platform_data = &s5pv210_pdma0_pdata,
-       },
-       .res = {
-               .start = S5PV210_PA_PDMA0,
-               .end = S5PV210_PA_PDMA0 + SZ_4K,
-               .flags = IORESOURCE_MEM,
-       },
-       .irq = {IRQ_PDMA0, NO_IRQ},
-       .periphid = 0x00041330,
-};
+AMBA_AHB_DEVICE(s5pv210_pdma0, "dma-pl330.0", 0x00041330, S5PV210_PA_PDMA0,
+       {IRQ_PDMA0}, &s5pv210_pdma0_pdata);
 
 u8 pdma1_peri[] = {
        DMACH_UART0_RX,
@@ -127,31 +114,18 @@ struct dma_pl330_platdata s5pv210_pdma1_pdata = {
        .peri_id = pdma1_peri,
 };
 
-struct amba_device s5pv210_device_pdma1 = {
-       .dev = {
-               .init_name = "dma-pl330.1",
-               .dma_mask = &dma_dmamask,
-               .coherent_dma_mask = DMA_BIT_MASK(32),
-               .platform_data = &s5pv210_pdma1_pdata,
-       },
-       .res = {
-               .start = S5PV210_PA_PDMA1,
-               .end = S5PV210_PA_PDMA1 + SZ_4K,
-               .flags = IORESOURCE_MEM,
-       },
-       .irq = {IRQ_PDMA1, NO_IRQ},
-       .periphid = 0x00041330,
-};
+AMBA_AHB_DEVICE(s5pv210_pdma1, "dma-pl330.1", 0x00041330, S5PV210_PA_PDMA1,
+       {IRQ_PDMA1}, &s5pv210_pdma1_pdata);
 
 static int __init s5pv210_dma_init(void)
 {
        dma_cap_set(DMA_SLAVE, s5pv210_pdma0_pdata.cap_mask);
        dma_cap_set(DMA_CYCLIC, s5pv210_pdma0_pdata.cap_mask);
-       amba_device_register(&s5pv210_device_pdma0, &iomem_resource);
+       amba_device_register(&s5pv210_pdma0_device, &iomem_resource);
 
        dma_cap_set(DMA_SLAVE, s5pv210_pdma1_pdata.cap_mask);
        dma_cap_set(DMA_CYCLIC, s5pv210_pdma1_pdata.cap_mask);
-       amba_device_register(&s5pv210_device_pdma1, &iomem_resource);
+       amba_device_register(&s5pv210_pdma1_device, &iomem_resource);
 
        return 0;
 }
index 89c34b8f73bfb24e9b6225f70cf07509cf32a116..b7c8a1917ffce5a4cff50beac3573ce88b9c782a 100644 (file)
@@ -90,6 +90,8 @@
 #define S5PV210_PA_FIMC1               0xFB300000
 #define S5PV210_PA_FIMC2               0xFB400000
 
+#define S5PV210_PA_JPEG                        0xFB600000
+
 #define S5PV210_PA_SDO                 0xF9000000
 #define S5PV210_PA_VP                  0xF9100000
 #define S5PV210_PA_MIXER               0xF9200000
 #define S5P_PA_SYSCON                  S5PV210_PA_SYSCON
 #define S5P_PA_TIMER                   S5PV210_PA_TIMER
 
+#define S5P_PA_JPEG                    S5PV210_PA_JPEG
+
 #define SAMSUNG_PA_ADC                 S5PV210_PA_ADC
 #define SAMSUNG_PA_CFCON               S5PV210_PA_CFCON
 #define SAMSUNG_PA_KEYPAD              S5PV210_PA_KEYPAD
diff --git a/arch/arm/mach-s5pv210/include/mach/system.h b/arch/arm/mach-s5pv210/include/mach/system.h
deleted file mode 100644 (file)
index bf288ce..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/* linux/arch/arm/mach-s5pv210/include/mach/system.h
- *
- * Copyright (c) 2010 Samsung Electronics Co., Ltd.
- *             http://www.samsung.com/
- *
- * S5PV210 - system support header
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H __FILE__
-
-static void arch_idle(void)
-{
-       /* nothing here yet */
-}
-
-#endif /* __ASM_ARCH_SYSTEM_H */
index 5e734d025a6a2c0926a292e2ce2f0f400f866e67..a9ea64e0da0d2758e7775a8590d431fc5725d563 100644 (file)
@@ -616,6 +616,7 @@ static struct platform_device *aquila_devices[] __initdata = {
        &s5p_device_fimc0,
        &s5p_device_fimc1,
        &s5p_device_fimc2,
+       &s5p_device_fimc_md,
        &s5pv210_device_iis0,
        &wm8994_fixed_voltage0,
        &wm8994_fixed_voltage1,
index b323983b2c544d648a9e8142e5d35fee019b05a9..dfc29236321ca1c48b65412d413c62dd9199a96f 100644 (file)
@@ -31,6 +31,7 @@
 #include <plat/iic.h>
 #include <plat/pm.h>
 #include <plat/s5p-time.h>
+#include <plat/mfc.h>
 
 #include "common.h"
 
@@ -94,6 +95,13 @@ static struct platform_device *smdkc110_devices[] __initdata = {
        &s3c_device_i2c2,
        &s3c_device_rtc,
        &s3c_device_wdt,
+       &s5p_device_fimc0,
+       &s5p_device_fimc1,
+       &s5p_device_fimc2,
+       &s5p_device_fimc_md,
+       &s5p_device_mfc,
+       &s5p_device_mfc_l,
+       &s5p_device_mfc_r,
 };
 
 static struct i2c_board_info smdkc110_i2c_devs0[] __initdata = {
@@ -117,6 +125,11 @@ static void __init smdkc110_map_io(void)
        s5p_set_timer_source(S5P_PWM3, S5P_PWM4);
 }
 
+static void __init smdkc110_reserve(void)
+{
+       s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
+}
+
 static void __init smdkc110_machine_init(void)
 {
        s3c_pm_init();
@@ -145,4 +158,5 @@ MACHINE_START(SMDKC110, "SMDKC110")
        .init_machine   = smdkc110_machine_init,
        .timer          = &s5p_timer,
        .restart        = s5pv210_restart,
+       .reserve        = &smdkc110_reserve,
 MACHINE_END
index dff9ea7b5bba1be2e729fd47f32f179414331f30..b6c79f07d29f2c2a7419fe3bfb718aa49f2818a3 100644 (file)
@@ -46,6 +46,7 @@
 #include <plat/s5p-time.h>
 #include <plat/backlight.h>
 #include <plat/regs-fb-v4.h>
+#include <plat/mfc.h>
 
 #include "common.h"
 
@@ -223,6 +224,14 @@ static struct platform_device *smdkv210_devices[] __initdata = {
        &s3c_device_rtc,
        &s3c_device_ts,
        &s3c_device_wdt,
+       &s5p_device_fimc0,
+       &s5p_device_fimc1,
+       &s5p_device_fimc2,
+       &s5p_device_fimc_md,
+       &s5p_device_jpeg,
+       &s5p_device_mfc,
+       &s5p_device_mfc_l,
+       &s5p_device_mfc_r,
        &s5pv210_device_ac97,
        &s5pv210_device_iis0,
        &s5pv210_device_spdif,
@@ -282,6 +291,11 @@ static void __init smdkv210_map_io(void)
        s5p_set_timer_source(S5P_PWM2, S5P_PWM4);
 }
 
+static void __init smdkv210_reserve(void)
+{
+       s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
+}
+
 static void __init smdkv210_machine_init(void)
 {
        s3c_pm_init();
@@ -319,4 +333,5 @@ MACHINE_START(SMDKV210, "SMDKV210")
        .init_machine   = smdkv210_machine_init,
        .timer          = &s5p_timer,
        .restart        = s5pv210_restart,
+       .reserve        = &smdkv210_reserve,
 MACHINE_END
diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-sa1100/include/mach/system.h
deleted file mode 100644 (file)
index e17b208..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * arch/arm/mach-sa1100/include/mach/system.h
- *
- * Copyright (c) 1999 Nicolas Pitre <nico@fluxnic.net>
- */
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
index a851c254ad6c8a79bc00204063021c1bcba2e118..6a2a7f2c255708e80d909c7026e15413a797eba4 100644 (file)
@@ -149,10 +149,16 @@ static struct sys_timer shark_timer = {
        .init           = shark_timer_init,
 };
 
+static void shark_init_early(void)
+{
+       disable_hlt();
+}
+
 MACHINE_START(SHARK, "Shark")
        /* Maintainer: Alexander Schulz */
        .atag_offset    = 0x3000,
        .map_io         = shark_map_io,
+       .init_early     = shark_init_early,
        .init_irq       = shark_init_irq,
        .timer          = &shark_timer,
        .dma_zone_size  = SZ_4M,
diff --git a/arch/arm/mach-shark/include/mach/system.h b/arch/arm/mach-shark/include/mach/system.h
deleted file mode 100644 (file)
index 1b2f2c5..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/system.h
- *
- * by Alexander Schulz
- */
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-}
-
-#endif
index 956ac18ddbf9c58931503e9d0f5410179d3c81cd..3bbcb3fa077566113cc23c23ad5f9bd1837cf8ca 100644 (file)
@@ -1,11 +1,6 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
 static inline void arch_reset(char mode, const char *cmd)
 {
        soft_restart(0);
diff --git a/arch/arm/mach-spear3xx/include/mach/system.h b/arch/arm/mach-spear3xx/include/mach/system.h
deleted file mode 100644 (file)
index 92cee63..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-spear3xx/include/mach/system.h
- *
- * SPEAr3xx Machine family specific architecture functions
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar<viresh.kumar@st.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_SYSTEM_H
-#define __MACH_SYSTEM_H
-
-#include <plat/system.h>
-
-#endif /* __MACH_SYSTEM_H */
index a5e46b4ade206cbc4897bbe68336dd9d3524dada..9da50e281e987a0e96bf9579aecf702baaf8103d 100644 (file)
@@ -430,18 +430,8 @@ static struct pl061_platform_data gpio1_plat_data = {
        .irq_base       = SPEAR300_GPIO1_INT_BASE,
 };
 
-struct amba_device spear300_gpio1_device = {
-       .dev = {
-               .init_name = "gpio1",
-               .platform_data = &gpio1_plat_data,
-       },
-       .res = {
-               .start = SPEAR300_GPIO_BASE,
-               .end = SPEAR300_GPIO_BASE + SZ_4K - 1,
-               .flags = IORESOURCE_MEM,
-       },
-       .irq = {SPEAR300_VIRQ_GPIO1, NO_IRQ},
-};
+AMBA_APB_DEVICE(spear300_gpio1, "gpio1", 0, SPEAR300_GPIO_BASE,
+       {SPEAR300_VIRQ_GPIO1}, &gpio1_plat_data);
 
 /* spear300 routines */
 void __init spear300_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs,
index 10af45da86a0d06bb91717465d6fe40a10b1fd4b..b1733c37f209d2f1d96f482d8aa2b9a2e5c3c397 100644 (file)
@@ -28,31 +28,12 @@ static struct pl061_platform_data gpio_plat_data = {
        .irq_base       = SPEAR3XX_GPIO_INT_BASE,
 };
 
-struct amba_device spear3xx_gpio_device = {
-       .dev = {
-               .init_name = "gpio",
-               .platform_data = &gpio_plat_data,
-       },
-       .res = {
-               .start = SPEAR3XX_ICM3_GPIO_BASE,
-               .end = SPEAR3XX_ICM3_GPIO_BASE + SZ_4K - 1,
-               .flags = IORESOURCE_MEM,
-       },
-       .irq = {SPEAR3XX_IRQ_BASIC_GPIO, NO_IRQ},
-};
+AMBA_APB_DEVICE(spear3xx_gpio, "gpio", 0, SPEAR3XX_ICM3_GPIO_BASE,
+       {SPEAR3XX_IRQ_BASIC_GPIO}, &gpio_plat_data);
 
 /* uart device registration */
-struct amba_device spear3xx_uart_device = {
-       .dev = {
-               .init_name = "uart",
-       },
-       .res = {
-               .start = SPEAR3XX_ICM1_UART_BASE,
-               .end = SPEAR3XX_ICM1_UART_BASE + SZ_4K - 1,
-               .flags = IORESOURCE_MEM,
-       },
-       .irq = {SPEAR3XX_IRQ_UART, NO_IRQ},
-};
+AMBA_APB_DEVICE(spear3xx_uart, "uart", 0, SPEAR3XX_ICM1_UART_BASE,
+       {SPEAR3XX_IRQ_UART}, NULL);
 
 /* Do spear3xx familiy common initialization part here */
 void __init spear3xx_init(void)
diff --git a/arch/arm/mach-spear6xx/include/mach/system.h b/arch/arm/mach-spear6xx/include/mach/system.h
deleted file mode 100644 (file)
index 0b1d2be..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-spear6xx/include/mach/system.h
- *
- * SPEAr6xx Machine family specific architecture functions
- *
- * Copyright (C) 2009 ST Microelectronics
- * Rajeev Kumar<rajeev-dlh.kumar@st.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_SYSTEM_H
-#define __MACH_SYSTEM_H
-
-#include <plat/system.h>
-
-#endif /* __MACH_SYSTEM_H */
index e0f6628c8b2c878155fc311acad938b15a3d56d4..b997b1b10ba0bd6fa63c378677138ab01a722cbd 100644 (file)
@@ -34,7 +34,7 @@ struct amba_device uart_device[] = {
                        .end = SPEAR6XX_ICM1_UART0_BASE + SZ_4K - 1,
                        .flags = IORESOURCE_MEM,
                },
-               .irq = {IRQ_UART_0, NO_IRQ},
+               .irq = {IRQ_UART_0},
        }, {
                .dev = {
                        .init_name = "uart1",
@@ -44,7 +44,7 @@ struct amba_device uart_device[] = {
                        .end = SPEAR6XX_ICM1_UART1_BASE + SZ_4K - 1,
                        .flags = IORESOURCE_MEM,
                },
-               .irq = {IRQ_UART_1, NO_IRQ},
+               .irq = {IRQ_UART_1},
        }
 };
 
@@ -73,7 +73,7 @@ struct amba_device gpio_device[] = {
                        .end = SPEAR6XX_CPU_GPIO_BASE + SZ_4K - 1,
                        .flags = IORESOURCE_MEM,
                },
-               .irq = {IRQ_LOCAL_GPIO, NO_IRQ},
+               .irq = {IRQ_LOCAL_GPIO},
        }, {
                .dev = {
                        .init_name = "gpio1",
@@ -84,7 +84,7 @@ struct amba_device gpio_device[] = {
                        .end = SPEAR6XX_ICM3_GPIO_BASE + SZ_4K - 1,
                        .flags = IORESOURCE_MEM,
                },
-               .irq = {IRQ_BASIC_GPIO, NO_IRQ},
+               .irq = {IRQ_BASIC_GPIO},
        }, {
                .dev = {
                        .init_name = "gpio2",
@@ -95,7 +95,7 @@ struct amba_device gpio_device[] = {
                        .end = SPEAR6XX_ICM2_GPIO_BASE + SZ_4K - 1,
                        .flags = IORESOURCE_MEM,
                },
-               .irq = {IRQ_APPL_GPIO, NO_IRQ},
+               .irq = {IRQ_APPL_GPIO},
        }
 };
 
index 7a95e0bc4abaab251fb77cf1b21e09e94a04bdd6..e20b419d598342f55453f3526969e34120728517 100644 (file)
@@ -131,11 +131,7 @@ static void __init tegra_dt_init(void)
 }
 
 static const char *tegra20_dt_board_compat[] = {
-       "compulab,trimslice",
-       "nvidia,harmony",
-       "compal,paz00",
-       "nvidia,seaboard",
-       "nvidia,ventana",
+       "nvidia,tegra20",
        NULL
 };
 
index 3c197e2440b773f90f51f573e75d641dfe828862..6db4df28e6cd9f8db15289cd008210c0ab49346b 100644 (file)
@@ -47,7 +47,7 @@ static void __init tegra30_dt_init(void)
 }
 
 static const char *tegra30_dt_board_compat[] = {
-       "nvidia,cardhu",
+       "nvidia,tegra30",
        NULL
 };
 
index 21d1285731b39a3e1cd71aa1a6367d72e3478b25..c0298b3f7d63d32ce4b776c46747943e14e4f4f1 100644 (file)
@@ -36,13 +36,14 @@ static struct regulator_consumer_supply tps658621_ldo0_supply[] = {
 
 static struct regulator_init_data ldo0_data = {
        .constraints = {
-               .min_uV = 1250 * 1000,
+               .min_uV = 3300 * 1000,
                .max_uV = 3300 * 1000,
                .valid_modes_mask = (REGULATOR_MODE_NORMAL |
                                     REGULATOR_MODE_STANDBY),
                .valid_ops_mask = (REGULATOR_CHANGE_MODE |
                                   REGULATOR_CHANGE_STATUS |
                                   REGULATOR_CHANGE_VOLTAGE),
+               .apply_uV = 1,
        },
        .num_consumer_supplies = ARRAY_SIZE(tps658621_ldo0_supply),
        .consumer_supplies = tps658621_ldo0_supply,
index a2eb90169aed4dcee4b48541db475456b972e5bf..2db20da1d585a98535046fe01e4911c80a108a17 100644 (file)
@@ -27,7 +27,6 @@
 #include <asm/hardware/gic.h>
 
 #include <mach/iomap.h>
-#include <mach/system.h>
 
 #include "board.h"
 #include "clock.h"
@@ -96,6 +95,8 @@ static void __init tegra_init_cache(u32 tag_latency, u32 data_latency)
 #ifdef CONFIG_ARCH_TEGRA_2x_SOC
 void __init tegra20_init_early(void)
 {
+       disable_hlt();  /* idle WFI usage needs to be confirmed */
+
        tegra_init_fuse();
        tegra2_init_clocks();
        tegra_clk_init_from_table(tegra20_clk_init_table);
diff --git a/arch/arm/mach-tegra/include/mach/system.h b/arch/arm/mach-tegra/include/mach/system.h
deleted file mode 100644 (file)
index a312988..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * arch/arm/mach-tegra/include/mach/system.h
- *
- * Copyright (C) 2010 Google, Inc.
- *
- * Author:
- *     Colin Cross <ccross@google.com>
- *     Erik Gilling <konkers@google.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * 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.
- *
- */
-
-#ifndef __MACH_TEGRA_SYSTEM_H
-#define __MACH_TEGRA_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-}
-
-#endif
index b4c6926a700cc30c8187768d0a629e590b1d3417..b9865605da094c2728f79f6620fe3107f6d44c9f 100644 (file)
@@ -94,19 +94,9 @@ static struct amba_pl011_data uart0_plat_data = {
 #endif
 };
 
-static struct amba_device uart0_device = {
-       .dev = {
-               .coherent_dma_mask = ~0,
-               .init_name = "uart0", /* Slow device at 0x3000 offset */
-               .platform_data = &uart0_plat_data,
-       },
-       .res = {
-               .start = U300_UART0_BASE,
-               .end   = U300_UART0_BASE + SZ_4K - 1,
-               .flags = IORESOURCE_MEM,
-       },
-       .irq = { IRQ_U300_UART0, NO_IRQ },
-};
+/* Slow device at 0x3000 offset */
+static AMBA_APB_DEVICE(uart0, "uart0", 0, U300_UART0_BASE,
+       { IRQ_U300_UART0 }, &uart0_plat_data);
 
 /* The U335 have an additional UART1 on the APP CPU */
 #ifdef CONFIG_MACH_U300_BS335
@@ -118,71 +108,28 @@ static struct amba_pl011_data uart1_plat_data = {
 #endif
 };
 
-static struct amba_device uart1_device = {
-       .dev = {
-               .coherent_dma_mask = ~0,
-               .init_name = "uart1", /* Fast device at 0x7000 offset */
-               .platform_data = &uart1_plat_data,
-       },
-       .res = {
-               .start = U300_UART1_BASE,
-               .end   = U300_UART1_BASE + SZ_4K - 1,
-               .flags = IORESOURCE_MEM,
-       },
-       .irq = { IRQ_U300_UART1, NO_IRQ },
-};
+/* Fast device at 0x7000 offset */
+static AMBA_APB_DEVICE(uart1, "uart1", 0, U300_UART1_BASE,
+       { IRQ_U300_UART1 }, &uart1_plat_data);
 #endif
 
-static struct amba_device pl172_device = {
-       .dev = {
-               .init_name = "pl172", /* AHB device at 0x4000 offset */
-               .platform_data = NULL,
-       },
-       .res = {
-               .start = U300_EMIF_CFG_BASE,
-               .end   = U300_EMIF_CFG_BASE + SZ_4K - 1,
-               .flags = IORESOURCE_MEM,
-       },
-};
+/* AHB device at 0x4000 offset */
+static AMBA_APB_DEVICE(pl172, "pl172", 0, U300_EMIF_CFG_BASE, { }, NULL);
 
 
 /*
  * Everything within this next ifdef deals with external devices connected to
  * the APP SPI bus.
  */
-static struct amba_device pl022_device = {
-       .dev = {
-               .coherent_dma_mask = ~0,
-               .init_name = "pl022", /* Fast device at 0x6000 offset */
-       },
-       .res = {
-               .start = U300_SPI_BASE,
-               .end   = U300_SPI_BASE + SZ_4K - 1,
-               .flags = IORESOURCE_MEM,
-       },
-       .irq = {IRQ_U300_SPI, NO_IRQ },
-       /*
-        * This device has a DMA channel but the Linux driver does not use
-        * it currently.
-        */
-};
+/* Fast device at 0x6000 offset */
+static AMBA_APB_DEVICE(pl022, "pl022", 0, U300_SPI_BASE,
+       { IRQ_U300_SPI }, NULL);
 
-static struct amba_device mmcsd_device = {
-       .dev = {
-               .init_name = "mmci", /* Fast device at 0x1000 offset */
-               .platform_data = NULL, /* Added later */
-       },
-       .res = {
-               .start = U300_MMCSD_BASE,
-               .end   = U300_MMCSD_BASE + SZ_4K - 1,
-               .flags = IORESOURCE_MEM,
-       },
-       .irq = {IRQ_U300_MMCSD_MCIINTR0, IRQ_U300_MMCSD_MCIINTR1 },
-       /*
-        * This device has a DMA channel but the Linux driver does not use
-        * it currently.
-        */
-};
+/* Fast device at 0x1000 offset */
+#define U300_MMCSD_IRQS        { IRQ_U300_MMCSD_MCIINTR0, IRQ_U300_MMCSD_MCIINTR1 }
+
+static AMBA_APB_DEVICE(mmcsd, "mmci", 0, U300_MMCSD_BASE,
+       U300_MMCSD_IRQS, NULL);
 
 /*
  * The order of device declaration may be important, since some devices
diff --git a/arch/arm/mach-u300/include/mach/system.h b/arch/arm/mach-u300/include/mach/system.h
deleted file mode 100644 (file)
index 574d46e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- *
- * arch/arm/mach-u300/include/mach/system.h
- *
- *
- * Copyright (C) 2007-2009 ST-Ericsson AB
- * License terms: GNU General Public License (GPL) version 2
- * System shutdown and reset functions.
- * Author: Linus Walleij <linus.walleij@stericsson.com>
- */
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
index 52af00446a6335ff9fd5bb1fccbd9a3d8805caae..c59e8b892d6b9af1781f62666be3992885c6cfcf 100644 (file)
@@ -5,7 +5,7 @@ config UX500_SOC_COMMON
        default y
        select ARM_GIC
        select HAS_MTU
-       select ARM_ERRATA_753970
+       select PL310_ERRATA_753970
        select ARM_ERRATA_754322
        select ARM_ERRATA_764369
 
index c563e5418d80b5af3e99e2a76f776e44c9b94e0a..898a64517b09ecc1386bd1e2e23d938cc4b6e72c 100644 (file)
@@ -26,29 +26,22 @@ dbx500_add_amba_device(const char *name, resource_size_t base,
        struct amba_device *dev;
        int ret;
 
-       dev = kzalloc(sizeof *dev, GFP_KERNEL);
+       dev = amba_device_alloc(name, base, SZ_4K);
        if (!dev)
                return ERR_PTR(-ENOMEM);
 
-       dev->dev.init_name = name;
-
-       dev->res.start = base;
-       dev->res.end = base + SZ_4K - 1;
-       dev->res.flags = IORESOURCE_MEM;
-
        dev->dma_mask = DMA_BIT_MASK(32);
        dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
 
        dev->irq[0] = irq;
-       dev->irq[1] = NO_IRQ;
 
        dev->periphid = periphid;
 
        dev->dev.platform_data = pdata;
 
-       ret = amba_device_register(dev, &iomem_resource);
+       ret = amba_device_add(dev, &iomem_resource);
        if (ret) {
-               kfree(dev);
+               amba_device_put(dev);
                return ERR_PTR(ret);
        }
 
diff --git a/arch/arm/mach-ux500/include/mach/system.h b/arch/arm/mach-ux500/include/mach/system.h
deleted file mode 100644 (file)
index 258e5c9..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (C) 2009 ST-Ericsson.
- *
- * This file is licensed under  the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-       /*
-        * This should do all the clock switching
-        * and wait for interrupt tricks
-        */
-       cpu_do_idle();
-}
-
-#endif
index 02b7b9303f3bd77c36f6e976cfa39cd8b6f81eb9..4f352e45be0a0516cdd72d5612211097014beb85 100644 (file)
@@ -582,58 +582,58 @@ static struct pl022_ssp_controller ssp0_plat_data = {
        .num_chipselect = 1,
 };
 
-#define AACI_IRQ       { IRQ_AACI, NO_IRQ }
+#define AACI_IRQ       { IRQ_AACI }
 #define MMCI0_IRQ      { IRQ_MMCI0A,IRQ_SIC_MMCI0B }
-#define KMI0_IRQ       { IRQ_SIC_KMI0, NO_IRQ }
-#define KMI1_IRQ       { IRQ_SIC_KMI1, NO_IRQ }
+#define KMI0_IRQ       { IRQ_SIC_KMI0 }
+#define KMI1_IRQ       { IRQ_SIC_KMI1 }
 
 /*
  * These devices are connected directly to the multi-layer AHB switch
  */
-#define SMC_IRQ                { NO_IRQ, NO_IRQ }
-#define MPMC_IRQ       { NO_IRQ, NO_IRQ }
-#define CLCD_IRQ       { IRQ_CLCDINT, NO_IRQ }
-#define DMAC_IRQ       { IRQ_DMAINT, NO_IRQ }
+#define SMC_IRQ                { }
+#define MPMC_IRQ       { }
+#define CLCD_IRQ       { IRQ_CLCDINT }
+#define DMAC_IRQ       { IRQ_DMAINT }
 
 /*
  * These devices are connected via the core APB bridge
  */
-#define SCTL_IRQ       { NO_IRQ, NO_IRQ }
-#define WATCHDOG_IRQ   { IRQ_WDOGINT, NO_IRQ }
-#define GPIO0_IRQ      { IRQ_GPIOINT0, NO_IRQ }
-#define GPIO1_IRQ      { IRQ_GPIOINT1, NO_IRQ }
-#define RTC_IRQ                { IRQ_RTCINT, NO_IRQ }
+#define SCTL_IRQ       { }
+#define WATCHDOG_IRQ   { IRQ_WDOGINT }
+#define GPIO0_IRQ      { IRQ_GPIOINT0 }
+#define GPIO1_IRQ      { IRQ_GPIOINT1 }
+#define RTC_IRQ                { IRQ_RTCINT }
 
 /*
  * These devices are connected via the DMA APB bridge
  */
-#define SCI_IRQ                { IRQ_SCIINT, NO_IRQ }
-#define UART0_IRQ      { IRQ_UARTINT0, NO_IRQ }
-#define UART1_IRQ      { IRQ_UARTINT1, NO_IRQ }
-#define UART2_IRQ      { IRQ_UARTINT2, NO_IRQ }
-#define SSP_IRQ                { IRQ_SSPINT, NO_IRQ }
+#define SCI_IRQ                { IRQ_SCIINT }
+#define UART0_IRQ      { IRQ_UARTINT0 }
+#define UART1_IRQ      { IRQ_UARTINT1 }
+#define UART2_IRQ      { IRQ_UARTINT2 }
+#define SSP_IRQ                { IRQ_SSPINT }
 
 /* FPGA Primecells */
-AMBA_DEVICE(aaci,  "fpga:04", AACI,     NULL);
-AMBA_DEVICE(mmc0,  "fpga:05", MMCI0,    &mmc0_plat_data);
-AMBA_DEVICE(kmi0,  "fpga:06", KMI0,     NULL);
-AMBA_DEVICE(kmi1,  "fpga:07", KMI1,     NULL);
+APB_DEVICE(aaci,  "fpga:04", AACI,     NULL);
+APB_DEVICE(mmc0,  "fpga:05", MMCI0,    &mmc0_plat_data);
+APB_DEVICE(kmi0,  "fpga:06", KMI0,     NULL);
+APB_DEVICE(kmi1,  "fpga:07", KMI1,     NULL);
 
 /* DevChip Primecells */
-AMBA_DEVICE(smc,   "dev:00",  SMC,      NULL);
-AMBA_DEVICE(mpmc,  "dev:10",  MPMC,     NULL);
-AMBA_DEVICE(clcd,  "dev:20",  CLCD,     &clcd_plat_data);
-AMBA_DEVICE(dmac,  "dev:30",  DMAC,     NULL);
-AMBA_DEVICE(sctl,  "dev:e0",  SCTL,     NULL);
-AMBA_DEVICE(wdog,  "dev:e1",  WATCHDOG, NULL);
-AMBA_DEVICE(gpio0, "dev:e4",  GPIO0,    &gpio0_plat_data);
-AMBA_DEVICE(gpio1, "dev:e5",  GPIO1,    &gpio1_plat_data);
-AMBA_DEVICE(rtc,   "dev:e8",  RTC,      NULL);
-AMBA_DEVICE(sci0,  "dev:f0",  SCI,      NULL);
-AMBA_DEVICE(uart0, "dev:f1",  UART0,    NULL);
-AMBA_DEVICE(uart1, "dev:f2",  UART1,    NULL);
-AMBA_DEVICE(uart2, "dev:f3",  UART2,    NULL);
-AMBA_DEVICE(ssp0,  "dev:f4",  SSP,      &ssp0_plat_data);
+AHB_DEVICE(smc,   "dev:00",  SMC,      NULL);
+AHB_DEVICE(mpmc,  "dev:10",  MPMC,     NULL);
+AHB_DEVICE(clcd,  "dev:20",  CLCD,     &clcd_plat_data);
+AHB_DEVICE(dmac,  "dev:30",  DMAC,     NULL);
+APB_DEVICE(sctl,  "dev:e0",  SCTL,     NULL);
+APB_DEVICE(wdog,  "dev:e1",  WATCHDOG, NULL);
+APB_DEVICE(gpio0, "dev:e4",  GPIO0,    &gpio0_plat_data);
+APB_DEVICE(gpio1, "dev:e5",  GPIO1,    &gpio1_plat_data);
+APB_DEVICE(rtc,   "dev:e8",  RTC,      NULL);
+APB_DEVICE(sci0,  "dev:f0",  SCI,      NULL);
+APB_DEVICE(uart0, "dev:f1",  UART0,    NULL);
+APB_DEVICE(uart1, "dev:f2",  UART1,    NULL);
+APB_DEVICE(uart2, "dev:f3",  UART2,    NULL);
+APB_DEVICE(ssp0,  "dev:f4",  SSP,      &ssp0_plat_data);
 
 static struct amba_device *amba_devs[] __initdata = {
        &dmac_device,
index 2ef2f555f315c8326fd85b73b295c6511d502904..683e60776a85b7a29d5022bec2c87c4c0be7f933 100644 (file)
@@ -36,20 +36,10 @@ extern unsigned int mmc_status(struct device *dev);
 extern struct of_dev_auxdata versatile_auxdata_lookup[];
 #endif
 
-#define AMBA_DEVICE(name,busid,base,plat)                      \
-static struct amba_device name##_device = {                    \
-       .dev            = {                                     \
-               .coherent_dma_mask = ~0,                        \
-               .init_name = busid,                             \
-               .platform_data = plat,                          \
-       },                                                      \
-       .res            = {                                     \
-               .start  = VERSATILE_##base##_BASE,              \
-               .end    = (VERSATILE_##base##_BASE) + SZ_4K - 1,\
-               .flags  = IORESOURCE_MEM,                       \
-       },                                                      \
-       .dma_mask       = ~0,                                   \
-       .irq            = base##_IRQ,                           \
-}
+#define APB_DEVICE(name, busid, base, plat)    \
+static AMBA_APB_DEVICE(name, busid, 0, VERSATILE_##base##_BASE, base##_IRQ, plat)
+
+#define AHB_DEVICE(name, busid, base, plat)    \
+static AMBA_AHB_DEVICE(name, busid, 0, VERSATILE_##base##_BASE, base##_IRQ, plat)
 
 #endif
diff --git a/arch/arm/mach-versatile/include/mach/system.h b/arch/arm/mach-versatile/include/mach/system.h
deleted file mode 100644 (file)
index f3fa347..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *  arch/arm/mach-versatile/include/mach/system.h
- *
- *  Copyright (C) 2003 ARM Limited
- *  Copyright (C) 2000 Deep Blue Solutions Ltd
- *
- * 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.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-       /*
-        * This should do all the clock switching
-        * and wait for interrupt tricks
-        */
-       cpu_do_idle();
-}
-
-#endif
index 9581c197500cefbadfb6f194e506ade53dd9b6a1..19738331bd3d1f4951c2f173dfac6659f800ea80 100644 (file)
@@ -58,28 +58,28 @@ static struct pl061_platform_data gpio3_plat_data = {
        .irq_base       = IRQ_GPIO3_START,
 };
 
-#define UART3_IRQ      { IRQ_SIC_UART3, NO_IRQ }
-#define SCI1_IRQ       { IRQ_SIC_SCI3, NO_IRQ }
+#define UART3_IRQ      { IRQ_SIC_UART3 }
+#define SCI1_IRQ       { IRQ_SIC_SCI3 }
 #define MMCI1_IRQ      { IRQ_MMCI1A, IRQ_SIC_MMCI1B }
 
 /*
  * These devices are connected via the core APB bridge
  */
-#define GPIO2_IRQ      { IRQ_GPIOINT2, NO_IRQ }
-#define GPIO3_IRQ      { IRQ_GPIOINT3, NO_IRQ }
+#define GPIO2_IRQ      { IRQ_GPIOINT2 }
+#define GPIO3_IRQ      { IRQ_GPIOINT3 }
 
 /*
  * These devices are connected via the DMA APB bridge
  */
 
 /* FPGA Primecells */
-AMBA_DEVICE(uart3, "fpga:09", UART3,    NULL);
-AMBA_DEVICE(sci1,  "fpga:0a", SCI1,     NULL);
-AMBA_DEVICE(mmc1,  "fpga:0b", MMCI1,    &mmc1_plat_data);
+APB_DEVICE(uart3, "fpga:09", UART3,    NULL);
+APB_DEVICE(sci1,  "fpga:0a", SCI1,     NULL);
+APB_DEVICE(mmc1,  "fpga:0b", MMCI1,    &mmc1_plat_data);
 
 /* DevChip Primecells */
-AMBA_DEVICE(gpio2, "dev:e6",  GPIO2,    &gpio2_plat_data);
-AMBA_DEVICE(gpio3, "dev:e7",  GPIO3,    &gpio3_plat_data);
+APB_DEVICE(gpio2, "dev:e6",  GPIO2,    &gpio2_plat_data);
+APB_DEVICE(gpio3, "dev:e7",  GPIO3,    &gpio3_plat_data);
 
 static struct amba_device *amba_devs[] __initdata = {
        &uart3_device,
index 9b3d0fbaee729564f34a11749795d59577961bec..88c3ba151e8716c93abbabebc8265f81db806ea8 100644 (file)
@@ -7,7 +7,7 @@ config ARCH_VEXPRESS_CA9X4
        select ARM_GIC
        select ARM_ERRATA_720789
        select ARM_ERRATA_751472
-       select ARM_ERRATA_753970
+       select PL310_ERRATA_753970
        select HAVE_SMP
        select MIGHT_HAVE_CACHE_L2X0
 
index f4397159c173277da92d7c1bb0dbb60549bab8f2..9f0f2827c7111fad6f4825d633960224aa89a6cc 100644 (file)
@@ -1,19 +1,2 @@
 #define __MMIO_P2V(x)  (((x) & 0xfffff) | (((x) & 0x0f000000) >> 4) | 0xf8000000)
 #define MMIO_P2V(x)    ((void __iomem *)__MMIO_P2V(x))
-
-#define AMBA_DEVICE(name,busid,base,plat)      \
-struct amba_device name##_device = {           \
-       .dev            = {                     \
-               .coherent_dma_mask = ~0UL,      \
-               .init_name = busid,             \
-               .platform_data = plat,          \
-       },                                      \
-       .res            = {                     \
-               .start  = base,                 \
-               .end    = base + SZ_4K - 1,     \
-               .flags  = IORESOURCE_MEM,       \
-       },                                      \
-       .dma_mask       = ~0UL,                 \
-       .irq            = IRQ_##base,           \
-       /* .dma         = DMA_##base,*/         \
-}
index b1e87c184e54b3a0f3096353871bdf6f00d97027..1b1d2e4892b9c188677902ed0356c5d4bbbbd59a 100644 (file)
@@ -109,10 +109,10 @@ static struct clcd_board ct_ca9x4_clcd_data = {
        .remove         = versatile_clcd_remove_dma,
 };
 
-static AMBA_DEVICE(clcd, "ct:clcd", CT_CA9X4_CLCDC, &ct_ca9x4_clcd_data);
-static AMBA_DEVICE(dmc, "ct:dmc", CT_CA9X4_DMC, NULL);
-static AMBA_DEVICE(smc, "ct:smc", CT_CA9X4_SMC, NULL);
-static AMBA_DEVICE(gpio, "ct:gpio", CT_CA9X4_GPIO, NULL);
+static AMBA_AHB_DEVICE(clcd, "ct:clcd", 0, CT_CA9X4_CLCDC, IRQ_CT_CA9X4_CLCDC, &ct_ca9x4_clcd_data);
+static AMBA_APB_DEVICE(dmc, "ct:dmc", 0, CT_CA9X4_DMC, IRQ_CT_CA9X4_DMC, NULL);
+static AMBA_APB_DEVICE(smc, "ct:smc", 0, CT_CA9X4_SMC, IRQ_CT_CA9X4_SMC, NULL);
+static AMBA_APB_DEVICE(gpio, "ct:gpio", 0, CT_CA9X4_GPIO, IRQ_CT_CA9X4_GPIO, NULL);
 
 static struct amba_device *ct_ca9x4_amba_devs[] __initdata = {
        &clcd_device,
index a34d3d4faae19c264d34372c09a11b8b274b219c..a40468f3b938f28fdeb4f10f5b94663e11015a05 100644 (file)
@@ -35,7 +35,7 @@
  * Interrupts.  Those in {} are for AMBA devices
  */
 #define IRQ_CT_CA9X4_CLCDC     { 76 }
-#define IRQ_CT_CA9X4_DMC       { -1 }
+#define IRQ_CT_CA9X4_DMC       { 0 }
 #define IRQ_CT_CA9X4_SMC       { 77, 78 }
 #define IRQ_CT_CA9X4_TIMER0    80
 #define IRQ_CT_CA9X4_TIMER1    81
diff --git a/arch/arm/mach-vexpress/include/mach/system.h b/arch/arm/mach-vexpress/include/mach/system.h
deleted file mode 100644 (file)
index f653a8e..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *  arch/arm/mach-vexpress/include/mach/system.h
- *
- *  Copyright (C) 2003 ARM Limited
- *  Copyright (C) 2000 Deep Blue Solutions Ltd
- *
- * 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.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-       /*
-        * This should do all the clock switching
-        * and wait for interrupt tricks
-        */
-       cpu_do_idle();
-}
-
-#endif
index b4a28ca0e50ad653c6832058f9bbf69ad0d2cb96..ad64f97a2003f007b9462df267731cbb872d0d73 100644 (file)
@@ -266,16 +266,16 @@ static struct mmci_platform_data v2m_mmci_data = {
        .status         = v2m_mmci_status,
 };
 
-static AMBA_DEVICE(aaci,  "mb:aaci",  V2M_AACI, NULL);
-static AMBA_DEVICE(mmci,  "mb:mmci",  V2M_MMCI, &v2m_mmci_data);
-static AMBA_DEVICE(kmi0,  "mb:kmi0",  V2M_KMI0, NULL);
-static AMBA_DEVICE(kmi1,  "mb:kmi1",  V2M_KMI1, NULL);
-static AMBA_DEVICE(uart0, "mb:uart0", V2M_UART0, NULL);
-static AMBA_DEVICE(uart1, "mb:uart1", V2M_UART1, NULL);
-static AMBA_DEVICE(uart2, "mb:uart2", V2M_UART2, NULL);
-static AMBA_DEVICE(uart3, "mb:uart3", V2M_UART3, NULL);
-static AMBA_DEVICE(wdt,   "mb:wdt",   V2M_WDT, NULL);
-static AMBA_DEVICE(rtc,   "mb:rtc",   V2M_RTC, NULL);
+static AMBA_APB_DEVICE(aaci,  "mb:aaci",  0, V2M_AACI, IRQ_V2M_AACI, NULL);
+static AMBA_APB_DEVICE(mmci,  "mb:mmci",  0, V2M_MMCI, IRQ_V2M_MMCI, &v2m_mmci_data);
+static AMBA_APB_DEVICE(kmi0,  "mb:kmi0",  0, V2M_KMI0, IRQ_V2M_KMI0, NULL);
+static AMBA_APB_DEVICE(kmi1,  "mb:kmi1",  0, V2M_KMI1, IRQ_V2M_KMI1, NULL);
+static AMBA_APB_DEVICE(uart0, "mb:uart0", 0, V2M_UART0, IRQ_V2M_UART0, NULL);
+static AMBA_APB_DEVICE(uart1, "mb:uart1", 0, V2M_UART1, IRQ_V2M_UART1, NULL);
+static AMBA_APB_DEVICE(uart2, "mb:uart2", 0, V2M_UART2, IRQ_V2M_UART2, NULL);
+static AMBA_APB_DEVICE(uart3, "mb:uart3", 0, V2M_UART3, IRQ_V2M_UART3, NULL);
+static AMBA_APB_DEVICE(wdt,   "mb:wdt",   0, V2M_WDT, IRQ_V2M_WDT, NULL);
+static AMBA_APB_DEVICE(rtc,   "mb:rtc",   0, V2M_RTC, IRQ_V2M_RTC, NULL);
 
 static struct amba_device *v2m_amba_devs[] __initdata = {
        &aaci_device,
index d6c757eaf26b2d9dd1312090654869a07f4d2c96..58fa8010ee61c2af6cbf2fb27308791e1655d00b 100644 (file)
@@ -7,11 +7,6 @@
 /* PM Software Reset request register */
 #define VT8500_PMSR_VIRT       0xf8130060
 
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
 static inline void arch_reset(char mode, const char *cmd)
 {
        writel(1, VT8500_PMSR_VIRT);
index 78110befb7a9132d6da3353fdec6721b421894ed..db82568a998a15b39db31a8813d92d7cad730ddd 100644 (file)
@@ -530,6 +530,7 @@ static struct platform_device *nuc900_public_dev[] __initdata = {
 
 void __init nuc900_board_init(struct platform_device **device, int size)
 {
+       disable_hlt();
        platform_add_devices(device, size);
        platform_add_devices(nuc900_public_dev, ARRAY_SIZE(nuc900_public_dev));
        spi_register_board_info(nuc900_spi_board_info,
diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h
deleted file mode 100644 (file)
index 2aaeb93..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-w90x900/include/mach/system.h
- *
- * Copyright (c) 2008 Nuvoton technology corporation
- * All rights reserved.
- *
- * Wan ZongShun <mcuos.com@gmail.com>
- *
- * Based on arch/arm/mach-s3c2410/include/mach/system.h
- *
- * 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.
- *
- */
-static void arch_idle(void)
-{
-}
diff --git a/arch/arm/mach-zynq/include/mach/system.h b/arch/arm/mach-zynq/include/mach/system.h
deleted file mode 100644 (file)
index 8e88e0b..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/* arch/arm/mach-zynq/include/mach/system.h
- *
- *  Copyright (C) 2011 Xilinx
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * 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.
- */
-
-#ifndef __MACH_SYSTEM_H__
-#define __MACH_SYSTEM_H__
-
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
-#endif
index 0404ccbb8aa3ee39f0a8084c55879fb464115ca2..f1c8486f750169b0ffe8974b35e1b5555e53ad32 100644 (file)
@@ -230,9 +230,7 @@ __v7_setup:
        mcreq   p15, 0, r10, c15, c0, 1         @ write diagnostic register
 #endif
 #ifdef CONFIG_ARM_ERRATA_743622
-       teq     r6, #0x20                       @ present in r2p0
-       teqne   r6, #0x21                       @ present in r2p1
-       teqne   r6, #0x22                       @ present in r2p2
+       teq     r5, #0x00200000                 @ only present in r2p*
        mrceq   p15, 0, r10, c15, c0, 1         @ read diagnostic register
        orreq   r10, r10, #1 << 6               @ set bit #6
        mcreq   p15, 0, r10, c15, c0, 1         @ write diagnostic register
diff --git a/arch/arm/plat-mxc/include/mach/system.h b/arch/arm/plat-mxc/include/mach/system.h
deleted file mode 100644 (file)
index 13ad0df..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- *  Copyright (C) 1999 ARM Limited
- *  Copyright (C) 2000 Deep Blue Solutions Ltd
- *  Copyright 2004-2008 Freescale Semiconductor, Inc. All Rights Reserved.
- *
- * 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.
- *
- * 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.
- */
-
-#ifndef __ASM_ARCH_MXC_SYSTEM_H__
-#define __ASM_ARCH_MXC_SYSTEM_H__
-
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
-#endif /* __ASM_ARCH_MXC_SYSTEM_H__ */
index 51b102dc906b62bee9241aa65a9325048ce69d21..ad6f865d1f161bedf714674ff11eaee77e0cf8be 100644 (file)
 
 #if defined (CONFIG_MACH_AMS_DELTA)
 
-#define AMS_DELTA_LATCH1_PHYS          0x01000000
-#define AMS_DELTA_LATCH1_VIRT          0xEA000000
-#define AMS_DELTA_MODEM_PHYS           0x04000000
-#define AMS_DELTA_MODEM_VIRT           0xEB000000
-#define AMS_DELTA_LATCH2_PHYS          0x08000000
-#define AMS_DELTA_LATCH2_VIRT          0xEC000000
-
-#define AMS_DELTA_LATCH1_LED_CAMERA    0x01
-#define AMS_DELTA_LATCH1_LED_ADVERT    0x02
-#define AMS_DELTA_LATCH1_LED_EMAIL     0x04
-#define AMS_DELTA_LATCH1_LED_HANDSFREE 0x08
-#define AMS_DELTA_LATCH1_LED_VOICEMAIL 0x10
-#define AMS_DELTA_LATCH1_LED_VOICE     0x20
-
-#define AMS_DELTA_LATCH2_LCD_VBLEN     0x0001
-#define AMS_DELTA_LATCH2_LCD_NDISP     0x0002
-#define AMS_DELTA_LATCH2_NAND_NCE      0x0004
-#define AMS_DELTA_LATCH2_NAND_NRE      0x0008
-#define AMS_DELTA_LATCH2_NAND_NWP      0x0010
-#define AMS_DELTA_LATCH2_NAND_NWE      0x0020
-#define AMS_DELTA_LATCH2_NAND_ALE      0x0040
-#define AMS_DELTA_LATCH2_NAND_CLE      0x0080
-#define AMD_DELTA_LATCH2_KEYBRD_PWR    0x0100
-#define AMD_DELTA_LATCH2_KEYBRD_DATA   0x0200
 #define AMD_DELTA_LATCH2_SCARD_RSTIN   0x0400
 #define AMD_DELTA_LATCH2_SCARD_CMDVCC  0x0800
-#define AMS_DELTA_LATCH2_MODEM_NRESET  0x1000
 #define AMS_DELTA_LATCH2_MODEM_CODEC   0x2000
 
 #define AMS_DELTA_GPIO_PIN_KEYBRD_DATA 0
 #define AMS_DELTA_GPIO_PIN_CONFIG      11
 #define AMS_DELTA_GPIO_PIN_NAND_RB     12
 
+#define AMS_DELTA_GPIO_PIN_LCD_VBLEN           240
+#define AMS_DELTA_GPIO_PIN_LCD_NDISP           241
+#define AMS_DELTA_GPIO_PIN_NAND_NCE            242
+#define AMS_DELTA_GPIO_PIN_NAND_NRE            243
+#define AMS_DELTA_GPIO_PIN_NAND_NWP            244
+#define AMS_DELTA_GPIO_PIN_NAND_NWE            245
+#define AMS_DELTA_GPIO_PIN_NAND_ALE            246
+#define AMS_DELTA_GPIO_PIN_NAND_CLE            247
+#define AMS_DELTA_GPIO_PIN_KEYBRD_PWR          248
+#define AMS_DELTA_GPIO_PIN_KEYBRD_DATAOUT      249
+#define AMS_DELTA_GPIO_PIN_SCARD_RSTIN         250
+#define AMS_DELTA_GPIO_PIN_SCARD_CMDVCC                251
+#define AMS_DELTA_GPIO_PIN_MODEM_NRESET                252
+#define AMS_DELTA_GPIO_PIN_MODEM_CODEC         253
+
+#define AMS_DELTA_LATCH2_GPIO_BASE     AMS_DELTA_GPIO_PIN_LCD_VBLEN
+#define AMS_DELTA_LATCH2_NGPIO         16
+
 #ifndef __ASSEMBLY__
-void ams_delta_latch1_write(u8 mask, u8 value);
-void ams_delta_latch2_write(u16 mask, u16 value);
+void ams_delta_latch_write(int base, int ngpio, u16 mask, u16 value);
+#define ams_delta_latch2_write(mask, value) \
+       ams_delta_latch_write(AMS_DELTA_LATCH2_GPIO_BASE, \
+                       AMS_DELTA_LATCH2_NGPIO, (mask), (value))
 #endif
 
 #endif /* CONFIG_MACH_AMS_DELTA */
index 2efd6454bce0db2086af97eb8dac43c54f6d8ab1..37bbbbb981b222ac001f958a59b5c69d3683c6b5 100644 (file)
 #define OMAP_GPMC_NR_IRQS      8
 #define OMAP_GPMC_IRQ_END      (OMAP_GPMC_IRQ_BASE + OMAP_GPMC_NR_IRQS)
 
+/* PRCM IRQ handler */
+#ifdef CONFIG_ARCH_OMAP2PLUS
+#define OMAP_PRCM_IRQ_BASE     (OMAP_GPMC_IRQ_END)
+#define OMAP_PRCM_NR_IRQS      64
+#define OMAP_PRCM_IRQ_END      (OMAP_PRCM_IRQ_BASE + OMAP_PRCM_NR_IRQS)
+#else
+#define OMAP_PRCM_IRQ_END      OMAP_GPMC_IRQ_END
+#endif
 
-#define NR_IRQS                        OMAP_GPMC_IRQ_END
+#define NR_IRQS                        OMAP_PRCM_IRQ_END
 
 #define OMAP_IRQ_BIT(irq)      (1 << ((irq) % 32))
 
diff --git a/arch/arm/plat-omap/include/plat/system.h b/arch/arm/plat-omap/include/plat/system.h
deleted file mode 100644 (file)
index 8e5ebd7..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copied from arch/arm/mach-sa1100/include/mach/system.h
- * Copyright (c) 1999 Nicolas Pitre <nico@fluxnic.net>
- */
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-#include <asm/proc-fns.h>
-
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
-#endif
index 6ee90495ca4cee7d431bc2a28d18cb2c38794470..cc3f11ba7a994cb0207f757d02bba617e8a8fd13 100644 (file)
@@ -160,6 +160,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
                DEBUG_LL_OMAP3(3, igep0020);
                DEBUG_LL_OMAP3(3, igep0030);
                DEBUG_LL_OMAP3(3, nokia_rm680);
+               DEBUG_LL_OMAP3(3, nokia_rm696);
                DEBUG_LL_OMAP3(3, nokia_rx51);
                DEBUG_LL_OMAP3(3, omap3517evm);
                DEBUG_LL_OMAP3(3, omap3_beagle);
index 21f1fda8b661ee7021782921b98b6cb637547284..32a09931350c16ebc5d0d7bc0d823d5ccc0dbfbc 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/io.h>
 
 #include <mach/hardware.h>
+#include <mach/regs-clock.h>
 #include <asm/irq.h>
 #include <asm/cacheflush.h>
 
@@ -190,8 +191,34 @@ static unsigned long s3c24xx_read_idcode_v4(void)
        return __raw_readl(S3C2410_GSTATUS1);
 }
 
+static void s3c24xx_default_idle(void)
+{
+       unsigned long tmp;
+       int i;
+
+       /* idle the system by using the idle mode which will wait for an
+        * interrupt to happen before restarting the system.
+        */
+
+       /* Warning: going into idle state upsets jtag scanning */
+
+       __raw_writel(__raw_readl(S3C2410_CLKCON) | S3C2410_CLKCON_IDLE,
+                    S3C2410_CLKCON);
+
+       /* the samsung port seems to do a loop and then unset idle.. */
+       for (i = 0; i < 50; i++)
+               tmp += __raw_readl(S3C2410_CLKCON); /* ensure loop not optimised out */
+
+       /* this bit is not cleared on re-start... */
+
+       __raw_writel(__raw_readl(S3C2410_CLKCON) & ~S3C2410_CLKCON_IDLE,
+                    S3C2410_CLKCON);
+}
+
 void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
 {
+       arm_pm_idle = s3c24xx_default_idle;
+
        /* initialise the io descriptors we need for initialisation */
        iotable_init(mach_desc, size);
        iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
index 9fe35348e03b433d5294cfcd02c1742c268f3391..2bab4c99a2342218fff937cbe5bc701149f76d0c 100644 (file)
@@ -1249,7 +1249,7 @@ static void s3c2410_dma_resume(void)
        struct s3c2410_dma_chan *cp = s3c2410_chans + dma_channels - 1;
        int channel;
 
-       for (channel = dma_channels - 1; channel >= 0; cp++, channel--)
+       for (channel = dma_channels - 1; channel >= 0; cp--, channel--)
                s3c2410_dma_resume_chan(cp);
 }
 
index f10768e988d480d8e49758d900ba890a3649099a..d21d744e4d99d9d9623bb9d26cfb628e87c82a63 100644 (file)
@@ -1409,7 +1409,7 @@ void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd)
 
 #ifdef CONFIG_S3C_DEV_USB_HSOTG
 static struct resource s3c_usb_hsotg_resources[] = {
-       [0] = DEFINE_RES_MEM(S3C_PA_USB_HSOTG, SZ_16K),
+       [0] = DEFINE_RES_MEM(S3C_PA_USB_HSOTG, SZ_128K),
        [1] = DEFINE_RES_IRQ(IRQ_OTG),
 };
 
diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
deleted file mode 100644 (file)
index 86c6f83..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * arch/arm/plat-spear/include/plat/system.h
- *
- * SPEAr platform specific architecture functions
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar<viresh.kumar@st.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __PLAT_SYSTEM_H
-#define __PLAT_SYSTEM_H
-
-static inline void arch_idle(void)
-{
-       /*
-        * This should do all the clock switching
-        * and wait for interrupt tricks
-        */
-       cpu_do_idle();
-}
-
-#endif /* __PLAT_SYSTEM_H */
index 0c77e42986758554bc25931cc6ed88287353a9b9..abb5bdecd509acbe13f0b70c78b65a2607becd1d 100644 (file)
@@ -145,11 +145,13 @@ static void clockevent_set_mode(enum clock_event_mode mode,
 static int clockevent_next_event(unsigned long cycles,
                                 struct clock_event_device *clk_event_dev)
 {
-       u16 val;
+       u16 val = readw(gpt_base + CR(CLKEVT));
+
+       if (val & CTRL_ENABLE)
+               writew(val & ~CTRL_ENABLE, gpt_base + CR(CLKEVT));
 
        writew(cycles, gpt_base + LOAD(CLKEVT));
 
-       val = readw(gpt_base + CR(CLKEVT));
        val |= CTRL_ENABLE | CTRL_INT_ENABLE;
        writew(val, gpt_base + CR(CLKEVT));
 
index 8154c4ee8c9c24c3680b291dc034bcc2c4f35518..77ecbded1f370d07b5d736c22dde0b2a52a29222 100644 (file)
@@ -122,8 +122,8 @@ extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
 
 extern unsigned long get_wchan(struct task_struct *p);
 
-#define KSTK_EIP(tsk)  (task_pt_regs(task)->pc)
-#define        KSTK_ESP(tsk)   (task_pt_regs(task)->sp)
+#define KSTK_EIP(task) (task_pt_regs(task)->pc)
+#define KSTK_ESP(task) (task_pt_regs(task)->sp)
 
 #define cpu_relax()            do { } while (0)
 
index 7da4d0081487b73f341cd4a51f6ef5efe33141ae..a7193ae13a5d2d6ab8df643a76c6b33cd9621421 100644 (file)
@@ -146,7 +146,7 @@ static int __init alchemy_time_init(unsigned int m2int)
        cd->shift = 32;
        cd->mult = div_sc(32768, NSEC_PER_SEC, cd->shift);
        cd->max_delta_ns = clockevent_delta2ns(0xffffffff, cd);
-       cd->min_delta_ns = clockevent_delta2ns(8, cd);  /* ~0.25ms */
+       cd->min_delta_ns = clockevent_delta2ns(9, cd);  /* ~0.28ms */
        clockevents_register_device(cd);
        setup_irq(m2int, &au1x_rtcmatch2_irqaction);
 
index 24f546985b69b5b572e60dfc60be97a92a726483..e21507052066fbfe5aaec7185286376f2eaf4d02 100644 (file)
@@ -96,7 +96,7 @@ void __init ath79_register_wmac(u8 *cal_data)
 {
        if (soc_is_ar913x())
                ar913x_wmac_setup();
-       if (soc_is_ar933x())
+       else if (soc_is_ar933x())
                ar933x_wmac_setup();
        else
                BUG();
index 4479fd669ac1877a4d84a65284c714bd68310633..28c6b276c21624a4550c2411042065936464d19c 100644 (file)
@@ -8,7 +8,7 @@ CONFIG_HIGH_RES_TIMERS=y
 # CONFIG_SECCOMP is not set
 CONFIG_USE_OF=y
 CONFIG_EXPERIMENTAL=y
-CONFIG_CROSS_COMPILE="mips-linux-gnu-"
+CONFIG_CROSS_COMPILE=""
 # CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
@@ -22,7 +22,7 @@ CONFIG_AUDIT=y
 CONFIG_CGROUPS=y
 CONFIG_NAMESPACES=y
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE="usr/dev_file_list usr/rootfs.xlp"
+CONFIG_INITRAMFS_SOURCE=""
 CONFIG_RD_BZIP2=y
 CONFIG_RD_LZMA=y
 CONFIG_INITRAMFS_COMPRESSION_LZMA=y
index 7c68666fdd646c3354f872ffc91eeeecfa4785d3..d0b857d98c91703b01950f9d1a705c1048cd7ac0 100644 (file)
@@ -8,7 +8,7 @@ CONFIG_HIGH_RES_TIMERS=y
 CONFIG_PREEMPT_VOLUNTARY=y
 CONFIG_KEXEC=y
 CONFIG_EXPERIMENTAL=y
-CONFIG_CROSS_COMPILE="mips-linux-gnu-"
+CONFIG_CROSS_COMPILE=""
 # CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
@@ -22,7 +22,7 @@ CONFIG_AUDIT=y
 CONFIG_NAMESPACES=y
 CONFIG_SCHED_AUTOGROUP=y
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE="usr/dev_file_list usr/rootfs.xlr"
+CONFIG_INITRAMFS_SOURCE=""
 CONFIG_RD_BZIP2=y
 CONFIG_RD_LZMA=y
 CONFIG_INITRAMFS_COMPRESSION_GZIP=y
index 3b0b6e8c85334d610099d554f5a7a72b941ffee9..7fda0ce5f692cd51ed8b06f788bffc6a14f866f7 100644 (file)
@@ -6,7 +6,7 @@ CONFIG_HZ_1000=y
 CONFIG_PREEMPT=y
 # CONFIG_SECCOMP is not set
 CONFIG_EXPERIMENTAL=y
-CONFIG_CROSS_COMPILE="mips-linux-"
+CONFIG_CROSS_COMPILE=""
 # CONFIG_SWAP is not set
 CONFIG_SYSVIPC=y
 CONFIG_LOG_BUF_SHIFT=16
index 556e1be20bf63862bacf3fcb464b6b87418c50eb..fb9975c74c571a01526f42667a8f0d7cbedf235e 100644 (file)
@@ -11,6 +11,9 @@
 #include <asm/io.h>
 #include <asm/mach-au1x00/au1000.h>
 
+struct gpio;
+struct gpio_chip;
+
 /* with the current GPIC design, up to 128 GPIOs are possible.
  * The only implementation so far is in the Au1300, which has 75 externally
  * available GPIOs.
@@ -203,7 +206,22 @@ static inline int gpio_request(unsigned int gpio, const char *label)
        return 0;
 }
 
-static inline void gpio_free(unsigned int gpio)
+static inline int gpio_request_one(unsigned gpio,
+                                       unsigned long flags, const char *label)
+{
+       return 0;
+}
+
+static inline int gpio_request_array(struct gpio *array, size_t num)
+{
+       return 0;
+}
+
+static inline void gpio_free(unsigned gpio)
+{
+}
+
+static inline void gpio_free_array(struct gpio *array, size_t num)
 {
 }
 
index d41790928c648de70fb02a7404517f1fc7a94fba..da9bd7d270d18a761f74f6168653d2eb16da7118 100644 (file)
@@ -39,9 +39,6 @@
 #define HPAGE_MASK     (~(HPAGE_SIZE - 1))
 #define HUGETLB_PAGE_ORDER     (HPAGE_SHIFT - PAGE_SHIFT)
 #else /* !CONFIG_HUGETLB_PAGE */
-# ifndef BUILD_BUG
-#  define BUILD_BUG() do { extern void __build_bug(void); __build_bug(); } while (0)
-# endif
 #define HPAGE_SHIFT    ({BUILD_BUG(); 0; })
 #define HPAGE_SIZE     ({BUILD_BUG(); 0; })
 #define HPAGE_MASK     ({BUILD_BUG(); 0; })
index 58fe71afd8797dd37e1cf0442f1b360082af63a2..d5e950ab852792b15c2226f193f55061719f0e20 100644 (file)
@@ -8,7 +8,6 @@
  * SMP support for BMIPS
  */
 
-#include <linux/version.h>
 #include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
index cc4a3f120f54d6f036e66812cf47e5c35e7dbff9..d79ae5437b5871efda13f052c5f7511ccf9587b9 100644 (file)
@@ -1135,7 +1135,7 @@ asmlinkage void do_mt(struct pt_regs *regs)
                printk(KERN_DEBUG "YIELD Scheduler Exception\n");
                break;
        case 5:
-               printk(KERN_DEBUG "Gating Storage Schedulier Exception\n");
+               printk(KERN_DEBUG "Gating Storage Scheduler Exception\n");
                break;
        default:
                printk(KERN_DEBUG "*** UNKNOWN THREAD EXCEPTION %d ***\n",
index a81176f44c74d4e39be2eaf8d939ccdf1aa5157b..924da5eb7031498ea93dc050a7492aa78f5bb0ec 100644 (file)
@@ -69,7 +69,6 @@ SECTIONS
        RODATA
 
        /* writeable */
-       _sdata = .;                             /* Start of data section */
        .data : {       /* Data */
                . = . + DATAOFFSET;             /* for CONFIG_MAPPED_KERNEL */
 
index 937cf3368164c6f6d4a6db4b1867ca5866a36ed7..69ebd586d7ffbef5029b8540ae3d021135035295 100644 (file)
@@ -42,6 +42,8 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ
        const int field = sizeof(unsigned long) * 2;
        siginfo_t info;
        int fault;
+       unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE |
+                                                (write ? FAULT_FLAG_WRITE : 0);
 
 #if 0
        printk("Cpu%d[%s:%d:%0*lx:%ld:%0*lx]\n", raw_smp_processor_id(),
@@ -91,6 +93,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ
        if (in_atomic() || !mm)
                goto bad_area_nosemaphore;
 
+retry:
        down_read(&mm->mmap_sem);
        vma = find_vma(mm, address);
        if (!vma)
@@ -144,7 +147,11 @@ good_area:
         * make sure we exit gracefully rather than endlessly redo
         * the fault.
         */
-       fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0);
+       fault = handle_mm_fault(mm, vma, address, flags);
+
+       if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
+               return;
+
        perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
        if (unlikely(fault & VM_FAULT_ERROR)) {
                if (fault & VM_FAULT_OOM)
@@ -153,12 +160,27 @@ good_area:
                        goto do_sigbus;
                BUG();
        }
-       if (fault & VM_FAULT_MAJOR) {
-               perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address);
-               tsk->maj_flt++;
-       } else {
-               perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
-               tsk->min_flt++;
+       if (flags & FAULT_FLAG_ALLOW_RETRY) {
+               if (fault & VM_FAULT_MAJOR) {
+                       perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1,
+                                                 regs, address);
+                       tsk->maj_flt++;
+               } else {
+                       perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1,
+                                                 regs, address);
+                       tsk->min_flt++;
+               }
+               if (fault & VM_FAULT_RETRY) {
+                       flags &= ~FAULT_FLAG_ALLOW_RETRY;
+
+                       /*
+                        * No need to up_read(&mm->mmap_sem) as we would
+                        * have already released it in __lock_page_or_retry
+                        * in mm/filemap.c.
+                        */
+
+                       goto retry;
+               }
        }
 
        up_read(&mm->mmap_sem);
index aec2b111d35b0131f805e736bd80c2ca19d59cbf..15521505ebe80a4a6975f11905e4694111474a08 100644 (file)
@@ -279,7 +279,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
 {
        /* Propagate hose info into the subordinate devices.  */
 
-       struct list_head *ln;
        struct pci_dev *dev = bus->self;
 
        if (pci_probe_only && dev &&
@@ -288,9 +287,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
                pcibios_fixup_device_resources(dev, bus);
        }
 
-       for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) {
-               dev = pci_dev_b(ln);
-
+       list_for_each_entry(dev, &bus->devices, bus_list) {
                if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI)
                        pcibios_fixup_device_resources(dev, bus);
        }
index 86b98e98fb4f2f09906a8ee271550e1ab9b961c9..62ead6601c69437aeaafe5dcd3bc7c895fcee5f1 100644 (file)
  */
 void __init titan_ht_pcibios_fixup_bus(struct pci_bus *bus)
 {
-       struct pci_bus *current_bus = bus;
-       struct pci_dev *devices;
-       struct list_head *devices_link;
-
-       list_for_each(devices_link, &(current_bus->devices)) {
-               devices = pci_dev_b(devices_link);
-               if (devices == NULL)
-                       continue;
-       }
-
        /*
         * PLX and SPKT related changes go here
         */
index 8e93b21225249fe489b8666b94a4ac407b43406b..4642f56e70e54c38aca1d98df27fee53b7761402 100644 (file)
@@ -102,7 +102,7 @@ static int __init tx_7segled_init_sysfs(void)
                        break;
                }
                dev->id = i;
-               dev->dev = &tx_7segled_subsys;
+               dev->bus = &tx_7segled_subsys;
                error = device_register(dev);
                if (!error) {
                        device_create_file(dev, &dev_attr_ascii);
index fd843877e84152d87d437fca5173b858336a104a..39e49091f64841873ee1d79d768aa677832c500f 100644 (file)
@@ -315,6 +315,13 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs)
        current->mm->free_area_cache = TASK_UNMAPPED_BASE;
        current->mm->cached_hole_size = 0;
 
+       retval = setup_arg_pages(bprm, IA32_STACK_TOP, EXSTACK_DEFAULT);
+       if (retval < 0) {
+               /* Someone check-me: is this error path enough? */
+               send_sig(SIGKILL, current, 0);
+               return retval;
+       }
+
        install_exec_creds(bprm);
        current->flags &= ~PF_FORKNOEXEC;
 
@@ -410,13 +417,6 @@ beyond_if:
 
        set_brk(current->mm->start_brk, current->mm->brk);
 
-       retval = setup_arg_pages(bprm, IA32_STACK_TOP, EXSTACK_DEFAULT);
-       if (retval < 0) {
-               /* Someone check-me: is this error path enough? */
-               send_sig(SIGKILL, current, 0);
-               return retval;
-       }
-
        current->mm->start_stack =
                (unsigned long)create_aout_tables((char __user *)bprm->p, bprm);
        /* start thread */
index fc45ba887d051e504dd592be40ec2e78d70eea33..e395693abdb16068cd2b268f258d9c79d3d0f3f3 100644 (file)
@@ -48,9 +48,9 @@ static void delay_loop(unsigned long loops)
 }
 
 /* TSC based delay: */
-static void delay_tsc(unsigned long loops)
+static void delay_tsc(unsigned long __loops)
 {
-       unsigned long bclock, now;
+       u32 bclock, now, loops = __loops;
        int cpu;
 
        preempt_disable();
index f581a18c0d4d7d07aac5cdfa8fb443106e3d5e92..8ecbb4bba4b3b44241b64b46079476ad90f7aad4 100644 (file)
@@ -333,13 +333,15 @@ try_again:
                 * Lookup failure means no vma is above this address,
                 * i.e. return with success:
                 */
-               if (!(vma = find_vma_prev(mm, addr, &prev_vma)))
+               vma = find_vma(mm, addr);
+               if (!vma)
                        return addr;
 
                /*
                 * new region fits between prev_vma->vm_end and
                 * vma->vm_start, use it:
                 */
+               prev_vma = vma->vm_prev;
                if (addr + len <= vma->vm_start &&
                            (!prev_vma || (addr >= prev_vma->vm_end))) {
                        /* remember the address as a hint for next time */
index a312e76063a7c4b1320eb80718cf81c33e7361dc..49a5cb55429b6ae51696f43c5a05c63a07df5566 100644 (file)
@@ -60,6 +60,16 @@ static const struct dmi_system_id pci_use_crs_table[] __initconst = {
                        DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
                },
        },
+       /* https://bugzilla.kernel.org/show_bug.cgi?id=42619 */
+       {
+               .callback = set_use_crs,
+               .ident = "MSI MS-7253",
+               .matches = {
+                       DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
+                       DMI_MATCH(DMI_BOARD_NAME, "MS-7253"),
+                       DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"),
+               },
+       },
 
        /* Now for the blacklist.. */
 
@@ -282,9 +292,6 @@ static void add_resources(struct pci_root_info *info)
        int i;
        struct resource *res, *root, *conflict;
 
-       if (!pci_use_crs)
-               return;
-
        coalesce_windows(info, IORESOURCE_MEM);
        coalesce_windows(info, IORESOURCE_IO);
 
@@ -336,8 +343,13 @@ get_current_resources(struct acpi_device *device, int busnum,
        acpi_walk_resources(device->handle, METHOD_NAME__CRS, setup_resource,
                                &info);
 
-       add_resources(&info);
-       return;
+       if (pci_use_crs) {
+               add_resources(&info);
+
+               return;
+       }
+
+       kfree(info.name);
 
 name_alloc_fail:
        kfree(info.res);
index 54eaf96ab217272a53579454dd297bfa60d1e55e..01c2cf4efcdde81ba9ec012ec67a1660524c8b86 100644 (file)
@@ -497,37 +497,22 @@ static void amba_device_release(struct device *dev)
 }
 
 /**
- *     amba_device_register - register an AMBA device
- *     @dev: AMBA device to register
- *     @parent: parent memory resource
+ *     amba_device_add - add a previously allocated AMBA device structure
+ *     @dev: AMBA device allocated by amba_device_alloc
+ *     @parent: resource parent for this devices resources
  *
- *     Setup the AMBA device, reading the cell ID if present.
- *     Claim the resource, and register the AMBA device with
- *     the Linux device manager.
+ *     Claim the resource, and read the device cell ID if not already
+ *     initialized.  Register the AMBA device with the Linux device
+ *     manager.
  */
-int amba_device_register(struct amba_device *dev, struct resource *parent)
+int amba_device_add(struct amba_device *dev, struct resource *parent)
 {
        u32 size;
        void __iomem *tmp;
        int i, ret;
 
-       device_initialize(&dev->dev);
-
-       /*
-        * Copy from device_add
-        */
-       if (dev->dev.init_name) {
-               dev_set_name(&dev->dev, "%s", dev->dev.init_name);
-               dev->dev.init_name = NULL;
-       }
-
-       dev->dev.release = amba_device_release;
-       dev->dev.bus = &amba_bustype;
-       dev->dev.dma_mask = &dev->dma_mask;
-       dev->res.name = dev_name(&dev->dev);
-
-       if (!dev->dev.coherent_dma_mask && dev->dma_mask)
-               dev_warn(&dev->dev, "coherent dma mask is unset\n");
+       WARN_ON(dev->irq[0] == (unsigned int)-1);
+       WARN_ON(dev->irq[1] == (unsigned int)-1);
 
        ret = request_resource(parent, &dev->res);
        if (ret)
@@ -582,9 +567,9 @@ int amba_device_register(struct amba_device *dev, struct resource *parent)
        if (ret)
                goto err_release;
 
-       if (dev->irq[0] != NO_IRQ)
+       if (dev->irq[0] && dev->irq[0] != NO_IRQ)
                ret = device_create_file(&dev->dev, &dev_attr_irq0);
-       if (ret == 0 && dev->irq[1] != NO_IRQ)
+       if (ret == 0 && dev->irq[1] && dev->irq[1] != NO_IRQ)
                ret = device_create_file(&dev->dev, &dev_attr_irq1);
        if (ret == 0)
                return ret;
@@ -596,6 +581,74 @@ int amba_device_register(struct amba_device *dev, struct resource *parent)
  err_out:
        return ret;
 }
+EXPORT_SYMBOL_GPL(amba_device_add);
+
+static void amba_device_initialize(struct amba_device *dev, const char *name)
+{
+       device_initialize(&dev->dev);
+       if (name)
+               dev_set_name(&dev->dev, "%s", name);
+       dev->dev.release = amba_device_release;
+       dev->dev.bus = &amba_bustype;
+       dev->dev.dma_mask = &dev->dma_mask;
+       dev->res.name = dev_name(&dev->dev);
+}
+
+/**
+ *     amba_device_alloc - allocate an AMBA device
+ *     @name: sysfs name of the AMBA device
+ *     @base: base of AMBA device
+ *     @size: size of AMBA device
+ *
+ *     Allocate and initialize an AMBA device structure.  Returns %NULL
+ *     on failure.
+ */
+struct amba_device *amba_device_alloc(const char *name, resource_size_t base,
+       size_t size)
+{
+       struct amba_device *dev;
+
+       dev = kzalloc(sizeof(*dev), GFP_KERNEL);
+       if (dev) {
+               amba_device_initialize(dev, name);
+               dev->res.start = base;
+               dev->res.end = base + size - 1;
+               dev->res.flags = IORESOURCE_MEM;
+       }
+
+       return dev;
+}
+EXPORT_SYMBOL_GPL(amba_device_alloc);
+
+/**
+ *     amba_device_register - register an AMBA device
+ *     @dev: AMBA device to register
+ *     @parent: parent memory resource
+ *
+ *     Setup the AMBA device, reading the cell ID if present.
+ *     Claim the resource, and register the AMBA device with
+ *     the Linux device manager.
+ */
+int amba_device_register(struct amba_device *dev, struct resource *parent)
+{
+       amba_device_initialize(dev, dev->dev.init_name);
+       dev->dev.init_name = NULL;
+
+       if (!dev->dev.coherent_dma_mask && dev->dma_mask)
+               dev_warn(&dev->dev, "coherent dma mask is unset\n");
+
+       return amba_device_add(dev, parent);
+}
+
+/**
+ *     amba_device_put - put an AMBA device
+ *     @dev: AMBA device to put
+ */
+void amba_device_put(struct amba_device *dev)
+{
+       put_device(&dev->dev);
+}
+EXPORT_SYMBOL_GPL(amba_device_put);
 
 /**
  *     amba_device_unregister - unregister an AMBA device
index 9baf11e8636205c413bd5c00498baab628657b44..744f078f4dd8311caed330939afbcdc29c2da913 100644 (file)
@@ -3832,7 +3832,7 @@ static int __floppy_read_block_0(struct block_device *bdev)
        bio.bi_size = size;
        bio.bi_bdev = bdev;
        bio.bi_sector = 0;
-       bio.bi_flags = BIO_QUIET;
+       bio.bi_flags = (1 << BIO_QUIET);
        init_completion(&complete);
        bio.bi_private = &complete;
        bio.bi_end_io = floppy_rb0_complete;
index 4a5b099c3bc5ac9430c9b24a651f326f0295c748..53404af2e748b74a6801f5d5f70079e4ce556a88 100644 (file)
@@ -321,6 +321,8 @@ static int cdv_chip_setup(struct drm_device *dev)
        cdv_get_core_freq(dev);
        gma_intel_opregion_init(dev);
        psb_intel_init_bios(dev);
+       REG_WRITE(PORT_HOTPLUG_EN, 0);
+       REG_WRITE(PORT_HOTPLUG_STAT, REG_READ(PORT_HOTPLUG_STAT));
        return 0;
 }
 
index 830dfdd6bf154a473e15357654cf4d19be8d6b81..be616735ec918502238df831ad59510513358996 100644 (file)
@@ -247,7 +247,6 @@ static struct fb_ops psbfb_roll_ops = {
        .fb_imageblit = cfb_imageblit,
        .fb_pan_display = psbfb_pan,
        .fb_mmap = psbfb_mmap,
-       .fb_sync = psbfb_sync,
        .fb_ioctl = psbfb_ioctl,
 };
 
index 5d5330f667f14031512c022e12ed3d8eb61bc530..aff194fbe9f3ee00c627e012f8d364af3caa2f8d 100644 (file)
@@ -446,10 +446,9 @@ int psb_gtt_init(struct drm_device *dev, int resume)
        pg->gtt_start = pci_resource_start(dev->pdev, PSB_GTT_RESOURCE);
        gtt_pages = pci_resource_len(dev->pdev, PSB_GTT_RESOURCE)
                                                                >> PAGE_SHIFT;
-       /* Some CDV firmware doesn't report this currently. In which case the
-          system has 64 gtt pages */
+       /* CDV doesn't report this. In which case the system has 64 gtt pages */
        if (pg->gtt_start == 0 || gtt_pages == 0) {
-               dev_err(dev->dev, "GTT PCI BAR not initialized.\n");
+               dev_dbg(dev->dev, "GTT PCI BAR not initialized.\n");
                gtt_pages = 64;
                pg->gtt_start = dev_priv->pge_ctl;
        }
@@ -461,10 +460,10 @@ int psb_gtt_init(struct drm_device *dev, int resume)
 
        if (pg->gatt_pages == 0 || pg->gatt_start == 0) {
                static struct resource fudge;   /* Preferably peppermint */
-               /* This can occur on CDV SDV systems. Fudge it in this case.
+               /* This can occur on CDV systems. Fudge it in this case.
                   We really don't care what imaginary space is being allocated
                   at this point */
-               dev_err(dev->dev, "GATT PCI BAR not initialized.\n");
+               dev_dbg(dev->dev, "GATT PCI BAR not initialized.\n");
                pg->gatt_start = 0x40000000;
                pg->gatt_pages = (128 * 1024 * 1024) >> PAGE_SHIFT;
                /* This is a little confusing but in fact the GTT is providing
index fbcd84803b60375b74c87b8e88df4caabf92b333..17ca72ce30277332965fa7772884a93764c0664a 100644 (file)
@@ -2362,6 +2362,9 @@ void r600_semaphore_ring_emit(struct radeon_device *rdev,
        uint64_t addr = semaphore->gpu_addr;
        unsigned sel = emit_wait ? PACKET3_SEM_SEL_WAIT : PACKET3_SEM_SEL_SIGNAL;
 
+       if (rdev->family < CHIP_CAYMAN)
+               sel |= PACKET3_SEM_WAIT_ON_SIGNAL;
+
        radeon_ring_write(ring, PACKET3(PACKET3_MEM_SEMAPHORE, 1));
        radeon_ring_write(ring, addr & 0xffffffff);
        radeon_ring_write(ring, (upper_32_bits(addr) & 0xff) | sel);
index 2d1f6c5ee2a77e0466f91ceb2e4b4f28cd0cf218..73e2c7c6edbc63c02e35a198a684e40708c65c8f 100644 (file)
@@ -313,6 +313,10 @@ const u32 r6xx_default_state[] =
        0x00000000, /* VGT_REUSE_OFF */
        0x00000000, /* VGT_VTX_CNT_EN */
 
+       0xc0016900,
+       0x000000d4,
+       0x00000000, /* SX_MISC */
+
        0xc0016900,
        0x000002c8,
        0x00000000, /* VGT_STRMOUT_BUFFER_EN */
@@ -625,6 +629,10 @@ const u32 r7xx_default_state[] =
        0x00000000, /* VGT_REUSE_OFF */
        0x00000000, /* VGT_VTX_CNT_EN */
 
+       0xc0016900,
+       0x000000d4,
+       0x00000000, /* SX_MISC */
+
        0xc0016900,
        0x000002c8,
        0x00000000, /* VGT_STRMOUT_BUFFER_EN */
index 3ee1fd7ef3947d1f624ae8a059d9c511ea15eead..9b23670716f1fa4241ca6cd1cbd6d6186a832049 100644 (file)
 #define        PACKET3_STRMOUT_BUFFER_UPDATE                   0x34
 #define        PACKET3_INDIRECT_BUFFER_MP                      0x38
 #define        PACKET3_MEM_SEMAPHORE                           0x39
+#              define PACKET3_SEM_WAIT_ON_SIGNAL    (0x1 << 12)
 #              define PACKET3_SEM_SEL_SIGNAL       (0x6 << 29)
 #              define PACKET3_SEM_SEL_WAIT         (0x7 << 29)
 #define        PACKET3_MPEG_INDEX                              0x3A
index 8b3d8ed52ff66051e11b4edaa29d9d1e2bc6df1e..8c9a8115b632b255f3ad5deb2a88c1aee5dfffc6 100644 (file)
@@ -1057,7 +1057,7 @@ static int radeon_dvi_mode_valid(struct drm_connector *connector,
                    (radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_HDMI_TYPE_B))
                        return MODE_OK;
                else if (radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_HDMI_TYPE_A) {
-                       if (ASIC_IS_DCE3(rdev)) {
+                       if (0) {
                                /* HDMI 1.3+ supports max clock of 340 Mhz */
                                if (mode->clock > 340000)
                                        return MODE_CLOCK_HIGH;
index 8c49fef1ce78d01765f0565b517f1f9bc23a5a1c..3d314338d8432398580a6789a78696f50c36871f 100644 (file)
@@ -1078,15 +1078,21 @@ static const struct drm_framebuffer_funcs radeon_fb_funcs = {
        .create_handle = radeon_user_framebuffer_create_handle,
 };
 
-void
+int
 radeon_framebuffer_init(struct drm_device *dev,
                        struct radeon_framebuffer *rfb,
                        struct drm_mode_fb_cmd2 *mode_cmd,
                        struct drm_gem_object *obj)
 {
+       int ret;
        rfb->obj = obj;
-       drm_framebuffer_init(dev, &rfb->base, &radeon_fb_funcs);
+       ret = drm_framebuffer_init(dev, &rfb->base, &radeon_fb_funcs);
+       if (ret) {
+               rfb->obj = NULL;
+               return ret;
+       }
        drm_helper_mode_fill_fb_struct(&rfb->base, mode_cmd);
+       return 0;
 }
 
 static struct drm_framebuffer *
@@ -1096,6 +1102,7 @@ radeon_user_framebuffer_create(struct drm_device *dev,
 {
        struct drm_gem_object *obj;
        struct radeon_framebuffer *radeon_fb;
+       int ret;
 
        obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
        if (obj ==  NULL) {
@@ -1108,7 +1115,12 @@ radeon_user_framebuffer_create(struct drm_device *dev,
        if (radeon_fb == NULL)
                return ERR_PTR(-ENOMEM);
 
-       radeon_framebuffer_init(dev, radeon_fb, mode_cmd, obj);
+       ret = radeon_framebuffer_init(dev, radeon_fb, mode_cmd, obj);
+       if (ret) {
+               kfree(radeon_fb);
+               drm_gem_object_unreference_unlocked(obj);
+               return NULL;
+       }
 
        return &radeon_fb->base;
 }
index 9419c51bcf50f0f98f86cfd8122730ceea70a4d6..26e92708d114a8eb64c4a27996911b3c2a61e73f 100644 (file)
@@ -307,8 +307,6 @@ void radeon_panel_mode_fixup(struct drm_encoder *encoder,
 bool radeon_dig_monitor_is_duallink(struct drm_encoder *encoder,
                                    u32 pixel_clock)
 {
-       struct drm_device *dev = encoder->dev;
-       struct radeon_device *rdev = dev->dev_private;
        struct drm_connector *connector;
        struct radeon_connector *radeon_connector;
        struct radeon_connector_atom_dig *dig_connector;
@@ -326,7 +324,7 @@ bool radeon_dig_monitor_is_duallink(struct drm_encoder *encoder,
        case DRM_MODE_CONNECTOR_HDMIB:
                if (radeon_connector->use_digital) {
                        /* HDMI 1.3 supports up to 340 Mhz over single link */
-                       if (ASIC_IS_DCE3(rdev) && drm_detect_hdmi_monitor(radeon_connector->edid)) {
+                       if (0 && drm_detect_hdmi_monitor(radeon_connector->edid)) {
                                if (pixel_clock > 340000)
                                        return true;
                                else
@@ -348,7 +346,7 @@ bool radeon_dig_monitor_is_duallink(struct drm_encoder *encoder,
                        return false;
                else {
                        /* HDMI 1.3 supports up to 340 Mhz over single link */
-                       if (ASIC_IS_DCE3(rdev) && drm_detect_hdmi_monitor(radeon_connector->edid)) {
+                       if (0 && drm_detect_hdmi_monitor(radeon_connector->edid)) {
                                if (pixel_clock > 340000)
                                        return true;
                                else
index cf2bf35b56b8efea936066b469d3211dbe607de1..195471cf65d3240dfb83e413f85a47bd0b0e9720 100644 (file)
@@ -209,6 +209,11 @@ static int radeonfb_create(struct radeon_fbdev *rfbdev,
                                                          sizes->surface_depth);
 
        ret = radeonfb_create_pinned_object(rfbdev, &mode_cmd, &gobj);
+       if (ret) {
+               DRM_ERROR("failed to create fbcon object %d\n", ret);
+               return ret;
+       }
+
        rbo = gem_to_radeon_bo(gobj);
 
        /* okay we have an object now allocate the framebuffer */
@@ -220,7 +225,11 @@ static int radeonfb_create(struct radeon_fbdev *rfbdev,
 
        info->par = rfbdev;
 
-       radeon_framebuffer_init(rdev->ddev, &rfbdev->rfb, &mode_cmd, gobj);
+       ret = radeon_framebuffer_init(rdev->ddev, &rfbdev->rfb, &mode_cmd, gobj);
+       if (ret) {
+               DRM_ERROR("failed to initalise framebuffer %d\n", ret);
+               goto out_unref;
+       }
 
        fb = &rfbdev->rfb.base;
 
index 4330e3253573ffeb92a5dab9f39223e074fc65ca..8a85598fb242a4f5c9ed666104020e2e90a651c5 100644 (file)
@@ -649,7 +649,7 @@ extern void radeon_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
                                     u16 blue, int regno);
 extern void radeon_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
                                     u16 *blue, int regno);
-void radeon_framebuffer_init(struct drm_device *dev,
+int radeon_framebuffer_init(struct drm_device *dev,
                             struct radeon_framebuffer *rfb,
                             struct drm_mode_fb_cmd2 *mode_cmd,
                             struct drm_gem_object *obj);
index b8574cddd95352a360ef7ff67200527185b3c1fb..63552e30d0c38986308ad2a385bccd8ab6bb9218 100644 (file)
@@ -59,6 +59,9 @@
 #define USB_VENDOR_ID_AIRCABLE         0x16CA
 #define USB_DEVICE_ID_AIRCABLE1                0x1502
 
+#define USB_VENDOR_ID_AIREN            0x1a2c
+#define USB_DEVICE_ID_AIREN_SLIMPLUS   0x0002
+
 #define USB_VENDOR_ID_ALCOR            0x058f
 #define USB_DEVICE_ID_ALCOR_USBRS232   0x9720
 
index 9333d692a786b03df115ebe87d920e748b607dc6..627850a54d34ecd6da97f281324b1eff98a368fc 100644 (file)
@@ -986,8 +986,13 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
                return;
        }
 
-       /* Ignore out-of-range values as per HID specification, section 5.10 */
-       if (value < field->logical_minimum || value > field->logical_maximum) {
+       /*
+        * Ignore out-of-range values as per HID specification,
+        * section 5.10 and 6.2.25
+        */
+       if ((field->flags & HID_MAIN_ITEM_VARIABLE) &&
+           (value < field->logical_minimum ||
+            value > field->logical_maximum)) {
                dbg_hid("Ignoring out-of-range value %x\n", value);
                return;
        }
index c831af937481c66123965743f62aaf5f8a634b3c..57d4e1e1df48df061461681449f5e98f49c20a1e 100644 (file)
@@ -54,6 +54,7 @@ static const struct hid_blacklist {
        { USB_VENDOR_ID_PLAYDOTCOM, USB_DEVICE_ID_PLAYDOTCOM_EMS_USBII, HID_QUIRK_MULTI_INPUT },
        { USB_VENDOR_ID_TOUCHPACK, USB_DEVICE_ID_TOUCHPACK_RTS, HID_QUIRK_MULTI_INPUT },
 
+       { USB_VENDOR_ID_AIREN, USB_DEVICE_ID_AIREN_SLIMPLUS, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET },
index 02260406b9e440ac406ac3ae7fc3cded1f05bb4e..dad895fec62a3279d447b8049e5e63e430198ad2 100644 (file)
@@ -497,8 +497,9 @@ config SENSORS_JC42
          If you say yes here, you get support for JEDEC JC42.4 compliant
          temperature sensors, which are used on many DDR3 memory modules for
          mobile devices and servers.  Support will include, but not be limited
-         to, ADT7408, CAT34TS02, CAT6095, MAX6604, MCP9805, MCP98242, MCP98243,
-         MCP9843, SE97, SE98, STTS424(E), TSE2002B3, and TS3000B3.
+         to, ADT7408, AT30TS00, CAT34TS02, CAT6095, MAX6604, MCP9804, MCP9805,
+         MCP98242, MCP98243, MCP9843, SE97, SE98, STTS424(E), STTS2002,
+         STTS3000, TSE2002B3, TSE2002GB2, TS3000B3, and TS3000GB2.
 
          This driver can also be built as a module.  If so, the module
          will be called jc42.
index 28c09eead36baf1ae8360990613d8c694ffa4f29..b927ee5ccdd745dc57f065686a82bf190c5786e7 100644 (file)
@@ -64,6 +64,7 @@ static const unsigned short normal_i2c[] = {
 
 /* Manufacturer IDs */
 #define ADT_MANID              0x11d4  /* Analog Devices */
+#define ATMEL_MANID            0x001f  /* Atmel */
 #define MAX_MANID              0x004d  /* Maxim */
 #define IDT_MANID              0x00b3  /* IDT */
 #define MCP_MANID              0x0054  /* Microchip */
@@ -77,15 +78,25 @@ static const unsigned short normal_i2c[] = {
 #define ADT7408_DEVID          0x0801
 #define ADT7408_DEVID_MASK     0xffff
 
+/* Atmel */
+#define AT30TS00_DEVID         0x8201
+#define AT30TS00_DEVID_MASK    0xffff
+
 /* IDT */
 #define TS3000B3_DEVID         0x2903  /* Also matches TSE2002B3 */
 #define TS3000B3_DEVID_MASK    0xffff
 
+#define TS3000GB2_DEVID                0x2912  /* Also matches TSE2002GB2 */
+#define TS3000GB2_DEVID_MASK   0xffff
+
 /* Maxim */
 #define MAX6604_DEVID          0x3e00
 #define MAX6604_DEVID_MASK     0xffff
 
 /* Microchip */
+#define MCP9804_DEVID          0x0200
+#define MCP9804_DEVID_MASK     0xfffc
+
 #define MCP98242_DEVID         0x2000
 #define MCP98242_DEVID_MASK    0xfffc
 
@@ -113,6 +124,12 @@ static const unsigned short normal_i2c[] = {
 #define STTS424E_DEVID         0x0000
 #define STTS424E_DEVID_MASK    0xfffe
 
+#define STTS2002_DEVID         0x0300
+#define STTS2002_DEVID_MASK    0xffff
+
+#define STTS3000_DEVID         0x0200
+#define STTS3000_DEVID_MASK    0xffff
+
 static u16 jc42_hysteresis[] = { 0, 1500, 3000, 6000 };
 
 struct jc42_chips {
@@ -123,8 +140,11 @@ struct jc42_chips {
 
 static struct jc42_chips jc42_chips[] = {
        { ADT_MANID, ADT7408_DEVID, ADT7408_DEVID_MASK },
+       { ATMEL_MANID, AT30TS00_DEVID, AT30TS00_DEVID_MASK },
        { IDT_MANID, TS3000B3_DEVID, TS3000B3_DEVID_MASK },
+       { IDT_MANID, TS3000GB2_DEVID, TS3000GB2_DEVID_MASK },
        { MAX_MANID, MAX6604_DEVID, MAX6604_DEVID_MASK },
+       { MCP_MANID, MCP9804_DEVID, MCP9804_DEVID_MASK },
        { MCP_MANID, MCP98242_DEVID, MCP98242_DEVID_MASK },
        { MCP_MANID, MCP98243_DEVID, MCP98243_DEVID_MASK },
        { MCP_MANID, MCP9843_DEVID, MCP9843_DEVID_MASK },
@@ -133,6 +153,8 @@ static struct jc42_chips jc42_chips[] = {
        { NXP_MANID, SE98_DEVID, SE98_DEVID_MASK },
        { STM_MANID, STTS424_DEVID, STTS424_DEVID_MASK },
        { STM_MANID, STTS424E_DEVID, STTS424E_DEVID_MASK },
+       { STM_MANID, STTS2002_DEVID, STTS2002_DEVID_MASK },
+       { STM_MANID, STTS3000_DEVID, STTS3000_DEVID_MASK },
 };
 
 /* Each client has this additional data */
@@ -159,10 +181,12 @@ static struct jc42_data *jc42_update_device(struct device *dev);
 
 static const struct i2c_device_id jc42_id[] = {
        { "adt7408", 0 },
+       { "at30ts00", 0 },
        { "cat94ts02", 0 },
        { "cat6095", 0 },
        { "jc42", 0 },
        { "max6604", 0 },
+       { "mcp9804", 0 },
        { "mcp9805", 0 },
        { "mcp98242", 0 },
        { "mcp98243", 0 },
@@ -171,8 +195,10 @@ static const struct i2c_device_id jc42_id[] = {
        { "se97b", 0 },
        { "se98", 0 },
        { "stts424", 0 },
-       { "tse2002b3", 0 },
-       { "ts3000b3", 0 },
+       { "stts2002", 0 },
+       { "stts3000", 0 },
+       { "tse2002", 0 },
+       { "ts3000", 0 },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, jc42_id);
index 00460d8d84239e57c880238469df0f2965c9b976..d89b33967a852b8975f09cb5cea88371f1d52e85 100644 (file)
@@ -54,7 +54,8 @@
                                                   lcrit_alarm, crit_alarm */
 #define PMBUS_IOUT_BOOLEANS_PER_PAGE   3       /* alarm, lcrit_alarm,
                                                   crit_alarm */
-#define PMBUS_POUT_BOOLEANS_PER_PAGE   2       /* alarm, crit_alarm */
+#define PMBUS_POUT_BOOLEANS_PER_PAGE   3       /* cap_alarm, alarm, crit_alarm
+                                                */
 #define PMBUS_MAX_BOOLEANS_PER_FAN     2       /* alarm, fault */
 #define PMBUS_MAX_BOOLEANS_PER_TEMP    4       /* min_alarm, max_alarm,
                                                   lcrit_alarm, crit_alarm */
index 48c7b4a716ae49dfec79a51ff3ac0362849973cd..880b90cf4d3260ce4bb6c586fd34d0d895fea0bc 100644 (file)
@@ -33,6 +33,7 @@ enum chips { zl2004, zl2005, zl2006, zl2008, zl2105, zl2106, zl6100, zl6105 };
 struct zl6100_data {
        int id;
        ktime_t access;         /* chip access time */
+       int delay;              /* Delay between chip accesses in uS */
        struct pmbus_driver_info info;
 };
 
@@ -52,10 +53,10 @@ MODULE_PARM_DESC(delay, "Delay between chip accesses in uS");
 /* Some chips need a delay between accesses */
 static inline void zl6100_wait(const struct zl6100_data *data)
 {
-       if (delay) {
+       if (data->delay) {
                s64 delta = ktime_us_delta(ktime_get(), data->access);
-               if (delta < delay)
-                       udelay(delay - delta);
+               if (delta < data->delay)
+                       udelay(data->delay - delta);
        }
 }
 
@@ -207,8 +208,9 @@ static int zl6100_probe(struct i2c_client *client,
         * can be cleared later for additional chips if tests show that it
         * is not needed (in other words, better be safe than sorry).
         */
+       data->delay = delay;
        if (data->id == zl2004 || data->id == zl6105)
-               delay = 0;
+               data->delay = 0;
 
        /*
         * Since there was a direct I2C device access above, wait before
index afc166fcc3d9c41ad6654bae17d5c893382c3705..7df5bfef2624d5c1e49bd39208135c29aaed8653 100644 (file)
@@ -332,7 +332,7 @@ static ssize_t evdev_write(struct file *file, const char __user *buffer,
        struct evdev_client *client = file->private_data;
        struct evdev *evdev = client->evdev;
        struct input_event event;
-       int retval;
+       int retval = 0;
 
        if (count < input_event_size())
                return -EINVAL;
index 37651373a95b0ebb19d25ca32cfcd62599ee4a9b..f3bc4189a7ba136154d418b49028cccb680fb970 100644 (file)
@@ -172,7 +172,7 @@ static void twl4030_vibra_close(struct input_dev *input)
 }
 
 /*** Module ***/
-#if CONFIG_PM
+#if CONFIG_PM_SLEEP
 static int twl4030_vibra_suspend(struct device *dev)
 {
        struct platform_device *pdev = to_platform_device(dev);
@@ -189,10 +189,10 @@ static int twl4030_vibra_resume(struct device *dev)
        vibra_disable_leds();
        return 0;
 }
+#endif
 
 static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops,
                         twl4030_vibra_suspend, twl4030_vibra_resume);
-#endif
 
 static int __devinit twl4030_vibra_probe(struct platform_device *pdev)
 {
@@ -273,9 +273,7 @@ static struct platform_driver twl4030_vibra_driver = {
        .driver         = {
                .name   = "twl4030-vibra",
                .owner  = THIS_MODULE,
-#ifdef CONFIG_PM
                .pm     = &twl4030_vibra_pm_ops,
-#endif
        },
 };
 module_platform_driver(twl4030_vibra_driver);
index bd87380bd879edcfd9a278d53c887c444a14b9d6..4c6a72d3d48c33c875efe6b969652d0f45961270 100644 (file)
@@ -952,7 +952,9 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
 
        /*
         * First try "E6 report".
-        * ALPS should return 0,0,10 or 0,0,100
+        * ALPS should return 0,0,10 or 0,0,100 if no buttons are pressed.
+        * The bits 0-2 of the first byte will be 1s if some buttons are
+        * pressed.
         */
        param[0] = 0;
        if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) ||
@@ -968,7 +970,8 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
        psmouse_dbg(psmouse, "E6 report: %2.2x %2.2x %2.2x",
                    param[0], param[1], param[2]);
 
-       if (param[0] != 0 || param[1] != 0 || (param[2] != 10 && param[2] != 100))
+       if ((param[0] & 0xf8) != 0 || param[1] != 0 ||
+           (param[2] != 10 && param[2] != 100))
                return NULL;
 
        /*
index d4d08bd9205b87b7ddc617c55fee84ec6259a2b8..bd5b10eeeb407d595bab57117a1e321ea2d26ee9 100644 (file)
@@ -92,8 +92,7 @@ static irqreturn_t ams_delta_serio_interrupt(int irq, void *dev_id)
 static int ams_delta_serio_open(struct serio *serio)
 {
        /* enable keyboard */
-       ams_delta_latch2_write(AMD_DELTA_LATCH2_KEYBRD_PWR,
-                       AMD_DELTA_LATCH2_KEYBRD_PWR);
+       gpio_set_value(AMS_DELTA_GPIO_PIN_KEYBRD_PWR, 1);
 
        return 0;
 }
@@ -101,9 +100,32 @@ static int ams_delta_serio_open(struct serio *serio)
 static void ams_delta_serio_close(struct serio *serio)
 {
        /* disable keyboard */
-       ams_delta_latch2_write(AMD_DELTA_LATCH2_KEYBRD_PWR, 0);
+       gpio_set_value(AMS_DELTA_GPIO_PIN_KEYBRD_PWR, 0);
 }
 
+static const struct gpio ams_delta_gpios[] __initconst_or_module = {
+       {
+               .gpio   = AMS_DELTA_GPIO_PIN_KEYBRD_DATA,
+               .flags  = GPIOF_DIR_IN,
+               .label  = "serio-data",
+       },
+       {
+               .gpio   = AMS_DELTA_GPIO_PIN_KEYBRD_CLK,
+               .flags  = GPIOF_DIR_IN,
+               .label  = "serio-clock",
+       },
+       {
+               .gpio   = AMS_DELTA_GPIO_PIN_KEYBRD_PWR,
+               .flags  = GPIOF_OUT_INIT_LOW,
+               .label  = "serio-power",
+       },
+       {
+               .gpio   = AMS_DELTA_GPIO_PIN_KEYBRD_DATAOUT,
+               .flags  = GPIOF_OUT_INIT_LOW,
+               .label  = "serio-dataout",
+       },
+};
+
 static int __init ams_delta_serio_init(void)
 {
        int err;
@@ -123,19 +145,12 @@ static int __init ams_delta_serio_init(void)
        strlcpy(ams_delta_serio->phys, "GPIO/serio0",
                        sizeof(ams_delta_serio->phys));
 
-       err = gpio_request(AMS_DELTA_GPIO_PIN_KEYBRD_DATA, "serio-data");
+       err = gpio_request_array(ams_delta_gpios,
+                               ARRAY_SIZE(ams_delta_gpios));
        if (err) {
-               pr_err("ams_delta_serio: Couldn't request gpio pin for data\n");
+               pr_err("ams_delta_serio: Couldn't request gpio pins\n");
                goto serio;
        }
-       gpio_direction_input(AMS_DELTA_GPIO_PIN_KEYBRD_DATA);
-
-       err = gpio_request(AMS_DELTA_GPIO_PIN_KEYBRD_CLK, "serio-clock");
-       if (err) {
-               pr_err("ams_delta_serio: couldn't request gpio pin for clock\n");
-               goto gpio_data;
-       }
-       gpio_direction_input(AMS_DELTA_GPIO_PIN_KEYBRD_CLK);
 
        err = request_irq(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK),
                        ams_delta_serio_interrupt, IRQ_TYPE_EDGE_RISING,
@@ -143,7 +158,7 @@ static int __init ams_delta_serio_init(void)
        if (err < 0) {
                pr_err("ams_delta_serio: couldn't request gpio interrupt %d\n",
                                gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK));
-               goto gpio_clk;
+               goto gpio;
        }
        /*
         * Since GPIO register handling for keyboard clock pin is performed
@@ -157,10 +172,9 @@ static int __init ams_delta_serio_init(void)
        dev_info(&ams_delta_serio->dev, "%s\n", ams_delta_serio->name);
 
        return 0;
-gpio_clk:
-       gpio_free(AMS_DELTA_GPIO_PIN_KEYBRD_CLK);
-gpio_data:
-       gpio_free(AMS_DELTA_GPIO_PIN_KEYBRD_DATA);
+gpio:
+       gpio_free_array(ams_delta_gpios,
+                       ARRAY_SIZE(ams_delta_gpios));
 serio:
        kfree(ams_delta_serio);
        return err;
@@ -171,7 +185,7 @@ static void __exit ams_delta_serio_exit(void)
 {
        serio_unregister_port(ams_delta_serio);
        free_irq(OMAP_GPIO_IRQ(AMS_DELTA_GPIO_PIN_KEYBRD_CLK), 0);
-       gpio_free(AMS_DELTA_GPIO_PIN_KEYBRD_CLK);
-       gpio_free(AMS_DELTA_GPIO_PIN_KEYBRD_DATA);
+       gpio_free_array(ams_delta_gpios,
+                       ARRAY_SIZE(ams_delta_gpios));
 }
 module_exit(ams_delta_serio_exit);
index 58a87755b936eee386811396b9ba0ae418a3e0ea..e53f4081a586956974bea8731d366366515ff6f8 100644 (file)
@@ -77,6 +77,8 @@ config TABLET_USB_WACOM
        tristate "Wacom Intuos/Graphire tablet support (USB)"
        depends on USB_ARCH_HAS_HCD
        select USB
+       select NEW_LEDS
+       select LEDS_CLASS
        help
          Say Y here if you want to use the USB version of the Wacom Intuos
          or Graphire tablet.  Make sure to say Y to "Mouse support"
index 88672ec296c116e10d7340c7f07397e10e09afe1..cd3ed29e0801347f20fb9b5da9e2fbbddfbd14b5 100644 (file)
@@ -926,7 +926,7 @@ static int wacom_bpt3_touch(struct wacom_wac *wacom)
 {
        struct input_dev *input = wacom->input;
        unsigned char *data = wacom->data;
-       int count = data[1] & 0x03;
+       int count = data[1] & 0x07;
        int i;
 
        if (data[0] != 0x02)
index bdea288dc185c619e7e944a2959ed215e2a22c10..a35e98ad97258a47e39152361e2b435fa9ba7f07 100644 (file)
@@ -275,7 +275,7 @@ static void iommu_set_exclusion_range(struct amd_iommu *iommu)
 }
 
 /* Programs the physical address of the device table into the IOMMU hardware */
-static void __init iommu_set_device_table(struct amd_iommu *iommu)
+static void iommu_set_device_table(struct amd_iommu *iommu)
 {
        u64 entry;
 
index 9ca28fced2b9d4d17facfbe03922a8079d831615..f5d5c03676f8a0ffccf046648b9ebf55bab8b1d8 100644 (file)
@@ -74,13 +74,6 @@ config LEDS_S3C24XX
          This option enables support for LEDs connected to GPIO lines
          on Samsung S3C24XX series CPUs, such as the S3C2410 and S3C2440.
 
-config LEDS_AMS_DELTA
-       tristate "LED Support for the Amstrad Delta (E3)"
-       depends on LEDS_CLASS
-       depends on MACH_AMS_DELTA
-       help
-         This option enables support for the LEDs on Amstrad Delta (E3).
-
 config LEDS_NET48XX
        tristate "LED Support for Soekris net48xx series Error LED"
        depends on LEDS_CLASS
index 1fc6875a8b201d02a1d59122548948955829de1d..8cab1bb96b5dc1f37e764c418269cea0e566f7e8 100644 (file)
@@ -12,7 +12,6 @@ obj-$(CONFIG_LEDS_LOCOMO)             += leds-locomo.o
 obj-$(CONFIG_LEDS_LM3530)              += leds-lm3530.o
 obj-$(CONFIG_LEDS_MIKROTIK_RB532)      += leds-rb532.o
 obj-$(CONFIG_LEDS_S3C24XX)             += leds-s3c24xx.o
-obj-$(CONFIG_LEDS_AMS_DELTA)           += leds-ams-delta.o
 obj-$(CONFIG_LEDS_NET48XX)             += leds-net48xx.o
 obj-$(CONFIG_LEDS_NET5501)             += leds-net5501.o
 obj-$(CONFIG_LEDS_WRAP)                        += leds-wrap.o
diff --git a/drivers/leds/leds-ams-delta.c b/drivers/leds/leds-ams-delta.c
deleted file mode 100644 (file)
index 0742835..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * LEDs driver for Amstrad Delta (E3)
- *
- * Copyright (C) 2006 Jonathan McDowell <noodles@earth.li>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/leds.h>
-#include <plat/board-ams-delta.h>
-
-/*
- * Our context
- */
-struct ams_delta_led {
-       struct led_classdev     cdev;
-       u8                      bitmask;
-};
-
-static void ams_delta_led_set(struct led_classdev *led_cdev,
-               enum led_brightness value)
-{
-       struct ams_delta_led *led_dev =
-               container_of(led_cdev, struct ams_delta_led, cdev);
-
-       if (value)
-               ams_delta_latch1_write(led_dev->bitmask, led_dev->bitmask);
-       else
-               ams_delta_latch1_write(led_dev->bitmask, 0);
-}
-
-static struct ams_delta_led ams_delta_leds[] = {
-       {
-               .cdev           = {
-                       .name           = "ams-delta::camera",
-                       .brightness_set = ams_delta_led_set,
-               },
-               .bitmask        = AMS_DELTA_LATCH1_LED_CAMERA,
-       },
-       {
-               .cdev           = {
-                       .name           = "ams-delta::advert",
-                       .brightness_set = ams_delta_led_set,
-               },
-               .bitmask        = AMS_DELTA_LATCH1_LED_ADVERT,
-       },
-       {
-               .cdev           = {
-                       .name           = "ams-delta::email",
-                       .brightness_set = ams_delta_led_set,
-               },
-               .bitmask        = AMS_DELTA_LATCH1_LED_EMAIL,
-       },
-       {
-               .cdev           = {
-                       .name           = "ams-delta::handsfree",
-                       .brightness_set = ams_delta_led_set,
-               },
-               .bitmask        = AMS_DELTA_LATCH1_LED_HANDSFREE,
-       },
-       {
-               .cdev           = {
-                       .name           = "ams-delta::voicemail",
-                       .brightness_set = ams_delta_led_set,
-               },
-               .bitmask        = AMS_DELTA_LATCH1_LED_VOICEMAIL,
-       },
-       {
-               .cdev           = {
-                       .name           = "ams-delta::voice",
-                       .brightness_set = ams_delta_led_set,
-               },
-               .bitmask        = AMS_DELTA_LATCH1_LED_VOICE,
-       },
-};
-
-static int ams_delta_led_probe(struct platform_device *pdev)
-{
-       int i, ret;
-
-       for (i = 0; i < ARRAY_SIZE(ams_delta_leds); i++) {
-               ams_delta_leds[i].cdev.flags |= LED_CORE_SUSPENDRESUME;
-               ret = led_classdev_register(&pdev->dev,
-                               &ams_delta_leds[i].cdev);
-               if (ret < 0)
-                       goto fail;
-       }
-
-       return 0;
-fail:
-       while (--i >= 0)
-               led_classdev_unregister(&ams_delta_leds[i].cdev);
-       return ret;     
-}
-
-static int ams_delta_led_remove(struct platform_device *pdev)
-{
-       int i;
-
-       for (i = 0; i < ARRAY_SIZE(ams_delta_leds); i++)
-               led_classdev_unregister(&ams_delta_leds[i].cdev);
-
-       return 0;
-}
-
-static struct platform_driver ams_delta_led_driver = {
-       .probe          = ams_delta_led_probe,
-       .remove         = ams_delta_led_remove,
-       .driver         = {
-               .name = "ams-delta-led",
-               .owner = THIS_MODULE,
-       },
-};
-
-module_platform_driver(ams_delta_led_driver);
-
-MODULE_AUTHOR("Jonathan McDowell <noodles@earth.li>");
-MODULE_DESCRIPTION("Amstrad Delta LED driver");
-MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:ams-delta-led");
index 9fb18c147825aef18fb859ad9bc4faafa7d5e6c9..b280c433e4a08196c0fe3d5166d9fb9f0879704f 100644 (file)
@@ -323,7 +323,7 @@ static int flakey_end_io(struct dm_target *ti, struct bio *bio,
         * Corrupt successful READs while in down state.
         * If flags were specified, only corrupt those that match.
         */
-       if (!error && bio_submitted_while_down &&
+       if (fc->corrupt_bio_byte && !error && bio_submitted_while_down &&
            (bio_data_dir(bio) == READ) && (fc->corrupt_bio_rw == READ) &&
            all_corrupt_bio_flags_match(bio, fc))
                corrupt_bio_data(bio, fc);
index ad2eba40e3190e700eab3136b8af5dd150cbf208..ea5dd289fe2a591cf62246eb10b36ab445de201f 100644 (file)
@@ -296,6 +296,8 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where,
        unsigned offset;
        unsigned num_bvecs;
        sector_t remaining = where->count;
+       struct request_queue *q = bdev_get_queue(where->bdev);
+       sector_t discard_sectors;
 
        /*
         * where->count may be zero if rw holds a flush and we need to
@@ -305,9 +307,12 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where,
                /*
                 * Allocate a suitably sized-bio.
                 */
-               num_bvecs = dm_sector_div_up(remaining,
-                                            (PAGE_SIZE >> SECTOR_SHIFT));
-               num_bvecs = min_t(int, bio_get_nr_vecs(where->bdev), num_bvecs);
+               if (rw & REQ_DISCARD)
+                       num_bvecs = 1;
+               else
+                       num_bvecs = min_t(int, bio_get_nr_vecs(where->bdev),
+                                         dm_sector_div_up(remaining, (PAGE_SIZE >> SECTOR_SHIFT)));
+
                bio = bio_alloc_bioset(GFP_NOIO, num_bvecs, io->client->bios);
                bio->bi_sector = where->sector + (where->count - remaining);
                bio->bi_bdev = where->bdev;
@@ -315,10 +320,14 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where,
                bio->bi_destructor = dm_bio_destructor;
                store_io_and_region_in_bio(bio, io, region);
 
-               /*
-                * Try and add as many pages as possible.
-                */
-               while (remaining) {
+               if (rw & REQ_DISCARD) {
+                       discard_sectors = min_t(sector_t, q->limits.max_discard_sectors, remaining);
+                       bio->bi_size = discard_sectors << SECTOR_SHIFT;
+                       remaining -= discard_sectors;
+               } else while (remaining) {
+                       /*
+                        * Try and add as many pages as possible.
+                        */
                        dp->get_page(dp, &page, &len, &offset);
                        len = min(len, to_bytes(remaining));
                        if (!bio_add_page(bio, page, len, offset))
index 31c2dc25886d985467e7f4084c96d35a98858f67..1ce84ed0b765a889b74b94674da2aff4ffe0fd1c 100644 (file)
@@ -1437,7 +1437,7 @@ static int target_message(struct dm_ioctl *param, size_t param_size)
 
        if (!argc) {
                DMWARN("Empty message received.");
-               goto out;
+               goto out_argv;
        }
 
        table = dm_get_live_table(md);
index 86cb7e5d83d545f1cca9706e689665780148c5db..787022c18187ab24d3305738676b0ca19c148b4c 100644 (file)
@@ -668,7 +668,14 @@ static int super_load(struct md_rdev *rdev, struct md_rdev *refdev)
                return ret;
 
        sb = page_address(rdev->sb_page);
-       if (sb->magic != cpu_to_le32(DM_RAID_MAGIC)) {
+
+       /*
+        * Two cases that we want to write new superblocks and rebuild:
+        * 1) New device (no matching magic number)
+        * 2) Device specified for rebuild (!In_sync w/ offset == 0)
+        */
+       if ((sb->magic != cpu_to_le32(DM_RAID_MAGIC)) ||
+           (!test_bit(In_sync, &rdev->flags) && !rdev->recovery_offset)) {
                super_sync(rdev->mddev, rdev);
 
                set_bit(FirstUse, &rdev->flags);
@@ -745,11 +752,8 @@ static int super_init_validation(struct mddev *mddev, struct md_rdev *rdev)
         */
        rdev_for_each(r, t, mddev) {
                if (!test_bit(In_sync, &r->flags)) {
-                       if (!test_bit(FirstUse, &r->flags))
-                               DMERR("Superblock area of "
-                                     "rebuild device %d should have been "
-                                     "cleared.", r->raid_disk);
-                       set_bit(FirstUse, &r->flags);
+                       DMINFO("Device %d specified for rebuild: "
+                              "Clearing superblock", r->raid_disk);
                        rebuilds++;
                } else if (test_bit(FirstUse, &r->flags))
                        new_devs++;
@@ -971,6 +975,7 @@ static int raid_ctr(struct dm_target *ti, unsigned argc, char **argv)
 
        INIT_WORK(&rs->md.event_work, do_table_event);
        ti->private = rs;
+       ti->num_flush_requests = 1;
 
        mutex_lock(&rs->md.reconfig_mutex);
        ret = md_run(&rs->md);
index 59c4f0446ffa9d5081e8dea0308cc68d51911612..237571af77fdfcf552b7061fa13ff291514c86b7 100644 (file)
@@ -385,6 +385,7 @@ static int init_pmd(struct dm_pool_metadata *pmd,
                data_sm = dm_sm_disk_create(tm, nr_blocks);
                if (IS_ERR(data_sm)) {
                        DMERR("sm_disk_create failed");
+                       dm_tm_unlock(tm, sblock);
                        r = PTR_ERR(data_sm);
                        goto bad;
                }
@@ -789,6 +790,11 @@ int dm_pool_metadata_close(struct dm_pool_metadata *pmd)
        return 0;
 }
 
+/*
+ * __open_device: Returns @td corresponding to device with id @dev,
+ * creating it if @create is set and incrementing @td->open_count.
+ * On failure, @td is undefined.
+ */
 static int __open_device(struct dm_pool_metadata *pmd,
                         dm_thin_id dev, int create,
                         struct dm_thin_device **td)
@@ -799,10 +805,16 @@ static int __open_device(struct dm_pool_metadata *pmd,
        struct disk_device_details details_le;
 
        /*
-        * Check the device isn't already open.
+        * If the device is already open, return it.
         */
        list_for_each_entry(td2, &pmd->thin_devices, list)
                if (td2->id == dev) {
+                       /*
+                        * May not create an already-open device.
+                        */
+                       if (create)
+                               return -EEXIST;
+
                        td2->open_count++;
                        *td = td2;
                        return 0;
@@ -817,6 +829,9 @@ static int __open_device(struct dm_pool_metadata *pmd,
                if (r != -ENODATA || !create)
                        return r;
 
+               /*
+                * Create new device.
+                */
                changed = 1;
                details_le.mapped_blocks = 0;
                details_le.transaction_id = cpu_to_le64(pmd->trans_id);
@@ -882,12 +897,10 @@ static int __create_thin(struct dm_pool_metadata *pmd,
 
        r = __open_device(pmd, dev, 1, &td);
        if (r) {
-               __close_device(td);
                dm_btree_remove(&pmd->tl_info, pmd->root, &key, &pmd->root);
                dm_btree_del(&pmd->bl_info, dev_root);
                return r;
        }
-       td->changed = 1;
        __close_device(td);
 
        return r;
@@ -967,14 +980,14 @@ static int __create_snap(struct dm_pool_metadata *pmd,
                goto bad;
 
        r = __set_snapshot_details(pmd, td, origin, pmd->time);
+       __close_device(td);
+
        if (r)
                goto bad;
 
-       __close_device(td);
        return 0;
 
 bad:
-       __close_device(td);
        dm_btree_remove(&pmd->tl_info, pmd->root, &key, &pmd->root);
        dm_btree_remove(&pmd->details_info, pmd->details_root,
                        &key, &pmd->details_root);
@@ -1211,6 +1224,8 @@ static int __remove(struct dm_thin_device *td, dm_block_t block)
        if (r)
                return r;
 
+       td->mapped_blocks--;
+       td->changed = 1;
        pmd->need_commit = 1;
 
        return 0;
index a368db2431a596020a98a3e64f67685ccef9c6cc..a0b225eb4ac449b0ae4b74349be9dbb1e0874fa7 100644 (file)
@@ -624,7 +624,7 @@ int md_raid1_congested(struct mddev *mddev, int bits)
                return 1;
 
        rcu_read_lock();
-       for (i = 0; i < conf->raid_disks; i++) {
+       for (i = 0; i < conf->raid_disks * 2; i++) {
                struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev);
                if (rdev && !test_bit(Faulty, &rdev->flags)) {
                        struct request_queue *q = bdev_get_queue(rdev->bdev);
index 6e8aa213f0d5208d917b8222a56980ab3582b4d6..58c44d6453a0bfa0fb40f155c0357e4392731999 100644 (file)
@@ -67,6 +67,7 @@ static int max_queued_requests = 1024;
 
 static void allow_barrier(struct r10conf *conf);
 static void lower_barrier(struct r10conf *conf);
+static int enough(struct r10conf *conf, int ignore);
 
 static void * r10bio_pool_alloc(gfp_t gfp_flags, void *data)
 {
@@ -347,6 +348,19 @@ static void raid10_end_read_request(struct bio *bio, int error)
                 * wait for the 'master' bio.
                 */
                set_bit(R10BIO_Uptodate, &r10_bio->state);
+       } else {
+               /* If all other devices that store this block have
+                * failed, we want to return the error upwards rather
+                * than fail the last device.  Here we redefine
+                * "uptodate" to mean "Don't want to retry"
+                */
+               unsigned long flags;
+               spin_lock_irqsave(&conf->device_lock, flags);
+               if (!enough(conf, rdev->raid_disk))
+                       uptodate = 1;
+               spin_unlock_irqrestore(&conf->device_lock, flags);
+       }
+       if (uptodate) {
                raid_end_bio_io(r10_bio);
                rdev_dec_pending(rdev, conf->mddev);
        } else {
@@ -2052,6 +2066,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
                       "md/raid10:%s: %s: Failing raid device\n",
                       mdname(mddev), b);
                md_error(mddev, conf->mirrors[d].rdev);
+               r10_bio->devs[r10_bio->read_slot].bio = IO_BLOCKED;
                return;
        }
 
@@ -2105,8 +2120,11 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
                                    rdev,
                                    r10_bio->devs[r10_bio->read_slot].addr
                                    + sect,
-                                   s, 0))
+                                   s, 0)) {
                                md_error(mddev, rdev);
+                               r10_bio->devs[r10_bio->read_slot].bio
+                                       = IO_BLOCKED;
+                       }
                        break;
                }
 
@@ -2299,17 +2317,20 @@ static void handle_read_error(struct mddev *mddev, struct r10bio *r10_bio)
         * This is all done synchronously while the array is
         * frozen.
         */
+       bio = r10_bio->devs[slot].bio;
+       bdevname(bio->bi_bdev, b);
+       bio_put(bio);
+       r10_bio->devs[slot].bio = NULL;
+
        if (mddev->ro == 0) {
                freeze_array(conf);
                fix_read_error(conf, mddev, r10_bio);
                unfreeze_array(conf);
-       }
+       } else
+               r10_bio->devs[slot].bio = IO_BLOCKED;
+
        rdev_dec_pending(rdev, mddev);
 
-       bio = r10_bio->devs[slot].bio;
-       bdevname(bio->bi_bdev, b);
-       r10_bio->devs[slot].bio =
-               mddev->ro ? IO_BLOCKED : NULL;
 read_more:
        rdev = read_balance(conf, r10_bio, &max_sectors);
        if (rdev == NULL) {
@@ -2318,13 +2339,10 @@ read_more:
                       mdname(mddev), b,
                       (unsigned long long)r10_bio->sector);
                raid_end_bio_io(r10_bio);
-               bio_put(bio);
                return;
        }
 
        do_sync = (r10_bio->master_bio->bi_rw & REQ_SYNC);
-       if (bio)
-               bio_put(bio);
        slot = r10_bio->read_slot;
        printk_ratelimited(
                KERN_ERR
@@ -2360,7 +2378,6 @@ read_more:
                        mbio->bi_phys_segments++;
                spin_unlock_irq(&conf->device_lock);
                generic_make_request(bio);
-               bio = NULL;
 
                r10_bio = mempool_alloc(conf->r10bio_pool,
                                        GFP_NOIO);
@@ -3243,7 +3260,6 @@ static int run(struct mddev *mddev)
                        disk->rdev = rdev;
                }
 
-               disk->rdev = rdev;
                disk_stack_limits(mddev->gendisk, rdev->bdev,
                                  rdev->data_offset << 9);
                /* as we don't honour merge_bvec_fn, we must never risk
index 53e2a80f42facb931f56c4adcde9221f5b5c69e1..d295941c9a3db63ab75408470ac8edfefbdb2cb2 100644 (file)
@@ -956,11 +956,12 @@ int __devinit ab8500_init(struct ab8500 *ab8500)
        return ret;
 
 out_freeirq:
-       if (ab8500->irq_base) {
+       if (ab8500->irq_base)
                free_irq(ab8500->irq, ab8500);
 out_removeirq:
+       if (ab8500->irq_base)
                ab8500_irq_remove(ab8500);
-       }
+
        return ret;
 }
 
index 0f5922812bffdee8e3e892cab978052548d92114..411f523d4878bd1cec6f8783ca6c99d6b57b669e 100644 (file)
@@ -123,7 +123,7 @@ static int mfd_add_device(struct device *parent, int id,
                }
 
                if (!cell->ignore_resource_conflicts) {
-                       ret = acpi_check_resource_conflict(res);
+                       ret = acpi_check_resource_conflict(&res[r]);
                        if (ret)
                                goto fail_res;
                }
index e075c113eec6f7d77a67b5ca1eb145abe8eebbdf..caadabeed8e94d59ae55fd8dbde84b37014769bb 100644 (file)
@@ -105,7 +105,7 @@ static int s5m87xx_i2c_probe(struct i2c_client *i2c,
        s5m87xx->rtc = i2c_new_dummy(i2c->adapter, RTC_I2C_ADDR);
        i2c_set_clientdata(s5m87xx->rtc, s5m87xx);
 
-       if (pdata->cfg_pmic_irq)
+       if (pdata && pdata->cfg_pmic_irq)
                pdata->cfg_pmic_irq();
 
        s5m_irq_init(s5m87xx);
index 01cf5012a08fb26c3b561fde99341d6ab84749e2..4392f6bca156e20a71d7acb8cce0b9316db42753 100644 (file)
@@ -168,7 +168,7 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
                goto err;
 
        init_data->irq = pmic_plat_data->irq;
-       init_data->irq_base = pmic_plat_data->irq;
+       init_data->irq_base = pmic_plat_data->irq_base;
 
        tps65910_gpio_init(tps65910, pmic_plat_data->gpio_base);
 
index 5fec23a9ac039f34eaf6cf902acbfb6521aa7ab4..74fd8cb5f37224e576f58398c20fda9f4884d9e7 100644 (file)
@@ -151,7 +151,7 @@ int tps65912_device_init(struct tps65912 *tps65912)
                goto err;
 
        init_data->irq = pmic_plat_data->irq;
-       init_data->irq_base = pmic_plat_data->irq;
+       init_data->irq_base = pmic_plat_data->irq_base;
        ret = tps65912_irq_init(tps65912, init_data->irq, init_data);
        if (ret < 0)
                goto err;
index 8a1fafd0bf7d129184e8910b73a0848954dcf42c..9fd01bf63c510eafab2c1efc987728576aa54f5e 100644 (file)
@@ -496,7 +496,6 @@ int wm8350_irq_init(struct wm8350 *wm8350, int irq,
 
        mutex_init(&wm8350->irq_lock);
        wm8350->chip_irq = irq;
-       wm8350->irq_base = pdata->irq_base;
 
        if (pdata && pdata->irq_base > 0)
                irq_base = pdata->irq_base;
index f117e7fb932194fc174ed52439dadcd57e81684c..a04b3c108c8ca38a06f54ac946f77ce4ec920f0c 100644 (file)
@@ -256,6 +256,20 @@ static int wm8994_suspend(struct device *dev)
                break;
        }
 
+       switch (wm8994->type) {
+       case WM1811:
+               ret = wm8994_reg_read(wm8994, WM8994_ANTIPOP_2);
+               if (ret < 0) {
+                       dev_err(dev, "Failed to read jackdet: %d\n", ret);
+               } else if (ret & WM1811_JACKDET_MODE_MASK) {
+                       dev_dbg(dev, "CODEC still active, ignoring suspend\n");
+                       return 0;
+               }
+               break;
+       default:
+               break;
+       }
+
        /* Disable LDO pulldowns while the device is suspended if we
         * don't know that something will be driving them. */
        if (!wm8994->ldo_ena_always_driven)
index c598ae69b8ff052584c94e75b44db9f07ea8d694..bc0c5096539a5bdbd874ef99babdd60dbf17a0c0 100644 (file)
@@ -806,6 +806,7 @@ static bool wm1811_readable_register(struct device *dev, unsigned int reg)
        case WM8994_DC_SERVO_2:
        case WM8994_DC_SERVO_READBACK:
        case WM8994_DC_SERVO_4:
+       case WM8994_DC_SERVO_4E:
        case WM8994_ANALOGUE_HP_1:
        case WM8958_MIC_DETECT_1:
        case WM8958_MIC_DETECT_2:
index 19fc7c1cb428c47f822254c2d748b7fe572b2da3..f428d86bfc103256ccd48f50436d23d6bd4d48a7 100644 (file)
@@ -984,9 +984,9 @@ static int __init c2port_init(void)
                " - (C) 2007 Rodolfo Giometti\n");
 
        c2port_class = class_create(THIS_MODULE, "c2port");
-       if (!c2port_class) {
+       if (IS_ERR(c2port_class)) {
                printk(KERN_ERR "c2port: failed to allocate class\n");
-               return -ENOMEM;
+               return PTR_ERR(c2port_class);
        }
        c2port_class->dev_attrs = c2port_attrs;
 
index 690255c7d4dcc8c407e7b0852216edab75f4ef31..132378b89d76a0072fe31b7f436975525d04e353 100644 (file)
@@ -2068,6 +2068,9 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
         */
        mmc_hw_reset_for_init(host);
 
+       /* Initialization should be done at 3.3 V I/O voltage. */
+       mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);
+
        /*
         * sdio_reset sends CMD52 to reset card.  Since we do not know
         * if the card is being re-initialized, just send it.  CMD52
index 30055f2b0d445b3e0c08ed131f939146fef68626..c3704e293a7b30d52c9cc1893da88a0e4844131b 100644 (file)
@@ -238,10 +238,10 @@ static inline void mmc_host_clk_init(struct mmc_host *host)
        /* Hold MCI clock for 8 cycles by default */
        host->clk_delay = 8;
        /*
-        * Default clock gating delay is 200ms.
+        * Default clock gating delay is 0ms to avoid wasting power.
         * This value can be tuned by writing into sysfs entry.
         */
-       host->clkgate_delay = 200;
+       host->clkgate_delay = 0;
        host->clk_gated = false;
        INIT_DELAYED_WORK(&host->clk_gate_work, mmc_host_clk_gate_work);
        spin_lock_init(&host->clk_lock);
index a48066344fa87316997b0bcca501d0842ea7e8a1..2b9ed1401dc439bf1dd29e4aa751f74e0175bc93 100644 (file)
@@ -816,6 +816,9 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
        if (!mmc_host_is_spi(host))
                mmc_set_bus_mode(host, MMC_BUSMODE_OPENDRAIN);
 
+       /* Initialization should be done at 3.3 V I/O voltage. */
+       mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);
+
        /*
         * Since we're changing the OCR value, we seem to
         * need to tell some cards to go back to the idle
index 5017f9354ce28af6a67418d1ce0a2c438ed07edd..c272c6868ecf6d11a39c3cf2be99f1257fccd026 100644 (file)
@@ -911,6 +911,9 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
        BUG_ON(!host);
        WARN_ON(!host->claimed);
 
+       /* The initialization should be done at 3.3 V I/O voltage. */
+       mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);
+
        err = mmc_sd_get_cid(host, ocr, cid, &rocr);
        if (err)
                return err;
@@ -1156,11 +1159,6 @@ int mmc_attach_sd(struct mmc_host *host)
        BUG_ON(!host);
        WARN_ON(!host->claimed);
 
-       /* Make sure we are at 3.3V signalling voltage */
-       err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, false);
-       if (err)
-               return err;
-
        /* Disable preset value enable if already set since last time */
        if (host->ops->enable_preset_value) {
                mmc_host_clk_hold(host);
index 12cde6ee17f50732ac5cd05f6843928abf87d0c9..2c7c83f832d289c25eaf83cf4d7ef32d420fb002 100644 (file)
@@ -585,6 +585,9 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
         * Inform the card of the voltage
         */
        if (!powered_resume) {
+               /* The initialization should be done at 3.3 V I/O voltage. */
+               mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);
+
                err = mmc_send_io_op_cond(host, host->ocr, &ocr);
                if (err)
                        goto err;
@@ -996,6 +999,11 @@ static int mmc_sdio_power_restore(struct mmc_host *host)
         * With these steps taken, mmc_select_voltage() is also required to
         * restore the correct voltage setting of the card.
         */
+
+       /* The initialization should be done at 3.3 V I/O voltage. */
+       if (!mmc_card_keep_power(host))
+               mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);
+
        sdio_reset(host);
        mmc_go_idle(host);
        mmc_send_if_cond(host, host->ocr_avail);
index 6985cdb0bb26e641fb340c0218d331e48844614a..e4449a54ae8f9fc68c3d9f719fe3a09e3e028adf 100644 (file)
@@ -1948,12 +1948,12 @@ static bool atmci_filter(struct dma_chan *chan, void *slave)
        }
 }
 
-static void atmci_configure_dma(struct atmel_mci *host)
+static bool atmci_configure_dma(struct atmel_mci *host)
 {
        struct mci_platform_data        *pdata;
 
        if (host == NULL)
-               return;
+               return false;
 
        pdata = host->pdev->dev.platform_data;
 
@@ -1970,12 +1970,15 @@ static void atmci_configure_dma(struct atmel_mci *host)
                host->dma.chan =
                        dma_request_channel(mask, atmci_filter, pdata->dma_slave);
        }
-       if (!host->dma.chan)
-               dev_notice(&host->pdev->dev, "DMA not available, using PIO\n");
-       else
+       if (!host->dma.chan) {
+               dev_warn(&host->pdev->dev, "no DMA channel available\n");
+               return false;
+       } else {
                dev_info(&host->pdev->dev,
                                        "Using %s for DMA transfers\n",
                                        dma_chan_name(host->dma.chan));
+               return true;
+       }
 }
 
 static inline unsigned int atmci_get_version(struct atmel_mci *host)
@@ -2085,8 +2088,7 @@ static int __init atmci_probe(struct platform_device *pdev)
 
        /* Get MCI capabilities and set operations according to it */
        atmci_get_cap(host);
-       if (host->caps.has_dma) {
-               dev_info(&pdev->dev, "using DMA\n");
+       if (host->caps.has_dma && atmci_configure_dma(host)) {
                host->prepare_data = &atmci_prepare_data_dma;
                host->submit_data = &atmci_submit_data_dma;
                host->stop_transfer = &atmci_stop_transfer_dma;
@@ -2096,15 +2098,12 @@ static int __init atmci_probe(struct platform_device *pdev)
                host->submit_data = &atmci_submit_data_pdc;
                host->stop_transfer = &atmci_stop_transfer_pdc;
        } else {
-               dev_info(&pdev->dev, "no DMA, no PDC\n");
+               dev_info(&pdev->dev, "using PIO\n");
                host->prepare_data = &atmci_prepare_data;
                host->submit_data = &atmci_submit_data;
                host->stop_transfer = &atmci_stop_transfer;
        }
 
-       if (host->caps.has_dma)
-               atmci_configure_dma(host);
-
        platform_set_drvdata(pdev, host);
 
        /* We need at least one slot to succeed */
index 0d955ffaf44e2c3ec5961f966687da3e675819d9..bdfd05517dd5ae22371e3bf73f4471263ec339a4 100644 (file)
@@ -1271,12 +1271,13 @@ static int __devinit mmci_probe(struct amba_device *dev,
        /*
         * Block size can be up to 2048 bytes, but must be a power of two.
         */
-       mmc->max_blk_size = 2048;
+       mmc->max_blk_size = 1 << 11;
 
        /*
-        * No limit on the number of blocks transferred.
+        * Limit the number of blocks transferred so that we don't overflow
+        * the maximum request size.
         */
-       mmc->max_blk_count = mmc->max_req_size;
+       mmc->max_blk_count = mmc->max_req_size >> 11;
 
        spin_lock_init(&host->lock);
 
@@ -1325,7 +1326,7 @@ static int __devinit mmci_probe(struct amba_device *dev,
        if (ret)
                goto unmap;
 
-       if (dev->irq[1] == NO_IRQ)
+       if (dev->irq[1] == NO_IRQ || !dev->irq[1])
                host->singleirq = true;
        else {
                ret = request_irq(dev->irq[1], mmci_pio_irq, IRQF_SHARED,
index d601e41af282105ad5c3a86d30d569dfef3def8c..0be4e2013632f97ce4dddc489212c2ed6f7c4985 100644 (file)
@@ -269,8 +269,9 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
                imx_data->scratchpad = val;
                return;
        case SDHCI_COMMAND:
-               if ((host->cmd->opcode == MMC_STOP_TRANSMISSION)
-                       && (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT))
+               if ((host->cmd->opcode == MMC_STOP_TRANSMISSION ||
+                    host->cmd->opcode == MMC_SET_BLOCK_COUNT) &&
+                   (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT))
                        val |= SDHCI_CMD_ABORTCMD;
 
                if (is_imx6q_usdhc(imx_data)) {
index 3197e9764fcd32025c6ea715a05765ca4e45c30c..73416951f4c1f6bdd52b53c8f2ebe1967fae4d47 100644 (file)
@@ -26,7 +26,7 @@
 #include <asm/io.h>
 #include <mach/hardware.h>
 #include <asm/sizes.h>
-#include <asm/gpio.h>
+#include <linux/gpio.h>
 #include <plat/board-ams-delta.h>
 
 /*
@@ -34,8 +34,6 @@
  */
 static struct mtd_info *ams_delta_mtd = NULL;
 
-#define NAND_MASK (AMS_DELTA_LATCH2_NAND_NRE | AMS_DELTA_LATCH2_NAND_NWE | AMS_DELTA_LATCH2_NAND_CLE | AMS_DELTA_LATCH2_NAND_ALE | AMS_DELTA_LATCH2_NAND_NCE | AMS_DELTA_LATCH2_NAND_NWP)
-
 /*
  * Define partitions for flash devices
  */
@@ -68,10 +66,9 @@ static void ams_delta_write_byte(struct mtd_info *mtd, u_char byte)
 
        writew(0, io_base + OMAP_MPUIO_IO_CNTL);
        writew(byte, this->IO_ADDR_W);
-       ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_NWE, 0);
+       gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_NWE, 0);
        ndelay(40);
-       ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_NWE,
-                              AMS_DELTA_LATCH2_NAND_NWE);
+       gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_NWE, 1);
 }
 
 static u_char ams_delta_read_byte(struct mtd_info *mtd)
@@ -80,12 +77,11 @@ static u_char ams_delta_read_byte(struct mtd_info *mtd)
        struct nand_chip *this = mtd->priv;
        void __iomem *io_base = this->priv;
 
-       ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_NRE, 0);
+       gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_NRE, 0);
        ndelay(40);
        writew(~0, io_base + OMAP_MPUIO_IO_CNTL);
        res = readw(this->IO_ADDR_R);
-       ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_NRE,
-                              AMS_DELTA_LATCH2_NAND_NRE);
+       gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_NRE, 1);
 
        return res;
 }
@@ -132,15 +128,12 @@ static void ams_delta_hwcontrol(struct mtd_info *mtd, int cmd,
 {
 
        if (ctrl & NAND_CTRL_CHANGE) {
-               unsigned long bits;
-
-               bits = (~ctrl & NAND_NCE) ? AMS_DELTA_LATCH2_NAND_NCE : 0;
-               bits |= (ctrl & NAND_CLE) ? AMS_DELTA_LATCH2_NAND_CLE : 0;
-               bits |= (ctrl & NAND_ALE) ? AMS_DELTA_LATCH2_NAND_ALE : 0;
-
-               ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_CLE |
-                               AMS_DELTA_LATCH2_NAND_ALE |
-                               AMS_DELTA_LATCH2_NAND_NCE, bits);
+               gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_NCE,
+                               (ctrl & NAND_NCE) == 0);
+               gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_CLE,
+                               (ctrl & NAND_CLE) != 0);
+               gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_ALE,
+                               (ctrl & NAND_ALE) != 0);
        }
 
        if (cmd != NAND_CMD_NONE)
@@ -152,6 +145,39 @@ static int ams_delta_nand_ready(struct mtd_info *mtd)
        return gpio_get_value(AMS_DELTA_GPIO_PIN_NAND_RB);
 }
 
+static const struct gpio _mandatory_gpio[] = {
+       {
+               .gpio   = AMS_DELTA_GPIO_PIN_NAND_NCE,
+               .flags  = GPIOF_OUT_INIT_HIGH,
+               .label  = "nand_nce",
+       },
+       {
+               .gpio   = AMS_DELTA_GPIO_PIN_NAND_NRE,
+               .flags  = GPIOF_OUT_INIT_HIGH,
+               .label  = "nand_nre",
+       },
+       {
+               .gpio   = AMS_DELTA_GPIO_PIN_NAND_NWP,
+               .flags  = GPIOF_OUT_INIT_HIGH,
+               .label  = "nand_nwp",
+       },
+       {
+               .gpio   = AMS_DELTA_GPIO_PIN_NAND_NWE,
+               .flags  = GPIOF_OUT_INIT_HIGH,
+               .label  = "nand_nwe",
+       },
+       {
+               .gpio   = AMS_DELTA_GPIO_PIN_NAND_ALE,
+               .flags  = GPIOF_OUT_INIT_LOW,
+               .label  = "nand_ale",
+       },
+       {
+               .gpio   = AMS_DELTA_GPIO_PIN_NAND_CLE,
+               .flags  = GPIOF_OUT_INIT_LOW,
+               .label  = "nand_cle",
+       },
+};
+
 /*
  * Main initialization routine
  */
@@ -223,10 +249,9 @@ static int __devinit ams_delta_init(struct platform_device *pdev)
        platform_set_drvdata(pdev, io_base);
 
        /* Set chip enabled, but  */
-       ams_delta_latch2_write(NAND_MASK, AMS_DELTA_LATCH2_NAND_NRE |
-                                         AMS_DELTA_LATCH2_NAND_NWE |
-                                         AMS_DELTA_LATCH2_NAND_NCE |
-                                         AMS_DELTA_LATCH2_NAND_NWP);
+       err = gpio_request_array(_mandatory_gpio, ARRAY_SIZE(_mandatory_gpio));
+       if (err)
+               goto out_gpio;
 
        /* Scan to find existence of the device */
        if (nand_scan(ams_delta_mtd, 1)) {
@@ -241,7 +266,10 @@ static int __devinit ams_delta_init(struct platform_device *pdev)
        goto out;
 
  out_mtd:
+       gpio_free_array(_mandatory_gpio, ARRAY_SIZE(_mandatory_gpio));
+out_gpio:
        platform_set_drvdata(pdev, NULL);
+       gpio_free(AMS_DELTA_GPIO_PIN_NAND_RB);
        iounmap(io_base);
 out_release_io:
        release_mem_region(res->start, resource_size(res));
@@ -262,6 +290,8 @@ static int __devexit ams_delta_cleanup(struct platform_device *pdev)
        /* Release resources, unregister device */
        nand_release(ams_delta_mtd);
 
+       gpio_free_array(_mandatory_gpio, ARRAY_SIZE(_mandatory_gpio));
+       gpio_free(AMS_DELTA_GPIO_PIN_NAND_RB);
        iounmap(io_base);
        release_mem_region(res->start, resource_size(res));
 
index 0a4fc62a381dfb80652220e896f973e1618a5901..c998e1afebc6831be282088a379d98ee8978c491 100644 (file)
@@ -978,7 +978,7 @@ static void cfhsi_setup(struct net_device *dev)
        dev->netdev_ops = &cfhsi_ops;
        dev->type = ARPHRD_CAIF;
        dev->flags = IFF_POINTOPOINT | IFF_NOARP;
-       dev->mtu = CFHSI_MAX_PAYLOAD_SZ;
+       dev->mtu = CFHSI_MAX_CAIF_FRAME_SZ;
        dev->tx_queue_len = 0;
        dev->destructor = free_netdev;
        skb_queue_head_init(&cfhsi->qhead);
index 1ff3c6df35a21a5f03b66b8316839466a3655e31..47a9bb2c813cb0fa2fba319044510c2e93e00412 100644 (file)
@@ -1710,7 +1710,7 @@ static irqreturn_t atl1c_intr(int irq, void *data)
                                        "atl1c hardware error (status = 0x%x)\n",
                                        status & ISR_ERROR);
                        /* reset MAC */
-                       adapter->work_event |= ATL1C_WORK_EVENT_RESET;
+                       set_bit(ATL1C_WORK_EVENT_RESET, &adapter->work_event);
                        schedule_work(&adapter->common_task);
                        return IRQ_HANDLED;
                }
index a1f2e0fed78bc2b23b7caa2c1457255e6eae9b89..35c2a202d67aa643a452e245293d5e7fdd748e39 100644 (file)
@@ -5352,7 +5352,7 @@ static void tg3_tx(struct tg3_napi *tnapi)
                }
        }
 
-       netdev_completed_queue(tp->dev, pkts_compl, bytes_compl);
+       netdev_tx_completed_queue(txq, pkts_compl, bytes_compl);
 
        tnapi->tx_cons = sw_idx;
 
@@ -6793,7 +6793,7 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
        }
 
        skb_tx_timestamp(skb);
-       netdev_sent_queue(tp->dev, skb->len);
+       netdev_tx_sent_queue(txq, skb->len);
 
        /* Packets are ready, update Tx producer idx local and on card. */
        tw32_tx_mbox(tnapi->prodmbox, entry);
@@ -7275,8 +7275,8 @@ static void tg3_free_rings(struct tg3 *tp)
 
                        dev_kfree_skb_any(skb);
                }
+               netdev_tx_reset_queue(netdev_get_tx_queue(tp->dev, j));
        }
-       netdev_reset_queue(tp->dev);
 }
 
 /* Initialize tx/rx rings for packet processing.
@@ -7886,10 +7886,8 @@ static int tg3_chip_reset(struct tg3 *tp)
        return 0;
 }
 
-static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *,
-                                                struct rtnl_link_stats64 *);
-static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *,
-                                               struct tg3_ethtool_stats *);
+static void tg3_get_nstats(struct tg3 *, struct rtnl_link_stats64 *);
+static void tg3_get_estats(struct tg3 *, struct tg3_ethtool_stats *);
 
 /* tp->lock is held. */
 static int tg3_halt(struct tg3 *tp, int kind, int silent)
@@ -7910,7 +7908,7 @@ static int tg3_halt(struct tg3 *tp, int kind, int silent)
 
        if (tp->hw_stats) {
                /* Save the stats across chip resets... */
-               tg3_get_stats64(tp->dev, &tp->net_stats_prev),
+               tg3_get_nstats(tp, &tp->net_stats_prev),
                tg3_get_estats(tp, &tp->estats_prev);
 
                /* And make sure the next sample is new data */
@@ -9847,7 +9845,7 @@ static inline u64 get_stat64(tg3_stat64_t *val)
        return ((u64)val->high << 32) | ((u64)val->low);
 }
 
-static u64 calc_crc_errors(struct tg3 *tp)
+static u64 tg3_calc_crc_errors(struct tg3 *tp)
 {
        struct tg3_hw_stats *hw_stats = tp->hw_stats;
 
@@ -9856,14 +9854,12 @@ static u64 calc_crc_errors(struct tg3 *tp)
             GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701)) {
                u32 val;
 
-               spin_lock_bh(&tp->lock);
                if (!tg3_readphy(tp, MII_TG3_TEST1, &val)) {
                        tg3_writephy(tp, MII_TG3_TEST1,
                                     val | MII_TG3_TEST1_CRC_EN);
                        tg3_readphy(tp, MII_TG3_RXR_COUNTERS, &val);
                } else
                        val = 0;
-               spin_unlock_bh(&tp->lock);
 
                tp->phy_crc_errors += val;
 
@@ -9877,14 +9873,13 @@ static u64 calc_crc_errors(struct tg3 *tp)
        estats->member =        old_estats->member + \
                                get_stat64(&hw_stats->member)
 
-static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *tp,
-                                              struct tg3_ethtool_stats *estats)
+static void tg3_get_estats(struct tg3 *tp, struct tg3_ethtool_stats *estats)
 {
        struct tg3_ethtool_stats *old_estats = &tp->estats_prev;
        struct tg3_hw_stats *hw_stats = tp->hw_stats;
 
        if (!hw_stats)
-               return old_estats;
+               return;
 
        ESTAT_ADD(rx_octets);
        ESTAT_ADD(rx_fragments);
@@ -9963,20 +9958,13 @@ static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *tp,
        ESTAT_ADD(nic_tx_threshold_hit);
 
        ESTAT_ADD(mbuf_lwm_thresh_hit);
-
-       return estats;
 }
 
-static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev,
-                                                struct rtnl_link_stats64 *stats)
+static void tg3_get_nstats(struct tg3 *tp, struct rtnl_link_stats64 *stats)
 {
-       struct tg3 *tp = netdev_priv(dev);
        struct rtnl_link_stats64 *old_stats = &tp->net_stats_prev;
        struct tg3_hw_stats *hw_stats = tp->hw_stats;
 
-       if (!hw_stats)
-               return old_stats;
-
        stats->rx_packets = old_stats->rx_packets +
                get_stat64(&hw_stats->rx_ucast_packets) +
                get_stat64(&hw_stats->rx_mcast_packets) +
@@ -10019,15 +10007,13 @@ static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev,
                get_stat64(&hw_stats->tx_carrier_sense_errors);
 
        stats->rx_crc_errors = old_stats->rx_crc_errors +
-               calc_crc_errors(tp);
+               tg3_calc_crc_errors(tp);
 
        stats->rx_missed_errors = old_stats->rx_missed_errors +
                get_stat64(&hw_stats->rx_discards);
 
        stats->rx_dropped = tp->rx_dropped;
        stats->tx_dropped = tp->tx_dropped;
-
-       return stats;
 }
 
 static inline u32 calc_crc(unsigned char *buf, int len)
@@ -15409,6 +15395,21 @@ static void __devinit tg3_init_coal(struct tg3 *tp)
        }
 }
 
+static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev,
+                                               struct rtnl_link_stats64 *stats)
+{
+       struct tg3 *tp = netdev_priv(dev);
+
+       if (!tp->hw_stats)
+               return &tp->net_stats_prev;
+
+       spin_lock_bh(&tp->lock);
+       tg3_get_nstats(tp, stats);
+       spin_unlock_bh(&tp->lock);
+
+       return stats;
+}
+
 static const struct net_device_ops tg3_netdev_ops = {
        .ndo_open               = tg3_open,
        .ndo_stop               = tg3_close,
index e83d12c7bf20cde0b1c2becba254329b0955b2aa..9d76e59d9526164ca9cfc247769315d04b8c4fca 100644 (file)
@@ -196,6 +196,8 @@ static DEFINE_PCI_DEVICE_TABLE(cxgb4_pci_tbl) = {
        CH_DEVICE(0x4408, 4),
        CH_DEVICE(0x4409, 4),
        CH_DEVICE(0x440a, 4),
+       CH_DEVICE(0x440d, 4),
+       CH_DEVICE(0x440e, 4),
        { 0, }
 };
 
index e53365a71484baabc0f9251ef100eea7f12f027d..d963c1d57f71590afef3aabc94b81a686c8ed061 100644 (file)
@@ -2892,6 +2892,8 @@ static struct pci_device_id cxgb4vf_pci_tbl[] = {
        CH_DEVICE(0x4808, 0),   /* T420-cx */
        CH_DEVICE(0x4809, 0),   /* T420-bt */
        CH_DEVICE(0x480a, 0),   /* T404-bt */
+       CH_DEVICE(0x480d, 0),   /* T480-cr */
+       CH_DEVICE(0x480e, 0),   /* T440-lp-cr */
        { 0, }
 };
 
index ee93a2087fe6c0cfd116dcf3f4536185480ba362..c52295cd05ef009b368555e8b716bc082ad6caf5 100644 (file)
@@ -94,7 +94,7 @@ struct enic {
        u32 rx_coalesce_usecs;
        u32 tx_coalesce_usecs;
 #ifdef CONFIG_PCI_IOV
-       u32 num_vfs;
+       u16 num_vfs;
 #endif
        struct enic_port_profile *pp;
 
index ab3f67f980d8c3f7554d19bf3fdbaf275deefed3..0e4edd3b6bee0275cf3ca0c01ffd1f1f60ec9d49 100644 (file)
@@ -2370,7 +2370,7 @@ static int __devinit enic_probe(struct pci_dev *pdev,
        pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_SRIOV);
        if (pos) {
                pci_read_config_word(pdev, pos + PCI_SRIOV_TOTAL_VF,
-                       (u16 *)&enic->num_vfs);
+                       &enic->num_vfs);
                if (enic->num_vfs) {
                        err = pci_enable_sriov(pdev, enic->num_vfs);
                        if (err) {
index 5d5fb2627184f9b7f303d64c22875182c63d88e6..e6893cdfd13b9bd16ce628b7fc697f2ef940a188 100644 (file)
@@ -336,7 +336,9 @@ static struct rtnl_link_stats64 *ehea_get_stats64(struct net_device *dev,
        stats->tx_bytes = tx_bytes;
        stats->rx_packets = rx_packets;
 
-       return &port->stats;
+       stats->multicast = port->stats.multicast;
+       stats->rx_errors = port->stats.rx_errors;
+       return stats;
 }
 
 static void ehea_update_stats(struct work_struct *work)
index 738f950a1ce59e69c6297517882913d90f22f784..fb2b36759cbf657d66dfa7c245d49306d5a06c58 100644 (file)
@@ -151,11 +151,6 @@ static int __mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
                context->log_page_size   = mtt->page_shift - MLX4_ICM_PAGE_SHIFT;
        }
 
-       port = ((context->pri_path.sched_queue >> 6) & 1) + 1;
-       if (dev->caps.port_type[port] == MLX4_PORT_TYPE_ETH)
-               context->pri_path.sched_queue = (context->pri_path.sched_queue &
-                                               0xc3);
-
        *(__be32 *) mailbox->buf = cpu_to_be32(optpar);
        memcpy(mailbox->buf + 8, context, sizeof *context);
 
index bfdb7af19e496285bdeff3ada8a302b71e746865..8752e6e0816922f5ecd4b441fc478b02a27fd5d2 100644 (file)
@@ -2255,8 +2255,7 @@ int mlx4_MODIFY_CQ_wrapper(struct mlx4_dev *dev, int slave,
 
        if (vhcr->op_modifier == 0) {
                err = handle_resize(dev, slave, vhcr, inbox, outbox, cmd, cq);
-               if (err)
-                       goto ex_put;
+               goto ex_put;
        }
 
        err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd);
index 9cb5f912e4891f5b832bb941bce6916c5248bdb6..29e23bec809c495104b08d009943ba2b10155660 100644 (file)
@@ -321,10 +321,10 @@ static void pch_gbe_check_copper_options(struct pch_gbe_adapter *adapter)
                        pr_debug("AutoNeg specified along with Speed or Duplex, AutoNeg parameter ignored\n");
                        hw->phy.autoneg_advertised = opt.def;
                } else {
-                       hw->phy.autoneg_advertised = AutoNeg;
-                       pch_gbe_validate_option(
-                               (int *)(&hw->phy.autoneg_advertised),
-                               &opt, adapter);
+                       int tmp = AutoNeg;
+
+                       pch_gbe_validate_option(&tmp, &opt, adapter);
+                       hw->phy.autoneg_advertised = tmp;
                }
        }
 
@@ -495,9 +495,10 @@ void pch_gbe_check_options(struct pch_gbe_adapter *adapter)
                        .arg  = { .l = { .nr = (int)ARRAY_SIZE(fc_list),
                                         .p = fc_list } }
                };
-               hw->mac.fc = FlowControl;
-               pch_gbe_validate_option((int *)(&hw->mac.fc),
-                                               &opt, adapter);
+               int tmp = FlowControl;
+
+               pch_gbe_validate_option(&tmp, &opt, adapter);
+               hw->mac.fc = tmp;
        }
 
        pch_gbe_check_copper_options(adapter);
index b97132d9dff0c09fdd804ad63335e10a8225343d..8f29feb35548273c56d6ea2247031214eb820a22 100644 (file)
@@ -4,6 +4,7 @@
 
 config NET_PACKET_ENGINE
        bool "Packet Engine devices"
+       default y
        depends on PCI
        ---help---
          If you have a network (Ethernet) card belonging to this class, say Y
index 7931531c3a40be12f1d4f838fd854878c16b9470..e61560e16385e855164a2062aa56ae254212721d 100644 (file)
@@ -3017,7 +3017,6 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
                (void __iomem *)port_regs;
        u32 delay = 10;
        int status = 0;
-       unsigned long hw_flags = 0;
 
        if (ql_mii_setup(qdev))
                return -1;
@@ -3228,9 +3227,9 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
                value = ql_read_page0_reg(qdev, &port_regs->portStatus);
                if (value & PORT_STATUS_IC)
                        break;
-               spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
+               spin_unlock_irq(&qdev->hw_lock);
                msleep(500);
-               spin_lock_irqsave(&qdev->hw_lock, hw_flags);
+               spin_lock_irq(&qdev->hw_lock);
        } while (--delay);
 
        if (delay == 0) {
index 7a0c800b50adc90051ed008548a754f1af6b5695..bbacb3741ec029e3c4fbc9f74c616955f56e4fc8 100644 (file)
@@ -3781,12 +3781,20 @@ static void rtl8169_init_ring_indexes(struct rtl8169_private *tp)
 
 static void rtl_hw_jumbo_enable(struct rtl8169_private *tp)
 {
+       void __iomem *ioaddr = tp->mmio_addr;
+
+       RTL_W8(Cfg9346, Cfg9346_Unlock);
        rtl_generic_op(tp, tp->jumbo_ops.enable);
+       RTL_W8(Cfg9346, Cfg9346_Lock);
 }
 
 static void rtl_hw_jumbo_disable(struct rtl8169_private *tp)
 {
+       void __iomem *ioaddr = tp->mmio_addr;
+
+       RTL_W8(Cfg9346, Cfg9346_Unlock);
        rtl_generic_op(tp, tp->jumbo_ops.disable);
+       RTL_W8(Cfg9346, Cfg9346_Lock);
 }
 
 static void r8168c_hw_jumbo_enable(struct rtl8169_private *tp)
@@ -6186,6 +6194,9 @@ static void rtl_shutdown(struct pci_dev *pdev)
 {
        struct net_device *dev = pci_get_drvdata(pdev);
        struct rtl8169_private *tp = netdev_priv(dev);
+       struct device *d = &pdev->dev;
+
+       pm_runtime_get_sync(d);
 
        rtl8169_net_suspend(dev);
 
@@ -6207,6 +6218,8 @@ static void rtl_shutdown(struct pci_dev *pdev)
                pci_wake_from_d3(pdev, true);
                pci_set_power_state(pdev, PCI_D3hot);
        }
+
+       pm_runtime_put_noidle(d);
 }
 
 static struct pci_driver rtl8169_pci_driver = {
index 466c58a7353dba30e89d8986c58e7cf7550b7670..bf01841bda5bb78e1e8378480d98d948541c9c3c 100644 (file)
@@ -313,7 +313,7 @@ int netvsc_recv_callback(struct hv_device *device_obj,
 static void netvsc_get_drvinfo(struct net_device *net,
                               struct ethtool_drvinfo *info)
 {
-       strcpy(info->driver, "hv_netvsc");
+       strcpy(info->driver, KBUILD_MODNAME);
        strcpy(info->version, HV_DRV_VERSION);
        strcpy(info->fw_version, "N/A");
 }
@@ -485,7 +485,7 @@ MODULE_DEVICE_TABLE(vmbus, id_table);
 
 /* The one and only one */
 static struct  hv_driver netvsc_drv = {
-       .name = "netvsc",
+       .name = KBUILD_MODNAME,
        .id_table = id_table,
        .probe = netvsc_probe,
        .remove = netvsc_remove,
index fae0fbd8bc887a99ca0e068bbc4d06bed884775c..81b96e303757a5bd99177b2a0f8b163cec4eb9c7 100644 (file)
@@ -589,6 +589,7 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
                entry = (struct skb_data *) skb->cb;
                urb = entry->urb;
 
+               spin_unlock_irqrestore(&q->lock, flags);
                // during some PM-driven resume scenarios,
                // these (async) unlinks complete immediately
                retval = usb_unlink_urb (urb);
@@ -596,6 +597,7 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
                        netdev_dbg(dev->net, "unlink urb err, %d\n", retval);
                else
                        count++;
+               spin_lock_irqsave(&q->lock, flags);
        }
        spin_unlock_irqrestore (&q->lock, flags);
        return count;
index 3dcd3857a36cb8346c82c8131c1131da40a53063..756c0f5565a5b185250668c5617b93ee357ff335 100644 (file)
@@ -830,13 +830,8 @@ vmxnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq,
                                        ctx->l4_hdr_size = ((struct tcphdr *)
                                           skb_transport_header(skb))->doff * 4;
                                else if (iph->protocol == IPPROTO_UDP)
-                                       /*
-                                        * Use tcp header size so that bytes to
-                                        * be copied are more than required by
-                                        * the device.
-                                        */
                                        ctx->l4_hdr_size =
-                                                       sizeof(struct tcphdr);
+                                                       sizeof(struct udphdr);
                                else
                                        ctx->l4_hdr_size = 0;
                        } else {
index ed54797db1916d717fe3141559bf95bca2013547..fc46a81ad5384969b1670114765e3df12799a256 100644 (file)
 /*
  * Version numbers
  */
-#define VMXNET3_DRIVER_VERSION_STRING   "1.1.18.0-k"
+#define VMXNET3_DRIVER_VERSION_STRING   "1.1.29.0-k"
 
 /* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */
-#define VMXNET3_DRIVER_VERSION_NUM      0x01011200
+#define VMXNET3_DRIVER_VERSION_NUM      0x01011D00
 
 #if defined(CONFIG_PCI_MSI)
        /* RSS only makes sense if MSI-X is supported. */
index f901a17f76baf6da3a2ad3e55880a8aa25df35e8..86a891f93fc9dc70939088e70080af874343f4b4 100644 (file)
@@ -489,8 +489,6 @@ static int ar5008_hw_rf_alloc_ext_banks(struct ath_hw *ah)
        ATH_ALLOC_BANK(ah->analogBank6Data, ah->iniBank6.ia_rows);
        ATH_ALLOC_BANK(ah->analogBank6TPCData, ah->iniBank6TPC.ia_rows);
        ATH_ALLOC_BANK(ah->analogBank7Data, ah->iniBank7.ia_rows);
-       ATH_ALLOC_BANK(ah->addac5416_21,
-                      ah->iniAddac.ia_rows * ah->iniAddac.ia_columns);
        ATH_ALLOC_BANK(ah->bank6Temp, ah->iniBank6.ia_rows);
 
        return 0;
@@ -519,7 +517,6 @@ static void ar5008_hw_rf_free_ext_banks(struct ath_hw *ah)
        ATH_FREE_BANK(ah->analogBank6Data);
        ATH_FREE_BANK(ah->analogBank6TPCData);
        ATH_FREE_BANK(ah->analogBank7Data);
-       ATH_FREE_BANK(ah->addac5416_21);
        ATH_FREE_BANK(ah->bank6Temp);
 
 #undef ATH_FREE_BANK
@@ -805,27 +802,7 @@ static int ar5008_hw_process_ini(struct ath_hw *ah,
        if (ah->eep_ops->set_addac)
                ah->eep_ops->set_addac(ah, chan);
 
-       if (AR_SREV_5416_22_OR_LATER(ah)) {
-               REG_WRITE_ARRAY(&ah->iniAddac, 1, regWrites);
-       } else {
-               struct ar5416IniArray temp;
-               u32 addacSize =
-                       sizeof(u32) * ah->iniAddac.ia_rows *
-                       ah->iniAddac.ia_columns;
-
-               /* For AR5416 2.0/2.1 */
-               memcpy(ah->addac5416_21,
-                      ah->iniAddac.ia_array, addacSize);
-
-               /* override CLKDRV value at [row, column] = [31, 1] */
-               (ah->addac5416_21)[31 * ah->iniAddac.ia_columns + 1] = 0;
-
-               temp.ia_array = ah->addac5416_21;
-               temp.ia_columns = ah->iniAddac.ia_columns;
-               temp.ia_rows = ah->iniAddac.ia_rows;
-               REG_WRITE_ARRAY(&temp, 1, regWrites);
-       }
-
+       REG_WRITE_ARRAY(&ah->iniAddac, 1, regWrites);
        REG_WRITE(ah, AR_PHY_ADC_SERIAL_CTL, AR_PHY_SEL_INTERNAL_ADDAC);
 
        ENABLE_REGWRITE_BUFFER(ah);
index 11f192a1ceb72d332ccde32cf98f0ef7c3ff41c3..d190411ac8f51e5003fb2c639b7818be8df34b4c 100644 (file)
@@ -180,6 +180,25 @@ static void ar9002_hw_init_mode_regs(struct ath_hw *ah)
                INIT_INI_ARRAY(&ah->iniAddac, ar5416Addac,
                               ARRAY_SIZE(ar5416Addac), 2);
        }
+
+       /* iniAddac needs to be modified for these chips */
+       if (AR_SREV_9160(ah) || !AR_SREV_5416_22_OR_LATER(ah)) {
+               struct ar5416IniArray *addac = &ah->iniAddac;
+               u32 size = sizeof(u32) * addac->ia_rows * addac->ia_columns;
+               u32 *data;
+
+               data = kmalloc(size, GFP_KERNEL);
+               if (!data)
+                       return;
+
+               memcpy(data, addac->ia_array, size);
+               addac->ia_array = data;
+
+               if (!AR_SREV_5416_22_OR_LATER(ah)) {
+                       /* override CLKDRV value */
+                       INI_RA(addac, 31,1) = 0;
+               }
+       }
 }
 
 /* Support for Japan ch.14 (2484) spread */
index 6a29004a71b0864afe06f6c5a4b82b77f8c3d050..c8261d4fc780aa3b4db12586e2738a1065376604 100644 (file)
@@ -940,7 +940,6 @@ struct ath_hw {
        u32 *analogBank6Data;
        u32 *analogBank6TPCData;
        u32 *analogBank7Data;
-       u32 *addac5416_21;
        u32 *bank6Temp;
 
        u8 txpower_limit;
index d19a9ee9d057a904577d9497435911bc2867e978..bbc813dee983f83c0e73062d7485898da704420b 100644 (file)
@@ -1234,6 +1234,7 @@ static bool carl9170_tx_ps_drop(struct ar9170 *ar, struct sk_buff *skb)
 {
        struct ieee80211_sta *sta;
        struct carl9170_sta_info *sta_info;
+       struct ieee80211_tx_info *tx_info;
 
        rcu_read_lock();
        sta = __carl9170_get_tx_sta(ar, skb);
@@ -1241,16 +1242,18 @@ static bool carl9170_tx_ps_drop(struct ar9170 *ar, struct sk_buff *skb)
                goto out_rcu;
 
        sta_info = (void *) sta->drv_priv;
-       if (unlikely(sta_info->sleeping)) {
-               struct ieee80211_tx_info *tx_info;
+       tx_info = IEEE80211_SKB_CB(skb);
 
+       if (unlikely(sta_info->sleeping) &&
+           !(tx_info->flags & (IEEE80211_TX_CTL_POLL_RESPONSE |
+                               IEEE80211_TX_CTL_CLEAR_PS_FILT))) {
                rcu_read_unlock();
 
-               tx_info = IEEE80211_SKB_CB(skb);
                if (tx_info->flags & IEEE80211_TX_CTL_AMPDU)
                        atomic_dec(&ar->tx_ampdu_upload);
 
                tx_info->flags |= IEEE80211_TX_STAT_TX_FILTERED;
+               carl9170_release_dev_space(ar, skb);
                carl9170_tx_status(ar, skb, false);
                return true;
        }
index 90911eec0cf55948fddecffb225eb1543412cc6a..30b58870b1b68455b09adecfd127b354dbcc975c 100644 (file)
@@ -1051,17 +1051,13 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
                }
                /* either retransmit or send bar if ack not recd */
                if (!ack_recd) {
-                       struct ieee80211_tx_rate *txrate =
-                           tx_info->status.rates;
-                       if (retry && (txrate[0].count < (int)retry_limit)) {
+                       if (retry && (ini->txretry[index] < (int)retry_limit)) {
                                ini->txretry[index]++;
                                ini->tx_in_transit--;
                                /*
                                 * Use high prededence for retransmit to
                                 * give some punch
                                 */
-                               /* brcms_c_txq_enq(wlc, scb, p,
-                                * BRCMS_PRIO_TO_PREC(tid)); */
                                brcms_c_txq_enq(wlc, scb, p,
                                                BRCMS_PRIO_TO_HI_PREC(tid));
                        } else {
@@ -1074,9 +1070,9 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
                                    IEEE80211_TX_STAT_AMPDU_NO_BACK;
                                skb_pull(p, D11_PHY_HDR_LEN);
                                skb_pull(p, D11_TXH_LEN);
-                               wiphy_err(wiphy, "%s: BA Timeout, seq %d, in_"
-                                       "transit %d\n", "AMPDU status", seq,
-                                       ini->tx_in_transit);
+                               BCMMSG(wiphy,
+                                      "BA Timeout, seq %d, in_transit %d\n",
+                                      seq, ini->tx_in_transit);
                                ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw,
                                                            p);
                        }
index 64cf439035c3854593f27e51a838826a714518dd..ca78e91de86cb71c1e84919a9732cdb9bc3077fa 100644 (file)
@@ -1240,7 +1240,7 @@ int iwlagn_suspend(struct iwl_priv *priv,
                                .flags = CMD_SYNC,
                                .data[0] = key_data.rsc_tsc,
                                .dataflags[0] = IWL_HCMD_DFL_NOCOPY,
-                               .len[0] = sizeof(key_data.rsc_tsc),
+                               .len[0] = sizeof(*key_data.rsc_tsc),
                        };
 
                        ret = iwl_trans_send_cmd(trans(priv), &rsc_tsc_cmd);
index 7353826095f110a8766d6c1a4425a71c49ba8a91..e483cfa8d14e175aac3432f77951d3641989f116 100644 (file)
@@ -1187,6 +1187,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
        unsigned long flags;
        struct iwl_addsta_cmd sta_cmd;
        u8 sta_id = iwlagn_key_sta_id(priv, ctx->vif, sta);
+       __le16 key_flags;
 
        /* if station isn't there, neither is the key */
        if (sta_id == IWL_INVALID_STATION)
@@ -1212,7 +1213,14 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
                IWL_ERR(priv, "offset %d not used in uCode key table.\n",
                        keyconf->hw_key_idx);
 
-       sta_cmd.key.key_flags = STA_KEY_FLG_NO_ENC | STA_KEY_FLG_INVALID;
+       key_flags = cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS);
+       key_flags |= STA_KEY_FLG_MAP_KEY_MSK | STA_KEY_FLG_NO_ENC |
+                    STA_KEY_FLG_INVALID;
+
+       if (!(keyconf->flags & IEEE80211_KEY_FLAG_PAIRWISE))
+               key_flags |= STA_KEY_MULTICAST_MSK;
+
+       sta_cmd.key.key_flags = key_flags;
        sta_cmd.key.key_offset = WEP_INVALID_OFFSET;
        sta_cmd.sta.modify_mask = STA_MODIFY_KEY_MASK;
        sta_cmd.mode = STA_CONTROL_MODIFY_MSK;
index 5b2972b43b0e23ee62e94d255146d6be1787634d..2210a0f9af2da52c0f761841e586f18d7ee75480 100644 (file)
@@ -846,6 +846,7 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid,
        priv->sec_info.wpa_enabled = false;
        priv->sec_info.wpa2_enabled = false;
        priv->wep_key_curr_index = 0;
+       priv->sec_info.encryption_mode = 0;
        ret = mwifiex_set_encode(priv, NULL, 0, 0, 1);
 
        if (mode == NL80211_IFTYPE_ADHOC) {
index c3e1aa7c1a8057b7eb19270f8aacb3f718b86577..d2a1ea98d0f23a144653ed7fceefeb62a2191e75 100644 (file)
@@ -1220,7 +1220,8 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
                cancel_work_sync(&rt2x00dev->rxdone_work);
                cancel_work_sync(&rt2x00dev->txdone_work);
        }
-       destroy_workqueue(rt2x00dev->workqueue);
+       if (rt2x00dev->workqueue)
+               destroy_workqueue(rt2x00dev->workqueue);
 
        /*
         * Free the tx status fifo.
index ea2bd1be26404092585dcb4d20b0ab113a808ab7..91a375fb6ae622181231fce19b1a5907e94c9f40 100644 (file)
@@ -23,7 +23,6 @@
 #include <asm/machdep.h>
 #endif /* CONFIG_PPC */
 
-#include <asm/setup.h>
 #include <asm/page.h>
 
 char *of_fdt_get_string(struct boot_param_header *blob, u32 offset)
index 980c079e444393cc17577e29204b5e28da299938..483c0adcad87d4701b866d6934137e34a5c38ed9 100644 (file)
@@ -182,7 +182,7 @@ struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
        if (!phy_id || sz < sizeof(*phy_id))
                return NULL;
 
-       sprintf(bus_id, PHY_ID_FMT, "0", be32_to_cpu(phy_id[0]));
+       sprintf(bus_id, PHY_ID_FMT, "fixed-0", be32_to_cpu(phy_id[0]));
 
        phy = phy_connect(dev, bus_id, hndlr, 0, iface);
        return IS_ERR(phy) ? NULL : phy;
index 63b3ec48c203a43f3d8a9d395e459d765fd7f7b0..cae9477a6ed374cb64f8a50271b3f68469bb2749 100644 (file)
@@ -253,7 +253,7 @@ static struct amba_device *of_amba_device_create(struct device_node *node,
        if (!of_device_is_available(node))
                return NULL;
 
-       dev = kzalloc(sizeof(*dev), GFP_KERNEL);
+       dev = amba_device_alloc(NULL, 0, 0);
        if (!dev)
                return NULL;
 
@@ -283,14 +283,14 @@ static struct amba_device *of_amba_device_create(struct device_node *node,
        if (ret)
                goto err_free;
 
-       ret = amba_device_register(dev, &iomem_resource);
+       ret = amba_device_add(dev, &iomem_resource);
        if (ret)
                goto err_free;
 
        return dev;
 
 err_free:
-       kfree(dev);
+       amba_device_put(dev);
        return NULL;
 }
 #else /* CONFIG_ARM_AMBA */
index 2baadd21b7a664dea71cce5a237d66b0b8e36a25..98fbe62694d4eddbead50fde0de22fe834ce67a4 100644 (file)
@@ -369,9 +369,9 @@ static int __init pps_init(void)
        int err;
 
        pps_class = class_create(THIS_MODULE, "pps");
-       if (!pps_class) {
+       if (IS_ERR(pps_class)) {
                pr_err("failed to allocate class\n");
-               return -ENOMEM;
+               return PTR_ERR(pps_class);
        }
        pps_class->dev_attrs = pps_attrs;
 
index 691b1ab1a3d0499d85815bd03551e9d22518e494..30d2072f480b72947c74401d5522fbb9d697d313 100644 (file)
@@ -410,13 +410,14 @@ static void tsi721_db_dpc(struct work_struct *work)
         */
        mport = priv->mport;
 
-       wr_ptr = ioread32(priv->regs + TSI721_IDQ_WP(IDB_QUEUE));
-       rd_ptr = ioread32(priv->regs + TSI721_IDQ_RP(IDB_QUEUE));
+       wr_ptr = ioread32(priv->regs + TSI721_IDQ_WP(IDB_QUEUE)) % IDB_QSIZE;
+       rd_ptr = ioread32(priv->regs + TSI721_IDQ_RP(IDB_QUEUE)) % IDB_QSIZE;
 
        while (wr_ptr != rd_ptr) {
                idb_entry = (u64 *)(priv->idb_base +
                                        (TSI721_IDB_ENTRY_SIZE * rd_ptr));
                rd_ptr++;
+               rd_ptr %= IDB_QSIZE;
                idb.msg = *idb_entry;
                *idb_entry = 0;
 
index 3767364452fdd890785da5276f1f9b648be89aea..ea4d8f575ac6524676550789e93beb143cdb7cff 100644 (file)
@@ -260,8 +260,8 @@ static int da9052_set_ldo5_6_voltage(struct regulator_dev *rdev,
         * the LDO activate bit to implment the changes on the
         * LDO output.
        */
-       return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG, 0,
-                                info->activate_bit);
+       return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG,
+                                info->activate_bit, info->activate_bit);
 }
 
 static int da9052_set_dcdc_voltage(struct regulator_dev *rdev,
@@ -280,8 +280,8 @@ static int da9052_set_dcdc_voltage(struct regulator_dev *rdev,
         * the DCDC activate bit to implment the changes on the
         * DCDC output.
        */
-       return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG, 0,
-                                info->activate_bit);
+       return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG,
+                                info->activate_bit, info->activate_bit);
 }
 
 static int da9052_get_regulator_voltage_sel(struct regulator_dev *rdev)
index 5c15ba01e9c729bb6139b9d14fb52cb38f5337e8..40ecf5165899acac085ce7a650be780aead60fda 100644 (file)
@@ -662,7 +662,7 @@ static int tps65910_set_voltage_dcdc(struct regulator_dev *dev,
                tps65910_reg_write(pmic, TPS65910_VDD2_OP, vsel);
                break;
        case TPS65911_REG_VDDCTRL:
-               vsel = selector;
+               vsel = selector + 3;
                tps65910_reg_write(pmic, TPS65911_VDDCTRL_OP, vsel);
        }
 
index 9beba49c3c5b48c2abcca65c916eabc0d782a49a..2853c2a6f10f4a055d2aadb8d3fac0380bff7f97 100644 (file)
@@ -125,6 +125,13 @@ static int __devinit r9701_probe(struct spi_device *spi)
        unsigned char tmp;
        int res;
 
+       tmp = R100CNT;
+       res = read_regs(&spi->dev, &tmp, 1);
+       if (res || tmp != 0x20) {
+               dev_err(&spi->dev, "cannot read RTC register\n");
+               return -ENODEV;
+       }
+
        rtc = rtc_device_register("r9701",
                                &spi->dev, &r9701_rtc_ops, THIS_MODULE);
        if (IS_ERR(rtc))
@@ -132,13 +139,6 @@ static int __devinit r9701_probe(struct spi_device *spi)
 
        dev_set_drvdata(&spi->dev, rtc);
 
-       tmp = R100CNT;
-       res = read_regs(&spi->dev, &tmp, 1);
-       if (res || tmp != 0x20) {
-               rtc_device_unregister(rtc);
-               return res;
-       }
-
        return 0;
 }
 
index 3ef8d071c64a683316a01b6e12ecd68f3d6f1d9d..770a740a393cd57bd24de3e0e19c1b852d9cd771 100644 (file)
@@ -167,7 +167,7 @@ again:
        DBF_ERROR("%4x EQBS ERROR", SCH_NO(q));
        DBF_ERROR("%3d%3d%2d", count, tmp_count, nr);
        q->handler(q->irq_ptr->cdev, QDIO_ERROR_ACTIVATE_CHECK_CONDITION,
-                  0, -1, -1, q->irq_ptr->int_parm);
+                  q->nr, q->first_to_kick, count, q->irq_ptr->int_parm);
        return 0;
 }
 
@@ -215,7 +215,7 @@ again:
        DBF_ERROR("%4x SQBS ERROR", SCH_NO(q));
        DBF_ERROR("%3d%3d%2d", count, tmp_count, nr);
        q->handler(q->irq_ptr->cdev, QDIO_ERROR_ACTIVATE_CHECK_CONDITION,
-                  0, -1, -1, q->irq_ptr->int_parm);
+                  q->nr, q->first_to_kick, count, q->irq_ptr->int_parm);
        return 0;
 }
 
index 0cb39ff21171b323c3df916db675285420822136..f8fb2d691c0a69e6aed9385ba1a81d2cb893967c 100644 (file)
@@ -408,7 +408,7 @@ int sd_dif_prepare(struct request *rq, sector_t hw_sector, unsigned int sector_s
                        kunmap_atomic(sdt, KM_USER0);
                }
 
-               bio->bi_flags |= BIO_MAPPED_INTEGRITY;
+               bio->bi_flags |= (1 << BIO_MAPPED_INTEGRITY);
        }
 
        return 0;
index 2f9cb43a239870b6db396b8507fb6a67893f1f37..f37ad2271ad53729ba857bb732b646ebe92333a7 100644 (file)
@@ -1083,7 +1083,7 @@ err_alloc_rx_sg:
        return -ENOMEM;
 }
 
-static int __init pl022_dma_probe(struct pl022 *pl022)
+static int __devinit pl022_dma_probe(struct pl022 *pl022)
 {
        dma_cap_mask_t mask;
 
index b3d17416d86a393d75bc518b9198fa7277b165d8..830cd62d84925e548cd7480b2d6fb3a4e582a08d 100644 (file)
@@ -365,7 +365,7 @@ config PPC_EPAPR_HV_BYTECHAN
 
 config PPC_EARLY_DEBUG_EHV_BC
        bool "Early console (udbg) support for ePAPR hypervisors"
-       depends on PPC_EPAPR_HV_BYTECHAN
+       depends on PPC_EPAPR_HV_BYTECHAN=y
        help
          Select this option to enable early console (a.k.a. "udbg") support
          via an ePAPR byte channel.  You also need to choose the byte channel
index c26a82e83f6e6d11b78f002dc3982df9a3b0a27b..b556a72264d1084b5e6809ea5b4a3f59c5583b82 100644 (file)
@@ -239,7 +239,7 @@ static void ehci_fsl_setup_phy(struct ehci_hcd *ehci,
        ehci_writel(ehci, portsc, &ehci->regs->port_status[port_offset]);
 }
 
-static int ehci_fsl_usb_setup(struct ehci_hcd *ehci)
+static void ehci_fsl_usb_setup(struct ehci_hcd *ehci)
 {
        struct usb_hcd *hcd = ehci_to_hcd(ehci);
        struct fsl_usb2_platform_data *pdata;
@@ -299,19 +299,12 @@ static int ehci_fsl_usb_setup(struct ehci_hcd *ehci)
 #endif
                out_be32(non_ehci + FSL_SOC_USB_SICTRL, 0x00000001);
        }
-
-       if (!(in_be32(non_ehci + FSL_SOC_USB_CTRL) & CTRL_PHY_CLK_VALID)) {
-               printk(KERN_WARNING "fsl-ehci: USB PHY clock invalid\n");
-               return -ENODEV;
-       }
-       return 0;
 }
 
 /* called after powerup, by probe or system-pm "wakeup" */
 static int ehci_fsl_reinit(struct ehci_hcd *ehci)
 {
-       if (ehci_fsl_usb_setup(ehci))
-               return -ENODEV;
+       ehci_fsl_usb_setup(ehci);
        ehci_port_power(ehci, 0);
 
        return 0;
index bdf43e2adc51a4fdb4f12ca4e70b1e5c42c62f2c..4918062211656c276f5904cc50d45605076ed026 100644 (file)
@@ -45,6 +45,5 @@
 #define FSL_SOC_USB_PRICTRL    0x40c   /* NOTE: big-endian */
 #define FSL_SOC_USB_SICTRL     0x410   /* NOTE: big-endian */
 #define FSL_SOC_USB_CTRL       0x500   /* NOTE: big-endian */
-#define CTRL_PHY_CLK_VALID     (1 << 17)
 #define SNOOP_SIZE_2GB         0x1e
 #endif                         /* _EHCI_FSL_H */
index 0fdd6f6873bfcc1f153cb50462e588ebc49d33c0..d3a31132722722eaf1c4d214cbd6d88315fea998 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/io.h>
 #include <linux/delay.h>
 #include <linux/lcd.h>
+#include <linux/gpio.h>
 
 #include <plat/board-ams-delta.h>
 #include <mach/hardware.h>
@@ -98,29 +99,41 @@ static struct lcd_ops ams_delta_lcd_ops = {
 
 /* omapfb panel section */
 
+static const struct gpio _gpios[] = {
+       {
+               .gpio   = AMS_DELTA_GPIO_PIN_LCD_VBLEN,
+               .flags  = GPIOF_OUT_INIT_LOW,
+               .label  = "lcd_vblen",
+       },
+       {
+               .gpio   = AMS_DELTA_GPIO_PIN_LCD_NDISP,
+               .flags  = GPIOF_OUT_INIT_LOW,
+               .label  = "lcd_ndisp",
+       },
+};
+
 static int ams_delta_panel_init(struct lcd_panel *panel,
                struct omapfb_device *fbdev)
 {
-       return 0;
+       return gpio_request_array(_gpios, ARRAY_SIZE(_gpios));
 }
 
 static void ams_delta_panel_cleanup(struct lcd_panel *panel)
 {
+       gpio_free_array(_gpios, ARRAY_SIZE(_gpios));
 }
 
 static int ams_delta_panel_enable(struct lcd_panel *panel)
 {
-       ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_NDISP,
-                       AMS_DELTA_LATCH2_LCD_NDISP);
-       ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_VBLEN,
-                       AMS_DELTA_LATCH2_LCD_VBLEN);
+       gpio_set_value(AMS_DELTA_GPIO_PIN_LCD_NDISP, 1);
+       gpio_set_value(AMS_DELTA_GPIO_PIN_LCD_VBLEN, 1);
        return 0;
 }
 
 static void ams_delta_panel_disable(struct lcd_panel *panel)
 {
-       ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_VBLEN, 0);
-       ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_NDISP, 0);
+       gpio_set_value(AMS_DELTA_GPIO_PIN_LCD_VBLEN, 0);
+       gpio_set_value(AMS_DELTA_GPIO_PIN_LCD_NDISP, 0);
 }
 
 static unsigned long ams_delta_panel_get_caps(struct lcd_panel *panel)
index 969beb0e22311a4f7e7f4155524709d5dd8269bf..b9d64d89a0437aa4db5b26bf07e1ecb870d6fba1 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -228,12 +228,6 @@ static void __put_ioctx(struct kioctx *ctx)
        call_rcu(&ctx->rcu_head, ctx_rcu_free);
 }
 
-static inline void get_ioctx(struct kioctx *kioctx)
-{
-       BUG_ON(atomic_read(&kioctx->users) <= 0);
-       atomic_inc(&kioctx->users);
-}
-
 static inline int try_get_ioctx(struct kioctx *kioctx)
 {
        return atomic_inc_not_zero(&kioctx->users);
@@ -273,7 +267,7 @@ static struct kioctx *ioctx_alloc(unsigned nr_events)
        mm = ctx->mm = current->mm;
        atomic_inc(&mm->mm_count);
 
-       atomic_set(&ctx->users, 1);
+       atomic_set(&ctx->users, 2);
        spin_lock_init(&ctx->ctx_lock);
        spin_lock_init(&ctx->ring_info.ring_lock);
        init_waitqueue_head(&ctx->wait);
@@ -490,6 +484,8 @@ static void kiocb_batch_free(struct kioctx *ctx, struct kiocb_batch *batch)
                kmem_cache_free(kiocb_cachep, req);
                ctx->reqs_active--;
        }
+       if (unlikely(!ctx->reqs_active && ctx->dead))
+               wake_up_all(&ctx->wait);
        spin_unlock_irq(&ctx->ctx_lock);
 }
 
@@ -607,11 +603,16 @@ static void aio_fput_routine(struct work_struct *data)
                        fput(req->ki_filp);
 
                /* Link the iocb into the context's free list */
+               rcu_read_lock();
                spin_lock_irq(&ctx->ctx_lock);
                really_put_req(ctx, req);
+               /*
+                * at that point ctx might've been killed, but actual
+                * freeing is RCU'd
+                */
                spin_unlock_irq(&ctx->ctx_lock);
+               rcu_read_unlock();
 
-               put_ioctx(ctx);
                spin_lock_irq(&fput_lock);
        }
        spin_unlock_irq(&fput_lock);
@@ -642,7 +643,6 @@ static int __aio_put_req(struct kioctx *ctx, struct kiocb *req)
         * this function will be executed w/out any aio kthread wakeup.
         */
        if (unlikely(!fput_atomic(req->ki_filp))) {
-               get_ioctx(ctx);
                spin_lock(&fput_lock);
                list_add(&req->ki_list, &fput_head);
                spin_unlock(&fput_lock);
@@ -1336,10 +1336,10 @@ SYSCALL_DEFINE2(io_setup, unsigned, nr_events, aio_context_t __user *, ctxp)
        ret = PTR_ERR(ioctx);
        if (!IS_ERR(ioctx)) {
                ret = put_user(ioctx->user_id, ctxp);
-               if (!ret)
+               if (!ret) {
+                       put_ioctx(ioctx);
                        return 0;
-
-               get_ioctx(ioctx); /* io_destroy() expects us to hold a ref */
+               }
                io_destroy(ioctx);
        }
 
index a6395bdb26aeb13b7b98c74df4f77780c1c95412..1ff94054d35aba8a5c0748585006641010a322af 100644 (file)
@@ -259,6 +259,13 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
        current->mm->free_area_cache = current->mm->mmap_base;
        current->mm->cached_hole_size = 0;
 
+       retval = setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT);
+       if (retval < 0) {
+               /* Someone check-me: is this error path enough? */
+               send_sig(SIGKILL, current, 0);
+               return retval;
+       }
+
        install_exec_creds(bprm);
        current->flags &= ~PF_FORKNOEXEC;
 
@@ -352,13 +359,6 @@ beyond_if:
                return retval;
        }
 
-       retval = setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT);
-       if (retval < 0) { 
-               /* Someone check-me: is this error path enough? */ 
-               send_sig(SIGKILL, current, 0); 
-               return retval;
-       }
-
        current->mm->start_stack =
                (unsigned long) create_aout_tables((char __user *) bprm->p, bprm);
 #ifdef __alpha__
index 98f6bf10bbd47d26e79d59e6d629e53b2d230500..0436c12da8c2e7d551430639f09e086182b85614 100644 (file)
@@ -583,7 +583,7 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans,
        struct btrfs_path *path;
        struct btrfs_key info_key = { 0 };
        struct btrfs_delayed_ref_root *delayed_refs = NULL;
-       struct btrfs_delayed_ref_head *head = NULL;
+       struct btrfs_delayed_ref_head *head;
        int info_level = 0;
        int ret;
        struct list_head prefs_delayed;
@@ -607,6 +607,8 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans,
         * at a specified point in time
         */
 again:
+       head = NULL;
+
        ret = btrfs_search_slot(trans, fs_info->extent_root, &key, path, 0, 0);
        if (ret < 0)
                goto out;
@@ -635,8 +637,10 @@ again:
                        goto again;
                }
                ret = __add_delayed_refs(head, seq, &info_key, &prefs_delayed);
-               if (ret)
+               if (ret) {
+                       spin_unlock(&delayed_refs->lock);
                        goto out;
+               }
        }
        spin_unlock(&delayed_refs->lock);
 
index 2373b39a132b5eacaf0341fcfb351e99c912c1a7..22db04550f6a03ff92580e801b860cc4ed757ebc 100644 (file)
@@ -305,7 +305,7 @@ again:
 
        spin_lock(&fs_info->reada_lock);
        ret = radix_tree_insert(&dev->reada_zones,
-                               (unsigned long)zone->end >> PAGE_CACHE_SHIFT,
+                               (unsigned long)(zone->end >> PAGE_CACHE_SHIFT),
                                zone);
        spin_unlock(&fs_info->reada_lock);
 
index 63a196b97d5094a02e0f68b4fe5084051e7ad33a..bc7e24420ac0bee0ac2cab03e96224d1edf4adc7 100644 (file)
@@ -584,10 +584,26 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
                         * If either that or op not supported returned, follow
                         * the normal lookup.
                         */
-                       if ((rc == 0) || (rc == -ENOENT))
+                       switch (rc) {
+                       case 0:
+                               /*
+                                * The server may allow us to open things like
+                                * FIFOs, but the client isn't set up to deal
+                                * with that. If it's not a regular file, just
+                                * close it and proceed as if it were a normal
+                                * lookup.
+                                */
+                               if (newInode && !S_ISREG(newInode->i_mode)) {
+                                       CIFSSMBClose(xid, pTcon, fileHandle);
+                                       break;
+                               }
+                       case -ENOENT:
                                posix_open = true;
-                       else if ((rc == -EINVAL) || (rc != -EOPNOTSUPP))
+                       case -EOPNOTSUPP:
+                               break;
+                       default:
                                pTcon->broken_posix_open = true;
+                       }
                }
                if (!posix_open)
                        rc = cifs_get_inode_info_unix(&newInode, full_path,
index a5f54b7d98224dd613efaa3c89edfdebdc8817e6..745da3d0653e38a0f48db4f0741f3414e44d974e 100644 (file)
@@ -534,6 +534,11 @@ cifs_all_info_to_fattr(struct cifs_fattr *fattr, FILE_ALL_INFO *info,
        if (fattr->cf_cifsattrs & ATTR_DIRECTORY) {
                fattr->cf_mode = S_IFDIR | cifs_sb->mnt_dir_mode;
                fattr->cf_dtype = DT_DIR;
+               /*
+                * Server can return wrong NumberOfLinks value for directories
+                * when Unix extensions are disabled - fake it.
+                */
+               fattr->cf_nlink = 2;
        } else {
                fattr->cf_mode = S_IFREG | cifs_sb->mnt_file_mode;
                fattr->cf_dtype = DT_REG;
@@ -541,9 +546,9 @@ cifs_all_info_to_fattr(struct cifs_fattr *fattr, FILE_ALL_INFO *info,
                /* clear write bits if ATTR_READONLY is set */
                if (fattr->cf_cifsattrs & ATTR_READONLY)
                        fattr->cf_mode &= ~(S_IWUGO);
-       }
 
-       fattr->cf_nlink = le32_to_cpu(info->NumberOfLinks);
+               fattr->cf_nlink = le32_to_cpu(info->NumberOfLinks);
+       }
 
        fattr->cf_uid = cifs_sb->mnt_uid;
        fattr->cf_gid = cifs_sb->mnt_gid;
@@ -1322,7 +1327,6 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, umode_t mode)
                        }
 /*BB check (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID ) to see if need
        to set uid/gid */
-                       inc_nlink(inode);
 
                        cifs_unix_basic_to_fattr(&fattr, pInfo, cifs_sb);
                        cifs_fill_uniqueid(inode->i_sb, &fattr);
@@ -1355,7 +1359,6 @@ mkdir_retry_old:
                d_drop(direntry);
        } else {
 mkdir_get_info:
-               inc_nlink(inode);
                if (pTcon->unix_ext)
                        rc = cifs_get_inode_info_unix(&newinode, full_path,
                                                      inode->i_sb, xid);
@@ -1436,6 +1439,11 @@ mkdir_get_info:
                }
        }
 mkdir_out:
+       /*
+        * Force revalidate to get parent dir info when needed since cached
+        * attributes are invalid now.
+        */
+       CIFS_I(inode)->time = 0;
        kfree(full_path);
        FreeXid(xid);
        cifs_put_tlink(tlink);
@@ -1475,7 +1483,6 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry)
        cifs_put_tlink(tlink);
 
        if (!rc) {
-               drop_nlink(inode);
                spin_lock(&direntry->d_inode->i_lock);
                i_size_write(direntry->d_inode, 0);
                clear_nlink(direntry->d_inode);
@@ -1483,12 +1490,15 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry)
        }
 
        cifsInode = CIFS_I(direntry->d_inode);
-       cifsInode->time = 0;    /* force revalidate to go get info when
-                                  needed */
+       /* force revalidate to go get info when needed */
+       cifsInode->time = 0;
 
        cifsInode = CIFS_I(inode);
-       cifsInode->time = 0;    /* force revalidate to get parent dir info
-                                  since cached search results now invalid */
+       /*
+        * Force revalidate to get parent dir info when needed since cached
+        * attributes are invalid now.
+        */
+       cifsInode->time = 0;
 
        direntry->d_inode->i_ctime = inode->i_ctime = inode->i_mtime =
                current_fs_time(inode->i_sb);
index 138be96e25b674b6e6c92f1fe926f2c6fc24f605..bcbdb33fcc205aad37110be50752131aae894062 100644 (file)
@@ -137,6 +137,26 @@ int proc_nr_dentry(ctl_table *table, int write, void __user *buffer,
 }
 #endif
 
+/*
+ * Compare 2 name strings, return 0 if they match, otherwise non-zero.
+ * The strings are both count bytes long, and count is non-zero.
+ */
+static inline int dentry_cmp(const unsigned char *cs, size_t scount,
+                               const unsigned char *ct, size_t tcount)
+{
+       if (scount != tcount)
+               return 1;
+
+       do {
+               if (*cs != *ct)
+                       return 1;
+               cs++;
+               ct++;
+               tcount--;
+       } while (tcount);
+       return 0;
+}
+
 static void __d_free(struct rcu_head *head)
 {
        struct dentry *dentry = container_of(head, struct dentry, d_u.d_rcu);
index 92ce83a11e90acbb0bceda45b682a83535089342..153dee14fe559b9180a2f79b4b1f8534e25c76f5 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1915,7 +1915,6 @@ static int coredump_wait(int exit_code, struct core_state *core_state)
 {
        struct task_struct *tsk = current;
        struct mm_struct *mm = tsk->mm;
-       struct completion *vfork_done;
        int core_waiters = -EBUSY;
 
        init_completion(&core_state->startup);
@@ -1927,22 +1926,9 @@ static int coredump_wait(int exit_code, struct core_state *core_state)
                core_waiters = zap_threads(tsk, mm, core_state, exit_code);
        up_write(&mm->mmap_sem);
 
-       if (unlikely(core_waiters < 0))
-               goto fail;
-
-       /*
-        * Make sure nobody is waiting for us to release the VM,
-        * otherwise we can deadlock when we wait on each other
-        */
-       vfork_done = tsk->vfork_done;
-       if (vfork_done) {
-               tsk->vfork_done = NULL;
-               complete(vfork_done);
-       }
-
-       if (core_waiters)
+       if (core_waiters > 0)
                wait_for_completion(&core_state->startup);
-fail:
+
        return core_waiters;
 }
 
index 724c69c40bb852ab2e6404f22af6cf60bd03a266..a9fab831caf8fd8c3432c4805fd34ea9156daaa8 100644 (file)
@@ -60,6 +60,9 @@ extern struct bus_type amba_bustype;
 
 int amba_driver_register(struct amba_driver *);
 void amba_driver_unregister(struct amba_driver *);
+struct amba_device *amba_device_alloc(const char *, resource_size_t, size_t);
+void amba_device_put(struct amba_device *);
+int amba_device_add(struct amba_device *, struct resource *);
 int amba_device_register(struct amba_device *, struct resource *);
 void amba_device_unregister(struct amba_device *);
 struct amba_device *amba_find_device(const char *, struct device *, unsigned int, unsigned int);
@@ -89,4 +92,37 @@ void amba_release_regions(struct amba_device *);
 #define amba_manf(d)   AMBA_MANF_BITS((d)->periphid)
 #define amba_part(d)   AMBA_PART_BITS((d)->periphid)
 
+#define __AMBA_DEV(busid, data, mask)                          \
+       {                                                       \
+               .coherent_dma_mask = mask,                      \
+               .init_name = busid,                             \
+               .platform_data = data,                          \
+       }
+
+/*
+ * APB devices do not themselves have the ability to address memory,
+ * so DMA masks should be zero (much like USB peripheral devices.)
+ * The DMA controller DMA masks should be used instead (much like
+ * USB host controllers in conventional PCs.)
+ */
+#define AMBA_APB_DEVICE(name, busid, id, base, irqs, data)     \
+struct amba_device name##_device = {                           \
+       .dev = __AMBA_DEV(busid, data, 0),                      \
+       .res = DEFINE_RES_MEM(base, SZ_4K),                     \
+       .irq = irqs,                                            \
+       .periphid = id,                                         \
+}
+
+/*
+ * AHB devices are DMA capable, so set their DMA masks
+ */
+#define AMBA_AHB_DEVICE(name, busid, id, base, irqs, data)     \
+struct amba_device name##_device = {                           \
+       .dev = __AMBA_DEV(busid, data, ~0ULL),                  \
+       .res = DEFINE_RES_MEM(base, SZ_4K),                     \
+       .dma_mask = ~0ULL,                                      \
+       .irq = irqs,                                            \
+       .periphid = id,                                         \
+}
+
 #endif
index 514ed45c462eaf0516cbdd9f07d3f96bfada4cc7..d117b29d106227b1036520f870b25b9df316c4f3 100644 (file)
@@ -23,6 +23,8 @@
 #ifndef ASM_ARM_HARDWARE_SERIAL_AMBA_H
 #define ASM_ARM_HARDWARE_SERIAL_AMBA_H
 
+#include <linux/types.h>
+
 /* -------------------------------------------------------------------------------
  *  From AMBA UART (PL010) Block Specification
  * -------------------------------------------------------------------------------
index 4270bedd230849c48a1e5387eb2d8a6b6e530a80..ff5f5256d175c8dde1345394f8fedd4e701b03e0 100644 (file)
@@ -47,26 +47,6 @@ struct dentry_stat_t {
 };
 extern struct dentry_stat_t dentry_stat;
 
-/*
- * Compare 2 name strings, return 0 if they match, otherwise non-zero.
- * The strings are both count bytes long, and count is non-zero.
- */
-static inline int dentry_cmp(const unsigned char *cs, size_t scount,
-                               const unsigned char *ct, size_t tcount)
-{
-       if (scount != tcount)
-               return 1;
-
-       do {
-               if (*cs != *ct)
-                       return 1;
-               cs++;
-               ct++;
-               tcount--;
-       } while (tcount);
-       return 0;
-}
-
 /* Name hashing routines. Initial hash value */
 /* Hash courtesy of the R5 hash in reiserfs modulo sign bits */
 #define init_name_hash()               0
index fee66317e071547a4a75e0b90b61399b97249ed2..35f7237ec972bef4ce1ba24cd617571a193ce806 100644 (file)
 #include <linux/errno.h>
 #include <linux/list.h>
 
+/*
+ * Keep this list arranged in rough order of priority. Anything listed after
+ * KMSG_DUMP_OOPS will not be logged by default unless printk.always_kmsg_dump
+ * is passed to the kernel.
+ */
 enum kmsg_dump_reason {
-       KMSG_DUMP_OOPS,
        KMSG_DUMP_PANIC,
+       KMSG_DUMP_OOPS,
+       KMSG_DUMP_EMERG,
        KMSG_DUMP_RESTART,
        KMSG_DUMP_HALT,
        KMSG_DUMP_POWEROFF,
-       KMSG_DUMP_EMERG,
 };
 
 /**
index 4d34356fe644ee5dca447071829ae06ab68eeb60..b80de520670b64a67dc2ceb8b4e4e11c1d623071 100644 (file)
@@ -129,7 +129,6 @@ extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg,
 extern void mem_cgroup_replace_page_cache(struct page *oldpage,
                                        struct page *newpage);
 
-extern void mem_cgroup_reset_owner(struct page *page);
 #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
 extern int do_swap_account;
 #endif
@@ -392,10 +391,6 @@ static inline void mem_cgroup_replace_page_cache(struct page *oldpage,
                                struct page *newpage)
 {
 }
-
-static inline void mem_cgroup_reset_owner(struct page *page)
-{
-}
 #endif /* CONFIG_CGROUP_MEM_CONT */
 
 #if !defined(CONFIG_CGROUP_MEM_RES_CTLR) || !defined(CONFIG_DEBUG_VM)
index a75a831e2057f96e3519d100f988a584e18ac669..92cf6ad35e0ea01d33ab70ea3cb70394f96762e2 100644 (file)
@@ -281,6 +281,14 @@ static inline struct property *of_find_property(const struct device_node *np,
        return NULL;
 }
 
+static inline struct device_node *of_find_compatible_node(
+                                               struct device_node *from,
+                                               const char *type,
+                                               const char *compat)
+{
+       return NULL;
+}
+
 static inline int of_property_read_u32_array(const struct device_node *np,
                                             const char *propname,
                                             u32 *out_values, size_t sz)
index 32cd1f67462e9b4a80f602474878c6ff632d6976..21638ae14e07c71a005d6cfcea61958e8cd8f970 100644 (file)
@@ -348,9 +348,9 @@ do {                                                                        \
 #define _this_cpu_generic_to_op(pcp, val, op)                          \
 do {                                                                   \
        unsigned long flags;                                            \
-       local_irq_save(flags);                                          \
+       raw_local_irq_save(flags);                                      \
        *__this_cpu_ptr(&(pcp)) op val;                                 \
-       local_irq_restore(flags);                                       \
+       raw_local_irq_restore(flags);                                   \
 } while (0)
 
 #ifndef this_cpu_write
@@ -449,10 +449,10 @@ do {                                                                      \
 ({                                                                     \
        typeof(pcp) ret__;                                              \
        unsigned long flags;                                            \
-       local_irq_save(flags);                                          \
+       raw_local_irq_save(flags);                                      \
        __this_cpu_add(pcp, val);                                       \
        ret__ = __this_cpu_read(pcp);                                   \
-       local_irq_restore(flags);                                       \
+       raw_local_irq_restore(flags);                                   \
        ret__;                                                          \
 })
 
@@ -479,10 +479,10 @@ do {                                                                      \
 #define _this_cpu_generic_xchg(pcp, nval)                              \
 ({     typeof(pcp) ret__;                                              \
        unsigned long flags;                                            \
-       local_irq_save(flags);                                          \
+       raw_local_irq_save(flags);                                      \
        ret__ = __this_cpu_read(pcp);                                   \
        __this_cpu_write(pcp, nval);                                    \
-       local_irq_restore(flags);                                       \
+       raw_local_irq_restore(flags);                                   \
        ret__;                                                          \
 })
 
@@ -507,11 +507,11 @@ do {                                                                      \
 ({                                                                     \
        typeof(pcp) ret__;                                              \
        unsigned long flags;                                            \
-       local_irq_save(flags);                                          \
+       raw_local_irq_save(flags);                                      \
        ret__ = __this_cpu_read(pcp);                                   \
        if (ret__ == (oval))                                            \
                __this_cpu_write(pcp, nval);                            \
-       local_irq_restore(flags);                                       \
+       raw_local_irq_restore(flags);                                   \
        ret__;                                                          \
 })
 
@@ -544,10 +544,10 @@ do {                                                                      \
 ({                                                                     \
        int ret__;                                                      \
        unsigned long flags;                                            \
-       local_irq_save(flags);                                          \
+       raw_local_irq_save(flags);                                      \
        ret__ = __this_cpu_generic_cmpxchg_double(pcp1, pcp2,           \
                        oval1, oval2, nval1, nval2);                    \
-       local_irq_restore(flags);                                       \
+       raw_local_irq_restore(flags);                                   \
        ret__;                                                          \
 })
 
@@ -718,12 +718,13 @@ do {                                                                      \
 # ifndef __this_cpu_add_return_8
 #  define __this_cpu_add_return_8(pcp, val)    __this_cpu_generic_add_return(pcp, val)
 # endif
-# define __this_cpu_add_return(pcp, val)       __pcpu_size_call_return2(this_cpu_add_return_, pcp, val)
+# define __this_cpu_add_return(pcp, val)       \
+       __pcpu_size_call_return2(__this_cpu_add_return_, pcp, val)
 #endif
 
-#define __this_cpu_sub_return(pcp, val)        this_cpu_add_return(pcp, -(val))
-#define __this_cpu_inc_return(pcp)     this_cpu_add_return(pcp, 1)
-#define __this_cpu_dec_return(pcp)     this_cpu_add_return(pcp, -1)
+#define __this_cpu_sub_return(pcp, val)        __this_cpu_add_return(pcp, -(val))
+#define __this_cpu_inc_return(pcp)     __this_cpu_add_return(pcp, 1)
+#define __this_cpu_dec_return(pcp)     __this_cpu_add_return(pcp, -1)
 
 #define __this_cpu_generic_xchg(pcp, nval)                             \
 ({     typeof(pcp) ret__;                                              \
index 7d379a6bfd886679fcfefee2ed90fb636d6cd028..0657368bd78fb9207369b484fa2aa294f90ce5dc 100644 (file)
@@ -1777,7 +1777,6 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *
 /*
  * Per process flags
  */
-#define PF_STARTING    0x00000002      /* being created */
 #define PF_EXITING     0x00000004      /* getting shut down */
 #define PF_EXITPIDONE  0x00000008      /* pi exit done on shut down */
 #define PF_VCPU                0x00000010      /* I'm a virtual CPU */
@@ -2371,7 +2370,7 @@ static inline int thread_group_empty(struct task_struct *p)
  * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring
  * subscriptions and synchronises with wait4().  Also used in procfs.  Also
  * pins the final release of task.io_context.  Also protects ->cpuset and
- * ->cgroup.subsys[].
+ * ->cgroup.subsys[]. And ->vfork_done.
  *
  * Nests both inside and outside of read_lock(&tasklist_lock).
  * It must not be nested with write_lock_irq(&tasklist_lock),
index 46a85c9e1f25bebddd3a1887b30fb182dcf5b5e4..3c7ffdb40dc64ba62cd8f9586fd04d668c4a469c 100644 (file)
@@ -412,7 +412,8 @@ struct tcp_sock {
 
        struct tcp_sack_block recv_sack_cache[4];
 
-       struct sk_buff *highest_sack;   /* highest skb with SACK received
+       struct sk_buff *highest_sack;   /* skb just after the highest
+                                        * skb with SACKed bit set
                                         * (validity guaranteed only if
                                         * sacked_out > 0)
                                         */
index 06b795dd5906720886376b6e355dd13027ee6749..b94765e38e8074aa5a877c90b395f0bc8cb6bb4a 100644 (file)
@@ -35,12 +35,12 @@ struct inet_peer {
 
        u32                     metrics[RTAX_MAX];
        u32                     rate_tokens;    /* rate limiting for ICMP */
-       int                     redirect_genid;
        unsigned long           rate_last;
        unsigned long           pmtu_expires;
        u32                     pmtu_orig;
        u32                     pmtu_learned;
        struct inetpeer_addr_base redirect_learned;
+       struct list_head        gc_list;
        /*
         * Once inet_peer is queued for deletion (refcnt == -1), following fields
         * are not available: rid, ip_id_count, tcp_ts, tcp_ts_stamp
@@ -96,6 +96,8 @@ static inline struct inet_peer *inet_getpeer_v6(const struct in6_addr *v6daddr,
 extern void inet_putpeer(struct inet_peer *p);
 extern bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout);
 
+extern void inetpeer_invalidate_tree(int family);
+
 /*
  * temporary check to make sure we dont access rid, ip_id_count, tcp_ts,
  * tcp_ts_stamp if no refcount is taken on inet_peer
index 42c29bfbcee34d8d6ada5d18533850d82973f352..2d80c291fffbad01828648c46df1da0f69763e49 100644 (file)
@@ -1364,8 +1364,9 @@ static inline void tcp_push_pending_frames(struct sock *sk)
        }
 }
 
-/* Start sequence of the highest skb with SACKed bit, valid only if
- * sacked > 0 or when the caller has ensured validity by itself.
+/* Start sequence of the skb just after the highest skb with SACKed
+ * bit, valid only if sacked_out > 0 or when the caller has ensured
+ * validity by itself.
  */
 static inline u32 tcp_highest_sack_seq(struct tcp_sock *tp)
 {
index e2cd3e2a5ae8b73dac244bd4ee98fbe70d5d5364..26a7a6707fa738e181a6b397d8ba9bea47269deb 100644 (file)
@@ -668,6 +668,38 @@ struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)
        return mm;
 }
 
+static void complete_vfork_done(struct task_struct *tsk)
+{
+       struct completion *vfork;
+
+       task_lock(tsk);
+       vfork = tsk->vfork_done;
+       if (likely(vfork)) {
+               tsk->vfork_done = NULL;
+               complete(vfork);
+       }
+       task_unlock(tsk);
+}
+
+static int wait_for_vfork_done(struct task_struct *child,
+                               struct completion *vfork)
+{
+       int killed;
+
+       freezer_do_not_count();
+       killed = wait_for_completion_killable(vfork);
+       freezer_count();
+
+       if (killed) {
+               task_lock(child);
+               child->vfork_done = NULL;
+               task_unlock(child);
+       }
+
+       put_task_struct(child);
+       return killed;
+}
+
 /* Please note the differences between mmput and mm_release.
  * mmput is called whenever we stop holding onto a mm_struct,
  * error success whatever.
@@ -683,8 +715,6 @@ struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)
  */
 void mm_release(struct task_struct *tsk, struct mm_struct *mm)
 {
-       struct completion *vfork_done = tsk->vfork_done;
-
        /* Get rid of any futexes when releasing the mm */
 #ifdef CONFIG_FUTEX
        if (unlikely(tsk->robust_list)) {
@@ -704,17 +734,15 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm)
        /* Get rid of any cached register state */
        deactivate_mm(tsk, mm);
 
-       /* notify parent sleeping on vfork() */
-       if (vfork_done) {
-               tsk->vfork_done = NULL;
-               complete(vfork_done);
-       }
+       if (tsk->vfork_done)
+               complete_vfork_done(tsk);
 
        /*
         * If we're exiting normally, clear a user-space tid field if
         * requested.  We leave this alone when dying by signal, to leave
         * the value intact in a core dump, and to save the unnecessary
-        * trouble otherwise.  Userland only wants this done for a sys_exit.
+        * trouble, say, a killed vfork parent shouldn't touch this mm.
+        * Userland only wants this done for a sys_exit.
         */
        if (tsk->clear_child_tid) {
                if (!(tsk->flags & PF_SIGNALED) &&
@@ -1018,7 +1046,6 @@ static void copy_flags(unsigned long clone_flags, struct task_struct *p)
 
        new_flags &= ~(PF_SUPERPRIV | PF_WQ_WORKER);
        new_flags |= PF_FORKNOEXEC;
-       new_flags |= PF_STARTING;
        p->flags = new_flags;
 }
 
@@ -1548,16 +1575,9 @@ long do_fork(unsigned long clone_flags,
                if (clone_flags & CLONE_VFORK) {
                        p->vfork_done = &vfork;
                        init_completion(&vfork);
+                       get_task_struct(p);
                }
 
-               /*
-                * We set PF_STARTING at creation in case tracing wants to
-                * use this to distinguish a fully live task from one that
-                * hasn't finished SIGSTOP raising yet.  Now we clear it
-                * and set the child going.
-                */
-               p->flags &= ~PF_STARTING;
-
                wake_up_new_task(p);
 
                /* forking complete and child started to run, tell ptracer */
@@ -1565,10 +1585,8 @@ long do_fork(unsigned long clone_flags,
                        ptrace_event(trace, nr);
 
                if (clone_flags & CLONE_VFORK) {
-                       freezer_do_not_count();
-                       wait_for_completion(&vfork);
-                       freezer_count();
-                       ptrace_event(PTRACE_EVENT_VFORK_DONE, nr);
+                       if (!wait_for_vfork_done(p, &vfork))
+                               ptrace_event(PTRACE_EVENT_VFORK_DONE, nr);
                }
        } else {
                nr = PTR_ERR(p);
index 2e48ec0c2e91cf099642f8bf43e90476fb6457a3..c21449f85a2a4061bd9a34fc4844b5a3240850b3 100644 (file)
@@ -119,15 +119,20 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
  * For preemptible RCU it is sufficient to call rcu_read_unlock in order
  * to exit the grace period. For classic RCU, a reschedule is required.
  */
-static void rcu_lock_break(struct task_struct *g, struct task_struct *t)
+static bool rcu_lock_break(struct task_struct *g, struct task_struct *t)
 {
+       bool can_cont;
+
        get_task_struct(g);
        get_task_struct(t);
        rcu_read_unlock();
        cond_resched();
        rcu_read_lock();
+       can_cont = pid_alive(g) && pid_alive(t);
        put_task_struct(t);
        put_task_struct(g);
+
+       return can_cont;
 }
 
 /*
@@ -154,9 +159,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
                        goto unlock;
                if (!--batch_count) {
                        batch_count = HUNG_TASK_BATCHING;
-                       rcu_lock_break(g, t);
-                       /* Exit if t or g was unhashed during refresh. */
-                       if (t->state == TASK_DEAD || g->state == TASK_DEAD)
+                       if (!rcu_lock_break(g, t))
                                goto unlock;
                }
                /* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */
index 32313c08444285e2f4cca1c41e2aa64887ba5a66..0f0d4704ddd8a3865d0926067fbf654d48dabbbc 100644 (file)
@@ -985,6 +985,11 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
 
                /* add new interrupt at end of irq queue */
                do {
+                       /*
+                        * Or all existing action->thread_mask bits,
+                        * so we can find the next zero bit for this
+                        * new action.
+                        */
                        thread_mask |= old->thread_mask;
                        old_ptr = &old->next;
                        old = *old_ptr;
@@ -993,14 +998,41 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
        }
 
        /*
-        * Setup the thread mask for this irqaction. Unlikely to have
-        * 32 resp 64 irqs sharing one line, but who knows.
+        * Setup the thread mask for this irqaction for ONESHOT. For
+        * !ONESHOT irqs the thread mask is 0 so we can avoid a
+        * conditional in irq_wake_thread().
         */
-       if (new->flags & IRQF_ONESHOT && thread_mask == ~0UL) {
-               ret = -EBUSY;
-               goto out_mask;
+       if (new->flags & IRQF_ONESHOT) {
+               /*
+                * Unlikely to have 32 resp 64 irqs sharing one line,
+                * but who knows.
+                */
+               if (thread_mask == ~0UL) {
+                       ret = -EBUSY;
+                       goto out_mask;
+               }
+               /*
+                * The thread_mask for the action is or'ed to
+                * desc->thread_active to indicate that the
+                * IRQF_ONESHOT thread handler has been woken, but not
+                * yet finished. The bit is cleared when a thread
+                * completes. When all threads of a shared interrupt
+                * line have completed desc->threads_active becomes
+                * zero and the interrupt line is unmasked. See
+                * handle.c:irq_wake_thread() for further information.
+                *
+                * If no thread is woken by primary (hard irq context)
+                * interrupt handlers, then desc->threads_active is
+                * also checked for zero to unmask the irq line in the
+                * affected hard irq flow handlers
+                * (handle_[fasteoi|level]_irq).
+                *
+                * The new action gets the first zero bit of
+                * thread_mask assigned. See the loop above which or's
+                * all existing action->thread_mask bits.
+                */
+               new->thread_mask = 1 << ffz(thread_mask);
        }
-       new->thread_mask = 1 << ffz(thread_mask);
 
        if (!shared) {
                init_waitqueue_head(&desc->wait_for_threads);
index 9788c0ec6f4378f19cd80e873d42a0aec7171548..c62b8546cc90e0b39de0e824b0f7ed7179d8ba92 100644 (file)
@@ -1334,8 +1334,10 @@ int __kprobes register_kprobe(struct kprobe *p)
        if (!kernel_text_address((unsigned long) p->addr) ||
            in_kprobes_functions((unsigned long) p->addr) ||
            ftrace_text_reserved(p->addr, p->addr) ||
-           jump_label_text_reserved(p->addr, p->addr))
-               goto fail_with_jump_label;
+           jump_label_text_reserved(p->addr, p->addr)) {
+               ret = -EINVAL;
+               goto cannot_probe;
+       }
 
        /* User can pass only KPROBE_FLAG_DISABLED to register_kprobe */
        p->flags &= KPROBE_FLAG_DISABLED;
@@ -1352,7 +1354,7 @@ int __kprobes register_kprobe(struct kprobe *p)
                 * its code to prohibit unexpected unloading.
                 */
                if (unlikely(!try_module_get(probed_mod)))
-                       goto fail_with_jump_label;
+                       goto cannot_probe;
 
                /*
                 * If the module freed .init.text, we couldn't insert
@@ -1361,7 +1363,7 @@ int __kprobes register_kprobe(struct kprobe *p)
                if (within_module_init((unsigned long)p->addr, probed_mod) &&
                    probed_mod->state != MODULE_STATE_COMING) {
                        module_put(probed_mod);
-                       goto fail_with_jump_label;
+                       goto cannot_probe;
                }
                /* ret will be updated by following code */
        }
@@ -1409,7 +1411,7 @@ out:
 
        return ret;
 
-fail_with_jump_label:
+cannot_probe:
        preempt_enable();
        jump_label_unlock();
        return ret;
index 13c0a1143f49438f7cc97718e61ecf5bc5b23747..32690a0b7a1838e1bd9b8bcf8473654955807dae 100644 (file)
@@ -702,6 +702,9 @@ static bool printk_time = 0;
 #endif
 module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR);
 
+static bool always_kmsg_dump;
+module_param_named(always_kmsg_dump, always_kmsg_dump, bool, S_IRUGO | S_IWUSR);
+
 /* Check if we have any console registered that can be called early in boot. */
 static int have_callable_console(void)
 {
@@ -1732,6 +1735,9 @@ void kmsg_dump(enum kmsg_dump_reason reason)
        unsigned long l1, l2;
        unsigned long flags;
 
+       if ((reason > KMSG_DUMP_OOPS) && !always_kmsg_dump)
+               return;
+
        /* Theoretically, the log could move on after we do this, but
           there's not a lot we can do about that. The new messages
           will overwrite the start of what we dump. */
index 33a0676ea74409e7ae66888da26c9934a4139d7c..b342f57879e693f54c12a5b15d1e4e7c5bdde7e1 100644 (file)
@@ -6728,7 +6728,7 @@ int __init sched_create_sysfs_power_savings_entries(struct device *dev)
 static int cpuset_cpu_active(struct notifier_block *nfb, unsigned long action,
                             void *hcpu)
 {
-       switch (action) {
+       switch (action & ~CPU_TASKS_FROZEN) {
        case CPU_ONLINE:
        case CPU_DOWN_FAILED:
                cpuset_update_active_cpus();
@@ -6741,7 +6741,7 @@ static int cpuset_cpu_active(struct notifier_block *nfb, unsigned long action,
 static int cpuset_cpu_inactive(struct notifier_block *nfb, unsigned long action,
                               void *hcpu)
 {
-       switch (action) {
+       switch (action & ~CPU_TASKS_FROZEN) {
        case CPU_DOWN_PREPARE:
                cpuset_update_active_cpus();
                return NOTIFY_OK;
index 77cb245f8e7bdee634b98f6c275ae221c7c90715..0ab9ae8057f00e8545deba43ff31fab7873a619c 100644 (file)
@@ -818,17 +818,9 @@ static int __init fixup_activate(void *addr, enum debug_obj_state state)
                if (obj->static_init == 1) {
                        debug_object_init(obj, &descr_type_test);
                        debug_object_activate(obj, &descr_type_test);
-                       /*
-                        * Real code should return 0 here ! This is
-                        * not a fixup of some bad behaviour. We
-                        * merily call the debug_init function to keep
-                        * track of the object.
-                        */
-                       return 1;
-               } else {
-                       /* Real code needs to emit a warning here */
+                       return 0;
                }
-               return 0;
+               return 1;
 
        case ODEBUG_STATE_ACTIVE:
                debug_object_deactivate(obj, &descr_type_test);
@@ -967,7 +959,7 @@ static void __init debug_objects_selftest(void)
 
        obj.static_init = 1;
        debug_object_activate(&obj, &descr_type_test);
-       if (check_results(&obj, ODEBUG_STATE_ACTIVE, ++fixups, warnings))
+       if (check_results(&obj, ODEBUG_STATE_ACTIVE, fixups, warnings))
                goto out;
        debug_object_init(&obj, &descr_type_test);
        if (check_results(&obj, ODEBUG_STATE_INIT, ++fixups, ++warnings))
index 8e75003d62f632c52b8c0ea56ca62bdc72e560f0..38e612e66da5993f7b1eb92065ebfec45216d83c 100644 (file)
@@ -891,9 +891,15 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
        case 'U':
                return uuid_string(buf, end, ptr, spec, fmt);
        case 'V':
-               return buf + vsnprintf(buf, end > buf ? end - buf : 0,
-                                      ((struct va_format *)ptr)->fmt,
-                                      *(((struct va_format *)ptr)->va));
+               {
+                       va_list va;
+
+                       va_copy(va, *((struct va_format *)ptr)->va);
+                       buf += vsnprintf(buf, end > buf ? end - buf : 0,
+                                        ((struct va_format *)ptr)->fmt, va);
+                       va_end(va);
+                       return buf;
+               }
        case 'K':
                /*
                 * %pK cannot be used in IRQ context because its test
index 91d3efb25d15472332e1f2d9c382a5732629ce69..8f7fc394f63672954cc4444da0f2158a42470b2c 100644 (file)
@@ -671,6 +671,7 @@ static int __do_huge_pmd_anonymous_page(struct mm_struct *mm,
                set_pmd_at(mm, haddr, pmd, entry);
                prepare_pmd_huge_pte(pgtable, mm);
                add_mm_counter(mm, MM_ANONPAGES, HPAGE_PMD_NR);
+               mm->nr_ptes++;
                spin_unlock(&mm->page_table_lock);
        }
 
@@ -789,6 +790,7 @@ int copy_huge_pmd(struct mm_struct *dst_mm, struct mm_struct *src_mm,
        pmd = pmd_mkold(pmd_wrprotect(pmd));
        set_pmd_at(dst_mm, addr, dst_pmd, pmd);
        prepare_pmd_huge_pte(pgtable, dst_mm);
+       dst_mm->nr_ptes++;
 
        ret = 0;
 out_unlock:
@@ -887,7 +889,6 @@ static int do_huge_pmd_wp_page_fallback(struct mm_struct *mm,
        }
        kfree(pages);
 
-       mm->nr_ptes++;
        smp_wmb(); /* make pte visible before pmd */
        pmd_populate(mm, pmd, pgtable);
        page_remove_rmap(page);
@@ -1047,6 +1048,7 @@ int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
                        VM_BUG_ON(page_mapcount(page) < 0);
                        add_mm_counter(tlb->mm, MM_ANONPAGES, -HPAGE_PMD_NR);
                        VM_BUG_ON(!PageHead(page));
+                       tlb->mm->nr_ptes--;
                        spin_unlock(&tlb->mm->page_table_lock);
                        tlb_remove_page(tlb, page);
                        pte_free(tlb->mm, pgtable);
@@ -1375,7 +1377,6 @@ static int __split_huge_page_map(struct page *page,
                        pte_unmap(pte);
                }
 
-               mm->nr_ptes++;
                smp_wmb(); /* make pte visible before pmd */
                /*
                 * Up to this point the pmd is present and huge and
@@ -1988,7 +1989,6 @@ static void collapse_huge_page(struct mm_struct *mm,
        set_pmd_at(mm, address, pmd, _pmd);
        update_mmu_cache(vma, address, _pmd);
        prepare_pmd_huge_pte(pgtable, mm);
-       mm->nr_ptes--;
        spin_unlock(&mm->page_table_lock);
 
 #ifndef CONFIG_NUMA
index 5f34bd8dda34bbc8224303ad080103f224fa5ad6..a876871f6be56d15b06d1da56a9f3dbbd61cda91 100644 (file)
@@ -2277,8 +2277,8 @@ void __unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start,
                        set_page_dirty(page);
                list_add(&page->lru, &page_list);
        }
-       spin_unlock(&mm->page_table_lock);
        flush_tlb_range(vma, start, end);
+       spin_unlock(&mm->page_table_lock);
        mmu_notifier_invalidate_range_end(mm, start, end);
        list_for_each_entry_safe(page, tmp, &page_list, lru) {
                page_remove_rmap(page);
index 1925ffbfb27f00ac3d3d262ce0ea1c8aaa3a117f..310544a379ae9c7b886b3b50815e5f3d5a991ba8 100644 (file)
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -28,7 +28,6 @@
 #include <linux/kthread.h>
 #include <linux/wait.h>
 #include <linux/slab.h>
-#include <linux/memcontrol.h>
 #include <linux/rbtree.h>
 #include <linux/memory.h>
 #include <linux/mmu_notifier.h>
@@ -1572,16 +1571,6 @@ struct page *ksm_does_need_to_copy(struct page *page,
 
        new_page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, address);
        if (new_page) {
-               /*
-                * The memcg-specific accounting when moving
-                * pages around the LRU lists relies on the
-                * page's owner (memcg) to be valid.  Usually,
-                * pages are assigned to a new owner before
-                * being put on the LRU list, but since this
-                * is not the case here, the stale owner from
-                * a previous allocation cycle must be reset.
-                */
-               mem_cgroup_reset_owner(new_page);
                copy_user_highpage(new_page, page, address, vma);
 
                SetPageDirty(new_page);
index 228d6461c12ade8941b37416ca867d3df3277acd..d0e57a3cda1899c156274d53e49e11be42957f87 100644 (file)
@@ -1042,6 +1042,19 @@ struct lruvec *mem_cgroup_lru_add_list(struct zone *zone, struct page *page,
 
        pc = lookup_page_cgroup(page);
        memcg = pc->mem_cgroup;
+
+       /*
+        * Surreptitiously switch any uncharged page to root:
+        * an uncharged page off lru does nothing to secure
+        * its former mem_cgroup from sudden removal.
+        *
+        * Our caller holds lru_lock, and PageCgroupUsed is updated
+        * under page_cgroup lock: between them, they make all uses
+        * of pc->mem_cgroup safe.
+        */
+       if (!PageCgroupUsed(pc) && memcg != root_mem_cgroup)
+               pc->mem_cgroup = memcg = root_mem_cgroup;
+
        mz = page_cgroup_zoneinfo(memcg, page);
        /* compound_order() is stabilized through lru_lock */
        MEM_CGROUP_ZSTAT(mz, lru) += 1 << compound_order(page);
@@ -2408,8 +2421,12 @@ static void __mem_cgroup_commit_charge(struct mem_cgroup *memcg,
                                       struct page *page,
                                       unsigned int nr_pages,
                                       struct page_cgroup *pc,
-                                      enum charge_type ctype)
+                                      enum charge_type ctype,
+                                      bool lrucare)
 {
+       struct zone *uninitialized_var(zone);
+       bool was_on_lru = false;
+
        lock_page_cgroup(pc);
        if (unlikely(PageCgroupUsed(pc))) {
                unlock_page_cgroup(pc);
@@ -2420,6 +2437,21 @@ static void __mem_cgroup_commit_charge(struct mem_cgroup *memcg,
         * we don't need page_cgroup_lock about tail pages, becase they are not
         * accessed by any other context at this point.
         */
+
+       /*
+        * In some cases, SwapCache and FUSE(splice_buf->radixtree), the page
+        * may already be on some other mem_cgroup's LRU.  Take care of it.
+        */
+       if (lrucare) {
+               zone = page_zone(page);
+               spin_lock_irq(&zone->lru_lock);
+               if (PageLRU(page)) {
+                       ClearPageLRU(page);
+                       del_page_from_lru_list(zone, page, page_lru(page));
+                       was_on_lru = true;
+               }
+       }
+
        pc->mem_cgroup = memcg;
        /*
         * We access a page_cgroup asynchronously without lock_page_cgroup().
@@ -2443,9 +2475,18 @@ static void __mem_cgroup_commit_charge(struct mem_cgroup *memcg,
                break;
        }
 
+       if (lrucare) {
+               if (was_on_lru) {
+                       VM_BUG_ON(PageLRU(page));
+                       SetPageLRU(page);
+                       add_page_to_lru_list(zone, page, page_lru(page));
+               }
+               spin_unlock_irq(&zone->lru_lock);
+       }
+
        mem_cgroup_charge_statistics(memcg, PageCgroupCache(pc), nr_pages);
        unlock_page_cgroup(pc);
-       WARN_ON_ONCE(PageLRU(page));
+
        /*
         * "charge_statistics" updated event counter. Then, check it.
         * Insert ancestor (and ancestor's ancestors), to softlimit RB-tree.
@@ -2643,7 +2684,7 @@ static int mem_cgroup_charge_common(struct page *page, struct mm_struct *mm,
        ret = __mem_cgroup_try_charge(mm, gfp_mask, nr_pages, &memcg, oom);
        if (ret == -ENOMEM)
                return ret;
-       __mem_cgroup_commit_charge(memcg, page, nr_pages, pc, ctype);
+       __mem_cgroup_commit_charge(memcg, page, nr_pages, pc, ctype, false);
        return 0;
 }
 
@@ -2663,35 +2704,6 @@ static void
 __mem_cgroup_commit_charge_swapin(struct page *page, struct mem_cgroup *ptr,
                                        enum charge_type ctype);
 
-static void
-__mem_cgroup_commit_charge_lrucare(struct page *page, struct mem_cgroup *memcg,
-                                       enum charge_type ctype)
-{
-       struct page_cgroup *pc = lookup_page_cgroup(page);
-       struct zone *zone = page_zone(page);
-       unsigned long flags;
-       bool removed = false;
-
-       /*
-        * In some case, SwapCache, FUSE(splice_buf->radixtree), the page
-        * is already on LRU. It means the page may on some other page_cgroup's
-        * LRU. Take care of it.
-        */
-       spin_lock_irqsave(&zone->lru_lock, flags);
-       if (PageLRU(page)) {
-               del_page_from_lru_list(zone, page, page_lru(page));
-               ClearPageLRU(page);
-               removed = true;
-       }
-       __mem_cgroup_commit_charge(memcg, page, 1, pc, ctype);
-       if (removed) {
-               add_page_to_lru_list(zone, page, page_lru(page));
-               SetPageLRU(page);
-       }
-       spin_unlock_irqrestore(&zone->lru_lock, flags);
-       return;
-}
-
 int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm,
                                gfp_t gfp_mask)
 {
@@ -2769,13 +2781,16 @@ static void
 __mem_cgroup_commit_charge_swapin(struct page *page, struct mem_cgroup *memcg,
                                        enum charge_type ctype)
 {
+       struct page_cgroup *pc;
+
        if (mem_cgroup_disabled())
                return;
        if (!memcg)
                return;
        cgroup_exclude_rmdir(&memcg->css);
 
-       __mem_cgroup_commit_charge_lrucare(page, memcg, ctype);
+       pc = lookup_page_cgroup(page);
+       __mem_cgroup_commit_charge(memcg, page, 1, pc, ctype, true);
        /*
         * Now swap is on-memory. This means this page may be
         * counted both as mem and swap....double count.
@@ -3027,23 +3042,6 @@ void mem_cgroup_uncharge_end(void)
        batch->memcg = NULL;
 }
 
-/*
- * A function for resetting pc->mem_cgroup for newly allocated pages.
- * This function should be called if the newpage will be added to LRU
- * before start accounting.
- */
-void mem_cgroup_reset_owner(struct page *newpage)
-{
-       struct page_cgroup *pc;
-
-       if (mem_cgroup_disabled())
-               return;
-
-       pc = lookup_page_cgroup(newpage);
-       VM_BUG_ON(PageCgroupUsed(pc));
-       pc->mem_cgroup = root_mem_cgroup;
-}
-
 #ifdef CONFIG_SWAP
 /*
  * called after __delete_from_swap_cache() and drop "page" account.
@@ -3248,7 +3246,7 @@ int mem_cgroup_prepare_migration(struct page *page,
                ctype = MEM_CGROUP_CHARGE_TYPE_CACHE;
        else
                ctype = MEM_CGROUP_CHARGE_TYPE_SHMEM;
-       __mem_cgroup_commit_charge(memcg, newpage, 1, pc, ctype);
+       __mem_cgroup_commit_charge(memcg, newpage, 1, pc, ctype, false);
        return ret;
 }
 
@@ -3332,7 +3330,7 @@ void mem_cgroup_replace_page_cache(struct page *oldpage,
         * the newpage may be on LRU(or pagevec for LRU) already. We lock
         * LRU while we overwrite pc->mem_cgroup.
         */
-       __mem_cgroup_commit_charge_lrucare(newpage, memcg, type);
+       __mem_cgroup_commit_charge(memcg, newpage, 1, pc, type, true);
 }
 
 #ifdef CONFIG_DEBUG_VM
index 06b145fb64ab59a399344bc73ca277be0e39ed7b..47296fee23dbaa67c3408227d7653037a371bcdf 100644 (file)
@@ -640,10 +640,11 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
        unsigned long vmstart;
        unsigned long vmend;
 
-       vma = find_vma_prev(mm, start, &prev);
+       vma = find_vma(mm, start);
        if (!vma || vma->vm_start > start)
                return -EFAULT;
 
+       prev = vma->vm_prev;
        if (start > vma->vm_start)
                prev = vma;
 
index df141f60289eef61c7d278080e8290c3dfc717b9..1503b6b54ecbd1817e6e92968d40c404a6e90f75 100644 (file)
@@ -839,8 +839,6 @@ static int unmap_and_move(new_page_t get_new_page, unsigned long private,
        if (!newpage)
                return -ENOMEM;
 
-       mem_cgroup_reset_owner(newpage);
-
        if (page_count(page) == 1) {
                /* page was freed from under us. So we are done. */
                goto out;
index 4f4f53bdc65de30d11c637b2bc745aa1333a16bd..ef726e8aa8e9ca56c0713abfa4b621f44a210d4c 100644 (file)
@@ -385,10 +385,11 @@ static int do_mlock(unsigned long start, size_t len, int on)
                return -EINVAL;
        if (end == start)
                return 0;
-       vma = find_vma_prev(current->mm, start, &prev);
+       vma = find_vma(current->mm, start);
        if (!vma || vma->vm_start > start)
                return -ENOMEM;
 
+       prev = vma->vm_prev;
        if (start > vma->vm_start)
                prev = vma;
 
index 3f758c7f4c815c2b0edf494526b2823b41fbc142..da15a79b1441b665b0e4b962eea38a92407018fd 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1266,8 +1266,9 @@ munmap_back:
        vma->vm_pgoff = pgoff;
        INIT_LIST_HEAD(&vma->anon_vma_chain);
 
+       error = -EINVAL;        /* when rejecting VM_GROWSDOWN|VM_GROWSUP */
+
        if (file) {
-               error = -EINVAL;
                if (vm_flags & (VM_GROWSDOWN|VM_GROWSUP))
                        goto free_vma;
                if (vm_flags & VM_DENYWRITE) {
@@ -1293,6 +1294,8 @@ munmap_back:
                pgoff = vma->vm_pgoff;
                vm_flags = vma->vm_flags;
        } else if (vm_flags & VM_SHARED) {
+               if (unlikely(vm_flags & (VM_GROWSDOWN|VM_GROWSUP)))
+                       goto free_vma;
                error = shmem_zero_setup(vma);
                if (error)
                        goto free_vma;
@@ -1605,7 +1608,6 @@ EXPORT_SYMBOL(find_vma);
 
 /*
  * Same as find_vma, but also return a pointer to the previous VMA in *pprev.
- * Note: pprev is set to NULL when return value is NULL.
  */
 struct vm_area_struct *
 find_vma_prev(struct mm_struct *mm, unsigned long addr,
@@ -1614,7 +1616,16 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr,
        struct vm_area_struct *vma;
 
        vma = find_vma(mm, addr);
-       *pprev = vma ? vma->vm_prev : NULL;
+       if (vma) {
+               *pprev = vma->vm_prev;
+       } else {
+               struct rb_node *rb_node = mm->mm_rb.rb_node;
+               *pprev = NULL;
+               while (rb_node) {
+                       *pprev = rb_entry(rb_node, struct vm_area_struct, vm_rb);
+                       rb_node = rb_node->rb_right;
+               }
+       }
        return vma;
 }
 
index 5a688a2756bec54435adbd5f3c13a33fbdd2c11e..f437d054c3bf6884fd5ba6f18338fbf7272c43a4 100644 (file)
@@ -262,10 +262,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
 
        down_write(&current->mm->mmap_sem);
 
-       vma = find_vma_prev(current->mm, start, &prev);
+       vma = find_vma(current->mm, start);
        error = -ENOMEM;
        if (!vma)
                goto out;
+       prev = vma->vm_prev;
        if (unlikely(grows & PROT_GROWSDOWN)) {
                if (vma->vm_start >= end)
                        goto out;
index de1616aa9b1e2b3fac054ce4077073cbb05a3c62..1ccbd714059cdd7ddb9d90cb3ca92438f2cb5d34 100644 (file)
@@ -379,13 +379,15 @@ static struct swap_cgroup *lookup_swap_cgroup(swp_entry_t ent,
        pgoff_t offset = swp_offset(ent);
        struct swap_cgroup_ctrl *ctrl;
        struct page *mappage;
+       struct swap_cgroup *sc;
 
        ctrl = &swap_cgroup_ctrl[swp_type(ent)];
        if (ctrlp)
                *ctrlp = ctrl;
 
        mappage = ctrl->map[offset / SC_PER_PAGE];
-       return page_address(mappage) + offset % SC_PER_PAGE;
+       sc = page_address(mappage);
+       return sc + offset % SC_PER_PAGE;
 }
 
 /**
index 12a48a88c0d8cb00dd55b2adcea3e536493dee1a..405d331804c3da95c52347878387a807eb5e6c60 100644 (file)
@@ -184,8 +184,7 @@ static void pcpu_unmap_pages(struct pcpu_chunk *chunk,
                                   page_end - page_start);
        }
 
-       for (i = page_start; i < page_end; i++)
-               __clear_bit(i, populated);
+       bitmap_clear(populated, page_start, page_end - page_start);
 }
 
 /**
index fff1ff7fb9ada36fca1be10d33dec593486f50a6..14380e9fbe3380b927cb58d75c5a950a5ec14f77 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -652,7 +652,7 @@ EXPORT_SYMBOL(__pagevec_release);
 void lru_add_page_tail(struct zone* zone,
                       struct page *page, struct page *page_tail)
 {
-       int active;
+       int uninitialized_var(active);
        enum lru_list lru;
        const int file = 0;
 
@@ -672,7 +672,6 @@ void lru_add_page_tail(struct zone* zone,
                        active = 0;
                        lru = LRU_INACTIVE_ANON;
                }
-               update_page_reclaim_stat(zone, page_tail, file, active);
        } else {
                SetPageUnevictable(page_tail);
                lru = LRU_UNEVICTABLE;
@@ -693,6 +692,9 @@ void lru_add_page_tail(struct zone* zone,
                list_head = page_tail->lru.prev;
                list_move_tail(&page_tail->lru, list_head);
        }
+
+       if (!PageUnevictable(page))
+               update_page_reclaim_stat(zone, page_tail, file, active);
 }
 #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
 
@@ -710,8 +712,8 @@ static void __pagevec_lru_add_fn(struct page *page, void *arg)
        SetPageLRU(page);
        if (active)
                SetPageActive(page);
-       update_page_reclaim_stat(zone, page, file, active);
        add_page_to_lru_list(zone, page, lru);
+       update_page_reclaim_stat(zone, page, file, active);
 }
 
 /*
index 470038a9187383790751817cda61a07cb50f9512..ea6b32d61873185f59db1eb9ae303488ec6de471 100644 (file)
@@ -300,16 +300,6 @@ struct page *read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask,
                        new_page = alloc_page_vma(gfp_mask, vma, addr);
                        if (!new_page)
                                break;          /* Out of memory */
-                       /*
-                        * The memcg-specific accounting when moving
-                        * pages around the LRU lists relies on the
-                        * page's owner (memcg) to be valid.  Usually,
-                        * pages are assigned to a new owner before
-                        * being put on the LRU list, but since this
-                        * is not the case here, the stale owner from
-                        * a previous allocation cycle must be reset.
-                        */
-                       mem_cgroup_reset_owner(new_page);
                }
 
                /*
index 568d5bf175341b4f84ef284173b5d6da623ceafb..702a1ae9220b79bd9e60cc25732201fe8750dcd2 100644 (file)
@@ -446,8 +446,11 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br,
        ip6h->nexthdr = IPPROTO_HOPOPTS;
        ip6h->hop_limit = 1;
        ipv6_addr_set(&ip6h->daddr, htonl(0xff020000), 0, 0, htonl(1));
-       ipv6_dev_get_saddr(dev_net(br->dev), br->dev, &ip6h->daddr, 0,
-                          &ip6h->saddr);
+       if (ipv6_dev_get_saddr(dev_net(br->dev), br->dev, &ip6h->daddr, 0,
+                              &ip6h->saddr)) {
+               kfree_skb(skb);
+               return NULL;
+       }
        ipv6_eth_mc_map(&ip6h->daddr, eth->h_dest);
 
        hopopt = (u8 *)(ip6h + 1);
index 84122472656c3a70f0c0a93020768e81ecb3972a..dec4f3817133c879b524a65f0919b5dabcff46ea 100644 (file)
@@ -62,6 +62,15 @@ static int brnf_filter_pppoe_tagged __read_mostly = 0;
 #define brnf_filter_pppoe_tagged 0
 #endif
 
+#define IS_IP(skb) \
+       (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_IP))
+
+#define IS_IPV6(skb) \
+       (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_IPV6))
+
+#define IS_ARP(skb) \
+       (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_ARP))
+
 static inline __be16 vlan_proto(const struct sk_buff *skb)
 {
        if (vlan_tx_tag_present(skb))
@@ -639,8 +648,7 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff *skb,
                return NF_DROP;
        br = p->br;
 
-       if (skb->protocol == htons(ETH_P_IPV6) || IS_VLAN_IPV6(skb) ||
-           IS_PPPOE_IPV6(skb)) {
+       if (IS_IPV6(skb) || IS_VLAN_IPV6(skb) || IS_PPPOE_IPV6(skb)) {
                if (!brnf_call_ip6tables && !br->nf_call_ip6tables)
                        return NF_ACCEPT;
 
@@ -651,8 +659,7 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff *skb,
        if (!brnf_call_iptables && !br->nf_call_iptables)
                return NF_ACCEPT;
 
-       if (skb->protocol != htons(ETH_P_IP) && !IS_VLAN_IP(skb) &&
-           !IS_PPPOE_IP(skb))
+       if (!IS_IP(skb) && !IS_VLAN_IP(skb) && !IS_PPPOE_IP(skb))
                return NF_ACCEPT;
 
        nf_bridge_pull_encap_header_rcsum(skb);
@@ -701,7 +708,7 @@ static int br_nf_forward_finish(struct sk_buff *skb)
        struct nf_bridge_info *nf_bridge = skb->nf_bridge;
        struct net_device *in;
 
-       if (skb->protocol != htons(ETH_P_ARP) && !IS_VLAN_ARP(skb)) {
+       if (!IS_ARP(skb) && !IS_VLAN_ARP(skb)) {
                in = nf_bridge->physindev;
                if (nf_bridge->mask & BRNF_PKT_TYPE) {
                        skb->pkt_type = PACKET_OTHERHOST;
@@ -718,6 +725,7 @@ static int br_nf_forward_finish(struct sk_buff *skb)
        return 0;
 }
 
+
 /* This is the 'purely bridged' case.  For IP, we pass the packet to
  * netfilter with indev and outdev set to the bridge device,
  * but we are still able to filter on the 'real' indev/outdev
@@ -744,11 +752,9 @@ static unsigned int br_nf_forward_ip(unsigned int hook, struct sk_buff *skb,
        if (!parent)
                return NF_DROP;
 
-       if (skb->protocol == htons(ETH_P_IP) || IS_VLAN_IP(skb) ||
-           IS_PPPOE_IP(skb))
+       if (IS_IP(skb) || IS_VLAN_IP(skb) || IS_PPPOE_IP(skb))
                pf = PF_INET;
-       else if (skb->protocol == htons(ETH_P_IPV6) || IS_VLAN_IPV6(skb) ||
-                IS_PPPOE_IPV6(skb))
+       else if (IS_IPV6(skb) || IS_VLAN_IPV6(skb) || IS_PPPOE_IPV6(skb))
                pf = PF_INET6;
        else
                return NF_ACCEPT;
@@ -795,7 +801,7 @@ static unsigned int br_nf_forward_arp(unsigned int hook, struct sk_buff *skb,
        if (!brnf_call_arptables && !br->nf_call_arptables)
                return NF_ACCEPT;
 
-       if (skb->protocol != htons(ETH_P_ARP)) {
+       if (!IS_ARP(skb)) {
                if (!IS_VLAN_ARP(skb))
                        return NF_ACCEPT;
                nf_bridge_pull_encap_header(skb);
@@ -853,11 +859,9 @@ static unsigned int br_nf_post_routing(unsigned int hook, struct sk_buff *skb,
        if (!realoutdev)
                return NF_DROP;
 
-       if (skb->protocol == htons(ETH_P_IP) || IS_VLAN_IP(skb) ||
-           IS_PPPOE_IP(skb))
+       if (IS_IP(skb) || IS_VLAN_IP(skb) || IS_PPPOE_IP(skb))
                pf = PF_INET;
-       else if (skb->protocol == htons(ETH_P_IPV6) || IS_VLAN_IPV6(skb) ||
-                IS_PPPOE_IPV6(skb))
+       else if (IS_IPV6(skb) || IS_VLAN_IPV6(skb) || IS_PPPOE_IPV6(skb))
                pf = PF_INET6;
        else
                return NF_ACCEPT;
index dd147d78a5889ab6c2139712199c3672f9e087c6..8c836d96ba769eaaf4b62ce76b26c7e5e4f814b0 100644 (file)
@@ -17,9 +17,9 @@
 #include "br_private_stp.h"
 
 /* since time values in bpdu are in jiffies and then scaled (1/256)
- * before sending, make sure that is at least one.
+ * before sending, make sure that is at least one STP tick.
  */
-#define MESSAGE_AGE_INCR       ((HZ < 256) ? 1 : (HZ/256))
+#define MESSAGE_AGE_INCR       ((HZ / 256) + 1)
 
 static const char *const br_port_state_names[] = {
        [BR_STATE_DISABLED] = "disabled",
@@ -31,7 +31,7 @@ static const char *const br_port_state_names[] = {
 
 void br_log_state(const struct net_bridge_port *p)
 {
-       br_info(p->br, "port %u(%s) entering %s state\n",
+       br_info(p->br, "port %u(%s) entered %s state\n",
                (unsigned) p->port_no, p->dev->name,
                br_port_state_names[p->state]);
 }
@@ -186,7 +186,7 @@ static void br_record_config_information(struct net_bridge_port *p,
        p->designated_cost = bpdu->root_path_cost;
        p->designated_bridge = bpdu->bridge_id;
        p->designated_port = bpdu->port_id;
-       p->designated_age = jiffies + bpdu->message_age;
+       p->designated_age = jiffies - bpdu->message_age;
 
        mod_timer(&p->message_age_timer, jiffies
                  + (p->br->max_age - bpdu->message_age));
index 19308e305d851a89044434315a86d2e9ca9dc549..f494496373d60c1faf368a05605073a1c71ad04f 100644 (file)
@@ -98,14 +98,13 @@ void br_stp_disable_port(struct net_bridge_port *p)
        struct net_bridge *br = p->br;
        int wasroot;
 
-       br_log_state(p);
-
        wasroot = br_is_root_bridge(br);
        br_become_designated_port(p);
        p->state = BR_STATE_DISABLED;
        p->topology_change_ack = 0;
        p->config_pending = 0;
 
+       br_log_state(p);
        br_ifinfo_notify(RTM_NEWLINK, p);
 
        del_timer(&p->message_age_timer);
index 5864cc49136993d9de12f4c0f9110ab2dbcf1025..5fe2ff3b01efe44d07292514b814b0ba7b01d4f0 100644 (file)
@@ -1335,7 +1335,12 @@ static inline int ebt_make_matchname(const struct ebt_entry_match *m,
     const char *base, char __user *ubase)
 {
        char __user *hlp = ubase + ((char *)m - base);
-       if (copy_to_user(hlp, m->u.match->name, EBT_FUNCTION_MAXNAMELEN))
+       char name[EBT_FUNCTION_MAXNAMELEN] = {};
+
+       /* ebtables expects 32 bytes long names but xt_match names are 29 bytes
+          long. Copy 29 bytes and fill remaining bytes with zeroes. */
+       strncpy(name, m->u.match->name, sizeof(name));
+       if (copy_to_user(hlp, name, EBT_FUNCTION_MAXNAMELEN))
                return -EFAULT;
        return 0;
 }
@@ -1344,7 +1349,10 @@ static inline int ebt_make_watchername(const struct ebt_entry_watcher *w,
     const char *base, char __user *ubase)
 {
        char __user *hlp = ubase + ((char *)w - base);
-       if (copy_to_user(hlp , w->u.watcher->name, EBT_FUNCTION_MAXNAMELEN))
+       char name[EBT_FUNCTION_MAXNAMELEN] = {};
+
+       strncpy(name, w->u.watcher->name, sizeof(name));
+       if (copy_to_user(hlp , name, EBT_FUNCTION_MAXNAMELEN))
                return -EFAULT;
        return 0;
 }
@@ -1355,6 +1363,7 @@ ebt_make_names(struct ebt_entry *e, const char *base, char __user *ubase)
        int ret;
        char __user *hlp;
        const struct ebt_entry_target *t;
+       char name[EBT_FUNCTION_MAXNAMELEN] = {};
 
        if (e->bitmask == 0)
                return 0;
@@ -1368,7 +1377,8 @@ ebt_make_names(struct ebt_entry *e, const char *base, char __user *ubase)
        ret = EBT_WATCHER_ITERATE(e, ebt_make_watchername, base, ubase);
        if (ret != 0)
                return ret;
-       if (copy_to_user(hlp, t->u.target->name, EBT_FUNCTION_MAXNAMELEN))
+       strncpy(name, t->u.target->name, sizeof(name));
+       if (copy_to_user(hlp, name, EBT_FUNCTION_MAXNAMELEN))
                return -EFAULT;
        return 0;
 }
@@ -1893,10 +1903,7 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt,
 
        switch (compat_mwt) {
        case EBT_COMPAT_MATCH:
-               match = try_then_request_module(xt_find_match(NFPROTO_BRIDGE,
-                                               name, 0), "ebt_%s", name);
-               if (match == NULL)
-                       return -ENOENT;
+               match = xt_request_find_match(NFPROTO_BRIDGE, name, 0);
                if (IS_ERR(match))
                        return PTR_ERR(match);
 
@@ -1915,10 +1922,7 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt,
                break;
        case EBT_COMPAT_WATCHER: /* fallthrough */
        case EBT_COMPAT_TARGET:
-               wt = try_then_request_module(xt_find_target(NFPROTO_BRIDGE,
-                                               name, 0), "ebt_%s", name);
-               if (wt == NULL)
-                       return -ENOENT;
+               wt = xt_request_find_target(NFPROTO_BRIDGE, name, 0);
                if (IS_ERR(wt))
                        return PTR_ERR(wt);
                off = xt_compat_target_offset(wt);
index 606a6e8f3671defcc1eab21a471f0468f54f3359..f965dce6f20f83c404f7133ab6a00a84a938d2b4 100644 (file)
@@ -1060,11 +1060,12 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
        rcu_read_lock();
        cb->seq = net->dev_base_seq;
 
-       nlmsg_parse(cb->nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX,
-                   ifla_policy);
+       if (nlmsg_parse(cb->nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX,
+                       ifla_policy) >= 0) {
 
-       if (tb[IFLA_EXT_MASK])
-               ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]);
+               if (tb[IFLA_EXT_MASK])
+                       ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]);
+       }
 
        for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) {
                idx = 0;
@@ -1900,10 +1901,11 @@ static u16 rtnl_calcit(struct sk_buff *skb, struct nlmsghdr *nlh)
        u32 ext_filter_mask = 0;
        u16 min_ifinfo_dump_size = 0;
 
-       nlmsg_parse(nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX, ifla_policy);
-
-       if (tb[IFLA_EXT_MASK])
-               ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]);
+       if (nlmsg_parse(nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX,
+                       ifla_policy) >= 0) {
+               if (tb[IFLA_EXT_MASK])
+                       ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]);
+       }
 
        if (!ext_filter_mask)
                return NLMSG_GOODSIZE;
index bf4a9c4808e1faaa7461a472f224a4d3c8edf379..d4d61b694fab9bc497b1cccb808a3a568ad30cc2 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/net.h>
+#include <linux/workqueue.h>
 #include <net/ip.h>
 #include <net/inetpeer.h>
 #include <net/secure_seq.h>
 
 static struct kmem_cache *peer_cachep __read_mostly;
 
+static LIST_HEAD(gc_list);
+static const int gc_delay = 60 * HZ;
+static struct delayed_work gc_work;
+static DEFINE_SPINLOCK(gc_lock);
+
 #define node_height(x) x->avl_height
 
 #define peer_avl_empty ((struct inet_peer *)&peer_fake_node)
@@ -102,6 +108,50 @@ int inet_peer_threshold __read_mostly = 65536 + 128;       /* start to throw entries m
 int inet_peer_minttl __read_mostly = 120 * HZ; /* TTL under high load: 120 sec */
 int inet_peer_maxttl __read_mostly = 10 * 60 * HZ;     /* usual time to live: 10 min */
 
+static void inetpeer_gc_worker(struct work_struct *work)
+{
+       struct inet_peer *p, *n;
+       LIST_HEAD(list);
+
+       spin_lock_bh(&gc_lock);
+       list_replace_init(&gc_list, &list);
+       spin_unlock_bh(&gc_lock);
+
+       if (list_empty(&list))
+               return;
+
+       list_for_each_entry_safe(p, n, &list, gc_list) {
+
+               if(need_resched())
+                       cond_resched();
+
+               if (p->avl_left != peer_avl_empty) {
+                       list_add_tail(&p->avl_left->gc_list, &list);
+                       p->avl_left = peer_avl_empty;
+               }
+
+               if (p->avl_right != peer_avl_empty) {
+                       list_add_tail(&p->avl_right->gc_list, &list);
+                       p->avl_right = peer_avl_empty;
+               }
+
+               n = list_entry(p->gc_list.next, struct inet_peer, gc_list);
+
+               if (!atomic_read(&p->refcnt)) {
+                       list_del(&p->gc_list);
+                       kmem_cache_free(peer_cachep, p);
+               }
+       }
+
+       if (list_empty(&list))
+               return;
+
+       spin_lock_bh(&gc_lock);
+       list_splice(&list, &gc_list);
+       spin_unlock_bh(&gc_lock);
+
+       schedule_delayed_work(&gc_work, gc_delay);
+}
 
 /* Called from ip_output.c:ip_init  */
 void __init inet_initpeers(void)
@@ -126,6 +176,7 @@ void __init inet_initpeers(void)
                        0, SLAB_HWCACHE_ALIGN | SLAB_PANIC,
                        NULL);
 
+       INIT_DELAYED_WORK_DEFERRABLE(&gc_work, inetpeer_gc_worker);
 }
 
 static int addr_compare(const struct inetpeer_addr *a,
@@ -447,9 +498,8 @@ relookup:
                p->rate_last = 0;
                p->pmtu_expires = 0;
                p->pmtu_orig = 0;
-               p->redirect_genid = 0;
                memset(&p->redirect_learned, 0, sizeof(p->redirect_learned));
-
+               INIT_LIST_HEAD(&p->gc_list);
 
                /* Link the node. */
                link_to_pool(p, base);
@@ -509,3 +559,30 @@ bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout)
        return rc;
 }
 EXPORT_SYMBOL(inet_peer_xrlim_allow);
+
+void inetpeer_invalidate_tree(int family)
+{
+       struct inet_peer *old, *new, *prev;
+       struct inet_peer_base *base = family_to_base(family);
+
+       write_seqlock_bh(&base->lock);
+
+       old = base->root;
+       if (old == peer_avl_empty_rcu)
+               goto out;
+
+       new = peer_avl_empty_rcu;
+
+       prev = cmpxchg(&base->root, old, new);
+       if (prev == old) {
+               base->total = 0;
+               spin_lock(&gc_lock);
+               list_add_tail(&prev->gc_list, &gc_list);
+               spin_unlock(&gc_lock);
+               schedule_delayed_work(&gc_work, gc_delay);
+       }
+
+out:
+       write_sequnlock_bh(&base->lock);
+}
+EXPORT_SYMBOL(inetpeer_invalidate_tree);
index bcacf54e541879a01f8afe737e2cbbe13ce497c3..0197747961748aff73465a90bd689d70b3113880 100644 (file)
@@ -132,7 +132,6 @@ static int ip_rt_mtu_expires __read_mostly  = 10 * 60 * HZ;
 static int ip_rt_min_pmtu __read_mostly                = 512 + 20 + 20;
 static int ip_rt_min_advmss __read_mostly      = 256;
 static int rt_chain_length_max __read_mostly   = 20;
-static int redirect_genid;
 
 static struct delayed_work expires_work;
 static unsigned long expires_ljiffies;
@@ -937,7 +936,7 @@ static void rt_cache_invalidate(struct net *net)
 
        get_random_bytes(&shuffle, sizeof(shuffle));
        atomic_add(shuffle + 1U, &net->ipv4.rt_genid);
-       redirect_genid++;
+       inetpeer_invalidate_tree(AF_INET);
 }
 
 /*
@@ -1485,10 +1484,8 @@ void ip_rt_redirect(__be32 old_gw, __be32 daddr, __be32 new_gw,
 
                                peer = rt->peer;
                                if (peer) {
-                                       if (peer->redirect_learned.a4 != new_gw ||
-                                           peer->redirect_genid != redirect_genid) {
+                                       if (peer->redirect_learned.a4 != new_gw) {
                                                peer->redirect_learned.a4 = new_gw;
-                                               peer->redirect_genid = redirect_genid;
                                                atomic_inc(&__rt_peer_genid);
                                        }
                                        check_peer_redir(&rt->dst, peer);
@@ -1793,8 +1790,6 @@ static void ipv4_validate_peer(struct rtable *rt)
                if (peer) {
                        check_peer_pmtu(&rt->dst, peer);
 
-                       if (peer->redirect_genid != redirect_genid)
-                               peer->redirect_learned.a4 = 0;
                        if (peer->redirect_learned.a4 &&
                            peer->redirect_learned.a4 != rt->rt_gateway)
                                check_peer_redir(&rt->dst, peer);
@@ -1958,8 +1953,7 @@ static void rt_init_metrics(struct rtable *rt, const struct flowi4 *fl4,
                dst_init_metrics(&rt->dst, peer->metrics, false);
 
                check_peer_pmtu(&rt->dst, peer);
-               if (peer->redirect_genid != redirect_genid)
-                       peer->redirect_learned.a4 = 0;
+
                if (peer->redirect_learned.a4 &&
                    peer->redirect_learned.a4 != rt->rt_gateway) {
                        rt->rt_gateway = peer->redirect_learned.a4;
index 53c8ce4046b207cf6dc65735a8a030932095734d..b5e315f13641d683c2ab9031c0d52969c6c0873a 100644 (file)
@@ -1403,8 +1403,16 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
 
        BUG_ON(!pcount);
 
-       /* Adjust hint for FACK. Non-FACK is handled in tcp_sacktag_one(). */
-       if (tcp_is_fack(tp) && (skb == tp->lost_skb_hint))
+       /* Adjust counters and hints for the newly sacked sequence
+        * range but discard the return value since prev is already
+        * marked. We must tag the range first because the seq
+        * advancement below implicitly advances
+        * tcp_highest_sack_seq() when skb is highest_sack.
+        */
+       tcp_sacktag_one(sk, state, TCP_SKB_CB(skb)->sacked,
+                       start_seq, end_seq, dup_sack, pcount);
+
+       if (skb == tp->lost_skb_hint)
                tp->lost_cnt_hint += pcount;
 
        TCP_SKB_CB(prev)->end_seq += shifted;
@@ -1430,12 +1438,6 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
                skb_shinfo(skb)->gso_type = 0;
        }
 
-       /* Adjust counters and hints for the newly sacked sequence range but
-        * discard the return value since prev is already marked.
-        */
-       tcp_sacktag_one(sk, state, TCP_SKB_CB(skb)->sacked,
-                       start_seq, end_seq, dup_sack, pcount);
-
        /* Difference in this won't matter, both ACKed by the same cumul. ACK */
        TCP_SKB_CB(prev)->sacked |= (TCP_SKB_CB(skb)->sacked & TCPCB_EVER_RETRANS);
 
@@ -1583,6 +1585,10 @@ static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb,
                }
        }
 
+       /* tcp_sacktag_one() won't SACK-tag ranges below snd_una */
+       if (!after(TCP_SKB_CB(skb)->seq + len, tp->snd_una))
+               goto fallback;
+
        if (!skb_shift(prev, skb, len))
                goto fallback;
        if (!tcp_shifted_skb(sk, skb, state, pcount, len, mss, dup_sack))
@@ -2567,6 +2573,7 @@ static void tcp_mark_head_lost(struct sock *sk, int packets, int mark_head)
 
                if (cnt > packets) {
                        if ((tcp_is_sack(tp) && !tcp_is_fack(tp)) ||
+                           (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED) ||
                            (oldcnt >= packets))
                                break;
 
index c02280a4d126980540daac44a8b541b92c0b16f0..6b8ebc5da0e1344ad58994e327ba42cac44f3ac3 100644 (file)
@@ -434,6 +434,10 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
        /* Join all-node multicast group */
        ipv6_dev_mc_inc(dev, &in6addr_linklocal_allnodes);
 
+       /* Join all-router multicast group if forwarding is set */
+       if (ndev->cnf.forwarding && dev && (dev->flags & IFF_MULTICAST))
+               ipv6_dev_mc_inc(dev, &in6addr_linklocal_allrouters);
+
        return ndev;
 }
 
index 01a21c2f6ab37df336f5f69c55f33de4e0a698f3..8e2137bd87e2435d45294ffa192f34688ab61097 100644 (file)
@@ -1332,6 +1332,9 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
                hw_roc = true;
 
        list_for_each_entry(sdata, &local->interfaces, list) {
+               if (sdata->vif.type == NL80211_IFTYPE_MONITOR ||
+                   sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
+                       continue;
                if (sdata->old_idle == sdata->vif.bss_conf.idle)
                        continue;
                if (!ieee80211_sdata_running(sdata))
index ad64f4d5271a58121f93cf7f62806c93687d1193..f9b8e819ca63c0bfba25028c7d27b8cf42540157 100644 (file)
@@ -344,7 +344,7 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata,
        for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
                info->control.rates[i].idx = -1;
                info->control.rates[i].flags = 0;
-               info->control.rates[i].count = 1;
+               info->control.rates[i].count = 0;
        }
 
        if (sdata->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
index ed86a3be678ea28590d34018b5ec990cbf052e8d..fa4b82c8ae8078b7a2e94f367987d8bc79ef991c 100644 (file)
@@ -635,8 +635,12 @@ static noinline int early_drop(struct net *net, unsigned int hash)
 
        if (del_timer(&ct->timeout)) {
                death_by_timeout((unsigned long)ct);
-               dropped = 1;
-               NF_CT_STAT_INC_ATOMIC(net, early_drop);
+               /* Check if we indeed killed this entry. Reliable event
+                  delivery may have inserted it into the dying list. */
+               if (test_bit(IPS_DYING_BIT, &ct->status)) {
+                       dropped = 1;
+                       NF_CT_STAT_INC_ATOMIC(net, early_drop);
+               }
        }
        nf_ct_put(ct);
        return dropped;
index 30c9d4ca02180e050d3b98c8480b83dfc71047b9..10687692831eb5f5f097568f0d292fa530c796f1 100644 (file)
@@ -1041,16 +1041,13 @@ ctnetlink_parse_nat_setup(struct nf_conn *ct,
        if (!parse_nat_setup) {
 #ifdef CONFIG_MODULES
                rcu_read_unlock();
-               spin_unlock_bh(&nf_conntrack_lock);
                nfnl_unlock();
                if (request_module("nf-nat-ipv4") < 0) {
                        nfnl_lock();
-                       spin_lock_bh(&nf_conntrack_lock);
                        rcu_read_lock();
                        return -EOPNOTSUPP;
                }
                nfnl_lock();
-               spin_lock_bh(&nf_conntrack_lock);
                rcu_read_lock();
                if (nfnetlink_parse_nat_setup_hook)
                        return -EAGAIN;
index 2725d1bdf2916b1b0545dbb9d400d931d7abd974..48badffaafc1a2c0ce0b8d8ec7a0729c2d2cbb42 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007-2011 Nicira Networks.
+ * Copyright (c) 2007-2012 Nicira Networks.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 2 of the GNU General Public
@@ -145,9 +145,16 @@ static void set_ip_addr(struct sk_buff *skb, struct iphdr *nh,
                        inet_proto_csum_replace4(&tcp_hdr(skb)->check, skb,
                                                 *addr, new_addr, 1);
        } else if (nh->protocol == IPPROTO_UDP) {
-               if (likely(transport_len >= sizeof(struct udphdr)))
-                       inet_proto_csum_replace4(&udp_hdr(skb)->check, skb,
-                                                *addr, new_addr, 1);
+               if (likely(transport_len >= sizeof(struct udphdr))) {
+                       struct udphdr *uh = udp_hdr(skb);
+
+                       if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) {
+                               inet_proto_csum_replace4(&uh->check, skb,
+                                                        *addr, new_addr, 1);
+                               if (!uh->check)
+                                       uh->check = CSUM_MANGLED_0;
+                       }
+               }
        }
 
        csum_replace4(&nh->check, *addr, new_addr);
@@ -197,8 +204,22 @@ static void set_tp_port(struct sk_buff *skb, __be16 *port,
        skb->rxhash = 0;
 }
 
-static int set_udp_port(struct sk_buff *skb,
-                       const struct ovs_key_udp *udp_port_key)
+static void set_udp_port(struct sk_buff *skb, __be16 *port, __be16 new_port)
+{
+       struct udphdr *uh = udp_hdr(skb);
+
+       if (uh->check && skb->ip_summed != CHECKSUM_PARTIAL) {
+               set_tp_port(skb, port, new_port, &uh->check);
+
+               if (!uh->check)
+                       uh->check = CSUM_MANGLED_0;
+       } else {
+               *port = new_port;
+               skb->rxhash = 0;
+       }
+}
+
+static int set_udp(struct sk_buff *skb, const struct ovs_key_udp *udp_port_key)
 {
        struct udphdr *uh;
        int err;
@@ -210,16 +231,15 @@ static int set_udp_port(struct sk_buff *skb,
 
        uh = udp_hdr(skb);
        if (udp_port_key->udp_src != uh->source)
-               set_tp_port(skb, &uh->source, udp_port_key->udp_src, &uh->check);
+               set_udp_port(skb, &uh->source, udp_port_key->udp_src);
 
        if (udp_port_key->udp_dst != uh->dest)
-               set_tp_port(skb, &uh->dest, udp_port_key->udp_dst, &uh->check);
+               set_udp_port(skb, &uh->dest, udp_port_key->udp_dst);
 
        return 0;
 }
 
-static int set_tcp_port(struct sk_buff *skb,
-                       const struct ovs_key_tcp *tcp_port_key)
+static int set_tcp(struct sk_buff *skb, const struct ovs_key_tcp *tcp_port_key)
 {
        struct tcphdr *th;
        int err;
@@ -328,11 +348,11 @@ static int execute_set_action(struct sk_buff *skb,
                break;
 
        case OVS_KEY_ATTR_TCP:
-               err = set_tcp_port(skb, nla_data(nested_attr));
+               err = set_tcp(skb, nla_data(nested_attr));
                break;
 
        case OVS_KEY_ATTR_UDP:
-               err = set_udp_port(skb, nla_data(nested_attr));
+               err = set_udp(skb, nla_data(nested_attr));
                break;
        }
 
index ce64c18b8c79a99ef4251e7c9d2a752105207725..2c030505b335fd3ef9ab971fb9abd664548d8c38 100644 (file)
@@ -1521,6 +1521,9 @@ static struct vport *lookup_vport(struct ovs_header *ovs_header,
                vport = ovs_vport_locate(nla_data(a[OVS_VPORT_ATTR_NAME]));
                if (!vport)
                        return ERR_PTR(-ENODEV);
+               if (ovs_header->dp_ifindex &&
+                   ovs_header->dp_ifindex != get_dpifindex(vport->dp))
+                       return ERR_PTR(-ENODEV);
                return vport;
        } else if (a[OVS_VPORT_ATTR_PORT_NO]) {
                u32 port_no = nla_get_u32(a[OVS_VPORT_ATTR_PORT_NO]);
index f286bb8fda1375317589949af5da9a9605bea134..22c73b78ac6f193b635ef362c026bf51b8fe1da8 100644 (file)
@@ -2068,12 +2068,16 @@ static int alc_build_controls(struct hda_codec *codec)
  */
 
 static void alc_init_special_input_src(struct hda_codec *codec);
+static int alc269_fill_coef(struct hda_codec *codec);
 
 static int alc_init(struct hda_codec *codec)
 {
        struct alc_spec *spec = codec->spec;
        unsigned int i;
 
+       if (codec->vendor_id == 0x10ec0269)
+               alc269_fill_coef(codec);
+
        alc_fix_pll(codec);
        alc_auto_init_amp(codec, spec->init_amp);
 
@@ -4367,6 +4371,7 @@ enum {
        ALC882_FIXUP_PB_M5210,
        ALC882_FIXUP_ACER_ASPIRE_7736,
        ALC882_FIXUP_ASUS_W90V,
+       ALC889_FIXUP_CD,
        ALC889_FIXUP_VAIO_TT,
        ALC888_FIXUP_EEE1601,
        ALC882_FIXUP_EAPD,
@@ -4494,6 +4499,13 @@ static const struct alc_fixup alc882_fixups[] = {
                        { }
                }
        },
+       [ALC889_FIXUP_CD] = {
+               .type = ALC_FIXUP_PINS,
+               .v.pins = (const struct alc_pincfg[]) {
+                       { 0x1c, 0x993301f0 }, /* CD */
+                       { }
+               }
+       },
        [ALC889_FIXUP_VAIO_TT] = {
                .type = ALC_FIXUP_PINS,
                .v.pins = (const struct alc_pincfg[]) {
@@ -4650,6 +4662,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
 
        SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD),
        SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
+       SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3", ALC889_FIXUP_CD),
        SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
        SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
        SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
@@ -5467,8 +5480,12 @@ static const struct alc_model_fixup alc269_fixup_models[] = {
 
 static int alc269_fill_coef(struct hda_codec *codec)
 {
+       struct alc_spec *spec = codec->spec;
        int val;
 
+       if (spec->codec_variant != ALC269_TYPE_ALC269VB)
+               return 0;
+
        if ((alc_get_coef0(codec) & 0x00ff) < 0x015) {
                alc_write_coef_idx(codec, 0xf, 0x960b);
                alc_write_coef_idx(codec, 0xe, 0x8817);
index cc9f6c83d661c93ba35926d475f11f3b85a3d354..bc030a2088da7928d0b9ebc5830fbeb743c59a37 100644 (file)
@@ -6333,6 +6333,7 @@ static int __devinit snd_hdspm_create_hwdep(struct snd_card *card,
 
        hw->ops.open = snd_hdspm_hwdep_dummy_op;
        hw->ops.ioctl = snd_hdspm_hwdep_ioctl;
+       hw->ops.ioctl_compat = snd_hdspm_hwdep_ioctl;
        hw->ops.release = snd_hdspm_hwdep_dummy_op;
 
        return 0;
index a67f4370bc9f8fc0096e92abb8ba6cbc3771c220..f610260065ba264a4ab3e55da5c4b081a049135f 100644 (file)
@@ -426,29 +426,6 @@ static struct snd_soc_ops ams_delta_ops = {
 };
 
 
-/* Board specific codec bias level control */
-static int ams_delta_set_bias_level(struct snd_soc_card *card,
-                                   struct snd_soc_dapm_context *dapm,
-                                   enum snd_soc_bias_level level)
-{
-       switch (level) {
-       case SND_SOC_BIAS_ON:
-       case SND_SOC_BIAS_PREPARE:
-       case SND_SOC_BIAS_STANDBY:
-               if (card->dapm.bias_level == SND_SOC_BIAS_OFF)
-                       ams_delta_latch2_write(AMS_DELTA_LATCH2_MODEM_NRESET,
-                                               AMS_DELTA_LATCH2_MODEM_NRESET);
-               break;
-       case SND_SOC_BIAS_OFF:
-               if (card->dapm.bias_level != SND_SOC_BIAS_OFF)
-                       ams_delta_latch2_write(AMS_DELTA_LATCH2_MODEM_NRESET,
-                                               0);
-       }
-       card->dapm.bias_level = level;
-
-       return 0;
-}
-
 /* Digital mute implemented using modem/CPU multiplexer.
  * Shares hardware with codec config pulse generation */
 static bool ams_delta_muted = 1;
@@ -512,9 +489,6 @@ static int ams_delta_cx20442_init(struct snd_soc_pcm_runtime *rtd)
                ams_delta_ops.shutdown = ams_delta_shutdown;
        }
 
-       /* Set codec bias level */
-       ams_delta_set_bias_level(card, dapm, SND_SOC_BIAS_STANDBY);
-
        /* Add hook switch - can be used to control the codec from userspace
         * even if line discipline fails */
        ret = snd_soc_jack_new(rtd->codec, "hook_switch",
@@ -598,7 +572,6 @@ static struct snd_soc_card ams_delta_audio_card = {
        .owner = THIS_MODULE,
        .dai_link = &ams_delta_dai_link,
        .num_links = 1,
-       .set_bias_level = ams_delta_set_bias_level,
 };
 
 /* Module init/exit */
@@ -635,7 +608,7 @@ err:
        platform_device_put(ams_delta_audio_platform_device);
        return ret;
 }
-module_init(ams_delta_module_init);
+late_initcall(ams_delta_module_init);
 
 static void __exit ams_delta_module_exit(void)
 {
@@ -647,11 +620,6 @@ static void __exit ams_delta_module_exit(void)
                        ARRAY_SIZE(ams_delta_hook_switch_gpios),
                        ams_delta_hook_switch_gpios);
 
-       /* Keep modem power on */
-       ams_delta_set_bias_level(&ams_delta_audio_card,
-                                &ams_delta_audio_card.rtd[0].codec->dapm,
-                                SND_SOC_BIAS_STANDBY);
-
        platform_device_unregister(cx20442_platform_device);
        platform_device_unregister(ams_delta_audio_platform_device);
 }
index c6012ff5bd3ea977cd18f5bb98e4e7e6ded82d1e..d23b19a59d8383f4b6f5aa2036699831793a762e 100644 (file)
@@ -367,7 +367,7 @@ static struct snd_soc_dai_link neo1973_dai[] = {
        .platform_name = "samsung-audio",
        .cpu_dai_name = "s3c24xx-iis",
        .codec_dai_name = "wm8753-hifi",
-       .codec_name = "wm8753-codec.0-001a",
+       .codec_name = "wm8753.0-001a",
        .init = neo1973_wm8753_init,
        .ops = &neo1973_hifi_ops,
 },
@@ -376,7 +376,7 @@ static struct snd_soc_dai_link neo1973_dai[] = {
        .stream_name = "Voice",
        .cpu_dai_name = "dfbmcs320-pcm",
        .codec_dai_name = "wm8753-voice",
-       .codec_name = "wm8753-codec.0-001a",
+       .codec_name = "wm8753.0-001a",
        .ops = &neo1973_voice_ops,
 },
 };
index 0abfb18b911fb93f022f0e6ac1e7b4dda4fb1e4d..227b6ae99785118066a7184cc4cb66f27d38c841 100644 (file)
@@ -204,6 +204,9 @@ static void perf_record__open(struct perf_record *rec)
 
                if (opts->group && pos != first)
                        group_fd = first->fd;
+fallback_missing_features:
+               if (opts->exclude_guest_missing)
+                       attr->exclude_guest = attr->exclude_host = 0;
 retry_sample_id:
                attr->sample_id_all = opts->sample_id_all_avail ? 1 : 0;
 try_again:
@@ -217,15 +220,23 @@ try_again:
                        } else if (err ==  ENODEV && opts->cpu_list) {
                                die("No such device - did you specify"
                                        " an out-of-range profile CPU?\n");
-                       } else if (err == EINVAL && opts->sample_id_all_avail) {
-                               /*
-                                * Old kernel, no attr->sample_id_type_all field
-                                */
-                               opts->sample_id_all_avail = false;
-                               if (!opts->sample_time && !opts->raw_samples && !time_needed)
-                                       attr->sample_type &= ~PERF_SAMPLE_TIME;
-
-                               goto retry_sample_id;
+                       } else if (err == EINVAL) {
+                               if (!opts->exclude_guest_missing &&
+                                   (attr->exclude_guest || attr->exclude_host)) {
+                                       pr_debug("Old kernel, cannot exclude "
+                                                "guest or host samples.\n");
+                                       opts->exclude_guest_missing = true;
+                                       goto fallback_missing_features;
+                               } else if (opts->sample_id_all_avail) {
+                                       /*
+                                        * Old kernel, no attr->sample_id_type_all field
+                                        */
+                                       opts->sample_id_all_avail = false;
+                                       if (!opts->sample_time && !opts->raw_samples && !time_needed)
+                                               attr->sample_type &= ~PERF_SAMPLE_TIME;
+
+                                       goto retry_sample_id;
+                               }
                        }
 
                        /*
@@ -503,9 +514,9 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
                        return err;
        }
 
-       if (!!rec->no_buildid
+       if (!rec->no_buildid
            && !perf_header__has_feat(&session->header, HEADER_BUILD_ID)) {
-               pr_err("Couldn't generating buildids. "
+               pr_err("Couldn't generate buildids. "
                       "Use --no-buildid to profile anyway.\n");
                return -1;
        }
index dd162aa24baad2f44c5cbb1b4176fb2b2cc7b26d..ecff31257eb3771cf9db12acc49065e40e2c4d18 100644 (file)
@@ -857,6 +857,9 @@ static void perf_top__start_counters(struct perf_top *top)
                attr->mmap = 1;
                attr->comm = 1;
                attr->inherit = top->inherit;
+fallback_missing_features:
+               if (top->exclude_guest_missing)
+                       attr->exclude_guest = attr->exclude_host = 0;
 retry_sample_id:
                attr->sample_id_all = top->sample_id_all_avail ? 1 : 0;
 try_again:
@@ -868,12 +871,20 @@ try_again:
                        if (err == EPERM || err == EACCES) {
                                ui__error_paranoid();
                                goto out_err;
-                       } else if (err == EINVAL && top->sample_id_all_avail) {
-                               /*
-                                * Old kernel, no attr->sample_id_type_all field
-                                */
-                               top->sample_id_all_avail = false;
-                               goto retry_sample_id;
+                       } else if (err == EINVAL) {
+                               if (!top->exclude_guest_missing &&
+                                   (attr->exclude_guest || attr->exclude_host)) {
+                                       pr_debug("Old kernel, cannot exclude "
+                                                "guest or host samples.\n");
+                                       top->exclude_guest_missing = true;
+                                       goto fallback_missing_features;
+                               } else if (top->sample_id_all_avail) {
+                                       /*
+                                        * Old kernel, no attr->sample_id_type_all field
+                                        */
+                                       top->sample_id_all_avail = false;
+                                       goto retry_sample_id;
+                               }
                        }
                        /*
                         * If it's cycles then fall back to hrtimer
index 64f8bee31ced8d7eb3586788e4a69f872c33e57a..16e7d20eee8321110797f9f77c928c1e15e013ea 100644 (file)
@@ -199,6 +199,7 @@ struct perf_record_opts {
        bool         sample_address;
        bool         sample_time;
        bool         sample_id_all_avail;
+       bool         exclude_guest_missing;
        bool         system_wide;
        bool         period;
        unsigned int freq;
index a248f3c2c60d9bb730f5603e1b87fcb04160cb6a..f2eab81435ae1b4bf3ffaaedb3734e7e953b492b 100644 (file)
@@ -34,6 +34,7 @@ struct perf_top {
        bool               inherit;
        bool               group;
        bool               sample_id_all_avail;
+       bool               exclude_guest_missing;
        bool               dump_symtab;
        const char         *cpu_list;
        struct hist_entry  *sym_filter_entry;
index 813141047fc22fcfd61ae377444f7ff2a97f06eb..fb25d132921882c3b432ece1bc07bd2700800bc2 100644 (file)
@@ -6,7 +6,7 @@
  * XXX We need to find a better place for these things...
  */
 bool perf_host  = true;
-bool perf_guest = true;
+bool perf_guest = false;
 
 void event_attr_init(struct perf_event_attr *attr)
 {