Merge tag 'sound-3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 18 Apr 2014 17:28:27 +0000 (10:28 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 18 Apr 2014 17:28:27 +0000 (10:28 -0700)
Pull sound fixes from Takashi Iwai:
 "Just a copule of HD-audio device/codec-specific quirks, and a trivial
  replacement of udelay() with mdelay() in the old es18xx driver code.
  All should be safe to apply"

* tag 'sound-3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/realtek - Add headset Mic support for Dell machine
  ALSA: hda - add headset mic detect quirk for a Dell laptop
  ALSA: es18xx driver should use udelay error
  ALSA: hda/realtek - Add support of ALC288 codec

646 files changed:
Documentation/DocBook/device-drivers.tmpl
Documentation/devicetree/bindings/arm/marvell,kirkwood.txt [new file with mode: 0644]
Documentation/devicetree/bindings/i2c/trivial-devices.txt
Documentation/devicetree/bindings/pinctrl/brcm,bcm11351-pinctrl.txt
Documentation/devicetree/bindings/vendor-prefixes.txt
MAINTAINERS
arch/arm/configs/bcm_defconfig
arch/ia64/kernel/head.S
arch/ia64/kernel/ivt.S
arch/ia64/kvm/vmm_ivt.S
arch/parisc/include/asm/shmparam.h
arch/parisc/kernel/cache.c
arch/parisc/kernel/sys_parisc.c
arch/parisc/kernel/syscall_table.S
arch/parisc/lib/memcpy.c
arch/parisc/mm/fault.c
arch/s390/include/asm/sigp.h
arch/s390/include/asm/smp.h
arch/s390/include/uapi/asm/unistd.h
arch/s390/kernel/compat_wrapper.c
arch/s390/kernel/dumpstack.c
arch/s390/kernel/ptrace.c
arch/s390/kernel/setup.c
arch/s390/kernel/smp.c
arch/s390/kernel/syscalls.S
arch/s390/lib/uaccess.c
arch/s390/mm/fault.c
arch/x86/Makefile
arch/x86/include/asm/kvm_host.h
arch/x86/kernel/cpu/perf_event_intel_rapl.c
arch/x86/kernel/early-quirks.c
arch/x86/kernel/reboot.c
arch/x86/kvm/cpuid.c
arch/x86/kvm/cpuid.h
arch/x86/kvm/mmu.c
arch/x86/kvm/mmu.h
arch/x86/kvm/paging_tmpl.h
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c
arch/x86/syscalls/Makefile
arch/x86/syscalls/syscall_32.tbl
arch/x86/tools/Makefile
arch/x86/xen/smp.c
arch/x86/xen/spinlock.c
arch/x86/xen/xen-asm_32.S
drivers/Makefile
drivers/char/hw_random/bcm2835-rng.c
drivers/char/ipmi/Kconfig
drivers/char/ipmi/ipmi_bt_sm.c
drivers/char/ipmi/ipmi_kcs_sm.c
drivers/char/ipmi/ipmi_msghandler.c
drivers/char/ipmi/ipmi_si_intf.c
drivers/irqchip/irq-vic.c
drivers/md/raid5.c
drivers/net/ethernet/broadcom/bnx2.c
drivers/net/ethernet/cadence/Kconfig
drivers/net/ethernet/chelsio/cxgb4/l2t.c
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
drivers/net/ethernet/emulex/benet/be.h
drivers/net/ethernet/emulex/benet/be_main.c
drivers/net/ethernet/marvell/mvneta.c
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/net/ethernet/mellanox/mlx4/mlx4.h
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c
drivers/net/ieee802154/at86rf230.c
drivers/net/vxlan.c
drivers/net/wan/cosa.c
drivers/of/base.c
drivers/of/fdt.c
drivers/pinctrl/Kconfig
drivers/pinctrl/Makefile
drivers/pinctrl/pinctrl-bcm281xx.c [new file with mode: 0644]
drivers/pinctrl/pinctrl-capri.c [deleted file]
drivers/pinctrl/pinctrl-msm.c
drivers/pinctrl/pinctrl-msm.h
drivers/pinctrl/pinctrl-nomadik.c
drivers/pinctrl/pinctrl-rockchip.c
drivers/s390/char/sclp.c
drivers/s390/char/sclp_cmd.c
drivers/s390/char/sclp_vt220.c
drivers/staging/xgifb/vb_def.h
drivers/staging/xgifb/vb_struct.h
drivers/staging/xgifb/vgatypes.h
drivers/video/Kconfig
drivers/video/Makefile
drivers/video/console/sticon.c
drivers/video/console/sticore.c
drivers/video/fbdev/68328fb.c [moved from drivers/video/68328fb.c with 100% similarity]
drivers/video/fbdev/Kconfig [new file with mode: 0644]
drivers/video/fbdev/Makefile [new file with mode: 0644]
drivers/video/fbdev/acornfb.c [moved from drivers/video/acornfb.c with 100% similarity]
drivers/video/fbdev/acornfb.h [moved from drivers/video/acornfb.h with 100% similarity]
drivers/video/fbdev/amba-clcd.c [moved from drivers/video/amba-clcd.c with 100% similarity]
drivers/video/fbdev/amifb.c [moved from drivers/video/amifb.c with 100% similarity]
drivers/video/fbdev/arcfb.c [moved from drivers/video/arcfb.c with 100% similarity]
drivers/video/fbdev/arkfb.c [moved from drivers/video/arkfb.c with 100% similarity]
drivers/video/fbdev/asiliantfb.c [moved from drivers/video/asiliantfb.c with 100% similarity]
drivers/video/fbdev/atafb.c [moved from drivers/video/atafb.c with 100% similarity]
drivers/video/fbdev/atafb.h [moved from drivers/video/atafb.h with 100% similarity]
drivers/video/fbdev/atafb_iplan2p2.c [moved from drivers/video/atafb_iplan2p2.c with 100% similarity]
drivers/video/fbdev/atafb_iplan2p4.c [moved from drivers/video/atafb_iplan2p4.c with 100% similarity]
drivers/video/fbdev/atafb_iplan2p8.c [moved from drivers/video/atafb_iplan2p8.c with 100% similarity]
drivers/video/fbdev/atafb_mfb.c [moved from drivers/video/atafb_mfb.c with 100% similarity]
drivers/video/fbdev/atafb_utils.h [moved from drivers/video/atafb_utils.h with 100% similarity]
drivers/video/fbdev/atmel_lcdfb.c [moved from drivers/video/atmel_lcdfb.c with 100% similarity]
drivers/video/fbdev/aty/Makefile [moved from drivers/video/aty/Makefile with 100% similarity]
drivers/video/fbdev/aty/ati_ids.h [moved from drivers/video/aty/ati_ids.h with 100% similarity]
drivers/video/fbdev/aty/aty128fb.c [moved from drivers/video/aty/aty128fb.c with 100% similarity]
drivers/video/fbdev/aty/atyfb.h [moved from drivers/video/aty/atyfb.h with 100% similarity]
drivers/video/fbdev/aty/atyfb_base.c [moved from drivers/video/aty/atyfb_base.c with 100% similarity]
drivers/video/fbdev/aty/mach64_accel.c [moved from drivers/video/aty/mach64_accel.c with 100% similarity]
drivers/video/fbdev/aty/mach64_ct.c [moved from drivers/video/aty/mach64_ct.c with 100% similarity]
drivers/video/fbdev/aty/mach64_cursor.c [moved from drivers/video/aty/mach64_cursor.c with 99% similarity]
drivers/video/fbdev/aty/mach64_gx.c [moved from drivers/video/aty/mach64_gx.c with 100% similarity]
drivers/video/fbdev/aty/radeon_accel.c [moved from drivers/video/aty/radeon_accel.c with 100% similarity]
drivers/video/fbdev/aty/radeon_backlight.c [moved from drivers/video/aty/radeon_backlight.c with 100% similarity]
drivers/video/fbdev/aty/radeon_base.c [moved from drivers/video/aty/radeon_base.c with 100% similarity]
drivers/video/fbdev/aty/radeon_i2c.c [moved from drivers/video/aty/radeon_i2c.c with 100% similarity]
drivers/video/fbdev/aty/radeon_monitor.c [moved from drivers/video/aty/radeon_monitor.c with 100% similarity]
drivers/video/fbdev/aty/radeon_pm.c [moved from drivers/video/aty/radeon_pm.c with 100% similarity]
drivers/video/fbdev/aty/radeonfb.h [moved from drivers/video/aty/radeonfb.h with 100% similarity]
drivers/video/fbdev/au1100fb.c [moved from drivers/video/au1100fb.c with 100% similarity]
drivers/video/fbdev/au1100fb.h [moved from drivers/video/au1100fb.h with 100% similarity]
drivers/video/fbdev/au1200fb.c [moved from drivers/video/au1200fb.c with 100% similarity]
drivers/video/fbdev/au1200fb.h [moved from drivers/video/au1200fb.h with 100% similarity]
drivers/video/fbdev/auo_k1900fb.c [moved from drivers/video/auo_k1900fb.c with 100% similarity]
drivers/video/fbdev/auo_k1901fb.c [moved from drivers/video/auo_k1901fb.c with 100% similarity]
drivers/video/fbdev/auo_k190x.c [moved from drivers/video/auo_k190x.c with 100% similarity]
drivers/video/fbdev/auo_k190x.h [moved from drivers/video/auo_k190x.h with 100% similarity]
drivers/video/fbdev/bf537-lq035.c [moved from drivers/video/bf537-lq035.c with 100% similarity]
drivers/video/fbdev/bf54x-lq043fb.c [moved from drivers/video/bf54x-lq043fb.c with 99% similarity]
drivers/video/fbdev/bfin-lq035q1-fb.c [moved from drivers/video/bfin-lq035q1-fb.c with 100% similarity]
drivers/video/fbdev/bfin-t350mcqb-fb.c [moved from drivers/video/bfin-t350mcqb-fb.c with 100% similarity]
drivers/video/fbdev/bfin_adv7393fb.c [moved from drivers/video/bfin_adv7393fb.c with 100% similarity]
drivers/video/fbdev/bfin_adv7393fb.h [moved from drivers/video/bfin_adv7393fb.h with 100% similarity]
drivers/video/fbdev/broadsheetfb.c [moved from drivers/video/broadsheetfb.c with 100% similarity]
drivers/video/fbdev/bt431.h [moved from drivers/video/bt431.h with 100% similarity]
drivers/video/fbdev/bt455.h [moved from drivers/video/bt455.h with 100% similarity]
drivers/video/fbdev/bw2.c [moved from drivers/video/bw2.c with 100% similarity]
drivers/video/fbdev/c2p.h [moved from drivers/video/c2p.h with 100% similarity]
drivers/video/fbdev/c2p_core.h [moved from drivers/video/c2p_core.h with 100% similarity]
drivers/video/fbdev/c2p_iplan2.c [moved from drivers/video/c2p_iplan2.c with 100% similarity]
drivers/video/fbdev/c2p_planar.c [moved from drivers/video/c2p_planar.c with 100% similarity]
drivers/video/fbdev/carminefb.c [moved from drivers/video/carminefb.c with 100% similarity]
drivers/video/fbdev/carminefb.h [moved from drivers/video/carminefb.h with 100% similarity]
drivers/video/fbdev/carminefb_regs.h [moved from drivers/video/carminefb_regs.h with 100% similarity]
drivers/video/fbdev/cg14.c [moved from drivers/video/cg14.c with 100% similarity]
drivers/video/fbdev/cg3.c [moved from drivers/video/cg3.c with 100% similarity]
drivers/video/fbdev/cg6.c [moved from drivers/video/cg6.c with 100% similarity]
drivers/video/fbdev/chipsfb.c [moved from drivers/video/chipsfb.c with 100% similarity]
drivers/video/fbdev/cirrusfb.c [moved from drivers/video/cirrusfb.c with 100% similarity]
drivers/video/fbdev/clps711xfb.c [moved from drivers/video/clps711xfb.c with 100% similarity]
drivers/video/fbdev/cobalt_lcdfb.c [moved from drivers/video/cobalt_lcdfb.c with 100% similarity]
drivers/video/fbdev/controlfb.c [moved from drivers/video/controlfb.c with 100% similarity]
drivers/video/fbdev/controlfb.h [moved from drivers/video/controlfb.h with 100% similarity]
drivers/video/fbdev/core/Makefile [new file with mode: 0644]
drivers/video/fbdev/core/cfbcopyarea.c [moved from drivers/video/cfbcopyarea.c with 100% similarity]
drivers/video/fbdev/core/cfbfillrect.c [moved from drivers/video/cfbfillrect.c with 100% similarity]
drivers/video/fbdev/core/cfbimgblt.c [moved from drivers/video/cfbimgblt.c with 100% similarity]
drivers/video/fbdev/core/fb_ddc.c [moved from drivers/video/fb_ddc.c with 99% similarity]
drivers/video/fbdev/core/fb_defio.c [moved from drivers/video/fb_defio.c with 100% similarity]
drivers/video/fbdev/core/fb_draw.h [moved from drivers/video/fb_draw.h with 100% similarity]
drivers/video/fbdev/core/fb_notify.c [moved from drivers/video/fb_notify.c with 100% similarity]
drivers/video/fbdev/core/fb_sys_fops.c [moved from drivers/video/fb_sys_fops.c with 100% similarity]
drivers/video/fbdev/core/fbcmap.c [moved from drivers/video/fbcmap.c with 100% similarity]
drivers/video/fbdev/core/fbcvt.c [moved from drivers/video/fbcvt.c with 100% similarity]
drivers/video/fbdev/core/fbmem.c [moved from drivers/video/fbmem.c with 100% similarity]
drivers/video/fbdev/core/fbmon.c [moved from drivers/video/fbmon.c with 99% similarity]
drivers/video/fbdev/core/fbsysfs.c [moved from drivers/video/fbsysfs.c with 100% similarity]
drivers/video/fbdev/core/modedb.c [moved from drivers/video/modedb.c with 100% similarity]
drivers/video/fbdev/core/svgalib.c [moved from drivers/video/svgalib.c with 100% similarity]
drivers/video/fbdev/core/syscopyarea.c [moved from drivers/video/syscopyarea.c with 100% similarity]
drivers/video/fbdev/core/sysfillrect.c [moved from drivers/video/sysfillrect.c with 100% similarity]
drivers/video/fbdev/core/sysimgblt.c [moved from drivers/video/sysimgblt.c with 100% similarity]
drivers/video/fbdev/cyber2000fb.c [moved from drivers/video/cyber2000fb.c with 100% similarity]
drivers/video/fbdev/cyber2000fb.h [moved from drivers/video/cyber2000fb.h with 100% similarity]
drivers/video/fbdev/da8xx-fb.c [moved from drivers/video/da8xx-fb.c with 99% similarity]
drivers/video/fbdev/dnfb.c [moved from drivers/video/dnfb.c with 100% similarity]
drivers/video/fbdev/edid.h [moved from drivers/video/edid.h with 100% similarity]
drivers/video/fbdev/efifb.c [moved from drivers/video/efifb.c with 100% similarity]
drivers/video/fbdev/ep93xx-fb.c [moved from drivers/video/ep93xx-fb.c with 100% similarity]
drivers/video/fbdev/exynos/Kconfig [moved from drivers/video/exynos/Kconfig with 100% similarity]
drivers/video/fbdev/exynos/Makefile [moved from drivers/video/exynos/Makefile with 100% similarity]
drivers/video/fbdev/exynos/exynos_mipi_dsi.c [moved from drivers/video/exynos/exynos_mipi_dsi.c with 100% similarity]
drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c [moved from drivers/video/exynos/exynos_mipi_dsi_common.c with 100% similarity]
drivers/video/fbdev/exynos/exynos_mipi_dsi_common.h [moved from drivers/video/exynos/exynos_mipi_dsi_common.h with 100% similarity]
drivers/video/fbdev/exynos/exynos_mipi_dsi_lowlevel.c [moved from drivers/video/exynos/exynos_mipi_dsi_lowlevel.c with 100% similarity]
drivers/video/fbdev/exynos/exynos_mipi_dsi_lowlevel.h [moved from drivers/video/exynos/exynos_mipi_dsi_lowlevel.h with 100% similarity]
drivers/video/fbdev/exynos/exynos_mipi_dsi_regs.h [moved from drivers/video/exynos/exynos_mipi_dsi_regs.h with 100% similarity]
drivers/video/fbdev/exynos/s6e8ax0.c [moved from drivers/video/exynos/s6e8ax0.c with 100% similarity]
drivers/video/fbdev/fb-puv3.c [moved from drivers/video/fb-puv3.c with 100% similarity]
drivers/video/fbdev/ffb.c [moved from drivers/video/ffb.c with 100% similarity]
drivers/video/fbdev/fm2fb.c [moved from drivers/video/fm2fb.c with 100% similarity]
drivers/video/fbdev/fsl-diu-fb.c [moved from drivers/video/fsl-diu-fb.c with 100% similarity]
drivers/video/fbdev/g364fb.c [moved from drivers/video/g364fb.c with 100% similarity]
drivers/video/fbdev/gbefb.c [moved from drivers/video/gbefb.c with 100% similarity]
drivers/video/fbdev/geode/Kconfig [moved from drivers/video/geode/Kconfig with 100% similarity]
drivers/video/fbdev/geode/Makefile [moved from drivers/video/geode/Makefile with 100% similarity]
drivers/video/fbdev/geode/display_gx.c [moved from drivers/video/geode/display_gx.c with 100% similarity]
drivers/video/fbdev/geode/display_gx1.c [moved from drivers/video/geode/display_gx1.c with 100% similarity]
drivers/video/fbdev/geode/display_gx1.h [moved from drivers/video/geode/display_gx1.h with 100% similarity]
drivers/video/fbdev/geode/geodefb.h [moved from drivers/video/geode/geodefb.h with 100% similarity]
drivers/video/fbdev/geode/gx1fb_core.c [moved from drivers/video/geode/gx1fb_core.c with 100% similarity]
drivers/video/fbdev/geode/gxfb.h [moved from drivers/video/geode/gxfb.h with 100% similarity]
drivers/video/fbdev/geode/gxfb_core.c [moved from drivers/video/geode/gxfb_core.c with 100% similarity]
drivers/video/fbdev/geode/lxfb.h [moved from drivers/video/geode/lxfb.h with 100% similarity]
drivers/video/fbdev/geode/lxfb_core.c [moved from drivers/video/geode/lxfb_core.c with 100% similarity]
drivers/video/fbdev/geode/lxfb_ops.c [moved from drivers/video/geode/lxfb_ops.c with 100% similarity]
drivers/video/fbdev/geode/suspend_gx.c [moved from drivers/video/geode/suspend_gx.c with 100% similarity]
drivers/video/fbdev/geode/video_cs5530.c [moved from drivers/video/geode/video_cs5530.c with 100% similarity]
drivers/video/fbdev/geode/video_cs5530.h [moved from drivers/video/geode/video_cs5530.h with 100% similarity]
drivers/video/fbdev/geode/video_gx.c [moved from drivers/video/geode/video_gx.c with 100% similarity]
drivers/video/fbdev/goldfishfb.c [moved from drivers/video/goldfishfb.c with 100% similarity]
drivers/video/fbdev/grvga.c [moved from drivers/video/grvga.c with 100% similarity]
drivers/video/fbdev/gxt4500.c [moved from drivers/video/gxt4500.c with 100% similarity]
drivers/video/fbdev/hecubafb.c [moved from drivers/video/hecubafb.c with 100% similarity]
drivers/video/fbdev/hgafb.c [moved from drivers/video/hgafb.c with 100% similarity]
drivers/video/fbdev/hitfb.c [moved from drivers/video/hitfb.c with 100% similarity]
drivers/video/fbdev/hpfb.c [moved from drivers/video/hpfb.c with 100% similarity]
drivers/video/fbdev/hyperv_fb.c [moved from drivers/video/hyperv_fb.c with 100% similarity]
drivers/video/fbdev/i740_reg.h [moved from drivers/video/i740_reg.h with 100% similarity]
drivers/video/fbdev/i740fb.c [moved from drivers/video/i740fb.c with 100% similarity]
drivers/video/fbdev/i810/Makefile [moved from drivers/video/i810/Makefile with 100% similarity]
drivers/video/fbdev/i810/i810-i2c.c [moved from drivers/video/i810/i810-i2c.c with 100% similarity]
drivers/video/fbdev/i810/i810.h [moved from drivers/video/i810/i810.h with 100% similarity]
drivers/video/fbdev/i810/i810_accel.c [moved from drivers/video/i810/i810_accel.c with 100% similarity]
drivers/video/fbdev/i810/i810_dvt.c [moved from drivers/video/i810/i810_dvt.c with 100% similarity]
drivers/video/fbdev/i810/i810_gtf.c [moved from drivers/video/i810/i810_gtf.c with 100% similarity]
drivers/video/fbdev/i810/i810_main.c [moved from drivers/video/i810/i810_main.c with 100% similarity]
drivers/video/fbdev/i810/i810_main.h [moved from drivers/video/i810/i810_main.h with 100% similarity]
drivers/video/fbdev/i810/i810_regs.h [moved from drivers/video/i810/i810_regs.h with 100% similarity]
drivers/video/fbdev/igafb.c [moved from drivers/video/igafb.c with 100% similarity]
drivers/video/fbdev/imsttfb.c [moved from drivers/video/imsttfb.c with 100% similarity]
drivers/video/fbdev/imxfb.c [moved from drivers/video/imxfb.c with 100% similarity]
drivers/video/fbdev/intelfb/Makefile [moved from drivers/video/intelfb/Makefile with 100% similarity]
drivers/video/fbdev/intelfb/intelfb.h [moved from drivers/video/intelfb/intelfb.h with 100% similarity]
drivers/video/fbdev/intelfb/intelfb_i2c.c [moved from drivers/video/intelfb/intelfb_i2c.c with 100% similarity]
drivers/video/fbdev/intelfb/intelfbdrv.c [moved from drivers/video/intelfb/intelfbdrv.c with 100% similarity]
drivers/video/fbdev/intelfb/intelfbhw.c [moved from drivers/video/intelfb/intelfbhw.c with 100% similarity]
drivers/video/fbdev/intelfb/intelfbhw.h [moved from drivers/video/intelfb/intelfbhw.h with 100% similarity]
drivers/video/fbdev/jz4740_fb.c [moved from drivers/video/jz4740_fb.c with 100% similarity]
drivers/video/fbdev/kyro/Makefile [moved from drivers/video/kyro/Makefile with 100% similarity]
drivers/video/fbdev/kyro/STG4000InitDevice.c [moved from drivers/video/kyro/STG4000InitDevice.c with 100% similarity]
drivers/video/fbdev/kyro/STG4000Interface.h [moved from drivers/video/kyro/STG4000Interface.h with 100% similarity]
drivers/video/fbdev/kyro/STG4000OverlayDevice.c [moved from drivers/video/kyro/STG4000OverlayDevice.c with 100% similarity]
drivers/video/fbdev/kyro/STG4000Ramdac.c [moved from drivers/video/kyro/STG4000Ramdac.c with 100% similarity]
drivers/video/fbdev/kyro/STG4000Reg.h [moved from drivers/video/kyro/STG4000Reg.h with 100% similarity]
drivers/video/fbdev/kyro/STG4000VTG.c [moved from drivers/video/kyro/STG4000VTG.c with 100% similarity]
drivers/video/fbdev/kyro/fbdev.c [moved from drivers/video/kyro/fbdev.c with 100% similarity]
drivers/video/fbdev/leo.c [moved from drivers/video/leo.c with 100% similarity]
drivers/video/fbdev/macfb.c [moved from drivers/video/macfb.c with 100% similarity]
drivers/video/fbdev/macmodes.c [moved from drivers/video/macmodes.c with 100% similarity]
drivers/video/fbdev/macmodes.h [moved from drivers/video/macmodes.h with 100% similarity]
drivers/video/fbdev/matrox/Makefile [moved from drivers/video/matrox/Makefile with 100% similarity]
drivers/video/fbdev/matrox/g450_pll.c [moved from drivers/video/matrox/g450_pll.c with 100% similarity]
drivers/video/fbdev/matrox/g450_pll.h [moved from drivers/video/matrox/g450_pll.h with 100% similarity]
drivers/video/fbdev/matrox/i2c-matroxfb.c [moved from drivers/video/matrox/i2c-matroxfb.c with 100% similarity]
drivers/video/fbdev/matrox/matroxfb_DAC1064.c [moved from drivers/video/matrox/matroxfb_DAC1064.c with 100% similarity]
drivers/video/fbdev/matrox/matroxfb_DAC1064.h [moved from drivers/video/matrox/matroxfb_DAC1064.h with 100% similarity]
drivers/video/fbdev/matrox/matroxfb_Ti3026.c [moved from drivers/video/matrox/matroxfb_Ti3026.c with 100% similarity]
drivers/video/fbdev/matrox/matroxfb_Ti3026.h [moved from drivers/video/matrox/matroxfb_Ti3026.h with 100% similarity]
drivers/video/fbdev/matrox/matroxfb_accel.c [moved from drivers/video/matrox/matroxfb_accel.c with 100% similarity]
drivers/video/fbdev/matrox/matroxfb_accel.h [moved from drivers/video/matrox/matroxfb_accel.h with 100% similarity]
drivers/video/fbdev/matrox/matroxfb_base.c [moved from drivers/video/matrox/matroxfb_base.c with 100% similarity]
drivers/video/fbdev/matrox/matroxfb_base.h [moved from drivers/video/matrox/matroxfb_base.h with 100% similarity]
drivers/video/fbdev/matrox/matroxfb_crtc2.c [moved from drivers/video/matrox/matroxfb_crtc2.c with 100% similarity]
drivers/video/fbdev/matrox/matroxfb_crtc2.h [moved from drivers/video/matrox/matroxfb_crtc2.h with 100% similarity]
drivers/video/fbdev/matrox/matroxfb_g450.c [moved from drivers/video/matrox/matroxfb_g450.c with 100% similarity]
drivers/video/fbdev/matrox/matroxfb_g450.h [moved from drivers/video/matrox/matroxfb_g450.h with 100% similarity]
drivers/video/fbdev/matrox/matroxfb_maven.c [moved from drivers/video/matrox/matroxfb_maven.c with 100% similarity]
drivers/video/fbdev/matrox/matroxfb_maven.h [moved from drivers/video/matrox/matroxfb_maven.h with 100% similarity]
drivers/video/fbdev/matrox/matroxfb_misc.c [moved from drivers/video/matrox/matroxfb_misc.c with 100% similarity]
drivers/video/fbdev/matrox/matroxfb_misc.h [moved from drivers/video/matrox/matroxfb_misc.h with 100% similarity]
drivers/video/fbdev/maxinefb.c [moved from drivers/video/maxinefb.c with 100% similarity]
drivers/video/fbdev/mb862xx/Makefile [moved from drivers/video/mb862xx/Makefile with 100% similarity]
drivers/video/fbdev/mb862xx/mb862xx-i2c.c [moved from drivers/video/mb862xx/mb862xx-i2c.c with 100% similarity]
drivers/video/fbdev/mb862xx/mb862xx_reg.h [moved from drivers/video/mb862xx/mb862xx_reg.h with 100% similarity]
drivers/video/fbdev/mb862xx/mb862xxfb.h [moved from drivers/video/mb862xx/mb862xxfb.h with 100% similarity]
drivers/video/fbdev/mb862xx/mb862xxfb_accel.c [moved from drivers/video/mb862xx/mb862xxfb_accel.c with 100% similarity]
drivers/video/fbdev/mb862xx/mb862xxfb_accel.h [moved from drivers/video/mb862xx/mb862xxfb_accel.h with 100% similarity]
drivers/video/fbdev/mb862xx/mb862xxfbdrv.c [moved from drivers/video/mb862xx/mb862xxfbdrv.c with 100% similarity]
drivers/video/fbdev/mbx/Makefile [moved from drivers/video/mbx/Makefile with 100% similarity]
drivers/video/fbdev/mbx/mbxdebugfs.c [moved from drivers/video/mbx/mbxdebugfs.c with 100% similarity]
drivers/video/fbdev/mbx/mbxfb.c [moved from drivers/video/mbx/mbxfb.c with 100% similarity]
drivers/video/fbdev/mbx/reg_bits.h [moved from drivers/video/mbx/reg_bits.h with 100% similarity]
drivers/video/fbdev/mbx/regs.h [moved from drivers/video/mbx/regs.h with 100% similarity]
drivers/video/fbdev/metronomefb.c [moved from drivers/video/metronomefb.c with 100% similarity]
drivers/video/fbdev/mmp/Kconfig [moved from drivers/video/mmp/Kconfig with 61% similarity]
drivers/video/fbdev/mmp/Makefile [moved from drivers/video/mmp/Makefile with 100% similarity]
drivers/video/fbdev/mmp/core.c [moved from drivers/video/mmp/core.c with 100% similarity]
drivers/video/fbdev/mmp/fb/Kconfig [moved from drivers/video/mmp/fb/Kconfig with 100% similarity]
drivers/video/fbdev/mmp/fb/Makefile [moved from drivers/video/mmp/fb/Makefile with 100% similarity]
drivers/video/fbdev/mmp/fb/mmpfb.c [moved from drivers/video/mmp/fb/mmpfb.c with 100% similarity]
drivers/video/fbdev/mmp/fb/mmpfb.h [moved from drivers/video/mmp/fb/mmpfb.h with 100% similarity]
drivers/video/fbdev/mmp/hw/Kconfig [moved from drivers/video/mmp/hw/Kconfig with 100% similarity]
drivers/video/fbdev/mmp/hw/Makefile [moved from drivers/video/mmp/hw/Makefile with 100% similarity]
drivers/video/fbdev/mmp/hw/mmp_ctrl.c [moved from drivers/video/mmp/hw/mmp_ctrl.c with 100% similarity]
drivers/video/fbdev/mmp/hw/mmp_ctrl.h [moved from drivers/video/mmp/hw/mmp_ctrl.h with 100% similarity]
drivers/video/fbdev/mmp/hw/mmp_spi.c [moved from drivers/video/mmp/hw/mmp_spi.c with 100% similarity]
drivers/video/fbdev/mmp/panel/Kconfig [moved from drivers/video/mmp/panel/Kconfig with 100% similarity]
drivers/video/fbdev/mmp/panel/Makefile [moved from drivers/video/mmp/panel/Makefile with 100% similarity]
drivers/video/fbdev/mmp/panel/tpo_tj032md01bw.c [moved from drivers/video/mmp/panel/tpo_tj032md01bw.c with 100% similarity]
drivers/video/fbdev/msm/Makefile [moved from drivers/video/msm/Makefile with 100% similarity]
drivers/video/fbdev/msm/mddi.c [moved from drivers/video/msm/mddi.c with 100% similarity]
drivers/video/fbdev/msm/mddi_client_dummy.c [moved from drivers/video/msm/mddi_client_dummy.c with 100% similarity]
drivers/video/fbdev/msm/mddi_client_nt35399.c [moved from drivers/video/msm/mddi_client_nt35399.c with 100% similarity]
drivers/video/fbdev/msm/mddi_client_toshiba.c [moved from drivers/video/msm/mddi_client_toshiba.c with 100% similarity]
drivers/video/fbdev/msm/mddi_hw.h [moved from drivers/video/msm/mddi_hw.h with 100% similarity]
drivers/video/fbdev/msm/mdp.c [moved from drivers/video/msm/mdp.c with 100% similarity]
drivers/video/fbdev/msm/mdp_csc_table.h [moved from drivers/video/msm/mdp_csc_table.h with 100% similarity]
drivers/video/fbdev/msm/mdp_hw.h [moved from drivers/video/msm/mdp_hw.h with 100% similarity]
drivers/video/fbdev/msm/mdp_ppp.c [moved from drivers/video/msm/mdp_ppp.c with 100% similarity]
drivers/video/fbdev/msm/mdp_scale_tables.c [moved from drivers/video/msm/mdp_scale_tables.c with 100% similarity]
drivers/video/fbdev/msm/mdp_scale_tables.h [moved from drivers/video/msm/mdp_scale_tables.h with 100% similarity]
drivers/video/fbdev/msm/msm_fb.c [moved from drivers/video/msm/msm_fb.c with 100% similarity]
drivers/video/fbdev/mx3fb.c [moved from drivers/video/mx3fb.c with 100% similarity]
drivers/video/fbdev/mxsfb.c [moved from drivers/video/mxsfb.c with 100% similarity]
drivers/video/fbdev/n411.c [moved from drivers/video/n411.c with 100% similarity]
drivers/video/fbdev/neofb.c [moved from drivers/video/neofb.c with 100% similarity]
drivers/video/fbdev/nuc900fb.c [moved from drivers/video/nuc900fb.c with 100% similarity]
drivers/video/fbdev/nuc900fb.h [moved from drivers/video/nuc900fb.h with 100% similarity]
drivers/video/fbdev/nvidia/Makefile [moved from drivers/video/nvidia/Makefile with 100% similarity]
drivers/video/fbdev/nvidia/nv_accel.c [moved from drivers/video/nvidia/nv_accel.c with 100% similarity]
drivers/video/fbdev/nvidia/nv_backlight.c [moved from drivers/video/nvidia/nv_backlight.c with 100% similarity]
drivers/video/fbdev/nvidia/nv_dma.h [moved from drivers/video/nvidia/nv_dma.h with 100% similarity]
drivers/video/fbdev/nvidia/nv_hw.c [moved from drivers/video/nvidia/nv_hw.c with 100% similarity]
drivers/video/fbdev/nvidia/nv_i2c.c [moved from drivers/video/nvidia/nv_i2c.c with 100% similarity]
drivers/video/fbdev/nvidia/nv_local.h [moved from drivers/video/nvidia/nv_local.h with 100% similarity]
drivers/video/fbdev/nvidia/nv_of.c [moved from drivers/video/nvidia/nv_of.c with 100% similarity]
drivers/video/fbdev/nvidia/nv_proto.h [moved from drivers/video/nvidia/nv_proto.h with 100% similarity]
drivers/video/fbdev/nvidia/nv_setup.c [moved from drivers/video/nvidia/nv_setup.c with 100% similarity]
drivers/video/fbdev/nvidia/nv_type.h [moved from drivers/video/nvidia/nv_type.h with 100% similarity]
drivers/video/fbdev/nvidia/nvidia.c [moved from drivers/video/nvidia/nvidia.c with 100% similarity]
drivers/video/fbdev/ocfb.c [moved from drivers/video/ocfb.c with 100% similarity]
drivers/video/fbdev/offb.c [moved from drivers/video/offb.c with 100% similarity]
drivers/video/fbdev/omap/Kconfig [moved from drivers/video/omap/Kconfig with 100% similarity]
drivers/video/fbdev/omap/Makefile [moved from drivers/video/omap/Makefile with 100% similarity]
drivers/video/fbdev/omap/hwa742.c [moved from drivers/video/omap/hwa742.c with 100% similarity]
drivers/video/fbdev/omap/lcd_ams_delta.c [moved from drivers/video/omap/lcd_ams_delta.c with 100% similarity]
drivers/video/fbdev/omap/lcd_h3.c [moved from drivers/video/omap/lcd_h3.c with 100% similarity]
drivers/video/fbdev/omap/lcd_htcherald.c [moved from drivers/video/omap/lcd_htcherald.c with 100% similarity]
drivers/video/fbdev/omap/lcd_inn1510.c [moved from drivers/video/omap/lcd_inn1510.c with 100% similarity]
drivers/video/fbdev/omap/lcd_inn1610.c [moved from drivers/video/omap/lcd_inn1610.c with 100% similarity]
drivers/video/fbdev/omap/lcd_mipid.c [moved from drivers/video/omap/lcd_mipid.c with 100% similarity]
drivers/video/fbdev/omap/lcd_osk.c [moved from drivers/video/omap/lcd_osk.c with 100% similarity]
drivers/video/fbdev/omap/lcd_palmte.c [moved from drivers/video/omap/lcd_palmte.c with 100% similarity]
drivers/video/fbdev/omap/lcd_palmtt.c [moved from drivers/video/omap/lcd_palmtt.c with 100% similarity]
drivers/video/fbdev/omap/lcd_palmz71.c [moved from drivers/video/omap/lcd_palmz71.c with 100% similarity]
drivers/video/fbdev/omap/lcdc.c [moved from drivers/video/omap/lcdc.c with 100% similarity]
drivers/video/fbdev/omap/lcdc.h [moved from drivers/video/omap/lcdc.h with 100% similarity]
drivers/video/fbdev/omap/omapfb.h [moved from drivers/video/omap/omapfb.h with 100% similarity]
drivers/video/fbdev/omap/omapfb_main.c [moved from drivers/video/omap/omapfb_main.c with 100% similarity]
drivers/video/fbdev/omap/sossi.c [moved from drivers/video/omap/sossi.c with 100% similarity]
drivers/video/fbdev/omap2/Kconfig [new file with mode: 0644]
drivers/video/fbdev/omap2/Makefile [moved from drivers/video/omap2/Makefile with 100% similarity]
drivers/video/fbdev/omap2/displays-new/Kconfig [moved from drivers/video/omap2/displays-new/Kconfig with 100% similarity]
drivers/video/fbdev/omap2/displays-new/Makefile [moved from drivers/video/omap2/displays-new/Makefile with 100% similarity]
drivers/video/fbdev/omap2/displays-new/connector-analog-tv.c [moved from drivers/video/omap2/displays-new/connector-analog-tv.c with 100% similarity]
drivers/video/fbdev/omap2/displays-new/connector-dvi.c [moved from drivers/video/omap2/displays-new/connector-dvi.c with 100% similarity]
drivers/video/fbdev/omap2/displays-new/connector-hdmi.c [moved from drivers/video/omap2/displays-new/connector-hdmi.c with 100% similarity]
drivers/video/fbdev/omap2/displays-new/encoder-tfp410.c [moved from drivers/video/omap2/displays-new/encoder-tfp410.c with 100% similarity]
drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c [moved from drivers/video/omap2/displays-new/encoder-tpd12s015.c with 100% similarity]
drivers/video/fbdev/omap2/displays-new/panel-dpi.c [moved from drivers/video/omap2/displays-new/panel-dpi.c with 100% similarity]
drivers/video/fbdev/omap2/displays-new/panel-dsi-cm.c [moved from drivers/video/omap2/displays-new/panel-dsi-cm.c with 100% similarity]
drivers/video/fbdev/omap2/displays-new/panel-lgphilips-lb035q02.c [moved from drivers/video/omap2/displays-new/panel-lgphilips-lb035q02.c with 100% similarity]
drivers/video/fbdev/omap2/displays-new/panel-nec-nl8048hl11.c [moved from drivers/video/omap2/displays-new/panel-nec-nl8048hl11.c with 100% similarity]
drivers/video/fbdev/omap2/displays-new/panel-sharp-ls037v7dw01.c [moved from drivers/video/omap2/displays-new/panel-sharp-ls037v7dw01.c with 100% similarity]
drivers/video/fbdev/omap2/displays-new/panel-sony-acx565akm.c [moved from drivers/video/omap2/displays-new/panel-sony-acx565akm.c with 100% similarity]
drivers/video/fbdev/omap2/displays-new/panel-tpo-td028ttec1.c [moved from drivers/video/omap2/displays-new/panel-tpo-td028ttec1.c with 100% similarity]
drivers/video/fbdev/omap2/displays-new/panel-tpo-td043mtea1.c [moved from drivers/video/omap2/displays-new/panel-tpo-td043mtea1.c with 100% similarity]
drivers/video/fbdev/omap2/dss/Kconfig [moved from drivers/video/omap2/dss/Kconfig with 100% similarity]
drivers/video/fbdev/omap2/dss/Makefile [moved from drivers/video/omap2/dss/Makefile with 100% similarity]
drivers/video/fbdev/omap2/dss/apply.c [moved from drivers/video/omap2/dss/apply.c with 100% similarity]
drivers/video/fbdev/omap2/dss/core.c [moved from drivers/video/omap2/dss/core.c with 100% similarity]
drivers/video/fbdev/omap2/dss/dispc-compat.c [moved from drivers/video/omap2/dss/dispc-compat.c with 100% similarity]
drivers/video/fbdev/omap2/dss/dispc-compat.h [moved from drivers/video/omap2/dss/dispc-compat.h with 100% similarity]
drivers/video/fbdev/omap2/dss/dispc.c [moved from drivers/video/omap2/dss/dispc.c with 98% similarity]
drivers/video/fbdev/omap2/dss/dispc.h [moved from drivers/video/omap2/dss/dispc.h with 100% similarity]
drivers/video/fbdev/omap2/dss/dispc_coefs.c [moved from drivers/video/omap2/dss/dispc_coefs.c with 100% similarity]
drivers/video/fbdev/omap2/dss/display-sysfs.c [moved from drivers/video/omap2/dss/display-sysfs.c with 100% similarity]
drivers/video/fbdev/omap2/dss/display.c [moved from drivers/video/omap2/dss/display.c with 100% similarity]
drivers/video/fbdev/omap2/dss/dpi.c [moved from drivers/video/omap2/dss/dpi.c with 100% similarity]
drivers/video/fbdev/omap2/dss/dsi.c [moved from drivers/video/omap2/dss/dsi.c with 99% similarity]
drivers/video/fbdev/omap2/dss/dss-of.c [moved from drivers/video/omap2/dss/dss-of.c with 100% similarity]
drivers/video/fbdev/omap2/dss/dss.c [moved from drivers/video/omap2/dss/dss.c with 99% similarity]
drivers/video/fbdev/omap2/dss/dss.h [moved from drivers/video/omap2/dss/dss.h with 99% similarity]
drivers/video/fbdev/omap2/dss/dss_features.c [moved from drivers/video/omap2/dss/dss_features.c with 100% similarity]
drivers/video/fbdev/omap2/dss/dss_features.h [moved from drivers/video/omap2/dss/dss_features.h with 100% similarity]
drivers/video/fbdev/omap2/dss/hdmi.h [moved from drivers/video/omap2/dss/hdmi.h with 100% similarity]
drivers/video/fbdev/omap2/dss/hdmi4.c [moved from drivers/video/omap2/dss/hdmi4.c with 100% similarity]
drivers/video/fbdev/omap2/dss/hdmi4_core.c [moved from drivers/video/omap2/dss/hdmi4_core.c with 100% similarity]
drivers/video/fbdev/omap2/dss/hdmi4_core.h [moved from drivers/video/omap2/dss/hdmi4_core.h with 100% similarity]
drivers/video/fbdev/omap2/dss/hdmi_common.c [moved from drivers/video/omap2/dss/hdmi_common.c with 98% similarity]
drivers/video/fbdev/omap2/dss/hdmi_phy.c [moved from drivers/video/omap2/dss/hdmi_phy.c with 100% similarity]
drivers/video/fbdev/omap2/dss/hdmi_pll.c [moved from drivers/video/omap2/dss/hdmi_pll.c with 100% similarity]
drivers/video/fbdev/omap2/dss/hdmi_wp.c [moved from drivers/video/omap2/dss/hdmi_wp.c with 100% similarity]
drivers/video/fbdev/omap2/dss/manager-sysfs.c [moved from drivers/video/omap2/dss/manager-sysfs.c with 100% similarity]
drivers/video/fbdev/omap2/dss/manager.c [moved from drivers/video/omap2/dss/manager.c with 100% similarity]
drivers/video/fbdev/omap2/dss/output.c [moved from drivers/video/omap2/dss/output.c with 100% similarity]
drivers/video/fbdev/omap2/dss/overlay-sysfs.c [moved from drivers/video/omap2/dss/overlay-sysfs.c with 100% similarity]
drivers/video/fbdev/omap2/dss/overlay.c [moved from drivers/video/omap2/dss/overlay.c with 100% similarity]
drivers/video/fbdev/omap2/dss/rfbi.c [moved from drivers/video/omap2/dss/rfbi.c with 100% similarity]
drivers/video/fbdev/omap2/dss/sdi.c [moved from drivers/video/omap2/dss/sdi.c with 100% similarity]
drivers/video/fbdev/omap2/dss/venc.c [moved from drivers/video/omap2/dss/venc.c with 100% similarity]
drivers/video/fbdev/omap2/dss/venc_panel.c [moved from drivers/video/omap2/dss/venc_panel.c with 100% similarity]
drivers/video/fbdev/omap2/omapfb/Kconfig [moved from drivers/video/omap2/omapfb/Kconfig with 100% similarity]
drivers/video/fbdev/omap2/omapfb/Makefile [moved from drivers/video/omap2/omapfb/Makefile with 100% similarity]
drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c [moved from drivers/video/omap2/omapfb/omapfb-ioctl.c with 100% similarity]
drivers/video/fbdev/omap2/omapfb/omapfb-main.c [moved from drivers/video/omap2/omapfb/omapfb-main.c with 100% similarity]
drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c [moved from drivers/video/omap2/omapfb/omapfb-sysfs.c with 100% similarity]
drivers/video/fbdev/omap2/omapfb/omapfb.h [moved from drivers/video/omap2/omapfb/omapfb.h with 100% similarity]
drivers/video/fbdev/omap2/vrfb.c [moved from drivers/video/omap2/vrfb.c with 100% similarity]
drivers/video/fbdev/p9100.c [moved from drivers/video/p9100.c with 100% similarity]
drivers/video/fbdev/platinumfb.c [moved from drivers/video/platinumfb.c with 100% similarity]
drivers/video/fbdev/platinumfb.h [moved from drivers/video/platinumfb.h with 100% similarity]
drivers/video/fbdev/pm2fb.c [moved from drivers/video/pm2fb.c with 100% similarity]
drivers/video/fbdev/pm3fb.c [moved from drivers/video/pm3fb.c with 100% similarity]
drivers/video/fbdev/pmag-aa-fb.c [moved from drivers/video/pmag-aa-fb.c with 100% similarity]
drivers/video/fbdev/pmag-ba-fb.c [moved from drivers/video/pmag-ba-fb.c with 100% similarity]
drivers/video/fbdev/pmagb-b-fb.c [moved from drivers/video/pmagb-b-fb.c with 100% similarity]
drivers/video/fbdev/ps3fb.c [moved from drivers/video/ps3fb.c with 100% similarity]
drivers/video/fbdev/pvr2fb.c [moved from drivers/video/pvr2fb.c with 100% similarity]
drivers/video/fbdev/pxa168fb.c [moved from drivers/video/pxa168fb.c with 100% similarity]
drivers/video/fbdev/pxa168fb.h [moved from drivers/video/pxa168fb.h with 100% similarity]
drivers/video/fbdev/pxa3xx-gcu.c [moved from drivers/video/pxa3xx-gcu.c with 100% similarity]
drivers/video/fbdev/pxa3xx-gcu.h [moved from drivers/video/pxa3xx-gcu.h with 100% similarity]
drivers/video/fbdev/pxafb.c [moved from drivers/video/pxafb.c with 100% similarity]
drivers/video/fbdev/pxafb.h [moved from drivers/video/pxafb.h with 100% similarity]
drivers/video/fbdev/q40fb.c [moved from drivers/video/q40fb.c with 100% similarity]
drivers/video/fbdev/riva/Makefile [moved from drivers/video/riva/Makefile with 100% similarity]
drivers/video/fbdev/riva/fbdev.c [moved from drivers/video/riva/fbdev.c with 100% similarity]
drivers/video/fbdev/riva/nv_driver.c [moved from drivers/video/riva/nv_driver.c with 100% similarity]
drivers/video/fbdev/riva/nv_type.h [moved from drivers/video/riva/nv_type.h with 100% similarity]
drivers/video/fbdev/riva/nvreg.h [moved from drivers/video/riva/nvreg.h with 100% similarity]
drivers/video/fbdev/riva/riva_hw.c [moved from drivers/video/riva/riva_hw.c with 100% similarity]
drivers/video/fbdev/riva/riva_hw.h [moved from drivers/video/riva/riva_hw.h with 100% similarity]
drivers/video/fbdev/riva/riva_tbl.h [moved from drivers/video/riva/riva_tbl.h with 100% similarity]
drivers/video/fbdev/riva/rivafb-i2c.c [moved from drivers/video/riva/rivafb-i2c.c with 100% similarity]
drivers/video/fbdev/riva/rivafb.h [moved from drivers/video/riva/rivafb.h with 100% similarity]
drivers/video/fbdev/s1d13xxxfb.c [moved from drivers/video/s1d13xxxfb.c with 100% similarity]
drivers/video/fbdev/s3c-fb.c [moved from drivers/video/s3c-fb.c with 100% similarity]
drivers/video/fbdev/s3c2410fb.c [moved from drivers/video/s3c2410fb.c with 100% similarity]
drivers/video/fbdev/s3c2410fb.h [moved from drivers/video/s3c2410fb.h with 100% similarity]
drivers/video/fbdev/s3fb.c [moved from drivers/video/s3fb.c with 100% similarity]
drivers/video/fbdev/sa1100fb.c [moved from drivers/video/sa1100fb.c with 100% similarity]
drivers/video/fbdev/sa1100fb.h [moved from drivers/video/sa1100fb.h with 100% similarity]
drivers/video/fbdev/savage/Makefile [moved from drivers/video/savage/Makefile with 100% similarity]
drivers/video/fbdev/savage/savagefb-i2c.c [moved from drivers/video/savage/savagefb-i2c.c with 100% similarity]
drivers/video/fbdev/savage/savagefb.h [moved from drivers/video/savage/savagefb.h with 100% similarity]
drivers/video/fbdev/savage/savagefb_accel.c [moved from drivers/video/savage/savagefb_accel.c with 100% similarity]
drivers/video/fbdev/savage/savagefb_driver.c [moved from drivers/video/savage/savagefb_driver.c with 100% similarity]
drivers/video/fbdev/sbuslib.c [moved from drivers/video/sbuslib.c with 100% similarity]
drivers/video/fbdev/sbuslib.h [moved from drivers/video/sbuslib.h with 100% similarity]
drivers/video/fbdev/sh7760fb.c [moved from drivers/video/sh7760fb.c with 100% similarity]
drivers/video/fbdev/sh_mipi_dsi.c [moved from drivers/video/sh_mipi_dsi.c with 100% similarity]
drivers/video/fbdev/sh_mobile_hdmi.c [moved from drivers/video/sh_mobile_hdmi.c with 100% similarity]
drivers/video/fbdev/sh_mobile_lcdcfb.c [moved from drivers/video/sh_mobile_lcdcfb.c with 100% similarity]
drivers/video/fbdev/sh_mobile_lcdcfb.h [moved from drivers/video/sh_mobile_lcdcfb.h with 100% similarity]
drivers/video/fbdev/sh_mobile_meram.c [moved from drivers/video/sh_mobile_meram.c with 100% similarity]
drivers/video/fbdev/simplefb.c [moved from drivers/video/simplefb.c with 100% similarity]
drivers/video/fbdev/sis/300vtbl.h [moved from drivers/video/sis/300vtbl.h with 100% similarity]
drivers/video/fbdev/sis/310vtbl.h [moved from drivers/video/sis/310vtbl.h with 100% similarity]
drivers/video/fbdev/sis/Makefile [moved from drivers/video/sis/Makefile with 100% similarity]
drivers/video/fbdev/sis/init.c [moved from drivers/video/sis/init.c with 100% similarity]
drivers/video/fbdev/sis/init.h [moved from drivers/video/sis/init.h with 100% similarity]
drivers/video/fbdev/sis/init301.c [moved from drivers/video/sis/init301.c with 100% similarity]
drivers/video/fbdev/sis/init301.h [moved from drivers/video/sis/init301.h with 100% similarity]
drivers/video/fbdev/sis/initdef.h [moved from drivers/video/sis/initdef.h with 100% similarity]
drivers/video/fbdev/sis/initextlfb.c [moved from drivers/video/sis/initextlfb.c with 100% similarity]
drivers/video/fbdev/sis/oem300.h [moved from drivers/video/sis/oem300.h with 100% similarity]
drivers/video/fbdev/sis/oem310.h [moved from drivers/video/sis/oem310.h with 100% similarity]
drivers/video/fbdev/sis/sis.h [moved from drivers/video/sis/sis.h with 100% similarity]
drivers/video/fbdev/sis/sis_accel.c [moved from drivers/video/sis/sis_accel.c with 100% similarity]
drivers/video/fbdev/sis/sis_accel.h [moved from drivers/video/sis/sis_accel.h with 100% similarity]
drivers/video/fbdev/sis/sis_main.c [moved from drivers/video/sis/sis_main.c with 100% similarity]
drivers/video/fbdev/sis/sis_main.h [moved from drivers/video/sis/sis_main.h with 100% similarity]
drivers/video/fbdev/sis/vgatypes.h [moved from drivers/video/sis/vgatypes.h with 100% similarity]
drivers/video/fbdev/sis/vstruct.h [moved from drivers/video/sis/vstruct.h with 100% similarity]
drivers/video/fbdev/skeletonfb.c [moved from drivers/video/skeletonfb.c with 100% similarity]
drivers/video/fbdev/sm501fb.c [moved from drivers/video/sm501fb.c with 100% similarity]
drivers/video/fbdev/smscufx.c [moved from drivers/video/smscufx.c with 100% similarity]
drivers/video/fbdev/ssd1307fb.c [moved from drivers/video/ssd1307fb.c with 100% similarity]
drivers/video/fbdev/sstfb.c [moved from drivers/video/sstfb.c with 100% similarity]
drivers/video/fbdev/sticore.h [moved from drivers/video/sticore.h with 100% similarity]
drivers/video/fbdev/stifb.c [moved from drivers/video/stifb.c with 100% similarity]
drivers/video/fbdev/sunxvr1000.c [moved from drivers/video/sunxvr1000.c with 100% similarity]
drivers/video/fbdev/sunxvr2500.c [moved from drivers/video/sunxvr2500.c with 100% similarity]
drivers/video/fbdev/sunxvr500.c [moved from drivers/video/sunxvr500.c with 100% similarity]
drivers/video/fbdev/tcx.c [moved from drivers/video/tcx.c with 100% similarity]
drivers/video/fbdev/tdfxfb.c [moved from drivers/video/tdfxfb.c with 100% similarity]
drivers/video/fbdev/tgafb.c [moved from drivers/video/tgafb.c with 100% similarity]
drivers/video/fbdev/tmiofb.c [moved from drivers/video/tmiofb.c with 100% similarity]
drivers/video/fbdev/tridentfb.c [moved from drivers/video/tridentfb.c with 100% similarity]
drivers/video/fbdev/udlfb.c [moved from drivers/video/udlfb.c with 100% similarity]
drivers/video/fbdev/uvesafb.c [moved from drivers/video/uvesafb.c with 100% similarity]
drivers/video/fbdev/valkyriefb.c [moved from drivers/video/valkyriefb.c with 100% similarity]
drivers/video/fbdev/valkyriefb.h [moved from drivers/video/valkyriefb.h with 100% similarity]
drivers/video/fbdev/vermilion/Makefile [moved from drivers/video/vermilion/Makefile with 100% similarity]
drivers/video/fbdev/vermilion/cr_pll.c [moved from drivers/video/vermilion/cr_pll.c with 100% similarity]
drivers/video/fbdev/vermilion/vermilion.c [moved from drivers/video/vermilion/vermilion.c with 100% similarity]
drivers/video/fbdev/vermilion/vermilion.h [moved from drivers/video/vermilion/vermilion.h with 100% similarity]
drivers/video/fbdev/vesafb.c [moved from drivers/video/vesafb.c with 100% similarity]
drivers/video/fbdev/vfb.c [moved from drivers/video/vfb.c with 100% similarity]
drivers/video/fbdev/vga16fb.c [moved from drivers/video/vga16fb.c with 100% similarity]
drivers/video/fbdev/via/Makefile [moved from drivers/video/via/Makefile with 100% similarity]
drivers/video/fbdev/via/accel.c [moved from drivers/video/via/accel.c with 100% similarity]
drivers/video/fbdev/via/accel.h [moved from drivers/video/via/accel.h with 100% similarity]
drivers/video/fbdev/via/chip.h [moved from drivers/video/via/chip.h with 100% similarity]
drivers/video/fbdev/via/debug.h [moved from drivers/video/via/debug.h with 100% similarity]
drivers/video/fbdev/via/dvi.c [moved from drivers/video/via/dvi.c with 100% similarity]
drivers/video/fbdev/via/dvi.h [moved from drivers/video/via/dvi.h with 100% similarity]
drivers/video/fbdev/via/global.c [moved from drivers/video/via/global.c with 100% similarity]
drivers/video/fbdev/via/global.h [moved from drivers/video/via/global.h with 100% similarity]
drivers/video/fbdev/via/hw.c [moved from drivers/video/via/hw.c with 100% similarity]
drivers/video/fbdev/via/hw.h [moved from drivers/video/via/hw.h with 100% similarity]
drivers/video/fbdev/via/ioctl.c [moved from drivers/video/via/ioctl.c with 100% similarity]
drivers/video/fbdev/via/ioctl.h [moved from drivers/video/via/ioctl.h with 100% similarity]
drivers/video/fbdev/via/lcd.c [moved from drivers/video/via/lcd.c with 100% similarity]
drivers/video/fbdev/via/lcd.h [moved from drivers/video/via/lcd.h with 100% similarity]
drivers/video/fbdev/via/share.h [moved from drivers/video/via/share.h with 100% similarity]
drivers/video/fbdev/via/tblDPASetting.c [moved from drivers/video/via/tblDPASetting.c with 100% similarity]
drivers/video/fbdev/via/tblDPASetting.h [moved from drivers/video/via/tblDPASetting.h with 100% similarity]
drivers/video/fbdev/via/via-core.c [moved from drivers/video/via/via-core.c with 100% similarity]
drivers/video/fbdev/via/via-gpio.c [moved from drivers/video/via/via-gpio.c with 100% similarity]
drivers/video/fbdev/via/via_aux.c [moved from drivers/video/via/via_aux.c with 100% similarity]
drivers/video/fbdev/via/via_aux.h [moved from drivers/video/via/via_aux.h with 100% similarity]
drivers/video/fbdev/via/via_aux_ch7301.c [moved from drivers/video/via/via_aux_ch7301.c with 100% similarity]
drivers/video/fbdev/via/via_aux_edid.c [moved from drivers/video/via/via_aux_edid.c with 100% similarity]
drivers/video/fbdev/via/via_aux_sii164.c [moved from drivers/video/via/via_aux_sii164.c with 100% similarity]
drivers/video/fbdev/via/via_aux_vt1621.c [moved from drivers/video/via/via_aux_vt1621.c with 100% similarity]
drivers/video/fbdev/via/via_aux_vt1622.c [moved from drivers/video/via/via_aux_vt1622.c with 100% similarity]
drivers/video/fbdev/via/via_aux_vt1625.c [moved from drivers/video/via/via_aux_vt1625.c with 100% similarity]
drivers/video/fbdev/via/via_aux_vt1631.c [moved from drivers/video/via/via_aux_vt1631.c with 100% similarity]
drivers/video/fbdev/via/via_aux_vt1632.c [moved from drivers/video/via/via_aux_vt1632.c with 100% similarity]
drivers/video/fbdev/via/via_aux_vt1636.c [moved from drivers/video/via/via_aux_vt1636.c with 100% similarity]
drivers/video/fbdev/via/via_clock.c [moved from drivers/video/via/via_clock.c with 100% similarity]
drivers/video/fbdev/via/via_clock.h [moved from drivers/video/via/via_clock.h with 100% similarity]
drivers/video/fbdev/via/via_i2c.c [moved from drivers/video/via/via_i2c.c with 100% similarity]
drivers/video/fbdev/via/via_modesetting.c [moved from drivers/video/via/via_modesetting.c with 100% similarity]
drivers/video/fbdev/via/via_modesetting.h [moved from drivers/video/via/via_modesetting.h with 100% similarity]
drivers/video/fbdev/via/via_utility.c [moved from drivers/video/via/via_utility.c with 100% similarity]
drivers/video/fbdev/via/via_utility.h [moved from drivers/video/via/via_utility.h with 100% similarity]
drivers/video/fbdev/via/viafbdev.c [moved from drivers/video/via/viafbdev.c with 100% similarity]
drivers/video/fbdev/via/viafbdev.h [moved from drivers/video/via/viafbdev.h with 100% similarity]
drivers/video/fbdev/via/viamode.c [moved from drivers/video/via/viamode.c with 100% similarity]
drivers/video/fbdev/via/viamode.h [moved from drivers/video/via/viamode.h with 100% similarity]
drivers/video/fbdev/via/vt1636.c [moved from drivers/video/via/vt1636.c with 100% similarity]
drivers/video/fbdev/via/vt1636.h [moved from drivers/video/via/vt1636.h with 100% similarity]
drivers/video/fbdev/vt8500lcdfb.c [moved from drivers/video/vt8500lcdfb.c with 100% similarity]
drivers/video/fbdev/vt8500lcdfb.h [moved from drivers/video/vt8500lcdfb.h with 100% similarity]
drivers/video/fbdev/vt8623fb.c [moved from drivers/video/vt8623fb.c with 100% similarity]
drivers/video/fbdev/w100fb.c [moved from drivers/video/w100fb.c with 100% similarity]
drivers/video/fbdev/w100fb.h [moved from drivers/video/w100fb.h with 100% similarity]
drivers/video/fbdev/wm8505fb.c [moved from drivers/video/wm8505fb.c with 100% similarity]
drivers/video/fbdev/wm8505fb_regs.h [moved from drivers/video/wm8505fb_regs.h with 100% similarity]
drivers/video/fbdev/wmt_ge_rops.c [moved from drivers/video/wmt_ge_rops.c with 99% similarity]
drivers/video/fbdev/wmt_ge_rops.h [moved from drivers/video/wmt_ge_rops.h with 100% similarity]
drivers/video/fbdev/xen-fbfront.c [moved from drivers/video/xen-fbfront.c with 100% similarity]
drivers/video/fbdev/xilinxfb.c [moved from drivers/video/xilinxfb.c with 100% similarity]
drivers/video/omap2/Kconfig [deleted file]
drivers/xen/manage.c
drivers/xen/xen-pciback/pciback_ops.c
drivers/xen/xen-pciback/vpci.c
drivers/xen/xenbus/xenbus_xs.c
fs/xfs/xfs_aops.c
fs/xfs/xfs_bmap.c
fs/xfs/xfs_bmap_util.c
fs/xfs/xfs_buf.c
fs/xfs/xfs_file.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.h
fs/xfs/xfs_iops.c
fs/xfs/xfs_log.c
fs/xfs/xfs_trace.h
include/linux/filter.h
include/linux/ipmi.h
include/linux/ipmi_smi.h
include/linux/netfilter/nf_conntrack_proto_gre.h
include/linux/of.h
include/linux/reboot.h
include/net/dst.h
include/net/inet6_connection_sock.h
include/net/inet_connection_sock.h
include/net/ip.h
include/net/ip6_route.h
include/net/ip_tunnels.h
include/net/ipv6.h
include/net/netfilter/nf_tables_core.h
include/net/sctp/structs.h
include/net/xfrm.h
kernel/locking/mutex-debug.c
kernel/seccomp.c
kernel/time/tick-common.c
kernel/time/tick-sched.c
kernel/trace/trace_functions.c
kernel/trace/trace_uprobe.c
kernel/user_namespace.c
net/core/dev.c
net/core/dst.c
net/core/filter.c
net/dccp/output.c
net/decnet/dn_route.c
net/ipv4/ip_output.c
net/ipv4/ip_tunnel.c
net/ipv4/ip_tunnel_core.c
net/ipv4/ping.c
net/ipv4/route.c
net/ipv4/tcp_output.c
net/ipv4/xfrm4_output.c
net/ipv6/inet6_connection_sock.c
net/ipv6/ip6_gre.c
net/ipv6/ip6_output.c
net/ipv6/route.c
net/ipv6/sit.c
net/ipv6/xfrm6_output.c
net/l2tp/l2tp_core.c
net/l2tp/l2tp_ip.c
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_pptp.c
net/netfilter/nf_conntrack_proto_gre.c
net/netfilter/nf_tables_core.c
net/netfilter/nft_cmp.c
net/openvswitch/vport-gre.c
net/sctp/associola.c
net/sctp/protocol.c
net/sctp/sm_statefuns.c
net/sctp/socket.c
net/sctp/ulpevent.c
net/xfrm/xfrm_policy.c
tools/lib/lockdep/Makefile
tools/lib/lockdep/uinclude/linux/lockdep.h
tools/lib/traceevent/event-parse.c
tools/perf/Documentation/perf-bench.txt
tools/perf/Documentation/perf-top.txt
tools/perf/Makefile.perf
tools/perf/bench/numa.c
tools/perf/builtin-stat.c
tools/perf/config/Makefile
tools/perf/tests/code-reading.c
tools/perf/util/probe-finder.c
virt/kvm/ioapic.c

index f517008..cc63f30 100644 (file)
@@ -276,7 +276,7 @@ X!Isound/sound_firmware.c
      </para>
 
      <sect1><title>Frame Buffer Memory</title>
-!Edrivers/video/fbmem.c
+!Edrivers/video/fbdev/core/fbmem.c
      </sect1>
 <!--
      <sect1><title>Frame Buffer Console</title>
@@ -284,7 +284,7 @@ X!Edrivers/video/console/fbcon.c
      </sect1>
 -->
      <sect1><title>Frame Buffer Colormap</title>
-!Edrivers/video/fbcmap.c
+!Edrivers/video/fbdev/core/fbcmap.c
      </sect1>
 <!-- FIXME:
   drivers/video/fbgen.c has no docs, which stuffs up the sgml.  Comment
@@ -294,11 +294,11 @@ X!Idrivers/video/fbgen.c
      </sect1>
 KAO -->
      <sect1><title>Frame Buffer Video Mode Database</title>
-!Idrivers/video/modedb.c
-!Edrivers/video/modedb.c
+!Idrivers/video/fbdev/core/modedb.c
+!Edrivers/video/fbdev/core/modedb.c
      </sect1>
      <sect1><title>Frame Buffer Macintosh Video Mode Database</title>
-!Edrivers/video/macmodes.c
+!Edrivers/video/fbdev/macmodes.c
      </sect1>
      <sect1><title>Frame Buffer Fonts</title>
         <para>
diff --git a/Documentation/devicetree/bindings/arm/marvell,kirkwood.txt b/Documentation/devicetree/bindings/arm/marvell,kirkwood.txt
new file mode 100644 (file)
index 0000000..925ecbf
--- /dev/null
@@ -0,0 +1,97 @@
+Marvell Kirkwood SoC Family Device Tree Bindings
+------------------------------------------------
+
+Boards with a SoC of the Marvell Kirkwook family, eg 88f6281
+
+* Required root node properties:
+compatible: must contain "marvell,kirkwood"
+
+In addition, the above compatible shall be extended with the specific
+SoC. Currently known SoC compatibles are:
+
+"marvell,kirkwood-88f6192"
+"marvell,kirkwood-88f6281"
+"marvell,kirkwood-88f6282"
+"marvell,kirkwood-88f6283"
+"marvell,kirkwood-88f6702"
+"marvell,kirkwood-98DX4122"
+
+And in addition, the compatible shall be extended with the specific
+board. Currently known boards are:
+
+"buffalo,lschlv2"
+"buffalo,lsxhl"
+"buffalo,lsxl"
+"dlink,dns-320"
+"dlink,dns-320-a1"
+"dlink,dns-325"
+"dlink,dns-325-a1"
+"dlink,dns-kirkwood"
+"excito,b3"
+"globalscale,dreamplug-003-ds2001"
+"globalscale,guruplug"
+"globalscale,guruplug-server-plus"
+"globalscale,sheevaplug"
+"globalscale,sheevaplug"
+"globalscale,sheevaplug-esata"
+"globalscale,sheevaplug-esata-rev13"
+"iom,iconnect"
+"iom,iconnect-1.1"
+"iom,ix2-200"
+"keymile,km_kirkwood"
+"lacie,cloudbox"
+"lacie,inetspace_v2"
+"lacie,laplug"
+"lacie,netspace_lite_v2"
+"lacie,netspace_max_v2"
+"lacie,netspace_mini_v2"
+"lacie,netspace_v2"
+"marvell,db-88f6281-bp"
+"marvell,db-88f6282-bp"
+"marvell,mv88f6281gtw-ge"
+"marvell,rd88f6281"
+"marvell,rd88f6281"
+"marvell,rd88f6281-a0"
+"marvell,rd88f6281-a1"
+"mpl,cec4"
+"mpl,cec4-10"
+"netgear,readynas"
+"netgear,readynas"
+"netgear,readynas-duo-v2"
+"netgear,readynas-nv+-v2"
+"plathome,openblocks-a6"
+"plathome,openblocks-a7"
+"raidsonic,ib-nas6210"
+"raidsonic,ib-nas6210-b"
+"raidsonic,ib-nas6220"
+"raidsonic,ib-nas6220-b"
+"raidsonic,ib-nas62x0"
+"seagate,dockstar"
+"seagate,goflexnet"
+"synology,ds109"
+"synology,ds110jv10"
+"synology,ds110jv20"
+"synology,ds110jv30"
+"synology,ds111"
+"synology,ds209"
+"synology,ds210jv10"
+"synology,ds210jv20"
+"synology,ds212"
+"synology,ds212jv10"
+"synology,ds212jv20"
+"synology,ds212pv10"
+"synology,ds409"
+"synology,ds409slim"
+"synology,ds410j"
+"synology,ds411"
+"synology,ds411j"
+"synology,ds411slim"
+"synology,ds413jv10"
+"synology,rs212"
+"synology,rs409"
+"synology,rs411"
+"synology,rs812"
+"usi,topkick"
+"usi,topkick-1281P2"
+"zyxel,nsa310"
+"zyxel,nsa310a"
index 71724d0..bef86e5 100644 (file)
@@ -13,8 +13,22 @@ ad,ad7414            SMBus/I2C Digital Temperature Sensor in 6-Pin SOT with SMBus Alert an
 ad,adm9240             ADM9240:  Complete System Hardware Monitor for uProcessor-Based Systems
 adi,adt7461            +/-1C TDM Extended Temp Range I.C
 adt7461                        +/-1C TDM Extended Temp Range I.C
+adi,adt7473            +/-1C TDM Extended Temp Range I.C
+adi,adt7475            +/-1C TDM Extended Temp Range I.C
+adi,adt7476            +/-1C TDM Extended Temp Range I.C
+adi,adt7490            +/-1C TDM Extended Temp Range I.C
 at,24c08               i2c serial eeprom  (24cxx)
+atmel,24c00            i2c serial eeprom  (24cxx)
+atmel,24c01            i2c serial eeprom  (24cxx)
 atmel,24c02            i2c serial eeprom  (24cxx)
+atmel,24c04            i2c serial eeprom  (24cxx)
+atmel,24c16            i2c serial eeprom  (24cxx)
+atmel,24c32            i2c serial eeprom  (24cxx)
+atmel,24c64            i2c serial eeprom  (24cxx)
+atmel,24c128           i2c serial eeprom  (24cxx)
+atmel,24c256           i2c serial eeprom  (24cxx)
+atmel,24c512           i2c serial eeprom  (24cxx)
+atmel,24c1024          i2c serial eeprom  (24cxx)
 atmel,at97sc3204t      i2c trusted platform module (TPM)
 capella,cm32181                CM32181: Ambient Light Sensor
 catalyst,24c32         i2c serial eeprom
@@ -46,8 +60,10 @@ maxim,ds1050         5 Bit Programmable, Pulse-Width Modulator
 maxim,max1237          Low-Power, 4-/12-Channel, 2-Wire Serial, 12-Bit ADCs
 maxim,max6625          9-Bit/12-Bit Temperature Sensors with I²C-Compatible Serial Interface
 mc,rv3029c2            Real Time Clock Module with I2C-Bus
+national,lm63          Temperature sensor with integrated fan control
 national,lm75          I2C TEMP SENSOR
 national,lm80          Serial Interface ACPI-Compatible Microprocessor System Hardware Monitor
+national,lm85          Temperature sensor with integrated fan control
 national,lm92          Â±0.33°C Accurate, 12-Bit + Sign Temperature Sensor and Thermal Window Comparator with Two-Wire Interface
 nuvoton,npct501                i2c trusted platform module (TPM)
 nxp,pca9556            Octal SMBus and I2C registered interface
index c119deb..67a5db9 100644 (file)
@@ -119,7 +119,7 @@ Optional Properties (for HDMI pins):
 Example:
 // pin controller node
 pinctrl@35004800 {
-       compatible = "brcmbcm11351-pinctrl";
+       compatible = "brcm,bcm11351-pinctrl";
        reg = <0x35004800 0x430>;
 
        // pin configuration node
index 0f01c9b..abc3080 100644 (file)
@@ -22,6 +22,7 @@ auo   AU Optronics Corporation
 avago  Avago Technologies
 bosch  Bosch Sensortec GmbH
 brcm   Broadcom Corporation
+buffalo        Buffalo, Inc.
 calxeda        Calxeda
 capella        Capella Microsystems, Inc
 cavium Cavium, Inc.
@@ -33,15 +34,18 @@ cortina     Cortina Systems, Inc.
 crystalfontz   Crystalfontz America, Inc.
 dallas Maxim Integrated Products (formerly Dallas Semiconductor)
 davicom        DAVICOM Semiconductor, Inc.
-dlink  D-Link Systems, Inc.
 denx   Denx Software Engineering
+digi   Digi International Inc.
+dlink  D-Link Corporation
 dmo    Data Modul AG
+ebv    EBV Elektronik
 edt    Emerging Display Technologies
 emmicro        EM Microelectronic
 epfl   Ecole Polytechnique Fédérale de Lausanne
 epson  Seiko Epson Corp.
 est    ESTeem Wireless Modems
 eukrea  Eukréa Electromatique
+excito Excito
 fsl    Freescale Semiconductor
 GEFanuc        GE Fanuc Intelligent Platforms Embedded Systems, Inc.
 gef    GE Fanuc Intelligent Platforms Embedded Systems, Inc.
@@ -53,13 +57,17 @@ haoyu       Haoyu Microelectronic Co. Ltd.
 hisilicon      Hisilicon Limited.
 honeywell      Honeywell
 hp     Hewlett Packard
+i2se   I2SE GmbH
 ibm    International Business Machines (IBM)
 idt    Integrated Device Technologies, Inc.
+iom    Iomega Corporation
 img    Imagination Technologies Ltd.
 intel  Intel Corporation
 intercontrol   Inter Control Group
+isee   ISEE 2007 S.L.
 isl    Intersil
 karo   Ka-Ro electronics GmbH
+keymile        Keymile GmbH
 lacie  LaCie
 lantiq Lantiq Semiconductor
 lg     LG Corporation
@@ -70,9 +78,12 @@ maxim        Maxim Integrated Products
 microchip      Microchip Technology Inc.
 mosaixtech     Mosaix Technologies, Inc.
 moxa   Moxa
+mpl    MPL AG
+mxicy  Macronix International Co., Ltd.
 national       National Semiconductor
 neonode                Neonode Inc.
 netgear        NETGEAR
+newhaven       Newhaven Display International
 nintendo       Nintendo
 nokia  Nokia
 nvidia NVIDIA
@@ -82,10 +93,12 @@ opencores   OpenCores.org
 panasonic      Panasonic Corporation
 phytec PHYTEC Messtechnik GmbH
 picochip       Picochip Ltd
+plathome       Plat'Home Co., Ltd.
 powervr        PowerVR (deprecated, use img)
 qca    Qualcomm Atheros, Inc.
 qcom   Qualcomm Technologies, Inc
 qnap   QNAP Systems, Inc.
+raidsonic      RaidSonic Technology GmbH
 ralink Mediatek/Ralink Technology Corp.
 ramtron        Ramtron International
 realtek Realtek Semiconductor Corp.
@@ -95,6 +108,7 @@ rockchip     Fuzhou Rockchip Electronics Co., Ltd
 samsung        Samsung Semiconductor
 sbs    Smart Battery System
 schindler      Schindler
+seagate        Seagate Technology PLC
 sil    Silicon Image
 silabs Silicon Laboratories
 simtek
@@ -111,6 +125,7 @@ ti  Texas Instruments
 tlm    Trusted Logic Mobility
 toshiba        Toshiba Corporation
 toumaz Toumaz
+usi    Universal Scientifc Industrial Co., Ltd.
 v3     V3 Semiconductor
 via    VIA Technologies, Inc.
 voipac Voipac Technologies s.r.o.
@@ -119,3 +134,4 @@ wlf Wolfson Microelectronics
 wm     Wondermedia Technologies, Inc.
 xes    Extreme Engineering Solutions (X-ES)
 xlnx   Xilinx
+zyxel  ZyXEL Communications Corp.
index 6dc67b1..80399ff 100644 (file)
@@ -6782,7 +6782,7 @@ PERFORMANCE EVENTS SUBSYSTEM
 M:     Peter Zijlstra <a.p.zijlstra@chello.nl>
 M:     Paul Mackerras <paulus@samba.org>
 M:     Ingo Molnar <mingo@redhat.com>
-M:     Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
+M:     Arnaldo Carvalho de Melo <acme@kernel.org>
 L:     linux-kernel@vger.kernel.org
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core
 S:     Supported
index 0100464..3df3f3a 100644 (file)
@@ -132,7 +132,7 @@ CONFIG_CRC_ITU_T=y
 CONFIG_CRC7=y
 CONFIG_XZ_DEC=y
 CONFIG_AVERAGE=y
-CONFIG_PINCTRL_CAPRI=y
+CONFIG_PINCTRL_BCM281XX=y
 CONFIG_WATCHDOG=y
 CONFIG_BCM_KONA_WDT=y
 CONFIG_BCM_KONA_WDT_DEBUG=y
index e6f80fc..a4acdda 100644 (file)
@@ -259,7 +259,7 @@ start_ap:
         * Switch into virtual mode:
         */
        movl r16=(IA64_PSR_IT|IA64_PSR_IC|IA64_PSR_DT|IA64_PSR_RT|IA64_PSR_DFH|IA64_PSR_BN \
-                 |IA64_PSR_DI|IA64_PSR_AC)
+                 |IA64_PSR_DI)
        ;;
        mov cr.ipsr=r16
        movl r17=1f
index 689ffca..18e794a 100644 (file)
@@ -58,7 +58,7 @@
 #include <asm/unistd.h>
 #include <asm/errno.h>
 
-#if 1
+#if 0
 # define PSR_DEFAULT_BITS      psr.ac
 #else
 # define PSR_DEFAULT_BITS      0
index 2401848..397e34a 100644 (file)
@@ -64,7 +64,7 @@
 #include "kvm_minstate.h"
 #include "vti.h"
 
-#if 1
+#if 0
 # define PSR_DEFAULT_BITS   psr.ac
 #else
 # define PSR_DEFAULT_BITS   0
index 628ddc2..afe1300 100644 (file)
@@ -1,8 +1,7 @@
 #ifndef _ASMPARISC_SHMPARAM_H
 #define _ASMPARISC_SHMPARAM_H
 
-#define __ARCH_FORCE_SHMLBA    1
-
-#define SHMLBA 0x00400000   /* attach addr needs to be 4 Mb aligned */
+#define SHMLBA    PAGE_SIZE    /* attach addr a multiple of this */
+#define SHM_COLOUR 0x00400000  /* shared mappings colouring */
 
 #endif /* _ASMPARISC_SHMPARAM_H */
index a6ffc77..f6448c7 100644 (file)
@@ -323,7 +323,8 @@ void flush_dcache_page(struct page *page)
                 * specifically accesses it, of course) */
 
                flush_tlb_page(mpnt, addr);
-               if (old_addr == 0 || (old_addr & (SHMLBA - 1)) != (addr & (SHMLBA - 1))) {
+               if (old_addr == 0 || (old_addr & (SHM_COLOUR - 1))
+                                     != (addr & (SHM_COLOUR - 1))) {
                        __flush_cache_page(mpnt, addr, page_to_phys(page));
                        if (old_addr)
                                printk(KERN_ERR "INEQUIVALENT ALIASES 0x%lx and 0x%lx in file %s\n", old_addr, addr, mpnt->vm_file ? (char *)mpnt->vm_file->f_path.dentry->d_name.name : "(null)");
index b7cadc4..31ffa9b 100644 (file)
@@ -45,7 +45,7 @@
 
 static int get_offset(unsigned int last_mmap)
 {
-       return (last_mmap & (SHMLBA-1)) >> PAGE_SHIFT;
+       return (last_mmap & (SHM_COLOUR-1)) >> PAGE_SHIFT;
 }
 
 static unsigned long shared_align_offset(unsigned int last_mmap,
@@ -57,8 +57,8 @@ static unsigned long shared_align_offset(unsigned int last_mmap,
 static inline unsigned long COLOR_ALIGN(unsigned long addr,
                         unsigned int last_mmap, unsigned long pgoff)
 {
-       unsigned long base = (addr+SHMLBA-1) & ~(SHMLBA-1);
-       unsigned long off  = (SHMLBA-1) &
+       unsigned long base = (addr+SHM_COLOUR-1) & ~(SHM_COLOUR-1);
+       unsigned long off  = (SHM_COLOUR-1) &
                (shared_align_offset(last_mmap, pgoff) << PAGE_SHIFT);
 
        return base + off;
@@ -101,7 +101,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
        if (flags & MAP_FIXED) {
                if ((flags & MAP_SHARED) && last_mmap &&
                    (addr - shared_align_offset(last_mmap, pgoff))
-                               & (SHMLBA - 1))
+                               & (SHM_COLOUR - 1))
                        return -EINVAL;
                goto found_addr;
        }
@@ -122,7 +122,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
        info.length = len;
        info.low_limit = mm->mmap_legacy_base;
        info.high_limit = mmap_upper_limit();
-       info.align_mask = last_mmap ? (PAGE_MASK & (SHMLBA - 1)) : 0;
+       info.align_mask = last_mmap ? (PAGE_MASK & (SHM_COLOUR - 1)) : 0;
        info.align_offset = shared_align_offset(last_mmap, pgoff);
        addr = vm_unmapped_area(&info);
 
@@ -161,7 +161,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
        if (flags & MAP_FIXED) {
                if ((flags & MAP_SHARED) && last_mmap &&
                    (addr - shared_align_offset(last_mmap, pgoff))
-                       & (SHMLBA - 1))
+                       & (SHM_COLOUR - 1))
                        return -EINVAL;
                goto found_addr;
        }
@@ -182,7 +182,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
        info.length = len;
        info.low_limit = PAGE_SIZE;
        info.high_limit = mm->mmap_base;
-       info.align_mask = last_mmap ? (PAGE_MASK & (SHMLBA - 1)) : 0;
+       info.align_mask = last_mmap ? (PAGE_MASK & (SHM_COLOUR - 1)) : 0;
        info.align_offset = shared_align_offset(last_mmap, pgoff);
        addr = vm_unmapped_area(&info);
        if (!(addr & ~PAGE_MASK))
index 80e5dd2..83ead0e 100644 (file)
        ENTRY_COMP(vmsplice)
        ENTRY_COMP(move_pages)          /* 295 */
        ENTRY_SAME(getcpu)
-       ENTRY_SAME(epoll_pwait)
+       ENTRY_COMP(epoll_pwait)
        ENTRY_COMP(statfs64)
        ENTRY_COMP(fstatfs64)
        ENTRY_COMP(kexec_load)          /* 300 */
index 413dc17..b2b441b 100644 (file)
@@ -470,7 +470,7 @@ static unsigned long pa_memcpy(void *dstp, const void *srcp, unsigned long len)
                return 0;
 
        /* if a load or store fault occured we can get the faulty addr */
-       d = &__get_cpu_var(exception_data);
+       d = this_cpu_ptr(&exception_data);
        fault_addr = d->fault_addr;
 
        /* error in load or store? */
index 9d08c71..7475507 100644 (file)
@@ -151,7 +151,7 @@ int fixup_exception(struct pt_regs *regs)
        fix = search_exception_tables(regs->iaoq[0]);
        if (fix) {
                struct exception_data *d;
-               d = &__get_cpu_var(exception_data);
+               d = this_cpu_ptr(&exception_data);
                d->fault_ip = regs->iaoq[0];
                d->fault_space = regs->isr;
                d->fault_addr = regs->ior;
index d091aa1..bf9c823 100644 (file)
 #define SIGP_STATUS_INCORRECT_STATE    0x00000200UL
 #define SIGP_STATUS_NOT_RUNNING                0x00000400UL
 
+#ifndef __ASSEMBLY__
+
+static inline int __pcpu_sigp(u16 addr, u8 order, u32 parm, u32 *status)
+{
+       register unsigned int reg1 asm ("1") = parm;
+       int cc;
+
+       asm volatile(
+               "       sigp    %1,%2,0(%3)\n"
+               "       ipm     %0\n"
+               "       srl     %0,28\n"
+               : "=d" (cc), "+d" (reg1) : "d" (addr), "a" (order) : "cc");
+       if (status && cc == 1)
+               *status = reg1;
+       return cc;
+}
+
+#endif /* __ASSEMBLY__ */
+
 #endif /* __S390_ASM_SIGP_H */
index 1607793..21703f8 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef __ASM_SMP_H
 #define __ASM_SMP_H
 
+#include <asm/sigp.h>
+
 #ifdef CONFIG_SMP
 
 #include <asm/lowcore.h>
@@ -50,9 +52,18 @@ static inline int smp_store_status(int cpu) { return 0; }
 static inline int smp_vcpu_scheduled(int cpu) { return 1; }
 static inline void smp_yield_cpu(int cpu) { }
 static inline void smp_yield(void) { }
-static inline void smp_stop_cpu(void) { }
 static inline void smp_fill_possible_mask(void) { }
 
+static inline void smp_stop_cpu(void)
+{
+       u16 pcpu = stap();
+
+       for (;;) {
+               __pcpu_sigp(pcpu, SIGP_STOP, 0, NULL);
+               cpu_relax();
+       }
+}
+
 #endif /* CONFIG_SMP */
 
 #ifdef CONFIG_HOTPLUG_CPU
index 5eb5c9d..3802d2d 100644 (file)
 #define __NR_finit_module      344
 #define __NR_sched_setattr     345
 #define __NR_sched_getattr     346
-#define NR_syscalls 345
+#define __NR_renameat2         347
+#define NR_syscalls 348
 
 /* 
  * There are some system calls that are not present on 64 bit, some
index 824c39d..45cdb37 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Compat sytem call wrappers.
+ *  Compat system call wrappers.
  *
  *    Copyright IBM Corp. 2014
  */
@@ -213,3 +213,4 @@ COMPAT_SYSCALL_WRAP5(kcmp, pid_t, pid1, pid_t, pid2, int, type, unsigned long, i
 COMPAT_SYSCALL_WRAP3(finit_module, int, fd, const char __user *, uargs, int, flags);
 COMPAT_SYSCALL_WRAP3(sched_setattr, pid_t, pid, struct sched_attr __user *, attr, unsigned int, flags);
 COMPAT_SYSCALL_WRAP4(sched_getattr, pid_t, pid, struct sched_attr __user *, attr, unsigned int, size, unsigned int, flags);
+COMPAT_SYSCALL_WRAP5(renameat2, int, olddfd, const char __user *, oldname, int, newdfd, const char __user *, newname, unsigned int, flags);
index e6af940..acb4124 100644 (file)
@@ -144,10 +144,10 @@ void show_registers(struct pt_regs *regs)
        char *mode;
 
        mode = user_mode(regs) ? "User" : "Krnl";
-       printk("%s PSW : %p %p (%pSR)\n",
-              mode, (void *) regs->psw.mask,
-              (void *) regs->psw.addr,
-              (void *) regs->psw.addr);
+       printk("%s PSW : %p %p", mode, (void *)regs->psw.mask, (void *)regs->psw.addr);
+       if (!user_mode(regs))
+               printk(" (%pSR)", (void *)regs->psw.addr);
+       printk("\n");
        printk("           R:%x T:%x IO:%x EX:%x Key:%x M:%x W:%x "
               "P:%x AS:%x CC:%x PM:%x", mask_bits(regs, PSW_MASK_PER),
               mask_bits(regs, PSW_MASK_DAT), mask_bits(regs, PSW_MASK_IO),
index 4ac8faf..1c82619 100644 (file)
@@ -64,7 +64,7 @@ void update_cr_regs(struct task_struct *task)
                if (task->thread.per_flags & PER_FLAG_NO_TE)
                        cr_new &= ~(1UL << 55);
                if (cr_new != cr)
-                       __ctl_load(cr, 0, 0);
+                       __ctl_load(cr_new, 0, 0);
                /* Set or clear transaction execution TDC bits 62 and 63. */
                __ctl_store(cr, 2, 2);
                cr_new = cr & ~3UL;
index f70f248..88d1ca8 100644 (file)
@@ -1027,3 +1027,35 @@ void __init setup_arch(char **cmdline_p)
        /* Setup zfcpdump support */
        setup_zfcpdump();
 }
+
+#ifdef CONFIG_32BIT
+static int no_removal_warning __initdata;
+
+static int __init parse_no_removal_warning(char *str)
+{
+       no_removal_warning = 1;
+       return 0;
+}
+__setup("no_removal_warning", parse_no_removal_warning);
+
+static int __init removal_warning(void)
+{
+       if (no_removal_warning)
+               return 0;
+       printk(KERN_ALERT "\n\n");
+       printk(KERN_CONT "Warning - you are using a 31 bit kernel!\n\n");
+       printk(KERN_CONT "We plan to remove 31 bit kernel support from the kernel sources in March 2015.\n");
+       printk(KERN_CONT "Currently we assume that nobody is using the 31 bit kernel on old 31 bit\n");
+       printk(KERN_CONT "hardware anymore. If you think that the code should not be removed and also\n");
+       printk(KERN_CONT "future versions of the Linux kernel should be able to run in 31 bit mode\n");
+       printk(KERN_CONT "please let us know. Please write to:\n");
+       printk(KERN_CONT "linux390@de.ibm.com (mail address) and/or\n");
+       printk(KERN_CONT "linux-s390@vger.kernel.org (mailing list).\n\n");
+       printk(KERN_CONT "Thank you!\n\n");
+       printk(KERN_CONT "If this kernel runs on a 64 bit machine you may consider using a 64 bit kernel.\n");
+       printk(KERN_CONT "This message can be disabled with the \"no_removal_warning\" kernel parameter.\n");
+       schedule_timeout_uninterruptible(300 * HZ);
+       return 0;
+}
+early_initcall(removal_warning);
+#endif
index 512ce1c..86e65ec 100644 (file)
@@ -82,21 +82,6 @@ DEFINE_MUTEX(smp_cpu_state_mutex);
 /*
  * Signal processor helper functions.
  */
-static inline int __pcpu_sigp(u16 addr, u8 order, u32 parm, u32 *status)
-{
-       register unsigned int reg1 asm ("1") = parm;
-       int cc;
-
-       asm volatile(
-               "       sigp    %1,%2,0(%3)\n"
-               "       ipm     %0\n"
-               "       srl     %0,28\n"
-               : "=d" (cc), "+d" (reg1) : "d" (addr), "a" (order) : "cc");
-       if (status && cc == 1)
-               *status = reg1;
-       return cc;
-}
-
 static inline int __pcpu_sigp_relax(u16 addr, u8 order, u32 parm, u32 *status)
 {
        int cc;
index 542ef48..fe5cdf2 100644 (file)
@@ -355,3 +355,4 @@ SYSCALL(sys_kcmp,sys_kcmp,compat_sys_kcmp)
 SYSCALL(sys_finit_module,sys_finit_module,compat_sys_finit_module)
 SYSCALL(sys_sched_setattr,sys_sched_setattr,compat_sys_sched_setattr) /* 345 */
 SYSCALL(sys_sched_getattr,sys_sched_getattr,compat_sys_sched_getattr)
+SYSCALL(sys_renameat2,sys_renameat2,compat_sys_renameat2)
index 23f866b..7416efe 100644 (file)
@@ -338,9 +338,6 @@ static inline unsigned long strnlen_user_srst(const char __user *src,
        register unsigned long reg0 asm("0") = 0;
        unsigned long tmp1, tmp2;
 
-       if (unlikely(!size))
-               return 0;
-       update_primary_asce(current);
        asm volatile(
                "   la    %2,0(%1)\n"
                "   la    %3,0(%0,%1)\n"
@@ -359,6 +356,8 @@ static inline unsigned long strnlen_user_srst(const char __user *src,
 
 unsigned long __strnlen_user(const char __user *src, unsigned long size)
 {
+       if (unlikely(!size))
+               return 0;
        update_primary_asce(current);
        return strnlen_user_srst(src, size);
 }
index 19f623f..2f51a99 100644 (file)
@@ -126,6 +126,133 @@ static inline int user_space_fault(struct pt_regs *regs)
        return 0;
 }
 
+static int bad_address(void *p)
+{
+       unsigned long dummy;
+
+       return probe_kernel_address((unsigned long *)p, dummy);
+}
+
+#ifdef CONFIG_64BIT
+static void dump_pagetable(unsigned long asce, unsigned long address)
+{
+       unsigned long *table = __va(asce & PAGE_MASK);
+
+       pr_alert("AS:%016lx ", asce);
+       switch (asce & _ASCE_TYPE_MASK) {
+       case _ASCE_TYPE_REGION1:
+               table = table + ((address >> 53) & 0x7ff);
+               if (bad_address(table))
+                       goto bad;
+               pr_cont("R1:%016lx ", *table);
+               if (*table & _REGION_ENTRY_INVALID)
+                       goto out;
+               table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
+               /* fallthrough */
+       case _ASCE_TYPE_REGION2:
+               table = table + ((address >> 42) & 0x7ff);
+               if (bad_address(table))
+                       goto bad;
+               pr_cont("R2:%016lx ", *table);
+               if (*table & _REGION_ENTRY_INVALID)
+                       goto out;
+               table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
+               /* fallthrough */
+       case _ASCE_TYPE_REGION3:
+               table = table + ((address >> 31) & 0x7ff);
+               if (bad_address(table))
+                       goto bad;
+               pr_cont("R3:%016lx ", *table);
+               if (*table & (_REGION_ENTRY_INVALID | _REGION3_ENTRY_LARGE))
+                       goto out;
+               table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
+               /* fallthrough */
+       case _ASCE_TYPE_SEGMENT:
+               table = table + ((address >> 20) & 0x7ff);
+               if (bad_address(table))
+                       goto bad;
+               pr_cont(KERN_CONT "S:%016lx ", *table);
+               if (*table & (_SEGMENT_ENTRY_INVALID | _SEGMENT_ENTRY_LARGE))
+                       goto out;
+               table = (unsigned long *)(*table & _SEGMENT_ENTRY_ORIGIN);
+       }
+       table = table + ((address >> 12) & 0xff);
+       if (bad_address(table))
+               goto bad;
+       pr_cont("P:%016lx ", *table);
+out:
+       pr_cont("\n");
+       return;
+bad:
+       pr_cont("BAD\n");
+}
+
+#else /* CONFIG_64BIT */
+
+static void dump_pagetable(unsigned long asce, unsigned long address)
+{
+       unsigned long *table = __va(asce & PAGE_MASK);
+
+       pr_alert("AS:%08lx ", asce);
+       table = table + ((address >> 20) & 0x7ff);
+       if (bad_address(table))
+               goto bad;
+       pr_cont("S:%08lx ", *table);
+       if (*table & _SEGMENT_ENTRY_INVALID)
+               goto out;
+       table = (unsigned long *)(*table & _SEGMENT_ENTRY_ORIGIN);
+       table = table + ((address >> 12) & 0xff);
+       if (bad_address(table))
+               goto bad;
+       pr_cont("P:%08lx ", *table);
+out:
+       pr_cont("\n");
+       return;
+bad:
+       pr_cont("BAD\n");
+}
+
+#endif /* CONFIG_64BIT */
+
+static void dump_fault_info(struct pt_regs *regs)
+{
+       unsigned long asce;
+
+       pr_alert("Fault in ");
+       switch (regs->int_parm_long & 3) {
+       case 3:
+               pr_cont("home space ");
+               break;
+       case 2:
+               pr_cont("secondary space ");
+               break;
+       case 1:
+               pr_cont("access register ");
+               break;
+       case 0:
+               pr_cont("primary space ");
+               break;
+       }
+       pr_cont("mode while using ");
+       if (!user_space_fault(regs)) {
+               asce = S390_lowcore.kernel_asce;
+               pr_cont("kernel ");
+       }
+#ifdef CONFIG_PGSTE
+       else if ((current->flags & PF_VCPU) && S390_lowcore.gmap) {
+               struct gmap *gmap = (struct gmap *)S390_lowcore.gmap;
+               asce = gmap->asce;
+               pr_cont("gmap ");
+       }
+#endif
+       else {
+               asce = S390_lowcore.user_asce;
+               pr_cont("user ");
+       }
+       pr_cont("ASCE.\n");
+       dump_pagetable(asce, regs->int_parm_long & __FAIL_ADDR_MASK);
+}
+
 static inline void report_user_fault(struct pt_regs *regs, long signr)
 {
        if ((task_pid_nr(current) > 1) && !show_unhandled_signals)
@@ -138,8 +265,9 @@ static inline void report_user_fault(struct pt_regs *regs, long signr)
               regs->int_code);
        print_vma_addr(KERN_CONT "in ", regs->psw.addr & PSW_ADDR_INSN);
        printk(KERN_CONT "\n");
-       printk(KERN_ALERT "failing address: %lX\n",
-              regs->int_parm_long & __FAIL_ADDR_MASK);
+       printk(KERN_ALERT "failing address: %016lx TEID: %016lx\n",
+              regs->int_parm_long & __FAIL_ADDR_MASK, regs->int_parm_long);
+       dump_fault_info(regs);
        show_regs(regs);
 }
 
@@ -177,11 +305,13 @@ static noinline void do_no_context(struct pt_regs *regs)
        address = regs->int_parm_long & __FAIL_ADDR_MASK;
        if (!user_space_fault(regs))
                printk(KERN_ALERT "Unable to handle kernel pointer dereference"
-                      " at virtual kernel address %p\n", (void *)address);
+                      " in virtual kernel address space\n");
        else
                printk(KERN_ALERT "Unable to handle kernel paging request"
-                      " at virtual user address %p\n", (void *)address);
-
+                      " in virtual user address space\n");
+       printk(KERN_ALERT "failing address: %016lx TEID: %016lx\n",
+              regs->int_parm_long & __FAIL_ADDR_MASK, regs->int_parm_long);
+       dump_fault_info(regs);
        die(regs, "Oops");
        do_exit(SIGKILL);
 }
index 602f57e..d1b7c37 100644 (file)
@@ -250,8 +250,8 @@ archclean:
 PHONY += kvmconfig
 kvmconfig:
        $(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target))
-       $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config arch/x86/configs/kvm_guest.config
-       $(Q)yes "" | $(MAKE) oldconfig
+       $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config $(srctree)/arch/x86/configs/kvm_guest.config
+       $(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
 
 define archhelp
   echo  '* bzImage      - Compressed kernel image (arch/x86/boot/bzImage)'
index fcaf9c9..7de069a 100644 (file)
@@ -60,7 +60,7 @@
                          | X86_CR4_PSE | X86_CR4_PAE | X86_CR4_MCE     \
                          | X86_CR4_PGE | X86_CR4_PCE | X86_CR4_OSFXSR | X86_CR4_PCIDE \
                          | X86_CR4_OSXSAVE | X86_CR4_SMEP | X86_CR4_FSGSBASE \
-                         | X86_CR4_OSXMMEXCPT | X86_CR4_VMXE))
+                         | X86_CR4_OSXMMEXCPT | X86_CR4_VMXE | X86_CR4_SMAP))
 
 #define CR8_RESERVED_BITS (~(unsigned long)X86_CR8_TPR)
 
index 059218e..4b9a9e9 100644 (file)
@@ -59,7 +59,7 @@
 #define INTEL_RAPL_PKG         0x2     /* pseudo-encoding */
 #define RAPL_IDX_RAM_NRG_STAT  2       /* DRAM */
 #define INTEL_RAPL_RAM         0x3     /* pseudo-encoding */
-#define RAPL_IDX_PP1_NRG_STAT  3       /* DRAM */
+#define RAPL_IDX_PP1_NRG_STAT  3       /* gpu */
 #define INTEL_RAPL_PP1         0x4     /* pseudo-encoding */
 
 /* Clients have PP0, PKG */
                         1<<RAPL_IDX_PKG_NRG_STAT|\
                         1<<RAPL_IDX_RAM_NRG_STAT)
 
+/* Servers have PP0, PKG, RAM, PP1 */
+#define RAPL_IDX_HSW   (1<<RAPL_IDX_PP0_NRG_STAT|\
+                        1<<RAPL_IDX_PKG_NRG_STAT|\
+                        1<<RAPL_IDX_RAM_NRG_STAT|\
+                        1<<RAPL_IDX_PP1_NRG_STAT)
+
 /*
  * event code: LSB 8 bits, passed in attr->config
  * any other bit is reserved
@@ -425,6 +431,24 @@ static struct attribute *rapl_events_cln_attr[] = {
        NULL,
 };
 
+static struct attribute *rapl_events_hsw_attr[] = {
+       EVENT_PTR(rapl_cores),
+       EVENT_PTR(rapl_pkg),
+       EVENT_PTR(rapl_gpu),
+       EVENT_PTR(rapl_ram),
+
+       EVENT_PTR(rapl_cores_unit),
+       EVENT_PTR(rapl_pkg_unit),
+       EVENT_PTR(rapl_gpu_unit),
+       EVENT_PTR(rapl_ram_unit),
+
+       EVENT_PTR(rapl_cores_scale),
+       EVENT_PTR(rapl_pkg_scale),
+       EVENT_PTR(rapl_gpu_scale),
+       EVENT_PTR(rapl_ram_scale),
+       NULL,
+};
+
 static struct attribute_group rapl_pmu_events_group = {
        .name = "events",
        .attrs = NULL, /* patched at runtime */
@@ -631,11 +655,14 @@ static int __init rapl_pmu_init(void)
        switch (boot_cpu_data.x86_model) {
        case 42: /* Sandy Bridge */
        case 58: /* Ivy Bridge */
-       case 60: /* Haswell */
-       case 69: /* Haswell-Celeron */
                rapl_cntr_mask = RAPL_IDX_CLN;
                rapl_pmu_events_group.attrs = rapl_events_cln_attr;
                break;
+       case 60: /* Haswell */
+       case 69: /* Haswell-Celeron */
+               rapl_cntr_mask = RAPL_IDX_HSW;
+               rapl_pmu_events_group.attrs = rapl_events_hsw_attr;
+               break;
        case 45: /* Sandy Bridge-EP */
        case 62: /* IvyTown */
                rapl_cntr_mask = RAPL_IDX_SRV;
index b0cc380..6e2537c 100644 (file)
@@ -240,7 +240,7 @@ static u32 __init intel_stolen_base(int num, int slot, int func, size_t stolen_s
        return base;
 }
 
-#define KB(x)  ((x) * 1024)
+#define KB(x)  ((x) * 1024UL)
 #define MB(x)  (KB (KB (x)))
 #define GB(x)  (MB (KB (x)))
 
index 654b465..3399d3a 100644 (file)
@@ -114,8 +114,8 @@ EXPORT_SYMBOL(machine_real_restart);
  */
 static int __init set_pci_reboot(const struct dmi_system_id *d)
 {
-       if (reboot_type != BOOT_CF9) {
-               reboot_type = BOOT_CF9;
+       if (reboot_type != BOOT_CF9_FORCE) {
+               reboot_type = BOOT_CF9_FORCE;
                pr_info("%s series board detected. Selecting %s-method for reboots.\n",
                        d->ident, "PCI");
        }
@@ -458,20 +458,23 @@ void __attribute__((weak)) mach_reboot_fixups(void)
 }
 
 /*
- * Windows compatible x86 hardware expects the following on reboot:
+ * To the best of our knowledge Windows compatible x86 hardware expects
+ * the following on reboot:
  *
  * 1) If the FADT has the ACPI reboot register flag set, try it
  * 2) If still alive, write to the keyboard controller
  * 3) If still alive, write to the ACPI reboot register again
  * 4) If still alive, write to the keyboard controller again
  * 5) If still alive, call the EFI runtime service to reboot
- * 6) If still alive, write to the PCI IO port 0xCF9 to reboot
- * 7) If still alive, inform BIOS to do a proper reboot
+ * 6) If no EFI runtime service, call the BIOS to do a reboot
  *
- * If the machine is still alive at this stage, it gives up. We default to
- * following the same pattern, except that if we're still alive after (7) we'll
- * try to force a triple fault and then cycle between hitting the keyboard
- * controller and doing that
+ * We default to following the same pattern. We also have
+ * two other reboot methods: 'triple fault' and 'PCI', which
+ * can be triggered via the reboot= kernel boot option or
+ * via quirks.
+ *
+ * This means that this function can never return, it can misbehave
+ * by not rebooting properly and hanging.
  */
 static void native_machine_emergency_restart(void)
 {
@@ -492,6 +495,11 @@ static void native_machine_emergency_restart(void)
        for (;;) {
                /* Could also try the reset bit in the Hammer NB */
                switch (reboot_type) {
+               case BOOT_ACPI:
+                       acpi_reboot();
+                       reboot_type = BOOT_KBD;
+                       break;
+
                case BOOT_KBD:
                        mach_reboot_fixups(); /* For board specific fixups */
 
@@ -509,43 +517,29 @@ static void native_machine_emergency_restart(void)
                        }
                        break;
 
-               case BOOT_TRIPLE:
-                       load_idt(&no_idt);
-                       __asm__ __volatile__("int3");
-
-                       /* We're probably dead after this, but... */
-                       reboot_type = BOOT_KBD;
-                       break;
-
-               case BOOT_BIOS:
-                       machine_real_restart(MRR_BIOS);
-
-                       /* We're probably dead after this, but... */
-                       reboot_type = BOOT_TRIPLE;
-                       break;
-
-               case BOOT_ACPI:
-                       acpi_reboot();
-                       reboot_type = BOOT_KBD;
-                       break;
-
                case BOOT_EFI:
                        if (efi_enabled(EFI_RUNTIME_SERVICES))
                                efi.reset_system(reboot_mode == REBOOT_WARM ?
                                                 EFI_RESET_WARM :
                                                 EFI_RESET_COLD,
                                                 EFI_SUCCESS, 0, NULL);
-                       reboot_type = BOOT_CF9_COND;
+                       reboot_type = BOOT_BIOS;
+                       break;
+
+               case BOOT_BIOS:
+                       machine_real_restart(MRR_BIOS);
+
+                       /* We're probably dead after this, but... */
+                       reboot_type = BOOT_CF9_SAFE;
                        break;
 
-               case BOOT_CF9:
+               case BOOT_CF9_FORCE:
                        port_cf9_safe = true;
                        /* Fall through */
 
-               case BOOT_CF9_COND:
+               case BOOT_CF9_SAFE:
                        if (port_cf9_safe) {
-                               u8 reboot_code = reboot_mode == REBOOT_WARM ?
-                                       0x06 : 0x0E;
+                               u8 reboot_code = reboot_mode == REBOOT_WARM ?  0x06 : 0x0E;
                                u8 cf9 = inb(0xcf9) & ~reboot_code;
                                outb(cf9|2, 0xcf9); /* Request hard reset */
                                udelay(50);
@@ -553,7 +547,15 @@ static void native_machine_emergency_restart(void)
                                outb(cf9|reboot_code, 0xcf9);
                                udelay(50);
                        }
-                       reboot_type = BOOT_BIOS;
+                       reboot_type = BOOT_TRIPLE;
+                       break;
+
+               case BOOT_TRIPLE:
+                       load_idt(&no_idt);
+                       __asm__ __volatile__("int3");
+
+                       /* We're probably dead after this, but... */
+                       reboot_type = BOOT_KBD;
                        break;
                }
        }
index bea6067..f47a104 100644 (file)
@@ -308,7 +308,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
        const u32 kvm_supported_word9_x86_features =
                F(FSGSBASE) | F(BMI1) | F(HLE) | F(AVX2) | F(SMEP) |
                F(BMI2) | F(ERMS) | f_invpcid | F(RTM) | f_mpx | F(RDSEED) |
-               F(ADX);
+               F(ADX) | F(SMAP);
 
        /* all calls to cpuid_count() should be made on the same cpu */
        get_cpu();
index a2a1bb7..eeecbed 100644 (file)
@@ -48,6 +48,14 @@ static inline bool guest_cpuid_has_smep(struct kvm_vcpu *vcpu)
        return best && (best->ebx & bit(X86_FEATURE_SMEP));
 }
 
+static inline bool guest_cpuid_has_smap(struct kvm_vcpu *vcpu)
+{
+       struct kvm_cpuid_entry2 *best;
+
+       best = kvm_find_cpuid_entry(vcpu, 7, 0);
+       return best && (best->ebx & bit(X86_FEATURE_SMAP));
+}
+
 static inline bool guest_cpuid_has_fsgsbase(struct kvm_vcpu *vcpu)
 {
        struct kvm_cpuid_entry2 *best;
index f5704d9..813d310 100644 (file)
@@ -3601,20 +3601,27 @@ static void reset_rsvds_bits_mask_ept(struct kvm_vcpu *vcpu,
        }
 }
 
-static void update_permission_bitmask(struct kvm_vcpu *vcpu,
+void update_permission_bitmask(struct kvm_vcpu *vcpu,
                struct kvm_mmu *mmu, bool ept)
 {
        unsigned bit, byte, pfec;
        u8 map;
-       bool fault, x, w, u, wf, uf, ff, smep;
+       bool fault, x, w, u, wf, uf, ff, smapf, cr4_smap, cr4_smep, smap = 0;
 
-       smep = kvm_read_cr4_bits(vcpu, X86_CR4_SMEP);
+       cr4_smep = kvm_read_cr4_bits(vcpu, X86_CR4_SMEP);
+       cr4_smap = kvm_read_cr4_bits(vcpu, X86_CR4_SMAP);
        for (byte = 0; byte < ARRAY_SIZE(mmu->permissions); ++byte) {
                pfec = byte << 1;
                map = 0;
                wf = pfec & PFERR_WRITE_MASK;
                uf = pfec & PFERR_USER_MASK;
                ff = pfec & PFERR_FETCH_MASK;
+               /*
+                * PFERR_RSVD_MASK bit is set in PFEC if the access is not
+                * subject to SMAP restrictions, and cleared otherwise. The
+                * bit is only meaningful if the SMAP bit is set in CR4.
+                */
+               smapf = !(pfec & PFERR_RSVD_MASK);
                for (bit = 0; bit < 8; ++bit) {
                        x = bit & ACC_EXEC_MASK;
                        w = bit & ACC_WRITE_MASK;
@@ -3626,12 +3633,33 @@ static void update_permission_bitmask(struct kvm_vcpu *vcpu,
                                /* Allow supervisor writes if !cr0.wp */
                                w |= !is_write_protection(vcpu) && !uf;
                                /* Disallow supervisor fetches of user code if cr4.smep */
-                               x &= !(smep && u && !uf);
+                               x &= !(cr4_smep && u && !uf);
+
+                               /*
+                                * SMAP:kernel-mode data accesses from user-mode
+                                * mappings should fault. A fault is considered
+                                * as a SMAP violation if all of the following
+                                * conditions are ture:
+                                *   - X86_CR4_SMAP is set in CR4
+                                *   - An user page is accessed
+                                *   - Page fault in kernel mode
+                                *   - if CPL = 3 or X86_EFLAGS_AC is clear
+                                *
+                                *   Here, we cover the first three conditions.
+                                *   The fourth is computed dynamically in
+                                *   permission_fault() and is in smapf.
+                                *
+                                *   Also, SMAP does not affect instruction
+                                *   fetches, add the !ff check here to make it
+                                *   clearer.
+                                */
+                               smap = cr4_smap && u && !uf && !ff;
                        } else
                                /* Not really needed: no U/S accesses on ept  */
                                u = 1;
 
-                       fault = (ff && !x) || (uf && !u) || (wf && !w);
+                       fault = (ff && !x) || (uf && !u) || (wf && !w) ||
+                               (smapf && smap);
                        map |= fault << bit;
                }
                mmu->permissions[byte] = map;
index 2926152..3842e70 100644 (file)
 #define PT_DIRECTORY_LEVEL 2
 #define PT_PAGE_TABLE_LEVEL 1
 
-#define PFERR_PRESENT_MASK (1U << 0)
-#define PFERR_WRITE_MASK (1U << 1)
-#define PFERR_USER_MASK (1U << 2)
-#define PFERR_RSVD_MASK (1U << 3)
-#define PFERR_FETCH_MASK (1U << 4)
+#define PFERR_PRESENT_BIT 0
+#define PFERR_WRITE_BIT 1
+#define PFERR_USER_BIT 2
+#define PFERR_RSVD_BIT 3
+#define PFERR_FETCH_BIT 4
+
+#define PFERR_PRESENT_MASK (1U << PFERR_PRESENT_BIT)
+#define PFERR_WRITE_MASK (1U << PFERR_WRITE_BIT)
+#define PFERR_USER_MASK (1U << PFERR_USER_BIT)
+#define PFERR_RSVD_MASK (1U << PFERR_RSVD_BIT)
+#define PFERR_FETCH_MASK (1U << PFERR_FETCH_BIT)
 
 int kvm_mmu_get_spte_hierarchy(struct kvm_vcpu *vcpu, u64 addr, u64 sptes[4]);
 void kvm_mmu_set_mmio_spte_mask(u64 mmio_mask);
@@ -73,6 +79,8 @@ int handle_mmio_page_fault_common(struct kvm_vcpu *vcpu, u64 addr, bool direct);
 void kvm_init_shadow_mmu(struct kvm_vcpu *vcpu, struct kvm_mmu *context);
 void kvm_init_shadow_ept_mmu(struct kvm_vcpu *vcpu, struct kvm_mmu *context,
                bool execonly);
+void update_permission_bitmask(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu,
+               bool ept);
 
 static inline unsigned int kvm_mmu_available_pages(struct kvm *kvm)
 {
@@ -110,10 +118,30 @@ static inline bool is_write_protection(struct kvm_vcpu *vcpu)
  * Will a fault with a given page-fault error code (pfec) cause a permission
  * fault with the given access (in ACC_* format)?
  */
-static inline bool permission_fault(struct kvm_mmu *mmu, unsigned pte_access,
-                                   unsigned pfec)
+static inline bool permission_fault(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu,
+                                   unsigned pte_access, unsigned pfec)
 {
-       return (mmu->permissions[pfec >> 1] >> pte_access) & 1;
+       int cpl = kvm_x86_ops->get_cpl(vcpu);
+       unsigned long rflags = kvm_x86_ops->get_rflags(vcpu);
+
+       /*
+        * If CPL < 3, SMAP prevention are disabled if EFLAGS.AC = 1.
+        *
+        * If CPL = 3, SMAP applies to all supervisor-mode data accesses
+        * (these are implicit supervisor accesses) regardless of the value
+        * of EFLAGS.AC.
+        *
+        * This computes (cpl < 3) && (rflags & X86_EFLAGS_AC), leaving
+        * the result in X86_EFLAGS_AC. We then insert it in place of
+        * the PFERR_RSVD_MASK bit; this bit will always be zero in pfec,
+        * but it will be one in index if SMAP checks are being overridden.
+        * It is important to keep this branchless.
+        */
+       unsigned long smap = (cpl - 3) & (rflags & X86_EFLAGS_AC);
+       int index = (pfec >> 1) +
+                   (smap >> (X86_EFLAGS_AC_BIT - PFERR_RSVD_BIT + 1));
+
+       return (mmu->permissions[index] >> pte_access) & 1;
 }
 
 void kvm_mmu_invalidate_zap_all_pages(struct kvm *kvm);
index b1e6c1b..123efd3 100644 (file)
@@ -353,7 +353,7 @@ retry_walk:
                walker->ptes[walker->level - 1] = pte;
        } while (!is_last_gpte(mmu, walker->level, pte));
 
-       if (unlikely(permission_fault(mmu, pte_access, access))) {
+       if (unlikely(permission_fault(vcpu, mmu, pte_access, access))) {
                errcode |= PFERR_PRESENT_MASK;
                goto error;
        }
index 1320e0f..1f68c58 100644 (file)
@@ -3484,13 +3484,14 @@ static int vmx_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
                        hw_cr4 &= ~X86_CR4_PAE;
                        hw_cr4 |= X86_CR4_PSE;
                        /*
-                        * SMEP is disabled if CPU is in non-paging mode in
-                        * hardware. However KVM always uses paging mode to
+                        * SMEP/SMAP is disabled if CPU is in non-paging mode
+                        * in hardware. However KVM always uses paging mode to
                         * emulate guest non-paging mode with TDP.
-                        * To emulate this behavior, SMEP needs to be manually
-                        * disabled when guest switches to non-paging mode.
+                        * To emulate this behavior, SMEP/SMAP needs to be
+                        * manually disabled when guest switches to non-paging
+                        * mode.
                         */
-                       hw_cr4 &= ~X86_CR4_SMEP;
+                       hw_cr4 &= ~(X86_CR4_SMEP | X86_CR4_SMAP);
                } else if (!(cr4 & X86_CR4_PAE)) {
                        hw_cr4 &= ~X86_CR4_PAE;
                }
index 9d1b5cd..8b8fc0b 100644 (file)
@@ -652,6 +652,9 @@ int kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
        if (!guest_cpuid_has_smep(vcpu) && (cr4 & X86_CR4_SMEP))
                return 1;
 
+       if (!guest_cpuid_has_smap(vcpu) && (cr4 & X86_CR4_SMAP))
+               return 1;
+
        if (!guest_cpuid_has_fsgsbase(vcpu) && (cr4 & X86_CR4_FSGSBASE))
                return 1;
 
@@ -680,6 +683,9 @@ int kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
            (!(cr4 & X86_CR4_PCIDE) && (old_cr4 & X86_CR4_PCIDE)))
                kvm_mmu_reset_context(vcpu);
 
+       if ((cr4 ^ old_cr4) & X86_CR4_SMAP)
+               update_permission_bitmask(vcpu, vcpu->arch.walk_mmu, false);
+
        if ((cr4 ^ old_cr4) & X86_CR4_OSXSAVE)
                kvm_update_cpuid(vcpu);
 
@@ -1117,7 +1123,6 @@ static inline u64 get_kernel_ns(void)
 {
        struct timespec ts;
 
-       WARN_ON(preemptible());
        ktime_get_ts(&ts);
        monotonic_to_bootbased(&ts);
        return timespec_to_ns(&ts);
@@ -4164,7 +4169,8 @@ static int vcpu_mmio_gva_to_gpa(struct kvm_vcpu *vcpu, unsigned long gva,
                | (write ? PFERR_WRITE_MASK : 0);
 
        if (vcpu_match_mmio_gva(vcpu, gva)
-           && !permission_fault(vcpu->arch.walk_mmu, vcpu->arch.access, access)) {
+           && !permission_fault(vcpu, vcpu->arch.walk_mmu,
+                                vcpu->arch.access, access)) {
                *gpa = vcpu->arch.mmio_gfn << PAGE_SHIFT |
                                        (gva & (PAGE_SIZE - 1));
                trace_vcpu_match_mmio(gva, *gpa, write, false);
index f325af2..3323c27 100644 (file)
@@ -54,5 +54,7 @@ syshdr-$(CONFIG_X86_64)               += syscalls_64.h
 
 targets        += $(uapisyshdr-y) $(syshdr-y)
 
+PHONY += all
 all: $(addprefix $(uapi)/,$(uapisyshdr-y))
 all: $(addprefix $(out)/,$(syshdr-y))
+       @:
index 96bc506..d6b8679 100644 (file)
 350    i386    finit_module            sys_finit_module
 351    i386    sched_setattr           sys_sched_setattr
 352    i386    sched_getattr           sys_sched_getattr
+353    i386    renameat2               sys_renameat2
index e812034..604a37e 100644 (file)
@@ -40,4 +40,6 @@ $(obj)/insn_sanity.o: $(srctree)/arch/x86/lib/insn.c $(srctree)/arch/x86/lib/ina
 HOST_EXTRACFLAGS += -I$(srctree)/tools/include
 hostprogs-y    += relocs
 relocs-objs     := relocs_32.o relocs_64.o relocs_common.o
+PHONY += relocs
 relocs: $(obj)/relocs
+       @:
index a18eadd..7005974 100644 (file)
@@ -441,10 +441,11 @@ static int xen_cpu_up(unsigned int cpu, struct task_struct *idle)
        irq_ctx_init(cpu);
 #else
        clear_tsk_thread_flag(idle, TIF_FORK);
+#endif
        per_cpu(kernel_stack, cpu) =
                (unsigned long)task_stack_page(idle) -
                KERNEL_STACK_OFFSET + THREAD_SIZE;
-#endif
+
        xen_setup_runstate_info(cpu);
        xen_setup_timer(cpu);
        xen_init_lock_cpu(cpu);
index 4d3acc3..0ba5f3b 100644 (file)
@@ -274,7 +274,7 @@ void __init xen_init_spinlocks(void)
                printk(KERN_DEBUG "xen: PV spinlocks disabled\n");
                return;
        }
-
+       printk(KERN_DEBUG "xen: PV spinlocks enabled\n");
        pv_lock_ops.lock_spinning = PV_CALLEE_SAVE(xen_lock_spinning);
        pv_lock_ops.unlock_kick = xen_unlock_kick;
 }
@@ -290,6 +290,9 @@ static __init int xen_init_spinlocks_jump(void)
        if (!xen_pvspin)
                return 0;
 
+       if (!xen_domain())
+               return 0;
+
        static_key_slow_inc(&paravirt_ticketlocks_enabled);
        return 0;
 }
index 33ca6e4..fd92a64 100644 (file)
@@ -75,6 +75,17 @@ ENDPROC(xen_sysexit)
  * stack state in whatever form its in, we keep things simple by only
  * using a single register which is pushed/popped on the stack.
  */
+
+.macro POP_FS
+1:
+       popw %fs
+.pushsection .fixup, "ax"
+2:     movw $0, (%esp)
+       jmp 1b
+.popsection
+       _ASM_EXTABLE(1b,2b)
+.endm
+
 ENTRY(xen_iret)
        /* test eflags for special cases */
        testl $(X86_EFLAGS_VM | XEN_EFLAGS_NMI), 8(%esp)
@@ -83,15 +94,13 @@ ENTRY(xen_iret)
        push %eax
        ESP_OFFSET=4    # bytes pushed onto stack
 
-       /*
-        * Store vcpu_info pointer for easy access.  Do it this way to
-        * avoid having to reload %fs
-        */
+       /* Store vcpu_info pointer for easy access */
 #ifdef CONFIG_SMP
-       GET_THREAD_INFO(%eax)
-       movl %ss:TI_cpu(%eax), %eax
-       movl %ss:__per_cpu_offset(,%eax,4), %eax
-       mov %ss:xen_vcpu(%eax), %eax
+       pushw %fs
+       movl $(__KERNEL_PERCPU), %eax
+       movl %eax, %fs
+       movl %fs:xen_vcpu, %eax
+       POP_FS
 #else
        movl %ss:xen_vcpu, %eax
 #endif
index e3ced91..d05d81b 100644 (file)
@@ -53,8 +53,8 @@ obj-y                         += gpu/
 obj-$(CONFIG_CONNECTOR)                += connector/
 
 # i810fb and intelfb depend on char/agp/
-obj-$(CONFIG_FB_I810)           += video/i810/
-obj-$(CONFIG_FB_INTEL)          += video/intelfb/
+obj-$(CONFIG_FB_I810)           += video/fbdev/i810/
+obj-$(CONFIG_FB_INTEL)          += video/fbdev/intelfb/
 
 obj-$(CONFIG_PARPORT)          += parport/
 obj-y                          += base/ block/ misc/ mfd/ nfc/
index 8c3b255..e900961 100644 (file)
@@ -61,18 +61,18 @@ static int bcm2835_rng_probe(struct platform_device *pdev)
        }
        bcm2835_rng_ops.priv = (unsigned long)rng_base;
 
+       /* set warm-up count & enable */
+       __raw_writel(RNG_WARMUP_COUNT, rng_base + RNG_STATUS);
+       __raw_writel(RNG_RBGEN, rng_base + RNG_CTRL);
+
        /* register driver */
        err = hwrng_register(&bcm2835_rng_ops);
        if (err) {
                dev_err(dev, "hwrng registration failed\n");
                iounmap(rng_base);
-       } else {
+       } else
                dev_info(dev, "hwrng registered\n");
 
-               /* set warm-up count & enable */
-               __raw_writel(RNG_WARMUP_COUNT, rng_base + RNG_STATUS);
-               __raw_writel(RNG_RBGEN, rng_base + RNG_CTRL);
-       }
        return err;
 }
 
index 0baa8fa..db1c9b7 100644 (file)
@@ -50,6 +50,18 @@ config IPMI_SI
         Currently, only KCS and SMIC are supported.  If
         you are using IPMI, you should probably say "y" here.
 
+config IPMI_SI_PROBE_DEFAULTS
+       bool 'Probe for all possible IPMI system interfaces by default'
+       default n
+       depends on IPMI_SI
+       help
+        Modern systems will usually expose IPMI interfaces via a discoverable
+        firmware mechanism such as ACPI or DMI. Older systems do not, and so
+        the driver is forced to probe hardware manually. This may cause boot
+        delays. Say "n" here to disable this manual probing. IPMI will then
+        only be available on older systems if the "ipmi_si_intf.trydefaults=1"
+        boot argument is passed.
+
 config IPMI_WATCHDOG
        tristate 'IPMI Watchdog Timer'
        help
index f5e4cd7..61e7161 100644 (file)
@@ -352,7 +352,7 @@ static inline void write_all_bytes(struct si_sm_data *bt)
 
 static inline int read_all_bytes(struct si_sm_data *bt)
 {
-       unsigned char i;
+       unsigned int i;
 
        /*
         * length is "framing info", minimum = 4: NetFn, Seq, Cmd, cCode.
index 6a4bdc1..8c25f59 100644 (file)
@@ -251,8 +251,9 @@ static inline int check_obf(struct si_sm_data *kcs, unsigned char status,
        if (!GET_STATUS_OBF(status)) {
                kcs->obf_timeout -= time;
                if (kcs->obf_timeout < 0) {
-                   start_error_recovery(kcs, "OBF not ready in time");
-                   return 1;
+                       kcs->obf_timeout = OBF_RETRY_TIMEOUT;
+                       start_error_recovery(kcs, "OBF not ready in time");
+                       return 1;
                }
                return 0;
        }
index ec4e10f..e6db938 100644 (file)
@@ -55,6 +55,7 @@ static struct ipmi_recv_msg *ipmi_alloc_recv_msg(void);
 static int ipmi_init_msghandler(void);
 static void smi_recv_tasklet(unsigned long);
 static void handle_new_recv_msgs(ipmi_smi_t intf);
+static void need_waiter(ipmi_smi_t intf);
 
 static int initialized;
 
@@ -73,14 +74,28 @@ static struct proc_dir_entry *proc_ipmi_root;
  */
 #define MAX_MSG_TIMEOUT                60000
 
+/* Call every ~1000 ms. */
+#define IPMI_TIMEOUT_TIME      1000
+
+/* How many jiffies does it take to get to the timeout time. */
+#define IPMI_TIMEOUT_JIFFIES   ((IPMI_TIMEOUT_TIME * HZ) / 1000)
+
+/*
+ * Request events from the queue every second (this is the number of
+ * IPMI_TIMEOUT_TIMES between event requests).  Hopefully, in the
+ * future, IPMI will add a way to know immediately if an event is in
+ * the queue and this silliness can go away.
+ */
+#define IPMI_REQUEST_EV_TIME   (1000 / (IPMI_TIMEOUT_TIME))
+
 /*
  * The main "user" data structure.
  */
 struct ipmi_user {
        struct list_head link;
 
-       /* Set to "0" when the user is destroyed. */
-       int valid;
+       /* Set to false when the user is destroyed. */
+       bool valid;
 
        struct kref refcount;
 
@@ -92,7 +107,7 @@ struct ipmi_user {
        ipmi_smi_t intf;
 
        /* Does this interface receive IPMI events? */
-       int gets_events;
+       bool gets_events;
 };
 
 struct cmd_rcvr {
@@ -383,6 +398,9 @@ struct ipmi_smi {
        unsigned int     waiting_events_count; /* How many events in queue? */
        char             delivering_events;
        char             event_msg_printed;
+       atomic_t         event_waiters;
+       unsigned int     ticks_to_req_ev;
+       int              last_needs_timer;
 
        /*
         * The event receiver for my BMC, only really used at panic
@@ -395,7 +413,7 @@ struct ipmi_smi {
 
        /* For handling of maintenance mode. */
        int maintenance_mode;
-       int maintenance_mode_enable;
+       bool maintenance_mode_enable;
        int auto_maintenance_timeout;
        spinlock_t maintenance_mode_lock; /* Used in a timer... */
 
@@ -451,7 +469,6 @@ static DEFINE_MUTEX(ipmi_interfaces_mutex);
 static LIST_HEAD(smi_watchers);
 static DEFINE_MUTEX(smi_watchers_mutex);
 
-
 #define ipmi_inc_stat(intf, stat) \
        atomic_inc(&(intf)->stats[IPMI_STAT_ ## stat])
 #define ipmi_get_stat(intf, stat) \
@@ -772,6 +789,7 @@ static int intf_next_seq(ipmi_smi_t           intf,
                *seq = i;
                *seqid = intf->seq_table[i].seqid;
                intf->curr_seq = (i+1)%IPMI_IPMB_NUM_SEQ;
+               need_waiter(intf);
        } else {
                rv = -EAGAIN;
        }
@@ -941,7 +959,7 @@ int ipmi_create_user(unsigned int          if_num,
        new_user->handler = handler;
        new_user->handler_data = handler_data;
        new_user->intf = intf;
-       new_user->gets_events = 0;
+       new_user->gets_events = false;
 
        if (!try_module_get(intf->handlers->owner)) {
                rv = -ENODEV;
@@ -962,10 +980,15 @@ int ipmi_create_user(unsigned int          if_num,
         */
        mutex_unlock(&ipmi_interfaces_mutex);
 
-       new_user->valid = 1;
+       new_user->valid = true;
        spin_lock_irqsave(&intf->seq_lock, flags);
        list_add_rcu(&new_user->link, &intf->users);
        spin_unlock_irqrestore(&intf->seq_lock, flags);
+       if (handler->ipmi_watchdog_pretimeout) {
+               /* User wants pretimeouts, so make sure to watch for them. */
+               if (atomic_inc_return(&intf->event_waiters) == 1)
+                       need_waiter(intf);
+       }
        *user = new_user;
        return 0;
 
@@ -1019,7 +1042,13 @@ int ipmi_destroy_user(ipmi_user_t user)
        struct cmd_rcvr  *rcvr;
        struct cmd_rcvr  *rcvrs = NULL;
 
-       user->valid = 0;
+       user->valid = false;
+
+       if (user->handler->ipmi_watchdog_pretimeout)
+               atomic_dec(&intf->event_waiters);
+
+       if (user->gets_events)
+               atomic_dec(&intf->event_waiters);
 
        /* Remove the user from the interface's sequence table. */
        spin_lock_irqsave(&intf->seq_lock, flags);
@@ -1155,25 +1184,23 @@ int ipmi_set_maintenance_mode(ipmi_user_t user, int mode)
        if (intf->maintenance_mode != mode) {
                switch (mode) {
                case IPMI_MAINTENANCE_MODE_AUTO:
-                       intf->maintenance_mode = mode;
                        intf->maintenance_mode_enable
                                = (intf->auto_maintenance_timeout > 0);
                        break;
 
                case IPMI_MAINTENANCE_MODE_OFF:
-                       intf->maintenance_mode = mode;
-                       intf->maintenance_mode_enable = 0;
+                       intf->maintenance_mode_enable = false;
                        break;
 
                case IPMI_MAINTENANCE_MODE_ON:
-                       intf->maintenance_mode = mode;
-                       intf->maintenance_mode_enable = 1;
+                       intf->maintenance_mode_enable = true;
                        break;
 
                default:
                        rv = -EINVAL;
                        goto out_unlock;
                }
+               intf->maintenance_mode = mode;
 
                maintenance_mode_update(intf);
        }
@@ -1184,7 +1211,7 @@ int ipmi_set_maintenance_mode(ipmi_user_t user, int mode)
 }
 EXPORT_SYMBOL(ipmi_set_maintenance_mode);
 
-int ipmi_set_gets_events(ipmi_user_t user, int val)
+int ipmi_set_gets_events(ipmi_user_t user, bool val)
 {
        unsigned long        flags;
        ipmi_smi_t           intf = user->intf;
@@ -1194,8 +1221,18 @@ int ipmi_set_gets_events(ipmi_user_t user, int val)
        INIT_LIST_HEAD(&msgs);
 
        spin_lock_irqsave(&intf->events_lock, flags);
+       if (user->gets_events == val)
+               goto out;
+
        user->gets_events = val;
 
+       if (val) {
+               if (atomic_inc_return(&intf->event_waiters) == 1)
+                       need_waiter(intf);
+       } else {
+               atomic_dec(&intf->event_waiters);
+       }
+
        if (intf->delivering_events)
                /*
                 * Another thread is delivering events for this, so
@@ -1289,6 +1326,9 @@ int ipmi_register_for_cmd(ipmi_user_t   user,
                goto out_unlock;
        }
 
+       if (atomic_inc_return(&intf->event_waiters) == 1)
+               need_waiter(intf);
+
        list_add_rcu(&rcvr->link, &intf->cmd_rcvrs);
 
  out_unlock:
@@ -1330,6 +1370,7 @@ int ipmi_unregister_for_cmd(ipmi_user_t   user,
        mutex_unlock(&intf->cmd_rcvrs_mutex);
        synchronize_rcu();
        while (rcvrs) {
+               atomic_dec(&intf->event_waiters);
                rcvr = rcvrs;
                rcvrs = rcvr->next;
                kfree(rcvr);
@@ -1535,7 +1576,7 @@ static int i_ipmi_request(ipmi_user_t          user,
                                = IPMI_MAINTENANCE_MODE_TIMEOUT;
                        if (!intf->maintenance_mode
                            && !intf->maintenance_mode_enable) {
-                               intf->maintenance_mode_enable = 1;
+                               intf->maintenance_mode_enable = true;
                                maintenance_mode_update(intf);
                        }
                        spin_unlock_irqrestore(&intf->maintenance_mode_lock,
@@ -2876,6 +2917,8 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
                     (unsigned long) intf);
        atomic_set(&intf->watchdog_pretimeouts_to_deliver, 0);
        spin_lock_init(&intf->events_lock);
+       atomic_set(&intf->event_waiters, 0);
+       intf->ticks_to_req_ev = IPMI_REQUEST_EV_TIME;
        INIT_LIST_HEAD(&intf->waiting_events);
        intf->waiting_events_count = 0;
        mutex_init(&intf->cmd_rcvrs_mutex);
@@ -3965,7 +4008,8 @@ smi_from_recv_msg(ipmi_smi_t intf, struct ipmi_recv_msg *recv_msg,
 
 static void check_msg_timeout(ipmi_smi_t intf, struct seq_table *ent,
                              struct list_head *timeouts, long timeout_period,
-                             int slot, unsigned long *flags)
+                             int slot, unsigned long *flags,
+                             unsigned int *waiting_msgs)
 {
        struct ipmi_recv_msg     *msg;
        struct ipmi_smi_handlers *handlers;
@@ -3977,8 +4021,10 @@ static void check_msg_timeout(ipmi_smi_t intf, struct seq_table *ent,
                return;
 
        ent->timeout -= timeout_period;
-       if (ent->timeout > 0)
+       if (ent->timeout > 0) {
+               (*waiting_msgs)++;
                return;
+       }
 
        if (ent->retries_left == 0) {
                /* The message has used all its retries. */
@@ -3995,6 +4041,8 @@ static void check_msg_timeout(ipmi_smi_t intf, struct seq_table *ent,
                struct ipmi_smi_msg *smi_msg;
                /* More retries, send again. */
 
+               (*waiting_msgs)++;
+
                /*
                 * Start with the max timer, set to normal timer after
                 * the message is sent.
@@ -4040,117 +4088,118 @@ static void check_msg_timeout(ipmi_smi_t intf, struct seq_table *ent,
        }
 }
 
-static void ipmi_timeout_handler(long timeout_period)
+static unsigned int ipmi_timeout_handler(ipmi_smi_t intf, long timeout_period)
 {
-       ipmi_smi_t           intf;
        struct list_head     timeouts;
        struct ipmi_recv_msg *msg, *msg2;
        unsigned long        flags;
        int                  i;
+       unsigned int         waiting_msgs = 0;
 
-       rcu_read_lock();
-       list_for_each_entry_rcu(intf, &ipmi_interfaces, link) {
-               tasklet_schedule(&intf->recv_tasklet);
-
-               /*
-                * Go through the seq table and find any messages that
-                * have timed out, putting them in the timeouts
-                * list.
-                */
-               INIT_LIST_HEAD(&timeouts);
-               spin_lock_irqsave(&intf->seq_lock, flags);
-               for (i = 0; i < IPMI_IPMB_NUM_SEQ; i++)
-                       check_msg_timeout(intf, &(intf->seq_table[i]),
-                                         &timeouts, timeout_period, i,
-                                         &flags);
-               spin_unlock_irqrestore(&intf->seq_lock, flags);
+       /*
+        * Go through the seq table and find any messages that
+        * have timed out, putting them in the timeouts
+        * list.
+        */
+       INIT_LIST_HEAD(&timeouts);
+       spin_lock_irqsave(&intf->seq_lock, flags);
+       for (i = 0; i < IPMI_IPMB_NUM_SEQ; i++)
+               check_msg_timeout(intf, &(intf->seq_table[i]),
+                                 &timeouts, timeout_period, i,
+                                 &flags, &waiting_msgs);
+       spin_unlock_irqrestore(&intf->seq_lock, flags);
 
-               list_for_each_entry_safe(msg, msg2, &timeouts, link)
-                       deliver_err_response(msg, IPMI_TIMEOUT_COMPLETION_CODE);
+       list_for_each_entry_safe(msg, msg2, &timeouts, link)
+               deliver_err_response(msg, IPMI_TIMEOUT_COMPLETION_CODE);
 
-               /*
-                * Maintenance mode handling.  Check the timeout
-                * optimistically before we claim the lock.  It may
-                * mean a timeout gets missed occasionally, but that
-                * only means the timeout gets extended by one period
-                * in that case.  No big deal, and it avoids the lock
-                * most of the time.
-                */
+       /*
+        * Maintenance mode handling.  Check the timeout
+        * optimistically before we claim the lock.  It may
+        * mean a timeout gets missed occasionally, but that
+        * only means the timeout gets extended by one period
+        * in that case.  No big deal, and it avoids the lock
+        * most of the time.
+        */
+       if (intf->auto_maintenance_timeout > 0) {
+               spin_lock_irqsave(&intf->maintenance_mode_lock, flags);
                if (intf->auto_maintenance_timeout > 0) {
-                       spin_lock_irqsave(&intf->maintenance_mode_lock, flags);
-                       if (intf->auto_maintenance_timeout > 0) {
-                               intf->auto_maintenance_timeout
-                                       -= timeout_period;
-                               if (!intf->maintenance_mode
-                                   && (intf->auto_maintenance_timeout <= 0)) {
-                                       intf->maintenance_mode_enable = 0;
-                                       maintenance_mode_update(intf);
-                               }
+                       intf->auto_maintenance_timeout
+                               -= timeout_period;
+                       if (!intf->maintenance_mode
+                           && (intf->auto_maintenance_timeout <= 0)) {
+                               intf->maintenance_mode_enable = false;
+                               maintenance_mode_update(intf);
                        }
-                       spin_unlock_irqrestore(&intf->maintenance_mode_lock,
-                                              flags);
                }
+               spin_unlock_irqrestore(&intf->maintenance_mode_lock,
+                                      flags);
        }
-       rcu_read_unlock();
+
+       tasklet_schedule(&intf->recv_tasklet);
+
+       return waiting_msgs;
 }
 
-static void ipmi_request_event(void)
+static void ipmi_request_event(ipmi_smi_t intf)
 {
-       ipmi_smi_t               intf;
        struct ipmi_smi_handlers *handlers;
 
-       rcu_read_lock();
-       /*
-        * Called from the timer, no need to check if handlers is
-        * valid.
-        */
-       list_for_each_entry_rcu(intf, &ipmi_interfaces, link) {
-               /* No event requests when in maintenance mode. */
-               if (intf->maintenance_mode_enable)
-                       continue;
+       /* No event requests when in maintenance mode. */
+       if (intf->maintenance_mode_enable)
+               return;
 
-               handlers = intf->handlers;
-               if (handlers)
-                       handlers->request_events(intf->send_info);
-       }
-       rcu_read_unlock();
+       handlers = intf->handlers;
+       if (handlers)
+               handlers->request_events(intf->send_info);
 }
 
 static struct timer_list ipmi_timer;
 
-/* Call every ~1000 ms. */
-#define IPMI_TIMEOUT_TIME      1000
-
-/* How many jiffies does it take to get to the timeout time. */
-#define IPMI_TIMEOUT_JIFFIES   ((IPMI_TIMEOUT_TIME * HZ) / 1000)
-
-/*
- * Request events from the queue every second (this is the number of
- * IPMI_TIMEOUT_TIMES between event requests).  Hopefully, in the
- * future, IPMI will add a way to know immediately if an event is in
- * the queue and this silliness can go away.
- */
-#define IPMI_REQUEST_EV_TIME   (1000 / (IPMI_TIMEOUT_TIME))
-
 static atomic_t stop_operation;
-static unsigned int ticks_to_req_ev = IPMI_REQUEST_EV_TIME;
 
 static void ipmi_timeout(unsigned long data)
 {
+       ipmi_smi_t intf;
+       int nt = 0;
+
        if (atomic_read(&stop_operation))
                return;
 
-       ticks_to_req_ev--;
-       if (ticks_to_req_ev == 0) {
-               ipmi_request_event();
-               ticks_to_req_ev = IPMI_REQUEST_EV_TIME;
-       }
+       rcu_read_lock();
+       list_for_each_entry_rcu(intf, &ipmi_interfaces, link) {
+               int lnt = 0;
+
+               if (atomic_read(&intf->event_waiters)) {
+                       intf->ticks_to_req_ev--;
+                       if (intf->ticks_to_req_ev == 0) {
+                               ipmi_request_event(intf);
+                               intf->ticks_to_req_ev = IPMI_REQUEST_EV_TIME;
+                       }
+                       lnt++;
+               }
 
-       ipmi_timeout_handler(IPMI_TIMEOUT_TIME);
+               lnt += ipmi_timeout_handler(intf, IPMI_TIMEOUT_TIME);
 
-       mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES);
+               lnt = !!lnt;
+               if (lnt != intf->last_needs_timer &&
+                                       intf->handlers->set_need_watch)
+                       intf->handlers->set_need_watch(intf->send_info, lnt);
+               intf->last_needs_timer = lnt;
+
+               nt += lnt;
+       }
+       rcu_read_unlock();
+
+       if (nt)
+               mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES);
 }
 
+static void need_waiter(ipmi_smi_t intf)
+{
+       /* Racy, but worst case we start the timer twice. */
+       if (!timer_pending(&ipmi_timer))
+               mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES);
+}
 
 static atomic_t smi_msg_inuse_count = ATOMIC_INIT(0);
 static atomic_t recv_msg_inuse_count = ATOMIC_INIT(0);
index b7efd3c..1c4bb4f 100644 (file)
@@ -217,7 +217,7 @@ struct smi_info {
        unsigned char       msg_flags;
 
        /* Does the BMC have an event buffer? */
-       char                has_event_buffer;
+       bool                has_event_buffer;
 
        /*
         * If set to true, this will request events the next time the
@@ -230,7 +230,7 @@ struct smi_info {
         * call.  Generally used after a panic to make sure stuff goes
         * out.
         */
-       int                 run_to_completion;
+       bool                run_to_completion;
 
        /* The I/O port of an SI interface. */
        int                 port;
@@ -248,19 +248,25 @@ struct smi_info {
        /* The timer for this si. */
        struct timer_list   si_timer;
 
+       /* This flag is set, if the timer is running (timer_pending() isn't enough) */
+       bool                timer_running;
+
        /* The time (in jiffies) the last timeout occurred at. */
        unsigned long       last_timeout_jiffies;
 
        /* Used to gracefully stop the timer without race conditions. */
        atomic_t            stop_operation;
 
+       /* Are we waiting for the events, pretimeouts, received msgs? */
+       atomic_t            need_watch;
+
        /*
         * The driver will disable interrupts when it gets into a
         * situation where it cannot handle messages due to lack of
         * memory.  Once that situation clears up, it will re-enable
         * interrupts.
         */
-       int interrupt_disabled;
+       bool interrupt_disabled;
 
        /* From the get device id response... */
        struct ipmi_device_id device_id;
@@ -273,7 +279,7 @@ struct smi_info {
         * True if we allocated the device, false if it came from
         * someplace else (like PCI).
         */
-       int dev_registered;
+       bool dev_registered;
 
        /* Slave address, could be reported from DMI. */
        unsigned char slave_addr;
@@ -297,19 +303,19 @@ struct smi_info {
 static int force_kipmid[SI_MAX_PARMS];
 static int num_force_kipmid;
 #ifdef CONFIG_PCI
-static int pci_registered;
+static bool pci_registered;
 #endif
 #ifdef CONFIG_ACPI
-static int pnp_registered;
+static bool pnp_registered;
 #endif
 #ifdef CONFIG_PARISC
-static int parisc_registered;
+static bool parisc_registered;
 #endif
 
 static unsigned int kipmid_max_busy_us[SI_MAX_PARMS];
 static int num_max_busy_us;
 
-static int unload_when_empty = 1;
+static bool unload_when_empty = true;
 
 static int add_smi(struct smi_info *smi);
 static int try_smi_init(struct smi_info *smi);
@@ -434,6 +440,13 @@ static void start_clear_flags(struct smi_info *smi_info)
        smi_info->si_state = SI_CLEARING_FLAGS;
 }
 
+static void smi_mod_timer(struct smi_info *smi_info, unsigned long new_val)
+{
+       smi_info->last_timeout_jiffies = jiffies;
+       mod_timer(&smi_info->si_timer, new_val);
+       smi_info->timer_running = true;
+}
+
 /*
  * When we have a situtaion where we run out of memory and cannot
  * allocate messages, we just leave them in the BMC and run the system
@@ -444,10 +457,9 @@ static inline void disable_si_irq(struct smi_info *smi_info)
 {
        if ((smi_info->irq) && (!smi_info->interrupt_disabled)) {
                start_disable_irq(smi_info);
-               smi_info->interrupt_disabled = 1;
+               smi_info->interrupt_disabled = true;
                if (!atomic_read(&smi_info->stop_operation))
-                       mod_timer(&smi_info->si_timer,
-                                 jiffies + SI_TIMEOUT_JIFFIES);
+                       smi_mod_timer(smi_info, jiffies + SI_TIMEOUT_JIFFIES);
        }
 }
 
@@ -455,7 +467,7 @@ static inline void enable_si_irq(struct smi_info *smi_info)
 {
        if ((smi_info->irq) && (smi_info->interrupt_disabled)) {
                start_enable_irq(smi_info);
-               smi_info->interrupt_disabled = 0;
+               smi_info->interrupt_disabled = false;
        }
 }
 
@@ -700,7 +712,7 @@ static void handle_transaction_done(struct smi_info *smi_info)
                        dev_warn(smi_info->dev,
                                 "Maybe ok, but ipmi might run very slowly.\n");
                } else
-                       smi_info->interrupt_disabled = 0;
+                       smi_info->interrupt_disabled = false;
                smi_info->si_state = SI_NORMAL;
                break;
        }
@@ -853,6 +865,19 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info,
        return si_sm_result;
 }
 
+static void check_start_timer_thread(struct smi_info *smi_info)
+{
+       if (smi_info->si_state == SI_NORMAL && smi_info->curr_msg == NULL) {
+               smi_mod_timer(smi_info, jiffies + SI_TIMEOUT_JIFFIES);
+
+               if (smi_info->thread)
+                       wake_up_process(smi_info->thread);
+
+               start_next_msg(smi_info);
+               smi_event_handler(smi_info, 0);
+       }
+}
+
 static void sender(void                *send_info,
                   struct ipmi_smi_msg *msg,
                   int                 priority)
@@ -906,27 +931,11 @@ static void sender(void                *send_info,
        else
                list_add_tail(&msg->link, &smi_info->xmit_msgs);
 
-       if (smi_info->si_state == SI_NORMAL && smi_info->curr_msg == NULL) {
-               /*
-                * last_timeout_jiffies is updated here to avoid
-                * smi_timeout() handler passing very large time_diff
-                * value to smi_event_handler() that causes
-                * the send command to abort.
-                */
-               smi_info->last_timeout_jiffies = jiffies;
-
-               mod_timer(&smi_info->si_timer, jiffies + SI_TIMEOUT_JIFFIES);
-
-               if (smi_info->thread)
-                       wake_up_process(smi_info->thread);
-
-               start_next_msg(smi_info);
-               smi_event_handler(smi_info, 0);
-       }
+       check_start_timer_thread(smi_info);
        spin_unlock_irqrestore(&smi_info->si_lock, flags);
 }
 
-static void set_run_to_completion(void *send_info, int i_run_to_completion)
+static void set_run_to_completion(void *send_info, bool i_run_to_completion)
 {
        struct smi_info   *smi_info = send_info;
        enum si_sm_result result;
@@ -1004,6 +1013,17 @@ static int ipmi_thread(void *data)
 
                spin_lock_irqsave(&(smi_info->si_lock), flags);
                smi_result = smi_event_handler(smi_info, 0);
+
+               /*
+                * If the driver is doing something, there is a possible
+                * race with the timer.  If the timer handler see idle,
+                * and the thread here sees something else, the timer
+                * handler won't restart the timer even though it is
+                * required.  So start it here if necessary.
+                */
+               if (smi_result != SI_SM_IDLE && !smi_info->timer_running)
+                       smi_mod_timer(smi_info, jiffies + SI_TIMEOUT_JIFFIES);
+
                spin_unlock_irqrestore(&(smi_info->si_lock), flags);
                busy_wait = ipmi_thread_busy_wait(smi_result, smi_info,
                                                  &busy_until);
@@ -1011,9 +1031,15 @@ static int ipmi_thread(void *data)
                        ; /* do nothing */
                else if (smi_result == SI_SM_CALL_WITH_DELAY && busy_wait)
                        schedule();
-               else if (smi_result == SI_SM_IDLE)
-                       schedule_timeout_interruptible(100);
-               else
+               else if (smi_result == SI_SM_IDLE) {
+                       if (atomic_read(&smi_info->need_watch)) {
+                               schedule_timeout_interruptible(100);
+                       } else {
+                               /* Wait to be woken up when we are needed. */
+                               __set_current_state(TASK_INTERRUPTIBLE);
+                               schedule();
+                       }
+               } else
                        schedule_timeout_interruptible(1);
        }
        return 0;
@@ -1024,7 +1050,7 @@ static void poll(void *send_info)
 {
        struct smi_info *smi_info = send_info;
        unsigned long flags = 0;
-       int run_to_completion = smi_info->run_to_completion;
+       bool run_to_completion = smi_info->run_to_completion;
 
        /*
         * Make sure there is some delay in the poll loop so we can
@@ -1049,6 +1075,17 @@ static void request_events(void *send_info)
        atomic_set(&smi_info->req_events, 1);
 }
 
+static void set_need_watch(void *send_info, bool enable)
+{
+       struct smi_info *smi_info = send_info;
+       unsigned long flags;
+
+       atomic_set(&smi_info->need_watch, enable);
+       spin_lock_irqsave(&smi_info->si_lock, flags);
+       check_start_timer_thread(smi_info);
+       spin_unlock_irqrestore(&smi_info->si_lock, flags);
+}
+
 static int initialized;
 
 static void smi_timeout(unsigned long data)
@@ -1073,10 +1110,6 @@ static void smi_timeout(unsigned long data)
                     * SI_USEC_PER_JIFFY);
        smi_result = smi_event_handler(smi_info, time_diff);
 
-       spin_unlock_irqrestore(&(smi_info->si_lock), flags);
-
-       smi_info->last_timeout_jiffies = jiffies_now;
-
        if ((smi_info->irq) && (!smi_info->interrupt_disabled)) {
                /* Running with interrupts, only do long timeouts. */
                timeout = jiffies + SI_TIMEOUT_JIFFIES;
@@ -1098,7 +1131,10 @@ static void smi_timeout(unsigned long data)
 
  do_mod_timer:
        if (smi_result != SI_SM_IDLE)
-               mod_timer(&(smi_info->si_timer), timeout);
+               smi_mod_timer(smi_info, timeout);
+       else
+               smi_info->timer_running = false;
+       spin_unlock_irqrestore(&(smi_info->si_lock), flags);
 }
 
 static irqreturn_t si_irq_handler(int irq, void *data)
@@ -1146,8 +1182,7 @@ static int smi_start_processing(void       *send_info,
 
        /* Set up the timer that drives the interface. */
        setup_timer(&new_smi->si_timer, smi_timeout, (long)new_smi);
-       new_smi->last_timeout_jiffies = jiffies;
-       mod_timer(&new_smi->si_timer, jiffies + SI_TIMEOUT_JIFFIES);
+       smi_mod_timer(new_smi, jiffies + SI_TIMEOUT_JIFFIES);
 
        /*
         * Check if the user forcefully enabled the daemon.
@@ -1188,7 +1223,7 @@ static int get_smi_info(void *send_info, struct ipmi_smi_info *data)
        return 0;
 }
 
-static void set_maintenance_mode(void *send_info, int enable)
+static void set_maintenance_mode(void *send_info, bool enable)
 {
        struct smi_info   *smi_info = send_info;
 
@@ -1202,6 +1237,7 @@ static struct ipmi_smi_handlers handlers = {
        .get_smi_info           = get_smi_info,
        .sender                 = sender,
        .request_events         = request_events,
+       .set_need_watch         = set_need_watch,
        .set_maintenance_mode   = set_maintenance_mode,
        .set_run_to_completion  = set_run_to_completion,
        .poll                   = poll,
@@ -1229,7 +1265,7 @@ static bool          si_tryplatform = 1;
 #ifdef CONFIG_PCI
 static bool          si_trypci = 1;
 #endif
-static bool          si_trydefaults = 1;
+static bool          si_trydefaults = IS_ENABLED(CONFIG_IPMI_SI_PROBE_DEFAULTS);
 static char          *si_type[SI_MAX_PARMS];
 #define MAX_SI_TYPE_STR 30
 static char          si_type_str[MAX_SI_TYPE_STR];
@@ -1328,7 +1364,7 @@ module_param_array(force_kipmid, int, &num_force_kipmid, 0);
 MODULE_PARM_DESC(force_kipmid, "Force the kipmi daemon to be enabled (1) or"
                 " disabled(0).  Normally the IPMI driver auto-detects"
                 " this, but the value may be overridden by this parm.");
-module_param(unload_when_empty, int, 0);
+module_param(unload_when_empty, bool, 0);
 MODULE_PARM_DESC(unload_when_empty, "Unload the module if no interfaces are"
                 " specified or found, default is 1.  Setting to 0"
                 " is useful for hot add of devices using hotmod.");
@@ -3336,18 +3372,19 @@ static int try_smi_init(struct smi_info *new_smi)
        INIT_LIST_HEAD(&(new_smi->hp_xmit_msgs));
        new_smi->curr_msg = NULL;
        atomic_set(&new_smi->req_events, 0);
-       new_smi->run_to_completion = 0;
+       new_smi->run_to_completion = false;
        for (i = 0; i < SI_NUM_STATS; i++)
                atomic_set(&new_smi->stats[i], 0);
 
-       new_smi->interrupt_disabled = 1;
+       new_smi->interrupt_disabled = true;
        atomic_set(&new_smi->stop_operation, 0);
+       atomic_set(&new_smi->need_watch, 0);
        new_smi->intf_num = smi_num;
        smi_num++;
 
        rv = try_enable_event_buffer(new_smi);
        if (rv == 0)
-               new_smi->has_event_buffer = 1;
+               new_smi->has_event_buffer = true;
 
        /*
         * Start clearing the flags before we enable interrupts or the
@@ -3381,7 +3418,7 @@ static int try_smi_init(struct smi_info *new_smi)
                               rv);
                        goto out_err;
                }
-               new_smi->dev_registered = 1;
+               new_smi->dev_registered = true;
        }
 
        rv = ipmi_register_smi(&handlers,
@@ -3430,7 +3467,7 @@ static int try_smi_init(struct smi_info *new_smi)
        wait_for_timer_and_thread(new_smi);
 
  out_err:
-       new_smi->interrupt_disabled = 1;
+       new_smi->interrupt_disabled = true;
 
        if (new_smi->intf) {
                ipmi_unregister_smi(new_smi->intf);
@@ -3466,7 +3503,7 @@ static int try_smi_init(struct smi_info *new_smi)
 
        if (new_smi->dev_registered) {
                platform_device_unregister(new_smi->pdev);
-               new_smi->dev_registered = 0;
+               new_smi->dev_registered = false;
        }
 
        return rv;
@@ -3521,14 +3558,14 @@ static int init_ipmi_si(void)
                        printk(KERN_ERR PFX "Unable to register "
                               "PCI driver: %d\n", rv);
                else
-                       pci_registered = 1;
+                       pci_registered = true;
        }
 #endif
 
 #ifdef CONFIG_ACPI
        if (si_tryacpi) {
                pnp_register_driver(&ipmi_pnp_driver);
-               pnp_registered = 1;
+               pnp_registered = true;
        }
 #endif
 
@@ -3544,7 +3581,7 @@ static int init_ipmi_si(void)
 
 #ifdef CONFIG_PARISC
        register_parisc_driver(&ipmi_parisc_driver);
-       parisc_registered = 1;
+       parisc_registered = true;
        /* poking PC IO addresses will crash machine, don't do it */
        si_trydefaults = 0;
 #endif
index 37dab0b..7d35287 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/list.h>
 #include <linux/io.h>
 #include <linux/irq.h>
+#include <linux/irqchip/chained_irq.h>
 #include <linux/irqdomain.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
@@ -228,12 +229,17 @@ static int handle_one_vic(struct vic_device *vic, struct pt_regs *regs)
 static void vic_handle_irq_cascaded(unsigned int irq, struct irq_desc *desc)
 {
        u32 stat, hwirq;
+       struct irq_chip *host_chip = irq_desc_get_chip(desc);
        struct vic_device *vic = irq_desc_get_handler_data(desc);
 
+       chained_irq_enter(host_chip, desc);
+
        while ((stat = readl_relaxed(vic->base + VIC_IRQ_STATUS))) {
                hwirq = ffs(stat) - 1;
                generic_handle_irq(irq_find_mapping(vic->domain, hwirq));
        }
+
+       chained_irq_exit(host_chip, desc);
 }
 
 /*
index 25247a8..ad1b9be 100644 (file)
@@ -4370,8 +4370,7 @@ static struct stripe_head *__get_priority_stripe(struct r5conf *conf, int group)
                sh->group = NULL;
        }
        list_del_init(&sh->lru);
-       atomic_inc(&sh->count);
-       BUG_ON(atomic_read(&sh->count) != 1);
+       BUG_ON(atomic_inc_return(&sh->count) != 1);
        return sh;
 }
 
index a8efb18..0ab8370 100644 (file)
@@ -8627,6 +8627,7 @@ bnx2_remove_one(struct pci_dev *pdev)
        pci_disable_device(pdev);
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int
 bnx2_suspend(struct device *device)
 {
@@ -8665,7 +8666,6 @@ bnx2_resume(struct device *device)
        return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static SIMPLE_DEV_PM_OPS(bnx2_pm_ops, bnx2_suspend, bnx2_resume);
 #define BNX2_PM_OPS (&bnx2_pm_ops)
 
index 751d5c7..7e49c43 100644 (file)
@@ -4,7 +4,7 @@
 
 config NET_CADENCE
        bool "Cadence devices"
-       depends on HAS_IOMEM
+       depends on HAS_IOMEM && (ARM || AVR32 || COMPILE_TEST)
        default y
        ---help---
          If you have a network (Ethernet) card belonging to this class, say Y.
@@ -22,7 +22,7 @@ if NET_CADENCE
 
 config ARM_AT91_ETHER
        tristate "AT91RM9200 Ethernet support"
-       depends on HAS_DMA
+       depends on HAS_DMA && (ARCH_AT91RM9200 || COMPILE_TEST)
        select MACB
        ---help---
          If you wish to compile a kernel for the AT91RM9200 and enable
@@ -30,7 +30,7 @@ config ARM_AT91_ETHER
 
 config MACB
        tristate "Cadence MACB/GEM support"
-       depends on HAS_DMA
+       depends on HAS_DMA && (PLATFORM_AT32AP || ARCH_AT91 || ARCH_PICOXCELL || ARCH_ZYNQ || COMPILE_TEST)
        select PHYLIB
        ---help---
          The Cadence MACB ethernet interface is found on many Atmel AT32 and
index 81e8402..8a96572 100644 (file)
@@ -154,7 +154,7 @@ static int write_l2e(struct adapter *adap, struct l2t_entry *e, int sync)
        req->params = htons(L2T_W_PORT(e->lport) | L2T_W_NOREPLY(!sync));
        req->l2t_idx = htons(e->idx);
        req->vlan = htons(e->vlan);
-       if (e->neigh)
+       if (e->neigh && !(e->neigh->dev->flags & IFF_LOOPBACK))
                memcpy(e->dmac, e->neigh->ha, sizeof(e->dmac));
        memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac));
 
@@ -394,6 +394,8 @@ struct l2t_entry *cxgb4_l2t_get(struct l2t_data *d, struct neighbour *neigh,
        if (e) {
                spin_lock(&e->lock);          /* avoid race with t4_l2t_free */
                e->state = L2T_STATE_RESOLVING;
+               if (neigh->dev->flags & IFF_LOOPBACK)
+                       memcpy(e->dmac, physdev->dev_addr, sizeof(e->dmac));
                memcpy(e->addr, addr, addr_len);
                e->ifindex = ifidx;
                e->hash = hash;
index fb2fe65..bba6768 100644 (file)
@@ -682,7 +682,7 @@ enum {
        SF_RD_ID        = 0x9f,       /* read ID */
        SF_ERASE_SECTOR = 0xd8,       /* erase sector */
 
-       FW_MAX_SIZE = 512 * 1024,
+       FW_MAX_SIZE = 16 * SF_SEC_SIZE,
 };
 
 /**
index 8ccaa25..97db5a7 100644 (file)
@@ -374,6 +374,7 @@ enum vf_state {
 #define BE_FLAGS_NAPI_ENABLED                  (1 << 9)
 #define BE_FLAGS_QNQ_ASYNC_EVT_RCVD            (1 << 11)
 #define BE_FLAGS_VXLAN_OFFLOADS                        (1 << 12)
+#define BE_FLAGS_SETUP_DONE                    (1 << 13)
 
 #define BE_UC_PMAC_COUNT                       30
 #define BE_VF_UC_PMAC_COUNT                    2
index 3e6df47..a186454 100644 (file)
@@ -2033,11 +2033,13 @@ static void be_tx_compl_clean(struct be_adapter *adapter)
        bool dummy_wrb;
        int i, pending_txqs;
 
-       /* Wait for a max of 200ms for all the tx-completions to arrive. */
+       /* Stop polling for compls when HW has been silent for 10ms */
        do {
                pending_txqs = adapter->num_tx_qs;
 
                for_all_tx_queues(adapter, txo, i) {
+                       cmpl = 0;
+                       num_wrbs = 0;
                        txq = &txo->q;
                        while ((txcp = be_tx_compl_get(&txo->cq))) {
                                end_idx =
@@ -2050,14 +2052,13 @@ static void be_tx_compl_clean(struct be_adapter *adapter)
                        if (cmpl) {
                                be_cq_notify(adapter, txo->cq.id, false, cmpl);
                                atomic_sub(num_wrbs, &txq->used);
-                               cmpl = 0;
-                               num_wrbs = 0;
+                               timeo = 0;
                        }
                        if (atomic_read(&txq->used) == 0)
                                pending_txqs--;
                }
 
-               if (pending_txqs == 0 || ++timeo > 200)
+               if (pending_txqs == 0 || ++timeo > 10 || be_hw_error(adapter))
                        break;
 
                mdelay(1);
@@ -2725,6 +2726,12 @@ static int be_close(struct net_device *netdev)
        struct be_eq_obj *eqo;
        int i;
 
+       /* This protection is needed as be_close() may be called even when the
+        * adapter is in cleared state (after eeh perm failure)
+        */
+       if (!(adapter->flags & BE_FLAGS_SETUP_DONE))
+               return 0;
+
        be_roce_dev_close(adapter);
 
        if (adapter->flags & BE_FLAGS_NAPI_ENABLED) {
@@ -3055,6 +3062,7 @@ static int be_clear(struct be_adapter *adapter)
        be_clear_queues(adapter);
 
        be_msix_disable(adapter);
+       adapter->flags &= ~BE_FLAGS_SETUP_DONE;
        return 0;
 }
 
@@ -3559,6 +3567,7 @@ static int be_setup(struct be_adapter *adapter)
                adapter->phy.fc_autoneg = 1;
 
        be_schedule_worker(adapter);
+       adapter->flags |= BE_FLAGS_SETUP_DONE;
        return 0;
 err:
        be_clear(adapter);
index d04b1c3..b248bcb 100644 (file)
@@ -89,9 +89,8 @@
 #define      MVNETA_TX_IN_PRGRS                  BIT(1)
 #define      MVNETA_TX_FIFO_EMPTY                BIT(8)
 #define MVNETA_RX_MIN_FRAME_SIZE                 0x247c
-#define MVNETA_SERDES_CFG                       0x24A0
+#define MVNETA_SGMII_SERDES_CFG                         0x24A0
 #define      MVNETA_SGMII_SERDES_PROTO          0x0cc7
-#define      MVNETA_RGMII_SERDES_PROTO          0x0667
 #define MVNETA_TYPE_PRIO                         0x24bc
 #define      MVNETA_FORCE_UNI                    BIT(21)
 #define MVNETA_TXQ_CMD_1                         0x24e4
@@ -712,6 +711,35 @@ static void mvneta_rxq_bm_disable(struct mvneta_port *pp,
        mvreg_write(pp, MVNETA_RXQ_CONFIG_REG(rxq->id), val);
 }
 
+
+
+/* Sets the RGMII Enable bit (RGMIIEn) in port MAC control register */
+static void mvneta_gmac_rgmii_set(struct mvneta_port *pp, int enable)
+{
+       u32  val;
+
+       val = mvreg_read(pp, MVNETA_GMAC_CTRL_2);
+
+       if (enable)
+               val |= MVNETA_GMAC2_PORT_RGMII;
+       else
+               val &= ~MVNETA_GMAC2_PORT_RGMII;
+
+       mvreg_write(pp, MVNETA_GMAC_CTRL_2, val);
+}
+
+/* Config SGMII port */
+static void mvneta_port_sgmii_config(struct mvneta_port *pp)
+{
+       u32 val;
+
+       val = mvreg_read(pp, MVNETA_GMAC_CTRL_2);
+       val |= MVNETA_GMAC2_PCS_ENABLE;
+       mvreg_write(pp, MVNETA_GMAC_CTRL_2, val);
+
+       mvreg_write(pp, MVNETA_SGMII_SERDES_CFG, MVNETA_SGMII_SERDES_PROTO);
+}
+
 /* Start the Ethernet port RX and TX activity */
 static void mvneta_port_up(struct mvneta_port *pp)
 {
@@ -2729,15 +2757,12 @@ static void mvneta_port_power_up(struct mvneta_port *pp, int phy_mode)
        mvreg_write(pp, MVNETA_UNIT_INTR_CAUSE, 0);
 
        if (phy_mode == PHY_INTERFACE_MODE_SGMII)
-               mvreg_write(pp, MVNETA_SERDES_CFG, MVNETA_SGMII_SERDES_PROTO);
-       else
-               mvreg_write(pp, MVNETA_SERDES_CFG, MVNETA_RGMII_SERDES_PROTO);
+               mvneta_port_sgmii_config(pp);
 
-       val = mvreg_read(pp, MVNETA_GMAC_CTRL_2);
-
-       val |= MVNETA_GMAC2_PCS_ENABLE | MVNETA_GMAC2_PORT_RGMII;
+       mvneta_gmac_rgmii_set(pp, 1);
 
        /* Cancel Port Reset */
+       val = mvreg_read(pp, MVNETA_GMAC_CTRL_2);
        val &= ~MVNETA_GMAC2_PORT_RESET;
        mvreg_write(pp, MVNETA_GMAC_CTRL_2, val);
 
index f0ae95f..cef267e 100644 (file)
@@ -2301,13 +2301,8 @@ static int __mlx4_init_one(struct pci_dev *pdev, int pci_dev_data)
        /* Allow large DMA segments, up to the firmware limit of 1 GB */
        dma_set_max_seg_size(&pdev->dev, 1024 * 1024 * 1024);
 
-       priv = kzalloc(sizeof(*priv), GFP_KERNEL);
-       if (!priv) {
-               err = -ENOMEM;
-               goto err_release_regions;
-       }
-
-       dev       = &priv->dev;
+       dev       = pci_get_drvdata(pdev);
+       priv      = mlx4_priv(dev);
        dev->pdev = pdev;
        INIT_LIST_HEAD(&priv->ctx_list);
        spin_lock_init(&priv->ctx_lock);
@@ -2374,10 +2369,10 @@ static int __mlx4_init_one(struct pci_dev *pdev, int pci_dev_data)
                        } else {
                                atomic_inc(&pf_loading);
                                err = pci_enable_sriov(pdev, total_vfs);
-                               atomic_dec(&pf_loading);
                                if (err) {
                                        mlx4_err(dev, "Failed to enable SR-IOV, continuing without SR-IOV (err = %d).\n",
                                                 err);
+                                       atomic_dec(&pf_loading);
                                        err = 0;
                                } else {
                                        mlx4_warn(dev, "Running in master mode\n");
@@ -2535,8 +2530,10 @@ slave_start:
        mlx4_sense_init(dev);
        mlx4_start_sense(dev);
 
-       priv->pci_dev_data = pci_dev_data;
-       pci_set_drvdata(pdev, dev);
+       priv->removed = 0;
+
+       if (mlx4_is_master(dev) && dev->num_vfs)
+               atomic_dec(&pf_loading);
 
        return 0;
 
@@ -2588,6 +2585,9 @@ err_rel_own:
        if (!mlx4_is_slave(dev))
                mlx4_free_ownership(dev);
 
+       if (mlx4_is_master(dev) && dev->num_vfs)
+               atomic_dec(&pf_loading);
+
        kfree(priv->dev.dev_vfs);
 
 err_free_dev:
@@ -2604,85 +2604,110 @@ err_disable_pdev:
 
 static int mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 {
+       struct mlx4_priv *priv;
+       struct mlx4_dev *dev;
+
        printk_once(KERN_INFO "%s", mlx4_version);
 
+       priv = kzalloc(sizeof(*priv), GFP_KERNEL);
+       if (!priv)
+               return -ENOMEM;
+
+       dev       = &priv->dev;
+       pci_set_drvdata(pdev, dev);
+       priv->pci_dev_data = id->driver_data;
+
        return __mlx4_init_one(pdev, id->driver_data);
 }
 
-static void mlx4_remove_one(struct pci_dev *pdev)
+static void __mlx4_remove_one(struct pci_dev *pdev)
 {
        struct mlx4_dev  *dev  = pci_get_drvdata(pdev);
        struct mlx4_priv *priv = mlx4_priv(dev);
+       int               pci_dev_data;
        int p;
 
-       if (dev) {
-               /* in SRIOV it is not allowed to unload the pf's
-                * driver while there are alive vf's */
-               if (mlx4_is_master(dev)) {
-                       if (mlx4_how_many_lives_vf(dev))
-                               printk(KERN_ERR "Removing PF when there are assigned VF's !!!\n");
-               }
-               mlx4_stop_sense(dev);
-               mlx4_unregister_device(dev);
+       if (priv->removed)
+               return;
 
-               for (p = 1; p <= dev->caps.num_ports; p++) {
-                       mlx4_cleanup_port_info(&priv->port[p]);
-                       mlx4_CLOSE_PORT(dev, p);
-               }
+       pci_dev_data = priv->pci_dev_data;
 
-               if (mlx4_is_master(dev))
-                       mlx4_free_resource_tracker(dev,
-                                                  RES_TR_FREE_SLAVES_ONLY);
-
-               mlx4_cleanup_counters_table(dev);
-               mlx4_cleanup_qp_table(dev);
-               mlx4_cleanup_srq_table(dev);
-               mlx4_cleanup_cq_table(dev);
-               mlx4_cmd_use_polling(dev);
-               mlx4_cleanup_eq_table(dev);
-               mlx4_cleanup_mcg_table(dev);
-               mlx4_cleanup_mr_table(dev);
-               mlx4_cleanup_xrcd_table(dev);
-               mlx4_cleanup_pd_table(dev);
+       /* in SRIOV it is not allowed to unload the pf's
+        * driver while there are alive vf's */
+       if (mlx4_is_master(dev) && mlx4_how_many_lives_vf(dev))
+               printk(KERN_ERR "Removing PF when there are assigned VF's !!!\n");
+       mlx4_stop_sense(dev);
+       mlx4_unregister_device(dev);
 
-               if (mlx4_is_master(dev))
-                       mlx4_free_resource_tracker(dev,
-                                                  RES_TR_FREE_STRUCTS_ONLY);
-
-               iounmap(priv->kar);
-               mlx4_uar_free(dev, &priv->driver_uar);
-               mlx4_cleanup_uar_table(dev);
-               if (!mlx4_is_slave(dev))
-                       mlx4_clear_steering(dev);
-               mlx4_free_eq_table(dev);
-               if (mlx4_is_master(dev))
-                       mlx4_multi_func_cleanup(dev);
-               mlx4_close_hca(dev);
-               if (mlx4_is_slave(dev))
-                       mlx4_multi_func_cleanup(dev);
-               mlx4_cmd_cleanup(dev);
-
-               if (dev->flags & MLX4_FLAG_MSI_X)
-                       pci_disable_msix(pdev);
-               if (dev->flags & MLX4_FLAG_SRIOV) {
-                       mlx4_warn(dev, "Disabling SR-IOV\n");
-                       pci_disable_sriov(pdev);
-               }
+       for (p = 1; p <= dev->caps.num_ports; p++) {
+               mlx4_cleanup_port_info(&priv->port[p]);
+               mlx4_CLOSE_PORT(dev, p);
+       }
 
-               if (!mlx4_is_slave(dev))
-                       mlx4_free_ownership(dev);
+       if (mlx4_is_master(dev))
+               mlx4_free_resource_tracker(dev,
+                                          RES_TR_FREE_SLAVES_ONLY);
 
-               kfree(dev->caps.qp0_tunnel);
-               kfree(dev->caps.qp0_proxy);
-               kfree(dev->caps.qp1_tunnel);
-               kfree(dev->caps.qp1_proxy);
-               kfree(dev->dev_vfs);
+       mlx4_cleanup_counters_table(dev);
+       mlx4_cleanup_qp_table(dev);
+       mlx4_cleanup_srq_table(dev);
+       mlx4_cleanup_cq_table(dev);
+       mlx4_cmd_use_polling(dev);
+       mlx4_cleanup_eq_table(dev);
+       mlx4_cleanup_mcg_table(dev);
+       mlx4_cleanup_mr_table(dev);
+       mlx4_cleanup_xrcd_table(dev);
+       mlx4_cleanup_pd_table(dev);
 
-               kfree(priv);
-               pci_release_regions(pdev);
-               pci_disable_device(pdev);
-               pci_set_drvdata(pdev, NULL);
+       if (mlx4_is_master(dev))
+               mlx4_free_resource_tracker(dev,
+                                          RES_TR_FREE_STRUCTS_ONLY);
+
+       iounmap(priv->kar);
+       mlx4_uar_free(dev, &priv->driver_uar);
+       mlx4_cleanup_uar_table(dev);
+       if (!mlx4_is_slave(dev))
+               mlx4_clear_steering(dev);
+       mlx4_free_eq_table(dev);
+       if (mlx4_is_master(dev))
+               mlx4_multi_func_cleanup(dev);
+       mlx4_close_hca(dev);
+       if (mlx4_is_slave(dev))
+               mlx4_multi_func_cleanup(dev);
+       mlx4_cmd_cleanup(dev);
+
+       if (dev->flags & MLX4_FLAG_MSI_X)
+               pci_disable_msix(pdev);
+       if (dev->flags & MLX4_FLAG_SRIOV) {
+               mlx4_warn(dev, "Disabling SR-IOV\n");
+               pci_disable_sriov(pdev);
+               dev->num_vfs = 0;
        }
+
+       if (!mlx4_is_slave(dev))
+               mlx4_free_ownership(dev);
+
+       kfree(dev->caps.qp0_tunnel);
+       kfree(dev->caps.qp0_proxy);
+       kfree(dev->caps.qp1_tunnel);
+       kfree(dev->caps.qp1_proxy);
+       kfree(dev->dev_vfs);
+
+       pci_release_regions(pdev);
+       pci_disable_device(pdev);
+       memset(priv, 0, sizeof(*priv));
+       priv->pci_dev_data = pci_dev_data;
+       priv->removed = 1;
+}
+
+static void mlx4_remove_one(struct pci_dev *pdev)
+{
+       struct mlx4_dev  *dev  = pci_get_drvdata(pdev);
+       struct mlx4_priv *priv = mlx4_priv(dev);
+
+       __mlx4_remove_one(pdev);
+       kfree(priv);
+       pci_set_drvdata(pdev, NULL);
 }
 
 int mlx4_restart_one(struct pci_dev *pdev)
@@ -2692,7 +2717,7 @@ int mlx4_restart_one(struct pci_dev *pdev)
        int               pci_dev_data;
 
        pci_dev_data = priv->pci_dev_data;
-       mlx4_remove_one(pdev);
+       __mlx4_remove_one(pdev);
        return __mlx4_init_one(pdev, pci_dev_data);
 }
 
@@ -2747,7 +2772,7 @@ MODULE_DEVICE_TABLE(pci, mlx4_pci_table);
 static pci_ers_result_t mlx4_pci_err_detected(struct pci_dev *pdev,
                                              pci_channel_state_t state)
 {
-       mlx4_remove_one(pdev);
+       __mlx4_remove_one(pdev);
 
        return state == pci_channel_io_perm_failure ?
                PCI_ERS_RESULT_DISCONNECT : PCI_ERS_RESULT_NEED_RESET;
@@ -2755,11 +2780,11 @@ static pci_ers_result_t mlx4_pci_err_detected(struct pci_dev *pdev,
 
 static pci_ers_result_t mlx4_pci_slot_reset(struct pci_dev *pdev)
 {
-       const struct pci_device_id *id;
-       int ret;
+       struct mlx4_dev  *dev  = pci_get_drvdata(pdev);
+       struct mlx4_priv *priv = mlx4_priv(dev);
+       int               ret;
 
-       id = pci_match_id(mlx4_pci_table, pdev);
-       ret = __mlx4_init_one(pdev, id->driver_data);
+       ret = __mlx4_init_one(pdev, priv->pci_dev_data);
 
        return ret ? PCI_ERS_RESULT_DISCONNECT : PCI_ERS_RESULT_RECOVERED;
 }
index cf8be41..f9c4651 100644 (file)
@@ -800,6 +800,7 @@ struct mlx4_priv {
        spinlock_t              ctx_lock;
 
        int                     pci_dev_data;
+       int                     removed;
 
        struct list_head        pgdir_list;
        struct mutex            pgdir_mutex;
index b48737d..ba20c72 100644 (file)
@@ -2139,8 +2139,6 @@ static int qlcnic_83xx_get_nic_configuration(struct qlcnic_adapter *adapter)
        ahw->max_mac_filters = nic_info.max_mac_filters;
        ahw->max_mtu = nic_info.max_mtu;
 
-       adapter->max_tx_rings = ahw->max_tx_ques;
-       adapter->max_sds_rings = ahw->max_rx_ques;
        /* eSwitch capability indicates vNIC mode.
         * vNIC and SRIOV are mutually exclusive operational modes.
         * If SR-IOV capability is detected, SR-IOV physical function
@@ -2161,6 +2159,7 @@ static int qlcnic_83xx_get_nic_configuration(struct qlcnic_adapter *adapter)
 int qlcnic_83xx_configure_opmode(struct qlcnic_adapter *adapter)
 {
        struct qlcnic_hardware_context *ahw = adapter->ahw;
+       u16 max_sds_rings, max_tx_rings;
        int ret;
 
        ret = qlcnic_83xx_get_nic_configuration(adapter);
@@ -2173,18 +2172,21 @@ int qlcnic_83xx_configure_opmode(struct qlcnic_adapter *adapter)
                if (qlcnic_83xx_config_vnic_opmode(adapter))
                        return -EIO;
 
-               adapter->max_sds_rings = QLCNIC_MAX_VNIC_SDS_RINGS;
-               adapter->max_tx_rings = QLCNIC_MAX_VNIC_TX_RINGS;
+               max_sds_rings = QLCNIC_MAX_VNIC_SDS_RINGS;
+               max_tx_rings = QLCNIC_MAX_VNIC_TX_RINGS;
        } else if (ret == QLC_83XX_DEFAULT_OPMODE) {
                ahw->nic_mode = QLCNIC_DEFAULT_MODE;
                adapter->nic_ops->init_driver = qlcnic_83xx_init_default_driver;
                ahw->idc.state_entry = qlcnic_83xx_idc_ready_state_entry;
-               adapter->max_sds_rings = QLCNIC_MAX_SDS_RINGS;
-               adapter->max_tx_rings = QLCNIC_MAX_TX_RINGS;
+               max_sds_rings = QLCNIC_MAX_SDS_RINGS;
+               max_tx_rings = QLCNIC_MAX_TX_RINGS;
        } else {
                return -EIO;
        }
 
+       adapter->max_sds_rings = min(ahw->max_rx_ques, max_sds_rings);
+       adapter->max_tx_rings = min(ahw->max_tx_ques, max_tx_rings);
+
        return 0;
 }
 
@@ -2348,15 +2350,16 @@ int qlcnic_83xx_init(struct qlcnic_adapter *adapter, int pci_using_dac)
                goto disable_intr;
        }
 
+       INIT_DELAYED_WORK(&adapter->idc_aen_work, qlcnic_83xx_idc_aen_work);
+
        err = qlcnic_83xx_setup_mbx_intr(adapter);
        if (err)
                goto disable_mbx_intr;
 
        qlcnic_83xx_clear_function_resources(adapter);
-
-       INIT_DELAYED_WORK(&adapter->idc_aen_work, qlcnic_83xx_idc_aen_work);
-
+       qlcnic_dcb_enable(adapter->dcb);
        qlcnic_83xx_initialize_nic(adapter, 1);
+       qlcnic_dcb_get_info(adapter->dcb);
 
        /* Configure default, SR-IOV or Virtual NIC mode of operation */
        err = qlcnic_83xx_configure_opmode(adapter);
index 64dcbf3..c1e11f5 100644 (file)
@@ -883,8 +883,6 @@ int qlcnic_82xx_get_nic_info(struct qlcnic_adapter *adapter,
                npar_info->max_rx_ques = le16_to_cpu(nic_info->max_rx_ques);
                npar_info->capabilities = le32_to_cpu(nic_info->capabilities);
                npar_info->max_mtu = le16_to_cpu(nic_info->max_mtu);
-               adapter->max_tx_rings = npar_info->max_tx_ques;
-               adapter->max_sds_rings = npar_info->max_rx_ques;
        }
 
        qlcnic_free_mbx_args(&cmd);
@@ -1356,6 +1354,7 @@ int qlcnic_config_switch_port(struct qlcnic_adapter *adapter,
                        arg2 &= ~BIT_3;
                break;
        case QLCNIC_ADD_VLAN:
+                       arg1 &= ~(0x0ffff << 16);
                        arg1 |= (BIT_2 | BIT_5);
                        arg1 |= (esw_cfg->vlan_id << 16);
                        break;
index 7d4f549..a51fe18 100644 (file)
@@ -330,8 +330,6 @@ static int __qlcnic_dcb_attach(struct qlcnic_dcb *dcb)
                goto out_free_cfg;
        }
 
-       qlcnic_dcb_get_info(dcb);
-
        return 0;
 out_free_cfg:
        kfree(dcb->cfg);
index 309d056..dbf7539 100644 (file)
@@ -670,7 +670,7 @@ int qlcnic_setup_tss_rss_intr(struct qlcnic_adapter *adapter)
        else
                num_msix += adapter->drv_tx_rings;
 
-       if (adapter->drv_rss_rings  > 0)
+       if (adapter->drv_rss_rings > 0)
                num_msix += adapter->drv_rss_rings;
        else
                num_msix += adapter->drv_sds_rings;
@@ -686,19 +686,15 @@ int qlcnic_setup_tss_rss_intr(struct qlcnic_adapter *adapter)
                        return -ENOMEM;
        }
 
-restore:
        for (vector = 0; vector < num_msix; vector++)
                adapter->msix_entries[vector].entry = vector;
 
+restore:
        err = pci_enable_msix(pdev, adapter->msix_entries, num_msix);
-       if (err == 0) {
-               adapter->ahw->num_msix = num_msix;
-               if (adapter->drv_tss_rings > 0)
-                       adapter->drv_tx_rings = adapter->drv_tss_rings;
+       if (err > 0) {
+               if (!adapter->drv_tss_rings && !adapter->drv_rss_rings)
+                       return -ENOSPC;
 
-               if (adapter->drv_rss_rings > 0)
-                       adapter->drv_sds_rings = adapter->drv_rss_rings;
-       } else {
                netdev_info(adapter->netdev,
                            "Unable to allocate %d MSI-X vectors, Available vectors %d\n",
                            num_msix, err);
@@ -716,12 +712,20 @@ restore:
                            "Restoring %d Tx, %d SDS rings for total %d vectors.\n",
                            adapter->drv_tx_rings, adapter->drv_sds_rings,
                            num_msix);
-               goto restore;
 
-               err = -EIO;
+               goto restore;
+       } else if (err < 0) {
+               return err;
        }
 
-       return err;
+       adapter->ahw->num_msix = num_msix;
+       if (adapter->drv_tss_rings > 0)
+               adapter->drv_tx_rings = adapter->drv_tss_rings;
+
+       if (adapter->drv_rss_rings > 0)
+               adapter->drv_sds_rings = adapter->drv_rss_rings;
+
+       return 0;
 }
 
 int qlcnic_enable_msix(struct qlcnic_adapter *adapter, u32 num_msix)
@@ -2528,8 +2532,6 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                goto err_out_free_hw;
        }
 
-       qlcnic_dcb_enable(adapter->dcb);
-
        if (qlcnic_read_mac_addr(adapter))
                dev_warn(&pdev->dev, "failed to read mac addr\n");
 
@@ -2549,7 +2551,10 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                         "Device does not support MSI interrupts\n");
 
        if (qlcnic_82xx_check(adapter)) {
+               qlcnic_dcb_enable(adapter->dcb);
+               qlcnic_dcb_get_info(adapter->dcb);
                err = qlcnic_setup_intr(adapter);
+
                if (err) {
                        dev_err(&pdev->dev, "Failed to setup interrupt\n");
                        goto err_out_disable_msi;
index 14f748c..2801379 100644 (file)
@@ -461,6 +461,16 @@ static int qlcnic_pci_sriov_disable(struct qlcnic_adapter *adapter)
 {
        struct net_device *netdev = adapter->netdev;
 
+       if (pci_vfs_assigned(adapter->pdev)) {
+               netdev_err(adapter->netdev,
+                          "SR-IOV VFs belonging to port %d are assigned to VMs. SR-IOV can not be disabled on this port\n",
+                          adapter->portnum);
+               netdev_info(adapter->netdev,
+                           "Please detach SR-IOV VFs belonging to port %d from VMs, and then try to disable SR-IOV on this port\n",
+                           adapter->portnum);
+               return -EPERM;
+       }
+
        rtnl_lock();
        if (netif_running(netdev))
                __qlcnic_down(adapter, netdev);
index 448d156..cd346e2 100644 (file)
@@ -354,7 +354,7 @@ int qlcnic_is_valid_nic_func(struct qlcnic_adapter *adapter, u8 pci_func)
 {
        int i;
 
-       for (i = 0; i < adapter->ahw->max_vnic_func; i++) {
+       for (i = 0; i < adapter->ahw->total_nic_func; i++) {
                if (adapter->npars[i].pci_func == pci_func)
                        return i;
        }
@@ -720,6 +720,7 @@ static ssize_t qlcnic_sysfs_read_npar_config(struct file *file,
        struct qlcnic_adapter *adapter = dev_get_drvdata(dev);
        struct qlcnic_npar_func_cfg *np_cfg;
        struct qlcnic_info nic_info;
+       u8 pci_func;
        int i, ret;
        u32 count;
 
@@ -729,26 +730,28 @@ static ssize_t qlcnic_sysfs_read_npar_config(struct file *file,
 
        count = size / sizeof(struct qlcnic_npar_func_cfg);
        for (i = 0; i < adapter->ahw->total_nic_func; i++) {
-               if (qlcnic_is_valid_nic_func(adapter, i) < 0)
-                       continue;
                if (adapter->npars[i].pci_func >= count) {
                        dev_dbg(dev, "%s: Total nic functions[%d], App sent function count[%d]\n",
                                __func__, adapter->ahw->total_nic_func, count);
                        continue;
                }
-               ret = qlcnic_get_nic_info(adapter, &nic_info, i);
-               if (ret)
-                       return ret;
                if (!adapter->npars[i].eswitch_status)
                        continue;
-               np_cfg[i].pci_func = i;
-               np_cfg[i].op_mode = (u8)nic_info.op_mode;
-               np_cfg[i].port_num = nic_info.phys_port;
-               np_cfg[i].fw_capab = nic_info.capabilities;
-               np_cfg[i].min_bw = nic_info.min_tx_bw;
-               np_cfg[i].max_bw = nic_info.max_tx_bw;
-               np_cfg[i].max_tx_queues = nic_info.max_tx_ques;
-               np_cfg[i].max_rx_queues = nic_info.max_rx_ques;
+               pci_func = adapter->npars[i].pci_func;
+               if (qlcnic_is_valid_nic_func(adapter, pci_func) < 0)
+                       continue;
+               ret = qlcnic_get_nic_info(adapter, &nic_info, pci_func);
+               if (ret)
+                       return ret;
+
+               np_cfg[pci_func].pci_func = pci_func;
+               np_cfg[pci_func].op_mode = (u8)nic_info.op_mode;
+               np_cfg[pci_func].port_num = nic_info.phys_port;
+               np_cfg[pci_func].fw_capab = nic_info.capabilities;
+               np_cfg[pci_func].min_bw = nic_info.min_tx_bw;
+               np_cfg[pci_func].max_bw = nic_info.max_tx_bw;
+               np_cfg[pci_func].max_tx_queues = nic_info.max_tx_ques;
+               np_cfg[pci_func].max_rx_queues = nic_info.max_rx_ques;
        }
        return size;
 }
index 430bb0d..e36f194 100644 (file)
@@ -365,7 +365,7 @@ __at86rf230_read_subreg(struct at86rf230_local *lp,
        dev_vdbg(&lp->spi->dev, "buf[1] = %02x\n", buf[1]);
 
        if (status == 0)
-               *data = buf[1];
+               *data = (buf[1] & mask) >> shift;
 
        return status;
 }
@@ -1025,14 +1025,6 @@ static int at86rf230_hw_init(struct at86rf230_local *lp)
                return -EINVAL;
        }
 
-       rc = at86rf230_read_subreg(lp, SR_AVDD_OK, &status);
-       if (rc)
-               return rc;
-       if (!status) {
-               dev_err(&lp->spi->dev, "AVDD error\n");
-               return -EINVAL;
-       }
-
        return 0;
 }
 
index c55e316..82355d5 100644 (file)
@@ -1755,8 +1755,8 @@ int vxlan_xmit_skb(struct vxlan_sock *vs,
        if (err)
                return err;
 
-       return iptunnel_xmit(rt, skb, src, dst, IPPROTO_UDP, tos, ttl, df,
-                            false);
+       return iptunnel_xmit(vs->sock->sk, rt, skb, src, dst, IPPROTO_UDP,
+                            tos, ttl, df, false);
 }
 EXPORT_SYMBOL_GPL(vxlan_xmit_skb);
 
index 84734a8..83c39e2 100644 (file)
@@ -1521,11 +1521,7 @@ static int cosa_reset_and_read_id(struct cosa_data *cosa, char *idstring)
        cosa_putstatus(cosa, 0);
        cosa_getdata8(cosa);
        cosa_putstatus(cosa, SR_RST);
-#ifdef MODULE
        msleep(500);
-#else
-       udelay(5*100000);
-#endif
        /* Disable all IRQs from the card */
        cosa_putstatus(cosa, 0);
 
index f72d19b..6d4ee22 100644 (file)
@@ -1828,17 +1828,13 @@ int of_update_property(struct device_node *np, struct property *newprop)
                next = &(*next)->next;
        }
        raw_spin_unlock_irqrestore(&devtree_lock, flags);
-       if (rc)
-               return rc;
+       if (!found)
+               return -ENODEV;
 
        /* Update the sysfs attribute */
-       if (oldprop)
-               sysfs_remove_bin_file(&np->kobj, &oldprop->attr);
+       sysfs_remove_bin_file(&np->kobj, &oldprop->attr);
        __of_add_property_sysfs(np, newprop);
 
-       if (!found)
-               return -ENODEV;
-
        return 0;
 }
 
index fa16a91..7a2ef7b 100644 (file)
@@ -491,7 +491,7 @@ static int __init __reserved_mem_reserve_reg(unsigned long node,
  * in /reserved-memory matches the values supported by the current implementation,
  * also check if ranges property has been provided
  */
-static int __reserved_mem_check_root(unsigned long node)
+static int __init __reserved_mem_check_root(unsigned long node)
 {
        __be32 *prop;
 
index e493240..e00c02d 100644 (file)
@@ -104,16 +104,16 @@ config PINCTRL_BCM2835
        select PINMUX
        select PINCONF
 
-config PINCTRL_CAPRI
-       bool "Broadcom Capri pinctrl driver"
+config PINCTRL_BCM281XX
+       bool "Broadcom BCM281xx pinctrl driver"
        depends on OF
        select PINMUX
        select PINCONF
        select GENERIC_PINCONF
        select REGMAP_MMIO
        help
-         Say Y here to support Broadcom Capri pinctrl driver, which is used for
-         the BCM281xx SoC family, including BCM11130, BCM11140, BCM11351,
+         Say Y here to support Broadcom BCM281xx pinctrl driver, which is used
+         for the BCM281xx SoC family, including BCM11130, BCM11140, BCM11351,
          BCM28145, and BCM28155 SoCs.  This driver requires the pinctrl
          framework.  GPIO is provided by a separate GPIO driver.
 
index 4b83588..6d3fd62 100644 (file)
@@ -21,7 +21,7 @@ obj-$(CONFIG_PINCTRL_BF60x)   += pinctrl-adi2-bf60x.o
 obj-$(CONFIG_PINCTRL_AT91)     += pinctrl-at91.o
 obj-$(CONFIG_PINCTRL_BCM2835)  += pinctrl-bcm2835.o
 obj-$(CONFIG_PINCTRL_BAYTRAIL) += pinctrl-baytrail.o
-obj-$(CONFIG_PINCTRL_CAPRI)    += pinctrl-capri.o
+obj-$(CONFIG_PINCTRL_BCM281XX) += pinctrl-bcm281xx.o
 obj-$(CONFIG_PINCTRL_IMX)      += pinctrl-imx.o
 obj-$(CONFIG_PINCTRL_IMX1_CORE)        += pinctrl-imx1-core.o
 obj-$(CONFIG_PINCTRL_IMX27)    += pinctrl-imx27.o
diff --git a/drivers/pinctrl/pinctrl-bcm281xx.c b/drivers/pinctrl/pinctrl-bcm281xx.c
new file mode 100644 (file)
index 0000000..3bed792
--- /dev/null
@@ -0,0 +1,1461 @@
+/*
+ * Copyright (C) 2013 Broadcom Corporation
+ *
+ * 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 version 2.
+ *
+ * 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/err.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/pinctrl/pinctrl.h>
+#include <linux/pinctrl/pinmux.h>
+#include <linux/pinctrl/pinconf.h>
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/regmap.h>
+#include <linux/slab.h>
+#include "core.h"
+#include "pinctrl-utils.h"
+
+/* BCM281XX Pin Control Registers Definitions */
+
+/* Function Select bits are the same for all pin control registers */
+#define BCM281XX_PIN_REG_F_SEL_MASK            0x0700
+#define BCM281XX_PIN_REG_F_SEL_SHIFT           8
+
+/* Standard pin register */
+#define BCM281XX_STD_PIN_REG_DRV_STR_MASK      0x0007
+#define BCM281XX_STD_PIN_REG_DRV_STR_SHIFT     0
+#define BCM281XX_STD_PIN_REG_INPUT_DIS_MASK    0x0008
+#define BCM281XX_STD_PIN_REG_INPUT_DIS_SHIFT   3
+#define BCM281XX_STD_PIN_REG_SLEW_MASK         0x0010
+#define BCM281XX_STD_PIN_REG_SLEW_SHIFT                4
+#define BCM281XX_STD_PIN_REG_PULL_UP_MASK      0x0020
+#define BCM281XX_STD_PIN_REG_PULL_UP_SHIFT     5
+#define BCM281XX_STD_PIN_REG_PULL_DN_MASK      0x0040
+#define BCM281XX_STD_PIN_REG_PULL_DN_SHIFT     6
+#define BCM281XX_STD_PIN_REG_HYST_MASK         0x0080
+#define BCM281XX_STD_PIN_REG_HYST_SHIFT                7
+
+/* I2C pin register */
+#define BCM281XX_I2C_PIN_REG_INPUT_DIS_MASK    0x0004
+#define BCM281XX_I2C_PIN_REG_INPUT_DIS_SHIFT   2
+#define BCM281XX_I2C_PIN_REG_SLEW_MASK         0x0008
+#define BCM281XX_I2C_PIN_REG_SLEW_SHIFT                3
+#define BCM281XX_I2C_PIN_REG_PULL_UP_STR_MASK  0x0070
+#define BCM281XX_I2C_PIN_REG_PULL_UP_STR_SHIFT 4
+
+/* HDMI pin register */
+#define BCM281XX_HDMI_PIN_REG_INPUT_DIS_MASK   0x0008
+#define BCM281XX_HDMI_PIN_REG_INPUT_DIS_SHIFT  3
+#define BCM281XX_HDMI_PIN_REG_MODE_MASK                0x0010
+#define BCM281XX_HDMI_PIN_REG_MODE_SHIFT       4
+
+/**
+ * bcm281xx_pin_type - types of pin register
+ */
+enum bcm281xx_pin_type {
+       BCM281XX_PIN_TYPE_UNKNOWN = 0,
+       BCM281XX_PIN_TYPE_STD,
+       BCM281XX_PIN_TYPE_I2C,
+       BCM281XX_PIN_TYPE_HDMI,
+};
+
+static enum bcm281xx_pin_type std_pin = BCM281XX_PIN_TYPE_STD;
+static enum bcm281xx_pin_type i2c_pin = BCM281XX_PIN_TYPE_I2C;
+static enum bcm281xx_pin_type hdmi_pin = BCM281XX_PIN_TYPE_HDMI;
+
+/**
+ * bcm281xx_pin_function- define pin function
+ */
+struct bcm281xx_pin_function {
+       const char *name;
+       const char * const *groups;
+       const unsigned ngroups;
+};
+
+/**
+ * bcm281xx_pinctrl_data - Broadcom-specific pinctrl data
+ * @reg_base - base of pinctrl registers
+ */
+struct bcm281xx_pinctrl_data {
+       void __iomem *reg_base;
+
+       /* List of all pins */
+       const struct pinctrl_pin_desc *pins;
+       const unsigned npins;
+
+       const struct bcm281xx_pin_function *functions;
+       const unsigned nfunctions;
+
+       struct regmap *regmap;
+};
+
+/*
+ * Pin number definition.  The order here must be the same as defined in the
+ * PADCTRLREG block in the RDB.
+ */
+#define BCM281XX_PIN_ADCSYNC           0
+#define BCM281XX_PIN_BAT_RM            1
+#define BCM281XX_PIN_BSC1_SCL          2
+#define BCM281XX_PIN_BSC1_SDA          3
+#define BCM281XX_PIN_BSC2_SCL          4
+#define BCM281XX_PIN_BSC2_SDA          5
+#define BCM281XX_PIN_CLASSGPWR         6
+#define BCM281XX_PIN_CLK_CX8           7
+#define BCM281XX_PIN_CLKOUT_0          8
+#define BCM281XX_PIN_CLKOUT_1          9
+#define BCM281XX_PIN_CLKOUT_2          10
+#define BCM281XX_PIN_CLKOUT_3          11
+#define BCM281XX_PIN_CLKREQ_IN_0       12
+#define BCM281XX_PIN_CLKREQ_IN_1       13
+#define BCM281XX_PIN_CWS_SYS_REQ1      14
+#define BCM281XX_PIN_CWS_SYS_REQ2      15
+#define BCM281XX_PIN_CWS_SYS_REQ3      16
+#define BCM281XX_PIN_DIGMIC1_CLK       17
+#define BCM281XX_PIN_DIGMIC1_DQ                18
+#define BCM281XX_PIN_DIGMIC2_CLK       19
+#define BCM281XX_PIN_DIGMIC2_DQ                20
+#define BCM281XX_PIN_GPEN13            21
+#define BCM281XX_PIN_GPEN14            22
+#define BCM281XX_PIN_GPEN15            23
+#define BCM281XX_PIN_GPIO00            24
+#define BCM281XX_PIN_GPIO01            25
+#define BCM281XX_PIN_GPIO02            26
+#define BCM281XX_PIN_GPIO03            27
+#define BCM281XX_PIN_GPIO04            28
+#define BCM281XX_PIN_GPIO05            29
+#define BCM281XX_PIN_GPIO06            30
+#define BCM281XX_PIN_GPIO07            31
+#define BCM281XX_PIN_GPIO08            32
+#define BCM281XX_PIN_GPIO09            33
+#define BCM281XX_PIN_GPIO10            34
+#define BCM281XX_PIN_GPIO11            35
+#define BCM281XX_PIN_GPIO12            36
+#define BCM281XX_PIN_GPIO13            37
+#define BCM281XX_PIN_GPIO14            38
+#define BCM281XX_PIN_GPS_PABLANK       39
+#define BCM281XX_PIN_GPS_TMARK         40
+#define BCM281XX_PIN_HDMI_SCL          41
+#define BCM281XX_PIN_HDMI_SDA          42
+#define BCM281XX_PIN_IC_DM             43
+#define BCM281XX_PIN_IC_DP             44
+#define BCM281XX_PIN_KP_COL_IP_0       45
+#define BCM281XX_PIN_KP_COL_IP_1       46
+#define BCM281XX_PIN_KP_COL_IP_2       47
+#define BCM281XX_PIN_KP_COL_IP_3       48
+#define BCM281XX_PIN_KP_ROW_OP_0       49
+#define BCM281XX_PIN_KP_ROW_OP_1       50
+#define BCM281XX_PIN_KP_ROW_OP_2       51
+#define BCM281XX_PIN_KP_ROW_OP_3       52
+#define BCM281XX_PIN_LCD_B_0           53
+#define BCM281XX_PIN_LCD_B_1           54
+#define BCM281XX_PIN_LCD_B_2           55
+#define BCM281XX_PIN_LCD_B_3           56
+#define BCM281XX_PIN_LCD_B_4           57
+#define BCM281XX_PIN_LCD_B_5           58
+#define BCM281XX_PIN_LCD_B_6           59
+#define BCM281XX_PIN_LCD_B_7           60
+#define BCM281XX_PIN_LCD_G_0           61
+#define BCM281XX_PIN_LCD_G_1           62
+#define BCM281XX_PIN_LCD_G_2           63
+#define BCM281XX_PIN_LCD_G_3           64
+#define BCM281XX_PIN_LCD_G_4           65
+#define BCM281XX_PIN_LCD_G_5           66
+#define BCM281XX_PIN_LCD_G_6           67
+#define BCM281XX_PIN_LCD_G_7           68
+#define BCM281XX_PIN_LCD_HSYNC         69
+#define BCM281XX_PIN_LCD_OE            70
+#define BCM281XX_PIN_LCD_PCLK          71
+#define BCM281XX_PIN_LCD_R_0           72
+#define BCM281XX_PIN_LCD_R_1           73
+#define BCM281XX_PIN_LCD_R_2           74
+#define BCM281XX_PIN_LCD_R_3           75
+#define BCM281XX_PIN_LCD_R_4           76
+#define BCM281XX_PIN_LCD_R_5           77
+#define BCM281XX_PIN_LCD_R_6           78
+#define BCM281XX_PIN_LCD_R_7           79
+#define BCM281XX_PIN_LCD_VSYNC         80
+#define BCM281XX_PIN_MDMGPIO0          81
+#define BCM281XX_PIN_MDMGPIO1          82
+#define BCM281XX_PIN_MDMGPIO2          83
+#define BCM281XX_PIN_MDMGPIO3          84
+#define BCM281XX_PIN_MDMGPIO4          85
+#define BCM281XX_PIN_MDMGPIO5          86
+#define BCM281XX_PIN_MDMGPIO6          87
+#define BCM281XX_PIN_MDMGPIO7          88
+#define BCM281XX_PIN_MDMGPIO8          89
+#define BCM281XX_PIN_MPHI_DATA_0       90
+#define BCM281XX_PIN_MPHI_DATA_1       91
+#define BCM281XX_PIN_MPHI_DATA_2       92
+#define BCM281XX_PIN_MPHI_DATA_3       93
+#define BCM281XX_PIN_MPHI_DATA_4       94
+#define BCM281XX_PIN_MPHI_DATA_5       95
+#define BCM281XX_PIN_MPHI_DATA_6       96
+#define BCM281XX_PIN_MPHI_DATA_7       97
+#define BCM281XX_PIN_MPHI_DATA_8       98
+#define BCM281XX_PIN_MPHI_DATA_9       99
+#define BCM281XX_PIN_MPHI_DATA_10      100
+#define BCM281XX_PIN_MPHI_DATA_11      101
+#define BCM281XX_PIN_MPHI_DATA_12      102
+#define BCM281XX_PIN_MPHI_DATA_13      103
+#define BCM281XX_PIN_MPHI_DATA_14      104
+#define BCM281XX_PIN_MPHI_DATA_15      105
+#define BCM281XX_PIN_MPHI_HA0          106
+#define BCM281XX_PIN_MPHI_HAT0         107
+#define BCM281XX_PIN_MPHI_HAT1         108
+#define BCM281XX_PIN_MPHI_HCE0_N       109
+#define BCM281XX_PIN_MPHI_HCE1_N       110
+#define BCM281XX_PIN_MPHI_HRD_N                111
+#define BCM281XX_PIN_MPHI_HWR_N                112
+#define BCM281XX_PIN_MPHI_RUN0         113
+#define BCM281XX_PIN_MPHI_RUN1         114
+#define BCM281XX_PIN_MTX_SCAN_CLK      115
+#define BCM281XX_PIN_MTX_SCAN_DATA     116
+#define BCM281XX_PIN_NAND_AD_0         117
+#define BCM281XX_PIN_NAND_AD_1         118
+#define BCM281XX_PIN_NAND_AD_2         119
+#define BCM281XX_PIN_NAND_AD_3         120
+#define BCM281XX_PIN_NAND_AD_4         121
+#define BCM281XX_PIN_NAND_AD_5         122
+#define BCM281XX_PIN_NAND_AD_6         123
+#define BCM281XX_PIN_NAND_AD_7         124
+#define BCM281XX_PIN_NAND_ALE          125
+#define BCM281XX_PIN_NAND_CEN_0                126
+#define BCM281XX_PIN_NAND_CEN_1                127
+#define BCM281XX_PIN_NAND_CLE          128
+#define BCM281XX_PIN_NAND_OEN          129
+#define BCM281XX_PIN_NAND_RDY_0                130
+#define BCM281XX_PIN_NAND_RDY_1                131
+#define BCM281XX_PIN_NAND_WEN          132
+#define BCM281XX_PIN_NAND_WP           133
+#define BCM281XX_PIN_PC1               134
+#define BCM281XX_PIN_PC2               135
+#define BCM281XX_PIN_PMU_INT           136
+#define BCM281XX_PIN_PMU_SCL           137
+#define BCM281XX_PIN_PMU_SDA           138
+#define BCM281XX_PIN_RFST2G_MTSLOTEN3G 139
+#define BCM281XX_PIN_RGMII_0_RX_CTL    140
+#define BCM281XX_PIN_RGMII_0_RXC       141
+#define BCM281XX_PIN_RGMII_0_RXD_0     142
+#define BCM281XX_PIN_RGMII_0_RXD_1     143
+#define BCM281XX_PIN_RGMII_0_RXD_2     144
+#define BCM281XX_PIN_RGMII_0_RXD_3     145
+#define BCM281XX_PIN_RGMII_0_TX_CTL    146
+#define BCM281XX_PIN_RGMII_0_TXC       147
+#define BCM281XX_PIN_RGMII_0_TXD_0     148
+#define BCM281XX_PIN_RGMII_0_TXD_1     149
+#define BCM281XX_PIN_RGMII_0_TXD_2     150
+#define BCM281XX_PIN_RGMII_0_TXD_3     151
+#define BCM281XX_PIN_RGMII_1_RX_CTL    152
+#define BCM281XX_PIN_RGMII_1_RXC       153
+#define BCM281XX_PIN_RGMII_1_RXD_0     154
+#define BCM281XX_PIN_RGMII_1_RXD_1     155
+#define BCM281XX_PIN_RGMII_1_RXD_2     156
+#define BCM281XX_PIN_RGMII_1_RXD_3     157
+#define BCM281XX_PIN_RGMII_1_TX_CTL    158
+#define BCM281XX_PIN_RGMII_1_TXC       159
+#define BCM281XX_PIN_RGMII_1_TXD_0     160
+#define BCM281XX_PIN_RGMII_1_TXD_1     161
+#define BCM281XX_PIN_RGMII_1_TXD_2     162
+#define BCM281XX_PIN_RGMII_1_TXD_3     163
+#define BCM281XX_PIN_RGMII_GPIO_0      164
+#define BCM281XX_PIN_RGMII_GPIO_1      165
+#define BCM281XX_PIN_RGMII_GPIO_2      166
+#define BCM281XX_PIN_RGMII_GPIO_3      167
+#define BCM281XX_PIN_RTXDATA2G_TXDATA3G1       168
+#define BCM281XX_PIN_RTXEN2G_TXDATA3G2 169
+#define BCM281XX_PIN_RXDATA3G0         170
+#define BCM281XX_PIN_RXDATA3G1         171
+#define BCM281XX_PIN_RXDATA3G2         172
+#define BCM281XX_PIN_SDIO1_CLK         173
+#define BCM281XX_PIN_SDIO1_CMD         174
+#define BCM281XX_PIN_SDIO1_DATA_0      175
+#define BCM281XX_PIN_SDIO1_DATA_1      176
+#define BCM281XX_PIN_SDIO1_DATA_2      177
+#define BCM281XX_PIN_SDIO1_DATA_3      178
+#define BCM281XX_PIN_SDIO4_CLK         179
+#define BCM281XX_PIN_SDIO4_CMD         180
+#define BCM281XX_PIN_SDIO4_DATA_0      181
+#define BCM281XX_PIN_SDIO4_DATA_1      182
+#define BCM281XX_PIN_SDIO4_DATA_2      183
+#define BCM281XX_PIN_SDIO4_DATA_3      184
+#define BCM281XX_PIN_SIM_CLK           185
+#define BCM281XX_PIN_SIM_DATA          186
+#define BCM281XX_PIN_SIM_DET           187
+#define BCM281XX_PIN_SIM_RESETN                188
+#define BCM281XX_PIN_SIM2_CLK          189
+#define BCM281XX_PIN_SIM2_DATA         190
+#define BCM281XX_PIN_SIM2_DET          191
+#define BCM281XX_PIN_SIM2_RESETN       192
+#define BCM281XX_PIN_SRI_C             193
+#define BCM281XX_PIN_SRI_D             194
+#define BCM281XX_PIN_SRI_E             195
+#define BCM281XX_PIN_SSP_EXTCLK                196
+#define BCM281XX_PIN_SSP0_CLK          197
+#define BCM281XX_PIN_SSP0_FS           198
+#define BCM281XX_PIN_SSP0_RXD          199
+#define BCM281XX_PIN_SSP0_TXD          200
+#define BCM281XX_PIN_SSP2_CLK          201
+#define BCM281XX_PIN_SSP2_FS_0         202
+#define BCM281XX_PIN_SSP2_FS_1         203
+#define BCM281XX_PIN_SSP2_FS_2         204
+#define BCM281XX_PIN_SSP2_FS_3         205
+#define BCM281XX_PIN_SSP2_RXD_0                206
+#define BCM281XX_PIN_SSP2_RXD_1                207
+#define BCM281XX_PIN_SSP2_TXD_0                208
+#define BCM281XX_PIN_SSP2_TXD_1                209
+#define BCM281XX_PIN_SSP3_CLK          210
+#define BCM281XX_PIN_SSP3_FS           211
+#define BCM281XX_PIN_SSP3_RXD          212
+#define BCM281XX_PIN_SSP3_TXD          213
+#define BCM281XX_PIN_SSP4_CLK          214
+#define BCM281XX_PIN_SSP4_FS           215
+#define BCM281XX_PIN_SSP4_RXD          216
+#define BCM281XX_PIN_SSP4_TXD          217
+#define BCM281XX_PIN_SSP5_CLK          218
+#define BCM281XX_PIN_SSP5_FS           219
+#define BCM281XX_PIN_SSP5_RXD          220
+#define BCM281XX_PIN_SSP5_TXD          221
+#define BCM281XX_PIN_SSP6_CLK          222
+#define BCM281XX_PIN_SSP6_FS           223
+#define BCM281XX_PIN_SSP6_RXD          224
+#define BCM281XX_PIN_SSP6_TXD          225
+#define BCM281XX_PIN_STAT_1            226
+#define BCM281XX_PIN_STAT_2            227
+#define BCM281XX_PIN_SYSCLKEN          228
+#define BCM281XX_PIN_TRACECLK          229
+#define BCM281XX_PIN_TRACEDT00         230
+#define BCM281XX_PIN_TRACEDT01         231
+#define BCM281XX_PIN_TRACEDT02         232
+#define BCM281XX_PIN_TRACEDT03         233
+#define BCM281XX_PIN_TRACEDT04         234
+#define BCM281XX_PIN_TRACEDT05         235
+#define BCM281XX_PIN_TRACEDT06         236
+#define BCM281XX_PIN_TRACEDT07         237
+#define BCM281XX_PIN_TRACEDT08         238
+#define BCM281XX_PIN_TRACEDT09         239
+#define BCM281XX_PIN_TRACEDT10         240
+#define BCM281XX_PIN_TRACEDT11         241
+#define BCM281XX_PIN_TRACEDT12         242
+#define BCM281XX_PIN_TRACEDT13         243
+#define BCM281XX_PIN_TRACEDT14         244
+#define BCM281XX_PIN_TRACEDT15         245
+#define BCM281XX_PIN_TXDATA3G0         246
+#define BCM281XX_PIN_TXPWRIND          247
+#define BCM281XX_PIN_UARTB1_UCTS       248
+#define BCM281XX_PIN_UARTB1_URTS       249
+#define BCM281XX_PIN_UARTB1_URXD       250
+#define BCM281XX_PIN_UARTB1_UTXD       251
+#define BCM281XX_PIN_UARTB2_URXD       252
+#define BCM281XX_PIN_UARTB2_UTXD       253
+#define BCM281XX_PIN_UARTB3_UCTS       254
+#define BCM281XX_PIN_UARTB3_URTS       255
+#define BCM281XX_PIN_UARTB3_URXD       256
+#define BCM281XX_PIN_UARTB3_UTXD       257
+#define BCM281XX_PIN_UARTB4_UCTS       258
+#define BCM281XX_PIN_UARTB4_URTS       259
+#define BCM281XX_PIN_UARTB4_URXD       260
+#define BCM281XX_PIN_UARTB4_UTXD       261
+#define BCM281XX_PIN_VC_CAM1_SCL       262
+#define BCM281XX_PIN_VC_CAM1_SDA       263
+#define BCM281XX_PIN_VC_CAM2_SCL       264
+#define BCM281XX_PIN_VC_CAM2_SDA       265
+#define BCM281XX_PIN_VC_CAM3_SCL       266
+#define BCM281XX_PIN_VC_CAM3_SDA       267
+
+#define BCM281XX_PIN_DESC(a, b, c) \
+       { .number = a, .name = b, .drv_data = &c##_pin }
+
+/*
+ * Pin description definition.  The order here must be the same as defined in
+ * the PADCTRLREG block in the RDB, since the pin number is used as an index
+ * into this array.
+ */
+static const struct pinctrl_pin_desc bcm281xx_pinctrl_pins[] = {
+       BCM281XX_PIN_DESC(BCM281XX_PIN_ADCSYNC, "adcsync", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_BAT_RM, "bat_rm", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_BSC1_SCL, "bsc1_scl", i2c),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_BSC1_SDA, "bsc1_sda", i2c),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_BSC2_SCL, "bsc2_scl", i2c),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_BSC2_SDA, "bsc2_sda", i2c),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_CLASSGPWR, "classgpwr", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_CLK_CX8, "clk_cx8", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_CLKOUT_0, "clkout_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_CLKOUT_1, "clkout_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_CLKOUT_2, "clkout_2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_CLKOUT_3, "clkout_3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_CLKREQ_IN_0, "clkreq_in_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_CLKREQ_IN_1, "clkreq_in_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_CWS_SYS_REQ1, "cws_sys_req1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_CWS_SYS_REQ2, "cws_sys_req2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_CWS_SYS_REQ3, "cws_sys_req3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_DIGMIC1_CLK, "digmic1_clk", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_DIGMIC1_DQ, "digmic1_dq", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_DIGMIC2_CLK, "digmic2_clk", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_DIGMIC2_DQ, "digmic2_dq", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPEN13, "gpen13", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPEN14, "gpen14", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPEN15, "gpen15", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPIO00, "gpio00", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPIO01, "gpio01", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPIO02, "gpio02", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPIO03, "gpio03", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPIO04, "gpio04", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPIO05, "gpio05", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPIO06, "gpio06", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPIO07, "gpio07", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPIO08, "gpio08", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPIO09, "gpio09", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPIO10, "gpio10", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPIO11, "gpio11", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPIO12, "gpio12", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPIO13, "gpio13", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPIO14, "gpio14", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPS_PABLANK, "gps_pablank", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_GPS_TMARK, "gps_tmark", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_HDMI_SCL, "hdmi_scl", hdmi),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_HDMI_SDA, "hdmi_sda", hdmi),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_IC_DM, "ic_dm", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_IC_DP, "ic_dp", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_KP_COL_IP_0, "kp_col_ip_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_KP_COL_IP_1, "kp_col_ip_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_KP_COL_IP_2, "kp_col_ip_2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_KP_COL_IP_3, "kp_col_ip_3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_KP_ROW_OP_0, "kp_row_op_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_KP_ROW_OP_1, "kp_row_op_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_KP_ROW_OP_2, "kp_row_op_2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_KP_ROW_OP_3, "kp_row_op_3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_B_0, "lcd_b_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_B_1, "lcd_b_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_B_2, "lcd_b_2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_B_3, "lcd_b_3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_B_4, "lcd_b_4", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_B_5, "lcd_b_5", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_B_6, "lcd_b_6", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_B_7, "lcd_b_7", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_G_0, "lcd_g_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_G_1, "lcd_g_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_G_2, "lcd_g_2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_G_3, "lcd_g_3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_G_4, "lcd_g_4", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_G_5, "lcd_g_5", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_G_6, "lcd_g_6", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_G_7, "lcd_g_7", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_HSYNC, "lcd_hsync", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_OE, "lcd_oe", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_PCLK, "lcd_pclk", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_R_0, "lcd_r_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_R_1, "lcd_r_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_R_2, "lcd_r_2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_R_3, "lcd_r_3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_R_4, "lcd_r_4", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_R_5, "lcd_r_5", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_R_6, "lcd_r_6", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_R_7, "lcd_r_7", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_LCD_VSYNC, "lcd_vsync", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MDMGPIO0, "mdmgpio0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MDMGPIO1, "mdmgpio1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MDMGPIO2, "mdmgpio2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MDMGPIO3, "mdmgpio3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MDMGPIO4, "mdmgpio4", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MDMGPIO5, "mdmgpio5", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MDMGPIO6, "mdmgpio6", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MDMGPIO7, "mdmgpio7", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MDMGPIO8, "mdmgpio8", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_DATA_0, "mphi_data_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_DATA_1, "mphi_data_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_DATA_2, "mphi_data_2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_DATA_3, "mphi_data_3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_DATA_4, "mphi_data_4", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_DATA_5, "mphi_data_5", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_DATA_6, "mphi_data_6", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_DATA_7, "mphi_data_7", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_DATA_8, "mphi_data_8", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_DATA_9, "mphi_data_9", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_DATA_10, "mphi_data_10", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_DATA_11, "mphi_data_11", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_DATA_12, "mphi_data_12", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_DATA_13, "mphi_data_13", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_DATA_14, "mphi_data_14", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_DATA_15, "mphi_data_15", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_HA0, "mphi_ha0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_HAT0, "mphi_hat0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_HAT1, "mphi_hat1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_HCE0_N, "mphi_hce0_n", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_HCE1_N, "mphi_hce1_n", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_HRD_N, "mphi_hrd_n", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_HWR_N, "mphi_hwr_n", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_RUN0, "mphi_run0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MPHI_RUN1, "mphi_run1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MTX_SCAN_CLK, "mtx_scan_clk", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_MTX_SCAN_DATA, "mtx_scan_data", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_NAND_AD_0, "nand_ad_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_NAND_AD_1, "nand_ad_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_NAND_AD_2, "nand_ad_2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_NAND_AD_3, "nand_ad_3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_NAND_AD_4, "nand_ad_4", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_NAND_AD_5, "nand_ad_5", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_NAND_AD_6, "nand_ad_6", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_NAND_AD_7, "nand_ad_7", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_NAND_ALE, "nand_ale", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_NAND_CEN_0, "nand_cen_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_NAND_CEN_1, "nand_cen_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_NAND_CLE, "nand_cle", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_NAND_OEN, "nand_oen", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_NAND_RDY_0, "nand_rdy_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_NAND_RDY_1, "nand_rdy_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_NAND_WEN, "nand_wen", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_NAND_WP, "nand_wp", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_PC1, "pc1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_PC2, "pc2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_PMU_INT, "pmu_int", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_PMU_SCL, "pmu_scl", i2c),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_PMU_SDA, "pmu_sda", i2c),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RFST2G_MTSLOTEN3G, "rfst2g_mtsloten3g",
+               std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_0_RX_CTL, "rgmii_0_rx_ctl", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_0_RXC, "rgmii_0_rxc", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_0_RXD_0, "rgmii_0_rxd_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_0_RXD_1, "rgmii_0_rxd_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_0_RXD_2, "rgmii_0_rxd_2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_0_RXD_3, "rgmii_0_rxd_3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_0_TX_CTL, "rgmii_0_tx_ctl", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_0_TXC, "rgmii_0_txc", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_0_TXD_0, "rgmii_0_txd_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_0_TXD_1, "rgmii_0_txd_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_0_TXD_2, "rgmii_0_txd_2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_0_TXD_3, "rgmii_0_txd_3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_1_RX_CTL, "rgmii_1_rx_ctl", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_1_RXC, "rgmii_1_rxc", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_1_RXD_0, "rgmii_1_rxd_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_1_RXD_1, "rgmii_1_rxd_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_1_RXD_2, "rgmii_1_rxd_2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_1_RXD_3, "rgmii_1_rxd_3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_1_TX_CTL, "rgmii_1_tx_ctl", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_1_TXC, "rgmii_1_txc", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_1_TXD_0, "rgmii_1_txd_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_1_TXD_1, "rgmii_1_txd_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_1_TXD_2, "rgmii_1_txd_2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_1_TXD_3, "rgmii_1_txd_3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_GPIO_0, "rgmii_gpio_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_GPIO_1, "rgmii_gpio_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_GPIO_2, "rgmii_gpio_2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RGMII_GPIO_3, "rgmii_gpio_3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RTXDATA2G_TXDATA3G1,
+               "rtxdata2g_txdata3g1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RTXEN2G_TXDATA3G2, "rtxen2g_txdata3g2",
+               std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RXDATA3G0, "rxdata3g0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RXDATA3G1, "rxdata3g1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_RXDATA3G2, "rxdata3g2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SDIO1_CLK, "sdio1_clk", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SDIO1_CMD, "sdio1_cmd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SDIO1_DATA_0, "sdio1_data_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SDIO1_DATA_1, "sdio1_data_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SDIO1_DATA_2, "sdio1_data_2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SDIO1_DATA_3, "sdio1_data_3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SDIO4_CLK, "sdio4_clk", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SDIO4_CMD, "sdio4_cmd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SDIO4_DATA_0, "sdio4_data_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SDIO4_DATA_1, "sdio4_data_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SDIO4_DATA_2, "sdio4_data_2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SDIO4_DATA_3, "sdio4_data_3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SIM_CLK, "sim_clk", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SIM_DATA, "sim_data", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SIM_DET, "sim_det", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SIM_RESETN, "sim_resetn", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SIM2_CLK, "sim2_clk", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SIM2_DATA, "sim2_data", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SIM2_DET, "sim2_det", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SIM2_RESETN, "sim2_resetn", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SRI_C, "sri_c", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SRI_D, "sri_d", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SRI_E, "sri_e", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP_EXTCLK, "ssp_extclk", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP0_CLK, "ssp0_clk", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP0_FS, "ssp0_fs", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP0_RXD, "ssp0_rxd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP0_TXD, "ssp0_txd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP2_CLK, "ssp2_clk", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP2_FS_0, "ssp2_fs_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP2_FS_1, "ssp2_fs_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP2_FS_2, "ssp2_fs_2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP2_FS_3, "ssp2_fs_3", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP2_RXD_0, "ssp2_rxd_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP2_RXD_1, "ssp2_rxd_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP2_TXD_0, "ssp2_txd_0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP2_TXD_1, "ssp2_txd_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP3_CLK, "ssp3_clk", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP3_FS, "ssp3_fs", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP3_RXD, "ssp3_rxd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP3_TXD, "ssp3_txd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP4_CLK, "ssp4_clk", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP4_FS, "ssp4_fs", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP4_RXD, "ssp4_rxd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP4_TXD, "ssp4_txd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP5_CLK, "ssp5_clk", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP5_FS, "ssp5_fs", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP5_RXD, "ssp5_rxd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP5_TXD, "ssp5_txd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP6_CLK, "ssp6_clk", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP6_FS, "ssp6_fs", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP6_RXD, "ssp6_rxd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SSP6_TXD, "ssp6_txd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_STAT_1, "stat_1", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_STAT_2, "stat_2", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_SYSCLKEN, "sysclken", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TRACECLK, "traceclk", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TRACEDT00, "tracedt00", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TRACEDT01, "tracedt01", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TRACEDT02, "tracedt02", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TRACEDT03, "tracedt03", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TRACEDT04, "tracedt04", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TRACEDT05, "tracedt05", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TRACEDT06, "tracedt06", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TRACEDT07, "tracedt07", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TRACEDT08, "tracedt08", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TRACEDT09, "tracedt09", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TRACEDT10, "tracedt10", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TRACEDT11, "tracedt11", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TRACEDT12, "tracedt12", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TRACEDT13, "tracedt13", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TRACEDT14, "tracedt14", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TRACEDT15, "tracedt15", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TXDATA3G0, "txdata3g0", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_TXPWRIND, "txpwrind", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_UARTB1_UCTS, "uartb1_ucts", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_UARTB1_URTS, "uartb1_urts", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_UARTB1_URXD, "uartb1_urxd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_UARTB1_UTXD, "uartb1_utxd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_UARTB2_URXD, "uartb2_urxd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_UARTB2_UTXD, "uartb2_utxd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_UARTB3_UCTS, "uartb3_ucts", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_UARTB3_URTS, "uartb3_urts", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_UARTB3_URXD, "uartb3_urxd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_UARTB3_UTXD, "uartb3_utxd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_UARTB4_UCTS, "uartb4_ucts", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_UARTB4_URTS, "uartb4_urts", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_UARTB4_URXD, "uartb4_urxd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_UARTB4_UTXD, "uartb4_utxd", std),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_VC_CAM1_SCL, "vc_cam1_scl", i2c),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_VC_CAM1_SDA, "vc_cam1_sda", i2c),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_VC_CAM2_SCL, "vc_cam2_scl", i2c),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_VC_CAM2_SDA, "vc_cam2_sda", i2c),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_VC_CAM3_SCL, "vc_cam3_scl", i2c),
+       BCM281XX_PIN_DESC(BCM281XX_PIN_VC_CAM3_SDA, "vc_cam3_sda", i2c),
+};
+
+static const char * const bcm281xx_alt_groups[] = {
+       "adcsync",
+       "bat_rm",
+       "bsc1_scl",
+       "bsc1_sda",
+       "bsc2_scl",
+       "bsc2_sda",
+       "classgpwr",
+       "clk_cx8",
+       "clkout_0",
+       "clkout_1",
+       "clkout_2",
+       "clkout_3",
+       "clkreq_in_0",
+       "clkreq_in_1",
+       "cws_sys_req1",
+       "cws_sys_req2",
+       "cws_sys_req3",
+       "digmic1_clk",
+       "digmic1_dq",
+       "digmic2_clk",
+       "digmic2_dq",
+       "gpen13",
+       "gpen14",
+       "gpen15",
+       "gpio00",
+       "gpio01",
+       "gpio02",
+       "gpio03",
+       "gpio04",
+       "gpio05",
+       "gpio06",
+       "gpio07",
+       "gpio08",
+       "gpio09",
+       "gpio10",
+       "gpio11",
+       "gpio12",
+       "gpio13",
+       "gpio14",
+       "gps_pablank",
+       "gps_tmark",
+       "hdmi_scl",
+       "hdmi_sda",
+       "ic_dm",
+       "ic_dp",
+       "kp_col_ip_0",
+       "kp_col_ip_1",
+       "kp_col_ip_2",
+       "kp_col_ip_3",
+       "kp_row_op_0",
+       "kp_row_op_1",
+       "kp_row_op_2",
+       "kp_row_op_3",
+       "lcd_b_0",
+       "lcd_b_1",
+       "lcd_b_2",
+       "lcd_b_3",
+       "lcd_b_4",
+       "lcd_b_5",
+       "lcd_b_6",
+       "lcd_b_7",
+       "lcd_g_0",
+       "lcd_g_1",
+       "lcd_g_2",
+       "lcd_g_3",
+       "lcd_g_4",
+       "lcd_g_5",
+       "lcd_g_6",
+       "lcd_g_7",
+       "lcd_hsync",
+       "lcd_oe",
+       "lcd_pclk",
+       "lcd_r_0",
+       "lcd_r_1",
+       "lcd_r_2",
+       "lcd_r_3",
+       "lcd_r_4",
+       "lcd_r_5",
+       "lcd_r_6",
+       "lcd_r_7",
+       "lcd_vsync",
+       "mdmgpio0",
+       "mdmgpio1",
+       "mdmgpio2",
+       "mdmgpio3",
+       "mdmgpio4",
+       "mdmgpio5",
+       "mdmgpio6",
+       "mdmgpio7",
+       "mdmgpio8",
+       "mphi_data_0",
+       "mphi_data_1",
+       "mphi_data_2",
+       "mphi_data_3",
+       "mphi_data_4",
+       "mphi_data_5",
+       "mphi_data_6",
+       "mphi_data_7",
+       "mphi_data_8",
+       "mphi_data_9",
+       "mphi_data_10",
+       "mphi_data_11",
+       "mphi_data_12",
+       "mphi_data_13",
+       "mphi_data_14",
+       "mphi_data_15",
+       "mphi_ha0",
+       "mphi_hat0",
+       "mphi_hat1",
+       "mphi_hce0_n",
+       "mphi_hce1_n",
+       "mphi_hrd_n",
+       "mphi_hwr_n",
+       "mphi_run0",
+       "mphi_run1",
+       "mtx_scan_clk",
+       "mtx_scan_data",
+       "nand_ad_0",
+       "nand_ad_1",
+       "nand_ad_2",
+       "nand_ad_3",
+       "nand_ad_4",
+       "nand_ad_5",
+       "nand_ad_6",
+       "nand_ad_7",
+       "nand_ale",
+       "nand_cen_0",
+       "nand_cen_1",
+       "nand_cle",
+       "nand_oen",
+       "nand_rdy_0",
+       "nand_rdy_1",
+       "nand_wen",
+       "nand_wp",
+       "pc1",
+       "pc2",
+       "pmu_int",
+       "pmu_scl",
+       "pmu_sda",
+       "rfst2g_mtsloten3g",
+       "rgmii_0_rx_ctl",
+       "rgmii_0_rxc",
+       "rgmii_0_rxd_0",
+       "rgmii_0_rxd_1",
+       "rgmii_0_rxd_2",
+       "rgmii_0_rxd_3",
+       "rgmii_0_tx_ctl",
+       "rgmii_0_txc",
+       "rgmii_0_txd_0",
+       "rgmii_0_txd_1",
+       "rgmii_0_txd_2",
+       "rgmii_0_txd_3",
+       "rgmii_1_rx_ctl",
+       "rgmii_1_rxc",
+       "rgmii_1_rxd_0",
+       "rgmii_1_rxd_1",
+       "rgmii_1_rxd_2",
+       "rgmii_1_rxd_3",
+       "rgmii_1_tx_ctl",
+       "rgmii_1_txc",
+       "rgmii_1_txd_0",
+       "rgmii_1_txd_1",
+       "rgmii_1_txd_2",
+       "rgmii_1_txd_3",
+       "rgmii_gpio_0",
+       "rgmii_gpio_1",
+       "rgmii_gpio_2",
+       "rgmii_gpio_3",
+       "rtxdata2g_txdata3g1",
+       "rtxen2g_txdata3g2",
+       "rxdata3g0",
+       "rxdata3g1",
+       "rxdata3g2",
+       "sdio1_clk",
+       "sdio1_cmd",
+       "sdio1_data_0",
+       "sdio1_data_1",
+       "sdio1_data_2",
+       "sdio1_data_3",
+       "sdio4_clk",
+       "sdio4_cmd",
+       "sdio4_data_0",
+       "sdio4_data_1",
+       "sdio4_data_2",
+       "sdio4_data_3",
+       "sim_clk",
+       "sim_data",
+       "sim_det",
+       "sim_resetn",
+       "sim2_clk",
+       "sim2_data",
+       "sim2_det",
+       "sim2_resetn",
+       "sri_c",
+       "sri_d",
+       "sri_e",
+       "ssp_extclk",
+       "ssp0_clk",
+       "ssp0_fs",
+       "ssp0_rxd",
+       "ssp0_txd",
+       "ssp2_clk",
+       "ssp2_fs_0",
+       "ssp2_fs_1",
+       "ssp2_fs_2",
+       "ssp2_fs_3",
+       "ssp2_rxd_0",
+       "ssp2_rxd_1",
+       "ssp2_txd_0",
+       "ssp2_txd_1",
+       "ssp3_clk",
+       "ssp3_fs",
+       "ssp3_rxd",
+       "ssp3_txd",
+       "ssp4_clk",
+       "ssp4_fs",
+       "ssp4_rxd",
+       "ssp4_txd",
+       "ssp5_clk",
+       "ssp5_fs",
+       "ssp5_rxd",
+       "ssp5_txd",
+       "ssp6_clk",
+       "ssp6_fs",
+       "ssp6_rxd",
+       "ssp6_txd",
+       "stat_1",
+       "stat_2",
+       "sysclken",
+       "traceclk",
+       "tracedt00",
+       "tracedt01",
+       "tracedt02",
+       "tracedt03",
+       "tracedt04",
+       "tracedt05",
+       "tracedt06",
+       "tracedt07",
+       "tracedt08",
+       "tracedt09",
+       "tracedt10",
+       "tracedt11",
+       "tracedt12",
+       "tracedt13",
+       "tracedt14",
+       "tracedt15",
+       "txdata3g0",
+       "txpwrind",
+       "uartb1_ucts",
+       "uartb1_urts",
+       "uartb1_urxd",
+       "uartb1_utxd",
+       "uartb2_urxd",
+       "uartb2_utxd",
+       "uartb3_ucts",
+       "uartb3_urts",
+       "uartb3_urxd",
+       "uartb3_utxd",
+       "uartb4_ucts",
+       "uartb4_urts",
+       "uartb4_urxd",
+       "uartb4_utxd",
+       "vc_cam1_scl",
+       "vc_cam1_sda",
+       "vc_cam2_scl",
+       "vc_cam2_sda",
+       "vc_cam3_scl",
+       "vc_cam3_sda",
+};
+
+/* Every pin can implement all ALT1-ALT4 functions */
+#define BCM281XX_PIN_FUNCTION(fcn_name)                        \
+{                                                      \
+       .name = #fcn_name,                              \
+       .groups = bcm281xx_alt_groups,                  \
+       .ngroups = ARRAY_SIZE(bcm281xx_alt_groups),     \
+}
+
+static const struct bcm281xx_pin_function bcm281xx_functions[] = {
+       BCM281XX_PIN_FUNCTION(alt1),
+       BCM281XX_PIN_FUNCTION(alt2),
+       BCM281XX_PIN_FUNCTION(alt3),
+       BCM281XX_PIN_FUNCTION(alt4),
+};
+
+static struct bcm281xx_pinctrl_data bcm281xx_pinctrl = {
+       .pins = bcm281xx_pinctrl_pins,
+       .npins = ARRAY_SIZE(bcm281xx_pinctrl_pins),
+       .functions = bcm281xx_functions,
+       .nfunctions = ARRAY_SIZE(bcm281xx_functions),
+};
+
+static inline enum bcm281xx_pin_type pin_type_get(struct pinctrl_dev *pctldev,
+                                                 unsigned pin)
+{
+       struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
+
+       if (pin >= pdata->npins)
+               return BCM281XX_PIN_TYPE_UNKNOWN;
+
+       return *(enum bcm281xx_pin_type *)(pdata->pins[pin].drv_data);
+}
+
+#define BCM281XX_PIN_SHIFT(type, param) \
+       (BCM281XX_ ## type ## _PIN_REG_ ## param ## _SHIFT)
+
+#define BCM281XX_PIN_MASK(type, param) \
+       (BCM281XX_ ## type ## _PIN_REG_ ## param ## _MASK)
+
+/*
+ * This helper function is used to build up the value and mask used to write to
+ * a pin register, but does not actually write to the register.
+ */
+static inline void bcm281xx_pin_update(u32 *reg_val, u32 *reg_mask,
+                                      u32 param_val, u32 param_shift,
+                                      u32 param_mask)
+{
+       *reg_val &= ~param_mask;
+       *reg_val |= (param_val << param_shift) & param_mask;
+       *reg_mask |= param_mask;
+}
+
+static struct regmap_config bcm281xx_pinctrl_regmap_config = {
+       .reg_bits = 32,
+       .reg_stride = 4,
+       .val_bits = 32,
+       .max_register = BCM281XX_PIN_VC_CAM3_SDA,
+};
+
+static int bcm281xx_pinctrl_get_groups_count(struct pinctrl_dev *pctldev)
+{
+       struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
+
+       return pdata->npins;
+}
+
+static const char *bcm281xx_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
+                                                  unsigned group)
+{
+       struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
+
+       return pdata->pins[group].name;
+}
+
+static int bcm281xx_pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
+                                          unsigned group,
+                                          const unsigned **pins,
+                                          unsigned *num_pins)
+{
+       struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
+
+       *pins = &pdata->pins[group].number;
+       *num_pins = 1;
+
+       return 0;
+}
+
+static void bcm281xx_pinctrl_pin_dbg_show(struct pinctrl_dev *pctldev,
+                                         struct seq_file *s,
+                                         unsigned offset)
+{
+       seq_printf(s, " %s", dev_name(pctldev->dev));
+}
+
+static struct pinctrl_ops bcm281xx_pinctrl_ops = {
+       .get_groups_count = bcm281xx_pinctrl_get_groups_count,
+       .get_group_name = bcm281xx_pinctrl_get_group_name,
+       .get_group_pins = bcm281xx_pinctrl_get_group_pins,
+       .pin_dbg_show = bcm281xx_pinctrl_pin_dbg_show,
+       .dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
+       .dt_free_map = pinctrl_utils_dt_free_map,
+};
+
+static int bcm281xx_pinctrl_get_fcns_count(struct pinctrl_dev *pctldev)
+{
+       struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
+
+       return pdata->nfunctions;
+}
+
+static const char *bcm281xx_pinctrl_get_fcn_name(struct pinctrl_dev *pctldev,
+                                                unsigned function)
+{
+       struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
+
+       return pdata->functions[function].name;
+}
+
+static int bcm281xx_pinctrl_get_fcn_groups(struct pinctrl_dev *pctldev,
+                                          unsigned function,
+                                          const char * const **groups,
+                                          unsigned * const num_groups)
+{
+       struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
+
+       *groups = pdata->functions[function].groups;
+       *num_groups = pdata->functions[function].ngroups;
+
+       return 0;
+}
+
+static int bcm281xx_pinmux_enable(struct pinctrl_dev *pctldev,
+                                 unsigned function,
+                                 unsigned group)
+{
+       struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
+       const struct bcm281xx_pin_function *f = &pdata->functions[function];
+       u32 offset = 4 * pdata->pins[group].number;
+       int rc = 0;
+
+       dev_dbg(pctldev->dev,
+               "%s(): Enable function %s (%d) of pin %s (%d) @offset 0x%x.\n",
+               __func__, f->name, function, pdata->pins[group].name,
+               pdata->pins[group].number, offset);
+
+       rc = regmap_update_bits(pdata->regmap, offset,
+               BCM281XX_PIN_REG_F_SEL_MASK,
+               function << BCM281XX_PIN_REG_F_SEL_SHIFT);
+       if (rc)
+               dev_err(pctldev->dev,
+                       "Error updating register for pin %s (%d).\n",
+                       pdata->pins[group].name, pdata->pins[group].number);
+
+       return rc;
+}
+
+static struct pinmux_ops bcm281xx_pinctrl_pinmux_ops = {
+       .get_functions_count = bcm281xx_pinctrl_get_fcns_count,
+       .get_function_name = bcm281xx_pinctrl_get_fcn_name,
+       .get_function_groups = bcm281xx_pinctrl_get_fcn_groups,
+       .enable = bcm281xx_pinmux_enable,
+};
+
+static int bcm281xx_pinctrl_pin_config_get(struct pinctrl_dev *pctldev,
+                                          unsigned pin,
+                                          unsigned long *config)
+{
+       return -ENOTSUPP;
+}
+
+
+/* Goes through the configs and update register val/mask */
+static int bcm281xx_std_pin_update(struct pinctrl_dev *pctldev,
+                                  unsigned pin,
+                                  unsigned long *configs,
+                                  unsigned num_configs,
+                                  u32 *val,
+                                  u32 *mask)
+{
+       struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
+       int i;
+       enum pin_config_param param;
+       u16 arg;
+
+       for (i = 0; i < num_configs; i++) {
+               param = pinconf_to_config_param(configs[i]);
+               arg = pinconf_to_config_argument(configs[i]);
+
+               switch (param) {
+               case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
+                       arg = (arg >= 1 ? 1 : 0);
+                       bcm281xx_pin_update(val, mask, arg,
+                               BCM281XX_PIN_SHIFT(STD, HYST),
+                               BCM281XX_PIN_MASK(STD, HYST));
+                       break;
+               /*
+                * The pin bias can only be one of pull-up, pull-down, or
+                * disable.  The user does not need to specify a value for the
+                * property, and the default value from pinconf-generic is
+                * ignored.
+                */
+               case PIN_CONFIG_BIAS_DISABLE:
+                       bcm281xx_pin_update(val, mask, 0,
+                               BCM281XX_PIN_SHIFT(STD, PULL_UP),
+                               BCM281XX_PIN_MASK(STD, PULL_UP));
+                       bcm281xx_pin_update(val, mask, 0,
+                               BCM281XX_PIN_SHIFT(STD, PULL_DN),
+                               BCM281XX_PIN_MASK(STD, PULL_DN));
+                       break;
+
+               case PIN_CONFIG_BIAS_PULL_UP:
+                       bcm281xx_pin_update(val, mask, 1,
+                               BCM281XX_PIN_SHIFT(STD, PULL_UP),
+                               BCM281XX_PIN_MASK(STD, PULL_UP));
+                       bcm281xx_pin_update(val, mask, 0,
+                               BCM281XX_PIN_SHIFT(STD, PULL_DN),
+                               BCM281XX_PIN_MASK(STD, PULL_DN));
+                       break;
+
+               case PIN_CONFIG_BIAS_PULL_DOWN:
+                       bcm281xx_pin_update(val, mask, 0,
+                               BCM281XX_PIN_SHIFT(STD, PULL_UP),
+                               BCM281XX_PIN_MASK(STD, PULL_UP));
+                       bcm281xx_pin_update(val, mask, 1,
+                               BCM281XX_PIN_SHIFT(STD, PULL_DN),
+                               BCM281XX_PIN_MASK(STD, PULL_DN));
+                       break;
+
+               case PIN_CONFIG_SLEW_RATE:
+                       arg = (arg >= 1 ? 1 : 0);
+                       bcm281xx_pin_update(val, mask, arg,
+                               BCM281XX_PIN_SHIFT(STD, SLEW),
+                               BCM281XX_PIN_MASK(STD, SLEW));
+                       break;
+
+               case PIN_CONFIG_INPUT_ENABLE:
+                       /* inversed since register is for input _disable_ */
+                       arg = (arg >= 1 ? 0 : 1);
+                       bcm281xx_pin_update(val, mask, arg,
+                               BCM281XX_PIN_SHIFT(STD, INPUT_DIS),
+                               BCM281XX_PIN_MASK(STD, INPUT_DIS));
+                       break;
+
+               case PIN_CONFIG_DRIVE_STRENGTH:
+                       /* Valid range is 2-16 mA, even numbers only */
+                       if ((arg < 2) || (arg > 16) || (arg % 2)) {
+                               dev_err(pctldev->dev,
+                                       "Invalid Drive Strength value (%d) for "
+                                       "pin %s (%d). Valid values are "
+                                       "(2..16) mA, even numbers only.\n",
+                                       arg, pdata->pins[pin].name, pin);
+                               return -EINVAL;
+                       }
+                       bcm281xx_pin_update(val, mask, (arg/2)-1,
+                               BCM281XX_PIN_SHIFT(STD, DRV_STR),
+                               BCM281XX_PIN_MASK(STD, DRV_STR));
+                       break;
+
+               default:
+                       dev_err(pctldev->dev,
+                               "Unrecognized pin config %d for pin %s (%d).\n",
+                               param, pdata->pins[pin].name, pin);
+                       return -EINVAL;
+
+               } /* switch config */
+       } /* for each config */
+
+       return 0;
+}
+
+/*
+ * The pull-up strength for an I2C pin is represented by bits 4-6 in the
+ * register with the following mapping:
+ *   0b000: No pull-up
+ *   0b001: 1200 Ohm
+ *   0b010: 1800 Ohm
+ *   0b011: 720 Ohm
+ *   0b100: 2700 Ohm
+ *   0b101: 831 Ohm
+ *   0b110: 1080 Ohm
+ *   0b111: 568 Ohm
+ * This array maps pull-up strength in Ohms to register values (1+index).
+ */
+static const u16 bcm281xx_pullup_map[] = {
+       1200, 1800, 720, 2700, 831, 1080, 568
+};
+
+/* Goes through the configs and update register val/mask */
+static int bcm281xx_i2c_pin_update(struct pinctrl_dev *pctldev,
+                                  unsigned pin,
+                                  unsigned long *configs,
+                                  unsigned num_configs,
+                                  u32 *val,
+                                  u32 *mask)
+{
+       struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
+       int i, j;
+       enum pin_config_param param;
+       u16 arg;
+
+       for (i = 0; i < num_configs; i++) {
+               param = pinconf_to_config_param(configs[i]);
+               arg = pinconf_to_config_argument(configs[i]);
+
+               switch (param) {
+               case PIN_CONFIG_BIAS_PULL_UP:
+                       for (j = 0; j < ARRAY_SIZE(bcm281xx_pullup_map); j++)
+                               if (bcm281xx_pullup_map[j] == arg)
+                                       break;
+
+                       if (j == ARRAY_SIZE(bcm281xx_pullup_map)) {
+                               dev_err(pctldev->dev,
+                                       "Invalid pull-up value (%d) for pin %s "
+                                       "(%d). Valid values are 568, 720, 831, "
+                                       "1080, 1200, 1800, 2700 Ohms.\n",
+                                       arg, pdata->pins[pin].name, pin);
+                               return -EINVAL;
+                       }
+
+                       bcm281xx_pin_update(val, mask, j+1,
+                               BCM281XX_PIN_SHIFT(I2C, PULL_UP_STR),
+                               BCM281XX_PIN_MASK(I2C, PULL_UP_STR));
+                       break;
+
+               case PIN_CONFIG_BIAS_DISABLE:
+                       bcm281xx_pin_update(val, mask, 0,
+                               BCM281XX_PIN_SHIFT(I2C, PULL_UP_STR),
+                               BCM281XX_PIN_MASK(I2C, PULL_UP_STR));
+                       break;
+
+               case PIN_CONFIG_SLEW_RATE:
+                       arg = (arg >= 1 ? 1 : 0);
+                       bcm281xx_pin_update(val, mask, arg,
+                               BCM281XX_PIN_SHIFT(I2C, SLEW),
+                               BCM281XX_PIN_MASK(I2C, SLEW));
+                       break;
+
+               case PIN_CONFIG_INPUT_ENABLE:
+                       /* inversed since register is for input _disable_ */
+                       arg = (arg >= 1 ? 0 : 1);
+                       bcm281xx_pin_update(val, mask, arg,
+                               BCM281XX_PIN_SHIFT(I2C, INPUT_DIS),
+                               BCM281XX_PIN_MASK(I2C, INPUT_DIS));
+                       break;
+
+               default:
+                       dev_err(pctldev->dev,
+                               "Unrecognized pin config %d for pin %s (%d).\n",
+                               param, pdata->pins[pin].name, pin);
+                       return -EINVAL;
+
+               } /* switch config */
+       } /* for each config */
+
+       return 0;
+}
+
+/* Goes through the configs and update register val/mask */
+static int bcm281xx_hdmi_pin_update(struct pinctrl_dev *pctldev,
+                                   unsigned pin,
+                                   unsigned long *configs,
+                                   unsigned num_configs,
+                                   u32 *val,
+                                   u32 *mask)
+{
+       struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
+       int i;
+       enum pin_config_param param;
+       u16 arg;
+
+       for (i = 0; i < num_configs; i++) {
+               param = pinconf_to_config_param(configs[i]);
+               arg = pinconf_to_config_argument(configs[i]);
+
+               switch (param) {
+               case PIN_CONFIG_SLEW_RATE:
+                       arg = (arg >= 1 ? 1 : 0);
+                       bcm281xx_pin_update(val, mask, arg,
+                               BCM281XX_PIN_SHIFT(HDMI, MODE),
+                               BCM281XX_PIN_MASK(HDMI, MODE));
+                       break;
+
+               case PIN_CONFIG_INPUT_ENABLE:
+                       /* inversed since register is for input _disable_ */
+                       arg = (arg >= 1 ? 0 : 1);
+                       bcm281xx_pin_update(val, mask, arg,
+                               BCM281XX_PIN_SHIFT(HDMI, INPUT_DIS),
+                               BCM281XX_PIN_MASK(HDMI, INPUT_DIS));
+                       break;
+
+               default:
+                       dev_err(pctldev->dev,
+                               "Unrecognized pin config %d for pin %s (%d).\n",
+                               param, pdata->pins[pin].name, pin);
+                       return -EINVAL;
+
+               } /* switch config */
+       } /* for each config */
+
+       return 0;
+}
+
+static int bcm281xx_pinctrl_pin_config_set(struct pinctrl_dev *pctldev,
+                                          unsigned pin,
+                                          unsigned long *configs,
+                                          unsigned num_configs)
+{
+       struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
+       enum bcm281xx_pin_type pin_type;
+       u32 offset = 4 * pin;
+       u32 cfg_val, cfg_mask;
+       int rc;
+
+       cfg_val = 0;
+       cfg_mask = 0;
+       pin_type = pin_type_get(pctldev, pin);
+
+       /* Different pins have different configuration options */
+       switch (pin_type) {
+       case BCM281XX_PIN_TYPE_STD:
+               rc = bcm281xx_std_pin_update(pctldev, pin, configs,
+                       num_configs, &cfg_val, &cfg_mask);
+               break;
+
+       case BCM281XX_PIN_TYPE_I2C:
+               rc = bcm281xx_i2c_pin_update(pctldev, pin, configs,
+                       num_configs, &cfg_val, &cfg_mask);
+               break;
+
+       case BCM281XX_PIN_TYPE_HDMI:
+               rc = bcm281xx_hdmi_pin_update(pctldev, pin, configs,
+                       num_configs, &cfg_val, &cfg_mask);
+               break;
+
+       default:
+               dev_err(pctldev->dev, "Unknown pin type for pin %s (%d).\n",
+                       pdata->pins[pin].name, pin);
+               return -EINVAL;
+
+       } /* switch pin type */
+
+       if (rc)
+               return rc;
+
+       dev_dbg(pctldev->dev,
+               "%s(): Set pin %s (%d) with config 0x%x, mask 0x%x\n",
+               __func__, pdata->pins[pin].name, pin, cfg_val, cfg_mask);
+
+       rc = regmap_update_bits(pdata->regmap, offset, cfg_mask, cfg_val);
+       if (rc) {
+               dev_err(pctldev->dev,
+                       "Error updating register for pin %s (%d).\n",
+                       pdata->pins[pin].name, pin);
+               return rc;
+       }
+
+       return 0;
+}
+
+static struct pinconf_ops bcm281xx_pinctrl_pinconf_ops = {
+       .pin_config_get = bcm281xx_pinctrl_pin_config_get,
+       .pin_config_set = bcm281xx_pinctrl_pin_config_set,
+};
+
+static struct pinctrl_desc bcm281xx_pinctrl_desc = {
+       /* name, pins, npins members initialized in probe function */
+       .pctlops = &bcm281xx_pinctrl_ops,
+       .pmxops = &bcm281xx_pinctrl_pinmux_ops,
+       .confops = &bcm281xx_pinctrl_pinconf_ops,
+       .owner = THIS_MODULE,
+};
+
+int __init bcm281xx_pinctrl_probe(struct platform_device *pdev)
+{
+       struct bcm281xx_pinctrl_data *pdata = &bcm281xx_pinctrl;
+       struct resource *res;
+       struct pinctrl_dev *pctl;
+
+       /* So far We can assume there is only 1 bank of registers */
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       if (!res) {
+               dev_err(&pdev->dev, "Missing MEM resource\n");
+               return -ENODEV;
+       }
+
+       pdata->reg_base = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(pdata->reg_base)) {
+               dev_err(&pdev->dev, "Failed to ioremap MEM resource\n");
+               return -ENODEV;
+       }
+
+       /* Initialize the dynamic part of pinctrl_desc */
+       pdata->regmap = devm_regmap_init_mmio(&pdev->dev, pdata->reg_base,
+               &bcm281xx_pinctrl_regmap_config);
+       if (IS_ERR(pdata->regmap)) {
+               dev_err(&pdev->dev, "Regmap MMIO init failed.\n");
+               return -ENODEV;
+       }
+
+       bcm281xx_pinctrl_desc.name = dev_name(&pdev->dev);
+       bcm281xx_pinctrl_desc.pins = bcm281xx_pinctrl.pins;
+       bcm281xx_pinctrl_desc.npins = bcm281xx_pinctrl.npins;
+
+       pctl = pinctrl_register(&bcm281xx_pinctrl_desc,
+                               &pdev->dev,
+                               pdata);
+       if (!pctl) {
+               dev_err(&pdev->dev, "Failed to register pinctrl\n");
+               return -ENODEV;
+       }
+
+       platform_set_drvdata(pdev, pdata);
+
+       return 0;
+}
+
+static struct of_device_id bcm281xx_pinctrl_of_match[] = {
+       { .compatible = "brcm,bcm11351-pinctrl", },
+       { },
+};
+
+static struct platform_driver bcm281xx_pinctrl_driver = {
+       .driver = {
+               .name = "bcm281xx-pinctrl",
+               .owner = THIS_MODULE,
+               .of_match_table = bcm281xx_pinctrl_of_match,
+       },
+};
+
+module_platform_driver_probe(bcm281xx_pinctrl_driver, bcm281xx_pinctrl_probe);
+
+MODULE_AUTHOR("Broadcom Corporation <bcm-kernel-feedback-list@broadcom.com>");
+MODULE_AUTHOR("Sherman Yin <syin@broadcom.com>");
+MODULE_DESCRIPTION("Broadcom BCM281xx pinctrl driver");
+MODULE_LICENSE("GPL v2");
diff --git a/drivers/pinctrl/pinctrl-capri.c b/drivers/pinctrl/pinctrl-capri.c
deleted file mode 100644 (file)
index eb25002..0000000
+++ /dev/null
@@ -1,1454 +0,0 @@
-/*
- * Copyright (C) 2013 Broadcom Corporation
- *
- * 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 version 2.
- *
- * 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/err.h>
-#include <linux/io.h>
-#include <linux/module.h>
-#include <linux/of.h>
-#include <linux/platform_device.h>
-#include <linux/pinctrl/pinctrl.h>
-#include <linux/pinctrl/pinmux.h>
-#include <linux/pinctrl/pinconf.h>
-#include <linux/pinctrl/pinconf-generic.h>
-#include <linux/regmap.h>
-#include <linux/slab.h>
-#include "core.h"
-#include "pinctrl-utils.h"
-
-/* Capri Pin Control Registers Definitions */
-
-/* Function Select bits are the same for all pin control registers */
-#define CAPRI_PIN_REG_F_SEL_MASK               0x0700
-#define CAPRI_PIN_REG_F_SEL_SHIFT              8
-
-/* Standard pin register */
-#define CAPRI_STD_PIN_REG_DRV_STR_MASK         0x0007
-#define CAPRI_STD_PIN_REG_DRV_STR_SHIFT                0
-#define CAPRI_STD_PIN_REG_INPUT_DIS_MASK       0x0008
-#define CAPRI_STD_PIN_REG_INPUT_DIS_SHIFT      3
-#define CAPRI_STD_PIN_REG_SLEW_MASK            0x0010
-#define CAPRI_STD_PIN_REG_SLEW_SHIFT           4
-#define CAPRI_STD_PIN_REG_PULL_UP_MASK         0x0020
-#define CAPRI_STD_PIN_REG_PULL_UP_SHIFT                5
-#define CAPRI_STD_PIN_REG_PULL_DN_MASK         0x0040
-#define CAPRI_STD_PIN_REG_PULL_DN_SHIFT                6
-#define CAPRI_STD_PIN_REG_HYST_MASK            0x0080
-#define CAPRI_STD_PIN_REG_HYST_SHIFT           7
-
-/* I2C pin register */
-#define CAPRI_I2C_PIN_REG_INPUT_DIS_MASK       0x0004
-#define CAPRI_I2C_PIN_REG_INPUT_DIS_SHIFT      2
-#define CAPRI_I2C_PIN_REG_SLEW_MASK            0x0008
-#define CAPRI_I2C_PIN_REG_SLEW_SHIFT           3
-#define CAPRI_I2C_PIN_REG_PULL_UP_STR_MASK     0x0070
-#define CAPRI_I2C_PIN_REG_PULL_UP_STR_SHIFT    4
-
-/* HDMI pin register */
-#define CAPRI_HDMI_PIN_REG_INPUT_DIS_MASK      0x0008
-#define CAPRI_HDMI_PIN_REG_INPUT_DIS_SHIFT     3
-#define CAPRI_HDMI_PIN_REG_MODE_MASK           0x0010
-#define CAPRI_HDMI_PIN_REG_MODE_SHIFT          4
-
-/**
- * capri_pin_type - types of pin register
- */
-enum capri_pin_type {
-       CAPRI_PIN_TYPE_UNKNOWN = 0,
-       CAPRI_PIN_TYPE_STD,
-       CAPRI_PIN_TYPE_I2C,
-       CAPRI_PIN_TYPE_HDMI,
-};
-
-static enum capri_pin_type std_pin = CAPRI_PIN_TYPE_STD;
-static enum capri_pin_type i2c_pin = CAPRI_PIN_TYPE_I2C;
-static enum capri_pin_type hdmi_pin = CAPRI_PIN_TYPE_HDMI;
-
-/**
- * capri_pin_function- define pin function
- */
-struct capri_pin_function {
-       const char *name;
-       const char * const *groups;
-       const unsigned ngroups;
-};
-
-/**
- * capri_pinctrl_data - Broadcom-specific pinctrl data
- * @reg_base - base of pinctrl registers
- */
-struct capri_pinctrl_data {
-       void __iomem *reg_base;
-
-       /* List of all pins */
-       const struct pinctrl_pin_desc *pins;
-       const unsigned npins;
-
-       const struct capri_pin_function *functions;
-       const unsigned nfunctions;
-
-       struct regmap *regmap;
-};
-
-/*
- * Pin number definition.  The order here must be the same as defined in the
- * PADCTRLREG block in the RDB.
- */
-#define CAPRI_PIN_ADCSYNC              0
-#define CAPRI_PIN_BAT_RM               1
-#define CAPRI_PIN_BSC1_SCL             2
-#define CAPRI_PIN_BSC1_SDA             3
-#define CAPRI_PIN_BSC2_SCL             4
-#define CAPRI_PIN_BSC2_SDA             5
-#define CAPRI_PIN_CLASSGPWR            6
-#define CAPRI_PIN_CLK_CX8              7
-#define CAPRI_PIN_CLKOUT_0             8
-#define CAPRI_PIN_CLKOUT_1             9
-#define CAPRI_PIN_CLKOUT_2             10
-#define CAPRI_PIN_CLKOUT_3             11
-#define CAPRI_PIN_CLKREQ_IN_0          12
-#define CAPRI_PIN_CLKREQ_IN_1          13
-#define CAPRI_PIN_CWS_SYS_REQ1         14
-#define CAPRI_PIN_CWS_SYS_REQ2         15
-#define CAPRI_PIN_CWS_SYS_REQ3         16
-#define CAPRI_PIN_DIGMIC1_CLK          17
-#define CAPRI_PIN_DIGMIC1_DQ           18
-#define CAPRI_PIN_DIGMIC2_CLK          19
-#define CAPRI_PIN_DIGMIC2_DQ           20
-#define CAPRI_PIN_GPEN13               21
-#define CAPRI_PIN_GPEN14               22
-#define CAPRI_PIN_GPEN15               23
-#define CAPRI_PIN_GPIO00               24
-#define CAPRI_PIN_GPIO01               25
-#define CAPRI_PIN_GPIO02               26
-#define CAPRI_PIN_GPIO03               27
-#define CAPRI_PIN_GPIO04               28
-#define CAPRI_PIN_GPIO05               29
-#define CAPRI_PIN_GPIO06               30
-#define CAPRI_PIN_GPIO07               31
-#define CAPRI_PIN_GPIO08               32
-#define CAPRI_PIN_GPIO09               33
-#define CAPRI_PIN_GPIO10               34
-#define CAPRI_PIN_GPIO11               35
-#define CAPRI_PIN_GPIO12               36
-#define CAPRI_PIN_GPIO13               37
-#define CAPRI_PIN_GPIO14               38
-#define CAPRI_PIN_GPS_PABLANK          39
-#define CAPRI_PIN_GPS_TMARK            40
-#define CAPRI_PIN_HDMI_SCL             41
-#define CAPRI_PIN_HDMI_SDA             42
-#define CAPRI_PIN_IC_DM                        43
-#define CAPRI_PIN_IC_DP                        44
-#define CAPRI_PIN_KP_COL_IP_0          45
-#define CAPRI_PIN_KP_COL_IP_1          46
-#define CAPRI_PIN_KP_COL_IP_2          47
-#define CAPRI_PIN_KP_COL_IP_3          48
-#define CAPRI_PIN_KP_ROW_OP_0          49
-#define CAPRI_PIN_KP_ROW_OP_1          50
-#define CAPRI_PIN_KP_ROW_OP_2          51
-#define CAPRI_PIN_KP_ROW_OP_3          52
-#define CAPRI_PIN_LCD_B_0              53
-#define CAPRI_PIN_LCD_B_1              54
-#define CAPRI_PIN_LCD_B_2              55
-#define CAPRI_PIN_LCD_B_3              56
-#define CAPRI_PIN_LCD_B_4              57
-#define CAPRI_PIN_LCD_B_5              58
-#define CAPRI_PIN_LCD_B_6              59
-#define CAPRI_PIN_LCD_B_7              60
-#define CAPRI_PIN_LCD_G_0              61
-#define CAPRI_PIN_LCD_G_1              62
-#define CAPRI_PIN_LCD_G_2              63
-#define CAPRI_PIN_LCD_G_3              64
-#define CAPRI_PIN_LCD_G_4              65
-#define CAPRI_PIN_LCD_G_5              66
-#define CAPRI_PIN_LCD_G_6              67
-#define CAPRI_PIN_LCD_G_7              68
-#define CAPRI_PIN_LCD_HSYNC            69
-#define CAPRI_PIN_LCD_OE               70
-#define CAPRI_PIN_LCD_PCLK             71
-#define CAPRI_PIN_LCD_R_0              72
-#define CAPRI_PIN_LCD_R_1              73
-#define CAPRI_PIN_LCD_R_2              74
-#define CAPRI_PIN_LCD_R_3              75
-#define CAPRI_PIN_LCD_R_4              76
-#define CAPRI_PIN_LCD_R_5              77
-#define CAPRI_PIN_LCD_R_6              78
-#define CAPRI_PIN_LCD_R_7              79
-#define CAPRI_PIN_LCD_VSYNC            80
-#define CAPRI_PIN_MDMGPIO0             81
-#define CAPRI_PIN_MDMGPIO1             82
-#define CAPRI_PIN_MDMGPIO2             83
-#define CAPRI_PIN_MDMGPIO3             84
-#define CAPRI_PIN_MDMGPIO4             85
-#define CAPRI_PIN_MDMGPIO5             86
-#define CAPRI_PIN_MDMGPIO6             87
-#define CAPRI_PIN_MDMGPIO7             88
-#define CAPRI_PIN_MDMGPIO8             89
-#define CAPRI_PIN_MPHI_DATA_0          90
-#define CAPRI_PIN_MPHI_DATA_1          91
-#define CAPRI_PIN_MPHI_DATA_2          92
-#define CAPRI_PIN_MPHI_DATA_3          93
-#define CAPRI_PIN_MPHI_DATA_4          94
-#define CAPRI_PIN_MPHI_DATA_5          95
-#define CAPRI_PIN_MPHI_DATA_6          96
-#define CAPRI_PIN_MPHI_DATA_7          97
-#define CAPRI_PIN_MPHI_DATA_8          98
-#define CAPRI_PIN_MPHI_DATA_9          99
-#define CAPRI_PIN_MPHI_DATA_10         100
-#define CAPRI_PIN_MPHI_DATA_11         101
-#define CAPRI_PIN_MPHI_DATA_12         102
-#define CAPRI_PIN_MPHI_DATA_13         103
-#define CAPRI_PIN_MPHI_DATA_14         104
-#define CAPRI_PIN_MPHI_DATA_15         105
-#define CAPRI_PIN_MPHI_HA0             106
-#define CAPRI_PIN_MPHI_HAT0            107
-#define CAPRI_PIN_MPHI_HAT1            108
-#define CAPRI_PIN_MPHI_HCE0_N          109
-#define CAPRI_PIN_MPHI_HCE1_N          110
-#define CAPRI_PIN_MPHI_HRD_N           111
-#define CAPRI_PIN_MPHI_HWR_N           112
-#define CAPRI_PIN_MPHI_RUN0            113
-#define CAPRI_PIN_MPHI_RUN1            114
-#define CAPRI_PIN_MTX_SCAN_CLK         115
-#define CAPRI_PIN_MTX_SCAN_DATA                116
-#define CAPRI_PIN_NAND_AD_0            117
-#define CAPRI_PIN_NAND_AD_1            118
-#define CAPRI_PIN_NAND_AD_2            119
-#define CAPRI_PIN_NAND_AD_3            120
-#define CAPRI_PIN_NAND_AD_4            121
-#define CAPRI_PIN_NAND_AD_5            122
-#define CAPRI_PIN_NAND_AD_6            123
-#define CAPRI_PIN_NAND_AD_7            124
-#define CAPRI_PIN_NAND_ALE             125
-#define CAPRI_PIN_NAND_CEN_0           126
-#define CAPRI_PIN_NAND_CEN_1           127
-#define CAPRI_PIN_NAND_CLE             128
-#define CAPRI_PIN_NAND_OEN             129
-#define CAPRI_PIN_NAND_RDY_0           130
-#define CAPRI_PIN_NAND_RDY_1           131
-#define CAPRI_PIN_NAND_WEN             132
-#define CAPRI_PIN_NAND_WP              133
-#define CAPRI_PIN_PC1                  134
-#define CAPRI_PIN_PC2                  135
-#define CAPRI_PIN_PMU_INT              136
-#define CAPRI_PIN_PMU_SCL              137
-#define CAPRI_PIN_PMU_SDA              138
-#define CAPRI_PIN_RFST2G_MTSLOTEN3G    139
-#define CAPRI_PIN_RGMII_0_RX_CTL       140
-#define CAPRI_PIN_RGMII_0_RXC          141
-#define CAPRI_PIN_RGMII_0_RXD_0                142
-#define CAPRI_PIN_RGMII_0_RXD_1                143
-#define CAPRI_PIN_RGMII_0_RXD_2                144
-#define CAPRI_PIN_RGMII_0_RXD_3                145
-#define CAPRI_PIN_RGMII_0_TX_CTL       146
-#define CAPRI_PIN_RGMII_0_TXC          147
-#define CAPRI_PIN_RGMII_0_TXD_0                148
-#define CAPRI_PIN_RGMII_0_TXD_1                149
-#define CAPRI_PIN_RGMII_0_TXD_2                150
-#define CAPRI_PIN_RGMII_0_TXD_3                151
-#define CAPRI_PIN_RGMII_1_RX_CTL       152
-#define CAPRI_PIN_RGMII_1_RXC          153
-#define CAPRI_PIN_RGMII_1_RXD_0                154
-#define CAPRI_PIN_RGMII_1_RXD_1                155
-#define CAPRI_PIN_RGMII_1_RXD_2                156
-#define CAPRI_PIN_RGMII_1_RXD_3                157
-#define CAPRI_PIN_RGMII_1_TX_CTL       158
-#define CAPRI_PIN_RGMII_1_TXC          159
-#define CAPRI_PIN_RGMII_1_TXD_0                160
-#define CAPRI_PIN_RGMII_1_TXD_1                161
-#define CAPRI_PIN_RGMII_1_TXD_2                162
-#define CAPRI_PIN_RGMII_1_TXD_3                163
-#define CAPRI_PIN_RGMII_GPIO_0         164
-#define CAPRI_PIN_RGMII_GPIO_1         165
-#define CAPRI_PIN_RGMII_GPIO_2         166
-#define CAPRI_PIN_RGMII_GPIO_3         167
-#define CAPRI_PIN_RTXDATA2G_TXDATA3G1  168
-#define CAPRI_PIN_RTXEN2G_TXDATA3G2    169
-#define CAPRI_PIN_RXDATA3G0            170
-#define CAPRI_PIN_RXDATA3G1            171
-#define CAPRI_PIN_RXDATA3G2            172
-#define CAPRI_PIN_SDIO1_CLK            173
-#define CAPRI_PIN_SDIO1_CMD            174
-#define CAPRI_PIN_SDIO1_DATA_0         175
-#define CAPRI_PIN_SDIO1_DATA_1         176
-#define CAPRI_PIN_SDIO1_DATA_2         177
-#define CAPRI_PIN_SDIO1_DATA_3         178
-#define CAPRI_PIN_SDIO4_CLK            179
-#define CAPRI_PIN_SDIO4_CMD            180
-#define CAPRI_PIN_SDIO4_DATA_0         181
-#define CAPRI_PIN_SDIO4_DATA_1         182
-#define CAPRI_PIN_SDIO4_DATA_2         183
-#define CAPRI_PIN_SDIO4_DATA_3         184
-#define CAPRI_PIN_SIM_CLK              185
-#define CAPRI_PIN_SIM_DATA             186
-#define CAPRI_PIN_SIM_DET              187
-#define CAPRI_PIN_SIM_RESETN           188
-#define CAPRI_PIN_SIM2_CLK             189
-#define CAPRI_PIN_SIM2_DATA            190
-#define CAPRI_PIN_SIM2_DET             191
-#define CAPRI_PIN_SIM2_RESETN          192
-#define CAPRI_PIN_SRI_C                        193
-#define CAPRI_PIN_SRI_D                        194
-#define CAPRI_PIN_SRI_E                        195
-#define CAPRI_PIN_SSP_EXTCLK           196
-#define CAPRI_PIN_SSP0_CLK             197
-#define CAPRI_PIN_SSP0_FS              198
-#define CAPRI_PIN_SSP0_RXD             199
-#define CAPRI_PIN_SSP0_TXD             200
-#define CAPRI_PIN_SSP2_CLK             201
-#define CAPRI_PIN_SSP2_FS_0            202
-#define CAPRI_PIN_SSP2_FS_1            203
-#define CAPRI_PIN_SSP2_FS_2            204
-#define CAPRI_PIN_SSP2_FS_3            205
-#define CAPRI_PIN_SSP2_RXD_0           206
-#define CAPRI_PIN_SSP2_RXD_1           207
-#define CAPRI_PIN_SSP2_TXD_0           208
-#define CAPRI_PIN_SSP2_TXD_1           209
-#define CAPRI_PIN_SSP3_CLK             210
-#define CAPRI_PIN_SSP3_FS              211
-#define CAPRI_PIN_SSP3_RXD             212
-#define CAPRI_PIN_SSP3_TXD             213
-#define CAPRI_PIN_SSP4_CLK             214
-#define CAPRI_PIN_SSP4_FS              215
-#define CAPRI_PIN_SSP4_RXD             216
-#define CAPRI_PIN_SSP4_TXD             217
-#define CAPRI_PIN_SSP5_CLK             218
-#define CAPRI_PIN_SSP5_FS              219
-#define CAPRI_PIN_SSP5_RXD             220
-#define CAPRI_PIN_SSP5_TXD             221
-#define CAPRI_PIN_SSP6_CLK             222
-#define CAPRI_PIN_SSP6_FS              223
-#define CAPRI_PIN_SSP6_RXD             224
-#define CAPRI_PIN_SSP6_TXD             225
-#define CAPRI_PIN_STAT_1               226
-#define CAPRI_PIN_STAT_2               227
-#define CAPRI_PIN_SYSCLKEN             228
-#define CAPRI_PIN_TRACECLK             229
-#define CAPRI_PIN_TRACEDT00            230
-#define CAPRI_PIN_TRACEDT01            231
-#define CAPRI_PIN_TRACEDT02            232
-#define CAPRI_PIN_TRACEDT03            233
-#define CAPRI_PIN_TRACEDT04            234
-#define CAPRI_PIN_TRACEDT05            235
-#define CAPRI_PIN_TRACEDT06            236
-#define CAPRI_PIN_TRACEDT07            237
-#define CAPRI_PIN_TRACEDT08            238
-#define CAPRI_PIN_TRACEDT09            239
-#define CAPRI_PIN_TRACEDT10            240
-#define CAPRI_PIN_TRACEDT11            241
-#define CAPRI_PIN_TRACEDT12            242
-#define CAPRI_PIN_TRACEDT13            243
-#define CAPRI_PIN_TRACEDT14            244
-#define CAPRI_PIN_TRACEDT15            245
-#define CAPRI_PIN_TXDATA3G0            246
-#define CAPRI_PIN_TXPWRIND             247
-#define CAPRI_PIN_UARTB1_UCTS          248
-#define CAPRI_PIN_UARTB1_URTS          249
-#define CAPRI_PIN_UARTB1_URXD          250
-#define CAPRI_PIN_UARTB1_UTXD          251
-#define CAPRI_PIN_UARTB2_URXD          252
-#define CAPRI_PIN_UARTB2_UTXD          253
-#define CAPRI_PIN_UARTB3_UCTS          254
-#define CAPRI_PIN_UARTB3_URTS          255
-#define CAPRI_PIN_UARTB3_URXD          256
-#define CAPRI_PIN_UARTB3_UTXD          257
-#define CAPRI_PIN_UARTB4_UCTS          258
-#define CAPRI_PIN_UARTB4_URTS          259
-#define CAPRI_PIN_UARTB4_URXD          260
-#define CAPRI_PIN_UARTB4_UTXD          261
-#define CAPRI_PIN_VC_CAM1_SCL          262
-#define CAPRI_PIN_VC_CAM1_SDA          263
-#define CAPRI_PIN_VC_CAM2_SCL          264
-#define CAPRI_PIN_VC_CAM2_SDA          265
-#define CAPRI_PIN_VC_CAM3_SCL          266
-#define CAPRI_PIN_VC_CAM3_SDA          267
-
-#define CAPRI_PIN_DESC(a, b, c) \
-       { .number = a, .name = b, .drv_data = &c##_pin }
-
-/*
- * Pin description definition.  The order here must be the same as defined in
- * the PADCTRLREG block in the RDB, since the pin number is used as an index
- * into this array.
- */
-static const struct pinctrl_pin_desc capri_pinctrl_pins[] = {
-       CAPRI_PIN_DESC(CAPRI_PIN_ADCSYNC, "adcsync", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_BAT_RM, "bat_rm", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_BSC1_SCL, "bsc1_scl", i2c),
-       CAPRI_PIN_DESC(CAPRI_PIN_BSC1_SDA, "bsc1_sda", i2c),
-       CAPRI_PIN_DESC(CAPRI_PIN_BSC2_SCL, "bsc2_scl", i2c),
-       CAPRI_PIN_DESC(CAPRI_PIN_BSC2_SDA, "bsc2_sda", i2c),
-       CAPRI_PIN_DESC(CAPRI_PIN_CLASSGPWR, "classgpwr", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_CLK_CX8, "clk_cx8", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_CLKOUT_0, "clkout_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_CLKOUT_1, "clkout_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_CLKOUT_2, "clkout_2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_CLKOUT_3, "clkout_3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_CLKREQ_IN_0, "clkreq_in_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_CLKREQ_IN_1, "clkreq_in_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_CWS_SYS_REQ1, "cws_sys_req1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_CWS_SYS_REQ2, "cws_sys_req2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_CWS_SYS_REQ3, "cws_sys_req3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_DIGMIC1_CLK, "digmic1_clk", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_DIGMIC1_DQ, "digmic1_dq", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_DIGMIC2_CLK, "digmic2_clk", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_DIGMIC2_DQ, "digmic2_dq", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPEN13, "gpen13", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPEN14, "gpen14", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPEN15, "gpen15", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPIO00, "gpio00", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPIO01, "gpio01", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPIO02, "gpio02", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPIO03, "gpio03", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPIO04, "gpio04", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPIO05, "gpio05", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPIO06, "gpio06", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPIO07, "gpio07", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPIO08, "gpio08", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPIO09, "gpio09", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPIO10, "gpio10", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPIO11, "gpio11", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPIO12, "gpio12", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPIO13, "gpio13", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPIO14, "gpio14", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPS_PABLANK, "gps_pablank", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_GPS_TMARK, "gps_tmark", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_HDMI_SCL, "hdmi_scl", hdmi),
-       CAPRI_PIN_DESC(CAPRI_PIN_HDMI_SDA, "hdmi_sda", hdmi),
-       CAPRI_PIN_DESC(CAPRI_PIN_IC_DM, "ic_dm", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_IC_DP, "ic_dp", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_KP_COL_IP_0, "kp_col_ip_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_KP_COL_IP_1, "kp_col_ip_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_KP_COL_IP_2, "kp_col_ip_2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_KP_COL_IP_3, "kp_col_ip_3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_KP_ROW_OP_0, "kp_row_op_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_KP_ROW_OP_1, "kp_row_op_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_KP_ROW_OP_2, "kp_row_op_2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_KP_ROW_OP_3, "kp_row_op_3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_B_0, "lcd_b_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_B_1, "lcd_b_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_B_2, "lcd_b_2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_B_3, "lcd_b_3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_B_4, "lcd_b_4", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_B_5, "lcd_b_5", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_B_6, "lcd_b_6", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_B_7, "lcd_b_7", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_G_0, "lcd_g_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_G_1, "lcd_g_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_G_2, "lcd_g_2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_G_3, "lcd_g_3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_G_4, "lcd_g_4", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_G_5, "lcd_g_5", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_G_6, "lcd_g_6", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_G_7, "lcd_g_7", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_HSYNC, "lcd_hsync", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_OE, "lcd_oe", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_PCLK, "lcd_pclk", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_R_0, "lcd_r_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_R_1, "lcd_r_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_R_2, "lcd_r_2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_R_3, "lcd_r_3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_R_4, "lcd_r_4", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_R_5, "lcd_r_5", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_R_6, "lcd_r_6", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_R_7, "lcd_r_7", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_LCD_VSYNC, "lcd_vsync", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MDMGPIO0, "mdmgpio0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MDMGPIO1, "mdmgpio1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MDMGPIO2, "mdmgpio2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MDMGPIO3, "mdmgpio3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MDMGPIO4, "mdmgpio4", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MDMGPIO5, "mdmgpio5", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MDMGPIO6, "mdmgpio6", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MDMGPIO7, "mdmgpio7", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MDMGPIO8, "mdmgpio8", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_DATA_0, "mphi_data_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_DATA_1, "mphi_data_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_DATA_2, "mphi_data_2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_DATA_3, "mphi_data_3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_DATA_4, "mphi_data_4", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_DATA_5, "mphi_data_5", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_DATA_6, "mphi_data_6", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_DATA_7, "mphi_data_7", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_DATA_8, "mphi_data_8", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_DATA_9, "mphi_data_9", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_DATA_10, "mphi_data_10", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_DATA_11, "mphi_data_11", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_DATA_12, "mphi_data_12", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_DATA_13, "mphi_data_13", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_DATA_14, "mphi_data_14", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_DATA_15, "mphi_data_15", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_HA0, "mphi_ha0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_HAT0, "mphi_hat0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_HAT1, "mphi_hat1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_HCE0_N, "mphi_hce0_n", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_HCE1_N, "mphi_hce1_n", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_HRD_N, "mphi_hrd_n", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_HWR_N, "mphi_hwr_n", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_RUN0, "mphi_run0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MPHI_RUN1, "mphi_run1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MTX_SCAN_CLK, "mtx_scan_clk", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_MTX_SCAN_DATA, "mtx_scan_data", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_NAND_AD_0, "nand_ad_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_NAND_AD_1, "nand_ad_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_NAND_AD_2, "nand_ad_2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_NAND_AD_3, "nand_ad_3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_NAND_AD_4, "nand_ad_4", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_NAND_AD_5, "nand_ad_5", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_NAND_AD_6, "nand_ad_6", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_NAND_AD_7, "nand_ad_7", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_NAND_ALE, "nand_ale", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_NAND_CEN_0, "nand_cen_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_NAND_CEN_1, "nand_cen_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_NAND_CLE, "nand_cle", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_NAND_OEN, "nand_oen", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_NAND_RDY_0, "nand_rdy_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_NAND_RDY_1, "nand_rdy_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_NAND_WEN, "nand_wen", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_NAND_WP, "nand_wp", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_PC1, "pc1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_PC2, "pc2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_PMU_INT, "pmu_int", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_PMU_SCL, "pmu_scl", i2c),
-       CAPRI_PIN_DESC(CAPRI_PIN_PMU_SDA, "pmu_sda", i2c),
-       CAPRI_PIN_DESC(CAPRI_PIN_RFST2G_MTSLOTEN3G, "rfst2g_mtsloten3g", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_0_RX_CTL, "rgmii_0_rx_ctl", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_0_RXC, "rgmii_0_rxc", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_0_RXD_0, "rgmii_0_rxd_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_0_RXD_1, "rgmii_0_rxd_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_0_RXD_2, "rgmii_0_rxd_2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_0_RXD_3, "rgmii_0_rxd_3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_0_TX_CTL, "rgmii_0_tx_ctl", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_0_TXC, "rgmii_0_txc", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_0_TXD_0, "rgmii_0_txd_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_0_TXD_1, "rgmii_0_txd_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_0_TXD_2, "rgmii_0_txd_2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_0_TXD_3, "rgmii_0_txd_3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_1_RX_CTL, "rgmii_1_rx_ctl", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_1_RXC, "rgmii_1_rxc", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_1_RXD_0, "rgmii_1_rxd_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_1_RXD_1, "rgmii_1_rxd_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_1_RXD_2, "rgmii_1_rxd_2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_1_RXD_3, "rgmii_1_rxd_3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_1_TX_CTL, "rgmii_1_tx_ctl", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_1_TXC, "rgmii_1_txc", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_1_TXD_0, "rgmii_1_txd_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_1_TXD_1, "rgmii_1_txd_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_1_TXD_2, "rgmii_1_txd_2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_1_TXD_3, "rgmii_1_txd_3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_GPIO_0, "rgmii_gpio_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_GPIO_1, "rgmii_gpio_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_GPIO_2, "rgmii_gpio_2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RGMII_GPIO_3, "rgmii_gpio_3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RTXDATA2G_TXDATA3G1, "rtxdata2g_txdata3g1",
-               std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RTXEN2G_TXDATA3G2, "rtxen2g_txdata3g2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RXDATA3G0, "rxdata3g0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RXDATA3G1, "rxdata3g1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_RXDATA3G2, "rxdata3g2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SDIO1_CLK, "sdio1_clk", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SDIO1_CMD, "sdio1_cmd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SDIO1_DATA_0, "sdio1_data_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SDIO1_DATA_1, "sdio1_data_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SDIO1_DATA_2, "sdio1_data_2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SDIO1_DATA_3, "sdio1_data_3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SDIO4_CLK, "sdio4_clk", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SDIO4_CMD, "sdio4_cmd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SDIO4_DATA_0, "sdio4_data_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SDIO4_DATA_1, "sdio4_data_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SDIO4_DATA_2, "sdio4_data_2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SDIO4_DATA_3, "sdio4_data_3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SIM_CLK, "sim_clk", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SIM_DATA, "sim_data", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SIM_DET, "sim_det", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SIM_RESETN, "sim_resetn", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SIM2_CLK, "sim2_clk", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SIM2_DATA, "sim2_data", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SIM2_DET, "sim2_det", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SIM2_RESETN, "sim2_resetn", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SRI_C, "sri_c", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SRI_D, "sri_d", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SRI_E, "sri_e", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP_EXTCLK, "ssp_extclk", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP0_CLK, "ssp0_clk", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP0_FS, "ssp0_fs", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP0_RXD, "ssp0_rxd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP0_TXD, "ssp0_txd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP2_CLK, "ssp2_clk", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP2_FS_0, "ssp2_fs_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP2_FS_1, "ssp2_fs_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP2_FS_2, "ssp2_fs_2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP2_FS_3, "ssp2_fs_3", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP2_RXD_0, "ssp2_rxd_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP2_RXD_1, "ssp2_rxd_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP2_TXD_0, "ssp2_txd_0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP2_TXD_1, "ssp2_txd_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP3_CLK, "ssp3_clk", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP3_FS, "ssp3_fs", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP3_RXD, "ssp3_rxd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP3_TXD, "ssp3_txd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP4_CLK, "ssp4_clk", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP4_FS, "ssp4_fs", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP4_RXD, "ssp4_rxd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP4_TXD, "ssp4_txd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP5_CLK, "ssp5_clk", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP5_FS, "ssp5_fs", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP5_RXD, "ssp5_rxd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP5_TXD, "ssp5_txd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP6_CLK, "ssp6_clk", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP6_FS, "ssp6_fs", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP6_RXD, "ssp6_rxd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SSP6_TXD, "ssp6_txd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_STAT_1, "stat_1", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_STAT_2, "stat_2", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_SYSCLKEN, "sysclken", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TRACECLK, "traceclk", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TRACEDT00, "tracedt00", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TRACEDT01, "tracedt01", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TRACEDT02, "tracedt02", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TRACEDT03, "tracedt03", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TRACEDT04, "tracedt04", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TRACEDT05, "tracedt05", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TRACEDT06, "tracedt06", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TRACEDT07, "tracedt07", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TRACEDT08, "tracedt08", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TRACEDT09, "tracedt09", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TRACEDT10, "tracedt10", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TRACEDT11, "tracedt11", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TRACEDT12, "tracedt12", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TRACEDT13, "tracedt13", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TRACEDT14, "tracedt14", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TRACEDT15, "tracedt15", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TXDATA3G0, "txdata3g0", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_TXPWRIND, "txpwrind", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_UARTB1_UCTS, "uartb1_ucts", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_UARTB1_URTS, "uartb1_urts", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_UARTB1_URXD, "uartb1_urxd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_UARTB1_UTXD, "uartb1_utxd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_UARTB2_URXD, "uartb2_urxd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_UARTB2_UTXD, "uartb2_utxd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_UARTB3_UCTS, "uartb3_ucts", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_UARTB3_URTS, "uartb3_urts", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_UARTB3_URXD, "uartb3_urxd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_UARTB3_UTXD, "uartb3_utxd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_UARTB4_UCTS, "uartb4_ucts", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_UARTB4_URTS, "uartb4_urts", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_UARTB4_URXD, "uartb4_urxd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_UARTB4_UTXD, "uartb4_utxd", std),
-       CAPRI_PIN_DESC(CAPRI_PIN_VC_CAM1_SCL, "vc_cam1_scl", i2c),
-       CAPRI_PIN_DESC(CAPRI_PIN_VC_CAM1_SDA, "vc_cam1_sda", i2c),
-       CAPRI_PIN_DESC(CAPRI_PIN_VC_CAM2_SCL, "vc_cam2_scl", i2c),
-       CAPRI_PIN_DESC(CAPRI_PIN_VC_CAM2_SDA, "vc_cam2_sda", i2c),
-       CAPRI_PIN_DESC(CAPRI_PIN_VC_CAM3_SCL, "vc_cam3_scl", i2c),
-       CAPRI_PIN_DESC(CAPRI_PIN_VC_CAM3_SDA, "vc_cam3_sda", i2c),
-};
-
-static const char * const capri_alt_groups[] = {
-       "adcsync",
-       "bat_rm",
-       "bsc1_scl",
-       "bsc1_sda",
-       "bsc2_scl",
-       "bsc2_sda",
-       "classgpwr",
-       "clk_cx8",
-       "clkout_0",
-       "clkout_1",
-       "clkout_2",
-       "clkout_3",
-       "clkreq_in_0",
-       "clkreq_in_1",
-       "cws_sys_req1",
-       "cws_sys_req2",
-       "cws_sys_req3",
-       "digmic1_clk",
-       "digmic1_dq",
-       "digmic2_clk",
-       "digmic2_dq",
-       "gpen13",
-       "gpen14",
-       "gpen15",
-       "gpio00",
-       "gpio01",
-       "gpio02",
-       "gpio03",
-       "gpio04",
-       "gpio05",
-       "gpio06",
-       "gpio07",
-       "gpio08",
-       "gpio09",
-       "gpio10",
-       "gpio11",
-       "gpio12",
-       "gpio13",
-       "gpio14",
-       "gps_pablank",
-       "gps_tmark",
-       "hdmi_scl",
-       "hdmi_sda",
-       "ic_dm",
-       "ic_dp",
-       "kp_col_ip_0",
-       "kp_col_ip_1",
-       "kp_col_ip_2",
-       "kp_col_ip_3",
-       "kp_row_op_0",
-       "kp_row_op_1",
-       "kp_row_op_2",
-       "kp_row_op_3",
-       "lcd_b_0",
-       "lcd_b_1",
-       "lcd_b_2",
-       "lcd_b_3",
-       "lcd_b_4",
-       "lcd_b_5",
-       "lcd_b_6",
-       "lcd_b_7",
-       "lcd_g_0",
-       "lcd_g_1",
-       "lcd_g_2",
-       "lcd_g_3",
-       "lcd_g_4",
-       "lcd_g_5",
-       "lcd_g_6",
-       "lcd_g_7",
-       "lcd_hsync",
-       "lcd_oe",
-       "lcd_pclk",
-       "lcd_r_0",
-       "lcd_r_1",
-       "lcd_r_2",
-       "lcd_r_3",
-       "lcd_r_4",
-       "lcd_r_5",
-       "lcd_r_6",
-       "lcd_r_7",
-       "lcd_vsync",
-       "mdmgpio0",
-       "mdmgpio1",
-       "mdmgpio2",
-       "mdmgpio3",
-       "mdmgpio4",
-       "mdmgpio5",
-       "mdmgpio6",
-       "mdmgpio7",
-       "mdmgpio8",
-       "mphi_data_0",
-       "mphi_data_1",
-       "mphi_data_2",
-       "mphi_data_3",
-       "mphi_data_4",
-       "mphi_data_5",
-       "mphi_data_6",
-       "mphi_data_7",
-       "mphi_data_8",
-       "mphi_data_9",
-       "mphi_data_10",
-       "mphi_data_11",
-       "mphi_data_12",
-       "mphi_data_13",
-       "mphi_data_14",
-       "mphi_data_15",
-       "mphi_ha0",
-       "mphi_hat0",
-       "mphi_hat1",
-       "mphi_hce0_n",
-       "mphi_hce1_n",
-       "mphi_hrd_n",
-       "mphi_hwr_n",
-       "mphi_run0",
-       "mphi_run1",
-       "mtx_scan_clk",
-       "mtx_scan_data",
-       "nand_ad_0",
-       "nand_ad_1",
-       "nand_ad_2",
-       "nand_ad_3",
-       "nand_ad_4",
-       "nand_ad_5",
-       "nand_ad_6",
-       "nand_ad_7",
-       "nand_ale",
-       "nand_cen_0",
-       "nand_cen_1",
-       "nand_cle",
-       "nand_oen",
-       "nand_rdy_0",
-       "nand_rdy_1",
-       "nand_wen",
-       "nand_wp",
-       "pc1",
-       "pc2",
-       "pmu_int",
-       "pmu_scl",
-       "pmu_sda",
-       "rfst2g_mtsloten3g",
-       "rgmii_0_rx_ctl",
-       "rgmii_0_rxc",
-       "rgmii_0_rxd_0",
-       "rgmii_0_rxd_1",
-       "rgmii_0_rxd_2",
-       "rgmii_0_rxd_3",
-       "rgmii_0_tx_ctl",
-       "rgmii_0_txc",
-       "rgmii_0_txd_0",
-       "rgmii_0_txd_1",
-       "rgmii_0_txd_2",
-       "rgmii_0_txd_3",
-       "rgmii_1_rx_ctl",
-       "rgmii_1_rxc",
-       "rgmii_1_rxd_0",
-       "rgmii_1_rxd_1",
-       "rgmii_1_rxd_2",
-       "rgmii_1_rxd_3",
-       "rgmii_1_tx_ctl",
-       "rgmii_1_txc",
-       "rgmii_1_txd_0",
-       "rgmii_1_txd_1",
-       "rgmii_1_txd_2",
-       "rgmii_1_txd_3",
-       "rgmii_gpio_0",
-       "rgmii_gpio_1",
-       "rgmii_gpio_2",
-       "rgmii_gpio_3",
-       "rtxdata2g_txdata3g1",
-       "rtxen2g_txdata3g2",
-       "rxdata3g0",
-       "rxdata3g1",
-       "rxdata3g2",
-       "sdio1_clk",
-       "sdio1_cmd",
-       "sdio1_data_0",
-       "sdio1_data_1",
-       "sdio1_data_2",
-       "sdio1_data_3",
-       "sdio4_clk",
-       "sdio4_cmd",
-       "sdio4_data_0",
-       "sdio4_data_1",
-       "sdio4_data_2",
-       "sdio4_data_3",
-       "sim_clk",
-       "sim_data",
-       "sim_det",
-       "sim_resetn",
-       "sim2_clk",
-       "sim2_data",
-       "sim2_det",
-       "sim2_resetn",
-       "sri_c",
-       "sri_d",
-       "sri_e",
-       "ssp_extclk",
-       "ssp0_clk",
-       "ssp0_fs",
-       "ssp0_rxd",
-       "ssp0_txd",
-       "ssp2_clk",
-       "ssp2_fs_0",
-       "ssp2_fs_1",
-       "ssp2_fs_2",
-       "ssp2_fs_3",
-       "ssp2_rxd_0",
-       "ssp2_rxd_1",
-       "ssp2_txd_0",
-       "ssp2_txd_1",
-       "ssp3_clk",
-       "ssp3_fs",
-       "ssp3_rxd",
-       "ssp3_txd",
-       "ssp4_clk",
-       "ssp4_fs",
-       "ssp4_rxd",
-       "ssp4_txd",
-       "ssp5_clk",
-       "ssp5_fs",
-       "ssp5_rxd",
-       "ssp5_txd",
-       "ssp6_clk",
-       "ssp6_fs",
-       "ssp6_rxd",
-       "ssp6_txd",
-       "stat_1",
-       "stat_2",
-       "sysclken",
-       "traceclk",
-       "tracedt00",
-       "tracedt01",
-       "tracedt02",
-       "tracedt03",
-       "tracedt04",
-       "tracedt05",
-       "tracedt06",
-       "tracedt07",
-       "tracedt08",
-       "tracedt09",
-       "tracedt10",
-       "tracedt11",
-       "tracedt12",
-       "tracedt13",
-       "tracedt14",
-       "tracedt15",
-       "txdata3g0",
-       "txpwrind",
-       "uartb1_ucts",
-       "uartb1_urts",
-       "uartb1_urxd",
-       "uartb1_utxd",
-       "uartb2_urxd",
-       "uartb2_utxd",
-       "uartb3_ucts",
-       "uartb3_urts",
-       "uartb3_urxd",
-       "uartb3_utxd",
-       "uartb4_ucts",
-       "uartb4_urts",
-       "uartb4_urxd",
-       "uartb4_utxd",
-       "vc_cam1_scl",
-       "vc_cam1_sda",
-       "vc_cam2_scl",
-       "vc_cam2_sda",
-       "vc_cam3_scl",
-       "vc_cam3_sda",
-};
-
-/* Every pin can implement all ALT1-ALT4 functions */
-#define CAPRI_PIN_FUNCTION(fcn_name)                   \
-{                                                      \
-       .name = #fcn_name,                              \
-       .groups = capri_alt_groups,                     \
-       .ngroups = ARRAY_SIZE(capri_alt_groups),        \
-}
-
-static const struct capri_pin_function capri_functions[] = {
-       CAPRI_PIN_FUNCTION(alt1),
-       CAPRI_PIN_FUNCTION(alt2),
-       CAPRI_PIN_FUNCTION(alt3),
-       CAPRI_PIN_FUNCTION(alt4),
-};
-
-static struct capri_pinctrl_data capri_pinctrl = {
-       .pins = capri_pinctrl_pins,
-       .npins = ARRAY_SIZE(capri_pinctrl_pins),
-       .functions = capri_functions,
-       .nfunctions = ARRAY_SIZE(capri_functions),
-};
-
-static inline enum capri_pin_type pin_type_get(struct pinctrl_dev *pctldev,
-                                              unsigned pin)
-{
-       struct capri_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
-
-       if (pin >= pdata->npins)
-               return CAPRI_PIN_TYPE_UNKNOWN;
-
-       return *(enum capri_pin_type *)(pdata->pins[pin].drv_data);
-}
-
-#define CAPRI_PIN_SHIFT(type, param) \
-       (CAPRI_ ## type ## _PIN_REG_ ## param ## _SHIFT)
-
-#define CAPRI_PIN_MASK(type, param) \
-       (CAPRI_ ## type ## _PIN_REG_ ## param ## _MASK)
-
-/*
- * This helper function is used to build up the value and mask used to write to
- * a pin register, but does not actually write to the register.
- */
-static inline void capri_pin_update(u32 *reg_val, u32 *reg_mask, u32 param_val,
-                                   u32 param_shift, u32 param_mask)
-{
-       *reg_val &= ~param_mask;
-       *reg_val |= (param_val << param_shift) & param_mask;
-       *reg_mask |= param_mask;
-}
-
-static struct regmap_config capri_pinctrl_regmap_config = {
-       .reg_bits = 32,
-       .reg_stride = 4,
-       .val_bits = 32,
-       .max_register = CAPRI_PIN_VC_CAM3_SDA,
-};
-
-static int capri_pinctrl_get_groups_count(struct pinctrl_dev *pctldev)
-{
-       struct capri_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
-
-       return pdata->npins;
-}
-
-static const char *capri_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
-                                               unsigned group)
-{
-       struct capri_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
-
-       return pdata->pins[group].name;
-}
-
-static int capri_pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
-                                       unsigned group,
-                                       const unsigned **pins,
-                                       unsigned *num_pins)
-{
-       struct capri_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
-
-       *pins = &pdata->pins[group].number;
-       *num_pins = 1;
-
-       return 0;
-}
-
-static void capri_pinctrl_pin_dbg_show(struct pinctrl_dev *pctldev,
-                                      struct seq_file *s,
-                                      unsigned offset)
-{
-       seq_printf(s, " %s", dev_name(pctldev->dev));
-}
-
-static struct pinctrl_ops capri_pinctrl_ops = {
-       .get_groups_count = capri_pinctrl_get_groups_count,
-       .get_group_name = capri_pinctrl_get_group_name,
-       .get_group_pins = capri_pinctrl_get_group_pins,
-       .pin_dbg_show = capri_pinctrl_pin_dbg_show,
-       .dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
-       .dt_free_map = pinctrl_utils_dt_free_map,
-};
-
-static int capri_pinctrl_get_fcns_count(struct pinctrl_dev *pctldev)
-{
-       struct capri_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
-
-       return pdata->nfunctions;
-}
-
-static const char *capri_pinctrl_get_fcn_name(struct pinctrl_dev *pctldev,
-                                             unsigned function)
-{
-       struct capri_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
-
-       return pdata->functions[function].name;
-}
-
-static int capri_pinctrl_get_fcn_groups(struct pinctrl_dev *pctldev,
-                                       unsigned function,
-                                       const char * const **groups,
-                                       unsigned * const num_groups)
-{
-       struct capri_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
-
-       *groups = pdata->functions[function].groups;
-       *num_groups = pdata->functions[function].ngroups;
-
-       return 0;
-}
-
-static int capri_pinmux_enable(struct pinctrl_dev *pctldev,
-                              unsigned function,
-                              unsigned group)
-{
-       struct capri_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
-       const struct capri_pin_function *f = &pdata->functions[function];
-       u32 offset = 4 * pdata->pins[group].number;
-       int rc = 0;
-
-       dev_dbg(pctldev->dev,
-               "%s(): Enable function %s (%d) of pin %s (%d) @offset 0x%x.\n",
-               __func__, f->name, function, pdata->pins[group].name,
-               pdata->pins[group].number, offset);
-
-       rc = regmap_update_bits(pdata->regmap, offset, CAPRI_PIN_REG_F_SEL_MASK,
-                       function << CAPRI_PIN_REG_F_SEL_SHIFT);
-       if (rc)
-               dev_err(pctldev->dev,
-                       "Error updating register for pin %s (%d).\n",
-                       pdata->pins[group].name, pdata->pins[group].number);
-
-       return rc;
-}
-
-static struct pinmux_ops capri_pinctrl_pinmux_ops = {
-       .get_functions_count = capri_pinctrl_get_fcns_count,
-       .get_function_name = capri_pinctrl_get_fcn_name,
-       .get_function_groups = capri_pinctrl_get_fcn_groups,
-       .enable = capri_pinmux_enable,
-};
-
-static int capri_pinctrl_pin_config_get(struct pinctrl_dev *pctldev,
-                                       unsigned pin,
-                                       unsigned long *config)
-{
-       return -ENOTSUPP;
-}
-
-
-/* Goes through the configs and update register val/mask */
-static int capri_std_pin_update(struct pinctrl_dev *pctldev,
-                               unsigned pin,
-                               unsigned long *configs,
-                               unsigned num_configs,
-                               u32 *val,
-                               u32 *mask)
-{
-       struct capri_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
-       int i;
-       enum pin_config_param param;
-       u16 arg;
-
-       for (i = 0; i < num_configs; i++) {
-               param = pinconf_to_config_param(configs[i]);
-               arg = pinconf_to_config_argument(configs[i]);
-
-               switch (param) {
-               case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
-                       arg = (arg >= 1 ? 1 : 0);
-                       capri_pin_update(val, mask, arg,
-                                       CAPRI_PIN_SHIFT(STD, HYST),
-                                       CAPRI_PIN_MASK(STD, HYST));
-                       break;
-               /*
-                * The pin bias can only be one of pull-up, pull-down, or
-                * disable.  The user does not need to specify a value for the
-                * property, and the default value from pinconf-generic is
-                * ignored.
-                */
-               case PIN_CONFIG_BIAS_DISABLE:
-                       capri_pin_update(val, mask, 0,
-                                       CAPRI_PIN_SHIFT(STD, PULL_UP),
-                                       CAPRI_PIN_MASK(STD, PULL_UP));
-                       capri_pin_update(val, mask, 0,
-                                       CAPRI_PIN_SHIFT(STD, PULL_DN),
-                                       CAPRI_PIN_MASK(STD, PULL_DN));
-                       break;
-
-               case PIN_CONFIG_BIAS_PULL_UP:
-                       capri_pin_update(val, mask, 1,
-                                       CAPRI_PIN_SHIFT(STD, PULL_UP),
-                                       CAPRI_PIN_MASK(STD, PULL_UP));
-                       capri_pin_update(val, mask, 0,
-                                       CAPRI_PIN_SHIFT(STD, PULL_DN),
-                                       CAPRI_PIN_MASK(STD, PULL_DN));
-                       break;
-
-               case PIN_CONFIG_BIAS_PULL_DOWN:
-                       capri_pin_update(val, mask, 0,
-                                       CAPRI_PIN_SHIFT(STD, PULL_UP),
-                                       CAPRI_PIN_MASK(STD, PULL_UP));
-                       capri_pin_update(val, mask, 1,
-                                       CAPRI_PIN_SHIFT(STD, PULL_DN),
-                                       CAPRI_PIN_MASK(STD, PULL_DN));
-                       break;
-
-               case PIN_CONFIG_SLEW_RATE:
-                       arg = (arg >= 1 ? 1 : 0);
-                       capri_pin_update(val, mask, arg,
-                                       CAPRI_PIN_SHIFT(STD, SLEW),
-                                       CAPRI_PIN_MASK(STD, SLEW));
-                       break;
-
-               case PIN_CONFIG_INPUT_ENABLE:
-                       /* inversed since register is for input _disable_ */
-                       arg = (arg >= 1 ? 0 : 1);
-                       capri_pin_update(val, mask, arg,
-                                       CAPRI_PIN_SHIFT(STD, INPUT_DIS),
-                                       CAPRI_PIN_MASK(STD, INPUT_DIS));
-                       break;
-
-               case PIN_CONFIG_DRIVE_STRENGTH:
-                       /* Valid range is 2-16 mA, even numbers only */
-                       if ((arg < 2) || (arg > 16) || (arg % 2)) {
-                               dev_err(pctldev->dev,
-                                       "Invalid Drive Strength value (%d) for "
-                                       "pin %s (%d). Valid values are "
-                                       "(2..16) mA, even numbers only.\n",
-                                       arg, pdata->pins[pin].name, pin);
-                               return -EINVAL;
-                       }
-                       capri_pin_update(val, mask, (arg/2)-1,
-                                       CAPRI_PIN_SHIFT(STD, DRV_STR),
-                                       CAPRI_PIN_MASK(STD, DRV_STR));
-                       break;
-
-               default:
-                       dev_err(pctldev->dev,
-                               "Unrecognized pin config %d for pin %s (%d).\n",
-                               param, pdata->pins[pin].name, pin);
-                       return -EINVAL;
-
-               } /* switch config */
-       } /* for each config */
-
-       return 0;
-}
-
-/*
- * The pull-up strength for an I2C pin is represented by bits 4-6 in the
- * register with the following mapping:
- *   0b000: No pull-up
- *   0b001: 1200 Ohm
- *   0b010: 1800 Ohm
- *   0b011: 720 Ohm
- *   0b100: 2700 Ohm
- *   0b101: 831 Ohm
- *   0b110: 1080 Ohm
- *   0b111: 568 Ohm
- * This array maps pull-up strength in Ohms to register values (1+index).
- */
-static const u16 capri_pullup_map[] = {1200, 1800, 720, 2700, 831, 1080, 568};
-
-/* Goes through the configs and update register val/mask */
-static int capri_i2c_pin_update(struct pinctrl_dev *pctldev,
-                               unsigned pin,
-                               unsigned long *configs,
-                               unsigned num_configs,
-                               u32 *val,
-                               u32 *mask)
-{
-       struct capri_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
-       int i, j;
-       enum pin_config_param param;
-       u16 arg;
-
-       for (i = 0; i < num_configs; i++) {
-               param = pinconf_to_config_param(configs[i]);
-               arg = pinconf_to_config_argument(configs[i]);
-
-               switch (param) {
-               case PIN_CONFIG_BIAS_PULL_UP:
-                       for (j = 0; j < ARRAY_SIZE(capri_pullup_map); j++)
-                               if (capri_pullup_map[j] == arg)
-                                       break;
-
-                       if (j == ARRAY_SIZE(capri_pullup_map)) {
-                               dev_err(pctldev->dev,
-                                       "Invalid pull-up value (%d) for pin %s "
-                                       "(%d). Valid values are 568, 720, 831, "
-                                       "1080, 1200, 1800, 2700 Ohms.\n",
-                                       arg, pdata->pins[pin].name, pin);
-                               return -EINVAL;
-                       }
-
-                       capri_pin_update(val, mask, j+1,
-                                       CAPRI_PIN_SHIFT(I2C, PULL_UP_STR),
-                                       CAPRI_PIN_MASK(I2C, PULL_UP_STR));
-                       break;
-
-               case PIN_CONFIG_BIAS_DISABLE:
-                       capri_pin_update(val, mask, 0,
-                                       CAPRI_PIN_SHIFT(I2C, PULL_UP_STR),
-                                       CAPRI_PIN_MASK(I2C, PULL_UP_STR));
-                       break;
-
-               case PIN_CONFIG_SLEW_RATE:
-                       arg = (arg >= 1 ? 1 : 0);
-                       capri_pin_update(val, mask, arg,
-                                       CAPRI_PIN_SHIFT(I2C, SLEW),
-                                       CAPRI_PIN_MASK(I2C, SLEW));
-                       break;
-
-               case PIN_CONFIG_INPUT_ENABLE:
-                       /* inversed since register is for input _disable_ */
-                       arg = (arg >= 1 ? 0 : 1);
-                       capri_pin_update(val, mask, arg,
-                                       CAPRI_PIN_SHIFT(I2C, INPUT_DIS),
-                                       CAPRI_PIN_MASK(I2C, INPUT_DIS));
-                       break;
-
-               default:
-                       dev_err(pctldev->dev,
-                               "Unrecognized pin config %d for pin %s (%d).\n",
-                               param, pdata->pins[pin].name, pin);
-                       return -EINVAL;
-
-               } /* switch config */
-       } /* for each config */
-
-       return 0;
-}
-
-/* Goes through the configs and update register val/mask */
-static int capri_hdmi_pin_update(struct pinctrl_dev *pctldev,
-                                unsigned pin,
-                                unsigned long *configs,
-                                unsigned num_configs,
-                                u32 *val,
-                                u32 *mask)
-{
-       struct capri_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
-       int i;
-       enum pin_config_param param;
-       u16 arg;
-
-       for (i = 0; i < num_configs; i++) {
-               param = pinconf_to_config_param(configs[i]);
-               arg = pinconf_to_config_argument(configs[i]);
-
-               switch (param) {
-               case PIN_CONFIG_SLEW_RATE:
-                       arg = (arg >= 1 ? 1 : 0);
-                       capri_pin_update(val, mask, arg,
-                                       CAPRI_PIN_SHIFT(HDMI, MODE),
-                                       CAPRI_PIN_MASK(HDMI, MODE));
-                       break;
-
-               case PIN_CONFIG_INPUT_ENABLE:
-                       /* inversed since register is for input _disable_ */
-                       arg = (arg >= 1 ? 0 : 1);
-                       capri_pin_update(val, mask, arg,
-                                       CAPRI_PIN_SHIFT(HDMI, INPUT_DIS),
-                                       CAPRI_PIN_MASK(HDMI, INPUT_DIS));
-                       break;
-
-               default:
-                       dev_err(pctldev->dev,
-                               "Unrecognized pin config %d for pin %s (%d).\n",
-                               param, pdata->pins[pin].name, pin);
-                       return -EINVAL;
-
-               } /* switch config */
-       } /* for each config */
-
-       return 0;
-}
-
-static int capri_pinctrl_pin_config_set(struct pinctrl_dev *pctldev,
-                                       unsigned pin,
-                                       unsigned long *configs,
-                                       unsigned num_configs)
-{
-       struct capri_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
-       enum capri_pin_type pin_type;
-       u32 offset = 4 * pin;
-       u32 cfg_val, cfg_mask;
-       int rc;
-
-       cfg_val = 0;
-       cfg_mask = 0;
-       pin_type = pin_type_get(pctldev, pin);
-
-       /* Different pins have different configuration options */
-       switch (pin_type) {
-       case CAPRI_PIN_TYPE_STD:
-               rc = capri_std_pin_update(pctldev, pin, configs, num_configs,
-                       &cfg_val, &cfg_mask);
-               break;
-
-       case CAPRI_PIN_TYPE_I2C:
-               rc = capri_i2c_pin_update(pctldev, pin, configs, num_configs,
-                       &cfg_val, &cfg_mask);
-               break;
-
-       case CAPRI_PIN_TYPE_HDMI:
-               rc = capri_hdmi_pin_update(pctldev, pin, configs, num_configs,
-                       &cfg_val, &cfg_mask);
-               break;
-
-       default:
-               dev_err(pctldev->dev, "Unknown pin type for pin %s (%d).\n",
-                       pdata->pins[pin].name, pin);
-               return -EINVAL;
-
-       } /* switch pin type */
-
-       if (rc)
-               return rc;
-
-       dev_dbg(pctldev->dev,
-               "%s(): Set pin %s (%d) with config 0x%x, mask 0x%x\n",
-               __func__, pdata->pins[pin].name, pin, cfg_val, cfg_mask);
-
-       rc = regmap_update_bits(pdata->regmap, offset, cfg_mask, cfg_val);
-       if (rc) {
-               dev_err(pctldev->dev,
-                       "Error updating register for pin %s (%d).\n",
-                       pdata->pins[pin].name, pin);
-               return rc;
-       }
-
-       return 0;
-}
-
-static struct pinconf_ops capri_pinctrl_pinconf_ops = {
-       .pin_config_get = capri_pinctrl_pin_config_get,
-       .pin_config_set = capri_pinctrl_pin_config_set,
-};
-
-static struct pinctrl_desc capri_pinctrl_desc = {
-       /* name, pins, npins members initialized in probe function */
-       .pctlops = &capri_pinctrl_ops,
-       .pmxops = &capri_pinctrl_pinmux_ops,
-       .confops = &capri_pinctrl_pinconf_ops,
-       .owner = THIS_MODULE,
-};
-
-int __init capri_pinctrl_probe(struct platform_device *pdev)
-{
-       struct capri_pinctrl_data *pdata = &capri_pinctrl;
-       struct resource *res;
-       struct pinctrl_dev *pctl;
-
-       /* So far We can assume there is only 1 bank of registers */
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res) {
-               dev_err(&pdev->dev, "Missing MEM resource\n");
-               return -ENODEV;
-       }
-
-       pdata->reg_base = devm_ioremap_resource(&pdev->dev, res);
-       if (IS_ERR(pdata->reg_base)) {
-               dev_err(&pdev->dev, "Failed to ioremap MEM resource\n");
-               return -ENODEV;
-       }
-
-       /* Initialize the dynamic part of pinctrl_desc */
-       pdata->regmap = devm_regmap_init_mmio(&pdev->dev, pdata->reg_base,
-               &capri_pinctrl_regmap_config);
-       if (IS_ERR(pdata->regmap)) {
-               dev_err(&pdev->dev, "Regmap MMIO init failed.\n");
-               return -ENODEV;
-       }
-
-       capri_pinctrl_desc.name = dev_name(&pdev->dev);
-       capri_pinctrl_desc.pins = capri_pinctrl.pins;
-       capri_pinctrl_desc.npins = capri_pinctrl.npins;
-
-       pctl = pinctrl_register(&capri_pinctrl_desc,
-                               &pdev->dev,
-                               pdata);
-       if (!pctl) {
-               dev_err(&pdev->dev, "Failed to register pinctrl\n");
-               return -ENODEV;
-       }
-
-       platform_set_drvdata(pdev, pdata);
-
-       return 0;
-}
-
-static struct of_device_id capri_pinctrl_of_match[] = {
-       { .compatible = "brcm,bcm11351-pinctrl", },
-       { },
-};
-
-static struct platform_driver capri_pinctrl_driver = {
-       .driver = {
-               .name = "bcm-capri-pinctrl",
-               .owner = THIS_MODULE,
-               .of_match_table = capri_pinctrl_of_match,
-       },
-};
-
-module_platform_driver_probe(capri_pinctrl_driver, capri_pinctrl_probe);
-
-MODULE_AUTHOR("Sherman Yin <syin@broadcom.com>");
-MODULE_DESCRIPTION("Broadcom Capri pinctrl driver");
-MODULE_LICENSE("GPL v2");
index 38d579b..e43fbce 100644 (file)
@@ -665,7 +665,10 @@ static void msm_gpio_irq_ack(struct irq_data *d)
        spin_lock_irqsave(&pctrl->lock, flags);
 
        val = readl(pctrl->regs + g->intr_status_reg);
-       val &= ~BIT(g->intr_status_bit);
+       if (g->intr_ack_high)
+               val |= BIT(g->intr_status_bit);
+       else
+               val &= ~BIT(g->intr_status_bit);
        writel(val, pctrl->regs + g->intr_status_reg);
 
        if (test_bit(d->hwirq, pctrl->dual_edge_irqs))
@@ -744,6 +747,7 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type)
                        break;
                case IRQ_TYPE_EDGE_BOTH:
                        val |= BIT(g->intr_detection_bit);
+                       val |= BIT(g->intr_polarity_bit);
                        break;
                case IRQ_TYPE_LEVEL_LOW:
                        break;
index 8fbe9fb..6e26f1b 100644 (file)
@@ -84,6 +84,7 @@ struct msm_pingroup {
 
        unsigned intr_enable_bit:5;
        unsigned intr_status_bit:5;
+       unsigned intr_ack_high:1;
 
        unsigned intr_target_bit:5;
        unsigned intr_raw_status_bit:5;
index 208341f..8f6f16e 100644 (file)
@@ -877,7 +877,6 @@ static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
        struct nmk_gpio_chip *nmk_chip = container_of(chip, struct nmk_gpio_chip, chip);
        u32 status;
 
-       pr_err("PLONK IRQ %d\n", irq);
        clk_enable(nmk_chip->clk);
        status = readl(nmk_chip->addr + NMK_GPIO_IS);
        clk_disable(nmk_chip->clk);
index 46dddc1..96c60d2 100644 (file)
@@ -342,7 +342,7 @@ static const struct pinctrl_ops rockchip_pctrl_ops = {
  * @pin: pin to change
  * @mux: new mux function to set
  */
-static void rockchip_set_mux(struct rockchip_pin_bank *bank, int pin, int mux)
+static int rockchip_set_mux(struct rockchip_pin_bank *bank, int pin, int mux)
 {
        struct rockchip_pinctrl *info = bank->drvdata;
        void __iomem *reg = info->reg_base + info->ctrl->mux_offset;
@@ -350,6 +350,20 @@ static void rockchip_set_mux(struct rockchip_pin_bank *bank, int pin, int mux)
        u8 bit;
        u32 data;
 
+       /*
+        * The first 16 pins of rk3188_bank0 are always gpios and do not have
+        * a mux register at all.
+        */
+       if (bank->bank_type == RK3188_BANK0 && pin < 16) {
+               if (mux != RK_FUNC_GPIO) {
+                       dev_err(info->dev,
+                               "pin %d only supports a gpio mux\n", pin);
+                       return -ENOTSUPP;
+               } else {
+                       return 0;
+               }
+       }
+
        dev_dbg(info->dev, "setting mux of GPIO%d-%d to %d\n",
                                                bank->bank_num, pin, mux);
 
@@ -365,6 +379,8 @@ static void rockchip_set_mux(struct rockchip_pin_bank *bank, int pin, int mux)
        writel(data, reg);
 
        spin_unlock_irqrestore(&bank->slock, flags);
+
+       return 0;
 }
 
 #define RK2928_PULL_OFFSET             0x118
@@ -560,7 +576,7 @@ static int rockchip_pmx_enable(struct pinctrl_dev *pctldev, unsigned selector,
        const unsigned int *pins = info->groups[group].pins;
        const struct rockchip_pin_config *data = info->groups[group].data;
        struct rockchip_pin_bank *bank;
-       int cnt;
+       int cnt, ret = 0;
 
        dev_dbg(info->dev, "enable function %s group %s\n",
                info->functions[selector].name, info->groups[group].name);
@@ -571,8 +587,18 @@ static int rockchip_pmx_enable(struct pinctrl_dev *pctldev, unsigned selector,
         */
        for (cnt = 0; cnt < info->groups[group].npins; cnt++) {
                bank = pin_to_bank(info, pins[cnt]);
-               rockchip_set_mux(bank, pins[cnt] - bank->pin_base,
-                                data[cnt].func);
+               ret = rockchip_set_mux(bank, pins[cnt] - bank->pin_base,
+                                      data[cnt].func);
+               if (ret)
+                       break;
+       }
+
+       if (ret) {
+               /* revert the already done pin settings */
+               for (cnt--; cnt >= 0; cnt--)
+                       rockchip_set_mux(bank, pins[cnt] - bank->pin_base, 0);
+
+               return ret;
        }
 
        return 0;
@@ -607,7 +633,7 @@ static int rockchip_pmx_gpio_set_direction(struct pinctrl_dev *pctldev,
        struct rockchip_pinctrl *info = pinctrl_dev_get_drvdata(pctldev);
        struct rockchip_pin_bank *bank;
        struct gpio_chip *chip;
-       int pin;
+       int pin, ret;
        u32 data;
 
        chip = range->gc;
@@ -617,7 +643,9 @@ static int rockchip_pmx_gpio_set_direction(struct pinctrl_dev *pctldev,
        dev_dbg(info->dev, "gpio_direction for pin %u as %s-%d to %s\n",
                 offset, range->name, pin, input ? "input" : "output");
 
-       rockchip_set_mux(bank, pin, RK_FUNC_GPIO);
+       ret = rockchip_set_mux(bank, pin, RK_FUNC_GPIO);
+       if (ret < 0)
+               return ret;
 
        data = readl_relaxed(bank->reg_base + GPIO_SWPORT_DDR);
        /* set bit to 1 for output, 0 for input */
@@ -1144,9 +1172,13 @@ static int rockchip_irq_set_type(struct irq_data *d, unsigned int type)
        u32 polarity;
        u32 level;
        u32 data;
+       int ret;
 
        /* make sure the pin is configured as gpio input */
-       rockchip_set_mux(bank, d->hwirq, RK_FUNC_GPIO);
+       ret = rockchip_set_mux(bank, d->hwirq, RK_FUNC_GPIO);
+       if (ret < 0)
+               return ret;
+
        data = readl_relaxed(bank->reg_base + GPIO_SWPORT_DDR);
        data &= ~mask;
        writel_relaxed(data, bank->reg_base + GPIO_SWPORT_DDR);
@@ -1534,7 +1566,7 @@ static struct rockchip_pin_ctrl rk3188_pin_ctrl = {
                .nr_banks               = ARRAY_SIZE(rk3188_pin_banks),
                .label                  = "RK3188-GPIO",
                .type                   = RK3188,
-               .mux_offset             = 0x68,
+               .mux_offset             = 0x60,
                .pull_calc_reg          = rk3188_calc_pull_reg_and_bit,
 };
 
index 1990285..c316051 100644 (file)
@@ -1252,7 +1252,7 @@ static __init int sclp_initcall(void)
                return rc;
 
        sclp_pdev = platform_device_register_simple("sclp", -1, NULL, 0);
-       rc = PTR_RET(sclp_pdev);
+       rc = PTR_ERR_OR_ZERO(sclp_pdev);
        if (rc)
                goto fail_platform_driver_unregister;
 
index 6e8f90f..6e14999 100644 (file)
@@ -515,7 +515,7 @@ static int __init sclp_detect_standby_memory(void)
        if (rc)
                goto out;
        sclp_pdev = platform_device_register_simple("sclp_mem", -1, NULL, 0);
-       rc = PTR_RET(sclp_pdev);
+       rc = PTR_ERR_OR_ZERO(sclp_pdev);
        if (rc)
                goto out_driver;
        sclp_add_standby_memory();
index 4eed38c..cd9c919 100644 (file)
@@ -97,13 +97,16 @@ static void sclp_vt220_pm_event_fn(struct sclp_register *reg,
 static int __sclp_vt220_emit(struct sclp_vt220_request *request);
 static void sclp_vt220_emit_current(void);
 
-/* Registration structure for our interest in SCLP event buffers */
+/* Registration structure for SCLP output event buffers */
 static struct sclp_register sclp_vt220_register = {
        .send_mask              = EVTYP_VT220MSG_MASK,
+       .pm_event_fn            = sclp_vt220_pm_event_fn,
+};
+
+/* Registration structure for SCLP input event buffers */
+static struct sclp_register sclp_vt220_register_input = {
        .receive_mask           = EVTYP_VT220MSG_MASK,
-       .state_change_fn        = NULL,
        .receiver_fn            = sclp_vt220_receiver_fn,
-       .pm_event_fn            = sclp_vt220_pm_event_fn,
 };
 
 
@@ -715,9 +718,14 @@ static int __init sclp_vt220_tty_init(void)
        rc = tty_register_driver(driver);
        if (rc)
                goto out_init;
+       rc = sclp_register(&sclp_vt220_register_input);
+       if (rc)
+               goto out_reg;
        sclp_vt220_driver = driver;
        return 0;
 
+out_reg:
+       tty_unregister_driver(driver);
 out_init:
        __sclp_vt220_cleanup();
 out_driver:
index 5c739be..949f0e5 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef _VB_DEF_
 #define _VB_DEF_
-#include "../../video/sis/initdef.h"
+#include "../../video/fbdev/sis/initdef.h"
 
 #define VB_XGI301C      0x0020 /* for 301C */
 
index c08ff5b..0d27594 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef _VB_STRUCT_
 #define _VB_STRUCT_
-#include "../../video/sis/vstruct.h"
+#include "../../video/fbdev/sis/vstruct.h"
 
 struct XGI_LVDSCRT1HDataStruct {
        unsigned char Reg[8];
index ddf7776..2643514 100644 (file)
@@ -2,8 +2,8 @@
 #define _VGATYPES_
 
 #include <linux/fb.h>  /* for struct fb_var_screeninfo for sis.h */
-#include "../../video/sis/vgatypes.h"
-#include "../../video/sis/sis.h"               /* for LCD_TYPE */
+#include "../../video/fbdev/sis/vgatypes.h"
+#include "../../video/fbdev/sis/sis.h"         /* for LCD_TYPE */
 
 #ifndef XGI_VB_CHIP_TYPE
 enum XGI_VB_CHIP_TYPE {
index 6c793bc..c7b4f0f 100644 (file)
@@ -21,7 +21,15 @@ source "drivers/gpu/vga/Kconfig"
 
 source "drivers/gpu/host1x/Kconfig"
 
+menu "Direct Rendering Manager"
 source "drivers/gpu/drm/Kconfig"
+endmenu
+
+menu "Frame buffer Devices"
+source "drivers/video/fbdev/Kconfig"
+endmenu
+
+source "drivers/video/backlight/Kconfig"
 
 config VGASTATE
        tristate
@@ -33,2482 +41,14 @@ config VIDEOMODE_HELPERS
 config HDMI
        bool
 
-menuconfig FB
-       tristate "Support for frame buffer devices"
-       ---help---
-         The frame buffer device provides an abstraction for the graphics
-         hardware. It represents the frame buffer of some video hardware and
-         allows application software to access the graphics hardware through
-         a well-defined interface, so the software doesn't need to know
-         anything about the low-level (hardware register) stuff.
-
-         Frame buffer devices work identically across the different
-         architectures supported by Linux and make the implementation of
-         application programs easier and more portable; at this point, an X
-         server exists which uses the frame buffer device exclusively.
-         On several non-X86 architectures, the frame buffer device is the
-         only way to use the graphics hardware.
-
-         The device is accessed through special device nodes, usually located
-         in the /dev directory, i.e. /dev/fb*.
-
-         You need an utility program called fbset to make full use of frame
-         buffer devices. Please read <file:Documentation/fb/framebuffer.txt>
-         and the Framebuffer-HOWTO at
-         <http://www.munted.org.uk/programming/Framebuffer-HOWTO-1.3.html> for more
-         information.
-
-         Say Y here and to the driver for your graphics board below if you
-         are compiling a kernel for a non-x86 architecture.
-
-         If you are compiling for the x86 architecture, you can say Y if you
-         want to play with it, but it is not essential. Please note that
-         running graphical applications that directly touch the hardware
-         (e.g. an accelerated X server) and that are not frame buffer
-         device-aware may cause unexpected results. If unsure, say N.
-
-config FIRMWARE_EDID
-       bool "Enable firmware EDID"
-       depends on FB
-       default n
-       ---help---
-         This enables access to the EDID transferred from the firmware.
-        On the i386, this is from the Video BIOS. Enable this if DDC/I2C
-        transfers do not work for your driver and if you are using
-        nvidiafb, i810fb or savagefb.
-
-        In general, choosing Y for this option is safe.  If you
-        experience extremely long delays while booting before you get
-        something on your display, try setting this to N.  Matrox cards in
-        combination with certain motherboards and monitors are known to
-        suffer from this problem.
-
-config FB_DDC
-       tristate
-       depends on FB
-       select I2C_ALGOBIT
-       select I2C
-       default n
-
-config FB_BOOT_VESA_SUPPORT
-       bool
-       depends on FB
-       default n
-       ---help---
-         If true, at least one selected framebuffer driver can take advantage
-         of VESA video modes set at an early boot stage via the vga= parameter.
-
-config FB_CFB_FILLRECT
-       tristate
-       depends on FB
-       default n
-       ---help---
-         Include the cfb_fillrect function for generic software rectangle
-         filling. This is used by drivers that don't provide their own
-         (accelerated) version.
-
-config FB_CFB_COPYAREA
-       tristate
-       depends on FB
-       default n
-       ---help---
-         Include the cfb_copyarea function for generic software area copying.
-         This is used by drivers that don't provide their own (accelerated)
-         version.
-
-config FB_CFB_IMAGEBLIT
-       tristate
-       depends on FB
-       default n
-       ---help---
-         Include the cfb_imageblit function for generic software image
-         blitting. This is used by drivers that don't provide their own
-         (accelerated) version.
-
-config FB_CFB_REV_PIXELS_IN_BYTE
-       bool
-       depends on FB
-       default n
-       ---help---
-         Allow generic frame-buffer functions to work on displays with 1, 2
-         and 4 bits per pixel depths which has opposite order of pixels in
-         byte order to bytes in long order.
-
-config FB_SYS_FILLRECT
-       tristate
-       depends on FB
-       default n
-       ---help---
-         Include the sys_fillrect function for generic software rectangle
-         filling. This is used by drivers that don't provide their own
-         (accelerated) version and the framebuffer is in system RAM.
-
-config FB_SYS_COPYAREA
-       tristate
-       depends on FB
-       default n
-       ---help---
-         Include the sys_copyarea function for generic software area copying.
-         This is used by drivers that don't provide their own (accelerated)
-         version and the framebuffer is in system RAM.
-
-config FB_SYS_IMAGEBLIT
-       tristate
-       depends on FB
-       default n
-       ---help---
-         Include the sys_imageblit function for generic software image
-         blitting. This is used by drivers that don't provide their own
-         (accelerated) version and the framebuffer is in system RAM.
-
-menuconfig FB_FOREIGN_ENDIAN
-       bool "Framebuffer foreign endianness support"
-       depends on FB
-       ---help---
-         This menu will let you enable support for the framebuffers with
-         non-native endianness (e.g. Little-Endian framebuffer on a
-         Big-Endian machine). Most probably you don't have such hardware,
-         so it's safe to say "n" here.
-
-choice
-       prompt "Choice endianness support"
-       depends on FB_FOREIGN_ENDIAN
-
-config FB_BOTH_ENDIAN
-       bool "Support for Big- and Little-Endian framebuffers"
-
-config FB_BIG_ENDIAN
-       bool "Support for Big-Endian framebuffers only"
-
-config FB_LITTLE_ENDIAN
-       bool "Support for Little-Endian framebuffers only"
-
-endchoice
-
-config FB_SYS_FOPS
-       tristate
-       depends on FB
-       default n
-
-config FB_DEFERRED_IO
-       bool
-       depends on FB
-
-config FB_HECUBA
-       tristate
-       depends on FB
-       depends on FB_DEFERRED_IO
-
-config FB_SVGALIB
-       tristate
-       depends on FB
-       default n
-       ---help---
-         Common utility functions useful to fbdev drivers of VGA-based
-         cards.
-
-config FB_MACMODES
-       tristate
-       depends on FB
-       default n
-
-config FB_BACKLIGHT
-       bool
-       depends on FB
-       select BACKLIGHT_LCD_SUPPORT
-       select BACKLIGHT_CLASS_DEVICE
-       default n
-
-config FB_MODE_HELPERS
-        bool "Enable Video Mode Handling Helpers"
-        depends on FB
-       default n
-       ---help---
-         This enables functions for handling video modes using the
-         Generalized Timing Formula and the EDID parser. A few drivers rely
-          on this feature such as the radeonfb, rivafb, and the i810fb. If
-         your driver does not take advantage of this feature, choosing Y will
-         just increase the kernel size by about 5K.
-
-config FB_TILEBLITTING
-       bool "Enable Tile Blitting Support"
-       depends on FB
-       default n
-       ---help---
-         This enables tile blitting.  Tile blitting is a drawing technique
-        where the screen is divided into rectangular sections (tiles), whereas
-        the standard blitting divides the screen into pixels. Because the
-        default drawing element is a tile, drawing functions will be passed
-        parameters in terms of number of tiles instead of number of pixels.
-        For example, to draw a single character, instead of using bitmaps,
-        an index to an array of bitmaps will be used.  To clear or move a
-        rectangular section of a screen, the rectangle will be described in
-        terms of number of tiles in the x- and y-axis.
-
-        This is particularly important to one driver, matroxfb.  If
-        unsure, say N.
-
-comment "Frame buffer hardware drivers"
-       depends on FB
-
-config FB_GRVGA
-       tristate "Aeroflex Gaisler framebuffer support"
-       depends on FB && SPARC
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-       This enables support for the SVGACTRL framebuffer in the GRLIB IP library from Aeroflex Gaisler.
-
-config FB_CIRRUS
-       tristate "Cirrus Logic support"
-       depends on FB && (ZORRO || PCI)
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         This enables support for Cirrus Logic GD542x/543x based boards on
-         Amiga: SD64, Piccolo, Picasso II/II+, Picasso IV, or EGS Spectrum.
-
-         If you have a PCI-based system, this enables support for these
-         chips: GD-543x, GD-544x, GD-5480.
-
-         Please read the file <file:Documentation/fb/cirrusfb.txt>.
-
-         Say N unless you have such a graphics board or plan to get one
-         before you next recompile the kernel.
-
-config FB_PM2
-       tristate "Permedia2 support"
-       depends on FB && ((AMIGA && BROKEN) || PCI)
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for cards based on
-         the 3D Labs Permedia, Permedia 2 and Permedia 2V chips.
-         The driver was tested on the following cards:
-               Diamond FireGL 1000 PRO AGP
-               ELSA Gloria Synergy PCI
-               Appian Jeronimo PRO (both heads) PCI
-               3DLabs Oxygen ACX aka EONtronics Picasso P2 PCI
-               Techsource Raptor GFX-8P (aka Sun PGX-32) on SPARC
-               ASK Graphic Blaster Exxtreme AGP
-
-         To compile this driver as a module, choose M here: the
-         module will be called pm2fb.
-
-config FB_PM2_FIFO_DISCONNECT
-       bool "enable FIFO disconnect feature"
-       depends on FB_PM2 && PCI
-       help
-         Support the Permedia2 FIFO disconnect feature.
-
-config FB_ARMCLCD
-       tristate "ARM PrimeCell PL110 support"
-       depends on ARM || ARM64 || COMPILE_TEST
-       depends on FB && ARM_AMBA
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This framebuffer device driver is for the ARM PrimeCell PL110
-         Colour LCD controller.  ARM PrimeCells provide the building
-         blocks for System on a Chip devices.
-
-         If you want to compile this as a module (=code which can be
-         inserted into and removed from the running kernel), say M
-         here and read <file:Documentation/kbuild/modules.txt>.  The module
-         will be called amba-clcd.
-
-config FB_ACORN
-       bool "Acorn VIDC support"
-       depends on (FB = y) && ARM && ARCH_ACORN
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for the Acorn VIDC graphics
-         hardware found in Acorn RISC PCs and other ARM-based machines.  If
-         unsure, say N.
-
-config FB_CLPS711X
-       bool "CLPS711X LCD support"
-       depends on (FB = y) && ARM && ARCH_CLPS711X
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         Say Y to enable the Framebuffer driver for the CLPS7111 and
-         EP7212 processors.
-
-config FB_SA1100
-       bool "SA-1100 LCD support"
-       depends on (FB = y) && ARM && ARCH_SA1100
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is a framebuffer device for the SA-1100 LCD Controller.
-         See <http://www.linux-fbdev.org/> for information on framebuffer
-         devices.
-
-         If you plan to use the LCD display with your SA-1100 system, say
-         Y here.
-
-config FB_IMX
-       tristate "Freescale i.MX1/21/25/27 LCD support"
-       depends on FB && ARCH_MXC
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_MODE_HELPERS
-       select VIDEOMODE_HELPERS
-
-config FB_CYBER2000
-       tristate "CyberPro 2000/2010/5000 support"
-       depends on FB && PCI && (BROKEN || !SPARC64)
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This enables support for the Integraphics CyberPro 20x0 and 5000
-         VGA chips used in the Rebel.com Netwinder and other machines.
-         Say Y if you have a NetWinder or a graphics card containing this
-         device, otherwise say N.
-
-config FB_CYBER2000_DDC
-       bool "DDC for CyberPro support"
-       depends on FB_CYBER2000
-       select FB_DDC
-       default y
-       help
-         Say Y here if you want DDC support for your CyberPro graphics
-         card. This is only I2C bus support, driver does not use EDID.
-
-config FB_CYBER2000_I2C
-       bool "CyberPro 2000/2010/5000 I2C support"
-       depends on FB_CYBER2000 && I2C && ARCH_NETWINDER
-       select I2C_ALGOBIT
-       help
-         Enable support for the I2C video decoder interface on the
-         Integraphics CyberPro 20x0 and 5000 VGA chips.  This is used
-         on the Netwinder machines for the SAA7111 video capture.
-
-config FB_APOLLO
-       bool
-       depends on (FB = y) && APOLLO
-       default y
-       select FB_CFB_FILLRECT
-       select FB_CFB_IMAGEBLIT
-
-config FB_Q40
-       bool
-       depends on (FB = y) && Q40
-       default y
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-
-config FB_AMIGA
-       tristate "Amiga native chipset support"
-       depends on FB && AMIGA
-       help
-         This is the frame buffer device driver for the builtin graphics
-         chipset found in Amigas.
-
-         To compile this driver as a module, choose M here: the
-         module will be called amifb.
-
-config FB_AMIGA_OCS
-       bool "Amiga OCS chipset support"
-       depends on FB_AMIGA
-       help
-         This enables support for the original Agnus and Denise video chips,
-         found in the Amiga 1000 and most A500's and A2000's. If you intend
-         to run Linux on any of these systems, say Y; otherwise say N.
-
-config FB_AMIGA_ECS
-       bool "Amiga ECS chipset support"
-       depends on FB_AMIGA
-       help
-         This enables support for the Enhanced Chip Set, found in later
-         A500's, later A2000's, the A600, the A3000, the A3000T and CDTV. If
-         you intend to run Linux on any of these systems, say Y; otherwise
-         say N.
-
-config FB_AMIGA_AGA
-       bool "Amiga AGA chipset support"
-       depends on FB_AMIGA
-       help
-         This enables support for the Advanced Graphics Architecture (also
-         known as the AGA or AA) Chip Set, found in the A1200, A4000, A4000T
-         and CD32. If you intend to run Linux on any of these systems, say Y;
-         otherwise say N.
-
-config FB_FM2
-       bool "Amiga FrameMaster II/Rainbow II support"
-       depends on (FB = y) && ZORRO
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for the Amiga FrameMaster
-         card from BSC (exhibited 1992 but not shipped as a CBM product).
-
-config FB_ARC
-       tristate "Arc Monochrome LCD board support"
-       depends on FB && X86
-       select FB_SYS_FILLRECT
-       select FB_SYS_COPYAREA
-       select FB_SYS_IMAGEBLIT
-       select FB_SYS_FOPS
-       help
-         This enables support for the Arc Monochrome LCD board. The board
-         is based on the KS-108 lcd controller and is typically a matrix
-         of 2*n chips. This driver was tested with a 128x64 panel. This
-         driver supports it for use with x86 SBCs through a 16 bit GPIO
-         interface (8 bit data, 8 bit control). If you anticipate using
-         this driver, say Y or M; otherwise say N. You must specify the
-         GPIO IO address to be used for setting control and data.
-
-config FB_ATARI
-       bool "Atari native chipset support"
-       depends on (FB = y) && ATARI
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for the builtin graphics
-         chipset found in Ataris.
-
-config FB_OF
-       bool "Open Firmware frame buffer device support"
-       depends on (FB = y) && (PPC64 || PPC_OF) && (!PPC_PSERIES || PCI)
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_MACMODES
-       help
-         Say Y if you want support with Open Firmware for your graphics
-         board.
-
-config FB_CONTROL
-       bool "Apple \"control\" display support"
-       depends on (FB = y) && PPC_PMAC && PPC32
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_MACMODES
-       help
-         This driver supports a frame buffer for the graphics adapter in the
-         Power Macintosh 7300 and others.
-
-config FB_PLATINUM
-       bool "Apple \"platinum\" display support"
-       depends on (FB = y) && PPC_PMAC && PPC32
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_MACMODES
-       help
-         This driver supports a frame buffer for the "platinum" graphics
-         adapter in some Power Macintoshes.
-
-config FB_VALKYRIE
-       bool "Apple \"valkyrie\" display support"
-       depends on (FB = y) && (MAC || (PPC_PMAC && PPC32))
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_MACMODES
-       help
-         This driver supports a frame buffer for the "valkyrie" graphics
-         adapter in some Power Macintoshes.
-
-config FB_CT65550
-       bool "Chips 65550 display support"
-       depends on (FB = y) && PPC32 && PCI
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for the Chips & Technologies
-         65550 graphics chip in PowerBooks.
-
-config FB_ASILIANT
-       bool "Asiliant (Chips) 69000 display support"
-       depends on (FB = y) && PCI
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for the Asiliant 69030 chipset
-
-config FB_IMSTT
-       bool "IMS Twin Turbo display support"
-       depends on (FB = y) && PCI
-       select FB_CFB_IMAGEBLIT
-       select FB_MACMODES if PPC
-       help
-         The IMS Twin Turbo is a PCI-based frame buffer card bundled with
-         many Macintosh and compatible computers.
-
-config FB_VGA16
-       tristate "VGA 16-color graphics support"
-       depends on FB && (X86 || PPC)
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select VGASTATE
-       select FONT_8x16 if FRAMEBUFFER_CONSOLE
-       help
-         This is the frame buffer device driver for VGA 16 color graphic
-         cards. Say Y if you have such a card.
-
-         To compile this driver as a module, choose M here: the
-         module will be called vga16fb.
-
-config FB_BF54X_LQ043
-       tristate "SHARP LQ043 TFT LCD (BF548 EZKIT)"
-       depends on FB && (BF54x) && !BF542
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-        This is the framebuffer device driver for a SHARP LQ043T1DG01 TFT LCD
-
-config FB_BFIN_T350MCQB
-       tristate "Varitronix COG-T350MCQB TFT LCD display (BF527 EZKIT)"
-       depends on FB && BLACKFIN
-       select BFIN_GPTIMERS
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-        This is the framebuffer device driver for a Varitronix VL-PS-COG-T350MCQB-01 display TFT LCD
-        This display is a QVGA 320x240 24-bit RGB display interfaced by an 8-bit wide PPI
-        It uses PPI[0..7] PPI_FS1, PPI_FS2 and PPI_CLK.
-
-config FB_BFIN_LQ035Q1
-       tristate "SHARP LQ035Q1DH02 TFT LCD"
-       depends on FB && BLACKFIN && SPI
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select BFIN_GPTIMERS
-       help
-         This is the framebuffer device driver for a SHARP LQ035Q1DH02 TFT display found on
-         the Blackfin Landscape LCD EZ-Extender Card.
-         This display is a QVGA 320x240 18-bit RGB display interfaced by an 16-bit wide PPI
-         It uses PPI[0..15] PPI_FS1, PPI_FS2 and PPI_CLK.
-
-         To compile this driver as a module, choose M here: the
-         module will be called bfin-lq035q1-fb.
-
-config FB_BF537_LQ035
-       tristate "SHARP LQ035 TFT LCD (BF537 STAMP)"
-       depends on FB && (BF534 || BF536 || BF537) && I2C_BLACKFIN_TWI
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select BFIN_GPTIMERS
-       help
-         This is the framebuffer device for a SHARP LQ035Q7DB03 TFT LCD
-         attached to a BF537.
-
-         To compile this driver as a module, choose M here: the
-         module will be called bf537-lq035.
-
-config FB_BFIN_7393
-       tristate "Blackfin ADV7393 Video encoder"
-       depends on FB && BLACKFIN
-       select I2C
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the framebuffer device for a ADV7393 video encoder
-         attached to a Blackfin on the PPI port.
-         If your Blackfin board has a ADV7393 select Y.
-
-         To compile this driver as a module, choose M here: the
-         module will be called bfin_adv7393fb.
-
-choice
-       prompt  "Video mode support"
-       depends on FB_BFIN_7393
-       default NTSC
-
-config NTSC
-       bool 'NTSC 720x480'
-
-config PAL
-       bool 'PAL 720x576'
-
-config NTSC_640x480
-       bool 'NTSC 640x480 (Experimental)'
-
-config PAL_640x480
-       bool 'PAL 640x480 (Experimental)'
-
-config NTSC_YCBCR
-       bool 'NTSC 720x480 YCbCR input'
-
-config PAL_YCBCR
-       bool 'PAL 720x576 YCbCR input'
-
-endchoice
-
-choice
-       prompt  "Size of ADV7393 frame buffer memory Single/Double Size"
-       depends on (FB_BFIN_7393)
-       default ADV7393_1XMEM
-
-config ADV7393_1XMEM
-       bool 'Single'
-
-config ADV7393_2XMEM
-       bool 'Double'
-endchoice
-
-config FB_STI
-       tristate "HP STI frame buffer device support"
-       depends on FB && PARISC
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select STI_CONSOLE
-       select VT
-       default y
-       ---help---
-         STI refers to the HP "Standard Text Interface" which is a set of
-         BIOS routines contained in a ROM chip in HP PA-RISC based machines.
-         Enabling this option will implement the linux framebuffer device
-         using calls to the STI BIOS routines for initialisation.
-       
-         If you enable this option, you will get a planar framebuffer device
-         /dev/fb which will work on the most common HP graphic cards of the
-         NGLE family, including the artist chips (in the 7xx and Bxxx series),
-         HCRX, HCRX24, CRX, CRX24 and VisEG series.
-
-         It is safe to enable this option, so you should probably say "Y".
-
-config FB_MAC
-       bool "Generic Macintosh display support"
-       depends on (FB = y) && MAC
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_MACMODES
-
-config FB_HP300
-       bool
-       depends on (FB = y) && DIO
-       select FB_CFB_IMAGEBLIT
-       default y
-
-config FB_TGA
-       tristate "TGA/SFB+ framebuffer support"
-       depends on FB && (ALPHA || TC)
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select BITREVERSE
-       ---help---
-         This is the frame buffer device driver for generic TGA and SFB+
-         graphic cards.  These include DEC ZLXp-E1, -E2 and -E3 PCI cards,
-         also known as PBXGA-A, -B and -C, and DEC ZLX-E1, -E2 and -E3
-         TURBOchannel cards, also known as PMAGD-A, -B and -C.
-
-         Due to hardware limitations ZLX-E2 and E3 cards are not supported
-         for DECstation 5000/200 systems.  Additionally due to firmware
-         limitations these cards may cause troubles with booting DECstation
-         5000/240 and /260 systems, but are fully supported under Linux if
-         you manage to get it going. ;-)
-
-         Say Y if you have one of those.
-
-config FB_UVESA
-       tristate "Userspace VESA VGA graphics support"
-       depends on FB && CONNECTOR
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_MODE_HELPERS
-       help
-         This is the frame buffer driver for generic VBE 2.0 compliant
-         graphic cards. It can also take advantage of VBE 3.0 features,
-         such as refresh rate adjustment.
-
-         This driver generally provides more features than vesafb but
-         requires a userspace helper application called 'v86d'. See
-         <file:Documentation/fb/uvesafb.txt> for more information.
-
-         If unsure, say N.
-
-config FB_VESA
-       bool "VESA VGA graphics support"
-       depends on (FB = y) && X86
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_BOOT_VESA_SUPPORT
-       help
-         This is the frame buffer device driver for generic VESA 2.0
-         compliant graphic cards. The older VESA 1.2 cards are not supported.
-         You will get a boot time penguin logo at no additional cost. Please
-         read <file:Documentation/fb/vesafb.txt>. If unsure, say Y.
-
-config FB_EFI
-       bool "EFI-based Framebuffer Support"
-       depends on (FB = y) && X86 && EFI
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the EFI frame buffer device driver. If the firmware on
-         your platform is EFI 1.10 or UEFI 2.0, select Y to add support for
-         using the EFI framebuffer as your console.
-
-config FB_N411
-       tristate "N411 Apollo/Hecuba devkit support"
-       depends on FB && X86 && MMU
-       select FB_SYS_FILLRECT
-       select FB_SYS_COPYAREA
-       select FB_SYS_IMAGEBLIT
-       select FB_SYS_FOPS
-       select FB_DEFERRED_IO
-       select FB_HECUBA
-       help
-         This enables support for the Apollo display controller in its
-         Hecuba form using the n411 devkit.
-
-config FB_HGA
-       tristate "Hercules mono graphics support"
-       depends on FB && X86
-       help
-         Say Y here if you have a Hercules mono graphics card.
-
-         To compile this driver as a module, choose M here: the
-         module will be called hgafb.
-
-         As this card technology is at least 25 years old,
-         most people will answer N here.
-
-config FB_GBE
-       bool "SGI Graphics Backend frame buffer support"
-       depends on (FB = y) && SGI_IP32
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for SGI Graphics Backend.
-         This chip is used in SGI O2 and Visual Workstation 320/540.
-
-config FB_GBE_MEM
-       int "Video memory size in MB"
-       depends on FB_GBE
-       default 4
-       help
-         This is the amount of memory reserved for the framebuffer,
-         which can be any value between 1MB and 8MB.
-
-config FB_SBUS
-       bool "SBUS and UPA framebuffers"
-       depends on (FB = y) && SPARC
-       help
-         Say Y if you want support for SBUS or UPA based frame buffer device.
-
-config FB_BW2
-       bool "BWtwo support"
-       depends on (FB = y) && (SPARC && FB_SBUS)
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for the BWtwo frame buffer.
-
-config FB_CG3
-       bool "CGthree support"
-       depends on (FB = y) && (SPARC && FB_SBUS)
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for the CGthree frame buffer.
-
-config FB_CG6
-       bool "CGsix (GX,TurboGX) support"
-       depends on (FB = y) && (SPARC && FB_SBUS)
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for the CGsix (GX, TurboGX)
-         frame buffer.
-
-config FB_FFB
-       bool "Creator/Creator3D/Elite3D support"
-       depends on FB_SBUS && SPARC64
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for the Creator, Creator3D,
-         and Elite3D graphics boards.
-
-config FB_TCX
-       bool "TCX (SS4/SS5 only) support"
-       depends on FB_SBUS
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for the TCX 24/8bit frame
-         buffer.
-
-config FB_CG14
-       bool "CGfourteen (SX) support"
-       depends on FB_SBUS
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for the CGfourteen frame
-         buffer on Desktop SPARCsystems with the SX graphics option.
-
-config FB_P9100
-       bool "P9100 (Sparcbook 3 only) support"
-       depends on FB_SBUS
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for the P9100 card
-         supported on Sparcbook 3 machines.
-
-config FB_LEO
-       bool "Leo (ZX) support"
-       depends on FB_SBUS
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for the SBUS-based Sun ZX
-         (leo) frame buffer cards.
-
-config FB_IGA
-       bool "IGA 168x display support"
-       depends on (FB = y) && SPARC32
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the framebuffer device for the INTERGRAPHICS 1680 and
-         successor frame buffer cards.
-
-config FB_XVR500
-       bool "Sun XVR-500 3DLABS Wildcat support"
-       depends on (FB = y) && PCI && SPARC64
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the framebuffer device for the Sun XVR-500 and similar
-         graphics cards based upon the 3DLABS Wildcat chipset.  The driver
-         only works on sparc64 systems where the system firmware has
-         mostly initialized the card already.  It is treated as a
-         completely dumb framebuffer device.
-
-config FB_XVR2500
-       bool "Sun XVR-2500 3DLABS Wildcat support"
-       depends on (FB = y) && PCI && SPARC64
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the framebuffer device for the Sun XVR-2500 and similar
-         graphics cards based upon the 3DLABS Wildcat chipset.  The driver
-         only works on sparc64 systems where the system firmware has
-         mostly initialized the card already.  It is treated as a
-         completely dumb framebuffer device.
-
-config FB_XVR1000
-       bool "Sun XVR-1000 support"
-       depends on (FB = y) && SPARC64
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the framebuffer device for the Sun XVR-1000 and similar
-         graphics cards.  The driver only works on sparc64 systems where
-         the system firmware has mostly initialized the card already.  It
-         is treated as a completely dumb framebuffer device.
-
-config FB_PVR2
-       tristate "NEC PowerVR 2 display support"
-       depends on FB && SH_DREAMCAST
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         Say Y here if you have a PowerVR 2 card in your box.  If you plan to
-         run linux on your Dreamcast, you will have to say Y here.
-         This driver may or may not work on other PowerVR 2 cards, but is
-         totally untested.  Use at your own risk.  If unsure, say N.
-
-         To compile this driver as a module, choose M here: the
-         module will be called pvr2fb.
-
-         You can pass several parameters to the driver at boot time or at
-         module load time.  The parameters look like "video=pvr2:XXX", where
-         the meaning of XXX can be found at the end of the main source file
-         (<file:drivers/video/pvr2fb.c>). Please see the file
-         <file:Documentation/fb/pvr2fb.txt>.
-
-config FB_OPENCORES
-       tristate "OpenCores VGA/LCD core 2.0 framebuffer support"
-       depends on FB && HAS_DMA
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This enables support for the OpenCores VGA/LCD core.
-
-         The OpenCores VGA/LCD core is typically used together with
-         softcore CPUs (e.g. OpenRISC or Microblaze) or hard processor
-         systems (e.g. Altera socfpga or Xilinx Zynq) on FPGAs.
-
-         The source code and specification for the core is available at
-         <http://opencores.org/project,vga_lcd>
-
-config FB_S1D13XXX
-       tristate "Epson S1D13XXX framebuffer support"
-       depends on FB
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         Support for S1D13XXX framebuffer device family (currently only
-         working with S1D13806). Product specs at
-         <http://vdc.epson.com/>
-
-config FB_ATMEL
-       tristate "AT91/AT32 LCD Controller support"
-       depends on FB && HAVE_FB_ATMEL
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_MODE_HELPERS
-       select VIDEOMODE_HELPERS
-       help
-         This enables support for the AT91/AT32 LCD Controller.
-
-config FB_INTSRAM
-       bool "Frame Buffer in internal SRAM"
-       depends on FB_ATMEL && ARCH_AT91SAM9261
-       help
-         Say Y if you want to map Frame Buffer in internal SRAM. Say N if you want
-         to let frame buffer in external SDRAM.
-
-config FB_ATMEL_STN
-       bool "Use a STN display with AT91/AT32 LCD Controller"
-       depends on FB_ATMEL && (MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK)
-       default n
-       help
-         Say Y if you want to connect a STN LCD display to the AT91/AT32 LCD
-         Controller. Say N if you want to connect a TFT.
-
-         If unsure, say N.
-
-config FB_NVIDIA
-       tristate "nVidia Framebuffer Support"
-       depends on FB && PCI
-       select FB_BACKLIGHT if FB_NVIDIA_BACKLIGHT
-       select FB_MODE_HELPERS
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select BITREVERSE
-       select VGASTATE
-       help
-         This driver supports graphics boards with the nVidia chips, TNT
-         and newer. For very old chipsets, such as the RIVA128, then use
-         the rivafb.
-         Say Y if you have such a graphics board.
-
-         To compile this driver as a module, choose M here: the
-         module will be called nvidiafb.
-
-config FB_NVIDIA_I2C
-       bool "Enable DDC Support"
-       depends on FB_NVIDIA
-       select FB_DDC
-       help
-         This enables I2C support for nVidia Chipsets.  This is used
-         only for getting EDID information from the attached display
-         allowing for robust video mode handling and switching.
-
-         Because fbdev-2.6 requires that drivers must be able to
-         independently validate video mode parameters, you should say Y
-         here.
-
-config FB_NVIDIA_DEBUG
-       bool "Lots of debug output"
-       depends on FB_NVIDIA
-       default n
-       help
-         Say Y here if you want the nVidia driver to output all sorts
-         of debugging information to provide to the maintainer when
-         something goes wrong.
-
-config FB_NVIDIA_BACKLIGHT
-       bool "Support for backlight control"
-       depends on FB_NVIDIA
-       default y
-       help
-         Say Y here if you want to control the backlight of your display.
-
-config FB_RIVA
-       tristate "nVidia Riva support"
-       depends on FB && PCI
-       select FB_BACKLIGHT if FB_RIVA_BACKLIGHT
-       select FB_MODE_HELPERS
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select BITREVERSE
-       select VGASTATE
-       help
-         This driver supports graphics boards with the nVidia Riva/Geforce
-         chips.
-         Say Y if you have such a graphics board.
-
-         To compile this driver as a module, choose M here: the
-         module will be called rivafb.
-
-config FB_RIVA_I2C
-       bool "Enable DDC Support"
-       depends on FB_RIVA
-       select FB_DDC
-       help
-         This enables I2C support for nVidia Chipsets.  This is used
-         only for getting EDID information from the attached display
-         allowing for robust video mode handling and switching.
-
-         Because fbdev-2.6 requires that drivers must be able to
-         independently validate video mode parameters, you should say Y
-         here.
-
-config FB_RIVA_DEBUG
-       bool "Lots of debug output"
-       depends on FB_RIVA
-       default n
-       help
-         Say Y here if you want the Riva driver to output all sorts
-         of debugging information to provide to the maintainer when
-         something goes wrong.
-
-config FB_RIVA_BACKLIGHT
-       bool "Support for backlight control"
-       depends on FB_RIVA
-       default y
-       help
-         Say Y here if you want to control the backlight of your display.
-
-config FB_I740
-       tristate "Intel740 support"
-       depends on FB && PCI
-       select FB_MODE_HELPERS
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select VGASTATE
-       select FB_DDC
-       help
-         This driver supports graphics cards based on Intel740 chip.
-
-config FB_I810
-       tristate "Intel 810/815 support"
-       depends on FB && PCI && X86_32 && AGP_INTEL
-       select FB_MODE_HELPERS
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select VGASTATE
-       help
-         This driver supports the on-board graphics built in to the Intel 810 
-          and 815 chipsets.  Say Y if you have and plan to use such a board.
-
-          To compile this driver as a module, choose M here: the
-         module will be called i810fb.
-
-          For more information, please read 
-         <file:Documentation/fb/intel810.txt>
-
-config FB_I810_GTF
-       bool "use VESA Generalized Timing Formula"
-       depends on FB_I810
-       help
-         If you say Y, then the VESA standard, Generalized Timing Formula 
-          or GTF, will be used to calculate the required video timing values
-         per video mode.  Since the GTF allows nondiscrete timings 
-          (nondiscrete being a range of values as opposed to discrete being a
-          set of values), you'll be able to use any combination of horizontal 
-         and vertical resolutions, and vertical refresh rates without having
-         to specify your own timing parameters.  This is especially useful
-         to maximize the performance of an aging display, or if you just 
-          have a display with nonstandard dimensions. A VESA compliant 
-         monitor is recommended, but can still work with non-compliant ones.
-         If you need or want this, then select this option. The timings may 
-         not be compliant with Intel's recommended values. Use at your own 
-         risk.
-
-          If you say N, the driver will revert to discrete video timings 
-         using a set recommended by Intel in their documentation.
-  
-          If unsure, say N.
-
-config FB_I810_I2C
-       bool "Enable DDC Support"
-       depends on FB_I810 && FB_I810_GTF
-       select FB_DDC
-       help
-
-config FB_LE80578
-       tristate "Intel LE80578 (Vermilion) support"
-       depends on FB && PCI && X86
-       select FB_MODE_HELPERS
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This driver supports the LE80578 (Vermilion Range) chipset
-
-config FB_CARILLO_RANCH
-       tristate "Intel Carillo Ranch support"
-       depends on FB_LE80578 && FB && PCI && X86
-       help
-         This driver supports the LE80578 (Carillo Ranch) board
-
-config FB_INTEL
-       tristate "Intel 830M/845G/852GM/855GM/865G/915G/945G/945GM/965G/965GM support"
-       depends on FB && PCI && X86 && AGP_INTEL && EXPERT
-       select FB_MODE_HELPERS
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_BOOT_VESA_SUPPORT if FB_INTEL = y
-       depends on !DRM_I915
-       help
-         This driver supports the on-board graphics built in to the Intel
-          830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM/965G/965GM chipsets.
-          Say Y if you have and plan to use such a board.
-
-         To make FB_INTELFB=Y work you need to say AGP_INTEL=y too.
-
-         To compile this driver as a module, choose M here: the
-         module will be called intelfb.
-
-         For more information, please read <file:Documentation/fb/intelfb.txt>
-
-config FB_INTEL_DEBUG
-       bool "Intel driver Debug Messages"
-       depends on FB_INTEL
-       ---help---
-         Say Y here if you want the Intel driver to output all sorts
-         of debugging information to provide to the maintainer when
-         something goes wrong.
-
-config FB_INTEL_I2C
-       bool "DDC/I2C for Intel framebuffer support"
-       depends on FB_INTEL
-       select FB_DDC
-       default y
-       help
-         Say Y here if you want DDC/I2C support for your on-board Intel graphics.
-
-config FB_MATROX
-       tristate "Matrox acceleration"
-       depends on FB && PCI
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_TILEBLITTING
-       select FB_MACMODES if PPC_PMAC
-       ---help---
-         Say Y here if you have a Matrox Millennium, Matrox Millennium II,
-         Matrox Mystique, Matrox Mystique 220, Matrox Productiva G100, Matrox
-         Mystique G200, Matrox Millennium G200, Matrox Marvel G200 video,
-         Matrox G400, G450 or G550 card in your box.
-
-         To compile this driver as a module, choose M here: the
-         module will be called matroxfb.
-
-         You can pass several parameters to the driver at boot time or at
-         module load time. The parameters look like "video=matroxfb:XXX", and
-         are described in <file:Documentation/fb/matroxfb.txt>.
-
-config FB_MATROX_MILLENIUM
-       bool "Millennium I/II support"
-       depends on FB_MATROX
-       help
-         Say Y here if you have a Matrox Millennium or Matrox Millennium II
-         video card. If you select "Advanced lowlevel driver options" below,
-         you should check 4 bpp packed pixel, 8 bpp packed pixel, 16 bpp
-         packed pixel, 24 bpp packed pixel and 32 bpp packed pixel. You can
-         also use font widths different from 8.
-
-config FB_MATROX_MYSTIQUE
-       bool "Mystique support"
-       depends on FB_MATROX
-       help
-         Say Y here if you have a Matrox Mystique or Matrox Mystique 220
-         video card. If you select "Advanced lowlevel driver options" below,
-         you should check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp
-         packed pixel and 32 bpp packed pixel. You can also use font widths
-         different from 8.
-
-config FB_MATROX_G
-       bool "G100/G200/G400/G450/G550 support"
-       depends on FB_MATROX
-       ---help---
-         Say Y here if you have a Matrox G100, G200, G400, G450 or G550 based
-         video card. If you select "Advanced lowlevel driver options", you
-         should check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp packed
-         pixel and 32 bpp packed pixel. You can also use font widths
-         different from 8.
-
-         If you need support for G400 secondary head, you must say Y to
-         "Matrox I2C support" and "G400 second head support" right below.
-         G450/G550 secondary head and digital output are supported without
-         additional modules.
-
-         The driver starts in monitor mode. You must use the matroxset tool 
-         (available at <ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/>) to 
-         swap primary and secondary head outputs, or to change output mode.  
-         Secondary head driver always start in 640x480 resolution and you 
-         must use fbset to change it.
-
-         Do not forget that second head supports only 16 and 32 bpp
-         packed pixels, so it is a good idea to compile them into the kernel
-         too. You can use only some font widths, as the driver uses generic
-         painting procedures (the secondary head does not use acceleration
-         engine).
-
-         G450/G550 hardware can display TV picture only from secondary CRTC,
-         and it performs no scaling, so picture must have 525 or 625 lines.
-
-config FB_MATROX_I2C
-       tristate "Matrox I2C support"
-       depends on FB_MATROX
-       select FB_DDC
-       ---help---
-         This drivers creates I2C buses which are needed for accessing the
-         DDC (I2C) bus present on all Matroxes, an I2C bus which
-         interconnects Matrox optional devices, like MGA-TVO on G200 and
-         G400, and the secondary head DDC bus, present on G400 only.
-
-         You can say Y or M here if you want to experiment with monitor
-         detection code. You must say Y or M here if you want to use either
-         second head of G400 or MGA-TVO on G200 or G400.
-
-         If you compile it as module, it will create a module named
-         i2c-matroxfb.
-
-config FB_MATROX_MAVEN
-       tristate "G400 second head support"
-       depends on FB_MATROX_G && FB_MATROX_I2C
-       ---help---
-         WARNING !!! This support does not work with G450 !!!
-
-         Say Y or M here if you want to use a secondary head (meaning two
-         monitors in parallel) on G400 or MGA-TVO add-on on G200. Secondary
-         head is not compatible with accelerated XFree 3.3.x SVGA servers -
-         secondary head output is blanked while you are in X. With XFree
-         3.9.17 preview you can use both heads if you use SVGA over fbdev or
-         the fbdev driver on first head and the fbdev driver on second head.
-
-         If you compile it as module, two modules are created,
-         matroxfb_crtc2 and matroxfb_maven. Matroxfb_maven is needed for
-         both G200 and G400, matroxfb_crtc2 is needed only by G400. You must
-         also load i2c-matroxfb to get it to run.
-
-         The driver starts in monitor mode and you must use the matroxset
-         tool (available at
-         <ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/>) to switch it to
-         PAL or NTSC or to swap primary and secondary head outputs.
-         Secondary head driver also always start in 640x480 resolution, you
-         must use fbset to change it.
-
-         Also do not forget that second head supports only 16 and 32 bpp
-         packed pixels, so it is a good idea to compile them into the kernel
-         too.  You can use only some font widths, as the driver uses generic
-         painting procedures (the secondary head does not use acceleration
-         engine).
-
-config FB_RADEON
-       tristate "ATI Radeon display support"
-       depends on FB && PCI
-       select FB_BACKLIGHT if FB_RADEON_BACKLIGHT
-       select FB_MODE_HELPERS
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_MACMODES if PPC_OF
-       help
-         Choose this option if you want to use an ATI Radeon graphics card as
-         a framebuffer device.  There are both PCI and AGP versions.  You
-         don't need to choose this to run the Radeon in plain VGA mode.
-
-         There is a product page at
-         http://products.amd.com/en-us/GraphicCardResult.aspx
-
-config FB_RADEON_I2C
-       bool "DDC/I2C for ATI Radeon support"
-       depends on FB_RADEON
-       select FB_DDC
-       default y
-       help
-         Say Y here if you want DDC/I2C support for your Radeon board. 
-
-config FB_RADEON_BACKLIGHT
-       bool "Support for backlight control"
-       depends on FB_RADEON
-       default y
-       help
-         Say Y here if you want to control the backlight of your display.
-
-config FB_RADEON_DEBUG
-       bool "Lots of debug output from Radeon driver"
-       depends on FB_RADEON
-       default n
-       help
-         Say Y here if you want the Radeon driver to output all sorts
-         of debugging information to provide to the maintainer when
-         something goes wrong.
-
-config FB_ATY128
-       tristate "ATI Rage128 display support"
-       depends on FB && PCI
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_BACKLIGHT if FB_ATY128_BACKLIGHT
-       select FB_MACMODES if PPC_PMAC
-       help
-         This driver supports graphics boards with the ATI Rage128 chips.
-         Say Y if you have such a graphics board and read
-         <file:Documentation/fb/aty128fb.txt>.
-
-         To compile this driver as a module, choose M here: the
-         module will be called aty128fb.
-
-config FB_ATY128_BACKLIGHT
-       bool "Support for backlight control"
-       depends on FB_ATY128
-       default y
-       help
-         Say Y here if you want to control the backlight of your display.
-
-config FB_ATY
-       tristate "ATI Mach64 display support" if PCI || ATARI
-       depends on FB && !SPARC32
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_BACKLIGHT if FB_ATY_BACKLIGHT
-       select FB_MACMODES if PPC
-       help
-         This driver supports graphics boards with the ATI Mach64 chips.
-         Say Y if you have such a graphics board.
-
-         To compile this driver as a module, choose M here: the
-         module will be called atyfb.
-
-config FB_ATY_CT
-       bool "Mach64 CT/VT/GT/LT (incl. 3D RAGE) support"
-       depends on PCI && FB_ATY
-       default y if SPARC64 && PCI
-       help
-         Say Y here to support use of ATI's 64-bit Rage boards (or other
-         boards based on the Mach64 CT, VT, GT, and LT chipsets) as a
-         framebuffer device.  The ATI product support page for these boards
-         is at <http://support.ati.com/products/pc/mach64/mach64.html>.
-
-config FB_ATY_GENERIC_LCD
-       bool "Mach64 generic LCD support"
-       depends on FB_ATY_CT
-       help
-         Say Y if you have a laptop with an ATI Rage LT PRO, Rage Mobility,
-         Rage XC, or Rage XL chipset.
-
-config FB_ATY_GX
-       bool "Mach64 GX support" if PCI
-       depends on FB_ATY
-       default y if ATARI
-       help
-         Say Y here to support use of the ATI Mach64 Graphics Expression
-         board (or other boards based on the Mach64 GX chipset) as a
-         framebuffer device.  The ATI product support page for these boards
-         is at
-         <http://support.ati.com/products/pc/mach64/graphics_xpression.html>.
-
-config FB_ATY_BACKLIGHT
-       bool "Support for backlight control"
-       depends on FB_ATY
-       default y
-       help
-         Say Y here if you want to control the backlight of your display.
-
-config FB_S3
-       tristate "S3 Trio/Virge support"
-       depends on FB && PCI
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_TILEBLITTING
-       select FB_SVGALIB
-       select VGASTATE
-       select FONT_8x16 if FRAMEBUFFER_CONSOLE
-       ---help---
-         Driver for graphics boards with S3 Trio / S3 Virge chip.
-
-config FB_S3_DDC
-       bool "DDC for S3 support"
-       depends on FB_S3
-       select FB_DDC
-       default y
-       help
-         Say Y here if you want DDC support for your S3 graphics card.
-
-config FB_SAVAGE
-       tristate "S3 Savage support"
-       depends on FB && PCI
-       select FB_MODE_HELPERS
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select VGASTATE
-       help
-         This driver supports notebooks and computers with S3 Savage PCI/AGP
-         chips.
-
-         Say Y if you have such a graphics card.
-
-         To compile this driver as a module, choose M here; the module
-         will be called savagefb.
-
-config FB_SAVAGE_I2C
-       bool "Enable DDC2 Support"
-       depends on FB_SAVAGE
-       select FB_DDC
-       help
-         This enables I2C support for S3 Savage Chipsets.  This is used
-         only for getting EDID information from the attached display
-         allowing for robust video mode handling and switching.
-
-         Because fbdev-2.6 requires that drivers must be able to
-         independently validate video mode parameters, you should say Y
-         here.
-
-config FB_SAVAGE_ACCEL
-       bool "Enable Console Acceleration"
-       depends on FB_SAVAGE
-       default n
-       help
-          This option will compile in console acceleration support. If
-          the resulting framebuffer console has bothersome glitches, then
-          choose N here.
-
-config FB_SIS
-       tristate "SiS/XGI display support"
-       depends on FB && PCI
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_BOOT_VESA_SUPPORT if FB_SIS = y
-       help
-         This is the frame buffer device driver for the SiS 300, 315, 330
-         and 340 series as well as XGI V3XT, V5, V8, Z7 graphics chipsets.
-         Specs available at <http://www.sis.com> and <http://www.xgitech.com>.
-
-         To compile this driver as a module, choose M here; the module
-         will be called sisfb.
-
-config FB_SIS_300
-       bool "SiS 300 series support"
-       depends on FB_SIS
-       help
-         Say Y here to support use of the SiS 300/305, 540, 630 and 730.
-
-config FB_SIS_315
-       bool "SiS 315/330/340 series and XGI support"
-       depends on FB_SIS
-       help
-         Say Y here to support use of the SiS 315, 330 and 340 series
-         (315/H/PRO, 55x, 650, 651, 740, 330, 661, 741, 760, 761) as well
-         as XGI V3XT, V5, V8 and Z7.
-
-config FB_VIA
-       tristate "VIA UniChrome (Pro) and Chrome9 display support"
-       depends on FB && PCI && X86
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select I2C_ALGOBIT
-       select I2C
-       select GPIOLIB
-       help
-         This is the frame buffer device driver for Graphics chips of VIA
-         UniChrome (Pro) Family (CLE266,PM800/CN400,P4M800CE/P4M800Pro/
-         CN700/VN800,CX700/VX700,P4M890) and Chrome9 Family (K8M890,CN896
-         /P4M900,VX800)
-         Say Y if you have a VIA UniChrome graphics board.
-
-         To compile this driver as a module, choose M here: the
-         module will be called viafb.
-
-if FB_VIA
-
-config FB_VIA_DIRECT_PROCFS
-       bool "direct hardware access via procfs (DEPRECATED)(DANGEROUS)"
-       depends on FB_VIA
-       default n
-       help
-         Allow direct hardware access to some output registers via procfs.
-         This is dangerous but may provide the only chance to get the
-         correct output device configuration.
-         Its use is strongly discouraged.
-
-config FB_VIA_X_COMPATIBILITY
-       bool "X server compatibility"
-       depends on FB_VIA
-       default n
-       help
-         This option reduces the functionality (power saving, ...) of the
-         framebuffer to avoid negative impact on the OpenChrome X server.
-         If you use any X server other than fbdev you should enable this
-         otherwise it should be safe to disable it and allow using all
-         features.
-
-endif
-
-config FB_NEOMAGIC
-       tristate "NeoMagic display support"
-       depends on FB && PCI
-       select FB_MODE_HELPERS
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select VGASTATE
-       help
-         This driver supports notebooks with NeoMagic PCI chips.
-         Say Y if you have such a graphics card. 
-
-         To compile this driver as a module, choose M here: the
-         module will be called neofb.
-
-config FB_KYRO
-       tristate "IMG Kyro support"
-       depends on FB && PCI
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         Say Y here if you have a STG4000 / Kyro / PowerVR 3 based
-         graphics board.
-
-         To compile this driver as a module, choose M here: the
-         module will be called kyrofb.
-
-config FB_3DFX
-       tristate "3Dfx Banshee/Voodoo3/Voodoo5 display support"
-       depends on FB && PCI
-       select FB_CFB_IMAGEBLIT
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_MODE_HELPERS
-       help
-         This driver supports graphics boards with the 3Dfx Banshee,
-         Voodoo3 or VSA-100 (aka Voodoo4/5) chips. Say Y if you have
-         such a graphics board.
-
-         To compile this driver as a module, choose M here: the
-         module will be called tdfxfb.
-
-config FB_3DFX_ACCEL
-       bool "3Dfx Acceleration functions"
-       depends on FB_3DFX
-       ---help---
-       This will compile the 3Dfx Banshee/Voodoo3/VSA-100 frame buffer
-       device driver with acceleration functions.
-
-config FB_3DFX_I2C
-       bool "Enable DDC/I2C support"
-       depends on FB_3DFX
-       select FB_DDC
-       default y
-       help
-         Say Y here if you want DDC/I2C support for your 3dfx Voodoo3.
-
-config FB_VOODOO1
-       tristate "3Dfx Voodoo Graphics (sst1) support"
-       depends on FB && PCI
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         Say Y here if you have a 3Dfx Voodoo Graphics (Voodoo1/sst1) or 
-         Voodoo2 (cvg) based graphics card.
-
-         To compile this driver as a module, choose M here: the
-         module will be called sstfb.
-
-         WARNING: Do not use any application that uses the 3D engine
-         (namely glide) while using this driver.
-         Please read the <file:Documentation/fb/sstfb.txt> for supported
-         options and other important info  support.
-
-config FB_VT8623
-       tristate "VIA VT8623 support"
-       depends on FB && PCI
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_TILEBLITTING
-       select FB_SVGALIB
-       select VGASTATE
-       select FONT_8x16 if FRAMEBUFFER_CONSOLE
-       ---help---
-         Driver for CastleRock integrated graphics core in the
-         VIA VT8623 [Apollo CLE266] chipset.
-
-config FB_TRIDENT
-       tristate "Trident/CyberXXX/CyberBlade support"
-       depends on FB && PCI
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         This is the frame buffer device driver for Trident PCI/AGP chipsets.
-         Supported chipset families are TGUI 9440/96XX, 3DImage, Blade3D
-         and Blade XP.
-         There are also integrated versions of these chips called CyberXXXX,
-         CyberImage or CyberBlade. These chips are mostly found in laptops
-         but also on some motherboards including early VIA EPIA motherboards.
-         For more information, read <file:Documentation/fb/tridentfb.txt>
-
-         Say Y if you have such a graphics board.
-
-         To compile this driver as a module, choose M here: the
-         module will be called tridentfb.
-
-config FB_ARK
-       tristate "ARK 2000PV support"
-       depends on FB && PCI
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_TILEBLITTING
-       select FB_SVGALIB
-       select VGASTATE
-       select FONT_8x16 if FRAMEBUFFER_CONSOLE
-       ---help---
-         Driver for PCI graphics boards with ARK 2000PV chip
-         and ICS 5342 RAMDAC.
-
-config FB_PM3
-       tristate "Permedia3 support"
-       depends on FB && PCI
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for the 3DLabs Permedia3
-         chipset, used in Formac ProFormance III, 3DLabs Oxygen VX1 &
-         similar boards, 3DLabs Permedia3 Create!, Appian Jeronimo 2000
-         and maybe other boards.
-
-config FB_CARMINE
-       tristate "Fujitsu carmine frame buffer support"
-       depends on FB && PCI
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for the Fujitsu Carmine chip.
-         The driver provides two independent frame buffer devices.
-
-choice
-       depends on FB_CARMINE
-       prompt "DRAM timing"
-       default FB_CARMINE_DRAM_EVAL
-
-config FB_CARMINE_DRAM_EVAL
-       bool "Eval board timings"
-       help
-         Use timings which work on the eval card.
-
-config CARMINE_DRAM_CUSTOM
-       bool "Custom board timings"
-       help
-         Use custom board timings.
-endchoice
-
-config FB_AU1100
-       bool "Au1100 LCD Driver"
-       depends on (FB = y) && MIPS_ALCHEMY
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the framebuffer driver for the AMD Au1100 SOC.  It can drive
-         various panels and CRTs by passing in kernel cmd line option
-         au1100fb:panel=<name>.
-
-config FB_AU1200
-       bool "Au1200/Au1300 LCD Driver"
-       depends on (FB = y) && MIPS_ALCHEMY
-       select FB_SYS_FILLRECT
-       select FB_SYS_COPYAREA
-       select FB_SYS_IMAGEBLIT
-       select FB_SYS_FOPS
-       help
-         This is the framebuffer driver for the Au1200/Au1300 SOCs.
-         It can drive various panels and CRTs by passing in kernel cmd line
-         option au1200fb:panel=<name>.
-
-config FB_VT8500
-       bool "VIA VT8500 framebuffer support"
-       depends on (FB = y) && ARM && ARCH_VT8500
-       select FB_SYS_FILLRECT if (!FB_WMT_GE_ROPS)
-       select FB_SYS_COPYAREA if (!FB_WMT_GE_ROPS)
-       select FB_SYS_IMAGEBLIT
-       select FB_MODE_HELPERS
-       select VIDEOMODE_HELPERS
-       help
-         This is the framebuffer driver for VIA VT8500 integrated LCD
-         controller.
-
-config FB_WM8505
-       bool "Wondermedia WM8xxx-series frame buffer support"
-       depends on (FB = y) && ARM && ARCH_VT8500
-       select FB_SYS_FILLRECT if (!FB_WMT_GE_ROPS)
-       select FB_SYS_COPYAREA if (!FB_WMT_GE_ROPS)
-       select FB_SYS_IMAGEBLIT
-       select FB_MODE_HELPERS
-       select VIDEOMODE_HELPERS
-       help
-         This is the framebuffer driver for WonderMedia WM8xxx-series
-         integrated LCD controller. This driver covers the WM8505, WM8650
-         and WM8850 SoCs.
-
-config FB_WMT_GE_ROPS
-       bool "VT8500/WM8xxx accelerated raster ops support"
-       depends on (FB = y) && (FB_VT8500 || FB_WM8505)
-       default n
-       help
-         This adds support for accelerated raster operations on the
-         VIA VT8500 and Wondermedia 85xx series SoCs.
-
-source "drivers/video/geode/Kconfig"
-
-config FB_HIT
-       tristate "HD64461 Frame Buffer support"
-       depends on FB && HD64461
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This is the frame buffer device driver for the Hitachi HD64461 LCD
-         frame buffer card.
-
-config FB_PMAG_AA
-       bool "PMAG-AA TURBOchannel framebuffer support"
-       depends on (FB = y) && TC
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         Support for the PMAG-AA TURBOchannel framebuffer card (1280x1024x1)
-         used mainly in the MIPS-based DECstation series.
-
-config FB_PMAG_BA
-       tristate "PMAG-BA TURBOchannel framebuffer support"
-       depends on FB && TC
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         Support for the PMAG-BA TURBOchannel framebuffer card (1024x864x8)
-         used mainly in the MIPS-based DECstation series.
-
-config FB_PMAGB_B
-       tristate "PMAGB-B TURBOchannel framebuffer support"
-       depends on FB && TC
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         Support for the PMAGB-B TURBOchannel framebuffer card used mainly
-         in the MIPS-based DECstation series. The card is currently only
-         supported in 1280x1024x8 mode.
-
-config FB_MAXINE
-       bool "Maxine (Personal DECstation) onboard framebuffer support"
-       depends on (FB = y) && MACH_DECSTATION
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         Support for the onboard framebuffer (1024x768x8) in the Personal
-         DECstation series (Personal DECstation 5000/20, /25, /33, /50,
-         Codename "Maxine").
-
-config FB_G364
-       bool "G364 frame buffer support"
-       depends on (FB = y) && (MIPS_MAGNUM_4000 || OLIVETTI_M700)
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         The G364 driver is the framebuffer used in MIPS Magnum 4000 and
-         Olivetti M700-10 systems.
-
-config FB_68328
-       bool "Motorola 68328 native frame buffer support"
-       depends on (FB = y) && (M68328 || M68EZ328 || M68VZ328)
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         Say Y here if you want to support the built-in frame buffer of
-         the Motorola 68328 CPU family.
-
-config FB_PXA168
-       tristate "PXA168/910 LCD framebuffer support"
-       depends on FB && (CPU_PXA168 || CPU_PXA910)
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         Frame buffer driver for the built-in LCD controller in the Marvell
-         MMP processor.
-
-config FB_PXA
-       tristate "PXA LCD framebuffer support"
-       depends on FB && ARCH_PXA
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         Frame buffer driver for the built-in LCD controller in the Intel
-         PXA2x0 processor.
-
-         This driver is also available as a module ( = code which can be
-         inserted and removed from the running kernel whenever you want). The
-         module will be called pxafb. If you want to compile it as a module,
-         say M here and read <file:Documentation/kbuild/modules.txt>.
-
-         If unsure, say N.
-
-config FB_PXA_OVERLAY
-       bool "Support PXA27x/PXA3xx Overlay(s) as framebuffer"
-       default n
-       depends on FB_PXA && (PXA27x || PXA3xx)
-
-config FB_PXA_SMARTPANEL
-       bool "PXA Smartpanel LCD support"
-       default n
-       depends on FB_PXA
-
-config FB_PXA_PARAMETERS
-       bool "PXA LCD command line parameters"
-       default n
-       depends on FB_PXA
-       ---help---
-         Enable the use of kernel command line or module parameters
-         to configure the physical properties of the LCD panel when
-         using the PXA LCD driver.
-
-         This option allows you to override the panel parameters
-         supplied by the platform in order to support multiple
-         different models of flatpanel. If you will only be using a
-         single model of flatpanel then you can safely leave this
-         option disabled.
-
-         <file:Documentation/fb/pxafb.txt> describes the available parameters.
-
-config PXA3XX_GCU
-       tristate "PXA3xx 2D graphics accelerator driver"
-       depends on FB_PXA
-       help
-         Kernelspace driver for the 2D graphics controller unit (GCU)
-         found on PXA3xx processors. There is a counterpart driver in the
-         DirectFB suite, see http://www.directfb.org/
-
-         If you compile this as a module, it will be called pxa3xx_gcu.
-
-config FB_MBX
-       tristate "2700G LCD framebuffer support"
-       depends on FB && ARCH_PXA
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         Framebuffer driver for the Intel 2700G (Marathon) Graphics
-         Accelerator
-
-config FB_MBX_DEBUG
-       bool "Enable debugging info via debugfs"
-       depends on FB_MBX && DEBUG_FS
-       default n
-       ---help---
-         Enable this if you want debugging information using the debug
-         filesystem (debugfs)
-
-         If unsure, say N.
-
-config FB_FSL_DIU
-       tristate "Freescale DIU framebuffer support"
-       depends on FB && FSL_SOC
-       select FB_MODE_HELPERS
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select PPC_LIB_RHEAP
-       ---help---
-         Framebuffer driver for the Freescale SoC DIU
-
-config FB_W100
-       tristate "W100 frame buffer support"
-       depends on FB && ARCH_PXA
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         Frame buffer driver for the w100 as found on the Sharp SL-Cxx series.
-         It can also drive the w3220 chip found on iPAQ hx4700.
-
-         This driver is also available as a module ( = code which can be
-         inserted and removed from the running kernel whenever you want). The
-         module will be called w100fb. If you want to compile it as a module,
-         say M here and read <file:Documentation/kbuild/modules.txt>.
-
-         If unsure, say N.
-
-config FB_SH_MOBILE_LCDC
-       tristate "SuperH Mobile LCDC framebuffer support"
-       depends on FB && (SUPERH || ARCH_SHMOBILE) && HAVE_CLK
-       select FB_SYS_FILLRECT
-       select FB_SYS_COPYAREA
-       select FB_SYS_IMAGEBLIT
-       select FB_SYS_FOPS
-       select FB_DEFERRED_IO
-       select FB_BACKLIGHT
-       select SH_MIPI_DSI if SH_LCD_MIPI_DSI
-       ---help---
-         Frame buffer driver for the on-chip SH-Mobile LCD controller.
-
-config FB_SH_MOBILE_HDMI
-       tristate "SuperH Mobile HDMI controller support"
-       depends on FB_SH_MOBILE_LCDC
-       select FB_MODE_HELPERS
-       select SOUND
-       select SND
-       select SND_SOC
-       ---help---
-         Driver for the on-chip SH-Mobile HDMI controller.
-
-config FB_TMIO
-       tristate "Toshiba Mobile IO FrameBuffer support"
-       depends on FB && MFD_CORE
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         Frame buffer driver for the Toshiba Mobile IO integrated as found
-         on the Sharp SL-6000 series
-
-         This driver is also available as a module ( = code which can be
-         inserted and removed from the running kernel whenever you want). The
-         module will be called tmiofb. If you want to compile it as a module,
-         say M here and read <file:Documentation/kbuild/modules.txt>.
-
-         If unsure, say N.
-
-config FB_TMIO_ACCELL
-       bool "tmiofb acceleration"
-       depends on FB_TMIO
-       default y
-
-config FB_S3C
-       tristate "Samsung S3C framebuffer support"
-       depends on FB && (CPU_S3C2416 || ARCH_S3C64XX || ARCH_S5P64X0 || \
-               ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS)
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         Frame buffer driver for the built-in FB controller in the Samsung
-         SoC line from the S3C2443 onwards, including the S3C2416, S3C2450,
-         and the S3C64XX series such as the S3C6400 and S3C6410.
-
-         These chips all have the same basic framebuffer design with the
-         actual capabilities depending on the chip. For instance the S3C6400
-         and S3C6410 support 4 hardware windows whereas the S3C24XX series
-         currently only have two.
-
-         Currently the support is only for the S3C6400 and S3C6410 SoCs.
-
-config FB_S3C_DEBUG_REGWRITE
-       bool "Debug register writes"
-       depends on FB_S3C
-       ---help---
-         Show all register writes via pr_debug()
-
-config FB_S3C2410
-       tristate "S3C2410 LCD framebuffer support"
-       depends on FB && ARCH_S3C24XX
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         Frame buffer driver for the built-in LCD controller in the Samsung
-         S3C2410 processor.
-
-         This driver is also available as a module ( = code which can be
-         inserted and removed from the running kernel whenever you want). The
-         module will be called s3c2410fb. If you want to compile it as a module,
-         say M here and read <file:Documentation/kbuild/modules.txt>.
-
-         If unsure, say N.
-config FB_S3C2410_DEBUG
-       bool "S3C2410 lcd debug messages"
-       depends on FB_S3C2410
-       help
-         Turn on debugging messages. Note that you can set/unset at run time
-         through sysfs
-
-config FB_NUC900
-        bool "NUC900 LCD framebuffer support"
-        depends on FB && ARCH_W90X900
-        select FB_CFB_FILLRECT
-        select FB_CFB_COPYAREA
-        select FB_CFB_IMAGEBLIT
-        ---help---
-          Frame buffer driver for the built-in LCD controller in the Nuvoton
-          NUC900 processor
-
-config GPM1040A0_320X240
-        bool "Giantplus Technology GPM1040A0 320x240 Color TFT LCD"
-        depends on FB_NUC900
-
-config FB_SM501
-       tristate "Silicon Motion SM501 framebuffer support"
-       depends on FB && MFD_SM501
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         Frame buffer driver for the CRT and LCD controllers in the Silicon
-         Motion SM501.
-
-         This driver is also available as a module ( = code which can be
-         inserted and removed from the running kernel whenever you want). The
-         module will be called sm501fb. If you want to compile it as a module,
-         say M here and read <file:Documentation/kbuild/modules.txt>.
-
-         If unsure, say N.
-
-config FB_SMSCUFX
-       tristate "SMSC UFX6000/7000 USB Framebuffer support"
-       depends on FB && USB
-       select FB_MODE_HELPERS
-       select FB_SYS_FILLRECT
-       select FB_SYS_COPYAREA
-       select FB_SYS_IMAGEBLIT
-       select FB_SYS_FOPS
-       select FB_DEFERRED_IO
-       ---help---
-         This is a kernel framebuffer driver for SMSC UFX USB devices.
-         Supports fbdev clients like xf86-video-fbdev, kdrive, fbi, and
-         mplayer -vo fbdev. Supports both UFX6000 (USB 2.0) and UFX7000
-         (USB 3.0) devices.
-         To compile as a module, choose M here: the module name is smscufx.
-
-config FB_UDL
-       tristate "Displaylink USB Framebuffer support"
-       depends on FB && USB
-       select FB_MODE_HELPERS
-       select FB_SYS_FILLRECT
-       select FB_SYS_COPYAREA
-       select FB_SYS_IMAGEBLIT
-       select FB_SYS_FOPS
-       select FB_DEFERRED_IO
-       ---help---
-         This is a kernel framebuffer driver for DisplayLink USB devices.
-         Supports fbdev clients like xf86-video-fbdev, kdrive, fbi, and
-         mplayer -vo fbdev. Supports all USB 2.0 era DisplayLink devices.
-         To compile as a module, choose M here: the module name is udlfb.
-
-config FB_IBM_GXT4500
-       tristate "Framebuffer support for IBM GXT4000P/4500P/6000P/6500P adaptors"
-       depends on FB && PPC
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         Say Y here to enable support for the IBM GXT4000P/6000P and
-         GXT4500P/6500P display adaptor based on Raster Engine RC1000,
-         found on some IBM System P (pSeries) machines. This driver
-         doesn't use Geometry Engine GT1000.
-
-config FB_PS3
-       tristate "PS3 GPU framebuffer driver"
-       depends on FB && PS3_PS3AV
-       select FB_SYS_FILLRECT
-       select FB_SYS_COPYAREA
-       select FB_SYS_IMAGEBLIT
-       select FB_SYS_FOPS
-       select VT_HW_CONSOLE_BINDING if FRAMEBUFFER_CONSOLE
-       ---help---
-         Include support for the virtual frame buffer in the PS3 platform.
-
-config FB_PS3_DEFAULT_SIZE_M
-       int "PS3 default frame buffer size (in MiB)"
-       depends on FB_PS3
-       default 9
-       ---help---
-         This is the default size (in MiB) of the virtual frame buffer in
-         the PS3.
-         The default value can be overridden on the kernel command line
-         using the "ps3fb" option (e.g. "ps3fb=9M");
-
-config FB_XILINX
-       tristate "Xilinx frame buffer support"
-       depends on FB && (XILINX_VIRTEX || MICROBLAZE || ARCH_ZYNQ)
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         Include support for the Xilinx ML300/ML403 reference design
-         framebuffer. ML300 carries a 640*480 LCD display on the board,
-         ML403 uses a standard DB15 VGA connector.
-
-config FB_GOLDFISH
-       tristate "Goldfish Framebuffer"
-       depends on FB && HAS_DMA
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         Framebuffer driver for Goldfish Virtual Platform
-
-config FB_COBALT
-       tristate "Cobalt server LCD frame buffer support"
-       depends on FB && (MIPS_COBALT || MIPS_SEAD3)
-
-config FB_SH7760
-       bool "SH7760/SH7763/SH7720/SH7721 LCDC support"
-       depends on FB && (CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7763 \
-               || CPU_SUBTYPE_SH7720 || CPU_SUBTYPE_SH7721)
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         Support for the SH7760/SH7763/SH7720/SH7721 integrated
-         (D)STN/TFT LCD Controller.
-         Supports display resolutions up to 1024x1024 pixel, grayscale and
-         color operation, with depths ranging from 1 bpp to 8 bpp monochrome
-         and 8, 15 or 16 bpp color; 90 degrees clockwise display rotation for
-         panels <= 320 pixel horizontal resolution.
-
-config FB_DA8XX
-       tristate "DA8xx/OMAP-L1xx/AM335x Framebuffer support"
-       depends on FB && (ARCH_DAVINCI_DA8XX || SOC_AM33XX)
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_CFB_REV_PIXELS_IN_BYTE
-       select FB_MODE_HELPERS
-       select VIDEOMODE_HELPERS
-       ---help---
-         This is the frame buffer device driver for the TI LCD controller
-         found on DA8xx/OMAP-L1xx/AM335x SoCs.
-         If unsure, say N.
-
-config FB_VIRTUAL
-       tristate "Virtual Frame Buffer support (ONLY FOR TESTING!)"
-       depends on FB
-       select FB_SYS_FILLRECT
-       select FB_SYS_COPYAREA
-       select FB_SYS_IMAGEBLIT
-       select FB_SYS_FOPS
-       ---help---
-         This is a `virtual' frame buffer device. It operates on a chunk of
-         unswappable kernel memory instead of on the memory of a graphics
-         board. This means you cannot see any output sent to this frame
-         buffer device, while it does consume precious memory. The main use
-         of this frame buffer device is testing and debugging the frame
-         buffer subsystem. Do NOT enable it for normal systems! To protect
-         the innocent, it has to be enabled explicitly at boot time using the
-         kernel option `video=vfb:'.
-
-         To compile this driver as a module, choose M here: the
-         module will be called vfb. In order to load it, you must use
-         the vfb_enable=1 option.
-
-         If unsure, say N.
-
-config XEN_FBDEV_FRONTEND
-       tristate "Xen virtual frame buffer support"
-       depends on FB && XEN
-       select FB_SYS_FILLRECT
-       select FB_SYS_COPYAREA
-       select FB_SYS_IMAGEBLIT
-       select FB_SYS_FOPS
-       select FB_DEFERRED_IO
-       select INPUT_XEN_KBDDEV_FRONTEND if INPUT_MISC
-       select XEN_XENBUS_FRONTEND
-       default y
-       help
-         This driver implements the front-end of the Xen virtual
-         frame buffer driver.  It communicates with a back-end
-         in another domain.
-
-config FB_METRONOME
-       tristate "E-Ink Metronome/8track controller support"
-       depends on FB
-       select FB_SYS_FILLRECT
-       select FB_SYS_COPYAREA
-       select FB_SYS_IMAGEBLIT
-       select FB_SYS_FOPS
-       select FB_DEFERRED_IO
-       help
-         This driver implements support for the E-Ink Metronome
-         controller. The pre-release name for this device was 8track
-         and could also have been called by some vendors as PVI-nnnn.
-
-config FB_MB862XX
-       tristate "Fujitsu MB862xx GDC support"
-       depends on FB
-       depends on PCI || (OF && PPC)
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         Frame buffer driver for Fujitsu Carmine/Coral-P(A)/Lime controllers.
-
-choice
-       prompt "GDC variant"
-       depends on FB_MB862XX
-
-config FB_MB862XX_PCI_GDC
-       bool "Carmine/Coral-P(A) GDC"
-       depends on PCI
-       ---help---
-         This enables framebuffer support for Fujitsu Carmine/Coral-P(A)
-         PCI graphics controller devices.
-
-config FB_MB862XX_LIME
-       bool "Lime GDC"
-       depends on OF && PPC
-       select FB_FOREIGN_ENDIAN
-       select FB_LITTLE_ENDIAN
-       ---help---
-         Framebuffer support for Fujitsu Lime GDC on host CPU bus.
-
-endchoice
-
-config FB_MB862XX_I2C
-       bool "Support I2C bus on MB862XX GDC"
-       depends on FB_MB862XX && I2C
-       default y
-       help
-         Selecting this option adds Coral-P(A)/Lime GDC I2C bus adapter
-         driver to support accessing I2C devices on controller's I2C bus.
-         These are usually some video decoder chips.
-
-config FB_EP93XX
-       tristate "EP93XX frame buffer support"
-       depends on FB && ARCH_EP93XX
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       ---help---
-         Framebuffer driver for the Cirrus Logic EP93XX series of processors.
-         This driver is also available as a module. The module will be called
-         ep93xx-fb.
-
-config FB_PRE_INIT_FB
-       bool "Don't reinitialize, use bootloader's GDC/Display configuration"
-       depends on FB && FB_MB862XX_LIME
-       ---help---
-         Select this option if display contents should be inherited as set by
-         the bootloader.
-
-config FB_MSM
-       tristate "MSM Framebuffer support"
-       depends on FB && ARCH_MSM
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-
-config FB_MX3
-       tristate "MX3 Framebuffer support"
-       depends on FB && MX3_IPU
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       default y
-       help
-         This is a framebuffer device for the i.MX31 LCD Controller. So
-         far only synchronous displays are supported. If you plan to use
-         an LCD display with your i.MX31 system, say Y here.
-
-config FB_BROADSHEET
-       tristate "E-Ink Broadsheet/Epson S1D13521 controller support"
-       depends on FB
-       select FB_SYS_FILLRECT
-       select FB_SYS_COPYAREA
-       select FB_SYS_IMAGEBLIT
-       select FB_SYS_FOPS
-       select FB_DEFERRED_IO
-       help
-         This driver implements support for the E-Ink Broadsheet
-         controller. The release name for this device was Epson S1D13521
-         and could also have been called by other names when coupled with
-         a bridge adapter.
-
-config FB_AUO_K190X
-       tristate "AUO-K190X EPD controller support"
-       depends on FB
-       select FB_SYS_FILLRECT
-       select FB_SYS_COPYAREA
-       select FB_SYS_IMAGEBLIT
-       select FB_SYS_FOPS
-       select FB_DEFERRED_IO
-       help
-         Provides support for epaper controllers from the K190X series
-         of AUO. These controllers can be used to drive epaper displays
-         from Sipix.
-
-         This option enables the common support, shared by the individual
-         controller drivers. You will also have to enable the driver
-         for the controller type used in your device.
-
-config FB_AUO_K1900
-       tristate "AUO-K1900 EPD controller support"
-       depends on FB && FB_AUO_K190X
-       help
-         This driver implements support for the AUO K1900 epd-controller.
-         This controller can drive Sipix epaper displays but can only do
-         serial updates, reducing the number of possible frames per second.
-
-config FB_AUO_K1901
-       tristate "AUO-K1901 EPD controller support"
-       depends on FB && FB_AUO_K190X
-       help
-         This driver implements support for the AUO K1901 epd-controller.
-         This controller can drive Sipix epaper displays and supports
-         concurrent updates, making higher frames per second possible.
-
-config FB_JZ4740
-       tristate "JZ4740 LCD framebuffer support"
-       depends on FB && MACH_JZ4740
-       select FB_SYS_FILLRECT
-       select FB_SYS_COPYAREA
-       select FB_SYS_IMAGEBLIT
-       help
-         Framebuffer support for the JZ4740 SoC.
-
-config FB_MXS
-       tristate "MXS LCD framebuffer support"
-       depends on FB && ARCH_MXS
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       select FB_MODE_HELPERS
-       select VIDEOMODE_HELPERS
-       help
-         Framebuffer support for the MXS SoC.
-
-config FB_PUV3_UNIGFX
-       tristate "PKUnity v3 Unigfx framebuffer support"
-       depends on FB && UNICORE32 && ARCH_PUV3
-       select FB_SYS_FILLRECT
-       select FB_SYS_COPYAREA
-       select FB_SYS_IMAGEBLIT
-       select FB_SYS_FOPS
-       help
-         Choose this option if you want to use the Unigfx device as a
-         framebuffer device. Without the support of PCI & AGP.
-
-config FB_HYPERV
-       tristate "Microsoft Hyper-V Synthetic Video support"
-       depends on FB && HYPERV
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         This framebuffer driver supports Microsoft Hyper-V Synthetic Video.
-
-config FB_SIMPLE
-       bool "Simple framebuffer support"
-       depends on (FB = y)
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       help
-         Say Y if you want support for a simple frame-buffer.
-
-         This driver assumes that the display hardware has been initialized
-         before the kernel boots, and the kernel will simply render to the
-         pre-allocated frame buffer surface.
-
-         Configuration re: surface address, size, and format must be provided
-         through device tree, or plain old platform data.
-
-source "drivers/video/omap/Kconfig"
-source "drivers/video/omap2/Kconfig"
-source "drivers/video/exynos/Kconfig"
-source "drivers/video/mmp/Kconfig"
-source "drivers/video/backlight/Kconfig"
-
 if VT
        source "drivers/video/console/Kconfig"
 endif
 
 if FB || SGI_NEWPORT_CONSOLE
        source "drivers/video/logo/Kconfig"
-endif
 
-config FB_SH_MOBILE_MERAM
-       tristate "SuperH Mobile MERAM read ahead support"
-       depends on (SUPERH || ARCH_SHMOBILE)
-       select GENERIC_ALLOCATOR
-       ---help---
-         Enable MERAM support for the SuperH controller.
-
-         This will allow for caching of the framebuffer to provide more
-         reliable access under heavy main memory bus traffic situations.
-         Up to 4 memory channels can be configured, allowing 4 RGB or
-         2 YCbCr framebuffers to be configured.
+endif
 
-config FB_SSD1307
-       tristate "Solomon SSD1307 framebuffer support"
-       depends on FB && I2C
-       depends on OF
-       depends on GPIOLIB
-       select FB_SYS_FOPS
-       select FB_SYS_FILLRECT
-       select FB_SYS_COPYAREA
-       select FB_SYS_IMAGEBLIT
-       select FB_DEFERRED_IO
-       select PWM
-       help
-         This driver implements support for the Solomon SSD1307
-         OLED controller over I2C.
 
 endmenu
index 1be26fe..9ad3c17 100644 (file)
-# Makefile for the Linux video drivers.
-# 5 Aug 1999, James Simmons, <mailto:jsimmons@users.sf.net>
-# Rewritten to use lists instead of if-statements.
-
-# Each configuration option enables a list of files.
-
 obj-$(CONFIG_VGASTATE)            += vgastate.o
 obj-$(CONFIG_HDMI)                += hdmi.o
-obj-y                             += fb_notify.o
-obj-$(CONFIG_FB)                  += fb.o
-fb-y                              := fbmem.o fbmon.o fbcmap.o fbsysfs.o \
-                                     modedb.o fbcvt.o
-fb-objs                           := $(fb-y)
 
 obj-$(CONFIG_VT)                 += console/
 obj-$(CONFIG_LOGO)               += logo/
 obj-y                            += backlight/
 
-obj-$(CONFIG_EXYNOS_VIDEO)     += exynos/
-
-obj-$(CONFIG_FB_CFB_FILLRECT)  += cfbfillrect.o
-obj-$(CONFIG_FB_CFB_COPYAREA)  += cfbcopyarea.o
-obj-$(CONFIG_FB_CFB_IMAGEBLIT) += cfbimgblt.o
-obj-$(CONFIG_FB_SYS_FILLRECT)  += sysfillrect.o
-obj-$(CONFIG_FB_SYS_COPYAREA)  += syscopyarea.o
-obj-$(CONFIG_FB_SYS_IMAGEBLIT) += sysimgblt.o
-obj-$(CONFIG_FB_SYS_FOPS)      += fb_sys_fops.o
-obj-$(CONFIG_FB_SVGALIB)       += svgalib.o
-obj-$(CONFIG_FB_MACMODES)      += macmodes.o
-obj-$(CONFIG_FB_DDC)           += fb_ddc.o
-obj-$(CONFIG_FB_DEFERRED_IO)   += fb_defio.o
-obj-$(CONFIG_FB_WMT_GE_ROPS)   += wmt_ge_rops.o
-
-# Hardware specific drivers go first
-obj-$(CONFIG_FB_AMIGA)            += amifb.o c2p_planar.o
-obj-$(CONFIG_FB_ARC)              += arcfb.o
-obj-$(CONFIG_FB_CLPS711X)         += clps711xfb.o
-obj-$(CONFIG_FB_CYBER2000)        += cyber2000fb.o
-obj-$(CONFIG_FB_GRVGA)            += grvga.o
-obj-$(CONFIG_FB_PM2)              += pm2fb.o
-obj-$(CONFIG_FB_PM3)             += pm3fb.o
-
-obj-$(CONFIG_FB_I740)            += i740fb.o
-obj-$(CONFIG_FB_MATROX)                  += matrox/
-obj-$(CONFIG_FB_RIVA)            += riva/
-obj-$(CONFIG_FB_NVIDIA)                  += nvidia/
-obj-$(CONFIG_FB_ATY)             += aty/ macmodes.o
-obj-$(CONFIG_FB_ATY128)                  += aty/ macmodes.o
-obj-$(CONFIG_FB_RADEON)                  += aty/
-obj-$(CONFIG_FB_SIS)             += sis/
-obj-$(CONFIG_FB_VIA)             += via/
-obj-$(CONFIG_FB_KYRO)             += kyro/
-obj-$(CONFIG_FB_SAVAGE)                  += savage/
-obj-$(CONFIG_FB_GEODE)           += geode/
-obj-$(CONFIG_FB_MBX)             += mbx/
-obj-$(CONFIG_FB_NEOMAGIC)         += neofb.o
-obj-$(CONFIG_FB_3DFX)             += tdfxfb.o
-obj-$(CONFIG_FB_CONTROL)          += controlfb.o
-obj-$(CONFIG_FB_PLATINUM)         += platinumfb.o
-obj-$(CONFIG_FB_VALKYRIE)         += valkyriefb.o
-obj-$(CONFIG_FB_CT65550)          += chipsfb.o
-obj-$(CONFIG_FB_IMSTT)            += imsttfb.o
-obj-$(CONFIG_FB_FM2)              += fm2fb.o
-obj-$(CONFIG_FB_VT8623)           += vt8623fb.o
-obj-$(CONFIG_FB_TRIDENT)          += tridentfb.o
-obj-$(CONFIG_FB_LE80578)          += vermilion/
-obj-$(CONFIG_FB_S3)               += s3fb.o
-obj-$(CONFIG_FB_ARK)              += arkfb.o
-obj-$(CONFIG_FB_STI)              += stifb.o
-obj-$(CONFIG_FB_FFB)              += ffb.o sbuslib.o
-obj-$(CONFIG_FB_CG6)              += cg6.o sbuslib.o
-obj-$(CONFIG_FB_CG3)              += cg3.o sbuslib.o
-obj-$(CONFIG_FB_BW2)              += bw2.o sbuslib.o
-obj-$(CONFIG_FB_CG14)             += cg14.o sbuslib.o
-obj-$(CONFIG_FB_P9100)            += p9100.o sbuslib.o
-obj-$(CONFIG_FB_TCX)              += tcx.o sbuslib.o
-obj-$(CONFIG_FB_LEO)              += leo.o sbuslib.o
-obj-$(CONFIG_FB_ACORN)            += acornfb.o
-obj-$(CONFIG_FB_ATARI)            += atafb.o c2p_iplan2.o atafb_mfb.o \
-                                     atafb_iplan2p2.o atafb_iplan2p4.o atafb_iplan2p8.o
-obj-$(CONFIG_FB_MAC)              += macfb.o
-obj-$(CONFIG_FB_HECUBA)           += hecubafb.o
-obj-$(CONFIG_FB_N411)             += n411.o
-obj-$(CONFIG_FB_HGA)              += hgafb.o
-obj-$(CONFIG_FB_XVR500)           += sunxvr500.o
-obj-$(CONFIG_FB_XVR2500)          += sunxvr2500.o
-obj-$(CONFIG_FB_XVR1000)          += sunxvr1000.o
-obj-$(CONFIG_FB_IGA)              += igafb.o
-obj-$(CONFIG_FB_APOLLO)           += dnfb.o
-obj-$(CONFIG_FB_Q40)              += q40fb.o
-obj-$(CONFIG_FB_TGA)              += tgafb.o
-obj-$(CONFIG_FB_HP300)            += hpfb.o
-obj-$(CONFIG_FB_G364)             += g364fb.o
-obj-$(CONFIG_FB_EP93XX)                  += ep93xx-fb.o
-obj-$(CONFIG_FB_SA1100)           += sa1100fb.o
-obj-$(CONFIG_FB_HIT)              += hitfb.o
-obj-$(CONFIG_FB_ATMEL)           += atmel_lcdfb.o
-obj-$(CONFIG_FB_PVR2)             += pvr2fb.o
-obj-$(CONFIG_FB_VOODOO1)          += sstfb.o
-obj-$(CONFIG_FB_ARMCLCD)         += amba-clcd.o
-obj-$(CONFIG_FB_GOLDFISH)         += goldfishfb.o
-obj-$(CONFIG_FB_68328)            += 68328fb.o
-obj-$(CONFIG_FB_GBE)              += gbefb.o
-obj-$(CONFIG_FB_CIRRUS)                  += cirrusfb.o
-obj-$(CONFIG_FB_ASILIANT)        += asiliantfb.o
-obj-$(CONFIG_FB_PXA)             += pxafb.o
-obj-$(CONFIG_FB_PXA168)                  += pxa168fb.o
-obj-$(CONFIG_PXA3XX_GCU)         += pxa3xx-gcu.o
-obj-$(CONFIG_MMP_DISP)           += mmp/
-obj-$(CONFIG_FB_W100)            += w100fb.o
-obj-$(CONFIG_FB_TMIO)            += tmiofb.o
-obj-$(CONFIG_FB_AU1100)                  += au1100fb.o
-obj-$(CONFIG_FB_AU1200)                  += au1200fb.o
-obj-$(CONFIG_FB_VT8500)                  += vt8500lcdfb.o
-obj-$(CONFIG_FB_WM8505)                  += wm8505fb.o
-obj-$(CONFIG_FB_PMAG_AA)         += pmag-aa-fb.o
-obj-$(CONFIG_FB_PMAG_BA)         += pmag-ba-fb.o
-obj-$(CONFIG_FB_PMAGB_B)         += pmagb-b-fb.o
-obj-$(CONFIG_FB_MAXINE)                  += maxinefb.o
-obj-$(CONFIG_FB_METRONOME)        += metronomefb.o
-obj-$(CONFIG_FB_BROADSHEET)       += broadsheetfb.o
-obj-$(CONFIG_FB_AUO_K190X)       += auo_k190x.o
-obj-$(CONFIG_FB_AUO_K1900)       += auo_k1900fb.o
-obj-$(CONFIG_FB_AUO_K1901)       += auo_k1901fb.o
-obj-$(CONFIG_FB_S1D13XXX)        += s1d13xxxfb.o
-obj-$(CONFIG_FB_SH7760)                  += sh7760fb.o
-obj-$(CONFIG_FB_IMX)              += imxfb.o
-obj-$(CONFIG_FB_S3C)             += s3c-fb.o
-obj-$(CONFIG_FB_S3C2410)         += s3c2410fb.o
-obj-$(CONFIG_FB_FSL_DIU)         += fsl-diu-fb.o
-obj-$(CONFIG_FB_COBALT)           += cobalt_lcdfb.o
-obj-$(CONFIG_FB_IBM_GXT4500)     += gxt4500.o
-obj-$(CONFIG_FB_PS3)             += ps3fb.o
-obj-$(CONFIG_FB_SM501)            += sm501fb.o
-obj-$(CONFIG_FB_UDL)             += udlfb.o
-obj-$(CONFIG_FB_SMSCUFX)         += smscufx.o
-obj-$(CONFIG_FB_XILINX)           += xilinxfb.o
-obj-$(CONFIG_SH_MIPI_DSI)        += sh_mipi_dsi.o
-obj-$(CONFIG_FB_SH_MOBILE_HDMI)          += sh_mobile_hdmi.o
-obj-$(CONFIG_FB_SH_MOBILE_MERAM)  += sh_mobile_meram.o
-obj-$(CONFIG_FB_SH_MOBILE_LCDC)          += sh_mobile_lcdcfb.o
-obj-$(CONFIG_FB_OMAP)             += omap/
-obj-y                             += omap2/
-obj-$(CONFIG_XEN_FBDEV_FRONTEND)  += xen-fbfront.o
-obj-$(CONFIG_FB_CARMINE)          += carminefb.o
-obj-$(CONFIG_FB_MB862XX)         += mb862xx/
-obj-$(CONFIG_FB_MSM)              += msm/
-obj-$(CONFIG_FB_NUC900)           += nuc900fb.o
-obj-$(CONFIG_FB_JZ4740)                  += jz4740_fb.o
-obj-$(CONFIG_FB_PUV3_UNIGFX)      += fb-puv3.o
-obj-$(CONFIG_FB_HYPERV)                  += hyperv_fb.o
-obj-$(CONFIG_FB_OPENCORES)       += ocfb.o
-
-# Platform or fallback drivers go here
-obj-$(CONFIG_FB_UVESA)            += uvesafb.o
-obj-$(CONFIG_FB_VESA)             += vesafb.o
-obj-$(CONFIG_FB_EFI)              += efifb.o
-obj-$(CONFIG_FB_VGA16)            += vga16fb.o
-obj-$(CONFIG_FB_OF)               += offb.o
-obj-$(CONFIG_FB_BF537_LQ035)      += bf537-lq035.o
-obj-$(CONFIG_FB_BF54X_LQ043)     += bf54x-lq043fb.o
-obj-$(CONFIG_FB_BFIN_LQ035Q1)     += bfin-lq035q1-fb.o
-obj-$(CONFIG_FB_BFIN_T350MCQB)   += bfin-t350mcqb-fb.o
-obj-$(CONFIG_FB_BFIN_7393)        += bfin_adv7393fb.o
-obj-$(CONFIG_FB_MX3)             += mx3fb.o
-obj-$(CONFIG_FB_DA8XX)           += da8xx-fb.o
-obj-$(CONFIG_FB_MXS)             += mxsfb.o
-obj-$(CONFIG_FB_SSD1307)         += ssd1307fb.o
-obj-$(CONFIG_FB_SIMPLE)           += simplefb.o
-
-# the test framebuffer is last
-obj-$(CONFIG_FB_VIRTUAL)          += vfb.o
+obj-y                            += fbdev/
 
 obj-$(CONFIG_VIDEOMODE_HELPERS) += display_timing.o videomode.o
 ifeq ($(CONFIG_OF),y)
index 5f65ca3..026fd12 100644 (file)
@@ -46,7 +46,7 @@
 
 #include <asm/io.h>
 
-#include "../sticore.h"
+#include "../fbdev/sticore.h"
 
 /* switching to graphics mode */
 #define BLANK 0
index cecd3de..7da1ad0 100644 (file)
@@ -28,7 +28,7 @@
 #include <asm/cacheflush.h>
 #include <asm/grfioctl.h>
 
-#include "../sticore.h"
+#include "../fbdev/sticore.h"
 
 #define STI_DRIVERVERSION "Version 0.9b"
 
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
new file mode 100644 (file)
index 0000000..e1f4727
--- /dev/null
@@ -0,0 +1,2474 @@
+#
+# fbdev configuration
+#
+
+menuconfig FB
+       tristate "Support for frame buffer devices"
+       ---help---
+         The frame buffer device provides an abstraction for the graphics
+         hardware. It represents the frame buffer of some video hardware and
+         allows application software to access the graphics hardware through
+         a well-defined interface, so the software doesn't need to know
+         anything about the low-level (hardware register) stuff.
+
+         Frame buffer devices work identically across the different
+         architectures supported by Linux and make the implementation of
+         application programs easier and more portable; at this point, an X
+         server exists which uses the frame buffer device exclusively.
+         On several non-X86 architectures, the frame buffer device is the
+         only way to use the graphics hardware.
+
+         The device is accessed through special device nodes, usually located
+         in the /dev directory, i.e. /dev/fb*.
+
+         You need an utility program called fbset to make full use of frame
+         buffer devices. Please read <file:Documentation/fb/framebuffer.txt>
+         and the Framebuffer-HOWTO at
+         <http://www.munted.org.uk/programming/Framebuffer-HOWTO-1.3.html> for more
+         information.
+
+         Say Y here and to the driver for your graphics board below if you
+         are compiling a kernel for a non-x86 architecture.
+
+         If you are compiling for the x86 architecture, you can say Y if you
+         want to play with it, but it is not essential. Please note that
+         running graphical applications that directly touch the hardware
+         (e.g. an accelerated X server) and that are not frame buffer
+         device-aware may cause unexpected results. If unsure, say N.
+
+config FIRMWARE_EDID
+       bool "Enable firmware EDID"
+       depends on FB
+       default n
+       ---help---
+         This enables access to the EDID transferred from the firmware.
+        On the i386, this is from the Video BIOS. Enable this if DDC/I2C
+        transfers do not work for your driver and if you are using
+        nvidiafb, i810fb or savagefb.
+
+        In general, choosing Y for this option is safe.  If you
+        experience extremely long delays while booting before you get
+        something on your display, try setting this to N.  Matrox cards in
+        combination with certain motherboards and monitors are known to
+        suffer from this problem.
+
+config FB_DDC
+       tristate
+       depends on FB
+       select I2C_ALGOBIT
+       select I2C
+       default n
+
+config FB_BOOT_VESA_SUPPORT
+       bool
+       depends on FB
+       default n
+       ---help---
+         If true, at least one selected framebuffer driver can take advantage
+         of VESA video modes set at an early boot stage via the vga= parameter.
+
+config FB_CFB_FILLRECT
+       tristate
+       depends on FB
+       default n
+       ---help---
+         Include the cfb_fillrect function for generic software rectangle
+         filling. This is used by drivers that don't provide their own
+         (accelerated) version.
+
+config FB_CFB_COPYAREA
+       tristate
+       depends on FB
+       default n
+       ---help---
+         Include the cfb_copyarea function for generic software area copying.
+         This is used by drivers that don't provide their own (accelerated)
+         version.
+
+config FB_CFB_IMAGEBLIT
+       tristate
+       depends on FB
+       default n
+       ---help---
+         Include the cfb_imageblit function for generic software image
+         blitting. This is used by drivers that don't provide their own
+         (accelerated) version.
+
+config FB_CFB_REV_PIXELS_IN_BYTE
+       bool
+       depends on FB
+       default n
+       ---help---
+         Allow generic frame-buffer functions to work on displays with 1, 2
+         and 4 bits per pixel depths which has opposite order of pixels in
+         byte order to bytes in long order.
+
+config FB_SYS_FILLRECT
+       tristate
+       depends on FB
+       default n
+       ---help---
+         Include the sys_fillrect function for generic software rectangle
+         filling. This is used by drivers that don't provide their own
+         (accelerated) version and the framebuffer is in system RAM.
+
+config FB_SYS_COPYAREA
+       tristate
+       depends on FB
+       default n
+       ---help---
+         Include the sys_copyarea function for generic software area copying.
+         This is used by drivers that don't provide their own (accelerated)
+         version and the framebuffer is in system RAM.
+
+config FB_SYS_IMAGEBLIT
+       tristate
+       depends on FB
+       default n
+       ---help---
+         Include the sys_imageblit function for generic software image
+         blitting. This is used by drivers that don't provide their own
+         (accelerated) version and the framebuffer is in system RAM.
+
+menuconfig FB_FOREIGN_ENDIAN
+       bool "Framebuffer foreign endianness support"
+       depends on FB
+       ---help---
+         This menu will let you enable support for the framebuffers with
+         non-native endianness (e.g. Little-Endian framebuffer on a
+         Big-Endian machine). Most probably you don't have such hardware,
+         so it's safe to say "n" here.
+
+choice
+       prompt "Choice endianness support"
+       depends on FB_FOREIGN_ENDIAN
+
+config FB_BOTH_ENDIAN
+       bool "Support for Big- and Little-Endian framebuffers"
+
+config FB_BIG_ENDIAN
+       bool "Support for Big-Endian framebuffers only"
+
+config FB_LITTLE_ENDIAN
+       bool "Support for Little-Endian framebuffers only"
+
+endchoice
+
+config FB_SYS_FOPS
+       tristate
+       depends on FB
+       default n
+
+config FB_DEFERRED_IO
+       bool
+       depends on FB
+
+config FB_HECUBA
+       tristate
+       depends on FB
+       depends on FB_DEFERRED_IO
+
+config FB_SVGALIB
+       tristate
+       depends on FB
+       default n
+       ---help---
+         Common utility functions useful to fbdev drivers of VGA-based
+         cards.
+
+config FB_MACMODES
+       tristate
+       depends on FB
+       default n
+
+config FB_BACKLIGHT
+       bool
+       depends on FB
+       select BACKLIGHT_LCD_SUPPORT
+       select BACKLIGHT_CLASS_DEVICE
+       default n
+
+config FB_MODE_HELPERS
+        bool "Enable Video Mode Handling Helpers"
+        depends on FB
+       default n
+       ---help---
+         This enables functions for handling video modes using the
+         Generalized Timing Formula and the EDID parser. A few drivers rely
+          on this feature such as the radeonfb, rivafb, and the i810fb. If
+         your driver does not take advantage of this feature, choosing Y will
+         just increase the kernel size by about 5K.
+
+config FB_TILEBLITTING
+       bool "Enable Tile Blitting Support"
+       depends on FB
+       default n
+       ---help---
+         This enables tile blitting.  Tile blitting is a drawing technique
+        where the screen is divided into rectangular sections (tiles), whereas
+        the standard blitting divides the screen into pixels. Because the
+        default drawing element is a tile, drawing functions will be passed
+        parameters in terms of number of tiles instead of number of pixels.
+        For example, to draw a single character, instead of using bitmaps,
+        an index to an array of bitmaps will be used.  To clear or move a
+        rectangular section of a screen, the rectangle will be described in
+        terms of number of tiles in the x- and y-axis.
+
+        This is particularly important to one driver, matroxfb.  If
+        unsure, say N.
+
+comment "Frame buffer hardware drivers"
+       depends on FB
+
+config FB_GRVGA
+       tristate "Aeroflex Gaisler framebuffer support"
+       depends on FB && SPARC
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+       This enables support for the SVGACTRL framebuffer in the GRLIB IP library from Aeroflex Gaisler.
+
+config FB_CIRRUS
+       tristate "Cirrus Logic support"
+       depends on FB && (ZORRO || PCI)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         This enables support for Cirrus Logic GD542x/543x based boards on
+         Amiga: SD64, Piccolo, Picasso II/II+, Picasso IV, or EGS Spectrum.
+
+         If you have a PCI-based system, this enables support for these
+         chips: GD-543x, GD-544x, GD-5480.
+
+         Please read the file <file:Documentation/fb/cirrusfb.txt>.
+
+         Say N unless you have such a graphics board or plan to get one
+         before you next recompile the kernel.
+
+config FB_PM2
+       tristate "Permedia2 support"
+       depends on FB && ((AMIGA && BROKEN) || PCI)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for cards based on
+         the 3D Labs Permedia, Permedia 2 and Permedia 2V chips.
+         The driver was tested on the following cards:
+               Diamond FireGL 1000 PRO AGP
+               ELSA Gloria Synergy PCI
+               Appian Jeronimo PRO (both heads) PCI
+               3DLabs Oxygen ACX aka EONtronics Picasso P2 PCI
+               Techsource Raptor GFX-8P (aka Sun PGX-32) on SPARC
+               ASK Graphic Blaster Exxtreme AGP
+
+         To compile this driver as a module, choose M here: the
+         module will be called pm2fb.
+
+config FB_PM2_FIFO_DISCONNECT
+       bool "enable FIFO disconnect feature"
+       depends on FB_PM2 && PCI
+       help
+         Support the Permedia2 FIFO disconnect feature.
+
+config FB_ARMCLCD
+       tristate "ARM PrimeCell PL110 support"
+       depends on ARM || ARM64 || COMPILE_TEST
+       depends on FB && ARM_AMBA
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This framebuffer device driver is for the ARM PrimeCell PL110
+         Colour LCD controller.  ARM PrimeCells provide the building
+         blocks for System on a Chip devices.
+
+         If you want to compile this as a module (=code which can be
+         inserted into and removed from the running kernel), say M
+         here and read <file:Documentation/kbuild/modules.txt>.  The module
+         will be called amba-clcd.
+
+config FB_ACORN
+       bool "Acorn VIDC support"
+       depends on (FB = y) && ARM && ARCH_ACORN
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for the Acorn VIDC graphics
+         hardware found in Acorn RISC PCs and other ARM-based machines.  If
+         unsure, say N.
+
+config FB_CLPS711X
+       bool "CLPS711X LCD support"
+       depends on (FB = y) && ARM && ARCH_CLPS711X
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         Say Y to enable the Framebuffer driver for the CLPS7111 and
+         EP7212 processors.
+
+config FB_SA1100
+       bool "SA-1100 LCD support"
+       depends on (FB = y) && ARM && ARCH_SA1100
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is a framebuffer device for the SA-1100 LCD Controller.
+         See <http://www.linux-fbdev.org/> for information on framebuffer
+         devices.
+
+         If you plan to use the LCD display with your SA-1100 system, say
+         Y here.
+
+config FB_IMX
+       tristate "Freescale i.MX1/21/25/27 LCD support"
+       depends on FB && ARCH_MXC
+       select BACKLIGHT_LCD_SUPPORT
+       select LCD_CLASS_DEVICE
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_MODE_HELPERS
+       select VIDEOMODE_HELPERS
+
+config FB_CYBER2000
+       tristate "CyberPro 2000/2010/5000 support"
+       depends on FB && PCI && (BROKEN || !SPARC64)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This enables support for the Integraphics CyberPro 20x0 and 5000
+         VGA chips used in the Rebel.com Netwinder and other machines.
+         Say Y if you have a NetWinder or a graphics card containing this
+         device, otherwise say N.
+
+config FB_CYBER2000_DDC
+       bool "DDC for CyberPro support"
+       depends on FB_CYBER2000
+       select FB_DDC
+       default y
+       help
+         Say Y here if you want DDC support for your CyberPro graphics
+         card. This is only I2C bus support, driver does not use EDID.
+
+config FB_CYBER2000_I2C
+       bool "CyberPro 2000/2010/5000 I2C support"
+       depends on FB_CYBER2000 && I2C && ARCH_NETWINDER
+       select I2C_ALGOBIT
+       help
+         Enable support for the I2C video decoder interface on the
+         Integraphics CyberPro 20x0 and 5000 VGA chips.  This is used
+         on the Netwinder machines for the SAA7111 video capture.
+
+config FB_APOLLO
+       bool
+       depends on (FB = y) && APOLLO
+       default y
+       select FB_CFB_FILLRECT
+       select FB_CFB_IMAGEBLIT
+
+config FB_Q40
+       bool
+       depends on (FB = y) && Q40
+       default y
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+
+config FB_AMIGA
+       tristate "Amiga native chipset support"
+       depends on FB && AMIGA
+       help
+         This is the frame buffer device driver for the builtin graphics
+         chipset found in Amigas.
+
+         To compile this driver as a module, choose M here: the
+         module will be called amifb.
+
+config FB_AMIGA_OCS
+       bool "Amiga OCS chipset support"
+       depends on FB_AMIGA
+       help
+         This enables support for the original Agnus and Denise video chips,
+         found in the Amiga 1000 and most A500's and A2000's. If you intend
+         to run Linux on any of these systems, say Y; otherwise say N.
+
+config FB_AMIGA_ECS
+       bool "Amiga ECS chipset support"
+       depends on FB_AMIGA
+       help
+         This enables support for the Enhanced Chip Set, found in later
+         A500's, later A2000's, the A600, the A3000, the A3000T and CDTV. If
+         you intend to run Linux on any of these systems, say Y; otherwise
+         say N.
+
+config FB_AMIGA_AGA
+       bool "Amiga AGA chipset support"
+       depends on FB_AMIGA
+       help
+         This enables support for the Advanced Graphics Architecture (also
+         known as the AGA or AA) Chip Set, found in the A1200, A4000, A4000T
+         and CD32. If you intend to run Linux on any of these systems, say Y;
+         otherwise say N.
+
+config FB_FM2
+       bool "Amiga FrameMaster II/Rainbow II support"
+       depends on (FB = y) && ZORRO
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for the Amiga FrameMaster
+         card from BSC (exhibited 1992 but not shipped as a CBM product).
+
+config FB_ARC
+       tristate "Arc Monochrome LCD board support"
+       depends on FB && X86
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       select FB_SYS_FOPS
+       help
+         This enables support for the Arc Monochrome LCD board. The board
+         is based on the KS-108 lcd controller and is typically a matrix
+         of 2*n chips. This driver was tested with a 128x64 panel. This
+         driver supports it for use with x86 SBCs through a 16 bit GPIO
+         interface (8 bit data, 8 bit control). If you anticipate using
+         this driver, say Y or M; otherwise say N. You must specify the
+         GPIO IO address to be used for setting control and data.
+
+config FB_ATARI
+       bool "Atari native chipset support"
+       depends on (FB = y) && ATARI
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for the builtin graphics
+         chipset found in Ataris.
+
+config FB_OF
+       bool "Open Firmware frame buffer device support"
+       depends on (FB = y) && (PPC64 || PPC_OF) && (!PPC_PSERIES || PCI)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_MACMODES
+       help
+         Say Y if you want support with Open Firmware for your graphics
+         board.
+
+config FB_CONTROL
+       bool "Apple \"control\" display support"
+       depends on (FB = y) && PPC_PMAC && PPC32
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_MACMODES
+       help
+         This driver supports a frame buffer for the graphics adapter in the
+         Power Macintosh 7300 and others.
+
+config FB_PLATINUM
+       bool "Apple \"platinum\" display support"
+       depends on (FB = y) && PPC_PMAC && PPC32
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_MACMODES
+       help
+         This driver supports a frame buffer for the "platinum" graphics
+         adapter in some Power Macintoshes.
+
+config FB_VALKYRIE
+       bool "Apple \"valkyrie\" display support"
+       depends on (FB = y) && (MAC || (PPC_PMAC && PPC32))
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_MACMODES
+       help
+         This driver supports a frame buffer for the "valkyrie" graphics
+         adapter in some Power Macintoshes.
+
+config FB_CT65550
+       bool "Chips 65550 display support"
+       depends on (FB = y) && PPC32 && PCI
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for the Chips & Technologies
+         65550 graphics chip in PowerBooks.
+
+config FB_ASILIANT
+       bool "Asiliant (Chips) 69000 display support"
+       depends on (FB = y) && PCI
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for the Asiliant 69030 chipset
+
+config FB_IMSTT
+       bool "IMS Twin Turbo display support"
+       depends on (FB = y) && PCI
+       select FB_CFB_IMAGEBLIT
+       select FB_MACMODES if PPC
+       help
+         The IMS Twin Turbo is a PCI-based frame buffer card bundled with
+         many Macintosh and compatible computers.
+
+config FB_VGA16
+       tristate "VGA 16-color graphics support"
+       depends on FB && (X86 || PPC)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select VGASTATE
+       select FONT_8x16 if FRAMEBUFFER_CONSOLE
+       help
+         This is the frame buffer device driver for VGA 16 color graphic
+         cards. Say Y if you have such a card.
+
+         To compile this driver as a module, choose M here: the
+         module will be called vga16fb.
+
+config FB_BF54X_LQ043
+       tristate "SHARP LQ043 TFT LCD (BF548 EZKIT)"
+       depends on FB && (BF54x) && !BF542
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+        This is the framebuffer device driver for a SHARP LQ043T1DG01 TFT LCD
+
+config FB_BFIN_T350MCQB
+       tristate "Varitronix COG-T350MCQB TFT LCD display (BF527 EZKIT)"
+       depends on FB && BLACKFIN
+       select BFIN_GPTIMERS
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+        This is the framebuffer device driver for a Varitronix VL-PS-COG-T350MCQB-01 display TFT LCD
+        This display is a QVGA 320x240 24-bit RGB display interfaced by an 8-bit wide PPI
+        It uses PPI[0..7] PPI_FS1, PPI_FS2 and PPI_CLK.
+
+config FB_BFIN_LQ035Q1
+       tristate "SHARP LQ035Q1DH02 TFT LCD"
+       depends on FB && BLACKFIN && SPI
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select BFIN_GPTIMERS
+       help
+         This is the framebuffer device driver for a SHARP LQ035Q1DH02 TFT display found on
+         the Blackfin Landscape LCD EZ-Extender Card.
+         This display is a QVGA 320x240 18-bit RGB display interfaced by an 16-bit wide PPI
+         It uses PPI[0..15] PPI_FS1, PPI_FS2 and PPI_CLK.
+
+         To compile this driver as a module, choose M here: the
+         module will be called bfin-lq035q1-fb.
+
+config FB_BF537_LQ035
+       tristate "SHARP LQ035 TFT LCD (BF537 STAMP)"
+       depends on FB && (BF534 || BF536 || BF537) && I2C_BLACKFIN_TWI
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select BFIN_GPTIMERS
+       help
+         This is the framebuffer device for a SHARP LQ035Q7DB03 TFT LCD
+         attached to a BF537.
+
+         To compile this driver as a module, choose M here: the
+         module will be called bf537-lq035.
+
+config FB_BFIN_7393
+       tristate "Blackfin ADV7393 Video encoder"
+       depends on FB && BLACKFIN
+       select I2C
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the framebuffer device for a ADV7393 video encoder
+         attached to a Blackfin on the PPI port.
+         If your Blackfin board has a ADV7393 select Y.
+
+         To compile this driver as a module, choose M here: the
+         module will be called bfin_adv7393fb.
+
+choice
+       prompt  "Video mode support"
+       depends on FB_BFIN_7393
+       default NTSC
+
+config NTSC
+       bool 'NTSC 720x480'
+
+config PAL
+       bool 'PAL 720x576'
+
+config NTSC_640x480
+       bool 'NTSC 640x480 (Experimental)'
+
+config PAL_640x480
+       bool 'PAL 640x480 (Experimental)'
+
+config NTSC_YCBCR
+       bool 'NTSC 720x480 YCbCR input'
+
+config PAL_YCBCR
+       bool 'PAL 720x576 YCbCR input'
+
+endchoice
+
+choice
+       prompt  "Size of ADV7393 frame buffer memory Single/Double Size"
+       depends on (FB_BFIN_7393)
+       default ADV7393_1XMEM
+
+config ADV7393_1XMEM
+       bool 'Single'
+
+config ADV7393_2XMEM
+       bool 'Double'
+endchoice
+
+config FB_STI
+       tristate "HP STI frame buffer device support"
+       depends on FB && PARISC
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select STI_CONSOLE
+       select VT
+       default y
+       ---help---
+         STI refers to the HP "Standard Text Interface" which is a set of
+         BIOS routines contained in a ROM chip in HP PA-RISC based machines.
+         Enabling this option will implement the linux framebuffer device
+         using calls to the STI BIOS routines for initialisation.
+       
+         If you enable this option, you will get a planar framebuffer device
+         /dev/fb which will work on the most common HP graphic cards of the
+         NGLE family, including the artist chips (in the 7xx and Bxxx series),
+         HCRX, HCRX24, CRX, CRX24 and VisEG series.
+
+         It is safe to enable this option, so you should probably say "Y".
+
+config FB_MAC
+       bool "Generic Macintosh display support"
+       depends on (FB = y) && MAC
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_MACMODES
+
+config FB_HP300
+       bool
+       depends on (FB = y) && DIO
+       select FB_CFB_IMAGEBLIT
+       default y
+
+config FB_TGA
+       tristate "TGA/SFB+ framebuffer support"
+       depends on FB && (ALPHA || TC)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select BITREVERSE
+       ---help---
+         This is the frame buffer device driver for generic TGA and SFB+
+         graphic cards.  These include DEC ZLXp-E1, -E2 and -E3 PCI cards,
+         also known as PBXGA-A, -B and -C, and DEC ZLX-E1, -E2 and -E3
+         TURBOchannel cards, also known as PMAGD-A, -B and -C.
+
+         Due to hardware limitations ZLX-E2 and E3 cards are not supported
+         for DECstation 5000/200 systems.  Additionally due to firmware
+         limitations these cards may cause troubles with booting DECstation
+         5000/240 and /260 systems, but are fully supported under Linux if
+         you manage to get it going. ;-)
+
+         Say Y if you have one of those.
+
+config FB_UVESA
+       tristate "Userspace VESA VGA graphics support"
+       depends on FB && CONNECTOR
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_MODE_HELPERS
+       help
+         This is the frame buffer driver for generic VBE 2.0 compliant
+         graphic cards. It can also take advantage of VBE 3.0 features,
+         such as refresh rate adjustment.
+
+         This driver generally provides more features than vesafb but
+         requires a userspace helper application called 'v86d'. See
+         <file:Documentation/fb/uvesafb.txt> for more information.
+
+         If unsure, say N.
+
+config FB_VESA
+       bool "VESA VGA graphics support"
+       depends on (FB = y) && X86
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_BOOT_VESA_SUPPORT
+       help
+         This is the frame buffer device driver for generic VESA 2.0
+         compliant graphic cards. The older VESA 1.2 cards are not supported.
+         You will get a boot time penguin logo at no additional cost. Please
+         read <file:Documentation/fb/vesafb.txt>. If unsure, say Y.
+
+config FB_EFI
+       bool "EFI-based Framebuffer Support"
+       depends on (FB = y) && X86 && EFI
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the EFI frame buffer device driver. If the firmware on
+         your platform is EFI 1.10 or UEFI 2.0, select Y to add support for
+         using the EFI framebuffer as your console.
+
+config FB_N411
+       tristate "N411 Apollo/Hecuba devkit support"
+       depends on FB && X86 && MMU
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       select FB_SYS_FOPS
+       select FB_DEFERRED_IO
+       select FB_HECUBA
+       help
+         This enables support for the Apollo display controller in its
+         Hecuba form using the n411 devkit.
+
+config FB_HGA
+       tristate "Hercules mono graphics support"
+       depends on FB && X86
+       help
+         Say Y here if you have a Hercules mono graphics card.
+
+         To compile this driver as a module, choose M here: the
+         module will be called hgafb.
+
+         As this card technology is at least 25 years old,
+         most people will answer N here.
+
+config FB_GBE
+       bool "SGI Graphics Backend frame buffer support"
+       depends on (FB = y) && SGI_IP32
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for SGI Graphics Backend.
+         This chip is used in SGI O2 and Visual Workstation 320/540.
+
+config FB_GBE_MEM
+       int "Video memory size in MB"
+       depends on FB_GBE
+       default 4
+       help
+         This is the amount of memory reserved for the framebuffer,
+         which can be any value between 1MB and 8MB.
+
+config FB_SBUS
+       bool "SBUS and UPA framebuffers"
+       depends on (FB = y) && SPARC
+       help
+         Say Y if you want support for SBUS or UPA based frame buffer device.
+
+config FB_BW2
+       bool "BWtwo support"
+       depends on (FB = y) && (SPARC && FB_SBUS)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for the BWtwo frame buffer.
+
+config FB_CG3
+       bool "CGthree support"
+       depends on (FB = y) && (SPARC && FB_SBUS)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for the CGthree frame buffer.
+
+config FB_CG6
+       bool "CGsix (GX,TurboGX) support"
+       depends on (FB = y) && (SPARC && FB_SBUS)
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for the CGsix (GX, TurboGX)
+         frame buffer.
+
+config FB_FFB
+       bool "Creator/Creator3D/Elite3D support"
+       depends on FB_SBUS && SPARC64
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for the Creator, Creator3D,
+         and Elite3D graphics boards.
+
+config FB_TCX
+       bool "TCX (SS4/SS5 only) support"
+       depends on FB_SBUS
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for the TCX 24/8bit frame
+         buffer.
+
+config FB_CG14
+       bool "CGfourteen (SX) support"
+       depends on FB_SBUS
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for the CGfourteen frame
+         buffer on Desktop SPARCsystems with the SX graphics option.
+
+config FB_P9100
+       bool "P9100 (Sparcbook 3 only) support"
+       depends on FB_SBUS
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for the P9100 card
+         supported on Sparcbook 3 machines.
+
+config FB_LEO
+       bool "Leo (ZX) support"
+       depends on FB_SBUS
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for the SBUS-based Sun ZX
+         (leo) frame buffer cards.
+
+config FB_IGA
+       bool "IGA 168x display support"
+       depends on (FB = y) && SPARC32
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the framebuffer device for the INTERGRAPHICS 1680 and
+         successor frame buffer cards.
+
+config FB_XVR500
+       bool "Sun XVR-500 3DLABS Wildcat support"
+       depends on (FB = y) && PCI && SPARC64
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the framebuffer device for the Sun XVR-500 and similar
+         graphics cards based upon the 3DLABS Wildcat chipset.  The driver
+         only works on sparc64 systems where the system firmware has
+         mostly initialized the card already.  It is treated as a
+         completely dumb framebuffer device.
+
+config FB_XVR2500
+       bool "Sun XVR-2500 3DLABS Wildcat support"
+       depends on (FB = y) && PCI && SPARC64
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the framebuffer device for the Sun XVR-2500 and similar
+         graphics cards based upon the 3DLABS Wildcat chipset.  The driver
+         only works on sparc64 systems where the system firmware has
+         mostly initialized the card already.  It is treated as a
+         completely dumb framebuffer device.
+
+config FB_XVR1000
+       bool "Sun XVR-1000 support"
+       depends on (FB = y) && SPARC64
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the framebuffer device for the Sun XVR-1000 and similar
+         graphics cards.  The driver only works on sparc64 systems where
+         the system firmware has mostly initialized the card already.  It
+         is treated as a completely dumb framebuffer device.
+
+config FB_PVR2
+       tristate "NEC PowerVR 2 display support"
+       depends on FB && SH_DREAMCAST
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         Say Y here if you have a PowerVR 2 card in your box.  If you plan to
+         run linux on your Dreamcast, you will have to say Y here.
+         This driver may or may not work on other PowerVR 2 cards, but is
+         totally untested.  Use at your own risk.  If unsure, say N.
+
+         To compile this driver as a module, choose M here: the
+         module will be called pvr2fb.
+
+         You can pass several parameters to the driver at boot time or at
+         module load time.  The parameters look like "video=pvr2:XXX", where
+         the meaning of XXX can be found at the end of the main source file
+         (<file:drivers/video/pvr2fb.c>). Please see the file
+         <file:Documentation/fb/pvr2fb.txt>.
+
+config FB_OPENCORES
+       tristate "OpenCores VGA/LCD core 2.0 framebuffer support"
+       depends on FB && HAS_DMA
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This enables support for the OpenCores VGA/LCD core.
+
+         The OpenCores VGA/LCD core is typically used together with
+         softcore CPUs (e.g. OpenRISC or Microblaze) or hard processor
+         systems (e.g. Altera socfpga or Xilinx Zynq) on FPGAs.
+
+         The source code and specification for the core is available at
+         <http://opencores.org/project,vga_lcd>
+
+config FB_S1D13XXX
+       tristate "Epson S1D13XXX framebuffer support"
+       depends on FB
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         Support for S1D13XXX framebuffer device family (currently only
+         working with S1D13806). Product specs at
+         <http://vdc.epson.com/>
+
+config FB_ATMEL
+       tristate "AT91/AT32 LCD Controller support"
+       depends on FB && HAVE_FB_ATMEL
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_MODE_HELPERS
+       select VIDEOMODE_HELPERS
+       help
+         This enables support for the AT91/AT32 LCD Controller.
+
+config FB_INTSRAM
+       bool "Frame Buffer in internal SRAM"
+       depends on FB_ATMEL && ARCH_AT91SAM9261
+       help
+         Say Y if you want to map Frame Buffer in internal SRAM. Say N if you want
+         to let frame buffer in external SDRAM.
+
+config FB_ATMEL_STN
+       bool "Use a STN display with AT91/AT32 LCD Controller"
+       depends on FB_ATMEL && (MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK)
+       default n
+       help
+         Say Y if you want to connect a STN LCD display to the AT91/AT32 LCD
+         Controller. Say N if you want to connect a TFT.
+
+         If unsure, say N.
+
+config FB_NVIDIA
+       tristate "nVidia Framebuffer Support"
+       depends on FB && PCI
+       select FB_BACKLIGHT if FB_NVIDIA_BACKLIGHT
+       select FB_MODE_HELPERS
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select BITREVERSE
+       select VGASTATE
+       help
+         This driver supports graphics boards with the nVidia chips, TNT
+         and newer. For very old chipsets, such as the RIVA128, then use
+         the rivafb.
+         Say Y if you have such a graphics board.
+
+         To compile this driver as a module, choose M here: the
+         module will be called nvidiafb.
+
+config FB_NVIDIA_I2C
+       bool "Enable DDC Support"
+       depends on FB_NVIDIA
+       select FB_DDC
+       help
+         This enables I2C support for nVidia Chipsets.  This is used
+         only for getting EDID information from the attached display
+         allowing for robust video mode handling and switching.
+
+         Because fbdev-2.6 requires that drivers must be able to
+         independently validate video mode parameters, you should say Y
+         here.
+
+config FB_NVIDIA_DEBUG
+       bool "Lots of debug output"
+       depends on FB_NVIDIA
+       default n
+       help
+         Say Y here if you want the nVidia driver to output all sorts
+         of debugging information to provide to the maintainer when
+         something goes wrong.
+
+config FB_NVIDIA_BACKLIGHT
+       bool "Support for backlight control"
+       depends on FB_NVIDIA
+       default y
+       help
+         Say Y here if you want to control the backlight of your display.
+
+config FB_RIVA
+       tristate "nVidia Riva support"
+       depends on FB && PCI
+       select FB_BACKLIGHT if FB_RIVA_BACKLIGHT
+       select FB_MODE_HELPERS
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select BITREVERSE
+       select VGASTATE
+       help
+         This driver supports graphics boards with the nVidia Riva/Geforce
+         chips.
+         Say Y if you have such a graphics board.
+
+         To compile this driver as a module, choose M here: the
+         module will be called rivafb.
+
+config FB_RIVA_I2C
+       bool "Enable DDC Support"
+       depends on FB_RIVA
+       select FB_DDC
+       help
+         This enables I2C support for nVidia Chipsets.  This is used
+         only for getting EDID information from the attached display
+         allowing for robust video mode handling and switching.
+
+         Because fbdev-2.6 requires that drivers must be able to
+         independently validate video mode parameters, you should say Y
+         here.
+
+config FB_RIVA_DEBUG
+       bool "Lots of debug output"
+       depends on FB_RIVA
+       default n
+       help
+         Say Y here if you want the Riva driver to output all sorts
+         of debugging information to provide to the maintainer when
+         something goes wrong.
+
+config FB_RIVA_BACKLIGHT
+       bool "Support for backlight control"
+       depends on FB_RIVA
+       default y
+       help
+         Say Y here if you want to control the backlight of your display.
+
+config FB_I740
+       tristate "Intel740 support"
+       depends on FB && PCI
+       select FB_MODE_HELPERS
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select VGASTATE
+       select FB_DDC
+       help
+         This driver supports graphics cards based on Intel740 chip.
+
+config FB_I810
+       tristate "Intel 810/815 support"
+       depends on FB && PCI && X86_32 && AGP_INTEL
+       select FB_MODE_HELPERS
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select VGASTATE
+       help
+         This driver supports the on-board graphics built in to the Intel 810 
+          and 815 chipsets.  Say Y if you have and plan to use such a board.
+
+          To compile this driver as a module, choose M here: the
+         module will be called i810fb.
+
+          For more information, please read 
+         <file:Documentation/fb/intel810.txt>
+
+config FB_I810_GTF
+       bool "use VESA Generalized Timing Formula"
+       depends on FB_I810
+       help
+         If you say Y, then the VESA standard, Generalized Timing Formula 
+          or GTF, will be used to calculate the required video timing values
+         per video mode.  Since the GTF allows nondiscrete timings 
+          (nondiscrete being a range of values as opposed to discrete being a
+          set of values), you'll be able to use any combination of horizontal 
+         and vertical resolutions, and vertical refresh rates without having
+         to specify your own timing parameters.  This is especially useful
+         to maximize the performance of an aging display, or if you just 
+          have a display with nonstandard dimensions. A VESA compliant 
+         monitor is recommended, but can still work with non-compliant ones.
+         If you need or want this, then select this option. The timings may 
+         not be compliant with Intel's recommended values. Use at your own 
+         risk.
+
+          If you say N, the driver will revert to discrete video timings 
+         using a set recommended by Intel in their documentation.
+  
+          If unsure, say N.
+
+config FB_I810_I2C
+       bool "Enable DDC Support"
+       depends on FB_I810 && FB_I810_GTF
+       select FB_DDC
+       help
+
+config FB_LE80578
+       tristate "Intel LE80578 (Vermilion) support"
+       depends on FB && PCI && X86
+       select FB_MODE_HELPERS
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This driver supports the LE80578 (Vermilion Range) chipset
+
+config FB_CARILLO_RANCH
+       tristate "Intel Carillo Ranch support"
+       depends on FB_LE80578 && FB && PCI && X86
+       help
+         This driver supports the LE80578 (Carillo Ranch) board
+
+config FB_INTEL
+       tristate "Intel 830M/845G/852GM/855GM/865G/915G/945G/945GM/965G/965GM support"
+       depends on FB && PCI && X86 && AGP_INTEL && EXPERT
+       select FB_MODE_HELPERS
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_BOOT_VESA_SUPPORT if FB_INTEL = y
+       depends on !DRM_I915
+       help
+         This driver supports the on-board graphics built in to the Intel
+          830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM/965G/965GM chipsets.
+          Say Y if you have and plan to use such a board.
+
+         To make FB_INTELFB=Y work you need to say AGP_INTEL=y too.
+
+         To compile this driver as a module, choose M here: the
+         module will be called intelfb.
+
+         For more information, please read <file:Documentation/fb/intelfb.txt>
+
+config FB_INTEL_DEBUG
+       bool "Intel driver Debug Messages"
+       depends on FB_INTEL
+       ---help---
+         Say Y here if you want the Intel driver to output all sorts
+         of debugging information to provide to the maintainer when
+         something goes wrong.
+
+config FB_INTEL_I2C
+       bool "DDC/I2C for Intel framebuffer support"
+       depends on FB_INTEL
+       select FB_DDC
+       default y
+       help
+         Say Y here if you want DDC/I2C support for your on-board Intel graphics.
+
+config FB_MATROX
+       tristate "Matrox acceleration"
+       depends on FB && PCI
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_TILEBLITTING
+       select FB_MACMODES if PPC_PMAC
+       ---help---
+         Say Y here if you have a Matrox Millennium, Matrox Millennium II,
+         Matrox Mystique, Matrox Mystique 220, Matrox Productiva G100, Matrox
+         Mystique G200, Matrox Millennium G200, Matrox Marvel G200 video,
+         Matrox G400, G450 or G550 card in your box.
+
+         To compile this driver as a module, choose M here: the
+         module will be called matroxfb.
+
+         You can pass several parameters to the driver at boot time or at
+         module load time. The parameters look like "video=matroxfb:XXX", and
+         are described in <file:Documentation/fb/matroxfb.txt>.
+
+config FB_MATROX_MILLENIUM
+       bool "Millennium I/II support"
+       depends on FB_MATROX
+       help
+         Say Y here if you have a Matrox Millennium or Matrox Millennium II
+         video card. If you select "Advanced lowlevel driver options" below,
+         you should check 4 bpp packed pixel, 8 bpp packed pixel, 16 bpp
+         packed pixel, 24 bpp packed pixel and 32 bpp packed pixel. You can
+         also use font widths different from 8.
+
+config FB_MATROX_MYSTIQUE
+       bool "Mystique support"
+       depends on FB_MATROX
+       help
+         Say Y here if you have a Matrox Mystique or Matrox Mystique 220
+         video card. If you select "Advanced lowlevel driver options" below,
+         you should check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp
+         packed pixel and 32 bpp packed pixel. You can also use font widths
+         different from 8.
+
+config FB_MATROX_G
+       bool "G100/G200/G400/G450/G550 support"
+       depends on FB_MATROX
+       ---help---
+         Say Y here if you have a Matrox G100, G200, G400, G450 or G550 based
+         video card. If you select "Advanced lowlevel driver options", you
+         should check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp packed
+         pixel and 32 bpp packed pixel. You can also use font widths
+         different from 8.
+
+         If you need support for G400 secondary head, you must say Y to
+         "Matrox I2C support" and "G400 second head support" right below.
+         G450/G550 secondary head and digital output are supported without
+         additional modules.
+
+         The driver starts in monitor mode. You must use the matroxset tool 
+         (available at <ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/>) to 
+         swap primary and secondary head outputs, or to change output mode.  
+         Secondary head driver always start in 640x480 resolution and you 
+         must use fbset to change it.
+
+         Do not forget that second head supports only 16 and 32 bpp
+         packed pixels, so it is a good idea to compile them into the kernel
+         too. You can use only some font widths, as the driver uses generic
+         painting procedures (the secondary head does not use acceleration
+         engine).
+
+         G450/G550 hardware can display TV picture only from secondary CRTC,
+         and it performs no scaling, so picture must have 525 or 625 lines.
+
+config FB_MATROX_I2C
+       tristate "Matrox I2C support"
+       depends on FB_MATROX
+       select FB_DDC
+       ---help---
+         This drivers creates I2C buses which are needed for accessing the
+         DDC (I2C) bus present on all Matroxes, an I2C bus which
+         interconnects Matrox optional devices, like MGA-TVO on G200 and
+         G400, and the secondary head DDC bus, present on G400 only.
+
+         You can say Y or M here if you want to experiment with monitor
+         detection code. You must say Y or M here if you want to use either
+         second head of G400 or MGA-TVO on G200 or G400.
+
+         If you compile it as module, it will create a module named
+         i2c-matroxfb.
+
+config FB_MATROX_MAVEN
+       tristate "G400 second head support"
+       depends on FB_MATROX_G && FB_MATROX_I2C
+       ---help---
+         WARNING !!! This support does not work with G450 !!!
+
+         Say Y or M here if you want to use a secondary head (meaning two
+         monitors in parallel) on G400 or MGA-TVO add-on on G200. Secondary
+         head is not compatible with accelerated XFree 3.3.x SVGA servers -
+         secondary head output is blanked while you are in X. With XFree
+         3.9.17 preview you can use both heads if you use SVGA over fbdev or
+         the fbdev driver on first head and the fbdev driver on second head.
+
+         If you compile it as module, two modules are created,
+         matroxfb_crtc2 and matroxfb_maven. Matroxfb_maven is needed for
+         both G200 and G400, matroxfb_crtc2 is needed only by G400. You must
+         also load i2c-matroxfb to get it to run.
+
+         The driver starts in monitor mode and you must use the matroxset
+         tool (available at
+         <ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/>) to switch it to
+         PAL or NTSC or to swap primary and secondary head outputs.
+         Secondary head driver also always start in 640x480 resolution, you
+         must use fbset to change it.
+
+         Also do not forget that second head supports only 16 and 32 bpp
+         packed pixels, so it is a good idea to compile them into the kernel
+         too.  You can use only some font widths, as the driver uses generic
+         painting procedures (the secondary head does not use acceleration
+         engine).
+
+config FB_RADEON
+       tristate "ATI Radeon display support"
+       depends on FB && PCI
+       select FB_BACKLIGHT if FB_RADEON_BACKLIGHT
+       select FB_MODE_HELPERS
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_MACMODES if PPC_OF
+       help
+         Choose this option if you want to use an ATI Radeon graphics card as
+         a framebuffer device.  There are both PCI and AGP versions.  You
+         don't need to choose this to run the Radeon in plain VGA mode.
+
+         There is a product page at
+         http://products.amd.com/en-us/GraphicCardResult.aspx
+
+config FB_RADEON_I2C
+       bool "DDC/I2C for ATI Radeon support"
+       depends on FB_RADEON
+       select FB_DDC
+       default y
+       help
+         Say Y here if you want DDC/I2C support for your Radeon board. 
+
+config FB_RADEON_BACKLIGHT
+       bool "Support for backlight control"
+       depends on FB_RADEON
+       default y
+       help
+         Say Y here if you want to control the backlight of your display.
+
+config FB_RADEON_DEBUG
+       bool "Lots of debug output from Radeon driver"
+       depends on FB_RADEON
+       default n
+       help
+         Say Y here if you want the Radeon driver to output all sorts
+         of debugging information to provide to the maintainer when
+         something goes wrong.
+
+config FB_ATY128
+       tristate "ATI Rage128 display support"
+       depends on FB && PCI
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_BACKLIGHT if FB_ATY128_BACKLIGHT
+       select FB_MACMODES if PPC_PMAC
+       help
+         This driver supports graphics boards with the ATI Rage128 chips.
+         Say Y if you have such a graphics board and read
+         <file:Documentation/fb/aty128fb.txt>.
+
+         To compile this driver as a module, choose M here: the
+         module will be called aty128fb.
+
+config FB_ATY128_BACKLIGHT
+       bool "Support for backlight control"
+       depends on FB_ATY128
+       default y
+       help
+         Say Y here if you want to control the backlight of your display.
+
+config FB_ATY
+       tristate "ATI Mach64 display support" if PCI || ATARI
+       depends on FB && !SPARC32
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_BACKLIGHT if FB_ATY_BACKLIGHT
+       select FB_MACMODES if PPC
+       help
+         This driver supports graphics boards with the ATI Mach64 chips.
+         Say Y if you have such a graphics board.
+
+         To compile this driver as a module, choose M here: the
+         module will be called atyfb.
+
+config FB_ATY_CT
+       bool "Mach64 CT/VT/GT/LT (incl. 3D RAGE) support"
+       depends on PCI && FB_ATY
+       default y if SPARC64 && PCI
+       help
+         Say Y here to support use of ATI's 64-bit Rage boards (or other
+         boards based on the Mach64 CT, VT, GT, and LT chipsets) as a
+         framebuffer device.  The ATI product support page for these boards
+         is at <http://support.ati.com/products/pc/mach64/mach64.html>.
+
+config FB_ATY_GENERIC_LCD
+       bool "Mach64 generic LCD support"
+       depends on FB_ATY_CT
+       help
+         Say Y if you have a laptop with an ATI Rage LT PRO, Rage Mobility,
+         Rage XC, or Rage XL chipset.
+
+config FB_ATY_GX
+       bool "Mach64 GX support" if PCI
+       depends on FB_ATY
+       default y if ATARI
+       help
+         Say Y here to support use of the ATI Mach64 Graphics Expression
+         board (or other boards based on the Mach64 GX chipset) as a
+         framebuffer device.  The ATI product support page for these boards
+         is at
+         <http://support.ati.com/products/pc/mach64/graphics_xpression.html>.
+
+config FB_ATY_BACKLIGHT
+       bool "Support for backlight control"
+       depends on FB_ATY
+       default y
+       help
+         Say Y here if you want to control the backlight of your display.
+
+config FB_S3
+       tristate "S3 Trio/Virge support"
+       depends on FB && PCI
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_TILEBLITTING
+       select FB_SVGALIB
+       select VGASTATE
+       select FONT_8x16 if FRAMEBUFFER_CONSOLE
+       ---help---
+         Driver for graphics boards with S3 Trio / S3 Virge chip.
+
+config FB_S3_DDC
+       bool "DDC for S3 support"
+       depends on FB_S3
+       select FB_DDC
+       default y
+       help
+         Say Y here if you want DDC support for your S3 graphics card.
+
+config FB_SAVAGE
+       tristate "S3 Savage support"
+       depends on FB && PCI
+       select FB_MODE_HELPERS
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select VGASTATE
+       help
+         This driver supports notebooks and computers with S3 Savage PCI/AGP
+         chips.
+
+         Say Y if you have such a graphics card.
+
+         To compile this driver as a module, choose M here; the module
+         will be called savagefb.
+
+config FB_SAVAGE_I2C
+       bool "Enable DDC2 Support"
+       depends on FB_SAVAGE
+       select FB_DDC
+       help
+         This enables I2C support for S3 Savage Chipsets.  This is used
+         only for getting EDID information from the attached display
+         allowing for robust video mode handling and switching.
+
+         Because fbdev-2.6 requires that drivers must be able to
+         independently validate video mode parameters, you should say Y
+         here.
+
+config FB_SAVAGE_ACCEL
+       bool "Enable Console Acceleration"
+       depends on FB_SAVAGE
+       default n
+       help
+          This option will compile in console acceleration support. If
+          the resulting framebuffer console has bothersome glitches, then
+          choose N here.
+
+config FB_SIS
+       tristate "SiS/XGI display support"
+       depends on FB && PCI
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_BOOT_VESA_SUPPORT if FB_SIS = y
+       help
+         This is the frame buffer device driver for the SiS 300, 315, 330
+         and 340 series as well as XGI V3XT, V5, V8, Z7 graphics chipsets.
+         Specs available at <http://www.sis.com> and <http://www.xgitech.com>.
+
+         To compile this driver as a module, choose M here; the module
+         will be called sisfb.
+
+config FB_SIS_300
+       bool "SiS 300 series support"
+       depends on FB_SIS
+       help
+         Say Y here to support use of the SiS 300/305, 540, 630 and 730.
+
+config FB_SIS_315
+       bool "SiS 315/330/340 series and XGI support"
+       depends on FB_SIS
+       help
+         Say Y here to support use of the SiS 315, 330 and 340 series
+         (315/H/PRO, 55x, 650, 651, 740, 330, 661, 741, 760, 761) as well
+         as XGI V3XT, V5, V8 and Z7.
+
+config FB_VIA
+       tristate "VIA UniChrome (Pro) and Chrome9 display support"
+       depends on FB && PCI && X86
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select I2C_ALGOBIT
+       select I2C
+       select GPIOLIB
+       help
+         This is the frame buffer device driver for Graphics chips of VIA
+         UniChrome (Pro) Family (CLE266,PM800/CN400,P4M800CE/P4M800Pro/
+         CN700/VN800,CX700/VX700,P4M890) and Chrome9 Family (K8M890,CN896
+         /P4M900,VX800)
+         Say Y if you have a VIA UniChrome graphics board.
+
+         To compile this driver as a module, choose M here: the
+         module will be called viafb.
+
+if FB_VIA
+
+config FB_VIA_DIRECT_PROCFS
+       bool "direct hardware access via procfs (DEPRECATED)(DANGEROUS)"
+       depends on FB_VIA
+       default n
+       help
+         Allow direct hardware access to some output registers via procfs.
+         This is dangerous but may provide the only chance to get the
+         correct output device configuration.
+         Its use is strongly discouraged.
+
+config FB_VIA_X_COMPATIBILITY
+       bool "X server compatibility"
+       depends on FB_VIA
+       default n
+       help
+         This option reduces the functionality (power saving, ...) of the
+         framebuffer to avoid negative impact on the OpenChrome X server.
+         If you use any X server other than fbdev you should enable this
+         otherwise it should be safe to disable it and allow using all
+         features.
+
+endif
+
+config FB_NEOMAGIC
+       tristate "NeoMagic display support"
+       depends on FB && PCI
+       select FB_MODE_HELPERS
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select VGASTATE
+       help
+         This driver supports notebooks with NeoMagic PCI chips.
+         Say Y if you have such a graphics card. 
+
+         To compile this driver as a module, choose M here: the
+         module will be called neofb.
+
+config FB_KYRO
+       tristate "IMG Kyro support"
+       depends on FB && PCI
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         Say Y here if you have a STG4000 / Kyro / PowerVR 3 based
+         graphics board.
+
+         To compile this driver as a module, choose M here: the
+         module will be called kyrofb.
+
+config FB_3DFX
+       tristate "3Dfx Banshee/Voodoo3/Voodoo5 display support"
+       depends on FB && PCI
+       select FB_CFB_IMAGEBLIT
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_MODE_HELPERS
+       help
+         This driver supports graphics boards with the 3Dfx Banshee,
+         Voodoo3 or VSA-100 (aka Voodoo4/5) chips. Say Y if you have
+         such a graphics board.
+
+         To compile this driver as a module, choose M here: the
+         module will be called tdfxfb.
+
+config FB_3DFX_ACCEL
+       bool "3Dfx Acceleration functions"
+       depends on FB_3DFX
+       ---help---
+       This will compile the 3Dfx Banshee/Voodoo3/VSA-100 frame buffer
+       device driver with acceleration functions.
+
+config FB_3DFX_I2C
+       bool "Enable DDC/I2C support"
+       depends on FB_3DFX
+       select FB_DDC
+       default y
+       help
+         Say Y here if you want DDC/I2C support for your 3dfx Voodoo3.
+
+config FB_VOODOO1
+       tristate "3Dfx Voodoo Graphics (sst1) support"
+       depends on FB && PCI
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         Say Y here if you have a 3Dfx Voodoo Graphics (Voodoo1/sst1) or 
+         Voodoo2 (cvg) based graphics card.
+
+         To compile this driver as a module, choose M here: the
+         module will be called sstfb.
+
+         WARNING: Do not use any application that uses the 3D engine
+         (namely glide) while using this driver.
+         Please read the <file:Documentation/fb/sstfb.txt> for supported
+         options and other important info  support.
+
+config FB_VT8623
+       tristate "VIA VT8623 support"
+       depends on FB && PCI
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_TILEBLITTING
+       select FB_SVGALIB
+       select VGASTATE
+       select FONT_8x16 if FRAMEBUFFER_CONSOLE
+       ---help---
+         Driver for CastleRock integrated graphics core in the
+         VIA VT8623 [Apollo CLE266] chipset.
+
+config FB_TRIDENT
+       tristate "Trident/CyberXXX/CyberBlade support"
+       depends on FB && PCI
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         This is the frame buffer device driver for Trident PCI/AGP chipsets.
+         Supported chipset families are TGUI 9440/96XX, 3DImage, Blade3D
+         and Blade XP.
+         There are also integrated versions of these chips called CyberXXXX,
+         CyberImage or CyberBlade. These chips are mostly found in laptops
+         but also on some motherboards including early VIA EPIA motherboards.
+         For more information, read <file:Documentation/fb/tridentfb.txt>
+
+         Say Y if you have such a graphics board.
+
+         To compile this driver as a module, choose M here: the
+         module will be called tridentfb.
+
+config FB_ARK
+       tristate "ARK 2000PV support"
+       depends on FB && PCI
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_TILEBLITTING
+       select FB_SVGALIB
+       select VGASTATE
+       select FONT_8x16 if FRAMEBUFFER_CONSOLE
+       ---help---
+         Driver for PCI graphics boards with ARK 2000PV chip
+         and ICS 5342 RAMDAC.
+
+config FB_PM3
+       tristate "Permedia3 support"
+       depends on FB && PCI
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for the 3DLabs Permedia3
+         chipset, used in Formac ProFormance III, 3DLabs Oxygen VX1 &
+         similar boards, 3DLabs Permedia3 Create!, Appian Jeronimo 2000
+         and maybe other boards.
+
+config FB_CARMINE
+       tristate "Fujitsu carmine frame buffer support"
+       depends on FB && PCI
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for the Fujitsu Carmine chip.
+         The driver provides two independent frame buffer devices.
+
+choice
+       depends on FB_CARMINE
+       prompt "DRAM timing"
+       default FB_CARMINE_DRAM_EVAL
+
+config FB_CARMINE_DRAM_EVAL
+       bool "Eval board timings"
+       help
+         Use timings which work on the eval card.
+
+config CARMINE_DRAM_CUSTOM
+       bool "Custom board timings"
+       help
+         Use custom board timings.
+endchoice
+
+config FB_AU1100
+       bool "Au1100 LCD Driver"
+       depends on (FB = y) && MIPS_ALCHEMY
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the framebuffer driver for the AMD Au1100 SOC.  It can drive
+         various panels and CRTs by passing in kernel cmd line option
+         au1100fb:panel=<name>.
+
+config FB_AU1200
+       bool "Au1200/Au1300 LCD Driver"
+       depends on (FB = y) && MIPS_ALCHEMY
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       select FB_SYS_FOPS
+       help
+         This is the framebuffer driver for the Au1200/Au1300 SOCs.
+         It can drive various panels and CRTs by passing in kernel cmd line
+         option au1200fb:panel=<name>.
+
+config FB_VT8500
+       bool "VIA VT8500 framebuffer support"
+       depends on (FB = y) && ARM && ARCH_VT8500
+       select FB_SYS_FILLRECT if (!FB_WMT_GE_ROPS)
+       select FB_SYS_COPYAREA if (!FB_WMT_GE_ROPS)
+       select FB_SYS_IMAGEBLIT
+       select FB_MODE_HELPERS
+       select VIDEOMODE_HELPERS
+       help
+         This is the framebuffer driver for VIA VT8500 integrated LCD
+         controller.
+
+config FB_WM8505
+       bool "Wondermedia WM8xxx-series frame buffer support"
+       depends on (FB = y) && ARM && ARCH_VT8500
+       select FB_SYS_FILLRECT if (!FB_WMT_GE_ROPS)
+       select FB_SYS_COPYAREA if (!FB_WMT_GE_ROPS)
+       select FB_SYS_IMAGEBLIT
+       select FB_MODE_HELPERS
+       select VIDEOMODE_HELPERS
+       help
+         This is the framebuffer driver for WonderMedia WM8xxx-series
+         integrated LCD controller. This driver covers the WM8505, WM8650
+         and WM8850 SoCs.
+
+config FB_WMT_GE_ROPS
+       bool "VT8500/WM8xxx accelerated raster ops support"
+       depends on (FB = y) && (FB_VT8500 || FB_WM8505)
+       default n
+       help
+         This adds support for accelerated raster operations on the
+         VIA VT8500 and Wondermedia 85xx series SoCs.
+
+source "drivers/video/fbdev/geode/Kconfig"
+
+config FB_HIT
+       tristate "HD64461 Frame Buffer support"
+       depends on FB && HD64461
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This is the frame buffer device driver for the Hitachi HD64461 LCD
+         frame buffer card.
+
+config FB_PMAG_AA
+       bool "PMAG-AA TURBOchannel framebuffer support"
+       depends on (FB = y) && TC
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         Support for the PMAG-AA TURBOchannel framebuffer card (1280x1024x1)
+         used mainly in the MIPS-based DECstation series.
+
+config FB_PMAG_BA
+       tristate "PMAG-BA TURBOchannel framebuffer support"
+       depends on FB && TC
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         Support for the PMAG-BA TURBOchannel framebuffer card (1024x864x8)
+         used mainly in the MIPS-based DECstation series.
+
+config FB_PMAGB_B
+       tristate "PMAGB-B TURBOchannel framebuffer support"
+       depends on FB && TC
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         Support for the PMAGB-B TURBOchannel framebuffer card used mainly
+         in the MIPS-based DECstation series. The card is currently only
+         supported in 1280x1024x8 mode.
+
+config FB_MAXINE
+       bool "Maxine (Personal DECstation) onboard framebuffer support"
+       depends on (FB = y) && MACH_DECSTATION
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         Support for the onboard framebuffer (1024x768x8) in the Personal
+         DECstation series (Personal DECstation 5000/20, /25, /33, /50,
+         Codename "Maxine").
+
+config FB_G364
+       bool "G364 frame buffer support"
+       depends on (FB = y) && (MIPS_MAGNUM_4000 || OLIVETTI_M700)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         The G364 driver is the framebuffer used in MIPS Magnum 4000 and
+         Olivetti M700-10 systems.
+
+config FB_68328
+       bool "Motorola 68328 native frame buffer support"
+       depends on (FB = y) && (M68328 || M68EZ328 || M68VZ328)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         Say Y here if you want to support the built-in frame buffer of
+         the Motorola 68328 CPU family.
+
+config FB_PXA168
+       tristate "PXA168/910 LCD framebuffer support"
+       depends on FB && (CPU_PXA168 || CPU_PXA910)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         Frame buffer driver for the built-in LCD controller in the Marvell
+         MMP processor.
+
+config FB_PXA
+       tristate "PXA LCD framebuffer support"
+       depends on FB && ARCH_PXA
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         Frame buffer driver for the built-in LCD controller in the Intel
+         PXA2x0 processor.
+
+         This driver is also available as a module ( = code which can be
+         inserted and removed from the running kernel whenever you want). The
+         module will be called pxafb. If you want to compile it as a module,
+         say M here and read <file:Documentation/kbuild/modules.txt>.
+
+         If unsure, say N.
+
+config FB_PXA_OVERLAY
+       bool "Support PXA27x/PXA3xx Overlay(s) as framebuffer"
+       default n
+       depends on FB_PXA && (PXA27x || PXA3xx)
+
+config FB_PXA_SMARTPANEL
+       bool "PXA Smartpanel LCD support"
+       default n
+       depends on FB_PXA
+
+config FB_PXA_PARAMETERS
+       bool "PXA LCD command line parameters"
+       default n
+       depends on FB_PXA
+       ---help---
+         Enable the use of kernel command line or module parameters
+         to configure the physical properties of the LCD panel when
+         using the PXA LCD driver.
+
+         This option allows you to override the panel parameters
+         supplied by the platform in order to support multiple
+         different models of flatpanel. If you will only be using a
+         single model of flatpanel then you can safely leave this
+         option disabled.
+
+         <file:Documentation/fb/pxafb.txt> describes the available parameters.
+
+config PXA3XX_GCU
+       tristate "PXA3xx 2D graphics accelerator driver"
+       depends on FB_PXA
+       help
+         Kernelspace driver for the 2D graphics controller unit (GCU)
+         found on PXA3xx processors. There is a counterpart driver in the
+         DirectFB suite, see http://www.directfb.org/
+
+         If you compile this as a module, it will be called pxa3xx_gcu.
+
+config FB_MBX
+       tristate "2700G LCD framebuffer support"
+       depends on FB && ARCH_PXA
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         Framebuffer driver for the Intel 2700G (Marathon) Graphics
+         Accelerator
+
+config FB_MBX_DEBUG
+       bool "Enable debugging info via debugfs"
+       depends on FB_MBX && DEBUG_FS
+       default n
+       ---help---
+         Enable this if you want debugging information using the debug
+         filesystem (debugfs)
+
+         If unsure, say N.
+
+config FB_FSL_DIU
+       tristate "Freescale DIU framebuffer support"
+       depends on FB && FSL_SOC
+       select FB_MODE_HELPERS
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select PPC_LIB_RHEAP
+       ---help---
+         Framebuffer driver for the Freescale SoC DIU
+
+config FB_W100
+       tristate "W100 frame buffer support"
+       depends on FB && ARCH_PXA
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         Frame buffer driver for the w100 as found on the Sharp SL-Cxx series.
+         It can also drive the w3220 chip found on iPAQ hx4700.
+
+         This driver is also available as a module ( = code which can be
+         inserted and removed from the running kernel whenever you want). The
+         module will be called w100fb. If you want to compile it as a module,
+         say M here and read <file:Documentation/kbuild/modules.txt>.
+
+         If unsure, say N.
+
+config FB_SH_MOBILE_LCDC
+       tristate "SuperH Mobile LCDC framebuffer support"
+       depends on FB && (SUPERH || ARCH_SHMOBILE) && HAVE_CLK
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       select FB_SYS_FOPS
+       select FB_DEFERRED_IO
+       select FB_BACKLIGHT
+       select SH_MIPI_DSI if SH_LCD_MIPI_DSI
+       ---help---
+         Frame buffer driver for the on-chip SH-Mobile LCD controller.
+
+config FB_SH_MOBILE_HDMI
+       tristate "SuperH Mobile HDMI controller support"
+       depends on FB_SH_MOBILE_LCDC
+       select FB_MODE_HELPERS
+       select SOUND
+       select SND
+       select SND_SOC
+       ---help---
+         Driver for the on-chip SH-Mobile HDMI controller.
+
+config FB_TMIO
+       tristate "Toshiba Mobile IO FrameBuffer support"
+       depends on FB && MFD_CORE
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         Frame buffer driver for the Toshiba Mobile IO integrated as found
+         on the Sharp SL-6000 series
+
+         This driver is also available as a module ( = code which can be
+         inserted and removed from the running kernel whenever you want). The
+         module will be called tmiofb. If you want to compile it as a module,
+         say M here and read <file:Documentation/kbuild/modules.txt>.
+
+         If unsure, say N.
+
+config FB_TMIO_ACCELL
+       bool "tmiofb acceleration"
+       depends on FB_TMIO
+       default y
+
+config FB_S3C
+       tristate "Samsung S3C framebuffer support"
+       depends on FB && (CPU_S3C2416 || ARCH_S3C64XX || ARCH_S5P64X0 || \
+               ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         Frame buffer driver for the built-in FB controller in the Samsung
+         SoC line from the S3C2443 onwards, including the S3C2416, S3C2450,
+         and the S3C64XX series such as the S3C6400 and S3C6410.
+
+         These chips all have the same basic framebuffer design with the
+         actual capabilities depending on the chip. For instance the S3C6400
+         and S3C6410 support 4 hardware windows whereas the S3C24XX series
+         currently only have two.
+
+         Currently the support is only for the S3C6400 and S3C6410 SoCs.
+
+config FB_S3C_DEBUG_REGWRITE
+       bool "Debug register writes"
+       depends on FB_S3C
+       ---help---
+         Show all register writes via pr_debug()
+
+config FB_S3C2410
+       tristate "S3C2410 LCD framebuffer support"
+       depends on FB && ARCH_S3C24XX
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         Frame buffer driver for the built-in LCD controller in the Samsung
+         S3C2410 processor.
+
+         This driver is also available as a module ( = code which can be
+         inserted and removed from the running kernel whenever you want). The
+         module will be called s3c2410fb. If you want to compile it as a module,
+         say M here and read <file:Documentation/kbuild/modules.txt>.
+
+         If unsure, say N.
+config FB_S3C2410_DEBUG
+       bool "S3C2410 lcd debug messages"
+       depends on FB_S3C2410
+       help
+         Turn on debugging messages. Note that you can set/unset at run time
+         through sysfs
+
+config FB_NUC900
+        bool "NUC900 LCD framebuffer support"
+        depends on FB && ARCH_W90X900
+        select FB_CFB_FILLRECT
+        select FB_CFB_COPYAREA
+        select FB_CFB_IMAGEBLIT
+        ---help---
+          Frame buffer driver for the built-in LCD controller in the Nuvoton
+          NUC900 processor
+
+config GPM1040A0_320X240
+        bool "Giantplus Technology GPM1040A0 320x240 Color TFT LCD"
+        depends on FB_NUC900
+
+config FB_SM501
+       tristate "Silicon Motion SM501 framebuffer support"
+       depends on FB && MFD_SM501
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         Frame buffer driver for the CRT and LCD controllers in the Silicon
+         Motion SM501.
+
+         This driver is also available as a module ( = code which can be
+         inserted and removed from the running kernel whenever you want). The
+         module will be called sm501fb. If you want to compile it as a module,
+         say M here and read <file:Documentation/kbuild/modules.txt>.
+
+         If unsure, say N.
+
+config FB_SMSCUFX
+       tristate "SMSC UFX6000/7000 USB Framebuffer support"
+       depends on FB && USB
+       select FB_MODE_HELPERS
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       select FB_SYS_FOPS
+       select FB_DEFERRED_IO
+       ---help---
+         This is a kernel framebuffer driver for SMSC UFX USB devices.
+         Supports fbdev clients like xf86-video-fbdev, kdrive, fbi, and
+         mplayer -vo fbdev. Supports both UFX6000 (USB 2.0) and UFX7000
+         (USB 3.0) devices.
+         To compile as a module, choose M here: the module name is smscufx.
+
+config FB_UDL
+       tristate "Displaylink USB Framebuffer support"
+       depends on FB && USB
+       select FB_MODE_HELPERS
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       select FB_SYS_FOPS
+       select FB_DEFERRED_IO
+       ---help---
+         This is a kernel framebuffer driver for DisplayLink USB devices.
+         Supports fbdev clients like xf86-video-fbdev, kdrive, fbi, and
+         mplayer -vo fbdev. Supports all USB 2.0 era DisplayLink devices.
+         To compile as a module, choose M here: the module name is udlfb.
+
+config FB_IBM_GXT4500
+       tristate "Framebuffer support for IBM GXT4000P/4500P/6000P/6500P adaptors"
+       depends on FB && PPC
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         Say Y here to enable support for the IBM GXT4000P/6000P and
+         GXT4500P/6500P display adaptor based on Raster Engine RC1000,
+         found on some IBM System P (pSeries) machines. This driver
+         doesn't use Geometry Engine GT1000.
+
+config FB_PS3
+       tristate "PS3 GPU framebuffer driver"
+       depends on FB && PS3_PS3AV
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       select FB_SYS_FOPS
+       select VT_HW_CONSOLE_BINDING if FRAMEBUFFER_CONSOLE
+       ---help---
+         Include support for the virtual frame buffer in the PS3 platform.
+
+config FB_PS3_DEFAULT_SIZE_M
+       int "PS3 default frame buffer size (in MiB)"
+       depends on FB_PS3
+       default 9
+       ---help---
+         This is the default size (in MiB) of the virtual frame buffer in
+         the PS3.
+         The default value can be overridden on the kernel command line
+         using the "ps3fb" option (e.g. "ps3fb=9M");
+
+config FB_XILINX
+       tristate "Xilinx frame buffer support"
+       depends on FB && (XILINX_VIRTEX || MICROBLAZE || ARCH_ZYNQ)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         Include support for the Xilinx ML300/ML403 reference design
+         framebuffer. ML300 carries a 640*480 LCD display on the board,
+         ML403 uses a standard DB15 VGA connector.
+
+config FB_GOLDFISH
+       tristate "Goldfish Framebuffer"
+       depends on FB && HAS_DMA
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         Framebuffer driver for Goldfish Virtual Platform
+
+config FB_COBALT
+       tristate "Cobalt server LCD frame buffer support"
+       depends on FB && (MIPS_COBALT || MIPS_SEAD3)
+
+config FB_SH7760
+       bool "SH7760/SH7763/SH7720/SH7721 LCDC support"
+       depends on FB && (CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7763 \
+               || CPU_SUBTYPE_SH7720 || CPU_SUBTYPE_SH7721)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         Support for the SH7760/SH7763/SH7720/SH7721 integrated
+         (D)STN/TFT LCD Controller.
+         Supports display resolutions up to 1024x1024 pixel, grayscale and
+         color operation, with depths ranging from 1 bpp to 8 bpp monochrome
+         and 8, 15 or 16 bpp color; 90 degrees clockwise display rotation for
+         panels <= 320 pixel horizontal resolution.
+
+config FB_DA8XX
+       tristate "DA8xx/OMAP-L1xx/AM335x Framebuffer support"
+       depends on FB && (ARCH_DAVINCI_DA8XX || SOC_AM33XX)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_CFB_REV_PIXELS_IN_BYTE
+       select FB_MODE_HELPERS
+       select VIDEOMODE_HELPERS
+       ---help---
+         This is the frame buffer device driver for the TI LCD controller
+         found on DA8xx/OMAP-L1xx/AM335x SoCs.
+         If unsure, say N.
+
+config FB_VIRTUAL
+       tristate "Virtual Frame Buffer support (ONLY FOR TESTING!)"
+       depends on FB
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       select FB_SYS_FOPS
+       ---help---
+         This is a `virtual' frame buffer device. It operates on a chunk of
+         unswappable kernel memory instead of on the memory of a graphics
+         board. This means you cannot see any output sent to this frame
+         buffer device, while it does consume precious memory. The main use
+         of this frame buffer device is testing and debugging the frame
+         buffer subsystem. Do NOT enable it for normal systems! To protect
+         the innocent, it has to be enabled explicitly at boot time using the
+         kernel option `video=vfb:'.
+
+         To compile this driver as a module, choose M here: the
+         module will be called vfb. In order to load it, you must use
+         the vfb_enable=1 option.
+
+         If unsure, say N.
+
+config XEN_FBDEV_FRONTEND
+       tristate "Xen virtual frame buffer support"
+       depends on FB && XEN
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       select FB_SYS_FOPS
+       select FB_DEFERRED_IO
+       select INPUT_XEN_KBDDEV_FRONTEND if INPUT_MISC
+       select XEN_XENBUS_FRONTEND
+       default y
+       help
+         This driver implements the front-end of the Xen virtual
+         frame buffer driver.  It communicates with a back-end
+         in another domain.
+
+config FB_METRONOME
+       tristate "E-Ink Metronome/8track controller support"
+       depends on FB
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       select FB_SYS_FOPS
+       select FB_DEFERRED_IO
+       help
+         This driver implements support for the E-Ink Metronome
+         controller. The pre-release name for this device was 8track
+         and could also have been called by some vendors as PVI-nnnn.
+
+config FB_MB862XX
+       tristate "Fujitsu MB862xx GDC support"
+       depends on FB
+       depends on PCI || (OF && PPC)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         Frame buffer driver for Fujitsu Carmine/Coral-P(A)/Lime controllers.
+
+choice
+       prompt "GDC variant"
+       depends on FB_MB862XX
+
+config FB_MB862XX_PCI_GDC
+       bool "Carmine/Coral-P(A) GDC"
+       depends on PCI
+       ---help---
+         This enables framebuffer support for Fujitsu Carmine/Coral-P(A)
+         PCI graphics controller devices.
+
+config FB_MB862XX_LIME
+       bool "Lime GDC"
+       depends on OF && PPC
+       select FB_FOREIGN_ENDIAN
+       select FB_LITTLE_ENDIAN
+       ---help---
+         Framebuffer support for Fujitsu Lime GDC on host CPU bus.
+
+endchoice
+
+config FB_MB862XX_I2C
+       bool "Support I2C bus on MB862XX GDC"
+       depends on FB_MB862XX && I2C
+       default y
+       help
+         Selecting this option adds Coral-P(A)/Lime GDC I2C bus adapter
+         driver to support accessing I2C devices on controller's I2C bus.
+         These are usually some video decoder chips.
+
+config FB_EP93XX
+       tristate "EP93XX frame buffer support"
+       depends on FB && ARCH_EP93XX
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         Framebuffer driver for the Cirrus Logic EP93XX series of processors.
+         This driver is also available as a module. The module will be called
+         ep93xx-fb.
+
+config FB_PRE_INIT_FB
+       bool "Don't reinitialize, use bootloader's GDC/Display configuration"
+       depends on FB && FB_MB862XX_LIME
+       ---help---
+         Select this option if display contents should be inherited as set by
+         the bootloader.
+
+config FB_MSM
+       tristate "MSM Framebuffer support"
+       depends on FB && ARCH_MSM
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+
+config FB_MX3
+       tristate "MX3 Framebuffer support"
+       depends on FB && MX3_IPU
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       default y
+       help
+         This is a framebuffer device for the i.MX31 LCD Controller. So
+         far only synchronous displays are supported. If you plan to use
+         an LCD display with your i.MX31 system, say Y here.
+
+config FB_BROADSHEET
+       tristate "E-Ink Broadsheet/Epson S1D13521 controller support"
+       depends on FB
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       select FB_SYS_FOPS
+       select FB_DEFERRED_IO
+       help
+         This driver implements support for the E-Ink Broadsheet
+         controller. The release name for this device was Epson S1D13521
+         and could also have been called by other names when coupled with
+         a bridge adapter.
+
+config FB_AUO_K190X
+       tristate "AUO-K190X EPD controller support"
+       depends on FB
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       select FB_SYS_FOPS
+       select FB_DEFERRED_IO
+       help
+         Provides support for epaper controllers from the K190X series
+         of AUO. These controllers can be used to drive epaper displays
+         from Sipix.
+
+         This option enables the common support, shared by the individual
+         controller drivers. You will also have to enable the driver
+         for the controller type used in your device.
+
+config FB_AUO_K1900
+       tristate "AUO-K1900 EPD controller support"
+       depends on FB && FB_AUO_K190X
+       help
+         This driver implements support for the AUO K1900 epd-controller.
+         This controller can drive Sipix epaper displays but can only do
+         serial updates, reducing the number of possible frames per second.
+
+config FB_AUO_K1901
+       tristate "AUO-K1901 EPD controller support"
+       depends on FB && FB_AUO_K190X
+       help
+         This driver implements support for the AUO K1901 epd-controller.
+         This controller can drive Sipix epaper displays and supports
+         concurrent updates, making higher frames per second possible.
+
+config FB_JZ4740
+       tristate "JZ4740 LCD framebuffer support"
+       depends on FB && MACH_JZ4740
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       help
+         Framebuffer support for the JZ4740 SoC.
+
+config FB_MXS
+       tristate "MXS LCD framebuffer support"
+       depends on FB && ARCH_MXS
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       select FB_MODE_HELPERS
+       select VIDEOMODE_HELPERS
+       help
+         Framebuffer support for the MXS SoC.
+
+config FB_PUV3_UNIGFX
+       tristate "PKUnity v3 Unigfx framebuffer support"
+       depends on FB && UNICORE32 && ARCH_PUV3
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       select FB_SYS_FOPS
+       help
+         Choose this option if you want to use the Unigfx device as a
+         framebuffer device. Without the support of PCI & AGP.
+
+config FB_HYPERV
+       tristate "Microsoft Hyper-V Synthetic Video support"
+       depends on FB && HYPERV
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         This framebuffer driver supports Microsoft Hyper-V Synthetic Video.
+
+config FB_SIMPLE
+       bool "Simple framebuffer support"
+       depends on (FB = y)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       help
+         Say Y if you want support for a simple frame-buffer.
+
+         This driver assumes that the display hardware has been initialized
+         before the kernel boots, and the kernel will simply render to the
+         pre-allocated frame buffer surface.
+
+         Configuration re: surface address, size, and format must be provided
+         through device tree, or plain old platform data.
+
+source "drivers/video/fbdev/omap/Kconfig"
+source "drivers/video/fbdev/omap2/Kconfig"
+source "drivers/video/fbdev/exynos/Kconfig"
+source "drivers/video/fbdev/mmp/Kconfig"
+
+config FB_SH_MOBILE_MERAM
+       tristate "SuperH Mobile MERAM read ahead support"
+       depends on (SUPERH || ARCH_SHMOBILE)
+       select GENERIC_ALLOCATOR
+       ---help---
+         Enable MERAM support for the SuperH controller.
+
+         This will allow for caching of the framebuffer to provide more
+         reliable access under heavy main memory bus traffic situations.
+         Up to 4 memory channels can be configured, allowing 4 RGB or
+         2 YCbCr framebuffers to be configured.
+
+config FB_SSD1307
+       tristate "Solomon SSD1307 framebuffer support"
+       depends on FB && I2C
+       depends on OF
+       depends on GPIOLIB
+       select FB_SYS_FOPS
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       select FB_DEFERRED_IO
+       select PWM
+       help
+         This driver implements support for the Solomon SSD1307
+         OLED controller over I2C.
diff --git a/drivers/video/fbdev/Makefile b/drivers/video/fbdev/Makefile
new file mode 100644 (file)
index 0000000..0284f2a
--- /dev/null
@@ -0,0 +1,152 @@
+# Makefile for the Linux video drivers.
+# 5 Aug 1999, James Simmons, <mailto:jsimmons@users.sf.net>
+# Rewritten to use lists instead of if-statements.
+
+# Each configuration option enables a list of files.
+
+obj-y                          += core/
+
+obj-$(CONFIG_EXYNOS_VIDEO)     += exynos/
+
+obj-$(CONFIG_FB_MACMODES)      += macmodes.o
+obj-$(CONFIG_FB_WMT_GE_ROPS)   += wmt_ge_rops.o
+
+# Hardware specific drivers go first
+obj-$(CONFIG_FB_AMIGA)            += amifb.o c2p_planar.o
+obj-$(CONFIG_FB_ARC)              += arcfb.o
+obj-$(CONFIG_FB_CLPS711X)         += clps711xfb.o
+obj-$(CONFIG_FB_CYBER2000)        += cyber2000fb.o
+obj-$(CONFIG_FB_GRVGA)            += grvga.o
+obj-$(CONFIG_FB_PM2)              += pm2fb.o
+obj-$(CONFIG_FB_PM3)             += pm3fb.o
+
+obj-$(CONFIG_FB_I740)            += i740fb.o
+obj-$(CONFIG_FB_MATROX)                  += matrox/
+obj-$(CONFIG_FB_RIVA)            += riva/
+obj-$(CONFIG_FB_NVIDIA)                  += nvidia/
+obj-$(CONFIG_FB_ATY)             += aty/ macmodes.o
+obj-$(CONFIG_FB_ATY128)                  += aty/ macmodes.o
+obj-$(CONFIG_FB_RADEON)                  += aty/
+obj-$(CONFIG_FB_SIS)             += sis/
+obj-$(CONFIG_FB_VIA)             += via/
+obj-$(CONFIG_FB_KYRO)             += kyro/
+obj-$(CONFIG_FB_SAVAGE)                  += savage/
+obj-$(CONFIG_FB_GEODE)           += geode/
+obj-$(CONFIG_FB_MBX)             += mbx/
+obj-$(CONFIG_FB_NEOMAGIC)         += neofb.o
+obj-$(CONFIG_FB_3DFX)             += tdfxfb.o
+obj-$(CONFIG_FB_CONTROL)          += controlfb.o
+obj-$(CONFIG_FB_PLATINUM)         += platinumfb.o
+obj-$(CONFIG_FB_VALKYRIE)         += valkyriefb.o
+obj-$(CONFIG_FB_CT65550)          += chipsfb.o
+obj-$(CONFIG_FB_IMSTT)            += imsttfb.o
+obj-$(CONFIG_FB_FM2)              += fm2fb.o
+obj-$(CONFIG_FB_VT8623)           += vt8623fb.o
+obj-$(CONFIG_FB_TRIDENT)          += tridentfb.o
+obj-$(CONFIG_FB_LE80578)          += vermilion/
+obj-$(CONFIG_FB_S3)               += s3fb.o
+obj-$(CONFIG_FB_ARK)              += arkfb.o
+obj-$(CONFIG_FB_STI)              += stifb.o
+obj-$(CONFIG_FB_FFB)              += ffb.o sbuslib.o
+obj-$(CONFIG_FB_CG6)              += cg6.o sbuslib.o
+obj-$(CONFIG_FB_CG3)              += cg3.o sbuslib.o
+obj-$(CONFIG_FB_BW2)              += bw2.o sbuslib.o
+obj-$(CONFIG_FB_CG14)             += cg14.o sbuslib.o
+obj-$(CONFIG_FB_P9100)            += p9100.o sbuslib.o
+obj-$(CONFIG_FB_TCX)              += tcx.o sbuslib.o
+obj-$(CONFIG_FB_LEO)              += leo.o sbuslib.o
+obj-$(CONFIG_FB_ACORN)            += acornfb.o
+obj-$(CONFIG_FB_ATARI)            += atafb.o c2p_iplan2.o atafb_mfb.o \
+                                     atafb_iplan2p2.o atafb_iplan2p4.o atafb_iplan2p8.o
+obj-$(CONFIG_FB_MAC)              += macfb.o
+obj-$(CONFIG_FB_HECUBA)           += hecubafb.o
+obj-$(CONFIG_FB_N411)             += n411.o
+obj-$(CONFIG_FB_HGA)              += hgafb.o
+obj-$(CONFIG_FB_XVR500)           += sunxvr500.o
+obj-$(CONFIG_FB_XVR2500)          += sunxvr2500.o
+obj-$(CONFIG_FB_XVR1000)          += sunxvr1000.o
+obj-$(CONFIG_FB_IGA)              += igafb.o
+obj-$(CONFIG_FB_APOLLO)           += dnfb.o
+obj-$(CONFIG_FB_Q40)              += q40fb.o
+obj-$(CONFIG_FB_TGA)              += tgafb.o
+obj-$(CONFIG_FB_HP300)            += hpfb.o
+obj-$(CONFIG_FB_G364)             += g364fb.o
+obj-$(CONFIG_FB_EP93XX)                  += ep93xx-fb.o
+obj-$(CONFIG_FB_SA1100)           += sa1100fb.o
+obj-$(CONFIG_FB_HIT)              += hitfb.o
+obj-$(CONFIG_FB_ATMEL)           += atmel_lcdfb.o
+obj-$(CONFIG_FB_PVR2)             += pvr2fb.o
+obj-$(CONFIG_FB_VOODOO1)          += sstfb.o
+obj-$(CONFIG_FB_ARMCLCD)         += amba-clcd.o
+obj-$(CONFIG_FB_GOLDFISH)         += goldfishfb.o
+obj-$(CONFIG_FB_68328)            += 68328fb.o
+obj-$(CONFIG_FB_GBE)              += gbefb.o
+obj-$(CONFIG_FB_CIRRUS)                  += cirrusfb.o
+obj-$(CONFIG_FB_ASILIANT)        += asiliantfb.o
+obj-$(CONFIG_FB_PXA)             += pxafb.o
+obj-$(CONFIG_FB_PXA168)                  += pxa168fb.o
+obj-$(CONFIG_PXA3XX_GCU)         += pxa3xx-gcu.o
+obj-$(CONFIG_MMP_DISP)           += mmp/
+obj-$(CONFIG_FB_W100)            += w100fb.o
+obj-$(CONFIG_FB_TMIO)            += tmiofb.o
+obj-$(CONFIG_FB_AU1100)                  += au1100fb.o
+obj-$(CONFIG_FB_AU1200)                  += au1200fb.o
+obj-$(CONFIG_FB_VT8500)                  += vt8500lcdfb.o
+obj-$(CONFIG_FB_WM8505)                  += wm8505fb.o
+obj-$(CONFIG_FB_PMAG_AA)         += pmag-aa-fb.o
+obj-$(CONFIG_FB_PMAG_BA)         += pmag-ba-fb.o
+obj-$(CONFIG_FB_PMAGB_B)         += pmagb-b-fb.o
+obj-$(CONFIG_FB_MAXINE)                  += maxinefb.o
+obj-$(CONFIG_FB_METRONOME)        += metronomefb.o
+obj-$(CONFIG_FB_BROADSHEET)       += broadsheetfb.o
+obj-$(CONFIG_FB_AUO_K190X)       += auo_k190x.o
+obj-$(CONFIG_FB_AUO_K1900)       += auo_k1900fb.o
+obj-$(CONFIG_FB_AUO_K1901)       += auo_k1901fb.o
+obj-$(CONFIG_FB_S1D13XXX)        += s1d13xxxfb.o
+obj-$(CONFIG_FB_SH7760)                  += sh7760fb.o
+obj-$(CONFIG_FB_IMX)              += imxfb.o
+obj-$(CONFIG_FB_S3C)             += s3c-fb.o
+obj-$(CONFIG_FB_S3C2410)         += s3c2410fb.o
+obj-$(CONFIG_FB_FSL_DIU)         += fsl-diu-fb.o
+obj-$(CONFIG_FB_COBALT)           += cobalt_lcdfb.o
+obj-$(CONFIG_FB_IBM_GXT4500)     += gxt4500.o
+obj-$(CONFIG_FB_PS3)             += ps3fb.o
+obj-$(CONFIG_FB_SM501)            += sm501fb.o
+obj-$(CONFIG_FB_UDL)             += udlfb.o
+obj-$(CONFIG_FB_SMSCUFX)         += smscufx.o
+obj-$(CONFIG_FB_XILINX)           += xilinxfb.o
+obj-$(CONFIG_SH_MIPI_DSI)        += sh_mipi_dsi.o
+obj-$(CONFIG_FB_SH_MOBILE_HDMI)          += sh_mobile_hdmi.o
+obj-$(CONFIG_FB_SH_MOBILE_MERAM)  += sh_mobile_meram.o
+obj-$(CONFIG_FB_SH_MOBILE_LCDC)          += sh_mobile_lcdcfb.o
+obj-$(CONFIG_FB_OMAP)             += omap/
+obj-y                             += omap2/
+obj-$(CONFIG_XEN_FBDEV_FRONTEND)  += xen-fbfront.o
+obj-$(CONFIG_FB_CARMINE)          += carminefb.o
+obj-$(CONFIG_FB_MB862XX)         += mb862xx/
+obj-$(CONFIG_FB_MSM)              += msm/
+obj-$(CONFIG_FB_NUC900)           += nuc900fb.o
+obj-$(CONFIG_FB_JZ4740)                  += jz4740_fb.o
+obj-$(CONFIG_FB_PUV3_UNIGFX)      += fb-puv3.o
+obj-$(CONFIG_FB_HYPERV)                  += hyperv_fb.o
+obj-$(CONFIG_FB_OPENCORES)       += ocfb.o
+
+# Platform or fallback drivers go here
+obj-$(CONFIG_FB_UVESA)            += uvesafb.o
+obj-$(CONFIG_FB_VESA)             += vesafb.o
+obj-$(CONFIG_FB_EFI)              += efifb.o
+obj-$(CONFIG_FB_VGA16)            += vga16fb.o
+obj-$(CONFIG_FB_OF)               += offb.o
+obj-$(CONFIG_FB_BF537_LQ035)      += bf537-lq035.o
+obj-$(CONFIG_FB_BF54X_LQ043)     += bf54x-lq043fb.o
+obj-$(CONFIG_FB_BFIN_LQ035Q1)     += bfin-lq035q1-fb.o
+obj-$(CONFIG_FB_BFIN_T350MCQB)   += bfin-t350mcqb-fb.o
+obj-$(CONFIG_FB_BFIN_7393)        += bfin_adv7393fb.o
+obj-$(CONFIG_FB_MX3)             += mx3fb.o
+obj-$(CONFIG_FB_DA8XX)           += da8xx-fb.o
+obj-$(CONFIG_FB_MXS)             += mxsfb.o
+obj-$(CONFIG_FB_SSD1307)         += ssd1307fb.o
+obj-$(CONFIG_FB_SIMPLE)           += simplefb.o
+
+# the test framebuffer is last
+obj-$(CONFIG_FB_VIRTUAL)          += vfb.o
similarity index 99%
rename from drivers/video/aty/mach64_cursor.c
rename to drivers/video/fbdev/aty/mach64_cursor.c
index 0fe02e2..2fa0317 100644 (file)
@@ -5,7 +5,7 @@
 #include <linux/fb.h>
 #include <linux/init.h>
 #include <linux/string.h>
-#include "../fb_draw.h"
+#include "../core/fb_draw.h"
 
 #include <asm/io.h>
 
similarity index 99%
rename from drivers/video/bf54x-lq043fb.c
rename to drivers/video/fbdev/bf54x-lq043fb.c
index 42b8f9d..e2c42ad 100644 (file)
 #include <linux/spinlock.h>
 #include <linux/dma-mapping.h>
 #include <linux/platform_device.h>
+#include <linux/gpio.h>
 
 #include <asm/blackfin.h>
 #include <asm/irq.h>
 #include <asm/dpmc.h>
 #include <asm/dma-mapping.h>
 #include <asm/dma.h>
-#include <asm/gpio.h>
 #include <asm/portmux.h>
 
 #include <mach/bf54x-lq043.h>
diff --git a/drivers/video/fbdev/core/Makefile b/drivers/video/fbdev/core/Makefile
new file mode 100644 (file)
index 0000000..fa30653
--- /dev/null
@@ -0,0 +1,16 @@
+obj-y                             += fb_notify.o
+obj-$(CONFIG_FB)                  += fb.o
+fb-y                              := fbmem.o fbmon.o fbcmap.o fbsysfs.o \
+                                     modedb.o fbcvt.o
+fb-objs                           := $(fb-y)
+
+obj-$(CONFIG_FB_CFB_FILLRECT)  += cfbfillrect.o
+obj-$(CONFIG_FB_CFB_COPYAREA)  += cfbcopyarea.o
+obj-$(CONFIG_FB_CFB_IMAGEBLIT) += cfbimgblt.o
+obj-$(CONFIG_FB_SYS_FILLRECT)  += sysfillrect.o
+obj-$(CONFIG_FB_SYS_COPYAREA)  += syscopyarea.o
+obj-$(CONFIG_FB_SYS_IMAGEBLIT) += sysimgblt.o
+obj-$(CONFIG_FB_SYS_FOPS)      += fb_sys_fops.o
+obj-$(CONFIG_FB_SVGALIB)       += svgalib.o
+obj-$(CONFIG_FB_DDC)           += fb_ddc.o
+obj-$(CONFIG_FB_DEFERRED_IO)   += fb_defio.o
similarity index 99%
rename from drivers/video/fb_ddc.c
rename to drivers/video/fbdev/core/fb_ddc.c
index 2b106f0..94322cc 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/i2c-algo-bit.h>
 #include <linux/slab.h>
 
-#include "edid.h"
+#include "../edid.h"
 
 #define DDC_ADDR       0x50
 
similarity index 99%
rename from drivers/video/fbmon.c
rename to drivers/video/fbdev/core/fbmon.c
index 6103fa6..c204ebe 100644 (file)
@@ -37,7 +37,7 @@
 #include <asm/prom.h>
 #include <asm/pci-bridge.h>
 #endif
-#include "edid.h"
+#include "../edid.h"
 
 /*
  * EDID parser
similarity index 99%
rename from drivers/video/da8xx-fb.c
rename to drivers/video/fbdev/da8xx-fb.c
index 0c0ba92..6b23508 100644 (file)
@@ -663,15 +663,7 @@ static int fb_setcolreg(unsigned regno, unsigned red, unsigned green,
                        (green << info->var.green.offset) |
                        (blue << info->var.blue.offset);
 
-               switch (info->var.bits_per_pixel) {
-               case 16:
-                       ((u16 *) (info->pseudo_palette))[regno] = v;
-                       break;
-               case 24:
-               case 32:
-                       ((u32 *) (info->pseudo_palette))[regno] = v;
-                       break;
-               }
+               ((u32 *) (info->pseudo_palette))[regno] = v;
                if (palette[0] != 0x4000) {
                        update_hw = 1;
                        palette[0] = 0x4000;
similarity index 61%
rename from drivers/video/mmp/Kconfig
rename to drivers/video/fbdev/mmp/Kconfig
index e9ea39e..d4a4ffc 100644 (file)
@@ -5,7 +5,7 @@ menuconfig MMP_DISP
          Marvell Display Subsystem support.
 
 if MMP_DISP
-source "drivers/video/mmp/hw/Kconfig"
-source "drivers/video/mmp/panel/Kconfig"
-source "drivers/video/mmp/fb/Kconfig"
+source "drivers/video/fbdev/mmp/hw/Kconfig"
+source "drivers/video/fbdev/mmp/panel/Kconfig"
+source "drivers/video/fbdev/mmp/fb/Kconfig"
 endif
diff --git a/drivers/video/fbdev/omap2/Kconfig b/drivers/video/fbdev/omap2/Kconfig
new file mode 100644 (file)
index 0000000..c22955d
--- /dev/null
@@ -0,0 +1,10 @@
+config OMAP2_VRFB
+       bool
+
+if ARCH_OMAP2PLUS
+
+source "drivers/video/fbdev/omap2/dss/Kconfig"
+source "drivers/video/fbdev/omap2/omapfb/Kconfig"
+source "drivers/video/fbdev/omap2/displays-new/Kconfig"
+
+endif
similarity index 98%
rename from drivers/video/omap2/dss/dispc.c
rename to drivers/video/fbdev/omap2/dss/dispc.c
index 2bbdb7f..f18397c 100644 (file)
@@ -101,6 +101,8 @@ static struct {
        void __iomem    *base;
 
        int irq;
+       irq_handler_t user_handler;
+       void *user_data;
 
        unsigned long core_clk_rate;
        unsigned long tv_pclk_rate;
@@ -113,6 +115,8 @@ static struct {
        u32             ctx[DISPC_SZ_REGS / sizeof(u32)];
 
        const struct dispc_features *feat;
+
+       bool is_enabled;
 } dispc;
 
 enum omap_color_component {
@@ -141,12 +145,18 @@ enum mgr_reg_fields {
        DISPC_MGR_FLD_NUM,
 };
 
+struct dispc_reg_field {
+       u16 reg;
+       u8 high;
+       u8 low;
+};
+
 static const struct {
        const char *name;
        u32 vsync_irq;
        u32 framedone_irq;
        u32 sync_lost_irq;
-       struct reg_field reg_desc[DISPC_MGR_FLD_NUM];
+       struct dispc_reg_field reg_desc[DISPC_MGR_FLD_NUM];
 } mgr_desc[] = {
        [OMAP_DSS_CHANNEL_LCD] = {
                .name           = "LCD",
@@ -238,13 +248,13 @@ static inline u32 dispc_read_reg(const u16 idx)
 
 static u32 mgr_fld_read(enum omap_channel channel, enum mgr_reg_fields regfld)
 {
-       const struct reg_field rfld = mgr_desc[channel].reg_desc[regfld];
+       const struct dispc_reg_field rfld = mgr_desc[channel].reg_desc[regfld];
        return REG_GET(rfld.reg, rfld.high, rfld.low);
 }
 
 static void mgr_fld_write(enum omap_channel channel,
                                        enum mgr_reg_fields regfld, int val) {
-       const struct reg_field rfld = mgr_desc[channel].reg_desc[regfld];
+       const struct dispc_reg_field rfld = mgr_desc[channel].reg_desc[regfld];
        REG_FLD_MOD(rfld.reg, val, rfld.high, rfld.low);
 }
 
@@ -3669,16 +3679,44 @@ static int __init dispc_init_features(struct platform_device *pdev)
        return 0;
 }
 
+static irqreturn_t dispc_irq_handler(int irq, void *arg)
+{
+       if (!dispc.is_enabled)
+               return IRQ_NONE;
+
+       return dispc.user_handler(irq, dispc.user_data);
+}
+
 int dispc_request_irq(irq_handler_t handler, void *dev_id)
 {
-       return devm_request_irq(&dispc.pdev->dev, dispc.irq, handler,
-                            IRQF_SHARED, "OMAP DISPC", dev_id);
+       int r;
+
+       if (dispc.user_handler != NULL)
+               return -EBUSY;
+
+       dispc.user_handler = handler;
+       dispc.user_data = dev_id;
+
+       /* ensure the dispc_irq_handler sees the values above */
+       smp_wmb();
+
+       r = devm_request_irq(&dispc.pdev->dev, dispc.irq, dispc_irq_handler,
+                            IRQF_SHARED, "OMAP DISPC", &dispc);
+       if (r) {
+               dispc.user_handler = NULL;
+               dispc.user_data = NULL;
+       }
+
+       return r;
 }
 EXPORT_SYMBOL(dispc_request_irq);
 
 void dispc_free_irq(void *dev_id)
 {
-       devm_free_irq(&dispc.pdev->dev, dispc.irq, dev_id);
+       devm_free_irq(&dispc.pdev->dev, dispc.irq, &dispc);
+
+       dispc.user_handler = NULL;
+       dispc.user_data = NULL;
 }
 EXPORT_SYMBOL(dispc_free_irq);
 
@@ -3750,6 +3788,12 @@ static int __exit omap_dispchw_remove(struct platform_device *pdev)
 
 static int dispc_runtime_suspend(struct device *dev)
 {
+       dispc.is_enabled = false;
+       /* ensure the dispc_irq_handler sees the is_enabled value */
+       smp_wmb();
+       /* wait for current handler to finish before turning the DISPC off */
+       synchronize_irq(dispc.irq);
+
        dispc_save_context();
 
        return 0;
@@ -3763,12 +3807,15 @@ static int dispc_runtime_resume(struct device *dev)
         * _omap_dispc_initial_config(). We can thus use it to detect if
         * we have lost register context.
         */
-       if (REG_GET(DISPC_CONFIG, 2, 1) == OMAP_DSS_LOAD_FRAME_ONLY)
-               return 0;
+       if (REG_GET(DISPC_CONFIG, 2, 1) != OMAP_DSS_LOAD_FRAME_ONLY) {
+               _omap_dispc_initial_config();
 
-       _omap_dispc_initial_config();
+               dispc_restore_context();
+       }
 
-       dispc_restore_context();
+       dispc.is_enabled = true;
+       /* ensure the dispc_irq_handler sees the is_enabled value */
+       smp_wmb();
 
        return 0;
 }
similarity index 99%
rename from drivers/video/omap2/dss/dsi.c
rename to drivers/video/fbdev/omap2/dss/dsi.c
index 121d104..8be9b04 100644 (file)
@@ -297,6 +297,8 @@ struct dsi_data {
 
        int irq;
 
+       bool is_enabled;
+
        struct clk *dss_clk;
        struct clk *sys_clk;
 
@@ -795,6 +797,9 @@ static irqreturn_t omap_dsi_irq_handler(int irq, void *arg)
        dsidev = (struct platform_device *) arg;
        dsi = dsi_get_dsidrv_data(dsidev);
 
+       if (!dsi->is_enabled)
+               return IRQ_NONE;
+
        spin_lock(&dsi->irq_lock);
 
        irqstatus = dsi_read_reg(dsidev, DSI_IRQSTATUS);
@@ -5671,6 +5676,15 @@ static int __exit omap_dsihw_remove(struct platform_device *dsidev)
 
 static int dsi_runtime_suspend(struct device *dev)
 {
+       struct platform_device *pdev = to_platform_device(dev);
+       struct dsi_data *dsi = dsi_get_dsidrv_data(pdev);
+
+       dsi->is_enabled = false;
+       /* ensure the irq handler sees the is_enabled value */
+       smp_wmb();
+       /* wait for current handler to finish before turning the DSI off */
+       synchronize_irq(dsi->irq);
+
        dispc_runtime_put();
 
        return 0;
@@ -5678,12 +5692,18 @@ static int dsi_runtime_suspend(struct device *dev)
 
 static int dsi_runtime_resume(struct device *dev)
 {
+       struct platform_device *pdev = to_platform_device(dev);
+       struct dsi_data *dsi = dsi_get_dsidrv_data(pdev);
        int r;
 
        r = dispc_runtime_get();
        if (r)
                return r;
 
+       dsi->is_enabled = true;
+       /* ensure the irq handler sees the is_enabled value */
+       smp_wmb();
+
        return 0;
 }
 
similarity index 99%
rename from drivers/video/omap2/dss/dss.c
rename to drivers/video/fbdev/omap2/dss/dss.c
index 825c019..d55266c 100644 (file)
@@ -457,7 +457,7 @@ bool dss_div_calc(unsigned long pck, unsigned long fck_min,
        fckd_stop = max(DIV_ROUND_UP(prate * m, fck_hw_max), 1ul);
 
        for (fckd = fckd_start; fckd >= fckd_stop; --fckd) {
-               fck = prate / fckd * m;
+               fck = DIV_ROUND_UP(prate, fckd) * m;
 
                if (func(fck, data))
                        return true;
@@ -506,7 +506,7 @@ static int dss_setup_default_clock(void)
 
                fck_div = DIV_ROUND_UP(prate * dss.feat->dss_fck_multiplier,
                                max_dss_fck);
-               fck = prate / fck_div * dss.feat->dss_fck_multiplier;
+               fck = DIV_ROUND_UP(prate, fck_div) * dss.feat->dss_fck_multiplier;
        }
 
        r = dss_set_fck_rate(fck);
similarity index 99%
rename from drivers/video/omap2/dss/dss.h
rename to drivers/video/fbdev/omap2/dss/dss.h
index 918fec1..560078f 100644 (file)
@@ -131,12 +131,6 @@ struct dsi_clock_info {
        u16 lp_clk_div;
 };
 
-struct reg_field {
-       u16 reg;
-       u8 high;
-       u8 low;
-};
-
 struct dss_lcd_mgr_config {
        enum dss_io_pad_mode io_pad_mode;
 
similarity index 98%
rename from drivers/video/omap2/dss/hdmi_common.c
rename to drivers/video/fbdev/omap2/dss/hdmi_common.c
index b11afac..0b12a3f 100644 (file)
@@ -347,17 +347,17 @@ int hdmi_compute_acr(u32 pclk, u32 sample_freq, u32 *n, u32 *cts)
        case 96000:
        case 192000:
                if (deep_color == 125)
-                       if (pclk == 27027 || pclk == 74250)
+                       if (pclk == 27027000 || pclk == 74250000)
                                deep_color_correct = true;
                if (deep_color == 150)
-                       if (pclk == 27027)
+                       if (pclk == 27027000)
                                deep_color_correct = true;
                break;
        case 44100:
        case 88200:
        case 176400:
                if (deep_color == 125)
-                       if (pclk == 27027)
+                       if (pclk == 27027000)
                                deep_color_correct = true;
                break;
        default:
@@ -418,7 +418,7 @@ int hdmi_compute_acr(u32 pclk, u32 sample_freq, u32 *n, u32 *cts)
                }
        }
        /* Calculate CTS. See HDMI 1.3a or 1.4a specifications */
-       *cts = pclk * (*n / 128) * deep_color / (sample_freq / 10);
+       *cts = (pclk/1000) * (*n / 128) * deep_color / (sample_freq / 10);
 
        return 0;
 }
similarity index 99%
rename from drivers/video/wmt_ge_rops.c
rename to drivers/video/fbdev/wmt_ge_rops.c
index b0a9f34..9df6fe7 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/module.h>
 #include <linux/fb.h>
 #include <linux/platform_device.h>
-#include "fb_draw.h"
+#include "core/fb_draw.h"
 
 #define GE_COMMAND_OFF         0x00
 #define GE_DEPTH_OFF           0x04
diff --git a/drivers/video/omap2/Kconfig b/drivers/video/omap2/Kconfig
deleted file mode 100644 (file)
index 63b23f8..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-config OMAP2_VRFB
-       bool
-
-if ARCH_OMAP2PLUS
-
-source "drivers/video/omap2/dss/Kconfig"
-source "drivers/video/omap2/omapfb/Kconfig"
-source "drivers/video/omap2/displays-new/Kconfig"
-
-endif
index fc6c94c..32f9236 100644 (file)
@@ -198,10 +198,32 @@ struct shutdown_handler {
        void (*cb)(void);
 };
 
+static int poweroff_nb(struct notifier_block *cb, unsigned long code, void *unused)
+{
+       switch (code) {
+       case SYS_DOWN:
+       case SYS_HALT:
+       case SYS_POWER_OFF:
+               shutting_down = SHUTDOWN_POWEROFF;
+       default:
+               break;
+       }
+       return NOTIFY_DONE;
+}
 static void do_poweroff(void)
 {
-       shutting_down = SHUTDOWN_POWEROFF;
-       orderly_poweroff(false);
+       switch (system_state) {
+       case SYSTEM_BOOTING:
+               orderly_poweroff(true);
+               break;
+       case SYSTEM_RUNNING:
+               orderly_poweroff(false);
+               break;
+       default:
+               /* Don't do it when we are halting/rebooting. */
+               pr_info("Ignoring Xen toolstack shutdown.\n");
+               break;
+       }
 }
 
 static void do_reboot(void)
@@ -307,6 +329,10 @@ static struct xenbus_watch shutdown_watch = {
        .callback = shutdown_handler
 };
 
+static struct notifier_block xen_reboot_nb = {
+       .notifier_call = poweroff_nb,
+};
+
 static int setup_shutdown_watcher(void)
 {
        int err;
@@ -317,6 +343,7 @@ static int setup_shutdown_watcher(void)
                return err;
        }
 
+
 #ifdef CONFIG_MAGIC_SYSRQ
        err = register_xenbus_watch(&sysrq_watch);
        if (err) {
@@ -345,6 +372,7 @@ int xen_setup_shutdown_event(void)
        if (!xen_domain())
                return -ENODEV;
        register_xenstore_notifier(&xenstore_notifier);
+       register_reboot_notifier(&xen_reboot_nb);
 
        return 0;
 }
index 929dd46..607e414 100644 (file)
@@ -217,7 +217,7 @@ int xen_pcibk_enable_msix(struct xen_pcibk_device *pdev,
        if (result == 0) {
                for (i = 0; i < op->value; i++) {
                        op->msix_entries[i].entry = entries[i].entry;
-                       if (entries[i].vector)
+                       if (entries[i].vector) {
                                op->msix_entries[i].vector =
                                        xen_pirq_from_irq(entries[i].vector);
                                if (unlikely(verbose_request))
@@ -225,6 +225,7 @@ int xen_pcibk_enable_msix(struct xen_pcibk_device *pdev,
                                                "MSI-X[%d]: %d\n",
                                                pci_name(dev), i,
                                                op->msix_entries[i].vector);
+                       }
                }
        } else
                pr_warn_ratelimited("%s: error enabling MSI-X for guest %u: err %d!\n",
index 3165ce3..51afff9 100644 (file)
@@ -137,6 +137,8 @@ unlock:
        /* Publish this device. */
        if (!err)
                err = publish_cb(pdev, 0, 0, PCI_DEVFN(slot, func), devid);
+       else
+               kfree(dev_entry);
 
 out:
        return err;
index b6d5fff..ba804f3 100644 (file)
@@ -50,6 +50,7 @@
 #include <xen/xenbus.h>
 #include <xen/xen.h>
 #include "xenbus_comms.h"
+#include "xenbus_probe.h"
 
 struct xs_stored_msg {
        struct list_head list;
@@ -139,6 +140,29 @@ static int get_error(const char *errorstring)
        return xsd_errors[i].errnum;
 }
 
+static bool xenbus_ok(void)
+{
+       switch (xen_store_domain_type) {
+       case XS_LOCAL:
+               switch (system_state) {
+               case SYSTEM_POWER_OFF:
+               case SYSTEM_RESTART:
+               case SYSTEM_HALT:
+                       return false;
+               default:
+                       break;
+               }
+               return true;
+       case XS_PV:
+       case XS_HVM:
+               /* FIXME: Could check that the remote domain is alive,
+                * but it is normally initial domain. */
+               return true;
+       default:
+               break;
+       }
+       return false;
+}
 static void *read_reply(enum xsd_sockmsg_type *type, unsigned int *len)
 {
        struct xs_stored_msg *msg;
@@ -148,9 +172,20 @@ static void *read_reply(enum xsd_sockmsg_type *type, unsigned int *len)
 
        while (list_empty(&xs_state.reply_list)) {
                spin_unlock(&xs_state.reply_lock);
-               /* XXX FIXME: Avoid synchronous wait for response here. */
-               wait_event(xs_state.reply_waitq,
-                          !list_empty(&xs_state.reply_list));
+               if (xenbus_ok())
+                       /* XXX FIXME: Avoid synchronous wait for response here. */
+                       wait_event_timeout(xs_state.reply_waitq,
+                                          !list_empty(&xs_state.reply_list),
+                                          msecs_to_jiffies(500));
+               else {
+                       /*
+                        * If we are in the process of being shut-down there is
+                        * no point of trying to contact XenBus - it is either
+                        * killed (xenstored application) or the other domain
+                        * has been killed or is unreachable.
+                        */
+                       return ERR_PTR(-EIO);
+               }
                spin_lock(&xs_state.reply_lock);
        }
 
@@ -215,6 +250,9 @@ void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg)
 
        mutex_unlock(&xs_state.request_mutex);
 
+       if (IS_ERR(ret))
+               return ret;
+
        if ((msg->type == XS_TRANSACTION_END) ||
            ((req_msg.type == XS_TRANSACTION_START) &&
             (msg->type == XS_ERROR)))
index 75df77d..0479c32 100644 (file)
@@ -1344,6 +1344,14 @@ __xfs_get_blocks(
        /*
         * If this is O_DIRECT or the mpage code calling tell them how large
         * the mapping is, so that we can avoid repeated get_blocks calls.
+        *
+        * If the mapping spans EOF, then we have to break the mapping up as the
+        * mapping for blocks beyond EOF must be marked new so that sub block
+        * regions can be correctly zeroed. We can't do this for mappings within
+        * EOF unless the mapping was just allocated or is unwritten, otherwise
+        * the callers would overwrite existing data with zeros. Hence we have
+        * to split the mapping into a range up to and including EOF, and a
+        * second mapping for beyond EOF.
         */
        if (direct || size > (1 << inode->i_blkbits)) {
                xfs_off_t               mapping_size;
@@ -1354,6 +1362,12 @@ __xfs_get_blocks(
                ASSERT(mapping_size > 0);
                if (mapping_size > size)
                        mapping_size = size;
+               if (offset < i_size_read(inode) &&
+                   offset + mapping_size >= i_size_read(inode)) {
+                       /* limit mapping to block that spans EOF */
+                       mapping_size = roundup_64(i_size_read(inode) - offset,
+                                                 1 << inode->i_blkbits);
+               }
                if (mapping_size > LONG_MAX)
                        mapping_size = LONG_MAX;
 
@@ -1566,6 +1580,16 @@ xfs_vm_write_failed(
 
                xfs_vm_kill_delalloc_range(inode, block_offset,
                                           block_offset + bh->b_size);
+
+               /*
+                * This buffer does not contain data anymore. make sure anyone
+                * who finds it knows that for certain.
+                */
+               clear_buffer_delay(bh);
+               clear_buffer_uptodate(bh);
+               clear_buffer_mapped(bh);
+               clear_buffer_new(bh);
+               clear_buffer_dirty(bh);
        }
 
 }
@@ -1599,12 +1623,21 @@ xfs_vm_write_begin(
        status = __block_write_begin(page, pos, len, xfs_get_blocks);
        if (unlikely(status)) {
                struct inode    *inode = mapping->host;
+               size_t          isize = i_size_read(inode);
 
                xfs_vm_write_failed(inode, page, pos, len);
                unlock_page(page);
 
-               if (pos + len > i_size_read(inode))
-                       truncate_pagecache(inode, i_size_read(inode));
+               /*
+                * If the write is beyond EOF, we only want to kill blocks
+                * allocated in this write, not blocks that were previously
+                * written successfully.
+                */
+               if (pos + len > isize) {
+                       ssize_t start = max_t(ssize_t, pos, isize);
+
+                       truncate_pagecache_range(inode, start, pos + len);
+               }
 
                page_cache_release(page);
                page = NULL;
@@ -1615,9 +1648,12 @@ xfs_vm_write_begin(
 }
 
 /*
- * On failure, we only need to kill delalloc blocks beyond EOF because they
- * will never be written. For blocks within EOF, generic_write_end() zeros them
- * so they are safe to leave alone and be written with all the other valid data.
+ * On failure, we only need to kill delalloc blocks beyond EOF in the range of
+ * this specific write because they will never be written. Previous writes
+ * beyond EOF where block allocation succeeded do not need to be trashed, so
+ * only new blocks from this write should be trashed. For blocks within
+ * EOF, generic_write_end() zeros them so they are safe to leave alone and be
+ * written with all the other valid data.
  */
 STATIC int
 xfs_vm_write_end(
@@ -1640,8 +1676,11 @@ xfs_vm_write_end(
                loff_t          to = pos + len;
 
                if (to > isize) {
-                       truncate_pagecache(inode, isize);
+                       /* only kill blocks in this write beyond EOF */
+                       if (pos > isize)
+                               isize = pos;
                        xfs_vm_kill_delalloc_range(inode, isize, to);
+                       truncate_pagecache_range(inode, isize, to);
                }
        }
        return ret;
index 5b6092e..f0efc7e 100644 (file)
@@ -5413,6 +5413,7 @@ xfs_bmap_shift_extents(
        int                             whichfork = XFS_DATA_FORK;
        int                             logflags;
        xfs_filblks_t                   blockcount = 0;
+       int                             total_extents;
 
        if (unlikely(XFS_TEST_ERROR(
            (XFS_IFORK_FORMAT(ip, whichfork) != XFS_DINODE_FMT_EXTENTS &&
@@ -5429,7 +5430,6 @@ xfs_bmap_shift_extents(
        ASSERT(current_ext != NULL);
 
        ifp = XFS_IFORK_PTR(ip, whichfork);
-
        if (!(ifp->if_flags & XFS_IFEXTENTS)) {
                /* Read in all the extents */
                error = xfs_iread_extents(tp, ip, whichfork);
@@ -5456,7 +5456,6 @@ xfs_bmap_shift_extents(
 
        /* We are going to change core inode */
        logflags = XFS_ILOG_CORE;
-
        if (ifp->if_flags & XFS_IFBROOT) {
                cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork);
                cur->bc_private.b.firstblock = *firstblock;
@@ -5467,8 +5466,14 @@ xfs_bmap_shift_extents(
                logflags |= XFS_ILOG_DEXT;
        }
 
-       while (nexts++ < num_exts &&
-              *current_ext <  XFS_IFORK_NEXTENTS(ip, whichfork)) {
+       /*
+        * There may be delalloc extents in the data fork before the range we
+        * are collapsing out, so we cannot
+        * use the count of real extents here. Instead we have to calculate it
+        * from the incore fork.
+        */
+       total_extents = ifp->if_bytes / sizeof(xfs_bmbt_rec_t);
+       while (nexts++ < num_exts && *current_ext < total_extents) {
 
                gotp = xfs_iext_get_ext(ifp, *current_ext);
                xfs_bmbt_get_all(gotp, &got);
@@ -5556,10 +5561,11 @@ xfs_bmap_shift_extents(
                }
 
                (*current_ext)++;
+               total_extents = ifp->if_bytes / sizeof(xfs_bmbt_rec_t);
        }
 
        /* Check if we are done */
-       if (*current_ext ==  XFS_IFORK_NEXTENTS(ip, whichfork))
+       if (*current_ext == total_extents)
                *done = 1;
 
 del_cursor:
@@ -5568,6 +5574,5 @@ del_cursor:
                        error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR);
 
        xfs_trans_log_inode(tp, ip, logflags);
-
        return error;
 }
index 01f6a64..296160b 100644 (file)
@@ -1418,6 +1418,8 @@ xfs_zero_file_space(
        xfs_off_t               end_boundary;
        int                     error;
 
+       trace_xfs_zero_file_space(ip);
+
        granularity = max_t(uint, 1 << mp->m_sb.sb_blocklog, PAGE_CACHE_SIZE);
 
        /*
@@ -1432,9 +1434,18 @@ xfs_zero_file_space(
        ASSERT(end_boundary <= offset + len);
 
        if (start_boundary < end_boundary - 1) {
-               /* punch out the page cache over the conversion range */
+               /*
+                * punch out delayed allocation blocks and the page cache over
+                * the conversion range
+                */
+               xfs_ilock(ip, XFS_ILOCK_EXCL);
+               error = xfs_bmap_punch_delalloc_range(ip,
+                               XFS_B_TO_FSBT(mp, start_boundary),
+                               XFS_B_TO_FSB(mp, end_boundary - start_boundary));
+               xfs_iunlock(ip, XFS_ILOCK_EXCL);
                truncate_pagecache_range(VFS_I(ip), start_boundary,
                                         end_boundary - 1);
+
                /* convert the blocks */
                error = xfs_alloc_file_space(ip, start_boundary,
                                        end_boundary - start_boundary - 1,
index 107f2fd..cb10a0a 100644 (file)
@@ -1372,21 +1372,29 @@ xfs_buf_iorequest(
                xfs_buf_wait_unpin(bp);
        xfs_buf_hold(bp);
 
-       /* Set the count to 1 initially, this will stop an I/O
+       /*
+        * Set the count to 1 initially, this will stop an I/O
         * completion callout which happens before we have started
         * all the I/O from calling xfs_buf_ioend too early.
         */
        atomic_set(&bp->b_io_remaining, 1);
        _xfs_buf_ioapply(bp);
-       _xfs_buf_ioend(bp, 1);
+       /*
+        * If _xfs_buf_ioapply failed, we'll get back here with
+        * only the reference we took above.  _xfs_buf_ioend will
+        * drop it to zero, so we'd better not queue it for later,
+        * or we'll free it before it's done.
+        */
+       _xfs_buf_ioend(bp, bp->b_error ? 0 : 1);
 
        xfs_buf_rele(bp);
 }
 
 /*
  * Waits for I/O to complete on the buffer supplied.  It returns immediately if
- * no I/O is pending or there is already a pending error on the buffer.  It
- * returns the I/O error code, if any, or 0 if there was no error.
+ * no I/O is pending or there is already a pending error on the buffer, in which
+ * case nothing will ever complete.  It returns the I/O error code, if any, or
+ * 0 if there was no error.
  */
 int
 xfs_buf_iowait(
index 79e96ce..82afdcb 100644 (file)
@@ -679,7 +679,7 @@ xfs_file_dio_aio_write(
                goto out;
 
        if (mapping->nrpages) {
-               ret = -filemap_write_and_wait_range(VFS_I(ip)->i_mapping,
+               ret = filemap_write_and_wait_range(VFS_I(ip)->i_mapping,
                                                    pos, -1);
                if (ret)
                        goto out;
index 5e7a38f..768087b 100644 (file)
@@ -1334,7 +1334,8 @@ int
 xfs_create_tmpfile(
        struct xfs_inode        *dp,
        struct dentry           *dentry,
-       umode_t                 mode)
+       umode_t                 mode,
+       struct xfs_inode        **ipp)
 {
        struct xfs_mount        *mp = dp->i_mount;
        struct xfs_inode        *ip = NULL;
@@ -1402,7 +1403,6 @@ xfs_create_tmpfile(
        xfs_qm_vop_create_dqattach(tp, ip, udqp, gdqp, pdqp);
 
        ip->i_d.di_nlink--;
-       d_tmpfile(dentry, VFS_I(ip));
        error = xfs_iunlink(tp, ip);
        if (error)
                goto out_trans_abort;
@@ -1415,6 +1415,7 @@ xfs_create_tmpfile(
        xfs_qm_dqrele(gdqp);
        xfs_qm_dqrele(pdqp);
 
+       *ipp = ip;
        return 0;
 
  out_trans_abort:
index 396cc1f..f2fcde5 100644 (file)
@@ -334,7 +334,7 @@ int         xfs_lookup(struct xfs_inode *dp, struct xfs_name *name,
 int            xfs_create(struct xfs_inode *dp, struct xfs_name *name,
                           umode_t mode, xfs_dev_t rdev, struct xfs_inode **ipp);
 int            xfs_create_tmpfile(struct xfs_inode *dp, struct dentry *dentry,
-                          umode_t mode);
+                          umode_t mode, struct xfs_inode **ipp);
 int            xfs_remove(struct xfs_inode *dp, struct xfs_name *name,
                           struct xfs_inode *ip);
 int            xfs_link(struct xfs_inode *tdp, struct xfs_inode *sip,
index 89b07e4..ef1ca01 100644 (file)
@@ -1053,11 +1053,25 @@ xfs_vn_tmpfile(
        struct dentry   *dentry,
        umode_t         mode)
 {
-       int             error;
+       int                     error;
+       struct xfs_inode        *ip;
+       struct inode            *inode;
 
-       error = xfs_create_tmpfile(XFS_I(dir), dentry, mode);
+       error = xfs_create_tmpfile(XFS_I(dir), dentry, mode, &ip);
+       if (unlikely(error))
+               return -error;
 
-       return -error;
+       inode = VFS_I(ip);
+
+       error = xfs_init_security(inode, dir, &dentry->d_name);
+       if (unlikely(error)) {
+               iput(inode);
+               return -error;
+       }
+
+       d_tmpfile(dentry, inode);
+
+       return 0;
 }
 
 static const struct inode_operations xfs_inode_operations = {
index 8497a00..08624dc 100644 (file)
@@ -1181,11 +1181,14 @@ xlog_iodone(xfs_buf_t *bp)
        /* log I/O is always issued ASYNC */
        ASSERT(XFS_BUF_ISASYNC(bp));
        xlog_state_done_syncing(iclog, aborted);
+
        /*
-        * do not reference the buffer (bp) here as we could race
-        * with it being freed after writing the unmount record to the
-        * log.
+        * drop the buffer lock now that we are done. Nothing references
+        * the buffer after this, so an unmount waiting on this lock can now
+        * tear it down safely. As such, it is unsafe to reference the buffer
+        * (bp) after the unlock as we could race with it being freed.
         */
+       xfs_buf_unlock(bp);
 }
 
 /*
@@ -1368,8 +1371,16 @@ xlog_alloc_log(
        bp = xfs_buf_alloc(mp->m_logdev_targp, 0, BTOBB(log->l_iclog_size), 0);
        if (!bp)
                goto out_free_log;
-       bp->b_iodone = xlog_iodone;
+
+       /*
+        * The iclogbuf buffer locks are held over IO but we are not going to do
+        * IO yet.  Hence unlock the buffer so that the log IO path can grab it
+        * when appropriately.
+        */
        ASSERT(xfs_buf_islocked(bp));
+       xfs_buf_unlock(bp);
+
+       bp->b_iodone = xlog_iodone;
        log->l_xbuf = bp;
 
        spin_lock_init(&log->l_icloglock);
@@ -1398,6 +1409,9 @@ xlog_alloc_log(
                if (!bp)
                        goto out_free_iclog;
 
+               ASSERT(xfs_buf_islocked(bp));
+               xfs_buf_unlock(bp);
+
                bp->b_iodone = xlog_iodone;
                iclog->ic_bp = bp;
                iclog->ic_data = bp->b_addr;
@@ -1422,7 +1436,6 @@ xlog_alloc_log(
                iclog->ic_callback_tail = &(iclog->ic_callback);
                iclog->ic_datap = (char *)iclog->ic_data + log->l_iclog_hsize;
 
-               ASSERT(xfs_buf_islocked(iclog->ic_bp));
                init_waitqueue_head(&iclog->ic_force_wait);
                init_waitqueue_head(&iclog->ic_write_wait);
 
@@ -1631,6 +1644,12 @@ xlog_cksum(
  * we transition the iclogs to IOERROR state *after* flushing all existing
  * iclogs to disk. This is because we don't want anymore new transactions to be
  * started or completed afterwards.
+ *
+ * We lock the iclogbufs here so that we can serialise against IO completion
+ * during unmount. We might be processing a shutdown triggered during unmount,
+ * and that can occur asynchronously to the unmount thread, and hence we need to
+ * ensure that completes before tearing down the iclogbufs. Hence we need to
+ * hold the buffer lock across the log IO to acheive that.
  */
 STATIC int
 xlog_bdstrat(
@@ -1638,6 +1657,7 @@ xlog_bdstrat(
 {
        struct xlog_in_core     *iclog = bp->b_fspriv;
 
+       xfs_buf_lock(bp);
        if (iclog->ic_state & XLOG_STATE_IOERROR) {
                xfs_buf_ioerror(bp, EIO);
                xfs_buf_stale(bp);
@@ -1645,7 +1665,8 @@ xlog_bdstrat(
                /*
                 * It would seem logical to return EIO here, but we rely on
                 * the log state machine to propagate I/O errors instead of
-                * doing it here.
+                * doing it here. Similarly, IO completion will unlock the
+                * buffer, so we don't do it here.
                 */
                return 0;
        }
@@ -1847,14 +1868,28 @@ xlog_dealloc_log(
        xlog_cil_destroy(log);
 
        /*
-        * always need to ensure that the extra buffer does not point to memory
-        * owned by another log buffer before we free it.
+        * Cycle all the iclogbuf locks to make sure all log IO completion
+        * is done before we tear down these buffers.
         */
+       iclog = log->l_iclog;
+       for (i = 0; i < log->l_iclog_bufs; i++) {
+               xfs_buf_lock(iclog->ic_bp);
+               xfs_buf_unlock(iclog->ic_bp);
+               iclog = iclog->ic_next;
+       }
+
+       /*
+        * Always need to ensure that the extra buffer does not point to memory
+        * owned by another log buffer before we free it. Also, cycle the lock
+        * first to ensure we've completed IO on it.
+        */
+       xfs_buf_lock(log->l_xbuf);
+       xfs_buf_unlock(log->l_xbuf);
        xfs_buf_set_empty(log->l_xbuf, BTOBB(log->l_iclog_size));
        xfs_buf_free(log->l_xbuf);
 
        iclog = log->l_iclog;
-       for (i=0; i<log->l_iclog_bufs; i++) {
+       for (i = 0; i < log->l_iclog_bufs; i++) {
                xfs_buf_free(iclog->ic_bp);
                next_iclog = iclog->ic_next;
                kmem_free(iclog);
index a4ae41c..65d8c79 100644 (file)
@@ -603,6 +603,7 @@ DEFINE_INODE_EVENT(xfs_readlink);
 DEFINE_INODE_EVENT(xfs_inactive_symlink);
 DEFINE_INODE_EVENT(xfs_alloc_file_space);
 DEFINE_INODE_EVENT(xfs_free_file_space);
+DEFINE_INODE_EVENT(xfs_zero_file_space);
 DEFINE_INODE_EVENT(xfs_collapse_file_space);
 DEFINE_INODE_EVENT(xfs_readdir);
 #ifdef CONFIG_XFS_POSIX_ACL
index 262dcbb..024fd03 100644 (file)
@@ -220,7 +220,6 @@ enum {
        BPF_S_ANC_RXHASH,
        BPF_S_ANC_CPU,
        BPF_S_ANC_ALU_XOR_X,
-       BPF_S_ANC_SECCOMP_LD_W,
        BPF_S_ANC_VLAN_TAG,
        BPF_S_ANC_VLAN_TAG_PRESENT,
        BPF_S_ANC_PAY_OFFSET,
index 1f9f56e..76d2acb 100644 (file)
@@ -237,7 +237,7 @@ int ipmi_set_maintenance_mode(ipmi_user_t user, int mode);
  * The first user that sets this to TRUE will receive all events that
  * have been queued while no one was waiting for events.
  */
-int ipmi_set_gets_events(ipmi_user_t user, int val);
+int ipmi_set_gets_events(ipmi_user_t user, bool val);
 
 /*
  * Called when a new SMI is registered.  This will also be called on
index 8ea3fe0..bd34924 100644 (file)
@@ -109,12 +109,19 @@ struct ipmi_smi_handlers {
           events from the BMC we are attached to. */
        void (*request_events)(void *send_info);
 
+       /* Called by the upper layer when some user requires that the
+          interface watch for events, received messages, watchdog
+          pretimeouts, or not.  Used by the SMI to know if it should
+          watch for these.  This may be NULL if the SMI does not
+          implement it. */
+       void (*set_need_watch)(void *send_info, bool enable);
+
        /* Called when the interface should go into "run to
           completion" mode.  If this call sets the value to true, the
           interface should make sure that all messages are flushed
           out and that none are pending, and any new requests are run
           to completion immediately. */
-       void (*set_run_to_completion)(void *send_info, int run_to_completion);
+       void (*set_run_to_completion)(void *send_info, bool run_to_completion);
 
        /* Called to poll for work to do.  This is so upper layers can
           poll for operations during things like crash dumps. */
@@ -125,7 +132,7 @@ struct ipmi_smi_handlers {
           setting.  The message handler does the mode handling.  Note
           that this is called from interrupt context, so it cannot
           block. */
-       void (*set_maintenance_mode)(void *send_info, int enable);
+       void (*set_maintenance_mode)(void *send_info, bool enable);
 
        /* Tell the handler that we are using it/not using it.  The
           message handler get the modules that this handler belongs
index ec2ffaf..df78dc2 100644 (file)
@@ -87,7 +87,6 @@ int nf_ct_gre_keymap_add(struct nf_conn *ct, enum ip_conntrack_dir dir,
 /* delete keymap entries */
 void nf_ct_gre_keymap_destroy(struct nf_conn *ct);
 
-void nf_ct_gre_keymap_flush(struct net *net);
 void nf_nat_need_gre(void);
 
 #endif /* __KERNEL__ */
index 919bf21..3bad8d1 100644 (file)
@@ -374,6 +374,11 @@ static inline struct device_node *of_find_matching_node_and_match(
        return NULL;
 }
 
+static inline struct device_node *of_find_node_by_path(const char *path)
+{
+       return NULL;
+}
+
 static inline struct device_node *of_get_parent(const struct device_node *node)
 {
        return NULL;
index 9e7db9e..48bf152 100644 (file)
@@ -20,13 +20,13 @@ enum reboot_mode {
 extern enum reboot_mode reboot_mode;
 
 enum reboot_type {
-       BOOT_TRIPLE = 't',
-       BOOT_KBD = 'k',
-       BOOT_BIOS = 'b',
-       BOOT_ACPI = 'a',
-       BOOT_EFI = 'e',
-       BOOT_CF9 = 'p',
-       BOOT_CF9_COND = 'q',
+       BOOT_TRIPLE     = 't',
+       BOOT_KBD        = 'k',
+       BOOT_BIOS       = 'b',
+       BOOT_ACPI       = 'a',
+       BOOT_EFI        = 'e',
+       BOOT_CF9_FORCE  = 'p',
+       BOOT_CF9_SAFE   = 'q',
 };
 extern enum reboot_type reboot_type;
 
index 46ed958..71c60f4 100644 (file)
@@ -45,7 +45,7 @@ struct dst_entry {
        void                    *__pad1;
 #endif
        int                     (*input)(struct sk_buff *);
-       int                     (*output)(struct sk_buff *);
+       int                     (*output)(struct sock *sk, struct sk_buff *skb);
 
        unsigned short          flags;
 #define DST_HOST               0x0001
@@ -367,7 +367,11 @@ static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb)
        return child;
 }
 
-int dst_discard(struct sk_buff *skb);
+int dst_discard_sk(struct sock *sk, struct sk_buff *skb);
+static inline int dst_discard(struct sk_buff *skb)
+{
+       return dst_discard_sk(skb->sk, skb);
+}
 void *dst_alloc(struct dst_ops *ops, struct net_device *dev, int initial_ref,
                int initial_obsolete, unsigned short flags);
 void __dst_free(struct dst_entry *dst);
@@ -449,9 +453,13 @@ static inline void dst_set_expires(struct dst_entry *dst, int timeout)
 }
 
 /* Output packet to network from transport.  */
+static inline int dst_output_sk(struct sock *sk, struct sk_buff *skb)
+{
+       return skb_dst(skb)->output(sk, skb);
+}
 static inline int dst_output(struct sk_buff *skb)
 {
-       return skb_dst(skb)->output(skb);
+       return dst_output_sk(skb->sk, skb);
 }
 
 /* Input packet from network to transport.  */
index f981ba7..74af137 100644 (file)
@@ -40,7 +40,7 @@ void inet6_csk_reqsk_queue_hash_add(struct sock *sk, struct request_sock *req,
 
 void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr);
 
-int inet6_csk_xmit(struct sk_buff *skb, struct flowi *fl);
+int inet6_csk_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl);
 
 struct dst_entry *inet6_csk_update_pmtu(struct sock *sk, u32 mtu);
 #endif /* _INET6_CONNECTION_SOCK_H */
index c55aeed..7a43138 100644 (file)
@@ -36,7 +36,7 @@ struct tcp_congestion_ops;
  * (i.e. things that depend on the address family)
  */
 struct inet_connection_sock_af_ops {
-       int         (*queue_xmit)(struct sk_buff *skb, struct flowi *fl);
+       int         (*queue_xmit)(struct sock *sk, struct sk_buff *skb, struct flowi *fl);
        void        (*send_check)(struct sock *sk, struct sk_buff *skb);
        int         (*rebuild_header)(struct sock *sk);
        void        (*sk_rx_dst_set)(struct sock *sk, const struct sk_buff *skb);
index 25064c2..3ec2b0f 100644 (file)
@@ -104,14 +104,19 @@ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt,
           struct net_device *orig_dev);
 int ip_local_deliver(struct sk_buff *skb);
 int ip_mr_input(struct sk_buff *skb);
-int ip_output(struct sk_buff *skb);
-int ip_mc_output(struct sk_buff *skb);
+int ip_output(struct sock *sk, struct sk_buff *skb);
+int ip_mc_output(struct sock *sk, struct sk_buff *skb);
 int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *));
 int ip_do_nat(struct sk_buff *skb);
 void ip_send_check(struct iphdr *ip);
 int __ip_local_out(struct sk_buff *skb);
-int ip_local_out(struct sk_buff *skb);
-int ip_queue_xmit(struct sk_buff *skb, struct flowi *fl);
+int ip_local_out_sk(struct sock *sk, struct sk_buff *skb);
+static inline int ip_local_out(struct sk_buff *skb)
+{
+       return ip_local_out_sk(skb->sk, skb);
+}
+
+int ip_queue_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl);
 void ip_init(void);
 int ip_append_data(struct sock *sk, struct flowi4 *fl4,
                   int getfrag(void *from, char *to, int offset, int len,
index 3c3bb18..6c4f5ea 100644 (file)
@@ -32,6 +32,11 @@ struct route_info {
 #define RT6_LOOKUP_F_SRCPREF_PUBLIC    0x00000010
 #define RT6_LOOKUP_F_SRCPREF_COA       0x00000020
 
+/* We do not (yet ?) support IPv6 jumbograms (RFC 2675)
+ * Unlike IPv4, hdr->seg_len doesn't include the IPv6 header
+ */
+#define IP6_MAX_MTU (0xFFFF + sizeof(struct ipv6hdr))
+
 /*
  * rt6_srcprefs2flags() and rt6_flags2srcprefs() translate
  * between IPV6_ADDR_PREFERENCES socket option values
index e77c104..a4daf9e 100644 (file)
@@ -153,7 +153,7 @@ static inline u8 ip_tunnel_ecn_encap(u8 tos, const struct iphdr *iph,
 }
 
 int iptunnel_pull_header(struct sk_buff *skb, int hdr_len, __be16 inner_proto);
-int iptunnel_xmit(struct rtable *rt, struct sk_buff *skb,
+int iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb,
                  __be32 src, __be32 dst, __u8 proto,
                  __u8 tos, __u8 ttl, __be16 df, bool xnet);
 
index 4f541f1..d640925 100644 (file)
@@ -731,7 +731,7 @@ struct dst_entry *ip6_blackhole_route(struct net *net,
  *     skb processing functions
  */
 
-int ip6_output(struct sk_buff *skb);
+int ip6_output(struct sock *sk, struct sk_buff *skb);
 int ip6_forward(struct sk_buff *skb);
 int ip6_input(struct sk_buff *skb);
 int ip6_mc_input(struct sk_buff *skb);
index cf2b7ae..a75fc8e 100644 (file)
@@ -13,6 +13,16 @@ struct nft_cmp_fast_expr {
        u8                      len;
 };
 
+/* Calculate the mask for the nft_cmp_fast expression. On big endian the
+ * mask needs to include the *upper* bytes when interpreting that data as
+ * something smaller than the full u32, therefore a cpu_to_le32 is done.
+ */
+static inline u32 nft_cmp_fast_mask(unsigned int len)
+{
+       return cpu_to_le32(~0U >> (FIELD_SIZEOF(struct nft_cmp_fast_expr,
+                                               data) * BITS_PER_BYTE - len));
+}
+
 extern const struct nft_expr_ops nft_cmp_fast_ops;
 
 int nft_cmp_module_init(void);
index 6ee76c8..d992ca3 100644 (file)
@@ -1653,6 +1653,17 @@ struct sctp_association {
        /* This is the last advertised value of rwnd over a SACK chunk. */
        __u32 a_rwnd;
 
+       /* Number of bytes by which the rwnd has slopped.  The rwnd is allowed
+        * to slop over a maximum of the association's frag_point.
+        */
+       __u32 rwnd_over;
+
+       /* Keeps treack of rwnd pressure.  This happens when we have
+        * a window, but not recevie buffer (i.e small packets).  This one
+        * is releases slowly (1 PMTU at a time ).
+        */
+       __u32 rwnd_press;
+
        /* This is the sndbuf size in use for the association.
         * This corresponds to the sndbuf size for the association,
         * as specified in the sk->sndbuf.
@@ -1881,7 +1892,8 @@ void sctp_assoc_update(struct sctp_association *old,
 __u32 sctp_association_get_next_tsn(struct sctp_association *);
 
 void sctp_assoc_sync_pmtu(struct sock *, struct sctp_association *);
-void sctp_assoc_rwnd_update(struct sctp_association *, bool);
+void sctp_assoc_rwnd_increase(struct sctp_association *, unsigned int);
+void sctp_assoc_rwnd_decrease(struct sctp_association *, unsigned int);
 void sctp_assoc_set_primary(struct sctp_association *,
                            struct sctp_transport *);
 void sctp_assoc_del_nonprimary_peers(struct sctp_association *,
index 32682ae..116e9c7 100644 (file)
@@ -333,7 +333,7 @@ struct xfrm_state_afinfo {
                                                const xfrm_address_t *saddr);
        int                     (*tmpl_sort)(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n);
        int                     (*state_sort)(struct xfrm_state **dst, struct xfrm_state **src, int n);
-       int                     (*output)(struct sk_buff *skb);
+       int                     (*output)(struct sock *sk, struct sk_buff *skb);
        int                     (*output_finish)(struct sk_buff *skb);
        int                     (*extract_input)(struct xfrm_state *x,
                                                 struct sk_buff *skb);
@@ -1540,7 +1540,7 @@ static inline int xfrm4_rcv_spi(struct sk_buff *skb, int nexthdr, __be32 spi)
 
 int xfrm4_extract_output(struct xfrm_state *x, struct sk_buff *skb);
 int xfrm4_prepare_output(struct xfrm_state *x, struct sk_buff *skb);
-int xfrm4_output(struct sk_buff *skb);
+int xfrm4_output(struct sock *sk, struct sk_buff *skb);
 int xfrm4_output_finish(struct sk_buff *skb);
 int xfrm4_rcv_cb(struct sk_buff *skb, u8 protocol, int err);
 int xfrm4_protocol_register(struct xfrm4_protocol *handler, unsigned char protocol);
@@ -1565,7 +1565,7 @@ __be32 xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr);
 __be32 xfrm6_tunnel_spi_lookup(struct net *net, const xfrm_address_t *saddr);
 int xfrm6_extract_output(struct xfrm_state *x, struct sk_buff *skb);
 int xfrm6_prepare_output(struct xfrm_state *x, struct sk_buff *skb);
-int xfrm6_output(struct sk_buff *skb);
+int xfrm6_output(struct sock *sk, struct sk_buff *skb);
 int xfrm6_output_finish(struct sk_buff *skb);
 int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb,
                          u8 **prevhdr);
index e1191c9..5cf6731 100644 (file)
@@ -71,18 +71,17 @@ void mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter,
 
 void debug_mutex_unlock(struct mutex *lock)
 {
-       if (unlikely(!debug_locks))
-               return;
+       if (likely(debug_locks)) {
+               DEBUG_LOCKS_WARN_ON(lock->magic != lock);
 
-       DEBUG_LOCKS_WARN_ON(lock->magic != lock);
+               if (!lock->owner)
+                       DEBUG_LOCKS_WARN_ON(!lock->owner);
+               else
+                       DEBUG_LOCKS_WARN_ON(lock->owner != current);
 
-       if (!lock->owner)
-               DEBUG_LOCKS_WARN_ON(!lock->owner);
-       else
-               DEBUG_LOCKS_WARN_ON(lock->owner != current);
-
-       DEBUG_LOCKS_WARN_ON(!lock->wait_list.prev && !lock->wait_list.next);
-       mutex_clear_owner(lock);
+               DEBUG_LOCKS_WARN_ON(!lock->wait_list.prev && !lock->wait_list.next);
+               mutex_clear_owner(lock);
+       }
 
        /*
         * __mutex_slowpath_needs_to_unlock() is explicitly 0 for debug
index d8d046c..590c379 100644 (file)
@@ -69,18 +69,17 @@ static void populate_seccomp_data(struct seccomp_data *sd)
 {
        struct task_struct *task = current;
        struct pt_regs *regs = task_pt_regs(task);
+       unsigned long args[6];
 
        sd->nr = syscall_get_nr(task, regs);
        sd->arch = syscall_get_arch();
-
-       /* Unroll syscall_get_args to help gcc on arm. */
-       syscall_get_arguments(task, regs, 0, 1, (unsigned long *) &sd->args[0]);
-       syscall_get_arguments(task, regs, 1, 1, (unsigned long *) &sd->args[1]);
-       syscall_get_arguments(task, regs, 2, 1, (unsigned long *) &sd->args[2]);
-       syscall_get_arguments(task, regs, 3, 1, (unsigned long *) &sd->args[3]);
-       syscall_get_arguments(task, regs, 4, 1, (unsigned long *) &sd->args[4]);
-       syscall_get_arguments(task, regs, 5, 1, (unsigned long *) &sd->args[5]);
-
+       syscall_get_arguments(task, regs, 0, 6, args);
+       sd->args[0] = args[0];
+       sd->args[1] = args[1];
+       sd->args[2] = args[2];
+       sd->args[3] = args[3];
+       sd->args[4] = args[4];
+       sd->args[5] = args[5];
        sd->instruction_pointer = KSTK_EIP(task);
 }
 
index 0156612..0a0608e 100644 (file)
@@ -276,7 +276,7 @@ static bool tick_check_preferred(struct clock_event_device *curdev,
 bool tick_check_replacement(struct clock_event_device *curdev,
                            struct clock_event_device *newdev)
 {
-       if (tick_check_percpu(curdev, newdev, smp_processor_id()))
+       if (!tick_check_percpu(curdev, newdev, smp_processor_id()))
                return false;
 
        return tick_check_preferred(curdev, newdev);
index 9f8af69..6558b7a 100644 (file)
@@ -84,6 +84,9 @@ static void tick_do_update_jiffies64(ktime_t now)
 
                /* Keep the tick_next_period variable up to date */
                tick_next_period = ktime_add(last_jiffies_update, tick_period);
+       } else {
+               write_sequnlock(&jiffies_lock);
+               return;
        }
        write_sequnlock(&jiffies_lock);
        update_wall_time();
@@ -967,7 +970,7 @@ static void tick_nohz_switch_to_nohz(void)
        struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched);
        ktime_t next;
 
-       if (!tick_nohz_active)
+       if (!tick_nohz_enabled)
                return;
 
        local_irq_disable();
index 5b781d2..ffd5635 100644 (file)
@@ -58,12 +58,16 @@ int ftrace_create_function_files(struct trace_array *tr,
 {
        int ret;
 
-       /* The top level array uses the "global_ops". */
-       if (!(tr->flags & TRACE_ARRAY_FL_GLOBAL)) {
-               ret = allocate_ftrace_ops(tr);
-               if (ret)
-                       return ret;
-       }
+       /*
+        * The top level array uses the "global_ops", and the files are
+        * created on boot up.
+        */
+       if (tr->flags & TRACE_ARRAY_FL_GLOBAL)
+               return 0;
+
+       ret = allocate_ftrace_ops(tr);
+       if (ret)
+               return ret;
 
        ftrace_create_filter_files(tr->ops, parent);
 
index 930e514..c082a74 100644 (file)
@@ -732,9 +732,15 @@ static int uprobe_buffer_enable(void)
 
 static void uprobe_buffer_disable(void)
 {
+       int cpu;
+
        BUG_ON(!mutex_is_locked(&event_mutex));
 
        if (--uprobe_buffer_refcnt == 0) {
+               for_each_possible_cpu(cpu)
+                       free_page((unsigned long)per_cpu_ptr(uprobe_cpu_buffer,
+                                                            cpu)->buf);
+
                free_percpu(uprobe_cpu_buffer);
                uprobe_cpu_buffer = NULL;
        }
index 0d8f602..bf71b4b 100644 (file)
@@ -152,7 +152,7 @@ static u32 map_id_range_down(struct uid_gid_map *map, u32 id, u32 count)
 
        /* Find the matching extent */
        extents = map->nr_extents;
-       smp_read_barrier_depends();
+       smp_rmb();
        for (idx = 0; idx < extents; idx++) {
                first = map->extent[idx].first;
                last = first + map->extent[idx].count - 1;
@@ -176,7 +176,7 @@ static u32 map_id_down(struct uid_gid_map *map, u32 id)
 
        /* Find the matching extent */
        extents = map->nr_extents;
-       smp_read_barrier_depends();
+       smp_rmb();
        for (idx = 0; idx < extents; idx++) {
                first = map->extent[idx].first;
                last = first + map->extent[idx].count - 1;
@@ -199,7 +199,7 @@ static u32 map_id_up(struct uid_gid_map *map, u32 id)
 
        /* Find the matching extent */
        extents = map->nr_extents;
-       smp_read_barrier_depends();
+       smp_rmb();
        for (idx = 0; idx < extents; idx++) {
                first = map->extent[idx].lower_first;
                last = first + map->extent[idx].count - 1;
@@ -615,9 +615,8 @@ static ssize_t map_write(struct file *file, const char __user *buf,
         * were written before the count of the extents.
         *
         * To achieve this smp_wmb() is used on guarantee the write
-        * order and smp_read_barrier_depends() is guaranteed that we
-        * don't have crazy architectures returning stale data.
-        *
+        * order and smp_rmb() is guaranteed that we don't have crazy
+        * architectures returning stale data.
         */
        mutex_lock(&id_map_mutex);
 
index 14dac06..5b3042e 100644 (file)
@@ -2284,7 +2284,7 @@ EXPORT_SYMBOL(skb_checksum_help);
 __be16 skb_network_protocol(struct sk_buff *skb, int *depth)
 {
        __be16 type = skb->protocol;
-       int vlan_depth = ETH_HLEN;
+       int vlan_depth = skb->mac_len;
 
        /* Tunnel gso handlers can set protocol to ethernet. */
        if (type == htons(ETH_P_TEB)) {
index ca4231e..80d6286 100644 (file)
@@ -142,12 +142,12 @@ loop:
        mutex_unlock(&dst_gc_mutex);
 }
 
-int dst_discard(struct sk_buff *skb)
+int dst_discard_sk(struct sock *sk, struct sk_buff *skb)
 {
        kfree_skb(skb);
        return 0;
 }
-EXPORT_SYMBOL(dst_discard);
+EXPORT_SYMBOL(dst_discard_sk);
 
 const u32 dst_default_metrics[RTAX_MAX + 1] = {
        /* This initializer is needed to force linker to place this variable
@@ -184,7 +184,7 @@ void *dst_alloc(struct dst_ops *ops, struct net_device *dev,
        dst->xfrm = NULL;
 #endif
        dst->input = dst_discard;
-       dst->output = dst_discard;
+       dst->output = dst_discard_sk;
        dst->error = 0;
        dst->obsolete = initial_obsolete;
        dst->header_len = 0;
@@ -209,8 +209,10 @@ static void ___dst_free(struct dst_entry *dst)
        /* The first case (dev==NULL) is required, when
           protocol module is unloaded.
         */
-       if (dst->dev == NULL || !(dst->dev->flags&IFF_UP))
-               dst->input = dst->output = dst_discard;
+       if (dst->dev == NULL || !(dst->dev->flags&IFF_UP)) {
+               dst->input = dst_discard;
+               dst->output = dst_discard_sk;
+       }
        dst->obsolete = DST_OBSOLETE_DEAD;
 }
 
@@ -361,7 +363,8 @@ static void dst_ifdown(struct dst_entry *dst, struct net_device *dev,
                return;
 
        if (!unregister) {
-               dst->input = dst->output = dst_discard;
+               dst->input = dst_discard;
+               dst->output = dst_discard_sk;
        } else {
                dst->dev = dev_net(dst->dev)->loopback_dev;
                dev_hold(dst->dev);
index e08b382..cd58614 100644 (file)
@@ -600,6 +600,9 @@ static u64 __skb_get_nlattr(u64 ctx, u64 A, u64 X, u64 r4, u64 r5)
        if (skb_is_nonlinear(skb))
                return 0;
 
+       if (skb->len < sizeof(struct nlattr))
+               return 0;
+
        if (A > skb->len - sizeof(struct nlattr))
                return 0;
 
@@ -618,11 +621,14 @@ static u64 __skb_get_nlattr_nest(u64 ctx, u64 A, u64 X, u64 r4, u64 r5)
        if (skb_is_nonlinear(skb))
                return 0;
 
+       if (skb->len < sizeof(struct nlattr))
+               return 0;
+
        if (A > skb->len - sizeof(struct nlattr))
                return 0;
 
        nla = (struct nlattr *) &skb->data[A];
-       if (nla->nla_len > A - skb->len)
+       if (nla->nla_len > skb->len - A)
                return 0;
 
        nla = nla_find_nested(nla, X);
@@ -1737,7 +1743,6 @@ void sk_decode_filter(struct sock_filter *filt, struct sock_filter *to)
                [BPF_S_ANC_RXHASH]      = BPF_LD|BPF_B|BPF_ABS,
                [BPF_S_ANC_CPU]         = BPF_LD|BPF_B|BPF_ABS,
                [BPF_S_ANC_ALU_XOR_X]   = BPF_LD|BPF_B|BPF_ABS,
-               [BPF_S_ANC_SECCOMP_LD_W] = BPF_LD|BPF_B|BPF_ABS,
                [BPF_S_ANC_VLAN_TAG]    = BPF_LD|BPF_B|BPF_ABS,
                [BPF_S_ANC_VLAN_TAG_PRESENT] = BPF_LD|BPF_B|BPF_ABS,
                [BPF_S_ANC_PAY_OFFSET]  = BPF_LD|BPF_B|BPF_ABS,
index 8876078..0248e8a 100644 (file)
@@ -138,7 +138,7 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
 
                DCCP_INC_STATS(DCCP_MIB_OUTSEGS);
 
-               err = icsk->icsk_af_ops->queue_xmit(skb, &inet->cork.fl);
+               err = icsk->icsk_af_ops->queue_xmit(sk, skb, &inet->cork.fl);
                return net_xmit_eval(err);
        }
        return -ENOBUFS;
index ce0cbbf..daccc4a 100644 (file)
@@ -752,7 +752,7 @@ static int dn_to_neigh_output(struct sk_buff *skb)
        return n->output(n, skb);
 }
 
-static int dn_output(struct sk_buff *skb)
+static int dn_output(struct sock *sk, struct sk_buff *skb)
 {
        struct dst_entry *dst = skb_dst(skb);
        struct dn_route *rt = (struct dn_route *)dst;
@@ -838,6 +838,18 @@ drop:
  * Used to catch bugs. This should never normally get
  * called.
  */
+static int dn_rt_bug_sk(struct sock *sk, struct sk_buff *skb)
+{
+       struct dn_skb_cb *cb = DN_SKB_CB(skb);
+
+       net_dbg_ratelimited("dn_rt_bug: skb from:%04x to:%04x\n",
+                           le16_to_cpu(cb->src), le16_to_cpu(cb->dst));
+
+       kfree_skb(skb);
+
+       return NET_RX_DROP;
+}
+
 static int dn_rt_bug(struct sk_buff *skb)
 {
        struct dn_skb_cb *cb = DN_SKB_CB(skb);
@@ -1463,7 +1475,7 @@ make_route:
 
        rt->n = neigh;
        rt->dst.lastuse = jiffies;
-       rt->dst.output = dn_rt_bug;
+       rt->dst.output = dn_rt_bug_sk;
        switch (res.type) {
        case RTN_UNICAST:
                rt->dst.input = dn_forward;
index 1a0755f..1cbeba5 100644 (file)
@@ -101,17 +101,17 @@ int __ip_local_out(struct sk_buff *skb)
                       skb_dst(skb)->dev, dst_output);
 }
 
-int ip_local_out(struct sk_buff *skb)
+int ip_local_out_sk(struct sock *sk, struct sk_buff *skb)
 {
        int err;
 
        err = __ip_local_out(skb);
        if (likely(err == 1))
-               err = dst_output(skb);
+               err = dst_output_sk(sk, skb);
 
        return err;
 }
-EXPORT_SYMBOL_GPL(ip_local_out);
+EXPORT_SYMBOL_GPL(ip_local_out_sk);
 
 static inline int ip_select_ttl(struct inet_sock *inet, struct dst_entry *dst)
 {
@@ -226,9 +226,8 @@ static int ip_finish_output(struct sk_buff *skb)
                return ip_finish_output2(skb);
 }
 
-int ip_mc_output(struct sk_buff *skb)
+int ip_mc_output(struct sock *sk, struct sk_buff *skb)
 {
-       struct sock *sk = skb->sk;
        struct rtable *rt = skb_rtable(skb);
        struct net_device *dev = rt->dst.dev;
 
@@ -287,7 +286,7 @@ int ip_mc_output(struct sk_buff *skb)
                            !(IPCB(skb)->flags & IPSKB_REROUTED));
 }
 
-int ip_output(struct sk_buff *skb)
+int ip_output(struct sock *sk, struct sk_buff *skb)
 {
        struct net_device *dev = skb_dst(skb)->dev;
 
@@ -315,9 +314,9 @@ static void ip_copy_addrs(struct iphdr *iph, const struct flowi4 *fl4)
               sizeof(fl4->saddr) + sizeof(fl4->daddr));
 }
 
-int ip_queue_xmit(struct sk_buff *skb, struct flowi *fl)
+/* Note: skb->sk can be different from sk, in case of tunnels */
+int ip_queue_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl)
 {
-       struct sock *sk = skb->sk;
        struct inet_sock *inet = inet_sk(sk);
        struct ip_options_rcu *inet_opt;
        struct flowi4 *fl4;
@@ -389,6 +388,7 @@ packet_routed:
        ip_select_ident_more(skb, &rt->dst, sk,
                             (skb_shinfo(skb)->gso_segs ?: 1) - 1);
 
+       /* TODO : should we use skb->sk here instead of sk ? */
        skb->priority = sk->sk_priority;
        skb->mark = sk->sk_mark;
 
index e77381d..484d0ce 100644 (file)
@@ -670,7 +670,7 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
                return;
        }
 
-       err = iptunnel_xmit(rt, skb, fl4.saddr, fl4.daddr, protocol,
+       err = iptunnel_xmit(skb->sk, rt, skb, fl4.saddr, fl4.daddr, protocol,
                            tos, ttl, df, !net_eq(tunnel->net, dev_net(dev)));
        iptunnel_xmit_stats(err, &dev->stats, dev->tstats);
 
index e0c2b1d..bcf206c 100644 (file)
@@ -46,7 +46,7 @@
 #include <net/netns/generic.h>
 #include <net/rtnetlink.h>
 
-int iptunnel_xmit(struct rtable *rt, struct sk_buff *skb,
+int iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb,
                  __be32 src, __be32 dst, __u8 proto,
                  __u8 tos, __u8 ttl, __be16 df, bool xnet)
 {
@@ -76,7 +76,7 @@ int iptunnel_xmit(struct rtable *rt, struct sk_buff *skb,
        iph->ttl        =       ttl;
        __ip_select_ident(iph, &rt->dst, (skb_shinfo(skb)->gso_segs ?: 1) - 1);
 
-       err = ip_local_out(skb);
+       err = ip_local_out_sk(sk, skb);
        if (unlikely(net_xmit_eval(err)))
                pkt_len = 0;
        return pkt_len;
index f4b19e5..8210964 100644 (file)
@@ -252,26 +252,33 @@ int ping_init_sock(struct sock *sk)
 {
        struct net *net = sock_net(sk);
        kgid_t group = current_egid();
-       struct group_info *group_info = get_current_groups();
-       int i, j, count = group_info->ngroups;
+       struct group_info *group_info;
+       int i, j, count;
        kgid_t low, high;
+       int ret = 0;
 
        inet_get_ping_group_range_net(net, &low, &high);
        if (gid_lte(low, group) && gid_lte(group, high))
                return 0;
 
+       group_info = get_current_groups();
+       count = group_info->ngroups;
        for (i = 0; i < group_info->nblocks; i++) {
                int cp_count = min_t(int, NGROUPS_PER_BLOCK, count);
                for (j = 0; j < cp_count; j++) {
                        kgid_t gid = group_info->blocks[i][j];
                        if (gid_lte(low, gid) && gid_lte(gid, high))
-                               return 0;
+                               goto out_release_group;
                }
 
                count -= cp_count;
        }
 
-       return -EACCES;
+       ret = -EACCES;
+
+out_release_group:
+       put_group_info(group_info);
+       return ret;
 }
 EXPORT_SYMBOL_GPL(ping_init_sock);
 
index 34d094c..1485aaf 100644 (file)
@@ -1129,7 +1129,7 @@ static void ipv4_link_failure(struct sk_buff *skb)
                dst_set_expires(&rt->dst, 0);
 }
 
-static int ip_rt_bug(struct sk_buff *skb)
+static int ip_rt_bug(struct sock *sk, struct sk_buff *skb)
 {
        pr_debug("%s: %pI4 -> %pI4, %s\n",
                 __func__, &ip_hdr(skb)->saddr, &ip_hdr(skb)->daddr,
@@ -2218,7 +2218,7 @@ struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_or
 
                new->__use = 1;
                new->input = dst_discard;
-               new->output = dst_discard;
+               new->output = dst_discard_sk;
 
                new->dev = ort->dst.dev;
                if (new->dev)
@@ -2357,7 +2357,7 @@ static int rt_fill_info(struct net *net,  __be32 dst, __be32 src,
                        }
                } else
 #endif
-                       if (nla_put_u32(skb, RTA_IIF, rt->rt_iif))
+                       if (nla_put_u32(skb, RTA_IIF, skb->dev->ifindex))
                                goto nla_put_failure;
        }
 
index 699fb10..025e250 100644 (file)
@@ -981,7 +981,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
                TCP_ADD_STATS(sock_net(sk), TCP_MIB_OUTSEGS,
                              tcp_skb_pcount(skb));
 
-       err = icsk->icsk_af_ops->queue_xmit(skb, &inet->cork.fl);
+       err = icsk->icsk_af_ops->queue_xmit(sk, skb, &inet->cork.fl);
        if (likely(err <= 0))
                return err;
 
index baa0f63..40e701f 100644 (file)
@@ -86,7 +86,7 @@ int xfrm4_output_finish(struct sk_buff *skb)
        return xfrm_output(skb);
 }
 
-int xfrm4_output(struct sk_buff *skb)
+int xfrm4_output(struct sock *sk, struct sk_buff *skb)
 {
        struct dst_entry *dst = skb_dst(skb);
        struct xfrm_state *x = dst->xfrm;
index c913818..d4ade34 100644 (file)
@@ -224,9 +224,8 @@ static struct dst_entry *inet6_csk_route_socket(struct sock *sk,
        return dst;
 }
 
-int inet6_csk_xmit(struct sk_buff *skb, struct flowi *fl_unused)
+int inet6_csk_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl_unused)
 {
-       struct sock *sk = skb->sk;
        struct ipv6_pinfo *np = inet6_sk(sk);
        struct flowi6 fl6;
        struct dst_entry *dst;
index c98338b..9d92146 100644 (file)
@@ -1559,6 +1559,15 @@ static int ip6gre_changelink(struct net_device *dev, struct nlattr *tb[],
        return 0;
 }
 
+static void ip6gre_dellink(struct net_device *dev, struct list_head *head)
+{
+       struct net *net = dev_net(dev);
+       struct ip6gre_net *ign = net_generic(net, ip6gre_net_id);
+
+       if (dev != ign->fb_tunnel_dev)
+               unregister_netdevice_queue(dev, head);
+}
+
 static size_t ip6gre_get_size(const struct net_device *dev)
 {
        return
@@ -1636,6 +1645,7 @@ static struct rtnl_link_ops ip6gre_link_ops __read_mostly = {
        .validate       = ip6gre_tunnel_validate,
        .newlink        = ip6gre_newlink,
        .changelink     = ip6gre_changelink,
+       .dellink        = ip6gre_dellink,
        .get_size       = ip6gre_get_size,
        .fill_info      = ip6gre_fill_info,
 };
index 3284d61..40e7581 100644 (file)
@@ -132,7 +132,7 @@ static int ip6_finish_output(struct sk_buff *skb)
                return ip6_finish_output2(skb);
 }
 
-int ip6_output(struct sk_buff *skb)
+int ip6_output(struct sock *sk, struct sk_buff *skb)
 {
        struct net_device *dev = skb_dst(skb)->dev;
        struct inet6_dev *idev = ip6_dst_idev(skb_dst(skb));
index 5015c50..4011617 100644 (file)
@@ -84,9 +84,9 @@ static void           ip6_dst_ifdown(struct dst_entry *,
 static int              ip6_dst_gc(struct dst_ops *ops);
 
 static int             ip6_pkt_discard(struct sk_buff *skb);
-static int             ip6_pkt_discard_out(struct sk_buff *skb);
+static int             ip6_pkt_discard_out(struct sock *sk, struct sk_buff *skb);
 static int             ip6_pkt_prohibit(struct sk_buff *skb);
-static int             ip6_pkt_prohibit_out(struct sk_buff *skb);
+static int             ip6_pkt_prohibit_out(struct sock *sk, struct sk_buff *skb);
 static void            ip6_link_failure(struct sk_buff *skb);
 static void            ip6_rt_update_pmtu(struct dst_entry *dst, struct sock *sk,
                                           struct sk_buff *skb, u32 mtu);
@@ -290,7 +290,7 @@ static const struct rt6_info ip6_blk_hole_entry_template = {
                .obsolete       = DST_OBSOLETE_FORCE_CHK,
                .error          = -EINVAL,
                .input          = dst_discard,
-               .output         = dst_discard,
+               .output         = dst_discard_sk,
        },
        .rt6i_flags     = (RTF_REJECT | RTF_NONEXTHOP),
        .rt6i_protocol  = RTPROT_KERNEL,
@@ -1058,7 +1058,7 @@ struct dst_entry *ip6_blackhole_route(struct net *net, struct dst_entry *dst_ori
 
                new->__use = 1;
                new->input = dst_discard;
-               new->output = dst_discard;
+               new->output = dst_discard_sk;
 
                if (dst_metrics_read_only(&ort->dst))
                        new->_metrics = ort->dst._metrics;
@@ -1338,7 +1338,7 @@ static unsigned int ip6_mtu(const struct dst_entry *dst)
        unsigned int mtu = dst_metric_raw(dst, RTAX_MTU);
 
        if (mtu)
-               return mtu;
+               goto out;
 
        mtu = IPV6_MIN_MTU;
 
@@ -1348,7 +1348,8 @@ static unsigned int ip6_mtu(const struct dst_entry *dst)
                mtu = idev->cnf.mtu6;
        rcu_read_unlock();
 
-       return mtu;
+out:
+       return min_t(unsigned int, mtu, IP6_MAX_MTU);
 }
 
 static struct dst_entry *icmp6_dst_gc_list;
@@ -1576,7 +1577,7 @@ int ip6_route_add(struct fib6_config *cfg)
                switch (cfg->fc_type) {
                case RTN_BLACKHOLE:
                        rt->dst.error = -EINVAL;
-                       rt->dst.output = dst_discard;
+                       rt->dst.output = dst_discard_sk;
                        rt->dst.input = dst_discard;
                        break;
                case RTN_PROHIBIT:
@@ -2128,7 +2129,7 @@ static int ip6_pkt_discard(struct sk_buff *skb)
        return ip6_pkt_drop(skb, ICMPV6_NOROUTE, IPSTATS_MIB_INNOROUTES);
 }
 
-static int ip6_pkt_discard_out(struct sk_buff *skb)
+static int ip6_pkt_discard_out(struct sock *sk, struct sk_buff *skb)
 {
        skb->dev = skb_dst(skb)->dev;
        return ip6_pkt_drop(skb, ICMPV6_NOROUTE, IPSTATS_MIB_OUTNOROUTES);
@@ -2139,7 +2140,7 @@ static int ip6_pkt_prohibit(struct sk_buff *skb)
        return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_INNOROUTES);
 }
 
-static int ip6_pkt_prohibit_out(struct sk_buff *skb)
+static int ip6_pkt_prohibit_out(struct sock *sk, struct sk_buff *skb)
 {
        skb->dev = skb_dst(skb)->dev;
        return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
index 1693c8d..8da8268 100644 (file)
@@ -974,8 +974,9 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
                goto out;
        }
 
-       err = iptunnel_xmit(rt, skb, fl4.saddr, fl4.daddr, IPPROTO_IPV6, tos,
-                           ttl, df, !net_eq(tunnel->net, dev_net(dev)));
+       err = iptunnel_xmit(skb->sk, rt, skb, fl4.saddr, fl4.daddr,
+                           IPPROTO_IPV6, tos, ttl, df,
+                           !net_eq(tunnel->net, dev_net(dev)));
        iptunnel_xmit_stats(err, &dev->stats, dev->tstats);
        return NETDEV_TX_OK;
 
index 6cd625e..19ef329 100644 (file)
@@ -163,7 +163,7 @@ static int __xfrm6_output(struct sk_buff *skb)
        return x->outer_mode->afinfo->output_finish(skb);
 }
 
-int xfrm6_output(struct sk_buff *skb)
+int xfrm6_output(struct sock *sk, struct sk_buff *skb)
 {
        return NF_HOOK(NFPROTO_IPV6, NF_INET_POST_ROUTING, skb, NULL,
                       skb_dst(skb)->dev, __xfrm6_output);
index 47f7a54..a4e37d7 100644 (file)
@@ -1131,10 +1131,10 @@ static int l2tp_xmit_core(struct l2tp_session *session, struct sk_buff *skb,
        skb->local_df = 1;
 #if IS_ENABLED(CONFIG_IPV6)
        if (tunnel->sock->sk_family == PF_INET6 && !tunnel->v4mapped)
-               error = inet6_csk_xmit(skb, NULL);
+               error = inet6_csk_xmit(tunnel->sock, skb, NULL);
        else
 #endif
-               error = ip_queue_xmit(skb, fl);
+               error = ip_queue_xmit(tunnel->sock, skb, fl);
 
        /* Update stats */
        if (error >= 0) {
index 0b44d85..3397fe6 100644 (file)
@@ -487,7 +487,7 @@ static int l2tp_ip_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m
 
 xmit:
        /* Queue the packet to IP for output */
-       rc = ip_queue_xmit(skb, &inet->cork.fl);
+       rc = ip_queue_xmit(sk, skb, &inet->cork.fl);
        rcu_read_unlock();
 
 error:
index 6dba48e..75421f2 100644 (file)
@@ -1795,6 +1795,7 @@ int nf_conntrack_init_net(struct net *net)
        int cpu;
 
        atomic_set(&net->ct.count, 0);
+       seqcount_init(&net->ct.generation);
 
        net->ct.pcpu_lists = alloc_percpu(struct ct_pcpu);
        if (!net->ct.pcpu_lists)
index 7bd03de..825c3e3 100644 (file)
@@ -605,32 +605,14 @@ static struct nf_conntrack_helper pptp __read_mostly = {
        .expect_policy          = &pptp_exp_policy,
 };
 
-static void nf_conntrack_pptp_net_exit(struct net *net)
-{
-       nf_ct_gre_keymap_flush(net);
-}
-
-static struct pernet_operations nf_conntrack_pptp_net_ops = {
-       .exit = nf_conntrack_pptp_net_exit,
-};
-
 static int __init nf_conntrack_pptp_init(void)
 {
-       int rv;
-
-       rv = nf_conntrack_helper_register(&pptp);
-       if (rv < 0)
-               return rv;
-       rv = register_pernet_subsys(&nf_conntrack_pptp_net_ops);
-       if (rv < 0)
-               nf_conntrack_helper_unregister(&pptp);
-       return rv;
+       return nf_conntrack_helper_register(&pptp);
 }
 
 static void __exit nf_conntrack_pptp_fini(void)
 {
        nf_conntrack_helper_unregister(&pptp);
-       unregister_pernet_subsys(&nf_conntrack_pptp_net_ops);
 }
 
 module_init(nf_conntrack_pptp_init);
index 9d9c0da..d566573 100644 (file)
@@ -66,7 +66,7 @@ static inline struct netns_proto_gre *gre_pernet(struct net *net)
        return net_generic(net, proto_gre_net_id);
 }
 
-void nf_ct_gre_keymap_flush(struct net *net)
+static void nf_ct_gre_keymap_flush(struct net *net)
 {
        struct netns_proto_gre *net_gre = gre_pernet(net);
        struct nf_ct_gre_keymap *km, *tmp;
@@ -78,7 +78,6 @@ void nf_ct_gre_keymap_flush(struct net *net)
        }
        write_unlock_bh(&net_gre->keymap_lock);
 }
-EXPORT_SYMBOL(nf_ct_gre_keymap_flush);
 
 static inline int gre_key_cmpfn(const struct nf_ct_gre_keymap *km,
                                const struct nf_conntrack_tuple *t)
index 90998a6..8041053 100644 (file)
@@ -25,9 +25,8 @@ static void nft_cmp_fast_eval(const struct nft_expr *expr,
                              struct nft_data data[NFT_REG_MAX + 1])
 {
        const struct nft_cmp_fast_expr *priv = nft_expr_priv(expr);
-       u32 mask;
+       u32 mask = nft_cmp_fast_mask(priv->len);
 
-       mask = ~0U >> (sizeof(priv->data) * BITS_PER_BYTE - priv->len);
        if ((data[priv->sreg].data[0] & mask) == priv->data)
                return;
        data[NFT_REG_VERDICT].verdict = NFT_BREAK;
index 954925d..e2b3f51 100644 (file)
@@ -128,7 +128,7 @@ static int nft_cmp_fast_init(const struct nft_ctx *ctx,
        BUG_ON(err < 0);
        desc.len *= BITS_PER_BYTE;
 
-       mask = ~0U >> (sizeof(priv->data) * BITS_PER_BYTE - desc.len);
+       mask = nft_cmp_fast_mask(desc.len);
        priv->data = data.data[0] & mask;
        priv->len  = desc.len;
        return 0;
index a3d6951..ebb6e24 100644 (file)
@@ -174,7 +174,7 @@ static int gre_tnl_send(struct vport *vport, struct sk_buff *skb)
 
        skb->local_df = 1;
 
-       return iptunnel_xmit(rt, skb, fl.saddr,
+       return iptunnel_xmit(skb->sk, rt, skb, fl.saddr,
                             OVS_CB(skb)->tun_key->ipv4_dst, IPPROTO_GRE,
                             OVS_CB(skb)->tun_key->ipv4_tos,
                             OVS_CB(skb)->tun_key->ipv4_ttl, df, false);
index 4f6d6f9..39579c3 100644 (file)
@@ -1395,35 +1395,44 @@ static inline bool sctp_peer_needs_update(struct sctp_association *asoc)
        return false;
 }
 
-/* Update asoc's rwnd for the approximated state in the buffer,
- * and check whether SACK needs to be sent.
- */
-void sctp_assoc_rwnd_update(struct sctp_association *asoc, bool update_peer)
+/* Increase asoc's rwnd by len and send any window update SACK if needed. */
+void sctp_assoc_rwnd_increase(struct sctp_association *asoc, unsigned int len)
 {
-       int rx_count;
        struct sctp_chunk *sack;
        struct timer_list *timer;
 
-       if (asoc->ep->rcvbuf_policy)
-               rx_count = atomic_read(&asoc->rmem_alloc);
-       else
-               rx_count = atomic_read(&asoc->base.sk->sk_rmem_alloc);
+       if (asoc->rwnd_over) {
+               if (asoc->rwnd_over >= len) {
+                       asoc->rwnd_over -= len;
+               } else {
+                       asoc->rwnd += (len - asoc->rwnd_over);
+                       asoc->rwnd_over = 0;
+               }
+       } else {
+               asoc->rwnd += len;
+       }
 
-       if ((asoc->base.sk->sk_rcvbuf - rx_count) > 0)
-               asoc->rwnd = (asoc->base.sk->sk_rcvbuf - rx_count) >> 1;
-       else
-               asoc->rwnd = 0;
+       /* If we had window pressure, start recovering it
+        * once our rwnd had reached the accumulated pressure
+        * threshold.  The idea is to recover slowly, but up
+        * to the initial advertised window.
+        */
+       if (asoc->rwnd_press && asoc->rwnd >= asoc->rwnd_press) {
+               int change = min(asoc->pathmtu, asoc->rwnd_press);
+               asoc->rwnd += change;
+               asoc->rwnd_press -= change;
+       }
 
-       pr_debug("%s: asoc:%p rwnd=%u, rx_count=%d, sk_rcvbuf=%d\n",
-                __func__, asoc, asoc->rwnd, rx_count,
-                asoc->base.sk->sk_rcvbuf);
+       pr_debug("%s: asoc:%p rwnd increased by %d to (%u, %u) - %u\n",
+                __func__, asoc, len, asoc->rwnd, asoc->rwnd_over,
+                asoc->a_rwnd);
 
        /* Send a window update SACK if the rwnd has increased by at least the
         * minimum of the association's PMTU and half of the receive buffer.
         * The algorithm used is similar to the one described in
         * Section 4.2.3.3 of RFC 1122.
         */
-       if (update_peer && sctp_peer_needs_update(asoc)) {
+       if (sctp_peer_needs_update(asoc)) {
                asoc->a_rwnd = asoc->rwnd;
 
                pr_debug("%s: sending window update SACK- asoc:%p rwnd:%u "
@@ -1445,6 +1454,45 @@ void sctp_assoc_rwnd_update(struct sctp_association *asoc, bool update_peer)
        }
 }
 
+/* Decrease asoc's rwnd by len. */
+void sctp_assoc_rwnd_decrease(struct sctp_association *asoc, unsigned int len)
+{
+       int rx_count;
+       int over = 0;
+
+       if (unlikely(!asoc->rwnd || asoc->rwnd_over))
+               pr_debug("%s: association:%p has asoc->rwnd:%u, "
+                        "asoc->rwnd_over:%u!\n", __func__, asoc,
+                        asoc->rwnd, asoc->rwnd_over);
+
+       if (asoc->ep->rcvbuf_policy)
+               rx_count = atomic_read(&asoc->rmem_alloc);
+       else
+               rx_count = atomic_read(&asoc->base.sk->sk_rmem_alloc);
+
+       /* If we've reached or overflowed our receive buffer, announce
+        * a 0 rwnd if rwnd would still be positive.  Store the
+        * the potential pressure overflow so that the window can be restored
+        * back to original value.
+        */
+       if (rx_count >= asoc->base.sk->sk_rcvbuf)
+               over = 1;
+
+       if (asoc->rwnd >= len) {
+               asoc->rwnd -= len;
+               if (over) {
+                       asoc->rwnd_press += asoc->rwnd;
+                       asoc->rwnd = 0;
+               }
+       } else {
+               asoc->rwnd_over = len - asoc->rwnd;
+               asoc->rwnd = 0;
+       }
+
+       pr_debug("%s: asoc:%p rwnd decreased by %d to (%u, %u, %u)\n",
+                __func__, asoc, len, asoc->rwnd, asoc->rwnd_over,
+                asoc->rwnd_press);
+}
 
 /* Build the bind address list for the association based on info from the
  * local endpoint and the remote peer.
index 4e1d0fc..c09757f 100644 (file)
@@ -957,7 +957,7 @@ static inline int sctp_v4_xmit(struct sk_buff *skb,
 
        SCTP_INC_STATS(sock_net(&inet->sk), SCTP_MIB_OUTSCTPPACKS);
 
-       return ip_queue_xmit(skb, &transport->fl);
+       return ip_queue_xmit(&inet->sk, skb, &transport->fl);
 }
 
 static struct sctp_af sctp_af_inet;
index 01e0024..ae9fbeb 100644 (file)
@@ -6178,7 +6178,7 @@ static int sctp_eat_data(const struct sctp_association *asoc,
         * PMTU.  In cases, such as loopback, this might be a rather
         * large spill over.
         */
-       if ((!chunk->data_accepted) && (!asoc->rwnd ||
+       if ((!chunk->data_accepted) && (!asoc->rwnd || asoc->rwnd_over ||
            (datalen > asoc->rwnd + asoc->frag_point))) {
 
                /* If this is the next TSN, consider reneging to make
index e13519e..ff20e2d 100644 (file)
@@ -2115,6 +2115,12 @@ static int sctp_recvmsg(struct kiocb *iocb, struct sock *sk,
                sctp_skb_pull(skb, copied);
                skb_queue_head(&sk->sk_receive_queue, skb);
 
+               /* When only partial message is copied to the user, increase
+                * rwnd by that amount. If all the data in the skb is read,
+                * rwnd is updated when the event is freed.
+                */
+               if (!sctp_ulpevent_is_notification(event))
+                       sctp_assoc_rwnd_increase(event->asoc, copied);
                goto out;
        } else if ((event->msg_flags & MSG_NOTIFICATION) ||
                   (event->msg_flags & MSG_EOR))
index 8d198ae..85c6465 100644 (file)
@@ -989,7 +989,7 @@ static void sctp_ulpevent_receive_data(struct sctp_ulpevent *event,
        skb = sctp_event2skb(event);
        /* Set the owner and charge rwnd for bytes received.  */
        sctp_ulpevent_set_owner(event, asoc);
-       sctp_assoc_rwnd_update(asoc, false);
+       sctp_assoc_rwnd_decrease(asoc, skb_headlen(skb));
 
        if (!skb->data_len)
                return;
@@ -1011,7 +1011,6 @@ static void sctp_ulpevent_release_data(struct sctp_ulpevent *event)
 {
        struct sk_buff *skb, *frag;
        unsigned int    len;
-       struct sctp_association *asoc;
 
        /* Current stack structures assume that the rcv buffer is
         * per socket.   For UDP style sockets this is not true as
@@ -1036,11 +1035,8 @@ static void sctp_ulpevent_release_data(struct sctp_ulpevent *event)
        }
 
 done:
-       asoc = event->asoc;
-       sctp_association_hold(asoc);
+       sctp_assoc_rwnd_increase(event->asoc, len);
        sctp_ulpevent_release_owner(event);
-       sctp_assoc_rwnd_update(asoc, true);
-       sctp_association_put(asoc);
 }
 
 static void sctp_ulpevent_release_frag_data(struct sctp_ulpevent *event)
index f02f511..c08fbd1 100644 (file)
@@ -1842,7 +1842,7 @@ purge_queue:
        xfrm_pol_put(pol);
 }
 
-static int xdst_queue_output(struct sk_buff *skb)
+static int xdst_queue_output(struct sock *sk, struct sk_buff *skb)
 {
        unsigned long sched_next;
        struct dst_entry *dst = skb_dst(skb);
index 07b0b75..cb09d3f 100644 (file)
@@ -1,13 +1,8 @@
-# liblockdep version
-LL_VERSION = 0
-LL_PATCHLEVEL = 0
-LL_EXTRAVERSION = 1
-
 # file format version
 FILE_VERSION = 1
 
 MAKEFLAGS += --no-print-directory
-
+LIBLOCKDEP_VERSION=$(shell make -sC ../../.. kernelversion)
 
 # Makefiles suck: This macro sets a default value of $(2) for the
 # variable named by $(1), unless the variable has been set by
@@ -98,7 +93,7 @@ export prefix libdir bindir src obj
 libdir_SQ = $(subst ','\'',$(libdir))
 bindir_SQ = $(subst ','\'',$(bindir))
 
-LIB_FILE = liblockdep.a liblockdep.so
+LIB_FILE = liblockdep.a liblockdep.so.$(LIBLOCKDEP_VERSION)
 BIN_FILE = lockdep
 
 CONFIG_INCLUDES =
@@ -110,8 +105,6 @@ N           =
 
 export Q VERBOSE
 
-LIBLOCKDEP_VERSION = $(LL_VERSION).$(LL_PATCHLEVEL).$(LL_EXTRAVERSION)
-
 INCLUDES = -I. -I/usr/local/include -I./uinclude -I./include $(CONFIG_INCLUDES)
 
 # Set compile option CFLAGS if not set elsewhere
@@ -146,7 +139,7 @@ do_app_build =                                              \
 
 do_compile_shared_library =                    \
        ($(print_shared_lib_compile)            \
-       $(CC) --shared $^ -o $@ -lpthread -ldl)
+       $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='"$@"';$(shell ln -s $@ liblockdep.so))
 
 do_build_static_lib =                          \
        ($(print_static_lib_build)              \
@@ -177,7 +170,7 @@ all: all_cmd
 
 all_cmd: $(CMD_TARGETS)
 
-liblockdep.so: $(PEVENT_LIB_OBJS)
+liblockdep.so.$(LIBLOCKDEP_VERSION): $(PEVENT_LIB_OBJS)
        $(Q)$(do_compile_shared_library)
 
 liblockdep.a: $(PEVENT_LIB_OBJS)
index d0f5d6e..c1552c2 100644 (file)
@@ -10,6 +10,9 @@
 
 #define MAX_LOCK_DEPTH 2000UL
 
+#define asmlinkage
+#define __visible
+
 #include "../../../include/linux/lockdep.h"
 
 struct task_struct {
index 1587ea3..baec7d8 100644 (file)
@@ -50,6 +50,18 @@ static int show_warning = 1;
                        warning(fmt, ##__VA_ARGS__);    \
        } while (0)
 
+#define do_warning_event(event, fmt, ...)                      \
+       do {                                                    \
+               if (!show_warning)                              \
+                       continue;                               \
+                                                               \
+               if (event)                                      \
+                       warning("[%s:%s] " fmt, event->system,  \
+                               event->name, ##__VA_ARGS__);    \
+               else                                            \
+                       warning(fmt, ##__VA_ARGS__);            \
+       } while (0)
+
 static void init_input_buf(const char *buf, unsigned long long size)
 {
        input_buf = buf;
@@ -1355,7 +1367,7 @@ static int event_read_fields(struct event_format *event, struct format_field **f
                }
 
                if (!field->type) {
-                       do_warning("%s: no type found", __func__);
+                       do_warning_event(event, "%s: no type found", __func__);
                        goto fail;
                }
                field->name = last_token;
@@ -1402,7 +1414,7 @@ static int event_read_fields(struct event_format *event, struct format_field **f
                                free_token(token);
                                type = read_token(&token);
                                if (type == EVENT_NONE) {
-                                       do_warning("failed to find token");
+                                       do_warning_event(event, "failed to find token");
                                        goto fail;
                                }
                        }
@@ -1636,7 +1648,7 @@ process_cond(struct event_format *event, struct print_arg *top, char **tok)
        right = alloc_arg();
 
        if (!arg || !left || !right) {
-               do_warning("%s: not enough memory!", __func__);
+               do_warning_event(event, "%s: not enough memory!", __func__);
                /* arg will be freed at out_free */
                free_arg(left);
                free_arg(right);
@@ -1686,7 +1698,7 @@ process_array(struct event_format *event, struct print_arg *top, char **tok)
 
        arg = alloc_arg();
        if (!arg) {
-               do_warning("%s: not enough memory!", __func__);
+               do_warning_event(event, "%s: not enough memory!", __func__);
                /* '*tok' is set to top->op.op.  No need to free. */
                *tok = NULL;
                return EVENT_ERROR;
@@ -1792,7 +1804,7 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok)
        if (arg->type == PRINT_OP && !arg->op.left) {
                /* handle single op */
                if (token[1]) {
-                       do_warning("bad op token %s", token);
+                       do_warning_event(event, "bad op token %s", token);
                        goto out_free;
                }
                switch (token[0]) {
@@ -1802,7 +1814,7 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok)
                case '-':
                        break;
                default:
-                       do_warning("bad op token %s", token);
+                       do_warning_event(event, "bad op token %s", token);
                        goto out_free;
 
                }
@@ -1888,7 +1900,7 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok)
                        char *new_atom;
 
                        if (left->type != PRINT_ATOM) {
-                               do_warning("bad pointer type");
+                               do_warning_event(event, "bad pointer type");
                                goto out_free;
                        }
                        new_atom = realloc(left->atom.atom,
@@ -1930,7 +1942,7 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok)
                type = process_array(event, arg, tok);
 
        } else {
-               do_warning("unknown op '%s'", token);
+               do_warning_event(event, "unknown op '%s'", token);
                event->flags |= EVENT_FL_FAILED;
                /* the arg is now the left side */
                goto out_free;
@@ -1951,7 +1963,7 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok)
        return type;
 
 out_warn_free:
-       do_warning("%s: not enough memory!", __func__);
+       do_warning_event(event, "%s: not enough memory!", __func__);
 out_free:
        free_token(token);
        *tok = NULL;
@@ -2385,7 +2397,7 @@ process_flags(struct event_format *event, struct print_arg *arg, char **tok)
 
        field = alloc_arg();
        if (!field) {
-               do_warning("%s: not enough memory!", __func__);
+               do_warning_event(event, "%s: not enough memory!", __func__);
                goto out_free;
        }
 
@@ -2438,7 +2450,7 @@ process_symbols(struct event_format *event, struct print_arg *arg, char **tok)
 
        field = alloc_arg();
        if (!field) {
-               do_warning("%s: not enough memory!", __func__);
+               do_warning_event(event, "%s: not enough memory!", __func__);
                goto out_free;
        }
 
@@ -2477,7 +2489,7 @@ process_hex(struct event_format *event, struct print_arg *arg, char **tok)
 
        field = alloc_arg();
        if (!field) {
-               do_warning("%s: not enough memory!", __func__);
+               do_warning_event(event, "%s: not enough memory!", __func__);
                goto out_free;
        }
 
@@ -2492,7 +2504,7 @@ process_hex(struct event_format *event, struct print_arg *arg, char **tok)
 
        field = alloc_arg();
        if (!field) {
-               do_warning("%s: not enough memory!", __func__);
+               do_warning_event(event, "%s: not enough memory!", __func__);
                *tok = NULL;
                return EVENT_ERROR;
        }
@@ -2555,7 +2567,7 @@ process_dynamic_array(struct event_format *event, struct print_arg *arg, char **
        free_token(token);
        arg = alloc_arg();
        if (!arg) {
-               do_warning("%s: not enough memory!", __func__);
+               do_warning_event(event, "%s: not enough memory!", __func__);
                *tok = NULL;
                return EVENT_ERROR;
        }
@@ -2614,13 +2626,14 @@ process_paren(struct event_format *event, struct print_arg *arg, char **tok)
 
                /* prevous must be an atom */
                if (arg->type != PRINT_ATOM) {
-                       do_warning("previous needed to be PRINT_ATOM");
+                       do_warning_event(event, "previous needed to be PRINT_ATOM");
                        goto out_free;
                }
 
                item_arg = alloc_arg();
                if (!item_arg) {
-                       do_warning("%s: not enough memory!", __func__);
+                       do_warning_event(event, "%s: not enough memory!",
+                                        __func__);
                        goto out_free;
                }
 
@@ -2721,21 +2734,24 @@ process_func_handler(struct event_format *event, struct pevent_function_handler
        for (i = 0; i < func->nr_args; i++) {
                farg = alloc_arg();
                if (!farg) {
-                       do_warning("%s: not enough memory!", __func__);
+                       do_warning_event(event, "%s: not enough memory!",
+                                        __func__);
                        return EVENT_ERROR;
                }
 
                type = process_arg(event, farg, &token);
                if (i < (func->nr_args - 1)) {
                        if (type != EVENT_DELIM || strcmp(token, ",") != 0) {
-                               warning("Error: function '%s()' expects %d arguments but event %s only uses %d",
+                               do_warning_event(event,
+                                       "Error: function '%s()' expects %d arguments but event %s only uses %d",
                                        func->name, func->nr_args,
                                        event->name, i + 1);
                                goto err;
                        }
                } else {
                        if (type != EVENT_DELIM || strcmp(token, ")") != 0) {
-                               warning("Error: function '%s()' only expects %d arguments but event %s has more",
+                               do_warning_event(event,
+                                       "Error: function '%s()' only expects %d arguments but event %s has more",
                                        func->name, func->nr_args, event->name);
                                goto err;
                        }
@@ -2792,7 +2808,7 @@ process_function(struct event_format *event, struct print_arg *arg,
                return process_func_handler(event, func, arg, tok);
        }
 
-       do_warning("function %s not defined", token);
+       do_warning_event(event, "function %s not defined", token);
        free_token(token);
        return EVENT_ERROR;
 }
@@ -2878,7 +2894,7 @@ process_arg_token(struct event_format *event, struct print_arg *arg,
 
        case EVENT_ERROR ... EVENT_NEWLINE:
        default:
-               do_warning("unexpected type %d", type);
+               do_warning_event(event, "unexpected type %d", type);
                return EVENT_ERROR;
        }
        *tok = token;
@@ -2901,7 +2917,8 @@ static int event_read_print_args(struct event_format *event, struct print_arg **
 
                arg = alloc_arg();
                if (!arg) {
-                       do_warning("%s: not enough memory!", __func__);
+                       do_warning_event(event, "%s: not enough memory!",
+                                        __func__);
                        return -1;
                }
 
@@ -3481,11 +3498,12 @@ eval_num_arg(void *data, int size, struct event_format *event, struct print_arg
        return val;
 
 out_warning_op:
-       do_warning("%s: unknown op '%s'", __func__, arg->op.op);
+       do_warning_event(event, "%s: unknown op '%s'", __func__, arg->op.op);
        return 0;
 
 out_warning_field:
-       do_warning("%s: field %s not found", __func__, arg->field.name);
+       do_warning_event(event, "%s: field %s not found",
+                        __func__, arg->field.name);
        return 0;
 }
 
@@ -3591,7 +3609,8 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
                }
                str = malloc(len + 1);
                if (!str) {
-                       do_warning("%s: not enough memory!", __func__);
+                       do_warning_event(event, "%s: not enough memory!",
+                                        __func__);
                        return;
                }
                memcpy(str, data + field->offset, len);
@@ -3697,7 +3716,8 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
        return;
 
 out_warning_field:
-       do_warning("%s: field %s not found", __func__, arg->field.name);
+       do_warning_event(event, "%s: field %s not found",
+                        __func__, arg->field.name);
 }
 
 static unsigned long long
@@ -3742,14 +3762,16 @@ process_defined_func(struct trace_seq *s, void *data, int size,
                        trace_seq_terminate(&str);
                        string = malloc(sizeof(*string));
                        if (!string) {
-                               do_warning("%s(%d): malloc str", __func__, __LINE__);
+                               do_warning_event(event, "%s(%d): malloc str",
+                                                __func__, __LINE__);
                                goto out_free;
                        }
                        string->next = strings;
                        string->str = strdup(str.buffer);
                        if (!string->str) {
                                free(string);
-                               do_warning("%s(%d): malloc str", __func__, __LINE__);
+                               do_warning_event(event, "%s(%d): malloc str",
+                                                __func__, __LINE__);
                                goto out_free;
                        }
                        args[i] = (uintptr_t)string->str;
@@ -3761,7 +3783,7 @@ process_defined_func(struct trace_seq *s, void *data, int size,
                         * Something went totally wrong, this is not
                         * an input error, something in this code broke.
                         */
-                       do_warning("Unexpected end of arguments\n");
+                       do_warning_event(event, "Unexpected end of arguments\n");
                        goto out_free;
                }
                farg = farg->next;
@@ -3811,12 +3833,12 @@ static struct print_arg *make_bprint_args(char *fmt, void *data, int size, struc
        if (!field) {
                field = pevent_find_field(event, "buf");
                if (!field) {
-                       do_warning("can't find buffer field for binary printk");
+                       do_warning_event(event, "can't find buffer field for binary printk");
                        return NULL;
                }
                ip_field = pevent_find_field(event, "ip");
                if (!ip_field) {
-                       do_warning("can't find ip field for binary printk");
+                       do_warning_event(event, "can't find ip field for binary printk");
                        return NULL;
                }
                pevent->bprint_buf_field = field;
@@ -3830,7 +3852,8 @@ static struct print_arg *make_bprint_args(char *fmt, void *data, int size, struc
         */
        args = alloc_arg();
        if (!args) {
-               do_warning("%s(%d): not enough memory!", __func__, __LINE__);
+               do_warning_event(event, "%s(%d): not enough memory!",
+                                __func__, __LINE__);
                return NULL;
        }
        arg = args;
@@ -3896,7 +3919,7 @@ static struct print_arg *make_bprint_args(char *fmt, void *data, int size, struc
                                bptr += vsize;
                                arg = alloc_arg();
                                if (!arg) {
-                                       do_warning("%s(%d): not enough memory!",
+                                       do_warning_event(event, "%s(%d): not enough memory!",
                                                   __func__, __LINE__);
                                        goto out_free;
                                }
@@ -3919,7 +3942,7 @@ static struct print_arg *make_bprint_args(char *fmt, void *data, int size, struc
                        case 's':
                                arg = alloc_arg();
                                if (!arg) {
-                                       do_warning("%s(%d): not enough memory!",
+                                       do_warning_event(event, "%s(%d): not enough memory!",
                                                   __func__, __LINE__);
                                        goto out_free;
                                }
@@ -3959,7 +3982,7 @@ get_bprint_format(void *data, int size __maybe_unused,
        if (!field) {
                field = pevent_find_field(event, "fmt");
                if (!field) {
-                       do_warning("can't find format field for binary printk");
+                       do_warning_event(event, "can't find format field for binary printk");
                        return NULL;
                }
                pevent->bprint_fmt_field = field;
@@ -4003,8 +4026,8 @@ static void print_mac_arg(struct trace_seq *s, int mac, void *data, int size,
                arg->field.field =
                        pevent_find_any_field(event, arg->field.name);
                if (!arg->field.field) {
-                       do_warning("%s: field %s not found",
-                                  __func__, arg->field.name);
+                       do_warning_event(event, "%s: field %s not found",
+                                        __func__, arg->field.name);
                        return;
                }
        }
@@ -4176,7 +4199,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event
                        case '*':
                                /* The argument is the length. */
                                if (!arg) {
-                                       do_warning("no argument match");
+                                       do_warning_event(event, "no argument match");
                                        event->flags |= EVENT_FL_FAILED;
                                        goto out_failed;
                                }
@@ -4213,7 +4236,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event
                        case 'X':
                        case 'u':
                                if (!arg) {
-                                       do_warning("no argument match");
+                                       do_warning_event(event, "no argument match");
                                        event->flags |= EVENT_FL_FAILED;
                                        goto out_failed;
                                }
@@ -4223,7 +4246,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event
 
                                /* should never happen */
                                if (len > 31) {
-                                       do_warning("bad format!");
+                                       do_warning_event(event, "bad format!");
                                        event->flags |= EVENT_FL_FAILED;
                                        len = 31;
                                }
@@ -4290,13 +4313,13 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event
                                                trace_seq_printf(s, format, (long long)val);
                                        break;
                                default:
-                                       do_warning("bad count (%d)", ls);
+                                       do_warning_event(event, "bad count (%d)", ls);
                                        event->flags |= EVENT_FL_FAILED;
                                }
                                break;
                        case 's':
                                if (!arg) {
-                                       do_warning("no matching argument");
+                                       do_warning_event(event, "no matching argument");
                                        event->flags |= EVENT_FL_FAILED;
                                        goto out_failed;
                                }
@@ -4306,7 +4329,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event
 
                                /* should never happen */
                                if (len > 31) {
-                                       do_warning("bad format!");
+                                       do_warning_event(event, "bad format!");
                                        event->flags |= EVENT_FL_FAILED;
                                        len = 31;
                                }
index 7065cd6..4464ad7 100644 (file)
@@ -48,6 +48,12 @@ SUBSYSTEM
 'mem'::
        Memory access performance.
 
+'numa'::
+       NUMA scheduling and MM benchmarks.
+
+'futex'::
+       Futex stressing benchmarks.
+
 'all'::
        All benchmark subsystems.
 
@@ -187,6 +193,22 @@ Show only the result with page faults before memset.
 --no-prefault::
 Show only the result without page faults before memset.
 
+SUITES FOR 'numa'
+~~~~~~~~~~~~~~~~~
+*mem*::
+Suite for evaluating NUMA workloads.
+
+SUITES FOR 'futex'
+~~~~~~~~~~~~~~~~~~
+*hash*::
+Suite for evaluating hash tables.
+
+*wake*::
+Suite for evaluating wake calls.
+
+*requeue*::
+Suite for evaluating requeue calls.
+
 SEE ALSO
 --------
 linkperf:perf[1]
index cdd8d49..976b00c 100644 (file)
@@ -87,7 +87,6 @@ Default is to monitor all CPUS.
 --realtime=<priority>::
        Collect data with this RT SCHED_FIFO priority.
 
--s <symbol>::
 --sym-annotate=<symbol>::
         Annotate this symbol.
 
index 50d875d..e969233 100644 (file)
@@ -192,13 +192,13 @@ endif
 export PERL_PATH
 
 $(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
-       $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c
+       $(QUIET_FLEX)$(FLEX) -o $@ --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) util/parse-events.l
 
 $(OUTPUT)util/parse-events-bison.c: util/parse-events.y
        $(QUIET_BISON)$(BISON) -v util/parse-events.y -d $(PARSER_DEBUG_BISON) -o $(OUTPUT)util/parse-events-bison.c -p parse_events_
 
 $(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
-       $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/pmu-flex.h -t util/pmu.l > $(OUTPUT)util/pmu-flex.c
+       $(QUIET_FLEX)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
 
 $(OUTPUT)util/pmu-bison.c: util/pmu.y
        $(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-bison.c -p perf_pmu_
index 97d86d8..ebfa163 100644 (file)
@@ -1593,6 +1593,10 @@ static void init_params(struct params *p, const char *name, int argc, const char
        p->data_rand_walk               = true;
        p->nr_loops                     = -1;
        p->init_random                  = true;
+       p->mb_global_str                = "1";
+       p->nr_proc                      = 1;
+       p->nr_threads                   = 1;
+       p->nr_secs                      = 5;
        p->run_all                      = argc == 1;
 }
 
index 8b0e1c9..65a151e 100644 (file)
@@ -174,13 +174,20 @@ static inline int perf_evsel__nr_cpus(struct perf_evsel *evsel)
 
 static void perf_evsel__reset_stat_priv(struct perf_evsel *evsel)
 {
-       memset(evsel->priv, 0, sizeof(struct perf_stat));
+       int i;
+       struct perf_stat *ps = evsel->priv;
+
+       for (i = 0; i < 3; i++)
+               init_stats(&ps->res_stats[i]);
 }
 
 static int perf_evsel__alloc_stat_priv(struct perf_evsel *evsel)
 {
        evsel->priv = zalloc(sizeof(struct perf_stat));
-       return evsel->priv == NULL ? -ENOMEM : 0;
+       if (evsel == NULL)
+               return -ENOMEM;
+       perf_evsel__reset_stat_priv(evsel);
+       return 0;
 }
 
 static void perf_evsel__free_stat_priv(struct perf_evsel *evsel)
index c234182..ee21fa9 100644 (file)
@@ -65,10 +65,9 @@ ifndef NO_LIBELF
   ifdef LIBDW_DIR
     LIBDW_CFLAGS  := -I$(LIBDW_DIR)/include
     LIBDW_LDFLAGS := -L$(LIBDW_DIR)/lib
-
-    FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind := $(LIBDW_CFLAGS)
-    FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) -ldw
   endif
+  FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind := $(LIBDW_CFLAGS)
+  FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) -ldw
 endif
 
 # include ARCH specific config
@@ -278,6 +277,8 @@ else
       NO_LIBELF := 1
       NO_DWARF := 1
       NO_DEMANGLE := 1
+      NO_LIBUNWIND := 1
+      NO_LIBDW_DWARF_UNWIND := 1
     else
       msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static);
     endif
index 653a8fe..bfb1869 100644 (file)
@@ -504,6 +504,7 @@ static int do_test_code_reading(bool try_kcore)
                if (ret < 0) {
                        if (!excl_kernel) {
                                excl_kernel = true;
+                               perf_evlist__set_maps(evlist, NULL, NULL);
                                perf_evlist__delete(evlist);
                                evlist = NULL;
                                continue;
index df02386..5627621 100644 (file)
@@ -985,7 +985,7 @@ static int debuginfo__find_probes(struct debuginfo *dbg,
 
 #if _ELFUTILS_PREREQ(0, 142)
        /* Get the call frame information from this dwarf */
-       pf->cfi = dwarf_getcfi(dbg->dbg);
+       pf->cfi = dwarf_getcfi_elf(dwarf_getelf(dbg->dbg));
 #endif
 
        off = 0;
@@ -1441,13 +1441,15 @@ static int line_range_walk_cb(const char *fname, int lineno,
                              void *data)
 {
        struct line_finder *lf = data;
+       int err;
 
        if ((strtailcmp(fname, lf->fname) != 0) ||
            (lf->lno_s > lineno || lf->lno_e < lineno))
                return 0;
 
-       if (line_range_add_line(fname, lineno, lf->lr) < 0)
-               return -EINVAL;
+       err = line_range_add_line(fname, lineno, lf->lr);
+       if (err < 0 && err != -EEXIST)
+               return err;
 
        return 0;
 }
@@ -1473,14 +1475,15 @@ static int find_line_range_by_line(Dwarf_Die *sp_die, struct line_finder *lf)
 
 static int line_range_inline_cb(Dwarf_Die *in_die, void *data)
 {
-       find_line_range_by_line(in_die, data);
+       int ret = find_line_range_by_line(in_die, data);
 
        /*
         * We have to check all instances of inlined function, because
         * some execution paths can be optimized out depends on the
-        * function argument of instances
+        * function argument of instances. However, if an error occurs,
+        * it should be handled by the caller.
         */
-       return 0;
+       return ret < 0 ? ret : 0;
 }
 
 /* Search function definition from function name */
index d4b6015..2458a1d 100644 (file)
@@ -97,6 +97,14 @@ static void rtc_irq_eoi_tracking_reset(struct kvm_ioapic *ioapic)
        bitmap_zero(ioapic->rtc_status.dest_map, KVM_MAX_VCPUS);
 }
 
+static void kvm_rtc_eoi_tracking_restore_all(struct kvm_ioapic *ioapic);
+
+static void rtc_status_pending_eoi_check_valid(struct kvm_ioapic *ioapic)
+{
+       if (WARN_ON(ioapic->rtc_status.pending_eoi < 0))
+               kvm_rtc_eoi_tracking_restore_all(ioapic);
+}
+
 static void __rtc_irq_eoi_tracking_restore_one(struct kvm_vcpu *vcpu)
 {
        bool new_val, old_val;
@@ -120,9 +128,8 @@ static void __rtc_irq_eoi_tracking_restore_one(struct kvm_vcpu *vcpu)
        } else {
                __clear_bit(vcpu->vcpu_id, ioapic->rtc_status.dest_map);
                ioapic->rtc_status.pending_eoi--;
+               rtc_status_pending_eoi_check_valid(ioapic);
        }
-
-       WARN_ON(ioapic->rtc_status.pending_eoi < 0);
 }
 
 void kvm_rtc_eoi_tracking_restore_one(struct kvm_vcpu *vcpu)
@@ -149,10 +156,10 @@ static void kvm_rtc_eoi_tracking_restore_all(struct kvm_ioapic *ioapic)
 
 static void rtc_irq_eoi(struct kvm_ioapic *ioapic, struct kvm_vcpu *vcpu)
 {
-       if (test_and_clear_bit(vcpu->vcpu_id, ioapic->rtc_status.dest_map))
+       if (test_and_clear_bit(vcpu->vcpu_id, ioapic->rtc_status.dest_map)) {
                --ioapic->rtc_status.pending_eoi;
-
-       WARN_ON(ioapic->rtc_status.pending_eoi < 0);
+               rtc_status_pending_eoi_check_valid(ioapic);
+       }
 }
 
 static bool rtc_irq_check_coalesced(struct kvm_ioapic *ioapic)
@@ -353,10 +360,16 @@ static int ioapic_service(struct kvm_ioapic *ioapic, int irq, bool line_status)
                ioapic->irr &= ~(1 << irq);
 
        if (irq == RTC_GSI && line_status) {
+               /*
+                * pending_eoi cannot ever become negative (see
+                * rtc_status_pending_eoi_check_valid) and the caller
+                * ensures that it is only called if it is >= zero, namely
+                * if rtc_irq_check_coalesced returns false).
+                */
                BUG_ON(ioapic->rtc_status.pending_eoi != 0);
                ret = kvm_irq_delivery_to_apic(ioapic->kvm, NULL, &irqe,
                                ioapic->rtc_status.dest_map);
-               ioapic->rtc_status.pending_eoi = ret;
+               ioapic->rtc_status.pending_eoi = (ret < 0 ? 0 : ret);
        } else
                ret = kvm_irq_delivery_to_apic(ioapic->kvm, NULL, &irqe, NULL);