diff --git a/patch.sh b/patch.sh
index ad54773d9cdd1b79fe139ca38819d8ed6589abb3..8e4a5cb9f7996cbd7fc25af1c1d79cde22e35a8f 100644
--- a/patch.sh
+++ b/patch.sh
@@ -45,210 +45,6 @@ cleanup () {
 	exit
 }
 
-am33x () {
-	echo "dir: dma"
-	${git} "${DIR}/patches/dma/0001-Without-MACH_-option-Early-printk-DEBUG_LL.patch"
-	${git} "${DIR}/patches/dma/0002-ARM-OMAP-Hack-AM33xx-clock-data-to-allow-JTAG-use.patch"
-	${git} "${DIR}/patches/dma/0003-fb-Rework-locking-to-fix-lock-ordering-on-takeover.patch"
-	${git} "${DIR}/patches/dma/0004-video-st7735fb-add-st7735-framebuffer-driver.patch"
-	${git} "${DIR}/patches/dma/0005-dmaengine-add-helper-function-to-request-a-slave-DMA.patch"
-	${git} "${DIR}/patches/dma/0006-of-Add-generic-device-tree-DMA-helpers.patch"
-	${git} "${DIR}/patches/dma/0007-of-dma-fix-build-break-for-CONFIG_OF.patch"
-	${git} "${DIR}/patches/dma/0008-of-dma-fix-typos-in-generic-dma-binding-definition.patch"
-	${git} "${DIR}/patches/dma/0009-dmaengine-fix-build-failure-due-to-missing-semi-colo.patch"
-	${git} "${DIR}/patches/dma/0010-dmaengine-edma-fix-slave-config-dependency-on-direct.patch"
-	${git} "${DIR}/patches/dma/0011-dmaengine-add-dma_get_channel_caps.patch"
-	${git} "${DIR}/patches/dma/0012-dma-edma-add-device_channel_caps-support.patch"
-	${git} "${DIR}/patches/dma/0013-mmc-davinci-get-SG-segment-limits-with-dma_get_chann.patch"
-	${git} "${DIR}/patches/dma/0014-ARM-davinci-move-private-EDMA-API-to-arm-common.patch"
-	${git} "${DIR}/patches/dma/0015-ARM-edma-remove-unused-transfer-controller-handlers.patch"
-	${git} "${DIR}/patches/dma/0016-ARM-edma-add-AM33XX-support-to-the-private-EDMA-API.patch"
-	${git} "${DIR}/patches/dma/0017-dmaengine-edma-enable-build-for-AM33XX.patch"
-	${git} "${DIR}/patches/dma/0018-dmaengine-edma-Add-TI-EDMA-device-tree-binding.patch"
-	${git} "${DIR}/patches/dma/0019-ARM-dts-add-AM33XX-EDMA-support.patch"
-	${git} "${DIR}/patches/dma/0020-dmaengine-add-dma_request_slave_channel_compat.patch"
-	${git} "${DIR}/patches/dma/0021-mmc-omap_hsmmc-convert-to-dma_request_slave_channel_.patch"
-	${git} "${DIR}/patches/dma/0022-mmc-omap_hsmmc-set-max_segs-based-on-dma-engine-limi.patch"
-	${git} "${DIR}/patches/dma/0023-mmc-omap_hsmmc-add-generic-DMA-request-support-to-th.patch"
-	${git} "${DIR}/patches/dma/0024-ARM-dts-add-AM33XX-MMC-support.patch"
-	${git} "${DIR}/patches/dma/0025-spi-omap2-mcspi-convert-to-dma_request_slave_channel.patch"
-	${git} "${DIR}/patches/dma/0026-spi-omap2-mcspi-add-generic-DMA-request-support-to-t.patch"
-	${git} "${DIR}/patches/dma/0027-ARM-dts-add-AM33XX-SPI-DMA-support.patch"
-	${git} "${DIR}/patches/dma/0028-ARM-dts-Add-SPI-Flash-support-to-am335x-evm.patch"
-	${git} "${DIR}/patches/dma/0029-Documentation-bindings-add-spansion.patch"
-	${git} "${DIR}/patches/dma/0030-ARM-dts-enable-spi1-node-and-pinmux-on-BeagleBone.patch"
-	${git} "${DIR}/patches/dma/0031-ARM-dts-add-BeagleBone-Adafruit-1.8-LCD-support.patch"
-	${git} "${DIR}/patches/dma/0032-misc-add-gpevt-driver.patch"
-	${git} "${DIR}/patches/dma/0033-ARM-dts-add-BeagleBone-gpevt-support.patch"
-	${git} "${DIR}/patches/dma/0034-ARM-configs-working-dmaengine-configs-for-da8xx-and-.patch"
-	${git} "${DIR}/patches/dma/0035-ARM-dts-Add-UART4-support-to-BeagleBone.patch"
-
-	echo "dir: rtc"
-	${git} "${DIR}/patches/rtc/0001-ARM-OMAP2-am33xx-hwmod-Fix-register-offset-NULL-chec.patch"
-	${git} "${DIR}/patches/rtc/0002-rtc-OMAP-Add-system-pm_power_off-to-rtc-driver.patch"
-	${git} "${DIR}/patches/rtc/0003-ARM-dts-AM33XX-Set-pmic-shutdown-controller-for-Beag.patch"
-	${git} "${DIR}/patches/rtc/0004-ARM-dts-AM33XX-Enable-system-power-off-control-in-am.patch"
-
-	echo "dir: pinctrl"
-	${git} "${DIR}/patches/pinctrl/0001-i2c-pinctrl-ify-i2c-omap.c.patch"
-	${git} "${DIR}/patches/pinctrl/0002-arm-dts-AM33XX-Configure-pinmuxs-for-user-leds-contr.patch"
-	${git} "${DIR}/patches/pinctrl/0003-beaglebone-DT-set-default-triggers-for-LEDS.patch"
-	${git} "${DIR}/patches/pinctrl/0004-beaglebone-add-a-cpu-led-trigger.patch"
-
-	echo "dir: cpufreq"
-	${git} "${DIR}/patches/cpufreq/0001-am33xx-DT-add-commented-out-OPP-values-for-ES2.0.patch"
-
-	echo "dir: adc"
-	${git} "${DIR}/patches/adc/0001-input-ti_am335x_tsc-Step-enable-bits-made-configurab.patch"
-	${git} "${DIR}/patches/adc/0002-input-ti_am335x_tsc-Order-of-TSC-wires-made-configur.patch"
-	${git} "${DIR}/patches/adc/0003-input-touchscreen-ti_tsc-remove-unwanted-fifo-flush.patch"
-	${git} "${DIR}/patches/adc/0004-MFD-ti_am335x_tscadc-add-device-tree-binding-informa.patch"
-	${git} "${DIR}/patches/adc/0005-MFD-ti_am335x_tscadc-Add-DT-support.patch"
-	${git} "${DIR}/patches/adc/0006-input-ti_am335x_tsc-Add-DT-support.patch"
-	${git} "${DIR}/patches/adc/0007-IIO-ti_am335x_adc-Add-DT-support.patch"
-	${git} "${DIR}/patches/adc/0008-arm-dts-AM335x-evm-Add-TSC-ADC-MFD-device-support.patch"
-	${git} "${DIR}/patches/adc/0009-ti_tscadc-Update-with-IIO-map-interface-deal-with-pa.patch"
-	${git} "${DIR}/patches/adc/0010-ti_tscadc-Match-mfd-sub-devices-to-regmap-interface.patch"
-	${git} "${DIR}/patches/adc/0011-input-ti_am335x_tsc-Add-variance-filters.patch"
-	${git} "${DIR}/patches/adc/0012-am335x-adc-Do-not-use-find_node_by_name-use-get_chil.patch"
-	${git} "${DIR}/patches/adc/0013-am335x-tsc-Do-not-use-find_node_by_name-use-get_chil.patch"
-	${git} "${DIR}/patches/adc/0014-am335x-tscadc-Do-not-use-find_node_by_name-use-get_c.patch"
-
-	echo "dir: i2c"
-	${git} "${DIR}/patches/i2c/0001-pinctrl-pinctrl-single-must-be-initialized-early.patch"
-	${git} "${DIR}/patches/i2c/0002-Bone-DTS-working-i2c2-i2c3-in-the-tree.patch"
-	${git} "${DIR}/patches/i2c/0003-am33xx-Convert-I2C-from-omap-to-am33xx-names.patch"
-	${git} "${DIR}/patches/i2c/0004-am335x-evm-hack-around-i2c-node-names.patch"
-
-	echo "dir: da8xx-fb"
-	${git} "${DIR}/patches/da8xx-fb/0001-viafb-rename-display_timing-to-via_display_timing.patch"
-	${git} "${DIR}/patches/da8xx-fb/0002-video-add-display_timing-and-videomode.patch"
-	${git} "${DIR}/patches/da8xx-fb/0003-video-add-of-helper-for-display-timings-videomode.patch"
-	${git} "${DIR}/patches/da8xx-fb/0004-fbmon-add-videomode-helpers.patch"
-	${git} "${DIR}/patches/da8xx-fb/0005-fbmon-add-of_videomode-helpers.patch"
-	${git} "${DIR}/patches/da8xx-fb/0006-drm_modes-add-videomode-helpers.patch"
-	${git} "${DIR}/patches/da8xx-fb/0007-drm_modes-add-of_videomode-helpers.patch"
-	${git} "${DIR}/patches/da8xx-fb/0008-fbmon-fix-build-error.patch"
-	${git} "${DIR}/patches/da8xx-fb/0009-of-display-timings-use-of_get_child_by_name.patch"
-	${git} "${DIR}/patches/da8xx-fb/0010-da8xx-Allow-use-by-am33xx-based-devices.patch"
-	${git} "${DIR}/patches/da8xx-fb/0011-video-da8xx-fb-fb_check_var-enhancement.patch"
-	${git} "${DIR}/patches/da8xx-fb/0012-video-da8xx-fb-simplify-lcd_reset.patch"
-	${git} "${DIR}/patches/da8xx-fb/0013-video-da8xx-fb-use-modedb-helper-to-update-var.patch"
-	${git} "${DIR}/patches/da8xx-fb/0014-video-da8xx-fb-remove-unneeded-var-initialization.patch"
-	${git} "${DIR}/patches/da8xx-fb/0015-video-da8xx-fb-store-current-display-information.patch"
-	${git} "${DIR}/patches/da8xx-fb/0016-video-da8xx-fb-store-clk-rate-even-if-CPUFREQ.patch"
-	${git} "${DIR}/patches/da8xx-fb/0017-video-da8xx-fb-pix-clk-and-clk-div-handling-cleanup.patch"
-	${git} "${DIR}/patches/da8xx-fb/0018-video-da8xx-fb-store-struct-device.patch"
-	${git} "${DIR}/patches/da8xx-fb/0019-video-da8xx-fb-report-correct-pixclock.patch"
-	${git} "${DIR}/patches/da8xx-fb/0020-video-da8xx-fb-fb_set_par-support.patch"
-	${git} "${DIR}/patches/da8xx-fb/0021-ARM-dts-AM33XX-Add-lcdc-node.patch"
-	${git} "${DIR}/patches/da8xx-fb/0022-ARM-dts-AM33XX-Add-am335x-evm-lcdc-panel-timings.patch"
-	${git} "${DIR}/patches/da8xx-fb/0023-ARM-dts-AM33XX-Add-am335x-evm-lcdc-pincontrol-info.patch"
-	${git} "${DIR}/patches/da8xx-fb/0024-ARM-dts-AM33XX-Add-am335x-evmsk-lcdc-panel-timings.patch"
-	${git} "${DIR}/patches/da8xx-fb/0025-ARM-dts-AM33XX-Add-am335x-evmsk-lcdc-pincontrol-info.patch"
-	${git} "${DIR}/patches/da8xx-fb/0026-ARM-OMAP-AM33xx-hwmod-Corrects-PWM-subsystem-HWMOD-e.patch"
-	${git} "${DIR}/patches/da8xx-fb/0027-ARM-OMAP-AM33xx-hwmod-Add-parent-child-relationship-.patch"
-	${git} "${DIR}/patches/da8xx-fb/0028-ARM-dts-AM33XX-Add-PWMSS-device-tree-nodes.patch"
-	${git} "${DIR}/patches/da8xx-fb/0029-ARM-dts-AM33XX-Add-PWM-backlight-DT-data-to-am335x-e.patch"
-	${git} "${DIR}/patches/da8xx-fb/0030-ARM-dts-AM33XX-Add-PWM-backlight-DT-data-to-am335x-e.patch"
-	${git} "${DIR}/patches/da8xx-fb/0031-clk-divider-prepare-for-minimum-divider.patch"
-	${git} "${DIR}/patches/da8xx-fb/0032-clk-divider-handle-minimum-divider.patch"
-	${git} "${DIR}/patches/da8xx-fb/0033-ARM-OMAP2-dpll-round-rate-to-closest-value.patch"
-	${git} "${DIR}/patches/da8xx-fb/0034-ARM-OMAP2-dpll-am335x-avoid-freqsel.patch"
-	${git} "${DIR}/patches/da8xx-fb/0035-ARM-OMAP2-clock-DEFINE_STRUCT_CLK_FLAGS-helper.patch"
-	${git} "${DIR}/patches/da8xx-fb/0036-ARM-AM33XX-clock-SET_RATE_PARENT-in-lcd-path.patch"
-	${git} "${DIR}/patches/da8xx-fb/0037-video-da8xx-fb-make-io-operations-safe.patch"
-	${git} "${DIR}/patches/da8xx-fb/0038-video-da8xx-fb-fix-24bpp-raster-configuration.patch"
-	${git} "${DIR}/patches/da8xx-fb/0039-video-da8xx-fb-enable-sync-lost-intr-for-v2-ip.patch"
-	${git} "${DIR}/patches/da8xx-fb/0040-video-da8xx-fb-use-devres.patch"
-	${git} "${DIR}/patches/da8xx-fb/0041-video-da8xx-fb-ensure-non-null-cfg-in-pdata.patch"
-	${git} "${DIR}/patches/da8xx-fb/0042-video-da8xx-fb-reorganize-panel-detection.patch"
-	${git} "${DIR}/patches/da8xx-fb/0043-video-da8xx-fb-minimal-dt-support.patch"
-	${git} "${DIR}/patches/da8xx-fb/0044-video-da8xx-fb-invoke-platform-callback-safely.patch"
-	${git} "${DIR}/patches/da8xx-fb/0045-video-da8xx-fb-obtain-fb_videomode-info-from-dt.patch"
-	${git} "${DIR}/patches/da8xx-fb/0046-video-da8xx-fb-ensure-pdata-only-for-non-dt.patch"
-	${git} "${DIR}/patches/da8xx-fb/0047-video-da8xx-fb-setup-struct-lcd_ctrl_config-for-dt.patch"
-	${git} "${DIR}/patches/da8xx-fb/0048-video-da8xx-fb-CCF-clock-divider-handling.patch"
-
-	echo "dir: pwm"
-	${git} "${DIR}/patches/pwm/0001-pwm_backlight-Add-device-tree-support-for-Low-Thresh.patch"
-	${git} "${DIR}/patches/pwm/0002-Control-module-EHRPWM-clk-enabling.patch"
-	${git} "${DIR}/patches/pwm/0003-pwm-pwm_test-Driver-support-for-PWM-module-testing.patch"
-	${git} "${DIR}/patches/pwm/0004-ARM-OMAP2-PWM-limit-am33xx_register_ehrpwm-to-soc_is.patch"
-	${git} "${DIR}/patches/pwm/0005-pwm-export-of_pwm_request.patch"
-	${git} "${DIR}/patches/pwm/0006-pwm-pwm-tiehrpwm-Update-the-clock-handling-of-pwm-ti.patch"
-	${git} "${DIR}/patches/pwm/0007-ARM-AM33XX-clk-Add-clock-node-for-EHRPWM-TBCLK.patch"
-	${git} "${DIR}/patches/pwm/0008-HACK-am33xx.dtsi-turn-on-all-PWMs.patch"
-
-	echo "dir: mmc"
-	${git} "${DIR}/patches/mmc/0001-am33xx.dtsi-enable-MMC-HSPE-bit-for-all-3-controller.patch"
-	${git} "${DIR}/patches/mmc/0002-omap-hsmmc-Correct-usage-of-of_find_node_by_name.patch"
-	${git} "${DIR}/patches/mmc/0003-mmc-core-expose-RPMB-partition-only-for-CMD23-capabl.patch"
-
-	echo "dir: crypto"
-	${git} "${DIR}/patches/crypto/0001-ARM-OMAP2xxx-hwmod-Convert-SHAM-crypto-device-data-t.patch"
-	${git} "${DIR}/patches/crypto/0002-ARM-OMAP2xxx-hwmod-Add-DMA-support-for-SHAM-module.patch"
-	${git} "${DIR}/patches/crypto/0003-ARM-OMAP3xxx-hwmod-Convert-SHAM-crypto-device-data-t.patch"
-	${git} "${DIR}/patches/crypto/0004-ARM-OMAP2-Remove-unnecessary-message-when-no-SHA-IP-.patch"
-	${git} "${DIR}/patches/crypto/0005-ARM-OMAP2-Only-manually-add-hwmod-data-when-DT-not-u.patch"
-	${git} "${DIR}/patches/crypto/0006-ARM-AM33XX-Add-sha0-crypto-clock-data.patch"
-	${git} "${DIR}/patches/crypto/0007-ARM-AM33XX-hwmod-Update-and-uncomment-SHA0-module-da.patch"
-	${git} "${DIR}/patches/crypto/0008-ARM-dts-Add-SHAM-data-and-documentation-for-AM33XX.patch"
-	${git} "${DIR}/patches/crypto/0009-ARM-OMAP2xxx-hwmod-Convert-AES-crypto-devcie-data-to.patch"
-	${git} "${DIR}/patches/crypto/0010-ARM-OMAP3xxx-hwmod-Convert-AES-crypto-device-data-to.patch"
-	${git} "${DIR}/patches/crypto/0011-ARM-OMAP2-Remove-unnecessary-message-when-no-AES-IP-.patch"
-	${git} "${DIR}/patches/crypto/0012-ARM-OMAP2-Only-manually-add-hwmod-data-when-DT-not-u.patch"
-	${git} "${DIR}/patches/crypto/0013-ARM-AM33XX-Add-aes0-crypto-clock-data.patch"
-	${git} "${DIR}/patches/crypto/0014-ARM-AM33XX-hwmod-Update-and-uncomment-AES0-module-da.patch"
-	${git} "${DIR}/patches/crypto/0015-ARM-dts-Add-AES-data-and-documentation-for-AM33XX.patch"
-	${git} "${DIR}/patches/crypto/0016-crypto-omap-sham-Remove-unnecessary-pr_info-noise.patch"
-	${git} "${DIR}/patches/crypto/0017-crypto-omap-sham-Convert-to-use-pm_runtime-API.patch"
-	${git} "${DIR}/patches/crypto/0018-crypto-omap-sham-Add-suspend-resume-support.patch"
-	${git} "${DIR}/patches/crypto/0019-crypto-omap-sham-Add-code-to-use-dmaengine-API.patch"
-	${git} "${DIR}/patches/crypto/0020-crypto-omap-sham-Remove-usage-of-private-DMA-API.patch"
-	${git} "${DIR}/patches/crypto/0021-crypto-omap-sham-Add-Device-Tree-Support.patch"
-	${git} "${DIR}/patches/crypto/0022-crypto-omap-sham-Convert-to-dma_request_slave_channe.patch"
-	${git} "${DIR}/patches/crypto/0023-crypto-omap-sham-Add-OMAP4-AM33XX-SHAM-Support.patch"
-	${git} "${DIR}/patches/crypto/0024-crypto-omap-sham-Add-SHA224-and-SHA256-Support.patch"
-	${git} "${DIR}/patches/crypto/0025-crypto-omap-aes-Remmove-unnecessary-pr_info-noise.patch"
-	${git} "${DIR}/patches/crypto/0026-crypto-omap-aes-Don-t-reset-controller-for-every-ope.patch"
-	${git} "${DIR}/patches/crypto/0027-crypto-omap-aes-Convert-to-use-pm_runtime-API.patch"
-	${git} "${DIR}/patches/crypto/0028-crypto-omap-aes-Add-suspend-resume-support.patch"
-	${git} "${DIR}/patches/crypto/0029-crypto-omap-aes-Add-code-to-use-dmaengine-API.patch"
-	${git} "${DIR}/patches/crypto/0030-crypto-omap-aes-Remove-usage-of-private-DMA-API.patch"
-	${git} "${DIR}/patches/crypto/0031-crypto-omap-aes-Add-Device-Tree-Support.patch"
-	${git} "${DIR}/patches/crypto/0032-crypto-omap-aes-Convert-to-dma_request_slave_channel.patch"
-	${git} "${DIR}/patches/crypto/0033-crypto-omap-aes-Add-OMAP4-AM33XX-AES-Support.patch"
-	${git} "${DIR}/patches/crypto/0034-crypto-omap-aes-Add-CTR-algorithm-Support.patch"
-
-	echo "dir: 6lowpan"
-	${git} "${DIR}/patches/6lowpan/0001-6lowpan-lowpan_is_iid_16_bit_compressable-does-not-d.patch"
-	${git} "${DIR}/patches/6lowpan/0002-6lowpan-next-header-is-not-properly-set-upon-decompr.patch"
-	${git} "${DIR}/patches/6lowpan/0003-6lowpan-always-enable-link-layer-acknowledgments.patch"
-	${git} "${DIR}/patches/6lowpan/0004-mac802154-turn-on-ACK-when-enabled-by-the-upper-laye.patch"
-	${git} "${DIR}/patches/6lowpan/0005-6lowpan-use-short-IEEE-802.15.4-addresses-for-broadc.patch"
-	${git} "${DIR}/patches/6lowpan/0006-6lowpan-fix-first-fragment-FRAG1-handling.patch"
-	${git} "${DIR}/patches/6lowpan/0007-6lowpan-store-fragment-tag-values-per-device-instead.patch"
-	${git} "${DIR}/patches/6lowpan/0008-6lowpan-obtain-IEEE802.15.4-sequence-number-from-the.patch"
-	${git} "${DIR}/patches/6lowpan/0009-6lowpan-add-a-new-parameter-in-sysfs-to-turn-on-off-.patch"
-	${git} "${DIR}/patches/6lowpan/0010-6lowpan-use-the-PANID-provided-by-the-device-instead.patch"
-	${git} "${DIR}/patches/6lowpan/0011-6lowpan-modify-udp-compression-uncompression-to-matc.patch"
-	${git} "${DIR}/patches/6lowpan/0012-6lowpan-make-memory-allocation-atomic-during-6lowpan.patch"
-	${git} "${DIR}/patches/6lowpan/0013-mac802154-make-mem-alloc-ATOMIC-to-prevent-schedulin.patch"
-	${git} "${DIR}/patches/6lowpan/0014-mac802154-remove-unnecessary-spinlocks.patch"
-	${git} "${DIR}/patches/6lowpan/0015-mac802154-re-introduce-MAC-primitives-required-to-se.patch"
-	${git} "${DIR}/patches/6lowpan/0016-serial-initial-import-of-the-IEEE-802.15.4-serial-dr.patch"
-
-	echo "dir: capebus"
-	${git} "${DIR}/patches/capebus/0001-gpio-keys-Pinctrl-fy.patch"
-	${git} "${DIR}/patches/capebus/0002-tps65217-Allow-placement-elsewhere-than-parent-mfd-d.patch"
-	${git} "${DIR}/patches/capebus/0003-pwm-backlight-Pinctrl-fy.patch"
-	${git} "${DIR}/patches/capebus/0004-ARM-CUSTOM-Build-a-uImage-with-dtb-already-appended.patch"
-	${git} "${DIR}/patches/capebus/0005-beaglebone-create-a-shared-dtsi-for-beaglebone-based.patch"
-	${git} "${DIR}/patches/capebus/0006-beaglebone-enable-emmc-for-bonelt.patch"
-	${git} "${DIR}/patches/capebus/0007-Fix-appended-dtb-rule.patch"
-}
-
 arm () {
 	echo "dir: arm"
 	${git} "${DIR}/patches/arm/0001-kbuild-deb-pkg-set-host-machine-after-dpkg-gencontro.patch"
@@ -256,7 +52,16 @@ arm () {
 	#Status: v2 Review:
 	#http://lists.infradead.org/pipermail/linux-arm-kernel/2012-August/112440.html
 	${git} "${DIR}/patches/arm/0002-arm-add-definition-of-strstr-to-decompress.c.patch"
-	${git} "${DIR}/patches/arm/0003-Without-MACH_-option-Early-printk-DEBUG_LL.patch"
+#	${git} "${DIR}/patches/arm/0003-Without-MACH_-option-Early-printk-DEBUG_LL.patch"
+}
+
+imx () {
+	echo "imx patches"
+	${git} "${DIR}/patches/imx/0001-ARM-imx-Enable-UART1-for-Sabrelite.patch"
+	${git} "${DIR}/patches/imx/0002-Add-IMX6Q-AHCI-support.patch"
+	${git} "${DIR}/patches/imx/0003-imx-Add-IMX53-AHCI-support.patch"
+	${git} "${DIR}/patches/imx/0004-cpufreq-add-imx6q-cpufreq-driver.patch"
+	${git} "${DIR}/patches/imx/0005-SAUCE-imx6-enable-sata-clk-if-SATA_AHCI_PLATFORM.patch"
 }
 
 omap () {
@@ -301,159 +106,8 @@ omap () {
 	${git} "${DIR}/patches/omap_panda/0002-ti-st-st-kim-fixing-firmware-path.patch"
 }
 
-am33x_after () {
-	echo "dir: net"
-	${git} "${DIR}/patches/net/0001-am33xx-cpsw-default-to-ethernet-hwaddr-from-efuse-if.patch"
-	${git} "${DIR}/patches/net/0002-Attempted-SMC911x-BQL-patch.patch"
-	${git} "${DIR}/patches/net/0003-cpsw-Fix-interrupt-storm-among-other-things.patch"
-
-	echo "dir: drm"
-	${git} "${DIR}/patches/drm/0001-am33xx-Add-clock-for-the-lcdc-DRM-driver.patch"
-	${git} "${DIR}/patches/drm/0002-drm-small-fix-in-drm_send_vblank_event.patch"
-	${git} "${DIR}/patches/drm/0003-drm-cma-add-debugfs-helpers.patch"
-	${git} "${DIR}/patches/drm/0004-drm-i2c-encoder-helper-wrappers.patch"
-	${git} "${DIR}/patches/drm/0005-drm-nouveau-use-i2c-encoder-helper-wrappers.patch"
-	${git} "${DIR}/patches/drm/0006-drm-i2c-give-i2c-it-s-own-Kconfig.patch"
-	${git} "${DIR}/patches/drm/0007-drm-tilcdc-add-TI-LCD-Controller-DRM-driver-v4.patch"
-	${git} "${DIR}/patches/drm/0008-drm-i2c-nxp-tda998x-v3.patch"
-	${git} "${DIR}/patches/drm/0009-drm-tilcdc-add-encoder-slave.patch"
-	${git} "${DIR}/patches/drm/0010-drm-tilcdc-add-support-for-LCD-panels-v5.patch"
-	${git} "${DIR}/patches/drm/0011-drm-lcdc-Power-control-GPIO-support.patch"
-
-	echo "dir: not-capebus"
-	${git} "${DIR}/patches/not-capebus/0001-add-dvi-pinmuxes-to-am33xx.dtsi.patch"
-	${git} "${DIR}/patches/not-capebus/0002-add-defconfig-file-to-use-as-.config.patch"
-	${git} "${DIR}/patches/not-capebus/0003-am33xx-musb-Add-OF-definitions.patch"
-	${git} "${DIR}/patches/not-capebus/0004-Mark-the-device-as-PRIVATE.patch"
-	${git} "${DIR}/patches/not-capebus/0005-omap_hsmmc-Bug-fixes-pinctl-gpio-reset.patch"
-	${git} "${DIR}/patches/not-capebus/0006-tps65217-bl-Locate-backlight-node-correctly.patch"
-	${git} "${DIR}/patches/not-capebus/0007-arm-Export-cache-flush-management-symbols-when-MULTI.patch"
-	${git} "${DIR}/patches/not-capebus/0008-am335x-bone-dtsi-Clean-up.patch"
-	${git} "${DIR}/patches/not-capebus/0009-am335x-bone-dtsi-Introduce-new-I2C-entries.patch"
-	${git} "${DIR}/patches/not-capebus/0010-am335x-dt-Add-I2C0-pinctrl-entries.patch"
-	${git} "${DIR}/patches/not-capebus/0011-Cleanup-am33xx.dtsi.patch"
-	${git} "${DIR}/patches/not-capebus/0012-Fix-platform-device-resource-linking.patch"
-	${git} "${DIR}/patches/not-capebus/0013-Link-platform-device-resources-properly.patch"
-	${git} "${DIR}/patches/not-capebus/0014-Properly-handle-resources-for-omap_devices.patch"
-	${git} "${DIR}/patches/not-capebus/0015-omap-Avoid-crashes-in-the-case-of-hwmod-misconfigura.patch"
-	${git} "${DIR}/patches/not-capebus/0016-i2c-EEPROM-In-kernel-memory-accessor-interface.patch"
-	${git} "${DIR}/patches/not-capebus/0017-Fix-util_is_printable_string.patch"
-	${git} "${DIR}/patches/not-capebus/0018-fdtdump-properly-handle-multi-string-properties.patch"
-	${git} "${DIR}/patches/not-capebus/0019-dtc-Dynamic-symbols-fixup-support.patch"
-	${git} "${DIR}/patches/not-capebus/0020-dtc-Add-DTCO-rule-for-DTB-objects.patch"
-	${git} "${DIR}/patches/not-capebus/0021-OF-Compile-Device-Tree-sources-with-resolve-option.patch"
-	${git} "${DIR}/patches/not-capebus/0022-firmware-update-.gitignore-with-dtbo-objects.patch"
-	${git} "${DIR}/patches/not-capebus/0023-OF-Introduce-device-tree-node-flag-helpers.patch"
-	${git} "${DIR}/patches/not-capebus/0024-OF-export-of_property_notify.patch"
-	${git} "${DIR}/patches/not-capebus/0025-OF-Export-all-DT-proc-update-functions.patch"
-	${git} "${DIR}/patches/not-capebus/0026-OF-Introduce-utility-helper-functions.patch"
-	${git} "${DIR}/patches/not-capebus/0027-OF-Introduce-Device-Tree-resolve-support.patch"
-	${git} "${DIR}/patches/not-capebus/0028-OF-Introduce-DT-overlay-support.patch"
-	${git} "${DIR}/patches/not-capebus/0029-capemgr-Capemgr-makefiles-and-Kconfig-fragments.patch"
-	${git} "${DIR}/patches/not-capebus/0030-capemgr-Beaglebone-capemanager.patch"
-	${git} "${DIR}/patches/not-capebus/0031-capemgr-Add-beaglebone-s-cape-driver-bindings.patch"
-	${git} "${DIR}/patches/not-capebus/0032-capemgr-am33xx-family-DT-bindings.patch"
-	${git} "${DIR}/patches/not-capebus/0033-bone-geiger-Geiger-bone-driver.patch"
-	${git} "${DIR}/patches/not-capebus/0034-capemgr-firmware-makefiles-for-DT-objects.patch"
-	${git} "${DIR}/patches/not-capebus/0035-capemgr-emmc2-cape-definition.patch"
-	${git} "${DIR}/patches/not-capebus/0036-capemgr-DVI-capes-definitions.patch"
-	${git} "${DIR}/patches/not-capebus/0037-capemgr-Geiger-cape-definition.patch"
-	${git} "${DIR}/patches/not-capebus/0038-capemgr-LCD3-cape-definition.patch"
-	${git} "${DIR}/patches/not-capebus/0039-capemgr-Add-weather-cape-definition.patch"
-	${git} "${DIR}/patches/not-capebus/0040-ehrpwm-add-missing-dts-nodes.patch"
-	${git} "${DIR}/patches/not-capebus/0041-am33xx-DT-Update-am33xx.dsi-with-the-new-PWM-DT-bind.patch"
-	${git} "${DIR}/patches/not-capebus/0042-geiger-cape-Update-to-using-the-new-PWM-interface.patch"
-	${git} "${DIR}/patches/not-capebus/0043-lcd3-cape-Change-into-using-the-lcdc-DRM-driver-inst.patch"
-	${git} "${DIR}/patches/not-capebus/0044-am33xx-Add-default-config.patch"
-	${git} "${DIR}/patches/not-capebus/0045-lcd3-cape-Convert-to-using-the-proper-touchscreen-dr.patch"
-	${git} "${DIR}/patches/not-capebus/0046-geiger-cape-Convert-to-using-the-new-ADC-driver.patch"
-	${git} "${DIR}/patches/not-capebus/0047-cape-dvi-Convert-DVI-capes-to-the-new-LCDC-DRM-drive.patch"
-	${git} "${DIR}/patches/not-capebus/0048-boneblack-Add-default-HDMI-cape.patch"
-	${git} "${DIR}/patches/not-capebus/0049-cape-bone-dvi-Use-720p-mode-as-default.patch"
-	${git} "${DIR}/patches/not-capebus/0050-am33xx.dtsi-Make-the-MUSB-not-crash-on-load.patch"
-	${git} "${DIR}/patches/not-capebus/0051-regulator-DUMMY_REGULATOR-should-work-for-OF-too.patch"
-	${git} "${DIR}/patches/not-capebus/0052-OF-Overlay-Remove-excessive-debugging-crud.patch"
-	${git} "${DIR}/patches/not-capebus/0053-of-i2c-Export-single-device-registration-method.patch"
-	${git} "${DIR}/patches/not-capebus/0054-OF-Overlay-I2C-client-devices-special-handling.patch"
-	${git} "${DIR}/patches/not-capebus/0055-omap-Fix-bug-on-partial-resource-addition.patch"
-	${git} "${DIR}/patches/not-capebus/0056-ASoC-davinci-mcasp-Add-pinctrl-support.patch"
-	${git} "${DIR}/patches/not-capebus/0057-ASoC-Davinci-machine-Add-device-tree-binding.patch"
-	${git} "${DIR}/patches/not-capebus/0058-am33xx-Add-mcasp0-and-mcasp1-device-tree-entries.patch"
-	${git} "${DIR}/patches/not-capebus/0059-ASoC-dts-OMAP2-AM33xx-HACK-Add-missing-dma-info.patch"
-	${git} "${DIR}/patches/not-capebus/0060-ASoC-Davinci-McASP-remove-unused-header-include.patch"
-	${git} "${DIR}/patches/not-capebus/0061-ASoC-AM33XX-Add-support-for-AM33xx-SoC-Audio.patch"
-	${git} "${DIR}/patches/not-capebus/0062-am33xx-mcasp-Add-dma-channel-definitions.patch"
-	${git} "${DIR}/patches/not-capebus/0063-ARM-OMAP2-AM33xx-removed-invalid-McASP-HWMOD-data.patch"
-	${git} "${DIR}/patches/not-capebus/0064-davinci-evm-Header-include-move-fix.patch"
-	${git} "${DIR}/patches/not-capebus/0065-bone-dvi-cape-Add-DT-definition-for-00A2-revision.patch"
-	${git} "${DIR}/patches/not-capebus/0066-bone-dvi-cape-Update-A1-cape-definition-with-sound.patch"
-	${git} "${DIR}/patches/not-capebus/0067-sndsoc-mcasp-Get-DMA-channels-via-byname.patch"
-	${git} "${DIR}/patches/not-capebus/0068-sound-soc-Davinci-Remove-__devinit-__devexit.patch"
-	${git} "${DIR}/patches/not-capebus/0069-st7735fb-Remove-__devinit-__devexit.patch"
-	${git} "${DIR}/patches/not-capebus/0070-capemgr-Remove-__devinit-__devexit.patch"
-	${git} "${DIR}/patches/not-capebus/0071-capes-fw-target-firmware-directory-change.patch"
-	${git} "${DIR}/patches/not-capebus/0072-am33xx-edma-Always-update-unused-channel-list.patch"
-	${git} "${DIR}/patches/not-capebus/0073-defconfig-Update-bone-default-config.patch"
-	${git} "${DIR}/patches/not-capebus/0074-capes-add-dvi-a2-and-lcd3-a2-dts-files.patch"
-	${git} "${DIR}/patches/not-capebus/0075-capemgr-catch-up-with-lcdc-tilcdc-rename.patch"
-	${git} "${DIR}/patches/not-capebus/0076-firmware-fix-dvi-a1-target.patch"
-	${git} "${DIR}/patches/not-capebus/0077-capes-remove-tda-from-hdmi-cape-lcdc-handles-it-by-t.patch"
-	${git} "${DIR}/patches/not-capebus/0078-tilcdc-magic-debug-statement-makes-power-gpio-work-o.patch"
-	${git} "${DIR}/patches/not-capebus/0079-capemgr-add-dts-overlay-for-LCD7-00A2-cape.patch"
-	${git} "${DIR}/patches/not-capebus/0080-HACK-am33xx.dtsi-enable-all-PWMs.patch"
-	${git} "${DIR}/patches/not-capebus/0081-beaglebone-Add-nixie-cape-prototype-driver.patch"
-	${git} "${DIR}/patches/not-capebus/0082-beaglebone-Add-nixie-cape-device-tree-entry.patch"
-	${git} "${DIR}/patches/not-capebus/0083-am335x-bone-common.dtsi-Cleanup-test-remnants.patch"
-	${git} "${DIR}/patches/not-capebus/0084-omap_hsmmc-Add-ti-vcc-aux-disable-is-sleep-DT-proper.patch"
-	${git} "${DIR}/patches/not-capebus/0085-bone-common-ti-vcc-aux-disable-is-sleep-enable.patch"
-	${git} "${DIR}/patches/not-capebus/0086-am33xx-disable-NAPI.patch"
-	${git} "${DIR}/patches/not-capebus/0087-capemgr-Fixed-AIN-name-display-in-error-message.patch"
-	${git} "${DIR}/patches/not-capebus/0088-am33xx.dtsi-remove-duplicate-nodes.patch"
-	${git} "${DIR}/patches/not-capebus/0089-cape-dtbos-update-to-latest-OF-videomode-bindings.patch"
-	${git} "${DIR}/patches/not-capebus/0090-beaglebone-uncomment-eMMC-override.patch"
-	${git} "${DIR}/patches/not-capebus/0091-bone-capes-Update-with-new-tscadc-bindings.patch"
-	${git} "${DIR}/patches/not-capebus/0092-am33xx.dtsi-Update-and-disable-status-of-nodes.patch"
-	${git} "${DIR}/patches/not-capebus/0093-bone-capes-Adapt-to-new-pwms-setup.patch"
-	${git} "${DIR}/patches/not-capebus/0094-tilcdc-introduce-panel-tfp410-power-down-gpio-contro.patch"
-	${git} "${DIR}/patches/not-capebus/0095-bone-dvi-Update-to-new-style-tilcdc-bindings.patch"
-	${git} "${DIR}/patches/not-capebus/0096-tilcdc-tfp410-Rework-power-down-GPIO-logic.patch"
-	${git} "${DIR}/patches/not-capebus/0097-tilcdc-Add-reduced-blanking-mode-checks.patch"
-	${git} "${DIR}/patches/not-capebus/0098-cape-dvi-Switch-all-DVI-capes-to-using-the-TFTP410-p.patch"
-
-	echo "dir: pru"
-	${git} "${DIR}/patches/pru/0001-uio-uio_pruss-port-to-AM33xx.patch"
-	${git} "${DIR}/patches/pru/0002-ARM-omap-add-DT-support-for-deasserting-hardware-res.patch"
-	${git} "${DIR}/patches/pru/0003-ARM-dts-AM33xx-PRUSS-support.patch"
-
-	echo "dir: usb"
-#	${git} "${DIR}/patches/usb/0001-drivers-usb-phy-add-a-new-driver-for-usb-part-of-con.patch"
-#	${git} "${DIR}/patches/usb/0002-drivers-usb-start-using-the-control-module-driver.patch"
-#	${git} "${DIR}/patches/usb/0003-usb-otg-Add-an-API-to-bind-the-USB-controller-and-PH.patch"
-#	${git} "${DIR}/patches/usb/0004-usb-otg-utils-add-facilities-in-phy-lib-to-support-m.patch"
-#	${git} "${DIR}/patches/usb/0005-ARM-OMAP-USB-Add-phy-binding-information.patch"
-#	${git} "${DIR}/patches/usb/0006-drivers-usb-musb-omap-make-use-of-the-new-PHY-lib-AP.patch"
-#	${git} "${DIR}/patches/usb/0007-usb-otg-add-device-tree-support-to-otg-library.patch"
-#	${git} "${DIR}/patches/usb/0008-USB-MUSB-OMAP-get-PHY-by-phandle-for-dt-boot.patch"
-#	${git} "${DIR}/patches/usb/0009-MUSB-Hack-around-to-make-host-port-to-work.patch"
-
-	echo "dir: PG2"
-	${git} "${DIR}/patches/PG2/0001-beaglebone-black-1ghz-hack.patch"
-
-	echo "dir: hacks"
-	${git} "${DIR}/patches/reboot/0001-ARM-AM33xx-Add-SoC-specific-restart-hook.patch"
-
-	echo "dir: iio"
-	${git} "${DIR}/patches/iio/0001-iio-common-Add-STMicroelectronics-common-library.patch"
-	${git} "${DIR}/patches/iio/0002-iio-accel-Add-STMicroelectronics-accelerometers-driv.patch"
-	${git} "${DIR}/patches/iio/0003-iio-gyro-Add-STMicroelectronics-gyroscopes-driver.patch"
-	${git} "${DIR}/patches/iio/0004-iio-magnetometer-Add-STMicroelectronics-magnetometer.patch"
-	${git} "${DIR}/patches/iio/0005-iio-magn-Add-sensors_supported-in-st_magn_sensors.patch"
-	${git} "${DIR}/patches/iio/0006-pwm-pca9685-skeleton-i2c-client-driver-for-PCA9685-1.patch"
-}
-
-am33x
 arm
+imx
 omap
-am33x_after
 
 echo "patch.sh ran successful"
diff --git a/patches/6lowpan/0001-6lowpan-lowpan_is_iid_16_bit_compressable-does-not-d.patch b/patches/6lowpan/0001-6lowpan-lowpan_is_iid_16_bit_compressable-does-not-d.patch
deleted file mode 100644
index 04cd9c51145f4b8631e278ac7194f9798b626181..0000000000000000000000000000000000000000
--- a/patches/6lowpan/0001-6lowpan-lowpan_is_iid_16_bit_compressable-does-not-d.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 1b070665808076a1715e2fb9ab5ffe039483fdd7 Mon Sep 17 00:00:00 2001
-From: Tony Cheneau <tony.cheneau@amnesiak.org>
-Date: Mon, 25 Jun 2012 19:45:33 +0000
-Subject: [PATCH 01/16] 6lowpan: lowpan_is_iid_16_bit_compressable() does not
- detect compressable address correctly
-
-The current test is not RFC6282 compliant. The same issue has been found
-out and fixed in Contiki. This patch is basicaly a port of their fix.
-
-Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
----
- net/ieee802154/6lowpan.h |   14 ++++++++------
- 1 files changed, 8 insertions(+), 6 deletions(-)
-
-diff --git a/net/ieee802154/6lowpan.h b/net/ieee802154/6lowpan.h
-index 8c2251f..efd1a57 100644
---- a/net/ieee802154/6lowpan.h
-+++ b/net/ieee802154/6lowpan.h
-@@ -87,14 +87,16 @@
- #define is_addr_link_local(a) (((a)->s6_addr16[0]) == 0x80FE)
- 
- /*
-- * check whether we can compress the IID to 16 bits,
-- * it's possible for unicast adresses with first 49 bits are zero only.
-- */
-+* check whether we can compress the IID to 16 bits,
-+* it's possible for unicast adresses with first 49 bits are zero only.
-+*/
- #define lowpan_is_iid_16_bit_compressable(a)	\
- 	((((a)->s6_addr16[4]) == 0) &&		\
--	 (((a)->s6_addr16[5]) == 0) &&		\
--	 (((a)->s6_addr16[6]) == 0) &&		\
--	 ((((a)->s6_addr[14]) & 0x80) == 0))
-+	 (((a)->s6_addr[10]) == 0) &&		\
-+	 (((a)->s6_addr[11]) == 0xff) &&	\
-+	 (((a)->s6_addr[12]) == 0xfe) &&	\
-+	 (((a)->s6_addr[13]) == 0))
-+
- 
- /* multicast address */
- #define is_addr_mcast(a) (((a)->s6_addr[0]) == 0xFF)
--- 
-1.7.7.6
-
diff --git a/patches/6lowpan/0002-6lowpan-next-header-is-not-properly-set-upon-decompr.patch b/patches/6lowpan/0002-6lowpan-next-header-is-not-properly-set-upon-decompr.patch
deleted file mode 100644
index 83843a7527f7977ac00ecdcceb59197834bed31b..0000000000000000000000000000000000000000
--- a/patches/6lowpan/0002-6lowpan-next-header-is-not-properly-set-upon-decompr.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From ae3156b1221e8da1ce104821cadf5b4067b13e41 Mon Sep 17 00:00:00 2001
-From: Tony Cheneau <tony.cheneau@amnesiak.org>
-Date: Mon, 25 Jun 2012 19:45:45 +0000
-Subject: [PATCH 02/16] 6lowpan: next header is not properly set upon
- decompression of a UDP header.
-
-This causes a drop of the UDP packet.
-
-Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
----
- net/ieee802154/6lowpan.c |    5 ++++-
- 1 files changed, 4 insertions(+), 1 deletions(-)
-
-diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
-index f651da6..44dab5b 100644
---- a/net/ieee802154/6lowpan.c
-+++ b/net/ieee802154/6lowpan.c
-@@ -913,9 +913,12 @@ lowpan_process_data(struct sk_buff *skb)
- 	}
- 
- 	/* UDP data uncompression */
--	if (iphc0 & LOWPAN_IPHC_NH_C)
-+	if (iphc0 & LOWPAN_IPHC_NH_C) {
- 		if (lowpan_uncompress_udp_header(skb))
- 			goto drop;
-+		hdr.nexthdr = UIP_PROTO_UDP;
-+	}
-+
- 
- 	/* Not fragmented package */
- 	hdr.payload_len = htons(skb->len);
--- 
-1.7.7.6
-
diff --git a/patches/6lowpan/0003-6lowpan-always-enable-link-layer-acknowledgments.patch b/patches/6lowpan/0003-6lowpan-always-enable-link-layer-acknowledgments.patch
deleted file mode 100644
index 925e7c54b4849e0a7d99f0901c44d5dc381c4155..0000000000000000000000000000000000000000
--- a/patches/6lowpan/0003-6lowpan-always-enable-link-layer-acknowledgments.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From cc35bd13625926bda8051dda3d3e5179236655c0 Mon Sep 17 00:00:00 2001
-From: Tony Cheneau <tony.cheneau@amnesiak.org>
-Date: Mon, 25 Jun 2012 19:48:12 +0000
-Subject: [PATCH 03/16] 6lowpan: always enable link-layer acknowledgments
-
-This feature is especially important when using fragmentation, because
-the reassembly mechanism can not recover from the loss of a fragment.
-
-Note that some hardware ignore this flag and not will not transmit any
-acknowledgments if this is set.
-
-Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
----
- net/ieee802154/6lowpan.c |    4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
-index 44dab5b..01495ca 100644
---- a/net/ieee802154/6lowpan.c
-+++ b/net/ieee802154/6lowpan.c
-@@ -589,6 +589,10 @@ static int lowpan_header_create(struct sk_buff *skb,
- 
- 		mac_cb(skb)->flags = IEEE802154_FC_TYPE_DATA;
- 
-+		/* request acknowledgment when possible */
-+		if (!lowpan_is_addr_broadcast(daddr))
-+			mac_cb(skb)->flags |= MAC_CB_FLAG_ACKREQ;
-+
- 		return dev_hard_header(skb, lowpan_dev_info(dev)->real_dev,
- 				type, (void *)&da, (void *)&sa, skb->len);
- 	}
--- 
-1.7.7.6
-
diff --git a/patches/6lowpan/0004-mac802154-turn-on-ACK-when-enabled-by-the-upper-laye.patch b/patches/6lowpan/0004-mac802154-turn-on-ACK-when-enabled-by-the-upper-laye.patch
deleted file mode 100644
index a7348f838661735361c6df8de3fb43589e713747..0000000000000000000000000000000000000000
--- a/patches/6lowpan/0004-mac802154-turn-on-ACK-when-enabled-by-the-upper-laye.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From e0f2fd185d9450d3e6b9844f03b174e699e72474 Mon Sep 17 00:00:00 2001
-From: Tony Cheneau <tony.cheneau@amnesiak.org>
-Date: Tue, 17 Jul 2012 17:59:39 -0400
-Subject: [PATCH 04/16] mac802154: turn on ACK when enabled by the upper
- layers
-
-Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
----
- net/mac802154/wpan.c |    2 ++
- 1 files changed, 2 insertions(+), 0 deletions(-)
-
-diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c
-index 199b922..fdf482a 100644
---- a/net/mac802154/wpan.c
-+++ b/net/mac802154/wpan.c
-@@ -149,6 +149,8 @@ static int mac802154_header_create(struct sk_buff *skb,
- 
- 	head[pos++] = mac_cb(skb)->seq; /* DSN/BSN */
- 	fc = mac_cb_type(skb);
-+	if (mac_cb_is_ackreq(skb))
-+		fc |= IEEE802154_FC_ACK_REQ;
- 
- 	if (!saddr) {
- 		spin_lock_bh(&priv->mib_lock);
--- 
-1.7.7.6
-
diff --git a/patches/6lowpan/0005-6lowpan-use-short-IEEE-802.15.4-addresses-for-broadc.patch b/patches/6lowpan/0005-6lowpan-use-short-IEEE-802.15.4-addresses-for-broadc.patch
deleted file mode 100644
index 864a181015d079c0a5c96027aecf9a88ebe02d82..0000000000000000000000000000000000000000
--- a/patches/6lowpan/0005-6lowpan-use-short-IEEE-802.15.4-addresses-for-broadc.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 76d1b2f300ae0ec07a0a89f1d33b97628857e035 Mon Sep 17 00:00:00 2001
-From: Tony Cheneau <tony.cheneau@amnesiak.org>
-Date: Tue, 4 Sep 2012 23:48:13 -0400
-Subject: [PATCH 05/16] 6lowpan: use short IEEE 802.15.4 addresses for
- broadcast destination
-
-It is intended that the IEEE 802.15.4 standard uses the 0xFFFF short address (2
-bytes) for message broadcasting.
-
-Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
----
- net/ieee802154/6lowpan.c |   21 +++++++++++++--------
- 1 files changed, 13 insertions(+), 8 deletions(-)
-
-diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
-index 01495ca..1b3bfd2 100644
---- a/net/ieee802154/6lowpan.c
-+++ b/net/ieee802154/6lowpan.c
-@@ -577,21 +577,26 @@ static int lowpan_header_create(struct sk_buff *skb,
- 	 * this isn't implemented in mainline yet, so currently we assign 0xff
- 	 */
- 	{
-+		mac_cb(skb)->flags = IEEE802154_FC_TYPE_DATA;
-+
- 		/* prepare wpan address data */
- 		sa.addr_type = IEEE802154_ADDR_LONG;
- 		sa.pan_id = 0xff;
--
--		da.addr_type = IEEE802154_ADDR_LONG;
--		da.pan_id = 0xff;
--
--		memcpy(&(da.hwaddr), daddr, 8);
- 		memcpy(&(sa.hwaddr), saddr, 8);
- 
--		mac_cb(skb)->flags = IEEE802154_FC_TYPE_DATA;
-+		da.pan_id = 0xff;
-+		/* if the destination address is the broadcast address,
-+		   use short address */
-+		if (lowpan_is_addr_broadcast(daddr)) {
-+			da.addr_type = IEEE802154_ADDR_SHORT;
-+			da.short_addr = IEEE802154_ADDR_BROADCAST;
-+		} else {
-+			da.addr_type = IEEE802154_ADDR_LONG;
-+			memcpy(&(da.hwaddr), daddr, 8);
- 
--		/* request acknowledgment when possible */
--		if (!lowpan_is_addr_broadcast(daddr))
-+			/* request acknowledgment */
- 			mac_cb(skb)->flags |= MAC_CB_FLAG_ACKREQ;
-+		}
- 
- 		return dev_hard_header(skb, lowpan_dev_info(dev)->real_dev,
- 				type, (void *)&da, (void *)&sa, skb->len);
--- 
-1.7.7.6
-
diff --git a/patches/6lowpan/0006-6lowpan-fix-first-fragment-FRAG1-handling.patch b/patches/6lowpan/0006-6lowpan-fix-first-fragment-FRAG1-handling.patch
deleted file mode 100644
index 169bdc7c27729479fa995089253538f64ce2518d..0000000000000000000000000000000000000000
--- a/patches/6lowpan/0006-6lowpan-fix-first-fragment-FRAG1-handling.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-From cb8598e5357d74606f542513e305938e24865311 Mon Sep 17 00:00:00 2001
-From: Tony Cheneau <tony.cheneau@amnesiak.org>
-Date: Sat, 8 Sep 2012 00:15:54 -0400
-Subject: [PATCH 06/16] 6lowpan: fix first fragment (FRAG1) handling
-
-The first fragment, FRAG1, must contain some payload according to the
-specs. However, as it is currently written, the first fragment will
-remain empty and only contain the 6lowpan headers.
-
-This patch also extract the transport layer information from the first
-fragment. This information is later on use when uncompressing UDP
-header.
-
-Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
----
- net/ieee802154/6lowpan.c |   54 +++++++++++++++++++++++++++++++++++----------
- 1 files changed, 42 insertions(+), 12 deletions(-)
-
-diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
-index 1b3bfd2..c35449f 100644
---- a/net/ieee802154/6lowpan.c
-+++ b/net/ieee802154/6lowpan.c
-@@ -654,7 +654,7 @@ static void lowpan_fragment_timer_expired(unsigned long entry_addr)
- }
- 
- static struct lowpan_fragment *
--lowpan_alloc_new_frame(struct sk_buff *skb, u8 len, u16 tag)
-+lowpan_alloc_new_frame(struct sk_buff *skb, u16 len, u16 tag)
- {
- 	struct lowpan_fragment *frame;
- 
-@@ -735,6 +735,18 @@ lowpan_process_data(struct sk_buff *skb)
- 		/* adds the 3 MSB to the 8 LSB to retrieve the 11 bits length */
- 		len = ((iphc0 & 7) << 8) | slen;
- 
-+		if ((iphc0 & LOWPAN_DISPATCH_MASK) == LOWPAN_DISPATCH_FRAG1) {
-+			pr_debug("%s received a FRAG1 packet (tag: %d, "
-+				 "size of the entire IP packet: %d)"
-+				 , __func__, tag, len);
-+		} else { /* FRAGN */
-+			if (lowpan_fetch_skb_u8(skb, &offset))
-+				goto unlock_and_drop;
-+			pr_debug("%s received a FRAGN packet (tag: %d, "
-+				 "size of the entire IP packet: %d, "
-+				 "offset: %d)", __func__, tag, len, offset * 8);
-+		}
-+
- 		/*
- 		 * check if frame assembling with the same tag is
- 		 * already in progress
-@@ -749,17 +761,13 @@ lowpan_process_data(struct sk_buff *skb)
- 
- 		/* alloc new frame structure */
- 		if (!found) {
-+			pr_debug("%s first fragment received for tag %d, "
-+				 "begin packet reassembly", __func__, tag);
- 			frame = lowpan_alloc_new_frame(skb, len, tag);
- 			if (!frame)
- 				goto unlock_and_drop;
- 		}
- 
--		if ((iphc0 & LOWPAN_DISPATCH_MASK) == LOWPAN_DISPATCH_FRAG1)
--			goto unlock_and_drop;
--
--		if (lowpan_fetch_skb_u8(skb, &offset)) /* fetch offset */
--			goto unlock_and_drop;
--
- 		/* if payload fits buffer, copy it */
- 		if (likely((offset * 8 + skb->len) <= frame->length))
- 			skb_copy_to_linear_data_offset(frame->skb, offset * 8,
-@@ -777,6 +785,10 @@ lowpan_process_data(struct sk_buff *skb)
- 			list_del(&frame->list);
- 			spin_unlock_bh(&flist_lock);
- 
-+			pr_debug("%s successfully reassembled fragment "
-+				 "(tag %d)", __func__, tag);
-+
-+
- 			dev_kfree_skb(skb);
- 			skb = frame->skb;
- 			kfree(frame);
-@@ -976,13 +988,13 @@ static int lowpan_get_mac_header_length(struct sk_buff *skb)
- 
- static int
- lowpan_fragment_xmit(struct sk_buff *skb, u8 *head,
--			int mlen, int plen, int offset)
-+			int mlen, int plen, int offset, int type)
- {
- 	struct sk_buff *frag;
- 	int hlen, ret;
- 
--	/* if payload length is zero, therefore it's a first fragment */
--	hlen = (plen == 0 ? LOWPAN_FRAG1_HEAD_SIZE :  LOWPAN_FRAGN_HEAD_SIZE);
-+	hlen = (type == LOWPAN_DISPATCH_FRAG1 ? LOWPAN_FRAG1_HEAD_SIZE :
-+			LOWPAN_FRAGN_HEAD_SIZE);
- 
- 	lowpan_raw_dump_inline(__func__, "6lowpan fragment header", head, hlen);
- 
-@@ -1025,7 +1037,18 @@ lowpan_skb_fragmentation(struct sk_buff *skb)
- 	head[2] = tag >> 8;
- 	head[3] = tag & 0xff;
- 
--	err = lowpan_fragment_xmit(skb, head, header_length, 0, 0);
-+	err = lowpan_fragment_xmit(skb, head, header_length, LOWPAN_FRAG_SIZE,
-+				   0, LOWPAN_DISPATCH_FRAG1);
-+
-+	if (err) {
-+#if DEBUG
-+		pr_debug("%s unable to send FRAG1 packet (tag: %d)",
-+			 __func__, tag);
-+#endif /* DEBUG */
-+		goto exit;
-+	}
-+
-+	offset = LOWPAN_FRAG_SIZE;
- 
- 	/* next fragment header */
- 	head[0] &= ~LOWPAN_DISPATCH_FRAG1;
-@@ -1040,10 +1063,17 @@ lowpan_skb_fragmentation(struct sk_buff *skb)
- 			len = payload_length - offset;
- 
- 		err = lowpan_fragment_xmit(skb, head, header_length,
--							len, offset);
-+					   len, offset, LOWPAN_DISPATCH_FRAGN);
-+		if (err) {
-+			pr_debug("%s unable to send a subsequent FRAGN packet "
-+				 "(tag: %d, offset: %d", __func__, tag, offset);
-+			goto exit;
-+		}
-+
- 		offset += len;
- 	}
- 
-+exit:
- 	return err;
- }
- 
--- 
-1.7.7.6
-
diff --git a/patches/6lowpan/0007-6lowpan-store-fragment-tag-values-per-device-instead.patch b/patches/6lowpan/0007-6lowpan-store-fragment-tag-values-per-device-instead.patch
deleted file mode 100644
index f7ed85b607c3ce2e6ef040f8472d5478d6714508..0000000000000000000000000000000000000000
--- a/patches/6lowpan/0007-6lowpan-store-fragment-tag-values-per-device-instead.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 05a0b1ea7042ded2c0489ca6122cf5cf106cf28c Mon Sep 17 00:00:00 2001
-From: Tony Cheneau <tony.cheneau@amnesiak.org>
-Date: Fri, 6 Jul 2012 17:39:22 -0400
-Subject: [PATCH 07/16] 6lowpan: store fragment tag values per device instead
- of net stack wide
-
-Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
----
- net/ieee802154/6lowpan.c |    9 +++++----
- 1 files changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
-index c35449f..4db5f2c 100644
---- a/net/ieee802154/6lowpan.c
-+++ b/net/ieee802154/6lowpan.c
-@@ -104,6 +104,7 @@ static const u8 lowpan_llprefix[] = {0xfe, 0x80};
- struct lowpan_dev_info {
- 	struct net_device	*real_dev; /* real WPAN device ptr */
- 	struct mutex		dev_list_mtx; /* mutex for list ops */
-+	unsigned short fragment_tag;
- };
- 
- struct lowpan_dev_record {
-@@ -120,7 +121,6 @@ struct lowpan_fragment {
- 	struct list_head	list;		/* fragments list */
- };
- 
--static unsigned short fragment_tag;
- static LIST_HEAD(lowpan_fragments);
- static DEFINE_SPINLOCK(flist_lock);
- 
-@@ -1022,14 +1022,14 @@ lowpan_fragment_xmit(struct sk_buff *skb, u8 *head,
- }
- 
- static int
--lowpan_skb_fragmentation(struct sk_buff *skb)
-+lowpan_skb_fragmentation(struct sk_buff *skb, struct net_device *dev)
- {
- 	int  err, header_length, payload_length, tag, offset = 0;
- 	u8 head[5];
- 
- 	header_length = lowpan_get_mac_header_length(skb);
- 	payload_length = skb->len - header_length;
--	tag = fragment_tag++;
-+	tag = lowpan_dev_info(dev)->fragment_tag++;
- 
- 	/* first fragment header */
- 	head[0] = LOWPAN_DISPATCH_FRAG1 | ((payload_length >> 8) & 0x7);
-@@ -1096,7 +1096,7 @@ static netdev_tx_t lowpan_xmit(struct sk_buff *skb, struct net_device *dev)
- 	}
- 
- 	pr_debug("frame is too big, fragmentation is needed\n");
--	err = lowpan_skb_fragmentation(skb);
-+	err = lowpan_skb_fragmentation(skb, dev);
- error:
- 	dev_kfree_skb(skb);
- out:
-@@ -1217,6 +1217,7 @@ static int lowpan_newlink(struct net *src_net, struct net_device *dev,
- 		return -ENODEV;
- 
- 	lowpan_dev_info(dev)->real_dev = real_dev;
-+	lowpan_dev_info(dev)->fragment_tag = 0;
- 	mutex_init(&lowpan_dev_info(dev)->dev_list_mtx);
- 
- 	entry = kzalloc(sizeof(struct lowpan_dev_record), GFP_KERNEL);
--- 
-1.7.7.6
-
diff --git a/patches/6lowpan/0008-6lowpan-obtain-IEEE802.15.4-sequence-number-from-the.patch b/patches/6lowpan/0008-6lowpan-obtain-IEEE802.15.4-sequence-number-from-the.patch
deleted file mode 100644
index f0ca96a8f60c88d9d6f9756a81d2aaf218706460..0000000000000000000000000000000000000000
--- a/patches/6lowpan/0008-6lowpan-obtain-IEEE802.15.4-sequence-number-from-the.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 9825fefabbc055d168d09b48faa6298d61147cbd Mon Sep 17 00:00:00 2001
-From: Tony Cheneau <tony.cheneau@amnesiak.org>
-Date: Fri, 6 Jul 2012 17:46:37 -0400
-Subject: [PATCH 08/16] 6lowpan: obtain IEEE802.15.4 sequence number from the
- MAC layer
-
-This patch sets the sequence number in the frame format. Without this
-fix, the sequence number is always set to 0. This makes trafic analysis
-very hard.
-
-Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
----
- net/ieee802154/6lowpan.c |    8 ++++++++
- 1 files changed, 8 insertions(+), 0 deletions(-)
-
-diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
-index 4db5f2c..f1bb24f 100644
---- a/net/ieee802154/6lowpan.c
-+++ b/net/ieee802154/6lowpan.c
-@@ -578,6 +578,7 @@ static int lowpan_header_create(struct sk_buff *skb,
- 	 */
- 	{
- 		mac_cb(skb)->flags = IEEE802154_FC_TYPE_DATA;
-+		mac_cb(skb)->seq = ieee802154_mlme_ops(dev)->get_dsn(dev);
- 
- 		/* prepare wpan address data */
- 		sa.addr_type = IEEE802154_ADDR_LONG;
-@@ -1124,6 +1125,12 @@ static u16 lowpan_get_short_addr(const struct net_device *dev)
- 	return ieee802154_mlme_ops(real_dev)->get_short_addr(real_dev);
- }
- 
-+static u8 lowpan_get_dsn(const struct net_device *dev)
-+{
-+	struct net_device *real_dev = lowpan_dev_info(dev)->real_dev;
-+	return ieee802154_mlme_ops(real_dev)->get_dsn(real_dev);
-+}
-+
- static struct header_ops lowpan_header_ops = {
- 	.create	= lowpan_header_create,
- };
-@@ -1137,6 +1144,7 @@ static struct ieee802154_mlme_ops lowpan_mlme = {
- 	.get_pan_id = lowpan_get_pan_id,
- 	.get_phy = lowpan_get_phy,
- 	.get_short_addr = lowpan_get_short_addr,
-+	.get_dsn = lowpan_get_dsn,
- };
- 
- static void lowpan_setup(struct net_device *dev)
--- 
-1.7.7.6
-
diff --git a/patches/6lowpan/0009-6lowpan-add-a-new-parameter-in-sysfs-to-turn-on-off-.patch b/patches/6lowpan/0009-6lowpan-add-a-new-parameter-in-sysfs-to-turn-on-off-.patch
deleted file mode 100644
index 6a2858f57e6c3154be86f6090d6ea1a3aea5b416..0000000000000000000000000000000000000000
--- a/patches/6lowpan/0009-6lowpan-add-a-new-parameter-in-sysfs-to-turn-on-off-.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 1681757d338b777955f7ae9e4a537e8530b5c376 Mon Sep 17 00:00:00 2001
-From: Tony Cheneau <tony.cheneau@amnesiak.org>
-Date: Thu, 12 Jul 2012 17:47:39 -0400
-Subject: [PATCH 09/16] 6lowpan: add a new parameter in sysfs to turn on/off
- ACK request at MAC layer
-
-Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
----
- net/ieee802154/6lowpan.c |    9 ++++++++-
- 1 files changed, 8 insertions(+), 1 deletions(-)
-
-diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
-index f1bb24f..abf514e 100644
---- a/net/ieee802154/6lowpan.c
-+++ b/net/ieee802154/6lowpan.c
-@@ -62,6 +62,8 @@
- 
- #include "6lowpan.h"
- 
-+static bool req_802154_ack;
-+
- /* TTL uncompression values */
- static const u8 lowpan_ttl_values[] = {0, 1, 64, 255};
- 
-@@ -596,7 +598,8 @@ static int lowpan_header_create(struct sk_buff *skb,
- 			memcpy(&(da.hwaddr), daddr, 8);
- 
- 			/* request acknowledgment */
--			mac_cb(skb)->flags |= MAC_CB_FLAG_ACKREQ;
-+			if (req_802154_ack)
-+				mac_cb(skb)->flags |= MAC_CB_FLAG_ACKREQ;
- 		}
- 
- 		return dev_hard_header(skb, lowpan_dev_info(dev)->real_dev,
-@@ -1367,6 +1370,10 @@ static void __exit lowpan_cleanup_module(void)
- }
- 
- module_init(lowpan_init_module);
-+
-+module_param(req_802154_ack, bool, 0644);
-+MODULE_PARM_DESC(req_802154_ack, "request link-layer (i.e. IEEE 802.15.4) acknowledgments");
-+
- module_exit(lowpan_cleanup_module);
- MODULE_LICENSE("GPL");
- MODULE_ALIAS_RTNL_LINK("lowpan");
--- 
-1.7.7.6
-
diff --git a/patches/6lowpan/0010-6lowpan-use-the-PANID-provided-by-the-device-instead.patch b/patches/6lowpan/0010-6lowpan-use-the-PANID-provided-by-the-device-instead.patch
deleted file mode 100644
index 67a943f0dec2e97340b6f60a65ecda7c44b6ea56..0000000000000000000000000000000000000000
--- a/patches/6lowpan/0010-6lowpan-use-the-PANID-provided-by-the-device-instead.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 19a43cbb03bc0555da089021fd04f8c0e83b87dd Mon Sep 17 00:00:00 2001
-From: Tony Cheneau <tony.cheneau@amnesiak.org>
-Date: Mon, 24 Sep 2012 23:11:46 -0400
-Subject: [PATCH 10/16] 6lowpan: use the PANID provided by the device instead
- of a static value
-
-Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
----
- net/ieee802154/6lowpan.c |    6 ++++--
- 1 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
-index abf514e..b6c732e 100644
---- a/net/ieee802154/6lowpan.c
-+++ b/net/ieee802154/6lowpan.c
-@@ -584,10 +584,12 @@ static int lowpan_header_create(struct sk_buff *skb,
- 
- 		/* prepare wpan address data */
- 		sa.addr_type = IEEE802154_ADDR_LONG;
--		sa.pan_id = 0xff;
-+		sa.pan_id = ieee802154_mlme_ops(dev)->get_pan_id(dev);
-+
- 		memcpy(&(sa.hwaddr), saddr, 8);
-+		/* intra-PAN communications */
-+		da.pan_id = ieee802154_mlme_ops(dev)->get_pan_id(dev);
- 
--		da.pan_id = 0xff;
- 		/* if the destination address is the broadcast address,
- 		   use short address */
- 		if (lowpan_is_addr_broadcast(daddr)) {
--- 
-1.7.7.6
-
diff --git a/patches/6lowpan/0011-6lowpan-modify-udp-compression-uncompression-to-matc.patch b/patches/6lowpan/0011-6lowpan-modify-udp-compression-uncompression-to-matc.patch
deleted file mode 100644
index e7e40ee3a0ee4157b7aacfe088df672b0ee45808..0000000000000000000000000000000000000000
--- a/patches/6lowpan/0011-6lowpan-modify-udp-compression-uncompression-to-matc.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 394938bff86f6245eaf6ad82be7cdba8525fdf20 Mon Sep 17 00:00:00 2001
-From: Tony Cheneau <tony.cheneau@amnesiak.org>
-Date: Mon, 24 Sep 2012 22:56:51 -0400
-Subject: [PATCH 11/16] 6lowpan: modify udp compression/uncompression to match
- the standard
-
-The previous code would just compress the UDP header and send the compressed
-UDP header along with the uncompressed one.
-
-Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
----
- net/ieee802154/6lowpan.c |   36 +++++++++++++++++++++++++++++++++---
- 1 files changed, 33 insertions(+), 3 deletions(-)
-
-diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
-index b6c732e..ed01c39 100644
---- a/net/ieee802154/6lowpan.c
-+++ b/net/ieee802154/6lowpan.c
-@@ -286,6 +286,9 @@ lowpan_compress_udp_header(u8 **hc06_ptr, struct sk_buff *skb)
- 	/* checksum is always inline */
- 	memcpy(*hc06_ptr, &uh->check, 2);
- 	*hc06_ptr += 2;
-+
-+	/* skip the UDP header */
-+	skb_pull(skb, sizeof(struct udphdr));
- }
- 
- static inline int lowpan_fetch_skb_u8(struct sk_buff *skb, u8 *val)
-@@ -311,9 +314,8 @@ static inline int lowpan_fetch_skb_u16(struct sk_buff *skb, u16 *val)
- }
- 
- static int
--lowpan_uncompress_udp_header(struct sk_buff *skb)
-+lowpan_uncompress_udp_header(struct sk_buff *skb, struct udphdr *uh)
- {
--	struct udphdr *uh = udp_hdr(skb);
- 	u8 tmp;
- 
- 	if (!uh)
-@@ -354,12 +356,19 @@ lowpan_uncompress_udp_header(struct sk_buff *skb)
- 			break;
- 		}
- 
-+
- 		pr_debug("uncompressed UDP ports: src = %d, dst = %d\n",
- 			 uh->source, uh->dest);
- 
- 		/* copy checksum */
- 		memcpy(&uh->check, &skb->data[0], 2);
- 		skb_pull(skb, 2);
-+
-+		/* UDP lenght needs to be infered from the lower layers
-+		   here, we obtain the hint from the remaining size of the
-+		   frame */
-+		uh->len = htons(skb->len + sizeof(struct udphdr));
-+		pr_debug("uncompressed UDP length: src = %d", uh->len);
- 	} else {
- 		pr_debug("ERROR: unsupported NH format\n");
- 		goto err;
-@@ -941,8 +950,29 @@ lowpan_process_data(struct sk_buff *skb)
- 
- 	/* UDP data uncompression */
- 	if (iphc0 & LOWPAN_IPHC_NH_C) {
--		if (lowpan_uncompress_udp_header(skb))
-+		struct udphdr uh;
-+		struct sk_buff *new;
-+		if (lowpan_uncompress_udp_header(skb, &uh))
- 			goto drop;
-+
-+		/* place the real UDP header instead of the
-+		   compressed UDP header */
-+		new = skb_copy_expand(skb, sizeof(struct udphdr),
-+				      skb_tailroom(skb), GFP_ATOMIC);
-+		kfree_skb(skb);
-+
-+		if (!new)
-+			return -ENOMEM;
-+
-+		skb = new ;
-+
-+		skb_push(skb, sizeof(struct udphdr));
-+		skb_reset_transport_header(skb);
-+		skb_copy_to_linear_data(skb, &uh, sizeof(struct udphdr));
-+
-+		lowpan_raw_dump_table(__func__, "raw UDP header dump",
-+				      (u8 *)&uh, sizeof(uh));
-+
- 		hdr.nexthdr = UIP_PROTO_UDP;
- 	}
- 
--- 
-1.7.7.6
-
diff --git a/patches/6lowpan/0012-6lowpan-make-memory-allocation-atomic-during-6lowpan.patch b/patches/6lowpan/0012-6lowpan-make-memory-allocation-atomic-during-6lowpan.patch
deleted file mode 100644
index c4bb0ae5536438041b15c3eb2d27720751067f88..0000000000000000000000000000000000000000
--- a/patches/6lowpan/0012-6lowpan-make-memory-allocation-atomic-during-6lowpan.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From a83ef9032c2ba9b196302f230fdd43628a0e3551 Mon Sep 17 00:00:00 2001
-From: Tony Cheneau <tony.cheneau@amnesiak.org>
-Date: Mon, 3 Sep 2012 23:26:27 -0400
-Subject: [PATCH 12/16] 6lowpan: make memory allocation atomic during 6lowpan
- header creation
-
-This is prevent various crashes when using the serial driver (not yet in
-the tree).
-
-Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
----
- net/ieee802154/6lowpan.c |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
-index ed01c39..bf6548e 100644
---- a/net/ieee802154/6lowpan.c
-+++ b/net/ieee802154/6lowpan.c
-@@ -396,7 +396,7 @@ static int lowpan_header_create(struct sk_buff *skb,
- 		/* TODO:
- 		 * if this package isn't ipv6 one, where should it be routed?
- 		 */
--	head = kzalloc(100, GFP_KERNEL);
-+	head = kzalloc(100, GFP_ATOMIC);
- 	if (head == NULL)
- 		return -ENOMEM;
- 
--- 
-1.7.7.6
-
diff --git a/patches/6lowpan/0013-mac802154-make-mem-alloc-ATOMIC-to-prevent-schedulin.patch b/patches/6lowpan/0013-mac802154-make-mem-alloc-ATOMIC-to-prevent-schedulin.patch
deleted file mode 100644
index cc9978974667cbae64201457af5e529538f73013..0000000000000000000000000000000000000000
--- a/patches/6lowpan/0013-mac802154-make-mem-alloc-ATOMIC-to-prevent-schedulin.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 02d89a3cfacaab49b6876bca208b52298c618c56 Mon Sep 17 00:00:00 2001
-From: Tony Cheneau <tony.cheneau@amnesiak.org>
-Date: Tue, 10 Jul 2012 11:36:28 -0400
-Subject: [PATCH 13/16] mac802154: make mem alloc ATOMIC to prevent
- "scheduling while atomic" crashes
-
-These crashes occur mainly with the serial driver (not yet in the tree).
-
-Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
----
- net/mac802154/wpan.c |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c
-index fdf482a..e0d358f 100644
---- a/net/mac802154/wpan.c
-+++ b/net/mac802154/wpan.c
-@@ -143,7 +143,7 @@ static int mac802154_header_create(struct sk_buff *skb,
- 	if (!daddr)
- 		return -EINVAL;
- 
--	head = kzalloc(MAC802154_FRAME_HARD_HEADER_LEN, GFP_KERNEL);
-+	head = kzalloc(MAC802154_FRAME_HARD_HEADER_LEN, GFP_ATOMIC);
- 	if (head == NULL)
- 		return -ENOMEM;
- 
--- 
-1.7.7.6
-
diff --git a/patches/6lowpan/0014-mac802154-remove-unnecessary-spinlocks.patch b/patches/6lowpan/0014-mac802154-remove-unnecessary-spinlocks.patch
deleted file mode 100644
index 2df8ede719e69e83a901727be6ee8254a97fa406..0000000000000000000000000000000000000000
--- a/patches/6lowpan/0014-mac802154-remove-unnecessary-spinlocks.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 8464dfeb6973088bede41d80adac2b77aab4b751 Mon Sep 17 00:00:00 2001
-From: Tony Cheneau <tony.cheneau@amnesiak.org>
-Date: Thu, 20 Sep 2012 23:44:19 -0400
-Subject: [PATCH 14/16] mac802154: remove unnecessary spinlocks
-
-These spinlock protects an int variable, that is always accessible in an
-atomic fashion.
-
-Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
----
- net/mac802154/mib.c |   14 ++------------
- 1 files changed, 2 insertions(+), 12 deletions(-)
-
-diff --git a/net/mac802154/mib.c b/net/mac802154/mib.c
-index f47781a..2339f8d 100644
---- a/net/mac802154/mib.c
-+++ b/net/mac802154/mib.c
-@@ -103,15 +103,10 @@ void mac802154_dev_set_short_addr(struct net_device *dev, u16 val)
- u16 mac802154_dev_get_short_addr(const struct net_device *dev)
- {
- 	struct mac802154_sub_if_data *priv = netdev_priv(dev);
--	u16 ret;
- 
- 	BUG_ON(dev->type != ARPHRD_IEEE802154);
- 
--	spin_lock_bh(&priv->mib_lock);
--	ret = priv->short_addr;
--	spin_unlock_bh(&priv->mib_lock);
--
--	return ret;
-+	return priv->short_addr;
- }
- 
- void mac802154_dev_set_ieee_addr(struct net_device *dev)
-@@ -131,15 +126,10 @@ void mac802154_dev_set_ieee_addr(struct net_device *dev)
- u16 mac802154_dev_get_pan_id(const struct net_device *dev)
- {
- 	struct mac802154_sub_if_data *priv = netdev_priv(dev);
--	u16 ret;
- 
- 	BUG_ON(dev->type != ARPHRD_IEEE802154);
- 
--	spin_lock_bh(&priv->mib_lock);
--	ret = priv->pan_id;
--	spin_unlock_bh(&priv->mib_lock);
--
--	return ret;
-+	return priv->pan_id;
- }
- 
- void mac802154_dev_set_pan_id(struct net_device *dev, u16 val)
--- 
-1.7.7.6
-
diff --git a/patches/6lowpan/0015-mac802154-re-introduce-MAC-primitives-required-to-se.patch b/patches/6lowpan/0015-mac802154-re-introduce-MAC-primitives-required-to-se.patch
deleted file mode 100644
index c6fbf3d1e3c3d5ec93b1cca46ba293eaf27fa83f..0000000000000000000000000000000000000000
--- a/patches/6lowpan/0015-mac802154-re-introduce-MAC-primitives-required-to-se.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From a352478599110553fef81c81a20d984ccfb011e1 Mon Sep 17 00:00:00 2001
-From: Tony Cheneau <tony.cheneau@amnesiak.org>
-Date: Thu, 20 Sep 2012 23:48:11 -0400
-Subject: [PATCH 15/16] mac802154: re-introduce MAC primitives required to
- send/receive packets
-
-- mlme_assoc_req() and mlme_assoc_resp() are just place holder for the
-  moment (they prevent the two corresponding function pointers in the
-  mac802154_mlme_wpan structure to be left uninitialized)
-- mac802514_dev_get_bsn() and mac802514_dev_get_dsn() MAC primitives
-  were present in the Linux-Zigbee kernel and are being re-introduced.
-
-Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
----
- net/mac802154/mac802154.h |    2 ++
- net/mac802154/mac_cmd.c   |   22 +++++++++++++++++++++-
- net/mac802154/mib.c       |   19 +++++++++++++++++++
- 3 files changed, 42 insertions(+), 1 deletions(-)
-
-diff --git a/net/mac802154/mac802154.h b/net/mac802154/mac802154.h
-index a4dcaf1..18d4044 100644
---- a/net/mac802154/mac802154.h
-+++ b/net/mac802154/mac802154.h
-@@ -114,5 +114,7 @@ void mac802154_dev_set_ieee_addr(struct net_device *dev);
- u16 mac802154_dev_get_pan_id(const struct net_device *dev);
- void mac802154_dev_set_pan_id(struct net_device *dev, u16 val);
- void mac802154_dev_set_page_channel(struct net_device *dev, u8 page, u8 chan);
-+u8 mac802154_dev_get_dsn(const struct net_device *dev);
-+u8 mac802154_dev_get_bsn(const struct net_device *dev);
- 
- #endif /* MAC802154_H */
-diff --git a/net/mac802154/mac_cmd.c b/net/mac802154/mac_cmd.c
-index d8d2770..8e46e7b 100644
---- a/net/mac802154/mac_cmd.c
-+++ b/net/mac802154/mac_cmd.c
-@@ -33,6 +33,22 @@
- 
- #include "mac802154.h"
- 
-+static int mac802154_mlme_assoc_req(struct net_device *dev,
-+			struct ieee802154_addr *addr,
-+			u8 channel, u8 page, u8 cap)
-+{
-+	/* TBD */
-+	return 0;
-+}
-+
-+static int mac802154_mlme_assoc_resp(struct net_device *dev,
-+			struct ieee802154_addr *addr,
-+			u16 short_addr, u8 status)
-+{
-+	/* TBD */
-+	return 0;
-+}
-+
- static int mac802154_mlme_start_req(struct net_device *dev,
- 				    struct ieee802154_addr *addr,
- 				    u8 channel, u8 page,
-@@ -70,7 +86,11 @@ struct ieee802154_reduced_mlme_ops mac802154_mlme_reduced = {
- 
- struct ieee802154_mlme_ops mac802154_mlme_wpan = {
- 	.get_phy = mac802154_get_phy,
--	.start_req = mac802154_mlme_start_req,
- 	.get_pan_id = mac802154_dev_get_pan_id,
- 	.get_short_addr = mac802154_dev_get_short_addr,
-+	.get_dsn = mac802154_dev_get_dsn,
-+	.get_bsn = mac802154_dev_get_bsn,
-+	.start_req = mac802154_mlme_start_req,
-+	.assoc_req = mac802154_mlme_assoc_req,
-+	.assoc_resp = mac802154_mlme_assoc_resp
- };
-diff --git a/net/mac802154/mib.c b/net/mac802154/mib.c
-index 2339f8d..70ab6ca 100644
---- a/net/mac802154/mib.c
-+++ b/net/mac802154/mib.c
-@@ -149,6 +149,25 @@ void mac802154_dev_set_pan_id(struct net_device *dev, u16 val)
- 	}
- }
- 
-+u8 mac802154_dev_get_dsn(const struct net_device *dev)
-+{
-+	struct mac802154_sub_if_data *priv = netdev_priv(dev);
-+
-+	BUG_ON(dev->type != ARPHRD_IEEE802154);
-+
-+	return priv->dsn++;
-+}
-+
-+u8 mac802154_dev_get_bsn(const struct net_device *dev)
-+{
-+	struct mac802154_sub_if_data *priv = netdev_priv(dev);
-+
-+	BUG_ON(dev->type != ARPHRD_IEEE802154);
-+
-+	return priv->bsn++;
-+}
-+
-+
- static void phy_chan_notify(struct work_struct *work)
- {
- 	struct phy_chan_notify_work *nw = container_of(work,
--- 
-1.7.7.6
-
diff --git a/patches/6lowpan/0016-serial-initial-import-of-the-IEEE-802.15.4-serial-dr.patch b/patches/6lowpan/0016-serial-initial-import-of-the-IEEE-802.15.4-serial-dr.patch
deleted file mode 100644
index 4dd533d7a1766d748022a9242677ad4d7e70c58c..0000000000000000000000000000000000000000
--- a/patches/6lowpan/0016-serial-initial-import-of-the-IEEE-802.15.4-serial-dr.patch
+++ /dev/null
@@ -1,1328 +0,0 @@
-From 79f73f423f5ea9491a7f1bd7f407feafebb5da9d Mon Sep 17 00:00:00 2001
-From: Tony Cheneau <tony.cheneau@amnesiak.org>
-Date: Tue, 11 Sep 2012 23:42:51 -0400
-Subject: [PATCH 16/16] serial: initial import of the IEEE 802.15.4 serial
- driver
-
-The initial code has been imported from the Linux ZigBee project. It
-supports RedBee Econotag device type.
-
-Patches from Mariano Alvira has been applied against the drivers.
-
-Initialisation of the driver now send CLOSE command before sending OPEN
-command. This effectively re-initiate the devices (empty buffers).
-
-Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org>
----
- drivers/net/ieee802154/Kconfig  |    4 +
- drivers/net/ieee802154/Makefile |    1 +
- drivers/net/ieee802154/serial.c | 1228 +++++++++++++++++++++++++++++++++++++++
- include/linux/nl802154.h        |    3 +-
- include/uapi/linux/tty.h        |    1 +
- net/ieee802154/6lowpan.c        |    2 +
- 6 files changed, 1238 insertions(+), 1 deletions(-)
- create mode 100644 drivers/net/ieee802154/serial.c
-
-diff --git a/drivers/net/ieee802154/Kconfig b/drivers/net/ieee802154/Kconfig
-index 08ae465..c982fa8 100644
---- a/drivers/net/ieee802154/Kconfig
-+++ b/drivers/net/ieee802154/Kconfig
-@@ -45,3 +45,7 @@ config IEEE802154_MRF24J40
- 
-          This driver can also be built as a module. To do so, say M here.
-          the module will be called 'mrf24j40'.
-+
-+config IEEE802154_SERIAL
-+	depends on IEEE802154_DRIVERS && MAC802154
-+	tristate "Simple LR-WPAN UART driver"
-diff --git a/drivers/net/ieee802154/Makefile b/drivers/net/ieee802154/Makefile
-index abb0c08..5c7d9cb 100644
---- a/drivers/net/ieee802154/Makefile
-+++ b/drivers/net/ieee802154/Makefile
-@@ -2,3 +2,4 @@ obj-$(CONFIG_IEEE802154_FAKEHARD) += fakehard.o
- obj-$(CONFIG_IEEE802154_FAKELB) += fakelb.o
- obj-$(CONFIG_IEEE802154_AT86RF230) += at86rf230.o
- obj-$(CONFIG_IEEE802154_MRF24J40) += mrf24j40.o
-+obj-$(CONFIG_IEEE802154_SERIAL) += serial.o
-diff --git a/drivers/net/ieee802154/serial.c b/drivers/net/ieee802154/serial.c
-new file mode 100644
-index 0000000..950893a
---- /dev/null
-+++ b/drivers/net/ieee802154/serial.c
-@@ -0,0 +1,1228 @@
-+/*
-+ * ZigBee TTY line discipline.
-+ *
-+ * Provides interface between ZigBee stack and IEEE 802.15.4 compatible
-+ * firmware over serial line. Communication protocol is described below.
-+ *
-+ * Copyright (C) 2007, 2008, 2009 Siemens AG
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2
-+ * as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License along
-+ * with this program; if not, write to the Free Software Foundation, Inc.,
-+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-+ *
-+ * Written by:
-+ * Maxim Gorbachyov <maxim.gorbachev@siemens.com>
-+ * Maxim Osipov <maxim.osipov@siemens.com>
-+ * Sergey Lapin <slapin@ossfans.org>
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/kernel.h>
-+#include <linux/completion.h>
-+#include <linux/tty.h>
-+#include <linux/skbuff.h>
-+#include <linux/sched.h>
-+#include <net/mac802154.h>
-+#include <net/wpan-phy.h>
-+
-+
-+/* NOTE: be sure to use here the same values as in the firmware */
-+#define START_BYTE1	'z'
-+#define START_BYTE2	'b'
-+#define MAX_DATA_SIZE	127
-+
-+#define TIMEOUT 1000
-+
-+#define IDLE_MODE	0x00
-+#define RX_MODE		0x02
-+#define TX_MODE		0x03
-+#define FORCE_TRX_OFF	0xF0
-+
-+#define STATUS_SUCCESS	0
-+#define STATUS_RX_ON	1
-+#define STATUS_TX_ON	2
-+#define STATUS_TRX_OFF	3
-+#define STATUS_IDLE	4
-+#define STATUS_BUSY	5
-+#define STATUS_BUSY_RX	6
-+#define STATUS_BUSY_TX	7
-+#define STATUS_ERR	8
-+
-+#define STATUS_WAIT	((u8) -1) /* waiting for the answer */
-+
-+/* We re-use PPP ioctl for our purposes */
-+#define	PPPIOCGUNIT	_IOR('t', 86, int)	/* get ppp unit number */
-+
-+/*
-+ * The following messages are used to control ZigBee firmware.
-+ * All communication has request/response format,
-+ * except of asynchronous incoming data stream (DATA_RECV_* messages).
-+ */
-+enum {
-+	NO_ID			= 0, /* means no pending id */
-+
-+	/* Driver to Firmware */
-+	CMD_OPEN		= 0x01, /* u8 id */
-+	CMD_CLOSE		= 0x02, /* u8 id */
-+	CMD_SET_CHANNEL		= 0x04, /* u8 id, u8 channel */
-+	CMD_ED			= 0x05, /* u8 id */
-+	CMD_SET_STATE		= 0x07, /* u8 id, u8 flag */
-+	DATA_XMIT_BLOCK		= 0x09, /* u8 id, u8 len, u8 data[len] */
-+	RESP_RECV_BLOCK		= 0x0b, /* u8 id, u8 status */
-+	CMD_ADDRESS		= 0x0d, /* u8 id */
-+	CMD_SET_PAN_ID = 0x0f, /* u8 id, u8 u8 panid (MSB first) */
-+	CMD_SET_SHORT_ADDRESS = 0x10, /* u8 id, u8 u8 address  (MSB first)*/
-+	CMD_SET_LONG_ADDRESS = 0x11, /* u8 id, u8 u8 u8 u8 u8 u8 u8 u8 address (MSB first) */
-+
-+	/* Firmware to Driver */
-+	RESP_OPEN		= 0x81, /* u8 id, u8 status */
-+	RESP_CLOSE		= 0x82, /* u8 id, u8 status */
-+	RESP_SET_CHANNEL	= 0x84, /* u8 id, u8 status */
-+	RESP_ED			= 0x85, /* u8 id, u8 status, u8 level */
-+	RESP_SET_STATE		= 0x87, /* u8 id, u8 status */
-+	RESP_XMIT_BLOCK		= 0x89, /* u8 id, u8 status */
-+	DATA_RECV_BLOCK		= 0x8b, /* u8 id, u8 lq, u8 len, u8 data[len] */
-+	RESP_ADDRESS		= 0x8d, /* u8 id, u8 status, u8 u8 u8 u8 u8 u8 u8 u8 address */
-+	RESP_SET_PAN_ID     = 0x8f, /* u8 id, u8 status */
-+	RESP_SET_SHORT_ADDRESS = 0x90, /* u8 id, u8 status */
-+	RESP_SET_LONG_ADDRESS = 0x91, /* u8 id, u8 status */
-+};
-+
-+enum {
-+	STATE_WAIT_START1,
-+	STATE_WAIT_START2,
-+	STATE_WAIT_COMMAND,
-+	STATE_WAIT_PARAM1,
-+	STATE_WAIT_PARAM2,
-+	STATE_WAIT_DATA
-+};
-+
-+struct zb_device {
-+	/* Relative devices */
-+	struct tty_struct	*tty;
-+	struct ieee802154_dev	*dev;
-+
-+	/* locks the ldisc for the command */
-+	struct mutex		mutex;
-+
-+	/* command completition */
-+	wait_queue_head_t	wq;
-+	u8			status;
-+	u8			ed;
-+
-+	/* Internal state */
-+	struct completion	open_done;
-+	struct completion	close_done;
-+	unsigned char		opened;
-+	u8			pending_id;
-+	unsigned int		pending_size;
-+	u8			*pending_data;
-+	/* FIXME: WE NEED LOCKING!!! */
-+
-+	/* Command (rx) processing */
-+	int			state;
-+	unsigned char		id;
-+	unsigned char		param1;
-+	unsigned char		param2;
-+	unsigned char		index;
-+	unsigned char		data[MAX_DATA_SIZE];
-+};
-+
-+/*****************************************************************************
-+ * ZigBee serial device protocol handling
-+ *****************************************************************************/
-+static int _open_dev(struct zb_device *zbdev);
-+static int _close_dev(struct zb_device *zbdev);
-+
-+static void
-+cleanup(struct zb_device *zbdev)
-+{
-+    zbdev->state = STATE_WAIT_START1;
-+    zbdev->id = 0;
-+    zbdev->param1 = 0;
-+    zbdev->param2 = 0;
-+    zbdev->index = 0;
-+    zbdev->pending_id = 0;
-+    zbdev->pending_size = 0;
-+
-+    if (zbdev->pending_data)
-+    {
-+        kfree(zbdev->pending_data);
-+        zbdev->pending_data = NULL;
-+    }
-+}
-+
-+static int
-+_send_pending_data(struct zb_device *zbdev)
-+{
-+	struct tty_struct *tty;
-+
-+	BUG_ON(!zbdev);
-+	tty = zbdev->tty;
-+	if (!tty)
-+		return -ENODEV;
-+
-+	zbdev->status = STATUS_WAIT;
-+
-+	/* Debug info */
-+	printk(KERN_INFO "%s, %d bytes\n", __func__,
-+			zbdev->pending_size);
-+#ifdef DEBUG
-+	print_hex_dump_bytes("send_pending_data ", DUMP_PREFIX_NONE,
-+			zbdev->pending_data, zbdev->pending_size);
-+#endif
-+
-+	if (tty->driver->ops->write(tty, zbdev->pending_data,
-+				zbdev->pending_size) != zbdev->pending_size) {
-+		printk(KERN_ERR "%s: device write failed\n", __func__);
-+		return -1;
-+	}
-+
-+	return 0;
-+}
-+
-+static int
-+send_cmd(struct zb_device *zbdev, u8 id)
-+{
-+	u8 len = 0;
-+	/* 4 because of 2 start bytes, id and optional extra */
-+	u8 buf[4];
-+
-+	/* Check arguments */
-+	BUG_ON(!zbdev);
-+
-+	if (!zbdev->opened) {
-+		if (!_close_dev(zbdev) || !_open_dev(zbdev))
-+			return -EAGAIN;
-+	}
-+
-+	pr_debug("%s(): id = %u\n", __func__, id);
-+	if (zbdev->pending_size) {
-+		printk(KERN_ERR "%s(): cmd is already pending, id = %u\n",
-+			__func__, zbdev->pending_id);
-+		//BUG();
-+        cleanup(zbdev);
-+        return -EAGAIN;
-+	}
-+
-+	/* Prepare a message */
-+	buf[len++] = START_BYTE1;
-+	buf[len++] = START_BYTE2;
-+	buf[len++] = id;
-+
-+	zbdev->pending_id = id;
-+	zbdev->pending_size = len;
-+	zbdev->pending_data = kzalloc(zbdev->pending_size, GFP_ATOMIC);
-+	if (!zbdev->pending_data) {
-+		printk(KERN_ERR "%s(): unable to allocate memory\n", __func__);
-+		zbdev->pending_id = 0;
-+		zbdev->pending_size = 0;
-+		return -ENOMEM;
-+	}
-+	memcpy(zbdev->pending_data, buf, len);
-+
-+	return _send_pending_data(zbdev);
-+}
-+
-+static int
-+send_cmd2(struct zb_device *zbdev, u8 id, u8 extra)
-+{
-+	u8 len = 0;
-+	/* 4 because of 2 start bytes, id and optional extra */
-+	u8 buf[4];
-+
-+	/* Check arguments */
-+	BUG_ON(!zbdev);
-+
-+	if (!zbdev->opened) {
-+		if (!_close_dev(zbdev) || !_open_dev(zbdev))
-+			return -EAGAIN;
-+	}
-+
-+	pr_debug("%s(): id = %u\n", __func__, id);
-+	if (zbdev->pending_size) {
-+		printk(KERN_ERR "%s(): cmd is already pending, id = %u\n",
-+			__func__, zbdev->pending_id);
-+//		BUG();
-+        cleanup(zbdev);
-+        return -EAGAIN;
-+	}
-+
-+	/* Prepare a message */
-+	buf[len++] = START_BYTE1;
-+	buf[len++] = START_BYTE2;
-+	buf[len++] = id;
-+	buf[len++] = extra;
-+
-+	zbdev->pending_id = id;
-+	zbdev->pending_size = len;
-+	zbdev->pending_data = kzalloc(zbdev->pending_size, GFP_ATOMIC);
-+	if (!zbdev->pending_data) {
-+		printk(KERN_ERR "%s(): unable to allocate memory\n", __func__);
-+		zbdev->pending_id = 0;
-+		zbdev->pending_size = 0;
-+		return -ENOMEM;
-+	}
-+	memcpy(zbdev->pending_data, buf, len);
-+
-+	return _send_pending_data(zbdev);
-+}
-+
-+static int
-+send_cmd3(struct zb_device *zbdev, u8 id, u8 extra1, u8 extra2)
-+{
-+	u8 len = 0;
-+	/* 5 because of 2 start bytes, id, extra1, extra2 */
-+	u8 buf[5];
-+
-+	/* Check arguments */
-+	BUG_ON(!zbdev);
-+
-+	if (!zbdev->opened) {
-+		if (!_close_dev(zbdev) || !_open_dev(zbdev))
-+			return -EAGAIN;
-+	}
-+
-+	pr_debug("%s(): id = %u\n", __func__, id);
-+	if (zbdev->pending_size) {
-+		printk(KERN_ERR "%s(): cmd is already pending, id = %u\n",
-+			__func__, zbdev->pending_id);
-+//		BUG();
-+        cleanup(zbdev);
-+        return -EAGAIN;
-+	}
-+
-+	/* Prepare a message */
-+	buf[len++] = START_BYTE1;
-+	buf[len++] = START_BYTE2;
-+	buf[len++] = id;
-+	buf[len++] = extra1;
-+	buf[len++] = extra2;
-+
-+	zbdev->pending_id = id;
-+	zbdev->pending_size = len;
-+	zbdev->pending_data = kzalloc(zbdev->pending_size, GFP_ATOMIC);
-+	if (!zbdev->pending_data) {
-+		printk(KERN_ERR "%s(): unable to allocate memory\n", __func__);
-+		zbdev->pending_id = 0;
-+		zbdev->pending_size = 0;
-+		return -ENOMEM;
-+	}
-+	memcpy(zbdev->pending_data, buf, len);
-+
-+	return _send_pending_data(zbdev);
-+}
-+
-+static int
-+send_block(struct zb_device *zbdev, u8 len, u8 *data)
-+{
-+	u8 i = 0, buf[4];	/* 4 because of 2 start bytes, id and len */
-+
-+	/* Check arguments */
-+	BUG_ON(!zbdev);
-+
-+	if (!zbdev->opened) {
-+		if (!_close_dev(zbdev) || !_open_dev(zbdev))
-+			return -EAGAIN;
-+	}
-+
-+	pr_debug("%s(): id = %u\n", __func__, DATA_XMIT_BLOCK);
-+	if (zbdev->pending_size) {
-+		printk(KERN_ERR "%s(): cmd is already pending, id = %u\n",
-+			__func__, zbdev->pending_id);
-+		//BUG();
-+        cleanup(zbdev);
-+        return -EAGAIN;
-+	}
-+
-+	/* Prepare a message */
-+	buf[i++] = START_BYTE1;
-+	buf[i++] = START_BYTE2;
-+	buf[i++] = DATA_XMIT_BLOCK;
-+	buf[i++] = len;
-+
-+	zbdev->pending_id = DATA_XMIT_BLOCK;
-+	zbdev->pending_size = i + len;
-+	zbdev->pending_data = kzalloc(zbdev->pending_size, GFP_ATOMIC);
-+	if (!zbdev->pending_data) {
-+		printk(KERN_ERR "%s(): unable to allocate memory\n", __func__);
-+		zbdev->pending_id = 0;
-+		zbdev->pending_size = 0;
-+		return -ENOMEM;
-+	}
-+	memcpy(zbdev->pending_data, buf, i);
-+	memcpy(zbdev->pending_data + i, data, len);
-+
-+	return _send_pending_data(zbdev);
-+}
-+
-+
-+static int
-+is_command(unsigned char c)
-+{
-+	switch (c) {
-+	/* ids we can get here: */
-+	case RESP_OPEN:
-+	case RESP_CLOSE:
-+	case RESP_SET_CHANNEL:
-+	case RESP_ED:
-+	case RESP_XMIT_BLOCK:
-+	case DATA_RECV_BLOCK:
-+	case RESP_ADDRESS:
-+	case RESP_SET_PAN_ID:
-+	case RESP_SET_SHORT_ADDRESS:
-+	case RESP_SET_LONG_ADDRESS:
-+		return 1;
-+	}
-+	return 0;
-+}
-+
-+static int
-+_match_pending_id(struct zb_device *zbdev)
-+{
-+	return ((CMD_OPEN == zbdev->pending_id &&
-+			RESP_OPEN == zbdev->id) ||
-+		(CMD_CLOSE == zbdev->pending_id &&
-+			RESP_CLOSE == zbdev->id) ||
-+		(CMD_SET_CHANNEL == zbdev->pending_id &&
-+			RESP_SET_CHANNEL == zbdev->id) ||
-+		(CMD_ED == zbdev->pending_id &&
-+			RESP_ED == zbdev->id) ||
-+		(DATA_XMIT_BLOCK == zbdev->pending_id &&
-+			RESP_XMIT_BLOCK == zbdev->id) ||
-+		(DATA_RECV_BLOCK == zbdev->id) ||
-+		(CMD_ADDRESS == zbdev->pending_id &&
-+			RESP_ADDRESS == zbdev->id)) ||
-+		(CMD_SET_PAN_ID == zbdev->pending_id &&
-+			RESP_SET_PAN_ID ==  zbdev->id) ||
-+		(CMD_SET_SHORT_ADDRESS == zbdev->pending_id &&
-+			RESP_SET_SHORT_ADDRESS == zbdev->id) ||
-+		(CMD_SET_LONG_ADDRESS == zbdev->pending_id &&
-+			RESP_SET_LONG_ADDRESS  == zbdev->id);
-+}
-+
-+static void serial_net_rx(struct zb_device *zbdev)
-+{
-+	/* zbdev->param1 is LQI
-+	 * zbdev->param2 is length of data
-+	 * zbdev->data is data itself
-+	 */
-+	struct sk_buff *skb;
-+	skb = alloc_skb(zbdev->param2, GFP_ATOMIC);
-+	skb_put(skb, zbdev->param2);
-+	skb_copy_to_linear_data(skb, zbdev->data, zbdev->param2);
-+	ieee802154_rx_irqsafe(zbdev->dev, skb, zbdev->param1);
-+}
-+
-+static void
-+process_command(struct zb_device *zbdev)
-+{
-+	/* Command processing */
-+	if (!_match_pending_id(zbdev))
-+    {
-+        cleanup(zbdev);
-+		return;
-+    }
-+
-+	if (RESP_OPEN == zbdev->id && STATUS_SUCCESS == zbdev->param1) {
-+		zbdev->opened = 1;
-+		pr_debug("Opened device\n");
-+		complete(&zbdev->open_done);
-+		/* Input is not processed during output, so
-+		 * using completion is not possible during output.
-+		 * so we need to handle open as any other command
-+		 * and hope for best
-+		 */
-+		return;
-+	}
-+
-+	if (RESP_CLOSE == zbdev->id && STATUS_SUCCESS == zbdev->param1) {
-+		zbdev->opened = 0;
-+		pr_debug("Closed device\n");
-+		complete(&zbdev->close_done);
-+		/* Input is not processed during output, so
-+		 * using completion is not possible during output.
-+		 * so we need to handle open as any other command
-+		 * and hope for best
-+		 */
-+		return;
-+	}
-+
-+	if (!zbdev->opened)
-+    {
-+        cleanup(zbdev);
-+		return;
-+    }
-+
-+
-+	zbdev->pending_id = 0;
-+	kfree(zbdev->pending_data);
-+	zbdev->pending_data = NULL;
-+	zbdev->pending_size = 0;
-+
-+	if (zbdev->id != DATA_RECV_BLOCK) {
-+		/* XXX: w/around for old FW, REMOVE */
-+		if (zbdev->param1 == STATUS_IDLE)
-+			zbdev->status = STATUS_SUCCESS;
-+		else
-+			zbdev->status = zbdev->param1;
-+	}
-+
-+    switch (zbdev->id) {
-+	case RESP_ED:
-+		zbdev->ed = zbdev->param2;
-+		break;
-+	case DATA_RECV_BLOCK:
-+		pr_debug("Received block, lqi %02x, len %02x\n",
-+				zbdev->param1, zbdev->param2);
-+		/* zbdev->param1 is LQ, zbdev->param2 is length */
-+		serial_net_rx(zbdev);
-+		break;
-+	case RESP_ADDRESS:
-+		pr_debug("Received address, %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
-+			zbdev->data[0], zbdev->data[1], zbdev->data[2], zbdev->data[3],
-+			zbdev->data[4], zbdev->data[5], zbdev->data[6], zbdev->data[7]);
-+		break;
-+	}
-+
-+    cleanup(zbdev);
-+
-+    wake_up(&zbdev->wq);
-+}
-+
-+static void
-+process_char(struct zb_device *zbdev, unsigned char c)
-+{
-+	/* Data processing */
-+	switch (zbdev->state) {
-+	case STATE_WAIT_START1:
-+		if (START_BYTE1 == c)
-+			zbdev->state = STATE_WAIT_START2;
-+        else
-+            cleanup(zbdev);
-+		break;
-+
-+	case STATE_WAIT_START2:
-+		if (START_BYTE2 == c)
-+			zbdev->state = STATE_WAIT_COMMAND;
-+		else
-+			cleanup(zbdev);
-+		break;
-+
-+	case STATE_WAIT_COMMAND:
-+		if (is_command(c)) {
-+			zbdev->id = c;
-+			zbdev->state = STATE_WAIT_PARAM1;
-+		} else {
-+			cleanup(zbdev);
-+			printk(KERN_ERR "%s, unexpected command id: %x\n",
-+					__func__, c);
-+		}
-+		break;
-+
-+	case STATE_WAIT_PARAM1:
-+		zbdev->param1 = c;
-+		if ((RESP_ED == zbdev->id) || (DATA_RECV_BLOCK == zbdev->id))
-+			zbdev->state = STATE_WAIT_PARAM2;
-+		else if (RESP_ADDRESS == zbdev->id) {
-+			zbdev->param2 = 8;
-+			zbdev->state = STATE_WAIT_DATA;
-+		} else
-+			process_command(zbdev);
-+		break;
-+
-+	case STATE_WAIT_PARAM2:
-+		zbdev->param2 = c;
-+		if (RESP_ED == zbdev->id)
-+			process_command(zbdev);
-+		else if (DATA_RECV_BLOCK == zbdev->id)
-+			zbdev->state = STATE_WAIT_DATA;
-+		else
-+			cleanup(zbdev);
-+		break;
-+
-+	case STATE_WAIT_DATA:
-+            if ((zbdev->index < sizeof(zbdev->data)) &&
-+               (zbdev->param2 <= sizeof(zbdev->data))) {
-+
-+			zbdev->data[zbdev->index] = c;
-+			zbdev->index++;
-+			/*
-+			 * Pending data is received,
-+			 * param2 is length for DATA_RECV_BLOCK
-+			 */
-+			if (zbdev->index == zbdev->param2) {
-+                zbdev->state = STATE_WAIT_START1;
-+				process_command(zbdev);
-+			}
-+		} else {
-+			printk(KERN_ERR "%s(): data size is greater "
-+				"than buffer available\n", __func__);
-+			cleanup(zbdev);
-+		}
-+		break;
-+
-+	default:
-+		cleanup(zbdev);
-+	}
-+}
-+
-+/*****************************************************************************
-+ * Device operations for IEEE 802.15.4 PHY side interface ZigBee stack
-+ *****************************************************************************/
-+
-+static int _open_dev(struct zb_device *zbdev)
-+{
-+	int retries;
-+	u8 len = 0;
-+	/* 4 because of 2 start bytes, id and optional extra */
-+	u8 buf[4];
-+
-+	/* Check arguments */
-+	BUG_ON(!zbdev);
-+	if (zbdev->opened)
-+		return 1;
-+
-+	pr_debug("%s()\n", __func__);
-+	if (zbdev->pending_size) {
-+		printk(KERN_ERR "%s(): cmd is already pending, id = %u\n",
-+			__func__, zbdev->pending_id);
-+            //BUG();
-+            cleanup(zbdev);
-+            return -EAGAIN;
-+	}
-+
-+	/* Prepare a message */
-+	buf[len++] = START_BYTE1;
-+	buf[len++] = START_BYTE2;
-+	buf[len++] = CMD_OPEN;
-+
-+
-+    zbdev->pending_id = CMD_OPEN;
-+    zbdev->pending_size = len;
-+    zbdev->pending_data = kzalloc(zbdev->pending_size, GFP_KERNEL);
-+    if (!zbdev->pending_data) {
-+        printk(KERN_ERR "%s(): unable to allocate memory\n", __func__);
-+        zbdev->pending_id = 0;
-+        zbdev->pending_size = 0;
-+        return -ENOMEM;
-+    }
-+    memcpy(zbdev->pending_data, buf, len);
-+
-+	retries = 5;
-+	while (!zbdev->opened && retries) {
-+
-+		if (_send_pending_data(zbdev) != 0)
-+			return 0;
-+
-+		/* 3 second before retransmission */
-+		wait_for_completion_interruptible_timeout(
-+				&zbdev->open_done, msecs_to_jiffies(TIMEOUT));
-+		--retries;
-+	}
-+
-+    cleanup(zbdev);
-+
-+	if (zbdev->opened) {
-+		printk(KERN_INFO "Opened connection to device\n");
-+		return 1;
-+	}
-+
-+	return 0;
-+}
-+
-+static int _close_dev(struct zb_device *zbdev)
-+{
-+	int retries;
-+	u8 len = 0;
-+	/* 4 because of 2 start bytes, id and optional extra */
-+	u8 buf[4];
-+
-+	/* Check arguments */
-+	BUG_ON(!zbdev);
-+
-+	pr_debug("%s()\n", __func__);
-+	if (zbdev->pending_size) {
-+		printk(KERN_ERR "%s(): cmd is already pending, id = %u\n",
-+			__func__, zbdev->pending_id);
-+		//BUG();
-+        cleanup(zbdev);
-+        return -EAGAIN;
-+	}
-+
-+	/* Prepare a message */
-+	buf[len++] = START_BYTE1;
-+	buf[len++] = START_BYTE2;
-+	buf[len++] = CMD_CLOSE;
-+
-+    zbdev->pending_id = CMD_CLOSE;
-+    zbdev->pending_size = len;
-+    zbdev->pending_data = kzalloc(zbdev->pending_size, GFP_KERNEL);
-+    if (!zbdev->pending_data) {
-+        printk(KERN_ERR "%s(): unable to allocate memory\n", __func__);
-+        zbdev->pending_id = 0;
-+        zbdev->pending_size = 0;
-+        return -ENOMEM;
-+    }
-+    memcpy(zbdev->pending_data, buf, len);
-+
-+	retries = 5;
-+    do{
-+
-+        if (_send_pending_data(zbdev) !=0)
-+            return 0;
-+
-+		/* 1 second before retransmission */
-+		wait_for_completion_interruptible_timeout(
-+				&zbdev->close_done, msecs_to_jiffies(TIMEOUT));
-+		--retries;
-+	} while (zbdev->opened && retries) ;
-+
-+    cleanup(zbdev);
-+
-+	if (!zbdev->opened)
-+    {
-+		printk(KERN_INFO "Closed connection to device\n");
-+        return 1;
-+    }
-+
-+    return 0;
-+}
-+
-+/* Valid channels: 1-16 */
-+static int
-+ieee802154_serial_set_channel(struct ieee802154_dev *dev, int page, int channel)
-+{
-+	struct zb_device *zbdev;
-+	int ret = 0;
-+
-+	pr_debug("%s %d\n", __func__, channel);
-+
-+	zbdev = dev->priv;
-+	if (NULL == zbdev) {
-+		printk(KERN_ERR "%s: wrong phy\n", __func__);
-+		return -EINVAL;
-+	}
-+
-+	BUG_ON(page != 0);
-+	/* Our channels are actually from 11 to 26
-+	 * We have IEEE802.15.4 channel no from 0 to 26.
-+	 * channels 0-10 are not valid for us */
-+	BUG_ON(channel < 11 || channel > 26);
-+	/* ...  but our crappy firmware numbers channels from 1 to 16
-+	 * which is a mystery. We suould enforce that using PIB API
-+	 * but additional checking here won't kill, and gcc will
-+	 * optimize this stuff anyway. */
-+	BUG_ON((channel - 10) < 1 && (channel - 10) > 16);
-+	if (mutex_lock_interruptible(&zbdev->mutex))
-+		return -EINTR;
-+	ret = send_cmd2(zbdev, CMD_SET_CHANNEL, channel - 10);
-+	if (ret)
-+		goto out;
-+
-+	if (wait_event_interruptible_timeout(zbdev->wq,
-+				zbdev->status != STATUS_WAIT,
-+				msecs_to_jiffies(TIMEOUT)) > 0) {
-+		if (zbdev->status != STATUS_SUCCESS)
-+			ret = -EBUSY;
-+	} else
-+		ret = -EINTR;
-+
-+	if (!ret)
-+		zbdev->dev->phy->current_channel = channel;
-+out:
-+	mutex_unlock(&zbdev->mutex);
-+	pr_debug("%s end\n", __func__);
-+	return ret;
-+}
-+
-+static int
-+ieee802154_serial_ed(struct ieee802154_dev *dev, u8 *level)
-+{
-+	struct zb_device *zbdev;
-+	int ret = 0;
-+
-+	pr_debug("%s\n", __func__);
-+
-+	zbdev = dev->priv;
-+	if (NULL == zbdev) {
-+		printk(KERN_ERR "%s: wrong phy\n", __func__);
-+		return -EINVAL;
-+	}
-+
-+	if (mutex_lock_interruptible(&zbdev->mutex))
-+		return -EINTR;
-+
-+	ret = send_cmd(zbdev, CMD_ED);
-+	if (ret)
-+		goto out;
-+
-+	if (wait_event_interruptible_timeout(zbdev->wq,
-+				zbdev->status != STATUS_WAIT,
-+				msecs_to_jiffies(TIMEOUT)) > 0) {
-+		*level = zbdev->ed;
-+		if (zbdev->status != STATUS_SUCCESS)
-+			ret = -EBUSY;
-+	} else
-+		ret = -ETIMEDOUT;
-+out:
-+
-+	mutex_unlock(&zbdev->mutex);
-+	pr_debug("%s end\n", __func__);
-+	return ret;
-+}
-+
-+static int
-+ieee802154_serial_set_laddr(struct zb_device *zbdev, u8 addr[IEEE802154_ADDR_LEN])
-+{
-+	int ret = 0;
-+	uint8_t len = 0;
-+	/* 11 because of 2 start bytes, id and 8 bytes addr */
-+	uint8_t buf[11];
-+
-+	pr_debug("%s\n", __func__);
-+
-+	if (mutex_lock_interruptible(&zbdev->mutex))
-+		return -EINTR;
-+
-+
-+	if (zbdev->pending_size) {
-+		printk(KERN_ERR "%s(): cmd is already pending, id = %u\n",
-+			__func__, zbdev->pending_id);
-+        cleanup(zbdev);
-+        return -EAGAIN;
-+	}
-+
-+	/* Prepare a message */
-+	buf[len++] = START_BYTE1;
-+	buf[len++] = START_BYTE2;
-+	buf[len++] = CMD_SET_LONG_ADDRESS;
-+
-+	memcpy(&buf[len], addr, IEEE802154_ADDR_LEN);
-+
-+	zbdev->pending_id = CMD_SET_LONG_ADDRESS;
-+	zbdev->pending_size = len + IEEE802154_ADDR_LEN;
-+	zbdev->pending_data = kzalloc(zbdev->pending_size, GFP_ATOMIC);
-+	if (!zbdev->pending_data) {
-+		printk(KERN_ERR "%s(): unable to allocate memory\n", __func__);
-+		zbdev->pending_id = 0;
-+		zbdev->pending_size = 0;
-+		return -ENOMEM;
-+	}
-+	memcpy(zbdev->pending_data, buf, len);
-+
-+	ret =  _send_pending_data(zbdev);
-+
-+	if (ret)
-+		goto out;
-+
-+	if (wait_event_interruptible_timeout(zbdev->wq,
-+				zbdev->status != STATUS_WAIT,
-+				msecs_to_jiffies(TIMEOUT)) > 0) {
-+		if (zbdev->status != STATUS_SUCCESS)
-+			ret = -EBUSY;
-+	} else
-+		ret = -ETIMEDOUT;
-+
-+out:
-+	mutex_unlock(&zbdev->mutex);
-+	pr_debug("%s end\n", __func__);
-+	return ret;
-+}
-+
-+static int
-+ieee802154_serial_get_laddr(struct ieee802154_dev *dev, u8 addr[IEEE802154_ADDR_LEN])
-+{
-+	struct zb_device *zbdev;
-+	int ret = 0;
-+
-+	pr_debug("%s\n", __func__);
-+
-+	zbdev = dev->priv;
-+	if (NULL == zbdev) {
-+		printk(KERN_ERR "%s: wrong phy\n", __func__);
-+		return -EINVAL;
-+	}
-+
-+	if (mutex_lock_interruptible(&zbdev->mutex))
-+		return -EINTR;
-+
-+	ret = send_cmd(zbdev, CMD_ADDRESS);
-+	if (ret)
-+		goto out;
-+
-+	if (wait_event_interruptible_timeout(zbdev->wq,
-+				zbdev->status != STATUS_WAIT,
-+				msecs_to_jiffies(TIMEOUT)) > 0) {
-+		memcpy(addr, zbdev->data, IEEE802154_ADDR_LEN);
-+		if (zbdev->status != STATUS_SUCCESS)
-+			ret = -EBUSY;
-+	} else
-+		ret = -ETIMEDOUT;
-+out:
-+
-+	mutex_unlock(&zbdev->mutex);
-+	pr_debug("%s end\n", __func__);
-+	return ret;
-+}
-+
-+static int
-+ieee802154_serial_set_hw_addr_filt(struct ieee802154_dev *dev,
-+					  struct ieee802154_hw_addr_filt *filt,
-+					    unsigned long changed)
-+{
-+	struct zb_device *zbdev;
-+	int ret = 0;
-+
-+	pr_debug("%s\n", __func__);
-+
-+	zbdev = dev->priv;
-+
-+	if (NULL == zbdev) {
-+		printk(KERN_ERR "%s: wrong phy\n", __func__);
-+		return -EINVAL;
-+	}
-+
-+	if (mutex_lock_interruptible(&zbdev->mutex))
-+		return -EINTR;
-+
-+	switch (changed)
-+	{
-+		case IEEE802515_AFILT_SADDR_CHANGED:
-+			send_cmd3(zbdev, CMD_SET_SHORT_ADDRESS, filt->short_addr & 0xff, filt->short_addr >> 8);
-+			break;
-+		case IEEE802515_AFILT_PANID_CHANGED:
-+			send_cmd3(zbdev, CMD_SET_PAN_ID, filt->pan_id & 0xff, filt->pan_id >> 8);
-+			break;
-+		case IEEE802515_AFILT_IEEEADDR_CHANGED:
-+			ret = ieee802154_serial_set_laddr(zbdev, filt->ieee_addr);
-+			break;
-+		default:
-+			printk(KERN_ERR "%s: unable to apply change, not supported\n", __func__);
-+			break;
-+	}
-+
-+	mutex_unlock(&zbdev->mutex);
-+	pr_debug("%s end\n", __func__);
-+	return ret;
-+}
-+
-+static int
-+ieee802154_serial_start(struct ieee802154_dev *dev)
-+{
-+	struct zb_device *zbdev;
-+	int ret = 0;
-+
-+	pr_debug("%s\n", __func__);
-+
-+	zbdev = dev->priv;
-+	if (NULL == zbdev) {
-+		printk(KERN_ERR "%s: wrong phy\n", __func__);
-+		return -EINVAL;
-+	}
-+
-+	pr_debug("%s end (retval: %d)\n", __func__, ret);
-+	return ret;
-+}
-+
-+static void
-+ieee802154_serial_stop(struct ieee802154_dev *dev)
-+{
-+	struct zb_device *zbdev;
-+	pr_debug("%s\n", __func__);
-+
-+	zbdev = dev->priv;
-+	if (NULL == zbdev) {
-+		printk(KERN_ERR "%s: wrong phy\n", __func__);
-+		return;
-+	}
-+
-+	pr_debug("%s end\n", __func__);
-+}
-+
-+static int
-+ieee802154_serial_xmit(struct ieee802154_dev *dev, struct sk_buff *skb)
-+{
-+	struct zb_device *zbdev;
-+	int ret;
-+
-+	pr_debug("%s\n", __func__);
-+
-+	zbdev = dev->priv;
-+	if (NULL == zbdev) {
-+		printk(KERN_ERR "%s: wrong phy\n", __func__);
-+		return -EINVAL;
-+	}
-+
-+	if (mutex_lock_interruptible(&zbdev->mutex))
-+		return -EINTR;
-+
-+	ret = send_block(zbdev, skb->len, skb->data);
-+	if (ret)
-+		goto out;
-+
-+	if (wait_event_interruptible_timeout(zbdev->wq,
-+				zbdev->status != STATUS_WAIT,
-+				msecs_to_jiffies(TIMEOUT)) > 0) {
-+		if (zbdev->status != STATUS_SUCCESS) {
-+			ret = -EBUSY;
-+			goto out;
-+		}
-+	} else {
-+		ret = -ETIMEDOUT;
-+		goto out;
-+	}
-+
-+out:
-+
-+	mutex_unlock(&zbdev->mutex);
-+	pr_debug("%s end\n", __func__);
-+	return ret;
-+}
-+
-+/*****************************************************************************
-+ * Line discipline interface for IEEE 802.15.4 serial device
-+ *****************************************************************************/
-+
-+static struct ieee802154_ops serial_ops = {
-+	.owner = THIS_MODULE,
-+	.xmit		= ieee802154_serial_xmit,
-+	.ed		= ieee802154_serial_ed,
-+	.set_channel	= ieee802154_serial_set_channel,
-+	.start		= ieee802154_serial_start,
-+	.stop		= ieee802154_serial_stop,
-+//	.set_hw_addr_filt = ieee802154_serial_set_hw_addr_filt,
-+	.ieee_addr	= ieee802154_serial_get_laddr,
-+};
-+
-+/*
-+ * Called when a tty is put into ZB line discipline. Called in process context.
-+ * Returns 0 on success.
-+ */
-+static int
-+ieee802154_tty_open(struct tty_struct *tty)
-+{
-+	struct zb_device *zbdev = tty->disc_data;
-+	struct ieee802154_dev *dev;
-+	int err;
-+
-+	pr_debug("Openning ldisc\n");
-+	if (!capable(CAP_NET_ADMIN))
-+		return -EPERM;
-+
-+	if (tty->disc_data)
-+		return -EBUSY;
-+
-+	dev = ieee802154_alloc_device(sizeof(*zbdev), &serial_ops);
-+	if (!dev)
-+		return -ENOMEM;
-+
-+	zbdev = dev->priv;
-+	zbdev->dev = dev;
-+
-+	mutex_init(&zbdev->mutex);
-+	init_completion(&zbdev->open_done);
-+	init_completion(&zbdev->close_done);
-+	init_waitqueue_head(&zbdev->wq);
-+
-+	dev->extra_tx_headroom = 0;
-+	/* only 2.4 GHz band */
-+	dev->phy->channels_supported[0] = 0x7fff800;
-+
-+	dev->flags = IEEE802154_HW_OMIT_CKSUM;
-+
-+	dev->parent = tty->dev;
-+
-+	zbdev->tty = tty_kref_get(tty);
-+
-+	cleanup(zbdev);
-+
-+	tty->disc_data = zbdev;
-+	tty->receive_room = MAX_DATA_SIZE;
-+    // TC: why was it removed ?
-+    // why does it crash one of my computer each times, and the other one is fine
-+    // tty->low_latency = 1;
-+
-+	/* FIXME: why is this needed. Note don't use ldisc_ref here as the
-+	   open path is before the ldisc is referencable */
-+
-+	if (tty->ldisc->ops->flush_buffer)
-+		tty->ldisc->ops->flush_buffer(tty);
-+	tty_driver_flush_buffer(tty);
-+
-+	err = ieee802154_register_device(dev);
-+	if (err) {
-+		printk(KERN_ERR "%s: device register failed\n", __func__);
-+		goto out_free;
-+	}
-+
-+	return 0;
-+
-+
-+out_free:
-+	tty->disc_data = NULL;
-+	tty_kref_put(tty);
-+	zbdev->tty = NULL;
-+
-+	ieee802154_unregister_device(zbdev->dev);
-+	ieee802154_free_device(zbdev->dev);
-+
-+	return err;
-+}
-+
-+/*
-+ * Called when the tty is put into another line discipline or it hangs up. We
-+ * have to wait for any cpu currently executing in any of the other zb_tty_*
-+ * routines to finish before we can call zb_tty_close and free the
-+ * zb_serial_dev struct. This routine must be called from process context, not
-+ * interrupt or softirq context.
-+ */
-+static void
-+ieee802154_tty_close(struct tty_struct *tty)
-+{
-+	struct zb_device *zbdev;
-+
-+	zbdev = tty->disc_data;
-+	if (NULL == zbdev) {
-+		printk(KERN_WARNING "%s: match is not found\n", __func__);
-+		return;
-+	}
-+
-+	tty->disc_data = NULL;
-+	tty_kref_put(tty);
-+	zbdev->tty = NULL;
-+	mutex_destroy(&zbdev->mutex);
-+
-+	ieee802154_unregister_device(zbdev->dev);
-+
-+	tty_ldisc_flush(tty);
-+	tty_driver_flush_buffer(tty);
-+
-+	ieee802154_free_device(zbdev->dev);
-+}
-+
-+/*
-+ * Called on tty hangup in process context.
-+ */
-+static int
-+ieee802154_tty_hangup(struct tty_struct *tty)
-+{
-+	ieee802154_tty_close(tty);
-+	return 0;
-+}
-+
-+/*
-+ * Called in process context only. May be re-entered
-+ * by multiple ioctl calling threads.
-+ */
-+static int
-+ieee802154_tty_ioctl(struct tty_struct *tty, struct file *file,
-+		unsigned int cmd, unsigned long arg)
-+{
-+	struct zb_device *zbdev;
-+
-+	pr_debug("cmd = 0x%x\n", cmd);
-+
-+	zbdev = tty->disc_data;
-+	if (NULL == zbdev) {
-+		pr_debug("match is not found\n");
-+		return -EINVAL;
-+	}
-+
-+	switch (cmd) {
-+	case TCFLSH:
-+		return tty_perform_flush(tty, arg);
-+	default:
-+		/* Try the mode commands */
-+		return tty_mode_ioctl(tty, file, cmd, arg);
-+	}
-+}
-+
-+
-+/*
-+ * This can now be called from hard interrupt level as well
-+ * as soft interrupt level or mainline.
-+ */
-+static void
-+ieee802154_tty_receive(struct tty_struct *tty, const unsigned char *buf,
-+		char *cflags, int count)
-+{
-+	struct zb_device *zbdev;
-+	int i;
-+
-+	/* Debug info */
-+	printk(KERN_INFO "%s, received %d bytes\n", __func__,
-+			count);
-+#ifdef DEBUG
-+	print_hex_dump_bytes("ieee802154_tty_receive ", DUMP_PREFIX_NONE,
-+			buf, count);
-+#endif
-+
-+	/* Actual processing */
-+	zbdev = tty->disc_data;
-+	if (NULL == zbdev) {
-+		printk(KERN_ERR "%s(): record for tty is not found\n",
-+				__func__);
-+		return;
-+	}
-+	for (i = 0; i < count; ++i)
-+		process_char(zbdev, buf[i]);
-+#if 0
-+	if (tty->driver->flush_chars)
-+		tty->driver->flush_chars(tty);
-+#endif
-+	tty_unthrottle(tty);
-+}
-+
-+/*
-+ * Line discipline device structure
-+ */
-+static struct tty_ldisc_ops ieee802154_ldisc = {
-+	.owner  = THIS_MODULE,
-+	.magic	= TTY_LDISC_MAGIC,
-+	.name	= "ieee802154-ldisc",
-+	.open	= ieee802154_tty_open,
-+	.close	= ieee802154_tty_close,
-+	.hangup	= ieee802154_tty_hangup,
-+	.receive_buf = ieee802154_tty_receive,
-+	.ioctl	= ieee802154_tty_ioctl,
-+};
-+
-+/*****************************************************************************
-+ * Module service routinues
-+ *****************************************************************************/
-+
-+static int __init ieee802154_serial_init(void)
-+{
-+	printk(KERN_INFO "Initializing ZigBee TTY interface\n");
-+
-+	if (tty_register_ldisc(N_IEEE802154, &ieee802154_ldisc) != 0) {
-+		printk(KERN_ERR "%s: line discipline register failed\n",
-+				__func__);
-+		return -EINVAL;
-+	}
-+
-+	return 0;
-+}
-+
-+static void __exit ieee802154_serial_cleanup(void)
-+{
-+	if (tty_unregister_ldisc(N_IEEE802154) != 0)
-+		printk(KERN_CRIT
-+			"failed to unregister ZigBee line discipline.\n");
-+}
-+
-+module_init(ieee802154_serial_init);
-+module_exit(ieee802154_serial_cleanup);
-+
-+MODULE_LICENSE("GPL");
-+MODULE_ALIAS_LDISC(N_IEEE802154);
-diff --git a/include/linux/nl802154.h b/include/linux/nl802154.h
-index fd4f2d1..25ed3ec 100644
---- a/include/linux/nl802154.h
-+++ b/include/linux/nl802154.h
-@@ -21,6 +21,8 @@
- #ifndef NL802154_H
- #define NL802154_H
- 
-+#include <net/netlink.h>
-+
- #define IEEE802154_NL_NAME "802.15.4 MAC"
- #define IEEE802154_MCAST_COORD_NAME "coordinator"
- #define IEEE802154_MCAST_BEACON_NAME "beacon"
-@@ -132,7 +134,6 @@ enum {
- 
- 	IEEE802154_DEV_WPAN,
- 	IEEE802154_DEV_MONITOR,
--
- 	__IEEE802154_DEV_MAX,
- };
- 
-diff --git a/include/uapi/linux/tty.h b/include/uapi/linux/tty.h
-index dac199a..96233b1 100644
---- a/include/uapi/linux/tty.h
-+++ b/include/uapi/linux/tty.h
-@@ -34,5 +34,6 @@
- #define N_TI_WL		22	/* for TI's WL BT, FM, GPS combo chips */
- #define N_TRACESINK	23	/* Trace data routing for MIPI P1149.7 */
- #define N_TRACEROUTER	24	/* Trace data routing for MIPI P1149.7 */
-+#define N_IEEE802154	25	/* Serial / USB serial IEEE802154.4 devices */
- 
- #endif /* _UAPI_LINUX_TTY_H */
-diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
-index bf6548e..bf6938e 100644
---- a/net/ieee802154/6lowpan.c
-+++ b/net/ieee802154/6lowpan.c
-@@ -59,6 +59,8 @@
- #include <net/ieee802154.h>
- #include <net/ieee802154_netdev.h>
- #include <net/ipv6.h>
-+#include <net/mac802154.h>
-+
- 
- #include "6lowpan.h"
- 
--- 
-1.7.7.6
-
diff --git a/patches/PG2/0001-beaglebone-black-1ghz-hack.patch b/patches/PG2/0001-beaglebone-black-1ghz-hack.patch
deleted file mode 100644
index 3fd82e77215576e33d8c3e77e784d6d047bc669f..0000000000000000000000000000000000000000
--- a/patches/PG2/0001-beaglebone-black-1ghz-hack.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From eee2e4271b11aa1d495500bcf42cdd4a55c97ebc Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Tue, 22 Jan 2013 17:52:18 +0100
-Subject: [PATCH] beaglebone black: 1ghz hack
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- arch/arm/boot/dts/am335x-bonelt.dts |   16 ++++++++++++++++
- arch/arm/boot/dts/am33xx.dtsi       |    2 +-
- 2 files changed, 17 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/am335x-bonelt.dts b/arch/arm/boot/dts/am335x-bonelt.dts
-index 755892e..48023db 100644
---- a/arch/arm/boot/dts/am335x-bonelt.dts
-+++ b/arch/arm/boot/dts/am335x-bonelt.dts
-@@ -32,3 +32,19 @@
- 	ti,non-removable;
- 	status = "okay";
- };
-+
-+
-+&cpu {
-+	/*
-+	 * To consider voltage drop between PMIC and SoC,
-+	 * tolerance value is reduced to 2% from 4% and
-+	 * voltage value is increased as a precaution.
-+	 */
-+	operating-points = <
-+		/* kHz    uV */
-+		1000000	1350000
-+		800000	1300000
-+		600000  1112000
-+		300000   969000
-+	>;
-+};
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index 18485bb..41e6224 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -24,7 +24,7 @@
- 	};
- 
- 	cpus {
--		cpu@0 {
-+		cpu: cpu@0 {
- 			compatible = "arm,cortex-a8";
- 
- 			/*
--- 
-1.7.10.4
-
diff --git a/patches/adc/0001-input-ti_am335x_tsc-Step-enable-bits-made-configurab.patch b/patches/adc/0001-input-ti_am335x_tsc-Step-enable-bits-made-configurab.patch
deleted file mode 100644
index 4b874e95ffa9d3ead1b338f0839adb35a81963aa..0000000000000000000000000000000000000000
--- a/patches/adc/0001-input-ti_am335x_tsc-Step-enable-bits-made-configurab.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 600340c298b8113a48699b59d56bf91f2335c1ab Mon Sep 17 00:00:00 2001
-From: "Patil, Rachna" <rachna@ti.com>
-Date: Thu, 24 Jan 2013 03:45:05 +0000
-Subject: [PATCH 1/8] input: ti_am335x_tsc: Step enable bits made configurable
-
-Current code has hard coded value written to
-step enable bits. Now the bits are updated based
-on how many steps are needed to be configured got
-from platform data.
-
-The user needs to take care not to exceed
-the count more than 16. While using ADC and TSC
-one should take care to set this parameter correctly.
-
-Signed-off-by: Patil, Rachna <rachna@ti.com>
----
- drivers/input/touchscreen/ti_am335x_tsc.c | 10 ++++++++--
- include/linux/mfd/ti_am335x_tscadc.h      |  1 -
- 2 files changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c
-index 51e7b87..da652e0 100644
---- a/drivers/input/touchscreen/ti_am335x_tsc.c
-+++ b/drivers/input/touchscreen/ti_am335x_tsc.c
-@@ -39,6 +39,7 @@ struct titsc {
- 	unsigned int		irq;
- 	unsigned int		wires;
- 	unsigned int		x_plate_resistance;
-+	unsigned int		enable_bits;
- 	bool			pen_down;
- 	int			steps_to_configure;
- };
-@@ -57,6 +58,7 @@ static void titsc_writel(struct titsc *tsc, unsigned int reg,
- static void titsc_step_config(struct titsc *ts_dev)
- {
- 	unsigned int	config;
-+	unsigned int	stepenable = 0;
- 	int i, total_steps;
- 
- 	/* Configure the Step registers */
-@@ -128,7 +130,11 @@ static void titsc_step_config(struct titsc *ts_dev)
- 	titsc_writel(ts_dev, REG_STEPDELAY(total_steps + 2),
- 			STEPCONFIG_OPENDLY);
- 
--	titsc_writel(ts_dev, REG_SE, STPENB_STEPENB_TC);
-+	for (i = 0; i <= (total_steps + 2); i++)
-+		stepenable |= 1 << i;
-+	ts_dev->enable_bits = stepenable;
-+
-+	titsc_writel(ts_dev, REG_SE, ts_dev->enable_bits);
- }
- 
- static void titsc_read_coordinates(struct titsc *ts_dev,
-@@ -250,7 +256,7 @@ static irqreturn_t titsc_irq(int irq, void *dev)
- 
- 	titsc_writel(ts_dev, REG_IRQSTATUS, irqclr);
- 
--	titsc_writel(ts_dev, REG_SE, STPENB_STEPENB_TC);
-+	titsc_writel(ts_dev, REG_SE, ts_dev->enable_bits);
- 	return IRQ_HANDLED;
- }
- 
-diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
-index c79ad5d..23e4f33 100644
---- a/include/linux/mfd/ti_am335x_tscadc.h
-+++ b/include/linux/mfd/ti_am335x_tscadc.h
-@@ -47,7 +47,6 @@
- #define STEPENB_MASK		(0x1FFFF << 0)
- #define STEPENB(val)		((val) << 0)
- #define STPENB_STEPENB		STEPENB(0x1FFFF)
--#define STPENB_STEPENB_TC	STEPENB(0x1FFF)
- 
- /* IRQ enable */
- #define IRQENB_HW_PEN		BIT(0)
--- 
-1.8.1
-
diff --git a/patches/adc/0002-input-ti_am335x_tsc-Order-of-TSC-wires-made-configur.patch b/patches/adc/0002-input-ti_am335x_tsc-Order-of-TSC-wires-made-configur.patch
deleted file mode 100644
index c5fdbcade334b590b17bcbb31889a0741d2a1f35..0000000000000000000000000000000000000000
--- a/patches/adc/0002-input-ti_am335x_tsc-Order-of-TSC-wires-made-configur.patch
+++ /dev/null
@@ -1,332 +0,0 @@
-From b58564ac90a2890ca0b300ae37d2a3012412ec0b Mon Sep 17 00:00:00 2001
-From: "Patil, Rachna" <rachna@ti.com>
-Date: Thu, 24 Jan 2013 03:45:06 +0000
-Subject: [PATCH 2/8] input: ti_am335x_tsc: Order of TSC wires, made
- configurable
-
-The current driver expected touchscreen input
-wires(XP,XN,YP,YN) to be connected in a particular order.
-Making changes to accept this as platform data.
-
-Signed-off-by: Patil, Rachna <rachna@ti.com>
----
- drivers/input/touchscreen/ti_am335x_tsc.c | 156 +++++++++++++++++++++++++++---
- include/linux/input/ti_am335x_tsc.h       |  12 +++
- include/linux/mfd/ti_am335x_tscadc.h      |  10 +-
- 3 files changed, 159 insertions(+), 19 deletions(-)
-
-diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c
-index da652e0..0c460f9 100644
---- a/drivers/input/touchscreen/ti_am335x_tsc.c
-+++ b/drivers/input/touchscreen/ti_am335x_tsc.c
-@@ -33,6 +33,17 @@
- #define SEQ_SETTLE		275
- #define MAX_12BIT		((1 << 12) - 1)
- 
-+/*
-+ * Refer to function regbit_map() to
-+ * map the values in the matrix.
-+ */
-+static int config[4][4] = {
-+		{1,	0,	1,	0},
-+		{2,	3,	2,	3},
-+		{4,	5,	4,	5},
-+		{0,	6,	0,	6}
-+};
-+
- struct titsc {
- 	struct input_dev	*input;
- 	struct ti_tscadc_dev	*mfd_tscadc;
-@@ -42,6 +53,9 @@ struct titsc {
- 	unsigned int		enable_bits;
- 	bool			pen_down;
- 	int			steps_to_configure;
-+	int			config_inp[20];
-+	int			bit_xp, bit_xn, bit_yp, bit_yn;
-+	int			inp_xp, inp_xn, inp_yp, inp_yn;
- };
- 
- static unsigned int titsc_readl(struct titsc *ts, unsigned int reg)
-@@ -55,6 +69,107 @@ static void titsc_writel(struct titsc *tsc, unsigned int reg,
- 	writel(val, tsc->mfd_tscadc->tscadc_base + reg);
- }
- 
-+/*
-+ * Each of the analog lines are mapped
-+ * with one or two register bits,
-+ * which can be either pulled high/low
-+ * depending on the value to be read.
-+ */
-+static int regbit_map(int val)
-+{
-+	int map_bits = 0;
-+
-+	switch (val) {
-+	case 1:
-+		map_bits = XPP;
-+		break;
-+	case 2:
-+		map_bits = XNP;
-+		break;
-+	case 3:
-+		map_bits = XNN;
-+		break;
-+	case 4:
-+		map_bits = YPP;
-+		break;
-+	case 5:
-+		map_bits = YPN;
-+		break;
-+	case 6:
-+		map_bits = YNN;
-+		break;
-+	}
-+
-+	return map_bits;
-+}
-+
-+static int titsc_config_wires(struct titsc *ts_dev)
-+{
-+	int		analog_line[10], wire_order[10];
-+	int		i, temp_bits, err;
-+
-+	for (i = 0; i < 4; i++) {
-+		/*
-+		 * Get the order in which TSC wires are attached
-+		 * w.r.t. each of the analog input lines on the EVM.
-+		 */
-+		analog_line[i] = ts_dev->config_inp[i] & 0xF0;
-+		analog_line[i] = analog_line[i] >> 4;
-+
-+		wire_order[i] = ts_dev->config_inp[i] & 0x0F;
-+	}
-+
-+	for (i = 0; i < 4; i++) {
-+		switch (wire_order[i]) {
-+		case 0:
-+			temp_bits = config[analog_line[i]][0];
-+			if (temp_bits == 0) {
-+				err = -EINVAL;
-+				goto ret;
-+			} else {
-+				ts_dev->bit_xp = regbit_map(temp_bits);
-+				ts_dev->inp_xp = analog_line[i];
-+				break;
-+			}
-+		case 1:
-+			temp_bits = config[analog_line[i]][1];
-+			if (temp_bits == 0) {
-+				err = -EINVAL;
-+				goto ret;
-+			} else {
-+				ts_dev->bit_xn = regbit_map(temp_bits);
-+				ts_dev->inp_xn = analog_line[i];
-+				break;
-+			}
-+		case 2:
-+			temp_bits = config[analog_line[i]][2];
-+			if (temp_bits == 0) {
-+				err = -EINVAL;
-+				goto ret;
-+			} else {
-+				ts_dev->bit_yp = regbit_map(temp_bits);
-+				ts_dev->inp_yp = analog_line[i];
-+				break;
-+			}
-+		case 3:
-+			temp_bits = config[analog_line[i]][3];
-+			if (temp_bits == 0) {
-+				err = -EINVAL;
-+				goto ret;
-+			} else {
-+				ts_dev->bit_yn = regbit_map(temp_bits);
-+				ts_dev->inp_yn = analog_line[i];
-+				break;
-+			}
-+		}
-+	}
-+
-+	return 0;
-+
-+ret:
-+	return err;
-+}
-+
- static void titsc_step_config(struct titsc *ts_dev)
- {
- 	unsigned int	config;
-@@ -65,18 +180,18 @@ static void titsc_step_config(struct titsc *ts_dev)
- 	total_steps = 2 * ts_dev->steps_to_configure;
- 
- 	config = STEPCONFIG_MODE_HWSYNC |
--			STEPCONFIG_AVG_16 | STEPCONFIG_XPP;
-+			STEPCONFIG_AVG_16 | ts_dev->bit_xp;
- 	switch (ts_dev->wires) {
- 	case 4:
--		config |= STEPCONFIG_INP_AN2 | STEPCONFIG_XNN;
-+		config |= STEPCONFIG_INP(ts_dev->inp_yp) | ts_dev->bit_xn;
- 		break;
- 	case 5:
--		config |= STEPCONFIG_YNN |
--				STEPCONFIG_INP_AN4 | STEPCONFIG_XNN |
--				STEPCONFIG_YPP;
-+		config |= ts_dev->bit_yn |
-+				STEPCONFIG_INP_AN4 | ts_dev->bit_xn |
-+				ts_dev->bit_yp;
- 		break;
- 	case 8:
--		config |= STEPCONFIG_INP_AN2 | STEPCONFIG_XNN;
-+		config |= STEPCONFIG_INP(ts_dev->inp_yp) | ts_dev->bit_xn;
- 		break;
- 	}
- 
-@@ -87,18 +202,18 @@ static void titsc_step_config(struct titsc *ts_dev)
- 
- 	config = 0;
- 	config = STEPCONFIG_MODE_HWSYNC |
--			STEPCONFIG_AVG_16 | STEPCONFIG_YNN |
-+			STEPCONFIG_AVG_16 | ts_dev->bit_yn |
- 			STEPCONFIG_INM_ADCREFM | STEPCONFIG_FIFO1;
- 	switch (ts_dev->wires) {
- 	case 4:
--		config |= STEPCONFIG_YPP;
-+		config |= ts_dev->bit_yp | STEPCONFIG_INP(ts_dev->inp_xp);
- 		break;
- 	case 5:
--		config |= STEPCONFIG_XPP | STEPCONFIG_INP_AN4 |
--				STEPCONFIG_XNP | STEPCONFIG_YPN;
-+		config |= ts_dev->bit_xp | STEPCONFIG_INP_AN4 |
-+				ts_dev->bit_xn | ts_dev->bit_yp;
- 		break;
- 	case 8:
--		config |= STEPCONFIG_YPP;
-+		config |= ts_dev->bit_yp | STEPCONFIG_INP(ts_dev->inp_xp);
- 		break;
- 	}
- 
-@@ -109,9 +224,9 @@ static void titsc_step_config(struct titsc *ts_dev)
- 
- 	config = 0;
- 	/* Charge step configuration */
--	config = STEPCONFIG_XPP | STEPCONFIG_YNN |
-+	config = ts_dev->bit_xp | ts_dev->bit_yn |
- 			STEPCHARGE_RFP_XPUL | STEPCHARGE_RFM_XNUR |
--			STEPCHARGE_INM_AN1 | STEPCHARGE_INP_AN1;
-+			STEPCHARGE_INM_AN1 | STEPCHARGE_INP(ts_dev->inp_yp);
- 
- 	titsc_writel(ts_dev, REG_CHARGECONFIG, config);
- 	titsc_writel(ts_dev, REG_CHARGEDELAY, CHARGEDLY_OPENDLY);
-@@ -119,13 +234,14 @@ static void titsc_step_config(struct titsc *ts_dev)
- 	config = 0;
- 	/* Configure to calculate pressure */
- 	config = STEPCONFIG_MODE_HWSYNC |
--			STEPCONFIG_AVG_16 | STEPCONFIG_YPP |
--			STEPCONFIG_XNN | STEPCONFIG_INM_ADCREFM;
-+			STEPCONFIG_AVG_16 | ts_dev->bit_yp |
-+			ts_dev->bit_xn | STEPCONFIG_INM_ADCREFM |
-+			STEPCONFIG_INP(ts_dev->inp_xp);
- 	titsc_writel(ts_dev, REG_STEPCONFIG(total_steps + 1), config);
- 	titsc_writel(ts_dev, REG_STEPDELAY(total_steps + 1),
- 			STEPCONFIG_OPENDLY);
- 
--	config |= STEPCONFIG_INP_AN3 | STEPCONFIG_FIFO1;
-+	config |= STEPCONFIG_INP(ts_dev->inp_yn) | STEPCONFIG_FIFO1;
- 	titsc_writel(ts_dev, REG_STEPCONFIG(total_steps + 2), config);
- 	titsc_writel(ts_dev, REG_STEPDELAY(total_steps + 2),
- 			STEPCONFIG_OPENDLY);
-@@ -295,6 +411,8 @@ static int titsc_probe(struct platform_device *pdev)
- 	ts_dev->wires = pdata->tsc_init->wires;
- 	ts_dev->x_plate_resistance = pdata->tsc_init->x_plate_resistance;
- 	ts_dev->steps_to_configure = pdata->tsc_init->steps_to_configure;
-+	memcpy(ts_dev->config_inp, pdata->tsc_init->wire_config,
-+			sizeof(pdata->tsc_init->wire_config));
- 
- 	err = request_irq(ts_dev->irq, titsc_irq,
- 			  0, pdev->dev.driver->name, ts_dev);
-@@ -304,6 +422,11 @@ static int titsc_probe(struct platform_device *pdev)
- 	}
- 
- 	titsc_writel(ts_dev, REG_IRQENABLE, IRQENB_FIFO0THRES);
-+	err = titsc_config_wires(ts_dev);
-+	if (err) {
-+		dev_err(&pdev->dev, "wrong i/p wire configuration\n");
-+		goto err_free_irq;
-+	}
- 	titsc_step_config(ts_dev);
- 	titsc_writel(ts_dev, REG_FIFO0THR, ts_dev->steps_to_configure);
- 
-@@ -373,6 +496,7 @@ static int titsc_resume(struct device *dev)
- 				0x00);
- 		titsc_writel(ts_dev, REG_IRQCLR, IRQENB_HW_PEN);
- 	}
-+	titsc_config_wires(ts_dev);
- 	titsc_step_config(ts_dev);
- 	titsc_writel(ts_dev, REG_FIFO0THR,
- 			ts_dev->steps_to_configure);
-diff --git a/include/linux/input/ti_am335x_tsc.h b/include/linux/input/ti_am335x_tsc.h
-index 49269a2..6a66b4d 100644
---- a/include/linux/input/ti_am335x_tsc.h
-+++ b/include/linux/input/ti_am335x_tsc.h
-@@ -12,12 +12,24 @@
-  *			A step configured to read a single
-  *			co-ordinate value, can be applied
-  *			more number of times for better results.
-+ * @wire_config:	Different EVM's could have a different order
-+ *			for connecting wires on touchscreen.
-+ *			We need to provide an 8 bit number where in
-+ *			the 1st four bits represent the analog lines
-+ *			and the next 4 bits represent positive/
-+ *			negative terminal on that input line.
-+ *			Notations to represent the input lines and
-+ *			terminals resoectively is as follows:
-+ *			AIN0 = 0, AIN1 = 1 and so on till AIN7 = 7.
-+ *			XP  = 0, XN = 1, YP = 2, YN = 3.
-+ *
-  */
- 
- struct tsc_data {
- 	int wires;
- 	int x_plate_resistance;
- 	int steps_to_configure;
-+	int wire_config[10];
- };
- 
- #endif
-diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
-index 23e4f33..9624fea 100644
---- a/include/linux/mfd/ti_am335x_tscadc.h
-+++ b/include/linux/mfd/ti_am335x_tscadc.h
-@@ -72,8 +72,6 @@
- #define STEPCONFIG_INM_ADCREFM	STEPCONFIG_INM(8)
- #define STEPCONFIG_INP_MASK	(0xF << 19)
- #define STEPCONFIG_INP(val)	((val) << 19)
--#define STEPCONFIG_INP_AN2	STEPCONFIG_INP(2)
--#define STEPCONFIG_INP_AN3	STEPCONFIG_INP(3)
- #define STEPCONFIG_INP_AN4	STEPCONFIG_INP(4)
- #define STEPCONFIG_INP_ADCREFM	STEPCONFIG_INP(8)
- #define STEPCONFIG_FIFO1	BIT(26)
-@@ -95,7 +93,6 @@
- #define STEPCHARGE_INM_AN1	STEPCHARGE_INM(1)
- #define STEPCHARGE_INP_MASK	(0xF << 19)
- #define STEPCHARGE_INP(val)	((val) << 19)
--#define STEPCHARGE_INP_AN1	STEPCHARGE_INP(1)
- #define STEPCHARGE_RFM_MASK	(3 << 23)
- #define STEPCHARGE_RFM(val)	((val) << 23)
- #define STEPCHARGE_RFM_XNUR	STEPCHARGE_RFM(1)
-@@ -117,6 +114,13 @@
- #define CNTRLREG_8WIRE		CNTRLREG_AFE_CTRL(3)
- #define CNTRLREG_TSCENB		BIT(7)
- 
-+#define XPP			STEPCONFIG_XPP
-+#define XNP			STEPCONFIG_XNP
-+#define XNN			STEPCONFIG_XNN
-+#define YPP			STEPCONFIG_YPP
-+#define YPN			STEPCONFIG_YPN
-+#define YNN			STEPCONFIG_YNN
-+
- #define ADC_CLK			3000000
- #define	MAX_CLK_DIV		7
- #define TOTAL_STEPS		16
--- 
-1.8.1
-
diff --git a/patches/adc/0003-input-touchscreen-ti_tsc-remove-unwanted-fifo-flush.patch b/patches/adc/0003-input-touchscreen-ti_tsc-remove-unwanted-fifo-flush.patch
deleted file mode 100644
index 097690215ba243ec27e00671a92c482ac024cdc7..0000000000000000000000000000000000000000
--- a/patches/adc/0003-input-touchscreen-ti_tsc-remove-unwanted-fifo-flush.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From c882d73a194fda22206c4cf294a7a482750d5351 Mon Sep 17 00:00:00 2001
-From: "Patil, Rachna" <rachna@ti.com>
-Date: Thu, 24 Jan 2013 03:45:07 +0000
-Subject: [PATCH 3/8] input: touchscreen: ti_tsc: remove unwanted fifo flush
-
-When touchscreen and ADC are used together, this
-unwanted fifo flush leads to loss of ADC data.
-
-Signed-off-by: Patil, Rachna <rachna@ti.com>
----
- drivers/input/touchscreen/ti_am335x_tsc.c | 10 ----------
- 1 file changed, 10 deletions(-)
-
-diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c
-index 0c460f9..064d2b2 100644
---- a/drivers/input/touchscreen/ti_am335x_tsc.c
-+++ b/drivers/input/touchscreen/ti_am335x_tsc.c
-@@ -308,8 +308,6 @@ static irqreturn_t titsc_irq(int irq, void *dev)
- 	unsigned int x = 0, y = 0;
- 	unsigned int z1, z2, z;
- 	unsigned int fsm;
--	unsigned int fifo1count, fifo0count;
--	int i;
- 
- 	status = titsc_readl(ts_dev, REG_IRQSTATUS);
- 	if (status & IRQENB_FIFO0THRES) {
-@@ -318,14 +316,6 @@ static irqreturn_t titsc_irq(int irq, void *dev)
- 		z1 = titsc_readl(ts_dev, REG_FIFO0) & 0xfff;
- 		z2 = titsc_readl(ts_dev, REG_FIFO1) & 0xfff;
- 
--		fifo1count = titsc_readl(ts_dev, REG_FIFO1CNT);
--		for (i = 0; i < fifo1count; i++)
--			titsc_readl(ts_dev, REG_FIFO1);
--
--		fifo0count = titsc_readl(ts_dev, REG_FIFO0CNT);
--		for (i = 0; i < fifo0count; i++)
--			titsc_readl(ts_dev, REG_FIFO0);
--
- 		if (ts_dev->pen_down && z1 != 0 && z2 != 0) {
- 			/*
- 			 * Calculate pressure using formula
--- 
-1.8.1
-
diff --git a/patches/adc/0004-MFD-ti_am335x_tscadc-add-device-tree-binding-informa.patch b/patches/adc/0004-MFD-ti_am335x_tscadc-add-device-tree-binding-informa.patch
deleted file mode 100644
index 3c14a2b208f930dd2889ed9f1db4e8e25379f981..0000000000000000000000000000000000000000
--- a/patches/adc/0004-MFD-ti_am335x_tscadc-add-device-tree-binding-informa.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 2ec7d165c600bfbf637889bf120fbb2226cbd868 Mon Sep 17 00:00:00 2001
-From: "Patil, Rachna" <rachna@ti.com>
-Date: Thu, 24 Jan 2013 03:45:08 +0000
-Subject: [PATCH 4/8] MFD: ti_am335x_tscadc: add device tree binding
- information
-
-Signed-off-by: Patil, Rachna <rachna@ti.com>
----
- .../devicetree/bindings/mfd/ti_am335x_tscadc.txt   | 52 ++++++++++++++++++++++
- 1 file changed, 52 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/mfd/ti_am335x_tscadc.txt
-
-diff --git a/Documentation/devicetree/bindings/mfd/ti_am335x_tscadc.txt b/Documentation/devicetree/bindings/mfd/ti_am335x_tscadc.txt
-new file mode 100644
-index 0000000..0100771
---- /dev/null
-+++ b/Documentation/devicetree/bindings/mfd/ti_am335x_tscadc.txt
-@@ -0,0 +1,52 @@
-+Texas Instruments - TSC / ADC multi-functional device
-+
-+ti_tscadc is a multi-function device with touchscreen and ADC on chip.
-+This document describes the binding for mfd device.
-+
-+Required properties:
-+- compatible: "ti,ti-tscadc"
-+- reg: Specifies the address of MFD block
-+- interrupts: IRQ line connected to the main SoC
-+- interrupt-parent: The parent interrupt controller
-+
-+Optional properties:
-+- ti,hwmods: Hardware information related to TSC/ADC MFD device
-+
-+Sub-nodes:
-+Device			Description
-+------			-----------
-+tsc			Touchscreen
-+adc			Analog to digital converter
-+
-+Sub-node device required properties:
-+tsc:
-+- ti,wires:  4/5/8 wire touchscreen support on the platform.
-+- ti,x-plate-resistance: X plate resistance.
-+- ti,steps-to-configure: A step is configured to read a single co-ordinate value,
-+			can be applied more number of times for better results.
-+- ti,wire-config: Order for connecting wires on touchscreen.
-+
-+adc:
-+- ti,adc-channels: Number of ADC channels used.
-+
-+Example:
-+
-+	tscadc: tscadc@44e0d000 {
-+		compatible = "ti,ti-tscadc";
-+		reg = <0x44e0d000 0x1000>;
-+
-+		interrupt-parent = <&intc>;
-+		interrupts = <16>;
-+		ti,hwmods = "adc_tsc";
-+
-+		tsc {
-+			ti,wires = <4>;
-+			ti,x-plate-resistance = <200>;
-+			ti,steps-to-configure = <5>;
-+			ti,wire-config = <0x00 0x11 0x22 0x33>;
-+		};
-+
-+		adc {
-+			ti,adc-channels = <4>;
-+		};
-+	};
--- 
-1.8.1
-
diff --git a/patches/adc/0005-MFD-ti_am335x_tscadc-Add-DT-support.patch b/patches/adc/0005-MFD-ti_am335x_tscadc-Add-DT-support.patch
deleted file mode 100644
index f85da6109e3212e43626dee3ed380a8b320f406b..0000000000000000000000000000000000000000
--- a/patches/adc/0005-MFD-ti_am335x_tscadc-Add-DT-support.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From dbb22e0d5621c961e202f984a398bc9a5f2d3efa Mon Sep 17 00:00:00 2001
-From: "Patil, Rachna" <rachna@ti.com>
-Date: Thu, 24 Jan 2013 03:45:09 +0000
-Subject: [PATCH 5/8] MFD: ti_am335x_tscadc: Add DT support
-
-Make changes to add DT support in the MFD core driver.
-
-Signed-off-by: Patil, Rachna <rachna@ti.com>
----
- drivers/mfd/ti_am335x_tscadc.c | 28 +++++++++++++++++++++++-----
- 1 file changed, 23 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
-index e9f3fb5..87b446b 100644
---- a/drivers/mfd/ti_am335x_tscadc.c
-+++ b/drivers/mfd/ti_am335x_tscadc.c
-@@ -22,6 +22,8 @@
- #include <linux/regmap.h>
- #include <linux/mfd/core.h>
- #include <linux/pm_runtime.h>
-+#include <linux/of.h>
-+#include <linux/of_device.h>
- 
- #include <linux/mfd/ti_am335x_tscadc.h>
- #include <linux/input/ti_am335x_tsc.h>
-@@ -64,20 +66,31 @@ static	int ti_tscadc_probe(struct platform_device *pdev)
- 	struct resource		*res;
- 	struct clk		*clk;
- 	struct mfd_tscadc_board	*pdata = pdev->dev.platform_data;
-+	struct device_node	*node = pdev->dev.of_node;
- 	struct mfd_cell		*cell;
- 	int			err, ctrl;
- 	int			clk_value, clock_rate;
--	int			tsc_wires, adc_channels = 0, total_channels;
-+	int			tsc_wires = 0, adc_channels = 0, total_channels;
- 
--	if (!pdata) {
-+	if (!pdata && !pdev->dev.of_node) {
- 		dev_err(&pdev->dev, "Could not find platform data\n");
- 		return -EINVAL;
- 	}
- 
--	if (pdata->adc_init)
--		adc_channels = pdata->adc_init->adc_channels;
-+	if (pdev->dev.platform_data) {
-+		if (pdata->tsc_init)
-+			tsc_wires = pdata->tsc_init->wires;
-+
-+		if (pdata->adc_init)
-+			adc_channels = pdata->adc_init->adc_channels;
-+	} else {
-+		node = of_find_node_by_name(pdev->dev.of_node, "tsc");
-+		of_property_read_u32(node, "ti,wires", &tsc_wires);
-+
-+		node = of_find_node_by_name(pdev->dev.of_node, "adc");
-+		of_property_read_u32(node, "ti,adc-channels", &adc_channels);
-+	}
- 
--	tsc_wires = pdata->tsc_init->wires;
- 	total_channels = tsc_wires + adc_channels;
- 
- 	if (total_channels > 8) {
-@@ -256,11 +269,16 @@ static const struct dev_pm_ops tscadc_pm_ops = {
- #define TSCADC_PM_OPS NULL
- #endif
- 
-+static const struct of_device_id ti_tscadc_dt_ids[] = {
-+	{ .compatible = "ti,ti-tscadc", },
-+};
-+
- static struct platform_driver ti_tscadc_driver = {
- 	.driver = {
- 		.name   = "ti_tscadc",
- 		.owner	= THIS_MODULE,
- 		.pm	= TSCADC_PM_OPS,
-+		.of_match_table = of_match_ptr(ti_tscadc_dt_ids),
- 	},
- 	.probe	= ti_tscadc_probe,
- 	.remove	= ti_tscadc_remove,
--- 
-1.8.1
-
diff --git a/patches/adc/0006-input-ti_am335x_tsc-Add-DT-support.patch b/patches/adc/0006-input-ti_am335x_tsc-Add-DT-support.patch
deleted file mode 100644
index 745c335d5c3e28baadffe5eae9ef72905d8644dc..0000000000000000000000000000000000000000
--- a/patches/adc/0006-input-ti_am335x_tsc-Add-DT-support.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From 6091df3a933e4e65fca0ee335cbdc8d3bad4abe6 Mon Sep 17 00:00:00 2001
-From: "Patil, Rachna" <rachna@ti.com>
-Date: Thu, 24 Jan 2013 03:45:10 +0000
-Subject: [PATCH 6/8] input: ti_am335x_tsc: Add DT support
-
-Add DT support for client touchscreen driver
-
-Signed-off-by: Patil, Rachna <rachna@ti.com>
----
- drivers/input/touchscreen/ti_am335x_tsc.c | 94 ++++++++++++++++++++++++++-----
- 1 file changed, 81 insertions(+), 13 deletions(-)
-
-diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c
-index 064d2b2..6ff5a76 100644
---- a/drivers/input/touchscreen/ti_am335x_tsc.c
-+++ b/drivers/input/touchscreen/ti_am335x_tsc.c
-@@ -26,6 +26,8 @@
- #include <linux/io.h>
- #include <linux/input/ti_am335x_tsc.h>
- #include <linux/delay.h>
-+#include <linux/of.h>
-+#include <linux/of_device.h>
- 
- #include <linux/mfd/ti_am335x_tscadc.h>
- 
-@@ -366,6 +368,74 @@ static irqreturn_t titsc_irq(int irq, void *dev)
- 	return IRQ_HANDLED;
- }
- 
-+static int titsc_parse_dt(struct ti_tscadc_dev *tscadc_dev,
-+					struct titsc *ts_dev)
-+{
-+	struct device_node *node = tscadc_dev->dev->of_node;
-+	int err, i;
-+	u32 val32, wires_conf[4];
-+
-+	if (!node)
-+		return -EINVAL;
-+	else {
-+		node = of_find_node_by_name(node, "tsc");
-+		if (!node)
-+			return -EINVAL;
-+		else {
-+			err = of_property_read_u32(node, "ti,wires", &val32);
-+			if (err < 0)
-+				goto error_ret;
-+			else
-+				ts_dev->wires = val32;
-+
-+			err = of_property_read_u32(node,
-+					"ti,x-plate-resistance", &val32);
-+			if (err < 0)
-+				goto error_ret;
-+			else
-+				ts_dev->x_plate_resistance = val32;
-+
-+			err = of_property_read_u32(node,
-+					"ti,steps-to-configure", &val32);
-+			if (err < 0)
-+				goto error_ret;
-+			else
-+				ts_dev->steps_to_configure = val32;
-+
-+			err = of_property_read_u32_array(node, "ti,wire-config",
-+					wires_conf, ARRAY_SIZE(wires_conf));
-+			if (err < 0)
-+				goto error_ret;
-+			else {
-+				for (i = 0; i < ARRAY_SIZE(wires_conf); i++)
-+					ts_dev->config_inp[i] = wires_conf[i];
-+			}
-+		}
-+	}
-+	return 0;
-+
-+error_ret:
-+	return err;
-+}
-+
-+static int titsc_parse_pdata(struct ti_tscadc_dev *tscadc_dev,
-+					struct titsc *ts_dev)
-+{
-+	struct mfd_tscadc_board	*pdata = tscadc_dev->dev->platform_data;
-+
-+	if (!pdata)
-+		return -EINVAL;
-+
-+	ts_dev->wires = pdata->tsc_init->wires;
-+	ts_dev->x_plate_resistance =
-+		pdata->tsc_init->x_plate_resistance;
-+	ts_dev->steps_to_configure =
-+		pdata->tsc_init->steps_to_configure;
-+	memcpy(ts_dev->config_inp, pdata->tsc_init->wire_config,
-+		sizeof(pdata->tsc_init->wire_config));
-+	return 0;
-+}
-+
- /*
-  * The functions for inserting/removing driver as a module.
-  */
-@@ -375,16 +445,8 @@ static int titsc_probe(struct platform_device *pdev)
- 	struct titsc *ts_dev;
- 	struct input_dev *input_dev;
- 	struct ti_tscadc_dev *tscadc_dev = pdev->dev.platform_data;
--	struct mfd_tscadc_board	*pdata;
- 	int err;
- 
--	pdata = tscadc_dev->dev->platform_data;
--
--	if (!pdata) {
--		dev_err(&pdev->dev, "Could not find platform data\n");
--		return -EINVAL;
--	}
--
- 	/* Allocate memory for device */
- 	ts_dev = kzalloc(sizeof(struct titsc), GFP_KERNEL);
- 	input_dev = input_allocate_device();
-@@ -398,11 +460,17 @@ static int titsc_probe(struct platform_device *pdev)
- 	ts_dev->mfd_tscadc = tscadc_dev;
- 	ts_dev->input = input_dev;
- 	ts_dev->irq = tscadc_dev->irq;
--	ts_dev->wires = pdata->tsc_init->wires;
--	ts_dev->x_plate_resistance = pdata->tsc_init->x_plate_resistance;
--	ts_dev->steps_to_configure = pdata->tsc_init->steps_to_configure;
--	memcpy(ts_dev->config_inp, pdata->tsc_init->wire_config,
--			sizeof(pdata->tsc_init->wire_config));
-+
-+	if (tscadc_dev->dev->platform_data)
-+		err = titsc_parse_pdata(tscadc_dev, ts_dev);
-+	else
-+		err = titsc_parse_dt(tscadc_dev, ts_dev);
-+
-+	if (err) {
-+		dev_err(&pdev->dev, "Could not find platform data\n");
-+		err = -EINVAL;
-+		goto err_free_mem;
-+	}
- 
- 	err = request_irq(ts_dev->irq, titsc_irq,
- 			  0, pdev->dev.driver->name, ts_dev);
--- 
-1.8.1
-
diff --git a/patches/adc/0007-IIO-ti_am335x_adc-Add-DT-support.patch b/patches/adc/0007-IIO-ti_am335x_adc-Add-DT-support.patch
deleted file mode 100644
index 2dc217fb948d7a6f18551a9fdb5e225a6bea37c6..0000000000000000000000000000000000000000
--- a/patches/adc/0007-IIO-ti_am335x_adc-Add-DT-support.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 69fa0c37fbc419afe0e068b6f5647f2d808ff34a Mon Sep 17 00:00:00 2001
-From: "Patil, Rachna" <rachna@ti.com>
-Date: Thu, 24 Jan 2013 03:45:11 +0000
-Subject: [PATCH 7/8] IIO: ti_am335x_adc: Add DT support
-
-Add DT support for client ADC driver.
-
-Signed-off-by: Patil, Rachna <rachna@ti.com>
----
- drivers/iio/adc/ti_am335x_adc.c | 26 ++++++++++++++++++++++----
- 1 file changed, 22 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
-index cd030e1..8e7b089 100644
---- a/drivers/iio/adc/ti_am335x_adc.c
-+++ b/drivers/iio/adc/ti_am335x_adc.c
-@@ -22,6 +22,8 @@
- #include <linux/platform_device.h>
- #include <linux/io.h>
- #include <linux/iio/iio.h>
-+#include <linux/of.h>
-+#include <linux/of_device.h>
- 
- #include <linux/mfd/ti_am335x_tscadc.h>
- #include <linux/platform_data/ti_am335x_adc.h>
-@@ -141,11 +143,12 @@ static int tiadc_probe(struct platform_device *pdev)
- 	struct iio_dev		*indio_dev;
- 	struct tiadc_device	*adc_dev;
- 	struct ti_tscadc_dev	*tscadc_dev = pdev->dev.platform_data;
--	struct mfd_tscadc_board	*pdata;
-+	struct mfd_tscadc_board	*pdata = tscadc_dev->dev->platform_data;
-+	struct device_node	*node = tscadc_dev->dev->of_node;
- 	int			err;
-+	u32			val32;
- 
--	pdata = tscadc_dev->dev->platform_data;
--	if (!pdata || !pdata->adc_init) {
-+	if (!pdata && !node) {
- 		dev_err(&pdev->dev, "Could not find platform data\n");
- 		return -EINVAL;
- 	}
-@@ -159,7 +162,22 @@ static int tiadc_probe(struct platform_device *pdev)
- 	adc_dev = iio_priv(indio_dev);
- 
- 	adc_dev->mfd_tscadc = tscadc_dev;
--	adc_dev->channels = pdata->adc_init->adc_channels;
-+
-+	if (pdata)
-+		adc_dev->channels = pdata->adc_init->adc_channels;
-+	else {
-+		node = of_find_node_by_name(node, "adc");
-+		if (!node)
-+			return  -EINVAL;
-+		else {
-+			err = of_property_read_u32(node,
-+					"ti,adc-channels", &val32);
-+			if (err < 0)
-+				goto err_free_device;
-+			else
-+				adc_dev->channels = val32;
-+		}
-+	}
- 
- 	indio_dev->dev.parent = &pdev->dev;
- 	indio_dev->name = dev_name(&pdev->dev);
--- 
-1.8.1
-
diff --git a/patches/adc/0008-arm-dts-AM335x-evm-Add-TSC-ADC-MFD-device-support.patch b/patches/adc/0008-arm-dts-AM335x-evm-Add-TSC-ADC-MFD-device-support.patch
deleted file mode 100644
index b2954b46dde6b0b6fba4bd47e0445b80f29d1dbd..0000000000000000000000000000000000000000
--- a/patches/adc/0008-arm-dts-AM335x-evm-Add-TSC-ADC-MFD-device-support.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 7f9a66c27e29fa7312946f7192b90af2124b198d Mon Sep 17 00:00:00 2001
-From: "Patil, Rachna" <rachna@ti.com>
-Date: Thu, 24 Jan 2013 03:45:12 +0000
-Subject: [PATCH 8/8] arm/dts: AM335x-evm: Add TSC/ADC MFD device support
-
-Add support for core multifunctional device along
-with its clients touchscreen and ADC.
-
-Signed-off-by: Patil, Rachna <rachna@ti.com>
----
- arch/arm/boot/dts/am335x-evm.dts | 13 +++++++++++++
- arch/arm/boot/dts/am33xx.dtsi    |  8 ++++++++
- 2 files changed, 21 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
-index 0dda333..b1aeefb 100644
---- a/arch/arm/boot/dts/am335x-evm.dts
-+++ b/arch/arm/boot/dts/am335x-evm.dts
-@@ -270,3 +270,16 @@
- 		reg = <0>;
- 	};
- };
-+
-+&tscadc {
-+	tsc {
-+		ti,wires = <4>;
-+		ti,x-plate-resistance = <200>;
-+		ti,steps-to-configure = <5>;
-+		ti,wire-config = <0x00 0x11 0x22 0x33>;
-+	};
-+
-+	adc {
-+		ti,adc-channels = <4>;
-+	};
-+};
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index 9059cfc..47ac3d2 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -447,5 +447,13 @@
- 				mac-address = [ 00 00 00 00 00 00 ];
- 			};
- 		};
-+
-+		tscadc: tscadc@44e0d000 {
-+			compatible = "ti,ti-tscadc";
-+			reg = <0x44e0d000 0x1000>;
-+			interrupt-parent = <&intc>;
-+			interrupts = <16>;
-+			ti,hwmods = "adc_tsc";
-+		};
- 	};
- };
--- 
-1.8.1
-
diff --git a/patches/adc/0009-ti_tscadc-Update-with-IIO-map-interface-deal-with-pa.patch b/patches/adc/0009-ti_tscadc-Update-with-IIO-map-interface-deal-with-pa.patch
deleted file mode 100644
index 773393377ec068ba927686b9a16e6358541f7861..0000000000000000000000000000000000000000
--- a/patches/adc/0009-ti_tscadc-Update-with-IIO-map-interface-deal-with-pa.patch
+++ /dev/null
@@ -1,191 +0,0 @@
-From a070cc0b1ed04a719e3e397f82202e3d7a098d8d Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Sat, 13 Oct 2012 16:37:24 +0300
-Subject: [PATCH 09/14] ti_tscadc: Update with IIO map interface & deal with
- partial activation
-
-Add an IIO map interface that consumers can use.
-While we're here fix the mfd device in the case where a subdevice
-might not be activated.
-
-Conflicts:
-	drivers/iio/adc/ti_am335x_adc.c
----
- drivers/iio/adc/ti_am335x_adc.c      | 53 ++++++++++++++++++++++++++++++------
- drivers/mfd/ti_am335x_tscadc.c       | 30 ++++++++++++++------
- include/linux/mfd/ti_am335x_tscadc.h |  8 ++----
- 3 files changed, 68 insertions(+), 23 deletions(-)
-
-diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
-index 8e7b089..40e09eb 100644
---- a/drivers/iio/adc/ti_am335x_adc.c
-+++ b/drivers/iio/adc/ti_am335x_adc.c
-@@ -20,10 +20,11 @@
- #include <linux/slab.h>
- #include <linux/interrupt.h>
- #include <linux/platform_device.h>
--#include <linux/io.h>
- #include <linux/iio/iio.h>
- #include <linux/of.h>
- #include <linux/of_device.h>
-+#include <linux/iio/machine.h>
-+#include <linux/iio/driver.h>
- 
- #include <linux/mfd/ti_am335x_tscadc.h>
- #include <linux/platform_data/ti_am335x_adc.h>
-@@ -31,6 +32,8 @@
- struct tiadc_device {
- 	struct ti_tscadc_dev *mfd_tscadc;
- 	int channels;
-+	char *buf;
-+	struct iio_map *map;
- };
- 
- static unsigned int tiadc_readl(struct tiadc_device *adc, unsigned int reg)
-@@ -77,25 +80,57 @@ static void tiadc_step_config(struct tiadc_device *adc_dev)
- static int tiadc_channel_init(struct iio_dev *indio_dev, int channels)
- {
- 	struct iio_chan_spec *chan_array;
--	int i;
--
--	indio_dev->num_channels = channels;
--	chan_array = kcalloc(indio_dev->num_channels,
--			sizeof(struct iio_chan_spec), GFP_KERNEL);
-+	struct iio_chan_spec *chan;
-+	char *s;
-+	int i, len, size, ret;
- 
-+	size = indio_dev->num_channels * (sizeof(struct iio_chan_spec) + 6);
-+	chan_array = kzalloc(size, GFP_KERNEL);
- 	if (chan_array == NULL)
- 		return -ENOMEM;
- 
--	for (i = 0; i < (indio_dev->num_channels); i++) {
--		struct iio_chan_spec *chan = chan_array + i;
-+	/* buffer space is after the array */
-+	s = (char *)(chan_array + indio_dev->num_channels);
-+	chan = chan_array;
-+	for (i = 0; i < indio_dev->num_channels; i++, chan++, s += len + 1) {
-+
-+		len = sprintf(s, "AIN%d", i);
-+
- 		chan->type = IIO_VOLTAGE;
- 		chan->indexed = 1;
- 		chan->channel = i;
--		chan->info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT;
-+		chan->datasheet_name = s;
-+		chan->scan_type.sign = 'u';
-+		chan->scan_type.realbits = 12;
-+		chan->scan_type.storagebits = 32;
-+		chan->scan_type.shift = 0;
- 	}
- 
- 	indio_dev->channels = chan_array;
- 
-+	size = (indio_dev->num_channels + 1) * sizeof(struct iio_map);
-+	adc_dev->map = kzalloc(size, GFP_KERNEL);
-+	if (adc_dev->map == NULL) {
-+		kfree(chan_array);
-+		return -ENOMEM;
-+	}
-+
-+	for (i = 0; i < indio_dev->num_channels; i++) {
-+		adc_dev->map[i].adc_channel_label = chan_array[i].datasheet_name;
-+		adc_dev->map[i].consumer_dev_name = "any";
-+		adc_dev->map[i].consumer_channel = chan_array[i].datasheet_name;
-+	}
-+	adc_dev->map[i].adc_channel_label = NULL;
-+	adc_dev->map[i].consumer_dev_name = NULL;
-+	adc_dev->map[i].consumer_channel = NULL;
-+
-+	ret = iio_map_array_register(indio_dev, adc_dev->map);
-+	if (ret != 0) {
-+		kfree(adc_dev->map);
-+		kfree(chan_array);
-+		return -ENOMEM;
-+	}
-+
- 	return indio_dev->num_channels;
- }
- 
-diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
-index 87b446b..0632d59 100644
---- a/drivers/mfd/ti_am335x_tscadc.c
-+++ b/drivers/mfd/ti_am335x_tscadc.c
-@@ -186,26 +186,38 @@ static	int ti_tscadc_probe(struct platform_device *pdev)
- 	ctrl |= CNTRLREG_TSCSSENB;
- 	tscadc_writel(tscadc, REG_CTRL, ctrl);
- 
-+	tscadc->used_cells = 0;
-+	tscadc->tsc_cell = -1;
-+	tscadc->adc_cell = -1;
-+
- 	/* TSC Cell */
--	cell = &tscadc->cells[TSC_CELL];
--	cell->name = "tsc";
--	cell->platform_data = tscadc;
--	cell->pdata_size = sizeof(*tscadc);
-+	if (tsc_wires > 0) {
-+		tscadc->tsc_cell = tscadc->used_cells;
-+		cell = &tscadc->cells[tscadc->used_cells++];
-+		cell->name = "tsc";
-+		cell->platform_data = tscadc;
-+		cell->pdata_size = sizeof(*tscadc);
-+	}
- 
- 	/* ADC Cell */
--	cell = &tscadc->cells[ADC_CELL];
--	cell->name = "tiadc";
--	cell->platform_data = tscadc;
--	cell->pdata_size = sizeof(*tscadc);
-+	if (adc_channels > 0) {
-+		tscadc->adc_cell = tscadc->used_cells;
-+		cell = &tscadc->cells[tscadc->used_cells++];
-+		cell->name = "tiadc";
-+		cell->platform_data = tscadc;
-+		cell->pdata_size = sizeof(*tscadc);
-+	}
- 
- 	err = mfd_add_devices(&pdev->dev, pdev->id, tscadc->cells,
--			TSCADC_CELLS, NULL, 0, NULL);
-+			tscadc->used_cells, NULL, 0, NULL);
- 	if (err < 0)
- 		goto err_disable_clk;
- 
- 	device_init_wakeup(&pdev->dev, true);
- 	platform_set_drvdata(pdev, tscadc);
- 
-+	dev_info(&pdev->dev, "Initialized OK.\n");
-+
- 	return 0;
- 
- err_disable_clk:
-diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
-index 9624fea..50a245f 100644
---- a/include/linux/mfd/ti_am335x_tscadc.h
-+++ b/include/linux/mfd/ti_am335x_tscadc.h
-@@ -128,11 +128,6 @@
- 
- #define TSCADC_CELLS		2
- 
--enum tscadc_cells {
--	TSC_CELL,
--	ADC_CELL,
--};
--
- struct mfd_tscadc_board {
- 	struct tsc_data *tsc_init;
- 	struct adc_data *adc_init;
-@@ -143,6 +138,9 @@ struct ti_tscadc_dev {
- 	struct regmap *regmap_tscadc;
- 	void __iomem *tscadc_base;
- 	int irq;
-+	int used_cells;	/* 0-2 */
-+	int tsc_cell;	/* -1 if not used */
-+	int adc_cell;	/* -1 if not used */
- 	struct mfd_cell cells[TSCADC_CELLS];
- 
- 	/* tsc device */
--- 
-1.8.1
-
diff --git a/patches/adc/0010-ti_tscadc-Match-mfd-sub-devices-to-regmap-interface.patch b/patches/adc/0010-ti_tscadc-Match-mfd-sub-devices-to-regmap-interface.patch
deleted file mode 100644
index 626829bd59de408cfa9e8592a1dc153c65bdc0a6..0000000000000000000000000000000000000000
--- a/patches/adc/0010-ti_tscadc-Match-mfd-sub-devices-to-regmap-interface.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-From 13d60198b9ac2bfcf9a34fedd52044b15474a9c5 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 26 Oct 2012 14:01:05 +0300
-Subject: [PATCH 10/14] ti_tscadc: Match mfd sub devices to regmap interface
-
-Conflicts:
-	drivers/input/touchscreen/ti_am335x_tsc.c
-	drivers/mfd/ti_am335x_tscadc.c
----
- drivers/iio/adc/ti_am335x_adc.c           | 27 +++++++++++++++++++--------
- drivers/input/touchscreen/ti_am335x_tsc.c | 16 +++++++++++++---
- drivers/mfd/ti_am335x_tscadc.c            |  1 +
- 3 files changed, 33 insertions(+), 11 deletions(-)
-
-diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
-index 40e09eb..d8bc836 100644
---- a/drivers/iio/adc/ti_am335x_adc.c
-+++ b/drivers/iio/adc/ti_am335x_adc.c
-@@ -25,7 +25,9 @@
- #include <linux/of_device.h>
- #include <linux/iio/machine.h>
- #include <linux/iio/driver.h>
-+#include <linux/regmap.h>
- 
-+#include <linux/io.h>
- #include <linux/mfd/ti_am335x_tscadc.h>
- #include <linux/platform_data/ti_am335x_adc.h>
- 
-@@ -38,13 +40,17 @@ struct tiadc_device {
- 
- static unsigned int tiadc_readl(struct tiadc_device *adc, unsigned int reg)
- {
--	return readl(adc->mfd_tscadc->tscadc_base + reg);
-+	unsigned int val;
-+
-+	val = (unsigned int)-1;
-+	regmap_read(adc->mfd_tscadc->regmap_tscadc, reg, &val);
-+	return val;
- }
- 
- static void tiadc_writel(struct tiadc_device *adc, unsigned int reg,
- 					unsigned int val)
- {
--	writel(val, adc->mfd_tscadc->tscadc_base + reg);
-+	regmap_write(adc->mfd_tscadc->regmap_tscadc, reg, val);
- }
- 
- static void tiadc_step_config(struct tiadc_device *adc_dev)
-@@ -77,22 +83,24 @@ static void tiadc_step_config(struct tiadc_device *adc_dev)
- 	tiadc_writel(adc_dev, REG_SE, STPENB_STEPENB);
- }
- 
--static int tiadc_channel_init(struct iio_dev *indio_dev, int channels)
-+static int tiadc_channel_init(struct iio_dev *indio_dev,
-+		struct tiadc_device *adc_dev)
- {
- 	struct iio_chan_spec *chan_array;
- 	struct iio_chan_spec *chan;
- 	char *s;
- 	int i, len, size, ret;
-+	int channels = adc_dev->channels;
- 
--	size = indio_dev->num_channels * (sizeof(struct iio_chan_spec) + 6);
-+	size = channels * (sizeof(struct iio_chan_spec) + 6);
- 	chan_array = kzalloc(size, GFP_KERNEL);
- 	if (chan_array == NULL)
- 		return -ENOMEM;
- 
- 	/* buffer space is after the array */
--	s = (char *)(chan_array + indio_dev->num_channels);
-+	s = (char *)(chan_array + channels);
- 	chan = chan_array;
--	for (i = 0; i < indio_dev->num_channels; i++, chan++, s += len + 1) {
-+	for (i = 0; i < channels; i++, chan++, s += len + 1) {
- 
- 		len = sprintf(s, "AIN%d", i);
- 
-@@ -107,8 +115,9 @@ static int tiadc_channel_init(struct iio_dev *indio_dev, int channels)
- 	}
- 
- 	indio_dev->channels = chan_array;
-+	indio_dev->num_channels = channels;
- 
--	size = (indio_dev->num_channels + 1) * sizeof(struct iio_map);
-+	size = (channels + 1) * sizeof(struct iio_map);
- 	adc_dev->map = kzalloc(size, GFP_KERNEL);
- 	if (adc_dev->map == NULL) {
- 		kfree(chan_array);
-@@ -221,7 +230,7 @@ static int tiadc_probe(struct platform_device *pdev)
- 
- 	tiadc_step_config(adc_dev);
- 
--	err = tiadc_channel_init(indio_dev, adc_dev->channels);
-+	err = tiadc_channel_init(indio_dev, adc_dev);
- 	if (err < 0)
- 		goto err_free_device;
- 
-@@ -231,6 +240,8 @@ static int tiadc_probe(struct platform_device *pdev)
- 
- 	platform_set_drvdata(pdev, indio_dev);
- 
-+	dev_info(&pdev->dev, "Initialized\n");
-+
- 	return 0;
- 
- err_free_channels:
-diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c
-index 6ff5a76..edba36b 100644
---- a/drivers/input/touchscreen/ti_am335x_tsc.c
-+++ b/drivers/input/touchscreen/ti_am335x_tsc.c
-@@ -28,6 +28,7 @@
- #include <linux/delay.h>
- #include <linux/of.h>
- #include <linux/of_device.h>
-+#include <linux/regmap.h>
- 
- #include <linux/mfd/ti_am335x_tscadc.h>
- 
-@@ -62,13 +63,17 @@ struct titsc {
- 
- static unsigned int titsc_readl(struct titsc *ts, unsigned int reg)
- {
--	return readl(ts->mfd_tscadc->tscadc_base + reg);
-+	unsigned int val;
-+
-+	val = (unsigned int)-1;
-+	regmap_read(ts->mfd_tscadc->regmap_tscadc, reg, &val);
-+	return val;
- }
- 
- static void titsc_writel(struct titsc *tsc, unsigned int reg,
- 					unsigned int val)
- {
--	writel(val, tsc->mfd_tscadc->tscadc_base + reg);
-+	regmap_write(tsc->mfd_tscadc->regmap_tscadc, reg, val);
- }
- 
- /*
-@@ -500,10 +505,15 @@ static int titsc_probe(struct platform_device *pdev)
- 
- 	/* register to the input system */
- 	err = input_register_device(input_dev);
--	if (err)
-+	if (err) {
-+		dev_err(&pdev->dev, "Failed to register input device\n");
- 		goto err_free_irq;
-+	}
- 
- 	platform_set_drvdata(pdev, ts_dev);
-+
-+	dev_info(&pdev->dev, "Initialized OK\n");
-+
- 	return 0;
- 
- err_free_irq:
-diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
-index 0632d59..899534d 100644
---- a/drivers/mfd/ti_am335x_tscadc.c
-+++ b/drivers/mfd/ti_am335x_tscadc.c
-@@ -33,6 +33,7 @@ static unsigned int tscadc_readl(struct ti_tscadc_dev *tsadc, unsigned int reg)
- {
- 	unsigned int val;
- 
-+	val = (unsigned int)-1;
- 	regmap_read(tsadc->regmap_tscadc, reg, &val);
- 	return val;
- }
--- 
-1.8.1
-
diff --git a/patches/adc/0011-input-ti_am335x_tsc-Add-variance-filters.patch b/patches/adc/0011-input-ti_am335x_tsc-Add-variance-filters.patch
deleted file mode 100644
index 74467b14766b0e9c045f720d40b958f791ecf11f..0000000000000000000000000000000000000000
--- a/patches/adc/0011-input-ti_am335x_tsc-Add-variance-filters.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 6ba0db6edb220fc08b81cb612e8f2ca03d2b1ad5 Mon Sep 17 00:00:00 2001
-From: "Patil, Rachna" <rachna@ti.com>
-Date: Mon, 22 Oct 2012 10:15:18 +0000
-Subject: [PATCH 11/14] input: ti_am335x_tsc: Add variance filters
-
-Only fine tuning variance present in tslib utility
-does not help in removing all the wanted ADC noise.
-This logic of filtering is necessary to get this
-touchscreen to work finely.
-
-Signed-off-by: Patil, Rachna <rachna@ti.com>
-
-Conflicts:
-	drivers/input/touchscreen/ti_am335x_tsc.c
----
- drivers/input/touchscreen/ti_am335x_tsc.c | 16 +++++++++++++++-
- 1 file changed, 15 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c
-index edba36b..2461631 100644
---- a/drivers/input/touchscreen/ti_am335x_tsc.c
-+++ b/drivers/input/touchscreen/ti_am335x_tsc.c
-@@ -35,6 +35,8 @@
- #define ADCFSM_STEPID		0x10
- #define SEQ_SETTLE		275
- #define MAX_12BIT		((1 << 12) - 1)
-+#define TSCADC_DELTA_X		15
-+#define TSCADC_DELTA_Y		15
- 
- /*
-  * Refer to function regbit_map() to
-@@ -54,6 +56,8 @@ struct titsc {
- 	unsigned int		wires;
- 	unsigned int		x_plate_resistance;
- 	unsigned int		enable_bits;
-+	unsigned int		bckup_x;
-+	unsigned int		bckup_y;
- 	bool			pen_down;
- 	int			steps_to_configure;
- 	int			config_inp[20];
-@@ -315,11 +319,18 @@ static irqreturn_t titsc_irq(int irq, void *dev)
- 	unsigned int x = 0, y = 0;
- 	unsigned int z1, z2, z;
- 	unsigned int fsm;
-+	unsigned int diffx = 0, diffy = 0;
-+	int i;
- 
- 	status = titsc_readl(ts_dev, REG_IRQSTATUS);
- 	if (status & IRQENB_FIFO0THRES) {
- 		titsc_read_coordinates(ts_dev, &x, &y);
- 
-+		diffx = abs(x - (ts_dev->bckup_x));
-+		diffy = abs(y - (ts_dev->bckup_y));
-+		ts_dev->bckup_x = x;
-+		ts_dev->bckup_y = y;
-+
- 		z1 = titsc_readl(ts_dev, REG_FIFO0) & 0xfff;
- 		z2 = titsc_readl(ts_dev, REG_FIFO1) & 0xfff;
- 
-@@ -335,7 +346,8 @@ static irqreturn_t titsc_irq(int irq, void *dev)
- 			z /= z1;
- 			z = (z + 2047) >> 12;
- 
--			if (z <= MAX_12BIT) {
-+			if ((diffx < TSCADC_DELTA_X) &&
-+			(diffy < TSCADC_DELTA_Y) && (z <= MAX_12BIT)) {
- 				input_report_abs(input_dev, ABS_X, x);
- 				input_report_abs(input_dev, ABS_Y, y);
- 				input_report_abs(input_dev, ABS_PRESSURE, z);
-@@ -358,6 +370,8 @@ static irqreturn_t titsc_irq(int irq, void *dev)
- 		fsm = titsc_readl(ts_dev, REG_ADCFSM);
- 		if (fsm == ADCFSM_STEPID) {
- 			ts_dev->pen_down = false;
-+			ts_dev->bckup_x = 0;
-+			ts_dev->bckup_y = 0;
- 			input_report_key(input_dev, BTN_TOUCH, 0);
- 			input_report_abs(input_dev, ABS_PRESSURE, 0);
- 			input_sync(input_dev);
--- 
-1.8.1
-
diff --git a/patches/adc/0012-am335x-adc-Do-not-use-find_node_by_name-use-get_chil.patch b/patches/adc/0012-am335x-adc-Do-not-use-find_node_by_name-use-get_chil.patch
deleted file mode 100644
index 441e65d4cfc19c2f9ed8069a6d2e102fe19dc2fe..0000000000000000000000000000000000000000
--- a/patches/adc/0012-am335x-adc-Do-not-use-find_node_by_name-use-get_chil.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 27b945e389f70ea28612024d67cc23e2929c19f1 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 30 Jan 2013 13:29:59 +0200
-Subject: [PATCH 12/14] am335x-adc: Do not use find_node_by_name, use
- get_child_by_name
-
-of_find_node_by_name doesn't work with overlays, and it's not
-doing what the caller expected to do anyway. find_node_by_name
-works by a coincidence anyway.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/iio/adc/ti_am335x_adc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
-index d8bc836..ee20c0c 100644
---- a/drivers/iio/adc/ti_am335x_adc.c
-+++ b/drivers/iio/adc/ti_am335x_adc.c
-@@ -210,7 +210,7 @@ static int tiadc_probe(struct platform_device *pdev)
- 	if (pdata)
- 		adc_dev->channels = pdata->adc_init->adc_channels;
- 	else {
--		node = of_find_node_by_name(node, "adc");
-+		node = of_get_child_by_name(node, "adc");
- 		if (!node)
- 			return  -EINVAL;
- 		else {
--- 
-1.8.1
-
diff --git a/patches/adc/0013-am335x-tsc-Do-not-use-find_node_by_name-use-get_chil.patch b/patches/adc/0013-am335x-tsc-Do-not-use-find_node_by_name-use-get_chil.patch
deleted file mode 100644
index f42f2e0704e5a1f65d943f123b0cccd1dc60f5ed..0000000000000000000000000000000000000000
--- a/patches/adc/0013-am335x-tsc-Do-not-use-find_node_by_name-use-get_chil.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 25252de6e887b8fb88bba1d0afd86d386e97cab2 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 30 Jan 2013 13:49:12 +0200
-Subject: [PATCH 13/14] am335x-tsc: Do not use find_node_by_name, use
- get_child_by_name
-
-of_find_node_by_name doesn't work with overlays, and it's not
-doing what the caller expected to do anyway. find_node_by_name
-works by a coincidence anyway.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/input/touchscreen/ti_am335x_tsc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c
-index 2461631..4fcf72f 100644
---- a/drivers/input/touchscreen/ti_am335x_tsc.c
-+++ b/drivers/input/touchscreen/ti_am335x_tsc.c
-@@ -397,7 +397,7 @@ static int titsc_parse_dt(struct ti_tscadc_dev *tscadc_dev,
- 	if (!node)
- 		return -EINVAL;
- 	else {
--		node = of_find_node_by_name(node, "tsc");
-+		node = of_get_child_by_name(node, "tsc");
- 		if (!node)
- 			return -EINVAL;
- 		else {
--- 
-1.8.1
-
diff --git a/patches/adc/0014-am335x-tscadc-Do-not-use-find_node_by_name-use-get_c.patch b/patches/adc/0014-am335x-tscadc-Do-not-use-find_node_by_name-use-get_c.patch
deleted file mode 100644
index 9ef898d95e146cef58bd617cb6fa521453e53297..0000000000000000000000000000000000000000
--- a/patches/adc/0014-am335x-tscadc-Do-not-use-find_node_by_name-use-get_c.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 98b6e5a6ab4f5a264d38fa97eeb8cc9eab554eec Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 30 Jan 2013 15:13:19 +0200
-Subject: [PATCH 14/14] am335x-tscadc: Do not use find_node_by_name, use
- get_child_by_name
-
-of_find_node_by_name doesn't work with overlays, and it's not
-doing what the caller expected to do anyway. find_node_by_name
-works by a coincidence anyway.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/mfd/ti_am335x_tscadc.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
-index 899534d..e28a31d 100644
---- a/drivers/mfd/ti_am335x_tscadc.c
-+++ b/drivers/mfd/ti_am335x_tscadc.c
-@@ -85,10 +85,10 @@ static	int ti_tscadc_probe(struct platform_device *pdev)
- 		if (pdata->adc_init)
- 			adc_channels = pdata->adc_init->adc_channels;
- 	} else {
--		node = of_find_node_by_name(pdev->dev.of_node, "tsc");
-+		node = of_get_child_by_name(pdev->dev.of_node, "tsc");
- 		of_property_read_u32(node, "ti,wires", &tsc_wires);
- 
--		node = of_find_node_by_name(pdev->dev.of_node, "adc");
-+		node = of_get_child_by_name(pdev->dev.of_node, "adc");
- 		of_property_read_u32(node, "ti,adc-channels", &adc_channels);
- 	}
- 
-@@ -284,6 +284,7 @@ static const struct dev_pm_ops tscadc_pm_ops = {
- 
- static const struct of_device_id ti_tscadc_dt_ids[] = {
- 	{ .compatible = "ti,ti-tscadc", },
-+	{ }
- };
- 
- static struct platform_driver ti_tscadc_driver = {
--- 
-1.8.1
-
diff --git a/patches/capebus/0001-gpio-keys-Pinctrl-fy.patch b/patches/capebus/0001-gpio-keys-Pinctrl-fy.patch
deleted file mode 100644
index 0d38a867a6e998bcc8282b2b987d5b912fee530b..0000000000000000000000000000000000000000
--- a/patches/capebus/0001-gpio-keys-Pinctrl-fy.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 6035801e44e2a3cc5f3613d7c6daafe2d71cdc78 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 17 Oct 2012 20:17:36 +0300
-Subject: [PATCH 1/7] gpio-keys: Pinctrl-fy
-
----
- drivers/input/keyboard/gpio_keys.c | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
-diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
-index b29ca65..97d7e05 100644
---- a/drivers/input/keyboard/gpio_keys.c
-+++ b/drivers/input/keyboard/gpio_keys.c
-@@ -29,6 +29,7 @@
- #include <linux/of_platform.h>
- #include <linux/of_gpio.h>
- #include <linux/spinlock.h>
-+#include <linux/pinctrl/consumer.h>
- 
- struct gpio_button_data {
- 	const struct gpio_keys_button *button;
-@@ -692,6 +693,7 @@ static int gpio_keys_probe(struct platform_device *pdev)
- 	struct input_dev *input;
- 	int i, error;
- 	int wakeup = 0;
-+	struct pinctrl *pinctrl;
- 
- 	if (!pdata) {
- 		pdata = gpio_keys_get_devtree_pdata(dev);
-@@ -757,6 +759,18 @@ static int gpio_keys_probe(struct platform_device *pdev)
- 		goto fail3;
- 	}
- 
-+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-+	if (IS_ERR(pinctrl))
-+		dev_warn(&pdev->dev, "unable to select pin group\n");
-+
-+	/* get current state of buttons that are connected to GPIOs */
-+	for (i = 0; i < pdata->nbuttons; i++) {
-+		struct gpio_button_data *bdata = &ddata->data[i];
-+		if (gpio_is_valid(bdata->button->gpio))
-+			gpio_keys_gpio_report_event(bdata);
-+	}
-+	input_sync(input);
-+
- 	device_init_wakeup(&pdev->dev, wakeup);
- 
- 	return 0;
--- 
-1.8.1
-
diff --git a/patches/capebus/0002-tps65217-Allow-placement-elsewhere-than-parent-mfd-d.patch b/patches/capebus/0002-tps65217-Allow-placement-elsewhere-than-parent-mfd-d.patch
deleted file mode 100644
index 2f0394eef95419fa343d2d19818a1cc7406843e6..0000000000000000000000000000000000000000
--- a/patches/capebus/0002-tps65217-Allow-placement-elsewhere-than-parent-mfd-d.patch
+++ /dev/null
@@ -1,199 +0,0 @@
-From 22e05ecf8445ed30f6b0b5a2374740827fc076f1 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 17 Oct 2012 20:17:57 +0300
-Subject: [PATCH 2/7] tps65217: Allow placement elsewhere than parent mfd
- device.
-
-The current code expect the configuration of the backlight to stay
-constant after initialization. This patch allows to move it around.
----
- drivers/video/backlight/tps65217_bl.c | 103 ++++++++++++++++++++++++++++++----
- 1 file changed, 92 insertions(+), 11 deletions(-)
-
-diff --git a/drivers/video/backlight/tps65217_bl.c b/drivers/video/backlight/tps65217_bl.c
-index 7088163..69c1dfe 100644
---- a/drivers/video/backlight/tps65217_bl.c
-+++ b/drivers/video/backlight/tps65217_bl.c
-@@ -24,8 +24,11 @@
- #include <linux/module.h>
- #include <linux/platform_device.h>
- #include <linux/slab.h>
-+#include <linux/i2c.h>
-+#include <linux/of_i2c.h>
- 
- struct tps65217_bl {
-+	struct i2c_client *i2c_client;
- 	struct tps65217 *tps;
- 	struct device *dev;
- 	struct backlight_device *bl;
-@@ -98,8 +101,6 @@ static int tps65217_bl_update_status(struct backlight_device *bl)
- 			return rc;
- 		}
- 
--		dev_dbg(tps65217_bl->dev, "brightness set to %d\n", brightness);
--
- 		if (!tps65217_bl->is_enabled)
- 			rc = tps65217_bl_enable(tps65217_bl);
- 	} else {
-@@ -187,14 +188,69 @@ static int tps65217_bl_hw_init(struct tps65217_bl *tps65217_bl,
- 
- #ifdef CONFIG_OF
- static struct tps65217_bl_pdata *
--tps65217_bl_parse_dt(struct platform_device *pdev)
-+tps65217_bl_parse_dt(struct platform_device *pdev, struct tps65217 **tpsp,
-+		int *brightnessp)
- {
--	struct tps65217 *tps = dev_get_drvdata(pdev->dev.parent);
--	struct device_node *node = of_node_get(tps->dev->of_node);
-+	struct i2c_client *i2c_client;
-+	struct tps65217 *tps;
-+	struct device_node *node, *rnode, *pnode;
- 	struct tps65217_bl_pdata *pdata, *err;
-+	u32 tps_handle;
- 	u32 val;
- 
--	node = of_find_node_by_name(node, "backlight");
-+	tps = NULL;
-+	node = NULL;
-+	*brightnessp = 0;
-+
-+	/* our node (compatible) */
-+	pnode = pdev->dev.of_node;
-+	if (pnode != NULL &&
-+		of_property_read_u32(pnode, "tps", &tps_handle) == 0) {
-+		/* we are not instantiated from the mfd */
-+		node = of_find_node_by_phandle(tps_handle);
-+		if (node == NULL) {
-+			dev_err(&pdev->dev, "failed to find the tps node\n");
-+			err = ERR_PTR(-EINVAL);
-+			goto err;
-+		}
-+		i2c_client = of_find_i2c_device_by_node(node);
-+		if (i2c_client == NULL) {
-+			dev_err(&pdev->dev, "failed to find the i2c device "
-+					"of tps node\n");
-+			err = ERR_PTR(-EINVAL);
-+			goto err;
-+		}
-+		/* yeah this is gross; the whole concept is */
-+		tps = i2c_get_clientdata(i2c_client);
-+		if (tps == NULL) {
-+			dev_err(&pdev->dev, "failed to get tps structure\n");
-+			err = ERR_PTR(-EINVAL);
-+			goto err;
-+		}
-+
-+		/* read default brightness */
-+		val = 0;
-+		of_property_read_u32(pnode, "brightness", &val);
-+		if (val >= 100)
-+			val = 100;
-+
-+		*brightnessp = val;
-+
-+		/* no need for this anymore */
-+		of_node_put(node);
-+
-+		dev_info(&pdev->dev, "got tps=%p from handle 0x%x\n", tps, tps_handle);
-+	}
-+
-+	if (tps == NULL)
-+		tps = dev_get_drvdata(pdev->dev.parent);
-+
-+	rnode = of_node_get(tps->dev->of_node);
-+
-+	node = of_find_node_by_name(rnode, "backlight");
-+	of_node_put(rnode);
-+	rnode = NULL;
-+
- 	if (!node)
- 		return ERR_PTR(-ENODEV);
- 
-@@ -247,6 +303,7 @@ tps65217_bl_parse_dt(struct platform_device *pdev)
- 
- 	of_node_put(node);
- 
-+	*tpsp = tps;
- 	return pdata;
- 
- err:
-@@ -254,9 +311,16 @@ err:
- 
- 	return err;
- }
-+
-+static struct of_device_id tps65217_backlight_of_match[] = {
-+	{ .compatible = "tps65217-backlight" },
-+	{ }
-+};
-+MODULE_DEVICE_TABLE(of, tps65217_backlight_of_match);
- #else
- static struct tps65217_bl_pdata *
--tps65217_bl_parse_dt(struct platform_device *pdev)
-+tps65217_bl_parse_dt(struct platform_device *pdev, struct tps65217 **tpsp,
-+		int *brightnessp)
- {
- 	return NULL;
- }
-@@ -265,13 +329,16 @@ tps65217_bl_parse_dt(struct platform_device *pdev)
- static int tps65217_bl_probe(struct platform_device *pdev)
- {
- 	int rc;
--	struct tps65217 *tps = dev_get_drvdata(pdev->dev.parent);
-+	struct tps65217 *tps;
- 	struct tps65217_bl *tps65217_bl;
- 	struct tps65217_bl_pdata *pdata;
- 	struct backlight_properties bl_props;
-+	int brightness = 0;
- 
--	if (tps->dev->of_node) {
--		pdata = tps65217_bl_parse_dt(pdev);
-+	tps = NULL;
-+
-+	if (pdev->dev.of_node) {
-+		pdata = tps65217_bl_parse_dt(pdev, &tps, &brightness);
- 		if (IS_ERR(pdata))
- 			return PTR_ERR(pdata);
- 	} else {
-@@ -281,6 +348,14 @@ static int tps65217_bl_probe(struct platform_device *pdev)
- 		}
- 
- 		pdata = pdev->dev.platform_data;
-+
-+		/* get the parent device */
-+		tps = dev_get_drvdata(pdev->dev.parent);
-+	}
-+
-+	if (tps == NULL) {
-+		dev_err(&pdev->dev, "failed to find tps\n");
-+		return -EINVAL;
- 	}
- 
- 	tps65217_bl = devm_kzalloc(&pdev->dev, sizeof(*tps65217_bl),
-@@ -311,9 +386,14 @@ static int tps65217_bl_probe(struct platform_device *pdev)
- 		return PTR_ERR(tps65217_bl->bl);
- 	}
- 
--	tps65217_bl->bl->props.brightness = 0;
-+	tps65217_bl->bl->props.brightness = brightness;
- 	platform_set_drvdata(pdev, tps65217_bl);
- 
-+	/* update with initial settings */
-+	tps65217_bl_update_status(tps65217_bl->bl);
-+
-+	dev_info(&pdev->dev, "OK.\n");
-+
- 	return 0;
- }
- 
-@@ -332,6 +412,7 @@ static struct platform_driver tps65217_bl_driver = {
- 	.driver		= {
- 		.owner	= THIS_MODULE,
- 		.name	= "tps65217-bl",
-+		.of_match_table	= of_match_ptr(tps65217_backlight_of_match),
- 	},
- };
- 
--- 
-1.8.1
-
diff --git a/patches/capebus/0003-pwm-backlight-Pinctrl-fy.patch b/patches/capebus/0003-pwm-backlight-Pinctrl-fy.patch
deleted file mode 100644
index 802e0ec5c0185f224cd67a217b61e41165b3cfc7..0000000000000000000000000000000000000000
--- a/patches/capebus/0003-pwm-backlight-Pinctrl-fy.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 1a3c03b30496ada317c724a5fc2aeb12de5cbfb4 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 23 Oct 2012 11:48:58 +0300
-Subject: [PATCH 3/7] pwm-backlight: Pinctrl-fy
-
----
- drivers/video/backlight/pwm_bl.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
-index 0c91023..f3b6194 100644
---- a/drivers/video/backlight/pwm_bl.c
-+++ b/drivers/video/backlight/pwm_bl.c
-@@ -20,6 +20,8 @@
- #include <linux/pwm.h>
- #include <linux/pwm_backlight.h>
- #include <linux/slab.h>
-+#include <linux/pinctrl/consumer.h>
-+#include <linux/err.h>
- 
- struct pwm_bl_data {
- 	struct pwm_device	*pwm;
-@@ -180,9 +182,14 @@ static int pwm_backlight_probe(struct platform_device *pdev)
- 	struct backlight_properties props;
- 	struct backlight_device *bl;
- 	struct pwm_bl_data *pb;
-+	struct pinctrl *pinctrl;
- 	unsigned int max;
- 	int ret;
- 
-+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-+	if (IS_ERR(pinctrl))
-+		dev_warn(&pdev->dev, "unable to select pin group\n");
-+
- 	if (!data) {
- 		ret = pwm_backlight_parse_dt(&pdev->dev, &defdata);
- 		if (ret < 0) {
--- 
-1.8.1
-
diff --git a/patches/capebus/0004-ARM-CUSTOM-Build-a-uImage-with-dtb-already-appended.patch b/patches/capebus/0004-ARM-CUSTOM-Build-a-uImage-with-dtb-already-appended.patch
deleted file mode 100644
index 6004002dbb749cb61fc68c91796a3a5318b9cb74..0000000000000000000000000000000000000000
--- a/patches/capebus/0004-ARM-CUSTOM-Build-a-uImage-with-dtb-already-appended.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From eaba650e7ad9a7ed855d8e91a5cf5c02fa868853 Mon Sep 17 00:00:00 2001
-From: Grant Likely <grant.likely@secretlab.ca>
-Date: Tue, 2 Aug 2011 15:30:09 +0100
-Subject: [PATCH 4/7] ARM: CUSTOM: Build a uImage with dtb already appended
-
-Do not commit to mainline; this is a useful hack only for now.
-
-Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
-Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
-
-Conflicts:
-
-	arch/arm/Makefile
----
- arch/arm/Makefile      | 3 +++
- arch/arm/boot/Makefile | 7 +++++++
- 2 files changed, 10 insertions(+)
-
-diff --git a/arch/arm/Makefile b/arch/arm/Makefile
-index 30c443c..cab6681 100644
---- a/arch/arm/Makefile
-+++ b/arch/arm/Makefile
-@@ -291,6 +291,9 @@ zImage Image xipImage bootpImage uImage: vmlinux
- zinstall uinstall install: vmlinux
- 	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
- 
-+uImage-dtb.%:
-+	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
-+
- %.dtb: scripts
- 	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
- 
-diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile
-index abfce28..131558f 100644
---- a/arch/arm/boot/Makefile
-+++ b/arch/arm/boot/Makefile
-@@ -55,6 +55,9 @@ $(obj)/zImage:	$(obj)/compressed/vmlinux FORCE
- 	$(call if_changed,objcopy)
- 	@$(kecho) '  Kernel: $@ is ready'
- 
-+$(obj)/zImage-dtb.%:	$(obj)/%.dtb $(obj)/zImage
-+	cat $(obj)/zImage $< > $@
-+
- endif
- 
- ifneq ($(LOADADDR),)
-@@ -80,6 +83,10 @@ $(obj)/uImage:	$(obj)/zImage FORCE
- 	$(call if_changed,uimage)
- 	@$(kecho) '  Image $@ is ready'
- 
-+$(obj)/uImage-dtb.%:	$(obj)/zImage-dtb.% FORCE
-+	$(call if_changed,uimage)
-+	@echo '  Image $@ is ready'
-+
- $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
- 	$(Q)$(MAKE) $(build)=$(obj)/bootp $@
- 	@:
--- 
-1.8.1
-
diff --git a/patches/capebus/0005-beaglebone-create-a-shared-dtsi-for-beaglebone-based.patch b/patches/capebus/0005-beaglebone-create-a-shared-dtsi-for-beaglebone-based.patch
deleted file mode 100644
index 363abe8d14a5ef63ab6d9bcf18344901430a025b..0000000000000000000000000000000000000000
--- a/patches/capebus/0005-beaglebone-create-a-shared-dtsi-for-beaglebone-based.patch
+++ /dev/null
@@ -1,643 +0,0 @@
-From c023ecbbb9faeb21b41ef8251a92bfe433fe4a1b Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Fri, 18 Jan 2013 09:19:38 +0100
-Subject: [PATCH 5/7] beaglebone: create a shared dtsi for beaglebone based
- boards and add a new dts for bonelt
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- arch/arm/boot/dts/Makefile                |    3 +-
- arch/arm/boot/dts/am335x-bone-common.dtsi |  290 +++++++++++++++++++++++++++++
- arch/arm/boot/dts/am335x-bone.dts         |  281 +---------------------------
- arch/arm/boot/dts/am335x-bonelt.dts       |   19 ++
- 4 files changed, 312 insertions(+), 281 deletions(-)
- create mode 100644 arch/arm/boot/dts/am335x-bone-common.dtsi
- create mode 100644 arch/arm/boot/dts/am335x-bonelt.dts
-
-diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
-index 5ebb44f..5c0789d 100644
---- a/arch/arm/boot/dts/Makefile
-+++ b/arch/arm/boot/dts/Makefile
-@@ -113,7 +113,8 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
- 	omap5-evm.dtb \
- 	am335x-evm.dtb \
- 	am335x-evmsk.dtb \
--	am335x-bone.dtb
-+	am335x-bone.dtb \
-+	am335x-bonelt.dtb
- dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb
- dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
- dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \
-diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
-new file mode 100644
-index 0000000..ae1d0a1
---- /dev/null
-+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
-@@ -0,0 +1,290 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ */
-+
-+/include/ "am33xx.dtsi"
-+
-+/ {
-+	model = "TI AM335x BeagleBone";
-+	compatible = "ti,am335x-bone", "ti,am33xx";
-+
-+	cpus {
-+		cpu@0 {
-+			cpu0-supply = <&dcdc2_reg>;
-+		};
-+	};
-+
-+	memory {
-+		device_type = "memory";
-+		reg = <0x80000000 0x10000000>; /* 256 MB */
-+	};
-+
-+	am33xx_pinmux: pinmux@44e10800 {
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&user_leds_s0 &spi1_pins_s0 &lcd_pins_s0 &gpevt_pins_s0>;
-+
-+		user_leds_s0: user_leds_s0 {
-+			pinctrl-single,pins = <
-+				0x54 0x7	/* gpmc_a5.gpio1_21, OUTPUT | MODE7 */
-+				0x58 0x17	/* gpmc_a6.gpio1_22, OUTPUT_PULLUP | MODE7 */
-+				0x5c 0x7	/* gpmc_a7.gpio1_23, OUTPUT | MODE7 */
-+				0x60 0x17	/* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */
-+			>;
-+		};
-+
-+		spi1_pins_s0: spi1_pins_s0 {
-+			pinctrl-single,pins = <
-+				0x190 0x33	/* mcasp0_aclkx.spi1_sclk, INPUT_PULLUP | MODE3 */
-+				0x194 0x33	/* mcasp0_fsx.spi1_d0, INPUT_PULLUP | MODE3 */
-+				0x198 0x13	/* mcasp0_axr0.spi1_d1, OUTPUT_PULLUP | MODE3 */
-+				0x19c 0x13	/* mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */
-+			>;
-+		};
-+
-+		lcd_pins_s0: lcd_pins_s0 {
-+			pinctrl-single,pins = <
-+				0x1a4 0x17	/* mcasp0_fsr.gpio3_19, OUTPUT_PULLUP | MODE7 */
-+				0x1ac 0x17	/* mcasp0_ahclkx.gpio3_21, OUTPUT_PULLUP | MODE7 */
-+			>;
-+		};
-+
-+		gpevt_pins_s0: gpevt_pins_s0 {
-+			pinctrl-single,pins = <
-+				0x090 0x37	/* gpmc_advn_ale.gpio2_2, INPUT_PULLUP | MODE7 */
-+			>;
-+		};
-+		userled_pins: pinmux_userled_pins {
-+			pinctrl-single,pins = <
-+				0x54 0x7	/* gpmc_a5.gpio1_21, OUTPUT | MODE7 */
-+				0x58 0x17	/* gpmc_a6.gpio1_22, OUTPUT_PULLUP | MODE7 */
-+				0x5c 0x7	/* gpmc_a7.gpio1_23, OUTPUT | MODE7 */
-+				0x60 0x17	/* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */
-+			>;
-+		};
-+		i2c2_pins: pinmux_i2c2_pins {
-+			pinctrl-single,pins = <
-+				0x178 0x73 	/* uart1_ctsn.i2c2_sda, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */
-+				0x17c 0x73	/* uart1_rtsn.i2c2_scl, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */
-+			>;
-+		};
-+	};
-+
-+	ocp {
-+		uart1: serial@44e09000 {
-+			status = "okay";
-+		};
-+
-+		uart5: serial@481a8000 {
-+			status = "okay";
-+		};
-+
-+		gpio-leds {
-+			compatible = "gpio-leds";
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&userled_pins>;
-+
-+			led0 {
-+				label = "beaglebone:green:usr0";
-+				gpios = <&gpio2 21 0>;
-+				linux,default-trigger = "heartbeat";
-+				default-state = "off";
-+			};
-+
-+			led1 {
-+				label = "beaglebone:green:usr1";
-+				gpios = <&gpio2 22 0>;
-+				linux,default-trigger = "mmc0";
-+				default-state = "off";
-+			};
-+
-+			led2 {
-+				label = "beaglebone:green:usr2";
-+				gpios = <&gpio2 23 0>;
-+				linux,default-trigger = "cpu0";
-+				default-state = "off";
-+			};
-+
-+			led3 {
-+				label = "beaglebone:green:usr3";
-+				gpios = <&gpio2 24 0>;
-+				default-state = "off";
-+			};
-+		};
-+
-+		gpevt {
-+			compatible = "gpevt";
-+			dmas = <&edma 12>;
-+			dma-names = "gpioevt";
-+			gpio-evt = <&gpio3 2 0>;
-+		};
-+
-+		rtc@44e3e000 {
-+			ti,system-power-controller;
-+		};
-+	};
-+
-+	leds {
-+		compatible = "gpio-leds";
-+
-+		led@2 {
-+			label = "beaglebone:green:heartbeat";
-+			gpios = <&gpio2 21 0>;
-+			linux,default-trigger = "heartbeat";
-+			default-state = "off";
-+		};
-+
-+		led@3 {
-+			label = "beaglebone:green:mmc0";
-+			gpios = <&gpio2 22 0>;
-+			linux,default-trigger = "mmc0";
-+			default-state = "off";
-+		};
-+
-+		led@4 {
-+			label = "beaglebone:green:usr2";
-+			gpios = <&gpio2 23 0>;
-+			default-state = "off";
-+		};
-+
-+		led@5 {
-+			label = "beaglebone:green:usr3";
-+			gpios = <&gpio2 24 0>;
-+			default-state = "off";
-+		};
-+	};
-+};
-+
-+&i2c0 {
-+	status = "okay";
-+	clock-frequency = <400000>;
-+
-+	tps: tps@24 {
-+		reg = <0x24>;
-+	};
-+
-+	baseboard_eeprom: baseboard_eeprom@50 {
-+		compatible = "at,24c256";
-+		reg = <0x50>;
-+	};
-+
-+};
-+
-+&i2c2 {
-+	status = "okay";
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c2_pins>;
-+
-+	clock-frequency = <100000>;
-+
-+	/* OK, I know these are cape but for now it will do */
-+	cape_eeprom_0: cape_eeprom_0@54 {
-+		compatible = "at,24c256";
-+		reg = <0x54>;
-+	};
-+
-+	cape_eeprom_1: cape_eeprom_1@55 {
-+		compatible = "at,24c256";
-+		reg = <0x55>;
-+	};
-+
-+	cape_eeprom_2: cape_eeprom_2@56 {
-+		compatible = "at,24c256";
-+		reg = <0x56>;
-+	};
-+
-+	cape_eeprom_3: cape_eeprom_3@57 {
-+		compatible = "at,24c256";
-+		reg = <0x57>;
-+	};
-+};
-+
-+/include/ "tps65217.dtsi"
-+
-+&tps {
-+	ti,pmic-shutdown-controller;
-+
-+	regulators {
-+		dcdc1_reg: regulator@0 {
-+			regulator-always-on;
-+		};
-+
-+		dcdc2_reg: regulator@1 {
-+			/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
-+			regulator-name = "vdd_mpu";
-+			regulator-min-microvolt = <925000>;
-+			regulator-max-microvolt = <1325000>;
-+			regulator-boot-on;
-+			regulator-always-on;
-+		};
-+
-+		dcdc3_reg: regulator@2 {
-+			/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
-+			regulator-name = "vdd_core";
-+			regulator-min-microvolt = <925000>;
-+			regulator-max-microvolt = <1150000>;
-+			regulator-boot-on;
-+			regulator-always-on;
-+		};
-+
-+		ldo1_reg: regulator@3 {
-+			regulator-always-on;
-+		};
-+
-+		ldo2_reg: regulator@4 {
-+			regulator-always-on;
-+		};
-+
-+		ldo3_reg: regulator@5 {
-+			regulator-min-microvolt = <1800000>;
-+			regulator-max-microvolt = <3300000>;
-+			regulator-always-on;
-+		};
-+
-+		ldo4_reg: regulator@6 {
-+			regulator-always-on;
-+		};
-+	};
-+};
-+
-+&cpsw_emac0 {
-+	phy_id = <&davinci_mdio>, <0>;
-+};
-+
-+&cpsw_emac1 {
-+	phy_id = <&davinci_mdio>, <1>;
-+};
-+
-+&mmc1 {
-+	status = "okay";
-+	vmmc-supply = <&ldo3_reg>;
-+};
-+
-+&spi1 {
-+	status = "okay";
-+
-+	lcd@0 {
-+		compatible = "adafruit,tft-lcd-1.8-green", "sitronix,st7735";
-+		spi-max-frequency = <8000000>;
-+		reg = <0>;
-+		spi-cpol;
-+		spi-cpha;
-+		st7735-rst = <&gpio4 19 0>;
-+		st7735-dc = <&gpio4 21 0>;
-+	};
-+};
-+
-+&edma {
-+	ti,edma-xbar-event-map = <32 12>;
-+};
-+
-+&sham {
-+	status = "okay";
-+};
-+
-+&aes {
-+	status = "okay";
-+};
-diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
-index 8e62bd5..9abc1f3 100644
---- a/arch/arm/boot/dts/am335x-bone.dts
-+++ b/arch/arm/boot/dts/am335x-bone.dts
-@@ -9,283 +9,4 @@
- 
- /include/ "am33xx.dtsi"
- 
--/ {
--	model = "TI AM335x BeagleBone";
--	compatible = "ti,am335x-bone", "ti,am33xx";
--
--	cpus {
--		cpu@0 {
--			cpu0-supply = <&dcdc2_reg>;
--		};
--	};
--
--	memory {
--		device_type = "memory";
--		reg = <0x80000000 0x10000000>; /* 256 MB */
--	};
--
--	am33xx_pinmux: pinmux@44e10800 {
--		pinctrl-names = "default";
--		pinctrl-0 = <&user_leds_s0 &spi1_pins_s0 &lcd_pins_s0 &gpevt_pins_s0>;
--
--		user_leds_s0: user_leds_s0 {
--			pinctrl-single,pins = <
--				0x54 0x7	/* gpmc_a5.gpio1_21, OUTPUT | MODE7 */
--				0x58 0x17	/* gpmc_a6.gpio1_22, OUTPUT_PULLUP | MODE7 */
--				0x5c 0x7	/* gpmc_a7.gpio1_23, OUTPUT | MODE7 */
--				0x60 0x17	/* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */
--			>;
--		};
--
--		spi1_pins_s0: spi1_pins_s0 {
--			pinctrl-single,pins = <
--				0x190 0x33	/* mcasp0_aclkx.spi1_sclk, INPUT_PULLUP | MODE3 */
--				0x194 0x33	/* mcasp0_fsx.spi1_d0, INPUT_PULLUP | MODE3 */
--				0x198 0x13	/* mcasp0_axr0.spi1_d1, OUTPUT_PULLUP | MODE3 */
--				0x19c 0x13	/* mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */
--			>;
--		};
--
--		lcd_pins_s0: lcd_pins_s0 {
--			pinctrl-single,pins = <
--				0x1a4 0x17	/* mcasp0_fsr.gpio3_19, OUTPUT_PULLUP | MODE7 */
--				0x1ac 0x17	/* mcasp0_ahclkx.gpio3_21, OUTPUT_PULLUP | MODE7 */
--			>;
--		};
--
--		gpevt_pins_s0: gpevt_pins_s0 {
--			pinctrl-single,pins = <
--				0x090 0x37	/* gpmc_advn_ale.gpio2_2, INPUT_PULLUP | MODE7 */
--			>;
--		};
--		userled_pins: pinmux_userled_pins {
--			pinctrl-single,pins = <
--				0x54 0x7	/* gpmc_a5.gpio1_21, OUTPUT | MODE7 */
--				0x58 0x17	/* gpmc_a6.gpio1_22, OUTPUT_PULLUP | MODE7 */
--				0x5c 0x7	/* gpmc_a7.gpio1_23, OUTPUT | MODE7 */
--				0x60 0x17	/* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */
--			>;
--		};
--		i2c2_pins: pinmux_i2c2_pins {
--			pinctrl-single,pins = <
--				0x178 0x73 	/* uart1_ctsn.i2c2_sda, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */
--				0x17c 0x73	/* uart1_rtsn.i2c2_scl, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */
--			>;
--		};
--	};
--
--	ocp {
--		uart1: serial@44e09000 {
--			status = "okay";
--		};
--
--		uart5: serial@481a8000 {
--			status = "okay";
--		};
--
--		gpio-leds {
--			compatible = "gpio-leds";
--			pinctrl-names = "default";
--			pinctrl-0 = <&userled_pins>;
--
--			led0 {
--				label = "beaglebone:green:usr0";
--				gpios = <&gpio2 21 0>;
--				linux,default-trigger = "heartbeat";
--				default-state = "off";
--			};
--
--			led1 {
--				label = "beaglebone:green:usr1";
--				gpios = <&gpio2 22 0>;
--				linux,default-trigger = "mmc0";
--				default-state = "off";
--			};
--
--			led2 {
--				label = "beaglebone:green:usr2";
--				gpios = <&gpio2 23 0>;
--				linux,default-trigger = "cpu0";
--				default-state = "off";
--			};
--
--			led3 {
--				label = "beaglebone:green:usr3";
--				gpios = <&gpio2 24 0>;
--				default-state = "off";
--			};
--		};
--
--		gpevt {
--			compatible = "gpevt";
--			dmas = <&edma 12>;
--			dma-names = "gpioevt";
--			gpio-evt = <&gpio3 2 0>;
--		};
--
--		rtc@44e3e000 {
--			ti,system-power-controller;
--		};
--	};
--
--	leds {
--		compatible = "gpio-leds";
--
--		led@2 {
--			label = "beaglebone:green:heartbeat";
--			gpios = <&gpio2 21 0>;
--			linux,default-trigger = "heartbeat";
--			default-state = "off";
--		};
--
--		led@3 {
--			label = "beaglebone:green:mmc0";
--			gpios = <&gpio2 22 0>;
--			linux,default-trigger = "mmc0";
--			default-state = "off";
--		};
--
--		led@4 {
--			label = "beaglebone:green:usr2";
--			gpios = <&gpio2 23 0>;
--			default-state = "off";
--		};
--
--		led@5 {
--			label = "beaglebone:green:usr3";
--			gpios = <&gpio2 24 0>;
--			default-state = "off";
--		};
--	};
--};
--
--&i2c0 {
--	status = "okay";
--	clock-frequency = <400000>;
--
--	tps: tps@24 {
--		reg = <0x24>;
--	};
--
--	baseboard_eeprom: baseboard_eeprom@50 {
--		compatible = "at,24c256";
--		reg = <0x50>;
--	};
--
--};
--
--&i2c2 {
--	status = "okay";
--	pinctrl-names = "default";
--	pinctrl-0 = <&i2c2_pins>;
--
--	clock-frequency = <100000>;
--
--	/* OK, I know these are cape but for now it will do */
--	cape_eeprom_0: cape_eeprom_0@54 {
--		compatible = "at,24c256";
--		reg = <0x54>;
--	};
--
--	cape_eeprom_1: cape_eeprom_1@55 {
--		compatible = "at,24c256";
--		reg = <0x55>;
--	};
--
--	cape_eeprom_2: cape_eeprom_2@56 {
--		compatible = "at,24c256";
--		reg = <0x56>;
--	};
--
--	cape_eeprom_3: cape_eeprom_3@57 {
--		compatible = "at,24c256";
--		reg = <0x57>;
--	};
--};
--
--/include/ "tps65217.dtsi"
--
--&tps {
--	ti,pmic-shutdown-controller;
--
--	regulators {
--		dcdc1_reg: regulator@0 {
--			regulator-always-on;
--		};
--
--		dcdc2_reg: regulator@1 {
--			/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
--			regulator-name = "vdd_mpu";
--			regulator-min-microvolt = <925000>;
--			regulator-max-microvolt = <1325000>;
--			regulator-boot-on;
--			regulator-always-on;
--		};
--
--		dcdc3_reg: regulator@2 {
--			/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
--			regulator-name = "vdd_core";
--			regulator-min-microvolt = <925000>;
--			regulator-max-microvolt = <1150000>;
--			regulator-boot-on;
--			regulator-always-on;
--		};
--
--		ldo1_reg: regulator@3 {
--			regulator-always-on;
--		};
--
--		ldo2_reg: regulator@4 {
--			regulator-always-on;
--		};
--
--		ldo3_reg: regulator@5 {
--			regulator-min-microvolt = <1800000>;
--			regulator-max-microvolt = <3300000>;
--			regulator-always-on;
--		};
--
--		ldo4_reg: regulator@6 {
--			regulator-always-on;
--		};
--	};
--};
--
--&cpsw_emac0 {
--	phy_id = <&davinci_mdio>, <0>;
--};
--
--&cpsw_emac1 {
--	phy_id = <&davinci_mdio>, <1>;
--};
--
--&mmc1 {
--	status = "okay";
--	vmmc-supply = <&ldo3_reg>;
--};
--
--&spi1 {
--	status = "okay";
--
--	lcd@0 {
--		compatible = "adafruit,tft-lcd-1.8-green", "sitronix,st7735";
--		spi-max-frequency = <8000000>;
--		reg = <0>;
--		spi-cpol;
--		spi-cpha;
--		st7735-rst = <&gpio4 19 0>;
--		st7735-dc = <&gpio4 21 0>;
--	};
--};
--
--&edma {
--	ti,edma-xbar-event-map = <32 12>;
--};
--
--&sham {
--	status = "okay";
--};
--
--&aes {
--	status = "okay";
--};
-+/include/ "am335x-bone-common.dtsi"
-diff --git a/arch/arm/boot/dts/am335x-bonelt.dts b/arch/arm/boot/dts/am335x-bonelt.dts
-new file mode 100644
-index 0000000..ab5af7f
---- /dev/null
-+++ b/arch/arm/boot/dts/am335x-bonelt.dts
-@@ -0,0 +1,19 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ */
-+/dts-v1/;
-+
-+/include/ "am33xx.dtsi"
-+
-+/include/ "am335x-bone-common.dtsi"
-+
-+&mmc2 {
-+	vmmc-supply = <&ldo3_reg>;
-+	bus-width = <4>;
-+	ti,non-removable;
-+	status = "okay";
-+};
--- 
-1.7.10.4
-
diff --git a/patches/capebus/0006-beaglebone-enable-emmc-for-bonelt.patch b/patches/capebus/0006-beaglebone-enable-emmc-for-bonelt.patch
deleted file mode 100644
index 863b25a97c63bdcf35ed4a356a7e65b3f0412ffe..0000000000000000000000000000000000000000
--- a/patches/capebus/0006-beaglebone-enable-emmc-for-bonelt.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 1007a1b88f0a85ee9712dd2b358f68868ad78e30 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Wed, 24 Oct 2012 11:47:13 +0200
-Subject: [PATCH 6/7] beaglebone: enable emmc for bonelt
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- arch/arm/boot/dts/am335x-bone-common.dtsi |  1 +
- arch/arm/boot/dts/am335x-bonelt.dts       | 15 +++++++++++++++
- 2 files changed, 16 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
-index 9a7be8a..8295b30 100644
---- a/arch/arm/boot/dts/am335x-bone-common.dtsi
-+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
-@@ -112,6 +112,7 @@
- 				label = "beaglebone:green:usr3";
- 				gpios = <&gpio2 24 0>;
- 				default-state = "off";
-+				linux,default-trigger = "mmc1";
- 			};
- 		};
- 
-diff --git a/arch/arm/boot/dts/am335x-bonelt.dts b/arch/arm/boot/dts/am335x-bonelt.dts
-index cdc3dd0..6cb2a51 100644
---- a/arch/arm/boot/dts/am335x-bonelt.dts
-+++ b/arch/arm/boot/dts/am335x-bonelt.dts
-@@ -11,6 +11,21 @@
- 
- /include/ "am335x-bone-common.dtsi"
- 
-+&userled_pins {
-+	pinctrl-single,pins = <
-+		0x54 0x7	/* gpmc_a5.gpio1_21, OUTPUT | MODE7 */
-+		0x58 0x17	/* gpmc_a6.gpio1_22, OUTPUT_PULLUP | MODE7 */
-+		0x5c 0x7	/* gpmc_a7.gpio1_23, OUTPUT | MODE7 */
-+		0x60 0x17	/* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */
-+		0x00c 0x31 /* P8_6 gpmc_ad3.mmc1_dat1 PIN_INPUT_PULLUP | OMAP_MUX_MODE1 */
-+		0x008 0x31 /* P8_5 gpmc_ad2.mmc1_dat2 PIN_INPUT_PULLUP | OMAP_MUX_MODE1 */
-+		0x004 0x31 /* P8_24 gpmc_ad1.mmc1_dat1 PIN_INPUT_PULLUP | OMAP_MUX_MODE1 */
-+		0x000 0x31 /* P8_25 gpmc_ad0.mmc1_dat0 PIN_INPUT_PULLUP | OMAP_MUX_MODE1 */
-+		0x084 0x32 /* P8_20 gpmc_csn2.mmc1_cmd OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP} */
-+		0x080 0x32 /* P8_21 gpmc_csn1.immc1_clk OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP} */
-+	>;
-+};
-+
- &mmc2 {
- 	vmmc-supply = <&ldo3_reg>;
- 	bus-width = <4>;
--- 
-1.8.1
-
diff --git a/patches/capebus/0007-Fix-appended-dtb-rule.patch b/patches/capebus/0007-Fix-appended-dtb-rule.patch
deleted file mode 100644
index 1541d4735438ce01fcd54adc457f62e15dcfb0d3..0000000000000000000000000000000000000000
--- a/patches/capebus/0007-Fix-appended-dtb-rule.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 58d2f2270988b53150082c0202e886064c49ad76 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Sun, 30 Dec 2012 14:53:19 +0100
-Subject: [PATCH 7/7] Fix appended dtb rule
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- arch/arm/Makefile      | 2 +-
- arch/arm/boot/Makefile | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/Makefile b/arch/arm/Makefile
-index cab6681..da4434d 100644
---- a/arch/arm/Makefile
-+++ b/arch/arm/Makefile
-@@ -291,7 +291,7 @@ zImage Image xipImage bootpImage uImage: vmlinux
- zinstall uinstall install: vmlinux
- 	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
- 
--uImage-dtb.%:
-+uImage-dtb.%: scripts
- 	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
- 
- %.dtb: scripts
-diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile
-index 131558f..e37ebb5 100644
---- a/arch/arm/boot/Makefile
-+++ b/arch/arm/boot/Makefile
-@@ -55,7 +55,7 @@ $(obj)/zImage:	$(obj)/compressed/vmlinux FORCE
- 	$(call if_changed,objcopy)
- 	@$(kecho) '  Kernel: $@ is ready'
- 
--$(obj)/zImage-dtb.%:	$(obj)/%.dtb $(obj)/zImage
-+$(obj)/zImage-dtb.%:	$(obj)/dts/%.dtb $(obj)/zImage
- 	cat $(obj)/zImage $< > $@
- 
- endif
--- 
-1.8.1
-
diff --git a/patches/cpufreq/0001-am33xx-DT-add-commented-out-OPP-values-for-ES2.0.patch b/patches/cpufreq/0001-am33xx-DT-add-commented-out-OPP-values-for-ES2.0.patch
deleted file mode 100644
index 76f84741493d32cf021957cb4d6ad3f0533c16bb..0000000000000000000000000000000000000000
--- a/patches/cpufreq/0001-am33xx-DT-add-commented-out-OPP-values-for-ES2.0.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From a781115507dcad28a9836572c75cdf3b112de40a Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Thu, 6 Dec 2012 11:55:52 +0100
-Subject: [PATCH] am33xx DT: add commented out OPP values for ES2.0
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- arch/arm/boot/dts/am33xx.dtsi |    4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index c02ade7..ee7a8ca 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -34,6 +34,10 @@
- 			 */
- 			operating-points = <
- 				/* kHz    uV */
-+				/* ES 2.0 Nitro and Turbo OPPs"
-+				1000000	1350000
-+				800000	1300000
-+				*/
- 				720000  1285000
- 				600000  1225000
- 				500000  1125000
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0001-ARM-OMAP2xxx-hwmod-Convert-SHAM-crypto-device-data-t.patch b/patches/crypto/0001-ARM-OMAP2xxx-hwmod-Convert-SHAM-crypto-device-data-t.patch
deleted file mode 100644
index ef55651c2e5e97193cc3aa55eedb983c658037b1..0000000000000000000000000000000000000000
--- a/patches/crypto/0001-ARM-OMAP2xxx-hwmod-Convert-SHAM-crypto-device-data-t.patch
+++ /dev/null
@@ -1,215 +0,0 @@
-From 731a340356f673616b43363a09542770272c668d Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Mon, 1 Oct 2012 21:03:04 -0700
-Subject: [PATCH 01/34] ARM: OMAP2xxx: hwmod: Convert SHAM crypto device data
- to hwmod
-
-Convert the device data for the OMAP2 SHAM crypto IP from
-explicit platform_data to hwmod.
-
-CC: Paul Walmsley <paul@pwsan.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- arch/arm/mach-omap2/cclock2430_data.c              |    1 +
- arch/arm/mach-omap2/devices.c                      |   32 ++++++-----------
- arch/arm/mach-omap2/omap_hwmod_2420_data.c         |    1 +
- arch/arm/mach-omap2/omap_hwmod_2430_data.c         |    1 +
- .../mach-omap2/omap_hwmod_2xxx_interconnect_data.c |   18 +++++++++
- arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |   37 ++++++++++++++++++++
- arch/arm/mach-omap2/omap_hwmod_common_data.h       |    2 +
- 7 files changed, 71 insertions(+), 21 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/cclock2430_data.c b/arch/arm/mach-omap2/cclock2430_data.c
-index eda079b..a60c16d 100644
---- a/arch/arm/mach-omap2/cclock2430_data.c
-+++ b/arch/arm/mach-omap2/cclock2430_data.c
-@@ -1992,6 +1992,7 @@ static struct omap_clk omap2430_clks[] = {
- 	CLK(NULL,	"sdrc_ick",	&sdrc_ick,	CK_243X),
- 	CLK(NULL,	"des_ick",	&des_ick,	CK_243X),
- 	CLK("omap-sham",	"ick",	&sha_ick,	CK_243X),
-+	CLK(NULL,	"sha_ick",	&sha_ick,	CK_243X),
- 	CLK("omap_rng",	"ick",		&rng_ick,	CK_243X),
- 	CLK(NULL,	"rng_ick",	&rng_ick,	CK_243X),
- 	CLK("omap-aes",	"ick",	&aes_ick,	CK_243X),
-diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
-index b868f5a..b2cabaa 100644
---- a/arch/arm/mach-omap2/devices.c
-+++ b/arch/arm/mach-omap2/devices.c
-@@ -480,24 +480,6 @@ static void omap_init_rng(void)
- 
- #if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE)
- 
--#ifdef CONFIG_ARCH_OMAP2
--static struct resource omap2_sham_resources[] = {
--	{
--		.start	= OMAP24XX_SEC_SHA1MD5_BASE,
--		.end	= OMAP24XX_SEC_SHA1MD5_BASE + 0x64,
--		.flags	= IORESOURCE_MEM,
--	},
--	{
--		.start	= 51 + OMAP_INTC_START,
--		.flags	= IORESOURCE_IRQ,
--	}
--};
--static int omap2_sham_resources_sz = ARRAY_SIZE(omap2_sham_resources);
--#else
--#define omap2_sham_resources		NULL
--#define omap2_sham_resources_sz		0
--#endif
--
- #ifdef CONFIG_ARCH_OMAP3
- static struct resource omap3_sham_resources[] = {
- 	{
-@@ -528,16 +510,24 @@ static struct platform_device sham_device = {
- static void omap_init_sham(void)
- {
- 	if (cpu_is_omap24xx()) {
--		sham_device.resource = omap2_sham_resources;
--		sham_device.num_resources = omap2_sham_resources_sz;
-+		struct omap_hwmod *oh;
-+		struct platform_device *pdev;
-+
-+		oh = omap_hwmod_lookup("sham");
-+		if (!oh)
-+			return;
-+
-+		pdev = omap_device_build("omap-sham", -1, oh, NULL, 0, NULL,
-+					 0, 0);
-+		WARN(IS_ERR(pdev), "Can't build omap_device for omap-sham\n");
- 	} else if (cpu_is_omap34xx()) {
- 		sham_device.resource = omap3_sham_resources;
- 		sham_device.num_resources = omap3_sham_resources_sz;
-+		platform_device_register(&sham_device);
- 	} else {
- 		pr_err("%s: platform not supported\n", __func__);
- 		return;
- 	}
--	platform_device_register(&sham_device);
- }
- #else
- static inline void omap_init_sham(void) { }
-diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
-index b5efe58..b718167 100644
---- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
-@@ -605,6 +605,7 @@ static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = {
- 	&omap2420_l4_core__mcbsp2,
- 	&omap2420_l4_core__msdi1,
- 	&omap2xxx_l4_core__rng,
-+	&omap2xxx_l4_core__sham,
- 	&omap2420_l4_core__hdq1w,
- 	&omap2420_l4_wkup__counter_32k,
- 	&omap2420_l3__gpmc,
-diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
-index d2d3840..3c19b08 100644
---- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
-@@ -963,6 +963,7 @@ static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
- 	&omap2430_l4_core__mcbsp5,
- 	&omap2430_l4_core__hdq1w,
- 	&omap2xxx_l4_core__rng,
-+	&omap2xxx_l4_core__sham,
- 	&omap2430_l4_wkup__counter_32k,
- 	&omap2430_l3__gpmc,
- 	NULL,
-diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
-index 47901a5..8a9b67a 100644
---- a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
-@@ -138,6 +138,15 @@ static struct omap_hwmod_addr_space omap2_rng_addr_space[] = {
- 	{ }
- };
- 
-+struct omap_hwmod_addr_space omap2xxx_sham_addrs[] = {
-+	{
-+		.pa_start	= 0x480a4000,
-+		.pa_end		= 0x480a4000 + 0x64 - 1,
-+		.flags		= ADDR_TYPE_RT
-+	},
-+	{ }
-+};
-+
- /*
-  * Common interconnect data
-  */
-@@ -389,3 +398,12 @@ struct omap_hwmod_ocp_if omap2xxx_l4_core__rng = {
- 	.addr		= omap2_rng_addr_space,
- 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
- };
-+
-+/* l4 core -> sham interface */
-+struct omap_hwmod_ocp_if omap2xxx_l4_core__sham = {
-+	.master		= &omap2xxx_l4_core_hwmod,
-+	.slave		= &omap2xxx_sham_hwmod,
-+	.clk		= "sha_ick",
-+	.addr		= omap2xxx_sham_addrs,
-+	.user		= OCP_USER_MPU,
-+};
-diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
-index e596117..e72132d 100644
---- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
-@@ -864,3 +864,40 @@ struct omap_hwmod omap2xxx_rng_hwmod = {
- 	.flags		= HWMOD_INIT_NO_RESET,
- 	.class		= &omap2_rng_hwmod_class,
- };
-+
-+/* SHAM */
-+
-+static struct omap_hwmod_class_sysconfig omap2_sham_sysc = {
-+	.rev_offs	= 0x5c,
-+	.sysc_offs	= 0x60,
-+	.syss_offs	= 0x64,
-+	.sysc_flags	= (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
-+			   SYSS_HAS_RESET_STATUS),
-+	.sysc_fields	= &omap_hwmod_sysc_type1,
-+};
-+
-+static struct omap_hwmod_class omap2xxx_sham_class = {
-+	.name	= "sham",
-+	.sysc	= &omap2_sham_sysc,
-+};
-+
-+struct omap_hwmod_irq_info omap2_sham_mpu_irqs[] = {
-+	{ .irq = 51 + OMAP_INTC_START, },
-+	{ .irq = -1 }
-+};
-+
-+struct omap_hwmod omap2xxx_sham_hwmod = {
-+	.name		= "sham",
-+	.mpu_irqs	= omap2_sham_mpu_irqs,
-+	.main_clk	= "l4_ck",
-+	.prcm		= {
-+		.omap2 = {
-+			.module_offs = CORE_MOD,
-+			.prcm_reg_id = 4,
-+			.module_bit = OMAP24XX_EN_SHA_SHIFT,
-+			.idlest_reg_id = 4,
-+			.idlest_idle_bit = OMAP24XX_ST_SHA_SHIFT,
-+		},
-+	},
-+	.class		= &omap2xxx_sham_class,
-+};
-diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h
-index cfcce29..928acd5 100644
---- a/arch/arm/mach-omap2/omap_hwmod_common_data.h
-+++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h
-@@ -78,6 +78,7 @@ extern struct omap_hwmod omap2xxx_mcspi2_hwmod;
- extern struct omap_hwmod omap2xxx_counter_32k_hwmod;
- extern struct omap_hwmod omap2xxx_gpmc_hwmod;
- extern struct omap_hwmod omap2xxx_rng_hwmod;
-+extern struct omap_hwmod omap2xxx_sham_hwmod;
- 
- /* Common interface data across OMAP2xxx */
- extern struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core;
-@@ -105,6 +106,7 @@ extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_dispc;
- extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_rfbi;
- extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_venc;
- extern struct omap_hwmod_ocp_if omap2xxx_l4_core__rng;
-+extern struct omap_hwmod_ocp_if omap2xxx_l4_core__sham;
- 
- /* Common IP block data */
- extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[];
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0002-ARM-OMAP2xxx-hwmod-Add-DMA-support-for-SHAM-module.patch b/patches/crypto/0002-ARM-OMAP2xxx-hwmod-Add-DMA-support-for-SHAM-module.patch
deleted file mode 100644
index d071989be63cb26cf2fcd10c8ed14d36fd3c38df..0000000000000000000000000000000000000000
--- a/patches/crypto/0002-ARM-OMAP2xxx-hwmod-Add-DMA-support-for-SHAM-module.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 0b05d7aa4f79664821bcfd312ebdce7726da0913 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Fri, 19 Oct 2012 14:10:34 -0700
-Subject: [PATCH 02/34] ARM: OMAP2xxx: hwmod: Add DMA support for SHAM module
-
-The current OMAP2 SHAM support doesn't enable DMA
-so add that support so it can use DMA just like OMAP3.
-
-CC: Paul Walmsley <paul@pwsan.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- .../mach-omap2/omap_hwmod_2xxx_interconnect_data.c |    2 +-
- arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |    6 ++++++
- 2 files changed, 7 insertions(+), 1 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
-index 8a9b67a..510f584 100644
---- a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
-@@ -405,5 +405,5 @@ struct omap_hwmod_ocp_if omap2xxx_l4_core__sham = {
- 	.slave		= &omap2xxx_sham_hwmod,
- 	.clk		= "sha_ick",
- 	.addr		= omap2xxx_sham_addrs,
--	.user		= OCP_USER_MPU,
-+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
- };
-diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
-index e72132d..ab3305b 100644
---- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
-@@ -886,9 +886,15 @@ struct omap_hwmod_irq_info omap2_sham_mpu_irqs[] = {
- 	{ .irq = -1 }
- };
- 
-+struct omap_hwmod_dma_info omap2_sham_sdma_chs[] = {
-+	{ .name = "rx", .dma_req = 13 },
-+	{ .dma_req = -1 }
-+};
-+
- struct omap_hwmod omap2xxx_sham_hwmod = {
- 	.name		= "sham",
- 	.mpu_irqs	= omap2_sham_mpu_irqs,
-+	.sdma_reqs	= omap2_sham_sdma_chs,
- 	.main_clk	= "l4_ck",
- 	.prcm		= {
- 		.omap2 = {
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0003-ARM-OMAP3xxx-hwmod-Convert-SHAM-crypto-device-data-t.patch b/patches/crypto/0003-ARM-OMAP3xxx-hwmod-Convert-SHAM-crypto-device-data-t.patch
deleted file mode 100644
index 6fc38571d059b78309dc4429bd68f2ae83bfae3a..0000000000000000000000000000000000000000
--- a/patches/crypto/0003-ARM-OMAP3xxx-hwmod-Convert-SHAM-crypto-device-data-t.patch
+++ /dev/null
@@ -1,180 +0,0 @@
-From 227858abcc6dda5fa5d8438109235081309eda33 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Tue, 2 Oct 2012 19:54:00 -0700
-Subject: [PATCH 03/34] ARM: OMAP3xxx: hwmod: Convert SHAM crypto device data
- to hwmod
-
-Convert the device data for the OMAP3 SHAM2 (SHA1/MD5) crypto IP
-from explicit platform_data to hwmod.
-
-CC: Paul Walmsley <paul@pwsan.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- arch/arm/mach-omap2/cclock3xxx_data.c      |    1 +
- arch/arm/mach-omap2/devices.c              |   41 +----------------
- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |   66 ++++++++++++++++++++++++++++
- 3 files changed, 69 insertions(+), 39 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/cclock3xxx_data.c b/arch/arm/mach-omap2/cclock3xxx_data.c
-index 6ef8758..2853d72 100644
---- a/arch/arm/mach-omap2/cclock3xxx_data.c
-+++ b/arch/arm/mach-omap2/cclock3xxx_data.c
-@@ -3336,6 +3336,7 @@ static struct omap_clk omap3xxx_clks[] = {
- 	CLK(NULL,	"icr_ick",	&icr_ick,	CK_34XX | CK_36XX),
- 	CLK("omap-aes",	"ick",	&aes2_ick,	CK_34XX | CK_36XX),
- 	CLK("omap-sham",	"ick",	&sha12_ick,	CK_34XX | CK_36XX),
-+	CLK(NULL,	"sha12_ick",	&sha12_ick,	CK_34XX | CK_36XX),
- 	CLK(NULL,	"des2_ick",	&des2_ick,	CK_34XX | CK_36XX),
- 	CLK("omap_hsmmc.1",	"ick",	&mmchs2_ick,	CK_3XXX),
- 	CLK("omap_hsmmc.0",	"ick",	&mmchs1_ick,	CK_3XXX),
-diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
-index b2cabaa..69a3546 100644
---- a/arch/arm/mach-omap2/devices.c
-+++ b/arch/arm/mach-omap2/devices.c
-@@ -478,38 +478,9 @@ static void omap_init_rng(void)
- 	WARN(IS_ERR(pdev), "Can't build omap_device for omap_rng\n");
- }
- 
--#if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE)
--
--#ifdef CONFIG_ARCH_OMAP3
--static struct resource omap3_sham_resources[] = {
--	{
--		.start	= OMAP34XX_SEC_SHA1MD5_BASE,
--		.end	= OMAP34XX_SEC_SHA1MD5_BASE + 0x64,
--		.flags	= IORESOURCE_MEM,
--	},
--	{
--		.start	= 49 + OMAP_INTC_START,
--		.flags	= IORESOURCE_IRQ,
--	},
--	{
--		.start	= OMAP34XX_DMA_SHA1MD5_RX,
--		.flags	= IORESOURCE_DMA,
--	}
--};
--static int omap3_sham_resources_sz = ARRAY_SIZE(omap3_sham_resources);
--#else
--#define omap3_sham_resources		NULL
--#define omap3_sham_resources_sz		0
--#endif
--
--static struct platform_device sham_device = {
--	.name		= "omap-sham",
--	.id		= -1,
--};
--
--static void omap_init_sham(void)
-+static void __init omap_init_sham(void)
- {
--	if (cpu_is_omap24xx()) {
-+	if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
- 		struct omap_hwmod *oh;
- 		struct platform_device *pdev;
- 
-@@ -520,18 +491,10 @@ static void omap_init_sham(void)
- 		pdev = omap_device_build("omap-sham", -1, oh, NULL, 0, NULL,
- 					 0, 0);
- 		WARN(IS_ERR(pdev), "Can't build omap_device for omap-sham\n");
--	} else if (cpu_is_omap34xx()) {
--		sham_device.resource = omap3_sham_resources;
--		sham_device.num_resources = omap3_sham_resources_sz;
--		platform_device_register(&sham_device);
- 	} else {
- 		pr_err("%s: platform not supported\n", __func__);
--		return;
- 	}
- }
--#else
--static inline void omap_init_sham(void) { }
--#endif
- 
- #if defined(CONFIG_CRYPTO_DEV_OMAP_AES) || defined(CONFIG_CRYPTO_DEV_OMAP_AES_MODULE)
- 
-diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
-index 8bb2628..122b4dc 100644
---- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
-@@ -3540,6 +3540,71 @@ static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc = {
- 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
- };
- 
-+/* l4_core -> SHAM2 (SHA1/MD5) (similar to omap24xx) */
-+static struct omap_hwmod_sysc_fields omap3_sham_sysc_fields = {
-+	.sidle_shift	= 4,
-+	.srst_shift	= 1,
-+	.autoidle_shift	= 0,
-+};
-+
-+static struct omap_hwmod_class_sysconfig omap3_sham_sysc = {
-+	.rev_offs	= 0x5c,
-+	.sysc_offs	= 0x60,
-+	.syss_offs	= 0x64,
-+	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-+			   SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
-+	.sysc_fields	= &omap3_sham_sysc_fields,
-+};
-+
-+static struct omap_hwmod_class omap3xxx_sham_class = {
-+	.name	= "sham",
-+	.sysc	= &omap3_sham_sysc,
-+};
-+
-+struct omap_hwmod_irq_info omap3_sham_mpu_irqs[] = {
-+	{ .irq = 49 + OMAP_INTC_START, },
-+	{ .irq = -1 }
-+};
-+
-+struct omap_hwmod_dma_info omap3_sham_sdma_reqs[] = {
-+	{ .name = "rx", .dma_req = OMAP34XX_DMA_SHA1MD5_RX, },
-+	{ .dma_req = -1 }
-+};
-+
-+struct omap_hwmod omap3xxx_sham_hwmod = {
-+	.name		= "sham",
-+	.mpu_irqs	= omap3_sham_mpu_irqs,
-+	.sdma_reqs	= omap3_sham_sdma_reqs,
-+	.main_clk	= "sha12_ick",
-+	.prcm		= {
-+		.omap2 = {
-+			.module_offs = CORE_MOD,
-+			.prcm_reg_id = 1,
-+			.module_bit = OMAP3430_EN_SHA12_SHIFT,
-+			.idlest_reg_id = 1,
-+			.idlest_idle_bit = OMAP3430_ST_SHA12_SHIFT,
-+		},
-+	},
-+	.class		= &omap3xxx_sham_class,
-+};
-+
-+static struct omap_hwmod_addr_space omap3xxx_sham_addrs[] = {
-+	{
-+		.pa_start	= 0x480c3000,
-+		.pa_end		= 0x480c3000 + 0x64 - 1,
-+		.flags		= ADDR_TYPE_RT
-+	},
-+	{ }
-+};
-+
-+static struct omap_hwmod_ocp_if omap3xxx_l4_core__sham = {
-+	.master		= &omap3xxx_l4_core_hwmod,
-+	.slave		= &omap3xxx_sham_hwmod,
-+	.clk		= "sha12_ick",
-+	.addr		= omap3xxx_sham_addrs,
-+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
-+};
-+
- static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
- 	&omap3xxx_l3_main__l4_core,
- 	&omap3xxx_l3_main__l4_per,
-@@ -3593,6 +3658,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
- /* GP-only hwmod links */
- static struct omap_hwmod_ocp_if *omap3xxx_gp_hwmod_ocp_ifs[] __initdata = {
- 	&omap3xxx_l4_sec__timer12,
-+	&omap3xxx_l4_core__sham,
- 	NULL
- };
- 
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0004-ARM-OMAP2-Remove-unnecessary-message-when-no-SHA-IP-.patch b/patches/crypto/0004-ARM-OMAP2-Remove-unnecessary-message-when-no-SHA-IP-.patch
deleted file mode 100644
index 68949d00ed148d4f9d91e4772df3ff9d7f2de61c..0000000000000000000000000000000000000000
--- a/patches/crypto/0004-ARM-OMAP2-Remove-unnecessary-message-when-no-SHA-IP-.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From eaa9ff497822677198b306ed5c31e71ee4c49e36 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Fri, 19 Oct 2012 08:45:26 -0700
-Subject: [PATCH 04/34] ARM: OMAP2+: Remove unnecessary message when no SHA IP
- is present
-
-Remove the error message that prints when there is no SHA IP
-present to make it consistent with all the other IPs.
-
-CC: Paul Walmsley <paul@pwsan.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- arch/arm/mach-omap2/devices.c |   19 +++++++------------
- 1 files changed, 7 insertions(+), 12 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
-index 69a3546..d4d8905 100644
---- a/arch/arm/mach-omap2/devices.c
-+++ b/arch/arm/mach-omap2/devices.c
-@@ -480,20 +480,15 @@ static void omap_init_rng(void)
- 
- static void __init omap_init_sham(void)
- {
--	if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
--		struct omap_hwmod *oh;
--		struct platform_device *pdev;
-+	struct omap_hwmod *oh;
-+	struct platform_device *pdev;
- 
--		oh = omap_hwmod_lookup("sham");
--		if (!oh)
--			return;
-+	oh = omap_hwmod_lookup("sham");
-+	if (!oh)
-+		return;
- 
--		pdev = omap_device_build("omap-sham", -1, oh, NULL, 0, NULL,
--					 0, 0);
--		WARN(IS_ERR(pdev), "Can't build omap_device for omap-sham\n");
--	} else {
--		pr_err("%s: platform not supported\n", __func__);
--	}
-+	pdev = omap_device_build("omap-sham", -1, oh, NULL, 0, NULL, 0, 0);
-+	WARN(IS_ERR(pdev), "Can't build omap_device for omap-sham\n");
- }
- 
- #if defined(CONFIG_CRYPTO_DEV_OMAP_AES) || defined(CONFIG_CRYPTO_DEV_OMAP_AES_MODULE)
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0005-ARM-OMAP2-Only-manually-add-hwmod-data-when-DT-not-u.patch b/patches/crypto/0005-ARM-OMAP2-Only-manually-add-hwmod-data-when-DT-not-u.patch
deleted file mode 100644
index ef2f31f21dafba2a0a044909d2894873be81a10b..0000000000000000000000000000000000000000
--- a/patches/crypto/0005-ARM-OMAP2-Only-manually-add-hwmod-data-when-DT-not-u.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 661962b60b13f9f5c73f9f14f31f637ad7343eba Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Mon, 17 Dec 2012 16:01:15 -0700
-Subject: [PATCH 05/34] ARM: OMAP2+: Only manually add hwmod data when DT not
- used.
-
-The omap_init_sham() routine in devices.c only needs to be
-called when there is no device tree present.
-
-CC: Paul Walmsley <paul@pwsan.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- arch/arm/mach-omap2/devices.c |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
-index d4d8905..7d9e786 100644
---- a/arch/arm/mach-omap2/devices.c
-+++ b/arch/arm/mach-omap2/devices.c
-@@ -686,10 +686,10 @@ static int __init omap2_init_devices(void)
- 		omap_init_dmic();
- 		omap_init_mcpdm();
- 		omap_init_mcspi();
-+		omap_init_sham();
- 	}
- 	omap_init_sti();
- 	omap_init_rng();
--	omap_init_sham();
- 	omap_init_aes();
- 	omap_init_vout();
- 	omap_init_ocp2scp();
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0006-ARM-AM33XX-Add-sha0-crypto-clock-data.patch b/patches/crypto/0006-ARM-AM33XX-Add-sha0-crypto-clock-data.patch
deleted file mode 100644
index 99355d9422b99af63793a1081f737c30c44da28a..0000000000000000000000000000000000000000
--- a/patches/crypto/0006-ARM-AM33XX-Add-sha0-crypto-clock-data.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 0795b0f046cb9b7f676998dc7e50b30e4e2a9ee3 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Mon, 17 Dec 2012 15:57:48 -0700
-Subject: [PATCH 06/34] ARM: AM33XX: Add sha0 crypto clock data
-
-Add clock data for for the SHA0 crypto module
-on the am33xx SoC.
-
-CC: Paul Walmsley <paul@pwsan.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- arch/arm/mach-omap2/cclock33xx_data.c |    5 +++++
- 1 files changed, 5 insertions(+), 0 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
-index a09d6d7..9b76049 100644
---- a/arch/arm/mach-omap2/cclock33xx_data.c
-+++ b/arch/arm/mach-omap2/cclock33xx_data.c
-@@ -412,6 +412,10 @@ static struct clk smartreflex1_fck;
- DEFINE_STRUCT_CLK_HW_OMAP(smartreflex1_fck, NULL);
- DEFINE_STRUCT_CLK(smartreflex1_fck, dpll_core_ck_parents, clk_ops_null);
- 
-+static struct clk sha0_fck;
-+DEFINE_STRUCT_CLK_HW_OMAP(sha0_fck, NULL);
-+DEFINE_STRUCT_CLK(sha0_fck, dpll_core_ck_parents, clk_ops_null);
-+
- /*
-  * Modules clock nodes
-  *
-@@ -876,6 +880,7 @@ static struct omap_clk am33xx_clks[] = {
- 	CLK(NULL,	"mmu_fck",		&mmu_fck,	CK_AM33XX),
- 	CLK(NULL,	"smartreflex0_fck",	&smartreflex0_fck,	CK_AM33XX),
- 	CLK(NULL,	"smartreflex1_fck",	&smartreflex1_fck,	CK_AM33XX),
-+	CLK(NULL,	"sha0_fck",		&sha0_fck,	CK_AM33XX),
- 	CLK(NULL,	"timer1_fck",		&timer1_fck,	CK_AM33XX),
- 	CLK(NULL,	"timer2_fck",		&timer2_fck,	CK_AM33XX),
- 	CLK(NULL,	"timer3_fck",		&timer3_fck,	CK_AM33XX),
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0007-ARM-AM33XX-hwmod-Update-and-uncomment-SHA0-module-da.patch b/patches/crypto/0007-ARM-AM33XX-hwmod-Update-and-uncomment-SHA0-module-da.patch
deleted file mode 100644
index 0e5a19a08278df19a64e2e9fe29520a33e9d37a9..0000000000000000000000000000000000000000
--- a/patches/crypto/0007-ARM-AM33XX-hwmod-Update-and-uncomment-SHA0-module-da.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From c03cfea43d834698e0f07972de1f177f6465e59c Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Mon, 17 Dec 2012 15:55:45 -0700
-Subject: [PATCH 07/34] ARM: AM33XX: hwmod: Update and uncomment SHA0 module
- data
-
-Update the SHA0 HIB2 module's hwmod data for the am33xx SoC.
-Also, remove it from the '#if 0' block that its currently
-inside so the data is actually available for use.
-
-CC: Paul Walmsley <paul@pwsan.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- arch/arm/mach-omap2/omap_hwmod_33xx_data.c |   43 ++++++++++++++++++++++++----
- 1 files changed, 37 insertions(+), 6 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
-index 0a7d3ea..cea1fc7 100644
---- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
-@@ -417,7 +417,6 @@ static struct omap_hwmod am33xx_adc_tsc_hwmod = {
-  *    - ocmc ram
-  *    - ocp watch point
-  *    - aes0
-- *    - sha0
-  */
- #if 0
- /*
-@@ -543,22 +542,37 @@ static struct omap_hwmod am33xx_aes0_hwmod = {
- 		},
- 	},
- };
-+#endif
-+
-+/* sha0 HIB2 (the 'P' (public) device) */
-+static struct omap_hwmod_class_sysconfig am33xx_sha0_sysc = {
-+	.rev_offs	= 0x100,
-+	.sysc_offs	= 0x110,
-+	.syss_offs	= 0x114,
-+	.sysc_flags	= SYSS_HAS_RESET_STATUS,
-+};
- 
--/* sha0 */
- static struct omap_hwmod_class am33xx_sha0_hwmod_class = {
- 	.name		= "sha0",
-+	.sysc		= &am33xx_sha0_sysc,
- };
- 
- static struct omap_hwmod_irq_info am33xx_sha0_irqs[] = {
--	{ .irq = 108 + OMAP_INTC_START, },
-+	{ .irq = 109 + OMAP_INTC_START, },
- 	{ .irq = -1 },
- };
- 
-+struct omap_hwmod_dma_info am33xx_sha0_edma_reqs[] = {
-+	{ .name = "rx", .dma_req = 36, },
-+	{ .dma_req = -1 }
-+};
-+
- static struct omap_hwmod am33xx_sha0_hwmod = {
--	.name		= "sha0",
-+	.name		= "sham",
- 	.class		= &am33xx_sha0_hwmod_class,
- 	.clkdm_name	= "l3_clkdm",
- 	.mpu_irqs	= am33xx_sha0_irqs,
-+	.sdma_reqs	= am33xx_sha0_edma_reqs,
- 	.main_clk	= "l3_gclk",
- 	.prcm		= {
- 		.omap4	= {
-@@ -568,8 +582,6 @@ static struct omap_hwmod am33xx_sha0_hwmod = {
- 	},
- };
- 
--#endif
--
- /* 'smartreflex' class */
- static struct omap_hwmod_class am33xx_smartreflex_hwmod_class = {
- 	.name		= "smartreflex",
-@@ -3328,6 +3340,24 @@ static struct omap_hwmod_ocp_if am33xx_l3_s__usbss = {
- 	.flags		= OCPIF_SWSUP_IDLE,
- };
- 
-+/* l3 main -> sha0 HIB2 */
-+static struct omap_hwmod_addr_space am33xx_sha0_addrs[] = {
-+	{
-+		.pa_start	= 0x53100000,
-+		.pa_end		= 0x53100000 + SZ_512 - 1,
-+		.flags		= ADDR_TYPE_RT
-+	},
-+	{ }
-+};
-+
-+static struct omap_hwmod_ocp_if am33xx_l3_main__sha0 = {
-+	.master		= &am33xx_l3_main_hwmod,
-+	.slave		= &am33xx_sha0_hwmod,
-+	.clk		= "sha0_fck",
-+	.addr		= am33xx_sha0_addrs,
-+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
-+};
-+
- static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
- 	&am33xx_l4_fw__emif_fw,
- 	&am33xx_l3_main__emif,
-@@ -3401,6 +3431,7 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
- 	&am33xx_l3_s__usbss,
- 	&am33xx_l4_hs__cpgmac0,
- 	&am33xx_cpgmac0__mdio,
-+	&am33xx_l3_main__sha0,
- 	NULL,
- };
- 
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0008-ARM-dts-Add-SHAM-data-and-documentation-for-AM33XX.patch b/patches/crypto/0008-ARM-dts-Add-SHAM-data-and-documentation-for-AM33XX.patch
deleted file mode 100644
index 41a475bbc4d06e3edba65d3282a75bbbf1cd26db..0000000000000000000000000000000000000000
--- a/patches/crypto/0008-ARM-dts-Add-SHAM-data-and-documentation-for-AM33XX.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From 02d47b702d08cf9e59e0e98786117a064e8aa869 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Mon, 17 Dec 2012 16:16:27 -0700
-Subject: [PATCH 08/34] ARM: dts: Add SHAM data and documentation for AM33XX
-
-Add the generic AM33XX SHAM module's device tree data and
-enable it for the am335x-evm, am335x-evmsk, and am335x-bone
-platforms.  Also add Documentation file describing the data
-for the SHAM module.
-
-CC: Paul Walmsley <paul@pwsan.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- .../devicetree/bindings/crypto/omap-sham.txt       |   35 ++++++++++++++++++++
- arch/arm/boot/dts/am335x-bone.dts                  |    4 +++
- arch/arm/boot/dts/am335x-evm.dts                   |    4 +++
- arch/arm/boot/dts/am335x-evmsk.dts                 |    4 +++
- arch/arm/boot/dts/am33xx.dtsi                      |   12 +++++++
- 5 files changed, 59 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/crypto/omap-sham.txt
-
-diff --git a/Documentation/devicetree/bindings/crypto/omap-sham.txt b/Documentation/devicetree/bindings/crypto/omap-sham.txt
-new file mode 100644
-index 0000000..53839cc
---- /dev/null
-+++ b/Documentation/devicetree/bindings/crypto/omap-sham.txt
-@@ -0,0 +1,35 @@
-+OMAP SoC SHA crypto Module
-+
-+Required properties:
-+
-+- compatible : Should contain entries for this and backward compatible
-+  SHAM versions:
-+  - "ti,omap2-sham" for OMAP2 & OMAP3.
-+  - "ti,omap4-sham" for OMAP4 and AM33XX.
-+  Note that these two versions are incompatible.
-+- ti,hwmods: Name of the hwmod associated with the SHAM module
-+- reg : Offset and length of the register set for the module
-+- interrupt-parent : the phandle for the interrupt controller that
-+  services interrupts for this module.
-+- interrupts : the interrupt number for the SHAM module.
-+
-+Optional properties:
-+- dmas: DMA controller phandle and DMA request ordered pair.
-+	Only one rx pair is valid per SHAM module.
-+- dma-names: DMA request name. This string corresponds 1:1 with
-+	the ordered pair in dmas. The string naming is to be
-+	"rx" for RX request.
-+
-+Example:
-+	/* AM335x */
-+	sham: sham@53100000 {
-+		compatible = "ti,omap4-sham";
-+		ti,hwmods = "sham";
-+		#address-cells = <1>;
-+		#size-cells = <0>;
-+		reg = <0x53100000 0x200>;
-+		interrupt-parent = <&intc>;
-+		interrupts = <109>;
-+		dmas = <&edma 36>;
-+		dma-names = "rx";
-+	};
-diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
-index 8dd66b4..af0a16d 100644
---- a/arch/arm/boot/dts/am335x-bone.dts
-+++ b/arch/arm/boot/dts/am335x-bone.dts
-@@ -281,3 +281,7 @@
- &edma {
- 	ti,edma-xbar-event-map = <32 12>;
- };
-+
-+&sham {
-+	status = "okay";
-+};
-diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
-index 1f6b157..b8cb5be 100644
---- a/arch/arm/boot/dts/am335x-evm.dts
-+++ b/arch/arm/boot/dts/am335x-evm.dts
-@@ -358,3 +358,7 @@
- 		};
- 	};
- };
-+
-+&sham {
-+	status = "okay";
-+};
-diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
-index 7a87803..a7e1659 100644
---- a/arch/arm/boot/dts/am335x-evmsk.dts
-+++ b/arch/arm/boot/dts/am335x-evmsk.dts
-@@ -331,3 +331,7 @@
- 		};
- 	};
- };
-+
-+&sham {
-+	status = "okay";
-+};
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index 0087b13..fa94f6e 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -550,5 +550,17 @@
- 				//status = "disabled";
- 			};
- 		};
-+
-+		sham: sham@53100000 {
-+			compatible = "ti,omap4-sham";
-+			ti,hwmods = "sham";
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			reg = <0x53100000 0x200>;
-+			interrupt-parent = <&intc>;
-+			interrupts = <109>;
-+			dmas = <&edma 36>;
-+			dma-names = "rx";
-+		};
- 	};
- };
--- 
-1.7.10.4
-
diff --git a/patches/crypto/0009-ARM-OMAP2xxx-hwmod-Convert-AES-crypto-devcie-data-to.patch b/patches/crypto/0009-ARM-OMAP2xxx-hwmod-Convert-AES-crypto-devcie-data-to.patch
deleted file mode 100644
index a02c5c5ad1bebc0ebe80a75c165d83ebdaaa467c..0000000000000000000000000000000000000000
--- a/patches/crypto/0009-ARM-OMAP2xxx-hwmod-Convert-AES-crypto-devcie-data-to.patch
+++ /dev/null
@@ -1,222 +0,0 @@
-From 873a20e2911f4026d7cae1463b153a2078053229 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Wed, 7 Nov 2012 12:16:49 -0700
-Subject: [PATCH 09/34] ARM: OMAP2xxx: hwmod: Convert AES crypto devcie data
- to hwmod
-
-Convert the device data for the OMAP2 AES crypto IP from
-explicit platform_data to hwmod.
-
-CC: Paul Walmsley <paul@pwsan.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- arch/arm/mach-omap2/cclock2430_data.c              |    3 +-
- arch/arm/mach-omap2/devices.c                      |   36 ++++++-------------
- arch/arm/mach-omap2/omap_hwmod_2420_data.c         |    1 +
- arch/arm/mach-omap2/omap_hwmod_2430_data.c         |    1 +
- .../mach-omap2/omap_hwmod_2xxx_interconnect_data.c |   18 +++++++++
- arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |   38 ++++++++++++++++++++
- arch/arm/mach-omap2/omap_hwmod_common_data.h       |    2 +
- 7 files changed, 73 insertions(+), 26 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/cclock2430_data.c b/arch/arm/mach-omap2/cclock2430_data.c
-index a60c16d..6f721b2 100644
---- a/arch/arm/mach-omap2/cclock2430_data.c
-+++ b/arch/arm/mach-omap2/cclock2430_data.c
-@@ -1995,7 +1995,8 @@ static struct omap_clk omap2430_clks[] = {
- 	CLK(NULL,	"sha_ick",	&sha_ick,	CK_243X),
- 	CLK("omap_rng",	"ick",		&rng_ick,	CK_243X),
- 	CLK(NULL,	"rng_ick",	&rng_ick,	CK_243X),
--	CLK("omap-aes",	"ick",	&aes_ick,	CK_243X),
-+	CLK("omap-aes",	"ick",		&aes_ick,	CK_243X),
-+	CLK(NULL,	"aes_ick",	&aes_ick,	CK_243X),
- 	CLK(NULL,	"pka_ick",	&pka_ick,	CK_243X),
- 	CLK(NULL,	"usb_fck",	&usb_fck,	CK_243X),
- 	CLK("musb-omap2430",	"ick",	&usbhs_ick,	CK_243X),
-diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
-index 7d9e786..232f331 100644
---- a/arch/arm/mach-omap2/devices.c
-+++ b/arch/arm/mach-omap2/devices.c
-@@ -493,28 +493,6 @@ static void __init omap_init_sham(void)
- 
- #if defined(CONFIG_CRYPTO_DEV_OMAP_AES) || defined(CONFIG_CRYPTO_DEV_OMAP_AES_MODULE)
- 
--#ifdef CONFIG_ARCH_OMAP2
--static struct resource omap2_aes_resources[] = {
--	{
--		.start	= OMAP24XX_SEC_AES_BASE,
--		.end	= OMAP24XX_SEC_AES_BASE + 0x4C,
--		.flags	= IORESOURCE_MEM,
--	},
--	{
--		.start	= OMAP24XX_DMA_AES_TX,
--		.flags	= IORESOURCE_DMA,
--	},
--	{
--		.start	= OMAP24XX_DMA_AES_RX,
--		.flags	= IORESOURCE_DMA,
--	}
--};
--static int omap2_aes_resources_sz = ARRAY_SIZE(omap2_aes_resources);
--#else
--#define omap2_aes_resources		NULL
--#define omap2_aes_resources_sz		0
--#endif
--
- #ifdef CONFIG_ARCH_OMAP3
- static struct resource omap3_aes_resources[] = {
- 	{
-@@ -545,16 +523,24 @@ static struct platform_device aes_device = {
- static void omap_init_aes(void)
- {
- 	if (cpu_is_omap24xx()) {
--		aes_device.resource = omap2_aes_resources;
--		aes_device.num_resources = omap2_aes_resources_sz;
-+		struct omap_hwmod *oh;
-+		struct platform_device *pdev;
-+
-+		oh = omap_hwmod_lookup("aes");
-+		if (!oh)
-+			return;
-+
-+		pdev = omap_device_build("omap-aes", -1, oh, NULL, 0, NULL,
-+					 0, 0);
-+		WARN(IS_ERR(pdev), "Can't build omap_device for omap-aes\n");
- 	} else if (cpu_is_omap34xx()) {
- 		aes_device.resource = omap3_aes_resources;
- 		aes_device.num_resources = omap3_aes_resources_sz;
-+		platform_device_register(&aes_device);
- 	} else {
- 		pr_err("%s: platform not supported\n", __func__);
- 		return;
- 	}
--	platform_device_register(&aes_device);
- }
- 
- #else
-diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
-index b718167..2a73d4b 100644
---- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
-@@ -606,6 +606,7 @@ static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = {
- 	&omap2420_l4_core__msdi1,
- 	&omap2xxx_l4_core__rng,
- 	&omap2xxx_l4_core__sham,
-+	&omap2xxx_l4_core__aes,
- 	&omap2420_l4_core__hdq1w,
- 	&omap2420_l4_wkup__counter_32k,
- 	&omap2420_l3__gpmc,
-diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
-index 3c19b08..4ce999e 100644
---- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
-@@ -964,6 +964,7 @@ static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
- 	&omap2430_l4_core__hdq1w,
- 	&omap2xxx_l4_core__rng,
- 	&omap2xxx_l4_core__sham,
-+	&omap2xxx_l4_core__aes,
- 	&omap2430_l4_wkup__counter_32k,
- 	&omap2430_l3__gpmc,
- 	NULL,
-diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
-index 510f584..8d4d53d 100644
---- a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
-@@ -147,6 +147,15 @@ struct omap_hwmod_addr_space omap2xxx_sham_addrs[] = {
- 	{ }
- };
- 
-+struct omap_hwmod_addr_space omap2xxx_aes_addrs[] = {
-+	{
-+		.pa_start	= 0x480a6000,
-+		.pa_end		= 0x480a6000 + 0x50 - 1,
-+		.flags		= ADDR_TYPE_RT
-+	},
-+	{ }
-+};
-+
- /*
-  * Common interconnect data
-  */
-@@ -407,3 +416,12 @@ struct omap_hwmod_ocp_if omap2xxx_l4_core__sham = {
- 	.addr		= omap2xxx_sham_addrs,
- 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
- };
-+
-+/* l4 core -> aes interface */
-+struct omap_hwmod_ocp_if omap2xxx_l4_core__aes = {
-+	.master		= &omap2xxx_l4_core_hwmod,
-+	.slave		= &omap2xxx_aes_hwmod,
-+	.clk		= "aes_ick",
-+	.addr		= omap2xxx_aes_addrs,
-+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
-+};
-diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
-index ab3305b..da5b790 100644
---- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
-@@ -907,3 +907,41 @@ struct omap_hwmod omap2xxx_sham_hwmod = {
- 	},
- 	.class		= &omap2xxx_sham_class,
- };
-+
-+/* AES */
-+
-+static struct omap_hwmod_class_sysconfig omap2_aes_sysc = {
-+	.rev_offs	= 0x44,
-+	.sysc_offs	= 0x48,
-+	.syss_offs	= 0x4c,
-+	.sysc_flags	= (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
-+			   SYSS_HAS_RESET_STATUS),
-+	.sysc_fields	= &omap_hwmod_sysc_type1,
-+};
-+
-+static struct omap_hwmod_class omap2xxx_aes_class = {
-+	.name	= "aes",
-+	.sysc	= &omap2_aes_sysc,
-+};
-+
-+struct omap_hwmod_dma_info omap2_aes_sdma_chs[] = {
-+	{ .name = "tx", .dma_req = 9 },
-+	{ .name = "rx", .dma_req = 10 },
-+	{ .dma_req = -1 }
-+};
-+
-+struct omap_hwmod omap2xxx_aes_hwmod = {
-+	.name		= "aes",
-+	.sdma_reqs	= omap2_aes_sdma_chs,
-+	.main_clk	= "l4_ck",
-+	.prcm		= {
-+		.omap2 = {
-+			.module_offs = CORE_MOD,
-+			.prcm_reg_id = 4,
-+			.module_bit = OMAP24XX_EN_AES_SHIFT,
-+			.idlest_reg_id = 4,
-+			.idlest_idle_bit = OMAP24XX_ST_AES_SHIFT,
-+		},
-+	},
-+	.class		= &omap2xxx_aes_class,
-+};
-diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h
-index 928acd5..6e04ff7 100644
---- a/arch/arm/mach-omap2/omap_hwmod_common_data.h
-+++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h
-@@ -79,6 +79,7 @@ extern struct omap_hwmod omap2xxx_counter_32k_hwmod;
- extern struct omap_hwmod omap2xxx_gpmc_hwmod;
- extern struct omap_hwmod omap2xxx_rng_hwmod;
- extern struct omap_hwmod omap2xxx_sham_hwmod;
-+extern struct omap_hwmod omap2xxx_aes_hwmod;
- 
- /* Common interface data across OMAP2xxx */
- extern struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core;
-@@ -107,6 +108,7 @@ extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_rfbi;
- extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_venc;
- extern struct omap_hwmod_ocp_if omap2xxx_l4_core__rng;
- extern struct omap_hwmod_ocp_if omap2xxx_l4_core__sham;
-+extern struct omap_hwmod_ocp_if omap2xxx_l4_core__aes;
- 
- /* Common IP block data */
- extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[];
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0010-ARM-OMAP3xxx-hwmod-Convert-AES-crypto-device-data-to.patch b/patches/crypto/0010-ARM-OMAP3xxx-hwmod-Convert-AES-crypto-device-data-to.patch
deleted file mode 100644
index e2b3fe5753c796a27bae1ea861aa5514b1682906..0000000000000000000000000000000000000000
--- a/patches/crypto/0010-ARM-OMAP3xxx-hwmod-Convert-AES-crypto-device-data-to.patch
+++ /dev/null
@@ -1,180 +0,0 @@
-From 7f86c27633edeef309868df9490e005e6a309e60 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Sun, 11 Nov 2012 19:08:24 -0700
-Subject: [PATCH 10/34] ARM: OMAP3xxx: hwmod: Convert AES crypto device data
- to hwmod
-
-Convert the device data for the OMAP3 AES crypto IP
-from explicit platform_data to hwmod.
-
-CC: Paul Walmsley <paul@pwsan.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- arch/arm/mach-omap2/cclock3xxx_data.c      |    3 +-
- arch/arm/mach-omap2/devices.c              |   42 +------------------
- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |   62 ++++++++++++++++++++++++++++
- 3 files changed, 66 insertions(+), 41 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/cclock3xxx_data.c b/arch/arm/mach-omap2/cclock3xxx_data.c
-index 2853d72..6cbd801 100644
---- a/arch/arm/mach-omap2/cclock3xxx_data.c
-+++ b/arch/arm/mach-omap2/cclock3xxx_data.c
-@@ -3334,7 +3334,8 @@ static struct omap_clk omap3xxx_clks[] = {
- 	CLK("omap_hsmmc.2",	"ick",	&mmchs3_ick,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
- 	CLK(NULL,	"mmchs3_ick",	&mmchs3_ick,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
- 	CLK(NULL,	"icr_ick",	&icr_ick,	CK_34XX | CK_36XX),
--	CLK("omap-aes",	"ick",	&aes2_ick,	CK_34XX | CK_36XX),
-+	CLK("omap-aes",	"ick",		&aes2_ick,	CK_34XX | CK_36XX),
-+	CLK(NULL,	"aes2_ick",	&aes2_ick,	CK_34XX | CK_36XX),
- 	CLK("omap-sham",	"ick",	&sha12_ick,	CK_34XX | CK_36XX),
- 	CLK(NULL,	"sha12_ick",	&sha12_ick,	CK_34XX | CK_36XX),
- 	CLK(NULL,	"des2_ick",	&des2_ick,	CK_34XX | CK_36XX),
-diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
-index 232f331..7caf315 100644
---- a/arch/arm/mach-omap2/devices.c
-+++ b/arch/arm/mach-omap2/devices.c
-@@ -491,38 +491,9 @@ static void __init omap_init_sham(void)
- 	WARN(IS_ERR(pdev), "Can't build omap_device for omap-sham\n");
- }
- 
--#if defined(CONFIG_CRYPTO_DEV_OMAP_AES) || defined(CONFIG_CRYPTO_DEV_OMAP_AES_MODULE)
--
--#ifdef CONFIG_ARCH_OMAP3
--static struct resource omap3_aes_resources[] = {
--	{
--		.start	= OMAP34XX_SEC_AES_BASE,
--		.end	= OMAP34XX_SEC_AES_BASE + 0x4C,
--		.flags	= IORESOURCE_MEM,
--	},
--	{
--		.start	= OMAP34XX_DMA_AES2_TX,
--		.flags	= IORESOURCE_DMA,
--	},
--	{
--		.start	= OMAP34XX_DMA_AES2_RX,
--		.flags	= IORESOURCE_DMA,
--	}
--};
--static int omap3_aes_resources_sz = ARRAY_SIZE(omap3_aes_resources);
--#else
--#define omap3_aes_resources		NULL
--#define omap3_aes_resources_sz		0
--#endif
--
--static struct platform_device aes_device = {
--	.name		= "omap-aes",
--	.id		= -1,
--};
--
--static void omap_init_aes(void)
-+static void __init omap_init_aes(void)
- {
--	if (cpu_is_omap24xx()) {
-+	if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
- 		struct omap_hwmod *oh;
- 		struct platform_device *pdev;
- 
-@@ -533,20 +504,11 @@ static void omap_init_aes(void)
- 		pdev = omap_device_build("omap-aes", -1, oh, NULL, 0, NULL,
- 					 0, 0);
- 		WARN(IS_ERR(pdev), "Can't build omap_device for omap-aes\n");
--	} else if (cpu_is_omap34xx()) {
--		aes_device.resource = omap3_aes_resources;
--		aes_device.num_resources = omap3_aes_resources_sz;
--		platform_device_register(&aes_device);
- 	} else {
- 		pr_err("%s: platform not supported\n", __func__);
--		return;
- 	}
- }
- 
--#else
--static inline void omap_init_aes(void) { }
--#endif
--
- /*-------------------------------------------------------------------------*/
- 
- #if defined(CONFIG_VIDEO_OMAP2_VOUT) || \
-diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
-index 122b4dc..85d1b08 100644
---- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
-@@ -3605,6 +3605,67 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__sham = {
- 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
- };
- 
-+/* l4_core -> AES */
-+static struct omap_hwmod_sysc_fields omap3xxx_aes_sysc_fields = {
-+	.sidle_shift	= 6,
-+	.srst_shift	= 1,
-+	.autoidle_shift	= 0,
-+};
-+
-+static struct omap_hwmod_class_sysconfig omap3_aes_sysc = {
-+	.rev_offs	= 0x44,
-+	.sysc_offs	= 0x48,
-+	.syss_offs	= 0x4c,
-+	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-+			   SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
-+	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-+	.sysc_fields	= &omap3xxx_aes_sysc_fields,
-+};
-+
-+static struct omap_hwmod_class omap3xxx_aes_class = {
-+	.name	= "aes",
-+	.sysc	= &omap3_aes_sysc,
-+};
-+
-+struct omap_hwmod_dma_info omap3_aes_sdma_reqs[] = {
-+	{ .name = "tx", .dma_req = OMAP34XX_DMA_AES2_TX, },
-+	{ .name = "rx", .dma_req = OMAP34XX_DMA_AES2_RX, },
-+	{ .dma_req = -1 }
-+};
-+
-+struct omap_hwmod omap3xxx_aes_hwmod = {
-+	.name		= "aes",
-+	.sdma_reqs	= omap3_aes_sdma_reqs,
-+	.main_clk	= "aes2_ick",
-+	.prcm		= {
-+		.omap2 = {
-+			.module_offs = CORE_MOD,
-+			.prcm_reg_id = 1,
-+			.module_bit = OMAP3430_EN_AES2_SHIFT,
-+			.idlest_reg_id = 1,
-+			.idlest_idle_bit = OMAP3430_ST_AES2_SHIFT,
-+		},
-+	},
-+	.class		= &omap3xxx_aes_class,
-+};
-+
-+static struct omap_hwmod_addr_space omap3xxx_aes_addrs[] = {
-+	{
-+		.pa_start	= 0x480c5000,
-+		.pa_end		= 0x480c5000 + 0x50 - 1,
-+		.flags		= ADDR_TYPE_RT
-+	},
-+	{ }
-+};
-+
-+static struct omap_hwmod_ocp_if omap3xxx_l4_core__aes = {
-+	.master		= &omap3xxx_l4_core_hwmod,
-+	.slave		= &omap3xxx_aes_hwmod,
-+	.clk		= "aes2_ick",
-+	.addr		= omap3xxx_aes_addrs,
-+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
-+};
-+
- static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
- 	&omap3xxx_l3_main__l4_core,
- 	&omap3xxx_l3_main__l4_per,
-@@ -3659,6 +3720,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
- static struct omap_hwmod_ocp_if *omap3xxx_gp_hwmod_ocp_ifs[] __initdata = {
- 	&omap3xxx_l4_sec__timer12,
- 	&omap3xxx_l4_core__sham,
-+	&omap3xxx_l4_core__aes,
- 	NULL
- };
- 
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0011-ARM-OMAP2-Remove-unnecessary-message-when-no-AES-IP-.patch b/patches/crypto/0011-ARM-OMAP2-Remove-unnecessary-message-when-no-AES-IP-.patch
deleted file mode 100644
index 3081c57a9342ba8c29f39a36cc9d539e37d9905d..0000000000000000000000000000000000000000
--- a/patches/crypto/0011-ARM-OMAP2-Remove-unnecessary-message-when-no-AES-IP-.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 90d435d50d5fa6bf83a61ae5a30f0ebfadc508da Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Sun, 11 Nov 2012 19:56:28 -0700
-Subject: [PATCH 11/34] ARM: OMAP2+: Remove unnecessary message when no AES IP
- is present
-
-Remove the error message that prints when there is no AES IP
-present to make it consistent with all the other IPs.
-
-CC: Paul Walmsley <paul@pwsan.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- arch/arm/mach-omap2/devices.c |   23 +++++++++--------------
- 1 files changed, 9 insertions(+), 14 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
-index 7caf315..45dc6c8 100644
---- a/arch/arm/mach-omap2/devices.c
-+++ b/arch/arm/mach-omap2/devices.c
-@@ -493,20 +493,15 @@ static void __init omap_init_sham(void)
- 
- static void __init omap_init_aes(void)
- {
--	if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
--		struct omap_hwmod *oh;
--		struct platform_device *pdev;
--
--		oh = omap_hwmod_lookup("aes");
--		if (!oh)
--			return;
--
--		pdev = omap_device_build("omap-aes", -1, oh, NULL, 0, NULL,
--					 0, 0);
--		WARN(IS_ERR(pdev), "Can't build omap_device for omap-aes\n");
--	} else {
--		pr_err("%s: platform not supported\n", __func__);
--	}
-+	struct omap_hwmod *oh;
-+	struct platform_device *pdev;
-+
-+	oh = omap_hwmod_lookup("aes");
-+	if (!oh)
-+		return;
-+
-+	pdev = omap_device_build("omap-aes", -1, oh, NULL, 0, NULL, 0, 0);
-+	WARN(IS_ERR(pdev), "Can't build omap_device for omap-aes\n");
- }
- 
- /*-------------------------------------------------------------------------*/
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0012-ARM-OMAP2-Only-manually-add-hwmod-data-when-DT-not-u.patch b/patches/crypto/0012-ARM-OMAP2-Only-manually-add-hwmod-data-when-DT-not-u.patch
deleted file mode 100644
index b4cf41e13cf9d5314e7b8736f5817d9fc3423caa..0000000000000000000000000000000000000000
--- a/patches/crypto/0012-ARM-OMAP2-Only-manually-add-hwmod-data-when-DT-not-u.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 68efda31c17864635b037e0ade80e0a88da37740 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Wed, 19 Dec 2012 20:53:38 -0700
-Subject: [PATCH 12/34] ARM: OMAP2+: Only manually add hwmod data when DT not
- used.
-
-The omap_init_aes() routine in devices.c only needs to be
-called when there is no device tree present.
-
-CC: Paul Walmsley <paul@pwsan.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- arch/arm/mach-omap2/devices.c |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
-index 45dc6c8..7b94bda 100644
---- a/arch/arm/mach-omap2/devices.c
-+++ b/arch/arm/mach-omap2/devices.c
-@@ -630,10 +630,10 @@ static int __init omap2_init_devices(void)
- 		omap_init_mcpdm();
- 		omap_init_mcspi();
- 		omap_init_sham();
-+		omap_init_aes();
- 	}
- 	omap_init_sti();
- 	omap_init_rng();
--	omap_init_aes();
- 	omap_init_vout();
- 	omap_init_ocp2scp();
- 	if (soc_is_am33xx()) {
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0013-ARM-AM33XX-Add-aes0-crypto-clock-data.patch b/patches/crypto/0013-ARM-AM33XX-Add-aes0-crypto-clock-data.patch
deleted file mode 100644
index 09758615b44722421d2025795f90207936600b0b..0000000000000000000000000000000000000000
--- a/patches/crypto/0013-ARM-AM33XX-Add-aes0-crypto-clock-data.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From e3839f7ae06fd7615e787b208ee44424dca69dc1 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Wed, 19 Dec 2012 21:05:46 -0700
-Subject: [PATCH 13/34] ARM: AM33XX: Add aes0 crypto clock data
-
-Add clock data for for the SHA0 crypto module
-on the am33xx SoC.
-
-CC: Paul Walmsley <paul@pwsan.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- arch/arm/mach-omap2/cclock33xx_data.c |    5 +++++
- 1 files changed, 5 insertions(+), 0 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
-index 9b76049..70b600d 100644
---- a/arch/arm/mach-omap2/cclock33xx_data.c
-+++ b/arch/arm/mach-omap2/cclock33xx_data.c
-@@ -416,6 +416,10 @@ static struct clk sha0_fck;
- DEFINE_STRUCT_CLK_HW_OMAP(sha0_fck, NULL);
- DEFINE_STRUCT_CLK(sha0_fck, dpll_core_ck_parents, clk_ops_null);
- 
-+static struct clk aes0_fck;
-+DEFINE_STRUCT_CLK_HW_OMAP(aes0_fck, NULL);
-+DEFINE_STRUCT_CLK(aes0_fck, dpll_core_ck_parents, clk_ops_null);
-+
- /*
-  * Modules clock nodes
-  *
-@@ -881,6 +885,7 @@ static struct omap_clk am33xx_clks[] = {
- 	CLK(NULL,	"smartreflex0_fck",	&smartreflex0_fck,	CK_AM33XX),
- 	CLK(NULL,	"smartreflex1_fck",	&smartreflex1_fck,	CK_AM33XX),
- 	CLK(NULL,	"sha0_fck",		&sha0_fck,	CK_AM33XX),
-+	CLK(NULL,	"aes0_fck",		&aes0_fck,	CK_AM33XX),
- 	CLK(NULL,	"timer1_fck",		&timer1_fck,	CK_AM33XX),
- 	CLK(NULL,	"timer2_fck",		&timer2_fck,	CK_AM33XX),
- 	CLK(NULL,	"timer3_fck",		&timer3_fck,	CK_AM33XX),
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0014-ARM-AM33XX-hwmod-Update-and-uncomment-AES0-module-da.patch b/patches/crypto/0014-ARM-AM33XX-hwmod-Update-and-uncomment-AES0-module-da.patch
deleted file mode 100644
index 3c33a7912c8f3555ed69dae3ab167e99508ff527..0000000000000000000000000000000000000000
--- a/patches/crypto/0014-ARM-AM33XX-hwmod-Update-and-uncomment-AES0-module-da.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From 236e3838f73077da9784a337c6aeb78a40e49490 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Wed, 19 Dec 2012 21:17:07 -0700
-Subject: [PATCH 14/34] ARM: AM33XX: hwmod: Update and uncomment AES0 module
- data
-
-Update the AES0 HIB2 module's hwmod data for the am33xx SoC.
-Also, remove it from the '#if 0' block that its currently
-inside so the data is actually available for use.
-
-CC: Paul Walmsley <paul@pwsan.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- arch/arm/mach-omap2/omap_hwmod_33xx_data.c |   51 +++++++++++++++++++++++-----
- 1 files changed, 42 insertions(+), 9 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
-index cea1fc7..3497086 100644
---- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
-@@ -416,7 +416,6 @@ static struct omap_hwmod am33xx_adc_tsc_hwmod = {
-  *    - debugss
-  *    - ocmc ram
-  *    - ocp watch point
-- *    - aes0
-  */
- #if 0
- /*
-@@ -516,25 +515,41 @@ static struct omap_hwmod am33xx_ocpwp_hwmod = {
- 		},
- 	},
- };
-+#endif
- 
- /*
-- * 'aes' class
-+ * 'aes0' class
-  */
--static struct omap_hwmod_class am33xx_aes_hwmod_class = {
--	.name		= "aes",
-+static struct omap_hwmod_class_sysconfig am33xx_aes0_sysc = {
-+	.rev_offs	= 0x80,
-+	.sysc_offs	= 0x84,
-+	.syss_offs	= 0x88,
-+	.sysc_flags	= SYSS_HAS_RESET_STATUS,
-+};
-+
-+static struct omap_hwmod_class am33xx_aes0_hwmod_class = {
-+	.name		= "aes0",
-+	.sysc		= &am33xx_aes0_sysc,
- };
- 
- static struct omap_hwmod_irq_info am33xx_aes0_irqs[] = {
--	{ .irq = 102 + OMAP_INTC_START, },
-+	{ .irq = 103 + OMAP_INTC_START, },
- 	{ .irq = -1 },
- };
- 
-+struct omap_hwmod_dma_info am33xx_aes0_edma_reqs[] = {
-+	{ .name = "tx", .dma_req = 6, },
-+	{ .name = "rx", .dma_req = 5, },
-+	{ .dma_req = -1 }
-+};
-+
- static struct omap_hwmod am33xx_aes0_hwmod = {
--	.name		= "aes0",
--	.class		= &am33xx_aes_hwmod_class,
-+	.name		= "aes",
-+	.class		= &am33xx_aes0_hwmod_class,
- 	.clkdm_name	= "l3_clkdm",
- 	.mpu_irqs	= am33xx_aes0_irqs,
--	.main_clk	= "l3_gclk",
-+	.sdma_reqs	= am33xx_aes0_edma_reqs,
-+	.main_clk	= "aes0_fck",
- 	.prcm		= {
- 		.omap4	= {
- 			.clkctrl_offs	= AM33XX_CM_PER_AES0_CLKCTRL_OFFSET,
-@@ -542,7 +557,6 @@ static struct omap_hwmod am33xx_aes0_hwmod = {
- 		},
- 	},
- };
--#endif
- 
- /* sha0 HIB2 (the 'P' (public) device) */
- static struct omap_hwmod_class_sysconfig am33xx_sha0_sysc = {
-@@ -3358,6 +3372,24 @@ static struct omap_hwmod_ocp_if am33xx_l3_main__sha0 = {
- 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
- };
- 
-+/* l3 main -> AES0 HIB2 */
-+static struct omap_hwmod_addr_space am33xx_aes0_addrs[] = {
-+	{
-+		.pa_start	= 0x53500000,
-+		.pa_end		= 0x53500000 + SZ_1M - 1,
-+		.flags		= ADDR_TYPE_RT
-+	},
-+	{ }
-+};
-+
-+static struct omap_hwmod_ocp_if am33xx_l3_main__aes0 = {
-+	.master		= &am33xx_l3_main_hwmod,
-+	.slave		= &am33xx_aes0_hwmod,
-+	.clk		= "aes0_fck",
-+	.addr		= am33xx_aes0_addrs,
-+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
-+};
-+
- static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
- 	&am33xx_l4_fw__emif_fw,
- 	&am33xx_l3_main__emif,
-@@ -3432,6 +3464,7 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
- 	&am33xx_l4_hs__cpgmac0,
- 	&am33xx_cpgmac0__mdio,
- 	&am33xx_l3_main__sha0,
-+	&am33xx_l3_main__aes0,
- 	NULL,
- };
- 
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0015-ARM-dts-Add-AES-data-and-documentation-for-AM33XX.patch b/patches/crypto/0015-ARM-dts-Add-AES-data-and-documentation-for-AM33XX.patch
deleted file mode 100644
index ab26382b301d162dfe45a631e835174b789aee25..0000000000000000000000000000000000000000
--- a/patches/crypto/0015-ARM-dts-Add-AES-data-and-documentation-for-AM33XX.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From 377311d5d3471a9c8866401579b48588dba41cd3 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Thu, 20 Dec 2012 09:46:13 -0700
-Subject: [PATCH 15/34] ARM: dts: Add AES data and documentation for AM33XX
-
-Add the generic AM33XX AES module's device tree data and
-enable it for the am335x-evm, am335x-evmsk, and am335x-bone
-platforms.  Also add Documentation file describing the data
-for the AES module.
-
-CC: Paul Walmsley <paul@pwsan.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- .../devicetree/bindings/crypto/omap-aes.txt        |   37 ++++++++++++++++++++
- arch/arm/boot/dts/am335x-bone.dts                  |    4 +++
- arch/arm/boot/dts/am335x-evm.dts                   |    4 +++
- arch/arm/boot/dts/am335x-evmsk.dts                 |    4 +++
- arch/arm/boot/dts/am33xx.dtsi                      |   13 +++++++
- 5 files changed, 62 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/crypto/omap-aes.txt
-
-diff --git a/Documentation/devicetree/bindings/crypto/omap-aes.txt b/Documentation/devicetree/bindings/crypto/omap-aes.txt
-new file mode 100644
-index 0000000..6b21256
---- /dev/null
-+++ b/Documentation/devicetree/bindings/crypto/omap-aes.txt
-@@ -0,0 +1,37 @@
-+OMAP SoC AES crypto Module
-+
-+Required properties:
-+
-+- compatible : Should contain entries for this and backward compatible
-+  AES versions:
-+  - "ti,omap2-aes" for OMAP2.
-+  - "ti,omap3-aes" for OMAP3.
-+  - "ti,omap4-aes" for OMAP4 and AM33XX.
-+  Note that the OMAP2 and 3 versions are compatible (OMAP3 supports
-+  more algorithms) but they are incompatible with OMAP4.
-+- ti,hwmods: Name of the hwmod associated with the AES odule
-+- reg : Offset and length of the register set for the module
-+- interrupt-parent : the phandle for the interrupt controller that
-+  services interrupts for this module.
-+- interrupts : the interrupt number for the AES odule.
-+
-+Optional properties:
-+- dmas: DMA controller phandle and DMA request ordered pairs.
-+- dma-names: DMA request names. This string corresponds 1:1 with
-+	the ordered pairs in dmas. The string naming is to be
-+	"tx" for TX request and "rx" for RX request.
-+
-+Example:
-+	/* AM335x */
-+	aes: aes@53500000 {
-+		compatible = "ti,omap4-aes";
-+		ti,hwmods = "aes";
-+		#address-cells = <1>;
-+		#size-cells = <0>;
-+		reg = <0x53500000 0xa0>;
-+		interrupt-parent = <&intc>;
-+		interrupts = <102>;
-+		dmas = <&edma 6
-+			&edma 5>;
-+		dma-names = "tx", "rx";
-+	};
-diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
-index af0a16d..8e62bd5 100644
---- a/arch/arm/boot/dts/am335x-bone.dts
-+++ b/arch/arm/boot/dts/am335x-bone.dts
-@@ -285,3 +285,7 @@
- &sham {
- 	status = "okay";
- };
-+
-+&aes {
-+	status = "okay";
-+};
-diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
-index b8cb5be..d562b33 100644
---- a/arch/arm/boot/dts/am335x-evm.dts
-+++ b/arch/arm/boot/dts/am335x-evm.dts
-@@ -362,3 +362,7 @@
- &sham {
- 	status = "okay";
- };
-+
-+&aes {
-+	status = "okay";
-+};
-diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
-index a7e1659..5aa07e7 100644
---- a/arch/arm/boot/dts/am335x-evmsk.dts
-+++ b/arch/arm/boot/dts/am335x-evmsk.dts
-@@ -335,3 +335,7 @@
- &sham {
- 	status = "okay";
- };
-+
-+&aes {
-+	status = "okay";
-+};
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index fa94f6e..6dcd42a 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -562,5 +562,18 @@
- 			dmas = <&edma 36>;
- 			dma-names = "rx";
- 		};
-+
-+		aes: aes@53500000 {
-+			compatible = "ti,omap4-aes";
-+			ti,hwmods = "aes";
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			reg = <0x53500000 0xa0>;
-+			interrupt-parent = <&intc>;
-+			interrupts = <102>;
-+			dmas = <&edma 6
-+				&edma 5>;
-+			dma-names = "tx", "rx";
-+		};
- 	};
- };
--- 
-1.7.10.4
-
diff --git a/patches/crypto/0016-crypto-omap-sham-Remove-unnecessary-pr_info-noise.patch b/patches/crypto/0016-crypto-omap-sham-Remove-unnecessary-pr_info-noise.patch
deleted file mode 100644
index 6b1ffb2f067a3efec45267182735a7e4b8a63c11..0000000000000000000000000000000000000000
--- a/patches/crypto/0016-crypto-omap-sham-Remove-unnecessary-pr_info-noise.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 6a2b7da0ba0892a80f2a7c3eb4abc0e9409d229f Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Mon, 17 Dec 2012 11:21:46 -0700
-Subject: [PATCH 16/34] crypto: omap-sham - Remove unnecessary pr_info noise
-
-Remove the unnecessary pr_info() call in omap_sham_mod_init().
-
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-sham.c |    2 --
- 1 files changed, 0 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
-index 90d34ad..344f713 100644
---- a/drivers/crypto/omap-sham.c
-+++ b/drivers/crypto/omap-sham.c
-@@ -1286,8 +1286,6 @@ static struct platform_driver omap_sham_driver = {
- 
- static int __init omap_sham_mod_init(void)
- {
--	pr_info("loading %s driver\n", "omap-sham");
--
- 	return platform_driver_register(&omap_sham_driver);
- }
- 
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0017-crypto-omap-sham-Convert-to-use-pm_runtime-API.patch b/patches/crypto/0017-crypto-omap-sham-Convert-to-use-pm_runtime-API.patch
deleted file mode 100644
index c45b2c6ac30ba7854e11bcadafb5b05bb1795aba..0000000000000000000000000000000000000000
--- a/patches/crypto/0017-crypto-omap-sham-Convert-to-use-pm_runtime-API.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From 54a5ef46fe896933c67c2f19674b281a1fdf62fa Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Wed, 10 Oct 2012 10:12:13 -0700
-Subject: [PATCH 17/34] crypto: omap-sham - Convert to use pm_runtime API
-
-Convert the omap-sham crypto driver to use the
-pm_runtime API instead of the clk API.
-
-CC: Kevin Hilman <khilman@deeprootsystems.com>
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-sham.c |   28 +++++++++++-----------------
- 1 files changed, 11 insertions(+), 17 deletions(-)
-
-diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
-index 344f713..4a228c5 100644
---- a/drivers/crypto/omap-sham.c
-+++ b/drivers/crypto/omap-sham.c
-@@ -22,12 +22,12 @@
- #include <linux/errno.h>
- #include <linux/interrupt.h>
- #include <linux/kernel.h>
--#include <linux/clk.h>
- #include <linux/irq.h>
- #include <linux/io.h>
- #include <linux/platform_device.h>
- #include <linux/scatterlist.h>
- #include <linux/dma-mapping.h>
-+#include <linux/pm_runtime.h>
- #include <linux/delay.h>
- #include <linux/crypto.h>
- #include <linux/cryptohash.h>
-@@ -140,7 +140,6 @@ struct omap_sham_dev {
- 	struct device		*dev;
- 	void __iomem		*io_base;
- 	int			irq;
--	struct clk		*iclk;
- 	spinlock_t		lock;
- 	int			err;
- 	int			dma;
-@@ -237,7 +236,7 @@ static void omap_sham_copy_ready_hash(struct ahash_request *req)
- 
- static int omap_sham_hw_init(struct omap_sham_dev *dd)
- {
--	clk_enable(dd->iclk);
-+	pm_runtime_get_sync(dd->dev);
- 
- 	if (!test_bit(FLAGS_INIT, &dd->flags)) {
- 		omap_sham_write_mask(dd, SHA_REG_MASK,
-@@ -652,7 +651,8 @@ static void omap_sham_finish_req(struct ahash_request *req, int err)
- 	/* atomic operation is not needed here */
- 	dd->flags &= ~(BIT(FLAGS_BUSY) | BIT(FLAGS_FINAL) | BIT(FLAGS_CPU) |
- 			BIT(FLAGS_DMA_READY) | BIT(FLAGS_OUTPUT_READY));
--	clk_disable(dd->iclk);
-+
-+	pm_runtime_put_sync(dd->dev);
- 
- 	if (req->base.complete)
- 		req->base.complete(&req->base, err);
-@@ -1197,14 +1197,6 @@ static int omap_sham_probe(struct platform_device *pdev)
- 	if (err)
- 		goto dma_err;
- 
--	/* Initializing the clock */
--	dd->iclk = clk_get(dev, "ick");
--	if (IS_ERR(dd->iclk)) {
--		dev_err(dev, "clock intialization failed.\n");
--		err = PTR_ERR(dd->iclk);
--		goto clk_err;
--	}
--
- 	dd->io_base = ioremap(dd->phys_base, SZ_4K);
- 	if (!dd->io_base) {
- 		dev_err(dev, "can't ioremap\n");
-@@ -1212,11 +1204,14 @@ static int omap_sham_probe(struct platform_device *pdev)
- 		goto io_err;
- 	}
- 
--	clk_enable(dd->iclk);
-+	pm_runtime_enable(dev);
-+	pm_runtime_get_sync(dev);
-+
- 	dev_info(dev, "hw accel on OMAP rev %u.%u\n",
- 		(omap_sham_read(dd, SHA_REG_REV) & SHA_REG_REV_MAJOR) >> 4,
- 		omap_sham_read(dd, SHA_REG_REV) & SHA_REG_REV_MINOR);
--	clk_disable(dd->iclk);
-+
-+	pm_runtime_put_sync(&pdev->dev);
- 
- 	spin_lock(&sham.lock);
- 	list_add_tail(&dd->list, &sham.dev_list);
-@@ -1234,9 +1229,8 @@ err_algs:
- 	for (j = 0; j < i; j++)
- 		crypto_unregister_ahash(&algs[j]);
- 	iounmap(dd->io_base);
-+	pm_runtime_disable(dev);
- io_err:
--	clk_put(dd->iclk);
--clk_err:
- 	omap_sham_dma_cleanup(dd);
- dma_err:
- 	if (dd->irq >= 0)
-@@ -1265,7 +1259,7 @@ static int omap_sham_remove(struct platform_device *pdev)
- 		crypto_unregister_ahash(&algs[i]);
- 	tasklet_kill(&dd->done_task);
- 	iounmap(dd->io_base);
--	clk_put(dd->iclk);
-+	pm_runtime_disable(&pdev->dev);
- 	omap_sham_dma_cleanup(dd);
- 	if (dd->irq >= 0)
- 		free_irq(dd->irq, dd);
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0018-crypto-omap-sham-Add-suspend-resume-support.patch b/patches/crypto/0018-crypto-omap-sham-Add-suspend-resume-support.patch
deleted file mode 100644
index 31a92091d16400e6e1aa67865d39730090eca170..0000000000000000000000000000000000000000
--- a/patches/crypto/0018-crypto-omap-sham-Add-suspend-resume-support.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 849abc62d5a9fe725e60ebc25d79aa627ae18c70 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Fri, 14 Dec 2012 12:50:15 -0700
-Subject: [PATCH 18/34] crypto: omap-sham - Add suspend/resume support
-
-Add suspend/resume support to the OMAP SHAM driver.
-
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-sham.c |   19 +++++++++++++++++++
- 1 files changed, 19 insertions(+), 0 deletions(-)
-
-diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
-index 4a228c5..b7949a0 100644
---- a/drivers/crypto/omap-sham.c
-+++ b/drivers/crypto/omap-sham.c
-@@ -1269,12 +1269,31 @@ static int omap_sham_remove(struct platform_device *pdev)
- 	return 0;
- }
- 
-+#ifdef CONFIG_PM_SLEEP
-+static int omap_sham_suspend(struct device *dev)
-+{
-+	pm_runtime_put_sync(dev);
-+	return 0;
-+}
-+
-+static int omap_sham_resume(struct device *dev)
-+{
-+	pm_runtime_get_sync(dev);
-+	return 0;
-+}
-+#endif
-+
-+static const struct dev_pm_ops omap_sham_pm_ops = {
-+	SET_SYSTEM_SLEEP_PM_OPS(omap_sham_suspend, omap_sham_resume)
-+};
-+
- static struct platform_driver omap_sham_driver = {
- 	.probe	= omap_sham_probe,
- 	.remove	= omap_sham_remove,
- 	.driver	= {
- 		.name	= "omap-sham",
- 		.owner	= THIS_MODULE,
-+		.pm	= &omap_sham_pm_ops,
- 	},
- };
- 
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0019-crypto-omap-sham-Add-code-to-use-dmaengine-API.patch b/patches/crypto/0019-crypto-omap-sham-Add-code-to-use-dmaengine-API.patch
deleted file mode 100644
index 45ce0bdc5971f3380b4ffb15a1b0ef0c918c5210..0000000000000000000000000000000000000000
--- a/patches/crypto/0019-crypto-omap-sham-Add-code-to-use-dmaengine-API.patch
+++ /dev/null
@@ -1,373 +0,0 @@
-From a25eded7f4ac3a312b20c51f501d8957e2540468 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Fri, 12 Oct 2012 11:47:09 -0700
-Subject: [PATCH 19/34] crypto: omap-sham - Add code to use dmaengine API
-
-Add code to use the new dmaengine API alongside
-the existing DMA code that uses the private
-OMAP DMA API.  The API to use is chosen by
-defining or undefining 'OMAP_SHAM_DMA_PRIVATE'.
-
-This is a transitional change and the code that uses
-the private DMA API will be removed in an upcoming
-commit.
-
-CC: Russell King <rmk+kernel@arm.linux.org.uk>
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-sham.c |  154 +++++++++++++++++++++++++++++++++++++++++---
- 1 files changed, 145 insertions(+), 9 deletions(-)
-
-diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
-index b7949a0..57cb76a 100644
---- a/drivers/crypto/omap-sham.c
-+++ b/drivers/crypto/omap-sham.c
-@@ -13,6 +13,8 @@
-  * Some ideas are from old omap-sha1-md5.c driver.
-  */
- 
-+#define OMAP_SHAM_DMA_PRIVATE
-+
- #define pr_fmt(fmt) "%s: " fmt, __func__
- 
- #include <linux/err.h>
-@@ -27,6 +29,8 @@
- #include <linux/platform_device.h>
- #include <linux/scatterlist.h>
- #include <linux/dma-mapping.h>
-+#include <linux/dmaengine.h>
-+#include <linux/omap-dma.h>
- #include <linux/pm_runtime.h>
- #include <linux/delay.h>
- #include <linux/crypto.h>
-@@ -37,15 +41,15 @@
- #include <crypto/hash.h>
- #include <crypto/internal/hash.h>
- 
--#include <linux/omap-dma.h>
--#include <mach/irqs.h>
--
- #define SHA_REG_DIGEST(x)		(0x00 + ((x) * 0x04))
- #define SHA_REG_DIN(x)			(0x1C + ((x) * 0x04))
- 
- #define SHA1_MD5_BLOCK_SIZE		SHA1_BLOCK_SIZE
- #define MD5_DIGEST_SIZE			16
- 
-+#define DST_MAXBURST			16
-+#define DMA_MIN				(DST_MAXBURST * sizeof(u32))
-+
- #define SHA_REG_DIGCNT			0x14
- 
- #define SHA_REG_CTRL			0x18
-@@ -109,6 +113,9 @@ struct omap_sham_reqctx {
- 
- 	/* walk state */
- 	struct scatterlist	*sg;
-+#ifndef OMAP_SHAM_DMA_PRIVATE
-+	struct scatterlist	sgl;
-+#endif
- 	unsigned int		offset;	/* offset in current sg */
- 	unsigned int		total;	/* total request */
- 
-@@ -142,8 +149,12 @@ struct omap_sham_dev {
- 	int			irq;
- 	spinlock_t		lock;
- 	int			err;
-+#ifdef OMAP_SHAM_DMA_PRIVATE
- 	int			dma;
- 	int			dma_lch;
-+#else
-+	struct dma_chan		*dma_lch;
-+#endif
- 	struct tasklet_struct	done_task;
- 
- 	unsigned long		flags;
-@@ -313,15 +324,32 @@ static int omap_sham_xmit_cpu(struct omap_sham_dev *dd, const u8 *buf,
- 	return -EINPROGRESS;
- }
- 
-+#ifndef OMAP_SHAM_DMA_PRIVATE
-+static void omap_sham_dma_callback(void *param)
-+{
-+	struct omap_sham_dev *dd = param;
-+
-+	set_bit(FLAGS_DMA_READY, &dd->flags);
-+	tasklet_schedule(&dd->done_task);
-+}
-+#endif
-+
- static int omap_sham_xmit_dma(struct omap_sham_dev *dd, dma_addr_t dma_addr,
--			      size_t length, int final)
-+			      size_t length, int final, int is_sg)
- {
- 	struct omap_sham_reqctx *ctx = ahash_request_ctx(dd->req);
-+#ifdef OMAP_SHAM_DMA_PRIVATE
- 	int len32;
-+#else
-+	struct dma_async_tx_descriptor *tx;
-+	struct dma_slave_config cfg;
-+	int len32, ret;
-+#endif
- 
- 	dev_dbg(dd->dev, "xmit_dma: digcnt: %d, length: %d, final: %d\n",
- 						ctx->digcnt, length, final);
- 
-+#ifdef OMAP_SHAM_DMA_PRIVATE
- 	len32 = DIV_ROUND_UP(length, sizeof(u32));
- 
- 	omap_set_dma_transfer_params(dd->dma_lch, OMAP_DMA_DATA_TYPE_S32, len32,
-@@ -331,6 +359,50 @@ static int omap_sham_xmit_dma(struct omap_sham_dev *dd, dma_addr_t dma_addr,
- 	omap_set_dma_src_params(dd->dma_lch, 0, OMAP_DMA_AMODE_POST_INC,
- 				dma_addr, 0, 0);
- 
-+#else
-+	memset(&cfg, 0, sizeof(cfg));
-+
-+	cfg.dst_addr = dd->phys_base + SHA_REG_DIN(0);
-+	cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-+	cfg.dst_maxburst = DST_MAXBURST;
-+
-+	ret = dmaengine_slave_config(dd->dma_lch, &cfg);
-+	if (ret) {
-+		pr_err("omap-sham: can't configure dmaengine slave: %d\n", ret);
-+		return ret;
-+	}
-+
-+	len32 = DIV_ROUND_UP(length, DMA_MIN) * DMA_MIN;
-+
-+	if (is_sg) {
-+		/*
-+		 * The SG entry passed in may not have the 'length' member
-+		 * set correctly so use a local SG entry (sgl) with the
-+		 * proper value for 'length' instead.  If this is not done,
-+		 * the dmaengine may try to DMA the incorrect amount of data.
-+		 */
-+		sg_init_table(&ctx->sgl, 1);
-+		ctx->sgl.page_link = ctx->sg->page_link;
-+		ctx->sgl.offset = ctx->sg->offset;
-+		sg_dma_len(&ctx->sgl) = len32;
-+		sg_dma_address(&ctx->sgl) = sg_dma_address(ctx->sg);
-+
-+		tx = dmaengine_prep_slave_sg(dd->dma_lch, &ctx->sgl, 1,
-+			DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-+	} else {
-+		tx = dmaengine_prep_slave_single(dd->dma_lch, dma_addr, len32,
-+			DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-+	}
-+
-+	if (!tx) {
-+		dev_err(dd->dev, "prep_slave_sg/single() failed\n");
-+		return -EINVAL;
-+	}
-+
-+	tx->callback = omap_sham_dma_callback;
-+	tx->callback_param = dd;
-+#endif
-+
- 	omap_sham_write_ctrl(dd, length, final, 1);
- 
- 	ctx->digcnt += length;
-@@ -340,7 +412,12 @@ static int omap_sham_xmit_dma(struct omap_sham_dev *dd, dma_addr_t dma_addr,
- 
- 	set_bit(FLAGS_DMA_ACTIVE, &dd->flags);
- 
-+#ifdef OMAP_SHAM_DMA_PRIVATE
- 	omap_start_dma(dd->dma_lch);
-+#else
-+	dmaengine_submit(tx);
-+	dma_async_issue_pending(dd->dma_lch);
-+#endif
- 
- 	return -EINPROGRESS;
- }
-@@ -387,6 +464,8 @@ static int omap_sham_xmit_dma_map(struct omap_sham_dev *dd,
- 					struct omap_sham_reqctx *ctx,
- 					size_t length, int final)
- {
-+	int ret;
-+
- 	ctx->dma_addr = dma_map_single(dd->dev, ctx->buffer, ctx->buflen,
- 				       DMA_TO_DEVICE);
- 	if (dma_mapping_error(dd->dev, ctx->dma_addr)) {
-@@ -396,8 +475,12 @@ static int omap_sham_xmit_dma_map(struct omap_sham_dev *dd,
- 
- 	ctx->flags &= ~BIT(FLAGS_SG);
- 
--	/* next call does not fail... so no unmap in the case of error */
--	return omap_sham_xmit_dma(dd, ctx->dma_addr, length, final);
-+	ret = omap_sham_xmit_dma(dd, ctx->dma_addr, length, final, 0);
-+	if (ret)
-+		dma_unmap_single(dd->dev, ctx->dma_addr, ctx->buflen,
-+				 DMA_TO_DEVICE);
-+
-+	return ret;
- }
- 
- static int omap_sham_update_dma_slow(struct omap_sham_dev *dd)
-@@ -432,6 +515,7 @@ static int omap_sham_update_dma_start(struct omap_sham_dev *dd)
- 	struct omap_sham_reqctx *ctx = ahash_request_ctx(dd->req);
- 	unsigned int length, final, tail;
- 	struct scatterlist *sg;
-+	int ret;
- 
- 	if (!ctx->total)
- 		return 0;
-@@ -439,6 +523,17 @@ static int omap_sham_update_dma_start(struct omap_sham_dev *dd)
- 	if (ctx->bufcnt || ctx->offset)
- 		return omap_sham_update_dma_slow(dd);
- 
-+#ifndef OMAP_SHAM_DMA_PRIVATE
-+	/*
-+	 * Don't use the sg interface when the transfer size is less
-+	 * than the number of elements in a DMA frame.  Otherwise,
-+	 * the dmaengine infrastructure will calculate that it needs
-+	 * to transfer 0 frames which ultimately fails.
-+	 */
-+	if (ctx->total < (DST_MAXBURST * sizeof(u32)))
-+		return omap_sham_update_dma_slow(dd);
-+#endif
-+
- 	dev_dbg(dd->dev, "fast: digcnt: %d, bufcnt: %u, total: %u\n",
- 			ctx->digcnt, ctx->bufcnt, ctx->total);
- 
-@@ -476,8 +571,11 @@ static int omap_sham_update_dma_start(struct omap_sham_dev *dd)
- 
- 	final = (ctx->flags & BIT(FLAGS_FINUP)) && !ctx->total;
- 
--	/* next call does not fail... so no unmap in the case of error */
--	return omap_sham_xmit_dma(dd, sg_dma_address(ctx->sg), length, final);
-+	ret = omap_sham_xmit_dma(dd, sg_dma_address(ctx->sg), length, final, 1);
-+	if (ret)
-+		dma_unmap_sg(dd->dev, ctx->sg, 1, DMA_TO_DEVICE);
-+
-+	return ret;
- }
- 
- static int omap_sham_update_cpu(struct omap_sham_dev *dd)
-@@ -496,7 +594,12 @@ static int omap_sham_update_dma_stop(struct omap_sham_dev *dd)
- {
- 	struct omap_sham_reqctx *ctx = ahash_request_ctx(dd->req);
- 
-+#ifdef OMAP_SHAM_DMA_PRIVATE
- 	omap_stop_dma(dd->dma_lch);
-+#else
-+	dmaengine_terminate_all(dd->dma_lch);
-+#endif
-+
- 	if (ctx->flags & BIT(FLAGS_SG)) {
- 		dma_unmap_sg(dd->dev, ctx->sg, 1, DMA_TO_DEVICE);
- 		if (ctx->sg->length == ctx->offset) {
-@@ -583,7 +686,7 @@ static int omap_sham_final_req(struct omap_sham_dev *dd)
- 	struct omap_sham_reqctx *ctx = ahash_request_ctx(req);
- 	int err = 0, use_dma = 1;
- 
--	if (ctx->bufcnt <= 64)
-+	if (ctx->bufcnt <= DMA_MIN)
- 		/* faster to handle last block with cpu */
- 		use_dma = 0;
- 
-@@ -699,6 +802,7 @@ static int omap_sham_handle_queue(struct omap_sham_dev *dd,
- 	if (err)
- 		goto err1;
- 
-+#ifdef OMAP_SHAM_DMA_PRIVATE
- 	omap_set_dma_dest_params(dd->dma_lch, 0,
- 			OMAP_DMA_AMODE_CONSTANT,
- 			dd->phys_base + SHA_REG_DIN(0), 0, 16);
-@@ -708,6 +812,7 @@ static int omap_sham_handle_queue(struct omap_sham_dev *dd,
- 
- 	omap_set_dma_src_burst_mode(dd->dma_lch,
- 			OMAP_DMA_DATA_BURST_4);
-+#endif
- 
- 	if (ctx->digcnt)
- 		/* request has changed - restore hash */
-@@ -1099,6 +1204,7 @@ static irqreturn_t omap_sham_irq(int irq, void *dev_id)
- 	return IRQ_HANDLED;
- }
- 
-+#ifdef OMAP_SHAM_DMA_PRIVATE
- static void omap_sham_dma_callback(int lch, u16 ch_status, void *data)
- {
- 	struct omap_sham_dev *dd = data;
-@@ -1136,12 +1242,17 @@ static void omap_sham_dma_cleanup(struct omap_sham_dev *dd)
- 		dd->dma_lch = -1;
- 	}
- }
-+#endif
- 
- static int omap_sham_probe(struct platform_device *pdev)
- {
- 	struct omap_sham_dev *dd;
- 	struct device *dev = &pdev->dev;
- 	struct resource *res;
-+#ifndef OMAP_SHAM_DMA_PRIVATE
-+	dma_cap_mask_t mask;
-+	unsigned dma_chan;
-+#endif
- 	int err, i, j;
- 
- 	dd = kzalloc(sizeof(struct omap_sham_dev), GFP_KERNEL);
-@@ -1176,7 +1287,11 @@ static int omap_sham_probe(struct platform_device *pdev)
- 		err = -ENODEV;
- 		goto res_err;
- 	}
-+#ifdef OMAP_SHAM_DMA_PRIVATE
- 	dd->dma = res->start;
-+#else
-+	dma_chan = res->start;
-+#endif
- 
- 	/* Get the IRQ */
- 	dd->irq = platform_get_irq(pdev,  0);
-@@ -1193,9 +1308,22 @@ static int omap_sham_probe(struct platform_device *pdev)
- 		goto res_err;
- 	}
- 
-+#ifdef OMAP_SHAM_DMA_PRIVATE
- 	err = omap_sham_dma_init(dd);
- 	if (err)
- 		goto dma_err;
-+#else
-+	dma_cap_zero(mask);
-+	dma_cap_set(DMA_SLAVE, mask);
-+
-+	dd->dma_lch = dma_request_channel(mask, omap_dma_filter_fn, &dma_chan);
-+	if (!dd->dma_lch) {
-+		dev_err(dev, "unable to obtain RX DMA engine channel %u\n",
-+			dma_chan);
-+		err = -ENXIO;
-+		goto dma_err;
-+	}
-+#endif
- 
- 	dd->io_base = ioremap(dd->phys_base, SZ_4K);
- 	if (!dd->io_base) {
-@@ -1231,7 +1359,11 @@ err_algs:
- 	iounmap(dd->io_base);
- 	pm_runtime_disable(dev);
- io_err:
-+#ifdef OMAP_SHAM_DMA_PRIVATE
- 	omap_sham_dma_cleanup(dd);
-+#else
-+	dma_release_channel(dd->dma_lch);
-+#endif
- dma_err:
- 	if (dd->irq >= 0)
- 		free_irq(dd->irq, dd);
-@@ -1260,7 +1392,11 @@ static int omap_sham_remove(struct platform_device *pdev)
- 	tasklet_kill(&dd->done_task);
- 	iounmap(dd->io_base);
- 	pm_runtime_disable(&pdev->dev);
-+#ifdef OMAP_SHAM_DMA_PRIVATE
- 	omap_sham_dma_cleanup(dd);
-+#else
-+	dma_release_channel(dd->dma_lch);
-+#endif
- 	if (dd->irq >= 0)
- 		free_irq(dd->irq, dd);
- 	kfree(dd);
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0020-crypto-omap-sham-Remove-usage-of-private-DMA-API.patch b/patches/crypto/0020-crypto-omap-sham-Remove-usage-of-private-DMA-API.patch
deleted file mode 100644
index e3a3c7f7bbe2d6538a41cd4c2391833097bf7b6b..0000000000000000000000000000000000000000
--- a/patches/crypto/0020-crypto-omap-sham-Remove-usage-of-private-DMA-API.patch
+++ /dev/null
@@ -1,277 +0,0 @@
-From efb6cfa1471a6bc011b916e26d43ada1bad86067 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Wed, 17 Oct 2012 22:03:37 -0700
-Subject: [PATCH 20/34] crypto: omap-sham - Remove usage of private DMA API
-
-Remove usage of the private OMAP DMA API.
-The dmaengine API will be used instead.
-
-CC: Russell King <rmk+kernel@arm.linux.org.uk>
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-sham.c |  109 --------------------------------------------
- 1 files changed, 0 insertions(+), 109 deletions(-)
-
-diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
-index 57cb76a..1c752a2 100644
---- a/drivers/crypto/omap-sham.c
-+++ b/drivers/crypto/omap-sham.c
-@@ -13,8 +13,6 @@
-  * Some ideas are from old omap-sha1-md5.c driver.
-  */
- 
--#define OMAP_SHAM_DMA_PRIVATE
--
- #define pr_fmt(fmt) "%s: " fmt, __func__
- 
- #include <linux/err.h>
-@@ -113,9 +111,7 @@ struct omap_sham_reqctx {
- 
- 	/* walk state */
- 	struct scatterlist	*sg;
--#ifndef OMAP_SHAM_DMA_PRIVATE
- 	struct scatterlist	sgl;
--#endif
- 	unsigned int		offset;	/* offset in current sg */
- 	unsigned int		total;	/* total request */
- 
-@@ -149,12 +145,7 @@ struct omap_sham_dev {
- 	int			irq;
- 	spinlock_t		lock;
- 	int			err;
--#ifdef OMAP_SHAM_DMA_PRIVATE
--	int			dma;
--	int			dma_lch;
--#else
- 	struct dma_chan		*dma_lch;
--#endif
- 	struct tasklet_struct	done_task;
- 
- 	unsigned long		flags;
-@@ -324,7 +315,6 @@ static int omap_sham_xmit_cpu(struct omap_sham_dev *dd, const u8 *buf,
- 	return -EINPROGRESS;
- }
- 
--#ifndef OMAP_SHAM_DMA_PRIVATE
- static void omap_sham_dma_callback(void *param)
- {
- 	struct omap_sham_dev *dd = param;
-@@ -332,34 +322,18 @@ static void omap_sham_dma_callback(void *param)
- 	set_bit(FLAGS_DMA_READY, &dd->flags);
- 	tasklet_schedule(&dd->done_task);
- }
--#endif
- 
- static int omap_sham_xmit_dma(struct omap_sham_dev *dd, dma_addr_t dma_addr,
- 			      size_t length, int final, int is_sg)
- {
- 	struct omap_sham_reqctx *ctx = ahash_request_ctx(dd->req);
--#ifdef OMAP_SHAM_DMA_PRIVATE
--	int len32;
--#else
- 	struct dma_async_tx_descriptor *tx;
- 	struct dma_slave_config cfg;
- 	int len32, ret;
--#endif
- 
- 	dev_dbg(dd->dev, "xmit_dma: digcnt: %d, length: %d, final: %d\n",
- 						ctx->digcnt, length, final);
- 
--#ifdef OMAP_SHAM_DMA_PRIVATE
--	len32 = DIV_ROUND_UP(length, sizeof(u32));
--
--	omap_set_dma_transfer_params(dd->dma_lch, OMAP_DMA_DATA_TYPE_S32, len32,
--			1, OMAP_DMA_SYNC_PACKET, dd->dma,
--				OMAP_DMA_DST_SYNC_PREFETCH);
--
--	omap_set_dma_src_params(dd->dma_lch, 0, OMAP_DMA_AMODE_POST_INC,
--				dma_addr, 0, 0);
--
--#else
- 	memset(&cfg, 0, sizeof(cfg));
- 
- 	cfg.dst_addr = dd->phys_base + SHA_REG_DIN(0);
-@@ -401,7 +375,6 @@ static int omap_sham_xmit_dma(struct omap_sham_dev *dd, dma_addr_t dma_addr,
- 
- 	tx->callback = omap_sham_dma_callback;
- 	tx->callback_param = dd;
--#endif
- 
- 	omap_sham_write_ctrl(dd, length, final, 1);
- 
-@@ -412,12 +385,8 @@ static int omap_sham_xmit_dma(struct omap_sham_dev *dd, dma_addr_t dma_addr,
- 
- 	set_bit(FLAGS_DMA_ACTIVE, &dd->flags);
- 
--#ifdef OMAP_SHAM_DMA_PRIVATE
--	omap_start_dma(dd->dma_lch);
--#else
- 	dmaengine_submit(tx);
- 	dma_async_issue_pending(dd->dma_lch);
--#endif
- 
- 	return -EINPROGRESS;
- }
-@@ -523,7 +492,6 @@ static int omap_sham_update_dma_start(struct omap_sham_dev *dd)
- 	if (ctx->bufcnt || ctx->offset)
- 		return omap_sham_update_dma_slow(dd);
- 
--#ifndef OMAP_SHAM_DMA_PRIVATE
- 	/*
- 	 * Don't use the sg interface when the transfer size is less
- 	 * than the number of elements in a DMA frame.  Otherwise,
-@@ -532,7 +500,6 @@ static int omap_sham_update_dma_start(struct omap_sham_dev *dd)
- 	 */
- 	if (ctx->total < (DST_MAXBURST * sizeof(u32)))
- 		return omap_sham_update_dma_slow(dd);
--#endif
- 
- 	dev_dbg(dd->dev, "fast: digcnt: %d, bufcnt: %u, total: %u\n",
- 			ctx->digcnt, ctx->bufcnt, ctx->total);
-@@ -594,11 +561,7 @@ static int omap_sham_update_dma_stop(struct omap_sham_dev *dd)
- {
- 	struct omap_sham_reqctx *ctx = ahash_request_ctx(dd->req);
- 
--#ifdef OMAP_SHAM_DMA_PRIVATE
--	omap_stop_dma(dd->dma_lch);
--#else
- 	dmaengine_terminate_all(dd->dma_lch);
--#endif
- 
- 	if (ctx->flags & BIT(FLAGS_SG)) {
- 		dma_unmap_sg(dd->dev, ctx->sg, 1, DMA_TO_DEVICE);
-@@ -802,18 +765,6 @@ static int omap_sham_handle_queue(struct omap_sham_dev *dd,
- 	if (err)
- 		goto err1;
- 
--#ifdef OMAP_SHAM_DMA_PRIVATE
--	omap_set_dma_dest_params(dd->dma_lch, 0,
--			OMAP_DMA_AMODE_CONSTANT,
--			dd->phys_base + SHA_REG_DIN(0), 0, 16);
--
--	omap_set_dma_dest_burst_mode(dd->dma_lch,
--			OMAP_DMA_DATA_BURST_16);
--
--	omap_set_dma_src_burst_mode(dd->dma_lch,
--			OMAP_DMA_DATA_BURST_4);
--#endif
--
- 	if (ctx->digcnt)
- 		/* request has changed - restore hash */
- 		omap_sham_copy_hash(req, 0);
-@@ -1204,55 +1155,13 @@ static irqreturn_t omap_sham_irq(int irq, void *dev_id)
- 	return IRQ_HANDLED;
- }
- 
--#ifdef OMAP_SHAM_DMA_PRIVATE
--static void omap_sham_dma_callback(int lch, u16 ch_status, void *data)
--{
--	struct omap_sham_dev *dd = data;
--
--	if (ch_status != OMAP_DMA_BLOCK_IRQ) {
--		pr_err("omap-sham DMA error status: 0x%hx\n", ch_status);
--		dd->err = -EIO;
--		clear_bit(FLAGS_INIT, &dd->flags);/* request to re-initialize */
--	}
--
--	set_bit(FLAGS_DMA_READY, &dd->flags);
--	tasklet_schedule(&dd->done_task);
--}
--
--static int omap_sham_dma_init(struct omap_sham_dev *dd)
--{
--	int err;
--
--	dd->dma_lch = -1;
--
--	err = omap_request_dma(dd->dma, dev_name(dd->dev),
--			omap_sham_dma_callback, dd, &dd->dma_lch);
--	if (err) {
--		dev_err(dd->dev, "Unable to request DMA channel\n");
--		return err;
--	}
--
--	return 0;
--}
--
--static void omap_sham_dma_cleanup(struct omap_sham_dev *dd)
--{
--	if (dd->dma_lch >= 0) {
--		omap_free_dma(dd->dma_lch);
--		dd->dma_lch = -1;
--	}
--}
--#endif
--
- static int omap_sham_probe(struct platform_device *pdev)
- {
- 	struct omap_sham_dev *dd;
- 	struct device *dev = &pdev->dev;
- 	struct resource *res;
--#ifndef OMAP_SHAM_DMA_PRIVATE
- 	dma_cap_mask_t mask;
- 	unsigned dma_chan;
--#endif
- 	int err, i, j;
- 
- 	dd = kzalloc(sizeof(struct omap_sham_dev), GFP_KERNEL);
-@@ -1287,11 +1196,7 @@ static int omap_sham_probe(struct platform_device *pdev)
- 		err = -ENODEV;
- 		goto res_err;
- 	}
--#ifdef OMAP_SHAM_DMA_PRIVATE
--	dd->dma = res->start;
--#else
- 	dma_chan = res->start;
--#endif
- 
- 	/* Get the IRQ */
- 	dd->irq = platform_get_irq(pdev,  0);
-@@ -1308,11 +1213,6 @@ static int omap_sham_probe(struct platform_device *pdev)
- 		goto res_err;
- 	}
- 
--#ifdef OMAP_SHAM_DMA_PRIVATE
--	err = omap_sham_dma_init(dd);
--	if (err)
--		goto dma_err;
--#else
- 	dma_cap_zero(mask);
- 	dma_cap_set(DMA_SLAVE, mask);
- 
-@@ -1323,7 +1223,6 @@ static int omap_sham_probe(struct platform_device *pdev)
- 		err = -ENXIO;
- 		goto dma_err;
- 	}
--#endif
- 
- 	dd->io_base = ioremap(dd->phys_base, SZ_4K);
- 	if (!dd->io_base) {
-@@ -1359,11 +1258,7 @@ err_algs:
- 	iounmap(dd->io_base);
- 	pm_runtime_disable(dev);
- io_err:
--#ifdef OMAP_SHAM_DMA_PRIVATE
--	omap_sham_dma_cleanup(dd);
--#else
- 	dma_release_channel(dd->dma_lch);
--#endif
- dma_err:
- 	if (dd->irq >= 0)
- 		free_irq(dd->irq, dd);
-@@ -1392,11 +1287,7 @@ static int omap_sham_remove(struct platform_device *pdev)
- 	tasklet_kill(&dd->done_task);
- 	iounmap(dd->io_base);
- 	pm_runtime_disable(&pdev->dev);
--#ifdef OMAP_SHAM_DMA_PRIVATE
--	omap_sham_dma_cleanup(dd);
--#else
- 	dma_release_channel(dd->dma_lch);
--#endif
- 	if (dd->irq >= 0)
- 		free_irq(dd->irq, dd);
- 	kfree(dd);
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0021-crypto-omap-sham-Add-Device-Tree-Support.patch b/patches/crypto/0021-crypto-omap-sham-Add-Device-Tree-Support.patch
deleted file mode 100644
index 6efad9060291c1f3b3514f41848bfccb5098b21d..0000000000000000000000000000000000000000
--- a/patches/crypto/0021-crypto-omap-sham-Add-Device-Tree-Support.patch
+++ /dev/null
@@ -1,235 +0,0 @@
-From 3a57085bfc59eb713cda3041836b011d1bc24f18 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Tue, 18 Dec 2012 10:03:02 -0700
-Subject: [PATCH 21/34] crypto: omap-sham - Add Device Tree Support
-
-Add Device Tree suport to the omap-sham crypto
-driver.  Currently, only support for OMAP2 and
-OMAP3 is being added but support for OMAP4 will
-be added in a subsequent patch.
-
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-sham.c |  139 +++++++++++++++++++++++++++++++++----------
- 1 files changed, 106 insertions(+), 33 deletions(-)
-
-diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
-index 1c752a2..797c905 100644
---- a/drivers/crypto/omap-sham.c
-+++ b/drivers/crypto/omap-sham.c
-@@ -30,6 +30,10 @@
- #include <linux/dmaengine.h>
- #include <linux/omap-dma.h>
- #include <linux/pm_runtime.h>
-+#include <linux/of.h>
-+#include <linux/of_device.h>
-+#include <linux/of_address.h>
-+#include <linux/of_irq.h>
- #include <linux/delay.h>
- #include <linux/crypto.h>
- #include <linux/cryptohash.h>
-@@ -145,6 +149,7 @@ struct omap_sham_dev {
- 	int			irq;
- 	spinlock_t		lock;
- 	int			err;
-+	unsigned int		dma;
- 	struct dma_chan		*dma_lch;
- 	struct tasklet_struct	done_task;
- 
-@@ -1155,13 +1160,99 @@ static irqreturn_t omap_sham_irq(int irq, void *dev_id)
- 	return IRQ_HANDLED;
- }
- 
-+#ifdef CONFIG_OF
-+static const struct of_device_id omap_sham_of_match[] = {
-+	{
-+		.compatible	= "ti,omap2-sham",
-+	},
-+	{},
-+};
-+MODULE_DEVICE_TABLE(of, omap_sham_of_match);
-+
-+static int omap_sham_get_res_of(struct omap_sham_dev *dd,
-+		struct device *dev, struct resource *res)
-+{
-+	struct device_node *node = dev->of_node;
-+	const struct of_device_id *match;
-+	int err = 0;
-+
-+	match = of_match_device(of_match_ptr(omap_sham_of_match), dev);
-+	if (!match) {
-+		dev_err(dev, "no compatible OF match\n");
-+		err = -EINVAL;
-+		goto err;
-+	}
-+
-+	err = of_address_to_resource(node, 0, res);
-+	if (err < 0) {
-+		dev_err(dev, "can't translate OF node address\n");
-+		err = -EINVAL;
-+		goto err;
-+	}
-+
-+	dd->irq = of_irq_to_resource(node, 0, NULL);
-+	if (!dd->irq) {
-+		dev_err(dev, "can't translate OF irq value\n");
-+		err = -EINVAL;
-+		goto err;
-+	}
-+
-+	dd->dma = -1; /* Dummy value that's unused */
-+
-+err:
-+	return err;
-+}
-+#else
-+static int omap_sham_get_res_dev(struct omap_sham_dev *dd,
-+		struct device *dev, struct resource *res)
-+{
-+	return -EINVAL;
-+}
-+#endif
-+
-+static int omap_sham_get_res_pdev(struct omap_sham_dev *dd,
-+		struct platform_device *pdev, struct resource *res)
-+{
-+	struct device *dev = &pdev->dev;
-+	struct resource *r;
-+	int err = 0;
-+
-+	/* Get the base address */
-+	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-+	if (!r) {
-+		dev_err(dev, "no MEM resource info\n");
-+		err = -ENODEV;
-+		goto err;
-+	}
-+	memcpy(res, r, sizeof(*res));
-+
-+	/* Get the IRQ */
-+	dd->irq = platform_get_irq(pdev, 0);
-+	if (dd->irq < 0) {
-+		dev_err(dev, "no IRQ resource info\n");
-+		err = dd->irq;
-+		goto err;
-+	}
-+
-+	/* Get the DMA */
-+	r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
-+	if (!r) {
-+		dev_err(dev, "no DMA resource info\n");
-+		err = -ENODEV;
-+		goto err;
-+	}
-+	dd->dma = r->start;
-+
-+err:
-+	return err;
-+}
-+
- static int omap_sham_probe(struct platform_device *pdev)
- {
- 	struct omap_sham_dev *dd;
- 	struct device *dev = &pdev->dev;
--	struct resource *res;
-+	struct resource res;
- 	dma_cap_mask_t mask;
--	unsigned dma_chan;
- 	int err, i, j;
- 
- 	dd = kzalloc(sizeof(struct omap_sham_dev), GFP_KERNEL);
-@@ -1178,33 +1269,18 @@ static int omap_sham_probe(struct platform_device *pdev)
- 	tasklet_init(&dd->done_task, omap_sham_done_task, (unsigned long)dd);
- 	crypto_init_queue(&dd->queue, OMAP_SHAM_QUEUE_LENGTH);
- 
--	dd->irq = -1;
--
--	/* Get the base address */
--	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
--	if (!res) {
--		dev_err(dev, "no MEM resource info\n");
--		err = -ENODEV;
--		goto res_err;
--	}
--	dd->phys_base = res->start;
--
--	/* Get the DMA */
--	res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
--	if (!res) {
--		dev_err(dev, "no DMA resource info\n");
--		err = -ENODEV;
-+	err = (dev->of_node) ? omap_sham_get_res_of(dd, dev, &res) :
-+			       omap_sham_get_res_pdev(dd, pdev, &res);
-+	if (err)
- 		goto res_err;
--	}
--	dma_chan = res->start;
- 
--	/* Get the IRQ */
--	dd->irq = platform_get_irq(pdev,  0);
--	if (dd->irq < 0) {
--		dev_err(dev, "no IRQ resource info\n");
--		err = dd->irq;
-+	dd->io_base = devm_request_and_ioremap(dev, &res);
-+	if (!dd->io_base) {
-+		dev_err(dev, "can't ioremap\n");
-+		err = -ENOMEM;
- 		goto res_err;
- 	}
-+	dd->phys_base = res.start;
- 
- 	err = request_irq(dd->irq, omap_sham_irq,
- 			IRQF_TRIGGER_LOW, dev_name(dev), dd);
-@@ -1216,10 +1292,10 @@ static int omap_sham_probe(struct platform_device *pdev)
- 	dma_cap_zero(mask);
- 	dma_cap_set(DMA_SLAVE, mask);
- 
--	dd->dma_lch = dma_request_channel(mask, omap_dma_filter_fn, &dma_chan);
-+	dd->dma_lch = dma_request_channel(mask, omap_dma_filter_fn, &dd->dma);
- 	if (!dd->dma_lch) {
- 		dev_err(dev, "unable to obtain RX DMA engine channel %u\n",
--			dma_chan);
-+			dd->dma);
- 		err = -ENXIO;
- 		goto dma_err;
- 	}
-@@ -1255,13 +1331,11 @@ static int omap_sham_probe(struct platform_device *pdev)
- err_algs:
- 	for (j = 0; j < i; j++)
- 		crypto_unregister_ahash(&algs[j]);
--	iounmap(dd->io_base);
- 	pm_runtime_disable(dev);
- io_err:
- 	dma_release_channel(dd->dma_lch);
- dma_err:
--	if (dd->irq >= 0)
--		free_irq(dd->irq, dd);
-+	free_irq(dd->irq, dd);
- res_err:
- 	kfree(dd);
- 	dd = NULL;
-@@ -1285,11 +1359,9 @@ static int omap_sham_remove(struct platform_device *pdev)
- 	for (i = 0; i < ARRAY_SIZE(algs); i++)
- 		crypto_unregister_ahash(&algs[i]);
- 	tasklet_kill(&dd->done_task);
--	iounmap(dd->io_base);
- 	pm_runtime_disable(&pdev->dev);
- 	dma_release_channel(dd->dma_lch);
--	if (dd->irq >= 0)
--		free_irq(dd->irq, dd);
-+	free_irq(dd->irq, dd);
- 	kfree(dd);
- 	dd = NULL;
- 
-@@ -1321,6 +1393,7 @@ static struct platform_driver omap_sham_driver = {
- 		.name	= "omap-sham",
- 		.owner	= THIS_MODULE,
- 		.pm	= &omap_sham_pm_ops,
-+		.of_match_table	= omap_sham_of_match,
- 	},
- };
- 
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0022-crypto-omap-sham-Convert-to-dma_request_slave_channe.patch b/patches/crypto/0022-crypto-omap-sham-Convert-to-dma_request_slave_channe.patch
deleted file mode 100644
index f5a5a6a516617b38c33e243ed3bd8e3b118f07a5..0000000000000000000000000000000000000000
--- a/patches/crypto/0022-crypto-omap-sham-Convert-to-dma_request_slave_channe.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 33c0263fd70042c84aba7b54128763d0813ad05e Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Tue, 18 Dec 2012 20:35:20 -0700
-Subject: [PATCH 22/34] crypto: omap-sham - Convert to
- dma_request_slave_channel_compat()
-
-Use the dma_request_slave_channel_compat() call instead of
-the dma_request_channel() call to request a DMA channel.
-This allows the omap-sham driver use different DMA engines.
-
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-sham.c |    3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
-
-diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
-index 797c905..0814bd6 100644
---- a/drivers/crypto/omap-sham.c
-+++ b/drivers/crypto/omap-sham.c
-@@ -1292,7 +1292,8 @@ static int omap_sham_probe(struct platform_device *pdev)
- 	dma_cap_zero(mask);
- 	dma_cap_set(DMA_SLAVE, mask);
- 
--	dd->dma_lch = dma_request_channel(mask, omap_dma_filter_fn, &dd->dma);
-+	dd->dma_lch = dma_request_slave_channel_compat(mask, omap_dma_filter_fn,
-+						       &dd->dma, dev, "rx");
- 	if (!dd->dma_lch) {
- 		dev_err(dev, "unable to obtain RX DMA engine channel %u\n",
- 			dd->dma);
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0023-crypto-omap-sham-Add-OMAP4-AM33XX-SHAM-Support.patch b/patches/crypto/0023-crypto-omap-sham-Add-OMAP4-AM33XX-SHAM-Support.patch
deleted file mode 100644
index ae4ad9e3f5ef2820810b45b5ad5bff8ab8fe82d8..0000000000000000000000000000000000000000
--- a/patches/crypto/0023-crypto-omap-sham-Add-OMAP4-AM33XX-SHAM-Support.patch
+++ /dev/null
@@ -1,765 +0,0 @@
-From 755e9b4325c282555a2d25904e4a3492c40bdf77 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Tue, 18 Dec 2012 20:55:48 -0700
-Subject: [PATCH 23/34] crypto: omap-sham - Add OMAP4/AM33XX SHAM Support
-
-Add support for the OMAP4 version of the SHAM module
-that is present on OMAP4 and AM33xx SoCs.
-
-The modules have several differences including register
-offsets, hardware XORing, and how DMA is triggered.
-To handle these differences, a platform_data structure
-is defined and contains routine pointers, register offsets,
-bit shifts within registers, and flags to indicate whether
-the hardware supports XORing and provides SHA1 results in
-big or little endian.  OMAP2/OMAP3-specific routines are
-suffixed with '_omap2' and OMAP4/AM33xx routines are suffixed
-with '_omap4'.
-
-Note: The code being integrated is from the TI AM33xx SDK
-and was written by Greg Turner <gkmturner@gmail.com> and
-Herman Schuurman (current email unknown) while at TI.
-
-CC: Greg Turner <gkmturner@gmail.com>
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-sham.c |  416 +++++++++++++++++++++++++++++++++++---------
- 1 files changed, 332 insertions(+), 84 deletions(-)
-
-diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
-index 0814bd6..c8bfe71 100644
---- a/drivers/crypto/omap-sham.c
-+++ b/drivers/crypto/omap-sham.c
-@@ -5,6 +5,7 @@
-  *
-  * Copyright (c) 2010 Nokia Corporation
-  * Author: Dmitry Kasatkin <dmitry.kasatkin@nokia.com>
-+ * Copyright (c) 2011 Texas Instruments Incorporated
-  *
-  * This program is free software; you can redistribute it and/or modify
-  * it under the terms of the GNU General Public License version 2 as published
-@@ -43,16 +44,17 @@
- #include <crypto/hash.h>
- #include <crypto/internal/hash.h>
- 
--#define SHA_REG_DIGEST(x)		(0x00 + ((x) * 0x04))
--#define SHA_REG_DIN(x)			(0x1C + ((x) * 0x04))
--
- #define SHA1_MD5_BLOCK_SIZE		SHA1_BLOCK_SIZE
- #define MD5_DIGEST_SIZE			16
- 
- #define DST_MAXBURST			16
- #define DMA_MIN				(DST_MAXBURST * sizeof(u32))
- 
--#define SHA_REG_DIGCNT			0x14
-+#define SHA_REG_IDIGEST(dd, x)		((dd)->pdata->idigest_ofs + ((x)*0x04))
-+#define SHA_REG_DIN(dd, x)		((dd)->pdata->din_ofs + ((x) * 0x04))
-+#define SHA_REG_DIGCNT(dd)		((dd)->pdata->digcnt_ofs)
-+
-+#define SHA_REG_ODIGEST(x)		(0x00 + ((x) * 0x04))
- 
- #define SHA_REG_CTRL			0x18
- #define SHA_REG_CTRL_LENGTH		(0xFFFFFFFF << 5)
-@@ -62,19 +64,40 @@
- #define SHA_REG_CTRL_INPUT_READY	(1 << 1)
- #define SHA_REG_CTRL_OUTPUT_READY	(1 << 0)
- 
--#define SHA_REG_REV			0x5C
--#define SHA_REG_REV_MAJOR		0xF0
--#define SHA_REG_REV_MINOR		0x0F
-+#define SHA_REG_REV(dd)			((dd)->pdata->rev_ofs)
- 
--#define SHA_REG_MASK			0x60
-+#define SHA_REG_MASK(dd)		((dd)->pdata->mask_ofs)
- #define SHA_REG_MASK_DMA_EN		(1 << 3)
- #define SHA_REG_MASK_IT_EN		(1 << 2)
- #define SHA_REG_MASK_SOFTRESET		(1 << 1)
- #define SHA_REG_AUTOIDLE		(1 << 0)
- 
--#define SHA_REG_SYSSTATUS		0x64
-+#define SHA_REG_SYSSTATUS(dd)		((dd)->pdata->sysstatus_ofs)
- #define SHA_REG_SYSSTATUS_RESETDONE	(1 << 0)
- 
-+#define SHA_REG_MODE			0x44
-+#define SHA_REG_MODE_HMAC_OUTER_HASH	(1 << 7)
-+#define SHA_REG_MODE_HMAC_KEY_PROC	(1 << 5)
-+#define SHA_REG_MODE_CLOSE_HASH		(1 << 4)
-+#define SHA_REG_MODE_ALGO_CONSTANT	(1 << 3)
-+#define SHA_REG_MODE_ALGO_MASK		(3 << 1)
-+#define		SHA_REG_MODE_ALGO_MD5_128	(0 << 1)
-+#define		SHA_REG_MODE_ALGO_SHA1_160	(1 << 1)
-+
-+#define SHA_REG_LENGTH			0x48
-+
-+#define SHA_REG_IRQSTATUS		0x118
-+#define SHA_REG_IRQSTATUS_CTX_RDY	(1 << 3)
-+#define SHA_REG_IRQSTATUS_PARTHASH_RDY (1 << 2)
-+#define SHA_REG_IRQSTATUS_INPUT_RDY	(1 << 1)
-+#define SHA_REG_IRQSTATUS_OUTPUT_RDY	(1 << 0)
-+
-+#define SHA_REG_IRQENA			0x11C
-+#define SHA_REG_IRQENA_CTX_RDY		(1 << 3)
-+#define SHA_REG_IRQENA_PARTHASH_RDY	(1 << 2)
-+#define SHA_REG_IRQENA_INPUT_RDY	(1 << 1)
-+#define SHA_REG_IRQENA_OUTPUT_RDY	(1 << 0)
-+
- #define DEFAULT_TIMEOUT_INTERVAL	HZ
- 
- /* mostly device flags */
-@@ -85,20 +108,29 @@
- #define FLAGS_INIT		4
- #define FLAGS_CPU		5
- #define FLAGS_DMA_READY		6
-+#define FLAGS_AUTO_XOR		7
-+#define FLAGS_BE32_SHA1		8
- /* context flags */
- #define FLAGS_FINUP		16
- #define FLAGS_SG		17
--#define FLAGS_SHA1		18
--#define FLAGS_HMAC		19
--#define FLAGS_ERROR		20
- 
--#define OP_UPDATE	1
--#define OP_FINAL	2
-+#define FLAGS_MODE_SHIFT	18
-+#define FLAGS_MODE_MASK		(SHA_REG_MODE_ALGO_MASK			\
-+					<< (FLAGS_MODE_SHIFT - 1))
-+#define		FLAGS_MODE_MD5		(SHA_REG_MODE_ALGO_MD5_128	\
-+						<< (FLAGS_MODE_SHIFT - 1))
-+#define		FLAGS_MODE_SHA1		(SHA_REG_MODE_ALGO_SHA1_160	\
-+						<< (FLAGS_MODE_SHIFT - 1))
-+#define FLAGS_HMAC		20
-+#define FLAGS_ERROR		21
-+
-+#define OP_UPDATE		1
-+#define OP_FINAL		2
- 
- #define OMAP_ALIGN_MASK		(sizeof(u32)-1)
- #define OMAP_ALIGNED		__attribute__((aligned(sizeof(u32))))
- 
--#define BUFLEN		PAGE_SIZE
-+#define BUFLEN			PAGE_SIZE
- 
- struct omap_sham_dev;
- 
-@@ -107,7 +139,7 @@ struct omap_sham_reqctx {
- 	unsigned long		flags;
- 	unsigned long		op;
- 
--	u8			digest[SHA1_DIGEST_SIZE] OMAP_ALIGNED;
-+	u8			digest[SHA256_DIGEST_SIZE] OMAP_ALIGNED;
- 	size_t			digcnt;
- 	size_t			bufcnt;
- 	size_t			buflen;
-@@ -124,8 +156,8 @@ struct omap_sham_reqctx {
- 
- struct omap_sham_hmac_ctx {
- 	struct crypto_shash	*shash;
--	u8			ipad[SHA1_MD5_BLOCK_SIZE];
--	u8			opad[SHA1_MD5_BLOCK_SIZE];
-+	u8			ipad[SHA1_MD5_BLOCK_SIZE] OMAP_ALIGNED;
-+	u8			opad[SHA1_MD5_BLOCK_SIZE] OMAP_ALIGNED;
- };
- 
- struct omap_sham_ctx {
-@@ -141,6 +173,31 @@ struct omap_sham_ctx {
- 
- #define OMAP_SHAM_QUEUE_LENGTH	1
- 
-+struct omap_sham_pdata {
-+	unsigned long	flags;
-+	int		digest_size;
-+
-+	void		(*copy_hash)(struct ahash_request *req, int out);
-+	void		(*write_ctrl)(struct omap_sham_dev *dd, size_t length,
-+				      int final, int dma);
-+	void		(*trigger)(struct omap_sham_dev *dd, size_t length);
-+	int		(*poll_irq)(struct omap_sham_dev *dd);
-+	irqreturn_t	(*intr_hdlr)(int irq, void *dev_id);
-+
-+	u32		odigest_ofs;
-+	u32		idigest_ofs;
-+	u32		din_ofs;
-+	u32		digcnt_ofs;
-+	u32		rev_ofs;
-+	u32		mask_ofs;
-+	u32		sysstatus_ofs;
-+
-+	u32		major_mask;
-+	u32		major_shift;
-+	u32		minor_mask;
-+	u32		minor_shift;
-+};
-+
- struct omap_sham_dev {
- 	struct list_head	list;
- 	unsigned long		phys_base;
-@@ -156,6 +213,8 @@ struct omap_sham_dev {
- 	unsigned long		flags;
- 	struct crypto_queue	queue;
- 	struct ahash_request	*req;
-+
-+	const struct omap_sham_pdata	*pdata;
- };
- 
- struct omap_sham_drv {
-@@ -203,21 +262,44 @@ static inline int omap_sham_wait(struct omap_sham_dev *dd, u32 offset, u32 bit)
- 	return 0;
- }
- 
--static void omap_sham_copy_hash(struct ahash_request *req, int out)
-+static void omap_sham_copy_hash_omap2(struct ahash_request *req, int out)
- {
- 	struct omap_sham_reqctx *ctx = ahash_request_ctx(req);
-+	struct omap_sham_dev *dd = ctx->dd;
- 	u32 *hash = (u32 *)ctx->digest;
- 	int i;
- 
--	/* MD5 is almost unused. So copy sha1 size to reduce code */
--	for (i = 0; i < SHA1_DIGEST_SIZE / sizeof(u32); i++) {
-+	for (i = 0; i < dd->pdata->digest_size / sizeof(u32); i++) {
- 		if (out)
--			hash[i] = omap_sham_read(ctx->dd,
--						SHA_REG_DIGEST(i));
-+			hash[i] = omap_sham_read(dd, SHA_REG_IDIGEST(dd, i));
- 		else
--			omap_sham_write(ctx->dd,
--					SHA_REG_DIGEST(i), hash[i]);
-+			omap_sham_write(dd, SHA_REG_IDIGEST(dd, i), hash[i]);
-+	}
-+}
-+
-+static void omap_sham_copy_hash_omap4(struct ahash_request *req, int out)
-+{
-+	struct omap_sham_reqctx *ctx = ahash_request_ctx(req);
-+	struct omap_sham_dev *dd = ctx->dd;
-+	int i;
-+
-+	if (ctx->flags & BIT(FLAGS_HMAC)) {
-+		struct crypto_ahash *tfm = crypto_ahash_reqtfm(dd->req);
-+		struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm);
-+		struct omap_sham_hmac_ctx *bctx = tctx->base;
-+		u32 *opad = (u32 *)bctx->opad;
-+
-+		for (i = 0; i < dd->pdata->digest_size / sizeof(u32); i++) {
-+			if (out)
-+				opad[i] = omap_sham_read(dd,
-+						SHA_REG_ODIGEST(i));
-+			else
-+				omap_sham_write(dd, SHA_REG_ODIGEST(i),
-+						opad[i]);
-+		}
- 	}
-+
-+	omap_sham_copy_hash_omap2(req, out);
- }
- 
- static void omap_sham_copy_ready_hash(struct ahash_request *req)
-@@ -225,20 +307,31 @@ static void omap_sham_copy_ready_hash(struct ahash_request *req)
- 	struct omap_sham_reqctx *ctx = ahash_request_ctx(req);
- 	u32 *in = (u32 *)ctx->digest;
- 	u32 *hash = (u32 *)req->result;
--	int i;
-+	int i, d, big_endian = 0;
- 
- 	if (!hash)
- 		return;
- 
--	if (likely(ctx->flags & BIT(FLAGS_SHA1))) {
--		/* SHA1 results are in big endian */
--		for (i = 0; i < SHA1_DIGEST_SIZE / sizeof(u32); i++)
-+	switch (ctx->flags & FLAGS_MODE_MASK) {
-+	case FLAGS_MODE_MD5:
-+		d = MD5_DIGEST_SIZE / sizeof(u32);
-+		break;
-+	case FLAGS_MODE_SHA1:
-+		/* OMAP2 SHA1 is big endian */
-+		if (test_bit(FLAGS_BE32_SHA1, &ctx->dd->flags))
-+			big_endian = 1;
-+		d = SHA1_DIGEST_SIZE / sizeof(u32);
-+		break;
-+	default:
-+		d = 0;
-+	}
-+
-+	if (big_endian)
-+		for (i = 0; i < d; i++)
- 			hash[i] = be32_to_cpu(in[i]);
--	} else {
--		/* MD5 results are in little endian */
--		for (i = 0; i < MD5_DIGEST_SIZE / sizeof(u32); i++)
-+	else
-+		for (i = 0; i < d; i++)
- 			hash[i] = le32_to_cpu(in[i]);
--	}
- }
- 
- static int omap_sham_hw_init(struct omap_sham_dev *dd)
-@@ -246,13 +339,6 @@ static int omap_sham_hw_init(struct omap_sham_dev *dd)
- 	pm_runtime_get_sync(dd->dev);
- 
- 	if (!test_bit(FLAGS_INIT, &dd->flags)) {
--		omap_sham_write_mask(dd, SHA_REG_MASK,
--			SHA_REG_MASK_SOFTRESET, SHA_REG_MASK_SOFTRESET);
--
--		if (omap_sham_wait(dd, SHA_REG_SYSSTATUS,
--					SHA_REG_SYSSTATUS_RESETDONE))
--			return -ETIMEDOUT;
--
- 		set_bit(FLAGS_INIT, &dd->flags);
- 		dd->err = 0;
- 	}
-@@ -260,23 +346,23 @@ static int omap_sham_hw_init(struct omap_sham_dev *dd)
- 	return 0;
- }
- 
--static void omap_sham_write_ctrl(struct omap_sham_dev *dd, size_t length,
-+static void omap_sham_write_ctrl_omap2(struct omap_sham_dev *dd, size_t length,
- 				 int final, int dma)
- {
- 	struct omap_sham_reqctx *ctx = ahash_request_ctx(dd->req);
- 	u32 val = length << 5, mask;
- 
- 	if (likely(ctx->digcnt))
--		omap_sham_write(dd, SHA_REG_DIGCNT, ctx->digcnt);
-+		omap_sham_write(dd, SHA_REG_DIGCNT(dd), ctx->digcnt);
- 
--	omap_sham_write_mask(dd, SHA_REG_MASK,
-+	omap_sham_write_mask(dd, SHA_REG_MASK(dd),
- 		SHA_REG_MASK_IT_EN | (dma ? SHA_REG_MASK_DMA_EN : 0),
- 		SHA_REG_MASK_IT_EN | SHA_REG_MASK_DMA_EN);
- 	/*
- 	 * Setting ALGO_CONST only for the first iteration
- 	 * and CLOSE_HASH only for the last one.
- 	 */
--	if (ctx->flags & BIT(FLAGS_SHA1))
-+	if ((ctx->flags & FLAGS_MODE_MASK) == FLAGS_MODE_SHA1)
- 		val |= SHA_REG_CTRL_ALGO;
- 	if (!ctx->digcnt)
- 		val |= SHA_REG_CTRL_ALGO_CONST;
-@@ -289,6 +375,81 @@ static void omap_sham_write_ctrl(struct omap_sham_dev *dd, size_t length,
- 	omap_sham_write_mask(dd, SHA_REG_CTRL, val, mask);
- }
- 
-+static void omap_sham_trigger_omap2(struct omap_sham_dev *dd, size_t length)
-+{
-+}
-+
-+static int omap_sham_poll_irq_omap2(struct omap_sham_dev *dd)
-+{
-+	return omap_sham_wait(dd, SHA_REG_CTRL, SHA_REG_CTRL_INPUT_READY);
-+}
-+
-+static void omap_sham_write_n(struct omap_sham_dev *dd, u32 offset,
-+				    u32 *value, int count)
-+{
-+	for (; count--; value++, offset += 4)
-+		omap_sham_write(dd, offset, *value);
-+}
-+
-+static void omap_sham_write_ctrl_omap4(struct omap_sham_dev *dd, size_t length,
-+				 int final, int dma)
-+{
-+	struct omap_sham_reqctx *ctx = ahash_request_ctx(dd->req);
-+	u32 val, mask;
-+
-+	/*
-+	 * Setting ALGO_CONST only for the first iteration and
-+	 * CLOSE_HASH only for the last one. Note that flags mode bits
-+	 * correspond to algorithm encoding in mode register.
-+	 */
-+	val = (ctx->flags & FLAGS_MODE_MASK) >> (FLAGS_MODE_SHIFT - 1);
-+	if (!ctx->digcnt) {
-+		struct crypto_ahash *tfm = crypto_ahash_reqtfm(dd->req);
-+		struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm);
-+		struct omap_sham_hmac_ctx *bctx = tctx->base;
-+
-+		val |= SHA_REG_MODE_ALGO_CONSTANT;
-+
-+		if (ctx->flags & BIT(FLAGS_HMAC)) {
-+			val |= SHA_REG_MODE_HMAC_KEY_PROC;
-+			omap_sham_write_n(dd, SHA_REG_ODIGEST(0),
-+					  (u32 *)bctx->ipad,
-+					  SHA1_BLOCK_SIZE / sizeof(u32));
-+			ctx->digcnt += SHA1_BLOCK_SIZE;
-+		}
-+	}
-+
-+	if (final) {
-+		val |= SHA_REG_MODE_CLOSE_HASH;
-+
-+		if (ctx->flags & BIT(FLAGS_HMAC))
-+			val |= SHA_REG_MODE_HMAC_OUTER_HASH;
-+	}
-+
-+	mask = SHA_REG_MODE_ALGO_CONSTANT | SHA_REG_MODE_CLOSE_HASH |
-+	       SHA_REG_MODE_ALGO_MASK | SHA_REG_MODE_HMAC_OUTER_HASH |
-+	       SHA_REG_MODE_HMAC_KEY_PROC;
-+
-+	dev_dbg(dd->dev, "ctrl: %08x, flags: %08lx\n", val, ctx->flags);
-+	omap_sham_write_mask(dd, SHA_REG_MODE, val, mask);
-+	omap_sham_write(dd, SHA_REG_IRQENA, SHA_REG_IRQENA_OUTPUT_RDY);
-+	omap_sham_write_mask(dd, SHA_REG_MASK(dd),
-+			     SHA_REG_MASK_IT_EN |
-+				     (dma ? SHA_REG_MASK_DMA_EN : 0),
-+			     SHA_REG_MASK_IT_EN | SHA_REG_MASK_DMA_EN);
-+}
-+
-+static void omap_sham_trigger_omap4(struct omap_sham_dev *dd, size_t length)
-+{
-+	omap_sham_write(dd, SHA_REG_LENGTH, length);
-+}
-+
-+static int omap_sham_poll_irq_omap4(struct omap_sham_dev *dd)
-+{
-+	return omap_sham_wait(dd, SHA_REG_IRQSTATUS,
-+			      SHA_REG_IRQSTATUS_INPUT_RDY);
-+}
-+
- static int omap_sham_xmit_cpu(struct omap_sham_dev *dd, const u8 *buf,
- 			      size_t length, int final)
- {
-@@ -299,12 +460,13 @@ static int omap_sham_xmit_cpu(struct omap_sham_dev *dd, const u8 *buf,
- 	dev_dbg(dd->dev, "xmit_cpu: digcnt: %d, length: %d, final: %d\n",
- 						ctx->digcnt, length, final);
- 
--	omap_sham_write_ctrl(dd, length, final, 0);
-+	dd->pdata->write_ctrl(dd, length, final, 0);
-+	dd->pdata->trigger(dd, length);
- 
- 	/* should be non-zero before next lines to disable clocks later */
- 	ctx->digcnt += length;
- 
--	if (omap_sham_wait(dd, SHA_REG_CTRL, SHA_REG_CTRL_INPUT_READY))
-+	if (dd->pdata->poll_irq(dd))
- 		return -ETIMEDOUT;
- 
- 	if (final)
-@@ -315,7 +477,7 @@ static int omap_sham_xmit_cpu(struct omap_sham_dev *dd, const u8 *buf,
- 	len32 = DIV_ROUND_UP(length, sizeof(u32));
- 
- 	for (count = 0; count < len32; count++)
--		omap_sham_write(dd, SHA_REG_DIN(count), buffer[count]);
-+		omap_sham_write(dd, SHA_REG_DIN(dd, count), buffer[count]);
- 
- 	return -EINPROGRESS;
- }
-@@ -341,7 +503,7 @@ static int omap_sham_xmit_dma(struct omap_sham_dev *dd, dma_addr_t dma_addr,
- 
- 	memset(&cfg, 0, sizeof(cfg));
- 
--	cfg.dst_addr = dd->phys_base + SHA_REG_DIN(0);
-+	cfg.dst_addr = dd->phys_base + SHA_REG_DIN(dd, 0);
- 	cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
- 	cfg.dst_maxburst = DST_MAXBURST;
- 
-@@ -381,7 +543,7 @@ static int omap_sham_xmit_dma(struct omap_sham_dev *dd, dma_addr_t dma_addr,
- 	tx->callback = omap_sham_dma_callback;
- 	tx->callback_param = dd;
- 
--	omap_sham_write_ctrl(dd, length, final, 1);
-+	dd->pdata->write_ctrl(dd, length, final, 1);
- 
- 	ctx->digcnt += length;
- 
-@@ -393,6 +555,8 @@ static int omap_sham_xmit_dma(struct omap_sham_dev *dd, dma_addr_t dma_addr,
- 	dmaengine_submit(tx);
- 	dma_async_issue_pending(dd->dma_lch);
- 
-+	dd->pdata->trigger(dd, length);
-+
- 	return -EINPROGRESS;
- }
- 
-@@ -450,7 +614,7 @@ static int omap_sham_xmit_dma_map(struct omap_sham_dev *dd,
- 	ctx->flags &= ~BIT(FLAGS_SG);
- 
- 	ret = omap_sham_xmit_dma(dd, ctx->dma_addr, length, final, 0);
--	if (ret)
-+	if (ret != -EINPROGRESS)
- 		dma_unmap_single(dd->dev, ctx->dma_addr, ctx->buflen,
- 				 DMA_TO_DEVICE);
- 
-@@ -544,7 +708,7 @@ static int omap_sham_update_dma_start(struct omap_sham_dev *dd)
- 	final = (ctx->flags & BIT(FLAGS_FINUP)) && !ctx->total;
- 
- 	ret = omap_sham_xmit_dma(dd, sg_dma_address(ctx->sg), length, final, 1);
--	if (ret)
-+	if (ret != -EINPROGRESS)
- 		dma_unmap_sg(dd->dev, ctx->sg, 1, DMA_TO_DEVICE);
- 
- 	return ret;
-@@ -609,18 +773,27 @@ static int omap_sham_init(struct ahash_request *req)
- 	dev_dbg(dd->dev, "init: digest size: %d\n",
- 		crypto_ahash_digestsize(tfm));
- 
--	if (crypto_ahash_digestsize(tfm) == SHA1_DIGEST_SIZE)
--		ctx->flags |= BIT(FLAGS_SHA1);
-+	switch (crypto_ahash_digestsize(tfm)) {
-+	case MD5_DIGEST_SIZE:
-+		ctx->flags |= FLAGS_MODE_MD5;
-+		break;
-+	case SHA1_DIGEST_SIZE:
-+		ctx->flags |= FLAGS_MODE_SHA1;
-+		break;
-+	}
- 
- 	ctx->bufcnt = 0;
- 	ctx->digcnt = 0;
- 	ctx->buflen = BUFLEN;
- 
- 	if (tctx->flags & BIT(FLAGS_HMAC)) {
--		struct omap_sham_hmac_ctx *bctx = tctx->base;
-+		if (!test_bit(FLAGS_AUTO_XOR, &dd->flags)) {
-+			struct omap_sham_hmac_ctx *bctx = tctx->base;
-+
-+			memcpy(ctx->buffer, bctx->ipad, SHA1_MD5_BLOCK_SIZE);
-+			ctx->bufcnt = SHA1_MD5_BLOCK_SIZE;
-+		}
- 
--		memcpy(ctx->buffer, bctx->ipad, SHA1_MD5_BLOCK_SIZE);
--		ctx->bufcnt = SHA1_MD5_BLOCK_SIZE;
- 		ctx->flags |= BIT(FLAGS_HMAC);
- 	}
- 
-@@ -697,7 +870,8 @@ static int omap_sham_finish(struct ahash_request *req)
- 
- 	if (ctx->digcnt) {
- 		omap_sham_copy_ready_hash(req);
--		if (ctx->flags & BIT(FLAGS_HMAC))
-+		if ((ctx->flags & BIT(FLAGS_HMAC)) &&
-+				!test_bit(FLAGS_AUTO_XOR, &dd->flags))
- 			err = omap_sham_finish_hmac(req);
- 	}
- 
-@@ -712,7 +886,7 @@ static void omap_sham_finish_req(struct ahash_request *req, int err)
- 	struct omap_sham_dev *dd = ctx->dd;
- 
- 	if (!err) {
--		omap_sham_copy_hash(req, 1);
-+		dd->pdata->copy_hash(req, 1);
- 		if (test_bit(FLAGS_FINAL, &dd->flags))
- 			err = omap_sham_finish(req);
- 	} else {
-@@ -772,7 +946,7 @@ static int omap_sham_handle_queue(struct omap_sham_dev *dd,
- 
- 	if (ctx->digcnt)
- 		/* request has changed - restore hash */
--		omap_sham_copy_hash(req, 0);
-+		dd->pdata->copy_hash(req, 0);
- 
- 	if (ctx->op == OP_UPDATE) {
- 		err = omap_sham_update_req(dd);
-@@ -911,7 +1085,21 @@ static int omap_sham_setkey(struct crypto_ahash *tfm, const u8 *key,
- 	struct omap_sham_hmac_ctx *bctx = tctx->base;
- 	int bs = crypto_shash_blocksize(bctx->shash);
- 	int ds = crypto_shash_digestsize(bctx->shash);
-+	struct omap_sham_dev *dd = NULL, *tmp;
- 	int err, i;
-+
-+	spin_lock_bh(&sham.lock);
-+	if (!tctx->dd) {
-+		list_for_each_entry(tmp, &sham.dev_list, list) {
-+			dd = tmp;
-+			break;
-+		}
-+		tctx->dd = dd;
-+	} else {
-+		dd = tctx->dd;
-+	}
-+	spin_unlock_bh(&sham.lock);
-+
- 	err = crypto_shash_setkey(tctx->fallback, key, keylen);
- 	if (err)
- 		return err;
-@@ -928,11 +1116,14 @@ static int omap_sham_setkey(struct crypto_ahash *tfm, const u8 *key,
- 	}
- 
- 	memset(bctx->ipad + keylen, 0, bs - keylen);
--	memcpy(bctx->opad, bctx->ipad, bs);
- 
--	for (i = 0; i < bs; i++) {
--		bctx->ipad[i] ^= 0x36;
--		bctx->opad[i] ^= 0x5c;
-+	if (!test_bit(FLAGS_AUTO_XOR, &dd->flags)) {
-+		memcpy(bctx->opad, bctx->ipad, bs);
-+
-+		for (i = 0; i < bs; i++) {
-+			bctx->ipad[i] ^= 0x36;
-+			bctx->opad[i] ^= 0x5c;
-+		}
- 	}
- 
- 	return err;
-@@ -1137,7 +1328,19 @@ finish:
- 	omap_sham_finish_req(dd->req, err);
- }
- 
--static irqreturn_t omap_sham_irq(int irq, void *dev_id)
-+static irqreturn_t omap_sham_irq_common(struct omap_sham_dev *dd)
-+{
-+	if (!test_bit(FLAGS_BUSY, &dd->flags)) {
-+		dev_warn(dd->dev, "Interrupt when no active requests.\n");
-+	} else {
-+		set_bit(FLAGS_OUTPUT_READY, &dd->flags);
-+		tasklet_schedule(&dd->done_task);
-+	}
-+
-+	return IRQ_HANDLED;
-+}
-+
-+static irqreturn_t omap_sham_irq_omap2(int irq, void *dev_id)
- {
- 	struct omap_sham_dev *dd = dev_id;
- 
-@@ -1149,21 +1352,67 @@ static irqreturn_t omap_sham_irq(int irq, void *dev_id)
- 				 SHA_REG_CTRL_OUTPUT_READY);
- 	omap_sham_read(dd, SHA_REG_CTRL);
- 
--	if (!test_bit(FLAGS_BUSY, &dd->flags)) {
--		dev_warn(dd->dev, "Interrupt when no active requests.\n");
--		return IRQ_HANDLED;
--	}
-+	return omap_sham_irq_common(dd);
-+}
- 
--	set_bit(FLAGS_OUTPUT_READY, &dd->flags);
--	tasklet_schedule(&dd->done_task);
-+static irqreturn_t omap_sham_irq_omap4(int irq, void *dev_id)
-+{
-+	struct omap_sham_dev *dd = dev_id;
- 
--	return IRQ_HANDLED;
-+	omap_sham_write_mask(dd, SHA_REG_MASK(dd), 0, SHA_REG_MASK_IT_EN);
-+
-+	return omap_sham_irq_common(dd);
- }
- 
-+static const struct omap_sham_pdata omap_sham_pdata_omap2 = {
-+	.flags		= BIT(FLAGS_BE32_SHA1),
-+	.digest_size	= SHA1_DIGEST_SIZE,
-+	.copy_hash	= omap_sham_copy_hash_omap2,
-+	.write_ctrl	= omap_sham_write_ctrl_omap2,
-+	.trigger	= omap_sham_trigger_omap2,
-+	.poll_irq	= omap_sham_poll_irq_omap2,
-+	.intr_hdlr	= omap_sham_irq_omap2,
-+	.idigest_ofs	= 0x00,
-+	.din_ofs	= 0x1c,
-+	.digcnt_ofs	= 0x14,
-+	.rev_ofs	= 0x5c,
-+	.mask_ofs	= 0x60,
-+	.sysstatus_ofs	= 0x64,
-+	.major_mask	= 0xf0,
-+	.major_shift	= 4,
-+	.minor_mask	= 0x0f,
-+	.minor_shift	= 0,
-+};
-+
- #ifdef CONFIG_OF
-+static const struct omap_sham_pdata omap_sham_pdata_omap4 = {
-+	.flags		= BIT(FLAGS_AUTO_XOR),
-+	.digest_size	= SHA256_DIGEST_SIZE,
-+	.copy_hash	= omap_sham_copy_hash_omap4,
-+	.write_ctrl	= omap_sham_write_ctrl_omap4,
-+	.trigger	= omap_sham_trigger_omap4,
-+	.poll_irq	= omap_sham_poll_irq_omap4,
-+	.intr_hdlr	= omap_sham_irq_omap4,
-+	.idigest_ofs	= 0x020,
-+	.din_ofs	= 0x080,
-+	.digcnt_ofs	= 0x040,
-+	.rev_ofs	= 0x100,
-+	.mask_ofs	= 0x110,
-+	.sysstatus_ofs	= 0x114,
-+	.major_mask	= 0x0700,
-+	.major_shift	= 8,
-+	.minor_mask	= 0x003f,
-+	.minor_shift	= 0,
-+};
-+
- static const struct of_device_id omap_sham_of_match[] = {
- 	{
- 		.compatible	= "ti,omap2-sham",
-+		.data		= &omap_sham_pdata_omap2,
-+	},
-+	{
-+		.compatible	= "ti,omap4-sham",
-+		.data		= &omap_sham_pdata_omap4,
- 	},
- 	{},
- };
-@@ -1198,6 +1447,7 @@ static int omap_sham_get_res_of(struct omap_sham_dev *dd,
- 	}
- 
- 	dd->dma = -1; /* Dummy value that's unused */
-+	dd->pdata = match->data;
- 
- err:
- 	return err;
-@@ -1243,6 +1493,9 @@ static int omap_sham_get_res_pdev(struct omap_sham_dev *dd,
- 	}
- 	dd->dma = r->start;
- 
-+	/* Only OMAP2/3 can be non-DT */
-+	dd->pdata = &omap_sham_pdata_omap2;
-+
- err:
- 	return err;
- }
-@@ -1254,6 +1507,7 @@ static int omap_sham_probe(struct platform_device *pdev)
- 	struct resource res;
- 	dma_cap_mask_t mask;
- 	int err, i, j;
-+	u32 rev;
- 
- 	dd = kzalloc(sizeof(struct omap_sham_dev), GFP_KERNEL);
- 	if (dd == NULL) {
-@@ -1282,8 +1536,8 @@ static int omap_sham_probe(struct platform_device *pdev)
- 	}
- 	dd->phys_base = res.start;
- 
--	err = request_irq(dd->irq, omap_sham_irq,
--			IRQF_TRIGGER_LOW, dev_name(dev), dd);
-+	err = request_irq(dd->irq, dd->pdata->intr_hdlr, IRQF_TRIGGER_LOW,
-+			  dev_name(dev), dd);
- 	if (err) {
- 		dev_err(dev, "unable to request irq.\n");
- 		goto res_err;
-@@ -1301,21 +1555,16 @@ static int omap_sham_probe(struct platform_device *pdev)
- 		goto dma_err;
- 	}
- 
--	dd->io_base = ioremap(dd->phys_base, SZ_4K);
--	if (!dd->io_base) {
--		dev_err(dev, "can't ioremap\n");
--		err = -ENOMEM;
--		goto io_err;
--	}
-+	dd->flags |= dd->pdata->flags;
- 
- 	pm_runtime_enable(dev);
- 	pm_runtime_get_sync(dev);
-+	rev = omap_sham_read(dd, SHA_REG_REV(dd));
-+	pm_runtime_put_sync(&pdev->dev);
- 
- 	dev_info(dev, "hw accel on OMAP rev %u.%u\n",
--		(omap_sham_read(dd, SHA_REG_REV) & SHA_REG_REV_MAJOR) >> 4,
--		omap_sham_read(dd, SHA_REG_REV) & SHA_REG_REV_MINOR);
--
--	pm_runtime_put_sync(&pdev->dev);
-+		(rev & dd->pdata->major_mask) >> dd->pdata->major_shift,
-+		(rev & dd->pdata->minor_mask) >> dd->pdata->minor_shift);
- 
- 	spin_lock(&sham.lock);
- 	list_add_tail(&dd->list, &sham.dev_list);
-@@ -1333,7 +1582,6 @@ err_algs:
- 	for (j = 0; j < i; j++)
- 		crypto_unregister_ahash(&algs[j]);
- 	pm_runtime_disable(dev);
--io_err:
- 	dma_release_channel(dd->dma_lch);
- dma_err:
- 	free_irq(dd->irq, dd);
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0024-crypto-omap-sham-Add-SHA224-and-SHA256-Support.patch b/patches/crypto/0024-crypto-omap-sham-Add-SHA224-and-SHA256-Support.patch
deleted file mode 100644
index a4e809b3d1879c7d607000999be1e4052388cf33..0000000000000000000000000000000000000000
--- a/patches/crypto/0024-crypto-omap-sham-Add-SHA224-and-SHA256-Support.patch
+++ /dev/null
@@ -1,314 +0,0 @@
-From ef7dfe546009e4f59e5e0f5fe18074d4093e71d2 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Tue, 18 Dec 2012 21:50:08 -0700
-Subject: [PATCH 24/34] crypto: omap-sham - Add SHA224 and SHA256 Support
-
-The OMAP4/AM33xx version of the SHAM crypto module
-supports SHA224 and SHA256 in addition to MD5 and
-SHA1 that the OMAP2 version of the module supports.
-
-To add this support, use the platform_data introduced
-in an ealier commit to hold the list of algorithms
-supported by the current module.  The probe routine
-will use that list to register the correct algorithms.
-
-Note: The code being integrated is from the TI AM33xx SDK
-and was written by Greg Turner <gkmturner@gmail.com> and
-Herman Schuurman (current email unknown) while at TI.
-
-CC: Greg Turner <gkmturner@gmail.com>
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-sham.c |  183 +++++++++++++++++++++++++++++++++++++++++---
- 1 files changed, 173 insertions(+), 10 deletions(-)
-
-diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
-index c8bfe71..696a7d5 100644
---- a/drivers/crypto/omap-sham.c
-+++ b/drivers/crypto/omap-sham.c
-@@ -83,6 +83,8 @@
- #define SHA_REG_MODE_ALGO_MASK		(3 << 1)
- #define		SHA_REG_MODE_ALGO_MD5_128	(0 << 1)
- #define		SHA_REG_MODE_ALGO_SHA1_160	(1 << 1)
-+#define		SHA_REG_MODE_ALGO_SHA2_224	(2 << 1)
-+#define		SHA_REG_MODE_ALGO_SHA2_256	(3 << 1)
- 
- #define SHA_REG_LENGTH			0x48
- 
-@@ -121,6 +123,10 @@
- 						<< (FLAGS_MODE_SHIFT - 1))
- #define		FLAGS_MODE_SHA1		(SHA_REG_MODE_ALGO_SHA1_160	\
- 						<< (FLAGS_MODE_SHIFT - 1))
-+#define		FLAGS_MODE_SHA224	(SHA_REG_MODE_ALGO_SHA2_224	\
-+						<< (FLAGS_MODE_SHIFT - 1))
-+#define		FLAGS_MODE_SHA256	(SHA_REG_MODE_ALGO_SHA2_256	\
-+						<< (FLAGS_MODE_SHIFT - 1))
- #define FLAGS_HMAC		20
- #define FLAGS_ERROR		21
- 
-@@ -173,7 +179,15 @@ struct omap_sham_ctx {
- 
- #define OMAP_SHAM_QUEUE_LENGTH	1
- 
-+struct omap_sham_algs_info {
-+	struct ahash_alg	*algs_list;
-+	unsigned int		size;
-+	unsigned int		registered;
-+};
-+
- struct omap_sham_pdata {
-+	struct omap_sham_algs_info	*algs_info;
-+	unsigned int	algs_info_size;
- 	unsigned long	flags;
- 	int		digest_size;
- 
-@@ -322,6 +336,12 @@ static void omap_sham_copy_ready_hash(struct ahash_request *req)
- 			big_endian = 1;
- 		d = SHA1_DIGEST_SIZE / sizeof(u32);
- 		break;
-+	case FLAGS_MODE_SHA224:
-+		d = SHA224_DIGEST_SIZE / sizeof(u32);
-+		break;
-+	case FLAGS_MODE_SHA256:
-+		d = SHA256_DIGEST_SIZE / sizeof(u32);
-+		break;
- 	default:
- 		d = 0;
- 	}
-@@ -780,6 +800,12 @@ static int omap_sham_init(struct ahash_request *req)
- 	case SHA1_DIGEST_SIZE:
- 		ctx->flags |= FLAGS_MODE_SHA1;
- 		break;
-+	case SHA224_DIGEST_SIZE:
-+		ctx->flags |= FLAGS_MODE_SHA224;
-+		break;
-+	case SHA256_DIGEST_SIZE:
-+		ctx->flags |= FLAGS_MODE_SHA256;
-+		break;
- 	}
- 
- 	ctx->bufcnt = 0;
-@@ -1173,6 +1199,16 @@ static int omap_sham_cra_sha1_init(struct crypto_tfm *tfm)
- 	return omap_sham_cra_init_alg(tfm, "sha1");
- }
- 
-+static int omap_sham_cra_sha224_init(struct crypto_tfm *tfm)
-+{
-+	return omap_sham_cra_init_alg(tfm, "sha224");
-+}
-+
-+static int omap_sham_cra_sha256_init(struct crypto_tfm *tfm)
-+{
-+	return omap_sham_cra_init_alg(tfm, "sha256");
-+}
-+
- static int omap_sham_cra_md5_init(struct crypto_tfm *tfm)
- {
- 	return omap_sham_cra_init_alg(tfm, "md5");
-@@ -1191,7 +1227,7 @@ static void omap_sham_cra_exit(struct crypto_tfm *tfm)
- 	}
- }
- 
--static struct ahash_alg algs[] = {
-+static struct ahash_alg algs_sha1_md5[] = {
- {
- 	.init		= omap_sham_init,
- 	.update		= omap_sham_update,
-@@ -1290,6 +1326,102 @@ static struct ahash_alg algs[] = {
- }
- };
- 
-+/* OMAP4 has some algs in addition to what OMAP2 has */
-+static struct ahash_alg algs_sha224_sha256[] = {
-+{
-+	.init		= omap_sham_init,
-+	.update		= omap_sham_update,
-+	.final		= omap_sham_final,
-+	.finup		= omap_sham_finup,
-+	.digest		= omap_sham_digest,
-+	.halg.digestsize	= SHA224_DIGEST_SIZE,
-+	.halg.base	= {
-+		.cra_name		= "sha224",
-+		.cra_driver_name	= "omap-sha224",
-+		.cra_priority		= 100,
-+		.cra_flags		= CRYPTO_ALG_TYPE_AHASH |
-+						CRYPTO_ALG_ASYNC |
-+						CRYPTO_ALG_NEED_FALLBACK,
-+		.cra_blocksize		= SHA224_BLOCK_SIZE,
-+		.cra_ctxsize		= sizeof(struct omap_sham_ctx),
-+		.cra_alignmask		= 0,
-+		.cra_module		= THIS_MODULE,
-+		.cra_init		= omap_sham_cra_init,
-+		.cra_exit		= omap_sham_cra_exit,
-+	}
-+},
-+{
-+	.init		= omap_sham_init,
-+	.update		= omap_sham_update,
-+	.final		= omap_sham_final,
-+	.finup		= omap_sham_finup,
-+	.digest		= omap_sham_digest,
-+	.halg.digestsize	= SHA256_DIGEST_SIZE,
-+	.halg.base	= {
-+		.cra_name		= "sha256",
-+		.cra_driver_name	= "omap-sha256",
-+		.cra_priority		= 100,
-+		.cra_flags		= CRYPTO_ALG_TYPE_AHASH |
-+						CRYPTO_ALG_ASYNC |
-+						CRYPTO_ALG_NEED_FALLBACK,
-+		.cra_blocksize		= SHA256_BLOCK_SIZE,
-+		.cra_ctxsize		= sizeof(struct omap_sham_ctx),
-+		.cra_alignmask		= 0,
-+		.cra_module		= THIS_MODULE,
-+		.cra_init		= omap_sham_cra_init,
-+		.cra_exit		= omap_sham_cra_exit,
-+	}
-+},
-+{
-+	.init		= omap_sham_init,
-+	.update		= omap_sham_update,
-+	.final		= omap_sham_final,
-+	.finup		= omap_sham_finup,
-+	.digest		= omap_sham_digest,
-+	.setkey		= omap_sham_setkey,
-+	.halg.digestsize	= SHA224_DIGEST_SIZE,
-+	.halg.base	= {
-+		.cra_name		= "hmac(sha224)",
-+		.cra_driver_name	= "omap-hmac-sha224",
-+		.cra_priority		= 100,
-+		.cra_flags		= CRYPTO_ALG_TYPE_AHASH |
-+						CRYPTO_ALG_ASYNC |
-+						CRYPTO_ALG_NEED_FALLBACK,
-+		.cra_blocksize		= SHA224_BLOCK_SIZE,
-+		.cra_ctxsize		= sizeof(struct omap_sham_ctx) +
-+					sizeof(struct omap_sham_hmac_ctx),
-+		.cra_alignmask		= OMAP_ALIGN_MASK,
-+		.cra_module		= THIS_MODULE,
-+		.cra_init		= omap_sham_cra_sha224_init,
-+		.cra_exit		= omap_sham_cra_exit,
-+	}
-+},
-+{
-+	.init		= omap_sham_init,
-+	.update		= omap_sham_update,
-+	.final		= omap_sham_final,
-+	.finup		= omap_sham_finup,
-+	.digest		= omap_sham_digest,
-+	.setkey		= omap_sham_setkey,
-+	.halg.digestsize	= SHA256_DIGEST_SIZE,
-+	.halg.base	= {
-+		.cra_name		= "hmac(sha256)",
-+		.cra_driver_name	= "omap-hmac-sha256",
-+		.cra_priority		= 100,
-+		.cra_flags		= CRYPTO_ALG_TYPE_AHASH |
-+						CRYPTO_ALG_ASYNC |
-+						CRYPTO_ALG_NEED_FALLBACK,
-+		.cra_blocksize		= SHA256_BLOCK_SIZE,
-+		.cra_ctxsize		= sizeof(struct omap_sham_ctx) +
-+					sizeof(struct omap_sham_hmac_ctx),
-+		.cra_alignmask		= OMAP_ALIGN_MASK,
-+		.cra_module		= THIS_MODULE,
-+		.cra_init		= omap_sham_cra_sha256_init,
-+		.cra_exit		= omap_sham_cra_exit,
-+	}
-+},
-+};
-+
- static void omap_sham_done_task(unsigned long data)
- {
- 	struct omap_sham_dev *dd = (struct omap_sham_dev *)data;
-@@ -1364,7 +1496,16 @@ static irqreturn_t omap_sham_irq_omap4(int irq, void *dev_id)
- 	return omap_sham_irq_common(dd);
- }
- 
-+static struct omap_sham_algs_info omap_sham_algs_info_omap2[] = {
-+	{
-+		.algs_list	= algs_sha1_md5,
-+		.size		= ARRAY_SIZE(algs_sha1_md5),
-+	},
-+};
-+
- static const struct omap_sham_pdata omap_sham_pdata_omap2 = {
-+	.algs_info	= omap_sham_algs_info_omap2,
-+	.algs_info_size	= ARRAY_SIZE(omap_sham_algs_info_omap2),
- 	.flags		= BIT(FLAGS_BE32_SHA1),
- 	.digest_size	= SHA1_DIGEST_SIZE,
- 	.copy_hash	= omap_sham_copy_hash_omap2,
-@@ -1385,7 +1526,20 @@ static const struct omap_sham_pdata omap_sham_pdata_omap2 = {
- };
- 
- #ifdef CONFIG_OF
-+static struct omap_sham_algs_info omap_sham_algs_info_omap4[] = {
-+	{
-+		.algs_list	= algs_sha1_md5,
-+		.size		= ARRAY_SIZE(algs_sha1_md5),
-+	},
-+	{
-+		.algs_list	= algs_sha224_sha256,
-+		.size		= ARRAY_SIZE(algs_sha224_sha256),
-+	},
-+};
-+
- static const struct omap_sham_pdata omap_sham_pdata_omap4 = {
-+	.algs_info	= omap_sham_algs_info_omap4,
-+	.algs_info_size	= ARRAY_SIZE(omap_sham_algs_info_omap4),
- 	.flags		= BIT(FLAGS_AUTO_XOR),
- 	.digest_size	= SHA256_DIGEST_SIZE,
- 	.copy_hash	= omap_sham_copy_hash_omap4,
-@@ -1570,17 +1724,24 @@ static int omap_sham_probe(struct platform_device *pdev)
- 	list_add_tail(&dd->list, &sham.dev_list);
- 	spin_unlock(&sham.lock);
- 
--	for (i = 0; i < ARRAY_SIZE(algs); i++) {
--		err = crypto_register_ahash(&algs[i]);
--		if (err)
--			goto err_algs;
-+	for (i = 0; i < dd->pdata->algs_info_size; i++) {
-+		for (j = 0; j < dd->pdata->algs_info[i].size; j++) {
-+			err = crypto_register_ahash(
-+					&dd->pdata->algs_info[i].algs_list[j]);
-+			if (err)
-+				goto err_algs;
-+
-+			dd->pdata->algs_info[i].registered++;
-+		}
- 	}
- 
- 	return 0;
- 
- err_algs:
--	for (j = 0; j < i; j++)
--		crypto_unregister_ahash(&algs[j]);
-+	for (i = dd->pdata->algs_info_size - 1; i >= 0; i--)
-+		for (j = dd->pdata->algs_info[i].registered - 1; j >= 0; j--)
-+			crypto_unregister_ahash(
-+					&dd->pdata->algs_info[i].algs_list[j]);
- 	pm_runtime_disable(dev);
- 	dma_release_channel(dd->dma_lch);
- dma_err:
-@@ -1597,7 +1758,7 @@ data_err:
- static int omap_sham_remove(struct platform_device *pdev)
- {
- 	static struct omap_sham_dev *dd;
--	int i;
-+	int i, j;
- 
- 	dd = platform_get_drvdata(pdev);
- 	if (!dd)
-@@ -1605,8 +1766,10 @@ static int omap_sham_remove(struct platform_device *pdev)
- 	spin_lock(&sham.lock);
- 	list_del(&dd->list);
- 	spin_unlock(&sham.lock);
--	for (i = 0; i < ARRAY_SIZE(algs); i++)
--		crypto_unregister_ahash(&algs[i]);
-+	for (i = dd->pdata->algs_info_size - 1; i >= 0; i--)
-+		for (j = dd->pdata->algs_info[i].registered - 1; j >= 0; j--)
-+			crypto_unregister_ahash(
-+					&dd->pdata->algs_info[i].algs_list[j]);
- 	tasklet_kill(&dd->done_task);
- 	pm_runtime_disable(&pdev->dev);
- 	dma_release_channel(dd->dma_lch);
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0025-crypto-omap-aes-Remmove-unnecessary-pr_info-noise.patch b/patches/crypto/0025-crypto-omap-aes-Remmove-unnecessary-pr_info-noise.patch
deleted file mode 100644
index 32fd248e95cdecdb143e0d647c2a8b25ce00e16b..0000000000000000000000000000000000000000
--- a/patches/crypto/0025-crypto-omap-aes-Remmove-unnecessary-pr_info-noise.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 5056829e989fa097a14ad005b42ffd347fc7ad93 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Thu, 20 Dec 2012 09:58:48 -0700
-Subject: [PATCH 25/34] crypto: omap-aes - Remmove unnecessary pr_info noise
-
-Remove the unnecessary pr_info() calls from omap_aes_probe()
-and omap_aes_mod_init().
-
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-aes.c |    4 ----
- 1 files changed, 0 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
-index e66e8ee..481da71 100644
---- a/drivers/crypto/omap-aes.c
-+++ b/drivers/crypto/omap-aes.c
-@@ -880,8 +880,6 @@ static int omap_aes_probe(struct platform_device *pdev)
- 			goto err_algs;
- 	}
- 
--	pr_info("probe() done\n");
--
- 	return 0;
- err_algs:
- 	for (j = 0; j < i; j++)
-@@ -938,8 +936,6 @@ static struct platform_driver omap_aes_driver = {
- 
- static int __init omap_aes_mod_init(void)
- {
--	pr_info("loading %s driver\n", "omap-aes");
--
- 	return  platform_driver_register(&omap_aes_driver);
- }
- 
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0026-crypto-omap-aes-Don-t-reset-controller-for-every-ope.patch b/patches/crypto/0026-crypto-omap-aes-Don-t-reset-controller-for-every-ope.patch
deleted file mode 100644
index e958a7626e7c7c5aed0ac80d3020de1be2a1d0b0..0000000000000000000000000000000000000000
--- a/patches/crypto/0026-crypto-omap-aes-Don-t-reset-controller-for-every-ope.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From d6e8d50bf2455913658531b3fdbc8956a5a081dc Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Wed, 28 Nov 2012 15:14:05 -0700
-Subject: [PATCH 26/34] crypto: omap-aes - Don't reset controller for every
- operation
-
-The AES controller only needs to be reset once and that will
-be done by the hwmod infrastructure, if possible.  Therefore,
-remove the reset code from the omap-aes driver.
-
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-aes.c |   27 ---------------------------
- 1 files changed, 0 insertions(+), 27 deletions(-)
-
-diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
-index 481da71..33cd783 100644
---- a/drivers/crypto/omap-aes.c
-+++ b/drivers/crypto/omap-aes.c
-@@ -160,19 +160,6 @@ static void omap_aes_write_n(struct omap_aes_dev *dd, u32 offset,
- 		omap_aes_write(dd, offset, *value);
- }
- 
--static int omap_aes_wait(struct omap_aes_dev *dd, u32 offset, u32 bit)
--{
--	unsigned long timeout = jiffies + DEFAULT_TIMEOUT;
--
--	while (!(omap_aes_read(dd, offset) & bit)) {
--		if (time_is_before_jiffies(timeout)) {
--			dev_err(dd->dev, "omap-aes timeout\n");
--			return -ETIMEDOUT;
--		}
--	}
--	return 0;
--}
--
- static int omap_aes_hw_init(struct omap_aes_dev *dd)
- {
- 	/*
-@@ -183,20 +170,6 @@ static int omap_aes_hw_init(struct omap_aes_dev *dd)
- 	clk_enable(dd->iclk);
- 
- 	if (!(dd->flags & FLAGS_INIT)) {
--		/* is it necessary to reset before every operation? */
--		omap_aes_write_mask(dd, AES_REG_MASK, AES_REG_MASK_SOFTRESET,
--					AES_REG_MASK_SOFTRESET);
--		/*
--		 * prevent OCP bus error (SRESP) in case an access to the module
--		 * is performed while the module is coming out of soft reset
--		 */
--		__asm__ __volatile__("nop");
--		__asm__ __volatile__("nop");
--
--		if (omap_aes_wait(dd, AES_REG_SYSSTATUS,
--				AES_REG_SYSSTATUS_RESETDONE))
--			return -ETIMEDOUT;
--
- 		dd->flags |= FLAGS_INIT;
- 		dd->err = 0;
- 	}
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0027-crypto-omap-aes-Convert-to-use-pm_runtime-API.patch b/patches/crypto/0027-crypto-omap-aes-Convert-to-use-pm_runtime-API.patch
deleted file mode 100644
index 9ae9393c3677a084a31b1f40c1b43fd23513271f..0000000000000000000000000000000000000000
--- a/patches/crypto/0027-crypto-omap-aes-Convert-to-use-pm_runtime-API.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From 9c597194e22c4a43c7333f3bfd6d2084178b74bd Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Sun, 11 Nov 2012 21:00:37 -0700
-Subject: [PATCH 27/34] crypto: omap-aes - Convert to use pm_runtime API
-
-Convert the omap-aes crypto driver to use the
-pm_runtime API instead of the clk API.
-
-CC: Kevin Hilman <khilman@deeprootsystems.com>
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-aes.c |   29 +++++++++++------------------
- 1 files changed, 11 insertions(+), 18 deletions(-)
-
-diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
-index 33cd783..c229852 100644
---- a/drivers/crypto/omap-aes.c
-+++ b/drivers/crypto/omap-aes.c
-@@ -19,10 +19,10 @@
- #include <linux/init.h>
- #include <linux/errno.h>
- #include <linux/kernel.h>
--#include <linux/clk.h>
- #include <linux/platform_device.h>
- #include <linux/scatterlist.h>
- #include <linux/dma-mapping.h>
-+#include <linux/pm_runtime.h>
- #include <linux/io.h>
- #include <linux/crypto.h>
- #include <linux/interrupt.h>
-@@ -96,7 +96,6 @@ struct omap_aes_dev {
- 	struct list_head	list;
- 	unsigned long		phys_base;
- 	void __iomem		*io_base;
--	struct clk		*iclk;
- 	struct omap_aes_ctx	*ctx;
- 	struct device		*dev;
- 	unsigned long		flags;
-@@ -167,7 +166,7 @@ static int omap_aes_hw_init(struct omap_aes_dev *dd)
- 	 * It may be long delays between requests.
- 	 * Device might go to off mode to save power.
- 	 */
--	clk_enable(dd->iclk);
-+	pm_runtime_get_sync(dd->dev);
- 
- 	if (!(dd->flags & FLAGS_INIT)) {
- 		dd->flags |= FLAGS_INIT;
-@@ -518,7 +517,7 @@ static void omap_aes_finish_req(struct omap_aes_dev *dd, int err)
- 
- 	pr_debug("err: %d\n", err);
- 
--	clk_disable(dd->iclk);
-+	pm_runtime_put_sync(dd->dev);
- 	dd->flags &= ~FLAGS_BUSY;
- 
- 	req->base.complete(&req->base, err);
-@@ -813,26 +812,21 @@ static int omap_aes_probe(struct platform_device *pdev)
- 	else
- 		dd->dma_in = res->start;
- 
--	/* Initializing the clock */
--	dd->iclk = clk_get(dev, "ick");
--	if (IS_ERR(dd->iclk)) {
--		dev_err(dev, "clock intialization failed.\n");
--		err = PTR_ERR(dd->iclk);
--		goto err_res;
--	}
--
- 	dd->io_base = ioremap(dd->phys_base, SZ_4K);
- 	if (!dd->io_base) {
- 		dev_err(dev, "can't ioremap\n");
- 		err = -ENOMEM;
--		goto err_io;
-+		goto err_res;
- 	}
- 
--	clk_enable(dd->iclk);
-+	pm_runtime_enable(dev);
-+	pm_runtime_get_sync(dev);
-+
- 	reg = omap_aes_read(dd, AES_REG_REV);
- 	dev_info(dev, "OMAP AES hw accel rev: %u.%u\n",
- 		 (reg & AES_REG_REV_MAJOR) >> 4, reg & AES_REG_REV_MINOR);
--	clk_disable(dd->iclk);
-+
-+	pm_runtime_put_sync(dev);
- 
- 	tasklet_init(&dd->done_task, omap_aes_done_task, (unsigned long)dd);
- 	tasklet_init(&dd->queue_task, omap_aes_queue_task, (unsigned long)dd);
-@@ -862,8 +856,7 @@ err_dma:
- 	tasklet_kill(&dd->done_task);
- 	tasklet_kill(&dd->queue_task);
- 	iounmap(dd->io_base);
--err_io:
--	clk_put(dd->iclk);
-+	pm_runtime_disable(dev);
- err_res:
- 	kfree(dd);
- 	dd = NULL;
-@@ -891,7 +884,7 @@ static int omap_aes_remove(struct platform_device *pdev)
- 	tasklet_kill(&dd->queue_task);
- 	omap_aes_dma_cleanup(dd);
- 	iounmap(dd->io_base);
--	clk_put(dd->iclk);
-+	pm_runtime_disable(dd->dev);
- 	kfree(dd);
- 	dd = NULL;
- 
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0028-crypto-omap-aes-Add-suspend-resume-support.patch b/patches/crypto/0028-crypto-omap-aes-Add-suspend-resume-support.patch
deleted file mode 100644
index 5f2b30b9fcb01001351e94e3d77d8647aff68216..0000000000000000000000000000000000000000
--- a/patches/crypto/0028-crypto-omap-aes-Add-suspend-resume-support.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From bbc77969076a663d2c4371e0ffe6df2e998ef10e Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Thu, 20 Dec 2012 10:24:33 -0700
-Subject: [PATCH 28/34] crypto: omap-aes - Add suspend/resume support
-
-Add suspend/resume support to the OMAP AES driver.
-
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-aes.c |   19 +++++++++++++++++++
- 1 files changed, 19 insertions(+), 0 deletions(-)
-
-diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
-index c229852..3262139 100644
---- a/drivers/crypto/omap-aes.c
-+++ b/drivers/crypto/omap-aes.c
-@@ -891,12 +891,31 @@ static int omap_aes_remove(struct platform_device *pdev)
- 	return 0;
- }
- 
-+#ifdef CONFIG_PM_SLEEP
-+static int omap_aes_suspend(struct device *dev)
-+{
-+	pm_runtime_put_sync(dev);
-+	return 0;
-+}
-+
-+static int omap_aes_resume(struct device *dev)
-+{
-+	pm_runtime_get_sync(dev);
-+	return 0;
-+}
-+#endif
-+
-+static const struct dev_pm_ops omap_aes_pm_ops = {
-+	SET_SYSTEM_SLEEP_PM_OPS(omap_aes_suspend, omap_aes_resume)
-+};
-+
- static struct platform_driver omap_aes_driver = {
- 	.probe	= omap_aes_probe,
- 	.remove	= omap_aes_remove,
- 	.driver	= {
- 		.name	= "omap-aes",
- 		.owner	= THIS_MODULE,
-+		.pm	= &omap_aes_pm_ops,
- 	},
- };
- 
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0029-crypto-omap-aes-Add-code-to-use-dmaengine-API.patch b/patches/crypto/0029-crypto-omap-aes-Add-code-to-use-dmaengine-API.patch
deleted file mode 100644
index dfa34a56f7320f54611645af59bbfc7a0f00d80e..0000000000000000000000000000000000000000
--- a/patches/crypto/0029-crypto-omap-aes-Add-code-to-use-dmaengine-API.patch
+++ /dev/null
@@ -1,388 +0,0 @@
-From 0278420ada4c879ab43b969c65da72806eb5e69a Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Wed, 14 Nov 2012 09:30:10 -0700
-Subject: [PATCH 29/34] crypto: omap-aes - Add code to use dmaengine API
-
-Add code to use the new dmaengine API alongside
-the existing DMA code that uses the private
-OMAP DMA API.  The API to use is chosen by
-defining or undefining 'OMAP_AES_DMA_PRIVATE'.
-
-CC: Russell King <rmk+kernel@arm.linux.org.uk>
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-aes.c |  184 ++++++++++++++++++++++++++++++++++++++++++++-
- 1 files changed, 183 insertions(+), 1 deletions(-)
-
-diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
-index 3262139..14ec9e2 100644
---- a/drivers/crypto/omap-aes.c
-+++ b/drivers/crypto/omap-aes.c
-@@ -12,6 +12,8 @@
-  *
-  */
- 
-+#define OMAP_AES_DMA_PRIVATE
-+
- #define pr_fmt(fmt) "%s: " fmt, __func__
- 
- #include <linux/err.h>
-@@ -22,6 +24,8 @@
- #include <linux/platform_device.h>
- #include <linux/scatterlist.h>
- #include <linux/dma-mapping.h>
-+#include <linux/dmaengine.h>
-+#include <linux/omap-dma.h>
- #include <linux/pm_runtime.h>
- #include <linux/io.h>
- #include <linux/crypto.h>
-@@ -29,7 +33,8 @@
- #include <crypto/scatterwalk.h>
- #include <crypto/aes.h>
- 
--#include <linux/omap-dma.h>
-+#define DST_MAXBURST			4
-+#define DMA_MIN				(DST_MAXBURST * sizeof(u32))
- 
- /* OMAP TRM gives bitfields as start:end, where start is the higher bit
-    number. For example 7:0 */
-@@ -110,19 +115,33 @@ struct omap_aes_dev {
- 	struct ablkcipher_request	*req;
- 	size_t				total;
- 	struct scatterlist		*in_sg;
-+#ifndef OMAP_AES_DMA_PRIVATE
-+	struct scatterlist		in_sgl;
-+#endif
- 	size_t				in_offset;
- 	struct scatterlist		*out_sg;
-+#ifndef OMAP_AES_DMA_PRIVATE
-+	struct scatterlist		out_sgl;
-+#endif
- 	size_t				out_offset;
- 
- 	size_t			buflen;
- 	void			*buf_in;
- 	size_t			dma_size;
- 	int			dma_in;
-+#ifdef OMAP_AES_DMA_PRIVATE
- 	int			dma_lch_in;
-+#else
-+	struct dma_chan		*dma_lch_in;
-+#endif
- 	dma_addr_t		dma_addr_in;
- 	void			*buf_out;
- 	int			dma_out;
-+#ifdef OMAP_AES_DMA_PRIVATE
- 	int			dma_lch_out;
-+#else
-+	struct dma_chan		*dma_lch_out;
-+#endif
- 	dma_addr_t		dma_addr_out;
- };
- 
-@@ -187,10 +206,17 @@ static int omap_aes_write_ctrl(struct omap_aes_dev *dd)
- 		return err;
- 
- 	val = 0;
-+#ifdef OMAP_AES_DMA_PRIVATE
- 	if (dd->dma_lch_out >= 0)
- 		val |= AES_REG_MASK_DMA_OUT_EN;
- 	if (dd->dma_lch_in >= 0)
- 		val |= AES_REG_MASK_DMA_IN_EN;
-+#else
-+	if (dd->dma_lch_out != NULL)
-+		val |= AES_REG_MASK_DMA_OUT_EN;
-+	if (dd->dma_lch_in != NULL)
-+		val |= AES_REG_MASK_DMA_IN_EN;
-+#endif
- 
- 	mask = AES_REG_MASK_DMA_IN_EN | AES_REG_MASK_DMA_OUT_EN;
- 
-@@ -218,6 +244,7 @@ static int omap_aes_write_ctrl(struct omap_aes_dev *dd)
- 
- 	omap_aes_write_mask(dd, AES_REG_CTRL, val, mask);
- 
-+#ifdef OMAP_AES_DMA_PRIVATE
- 	/* IN */
- 	omap_set_dma_dest_params(dd->dma_lch_in, 0, OMAP_DMA_AMODE_CONSTANT,
- 				 dd->phys_base + AES_REG_DATA, 0, 4);
-@@ -231,6 +258,7 @@ static int omap_aes_write_ctrl(struct omap_aes_dev *dd)
- 
- 	omap_set_dma_src_burst_mode(dd->dma_lch_out, OMAP_DMA_DATA_BURST_4);
- 	omap_set_dma_dest_burst_mode(dd->dma_lch_out, OMAP_DMA_DATA_BURST_4);
-+#endif
- 
- 	return 0;
- }
-@@ -256,6 +284,7 @@ static struct omap_aes_dev *omap_aes_find_dev(struct omap_aes_ctx *ctx)
- 	return dd;
- }
- 
-+#ifdef OMAP_AES_DMA_PRIVATE
- static void omap_aes_dma_callback(int lch, u16 ch_status, void *data)
- {
- 	struct omap_aes_dev *dd = data;
-@@ -271,13 +300,30 @@ static void omap_aes_dma_callback(int lch, u16 ch_status, void *data)
- 	/* dma_lch_out - completed */
- 	tasklet_schedule(&dd->done_task);
- }
-+#else
-+static void omap_aes_dma_out_callback(void *data)
-+{
-+	struct omap_aes_dev *dd = data;
-+
-+	/* dma_lch_out - completed */
-+	tasklet_schedule(&dd->done_task);
-+}
-+#endif
- 
- static int omap_aes_dma_init(struct omap_aes_dev *dd)
- {
- 	int err = -ENOMEM;
-+#ifndef OMAP_AES_DMA_PRIVATE
-+	dma_cap_mask_t mask;
-+#endif
- 
-+#ifdef OMAP_AES_DMA_PRIVATE
- 	dd->dma_lch_out = -1;
- 	dd->dma_lch_in = -1;
-+#else
-+	dd->dma_lch_out = NULL;
-+	dd->dma_lch_in = NULL;
-+#endif
- 
- 	dd->buf_in = (void *)__get_free_pages(GFP_KERNEL, OMAP_AES_CACHE_SIZE);
- 	dd->buf_out = (void *)__get_free_pages(GFP_KERNEL, OMAP_AES_CACHE_SIZE);
-@@ -306,6 +352,7 @@ static int omap_aes_dma_init(struct omap_aes_dev *dd)
- 		goto err_map_out;
- 	}
- 
-+#ifdef OMAP_AES_DMA_PRIVATE
- 	err = omap_request_dma(dd->dma_in, "omap-aes-rx",
- 			       omap_aes_dma_callback, dd, &dd->dma_lch_in);
- 	if (err) {
-@@ -318,11 +365,33 @@ static int omap_aes_dma_init(struct omap_aes_dev *dd)
- 		dev_err(dd->dev, "Unable to request DMA channel\n");
- 		goto err_dma_out;
- 	}
-+#else
-+	dma_cap_zero(mask);
-+	dma_cap_set(DMA_SLAVE, mask);
-+
-+	dd->dma_lch_in = dma_request_channel(mask, omap_dma_filter_fn,
-+					     &dd->dma_in);
-+	if (!dd->dma_lch_in) {
-+		dev_err(dd->dev, "Unable to request in DMA channel\n");
-+		goto err_dma_in;
-+	}
-+
-+	dd->dma_lch_out = dma_request_channel(mask, omap_dma_filter_fn,
-+					     &dd->dma_out);
-+	if (!dd->dma_lch_out) {
-+		dev_err(dd->dev, "Unable to request out DMA channel\n");
-+		goto err_dma_out;
-+	}
-+#endif
- 
- 	return 0;
- 
- err_dma_out:
-+#ifdef OMAP_AES_DMA_PRIVATE
- 	omap_free_dma(dd->dma_lch_in);
-+#else
-+	dma_release_channel(dd->dma_lch_in);
-+#endif
- err_dma_in:
- 	dma_unmap_single(dd->dev, dd->dma_addr_out, dd->buflen,
- 			 DMA_FROM_DEVICE);
-@@ -339,8 +408,13 @@ err_alloc:
- 
- static void omap_aes_dma_cleanup(struct omap_aes_dev *dd)
- {
-+#ifdef OMAP_AES_DMA_PRIVATE
- 	omap_free_dma(dd->dma_lch_out);
- 	omap_free_dma(dd->dma_lch_in);
-+#else
-+	dma_release_channel(dd->dma_lch_out);
-+	dma_release_channel(dd->dma_lch_in);
-+#endif
- 	dma_unmap_single(dd->dev, dd->dma_addr_out, dd->buflen,
- 			 DMA_FROM_DEVICE);
- 	dma_unmap_single(dd->dev, dd->dma_addr_in, dd->buflen, DMA_TO_DEVICE);
-@@ -398,12 +472,24 @@ static int sg_copy(struct scatterlist **sg, size_t *offset, void *buf,
- 	return off;
- }
- 
-+#ifdef OMAP_AES_DMA_PRIVATE
- static int omap_aes_crypt_dma(struct crypto_tfm *tfm, dma_addr_t dma_addr_in,
- 			       dma_addr_t dma_addr_out, int length)
-+#else
-+static int omap_aes_crypt_dma(struct crypto_tfm *tfm,
-+		struct scatterlist *in_sg, struct scatterlist *out_sg)
-+#endif
- {
- 	struct omap_aes_ctx *ctx = crypto_tfm_ctx(tfm);
- 	struct omap_aes_dev *dd = ctx->dd;
-+#ifdef OMAP_AES_DMA_PRIVATE
- 	int len32;
-+#else
-+	struct dma_async_tx_descriptor *tx_in, *tx_out;
-+	struct dma_slave_config cfg;
-+	dma_addr_t dma_addr_in = sg_dma_address(in_sg);
-+	int ret, length = sg_dma_len(in_sg);
-+#endif
- 
- 	pr_debug("len: %d\n", length);
- 
-@@ -413,6 +499,7 @@ static int omap_aes_crypt_dma(struct crypto_tfm *tfm, dma_addr_t dma_addr_in,
- 		dma_sync_single_for_device(dd->dev, dma_addr_in, length,
- 					   DMA_TO_DEVICE);
- 
-+#ifdef OMAP_AES_DMA_PRIVATE
- 	len32 = DIV_ROUND_UP(length, sizeof(u32));
- 
- 	/* IN */
-@@ -433,6 +520,60 @@ static int omap_aes_crypt_dma(struct crypto_tfm *tfm, dma_addr_t dma_addr_in,
- 
- 	omap_start_dma(dd->dma_lch_in);
- 	omap_start_dma(dd->dma_lch_out);
-+#else
-+	memset(&cfg, 0, sizeof(cfg));
-+
-+	cfg.src_addr = dd->phys_base + AES_REG_DATA;
-+	cfg.dst_addr = dd->phys_base + AES_REG_DATA;
-+	cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-+	cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-+	cfg.src_maxburst = DST_MAXBURST;
-+	cfg.dst_maxburst = DST_MAXBURST;
-+
-+	/* IN */
-+	ret = dmaengine_slave_config(dd->dma_lch_in, &cfg);
-+	if (ret) {
-+		dev_err(dd->dev, "can't configure IN dmaengine slave: %d\n",
-+			ret);
-+		return ret;
-+	}
-+
-+	tx_in = dmaengine_prep_slave_sg(dd->dma_lch_in, in_sg, 1,
-+					DMA_MEM_TO_DEV,
-+					DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-+	if (!tx_in) {
-+		dev_err(dd->dev, "IN prep_slave_sg() failed\n");
-+		return -EINVAL;
-+	}
-+
-+	/* No callback necessary */
-+	tx_in->callback_param = dd;
-+
-+	/* OUT */
-+	ret = dmaengine_slave_config(dd->dma_lch_out, &cfg);
-+	if (ret) {
-+		dev_err(dd->dev, "can't configure OUT dmaengine slave: %d\n",
-+			ret);
-+		return ret;
-+	}
-+
-+	tx_out = dmaengine_prep_slave_sg(dd->dma_lch_out, out_sg, 1,
-+					DMA_DEV_TO_MEM,
-+					DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-+	if (!tx_out) {
-+		dev_err(dd->dev, "OUT prep_slave_sg() failed\n");
-+		return -EINVAL;
-+	}
-+
-+	tx_out->callback = omap_aes_dma_out_callback;
-+	tx_out->callback_param = dd;
-+
-+	dmaengine_submit(tx_in);
-+	dmaengine_submit(tx_out);
-+
-+	dma_async_issue_pending(dd->dma_lch_in);
-+	dma_async_issue_pending(dd->dma_lch_out);
-+#endif
- 
- 	/* start DMA or disable idle mode */
- 	omap_aes_write_mask(dd, AES_REG_MASK, AES_REG_MASK_START,
-@@ -448,6 +589,10 @@ static int omap_aes_crypt_dma_start(struct omap_aes_dev *dd)
- 	int err, fast = 0, in, out;
- 	size_t count;
- 	dma_addr_t addr_in, addr_out;
-+#ifndef OMAP_AES_DMA_PRIVATE
-+	struct scatterlist *in_sg, *out_sg;
-+	int len32;
-+#endif
- 
- 	pr_debug("total: %d\n", dd->total);
- 
-@@ -486,6 +631,11 @@ static int omap_aes_crypt_dma_start(struct omap_aes_dev *dd)
- 		addr_in = sg_dma_address(dd->in_sg);
- 		addr_out = sg_dma_address(dd->out_sg);
- 
-+#ifndef OMAP_AES_DMA_PRIVATE
-+		in_sg = dd->in_sg;
-+		out_sg = dd->out_sg;
-+#endif
-+
- 		dd->flags |= FLAGS_FAST;
- 
- 	} else {
-@@ -493,6 +643,29 @@ static int omap_aes_crypt_dma_start(struct omap_aes_dev *dd)
- 		count = sg_copy(&dd->in_sg, &dd->in_offset, dd->buf_in,
- 				 dd->buflen, dd->total, 0);
- 
-+#ifndef OMAP_AES_DMA_PRIVATE
-+		len32 = DIV_ROUND_UP(count, DMA_MIN) * DMA_MIN;
-+
-+		/*
-+		 * The data going into the AES module has been copied
-+		 * to a local buffer and the data coming out will go
-+		 * into a local buffer so set up local SG entries for
-+		 * both.
-+		 */
-+		sg_init_table(&dd->in_sgl, 1);
-+		dd->in_sgl.offset = dd->in_offset;
-+		sg_dma_len(&dd->in_sgl) = len32;
-+		sg_dma_address(&dd->in_sgl) = dd->dma_addr_in;
-+
-+		sg_init_table(&dd->out_sgl, 1);
-+		dd->out_sgl.offset = dd->out_offset;
-+		sg_dma_len(&dd->out_sgl) = len32;
-+		sg_dma_address(&dd->out_sgl) = dd->dma_addr_out;
-+
-+		in_sg = &dd->in_sgl;
-+		out_sg = &dd->out_sgl;
-+#endif
-+
- 		addr_in = dd->dma_addr_in;
- 		addr_out = dd->dma_addr_out;
- 
-@@ -502,7 +675,11 @@ static int omap_aes_crypt_dma_start(struct omap_aes_dev *dd)
- 
- 	dd->total -= count;
- 
-+#ifdef OMAP_AES_DMA_PRIVATE
- 	err = omap_aes_crypt_dma(tfm, addr_in, addr_out, count);
-+#else
-+	err = omap_aes_crypt_dma(tfm, in_sg, out_sg);
-+#endif
- 	if (err) {
- 		dma_unmap_sg(dd->dev, dd->in_sg, 1, DMA_TO_DEVICE);
- 		dma_unmap_sg(dd->dev, dd->out_sg, 1, DMA_TO_DEVICE);
-@@ -532,8 +709,13 @@ static int omap_aes_crypt_dma_stop(struct omap_aes_dev *dd)
- 
- 	omap_aes_write_mask(dd, AES_REG_MASK, 0, AES_REG_MASK_START);
- 
-+#ifdef OMAP_AES_DMA_PRIVATE
- 	omap_stop_dma(dd->dma_lch_in);
- 	omap_stop_dma(dd->dma_lch_out);
-+#else
-+	dmaengine_terminate_all(dd->dma_lch_in);
-+	dmaengine_terminate_all(dd->dma_lch_out);
-+#endif
- 
- 	if (dd->flags & FLAGS_FAST) {
- 		dma_unmap_sg(dd->dev, dd->out_sg, 1, DMA_FROM_DEVICE);
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0030-crypto-omap-aes-Remove-usage-of-private-DMA-API.patch b/patches/crypto/0030-crypto-omap-aes-Remove-usage-of-private-DMA-API.patch
deleted file mode 100644
index b92dfa46abc92a991399bc1ba4dbe33357152448..0000000000000000000000000000000000000000
--- a/patches/crypto/0030-crypto-omap-aes-Remove-usage-of-private-DMA-API.patch
+++ /dev/null
@@ -1,331 +0,0 @@
-From 9b9275033b42c63ffc967bf211a5e7c2bc381157 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Thu, 15 Nov 2012 22:11:36 -0700
-Subject: [PATCH 30/34] crypto: omap-aes - Remove usage of private DMA API
-
-Remove usage of the private OMAP DMA API.
-The dmaengine API will be used instead.
-
-CC: Russell King <rmk+kernel@arm.linux.org.uk>
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-aes.c |  133 ---------------------------------------------
- 1 files changed, 0 insertions(+), 133 deletions(-)
-
-diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
-index 14ec9e2..faf522f 100644
---- a/drivers/crypto/omap-aes.c
-+++ b/drivers/crypto/omap-aes.c
-@@ -12,8 +12,6 @@
-  *
-  */
- 
--#define OMAP_AES_DMA_PRIVATE
--
- #define pr_fmt(fmt) "%s: " fmt, __func__
- 
- #include <linux/err.h>
-@@ -115,33 +113,21 @@ struct omap_aes_dev {
- 	struct ablkcipher_request	*req;
- 	size_t				total;
- 	struct scatterlist		*in_sg;
--#ifndef OMAP_AES_DMA_PRIVATE
- 	struct scatterlist		in_sgl;
--#endif
- 	size_t				in_offset;
- 	struct scatterlist		*out_sg;
--#ifndef OMAP_AES_DMA_PRIVATE
- 	struct scatterlist		out_sgl;
--#endif
- 	size_t				out_offset;
- 
- 	size_t			buflen;
- 	void			*buf_in;
- 	size_t			dma_size;
- 	int			dma_in;
--#ifdef OMAP_AES_DMA_PRIVATE
--	int			dma_lch_in;
--#else
- 	struct dma_chan		*dma_lch_in;
--#endif
- 	dma_addr_t		dma_addr_in;
- 	void			*buf_out;
- 	int			dma_out;
--#ifdef OMAP_AES_DMA_PRIVATE
--	int			dma_lch_out;
--#else
- 	struct dma_chan		*dma_lch_out;
--#endif
- 	dma_addr_t		dma_addr_out;
- };
- 
-@@ -206,17 +192,10 @@ static int omap_aes_write_ctrl(struct omap_aes_dev *dd)
- 		return err;
- 
- 	val = 0;
--#ifdef OMAP_AES_DMA_PRIVATE
--	if (dd->dma_lch_out >= 0)
--		val |= AES_REG_MASK_DMA_OUT_EN;
--	if (dd->dma_lch_in >= 0)
--		val |= AES_REG_MASK_DMA_IN_EN;
--#else
- 	if (dd->dma_lch_out != NULL)
- 		val |= AES_REG_MASK_DMA_OUT_EN;
- 	if (dd->dma_lch_in != NULL)
- 		val |= AES_REG_MASK_DMA_IN_EN;
--#endif
- 
- 	mask = AES_REG_MASK_DMA_IN_EN | AES_REG_MASK_DMA_OUT_EN;
- 
-@@ -244,22 +223,6 @@ static int omap_aes_write_ctrl(struct omap_aes_dev *dd)
- 
- 	omap_aes_write_mask(dd, AES_REG_CTRL, val, mask);
- 
--#ifdef OMAP_AES_DMA_PRIVATE
--	/* IN */
--	omap_set_dma_dest_params(dd->dma_lch_in, 0, OMAP_DMA_AMODE_CONSTANT,
--				 dd->phys_base + AES_REG_DATA, 0, 4);
--
--	omap_set_dma_dest_burst_mode(dd->dma_lch_in, OMAP_DMA_DATA_BURST_4);
--	omap_set_dma_src_burst_mode(dd->dma_lch_in, OMAP_DMA_DATA_BURST_4);
--
--	/* OUT */
--	omap_set_dma_src_params(dd->dma_lch_out, 0, OMAP_DMA_AMODE_CONSTANT,
--				dd->phys_base + AES_REG_DATA, 0, 4);
--
--	omap_set_dma_src_burst_mode(dd->dma_lch_out, OMAP_DMA_DATA_BURST_4);
--	omap_set_dma_dest_burst_mode(dd->dma_lch_out, OMAP_DMA_DATA_BURST_4);
--#endif
--
- 	return 0;
- }
- 
-@@ -284,23 +247,6 @@ static struct omap_aes_dev *omap_aes_find_dev(struct omap_aes_ctx *ctx)
- 	return dd;
- }
- 
--#ifdef OMAP_AES_DMA_PRIVATE
--static void omap_aes_dma_callback(int lch, u16 ch_status, void *data)
--{
--	struct omap_aes_dev *dd = data;
--
--	if (ch_status != OMAP_DMA_BLOCK_IRQ) {
--		pr_err("omap-aes DMA error status: 0x%hx\n", ch_status);
--		dd->err = -EIO;
--		dd->flags &= ~FLAGS_INIT; /* request to re-initialize */
--	} else if (lch == dd->dma_lch_in) {
--		return;
--	}
--
--	/* dma_lch_out - completed */
--	tasklet_schedule(&dd->done_task);
--}
--#else
- static void omap_aes_dma_out_callback(void *data)
- {
- 	struct omap_aes_dev *dd = data;
-@@ -308,22 +254,14 @@ static void omap_aes_dma_out_callback(void *data)
- 	/* dma_lch_out - completed */
- 	tasklet_schedule(&dd->done_task);
- }
--#endif
- 
- static int omap_aes_dma_init(struct omap_aes_dev *dd)
- {
- 	int err = -ENOMEM;
--#ifndef OMAP_AES_DMA_PRIVATE
- 	dma_cap_mask_t mask;
--#endif
- 
--#ifdef OMAP_AES_DMA_PRIVATE
--	dd->dma_lch_out = -1;
--	dd->dma_lch_in = -1;
--#else
- 	dd->dma_lch_out = NULL;
- 	dd->dma_lch_in = NULL;
--#endif
- 
- 	dd->buf_in = (void *)__get_free_pages(GFP_KERNEL, OMAP_AES_CACHE_SIZE);
- 	dd->buf_out = (void *)__get_free_pages(GFP_KERNEL, OMAP_AES_CACHE_SIZE);
-@@ -352,20 +290,6 @@ static int omap_aes_dma_init(struct omap_aes_dev *dd)
- 		goto err_map_out;
- 	}
- 
--#ifdef OMAP_AES_DMA_PRIVATE
--	err = omap_request_dma(dd->dma_in, "omap-aes-rx",
--			       omap_aes_dma_callback, dd, &dd->dma_lch_in);
--	if (err) {
--		dev_err(dd->dev, "Unable to request DMA channel\n");
--		goto err_dma_in;
--	}
--	err = omap_request_dma(dd->dma_out, "omap-aes-tx",
--			       omap_aes_dma_callback, dd, &dd->dma_lch_out);
--	if (err) {
--		dev_err(dd->dev, "Unable to request DMA channel\n");
--		goto err_dma_out;
--	}
--#else
- 	dma_cap_zero(mask);
- 	dma_cap_set(DMA_SLAVE, mask);
- 
-@@ -382,16 +306,11 @@ static int omap_aes_dma_init(struct omap_aes_dev *dd)
- 		dev_err(dd->dev, "Unable to request out DMA channel\n");
- 		goto err_dma_out;
- 	}
--#endif
- 
- 	return 0;
- 
- err_dma_out:
--#ifdef OMAP_AES_DMA_PRIVATE
--	omap_free_dma(dd->dma_lch_in);
--#else
- 	dma_release_channel(dd->dma_lch_in);
--#endif
- err_dma_in:
- 	dma_unmap_single(dd->dev, dd->dma_addr_out, dd->buflen,
- 			 DMA_FROM_DEVICE);
-@@ -408,13 +327,8 @@ err_alloc:
- 
- static void omap_aes_dma_cleanup(struct omap_aes_dev *dd)
- {
--#ifdef OMAP_AES_DMA_PRIVATE
--	omap_free_dma(dd->dma_lch_out);
--	omap_free_dma(dd->dma_lch_in);
--#else
- 	dma_release_channel(dd->dma_lch_out);
- 	dma_release_channel(dd->dma_lch_in);
--#endif
- 	dma_unmap_single(dd->dev, dd->dma_addr_out, dd->buflen,
- 			 DMA_FROM_DEVICE);
- 	dma_unmap_single(dd->dev, dd->dma_addr_in, dd->buflen, DMA_TO_DEVICE);
-@@ -472,24 +386,15 @@ static int sg_copy(struct scatterlist **sg, size_t *offset, void *buf,
- 	return off;
- }
- 
--#ifdef OMAP_AES_DMA_PRIVATE
--static int omap_aes_crypt_dma(struct crypto_tfm *tfm, dma_addr_t dma_addr_in,
--			       dma_addr_t dma_addr_out, int length)
--#else
- static int omap_aes_crypt_dma(struct crypto_tfm *tfm,
- 		struct scatterlist *in_sg, struct scatterlist *out_sg)
--#endif
- {
- 	struct omap_aes_ctx *ctx = crypto_tfm_ctx(tfm);
- 	struct omap_aes_dev *dd = ctx->dd;
--#ifdef OMAP_AES_DMA_PRIVATE
--	int len32;
--#else
- 	struct dma_async_tx_descriptor *tx_in, *tx_out;
- 	struct dma_slave_config cfg;
- 	dma_addr_t dma_addr_in = sg_dma_address(in_sg);
- 	int ret, length = sg_dma_len(in_sg);
--#endif
- 
- 	pr_debug("len: %d\n", length);
- 
-@@ -499,28 +404,6 @@ static int omap_aes_crypt_dma(struct crypto_tfm *tfm,
- 		dma_sync_single_for_device(dd->dev, dma_addr_in, length,
- 					   DMA_TO_DEVICE);
- 
--#ifdef OMAP_AES_DMA_PRIVATE
--	len32 = DIV_ROUND_UP(length, sizeof(u32));
--
--	/* IN */
--	omap_set_dma_transfer_params(dd->dma_lch_in, OMAP_DMA_DATA_TYPE_S32,
--				     len32, 1, OMAP_DMA_SYNC_PACKET, dd->dma_in,
--					OMAP_DMA_DST_SYNC);
--
--	omap_set_dma_src_params(dd->dma_lch_in, 0, OMAP_DMA_AMODE_POST_INC,
--				dma_addr_in, 0, 0);
--
--	/* OUT */
--	omap_set_dma_transfer_params(dd->dma_lch_out, OMAP_DMA_DATA_TYPE_S32,
--				     len32, 1, OMAP_DMA_SYNC_PACKET,
--					dd->dma_out, OMAP_DMA_SRC_SYNC);
--
--	omap_set_dma_dest_params(dd->dma_lch_out, 0, OMAP_DMA_AMODE_POST_INC,
--				 dma_addr_out, 0, 0);
--
--	omap_start_dma(dd->dma_lch_in);
--	omap_start_dma(dd->dma_lch_out);
--#else
- 	memset(&cfg, 0, sizeof(cfg));
- 
- 	cfg.src_addr = dd->phys_base + AES_REG_DATA;
-@@ -573,7 +456,6 @@ static int omap_aes_crypt_dma(struct crypto_tfm *tfm,
- 
- 	dma_async_issue_pending(dd->dma_lch_in);
- 	dma_async_issue_pending(dd->dma_lch_out);
--#endif
- 
- 	/* start DMA or disable idle mode */
- 	omap_aes_write_mask(dd, AES_REG_MASK, AES_REG_MASK_START,
-@@ -589,10 +471,8 @@ static int omap_aes_crypt_dma_start(struct omap_aes_dev *dd)
- 	int err, fast = 0, in, out;
- 	size_t count;
- 	dma_addr_t addr_in, addr_out;
--#ifndef OMAP_AES_DMA_PRIVATE
- 	struct scatterlist *in_sg, *out_sg;
- 	int len32;
--#endif
- 
- 	pr_debug("total: %d\n", dd->total);
- 
-@@ -631,10 +511,8 @@ static int omap_aes_crypt_dma_start(struct omap_aes_dev *dd)
- 		addr_in = sg_dma_address(dd->in_sg);
- 		addr_out = sg_dma_address(dd->out_sg);
- 
--#ifndef OMAP_AES_DMA_PRIVATE
- 		in_sg = dd->in_sg;
- 		out_sg = dd->out_sg;
--#endif
- 
- 		dd->flags |= FLAGS_FAST;
- 
-@@ -643,7 +521,6 @@ static int omap_aes_crypt_dma_start(struct omap_aes_dev *dd)
- 		count = sg_copy(&dd->in_sg, &dd->in_offset, dd->buf_in,
- 				 dd->buflen, dd->total, 0);
- 
--#ifndef OMAP_AES_DMA_PRIVATE
- 		len32 = DIV_ROUND_UP(count, DMA_MIN) * DMA_MIN;
- 
- 		/*
-@@ -664,7 +541,6 @@ static int omap_aes_crypt_dma_start(struct omap_aes_dev *dd)
- 
- 		in_sg = &dd->in_sgl;
- 		out_sg = &dd->out_sgl;
--#endif
- 
- 		addr_in = dd->dma_addr_in;
- 		addr_out = dd->dma_addr_out;
-@@ -675,11 +551,7 @@ static int omap_aes_crypt_dma_start(struct omap_aes_dev *dd)
- 
- 	dd->total -= count;
- 
--#ifdef OMAP_AES_DMA_PRIVATE
--	err = omap_aes_crypt_dma(tfm, addr_in, addr_out, count);
--#else
- 	err = omap_aes_crypt_dma(tfm, in_sg, out_sg);
--#endif
- 	if (err) {
- 		dma_unmap_sg(dd->dev, dd->in_sg, 1, DMA_TO_DEVICE);
- 		dma_unmap_sg(dd->dev, dd->out_sg, 1, DMA_TO_DEVICE);
-@@ -709,13 +581,8 @@ static int omap_aes_crypt_dma_stop(struct omap_aes_dev *dd)
- 
- 	omap_aes_write_mask(dd, AES_REG_MASK, 0, AES_REG_MASK_START);
- 
--#ifdef OMAP_AES_DMA_PRIVATE
--	omap_stop_dma(dd->dma_lch_in);
--	omap_stop_dma(dd->dma_lch_out);
--#else
- 	dmaengine_terminate_all(dd->dma_lch_in);
- 	dmaengine_terminate_all(dd->dma_lch_out);
--#endif
- 
- 	if (dd->flags & FLAGS_FAST) {
- 		dma_unmap_sg(dd->dev, dd->out_sg, 1, DMA_FROM_DEVICE);
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0031-crypto-omap-aes-Add-Device-Tree-Support.patch b/patches/crypto/0031-crypto-omap-aes-Add-Device-Tree-Support.patch
deleted file mode 100644
index 866ca2269eaa57dd9857ae89353c387e52d02eda..0000000000000000000000000000000000000000
--- a/patches/crypto/0031-crypto-omap-aes-Add-Device-Tree-Support.patch
+++ /dev/null
@@ -1,198 +0,0 @@
-From 822e2d87dc784f0c7a0295adb8ac9e3df4b53194 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Thu, 20 Dec 2012 13:40:47 -0700
-Subject: [PATCH 31/34] crypto: omap-aes - Add Device Tree Support
-
-Add Device Tree suport to the omap-aes crypto
-driver.  Currently, only support for OMAP2 and
-OMAP3 is being added but support for OMAP4 will
-be added in a subsequent patch.
-
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-aes.c |  123 +++++++++++++++++++++++++++++++++++----------
- 1 files changed, 97 insertions(+), 26 deletions(-)
-
-diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
-index faf522f..dfebd40 100644
---- a/drivers/crypto/omap-aes.c
-+++ b/drivers/crypto/omap-aes.c
-@@ -25,6 +25,9 @@
- #include <linux/dmaengine.h>
- #include <linux/omap-dma.h>
- #include <linux/pm_runtime.h>
-+#include <linux/of.h>
-+#include <linux/of_device.h>
-+#include <linux/of_address.h>
- #include <linux/io.h>
- #include <linux/crypto.h>
- #include <linux/interrupt.h>
-@@ -819,11 +822,97 @@ static struct crypto_alg algs[] = {
- }
- };
- 
-+#ifdef CONFIG_OF
-+static const struct of_device_id omap_aes_of_match[] = {
-+	{
-+		.compatible	= "ti,omap2-aes",
-+	},
-+	{},
-+};
-+MODULE_DEVICE_TABLE(of, omap_aes_of_match);
-+
-+static int omap_aes_get_res_of(struct omap_aes_dev *dd,
-+		struct device *dev, struct resource *res)
-+{
-+	struct device_node *node = dev->of_node;
-+	const struct of_device_id *match;
-+	int err = 0;
-+
-+	match = of_match_device(of_match_ptr(omap_aes_of_match), dev);
-+	if (!match) {
-+		dev_err(dev, "no compatible OF match\n");
-+		err = -EINVAL;
-+		goto err;
-+	}
-+
-+	err = of_address_to_resource(node, 0, res);
-+	if (err < 0) {
-+		dev_err(dev, "can't translate OF node address\n");
-+		err = -EINVAL;
-+		goto err;
-+	}
-+
-+	dd->dma_out = -1; /* Dummy value that's unused */
-+	dd->dma_in = -1; /* Dummy value that's unused */
-+
-+err:
-+	return err;
-+}
-+#else
-+static const struct of_device_id omap_aes_of_match[] = {
-+	{},
-+};
-+
-+static int omap_aes_get_res_of(struct omap_aes_dev *dd,
-+		struct device *dev, struct resource *res)
-+{
-+	return -EINVAL;
-+}
-+#endif
-+
-+static int omap_aes_get_res_pdev(struct omap_aes_dev *dd,
-+		struct platform_device *pdev, struct resource *res)
-+{
-+	struct device *dev = &pdev->dev;
-+	struct resource *r;
-+	int err = 0;
-+
-+	/* Get the base address */
-+	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-+	if (!r) {
-+		dev_err(dev, "no MEM resource info\n");
-+		err = -ENODEV;
-+		goto err;
-+	}
-+	memcpy(res, r, sizeof(*res));
-+
-+	/* Get the DMA out channel */
-+	r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
-+	if (!r) {
-+		dev_err(dev, "no DMA out resource info\n");
-+		err = -ENODEV;
-+		goto err;
-+	}
-+	dd->dma_out = r->start;
-+
-+	/* Get the DMA in channel */
-+	r = platform_get_resource(pdev, IORESOURCE_DMA, 1);
-+	if (!r) {
-+		dev_err(dev, "no DMA in resource info\n");
-+		err = -ENODEV;
-+		goto err;
-+	}
-+	dd->dma_in = r->start;
-+
-+err:
-+	return err;
-+}
-+
- static int omap_aes_probe(struct platform_device *pdev)
- {
- 	struct device *dev = &pdev->dev;
- 	struct omap_aes_dev *dd;
--	struct resource *res;
-+	struct resource res;
- 	int err = -ENOMEM, i, j;
- 	u32 reg;
- 
-@@ -838,35 +927,18 @@ static int omap_aes_probe(struct platform_device *pdev)
- 	spin_lock_init(&dd->lock);
- 	crypto_init_queue(&dd->queue, OMAP_AES_QUEUE_LENGTH);
- 
--	/* Get the base address */
--	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
--	if (!res) {
--		dev_err(dev, "invalid resource type\n");
--		err = -ENODEV;
-+	err = (dev->of_node) ? omap_aes_get_res_of(dd, dev, &res) :
-+			       omap_aes_get_res_pdev(dd, pdev, &res);
-+	if (err)
- 		goto err_res;
--	}
--	dd->phys_base = res->start;
--
--	/* Get the DMA */
--	res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
--	if (!res)
--		dev_info(dev, "no DMA info\n");
--	else
--		dd->dma_out = res->start;
--
--	/* Get the DMA */
--	res = platform_get_resource(pdev, IORESOURCE_DMA, 1);
--	if (!res)
--		dev_info(dev, "no DMA info\n");
--	else
--		dd->dma_in = res->start;
--
--	dd->io_base = ioremap(dd->phys_base, SZ_4K);
-+
-+	dd->io_base = devm_request_and_ioremap(dev, &res);
- 	if (!dd->io_base) {
- 		dev_err(dev, "can't ioremap\n");
- 		err = -ENOMEM;
- 		goto err_res;
- 	}
-+	dd->phys_base = res.start;
- 
- 	pm_runtime_enable(dev);
- 	pm_runtime_get_sync(dev);
-@@ -904,7 +976,6 @@ err_algs:
- err_dma:
- 	tasklet_kill(&dd->done_task);
- 	tasklet_kill(&dd->queue_task);
--	iounmap(dd->io_base);
- 	pm_runtime_disable(dev);
- err_res:
- 	kfree(dd);
-@@ -932,7 +1003,6 @@ static int omap_aes_remove(struct platform_device *pdev)
- 	tasklet_kill(&dd->done_task);
- 	tasklet_kill(&dd->queue_task);
- 	omap_aes_dma_cleanup(dd);
--	iounmap(dd->io_base);
- 	pm_runtime_disable(dd->dev);
- 	kfree(dd);
- 	dd = NULL;
-@@ -965,6 +1035,7 @@ static struct platform_driver omap_aes_driver = {
- 		.name	= "omap-aes",
- 		.owner	= THIS_MODULE,
- 		.pm	= &omap_aes_pm_ops,
-+		.of_match_table	= omap_aes_of_match,
- 	},
- };
- 
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0032-crypto-omap-aes-Convert-to-dma_request_slave_channel.patch b/patches/crypto/0032-crypto-omap-aes-Convert-to-dma_request_slave_channel.patch
deleted file mode 100644
index fbd414fb744c90df7cd6d0f4081f93d0c39ec923..0000000000000000000000000000000000000000
--- a/patches/crypto/0032-crypto-omap-aes-Convert-to-dma_request_slave_channel.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From e30d38f509a86a92d3049e0d892acedabc2fdcc4 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Thu, 20 Dec 2012 14:05:57 -0700
-Subject: [PATCH 32/34] crypto: omap-aes - Convert to
- dma_request_slave_channel_compat()
-
-Use the dma_request_slave_channel_compat() call instead of
-the dma_request_channel() call to request a DMA channel.
-This allows the omap-aes driver use different DMA engines.
-
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-aes.c |   12 ++++++++----
- 1 files changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
-index dfebd40..d34aa5d 100644
---- a/drivers/crypto/omap-aes.c
-+++ b/drivers/crypto/omap-aes.c
-@@ -296,15 +296,19 @@ static int omap_aes_dma_init(struct omap_aes_dev *dd)
- 	dma_cap_zero(mask);
- 	dma_cap_set(DMA_SLAVE, mask);
- 
--	dd->dma_lch_in = dma_request_channel(mask, omap_dma_filter_fn,
--					     &dd->dma_in);
-+	dd->dma_lch_in = dma_request_slave_channel_compat(mask,
-+							  omap_dma_filter_fn,
-+							  &dd->dma_in,
-+							  dd->dev, "rx");
- 	if (!dd->dma_lch_in) {
- 		dev_err(dd->dev, "Unable to request in DMA channel\n");
- 		goto err_dma_in;
- 	}
- 
--	dd->dma_lch_out = dma_request_channel(mask, omap_dma_filter_fn,
--					     &dd->dma_out);
-+	dd->dma_lch_out = dma_request_slave_channel_compat(mask,
-+							   omap_dma_filter_fn,
-+							   &dd->dma_out,
-+							   dd->dev, "tx");
- 	if (!dd->dma_lch_out) {
- 		dev_err(dd->dev, "Unable to request out DMA channel\n");
- 		goto err_dma_out;
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0033-crypto-omap-aes-Add-OMAP4-AM33XX-AES-Support.patch b/patches/crypto/0033-crypto-omap-aes-Add-OMAP4-AM33XX-AES-Support.patch
deleted file mode 100644
index 5cec8b62dd5f9325c3a687bd3219bd92648d92db..0000000000000000000000000000000000000000
--- a/patches/crypto/0033-crypto-omap-aes-Add-OMAP4-AM33XX-AES-Support.patch
+++ /dev/null
@@ -1,319 +0,0 @@
-From bc3a4331c74ead32a57087a0a3f2450d2d9339d6 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Thu, 20 Dec 2012 14:41:15 -0700
-Subject: [PATCH 33/34] crypto: omap-aes - Add OMAP4/AM33XX AES Support
-
-Add support for the OMAP4 version of the AES module
-that is present on OMAP4 and AM33xx SoCs.
-
-The modules have several differences including register
-offsets and how DMA is triggered.  To handle these
-differences, a platform_data structure is defined and
-contains routine pointers, register offsets, and bit
-offsets within registers.  OMAP2/OMAP3-specific routines
-are suffixed with '_omap2' and OMAP4/AM33xx routines are
-suffixed with '_omap4'.
-
-Note: The code being integrated is from the TI AM33xx SDK
-and was written by Greg Turner <gkmturner@gmail.com> and
-Herman Schuurman (current email unknown) while at TI.
-
-CC: Greg Turner <gkmturner@gmail.com>
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-aes.c |  158 +++++++++++++++++++++++++++++++++++---------
- 1 files changed, 125 insertions(+), 33 deletions(-)
-
-diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
-index d34aa5d..bd1ad97 100644
---- a/drivers/crypto/omap-aes.c
-+++ b/drivers/crypto/omap-aes.c
-@@ -5,6 +5,7 @@
-  *
-  * Copyright (c) 2010 Nokia Corporation
-  * Author: Dmitry Kasatkin <dmitry.kasatkin@nokia.com>
-+ * Copyright (c) 2011 Texas Instruments Incorporated
-  *
-  * This program is free software; you can redistribute it and/or modify
-  * it under the terms of the GNU General Public License version 2 as published
-@@ -42,10 +43,11 @@
- #define FLD_MASK(start, end)	(((1 << ((start) - (end) + 1)) - 1) << (end))
- #define FLD_VAL(val, start, end) (((val) << (end)) & FLD_MASK(start, end))
- 
--#define AES_REG_KEY(x)			(0x1C - ((x ^ 0x01) * 0x04))
--#define AES_REG_IV(x)			(0x20 + ((x) * 0x04))
-+#define AES_REG_KEY(dd, x)		((dd)->pdata->key_ofs - \
-+						((x ^ 0x01) * 0x04))
-+#define AES_REG_IV(dd, x)		((dd)->pdata->iv_ofs + ((x) * 0x04))
- 
--#define AES_REG_CTRL			0x30
-+#define AES_REG_CTRL(dd)		((dd)->pdata->ctrl_ofs)
- #define AES_REG_CTRL_CTR_WIDTH		(1 << 7)
- #define AES_REG_CTRL_CTR		(1 << 6)
- #define AES_REG_CTRL_CBC		(1 << 5)
-@@ -54,14 +56,11 @@
- #define AES_REG_CTRL_INPUT_READY	(1 << 1)
- #define AES_REG_CTRL_OUTPUT_READY	(1 << 0)
- 
--#define AES_REG_DATA			0x34
--#define AES_REG_DATA_N(x)		(0x34 + ((x) * 0x04))
-+#define AES_REG_DATA_N(dd, x)		((dd)->pdata->data_ofs + ((x) * 0x04))
- 
--#define AES_REG_REV			0x44
--#define AES_REG_REV_MAJOR		0xF0
--#define AES_REG_REV_MINOR		0x0F
-+#define AES_REG_REV(dd)			((dd)->pdata->rev_ofs)
- 
--#define AES_REG_MASK			0x48
-+#define AES_REG_MASK(dd)		((dd)->pdata->mask_ofs)
- #define AES_REG_MASK_SIDLE		(1 << 6)
- #define AES_REG_MASK_START		(1 << 5)
- #define AES_REG_MASK_DMA_OUT_EN		(1 << 3)
-@@ -69,8 +68,7 @@
- #define AES_REG_MASK_SOFTRESET		(1 << 1)
- #define AES_REG_AUTOIDLE		(1 << 0)
- 
--#define AES_REG_SYSSTATUS		0x4C
--#define AES_REG_SYSSTATUS_RESETDONE	(1 << 0)
-+#define AES_REG_LENGTH_N(x)		(0x54 + ((x) * 0x04))
- 
- #define DEFAULT_TIMEOUT		(5*HZ)
- 
-@@ -98,6 +96,26 @@ struct omap_aes_reqctx {
- #define OMAP_AES_QUEUE_LENGTH	1
- #define OMAP_AES_CACHE_SIZE	0
- 
-+struct omap_aes_pdata {
-+	void		(*trigger)(struct omap_aes_dev *dd, int length);
-+
-+	u32		key_ofs;
-+	u32		iv_ofs;
-+	u32		ctrl_ofs;
-+	u32		data_ofs;
-+	u32		rev_ofs;
-+	u32		mask_ofs;
-+
-+	u32		dma_enable_in;
-+	u32		dma_enable_out;
-+	u32		dma_start;
-+
-+	u32		major_mask;
-+	u32		major_shift;
-+	u32		minor_mask;
-+	u32		minor_shift;
-+};
-+
- struct omap_aes_dev {
- 	struct list_head	list;
- 	unsigned long		phys_base;
-@@ -132,6 +150,8 @@ struct omap_aes_dev {
- 	int			dma_out;
- 	struct dma_chan		*dma_lch_out;
- 	dma_addr_t		dma_addr_out;
-+
-+	const struct omap_aes_pdata	*pdata;
- };
- 
- /* keep registered devices data here */
-@@ -194,26 +214,16 @@ static int omap_aes_write_ctrl(struct omap_aes_dev *dd)
- 	if (err)
- 		return err;
- 
--	val = 0;
--	if (dd->dma_lch_out != NULL)
--		val |= AES_REG_MASK_DMA_OUT_EN;
--	if (dd->dma_lch_in != NULL)
--		val |= AES_REG_MASK_DMA_IN_EN;
--
--	mask = AES_REG_MASK_DMA_IN_EN | AES_REG_MASK_DMA_OUT_EN;
--
--	omap_aes_write_mask(dd, AES_REG_MASK, val, mask);
--
- 	key32 = dd->ctx->keylen / sizeof(u32);
- 
- 	/* it seems a key should always be set even if it has not changed */
- 	for (i = 0; i < key32; i++) {
--		omap_aes_write(dd, AES_REG_KEY(i),
-+		omap_aes_write(dd, AES_REG_KEY(dd, i),
- 			__le32_to_cpu(dd->ctx->key[i]));
- 	}
- 
- 	if ((dd->flags & FLAGS_CBC) && dd->req->info)
--		omap_aes_write_n(dd, AES_REG_IV(0), dd->req->info, 4);
-+		omap_aes_write_n(dd, AES_REG_IV(dd, 0), dd->req->info, 4);
- 
- 	val = FLD_VAL(((dd->ctx->keylen >> 3) - 1), 4, 3);
- 	if (dd->flags & FLAGS_CBC)
-@@ -224,11 +234,47 @@ static int omap_aes_write_ctrl(struct omap_aes_dev *dd)
- 	mask = AES_REG_CTRL_CBC | AES_REG_CTRL_DIRECTION |
- 			AES_REG_CTRL_KEY_SIZE;
- 
--	omap_aes_write_mask(dd, AES_REG_CTRL, val, mask);
-+	omap_aes_write_mask(dd, AES_REG_CTRL(dd), val, mask);
- 
- 	return 0;
- }
- 
-+static void omap_aes_dma_trigger_omap2(struct omap_aes_dev *dd, int length)
-+{
-+	u32 mask, val;
-+
-+	val = dd->pdata->dma_start;
-+
-+	if (dd->dma_lch_out != NULL)
-+		val |= dd->pdata->dma_enable_out;
-+	if (dd->dma_lch_in != NULL)
-+		val |= dd->pdata->dma_enable_in;
-+
-+	mask = dd->pdata->dma_enable_out | dd->pdata->dma_enable_in |
-+	       dd->pdata->dma_start;
-+
-+	omap_aes_write_mask(dd, AES_REG_MASK(dd), val, mask);
-+
-+}
-+
-+static void omap_aes_dma_trigger_omap4(struct omap_aes_dev *dd, int length)
-+{
-+	omap_aes_write(dd, AES_REG_LENGTH_N(0), length);
-+	omap_aes_write(dd, AES_REG_LENGTH_N(1), 0);
-+
-+	omap_aes_dma_trigger_omap2(dd, length);
-+}
-+
-+static void omap_aes_dma_stop(struct omap_aes_dev *dd)
-+{
-+	u32 mask;
-+
-+	mask = dd->pdata->dma_enable_out | dd->pdata->dma_enable_in |
-+	       dd->pdata->dma_start;
-+
-+	omap_aes_write_mask(dd, AES_REG_MASK(dd), 0, mask);
-+}
-+
- static struct omap_aes_dev *omap_aes_find_dev(struct omap_aes_ctx *ctx)
- {
- 	struct omap_aes_dev *dd = NULL, *tmp;
-@@ -413,8 +459,8 @@ static int omap_aes_crypt_dma(struct crypto_tfm *tfm,
- 
- 	memset(&cfg, 0, sizeof(cfg));
- 
--	cfg.src_addr = dd->phys_base + AES_REG_DATA;
--	cfg.dst_addr = dd->phys_base + AES_REG_DATA;
-+	cfg.src_addr = dd->phys_base + AES_REG_DATA_N(dd, 0);
-+	cfg.dst_addr = dd->phys_base + AES_REG_DATA_N(dd, 0);
- 	cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
- 	cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
- 	cfg.src_maxburst = DST_MAXBURST;
-@@ -464,9 +510,8 @@ static int omap_aes_crypt_dma(struct crypto_tfm *tfm,
- 	dma_async_issue_pending(dd->dma_lch_in);
- 	dma_async_issue_pending(dd->dma_lch_out);
- 
--	/* start DMA or disable idle mode */
--	omap_aes_write_mask(dd, AES_REG_MASK, AES_REG_MASK_START,
--			    AES_REG_MASK_START);
-+	/* start DMA */
-+	dd->pdata->trigger(dd, length);
- 
- 	return 0;
- }
-@@ -586,7 +631,7 @@ static int omap_aes_crypt_dma_stop(struct omap_aes_dev *dd)
- 
- 	pr_debug("total: %d\n", dd->total);
- 
--	omap_aes_write_mask(dd, AES_REG_MASK, 0, AES_REG_MASK_START);
-+	omap_aes_dma_stop(dd);
- 
- 	dmaengine_terminate_all(dd->dma_lch_in);
- 	dmaengine_terminate_all(dd->dma_lch_out);
-@@ -826,10 +871,48 @@ static struct crypto_alg algs[] = {
- }
- };
- 
-+static const struct omap_aes_pdata omap_aes_pdata_omap2 = {
-+	.trigger	= omap_aes_dma_trigger_omap2,
-+	.key_ofs	= 0x1c,
-+	.iv_ofs		= 0x20,
-+	.ctrl_ofs	= 0x30,
-+	.data_ofs	= 0x34,
-+	.rev_ofs	= 0x44,
-+	.mask_ofs	= 0x48,
-+	.dma_enable_in	= BIT(2),
-+	.dma_enable_out	= BIT(3),
-+	.dma_start	= BIT(5),
-+	.major_mask	= 0xf0,
-+	.major_shift	= 4,
-+	.minor_mask	= 0x0f,
-+	.minor_shift	= 0,
-+};
-+
- #ifdef CONFIG_OF
-+static const struct omap_aes_pdata omap_aes_pdata_omap4 = {
-+	.trigger	= omap_aes_dma_trigger_omap4,
-+	.key_ofs	= 0x3c,
-+	.iv_ofs		= 0x40,
-+	.ctrl_ofs	= 0x50,
-+	.data_ofs	= 0x60,
-+	.rev_ofs	= 0x80,
-+	.mask_ofs	= 0x84,
-+	.dma_enable_in	= BIT(5),
-+	.dma_enable_out	= BIT(6),
-+	.major_mask	= 0x0700,
-+	.major_shift	= 8,
-+	.minor_mask	= 0x003f,
-+	.minor_shift	= 0,
-+};
-+
- static const struct of_device_id omap_aes_of_match[] = {
- 	{
- 		.compatible	= "ti,omap2-aes",
-+		.data		= &omap_aes_pdata_omap2,
-+	},
-+	{
-+		.compatible	= "ti,omap4-aes",
-+		.data		= &omap_aes_pdata_omap4,
- 	},
- 	{},
- };
-@@ -859,6 +942,8 @@ static int omap_aes_get_res_of(struct omap_aes_dev *dd,
- 	dd->dma_out = -1; /* Dummy value that's unused */
- 	dd->dma_in = -1; /* Dummy value that's unused */
- 
-+	dd->pdata = match->data;
-+
- err:
- 	return err;
- }
-@@ -908,6 +993,9 @@ static int omap_aes_get_res_pdev(struct omap_aes_dev *dd,
- 	}
- 	dd->dma_in = r->start;
- 
-+	/* Only OMAP2/3 can be non-DT */
-+	dd->pdata = &omap_aes_pdata_omap2;
-+
- err:
- 	return err;
- }
-@@ -947,12 +1035,16 @@ static int omap_aes_probe(struct platform_device *pdev)
- 	pm_runtime_enable(dev);
- 	pm_runtime_get_sync(dev);
- 
--	reg = omap_aes_read(dd, AES_REG_REV);
--	dev_info(dev, "OMAP AES hw accel rev: %u.%u\n",
--		 (reg & AES_REG_REV_MAJOR) >> 4, reg & AES_REG_REV_MINOR);
-+	omap_aes_dma_stop(dd);
-+
-+	reg = omap_aes_read(dd, AES_REG_REV(dd));
- 
- 	pm_runtime_put_sync(dev);
- 
-+	dev_info(dev, "OMAP AES hw accel rev: %u.%u\n",
-+		 (reg & dd->pdata->major_mask) >> dd->pdata->major_shift,
-+		 (reg & dd->pdata->minor_mask) >> dd->pdata->minor_shift);
-+
- 	tasklet_init(&dd->done_task, omap_aes_done_task, (unsigned long)dd);
- 	tasklet_init(&dd->queue_task, omap_aes_queue_task, (unsigned long)dd);
- 
--- 
-1.7.7.6
-
diff --git a/patches/crypto/0034-crypto-omap-aes-Add-CTR-algorithm-Support.patch b/patches/crypto/0034-crypto-omap-aes-Add-CTR-algorithm-Support.patch
deleted file mode 100644
index d99173c6145fad96f6292eef7e47cb41529d2bff..0000000000000000000000000000000000000000
--- a/patches/crypto/0034-crypto-omap-aes-Add-CTR-algorithm-Support.patch
+++ /dev/null
@@ -1,293 +0,0 @@
-From ac955a95cafdba4b09940471ca8ae29a2bbce838 Mon Sep 17 00:00:00 2001
-From: "Mark A. Greer" <mgreer@animalcreek.com>
-Date: Thu, 20 Dec 2012 15:28:23 -0700
-Subject: [PATCH 34/34] crypto: omap-aes - Add CTR algorithm Support
-
-The OMAP3 and OMAP4/AM33xx versions of the AES crypto
-module support the CTR algorithm in addition to ECB
-and CBC that the OMAP2 version of the module supports.
-
-So, OMAP2 and OMAP3 share a common register set but
-OMAP3 supports CTR while OMAP2 doesn't.  OMAP4/AM33XX
-uses a different register set from OMAP2/OMAP3 and
-also supports CTR.
-
-To add this support, use the platform_data introduced
-in an ealier commit to hold the list of algorithms
-supported by the current module.  The probe routine
-will use that list to register the correct algorithms.
-
-Note: The code being integrated is from the TI AM33xx SDK
-and was written by Greg Turner <gkmturner@gmail.com> and
-Herman Schuurman (current email unknown) while at TI.
-
-CC: Greg Turner <gkmturner@gmail.com>
-CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
-Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
----
- drivers/crypto/omap-aes.c |  143 ++++++++++++++++++++++++++++++++++++++++-----
- 1 files changed, 128 insertions(+), 15 deletions(-)
-
-diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
-index bd1ad97..6aa425f 100644
---- a/drivers/crypto/omap-aes.c
-+++ b/drivers/crypto/omap-aes.c
-@@ -48,7 +48,11 @@
- #define AES_REG_IV(dd, x)		((dd)->pdata->iv_ofs + ((x) * 0x04))
- 
- #define AES_REG_CTRL(dd)		((dd)->pdata->ctrl_ofs)
--#define AES_REG_CTRL_CTR_WIDTH		(1 << 7)
-+#define AES_REG_CTRL_CTR_WIDTH_MASK	(3 << 7)
-+#define AES_REG_CTRL_CTR_WIDTH_32		(0 << 7)
-+#define AES_REG_CTRL_CTR_WIDTH_64		(1 << 7)
-+#define AES_REG_CTRL_CTR_WIDTH_96		(2 << 7)
-+#define AES_REG_CTRL_CTR_WIDTH_128		(3 << 7)
- #define AES_REG_CTRL_CTR		(1 << 6)
- #define AES_REG_CTRL_CBC		(1 << 5)
- #define AES_REG_CTRL_KEY_SIZE		(3 << 3)
-@@ -76,6 +80,7 @@
- #define FLAGS_ENCRYPT		BIT(0)
- #define FLAGS_CBC		BIT(1)
- #define FLAGS_GIV		BIT(2)
-+#define FLAGS_CTR		BIT(3)
- 
- #define FLAGS_INIT		BIT(4)
- #define FLAGS_FAST		BIT(5)
-@@ -96,7 +101,16 @@ struct omap_aes_reqctx {
- #define OMAP_AES_QUEUE_LENGTH	1
- #define OMAP_AES_CACHE_SIZE	0
- 
-+struct omap_aes_algs_info {
-+	struct crypto_alg	*algs_list;
-+	unsigned int		size;
-+	unsigned int		registered;
-+};
-+
- struct omap_aes_pdata {
-+	struct omap_aes_algs_info	*algs_info;
-+	unsigned int	algs_info_size;
-+
- 	void		(*trigger)(struct omap_aes_dev *dd, int length);
- 
- 	u32		key_ofs;
-@@ -208,7 +222,7 @@ static int omap_aes_write_ctrl(struct omap_aes_dev *dd)
- {
- 	unsigned int key32;
- 	int i, err;
--	u32 val, mask;
-+	u32 val, mask = 0;
- 
- 	err = omap_aes_hw_init(dd);
- 	if (err)
-@@ -222,16 +236,20 @@ static int omap_aes_write_ctrl(struct omap_aes_dev *dd)
- 			__le32_to_cpu(dd->ctx->key[i]));
- 	}
- 
--	if ((dd->flags & FLAGS_CBC) && dd->req->info)
-+	if ((dd->flags & (FLAGS_CBC | FLAGS_CTR)) && dd->req->info)
- 		omap_aes_write_n(dd, AES_REG_IV(dd, 0), dd->req->info, 4);
- 
- 	val = FLD_VAL(((dd->ctx->keylen >> 3) - 1), 4, 3);
- 	if (dd->flags & FLAGS_CBC)
- 		val |= AES_REG_CTRL_CBC;
-+	if (dd->flags & FLAGS_CTR) {
-+		val |= AES_REG_CTRL_CTR | AES_REG_CTRL_CTR_WIDTH_32;
-+		mask = AES_REG_CTRL_CTR | AES_REG_CTRL_CTR_WIDTH_MASK;
-+	}
- 	if (dd->flags & FLAGS_ENCRYPT)
- 		val |= AES_REG_CTRL_DIRECTION;
- 
--	mask = AES_REG_CTRL_CBC | AES_REG_CTRL_DIRECTION |
-+	mask |= AES_REG_CTRL_CBC | AES_REG_CTRL_DIRECTION |
- 			AES_REG_CTRL_KEY_SIZE;
- 
- 	omap_aes_write_mask(dd, AES_REG_CTRL(dd), val, mask);
-@@ -807,6 +825,16 @@ static int omap_aes_cbc_decrypt(struct ablkcipher_request *req)
- 	return omap_aes_crypt(req, FLAGS_CBC);
- }
- 
-+static int omap_aes_ctr_encrypt(struct ablkcipher_request *req)
-+{
-+	return omap_aes_crypt(req, FLAGS_ENCRYPT | FLAGS_CTR);
-+}
-+
-+static int omap_aes_ctr_decrypt(struct ablkcipher_request *req)
-+{
-+	return omap_aes_crypt(req, FLAGS_CTR);
-+}
-+
- static int omap_aes_cra_init(struct crypto_tfm *tfm)
- {
- 	pr_debug("enter\n");
-@@ -823,7 +851,7 @@ static void omap_aes_cra_exit(struct crypto_tfm *tfm)
- 
- /* ********************** ALGS ************************************ */
- 
--static struct crypto_alg algs[] = {
-+static struct crypto_alg algs_ecb_cbc[] = {
- {
- 	.cra_name		= "ecb(aes)",
- 	.cra_driver_name	= "ecb-aes-omap",
-@@ -871,7 +899,43 @@ static struct crypto_alg algs[] = {
- }
- };
- 
-+static struct crypto_alg algs_ctr[] = {
-+{
-+	.cra_name		= "ctr(aes)",
-+	.cra_driver_name	= "ctr-aes-omap",
-+	.cra_priority		= 100,
-+	.cra_flags		= CRYPTO_ALG_TYPE_ABLKCIPHER |
-+				  CRYPTO_ALG_KERN_DRIVER_ONLY |
-+				  CRYPTO_ALG_ASYNC,
-+	.cra_blocksize		= AES_BLOCK_SIZE,
-+	.cra_ctxsize		= sizeof(struct omap_aes_ctx),
-+	.cra_alignmask		= 0,
-+	.cra_type		= &crypto_ablkcipher_type,
-+	.cra_module		= THIS_MODULE,
-+	.cra_init		= omap_aes_cra_init,
-+	.cra_exit		= omap_aes_cra_exit,
-+	.cra_u.ablkcipher = {
-+		.min_keysize	= AES_MIN_KEY_SIZE,
-+		.max_keysize	= AES_MAX_KEY_SIZE,
-+		.geniv		= "eseqiv",
-+		.ivsize		= AES_BLOCK_SIZE,
-+		.setkey		= omap_aes_setkey,
-+		.encrypt	= omap_aes_ctr_encrypt,
-+		.decrypt	= omap_aes_ctr_decrypt,
-+	}
-+} ,
-+};
-+
-+static struct omap_aes_algs_info omap_aes_algs_info_ecb_cbc[] = {
-+	{
-+		.algs_list	= algs_ecb_cbc,
-+		.size		= ARRAY_SIZE(algs_ecb_cbc),
-+	},
-+};
-+
- static const struct omap_aes_pdata omap_aes_pdata_omap2 = {
-+	.algs_info	= omap_aes_algs_info_ecb_cbc,
-+	.algs_info_size	= ARRAY_SIZE(omap_aes_algs_info_ecb_cbc),
- 	.trigger	= omap_aes_dma_trigger_omap2,
- 	.key_ofs	= 0x1c,
- 	.iv_ofs		= 0x20,
-@@ -889,7 +953,39 @@ static const struct omap_aes_pdata omap_aes_pdata_omap2 = {
- };
- 
- #ifdef CONFIG_OF
-+static struct omap_aes_algs_info omap_aes_algs_info_ecb_cbc_ctr[] = {
-+	{
-+		.algs_list	= algs_ecb_cbc,
-+		.size		= ARRAY_SIZE(algs_ecb_cbc),
-+	},
-+	{
-+		.algs_list	= algs_ctr,
-+		.size		= ARRAY_SIZE(algs_ctr),
-+	},
-+};
-+
-+static const struct omap_aes_pdata omap_aes_pdata_omap3 = {
-+	.algs_info	= omap_aes_algs_info_ecb_cbc_ctr,
-+	.algs_info_size	= ARRAY_SIZE(omap_aes_algs_info_ecb_cbc_ctr),
-+	.trigger	= omap_aes_dma_trigger_omap2,
-+	.key_ofs	= 0x1c,
-+	.iv_ofs		= 0x20,
-+	.ctrl_ofs	= 0x30,
-+	.data_ofs	= 0x34,
-+	.rev_ofs	= 0x44,
-+	.mask_ofs	= 0x48,
-+	.dma_enable_in	= BIT(2),
-+	.dma_enable_out	= BIT(3),
-+	.dma_start	= BIT(5),
-+	.major_mask	= 0xf0,
-+	.major_shift	= 4,
-+	.minor_mask	= 0x0f,
-+	.minor_shift	= 0,
-+};
-+
- static const struct omap_aes_pdata omap_aes_pdata_omap4 = {
-+	.algs_info	= omap_aes_algs_info_ecb_cbc_ctr,
-+	.algs_info_size	= ARRAY_SIZE(omap_aes_algs_info_ecb_cbc_ctr),
- 	.trigger	= omap_aes_dma_trigger_omap4,
- 	.key_ofs	= 0x3c,
- 	.iv_ofs		= 0x40,
-@@ -911,6 +1007,10 @@ static const struct of_device_id omap_aes_of_match[] = {
- 		.data		= &omap_aes_pdata_omap2,
- 	},
- 	{
-+		.compatible	= "ti,omap3-aes",
-+		.data		= &omap_aes_pdata_omap3,
-+	},
-+	{
- 		.compatible	= "ti,omap4-aes",
- 		.data		= &omap_aes_pdata_omap4,
- 	},
-@@ -1004,6 +1104,7 @@ static int omap_aes_probe(struct platform_device *pdev)
- {
- 	struct device *dev = &pdev->dev;
- 	struct omap_aes_dev *dd;
-+	struct crypto_alg *algp;
- 	struct resource res;
- 	int err = -ENOMEM, i, j;
- 	u32 reg;
-@@ -1057,17 +1158,27 @@ static int omap_aes_probe(struct platform_device *pdev)
- 	list_add_tail(&dd->list, &dev_list);
- 	spin_unlock(&list_lock);
- 
--	for (i = 0; i < ARRAY_SIZE(algs); i++) {
--		pr_debug("i: %d\n", i);
--		err = crypto_register_alg(&algs[i]);
--		if (err)
--			goto err_algs;
-+	for (i = 0; i < dd->pdata->algs_info_size; i++) {
-+		for (j = 0; j < dd->pdata->algs_info[i].size; j++) {
-+			algp = &dd->pdata->algs_info[i].algs_list[j];
-+
-+			pr_debug("reg alg: %s\n", algp->cra_name);
-+			INIT_LIST_HEAD(&algp->cra_list);
-+
-+			err = crypto_register_alg(algp);
-+			if (err)
-+				goto err_algs;
-+
-+			dd->pdata->algs_info[i].registered++;
-+		}
- 	}
- 
- 	return 0;
- err_algs:
--	for (j = 0; j < i; j++)
--		crypto_unregister_alg(&algs[j]);
-+	for (i = dd->pdata->algs_info_size - 1; i >= 0; i--)
-+		for (j = dd->pdata->algs_info[i].registered - 1; j >= 0; j--)
-+			crypto_unregister_alg(
-+					&dd->pdata->algs_info[i].algs_list[j]);
- 	omap_aes_dma_cleanup(dd);
- err_dma:
- 	tasklet_kill(&dd->done_task);
-@@ -1084,7 +1195,7 @@ err_data:
- static int omap_aes_remove(struct platform_device *pdev)
- {
- 	struct omap_aes_dev *dd = platform_get_drvdata(pdev);
--	int i;
-+	int i, j;
- 
- 	if (!dd)
- 		return -ENODEV;
-@@ -1093,8 +1204,10 @@ static int omap_aes_remove(struct platform_device *pdev)
- 	list_del(&dd->list);
- 	spin_unlock(&list_lock);
- 
--	for (i = 0; i < ARRAY_SIZE(algs); i++)
--		crypto_unregister_alg(&algs[i]);
-+	for (i = dd->pdata->algs_info_size - 1; i >= 0; i--)
-+		for (j = dd->pdata->algs_info[i].registered - 1; j >= 0; j--)
-+			crypto_unregister_alg(
-+					&dd->pdata->algs_info[i].algs_list[j]);
- 
- 	tasklet_kill(&dd->done_task);
- 	tasklet_kill(&dd->queue_task);
--- 
-1.7.7.6
-
diff --git a/patches/da8xx-fb/0001-viafb-rename-display_timing-to-via_display_timing.patch b/patches/da8xx-fb/0001-viafb-rename-display_timing-to-via_display_timing.patch
deleted file mode 100644
index 4cb9b4e4ccc74cfc8b829a64684fc432c3cefea5..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0001-viafb-rename-display_timing-to-via_display_timing.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-From 2861e8f5a3c1c45de981130bd5909897befaf956 Mon Sep 17 00:00:00 2001
-From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
-Date: Wed, 19 Dec 2012 16:28:08 +0530
-Subject: [PATCH 01/48] viafb: rename display_timing to via_display_timing
-
-The struct display_timing is specific to the via subsystem. The naming leads to
-collisions with the new struct display_timing, which is supposed to be a shared
-struct between different subsystems.
-To clean this up, prepend the existing struct with the subsystem it is specific
-to.
-
-Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
----
- drivers/video/via/hw.c              | 6 +++---
- drivers/video/via/hw.h              | 2 +-
- drivers/video/via/lcd.c             | 2 +-
- drivers/video/via/share.h           | 2 +-
- drivers/video/via/via_modesetting.c | 8 ++++----
- drivers/video/via/via_modesetting.h | 6 +++---
- 6 files changed, 13 insertions(+), 13 deletions(-)
-
-diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
-index 80233da..22450908 100644
---- a/drivers/video/via/hw.c
-+++ b/drivers/video/via/hw.c
-@@ -1467,10 +1467,10 @@ void viafb_set_vclock(u32 clk, int set_iga)
- 	via_write_misc_reg_mask(0x0C, 0x0C); /* select external clock */
- }
- 
--struct display_timing var_to_timing(const struct fb_var_screeninfo *var,
-+struct via_display_timing var_to_timing(const struct fb_var_screeninfo *var,
- 	u16 cxres, u16 cyres)
- {
--	struct display_timing timing;
-+	struct via_display_timing timing;
- 	u16 dx = (var->xres - cxres) / 2, dy = (var->yres - cyres) / 2;
- 
- 	timing.hor_addr = cxres;
-@@ -1491,7 +1491,7 @@ struct display_timing var_to_timing(const struct fb_var_screeninfo *var,
- void viafb_fill_crtc_timing(const struct fb_var_screeninfo *var,
- 	u16 cxres, u16 cyres, int iga)
- {
--	struct display_timing crt_reg = var_to_timing(var,
-+	struct via_display_timing crt_reg = var_to_timing(var,
- 		cxres ? cxres : var->xres, cyres ? cyres : var->yres);
- 
- 	if (iga == IGA1)
-diff --git a/drivers/video/via/hw.h b/drivers/video/via/hw.h
-index a820575..3be073c 100644
---- a/drivers/video/via/hw.h
-+++ b/drivers/video/via/hw.h
-@@ -637,7 +637,7 @@ extern int viafb_LCD_ON;
- extern int viafb_DVI_ON;
- extern int viafb_hotplug;
- 
--struct display_timing var_to_timing(const struct fb_var_screeninfo *var,
-+struct via_display_timing var_to_timing(const struct fb_var_screeninfo *var,
- 	u16 cxres, u16 cyres);
- void viafb_fill_crtc_timing(const struct fb_var_screeninfo *var,
- 	u16 cxres, u16 cyres, int iga);
-diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c
-index 980ee1b..5d21ff4 100644
---- a/drivers/video/via/lcd.c
-+++ b/drivers/video/via/lcd.c
-@@ -549,7 +549,7 @@ void viafb_lcd_set_mode(const struct fb_var_screeninfo *var, u16 cxres,
- 	int panel_hres = plvds_setting_info->lcd_panel_hres;
- 	int panel_vres = plvds_setting_info->lcd_panel_vres;
- 	u32 clock;
--	struct display_timing timing;
-+	struct via_display_timing timing;
- 	struct fb_var_screeninfo panel_var;
- 	const struct fb_videomode *mode_crt_table, *panel_crt_table;
- 
-diff --git a/drivers/video/via/share.h b/drivers/video/via/share.h
-index 3158dfc..65c65c6 100644
---- a/drivers/video/via/share.h
-+++ b/drivers/video/via/share.h
-@@ -319,7 +319,7 @@ struct crt_mode_table {
- 	int refresh_rate;
- 	int h_sync_polarity;
- 	int v_sync_polarity;
--	struct display_timing crtc;
-+	struct via_display_timing crtc;
- };
- 
- struct io_reg {
-diff --git a/drivers/video/via/via_modesetting.c b/drivers/video/via/via_modesetting.c
-index 0e431ae..0b414b0 100644
---- a/drivers/video/via/via_modesetting.c
-+++ b/drivers/video/via/via_modesetting.c
-@@ -30,9 +30,9 @@
- #include "debug.h"
- 
- 
--void via_set_primary_timing(const struct display_timing *timing)
-+void via_set_primary_timing(const struct via_display_timing *timing)
- {
--	struct display_timing raw;
-+	struct via_display_timing raw;
- 
- 	raw.hor_total = timing->hor_total / 8 - 5;
- 	raw.hor_addr = timing->hor_addr / 8 - 1;
-@@ -88,9 +88,9 @@ void via_set_primary_timing(const struct display_timing *timing)
- 	via_write_reg_mask(VIACR, 0x17, 0x80, 0x80);
- }
- 
--void via_set_secondary_timing(const struct display_timing *timing)
-+void via_set_secondary_timing(const struct via_display_timing *timing)
- {
--	struct display_timing raw;
-+	struct via_display_timing raw;
- 
- 	raw.hor_total = timing->hor_total - 1;
- 	raw.hor_addr = timing->hor_addr - 1;
-diff --git a/drivers/video/via/via_modesetting.h b/drivers/video/via/via_modesetting.h
-index 06e09fe..f6a6503 100644
---- a/drivers/video/via/via_modesetting.h
-+++ b/drivers/video/via/via_modesetting.h
-@@ -33,7 +33,7 @@
- #define VIA_PITCH_MAX	0x3FF8
- 
- 
--struct display_timing {
-+struct via_display_timing {
- 	u16 hor_total;
- 	u16 hor_addr;
- 	u16 hor_blank_start;
-@@ -49,8 +49,8 @@ struct display_timing {
- };
- 
- 
--void via_set_primary_timing(const struct display_timing *timing);
--void via_set_secondary_timing(const struct display_timing *timing);
-+void via_set_primary_timing(const struct via_display_timing *timing);
-+void via_set_secondary_timing(const struct via_display_timing *timing);
- void via_set_primary_address(u32 addr);
- void via_set_secondary_address(u32 addr);
- void via_set_primary_pitch(u32 pitch);
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0002-video-add-display_timing-and-videomode.patch b/patches/da8xx-fb/0002-video-add-display_timing-and-videomode.patch
deleted file mode 100644
index d9ca51be16e18366ddfd22b295afc8da6f391882..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0002-video-add-display_timing-and-videomode.patch
+++ /dev/null
@@ -1,344 +0,0 @@
-From 7d5e889a597ef7da85b7a5c478e44c6ae014507f Mon Sep 17 00:00:00 2001
-From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
-Date: Wed, 19 Dec 2012 16:36:50 +0530
-Subject: [PATCH 02/48] video: add display_timing and videomode
-
-Add display_timing structure and the according helper functions. This allows
-the description of a display via its supported timing parameters.
-
-Also, add helper functions to convert from display timings to a generic videomode
-structure.
-
-The struct display_timing specifies all needed parameters to describe the signal
-properties of a display in one mode. This includes
-    - ranges for signals that may have min-, max- and typical values
-    - single integers for signals that can be on, off or are ignored
-    - booleans for signals that are either on or off
-
-As a display may support multiple modes like this, a struct display_timings is
-added, that holds all given struct display_timing pointers and declares the
-native mode of the display.
-
-Although a display may state that a signal can be in a range, it is driven with
-fixed values that indicate a videomode. Therefore graphic drivers don't need all
-the information of struct display_timing, but would generate a videomode from
-the given set of supported signal timings and work with that.
-
-The video subsystems all define their own structs that describe a mode and work
-with that (e.g. fb_videomode or drm_display_mode). To slowly replace all those
-various structures and allow code reuse across those subsystems, add struct
-videomode as a generic description.
-
-This patch only includes the most basic fields in struct videomode. All missing
-fields that are needed to have a really generic video mode description can be
-added at a later stage.
-
-Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
-Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
-Acked-by: Thierry Reding <thierry.reding@avionic-design.de>
-Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
-Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
----
- drivers/video/Kconfig          |   6 ++
- drivers/video/Makefile         |   2 +
- drivers/video/display_timing.c |  24 ++++++++
- drivers/video/videomode.c      |  39 +++++++++++++
- include/video/display_timing.h | 124 +++++++++++++++++++++++++++++++++++++++++
- include/video/videomode.h      |  48 ++++++++++++++++
- 6 files changed, 243 insertions(+)
- create mode 100644 drivers/video/display_timing.c
- create mode 100644 drivers/video/videomode.c
- create mode 100644 include/video/display_timing.h
- create mode 100644 include/video/videomode.h
-
-diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
-index b532f02..42569d1 100644
---- a/drivers/video/Kconfig
-+++ b/drivers/video/Kconfig
-@@ -33,6 +33,12 @@ config VIDEO_OUTPUT_CONTROL
- 	  This framework adds support for low-level control of the video 
- 	  output switch.
- 
-+config DISPLAY_TIMING
-+       bool
-+
-+config VIDEOMODE
-+       bool
-+
- menuconfig FB
- 	tristate "Support for frame buffer devices"
- 	---help---
-diff --git a/drivers/video/Makefile b/drivers/video/Makefile
-index 58dbeaf..80c76c7 100644
---- a/drivers/video/Makefile
-+++ b/drivers/video/Makefile
-@@ -169,3 +169,5 @@ obj-$(CONFIG_FB_VIRTUAL)          += vfb.o
- 
- #video output switch sysfs driver
- obj-$(CONFIG_VIDEO_OUTPUT_CONTROL) += output.o
-+obj-$(CONFIG_DISPLAY_TIMING) += display_timing.o
-+obj-$(CONFIG_VIDEOMODE) += videomode.o
-diff --git a/drivers/video/display_timing.c b/drivers/video/display_timing.c
-new file mode 100644
-index 0000000..5e1822c
---- /dev/null
-+++ b/drivers/video/display_timing.c
-@@ -0,0 +1,24 @@
-+/*
-+ * generic display timing functions
-+ *
-+ * Copyright (c) 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>, Pengutronix
-+ *
-+ * This file is released under the GPLv2
-+ */
-+
-+#include <linux/export.h>
-+#include <linux/slab.h>
-+#include <video/display_timing.h>
-+
-+void display_timings_release(struct display_timings *disp)
-+{
-+	if (disp->timings) {
-+		unsigned int i;
-+
-+		for (i = 0; i < disp->num_timings; i++)
-+			kfree(disp->timings[i]);
-+		kfree(disp->timings);
-+	}
-+	kfree(disp);
-+}
-+EXPORT_SYMBOL_GPL(display_timings_release);
-diff --git a/drivers/video/videomode.c b/drivers/video/videomode.c
-new file mode 100644
-index 0000000..21c47a2
---- /dev/null
-+++ b/drivers/video/videomode.c
-@@ -0,0 +1,39 @@
-+/*
-+ * generic display timing functions
-+ *
-+ * Copyright (c) 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>, Pengutronix
-+ *
-+ * This file is released under the GPLv2
-+ */
-+
-+#include <linux/errno.h>
-+#include <linux/export.h>
-+#include <video/display_timing.h>
-+#include <video/videomode.h>
-+
-+int videomode_from_timing(const struct display_timings *disp,
-+			  struct videomode *vm, unsigned int index)
-+{
-+	struct display_timing *dt;
-+
-+	dt = display_timings_get(disp, index);
-+	if (!dt)
-+		return -EINVAL;
-+
-+	vm->pixelclock = display_timing_get_value(&dt->pixelclock, TE_TYP);
-+	vm->hactive = display_timing_get_value(&dt->hactive, TE_TYP);
-+	vm->hfront_porch = display_timing_get_value(&dt->hfront_porch, TE_TYP);
-+	vm->hback_porch = display_timing_get_value(&dt->hback_porch, TE_TYP);
-+	vm->hsync_len = display_timing_get_value(&dt->hsync_len, TE_TYP);
-+
-+	vm->vactive = display_timing_get_value(&dt->vactive, TE_TYP);
-+	vm->vfront_porch = display_timing_get_value(&dt->vfront_porch, TE_TYP);
-+	vm->vback_porch = display_timing_get_value(&dt->vback_porch, TE_TYP);
-+	vm->vsync_len = display_timing_get_value(&dt->vsync_len, TE_TYP);
-+
-+	vm->dmt_flags = dt->dmt_flags;
-+	vm->data_flags = dt->data_flags;
-+
-+	return 0;
-+}
-+EXPORT_SYMBOL_GPL(videomode_from_timing);
-diff --git a/include/video/display_timing.h b/include/video/display_timing.h
-new file mode 100644
-index 0000000..71e9a38
---- /dev/null
-+++ b/include/video/display_timing.h
-@@ -0,0 +1,124 @@
-+/*
-+ * Copyright 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>
-+ *
-+ * description of display timings
-+ *
-+ * This file is released under the GPLv2
-+ */
-+
-+#ifndef __LINUX_DISPLAY_TIMING_H
-+#define __LINUX_DISPLAY_TIMING_H
-+
-+#include <linux/bitops.h>
-+#include <linux/types.h>
-+
-+/* VESA display monitor timing parameters */
-+#define VESA_DMT_HSYNC_LOW		BIT(0)
-+#define VESA_DMT_HSYNC_HIGH		BIT(1)
-+#define VESA_DMT_VSYNC_LOW		BIT(2)
-+#define VESA_DMT_VSYNC_HIGH		BIT(3)
-+
-+/* display specific flags */
-+#define DISPLAY_FLAGS_DE_LOW		BIT(0)	/* data enable flag */
-+#define DISPLAY_FLAGS_DE_HIGH		BIT(1)
-+#define DISPLAY_FLAGS_PIXDATA_POSEDGE	BIT(2)	/* drive data on pos. edge */
-+#define DISPLAY_FLAGS_PIXDATA_NEGEDGE	BIT(3)	/* drive data on neg. edge */
-+#define DISPLAY_FLAGS_INTERLACED	BIT(4)
-+#define DISPLAY_FLAGS_DOUBLESCAN	BIT(5)
-+
-+/*
-+ * A single signal can be specified via a range of minimal and maximal values
-+ * with a typical value, that lies somewhere inbetween.
-+ */
-+struct timing_entry {
-+	u32 min;
-+	u32 typ;
-+	u32 max;
-+};
-+
-+enum timing_entry_index {
-+	TE_MIN = 0,
-+	TE_TYP = 1,
-+	TE_MAX = 2,
-+};
-+
-+/*
-+ * Single "mode" entry. This describes one set of signal timings a display can
-+ * have in one setting. This struct can later be converted to struct videomode
-+ * (see include/video/videomode.h). As each timing_entry can be defined as a
-+ * range, one struct display_timing may become multiple struct videomodes.
-+ *
-+ * Example: hsync active high, vsync active low
-+ *
-+ *				    Active Video
-+ * Video  ______________________XXXXXXXXXXXXXXXXXXXXXX_____________________
-+ *	  |<- sync ->|<- back ->|<----- active ----->|<- front ->|<- sync..
-+ *	  |	     |	 porch  |		     |	 porch	 |
-+ *
-+ * HSync _|¯¯¯¯¯¯¯¯¯¯|___________________________________________|¯¯¯¯¯¯¯¯¯
-+ *
-+ * VSync ¯|__________|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|_________
-+ */
-+struct display_timing {
-+	struct timing_entry pixelclock;
-+
-+	struct timing_entry hactive;		/* hor. active video */
-+	struct timing_entry hfront_porch;	/* hor. front porch */
-+	struct timing_entry hback_porch;	/* hor. back porch */
-+	struct timing_entry hsync_len;		/* hor. sync len */
-+
-+	struct timing_entry vactive;		/* ver. active video */
-+	struct timing_entry vfront_porch;	/* ver. front porch */
-+	struct timing_entry vback_porch;	/* ver. back porch */
-+	struct timing_entry vsync_len;		/* ver. sync len */
-+
-+	unsigned int dmt_flags;			/* VESA DMT flags */
-+	unsigned int data_flags;		/* video data flags */
-+};
-+
-+/*
-+ * This describes all timing settings a display provides.
-+ * The native_mode is the default setting for this display.
-+ * Drivers that can handle multiple videomodes should work with this struct and
-+ * convert each entry to the desired end result.
-+ */
-+struct display_timings {
-+	unsigned int num_timings;
-+	unsigned int native_mode;
-+
-+	struct display_timing **timings;
-+};
-+
-+/* get value specified by index from struct timing_entry */
-+static inline u32 display_timing_get_value(const struct timing_entry *te,
-+					   enum timing_entry_index index)
-+{
-+	switch (index) {
-+	case TE_MIN:
-+		return te->min;
-+		break;
-+	case TE_TYP:
-+		return te->typ;
-+		break;
-+	case TE_MAX:
-+		return te->max;
-+		break;
-+	default:
-+		return te->typ;
-+	}
-+}
-+
-+/* get one entry from struct display_timings */
-+static inline struct display_timing *display_timings_get(const struct
-+							 display_timings *disp,
-+							 unsigned int index)
-+{
-+	if (disp->num_timings > index)
-+		return disp->timings[index];
-+	else
-+		return NULL;
-+}
-+
-+void display_timings_release(struct display_timings *disp);
-+
-+#endif
-diff --git a/include/video/videomode.h b/include/video/videomode.h
-new file mode 100644
-index 0000000..a421562
---- /dev/null
-+++ b/include/video/videomode.h
-@@ -0,0 +1,48 @@
-+/*
-+ * Copyright 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>
-+ *
-+ * generic videomode description
-+ *
-+ * This file is released under the GPLv2
-+ */
-+
-+#ifndef __LINUX_VIDEOMODE_H
-+#define __LINUX_VIDEOMODE_H
-+
-+#include <linux/types.h>
-+#include <video/display_timing.h>
-+
-+/*
-+ * Subsystem independent description of a videomode.
-+ * Can be generated from struct display_timing.
-+ */
-+struct videomode {
-+	unsigned long pixelclock;	/* pixelclock in Hz */
-+
-+	u32 hactive;
-+	u32 hfront_porch;
-+	u32 hback_porch;
-+	u32 hsync_len;
-+
-+	u32 vactive;
-+	u32 vfront_porch;
-+	u32 vback_porch;
-+	u32 vsync_len;
-+
-+	unsigned int dmt_flags;	/* VESA DMT flags */
-+	unsigned int data_flags; /* video data flags */
-+};
-+
-+/**
-+ * videomode_from_timing - convert display timing to videomode
-+ * @disp: structure with all possible timing entries
-+ * @vm: return value
-+ * @index: index into the list of display timings in devicetree
-+ *
-+ * DESCRIPTION:
-+ * This function converts a struct display_timing to a struct videomode.
-+ */
-+int videomode_from_timing(const struct display_timings *disp,
-+			  struct videomode *vm, unsigned int index);
-+
-+#endif
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0003-video-add-of-helper-for-display-timings-videomode.patch b/patches/da8xx-fb/0003-video-add-of-helper-for-display-timings-videomode.patch
deleted file mode 100644
index 6b785bdbf1bc6ec333498288e6c86adc6aacf1ac..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0003-video-add-of-helper-for-display-timings-videomode.patch
+++ /dev/null
@@ -1,549 +0,0 @@
-From 055fb2fa4b87a991e8e79bc1eadaaa66c8dbf502 Mon Sep 17 00:00:00 2001
-From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
-Date: Wed, 19 Dec 2012 16:36:54 +0530
-Subject: [PATCH 03/48] video: add of helper for display timings/videomode
-
-This adds support for reading display timings from DT into a struct
-display_timings. The of_display_timing implementation supports multiple
-subnodes. All children are read into an array, that can be queried.
-
-If no native mode is specified, the first subnode will be used.
-
-For cases where the graphics driver knows there can be only one
-mode description or where the driver only supports one mode, a helper
-function of_get_videomode is added, that gets a struct videomode from DT.
-
-Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
-Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
-Acked-by: Stephen Warren <swarren@nvidia.com>
-Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
-Acked-by: Thierry Reding <thierry.reding@avionic-design.de>
-Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
-Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
----
- .../devicetree/bindings/video/display-timing.txt   | 109 ++++++++++
- drivers/video/Kconfig                              |  15 ++
- drivers/video/Makefile                             |   2 +
- drivers/video/of_display_timing.c                  | 239 +++++++++++++++++++++
- drivers/video/of_videomode.c                       |  54 +++++
- include/video/of_display_timing.h                  |  20 ++
- include/video/of_videomode.h                       |  18 ++
- 7 files changed, 457 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/video/display-timing.txt
- create mode 100644 drivers/video/of_display_timing.c
- create mode 100644 drivers/video/of_videomode.c
- create mode 100644 include/video/of_display_timing.h
- create mode 100644 include/video/of_videomode.h
-
-diff --git a/Documentation/devicetree/bindings/video/display-timing.txt b/Documentation/devicetree/bindings/video/display-timing.txt
-new file mode 100644
-index 0000000..bf9d82b
---- /dev/null
-+++ b/Documentation/devicetree/bindings/video/display-timing.txt
-@@ -0,0 +1,109 @@
-+display-timing bindings
-+=======================
-+
-+display-timings node
-+--------------------
-+
-+required properties:
-+ - none
-+
-+optional properties:
-+ - native-mode: The native mode for the display, in case multiple modes are
-+		provided. When omitted, assume the first node is the native.
-+
-+timing subnode
-+--------------
-+
-+required properties:
-+ - hactive, vactive: display resolution
-+ - hfront-porch, hback-porch, hsync-len: horizontal display timing parameters
-+   in pixels
-+   vfront-porch, vback-porch, vsync-len: vertical display timing parameters in
-+   lines
-+ - clock-frequency: display clock in Hz
-+
-+optional properties:
-+ - hsync-active: hsync pulse is active low/high/ignored
-+ - vsync-active: vsync pulse is active low/high/ignored
-+ - de-active: data-enable pulse is active low/high/ignored
-+ - pixelclk-active: with
-+			- active high = drive pixel data on rising edge/
-+					sample data on falling edge
-+			- active low  = drive pixel data on falling edge/
-+					sample data on rising edge
-+			- ignored     = ignored
-+ - interlaced (bool): boolean to enable interlaced mode
-+ - doublescan (bool): boolean to enable doublescan mode
-+
-+All the optional properties that are not bool follow the following logic:
-+    <1>: high active
-+    <0>: low active
-+    omitted: not used on hardware
-+
-+There are different ways of describing the capabilities of a display. The
-+devicetree representation corresponds to the one commonly found in datasheets
-+for displays. If a display supports multiple signal timings, the native-mode
-+can be specified.
-+
-+The parameters are defined as:
-+
-+  +----------+-------------------------------------+----------+-------+
-+  |          |        .                            |          |       |
-+  |          |        |vback_porch                 |          |       |
-+  |          |        .                            |          |       |
-+  +----------#######################################----------+-------+
-+  |          #        .                            #          |       |
-+  |          #        |                            #          |       |
-+  |  hback   #        |                            #  hfront  | hsync |
-+  |   porch  #        |       hactive              #  porch   |  len  |
-+  |<-------->#<-------+--------------------------->#<-------->|<----->|
-+  |          #        |                            #          |       |
-+  |          #        |vactive                     #          |       |
-+  |          #        |                            #          |       |
-+  |          #        .                            #          |       |
-+  +----------#######################################----------+-------+
-+  |          |        .                            |          |       |
-+  |          |        |vfront_porch                |          |       |
-+  |          |        .                            |          |       |
-+  +----------+-------------------------------------+----------+-------+
-+  |          |        .                            |          |       |
-+  |          |        |vsync_len                   |          |       |
-+  |          |        .                            |          |       |
-+  +----------+-------------------------------------+----------+-------+
-+
-+Example:
-+
-+	display-timings {
-+		native-mode = <&timing0>;
-+		timing0: 1080p24 {
-+			/* 1920x1080p24 */
-+			clock-frequency = <52000000>;
-+			hactive = <1920>;
-+			vactive = <1080>;
-+			hfront-porch = <25>;
-+			hback-porch = <25>;
-+			hsync-len = <25>;
-+			vback-porch = <2>;
-+			vfront-porch = <2>;
-+			vsync-len = <2>;
-+			hsync-active = <1>;
-+		};
-+	};
-+
-+Every required property also supports the use of ranges, so the commonly used
-+datasheet description with minimum, typical and maximum values can be used.
-+
-+Example:
-+
-+	timing1: timing {
-+		/* 1920x1080p24 */
-+		clock-frequency = <148500000>;
-+		hactive = <1920>;
-+		vactive = <1080>;
-+		hsync-len = <0 44 60>;
-+		hfront-porch = <80 88 95>;
-+		hback-porch = <100 148 160>;
-+		vfront-porch = <0 4 6>;
-+		vback-porch = <0 36 50>;
-+		vsync-len = <0 5 6>;
-+	};
-diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
-index 42569d1..4abcf9c 100644
---- a/drivers/video/Kconfig
-+++ b/drivers/video/Kconfig
-@@ -39,6 +39,21 @@ config DISPLAY_TIMING
- config VIDEOMODE
-        bool
- 
-+config OF_DISPLAY_TIMING
-+	bool "Enable device tree display timing support"
-+	depends on OF
-+	select DISPLAY_TIMING
-+	help
-+	  helper to parse display timings from the devicetree
-+
-+config OF_VIDEOMODE
-+	bool "Enable device tree videomode support"
-+	depends on OF
-+	select VIDEOMODE
-+	select OF_DISPLAY_TIMING
-+	help
-+	  helper to get videomodes from the devicetree
-+
- menuconfig FB
- 	tristate "Support for frame buffer devices"
- 	---help---
-diff --git a/drivers/video/Makefile b/drivers/video/Makefile
-index 80c76c7..a3ab28c 100644
---- a/drivers/video/Makefile
-+++ b/drivers/video/Makefile
-@@ -170,4 +170,6 @@ obj-$(CONFIG_FB_VIRTUAL)          += vfb.o
- #video output switch sysfs driver
- obj-$(CONFIG_VIDEO_OUTPUT_CONTROL) += output.o
- obj-$(CONFIG_DISPLAY_TIMING) += display_timing.o
-+obj-$(CONFIG_OF_DISPLAY_TIMING) += of_display_timing.o
- obj-$(CONFIG_VIDEOMODE) += videomode.o
-+obj-$(CONFIG_OF_VIDEOMODE) += of_videomode.o
-diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
-new file mode 100644
-index 0000000..13ecd98
---- /dev/null
-+++ b/drivers/video/of_display_timing.c
-@@ -0,0 +1,239 @@
-+/*
-+ * OF helpers for parsing display timings
-+ *
-+ * Copyright (c) 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>, Pengutronix
-+ *
-+ * based on of_videomode.c by Sascha Hauer <s.hauer@pengutronix.de>
-+ *
-+ * This file is released under the GPLv2
-+ */
-+#include <linux/export.h>
-+#include <linux/of.h>
-+#include <linux/slab.h>
-+#include <video/display_timing.h>
-+#include <video/of_display_timing.h>
-+
-+/**
-+ * parse_timing_property - parse timing_entry from device_node
-+ * @np: device_node with the property
-+ * @name: name of the property
-+ * @result: will be set to the return value
-+ *
-+ * DESCRIPTION:
-+ * Every display_timing can be specified with either just the typical value or
-+ * a range consisting of min/typ/max. This function helps handling this
-+ **/
-+static int parse_timing_property(struct device_node *np, const char *name,
-+			  struct timing_entry *result)
-+{
-+	struct property *prop;
-+	int length, cells, ret;
-+
-+	prop = of_find_property(np, name, &length);
-+	if (!prop) {
-+		pr_err("%s: could not find property %s\n",
-+			of_node_full_name(np), name);
-+		return -EINVAL;
-+	}
-+
-+	cells = length / sizeof(u32);
-+	if (cells == 1) {
-+		ret = of_property_read_u32(np, name, &result->typ);
-+		result->min = result->typ;
-+		result->max = result->typ;
-+	} else if (cells == 3) {
-+		ret = of_property_read_u32_array(np, name, &result->min, cells);
-+	} else {
-+		pr_err("%s: illegal timing specification in %s\n",
-+			of_node_full_name(np), name);
-+		return -EINVAL;
-+	}
-+
-+	return ret;
-+}
-+
-+/**
-+ * of_get_display_timing - parse display_timing entry from device_node
-+ * @np: device_node with the properties
-+ **/
-+static struct display_timing *of_get_display_timing(struct device_node *np)
-+{
-+	struct display_timing *dt;
-+	u32 val = 0;
-+	int ret = 0;
-+
-+	dt = kzalloc(sizeof(*dt), GFP_KERNEL);
-+	if (!dt) {
-+		pr_err("%s: could not allocate display_timing struct\n",
-+			of_node_full_name(np));
-+		return NULL;
-+	}
-+
-+	ret |= parse_timing_property(np, "hback-porch", &dt->hback_porch);
-+	ret |= parse_timing_property(np, "hfront-porch", &dt->hfront_porch);
-+	ret |= parse_timing_property(np, "hactive", &dt->hactive);
-+	ret |= parse_timing_property(np, "hsync-len", &dt->hsync_len);
-+	ret |= parse_timing_property(np, "vback-porch", &dt->vback_porch);
-+	ret |= parse_timing_property(np, "vfront-porch", &dt->vfront_porch);
-+	ret |= parse_timing_property(np, "vactive", &dt->vactive);
-+	ret |= parse_timing_property(np, "vsync-len", &dt->vsync_len);
-+	ret |= parse_timing_property(np, "clock-frequency", &dt->pixelclock);
-+
-+	dt->dmt_flags = 0;
-+	dt->data_flags = 0;
-+	if (!of_property_read_u32(np, "vsync-active", &val))
-+		dt->dmt_flags |= val ? VESA_DMT_VSYNC_HIGH :
-+				VESA_DMT_VSYNC_LOW;
-+	if (!of_property_read_u32(np, "hsync-active", &val))
-+		dt->dmt_flags |= val ? VESA_DMT_HSYNC_HIGH :
-+				VESA_DMT_HSYNC_LOW;
-+	if (!of_property_read_u32(np, "de-active", &val))
-+		dt->data_flags |= val ? DISPLAY_FLAGS_DE_HIGH :
-+				DISPLAY_FLAGS_DE_LOW;
-+	if (!of_property_read_u32(np, "pixelclk-active", &val))
-+		dt->data_flags |= val ? DISPLAY_FLAGS_PIXDATA_POSEDGE :
-+				DISPLAY_FLAGS_PIXDATA_NEGEDGE;
-+
-+	if (of_property_read_bool(np, "interlaced"))
-+		dt->data_flags |= DISPLAY_FLAGS_INTERLACED;
-+	if (of_property_read_bool(np, "doublescan"))
-+		dt->data_flags |= DISPLAY_FLAGS_DOUBLESCAN;
-+
-+	if (ret) {
-+		pr_err("%s: error reading timing properties\n",
-+			of_node_full_name(np));
-+		kfree(dt);
-+		return NULL;
-+	}
-+
-+	return dt;
-+}
-+
-+/**
-+ * of_get_display_timings - parse all display_timing entries from a device_node
-+ * @np: device_node with the subnodes
-+ **/
-+struct display_timings *of_get_display_timings(struct device_node *np)
-+{
-+	struct device_node *timings_np;
-+	struct device_node *entry;
-+	struct device_node *native_mode;
-+	struct display_timings *disp;
-+
-+	if (!np) {
-+		pr_err("%s: no devicenode given\n", of_node_full_name(np));
-+		return NULL;
-+	}
-+
-+	timings_np = of_find_node_by_name(np, "display-timings");
-+	if (!timings_np) {
-+		pr_err("%s: could not find display-timings node\n",
-+			of_node_full_name(np));
-+		return NULL;
-+	}
-+
-+	disp = kzalloc(sizeof(*disp), GFP_KERNEL);
-+	if (!disp) {
-+		pr_err("%s: could not allocate struct disp'\n",
-+			of_node_full_name(np));
-+		goto dispfail;
-+	}
-+
-+	entry = of_parse_phandle(timings_np, "native-mode", 0);
-+	/* assume first child as native mode if none provided */
-+	if (!entry)
-+		entry = of_get_next_child(np, NULL);
-+	/* if there is no child, it is useless to go on */
-+	if (!entry) {
-+		pr_err("%s: no timing specifications given\n",
-+			of_node_full_name(np));
-+		goto entryfail;
-+	}
-+
-+	pr_debug("%s: using %s as default timing\n",
-+		of_node_full_name(np), entry->name);
-+
-+	native_mode = entry;
-+
-+	disp->num_timings = of_get_child_count(timings_np);
-+	if (disp->num_timings == 0) {
-+		/* should never happen, as entry was already found above */
-+		pr_err("%s: no timings specified\n", of_node_full_name(np));
-+		goto entryfail;
-+	}
-+
-+	disp->timings = kzalloc(sizeof(struct display_timing *) *
-+				disp->num_timings, GFP_KERNEL);
-+	if (!disp->timings) {
-+		pr_err("%s: could not allocate timings array\n",
-+			of_node_full_name(np));
-+		goto entryfail;
-+	}
-+
-+	disp->num_timings = 0;
-+	disp->native_mode = 0;
-+
-+	for_each_child_of_node(timings_np, entry) {
-+		struct display_timing *dt;
-+
-+		dt = of_get_display_timing(entry);
-+		if (!dt) {
-+			/*
-+			 * to not encourage wrong devicetrees, fail in case of
-+			 * an error
-+			 */
-+			pr_err("%s: error in timing %d\n",
-+				of_node_full_name(np), disp->num_timings + 1);
-+			goto timingfail;
-+		}
-+
-+		if (native_mode == entry)
-+			disp->native_mode = disp->num_timings;
-+
-+		disp->timings[disp->num_timings] = dt;
-+		disp->num_timings++;
-+	}
-+	of_node_put(timings_np);
-+	/*
-+	 * native_mode points to the device_node returned by of_parse_phandle
-+	 * therefore call of_node_put on it
-+	 */
-+	of_node_put(native_mode);
-+
-+	pr_debug("%s: got %d timings. Using timing #%d as default\n",
-+		of_node_full_name(np), disp->num_timings,
-+		disp->native_mode + 1);
-+
-+	return disp;
-+
-+timingfail:
-+	if (native_mode)
-+		of_node_put(native_mode);
-+	display_timings_release(disp);
-+entryfail:
-+	kfree(disp);
-+dispfail:
-+	of_node_put(timings_np);
-+	return NULL;
-+}
-+EXPORT_SYMBOL_GPL(of_get_display_timings);
-+
-+/**
-+ * of_display_timings_exist - check if a display-timings node is provided
-+ * @np: device_node with the timing
-+ **/
-+int of_display_timings_exist(struct device_node *np)
-+{
-+	struct device_node *timings_np;
-+
-+	if (!np)
-+		return -EINVAL;
-+
-+	timings_np = of_parse_phandle(np, "display-timings", 0);
-+	if (!timings_np)
-+		return -EINVAL;
-+
-+	of_node_put(timings_np);
-+	return 1;
-+}
-+EXPORT_SYMBOL_GPL(of_display_timings_exist);
-diff --git a/drivers/video/of_videomode.c b/drivers/video/of_videomode.c
-new file mode 100644
-index 0000000..5b8066c
---- /dev/null
-+++ b/drivers/video/of_videomode.c
-@@ -0,0 +1,54 @@
-+/*
-+ * generic videomode helper
-+ *
-+ * Copyright (c) 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>, Pengutronix
-+ *
-+ * This file is released under the GPLv2
-+ */
-+#include <linux/errno.h>
-+#include <linux/export.h>
-+#include <linux/of.h>
-+#include <video/display_timing.h>
-+#include <video/of_display_timing.h>
-+#include <video/of_videomode.h>
-+#include <video/videomode.h>
-+
-+/**
-+ * of_get_videomode - get the videomode #<index> from devicetree
-+ * @np - devicenode with the display_timings
-+ * @vm - set to return value
-+ * @index - index into list of display_timings
-+ *	    (Set this to OF_USE_NATIVE_MODE to use whatever mode is
-+ *	     specified as native mode in the DT.)
-+ *
-+ * DESCRIPTION:
-+ * Get a list of all display timings and put the one
-+ * specified by index into *vm. This function should only be used, if
-+ * only one videomode is to be retrieved. A driver that needs to work
-+ * with multiple/all videomodes should work with
-+ * of_get_display_timings instead.
-+ **/
-+int of_get_videomode(struct device_node *np, struct videomode *vm,
-+		     int index)
-+{
-+	struct display_timings *disp;
-+	int ret;
-+
-+	disp = of_get_display_timings(np);
-+	if (!disp) {
-+		pr_err("%s: no timings specified\n", of_node_full_name(np));
-+		return -EINVAL;
-+	}
-+
-+	if (index == OF_USE_NATIVE_MODE)
-+		index = disp->native_mode;
-+
-+	ret = videomode_from_timing(disp, vm, index);
-+	if (ret)
-+		return ret;
-+
-+	display_timings_release(disp);
-+
-+	return 0;
-+}
-+EXPORT_SYMBOL_GPL(of_get_videomode);
-diff --git a/include/video/of_display_timing.h b/include/video/of_display_timing.h
-new file mode 100644
-index 0000000..8016eb7
---- /dev/null
-+++ b/include/video/of_display_timing.h
-@@ -0,0 +1,20 @@
-+/*
-+ * Copyright 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>
-+ *
-+ * display timings of helpers
-+ *
-+ * This file is released under the GPLv2
-+ */
-+
-+#ifndef __LINUX_OF_DISPLAY_TIMING_H
-+#define __LINUX_OF_DISPLAY_TIMING_H
-+
-+struct device_node;
-+struct display_timings;
-+
-+#define OF_USE_NATIVE_MODE -1
-+
-+struct display_timings *of_get_display_timings(struct device_node *np);
-+int of_display_timings_exist(struct device_node *np);
-+
-+#endif
-diff --git a/include/video/of_videomode.h b/include/video/of_videomode.h
-new file mode 100644
-index 0000000..a07efcc
---- /dev/null
-+++ b/include/video/of_videomode.h
-@@ -0,0 +1,18 @@
-+/*
-+ * Copyright 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>
-+ *
-+ * videomode of-helpers
-+ *
-+ * This file is released under the GPLv2
-+ */
-+
-+#ifndef __LINUX_OF_VIDEOMODE_H
-+#define __LINUX_OF_VIDEOMODE_H
-+
-+struct device_node;
-+struct videomode;
-+
-+int of_get_videomode(struct device_node *np, struct videomode *vm,
-+		     int index);
-+
-+#endif /* __LINUX_OF_VIDEOMODE_H */
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0004-fbmon-add-videomode-helpers.patch b/patches/da8xx-fb/0004-fbmon-add-videomode-helpers.patch
deleted file mode 100644
index 8989fa768b4dbb4919c0e64c19be2b4056c677a3..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0004-fbmon-add-videomode-helpers.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From c36415164afb4b91c068c39a30081396e9f23cd8 Mon Sep 17 00:00:00 2001
-From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
-Date: Wed, 19 Dec 2012 16:36:57 +0530
-Subject: [PATCH 04/48] fbmon: add videomode helpers
-
-Add a function to convert from the generic videomode to a fb_videomode.
-
-Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
-Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
-Acked-by: Thierry Reding <thierry.reding@avionic-design.de>
-Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
-Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
----
- drivers/video/fbmon.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++
- include/linux/fb.h    |  4 ++++
- 2 files changed, 56 insertions(+)
-
-diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
-index cef6557..17ce135 100644
---- a/drivers/video/fbmon.c
-+++ b/drivers/video/fbmon.c
-@@ -31,6 +31,7 @@
- #include <linux/pci.h>
- #include <linux/slab.h>
- #include <video/edid.h>
-+#include <video/videomode.h>
- #ifdef CONFIG_PPC_OF
- #include <asm/prom.h>
- #include <asm/pci-bridge.h>
-@@ -1373,6 +1374,57 @@ int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var, struct fb_inf
- 	kfree(timings);
- 	return err;
- }
-+
-+#if IS_ENABLED(CONFIG_VIDEOMODE)
-+int fb_videomode_from_videomode(const struct videomode *vm,
-+				struct fb_videomode *fbmode)
-+{
-+	unsigned int htotal, vtotal;
-+
-+	fbmode->xres = vm->hactive;
-+	fbmode->left_margin = vm->hback_porch;
-+	fbmode->right_margin = vm->hfront_porch;
-+	fbmode->hsync_len = vm->hsync_len;
-+
-+	fbmode->yres = vm->vactive;
-+	fbmode->upper_margin = vm->vback_porch;
-+	fbmode->lower_margin = vm->vfront_porch;
-+	fbmode->vsync_len = vm->vsync_len;
-+
-+	/* prevent division by zero in KHZ2PICOS macro */
-+	fbmode->pixclock = vm->pixelclock ?
-+			KHZ2PICOS(vm->pixelclock / 1000) : 0;
-+
-+	fbmode->sync = 0;
-+	fbmode->vmode = 0;
-+	if (vm->dmt_flags & VESA_DMT_HSYNC_HIGH)
-+		fbmode->sync |= FB_SYNC_HOR_HIGH_ACT;
-+	if (vm->dmt_flags & VESA_DMT_HSYNC_HIGH)
-+		fbmode->sync |= FB_SYNC_VERT_HIGH_ACT;
-+	if (vm->data_flags & DISPLAY_FLAGS_INTERLACED)
-+		fbmode->vmode |= FB_VMODE_INTERLACED;
-+	if (vm->data_flags & DISPLAY_FLAGS_DOUBLESCAN)
-+		fbmode->vmode |= FB_VMODE_DOUBLE;
-+	fbmode->flag = 0;
-+
-+	htotal = vm->hactive + vm->hfront_porch + vm->hback_porch +
-+		 vm->hsync_len;
-+	vtotal = vm->vactive + vm->vfront_porch + vm->vback_porch +
-+		 vm->vsync_len;
-+	/* prevent division by zero */
-+	if (htotal && vtotal) {
-+		fbmode->refresh = vm->pixelclock / (htotal * vtotal);
-+	/* a mode must have htotal and vtotal != 0 or it is invalid */
-+	} else {
-+		fbmode->refresh = 0;
-+		return -EINVAL;
-+	}
-+
-+	return 0;
-+}
-+EXPORT_SYMBOL_GPL(fb_videomode_from_videomode);
-+#endif
-+
- #else
- int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
- {
-diff --git a/include/linux/fb.h b/include/linux/fb.h
-index c7a9571..100a176 100644
---- a/include/linux/fb.h
-+++ b/include/linux/fb.h
-@@ -19,6 +19,7 @@ struct vm_area_struct;
- struct fb_info;
- struct device;
- struct file;
-+struct videomode;
- 
- /* Definitions below are used in the parsed monitor specs */
- #define FB_DPMS_ACTIVE_OFF	1
-@@ -714,6 +715,9 @@ extern void fb_destroy_modedb(struct fb_videomode *modedb);
- extern int fb_find_mode_cvt(struct fb_videomode *mode, int margins, int rb);
- extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter);
- 
-+extern int fb_videomode_from_videomode(const struct videomode *vm,
-+				       struct fb_videomode *fbmode);
-+
- /* drivers/video/modedb.c */
- #define VESA_MODEDB_SIZE 34
- extern void fb_var_to_videomode(struct fb_videomode *mode,
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0005-fbmon-add-of_videomode-helpers.patch b/patches/da8xx-fb/0005-fbmon-add-of_videomode-helpers.patch
deleted file mode 100644
index add02c92815a60c1d28ad7d11be22be7cd82032f..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0005-fbmon-add-of_videomode-helpers.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From 05585ce09a8372aa7e8ac299f1d5c432fe1e1f28 Mon Sep 17 00:00:00 2001
-From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
-Date: Wed, 19 Dec 2012 16:37:00 +0530
-Subject: [PATCH 05/48] fbmon: add of_videomode helpers
-
-Add helper to get fb_videomode from devicetree.
-
-Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
-Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
-Acked-by: Thierry Reding <thierry.reding@avionic-design.de>
-Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
-Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
----
- drivers/video/fbmon.c | 42 ++++++++++++++++++++++++++++++++++++++++++
- include/linux/fb.h    |  4 ++++
- 2 files changed, 46 insertions(+)
-
-diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
-index 17ce135..94ad0f7 100644
---- a/drivers/video/fbmon.c
-+++ b/drivers/video/fbmon.c
-@@ -31,6 +31,7 @@
- #include <linux/pci.h>
- #include <linux/slab.h>
- #include <video/edid.h>
-+#include <video/of_videomode.h>
- #include <video/videomode.h>
- #ifdef CONFIG_PPC_OF
- #include <asm/prom.h>
-@@ -1425,6 +1426,47 @@ int fb_videomode_from_videomode(const struct videomode *vm,
- EXPORT_SYMBOL_GPL(fb_videomode_from_videomode);
- #endif
- 
-+#if IS_ENABLED(CONFIG_OF_VIDEOMODE)
-+static inline void dump_fb_videomode(const struct fb_videomode *m)
-+{
-+	pr_debug("fb_videomode = %ux%u@%uHz (%ukHz) %u %u %u %u %u %u %u %u %u\n",
-+		 m->xres, m->yres, m->refresh, m->pixclock, m->left_margin,
-+		 m->right_margin, m->upper_margin, m->lower_margin,
-+		 m->hsync_len, m->vsync_len, m->sync, m->vmode, m->flag);
-+}
-+
-+/**
-+ * of_get_fb_videomode - get a fb_videomode from devicetree
-+ * @np: device_node with the timing specification
-+ * @fb: will be set to the return value
-+ * @index: index into the list of display timings in devicetree
-+ *
-+ * DESCRIPTION:
-+ * This function is expensive and should only be used, if only one mode is to be
-+ * read from DT. To get multiple modes start with of_get_display_timings ond
-+ * work with that instead.
-+ */
-+int of_get_fb_videomode(struct device_node *np, struct fb_videomode *fb,
-+			int index)
-+{
-+	struct videomode vm;
-+	int ret;
-+
-+	ret = of_get_videomode(np, &vm, index);
-+	if (ret)
-+		return ret;
-+
-+	fb_videomode_from_videomode(&vm, fb);
-+
-+	pr_debug("%s: got %dx%d display mode from %s\n",
-+		of_node_full_name(np), vm.hactive, vm.vactive, np->name);
-+	dump_fb_videomode(fb);
-+
-+	return 0;
-+}
-+EXPORT_SYMBOL_GPL(of_get_fb_videomode);
-+#endif
-+
- #else
- int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
- {
-diff --git a/include/linux/fb.h b/include/linux/fb.h
-index 100a176..58b9860 100644
---- a/include/linux/fb.h
-+++ b/include/linux/fb.h
-@@ -20,6 +20,7 @@ struct fb_info;
- struct device;
- struct file;
- struct videomode;
-+struct device_node;
- 
- /* Definitions below are used in the parsed monitor specs */
- #define FB_DPMS_ACTIVE_OFF	1
-@@ -715,6 +716,9 @@ extern void fb_destroy_modedb(struct fb_videomode *modedb);
- extern int fb_find_mode_cvt(struct fb_videomode *mode, int margins, int rb);
- extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter);
- 
-+extern int of_get_fb_videomode(struct device_node *np,
-+			       struct fb_videomode *fb,
-+			       int index);
- extern int fb_videomode_from_videomode(const struct videomode *vm,
- 				       struct fb_videomode *fbmode);
- 
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0006-drm_modes-add-videomode-helpers.patch b/patches/da8xx-fb/0006-drm_modes-add-videomode-helpers.patch
deleted file mode 100644
index ffa3fc5aae36960a54dc3555a030938cf0bacbc1..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0006-drm_modes-add-videomode-helpers.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From 7aa88bfb15421448ee54c097623a5ddd0bdfd139 Mon Sep 17 00:00:00 2001
-From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
-Date: Wed, 19 Dec 2012 16:37:03 +0530
-Subject: [PATCH 06/48] drm_modes: add videomode helpers
-
-Add conversion from videomode to drm_display_mode
-
-Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
-Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
-Acked-by: Thierry Reding <thierry.reding@avionic-design.de>
-Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
-Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
----
- drivers/gpu/drm/drm_modes.c | 37 +++++++++++++++++++++++++++++++++++++
- include/drm/drmP.h          |  5 +++++
- 2 files changed, 42 insertions(+)
-
-diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
-index d8da30e..9f3f20b 100644
---- a/drivers/gpu/drm/drm_modes.c
-+++ b/drivers/gpu/drm/drm_modes.c
-@@ -35,6 +35,7 @@
- #include <linux/export.h>
- #include <drm/drmP.h>
- #include <drm/drm_crtc.h>
-+#include <video/videomode.h>
- 
- /**
-  * drm_mode_debug_printmodeline - debug print a mode
-@@ -504,6 +505,42 @@ drm_gtf_mode(struct drm_device *dev, int hdisplay, int vdisplay, int vrefresh,
- }
- EXPORT_SYMBOL(drm_gtf_mode);
- 
-+#if IS_ENABLED(CONFIG_VIDEOMODE)
-+int drm_display_mode_from_videomode(const struct videomode *vm,
-+				    struct drm_display_mode *dmode)
-+{
-+	dmode->hdisplay = vm->hactive;
-+	dmode->hsync_start = dmode->hdisplay + vm->hfront_porch;
-+	dmode->hsync_end = dmode->hsync_start + vm->hsync_len;
-+	dmode->htotal = dmode->hsync_end + vm->hback_porch;
-+
-+	dmode->vdisplay = vm->vactive;
-+	dmode->vsync_start = dmode->vdisplay + vm->vfront_porch;
-+	dmode->vsync_end = dmode->vsync_start + vm->vsync_len;
-+	dmode->vtotal = dmode->vsync_end + vm->vback_porch;
-+
-+	dmode->clock = vm->pixelclock / 1000;
-+
-+	dmode->flags = 0;
-+	if (vm->dmt_flags & VESA_DMT_HSYNC_HIGH)
-+		dmode->flags |= DRM_MODE_FLAG_PHSYNC;
-+	else if (vm->dmt_flags & VESA_DMT_HSYNC_LOW)
-+		dmode->flags |= DRM_MODE_FLAG_NHSYNC;
-+	if (vm->dmt_flags & VESA_DMT_VSYNC_HIGH)
-+		dmode->flags |= DRM_MODE_FLAG_PVSYNC;
-+	else if (vm->dmt_flags & VESA_DMT_VSYNC_LOW)
-+		dmode->flags |= DRM_MODE_FLAG_NVSYNC;
-+	if (vm->data_flags & DISPLAY_FLAGS_INTERLACED)
-+		dmode->flags |= DRM_MODE_FLAG_INTERLACE;
-+	if (vm->data_flags & DISPLAY_FLAGS_DOUBLESCAN)
-+		dmode->flags |= DRM_MODE_FLAG_DBLSCAN;
-+	drm_mode_set_name(dmode);
-+
-+	return 0;
-+}
-+EXPORT_SYMBOL_GPL(drm_display_mode_from_videomode);
-+#endif
-+
- /**
-  * drm_mode_set_name - set the name on a mode
-  * @mode: name will be set in this mode
-diff --git a/include/drm/drmP.h b/include/drm/drmP.h
-index fad21c9..d5c06ff 100644
---- a/include/drm/drmP.h
-+++ b/include/drm/drmP.h
-@@ -85,6 +85,8 @@ struct module;
- struct drm_file;
- struct drm_device;
- 
-+struct videomode;
-+
- #include <drm/drm_os_linux.h>
- #include <drm/drm_hashtab.h>
- #include <drm/drm_mm.h>
-@@ -1456,6 +1458,9 @@ extern struct drm_display_mode *
- drm_mode_create_from_cmdline_mode(struct drm_device *dev,
- 				  struct drm_cmdline_mode *cmd);
- 
-+extern int drm_display_mode_from_videomode(const struct videomode *vm,
-+					   struct drm_display_mode *dmode);
-+
- /* Modesetting support */
- extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc);
- extern void drm_vblank_post_modeset(struct drm_device *dev, int crtc);
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0007-drm_modes-add-of_videomode-helpers.patch b/patches/da8xx-fb/0007-drm_modes-add-of_videomode-helpers.patch
deleted file mode 100644
index dc4558c865c32728c7148bcb5e89f110b9630ee8..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0007-drm_modes-add-of_videomode-helpers.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 614c134da2997f4b36d90aca8634eb18eb7cd539 Mon Sep 17 00:00:00 2001
-From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
-Date: Wed, 19 Dec 2012 16:37:06 +0530
-Subject: [PATCH 07/48] drm_modes: add of_videomode helpers
-
-Add helper to get drm_display_mode from devicetree.
-
-Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
-Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
-Acked-by: Thierry Reding <thierry.reding@avionic-design.de>
-Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
-Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
----
- drivers/gpu/drm/drm_modes.c | 33 +++++++++++++++++++++++++++++++++
- include/drm/drmP.h          |  4 ++++
- 2 files changed, 37 insertions(+)
-
-diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
-index 9f3f20b..04fa6f1 100644
---- a/drivers/gpu/drm/drm_modes.c
-+++ b/drivers/gpu/drm/drm_modes.c
-@@ -35,6 +35,7 @@
- #include <linux/export.h>
- #include <drm/drmP.h>
- #include <drm/drm_crtc.h>
-+#include <video/of_videomode.h>
- #include <video/videomode.h>
- 
- /**
-@@ -541,6 +542,38 @@ int drm_display_mode_from_videomode(const struct videomode *vm,
- EXPORT_SYMBOL_GPL(drm_display_mode_from_videomode);
- #endif
- 
-+#if IS_ENABLED(CONFIG_OF_VIDEOMODE)
-+/**
-+ * of_get_drm_display_mode - get a drm_display_mode from devicetree
-+ * @np: device_node with the timing specification
-+ * @dmode: will be set to the return value
-+ * @index: index into the list of display timings in devicetree
-+ *
-+ * This function is expensive and should only be used, if only one mode is to be
-+ * read from DT. To get multiple modes start with of_get_display_timings and
-+ * work with that instead.
-+ */
-+int of_get_drm_display_mode(struct device_node *np,
-+			    struct drm_display_mode *dmode, int index)
-+{
-+	struct videomode vm;
-+	int ret;
-+
-+	ret = of_get_videomode(np, &vm, index);
-+	if (ret)
-+		return ret;
-+
-+	drm_display_mode_from_videomode(&vm, dmode);
-+
-+	pr_debug("%s: got %dx%d display mode from %s\n",
-+		of_node_full_name(np), vm.hactive, vm.vactive, np->name);
-+	drm_mode_debug_printmodeline(dmode);
-+
-+	return 0;
-+}
-+EXPORT_SYMBOL_GPL(of_get_drm_display_mode);
-+#endif
-+
- /**
-  * drm_mode_set_name - set the name on a mode
-  * @mode: name will be set in this mode
-diff --git a/include/drm/drmP.h b/include/drm/drmP.h
-index d5c06ff..fcc9d23 100644
---- a/include/drm/drmP.h
-+++ b/include/drm/drmP.h
-@@ -85,6 +85,7 @@ struct module;
- struct drm_file;
- struct drm_device;
- 
-+struct device_node;
- struct videomode;
- 
- #include <drm/drm_os_linux.h>
-@@ -1460,6 +1461,9 @@ drm_mode_create_from_cmdline_mode(struct drm_device *dev,
- 
- extern int drm_display_mode_from_videomode(const struct videomode *vm,
- 					   struct drm_display_mode *dmode);
-+extern int of_get_drm_display_mode(struct device_node *np,
-+				   struct drm_display_mode *dmode,
-+				   int index);
- 
- /* Modesetting support */
- extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc);
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0008-fbmon-fix-build-error.patch b/patches/da8xx-fb/0008-fbmon-fix-build-error.patch
deleted file mode 100644
index e59918ff0985548f4431750a0b9e51f161cc57e4..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0008-fbmon-fix-build-error.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From e0172b7960d5edf916c795d932912ca1a7b7e0b2 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Wed, 2 Jan 2013 19:16:40 +0530
-Subject: [PATCH 08/48] fbmon: fix build error
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- include/linux/fb.h | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/include/linux/fb.h b/include/linux/fb.h
-index 58b9860..0ce30d1 100644
---- a/include/linux/fb.h
-+++ b/include/linux/fb.h
-@@ -716,9 +716,19 @@ extern void fb_destroy_modedb(struct fb_videomode *modedb);
- extern int fb_find_mode_cvt(struct fb_videomode *mode, int margins, int rb);
- extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter);
- 
-+#if defined(CONFIG_OF_VIDEOMODE) && defined(CONFIG_FB_MODE_HELPERS)
- extern int of_get_fb_videomode(struct device_node *np,
- 			       struct fb_videomode *fb,
- 			       int index);
-+#else
-+static inline int of_get_fb_videomode(struct device_node *np,
-+				      struct fb_videomode *fb,
-+				      int index)
-+{
-+	return -EINVAL;
-+}
-+#endif
-+
- extern int fb_videomode_from_videomode(const struct videomode *vm,
- 				       struct fb_videomode *fbmode);
- 
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0009-of-display-timings-use-of_get_child_by_name.patch b/patches/da8xx-fb/0009-of-display-timings-use-of_get_child_by_name.patch
deleted file mode 100644
index d70d93984ec5a1697aa1216b29d5e510f17a5f31..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0009-of-display-timings-use-of_get_child_by_name.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From f3f70546cefc3463e5f5681eefc8b84796dd906d Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Mon, 28 Jan 2013 16:36:45 +0100
-Subject: [PATCH 09/48] of display timings: use of_get_child_by_name
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- drivers/video/of_display_timing.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
-index 13ecd98..c0ea594 100644
---- a/drivers/video/of_display_timing.c
-+++ b/drivers/video/of_display_timing.c
-@@ -125,7 +125,7 @@ struct display_timings *of_get_display_timings(struct device_node *np)
- 		return NULL;
- 	}
- 
--	timings_np = of_find_node_by_name(np, "display-timings");
-+	timings_np = of_get_child_by_name(np, "display-timings");
- 	if (!timings_np) {
- 		pr_err("%s: could not find display-timings node\n",
- 			of_node_full_name(np));
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0010-da8xx-Allow-use-by-am33xx-based-devices.patch b/patches/da8xx-fb/0010-da8xx-Allow-use-by-am33xx-based-devices.patch
deleted file mode 100644
index bece3799a1a5d58a87da79ab05633bbf6d53543a..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0010-da8xx-Allow-use-by-am33xx-based-devices.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 8f09d16786f3602d527f87667c99f2b177524b83 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Mon, 17 Dec 2012 15:32:48 +0530
-Subject: [PATCH 10/48] da8xx: Allow use by am33xx based devices
-
-This driver can be used for AM33xx devices, like the popular beaglebone.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/video/Kconfig | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
-index 4abcf9c..f8f0a41 100644
---- a/drivers/video/Kconfig
-+++ b/drivers/video/Kconfig
-@@ -2225,7 +2225,7 @@ config FB_SH7760
- 
- config FB_DA8XX
- 	tristate "DA8xx/OMAP-L1xx Framebuffer support"
--	depends on FB && ARCH_DAVINCI_DA8XX
-+	depends on FB && (ARCH_DAVINCI_DA8XX || SOC_AM33XX)
- 	select FB_CFB_FILLRECT
- 	select FB_CFB_COPYAREA
- 	select FB_CFB_IMAGEBLIT
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0011-video-da8xx-fb-fb_check_var-enhancement.patch b/patches/da8xx-fb/0011-video-da8xx-fb-fb_check_var-enhancement.patch
deleted file mode 100644
index a3978ffd29db365f15c1d814ba39ac0c07fc6f3e..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0011-video-da8xx-fb-fb_check_var-enhancement.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 5573f8942762bf850ec3dd9e01c15e0c0761285c Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Wed, 28 Nov 2012 19:21:51 +0530
-Subject: [PATCH 11/48] video: da8xx-fb: fb_check_var enhancement
-
-Check whether "struct fb_var_screeninfo" fields are sane, if not
-update it to be within allowed limits.
-
-If user sends down buggy "var" values, this will bring those within
-allowable limits. And fb_set_par is not supposed to change "var"
-values, fb_check_var has to ensure that values are proper.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index 0810939..d00dd17 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -888,6 +888,9 @@ static int fb_check_var(struct fb_var_screeninfo *var,
- 			struct fb_info *info)
- {
- 	int err = 0;
-+	struct da8xx_fb_par *par = info->par;
-+	int bpp = var->bits_per_pixel >> 3;
-+	unsigned long line_size = var->xres_virtual * bpp;
- 
- 	if (var->bits_per_pixel > 16 && lcd_revision == LCD_VERSION_1)
- 		return -EINVAL;
-@@ -955,6 +958,21 @@ static int fb_check_var(struct fb_var_screeninfo *var,
- 	var->green.msb_right = 0;
- 	var->blue.msb_right = 0;
- 	var->transp.msb_right = 0;
-+
-+	if (line_size * var->yres_virtual > par->vram_size)
-+		var->yres_virtual = par->vram_size / line_size;
-+
-+	if (var->yres > var->yres_virtual)
-+		var->yres = var->yres_virtual;
-+
-+	if (var->xres > var->xres_virtual)
-+		var->xres = var->xres_virtual;
-+
-+	if (var->xres + var->xoffset > var->xres_virtual)
-+		var->xoffset = var->xres_virtual - var->xres;
-+	if (var->yres + var->yoffset > var->yres_virtual)
-+		var->yoffset = var->yres_virtual - var->yres;
-+
- 	return err;
- }
- 
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0012-video-da8xx-fb-simplify-lcd_reset.patch b/patches/da8xx-fb/0012-video-da8xx-fb-simplify-lcd_reset.patch
deleted file mode 100644
index b95ae9387dbc868716e7d14bcac692defbf08703..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0012-video-da8xx-fb-simplify-lcd_reset.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 8e0d9481f7626f5ec456083ad0f83f44b0bd777b Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Thu, 6 Dec 2012 21:54:58 +0530
-Subject: [PATCH 12/48] video: da8xx-fb: simplify lcd_reset
-
-lcd_reset function doesn't require any arguement, remove it.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index d00dd17..52977b1 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -681,7 +681,7 @@ static int fb_setcolreg(unsigned regno, unsigned red, unsigned green,
- }
- #undef CNVT_TOHW
- 
--static void lcd_reset(struct da8xx_fb_par *par)
-+static void da8xx_fb_lcd_reset(void)
- {
- 	/* Disable the Raster if previously Enabled */
- 	lcd_disable_raster(false);
-@@ -721,7 +721,7 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg,
- 	u32 bpp;
- 	int ret = 0;
- 
--	lcd_reset(par);
-+	da8xx_fb_lcd_reset();
- 
- 	/* Calculate the divider */
- 	lcd_calc_clk_divider(par);
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0013-video-da8xx-fb-use-modedb-helper-to-update-var.patch b/patches/da8xx-fb/0013-video-da8xx-fb-use-modedb-helper-to-update-var.patch
deleted file mode 100644
index b3de110b4fd93cbf1ae68f98bb0b5b0254ac45f3..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0013-video-da8xx-fb-use-modedb-helper-to-update-var.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 030c79bd730ce76e09a9c01b7c76f327dcccb25f Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Thu, 6 Dec 2012 22:46:32 +0530
-Subject: [PATCH 13/48] video: da8xx-fb: use modedb helper to update var
-
-modedb structure is now used to store panel information, run modedb
-helper over it for initial update of "var" information instead of
-equating each fields.
-
-While at it, remove redundant update of bits_per_pixel.
-
-Note: pixclock is overridden with proper value using an existing code
-as currently modedb is having it in Hz instead of ps, this would be
-fixed in a later change and this overide would be removed.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 18 ++----------------
- 1 file changed, 2 insertions(+), 16 deletions(-)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index 52977b1..a1f6544 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -1329,6 +1329,8 @@ static int fb_probe(struct platform_device *device)
- 		par->panel_power_ctrl(1);
- 	}
- 
-+	fb_videomode_to_var(&da8xx_fb_var, lcdc_info);
-+
- 	if (lcd_init(par, lcd_cfg, lcdc_info) < 0) {
- 		dev_err(&device->dev, "lcd_init failed\n");
- 		ret = -EFAULT;
-@@ -1381,25 +1383,9 @@ static int fb_probe(struct platform_device *device)
- 		goto err_release_pl_mem;
- 	}
- 
--	/* Initialize par */
--	da8xx_fb_info->var.bits_per_pixel = lcd_cfg->bpp;
--
--	da8xx_fb_var.xres = lcdc_info->xres;
--	da8xx_fb_var.xres_virtual = lcdc_info->xres;
--
--	da8xx_fb_var.yres         = lcdc_info->yres;
--	da8xx_fb_var.yres_virtual = lcdc_info->yres * LCD_NUM_BUFFERS;
--
- 	da8xx_fb_var.grayscale =
- 	    lcd_cfg->panel_shade == MONOCHROME ? 1 : 0;
- 	da8xx_fb_var.bits_per_pixel = lcd_cfg->bpp;
--
--	da8xx_fb_var.hsync_len = lcdc_info->hsync_len;
--	da8xx_fb_var.vsync_len = lcdc_info->vsync_len;
--	da8xx_fb_var.right_margin = lcdc_info->right_margin;
--	da8xx_fb_var.left_margin  = lcdc_info->left_margin;
--	da8xx_fb_var.lower_margin = lcdc_info->lower_margin;
--	da8xx_fb_var.upper_margin = lcdc_info->upper_margin;
- 	da8xx_fb_var.pixclock = da8xxfb_pixel_clk_period(par);
- 
- 	/* Initialize fbinfo */
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0014-video-da8xx-fb-remove-unneeded-var-initialization.patch b/patches/da8xx-fb/0014-video-da8xx-fb-remove-unneeded-var-initialization.patch
deleted file mode 100644
index cd1aae639ca29e1740570b4581bbdba422ad843f..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0014-video-da8xx-fb-remove-unneeded-var-initialization.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 67e844803a66125df218908106a1d0cff4df0a61 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Thu, 6 Dec 2012 22:46:32 +0530
-Subject: [PATCH 14/48] video: da8xx-fb: remove unneeded "var" initialization
-
-modedb helper now updates "var" information based on the detected
-panel, remove the unnecessary initialization.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 22 +---------------------
- 1 file changed, 1 insertion(+), 21 deletions(-)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index a1f6544..18834fa 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -131,10 +131,6 @@
- 
- #define WSI_TIMEOUT	50
- #define PALETTE_SIZE	256
--#define LEFT_MARGIN	64
--#define RIGHT_MARGIN	64
--#define UPPER_MARGIN	32
--#define LOWER_MARGIN	32
- 
- static void __iomem *da8xx_fb_reg_base;
- static struct resource *lcdc_regs;
-@@ -184,23 +180,7 @@ struct da8xx_fb_par {
- 	u32 pseudo_palette[16];
- };
- 
--/* Variable Screen Information */
--static struct fb_var_screeninfo da8xx_fb_var = {
--	.xoffset = 0,
--	.yoffset = 0,
--	.transp = {0, 0, 0},
--	.nonstd = 0,
--	.activate = 0,
--	.height = -1,
--	.width = -1,
--	.accel_flags = 0,
--	.left_margin = LEFT_MARGIN,
--	.right_margin = RIGHT_MARGIN,
--	.upper_margin = UPPER_MARGIN,
--	.lower_margin = LOWER_MARGIN,
--	.sync = 0,
--	.vmode = FB_VMODE_NONINTERLACED
--};
-+static struct fb_var_screeninfo da8xx_fb_var;
- 
- static struct fb_fix_screeninfo da8xx_fb_fix = {
- 	.id = "DA8xx FB Drv",
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0015-video-da8xx-fb-store-current-display-information.patch b/patches/da8xx-fb/0015-video-da8xx-fb-store-current-display-information.patch
deleted file mode 100644
index 9ecdeae6d3b1db8bf6d087be0c4ede64d18e0cfe..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0015-video-da8xx-fb-store-current-display-information.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 8adffc2b3b48730ae74e4f372ba1cbab3eede32b Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Thu, 6 Dec 2012 23:18:07 +0530
-Subject: [PATCH 15/48] video: da8xx-fb: store current display information
-
-store current videomode and controller data so that reconfiguring can
-be done easily. Reconfiguring would be required in fb_set_par, which
-is going to be added soon.
-
-If these details are not stored, the work probe does to retrieve these
-information would have to repeated at the place of reconfiguring and
-modifying platform data would be necessary to handle controller data
-changes like bpp.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index 18834fa..d060f14 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -178,6 +178,8 @@ struct da8xx_fb_par {
- #endif
- 	void (*panel_power_ctrl)(int);
- 	u32 pseudo_palette[16];
-+	struct fb_videomode	mode;
-+	struct lcd_ctrl_config	cfg;
- };
- 
- static struct fb_var_screeninfo da8xx_fb_var;
-@@ -1310,6 +1312,8 @@ static int fb_probe(struct platform_device *device)
- 	}
- 
- 	fb_videomode_to_var(&da8xx_fb_var, lcdc_info);
-+	fb_var_to_videomode(&par->mode, &da8xx_fb_var);
-+	par->cfg = *lcd_cfg;
- 
- 	if (lcd_init(par, lcd_cfg, lcdc_info) < 0) {
- 		dev_err(&device->dev, "lcd_init failed\n");
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0016-video-da8xx-fb-store-clk-rate-even-if-CPUFREQ.patch b/patches/da8xx-fb/0016-video-da8xx-fb-store-clk-rate-even-if-CPUFREQ.patch
deleted file mode 100644
index 2a198e39bb1c2faa9bcdafb9ee6f2829b62ebd4b..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0016-video-da8xx-fb-store-clk-rate-even-if-CPUFREQ.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From fcf025f0ea8c42bbeaf1db6bef526330c1da3e6b Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Fri, 7 Dec 2012 02:00:23 +0530
-Subject: [PATCH 16/48] video: da8xx-fb: store clk rate even if !CPUFREQ
-
-store lcd clk rate always, i.e. irrespective of whether CPUFREQ is
-enabled or not. This can be used to get clk rate directly instead of
-enquiring with clock framework with clk handle every time.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index d060f14..f1d88ac 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -174,8 +174,8 @@ struct da8xx_fb_par {
- 	unsigned int		which_dma_channel_done;
- #ifdef CONFIG_CPU_FREQ
- 	struct notifier_block	freq_transition;
--	unsigned int		lcd_fck_rate;
- #endif
-+	unsigned int		lcd_fck_rate;
- 	void (*panel_power_ctrl)(int);
- 	u32 pseudo_palette[16];
- 	struct fb_videomode	mode;
-@@ -1302,9 +1302,7 @@ static int fb_probe(struct platform_device *device)
- 
- 	par = da8xx_fb_info->par;
- 	par->lcdc_clk = fb_clk;
--#ifdef CONFIG_CPU_FREQ
- 	par->lcd_fck_rate = clk_get_rate(fb_clk);
--#endif
- 	par->pxl_clk = lcdc_info->pixclock;
- 	if (fb_pdata->panel_power_ctrl) {
- 		par->panel_power_ctrl = fb_pdata->panel_power_ctrl;
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0017-video-da8xx-fb-pix-clk-and-clk-div-handling-cleanup.patch b/patches/da8xx-fb/0017-video-da8xx-fb-pix-clk-and-clk-div-handling-cleanup.patch
deleted file mode 100644
index ca3bbeb176d06221aaf480d8e924a07f44a6444d..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0017-video-da8xx-fb-pix-clk-and-clk-div-handling-cleanup.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-From 5e4ae6da15fd1d6ed90cf2b2ae3a7a9130185963 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Tue, 4 Dec 2012 17:34:03 +0530
-Subject: [PATCH 17/48] video: da8xx-fb: pix clk and clk div handling cleanup
-
-Use the new modedb field to store pix clk. Reorganize existing clock
-divider functions with names now corresponding to what they do, add
-common function prefix.
-
-Fix existing panel modedb pixclock to be in ps instead of Hz. This
-needed a change in the way clock divider is calculated. As modedb
-pixclock information is now in ps, override on "var" pixclock over
-modedb to var conversion is removed.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 48 ++++++++++++++++++------------------------------
- 1 file changed, 18 insertions(+), 30 deletions(-)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index f1d88ac..7f08644 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -160,7 +160,6 @@ struct da8xx_fb_par {
- 	struct clk *lcdc_clk;
- 	int irq;
- 	unsigned int palette_sz;
--	unsigned int pxl_clk;
- 	int blank;
- 	wait_queue_head_t	vsync_wait;
- 	int			vsync_flag;
-@@ -201,7 +200,7 @@ static struct fb_videomode known_lcd_panels[] = {
- 		.name           = "Sharp_LCD035Q3DG01",
- 		.xres           = 320,
- 		.yres           = 240,
--		.pixclock       = 4608000,
-+		.pixclock       = 217014,
- 		.left_margin    = 6,
- 		.right_margin   = 8,
- 		.upper_margin   = 2,
-@@ -216,7 +215,7 @@ static struct fb_videomode known_lcd_panels[] = {
- 		.name           = "Sharp_LK043T1DG01",
- 		.xres           = 480,
- 		.yres           = 272,
--		.pixclock       = 7833600,
-+		.pixclock       = 127655,
- 		.left_margin    = 2,
- 		.right_margin   = 2,
- 		.upper_margin   = 2,
-@@ -231,7 +230,7 @@ static struct fb_videomode known_lcd_panels[] = {
- 		.name           = "SP10Q010",
- 		.xres           = 320,
- 		.yres           = 240,
--		.pixclock       = 7833600,
-+		.pixclock       = 127655,
- 		.left_margin    = 10,
- 		.right_margin   = 10,
- 		.upper_margin   = 10,
-@@ -680,13 +679,14 @@ static void da8xx_fb_lcd_reset(void)
- 	}
- }
- 
--static void lcd_calc_clk_divider(struct da8xx_fb_par *par)
-+static inline unsigned da8xx_fb_calc_clk_divider(struct da8xx_fb_par *par,
-+						 unsigned pixclock)
- {
--	unsigned int lcd_clk, div;
--
--	lcd_clk = clk_get_rate(par->lcdc_clk);
--	div = lcd_clk / par->pxl_clk;
-+	return par->lcd_fck_rate / (PICOS2KHZ(pixclock) * 1000);
-+}
- 
-+static inline void da8xx_fb_config_clk_divider(unsigned div)
-+{
- 	/* Configure the LCD clock divisor. */
- 	lcdc_write(LCD_CLK_DIVISOR(div) |
- 			(LCD_RASTER_MODE & 0x1), LCD_CTRL_REG);
-@@ -694,7 +694,14 @@ static void lcd_calc_clk_divider(struct da8xx_fb_par *par)
- 	if (lcd_revision == LCD_VERSION_2)
- 		lcdc_write(LCD_V2_DMA_CLK_EN | LCD_V2_LIDD_CLK_EN |
- 				LCD_V2_CORE_CLK_EN, LCD_CLK_ENABLE_REG);
-+}
-+
-+static inline void da8xx_fb_calc_config_clk_divider(struct da8xx_fb_par *par,
-+						    struct fb_videomode *mode)
-+{
-+	unsigned div = da8xx_fb_calc_clk_divider(par, mode->pixclock);
- 
-+	da8xx_fb_config_clk_divider(div);
- }
- 
- static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg,
-@@ -705,8 +712,7 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg,
- 
- 	da8xx_fb_lcd_reset();
- 
--	/* Calculate the divider */
--	lcd_calc_clk_divider(par);
-+	da8xx_fb_calc_config_clk_divider(par, panel);
- 
- 	if (panel->sync & FB_SYNC_CLK_INVERT)
- 		lcdc_write((lcdc_read(LCD_RASTER_TIMING_2_REG) |
-@@ -969,7 +975,7 @@ static int lcd_da8xx_cpufreq_transition(struct notifier_block *nb,
- 		if (par->lcd_fck_rate != clk_get_rate(par->lcdc_clk)) {
- 			par->lcd_fck_rate = clk_get_rate(par->lcdc_clk);
- 			lcd_disable_raster(true);
--			lcd_calc_clk_divider(par);
-+			da8xx_fb_calc_config_clk_divider(par, &par->mode);
- 			if (par->blank == FB_BLANK_UNBLANK)
- 				lcd_enable_raster();
- 		}
-@@ -1195,22 +1201,6 @@ static struct fb_ops da8xx_fb_ops = {
- 	.fb_blank = cfb_blank,
- };
- 
--/* Calculate and return pixel clock period in pico seconds */
--static unsigned int da8xxfb_pixel_clk_period(struct da8xx_fb_par *par)
--{
--	unsigned int lcd_clk, div;
--	unsigned int configured_pix_clk;
--	unsigned long long pix_clk_period_picosec = 1000000000000ULL;
--
--	lcd_clk = clk_get_rate(par->lcdc_clk);
--	div = lcd_clk / par->pxl_clk;
--	configured_pix_clk = (lcd_clk / div);
--
--	do_div(pix_clk_period_picosec, configured_pix_clk);
--
--	return pix_clk_period_picosec;
--}
--
- static int fb_probe(struct platform_device *device)
- {
- 	struct da8xx_lcdc_platform_data *fb_pdata =
-@@ -1303,7 +1293,6 @@ static int fb_probe(struct platform_device *device)
- 	par = da8xx_fb_info->par;
- 	par->lcdc_clk = fb_clk;
- 	par->lcd_fck_rate = clk_get_rate(fb_clk);
--	par->pxl_clk = lcdc_info->pixclock;
- 	if (fb_pdata->panel_power_ctrl) {
- 		par->panel_power_ctrl = fb_pdata->panel_power_ctrl;
- 		par->panel_power_ctrl(1);
-@@ -1368,7 +1357,6 @@ static int fb_probe(struct platform_device *device)
- 	da8xx_fb_var.grayscale =
- 	    lcd_cfg->panel_shade == MONOCHROME ? 1 : 0;
- 	da8xx_fb_var.bits_per_pixel = lcd_cfg->bpp;
--	da8xx_fb_var.pixclock = da8xxfb_pixel_clk_period(par);
- 
- 	/* Initialize fbinfo */
- 	da8xx_fb_info->flags = FBINFO_FLAG_DEFAULT;
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0018-video-da8xx-fb-store-struct-device.patch b/patches/da8xx-fb/0018-video-da8xx-fb-store-struct-device.patch
deleted file mode 100644
index efeb052771a16d187a731c878574242b63ea52f4..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0018-video-da8xx-fb-store-struct-device.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 6a97dda2bb70290ca2956bb7fbb6eade0454b589 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Wed, 5 Dec 2012 12:16:17 +0530
-Subject: [PATCH 18/48] video: da8xx-fb: store struct device *
-
-store struct device pointer so that dev_dbg/err can be used outside
-of probe.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index 7f08644..a5341d0 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -150,6 +150,7 @@ static inline void lcdc_write(unsigned int val, unsigned int addr)
- }
- 
- struct da8xx_fb_par {
-+	struct device		*dev;
- 	resource_size_t p_palette_base;
- 	unsigned char *v_palette_base;
- 	dma_addr_t		vram_phys;
-@@ -1291,6 +1292,7 @@ static int fb_probe(struct platform_device *device)
- 	}
- 
- 	par = da8xx_fb_info->par;
-+	par->dev = &device->dev;
- 	par->lcdc_clk = fb_clk;
- 	par->lcd_fck_rate = clk_get_rate(fb_clk);
- 	if (fb_pdata->panel_power_ctrl) {
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0019-video-da8xx-fb-report-correct-pixclock.patch b/patches/da8xx-fb/0019-video-da8xx-fb-report-correct-pixclock.patch
deleted file mode 100644
index 1f5812e038d18bd42e7bed5348815005af9f0cea..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0019-video-da8xx-fb-report-correct-pixclock.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From aabaf8cc2ae3d0b6875dcc026b75b8c26821b6a0 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Tue, 4 Dec 2012 18:40:45 +0530
-Subject: [PATCH 19/48] video: da8xx-fb: report correct pixclock
-
-Update "var" pixclock with the value that is configurable in hardware.
-This lets user know the actual pixclock.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index a5341d0..0f73c76 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -686,6 +686,15 @@ static inline unsigned da8xx_fb_calc_clk_divider(struct da8xx_fb_par *par,
- 	return par->lcd_fck_rate / (PICOS2KHZ(pixclock) * 1000);
- }
- 
-+static inline unsigned da8xx_fb_round_clk(struct da8xx_fb_par *par,
-+					  unsigned pixclock)
-+{
-+	unsigned div;
-+
-+	div = da8xx_fb_calc_clk_divider(par, pixclock);
-+	return KHZ2PICOS(par->lcd_fck_rate / (1000 * div));
-+}
-+
- static inline void da8xx_fb_config_clk_divider(unsigned div)
- {
- 	/* Configure the LCD clock divisor. */
-@@ -962,6 +971,8 @@ static int fb_check_var(struct fb_var_screeninfo *var,
- 	if (var->yres + var->yoffset > var->yres_virtual)
- 		var->yoffset = var->yres_virtual - var->yres;
- 
-+	var->pixclock = da8xx_fb_round_clk(par, var->pixclock);
-+
- 	return err;
- }
- 
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0020-video-da8xx-fb-fb_set_par-support.patch b/patches/da8xx-fb/0020-video-da8xx-fb-fb_set_par-support.patch
deleted file mode 100644
index 6a725a586b8525ff330aea28a64b782003b5defb..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0020-video-da8xx-fb-fb_set_par-support.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From 4e89ce54974c7177541420e772eb7839834cb1b6 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Wed, 28 Nov 2012 20:08:50 +0530
-Subject: [PATCH 20/48] video: da8xx-fb: fb_set_par support
-
-fb_set_par helps in runtime configuration of lcd controller like
-changing resolution, pixel clock etc. (eg. using fbset utility)
-
-Reconfigure lcd controller based on information passed by framework.
-Enable raster back if it was already enabled.
-
-As fb_set_par would get invoked indirectly from probe via fb_set_var,
-remove existing lcdc initialization in probe and do lcdc reset in
-probe so that reset happens only at the begining.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 60 +++++++++++++++++++++++++++++++++++++++---------
- 1 file changed, 49 insertions(+), 11 deletions(-)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index 0f73c76..720604c 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -243,6 +243,11 @@ static struct fb_videomode known_lcd_panels[] = {
- 	},
- };
- 
-+static inline bool da8xx_fb_is_raster_enabled(void)
-+{
-+	return !!(lcdc_read(LCD_RASTER_CTRL_REG) & LCD_RASTER_ENABLE);
-+}
-+
- /* Enable the Raster Engine of the LCD Controller */
- static inline void lcd_enable_raster(void)
- {
-@@ -665,9 +670,6 @@ static int fb_setcolreg(unsigned regno, unsigned red, unsigned green,
- 
- static void da8xx_fb_lcd_reset(void)
- {
--	/* Disable the Raster if previously Enabled */
--	lcd_disable_raster(false);
--
- 	/* DMA has to be disabled */
- 	lcdc_write(0, LCD_DMA_CTRL_REG);
- 	lcdc_write(0, LCD_RASTER_CTRL_REG);
-@@ -720,8 +722,6 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg,
- 	u32 bpp;
- 	int ret = 0;
- 
--	da8xx_fb_lcd_reset();
--
- 	da8xx_fb_calc_config_clk_divider(par, panel);
- 
- 	if (panel->sync & FB_SYNC_CLK_INVERT)
-@@ -1201,9 +1201,52 @@ static int da8xx_pan_display(struct fb_var_screeninfo *var,
- 	return ret;
- }
- 
-+static int da8xxfb_set_par(struct fb_info *info)
-+{
-+	struct da8xx_fb_par *par = info->par;
-+	int ret;
-+	bool raster = da8xx_fb_is_raster_enabled();
-+
-+	if (raster)
-+		lcd_disable_raster(true);
-+	else
-+		lcd_disable_raster(false);
-+
-+	fb_var_to_videomode(&par->mode, &info->var);
-+
-+	par->cfg.bpp = info->var.bits_per_pixel;
-+
-+	info->fix.visual = (par->cfg.bpp <= 8) ?
-+				FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
-+	info->fix.line_length = (par->mode.xres * par->cfg.bpp) / 8;
-+
-+	ret = lcd_init(par, &par->cfg, &par->mode);
-+	if (ret < 0) {
-+		dev_err(par->dev, "lcd init failed\n");
-+		return ret;
-+	}
-+
-+	par->dma_start = info->fix.smem_start +
-+			 info->var.yoffset * info->fix.line_length +
-+			 info->var.xoffset * info->var.bits_per_pixel / 8;
-+	par->dma_end   = par->dma_start +
-+			 info->var.yres * info->fix.line_length - 1;
-+
-+	lcdc_write(par->dma_start, LCD_DMA_FRM_BUF_BASE_ADDR_0_REG);
-+	lcdc_write(par->dma_end, LCD_DMA_FRM_BUF_CEILING_ADDR_0_REG);
-+	lcdc_write(par->dma_start, LCD_DMA_FRM_BUF_BASE_ADDR_1_REG);
-+	lcdc_write(par->dma_end, LCD_DMA_FRM_BUF_CEILING_ADDR_1_REG);
-+
-+	if (raster)
-+		lcd_enable_raster();
-+
-+	return 0;
-+}
-+
- static struct fb_ops da8xx_fb_ops = {
- 	.owner = THIS_MODULE,
- 	.fb_check_var = fb_check_var,
-+	.fb_set_par = da8xxfb_set_par,
- 	.fb_setcolreg = fb_setcolreg,
- 	.fb_pan_display = da8xx_pan_display,
- 	.fb_ioctl = fb_ioctl,
-@@ -1312,14 +1355,9 @@ static int fb_probe(struct platform_device *device)
- 	}
- 
- 	fb_videomode_to_var(&da8xx_fb_var, lcdc_info);
--	fb_var_to_videomode(&par->mode, &da8xx_fb_var);
- 	par->cfg = *lcd_cfg;
- 
--	if (lcd_init(par, lcd_cfg, lcdc_info) < 0) {
--		dev_err(&device->dev, "lcd_init failed\n");
--		ret = -EFAULT;
--		goto err_release_fb;
--	}
-+	da8xx_fb_lcd_reset();
- 
- 	/* allocate frame buffer */
- 	par->vram_size = lcdc_info->xres * lcdc_info->yres * lcd_cfg->bpp;
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0021-ARM-dts-AM33XX-Add-lcdc-node.patch b/patches/da8xx-fb/0021-ARM-dts-AM33XX-Add-lcdc-node.patch
deleted file mode 100644
index 6a0145a480a6992a62bf37bda3d0108146579bcb..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0021-ARM-dts-AM33XX-Add-lcdc-node.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 3f9c210a61b1fe7528bcaa8ec4411fe6e1fecd71 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Mon, 17 Dec 2012 15:27:44 +0530
-Subject: [PATCH 21/48] ARM: dts: AM33XX: Add lcdc node
-
-Add lcdc node.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- arch/arm/boot/dts/am33xx.dtsi | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index bfae98b..7a9c357 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -455,5 +455,13 @@
- 			interrupts = <16>;
- 			ti,hwmods = "adc_tsc";
- 		};
-+
-+		lcdc: lcdc@4830e000 {
-+			compatible = "ti,am3352-lcdc", "ti,da830-lcdc";
-+			reg = <0x4830e000 0x1000>;
-+			interrupts = <36>;
-+			status = "disabled";
-+			ti,hwmods = "lcdc";
-+		};
- 	};
- };
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0022-ARM-dts-AM33XX-Add-am335x-evm-lcdc-panel-timings.patch b/patches/da8xx-fb/0022-ARM-dts-AM33XX-Add-am335x-evm-lcdc-panel-timings.patch
deleted file mode 100644
index 4465c0f084d64d2a8cb6626026e0409e244388c8..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0022-ARM-dts-AM33XX-Add-am335x-evm-lcdc-panel-timings.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 91b8c4cd9f6f0f18ee9230e543cd0169b3250d45 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Mon, 31 Dec 2012 14:08:54 +0530
-Subject: [PATCH 22/48] ARM: dts: AM33XX: Add am335x-evm lcdc panel timings
-
-Update lcdc node with panel timings (typical) for AM335X-EVM.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- arch/arm/boot/dts/am335x-evm.dts | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
-index d4dd1af..9415b31 100644
---- a/arch/arm/boot/dts/am335x-evm.dts
-+++ b/arch/arm/boot/dts/am335x-evm.dts
-@@ -283,3 +283,23 @@
- 		ti,adc-channels = <4>;
- 	};
- };
-+
-+&lcdc {
-+	status = "okay";
-+
-+	display-timings {
-+		800x480p62 {
-+			clock-frequency = <30000000>;
-+			hactive = <800>;
-+			vactive = <480>;
-+			hfront-porch = <39>;
-+			hback-porch = <39>;
-+			hsync-len = <47>;
-+			vback-porch = <29>;
-+			vfront-porch = <13>;
-+			vsync-len = <2>;
-+			hsync-active = <1>;
-+			vsync-active = <1>;
-+		};
-+	};
-+};
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0023-ARM-dts-AM33XX-Add-am335x-evm-lcdc-pincontrol-info.patch b/patches/da8xx-fb/0023-ARM-dts-AM33XX-Add-am335x-evm-lcdc-pincontrol-info.patch
deleted file mode 100644
index 6ffd2653e1dfef59f0c6121b7363221abc4f1e43..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0023-ARM-dts-AM33XX-Add-am335x-evm-lcdc-pincontrol-info.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From efe0efd5b4eef58b6a677954d69360f957540627 Mon Sep 17 00:00:00 2001
-From: "Manjunathappa, Prakash" <prakash.pm@ti.com>
-Date: Mon, 17 Dec 2012 15:29:44 +0530
-Subject: [PATCH 23/48] ARM: dts: AM33XX: Add am335x-evm lcdc pincontrol info
-
-Update pin mux information for lcd panel on AM335X-EVM
-
-[afzal@ti.com: comment specifying user understandable pinmux details]
-
-Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- arch/arm/boot/dts/am335x-evm.dts | 34 +++++++++++++++++++++++++++++++++-
- 1 file changed, 33 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
-index 9415b31..af69e81 100644
---- a/arch/arm/boot/dts/am335x-evm.dts
-+++ b/arch/arm/boot/dts/am335x-evm.dts
-@@ -26,7 +26,7 @@
- 
- 	am33xx_pinmux: pinmux@44e10800 {
- 		pinctrl-names = "default";
--		pinctrl-0 = <&matrix_keypad_s0 &volume_keys_s0 &spi0_pins_s0>;
-+		pinctrl-0 = <&matrix_keypad_s0 &volume_keys_s0 &lcd_pins_s0>;
- 
- 		matrix_keypad_s0: matrix_keypad_s0 {
- 			pinctrl-single,pins = <
-@@ -54,6 +54,38 @@
- 			>;
- 		};
- 
-+		lcd_pins_s0: lcd_pins_s0 {
-+			pinctrl-single,pins = <
-+				0x20 0x01	/* gpmc_ad8.lcd_data16, OUTPUT | MODE1 */
-+				0x24 0x01	/* gpmc_ad9.lcd_data17, OUTPUT | MODE1 */
-+				0x28 0x01	/* gpmc_ad10.lcd_data18, OUTPUT | MODE1 */
-+				0x2c 0x01	/* gpmc_ad11.lcd_data19, OUTPUT | MODE1 */
-+				0x30 0x01	/* gpmc_ad12.lcd_data20, OUTPUT | MODE1 */
-+				0x34 0x01	/* gpmc_ad13.lcd_data21, OUTPUT | MODE1 */
-+				0x38 0x01	/* gpmc_ad14.lcd_data22, OUTPUT | MODE1 */
-+				0x3c 0x01	/* gpmc_ad15.lcd_data23, OUTPUT | MODE1 */
-+				0xa0 0x00	/* lcd_data0.lcd_data0, OUTPUT | MODE0 */
-+				0xa4 0x00	/* lcd_data1.lcd_data1, OUTPUT | MODE0 */
-+				0xa8 0x00	/* lcd_data2.lcd_data2, OUTPUT | MODE0 */
-+				0xac 0x00	/* lcd_data3.lcd_data3, OUTPUT | MODE0 */
-+				0xb0 0x00	/* lcd_data4.lcd_data4, OUTPUT | MODE0 */
-+				0xb4 0x00	/* lcd_data5.lcd_data5, OUTPUT | MODE0 */
-+				0xb8 0x00	/* lcd_data6.lcd_data6, OUTPUT | MODE0 */
-+				0xbc 0x00	/* lcd_data7.lcd_data7, OUTPUT | MODE0 */
-+				0xc0 0x00	/* lcd_data8.lcd_data8, OUTPUT | MODE0 */
-+				0xc4 0x00	/* lcd_data9.lcd_data9, OUTPUT | MODE0 */
-+				0xc8 0x00	/* lcd_data10.lcd_data10, OUTPUT | MODE0 */
-+				0xcc 0x00	/* lcd_data11.lcd_data11, OUTPUT | MODE0 */
-+				0xd0 0x00	/* lcd_data12.lcd_data12, OUTPUT | MODE0 */
-+				0xd4 0x00	/* lcd_data13.lcd_data13, OUTPUT | MODE0 */
-+				0xd8 0x00	/* lcd_data14.lcd_data14, OUTPUT | MODE0 */
-+				0xdc 0x00	/* lcd_data15.lcd_data15, OUTPUT | MODE0 */
-+				0xe0 0x00	/* lcd_vsync.lcd_vsync, OUTPUT | MODE0 */
-+				0xe4 0x00	/* lcd_hsync.lcd_hsync, OUTPUT | MODE0 */
-+				0xe8 0x00	/* lcd_pclk.lcd_pclk, OUTPUT | MODE0 */
-+				0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OUTPUT | MODE0 */
-+			>;
-+		};
- 	};
- 
- 	ocp {
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0024-ARM-dts-AM33XX-Add-am335x-evmsk-lcdc-panel-timings.patch b/patches/da8xx-fb/0024-ARM-dts-AM33XX-Add-am335x-evmsk-lcdc-panel-timings.patch
deleted file mode 100644
index 792cc6f60bf09b7eaa9985aa42f27b3a5df5106f..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0024-ARM-dts-AM33XX-Add-am335x-evmsk-lcdc-panel-timings.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 5828d937c5dbf06ef332316368ee54ea7869e091 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Thu, 3 Jan 2013 16:08:59 +0530
-Subject: [PATCH 24/48] ARM: dts: AM33XX: Add am335x-evmsk lcdc panel timings
-
-Update lcdc node with panel timings (typical) for AM335X-EVMSK.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- arch/arm/boot/dts/am335x-evmsk.dts | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
-index 2546724..ba1c805 100644
---- a/arch/arm/boot/dts/am335x-evmsk.dts
-+++ b/arch/arm/boot/dts/am335x-evmsk.dts
-@@ -255,3 +255,23 @@
- 	status = "okay";
- 	vmmc-supply = <&vmmc_reg>;
- };
-+
-+&lcdc {
-+	status = "okay";
-+
-+	display-timings {
-+		480x272p57 {
-+			clock-frequency = <9000000>;
-+			hactive = <480>;
-+			vactive = <272>;
-+			hfront-porch = <8>;
-+			hback-porch = <43>;
-+			hsync-len = <4>;
-+			vback-porch = <12>;
-+			vfront-porch = <4>;
-+			vsync-len = <10>;
-+			hsync-active = <1>;
-+			vsync-active = <1>;
-+		};
-+	};
-+};
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0025-ARM-dts-AM33XX-Add-am335x-evmsk-lcdc-pincontrol-info.patch b/patches/da8xx-fb/0025-ARM-dts-AM33XX-Add-am335x-evmsk-lcdc-pincontrol-info.patch
deleted file mode 100644
index 5c4ac529d2ecf64eac8850508296dc5ec58ddf96..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0025-ARM-dts-AM33XX-Add-am335x-evmsk-lcdc-pincontrol-info.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 20af335e4873ececdf8160b54ea697ce325d2185 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Thu, 3 Jan 2013 16:24:39 +0530
-Subject: [PATCH 25/48] ARM: dts: AM33XX: Add am335x-evmsk lcdc pincontrol info
-
-Update pin mux information for lcd panel on AM335X-EVMSK.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- arch/arm/boot/dts/am335x-evmsk.dts | 35 ++++++++++++++++++++++++++++++++++-
- 1 file changed, 34 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
-index ba1c805..f684704 100644
---- a/arch/arm/boot/dts/am335x-evmsk.dts
-+++ b/arch/arm/boot/dts/am335x-evmsk.dts
-@@ -32,7 +32,7 @@
- 
- 	am33xx_pinmux: pinmux@44e10800 {
- 		pinctrl-names = "default";
--		pinctrl-0 = <&user_leds_s0 &gpio_keys_s0>;
-+		pinctrl-0 = <&user_leds_s0 &gpio_keys_s0 &lcd_pins_s0>;
- 
- 		user_leds_s0: user_leds_s0 {
- 			pinctrl-single,pins = <
-@@ -51,6 +51,39 @@
- 				0x9c 0x27	/* gpmc_ben0_cle.gpio2_5, INPUT | MODE7 */
- 			>;
- 		};
-+
-+		lcd_pins_s0: lcd_pins_s0 {
-+			pinctrl-single,pins = <
-+				0x20 0x01	/* gpmc_ad8.lcd_data16, OUTPUT | MODE1 */
-+				0x24 0x01	/* gpmc_ad9.lcd_data17, OUTPUT | MODE1 */
-+				0x28 0x01	/* gpmc_ad10.lcd_data18, OUTPUT | MODE1 */
-+				0x2c 0x01	/* gpmc_ad11.lcd_data19, OUTPUT | MODE1 */
-+				0x30 0x01	/* gpmc_ad12.lcd_data20, OUTPUT | MODE1 */
-+				0x34 0x01	/* gpmc_ad13.lcd_data21, OUTPUT | MODE1 */
-+				0x38 0x01	/* gpmc_ad14.lcd_data22, OUTPUT | MODE1 */
-+				0x3c 0x01	/* gpmc_ad15.lcd_data23, OUTPUT | MODE1 */
-+				0xa0 0x00	/* lcd_data0.lcd_data0, OUTPUT | MODE0 */
-+				0xa4 0x00	/* lcd_data1.lcd_data1, OUTPUT | MODE0 */
-+				0xa8 0x00	/* lcd_data2.lcd_data2, OUTPUT | MODE0 */
-+				0xac 0x00	/* lcd_data3.lcd_data3, OUTPUT | MODE0 */
-+				0xb0 0x00	/* lcd_data4.lcd_data4, OUTPUT | MODE0 */
-+				0xb4 0x00	/* lcd_data5.lcd_data5, OUTPUT | MODE0 */
-+				0xb8 0x00	/* lcd_data6.lcd_data6, OUTPUT | MODE0 */
-+				0xbc 0x00	/* lcd_data7.lcd_data7, OUTPUT | MODE0 */
-+				0xc0 0x00	/* lcd_data8.lcd_data8, OUTPUT | MODE0 */
-+				0xc4 0x00	/* lcd_data9.lcd_data9, OUTPUT | MODE0 */
-+				0xc8 0x00	/* lcd_data10.lcd_data10, OUTPUT | MODE0 */
-+				0xcc 0x00	/* lcd_data11.lcd_data11, OUTPUT | MODE0 */
-+				0xd0 0x00	/* lcd_data12.lcd_data12, OUTPUT | MODE0 */
-+				0xd4 0x00	/* lcd_data13.lcd_data13, OUTPUT | MODE0 */
-+				0xd8 0x00	/* lcd_data14.lcd_data14, OUTPUT | MODE0 */
-+				0xdc 0x00	/* lcd_data15.lcd_data15, OUTPUT | MODE0 */
-+				0xe0 0x00	/* lcd_vsync.lcd_vsync, OUTPUT | MODE0 */
-+				0xe4 0x00	/* lcd_hsync.lcd_hsync, OUTPUT | MODE0 */
-+				0xe8 0x00	/* lcd_pclk.lcd_pclk, OUTPUT | MODE0 */
-+				0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OUTPUT | MODE0 */
-+			>;
-+		};
- 	};
- 
- 	ocp {
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0026-ARM-OMAP-AM33xx-hwmod-Corrects-PWM-subsystem-HWMOD-e.patch b/patches/da8xx-fb/0026-ARM-OMAP-AM33xx-hwmod-Corrects-PWM-subsystem-HWMOD-e.patch
deleted file mode 100644
index 3ef665a913ac6fd32e2868f20e9f8c4ed636da27..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0026-ARM-OMAP-AM33xx-hwmod-Corrects-PWM-subsystem-HWMOD-e.patch
+++ /dev/null
@@ -1,254 +0,0 @@
-From edc588d5fb3dbc0ae52094ca7ecbebeb819717f5 Mon Sep 17 00:00:00 2001
-From: "Philip, Avinash" <avinashphilip@ti.com>
-Date: Tue, 16 Oct 2012 14:50:58 +0530
-Subject: [PATCH 26/48] ARM: OMAP: AM33xx hwmod: Corrects PWM subsystem HWMOD
- entries
-
-EQEP entry is HWMOD entry is not present in HWMOD entry. Also address
-ranges specified for EACP & EHRPWM is not correct & HWMOD flags of
-ADDR_TYPE_RT is added to PWM subsystem register address space. This
-patch
-1. Corrects register address mapping for ECAP & EHRPWM
-2. Removes  HWMOD flags in PWM submodule register address space.
-3. Adds EQEP HWMOD entries.
-
-Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
----
- arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 158 ++++++++++++++++++++++++++---
- 1 file changed, 145 insertions(+), 13 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
-index 646c14d..60d4c3e 100644
---- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
-@@ -784,7 +784,7 @@ static struct omap_hwmod am33xx_elm_hwmod = {
- };
- 
- /*
-- * 'epwmss' class: ecap0,1,2,  ehrpwm0,1,2
-+ * 'epwmss' class: ehrpwm0,1,2 eqep0,1,2 ecap0,1,2
-  */
- static struct omap_hwmod_class_sysconfig am33xx_epwmss_sysc = {
- 	.rev_offs	= 0x0,
-@@ -864,6 +864,66 @@ static struct omap_hwmod am33xx_ehrpwm2_hwmod = {
- 	},
- };
- 
-+/* eqep0 */
-+static struct omap_hwmod_irq_info am33xx_eqep0_irqs[] = {
-+	{ .irq = 79 + OMAP_INTC_START, },
-+	{ .irq = -1 },
-+};
-+
-+static struct omap_hwmod am33xx_eqep0_hwmod = {
-+	.name		= "eqep0",
-+	.class		= &am33xx_epwmss_hwmod_class,
-+	.clkdm_name	= "l4ls_clkdm",
-+	.mpu_irqs	= am33xx_eqep0_irqs,
-+	.main_clk	= "l4ls_gclk",
-+	.prcm		= {
-+		.omap4	= {
-+			.clkctrl_offs	= AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET,
-+			.modulemode	= MODULEMODE_SWCTRL,
-+		},
-+	},
-+};
-+
-+/* eqep1 */
-+static struct omap_hwmod_irq_info am33xx_eqep1_irqs[] = {
-+	{ .irq = 88 + OMAP_INTC_START, },
-+	{ .irq = -1 },
-+};
-+
-+static struct omap_hwmod am33xx_eqep1_hwmod = {
-+	.name		= "eqep1",
-+	.class		= &am33xx_epwmss_hwmod_class,
-+	.clkdm_name	= "l4ls_clkdm",
-+	.mpu_irqs	= am33xx_eqep1_irqs,
-+	.main_clk	= "l4ls_gclk",
-+	.prcm		= {
-+		.omap4	= {
-+			.clkctrl_offs	= AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET,
-+			.modulemode	= MODULEMODE_SWCTRL,
-+		},
-+	},
-+};
-+
-+/* eqep2 */
-+static struct omap_hwmod_irq_info am33xx_eqep2_irqs[] = {
-+	{ .irq = 89 + OMAP_INTC_START, },
-+	{ .irq = -1 },
-+};
-+
-+static struct omap_hwmod am33xx_eqep2_hwmod = {
-+	.name		= "eqep2",
-+	.class		= &am33xx_epwmss_hwmod_class,
-+	.clkdm_name	= "l4ls_clkdm",
-+	.mpu_irqs	= am33xx_eqep2_irqs,
-+	.main_clk	= "l4ls_gclk",
-+	.prcm		= {
-+		.omap4	= {
-+			.clkctrl_offs	= AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET,
-+			.modulemode	= MODULEMODE_SWCTRL,
-+		},
-+	},
-+};
-+
- /* ecap0 */
- static struct omap_hwmod_irq_info am33xx_ecap0_irqs[] = {
- 	{ .irq = 31 + OMAP_INTC_START, },
-@@ -2559,8 +2619,7 @@ static struct omap_hwmod_addr_space am33xx_ehrpwm0_addr_space[] = {
- 	},
- 	{
- 		.pa_start	= 0x48300200,
--		.pa_end		= 0x48300200 + SZ_256 - 1,
--		.flags		= ADDR_TYPE_RT
-+		.pa_end		= 0x48300200 + SZ_128 - 1,
- 	},
- 	{ }
- };
-@@ -2585,8 +2644,7 @@ static struct omap_hwmod_addr_space am33xx_ehrpwm1_addr_space[] = {
- 	},
- 	{
- 		.pa_start	= 0x48302200,
--		.pa_end		= 0x48302200 + SZ_256 - 1,
--		.flags		= ADDR_TYPE_RT
-+		.pa_end		= 0x48302200 + SZ_128 - 1,
- 	},
- 	{ }
- };
-@@ -2611,8 +2669,7 @@ static struct omap_hwmod_addr_space am33xx_ehrpwm2_addr_space[] = {
- 	},
- 	{
- 		.pa_start	= 0x48304200,
--		.pa_end		= 0x48304200 + SZ_256 - 1,
--		.flags		= ADDR_TYPE_RT
-+		.pa_end		= 0x48304200 + SZ_128 - 1,
- 	},
- 	{ }
- };
-@@ -2629,6 +2686,81 @@ static struct omap_hwmod_ocp_if am33xx_l4_ls__ehrpwm2 = {
-  * Splitting the resources to handle access of PWMSS config space
-  * and module specific part independently
-  */
-+static struct omap_hwmod_addr_space am33xx_eqep0_addr_space[] = {
-+	{
-+		.pa_start	= 0x48300000,
-+		.pa_end		= 0x48300000 + SZ_16 - 1,
-+		.flags		= ADDR_TYPE_RT
-+	},
-+	{
-+		.pa_start	= 0x48300180,
-+		.pa_end		= 0x48300180 + SZ_128 - 1,
-+	},
-+	{ }
-+};
-+
-+static struct omap_hwmod_ocp_if am33xx_l4_ls__eqep0 = {
-+	.master		= &am33xx_l4_ls_hwmod,
-+	.slave		= &am33xx_eqep0_hwmod,
-+	.clk		= "l4ls_gclk",
-+	.addr		= am33xx_eqep0_addr_space,
-+	.user		= OCP_USER_MPU,
-+};
-+
-+/*
-+ * Splitting the resources to handle access of PWMSS config space
-+ * and module specific part independently
-+ */
-+static struct omap_hwmod_addr_space am33xx_eqep1_addr_space[] = {
-+	{
-+		.pa_start	= 0x48302000,
-+		.pa_end		= 0x48302000 + SZ_16 - 1,
-+		.flags		= ADDR_TYPE_RT
-+	},
-+	{
-+		.pa_start	= 0x48302180,
-+		.pa_end		= 0x48302180 + SZ_128 - 1,
-+	},
-+	{ }
-+};
-+
-+static struct omap_hwmod_ocp_if am33xx_l4_ls__eqep1 = {
-+	.master		= &am33xx_l4_ls_hwmod,
-+	.slave		= &am33xx_eqep1_hwmod,
-+	.clk		= "l4ls_gclk",
-+	.addr		= am33xx_eqep1_addr_space,
-+	.user		= OCP_USER_MPU,
-+};
-+
-+/*
-+ * Splitting the resources to handle access of PWMSS config space
-+ * and module specific part independently
-+ */
-+static struct omap_hwmod_addr_space am33xx_eqep2_addr_space[] = {
-+	{
-+		.pa_start	= 0x48304000,
-+		.pa_end		= 0x48304000 + SZ_16 - 1,
-+		.flags		= ADDR_TYPE_RT
-+	},
-+	{
-+		.pa_start	= 0x48304180,
-+		.pa_end		= 0x48304180 + SZ_128 - 1,
-+	},
-+	{ }
-+};
-+
-+static struct omap_hwmod_ocp_if am33xx_l4_ls__eqep2 = {
-+	.master		= &am33xx_l4_ls_hwmod,
-+	.slave		= &am33xx_eqep2_hwmod,
-+	.clk		= "l4ls_gclk",
-+	.addr		= am33xx_eqep2_addr_space,
-+	.user		= OCP_USER_MPU,
-+};
-+
-+/*
-+ * Splitting the resources to handle access of PWMSS config space
-+ * and module specific part independently
-+ */
- static struct omap_hwmod_addr_space am33xx_ecap0_addr_space[] = {
- 	{
- 		.pa_start	= 0x48300000,
-@@ -2637,8 +2769,7 @@ static struct omap_hwmod_addr_space am33xx_ecap0_addr_space[] = {
- 	},
- 	{
- 		.pa_start	= 0x48300100,
--		.pa_end		= 0x48300100 + SZ_256 - 1,
--		.flags		= ADDR_TYPE_RT
-+		.pa_end		= 0x48300100 + SZ_128 - 1,
- 	},
- 	{ }
- };
-@@ -2663,8 +2794,7 @@ static struct omap_hwmod_addr_space am33xx_ecap1_addr_space[] = {
- 	},
- 	{
- 		.pa_start	= 0x48302100,
--		.pa_end		= 0x48302100 + SZ_256 - 1,
--		.flags		= ADDR_TYPE_RT
-+		.pa_end		= 0x48302100 + SZ_128 - 1,
- 	},
- 	{ }
- };
-@@ -2689,8 +2819,7 @@ static struct omap_hwmod_addr_space am33xx_ecap2_addr_space[] = {
- 	},
- 	{
- 		.pa_start	= 0x48304100,
--		.pa_end		= 0x48304100 + SZ_256 - 1,
--		.flags		= ADDR_TYPE_RT
-+		.pa_end		= 0x48304100 + SZ_128 - 1,
- 	},
- 	{ }
- };
-@@ -3388,6 +3517,9 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
- 	&am33xx_l4_ls__ehrpwm0,
- 	&am33xx_l4_ls__ehrpwm1,
- 	&am33xx_l4_ls__ehrpwm2,
-+	&am33xx_l4_ls__eqep0,
-+	&am33xx_l4_ls__eqep1,
-+	&am33xx_l4_ls__eqep2,
- 	&am33xx_l4_ls__ecap0,
- 	&am33xx_l4_ls__ecap1,
- 	&am33xx_l4_ls__ecap2,
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0027-ARM-OMAP-AM33xx-hwmod-Add-parent-child-relationship-.patch b/patches/da8xx-fb/0027-ARM-OMAP-AM33xx-hwmod-Add-parent-child-relationship-.patch
deleted file mode 100644
index b7557ab4b0b12a09be4ea0e2a660f8516a41afad..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0027-ARM-OMAP-AM33xx-hwmod-Add-parent-child-relationship-.patch
+++ /dev/null
@@ -1,658 +0,0 @@
-From 5166afd3d27199a012c8cb0b2e64c3d49c9b63f3 Mon Sep 17 00:00:00 2001
-From: "Philip, Avinash" <avinashphilip@ti.com>
-Date: Tue, 16 Oct 2012 14:50:58 +0530
-Subject: [PATCH 27/48] ARM: OMAP: AM33xx hwmod: Add parent-child relationship
- for PWM subsystem
-
-As part of PWM subsystem integration, PWM subsystem are sharing
-resources like clock across submodules (ECAP, EQEP & EHRPWM). To handle
-resource sharing & IP integration  rework on parent child relation
-between PWMSS and ECAP, EQEP & EHRPWM child devices to support runtime PM.
-
-Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
----
- arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 434 ++++++++++++++---------------
- 1 file changed, 203 insertions(+), 231 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
-index 60d4c3e..e54e7a1 100644
---- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
-@@ -783,9 +783,7 @@ static struct omap_hwmod am33xx_elm_hwmod = {
- 	},
- };
- 
--/*
-- * 'epwmss' class: ehrpwm0,1,2 eqep0,1,2 ecap0,1,2
-- */
-+/* pwmss  */
- static struct omap_hwmod_class_sysconfig am33xx_epwmss_sysc = {
- 	.rev_offs	= 0x0,
- 	.sysc_offs	= 0x4,
-@@ -801,67 +799,44 @@ static struct omap_hwmod_class am33xx_epwmss_hwmod_class = {
- 	.sysc		= &am33xx_epwmss_sysc,
- };
- 
--/* ehrpwm0 */
--static struct omap_hwmod_irq_info am33xx_ehrpwm0_irqs[] = {
--	{ .name = "int", .irq = 86 + OMAP_INTC_START, },
--	{ .name = "tzint", .irq = 58 + OMAP_INTC_START, },
--	{ .irq = -1 },
-+static struct omap_hwmod_class am33xx_ecap_hwmod_class = {
-+	.name		= "ecap",
- };
- 
--static struct omap_hwmod am33xx_ehrpwm0_hwmod = {
--	.name		= "ehrpwm0",
--	.class		= &am33xx_epwmss_hwmod_class,
--	.clkdm_name	= "l4ls_clkdm",
--	.mpu_irqs	= am33xx_ehrpwm0_irqs,
--	.main_clk	= "l4ls_gclk",
--	.prcm		= {
--		.omap4	= {
--			.clkctrl_offs	= AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET,
--			.modulemode	= MODULEMODE_SWCTRL,
--		},
--	},
-+static struct omap_hwmod_class am33xx_eqep_hwmod_class = {
-+	.name		= "eqep",
- };
- 
--/* ehrpwm1 */
--static struct omap_hwmod_irq_info am33xx_ehrpwm1_irqs[] = {
--	{ .name = "int", .irq = 87 + OMAP_INTC_START, },
--	{ .name = "tzint", .irq = 59 + OMAP_INTC_START, },
--	{ .irq = -1 },
-+static struct omap_hwmod_class am33xx_ehrpwm_hwmod_class = {
-+	.name		= "ehrpwm",
- };
- 
--static struct omap_hwmod am33xx_ehrpwm1_hwmod = {
--	.name		= "ehrpwm1",
-+/* epwmss0 */
-+static struct omap_hwmod am33xx_epwmss0_hwmod = {
-+	.name		= "epwmss0",
- 	.class		= &am33xx_epwmss_hwmod_class,
- 	.clkdm_name	= "l4ls_clkdm",
--	.mpu_irqs	= am33xx_ehrpwm1_irqs,
- 	.main_clk	= "l4ls_gclk",
- 	.prcm		= {
- 		.omap4	= {
--			.clkctrl_offs	= AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET,
-+			.clkctrl_offs	= AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET,
- 			.modulemode	= MODULEMODE_SWCTRL,
- 		},
- 	},
- };
- 
--/* ehrpwm2 */
--static struct omap_hwmod_irq_info am33xx_ehrpwm2_irqs[] = {
--	{ .name = "int", .irq = 39 + OMAP_INTC_START, },
--	{ .name = "tzint", .irq = 60 + OMAP_INTC_START, },
-+/* ecap0 */
-+static struct omap_hwmod_irq_info am33xx_ecap0_irqs[] = {
-+	{ .irq = 31 + OMAP_INTC_START, },
- 	{ .irq = -1 },
- };
- 
--static struct omap_hwmod am33xx_ehrpwm2_hwmod = {
--	.name		= "ehrpwm2",
--	.class		= &am33xx_epwmss_hwmod_class,
-+static struct omap_hwmod am33xx_ecap0_hwmod = {
-+	.name		= "ecap0",
-+	.class		= &am33xx_ecap_hwmod_class,
- 	.clkdm_name	= "l4ls_clkdm",
--	.mpu_irqs	= am33xx_ehrpwm2_irqs,
-+	.mpu_irqs	= am33xx_ecap0_irqs,
- 	.main_clk	= "l4ls_gclk",
--	.prcm		= {
--		.omap4	= {
--			.clkctrl_offs	= AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET,
--			.modulemode	= MODULEMODE_SWCTRL,
--		},
--	},
- };
- 
- /* eqep0 */
-@@ -872,29 +847,32 @@ static struct omap_hwmod_irq_info am33xx_eqep0_irqs[] = {
- 
- static struct omap_hwmod am33xx_eqep0_hwmod = {
- 	.name		= "eqep0",
--	.class		= &am33xx_epwmss_hwmod_class,
-+	.class		= &am33xx_eqep_hwmod_class,
- 	.clkdm_name	= "l4ls_clkdm",
- 	.mpu_irqs	= am33xx_eqep0_irqs,
- 	.main_clk	= "l4ls_gclk",
--	.prcm		= {
--		.omap4	= {
--			.clkctrl_offs	= AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET,
--			.modulemode	= MODULEMODE_SWCTRL,
--		},
--	},
- };
- 
--/* eqep1 */
--static struct omap_hwmod_irq_info am33xx_eqep1_irqs[] = {
--	{ .irq = 88 + OMAP_INTC_START, },
-+/* ehrpwm0 */
-+static struct omap_hwmod_irq_info am33xx_ehrpwm0_irqs[] = {
-+	{ .name = "int", .irq = 86 + OMAP_INTC_START, },
-+	{ .name = "tzint", .irq = 58 + OMAP_INTC_START, },
- 	{ .irq = -1 },
- };
- 
--static struct omap_hwmod am33xx_eqep1_hwmod = {
--	.name		= "eqep1",
-+static struct omap_hwmod am33xx_ehrpwm0_hwmod = {
-+	.name		= "ehrpwm0",
-+	.class		= &am33xx_ehrpwm_hwmod_class,
-+	.clkdm_name	= "l4ls_clkdm",
-+	.mpu_irqs	= am33xx_ehrpwm0_irqs,
-+	.main_clk	= "l4ls_gclk",
-+};
-+
-+/* epwmss1 */
-+static struct omap_hwmod am33xx_epwmss1_hwmod = {
-+	.name		= "epwmss1",
- 	.class		= &am33xx_epwmss_hwmod_class,
- 	.clkdm_name	= "l4ls_clkdm",
--	.mpu_irqs	= am33xx_eqep1_irqs,
- 	.main_clk	= "l4ls_gclk",
- 	.prcm		= {
- 		.omap4	= {
-@@ -904,61 +882,58 @@ static struct omap_hwmod am33xx_eqep1_hwmod = {
- 	},
- };
- 
--/* eqep2 */
--static struct omap_hwmod_irq_info am33xx_eqep2_irqs[] = {
--	{ .irq = 89 + OMAP_INTC_START, },
-+/* ecap1 */
-+static struct omap_hwmod_irq_info am33xx_ecap1_irqs[] = {
-+	{ .irq = 47 + OMAP_INTC_START, },
- 	{ .irq = -1 },
- };
- 
--static struct omap_hwmod am33xx_eqep2_hwmod = {
--	.name		= "eqep2",
--	.class		= &am33xx_epwmss_hwmod_class,
-+static struct omap_hwmod am33xx_ecap1_hwmod = {
-+	.name		= "ecap1",
-+	.class		= &am33xx_ecap_hwmod_class,
- 	.clkdm_name	= "l4ls_clkdm",
--	.mpu_irqs	= am33xx_eqep2_irqs,
-+	.mpu_irqs	= am33xx_ecap1_irqs,
- 	.main_clk	= "l4ls_gclk",
--	.prcm		= {
--		.omap4	= {
--			.clkctrl_offs	= AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET,
--			.modulemode	= MODULEMODE_SWCTRL,
--		},
--	},
- };
- 
--/* ecap0 */
--static struct omap_hwmod_irq_info am33xx_ecap0_irqs[] = {
--	{ .irq = 31 + OMAP_INTC_START, },
-+/* eqep1 */
-+static struct omap_hwmod_irq_info am33xx_eqep1_irqs[] = {
-+	{ .irq = 88 + OMAP_INTC_START, },
- 	{ .irq = -1 },
- };
- 
--static struct omap_hwmod am33xx_ecap0_hwmod = {
--	.name		= "ecap0",
--	.class		= &am33xx_epwmss_hwmod_class,
-+static struct omap_hwmod am33xx_eqep1_hwmod = {
-+	.name		= "eqep1",
-+	.class		= &am33xx_eqep_hwmod_class,
- 	.clkdm_name	= "l4ls_clkdm",
--	.mpu_irqs	= am33xx_ecap0_irqs,
-+	.mpu_irqs	= am33xx_eqep1_irqs,
- 	.main_clk	= "l4ls_gclk",
--	.prcm		= {
--		.omap4	= {
--			.clkctrl_offs	= AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET,
--			.modulemode	= MODULEMODE_SWCTRL,
--		},
--	},
- };
- 
--/* ecap1 */
--static struct omap_hwmod_irq_info am33xx_ecap1_irqs[] = {
--	{ .irq = 47 + OMAP_INTC_START, },
-+/* ehrpwm1 */
-+static struct omap_hwmod_irq_info am33xx_ehrpwm1_irqs[] = {
-+	{ .name = "int", .irq = 87 + OMAP_INTC_START, },
-+	{ .name = "tzint", .irq = 59 + OMAP_INTC_START, },
- 	{ .irq = -1 },
- };
- 
--static struct omap_hwmod am33xx_ecap1_hwmod = {
--	.name		= "ecap1",
-+static struct omap_hwmod am33xx_ehrpwm1_hwmod = {
-+	.name		= "ehrpwm1",
-+	.class		= &am33xx_ehrpwm_hwmod_class,
-+	.clkdm_name	= "l4ls_clkdm",
-+	.mpu_irqs	= am33xx_ehrpwm1_irqs,
-+	.main_clk	= "l4ls_gclk",
-+};
-+
-+/* epwmss2 */
-+static struct omap_hwmod am33xx_epwmss2_hwmod = {
-+	.name		= "epwmss2",
- 	.class		= &am33xx_epwmss_hwmod_class,
- 	.clkdm_name	= "l4ls_clkdm",
--	.mpu_irqs	= am33xx_ecap1_irqs,
- 	.main_clk	= "l4ls_gclk",
- 	.prcm		= {
- 		.omap4	= {
--			.clkctrl_offs	= AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET,
-+			.clkctrl_offs	= AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET,
- 			.modulemode	= MODULEMODE_SWCTRL,
- 		},
- 	},
-@@ -972,16 +947,39 @@ static struct omap_hwmod_irq_info am33xx_ecap2_irqs[] = {
- 
- static struct omap_hwmod am33xx_ecap2_hwmod = {
- 	.name		= "ecap2",
-+	.class		= &am33xx_ecap_hwmod_class,
-+	.clkdm_name	= "l4ls_clkdm",
- 	.mpu_irqs	= am33xx_ecap2_irqs,
--	.class		= &am33xx_epwmss_hwmod_class,
-+	.main_clk	= "l4ls_gclk",
-+};
-+
-+/* eqep2 */
-+static struct omap_hwmod_irq_info am33xx_eqep2_irqs[] = {
-+	{ .irq = 89 + OMAP_INTC_START, },
-+	{ .irq = -1 },
-+};
-+
-+static struct omap_hwmod am33xx_eqep2_hwmod = {
-+	.name		= "eqep2",
-+	.class		= &am33xx_eqep_hwmod_class,
- 	.clkdm_name	= "l4ls_clkdm",
-+	.mpu_irqs	= am33xx_eqep2_irqs,
-+	.main_clk	= "l4ls_gclk",
-+};
-+
-+/* ehrpwm2 */
-+static struct omap_hwmod_irq_info am33xx_ehrpwm2_irqs[] = {
-+	{ .name = "int", .irq = 39 + OMAP_INTC_START, },
-+	{ .name = "tzint", .irq = 60 + OMAP_INTC_START, },
-+	{ .irq = -1 },
-+};
-+
-+static struct omap_hwmod am33xx_ehrpwm2_hwmod = {
-+	.name		= "ehrpwm2",
-+	.class		= &am33xx_ehrpwm_hwmod_class,
-+	.clkdm_name	= "l4ls_clkdm",
-+	.mpu_irqs	= am33xx_ehrpwm2_irqs,
- 	.main_clk	= "l4ls_gclk",
--	.prcm		= {
--		.omap4	= {
--			.clkctrl_offs	= AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET,
--			.modulemode	= MODULEMODE_SWCTRL,
--		},
--	},
- };
- 
- /*
-@@ -2607,116 +2605,106 @@ static struct omap_hwmod_ocp_if am33xx_l4_ls__elm = {
- 	.user		= OCP_USER_MPU,
- };
- 
--/*
-- * Splitting the resources to handle access of PWMSS config space
-- * and module specific part independently
-- */
--static struct omap_hwmod_addr_space am33xx_ehrpwm0_addr_space[] = {
-+static struct omap_hwmod_addr_space am33xx_epwmss0_addr_space[] = {
- 	{
- 		.pa_start	= 0x48300000,
- 		.pa_end		= 0x48300000 + SZ_16 - 1,
- 		.flags		= ADDR_TYPE_RT
- 	},
--	{
--		.pa_start	= 0x48300200,
--		.pa_end		= 0x48300200 + SZ_128 - 1,
--	},
- 	{ }
- };
- 
--static struct omap_hwmod_ocp_if am33xx_l4_ls__ehrpwm0 = {
-+static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss0 = {
- 	.master		= &am33xx_l4_ls_hwmod,
--	.slave		= &am33xx_ehrpwm0_hwmod,
-+	.slave		= &am33xx_epwmss0_hwmod,
- 	.clk		= "l4ls_gclk",
--	.addr		= am33xx_ehrpwm0_addr_space,
-+	.addr		= am33xx_epwmss0_addr_space,
- 	.user		= OCP_USER_MPU,
- };
- 
--/*
-- * Splitting the resources to handle access of PWMSS config space
-- * and module specific part independently
-- */
--static struct omap_hwmod_addr_space am33xx_ehrpwm1_addr_space[] = {
--	{
--		.pa_start	= 0x48302000,
--		.pa_end		= 0x48302000 + SZ_16 - 1,
--		.flags		= ADDR_TYPE_RT
--	},
-+static struct omap_hwmod_addr_space am33xx_ecap0_addr_space[] = {
- 	{
--		.pa_start	= 0x48302200,
--		.pa_end		= 0x48302200 + SZ_128 - 1,
-+		.pa_start	= 0x48300100,
-+		.pa_end		= 0x48300100 + SZ_128 - 1,
- 	},
- 	{ }
- };
- 
--static struct omap_hwmod_ocp_if am33xx_l4_ls__ehrpwm1 = {
--	.master		= &am33xx_l4_ls_hwmod,
--	.slave		= &am33xx_ehrpwm1_hwmod,
-+static struct omap_hwmod_ocp_if am33xx_epwmss0__ecap0 = {
-+	.master		= &am33xx_epwmss0_hwmod,
-+	.slave		= &am33xx_ecap0_hwmod,
- 	.clk		= "l4ls_gclk",
--	.addr		= am33xx_ehrpwm1_addr_space,
-+	.addr		= am33xx_ecap0_addr_space,
- 	.user		= OCP_USER_MPU,
- };
- 
--/*
-- * Splitting the resources to handle access of PWMSS config space
-- * and module specific part independently
-- */
--static struct omap_hwmod_addr_space am33xx_ehrpwm2_addr_space[] = {
-+static struct omap_hwmod_addr_space am33xx_eqep0_addr_space[] = {
- 	{
--		.pa_start	= 0x48304000,
--		.pa_end		= 0x48304000 + SZ_16 - 1,
--		.flags		= ADDR_TYPE_RT
-+		.pa_start	= 0x48300180,
-+		.pa_end		= 0x48300180 + SZ_128 - 1,
- 	},
-+	{ }
-+};
-+
-+static struct omap_hwmod_ocp_if am33xx_epwmss0__eqep0 = {
-+	.master		= &am33xx_epwmss0_hwmod,
-+	.slave		= &am33xx_eqep0_hwmod,
-+	.clk		= "l4ls_gclk",
-+	.addr		= am33xx_eqep0_addr_space,
-+	.user		= OCP_USER_MPU,
-+};
-+
-+static struct omap_hwmod_addr_space am33xx_ehrpwm0_addr_space[] = {
- 	{
--		.pa_start	= 0x48304200,
--		.pa_end		= 0x48304200 + SZ_128 - 1,
-+		.pa_start	= 0x48300200,
-+		.pa_end		= 0x48300200 + SZ_128 - 1,
- 	},
- 	{ }
- };
- 
--static struct omap_hwmod_ocp_if am33xx_l4_ls__ehrpwm2 = {
--	.master		= &am33xx_l4_ls_hwmod,
--	.slave		= &am33xx_ehrpwm2_hwmod,
-+static struct omap_hwmod_ocp_if am33xx_epwmss0__ehrpwm0 = {
-+	.master		= &am33xx_epwmss0_hwmod,
-+	.slave		= &am33xx_ehrpwm0_hwmod,
- 	.clk		= "l4ls_gclk",
--	.addr		= am33xx_ehrpwm2_addr_space,
-+	.addr		= am33xx_ehrpwm0_addr_space,
- 	.user		= OCP_USER_MPU,
- };
- 
--/*
-- * Splitting the resources to handle access of PWMSS config space
-- * and module specific part independently
-- */
--static struct omap_hwmod_addr_space am33xx_eqep0_addr_space[] = {
-+
-+static struct omap_hwmod_addr_space am33xx_epwmss1_addr_space[] = {
- 	{
--		.pa_start	= 0x48300000,
--		.pa_end		= 0x48300000 + SZ_16 - 1,
-+		.pa_start	= 0x48302000,
-+		.pa_end		= 0x48302000 + SZ_16 - 1,
- 		.flags		= ADDR_TYPE_RT
- 	},
--	{
--		.pa_start	= 0x48300180,
--		.pa_end		= 0x48300180 + SZ_128 - 1,
--	},
- 	{ }
- };
- 
--static struct omap_hwmod_ocp_if am33xx_l4_ls__eqep0 = {
-+static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss1 = {
- 	.master		= &am33xx_l4_ls_hwmod,
--	.slave		= &am33xx_eqep0_hwmod,
-+	.slave		= &am33xx_epwmss1_hwmod,
- 	.clk		= "l4ls_gclk",
--	.addr		= am33xx_eqep0_addr_space,
-+	.addr		= am33xx_epwmss1_addr_space,
- 	.user		= OCP_USER_MPU,
- };
- 
--/*
-- * Splitting the resources to handle access of PWMSS config space
-- * and module specific part independently
-- */
--static struct omap_hwmod_addr_space am33xx_eqep1_addr_space[] = {
-+static struct omap_hwmod_addr_space am33xx_ecap1_addr_space[] = {
- 	{
--		.pa_start	= 0x48302000,
--		.pa_end		= 0x48302000 + SZ_16 - 1,
--		.flags		= ADDR_TYPE_RT
-+		.pa_start	= 0x48302100,
-+		.pa_end		= 0x48302100 + SZ_128 - 1,
- 	},
-+	{ }
-+};
-+
-+static struct omap_hwmod_ocp_if am33xx_epwmss1__ecap1 = {
-+	.master		= &am33xx_epwmss1_hwmod,
-+	.slave		= &am33xx_ecap1_hwmod,
-+	.clk		= "l4ls_gclk",
-+	.addr		= am33xx_ecap1_addr_space,
-+	.user		= OCP_USER_MPU,
-+};
-+
-+static struct omap_hwmod_addr_space am33xx_eqep1_addr_space[] = {
- 	{
- 		.pa_start	= 0x48302180,
- 		.pa_end		= 0x48302180 + SZ_128 - 1,
-@@ -2724,111 +2712,92 @@ static struct omap_hwmod_addr_space am33xx_eqep1_addr_space[] = {
- 	{ }
- };
- 
--static struct omap_hwmod_ocp_if am33xx_l4_ls__eqep1 = {
--	.master		= &am33xx_l4_ls_hwmod,
-+static struct omap_hwmod_ocp_if am33xx_epwmss1__eqep1 = {
-+	.master		= &am33xx_epwmss1_hwmod,
- 	.slave		= &am33xx_eqep1_hwmod,
- 	.clk		= "l4ls_gclk",
- 	.addr		= am33xx_eqep1_addr_space,
- 	.user		= OCP_USER_MPU,
- };
- 
--/*
-- * Splitting the resources to handle access of PWMSS config space
-- * and module specific part independently
-- */
--static struct omap_hwmod_addr_space am33xx_eqep2_addr_space[] = {
--	{
--		.pa_start	= 0x48304000,
--		.pa_end		= 0x48304000 + SZ_16 - 1,
--		.flags		= ADDR_TYPE_RT
--	},
-+static struct omap_hwmod_addr_space am33xx_ehrpwm1_addr_space[] = {
- 	{
--		.pa_start	= 0x48304180,
--		.pa_end		= 0x48304180 + SZ_128 - 1,
-+		.pa_start	= 0x48302200,
-+		.pa_end		= 0x48302200 + SZ_128 - 1,
- 	},
- 	{ }
- };
- 
--static struct omap_hwmod_ocp_if am33xx_l4_ls__eqep2 = {
--	.master		= &am33xx_l4_ls_hwmod,
--	.slave		= &am33xx_eqep2_hwmod,
-+static struct omap_hwmod_ocp_if am33xx_epwmss1__ehrpwm1 = {
-+	.master		= &am33xx_epwmss1_hwmod,
-+	.slave		= &am33xx_ehrpwm1_hwmod,
- 	.clk		= "l4ls_gclk",
--	.addr		= am33xx_eqep2_addr_space,
-+	.addr		= am33xx_ehrpwm1_addr_space,
- 	.user		= OCP_USER_MPU,
- };
- 
--/*
-- * Splitting the resources to handle access of PWMSS config space
-- * and module specific part independently
-- */
--static struct omap_hwmod_addr_space am33xx_ecap0_addr_space[] = {
-+static struct omap_hwmod_addr_space am33xx_epwmss2_addr_space[] = {
- 	{
--		.pa_start	= 0x48300000,
--		.pa_end		= 0x48300000 + SZ_16 - 1,
-+		.pa_start	= 0x48304000,
-+		.pa_end		= 0x48304000 + SZ_16 - 1,
- 		.flags		= ADDR_TYPE_RT
- 	},
--	{
--		.pa_start	= 0x48300100,
--		.pa_end		= 0x48300100 + SZ_128 - 1,
--	},
- 	{ }
- };
- 
--static struct omap_hwmod_ocp_if am33xx_l4_ls__ecap0 = {
-+static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss2 = {
- 	.master		= &am33xx_l4_ls_hwmod,
--	.slave		= &am33xx_ecap0_hwmod,
-+	.slave		= &am33xx_epwmss2_hwmod,
- 	.clk		= "l4ls_gclk",
--	.addr		= am33xx_ecap0_addr_space,
-+	.addr		= am33xx_epwmss2_addr_space,
- 	.user		= OCP_USER_MPU,
- };
- 
--/*
-- * Splitting the resources to handle access of PWMSS config space
-- * and module specific part independently
-- */
--static struct omap_hwmod_addr_space am33xx_ecap1_addr_space[] = {
--	{
--		.pa_start	= 0x48302000,
--		.pa_end		= 0x48302000 + SZ_16 - 1,
--		.flags		= ADDR_TYPE_RT
--	},
-+static struct omap_hwmod_addr_space am33xx_ecap2_addr_space[] = {
- 	{
--		.pa_start	= 0x48302100,
--		.pa_end		= 0x48302100 + SZ_128 - 1,
-+		.pa_start	= 0x48304100,
-+		.pa_end		= 0x48304100 + SZ_128 - 1,
- 	},
- 	{ }
- };
- 
--static struct omap_hwmod_ocp_if am33xx_l4_ls__ecap1 = {
--	.master		= &am33xx_l4_ls_hwmod,
--	.slave		= &am33xx_ecap1_hwmod,
-+static struct omap_hwmod_ocp_if am33xx_epwmss2__ecap2 = {
-+	.master		= &am33xx_epwmss2_hwmod,
-+	.slave		= &am33xx_ecap2_hwmod,
- 	.clk		= "l4ls_gclk",
--	.addr		= am33xx_ecap1_addr_space,
-+	.addr		= am33xx_ecap2_addr_space,
- 	.user		= OCP_USER_MPU,
- };
- 
--/*
-- * Splitting the resources to handle access of PWMSS config space
-- * and module specific part independently
-- */
--static struct omap_hwmod_addr_space am33xx_ecap2_addr_space[] = {
-+static struct omap_hwmod_addr_space am33xx_eqep2_addr_space[] = {
- 	{
--		.pa_start	= 0x48304000,
--		.pa_end		= 0x48304000 + SZ_16 - 1,
--		.flags		= ADDR_TYPE_RT
-+		.pa_start	= 0x48304180,
-+		.pa_end		= 0x48304180 + SZ_128 - 1,
- 	},
-+	{ }
-+};
-+
-+static struct omap_hwmod_ocp_if am33xx_epwmss2__eqep2 = {
-+	.master		= &am33xx_epwmss2_hwmod,
-+	.slave		= &am33xx_eqep2_hwmod,
-+	.clk		= "l4ls_gclk",
-+	.addr		= am33xx_eqep2_addr_space,
-+	.user		= OCP_USER_MPU,
-+};
-+
-+static struct omap_hwmod_addr_space am33xx_ehrpwm2_addr_space[] = {
- 	{
--		.pa_start	= 0x48304100,
--		.pa_end		= 0x48304100 + SZ_128 - 1,
-+		.pa_start	= 0x48304200,
-+		.pa_end		= 0x48304200 + SZ_128 - 1,
- 	},
- 	{ }
- };
- 
--static struct omap_hwmod_ocp_if am33xx_l4_ls__ecap2 = {
--	.master		= &am33xx_l4_ls_hwmod,
--	.slave		= &am33xx_ecap2_hwmod,
-+static struct omap_hwmod_ocp_if am33xx_epwmss2__ehrpwm2 = {
-+	.master		= &am33xx_epwmss2_hwmod,
-+	.slave		= &am33xx_ehrpwm2_hwmod,
- 	.clk		= "l4ls_gclk",
--	.addr		= am33xx_ecap2_addr_space,
-+	.addr		= am33xx_ehrpwm2_addr_space,
- 	.user		= OCP_USER_MPU,
- };
- 
-@@ -3514,15 +3483,18 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
- 	&am33xx_l4_ls__uart6,
- 	&am33xx_l4_ls__spinlock,
- 	&am33xx_l4_ls__elm,
--	&am33xx_l4_ls__ehrpwm0,
--	&am33xx_l4_ls__ehrpwm1,
--	&am33xx_l4_ls__ehrpwm2,
--	&am33xx_l4_ls__eqep0,
--	&am33xx_l4_ls__eqep1,
--	&am33xx_l4_ls__eqep2,
--	&am33xx_l4_ls__ecap0,
--	&am33xx_l4_ls__ecap1,
--	&am33xx_l4_ls__ecap2,
-+	&am33xx_l4_ls__epwmss0,
-+	&am33xx_epwmss0__ecap0,
-+	&am33xx_epwmss0__eqep0,
-+	&am33xx_epwmss0__ehrpwm0,
-+	&am33xx_l4_ls__epwmss1,
-+	&am33xx_epwmss1__ecap1,
-+	&am33xx_epwmss1__eqep1,
-+	&am33xx_epwmss1__ehrpwm1,
-+	&am33xx_l4_ls__epwmss2,
-+	&am33xx_epwmss2__ecap2,
-+	&am33xx_epwmss2__eqep2,
-+	&am33xx_epwmss2__ehrpwm2,
- 	&am33xx_l3_s__gpmc,
- 	&am33xx_l3_main__lcdc,
- 	&am33xx_l4_ls__mcspi0,
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0028-ARM-dts-AM33XX-Add-PWMSS-device-tree-nodes.patch b/patches/da8xx-fb/0028-ARM-dts-AM33XX-Add-PWMSS-device-tree-nodes.patch
deleted file mode 100644
index c83348976fbcba2676994bcb2a92010f5250dbcc..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0028-ARM-dts-AM33XX-Add-PWMSS-device-tree-nodes.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From 97ea97b4216819fd85ff79f5574329eccba3b716 Mon Sep 17 00:00:00 2001
-From: "Philip, Avinash" <avinashphilip@ti.com>
-Date: Wed, 11 Jul 2012 11:01:33 +0530
-Subject: [PATCH 28/48] ARM: dts: AM33XX: Add PWMSS device tree nodes
-
-Add PWMSS device tree nodes in relation with ECAP & EHRPWM DT nodes to
-AM33XX SoC family. Also populates device tree nodes for ECAP & EHRPWM by
-adding necessary properties like pwm-cells, base reg & set disabled as
-status.
-
-Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
-Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
-
-Conflicts:
-
-	arch/arm/boot/dts/am33xx.dtsi
----
- arch/arm/boot/dts/am33xx.dtsi | 84 +++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 84 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index 7a9c357..e832be8 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -463,5 +463,89 @@
- 			status = "disabled";
- 			ti,hwmods = "lcdc";
- 		};
-+
-+		epwmss0: epwmss@48300000 {
-+			compatible = "ti,am33xx-pwmss";
-+			reg = <0x48300000 0x10>;
-+			ti,hwmods = "epwmss0";
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+			status = "disabled";
-+			ranges = <0x48300100 0x48300100 0x80   /* ECAP */
-+				  0x48300180 0x48300180 0x80   /* EQEP */
-+				  0x48300200 0x48300200 0x80>; /* EHRPWM */
-+
-+			ecap0: ecap@48300100 {
-+				compatible = "ti,am33xx-ecap";
-+				#pwm-cells = <3>;
-+				reg = <0x48300100 0x80>;
-+				ti,hwmods = "ecap0";
-+				status = "disabled";
-+			};
-+
-+			ehrpwm0: ehrpwm@48300200 {
-+				compatible = "ti,am33xx-ehrpwm";
-+				#pwm-cells = <3>;
-+				reg = <0x48300200 0x80>;
-+				ti,hwmods = "ehrpwm0";
-+				status = "disabled";
-+			};
-+		};
-+
-+		epwmss1: epwmss@48302000 {
-+			compatible = "ti,am33xx-pwmss";
-+			reg = <0x48302000 0x10>;
-+			ti,hwmods = "epwmss1";
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+			status = "disabled";
-+			ranges = <0x48302100 0x48302100 0x80   /* ECAP */
-+				  0x48302180 0x48302180 0x80   /* EQEP */
-+				  0x48302200 0x48302200 0x80>; /* EHRPWM */
-+
-+			ecap1: ecap@48302100 {
-+				compatible = "ti,am33xx-ecap";
-+				#pwm-cells = <3>;
-+				reg = <0x48302100 0x80>;
-+				ti,hwmods = "ecap1";
-+				status = "disabled";
-+			};
-+
-+			ehrpwm1: ehrpwm@48302200 {
-+				compatible = "ti,am33xx-ehrpwm";
-+				#pwm-cells = <3>;
-+				reg = <0x48302200 0x80>;
-+				ti,hwmods = "ehrpwm1";
-+				status = "disabled";
-+			};
-+		};
-+
-+		epwmss2: epwmss@48304000 {
-+			compatible = "ti,am33xx-pwmss";
-+			reg = <0x48304000 0x10>;
-+			ti,hwmods = "epwmss2";
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+			status = "disabled";
-+			ranges = <0x48304100 0x48304100 0x80   /* ECAP */
-+				  0x48304180 0x48304180 0x80   /* EQEP */
-+				  0x48304200 0x48304200 0x80>; /* EHRPWM */
-+
-+			ecap2: ecap@48304100 {
-+				compatible = "ti,am33xx-ecap";
-+				#pwm-cells = <3>;
-+				reg = <0x48304100 0x80>;
-+				ti,hwmods = "ecap2";
-+				status = "disabled";
-+			};
-+
-+			ehrpwm2: ehrpwm@48304200 {
-+				compatible = "ti,am33xx-ehrpwm";
-+				#pwm-cells = <3>;
-+				reg = <0x48304200 0x80>;
-+				ti,hwmods = "ehrpwm2";
-+				status = "disabled";
-+			};
-+		};
- 	};
- };
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0029-ARM-dts-AM33XX-Add-PWM-backlight-DT-data-to-am335x-e.patch b/patches/da8xx-fb/0029-ARM-dts-AM33XX-Add-PWM-backlight-DT-data-to-am335x-e.patch
deleted file mode 100644
index 3c137c00d08be35d2bff72093cf260a5e00b9036..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0029-ARM-dts-AM33XX-Add-PWM-backlight-DT-data-to-am335x-e.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 8d385a521c541d7e1cb8c0f668f33c22a818ba96 Mon Sep 17 00:00:00 2001
-From: "Philip, Avinash" <avinashphilip@ti.com>
-Date: Mon, 16 Jul 2012 14:57:33 +0530
-Subject: [PATCH 29/48] ARM: dts: AM33XX: Add PWM backlight DT data to
- am335x-evm
-
-PWM output from ecap0 uses as backlight source. Also adds low threshold
-value to have a uniform divisions in brightness-levels scales.
-
-Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
-Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
-
-Conflicts:
-
-	arch/arm/boot/dts/am335x-evm.dts
----
- arch/arm/boot/dts/am335x-evm.dts | 23 +++++++++++++++++++++++
- 1 file changed, 23 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
-index af69e81..1f6b157 100644
---- a/arch/arm/boot/dts/am335x-evm.dts
-+++ b/arch/arm/boot/dts/am335x-evm.dts
-@@ -86,6 +86,12 @@
- 				0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OUTPUT | MODE0 */
- 			>;
- 		};
-+
-+		ecap0_pins: backlight_pins {
-+			pinctrl-single,pins = <
-+				0x164 0x0	/* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
-+			>;
-+		};
- 	};
- 
- 	ocp {
-@@ -144,6 +150,16 @@
- 				reg = <0x48>;
- 			};
- 		};
-+
-+		epwmss0: epwmss@48300000 {
-+			status = "okay";
-+
-+			ecap0: ecap@48300100 {
-+				status = "okay";
-+				pinctrl-names = "default";
-+				pinctrl-0 = <&ecap0_pins>;
-+			};
-+		};
- 	};
- 
- 	vbat: fixedregulator@0 {
-@@ -200,6 +216,13 @@
- 			gpio-key,wakeup;
- 		};
- 	};
-+
-+	backlight {
-+		compatible = "pwm-backlight";
-+		pwms = <&ecap0 0 50000 0>;
-+		brightness-levels = <0 51 53 56 62 75 101 152 255>;
-+		default-brightness-level = <8>;
-+	};
- };
- 
- /include/ "tps65910.dtsi"
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0030-ARM-dts-AM33XX-Add-PWM-backlight-DT-data-to-am335x-e.patch b/patches/da8xx-fb/0030-ARM-dts-AM33XX-Add-PWM-backlight-DT-data-to-am335x-e.patch
deleted file mode 100644
index 4331e388546f1b0f4ceaf18e11e104d75e04c2fc..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0030-ARM-dts-AM33XX-Add-PWM-backlight-DT-data-to-am335x-e.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 77315bb6944a5cfa3f516bb8813942ae2ed8a2d5 Mon Sep 17 00:00:00 2001
-From: "Philip, Avinash" <avinashphilip@ti.com>
-Date: Mon, 16 Jul 2012 14:57:33 +0530
-Subject: [PATCH 30/48] ARM: dts: AM33XX: Add PWM backlight DT data to
- am335x-evmsk
-
-PWM output from ecap2 uses as backlight source. Also adds low threshold
-value to have a uniform divisions in brightness-levels scales with
-inverse polarity.
-
-Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
-Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
-
-Conflicts:
-
-	arch/arm/boot/dts/am335x-evmsk.dts
----
- arch/arm/boot/dts/am335x-evmsk.dts | 23 +++++++++++++++++++++++
- 1 file changed, 23 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
-index f684704..7a87803 100644
---- a/arch/arm/boot/dts/am335x-evmsk.dts
-+++ b/arch/arm/boot/dts/am335x-evmsk.dts
-@@ -84,6 +84,12 @@
- 				0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OUTPUT | MODE0 */
- 			>;
- 		};
-+
-+		ecap2_pins: backlight_pins {
-+			pinctrl-single,pins = <
-+				0x19c 0x4	/* mcasp0_ahclkr.ecap2_in_pwm2_out MODE4 */
-+			>;
-+		};
- 	};
- 
- 	ocp {
-@@ -127,6 +133,16 @@
- 				st,max-limit-z = <750>;
- 			};
- 		};
-+
-+		epwmss2: epwmss@48304000 {
-+			status = "okay";
-+
-+			ecap2: ecap@48304100 {
-+				status = "okay";
-+				pinctrl-names = "default";
-+				pinctrl-0 = <&ecap2_pins>;
-+			};
-+		};
- 	};
- 
- 	vbat: fixedregulator@0 {
-@@ -203,6 +219,13 @@
- 			gpios = <&gpio3 5 0>;
- 		};
- 	};
-+
-+	backlight {
-+		compatible = "pwm-backlight";
-+		pwms = <&ecap2 0 50000 1>;
-+		brightness-levels = <0 58 61 66 75 90 125 170 255>;
-+		default-brightness-level = <8>;
-+	};
- };
- 
- /include/ "tps65910.dtsi"
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0031-clk-divider-prepare-for-minimum-divider.patch b/patches/da8xx-fb/0031-clk-divider-prepare-for-minimum-divider.patch
deleted file mode 100644
index 6c6048ab5ece12f56c254198cac99c7bacd1f6cf..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0031-clk-divider-prepare-for-minimum-divider.patch
+++ /dev/null
@@ -1,169 +0,0 @@
-From a36d232f7d8a2272cd46e8e67f24f1166736c286 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Thu, 17 Jan 2013 17:11:53 +0530
-Subject: [PATCH 31/48] clk: divider: prepare for minimum divider
-
-Some of clocks can have a limit on minimum divider value that can be
-programmed, prepare for such a support.
-
-Add a new field min_div for the basic divider clock and a new dynamic
-clock divider registration function where minimum divider value can
-be specified. Keep behaviour of existing divider clock registration
-functions, static initialization helpers as was earlier.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/clk/clk-divider.c    | 37 ++++++++++++++++++++++++++++++++++---
- include/linux/clk-private.h  |  6 +++++-
- include/linux/clk-provider.h |  7 +++++++
- 3 files changed, 46 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
-index a9204c6..4025c5a 100644
---- a/drivers/clk/clk-divider.c
-+++ b/drivers/clk/clk-divider.c
-@@ -236,7 +236,7 @@ EXPORT_SYMBOL_GPL(clk_divider_ops);
- 
- static struct clk *_register_divider(struct device *dev, const char *name,
- 		const char *parent_name, unsigned long flags,
--		void __iomem *reg, u8 shift, u8 width,
-+		void __iomem *reg, u8 shift, u8 width, u8 min_div,
- 		u8 clk_divider_flags, const struct clk_div_table *table,
- 		spinlock_t *lock)
- {
-@@ -244,6 +244,11 @@ static struct clk *_register_divider(struct device *dev, const char *name,
- 	struct clk *clk;
- 	struct clk_init_data init;
- 
-+	if (!min_div) {
-+		pr_err("%s: minimum divider cannot be zero\n", __func__);
-+		return ERR_PTR(-EINVAL);
-+	}
-+
- 	/* allocate the divider */
- 	div = kzalloc(sizeof(struct clk_divider), GFP_KERNEL);
- 	if (!div) {
-@@ -261,6 +266,7 @@ static struct clk *_register_divider(struct device *dev, const char *name,
- 	div->reg = reg;
- 	div->shift = shift;
- 	div->width = width;
-+	div->min_div = min_div;
- 	div->flags = clk_divider_flags;
- 	div->lock = lock;
- 	div->hw.init = &init;
-@@ -276,6 +282,29 @@ static struct clk *_register_divider(struct device *dev, const char *name,
- }
- 
- /**
-+ * clk_register_min_divider - register a divider clock having minimum divider
-+ * constraints with clock framework
-+ * @dev: device registering this clock
-+ * @name: name of this clock
-+ * @parent_name: name of clock's parent
-+ * @flags: framework-specific flags
-+ * @reg: register address to adjust divider
-+ * @shift: number of bits to shift the bitfield
-+ * @width: width of the bitfield
-+ * @min_div: minimum allowable divider
-+ * @clk_divider_flags: divider-specific flags for this clock
-+ * @lock: shared register lock for this clock
-+ */
-+struct clk *clk_register_min_divider(struct device *dev, const char *name,
-+		const char *parent_name, unsigned long flags,
-+		void __iomem *reg, u8 shift, u8 width, u8 min_div,
-+		u8 clk_divider_flags, spinlock_t *lock)
-+{
-+	return _register_divider(dev, name, parent_name, flags, reg, shift,
-+			width, min_div, clk_divider_flags, NULL, lock);
-+}
-+
-+/**
-  * clk_register_divider - register a divider clock with the clock framework
-  * @dev: device registering this clock
-  * @name: name of this clock
-@@ -293,7 +322,8 @@ struct clk *clk_register_divider(struct device *dev, const char *name,
- 		u8 clk_divider_flags, spinlock_t *lock)
- {
- 	return _register_divider(dev, name, parent_name, flags, reg, shift,
--			width, clk_divider_flags, NULL, lock);
-+			width, CLK_DIVIDER_MIN_DIV_DEFAULT, clk_divider_flags,
-+			NULL, lock);
- }
- 
- /**
-@@ -317,5 +347,6 @@ struct clk *clk_register_divider_table(struct device *dev, const char *name,
- 		spinlock_t *lock)
- {
- 	return _register_divider(dev, name, parent_name, flags, reg, shift,
--			width, clk_divider_flags, table, lock);
-+			width, CLK_DIVIDER_MIN_DIV_DEFAULT, clk_divider_flags,
-+			table, lock);
- }
-diff --git a/include/linux/clk-private.h b/include/linux/clk-private.h
-index 9c7f580..942a1be 100644
---- a/include/linux/clk-private.h
-+++ b/include/linux/clk-private.h
-@@ -105,7 +105,8 @@ struct clk {
- 
- #define _DEFINE_CLK_DIVIDER(_name, _parent_name, _parent_ptr,	\
- 				_flags, _reg, _shift, _width,	\
--				_divider_flags, _table, _lock)	\
-+				_min_div, _divider_flags,	\
-+				_table, _lock)			\
- 	static struct clk _name;				\
- 	static const char *_name##_parent_names[] = {		\
- 		_parent_name,					\
-@@ -120,6 +121,7 @@ struct clk {
- 		.reg = _reg,					\
- 		.shift = _shift,				\
- 		.width = _width,				\
-+		.min_div = _min_div,				\
- 		.flags = _divider_flags,			\
- 		.table = _table,				\
- 		.lock = _lock,					\
-@@ -132,6 +134,7 @@ struct clk {
- 				_divider_flags, _lock)		\
- 	_DEFINE_CLK_DIVIDER(_name, _parent_name, _parent_ptr,	\
- 				_flags, _reg, _shift, _width,	\
-+				CLK_DIVIDER_MIN_DIV_DEFAULT,	\
- 				_divider_flags, NULL, _lock)
- 
- #define DEFINE_CLK_DIVIDER_TABLE(_name, _parent_name,		\
-@@ -140,6 +143,7 @@ struct clk {
- 				_table, _lock)			\
- 	_DEFINE_CLK_DIVIDER(_name, _parent_name, _parent_ptr,	\
- 				_flags, _reg, _shift, _width,	\
-+				CLK_DIVIDER_MIN_DIV_DEFAULT,	\
- 				_divider_flags, _table, _lock)	\
- 
- #define DEFINE_CLK_MUX(_name, _parent_names, _parents, _flags,	\
-diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
-index 4989b8a..1c09481 100644
---- a/include/linux/clk-provider.h
-+++ b/include/linux/clk-provider.h
-@@ -248,15 +248,22 @@ struct clk_divider {
- 	void __iomem	*reg;
- 	u8		shift;
- 	u8		width;
-+	u8		min_div;
- 	u8		flags;
- 	const struct clk_div_table	*table;
- 	spinlock_t	*lock;
- };
- 
-+#define	CLK_DIVIDER_MIN_DIV_DEFAULT	1
-+
- #define CLK_DIVIDER_ONE_BASED		BIT(0)
- #define CLK_DIVIDER_POWER_OF_TWO	BIT(1)
- 
- extern const struct clk_ops clk_divider_ops;
-+struct clk *clk_register_min_divider(struct device *dev, const char *name,
-+		const char *parent_name, unsigned long flags,
-+		void __iomem *reg, u8 shift, u8 width, u8 min_div,
-+		u8 clk_divider_flags, spinlock_t *lock);
- struct clk *clk_register_divider(struct device *dev, const char *name,
- 		const char *parent_name, unsigned long flags,
- 		void __iomem *reg, u8 shift, u8 width,
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0032-clk-divider-handle-minimum-divider.patch b/patches/da8xx-fb/0032-clk-divider-handle-minimum-divider.patch
deleted file mode 100644
index 11b267af5110daad8efdc1753c22d6f54a135735..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0032-clk-divider-handle-minimum-divider.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 529799fb2fd2e9b880350dd8d0633265bfcd8b4b Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Tue, 22 Jan 2013 20:33:56 +0530
-Subject: [PATCH 32/48] clk: divider: handle minimum divider
-
-Some of clocks can have a limit on minimum divider value that can be
-programmed. Modify basic clock divider to take care of this aspect.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/clk/clk-divider.c | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
-index 4025c5a..ee648dc 100644
---- a/drivers/clk/clk-divider.c
-+++ b/drivers/clk/clk-divider.c
-@@ -32,6 +32,11 @@
- #define div_mask(d)	((1 << (d->width)) - 1)
- #define is_power_of_two(i)	!(i & ~i)
- 
-+static unsigned int _get_mindiv(struct clk_divider *divider)
-+{
-+	return divider->min_div;
-+}
-+
- static unsigned int _get_table_maxdiv(const struct clk_div_table *table)
- {
- 	unsigned int maxdiv = 0;
-@@ -148,17 +153,18 @@ static int clk_divider_bestdiv(struct clk_hw *hw, unsigned long rate,
- {
- 	struct clk_divider *divider = to_clk_divider(hw);
- 	int i, bestdiv = 0;
--	unsigned long parent_rate, best = 0, now, maxdiv;
-+	unsigned long parent_rate, best = 0, now, maxdiv, mindiv;
- 
- 	if (!rate)
- 		rate = 1;
- 
- 	maxdiv = _get_maxdiv(divider);
-+	mindiv = _get_mindiv(divider);
- 
- 	if (!(__clk_get_flags(hw->clk) & CLK_SET_RATE_PARENT)) {
- 		parent_rate = *best_parent_rate;
- 		bestdiv = DIV_ROUND_UP(parent_rate, rate);
--		bestdiv = bestdiv == 0 ? 1 : bestdiv;
-+		bestdiv = bestdiv == 0 ? mindiv : bestdiv;
- 		bestdiv = bestdiv > maxdiv ? maxdiv : bestdiv;
- 		return bestdiv;
- 	}
-@@ -169,7 +175,7 @@ static int clk_divider_bestdiv(struct clk_hw *hw, unsigned long rate,
- 	 */
- 	maxdiv = min(ULONG_MAX / rate, maxdiv);
- 
--	for (i = 1; i <= maxdiv; i++) {
-+	for (i = mindiv; i <= maxdiv; i++) {
- 		if (!_is_valid_div(divider, i))
- 			continue;
- 		parent_rate = __clk_round_rate(__clk_get_parent(hw->clk),
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0033-ARM-OMAP2-dpll-round-rate-to-closest-value.patch b/patches/da8xx-fb/0033-ARM-OMAP2-dpll-round-rate-to-closest-value.patch
deleted file mode 100644
index 8ab56ee176c8fefa7d8b2bd3740c6753c967f523..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0033-ARM-OMAP2-dpll-round-rate-to-closest-value.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 1c917859d30170be8309b01c96cc928e3209275b Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Mon, 21 Jan 2013 18:24:00 +0530
-Subject: [PATCH 33/48] ARM: OMAP2+: dpll: round rate to closest value
-
-Currently round rate function would return proper rate iff requested
-rate exactly matches the PLL lockable rate. This causes set_rate to
-fail if exact rate could not be set. Instead round rate may return
-closest rate possible (less than the requested). And if any user is
-badly in need of exact rate, then return value of round rate could
-be used to decide whether to invoke set rate or not.
-
-Modify round rate so that it return closest possible rate.
-
-This was required to get display working on am335x. Without this
-display rate could not be set (taking help of SET_RATE_PARENT). Couple
-of the downstream clocks of display PLL are basic clock dividers and
-they do MULT_ROUND_UP before requesting rate on PLL causing values
-that mostly could not be locked by PLL. And even otherwise, if
-requested rate for a particular pixel clock could not be satisfied by
-PLL, display would not work. This change will resolve the issue.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- arch/arm/mach-omap2/clkt_dpll.c | 12 +++++++-----
- 1 file changed, 7 insertions(+), 5 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/clkt_dpll.c b/arch/arm/mach-omap2/clkt_dpll.c
-index 924c230..15e6d41 100644
---- a/arch/arm/mach-omap2/clkt_dpll.c
-+++ b/arch/arm/mach-omap2/clkt_dpll.c
-@@ -345,20 +345,22 @@ long omap2_dpll_round_rate(struct clk_hw *hw, unsigned long target_rate,
- 		pr_debug("clock: %s: m = %d: n = %d: new_rate = %ld\n",
- 			 clk_name, m, n, new_rate);
- 
--		if (target_rate == new_rate) {
-+		if ((new_rate <= target_rate) &&
-+		    (new_rate > dd->last_rounded_rate)) {
- 			dd->last_rounded_m = m;
- 			dd->last_rounded_n = n;
--			dd->last_rounded_rate = target_rate;
--			break;
-+			dd->last_rounded_rate = new_rate;
-+			if (new_rate == target_rate)
-+				break;
- 		}
- 	}
- 
--	if (target_rate != new_rate) {
-+	if (!dd->last_rounded_rate) {
- 		pr_debug("clock: %s: cannot round to rate %ld\n",
- 			 clk_name, target_rate);
- 		return ~0;
- 	}
- 
--	return target_rate;
-+	return dd->last_rounded_rate;
- }
- 
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0034-ARM-OMAP2-dpll-am335x-avoid-freqsel.patch b/patches/da8xx-fb/0034-ARM-OMAP2-dpll-am335x-avoid-freqsel.patch
deleted file mode 100644
index 54e34260badb9977c49b33fa89c3a16f603605dd..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0034-ARM-OMAP2-dpll-am335x-avoid-freqsel.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ffe1e30ae93215a9e1729825bf384a297bb4ad4d Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Mon, 21 Jan 2013 17:13:37 +0530
-Subject: [PATCH 34/48] ARM: OMAP2+: dpll: am335x - avoid freqsel
-
-am335x does not have freqsel, avoid it.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- arch/arm/mach-omap2/dpll3xxx.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c
-index 0a02aab5..3aed4b0 100644
---- a/arch/arm/mach-omap2/dpll3xxx.c
-+++ b/arch/arm/mach-omap2/dpll3xxx.c
-@@ -500,8 +500,9 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate,
- 		if (dd->last_rounded_rate == 0)
- 			return -EINVAL;
- 
--		/* No freqsel on OMAP4 and OMAP3630 */
--		if (!cpu_is_omap44xx() && !cpu_is_omap3630()) {
-+		/* No freqsel on AM335x, OMAP4 and OMAP3630 */
-+		if (!soc_is_am33xx() && !cpu_is_omap44xx() &&
-+		    !cpu_is_omap3630()) {
- 			freqsel = _omap3_dpll_compute_freqsel(clk,
- 						dd->last_rounded_n);
- 			WARN_ON(!freqsel);
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0035-ARM-OMAP2-clock-DEFINE_STRUCT_CLK_FLAGS-helper.patch b/patches/da8xx-fb/0035-ARM-OMAP2-clock-DEFINE_STRUCT_CLK_FLAGS-helper.patch
deleted file mode 100644
index 62d89778cff63180ee96fb9ba0d5b533579ade38..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0035-ARM-OMAP2-clock-DEFINE_STRUCT_CLK_FLAGS-helper.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 474b046b37cdc8bd4259e180716a1d4039c89e1c Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Tue, 22 Jan 2013 15:42:00 +0530
-Subject: [PATCH 35/48] ARM: OMAP2+: clock: DEFINE_STRUCT_CLK_FLAGS helper
-
-DEFINE_STRUCT_CLK does not have the capability to set flags, define
-DEFINE_STRUCT_CLK_FLAGS to handle flags. This is needed to add
-SET_RATE_PARENT flag in statically defined lcd clock in am335x.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- arch/arm/mach-omap2/clock.h | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
-index b402048..60ddd86 100644
---- a/arch/arm/mach-omap2/clock.h
-+++ b/arch/arm/mach-omap2/clock.h
-@@ -65,6 +65,17 @@ struct clockdomain;
- 		.ops = &_clkops_name,				\
- 	};
- 
-+#define DEFINE_STRUCT_CLK_FLAGS(_name, _parent_array_name,	\
-+				_clkops_name, _flags)		\
-+	static struct clk _name = {				\
-+		.name = #_name,					\
-+		.hw = &_name##_hw.hw,				\
-+		.parent_names = _parent_array_name,		\
-+		.num_parents = ARRAY_SIZE(_parent_array_name),	\
-+		.ops = &_clkops_name,				\
-+		.flags = _flags,				\
-+	};
-+
- #define DEFINE_STRUCT_CLK_HW_OMAP(_name, _clkdm_name)		\
- 	static struct clk_hw_omap _name##_hw = {		\
- 		.hw = {						\
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0036-ARM-AM33XX-clock-SET_RATE_PARENT-in-lcd-path.patch b/patches/da8xx-fb/0036-ARM-AM33XX-clock-SET_RATE_PARENT-in-lcd-path.patch
deleted file mode 100644
index 67c1f20b0ce88f41493941978dea38ad88d3b543..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0036-ARM-AM33XX-clock-SET_RATE_PARENT-in-lcd-path.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From a6b1ce1bb14ef3cb43dae3899912fb669fd5b23b Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Wed, 9 Jan 2013 11:38:11 +0530
-Subject: [PATCH 36/48] ARM: AM33XX: clock: SET_RATE_PARENT in lcd path
-
-LCDC clock node is a one that does not have set rate capability. It
-just passes on the rate that is sent downstream by it's parent. While
-lcdc clock parent and it's grand parent - dpll_disp_m2_ck and
-dpll_disp_ck has the capability to configure rate.
-
-And the default rates provided by LCDC clock's ancestors are not
-sufficient to obtain pixel clock for current LCDC use cases, hence
-currently display would not work on AM335x SoC's (with driver
-modifications in platfrom independent way).
-
-Hence inform clock framework to propogate set rate for LCDC clock as
-well as it's parent - dpll_disp_m2_ck. With this change, set rate on
-LCDC clock would get propogated till dpll_disp_ck via dpll_disp_m2_ck,
-hence allowing the driver (same driver is used in DaVinci too) to set
-rates using LCDC clock without worrying about platform dependent clock
-details.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- arch/arm/mach-omap2/cclock33xx_data.c | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
-index a09d6d7..8dd9ecd 100644
---- a/arch/arm/mach-omap2/cclock33xx_data.c
-+++ b/arch/arm/mach-omap2/cclock33xx_data.c
-@@ -284,9 +284,10 @@ DEFINE_STRUCT_CLK(dpll_disp_ck, dpll_core_ck_parents, dpll_ddr_ck_ops);
-  * TODO: Add clksel here (sys_clkin, CORE_CLKOUTM6, PER_CLKOUTM2
-  * and ALT_CLK1/2)
-  */
--DEFINE_CLK_DIVIDER(dpll_disp_m2_ck, "dpll_disp_ck", &dpll_disp_ck, 0x0,
--		   AM33XX_CM_DIV_M2_DPLL_DISP, AM33XX_DPLL_CLKOUT_DIV_SHIFT,
--		   AM33XX_DPLL_CLKOUT_DIV_WIDTH, CLK_DIVIDER_ONE_BASED, NULL);
-+DEFINE_CLK_DIVIDER(dpll_disp_m2_ck, "dpll_disp_ck", &dpll_disp_ck,
-+		   CLK_SET_RATE_PARENT, AM33XX_CM_DIV_M2_DPLL_DISP,
-+		   AM33XX_DPLL_CLKOUT_DIV_SHIFT, AM33XX_DPLL_CLKOUT_DIV_WIDTH,
-+		   CLK_DIVIDER_ONE_BASED, NULL);
- 
- /* DPLL_PER */
- static struct dpll_data dpll_per_dd = {
-@@ -723,7 +724,8 @@ static struct clk_hw_omap lcd_gclk_hw = {
- 	.clksel_mask	= AM33XX_CLKSEL_0_1_MASK,
- };
- 
--DEFINE_STRUCT_CLK(lcd_gclk, lcd_ck_parents, gpio_fck_ops);
-+DEFINE_STRUCT_CLK_FLAGS(lcd_gclk, lcd_ck_parents,
-+			gpio_fck_ops, CLK_SET_RATE_PARENT);
- 
- DEFINE_CLK_FIXED_FACTOR(mmc_clk, "dpll_per_m2_ck", &dpll_per_m2_ck, 0x0, 1, 2);
- 
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0037-video-da8xx-fb-make-io-operations-safe.patch b/patches/da8xx-fb/0037-video-da8xx-fb-make-io-operations-safe.patch
deleted file mode 100644
index f86abd789260a873aa6c8079a951b577ea86de22..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0037-video-da8xx-fb-make-io-operations-safe.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 822c4746eca11c5528b043555befc75645dbfc7a Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Fri, 11 Jan 2013 10:43:59 +0530
-Subject: [PATCH 37/48] video: da8xx-fb: make io operations safe
-
-Replace __raw_readl/__raw_writel with readl/writel; this driver is
-reused on ARMv7 (AM335x SoC).
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index 720604c..35a33ca 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -141,12 +141,12 @@ static int frame_done_flag;
- 
- static inline unsigned int lcdc_read(unsigned int addr)
- {
--	return (unsigned int)__raw_readl(da8xx_fb_reg_base + (addr));
-+	return (unsigned int)readl(da8xx_fb_reg_base + (addr));
- }
- 
- static inline void lcdc_write(unsigned int val, unsigned int addr)
- {
--	__raw_writel(val, da8xx_fb_reg_base + (addr));
-+	writel(val, da8xx_fb_reg_base + (addr));
- }
- 
- struct da8xx_fb_par {
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0038-video-da8xx-fb-fix-24bpp-raster-configuration.patch b/patches/da8xx-fb/0038-video-da8xx-fb-fix-24bpp-raster-configuration.patch
deleted file mode 100644
index 33fb8b0f18133f275b2224609ff6e33835480ce6..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0038-video-da8xx-fb-fix-24bpp-raster-configuration.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From f006c9becc62cbf88a4b907bacdc4bd38ec0bd73 Mon Sep 17 00:00:00 2001
-From: "Manjunathappa, Prakash" <prakash.pm@ti.com>
-Date: Tue, 27 Nov 2012 13:07:59 +0530
-Subject: [PATCH 38/48] video: da8xx-fb: fix 24bpp raster configuration
-
-Set only LCD_V2_TFT_24BPP_MODE bit for 24bpp and LCD_V2_TFT_24BPP_UNPACK
-bit along with LCD_V2_TFT_24BPP_MODE for 32bpp configuration.
-
-Patch is tested on am335x-evm for 24bpp and da850-evm for 16bpp
-configurations.
-
-Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index 35a33ca..7f92f37 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -550,10 +550,10 @@ static int lcd_cfg_frame_buffer(struct da8xx_fb_par *par, u32 width, u32 height,
- 	case 4:
- 	case 16:
- 		break;
--	case 24:
--		reg |= LCD_V2_TFT_24BPP_MODE;
- 	case 32:
- 		reg |= LCD_V2_TFT_24BPP_UNPACK;
-+	case 24:
-+		reg |= LCD_V2_TFT_24BPP_MODE;
- 		break;
- 
- 	case 8:
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0039-video-da8xx-fb-enable-sync-lost-intr-for-v2-ip.patch b/patches/da8xx-fb/0039-video-da8xx-fb-enable-sync-lost-intr-for-v2-ip.patch
deleted file mode 100644
index 298990f402b998af44b5f7a1d40f5130128b7479..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0039-video-da8xx-fb-enable-sync-lost-intr-for-v2-ip.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 55f66704a5996ed99f99a6a45aa856cf826cab6c Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Mon, 17 Dec 2012 19:37:46 +0530
-Subject: [PATCH 39/48] video: da8xx-fb: enable sync lost intr for v2 ip
-
-interrupt handler is checking for sync lost interrupt, but it was not
-enabled, enable it.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index 7f92f37..ca69e01 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -318,7 +318,7 @@ static void lcd_blit(int load_mode, struct da8xx_fb_par *par)
- 			reg_int = lcdc_read(LCD_INT_ENABLE_SET_REG) |
- 				LCD_V2_END_OF_FRAME0_INT_ENA |
- 				LCD_V2_END_OF_FRAME1_INT_ENA |
--				LCD_FRAME_DONE;
-+				LCD_FRAME_DONE | LCD_SYNC_LOST;
- 			lcdc_write(reg_int, LCD_INT_ENABLE_SET_REG);
- 		}
- 		reg_dma |= LCD_DUAL_FRAME_BUFFER_ENABLE;
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0040-video-da8xx-fb-use-devres.patch b/patches/da8xx-fb/0040-video-da8xx-fb-use-devres.patch
deleted file mode 100644
index 0c03df66a28b3d648dbdef045c398af65c60d716..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0040-video-da8xx-fb-use-devres.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From 85b80577c6925b35fd634ee13cdcf93f5d5727a8 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Sun, 30 Dec 2012 18:56:21 +0530
-Subject: [PATCH 40/48] video: da8xx-fb: use devres
-
-Replace existing resource handling in the driver with managed device
-resource.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 35 ++++++-----------------------------
- 1 file changed, 6 insertions(+), 29 deletions(-)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index ca69e01..7a32e83 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -1036,12 +1036,9 @@ static int fb_remove(struct platform_device *dev)
- 				  par->p_palette_base);
- 		dma_free_coherent(NULL, par->vram_size, par->vram_virt,
- 				  par->vram_phys);
--		free_irq(par->irq, par);
- 		pm_runtime_put_sync(&dev->dev);
- 		pm_runtime_disable(&dev->dev);
- 		framebuffer_release(info);
--		iounmap(da8xx_fb_reg_base);
--		release_mem_region(lcdc_regs->start, resource_size(lcdc_regs));
- 
- 	}
- 	return 0;
-@@ -1265,7 +1262,6 @@ static int fb_probe(struct platform_device *device)
- 	struct fb_info *da8xx_fb_info;
- 	struct clk *fb_clk = NULL;
- 	struct da8xx_fb_par *par;
--	resource_size_t len;
- 	int ret, i;
- 	unsigned long ulcm;
- 
-@@ -1275,29 +1271,16 @@ static int fb_probe(struct platform_device *device)
- 	}
- 
- 	lcdc_regs = platform_get_resource(device, IORESOURCE_MEM, 0);
--	if (!lcdc_regs) {
--		dev_err(&device->dev,
--			"Can not get memory resource for LCD controller\n");
--		return -ENOENT;
--	}
--
--	len = resource_size(lcdc_regs);
--
--	lcdc_regs = request_mem_region(lcdc_regs->start, len, lcdc_regs->name);
--	if (!lcdc_regs)
--		return -EBUSY;
--
--	da8xx_fb_reg_base = ioremap(lcdc_regs->start, len);
-+	da8xx_fb_reg_base = devm_request_and_ioremap(&device->dev, lcdc_regs);
- 	if (!da8xx_fb_reg_base) {
--		ret = -EBUSY;
--		goto err_request_mem;
-+		dev_err(&device->dev, "memory resource setup failed\n");
-+		return -EADDRNOTAVAIL;
- 	}
- 
--	fb_clk = clk_get(&device->dev, "fck");
-+	fb_clk = devm_clk_get(&device->dev, "fck");
- 	if (IS_ERR(fb_clk)) {
- 		dev_err(&device->dev, "Can not get device clock\n");
--		ret = -ENODEV;
--		goto err_ioremap;
-+		return -ENODEV;
- 	}
- 
- 	pm_runtime_enable(&device->dev);
-@@ -1458,7 +1441,7 @@ static int fb_probe(struct platform_device *device)
- 		lcdc_irq_handler = lcdc_irq_handler_rev02;
- 	}
- 
--	ret = request_irq(par->irq, lcdc_irq_handler, 0,
-+	ret = devm_request_irq(&device->dev, par->irq, lcdc_irq_handler, 0,
- 			DRIVER_NAME, par);
- 	if (ret)
- 		goto irq_freq;
-@@ -1488,12 +1471,6 @@ err_pm_runtime_disable:
- 	pm_runtime_put_sync(&device->dev);
- 	pm_runtime_disable(&device->dev);
- 
--err_ioremap:
--	iounmap(da8xx_fb_reg_base);
--
--err_request_mem:
--	release_mem_region(lcdc_regs->start, len);
--
- 	return ret;
- }
- 
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0041-video-da8xx-fb-ensure-non-null-cfg-in-pdata.patch b/patches/da8xx-fb/0041-video-da8xx-fb-ensure-non-null-cfg-in-pdata.patch
deleted file mode 100644
index 2276f0b19a6a83583441dfcac02145d55901ca15..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0041-video-da8xx-fb-ensure-non-null-cfg-in-pdata.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From c884b397b8db09387bc477a125e269bee60a5741 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Mon, 31 Dec 2012 01:03:41 +0530
-Subject: [PATCH 41/48] video: da8xx-fb: ensure non-null cfg in pdata
-
-Ensure that platform data contains pointer for lcd_ctrl_config.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index 7a32e83..3b146bc 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -1320,6 +1320,11 @@ static int fb_probe(struct platform_device *device)
- 
- 	lcd_cfg = (struct lcd_ctrl_config *)fb_pdata->controller_data;
- 
-+	if (!lcd_cfg) {
-+		ret = -EINVAL;
-+		goto err_pm_runtime_disable;
-+	}
-+
- 	da8xx_fb_info = framebuffer_alloc(sizeof(struct da8xx_fb_par),
- 					&device->dev);
- 	if (!da8xx_fb_info) {
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0042-video-da8xx-fb-reorganize-panel-detection.patch b/patches/da8xx-fb/0042-video-da8xx-fb-reorganize-panel-detection.patch
deleted file mode 100644
index 31778d3d453de4dafb92c0f5c50d79e868efd0fb..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0042-video-da8xx-fb-reorganize-panel-detection.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From ac67dee265bc8e1a4045368de011915d06fe8330 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Sun, 30 Dec 2012 23:49:36 +0530
-Subject: [PATCH 42/48] video: da8xx-fb: reorganize panel detection
-
-Move panel detection to a separate function, this helps in readability
-as well as makes DT support cleaner.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 42 ++++++++++++++++++++++++++----------------
- 1 file changed, 26 insertions(+), 16 deletions(-)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index 3b146bc..b6ea5e9 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -1253,6 +1253,27 @@ static struct fb_ops da8xx_fb_ops = {
- 	.fb_blank = cfb_blank,
- };
- 
-+static struct fb_videomode *da8xx_fb_get_videomode(struct platform_device *dev)
-+{
-+	struct da8xx_lcdc_platform_data *fb_pdata = dev->dev.platform_data;
-+	struct fb_videomode *lcdc_info;
-+	int i;
-+
-+	for (i = 0, lcdc_info = known_lcd_panels;
-+		i < ARRAY_SIZE(known_lcd_panels); i++, lcdc_info++) {
-+		if (strcmp(fb_pdata->type, lcdc_info->name) == 0)
-+			break;
-+	}
-+
-+	if (i == ARRAY_SIZE(known_lcd_panels)) {
-+		dev_err(&dev->dev, "no panel found\n");
-+		return NULL;
-+	}
-+	dev_info(&dev->dev, "found %s panel\n", lcdc_info->name);
-+
-+	return lcdc_info;
-+}
-+
- static int fb_probe(struct platform_device *device)
- {
- 	struct da8xx_lcdc_platform_data *fb_pdata =
-@@ -1262,7 +1283,7 @@ static int fb_probe(struct platform_device *device)
- 	struct fb_info *da8xx_fb_info;
- 	struct clk *fb_clk = NULL;
- 	struct da8xx_fb_par *par;
--	int ret, i;
-+	int ret;
- 	unsigned long ulcm;
- 
- 	if (fb_pdata == NULL) {
-@@ -1270,6 +1291,10 @@ static int fb_probe(struct platform_device *device)
- 		return -ENOENT;
- 	}
- 
-+	lcdc_info = da8xx_fb_get_videomode(device);
-+	if (lcdc_info == NULL)
-+		return -ENODEV;
-+
- 	lcdc_regs = platform_get_resource(device, IORESOURCE_MEM, 0);
- 	da8xx_fb_reg_base = devm_request_and_ioremap(&device->dev, lcdc_regs);
- 	if (!da8xx_fb_reg_base) {
-@@ -1303,21 +1328,6 @@ static int fb_probe(struct platform_device *device)
- 		break;
- 	}
- 
--	for (i = 0, lcdc_info = known_lcd_panels;
--		i < ARRAY_SIZE(known_lcd_panels);
--		i++, lcdc_info++) {
--		if (strcmp(fb_pdata->type, lcdc_info->name) == 0)
--			break;
--	}
--
--	if (i == ARRAY_SIZE(known_lcd_panels)) {
--		dev_err(&device->dev, "GLCD: No valid panel found\n");
--		ret = -ENODEV;
--		goto err_pm_runtime_disable;
--	} else
--		dev_info(&device->dev, "GLCD: Found %s panel\n",
--					fb_pdata->type);
--
- 	lcd_cfg = (struct lcd_ctrl_config *)fb_pdata->controller_data;
- 
- 	if (!lcd_cfg) {
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0043-video-da8xx-fb-minimal-dt-support.patch b/patches/da8xx-fb/0043-video-da8xx-fb-minimal-dt-support.patch
deleted file mode 100644
index 96f081133b9bc29fe6f2e700ebe0f2884370a3fa..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0043-video-da8xx-fb-minimal-dt-support.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 929f9fc50ec94ccbc99c127f945380bb6dd319fb Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Sun, 30 Dec 2012 19:11:08 +0530
-Subject: [PATCH 43/48] video: da8xx-fb: minimal dt support
-
-Driver is provided a means to have the probe triggered by DT.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- Documentation/devicetree/bindings/video/fb-da8xx.txt | 16 ++++++++++++++++
- drivers/video/da8xx-fb.c                             |  7 +++++++
- 2 files changed, 23 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/video/fb-da8xx.txt
-
-diff --git a/Documentation/devicetree/bindings/video/fb-da8xx.txt b/Documentation/devicetree/bindings/video/fb-da8xx.txt
-new file mode 100644
-index 0000000..581e014
---- /dev/null
-+++ b/Documentation/devicetree/bindings/video/fb-da8xx.txt
-@@ -0,0 +1,16 @@
-+TI LCD Controller on DA830/DA850/AM335x SoC's
-+
-+Required properties:
-+- compatible:
-+	DA830 - "ti,da830-lcdc"
-+	AM335x SoC's - "ti,am3352-lcdc", "ti,da830-lcdc"
-+- reg: Address range of lcdc register set
-+- interrupts: lcdc interrupt
-+
-+Example:
-+
-+lcdc@4830e000 {
-+	compatible = "ti,am3352-lcdc", "ti,da830-lcdc";
-+	reg =  <0x4830e000 0x1000>;
-+	interrupts = <36>;
-+};
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index b6ea5e9..08ee8eb 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -1595,6 +1595,12 @@ static int fb_resume(struct platform_device *dev)
- #define fb_resume NULL
- #endif
- 
-+static const struct of_device_id da8xx_fb_of_match[] = {
-+	{.compatible = "ti,da830-lcdc", },
-+	{},
-+};
-+MODULE_DEVICE_TABLE(of, da8xx_fb_of_match);
-+
- static struct platform_driver da8xx_fb_driver = {
- 	.probe = fb_probe,
- 	.remove = fb_remove,
-@@ -1603,6 +1609,7 @@ static struct platform_driver da8xx_fb_driver = {
- 	.driver = {
- 		   .name = DRIVER_NAME,
- 		   .owner = THIS_MODULE,
-+		   .of_match_table = of_match_ptr(da8xx_fb_of_match),
- 		   },
- };
- 
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0044-video-da8xx-fb-invoke-platform-callback-safely.patch b/patches/da8xx-fb/0044-video-da8xx-fb-invoke-platform-callback-safely.patch
deleted file mode 100644
index d745166e560ca9e5c00dcfbf79643d398fa94a64..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0044-video-da8xx-fb-invoke-platform-callback-safely.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From cfa447c177f1654315ab9a56dd8501756ab781e0 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Mon, 31 Dec 2012 00:02:32 +0530
-Subject: [PATCH 44/48] video: da8xx-fb: invoke platform callback safely
-
-Ensure that platform data is present before checking whether platform
-callback is present (the one used to control backlight). So far this
-was not an issue as driver was purely non-DT triggered, but now DT
-support has been added.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index 08ee8eb..0beed20 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -1347,7 +1347,7 @@ static int fb_probe(struct platform_device *device)
- 	par->dev = &device->dev;
- 	par->lcdc_clk = fb_clk;
- 	par->lcd_fck_rate = clk_get_rate(fb_clk);
--	if (fb_pdata->panel_power_ctrl) {
-+	if (fb_pdata && fb_pdata->panel_power_ctrl) {
- 		par->panel_power_ctrl = fb_pdata->panel_power_ctrl;
- 		par->panel_power_ctrl(1);
- 	}
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0045-video-da8xx-fb-obtain-fb_videomode-info-from-dt.patch b/patches/da8xx-fb/0045-video-da8xx-fb-obtain-fb_videomode-info-from-dt.patch
deleted file mode 100644
index 917190106a71335f50f91c1f7b3b96fa79ec0441..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0045-video-da8xx-fb-obtain-fb_videomode-info-from-dt.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 7a796bc7e5c799e555753023a625c01185d77160 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Mon, 31 Dec 2012 00:31:14 +0530
-Subject: [PATCH 45/48] video: da8xx-fb: obtain fb_videomode info from dt
-
-Obtain fb_videomode details for the connected lcd panel using the
-display timing details present in DT.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- .../devicetree/bindings/video/fb-da8xx.txt          | 21 +++++++++++++++++++++
- drivers/video/da8xx-fb.c                            | 17 +++++++++++++++++
- 2 files changed, 38 insertions(+)
-
-diff --git a/Documentation/devicetree/bindings/video/fb-da8xx.txt b/Documentation/devicetree/bindings/video/fb-da8xx.txt
-index 581e014..0741f78 100644
---- a/Documentation/devicetree/bindings/video/fb-da8xx.txt
-+++ b/Documentation/devicetree/bindings/video/fb-da8xx.txt
-@@ -6,6 +6,12 @@ Required properties:
- 	AM335x SoC's - "ti,am3352-lcdc", "ti,da830-lcdc"
- - reg: Address range of lcdc register set
- - interrupts: lcdc interrupt
-+- display-timings: typical videomode of lcd panel, represented as child.
-+  Refer Documentation/devicetree/bindings/video/display-timing.txt for
-+  display timing binding details. If multiple videomodes are mentioned
-+  in display timings node, typical videomode has to be mentioned as the
-+  native mode or it has to be first child (driver cares only for native
-+  videomode).
- 
- Example:
- 
-@@ -13,4 +19,19 @@ lcdc@4830e000 {
- 	compatible = "ti,am3352-lcdc", "ti,da830-lcdc";
- 	reg =  <0x4830e000 0x1000>;
- 	interrupts = <36>;
-+	display-timings {
-+		800x480p62 {
-+			clock-frequency = <30000000>;
-+			hactive = <800>;
-+			vactive = <480>;
-+			hfront-porch = <39>;
-+			hback-porch = <39>;
-+			hsync-len = <47>;
-+			vback-porch = <29>;
-+			vfront-porch = <13>;
-+			vsync-len = <2>;
-+			hsync-active = <1>;
-+			vsync-active = <1>;
-+		};
-+	};
- };
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index 0beed20..0c68712 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -36,6 +36,7 @@
- #include <linux/slab.h>
- #include <linux/delay.h>
- #include <linux/lcm.h>
-+#include <video/of_display_timing.h>
- #include <video/da8xx-fb.h>
- #include <asm/div64.h>
- 
-@@ -1257,8 +1258,24 @@ static struct fb_videomode *da8xx_fb_get_videomode(struct platform_device *dev)
- {
- 	struct da8xx_lcdc_platform_data *fb_pdata = dev->dev.platform_data;
- 	struct fb_videomode *lcdc_info;
-+	struct device_node *np = dev->dev.of_node;
- 	int i;
- 
-+	if (np) {
-+		lcdc_info = devm_kzalloc(&dev->dev,
-+					 sizeof(struct fb_videomode),
-+					 GFP_KERNEL);
-+		if (!lcdc_info) {
-+			dev_err(&dev->dev, "memory allocation failed\n");
-+			return NULL;
-+		}
-+		if (of_get_fb_videomode(np, lcdc_info, OF_USE_NATIVE_MODE)) {
-+			dev_err(&dev->dev, "timings not available in DT\n");
-+			return NULL;
-+		}
-+		return lcdc_info;
-+	}
-+
- 	for (i = 0, lcdc_info = known_lcd_panels;
- 		i < ARRAY_SIZE(known_lcd_panels); i++, lcdc_info++) {
- 		if (strcmp(fb_pdata->type, lcdc_info->name) == 0)
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0046-video-da8xx-fb-ensure-pdata-only-for-non-dt.patch b/patches/da8xx-fb/0046-video-da8xx-fb-ensure-pdata-only-for-non-dt.patch
deleted file mode 100644
index 0cfa7e34e37502e0b839d66e411de0cfbac43f1d..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0046-video-da8xx-fb-ensure-pdata-only-for-non-dt.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From a282a9fadd762c1e0617d33a1bf8c1d377359b9d Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Mon, 31 Dec 2012 14:37:16 +0530
-Subject: [PATCH 46/48] video: da8xx-fb: ensure pdata only for non-dt
-
-This driver is DT probe-able, hence ensure presence of platform data
-only for non-DT boot.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index 0c68712..1c1a616 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -1303,7 +1303,7 @@ static int fb_probe(struct platform_device *device)
- 	int ret;
- 	unsigned long ulcm;
- 
--	if (fb_pdata == NULL) {
-+	if (fb_pdata == NULL && !device->dev.of_node) {
- 		dev_err(&device->dev, "Can not get platform data\n");
- 		return -ENOENT;
- 	}
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0047-video-da8xx-fb-setup-struct-lcd_ctrl_config-for-dt.patch b/patches/da8xx-fb/0047-video-da8xx-fb-setup-struct-lcd_ctrl_config-for-dt.patch
deleted file mode 100644
index 22b43f2f80aac384bfaf561a17c0b149a4ae54ef..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0047-video-da8xx-fb-setup-struct-lcd_ctrl_config-for-dt.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 4960a97f9012fe1e43ba289468852f3aa1a1b909 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Mon, 31 Dec 2012 15:03:12 +0530
-Subject: [PATCH 47/48] video: da8xx-fb: setup struct lcd_ctrl_config for dt
-
-strcut lcd_ctrl_config information required for driver is currently
-obtained via platform data. To handle DT probing, create
-lcd_ctrl_config and populate it with default values, these values are
-sufficient for the panels so far used with this controller to work.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 34 +++++++++++++++++++++++++++++++++-
- 1 file changed, 33 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index 1c1a616..5455682 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -1254,6 +1254,35 @@ static struct fb_ops da8xx_fb_ops = {
- 	.fb_blank = cfb_blank,
- };
- 
-+static struct lcd_ctrl_config *da8xx_fb_create_cfg(struct platform_device *dev)
-+{
-+	struct lcd_ctrl_config *cfg;
-+
-+	cfg = devm_kzalloc(&dev->dev, sizeof(struct fb_videomode), GFP_KERNEL);
-+	if (!cfg) {
-+		dev_err(&dev->dev, "memory allocation failed\n");
-+		return NULL;
-+	}
-+
-+	/* default values */
-+
-+	if (lcd_revision == LCD_VERSION_1)
-+		cfg->bpp = 16;
-+	else
-+		cfg->bpp = 32;
-+
-+	/*
-+	 * For panels so far used with this LCDC, below statement is sufficient.
-+	 * For new panels, if required, struct lcd_ctrl_cfg fields to be updated
-+	 * with additional/modified values. Those values would have to be then
-+	 * obtained from dt(requiring new dt bindings).
-+	 */
-+
-+	cfg->panel_shade = COLOR_ACTIVE;
-+
-+	return cfg;
-+}
-+
- static struct fb_videomode *da8xx_fb_get_videomode(struct platform_device *dev)
- {
- 	struct da8xx_lcdc_platform_data *fb_pdata = dev->dev.platform_data;
-@@ -1345,7 +1374,10 @@ static int fb_probe(struct platform_device *device)
- 		break;
- 	}
- 
--	lcd_cfg = (struct lcd_ctrl_config *)fb_pdata->controller_data;
-+	if (device->dev.of_node)
-+		lcd_cfg = da8xx_fb_create_cfg(device);
-+	else
-+		lcd_cfg = (struct lcd_ctrl_config *)fb_pdata->controller_data;
- 
- 	if (!lcd_cfg) {
- 		ret = -EINVAL;
--- 
-1.8.1
-
diff --git a/patches/da8xx-fb/0048-video-da8xx-fb-CCF-clock-divider-handling.patch b/patches/da8xx-fb/0048-video-da8xx-fb-CCF-clock-divider-handling.patch
deleted file mode 100644
index 7e35571649bb282ab62196cc09b3babbf24a6494..0000000000000000000000000000000000000000
--- a/patches/da8xx-fb/0048-video-da8xx-fb-CCF-clock-divider-handling.patch
+++ /dev/null
@@ -1,168 +0,0 @@
-From e7eef7eb64d2c8890a737737331e0b471b302f10 Mon Sep 17 00:00:00 2001
-From: Afzal Mohammed <afzal@ti.com>
-Date: Wed, 16 Jan 2013 18:14:31 +0530
-Subject: [PATCH 48/48] video: da8xx-fb: CCF clock divider handling
-
-Common clock framework provides a basic clock divider. Make use of it
-to handle clock configuration in the LCDC IP, wherever applicable;
-out of two platforms having this IP, only am335x is converted to use
-CCF, DaVinci is not yet converted. Hence wrap the modification such
-that it will come into effect only if CCF is selected, otherwise,
-prgram dividers as earlier. Once DaVinci is converted to use CCF,
-this ifdef'ery can be removed.
-
-Divider clock instantiated is made as a one that allows the rate
-propogation to it's parent, that provides more options w.r.t pixel
-clock rates that could be configured.
-
-Signed-off-by: Afzal Mohammed <afzal@ti.com>
----
- drivers/video/da8xx-fb.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++--
- 1 file changed, 70 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
-index 5455682..6723683 100644
---- a/drivers/video/da8xx-fb.c
-+++ b/drivers/video/da8xx-fb.c
-@@ -36,6 +36,7 @@
- #include <linux/slab.h>
- #include <linux/delay.h>
- #include <linux/lcm.h>
-+#include <linux/clk-provider.h>
- #include <video/of_display_timing.h>
- #include <video/da8xx-fb.h>
- #include <asm/div64.h>
-@@ -133,6 +134,10 @@
- #define WSI_TIMEOUT	50
- #define PALETTE_SIZE	256
- 
-+#define	LCD_CLK_SHIFT	8
-+#define	LCD_CLK_WIDTH	8
-+#define	LCD_CLK_MIN_DIV	2
-+
- static void __iomem *da8xx_fb_reg_base;
- static struct resource *lcdc_regs;
- static unsigned int lcd_revision;
-@@ -181,6 +186,9 @@ struct da8xx_fb_par {
- 	u32 pseudo_palette[16];
- 	struct fb_videomode	mode;
- 	struct lcd_ctrl_config	cfg;
-+#ifdef CONFIG_COMMON_CLK
-+	struct clk		*child_clk;
-+#endif
- };
- 
- static struct fb_var_screeninfo da8xx_fb_var;
-@@ -683,12 +691,27 @@ static void da8xx_fb_lcd_reset(void)
- 	}
- }
- 
-+#ifndef	CONFIG_COMMON_CLK
- static inline unsigned da8xx_fb_calc_clk_divider(struct da8xx_fb_par *par,
- 						 unsigned pixclock)
- {
- 	return par->lcd_fck_rate / (PICOS2KHZ(pixclock) * 1000);
- }
-+#endif
- 
-+#ifdef	CONFIG_COMMON_CLK
-+static inline unsigned da8xx_fb_round_clk(struct da8xx_fb_par *par,
-+					  unsigned pixclock)
-+{
-+	unsigned long rate;
-+
-+	rate = PICOS2KHZ(pixclock) * 1000;
-+	rate = clk_round_rate(par->child_clk, rate);
-+	rate = KHZ2PICOS(rate / 1000);
-+
-+	return rate;
-+}
-+#else
- static inline unsigned da8xx_fb_round_clk(struct da8xx_fb_par *par,
- 					  unsigned pixclock)
- {
-@@ -703,19 +726,43 @@ static inline void da8xx_fb_config_clk_divider(unsigned div)
- 	/* Configure the LCD clock divisor. */
- 	lcdc_write(LCD_CLK_DIVISOR(div) |
- 			(LCD_RASTER_MODE & 0x1), LCD_CTRL_REG);
-+}
-+#endif
- 
-+static inline void da8xx_fb_clkc_enable(void)
-+{
- 	if (lcd_revision == LCD_VERSION_2)
- 		lcdc_write(LCD_V2_DMA_CLK_EN | LCD_V2_LIDD_CLK_EN |
- 				LCD_V2_CORE_CLK_EN, LCD_CLK_ENABLE_REG);
- }
- 
--static inline void da8xx_fb_calc_config_clk_divider(struct da8xx_fb_par *par,
-+#ifdef	CONFIG_COMMON_CLK
-+static inline int da8xx_fb_calc_config_clk_divider(struct da8xx_fb_par *par,
-+						    struct fb_videomode *mode)
-+{
-+	int ret;
-+
-+	ret = clk_set_rate(par->child_clk, PICOS2KHZ(mode->pixclock) * 1000);
-+	if (IS_ERR_VALUE(ret)) {
-+		dev_err(par->dev, "unable to setup pixel clock of %u ps",
-+			mode->pixclock);
-+		return ret;
-+	}
-+	da8xx_fb_clkc_enable();
-+	return 0;
-+}
-+#else
-+static inline int da8xx_fb_calc_config_clk_divider(struct da8xx_fb_par *par,
- 						    struct fb_videomode *mode)
- {
- 	unsigned div = da8xx_fb_calc_clk_divider(par, mode->pixclock);
- 
- 	da8xx_fb_config_clk_divider(div);
-+	da8xx_fb_clkc_enable();
-+
-+	return 0;
- }
-+#endif
- 
- static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg,
- 		struct fb_videomode *panel)
-@@ -723,7 +770,9 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg,
- 	u32 bpp;
- 	int ret = 0;
- 
--	da8xx_fb_calc_config_clk_divider(par, panel);
-+	ret = da8xx_fb_calc_config_clk_divider(par, panel);
-+	if (IS_ERR_VALUE(ret))
-+		return ret;
- 
- 	if (panel->sync & FB_SYNC_CLK_INVERT)
- 		lcdc_write((lcdc_read(LCD_RASTER_TIMING_2_REG) |
-@@ -1406,6 +1455,25 @@ static int fb_probe(struct platform_device *device)
- 
- 	da8xx_fb_lcd_reset();
- 
-+#ifdef	CONFIG_COMMON_CLK
-+	/* set sane divisor value to begin along with the mode */
-+	lcdc_write(LCD_RASTER_MODE | LCD_CLK_DIVISOR(LCD_CLK_MIN_DIV),
-+		   LCD_CTRL_REG);
-+
-+	par->child_clk = clk_register_min_divider(NULL, "da8xx_fb_clk",
-+					      __clk_get_name(fb_clk),
-+					      CLK_SET_RATE_PARENT,
-+					      da8xx_fb_reg_base + LCD_CTRL_REG,
-+					      LCD_CLK_SHIFT, LCD_CLK_WIDTH,
-+					      LCD_CLK_MIN_DIV,
-+					      CLK_DIVIDER_ONE_BASED, NULL);
-+	if (IS_ERR(par->child_clk)) {
-+		dev_err(&device->dev, "error registering clk\n");
-+		ret = -ENODEV;
-+		goto err_release_fb;
-+	}
-+#endif
-+
- 	/* allocate frame buffer */
- 	par->vram_size = lcdc_info->xres * lcdc_info->yres * lcd_cfg->bpp;
- 	ulcm = lcm((lcdc_info->xres * lcd_cfg->bpp)/8, PAGE_SIZE);
--- 
-1.8.1
-
diff --git a/patches/defconfig b/patches/defconfig
index 081f7e4e3021c4f1fb8b8765c63c93f8e2d20a22..223abe19e73b3a1f41d15bec2d445da62f071fbb 100644
--- a/patches/defconfig
+++ b/patches/defconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Linux/arm 3.8.0-rc6 Kernel Configuration
+# Linux/arm 3.8.0 Kernel Configuration
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -369,9 +369,6 @@ CONFIG_OMAP_PACKAGE_CBS=y
 #
 # OMAP Board Type
 #
-CONFIG_MACH_AM335XEVM=y
-CONFIG_MACH_AM335XIAEVM=y
-CONFIG_MACH_TAM335X=y
 CONFIG_MACH_OMAP3_BEAGLE=y
 CONFIG_MACH_DEVKIT8000=y
 CONFIG_MACH_OMAP_LDP=y
@@ -459,7 +456,6 @@ CONFIG_ARM_ERRATA_764369=y
 CONFIG_PL310_ERRATA_769419=y
 # CONFIG_ARM_ERRATA_775420 is not set
 CONFIG_ARM_GIC=y
-CONFIG_TI_PRIV_EDMA=y
 
 #
 # Bus support
@@ -506,7 +502,6 @@ CONFIG_FLATMEM_MANUAL=y
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_HAVE_MEMBLOCK=y
-CONFIG_MEMORY_ISOLATION=y
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_COMPACTION=y
@@ -1341,19 +1336,11 @@ CONFIG_REGMAP_SPI=y
 CONFIG_REGMAP_MMIO=y
 CONFIG_REGMAP_IRQ=y
 CONFIG_DMA_SHARED_BUFFER=y
-CONFIG_CMA=y
-# CONFIG_CMA_DEBUG is not set
-
-#
-# Default contiguous memory area size:
-#
-CONFIG_CMA_SIZE_MBYTES=16
-CONFIG_CMA_SIZE_SEL_MBYTES=y
+# CONFIG_CMA is not set
+# CONFIG_CMA_SIZE_SEL_MBYTES is not set
 # CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
 # CONFIG_CMA_SIZE_SEL_MIN is not set
 # CONFIG_CMA_SIZE_SEL_MAX is not set
-CONFIG_CMA_ALIGNMENT=8
-CONFIG_CMA_AREAS=7
 
 #
 # Bus devices
@@ -1497,7 +1484,6 @@ CONFIG_PROC_DEVICETREE=y
 # CONFIG_OF_SELFTEST is not set
 CONFIG_OF_FLATTREE=y
 CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_DYNAMIC=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_IRQ=y
 CONFIG_OF_DEVICE=y
@@ -1505,8 +1491,6 @@ CONFIG_OF_I2C=y
 CONFIG_OF_NET=y
 CONFIG_OF_MDIO=y
 CONFIG_OF_MTD=y
-CONFIG_OF_RESOLVE=y
-CONFIG_OF_OVERLAY=y
 # CONFIG_PARPORT is not set
 CONFIG_BLK_DEV=y
 # CONFIG_BLK_DEV_COW_COMMON is not set
@@ -1576,7 +1560,6 @@ CONFIG_TI_ST=m
 # Altera FPGA firmware download module
 #
 # CONFIG_ALTERA_STAPL is not set
-# CONFIG_CAPE_BEAGLEBONE is not set
 
 #
 # SCSI device support
@@ -1971,7 +1954,6 @@ CONFIG_IEEE802154_FAKEHARD=m
 CONFIG_IEEE802154_FAKELB=m
 CONFIG_IEEE802154_AT86RF230=m
 CONFIG_IEEE802154_MRF24J40=m
-# CONFIG_IEEE802154_SERIAL is not set
 # CONFIG_ISDN is not set
 
 #
@@ -2345,7 +2327,7 @@ CONFIG_PINMUX=y
 CONFIG_PINCONF=y
 CONFIG_DEBUG_PINCTRL=y
 # CONFIG_PINCTRL_SINGLE is not set
-# CONFIG_PINCTRL_EXYNOS4 is not set
+# CONFIG_PINCTRL_EXYNOS is not set
 # CONFIG_PINCTRL_EXYNOS5440 is not set
 CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
 CONFIG_ARCH_REQUIRE_GPIOLIB=y
@@ -3273,13 +3255,9 @@ CONFIG_DRM_KMS_HELPER=y
 #
 # CONFIG_DRM_I2C_CH7006 is not set
 # CONFIG_DRM_I2C_SIL164 is not set
-# CONFIG_DRM_I2C_NXP_TDA998X is not set
 CONFIG_DRM_UDL=m
-# CONFIG_DRM_TILCDC is not set
 # CONFIG_VGASTATE is not set
 # CONFIG_VIDEO_OUTPUT_CONTROL is not set
-# CONFIG_OF_DISPLAY_TIMING is not set
-# CONFIG_OF_VIDEOMODE is not set
 CONFIG_FB=y
 CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB_DDC is not set
@@ -3309,16 +3287,15 @@ CONFIG_FB_TILEBLITTING=y
 # CONFIG_FB_TMIO is not set
 # CONFIG_FB_SMSCUFX is not set
 CONFIG_FB_UDL=m
-# CONFIG_FB_DA8XX is not set
 # CONFIG_FB_VIRTUAL is not set
 # CONFIG_FB_METRONOME is not set
 # CONFIG_FB_BROADSHEET is not set
 # CONFIG_FB_AUO_K190X is not set
-# CONFIG_FB_ST7735 is not set
 CONFIG_OMAP2_VRFB=y
 CONFIG_OMAP2_DSS=y
-# CONFIG_OMAP2_DSS_DEBUG is not set
-# CONFIG_OMAP2_DSS_DEBUGFS is not set
+CONFIG_OMAP2_DSS_DEBUG=y
+CONFIG_OMAP2_DSS_DEBUGFS=y
+# CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set
 CONFIG_OMAP2_DSS_DPI=y
 # CONFIG_OMAP2_DSS_RFBI is not set
 CONFIG_OMAP2_DSS_VENC=y
@@ -3439,7 +3416,6 @@ CONFIG_SND_USB_CAIAQ_INPUT=y
 CONFIG_SND_USB_6FIRE=m
 CONFIG_SND_SOC=y
 CONFIG_SND_SOC_DMAENGINE_PCM=y
-# CONFIG_SND_AM33XX_SOC is not set
 CONFIG_SND_DESIGNWARE_I2S=m
 CONFIG_SND_OMAP_SOC=y
 CONFIG_SND_OMAP_SOC_DMIC=y
@@ -3589,7 +3565,7 @@ CONFIG_USB_MON=y
 #
 # CONFIG_USB_C67X00_HCD is not set
 CONFIG_USB_EHCI_HCD=y
-# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
 CONFIG_USB_EHCI_TT_NEWSCHED=y
 CONFIG_USB_EHCI_HCD_OMAP=y
 # CONFIG_USB_OXU210HP_HCD is not set
@@ -3609,7 +3585,10 @@ CONFIG_USB_MUSB_OMAP2PLUS=y
 # CONFIG_USB_MUSB_DSPS is not set
 CONFIG_USB_INVENTRA_DMA=y
 # CONFIG_MUSB_PIO_ONLY is not set
-# CONFIG_USB_CHIPIDEA is not set
+CONFIG_USB_CHIPIDEA=y
+CONFIG_USB_CHIPIDEA_UDC=y
+CONFIG_USB_CHIPIDEA_HOST=y
+# CONFIG_USB_CHIPIDEA_DEBUG is not set
 # CONFIG_USB_RENESAS_USBHS is not set
 
 #
@@ -3963,7 +3942,6 @@ CONFIG_DMADEVICES=y
 #
 # CONFIG_DW_DMAC is not set
 CONFIG_TIMB_DMA=m
-# CONFIG_TI_EDMA is not set
 CONFIG_DMA_OMAP=y
 CONFIG_DMA_ENGINE=y
 CONFIG_DMA_VIRTUAL_CHANNELS=y
@@ -3979,7 +3957,6 @@ CONFIG_UIO=y
 CONFIG_UIO_PDRV=y
 CONFIG_UIO_PDRV_GENIRQ=y
 CONFIG_UIO_DMEM_GENIRQ=y
-# CONFIG_UIO_PRUSS is not set
 # CONFIG_VFIO is not set
 CONFIG_VIRTIO=m
 
@@ -4234,9 +4211,6 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
 # Accelerometers
 #
 CONFIG_HID_SENSOR_ACCEL_3D=m
-CONFIG_IIO_ST_ACCEL_3AXIS=m
-CONFIG_IIO_ST_ACCEL_I2C_3AXIS=m
-CONFIG_IIO_ST_ACCEL_SPI_3AXIS=m
 
 #
 # Analog to digital converters
@@ -4263,9 +4237,6 @@ CONFIG_AD8366=m
 CONFIG_HID_SENSOR_IIO_COMMON=m
 CONFIG_HID_SENSOR_IIO_TRIGGER=m
 # CONFIG_HID_SENSOR_ENUM_BASE_QUIRKS is not set
-CONFIG_IIO_ST_SENSORS_I2C=m
-CONFIG_IIO_ST_SENSORS_SPI=m
-CONFIG_IIO_ST_SENSORS_CORE=m
 
 #
 # Digital to analog converters
@@ -4304,7 +4275,6 @@ CONFIG_ADF4350=m
 #
 CONFIG_ADIS16136=m
 CONFIG_HID_SENSOR_GYRO_3D=m
-# CONFIG_IIO_ST_GYRO_3AXIS is not set
 
 #
 # Inertial measurement units
@@ -4324,15 +4294,12 @@ CONFIG_HID_SENSOR_ALS=m
 # Magnetometer sensors
 #
 CONFIG_HID_SENSOR_MAGNETOMETER_3D=m
-# CONFIG_IIO_ST_MAGN_3AXIS is not set
 CONFIG_PWM=y
-# CONFIG_PWM_PCA9685 is not set
 CONFIG_PWM_TIECAP=y
 CONFIG_PWM_TIEHRPWM=y
 CONFIG_PWM_TIPWMSS=y
 # CONFIG_PWM_TWL is not set
 # CONFIG_PWM_TWL_LED is not set
-# CONFIG_EHRPWM_TEST is not set
 CONFIG_IPACK_BUS=m
 # CONFIG_SERIAL_IPOCTAL is not set
 
@@ -4454,16 +4421,14 @@ CONFIG_TMPFS_XATTR=y
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_CONFIGFS_FS=m
 CONFIG_MISC_FILESYSTEMS=y
-CONFIG_ADFS_FS=m
-# CONFIG_ADFS_FS_RW is not set
-CONFIG_AFFS_FS=m
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
 CONFIG_ECRYPT_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-CONFIG_BEFS_FS=m
-# CONFIG_BEFS_DEBUG is not set
-CONFIG_BFS_FS=m
-CONFIG_EFS_FS=m
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
 CONFIG_JFFS2_FS=m
 CONFIG_JFFS2_FS_DEBUG=0
 CONFIG_JFFS2_FS_WRITEBUFFER=y
@@ -4479,10 +4444,7 @@ CONFIG_JFFS2_RTIME=y
 CONFIG_JFFS2_CMODE_PRIORITY=y
 # CONFIG_JFFS2_CMODE_SIZE is not set
 # CONFIG_JFFS2_CMODE_FAVOURLZO is not set
-CONFIG_UBIFS_FS=m
-# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
-CONFIG_UBIFS_FS_LZO=y
-CONFIG_UBIFS_FS_ZLIB=y
+# CONFIG_UBIFS_FS is not set
 CONFIG_LOGFS=m
 CONFIG_CRAMFS=m
 CONFIG_SQUASHFS=m
@@ -4493,20 +4455,19 @@ CONFIG_SQUASHFS_XZ=y
 # CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set
 # CONFIG_SQUASHFS_EMBEDDED is not set
 CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
-CONFIG_VXFS_FS=m
-CONFIG_MINIX_FS=m
-CONFIG_OMFS_FS=m
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
-CONFIG_QNX4FS_FS=m
-CONFIG_QNX6FS_FS=m
-# CONFIG_QNX6FS_DEBUG is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX6FS_FS is not set
 CONFIG_ROMFS_FS=m
 CONFIG_ROMFS_BACKED_BY_BLOCK=y
 # CONFIG_ROMFS_BACKED_BY_MTD is not set
 # CONFIG_ROMFS_BACKED_BY_BOTH is not set
 CONFIG_ROMFS_ON_BLOCK=y
 # CONFIG_PSTORE is not set
-CONFIG_SYSV_FS=m
+# CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
 CONFIG_F2FS_FS=y
 CONFIG_F2FS_STAT_FS=y
diff --git a/patches/dma/0001-Without-MACH_-option-Early-printk-DEBUG_LL.patch b/patches/dma/0001-Without-MACH_-option-Early-printk-DEBUG_LL.patch
deleted file mode 100644
index fa3381e3b43380952436203862196c19c08040c2..0000000000000000000000000000000000000000
--- a/patches/dma/0001-Without-MACH_-option-Early-printk-DEBUG_LL.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From f94b92981f71cfd208697d88a4f0a5f4c122e7de Mon Sep 17 00:00:00 2001
-From: "hvaibhav@ti.com" <hvaibhav@ti.com>
-Date: Fri, 31 Aug 2012 16:47:12 +0000
-Subject: [PATCH 01/35] Without MACH_ option Early printk (DEBUG_LL)
-
-On Fri, Aug 31, 2012 at 22:07:37, Hiremath, Vaibhav wrote:
-> On Fri, Aug 31, 2012 at 21:41:22, Tony Lindgren wrote:
-> > * Hiremath, Vaibhav <hvaibhav@ti.com> [120831 09:06]:
-> > > On Fri, Aug 31, 2012 at 21:22:26, Tony Lindgren wrote:
-> > > > * Vaibhav Hiremath <hvaibhav@ti.com> [120831 07:55]:
-> > > > > Hi Russell & Tony,
-> > > > >
-> > > > > AM335X EVM (based on AM33XX device) only supports DT boot mode and
-> > > > > doesn't have CONFIG_MACH_AM335XEVM option defined. Some time back during
-> > > > > baseport submission we had aligned that, we won't create separate EVM
-> > > > > options, killing the board file all-together.
-> > > > >
-> > > > > Having said that, the early printk option (DEBUG_LL) is broken, the
-> > > > > auto-generated file "./include/generated/mach-types.h" still refers to
-> > > > > CONFIG_MACH_AM335XEVM option,
-> > > >
-> > > > The way we're heading is that the DEBUG_LL options will only work for
-> > > > one hardcoded machine where you need to select the uart type and address
-> > > > in Kconfig. Or just patch it in.
-> > > >
-> > > > > #ifdef CONFIG_MACH_AM335XEVM
-> > > > > # ifdef machine_arch_type
-> > > > > #  undef machine_arch_type
-> > > > > #  define machine_arch_type     __machine_arch_type
-> > > > > # else
-> > > > > #  define machine_arch_type     MACH_TYPE_AM335XEVM
-> > > > > # endif
-> > > > > # define machine_is_am335xevm() (machine_arch_type == MACH_TYPE_AM335XEVM)
-> > > > > #else
-> > > > > # define machine_is_am335xevm() (0)
-> > > > > #endif
-> > > > >
-> > > > >
-> > > > > So I am thinking of changing the config_xxx option to SOC_AM33XX or
-> > > > > ARCH_OMAP2PLUS, something like below,
-> > > > >
-> > > > > am335xevm        SOC_AM33XX          AM335XEVM         3589
-> > > > >
-> > > > > OR
-> > > > >
-> > > > > am335xevm        ARCH_OMAP2PLUS      AM335XEVM         3589
-> > > > >
-> > > > >
-> > > > > Can you comment on this? Based on that I will submit the patch.
-> > > >
-> > > > I think that would at minimum break things for autogenerated
-> > > > mach-types.h where if only some other non-am335xevm machine is
-> > > > selected (like omap-generic) things don't get optimized out any
-> > > > longer as they currently do.
-> > > >
-> > >
-> > > Agreed. In that case the first option should work here, right?
-> >
-> > It gets messy if we start mixing mach and soc defines there..
-> >
-> > How about just add a hidden Kconfig option to mach-omap2/Kconfig
-> > that always selects MACH_TYPE_AM335XEVM if SOC_AM33XX is set?
->
-> Great, this is what I had in my mind but since it is hidden option I thought
-> may not be right thing to do.
-> I was just thinking in the direction that, it should be logical and fine if
-> SOC_AM33XX is used for all AM33xx based machines, isn't it?
->
-> Anyway, I think we are on same page here, I will add it and submit the patch
-> ASAP.
->
-> > Or does that require that MACHINE_START is there as well?
-> >
->
-> I do not think so, they are not related to each other, this option is
-> required only during decompression.
-> I have tested it on BeagleBone and it is working.
->
-
-Can you please review below patch? If you think its ok, I will send the
-patch -
-
-Thanks,
-Vaibhav
----
- arch/arm/mach-omap2/Kconfig | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
-index 41b581f..ce05b87 100644
---- a/arch/arm/mach-omap2/Kconfig
-+++ b/arch/arm/mach-omap2/Kconfig
-@@ -35,6 +35,9 @@ config ARCH_OMAP2
- 	default y
- 	select CPU_V6
- 	select MULTI_IRQ_HANDLER
-+	select MACH_AM335XEVM
-+	select MACH_AM335XIAEVM
-+	select MACH_TAM335X
- 	select SOC_HAS_OMAP2_SDRC
- 	select COMMON_CLK
- 
-@@ -153,6 +156,15 @@ config MACH_OMAP_GENERIC
- 	  Support for generic TI OMAP2+ boards using Flattened Device Tree.
- 	  More information at Documentation/devicetree
- 
-+config MACH_AM335XEVM
-+       bool
-+
-+config MACH_AM335XIAEVM
-+       bool
-+
-+config MACH_TAM335X
-+       bool
-+
- config MACH_OMAP2_TUSB6010
- 	bool
- 	depends on ARCH_OMAP2 && SOC_OMAP2420
--- 
-1.8.1
-
diff --git a/patches/dma/0002-ARM-OMAP-Hack-AM33xx-clock-data-to-allow-JTAG-use.patch b/patches/dma/0002-ARM-OMAP-Hack-AM33xx-clock-data-to-allow-JTAG-use.patch
deleted file mode 100644
index 7c8328cf691ec4441ed4fba168c36fefa60af146..0000000000000000000000000000000000000000
--- a/patches/dma/0002-ARM-OMAP-Hack-AM33xx-clock-data-to-allow-JTAG-use.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 42ead96f580a088dcb3ed756fc86d472b63e5ace Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Mon, 7 Jan 2013 11:55:00 -0500
-Subject: [PATCH 02/35] ARM: OMAP: Hack AM33xx clock data to allow JTAG use
-
-The debugss interface clock must remain enabled at init
-in order to prevent an attached JTAG probe from hanging.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- arch/arm/mach-omap2/cclock33xx_data.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
-index ea64ad6..a09d6d7 100644
---- a/arch/arm/mach-omap2/cclock33xx_data.c
-+++ b/arch/arm/mach-omap2/cclock33xx_data.c
-@@ -428,7 +428,7 @@ DEFINE_STRUCT_CLK(smartreflex1_fck, dpll_core_ck_parents, clk_ops_null);
-  *     - usbotg_fck (its additional clock and not really a modulemode)
-  *     - ieee5000
-  */
--DEFINE_CLK_GATE(debugss_ick, "dpll_core_m4_ck", &dpll_core_m4_ck, 0x0,
-+DEFINE_CLK_GATE(debugss_ick, "dpll_core_m4_ck", &dpll_core_m4_ck, ENABLE_ON_INIT,
- 		AM33XX_CM_WKUP_DEBUGSS_CLKCTRL, AM33XX_MODULEMODE_SWCTRL_SHIFT,
- 		0x0, NULL);
- 
--- 
-1.8.1
-
diff --git a/patches/dma/0003-fb-Rework-locking-to-fix-lock-ordering-on-takeover.patch b/patches/dma/0003-fb-Rework-locking-to-fix-lock-ordering-on-takeover.patch
deleted file mode 100644
index 0a2704c2c991eccf95b7a71e9fad8a758bedc09d..0000000000000000000000000000000000000000
--- a/patches/dma/0003-fb-Rework-locking-to-fix-lock-ordering-on-takeover.patch
+++ /dev/null
@@ -1,293 +0,0 @@
-From e69549aa558a25fbc4bd693140f8f27610f5addf Mon Sep 17 00:00:00 2001
-From: Alan Cox <alan@lxorguk.ukuu.org.uk>
-Date: Fri, 16 Nov 2012 19:27:11 +0000
-Subject: [PATCH 03/35] fb: Rework locking to fix lock ordering on takeover
-
-[The fb maintainer appears to be absent at the moment].
-
-This is needed to fix a pile of lockdep splats that now show up because console_lock()
-is being properly audited. Hugh Dickins and Sasha Levin have tested it and both reports
-all looks good. This is probably not the whole story - the entire fb layer has locking
-confusion problems that were previously hidden but it seems to get the ones people hit
-in testing. This hopefully explains a few of the weird fb hangs that have been floating
-around forever.
-
-From: Alan Cox <alan@linux.intel.com>
-
-Adjust the console layer to allow a take over call where the caller already
-holds the locks. Make the fb layer lock in order.
-
-This s partly a band aid, the fb layer is terminally confused about the
-locking rules it uses for its notifiers it seems.
-
-Signed-off-by: Alan Cox <alan@linux.intel.com>
-Tested-by: Borislav Petkov <bp@alien8.de>
----
- drivers/tty/vt/vt.c           |   81 +++++++++++++++++++++++++++++++----------
- drivers/video/console/fbcon.c |   30 ++++++++++++++-
- drivers/video/fbmem.c         |    5 +--
- drivers/video/fbsysfs.c       |    3 ++
- include/linux/console.h       |    1 +
- 5 files changed, 97 insertions(+), 23 deletions(-)
-
-diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
-index 8fd8968..ecca2f2 100644
---- a/drivers/tty/vt/vt.c
-+++ b/drivers/tty/vt/vt.c
-@@ -2987,7 +2987,7 @@ int __init vty_init(const struct file_operations *console_fops)
- 
- static struct class *vtconsole_class;
- 
--static int bind_con_driver(const struct consw *csw, int first, int last,
-+static int do_bind_con_driver(const struct consw *csw, int first, int last,
- 			   int deflt)
- {
- 	struct module *owner = csw->owner;
-@@ -2998,7 +2998,7 @@ static int bind_con_driver(const struct consw *csw, int first, int last,
- 	if (!try_module_get(owner))
- 		return -ENODEV;
- 
--	console_lock();
-+	WARN_CONSOLE_UNLOCKED();
- 
- 	/* check if driver is registered */
- 	for (i = 0; i < MAX_NR_CON_DRIVER; i++) {
-@@ -3083,11 +3083,22 @@ static int bind_con_driver(const struct consw *csw, int first, int last,
- 
- 	retval = 0;
- err:
--	console_unlock();
- 	module_put(owner);
- 	return retval;
- };
- 
-+
-+static int bind_con_driver(const struct consw *csw, int first, int last,
-+			   int deflt)
-+{
-+	int ret;
-+
-+	console_lock();
-+	ret = do_bind_con_driver(csw, first, last, deflt);
-+	console_unlock();
-+	return ret;
-+}
-+
- #ifdef CONFIG_VT_HW_CONSOLE_BINDING
- static int con_is_graphics(const struct consw *csw, int first, int last)
- {
-@@ -3199,9 +3210,9 @@ int unbind_con_driver(const struct consw *csw, int first, int last, int deflt)
- 	if (!con_is_bound(csw))
- 		con_driver->flag &= ~CON_DRIVER_FLAG_INIT;
- 
--	console_unlock();
- 	/* ignore return value, binding should not fail */
--	bind_con_driver(defcsw, first, last, deflt);
-+	do_bind_con_driver(defcsw, first, last, deflt);
-+	console_unlock();
- err:
- 	module_put(owner);
- 	return retval;
-@@ -3492,28 +3503,18 @@ int con_debug_leave(void)
- }
- EXPORT_SYMBOL_GPL(con_debug_leave);
- 
--/**
-- * register_con_driver - register console driver to console layer
-- * @csw: console driver
-- * @first: the first console to take over, minimum value is 0
-- * @last: the last console to take over, maximum value is MAX_NR_CONSOLES -1
-- *
-- * DESCRIPTION: This function registers a console driver which can later
-- * bind to a range of consoles specified by @first and @last. It will
-- * also initialize the console driver by calling con_startup().
-- */
--int register_con_driver(const struct consw *csw, int first, int last)
-+static int do_register_con_driver(const struct consw *csw, int first, int last)
- {
- 	struct module *owner = csw->owner;
- 	struct con_driver *con_driver;
- 	const char *desc;
- 	int i, retval = 0;
- 
-+	WARN_CONSOLE_UNLOCKED();
-+
- 	if (!try_module_get(owner))
- 		return -ENODEV;
- 
--	console_lock();
--
- 	for (i = 0; i < MAX_NR_CON_DRIVER; i++) {
- 		con_driver = &registered_con_driver[i];
- 
-@@ -3566,10 +3567,29 @@ int register_con_driver(const struct consw *csw, int first, int last)
- 	}
- 
- err:
--	console_unlock();
- 	module_put(owner);
- 	return retval;
- }
-+
-+/**
-+ * register_con_driver - register console driver to console layer
-+ * @csw: console driver
-+ * @first: the first console to take over, minimum value is 0
-+ * @last: the last console to take over, maximum value is MAX_NR_CONSOLES -1
-+ *
-+ * DESCRIPTION: This function registers a console driver which can later
-+ * bind to a range of consoles specified by @first and @last. It will
-+ * also initialize the console driver by calling con_startup().
-+ */
-+int register_con_driver(const struct consw *csw, int first, int last)
-+{
-+	int retval;
-+
-+	console_lock();
-+	retval = do_register_con_driver(csw, first, last);
-+	console_unlock();
-+	return retval;
-+}
- EXPORT_SYMBOL(register_con_driver);
- 
- /**
-@@ -3625,6 +3645,29 @@ EXPORT_SYMBOL(unregister_con_driver);
-  *
-  *      take_over_console is basically a register followed by unbind
-  */
-+int do_take_over_console(const struct consw *csw, int first, int last, int deflt)
-+{
-+	int err;
-+
-+	err = do_register_con_driver(csw, first, last);
-+	/* if we get an busy error we still want to bind the console driver
-+	 * and return success, as we may have unbound the console driver
-+	 * but not unregistered it.
-+	*/
-+	if (err == -EBUSY)
-+		err = 0;
-+	if (!err)
-+		do_bind_con_driver(csw, first, last, deflt);
-+
-+	return err;
-+}
-+/*
-+ *	If we support more console drivers, this function is used
-+ *	when a driver wants to take over some existing consoles
-+ *	and become default driver for newly opened ones.
-+ *
-+ *      take_over_console is basically a register followed by unbind
-+ */
- int take_over_console(const struct consw *csw, int first, int last, int deflt)
- {
- 	int err;
-diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
-index fdefa8f..c75f8ce 100644
---- a/drivers/video/console/fbcon.c
-+++ b/drivers/video/console/fbcon.c
-@@ -529,6 +529,34 @@ static int search_for_mapped_con(void)
- 	return retval;
- }
- 
-+static int do_fbcon_takeover(int show_logo)
-+{
-+	int err, i;
-+
-+	if (!num_registered_fb)
-+		return -ENODEV;
-+
-+	if (!show_logo)
-+		logo_shown = FBCON_LOGO_DONTSHOW;
-+
-+	for (i = first_fb_vc; i <= last_fb_vc; i++)
-+		con2fb_map[i] = info_idx;
-+
-+	err = do_take_over_console(&fb_con, first_fb_vc, last_fb_vc,
-+				fbcon_is_default);
-+
-+	if (err) {
-+		for (i = first_fb_vc; i <= last_fb_vc; i++) {
-+			con2fb_map[i] = -1;
-+		}
-+		info_idx = -1;
-+	} else {
-+		fbcon_has_console_bind = 1;
-+	}
-+
-+	return err;
-+}
-+
- static int fbcon_takeover(int show_logo)
- {
- 	int err, i;
-@@ -3115,7 +3143,7 @@ static int fbcon_fb_registered(struct fb_info *info)
- 		}
- 
- 		if (info_idx != -1)
--			ret = fbcon_takeover(1);
-+			ret = do_fbcon_takeover(1);
- 	} else {
- 		for (i = first_fb_vc; i <= last_fb_vc; i++) {
- 			if (con2fb_map_boot[i] == idx)
-diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
-index 3ff0105..564ebe9 100644
---- a/drivers/video/fbmem.c
-+++ b/drivers/video/fbmem.c
-@@ -1650,7 +1650,9 @@ static int do_register_framebuffer(struct fb_info *fb_info)
- 	event.info = fb_info;
- 	if (!lock_fb_info(fb_info))
- 		return -ENODEV;
-+        console_lock();
- 	fb_notifier_call_chain(FB_EVENT_FB_REGISTERED, &event);
-+        console_unlock();
- 	unlock_fb_info(fb_info);
- 	return 0;
- }
-@@ -1853,11 +1855,8 @@ int fb_new_modelist(struct fb_info *info)
- 	err = 1;
- 
- 	if (!list_empty(&info->modelist)) {
--		if (!lock_fb_info(info))
--			return -ENODEV;
- 		event.info = info;
- 		err = fb_notifier_call_chain(FB_EVENT_NEW_MODELIST, &event);
--		unlock_fb_info(info);
- 	}
- 
- 	return err;
-diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c
-index a55e366..ef476b0 100644
---- a/drivers/video/fbsysfs.c
-+++ b/drivers/video/fbsysfs.c
-@@ -177,6 +177,8 @@ static ssize_t store_modes(struct device *device,
- 	if (i * sizeof(struct fb_videomode) != count)
- 		return -EINVAL;
- 
-+	if (!lock_fb_info(fb_info))
-+		return -ENODEV;
- 	console_lock();
- 	list_splice(&fb_info->modelist, &old_list);
- 	fb_videomode_to_modelist((const struct fb_videomode *)buf, i,
-@@ -188,6 +190,7 @@ static ssize_t store_modes(struct device *device,
- 		fb_destroy_modelist(&old_list);
- 
- 	console_unlock();
-+	unlock_fb_info(fb_info);
- 
- 	return 0;
- }
-diff --git a/include/linux/console.h b/include/linux/console.h
-index dedb082..4ef4307 100644
---- a/include/linux/console.h
-+++ b/include/linux/console.h
-@@ -78,6 +78,7 @@ int con_is_bound(const struct consw *csw);
- int register_con_driver(const struct consw *csw, int first, int last);
- int unregister_con_driver(const struct consw *csw);
- int take_over_console(const struct consw *sw, int first, int last, int deflt);
-+int do_take_over_console(const struct consw *sw, int first, int last, int deflt);
- void give_up_console(const struct consw *sw);
- #ifdef CONFIG_HW_CONSOLE
- int con_debug_enter(struct vc_data *vc);
--- 
-1.7.10.4
-
diff --git a/patches/dma/0004-video-st7735fb-add-st7735-framebuffer-driver.patch b/patches/dma/0004-video-st7735fb-add-st7735-framebuffer-driver.patch
deleted file mode 100644
index 838f66aea3105a17b1fe8b57911ef02630cf2209..0000000000000000000000000000000000000000
--- a/patches/dma/0004-video-st7735fb-add-st7735-framebuffer-driver.patch
+++ /dev/null
@@ -1,803 +0,0 @@
-From 40ad6679e44a57ec5157a4fb31ef4d3be30019cc Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Tue, 11 Sep 2012 15:30:10 -0400
-Subject: [PATCH 04/35] video: st7735fb: add st7735 framebuffer driver
-
-Add driver for the SPI-connected ST7735 display controller.
-This driver requires that the platform support DT booting.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- .../devicetree/bindings/vendor-prefixes.txt        |    2 +
- drivers/video/Kconfig                              |   11 +
- drivers/video/Makefile                             |    1 +
- drivers/video/st7735fb.c                           |  631 ++++++++++++++++++++
- drivers/video/st7735fb.h                           |   84 +++
- 5 files changed, 729 insertions(+)
- create mode 100644 drivers/video/st7735fb.c
- create mode 100644 drivers/video/st7735fb.h
-
-diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
-index 902b1b1..2e000ea 100644
---- a/Documentation/devicetree/bindings/vendor-prefixes.txt
-+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
-@@ -4,6 +4,7 @@ This isn't an exhaustive list, but you should add new prefixes to it before
- using them to avoid name-space collisions.
- 
- ad	Avionic Design GmbH
-+adafruit	Adafruit Industries
- adi	Analog Devices, Inc.
- ak	Asahi Kasei Corp.
- amcc	Applied Micro Circuits Corporation (APM, formally AMCC)
-@@ -48,6 +49,7 @@ schindler	Schindler
- sil	Silicon Image
- simtek
- sirf	SiRF Technology, Inc.
-+sitronix Sitronix Technology Corp.
- snps 	Synopsys, Inc.
- st	STMicroelectronics
- stericsson	ST-Ericsson
-diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
-index e7068c5..b532f02 100644
---- a/drivers/video/Kconfig
-+++ b/drivers/video/Kconfig
-@@ -2419,6 +2419,17 @@ config FB_PUV3_UNIGFX
- 	  Choose this option if you want to use the Unigfx device as a
- 	  framebuffer device. Without the support of PCI & AGP.
- 
-+config FB_ST7735
-+	tristate "ST7735 framebuffer support"
-+	depends on FB && SPI
-+	select FB_SYS_FILLRECT
-+	select FB_SYS_COPYAREA
-+	select FB_SYS_IMAGEBLIT
-+	select FB_SYS_FOPS
-+	select FB_DEFERRED_IO
-+	help
-+	  Framebuffer support for the ST7735 display controller in SPI mode.
-+
- source "drivers/video/omap/Kconfig"
- source "drivers/video/omap2/Kconfig"
- source "drivers/video/exynos/Kconfig"
-diff --git a/drivers/video/Makefile b/drivers/video/Makefile
-index 768a137..58dbeaf 100644
---- a/drivers/video/Makefile
-+++ b/drivers/video/Makefile
-@@ -146,6 +146,7 @@ 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_ST7735)		  += st7735fb.o
- 
- # Platform or fallback drivers go here
- obj-$(CONFIG_FB_UVESA)            += uvesafb.o
-diff --git a/drivers/video/st7735fb.c b/drivers/video/st7735fb.c
-new file mode 100644
-index 0000000..319653b
---- /dev/null
-+++ b/drivers/video/st7735fb.c
-@@ -0,0 +1,631 @@
-+/*
-+ * linux/drivers/video/st7735fb.c -- FB driver for ST7735 LCD controller
-+ * Layout is based on skeletonfb.c by James Simmons and Geert Uytterhoeven.
-+ *
-+ * Copyright (C) 2012, Matt Porter <matt@ohporter.com>
-+ *
-+ * This file is subject to the terms and conditions of the GNU General Public
-+ * License. See the file COPYING in the main directory of this archive for
-+ * more details.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/kernel.h>
-+#include <linux/errno.h>
-+#include <linux/string.h>
-+#include <linux/mm.h>
-+#include <linux/vmalloc.h>
-+#include <linux/slab.h>
-+#include <linux/init.h>
-+#include <linux/fb.h>
-+#include <linux/gpio.h>
-+#include <linux/spi/spi.h>
-+#include <linux/delay.h>
-+#include <linux/err.h>
-+#include <linux/uaccess.h>
-+#include <linux/of.h>
-+#include <linux/of_device.h>
-+#include <linux/of_gpio.h>
-+#include <linux/pinctrl/consumer.h>
-+
-+#include "st7735fb.h"
-+
-+static struct st7735_function st7735_cfg_script[] = {
-+	{ ST7735_START, ST7735_START},
-+	{ ST7735_CMD, ST7735_SWRESET},
-+	{ ST7735_DELAY, 150},
-+	{ ST7735_CMD, ST7735_SLPOUT},
-+	{ ST7735_DELAY, 500},
-+	{ ST7735_CMD, ST7735_FRMCTR1},
-+	{ ST7735_DATA, 0x01},
-+	{ ST7735_DATA, 0x2c},
-+	{ ST7735_DATA, 0x2d},
-+	{ ST7735_CMD, ST7735_FRMCTR2},
-+	{ ST7735_DATA, 0x01},
-+	{ ST7735_DATA, 0x2c},
-+	{ ST7735_DATA, 0x2d},
-+	{ ST7735_CMD, ST7735_FRMCTR3},
-+	{ ST7735_DATA, 0x01},
-+	{ ST7735_DATA, 0x2c},
-+	{ ST7735_DATA, 0x2d},
-+	{ ST7735_DATA, 0x01},
-+	{ ST7735_DATA, 0x2c},
-+	{ ST7735_DATA, 0x2d},
-+	{ ST7735_CMD, ST7735_INVCTR},
-+	{ ST7735_DATA, 0x07},
-+	{ ST7735_CMD, ST7735_PWCTR1},
-+	{ ST7735_DATA, 0xa2},
-+	{ ST7735_DATA, 0x02},
-+	{ ST7735_DATA, 0x84},
-+	{ ST7735_CMD, ST7735_PWCTR2},
-+	{ ST7735_DATA, 0xc5},
-+	{ ST7735_CMD, ST7735_PWCTR3},
-+	{ ST7735_DATA, 0x0a},
-+	{ ST7735_DATA, 0x00},
-+	{ ST7735_CMD, ST7735_PWCTR4},
-+	{ ST7735_DATA, 0x8a},
-+	{ ST7735_DATA, 0x2a},
-+	{ ST7735_CMD, ST7735_PWCTR5},
-+	{ ST7735_DATA, 0x8a},
-+	{ ST7735_DATA, 0xee},
-+	{ ST7735_CMD, ST7735_VMCTR1},
-+	{ ST7735_DATA, 0x0e},
-+	{ ST7735_CMD, ST7735_INVOFF},
-+	{ ST7735_CMD, ST7735_MADCTL},
-+	{ ST7735_DATA, 0xc8},
-+	{ ST7735_CMD, ST7735_COLMOD},
-+	{ ST7735_DATA, 0x05},
-+	{ ST7735_CMD, ST7735_CASET},
-+	{ ST7735_DATA, 0x00},
-+	{ ST7735_DATA, 0x00},
-+	{ ST7735_DATA, 0x00},
-+	{ ST7735_DATA, 0x00},
-+	{ ST7735_DATA, 0x7f},
-+	{ ST7735_CMD, ST7735_RASET},
-+	{ ST7735_DATA, 0x00},
-+	{ ST7735_DATA, 0x00},
-+	{ ST7735_DATA, 0x00},
-+	{ ST7735_DATA, 0x00},
-+	{ ST7735_DATA, 0x9f},
-+	{ ST7735_CMD, ST7735_GMCTRP1},
-+	{ ST7735_DATA, 0x02},
-+	{ ST7735_DATA, 0x1c},
-+	{ ST7735_DATA, 0x07},
-+	{ ST7735_DATA, 0x12},
-+	{ ST7735_DATA, 0x37},
-+	{ ST7735_DATA, 0x32},
-+	{ ST7735_DATA, 0x29},
-+	{ ST7735_DATA, 0x2d},
-+	{ ST7735_DATA, 0x29},
-+	{ ST7735_DATA, 0x25},
-+	{ ST7735_DATA, 0x2b},
-+	{ ST7735_DATA, 0x39},
-+	{ ST7735_DATA, 0x00},
-+	{ ST7735_DATA, 0x01},
-+	{ ST7735_DATA, 0x03},
-+	{ ST7735_DATA, 0x10},
-+	{ ST7735_CMD, ST7735_GMCTRN1},
-+	{ ST7735_DATA, 0x03},
-+	{ ST7735_DATA, 0x1d},
-+	{ ST7735_DATA, 0x07},
-+	{ ST7735_DATA, 0x06},
-+	{ ST7735_DATA, 0x2e},
-+	{ ST7735_DATA, 0x2c},
-+	{ ST7735_DATA, 0x29},
-+	{ ST7735_DATA, 0x2d},
-+	{ ST7735_DATA, 0x2e},
-+	{ ST7735_DATA, 0x2e},
-+	{ ST7735_DATA, 0x37},
-+	{ ST7735_DATA, 0x3f},
-+	{ ST7735_DATA, 0x00},
-+	{ ST7735_DATA, 0x00},
-+	{ ST7735_DATA, 0x02},
-+	{ ST7735_DATA, 0x10},
-+	{ ST7735_CMD, ST7735_DISPON},
-+	{ ST7735_DELAY, 100},
-+	{ ST7735_CMD, ST7735_NORON},
-+	{ ST7735_DELAY, 10},
-+	{ ST7735_END, ST7735_END},
-+};
-+
-+static struct fb_fix_screeninfo st7735fb_fix __devinitdata = {
-+	.id =		"ST7735",
-+	.type =		FB_TYPE_PACKED_PIXELS,
-+	.visual =	FB_VISUAL_DIRECTCOLOR,
-+	.xpanstep =	0,
-+	.ypanstep =	0,
-+	.ywrapstep =	0,
-+	.line_length =	WIDTH*BPP/8,
-+	.accel =	FB_ACCEL_NONE,
-+};
-+
-+static struct fb_var_screeninfo st7735fb_var __devinitdata = {
-+	.xres =			WIDTH,
-+	.yres =			HEIGHT,
-+	.xres_virtual =		WIDTH,
-+	.yres_virtual =		HEIGHT,
-+	.bits_per_pixel =	BPP,
-+	.nonstd	=		0,
-+};
-+
-+static int st7735_write(struct st7735fb_par *par, u8 data)
-+{
-+	par->buf[0] = data;
-+
-+	return spi_write(par->spi, par->buf, 1);
-+}
-+
-+static void st7735_write_data(struct st7735fb_par *par, u8 data)
-+{
-+	int ret = 0;
-+
-+	/* Set data mode */
-+	gpio_set_value(par->dc, 1);
-+
-+	ret = st7735_write(par, data);
-+	if (ret < 0)
-+		pr_err("%s: write data %02x failed with status %d\n",
-+			par->info->fix.id, data, ret);
-+}
-+
-+static int st7735_write_data_buf(struct st7735fb_par *par,
-+					u8 *txbuf, int size)
-+{
-+	/* Set data mode */
-+	gpio_set_value(par->dc, 1);
-+
-+	/* Write entire buffer */
-+	return spi_write(par->spi, txbuf, size);
-+}
-+
-+static void st7735_write_cmd(struct st7735fb_par *par, u8 data)
-+{
-+	int ret = 0;
-+
-+	/* Set command mode */
-+	gpio_set_value(par->dc, 0);
-+
-+	ret = st7735_write(par, data);
-+	if (ret < 0)
-+		pr_err("%s: write command %02x failed with status %d\n",
-+			par->info->fix.id, data, ret);
-+}
-+
-+static void st7735_run_cfg_script(struct st7735fb_par *par)
-+{
-+	int i = 0;
-+	int end_script = 0;
-+
-+	do {
-+		switch (st7735_cfg_script[i].cmd)
-+		{
-+		case ST7735_START:
-+			break;
-+		case ST7735_CMD:
-+			st7735_write_cmd(par,
-+				st7735_cfg_script[i].data & 0xff);
-+			break;
-+		case ST7735_DATA:
-+			st7735_write_data(par,
-+				st7735_cfg_script[i].data & 0xff);
-+			break;
-+		case ST7735_DELAY:
-+			mdelay(st7735_cfg_script[i].data);
-+			break;
-+		case ST7735_END:
-+			end_script = 1;
-+		}
-+		i++;
-+	} while (!end_script);
-+}
-+
-+static void st7735_set_addr_win(struct st7735fb_par *par,
-+				int xs, int ys, int xe, int ye)
-+{
-+	st7735_write_cmd(par, ST7735_CASET);
-+	st7735_write_data(par, 0x00);
-+	st7735_write_data(par, xs + par->xoff);
-+	st7735_write_data(par, 0x00);
-+	st7735_write_data(par, xe + par->xoff);
-+	st7735_write_cmd(par, ST7735_RASET);
-+	st7735_write_data(par, 0x00);
-+	st7735_write_data(par, ys + par->yoff);
-+	st7735_write_data(par, 0x00);
-+	st7735_write_data(par, ye + par->yoff);
-+}
-+
-+static void st7735_reset(struct st7735fb_par *par)
-+{
-+	/* Reset controller */
-+	gpio_set_value(par->rst, 0);
-+	udelay(10);
-+	gpio_set_value(par->rst, 1);
-+	mdelay(120);
-+}
-+
-+static void st7735fb_update_display(struct st7735fb_par *par)
-+{
-+	int ret = 0;
-+	u16 *vmem;
-+#ifdef __LITTLE_ENDIAN
-+	int i;
-+	u16 *vmem16 = (u16 *)par->info->screen_base;
-+	vmem = par->ssbuf;
-+
-+	for (i=0; i<WIDTH*HEIGHT*BPP/8/2; i++)
-+		vmem[i] = swab16(vmem16[i]);
-+#else
-+	vmem = (u16 *)par->info->screen_base;
-+#endif
-+
-+	mutex_lock(&(par->io_lock));
-+
-+	/* Set row/column data window */
-+	st7735_set_addr_win(par, 0, 0, WIDTH-1, HEIGHT-1);
-+
-+	/* Internal RAM write command */
-+	st7735_write_cmd(par, ST7735_RAMWR);
-+
-+	/* Blast framebuffer to ST7735 internal display RAM */
-+	ret = st7735_write_data_buf(par, (u8 *)vmem, WIDTH*HEIGHT*BPP/8);
-+	if (ret < 0)
-+		pr_err("%s: spi_write failed to update display buffer\n",
-+			par->info->fix.id);
-+
-+	mutex_unlock(&(par->io_lock));
-+}
-+
-+static int st7735fb_init_display(struct st7735fb_par *par)
-+{
-+	int ret = 0;
-+
-+        /* Request GPIOs and initialize to default values */
-+        ret = gpio_request_one(par->rst, GPIOF_OUT_INIT_HIGH,
-+			"ST7735 Reset Pin");
-+	if (ret < 0) {
-+		pr_err("%s: failed to claim reset pin\n", par->info->fix.id);
-+		goto out;
-+	}
-+        ret = gpio_request_one(par->dc, GPIOF_OUT_INIT_LOW,
-+			"ST7735 Data/Command Pin");
-+	if (ret < 0) {
-+		pr_err("%s: failed to claim data/command pin\n", par->info->fix.id);
-+		goto out;
-+	}
-+
-+	st7735_reset(par);
-+
-+	st7735_run_cfg_script(par);
-+
-+out:
-+	return ret;
-+}
-+
-+static void st7735fb_deferred_io(struct fb_info *info,
-+				struct list_head *pagelist)
-+{
-+	st7735fb_update_display(info->par);
-+}
-+
-+static void st7735fb_update_display_deferred(struct fb_info *info)
-+{
-+	struct fb_deferred_io *fbdefio = info->fbdefio;
-+
-+	schedule_delayed_work(&info->deferred_work, fbdefio->delay);
-+}
-+
-+static void st7735fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
-+{
-+	sys_fillrect(info, rect);
-+
-+	st7735fb_update_display_deferred(info);
-+}
-+
-+static void st7735fb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
-+{
-+	sys_copyarea(info, area);
-+
-+	st7735fb_update_display_deferred(info);
-+}
-+
-+static void st7735fb_imageblit(struct fb_info *info, const struct fb_image *image)
-+{
-+	sys_imageblit(info, image);
-+
-+	st7735fb_update_display_deferred(info);
-+}
-+
-+static ssize_t st7735fb_write(struct fb_info *info, const char __user *buf,
-+		size_t count, loff_t *ppos)
-+{
-+	unsigned long p = *ppos;
-+	void *dst;
-+	int err = 0;
-+	unsigned long total_size;
-+
-+	if (info->state != FBINFO_STATE_RUNNING)
-+		return -EPERM;
-+
-+	total_size = info->fix.smem_len;
-+
-+	if (p > total_size)
-+		return -EFBIG;
-+
-+	if (count > total_size) {
-+		err = -EFBIG;
-+		count = total_size;
-+	}
-+
-+	if (count + p > total_size) {
-+		if (!err)
-+			err = -ENOSPC;
-+
-+		count = total_size - p;
-+	}
-+
-+	dst = (void __force *) (info->screen_base + p);
-+
-+	if (copy_from_user(dst, buf, count))
-+		err = -EFAULT;
-+
-+	if  (!err)
-+		*ppos += count;
-+
-+	st7735fb_update_display_deferred(info);
-+
-+	return (err) ? err : count;
-+}
-+
-+static int st7735fb_setcolreg(unsigned regno, unsigned red, unsigned green,
-+				unsigned blue, unsigned transp,
-+				struct fb_info *info)
-+{
-+	if (regno >= MAX_PALETTE)
-+		return -EINVAL;
-+
-+	/* RGB565 */
-+	((u32*)(info->pseudo_palette))[regno] =
-+		((red & 0xf800) |
-+		((green & 0xfc00) >> 5) |
-+		((blue & 0xf800) >> 11));
-+
-+	return 0;
-+}
-+
-+static struct fb_ops st7735fb_ops = {
-+	.owner		= THIS_MODULE,
-+	.fb_read	= fb_sys_read,
-+	.fb_write	= st7735fb_write,
-+	.fb_fillrect	= st7735fb_fillrect,
-+	.fb_copyarea	= st7735fb_copyarea,
-+	.fb_imageblit	= st7735fb_imageblit,
-+	.fb_setcolreg	= st7735fb_setcolreg,
-+};
-+
-+static struct fb_deferred_io st7735fb_defio = {
-+	.delay		= HZ/20,
-+	.deferred_io	= st7735fb_deferred_io,
-+};
-+
-+static const struct spi_device_id st7735fb_device_id[] = {
-+	{
-+		.name = "tft-lcd-1.8-green",
-+		.driver_data = ST7735_AF_TFT18_GREEN,
-+	}, {
-+		.name = "tft-lcd-1.8-red",
-+		.driver_data = ST7735_AF_TFT18_RED,
-+	}, {
-+		/* sentinel */
-+	}
-+};
-+MODULE_DEVICE_TABLE(spi, st7735fb_device_id);
-+
-+static const struct of_device_id st7735fb_dt_ids[] = {
-+	{ .compatible = "adafruit,tft-lcd-1.8-green", .data = (void *) ST7735_AF_TFT18_GREEN, },
-+	{ .compatible = "adafruit,tft-lcd-1.8-red", .data = (void *) ST7735_AF_TFT18_RED, },
-+};
-+MODULE_DEVICE_TABLE(of, st7735fb_dt_ids);
-+
-+static int __devinit st7735fb_probe (struct spi_device *spi)
-+{
-+	int vmem_size = WIDTH*HEIGHT*BPP/8;
-+	u8 *vmem;
-+	struct fb_info *info;
-+	struct st7735fb_par *par;
-+	int retval = -ENOMEM;
-+	struct device_node *np = spi->dev.of_node;
-+	const struct spi_device_id *spi_id = spi_get_device_id(spi);
-+	struct pinctrl *pinctrl;
-+
-+	if (!spi_id) {
-+		dev_err(&spi->dev,
-+			"device id not supported!\n");
-+		return -EINVAL;
-+	}
-+
-+	pinctrl = devm_pinctrl_get_select_default(&spi->dev);
-+	if (IS_ERR(pinctrl))
-+		dev_warn(&spi->dev,
-+			"pins are not configured from the driver\n");
-+
-+#ifdef __LITTLE_ENDIAN
-+	vmem = (u8 *)vmalloc(vmem_size);
-+#else
-+	vmem = (u8 *)kmalloc(vmem_size, GFP_KERNEL);
-+#endif
-+	if (!vmem)
-+		return retval;
-+
-+	info = framebuffer_alloc(sizeof(struct st7735fb_par), &spi->dev);
-+	if (!info)
-+		goto fballoc_fail;
-+
-+	info->pseudo_palette = kmalloc(sizeof(u32)*MAX_PALETTE, GFP_KERNEL);
-+	if (!info->pseudo_palette) {
-+		goto palette_fail;
-+	}
-+
-+	info->screen_base = (u8 __force __iomem *)vmem;
-+	info->fbops = &st7735fb_ops;
-+	info->fix = st7735fb_fix;
-+	info->fix.smem_len = vmem_size;
-+	info->var = st7735fb_var;
-+	/* Choose any packed pixel format as long as it's RGB565 */
-+	info->var.red.offset = 11;
-+	info->var.red.length = 5;
-+	info->var.green.offset = 5;
-+	info->var.green.length = 6;
-+	info->var.blue.offset = 0;
-+	info->var.blue.length = 5;
-+	info->var.transp.offset = 0;
-+	info->var.transp.length = 0;
-+	info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
-+
-+	info->fbdefio = &st7735fb_defio;
-+	fb_deferred_io_init(info);
-+
-+	retval = fb_alloc_cmap(&info->cmap, MAX_PALETTE, 0);
-+	if (retval < 0)
-+		goto cmap_fail;
-+	info->cmap.len = MAX_PALETTE;
-+
-+	par = info->par;
-+	par->info = info;
-+	par->spi = spi;
-+
-+	mutex_init(&par->io_lock);
-+
-+	if (spi_id->driver_data == ST7735_AF_TFT18_GREEN) {
-+		par->xoff = 2;
-+		par->yoff = 1;
-+	} else {
-+		par->xoff = 0;
-+		par->yoff = 0;
-+	}
-+
-+	/* TODO: fix all exit paths for cleanup */
-+        par->rst = of_get_named_gpio(np, "st7735-rst", 0);
-+	if (par->rst < 0) {
-+		printk("failed to find st7735-rst node!\n");
-+		return -EINVAL;
-+	}
-+
-+        par->dc = of_get_named_gpio(np, "st7735-dc", 0);
-+	if (par->dc < 0) {
-+		printk("failed to find st7735-dc node!\n");
-+		return -EINVAL;
-+	}
-+
-+	par->buf = kmalloc(1, GFP_KERNEL);
-+	if (!par->buf) {
-+		retval = -ENOMEM;
-+		goto buf_fail;
-+	}
-+
-+#ifdef __LITTLE_ENDIAN
-+	/* Allocated swapped shadow buffer */
-+	par->ssbuf = kmalloc(vmem_size, GFP_KERNEL);
-+	if (!par->ssbuf) {
-+		retval = -ENOMEM;
-+		goto ssbuf_fail;
-+	}
-+#endif
-+
-+	retval = st7735fb_init_display(par);
-+	if (retval < 0)
-+		goto init_fail;
-+
-+	retval = register_framebuffer(info);
-+	if (retval < 0)
-+		goto fbreg_fail;
-+
-+	spi_set_drvdata(spi, info);
-+
-+	printk(KERN_INFO
-+		"fb%d: %s frame buffer device,\n\tusing %d KiB of video memory\n",
-+		info->node, info->fix.id, vmem_size);
-+
-+	return 0;
-+
-+
-+	spi_set_drvdata(spi, NULL);
-+
-+fbreg_fail:
-+	/* TODO: release gpios on fail */
-+	/* TODO: and unwind everything in init */
-+
-+init_fail:
-+#ifdef __LITTLE_ENDIAN
-+	kfree(par->ssbuf);
-+#endif
-+
-+ssbuf_fail:
-+	kfree(par->buf);
-+
-+buf_fail:
-+	fb_dealloc_cmap(&info->cmap);
-+
-+cmap_fail:
-+	kfree(info->pseudo_palette);
-+
-+palette_fail:
-+	framebuffer_release(info);
-+
-+fballoc_fail:
-+#ifdef __LITTLE_ENDIAN
-+	vfree(vmem);
-+#else
-+	kfree(vmem);
-+#endif
-+
-+	return retval;
-+}
-+
-+static int __devexit st7735fb_remove(struct spi_device *spi)
-+{
-+	struct fb_info *info = spi_get_drvdata(spi);
-+
-+	spi_set_drvdata(spi, NULL);
-+
-+	if (info) {
-+		unregister_framebuffer(info);
-+		fb_dealloc_cmap(&info->cmap);
-+		kfree(info->pseudo_palette);
-+		vfree(info->screen_base);
-+		framebuffer_release(info);
-+	}
-+
-+	/* TODO: release gpios */
-+
-+	return 0;
-+}
-+
-+static struct spi_driver st7735fb_driver = {
-+	.id_table = st7735fb_device_id,
-+	.driver = {
-+		.name   = "st7735",
-+		.owner  = THIS_MODULE,
-+		.of_match_table = st7735fb_dt_ids,
-+	},
-+	.probe  = st7735fb_probe,
-+	.remove = __devexit_p(st7735fb_remove),
-+};
-+
-+static int __init st7735fb_init(void)
-+{
-+	return spi_register_driver(&st7735fb_driver);
-+}
-+
-+static void __exit st7735fb_exit(void)
-+{
-+	spi_unregister_driver(&st7735fb_driver);
-+}
-+
-+/* ------------------------------------------------------------------------- */
-+
-+module_init(st7735fb_init);
-+module_exit(st7735fb_exit);
-+
-+MODULE_DESCRIPTION("FB driver for ST7735 display controller");
-+MODULE_AUTHOR("Matt Porter <matt@ohporter.com>");
-+MODULE_LICENSE("GPL");
-diff --git a/drivers/video/st7735fb.h b/drivers/video/st7735fb.h
-new file mode 100644
-index 0000000..0ce5c11
---- /dev/null
-+++ b/drivers/video/st7735fb.h
-@@ -0,0 +1,84 @@
-+/*
-+ * linux/include/video/st7735fb.h -- FB driver for ST7735 LCD controller
-+ *
-+ * Copyright (C) 2012, Matt Porter
-+ *
-+ * This file is subject to the terms and conditions of the GNU General Public
-+ * License. See the file COPYING in the main directory of this archive for
-+ * more details.
-+ */
-+
-+#define DRVNAME		"st7735fb"
-+#define WIDTH		128
-+#define HEIGHT		160
-+#define BPP		16
-+#define MAX_PALETTE	16
-+
-+/* Supported display modules */
-+#define ST7735_AF_TFT18_GREEN		0	/* Adafruit SPI TFT 1.8" - green tab */
-+#define ST7735_AF_TFT18_RED		1	/* Adafruit SPI TFT 1.8" - red tab */
-+
-+/* Init script function */
-+struct st7735_function {
-+	u16 cmd;
-+	u16 data;
-+};
-+
-+/* Init script commands */
-+enum st7735_cmd {
-+	ST7735_START,
-+	ST7735_END,
-+	ST7735_CMD,
-+	ST7735_DATA,
-+	ST7735_DELAY
-+};
-+
-+struct st7735fb_par {
-+	struct spi_device *spi;
-+	struct fb_info *info;
-+	struct mutex io_lock;
-+	int xoff;
-+	int yoff;
-+	int rst;
-+	int dc;
-+	u16 *ssbuf;
-+	u8 *buf;
-+};
-+
-+/* ST7735 Commands */
-+#define ST7735_NOP	0x0
-+#define ST7735_SWRESET	0x01
-+#define ST7735_RDDID	0x04
-+#define ST7735_RDDST	0x09
-+#define ST7735_SLPIN	0x10
-+#define ST7735_SLPOUT	0x11
-+#define ST7735_PTLON	0x12
-+#define ST7735_NORON	0x13
-+#define ST7735_INVOFF	0x20
-+#define ST7735_INVON	0x21
-+#define ST7735_DISPOFF	0x28
-+#define ST7735_DISPON	0x29
-+#define ST7735_CASET	0x2A
-+#define ST7735_RASET	0x2B
-+#define ST7735_RAMWR	0x2C
-+#define ST7735_RAMRD	0x2E
-+#define ST7735_COLMOD	0x3A
-+#define ST7735_MADCTL	0x36
-+#define ST7735_FRMCTR1	0xB1
-+#define ST7735_FRMCTR2	0xB2
-+#define ST7735_FRMCTR3	0xB3
-+#define ST7735_INVCTR	0xB4
-+#define ST7735_DISSET5	0xB6
-+#define ST7735_PWCTR1	0xC0
-+#define ST7735_PWCTR2	0xC1
-+#define ST7735_PWCTR3	0xC2
-+#define ST7735_PWCTR4	0xC3
-+#define ST7735_PWCTR5	0xC4
-+#define ST7735_VMCTR1	0xC5
-+#define ST7735_RDID1	0xDA
-+#define ST7735_RDID2	0xDB
-+#define ST7735_RDID3	0xDC
-+#define ST7735_RDID4	0xDD
-+#define ST7735_GMCTRP1	0xE0
-+#define ST7735_GMCTRN1	0xE1
-+#define ST7735_PWCTR6	0xFC
--- 
-1.7.10.4
-
diff --git a/patches/dma/0005-dmaengine-add-helper-function-to-request-a-slave-DMA.patch b/patches/dma/0005-dmaengine-add-helper-function-to-request-a-slave-DMA.patch
deleted file mode 100644
index 1c9604d2fc3648af1ce74c18c5de56ca4e0dc2f9..0000000000000000000000000000000000000000
--- a/patches/dma/0005-dmaengine-add-helper-function-to-request-a-slave-DMA.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 8ad87518807a2179ffec01f1ac4851377315839b Mon Sep 17 00:00:00 2001
-From: Jon Hunter <jon-hunter@ti.com>
-Date: Fri, 14 Sep 2012 17:41:57 -0500
-Subject: [PATCH 05/35] dmaengine: add helper function to request a slave DMA
- channel
-
-Currently slave DMA channels are requested by calling dma_request_channel()
-and requires DMA clients to pass various filter parameters to obtain the
-appropriate channel.
-
-With device-tree being used by architectures such as arm and the addition of
-device-tree helper functions to extract the relevant DMA client information
-from device-tree, add a new function to request a slave DMA channel using
-device-tree. This function is currently a simple wrapper that calls the
-device-tree of_dma_request_slave_channel() function.
-
-Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
-Cc: Benoit Cousson <b-cousson@ti.com>
-Cc: Stephen Warren <swarren@nvidia.com>
-Cc: Grant Likely <grant.likely@secretlab.ca>
-Cc: Russell King <linux@arm.linux.org.uk>
-Cc: Rob Herring <rob.herring@calxeda.com>
-Cc: Arnd Bergmann <arnd@arndb.de>
-Cc: Vinod Koul <vinod.koul@intel.com>
-Cc: Dan Williams <djbw@fb.com>
-
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Jon Hunter <jon-hunter@ti.com>
-Reviewed-by: Stephen Warren <swarren@wwwdotorg.org>
-Acked-by: Rob Herring <rob.herring@calxeda.com>
-Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
----
- drivers/dma/dmaengine.c   | 16 ++++++++++++++++
- include/linux/dmaengine.h |  6 ++++++
- 2 files changed, 22 insertions(+)
-
-diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
-index a815d44..d37cf95 100644
---- a/drivers/dma/dmaengine.c
-+++ b/drivers/dma/dmaengine.c
-@@ -62,6 +62,7 @@
- #include <linux/rculist.h>
- #include <linux/idr.h>
- #include <linux/slab.h>
-+#include <linux/of_dma.h>
- 
- static DEFINE_MUTEX(dma_list_mutex);
- static DEFINE_IDR(dma_idr);
-@@ -546,6 +547,21 @@ struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, v
- }
- EXPORT_SYMBOL_GPL(__dma_request_channel);
- 
-+/**
-+ * dma_request_slave_channel - try to allocate an exclusive slave channel
-+ * @dev:	pointer to client device structure
-+ * @name:	slave channel name
-+ */
-+struct dma_chan *dma_request_slave_channel(struct device *dev, char *name)
-+{
-+	/* If device-tree is present get slave info from here */
-+	if (dev->of_node)
-+		return of_dma_request_slave_channel(dev->of_node, name);
-+
-+	return NULL;
-+}
-+EXPORT_SYMBOL_GPL(dma_request_slave_channel);
-+
- void dma_release_channel(struct dma_chan *chan)
- {
- 	mutex_lock(&dma_list_mutex);
-diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
-index d3201e4..8cd0e25 100644
---- a/include/linux/dmaengine.h
-+++ b/include/linux/dmaengine.h
-@@ -974,6 +974,7 @@ enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
- enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);
- void dma_issue_pending_all(void);
- struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param);
-+struct dma_chan *dma_request_slave_channel(struct device *dev, char *name);
- void dma_release_channel(struct dma_chan *chan);
- #else
- static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
-@@ -988,6 +989,11 @@ static inline struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask,
- {
- 	return NULL;
- }
-+static inline struct dma_chan *dma_request_slave_channel(struct device *dev,
-+							 char *name)
-+{
-+	return NULL
-+}
- static inline void dma_release_channel(struct dma_chan *chan)
- {
- }
--- 
-1.8.1
-
diff --git a/patches/dma/0006-of-Add-generic-device-tree-DMA-helpers.patch b/patches/dma/0006-of-Add-generic-device-tree-DMA-helpers.patch
deleted file mode 100644
index df27165920fd76bfd7461f563db7070db05afbbc..0000000000000000000000000000000000000000
--- a/patches/dma/0006-of-Add-generic-device-tree-DMA-helpers.patch
+++ /dev/null
@@ -1,536 +0,0 @@
-From 778fef3c6c488010b1d2ba05cc422a5a349b6446 Mon Sep 17 00:00:00 2001
-From: Jon Hunter <jon-hunter@ti.com>
-Date: Fri, 14 Sep 2012 17:41:56 -0500
-Subject: [PATCH 06/35] of: Add generic device tree DMA helpers
-
-This is based upon the work by Benoit Cousson [1] and Nicolas Ferre [2]
-to add some basic helpers to retrieve a DMA controller device_node and the
-DMA request/channel information.
-
-Aim of DMA helpers
-- The purpose of device-tree is to describe the capabilites of the hardware.
-  Thinking about DMA controllers purely from the context of the hardware to
-  begin with, we can describe a device in terms of a DMA controller as
-  follows ...
-  	1. Number of DMA controllers
-	2. Number of channels (maybe physical or logical)
-	3. Mapping of DMA requests signals to DMA controller
-	4. Number of DMA interrupts
-	5. Mapping of DMA interrupts to channels
-- With the above in mind the aim of the DT DMA helper functions is to extract
-  the above information from the DT and provide to the appropriate driver.
-  However, due to the vast number of DMA controllers and not all are using a
-  common driver (such as DMA Engine) it has been seen that this is not a
-  trivial task. In previous discussions on this topic the following concerns
-  have been raised ...
-	1. How does the binding support devices with multiple DMA controllers?
-  	2. How to support both legacy DMA controllers not using DMA Engine as
-	   well as those that support DMA Engine.
-	3. When using with DMA Engine how do we support the various
-	   implementations where the opaque filter function parameter differs
-	   between implementations?
-	4. How do we handle DMA channels that are identified with a string
-	   versus a integer?
-- Hence the design of the DMA helpers has to accomodate the above or align on
-  an agreement what can be or should be supported.
-
-Design of DMA helpers
-
-1. Registering DMA controllers
-
-   In the case of DMA controllers that are using DMA Engine, requesting a
-   channel is performed by calling the following function.
-
-	struct dma_chan *dma_request_channel(dma_cap_mask_t mask,
-			dma_filter_fn filter_fn,
-			void *filter_param);
-
-   The mask variable is used to match a type of the device controller in a list
-   of controllers. The filter_fn and filter_param are used to identify the
-   required dma channel and return a handle to the dma channel of type dma_chan.
-
-   From the examples I have seen, the mask and filter_fn are constant
-   for a given DMA controller and therefore, we can specify these as controller
-   specific data when registering the DMA controller with the device-tree DMA
-   helpers.
-
-   The filter_param variable is of an unknown type and is typically specific
-   to the DMA engine implementation for a given DMA controller. To allow some
-   flexibility in the type and formating of this filter_param we employ an
-   xlate to translate the device-tree binding information into the appropriate
-   format. The xlate function used for a DMA controller can also be specified
-   when registering the DMA controller with the device-tree DMA helpers.
-
-   Based upon the above, a function for registering the DMA controller with the
-   DMA helpers now looks like the below. The data variable is used to pass a
-   pointer to DMA controller specific data used by the xlate function.
-
-	int of_dma_controller_register(struct device_node *np,
-		struct dma_chan *(*of_dma_xlate)
-		(struct of_phandle_args *, struct of_dma *),
-		void *data)
-
-   For example, in the case where DMA engine is used, we define the following
-   structure (that stores the DMA engine capability mask and filter function)
-   and pass this to the data variable in the above function.
-
-	struct of_dma_filter_info {
-		dma_cap_mask_t  dma_cap;
-		dma_filter_fn   filter_fn;
-	};
-
-2. Representing and requesting channel information
-
-   Please see the dma binding documentation included in this patch for a
-   description of how DMA controllers and client information should be
-   represented with device-tree. For more information on how this binding
-   came about please see [3]. In addition to this, feedback received from
-   the Linux kernel summit showed a consensus (among those who attended) to
-   use a name to identify DMA client information [4].
-
-   A DMA channel can be requested by calling the following function, where name
-   is a required parameter used for identifying a DMA channel. This function
-   has been designed to return a structure of type dma_chan to work with the
-   DMA engine driver. Note that if DMA engine is used then drivers should be
-   using the DMA engine API dma_request_slave_channel() (implemented in part 2
-   of this series, "dmaengine: add helper function to request a slave DMA
-   channel") which will in turn call the below function if device-tree is
-   present. The aim being to have a common DMA engine interface regardless of
-   whether device tree is being used.
-
-	struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
-						      char *name)
-
-3. Supporting legacy devices not using DMA Engine
-
-   These devices present a problem, as there may not be a uniform way to easily
-   support them with regard to device tree. Ideally, these should be migrated
-   to DMA engine. However, if this is not possible, then they should still be
-   able to use this binding, the only constaint imposed by this implementation
-   is that when requesting a DMA channel via of_dma_request_slave_channel(), it
-   will return a type of dma_chan.
-
-This implementation has been tested on OMAP4430 using the kernel v3.6-rc5. I
-have validated that MMC is working on the PANDA board with this implementation.
-My development branch for testing on OMAP can be found here [5].
-
-v6: - minor corrections in DMA binding documentation
-v5: - minor update to binding documentation
-    - added loop to exhaustively search for a slave channel in the case where
-      there could be alternative channels available
-v4: - revert the removal of xlate function from v3
-    - update the proposed binding format and APIs based upon discussions [3]
-v3: - avoid passing an xlate function and instead pass DMA engine parameters
-    - define number of dma channels and requests in dma-controller node
-v2: - remove of_dma_to_resource API
-    - make property #dma-cells required (no fallback anymore)
-    - another check in of_dma_xlate_onenumbercell() function
-
-[1] http://article.gmane.org/gmane.linux.drivers.devicetree/12022
-[2] http://article.gmane.org/gmane.linux.ports.arm.omap/73622
-[3] http://marc.info/?l=linux-omap&m=133582085008539&w=2
-[4] http://pad.linaro.org/arm-mini-summit-2012
-[5] https://github.com/jonhunter/linux/tree/dev-dt-dma
-
-Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
-Cc: Benoit Cousson <b-cousson@ti.com>
-Cc: Stephen Warren <swarren@nvidia.com>
-Cc: Grant Likely <grant.likely@secretlab.ca>
-Cc: Russell King <linux@arm.linux.org.uk>
-Cc: Rob Herring <rob.herring@calxeda.com>
-Cc: Arnd Bergmann <arnd@arndb.de>
-Cc: Vinod Koul <vinod.koul@intel.com>
-Cc: Dan Williams <djbw@fb.com>
-
-Reviewed-by: Arnd Bergmann <arnd@arndb.de>
-Reviewed-by: Nicolas Ferre <nicolas.ferre@atmel.com>
-Signed-off-by: Jon Hunter <jon-hunter@ti.com>
-Reviewed-by: Stephen Warren <swarren@wwwdotorg.org>
-Acked-by: Rob Herring <rob.herring@calxeda.com>
-Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
----
- Documentation/devicetree/bindings/dma/dma.txt |  81 ++++++++++
- drivers/of/Makefile                           |   2 +-
- drivers/of/dma.c                              | 219 ++++++++++++++++++++++++++
- include/linux/of_dma.h                        |  45 ++++++
- 4 files changed, 346 insertions(+), 1 deletion(-)
- create mode 100644 Documentation/devicetree/bindings/dma/dma.txt
- create mode 100644 drivers/of/dma.c
- create mode 100644 include/linux/of_dma.h
-
-diff --git a/Documentation/devicetree/bindings/dma/dma.txt b/Documentation/devicetree/bindings/dma/dma.txt
-new file mode 100644
-index 0000000..a4f59a5
---- /dev/null
-+++ b/Documentation/devicetree/bindings/dma/dma.txt
-@@ -0,0 +1,81 @@
-+* Generic DMA Controller and DMA request bindings
-+
-+Generic binding to provide a way for a driver using DMA Engine to retrieve the
-+DMA request or channel information that goes from a hardware device to a DMA
-+controller.
-+
-+
-+* DMA controller
-+
-+Required property:
-+- #dma-cells: 		Must be at least 1. Used to provide DMA controller
-+			specific information. See DMA client binding below for
-+			more details.
-+
-+Optional properties:
-+- #dma-channels: 	Number of DMA channels supported by the controller.
-+- #dma-requests: 	Number of DMA requests signals supported by the
-+			controller.
-+
-+Example:
-+
-+	dma: dma@48000000 {
-+		compatible = "ti,omap-sdma"
-+		reg = <0x48000000 0x1000>;
-+		interrupts = <0 12 0x4
-+			      0 13 0x4
-+			      0 14 0x4
-+			      0 15 0x4>;
-+		#dma-cells = <1>;
-+		#dma-channels = <32>;
-+		#dma-requests = <127>;
-+	};
-+
-+
-+* DMA client
-+
-+Client drivers should specify the DMA property using a phandle to the controller
-+followed by DMA controller specific data.
-+
-+Required property:
-+- dmas:			List of one or more DMA specifiers, each consisting of
-+			- A phandle pointing to DMA controller node
-+			- A number of integer cells, as determined by the
-+			  #dma-cells property in the node referenced by phandle
-+			  containing DMA controller specific information. This
-+			  typically contains a DMA request line number or a
-+			  channel number, but can contain any data that is used
-+			  required for configuring a channel.
-+- dma-names: 		Contains one identifier string for each DMA specifier in
-+			the dmas property. The specific strings that can be used
-+			are defined in the binding of the DMA client device.
-+			Multiple DMA specifiers can be used to represent
-+			alternatives and in this case the dma-names for those
-+			DMA specifiers must be identical (see examples).
-+
-+Examples:
-+
-+1. A device with one DMA read channel, one DMA write channel:
-+
-+	i2c1: i2c@1 {
-+		...
-+		dmas = <&dma 2		/* read channel */
-+			&dma 3>;	/* write channel */
-+		dma-names = "rx", "tx"
-+		...
-+	};
-+
-+2. A single read-write channel with three alternative DMA controllers:
-+
-+	dmas = <&dma1 5
-+		&dma2 7
-+		&dma3 2>;
-+	dma-names = "rx-tx", "rx-tx", "rx-tx"
-+
-+3. A device with three channels, one of which has two alternatives:
-+
-+	dmas = <&dma1 2			/* read channel */
-+		&dma1 3			/* write channel */
-+		&dma2 0			/* error read */
-+		&dma3 0>;		/* alternative error read */
-+	dma-names = "rx", "tx", "error", "error";
-diff --git a/drivers/of/Makefile b/drivers/of/Makefile
-index e027f44..eafa107 100644
---- a/drivers/of/Makefile
-+++ b/drivers/of/Makefile
-@@ -1,4 +1,4 @@
--obj-y = base.o
-+obj-y = base.o dma.o
- obj-$(CONFIG_OF_FLATTREE) += fdt.o
- obj-$(CONFIG_OF_PROMTREE) += pdt.o
- obj-$(CONFIG_OF_ADDRESS)  += address.o
-diff --git a/drivers/of/dma.c b/drivers/of/dma.c
-new file mode 100644
-index 0000000..19ad37c
---- /dev/null
-+++ b/drivers/of/dma.c
-@@ -0,0 +1,219 @@
-+/*
-+ * Device tree helpers for DMA request / controller
-+ *
-+ * Based on of_gpio.c
-+ *
-+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ */
-+
-+#include <linux/device.h>
-+#include <linux/err.h>
-+#include <linux/module.h>
-+#include <linux/rculist.h>
-+#include <linux/slab.h>
-+#include <linux/of.h>
-+#include <linux/of_dma.h>
-+
-+static LIST_HEAD(of_dma_list);
-+
-+/**
-+ * of_dma_find_controller - Find a DMA controller in DT DMA helpers list
-+ * @np:		device node of DMA controller
-+ */
-+static struct of_dma *of_dma_find_controller(struct device_node *np)
-+{
-+	struct of_dma *ofdma;
-+
-+	if (list_empty(&of_dma_list)) {
-+		pr_err("empty DMA controller list\n");
-+		return NULL;
-+	}
-+
-+	list_for_each_entry_rcu(ofdma, &of_dma_list, of_dma_controllers)
-+		if (ofdma->of_node == np)
-+			return ofdma;
-+
-+	return NULL;
-+}
-+
-+/**
-+ * of_dma_controller_register - Register a DMA controller to DT DMA helpers
-+ * @np:			device node of DMA controller
-+ * @of_dma_xlate:	translation function which converts a phandle
-+ *			arguments list into a dma_chan structure
-+ * @data		pointer to controller specific data to be used by
-+ *			translation function
-+ *
-+ * Returns 0 on success or appropriate errno value on error.
-+ *
-+ * Allocated memory should be freed with appropriate of_dma_controller_free()
-+ * call.
-+ */
-+int of_dma_controller_register(struct device_node *np,
-+				struct dma_chan *(*of_dma_xlate)
-+				(struct of_phandle_args *, struct of_dma *),
-+				void *data)
-+{
-+	struct of_dma	*ofdma;
-+	int		nbcells;
-+
-+	if (!np || !of_dma_xlate) {
-+		pr_err("%s: not enough information provided\n", __func__);
-+		return -EINVAL;
-+	}
-+
-+	ofdma = kzalloc(sizeof(*ofdma), GFP_KERNEL);
-+	if (!ofdma)
-+		return -ENOMEM;
-+
-+	nbcells = be32_to_cpup(of_get_property(np, "#dma-cells", NULL));
-+	if (!nbcells) {
-+		pr_err("%s: #dma-cells property is missing or invalid\n",
-+		       __func__);
-+		return -EINVAL;
-+	}
-+
-+	ofdma->of_node = np;
-+	ofdma->of_dma_nbcells = nbcells;
-+	ofdma->of_dma_xlate = of_dma_xlate;
-+	ofdma->of_dma_data = data;
-+
-+	/* Now queue of_dma controller structure in list */
-+	list_add_tail_rcu(&ofdma->of_dma_controllers, &of_dma_list);
-+
-+	return 0;
-+}
-+EXPORT_SYMBOL_GPL(of_dma_controller_register);
-+
-+/**
-+ * of_dma_controller_free - Remove a DMA controller from DT DMA helpers list
-+ * @np:		device node of DMA controller
-+ *
-+ * Memory allocated by of_dma_controller_register() is freed here.
-+ */
-+void of_dma_controller_free(struct device_node *np)
-+{
-+	struct of_dma *ofdma;
-+
-+	ofdma = of_dma_find_controller(np);
-+	if (ofdma) {
-+		list_del_rcu(&ofdma->of_dma_controllers);
-+		kfree(ofdma);
-+	}
-+}
-+EXPORT_SYMBOL_GPL(of_dma_controller_free);
-+
-+/**
-+ * of_dma_find_channel - Find a DMA channel by name
-+ * @np:		device node to look for DMA channels
-+ * @name:	name of desired channel
-+ * @dma_spec:	pointer to DMA specifier as found in the device tree
-+ *
-+ * Find a DMA channel by the name. Returns 0 on success or appropriate
-+ * errno value on error.
-+ */
-+static int of_dma_find_channel(struct device_node *np, char *name,
-+			       struct of_phandle_args *dma_spec)
-+{
-+	int count, i;
-+	const char *s;
-+
-+	count = of_property_count_strings(np, "dma-names");
-+	if (count < 0)
-+		return count;
-+
-+	for (i = 0; i < count; i++) {
-+		if (of_property_read_string_index(np, "dma-names", i, &s))
-+			continue;
-+
-+		if (strcmp(name, s))
-+			continue;
-+
-+		if (!of_parse_phandle_with_args(np, "dmas", "#dma-cells", i,
-+						dma_spec))
-+			return 0;
-+	}
-+
-+	return -ENODEV;
-+}
-+
-+/**
-+ * of_dma_request_slave_channel - Get the DMA slave channel
-+ * @np:		device node to get DMA request from
-+ * @name:	name of desired channel
-+ *
-+ * Returns pointer to appropriate dma channel on success or NULL on error.
-+ */
-+struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
-+					      char *name)
-+{
-+	struct of_phandle_args	dma_spec;
-+	struct of_dma		*ofdma;
-+	struct dma_chan		*chan;
-+	int			r;
-+
-+	if (!np || !name) {
-+		pr_err("%s: not enough information provided\n", __func__);
-+		return NULL;
-+	}
-+
-+	do {
-+		r = of_dma_find_channel(np, name, &dma_spec);
-+		if (r) {
-+			pr_err("%s: can't find DMA channel\n", np->full_name);
-+			return NULL;
-+		}
-+
-+		ofdma = of_dma_find_controller(dma_spec.np);
-+		if (!ofdma) {
-+			pr_debug("%s: can't find DMA controller %s\n",
-+				 np->full_name, dma_spec.np->full_name);
-+			continue;
-+		}
-+
-+		if (dma_spec.args_count != ofdma->of_dma_nbcells) {
-+			pr_debug("%s: wrong #dma-cells for %s\n", np->full_name,
-+				 dma_spec.np->full_name);
-+			continue;
-+		}
-+
-+		chan = ofdma->of_dma_xlate(&dma_spec, ofdma);
-+
-+		of_node_put(dma_spec.np);
-+
-+	} while (!chan);
-+
-+	return chan;
-+}
-+
-+/**
-+ * of_dma_simple_xlate - Simple DMA engine translation function
-+ * @dma_spec:	pointer to DMA specifier as found in the device tree
-+ * @of_dma:	pointer to DMA controller data
-+ *
-+ * A simple translation function for devices that use a 32-bit value for the
-+ * filter_param when calling the DMA engine dma_request_channel() function.
-+ * Note that this translation function requires that #dma-cells is equal to 1
-+ * and the argument of the dma specifier is the 32-bit filter_param. Returns
-+ * pointer to appropriate dma channel on success or NULL on error.
-+ */
-+struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec,
-+						struct of_dma *ofdma)
-+{
-+	int count = dma_spec->args_count;
-+	struct of_dma_filter_info *info = ofdma->of_dma_data;
-+
-+	if (!info || !info->filter_fn)
-+		return NULL;
-+
-+	if (count != 1)
-+		return NULL;
-+
-+	return dma_request_channel(info->dma_cap, info->filter_fn,
-+			&dma_spec->args[0]);
-+}
-+EXPORT_SYMBOL_GPL(of_dma_simple_xlate);
-diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h
-new file mode 100644
-index 0000000..337823d
---- /dev/null
-+++ b/include/linux/of_dma.h
-@@ -0,0 +1,45 @@
-+/*
-+ * OF helpers for DMA request / controller
-+ *
-+ * Based on of_gpio.h
-+ *
-+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ */
-+
-+#ifndef __LINUX_OF_DMA_H
-+#define __LINUX_OF_DMA_H
-+
-+#include <linux/of.h>
-+#include <linux/dmaengine.h>
-+
-+struct device_node;
-+
-+struct of_dma {
-+	struct list_head	of_dma_controllers;
-+	struct device_node	*of_node;
-+	int			of_dma_nbcells;
-+	struct dma_chan		*(*of_dma_xlate)
-+				(struct of_phandle_args *, struct of_dma *);
-+	void			*of_dma_data;
-+};
-+
-+struct of_dma_filter_info {
-+	dma_cap_mask_t	dma_cap;
-+	dma_filter_fn	filter_fn;
-+};
-+
-+extern int of_dma_controller_register(struct device_node *np,
-+		struct dma_chan *(*of_dma_xlate)
-+		(struct of_phandle_args *, struct of_dma *),
-+		void *data);
-+extern void of_dma_controller_free(struct device_node *np);
-+extern struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
-+						     char *name);
-+extern struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec,
-+		struct of_dma *ofdma);
-+
-+#endif /* __LINUX_OF_DMA_H */
--- 
-1.8.1
-
diff --git a/patches/dma/0007-of-dma-fix-build-break-for-CONFIG_OF.patch b/patches/dma/0007-of-dma-fix-build-break-for-CONFIG_OF.patch
deleted file mode 100644
index f0019dc91cfcfe3d760a4344cfedfea78cb01e6b..0000000000000000000000000000000000000000
--- a/patches/dma/0007-of-dma-fix-build-break-for-CONFIG_OF.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 03b6873d193e528fb8c22aaa6c0aee0ed0d63aa7 Mon Sep 17 00:00:00 2001
-From: Vinod Koul <vinod.koul@linux.intel.com>
-Date: Tue, 25 Sep 2012 09:57:36 +0530
-Subject: [PATCH 07/35] of: dma- fix build break for !CONFIG_OF
-
-Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
----
- include/linux/of_dma.h | 27 +++++++++++++++++++++++++++
- 1 file changed, 27 insertions(+)
-
-diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h
-index 337823d..67158dd 100644
---- a/include/linux/of_dma.h
-+++ b/include/linux/of_dma.h
-@@ -32,6 +32,7 @@ struct of_dma_filter_info {
- 	dma_filter_fn	filter_fn;
- };
- 
-+#ifdef CONFIG_OF
- extern int of_dma_controller_register(struct device_node *np,
- 		struct dma_chan *(*of_dma_xlate)
- 		(struct of_phandle_args *, struct of_dma *),
-@@ -41,5 +42,31 @@ extern struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
- 						     char *name);
- extern struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec,
- 		struct of_dma *ofdma);
-+#else
-+static int of_dma_controller_register(struct device_node *np,
-+		struct dma_chan *(*of_dma_xlate)
-+		(struct of_phandle_args *, struct of_dma *),
-+		void *data)
-+{
-+	return -ENODEV;
-+}
-+
-+static void of_dma_controller_free(struct device_node *np)
-+{
-+}
-+
-+static struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
-+						     char *name)
-+{
-+	return NULL;
-+}
-+
-+static struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec,
-+		struct of_dma *ofdma)
-+{
-+	return NULL;
-+}
-+
-+#endif
- 
- #endif /* __LINUX_OF_DMA_H */
--- 
-1.8.1
-
diff --git a/patches/dma/0008-of-dma-fix-typos-in-generic-dma-binding-definition.patch b/patches/dma/0008-of-dma-fix-typos-in-generic-dma-binding-definition.patch
deleted file mode 100644
index 2f48c8f77cb231f5cc8ef27d2701dea8379d704a..0000000000000000000000000000000000000000
--- a/patches/dma/0008-of-dma-fix-typos-in-generic-dma-binding-definition.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 43432be0ba16e3c044411252de4edb4ce054666b Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Wed, 19 Sep 2012 10:49:48 -0400
-Subject: [PATCH 08/35] of: dma: fix typos in generic dma binding definition
-
-Some semicolons were left out in the examples.
-
-The #dma-channels and #dma-requests properties have a prefix
-that is, by convention, reserved for cell size properties.
-Rename those properties to dma-channels and dma-requests.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-Acked-by: Jon Hunter <jon-hunter@ti.com>
-Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
----
- Documentation/devicetree/bindings/dma/dma.txt | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/Documentation/devicetree/bindings/dma/dma.txt b/Documentation/devicetree/bindings/dma/dma.txt
-index a4f59a5..8f504e6 100644
---- a/Documentation/devicetree/bindings/dma/dma.txt
-+++ b/Documentation/devicetree/bindings/dma/dma.txt
-@@ -13,22 +13,22 @@ Required property:
- 			more details.
- 
- Optional properties:
--- #dma-channels: 	Number of DMA channels supported by the controller.
--- #dma-requests: 	Number of DMA requests signals supported by the
-+- dma-channels: 	Number of DMA channels supported by the controller.
-+- dma-requests: 	Number of DMA requests signals supported by the
- 			controller.
- 
- Example:
- 
- 	dma: dma@48000000 {
--		compatible = "ti,omap-sdma"
-+		compatible = "ti,omap-sdma";
- 		reg = <0x48000000 0x1000>;
- 		interrupts = <0 12 0x4
- 			      0 13 0x4
- 			      0 14 0x4
- 			      0 15 0x4>;
- 		#dma-cells = <1>;
--		#dma-channels = <32>;
--		#dma-requests = <127>;
-+		dma-channels = <32>;
-+		dma-requests = <127>;
- 	};
- 
- 
-@@ -61,7 +61,7 @@ Examples:
- 		...
- 		dmas = <&dma 2		/* read channel */
- 			&dma 3>;	/* write channel */
--		dma-names = "rx", "tx"
-+		dma-names = "rx", "tx";
- 		...
- 	};
- 
-@@ -70,7 +70,7 @@ Examples:
- 	dmas = <&dma1 5
- 		&dma2 7
- 		&dma3 2>;
--	dma-names = "rx-tx", "rx-tx", "rx-tx"
-+	dma-names = "rx-tx", "rx-tx", "rx-tx";
- 
- 3. A device with three channels, one of which has two alternatives:
- 
--- 
-1.8.1
-
diff --git a/patches/dma/0009-dmaengine-fix-build-failure-due-to-missing-semi-colo.patch b/patches/dma/0009-dmaengine-fix-build-failure-due-to-missing-semi-colo.patch
deleted file mode 100644
index 1e4cc187ccb83b041d4dc3fba39183a6bc029019..0000000000000000000000000000000000000000
--- a/patches/dma/0009-dmaengine-fix-build-failure-due-to-missing-semi-colo.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From be01b5f2ccdb0bfdd5b01ad1fbda0e422d768129 Mon Sep 17 00:00:00 2001
-From: Vinod Koul <vinod.koul@linux.intel.com>
-Date: Tue, 25 Sep 2012 16:18:55 +0530
-Subject: [PATCH 09/35] dmaengine: fix build failure due to missing semi-colon
-
-Reported-by: Fengguang Wu <fengguang.wu@intel.com>
-Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
----
- include/linux/dmaengine.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
-index 8cd0e25..c88f302 100644
---- a/include/linux/dmaengine.h
-+++ b/include/linux/dmaengine.h
-@@ -992,7 +992,7 @@ static inline struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask,
- static inline struct dma_chan *dma_request_slave_channel(struct device *dev,
- 							 char *name)
- {
--	return NULL
-+	return NULL;
- }
- static inline void dma_release_channel(struct dma_chan *chan)
- {
--- 
-1.8.1
-
diff --git a/patches/dma/0010-dmaengine-edma-fix-slave-config-dependency-on-direct.patch b/patches/dma/0010-dmaengine-edma-fix-slave-config-dependency-on-direct.patch
deleted file mode 100644
index 730933315c15b622d7400a762c0dec075cf67bf6..0000000000000000000000000000000000000000
--- a/patches/dma/0010-dmaengine-edma-fix-slave-config-dependency-on-direct.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-From 07d0f51466177e528cbb21d7436239561e4191e3 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Tue, 18 Sep 2012 18:57:15 +0000
-Subject: [PATCH 10/35] dmaengine: edma: fix slave config dependency on
- direction
-
-The edma_slave_config() implementation depends on the
-direction field such that it will not properly configure
-a slave channel when called without direction set.
-
-This fixes the implementation so that the slave config
-is copied as is and prep_slave_sg() handles the
-direction dependent handling. spi-omap2-mcspi and
-omap_hsmmc both expose this bug as they configure the
-slave channel config from a common path with an unconfigured
-direction field.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- drivers/dma/edma.c | 55 +++++++++++++++++++++++++++---------------------------
- 1 file changed, 27 insertions(+), 28 deletions(-)
-
-diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
-index f424298..06ea4b8 100644
---- a/drivers/dma/edma.c
-+++ b/drivers/dma/edma.c
-@@ -69,9 +69,7 @@ struct edma_chan {
- 	int				ch_num;
- 	bool				alloced;
- 	int				slot[EDMA_MAX_SLOTS];
--	dma_addr_t			addr;
--	int				addr_width;
--	int				maxburst;
-+	struct dma_slave_config		cfg;
- };
- 
- struct edma_cc {
-@@ -178,29 +176,14 @@ static int edma_terminate_all(struct edma_chan *echan)
- 	return 0;
- }
- 
--
- static int edma_slave_config(struct edma_chan *echan,
--	struct dma_slave_config *config)
-+	struct dma_slave_config *cfg)
- {
--	if ((config->src_addr_width > DMA_SLAVE_BUSWIDTH_4_BYTES) ||
--	    (config->dst_addr_width > DMA_SLAVE_BUSWIDTH_4_BYTES))
-+	if (cfg->src_addr_width == DMA_SLAVE_BUSWIDTH_8_BYTES ||
-+	    cfg->dst_addr_width == DMA_SLAVE_BUSWIDTH_8_BYTES)
- 		return -EINVAL;
- 
--	if (config->direction == DMA_MEM_TO_DEV) {
--		if (config->dst_addr)
--			echan->addr = config->dst_addr;
--		if (config->dst_addr_width)
--			echan->addr_width = config->dst_addr_width;
--		if (config->dst_maxburst)
--			echan->maxburst = config->dst_maxburst;
--	} else if (config->direction == DMA_DEV_TO_MEM) {
--		if (config->src_addr)
--			echan->addr = config->src_addr;
--		if (config->src_addr_width)
--			echan->addr_width = config->src_addr_width;
--		if (config->src_maxburst)
--			echan->maxburst = config->src_maxburst;
--	}
-+	memcpy(&echan->cfg, cfg, sizeof(echan->cfg));
- 
- 	return 0;
- }
-@@ -235,6 +218,9 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
- 	struct edma_chan *echan = to_edma_chan(chan);
- 	struct device *dev = chan->device->dev;
- 	struct edma_desc *edesc;
-+	dma_addr_t dev_addr;
-+	enum dma_slave_buswidth dev_width;
-+	u32 burst;
- 	struct scatterlist *sg;
- 	int i;
- 	int acnt, bcnt, ccnt, src, dst, cidx;
-@@ -243,7 +229,20 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
- 	if (unlikely(!echan || !sgl || !sg_len))
- 		return NULL;
- 
--	if (echan->addr_width == DMA_SLAVE_BUSWIDTH_UNDEFINED) {
-+	if (direction == DMA_DEV_TO_MEM) {
-+		dev_addr = echan->cfg.src_addr;
-+		dev_width = echan->cfg.src_addr_width;
-+		burst = echan->cfg.src_maxburst;
-+	} else if (direction == DMA_MEM_TO_DEV) {
-+		dev_addr = echan->cfg.dst_addr;
-+		dev_width = echan->cfg.dst_addr_width;
-+		burst = echan->cfg.dst_maxburst;
-+	} else {
-+		dev_err(dev, "%s: bad direction?\n", __func__);
-+		return NULL;
-+	}
-+
-+	if (dev_width == DMA_SLAVE_BUSWIDTH_UNDEFINED) {
- 		dev_err(dev, "Undefined slave buswidth\n");
- 		return NULL;
- 	}
-@@ -275,14 +274,14 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
- 			}
- 		}
- 
--		acnt = echan->addr_width;
-+		acnt = dev_width;
- 
- 		/*
- 		 * If the maxburst is equal to the fifo width, use
- 		 * A-synced transfers. This allows for large contiguous
- 		 * buffer transfers using only one PaRAM set.
- 		 */
--		if (echan->maxburst == 1) {
-+		if (burst == 1) {
- 			edesc->absync = false;
- 			ccnt = sg_dma_len(sg) / acnt / (SZ_64K - 1);
- 			bcnt = sg_dma_len(sg) / acnt - ccnt * (SZ_64K - 1);
-@@ -302,7 +301,7 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
- 		 */
- 		} else {
- 			edesc->absync = true;
--			bcnt = echan->maxburst;
-+			bcnt = burst;
- 			ccnt = sg_dma_len(sg) / (acnt * bcnt);
- 			if (ccnt > (SZ_64K - 1)) {
- 				dev_err(dev, "Exceeded max SG segment size\n");
-@@ -313,13 +312,13 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
- 
- 		if (direction == DMA_MEM_TO_DEV) {
- 			src = sg_dma_address(sg);
--			dst = echan->addr;
-+			dst = dev_addr;
- 			src_bidx = acnt;
- 			src_cidx = cidx;
- 			dst_bidx = 0;
- 			dst_cidx = 0;
- 		} else {
--			src = echan->addr;
-+			src = dev_addr;
- 			dst = sg_dma_address(sg);
- 			src_bidx = 0;
- 			src_cidx = 0;
--- 
-1.8.1
-
diff --git a/patches/dma/0011-dmaengine-add-dma_get_channel_caps.patch b/patches/dma/0011-dmaengine-add-dma_get_channel_caps.patch
deleted file mode 100644
index 0e17f1dfe3c28f141a0d6ec2ea8d4cdd834993f5..0000000000000000000000000000000000000000
--- a/patches/dma/0011-dmaengine-add-dma_get_channel_caps.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From 666f679c08e4f41faf0891026518e0fc91a2fe5d Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Thu, 18 Oct 2012 21:07:28 -0400
-Subject: [PATCH 11/35] dmaengine: add dma_get_channel_caps()
-
-Add a dmaengine API to retrieve per channel capabilities.
-Currently, only channel ops and SG segment limitations are
-implemented caps.
-
-The API is optionally implemented by drivers and when
-unimplemented will return a NULL pointer. It is intended
-to be executed after a channel has been requested and, if
-the channel is intended to be used with slave SG transfers,
-then it may only be called after dmaengine_slave_config()
-has executed. The slave driver provides parameters such as
-burst size and address width which may be necessary for
-the dmaengine driver to use in order to properly return SG
-segment limit caps.
-
-Suggested-by: Vinod Koul <vinod.koul@intel.com>
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- include/linux/dmaengine.h | 40 ++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 40 insertions(+)
-
-diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
-index c88f302..9fd0c5b 100644
---- a/include/linux/dmaengine.h
-+++ b/include/linux/dmaengine.h
-@@ -371,6 +371,26 @@ struct dma_slave_config {
- 	unsigned int slave_id;
- };
- 
-+/* struct dmaengine_chan_caps - expose capability of a channel
-+ * Note: each channel can have same or different capabilities
-+ *
-+ * This primarily classifies capabilities into
-+ * a) APIs/ops supported
-+ * b) channel physical capabilities
-+ *
-+ * @cap_mask: api/ops capability (DMA_INTERRUPT and DMA_PRIVATE
-+ *	       are invalid api/ops and will never be set)
-+ * @seg_nr: maximum number of SG segments supported on a SG/SLAVE
-+ *	    channel (0 for no maximum or not a SG/SLAVE channel)
-+ * @seg_len: maximum length of SG segments supported on a SG/SLAVE
-+ *	     channel (0 for no maximum or not a SG/SLAVE channel)
-+ */
-+struct dmaengine_chan_caps {
-+	dma_cap_mask_t cap_mask;
-+	int seg_nr;
-+	int seg_len;
-+};
-+
- static inline const char *dma_chan_name(struct dma_chan *chan)
- {
- 	return dev_name(&chan->dev->device);
-@@ -534,6 +554,7 @@ struct dma_tx_state {
-  *	struct with auxiliary transfer status information, otherwise the call
-  *	will just return a simple status code
-  * @device_issue_pending: push pending transactions to hardware
-+ * @device_channel_caps: return the channel capabilities
-  */
- struct dma_device {
- 
-@@ -602,6 +623,8 @@ struct dma_device {
- 					    dma_cookie_t cookie,
- 					    struct dma_tx_state *txstate);
- 	void (*device_issue_pending)(struct dma_chan *chan);
-+	struct dmaengine_chan_caps *(*device_channel_caps)(
-+		struct dma_chan *chan, enum dma_transfer_direction direction);
- };
- 
- static inline int dmaengine_device_control(struct dma_chan *chan,
-@@ -969,6 +992,23 @@ dma_set_tx_state(struct dma_tx_state *st, dma_cookie_t last, dma_cookie_t used,
- 	}
- }
- 
-+/**
-+ * dma_get_channel_caps - flush pending transactions to HW
-+ * @chan: target DMA channel
-+ * @dir: direction of transfer
-+ *
-+ * Get the channel-specific capabilities. If the dmaengine
-+ * driver does not implement per channel capbilities then
-+ * NULL is returned.
-+ */
-+static inline struct dmaengine_chan_caps
-+*dma_get_channel_caps(struct dma_chan *chan, enum dma_transfer_direction dir)
-+{
-+	if (chan->device->device_channel_caps)
-+		return chan->device->device_channel_caps(chan, dir);
-+	return NULL;
-+}
-+
- enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
- #ifdef CONFIG_DMA_ENGINE
- enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);
--- 
-1.8.1
-
diff --git a/patches/dma/0012-dma-edma-add-device_channel_caps-support.patch b/patches/dma/0012-dma-edma-add-device_channel_caps-support.patch
deleted file mode 100644
index 40c182ff71a07c9a2f92f9e1d2e09cb746784016..0000000000000000000000000000000000000000
--- a/patches/dma/0012-dma-edma-add-device_channel_caps-support.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 9f8ab54dbe43320aa8feafdbb3021e5ae7da7ff8 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Thu, 18 Oct 2012 21:08:59 -0400
-Subject: [PATCH 12/35] dma: edma: add device_channel_caps() support
-
-Implement device_channel_caps().
-
-EDMA has a finite set of PaRAM slots available for linking
-a multi-segment SG transfer. In order to prevent any one
-channel from consuming all PaRAM slots to fulfill a large SG
-transfer, the driver reports a static per-channel max number
-of SG segments it will handle.
-
-The maximum size of SG segment is limited by the slave config
-maxburst and addr_width for the channel in question. These values
-are used from the current channel config to calculate and return
-the max segment length cap.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- drivers/dma/edma.c | 27 +++++++++++++++++++++++++++
- 1 file changed, 27 insertions(+)
-
-diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
-index 06ea4b8..023c8f2 100644
---- a/drivers/dma/edma.c
-+++ b/drivers/dma/edma.c
-@@ -70,6 +70,7 @@ struct edma_chan {
- 	bool				alloced;
- 	int				slot[EDMA_MAX_SLOTS];
- 	struct dma_slave_config		cfg;
-+	struct dmaengine_chan_caps	caps;
- };
- 
- struct edma_cc {
-@@ -462,6 +463,28 @@ static void edma_issue_pending(struct dma_chan *chan)
- 	spin_unlock_irqrestore(&echan->vchan.lock, flags);
- }
- 
-+static struct dmaengine_chan_caps
-+*edma_get_channel_caps(struct dma_chan *chan, enum dma_transfer_direction dir)
-+{
-+	struct edma_chan *echan;
-+	enum dma_slave_buswidth width = 0;
-+	u32 burst = 0;
-+
-+	if (chan) {
-+		echan = to_edma_chan(chan);
-+		if (dir == DMA_MEM_TO_DEV) {
-+			width = echan->cfg.dst_addr_width;
-+			burst = echan->cfg.dst_maxburst;
-+		} else if (dir == DMA_DEV_TO_MEM) {
-+			width = echan->cfg.src_addr_width;
-+			burst = echan->cfg.src_maxburst;
-+		}
-+		echan->caps.seg_len = (SZ_64K - 1) * width * burst;
-+		return &echan->caps;
-+	}
-+	return NULL;
-+}
-+
- static size_t edma_desc_size(struct edma_desc *edesc)
- {
- 	int i;
-@@ -521,6 +544,9 @@ static void __init edma_chan_init(struct edma_cc *ecc,
- 		echan->ch_num = EDMA_CTLR_CHAN(ecc->ctlr, i);
- 		echan->ecc = ecc;
- 		echan->vchan.desc_free = edma_desc_free;
-+		dma_cap_set(DMA_SLAVE, echan->caps.cap_mask);
-+		dma_cap_set(DMA_SG, echan->caps.cap_mask);
-+		echan->caps.seg_nr = MAX_NR_SG;
- 
- 		vchan_init(&echan->vchan, dma);
- 
-@@ -537,6 +563,7 @@ static void edma_dma_init(struct edma_cc *ecc, struct dma_device *dma,
- 	dma->device_alloc_chan_resources = edma_alloc_chan_resources;
- 	dma->device_free_chan_resources = edma_free_chan_resources;
- 	dma->device_issue_pending = edma_issue_pending;
-+	dma->device_channel_caps = edma_get_channel_caps;
- 	dma->device_tx_status = edma_tx_status;
- 	dma->device_control = edma_control;
- 	dma->dev = dev;
--- 
-1.8.1
-
diff --git a/patches/dma/0013-mmc-davinci-get-SG-segment-limits-with-dma_get_chann.patch b/patches/dma/0013-mmc-davinci-get-SG-segment-limits-with-dma_get_chann.patch
deleted file mode 100644
index cde7a8423c7d8749a4550f2a64f1a9f4cb39f359..0000000000000000000000000000000000000000
--- a/patches/dma/0013-mmc-davinci-get-SG-segment-limits-with-dma_get_chann.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-From bbd5259b2f6360c2c3fe6c109a4d3f5b7c214a6f Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Thu, 18 Oct 2012 21:10:47 -0400
-Subject: [PATCH 13/35] mmc: davinci: get SG segment limits with
- dma_get_channel_caps()
-
-Replace the hardcoded values used to set max_segs/max_seg_size with
-a dma_get_channel_caps() query to the dmaengine driver.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- drivers/mmc/host/davinci_mmc.c            | 66 ++++++++++---------------------
- include/linux/platform_data/mmc-davinci.h |  3 --
- 2 files changed, 21 insertions(+), 48 deletions(-)
-
-diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
-index 2063677..17e186d 100644
---- a/drivers/mmc/host/davinci_mmc.c
-+++ b/drivers/mmc/host/davinci_mmc.c
-@@ -144,18 +144,6 @@
- /* MMCSD Init clock in Hz in opendrain mode */
- #define MMCSD_INIT_CLOCK		200000
- 
--/*
-- * One scatterlist dma "segment" is at most MAX_CCNT rw_threshold units,
-- * and we handle up to MAX_NR_SG segments.  MMC_BLOCK_BOUNCE kicks in only
-- * for drivers with max_segs == 1, making the segments bigger (64KB)
-- * than the page or two that's otherwise typical. nr_sg (passed from
-- * platform data) == 16 gives at least the same throughput boost, using
-- * EDMA transfer linkage instead of spending CPU time copying pages.
-- */
--#define MAX_CCNT	((1 << 16) - 1)
--
--#define MAX_NR_SG	16
--
- static unsigned rw_threshold = 32;
- module_param(rw_threshold, uint, S_IRUGO);
- MODULE_PARM_DESC(rw_threshold,
-@@ -216,8 +204,6 @@ struct mmc_davinci_host {
- 	u8 version;
- 	/* for ns in one cycle calculation */
- 	unsigned ns_in_one_cycle;
--	/* Number of sg segments */
--	u8 nr_sg;
- #ifdef CONFIG_CPU_FREQ
- 	struct notifier_block	freq_transition;
- #endif
-@@ -421,16 +407,7 @@ static int mmc_davinci_send_dma_request(struct mmc_davinci_host *host,
- 	int ret = 0;
- 
- 	if (host->data_dir == DAVINCI_MMC_DATADIR_WRITE) {
--		struct dma_slave_config dma_tx_conf = {
--			.direction = DMA_MEM_TO_DEV,
--			.dst_addr = host->mem_res->start + DAVINCI_MMCDXR,
--			.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
--			.dst_maxburst =
--				rw_threshold / DMA_SLAVE_BUSWIDTH_4_BYTES,
--		};
- 		chan = host->dma_tx;
--		dmaengine_slave_config(host->dma_tx, &dma_tx_conf);
--
- 		desc = dmaengine_prep_slave_sg(host->dma_tx,
- 				data->sg,
- 				host->sg_len,
-@@ -443,16 +420,7 @@ static int mmc_davinci_send_dma_request(struct mmc_davinci_host *host,
- 			goto out;
- 		}
- 	} else {
--		struct dma_slave_config dma_rx_conf = {
--			.direction = DMA_DEV_TO_MEM,
--			.src_addr = host->mem_res->start + DAVINCI_MMCDRR,
--			.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
--			.src_maxburst =
--				rw_threshold / DMA_SLAVE_BUSWIDTH_4_BYTES,
--		};
- 		chan = host->dma_rx;
--		dmaengine_slave_config(host->dma_rx, &dma_rx_conf);
--
- 		desc = dmaengine_prep_slave_sg(host->dma_rx,
- 				data->sg,
- 				host->sg_len,
-@@ -1165,6 +1133,7 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev)
- 	struct resource *r, *mem = NULL;
- 	int ret = 0, irq = 0;
- 	size_t mem_size;
-+	struct dmaengine_chan_caps *dma_chan_caps;
- 
- 	/* REVISIT:  when we're fully converted, fail if pdata is NULL */
- 
-@@ -1214,12 +1183,6 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev)
- 
- 	init_mmcsd_host(host);
- 
--	if (pdata->nr_sg)
--		host->nr_sg = pdata->nr_sg - 1;
--
--	if (host->nr_sg > MAX_NR_SG || !host->nr_sg)
--		host->nr_sg = MAX_NR_SG;
--
- 	host->use_dma = use_dma;
- 	host->mmc_irq = irq;
- 	host->sdio_irq = platform_get_irq(pdev, 1);
-@@ -1248,14 +1211,27 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev)
- 		mmc->caps |= pdata->caps;
- 	mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
- 
--	/* With no iommu coalescing pages, each phys_seg is a hw_seg.
--	 * Each hw_seg uses one EDMA parameter RAM slot, always one
--	 * channel and then usually some linked slots.
--	 */
--	mmc->max_segs		= MAX_NR_SG;
-+	{
-+		struct dma_slave_config dma_txrx_conf = {
-+			.src_addr = host->mem_res->start + DAVINCI_MMCDRR,
-+			.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
-+			.src_maxburst =
-+				rw_threshold / DMA_SLAVE_BUSWIDTH_4_BYTES,
-+			.dst_addr = host->mem_res->start + DAVINCI_MMCDXR,
-+			.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
-+			.dst_maxburst =
-+				rw_threshold / DMA_SLAVE_BUSWIDTH_4_BYTES,
-+		};
-+		dmaengine_slave_config(host->dma_tx, &dma_txrx_conf);
-+		dmaengine_slave_config(host->dma_rx, &dma_txrx_conf);
-+	}
- 
--	/* EDMA limit per hw segment (one or two MBytes) */
--	mmc->max_seg_size	= MAX_CCNT * rw_threshold;
-+	/* Just check one channel for the DMA SG limits */
-+	dma_chan_caps = dma_get_channel_caps(host->dma_tx, DMA_MEM_TO_DEV);
-+	if (dma_chan_caps) {
-+		mmc->max_segs = dma_chan_caps->seg_nr;
-+		mmc->max_seg_size = dma_chan_caps->seg_len;
-+	}
- 
- 	/* MMC/SD controller limits for multiblock requests */
- 	mmc->max_blk_size	= 4095;  /* BLEN is 12 bits */
-diff --git a/include/linux/platform_data/mmc-davinci.h b/include/linux/platform_data/mmc-davinci.h
-index 5ba6b22..6910209 100644
---- a/include/linux/platform_data/mmc-davinci.h
-+++ b/include/linux/platform_data/mmc-davinci.h
-@@ -25,9 +25,6 @@ struct davinci_mmc_config {
- 
- 	/* Version of the MMC/SD controller */
- 	u8	version;
--
--	/* Number of sg segments */
--	u8	nr_sg;
- };
- void davinci_setup_mmc(int module, struct davinci_mmc_config *config);
- 
--- 
-1.8.1
-
diff --git a/patches/dma/0014-ARM-davinci-move-private-EDMA-API-to-arm-common.patch b/patches/dma/0014-ARM-davinci-move-private-EDMA-API-to-arm-common.patch
deleted file mode 100644
index 5e9acb4cfe25bd9032586c9c25c5cedbcd289fa5..0000000000000000000000000000000000000000
--- a/patches/dma/0014-ARM-davinci-move-private-EDMA-API-to-arm-common.patch
+++ /dev/null
@@ -1,4034 +0,0 @@
-From 3ae25d70a169a4704abe62853cf89a5185bdfd5d Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Wed, 22 Aug 2012 09:24:24 -0400
-Subject: [PATCH 14/35] ARM: davinci: move private EDMA API to arm/common
-
-Move mach-davinci/dma.c to common/edma.c so it can be used
-by OMAP (specifically AM33xx) as well. This just moves the
-private EDMA API and enables it to build on OMAP.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- arch/arm/Kconfig                            |    1 +
- arch/arm/common/Kconfig                     |    3 +
- arch/arm/common/Makefile                    |    1 +
- arch/arm/common/edma.c                      | 1587 ++++++++++++++++++++++++++
- arch/arm/mach-davinci/Makefile              |    2 +-
- arch/arm/mach-davinci/board-tnetv107x-evm.c |    2 +-
- arch/arm/mach-davinci/davinci.h             |    2 +-
- arch/arm/mach-davinci/devices-tnetv107x.c   |    2 +-
- arch/arm/mach-davinci/devices.c             |    7 +-
- arch/arm/mach-davinci/dm355.c               |    2 +-
- arch/arm/mach-davinci/dm365.c               |    2 +-
- arch/arm/mach-davinci/dm644x.c              |    2 +-
- arch/arm/mach-davinci/dm646x.c              |    2 +-
- arch/arm/mach-davinci/dma.c                 | 1588 ---------------------------
- arch/arm/mach-davinci/include/mach/da8xx.h  |    2 +-
- arch/arm/mach-davinci/include/mach/edma.h   |  267 -----
- arch/arm/plat-omap/Kconfig                  |    1 +
- drivers/dma/edma.c                          |    2 +-
- drivers/mmc/host/davinci_mmc.c              |    1 +
- include/linux/mfd/davinci_voicecodec.h      |    3 +-
- include/linux/platform_data/edma.h          |  182 +++
- include/linux/platform_data/spi-davinci.h   |    2 +-
- sound/soc/davinci/davinci-evm.c             |    1 +
- sound/soc/davinci/davinci-pcm.c             |    1 +
- sound/soc/davinci/davinci-pcm.h             |    2 +-
- sound/soc/davinci/davinci-sffsdr.c          |    6 +-
- 26 files changed, 1798 insertions(+), 1875 deletions(-)
- create mode 100644 arch/arm/common/edma.c
- delete mode 100644 arch/arm/mach-davinci/dma.c
- delete mode 100644 arch/arm/mach-davinci/include/mach/edma.h
- create mode 100644 include/linux/platform_data/edma.h
-
-diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
-index 67874b8..7637d31 100644
---- a/arch/arm/Kconfig
-+++ b/arch/arm/Kconfig
-@@ -932,6 +932,7 @@ config ARCH_DAVINCI
- 	select GENERIC_IRQ_CHIP
- 	select HAVE_IDE
- 	select NEED_MACH_GPIO_H
-+	select TI_PRIV_EDMA
- 	select USE_OF
- 	select ZONE_DMA
- 	help
-diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig
-index 45ceeb0..9e32d0d 100644
---- a/arch/arm/common/Kconfig
-+++ b/arch/arm/common/Kconfig
-@@ -40,3 +40,6 @@ config SHARP_PARAM
- 
- config SHARP_SCOOP
- 	bool
-+
-+config TI_PRIV_EDMA
-+	bool
-diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile
-index e8a4e58..d09a39b 100644
---- a/arch/arm/common/Makefile
-+++ b/arch/arm/common/Makefile
-@@ -13,3 +13,4 @@ obj-$(CONFIG_SHARP_PARAM)	+= sharpsl_param.o
- obj-$(CONFIG_SHARP_SCOOP)	+= scoop.o
- obj-$(CONFIG_PCI_HOST_ITE8152)  += it8152.o
- obj-$(CONFIG_ARM_TIMER_SP804)	+= timer-sp.o
-+obj-$(CONFIG_TI_PRIV_EDMA)	+= edma.o
-diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
-new file mode 100644
-index 0000000..b0b4d78
---- /dev/null
-+++ b/arch/arm/common/edma.c
-@@ -0,0 +1,1587 @@
-+/*
-+ * EDMA3 support for DaVinci
-+ *
-+ * Copyright (C) 2006-2009 Texas Instruments.
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-+ */
-+#include <linux/kernel.h>
-+#include <linux/init.h>
-+#include <linux/module.h>
-+#include <linux/interrupt.h>
-+#include <linux/platform_device.h>
-+#include <linux/io.h>
-+#include <linux/slab.h>
-+
-+#include <linux/platform_data/edma.h>
-+
-+/* Offsets matching "struct edmacc_param" */
-+#define PARM_OPT		0x00
-+#define PARM_SRC		0x04
-+#define PARM_A_B_CNT		0x08
-+#define PARM_DST		0x0c
-+#define PARM_SRC_DST_BIDX	0x10
-+#define PARM_LINK_BCNTRLD	0x14
-+#define PARM_SRC_DST_CIDX	0x18
-+#define PARM_CCNT		0x1c
-+
-+#define PARM_SIZE		0x20
-+
-+/* Offsets for EDMA CC global channel registers and their shadows */
-+#define SH_ER		0x00	/* 64 bits */
-+#define SH_ECR		0x08	/* 64 bits */
-+#define SH_ESR		0x10	/* 64 bits */
-+#define SH_CER		0x18	/* 64 bits */
-+#define SH_EER		0x20	/* 64 bits */
-+#define SH_EECR		0x28	/* 64 bits */
-+#define SH_EESR		0x30	/* 64 bits */
-+#define SH_SER		0x38	/* 64 bits */
-+#define SH_SECR		0x40	/* 64 bits */
-+#define SH_IER		0x50	/* 64 bits */
-+#define SH_IECR		0x58	/* 64 bits */
-+#define SH_IESR		0x60	/* 64 bits */
-+#define SH_IPR		0x68	/* 64 bits */
-+#define SH_ICR		0x70	/* 64 bits */
-+#define SH_IEVAL	0x78
-+#define SH_QER		0x80
-+#define SH_QEER		0x84
-+#define SH_QEECR	0x88
-+#define SH_QEESR	0x8c
-+#define SH_QSER		0x90
-+#define SH_QSECR	0x94
-+#define SH_SIZE		0x200
-+
-+/* Offsets for EDMA CC global registers */
-+#define EDMA_REV	0x0000
-+#define EDMA_CCCFG	0x0004
-+#define EDMA_QCHMAP	0x0200	/* 8 registers */
-+#define EDMA_DMAQNUM	0x0240	/* 8 registers (4 on OMAP-L1xx) */
-+#define EDMA_QDMAQNUM	0x0260
-+#define EDMA_QUETCMAP	0x0280
-+#define EDMA_QUEPRI	0x0284
-+#define EDMA_EMR	0x0300	/* 64 bits */
-+#define EDMA_EMCR	0x0308	/* 64 bits */
-+#define EDMA_QEMR	0x0310
-+#define EDMA_QEMCR	0x0314
-+#define EDMA_CCERR	0x0318
-+#define EDMA_CCERRCLR	0x031c
-+#define EDMA_EEVAL	0x0320
-+#define EDMA_DRAE	0x0340	/* 4 x 64 bits*/
-+#define EDMA_QRAE	0x0380	/* 4 registers */
-+#define EDMA_QUEEVTENTRY	0x0400	/* 2 x 16 registers */
-+#define EDMA_QSTAT	0x0600	/* 2 registers */
-+#define EDMA_QWMTHRA	0x0620
-+#define EDMA_QWMTHRB	0x0624
-+#define EDMA_CCSTAT	0x0640
-+
-+#define EDMA_M		0x1000	/* global channel registers */
-+#define EDMA_ECR	0x1008
-+#define EDMA_ECRH	0x100C
-+#define EDMA_SHADOW0	0x2000	/* 4 regions shadowing global channels */
-+#define EDMA_PARM	0x4000	/* 128 param entries */
-+
-+#define PARM_OFFSET(param_no)	(EDMA_PARM + ((param_no) << 5))
-+
-+#define EDMA_DCHMAP	0x0100  /* 64 registers */
-+#define CHMAP_EXIST	BIT(24)
-+
-+#define EDMA_MAX_DMACH           64
-+#define EDMA_MAX_PARAMENTRY     512
-+
-+/*****************************************************************************/
-+
-+static void __iomem *edmacc_regs_base[EDMA_MAX_CC];
-+
-+static inline unsigned int edma_read(unsigned ctlr, int offset)
-+{
-+	return (unsigned int)__raw_readl(edmacc_regs_base[ctlr] + offset);
-+}
-+
-+static inline void edma_write(unsigned ctlr, int offset, int val)
-+{
-+	__raw_writel(val, edmacc_regs_base[ctlr] + offset);
-+}
-+static inline void edma_modify(unsigned ctlr, int offset, unsigned and,
-+		unsigned or)
-+{
-+	unsigned val = edma_read(ctlr, offset);
-+	val &= and;
-+	val |= or;
-+	edma_write(ctlr, offset, val);
-+}
-+static inline void edma_and(unsigned ctlr, int offset, unsigned and)
-+{
-+	unsigned val = edma_read(ctlr, offset);
-+	val &= and;
-+	edma_write(ctlr, offset, val);
-+}
-+static inline void edma_or(unsigned ctlr, int offset, unsigned or)
-+{
-+	unsigned val = edma_read(ctlr, offset);
-+	val |= or;
-+	edma_write(ctlr, offset, val);
-+}
-+static inline unsigned int edma_read_array(unsigned ctlr, int offset, int i)
-+{
-+	return edma_read(ctlr, offset + (i << 2));
-+}
-+static inline void edma_write_array(unsigned ctlr, int offset, int i,
-+		unsigned val)
-+{
-+	edma_write(ctlr, offset + (i << 2), val);
-+}
-+static inline void edma_modify_array(unsigned ctlr, int offset, int i,
-+		unsigned and, unsigned or)
-+{
-+	edma_modify(ctlr, offset + (i << 2), and, or);
-+}
-+static inline void edma_or_array(unsigned ctlr, int offset, int i, unsigned or)
-+{
-+	edma_or(ctlr, offset + (i << 2), or);
-+}
-+static inline void edma_or_array2(unsigned ctlr, int offset, int i, int j,
-+		unsigned or)
-+{
-+	edma_or(ctlr, offset + ((i*2 + j) << 2), or);
-+}
-+static inline void edma_write_array2(unsigned ctlr, int offset, int i, int j,
-+		unsigned val)
-+{
-+	edma_write(ctlr, offset + ((i*2 + j) << 2), val);
-+}
-+static inline unsigned int edma_shadow0_read(unsigned ctlr, int offset)
-+{
-+	return edma_read(ctlr, EDMA_SHADOW0 + offset);
-+}
-+static inline unsigned int edma_shadow0_read_array(unsigned ctlr, int offset,
-+		int i)
-+{
-+	return edma_read(ctlr, EDMA_SHADOW0 + offset + (i << 2));
-+}
-+static inline void edma_shadow0_write(unsigned ctlr, int offset, unsigned val)
-+{
-+	edma_write(ctlr, EDMA_SHADOW0 + offset, val);
-+}
-+static inline void edma_shadow0_write_array(unsigned ctlr, int offset, int i,
-+		unsigned val)
-+{
-+	edma_write(ctlr, EDMA_SHADOW0 + offset + (i << 2), val);
-+}
-+static inline unsigned int edma_parm_read(unsigned ctlr, int offset,
-+		int param_no)
-+{
-+	return edma_read(ctlr, EDMA_PARM + offset + (param_no << 5));
-+}
-+static inline void edma_parm_write(unsigned ctlr, int offset, int param_no,
-+		unsigned val)
-+{
-+	edma_write(ctlr, EDMA_PARM + offset + (param_no << 5), val);
-+}
-+static inline void edma_parm_modify(unsigned ctlr, int offset, int param_no,
-+		unsigned and, unsigned or)
-+{
-+	edma_modify(ctlr, EDMA_PARM + offset + (param_no << 5), and, or);
-+}
-+static inline void edma_parm_and(unsigned ctlr, int offset, int param_no,
-+		unsigned and)
-+{
-+	edma_and(ctlr, EDMA_PARM + offset + (param_no << 5), and);
-+}
-+static inline void edma_parm_or(unsigned ctlr, int offset, int param_no,
-+		unsigned or)
-+{
-+	edma_or(ctlr, EDMA_PARM + offset + (param_no << 5), or);
-+}
-+
-+static inline void set_bits(int offset, int len, unsigned long *p)
-+{
-+	for (; len > 0; len--)
-+		set_bit(offset + (len - 1), p);
-+}
-+
-+static inline void clear_bits(int offset, int len, unsigned long *p)
-+{
-+	for (; len > 0; len--)
-+		clear_bit(offset + (len - 1), p);
-+}
-+
-+/*****************************************************************************/
-+
-+/* actual number of DMA channels and slots on this silicon */
-+struct edma {
-+	/* how many dma resources of each type */
-+	unsigned	num_channels;
-+	unsigned	num_region;
-+	unsigned	num_slots;
-+	unsigned	num_tc;
-+	unsigned	num_cc;
-+	enum dma_event_q 	default_queue;
-+
-+	/* list of channels with no even trigger; terminated by "-1" */
-+	const s8	*noevent;
-+
-+	/* The edma_inuse bit for each PaRAM slot is clear unless the
-+	 * channel is in use ... by ARM or DSP, for QDMA, or whatever.
-+	 */
-+	DECLARE_BITMAP(edma_inuse, EDMA_MAX_PARAMENTRY);
-+
-+	/* The edma_unused bit for each channel is clear unless
-+	 * it is not being used on this platform. It uses a bit
-+	 * of SOC-specific initialization code.
-+	 */
-+	DECLARE_BITMAP(edma_unused, EDMA_MAX_DMACH);
-+
-+	unsigned	irq_res_start;
-+	unsigned	irq_res_end;
-+
-+	struct dma_interrupt_data {
-+		void (*callback)(unsigned channel, unsigned short ch_status,
-+				void *data);
-+		void *data;
-+	} intr_data[EDMA_MAX_DMACH];
-+};
-+
-+static struct edma *edma_cc[EDMA_MAX_CC];
-+static int arch_num_cc;
-+
-+/* dummy param set used to (re)initialize parameter RAM slots */
-+static const struct edmacc_param dummy_paramset = {
-+	.link_bcntrld = 0xffff,
-+	.ccnt = 1,
-+};
-+
-+/*****************************************************************************/
-+
-+static void map_dmach_queue(unsigned ctlr, unsigned ch_no,
-+		enum dma_event_q queue_no)
-+{
-+	int bit = (ch_no & 0x7) * 4;
-+
-+	/* default to low priority queue */
-+	if (queue_no == EVENTQ_DEFAULT)
-+		queue_no = edma_cc[ctlr]->default_queue;
-+
-+	queue_no &= 7;
-+	edma_modify_array(ctlr, EDMA_DMAQNUM, (ch_no >> 3),
-+			~(0x7 << bit), queue_no << bit);
-+}
-+
-+static void __init map_queue_tc(unsigned ctlr, int queue_no, int tc_no)
-+{
-+	int bit = queue_no * 4;
-+	edma_modify(ctlr, EDMA_QUETCMAP, ~(0x7 << bit), ((tc_no & 0x7) << bit));
-+}
-+
-+static void __init assign_priority_to_queue(unsigned ctlr, int queue_no,
-+		int priority)
-+{
-+	int bit = queue_no * 4;
-+	edma_modify(ctlr, EDMA_QUEPRI, ~(0x7 << bit),
-+			((priority & 0x7) << bit));
-+}
-+
-+/**
-+ * map_dmach_param - Maps channel number to param entry number
-+ *
-+ * This maps the dma channel number to param entry numberter. In
-+ * other words using the DMA channel mapping registers a param entry
-+ * can be mapped to any channel
-+ *
-+ * Callers are responsible for ensuring the channel mapping logic is
-+ * included in that particular EDMA variant (Eg : dm646x)
-+ *
-+ */
-+static void __init map_dmach_param(unsigned ctlr)
-+{
-+	int i;
-+	for (i = 0; i < EDMA_MAX_DMACH; i++)
-+		edma_write_array(ctlr, EDMA_DCHMAP , i , (i << 5));
-+}
-+
-+static inline void
-+setup_dma_interrupt(unsigned lch,
-+	void (*callback)(unsigned channel, u16 ch_status, void *data),
-+	void *data)
-+{
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(lch);
-+	lch = EDMA_CHAN_SLOT(lch);
-+
-+	if (!callback)
-+		edma_shadow0_write_array(ctlr, SH_IECR, lch >> 5,
-+				BIT(lch & 0x1f));
-+
-+	edma_cc[ctlr]->intr_data[lch].callback = callback;
-+	edma_cc[ctlr]->intr_data[lch].data = data;
-+
-+	if (callback) {
-+		edma_shadow0_write_array(ctlr, SH_ICR, lch >> 5,
-+				BIT(lch & 0x1f));
-+		edma_shadow0_write_array(ctlr, SH_IESR, lch >> 5,
-+				BIT(lch & 0x1f));
-+	}
-+}
-+
-+static int irq2ctlr(int irq)
-+{
-+	if (irq >= edma_cc[0]->irq_res_start && irq <= edma_cc[0]->irq_res_end)
-+		return 0;
-+	else if (irq >= edma_cc[1]->irq_res_start &&
-+		irq <= edma_cc[1]->irq_res_end)
-+		return 1;
-+
-+	return -1;
-+}
-+
-+/******************************************************************************
-+ *
-+ * DMA interrupt handler
-+ *
-+ *****************************************************************************/
-+static irqreturn_t dma_irq_handler(int irq, void *data)
-+{
-+	int ctlr;
-+	u32 sh_ier;
-+	u32 sh_ipr;
-+	u32 bank;
-+
-+	ctlr = irq2ctlr(irq);
-+	if (ctlr < 0)
-+		return IRQ_NONE;
-+
-+	dev_dbg(data, "dma_irq_handler\n");
-+
-+	sh_ipr = edma_shadow0_read_array(ctlr, SH_IPR, 0);
-+	if (!sh_ipr) {
-+		sh_ipr = edma_shadow0_read_array(ctlr, SH_IPR, 1);
-+		if (!sh_ipr)
-+			return IRQ_NONE;
-+		sh_ier = edma_shadow0_read_array(ctlr, SH_IER, 1);
-+		bank = 1;
-+	} else {
-+		sh_ier = edma_shadow0_read_array(ctlr, SH_IER, 0);
-+		bank = 0;
-+	}
-+
-+	do {
-+		u32 slot;
-+		u32 channel;
-+
-+		dev_dbg(data, "IPR%d %08x\n", bank, sh_ipr);
-+
-+		slot = __ffs(sh_ipr);
-+		sh_ipr &= ~(BIT(slot));
-+
-+		if (sh_ier & BIT(slot)) {
-+			channel = (bank << 5) | slot;
-+			/* Clear the corresponding IPR bits */
-+			edma_shadow0_write_array(ctlr, SH_ICR, bank,
-+					BIT(slot));
-+			if (edma_cc[ctlr]->intr_data[channel].callback)
-+				edma_cc[ctlr]->intr_data[channel].callback(
-+					channel, DMA_COMPLETE,
-+					edma_cc[ctlr]->intr_data[channel].data);
-+		}
-+	} while (sh_ipr);
-+
-+	edma_shadow0_write(ctlr, SH_IEVAL, 1);
-+	return IRQ_HANDLED;
-+}
-+
-+/******************************************************************************
-+ *
-+ * DMA error interrupt handler
-+ *
-+ *****************************************************************************/
-+static irqreturn_t dma_ccerr_handler(int irq, void *data)
-+{
-+	int i;
-+	int ctlr;
-+	unsigned int cnt = 0;
-+
-+	ctlr = irq2ctlr(irq);
-+	if (ctlr < 0)
-+		return IRQ_NONE;
-+
-+	dev_dbg(data, "dma_ccerr_handler\n");
-+
-+	if ((edma_read_array(ctlr, EDMA_EMR, 0) == 0) &&
-+	    (edma_read_array(ctlr, EDMA_EMR, 1) == 0) &&
-+	    (edma_read(ctlr, EDMA_QEMR) == 0) &&
-+	    (edma_read(ctlr, EDMA_CCERR) == 0))
-+		return IRQ_NONE;
-+
-+	while (1) {
-+		int j = -1;
-+		if (edma_read_array(ctlr, EDMA_EMR, 0))
-+			j = 0;
-+		else if (edma_read_array(ctlr, EDMA_EMR, 1))
-+			j = 1;
-+		if (j >= 0) {
-+			dev_dbg(data, "EMR%d %08x\n", j,
-+					edma_read_array(ctlr, EDMA_EMR, j));
-+			for (i = 0; i < 32; i++) {
-+				int k = (j << 5) + i;
-+				if (edma_read_array(ctlr, EDMA_EMR, j) &
-+							BIT(i)) {
-+					/* Clear the corresponding EMR bits */
-+					edma_write_array(ctlr, EDMA_EMCR, j,
-+							BIT(i));
-+					/* Clear any SER */
-+					edma_shadow0_write_array(ctlr, SH_SECR,
-+								j, BIT(i));
-+					if (edma_cc[ctlr]->intr_data[k].
-+								callback) {
-+						edma_cc[ctlr]->intr_data[k].
-+						callback(k,
-+						DMA_CC_ERROR,
-+						edma_cc[ctlr]->intr_data
-+						[k].data);
-+					}
-+				}
-+			}
-+		} else if (edma_read(ctlr, EDMA_QEMR)) {
-+			dev_dbg(data, "QEMR %02x\n",
-+				edma_read(ctlr, EDMA_QEMR));
-+			for (i = 0; i < 8; i++) {
-+				if (edma_read(ctlr, EDMA_QEMR) & BIT(i)) {
-+					/* Clear the corresponding IPR bits */
-+					edma_write(ctlr, EDMA_QEMCR, BIT(i));
-+					edma_shadow0_write(ctlr, SH_QSECR,
-+								BIT(i));
-+
-+					/* NOTE:  not reported!! */
-+				}
-+			}
-+		} else if (edma_read(ctlr, EDMA_CCERR)) {
-+			dev_dbg(data, "CCERR %08x\n",
-+				edma_read(ctlr, EDMA_CCERR));
-+			/* FIXME:  CCERR.BIT(16) ignored!  much better
-+			 * to just write CCERRCLR with CCERR value...
-+			 */
-+			for (i = 0; i < 8; i++) {
-+				if (edma_read(ctlr, EDMA_CCERR) & BIT(i)) {
-+					/* Clear the corresponding IPR bits */
-+					edma_write(ctlr, EDMA_CCERRCLR, BIT(i));
-+
-+					/* NOTE:  not reported!! */
-+				}
-+			}
-+		}
-+		if ((edma_read_array(ctlr, EDMA_EMR, 0) == 0) &&
-+		    (edma_read_array(ctlr, EDMA_EMR, 1) == 0) &&
-+		    (edma_read(ctlr, EDMA_QEMR) == 0) &&
-+		    (edma_read(ctlr, EDMA_CCERR) == 0))
-+			break;
-+		cnt++;
-+		if (cnt > 10)
-+			break;
-+	}
-+	edma_write(ctlr, EDMA_EEVAL, 1);
-+	return IRQ_HANDLED;
-+}
-+
-+/******************************************************************************
-+ *
-+ * Transfer controller error interrupt handlers
-+ *
-+ *****************************************************************************/
-+
-+#define tc_errs_handled	false	/* disabled as long as they're NOPs */
-+
-+static irqreturn_t dma_tc0err_handler(int irq, void *data)
-+{
-+	dev_dbg(data, "dma_tc0err_handler\n");
-+	return IRQ_HANDLED;
-+}
-+
-+static irqreturn_t dma_tc1err_handler(int irq, void *data)
-+{
-+	dev_dbg(data, "dma_tc1err_handler\n");
-+	return IRQ_HANDLED;
-+}
-+
-+static int reserve_contiguous_slots(int ctlr, unsigned int id,
-+				     unsigned int num_slots,
-+				     unsigned int start_slot)
-+{
-+	int i, j;
-+	unsigned int count = num_slots;
-+	int stop_slot = start_slot;
-+	DECLARE_BITMAP(tmp_inuse, EDMA_MAX_PARAMENTRY);
-+
-+	for (i = start_slot; i < edma_cc[ctlr]->num_slots; ++i) {
-+		j = EDMA_CHAN_SLOT(i);
-+		if (!test_and_set_bit(j, edma_cc[ctlr]->edma_inuse)) {
-+			/* Record our current beginning slot */
-+			if (count == num_slots)
-+				stop_slot = i;
-+
-+			count--;
-+			set_bit(j, tmp_inuse);
-+
-+			if (count == 0)
-+				break;
-+		} else {
-+			clear_bit(j, tmp_inuse);
-+
-+			if (id == EDMA_CONT_PARAMS_FIXED_EXACT) {
-+				stop_slot = i;
-+				break;
-+			} else {
-+				count = num_slots;
-+			}
-+		}
-+	}
-+
-+	/*
-+	 * We have to clear any bits that we set
-+	 * if we run out parameter RAM slots, i.e we do find a set
-+	 * of contiguous parameter RAM slots but do not find the exact number
-+	 * requested as we may reach the total number of parameter RAM slots
-+	 */
-+	if (i == edma_cc[ctlr]->num_slots)
-+		stop_slot = i;
-+
-+	j = start_slot;
-+	for_each_set_bit_from(j, tmp_inuse, stop_slot)
-+		clear_bit(j, edma_cc[ctlr]->edma_inuse);
-+
-+	if (count)
-+		return -EBUSY;
-+
-+	for (j = i - num_slots + 1; j <= i; ++j)
-+		memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(j),
-+			&dummy_paramset, PARM_SIZE);
-+
-+	return EDMA_CTLR_CHAN(ctlr, i - num_slots + 1);
-+}
-+
-+static int prepare_unused_channel_list(struct device *dev, void *data)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	int i, ctlr;
-+
-+	for (i = 0; i < pdev->num_resources; i++) {
-+		if ((pdev->resource[i].flags & IORESOURCE_DMA) &&
-+				(int)pdev->resource[i].start >= 0) {
-+			ctlr = EDMA_CTLR(pdev->resource[i].start);
-+			clear_bit(EDMA_CHAN_SLOT(pdev->resource[i].start),
-+					edma_cc[ctlr]->edma_unused);
-+		}
-+	}
-+
-+	return 0;
-+}
-+
-+/*-----------------------------------------------------------------------*/
-+
-+static bool unused_chan_list_done;
-+
-+/* Resource alloc/free:  dma channels, parameter RAM slots */
-+
-+/**
-+ * edma_alloc_channel - allocate DMA channel and paired parameter RAM
-+ * @channel: specific channel to allocate; negative for "any unmapped channel"
-+ * @callback: optional; to be issued on DMA completion or errors
-+ * @data: passed to callback
-+ * @eventq_no: an EVENTQ_* constant, used to choose which Transfer
-+ *	Controller (TC) executes requests using this channel.  Use
-+ *	EVENTQ_DEFAULT unless you really need a high priority queue.
-+ *
-+ * This allocates a DMA channel and its associated parameter RAM slot.
-+ * The parameter RAM is initialized to hold a dummy transfer.
-+ *
-+ * Normal use is to pass a specific channel number as @channel, to make
-+ * use of hardware events mapped to that channel.  When the channel will
-+ * be used only for software triggering or event chaining, channels not
-+ * mapped to hardware events (or mapped to unused events) are preferable.
-+ *
-+ * DMA transfers start from a channel using edma_start(), or by
-+ * chaining.  When the transfer described in that channel's parameter RAM
-+ * slot completes, that slot's data may be reloaded through a link.
-+ *
-+ * DMA errors are only reported to the @callback associated with the
-+ * channel driving that transfer, but transfer completion callbacks can
-+ * be sent to another channel under control of the TCC field in
-+ * the option word of the transfer's parameter RAM set.  Drivers must not
-+ * use DMA transfer completion callbacks for channels they did not allocate.
-+ * (The same applies to TCC codes used in transfer chaining.)
-+ *
-+ * Returns the number of the channel, else negative errno.
-+ */
-+int edma_alloc_channel(int channel,
-+		void (*callback)(unsigned channel, u16 ch_status, void *data),
-+		void *data,
-+		enum dma_event_q eventq_no)
-+{
-+	unsigned i, done = 0, ctlr = 0;
-+	int ret = 0;
-+
-+	if (!unused_chan_list_done) {
-+		/*
-+		 * Scan all the platform devices to find out the EDMA channels
-+		 * used and clear them in the unused list, making the rest
-+		 * available for ARM usage.
-+		 */
-+		ret = bus_for_each_dev(&platform_bus_type, NULL, NULL,
-+				prepare_unused_channel_list);
-+		if (ret < 0)
-+			return ret;
-+
-+		unused_chan_list_done = true;
-+	}
-+
-+	if (channel >= 0) {
-+		ctlr = EDMA_CTLR(channel);
-+		channel = EDMA_CHAN_SLOT(channel);
-+	}
-+
-+	if (channel < 0) {
-+		for (i = 0; i < arch_num_cc; i++) {
-+			channel = 0;
-+			for (;;) {
-+				channel = find_next_bit(edma_cc[i]->edma_unused,
-+						edma_cc[i]->num_channels,
-+						channel);
-+				if (channel == edma_cc[i]->num_channels)
-+					break;
-+				if (!test_and_set_bit(channel,
-+						edma_cc[i]->edma_inuse)) {
-+					done = 1;
-+					ctlr = i;
-+					break;
-+				}
-+				channel++;
-+			}
-+			if (done)
-+				break;
-+		}
-+		if (!done)
-+			return -ENOMEM;
-+	} else if (channel >= edma_cc[ctlr]->num_channels) {
-+		return -EINVAL;
-+	} else if (test_and_set_bit(channel, edma_cc[ctlr]->edma_inuse)) {
-+		return -EBUSY;
-+	}
-+
-+	/* ensure access through shadow region 0 */
-+	edma_or_array2(ctlr, EDMA_DRAE, 0, channel >> 5, BIT(channel & 0x1f));
-+
-+	/* ensure no events are pending */
-+	edma_stop(EDMA_CTLR_CHAN(ctlr, channel));
-+	memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(channel),
-+			&dummy_paramset, PARM_SIZE);
-+
-+	if (callback)
-+		setup_dma_interrupt(EDMA_CTLR_CHAN(ctlr, channel),
-+					callback, data);
-+
-+	map_dmach_queue(ctlr, channel, eventq_no);
-+
-+	return EDMA_CTLR_CHAN(ctlr, channel);
-+}
-+EXPORT_SYMBOL(edma_alloc_channel);
-+
-+
-+/**
-+ * edma_free_channel - deallocate DMA channel
-+ * @channel: dma channel returned from edma_alloc_channel()
-+ *
-+ * This deallocates the DMA channel and associated parameter RAM slot
-+ * allocated by edma_alloc_channel().
-+ *
-+ * Callers are responsible for ensuring the channel is inactive, and
-+ * will not be reactivated by linking, chaining, or software calls to
-+ * edma_start().
-+ */
-+void edma_free_channel(unsigned channel)
-+{
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(channel);
-+	channel = EDMA_CHAN_SLOT(channel);
-+
-+	if (channel >= edma_cc[ctlr]->num_channels)
-+		return;
-+
-+	setup_dma_interrupt(channel, NULL, NULL);
-+	/* REVISIT should probably take out of shadow region 0 */
-+
-+	memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(channel),
-+			&dummy_paramset, PARM_SIZE);
-+	clear_bit(channel, edma_cc[ctlr]->edma_inuse);
-+}
-+EXPORT_SYMBOL(edma_free_channel);
-+
-+/**
-+ * edma_alloc_slot - allocate DMA parameter RAM
-+ * @slot: specific slot to allocate; negative for "any unused slot"
-+ *
-+ * This allocates a parameter RAM slot, initializing it to hold a
-+ * dummy transfer.  Slots allocated using this routine have not been
-+ * mapped to a hardware DMA channel, and will normally be used by
-+ * linking to them from a slot associated with a DMA channel.
-+ *
-+ * Normal use is to pass EDMA_SLOT_ANY as the @slot, but specific
-+ * slots may be allocated on behalf of DSP firmware.
-+ *
-+ * Returns the number of the slot, else negative errno.
-+ */
-+int edma_alloc_slot(unsigned ctlr, int slot)
-+{
-+	if (slot >= 0)
-+		slot = EDMA_CHAN_SLOT(slot);
-+
-+	if (slot < 0) {
-+		slot = edma_cc[ctlr]->num_channels;
-+		for (;;) {
-+			slot = find_next_zero_bit(edma_cc[ctlr]->edma_inuse,
-+					edma_cc[ctlr]->num_slots, slot);
-+			if (slot == edma_cc[ctlr]->num_slots)
-+				return -ENOMEM;
-+			if (!test_and_set_bit(slot, edma_cc[ctlr]->edma_inuse))
-+				break;
-+		}
-+	} else if (slot < edma_cc[ctlr]->num_channels ||
-+			slot >= edma_cc[ctlr]->num_slots) {
-+		return -EINVAL;
-+	} else if (test_and_set_bit(slot, edma_cc[ctlr]->edma_inuse)) {
-+		return -EBUSY;
-+	}
-+
-+	memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(slot),
-+			&dummy_paramset, PARM_SIZE);
-+
-+	return EDMA_CTLR_CHAN(ctlr, slot);
-+}
-+EXPORT_SYMBOL(edma_alloc_slot);
-+
-+/**
-+ * edma_free_slot - deallocate DMA parameter RAM
-+ * @slot: parameter RAM slot returned from edma_alloc_slot()
-+ *
-+ * This deallocates the parameter RAM slot allocated by edma_alloc_slot().
-+ * Callers are responsible for ensuring the slot is inactive, and will
-+ * not be activated.
-+ */
-+void edma_free_slot(unsigned slot)
-+{
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(slot);
-+	slot = EDMA_CHAN_SLOT(slot);
-+
-+	if (slot < edma_cc[ctlr]->num_channels ||
-+		slot >= edma_cc[ctlr]->num_slots)
-+		return;
-+
-+	memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(slot),
-+			&dummy_paramset, PARM_SIZE);
-+	clear_bit(slot, edma_cc[ctlr]->edma_inuse);
-+}
-+EXPORT_SYMBOL(edma_free_slot);
-+
-+
-+/**
-+ * edma_alloc_cont_slots- alloc contiguous parameter RAM slots
-+ * The API will return the starting point of a set of
-+ * contiguous parameter RAM slots that have been requested
-+ *
-+ * @id: can only be EDMA_CONT_PARAMS_ANY or EDMA_CONT_PARAMS_FIXED_EXACT
-+ * or EDMA_CONT_PARAMS_FIXED_NOT_EXACT
-+ * @count: number of contiguous Paramter RAM slots
-+ * @slot  - the start value of Parameter RAM slot that should be passed if id
-+ * is EDMA_CONT_PARAMS_FIXED_EXACT or EDMA_CONT_PARAMS_FIXED_NOT_EXACT
-+ *
-+ * If id is EDMA_CONT_PARAMS_ANY then the API starts looking for a set of
-+ * contiguous Parameter RAM slots from parameter RAM 64 in the case of
-+ * DaVinci SOCs and 32 in the case of DA8xx SOCs.
-+ *
-+ * If id is EDMA_CONT_PARAMS_FIXED_EXACT then the API starts looking for a
-+ * set of contiguous parameter RAM slots from the "slot" that is passed as an
-+ * argument to the API.
-+ *
-+ * If id is EDMA_CONT_PARAMS_FIXED_NOT_EXACT then the API initially tries
-+ * starts looking for a set of contiguous parameter RAMs from the "slot"
-+ * that is passed as an argument to the API. On failure the API will try to
-+ * find a set of contiguous Parameter RAM slots from the remaining Parameter
-+ * RAM slots
-+ */
-+int edma_alloc_cont_slots(unsigned ctlr, unsigned int id, int slot, int count)
-+{
-+	/*
-+	 * The start slot requested should be greater than
-+	 * the number of channels and lesser than the total number
-+	 * of slots
-+	 */
-+	if ((id != EDMA_CONT_PARAMS_ANY) &&
-+		(slot < edma_cc[ctlr]->num_channels ||
-+		slot >= edma_cc[ctlr]->num_slots))
-+		return -EINVAL;
-+
-+	/*
-+	 * The number of parameter RAM slots requested cannot be less than 1
-+	 * and cannot be more than the number of slots minus the number of
-+	 * channels
-+	 */
-+	if (count < 1 || count >
-+		(edma_cc[ctlr]->num_slots - edma_cc[ctlr]->num_channels))
-+		return -EINVAL;
-+
-+	switch (id) {
-+	case EDMA_CONT_PARAMS_ANY:
-+		return reserve_contiguous_slots(ctlr, id, count,
-+						 edma_cc[ctlr]->num_channels);
-+	case EDMA_CONT_PARAMS_FIXED_EXACT:
-+	case EDMA_CONT_PARAMS_FIXED_NOT_EXACT:
-+		return reserve_contiguous_slots(ctlr, id, count, slot);
-+	default:
-+		return -EINVAL;
-+	}
-+
-+}
-+EXPORT_SYMBOL(edma_alloc_cont_slots);
-+
-+/**
-+ * edma_free_cont_slots - deallocate DMA parameter RAM slots
-+ * @slot: first parameter RAM of a set of parameter RAM slots to be freed
-+ * @count: the number of contiguous parameter RAM slots to be freed
-+ *
-+ * This deallocates the parameter RAM slots allocated by
-+ * edma_alloc_cont_slots.
-+ * Callers/applications need to keep track of sets of contiguous
-+ * parameter RAM slots that have been allocated using the edma_alloc_cont_slots
-+ * API.
-+ * Callers are responsible for ensuring the slots are inactive, and will
-+ * not be activated.
-+ */
-+int edma_free_cont_slots(unsigned slot, int count)
-+{
-+	unsigned ctlr, slot_to_free;
-+	int i;
-+
-+	ctlr = EDMA_CTLR(slot);
-+	slot = EDMA_CHAN_SLOT(slot);
-+
-+	if (slot < edma_cc[ctlr]->num_channels ||
-+		slot >= edma_cc[ctlr]->num_slots ||
-+		count < 1)
-+		return -EINVAL;
-+
-+	for (i = slot; i < slot + count; ++i) {
-+		ctlr = EDMA_CTLR(i);
-+		slot_to_free = EDMA_CHAN_SLOT(i);
-+
-+		memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(slot_to_free),
-+			&dummy_paramset, PARM_SIZE);
-+		clear_bit(slot_to_free, edma_cc[ctlr]->edma_inuse);
-+	}
-+
-+	return 0;
-+}
-+EXPORT_SYMBOL(edma_free_cont_slots);
-+
-+/*-----------------------------------------------------------------------*/
-+
-+/* Parameter RAM operations (i) -- read/write partial slots */
-+
-+/**
-+ * edma_set_src - set initial DMA source address in parameter RAM slot
-+ * @slot: parameter RAM slot being configured
-+ * @src_port: physical address of source (memory, controller FIFO, etc)
-+ * @addressMode: INCR, except in very rare cases
-+ * @fifoWidth: ignored unless @addressMode is FIFO, else specifies the
-+ *	width to use when addressing the fifo (e.g. W8BIT, W32BIT)
-+ *
-+ * Note that the source address is modified during the DMA transfer
-+ * according to edma_set_src_index().
-+ */
-+void edma_set_src(unsigned slot, dma_addr_t src_port,
-+				enum address_mode mode, enum fifo_width width)
-+{
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(slot);
-+	slot = EDMA_CHAN_SLOT(slot);
-+
-+	if (slot < edma_cc[ctlr]->num_slots) {
-+		unsigned int i = edma_parm_read(ctlr, PARM_OPT, slot);
-+
-+		if (mode) {
-+			/* set SAM and program FWID */
-+			i = (i & ~(EDMA_FWID)) | (SAM | ((width & 0x7) << 8));
-+		} else {
-+			/* clear SAM */
-+			i &= ~SAM;
-+		}
-+		edma_parm_write(ctlr, PARM_OPT, slot, i);
-+
-+		/* set the source port address
-+		   in source register of param structure */
-+		edma_parm_write(ctlr, PARM_SRC, slot, src_port);
-+	}
-+}
-+EXPORT_SYMBOL(edma_set_src);
-+
-+/**
-+ * edma_set_dest - set initial DMA destination address in parameter RAM slot
-+ * @slot: parameter RAM slot being configured
-+ * @dest_port: physical address of destination (memory, controller FIFO, etc)
-+ * @addressMode: INCR, except in very rare cases
-+ * @fifoWidth: ignored unless @addressMode is FIFO, else specifies the
-+ *	width to use when addressing the fifo (e.g. W8BIT, W32BIT)
-+ *
-+ * Note that the destination address is modified during the DMA transfer
-+ * according to edma_set_dest_index().
-+ */
-+void edma_set_dest(unsigned slot, dma_addr_t dest_port,
-+				 enum address_mode mode, enum fifo_width width)
-+{
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(slot);
-+	slot = EDMA_CHAN_SLOT(slot);
-+
-+	if (slot < edma_cc[ctlr]->num_slots) {
-+		unsigned int i = edma_parm_read(ctlr, PARM_OPT, slot);
-+
-+		if (mode) {
-+			/* set DAM and program FWID */
-+			i = (i & ~(EDMA_FWID)) | (DAM | ((width & 0x7) << 8));
-+		} else {
-+			/* clear DAM */
-+			i &= ~DAM;
-+		}
-+		edma_parm_write(ctlr, PARM_OPT, slot, i);
-+		/* set the destination port address
-+		   in dest register of param structure */
-+		edma_parm_write(ctlr, PARM_DST, slot, dest_port);
-+	}
-+}
-+EXPORT_SYMBOL(edma_set_dest);
-+
-+/**
-+ * edma_get_position - returns the current transfer points
-+ * @slot: parameter RAM slot being examined
-+ * @src: pointer to source port position
-+ * @dst: pointer to destination port position
-+ *
-+ * Returns current source and destination addresses for a particular
-+ * parameter RAM slot.  Its channel should not be active when this is called.
-+ */
-+void edma_get_position(unsigned slot, dma_addr_t *src, dma_addr_t *dst)
-+{
-+	struct edmacc_param temp;
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(slot);
-+	slot = EDMA_CHAN_SLOT(slot);
-+
-+	edma_read_slot(EDMA_CTLR_CHAN(ctlr, slot), &temp);
-+	if (src != NULL)
-+		*src = temp.src;
-+	if (dst != NULL)
-+		*dst = temp.dst;
-+}
-+EXPORT_SYMBOL(edma_get_position);
-+
-+/**
-+ * edma_set_src_index - configure DMA source address indexing
-+ * @slot: parameter RAM slot being configured
-+ * @src_bidx: byte offset between source arrays in a frame
-+ * @src_cidx: byte offset between source frames in a block
-+ *
-+ * Offsets are specified to support either contiguous or discontiguous
-+ * memory transfers, or repeated access to a hardware register, as needed.
-+ * When accessing hardware registers, both offsets are normally zero.
-+ */
-+void edma_set_src_index(unsigned slot, s16 src_bidx, s16 src_cidx)
-+{
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(slot);
-+	slot = EDMA_CHAN_SLOT(slot);
-+
-+	if (slot < edma_cc[ctlr]->num_slots) {
-+		edma_parm_modify(ctlr, PARM_SRC_DST_BIDX, slot,
-+				0xffff0000, src_bidx);
-+		edma_parm_modify(ctlr, PARM_SRC_DST_CIDX, slot,
-+				0xffff0000, src_cidx);
-+	}
-+}
-+EXPORT_SYMBOL(edma_set_src_index);
-+
-+/**
-+ * edma_set_dest_index - configure DMA destination address indexing
-+ * @slot: parameter RAM slot being configured
-+ * @dest_bidx: byte offset between destination arrays in a frame
-+ * @dest_cidx: byte offset between destination frames in a block
-+ *
-+ * Offsets are specified to support either contiguous or discontiguous
-+ * memory transfers, or repeated access to a hardware register, as needed.
-+ * When accessing hardware registers, both offsets are normally zero.
-+ */
-+void edma_set_dest_index(unsigned slot, s16 dest_bidx, s16 dest_cidx)
-+{
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(slot);
-+	slot = EDMA_CHAN_SLOT(slot);
-+
-+	if (slot < edma_cc[ctlr]->num_slots) {
-+		edma_parm_modify(ctlr, PARM_SRC_DST_BIDX, slot,
-+				0x0000ffff, dest_bidx << 16);
-+		edma_parm_modify(ctlr, PARM_SRC_DST_CIDX, slot,
-+				0x0000ffff, dest_cidx << 16);
-+	}
-+}
-+EXPORT_SYMBOL(edma_set_dest_index);
-+
-+/**
-+ * edma_set_transfer_params - configure DMA transfer parameters
-+ * @slot: parameter RAM slot being configured
-+ * @acnt: how many bytes per array (at least one)
-+ * @bcnt: how many arrays per frame (at least one)
-+ * @ccnt: how many frames per block (at least one)
-+ * @bcnt_rld: used only for A-Synchronized transfers; this specifies
-+ *	the value to reload into bcnt when it decrements to zero
-+ * @sync_mode: ASYNC or ABSYNC
-+ *
-+ * See the EDMA3 documentation to understand how to configure and link
-+ * transfers using the fields in PaRAM slots.  If you are not doing it
-+ * all at once with edma_write_slot(), you will use this routine
-+ * plus two calls each for source and destination, setting the initial
-+ * address and saying how to index that address.
-+ *
-+ * An example of an A-Synchronized transfer is a serial link using a
-+ * single word shift register.  In that case, @acnt would be equal to
-+ * that word size; the serial controller issues a DMA synchronization
-+ * event to transfer each word, and memory access by the DMA transfer
-+ * controller will be word-at-a-time.
-+ *
-+ * An example of an AB-Synchronized transfer is a device using a FIFO.
-+ * In that case, @acnt equals the FIFO width and @bcnt equals its depth.
-+ * The controller with the FIFO issues DMA synchronization events when
-+ * the FIFO threshold is reached, and the DMA transfer controller will
-+ * transfer one frame to (or from) the FIFO.  It will probably use
-+ * efficient burst modes to access memory.
-+ */
-+void edma_set_transfer_params(unsigned slot,
-+		u16 acnt, u16 bcnt, u16 ccnt,
-+		u16 bcnt_rld, enum sync_dimension sync_mode)
-+{
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(slot);
-+	slot = EDMA_CHAN_SLOT(slot);
-+
-+	if (slot < edma_cc[ctlr]->num_slots) {
-+		edma_parm_modify(ctlr, PARM_LINK_BCNTRLD, slot,
-+				0x0000ffff, bcnt_rld << 16);
-+		if (sync_mode == ASYNC)
-+			edma_parm_and(ctlr, PARM_OPT, slot, ~SYNCDIM);
-+		else
-+			edma_parm_or(ctlr, PARM_OPT, slot, SYNCDIM);
-+		/* Set the acount, bcount, ccount registers */
-+		edma_parm_write(ctlr, PARM_A_B_CNT, slot, (bcnt << 16) | acnt);
-+		edma_parm_write(ctlr, PARM_CCNT, slot, ccnt);
-+	}
-+}
-+EXPORT_SYMBOL(edma_set_transfer_params);
-+
-+/**
-+ * edma_link - link one parameter RAM slot to another
-+ * @from: parameter RAM slot originating the link
-+ * @to: parameter RAM slot which is the link target
-+ *
-+ * The originating slot should not be part of any active DMA transfer.
-+ */
-+void edma_link(unsigned from, unsigned to)
-+{
-+	unsigned ctlr_from, ctlr_to;
-+
-+	ctlr_from = EDMA_CTLR(from);
-+	from = EDMA_CHAN_SLOT(from);
-+	ctlr_to = EDMA_CTLR(to);
-+	to = EDMA_CHAN_SLOT(to);
-+
-+	if (from >= edma_cc[ctlr_from]->num_slots)
-+		return;
-+	if (to >= edma_cc[ctlr_to]->num_slots)
-+		return;
-+	edma_parm_modify(ctlr_from, PARM_LINK_BCNTRLD, from, 0xffff0000,
-+				PARM_OFFSET(to));
-+}
-+EXPORT_SYMBOL(edma_link);
-+
-+/**
-+ * edma_unlink - cut link from one parameter RAM slot
-+ * @from: parameter RAM slot originating the link
-+ *
-+ * The originating slot should not be part of any active DMA transfer.
-+ * Its link is set to 0xffff.
-+ */
-+void edma_unlink(unsigned from)
-+{
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(from);
-+	from = EDMA_CHAN_SLOT(from);
-+
-+	if (from >= edma_cc[ctlr]->num_slots)
-+		return;
-+	edma_parm_or(ctlr, PARM_LINK_BCNTRLD, from, 0xffff);
-+}
-+EXPORT_SYMBOL(edma_unlink);
-+
-+/*-----------------------------------------------------------------------*/
-+
-+/* Parameter RAM operations (ii) -- read/write whole parameter sets */
-+
-+/**
-+ * edma_write_slot - write parameter RAM data for slot
-+ * @slot: number of parameter RAM slot being modified
-+ * @param: data to be written into parameter RAM slot
-+ *
-+ * Use this to assign all parameters of a transfer at once.  This
-+ * allows more efficient setup of transfers than issuing multiple
-+ * calls to set up those parameters in small pieces, and provides
-+ * complete control over all transfer options.
-+ */
-+void edma_write_slot(unsigned slot, const struct edmacc_param *param)
-+{
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(slot);
-+	slot = EDMA_CHAN_SLOT(slot);
-+
-+	if (slot >= edma_cc[ctlr]->num_slots)
-+		return;
-+	memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(slot), param,
-+			PARM_SIZE);
-+}
-+EXPORT_SYMBOL(edma_write_slot);
-+
-+/**
-+ * edma_read_slot - read parameter RAM data from slot
-+ * @slot: number of parameter RAM slot being copied
-+ * @param: where to store copy of parameter RAM data
-+ *
-+ * Use this to read data from a parameter RAM slot, perhaps to
-+ * save them as a template for later reuse.
-+ */
-+void edma_read_slot(unsigned slot, struct edmacc_param *param)
-+{
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(slot);
-+	slot = EDMA_CHAN_SLOT(slot);
-+
-+	if (slot >= edma_cc[ctlr]->num_slots)
-+		return;
-+	memcpy_fromio(param, edmacc_regs_base[ctlr] + PARM_OFFSET(slot),
-+			PARM_SIZE);
-+}
-+EXPORT_SYMBOL(edma_read_slot);
-+
-+/*-----------------------------------------------------------------------*/
-+
-+/* Various EDMA channel control operations */
-+
-+/**
-+ * edma_pause - pause dma on a channel
-+ * @channel: on which edma_start() has been called
-+ *
-+ * This temporarily disables EDMA hardware events on the specified channel,
-+ * preventing them from triggering new transfers on its behalf
-+ */
-+void edma_pause(unsigned channel)
-+{
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(channel);
-+	channel = EDMA_CHAN_SLOT(channel);
-+
-+	if (channel < edma_cc[ctlr]->num_channels) {
-+		unsigned int mask = BIT(channel & 0x1f);
-+
-+		edma_shadow0_write_array(ctlr, SH_EECR, channel >> 5, mask);
-+	}
-+}
-+EXPORT_SYMBOL(edma_pause);
-+
-+/**
-+ * edma_resume - resumes dma on a paused channel
-+ * @channel: on which edma_pause() has been called
-+ *
-+ * This re-enables EDMA hardware events on the specified channel.
-+ */
-+void edma_resume(unsigned channel)
-+{
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(channel);
-+	channel = EDMA_CHAN_SLOT(channel);
-+
-+	if (channel < edma_cc[ctlr]->num_channels) {
-+		unsigned int mask = BIT(channel & 0x1f);
-+
-+		edma_shadow0_write_array(ctlr, SH_EESR, channel >> 5, mask);
-+	}
-+}
-+EXPORT_SYMBOL(edma_resume);
-+
-+/**
-+ * edma_start - start dma on a channel
-+ * @channel: channel being activated
-+ *
-+ * Channels with event associations will be triggered by their hardware
-+ * events, and channels without such associations will be triggered by
-+ * software.  (At this writing there is no interface for using software
-+ * triggers except with channels that don't support hardware triggers.)
-+ *
-+ * Returns zero on success, else negative errno.
-+ */
-+int edma_start(unsigned channel)
-+{
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(channel);
-+	channel = EDMA_CHAN_SLOT(channel);
-+
-+	if (channel < edma_cc[ctlr]->num_channels) {
-+		int j = channel >> 5;
-+		unsigned int mask = BIT(channel & 0x1f);
-+
-+		/* EDMA channels without event association */
-+		if (test_bit(channel, edma_cc[ctlr]->edma_unused)) {
-+			pr_debug("EDMA: ESR%d %08x\n", j,
-+				edma_shadow0_read_array(ctlr, SH_ESR, j));
-+			edma_shadow0_write_array(ctlr, SH_ESR, j, mask);
-+			return 0;
-+		}
-+
-+		/* EDMA channel with event association */
-+		pr_debug("EDMA: ER%d %08x\n", j,
-+			edma_shadow0_read_array(ctlr, SH_ER, j));
-+		/* Clear any pending event or error */
-+		edma_write_array(ctlr, EDMA_ECR, j, mask);
-+		edma_write_array(ctlr, EDMA_EMCR, j, mask);
-+		/* Clear any SER */
-+		edma_shadow0_write_array(ctlr, SH_SECR, j, mask);
-+		edma_shadow0_write_array(ctlr, SH_EESR, j, mask);
-+		pr_debug("EDMA: EER%d %08x\n", j,
-+			edma_shadow0_read_array(ctlr, SH_EER, j));
-+		return 0;
-+	}
-+
-+	return -EINVAL;
-+}
-+EXPORT_SYMBOL(edma_start);
-+
-+/**
-+ * edma_stop - stops dma on the channel passed
-+ * @channel: channel being deactivated
-+ *
-+ * When @lch is a channel, any active transfer is paused and
-+ * all pending hardware events are cleared.  The current transfer
-+ * may not be resumed, and the channel's Parameter RAM should be
-+ * reinitialized before being reused.
-+ */
-+void edma_stop(unsigned channel)
-+{
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(channel);
-+	channel = EDMA_CHAN_SLOT(channel);
-+
-+	if (channel < edma_cc[ctlr]->num_channels) {
-+		int j = channel >> 5;
-+		unsigned int mask = BIT(channel & 0x1f);
-+
-+		edma_shadow0_write_array(ctlr, SH_EECR, j, mask);
-+		edma_shadow0_write_array(ctlr, SH_ECR, j, mask);
-+		edma_shadow0_write_array(ctlr, SH_SECR, j, mask);
-+		edma_write_array(ctlr, EDMA_EMCR, j, mask);
-+
-+		pr_debug("EDMA: EER%d %08x\n", j,
-+				edma_shadow0_read_array(ctlr, SH_EER, j));
-+
-+		/* REVISIT:  consider guarding against inappropriate event
-+		 * chaining by overwriting with dummy_paramset.
-+		 */
-+	}
-+}
-+EXPORT_SYMBOL(edma_stop);
-+
-+/******************************************************************************
-+ *
-+ * It cleans ParamEntry qand bring back EDMA to initial state if media has
-+ * been removed before EDMA has finished.It is usedful for removable media.
-+ * Arguments:
-+ *      ch_no     - channel no
-+ *
-+ * Return: zero on success, or corresponding error no on failure
-+ *
-+ * FIXME this should not be needed ... edma_stop() should suffice.
-+ *
-+ *****************************************************************************/
-+
-+void edma_clean_channel(unsigned channel)
-+{
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(channel);
-+	channel = EDMA_CHAN_SLOT(channel);
-+
-+	if (channel < edma_cc[ctlr]->num_channels) {
-+		int j = (channel >> 5);
-+		unsigned int mask = BIT(channel & 0x1f);
-+
-+		pr_debug("EDMA: EMR%d %08x\n", j,
-+				edma_read_array(ctlr, EDMA_EMR, j));
-+		edma_shadow0_write_array(ctlr, SH_ECR, j, mask);
-+		/* Clear the corresponding EMR bits */
-+		edma_write_array(ctlr, EDMA_EMCR, j, mask);
-+		/* Clear any SER */
-+		edma_shadow0_write_array(ctlr, SH_SECR, j, mask);
-+		edma_write(ctlr, EDMA_CCERRCLR, BIT(16) | BIT(1) | BIT(0));
-+	}
-+}
-+EXPORT_SYMBOL(edma_clean_channel);
-+
-+/*
-+ * edma_clear_event - clear an outstanding event on the DMA channel
-+ * Arguments:
-+ *	channel - channel number
-+ */
-+void edma_clear_event(unsigned channel)
-+{
-+	unsigned ctlr;
-+
-+	ctlr = EDMA_CTLR(channel);
-+	channel = EDMA_CHAN_SLOT(channel);
-+
-+	if (channel >= edma_cc[ctlr]->num_channels)
-+		return;
-+	if (channel < 32)
-+		edma_write(ctlr, EDMA_ECR, BIT(channel));
-+	else
-+		edma_write(ctlr, EDMA_ECRH, BIT(channel - 32));
-+}
-+EXPORT_SYMBOL(edma_clear_event);
-+
-+/*-----------------------------------------------------------------------*/
-+
-+static int edma_probe(struct platform_device *pdev)
-+{
-+	struct edma_soc_info	**info = pdev->dev.platform_data;
-+	const s8		(*queue_priority_mapping)[2];
-+	const s8		(*queue_tc_mapping)[2];
-+	int			i, j, off, ln, found = 0;
-+	int			status = -1;
-+	const s16		(*rsv_chans)[2];
-+	const s16		(*rsv_slots)[2];
-+	int			irq[EDMA_MAX_CC] = {0, 0};
-+	int			err_irq[EDMA_MAX_CC] = {0, 0};
-+	struct resource		*r[EDMA_MAX_CC] = {NULL};
-+	resource_size_t		len[EDMA_MAX_CC];
-+	char			res_name[10];
-+	char			irq_name[10];
-+
-+	if (!info)
-+		return -ENODEV;
-+
-+	for (j = 0; j < EDMA_MAX_CC; j++) {
-+		sprintf(res_name, "edma_cc%d", j);
-+		r[j] = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-+						res_name);
-+		if (!r[j] || !info[j]) {
-+			if (found)
-+				break;
-+			else
-+				return -ENODEV;
-+		} else {
-+			found = 1;
-+		}
-+
-+		len[j] = resource_size(r[j]);
-+
-+		r[j] = request_mem_region(r[j]->start, len[j],
-+			dev_name(&pdev->dev));
-+		if (!r[j]) {
-+			status = -EBUSY;
-+			goto fail1;
-+		}
-+
-+		edmacc_regs_base[j] = ioremap(r[j]->start, len[j]);
-+		if (!edmacc_regs_base[j]) {
-+			status = -EBUSY;
-+			goto fail1;
-+		}
-+
-+		edma_cc[j] = kzalloc(sizeof(struct edma), GFP_KERNEL);
-+		if (!edma_cc[j]) {
-+			status = -ENOMEM;
-+			goto fail1;
-+		}
-+
-+		edma_cc[j]->num_channels = min_t(unsigned, info[j]->n_channel,
-+							EDMA_MAX_DMACH);
-+		edma_cc[j]->num_slots = min_t(unsigned, info[j]->n_slot,
-+							EDMA_MAX_PARAMENTRY);
-+		edma_cc[j]->num_cc = min_t(unsigned, info[j]->n_cc,
-+							EDMA_MAX_CC);
-+
-+		edma_cc[j]->default_queue = info[j]->default_queue;
-+
-+		dev_dbg(&pdev->dev, "DMA REG BASE ADDR=%p\n",
-+			edmacc_regs_base[j]);
-+
-+		for (i = 0; i < edma_cc[j]->num_slots; i++)
-+			memcpy_toio(edmacc_regs_base[j] + PARM_OFFSET(i),
-+					&dummy_paramset, PARM_SIZE);
-+
-+		/* Mark all channels as unused */
-+		memset(edma_cc[j]->edma_unused, 0xff,
-+			sizeof(edma_cc[j]->edma_unused));
-+
-+		if (info[j]->rsv) {
-+
-+			/* Clear the reserved channels in unused list */
-+			rsv_chans = info[j]->rsv->rsv_chans;
-+			if (rsv_chans) {
-+				for (i = 0; rsv_chans[i][0] != -1; i++) {
-+					off = rsv_chans[i][0];
-+					ln = rsv_chans[i][1];
-+					clear_bits(off, ln,
-+						edma_cc[j]->edma_unused);
-+				}
-+			}
-+
-+			/* Set the reserved slots in inuse list */
-+			rsv_slots = info[j]->rsv->rsv_slots;
-+			if (rsv_slots) {
-+				for (i = 0; rsv_slots[i][0] != -1; i++) {
-+					off = rsv_slots[i][0];
-+					ln = rsv_slots[i][1];
-+					set_bits(off, ln,
-+						edma_cc[j]->edma_inuse);
-+				}
-+			}
-+		}
-+
-+		sprintf(irq_name, "edma%d", j);
-+		irq[j] = platform_get_irq_byname(pdev, irq_name);
-+		edma_cc[j]->irq_res_start = irq[j];
-+		status = request_irq(irq[j], dma_irq_handler, 0, "edma",
-+					&pdev->dev);
-+		if (status < 0) {
-+			dev_dbg(&pdev->dev, "request_irq %d failed --> %d\n",
-+				irq[j], status);
-+			goto fail;
-+		}
-+
-+		sprintf(irq_name, "edma%d_err", j);
-+		err_irq[j] = platform_get_irq_byname(pdev, irq_name);
-+		edma_cc[j]->irq_res_end = err_irq[j];
-+		status = request_irq(err_irq[j], dma_ccerr_handler, 0,
-+					"edma_error", &pdev->dev);
-+		if (status < 0) {
-+			dev_dbg(&pdev->dev, "request_irq %d failed --> %d\n",
-+				err_irq[j], status);
-+			goto fail;
-+		}
-+
-+		for (i = 0; i < edma_cc[j]->num_channels; i++)
-+			map_dmach_queue(j, i, info[j]->default_queue);
-+
-+		queue_tc_mapping = info[j]->queue_tc_mapping;
-+		queue_priority_mapping = info[j]->queue_priority_mapping;
-+
-+		/* Event queue to TC mapping */
-+		for (i = 0; queue_tc_mapping[i][0] != -1; i++)
-+			map_queue_tc(j, queue_tc_mapping[i][0],
-+					queue_tc_mapping[i][1]);
-+
-+		/* Event queue priority mapping */
-+		for (i = 0; queue_priority_mapping[i][0] != -1; i++)
-+			assign_priority_to_queue(j,
-+						queue_priority_mapping[i][0],
-+						queue_priority_mapping[i][1]);
-+
-+		/* Map the channel to param entry if channel mapping logic
-+		 * exist
-+		 */
-+		if (edma_read(j, EDMA_CCCFG) & CHMAP_EXIST)
-+			map_dmach_param(j);
-+
-+		for (i = 0; i < info[j]->n_region; i++) {
-+			edma_write_array2(j, EDMA_DRAE, i, 0, 0x0);
-+			edma_write_array2(j, EDMA_DRAE, i, 1, 0x0);
-+			edma_write_array(j, EDMA_QRAE, i, 0x0);
-+		}
-+		arch_num_cc++;
-+	}
-+
-+	if (tc_errs_handled) {
-+		status = request_irq(IRQ_TCERRINT0, dma_tc0err_handler, 0,
-+					"edma_tc0", &pdev->dev);
-+		if (status < 0) {
-+			dev_dbg(&pdev->dev, "request_irq %d failed --> %d\n",
-+				IRQ_TCERRINT0, status);
-+			return status;
-+		}
-+		status = request_irq(IRQ_TCERRINT, dma_tc1err_handler, 0,
-+					"edma_tc1", &pdev->dev);
-+		if (status < 0) {
-+			dev_dbg(&pdev->dev, "request_irq %d --> %d\n",
-+				IRQ_TCERRINT, status);
-+			return status;
-+		}
-+	}
-+
-+	return 0;
-+
-+fail:
-+	for (i = 0; i < EDMA_MAX_CC; i++) {
-+		if (err_irq[i])
-+			free_irq(err_irq[i], &pdev->dev);
-+		if (irq[i])
-+			free_irq(irq[i], &pdev->dev);
-+	}
-+fail1:
-+	for (i = 0; i < EDMA_MAX_CC; i++) {
-+		if (r[i])
-+			release_mem_region(r[i]->start, len[i]);
-+		if (edmacc_regs_base[i])
-+			iounmap(edmacc_regs_base[i]);
-+		kfree(edma_cc[i]);
-+	}
-+	return status;
-+}
-+
-+
-+static struct platform_driver edma_driver = {
-+	.driver.name	= "edma",
-+};
-+
-+static int __init edma_init(void)
-+{
-+	return platform_driver_probe(&edma_driver, edma_probe);
-+}
-+arch_initcall(edma_init);
-diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile
-index fb5c1aa..493a36b 100644
---- a/arch/arm/mach-davinci/Makefile
-+++ b/arch/arm/mach-davinci/Makefile
-@@ -5,7 +5,7 @@
- 
- # Common objects
- obj-y 			:= time.o clock.o serial.o psc.o \
--			   dma.o usb.o common.o sram.o aemif.o
-+			   usb.o common.o sram.o aemif.o
- 
- obj-$(CONFIG_DAVINCI_MUX)		+= mux.o
- 
-diff --git a/arch/arm/mach-davinci/board-tnetv107x-evm.c b/arch/arm/mach-davinci/board-tnetv107x-evm.c
-index be30997..86f55ba 100644
---- a/arch/arm/mach-davinci/board-tnetv107x-evm.c
-+++ b/arch/arm/mach-davinci/board-tnetv107x-evm.c
-@@ -26,12 +26,12 @@
- #include <linux/input.h>
- #include <linux/input/matrix_keypad.h>
- #include <linux/spi/spi.h>
-+#include <linux/platform_data/edma.h>
- 
- #include <asm/mach/arch.h>
- #include <asm/mach-types.h>
- 
- #include <mach/irqs.h>
--#include <mach/edma.h>
- #include <mach/mux.h>
- #include <mach/cp_intc.h>
- #include <mach/tnetv107x.h>
-diff --git a/arch/arm/mach-davinci/davinci.h b/arch/arm/mach-davinci/davinci.h
-index 12d544b..d26a6bc 100644
---- a/arch/arm/mach-davinci/davinci.h
-+++ b/arch/arm/mach-davinci/davinci.h
-@@ -23,9 +23,9 @@
- #include <linux/platform_device.h>
- #include <linux/spi/spi.h>
- #include <linux/platform_data/davinci_asp.h>
-+#include <linux/platform_data/edma.h>
- #include <linux/platform_data/keyscan-davinci.h>
- #include <mach/hardware.h>
--#include <mach/edma.h>
- 
- #include <media/davinci/vpfe_capture.h>
- #include <media/davinci/vpif_types.h>
-diff --git a/arch/arm/mach-davinci/devices-tnetv107x.c b/arch/arm/mach-davinci/devices-tnetv107x.c
-index 773ab07..ba37760 100644
---- a/arch/arm/mach-davinci/devices-tnetv107x.c
-+++ b/arch/arm/mach-davinci/devices-tnetv107x.c
-@@ -18,10 +18,10 @@
- #include <linux/dma-mapping.h>
- #include <linux/clk.h>
- #include <linux/slab.h>
-+#include <linux/platform_data/edma.h>
- 
- #include <mach/common.h>
- #include <mach/irqs.h>
--#include <mach/edma.h>
- #include <mach/tnetv107x.h>
- 
- #include "clock.h"
-diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c
-index 4c48a36..3bdf9f7 100644
---- a/arch/arm/mach-davinci/devices.c
-+++ b/arch/arm/mach-davinci/devices.c
-@@ -19,9 +19,10 @@
- #include <mach/irqs.h>
- #include <mach/cputype.h>
- #include <mach/mux.h>
--#include <mach/edma.h>
- #include <linux/platform_data/mmc-davinci.h>
- #include <mach/time.h>
-+#include <linux/platform_data/edma.h>
-+
- 
- #include "davinci.h"
- #include "clock.h"
-@@ -141,10 +142,10 @@ static struct resource mmcsd0_resources[] = {
- 	},
- 	/* DMA channels: RX, then TX */
- 	{
--		.start = EDMA_CTLR_CHAN(0, DAVINCI_DMA_MMCRXEVT),
-+		.start = EDMA_CTLR_CHAN(0, 26),	/* MMCRXEVT */
- 		.flags = IORESOURCE_DMA,
- 	}, {
--		.start = EDMA_CTLR_CHAN(0, DAVINCI_DMA_MMCTXEVT),
-+		.start = EDMA_CTLR_CHAN(0, 27),	/* MMCTXEVT */
- 		.flags = IORESOURCE_DMA,
- 	},
- };
-diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
-index b49c3b7..53998d8 100644
---- a/arch/arm/mach-davinci/dm355.c
-+++ b/arch/arm/mach-davinci/dm355.c
-@@ -19,7 +19,6 @@
- #include <asm/mach/map.h>
- 
- #include <mach/cputype.h>
--#include <mach/edma.h>
- #include <mach/psc.h>
- #include <mach/mux.h>
- #include <mach/irqs.h>
-@@ -28,6 +27,7 @@
- #include <mach/common.h>
- #include <linux/platform_data/spi-davinci.h>
- #include <mach/gpio-davinci.h>
-+#include <linux/platform_data/edma.h>
- 
- #include "davinci.h"
- #include "clock.h"
-diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
-index 6c39805..9b41d33 100644
---- a/arch/arm/mach-davinci/dm365.c
-+++ b/arch/arm/mach-davinci/dm365.c
-@@ -18,11 +18,11 @@
- #include <linux/platform_device.h>
- #include <linux/dma-mapping.h>
- #include <linux/spi/spi.h>
-+#include <linux/platform_data/edma.h>
- 
- #include <asm/mach/map.h>
- 
- #include <mach/cputype.h>
--#include <mach/edma.h>
- #include <mach/psc.h>
- #include <mach/mux.h>
- #include <mach/irqs.h>
-diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
-index 11c79a3..a08910e 100644
---- a/arch/arm/mach-davinci/dm644x.c
-+++ b/arch/arm/mach-davinci/dm644x.c
-@@ -12,11 +12,11 @@
- #include <linux/clk.h>
- #include <linux/serial_8250.h>
- #include <linux/platform_device.h>
-+#include <linux/platform_data/edma.h>
- 
- #include <asm/mach/map.h>
- 
- #include <mach/cputype.h>
--#include <mach/edma.h>
- #include <mach/irqs.h>
- #include <mach/psc.h>
- #include <mach/mux.h>
-diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
-index ac7b431..6d52a32 100644
---- a/arch/arm/mach-davinci/dm646x.c
-+++ b/arch/arm/mach-davinci/dm646x.c
-@@ -13,11 +13,11 @@
- #include <linux/clk.h>
- #include <linux/serial_8250.h>
- #include <linux/platform_device.h>
-+#include <linux/platform_data/edma.h>
- 
- #include <asm/mach/map.h>
- 
- #include <mach/cputype.h>
--#include <mach/edma.h>
- #include <mach/irqs.h>
- #include <mach/psc.h>
- #include <mach/mux.h>
-diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c
-deleted file mode 100644
-index a685e97..0000000
---- a/arch/arm/mach-davinci/dma.c
-+++ /dev/null
-@@ -1,1588 +0,0 @@
--/*
-- * EDMA3 support for DaVinci
-- *
-- * Copyright (C) 2006-2009 Texas Instruments.
-- *
-- * This program is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published by
-- * the Free Software Foundation; either version 2 of the License, or
-- * (at your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-- */
--#include <linux/kernel.h>
--#include <linux/init.h>
--#include <linux/module.h>
--#include <linux/interrupt.h>
--#include <linux/platform_device.h>
--#include <linux/io.h>
--#include <linux/slab.h>
--
--#include <mach/edma.h>
--
--/* Offsets matching "struct edmacc_param" */
--#define PARM_OPT		0x00
--#define PARM_SRC		0x04
--#define PARM_A_B_CNT		0x08
--#define PARM_DST		0x0c
--#define PARM_SRC_DST_BIDX	0x10
--#define PARM_LINK_BCNTRLD	0x14
--#define PARM_SRC_DST_CIDX	0x18
--#define PARM_CCNT		0x1c
--
--#define PARM_SIZE		0x20
--
--/* Offsets for EDMA CC global channel registers and their shadows */
--#define SH_ER		0x00	/* 64 bits */
--#define SH_ECR		0x08	/* 64 bits */
--#define SH_ESR		0x10	/* 64 bits */
--#define SH_CER		0x18	/* 64 bits */
--#define SH_EER		0x20	/* 64 bits */
--#define SH_EECR		0x28	/* 64 bits */
--#define SH_EESR		0x30	/* 64 bits */
--#define SH_SER		0x38	/* 64 bits */
--#define SH_SECR		0x40	/* 64 bits */
--#define SH_IER		0x50	/* 64 bits */
--#define SH_IECR		0x58	/* 64 bits */
--#define SH_IESR		0x60	/* 64 bits */
--#define SH_IPR		0x68	/* 64 bits */
--#define SH_ICR		0x70	/* 64 bits */
--#define SH_IEVAL	0x78
--#define SH_QER		0x80
--#define SH_QEER		0x84
--#define SH_QEECR	0x88
--#define SH_QEESR	0x8c
--#define SH_QSER		0x90
--#define SH_QSECR	0x94
--#define SH_SIZE		0x200
--
--/* Offsets for EDMA CC global registers */
--#define EDMA_REV	0x0000
--#define EDMA_CCCFG	0x0004
--#define EDMA_QCHMAP	0x0200	/* 8 registers */
--#define EDMA_DMAQNUM	0x0240	/* 8 registers (4 on OMAP-L1xx) */
--#define EDMA_QDMAQNUM	0x0260
--#define EDMA_QUETCMAP	0x0280
--#define EDMA_QUEPRI	0x0284
--#define EDMA_EMR	0x0300	/* 64 bits */
--#define EDMA_EMCR	0x0308	/* 64 bits */
--#define EDMA_QEMR	0x0310
--#define EDMA_QEMCR	0x0314
--#define EDMA_CCERR	0x0318
--#define EDMA_CCERRCLR	0x031c
--#define EDMA_EEVAL	0x0320
--#define EDMA_DRAE	0x0340	/* 4 x 64 bits*/
--#define EDMA_QRAE	0x0380	/* 4 registers */
--#define EDMA_QUEEVTENTRY	0x0400	/* 2 x 16 registers */
--#define EDMA_QSTAT	0x0600	/* 2 registers */
--#define EDMA_QWMTHRA	0x0620
--#define EDMA_QWMTHRB	0x0624
--#define EDMA_CCSTAT	0x0640
--
--#define EDMA_M		0x1000	/* global channel registers */
--#define EDMA_ECR	0x1008
--#define EDMA_ECRH	0x100C
--#define EDMA_SHADOW0	0x2000	/* 4 regions shadowing global channels */
--#define EDMA_PARM	0x4000	/* 128 param entries */
--
--#define PARM_OFFSET(param_no)	(EDMA_PARM + ((param_no) << 5))
--
--#define EDMA_DCHMAP	0x0100  /* 64 registers */
--#define CHMAP_EXIST	BIT(24)
--
--#define EDMA_MAX_DMACH           64
--#define EDMA_MAX_PARAMENTRY     512
--
--/*****************************************************************************/
--
--static void __iomem *edmacc_regs_base[EDMA_MAX_CC];
--
--static inline unsigned int edma_read(unsigned ctlr, int offset)
--{
--	return (unsigned int)__raw_readl(edmacc_regs_base[ctlr] + offset);
--}
--
--static inline void edma_write(unsigned ctlr, int offset, int val)
--{
--	__raw_writel(val, edmacc_regs_base[ctlr] + offset);
--}
--static inline void edma_modify(unsigned ctlr, int offset, unsigned and,
--		unsigned or)
--{
--	unsigned val = edma_read(ctlr, offset);
--	val &= and;
--	val |= or;
--	edma_write(ctlr, offset, val);
--}
--static inline void edma_and(unsigned ctlr, int offset, unsigned and)
--{
--	unsigned val = edma_read(ctlr, offset);
--	val &= and;
--	edma_write(ctlr, offset, val);
--}
--static inline void edma_or(unsigned ctlr, int offset, unsigned or)
--{
--	unsigned val = edma_read(ctlr, offset);
--	val |= or;
--	edma_write(ctlr, offset, val);
--}
--static inline unsigned int edma_read_array(unsigned ctlr, int offset, int i)
--{
--	return edma_read(ctlr, offset + (i << 2));
--}
--static inline void edma_write_array(unsigned ctlr, int offset, int i,
--		unsigned val)
--{
--	edma_write(ctlr, offset + (i << 2), val);
--}
--static inline void edma_modify_array(unsigned ctlr, int offset, int i,
--		unsigned and, unsigned or)
--{
--	edma_modify(ctlr, offset + (i << 2), and, or);
--}
--static inline void edma_or_array(unsigned ctlr, int offset, int i, unsigned or)
--{
--	edma_or(ctlr, offset + (i << 2), or);
--}
--static inline void edma_or_array2(unsigned ctlr, int offset, int i, int j,
--		unsigned or)
--{
--	edma_or(ctlr, offset + ((i*2 + j) << 2), or);
--}
--static inline void edma_write_array2(unsigned ctlr, int offset, int i, int j,
--		unsigned val)
--{
--	edma_write(ctlr, offset + ((i*2 + j) << 2), val);
--}
--static inline unsigned int edma_shadow0_read(unsigned ctlr, int offset)
--{
--	return edma_read(ctlr, EDMA_SHADOW0 + offset);
--}
--static inline unsigned int edma_shadow0_read_array(unsigned ctlr, int offset,
--		int i)
--{
--	return edma_read(ctlr, EDMA_SHADOW0 + offset + (i << 2));
--}
--static inline void edma_shadow0_write(unsigned ctlr, int offset, unsigned val)
--{
--	edma_write(ctlr, EDMA_SHADOW0 + offset, val);
--}
--static inline void edma_shadow0_write_array(unsigned ctlr, int offset, int i,
--		unsigned val)
--{
--	edma_write(ctlr, EDMA_SHADOW0 + offset + (i << 2), val);
--}
--static inline unsigned int edma_parm_read(unsigned ctlr, int offset,
--		int param_no)
--{
--	return edma_read(ctlr, EDMA_PARM + offset + (param_no << 5));
--}
--static inline void edma_parm_write(unsigned ctlr, int offset, int param_no,
--		unsigned val)
--{
--	edma_write(ctlr, EDMA_PARM + offset + (param_no << 5), val);
--}
--static inline void edma_parm_modify(unsigned ctlr, int offset, int param_no,
--		unsigned and, unsigned or)
--{
--	edma_modify(ctlr, EDMA_PARM + offset + (param_no << 5), and, or);
--}
--static inline void edma_parm_and(unsigned ctlr, int offset, int param_no,
--		unsigned and)
--{
--	edma_and(ctlr, EDMA_PARM + offset + (param_no << 5), and);
--}
--static inline void edma_parm_or(unsigned ctlr, int offset, int param_no,
--		unsigned or)
--{
--	edma_or(ctlr, EDMA_PARM + offset + (param_no << 5), or);
--}
--
--static inline void set_bits(int offset, int len, unsigned long *p)
--{
--	for (; len > 0; len--)
--		set_bit(offset + (len - 1), p);
--}
--
--static inline void clear_bits(int offset, int len, unsigned long *p)
--{
--	for (; len > 0; len--)
--		clear_bit(offset + (len - 1), p);
--}
--
--/*****************************************************************************/
--
--/* actual number of DMA channels and slots on this silicon */
--struct edma {
--	/* how many dma resources of each type */
--	unsigned	num_channels;
--	unsigned	num_region;
--	unsigned	num_slots;
--	unsigned	num_tc;
--	unsigned	num_cc;
--	enum dma_event_q 	default_queue;
--
--	/* list of channels with no even trigger; terminated by "-1" */
--	const s8	*noevent;
--
--	/* The edma_inuse bit for each PaRAM slot is clear unless the
--	 * channel is in use ... by ARM or DSP, for QDMA, or whatever.
--	 */
--	DECLARE_BITMAP(edma_inuse, EDMA_MAX_PARAMENTRY);
--
--	/* The edma_unused bit for each channel is clear unless
--	 * it is not being used on this platform. It uses a bit
--	 * of SOC-specific initialization code.
--	 */
--	DECLARE_BITMAP(edma_unused, EDMA_MAX_DMACH);
--
--	unsigned	irq_res_start;
--	unsigned	irq_res_end;
--
--	struct dma_interrupt_data {
--		void (*callback)(unsigned channel, unsigned short ch_status,
--				void *data);
--		void *data;
--	} intr_data[EDMA_MAX_DMACH];
--};
--
--static struct edma *edma_cc[EDMA_MAX_CC];
--static int arch_num_cc;
--
--/* dummy param set used to (re)initialize parameter RAM slots */
--static const struct edmacc_param dummy_paramset = {
--	.link_bcntrld = 0xffff,
--	.ccnt = 1,
--};
--
--/*****************************************************************************/
--
--static void map_dmach_queue(unsigned ctlr, unsigned ch_no,
--		enum dma_event_q queue_no)
--{
--	int bit = (ch_no & 0x7) * 4;
--
--	/* default to low priority queue */
--	if (queue_no == EVENTQ_DEFAULT)
--		queue_no = edma_cc[ctlr]->default_queue;
--
--	queue_no &= 7;
--	edma_modify_array(ctlr, EDMA_DMAQNUM, (ch_no >> 3),
--			~(0x7 << bit), queue_no << bit);
--}
--
--static void __init map_queue_tc(unsigned ctlr, int queue_no, int tc_no)
--{
--	int bit = queue_no * 4;
--	edma_modify(ctlr, EDMA_QUETCMAP, ~(0x7 << bit), ((tc_no & 0x7) << bit));
--}
--
--static void __init assign_priority_to_queue(unsigned ctlr, int queue_no,
--		int priority)
--{
--	int bit = queue_no * 4;
--	edma_modify(ctlr, EDMA_QUEPRI, ~(0x7 << bit),
--			((priority & 0x7) << bit));
--}
--
--/**
-- * map_dmach_param - Maps channel number to param entry number
-- *
-- * This maps the dma channel number to param entry numberter. In
-- * other words using the DMA channel mapping registers a param entry
-- * can be mapped to any channel
-- *
-- * Callers are responsible for ensuring the channel mapping logic is
-- * included in that particular EDMA variant (Eg : dm646x)
-- *
-- */
--static void __init map_dmach_param(unsigned ctlr)
--{
--	int i;
--	for (i = 0; i < EDMA_MAX_DMACH; i++)
--		edma_write_array(ctlr, EDMA_DCHMAP , i , (i << 5));
--}
--
--static inline void
--setup_dma_interrupt(unsigned lch,
--	void (*callback)(unsigned channel, u16 ch_status, void *data),
--	void *data)
--{
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(lch);
--	lch = EDMA_CHAN_SLOT(lch);
--
--	if (!callback)
--		edma_shadow0_write_array(ctlr, SH_IECR, lch >> 5,
--				BIT(lch & 0x1f));
--
--	edma_cc[ctlr]->intr_data[lch].callback = callback;
--	edma_cc[ctlr]->intr_data[lch].data = data;
--
--	if (callback) {
--		edma_shadow0_write_array(ctlr, SH_ICR, lch >> 5,
--				BIT(lch & 0x1f));
--		edma_shadow0_write_array(ctlr, SH_IESR, lch >> 5,
--				BIT(lch & 0x1f));
--	}
--}
--
--static int irq2ctlr(int irq)
--{
--	if (irq >= edma_cc[0]->irq_res_start && irq <= edma_cc[0]->irq_res_end)
--		return 0;
--	else if (irq >= edma_cc[1]->irq_res_start &&
--		irq <= edma_cc[1]->irq_res_end)
--		return 1;
--
--	return -1;
--}
--
--/******************************************************************************
-- *
-- * DMA interrupt handler
-- *
-- *****************************************************************************/
--static irqreturn_t dma_irq_handler(int irq, void *data)
--{
--	int ctlr;
--	u32 sh_ier;
--	u32 sh_ipr;
--	u32 bank;
--
--	ctlr = irq2ctlr(irq);
--	if (ctlr < 0)
--		return IRQ_NONE;
--
--	dev_dbg(data, "dma_irq_handler\n");
--
--	sh_ipr = edma_shadow0_read_array(ctlr, SH_IPR, 0);
--	if (!sh_ipr) {
--		sh_ipr = edma_shadow0_read_array(ctlr, SH_IPR, 1);
--		if (!sh_ipr)
--			return IRQ_NONE;
--		sh_ier = edma_shadow0_read_array(ctlr, SH_IER, 1);
--		bank = 1;
--	} else {
--		sh_ier = edma_shadow0_read_array(ctlr, SH_IER, 0);
--		bank = 0;
--	}
--
--	do {
--		u32 slot;
--		u32 channel;
--
--		dev_dbg(data, "IPR%d %08x\n", bank, sh_ipr);
--
--		slot = __ffs(sh_ipr);
--		sh_ipr &= ~(BIT(slot));
--
--		if (sh_ier & BIT(slot)) {
--			channel = (bank << 5) | slot;
--			/* Clear the corresponding IPR bits */
--			edma_shadow0_write_array(ctlr, SH_ICR, bank,
--					BIT(slot));
--			if (edma_cc[ctlr]->intr_data[channel].callback)
--				edma_cc[ctlr]->intr_data[channel].callback(
--					channel, DMA_COMPLETE,
--					edma_cc[ctlr]->intr_data[channel].data);
--		}
--	} while (sh_ipr);
--
--	edma_shadow0_write(ctlr, SH_IEVAL, 1);
--	return IRQ_HANDLED;
--}
--
--/******************************************************************************
-- *
-- * DMA error interrupt handler
-- *
-- *****************************************************************************/
--static irqreturn_t dma_ccerr_handler(int irq, void *data)
--{
--	int i;
--	int ctlr;
--	unsigned int cnt = 0;
--
--	ctlr = irq2ctlr(irq);
--	if (ctlr < 0)
--		return IRQ_NONE;
--
--	dev_dbg(data, "dma_ccerr_handler\n");
--
--	if ((edma_read_array(ctlr, EDMA_EMR, 0) == 0) &&
--	    (edma_read_array(ctlr, EDMA_EMR, 1) == 0) &&
--	    (edma_read(ctlr, EDMA_QEMR) == 0) &&
--	    (edma_read(ctlr, EDMA_CCERR) == 0))
--		return IRQ_NONE;
--
--	while (1) {
--		int j = -1;
--		if (edma_read_array(ctlr, EDMA_EMR, 0))
--			j = 0;
--		else if (edma_read_array(ctlr, EDMA_EMR, 1))
--			j = 1;
--		if (j >= 0) {
--			dev_dbg(data, "EMR%d %08x\n", j,
--					edma_read_array(ctlr, EDMA_EMR, j));
--			for (i = 0; i < 32; i++) {
--				int k = (j << 5) + i;
--				if (edma_read_array(ctlr, EDMA_EMR, j) &
--							BIT(i)) {
--					/* Clear the corresponding EMR bits */
--					edma_write_array(ctlr, EDMA_EMCR, j,
--							BIT(i));
--					/* Clear any SER */
--					edma_shadow0_write_array(ctlr, SH_SECR,
--								j, BIT(i));
--					if (edma_cc[ctlr]->intr_data[k].
--								callback) {
--						edma_cc[ctlr]->intr_data[k].
--						callback(k,
--						DMA_CC_ERROR,
--						edma_cc[ctlr]->intr_data
--						[k].data);
--					}
--				}
--			}
--		} else if (edma_read(ctlr, EDMA_QEMR)) {
--			dev_dbg(data, "QEMR %02x\n",
--				edma_read(ctlr, EDMA_QEMR));
--			for (i = 0; i < 8; i++) {
--				if (edma_read(ctlr, EDMA_QEMR) & BIT(i)) {
--					/* Clear the corresponding IPR bits */
--					edma_write(ctlr, EDMA_QEMCR, BIT(i));
--					edma_shadow0_write(ctlr, SH_QSECR,
--								BIT(i));
--
--					/* NOTE:  not reported!! */
--				}
--			}
--		} else if (edma_read(ctlr, EDMA_CCERR)) {
--			dev_dbg(data, "CCERR %08x\n",
--				edma_read(ctlr, EDMA_CCERR));
--			/* FIXME:  CCERR.BIT(16) ignored!  much better
--			 * to just write CCERRCLR with CCERR value...
--			 */
--			for (i = 0; i < 8; i++) {
--				if (edma_read(ctlr, EDMA_CCERR) & BIT(i)) {
--					/* Clear the corresponding IPR bits */
--					edma_write(ctlr, EDMA_CCERRCLR, BIT(i));
--
--					/* NOTE:  not reported!! */
--				}
--			}
--		}
--		if ((edma_read_array(ctlr, EDMA_EMR, 0) == 0) &&
--		    (edma_read_array(ctlr, EDMA_EMR, 1) == 0) &&
--		    (edma_read(ctlr, EDMA_QEMR) == 0) &&
--		    (edma_read(ctlr, EDMA_CCERR) == 0))
--			break;
--		cnt++;
--		if (cnt > 10)
--			break;
--	}
--	edma_write(ctlr, EDMA_EEVAL, 1);
--	return IRQ_HANDLED;
--}
--
--/******************************************************************************
-- *
-- * Transfer controller error interrupt handlers
-- *
-- *****************************************************************************/
--
--#define tc_errs_handled	false	/* disabled as long as they're NOPs */
--
--static irqreturn_t dma_tc0err_handler(int irq, void *data)
--{
--	dev_dbg(data, "dma_tc0err_handler\n");
--	return IRQ_HANDLED;
--}
--
--static irqreturn_t dma_tc1err_handler(int irq, void *data)
--{
--	dev_dbg(data, "dma_tc1err_handler\n");
--	return IRQ_HANDLED;
--}
--
--static int reserve_contiguous_slots(int ctlr, unsigned int id,
--				     unsigned int num_slots,
--				     unsigned int start_slot)
--{
--	int i, j;
--	unsigned int count = num_slots;
--	int stop_slot = start_slot;
--	DECLARE_BITMAP(tmp_inuse, EDMA_MAX_PARAMENTRY);
--
--	for (i = start_slot; i < edma_cc[ctlr]->num_slots; ++i) {
--		j = EDMA_CHAN_SLOT(i);
--		if (!test_and_set_bit(j, edma_cc[ctlr]->edma_inuse)) {
--			/* Record our current beginning slot */
--			if (count == num_slots)
--				stop_slot = i;
--
--			count--;
--			set_bit(j, tmp_inuse);
--
--			if (count == 0)
--				break;
--		} else {
--			clear_bit(j, tmp_inuse);
--
--			if (id == EDMA_CONT_PARAMS_FIXED_EXACT) {
--				stop_slot = i;
--				break;
--			} else {
--				count = num_slots;
--			}
--		}
--	}
--
--	/*
--	 * We have to clear any bits that we set
--	 * if we run out parameter RAM slots, i.e we do find a set
--	 * of contiguous parameter RAM slots but do not find the exact number
--	 * requested as we may reach the total number of parameter RAM slots
--	 */
--	if (i == edma_cc[ctlr]->num_slots)
--		stop_slot = i;
--
--	j = start_slot;
--	for_each_set_bit_from(j, tmp_inuse, stop_slot)
--		clear_bit(j, edma_cc[ctlr]->edma_inuse);
--
--	if (count)
--		return -EBUSY;
--
--	for (j = i - num_slots + 1; j <= i; ++j)
--		memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(j),
--			&dummy_paramset, PARM_SIZE);
--
--	return EDMA_CTLR_CHAN(ctlr, i - num_slots + 1);
--}
--
--static int prepare_unused_channel_list(struct device *dev, void *data)
--{
--	struct platform_device *pdev = to_platform_device(dev);
--	int i, ctlr;
--
--	for (i = 0; i < pdev->num_resources; i++) {
--		if ((pdev->resource[i].flags & IORESOURCE_DMA) &&
--				(int)pdev->resource[i].start >= 0) {
--			ctlr = EDMA_CTLR(pdev->resource[i].start);
--			clear_bit(EDMA_CHAN_SLOT(pdev->resource[i].start),
--					edma_cc[ctlr]->edma_unused);
--		}
--	}
--
--	return 0;
--}
--
--/*-----------------------------------------------------------------------*/
--
--static bool unused_chan_list_done;
--
--/* Resource alloc/free:  dma channels, parameter RAM slots */
--
--/**
-- * edma_alloc_channel - allocate DMA channel and paired parameter RAM
-- * @channel: specific channel to allocate; negative for "any unmapped channel"
-- * @callback: optional; to be issued on DMA completion or errors
-- * @data: passed to callback
-- * @eventq_no: an EVENTQ_* constant, used to choose which Transfer
-- *	Controller (TC) executes requests using this channel.  Use
-- *	EVENTQ_DEFAULT unless you really need a high priority queue.
-- *
-- * This allocates a DMA channel and its associated parameter RAM slot.
-- * The parameter RAM is initialized to hold a dummy transfer.
-- *
-- * Normal use is to pass a specific channel number as @channel, to make
-- * use of hardware events mapped to that channel.  When the channel will
-- * be used only for software triggering or event chaining, channels not
-- * mapped to hardware events (or mapped to unused events) are preferable.
-- *
-- * DMA transfers start from a channel using edma_start(), or by
-- * chaining.  When the transfer described in that channel's parameter RAM
-- * slot completes, that slot's data may be reloaded through a link.
-- *
-- * DMA errors are only reported to the @callback associated with the
-- * channel driving that transfer, but transfer completion callbacks can
-- * be sent to another channel under control of the TCC field in
-- * the option word of the transfer's parameter RAM set.  Drivers must not
-- * use DMA transfer completion callbacks for channels they did not allocate.
-- * (The same applies to TCC codes used in transfer chaining.)
-- *
-- * Returns the number of the channel, else negative errno.
-- */
--int edma_alloc_channel(int channel,
--		void (*callback)(unsigned channel, u16 ch_status, void *data),
--		void *data,
--		enum dma_event_q eventq_no)
--{
--	unsigned i, done = 0, ctlr = 0;
--	int ret = 0;
--
--	if (!unused_chan_list_done) {
--		/*
--		 * Scan all the platform devices to find out the EDMA channels
--		 * used and clear them in the unused list, making the rest
--		 * available for ARM usage.
--		 */
--		ret = bus_for_each_dev(&platform_bus_type, NULL, NULL,
--				prepare_unused_channel_list);
--		if (ret < 0)
--			return ret;
--
--		unused_chan_list_done = true;
--	}
--
--	if (channel >= 0) {
--		ctlr = EDMA_CTLR(channel);
--		channel = EDMA_CHAN_SLOT(channel);
--	}
--
--	if (channel < 0) {
--		for (i = 0; i < arch_num_cc; i++) {
--			channel = 0;
--			for (;;) {
--				channel = find_next_bit(edma_cc[i]->edma_unused,
--						edma_cc[i]->num_channels,
--						channel);
--				if (channel == edma_cc[i]->num_channels)
--					break;
--				if (!test_and_set_bit(channel,
--						edma_cc[i]->edma_inuse)) {
--					done = 1;
--					ctlr = i;
--					break;
--				}
--				channel++;
--			}
--			if (done)
--				break;
--		}
--		if (!done)
--			return -ENOMEM;
--	} else if (channel >= edma_cc[ctlr]->num_channels) {
--		return -EINVAL;
--	} else if (test_and_set_bit(channel, edma_cc[ctlr]->edma_inuse)) {
--		return -EBUSY;
--	}
--
--	/* ensure access through shadow region 0 */
--	edma_or_array2(ctlr, EDMA_DRAE, 0, channel >> 5, BIT(channel & 0x1f));
--
--	/* ensure no events are pending */
--	edma_stop(EDMA_CTLR_CHAN(ctlr, channel));
--	memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(channel),
--			&dummy_paramset, PARM_SIZE);
--
--	if (callback)
--		setup_dma_interrupt(EDMA_CTLR_CHAN(ctlr, channel),
--					callback, data);
--
--	map_dmach_queue(ctlr, channel, eventq_no);
--
--	return EDMA_CTLR_CHAN(ctlr, channel);
--}
--EXPORT_SYMBOL(edma_alloc_channel);
--
--
--/**
-- * edma_free_channel - deallocate DMA channel
-- * @channel: dma channel returned from edma_alloc_channel()
-- *
-- * This deallocates the DMA channel and associated parameter RAM slot
-- * allocated by edma_alloc_channel().
-- *
-- * Callers are responsible for ensuring the channel is inactive, and
-- * will not be reactivated by linking, chaining, or software calls to
-- * edma_start().
-- */
--void edma_free_channel(unsigned channel)
--{
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(channel);
--	channel = EDMA_CHAN_SLOT(channel);
--
--	if (channel >= edma_cc[ctlr]->num_channels)
--		return;
--
--	setup_dma_interrupt(channel, NULL, NULL);
--	/* REVISIT should probably take out of shadow region 0 */
--
--	memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(channel),
--			&dummy_paramset, PARM_SIZE);
--	clear_bit(channel, edma_cc[ctlr]->edma_inuse);
--}
--EXPORT_SYMBOL(edma_free_channel);
--
--/**
-- * edma_alloc_slot - allocate DMA parameter RAM
-- * @slot: specific slot to allocate; negative for "any unused slot"
-- *
-- * This allocates a parameter RAM slot, initializing it to hold a
-- * dummy transfer.  Slots allocated using this routine have not been
-- * mapped to a hardware DMA channel, and will normally be used by
-- * linking to them from a slot associated with a DMA channel.
-- *
-- * Normal use is to pass EDMA_SLOT_ANY as the @slot, but specific
-- * slots may be allocated on behalf of DSP firmware.
-- *
-- * Returns the number of the slot, else negative errno.
-- */
--int edma_alloc_slot(unsigned ctlr, int slot)
--{
--	if (slot >= 0)
--		slot = EDMA_CHAN_SLOT(slot);
--
--	if (slot < 0) {
--		slot = edma_cc[ctlr]->num_channels;
--		for (;;) {
--			slot = find_next_zero_bit(edma_cc[ctlr]->edma_inuse,
--					edma_cc[ctlr]->num_slots, slot);
--			if (slot == edma_cc[ctlr]->num_slots)
--				return -ENOMEM;
--			if (!test_and_set_bit(slot, edma_cc[ctlr]->edma_inuse))
--				break;
--		}
--	} else if (slot < edma_cc[ctlr]->num_channels ||
--			slot >= edma_cc[ctlr]->num_slots) {
--		return -EINVAL;
--	} else if (test_and_set_bit(slot, edma_cc[ctlr]->edma_inuse)) {
--		return -EBUSY;
--	}
--
--	memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(slot),
--			&dummy_paramset, PARM_SIZE);
--
--	return EDMA_CTLR_CHAN(ctlr, slot);
--}
--EXPORT_SYMBOL(edma_alloc_slot);
--
--/**
-- * edma_free_slot - deallocate DMA parameter RAM
-- * @slot: parameter RAM slot returned from edma_alloc_slot()
-- *
-- * This deallocates the parameter RAM slot allocated by edma_alloc_slot().
-- * Callers are responsible for ensuring the slot is inactive, and will
-- * not be activated.
-- */
--void edma_free_slot(unsigned slot)
--{
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(slot);
--	slot = EDMA_CHAN_SLOT(slot);
--
--	if (slot < edma_cc[ctlr]->num_channels ||
--		slot >= edma_cc[ctlr]->num_slots)
--		return;
--
--	memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(slot),
--			&dummy_paramset, PARM_SIZE);
--	clear_bit(slot, edma_cc[ctlr]->edma_inuse);
--}
--EXPORT_SYMBOL(edma_free_slot);
--
--
--/**
-- * edma_alloc_cont_slots- alloc contiguous parameter RAM slots
-- * The API will return the starting point of a set of
-- * contiguous parameter RAM slots that have been requested
-- *
-- * @id: can only be EDMA_CONT_PARAMS_ANY or EDMA_CONT_PARAMS_FIXED_EXACT
-- * or EDMA_CONT_PARAMS_FIXED_NOT_EXACT
-- * @count: number of contiguous Paramter RAM slots
-- * @slot  - the start value of Parameter RAM slot that should be passed if id
-- * is EDMA_CONT_PARAMS_FIXED_EXACT or EDMA_CONT_PARAMS_FIXED_NOT_EXACT
-- *
-- * If id is EDMA_CONT_PARAMS_ANY then the API starts looking for a set of
-- * contiguous Parameter RAM slots from parameter RAM 64 in the case of
-- * DaVinci SOCs and 32 in the case of DA8xx SOCs.
-- *
-- * If id is EDMA_CONT_PARAMS_FIXED_EXACT then the API starts looking for a
-- * set of contiguous parameter RAM slots from the "slot" that is passed as an
-- * argument to the API.
-- *
-- * If id is EDMA_CONT_PARAMS_FIXED_NOT_EXACT then the API initially tries
-- * starts looking for a set of contiguous parameter RAMs from the "slot"
-- * that is passed as an argument to the API. On failure the API will try to
-- * find a set of contiguous Parameter RAM slots from the remaining Parameter
-- * RAM slots
-- */
--int edma_alloc_cont_slots(unsigned ctlr, unsigned int id, int slot, int count)
--{
--	/*
--	 * The start slot requested should be greater than
--	 * the number of channels and lesser than the total number
--	 * of slots
--	 */
--	if ((id != EDMA_CONT_PARAMS_ANY) &&
--		(slot < edma_cc[ctlr]->num_channels ||
--		slot >= edma_cc[ctlr]->num_slots))
--		return -EINVAL;
--
--	/*
--	 * The number of parameter RAM slots requested cannot be less than 1
--	 * and cannot be more than the number of slots minus the number of
--	 * channels
--	 */
--	if (count < 1 || count >
--		(edma_cc[ctlr]->num_slots - edma_cc[ctlr]->num_channels))
--		return -EINVAL;
--
--	switch (id) {
--	case EDMA_CONT_PARAMS_ANY:
--		return reserve_contiguous_slots(ctlr, id, count,
--						 edma_cc[ctlr]->num_channels);
--	case EDMA_CONT_PARAMS_FIXED_EXACT:
--	case EDMA_CONT_PARAMS_FIXED_NOT_EXACT:
--		return reserve_contiguous_slots(ctlr, id, count, slot);
--	default:
--		return -EINVAL;
--	}
--
--}
--EXPORT_SYMBOL(edma_alloc_cont_slots);
--
--/**
-- * edma_free_cont_slots - deallocate DMA parameter RAM slots
-- * @slot: first parameter RAM of a set of parameter RAM slots to be freed
-- * @count: the number of contiguous parameter RAM slots to be freed
-- *
-- * This deallocates the parameter RAM slots allocated by
-- * edma_alloc_cont_slots.
-- * Callers/applications need to keep track of sets of contiguous
-- * parameter RAM slots that have been allocated using the edma_alloc_cont_slots
-- * API.
-- * Callers are responsible for ensuring the slots are inactive, and will
-- * not be activated.
-- */
--int edma_free_cont_slots(unsigned slot, int count)
--{
--	unsigned ctlr, slot_to_free;
--	int i;
--
--	ctlr = EDMA_CTLR(slot);
--	slot = EDMA_CHAN_SLOT(slot);
--
--	if (slot < edma_cc[ctlr]->num_channels ||
--		slot >= edma_cc[ctlr]->num_slots ||
--		count < 1)
--		return -EINVAL;
--
--	for (i = slot; i < slot + count; ++i) {
--		ctlr = EDMA_CTLR(i);
--		slot_to_free = EDMA_CHAN_SLOT(i);
--
--		memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(slot_to_free),
--			&dummy_paramset, PARM_SIZE);
--		clear_bit(slot_to_free, edma_cc[ctlr]->edma_inuse);
--	}
--
--	return 0;
--}
--EXPORT_SYMBOL(edma_free_cont_slots);
--
--/*-----------------------------------------------------------------------*/
--
--/* Parameter RAM operations (i) -- read/write partial slots */
--
--/**
-- * edma_set_src - set initial DMA source address in parameter RAM slot
-- * @slot: parameter RAM slot being configured
-- * @src_port: physical address of source (memory, controller FIFO, etc)
-- * @addressMode: INCR, except in very rare cases
-- * @fifoWidth: ignored unless @addressMode is FIFO, else specifies the
-- *	width to use when addressing the fifo (e.g. W8BIT, W32BIT)
-- *
-- * Note that the source address is modified during the DMA transfer
-- * according to edma_set_src_index().
-- */
--void edma_set_src(unsigned slot, dma_addr_t src_port,
--				enum address_mode mode, enum fifo_width width)
--{
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(slot);
--	slot = EDMA_CHAN_SLOT(slot);
--
--	if (slot < edma_cc[ctlr]->num_slots) {
--		unsigned int i = edma_parm_read(ctlr, PARM_OPT, slot);
--
--		if (mode) {
--			/* set SAM and program FWID */
--			i = (i & ~(EDMA_FWID)) | (SAM | ((width & 0x7) << 8));
--		} else {
--			/* clear SAM */
--			i &= ~SAM;
--		}
--		edma_parm_write(ctlr, PARM_OPT, slot, i);
--
--		/* set the source port address
--		   in source register of param structure */
--		edma_parm_write(ctlr, PARM_SRC, slot, src_port);
--	}
--}
--EXPORT_SYMBOL(edma_set_src);
--
--/**
-- * edma_set_dest - set initial DMA destination address in parameter RAM slot
-- * @slot: parameter RAM slot being configured
-- * @dest_port: physical address of destination (memory, controller FIFO, etc)
-- * @addressMode: INCR, except in very rare cases
-- * @fifoWidth: ignored unless @addressMode is FIFO, else specifies the
-- *	width to use when addressing the fifo (e.g. W8BIT, W32BIT)
-- *
-- * Note that the destination address is modified during the DMA transfer
-- * according to edma_set_dest_index().
-- */
--void edma_set_dest(unsigned slot, dma_addr_t dest_port,
--				 enum address_mode mode, enum fifo_width width)
--{
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(slot);
--	slot = EDMA_CHAN_SLOT(slot);
--
--	if (slot < edma_cc[ctlr]->num_slots) {
--		unsigned int i = edma_parm_read(ctlr, PARM_OPT, slot);
--
--		if (mode) {
--			/* set DAM and program FWID */
--			i = (i & ~(EDMA_FWID)) | (DAM | ((width & 0x7) << 8));
--		} else {
--			/* clear DAM */
--			i &= ~DAM;
--		}
--		edma_parm_write(ctlr, PARM_OPT, slot, i);
--		/* set the destination port address
--		   in dest register of param structure */
--		edma_parm_write(ctlr, PARM_DST, slot, dest_port);
--	}
--}
--EXPORT_SYMBOL(edma_set_dest);
--
--/**
-- * edma_get_position - returns the current transfer points
-- * @slot: parameter RAM slot being examined
-- * @src: pointer to source port position
-- * @dst: pointer to destination port position
-- *
-- * Returns current source and destination addresses for a particular
-- * parameter RAM slot.  Its channel should not be active when this is called.
-- */
--void edma_get_position(unsigned slot, dma_addr_t *src, dma_addr_t *dst)
--{
--	struct edmacc_param temp;
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(slot);
--	slot = EDMA_CHAN_SLOT(slot);
--
--	edma_read_slot(EDMA_CTLR_CHAN(ctlr, slot), &temp);
--	if (src != NULL)
--		*src = temp.src;
--	if (dst != NULL)
--		*dst = temp.dst;
--}
--EXPORT_SYMBOL(edma_get_position);
--
--/**
-- * edma_set_src_index - configure DMA source address indexing
-- * @slot: parameter RAM slot being configured
-- * @src_bidx: byte offset between source arrays in a frame
-- * @src_cidx: byte offset between source frames in a block
-- *
-- * Offsets are specified to support either contiguous or discontiguous
-- * memory transfers, or repeated access to a hardware register, as needed.
-- * When accessing hardware registers, both offsets are normally zero.
-- */
--void edma_set_src_index(unsigned slot, s16 src_bidx, s16 src_cidx)
--{
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(slot);
--	slot = EDMA_CHAN_SLOT(slot);
--
--	if (slot < edma_cc[ctlr]->num_slots) {
--		edma_parm_modify(ctlr, PARM_SRC_DST_BIDX, slot,
--				0xffff0000, src_bidx);
--		edma_parm_modify(ctlr, PARM_SRC_DST_CIDX, slot,
--				0xffff0000, src_cidx);
--	}
--}
--EXPORT_SYMBOL(edma_set_src_index);
--
--/**
-- * edma_set_dest_index - configure DMA destination address indexing
-- * @slot: parameter RAM slot being configured
-- * @dest_bidx: byte offset between destination arrays in a frame
-- * @dest_cidx: byte offset between destination frames in a block
-- *
-- * Offsets are specified to support either contiguous or discontiguous
-- * memory transfers, or repeated access to a hardware register, as needed.
-- * When accessing hardware registers, both offsets are normally zero.
-- */
--void edma_set_dest_index(unsigned slot, s16 dest_bidx, s16 dest_cidx)
--{
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(slot);
--	slot = EDMA_CHAN_SLOT(slot);
--
--	if (slot < edma_cc[ctlr]->num_slots) {
--		edma_parm_modify(ctlr, PARM_SRC_DST_BIDX, slot,
--				0x0000ffff, dest_bidx << 16);
--		edma_parm_modify(ctlr, PARM_SRC_DST_CIDX, slot,
--				0x0000ffff, dest_cidx << 16);
--	}
--}
--EXPORT_SYMBOL(edma_set_dest_index);
--
--/**
-- * edma_set_transfer_params - configure DMA transfer parameters
-- * @slot: parameter RAM slot being configured
-- * @acnt: how many bytes per array (at least one)
-- * @bcnt: how many arrays per frame (at least one)
-- * @ccnt: how many frames per block (at least one)
-- * @bcnt_rld: used only for A-Synchronized transfers; this specifies
-- *	the value to reload into bcnt when it decrements to zero
-- * @sync_mode: ASYNC or ABSYNC
-- *
-- * See the EDMA3 documentation to understand how to configure and link
-- * transfers using the fields in PaRAM slots.  If you are not doing it
-- * all at once with edma_write_slot(), you will use this routine
-- * plus two calls each for source and destination, setting the initial
-- * address and saying how to index that address.
-- *
-- * An example of an A-Synchronized transfer is a serial link using a
-- * single word shift register.  In that case, @acnt would be equal to
-- * that word size; the serial controller issues a DMA synchronization
-- * event to transfer each word, and memory access by the DMA transfer
-- * controller will be word-at-a-time.
-- *
-- * An example of an AB-Synchronized transfer is a device using a FIFO.
-- * In that case, @acnt equals the FIFO width and @bcnt equals its depth.
-- * The controller with the FIFO issues DMA synchronization events when
-- * the FIFO threshold is reached, and the DMA transfer controller will
-- * transfer one frame to (or from) the FIFO.  It will probably use
-- * efficient burst modes to access memory.
-- */
--void edma_set_transfer_params(unsigned slot,
--		u16 acnt, u16 bcnt, u16 ccnt,
--		u16 bcnt_rld, enum sync_dimension sync_mode)
--{
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(slot);
--	slot = EDMA_CHAN_SLOT(slot);
--
--	if (slot < edma_cc[ctlr]->num_slots) {
--		edma_parm_modify(ctlr, PARM_LINK_BCNTRLD, slot,
--				0x0000ffff, bcnt_rld << 16);
--		if (sync_mode == ASYNC)
--			edma_parm_and(ctlr, PARM_OPT, slot, ~SYNCDIM);
--		else
--			edma_parm_or(ctlr, PARM_OPT, slot, SYNCDIM);
--		/* Set the acount, bcount, ccount registers */
--		edma_parm_write(ctlr, PARM_A_B_CNT, slot, (bcnt << 16) | acnt);
--		edma_parm_write(ctlr, PARM_CCNT, slot, ccnt);
--	}
--}
--EXPORT_SYMBOL(edma_set_transfer_params);
--
--/**
-- * edma_link - link one parameter RAM slot to another
-- * @from: parameter RAM slot originating the link
-- * @to: parameter RAM slot which is the link target
-- *
-- * The originating slot should not be part of any active DMA transfer.
-- */
--void edma_link(unsigned from, unsigned to)
--{
--	unsigned ctlr_from, ctlr_to;
--
--	ctlr_from = EDMA_CTLR(from);
--	from = EDMA_CHAN_SLOT(from);
--	ctlr_to = EDMA_CTLR(to);
--	to = EDMA_CHAN_SLOT(to);
--
--	if (from >= edma_cc[ctlr_from]->num_slots)
--		return;
--	if (to >= edma_cc[ctlr_to]->num_slots)
--		return;
--	edma_parm_modify(ctlr_from, PARM_LINK_BCNTRLD, from, 0xffff0000,
--				PARM_OFFSET(to));
--}
--EXPORT_SYMBOL(edma_link);
--
--/**
-- * edma_unlink - cut link from one parameter RAM slot
-- * @from: parameter RAM slot originating the link
-- *
-- * The originating slot should not be part of any active DMA transfer.
-- * Its link is set to 0xffff.
-- */
--void edma_unlink(unsigned from)
--{
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(from);
--	from = EDMA_CHAN_SLOT(from);
--
--	if (from >= edma_cc[ctlr]->num_slots)
--		return;
--	edma_parm_or(ctlr, PARM_LINK_BCNTRLD, from, 0xffff);
--}
--EXPORT_SYMBOL(edma_unlink);
--
--/*-----------------------------------------------------------------------*/
--
--/* Parameter RAM operations (ii) -- read/write whole parameter sets */
--
--/**
-- * edma_write_slot - write parameter RAM data for slot
-- * @slot: number of parameter RAM slot being modified
-- * @param: data to be written into parameter RAM slot
-- *
-- * Use this to assign all parameters of a transfer at once.  This
-- * allows more efficient setup of transfers than issuing multiple
-- * calls to set up those parameters in small pieces, and provides
-- * complete control over all transfer options.
-- */
--void edma_write_slot(unsigned slot, const struct edmacc_param *param)
--{
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(slot);
--	slot = EDMA_CHAN_SLOT(slot);
--
--	if (slot >= edma_cc[ctlr]->num_slots)
--		return;
--	memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(slot), param,
--			PARM_SIZE);
--}
--EXPORT_SYMBOL(edma_write_slot);
--
--/**
-- * edma_read_slot - read parameter RAM data from slot
-- * @slot: number of parameter RAM slot being copied
-- * @param: where to store copy of parameter RAM data
-- *
-- * Use this to read data from a parameter RAM slot, perhaps to
-- * save them as a template for later reuse.
-- */
--void edma_read_slot(unsigned slot, struct edmacc_param *param)
--{
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(slot);
--	slot = EDMA_CHAN_SLOT(slot);
--
--	if (slot >= edma_cc[ctlr]->num_slots)
--		return;
--	memcpy_fromio(param, edmacc_regs_base[ctlr] + PARM_OFFSET(slot),
--			PARM_SIZE);
--}
--EXPORT_SYMBOL(edma_read_slot);
--
--/*-----------------------------------------------------------------------*/
--
--/* Various EDMA channel control operations */
--
--/**
-- * edma_pause - pause dma on a channel
-- * @channel: on which edma_start() has been called
-- *
-- * This temporarily disables EDMA hardware events on the specified channel,
-- * preventing them from triggering new transfers on its behalf
-- */
--void edma_pause(unsigned channel)
--{
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(channel);
--	channel = EDMA_CHAN_SLOT(channel);
--
--	if (channel < edma_cc[ctlr]->num_channels) {
--		unsigned int mask = BIT(channel & 0x1f);
--
--		edma_shadow0_write_array(ctlr, SH_EECR, channel >> 5, mask);
--	}
--}
--EXPORT_SYMBOL(edma_pause);
--
--/**
-- * edma_resume - resumes dma on a paused channel
-- * @channel: on which edma_pause() has been called
-- *
-- * This re-enables EDMA hardware events on the specified channel.
-- */
--void edma_resume(unsigned channel)
--{
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(channel);
--	channel = EDMA_CHAN_SLOT(channel);
--
--	if (channel < edma_cc[ctlr]->num_channels) {
--		unsigned int mask = BIT(channel & 0x1f);
--
--		edma_shadow0_write_array(ctlr, SH_EESR, channel >> 5, mask);
--	}
--}
--EXPORT_SYMBOL(edma_resume);
--
--/**
-- * edma_start - start dma on a channel
-- * @channel: channel being activated
-- *
-- * Channels with event associations will be triggered by their hardware
-- * events, and channels without such associations will be triggered by
-- * software.  (At this writing there is no interface for using software
-- * triggers except with channels that don't support hardware triggers.)
-- *
-- * Returns zero on success, else negative errno.
-- */
--int edma_start(unsigned channel)
--{
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(channel);
--	channel = EDMA_CHAN_SLOT(channel);
--
--	if (channel < edma_cc[ctlr]->num_channels) {
--		int j = channel >> 5;
--		unsigned int mask = BIT(channel & 0x1f);
--
--		/* EDMA channels without event association */
--		if (test_bit(channel, edma_cc[ctlr]->edma_unused)) {
--			pr_debug("EDMA: ESR%d %08x\n", j,
--				edma_shadow0_read_array(ctlr, SH_ESR, j));
--			edma_shadow0_write_array(ctlr, SH_ESR, j, mask);
--			return 0;
--		}
--
--		/* EDMA channel with event association */
--		pr_debug("EDMA: ER%d %08x\n", j,
--			edma_shadow0_read_array(ctlr, SH_ER, j));
--		/* Clear any pending event or error */
--		edma_write_array(ctlr, EDMA_ECR, j, mask);
--		edma_write_array(ctlr, EDMA_EMCR, j, mask);
--		/* Clear any SER */
--		edma_shadow0_write_array(ctlr, SH_SECR, j, mask);
--		edma_shadow0_write_array(ctlr, SH_EESR, j, mask);
--		pr_debug("EDMA: EER%d %08x\n", j,
--			edma_shadow0_read_array(ctlr, SH_EER, j));
--		return 0;
--	}
--
--	return -EINVAL;
--}
--EXPORT_SYMBOL(edma_start);
--
--/**
-- * edma_stop - stops dma on the channel passed
-- * @channel: channel being deactivated
-- *
-- * When @lch is a channel, any active transfer is paused and
-- * all pending hardware events are cleared.  The current transfer
-- * may not be resumed, and the channel's Parameter RAM should be
-- * reinitialized before being reused.
-- */
--void edma_stop(unsigned channel)
--{
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(channel);
--	channel = EDMA_CHAN_SLOT(channel);
--
--	if (channel < edma_cc[ctlr]->num_channels) {
--		int j = channel >> 5;
--		unsigned int mask = BIT(channel & 0x1f);
--
--		edma_shadow0_write_array(ctlr, SH_EECR, j, mask);
--		edma_shadow0_write_array(ctlr, SH_ECR, j, mask);
--		edma_shadow0_write_array(ctlr, SH_SECR, j, mask);
--		edma_write_array(ctlr, EDMA_EMCR, j, mask);
--
--		pr_debug("EDMA: EER%d %08x\n", j,
--				edma_shadow0_read_array(ctlr, SH_EER, j));
--
--		/* REVISIT:  consider guarding against inappropriate event
--		 * chaining by overwriting with dummy_paramset.
--		 */
--	}
--}
--EXPORT_SYMBOL(edma_stop);
--
--/******************************************************************************
-- *
-- * It cleans ParamEntry qand bring back EDMA to initial state if media has
-- * been removed before EDMA has finished.It is usedful for removable media.
-- * Arguments:
-- *      ch_no     - channel no
-- *
-- * Return: zero on success, or corresponding error no on failure
-- *
-- * FIXME this should not be needed ... edma_stop() should suffice.
-- *
-- *****************************************************************************/
--
--void edma_clean_channel(unsigned channel)
--{
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(channel);
--	channel = EDMA_CHAN_SLOT(channel);
--
--	if (channel < edma_cc[ctlr]->num_channels) {
--		int j = (channel >> 5);
--		unsigned int mask = BIT(channel & 0x1f);
--
--		pr_debug("EDMA: EMR%d %08x\n", j,
--				edma_read_array(ctlr, EDMA_EMR, j));
--		edma_shadow0_write_array(ctlr, SH_ECR, j, mask);
--		/* Clear the corresponding EMR bits */
--		edma_write_array(ctlr, EDMA_EMCR, j, mask);
--		/* Clear any SER */
--		edma_shadow0_write_array(ctlr, SH_SECR, j, mask);
--		edma_write(ctlr, EDMA_CCERRCLR, BIT(16) | BIT(1) | BIT(0));
--	}
--}
--EXPORT_SYMBOL(edma_clean_channel);
--
--/*
-- * edma_clear_event - clear an outstanding event on the DMA channel
-- * Arguments:
-- *	channel - channel number
-- */
--void edma_clear_event(unsigned channel)
--{
--	unsigned ctlr;
--
--	ctlr = EDMA_CTLR(channel);
--	channel = EDMA_CHAN_SLOT(channel);
--
--	if (channel >= edma_cc[ctlr]->num_channels)
--		return;
--	if (channel < 32)
--		edma_write(ctlr, EDMA_ECR, BIT(channel));
--	else
--		edma_write(ctlr, EDMA_ECRH, BIT(channel - 32));
--}
--EXPORT_SYMBOL(edma_clear_event);
--
--/*-----------------------------------------------------------------------*/
--
--static int __init edma_probe(struct platform_device *pdev)
--{
--	struct edma_soc_info	**info = pdev->dev.platform_data;
--	const s8		(*queue_priority_mapping)[2];
--	const s8		(*queue_tc_mapping)[2];
--	int			i, j, off, ln, found = 0;
--	int			status = -1;
--	const s16		(*rsv_chans)[2];
--	const s16		(*rsv_slots)[2];
--	int			irq[EDMA_MAX_CC] = {0, 0};
--	int			err_irq[EDMA_MAX_CC] = {0, 0};
--	struct resource		*r[EDMA_MAX_CC] = {NULL};
--	resource_size_t		len[EDMA_MAX_CC];
--	char			res_name[10];
--	char			irq_name[10];
--
--	if (!info)
--		return -ENODEV;
--
--	for (j = 0; j < EDMA_MAX_CC; j++) {
--		sprintf(res_name, "edma_cc%d", j);
--		r[j] = platform_get_resource_byname(pdev, IORESOURCE_MEM,
--						res_name);
--		if (!r[j] || !info[j]) {
--			if (found)
--				break;
--			else
--				return -ENODEV;
--		} else {
--			found = 1;
--		}
--
--		len[j] = resource_size(r[j]);
--
--		r[j] = request_mem_region(r[j]->start, len[j],
--			dev_name(&pdev->dev));
--		if (!r[j]) {
--			status = -EBUSY;
--			goto fail1;
--		}
--
--		edmacc_regs_base[j] = ioremap(r[j]->start, len[j]);
--		if (!edmacc_regs_base[j]) {
--			status = -EBUSY;
--			goto fail1;
--		}
--
--		edma_cc[j] = kzalloc(sizeof(struct edma), GFP_KERNEL);
--		if (!edma_cc[j]) {
--			status = -ENOMEM;
--			goto fail1;
--		}
--
--		edma_cc[j]->num_channels = min_t(unsigned, info[j]->n_channel,
--							EDMA_MAX_DMACH);
--		edma_cc[j]->num_slots = min_t(unsigned, info[j]->n_slot,
--							EDMA_MAX_PARAMENTRY);
--		edma_cc[j]->num_cc = min_t(unsigned, info[j]->n_cc,
--							EDMA_MAX_CC);
--
--		edma_cc[j]->default_queue = info[j]->default_queue;
--
--		dev_dbg(&pdev->dev, "DMA REG BASE ADDR=%p\n",
--			edmacc_regs_base[j]);
--
--		for (i = 0; i < edma_cc[j]->num_slots; i++)
--			memcpy_toio(edmacc_regs_base[j] + PARM_OFFSET(i),
--					&dummy_paramset, PARM_SIZE);
--
--		/* Mark all channels as unused */
--		memset(edma_cc[j]->edma_unused, 0xff,
--			sizeof(edma_cc[j]->edma_unused));
--
--		if (info[j]->rsv) {
--
--			/* Clear the reserved channels in unused list */
--			rsv_chans = info[j]->rsv->rsv_chans;
--			if (rsv_chans) {
--				for (i = 0; rsv_chans[i][0] != -1; i++) {
--					off = rsv_chans[i][0];
--					ln = rsv_chans[i][1];
--					clear_bits(off, ln,
--						edma_cc[j]->edma_unused);
--				}
--			}
--
--			/* Set the reserved slots in inuse list */
--			rsv_slots = info[j]->rsv->rsv_slots;
--			if (rsv_slots) {
--				for (i = 0; rsv_slots[i][0] != -1; i++) {
--					off = rsv_slots[i][0];
--					ln = rsv_slots[i][1];
--					set_bits(off, ln,
--						edma_cc[j]->edma_inuse);
--				}
--			}
--		}
--
--		sprintf(irq_name, "edma%d", j);
--		irq[j] = platform_get_irq_byname(pdev, irq_name);
--		edma_cc[j]->irq_res_start = irq[j];
--		status = request_irq(irq[j], dma_irq_handler, 0, "edma",
--					&pdev->dev);
--		if (status < 0) {
--			dev_dbg(&pdev->dev, "request_irq %d failed --> %d\n",
--				irq[j], status);
--			goto fail;
--		}
--
--		sprintf(irq_name, "edma%d_err", j);
--		err_irq[j] = platform_get_irq_byname(pdev, irq_name);
--		edma_cc[j]->irq_res_end = err_irq[j];
--		status = request_irq(err_irq[j], dma_ccerr_handler, 0,
--					"edma_error", &pdev->dev);
--		if (status < 0) {
--			dev_dbg(&pdev->dev, "request_irq %d failed --> %d\n",
--				err_irq[j], status);
--			goto fail;
--		}
--
--		for (i = 0; i < edma_cc[j]->num_channels; i++)
--			map_dmach_queue(j, i, info[j]->default_queue);
--
--		queue_tc_mapping = info[j]->queue_tc_mapping;
--		queue_priority_mapping = info[j]->queue_priority_mapping;
--
--		/* Event queue to TC mapping */
--		for (i = 0; queue_tc_mapping[i][0] != -1; i++)
--			map_queue_tc(j, queue_tc_mapping[i][0],
--					queue_tc_mapping[i][1]);
--
--		/* Event queue priority mapping */
--		for (i = 0; queue_priority_mapping[i][0] != -1; i++)
--			assign_priority_to_queue(j,
--						queue_priority_mapping[i][0],
--						queue_priority_mapping[i][1]);
--
--		/* Map the channel to param entry if channel mapping logic
--		 * exist
--		 */
--		if (edma_read(j, EDMA_CCCFG) & CHMAP_EXIST)
--			map_dmach_param(j);
--
--		for (i = 0; i < info[j]->n_region; i++) {
--			edma_write_array2(j, EDMA_DRAE, i, 0, 0x0);
--			edma_write_array2(j, EDMA_DRAE, i, 1, 0x0);
--			edma_write_array(j, EDMA_QRAE, i, 0x0);
--		}
--		arch_num_cc++;
--	}
--
--	if (tc_errs_handled) {
--		status = request_irq(IRQ_TCERRINT0, dma_tc0err_handler, 0,
--					"edma_tc0", &pdev->dev);
--		if (status < 0) {
--			dev_dbg(&pdev->dev, "request_irq %d failed --> %d\n",
--				IRQ_TCERRINT0, status);
--			return status;
--		}
--		status = request_irq(IRQ_TCERRINT, dma_tc1err_handler, 0,
--					"edma_tc1", &pdev->dev);
--		if (status < 0) {
--			dev_dbg(&pdev->dev, "request_irq %d --> %d\n",
--				IRQ_TCERRINT, status);
--			return status;
--		}
--	}
--
--	return 0;
--
--fail:
--	for (i = 0; i < EDMA_MAX_CC; i++) {
--		if (err_irq[i])
--			free_irq(err_irq[i], &pdev->dev);
--		if (irq[i])
--			free_irq(irq[i], &pdev->dev);
--	}
--fail1:
--	for (i = 0; i < EDMA_MAX_CC; i++) {
--		if (r[i])
--			release_mem_region(r[i]->start, len[i]);
--		if (edmacc_regs_base[i])
--			iounmap(edmacc_regs_base[i]);
--		kfree(edma_cc[i]);
--	}
--	return status;
--}
--
--
--static struct platform_driver edma_driver = {
--	.driver.name	= "edma",
--};
--
--static int __init edma_init(void)
--{
--	return platform_driver_probe(&edma_driver, edma_probe);
--}
--arch_initcall(edma_init);
--
-diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
-index 700d311..9d77f9b 100644
---- a/arch/arm/mach-davinci/include/mach/da8xx.h
-+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
-@@ -20,8 +20,8 @@
- #include <linux/videodev2.h>
- 
- #include <mach/serial.h>
--#include <mach/edma.h>
- #include <mach/pm.h>
-+#include <linux/platform_data/edma.h>
- #include <linux/platform_data/i2c-davinci.h>
- #include <linux/platform_data/mmc-davinci.h>
- #include <linux/platform_data/usb-davinci.h>
-diff --git a/arch/arm/mach-davinci/include/mach/edma.h b/arch/arm/mach-davinci/include/mach/edma.h
-deleted file mode 100644
-index 7e84c90..0000000
---- a/arch/arm/mach-davinci/include/mach/edma.h
-+++ /dev/null
-@@ -1,267 +0,0 @@
--/*
-- *  TI DAVINCI dma definitions
-- *
-- *  Copyright (C) 2006-2009 Texas Instruments.
-- *
-- *  This program is free software; you can redistribute  it and/or modify it
-- *  under  the terms of  the GNU General  Public License as published by the
-- *  Free Software Foundation;  either version 2 of the  License, or (at your
-- *  option) any later version.
-- *
-- *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
-- *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
-- *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
-- *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
-- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-- *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
-- *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-- *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
-- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-- *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- *
-- *  You should have received a copy of the  GNU General Public License along
-- *  with this program; if not, write  to the Free Software Foundation, Inc.,
-- *  675 Mass Ave, Cambridge, MA 02139, USA.
-- *
-- */
--
--/*
-- * This EDMA3 programming framework exposes two basic kinds of resource:
-- *
-- *  Channel	Triggers transfers, usually from a hardware event but
-- *		also manually or by "chaining" from DMA completions.
-- *		Each channel is coupled to a Parameter RAM (PaRAM) slot.
-- *
-- *  Slot	Each PaRAM slot holds a DMA transfer descriptor (PaRAM
-- *		"set"), source and destination addresses, a link to a
-- *		next PaRAM slot (if any), options for the transfer, and
-- *		instructions for updating those addresses.  There are
-- *		more than twice as many slots as event channels.
-- *
-- * Each PaRAM set describes a sequence of transfers, either for one large
-- * buffer or for several discontiguous smaller buffers.  An EDMA transfer
-- * is driven only from a channel, which performs the transfers specified
-- * in its PaRAM slot until there are no more transfers.  When that last
-- * transfer completes, the "link" field may be used to reload the channel's
-- * PaRAM slot with a new transfer descriptor.
-- *
-- * The EDMA Channel Controller (CC) maps requests from channels into physical
-- * Transfer Controller (TC) requests when the channel triggers (by hardware
-- * or software events, or by chaining).  The two physical DMA channels provided
-- * by the TCs are thus shared by many logical channels.
-- *
-- * DaVinci hardware also has a "QDMA" mechanism which is not currently
-- * supported through this interface.  (DSP firmware uses it though.)
-- */
--
--#ifndef EDMA_H_
--#define EDMA_H_
--
--/* PaRAM slots are laid out like this */
--struct edmacc_param {
--	unsigned int opt;
--	unsigned int src;
--	unsigned int a_b_cnt;
--	unsigned int dst;
--	unsigned int src_dst_bidx;
--	unsigned int link_bcntrld;
--	unsigned int src_dst_cidx;
--	unsigned int ccnt;
--};
--
--#define CCINT0_INTERRUPT     16
--#define CCERRINT_INTERRUPT   17
--#define TCERRINT0_INTERRUPT   18
--#define TCERRINT1_INTERRUPT   19
--
--/* fields in edmacc_param.opt */
--#define SAM		BIT(0)
--#define DAM		BIT(1)
--#define SYNCDIM		BIT(2)
--#define STATIC		BIT(3)
--#define EDMA_FWID	(0x07 << 8)
--#define TCCMODE		BIT(11)
--#define EDMA_TCC(t)	((t) << 12)
--#define TCINTEN		BIT(20)
--#define ITCINTEN	BIT(21)
--#define TCCHEN		BIT(22)
--#define ITCCHEN		BIT(23)
--
--#define TRWORD (0x7<<2)
--#define PAENTRY (0x1ff<<5)
--
--/* Drivers should avoid using these symbolic names for dm644x
-- * channels, and use platform_device IORESOURCE_DMA resources
-- * instead.  (Other DaVinci chips have different peripherals
-- * and thus have different DMA channel mappings.)
-- */
--#define DAVINCI_DMA_MCBSP_TX              2
--#define DAVINCI_DMA_MCBSP_RX              3
--#define DAVINCI_DMA_VPSS_HIST             4
--#define DAVINCI_DMA_VPSS_H3A              5
--#define DAVINCI_DMA_VPSS_PRVU             6
--#define DAVINCI_DMA_VPSS_RSZ              7
--#define DAVINCI_DMA_IMCOP_IMXINT          8
--#define DAVINCI_DMA_IMCOP_VLCDINT         9
--#define DAVINCI_DMA_IMCO_PASQINT         10
--#define DAVINCI_DMA_IMCOP_DSQINT         11
--#define DAVINCI_DMA_SPI_SPIX             16
--#define DAVINCI_DMA_SPI_SPIR             17
--#define DAVINCI_DMA_UART0_URXEVT0        18
--#define DAVINCI_DMA_UART0_UTXEVT0        19
--#define DAVINCI_DMA_UART1_URXEVT1        20
--#define DAVINCI_DMA_UART1_UTXEVT1        21
--#define DAVINCI_DMA_UART2_URXEVT2        22
--#define DAVINCI_DMA_UART2_UTXEVT2        23
--#define DAVINCI_DMA_MEMSTK_MSEVT         24
--#define DAVINCI_DMA_MMCRXEVT             26
--#define DAVINCI_DMA_MMCTXEVT             27
--#define DAVINCI_DMA_I2C_ICREVT           28
--#define DAVINCI_DMA_I2C_ICXEVT           29
--#define DAVINCI_DMA_GPIO_GPINT0          32
--#define DAVINCI_DMA_GPIO_GPINT1          33
--#define DAVINCI_DMA_GPIO_GPINT2          34
--#define DAVINCI_DMA_GPIO_GPINT3          35
--#define DAVINCI_DMA_GPIO_GPINT4          36
--#define DAVINCI_DMA_GPIO_GPINT5          37
--#define DAVINCI_DMA_GPIO_GPINT6          38
--#define DAVINCI_DMA_GPIO_GPINT7          39
--#define DAVINCI_DMA_GPIO_GPBNKINT0       40
--#define DAVINCI_DMA_GPIO_GPBNKINT1       41
--#define DAVINCI_DMA_GPIO_GPBNKINT2       42
--#define DAVINCI_DMA_GPIO_GPBNKINT3       43
--#define DAVINCI_DMA_GPIO_GPBNKINT4       44
--#define DAVINCI_DMA_TIMER0_TINT0         48
--#define DAVINCI_DMA_TIMER1_TINT1         49
--#define DAVINCI_DMA_TIMER2_TINT2         50
--#define DAVINCI_DMA_TIMER3_TINT3         51
--#define DAVINCI_DMA_PWM0                 52
--#define DAVINCI_DMA_PWM1                 53
--#define DAVINCI_DMA_PWM2                 54
--
--/* DA830 specific EDMA3 information */
--#define EDMA_DA830_NUM_DMACH		32
--#define EDMA_DA830_NUM_TCC		32
--#define EDMA_DA830_NUM_PARAMENTRY	128
--#define EDMA_DA830_NUM_EVQUE		2
--#define EDMA_DA830_NUM_TC		2
--#define EDMA_DA830_CHMAP_EXIST		0
--#define EDMA_DA830_NUM_REGIONS		4
--#define DA830_DMACH2EVENT_MAP0		0x000FC03Fu
--#define DA830_DMACH2EVENT_MAP1		0x00000000u
--#define DA830_EDMA_ARM_OWN		0x30FFCCFFu
--
--/*ch_status paramater of callback function possible values*/
--#define DMA_COMPLETE 1
--#define DMA_CC_ERROR 2
--#define DMA_TC1_ERROR 3
--#define DMA_TC2_ERROR 4
--
--enum address_mode {
--	INCR = 0,
--	FIFO = 1
--};
--
--enum fifo_width {
--	W8BIT = 0,
--	W16BIT = 1,
--	W32BIT = 2,
--	W64BIT = 3,
--	W128BIT = 4,
--	W256BIT = 5
--};
--
--enum dma_event_q {
--	EVENTQ_0 = 0,
--	EVENTQ_1 = 1,
--	EVENTQ_2 = 2,
--	EVENTQ_3 = 3,
--	EVENTQ_DEFAULT = -1
--};
--
--enum sync_dimension {
--	ASYNC = 0,
--	ABSYNC = 1
--};
--
--#define EDMA_CTLR_CHAN(ctlr, chan)	(((ctlr) << 16) | (chan))
--#define EDMA_CTLR(i)			((i) >> 16)
--#define EDMA_CHAN_SLOT(i)		((i) & 0xffff)
--
--#define EDMA_CHANNEL_ANY		-1	/* for edma_alloc_channel() */
--#define EDMA_SLOT_ANY			-1	/* for edma_alloc_slot() */
--#define EDMA_CONT_PARAMS_ANY		 1001
--#define EDMA_CONT_PARAMS_FIXED_EXACT	 1002
--#define EDMA_CONT_PARAMS_FIXED_NOT_EXACT 1003
--
--#define EDMA_MAX_CC               2
--
--/* alloc/free DMA channels and their dedicated parameter RAM slots */
--int edma_alloc_channel(int channel,
--	void (*callback)(unsigned channel, u16 ch_status, void *data),
--	void *data, enum dma_event_q);
--void edma_free_channel(unsigned channel);
--
--/* alloc/free parameter RAM slots */
--int edma_alloc_slot(unsigned ctlr, int slot);
--void edma_free_slot(unsigned slot);
--
--/* alloc/free a set of contiguous parameter RAM slots */
--int edma_alloc_cont_slots(unsigned ctlr, unsigned int id, int slot, int count);
--int edma_free_cont_slots(unsigned slot, int count);
--
--/* calls that operate on part of a parameter RAM slot */
--void edma_set_src(unsigned slot, dma_addr_t src_port,
--				enum address_mode mode, enum fifo_width);
--void edma_set_dest(unsigned slot, dma_addr_t dest_port,
--				 enum address_mode mode, enum fifo_width);
--void edma_get_position(unsigned slot, dma_addr_t *src, dma_addr_t *dst);
--void edma_set_src_index(unsigned slot, s16 src_bidx, s16 src_cidx);
--void edma_set_dest_index(unsigned slot, s16 dest_bidx, s16 dest_cidx);
--void edma_set_transfer_params(unsigned slot, u16 acnt, u16 bcnt, u16 ccnt,
--		u16 bcnt_rld, enum sync_dimension sync_mode);
--void edma_link(unsigned from, unsigned to);
--void edma_unlink(unsigned from);
--
--/* calls that operate on an entire parameter RAM slot */
--void edma_write_slot(unsigned slot, const struct edmacc_param *params);
--void edma_read_slot(unsigned slot, struct edmacc_param *params);
--
--/* channel control operations */
--int edma_start(unsigned channel);
--void edma_stop(unsigned channel);
--void edma_clean_channel(unsigned channel);
--void edma_clear_event(unsigned channel);
--void edma_pause(unsigned channel);
--void edma_resume(unsigned channel);
--
--struct edma_rsv_info {
--
--	const s16	(*rsv_chans)[2];
--	const s16	(*rsv_slots)[2];
--};
--
--/* platform_data for EDMA driver */
--struct edma_soc_info {
--
--	/* how many dma resources of each type */
--	unsigned	n_channel;
--	unsigned	n_region;
--	unsigned	n_slot;
--	unsigned	n_tc;
--	unsigned	n_cc;
--	/*
--	 * Default queue is expected to be a low-priority queue.
--	 * This way, long transfers on the default queue started
--	 * by the codec engine will not cause audio defects.
--	 */
--	enum dma_event_q	default_queue;
--
--	/* Resource reservation for other cores */
--	struct edma_rsv_info	*rsv;
--
--	const s8	(*queue_tc_mapping)[2];
--	const s8	(*queue_priority_mapping)[2];
--};
--
--#endif
-diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
-index 665870d..0b81d6c 100644
---- a/arch/arm/plat-omap/Kconfig
-+++ b/arch/arm/plat-omap/Kconfig
-@@ -29,6 +29,7 @@ config ARCH_OMAP2PLUS
- 	select PINCTRL
- 	select PROC_DEVICETREE if PROC_FS
- 	select SPARSE_IRQ
-+	select TI_PRIV_EDMA
- 	select USE_OF
- 	help
- 	  "Systems based on OMAP2, OMAP3, OMAP4 or OMAP5"
-diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
-index 023c8f2..e57cce3 100644
---- a/drivers/dma/edma.c
-+++ b/drivers/dma/edma.c
-@@ -24,7 +24,7 @@
- #include <linux/slab.h>
- #include <linux/spinlock.h>
- 
--#include <mach/edma.h>
-+#include <linux/platform_data/edma.h>
- 
- #include "dmaengine.h"
- #include "virt-dma.h"
-diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
-index 17e186d..d1efacc 100644
---- a/drivers/mmc/host/davinci_mmc.c
-+++ b/drivers/mmc/host/davinci_mmc.c
-@@ -35,6 +35,7 @@
- #include <linux/edma.h>
- #include <linux/mmc/mmc.h>
- 
-+#include <linux/platform_data/edma.h>
- #include <linux/platform_data/mmc-davinci.h>
- 
- /*
-diff --git a/include/linux/mfd/davinci_voicecodec.h b/include/linux/mfd/davinci_voicecodec.h
-index 0ab6132..7dd6524 100644
---- a/include/linux/mfd/davinci_voicecodec.h
-+++ b/include/linux/mfd/davinci_voicecodec.h
-@@ -26,8 +26,7 @@
- #include <linux/kernel.h>
- #include <linux/platform_device.h>
- #include <linux/mfd/core.h>
--
--#include <mach/edma.h>
-+#include <linux/platform_data/edma.h>
- 
- /*
-  * Register values.
-diff --git a/include/linux/platform_data/edma.h b/include/linux/platform_data/edma.h
-new file mode 100644
-index 0000000..2344ea2
---- /dev/null
-+++ b/include/linux/platform_data/edma.h
-@@ -0,0 +1,182 @@
-+/*
-+ *  TI EDMA definitions
-+ *
-+ *  Copyright (C) 2006-2013 Texas Instruments.
-+ *
-+ *  This program is free software; you can redistribute  it and/or modify it
-+ *  under  the terms of  the GNU General  Public License as published by the
-+ *  Free Software Foundation;  either version 2 of the  License, or (at your
-+ *  option) any later version.
-+ */
-+
-+/*
-+ * This EDMA3 programming framework exposes two basic kinds of resource:
-+ *
-+ *  Channel	Triggers transfers, usually from a hardware event but
-+ *		also manually or by "chaining" from DMA completions.
-+ *		Each channel is coupled to a Parameter RAM (PaRAM) slot.
-+ *
-+ *  Slot	Each PaRAM slot holds a DMA transfer descriptor (PaRAM
-+ *		"set"), source and destination addresses, a link to a
-+ *		next PaRAM slot (if any), options for the transfer, and
-+ *		instructions for updating those addresses.  There are
-+ *		more than twice as many slots as event channels.
-+ *
-+ * Each PaRAM set describes a sequence of transfers, either for one large
-+ * buffer or for several discontiguous smaller buffers.  An EDMA transfer
-+ * is driven only from a channel, which performs the transfers specified
-+ * in its PaRAM slot until there are no more transfers.  When that last
-+ * transfer completes, the "link" field may be used to reload the channel's
-+ * PaRAM slot with a new transfer descriptor.
-+ *
-+ * The EDMA Channel Controller (CC) maps requests from channels into physical
-+ * Transfer Controller (TC) requests when the channel triggers (by hardware
-+ * or software events, or by chaining).  The two physical DMA channels provided
-+ * by the TCs are thus shared by many logical channels.
-+ *
-+ * DaVinci hardware also has a "QDMA" mechanism which is not currently
-+ * supported through this interface.  (DSP firmware uses it though.)
-+ */
-+
-+#ifndef EDMA_H_
-+#define EDMA_H_
-+
-+/* PaRAM slots are laid out like this */
-+struct edmacc_param {
-+	unsigned int opt;
-+	unsigned int src;
-+	unsigned int a_b_cnt;
-+	unsigned int dst;
-+	unsigned int src_dst_bidx;
-+	unsigned int link_bcntrld;
-+	unsigned int src_dst_cidx;
-+	unsigned int ccnt;
-+};
-+
-+/* fields in edmacc_param.opt */
-+#define SAM		BIT(0)
-+#define DAM		BIT(1)
-+#define SYNCDIM		BIT(2)
-+#define STATIC		BIT(3)
-+#define EDMA_FWID	(0x07 << 8)
-+#define TCCMODE		BIT(11)
-+#define EDMA_TCC(t)	((t) << 12)
-+#define TCINTEN		BIT(20)
-+#define ITCINTEN	BIT(21)
-+#define TCCHEN		BIT(22)
-+#define ITCCHEN		BIT(23)
-+
-+/*ch_status paramater of callback function possible values*/
-+#define DMA_COMPLETE 1
-+#define DMA_CC_ERROR 2
-+#define DMA_TC1_ERROR 3
-+#define DMA_TC2_ERROR 4
-+
-+enum address_mode {
-+	INCR = 0,
-+	FIFO = 1
-+};
-+
-+enum fifo_width {
-+	W8BIT = 0,
-+	W16BIT = 1,
-+	W32BIT = 2,
-+	W64BIT = 3,
-+	W128BIT = 4,
-+	W256BIT = 5
-+};
-+
-+enum dma_event_q {
-+	EVENTQ_0 = 0,
-+	EVENTQ_1 = 1,
-+	EVENTQ_2 = 2,
-+	EVENTQ_3 = 3,
-+	EVENTQ_DEFAULT = -1
-+};
-+
-+enum sync_dimension {
-+	ASYNC = 0,
-+	ABSYNC = 1
-+};
-+
-+#define EDMA_CTLR_CHAN(ctlr, chan)	(((ctlr) << 16) | (chan))
-+#define EDMA_CTLR(i)			((i) >> 16)
-+#define EDMA_CHAN_SLOT(i)		((i) & 0xffff)
-+
-+#define EDMA_CHANNEL_ANY		-1	/* for edma_alloc_channel() */
-+#define EDMA_SLOT_ANY			-1	/* for edma_alloc_slot() */
-+#define EDMA_CONT_PARAMS_ANY		 1001
-+#define EDMA_CONT_PARAMS_FIXED_EXACT	 1002
-+#define EDMA_CONT_PARAMS_FIXED_NOT_EXACT 1003
-+
-+#define EDMA_MAX_CC               2
-+
-+/* alloc/free DMA channels and their dedicated parameter RAM slots */
-+int edma_alloc_channel(int channel,
-+	void (*callback)(unsigned channel, u16 ch_status, void *data),
-+	void *data, enum dma_event_q);
-+void edma_free_channel(unsigned channel);
-+
-+/* alloc/free parameter RAM slots */
-+int edma_alloc_slot(unsigned ctlr, int slot);
-+void edma_free_slot(unsigned slot);
-+
-+/* alloc/free a set of contiguous parameter RAM slots */
-+int edma_alloc_cont_slots(unsigned ctlr, unsigned int id, int slot, int count);
-+int edma_free_cont_slots(unsigned slot, int count);
-+
-+/* calls that operate on part of a parameter RAM slot */
-+void edma_set_src(unsigned slot, dma_addr_t src_port,
-+				enum address_mode mode, enum fifo_width);
-+void edma_set_dest(unsigned slot, dma_addr_t dest_port,
-+				 enum address_mode mode, enum fifo_width);
-+void edma_get_position(unsigned slot, dma_addr_t *src, dma_addr_t *dst);
-+void edma_set_src_index(unsigned slot, s16 src_bidx, s16 src_cidx);
-+void edma_set_dest_index(unsigned slot, s16 dest_bidx, s16 dest_cidx);
-+void edma_set_transfer_params(unsigned slot, u16 acnt, u16 bcnt, u16 ccnt,
-+		u16 bcnt_rld, enum sync_dimension sync_mode);
-+void edma_link(unsigned from, unsigned to);
-+void edma_unlink(unsigned from);
-+
-+/* calls that operate on an entire parameter RAM slot */
-+void edma_write_slot(unsigned slot, const struct edmacc_param *params);
-+void edma_read_slot(unsigned slot, struct edmacc_param *params);
-+
-+/* channel control operations */
-+int edma_start(unsigned channel);
-+void edma_stop(unsigned channel);
-+void edma_clean_channel(unsigned channel);
-+void edma_clear_event(unsigned channel);
-+void edma_pause(unsigned channel);
-+void edma_resume(unsigned channel);
-+
-+struct edma_rsv_info {
-+
-+	const s16	(*rsv_chans)[2];
-+	const s16	(*rsv_slots)[2];
-+};
-+
-+/* platform_data for EDMA driver */
-+struct edma_soc_info {
-+
-+	/* how many dma resources of each type */
-+	unsigned	n_channel;
-+	unsigned	n_region;
-+	unsigned	n_slot;
-+	unsigned	n_tc;
-+	unsigned	n_cc;
-+	/*
-+	 * Default queue is expected to be a low-priority queue.
-+	 * This way, long transfers on the default queue started
-+	 * by the codec engine will not cause audio defects.
-+	 */
-+	enum dma_event_q	default_queue;
-+
-+	/* Resource reservation for other cores */
-+	struct edma_rsv_info	*rsv;
-+
-+	const s8	(*queue_tc_mapping)[2];
-+	const s8	(*queue_priority_mapping)[2];
-+};
-+
-+#endif
-diff --git a/include/linux/platform_data/spi-davinci.h b/include/linux/platform_data/spi-davinci.h
-index 7af305b..8dc2fa47 100644
---- a/include/linux/platform_data/spi-davinci.h
-+++ b/include/linux/platform_data/spi-davinci.h
-@@ -19,7 +19,7 @@
- #ifndef __ARCH_ARM_DAVINCI_SPI_H
- #define __ARCH_ARM_DAVINCI_SPI_H
- 
--#include <mach/edma.h>
-+#include <linux/platform_data/edma.h>
- 
- #define SPI_INTERN_CS	0xFF
- 
-diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
-index d55e647..591f547 100644
---- a/sound/soc/davinci/davinci-evm.c
-+++ b/sound/soc/davinci/davinci-evm.c
-@@ -14,6 +14,7 @@
- #include <linux/timer.h>
- #include <linux/interrupt.h>
- #include <linux/platform_device.h>
-+#include <linux/platform_data/edma.h>
- #include <linux/i2c.h>
- #include <sound/core.h>
- #include <sound/pcm.h>
-diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c
-index afab81f..9bdd71b 100644
---- a/sound/soc/davinci/davinci-pcm.c
-+++ b/sound/soc/davinci/davinci-pcm.c
-@@ -17,6 +17,7 @@
- #include <linux/dma-mapping.h>
- #include <linux/kernel.h>
- #include <linux/genalloc.h>
-+#include <linux/platform_data/edma.h>
- 
- #include <sound/core.h>
- #include <sound/pcm.h>
-diff --git a/sound/soc/davinci/davinci-pcm.h b/sound/soc/davinci/davinci-pcm.h
-index b6ef703..fbb710c 100644
---- a/sound/soc/davinci/davinci-pcm.h
-+++ b/sound/soc/davinci/davinci-pcm.h
-@@ -14,7 +14,7 @@
- 
- #include <linux/genalloc.h>
- #include <linux/platform_data/davinci_asp.h>
--#include <mach/edma.h>
-+#include <linux/platform_data/edma.h>
- 
- struct davinci_pcm_dma_params {
- 	int channel;			/* sync dma channel ID */
-diff --git a/sound/soc/davinci/davinci-sffsdr.c b/sound/soc/davinci/davinci-sffsdr.c
-index 5be65aa..074fc5d 100644
---- a/sound/soc/davinci/davinci-sffsdr.c
-+++ b/sound/soc/davinci/davinci-sffsdr.c
-@@ -17,6 +17,7 @@
- #include <linux/timer.h>
- #include <linux/interrupt.h>
- #include <linux/platform_device.h>
-+#include <linux/platform_data/edma.h>
- #include <linux/gpio.h>
- #include <sound/core.h>
- #include <sound/pcm.h>
-@@ -28,7 +29,6 @@
- #include <asm/plat-sffsdr/sffsdr-fpga.h>
- #endif
- 
--#include <mach/edma.h>
- 
- #include "../codecs/pcm3008.h"
- #include "davinci-pcm.h"
-@@ -123,8 +123,8 @@ static struct resource sffsdr_snd_resources[] = {
- };
- 
- static struct evm_snd_platform_data sffsdr_snd_data = {
--	.tx_dma_ch	= DAVINCI_DMA_MCBSP_TX,
--	.rx_dma_ch	= DAVINCI_DMA_MCBSP_RX,
-+	.tx_dma_ch	= 2,	/* MCBSP_TX */
-+	.rx_dma_ch	= 3,	/* MCBSP_RX */
- };
- 
- static struct platform_device *sffsdr_snd_device;
--- 
-1.7.10.4
-
diff --git a/patches/dma/0015-ARM-edma-remove-unused-transfer-controller-handlers.patch b/patches/dma/0015-ARM-edma-remove-unused-transfer-controller-handlers.patch
deleted file mode 100644
index 7bdbaa1401f378b28bcd3d4a14fedefd9ecff991..0000000000000000000000000000000000000000
--- a/patches/dma/0015-ARM-edma-remove-unused-transfer-controller-handlers.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 6378d208297a90789090ebcf0d2f44b022381400 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Wed, 22 Aug 2012 09:31:49 -0400
-Subject: [PATCH 15/35] ARM: edma: remove unused transfer controller handlers
-
-Fix build on OMAP, the irqs are undefined on AM33xx.
-These error interrupt handlers were hardcoded as disabled
-so since they are unused code, simply remove them.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- arch/arm/common/edma.c | 37 -------------------------------------
- 1 file changed, 37 deletions(-)
-
-diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
-index be3c04a..2dce245 100644
---- a/arch/arm/common/edma.c
-+++ b/arch/arm/common/edma.c
-@@ -494,26 +494,6 @@ static irqreturn_t dma_ccerr_handler(int irq, void *data)
- 	return IRQ_HANDLED;
- }
- 
--/******************************************************************************
-- *
-- * Transfer controller error interrupt handlers
-- *
-- *****************************************************************************/
--
--#define tc_errs_handled	false	/* disabled as long as they're NOPs */
--
--static irqreturn_t dma_tc0err_handler(int irq, void *data)
--{
--	dev_dbg(data, "dma_tc0err_handler\n");
--	return IRQ_HANDLED;
--}
--
--static irqreturn_t dma_tc1err_handler(int irq, void *data)
--{
--	dev_dbg(data, "dma_tc1err_handler\n");
--	return IRQ_HANDLED;
--}
--
- static int reserve_contiguous_slots(int ctlr, unsigned int id,
- 				     unsigned int num_slots,
- 				     unsigned int start_slot)
-@@ -1538,23 +1518,6 @@ static int edma_probe(struct platform_device *pdev)
- 		arch_num_cc++;
- 	}
- 
--	if (tc_errs_handled) {
--		status = request_irq(IRQ_TCERRINT0, dma_tc0err_handler, 0,
--					"edma_tc0", &pdev->dev);
--		if (status < 0) {
--			dev_dbg(&pdev->dev, "request_irq %d failed --> %d\n",
--				IRQ_TCERRINT0, status);
--			return status;
--		}
--		status = request_irq(IRQ_TCERRINT, dma_tc1err_handler, 0,
--					"edma_tc1", &pdev->dev);
--		if (status < 0) {
--			dev_dbg(&pdev->dev, "request_irq %d --> %d\n",
--				IRQ_TCERRINT, status);
--			return status;
--		}
--	}
--
- 	return 0;
- 
- fail:
--- 
-1.8.1
-
diff --git a/patches/dma/0016-ARM-edma-add-AM33XX-support-to-the-private-EDMA-API.patch b/patches/dma/0016-ARM-edma-add-AM33XX-support-to-the-private-EDMA-API.patch
deleted file mode 100644
index 645be6d2d1d572a4425966756b20cf194b4bfc4e..0000000000000000000000000000000000000000
--- a/patches/dma/0016-ARM-edma-add-AM33XX-support-to-the-private-EDMA-API.patch
+++ /dev/null
@@ -1,414 +0,0 @@
-From 70580a2a247b01b054c49e3a2dfd97b038e752ff Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Thu, 6 Sep 2012 17:40:42 -0400
-Subject: [PATCH 16/35] ARM: edma: add AM33XX support to the private EDMA API
-
-Adds support for parsing the TI EDMA DT data into the required
-EDMA private API platform data. Enables runtime PM support to
-initialize the EDMA hwmod. Adds AM33XX EMDA crossbar event mux
-support.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- arch/arm/common/edma.c             | 314 +++++++++++++++++++++++++++++++++++--
- include/linux/platform_data/edma.h |   1 +
- 2 files changed, 306 insertions(+), 9 deletions(-)
-
-diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
-index 2dce245..beeb1d2 100644
---- a/arch/arm/common/edma.c
-+++ b/arch/arm/common/edma.c
-@@ -24,6 +24,13 @@
- #include <linux/platform_device.h>
- #include <linux/io.h>
- #include <linux/slab.h>
-+#include <linux/edma.h>
-+#include <linux/err.h>
-+#include <linux/of_address.h>
-+#include <linux/of_device.h>
-+#include <linux/of_dma.h>
-+#include <linux/of_irq.h>
-+#include <linux/pm_runtime.h>
- 
- #include <linux/platform_data/edma.h>
- 
-@@ -723,6 +730,9 @@ EXPORT_SYMBOL(edma_free_channel);
-  */
- int edma_alloc_slot(unsigned ctlr, int slot)
- {
-+	if (!edma_cc[ctlr])
-+		return -EINVAL;
-+
- 	if (slot >= 0)
- 		slot = EDMA_CHAN_SLOT(slot);
- 
-@@ -1366,31 +1376,291 @@ void edma_clear_event(unsigned channel)
- EXPORT_SYMBOL(edma_clear_event);
- 
- /*-----------------------------------------------------------------------*/
-+static int edma_of_read_u32_to_s8_array(const struct device_node *np,
-+					 const char *propname, s8 *out_values,
-+					 size_t sz)
-+{
-+	struct property *prop = of_find_property(np, propname, NULL);
-+	const __be32 *val;
-+
-+	if (!prop)
-+		return -EINVAL;
-+	if (!prop->value)
-+		return -ENODATA;
-+	if ((sz * sizeof(u32)) > prop->length)
-+		return -EOVERFLOW;
-+
-+	val = prop->value;
-+
-+	while (sz--)
-+		*out_values++ = (s8)(be32_to_cpup(val++) & 0xff);
-+
-+	/* Terminate it */
-+	*out_values++ = -1;
-+	*out_values++ = -1;
-+
-+	return 0;
-+}
-+
-+static int edma_of_read_u32_to_s16_array(const struct device_node *np,
-+					 const char *propname, s16 *out_values,
-+					 size_t sz)
-+{
-+	struct property *prop = of_find_property(np, propname, NULL);
-+	const __be32 *val;
-+
-+	if (!prop)
-+		return -EINVAL;
-+	if (!prop->value)
-+		return -ENODATA;
-+	if ((sz * sizeof(u32)) > prop->length)
-+		return -EOVERFLOW;
-+
-+	val = prop->value;
-+
-+	while (sz--)
-+		*out_values++ = (s16)(be32_to_cpup(val++) & 0xffff);
-+
-+	/* Terminate it */
-+	*out_values++ = -1;
-+	*out_values++ = -1;
-+
-+	return 0;
-+}
-+
-+static int edma_xbar_event_map(struct device *dev,
-+			       struct device_node *node,
-+			       struct edma_soc_info *pdata, int len)
-+{
-+	int ret = 0;
-+	int i;
-+	struct resource res;
-+	void *xbar;
-+	const s16 (*xbar_chans)[2];
-+	u32 shift, offset, mux;
-+
-+	xbar_chans = devm_kzalloc(dev,
-+				  len/sizeof(s16) + 2*sizeof(s16),
-+				  GFP_KERNEL);
-+	if (!xbar_chans)
-+		return -ENOMEM;
-+
-+	ret = of_address_to_resource(node, 1, &res);
-+	if (IS_ERR_VALUE(ret))
-+		return -EIO;
-+
-+	xbar = devm_ioremap(dev, res.start, resource_size(&res));
-+	if (!xbar)
-+		return -ENOMEM;
-+
-+	ret = edma_of_read_u32_to_s16_array(node,
-+					    "ti,edma-xbar-event-map",
-+					    (s16 *)xbar_chans,
-+					    len/sizeof(u32));
-+	if (IS_ERR_VALUE(ret))
-+		return -EIO;
-+
-+	for (i = 0; xbar_chans[i][0] != -1; i++) {
-+		shift = (xbar_chans[i][1] % 4) * 8;
-+		offset = xbar_chans[i][1] >> 2;
-+		offset <<= 2;
-+		mux = readl((void *)((u32)xbar + offset));
-+		mux &= ~(0xff << shift);
-+		mux |= xbar_chans[i][0] << shift;
-+		writel(mux, (void *)((u32)xbar + offset));
-+	}
-+
-+	pdata->xbar_chans = xbar_chans;
-+
-+	return 0;
-+}
-+
-+static int edma_of_parse_dt(struct device *dev,
-+			    struct device_node *node,
-+			    struct edma_soc_info *pdata)
-+{
-+	int ret = 0;
-+	u32 value;
-+	struct property *prop;
-+	size_t sz;
-+	struct edma_rsv_info *rsv_info;
-+	const s16 (*rsv_chans)[2], (*rsv_slots)[2];
-+	const s8 (*queue_tc_map)[2], (*queue_priority_map)[2];
-+
-+	memset(pdata, 0, sizeof(struct edma_soc_info));
-+
-+	ret = of_property_read_u32(node, "dma-channels", &value);
-+	if (ret < 0)
-+		return ret;
-+	pdata->n_channel = value;
-+
-+	ret = of_property_read_u32(node, "ti,edma-regions", &value);
-+	if (ret < 0)
-+		return ret;
-+	pdata->n_region = value;
-+
-+	ret = of_property_read_u32(node, "ti,edma-slots", &value);
-+	if (ret < 0)
-+		return ret;
-+	pdata->n_slot = value;
-+
-+	pdata->n_cc = 1;
-+	pdata->n_tc = 3;
-+
-+	rsv_info =
-+		devm_kzalloc(dev, sizeof(struct edma_rsv_info), GFP_KERNEL);
-+	if (!rsv_info)
-+		return -ENOMEM;
-+	pdata->rsv = rsv_info;
-+
-+	/* Build the reserved channel/slots arrays */
-+	prop = of_find_property(node, "ti,edma-reserved-channels", &sz);
-+	if (prop) {
-+		rsv_chans = devm_kzalloc(dev,
-+					 sz/sizeof(s16) + 2*sizeof(s16),
-+					 GFP_KERNEL);
-+		if (!rsv_chans)
-+			return -ENOMEM;
-+		pdata->rsv->rsv_chans = rsv_chans;
-+
-+		ret = edma_of_read_u32_to_s16_array(node,
-+						    "ti,edma-reserved-channels",
-+						    (s16 *)rsv_chans,
-+						    sz/sizeof(u32));
-+		if (ret < 0)
-+			return ret;
-+	}
-+
-+	prop = of_find_property(node, "ti,edma-reserved-slots", &sz);
-+	if (prop) {
-+		rsv_slots = devm_kzalloc(dev,
-+					 sz/sizeof(s16) + 2*sizeof(s16),
-+					 GFP_KERNEL);
-+		if (!rsv_slots)
-+			return -ENOMEM;
-+		pdata->rsv->rsv_slots = rsv_slots;
-+
-+		ret = edma_of_read_u32_to_s16_array(node,
-+						    "ti,edma-reserved-slots",
-+						    (s16 *)rsv_slots,
-+						    sz/sizeof(u32));
-+		if (ret < 0)
-+			return ret;
-+	}
-+
-+	prop = of_find_property(node, "ti,edma-queue-tc-map", &sz);
-+	if (!prop)
-+		return -EINVAL;
-+
-+	queue_tc_map = devm_kzalloc(dev,
-+				    sz/sizeof(s8) + 2*sizeof(s8),
-+				    GFP_KERNEL);
-+	if (!queue_tc_map)
-+		return -ENOMEM;
-+	pdata->queue_tc_mapping = queue_tc_map;
-+
-+	ret = edma_of_read_u32_to_s8_array(node,
-+					   "ti,edma-queue-tc-map",
-+					   (s8 *)queue_tc_map,
-+					   sz/sizeof(u32));
-+	if (ret < 0)
-+		return ret;
-+
-+	prop = of_find_property(node, "ti,edma-queue-priority-map", &sz);
-+	if (!prop)
-+		return -EINVAL;
-+
-+	queue_priority_map = devm_kzalloc(dev,
-+					  sz/sizeof(s8) + 2*sizeof(s8),
-+					  GFP_KERNEL);
-+	if (!queue_priority_map)
-+		return -ENOMEM;
-+	pdata->queue_priority_mapping = queue_priority_map;
-+
-+	ret = edma_of_read_u32_to_s8_array(node,
-+					   "ti,edma-queue-tc-map",
-+					   (s8 *)queue_priority_map,
-+					   sz/sizeof(u32));
-+	if (ret < 0)
-+		return ret;
-+
-+	ret = of_property_read_u32(node, "ti,edma-default-queue", &value);
-+	if (ret < 0)
-+		return ret;
-+	pdata->default_queue = value;
-+
-+	prop = of_find_property(node, "ti,edma-xbar-event-map", &sz);
-+	if (prop)
-+		ret = edma_xbar_event_map(dev, node, pdata, sz);
-+
-+	return ret;
-+}
-+
-+static struct of_dma_filter_info edma_filter_info = {
-+	.filter_fn = edma_filter_fn,
-+};
- 
- static int edma_probe(struct platform_device *pdev)
- {
- 	struct edma_soc_info	**info = pdev->dev.platform_data;
-+	struct edma_soc_info	*ninfo[EDMA_MAX_CC] = {NULL, NULL};
-+	struct edma_soc_info	tmpinfo;
- 	const s8		(*queue_priority_mapping)[2];
- 	const s8		(*queue_tc_mapping)[2];
- 	int			i, j, off, ln, found = 0;
- 	int			status = -1;
- 	const s16		(*rsv_chans)[2];
- 	const s16		(*rsv_slots)[2];
-+	const s16		(*xbar_chans)[2];
- 	int			irq[EDMA_MAX_CC] = {0, 0};
- 	int			err_irq[EDMA_MAX_CC] = {0, 0};
--	struct resource		*r[EDMA_MAX_CC] = {NULL};
-+	struct resource		*r[EDMA_MAX_CC] = {NULL, NULL};
-+	struct resource		res[EDMA_MAX_CC];
- 	resource_size_t		len[EDMA_MAX_CC];
- 	char			res_name[10];
- 	char			irq_name[10];
-+	struct device_node	*node = pdev->dev.of_node;
-+	struct device		*dev = &pdev->dev;
-+	int			ret;
-+
-+	if (node) {
-+		info = ninfo;
-+		edma_of_parse_dt(dev, node, &tmpinfo);
-+		info[0] = &tmpinfo;
-+
-+		dma_cap_set(DMA_SLAVE, edma_filter_info.dma_cap);
-+		of_dma_controller_register(dev->of_node,
-+					   of_dma_simple_xlate,
-+					   &edma_filter_info);
-+	}
- 
- 	if (!info)
- 		return -ENODEV;
- 
-+	pm_runtime_enable(dev);
-+	ret = pm_runtime_get_sync(dev);
-+	if (IS_ERR_VALUE(ret)) {
-+		dev_err(dev, "pm_runtime_get_sync() failed\n");
-+		return ret;
-+	}
-+
- 	for (j = 0; j < EDMA_MAX_CC; j++) {
--		sprintf(res_name, "edma_cc%d", j);
--		r[j] = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-+		if (!info[j]) {
-+			if (!found)
-+				return -ENODEV;
-+			break;
-+		}
-+		if (node) {
-+			ret = of_address_to_resource(node, j, &res[j]);
-+			if (!IS_ERR_VALUE(ret))
-+				r[j] = &res[j];
-+		} else {
-+			sprintf(res_name, "edma_cc%d", j);
-+			r[j] = platform_get_resource_byname(pdev,
-+						IORESOURCE_MEM,
- 						res_name);
--		if (!r[j] || !info[j]) {
-+		}
-+		if (!r[j]) {
- 			if (found)
- 				break;
- 			else
-@@ -1465,8 +1735,22 @@ static int edma_probe(struct platform_device *pdev)
- 			}
- 		}
- 
--		sprintf(irq_name, "edma%d", j);
--		irq[j] = platform_get_irq_byname(pdev, irq_name);
-+		/* Clear the xbar mapped channels in unused list */
-+		xbar_chans = info[j]->xbar_chans;
-+		if (xbar_chans) {
-+			for (i = 0; xbar_chans[i][1] != -1; i++) {
-+				off = xbar_chans[i][1];
-+				clear_bits(off, 1,
-+					edma_cc[j]->edma_unused);
-+			}
-+		}
-+
-+		if (node)
-+			irq[j] = irq_of_parse_and_map(node, 0);
-+		else {
-+			sprintf(irq_name, "edma%d", j);
-+			irq[j] = platform_get_irq_byname(pdev, irq_name);
-+		}
- 		edma_cc[j]->irq_res_start = irq[j];
- 		status = request_irq(irq[j], dma_irq_handler, 0, "edma",
- 					&pdev->dev);
-@@ -1476,8 +1760,12 @@ static int edma_probe(struct platform_device *pdev)
- 			goto fail;
- 		}
- 
--		sprintf(irq_name, "edma%d_err", j);
--		err_irq[j] = platform_get_irq_byname(pdev, irq_name);
-+		if (node)
-+			err_irq[j] = irq_of_parse_and_map(node, 2);
-+		else {
-+			sprintf(irq_name, "edma%d_err", j);
-+			err_irq[j] = platform_get_irq_byname(pdev, irq_name);
-+		}
- 		edma_cc[j]->irq_res_end = err_irq[j];
- 		status = request_irq(err_irq[j], dma_ccerr_handler, 0,
- 					"edma_error", &pdev->dev);
-@@ -1538,9 +1826,17 @@ fail1:
- 	return status;
- }
- 
-+static const struct of_device_id edma_of_ids[] = {
-+	{ .compatible = "ti,edma3", },
-+	{}
-+};
- 
- static struct platform_driver edma_driver = {
--	.driver.name	= "edma",
-+	.driver = {
-+		.name	= "edma",
-+		.of_match_table = edma_of_ids,
-+	},
-+	.probe = edma_probe,
- };
- 
- static int __init edma_init(void)
-diff --git a/include/linux/platform_data/edma.h b/include/linux/platform_data/edma.h
-index 2344ea2..ffc1fb2 100644
---- a/include/linux/platform_data/edma.h
-+++ b/include/linux/platform_data/edma.h
-@@ -177,6 +177,7 @@ struct edma_soc_info {
- 
- 	const s8	(*queue_tc_mapping)[2];
- 	const s8	(*queue_priority_mapping)[2];
-+	const s16	(*xbar_chans)[2];
- };
- 
- #endif
--- 
-1.8.1
-
diff --git a/patches/dma/0017-dmaengine-edma-enable-build-for-AM33XX.patch b/patches/dma/0017-dmaengine-edma-enable-build-for-AM33XX.patch
deleted file mode 100644
index 9d513887703ddf02f009108f851a0e9575fa9713..0000000000000000000000000000000000000000
--- a/patches/dma/0017-dmaengine-edma-enable-build-for-AM33XX.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From f9dbd93b4c021dfaf32058eb4f6c18ae92489c36 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Thu, 6 Sep 2012 17:42:35 -0400
-Subject: [PATCH 17/35] dmaengine: edma: enable build for AM33XX
-
-Enable TI EDMA option on OMAP.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- drivers/dma/Kconfig | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
-index d4c1218..20ef955 100644
---- a/drivers/dma/Kconfig
-+++ b/drivers/dma/Kconfig
-@@ -221,7 +221,7 @@ config SIRF_DMA
- 
- config TI_EDMA
- 	tristate "TI EDMA support"
--	depends on ARCH_DAVINCI
-+	depends on ARCH_DAVINCI || ARCH_OMAP
- 	select DMA_ENGINE
- 	select DMA_VIRTUAL_CHANNELS
- 	default n
--- 
-1.8.1
-
diff --git a/patches/dma/0018-dmaengine-edma-Add-TI-EDMA-device-tree-binding.patch b/patches/dma/0018-dmaengine-edma-Add-TI-EDMA-device-tree-binding.patch
deleted file mode 100644
index af3b60d5cd3189637d0f1b954d8d80f35d8e5b7b..0000000000000000000000000000000000000000
--- a/patches/dma/0018-dmaengine-edma-Add-TI-EDMA-device-tree-binding.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From ba83f86c6bb18f7babd9330f869331eb87452225 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Thu, 20 Sep 2012 07:46:04 -0400
-Subject: [PATCH 18/35] dmaengine: edma: Add TI EDMA device tree binding
-
-The binding definition is based on the generic DMA controller
-binding.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- Documentation/devicetree/bindings/dma/ti-edma.txt | 49 +++++++++++++++++++++++
- 1 file changed, 49 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/dma/ti-edma.txt
-
-diff --git a/Documentation/devicetree/bindings/dma/ti-edma.txt b/Documentation/devicetree/bindings/dma/ti-edma.txt
-new file mode 100644
-index 0000000..075a60e3
---- /dev/null
-+++ b/Documentation/devicetree/bindings/dma/ti-edma.txt
-@@ -0,0 +1,49 @@
-+TI EDMA
-+
-+Required properties:
-+- compatible : "ti,edma3"
-+- ti,hwmods: Name of the hwmods associated to the EDMA
-+- ti,edma-regions: Number of regions
-+- ti,edma-slots: Number of slots
-+- ti,edma-queue-tc-map: List of transfer control to queue mappings
-+- ti,edma-queue-priority-map: List of queue priority mappings
-+- ti,edma-default-queue: Default queue value
-+
-+Optional properties:
-+- ti,edma-reserved-channels: List of reserved channel regions
-+- ti,edma-reserved-slots: List of reserved slot regions
-+- ti,edma-xbar-event-map: Crossbar event to channel map
-+
-+Example:
-+
-+edma: edma@49000000 {
-+	reg = <0x49000000 0x10000>;
-+	interrupt-parent = <&intc>;
-+	interrupts = <12 13 14>;
-+	compatible = "ti,edma3";
-+	ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
-+	#dma-cells = <1>;
-+	dma-channels = <64>;
-+	ti,edma-regions = <4>;
-+	ti,edma-slots = <256>;
-+	ti,edma-reserved-channels = <0  2
-+				     14 2
-+				     26 6
-+				     48 4
-+				     56 8>;
-+	ti,edma-reserved-slots = <0  2
-+				  14 2
-+				  26 6
-+				  48 4
-+				  56 8
-+				  64 127>;
-+	ti,edma-queue-tc-map = <0 0
-+				1 1
-+				2 2>;
-+	ti,edma-queue-priority-map = <0 0
-+				      1 1
-+				      2 2>;
-+	ti,edma-default-queue = <0>;
-+	ti,edma-xbar-event-map = <1 12
-+				  2 13>;
-+};
--- 
-1.8.1
-
diff --git a/patches/dma/0019-ARM-dts-add-AM33XX-EDMA-support.patch b/patches/dma/0019-ARM-dts-add-AM33XX-EDMA-support.patch
deleted file mode 100644
index 4d86136883cd63e77d52fba8e114732f921644d0..0000000000000000000000000000000000000000
--- a/patches/dma/0019-ARM-dts-add-AM33XX-EDMA-support.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 11eabe54b9cead5354c3fb25f95b1c7fddcf3509 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Wed, 10 Oct 2012 10:01:33 -0400
-Subject: [PATCH 19/35] ARM: dts: add AM33XX EDMA support
-
-Adds AM33XX EDMA support to the am33xx.dtsi as documented in
-Documentation/devicetree/bindings/dma/ti-edma.txt
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- arch/arm/boot/dts/am33xx.dtsi | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index c2f14e8..e711ffb 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -87,6 +87,26 @@
- 			reg = <0x48200000 0x1000>;
- 		};
- 
-+		edma: edma@49000000 {
-+			compatible = "ti,edma3";
-+			ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
-+			reg =	<0x49000000 0x10000>,
-+				<0x44e10f90 0x10>;
-+			interrupt-parent = <&intc>;
-+			interrupts = <12 13 14>;
-+			#dma-cells = <1>;
-+			dma-channels = <64>;
-+			ti,edma-regions = <4>;
-+			ti,edma-slots = <256>;
-+			ti,edma-queue-tc-map = <0 0
-+						1 1
-+						2 2>;
-+			ti,edma-queue-priority-map = <0 0
-+						      1 1
-+						      2 2>;
-+			ti,edma-default-queue = <0>;
-+		};
-+
- 		gpio1: gpio@44e07000 {
- 			compatible = "ti,omap4-gpio";
- 			ti,hwmods = "gpio1";
--- 
-1.8.1
-
diff --git a/patches/dma/0020-dmaengine-add-dma_request_slave_channel_compat.patch b/patches/dma/0020-dmaengine-add-dma_request_slave_channel_compat.patch
deleted file mode 100644
index 224370e15e5ac53656fecc5f9ba9f80430a4d058..0000000000000000000000000000000000000000
--- a/patches/dma/0020-dmaengine-add-dma_request_slave_channel_compat.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 062499a0dc01a4ef5362566bde7895861ae3f83f Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Thu, 11 Oct 2012 12:58:44 -0400
-Subject: [PATCH 20/35] dmaengine: add dma_request_slave_channel_compat()
-
-Adds a dma_request_slave_channel_compat() wrapper which accepts
-both the arguments from dma_request_channel() and
-dma_request_slave_channel(). Based on whether the driver is
-instantiated via DT, the appropriate channel request call will be
-made.
-
-This allows for a much cleaner migration of drivers to the
-dmaengine DT API as platforms continue to be mixed between those
-that boot using DT and those that do not.
-
-Suggested-by: Tony Lindgren <tony@atomide.com>
-Signed-off-by: Matt Porter <mporter@ti.com>
-Acked-by: Tony Lindgren <tony@atomide.com>
----
- include/linux/dmaengine.h | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
-index 9fd0c5b..64f9f69 100644
---- a/include/linux/dmaengine.h
-+++ b/include/linux/dmaengine.h
-@@ -1047,6 +1047,16 @@ void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
- struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type);
- struct dma_chan *net_dma_find_channel(void);
- #define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
-+static inline struct dma_chan
-+*dma_request_slave_channel_compat(dma_cap_mask_t mask, dma_filter_fn fn,
-+				  void *fn_param, struct device *dev,
-+				  char *name)
-+{
-+	if (dev->of_node)
-+		return dma_request_slave_channel(dev, name);
-+	else
-+		return dma_request_channel(mask, fn, fn_param);
-+}
- 
- /* --- Helper iov-locking functions --- */
- 
--- 
-1.8.1
-
diff --git a/patches/dma/0021-mmc-omap_hsmmc-convert-to-dma_request_slave_channel_.patch b/patches/dma/0021-mmc-omap_hsmmc-convert-to-dma_request_slave_channel_.patch
deleted file mode 100644
index 4c84528a19d964fe3c75e1860f999645050e3070..0000000000000000000000000000000000000000
--- a/patches/dma/0021-mmc-omap_hsmmc-convert-to-dma_request_slave_channel_.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From c155885ecbdddffb1335ce3e21ea30063d791ee5 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Thu, 6 Sep 2012 17:47:21 -0400
-Subject: [PATCH 21/35] mmc: omap_hsmmc: convert to
- dma_request_slave_channel_compat()
-
-Convert dmaengine channel requests to use
-dma_request_slave_channel_compat(). This supports the DT case of
-platforms requiring channel selection from either the OMAP DMA or
-the EDMA engine. AM33xx only boots from DT and is the only user
-implementing EDMA so in the !DT case we can default to the OMAP DMA
-filter.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
-Acked-by: Tony Lindgren <tony@atomide.com>
----
- drivers/mmc/host/omap_hsmmc.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
-index bc58078..e79b12d 100644
---- a/drivers/mmc/host/omap_hsmmc.c
-+++ b/drivers/mmc/host/omap_hsmmc.c
-@@ -1915,14 +1915,20 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
- 	dma_cap_zero(mask);
- 	dma_cap_set(DMA_SLAVE, mask);
- 
--	host->rx_chan = dma_request_channel(mask, omap_dma_filter_fn, &rx_req);
-+	host->rx_chan =
-+		dma_request_slave_channel_compat(mask, omap_dma_filter_fn,
-+						 &rx_req, &pdev->dev, "rx");
-+
- 	if (!host->rx_chan) {
- 		dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel %u\n", rx_req);
- 		ret = -ENXIO;
- 		goto err_irq;
- 	}
- 
--	host->tx_chan = dma_request_channel(mask, omap_dma_filter_fn, &tx_req);
-+	host->tx_chan =
-+		dma_request_slave_channel_compat(mask, omap_dma_filter_fn,
-+						 &tx_req, &pdev->dev, "tx");
-+
- 	if (!host->tx_chan) {
- 		dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel %u\n", tx_req);
- 		ret = -ENXIO;
--- 
-1.8.1
-
diff --git a/patches/dma/0022-mmc-omap_hsmmc-set-max_segs-based-on-dma-engine-limi.patch b/patches/dma/0022-mmc-omap_hsmmc-set-max_segs-based-on-dma-engine-limi.patch
deleted file mode 100644
index 2c555e1fa80cb598bc4c770aa770fda2f349a895..0000000000000000000000000000000000000000
--- a/patches/dma/0022-mmc-omap_hsmmc-set-max_segs-based-on-dma-engine-limi.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 995b5a32f28b2bfbf0ff6d797ef52aa859cb3756 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Thu, 20 Sep 2012 08:55:41 -0400
-Subject: [PATCH 22/35] mmc: omap_hsmmc: set max_segs based on dma engine
- limitations
-
-The EDMA DMAC has a hardware limitation that prevents supporting
-scatter gather lists with any number of segments. The DMA Engine
-API reports the maximum number of segments a channel can support
-via the optional dma_get_channel_caps() API. If the nr_segs
-capability is present, the value is used to configure mmc->max_segs
-appropriately.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
-Acked-by: Tony Lindgren <tony@atomide.com>
----
- drivers/mmc/host/omap_hsmmc.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
-index e79b12d..f74bd69 100644
---- a/drivers/mmc/host/omap_hsmmc.c
-+++ b/drivers/mmc/host/omap_hsmmc.c
-@@ -1769,6 +1769,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
- 	const struct of_device_id *match;
- 	dma_cap_mask_t mask;
- 	unsigned tx_req, rx_req;
-+	struct dmaengine_chan_caps *dma_chan_caps;
- 	struct pinctrl *pinctrl;
- 
- 	match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev);
-@@ -1935,6 +1936,11 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
- 		goto err_irq;
- 	}
- 
-+	/* Some DMA Engines only handle a limited number of SG segments */
-+	dma_chan_caps = dma_get_channel_caps(host->rx_chan, DMA_DEV_TO_MEM);
-+	if (dma_chan_caps && dma_chan_caps->seg_nr)
-+		mmc->max_segs = dma_chan_caps->seg_nr;
-+
- 	/* Request IRQ for MMC operations */
- 	ret = request_irq(host->irq, omap_hsmmc_irq, 0,
- 			mmc_hostname(mmc), host);
--- 
-1.8.1
-
diff --git a/patches/dma/0023-mmc-omap_hsmmc-add-generic-DMA-request-support-to-th.patch b/patches/dma/0023-mmc-omap_hsmmc-add-generic-DMA-request-support-to-th.patch
deleted file mode 100644
index dcc91d12dfb2ff3f67149053c1495fae6a6eaf83..0000000000000000000000000000000000000000
--- a/patches/dma/0023-mmc-omap_hsmmc-add-generic-DMA-request-support-to-th.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From dd70c6bfa325e259adaadbf1578c68d030dfb308 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Thu, 20 Sep 2012 07:47:47 -0400
-Subject: [PATCH 23/35] mmc: omap_hsmmc: add generic DMA request support to the
- DT binding
-
-The binding definition is based on the generic DMA request binding.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
-Acked-by: Tony Lindgren <tony@atomide.com>
----
- .../devicetree/bindings/mmc/ti-omap-hsmmc.txt      | 25 +++++++++++++++++++++-
- 1 file changed, 24 insertions(+), 1 deletion(-)
-
-diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
-index ed271fc..826cc51 100644
---- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
-+++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
-@@ -20,8 +20,28 @@ ti,dual-volt: boolean, supports dual voltage cards
- ti,non-removable: non-removable slot (like eMMC)
- ti,needs-special-reset: Requires a special softreset sequence
- ti,needs-special-hs-handling: HSMMC IP needs special setting for handling High Speed
-+dmas: DMA controller phandle and DMA request value ordered pair
-+One tx and one rx pair is required.
-+dma-names: DMA request names. These strings correspond 1:1 with
-+the ordered pairs in dmas. The RX request must be "rx" and the
-+TX request must be "tx".
-+
-+Examples:
-+
-+[hwmod populated DMA resources]
-+
-+	mmc1: mmc@0x4809c000 {
-+		compatible = "ti,omap4-hsmmc";
-+		reg = <0x4809c000 0x400>;
-+		ti,hwmods = "mmc1";
-+		ti,dual-volt;
-+		bus-width = <4>;
-+		vmmc-supply = <&vmmc>; /* phandle to regulator node */
-+		ti,non-removable;
-+	};
-+
-+[generic DMA request binding]
- 
--Example:
- 	mmc1: mmc@0x4809c000 {
- 		compatible = "ti,omap4-hsmmc";
- 		reg = <0x4809c000 0x400>;
-@@ -30,4 +50,7 @@ Example:
- 		bus-width = <4>;
- 		vmmc-supply = <&vmmc>; /* phandle to regulator node */
- 		ti,non-removable;
-+		dmas = <&edma 24
-+			&edma 25>;
-+		dma-names = "tx", "rx";
- 	};
--- 
-1.8.1
-
diff --git a/patches/dma/0024-ARM-dts-add-AM33XX-MMC-support.patch b/patches/dma/0024-ARM-dts-add-AM33XX-MMC-support.patch
deleted file mode 100644
index 4bc7db40742a90f158172af430abc91a22187e7d..0000000000000000000000000000000000000000
--- a/patches/dma/0024-ARM-dts-add-AM33XX-MMC-support.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From e0ebca204811b8d8facdfeff7c3bac4d4d3d8e82 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Wed, 10 Oct 2012 15:14:03 -0400
-Subject: [PATCH 24/35] ARM: dts: add AM33XX MMC support
-
-Adds AM33XX MMC support for am335x-bone, am335x-evm, and
-am335x-evmsk.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
-Acked-by: Tony Lindgren <tony@atomide.com>
----
- arch/arm/boot/dts/am335x-bone.dts  |  7 +++++++
- arch/arm/boot/dts/am335x-evm.dts   |  7 +++++++
- arch/arm/boot/dts/am335x-evmsk.dts |  7 +++++++
- arch/arm/boot/dts/am33xx.dtsi      | 28 ++++++++++++++++++++++++++++
- 4 files changed, 49 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
-index 11b240c..a154ce0 100644
---- a/arch/arm/boot/dts/am335x-bone.dts
-+++ b/arch/arm/boot/dts/am335x-bone.dts
-@@ -120,6 +120,8 @@
- 		};
- 
- 		ldo3_reg: regulator@5 {
-+			regulator-min-microvolt = <1800000>;
-+			regulator-max-microvolt = <3300000>;
- 			regulator-always-on;
- 		};
- 
-@@ -136,3 +138,8 @@
- &cpsw_emac1 {
- 	phy_id = <&davinci_mdio>, <1>;
- };
-+
-+&mmc1 {
-+	status = "okay";
-+	vmmc-supply = <&ldo3_reg>;
-+};
-diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
-index d649644..2907da6 100644
---- a/arch/arm/boot/dts/am335x-evm.dts
-+++ b/arch/arm/boot/dts/am335x-evm.dts
-@@ -232,6 +232,8 @@
- 		};
- 
- 		vmmc_reg: regulator@12 {
-+			regulator-min-microvolt = <1800000>;
-+			regulator-max-microvolt = <3300000>;
- 			regulator-always-on;
- 		};
- 	};
-@@ -244,3 +246,8 @@
- &cpsw_emac1 {
- 	phy_id = <&davinci_mdio>, <1>;
- };
-+
-+&mmc1 {
-+	status = "okay";
-+	vmmc-supply = <&vmmc_reg>;
-+};
-diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
-index f5a6162..f050c46 100644
---- a/arch/arm/boot/dts/am335x-evmsk.dts
-+++ b/arch/arm/boot/dts/am335x-evmsk.dts
-@@ -244,7 +244,14 @@
- 		};
- 
- 		vmmc_reg: regulator@12 {
-+			regulator-min-microvolt = <1800000>;
-+			regulator-max-microvolt = <3300000>;
- 			regulator-always-on;
- 		};
- 	};
- };
-+
-+&mmc1 {
-+	status = "okay";
-+	vmmc-supply = <&vmmc_reg>;
-+};
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index e711ffb..278b75d 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -235,6 +235,34 @@
- 			status = "disabled";
- 		};
- 
-+		mmc1: mmc@48060000 {
-+			compatible = "ti,omap3-hsmmc";
-+			ti,hwmods = "mmc1";
-+			ti,dual-volt;
-+			ti,needs-special-reset;
-+			dmas = <&edma 24
-+				&edma 25>;
-+			dma-names = "tx", "rx";
-+			status = "disabled";
-+		};
-+
-+		mmc2: mmc@481d8000 {
-+			compatible = "ti,omap3-hsmmc";
-+			ti,hwmods = "mmc2";
-+			ti,needs-special-reset;
-+			dmas = <&edma 2
-+				&edma 3>;
-+			dma-names = "tx", "rx";
-+			status = "disabled";
-+		};
-+
-+		mmc3: mmc@47810000 {
-+			compatible = "ti,omap3-hsmmc";
-+			ti,hwmods = "mmc3";
-+			ti,needs-special-reset;
-+			status = "disabled";
-+		};
-+
- 		wdt2: wdt@44e35000 {
- 			compatible = "ti,omap3-wdt";
- 			ti,hwmods = "wd_timer2";
--- 
-1.8.1
-
diff --git a/patches/dma/0025-spi-omap2-mcspi-convert-to-dma_request_slave_channel.patch b/patches/dma/0025-spi-omap2-mcspi-convert-to-dma_request_slave_channel.patch
deleted file mode 100644
index 039857d1db4f9663d989579e4f5ea0dde6785278..0000000000000000000000000000000000000000
--- a/patches/dma/0025-spi-omap2-mcspi-convert-to-dma_request_slave_channel.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From 33700bd2b42f89a57f77594d98c5583ec256d645 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Thu, 20 Sep 2012 00:37:54 -0400
-Subject: [PATCH 25/35] spi: omap2-mcspi: convert to
- dma_request_slave_channel_compat()
-
-Convert dmaengine channel requests to use
-dma_request_slave_channel_compat(). This supports the DT case of
-platforms requiring channel selection from either the OMAP DMA or
-the EDMA engine. AM33xx only boots from DT and is the only user
-implementing EDMA so in the !DT case we can default to the OMAP DMA
-filter.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- drivers/spi/spi-omap2-mcspi.c | 65 ++++++++++++++++++++++++++++++-------------
- 1 file changed, 45 insertions(+), 20 deletions(-)
-
-diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
-index b610f52..2c02c02 100644
---- a/drivers/spi/spi-omap2-mcspi.c
-+++ b/drivers/spi/spi-omap2-mcspi.c
-@@ -102,6 +102,9 @@ struct omap2_mcspi_dma {
- 
- 	struct completion dma_tx_completion;
- 	struct completion dma_rx_completion;
-+
-+	char dma_rx_ch_name[14];
-+	char dma_tx_ch_name[14];
- };
- 
- /* use PIO for small transfers, avoiding DMA setup/teardown overhead and
-@@ -822,14 +825,23 @@ static int omap2_mcspi_request_dma(struct spi_device *spi)
- 	dma_cap_zero(mask);
- 	dma_cap_set(DMA_SLAVE, mask);
- 	sig = mcspi_dma->dma_rx_sync_dev;
--	mcspi_dma->dma_rx = dma_request_channel(mask, omap_dma_filter_fn, &sig);
-+
-+	mcspi_dma->dma_rx =
-+		dma_request_slave_channel_compat(mask, omap_dma_filter_fn,
-+						 &sig, &master->dev,
-+						 mcspi_dma->dma_rx_ch_name);
-+
- 	if (!mcspi_dma->dma_rx) {
- 		dev_err(&spi->dev, "no RX DMA engine channel for McSPI\n");
- 		return -EAGAIN;
- 	}
- 
- 	sig = mcspi_dma->dma_tx_sync_dev;
--	mcspi_dma->dma_tx = dma_request_channel(mask, omap_dma_filter_fn, &sig);
-+	mcspi_dma->dma_tx =
-+		dma_request_slave_channel_compat(mask, omap_dma_filter_fn,
-+						 &sig, &master->dev,
-+						 mcspi_dma->dma_tx_ch_name);
-+
- 	if (!mcspi_dma->dma_tx) {
- 		dev_err(&spi->dev, "no TX DMA engine channel for McSPI\n");
- 		dma_release_channel(mcspi_dma->dma_rx);
-@@ -1223,29 +1235,42 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
- 		goto free_master;
- 
- 	for (i = 0; i < master->num_chipselect; i++) {
--		char dma_ch_name[14];
-+		char *dma_rx_ch_name = mcspi->dma_channels[i].dma_rx_ch_name;
-+		char *dma_tx_ch_name = mcspi->dma_channels[i].dma_tx_ch_name;
- 		struct resource *dma_res;
- 
--		sprintf(dma_ch_name, "rx%d", i);
--		dma_res = platform_get_resource_byname(pdev, IORESOURCE_DMA,
--							dma_ch_name);
--		if (!dma_res) {
--			dev_dbg(&pdev->dev, "cannot get DMA RX channel\n");
--			status = -ENODEV;
--			break;
--		}
-+		sprintf(dma_rx_ch_name, "rx%d", i);
-+		if (!pdev->dev.of_node) {
-+			dma_res =
-+				platform_get_resource_byname(pdev,
-+							     IORESOURCE_DMA,
-+							     dma_rx_ch_name);
-+			if (!dma_res) {
-+				dev_dbg(&pdev->dev,
-+					"cannot get DMA RX channel\n");
-+				status = -ENODEV;
-+				break;
-+			}
- 
--		mcspi->dma_channels[i].dma_rx_sync_dev = dma_res->start;
--		sprintf(dma_ch_name, "tx%d", i);
--		dma_res = platform_get_resource_byname(pdev, IORESOURCE_DMA,
--							dma_ch_name);
--		if (!dma_res) {
--			dev_dbg(&pdev->dev, "cannot get DMA TX channel\n");
--			status = -ENODEV;
--			break;
-+			mcspi->dma_channels[i].dma_rx_sync_dev =
-+				dma_res->start;
- 		}
-+		sprintf(dma_tx_ch_name, "tx%d", i);
-+		if (!pdev->dev.of_node) {
-+			dma_res =
-+				platform_get_resource_byname(pdev,
-+							     IORESOURCE_DMA,
-+							     dma_tx_ch_name);
-+			if (!dma_res) {
-+				dev_dbg(&pdev->dev,
-+					"cannot get DMA TX channel\n");
-+				status = -ENODEV;
-+				break;
-+			}
- 
--		mcspi->dma_channels[i].dma_tx_sync_dev = dma_res->start;
-+			mcspi->dma_channels[i].dma_tx_sync_dev =
-+				dma_res->start;
-+		}
- 	}
- 
- 	if (status < 0)
--- 
-1.8.1
-
diff --git a/patches/dma/0026-spi-omap2-mcspi-add-generic-DMA-request-support-to-t.patch b/patches/dma/0026-spi-omap2-mcspi-add-generic-DMA-request-support-to-t.patch
deleted file mode 100644
index 3ec3eacc606873f56690704dfaf0bf047b86a650..0000000000000000000000000000000000000000
--- a/patches/dma/0026-spi-omap2-mcspi-add-generic-DMA-request-support-to-t.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 8bfcc00f60216d88d11b997a42fb1e3986a0e6a0 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Thu, 20 Sep 2012 09:21:16 -0400
-Subject: [PATCH 26/35] spi: omap2-mcspi: add generic DMA request support to
- the DT binding
-
-The binding definition is based on the generic DMA request binding.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- Documentation/devicetree/bindings/spi/omap-spi.txt |   27 +++++++++++++++++++-
- 1 file changed, 26 insertions(+), 1 deletion(-)
-
-diff --git a/Documentation/devicetree/bindings/spi/omap-spi.txt b/Documentation/devicetree/bindings/spi/omap-spi.txt
-index 938809c..68cb28e 100644
---- a/Documentation/devicetree/bindings/spi/omap-spi.txt
-+++ b/Documentation/devicetree/bindings/spi/omap-spi.txt
-@@ -10,7 +10,18 @@ Required properties:
- 			  input. The default is D0 as input and
- 			  D1 as output.
- 
--Example:
-+Optional properties:
-+- dmas: List of DMA controller phandle and DMA request ordered
-+	pairs. One tx and one rx pair is required for each chip
-+	select.
-+- dma-names: List of DMA request names. These strings correspond
-+	1:1 with the ordered pairs in dmas. The string naming is
-+	to be "rxN" and "txN" for RX and TX requests,
-+	respectively, where N equals the chip select number.
-+
-+Examples:
-+
-+[hwmod populated DMA resources]
- 
- mcspi1: mcspi@1 {
-     #address-cells = <1>;
-@@ -20,3 +31,17 @@ mcspi1: mcspi@1 {
-     ti,spi-num-cs = <4>;
- };
- 
-+[generic DMA request binding]
-+
-+mcspi1: mcspi@1 {
-+    #address-cells = <1>;
-+    #size-cells = <0>;
-+    compatible = "ti,omap4-mcspi";
-+    ti,hwmods = "mcspi1";
-+    ti,spi-num-cs = <2>;
-+    dmas = <&edma 42
-+	    &edma 43
-+	    &edma 44
-+	    &edma 45>;
-+    dma-names = "tx0", "rx0", "tx1", "rx1";
-+};
--- 
-1.7.10.4
-
diff --git a/patches/dma/0027-ARM-dts-add-AM33XX-SPI-DMA-support.patch b/patches/dma/0027-ARM-dts-add-AM33XX-SPI-DMA-support.patch
deleted file mode 100644
index 5bf6bcfb6e753571a4fc6b734e5a08fb235a47b6..0000000000000000000000000000000000000000
--- a/patches/dma/0027-ARM-dts-add-AM33XX-SPI-DMA-support.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 744dd74e9217824a99bb6b81ef7ef4b86ce46352 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Thu, 10 Jan 2013 19:09:50 -0500
-Subject: [PATCH 27/35] ARM: dts: add AM33XX SPI DMA support
-
-Adds DMA resources to the AM33XX SPI nodes.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- arch/arm/boot/dts/am33xx.dtsi | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index 278b75d..8fd3648 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -356,6 +356,11 @@
- 			interrupt = <65>;
- 			ti,spi-num-cs = <2>;
- 			ti,hwmods = "spi0";
-+			dmas = <&edma 16
-+				&edma 17
-+				&edma 18
-+				&edma 19>;
-+			dma-names = "tx0", "rx0", "tx1", "rx1";
- 			status = "disabled";
- 		};
- 
-@@ -367,6 +372,11 @@
- 			interrupt = <125>;
- 			ti,spi-num-cs = <2>;
- 			ti,hwmods = "spi1";
-+			dmas = <&edma 42
-+				&edma 43
-+				&edma 44
-+				&edma 45>;
-+			dma-names = "tx0", "rx0", "tx1", "rx1";
- 			status = "disabled";
- 		};
- 
--- 
-1.8.1
-
diff --git a/patches/dma/0028-ARM-dts-Add-SPI-Flash-support-to-am335x-evm.patch b/patches/dma/0028-ARM-dts-Add-SPI-Flash-support-to-am335x-evm.patch
deleted file mode 100644
index 3db2390ae5329c0ff1110861a122d0e83ea6f07e..0000000000000000000000000000000000000000
--- a/patches/dma/0028-ARM-dts-Add-SPI-Flash-support-to-am335x-evm.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 22126031aa8125ed8dbbe933de1cfe3fae021675 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Thu, 10 Jan 2013 19:11:38 -0500
-Subject: [PATCH 28/35] ARM: dts: Add SPI Flash support to am335x-evm
-
-Add SPI pinmuxing and spansion device node for profile 2..
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- arch/arm/boot/dts/am335x-evm.dts | 21 ++++++++++++++++++++-
- 1 file changed, 20 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
-index 2907da6..0dda333 100644
---- a/arch/arm/boot/dts/am335x-evm.dts
-+++ b/arch/arm/boot/dts/am335x-evm.dts
-@@ -26,7 +26,7 @@
- 
- 	am33xx_pinmux: pinmux@44e10800 {
- 		pinctrl-names = "default";
--		pinctrl-0 = <&matrix_keypad_s0 &volume_keys_s0>;
-+		pinctrl-0 = <&matrix_keypad_s0 &volume_keys_s0 &spi0_pins_s0>;
- 
- 		matrix_keypad_s0: matrix_keypad_s0 {
- 			pinctrl-single,pins = <
-@@ -44,6 +44,16 @@
- 				0x154 0x27	/* spi0_d0.gpio0_3, INPUT | MODE7 */
- 			>;
- 		};
-+
-+		spi0_pins_s0: spi0_pins_s0 {
-+			pinctrl-single,pins = <
-+				0x150 0x30	/* spi0_sclk.spi0_sclk, INPUT_PULLUP | MODE0 */
-+				0x154 0x30	/* spi0_d0.spi0_d0, INPUT_PULLUP | MODE0 */
-+				0x158 0x10	/* spi0_d1.spi0_d1, OUTPUT_PULLUP | MODE0 */
-+				0x15c 0x10	/* spi0_cs0.spi0_cs0, OUTPUT_PULLUP | MODE0 */
-+			>;
-+		};
-+
- 	};
- 
- 	ocp {
-@@ -251,3 +261,12 @@
- 	status = "okay";
- 	vmmc-supply = <&vmmc_reg>;
- };
-+
-+&spi0 {
-+	status = "okay";
-+	spi-flash@0 {
-+		compatible = "spansion,s25fl064k", "m25p80";
-+		spi-max-frequency = <24000000>;
-+		reg = <0>;
-+	};
-+};
--- 
-1.8.1
-
diff --git a/patches/dma/0029-Documentation-bindings-add-spansion.patch b/patches/dma/0029-Documentation-bindings-add-spansion.patch
deleted file mode 100644
index e03c28b5bef7638f570e6cffcf1675215135a556..0000000000000000000000000000000000000000
--- a/patches/dma/0029-Documentation-bindings-add-spansion.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From eed5dcb3ad2736626371adade84ab3d472df885d Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Wed, 17 Oct 2012 17:12:09 -0400
-Subject: [PATCH 29/35] Documentation: bindings: add spansion
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
-index 2e000ea..cb0209a 100644
---- a/Documentation/devicetree/bindings/vendor-prefixes.txt
-+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
-@@ -51,6 +51,7 @@ simtek
- sirf	SiRF Technology, Inc.
- sitronix Sitronix Technology Corp.
- snps 	Synopsys, Inc.
-+spansion	Spansion, Inc.
- st	STMicroelectronics
- stericsson	ST-Ericsson
- ti	Texas Instruments
--- 
-1.8.1
-
diff --git a/patches/dma/0030-ARM-dts-enable-spi1-node-and-pinmux-on-BeagleBone.patch b/patches/dma/0030-ARM-dts-enable-spi1-node-and-pinmux-on-BeagleBone.patch
deleted file mode 100644
index 9eef02410d4dbf0d922077d2f3d45587592f1b1d..0000000000000000000000000000000000000000
--- a/patches/dma/0030-ARM-dts-enable-spi1-node-and-pinmux-on-BeagleBone.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9fe50dc252c4e471209e43fc8fefa98466ef9aba Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Thu, 10 Jan 2013 19:13:30 -0500
-Subject: [PATCH 30/35] ARM: dts: enable spi1 node and pinmux on BeagleBone
-
-Enables the spi1 IP and pinmuxes for use on the mcasp0
-pins.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- arch/arm/boot/dts/am335x-bone.dts | 15 ++++++++++++++-
- 1 file changed, 14 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
-index a154ce0..ccff86a 100644
---- a/arch/arm/boot/dts/am335x-bone.dts
-+++ b/arch/arm/boot/dts/am335x-bone.dts
-@@ -26,7 +26,7 @@
- 
- 	am33xx_pinmux: pinmux@44e10800 {
- 		pinctrl-names = "default";
--		pinctrl-0 = <&user_leds_s0>;
-+		pinctrl-0 = <&user_leds_s0 &spi1_pins_s0>;
- 
- 		user_leds_s0: user_leds_s0 {
- 			pinctrl-single,pins = <
-@@ -36,6 +36,15 @@
- 				0x60 0x17	/* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */
- 			>;
- 		};
-+
-+		spi1_pins_s0: spi1_pins_s0 {
-+			pinctrl-single,pins = <
-+				0x190 0x33	/* mcasp0_aclkx.spi1_sclk, INPUT_PULLUP | MODE3 */
-+				0x194 0x33	/* mcasp0_fsx.spi1_d0, INPUT_PULLUP | MODE3 */
-+				0x198 0x13	/* mcasp0_axr0.spi1_d1, OUTPUT_PULLUP | MODE3 */
-+				0x19c 0x13	/* mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */
-+			>;
-+		};
- 	};
- 
- 	ocp {
-@@ -143,3 +152,7 @@
- 	status = "okay";
- 	vmmc-supply = <&ldo3_reg>;
- };
-+
-+&spi1 {
-+	status = "okay";
-+};
--- 
-1.8.1
-
diff --git a/patches/dma/0031-ARM-dts-add-BeagleBone-Adafruit-1.8-LCD-support.patch b/patches/dma/0031-ARM-dts-add-BeagleBone-Adafruit-1.8-LCD-support.patch
deleted file mode 100644
index 0420994de9ae9cf6f3219e1cfc8446e3e6905768..0000000000000000000000000000000000000000
--- a/patches/dma/0031-ARM-dts-add-BeagleBone-Adafruit-1.8-LCD-support.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 0b4d673a3e1c225e091b3ddec4f06182af4f27c8 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Thu, 11 Oct 2012 08:52:54 -0400
-Subject: [PATCH 31/35] ARM: dts: add BeagleBone Adafruit 1.8 LCD support
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- arch/arm/boot/dts/am335x-bone.dts | 19 ++++++++++++++++++-
- 1 file changed, 18 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
-index ccff86a..8ac3ae4 100644
---- a/arch/arm/boot/dts/am335x-bone.dts
-+++ b/arch/arm/boot/dts/am335x-bone.dts
-@@ -26,7 +26,7 @@
- 
- 	am33xx_pinmux: pinmux@44e10800 {
- 		pinctrl-names = "default";
--		pinctrl-0 = <&user_leds_s0 &spi1_pins_s0>;
-+		pinctrl-0 = <&user_leds_s0 &spi1_pins_s0 &lcd_pins_s0>;
- 
- 		user_leds_s0: user_leds_s0 {
- 			pinctrl-single,pins = <
-@@ -45,6 +45,13 @@
- 				0x19c 0x13	/* mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */
- 			>;
- 		};
-+
-+		lcd_pins_s0: lcd_pins_s0 {
-+			pinctrl-single,pins = <
-+				0x1a4 0x17	/* mcasp0_fsr.gpio3_19, OUTPUT_PULLUP | MODE7 */
-+				0x1ac 0x17	/* mcasp0_ahclkx.gpio3_21, OUTPUT_PULLUP | MODE7 */
-+			>;
-+		};
- 	};
- 
- 	ocp {
-@@ -155,4 +162,14 @@
- 
- &spi1 {
- 	status = "okay";
-+
-+	lcd@0 {
-+		compatible = "adafruit,tft-lcd-1.8-green", "sitronix,st7735";
-+		spi-max-frequency = <8000000>;
-+		reg = <0>;
-+		spi-cpol;
-+		spi-cpha;
-+		st7735-rst = <&gpio4 19 0>;
-+		st7735-dc = <&gpio4 21 0>;
-+	};
- };
--- 
-1.8.1
-
diff --git a/patches/dma/0032-misc-add-gpevt-driver.patch b/patches/dma/0032-misc-add-gpevt-driver.patch
deleted file mode 100644
index 231bffc18eab67a61397a9904d466b191d7e6b46..0000000000000000000000000000000000000000
--- a/patches/dma/0032-misc-add-gpevt-driver.patch
+++ /dev/null
@@ -1,222 +0,0 @@
-From d07f73dbf2be7f8bdd96eb16803638b18ce44f4e Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Wed, 17 Oct 2012 10:48:22 -0400
-Subject: [PATCH 32/35] misc: add gpevt driver
-
-Simply amazing...'nuff said.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- drivers/misc/Kconfig  |    6 ++
- drivers/misc/Makefile |    1 +
- drivers/misc/gpevt.c  |  172 +++++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 179 insertions(+)
- create mode 100644 drivers/misc/gpevt.c
-
-diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
-index b151b7c..cd43cbd 100644
---- a/drivers/misc/Kconfig
-+++ b/drivers/misc/Kconfig
-@@ -499,6 +499,12 @@ config USB_SWITCH_FSA9480
- 	  stereo and mono audio, video, microphone and UART data to use
- 	  a common connector port.
- 
-+config GPEVT
-+	tristate "Amazing GPIO DMA Event Test Driver(tm)"
-+	depends on TI_EDMA
-+	help
-+	  Simply amazing!
-+
- source "drivers/misc/c2port/Kconfig"
- source "drivers/misc/eeprom/Kconfig"
- source "drivers/misc/cb710/Kconfig"
-diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
-index 2129377..661d093 100644
---- a/drivers/misc/Makefile
-+++ b/drivers/misc/Makefile
-@@ -49,3 +49,4 @@ obj-y				+= carma/
- obj-$(CONFIG_USB_SWITCH_FSA9480) += fsa9480.o
- obj-$(CONFIG_ALTERA_STAPL)	+=altera-stapl/
- obj-$(CONFIG_INTEL_MEI)		+= mei/
-+obj-$(CONFIG_GPEVT)		+= gpevt.o
-diff --git a/drivers/misc/gpevt.c b/drivers/misc/gpevt.c
-new file mode 100644
-index 0000000..8a4be45
---- /dev/null
-+++ b/drivers/misc/gpevt.c
-@@ -0,0 +1,172 @@
-+/*
-+ * This file is subject to the terms and conditions of the GNU General Public
-+ * License. See the file COPYING in the main directory of this archive for
-+ * more details.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/kernel.h>
-+#include <linux/errno.h>
-+#include <linux/string.h>
-+#include <linux/mm.h>
-+#include <linux/slab.h>
-+#include <linux/init.h>
-+#include <linux/interrupt.h>
-+#include <linux/irq.h>
-+#include <linux/dma-mapping.h>
-+#include <linux/dmaengine.h>
-+#include <linux/gpio.h>
-+#include <linux/err.h>
-+#include <linux/uaccess.h>
-+#include <linux/of.h>
-+#include <linux/of_device.h>
-+#include <linux/of_gpio.h>
-+#include <linux/pinctrl/consumer.h>
-+#include <linux/platform_device.h>
-+
-+#define GPEVT_MAGIC 0xdeadbeef
-+
-+static u32 *dst_fifo;
-+static	dma_addr_t fifo_addr;
-+
-+static void gpevt_callback(void *data)
-+{
-+	struct device *dev = data;
-+
-+	dma_unmap_single(dev, fifo_addr, 32, DMA_FROM_DEVICE);
-+
-+	if (*dst_fifo == GPEVT_MAGIC)
-+		dev_info(dev, "*** DMA transfer succeeded ***\n");
-+	else
-+		dev_info(dev, "*** DMA transfer failed ***\n");
-+}
-+
-+static int __devinit gpevt_probe (struct platform_device *pdev)
-+{
-+	struct device_node *np = pdev->dev.of_node;
-+	struct pinctrl *pinctrl;
-+	struct dma_chan *chan;
-+	struct dma_slave_config cfg;
-+	struct dma_async_tx_descriptor *tx;
-+	int gpio_evt = 0;
-+	int ret;
-+	u32 *src_buf;
-+	struct scatterlist sg;
-+
-+	src_buf = devm_kzalloc(&pdev->dev, 32, GFP_KERNEL);
-+	if (!src_buf) {
-+		dev_err(&pdev->dev, "failed to allocate src buffer\n");
-+		return -ENOMEM;
-+	}
-+
-+	dst_fifo = devm_kzalloc(&pdev->dev, 32, GFP_KERNEL);
-+	if (!dst_fifo) {
-+		dev_err(&pdev->dev, "failed to allocate dst fifo\n");
-+		return -ENOMEM;
-+	}
-+
-+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-+	if (IS_ERR(pinctrl))
-+		dev_warn(&pdev->dev,
-+			"pins are not configured from the driver\n");
-+
-+        gpio_evt = of_get_named_gpio(np, "gpio-evt", 0);
-+	if (gpio_evt < 0) {
-+		dev_err(&pdev->dev, "failed to find gpio event signal!\n");
-+		return -EINVAL;
-+	}
-+
-+        ret = devm_gpio_request_one(&pdev->dev, gpio_evt,
-+				    GPIOF_IN, "GPIO Event Pin");
-+	if (ret < 0) {
-+		dev_err(&pdev->dev, "failed to claim gpio-evt pin\n");
-+		return ret;
-+	}
-+
-+	ret = request_irq(gpio_to_irq(gpio_evt), no_action,
-+			  IRQ_TYPE_EDGE_FALLING, "gpevt", &pdev->dev);
-+	if (ret < 0) {
-+		dev_err(&pdev->dev, "failed to request falling edge irq/event\n");
-+		return ret;
-+	}
-+
-+	chan = dma_request_slave_channel(&pdev->dev, "gpioevt");
-+	if (!chan) {
-+		dev_err(&pdev->dev, "no gpio channel for gpevt\n");
-+		return -EAGAIN;
-+	}
-+
-+	fifo_addr = dma_map_single(&pdev->dev, dst_fifo, 32, DMA_FROM_DEVICE);
-+	if (!fifo_addr) {
-+		dev_err(&pdev->dev, "could not map dst fifo\n");
-+		return -EIO;
-+	}
-+	cfg.dst_addr = fifo_addr;
-+	cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-+	cfg.dst_maxburst = 1;
-+
-+	ret = dmaengine_slave_config(chan, &cfg);
-+	if (ret)
-+		return ret;
-+
-+	*src_buf = GPEVT_MAGIC;
-+	sg_init_table(&sg, 1);
-+	sg_dma_address(&sg) = dma_map_single(&pdev->dev, src_buf, 32, DMA_TO_DEVICE);
-+	sg_dma_len(&sg) = 4;
-+
-+	tx = dmaengine_prep_slave_sg(chan, &sg, 1, DMA_MEM_TO_DEV,
-+				     DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-+	if (!tx) {
-+		dev_err(&pdev->dev, "prep_slave_sg() failed\n");
-+		return -EIO;
-+	}
-+
-+	tx->callback = gpevt_callback;
-+	tx->callback_param = &pdev->dev;
-+	dmaengine_submit(tx);
-+
-+	dma_async_issue_pending(chan);
-+
-+	dev_info(&pdev->dev, "Amazing GPIO DMA Event Test Driver(tm) engaged\n");
-+
-+	return 0;
-+}
-+
-+static int __devexit gpevt_remove(struct platform_device *pdev)
-+{
-+	return 0;
-+}
-+
-+static const struct of_device_id gpevt_dt_ids[] = {
-+	{ .compatible = "gpevt", .data = (void *) NULL, },
-+};
-+MODULE_DEVICE_TABLE(of, gpevt_dt_ids);
-+
-+static struct platform_driver gpevt_driver = {
-+	.driver = {
-+		.name   = "gpevt",
-+		.owner  = THIS_MODULE,
-+		.of_match_table = gpevt_dt_ids,
-+	},
-+	.probe  = gpevt_probe,
-+	.remove = __devexit_p(gpevt_remove),
-+};
-+
-+static int __init gpevt_init(void)
-+{
-+	return platform_driver_register(&gpevt_driver);
-+}
-+
-+static void __exit gpevt_exit(void)
-+{
-+	platform_driver_unregister(&gpevt_driver);
-+}
-+
-+/* ------------------------------------------------------------------------- */
-+
-+module_init(gpevt_init);
-+module_exit(gpevt_exit);
-+
-+MODULE_DESCRIPTION("Amazing GPIO DMA Event Test Driver(tm)");
-+MODULE_AUTHOR("Matt Porter <mporter@ti.com>");
-+MODULE_LICENSE("GPL");
--- 
-1.7.10.4
-
diff --git a/patches/dma/0033-ARM-dts-add-BeagleBone-gpevt-support.patch b/patches/dma/0033-ARM-dts-add-BeagleBone-gpevt-support.patch
deleted file mode 100644
index acb24246c9c730413c58f3c31a15e8c0ce90f1fd..0000000000000000000000000000000000000000
--- a/patches/dma/0033-ARM-dts-add-BeagleBone-gpevt-support.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From b26a7d2ca3597d21854fa1c8b837c28fd21eff44 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Wed, 17 Oct 2012 17:12:45 -0400
-Subject: [PATCH 33/35] ARM: dts: add BeagleBone gpevt support
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- arch/arm/boot/dts/am335x-bone.dts | 19 ++++++++++++++++++-
- 1 file changed, 18 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
-index 8ac3ae4..8f35a81 100644
---- a/arch/arm/boot/dts/am335x-bone.dts
-+++ b/arch/arm/boot/dts/am335x-bone.dts
-@@ -26,7 +26,7 @@
- 
- 	am33xx_pinmux: pinmux@44e10800 {
- 		pinctrl-names = "default";
--		pinctrl-0 = <&user_leds_s0 &spi1_pins_s0 &lcd_pins_s0>;
-+		pinctrl-0 = <&user_leds_s0 &spi1_pins_s0 &lcd_pins_s0 &gpevt_pins_s0>;
- 
- 		user_leds_s0: user_leds_s0 {
- 			pinctrl-single,pins = <
-@@ -52,6 +52,12 @@
- 				0x1ac 0x17	/* mcasp0_ahclkx.gpio3_21, OUTPUT_PULLUP | MODE7 */
- 			>;
- 		};
-+
-+		gpevt_pins_s0: gpevt_pins_s0 {
-+			pinctrl-single,pins = <
-+				0x090 0x37	/* gpmc_advn_ale.gpio2_2, INPUT_PULLUP | MODE7 */
-+			>;
-+		};
- 	};
- 
- 	ocp {
-@@ -68,6 +74,13 @@
- 			};
- 
- 		};
-+
-+		gpevt {
-+			compatible = "gpevt";
-+			dmas = <&edma 12>;
-+			dma-names = "gpioevt";
-+			gpio-evt = <&gpio3 2 0>;
-+		};
- 	};
- 
- 	leds {
-@@ -173,3 +186,7 @@
- 		st7735-dc = <&gpio4 21 0>;
- 	};
- };
-+
-+&edma {
-+	ti,edma-xbar-event-map = <32 12>;
-+};
--- 
-1.8.1
-
diff --git a/patches/dma/0034-ARM-configs-working-dmaengine-configs-for-da8xx-and-.patch b/patches/dma/0034-ARM-configs-working-dmaengine-configs-for-da8xx-and-.patch
deleted file mode 100644
index a4d5313bb9bbb3b2106e0d4aadde98650aac0113..0000000000000000000000000000000000000000
--- a/patches/dma/0034-ARM-configs-working-dmaengine-configs-for-da8xx-and-.patch
+++ /dev/null
@@ -1,4879 +0,0 @@
-From 00cb191b89b155b35674bcfdb3b1b15b15f46099 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Wed, 9 Jan 2013 16:26:38 -0500
-Subject: [PATCH 34/35] ARM: configs: working dmaengine configs for da8xx and
- am33xx
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- arch/arm/configs/da8xx_omapl_defconfig | 1881 ++++++++++++++++++++++-
- arch/arm/configs/omap2plus_defconfig   | 2640 +++++++++++++++++++++++++++++++-
- 2 files changed, 4472 insertions(+), 49 deletions(-)
-
-diff --git a/arch/arm/configs/da8xx_omapl_defconfig b/arch/arm/configs/da8xx_omapl_defconfig
-index f292239..571445f 100644
---- a/arch/arm/configs/da8xx_omapl_defconfig
-+++ b/arch/arm/configs/da8xx_omapl_defconfig
-@@ -1,132 +1,1965 @@
-+#
-+# Automatically generated file; DO NOT EDIT.
-+# Linux/arm 3.7.0-rc1 Kernel Configuration
-+#
-+CONFIG_ARM=y
-+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
-+CONFIG_GENERIC_GPIO=y
-+CONFIG_HAVE_PROC_CPU=y
-+CONFIG_STACKTRACE_SUPPORT=y
-+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
-+CONFIG_LOCKDEP_SUPPORT=y
-+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-+CONFIG_RWSEM_GENERIC_SPINLOCK=y
-+CONFIG_ARCH_HAS_CPUFREQ=y
-+CONFIG_GENERIC_HWEIGHT=y
-+CONFIG_GENERIC_CALIBRATE_DELAY=y
-+CONFIG_ZONE_DMA=y
-+CONFIG_NEED_DMA_MAP_STATE=y
-+CONFIG_VECTORS_BASE=0xffff0000
-+CONFIG_ARM_PATCH_PHYS_VIRT=y
-+CONFIG_NEED_MACH_GPIO_H=y
-+CONFIG_GENERIC_BUG=y
-+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-+CONFIG_HAVE_IRQ_WORK=y
-+
-+#
-+# General setup
-+#
- CONFIG_EXPERIMENTAL=y
-+CONFIG_BROKEN_ON_SMP=y
-+CONFIG_INIT_ENV_ARG_LIMIT=32
-+CONFIG_CROSS_COMPILE=""
-+CONFIG_LOCALVERSION=""
-+CONFIG_LOCALVERSION_AUTO=y
-+CONFIG_HAVE_KERNEL_GZIP=y
-+CONFIG_HAVE_KERNEL_LZMA=y
-+CONFIG_HAVE_KERNEL_XZ=y
-+CONFIG_HAVE_KERNEL_LZO=y
-+CONFIG_KERNEL_GZIP=y
-+# CONFIG_KERNEL_LZMA is not set
-+# CONFIG_KERNEL_XZ is not set
-+# CONFIG_KERNEL_LZO is not set
-+CONFIG_DEFAULT_HOSTNAME="(none)"
- # CONFIG_SWAP is not set
- CONFIG_SYSVIPC=y
-+CONFIG_SYSVIPC_SYSCTL=y
- CONFIG_POSIX_MQUEUE=y
-+CONFIG_POSIX_MQUEUE_SYSCTL=y
-+# CONFIG_FHANDLE is not set
-+# CONFIG_AUDIT is not set
-+CONFIG_HAVE_GENERIC_HARDIRQS=y
-+
-+#
-+# IRQ subsystem
-+#
-+CONFIG_GENERIC_HARDIRQS=y
-+CONFIG_GENERIC_IRQ_PROBE=y
-+CONFIG_GENERIC_IRQ_SHOW=y
-+CONFIG_HARDIRQS_SW_RESEND=y
-+CONFIG_GENERIC_IRQ_CHIP=y
-+CONFIG_IRQ_DOMAIN=y
-+# CONFIG_IRQ_DOMAIN_DEBUG is not set
-+CONFIG_KTIME_SCALAR=y
-+CONFIG_GENERIC_CLOCKEVENTS=y
-+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
-+
-+#
-+# Timers subsystem
-+#
-+CONFIG_TICK_ONESHOT=y
-+CONFIG_NO_HZ=y
-+CONFIG_HIGH_RES_TIMERS=y
-+
-+#
-+# CPU/Task time and stats accounting
-+#
-+CONFIG_TICK_CPU_ACCOUNTING=y
-+# CONFIG_BSD_PROCESS_ACCT is not set
-+# CONFIG_TASKSTATS is not set
-+
-+#
-+# RCU Subsystem
-+#
-+CONFIG_TINY_PREEMPT_RCU=y
-+CONFIG_PREEMPT_RCU=y
-+# CONFIG_TREE_RCU_TRACE is not set
-+# CONFIG_RCU_BOOST is not set
- CONFIG_IKCONFIG=y
- CONFIG_IKCONFIG_PROC=y
- CONFIG_LOG_BUF_SHIFT=14
-+# CONFIG_CGROUPS is not set
-+# CONFIG_CHECKPOINT_RESTORE is not set
-+# CONFIG_NAMESPACES is not set
-+# CONFIG_SCHED_AUTOGROUP is not set
-+# CONFIG_SYSFS_DEPRECATED is not set
-+# CONFIG_RELAY is not set
- CONFIG_BLK_DEV_INITRD=y
-+CONFIG_INITRAMFS_SOURCE=""
-+CONFIG_RD_GZIP=y
-+# CONFIG_RD_BZIP2 is not set
-+# CONFIG_RD_LZMA is not set
-+# CONFIG_RD_XZ is not set
-+# CONFIG_RD_LZO is not set
-+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-+CONFIG_SYSCTL=y
-+CONFIG_ANON_INODES=y
- CONFIG_EXPERT=y
-+CONFIG_HAVE_UID16=y
-+CONFIG_UID16=y
-+# CONFIG_SYSCTL_SYSCALL is not set
-+CONFIG_KALLSYMS=y
-+# CONFIG_KALLSYMS_ALL is not set
-+CONFIG_HOTPLUG=y
-+CONFIG_PRINTK=y
-+CONFIG_BUG=y
-+CONFIG_ELF_CORE=y
-+CONFIG_BASE_FULL=y
-+CONFIG_FUTEX=y
-+CONFIG_EPOLL=y
-+CONFIG_SIGNALFD=y
-+CONFIG_TIMERFD=y
-+CONFIG_EVENTFD=y
-+CONFIG_SHMEM=y
-+CONFIG_AIO=y
-+# CONFIG_EMBEDDED is not set
-+CONFIG_HAVE_PERF_EVENTS=y
-+CONFIG_PERF_USE_VMALLOC=y
-+
-+#
-+# Kernel Performance Events And Counters
-+#
-+# CONFIG_PERF_EVENTS is not set
-+CONFIG_VM_EVENT_COUNTERS=y
-+CONFIG_SLUB_DEBUG=y
-+CONFIG_COMPAT_BRK=y
-+# CONFIG_SLAB is not set
-+CONFIG_SLUB=y
-+# CONFIG_SLOB is not set
-+# CONFIG_PROFILING is not set
-+CONFIG_HAVE_OPROFILE=y
-+# CONFIG_KPROBES is not set
-+# CONFIG_JUMP_LABEL is not set
-+CONFIG_HAVE_KPROBES=y
-+CONFIG_HAVE_KRETPROBES=y
-+CONFIG_HAVE_ARCH_TRACEHOOK=y
-+CONFIG_HAVE_DMA_ATTRS=y
-+CONFIG_HAVE_DMA_CONTIGUOUS=y
-+CONFIG_GENERIC_SMP_IDLE_THREAD=y
-+CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
-+CONFIG_HAVE_CLK=y
-+CONFIG_HAVE_DMA_API_DEBUG=y
-+CONFIG_HAVE_ARCH_JUMP_LABEL=y
-+CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
-+CONFIG_GENERIC_KERNEL_THREAD=y
-+CONFIG_GENERIC_KERNEL_EXECVE=y
-+CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
-+CONFIG_MODULES_USE_ELF_REL=y
-+
-+#
-+# GCOV-based kernel profiling
-+#
-+# CONFIG_GCOV_KERNEL is not set
-+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
-+CONFIG_SLABINFO=y
-+CONFIG_RT_MUTEXES=y
-+CONFIG_BASE_SMALL=0
- CONFIG_MODULES=y
-+# CONFIG_MODULE_FORCE_LOAD is not set
- CONFIG_MODULE_UNLOAD=y
- CONFIG_MODULE_FORCE_UNLOAD=y
- CONFIG_MODVERSIONS=y
-+# CONFIG_MODULE_SRCVERSION_ALL is not set
-+# CONFIG_MODULE_SIG is not set
-+CONFIG_BLOCK=y
-+CONFIG_LBDAF=y
- # CONFIG_BLK_DEV_BSG is not set
-+# CONFIG_BLK_DEV_BSGLIB is not set
-+# CONFIG_BLK_DEV_INTEGRITY is not set
-+
-+#
-+# Partition Types
-+#
-+CONFIG_PARTITION_ADVANCED=y
-+# CONFIG_ACORN_PARTITION is not set
-+# CONFIG_OSF_PARTITION is not set
-+# CONFIG_AMIGA_PARTITION is not set
-+# CONFIG_ATARI_PARTITION is not set
-+# CONFIG_MAC_PARTITION is not set
-+CONFIG_MSDOS_PARTITION=y
-+# CONFIG_BSD_DISKLABEL is not set
-+# CONFIG_MINIX_SUBPARTITION is not set
-+# CONFIG_SOLARIS_X86_PARTITION is not set
-+# CONFIG_UNIXWARE_DISKLABEL is not set
-+# CONFIG_LDM_PARTITION is not set
-+# CONFIG_SGI_PARTITION is not set
-+# CONFIG_ULTRIX_PARTITION is not set
-+# CONFIG_SUN_PARTITION is not set
-+# CONFIG_KARMA_PARTITION is not set
-+# CONFIG_EFI_PARTITION is not set
-+# CONFIG_SYSV68_PARTITION is not set
-+
-+#
-+# IO Schedulers
-+#
-+CONFIG_IOSCHED_NOOP=y
- # CONFIG_IOSCHED_DEADLINE is not set
- # CONFIG_IOSCHED_CFQ is not set
-+CONFIG_DEFAULT_NOOP=y
-+CONFIG_DEFAULT_IOSCHED="noop"
-+CONFIG_UNINLINE_SPIN_UNLOCK=y
-+CONFIG_FREEZER=y
-+
-+#
-+# System Type
-+#
-+CONFIG_MMU=y
-+# CONFIG_ARCH_MULTIPLATFORM is not set
-+# CONFIG_ARCH_INTEGRATOR is not set
-+# CONFIG_ARCH_REALVIEW is not set
-+# CONFIG_ARCH_VERSATILE is not set
-+# CONFIG_ARCH_AT91 is not set
-+# CONFIG_ARCH_BCM2835 is not set
-+# CONFIG_ARCH_CNS3XXX is not set
-+# CONFIG_ARCH_CLPS711X is not set
-+# CONFIG_ARCH_GEMINI is not set
-+# CONFIG_ARCH_SIRF is not set
-+# CONFIG_ARCH_EBSA110 is not set
-+# CONFIG_ARCH_EP93XX is not set
-+# CONFIG_ARCH_FOOTBRIDGE is not set
-+# CONFIG_ARCH_MXC is not set
-+# CONFIG_ARCH_MXS is not set
-+# CONFIG_ARCH_NETX is not set
-+# CONFIG_ARCH_H720X is not set
-+# CONFIG_ARCH_IOP13XX is not set
-+# CONFIG_ARCH_IOP32X is not set
-+# CONFIG_ARCH_IOP33X is not set
-+# CONFIG_ARCH_IXP4XX is not set
-+# CONFIG_ARCH_DOVE is not set
-+# CONFIG_ARCH_KIRKWOOD is not set
-+# CONFIG_ARCH_MV78XX0 is not set
-+# CONFIG_ARCH_ORION5X is not set
-+# CONFIG_ARCH_MMP is not set
-+# CONFIG_ARCH_KS8695 is not set
-+# CONFIG_ARCH_W90X900 is not set
-+# CONFIG_ARCH_LPC32XX is not set
-+# CONFIG_ARCH_TEGRA is not set
-+# CONFIG_ARCH_PXA is not set
-+# CONFIG_ARCH_MSM is not set
-+# CONFIG_ARCH_SHMOBILE is not set
-+# CONFIG_ARCH_RPC is not set
-+# CONFIG_ARCH_SA1100 is not set
-+# CONFIG_ARCH_S3C24XX is not set
-+# CONFIG_ARCH_S3C64XX is not set
-+# CONFIG_ARCH_S5P64X0 is not set
-+# CONFIG_ARCH_S5PC100 is not set
-+# CONFIG_ARCH_S5PV210 is not set
-+# CONFIG_ARCH_EXYNOS is not set
-+# CONFIG_ARCH_SHARK is not set
-+# CONFIG_ARCH_U300 is not set
-+# CONFIG_ARCH_U8500 is not set
-+# CONFIG_ARCH_NOMADIK is not set
-+# CONFIG_PLAT_SPEAR is not set
- CONFIG_ARCH_DAVINCI=y
-+# CONFIG_ARCH_OMAP is not set
-+# CONFIG_ARCH_VT8500 is not set
-+# CONFIG_ARCH_ZYNQ is not set
-+CONFIG_CP_INTC=y
-+
-+#
-+# TI DaVinci Implementations
-+#
-+
-+#
-+# DaVinci Core Type
-+#
-+# CONFIG_ARCH_DAVINCI_DM644x is not set
-+# CONFIG_ARCH_DAVINCI_DM355 is not set
-+# CONFIG_ARCH_DAVINCI_DM646x is not set
- CONFIG_ARCH_DAVINCI_DA830=y
- CONFIG_ARCH_DAVINCI_DA850=y
--CONFIG_MACH_DA8XX_DT=y
-+CONFIG_ARCH_DAVINCI_DA8XX=y
-+# CONFIG_ARCH_DAVINCI_DM365 is not set
-+# CONFIG_ARCH_DAVINCI_TNETV107X is not set
-+
-+#
-+# DaVinci Board Type
-+#
-+CONFIG_MACH_DAVINCI_DA830_EVM=y
-+CONFIG_DA830_UI_LCD=y
-+# CONFIG_DA830_UI_NAND is not set
-+CONFIG_MACH_DAVINCI_DA850_EVM=y
-+CONFIG_DA850_UI_NONE=y
-+# CONFIG_DA850_UI_RMII is not set
-+# CONFIG_DA850_UI_SD_VIDEO_PORT is not set
-+# CONFIG_DA850_WL12XX is not set
-+CONFIG_GPIO_PCA953X=y
-+CONFIG_KEYBOARD_GPIO_POLLED=y
- CONFIG_MACH_MITYOMAPL138=y
- CONFIG_MACH_OMAPL138_HAWKBOARD=y
-+CONFIG_DAVINCI_MUX=y
-+# CONFIG_DAVINCI_MUX_DEBUG is not set
-+# CONFIG_DAVINCI_MUX_WARNINGS is not set
- CONFIG_DAVINCI_RESET_CLOCKS=y
--CONFIG_NO_HZ=y
--CONFIG_HIGH_RES_TIMERS=y
-+
-+#
-+# Processor Type
-+#
-+CONFIG_CPU_ARM926T=y
-+CONFIG_CPU_32v5=y
-+CONFIG_CPU_ABRT_EV5TJ=y
-+CONFIG_CPU_PABRT_LEGACY=y
-+CONFIG_CPU_CACHE_VIVT=y
-+CONFIG_CPU_COPY_V4WB=y
-+CONFIG_CPU_TLB_V4WBI=y
-+CONFIG_CPU_CP15=y
-+CONFIG_CPU_CP15_MMU=y
-+CONFIG_CPU_USE_DOMAINS=y
-+
-+#
-+# Processor Features
-+#
-+# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
-+CONFIG_ARM_THUMB=y
-+# CONFIG_CPU_ICACHE_DISABLE is not set
-+# CONFIG_CPU_DCACHE_DISABLE is not set
-+CONFIG_CPU_DCACHE_WRITETHROUGH=y
-+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
-+# CONFIG_CACHE_L2X0 is not set
-+CONFIG_ARM_L1_CACHE_SHIFT=5
-+CONFIG_ARM_NR_BANKS=8
-+CONFIG_TI_PRIV_EDMA=y
-+
-+#
-+# Bus support
-+#
-+# CONFIG_PCI_SYSCALL is not set
-+# CONFIG_PCCARD is not set
-+
-+#
-+# Kernel Features
-+#
-+CONFIG_VMSPLIT_3G=y
-+# CONFIG_VMSPLIT_2G is not set
-+# CONFIG_VMSPLIT_1G is not set
-+CONFIG_PAGE_OFFSET=0xC0000000
-+CONFIG_ARCH_NR_GPIO=0
-+# CONFIG_PREEMPT_NONE is not set
-+# CONFIG_PREEMPT_VOLUNTARY is not set
- CONFIG_PREEMPT=y
-+CONFIG_PREEMPT_COUNT=y
-+CONFIG_HZ=100
- CONFIG_AEABI=y
- # CONFIG_OABI_COMPAT is not set
--CONFIG_LEDS=y
--CONFIG_USE_OF=y
-+CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y
-+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
-+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
-+CONFIG_HAVE_ARCH_PFN_VALID=y
-+# CONFIG_HIGHMEM is not set
-+CONFIG_SELECT_MEMORY_MODEL=y
-+CONFIG_FLATMEM_MANUAL=y
-+CONFIG_FLATMEM=y
-+CONFIG_FLAT_NODE_MEM_MAP=y
-+CONFIG_HAVE_MEMBLOCK=y
-+CONFIG_PAGEFLAGS_EXTENDED=y
-+CONFIG_SPLIT_PTLOCK_CPUS=999999
-+CONFIG_COMPACTION=y
-+CONFIG_MIGRATION=y
-+# CONFIG_PHYS_ADDR_T_64BIT is not set
-+CONFIG_ZONE_DMA_FLAG=1
-+CONFIG_BOUNCE=y
-+CONFIG_VIRT_TO_BUS=y
-+# CONFIG_KSM is not set
-+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
-+CONFIG_CROSS_MEMORY_ATTACH=y
-+CONFIG_NEED_PER_CPU_KM=y
-+# CONFIG_CLEANCACHE is not set
-+CONFIG_FORCE_MAX_ZONEORDER=11
-+CONFIG_ALIGNMENT_TRAP=y
-+# CONFIG_UACCESS_WITH_MEMCPY is not set
-+# CONFIG_SECCOMP is not set
-+# CONFIG_CC_STACKPROTECTOR is not set
-+
-+#
-+# Boot options
-+#
-+# CONFIG_USE_OF is not set
-+CONFIG_ATAGS=y
-+# CONFIG_DEPRECATED_PARAM_STRUCT is not set
- CONFIG_ZBOOT_ROM_TEXT=0x0
- CONFIG_ZBOOT_ROM_BSS=0x0
-+CONFIG_CMDLINE=""
-+# CONFIG_XIP_KERNEL is not set
-+# CONFIG_KEXEC is not set
-+# CONFIG_CRASH_DUMP is not set
-+# CONFIG_AUTO_ZRELADDR is not set
-+
-+#
-+# CPU Power Management
-+#
-+
-+#
-+# CPU Frequency scaling
-+#
- CONFIG_CPU_FREQ=y
-+CONFIG_CPU_FREQ_TABLE=y
-+CONFIG_CPU_FREQ_STAT=y
-+# CONFIG_CPU_FREQ_STAT_DETAILS is not set
-+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-+# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
- CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
-+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
- CONFIG_CPU_FREQ_GOV_PERFORMANCE=m
- CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-+CONFIG_CPU_FREQ_GOV_USERSPACE=y
- CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
-+
-+#
-+# ARM CPU frequency scaling drivers
-+#
-+# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set
-+# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set
-+# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set
- CONFIG_CPU_IDLE=y
-+CONFIG_CPU_IDLE_GOV_LADDER=y
-+CONFIG_CPU_IDLE_GOV_MENU=y
-+# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set
-+
-+#
-+# Floating point emulation
-+#
-+
-+#
-+# At least one emulation must be selected
-+#
-+# CONFIG_VFP is not set
-+
-+#
-+# Userspace binary formats
-+#
-+CONFIG_BINFMT_ELF=y
-+CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
-+CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
-+CONFIG_HAVE_AOUT=y
-+# CONFIG_BINFMT_AOUT is not set
-+# CONFIG_BINFMT_MISC is not set
-+CONFIG_COREDUMP=y
-+
-+#
-+# Power management options
-+#
-+CONFIG_SUSPEND=y
-+CONFIG_SUSPEND_FREEZER=y
-+CONFIG_PM_SLEEP=y
-+# CONFIG_PM_AUTOSLEEP is not set
-+# CONFIG_PM_WAKELOCKS is not set
-+# CONFIG_PM_RUNTIME is not set
-+CONFIG_PM=y
-+# CONFIG_PM_DEBUG is not set
-+# CONFIG_APM_EMULATION is not set
-+CONFIG_PM_CLK=y
-+CONFIG_CPU_PM=y
-+CONFIG_ARCH_SUSPEND_POSSIBLE=y
-+CONFIG_ARM_CPU_SUSPEND=y
- CONFIG_NET=y
-+
-+#
-+# Networking options
-+#
- CONFIG_PACKET=y
-+# CONFIG_PACKET_DIAG is not set
- CONFIG_UNIX=y
-+# CONFIG_UNIX_DIAG is not set
-+CONFIG_XFRM=y
-+# CONFIG_XFRM_USER is not set
-+# CONFIG_XFRM_SUB_POLICY is not set
-+# CONFIG_XFRM_MIGRATE is not set
-+# CONFIG_XFRM_STATISTICS is not set
-+# CONFIG_NET_KEY is not set
- CONFIG_INET=y
-+# CONFIG_IP_MULTICAST is not set
-+# CONFIG_IP_ADVANCED_ROUTER is not set
- CONFIG_IP_PNP=y
- CONFIG_IP_PNP_DHCP=y
-+# CONFIG_IP_PNP_BOOTP is not set
-+# CONFIG_IP_PNP_RARP is not set
-+# CONFIG_NET_IPIP is not set
-+# CONFIG_NET_IPGRE_DEMUX is not set
-+# CONFIG_ARPD is not set
-+# CONFIG_SYN_COOKIES is not set
-+# CONFIG_NET_IPVTI is not set
-+# CONFIG_INET_AH is not set
-+# CONFIG_INET_ESP is not set
-+# CONFIG_INET_IPCOMP is not set
-+# CONFIG_INET_XFRM_TUNNEL is not set
-+CONFIG_INET_TUNNEL=m
-+CONFIG_INET_XFRM_MODE_TRANSPORT=y
-+CONFIG_INET_XFRM_MODE_TUNNEL=y
-+CONFIG_INET_XFRM_MODE_BEET=y
- # CONFIG_INET_LRO is not set
-+CONFIG_INET_DIAG=y
-+CONFIG_INET_TCP_DIAG=y
-+# CONFIG_INET_UDP_DIAG is not set
-+# CONFIG_TCP_CONG_ADVANCED is not set
-+CONFIG_TCP_CONG_CUBIC=y
-+CONFIG_DEFAULT_TCP_CONG="cubic"
-+# CONFIG_TCP_MD5SIG is not set
-+CONFIG_IPV6=m
-+# CONFIG_IPV6_PRIVACY is not set
-+# CONFIG_IPV6_ROUTER_PREF is not set
-+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
-+# CONFIG_INET6_AH is not set
-+# CONFIG_INET6_ESP is not set
-+# CONFIG_INET6_IPCOMP is not set
-+# CONFIG_IPV6_MIP6 is not set
-+# CONFIG_INET6_XFRM_TUNNEL is not set
-+# CONFIG_INET6_TUNNEL is not set
-+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-+CONFIG_INET6_XFRM_MODE_TUNNEL=m
-+CONFIG_INET6_XFRM_MODE_BEET=m
-+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
-+CONFIG_IPV6_SIT=m
-+# CONFIG_IPV6_SIT_6RD is not set
-+CONFIG_IPV6_NDISC_NODETYPE=y
-+# CONFIG_IPV6_TUNNEL is not set
-+# CONFIG_IPV6_GRE is not set
-+# CONFIG_IPV6_MULTIPLE_TABLES is not set
-+# CONFIG_IPV6_MROUTE is not set
-+# CONFIG_NETWORK_SECMARK is not set
-+# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
- CONFIG_NETFILTER=y
-+# CONFIG_NETFILTER_DEBUG is not set
-+CONFIG_NETFILTER_ADVANCED=y
-+
-+#
-+# Core Netfilter Configuration
-+#
-+# CONFIG_NETFILTER_NETLINK_ACCT is not set
-+# CONFIG_NETFILTER_NETLINK_QUEUE is not set
-+# CONFIG_NETFILTER_NETLINK_LOG is not set
-+# CONFIG_NF_CONNTRACK is not set
-+# CONFIG_NETFILTER_XTABLES is not set
-+# CONFIG_IP_VS is not set
-+
-+#
-+# IP: Netfilter Configuration
-+#
-+# CONFIG_NF_DEFRAG_IPV4 is not set
-+# CONFIG_IP_NF_QUEUE is not set
-+# CONFIG_IP_NF_IPTABLES is not set
-+# CONFIG_IP_NF_ARPTABLES is not set
-+
-+#
-+# IPv6: Netfilter Configuration
-+#
-+# CONFIG_NF_DEFRAG_IPV6 is not set
-+# CONFIG_IP6_NF_IPTABLES is not set
-+# CONFIG_IP_DCCP is not set
-+# CONFIG_IP_SCTP is not set
-+# CONFIG_RDS is not set
-+# CONFIG_TIPC is not set
-+# CONFIG_ATM is not set
-+# CONFIG_L2TP is not set
-+# CONFIG_BRIDGE is not set
-+# CONFIG_NET_DSA is not set
-+# CONFIG_VLAN_8021Q is not set
-+# CONFIG_DECNET is not set
-+# CONFIG_LLC2 is not set
-+# CONFIG_IPX is not set
-+# CONFIG_ATALK is not set
-+# CONFIG_X25 is not set
-+# CONFIG_LAPB is not set
-+# CONFIG_WAN_ROUTER is not set
-+# CONFIG_PHONET is not set
-+# CONFIG_IEEE802154 is not set
-+# CONFIG_NET_SCHED is not set
-+# CONFIG_DCB is not set
-+# CONFIG_BATMAN_ADV is not set
-+# CONFIG_OPENVSWITCH is not set
-+CONFIG_BQL=y
-+# CONFIG_BPF_JIT is not set
-+
-+#
-+# Network testing
-+#
-+# CONFIG_NET_PKTGEN is not set
-+# CONFIG_HAMRADIO is not set
-+# CONFIG_CAN is not set
-+# CONFIG_IRDA is not set
-+# CONFIG_BT is not set
-+# CONFIG_AF_RXRPC is not set
-+CONFIG_WIRELESS=y
-+# CONFIG_CFG80211 is not set
-+# CONFIG_LIB80211 is not set
-+
-+#
-+# CFG80211 needs to be enabled for MAC80211
-+#
-+# CONFIG_WIMAX is not set
-+# CONFIG_RFKILL is not set
-+# CONFIG_RFKILL_REGULATOR is not set
-+# CONFIG_NET_9P is not set
-+# CONFIG_CAIF is not set
-+# CONFIG_CEPH_LIB is not set
-+# CONFIG_NFC is not set
-+CONFIG_HAVE_BPF_JIT=y
-+
-+#
-+# Device Drivers
-+#
-+
-+#
-+# Generic Driver Options
-+#
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-+# CONFIG_DEVTMPFS is not set
-+CONFIG_STANDALONE=y
-+CONFIG_PREVENT_FIRMWARE_BUILD=y
- # CONFIG_FW_LOADER is not set
-+# CONFIG_DEBUG_DRIVER is not set
-+# CONFIG_DEBUG_DEVRES is not set
-+# CONFIG_SYS_HYPERVISOR is not set
-+# CONFIG_GENERIC_CPU_DEVICES is not set
-+CONFIG_REGMAP=y
-+CONFIG_REGMAP_I2C=y
-+CONFIG_REGMAP_SPI=y
-+# CONFIG_DMA_SHARED_BUFFER is not set
-+# CONFIG_CMA is not set
-+
-+#
-+# Bus devices
-+#
-+# CONFIG_OMAP_OCP2SCP is not set
-+# CONFIG_CONNECTOR is not set
-+CONFIG_MTD=y
-+# CONFIG_MTD_TESTS is not set
-+# CONFIG_MTD_REDBOOT_PARTS is not set
-+# CONFIG_MTD_CMDLINE_PARTS is not set
-+# CONFIG_MTD_AFS_PARTS is not set
-+# CONFIG_MTD_AR7_PARTS is not set
-+
-+#
-+# User Modules And Translation Layers
-+#
-+CONFIG_MTD_CHAR=y
-+# CONFIG_MTD_BLKDEVS is not set
-+# CONFIG_MTD_BLOCK is not set
-+# CONFIG_MTD_BLOCK_RO is not set
-+# CONFIG_FTL is not set
-+# CONFIG_NFTL is not set
-+# CONFIG_INFTL is not set
-+# CONFIG_RFD_FTL is not set
-+# CONFIG_SSFDC is not set
-+# CONFIG_SM_FTL is not set
-+# CONFIG_MTD_OOPS is not set
-+
-+#
-+# RAM/ROM/Flash chip drivers
-+#
-+# CONFIG_MTD_CFI is not set
-+# CONFIG_MTD_JEDECPROBE is not set
-+CONFIG_MTD_MAP_BANK_WIDTH_1=y
-+CONFIG_MTD_MAP_BANK_WIDTH_2=y
-+CONFIG_MTD_MAP_BANK_WIDTH_4=y
-+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-+CONFIG_MTD_CFI_I1=y
-+CONFIG_MTD_CFI_I2=y
-+# CONFIG_MTD_CFI_I4 is not set
-+# CONFIG_MTD_CFI_I8 is not set
-+# CONFIG_MTD_RAM is not set
-+# CONFIG_MTD_ROM is not set
-+# CONFIG_MTD_ABSENT is not set
-+
-+#
-+# Mapping drivers for chip access
-+#
-+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-+# CONFIG_MTD_PLATRAM is not set
-+
-+#
-+# Self-contained MTD device drivers
-+#
-+# CONFIG_MTD_DATAFLASH is not set
-+CONFIG_MTD_M25P80=y
-+CONFIG_M25PXX_USE_FAST_READ=y
-+# CONFIG_MTD_SST25L is not set
-+# CONFIG_MTD_SLRAM is not set
-+# CONFIG_MTD_PHRAM is not set
-+# CONFIG_MTD_MTDRAM is not set
-+# CONFIG_MTD_BLOCK2MTD is not set
-+
-+#
-+# Disk-On-Chip Device Drivers
-+#
-+# CONFIG_MTD_DOCG3 is not set
-+# CONFIG_MTD_NAND is not set
-+# CONFIG_MTD_ONENAND is not set
-+
-+#
-+# LPDDR flash memory drivers
-+#
-+# CONFIG_MTD_LPDDR is not set
-+# CONFIG_MTD_UBI is not set
-+# CONFIG_PARPORT is not set
-+CONFIG_BLK_DEV=y
-+# CONFIG_BLK_DEV_COW_COMMON is not set
- CONFIG_BLK_DEV_LOOP=m
-+CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
-+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
-+
-+#
-+# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
-+#
-+# CONFIG_BLK_DEV_NBD is not set
- CONFIG_BLK_DEV_RAM=y
- CONFIG_BLK_DEV_RAM_COUNT=1
- CONFIG_BLK_DEV_RAM_SIZE=32768
-+# CONFIG_BLK_DEV_XIP is not set
-+# CONFIG_CDROM_PKTCDVD is not set
-+# CONFIG_ATA_OVER_ETH is not set
-+# CONFIG_MG_DISK is not set
-+# CONFIG_BLK_DEV_RBD is not set
-+
-+#
-+# Misc devices
-+#
-+# CONFIG_SENSORS_LIS3LV02D is not set
-+# CONFIG_AD525X_DPOT is not set
-+# CONFIG_ATMEL_PWM is not set
-+# CONFIG_ICS932S401 is not set
-+# CONFIG_ENCLOSURE_SERVICES is not set
-+# CONFIG_APDS9802ALS is not set
-+# CONFIG_ISL29003 is not set
-+# CONFIG_ISL29020 is not set
-+# CONFIG_SENSORS_TSL2550 is not set
-+# CONFIG_SENSORS_BH1780 is not set
-+# CONFIG_SENSORS_BH1770 is not set
-+# CONFIG_SENSORS_APDS990X is not set
-+# CONFIG_HMC6352 is not set
-+# CONFIG_DS1682 is not set
-+# CONFIG_TI_DAC7512 is not set
-+# CONFIG_BMP085_I2C is not set
-+# CONFIG_BMP085_SPI is not set
-+# CONFIG_USB_SWITCH_FSA9480 is not set
-+# CONFIG_C2PORT is not set
-+
-+#
-+# EEPROM support
-+#
- CONFIG_EEPROM_AT24=y
-+# CONFIG_EEPROM_AT25 is not set
-+# CONFIG_EEPROM_LEGACY is not set
-+# CONFIG_EEPROM_MAX6875 is not set
-+# CONFIG_EEPROM_93CX6 is not set
-+# CONFIG_EEPROM_93XX46 is not set
-+
-+#
-+# Texas Instruments shared transport line discipline
-+#
-+# CONFIG_TI_ST is not set
-+# CONFIG_SENSORS_LIS3_SPI is not set
-+# CONFIG_SENSORS_LIS3_I2C is not set
-+
-+#
-+# Altera FPGA firmware download module
-+#
-+# CONFIG_ALTERA_STAPL is not set
-+CONFIG_HAVE_IDE=y
-+# CONFIG_IDE is not set
-+
-+#
-+# SCSI device support
-+#
-+CONFIG_SCSI_MOD=m
-+# CONFIG_RAID_ATTRS is not set
- CONFIG_SCSI=m
-+CONFIG_SCSI_DMA=y
-+# CONFIG_SCSI_TGT is not set
-+# CONFIG_SCSI_NETLINK is not set
-+CONFIG_SCSI_PROC_FS=y
-+
-+#
-+# SCSI support type (disk, tape, CD-ROM)
-+#
- CONFIG_BLK_DEV_SD=m
-+# CONFIG_CHR_DEV_ST is not set
-+# CONFIG_CHR_DEV_OSST is not set
-+# CONFIG_BLK_DEV_SR is not set
-+# CONFIG_CHR_DEV_SG is not set
-+# CONFIG_CHR_DEV_SCH is not set
-+# CONFIG_SCSI_MULTI_LUN is not set
-+# CONFIG_SCSI_CONSTANTS is not set
-+# CONFIG_SCSI_LOGGING is not set
-+# CONFIG_SCSI_SCAN_ASYNC is not set
-+
-+#
-+# SCSI Transports
-+#
-+# CONFIG_SCSI_SPI_ATTRS is not set
-+# CONFIG_SCSI_FC_ATTRS is not set
-+# CONFIG_SCSI_ISCSI_ATTRS is not set
-+# CONFIG_SCSI_SAS_ATTRS is not set
-+# CONFIG_SCSI_SAS_LIBSAS is not set
-+# CONFIG_SCSI_SRP_ATTRS is not set
-+CONFIG_SCSI_LOWLEVEL=y
-+# CONFIG_ISCSI_TCP is not set
-+# CONFIG_ISCSI_BOOT_SYSFS is not set
-+# CONFIG_LIBFC is not set
-+# CONFIG_LIBFCOE is not set
-+# CONFIG_SCSI_DEBUG is not set
-+# CONFIG_SCSI_DH is not set
-+# CONFIG_SCSI_OSD_INITIATOR is not set
-+# CONFIG_ATA is not set
-+# CONFIG_MD is not set
-+# CONFIG_TARGET_CORE is not set
- CONFIG_NETDEVICES=y
--CONFIG_TUN=m
--CONFIG_LXT_PHY=y
--CONFIG_LSI_ET1011C_PHY=y
--CONFIG_NET_ETHERNET=y
-+CONFIG_NET_CORE=y
-+# CONFIG_BONDING is not set
-+# CONFIG_DUMMY is not set
-+# CONFIG_EQUALIZER is not set
- CONFIG_MII=y
--CONFIG_TI_DAVINCI_EMAC=y
--# CONFIG_NETDEV_1000 is not set
--# CONFIG_NETDEV_10000 is not set
-+# CONFIG_NET_TEAM is not set
-+# CONFIG_MACVLAN is not set
-+# CONFIG_VXLAN is not set
- CONFIG_NETCONSOLE=y
-+CONFIG_NETPOLL=y
- CONFIG_NETPOLL_TRAP=y
-+CONFIG_NET_POLL_CONTROLLER=y
-+CONFIG_TUN=m
-+# CONFIG_VETH is not set
-+
-+#
-+# CAIF transport drivers
-+#
-+CONFIG_ETHERNET=y
-+CONFIG_NET_VENDOR_BROADCOM=y
-+# CONFIG_B44 is not set
-+# CONFIG_NET_CALXEDA_XGMAC is not set
-+CONFIG_NET_VENDOR_CHELSIO=y
-+CONFIG_NET_VENDOR_CIRRUS=y
-+# CONFIG_CS89x0 is not set
-+# CONFIG_DM9000 is not set
-+# CONFIG_DNET is not set
-+CONFIG_NET_VENDOR_FARADAY=y
-+# CONFIG_FTMAC100 is not set
-+# CONFIG_FTGMAC100 is not set
-+CONFIG_NET_VENDOR_INTEL=y
-+CONFIG_NET_VENDOR_I825XX=y
-+CONFIG_NET_VENDOR_MARVELL=y
-+CONFIG_NET_VENDOR_MICREL=y
-+# CONFIG_KS8842 is not set
-+# CONFIG_KS8851 is not set
-+# CONFIG_KS8851_MLL is not set
-+CONFIG_NET_VENDOR_MICROCHIP=y
-+# CONFIG_ENC28J60 is not set
-+CONFIG_NET_VENDOR_NATSEMI=y
-+CONFIG_NET_VENDOR_8390=y
-+# CONFIG_AX88796 is not set
-+# CONFIG_ETHOC is not set
-+CONFIG_NET_VENDOR_SEEQ=y
-+# CONFIG_SEEQ8005 is not set
-+CONFIG_NET_VENDOR_SMSC=y
-+# CONFIG_SMC91X is not set
-+# CONFIG_SMC911X is not set
-+# CONFIG_SMSC911X is not set
-+CONFIG_NET_VENDOR_STMICRO=y
-+# CONFIG_STMMAC_ETH is not set
-+CONFIG_NET_VENDOR_TI=y
-+CONFIG_TI_DAVINCI_EMAC=y
-+CONFIG_TI_DAVINCI_MDIO=y
-+CONFIG_TI_DAVINCI_CPDMA=y
-+# CONFIG_TI_CPSW is not set
-+CONFIG_NET_VENDOR_WIZNET=y
-+# CONFIG_WIZNET_W5100 is not set
-+# CONFIG_WIZNET_W5300 is not set
-+CONFIG_PHYLIB=y
-+
-+#
-+# MII PHY device drivers
-+#
-+# CONFIG_AMD_PHY is not set
-+# CONFIG_MARVELL_PHY is not set
-+# CONFIG_DAVICOM_PHY is not set
-+# CONFIG_QSEMI_PHY is not set
-+CONFIG_LXT_PHY=y
-+# CONFIG_CICADA_PHY is not set
-+# CONFIG_VITESSE_PHY is not set
-+# CONFIG_SMSC_PHY is not set
-+# CONFIG_BROADCOM_PHY is not set
-+# CONFIG_BCM87XX_PHY is not set
-+# CONFIG_ICPLUS_PHY is not set
-+# CONFIG_REALTEK_PHY is not set
-+# CONFIG_NATIONAL_PHY is not set
-+# CONFIG_STE10XP is not set
-+CONFIG_LSI_ET1011C_PHY=y
-+# CONFIG_MICREL_PHY is not set
-+# CONFIG_FIXED_PHY is not set
-+# CONFIG_MDIO_BITBANG is not set
-+# CONFIG_MICREL_KS8995MA is not set
-+# CONFIG_PPP is not set
-+# CONFIG_SLIP is not set
-+CONFIG_WLAN=y
-+# CONFIG_HOSTAP is not set
-+# CONFIG_WL_TI is not set
-+
-+#
-+# Enable WiMAX (Networking options) to see the WiMAX drivers
-+#
-+# CONFIG_WAN is not set
-+# CONFIG_ISDN is not set
-+
-+#
-+# Input device support
-+#
-+CONFIG_INPUT=y
-+# CONFIG_INPUT_FF_MEMLESS is not set
-+CONFIG_INPUT_POLLDEV=y
-+# CONFIG_INPUT_SPARSEKMAP is not set
-+# CONFIG_INPUT_MATRIXKMAP is not set
-+
-+#
-+# Userland interfaces
-+#
- CONFIG_INPUT_MOUSEDEV=m
-+CONFIG_INPUT_MOUSEDEV_PSAUX=y
-+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-+# CONFIG_INPUT_JOYDEV is not set
- CONFIG_INPUT_EVDEV=m
- CONFIG_INPUT_EVBUG=m
-+
-+#
-+# Input Device Drivers
-+#
-+CONFIG_INPUT_KEYBOARD=y
-+# CONFIG_KEYBOARD_ADP5588 is not set
-+# CONFIG_KEYBOARD_ADP5589 is not set
- CONFIG_KEYBOARD_ATKBD=m
-+# CONFIG_KEYBOARD_QT1070 is not set
-+# CONFIG_KEYBOARD_QT2160 is not set
-+# CONFIG_KEYBOARD_LKKBD is not set
- CONFIG_KEYBOARD_GPIO=y
-+# CONFIG_KEYBOARD_TCA6416 is not set
-+# CONFIG_KEYBOARD_TCA8418 is not set
-+# CONFIG_KEYBOARD_MATRIX is not set
-+# CONFIG_KEYBOARD_LM8333 is not set
-+# CONFIG_KEYBOARD_MAX7359 is not set
-+# CONFIG_KEYBOARD_MCS is not set
-+# CONFIG_KEYBOARD_MPR121 is not set
-+# CONFIG_KEYBOARD_NEWTON is not set
-+# CONFIG_KEYBOARD_OPENCORES is not set
-+# CONFIG_KEYBOARD_SAMSUNG is not set
-+# CONFIG_KEYBOARD_STOWAWAY is not set
-+# CONFIG_KEYBOARD_SUNKBD is not set
-+# CONFIG_KEYBOARD_OMAP4 is not set
- CONFIG_KEYBOARD_XTKBD=m
- # CONFIG_INPUT_MOUSE is not set
-+# CONFIG_INPUT_JOYSTICK is not set
-+# CONFIG_INPUT_TABLET is not set
- CONFIG_INPUT_TOUCHSCREEN=y
-+# CONFIG_TOUCHSCREEN_ADS7846 is not set
-+# CONFIG_TOUCHSCREEN_AD7877 is not set
-+# CONFIG_TOUCHSCREEN_AD7879 is not set
-+# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set
-+# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set
-+# CONFIG_TOUCHSCREEN_BU21013 is not set
-+# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set
-+# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set
-+# CONFIG_TOUCHSCREEN_DYNAPRO is not set
-+# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set
-+# CONFIG_TOUCHSCREEN_EETI is not set
-+# CONFIG_TOUCHSCREEN_EGALAX is not set
-+# CONFIG_TOUCHSCREEN_FUJITSU is not set
-+# CONFIG_TOUCHSCREEN_ILI210X is not set
-+# CONFIG_TOUCHSCREEN_GUNZE is not set
-+# CONFIG_TOUCHSCREEN_ELO is not set
-+# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
-+# CONFIG_TOUCHSCREEN_WACOM_I2C is not set
-+# CONFIG_TOUCHSCREEN_MAX11801 is not set
-+# CONFIG_TOUCHSCREEN_MCS5000 is not set
-+# CONFIG_TOUCHSCREEN_MMS114 is not set
-+# CONFIG_TOUCHSCREEN_MTOUCH is not set
-+# CONFIG_TOUCHSCREEN_INEXIO is not set
-+# CONFIG_TOUCHSCREEN_MK712 is not set
-+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
-+# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set
-+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
-+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
-+# CONFIG_TOUCHSCREEN_PIXCIR is not set
-+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
-+# CONFIG_TOUCHSCREEN_TSC_SERIO is not set
-+# CONFIG_TOUCHSCREEN_TSC2005 is not set
-+# CONFIG_TOUCHSCREEN_TSC2007 is not set
-+# CONFIG_TOUCHSCREEN_W90X900 is not set
-+# CONFIG_TOUCHSCREEN_ST1232 is not set
-+# CONFIG_TOUCHSCREEN_TPS6507X is not set
-+# CONFIG_INPUT_MISC is not set
-+
-+#
-+# Hardware I/O ports
-+#
-+CONFIG_SERIO=y
-+CONFIG_SERIO_SERPORT=y
- CONFIG_SERIO_LIBPS2=y
-+# CONFIG_SERIO_RAW is not set
-+# CONFIG_SERIO_ALTERA_PS2 is not set
-+# CONFIG_SERIO_PS2MULT is not set
-+# CONFIG_GAMEPORT is not set
-+
-+#
-+# Character devices
-+#
-+CONFIG_VT=y
-+CONFIG_CONSOLE_TRANSLATIONS=y
- # CONFIG_VT_CONSOLE is not set
-+CONFIG_HW_CONSOLE=y
-+# CONFIG_VT_HW_CONSOLE_BINDING is not set
-+CONFIG_UNIX98_PTYS=y
-+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
-+CONFIG_LEGACY_PTYS=y
-+CONFIG_LEGACY_PTY_COUNT=256
-+# CONFIG_SERIAL_NONSTANDARD is not set
-+# CONFIG_N_GSM is not set
-+# CONFIG_TRACE_SINK is not set
-+CONFIG_DEVKMEM=y
-+
-+#
-+# Serial drivers
-+#
- CONFIG_SERIAL_8250=y
- CONFIG_SERIAL_8250_CONSOLE=y
- CONFIG_SERIAL_8250_NR_UARTS=3
--CONFIG_SERIAL_OF_PLATFORM=y
-+CONFIG_SERIAL_8250_RUNTIME_UARTS=3
-+# CONFIG_SERIAL_8250_EXTENDED is not set
-+# CONFIG_SERIAL_8250_EM is not set
-+
-+#
-+# Non-8250 serial port support
-+#
-+# CONFIG_SERIAL_MAX3100 is not set
-+# CONFIG_SERIAL_MAX310X is not set
-+CONFIG_SERIAL_CORE=y
-+CONFIG_SERIAL_CORE_CONSOLE=y
-+# CONFIG_SERIAL_SCCNXP is not set
-+# CONFIG_SERIAL_TIMBERDALE is not set
-+# CONFIG_SERIAL_ALTERA_JTAGUART is not set
-+# CONFIG_SERIAL_ALTERA_UART is not set
-+# CONFIG_SERIAL_IFX6X60 is not set
-+# CONFIG_SERIAL_XILINX_PS_UART is not set
-+# CONFIG_TTY_PRINTK is not set
-+# CONFIG_HVC_DCC is not set
-+# CONFIG_IPMI_HANDLER is not set
-+CONFIG_HW_RANDOM=m
-+# CONFIG_HW_RANDOM_TIMERIOMEM is not set
-+# CONFIG_HW_RANDOM_ATMEL is not set
-+# CONFIG_HW_RANDOM_EXYNOS is not set
-+# CONFIG_R3964 is not set
-+# CONFIG_RAW_DRIVER is not set
-+# CONFIG_TCG_TPM is not set
- CONFIG_I2C=y
-+CONFIG_I2C_BOARDINFO=y
-+CONFIG_I2C_COMPAT=y
- CONFIG_I2C_CHARDEV=y
-+# CONFIG_I2C_MUX is not set
-+CONFIG_I2C_HELPER_AUTO=y
-+
-+#
-+# I2C Hardware Bus support
-+#
-+
-+#
-+# I2C system bus drivers (mostly embedded / system-on-chip)
-+#
- CONFIG_I2C_DAVINCI=y
-+# CONFIG_I2C_DESIGNWARE_PLATFORM is not set
-+# CONFIG_I2C_GPIO is not set
-+# CONFIG_I2C_OCORES is not set
-+# CONFIG_I2C_PCA_PLATFORM is not set
-+# CONFIG_I2C_PXA_PCI is not set
-+# CONFIG_I2C_SIMTEC is not set
-+# CONFIG_I2C_XILINX is not set
-+
-+#
-+# External I2C/SMBus adapter drivers
-+#
-+# CONFIG_I2C_PARPORT_LIGHT is not set
-+# CONFIG_I2C_TAOS_EVM is not set
-+
-+#
-+# Other I2C/SMBus bus drivers
-+#
-+# CONFIG_I2C_STUB is not set
-+# CONFIG_I2C_DEBUG_CORE is not set
-+# CONFIG_I2C_DEBUG_ALGO is not set
-+# CONFIG_I2C_DEBUG_BUS is not set
-+CONFIG_SPI=y
-+# CONFIG_SPI_DEBUG is not set
-+CONFIG_SPI_MASTER=y
-+
-+#
-+# SPI Master Controller Drivers
-+#
-+# CONFIG_SPI_ALTERA is not set
-+CONFIG_SPI_BITBANG=y
-+CONFIG_SPI_DAVINCI=y
-+# CONFIG_SPI_GPIO is not set
-+# CONFIG_SPI_OC_TINY is not set
-+# CONFIG_SPI_PXA2XX_PCI is not set
-+# CONFIG_SPI_SC18IS602 is not set
-+# CONFIG_SPI_XCOMM is not set
-+# CONFIG_SPI_XILINX is not set
-+# CONFIG_SPI_DESIGNWARE is not set
-+
-+#
-+# SPI Protocol Masters
-+#
-+# CONFIG_SPI_SPIDEV is not set
-+# CONFIG_SPI_TLE62X0 is not set
-+# CONFIG_HSI is not set
-+
-+#
-+# PPS support
-+#
-+# CONFIG_PPS is not set
-+
-+#
-+# PPS generators support
-+#
-+
-+#
-+# PTP clock support
-+#
-+
-+#
-+# Enable Device Drivers -> PPS to see the PTP clock options.
-+#
-+CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
-+CONFIG_ARCH_REQUIRE_GPIOLIB=y
-+CONFIG_GPIOLIB=y
-+# CONFIG_DEBUG_GPIO is not set
-+# CONFIG_GPIO_SYSFS is not set
-+
-+#
-+# Memory mapped GPIO drivers:
-+#
-+# CONFIG_GPIO_GENERIC_PLATFORM is not set
-+# CONFIG_GPIO_EM is not set
-+
-+#
-+# I2C GPIO expanders:
-+#
-+# CONFIG_GPIO_MAX7300 is not set
-+# CONFIG_GPIO_MAX732X is not set
-+# CONFIG_GPIO_PCA953X_IRQ is not set
-+CONFIG_GPIO_PCF857X=y
-+# CONFIG_GPIO_SX150X is not set
-+# CONFIG_GPIO_ADP5588 is not set
-+
-+#
-+# PCI GPIO expanders:
-+#
-+
-+#
-+# SPI GPIO expanders:
-+#
-+# CONFIG_GPIO_MAX7301 is not set
-+# CONFIG_GPIO_MCP23S08 is not set
-+# CONFIG_GPIO_MC33880 is not set
-+# CONFIG_GPIO_74X164 is not set
-+
-+#
-+# AC97 GPIO expanders:
-+#
-+
-+#
-+# MODULbus GPIO expanders:
-+#
-+# CONFIG_W1 is not set
-+# CONFIG_POWER_SUPPLY is not set
-+# CONFIG_POWER_AVS is not set
- # CONFIG_HWMON is not set
-+# CONFIG_THERMAL is not set
- CONFIG_WATCHDOG=y
-+# CONFIG_WATCHDOG_CORE is not set
-+# CONFIG_WATCHDOG_NOWAYOUT is not set
-+
-+#
-+# Watchdog Device Drivers
-+#
-+# CONFIG_SOFT_WATCHDOG is not set
-+# CONFIG_DW_WATCHDOG is not set
-+# CONFIG_DAVINCI_WATCHDOG is not set
-+# CONFIG_MAX63XX_WATCHDOG is not set
-+CONFIG_SSB_POSSIBLE=y
-+
-+#
-+# Sonics Silicon Backplane
-+#
-+# CONFIG_SSB is not set
-+CONFIG_BCMA_POSSIBLE=y
-+
-+#
-+# Broadcom specific AMBA
-+#
-+# CONFIG_BCMA is not set
-+
-+#
-+# Multifunction device drivers
-+#
-+# CONFIG_MFD_CORE is not set
-+# CONFIG_MFD_88PM860X is not set
-+# CONFIG_MFD_88PM800 is not set
-+# CONFIG_MFD_88PM805 is not set
-+# CONFIG_MFD_SM501 is not set
-+# CONFIG_MFD_ASIC3 is not set
-+# CONFIG_HTC_EGPIO is not set
-+# CONFIG_HTC_PASIC3 is not set
-+# CONFIG_HTC_I2CPLD is not set
-+# CONFIG_MFD_LM3533 is not set
-+# CONFIG_TPS6105X is not set
-+# CONFIG_TPS65010 is not set
-+# CONFIG_TPS6507X is not set
-+# CONFIG_MFD_TPS65217 is not set
-+# CONFIG_MFD_TPS6586X is not set
-+# CONFIG_MFD_TPS65910 is not set
-+# CONFIG_MFD_TPS65912_I2C is not set
-+# CONFIG_MFD_TPS65912_SPI is not set
-+# CONFIG_TWL4030_CORE is not set
-+# CONFIG_TWL6040_CORE is not set
-+# CONFIG_MFD_STMPE is not set
-+# CONFIG_MFD_TC3589X is not set
-+# CONFIG_MFD_TMIO is not set
-+# CONFIG_MFD_T7L66XB is not set
-+# CONFIG_MFD_SMSC is not set
-+# CONFIG_MFD_TC6387XB is not set
-+# CONFIG_MFD_TC6393XB is not set
-+# CONFIG_PMIC_DA903X is not set
-+# CONFIG_MFD_DA9052_SPI is not set
-+# CONFIG_MFD_DA9052_I2C is not set
-+# CONFIG_MFD_DA9055 is not set
-+# CONFIG_PMIC_ADP5520 is not set
-+# CONFIG_MFD_LP8788 is not set
-+# CONFIG_MFD_MAX77686 is not set
-+# CONFIG_MFD_MAX77693 is not set
-+# CONFIG_MFD_MAX8907 is not set
-+# CONFIG_MFD_MAX8925 is not set
-+# CONFIG_MFD_MAX8997 is not set
-+# CONFIG_MFD_MAX8998 is not set
-+# CONFIG_MFD_SEC_CORE is not set
-+# CONFIG_MFD_ARIZONA_I2C is not set
-+# CONFIG_MFD_ARIZONA_SPI is not set
-+# CONFIG_MFD_WM8400 is not set
-+# CONFIG_MFD_WM831X_I2C is not set
-+# CONFIG_MFD_WM831X_SPI is not set
-+# CONFIG_MFD_WM8350_I2C is not set
-+# CONFIG_MFD_WM8994 is not set
-+# CONFIG_MFD_PCF50633 is not set
-+# CONFIG_MFD_MC13XXX_SPI is not set
-+# CONFIG_MFD_MC13XXX_I2C is not set
-+# CONFIG_ABX500_CORE is not set
-+# CONFIG_EZX_PCAP is not set
-+# CONFIG_MFD_WL1273_CORE is not set
-+# CONFIG_MFD_TPS65090 is not set
-+# CONFIG_MFD_AAT2870_CORE is not set
-+# CONFIG_MFD_RC5T583 is not set
-+# CONFIG_MFD_PALMAS is not set
- CONFIG_REGULATOR=y
-+# CONFIG_REGULATOR_DEBUG is not set
- CONFIG_REGULATOR_DUMMY=y
-+# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
-+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
-+# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
-+# CONFIG_REGULATOR_GPIO is not set
-+# CONFIG_REGULATOR_AD5398 is not set
-+# CONFIG_REGULATOR_FAN53555 is not set
-+# CONFIG_REGULATOR_ISL6271A is not set
-+# CONFIG_REGULATOR_MAX1586 is not set
-+# CONFIG_REGULATOR_MAX8649 is not set
-+# CONFIG_REGULATOR_MAX8660 is not set
-+# CONFIG_REGULATOR_MAX8952 is not set
-+# CONFIG_REGULATOR_LP3971 is not set
-+# CONFIG_REGULATOR_LP3972 is not set
-+# CONFIG_REGULATOR_LP872X is not set
-+# CONFIG_REGULATOR_TPS62360 is not set
-+# CONFIG_REGULATOR_TPS65023 is not set
- CONFIG_REGULATOR_TPS6507X=y
-+# CONFIG_REGULATOR_TPS6524X is not set
-+# CONFIG_MEDIA_SUPPORT is not set
-+
-+#
-+# Graphics support
-+#
-+# CONFIG_DRM is not set
-+# CONFIG_VGASTATE is not set
-+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
- CONFIG_FB=y
-+# CONFIG_FIRMWARE_EDID is not set
-+# CONFIG_FB_DDC is not set
-+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
-+CONFIG_FB_CFB_FILLRECT=y
-+CONFIG_FB_CFB_COPYAREA=y
-+CONFIG_FB_CFB_IMAGEBLIT=y
-+CONFIG_FB_CFB_REV_PIXELS_IN_BYTE=y
-+# CONFIG_FB_SYS_FILLRECT is not set
-+# CONFIG_FB_SYS_COPYAREA is not set
-+# CONFIG_FB_SYS_IMAGEBLIT is not set
-+# CONFIG_FB_FOREIGN_ENDIAN is not set
-+# CONFIG_FB_SYS_FOPS is not set
-+# CONFIG_FB_WMT_GE_ROPS is not set
-+# CONFIG_FB_SVGALIB is not set
-+# CONFIG_FB_MACMODES is not set
-+# CONFIG_FB_BACKLIGHT is not set
-+# CONFIG_FB_MODE_HELPERS is not set
-+# CONFIG_FB_TILEBLITTING is not set
-+
-+#
-+# Frame buffer hardware drivers
-+#
-+# CONFIG_FB_S1D13XXX is not set
- CONFIG_FB_DA8XX=y
--# CONFIG_VGA_CONSOLE is not set
-+# CONFIG_FB_VIRTUAL is not set
-+# CONFIG_FB_METRONOME is not set
-+# CONFIG_FB_BROADSHEET is not set
-+# CONFIG_FB_AUO_K190X is not set
-+# CONFIG_FB_ST7735 is not set
-+# CONFIG_EXYNOS_VIDEO is not set
-+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-+
-+#
-+# Console display driver support
-+#
-+CONFIG_DUMMY_CONSOLE=y
- CONFIG_FRAMEBUFFER_CONSOLE=y
-+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
-+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
-+# CONFIG_FONTS is not set
-+CONFIG_FONT_8x8=y
-+CONFIG_FONT_8x16=y
- CONFIG_LOGO=y
--CONFIG_SOUND=m
--CONFIG_SND=m
--CONFIG_SND_SOC=m
--CONFIG_SND_DAVINCI_SOC=m
--# CONFIG_HID_SUPPORT is not set
-+CONFIG_LOGO_LINUX_MONO=y
-+CONFIG_LOGO_LINUX_VGA16=y
-+CONFIG_LOGO_LINUX_CLUT224=y
-+CONFIG_SOUND=y
-+# CONFIG_SOUND_OSS_CORE is not set
-+CONFIG_SND=y
-+CONFIG_SND_TIMER=y
-+CONFIG_SND_PCM=y
-+CONFIG_SND_COMPRESS_OFFLOAD=y
-+CONFIG_SND_JACK=y
-+# CONFIG_SND_SEQUENCER is not set
-+# CONFIG_SND_MIXER_OSS is not set
-+# CONFIG_SND_PCM_OSS is not set
-+# CONFIG_SND_HRTIMER is not set
-+# CONFIG_SND_DYNAMIC_MINORS is not set
-+CONFIG_SND_SUPPORT_OLD_API=y
-+CONFIG_SND_VERBOSE_PROCFS=y
-+# CONFIG_SND_VERBOSE_PRINTK is not set
-+# CONFIG_SND_DEBUG is not set
-+# CONFIG_SND_RAWMIDI_SEQ is not set
-+# CONFIG_SND_OPL3_LIB_SEQ is not set
-+# CONFIG_SND_OPL4_LIB_SEQ is not set
-+# CONFIG_SND_SBAWE_SEQ is not set
-+# CONFIG_SND_EMU10K1_SEQ is not set
-+CONFIG_SND_DRIVERS=y
-+# CONFIG_SND_DUMMY is not set
-+# CONFIG_SND_ALOOP is not set
-+# CONFIG_SND_MTPAV is not set
-+# CONFIG_SND_SERIAL_U16550 is not set
-+# CONFIG_SND_MPU401 is not set
-+CONFIG_SND_ARM=y
-+CONFIG_SND_SPI=y
-+CONFIG_SND_SOC=y
-+CONFIG_SND_DAVINCI_SOC=y
-+CONFIG_SND_DAVINCI_SOC_MCASP=y
-+# CONFIG_SND_DA830_SOC_EVM is not set
-+CONFIG_SND_DA850_SOC_EVM=y
-+# CONFIG_SND_DESIGNWARE_I2S is not set
-+CONFIG_SND_SOC_I2C_AND_SPI=y
-+# CONFIG_SND_SOC_ALL_CODECS is not set
-+CONFIG_SND_SOC_TLV320AIC3X=y
-+# CONFIG_SND_SIMPLE_CARD is not set
-+# CONFIG_SOUND_PRIME is not set
-+
-+#
-+# HID support
-+#
-+CONFIG_HID=y
-+# CONFIG_HIDRAW is not set
-+# CONFIG_UHID is not set
-+CONFIG_HID_GENERIC=y
-+
-+#
-+# Special HID drivers
-+#
-+CONFIG_USB_ARCH_HAS_OHCI=y
-+# CONFIG_USB_ARCH_HAS_EHCI is not set
-+# CONFIG_USB_ARCH_HAS_XHCI is not set
- # CONFIG_USB_SUPPORT is not set
-+CONFIG_MMC=y
-+# CONFIG_MMC_DEBUG is not set
-+CONFIG_MMC_UNSAFE_RESUME=y
-+# CONFIG_MMC_CLKGATE is not set
-+
-+#
-+# MMC/SD/SDIO Card Drivers
-+#
-+CONFIG_MMC_BLOCK=y
-+CONFIG_MMC_BLOCK_MINORS=8
-+CONFIG_MMC_BLOCK_BOUNCE=y
-+# CONFIG_SDIO_UART is not set
-+# CONFIG_MMC_TEST is not set
-+
-+#
-+# MMC/SD/SDIO Host Controller Drivers
-+#
-+# CONFIG_MMC_SDHCI is not set
-+# CONFIG_MMC_SDHCI_PXAV3 is not set
-+# CONFIG_MMC_SDHCI_PXAV2 is not set
-+CONFIG_MMC_DAVINCI=y
-+# CONFIG_MMC_SPI is not set
-+# CONFIG_MMC_DW is not set
-+# CONFIG_MEMSTICK is not set
-+# CONFIG_NEW_LEDS is not set
-+# CONFIG_ACCESSIBILITY is not set
-+# CONFIG_EDAC is not set
-+CONFIG_RTC_LIB=y
-+CONFIG_RTC_CLASS=y
-+CONFIG_RTC_HCTOSYS=y
-+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
-+# CONFIG_RTC_DEBUG is not set
-+
-+#
-+# RTC interfaces
-+#
-+CONFIG_RTC_INTF_SYSFS=y
-+CONFIG_RTC_INTF_PROC=y
-+CONFIG_RTC_INTF_DEV=y
-+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-+# CONFIG_RTC_DRV_TEST is not set
-+
-+#
-+# I2C RTC drivers
-+#
-+# CONFIG_RTC_DRV_DS1307 is not set
-+# CONFIG_RTC_DRV_DS1374 is not set
-+# CONFIG_RTC_DRV_DS1672 is not set
-+# CONFIG_RTC_DRV_DS3232 is not set
-+# CONFIG_RTC_DRV_MAX6900 is not set
-+# CONFIG_RTC_DRV_RS5C372 is not set
-+# CONFIG_RTC_DRV_ISL1208 is not set
-+# CONFIG_RTC_DRV_ISL12022 is not set
-+# CONFIG_RTC_DRV_X1205 is not set
-+# CONFIG_RTC_DRV_PCF8563 is not set
-+# CONFIG_RTC_DRV_PCF8583 is not set
-+# CONFIG_RTC_DRV_M41T80 is not set
-+# CONFIG_RTC_DRV_BQ32K is not set
-+# CONFIG_RTC_DRV_S35390A is not set
-+# CONFIG_RTC_DRV_FM3130 is not set
-+# CONFIG_RTC_DRV_RX8581 is not set
-+# CONFIG_RTC_DRV_RX8025 is not set
-+# CONFIG_RTC_DRV_EM3027 is not set
-+# CONFIG_RTC_DRV_RV3029C2 is not set
-+
-+#
-+# SPI RTC drivers
-+#
-+# CONFIG_RTC_DRV_M41T93 is not set
-+# CONFIG_RTC_DRV_M41T94 is not set
-+# CONFIG_RTC_DRV_DS1305 is not set
-+# CONFIG_RTC_DRV_DS1390 is not set
-+# CONFIG_RTC_DRV_MAX6902 is not set
-+# CONFIG_RTC_DRV_R9701 is not set
-+# CONFIG_RTC_DRV_RS5C348 is not set
-+# CONFIG_RTC_DRV_DS3234 is not set
-+# CONFIG_RTC_DRV_PCF2123 is not set
-+
-+#
-+# Platform RTC drivers
-+#
-+# CONFIG_RTC_DRV_CMOS is not set
-+# CONFIG_RTC_DRV_DS1286 is not set
-+# CONFIG_RTC_DRV_DS1511 is not set
-+# CONFIG_RTC_DRV_DS1553 is not set
-+# CONFIG_RTC_DRV_DS1742 is not set
-+# CONFIG_RTC_DRV_STK17TA8 is not set
-+# CONFIG_RTC_DRV_M48T86 is not set
-+# CONFIG_RTC_DRV_M48T35 is not set
-+# CONFIG_RTC_DRV_M48T59 is not set
-+# CONFIG_RTC_DRV_MSM6242 is not set
-+# CONFIG_RTC_DRV_BQ4802 is not set
-+# CONFIG_RTC_DRV_RP5C01 is not set
-+# CONFIG_RTC_DRV_V3020 is not set
-+# CONFIG_RTC_DRV_DS2404 is not set
-+
-+#
-+# on-CPU RTC drivers
-+#
-+CONFIG_RTC_DRV_OMAP=y
-+CONFIG_DMADEVICES=y
-+# CONFIG_DMADEVICES_DEBUG is not set
-+
-+#
-+# DMA Devices
-+#
-+# CONFIG_DW_DMAC is not set
-+# CONFIG_TIMB_DMA is not set
-+CONFIG_TI_EDMA=y
-+CONFIG_DMA_ENGINE=y
-+CONFIG_DMA_VIRTUAL_CHANNELS=y
-+
-+#
-+# DMA Clients
-+#
-+# CONFIG_NET_DMA is not set
-+# CONFIG_ASYNC_TX_DMA is not set
-+# CONFIG_DMATEST is not set
-+# CONFIG_AUXDISPLAY is not set
-+CONFIG_UIO=y
-+# CONFIG_UIO_PDRV is not set
-+# CONFIG_UIO_PDRV_GENIRQ is not set
-+CONFIG_UIO_PRUSS=y
-+
-+#
-+# Virtio drivers
-+#
-+# CONFIG_VIRTIO_MMIO is not set
-+
-+#
-+# Microsoft Hyper-V guest support
-+#
-+# CONFIG_STAGING is not set
-+CONFIG_CLKDEV_LOOKUP=y
-+
-+#
-+# Hardware Spinlock drivers
-+#
-+CONFIG_IOMMU_SUPPORT=y
-+
-+#
-+# Remoteproc drivers (EXPERIMENTAL)
-+#
-+# CONFIG_STE_MODEM_RPROC is not set
-+
-+#
-+# Rpmsg drivers (EXPERIMENTAL)
-+#
-+# CONFIG_VIRT_DRIVERS is not set
-+# CONFIG_PM_DEVFREQ is not set
-+# CONFIG_EXTCON is not set
-+# CONFIG_MEMORY is not set
-+# CONFIG_IIO is not set
-+# CONFIG_PWM is not set
-+
-+#
-+# File systems
-+#
- CONFIG_EXT2_FS=y
-+# CONFIG_EXT2_FS_XATTR is not set
-+# CONFIG_EXT2_FS_XIP is not set
- CONFIG_EXT3_FS=y
-+CONFIG_EXT3_DEFAULTS_TO_ORDERED=y
-+CONFIG_EXT3_FS_XATTR=y
-+# CONFIG_EXT3_FS_POSIX_ACL is not set
-+# CONFIG_EXT3_FS_SECURITY is not set
-+# CONFIG_EXT4_FS is not set
-+CONFIG_JBD=y
-+# CONFIG_JBD_DEBUG is not set
-+CONFIG_FS_MBCACHE=y
-+# CONFIG_REISERFS_FS is not set
-+# CONFIG_JFS_FS is not set
- CONFIG_XFS_FS=m
--CONFIG_INOTIFY=y
-+# CONFIG_XFS_QUOTA is not set
-+# CONFIG_XFS_POSIX_ACL is not set
-+# CONFIG_XFS_RT is not set
-+# CONFIG_XFS_DEBUG is not set
-+# CONFIG_GFS2_FS is not set
-+# CONFIG_BTRFS_FS is not set
-+# CONFIG_NILFS2_FS is not set
-+# CONFIG_FS_POSIX_ACL is not set
-+CONFIG_EXPORTFS=m
-+CONFIG_FILE_LOCKING=y
-+CONFIG_FSNOTIFY=y
-+CONFIG_DNOTIFY=y
-+CONFIG_INOTIFY_USER=y
-+# CONFIG_FANOTIFY is not set
-+# CONFIG_QUOTA is not set
-+# CONFIG_QUOTACTL is not set
- CONFIG_AUTOFS4_FS=m
-+# CONFIG_FUSE_FS is not set
-+
-+#
-+# Caches
-+#
-+# CONFIG_FSCACHE is not set
-+
-+#
-+# CD-ROM/DVD Filesystems
-+#
-+# CONFIG_ISO9660_FS is not set
-+# CONFIG_UDF_FS is not set
-+
-+#
-+# DOS/FAT/NT Filesystems
-+#
-+CONFIG_FAT_FS=y
- CONFIG_MSDOS_FS=y
- CONFIG_VFAT_FS=y
-+CONFIG_FAT_DEFAULT_CODEPAGE=437
-+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-+# CONFIG_NTFS_FS is not set
-+
-+#
-+# Pseudo filesystems
-+#
-+CONFIG_PROC_FS=y
-+CONFIG_PROC_SYSCTL=y
-+CONFIG_PROC_PAGE_MONITOR=y
-+CONFIG_SYSFS=y
- CONFIG_TMPFS=y
-+# CONFIG_TMPFS_POSIX_ACL is not set
-+# CONFIG_TMPFS_XATTR is not set
-+# CONFIG_HUGETLB_PAGE is not set
-+# CONFIG_CONFIGFS_FS is not set
-+CONFIG_MISC_FILESYSTEMS=y
-+# CONFIG_ADFS_FS is not set
-+# CONFIG_AFFS_FS is not set
-+# CONFIG_HFS_FS is not set
-+# CONFIG_HFSPLUS_FS is not set
-+# CONFIG_BEFS_FS is not set
-+# CONFIG_BFS_FS is not set
-+# CONFIG_EFS_FS is not set
-+# CONFIG_JFFS2_FS is not set
-+# CONFIG_LOGFS is not set
- CONFIG_CRAMFS=y
-+# CONFIG_SQUASHFS is not set
-+# CONFIG_VXFS_FS is not set
- CONFIG_MINIX_FS=m
-+# CONFIG_OMFS_FS is not set
-+# CONFIG_HPFS_FS is not set
-+# CONFIG_QNX4FS_FS is not set
-+# CONFIG_QNX6FS_FS is not set
-+# CONFIG_ROMFS_FS is not set
-+# CONFIG_PSTORE is not set
-+# CONFIG_SYSV_FS is not set
-+# CONFIG_UFS_FS is not set
-+CONFIG_NETWORK_FILESYSTEMS=y
- CONFIG_NFS_FS=y
-+CONFIG_NFS_V2=y
- CONFIG_NFS_V3=y
-+# CONFIG_NFS_V3_ACL is not set
-+# CONFIG_NFS_V4 is not set
-+# CONFIG_NFS_SWAP is not set
- CONFIG_ROOT_NFS=y
- CONFIG_NFSD=m
- CONFIG_NFSD_V3=y
--CONFIG_SMB_FS=m
--CONFIG_PARTITION_ADVANCED=y
-+# CONFIG_NFSD_V3_ACL is not set
-+# CONFIG_NFSD_V4 is not set
-+CONFIG_LOCKD=y
-+CONFIG_LOCKD_V4=y
-+CONFIG_NFS_COMMON=y
-+CONFIG_SUNRPC=y
-+# CONFIG_SUNRPC_DEBUG is not set
-+# CONFIG_CEPH_FS is not set
-+# CONFIG_CIFS is not set
-+# CONFIG_NCP_FS is not set
-+# CONFIG_CODA_FS is not set
-+# CONFIG_AFS_FS is not set
-+CONFIG_NLS=y
-+CONFIG_NLS_DEFAULT="iso8859-1"
- CONFIG_NLS_CODEPAGE_437=y
-+# CONFIG_NLS_CODEPAGE_737 is not set
-+# CONFIG_NLS_CODEPAGE_775 is not set
-+# CONFIG_NLS_CODEPAGE_850 is not set
-+# CONFIG_NLS_CODEPAGE_852 is not set
-+# CONFIG_NLS_CODEPAGE_855 is not set
-+# CONFIG_NLS_CODEPAGE_857 is not set
-+# CONFIG_NLS_CODEPAGE_860 is not set
-+# CONFIG_NLS_CODEPAGE_861 is not set
-+# CONFIG_NLS_CODEPAGE_862 is not set
-+# CONFIG_NLS_CODEPAGE_863 is not set
-+# CONFIG_NLS_CODEPAGE_864 is not set
-+# CONFIG_NLS_CODEPAGE_865 is not set
-+# CONFIG_NLS_CODEPAGE_866 is not set
-+# CONFIG_NLS_CODEPAGE_869 is not set
-+# CONFIG_NLS_CODEPAGE_936 is not set
-+# CONFIG_NLS_CODEPAGE_950 is not set
-+# CONFIG_NLS_CODEPAGE_932 is not set
-+# CONFIG_NLS_CODEPAGE_949 is not set
-+# CONFIG_NLS_CODEPAGE_874 is not set
-+# CONFIG_NLS_ISO8859_8 is not set
-+# CONFIG_NLS_CODEPAGE_1250 is not set
-+# CONFIG_NLS_CODEPAGE_1251 is not set
- CONFIG_NLS_ASCII=m
- CONFIG_NLS_ISO8859_1=y
-+# CONFIG_NLS_ISO8859_2 is not set
-+# CONFIG_NLS_ISO8859_3 is not set
-+# CONFIG_NLS_ISO8859_4 is not set
-+# CONFIG_NLS_ISO8859_5 is not set
-+# CONFIG_NLS_ISO8859_6 is not set
-+# CONFIG_NLS_ISO8859_7 is not set
-+# CONFIG_NLS_ISO8859_9 is not set
-+# CONFIG_NLS_ISO8859_13 is not set
-+# CONFIG_NLS_ISO8859_14 is not set
-+# CONFIG_NLS_ISO8859_15 is not set
-+# CONFIG_NLS_KOI8_R is not set
-+# CONFIG_NLS_KOI8_U is not set
-+# CONFIG_NLS_MAC_ROMAN is not set
-+# CONFIG_NLS_MAC_CELTIC is not set
-+# CONFIG_NLS_MAC_CENTEURO is not set
-+# CONFIG_NLS_MAC_CROATIAN is not set
-+# CONFIG_NLS_MAC_CYRILLIC is not set
-+# CONFIG_NLS_MAC_GAELIC is not set
-+# CONFIG_NLS_MAC_GREEK is not set
-+# CONFIG_NLS_MAC_ICELAND is not set
-+# CONFIG_NLS_MAC_INUIT is not set
-+# CONFIG_NLS_MAC_ROMANIAN is not set
-+# CONFIG_NLS_MAC_TURKISH is not set
- CONFIG_NLS_UTF8=m
-+
-+#
-+# Kernel hacking
-+#
-+# CONFIG_PRINTK_TIME is not set
-+CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
-+CONFIG_ENABLE_WARN_DEPRECATED=y
-+CONFIG_ENABLE_MUST_CHECK=y
-+CONFIG_FRAME_WARN=1024
-+# CONFIG_MAGIC_SYSRQ is not set
-+# CONFIG_STRIP_ASM_SYMS is not set
-+# CONFIG_READABLE_ASM is not set
-+# CONFIG_UNUSED_SYMBOLS is not set
- CONFIG_DEBUG_FS=y
-+# CONFIG_HEADERS_CHECK is not set
-+# CONFIG_DEBUG_SECTION_MISMATCH is not set
- CONFIG_DEBUG_KERNEL=y
-+# CONFIG_DEBUG_SHIRQ is not set
-+# CONFIG_LOCKUP_DETECTOR is not set
-+# CONFIG_PANIC_ON_OOPS is not set
-+CONFIG_PANIC_ON_OOPS_VALUE=0
-+# CONFIG_DETECT_HUNG_TASK is not set
-+CONFIG_SCHED_DEBUG=y
-+# CONFIG_SCHEDSTATS is not set
- CONFIG_TIMER_STATS=y
-+# CONFIG_DEBUG_OBJECTS is not set
-+# CONFIG_SLUB_DEBUG_ON is not set
-+# CONFIG_SLUB_STATS is not set
-+CONFIG_HAVE_DEBUG_KMEMLEAK=y
-+# CONFIG_DEBUG_KMEMLEAK is not set
-+CONFIG_DEBUG_PREEMPT=y
- CONFIG_DEBUG_RT_MUTEXES=y
-+CONFIG_DEBUG_PI_LIST=y
-+# CONFIG_RT_MUTEX_TESTER is not set
-+# CONFIG_DEBUG_SPINLOCK is not set
- CONFIG_DEBUG_MUTEXES=y
--# CONFIG_RCU_CPU_STALL_DETECTOR is not set
-+# CONFIG_DEBUG_LOCK_ALLOC is not set
-+# CONFIG_PROVE_LOCKING is not set
-+# CONFIG_PROVE_RCU_DELAY is not set
-+# CONFIG_SPARSE_RCU_POINTER is not set
-+# CONFIG_LOCK_STAT is not set
-+# CONFIG_DEBUG_ATOMIC_SLEEP is not set
-+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-+# CONFIG_DEBUG_STACK_USAGE is not set
-+# CONFIG_DEBUG_KOBJECT is not set
-+CONFIG_DEBUG_BUGVERBOSE=y
-+# CONFIG_DEBUG_INFO is not set
-+# CONFIG_DEBUG_VM is not set
-+# CONFIG_DEBUG_WRITECOUNT is not set
-+# CONFIG_DEBUG_MEMORY_INIT is not set
-+# CONFIG_DEBUG_LIST is not set
-+# CONFIG_TEST_LIST_SORT is not set
-+# CONFIG_DEBUG_SG is not set
-+# CONFIG_DEBUG_NOTIFIERS is not set
-+# CONFIG_DEBUG_CREDENTIALS is not set
-+# CONFIG_BOOT_PRINTK_DELAY is not set
-+# CONFIG_RCU_TORTURE_TEST is not set
-+# CONFIG_RCU_TRACE is not set
-+# CONFIG_BACKTRACE_SELF_TEST is not set
-+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
-+# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
-+# CONFIG_LKDTM is not set
-+# CONFIG_NOTIFIER_ERROR_INJECTION is not set
-+# CONFIG_FAULT_INJECTION is not set
-+# CONFIG_LATENCYTOP is not set
-+# CONFIG_DEBUG_PAGEALLOC is not set
-+CONFIG_HAVE_FUNCTION_TRACER=y
-+CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
-+CONFIG_HAVE_DYNAMIC_FTRACE=y
-+CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
-+CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
-+CONFIG_HAVE_C_RECORDMCOUNT=y
-+CONFIG_TRACING_SUPPORT=y
-+CONFIG_FTRACE=y
-+# CONFIG_FUNCTION_TRACER is not set
-+# CONFIG_IRQSOFF_TRACER is not set
-+# CONFIG_PREEMPT_TRACER is not set
-+# CONFIG_SCHED_TRACER is not set
-+# CONFIG_ENABLE_DEFAULT_TRACERS is not set
-+# CONFIG_FTRACE_SYSCALLS is not set
-+CONFIG_BRANCH_PROFILE_NONE=y
-+# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
-+# CONFIG_PROFILE_ALL_BRANCHES is not set
-+# CONFIG_STACK_TRACER is not set
-+# CONFIG_BLK_DEV_IO_TRACE is not set
-+# CONFIG_PROBE_EVENTS is not set
-+# CONFIG_RBTREE_TEST is not set
-+# CONFIG_INTERVAL_TREE_TEST is not set
-+# CONFIG_DYNAMIC_DEBUG is not set
-+# CONFIG_DMA_API_DEBUG is not set
-+# CONFIG_ATOMIC64_SELFTEST is not set
-+# CONFIG_SAMPLES is not set
-+CONFIG_HAVE_ARCH_KGDB=y
-+# CONFIG_KGDB is not set
-+# CONFIG_TEST_KSTRTOX is not set
-+# CONFIG_STRICT_DEVMEM is not set
-+CONFIG_ARM_UNWIND=y
- CONFIG_DEBUG_USER=y
--CONFIG_DEBUG_ERRORS=y
-+# CONFIG_DEBUG_LL is not set
-+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
-+
-+#
-+# Security options
-+#
-+# CONFIG_KEYS is not set
-+# CONFIG_SECURITY_DMESG_RESTRICT is not set
-+# CONFIG_SECURITY is not set
-+# CONFIG_SECURITYFS is not set
-+CONFIG_DEFAULT_SECURITY_DAC=y
-+CONFIG_DEFAULT_SECURITY=""
-+CONFIG_CRYPTO=y
-+
-+#
-+# Crypto core or helper
-+#
-+CONFIG_CRYPTO_ALGAPI=y
-+CONFIG_CRYPTO_ALGAPI2=y
-+# CONFIG_CRYPTO_MANAGER is not set
-+# CONFIG_CRYPTO_MANAGER2 is not set
-+# CONFIG_CRYPTO_USER is not set
-+# CONFIG_CRYPTO_GF128MUL is not set
-+# CONFIG_CRYPTO_NULL is not set
-+# CONFIG_CRYPTO_CRYPTD is not set
-+# CONFIG_CRYPTO_AUTHENC is not set
-+# CONFIG_CRYPTO_TEST is not set
-+
-+#
-+# Authenticated Encryption with Associated Data
-+#
-+# CONFIG_CRYPTO_CCM is not set
-+# CONFIG_CRYPTO_GCM is not set
-+# CONFIG_CRYPTO_SEQIV is not set
-+
-+#
-+# Block modes
-+#
-+# CONFIG_CRYPTO_CBC is not set
-+# CONFIG_CRYPTO_CTR is not set
-+# CONFIG_CRYPTO_CTS is not set
-+# CONFIG_CRYPTO_ECB is not set
-+# CONFIG_CRYPTO_LRW is not set
-+# CONFIG_CRYPTO_PCBC is not set
-+# CONFIG_CRYPTO_XTS is not set
-+
-+#
-+# Hash modes
-+#
-+# CONFIG_CRYPTO_HMAC is not set
-+# CONFIG_CRYPTO_XCBC is not set
-+# CONFIG_CRYPTO_VMAC is not set
-+
-+#
-+# Digest
-+#
-+# CONFIG_CRYPTO_CRC32C is not set
-+# CONFIG_CRYPTO_GHASH is not set
-+# CONFIG_CRYPTO_MD4 is not set
-+# CONFIG_CRYPTO_MD5 is not set
-+# CONFIG_CRYPTO_MICHAEL_MIC is not set
-+# CONFIG_CRYPTO_RMD128 is not set
-+# CONFIG_CRYPTO_RMD160 is not set
-+# CONFIG_CRYPTO_RMD256 is not set
-+# CONFIG_CRYPTO_RMD320 is not set
-+# CONFIG_CRYPTO_SHA1 is not set
-+# CONFIG_CRYPTO_SHA1_ARM is not set
-+# CONFIG_CRYPTO_SHA256 is not set
-+# CONFIG_CRYPTO_SHA512 is not set
-+# CONFIG_CRYPTO_TGR192 is not set
-+# CONFIG_CRYPTO_WP512 is not set
-+
-+#
-+# Ciphers
-+#
-+CONFIG_CRYPTO_AES=y
-+# CONFIG_CRYPTO_AES_ARM is not set
-+# CONFIG_CRYPTO_ANUBIS is not set
-+# CONFIG_CRYPTO_ARC4 is not set
-+# CONFIG_CRYPTO_BLOWFISH is not set
-+# CONFIG_CRYPTO_CAMELLIA is not set
-+# CONFIG_CRYPTO_CAST5 is not set
-+# CONFIG_CRYPTO_CAST6 is not set
-+# CONFIG_CRYPTO_DES is not set
-+# CONFIG_CRYPTO_FCRYPT is not set
-+# CONFIG_CRYPTO_KHAZAD is not set
-+# CONFIG_CRYPTO_SALSA20 is not set
-+# CONFIG_CRYPTO_SEED is not set
-+# CONFIG_CRYPTO_SERPENT is not set
-+# CONFIG_CRYPTO_TEA is not set
-+# CONFIG_CRYPTO_TWOFISH is not set
-+
-+#
-+# Compression
-+#
-+# CONFIG_CRYPTO_DEFLATE is not set
-+# CONFIG_CRYPTO_ZLIB is not set
-+# CONFIG_CRYPTO_LZO is not set
-+
-+#
-+# Random Number Generation
-+#
- # CONFIG_CRYPTO_ANSI_CPRNG is not set
-+# CONFIG_CRYPTO_USER_API_HASH is not set
-+# CONFIG_CRYPTO_USER_API_SKCIPHER is not set
- # CONFIG_CRYPTO_HW is not set
-+# CONFIG_BINARY_PRINTF is not set
-+
-+#
-+# Library routines
-+#
-+CONFIG_BITREVERSE=y
-+CONFIG_GENERIC_STRNCPY_FROM_USER=y
-+CONFIG_GENERIC_STRNLEN_USER=y
-+CONFIG_GENERIC_PCI_IOMAP=y
-+CONFIG_GENERIC_IO=y
- CONFIG_CRC_CCITT=m
-+# CONFIG_CRC16 is not set
- CONFIG_CRC_T10DIF=m
-+# CONFIG_CRC_ITU_T is not set
-+CONFIG_CRC32=y
-+# CONFIG_CRC32_SELFTEST is not set
-+CONFIG_CRC32_SLICEBY8=y
-+# CONFIG_CRC32_SLICEBY4 is not set
-+# CONFIG_CRC32_SARWATE is not set
-+# CONFIG_CRC32_BIT is not set
-+# CONFIG_CRC7 is not set
-+# CONFIG_LIBCRC32C is not set
-+# CONFIG_CRC8 is not set
-+CONFIG_ZLIB_INFLATE=y
-+CONFIG_LZO_COMPRESS=y
-+CONFIG_LZO_DECOMPRESS=y
-+# CONFIG_XZ_DEC is not set
-+# CONFIG_XZ_DEC_BCJ is not set
-+CONFIG_DECOMPRESS_GZIP=y
-+CONFIG_GENERIC_ALLOCATOR=y
-+CONFIG_HAS_IOMEM=y
-+CONFIG_HAS_IOPORT=y
-+CONFIG_HAS_DMA=y
-+CONFIG_DQL=y
-+CONFIG_NLATTR=y
-+CONFIG_GENERIC_ATOMIC64=y
-+CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
-+# CONFIG_AVERAGE is not set
-+# CONFIG_CORDIC is not set
-+# CONFIG_DDR is not set
-diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
-index 82ce8d7..d322dec 100644
---- a/arch/arm/configs/omap2plus_defconfig
-+++ b/arch/arm/configs/omap2plus_defconfig
-@@ -1,250 +1,2840 @@
-+#
-+# Automatically generated file; DO NOT EDIT.
-+# Linux/arm 3.8.0-rc2 Kernel Configuration
-+#
-+CONFIG_ARM=y
-+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
-+CONFIG_GENERIC_GPIO=y
-+CONFIG_HAVE_PROC_CPU=y
-+CONFIG_STACKTRACE_SUPPORT=y
-+CONFIG_LOCKDEP_SUPPORT=y
-+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-+CONFIG_RWSEM_GENERIC_SPINLOCK=y
-+CONFIG_ARCH_HAS_CPUFREQ=y
-+CONFIG_GENERIC_HWEIGHT=y
-+CONFIG_GENERIC_CALIBRATE_DELAY=y
-+CONFIG_NEED_DMA_MAP_STATE=y
-+CONFIG_VECTORS_BASE=0xffff0000
-+CONFIG_ARM_PATCH_PHYS_VIRT=y
-+CONFIG_GENERIC_BUG=y
-+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-+CONFIG_HAVE_IRQ_WORK=y
-+CONFIG_IRQ_WORK=y
-+CONFIG_BUILDTIME_EXTABLE_SORT=y
-+
-+#
-+# General setup
-+#
- CONFIG_EXPERIMENTAL=y
-+CONFIG_INIT_ENV_ARG_LIMIT=32
-+CONFIG_CROSS_COMPILE=""
-+CONFIG_LOCALVERSION=""
-+CONFIG_LOCALVERSION_AUTO=y
-+CONFIG_HAVE_KERNEL_GZIP=y
-+CONFIG_HAVE_KERNEL_LZMA=y
-+CONFIG_HAVE_KERNEL_XZ=y
-+CONFIG_HAVE_KERNEL_LZO=y
-+CONFIG_KERNEL_GZIP=y
-+# CONFIG_KERNEL_LZMA is not set
-+# CONFIG_KERNEL_XZ is not set
-+# CONFIG_KERNEL_LZO is not set
-+CONFIG_DEFAULT_HOSTNAME="(none)"
-+CONFIG_SWAP=y
- CONFIG_SYSVIPC=y
-+CONFIG_SYSVIPC_SYSCTL=y
- CONFIG_POSIX_MQUEUE=y
-+CONFIG_POSIX_MQUEUE_SYSCTL=y
-+# CONFIG_FHANDLE is not set
-+# CONFIG_AUDIT is not set
-+CONFIG_HAVE_GENERIC_HARDIRQS=y
-+
-+#
-+# IRQ subsystem
-+#
-+CONFIG_GENERIC_HARDIRQS=y
-+CONFIG_GENERIC_IRQ_PROBE=y
-+CONFIG_GENERIC_IRQ_SHOW=y
-+CONFIG_HARDIRQS_SW_RESEND=y
-+CONFIG_GENERIC_IRQ_CHIP=y
-+CONFIG_IRQ_DOMAIN=y
-+# CONFIG_IRQ_DOMAIN_DEBUG is not set
-+CONFIG_SPARSE_IRQ=y
-+CONFIG_KTIME_SCALAR=y
-+CONFIG_GENERIC_CLOCKEVENTS=y
-+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
-+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
-+
-+#
-+# Timers subsystem
-+#
-+CONFIG_TICK_ONESHOT=y
-+CONFIG_NO_HZ=y
-+CONFIG_HIGH_RES_TIMERS=y
-+
-+#
-+# CPU/Task time and stats accounting
-+#
-+CONFIG_TICK_CPU_ACCOUNTING=y
- CONFIG_BSD_PROCESS_ACCT=y
-+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-+# CONFIG_TASKSTATS is not set
-+
-+#
-+# RCU Subsystem
-+#
-+CONFIG_TREE_RCU=y
-+# CONFIG_PREEMPT_RCU is not set
-+CONFIG_RCU_FANOUT=32
-+CONFIG_RCU_FANOUT_LEAF=16
-+# CONFIG_RCU_FANOUT_EXACT is not set
-+# CONFIG_RCU_FAST_NO_HZ is not set
-+# CONFIG_TREE_RCU_TRACE is not set
-+# CONFIG_RCU_NOCB_CPU is not set
- CONFIG_IKCONFIG=y
- CONFIG_IKCONFIG_PROC=y
- CONFIG_LOG_BUF_SHIFT=16
-+# CONFIG_CGROUPS is not set
-+# CONFIG_CHECKPOINT_RESTORE is not set
-+# CONFIG_NAMESPACES is not set
-+# CONFIG_SCHED_AUTOGROUP is not set
-+# CONFIG_SYSFS_DEPRECATED is not set
-+# CONFIG_RELAY is not set
- CONFIG_BLK_DEV_INITRD=y
-+CONFIG_INITRAMFS_SOURCE=""
-+CONFIG_RD_GZIP=y
-+# CONFIG_RD_BZIP2 is not set
-+# CONFIG_RD_LZMA is not set
-+# CONFIG_RD_XZ is not set
-+# CONFIG_RD_LZO is not set
-+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-+CONFIG_SYSCTL=y
-+CONFIG_ANON_INODES=y
- CONFIG_EXPERT=y
-+CONFIG_HAVE_UID16=y
-+CONFIG_UID16=y
- # CONFIG_SYSCTL_SYSCALL is not set
--CONFIG_KALLSYMS_EXTRA_PASS=y
-+CONFIG_KALLSYMS=y
-+CONFIG_KALLSYMS_ALL=y
-+CONFIG_HOTPLUG=y
-+CONFIG_PRINTK=y
-+CONFIG_BUG=y
-+CONFIG_ELF_CORE=y
-+CONFIG_BASE_FULL=y
-+CONFIG_FUTEX=y
-+CONFIG_EPOLL=y
-+CONFIG_SIGNALFD=y
-+CONFIG_TIMERFD=y
-+CONFIG_EVENTFD=y
-+CONFIG_SHMEM=y
-+CONFIG_AIO=y
-+# CONFIG_EMBEDDED is not set
-+CONFIG_HAVE_PERF_EVENTS=y
-+CONFIG_PERF_USE_VMALLOC=y
-+
-+#
-+# Kernel Performance Events And Counters
-+#
-+CONFIG_PERF_EVENTS=y
-+# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
-+CONFIG_VM_EVENT_COUNTERS=y
-+CONFIG_COMPAT_BRK=y
- CONFIG_SLAB=y
-+# CONFIG_SLUB is not set
-+# CONFIG_SLOB is not set
- CONFIG_PROFILING=y
-+CONFIG_TRACEPOINTS=y
- CONFIG_OPROFILE=y
-+CONFIG_HAVE_OPROFILE=y
- CONFIG_KPROBES=y
-+# CONFIG_JUMP_LABEL is not set
-+CONFIG_KRETPROBES=y
-+CONFIG_HAVE_KPROBES=y
-+CONFIG_HAVE_KRETPROBES=y
-+CONFIG_HAVE_ARCH_TRACEHOOK=y
-+CONFIG_HAVE_DMA_ATTRS=y
-+CONFIG_HAVE_DMA_CONTIGUOUS=y
-+CONFIG_USE_GENERIC_SMP_HELPERS=y
-+CONFIG_GENERIC_SMP_IDLE_THREAD=y
-+CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
-+CONFIG_HAVE_CLK=y
-+CONFIG_HAVE_DMA_API_DEBUG=y
-+CONFIG_HAVE_HW_BREAKPOINT=y
-+CONFIG_HAVE_ARCH_JUMP_LABEL=y
-+CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
-+CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
-+CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
-+CONFIG_MODULES_USE_ELF_REL=y
-+CONFIG_CLONE_BACKWARDS=y
-+
-+#
-+# GCOV-based kernel profiling
-+#
-+# CONFIG_GCOV_KERNEL is not set
-+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
-+CONFIG_SLABINFO=y
-+CONFIG_RT_MUTEXES=y
-+CONFIG_BASE_SMALL=0
- CONFIG_MODULES=y
- CONFIG_MODULE_FORCE_LOAD=y
- CONFIG_MODULE_UNLOAD=y
- CONFIG_MODULE_FORCE_UNLOAD=y
- CONFIG_MODVERSIONS=y
- CONFIG_MODULE_SRCVERSION_ALL=y
-+# CONFIG_MODULE_SIG is not set
-+CONFIG_STOP_MACHINE=y
-+CONFIG_BLOCK=y
-+CONFIG_LBDAF=y
- # CONFIG_BLK_DEV_BSG is not set
-+# CONFIG_BLK_DEV_BSGLIB is not set
-+# CONFIG_BLK_DEV_INTEGRITY is not set
-+
-+#
-+# Partition Types
-+#
-+CONFIG_PARTITION_ADVANCED=y
-+# CONFIG_ACORN_PARTITION is not set
-+# CONFIG_OSF_PARTITION is not set
-+# CONFIG_AMIGA_PARTITION is not set
-+# CONFIG_ATARI_PARTITION is not set
-+# CONFIG_MAC_PARTITION is not set
-+CONFIG_MSDOS_PARTITION=y
-+# CONFIG_BSD_DISKLABEL is not set
-+# CONFIG_MINIX_SUBPARTITION is not set
-+# CONFIG_SOLARIS_X86_PARTITION is not set
-+# CONFIG_UNIXWARE_DISKLABEL is not set
-+# CONFIG_LDM_PARTITION is not set
-+# CONFIG_SGI_PARTITION is not set
-+# CONFIG_ULTRIX_PARTITION is not set
-+# CONFIG_SUN_PARTITION is not set
-+# CONFIG_KARMA_PARTITION is not set
-+CONFIG_EFI_PARTITION=y
-+# CONFIG_SYSV68_PARTITION is not set
-+
-+#
-+# IO Schedulers
-+#
-+CONFIG_IOSCHED_NOOP=y
-+CONFIG_IOSCHED_DEADLINE=y
-+CONFIG_IOSCHED_CFQ=y
-+# CONFIG_DEFAULT_DEADLINE is not set
-+CONFIG_DEFAULT_CFQ=y
-+# CONFIG_DEFAULT_NOOP is not set
-+CONFIG_DEFAULT_IOSCHED="cfq"
-+CONFIG_UNINLINE_SPIN_UNLOCK=y
-+CONFIG_FREEZER=y
-+
-+#
-+# System Type
-+#
-+CONFIG_MMU=y
-+# CONFIG_ARCH_MULTIPLATFORM is not set
-+# CONFIG_ARCH_INTEGRATOR is not set
-+# CONFIG_ARCH_REALVIEW is not set
-+# CONFIG_ARCH_VERSATILE is not set
-+# CONFIG_ARCH_AT91 is not set
-+# CONFIG_ARCH_BCM2835 is not set
-+# CONFIG_ARCH_CNS3XXX is not set
-+# CONFIG_ARCH_CLPS711X is not set
-+# CONFIG_ARCH_GEMINI is not set
-+# CONFIG_ARCH_SIRF is not set
-+# CONFIG_ARCH_EBSA110 is not set
-+# CONFIG_ARCH_EP93XX is not set
-+# CONFIG_ARCH_FOOTBRIDGE is not set
-+# CONFIG_ARCH_MXS is not set
-+# CONFIG_ARCH_NETX is not set
-+# CONFIG_ARCH_H720X is not set
-+# CONFIG_ARCH_IOP13XX is not set
-+# CONFIG_ARCH_IOP32X is not set
-+# CONFIG_ARCH_IOP33X is not set
-+# CONFIG_ARCH_IXP4XX is not set
-+# CONFIG_ARCH_DOVE is not set
-+# CONFIG_ARCH_KIRKWOOD is not set
-+# CONFIG_ARCH_MV78XX0 is not set
-+# CONFIG_ARCH_ORION5X is not set
-+# CONFIG_ARCH_MMP is not set
-+# CONFIG_ARCH_KS8695 is not set
-+# CONFIG_ARCH_W90X900 is not set
-+# CONFIG_ARCH_LPC32XX is not set
-+# CONFIG_ARCH_TEGRA is not set
-+# CONFIG_ARCH_PXA is not set
-+# CONFIG_ARCH_MSM is not set
-+# CONFIG_ARCH_SHMOBILE is not set
-+# CONFIG_ARCH_RPC is not set
-+# CONFIG_ARCH_SA1100 is not set
-+# CONFIG_ARCH_S3C24XX is not set
-+# CONFIG_ARCH_S3C64XX is not set
-+# CONFIG_ARCH_S5P64X0 is not set
-+# CONFIG_ARCH_S5PC100 is not set
-+# CONFIG_ARCH_S5PV210 is not set
-+# CONFIG_ARCH_EXYNOS is not set
-+# CONFIG_ARCH_SHARK is not set
-+# CONFIG_ARCH_U300 is not set
-+# CONFIG_ARCH_U8500 is not set
-+# CONFIG_ARCH_NOMADIK is not set
-+# CONFIG_PLAT_SPEAR is not set
-+# CONFIG_ARCH_DAVINCI is not set
- CONFIG_ARCH_OMAP=y
-+# CONFIG_ARCH_VT8500_SINGLE is not set
-+# CONFIG_GPIO_PCA953X is not set
-+# CONFIG_KEYBOARD_GPIO_POLLED is not set
-+
-+#
-+# TI OMAP Common Features
-+#
-+# CONFIG_ARCH_OMAP1 is not set
-+CONFIG_ARCH_OMAP2PLUS=y
-+
-+#
-+# OMAP Feature Selections
-+#
-+CONFIG_OMAP_DEBUG_DEVICES=y
- CONFIG_OMAP_RESET_CLOCKS=y
-+CONFIG_OMAP_MUX=y
- CONFIG_OMAP_MUX_DEBUG=y
-+CONFIG_OMAP_MUX_WARNINGS=y
-+# CONFIG_OMAP_MBOX_FWK is not set
-+CONFIG_OMAP_32K_TIMER=y
-+# CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE is not set
-+CONFIG_OMAP_32K_TIMER_HZ=128
-+CONFIG_OMAP_DM_TIMER=y
-+CONFIG_OMAP_PM_NOOP=y
-+CONFIG_MACH_OMAP_GENERIC=y
-+
-+#
-+# TI OMAP2/3/4 Specific Features
-+#
-+CONFIG_ARCH_OMAP2PLUS_TYPICAL=y
-+CONFIG_SOC_HAS_OMAP2_SDRC=y
-+CONFIG_SOC_HAS_REALTIME_COUNTER=y
-+CONFIG_ARCH_OMAP2=y
-+CONFIG_ARCH_OMAP3=y
-+CONFIG_ARCH_OMAP4=y
-+CONFIG_SOC_OMAP5=y
-+
-+#
-+# OMAP Core Type
-+#
-+CONFIG_SOC_OMAP2420=y
-+CONFIG_SOC_OMAP2430=y
-+CONFIG_SOC_OMAP3430=y
-+CONFIG_SOC_TI81XX=y
-+CONFIG_SOC_AM33XX=y
-+CONFIG_OMAP_PACKAGE_ZAF=y
-+CONFIG_OMAP_PACKAGE_ZAC=y
-+CONFIG_OMAP_PACKAGE_CBB=y
-+CONFIG_OMAP_PACKAGE_CUS=y
-+CONFIG_OMAP_PACKAGE_CBP=y
-+CONFIG_OMAP_PACKAGE_CBL=y
-+CONFIG_OMAP_PACKAGE_CBS=y
-+
-+#
-+# OMAP Board Type
-+#
-+CONFIG_MACH_OMAP2_TUSB6010=y
-+CONFIG_MACH_OMAP_H4=y
-+CONFIG_MACH_OMAP_APOLLON=y
-+CONFIG_MACH_OMAP_2430SDP=y
-+CONFIG_MACH_OMAP3_BEAGLE=y
-+CONFIG_MACH_DEVKIT8000=y
-+CONFIG_MACH_OMAP_LDP=y
-+CONFIG_MACH_OMAP3530_LV_SOM=y
-+CONFIG_MACH_OMAP3_TORPEDO=y
-+CONFIG_MACH_OVERO=y
-+CONFIG_MACH_OMAP3EVM=y
-+CONFIG_MACH_OMAP3517EVM=y
-+# CONFIG_MACH_CRANEBOARD is not set
-+CONFIG_MACH_OMAP3_PANDORA=y
-+CONFIG_MACH_TOUCHBOOK=y
-+CONFIG_MACH_OMAP_3430SDP=y
-+CONFIG_MACH_NOKIA_N800=y
-+CONFIG_MACH_NOKIA_N810=y
-+CONFIG_MACH_NOKIA_N810_WIMAX=y
-+CONFIG_MACH_NOKIA_N8X0=y
-+CONFIG_MACH_NOKIA_RM680=y
-+CONFIG_MACH_NOKIA_RX51=y
-+CONFIG_MACH_OMAP_ZOOM2=y
-+CONFIG_MACH_OMAP_ZOOM3=y
-+CONFIG_MACH_CM_T35=y
-+CONFIG_MACH_CM_T3517=y
-+CONFIG_MACH_CM_T3730=y
-+CONFIG_MACH_IGEP0020=y
-+CONFIG_MACH_IGEP0030=y
-+CONFIG_MACH_SBC3530=y
-+CONFIG_MACH_OMAP_3630SDP=y
-+CONFIG_MACH_TI8168EVM=y
-+CONFIG_MACH_TI8148EVM=y
-+CONFIG_MACH_OMAP_4430SDP=y
-+CONFIG_MACH_OMAP4_PANDA=y
-+# CONFIG_OMAP3_EMU is not set
-+# CONFIG_OMAP3_SDRC_AC_TIMING is not set
-+# CONFIG_OMAP4_ERRATA_I688 is not set
-+# CONFIG_ARCH_VT8500 is not set
-+
-+#
-+# Processor Type
-+#
-+CONFIG_CPU_V6=y
-+CONFIG_CPU_V7=y
-+CONFIG_CPU_32v6=y
-+CONFIG_CPU_32v6K=y
-+CONFIG_CPU_32v7=y
-+CONFIG_CPU_ABRT_EV6=y
-+CONFIG_CPU_ABRT_EV7=y
-+CONFIG_CPU_PABRT_V6=y
-+CONFIG_CPU_PABRT_V7=y
-+CONFIG_CPU_CACHE_V6=y
-+CONFIG_CPU_CACHE_V7=y
-+CONFIG_CPU_CACHE_VIPT=y
-+CONFIG_CPU_COPY_V6=y
-+CONFIG_CPU_TLB_V6=y
-+CONFIG_CPU_TLB_V7=y
-+CONFIG_CPU_HAS_ASID=y
-+CONFIG_CPU_CP15=y
-+CONFIG_CPU_CP15_MMU=y
-+CONFIG_CPU_USE_DOMAINS=y
-+
-+#
-+# Processor Features
-+#
-+# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
-+CONFIG_ARM_THUMB=y
- CONFIG_ARM_THUMBEE=y
-+# CONFIG_ARM_VIRT_EXT is not set
-+# CONFIG_CPU_ICACHE_DISABLE is not set
-+# CONFIG_CPU_DCACHE_DISABLE is not set
-+# CONFIG_CPU_BPREDICT_DISABLE is not set
-+CONFIG_OUTER_CACHE=y
-+CONFIG_OUTER_CACHE_SYNC=y
-+CONFIG_CACHE_L2X0=y
-+CONFIG_ARM_L1_CACHE_SHIFT_6=y
-+CONFIG_ARM_L1_CACHE_SHIFT=6
-+CONFIG_ARM_DMA_MEM_BUFFERABLE=y
-+CONFIG_ARM_NR_BANKS=8
-+CONFIG_MULTI_IRQ_HANDLER=y
-+# CONFIG_ARM_ERRATA_326103 is not set
- CONFIG_ARM_ERRATA_411920=y
--CONFIG_NO_HZ=y
--CONFIG_HIGH_RES_TIMERS=y
-+# CONFIG_ARM_ERRATA_430973 is not set
-+# CONFIG_ARM_ERRATA_458693 is not set
-+# CONFIG_ARM_ERRATA_460075 is not set
-+# CONFIG_ARM_ERRATA_742230 is not set
-+# CONFIG_ARM_ERRATA_742231 is not set
-+CONFIG_PL310_ERRATA_588369=y
-+CONFIG_ARM_ERRATA_720789=y
-+CONFIG_PL310_ERRATA_727915=y
-+# CONFIG_ARM_ERRATA_743622 is not set
-+# CONFIG_ARM_ERRATA_751472 is not set
-+# CONFIG_ARM_ERRATA_754322 is not set
-+# CONFIG_ARM_ERRATA_754327 is not set
-+# CONFIG_ARM_ERRATA_764369 is not set
-+# CONFIG_PL310_ERRATA_769419 is not set
-+# CONFIG_ARM_ERRATA_775420 is not set
-+CONFIG_ARM_GIC=y
-+CONFIG_TI_PRIV_EDMA=y
-+
-+#
-+# Bus support
-+#
-+# CONFIG_PCI_SYSCALL is not set
-+# CONFIG_PCCARD is not set
-+
-+#
-+# Kernel Features
-+#
-+CONFIG_HAVE_SMP=y
- CONFIG_SMP=y
-+CONFIG_SMP_ON_UP=y
-+CONFIG_ARM_CPU_TOPOLOGY=y
-+# CONFIG_SCHED_MC is not set
-+# CONFIG_SCHED_SMT is not set
-+CONFIG_HAVE_ARM_SCU=y
-+CONFIG_ARM_ARCH_TIMER=y
-+CONFIG_HAVE_ARM_TWD=y
-+CONFIG_VMSPLIT_3G=y
-+# CONFIG_VMSPLIT_2G is not set
-+# CONFIG_VMSPLIT_1G is not set
-+CONFIG_PAGE_OFFSET=0xC0000000
- CONFIG_NR_CPUS=2
--CONFIG_LEDS=y
-+CONFIG_HOTPLUG_CPU=y
-+CONFIG_LOCAL_TIMERS=y
-+CONFIG_ARCH_NR_GPIO=512
-+CONFIG_PREEMPT_NONE=y
-+# CONFIG_PREEMPT_VOLUNTARY is not set
-+# CONFIG_PREEMPT is not set
-+CONFIG_HZ=128
-+CONFIG_AEABI=y
-+CONFIG_OABI_COMPAT=y
-+CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y
-+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
-+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
-+CONFIG_HAVE_ARCH_PFN_VALID=y
-+CONFIG_HIGHMEM=y
-+# CONFIG_HIGHPTE is not set
-+CONFIG_HW_PERF_EVENTS=y
-+CONFIG_SELECT_MEMORY_MODEL=y
-+CONFIG_FLATMEM_MANUAL=y
-+CONFIG_FLATMEM=y
-+CONFIG_FLAT_NODE_MEM_MAP=y
-+CONFIG_HAVE_MEMBLOCK=y
-+CONFIG_PAGEFLAGS_EXTENDED=y
-+CONFIG_SPLIT_PTLOCK_CPUS=999999
-+CONFIG_COMPACTION=y
-+CONFIG_MIGRATION=y
-+# CONFIG_PHYS_ADDR_T_64BIT is not set
-+CONFIG_ZONE_DMA_FLAG=0
-+CONFIG_BOUNCE=y
-+CONFIG_VIRT_TO_BUS=y
-+# CONFIG_KSM is not set
-+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
-+CONFIG_CROSS_MEMORY_ATTACH=y
-+# CONFIG_CLEANCACHE is not set
-+# CONFIG_FRONTSWAP is not set
-+CONFIG_FORCE_MAX_ZONEORDER=12
-+CONFIG_ALIGNMENT_TRAP=y
-+# CONFIG_UACCESS_WITH_MEMCPY is not set
-+# CONFIG_SECCOMP is not set
-+# CONFIG_CC_STACKPROTECTOR is not set
-+
-+#
-+# Boot options
-+#
-+CONFIG_USE_OF=y
-+CONFIG_ATAGS=y
-+# CONFIG_DEPRECATED_PARAM_STRUCT is not set
- CONFIG_ZBOOT_ROM_TEXT=0x0
- CONFIG_ZBOOT_ROM_BSS=0x0
-+# CONFIG_ARM_APPENDED_DTB is not set
- CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200"
-+CONFIG_CMDLINE_FROM_BOOTLOADER=y
-+# CONFIG_CMDLINE_EXTEND is not set
-+# CONFIG_CMDLINE_FORCE is not set
-+# CONFIG_XIP_KERNEL is not set
- CONFIG_KEXEC=y
-+CONFIG_ATAGS_PROC=y
-+# CONFIG_CRASH_DUMP is not set
-+# CONFIG_AUTO_ZRELADDR is not set
-+
-+#
-+# CPU Power Management
-+#
-+
-+#
-+# CPU Frequency scaling
-+#
-+# CONFIG_CPU_FREQ is not set
-+# CONFIG_CPU_IDLE is not set
-+CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED=y
-+
-+#
-+# Floating point emulation
-+#
-+
-+#
-+# At least one emulation must be selected
-+#
- CONFIG_FPE_NWFPE=y
-+# CONFIG_FPE_NWFPE_XP is not set
-+# CONFIG_FPE_FASTFPE is not set
-+CONFIG_VFP=y
-+CONFIG_VFPv3=y
-+CONFIG_NEON=y
-+
-+#
-+# Userspace binary formats
-+#
-+CONFIG_BINFMT_ELF=y
-+CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
-+CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
-+CONFIG_HAVE_AOUT=y
-+# CONFIG_BINFMT_AOUT is not set
- CONFIG_BINFMT_MISC=y
-+CONFIG_COREDUMP=y
-+
-+#
-+# Power management options
-+#
-+CONFIG_SUSPEND=y
-+CONFIG_SUSPEND_FREEZER=y
-+CONFIG_PM_SLEEP=y
-+CONFIG_PM_SLEEP_SMP=y
-+# CONFIG_PM_AUTOSLEEP is not set
-+# CONFIG_PM_WAKELOCKS is not set
-+CONFIG_PM_RUNTIME=y
-+CONFIG_PM=y
- CONFIG_PM_DEBUG=y
-+# CONFIG_PM_ADVANCED_DEBUG is not set
-+# CONFIG_PM_TEST_SUSPEND is not set
-+CONFIG_PM_SLEEP_DEBUG=y
-+# CONFIG_APM_EMULATION is not set
-+CONFIG_ARCH_HAS_OPP=y
-+CONFIG_PM_OPP=y
-+CONFIG_PM_CLK=y
-+CONFIG_CPU_PM=y
-+CONFIG_ARCH_SUSPEND_POSSIBLE=y
-+CONFIG_ARM_CPU_SUSPEND=y
- CONFIG_NET=y
-+
-+#
-+# Networking options
-+#
- CONFIG_PACKET=y
-+# CONFIG_PACKET_DIAG is not set
- CONFIG_UNIX=y
-+# CONFIG_UNIX_DIAG is not set
-+CONFIG_XFRM=y
-+CONFIG_XFRM_ALGO=y
- CONFIG_XFRM_USER=y
-+# CONFIG_XFRM_SUB_POLICY is not set
-+CONFIG_XFRM_MIGRATE=y
-+# CONFIG_XFRM_STATISTICS is not set
- CONFIG_NET_KEY=y
- CONFIG_NET_KEY_MIGRATE=y
- CONFIG_INET=y
- CONFIG_IP_MULTICAST=y
-+# CONFIG_IP_ADVANCED_ROUTER is not set
- CONFIG_IP_PNP=y
- CONFIG_IP_PNP_DHCP=y
- CONFIG_IP_PNP_BOOTP=y
- CONFIG_IP_PNP_RARP=y
-+# CONFIG_NET_IPIP is not set
-+# CONFIG_NET_IPGRE_DEMUX is not set
-+# CONFIG_IP_MROUTE is not set
-+# CONFIG_ARPD is not set
-+# CONFIG_SYN_COOKIES is not set
-+# CONFIG_NET_IPVTI is not set
-+# CONFIG_INET_AH is not set
-+# CONFIG_INET_ESP is not set
-+# CONFIG_INET_IPCOMP is not set
-+# CONFIG_INET_XFRM_TUNNEL is not set
-+# CONFIG_INET_TUNNEL is not set
-+CONFIG_INET_XFRM_MODE_TRANSPORT=y
-+CONFIG_INET_XFRM_MODE_TUNNEL=y
-+CONFIG_INET_XFRM_MODE_BEET=y
- # CONFIG_INET_LRO is not set
-+CONFIG_INET_DIAG=y
-+CONFIG_INET_TCP_DIAG=y
-+# CONFIG_INET_UDP_DIAG is not set
-+# CONFIG_TCP_CONG_ADVANCED is not set
-+CONFIG_TCP_CONG_CUBIC=y
-+CONFIG_DEFAULT_TCP_CONG="cubic"
-+# CONFIG_TCP_MD5SIG is not set
- # CONFIG_IPV6 is not set
-+# CONFIG_NETLABEL is not set
-+# CONFIG_NETWORK_SECMARK is not set
-+# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
- CONFIG_NETFILTER=y
-+# CONFIG_NETFILTER_DEBUG is not set
-+CONFIG_NETFILTER_ADVANCED=y
-+
-+#
-+# Core Netfilter Configuration
-+#
-+# CONFIG_NETFILTER_NETLINK_ACCT is not set
-+# CONFIG_NETFILTER_NETLINK_QUEUE is not set
-+# CONFIG_NETFILTER_NETLINK_LOG is not set
-+# CONFIG_NF_CONNTRACK is not set
-+# CONFIG_NETFILTER_XTABLES is not set
-+# CONFIG_IP_VS is not set
-+
-+#
-+# IP: Netfilter Configuration
-+#
-+# CONFIG_NF_DEFRAG_IPV4 is not set
-+# CONFIG_IP_NF_QUEUE is not set
-+# CONFIG_IP_NF_IPTABLES is not set
-+# CONFIG_IP_NF_ARPTABLES is not set
-+# CONFIG_IP_DCCP is not set
-+# CONFIG_IP_SCTP is not set
-+# CONFIG_RDS is not set
-+# CONFIG_TIPC is not set
-+# CONFIG_ATM is not set
-+# CONFIG_L2TP is not set
-+# CONFIG_BRIDGE is not set
-+CONFIG_HAVE_NET_DSA=y
-+# CONFIG_VLAN_8021Q is not set
-+# CONFIG_DECNET is not set
-+# CONFIG_LLC2 is not set
-+# CONFIG_IPX is not set
-+# CONFIG_ATALK is not set
-+# CONFIG_X25 is not set
-+# CONFIG_LAPB is not set
-+# CONFIG_WAN_ROUTER is not set
-+# CONFIG_PHONET is not set
-+# CONFIG_IEEE802154 is not set
-+# CONFIG_NET_SCHED is not set
-+# CONFIG_DCB is not set
-+CONFIG_DNS_RESOLVER=y
-+# CONFIG_BATMAN_ADV is not set
-+# CONFIG_OPENVSWITCH is not set
-+CONFIG_RPS=y
-+CONFIG_RFS_ACCEL=y
-+CONFIG_XPS=y
-+CONFIG_BQL=y
-+# CONFIG_BPF_JIT is not set
-+
-+#
-+# Network testing
-+#
-+# CONFIG_NET_PKTGEN is not set
-+# CONFIG_NET_TCPPROBE is not set
-+# CONFIG_NET_DROP_MONITOR is not set
-+# CONFIG_HAMRADIO is not set
-+# CONFIG_CAN is not set
-+# CONFIG_IRDA is not set
- CONFIG_BT=m
-+# CONFIG_BT_RFCOMM is not set
-+# CONFIG_BT_BNEP is not set
-+# CONFIG_BT_HIDP is not set
-+
-+#
-+# Bluetooth device drivers
-+#
-+# CONFIG_BT_HCIBTUSB is not set
-+# CONFIG_BT_HCIBTSDIO is not set
- CONFIG_BT_HCIUART=m
- CONFIG_BT_HCIUART_H4=y
- CONFIG_BT_HCIUART_BCSP=y
-+# CONFIG_BT_HCIUART_ATH3K is not set
- CONFIG_BT_HCIUART_LL=y
-+# CONFIG_BT_HCIUART_3WIRE is not set
- CONFIG_BT_HCIBCM203X=m
- CONFIG_BT_HCIBPA10X=m
-+# CONFIG_BT_HCIBFUSB is not set
-+# CONFIG_BT_HCIVHCI is not set
-+# CONFIG_BT_MRVL is not set
-+# CONFIG_AF_RXRPC is not set
-+CONFIG_WIRELESS=y
-+CONFIG_WIRELESS_EXT=y
-+CONFIG_WEXT_CORE=y
-+CONFIG_WEXT_PROC=y
-+CONFIG_WEXT_SPY=y
- CONFIG_CFG80211=m
-+# CONFIG_NL80211_TESTMODE is not set
-+# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
-+# CONFIG_CFG80211_REG_DEBUG is not set
-+# CONFIG_CFG80211_CERTIFICATION_ONUS is not set
-+CONFIG_CFG80211_DEFAULT_PS=y
-+# CONFIG_CFG80211_DEBUGFS is not set
-+# CONFIG_CFG80211_INTERNAL_REGDB is not set
-+# CONFIG_CFG80211_WEXT is not set
-+CONFIG_LIB80211=m
-+# CONFIG_LIB80211_DEBUG is not set
- CONFIG_MAC80211=m
-+CONFIG_MAC80211_HAS_RC=y
- CONFIG_MAC80211_RC_PID=y
-+CONFIG_MAC80211_RC_MINSTREL=y
-+CONFIG_MAC80211_RC_MINSTREL_HT=y
- CONFIG_MAC80211_RC_DEFAULT_PID=y
-+# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set
-+CONFIG_MAC80211_RC_DEFAULT="pid"
-+# CONFIG_MAC80211_MESH is not set
-+# CONFIG_MAC80211_DEBUGFS is not set
-+# CONFIG_MAC80211_MESSAGE_TRACING is not set
-+# CONFIG_MAC80211_DEBUG_MENU is not set
-+# CONFIG_WIMAX is not set
-+# CONFIG_RFKILL is not set
-+# CONFIG_RFKILL_REGULATOR is not set
-+# CONFIG_NET_9P is not set
-+# CONFIG_CAIF is not set
-+# CONFIG_CEPH_LIB is not set
-+# CONFIG_NFC is not set
-+CONFIG_HAVE_BPF_JIT=y
-+
-+#
-+# Device Drivers
-+#
-+
-+#
-+# Generic Driver Options
-+#
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
--CONFIG_CONNECTOR=y
- CONFIG_DEVTMPFS=y
- CONFIG_DEVTMPFS_MOUNT=y
-+CONFIG_STANDALONE=y
-+CONFIG_PREVENT_FIRMWARE_BUILD=y
-+CONFIG_FW_LOADER=y
-+CONFIG_FIRMWARE_IN_KERNEL=y
-+CONFIG_EXTRA_FIRMWARE=""
-+# CONFIG_DEBUG_DRIVER is not set
-+# CONFIG_DEBUG_DEVRES is not set
-+# CONFIG_SYS_HYPERVISOR is not set
-+# CONFIG_GENERIC_CPU_DEVICES is not set
-+CONFIG_REGMAP=y
-+CONFIG_REGMAP_I2C=y
-+CONFIG_REGMAP_SPI=m
-+CONFIG_REGMAP_IRQ=y
-+# CONFIG_DMA_SHARED_BUFFER is not set
-+# CONFIG_CMA is not set
-+
-+#
-+# Bus devices
-+#
-+# CONFIG_OMAP_OCP2SCP is not set
-+CONFIG_OMAP_INTERCONNECT=y
-+CONFIG_CONNECTOR=y
-+CONFIG_PROC_EVENTS=y
- CONFIG_MTD=y
-+# CONFIG_MTD_TESTS is not set
-+# CONFIG_MTD_REDBOOT_PARTS is not set
- CONFIG_MTD_CMDLINE_PARTS=y
-+# CONFIG_MTD_AFS_PARTS is not set
-+CONFIG_MTD_OF_PARTS=y
-+# CONFIG_MTD_AR7_PARTS is not set
-+
-+#
-+# User Modules And Translation Layers
-+#
- CONFIG_MTD_CHAR=y
-+CONFIG_MTD_BLKDEVS=y
- CONFIG_MTD_BLOCK=y
-+# CONFIG_FTL is not set
-+# CONFIG_NFTL is not set
-+# CONFIG_INFTL is not set
-+# CONFIG_RFD_FTL is not set
-+# CONFIG_SSFDC is not set
-+# CONFIG_SM_FTL is not set
- CONFIG_MTD_OOPS=y
-+# CONFIG_MTD_SWAP is not set
-+
-+#
-+# RAM/ROM/Flash chip drivers
-+#
- CONFIG_MTD_CFI=y
-+# CONFIG_MTD_JEDECPROBE is not set
-+CONFIG_MTD_GEN_PROBE=y
-+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-+CONFIG_MTD_MAP_BANK_WIDTH_1=y
-+CONFIG_MTD_MAP_BANK_WIDTH_2=y
-+CONFIG_MTD_MAP_BANK_WIDTH_4=y
-+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-+CONFIG_MTD_CFI_I1=y
-+CONFIG_MTD_CFI_I2=y
-+# CONFIG_MTD_CFI_I4 is not set
-+# CONFIG_MTD_CFI_I8 is not set
- CONFIG_MTD_CFI_INTELEXT=y
-+# CONFIG_MTD_CFI_AMDSTD is not set
-+# CONFIG_MTD_CFI_STAA is not set
-+CONFIG_MTD_CFI_UTIL=y
-+# CONFIG_MTD_RAM is not set
-+# CONFIG_MTD_ROM is not set
-+# CONFIG_MTD_ABSENT is not set
-+
-+#
-+# Mapping drivers for chip access
-+#
-+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-+# CONFIG_MTD_PHYSMAP is not set
-+# CONFIG_MTD_PHYSMAP_OF is not set
-+# CONFIG_MTD_PLATRAM is not set
-+
-+#
-+# Self-contained MTD device drivers
-+#
-+# CONFIG_MTD_DATAFLASH is not set
-+CONFIG_MTD_M25P80=y
-+CONFIG_M25PXX_USE_FAST_READ=y
-+# CONFIG_MTD_SST25L is not set
-+# CONFIG_MTD_SLRAM is not set
-+# CONFIG_MTD_PHRAM is not set
-+# CONFIG_MTD_MTDRAM is not set
-+# CONFIG_MTD_BLOCK2MTD is not set
-+
-+#
-+# Disk-On-Chip Device Drivers
-+#
-+# CONFIG_MTD_DOC2000 is not set
-+# CONFIG_MTD_DOC2001 is not set
-+# CONFIG_MTD_DOC2001PLUS is not set
-+# CONFIG_MTD_DOCG3 is not set
-+CONFIG_MTD_NAND_ECC=y
-+# CONFIG_MTD_NAND_ECC_SMC is not set
- CONFIG_MTD_NAND=y
-+# CONFIG_MTD_NAND_ECC_BCH is not set
-+# CONFIG_MTD_SM_COMMON is not set
-+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
-+# CONFIG_MTD_NAND_DENALI is not set
-+# CONFIG_MTD_NAND_GPIO is not set
- CONFIG_MTD_NAND_OMAP2=y
-+# CONFIG_MTD_NAND_OMAP_BCH is not set
-+CONFIG_MTD_NAND_IDS=y
-+# CONFIG_MTD_NAND_DISKONCHIP is not set
-+# CONFIG_MTD_NAND_DOCG4 is not set
-+# CONFIG_MTD_NAND_NANDSIM is not set
-+# CONFIG_MTD_NAND_PLATFORM is not set
-+# CONFIG_MTD_ALAUDA is not set
- CONFIG_MTD_ONENAND=y
- CONFIG_MTD_ONENAND_VERIFY_WRITE=y
-+# CONFIG_MTD_ONENAND_GENERIC is not set
- CONFIG_MTD_ONENAND_OMAP2=y
-+# CONFIG_MTD_ONENAND_OTP is not set
-+# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
-+# CONFIG_MTD_ONENAND_SIM is not set
-+
-+#
-+# LPDDR flash memory drivers
-+#
-+# CONFIG_MTD_LPDDR is not set
- CONFIG_MTD_UBI=y
-+CONFIG_MTD_UBI_WL_THRESHOLD=4096
-+CONFIG_MTD_UBI_BEB_LIMIT=20
-+# CONFIG_MTD_UBI_FASTMAP is not set
-+# CONFIG_MTD_UBI_GLUEBI is not set
-+CONFIG_DTC=y
-+CONFIG_OF=y
-+
-+#
-+# Device Tree and Open Firmware support
-+#
-+CONFIG_PROC_DEVICETREE=y
-+# CONFIG_OF_SELFTEST is not set
-+CONFIG_OF_FLATTREE=y
-+CONFIG_OF_EARLY_FLATTREE=y
-+CONFIG_OF_ADDRESS=y
-+CONFIG_OF_IRQ=y
-+CONFIG_OF_DEVICE=y
-+CONFIG_OF_I2C=y
-+CONFIG_OF_NET=y
-+CONFIG_OF_MDIO=y
-+CONFIG_OF_MTD=y
-+# CONFIG_PARPORT is not set
-+CONFIG_BLK_DEV=y
-+# CONFIG_BLK_DEV_COW_COMMON is not set
- CONFIG_BLK_DEV_LOOP=y
-+CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
-+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
-+# CONFIG_BLK_DEV_DRBD is not set
-+# CONFIG_BLK_DEV_NBD is not set
- CONFIG_BLK_DEV_RAM=y
-+CONFIG_BLK_DEV_RAM_COUNT=16
- CONFIG_BLK_DEV_RAM_SIZE=16384
-+# CONFIG_BLK_DEV_XIP is not set
-+# CONFIG_CDROM_PKTCDVD is not set
-+# CONFIG_ATA_OVER_ETH is not set
-+# CONFIG_MG_DISK is not set
-+# CONFIG_BLK_DEV_RBD is not set
-+
-+#
-+# Misc devices
-+#
-+# CONFIG_SENSORS_LIS3LV02D is not set
-+# CONFIG_AD525X_DPOT is not set
-+# CONFIG_ATMEL_PWM is not set
-+# CONFIG_ICS932S401 is not set
-+# CONFIG_ENCLOSURE_SERVICES is not set
-+# CONFIG_APDS9802ALS is not set
-+# CONFIG_ISL29003 is not set
-+# CONFIG_ISL29020 is not set
-+# CONFIG_SENSORS_TSL2550 is not set
-+# CONFIG_SENSORS_BH1780 is not set
-+# CONFIG_SENSORS_BH1770 is not set
-+# CONFIG_SENSORS_APDS990X is not set
-+# CONFIG_HMC6352 is not set
-+# CONFIG_DS1682 is not set
-+# CONFIG_TI_DAC7512 is not set
-+# CONFIG_BMP085_I2C is not set
-+# CONFIG_BMP085_SPI is not set
-+# CONFIG_USB_SWITCH_FSA9480 is not set
-+CONFIG_GPEVT=y
-+# CONFIG_C2PORT is not set
-+
-+#
-+# EEPROM support
-+#
-+# CONFIG_EEPROM_AT24 is not set
-+# CONFIG_EEPROM_AT25 is not set
-+# CONFIG_EEPROM_LEGACY is not set
-+# CONFIG_EEPROM_MAX6875 is not set
-+CONFIG_EEPROM_93CX6=y
-+# CONFIG_EEPROM_93XX46 is not set
-+
-+#
-+# Texas Instruments shared transport line discipline
-+#
-+# CONFIG_TI_ST is not set
-+# CONFIG_SENSORS_LIS3_SPI is not set
-+# CONFIG_SENSORS_LIS3_I2C is not set
-+
-+#
-+# Altera FPGA firmware download module
-+#
-+# CONFIG_ALTERA_STAPL is not set
-+
-+#
-+# SCSI device support
-+#
-+CONFIG_SCSI_MOD=y
-+# CONFIG_RAID_ATTRS is not set
- CONFIG_SCSI=y
-+CONFIG_SCSI_DMA=y
-+# CONFIG_SCSI_TGT is not set
-+# CONFIG_SCSI_NETLINK is not set
-+CONFIG_SCSI_PROC_FS=y
-+
-+#
-+# SCSI support type (disk, tape, CD-ROM)
-+#
- CONFIG_BLK_DEV_SD=y
-+# CONFIG_CHR_DEV_ST is not set
-+# CONFIG_CHR_DEV_OSST is not set
-+# CONFIG_BLK_DEV_SR is not set
-+# CONFIG_CHR_DEV_SG is not set
-+# CONFIG_CHR_DEV_SCH is not set
- CONFIG_SCSI_MULTI_LUN=y
-+# CONFIG_SCSI_CONSTANTS is not set
-+# CONFIG_SCSI_LOGGING is not set
- CONFIG_SCSI_SCAN_ASYNC=y
-+
-+#
-+# SCSI Transports
-+#
-+# CONFIG_SCSI_SPI_ATTRS is not set
-+# CONFIG_SCSI_FC_ATTRS is not set
-+# CONFIG_SCSI_ISCSI_ATTRS is not set
-+# CONFIG_SCSI_SAS_ATTRS is not set
-+# CONFIG_SCSI_SAS_LIBSAS is not set
-+# CONFIG_SCSI_SRP_ATTRS is not set
-+CONFIG_SCSI_LOWLEVEL=y
-+# CONFIG_ISCSI_TCP is not set
-+# CONFIG_ISCSI_BOOT_SYSFS is not set
-+# CONFIG_LIBFC is not set
-+# CONFIG_LIBFCOE is not set
-+# CONFIG_SCSI_DEBUG is not set
-+# CONFIG_SCSI_DH is not set
-+# CONFIG_SCSI_OSD_INITIATOR is not set
-+# CONFIG_ATA is not set
- CONFIG_MD=y
-+# CONFIG_BLK_DEV_MD is not set
-+# CONFIG_BLK_DEV_DM is not set
-+# CONFIG_TARGET_CORE is not set
- CONFIG_NETDEVICES=y
--CONFIG_SMSC_PHY=y
--CONFIG_NET_ETHERNET=y
--CONFIG_SMC91X=y
--CONFIG_SMSC911X=y
-+CONFIG_NET_CORE=y
-+# CONFIG_BONDING is not set
-+# CONFIG_DUMMY is not set
-+# CONFIG_EQUALIZER is not set
-+CONFIG_MII=y
-+# CONFIG_NET_TEAM is not set
-+# CONFIG_MACVLAN is not set
-+# CONFIG_VXLAN is not set
-+# CONFIG_NETCONSOLE is not set
-+# CONFIG_NETPOLL is not set
-+# CONFIG_NET_POLL_CONTROLLER is not set
-+# CONFIG_TUN is not set
-+# CONFIG_VETH is not set
-+
-+#
-+# CAIF transport drivers
-+#
-+
-+#
-+# Distributed Switch Architecture drivers
-+#
-+# CONFIG_NET_DSA_MV88E6XXX is not set
-+# CONFIG_NET_DSA_MV88E6060 is not set
-+# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set
-+# CONFIG_NET_DSA_MV88E6131 is not set
-+# CONFIG_NET_DSA_MV88E6123_61_65 is not set
-+CONFIG_ETHERNET=y
-+CONFIG_NET_CADENCE=y
-+# CONFIG_ARM_AT91_ETHER is not set
-+# CONFIG_MACB is not set
-+CONFIG_NET_VENDOR_BROADCOM=y
-+# CONFIG_B44 is not set
-+# CONFIG_NET_CALXEDA_XGMAC is not set
-+CONFIG_NET_VENDOR_CIRRUS=y
-+# CONFIG_CS89x0 is not set
-+# CONFIG_DM9000 is not set
-+# CONFIG_DNET is not set
-+CONFIG_NET_VENDOR_FARADAY=y
-+# CONFIG_FTMAC100 is not set
-+# CONFIG_FTGMAC100 is not set
-+CONFIG_NET_VENDOR_INTEL=y
-+CONFIG_NET_VENDOR_I825XX=y
-+CONFIG_NET_VENDOR_MARVELL=y
-+# CONFIG_MVMDIO is not set
-+CONFIG_NET_VENDOR_MICREL=y
-+# CONFIG_KS8842 is not set
- CONFIG_KS8851=y
- CONFIG_KS8851_MLL=y
--CONFIG_LIBERTAS=m
--CONFIG_LIBERTAS_USB=m
--CONFIG_LIBERTAS_SDIO=m
--CONFIG_LIBERTAS_DEBUG=y
-+CONFIG_NET_VENDOR_MICROCHIP=y
-+# CONFIG_ENC28J60 is not set
-+CONFIG_NET_VENDOR_NATSEMI=y
-+CONFIG_NET_VENDOR_8390=y
-+# CONFIG_AX88796 is not set
-+# CONFIG_ETHOC is not set
-+CONFIG_NET_VENDOR_SEEQ=y
-+# CONFIG_SEEQ8005 is not set
-+CONFIG_NET_VENDOR_SMSC=y
-+CONFIG_SMC91X=y
-+# CONFIG_SMC911X is not set
-+CONFIG_SMSC911X=y
-+# CONFIG_SMSC911X_ARCH_HOOKS is not set
-+CONFIG_NET_VENDOR_STMICRO=y
-+# CONFIG_STMMAC_ETH is not set
-+CONFIG_NET_VENDOR_TI=y
-+# CONFIG_TI_DAVINCI_EMAC is not set
-+CONFIG_TI_DAVINCI_MDIO=y
-+CONFIG_TI_DAVINCI_CPDMA=y
-+CONFIG_TI_CPSW=y
-+# CONFIG_TI_CPTS is not set
-+CONFIG_NET_VENDOR_WIZNET=y
-+# CONFIG_WIZNET_W5100 is not set
-+# CONFIG_WIZNET_W5300 is not set
-+CONFIG_PHYLIB=y
-+
-+#
-+# MII PHY device drivers
-+#
-+# CONFIG_AT803X_PHY is not set
-+# CONFIG_AMD_PHY is not set
-+# CONFIG_MARVELL_PHY is not set
-+# CONFIG_DAVICOM_PHY is not set
-+# CONFIG_QSEMI_PHY is not set
-+# CONFIG_LXT_PHY is not set
-+# CONFIG_CICADA_PHY is not set
-+# CONFIG_VITESSE_PHY is not set
-+CONFIG_SMSC_PHY=y
-+# CONFIG_BROADCOM_PHY is not set
-+# CONFIG_BCM87XX_PHY is not set
-+# CONFIG_ICPLUS_PHY is not set
-+# CONFIG_REALTEK_PHY is not set
-+# CONFIG_NATIONAL_PHY is not set
-+# CONFIG_STE10XP is not set
-+# CONFIG_LSI_ET1011C_PHY is not set
-+# CONFIG_MICREL_PHY is not set
-+# CONFIG_FIXED_PHY is not set
-+# CONFIG_MDIO_BITBANG is not set
-+# CONFIG_MDIO_BUS_MUX_GPIO is not set
-+# CONFIG_MDIO_BUS_MUX_MMIOREG is not set
-+# CONFIG_MICREL_KS8995MA is not set
-+# CONFIG_PPP is not set
-+# CONFIG_SLIP is not set
-+
-+#
-+# USB Network Adapters
-+#
-+# CONFIG_USB_CATC is not set
-+# CONFIG_USB_KAWETH is not set
-+# CONFIG_USB_PEGASUS is not set
-+# CONFIG_USB_RTL8150 is not set
- CONFIG_USB_USBNET=y
-+CONFIG_USB_NET_AX8817X=y
-+CONFIG_USB_NET_CDCETHER=y
-+# CONFIG_USB_NET_CDC_EEM is not set
-+CONFIG_USB_NET_CDC_NCM=y
-+# CONFIG_USB_NET_CDC_MBIM is not set
-+# CONFIG_USB_NET_DM9601 is not set
-+# CONFIG_USB_NET_SMSC75XX is not set
- CONFIG_USB_NET_SMSC95XX=y
-+# CONFIG_USB_NET_GL620A is not set
-+CONFIG_USB_NET_NET1080=y
-+# CONFIG_USB_NET_PLUSB is not set
-+# CONFIG_USB_NET_MCS7830 is not set
-+# CONFIG_USB_NET_RNDIS_HOST is not set
-+CONFIG_USB_NET_CDC_SUBSET=y
- CONFIG_USB_ALI_M5632=y
- CONFIG_USB_AN2720=y
-+CONFIG_USB_BELKIN=y
-+CONFIG_USB_ARMLINUX=y
- CONFIG_USB_EPSON2888=y
- CONFIG_USB_KC2190=y
-+CONFIG_USB_NET_ZAURUS=y
-+# CONFIG_USB_NET_CX82310_ETH is not set
-+# CONFIG_USB_NET_KALMIA is not set
-+# CONFIG_USB_NET_QMI_WWAN is not set
-+# CONFIG_USB_NET_INT51X1 is not set
-+# CONFIG_USB_IPHETH is not set
-+# CONFIG_USB_SIERRA_NET is not set
-+# CONFIG_USB_VL600 is not set
-+CONFIG_WLAN=y
-+# CONFIG_LIBERTAS_THINFIRM is not set
-+# CONFIG_AT76C50X_USB is not set
-+# CONFIG_USB_ZD1201 is not set
-+# CONFIG_USB_NET_RNDIS_WLAN is not set
-+# CONFIG_RTL8187 is not set
-+# CONFIG_MAC80211_HWSIM is not set
-+# CONFIG_ATH_CARDS is not set
-+# CONFIG_B43 is not set
-+# CONFIG_B43LEGACY is not set
-+# CONFIG_BRCMFMAC is not set
-+# CONFIG_HOSTAP is not set
-+CONFIG_LIBERTAS=m
-+CONFIG_LIBERTAS_USB=m
-+CONFIG_LIBERTAS_SDIO=m
-+# CONFIG_LIBERTAS_SPI is not set
-+CONFIG_LIBERTAS_DEBUG=y
-+# CONFIG_LIBERTAS_MESH is not set
-+# CONFIG_P54_COMMON is not set
-+# CONFIG_RT2X00 is not set
-+# CONFIG_RTL8192CU is not set
-+# CONFIG_WL_TI is not set
-+# CONFIG_ZD1211RW is not set
-+# CONFIG_MWIFIEX is not set
-+
-+#
-+# Enable WiMAX (Networking options) to see the WiMAX drivers
-+#
-+# CONFIG_WAN is not set
-+# CONFIG_ISDN is not set
-+
-+#
-+# Input device support
-+#
-+CONFIG_INPUT=y
-+# CONFIG_INPUT_FF_MEMLESS is not set
-+# CONFIG_INPUT_POLLDEV is not set
-+# CONFIG_INPUT_SPARSEKMAP is not set
-+CONFIG_INPUT_MATRIXKMAP=y
-+
-+#
-+# Userland interfaces
-+#
-+CONFIG_INPUT_MOUSEDEV=y
-+CONFIG_INPUT_MOUSEDEV_PSAUX=y
-+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
- CONFIG_INPUT_JOYDEV=y
- CONFIG_INPUT_EVDEV=y
-+# CONFIG_INPUT_EVBUG is not set
-+
-+#
-+# Input Device Drivers
-+#
-+CONFIG_INPUT_KEYBOARD=y
-+# CONFIG_KEYBOARD_ADP5588 is not set
-+# CONFIG_KEYBOARD_ADP5589 is not set
-+CONFIG_KEYBOARD_ATKBD=y
-+# CONFIG_KEYBOARD_QT1070 is not set
-+# CONFIG_KEYBOARD_QT2160 is not set
-+# CONFIG_KEYBOARD_LKKBD is not set
- CONFIG_KEYBOARD_GPIO=y
-+# CONFIG_KEYBOARD_TCA6416 is not set
-+# CONFIG_KEYBOARD_TCA8418 is not set
-+# CONFIG_KEYBOARD_MATRIX is not set
-+# CONFIG_KEYBOARD_LM8333 is not set
-+# CONFIG_KEYBOARD_MAX7359 is not set
-+# CONFIG_KEYBOARD_MCS is not set
-+# CONFIG_KEYBOARD_MPR121 is not set
-+# CONFIG_KEYBOARD_NEWTON is not set
-+# CONFIG_KEYBOARD_OPENCORES is not set
-+# CONFIG_KEYBOARD_SAMSUNG is not set
-+# CONFIG_KEYBOARD_STOWAWAY is not set
-+# CONFIG_KEYBOARD_SUNKBD is not set
-+# CONFIG_KEYBOARD_OMAP4 is not set
- CONFIG_KEYBOARD_TWL4030=y
-+# CONFIG_KEYBOARD_XTKBD is not set
-+CONFIG_INPUT_MOUSE=y
-+CONFIG_MOUSE_PS2=y
-+CONFIG_MOUSE_PS2_ALPS=y
-+CONFIG_MOUSE_PS2_LOGIPS2PP=y
-+CONFIG_MOUSE_PS2_SYNAPTICS=y
-+CONFIG_MOUSE_PS2_TRACKPOINT=y
-+# CONFIG_MOUSE_PS2_ELANTECH is not set
-+# CONFIG_MOUSE_PS2_SENTELIC is not set
-+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
-+# CONFIG_MOUSE_SERIAL is not set
-+# CONFIG_MOUSE_APPLETOUCH is not set
-+# CONFIG_MOUSE_BCM5974 is not set
-+# CONFIG_MOUSE_VSXXXAA is not set
-+# CONFIG_MOUSE_GPIO is not set
-+# CONFIG_MOUSE_SYNAPTICS_I2C is not set
-+# CONFIG_MOUSE_SYNAPTICS_USB is not set
-+# CONFIG_INPUT_JOYSTICK is not set
-+# CONFIG_INPUT_TABLET is not set
- CONFIG_INPUT_TOUCHSCREEN=y
- CONFIG_TOUCHSCREEN_ADS7846=y
-+# CONFIG_TOUCHSCREEN_AD7877 is not set
-+# CONFIG_TOUCHSCREEN_AD7879 is not set
-+# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set
-+# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set
-+# CONFIG_TOUCHSCREEN_BU21013 is not set
-+# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set
-+# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set
-+# CONFIG_TOUCHSCREEN_DYNAPRO is not set
-+# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set
-+# CONFIG_TOUCHSCREEN_EETI is not set
-+# CONFIG_TOUCHSCREEN_EGALAX is not set
-+# CONFIG_TOUCHSCREEN_FUJITSU is not set
-+# CONFIG_TOUCHSCREEN_ILI210X is not set
-+# CONFIG_TOUCHSCREEN_GUNZE is not set
-+# CONFIG_TOUCHSCREEN_ELO is not set
-+# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
-+# CONFIG_TOUCHSCREEN_WACOM_I2C is not set
-+# CONFIG_TOUCHSCREEN_MAX11801 is not set
-+# CONFIG_TOUCHSCREEN_MCS5000 is not set
-+# CONFIG_TOUCHSCREEN_MMS114 is not set
-+# CONFIG_TOUCHSCREEN_MTOUCH is not set
-+# CONFIG_TOUCHSCREEN_INEXIO is not set
-+# CONFIG_TOUCHSCREEN_MK712 is not set
-+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
-+# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set
-+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
-+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
-+# CONFIG_TOUCHSCREEN_PIXCIR is not set
-+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
-+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
-+# CONFIG_TOUCHSCREEN_TSC_SERIO is not set
-+# CONFIG_TOUCHSCREEN_TSC2005 is not set
-+# CONFIG_TOUCHSCREEN_TSC2007 is not set
-+# CONFIG_TOUCHSCREEN_W90X900 is not set
-+# CONFIG_TOUCHSCREEN_ST1232 is not set
-+# CONFIG_TOUCHSCREEN_TPS6507X is not set
- CONFIG_INPUT_MISC=y
-+# CONFIG_INPUT_AD714X is not set
-+# CONFIG_INPUT_BMA150 is not set
-+# CONFIG_INPUT_MMA8450 is not set
-+# CONFIG_INPUT_MPU3050 is not set
-+# CONFIG_INPUT_GP2A is not set
-+# CONFIG_INPUT_GPIO_TILT_POLLED is not set
-+# CONFIG_INPUT_ATI_REMOTE2 is not set
-+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
-+# CONFIG_INPUT_KXTJ9 is not set
-+# CONFIG_INPUT_POWERMATE is not set
-+# CONFIG_INPUT_YEALINK is not set
-+# CONFIG_INPUT_CM109 is not set
- CONFIG_INPUT_TWL4030_PWRBUTTON=y
-+# CONFIG_INPUT_TWL4030_VIBRA is not set
-+# CONFIG_INPUT_UINPUT is not set
-+# CONFIG_INPUT_PCF8574 is not set
-+# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
-+# CONFIG_INPUT_ADXL34X is not set
-+# CONFIG_INPUT_CMA3000 is not set
-+
-+#
-+# Hardware I/O ports
-+#
-+CONFIG_SERIO=y
-+CONFIG_SERIO_SERPORT=y
-+CONFIG_SERIO_LIBPS2=y
-+# CONFIG_SERIO_RAW is not set
-+# CONFIG_SERIO_ALTERA_PS2 is not set
-+# CONFIG_SERIO_PS2MULT is not set
-+# CONFIG_SERIO_ARC_PS2 is not set
-+# CONFIG_GAMEPORT is not set
-+
-+#
-+# Character devices
-+#
-+CONFIG_VT=y
-+CONFIG_CONSOLE_TRANSLATIONS=y
-+CONFIG_VT_CONSOLE=y
-+CONFIG_VT_CONSOLE_SLEEP=y
-+CONFIG_HW_CONSOLE=y
- CONFIG_VT_HW_CONSOLE_BINDING=y
-+CONFIG_UNIX98_PTYS=y
-+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
- # CONFIG_LEGACY_PTYS is not set
-+# CONFIG_SERIAL_NONSTANDARD is not set
-+# CONFIG_N_GSM is not set
-+# CONFIG_TRACE_SINK is not set
-+CONFIG_DEVKMEM=y
-+
-+#
-+# Serial drivers
-+#
-+CONFIG_SERIAL_8250=y
-+CONFIG_SERIAL_8250_CONSOLE=y
- CONFIG_SERIAL_8250_NR_UARTS=32
-+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
- CONFIG_SERIAL_8250_EXTENDED=y
- CONFIG_SERIAL_8250_MANY_PORTS=y
- CONFIG_SERIAL_8250_SHARE_IRQ=y
- CONFIG_SERIAL_8250_DETECT_IRQ=y
- CONFIG_SERIAL_8250_RSA=y
-+# CONFIG_SERIAL_8250_DW is not set
-+# CONFIG_SERIAL_8250_EM is not set
-+
-+#
-+# Non-8250 serial port support
-+#
-+# CONFIG_SERIAL_MAX3100 is not set
-+# CONFIG_SERIAL_MAX310X is not set
-+CONFIG_SERIAL_CORE=y
-+CONFIG_SERIAL_CORE_CONSOLE=y
-+# CONFIG_SERIAL_OF_PLATFORM is not set
-+CONFIG_SERIAL_OMAP=y
-+CONFIG_SERIAL_OMAP_CONSOLE=y
-+# CONFIG_SERIAL_SCCNXP is not set
-+# CONFIG_SERIAL_TIMBERDALE is not set
-+# CONFIG_SERIAL_ALTERA_JTAGUART is not set
-+# CONFIG_SERIAL_ALTERA_UART is not set
-+# CONFIG_SERIAL_IFX6X60 is not set
-+# CONFIG_SERIAL_XILINX_PS_UART is not set
-+# CONFIG_SERIAL_ARC is not set
-+# CONFIG_TTY_PRINTK is not set
-+# CONFIG_HVC_DCC is not set
-+# CONFIG_IPMI_HANDLER is not set
- CONFIG_HW_RANDOM=y
-+# CONFIG_HW_RANDOM_TIMERIOMEM is not set
-+# CONFIG_HW_RANDOM_ATMEL is not set
-+CONFIG_HW_RANDOM_OMAP=y
-+# CONFIG_HW_RANDOM_EXYNOS is not set
-+# CONFIG_R3964 is not set
-+# CONFIG_RAW_DRIVER is not set
-+# CONFIG_TCG_TPM is not set
-+CONFIG_I2C=y
-+CONFIG_I2C_BOARDINFO=y
-+CONFIG_I2C_COMPAT=y
- CONFIG_I2C_CHARDEV=y
-+# CONFIG_I2C_MUX is not set
-+CONFIG_I2C_HELPER_AUTO=y
-+
-+#
-+# I2C Hardware Bus support
-+#
-+
-+#
-+# I2C system bus drivers (mostly embedded / system-on-chip)
-+#
-+# CONFIG_I2C_CBUS_GPIO is not set
-+# CONFIG_I2C_DESIGNWARE_PLATFORM is not set
-+# CONFIG_I2C_GPIO is not set
-+# CONFIG_I2C_OCORES is not set
-+CONFIG_I2C_OMAP=y
-+# CONFIG_I2C_PCA_PLATFORM is not set
-+# CONFIG_I2C_PXA_PCI is not set
-+# CONFIG_I2C_SIMTEC is not set
-+# CONFIG_I2C_XILINX is not set
-+
-+#
-+# External I2C/SMBus adapter drivers
-+#
-+# CONFIG_I2C_DIOLAN_U2C is not set
-+# CONFIG_I2C_PARPORT_LIGHT is not set
-+# CONFIG_I2C_TAOS_EVM is not set
-+# CONFIG_I2C_TINY_USB is not set
-+
-+#
-+# Other I2C/SMBus bus drivers
-+#
-+# CONFIG_I2C_STUB is not set
-+# CONFIG_I2C_DEBUG_CORE is not set
-+# CONFIG_I2C_DEBUG_ALGO is not set
-+# CONFIG_I2C_DEBUG_BUS is not set
- CONFIG_SPI=y
-+# CONFIG_SPI_DEBUG is not set
-+CONFIG_SPI_MASTER=y
-+
-+#
-+# SPI Master Controller Drivers
-+#
-+# CONFIG_SPI_ALTERA is not set
-+# CONFIG_SPI_BITBANG is not set
-+# CONFIG_SPI_GPIO is not set
-+# CONFIG_SPI_OC_TINY is not set
- CONFIG_SPI_OMAP24XX=y
-+# CONFIG_SPI_PXA2XX_PCI is not set
-+# CONFIG_SPI_SC18IS602 is not set
-+# CONFIG_SPI_XCOMM is not set
-+# CONFIG_SPI_XILINX is not set
-+# CONFIG_SPI_DESIGNWARE is not set
-+
-+#
-+# SPI Protocol Masters
-+#
-+# CONFIG_SPI_SPIDEV is not set
-+# CONFIG_SPI_TLE62X0 is not set
-+# CONFIG_HSI is not set
-+
-+#
-+# PPS support
-+#
-+# CONFIG_PPS is not set
-+
-+#
-+# PPS generators support
-+#
-+
-+#
-+# PTP clock support
-+#
-+# CONFIG_PTP_1588_CLOCK is not set
-+
-+#
-+# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.
-+#
-+# CONFIG_PTP_1588_CLOCK_PCH is not set
-+CONFIG_PINCTRL=y
-+
-+#
-+# Pin controllers
-+#
-+CONFIG_PINMUX=y
-+CONFIG_PINCONF=y
-+CONFIG_DEBUG_PINCTRL=y
- CONFIG_PINCTRL_SINGLE=y
-+# CONFIG_PINCTRL_EXYNOS4 is not set
-+# CONFIG_PINCTRL_EXYNOS5440 is not set
-+CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
-+CONFIG_ARCH_REQUIRE_GPIOLIB=y
-+CONFIG_GPIOLIB=y
-+CONFIG_OF_GPIO=y
- CONFIG_DEBUG_GPIO=y
- CONFIG_GPIO_SYSFS=y
-+
-+#
-+# Memory mapped GPIO drivers:
-+#
-+# CONFIG_GPIO_GENERIC_PLATFORM is not set
-+# CONFIG_GPIO_EM is not set
-+# CONFIG_GPIO_TS5500 is not set
-+
-+#
-+# I2C GPIO expanders:
-+#
-+# CONFIG_GPIO_MAX7300 is not set
-+# CONFIG_GPIO_MAX732X is not set
-+# CONFIG_GPIO_PCF857X is not set
-+# CONFIG_GPIO_SX150X is not set
- CONFIG_GPIO_TWL4030=y
-+# CONFIG_GPIO_ADP5588 is not set
-+# CONFIG_GPIO_ADNP is not set
-+
-+#
-+# PCI GPIO expanders:
-+#
-+
-+#
-+# SPI GPIO expanders:
-+#
-+# CONFIG_GPIO_MAX7301 is not set
-+# CONFIG_GPIO_MCP23S08 is not set
-+# CONFIG_GPIO_MC33880 is not set
-+# CONFIG_GPIO_74X164 is not set
-+
-+#
-+# AC97 GPIO expanders:
-+#
-+
-+#
-+# MODULbus GPIO expanders:
-+#
-+# CONFIG_GPIO_TPS65910 is not set
-+
-+#
-+# USB GPIO expanders:
-+#
- CONFIG_W1=y
-+CONFIG_W1_CON=y
-+
-+#
-+# 1-wire Bus Masters
-+#
-+# CONFIG_W1_MASTER_DS2490 is not set
-+# CONFIG_W1_MASTER_DS2482 is not set
-+# CONFIG_W1_MASTER_DS1WM is not set
-+# CONFIG_W1_MASTER_GPIO is not set
-+# CONFIG_HDQ_MASTER_OMAP is not set
-+
-+#
-+# 1-wire Slaves
-+#
-+# CONFIG_W1_SLAVE_THERM is not set
-+# CONFIG_W1_SLAVE_SMEM is not set
-+# CONFIG_W1_SLAVE_DS2408 is not set
-+# CONFIG_W1_SLAVE_DS2423 is not set
-+# CONFIG_W1_SLAVE_DS2431 is not set
-+# CONFIG_W1_SLAVE_DS2433 is not set
-+# CONFIG_W1_SLAVE_DS2760 is not set
-+# CONFIG_W1_SLAVE_DS2780 is not set
-+# CONFIG_W1_SLAVE_DS2781 is not set
-+# CONFIG_W1_SLAVE_DS28E04 is not set
-+# CONFIG_W1_SLAVE_BQ27000 is not set
- CONFIG_POWER_SUPPLY=y
-+# CONFIG_POWER_SUPPLY_DEBUG is not set
-+# CONFIG_PDA_POWER is not set
-+# CONFIG_TEST_POWER is not set
-+# CONFIG_BATTERY_DS2780 is not set
-+# CONFIG_BATTERY_DS2781 is not set
-+# CONFIG_BATTERY_DS2782 is not set
-+# CONFIG_BATTERY_SBS is not set
-+# CONFIG_BATTERY_BQ27x00 is not set
-+# CONFIG_BATTERY_MAX17040 is not set
-+# CONFIG_BATTERY_MAX17042 is not set
-+# CONFIG_CHARGER_MAX8903 is not set
-+# CONFIG_CHARGER_TWL4030 is not set
-+# CONFIG_CHARGER_LP8727 is not set
-+# CONFIG_CHARGER_GPIO is not set
-+# CONFIG_CHARGER_MANAGER is not set
-+# CONFIG_CHARGER_BQ2415X is not set
-+# CONFIG_CHARGER_SMB347 is not set
-+# CONFIG_POWER_RESET is not set
-+# CONFIG_POWER_AVS is not set
-+CONFIG_HWMON=y
-+# CONFIG_HWMON_VID is not set
-+# CONFIG_HWMON_DEBUG_CHIP is not set
-+
-+#
-+# Native drivers
-+#
-+# CONFIG_SENSORS_AD7314 is not set
-+# CONFIG_SENSORS_AD7414 is not set
-+# CONFIG_SENSORS_AD7418 is not set
-+# CONFIG_SENSORS_ADCXX is not set
-+# CONFIG_SENSORS_ADM1021 is not set
-+# CONFIG_SENSORS_ADM1025 is not set
-+# CONFIG_SENSORS_ADM1026 is not set
-+# CONFIG_SENSORS_ADM1029 is not set
-+# CONFIG_SENSORS_ADM1031 is not set
-+# CONFIG_SENSORS_ADM9240 is not set
-+# CONFIG_SENSORS_ADT7410 is not set
-+# CONFIG_SENSORS_ADT7411 is not set
-+# CONFIG_SENSORS_ADT7462 is not set
-+# CONFIG_SENSORS_ADT7470 is not set
-+# CONFIG_SENSORS_ADT7475 is not set
-+# CONFIG_SENSORS_ASC7621 is not set
-+# CONFIG_SENSORS_ATXP1 is not set
-+# CONFIG_SENSORS_DS620 is not set
-+# CONFIG_SENSORS_DS1621 is not set
-+# CONFIG_SENSORS_F71805F is not set
-+# CONFIG_SENSORS_F71882FG is not set
-+# CONFIG_SENSORS_F75375S is not set
-+# CONFIG_SENSORS_G760A is not set
-+# CONFIG_SENSORS_GL518SM is not set
-+# CONFIG_SENSORS_GL520SM is not set
-+# CONFIG_SENSORS_GPIO_FAN is not set
-+# CONFIG_SENSORS_HIH6130 is not set
-+# CONFIG_SENSORS_IT87 is not set
-+# CONFIG_SENSORS_JC42 is not set
-+# CONFIG_SENSORS_LINEAGE is not set
-+# CONFIG_SENSORS_LM63 is not set
-+# CONFIG_SENSORS_LM70 is not set
-+# CONFIG_SENSORS_LM73 is not set
-+# CONFIG_SENSORS_LM75 is not set
-+# CONFIG_SENSORS_LM77 is not set
-+# CONFIG_SENSORS_LM78 is not set
-+# CONFIG_SENSORS_LM80 is not set
-+# CONFIG_SENSORS_LM83 is not set
-+# CONFIG_SENSORS_LM85 is not set
-+# CONFIG_SENSORS_LM87 is not set
-+# CONFIG_SENSORS_LM90 is not set
-+# CONFIG_SENSORS_LM92 is not set
-+# CONFIG_SENSORS_LM93 is not set
-+# CONFIG_SENSORS_LTC4151 is not set
-+# CONFIG_SENSORS_LTC4215 is not set
-+# CONFIG_SENSORS_LTC4245 is not set
-+# CONFIG_SENSORS_LTC4261 is not set
-+# CONFIG_SENSORS_LM95241 is not set
-+# CONFIG_SENSORS_LM95245 is not set
-+# CONFIG_SENSORS_MAX1111 is not set
-+# CONFIG_SENSORS_MAX16065 is not set
-+# CONFIG_SENSORS_MAX1619 is not set
-+# CONFIG_SENSORS_MAX1668 is not set
-+# CONFIG_SENSORS_MAX197 is not set
-+# CONFIG_SENSORS_MAX6639 is not set
-+# CONFIG_SENSORS_MAX6642 is not set
-+# CONFIG_SENSORS_MAX6650 is not set
-+# CONFIG_SENSORS_MCP3021 is not set
-+# CONFIG_SENSORS_NTC_THERMISTOR is not set
-+# CONFIG_SENSORS_PC87360 is not set
-+# CONFIG_SENSORS_PC87427 is not set
-+# CONFIG_SENSORS_PCF8591 is not set
-+# CONFIG_PMBUS is not set
-+# CONFIG_SENSORS_SHT15 is not set
-+# CONFIG_SENSORS_SHT21 is not set
-+# CONFIG_SENSORS_SMM665 is not set
-+# CONFIG_SENSORS_DME1737 is not set
-+# CONFIG_SENSORS_EMC1403 is not set
-+# CONFIG_SENSORS_EMC2103 is not set
-+# CONFIG_SENSORS_EMC6W201 is not set
-+# CONFIG_SENSORS_SMSC47M1 is not set
-+# CONFIG_SENSORS_SMSC47M192 is not set
-+# CONFIG_SENSORS_SMSC47B397 is not set
-+# CONFIG_SENSORS_SCH56XX_COMMON is not set
-+# CONFIG_SENSORS_SCH5627 is not set
-+# CONFIG_SENSORS_SCH5636 is not set
-+# CONFIG_SENSORS_ADS1015 is not set
-+# CONFIG_SENSORS_ADS7828 is not set
-+# CONFIG_SENSORS_ADS7871 is not set
-+# CONFIG_SENSORS_AMC6821 is not set
-+# CONFIG_SENSORS_INA2XX is not set
-+# CONFIG_SENSORS_THMC50 is not set
-+# CONFIG_SENSORS_TMP102 is not set
-+# CONFIG_SENSORS_TMP401 is not set
-+# CONFIG_SENSORS_TMP421 is not set
-+# CONFIG_SENSORS_VT1211 is not set
-+# CONFIG_SENSORS_W83781D is not set
-+# CONFIG_SENSORS_W83791D is not set
-+# CONFIG_SENSORS_W83792D is not set
-+# CONFIG_SENSORS_W83793 is not set
-+# CONFIG_SENSORS_W83795 is not set
-+# CONFIG_SENSORS_W83L785TS is not set
-+# CONFIG_SENSORS_W83L786NG is not set
-+# CONFIG_SENSORS_W83627HF is not set
-+# CONFIG_SENSORS_W83627EHF is not set
-+# CONFIG_THERMAL is not set
- CONFIG_WATCHDOG=y
-+CONFIG_WATCHDOG_CORE=y
-+# CONFIG_WATCHDOG_NOWAYOUT is not set
-+
-+#
-+# Watchdog Device Drivers
-+#
-+# CONFIG_SOFT_WATCHDOG is not set
-+# CONFIG_DW_WATCHDOG is not set
-+# CONFIG_MPCORE_WATCHDOG is not set
- CONFIG_OMAP_WATCHDOG=y
- CONFIG_TWL4030_WATCHDOG=y
-+# CONFIG_MAX63XX_WATCHDOG is not set
-+
-+#
-+# USB-based Watchdog Cards
-+#
-+# CONFIG_USBPCWATCHDOG is not set
-+CONFIG_SSB_POSSIBLE=y
-+
-+#
-+# Sonics Silicon Backplane
-+#
-+# CONFIG_SSB is not set
-+CONFIG_BCMA_POSSIBLE=y
-+
-+#
-+# Broadcom specific AMBA
-+#
-+# CONFIG_BCMA is not set
-+
-+#
-+# Multifunction device drivers
-+#
-+CONFIG_MFD_CORE=y
-+# CONFIG_MFD_88PM860X is not set
-+# CONFIG_MFD_88PM800 is not set
-+# CONFIG_MFD_88PM805 is not set
-+# CONFIG_MFD_SM501 is not set
-+# CONFIG_MFD_ASIC3 is not set
-+# CONFIG_MFD_TI_AM335X_TSCADC is not set
-+# CONFIG_HTC_EGPIO is not set
-+# CONFIG_HTC_PASIC3 is not set
-+# CONFIG_HTC_I2CPLD is not set
-+# CONFIG_MFD_LM3533 is not set
-+# CONFIG_TPS6105X is not set
-+# CONFIG_TPS65010 is not set
-+# CONFIG_TPS6507X is not set
- CONFIG_MFD_TPS65217=y
--CONFIG_REGULATOR_TWL4030=y
-+# CONFIG_MFD_TPS6586X is not set
-+CONFIG_MFD_TPS65910=y
-+# CONFIG_MFD_TPS65912_I2C is not set
-+# CONFIG_MFD_TPS65912_SPI is not set
-+# CONFIG_MFD_TPS80031 is not set
-+CONFIG_MENELAUS=y
-+CONFIG_TWL4030_CORE=y
-+# CONFIG_TWL4030_MADC is not set
-+CONFIG_TWL4030_POWER=y
-+CONFIG_MFD_TWL4030_AUDIO=y
-+# CONFIG_TWL6040_CORE is not set
-+# CONFIG_MFD_STMPE is not set
-+# CONFIG_MFD_TC3589X is not set
-+# CONFIG_MFD_TMIO is not set
-+# CONFIG_MFD_T7L66XB is not set
-+# CONFIG_MFD_SMSC is not set
-+# CONFIG_MFD_TC6387XB is not set
-+# CONFIG_MFD_TC6393XB is not set
-+# CONFIG_PMIC_DA903X is not set
-+# CONFIG_MFD_DA9052_SPI is not set
-+# CONFIG_MFD_DA9052_I2C is not set
-+# CONFIG_MFD_DA9055 is not set
-+# CONFIG_PMIC_ADP5520 is not set
-+# CONFIG_MFD_LP8788 is not set
-+# CONFIG_MFD_MAX77686 is not set
-+# CONFIG_MFD_MAX77693 is not set
-+# CONFIG_MFD_MAX8907 is not set
-+# CONFIG_MFD_MAX8925 is not set
-+# CONFIG_MFD_MAX8997 is not set
-+# CONFIG_MFD_MAX8998 is not set
-+# CONFIG_MFD_SEC_CORE is not set
-+# CONFIG_MFD_ARIZONA_I2C is not set
-+# CONFIG_MFD_ARIZONA_SPI is not set
-+# CONFIG_MFD_WM8400 is not set
-+# CONFIG_MFD_WM831X_I2C is not set
-+# CONFIG_MFD_WM831X_SPI is not set
-+# CONFIG_MFD_WM8350_I2C is not set
-+# CONFIG_MFD_WM8994 is not set
-+# CONFIG_MFD_PCF50633 is not set
-+# CONFIG_MFD_MC13XXX_SPI is not set
-+# CONFIG_MFD_MC13XXX_I2C is not set
-+# CONFIG_ABX500_CORE is not set
-+# CONFIG_EZX_PCAP is not set
-+# CONFIG_MFD_WL1273_CORE is not set
-+# CONFIG_MFD_TPS65090 is not set
-+# CONFIG_MFD_AAT2870_CORE is not set
-+# CONFIG_MFD_RC5T583 is not set
-+# CONFIG_MFD_SYSCON is not set
-+# CONFIG_MFD_PALMAS is not set
-+# CONFIG_MFD_VIPERBOARD is not set
-+# CONFIG_MFD_RETU is not set
-+# CONFIG_MFD_AS3711 is not set
-+CONFIG_REGULATOR=y
-+# CONFIG_REGULATOR_DEBUG is not set
-+# CONFIG_REGULATOR_DUMMY is not set
-+CONFIG_REGULATOR_FIXED_VOLTAGE=y
-+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
-+# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
-+# CONFIG_REGULATOR_GPIO is not set
-+# CONFIG_REGULATOR_AD5398 is not set
-+# CONFIG_REGULATOR_FAN53555 is not set
-+# CONFIG_REGULATOR_ISL6271A is not set
-+# CONFIG_REGULATOR_MAX1586 is not set
-+# CONFIG_REGULATOR_MAX8649 is not set
-+# CONFIG_REGULATOR_MAX8660 is not set
-+# CONFIG_REGULATOR_MAX8952 is not set
-+# CONFIG_REGULATOR_MAX8973 is not set
-+# CONFIG_REGULATOR_LP3971 is not set
-+# CONFIG_REGULATOR_LP3972 is not set
-+# CONFIG_REGULATOR_LP872X is not set
-+# CONFIG_REGULATOR_TPS51632 is not set
-+# CONFIG_REGULATOR_TPS62360 is not set
- CONFIG_REGULATOR_TPS65023=y
- CONFIG_REGULATOR_TPS6507X=y
- CONFIG_REGULATOR_TPS65217=y
-+# CONFIG_REGULATOR_TPS6524X is not set
-+CONFIG_REGULATOR_TPS65910=y
-+CONFIG_REGULATOR_TWL4030=y
-+# CONFIG_MEDIA_SUPPORT is not set
-+
-+#
-+# Graphics support
-+#
-+# CONFIG_DRM is not set
-+# CONFIG_VGASTATE is not set
-+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
- CONFIG_FB=y
- CONFIG_FIRMWARE_EDID=y
-+# CONFIG_FB_DDC is not set
-+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
-+CONFIG_FB_CFB_FILLRECT=m
-+CONFIG_FB_CFB_COPYAREA=m
-+CONFIG_FB_CFB_IMAGEBLIT=m
-+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
-+CONFIG_FB_SYS_FILLRECT=y
-+CONFIG_FB_SYS_COPYAREA=y
-+CONFIG_FB_SYS_IMAGEBLIT=y
-+# CONFIG_FB_FOREIGN_ENDIAN is not set
-+CONFIG_FB_SYS_FOPS=y
-+# CONFIG_FB_WMT_GE_ROPS is not set
-+CONFIG_FB_DEFERRED_IO=y
-+# CONFIG_FB_SVGALIB is not set
-+# CONFIG_FB_MACMODES is not set
-+# CONFIG_FB_BACKLIGHT is not set
- CONFIG_FB_MODE_HELPERS=y
- CONFIG_FB_TILEBLITTING=y
--CONFIG_FB_OMAP_LCD_VGA=y
-+
-+#
-+# Frame buffer hardware drivers
-+#
-+# CONFIG_FB_UVESA is not set
-+# CONFIG_FB_S1D13XXX is not set
-+# CONFIG_FB_TMIO is not set
-+# CONFIG_FB_SMSCUFX is not set
-+# CONFIG_FB_UDL is not set
-+# CONFIG_FB_VIRTUAL is not set
-+# CONFIG_FB_METRONOME is not set
-+# CONFIG_FB_BROADSHEET is not set
-+# CONFIG_FB_AUO_K190X is not set
-+CONFIG_FB_ST7735=y
-+CONFIG_OMAP2_VRFB=y
- CONFIG_OMAP2_DSS=m
-+# CONFIG_OMAP2_DSS_DEBUG is not set
-+# CONFIG_OMAP2_DSS_DEBUGFS is not set
-+CONFIG_OMAP2_DSS_DPI=y
- CONFIG_OMAP2_DSS_RFBI=y
-+CONFIG_OMAP2_DSS_VENC=y
-+CONFIG_OMAP4_DSS_HDMI=y
- CONFIG_OMAP2_DSS_SDI=y
- CONFIG_OMAP2_DSS_DSI=y
-+CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
-+CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y
- CONFIG_FB_OMAP2=m
-+CONFIG_FB_OMAP2_DEBUG_SUPPORT=y
-+CONFIG_FB_OMAP2_NUM_FBS=3
-+
-+#
-+# OMAP2/3 Display Device Drivers
-+#
- CONFIG_PANEL_GENERIC_DPI=m
-+# CONFIG_PANEL_TFP410 is not set
-+# CONFIG_PANEL_LGPHILIPS_LB035Q02 is not set
- CONFIG_PANEL_SHARP_LS037V7DW01=m
- CONFIG_PANEL_NEC_NL8048HL11_01B=m
-+# CONFIG_PANEL_PICODLP is not set
- CONFIG_PANEL_TAAL=m
- CONFIG_PANEL_TPO_TD043MTEA1=m
- CONFIG_PANEL_ACX565AKM=m
-+# CONFIG_PANEL_N8X0 is not set
-+# CONFIG_EXYNOS_VIDEO is not set
- CONFIG_BACKLIGHT_LCD_SUPPORT=y
- CONFIG_LCD_CLASS_DEVICE=y
-+# CONFIG_LCD_L4F00242T03 is not set
-+# CONFIG_LCD_LMS283GF05 is not set
-+# CONFIG_LCD_LTV350QV is not set
-+# CONFIG_LCD_ILI9320 is not set
-+# CONFIG_LCD_TDO24M is not set
-+# CONFIG_LCD_VGG2432A4 is not set
- CONFIG_LCD_PLATFORM=y
--CONFIG_DISPLAY_SUPPORT=y
-+# CONFIG_LCD_S6E63M0 is not set
-+# CONFIG_LCD_LD9040 is not set
-+# CONFIG_LCD_AMS369FG06 is not set
-+CONFIG_BACKLIGHT_CLASS_DEVICE=m
-+CONFIG_BACKLIGHT_GENERIC=m
-+# CONFIG_BACKLIGHT_ADP8860 is not set
-+# CONFIG_BACKLIGHT_ADP8870 is not set
-+# CONFIG_BACKLIGHT_LM3630 is not set
-+# CONFIG_BACKLIGHT_LM3639 is not set
-+# CONFIG_BACKLIGHT_LP855X is not set
-+# CONFIG_BACKLIGHT_PANDORA is not set
-+# CONFIG_BACKLIGHT_TPS65217 is not set
-+
-+#
-+# Console display driver support
-+#
-+CONFIG_DUMMY_CONSOLE=y
- CONFIG_FRAMEBUFFER_CONSOLE=y
-+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
- CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
- CONFIG_FONTS=y
- CONFIG_FONT_8x8=y
- CONFIG_FONT_8x16=y
-+# CONFIG_FONT_6x11 is not set
-+# CONFIG_FONT_7x14 is not set
-+# CONFIG_FONT_PEARL_8x8 is not set
-+# CONFIG_FONT_ACORN_8x8 is not set
-+# CONFIG_FONT_MINI_4x6 is not set
-+# CONFIG_FONT_SUN8x16 is not set
-+# CONFIG_FONT_SUN12x22 is not set
-+# CONFIG_FONT_10x18 is not set
- CONFIG_LOGO=y
-+CONFIG_LOGO_LINUX_MONO=y
-+CONFIG_LOGO_LINUX_VGA16=y
-+CONFIG_LOGO_LINUX_CLUT224=y
-+# CONFIG_FB_SSD1307 is not set
- CONFIG_SOUND=m
-+CONFIG_SOUND_OSS_CORE=y
-+CONFIG_SOUND_OSS_CORE_PRECLAIM=y
- CONFIG_SND=m
-+CONFIG_SND_TIMER=m
-+CONFIG_SND_PCM=m
-+CONFIG_SND_HWDEP=m
-+CONFIG_SND_RAWMIDI=m
-+CONFIG_SND_COMPRESS_OFFLOAD=m
-+CONFIG_SND_JACK=y
-+# CONFIG_SND_SEQUENCER is not set
-+CONFIG_SND_OSSEMUL=y
- CONFIG_SND_MIXER_OSS=m
- CONFIG_SND_PCM_OSS=m
-+CONFIG_SND_PCM_OSS_PLUGINS=y
-+# CONFIG_SND_HRTIMER is not set
-+# CONFIG_SND_DYNAMIC_MINORS is not set
-+CONFIG_SND_SUPPORT_OLD_API=y
-+CONFIG_SND_VERBOSE_PROCFS=y
- CONFIG_SND_VERBOSE_PRINTK=y
- CONFIG_SND_DEBUG=y
-+# CONFIG_SND_DEBUG_VERBOSE is not set
-+# CONFIG_SND_PCM_XRUN_DEBUG is not set
-+# CONFIG_SND_RAWMIDI_SEQ is not set
-+# CONFIG_SND_OPL3_LIB_SEQ is not set
-+# CONFIG_SND_OPL4_LIB_SEQ is not set
-+# CONFIG_SND_SBAWE_SEQ is not set
-+# CONFIG_SND_EMU10K1_SEQ is not set
-+CONFIG_SND_DRIVERS=y
-+# CONFIG_SND_DUMMY is not set
-+# CONFIG_SND_ALOOP is not set
-+# CONFIG_SND_MTPAV is not set
-+# CONFIG_SND_SERIAL_U16550 is not set
-+# CONFIG_SND_MPU401 is not set
-+CONFIG_SND_ARM=y
-+CONFIG_SND_SPI=y
-+CONFIG_SND_USB=y
- CONFIG_SND_USB_AUDIO=m
-+# CONFIG_SND_USB_UA101 is not set
-+# CONFIG_SND_USB_CAIAQ is not set
-+# CONFIG_SND_USB_6FIRE is not set
- CONFIG_SND_SOC=m
-+CONFIG_SND_SOC_DMAENGINE_PCM=y
-+# CONFIG_SND_DESIGNWARE_I2S is not set
- CONFIG_SND_OMAP_SOC=m
-+CONFIG_SND_OMAP_SOC_MCBSP=m
-+# CONFIG_SND_OMAP_SOC_N810 is not set
-+# CONFIG_SND_OMAP_SOC_RX51 is not set
-+# CONFIG_SND_OMAP_SOC_AM3517EVM is not set
-+# CONFIG_SND_OMAP_SOC_SDP3430 is not set
- CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m
-+# CONFIG_SND_OMAP_SOC_OMAP_HDMI is not set
- CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m
-+# CONFIG_SND_OMAP_SOC_ZOOM2 is not set
-+CONFIG_SND_SOC_I2C_AND_SPI=m
-+# CONFIG_SND_SOC_ALL_CODECS is not set
-+CONFIG_SND_SOC_TWL4030=m
-+# CONFIG_SND_SIMPLE_CARD is not set
-+# CONFIG_SOUND_PRIME is not set
-+
-+#
-+# HID support
-+#
-+CONFIG_HID=y
-+# CONFIG_HID_BATTERY_STRENGTH is not set
-+# CONFIG_HIDRAW is not set
-+# CONFIG_UHID is not set
-+CONFIG_HID_GENERIC=y
-+
-+#
-+# Special HID drivers
-+#
-+# CONFIG_HID_A4TECH is not set
-+# CONFIG_HID_ACRUX is not set
-+# CONFIG_HID_APPLE is not set
-+# CONFIG_HID_AUREAL is not set
-+# CONFIG_HID_BELKIN is not set
-+# CONFIG_HID_CHERRY is not set
-+# CONFIG_HID_CHICONY is not set
-+# CONFIG_HID_PRODIKEYS is not set
-+# CONFIG_HID_CYPRESS is not set
-+# CONFIG_HID_DRAGONRISE is not set
-+# CONFIG_HID_EMS_FF is not set
-+# CONFIG_HID_EZKEY is not set
-+# CONFIG_HID_HOLTEK is not set
-+# CONFIG_HID_KEYTOUCH is not set
-+# CONFIG_HID_KYE is not set
-+# CONFIG_HID_UCLOGIC is not set
-+# CONFIG_HID_WALTOP is not set
-+# CONFIG_HID_GYRATION is not set
-+# CONFIG_HID_TWINHAN is not set
-+# CONFIG_HID_KENSINGTON is not set
-+# CONFIG_HID_LCPOWER is not set
-+# CONFIG_HID_LENOVO_TPKBD is not set
-+# CONFIG_HID_LOGITECH is not set
-+# CONFIG_HID_MICROSOFT is not set
-+# CONFIG_HID_MONTEREY is not set
-+# CONFIG_HID_MULTITOUCH is not set
-+# CONFIG_HID_NTRIG is not set
-+# CONFIG_HID_ORTEK is not set
-+# CONFIG_HID_PANTHERLORD is not set
-+# CONFIG_HID_PETALYNX is not set
-+# CONFIG_HID_PICOLCD is not set
-+# CONFIG_HID_PRIMAX is not set
-+# CONFIG_HID_ROCCAT is not set
-+# CONFIG_HID_SAITEK is not set
-+# CONFIG_HID_SAMSUNG is not set
-+# CONFIG_HID_SONY is not set
-+# CONFIG_HID_SPEEDLINK is not set
-+# CONFIG_HID_SUNPLUS is not set
-+# CONFIG_HID_GREENASIA is not set
-+# CONFIG_HID_SMARTJOYPLUS is not set
-+# CONFIG_HID_TIVO is not set
-+# CONFIG_HID_TOPSEED is not set
-+# CONFIG_HID_THRUSTMASTER is not set
-+# CONFIG_HID_ZEROPLUS is not set
-+# CONFIG_HID_ZYDACRON is not set
-+# CONFIG_HID_SENSOR_HUB is not set
-+
-+#
-+# USB HID support
-+#
-+CONFIG_USB_HID=y
-+# CONFIG_HID_PID is not set
-+# CONFIG_USB_HIDDEV is not set
-+
-+#
-+# I2C HID support
-+#
-+# CONFIG_I2C_HID is not set
-+CONFIG_USB_ARCH_HAS_OHCI=y
-+CONFIG_USB_ARCH_HAS_EHCI=y
-+# CONFIG_USB_ARCH_HAS_XHCI is not set
-+CONFIG_USB_SUPPORT=y
-+CONFIG_USB_COMMON=y
-+CONFIG_USB_ARCH_HAS_HCD=y
- CONFIG_USB=y
- CONFIG_USB_DEBUG=y
- CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
--CONFIG_USB_DEVICEFS=y
-+
-+#
-+# Miscellaneous USB options
-+#
-+# CONFIG_USB_DYNAMIC_MINORS is not set
- CONFIG_USB_SUSPEND=y
-+# CONFIG_USB_OTG is not set
-+# CONFIG_USB_OTG_WHITELIST is not set
-+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
-+# CONFIG_USB_DWC3 is not set
- CONFIG_USB_MON=y
-+# CONFIG_USB_WUSB_CBAF is not set
-+
-+#
-+# USB Host Controller Drivers
-+#
-+# CONFIG_USB_C67X00_HCD is not set
-+# CONFIG_USB_EHCI_HCD is not set
-+# CONFIG_USB_OXU210HP_HCD is not set
-+# CONFIG_USB_ISP116X_HCD is not set
-+# CONFIG_USB_ISP1760_HCD is not set
-+# CONFIG_USB_ISP1362_HCD is not set
-+# CONFIG_USB_OHCI_HCD is not set
-+# CONFIG_USB_SL811_HCD is not set
-+# CONFIG_USB_R8A66597_HCD is not set
-+# CONFIG_USB_MUSB_HDRC is not set
-+# CONFIG_USB_CHIPIDEA is not set
-+# CONFIG_USB_RENESAS_USBHS is not set
-+
-+#
-+# USB Device Class drivers
-+#
-+# CONFIG_USB_ACM is not set
-+# CONFIG_USB_PRINTER is not set
- CONFIG_USB_WDM=y
-+# CONFIG_USB_TMC is not set
-+
-+#
-+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
-+#
-+
-+#
-+# also be needed; see USB_STORAGE Help for more info
-+#
- CONFIG_USB_STORAGE=y
--CONFIG_USB_LIBUSUAL=y
-+# CONFIG_USB_STORAGE_DEBUG is not set
-+# CONFIG_USB_STORAGE_REALTEK is not set
-+# CONFIG_USB_STORAGE_DATAFAB is not set
-+# CONFIG_USB_STORAGE_FREECOM is not set
-+# CONFIG_USB_STORAGE_ISD200 is not set
-+# CONFIG_USB_STORAGE_USBAT is not set
-+# CONFIG_USB_STORAGE_SDDR09 is not set
-+# CONFIG_USB_STORAGE_SDDR55 is not set
-+# CONFIG_USB_STORAGE_JUMPSHOT is not set
-+# CONFIG_USB_STORAGE_ALAUDA is not set
-+# CONFIG_USB_STORAGE_ONETOUCH is not set
-+# CONFIG_USB_STORAGE_KARMA is not set
-+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
-+# CONFIG_USB_STORAGE_ENE_UB6250 is not set
-+
-+#
-+# USB Imaging devices
-+#
-+# CONFIG_USB_MDC800 is not set
-+# CONFIG_USB_MICROTEK is not set
-+
-+#
-+# USB port drivers
-+#
-+# CONFIG_USB_SERIAL is not set
-+
-+#
-+# USB Miscellaneous drivers
-+#
-+# CONFIG_USB_EMI62 is not set
-+# CONFIG_USB_EMI26 is not set
-+# CONFIG_USB_ADUTUX is not set
-+# CONFIG_USB_SEVSEG is not set
-+# CONFIG_USB_RIO500 is not set
-+# CONFIG_USB_LEGOTOWER is not set
-+# CONFIG_USB_LCD is not set
-+# CONFIG_USB_LED is not set
-+# CONFIG_USB_CYPRESS_CY7C63 is not set
-+# CONFIG_USB_CYTHERM is not set
-+# CONFIG_USB_IDMOUSE is not set
-+# CONFIG_USB_FTDI_ELAN is not set
-+# CONFIG_USB_APPLEDISPLAY is not set
-+# CONFIG_USB_LD is not set
-+# CONFIG_USB_TRANCEVIBRATOR is not set
-+# CONFIG_USB_IOWARRIOR is not set
- CONFIG_USB_TEST=y
-+# CONFIG_USB_ISIGHTFW is not set
-+# CONFIG_USB_YUREX is not set
-+# CONFIG_USB_EZUSB_FX2 is not set
-+
-+#
-+# USB Physical Layer drivers
-+#
-+# CONFIG_OMAP_USB2 is not set
-+# CONFIG_USB_ISP1301 is not set
-+# CONFIG_USB_RCAR_PHY is not set
- CONFIG_USB_GADGET=y
- CONFIG_USB_GADGET_DEBUG=y
- CONFIG_USB_GADGET_DEBUG_FILES=y
- CONFIG_USB_GADGET_DEBUG_FS=y
-+CONFIG_USB_GADGET_VBUS_DRAW=2
-+CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
-+
-+#
-+# USB Peripheral Controller
-+#
-+# CONFIG_USB_FUSB300 is not set
-+# CONFIG_USB_R8A66597 is not set
-+# CONFIG_USB_MV_UDC is not set
-+# CONFIG_USB_M66592 is not set
-+# CONFIG_USB_NET2272 is not set
-+# CONFIG_USB_DUMMY_HCD is not set
-+CONFIG_USB_LIBCOMPOSITE=m
- CONFIG_USB_ZERO=m
-+# CONFIG_USB_AUDIO is not set
-+# CONFIG_USB_ETH is not set
-+# CONFIG_USB_G_NCM is not set
-+# CONFIG_USB_GADGETFS is not set
-+# CONFIG_USB_FUNCTIONFS is not set
-+# CONFIG_USB_MASS_STORAGE is not set
-+# CONFIG_USB_G_SERIAL is not set
-+# CONFIG_USB_MIDI_GADGET is not set
-+# CONFIG_USB_G_PRINTER is not set
-+# CONFIG_USB_CDC_COMPOSITE is not set
-+# CONFIG_USB_G_ACM_MS is not set
-+# CONFIG_USB_G_MULTI is not set
-+# CONFIG_USB_G_HID is not set
-+# CONFIG_USB_G_DBGP is not set
-+
-+#
-+# OTG and related infrastructure
-+#
-+# CONFIG_USB_GPIO_VBUS is not set
-+# CONFIG_USB_ULPI is not set
-+# CONFIG_NOP_USB_XCEIV is not set
- CONFIG_MMC=y
-+# CONFIG_MMC_DEBUG is not set
- CONFIG_MMC_UNSAFE_RESUME=y
-+# CONFIG_MMC_CLKGATE is not set
-+
-+#
-+# MMC/SD/SDIO Card Drivers
-+#
-+CONFIG_MMC_BLOCK=y
-+CONFIG_MMC_BLOCK_MINORS=8
-+CONFIG_MMC_BLOCK_BOUNCE=y
- CONFIG_SDIO_UART=y
-+# CONFIG_MMC_TEST is not set
-+
-+#
-+# MMC/SD/SDIO Host Controller Drivers
-+#
-+# CONFIG_MMC_SDHCI is not set
-+# CONFIG_MMC_SDHCI_PXAV3 is not set
-+# CONFIG_MMC_SDHCI_PXAV2 is not set
- CONFIG_MMC_OMAP=y
- CONFIG_MMC_OMAP_HS=y
-+# CONFIG_MMC_DW is not set
-+# CONFIG_MMC_VUB300 is not set
-+# CONFIG_MMC_USHC is not set
-+# CONFIG_MEMSTICK is not set
-+# CONFIG_NEW_LEDS is not set
-+# CONFIG_ACCESSIBILITY is not set
-+# CONFIG_EDAC is not set
-+CONFIG_RTC_LIB=y
- CONFIG_RTC_CLASS=y
-+CONFIG_RTC_HCTOSYS=y
-+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
-+# CONFIG_RTC_DEBUG is not set
-+
-+#
-+# RTC interfaces
-+#
-+CONFIG_RTC_INTF_SYSFS=y
-+CONFIG_RTC_INTF_PROC=y
-+CONFIG_RTC_INTF_DEV=y
-+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-+# CONFIG_RTC_DRV_TEST is not set
-+
-+#
-+# I2C RTC drivers
-+#
-+# CONFIG_RTC_DRV_DS1307 is not set
-+# CONFIG_RTC_DRV_DS1374 is not set
-+# CONFIG_RTC_DRV_DS1672 is not set
-+# CONFIG_RTC_DRV_DS3232 is not set
-+# CONFIG_RTC_DRV_MAX6900 is not set
-+# CONFIG_RTC_DRV_RS5C372 is not set
-+# CONFIG_RTC_DRV_ISL1208 is not set
-+# CONFIG_RTC_DRV_ISL12022 is not set
-+# CONFIG_RTC_DRV_X1205 is not set
-+# CONFIG_RTC_DRV_PCF8523 is not set
-+# CONFIG_RTC_DRV_PCF8563 is not set
-+# CONFIG_RTC_DRV_PCF8583 is not set
-+# CONFIG_RTC_DRV_M41T80 is not set
-+# CONFIG_RTC_DRV_BQ32K is not set
- CONFIG_RTC_DRV_TWL92330=y
- CONFIG_RTC_DRV_TWL4030=y
-+# CONFIG_RTC_DRV_TPS65910 is not set
-+# CONFIG_RTC_DRV_S35390A is not set
-+# CONFIG_RTC_DRV_FM3130 is not set
-+# CONFIG_RTC_DRV_RX8581 is not set
-+# CONFIG_RTC_DRV_RX8025 is not set
-+# CONFIG_RTC_DRV_EM3027 is not set
-+# CONFIG_RTC_DRV_RV3029C2 is not set
-+
-+#
-+# SPI RTC drivers
-+#
-+# CONFIG_RTC_DRV_M41T93 is not set
-+# CONFIG_RTC_DRV_M41T94 is not set
-+# CONFIG_RTC_DRV_DS1305 is not set
-+# CONFIG_RTC_DRV_DS1390 is not set
-+# CONFIG_RTC_DRV_MAX6902 is not set
-+# CONFIG_RTC_DRV_R9701 is not set
-+# CONFIG_RTC_DRV_RS5C348 is not set
-+# CONFIG_RTC_DRV_DS3234 is not set
-+# CONFIG_RTC_DRV_PCF2123 is not set
-+
-+#
-+# Platform RTC drivers
-+#
-+# CONFIG_RTC_DRV_CMOS is not set
-+# CONFIG_RTC_DRV_DS1286 is not set
-+# CONFIG_RTC_DRV_DS1511 is not set
-+# CONFIG_RTC_DRV_DS1553 is not set
-+# CONFIG_RTC_DRV_DS1742 is not set
-+# CONFIG_RTC_DRV_STK17TA8 is not set
-+# CONFIG_RTC_DRV_M48T86 is not set
-+# CONFIG_RTC_DRV_M48T35 is not set
-+# CONFIG_RTC_DRV_M48T59 is not set
-+# CONFIG_RTC_DRV_MSM6242 is not set
-+# CONFIG_RTC_DRV_BQ4802 is not set
-+# CONFIG_RTC_DRV_RP5C01 is not set
-+# CONFIG_RTC_DRV_V3020 is not set
-+# CONFIG_RTC_DRV_DS2404 is not set
-+
-+#
-+# on-CPU RTC drivers
-+#
-+# CONFIG_RTC_DRV_OMAP is not set
-+# CONFIG_RTC_DRV_SNVS is not set
- CONFIG_DMADEVICES=y
-+# CONFIG_DMADEVICES_DEBUG is not set
-+
-+#
-+# DMA Devices
-+#
-+# CONFIG_DW_DMAC is not set
-+# CONFIG_TIMB_DMA is not set
-+CONFIG_TI_EDMA=y
- CONFIG_DMA_OMAP=y
-+CONFIG_DMA_ENGINE=y
-+CONFIG_DMA_VIRTUAL_CHANNELS=y
-+
-+#
-+# DMA Clients
-+#
-+# CONFIG_NET_DMA is not set
-+# CONFIG_ASYNC_TX_DMA is not set
-+# CONFIG_DMATEST is not set
-+# CONFIG_AUXDISPLAY is not set
-+# CONFIG_UIO is not set
-+
-+#
-+# Virtio drivers
-+#
-+# CONFIG_VIRTIO_MMIO is not set
-+
-+#
-+# Microsoft Hyper-V guest support
-+#
-+# CONFIG_STAGING is not set
-+CONFIG_CLKDEV_LOOKUP=y
-+CONFIG_HAVE_CLK_PREPARE=y
-+CONFIG_COMMON_CLK=y
-+
-+#
-+# Common Clock Framework
-+#
-+# CONFIG_COMMON_CLK_DEBUG is not set
-+
-+#
-+# Hardware Spinlock drivers
-+#
-+# CONFIG_HWSPINLOCK_OMAP is not set
-+CONFIG_CLKSRC_MMIO=y
-+CONFIG_IOMMU_SUPPORT=y
-+CONFIG_OF_IOMMU=y
-+# CONFIG_OMAP_IOMMU is not set
-+
-+#
-+# Remoteproc drivers (EXPERIMENTAL)
-+#
-+# CONFIG_STE_MODEM_RPROC is not set
-+
-+#
-+# Rpmsg drivers (EXPERIMENTAL)
-+#
-+# CONFIG_VIRT_DRIVERS is not set
-+# CONFIG_PM_DEVFREQ is not set
-+# CONFIG_EXTCON is not set
-+# CONFIG_MEMORY is not set
-+# CONFIG_IIO is not set
-+# CONFIG_PWM is not set
-+# CONFIG_IPACK_BUS is not set
-+
-+#
-+# File systems
-+#
-+CONFIG_DCACHE_WORD_ACCESS=y
- CONFIG_EXT2_FS=y
-+# CONFIG_EXT2_FS_XATTR is not set
-+# CONFIG_EXT2_FS_XIP is not set
- CONFIG_EXT3_FS=y
-+CONFIG_EXT3_DEFAULTS_TO_ORDERED=y
- # CONFIG_EXT3_FS_XATTR is not set
- CONFIG_EXT4_FS=y
-+# CONFIG_EXT4_FS_POSIX_ACL is not set
-+# CONFIG_EXT4_FS_SECURITY is not set
-+# CONFIG_EXT4_DEBUG is not set
-+CONFIG_JBD=y
-+# CONFIG_JBD_DEBUG is not set
-+CONFIG_JBD2=y
-+# CONFIG_JBD2_DEBUG is not set
-+CONFIG_FS_MBCACHE=y
-+# CONFIG_REISERFS_FS is not set
-+# CONFIG_JFS_FS is not set
-+# CONFIG_XFS_FS is not set
-+# CONFIG_GFS2_FS is not set
-+# CONFIG_BTRFS_FS is not set
-+# CONFIG_NILFS2_FS is not set
-+CONFIG_FS_POSIX_ACL=y
-+CONFIG_FILE_LOCKING=y
-+CONFIG_FSNOTIFY=y
-+CONFIG_DNOTIFY=y
-+CONFIG_INOTIFY_USER=y
-+# CONFIG_FANOTIFY is not set
- CONFIG_QUOTA=y
-+# CONFIG_QUOTA_NETLINK_INTERFACE is not set
-+CONFIG_PRINT_QUOTA_WARNING=y
-+# CONFIG_QUOTA_DEBUG is not set
-+CONFIG_QUOTA_TREE=y
-+# CONFIG_QFMT_V1 is not set
- CONFIG_QFMT_V2=y
-+CONFIG_QUOTACTL=y
-+# CONFIG_AUTOFS4_FS is not set
-+# CONFIG_FUSE_FS is not set
-+
-+#
-+# Caches
-+#
-+# CONFIG_FSCACHE is not set
-+
-+#
-+# CD-ROM/DVD Filesystems
-+#
-+# CONFIG_ISO9660_FS is not set
-+# CONFIG_UDF_FS is not set
-+
-+#
-+# DOS/FAT/NT Filesystems
-+#
-+CONFIG_FAT_FS=y
- CONFIG_MSDOS_FS=y
- CONFIG_VFAT_FS=y
-+CONFIG_FAT_DEFAULT_CODEPAGE=437
-+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-+# CONFIG_NTFS_FS is not set
-+
-+#
-+# Pseudo filesystems
-+#
-+CONFIG_PROC_FS=y
-+CONFIG_PROC_SYSCTL=y
-+CONFIG_PROC_PAGE_MONITOR=y
-+CONFIG_SYSFS=y
- CONFIG_TMPFS=y
-+# CONFIG_TMPFS_POSIX_ACL is not set
-+# CONFIG_TMPFS_XATTR is not set
-+# CONFIG_HUGETLB_PAGE is not set
-+# CONFIG_CONFIGFS_FS is not set
-+CONFIG_MISC_FILESYSTEMS=y
-+# CONFIG_ADFS_FS is not set
-+# CONFIG_AFFS_FS is not set
-+# CONFIG_ECRYPT_FS is not set
-+# CONFIG_HFS_FS is not set
-+# CONFIG_HFSPLUS_FS is not set
-+# CONFIG_BEFS_FS is not set
-+# CONFIG_BFS_FS is not set
-+# CONFIG_EFS_FS is not set
- CONFIG_JFFS2_FS=y
-+CONFIG_JFFS2_FS_DEBUG=0
-+CONFIG_JFFS2_FS_WRITEBUFFER=y
-+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
- CONFIG_JFFS2_SUMMARY=y
- CONFIG_JFFS2_FS_XATTR=y
-+CONFIG_JFFS2_FS_POSIX_ACL=y
-+CONFIG_JFFS2_FS_SECURITY=y
- CONFIG_JFFS2_COMPRESSION_OPTIONS=y
-+CONFIG_JFFS2_ZLIB=y
- CONFIG_JFFS2_LZO=y
-+CONFIG_JFFS2_RTIME=y
- CONFIG_JFFS2_RUBIN=y
-+# CONFIG_JFFS2_CMODE_NONE is not set
-+CONFIG_JFFS2_CMODE_PRIORITY=y
-+# CONFIG_JFFS2_CMODE_SIZE is not set
-+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
- CONFIG_UBIFS_FS=y
-+# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
-+CONFIG_UBIFS_FS_LZO=y
-+CONFIG_UBIFS_FS_ZLIB=y
-+# CONFIG_LOGFS is not set
- CONFIG_CRAMFS=y
-+# CONFIG_SQUASHFS is not set
-+# CONFIG_VXFS_FS is not set
-+# CONFIG_MINIX_FS is not set
-+# CONFIG_OMFS_FS is not set
-+# CONFIG_HPFS_FS is not set
-+# CONFIG_QNX4FS_FS is not set
-+# CONFIG_QNX6FS_FS is not set
-+# CONFIG_ROMFS_FS is not set
-+# CONFIG_PSTORE is not set
-+# CONFIG_SYSV_FS is not set
-+# CONFIG_UFS_FS is not set
-+# CONFIG_F2FS_FS is not set
-+CONFIG_NETWORK_FILESYSTEMS=y
- CONFIG_NFS_FS=y
-+CONFIG_NFS_V2=y
- CONFIG_NFS_V3=y
- CONFIG_NFS_V3_ACL=y
- CONFIG_NFS_V4=y
-+# CONFIG_NFS_SWAP is not set
-+# CONFIG_NFS_V4_1 is not set
- CONFIG_ROOT_NFS=y
--CONFIG_PARTITION_ADVANCED=y
-+# CONFIG_NFS_USE_LEGACY_DNS is not set
-+CONFIG_NFS_USE_KERNEL_DNS=y
-+# CONFIG_NFSD is not set
-+CONFIG_LOCKD=y
-+CONFIG_LOCKD_V4=y
-+CONFIG_NFS_ACL_SUPPORT=y
-+CONFIG_NFS_COMMON=y
-+CONFIG_SUNRPC=y
-+CONFIG_SUNRPC_GSS=y
-+# CONFIG_SUNRPC_DEBUG is not set
-+# CONFIG_CEPH_FS is not set
-+# CONFIG_CIFS is not set
-+# CONFIG_NCP_FS is not set
-+# CONFIG_CODA_FS is not set
-+# CONFIG_AFS_FS is not set
-+CONFIG_NLS=y
-+CONFIG_NLS_DEFAULT="iso8859-1"
- CONFIG_NLS_CODEPAGE_437=y
-+# CONFIG_NLS_CODEPAGE_737 is not set
-+# CONFIG_NLS_CODEPAGE_775 is not set
-+# CONFIG_NLS_CODEPAGE_850 is not set
-+# CONFIG_NLS_CODEPAGE_852 is not set
-+# CONFIG_NLS_CODEPAGE_855 is not set
-+# CONFIG_NLS_CODEPAGE_857 is not set
-+# CONFIG_NLS_CODEPAGE_860 is not set
-+# CONFIG_NLS_CODEPAGE_861 is not set
-+# CONFIG_NLS_CODEPAGE_862 is not set
-+# CONFIG_NLS_CODEPAGE_863 is not set
-+# CONFIG_NLS_CODEPAGE_864 is not set
-+# CONFIG_NLS_CODEPAGE_865 is not set
-+# CONFIG_NLS_CODEPAGE_866 is not set
-+# CONFIG_NLS_CODEPAGE_869 is not set
-+# CONFIG_NLS_CODEPAGE_936 is not set
-+# CONFIG_NLS_CODEPAGE_950 is not set
-+# CONFIG_NLS_CODEPAGE_932 is not set
-+# CONFIG_NLS_CODEPAGE_949 is not set
-+# CONFIG_NLS_CODEPAGE_874 is not set
-+# CONFIG_NLS_ISO8859_8 is not set
-+# CONFIG_NLS_CODEPAGE_1250 is not set
-+# CONFIG_NLS_CODEPAGE_1251 is not set
-+# CONFIG_NLS_ASCII is not set
- CONFIG_NLS_ISO8859_1=y
-+# CONFIG_NLS_ISO8859_2 is not set
-+# CONFIG_NLS_ISO8859_3 is not set
-+# CONFIG_NLS_ISO8859_4 is not set
-+# CONFIG_NLS_ISO8859_5 is not set
-+# CONFIG_NLS_ISO8859_6 is not set
-+# CONFIG_NLS_ISO8859_7 is not set
-+# CONFIG_NLS_ISO8859_9 is not set
-+# CONFIG_NLS_ISO8859_13 is not set
-+# CONFIG_NLS_ISO8859_14 is not set
-+# CONFIG_NLS_ISO8859_15 is not set
-+# CONFIG_NLS_KOI8_R is not set
-+# CONFIG_NLS_KOI8_U is not set
-+# CONFIG_NLS_MAC_ROMAN is not set
-+# CONFIG_NLS_MAC_CELTIC is not set
-+# CONFIG_NLS_MAC_CENTEURO is not set
-+# CONFIG_NLS_MAC_CROATIAN is not set
-+# CONFIG_NLS_MAC_CYRILLIC is not set
-+# CONFIG_NLS_MAC_GAELIC is not set
-+# CONFIG_NLS_MAC_GREEK is not set
-+# CONFIG_NLS_MAC_ICELAND is not set
-+# CONFIG_NLS_MAC_INUIT is not set
-+# CONFIG_NLS_MAC_ROMANIAN is not set
-+# CONFIG_NLS_MAC_TURKISH is not set
-+# CONFIG_NLS_UTF8 is not set
-+
-+#
-+# Kernel hacking
-+#
- CONFIG_PRINTK_TIME=y
-+CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
-+CONFIG_ENABLE_WARN_DEPRECATED=y
-+CONFIG_ENABLE_MUST_CHECK=y
-+CONFIG_FRAME_WARN=1024
- CONFIG_MAGIC_SYSRQ=y
-+# CONFIG_STRIP_ASM_SYMS is not set
-+# CONFIG_READABLE_ASM is not set
-+# CONFIG_UNUSED_SYMBOLS is not set
-+CONFIG_DEBUG_FS=y
-+# CONFIG_HEADERS_CHECK is not set
-+# CONFIG_DEBUG_SECTION_MISMATCH is not set
- CONFIG_DEBUG_KERNEL=y
-+# CONFIG_DEBUG_SHIRQ is not set
-+# CONFIG_LOCKUP_DETECTOR is not set
-+# CONFIG_PANIC_ON_OOPS is not set
-+CONFIG_PANIC_ON_OOPS_VALUE=0
-+# CONFIG_DETECT_HUNG_TASK is not set
-+CONFIG_SCHED_DEBUG=y
- CONFIG_SCHEDSTATS=y
- CONFIG_TIMER_STATS=y
-+# CONFIG_DEBUG_OBJECTS is not set
-+# CONFIG_DEBUG_SLAB is not set
-+CONFIG_HAVE_DEBUG_KMEMLEAK=y
-+# CONFIG_DEBUG_KMEMLEAK is not set
-+# CONFIG_DEBUG_RT_MUTEXES is not set
-+# CONFIG_RT_MUTEX_TESTER is not set
-+CONFIG_DEBUG_SPINLOCK=y
-+CONFIG_DEBUG_MUTEXES=y
-+CONFIG_DEBUG_LOCK_ALLOC=y
- CONFIG_PROVE_LOCKING=y
--CONFIG_DEBUG_SPINLOCK_SLEEP=y
-+# CONFIG_PROVE_RCU is not set
-+# CONFIG_SPARSE_RCU_POINTER is not set
-+CONFIG_LOCKDEP=y
-+# CONFIG_LOCK_STAT is not set
-+# CONFIG_DEBUG_LOCKDEP is not set
-+CONFIG_TRACE_IRQFLAGS=y
-+# CONFIG_DEBUG_ATOMIC_SLEEP is not set
-+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-+CONFIG_STACKTRACE=y
-+# CONFIG_DEBUG_STACK_USAGE is not set
-+# CONFIG_DEBUG_KOBJECT is not set
-+# CONFIG_DEBUG_HIGHMEM is not set
- # CONFIG_DEBUG_BUGVERBOSE is not set
- CONFIG_DEBUG_INFO=y
--# CONFIG_RCU_CPU_STALL_DETECTOR is not set
-+# CONFIG_DEBUG_INFO_REDUCED is not set
-+# CONFIG_DEBUG_VM is not set
-+# CONFIG_DEBUG_WRITECOUNT is not set
-+# CONFIG_DEBUG_MEMORY_INIT is not set
-+# CONFIG_DEBUG_LIST is not set
-+# CONFIG_TEST_LIST_SORT is not set
-+# CONFIG_DEBUG_SG is not set
-+# CONFIG_DEBUG_NOTIFIERS is not set
-+# CONFIG_DEBUG_CREDENTIALS is not set
-+# CONFIG_BOOT_PRINTK_DELAY is not set
-+# CONFIG_RCU_TORTURE_TEST is not set
-+CONFIG_RCU_CPU_STALL_TIMEOUT=21
-+# CONFIG_RCU_CPU_STALL_INFO is not set
-+# CONFIG_RCU_TRACE is not set
-+# CONFIG_KPROBES_SANITY_TEST is not set
-+# CONFIG_BACKTRACE_SELF_TEST is not set
-+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
-+# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
-+# CONFIG_DEBUG_PER_CPU_MAPS is not set
-+# CONFIG_LKDTM is not set
-+# CONFIG_NOTIFIER_ERROR_INJECTION is not set
-+# CONFIG_FAULT_INJECTION is not set
-+# CONFIG_DEBUG_PAGEALLOC is not set
-+CONFIG_NOP_TRACER=y
-+CONFIG_HAVE_FUNCTION_TRACER=y
-+CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
-+CONFIG_HAVE_DYNAMIC_FTRACE=y
-+CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
-+CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
-+CONFIG_HAVE_C_RECORDMCOUNT=y
-+CONFIG_TRACE_CLOCK=y
-+CONFIG_RING_BUFFER=y
-+CONFIG_EVENT_TRACING=y
-+CONFIG_EVENT_POWER_TRACING_DEPRECATED=y
-+CONFIG_CONTEXT_SWITCH_TRACER=y
-+CONFIG_RING_BUFFER_ALLOW_SWAP=y
-+CONFIG_TRACING=y
-+CONFIG_TRACING_SUPPORT=y
-+CONFIG_FTRACE=y
-+# CONFIG_FUNCTION_TRACER is not set
-+# CONFIG_IRQSOFF_TRACER is not set
-+# CONFIG_SCHED_TRACER is not set
-+# CONFIG_ENABLE_DEFAULT_TRACERS is not set
-+# CONFIG_FTRACE_SYSCALLS is not set
-+CONFIG_BRANCH_PROFILE_NONE=y
-+# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
-+# CONFIG_PROFILE_ALL_BRANCHES is not set
-+# CONFIG_STACK_TRACER is not set
-+# CONFIG_BLK_DEV_IO_TRACE is not set
-+CONFIG_KPROBE_EVENT=y
-+CONFIG_PROBE_EVENTS=y
-+# CONFIG_RING_BUFFER_BENCHMARK is not set
-+# CONFIG_RBTREE_TEST is not set
-+# CONFIG_INTERVAL_TREE_TEST is not set
-+# CONFIG_DYNAMIC_DEBUG is not set
-+# CONFIG_DMA_API_DEBUG is not set
-+# CONFIG_ATOMIC64_SELFTEST is not set
-+# CONFIG_SAMPLES is not set
-+CONFIG_HAVE_ARCH_KGDB=y
-+# CONFIG_KGDB is not set
-+# CONFIG_TEST_KSTRTOX is not set
-+# CONFIG_STRICT_DEVMEM is not set
-+CONFIG_ARM_UNWIND=y
-+# CONFIG_DEBUG_USER is not set
-+# CONFIG_DEBUG_LL is not set
-+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
-+# CONFIG_ARM_KPROBES_TEST is not set
-+# CONFIG_PID_IN_CONTEXTIDR is not set
-+
-+#
-+# Security options
-+#
-+CONFIG_KEYS=y
-+# CONFIG_ENCRYPTED_KEYS is not set
-+# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
-+# CONFIG_SECURITY_DMESG_RESTRICT is not set
- CONFIG_SECURITY=y
-+# CONFIG_SECURITYFS is not set
-+# CONFIG_SECURITY_NETWORK is not set
-+# CONFIG_SECURITY_PATH is not set
-+# CONFIG_SECURITY_SMACK is not set
-+# CONFIG_SECURITY_TOMOYO is not set
-+# CONFIG_SECURITY_APPARMOR is not set
-+# CONFIG_SECURITY_YAMA is not set
-+# CONFIG_IMA is not set
-+# CONFIG_EVM is not set
-+CONFIG_DEFAULT_SECURITY_DAC=y
-+CONFIG_DEFAULT_SECURITY=""
-+CONFIG_CRYPTO=y
-+
-+#
-+# Crypto core or helper
-+#
-+CONFIG_CRYPTO_ALGAPI=y
-+CONFIG_CRYPTO_ALGAPI2=y
-+CONFIG_CRYPTO_AEAD2=y
-+CONFIG_CRYPTO_BLKCIPHER=m
-+CONFIG_CRYPTO_BLKCIPHER2=y
-+CONFIG_CRYPTO_HASH=y
-+CONFIG_CRYPTO_HASH2=y
-+CONFIG_CRYPTO_RNG2=y
-+CONFIG_CRYPTO_PCOMP2=y
-+CONFIG_CRYPTO_MANAGER=m
-+CONFIG_CRYPTO_MANAGER2=y
-+# CONFIG_CRYPTO_USER is not set
-+CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
-+# CONFIG_CRYPTO_GF128MUL is not set
-+# CONFIG_CRYPTO_NULL is not set
-+# CONFIG_CRYPTO_PCRYPT is not set
-+CONFIG_CRYPTO_WORKQUEUE=y
-+# CONFIG_CRYPTO_CRYPTD is not set
-+# CONFIG_CRYPTO_AUTHENC is not set
-+# CONFIG_CRYPTO_TEST is not set
-+
-+#
-+# Authenticated Encryption with Associated Data
-+#
-+# CONFIG_CRYPTO_CCM is not set
-+# CONFIG_CRYPTO_GCM is not set
-+# CONFIG_CRYPTO_SEQIV is not set
-+
-+#
-+# Block modes
-+#
-+# CONFIG_CRYPTO_CBC is not set
-+# CONFIG_CRYPTO_CTR is not set
-+# CONFIG_CRYPTO_CTS is not set
-+CONFIG_CRYPTO_ECB=m
-+# CONFIG_CRYPTO_LRW is not set
-+# CONFIG_CRYPTO_PCBC is not set
-+# CONFIG_CRYPTO_XTS is not set
-+
-+#
-+# Hash modes
-+#
-+# CONFIG_CRYPTO_HMAC is not set
-+# CONFIG_CRYPTO_XCBC is not set
-+# CONFIG_CRYPTO_VMAC is not set
-+
-+#
-+# Digest
-+#
-+CONFIG_CRYPTO_CRC32C=y
-+# CONFIG_CRYPTO_GHASH is not set
-+# CONFIG_CRYPTO_MD4 is not set
-+# CONFIG_CRYPTO_MD5 is not set
- CONFIG_CRYPTO_MICHAEL_MIC=y
-+# CONFIG_CRYPTO_RMD128 is not set
-+# CONFIG_CRYPTO_RMD160 is not set
-+# CONFIG_CRYPTO_RMD256 is not set
-+# CONFIG_CRYPTO_RMD320 is not set
-+# CONFIG_CRYPTO_SHA1 is not set
-+# CONFIG_CRYPTO_SHA1_ARM is not set
-+CONFIG_CRYPTO_SHA256=m
-+# CONFIG_CRYPTO_SHA512 is not set
-+# CONFIG_CRYPTO_TGR192 is not set
-+# CONFIG_CRYPTO_WP512 is not set
-+
-+#
-+# Ciphers
-+#
-+CONFIG_CRYPTO_AES=y
-+# CONFIG_CRYPTO_AES_ARM is not set
-+# CONFIG_CRYPTO_ANUBIS is not set
-+CONFIG_CRYPTO_ARC4=m
-+# CONFIG_CRYPTO_BLOWFISH is not set
-+# CONFIG_CRYPTO_CAMELLIA is not set
-+# CONFIG_CRYPTO_CAST5 is not set
-+# CONFIG_CRYPTO_CAST6 is not set
-+# CONFIG_CRYPTO_DES is not set
-+# CONFIG_CRYPTO_FCRYPT is not set
-+# CONFIG_CRYPTO_KHAZAD is not set
-+# CONFIG_CRYPTO_SALSA20 is not set
-+# CONFIG_CRYPTO_SEED is not set
-+# CONFIG_CRYPTO_SERPENT is not set
-+# CONFIG_CRYPTO_TEA is not set
-+# CONFIG_CRYPTO_TWOFISH is not set
-+
-+#
-+# Compression
-+#
-+CONFIG_CRYPTO_DEFLATE=y
-+# CONFIG_CRYPTO_ZLIB is not set
-+CONFIG_CRYPTO_LZO=y
-+
-+#
-+# Random Number Generation
-+#
- # CONFIG_CRYPTO_ANSI_CPRNG is not set
-+# CONFIG_CRYPTO_USER_API_HASH is not set
-+# CONFIG_CRYPTO_USER_API_SKCIPHER is not set
-+CONFIG_CRYPTO_HW=y
-+# CONFIG_CRYPTO_DEV_OMAP_SHAM is not set
-+# CONFIG_CRYPTO_DEV_OMAP_AES is not set
-+# CONFIG_ASYMMETRIC_KEY_TYPE is not set
-+CONFIG_BINARY_PRINTF=y
-+
-+#
-+# Library routines
-+#
-+CONFIG_BITREVERSE=y
-+CONFIG_GENERIC_STRNCPY_FROM_USER=y
-+CONFIG_GENERIC_STRNLEN_USER=y
-+CONFIG_GENERIC_PCI_IOMAP=y
-+CONFIG_GENERIC_IO=y
-+CONFIG_PERCPU_RWSEM=y
- CONFIG_CRC_CCITT=y
-+CONFIG_CRC16=y
- CONFIG_CRC_T10DIF=y
- CONFIG_CRC_ITU_T=y
-+CONFIG_CRC32=y
-+# CONFIG_CRC32_SELFTEST is not set
-+CONFIG_CRC32_SLICEBY8=y
-+# CONFIG_CRC32_SLICEBY4 is not set
-+# CONFIG_CRC32_SARWATE is not set
-+# CONFIG_CRC32_BIT is not set
- CONFIG_CRC7=y
- CONFIG_LIBCRC32C=y
--CONFIG_SOC_OMAP5=y
--CONFIG_TI_DAVINCI_MDIO=y
--CONFIG_TI_DAVINCI_CPDMA=y
--CONFIG_TI_CPSW=y
-+# CONFIG_CRC8 is not set
-+CONFIG_ZLIB_INFLATE=y
-+CONFIG_ZLIB_DEFLATE=y
-+CONFIG_LZO_COMPRESS=y
-+CONFIG_LZO_DECOMPRESS=y
-+# CONFIG_XZ_DEC is not set
-+# CONFIG_XZ_DEC_BCJ is not set
-+CONFIG_DECOMPRESS_GZIP=y
-+CONFIG_HAS_IOMEM=y
-+CONFIG_HAS_IOPORT=y
-+CONFIG_HAS_DMA=y
-+CONFIG_CPU_RMAP=y
-+CONFIG_DQL=y
-+CONFIG_NLATTR=y
-+CONFIG_GENERIC_ATOMIC64=y
-+CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
-+CONFIG_AVERAGE=y
-+# CONFIG_CORDIC is not set
-+# CONFIG_DDR is not set
--- 
-1.8.1
-
diff --git a/patches/dma/0035-ARM-dts-Add-UART4-support-to-BeagleBone.patch b/patches/dma/0035-ARM-dts-Add-UART4-support-to-BeagleBone.patch
deleted file mode 100644
index f0c7bcbf9eca0b8fd26fd881e68d615af7c3308a..0000000000000000000000000000000000000000
--- a/patches/dma/0035-ARM-dts-Add-UART4-support-to-BeagleBone.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From e4a3fff960727945dcdba05e1b1f7ae51e258395 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@ti.com>
-Date: Wed, 9 Jan 2013 16:57:15 -0500
-Subject: [PATCH 35/35] ARM: dts: Add UART4 support to BeagleBone
-
-Signed-off-by: Matt Porter <mporter@ti.com>
----
- arch/arm/boot/dts/am335x-bone.dts | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
-index 8f35a81..b338f5b 100644
---- a/arch/arm/boot/dts/am335x-bone.dts
-+++ b/arch/arm/boot/dts/am335x-bone.dts
-@@ -65,6 +65,10 @@
- 			status = "okay";
- 		};
- 
-+		uart5: serial@481a8000 {
-+			status = "okay";
-+		};
-+
- 		i2c1: i2c@44e0b000 {
- 			status = "okay";
- 			clock-frequency = <400000>;
--- 
-1.8.1
-
diff --git a/patches/drm/0001-am33xx-Add-clock-for-the-lcdc-DRM-driver.patch b/patches/drm/0001-am33xx-Add-clock-for-the-lcdc-DRM-driver.patch
deleted file mode 100644
index 1fa9488ce01171014bdd634ae817898d862ca846..0000000000000000000000000000000000000000
--- a/patches/drm/0001-am33xx-Add-clock-for-the-lcdc-DRM-driver.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From e3278cc8ae868a81e364dee4e49f47b8a3462411 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 8 Jan 2013 20:01:09 +0200
-Subject: [PATCH 01/11] am33xx: Add clock for the lcdc DRM driver
-
-Update the clocks with the lcdc DRM's driver definition.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/mach-omap2/cclock33xx_data.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
-index 743dce4..7e29317 100644
---- a/arch/arm/mach-omap2/cclock33xx_data.c
-+++ b/arch/arm/mach-omap2/cclock33xx_data.c
-@@ -952,6 +952,7 @@ static struct omap_clk am33xx_clks[] = {
- 	CLK("48300200.ehrpwm",	"tbclk",	&ehrpwm0_tbclk,	CK_AM33XX),
- 	CLK("48302200.ehrpwm",	"tbclk",	&ehrpwm1_tbclk,	CK_AM33XX),
- 	CLK("48304200.ehrpwm",	"tbclk",	&ehrpwm2_tbclk,	CK_AM33XX),
-+	CLK("4830e000.fb", 	"fck",		&lcd_gclk,	CK_AM33XX),
- };
- 
- 
--- 
-1.8.1
-
diff --git a/patches/drm/0002-drm-small-fix-in-drm_send_vblank_event.patch b/patches/drm/0002-drm-small-fix-in-drm_send_vblank_event.patch
deleted file mode 100644
index 46543cdde15a7bed3b640e43bddb28d4f65a115f..0000000000000000000000000000000000000000
--- a/patches/drm/0002-drm-small-fix-in-drm_send_vblank_event.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 73449ba8a8a1a9d174a5fdd7c53f6e0ac4d6e88a Mon Sep 17 00:00:00 2001
-From: Rob Clark <robdclark@gmail.com>
-Date: Mon, 10 Dec 2012 10:49:46 -0600
-Subject: [PATCH 02/11] drm: small fix in drm_send_vblank_event()
-
-Initialize e->pipe.. some drivers set this themselves, others do not.
-Setting it in drm_send_vblank_event() should help ensure more consistent
-behavior with the different drivers.
-
-Signed-off-by: Rob Clark <robdclark@gmail.com>
----
- drivers/gpu/drm/drm_irq.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
-index 19c01ca..9bb83a5 100644
---- a/drivers/gpu/drm/drm_irq.c
-+++ b/drivers/gpu/drm/drm_irq.c
-@@ -863,6 +863,7 @@ void drm_send_vblank_event(struct drm_device *dev, int crtc,
- 
- 		now = get_drm_timestamp();
- 	}
-+	e->pipe = crtc;
- 	send_vblank_event(dev, e, seq, &now);
- }
- EXPORT_SYMBOL(drm_send_vblank_event);
--- 
-1.8.1
-
diff --git a/patches/drm/0003-drm-cma-add-debugfs-helpers.patch b/patches/drm/0003-drm-cma-add-debugfs-helpers.patch
deleted file mode 100644
index 6fa2f7e6f6595eb176414a1f0509c512157016b9..0000000000000000000000000000000000000000
--- a/patches/drm/0003-drm-cma-add-debugfs-helpers.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-From a931db155fc75524660d5507795deb8eb4f784d8 Mon Sep 17 00:00:00 2001
-From: Rob Clark <robdclark@gmail.com>
-Date: Mon, 10 Dec 2012 10:46:43 -0600
-Subject: [PATCH 03/11] drm/cma: add debugfs helpers
-
-Add helper to display fb's which can be used directly in drm_info_list:
-
-static struct drm_info_list foo_debugfs_list[] = {
-		...
-		{ "fb",   drm_fb_cma_debugfs_show, 0 },
-};
-
-to display information about CMA fb objects, as well as a
-drm_gem_cma_describe() which can be used if the driver bothers to keep
-a list of CMA GEM objects.
-
-Signed-off-by: Rob Clark <robdclark@gmail.com>
----
- drivers/gpu/drm/drm_fb_cma_helper.c  | 53 ++++++++++++++++++++++++++++++++++++
- drivers/gpu/drm/drm_gem_cma_helper.c | 21 ++++++++++++++
- include/drm/drm_fb_cma_helper.h      |  5 ++++
- include/drm/drm_gem_cma_helper.h     |  4 +++
- 4 files changed, 83 insertions(+)
-
-diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c
-index fd9d0af..18866ee 100644
---- a/drivers/gpu/drm/drm_fb_cma_helper.c
-+++ b/drivers/gpu/drm/drm_fb_cma_helper.c
-@@ -180,6 +180,59 @@ struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb,
- }
- EXPORT_SYMBOL_GPL(drm_fb_cma_get_gem_obj);
- 
-+#ifdef CONFIG_DEBUG_FS
-+/**
-+ * drm_fb_cma_describe() - Helper to dump information about a single
-+ * CMA framebuffer object
-+ */
-+void drm_fb_cma_describe(struct drm_framebuffer *fb, struct seq_file *m)
-+{
-+	struct drm_fb_cma *fb_cma = to_fb_cma(fb);
-+	int i, n = drm_format_num_planes(fb->pixel_format);
-+
-+	seq_printf(m, "fb: %dx%d@%4.4s\n", fb->width, fb->height,
-+			(char *)&fb->pixel_format);
-+
-+	for (i = 0; i < n; i++) {
-+		seq_printf(m, "   %d: offset=%d pitch=%d, obj: ",
-+				i, fb->offsets[i], fb->pitches[i]);
-+		drm_gem_cma_describe(fb_cma->obj[i], m);
-+	}
-+}
-+EXPORT_SYMBOL_GPL(drm_fb_cma_describe);
-+
-+/**
-+ * drm_fb_cma_debugfs_show() - Helper to list CMA framebuffer objects
-+ * in debugfs.
-+ */
-+int drm_fb_cma_debugfs_show(struct seq_file *m, void *arg)
-+{
-+	struct drm_info_node *node = (struct drm_info_node *) m->private;
-+	struct drm_device *dev = node->minor->dev;
-+	struct drm_framebuffer *fb;
-+	int ret;
-+
-+	ret = mutex_lock_interruptible(&dev->mode_config.mutex);
-+	if (ret)
-+		return ret;
-+
-+	ret = mutex_lock_interruptible(&dev->struct_mutex);
-+	if (ret) {
-+		mutex_unlock(&dev->mode_config.mutex);
-+		return ret;
-+	}
-+
-+	list_for_each_entry(fb, &dev->mode_config.fb_list, head)
-+		drm_fb_cma_describe(fb, m);
-+
-+	mutex_unlock(&dev->struct_mutex);
-+	mutex_unlock(&dev->mode_config.mutex);
-+
-+	return 0;
-+}
-+EXPORT_SYMBOL_GPL(drm_fb_cma_debugfs_show);
-+#endif
-+
- static struct fb_ops drm_fbdev_cma_ops = {
- 	.owner		= THIS_MODULE,
- 	.fb_fillrect	= sys_fillrect,
-diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c
-index 1aa8fee..0a7e011 100644
---- a/drivers/gpu/drm/drm_gem_cma_helper.c
-+++ b/drivers/gpu/drm/drm_gem_cma_helper.c
-@@ -249,3 +249,24 @@ int drm_gem_cma_dumb_destroy(struct drm_file *file_priv,
- 	return drm_gem_handle_delete(file_priv, handle);
- }
- EXPORT_SYMBOL_GPL(drm_gem_cma_dumb_destroy);
-+
-+#ifdef CONFIG_DEBUG_FS
-+void drm_gem_cma_describe(struct drm_gem_cma_object *cma_obj, struct seq_file *m)
-+{
-+	struct drm_gem_object *obj = &cma_obj->base;
-+	struct drm_device *dev = obj->dev;
-+	uint64_t off = 0;
-+
-+	WARN_ON(!mutex_is_locked(&dev->struct_mutex));
-+
-+	if (obj->map_list.map)
-+		off = (uint64_t)obj->map_list.hash.key;
-+
-+	seq_printf(m, "%2d (%2d) %08llx %08Zx %p %d",
-+			obj->name, obj->refcount.refcount.counter,
-+			off, cma_obj->paddr, cma_obj->vaddr, obj->size);
-+
-+	seq_printf(m, "\n");
-+}
-+EXPORT_SYMBOL_GPL(drm_gem_cma_describe);
-+#endif
-diff --git a/include/drm/drm_fb_cma_helper.h b/include/drm/drm_fb_cma_helper.h
-index 76c7098..4a3fc24 100644
---- a/include/drm/drm_fb_cma_helper.h
-+++ b/include/drm/drm_fb_cma_helper.h
-@@ -23,5 +23,10 @@ struct drm_framebuffer *drm_fb_cma_create(struct drm_device *dev,
- struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb,
- 	unsigned int plane);
- 
-+#ifdef CONFIG_DEBUG_FS
-+void drm_fb_cma_describe(struct drm_framebuffer *fb, struct seq_file *m);
-+int drm_fb_cma_debugfs_show(struct seq_file *m, void *arg);
-+#endif
-+
- #endif
- 
-diff --git a/include/drm/drm_gem_cma_helper.h b/include/drm/drm_gem_cma_helper.h
-index f0f6b1a..63397ce 100644
---- a/include/drm/drm_gem_cma_helper.h
-+++ b/include/drm/drm_gem_cma_helper.h
-@@ -41,4 +41,8 @@ struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm,
- 
- extern const struct vm_operations_struct drm_gem_cma_vm_ops;
- 
-+#ifdef CONFIG_DEBUG_FS
-+void drm_gem_cma_describe(struct drm_gem_cma_object *obj, struct seq_file *m);
-+#endif
-+
- #endif /* __DRM_GEM_CMA_HELPER_H__ */
--- 
-1.8.1
-
diff --git a/patches/drm/0004-drm-i2c-encoder-helper-wrappers.patch b/patches/drm/0004-drm-i2c-encoder-helper-wrappers.patch
deleted file mode 100644
index 4f2fb1849cbc5694bea0383361eb844c4757db56..0000000000000000000000000000000000000000
--- a/patches/drm/0004-drm-i2c-encoder-helper-wrappers.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-From 7021055217e43579632dd7f7c2cc23b3e4ca5f1b Mon Sep 17 00:00:00 2001
-From: Rob Clark <robdclark@gmail.com>
-Date: Tue, 8 Jan 2013 17:50:48 -0600
-Subject: [PATCH 04/11] drm: i2c encoder helper wrappers
-
-Simplify life for drivers using an encoder-slave, so that they can make
-their drm_encoder_helper_funcs const, rather than needing to dynamically
-allocate and populate them.
-
-Signed-off-by: Rob Clark <robdclark@gmail.com>
----
- drivers/gpu/drm/drm_encoder_slave.c | 63 +++++++++++++++++++++++++++++++++++++
- include/drm/drm_encoder_slave.h     | 20 ++++++++++++
- 2 files changed, 83 insertions(+)
-
-diff --git a/drivers/gpu/drm/drm_encoder_slave.c b/drivers/gpu/drm/drm_encoder_slave.c
-index 63e7334..48c52f7 100644
---- a/drivers/gpu/drm/drm_encoder_slave.c
-+++ b/drivers/gpu/drm/drm_encoder_slave.c
-@@ -123,3 +123,66 @@ void drm_i2c_encoder_destroy(struct drm_encoder *drm_encoder)
- 	module_put(module);
- }
- EXPORT_SYMBOL(drm_i2c_encoder_destroy);
-+
-+/*
-+ * Wrapper fxns which can be plugged in to drm_encoder_helper_funcs:
-+ */
-+
-+static inline struct drm_encoder_slave_funcs *
-+get_slave_funcs(struct drm_encoder *enc)
-+{
-+	return to_encoder_slave(enc)->slave_funcs;
-+}
-+
-+void drm_i2c_encoder_dpms(struct drm_encoder *encoder, int mode)
-+{
-+	get_slave_funcs(encoder)->dpms(encoder, mode);
-+}
-+EXPORT_SYMBOL(drm_i2c_encoder_dpms);
-+
-+bool drm_i2c_encoder_mode_fixup(struct drm_encoder *encoder,
-+		const struct drm_display_mode *mode,
-+		struct drm_display_mode *adjusted_mode)
-+{
-+	return get_slave_funcs(encoder)->mode_fixup(encoder, mode, adjusted_mode);
-+}
-+EXPORT_SYMBOL(drm_i2c_encoder_mode_fixup);
-+
-+void drm_i2c_encoder_prepare(struct drm_encoder *encoder)
-+{
-+	drm_i2c_encoder_dpms(encoder, DRM_MODE_DPMS_OFF);
-+}
-+EXPORT_SYMBOL(drm_i2c_encoder_prepare);
-+
-+void drm_i2c_encoder_commit(struct drm_encoder *encoder)
-+{
-+	drm_i2c_encoder_dpms(encoder, DRM_MODE_DPMS_ON);
-+}
-+EXPORT_SYMBOL(drm_i2c_encoder_commit);
-+
-+void drm_i2c_encoder_mode_set(struct drm_encoder *encoder,
-+		struct drm_display_mode *mode,
-+		struct drm_display_mode *adjusted_mode)
-+{
-+	get_slave_funcs(encoder)->mode_set(encoder, mode, adjusted_mode);
-+}
-+EXPORT_SYMBOL(drm_i2c_encoder_mode_set);
-+
-+enum drm_connector_status drm_i2c_encoder_detect(struct drm_encoder *encoder,
-+	    struct drm_connector *connector)
-+{
-+	return get_slave_funcs(encoder)->detect(encoder, connector);
-+}
-+EXPORT_SYMBOL(drm_i2c_encoder_detect);
-+
-+void drm_i2c_encoder_save(struct drm_encoder *encoder)
-+{
-+	get_slave_funcs(encoder)->save(encoder);
-+}
-+EXPORT_SYMBOL(drm_i2c_encoder_save);
-+
-+void drm_i2c_encoder_restore(struct drm_encoder *encoder)
-+{
-+	get_slave_funcs(encoder)->restore(encoder);
-+}
-+EXPORT_SYMBOL(drm_i2c_encoder_restore);
-diff --git a/include/drm/drm_encoder_slave.h b/include/drm/drm_encoder_slave.h
-index b0c11a7..8b9cc36 100644
---- a/include/drm/drm_encoder_slave.h
-+++ b/include/drm/drm_encoder_slave.h
-@@ -159,4 +159,24 @@ static inline void drm_i2c_encoder_unregister(struct drm_i2c_encoder_driver *dri
- 
- void drm_i2c_encoder_destroy(struct drm_encoder *encoder);
- 
-+
-+/*
-+ * Wrapper fxns which can be plugged in to drm_encoder_helper_funcs:
-+ */
-+
-+void drm_i2c_encoder_dpms(struct drm_encoder *encoder, int mode);
-+bool drm_i2c_encoder_mode_fixup(struct drm_encoder *encoder,
-+		const struct drm_display_mode *mode,
-+		struct drm_display_mode *adjusted_mode);
-+void drm_i2c_encoder_prepare(struct drm_encoder *encoder);
-+void drm_i2c_encoder_commit(struct drm_encoder *encoder);
-+void drm_i2c_encoder_mode_set(struct drm_encoder *encoder,
-+		struct drm_display_mode *mode,
-+		struct drm_display_mode *adjusted_mode);
-+enum drm_connector_status drm_i2c_encoder_detect(struct drm_encoder *encoder,
-+	    struct drm_connector *connector);
-+void drm_i2c_encoder_save(struct drm_encoder *encoder);
-+void drm_i2c_encoder_restore(struct drm_encoder *encoder);
-+
-+
- #endif
--- 
-1.8.1
-
diff --git a/patches/drm/0005-drm-nouveau-use-i2c-encoder-helper-wrappers.patch b/patches/drm/0005-drm-nouveau-use-i2c-encoder-helper-wrappers.patch
deleted file mode 100644
index cb338f01d9f45882d5915eeb8c97ae728257037c..0000000000000000000000000000000000000000
--- a/patches/drm/0005-drm-nouveau-use-i2c-encoder-helper-wrappers.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From dd7246c74637c5ffd2ad8759df5ade134e8d1e1f Mon Sep 17 00:00:00 2001
-From: Rob Clark <robdclark@gmail.com>
-Date: Tue, 8 Jan 2013 19:19:13 -0600
-Subject: [PATCH 05/11] drm/nouveau: use i2c encoder helper wrappers
-
-Signed-off-by: Rob Clark <robdclark@gmail.com>
----
- drivers/gpu/drm/nouveau/nv04_tv.c | 39 +++++++++++++--------------------------
- 1 file changed, 13 insertions(+), 26 deletions(-)
-
-diff --git a/drivers/gpu/drm/nouveau/nv04_tv.c b/drivers/gpu/drm/nouveau/nv04_tv.c
-index 62e826a..4a69ccd 100644
---- a/drivers/gpu/drm/nouveau/nv04_tv.c
-+++ b/drivers/gpu/drm/nouveau/nv04_tv.c
-@@ -184,14 +184,23 @@ static const struct drm_encoder_funcs nv04_tv_funcs = {
- 	.destroy = nv04_tv_destroy,
- };
- 
-+static const struct drm_encoder_helper_funcs nv04_tv_helper_funcs = {
-+	.dpms = nv04_tv_dpms,
-+	.save = drm_i2c_encoder_save,
-+	.restore = drm_i2c_encoder_restore,
-+	.mode_fixup = drm_i2c_encoder_mode_fixup,
-+	.prepare = nv04_tv_prepare,
-+	.commit = nv04_tv_commit,
-+	.mode_set = nv04_tv_mode_set,
-+	.detect = drm_i2c_encoder_detect,
-+};
-+
- int
- nv04_tv_create(struct drm_connector *connector, struct dcb_output *entry)
- {
- 	struct nouveau_encoder *nv_encoder;
- 	struct drm_encoder *encoder;
- 	struct drm_device *dev = connector->dev;
--	struct drm_encoder_helper_funcs *hfuncs;
--	struct drm_encoder_slave_funcs *sfuncs;
- 	struct nouveau_drm *drm = nouveau_drm(dev);
- 	struct nouveau_i2c *i2c = nouveau_i2c(drm->device);
- 	struct nouveau_i2c_port *port = i2c->find(i2c, entry->i2c_index);
-@@ -207,17 +216,11 @@ nv04_tv_create(struct drm_connector *connector, struct dcb_output *entry)
- 	if (!nv_encoder)
- 		return -ENOMEM;
- 
--	hfuncs = kzalloc(sizeof(*hfuncs), GFP_KERNEL);
--	if (!hfuncs) {
--		ret = -ENOMEM;
--		goto fail_free;
--	}
--
- 	/* Initialize the common members */
- 	encoder = to_drm_encoder(nv_encoder);
- 
- 	drm_encoder_init(dev, encoder, &nv04_tv_funcs, DRM_MODE_ENCODER_TVDAC);
--	drm_encoder_helper_add(encoder, hfuncs);
-+	drm_encoder_helper_add(encoder, &nv04_tv_helper_funcs);
- 
- 	encoder->possible_crtcs = entry->heads;
- 	encoder->possible_clones = 0;
-@@ -230,30 +233,14 @@ nv04_tv_create(struct drm_connector *connector, struct dcb_output *entry)
- 	if (ret < 0)
- 		goto fail_cleanup;
- 
--	/* Fill the function pointers */
--	sfuncs = get_slave_funcs(encoder);
--
--	*hfuncs = (struct drm_encoder_helper_funcs) {
--		.dpms = nv04_tv_dpms,
--		.save = sfuncs->save,
--		.restore = sfuncs->restore,
--		.mode_fixup = sfuncs->mode_fixup,
--		.prepare = nv04_tv_prepare,
--		.commit = nv04_tv_commit,
--		.mode_set = nv04_tv_mode_set,
--		.detect = sfuncs->detect,
--	};
--
- 	/* Attach it to the specified connector. */
--	sfuncs->create_resources(encoder, connector);
-+	get_slave_funcs(encoder)->create_resources(encoder, connector);
- 	drm_mode_connector_attach_encoder(connector, encoder);
- 
- 	return 0;
- 
- fail_cleanup:
- 	drm_encoder_cleanup(encoder);
--	kfree(hfuncs);
--fail_free:
- 	kfree(nv_encoder);
- 	return ret;
- }
--- 
-1.8.1
-
diff --git a/patches/drm/0006-drm-i2c-give-i2c-it-s-own-Kconfig.patch b/patches/drm/0006-drm-i2c-give-i2c-it-s-own-Kconfig.patch
deleted file mode 100644
index 8a6c78dacc6ce709206be8f6730dfe09120cf8bd..0000000000000000000000000000000000000000
--- a/patches/drm/0006-drm-i2c-give-i2c-it-s-own-Kconfig.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From 3914e063e323fbd6e3f5ac15fb0c58bcf618e5ce Mon Sep 17 00:00:00 2001
-From: Rob Clark <robdclark@gmail.com>
-Date: Thu, 24 Jan 2013 15:39:19 -0600
-Subject: [PATCH 06/11] drm/i2c: give i2c it's own Kconfig
-
-Move this out of nouveau directory.  As we start to add more encoder
-slaves used by other drivers, it makes sense to put the Kconfig bits in
-one place.
-
-Signed-off-by: Rob Clark <robdclark@gmail.com>
----
- drivers/gpu/drm/Kconfig         |  2 ++
- drivers/gpu/drm/i2c/Kconfig     | 22 ++++++++++++++++++++++
- drivers/gpu/drm/nouveau/Kconfig | 23 -----------------------
- 3 files changed, 24 insertions(+), 23 deletions(-)
- create mode 100644 drivers/gpu/drm/i2c/Kconfig
-
-diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
-index 983201b..99b09e1 100644
---- a/drivers/gpu/drm/Kconfig
-+++ b/drivers/gpu/drm/Kconfig
-@@ -69,6 +69,8 @@ config DRM_KMS_CMA_HELPER
- 	help
- 	  Choose this if you need the KMS CMA helper functions
- 
-+source "drivers/gpu/drm/i2c/Kconfig"
-+
- config DRM_TDFX
- 	tristate "3dfx Banshee/Voodoo3+"
- 	depends on DRM && PCI
-diff --git a/drivers/gpu/drm/i2c/Kconfig b/drivers/gpu/drm/i2c/Kconfig
-new file mode 100644
-index 0000000..1611836
---- /dev/null
-+++ b/drivers/gpu/drm/i2c/Kconfig
-@@ -0,0 +1,22 @@
-+menu "I2C encoder or helper chips"
-+     depends on DRM && DRM_KMS_HELPER && I2C
-+
-+config DRM_I2C_CH7006
-+	tristate "Chrontel ch7006 TV encoder"
-+	default m if DRM_NOUVEAU
-+	help
-+	  Support for Chrontel ch7006 and similar TV encoders, found
-+	  on some nVidia video cards.
-+
-+	  This driver is currently only useful if you're also using
-+	  the nouveau driver.
-+
-+config DRM_I2C_SIL164
-+	tristate "Silicon Image sil164 TMDS transmitter"
-+	default m if DRM_NOUVEAU
-+	help
-+	  Support for sil164 and similar single-link (or dual-link
-+	  when used in pairs) TMDS transmitters, used in some nVidia
-+	  video cards.
-+
-+endmenu
-diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig
-index 8a55bee..47ccc1a 100644
---- a/drivers/gpu/drm/nouveau/Kconfig
-+++ b/drivers/gpu/drm/nouveau/Kconfig
-@@ -52,26 +52,3 @@ config DRM_NOUVEAU_BACKLIGHT
- 	help
- 	  Say Y here if you want to control the backlight of your display
- 	  (e.g. a laptop panel).
--
--menu "I2C encoder or helper chips"
--     depends on DRM && DRM_KMS_HELPER && I2C
--
--config DRM_I2C_CH7006
--	tristate "Chrontel ch7006 TV encoder"
--	default m if DRM_NOUVEAU
--	help
--	  Support for Chrontel ch7006 and similar TV encoders, found
--	  on some nVidia video cards.
--
--	  This driver is currently only useful if you're also using
--	  the nouveau driver.
--
--config DRM_I2C_SIL164
--	tristate "Silicon Image sil164 TMDS transmitter"
--	default m if DRM_NOUVEAU
--	help
--	  Support for sil164 and similar single-link (or dual-link
--	  when used in pairs) TMDS transmitters, used in some nVidia
--	  video cards.
--
--endmenu
--- 
-1.8.1
-
diff --git a/patches/drm/0007-drm-tilcdc-add-TI-LCD-Controller-DRM-driver-v4.patch b/patches/drm/0007-drm-tilcdc-add-TI-LCD-Controller-DRM-driver-v4.patch
deleted file mode 100644
index 315207ccb562df0d0ce330930953b5614a80454d..0000000000000000000000000000000000000000
--- a/patches/drm/0007-drm-tilcdc-add-TI-LCD-Controller-DRM-driver-v4.patch
+++ /dev/null
@@ -1,2093 +0,0 @@
-From 43b923e58f3c977f3dd70ba893f0b030e8f383f9 Mon Sep 17 00:00:00 2001
-From: Rob Clark <robdclark@gmail.com>
-Date: Tue, 8 Jan 2013 15:04:28 -0600
-Subject: [PATCH 07/11] drm/tilcdc: add TI LCD Controller DRM driver (v4)
-
-A simple DRM/KMS driver for the TI LCD Controller found in various
-smaller TI parts (AM33xx, OMAPL138, etc).  This driver uses the
-CMA helpers.  Currently only the TFP410 DVI encoder is supported
-(tested with beaglebone + DVI cape).  There are also various LCD
-displays, for which support can be added (as I get hw to test on),
-and an external i2c HDMI encoder found on some boards.
-
-The display controller supports a single CRTC.  And the encoder+
-connector are split out into sub-devices.  Depending on which LCD
-or external encoder is actually present, the appropriate output
-module(s) will be loaded.
-
-v1: original
-v2: fix fb refcnting and few other cleanups
-v3: get +/- vsync/hsync from timings rather than panel-info, add
-    option DT max-bandwidth field so driver doesn't attempt to
-    pick a display mode with too high memory bandwidth, and other
-    small cleanups
-v4: remove some unneeded stuff from panel-info struct, properly
-    set high bits for hfp/hsw/hbp for rev 2
-
-Signed-off-by: Rob Clark <robdclark@gmail.com>
----
- drivers/gpu/drm/Kconfig                |   2 +
- drivers/gpu/drm/Makefile               |   1 +
- drivers/gpu/drm/tilcdc/Kconfig         |  10 +
- drivers/gpu/drm/tilcdc/Makefile        |   8 +
- drivers/gpu/drm/tilcdc/tilcdc_crtc.c   | 602 ++++++++++++++++++++++++++++++++
- drivers/gpu/drm/tilcdc/tilcdc_drv.c    | 605 +++++++++++++++++++++++++++++++++
- drivers/gpu/drm/tilcdc/tilcdc_drv.h    | 150 ++++++++
- drivers/gpu/drm/tilcdc/tilcdc_regs.h   | 154 +++++++++
- drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 419 +++++++++++++++++++++++
- drivers/gpu/drm/tilcdc/tilcdc_tfp410.h |  26 ++
- 10 files changed, 1977 insertions(+)
- create mode 100644 drivers/gpu/drm/tilcdc/Kconfig
- create mode 100644 drivers/gpu/drm/tilcdc/Makefile
- create mode 100644 drivers/gpu/drm/tilcdc/tilcdc_crtc.c
- create mode 100644 drivers/gpu/drm/tilcdc/tilcdc_drv.c
- create mode 100644 drivers/gpu/drm/tilcdc/tilcdc_drv.h
- create mode 100644 drivers/gpu/drm/tilcdc/tilcdc_regs.h
- create mode 100644 drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
- create mode 100644 drivers/gpu/drm/tilcdc/tilcdc_tfp410.h
-
-diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
-index 99b09e1..6c322d6 100644
---- a/drivers/gpu/drm/Kconfig
-+++ b/drivers/gpu/drm/Kconfig
-@@ -214,3 +214,5 @@ source "drivers/gpu/drm/cirrus/Kconfig"
- source "drivers/gpu/drm/shmobile/Kconfig"
- 
- source "drivers/gpu/drm/tegra/Kconfig"
-+
-+source "drivers/gpu/drm/tilcdc/Kconfig"
-diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
-index 6f58c81..3af934d 100644
---- a/drivers/gpu/drm/Makefile
-+++ b/drivers/gpu/drm/Makefile
-@@ -50,4 +50,5 @@ obj-$(CONFIG_DRM_UDL) += udl/
- obj-$(CONFIG_DRM_AST) += ast/
- obj-$(CONFIG_DRM_SHMOBILE) +=shmobile/
- obj-$(CONFIG_DRM_TEGRA) += tegra/
-+obj-$(CONFIG_DRM_TILCDC)	+= tilcdc/
- obj-y			+= i2c/
-diff --git a/drivers/gpu/drm/tilcdc/Kconfig b/drivers/gpu/drm/tilcdc/Kconfig
-new file mode 100644
-index 0000000..ee9b592
---- /dev/null
-+++ b/drivers/gpu/drm/tilcdc/Kconfig
-@@ -0,0 +1,10 @@
-+config DRM_TILCDC
-+	tristate "DRM Support for TI LCDC Display Controller"
-+	depends on DRM && OF
-+	select DRM_KMS_HELPER
-+	select DRM_KMS_CMA_HELPER
-+	select DRM_GEM_CMA_HELPER
-+	help
-+	  Choose this option if you have an TI SoC with LCDC display
-+	  controller, for example AM33xx in beagle-bone, DA8xx, or
-+	  OMAP-L1xx.  This driver replaces the FB_DA8XX fbdev driver.
-diff --git a/drivers/gpu/drm/tilcdc/Makefile b/drivers/gpu/drm/tilcdc/Makefile
-new file mode 100644
-index 0000000..1359cc2
---- /dev/null
-+++ b/drivers/gpu/drm/tilcdc/Makefile
-@@ -0,0 +1,8 @@
-+ccflags-y := -Iinclude/drm -Werror
-+
-+tilcdc-y := \
-+	tilcdc_crtc.o \
-+	tilcdc_tfp410.o \
-+	tilcdc_drv.o
-+
-+obj-$(CONFIG_DRM_TILCDC)	+= tilcdc.o
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
-new file mode 100644
-index 0000000..5dd3c7d
---- /dev/null
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
-@@ -0,0 +1,602 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments
-+ * Author: Rob Clark <robdclark@gmail.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published by
-+ * the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-+ * more details.
-+ *
-+ * You should have received a copy of the GNU General Public License along with
-+ * this program.  If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+#include <linux/kfifo.h>
-+
-+#include "tilcdc_drv.h"
-+#include "tilcdc_regs.h"
-+
-+struct tilcdc_crtc {
-+	struct drm_crtc base;
-+
-+	const struct tilcdc_panel_info *info;
-+	uint32_t dirty;
-+	dma_addr_t start, end;
-+	struct drm_pending_vblank_event *event;
-+	int dpms;
-+	wait_queue_head_t frame_done_wq;
-+	bool frame_done;
-+
-+	/* fb currently set to scanout 0/1: */
-+	struct drm_framebuffer *scanout[2];
-+
-+	/* for deferred fb unref's: */
-+	DECLARE_KFIFO_PTR(unref_fifo, struct drm_framebuffer *);
-+	struct work_struct work;
-+};
-+#define to_tilcdc_crtc(x) container_of(x, struct tilcdc_crtc, base)
-+
-+static void unref_worker(struct work_struct *work)
-+{
-+	struct tilcdc_crtc *tilcdc_crtc = container_of(work, struct tilcdc_crtc, work);
-+	struct drm_device *dev = tilcdc_crtc->base.dev;
-+	struct drm_framebuffer *fb;
-+
-+	mutex_lock(&dev->mode_config.mutex);
-+	while (kfifo_get(&tilcdc_crtc->unref_fifo, &fb))
-+		drm_framebuffer_unreference(fb);
-+	mutex_unlock(&dev->mode_config.mutex);
-+}
-+
-+static void set_scanout(struct drm_crtc *crtc, int n)
-+{
-+	static const uint32_t base_reg[] = {
-+			LCDC_DMA_FB_BASE_ADDR_0_REG, LCDC_DMA_FB_BASE_ADDR_1_REG,
-+	};
-+	static const uint32_t ceil_reg[] = {
-+			LCDC_DMA_FB_CEILING_ADDR_0_REG, LCDC_DMA_FB_CEILING_ADDR_1_REG,
-+	};
-+	static const uint32_t stat[] = {
-+			LCDC_END_OF_FRAME0, LCDC_END_OF_FRAME1,
-+	};
-+	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
-+	struct drm_device *dev = crtc->dev;
-+
-+	pm_runtime_get_sync(dev->dev);
-+	tilcdc_write(dev, base_reg[n], tilcdc_crtc->start);
-+	tilcdc_write(dev, ceil_reg[n], tilcdc_crtc->end);
-+	if (tilcdc_crtc->scanout[n]) {
-+		if (kfifo_put(&tilcdc_crtc->unref_fifo,
-+				(const struct drm_framebuffer **)&tilcdc_crtc->scanout[n])) {
-+			struct tilcdc_drm_private *priv = dev->dev_private;
-+			queue_work(priv->wq, &tilcdc_crtc->work);
-+		} else {
-+			dev_err(dev->dev, "unref fifo full!\n");
-+			drm_framebuffer_unreference(tilcdc_crtc->scanout[n]);
-+		}
-+	}
-+	tilcdc_crtc->scanout[n] = crtc->fb;
-+	drm_framebuffer_reference(tilcdc_crtc->scanout[n]);
-+	tilcdc_crtc->dirty &= ~stat[n];
-+	pm_runtime_put_sync(dev->dev);
-+}
-+
-+static void update_scanout(struct drm_crtc *crtc)
-+{
-+	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
-+	struct drm_device *dev = crtc->dev;
-+	struct drm_framebuffer *fb = crtc->fb;
-+	struct drm_gem_cma_object *gem;
-+	unsigned int depth, bpp;
-+
-+	drm_fb_get_bpp_depth(fb->pixel_format, &depth, &bpp);
-+	gem = drm_fb_cma_get_gem_obj(fb, 0);
-+
-+	tilcdc_crtc->start = gem->paddr + fb->offsets[0] +
-+			(crtc->y * fb->pitches[0]) + (crtc->x * bpp/8);
-+
-+	tilcdc_crtc->end = tilcdc_crtc->start +
-+			(crtc->mode.vdisplay * fb->pitches[0]);
-+
-+	if (tilcdc_crtc->dpms == DRM_MODE_DPMS_ON) {
-+		/* already enabled, so just mark the frames that need
-+		 * updating and they will be updated on vblank:
-+		 */
-+		tilcdc_crtc->dirty |= LCDC_END_OF_FRAME0 | LCDC_END_OF_FRAME1;
-+		drm_vblank_get(dev, 0);
-+	} else {
-+		/* not enabled yet, so update registers immediately: */
-+		set_scanout(crtc, 0);
-+		set_scanout(crtc, 1);
-+	}
-+}
-+
-+static void start(struct drm_crtc *crtc)
-+{
-+	struct drm_device *dev = crtc->dev;
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+
-+	if (priv->rev == 2) {
-+		tilcdc_set(dev, LCDC_CLK_RESET_REG, LCDC_CLK_MAIN_RESET);
-+		msleep(1);
-+		tilcdc_clear(dev, LCDC_CLK_RESET_REG, LCDC_CLK_MAIN_RESET);
-+		msleep(1);
-+	}
-+
-+	tilcdc_set(dev, LCDC_DMA_CTRL_REG, LCDC_DUAL_FRAME_BUFFER_ENABLE);
-+	tilcdc_set(dev, LCDC_RASTER_CTRL_REG, LCDC_PALETTE_LOAD_MODE(DATA_ONLY));
-+	tilcdc_set(dev, LCDC_RASTER_CTRL_REG, LCDC_RASTER_ENABLE);
-+}
-+
-+static void stop(struct drm_crtc *crtc)
-+{
-+	struct drm_device *dev = crtc->dev;
-+
-+	tilcdc_clear(dev, LCDC_RASTER_CTRL_REG, LCDC_RASTER_ENABLE);
-+}
-+
-+static void tilcdc_crtc_destroy(struct drm_crtc *crtc)
-+{
-+	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
-+
-+	WARN_ON(tilcdc_crtc->dpms == DRM_MODE_DPMS_ON);
-+
-+	drm_crtc_cleanup(crtc);
-+	WARN_ON(!kfifo_is_empty(&tilcdc_crtc->unref_fifo));
-+	kfifo_free(&tilcdc_crtc->unref_fifo);
-+	kfree(tilcdc_crtc);
-+}
-+
-+static int tilcdc_crtc_page_flip(struct drm_crtc *crtc,
-+		struct drm_framebuffer *fb,
-+		struct drm_pending_vblank_event *event)
-+{
-+	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
-+	struct drm_device *dev = crtc->dev;
-+
-+	if (tilcdc_crtc->event) {
-+		dev_err(dev->dev, "already pending page flip!\n");
-+		return -EBUSY;
-+	}
-+
-+	crtc->fb = fb;
-+	tilcdc_crtc->event = event;
-+	update_scanout(crtc);
-+
-+	return 0;
-+}
-+
-+static void tilcdc_crtc_dpms(struct drm_crtc *crtc, int mode)
-+{
-+	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
-+	struct drm_device *dev = crtc->dev;
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+
-+	/* we really only care about on or off: */
-+	if (mode != DRM_MODE_DPMS_ON)
-+		mode = DRM_MODE_DPMS_OFF;
-+
-+	if (tilcdc_crtc->dpms == mode)
-+		return;
-+
-+	tilcdc_crtc->dpms = mode;
-+
-+	pm_runtime_get_sync(dev->dev);
-+
-+	if (mode == DRM_MODE_DPMS_ON) {
-+		pm_runtime_forbid(dev->dev);
-+		start(crtc);
-+	} else {
-+		tilcdc_crtc->frame_done = false;
-+		stop(crtc);
-+
-+		/* if necessary wait for framedone irq which will still come
-+		 * before putting things to sleep..
-+		 */
-+		if (priv->rev == 2) {
-+			int ret = wait_event_timeout(
-+					tilcdc_crtc->frame_done_wq,
-+					tilcdc_crtc->frame_done,
-+					msecs_to_jiffies(50));
-+			if (ret == 0)
-+				dev_err(dev->dev, "timeout waiting for framedone\n");
-+		}
-+		pm_runtime_allow(dev->dev);
-+	}
-+
-+	pm_runtime_put_sync(dev->dev);
-+}
-+
-+static bool tilcdc_crtc_mode_fixup(struct drm_crtc *crtc,
-+		const struct drm_display_mode *mode,
-+		struct drm_display_mode *adjusted_mode)
-+{
-+	return true;
-+}
-+
-+static void tilcdc_crtc_prepare(struct drm_crtc *crtc)
-+{
-+	tilcdc_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
-+}
-+
-+static void tilcdc_crtc_commit(struct drm_crtc *crtc)
-+{
-+	tilcdc_crtc_dpms(crtc, DRM_MODE_DPMS_ON);
-+}
-+
-+static int tilcdc_crtc_mode_set(struct drm_crtc *crtc,
-+		struct drm_display_mode *mode,
-+		struct drm_display_mode *adjusted_mode,
-+		int x, int y,
-+		struct drm_framebuffer *old_fb)
-+{
-+	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
-+	struct drm_device *dev = crtc->dev;
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+	const struct tilcdc_panel_info *info = tilcdc_crtc->info;
-+	uint32_t reg, hbp, hfp, hsw, vbp, vfp, vsw;
-+	int ret;
-+
-+	ret = tilcdc_crtc_mode_valid(crtc, mode);
-+	if (WARN_ON(ret))
-+		return ret;
-+
-+	if (WARN_ON(!info))
-+		return -EINVAL;
-+
-+	pm_runtime_get_sync(dev->dev);
-+
-+	/* Configure the Burst Size and fifo threshold of DMA: */
-+	reg = tilcdc_read(dev, LCDC_DMA_CTRL_REG) & ~0x00000770;
-+	switch (info->dma_burst_sz) {
-+	case 1:
-+		reg |= LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_1);
-+		break;
-+	case 2:
-+		reg |= LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_2);
-+		break;
-+	case 4:
-+		reg |= LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_4);
-+		break;
-+	case 8:
-+		reg |= LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_8);
-+		break;
-+	case 16:
-+		reg |= LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_16);
-+		break;
-+	default:
-+		return -EINVAL;
-+	}
-+	reg |= (info->fifo_th << 8);
-+	tilcdc_write(dev, LCDC_DMA_CTRL_REG, reg);
-+
-+	/* Configure timings: */
-+	hbp = mode->htotal - mode->hsync_end;
-+	hfp = mode->hsync_start - mode->hdisplay;
-+	hsw = mode->hsync_end - mode->hsync_start;
-+	vbp = mode->vtotal - mode->vsync_end;
-+	vfp = mode->vsync_start - mode->vdisplay;
-+	vsw = mode->vsync_end - mode->vsync_start;
-+
-+	DBG("%dx%d, hbp=%u, hfp=%u, hsw=%u, vbp=%u, vfp=%u, vsw=%u",
-+			mode->hdisplay, mode->vdisplay, hbp, hfp, hsw, vbp, vfp, vsw);
-+
-+	/* Configure the AC Bias Period and Number of Transitions per Interrupt: */
-+	reg = tilcdc_read(dev, LCDC_RASTER_TIMING_2_REG) & ~0x000fff00;
-+	reg |= LCDC_AC_BIAS_FREQUENCY(info->ac_bias) |
-+		LCDC_AC_BIAS_TRANSITIONS_PER_INT(info->ac_bias_intrpt);
-+	if (priv->rev == 2) {
-+		reg |= (hfp & 0x300) >> 8;
-+		reg |= (hbp & 0x300) >> 4;
-+		reg |= (hsw & 0x3c0) << 21;
-+	}
-+	tilcdc_write(dev, LCDC_RASTER_TIMING_2_REG, reg);
-+
-+	reg = (((mode->hdisplay >> 4) - 1) << 4) |
-+		((hbp & 0xff) << 24) |
-+		((hfp & 0xff) << 16) |
-+		((hsw & 0x3f) << 10);
-+	if (priv->rev == 2)
-+		reg |= (((mode->hdisplay >> 4) - 1) & 0x40) >> 3;
-+	tilcdc_write(dev, LCDC_RASTER_TIMING_0_REG, reg);
-+
-+	reg = ((mode->vdisplay - 1) & 0x3ff) |
-+		((vbp & 0xff) << 24) |
-+		((vfp & 0xff) << 16) |
-+		((vsw & 0x3f) << 10);
-+	tilcdc_write(dev, LCDC_RASTER_TIMING_1_REG, reg);
-+
-+	/* Configure display type: */
-+	reg = tilcdc_read(dev, LCDC_RASTER_CTRL_REG) &
-+		~(LCDC_TFT_MODE | LCDC_MONO_8BIT_MODE | LCDC_MONOCHROME_MODE |
-+			LCDC_V2_TFT_24BPP_MODE | LCDC_V2_TFT_24BPP_UNPACK | 0x000ff000);
-+	reg |= LCDC_TFT_MODE; /* no monochrome/passive support */
-+	if (info->tft_alt_mode)
-+		reg |= LCDC_TFT_ALT_ENABLE;
-+	if (priv->rev == 2) {
-+		unsigned int depth, bpp;
-+
-+		drm_fb_get_bpp_depth(crtc->fb->pixel_format, &depth, &bpp);
-+		switch (bpp) {
-+		case 16:
-+			break;
-+		case 32:
-+			reg |= LCDC_V2_TFT_24BPP_UNPACK;
-+			/* fallthrough */
-+		case 24:
-+			reg |= LCDC_V2_TFT_24BPP_MODE;
-+			break;
-+		default:
-+			dev_err(dev->dev, "invalid pixel format\n");
-+			return -EINVAL;
-+		}
-+	}
-+	reg |= info->fdd < 12;
-+	tilcdc_write(dev, LCDC_RASTER_CTRL_REG, reg);
-+
-+	if (info->invert_pxl_clk)
-+		tilcdc_set(dev, LCDC_RASTER_TIMING_2_REG, LCDC_INVERT_PIXEL_CLOCK);
-+	else
-+		tilcdc_clear(dev, LCDC_RASTER_TIMING_2_REG, LCDC_INVERT_PIXEL_CLOCK);
-+
-+	if (info->sync_ctrl)
-+		tilcdc_set(dev, LCDC_RASTER_TIMING_2_REG, LCDC_SYNC_CTRL);
-+	else
-+		tilcdc_clear(dev, LCDC_RASTER_TIMING_2_REG, LCDC_SYNC_CTRL);
-+
-+	if (info->sync_edge)
-+		tilcdc_set(dev, LCDC_RASTER_TIMING_2_REG, LCDC_SYNC_EDGE);
-+	else
-+		tilcdc_clear(dev, LCDC_RASTER_TIMING_2_REG, LCDC_SYNC_EDGE);
-+
-+	if (mode->flags & DRM_MODE_FLAG_NHSYNC)
-+		tilcdc_set(dev, LCDC_RASTER_TIMING_2_REG, LCDC_INVERT_HSYNC);
-+	else
-+		tilcdc_clear(dev, LCDC_RASTER_TIMING_2_REG, LCDC_INVERT_HSYNC);
-+
-+	if (mode->flags & DRM_MODE_FLAG_NVSYNC)
-+		tilcdc_set(dev, LCDC_RASTER_TIMING_2_REG, LCDC_INVERT_VSYNC);
-+	else
-+		tilcdc_clear(dev, LCDC_RASTER_TIMING_2_REG, LCDC_INVERT_VSYNC);
-+
-+	if (info->raster_order)
-+		tilcdc_set(dev, LCDC_RASTER_CTRL_REG, LCDC_RASTER_ORDER);
-+	else
-+		tilcdc_clear(dev, LCDC_RASTER_CTRL_REG, LCDC_RASTER_ORDER);
-+
-+
-+	update_scanout(crtc);
-+	tilcdc_crtc_update_clk(crtc);
-+
-+	pm_runtime_put_sync(dev->dev);
-+
-+	return 0;
-+}
-+
-+static int tilcdc_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
-+		struct drm_framebuffer *old_fb)
-+{
-+	update_scanout(crtc);
-+	return 0;
-+}
-+
-+static void tilcdc_crtc_load_lut(struct drm_crtc *crtc)
-+{
-+}
-+
-+static const struct drm_crtc_funcs tilcdc_crtc_funcs = {
-+		.destroy        = tilcdc_crtc_destroy,
-+		.set_config     = drm_crtc_helper_set_config,
-+		.page_flip      = tilcdc_crtc_page_flip,
-+};
-+
-+static const struct drm_crtc_helper_funcs tilcdc_crtc_helper_funcs = {
-+		.dpms           = tilcdc_crtc_dpms,
-+		.mode_fixup     = tilcdc_crtc_mode_fixup,
-+		.prepare        = tilcdc_crtc_prepare,
-+		.commit         = tilcdc_crtc_commit,
-+		.mode_set       = tilcdc_crtc_mode_set,
-+		.mode_set_base  = tilcdc_crtc_mode_set_base,
-+		.load_lut       = tilcdc_crtc_load_lut,
-+};
-+
-+int tilcdc_crtc_max_width(struct drm_crtc *crtc)
-+{
-+	struct drm_device *dev = crtc->dev;
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+	int max_width = 0;
-+
-+	if (priv->rev == 1)
-+		max_width = 1024;
-+	else if (priv->rev == 2)
-+		max_width = 2048;
-+
-+	return max_width;
-+}
-+
-+int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode)
-+{
-+	struct tilcdc_drm_private *priv = crtc->dev->dev_private;
-+	unsigned int bandwidth;
-+
-+	if (mode->hdisplay > tilcdc_crtc_max_width(crtc))
-+		return MODE_VIRTUAL_X;
-+
-+	/* width must be multiple of 16 */
-+	if (mode->hdisplay & 0xf)
-+		return MODE_VIRTUAL_X;
-+
-+	if (mode->vdisplay > 2048)
-+		return MODE_VIRTUAL_Y;
-+
-+	/* filter out modes that would require too much memory bandwidth: */
-+	bandwidth = mode->hdisplay * mode->vdisplay * drm_mode_vrefresh(mode);
-+	if (bandwidth > priv->max_bandwidth)
-+		return MODE_BAD;
-+
-+	return MODE_OK;
-+}
-+
-+void tilcdc_crtc_set_panel_info(struct drm_crtc *crtc,
-+		const struct tilcdc_panel_info *info)
-+{
-+	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
-+	tilcdc_crtc->info = info;
-+}
-+
-+void tilcdc_crtc_update_clk(struct drm_crtc *crtc)
-+{
-+	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
-+	struct drm_device *dev = crtc->dev;
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+	int dpms = tilcdc_crtc->dpms;
-+	unsigned int lcd_clk, div;
-+	int ret;
-+
-+	pm_runtime_get_sync(dev->dev);
-+
-+	if (dpms == DRM_MODE_DPMS_ON)
-+		tilcdc_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
-+
-+	/* in raster mode, minimum divisor is 2: */
-+	ret = clk_set_rate(priv->disp_clk, crtc->mode.clock * 1000 * 2);
-+	if (ret) {
-+		dev_err(dev->dev, "failed to set display clock rate to: %d\n",
-+				crtc->mode.clock);
-+		goto out;
-+	}
-+
-+	lcd_clk = clk_get_rate(priv->clk);
-+	div = lcd_clk / (crtc->mode.clock * 1000);
-+
-+	DBG("lcd_clk=%u, mode clock=%d, div=%u", lcd_clk, crtc->mode.clock, div);
-+	DBG("fck=%lu, dpll_disp_ck=%lu", clk_get_rate(priv->clk), clk_get_rate(priv->disp_clk));
-+
-+	/* Configure the LCD clock divisor. */
-+	tilcdc_write(dev, LCDC_CTRL_REG, LCDC_CLK_DIVISOR(div) |
-+			LCDC_RASTER_MODE);
-+
-+	if (priv->rev == 2)
-+		tilcdc_set(dev, LCDC_CLK_ENABLE_REG,
-+				LCDC_V2_DMA_CLK_EN | LCDC_V2_LIDD_CLK_EN |
-+				LCDC_V2_CORE_CLK_EN);
-+
-+	if (dpms == DRM_MODE_DPMS_ON)
-+		tilcdc_crtc_dpms(crtc, DRM_MODE_DPMS_ON);
-+
-+out:
-+	pm_runtime_put_sync(dev->dev);
-+}
-+
-+irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc)
-+{
-+	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
-+	struct drm_device *dev = crtc->dev;
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+	uint32_t stat = tilcdc_read_irqstatus(dev);
-+
-+	if ((stat & LCDC_SYNC_LOST) && (stat & LCDC_FIFO_UNDERFLOW)) {
-+		stop(crtc);
-+		dev_err(dev->dev, "error: %08x\n", stat);
-+		tilcdc_clear_irqstatus(dev, stat);
-+		start(crtc);
-+	} else if (stat & LCDC_PL_LOAD_DONE) {
-+		tilcdc_clear_irqstatus(dev, stat);
-+	} else {
-+		struct drm_pending_vblank_event *event;
-+		unsigned long flags;
-+		uint32_t dirty = tilcdc_crtc->dirty & stat;
-+
-+		tilcdc_clear_irqstatus(dev, stat);
-+
-+		if (dirty & LCDC_END_OF_FRAME0)
-+			set_scanout(crtc, 0);
-+
-+		if (dirty & LCDC_END_OF_FRAME1)
-+			set_scanout(crtc, 1);
-+
-+		drm_handle_vblank(dev, 0);
-+
-+		spin_lock_irqsave(&dev->event_lock, flags);
-+		event = tilcdc_crtc->event;
-+		tilcdc_crtc->event = NULL;
-+		if (event)
-+			drm_send_vblank_event(dev, 0, event);
-+		spin_unlock_irqrestore(&dev->event_lock, flags);
-+
-+		if (dirty && !tilcdc_crtc->dirty)
-+			drm_vblank_put(dev, 0);
-+	}
-+
-+	if (priv->rev == 2) {
-+		if (stat & LCDC_FRAME_DONE) {
-+			tilcdc_crtc->frame_done = true;
-+			wake_up(&tilcdc_crtc->frame_done_wq);
-+		}
-+		tilcdc_write(dev, LCDC_END_OF_INT_IND_REG, 0);
-+	}
-+
-+	return IRQ_HANDLED;
-+}
-+
-+void tilcdc_crtc_cancel_page_flip(struct drm_crtc *crtc, struct drm_file *file)
-+{
-+	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
-+	struct drm_pending_vblank_event *event;
-+	struct drm_device *dev = crtc->dev;
-+	unsigned long flags;
-+
-+	/* Destroy the pending vertical blanking event associated with the
-+	 * pending page flip, if any, and disable vertical blanking interrupts.
-+	 */
-+	spin_lock_irqsave(&dev->event_lock, flags);
-+	event = tilcdc_crtc->event;
-+	if (event && event->base.file_priv == file) {
-+		tilcdc_crtc->event = NULL;
-+		event->base.destroy(&event->base);
-+		drm_vblank_put(dev, 0);
-+	}
-+	spin_unlock_irqrestore(&dev->event_lock, flags);
-+}
-+
-+struct drm_crtc *tilcdc_crtc_create(struct drm_device *dev)
-+{
-+	struct tilcdc_crtc *tilcdc_crtc;
-+	struct drm_crtc *crtc;
-+	int ret;
-+
-+	tilcdc_crtc = kzalloc(sizeof(*tilcdc_crtc), GFP_KERNEL);
-+	if (!tilcdc_crtc) {
-+		dev_err(dev->dev, "allocation failed\n");
-+		return NULL;
-+	}
-+
-+	crtc = &tilcdc_crtc->base;
-+
-+	tilcdc_crtc->dpms = DRM_MODE_DPMS_OFF;
-+	init_waitqueue_head(&tilcdc_crtc->frame_done_wq);
-+
-+	ret = kfifo_alloc(&tilcdc_crtc->unref_fifo, 16, GFP_KERNEL);
-+	if (ret) {
-+		dev_err(dev->dev, "could not allocate unref FIFO\n");
-+		goto fail;
-+	}
-+
-+	INIT_WORK(&tilcdc_crtc->work, unref_worker);
-+
-+	ret = drm_crtc_init(dev, crtc, &tilcdc_crtc_funcs);
-+	if (ret < 0)
-+		goto fail;
-+
-+	drm_crtc_helper_add(crtc, &tilcdc_crtc_helper_funcs);
-+
-+	return crtc;
-+
-+fail:
-+	tilcdc_crtc_destroy(crtc);
-+	return NULL;
-+}
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
-new file mode 100644
-index 0000000..f6defbf
---- /dev/null
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
-@@ -0,0 +1,605 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments
-+ * Author: Rob Clark <robdclark@gmail.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published by
-+ * the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-+ * more details.
-+ *
-+ * You should have received a copy of the GNU General Public License along with
-+ * this program.  If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+/* LCDC DRM driver, based on da8xx-fb */
-+
-+#include "tilcdc_drv.h"
-+#include "tilcdc_regs.h"
-+#include "tilcdc_tfp410.h"
-+
-+#include "drm_fb_helper.h"
-+
-+static LIST_HEAD(module_list);
-+
-+void tilcdc_module_init(struct tilcdc_module *mod, const char *name,
-+		const struct tilcdc_module_ops *funcs)
-+{
-+	mod->name = name;
-+	mod->funcs = funcs;
-+	INIT_LIST_HEAD(&mod->list);
-+	list_add(&mod->list, &module_list);
-+}
-+
-+void tilcdc_module_cleanup(struct tilcdc_module *mod)
-+{
-+	list_del(&mod->list);
-+}
-+
-+static struct of_device_id tilcdc_of_match[];
-+
-+static struct drm_framebuffer *tilcdc_fb_create(struct drm_device *dev,
-+		struct drm_file *file_priv, struct drm_mode_fb_cmd2 *mode_cmd)
-+{
-+	return drm_fb_cma_create(dev, file_priv, mode_cmd);
-+}
-+
-+static void tilcdc_fb_output_poll_changed(struct drm_device *dev)
-+{
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+	if (priv->fbdev)
-+		drm_fbdev_cma_hotplug_event(priv->fbdev);
-+}
-+
-+static const struct drm_mode_config_funcs mode_config_funcs = {
-+	.fb_create = tilcdc_fb_create,
-+	.output_poll_changed = tilcdc_fb_output_poll_changed,
-+};
-+
-+static int modeset_init(struct drm_device *dev)
-+{
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+	struct tilcdc_module *mod;
-+
-+	drm_mode_config_init(dev);
-+
-+	priv->crtc = tilcdc_crtc_create(dev);
-+
-+	list_for_each_entry(mod, &module_list, list) {
-+		DBG("loading module: %s", mod->name);
-+		mod->funcs->modeset_init(mod, dev);
-+	}
-+
-+	if ((priv->num_encoders = 0) || (priv->num_connectors == 0)) {
-+		/* oh nos! */
-+		dev_err(dev->dev, "no encoders/connectors found\n");
-+		return -ENXIO;
-+	}
-+
-+	dev->mode_config.min_width = 0;
-+	dev->mode_config.min_height = 0;
-+	dev->mode_config.max_width = tilcdc_crtc_max_width(priv->crtc);
-+	dev->mode_config.max_height = 2048;
-+	dev->mode_config.funcs = &mode_config_funcs;
-+
-+	return 0;
-+}
-+
-+#ifdef CONFIG_CPU_FREQ
-+static int cpufreq_transition(struct notifier_block *nb,
-+				     unsigned long val, void *data)
-+{
-+	struct tilcdc_drm_private *priv = container_of(nb,
-+			struct tilcdc_drm_private, freq_transition);
-+	if (val == CPUFREQ_POSTCHANGE) {
-+		if (priv->lcd_fck_rate != clk_get_rate(priv->clk)) {
-+			priv->lcd_fck_rate = clk_get_rate(priv->clk);
-+			tilcdc_crtc_update_clk(priv->crtc);
-+		}
-+	}
-+
-+	return 0;
-+}
-+#endif
-+
-+/*
-+ * DRM operations:
-+ */
-+
-+static int tilcdc_unload(struct drm_device *dev)
-+{
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+	struct tilcdc_module *mod, *cur;
-+
-+	drm_kms_helper_poll_fini(dev);
-+	drm_mode_config_cleanup(dev);
-+	drm_vblank_cleanup(dev);
-+
-+	pm_runtime_get_sync(dev->dev);
-+	drm_irq_uninstall(dev);
-+	pm_runtime_put_sync(dev->dev);
-+
-+#ifdef CONFIG_CPU_FREQ
-+	cpufreq_unregister_notifier(&priv->freq_transition,
-+			CPUFREQ_TRANSITION_NOTIFIER);
-+#endif
-+
-+	if (priv->clk)
-+		clk_put(priv->clk);
-+
-+	if (priv->mmio)
-+		iounmap(priv->mmio);
-+
-+	flush_workqueue(priv->wq);
-+	destroy_workqueue(priv->wq);
-+
-+	dev->dev_private = NULL;
-+
-+	pm_runtime_disable(dev->dev);
-+
-+	list_for_each_entry_safe(mod, cur, &module_list, list) {
-+		DBG("destroying module: %s", mod->name);
-+		mod->funcs->destroy(mod);
-+	}
-+
-+	kfree(priv);
-+
-+	return 0;
-+}
-+
-+static int tilcdc_load(struct drm_device *dev, unsigned long flags)
-+{
-+	struct platform_device *pdev = dev->platformdev;
-+	struct device_node *node = pdev->dev.of_node;
-+	struct tilcdc_drm_private *priv;
-+	struct resource *res;
-+	int ret;
-+
-+	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
-+	if (!priv) {
-+		dev_err(dev->dev, "failed to allocate private data\n");
-+		return -ENOMEM;
-+	}
-+
-+	dev->dev_private = priv;
-+
-+	priv->wq = alloc_ordered_workqueue("tilcdc", 0);
-+
-+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-+	if (!res) {
-+		dev_err(dev->dev, "failed to get memory resource\n");
-+		ret = -EINVAL;
-+		goto fail;
-+	}
-+
-+	priv->mmio = ioremap_nocache(res->start, resource_size(res));
-+	if (!priv->mmio) {
-+		dev_err(dev->dev, "failed to ioremap\n");
-+		ret = -ENOMEM;
-+		goto fail;
-+	}
-+
-+	priv->clk = clk_get(dev->dev, "fck");
-+	if (IS_ERR(priv->clk)) {
-+		dev_err(dev->dev, "failed to get functional clock\n");
-+		ret = -ENODEV;
-+		goto fail;
-+	}
-+
-+	priv->disp_clk = clk_get(dev->dev, "dpll_disp_ck");
-+	if (IS_ERR(priv->clk)) {
-+		dev_err(dev->dev, "failed to get display clock\n");
-+		ret = -ENODEV;
-+		goto fail;
-+	}
-+
-+#ifdef CONFIG_CPU_FREQ
-+	priv->lcd_fck_rate = clk_get_rate(priv->clk);
-+	priv->freq_transition.notifier_call = cpufreq_transition;
-+	ret = cpufreq_register_notifier(&priv->freq_transition,
-+			CPUFREQ_TRANSITION_NOTIFIER);
-+	if (ret) {
-+		dev_err(dev->dev, "failed to register cpufreq notifier\n");
-+		goto fail;
-+	}
-+#endif
-+
-+	if (of_property_read_u32(node, "max-bandwidth", &priv->max_bandwidth))
-+		priv->max_bandwidth = 1280 * 1024 * 60;
-+
-+	pm_runtime_enable(dev->dev);
-+
-+	/* Determine LCD IP Version */
-+	pm_runtime_get_sync(dev->dev);
-+	switch (tilcdc_read(dev, LCDC_PID_REG)) {
-+	case 0x4c100102:
-+		priv->rev = 1;
-+		break;
-+	case 0x4f200800:
-+	case 0x4f201000:
-+		priv->rev = 2;
-+		break;
-+	default:
-+		dev_warn(dev->dev, "Unknown PID Reg value 0x%08x, "
-+				"defaulting to LCD revision 1\n",
-+				tilcdc_read(dev, LCDC_PID_REG));
-+		priv->rev = 1;
-+		break;
-+	}
-+
-+	pm_runtime_put_sync(dev->dev);
-+
-+	ret = modeset_init(dev);
-+	if (ret < 0) {
-+		dev_err(dev->dev, "failed to initialize mode setting\n");
-+		goto fail;
-+	}
-+
-+	ret = drm_vblank_init(dev, 1);
-+	if (ret < 0) {
-+		dev_err(dev->dev, "failed to initialize vblank\n");
-+		goto fail;
-+	}
-+
-+	pm_runtime_get_sync(dev->dev);
-+	ret = drm_irq_install(dev);
-+	pm_runtime_put_sync(dev->dev);
-+	if (ret < 0) {
-+		dev_err(dev->dev, "failed to install IRQ handler\n");
-+		goto fail;
-+	}
-+
-+	platform_set_drvdata(pdev, dev);
-+
-+	priv->fbdev = drm_fbdev_cma_init(dev, 16,
-+			dev->mode_config.num_crtc,
-+			dev->mode_config.num_connector);
-+
-+	drm_kms_helper_poll_init(dev);
-+
-+	return 0;
-+
-+fail:
-+	tilcdc_unload(dev);
-+	return ret;
-+}
-+
-+static void tilcdc_preclose(struct drm_device *dev, struct drm_file *file)
-+{
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+
-+	tilcdc_crtc_cancel_page_flip(priv->crtc, file);
-+}
-+
-+static void tilcdc_lastclose(struct drm_device *dev)
-+{
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+	drm_fbdev_cma_restore_mode(priv->fbdev);
-+}
-+
-+static irqreturn_t tilcdc_irq(DRM_IRQ_ARGS)
-+{
-+	struct drm_device *dev = arg;
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+	return tilcdc_crtc_irq(priv->crtc);
-+}
-+
-+static void tilcdc_irq_preinstall(struct drm_device *dev)
-+{
-+	tilcdc_clear_irqstatus(dev, 0xffffffff);
-+}
-+
-+static int tilcdc_irq_postinstall(struct drm_device *dev)
-+{
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+
-+	/* enable FIFO underflow irq: */
-+	if (priv->rev == 1) {
-+		tilcdc_set(dev, LCDC_RASTER_CTRL_REG, LCDC_V1_UNDERFLOW_INT_ENA);
-+	} else {
-+		tilcdc_set(dev, LCDC_INT_ENABLE_SET_REG, LCDC_V2_UNDERFLOW_INT_ENA);
-+	}
-+
-+	return 0;
-+}
-+
-+static void tilcdc_irq_uninstall(struct drm_device *dev)
-+{
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+
-+	/* disable irqs that we might have enabled: */
-+	if (priv->rev == 1) {
-+		tilcdc_clear(dev, LCDC_RASTER_CTRL_REG,
-+				LCDC_V1_UNDERFLOW_INT_ENA | LCDC_V1_PL_INT_ENA);
-+		tilcdc_clear(dev, LCDC_DMA_CTRL_REG, LCDC_V1_END_OF_FRAME_INT_ENA);
-+	} else {
-+		tilcdc_clear(dev, LCDC_INT_ENABLE_SET_REG,
-+			LCDC_V2_UNDERFLOW_INT_ENA | LCDC_V2_PL_INT_ENA |
-+			LCDC_V2_END_OF_FRAME0_INT_ENA | LCDC_V2_END_OF_FRAME1_INT_ENA |
-+			LCDC_FRAME_DONE);
-+	}
-+
-+}
-+
-+static void enable_vblank(struct drm_device *dev, bool enable)
-+{
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+	u32 reg, mask;
-+
-+	if (priv->rev == 1) {
-+		reg = LCDC_DMA_CTRL_REG;
-+		mask = LCDC_V1_END_OF_FRAME_INT_ENA;
-+	} else {
-+		reg = LCDC_INT_ENABLE_SET_REG;
-+		mask = LCDC_V2_END_OF_FRAME0_INT_ENA |
-+			LCDC_V2_END_OF_FRAME1_INT_ENA | LCDC_FRAME_DONE;
-+	}
-+
-+	if (enable)
-+		tilcdc_set(dev, reg, mask);
-+	else
-+		tilcdc_clear(dev, reg, mask);
-+}
-+
-+static int tilcdc_enable_vblank(struct drm_device *dev, int crtc)
-+{
-+	enable_vblank(dev, true);
-+	return 0;
-+}
-+
-+static void tilcdc_disable_vblank(struct drm_device *dev, int crtc)
-+{
-+	enable_vblank(dev, false);
-+}
-+
-+#if defined(CONFIG_DEBUG_FS) || defined(CONFIG_PM_SLEEP)
-+static const struct {
-+	const char *name;
-+	uint8_t  rev;
-+	uint8_t  save;
-+	uint32_t reg;
-+} registers[] = 	{
-+#define REG(rev, save, reg) { #reg, rev, save, reg }
-+		/* exists in revision 1: */
-+		REG(1, false, LCDC_PID_REG),
-+		REG(1, true,  LCDC_CTRL_REG),
-+		REG(1, false, LCDC_STAT_REG),
-+		REG(1, true,  LCDC_RASTER_CTRL_REG),
-+		REG(1, true,  LCDC_RASTER_TIMING_0_REG),
-+		REG(1, true,  LCDC_RASTER_TIMING_1_REG),
-+		REG(1, true,  LCDC_RASTER_TIMING_2_REG),
-+		REG(1, true,  LCDC_DMA_CTRL_REG),
-+		REG(1, true,  LCDC_DMA_FB_BASE_ADDR_0_REG),
-+		REG(1, true,  LCDC_DMA_FB_CEILING_ADDR_0_REG),
-+		REG(1, true,  LCDC_DMA_FB_BASE_ADDR_1_REG),
-+		REG(1, true,  LCDC_DMA_FB_CEILING_ADDR_1_REG),
-+		/* new in revision 2: */
-+		REG(2, false, LCDC_RAW_STAT_REG),
-+		REG(2, false, LCDC_MASKED_STAT_REG),
-+		REG(2, false, LCDC_INT_ENABLE_SET_REG),
-+		REG(2, false, LCDC_INT_ENABLE_CLR_REG),
-+		REG(2, false, LCDC_END_OF_INT_IND_REG),
-+		REG(2, true,  LCDC_CLK_ENABLE_REG),
-+		REG(2, true,  LCDC_INT_ENABLE_SET_REG),
-+#undef REG
-+};
-+#endif
-+
-+#ifdef CONFIG_DEBUG_FS
-+static int tilcdc_regs_show(struct seq_file *m, void *arg)
-+{
-+	struct drm_info_node *node = (struct drm_info_node *) m->private;
-+	struct drm_device *dev = node->minor->dev;
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+	unsigned i;
-+
-+	pm_runtime_get_sync(dev->dev);
-+
-+	seq_printf(m, "revision: %d\n", priv->rev);
-+
-+	for (i = 0; i < ARRAY_SIZE(registers); i++)
-+		if (priv->rev >= registers[i].rev)
-+			seq_printf(m, "%s:\t %08x\n", registers[i].name,
-+					tilcdc_read(dev, registers[i].reg));
-+
-+	pm_runtime_put_sync(dev->dev);
-+
-+	return 0;
-+}
-+
-+static int tilcdc_mm_show(struct seq_file *m, void *arg)
-+{
-+	struct drm_info_node *node = (struct drm_info_node *) m->private;
-+	struct drm_device *dev = node->minor->dev;
-+	return drm_mm_dump_table(m, dev->mm_private);
-+}
-+
-+static struct drm_info_list tilcdc_debugfs_list[] = {
-+		{ "regs", tilcdc_regs_show, 0 },
-+		{ "mm",   tilcdc_mm_show,   0 },
-+		{ "fb",   drm_fb_cma_debugfs_show, 0 },
-+};
-+
-+static int tilcdc_debugfs_init(struct drm_minor *minor)
-+{
-+	struct drm_device *dev = minor->dev;
-+	struct tilcdc_module *mod;
-+	int ret;
-+
-+	ret = drm_debugfs_create_files(tilcdc_debugfs_list,
-+			ARRAY_SIZE(tilcdc_debugfs_list),
-+			minor->debugfs_root, minor);
-+
-+	list_for_each_entry(mod, &module_list, list)
-+		if (mod->funcs->debugfs_init)
-+			mod->funcs->debugfs_init(mod, minor);
-+
-+	if (ret) {
-+		dev_err(dev->dev, "could not install tilcdc_debugfs_list\n");
-+		return ret;
-+	}
-+
-+	return ret;
-+}
-+
-+static void tilcdc_debugfs_cleanup(struct drm_minor *minor)
-+{
-+	struct tilcdc_module *mod;
-+	drm_debugfs_remove_files(tilcdc_debugfs_list,
-+			ARRAY_SIZE(tilcdc_debugfs_list), minor);
-+
-+	list_for_each_entry(mod, &module_list, list)
-+		if (mod->funcs->debugfs_cleanup)
-+			mod->funcs->debugfs_cleanup(mod, minor);
-+}
-+#endif
-+
-+static const struct file_operations fops = {
-+	.owner              = THIS_MODULE,
-+	.open               = drm_open,
-+	.release            = drm_release,
-+	.unlocked_ioctl     = drm_ioctl,
-+#ifdef CONFIG_COMPAT
-+	.compat_ioctl       = drm_compat_ioctl,
-+#endif
-+	.poll               = drm_poll,
-+	.read               = drm_read,
-+	.fasync             = drm_fasync,
-+	.llseek             = no_llseek,
-+	.mmap               = drm_gem_cma_mmap,
-+};
-+
-+static struct drm_driver tilcdc_driver = {
-+	.driver_features    = DRIVER_HAVE_IRQ | DRIVER_GEM | DRIVER_MODESET,
-+	.load               = tilcdc_load,
-+	.unload             = tilcdc_unload,
-+	.preclose           = tilcdc_preclose,
-+	.lastclose          = tilcdc_lastclose,
-+	.irq_handler        = tilcdc_irq,
-+	.irq_preinstall     = tilcdc_irq_preinstall,
-+	.irq_postinstall    = tilcdc_irq_postinstall,
-+	.irq_uninstall      = tilcdc_irq_uninstall,
-+	.get_vblank_counter = drm_vblank_count,
-+	.enable_vblank      = tilcdc_enable_vblank,
-+	.disable_vblank     = tilcdc_disable_vblank,
-+	.gem_free_object    = drm_gem_cma_free_object,
-+	.gem_vm_ops         = &drm_gem_cma_vm_ops,
-+	.dumb_create        = drm_gem_cma_dumb_create,
-+	.dumb_map_offset    = drm_gem_cma_dumb_map_offset,
-+	.dumb_destroy       = drm_gem_cma_dumb_destroy,
-+#ifdef CONFIG_DEBUG_FS
-+	.debugfs_init       = tilcdc_debugfs_init,
-+	.debugfs_cleanup    = tilcdc_debugfs_cleanup,
-+#endif
-+	.fops               = &fops,
-+	.name               = "tilcdc",
-+	.desc               = "TI LCD Controller DRM",
-+	.date               = "20121205",
-+	.major              = 1,
-+	.minor              = 0,
-+};
-+
-+/*
-+ * Power management:
-+ */
-+
-+#ifdef CONFIG_PM_SLEEP
-+static int tilcdc_pm_suspend(struct device *dev)
-+{
-+	struct drm_device *ddev = dev_get_drvdata(dev);
-+	struct tilcdc_drm_private *priv = ddev->dev_private;
-+	unsigned i, n = 0;
-+
-+	drm_kms_helper_poll_disable(ddev);
-+
-+	/* Save register state: */
-+	for (i = 0; i < ARRAY_SIZE(registers); i++)
-+		if (registers[i].save && (priv->rev >= registers[i].rev))
-+			priv->saved_register[n++] = tilcdc_read(ddev, registers[i].reg);
-+
-+	return 0;
-+}
-+
-+static int tilcdc_pm_resume(struct device *dev)
-+{
-+	struct drm_device *ddev = dev_get_drvdata(dev);
-+	struct tilcdc_drm_private *priv = ddev->dev_private;
-+	unsigned i, n = 0;
-+
-+	/* Restore register state: */
-+	for (i = 0; i < ARRAY_SIZE(registers); i++)
-+		if (registers[i].save && (priv->rev >= registers[i].rev))
-+			tilcdc_write(ddev, registers[i].reg, priv->saved_register[n++]);
-+
-+	drm_kms_helper_poll_enable(ddev);
-+
-+	return 0;
-+}
-+#endif
-+
-+static const struct dev_pm_ops tilcdc_pm_ops = {
-+	SET_SYSTEM_SLEEP_PM_OPS(tilcdc_pm_suspend, tilcdc_pm_resume)
-+};
-+
-+/*
-+ * Platform driver:
-+ */
-+
-+static int tilcdc_pdev_probe(struct platform_device *pdev)
-+{
-+	/* bail out early if no DT data: */
-+	if (!pdev->dev.of_node) {
-+		dev_err(&pdev->dev, "device-tree data is missing\n");
-+		return -ENXIO;
-+	}
-+
-+	return drm_platform_init(&tilcdc_driver, pdev);
-+}
-+
-+static int tilcdc_pdev_remove(struct platform_device *pdev)
-+{
-+	drm_platform_exit(&tilcdc_driver, pdev);
-+
-+	return 0;
-+}
-+
-+static struct of_device_id tilcdc_of_match[] = {
-+		{ .compatible = "ti,am33xx-tilcdc", },
-+		{ },
-+};
-+MODULE_DEVICE_TABLE(of, tilcdc_of_match);
-+
-+static struct platform_driver tilcdc_platform_driver = {
-+	.probe      = tilcdc_pdev_probe,
-+	.remove     = tilcdc_pdev_remove,
-+	.driver     = {
-+		.owner  = THIS_MODULE,
-+		.name   = "tilcdc",
-+		.pm     = &tilcdc_pm_ops,
-+		.of_match_table = tilcdc_of_match,
-+	},
-+};
-+
-+static int __init tilcdc_drm_init(void)
-+{
-+	DBG("init");
-+	tilcdc_tfp410_init();
-+	return platform_driver_register(&tilcdc_platform_driver);
-+}
-+
-+static void __exit tilcdc_drm_fini(void)
-+{
-+	DBG("fini");
-+	tilcdc_tfp410_fini();
-+	platform_driver_unregister(&tilcdc_platform_driver);
-+}
-+
-+module_init(tilcdc_drm_init);
-+module_exit(tilcdc_drm_fini);
-+
-+MODULE_AUTHOR("Rob Clark <robdclark@gmail.com");
-+MODULE_DESCRIPTION("TI LCD Controller DRM Driver");
-+MODULE_LICENSE("GPL");
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
-new file mode 100644
-index 0000000..8242b5a
---- /dev/null
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
-@@ -0,0 +1,150 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments
-+ * Author: Rob Clark <robdclark@gmail.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published by
-+ * the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-+ * more details.
-+ *
-+ * You should have received a copy of the GNU General Public License along with
-+ * this program.  If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+#ifndef __TILCDC_DRV_H__
-+#define __TILCDC_DRV_H__
-+
-+#include <linux/clk.h>
-+#include <linux/cpufreq.h>
-+#include <linux/module.h>
-+#include <linux/platform_device.h>
-+#include <linux/pm.h>
-+#include <linux/pm_runtime.h>
-+#include <linux/slab.h>
-+#include <linux/of.h>
-+#include <linux/of_device.h>
-+#include <linux/list.h>
-+
-+#include <drm/drmP.h>
-+#include <drm/drm_crtc_helper.h>
-+#include <drm/drm_gem_cma_helper.h>
-+#include <drm/drm_fb_cma_helper.h>
-+
-+struct tilcdc_drm_private {
-+	void __iomem *mmio;
-+
-+	struct clk *disp_clk;    /* display dpll */
-+	struct clk *clk;         /* functional clock */
-+	int rev;                 /* IP revision */
-+
-+	/* don't attempt resolutions w/ higher W * H * Hz: */
-+	uint32_t max_bandwidth;
-+
-+	/* register contents saved across suspend/resume: */
-+	u32 saved_register[12];
-+
-+#ifdef CONFIG_CPU_FREQ
-+	struct notifier_block freq_transition;
-+	unsigned int lcd_fck_rate;
-+#endif
-+
-+	struct workqueue_struct *wq;
-+
-+	struct drm_fbdev_cma *fbdev;
-+
-+	struct drm_crtc *crtc;
-+
-+	unsigned int num_encoders;
-+	struct drm_encoder *encoders[8];
-+
-+	unsigned int num_connectors;
-+	struct drm_connector *connectors[8];
-+};
-+
-+/* Sub-module for display.  Since we don't know at compile time what panels
-+ * or display adapter(s) might be present (for ex, off chip dvi/tfp410,
-+ * hdmi encoder, various lcd panels), the connector/encoder(s) are split into
-+ * separate drivers.  If they are probed and found to be present, they
-+ * register themselves with tilcdc_register_module().
-+ */
-+struct tilcdc_module;
-+
-+struct tilcdc_module_ops {
-+	/* create appropriate encoders/connectors: */
-+	int (*modeset_init)(struct tilcdc_module *mod, struct drm_device *dev);
-+	void (*destroy)(struct tilcdc_module *mod);
-+#ifdef CONFIG_DEBUG_FS
-+	/* create debugfs nodes (can be NULL): */
-+	int (*debugfs_init)(struct tilcdc_module *mod, struct drm_minor *minor);
-+	/* cleanup debugfs nodes (can be NULL): */
-+	void (*debugfs_cleanup)(struct tilcdc_module *mod, struct drm_minor *minor);
-+#endif
-+};
-+
-+struct tilcdc_module {
-+	const char *name;
-+	struct list_head list;
-+	const struct tilcdc_module_ops *funcs;
-+};
-+
-+void tilcdc_module_init(struct tilcdc_module *mod, const char *name,
-+		const struct tilcdc_module_ops *funcs);
-+void tilcdc_module_cleanup(struct tilcdc_module *mod);
-+
-+
-+/* Panel config that needs to be set in the crtc, but is not coming from
-+ * the mode timings.  The display module is expected to call
-+ * tilcdc_crtc_set_panel_info() to set this during modeset.
-+ */
-+struct tilcdc_panel_info {
-+
-+	/* AC Bias Pin Frequency */
-+	uint32_t ac_bias;
-+
-+	/* AC Bias Pin Transitions per Interrupt */
-+	uint32_t ac_bias_intrpt;
-+
-+	/* DMA burst size */
-+	uint32_t dma_burst_sz;
-+
-+	/* Bits per pixel */
-+	uint32_t bpp;
-+
-+	/* FIFO DMA Request Delay */
-+	uint32_t fdd;
-+
-+	/* TFT Alternative Signal Mapping (Only for active) */
-+	bool tft_alt_mode;
-+
-+	/* Invert pixel clock */
-+	bool invert_pxl_clk;
-+
-+	/* Horizontal and Vertical Sync Edge: 0=rising 1=falling */
-+	uint32_t sync_edge;
-+
-+	/* Horizontal and Vertical Sync: Control: 0=ignore */
-+	uint32_t sync_ctrl;
-+
-+	/* Raster Data Order Select: 1=Most-to-least 0=Least-to-most */
-+	uint32_t raster_order;
-+
-+	/* DMA FIFO threshold */
-+	uint32_t fifo_th;
-+};
-+
-+#define DBG(fmt, ...) DRM_DEBUG(fmt"\n", ##__VA_ARGS__)
-+
-+struct drm_crtc *tilcdc_crtc_create(struct drm_device *dev);
-+void tilcdc_crtc_cancel_page_flip(struct drm_crtc *crtc, struct drm_file *file);
-+irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc);
-+void tilcdc_crtc_update_clk(struct drm_crtc *crtc);
-+void tilcdc_crtc_set_panel_info(struct drm_crtc *crtc,
-+		const struct tilcdc_panel_info *info);
-+int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode);
-+int tilcdc_crtc_max_width(struct drm_crtc *crtc);
-+
-+#endif /* __TILCDC_DRV_H__ */
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_regs.h b/drivers/gpu/drm/tilcdc/tilcdc_regs.h
-new file mode 100644
-index 0000000..17fd1b4
---- /dev/null
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_regs.h
-@@ -0,0 +1,154 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments
-+ * Author: Rob Clark <robdclark@gmail.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published by
-+ * the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-+ * more details.
-+ *
-+ * You should have received a copy of the GNU General Public License along with
-+ * this program.  If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+#ifndef __TILCDC_REGS_H__
-+#define __TILCDC_REGS_H__
-+
-+/* LCDC register definitions, based on da8xx-fb */
-+
-+#include <linux/bitops.h>
-+
-+#include "tilcdc_drv.h"
-+
-+/* LCDC Status Register */
-+#define LCDC_END_OF_FRAME1                       BIT(9)
-+#define LCDC_END_OF_FRAME0                       BIT(8)
-+#define LCDC_PL_LOAD_DONE                        BIT(6)
-+#define LCDC_FIFO_UNDERFLOW                      BIT(5)
-+#define LCDC_SYNC_LOST                           BIT(2)
-+#define LCDC_FRAME_DONE                          BIT(0)
-+
-+/* LCDC DMA Control Register */
-+#define LCDC_DMA_BURST_SIZE(x)                   ((x) << 4)
-+#define LCDC_DMA_BURST_1                         0x0
-+#define LCDC_DMA_BURST_2                         0x1
-+#define LCDC_DMA_BURST_4                         0x2
-+#define LCDC_DMA_BURST_8                         0x3
-+#define LCDC_DMA_BURST_16                        0x4
-+#define LCDC_V1_END_OF_FRAME_INT_ENA             BIT(2)
-+#define LCDC_V2_END_OF_FRAME0_INT_ENA            BIT(8)
-+#define LCDC_V2_END_OF_FRAME1_INT_ENA            BIT(9)
-+#define LCDC_DUAL_FRAME_BUFFER_ENABLE            BIT(0)
-+
-+/* LCDC Control Register */
-+#define LCDC_CLK_DIVISOR(x)                      ((x) << 8)
-+#define LCDC_RASTER_MODE                         0x01
-+
-+/* LCDC Raster Control Register */
-+#define LCDC_PALETTE_LOAD_MODE(x)                ((x) << 20)
-+#define PALETTE_AND_DATA                         0x00
-+#define PALETTE_ONLY                             0x01
-+#define DATA_ONLY                                0x02
-+
-+#define LCDC_MONO_8BIT_MODE                      BIT(9)
-+#define LCDC_RASTER_ORDER                        BIT(8)
-+#define LCDC_TFT_MODE                            BIT(7)
-+#define LCDC_V1_UNDERFLOW_INT_ENA                BIT(6)
-+#define LCDC_V2_UNDERFLOW_INT_ENA                BIT(5)
-+#define LCDC_V1_PL_INT_ENA                       BIT(4)
-+#define LCDC_V2_PL_INT_ENA                       BIT(6)
-+#define LCDC_MONOCHROME_MODE                     BIT(1)
-+#define LCDC_RASTER_ENABLE                       BIT(0)
-+#define LCDC_TFT_ALT_ENABLE                      BIT(23)
-+#define LCDC_STN_565_ENABLE                      BIT(24)
-+#define LCDC_V2_DMA_CLK_EN                       BIT(2)
-+#define LCDC_V2_LIDD_CLK_EN                      BIT(1)
-+#define LCDC_V2_CORE_CLK_EN                      BIT(0)
-+#define LCDC_V2_LPP_B10                          26
-+#define LCDC_V2_TFT_24BPP_MODE                   BIT(25)
-+#define LCDC_V2_TFT_24BPP_UNPACK                 BIT(26)
-+
-+/* LCDC Raster Timing 2 Register */
-+#define LCDC_AC_BIAS_TRANSITIONS_PER_INT(x)      ((x) << 16)
-+#define LCDC_AC_BIAS_FREQUENCY(x)                ((x) << 8)
-+#define LCDC_SYNC_CTRL                           BIT(25)
-+#define LCDC_SYNC_EDGE                           BIT(24)
-+#define LCDC_INVERT_PIXEL_CLOCK                  BIT(22)
-+#define LCDC_INVERT_HSYNC                        BIT(21)
-+#define LCDC_INVERT_VSYNC                        BIT(20)
-+
-+/* LCDC Block */
-+#define LCDC_PID_REG                             0x0
-+#define LCDC_CTRL_REG                            0x4
-+#define LCDC_STAT_REG                            0x8
-+#define LCDC_RASTER_CTRL_REG                     0x28
-+#define LCDC_RASTER_TIMING_0_REG                 0x2c
-+#define LCDC_RASTER_TIMING_1_REG                 0x30
-+#define LCDC_RASTER_TIMING_2_REG                 0x34
-+#define LCDC_DMA_CTRL_REG                        0x40
-+#define LCDC_DMA_FB_BASE_ADDR_0_REG              0x44
-+#define LCDC_DMA_FB_CEILING_ADDR_0_REG           0x48
-+#define LCDC_DMA_FB_BASE_ADDR_1_REG              0x4c
-+#define LCDC_DMA_FB_CEILING_ADDR_1_REG           0x50
-+
-+/* Interrupt Registers available only in Version 2 */
-+#define LCDC_RAW_STAT_REG                        0x58
-+#define LCDC_MASKED_STAT_REG                     0x5c
-+#define LCDC_INT_ENABLE_SET_REG                  0x60
-+#define LCDC_INT_ENABLE_CLR_REG                  0x64
-+#define LCDC_END_OF_INT_IND_REG                  0x68
-+
-+/* Clock registers available only on Version 2 */
-+#define LCDC_CLK_ENABLE_REG                      0x6c
-+#define LCDC_CLK_RESET_REG                       0x70
-+#define LCDC_CLK_MAIN_RESET                      BIT(3)
-+
-+
-+/*
-+ * Helpers:
-+ */
-+
-+static inline void tilcdc_write(struct drm_device *dev, u32 reg, u32 data)
-+{
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+	iowrite32(data, priv->mmio + reg);
-+}
-+
-+static inline u32 tilcdc_read(struct drm_device *dev, u32 reg)
-+{
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+	return ioread32(priv->mmio + reg);
-+}
-+
-+static inline void tilcdc_set(struct drm_device *dev, u32 reg, u32 mask)
-+{
-+	tilcdc_write(dev, reg, tilcdc_read(dev, reg) | mask);
-+}
-+
-+static inline void tilcdc_clear(struct drm_device *dev, u32 reg, u32 mask)
-+{
-+	tilcdc_write(dev, reg, tilcdc_read(dev, reg) & ~mask);
-+}
-+
-+/* the register to read/clear irqstatus differs between v1 and v2 of the IP */
-+static inline u32 tilcdc_irqstatus_reg(struct drm_device *dev)
-+{
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+	return (priv->rev == 2) ? LCDC_MASKED_STAT_REG : LCDC_STAT_REG;
-+}
-+
-+static inline u32 tilcdc_read_irqstatus(struct drm_device *dev)
-+{
-+	return tilcdc_read(dev, tilcdc_irqstatus_reg(dev));
-+}
-+
-+static inline void tilcdc_clear_irqstatus(struct drm_device *dev, u32 mask)
-+{
-+	tilcdc_write(dev, tilcdc_irqstatus_reg(dev), mask);
-+}
-+
-+#endif /* __TILCDC_REGS_H__ */
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
-new file mode 100644
-index 0000000..10444ee
---- /dev/null
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
-@@ -0,0 +1,419 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments
-+ * Author: Rob Clark <robdclark@gmail.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published by
-+ * the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-+ * more details.
-+ *
-+ * You should have received a copy of the GNU General Public License along with
-+ * this program.  If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+#include <linux/i2c.h>
-+#include <linux/of_i2c.h>
-+#include <linux/gpio.h>
-+#include <linux/of_gpio.h>
-+#include <linux/pinctrl/pinmux.h>
-+#include <linux/pinctrl/consumer.h>
-+
-+#include "tilcdc_drv.h"
-+
-+struct tfp410_module {
-+	struct tilcdc_module base;
-+	struct i2c_adapter *i2c;
-+	int gpio;
-+};
-+#define to_tfp410_module(x) container_of(x, struct tfp410_module, base)
-+
-+
-+static const struct tilcdc_panel_info dvi_info = {
-+		.ac_bias                = 255,
-+		.ac_bias_intrpt         = 0,
-+		.dma_burst_sz           = 16,
-+		.bpp                    = 16,
-+		.fdd                    = 0x80,
-+		.tft_alt_mode           = 0,
-+		.sync_edge              = 0,
-+		.sync_ctrl              = 1,
-+		.raster_order           = 0,
-+};
-+
-+/*
-+ * Encoder:
-+ */
-+
-+struct tfp410_encoder {
-+	struct drm_encoder base;
-+	struct tfp410_module *mod;
-+	int dpms;
-+};
-+#define to_tfp410_encoder(x) container_of(x, struct tfp410_encoder, base)
-+
-+
-+static void tfp410_encoder_destroy(struct drm_encoder *encoder)
-+{
-+	struct tfp410_encoder *tfp410_encoder = to_tfp410_encoder(encoder);
-+	drm_encoder_cleanup(encoder);
-+	kfree(tfp410_encoder);
-+}
-+
-+static void tfp410_encoder_dpms(struct drm_encoder *encoder, int mode)
-+{
-+	struct tfp410_encoder *tfp410_encoder = to_tfp410_encoder(encoder);
-+
-+	if (tfp410_encoder->dpms == mode)
-+		return;
-+
-+	if (mode == DRM_MODE_DPMS_ON) {
-+		DBG("Power on");
-+		gpio_direction_output(tfp410_encoder->mod->gpio, 1);
-+	} else {
-+		DBG("Power off");
-+		gpio_direction_output(tfp410_encoder->mod->gpio, 0);
-+	}
-+
-+	tfp410_encoder->dpms = mode;
-+}
-+
-+static bool tfp410_encoder_mode_fixup(struct drm_encoder *encoder,
-+		const struct drm_display_mode *mode,
-+		struct drm_display_mode *adjusted_mode)
-+{
-+	/* nothing needed */
-+	return true;
-+}
-+
-+static void tfp410_encoder_prepare(struct drm_encoder *encoder)
-+{
-+	tfp410_encoder_dpms(encoder, DRM_MODE_DPMS_OFF);
-+	tilcdc_crtc_set_panel_info(encoder->crtc, &dvi_info);
-+}
-+
-+static void tfp410_encoder_commit(struct drm_encoder *encoder)
-+{
-+	tfp410_encoder_dpms(encoder, DRM_MODE_DPMS_ON);
-+}
-+
-+static void tfp410_encoder_mode_set(struct drm_encoder *encoder,
-+		struct drm_display_mode *mode,
-+		struct drm_display_mode *adjusted_mode)
-+{
-+	/* nothing needed */
-+}
-+
-+static const struct drm_encoder_funcs tfp410_encoder_funcs = {
-+		.destroy        = tfp410_encoder_destroy,
-+};
-+
-+static const struct drm_encoder_helper_funcs tfp410_encoder_helper_funcs = {
-+		.dpms           = tfp410_encoder_dpms,
-+		.mode_fixup     = tfp410_encoder_mode_fixup,
-+		.prepare        = tfp410_encoder_prepare,
-+		.commit         = tfp410_encoder_commit,
-+		.mode_set       = tfp410_encoder_mode_set,
-+};
-+
-+static struct drm_encoder *tfp410_encoder_create(struct drm_device *dev,
-+		struct tfp410_module *mod)
-+{
-+	struct tfp410_encoder *tfp410_encoder;
-+	struct drm_encoder *encoder;
-+	int ret;
-+
-+	tfp410_encoder = kzalloc(sizeof(*tfp410_encoder), GFP_KERNEL);
-+	if (!tfp410_encoder) {
-+		dev_err(dev->dev, "allocation failed\n");
-+		return NULL;
-+	}
-+
-+	tfp410_encoder->dpms = DRM_MODE_DPMS_OFF;
-+	tfp410_encoder->mod = mod;
-+
-+	encoder = &tfp410_encoder->base;
-+	encoder->possible_crtcs = 1;
-+
-+	ret = drm_encoder_init(dev, encoder, &tfp410_encoder_funcs,
-+			DRM_MODE_ENCODER_TMDS);
-+	if (ret < 0)
-+		goto fail;
-+
-+	drm_encoder_helper_add(encoder, &tfp410_encoder_helper_funcs);
-+
-+	return encoder;
-+
-+fail:
-+	tfp410_encoder_destroy(encoder);
-+	return NULL;
-+}
-+
-+/*
-+ * Connector:
-+ */
-+
-+struct tfp410_connector {
-+	struct drm_connector base;
-+
-+	struct drm_encoder *encoder;  /* our connected encoder */
-+	struct tfp410_module *mod;
-+};
-+#define to_tfp410_connector(x) container_of(x, struct tfp410_connector, base)
-+
-+
-+static void tfp410_connector_destroy(struct drm_connector *connector)
-+{
-+	struct tfp410_connector *tfp410_connector = to_tfp410_connector(connector);
-+	drm_connector_cleanup(connector);
-+	kfree(tfp410_connector);
-+}
-+
-+static enum drm_connector_status tfp410_connector_detect(
-+		struct drm_connector *connector,
-+		bool force)
-+{
-+	struct tfp410_connector *tfp410_connector = to_tfp410_connector(connector);
-+
-+	if (drm_probe_ddc(tfp410_connector->mod->i2c))
-+		return connector_status_connected;
-+
-+	return connector_status_unknown;
-+}
-+
-+static int tfp410_connector_get_modes(struct drm_connector *connector)
-+{
-+	struct tfp410_connector *tfp410_connector = to_tfp410_connector(connector);
-+	struct edid *edid;
-+	int ret = 0;
-+
-+	edid = drm_get_edid(connector, tfp410_connector->mod->i2c);
-+
-+	drm_mode_connector_update_edid_property(connector, edid);
-+
-+	if (edid) {
-+		ret = drm_add_edid_modes(connector, edid);
-+		kfree(edid);
-+	}
-+
-+	return ret;
-+}
-+
-+static int tfp410_connector_mode_valid(struct drm_connector *connector,
-+		  struct drm_display_mode *mode)
-+{
-+	struct tilcdc_drm_private *priv = connector->dev->dev_private;
-+	/* our only constraints are what the crtc can generate: */
-+	return tilcdc_crtc_mode_valid(priv->crtc, mode);
-+}
-+
-+static struct drm_encoder *tfp410_connector_best_encoder(
-+		struct drm_connector *connector)
-+{
-+	struct tfp410_connector *tfp410_connector = to_tfp410_connector(connector);
-+	return tfp410_connector->encoder;
-+}
-+
-+static const struct drm_connector_funcs tfp410_connector_funcs = {
-+	.destroy            = tfp410_connector_destroy,
-+	.dpms               = drm_helper_connector_dpms,
-+	.detect             = tfp410_connector_detect,
-+	.fill_modes         = drm_helper_probe_single_connector_modes,
-+};
-+
-+static const struct drm_connector_helper_funcs tfp410_connector_helper_funcs = {
-+	.get_modes          = tfp410_connector_get_modes,
-+	.mode_valid         = tfp410_connector_mode_valid,
-+	.best_encoder       = tfp410_connector_best_encoder,
-+};
-+
-+static struct drm_connector *tfp410_connector_create(struct drm_device *dev,
-+		struct tfp410_module *mod, struct drm_encoder *encoder)
-+{
-+	struct tfp410_connector *tfp410_connector;
-+	struct drm_connector *connector;
-+	int ret;
-+
-+	tfp410_connector = kzalloc(sizeof(*tfp410_connector), GFP_KERNEL);
-+	if (!tfp410_connector) {
-+		dev_err(dev->dev, "allocation failed\n");
-+		return NULL;
-+	}
-+
-+	tfp410_connector->encoder = encoder;
-+	tfp410_connector->mod = mod;
-+
-+	connector = &tfp410_connector->base;
-+
-+	drm_connector_init(dev, connector, &tfp410_connector_funcs,
-+			DRM_MODE_CONNECTOR_DVID);
-+	drm_connector_helper_add(connector, &tfp410_connector_helper_funcs);
-+
-+	connector->polled = DRM_CONNECTOR_POLL_CONNECT |
-+			DRM_CONNECTOR_POLL_DISCONNECT;
-+
-+	connector->interlace_allowed = 0;
-+	connector->doublescan_allowed = 0;
-+
-+	ret = drm_mode_connector_attach_encoder(connector, encoder);
-+	if (ret)
-+		goto fail;
-+
-+	drm_sysfs_connector_add(connector);
-+
-+	return connector;
-+
-+fail:
-+	tfp410_connector_destroy(connector);
-+	return NULL;
-+}
-+
-+/*
-+ * Module:
-+ */
-+
-+static int tfp410_modeset_init(struct tilcdc_module *mod, struct drm_device *dev)
-+{
-+	struct tfp410_module *tfp410_mod = to_tfp410_module(mod);
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+	struct drm_encoder *encoder;
-+	struct drm_connector *connector;
-+
-+	encoder = tfp410_encoder_create(dev, tfp410_mod);
-+	if (!encoder)
-+		return -ENOMEM;
-+
-+	connector = tfp410_connector_create(dev, tfp410_mod, encoder);
-+	if (!connector)
-+		return -ENOMEM;
-+
-+	priv->encoders[priv->num_encoders++] = encoder;
-+	priv->connectors[priv->num_connectors++] = connector;
-+
-+	return 0;
-+}
-+
-+static void tfp410_destroy(struct tilcdc_module *mod)
-+{
-+	struct tfp410_module *tfp410_mod = to_tfp410_module(mod);
-+
-+	if (tfp410_mod->i2c)
-+		i2c_put_adapter(tfp410_mod->i2c);
-+
-+	if (!IS_ERR_VALUE(tfp410_mod->gpio))
-+		gpio_free(tfp410_mod->gpio);
-+
-+	tilcdc_module_cleanup(mod);
-+	kfree(tfp410_mod);
-+}
-+
-+static const struct tilcdc_module_ops tfp410_module_ops = {
-+		.modeset_init = tfp410_modeset_init,
-+		.destroy = tfp410_destroy,
-+};
-+
-+/*
-+ * Device:
-+ */
-+
-+static struct of_device_id tfp410_of_match[];
-+
-+static int tfp410_probe(struct platform_device *pdev)
-+{
-+	struct device_node *node = pdev->dev.of_node;
-+	struct device_node *i2c_node;
-+	struct tfp410_module *tfp410_mod;
-+	struct tilcdc_module *mod;
-+	struct pinctrl *pinctrl;
-+	uint32_t i2c_phandle;
-+	int ret = -EINVAL;
-+
-+	/* bail out early if no DT data: */
-+	if (!node) {
-+		dev_err(&pdev->dev, "device-tree data is missing\n");
-+		return -ENXIO;
-+	}
-+
-+	tfp410_mod = kzalloc(sizeof(*tfp410_mod), GFP_KERNEL);
-+	if (!tfp410_mod)
-+		return -ENOMEM;
-+
-+	mod = &tfp410_mod->base;
-+
-+	tilcdc_module_init(mod, "tfp410", &tfp410_module_ops);
-+
-+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-+	if (IS_ERR(pinctrl))
-+		dev_warn(&pdev->dev, "pins are not configured\n");
-+
-+	if (of_property_read_u32(node, "i2c", &i2c_phandle)) {
-+		dev_err(&pdev->dev, "could not get i2c bus phandle\n");
-+		goto fail;
-+	}
-+
-+	i2c_node = of_find_node_by_phandle(i2c_phandle);
-+	if (!i2c_node) {
-+		dev_err(&pdev->dev, "could not get i2c bus node\n");
-+		goto fail;
-+	}
-+
-+	tfp410_mod->i2c = of_find_i2c_adapter_by_node(i2c_node);
-+	if (!tfp410_mod->i2c) {
-+		dev_err(&pdev->dev, "could not get i2c\n");
-+		goto fail;
-+	}
-+
-+	of_node_put(i2c_node);
-+
-+	tfp410_mod->gpio = of_get_named_gpio_flags(node, "powerdn-gpio",
-+			0, NULL);
-+	if (IS_ERR_VALUE(tfp410_mod->gpio)) {
-+		dev_warn(&pdev->dev, "No power down GPIO\n");
-+	} else {
-+		ret = gpio_request(tfp410_mod->gpio, "DVI_PDn");
-+		if (ret) {
-+			dev_err(&pdev->dev, "could not get DVI_PDn gpio\n");
-+			goto fail;
-+		}
-+	}
-+
-+	return 0;
-+
-+fail:
-+	tfp410_destroy(mod);
-+	return ret;
-+}
-+
-+static int tfp410_remove(struct platform_device *pdev)
-+{
-+	return 0;
-+}
-+
-+static struct of_device_id tfp410_of_match[] = {
-+		{ .compatible = "tilcdc,tfp410", },
-+		{ },
-+};
-+MODULE_DEVICE_TABLE(of, tfp410_of_match);
-+
-+struct platform_driver tfp410_driver = {
-+	.probe = tfp410_probe,
-+	.remove = tfp410_remove,
-+	.driver = {
-+		.owner = THIS_MODULE,
-+		.name = "tfp410",
-+		.of_match_table = tfp410_of_match,
-+	},
-+};
-+
-+int __init tilcdc_tfp410_init(void)
-+{
-+	return platform_driver_register(&tfp410_driver);
-+}
-+
-+void __exit tilcdc_tfp410_fini(void)
-+{
-+	platform_driver_unregister(&tfp410_driver);
-+}
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.h b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.h
-new file mode 100644
-index 0000000..5b800f1
---- /dev/null
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.h
-@@ -0,0 +1,26 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments
-+ * Author: Rob Clark <robdclark@gmail.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published by
-+ * the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-+ * more details.
-+ *
-+ * You should have received a copy of the GNU General Public License along with
-+ * this program.  If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+#ifndef __TILCDC_TFP410_H__
-+#define __TILCDC_TFP410_H__
-+
-+/* sub-module for tfp410 dvi adaptor */
-+
-+int tilcdc_tfp410_init(void);
-+void tilcdc_tfp410_fini(void);
-+
-+#endif /* __TILCDC_TFP410_H__ */
--- 
-1.8.1
-
diff --git a/patches/drm/0008-drm-i2c-nxp-tda998x-v3.patch b/patches/drm/0008-drm-i2c-nxp-tda998x-v3.patch
deleted file mode 100644
index 30d6a6c7066a0926c7b888890befb0d510d6fe51..0000000000000000000000000000000000000000
--- a/patches/drm/0008-drm-i2c-nxp-tda998x-v3.patch
+++ /dev/null
@@ -1,960 +0,0 @@
-From bf377ea93f92630f83b77655a89c25ecfa19184c Mon Sep 17 00:00:00 2001
-From: Rob Clark <robdclark@gmail.com>
-Date: Tue, 8 Jan 2013 19:21:02 -0600
-Subject: [PATCH 08/11] drm/i2c: nxp-tda998x (v3)
-
-Driver for the NXP TDA998X i2c hdmi encoder slave.
-
-v1: original
-v2: fix npix/nline programming
-v3: add Kconfig, fix dup'd MODULE_DESCRIPTION
-
-Signed-off-by: Rob Clark <robdclark@gmail.com>
----
- drivers/gpu/drm/i2c/Kconfig       |   6 +
- drivers/gpu/drm/i2c/Makefile      |   3 +
- drivers/gpu/drm/i2c/tda998x_drv.c | 906 ++++++++++++++++++++++++++++++++++++++
- 3 files changed, 915 insertions(+)
- create mode 100644 drivers/gpu/drm/i2c/tda998x_drv.c
-
-diff --git a/drivers/gpu/drm/i2c/Kconfig b/drivers/gpu/drm/i2c/Kconfig
-index 1611836..4d341db 100644
---- a/drivers/gpu/drm/i2c/Kconfig
-+++ b/drivers/gpu/drm/i2c/Kconfig
-@@ -19,4 +19,10 @@ config DRM_I2C_SIL164
- 	  when used in pairs) TMDS transmitters, used in some nVidia
- 	  video cards.
- 
-+config DRM_I2C_NXP_TDA998X
-+	tristate "NXP Semiconductors TDA998X HDMI encoder"
-+	default m if DRM_TILCDC
-+	help
-+	  Support for NXP Semiconductors TDA998X HDMI encoders.
-+
- endmenu
-diff --git a/drivers/gpu/drm/i2c/Makefile b/drivers/gpu/drm/i2c/Makefile
-index 9286256..43aa33b 100644
---- a/drivers/gpu/drm/i2c/Makefile
-+++ b/drivers/gpu/drm/i2c/Makefile
-@@ -5,3 +5,6 @@ obj-$(CONFIG_DRM_I2C_CH7006) += ch7006.o
- 
- sil164-y := sil164_drv.o
- obj-$(CONFIG_DRM_I2C_SIL164) += sil164.o
-+
-+tda998x-y := tda998x_drv.o
-+obj-$(CONFIG_DRM_I2C_NXP_TDA998X) += tda998x.o
-diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
-new file mode 100644
-index 0000000..e68b58a
---- /dev/null
-+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
-@@ -0,0 +1,906 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments
-+ * Author: Rob Clark <robdclark@gmail.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published by
-+ * the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-+ * more details.
-+ *
-+ * You should have received a copy of the GNU General Public License along with
-+ * this program.  If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+
-+
-+#include <linux/module.h>
-+
-+#include <drm/drmP.h>
-+#include <drm/drm_crtc_helper.h>
-+#include <drm/drm_encoder_slave.h>
-+#include <drm/drm_edid.h>
-+
-+
-+#define DBG(fmt, ...) DRM_DEBUG(fmt"\n", ##__VA_ARGS__)
-+
-+struct tda998x_priv {
-+	struct i2c_client *cec;
-+	uint16_t rev;
-+	uint8_t current_page;
-+	int dpms;
-+};
-+
-+#define to_tda998x_priv(x)  ((struct tda998x_priv *)to_encoder_slave(x)->slave_priv)
-+
-+/* The TDA9988 series of devices use a paged register scheme.. to simplify
-+ * things we encode the page # in upper bits of the register #.  To read/
-+ * write a given register, we need to make sure CURPAGE register is set
-+ * appropriately.  Which implies reads/writes are not atomic.  Fun!
-+ */
-+
-+#define REG(page, addr) (((page) << 8) | (addr))
-+#define REG2ADDR(reg)   ((reg) & 0xff)
-+#define REG2PAGE(reg)   (((reg) >> 8) & 0xff)
-+
-+#define REG_CURPAGE               0xff                /* write */
-+
-+
-+/* Page 00h: General Control */
-+#define REG_VERSION_LSB           REG(0x00, 0x00)     /* read */
-+#define REG_MAIN_CNTRL0           REG(0x00, 0x01)     /* read/write */
-+# define MAIN_CNTRL0_SR           (1 << 0)
-+# define MAIN_CNTRL0_DECS         (1 << 1)
-+# define MAIN_CNTRL0_DEHS         (1 << 2)
-+# define MAIN_CNTRL0_CECS         (1 << 3)
-+# define MAIN_CNTRL0_CEHS         (1 << 4)
-+# define MAIN_CNTRL0_SCALER       (1 << 7)
-+#define REG_VERSION_MSB           REG(0x00, 0x02)     /* read */
-+#define REG_SOFTRESET             REG(0x00, 0x0a)     /* write */
-+# define SOFTRESET_AUDIO          (1 << 0)
-+# define SOFTRESET_I2C_MASTER     (1 << 1)
-+#define REG_DDC_DISABLE           REG(0x00, 0x0b)     /* read/write */
-+#define REG_CCLK_ON               REG(0x00, 0x0c)     /* read/write */
-+#define REG_I2C_MASTER            REG(0x00, 0x0d)     /* read/write */
-+# define I2C_MASTER_DIS_MM        (1 << 0)
-+# define I2C_MASTER_DIS_FILT      (1 << 1)
-+# define I2C_MASTER_APP_STRT_LAT  (1 << 2)
-+#define REG_INT_FLAGS_0           REG(0x00, 0x0f)     /* read/write */
-+#define REG_INT_FLAGS_1           REG(0x00, 0x10)     /* read/write */
-+#define REG_INT_FLAGS_2           REG(0x00, 0x11)     /* read/write */
-+# define INT_FLAGS_2_EDID_BLK_RD  (1 << 1)
-+#define REG_ENA_VP_0              REG(0x00, 0x18)     /* read/write */
-+#define REG_ENA_VP_1              REG(0x00, 0x19)     /* read/write */
-+#define REG_ENA_VP_2              REG(0x00, 0x1a)     /* read/write */
-+#define REG_ENA_AP                REG(0x00, 0x1e)     /* read/write */
-+#define REG_VIP_CNTRL_0           REG(0x00, 0x20)     /* write */
-+# define VIP_CNTRL_0_MIRR_A       (1 << 7)
-+# define VIP_CNTRL_0_SWAP_A(x)    (((x) & 7) << 4)
-+# define VIP_CNTRL_0_MIRR_B       (1 << 3)
-+# define VIP_CNTRL_0_SWAP_B(x)    (((x) & 7) << 0)
-+#define REG_VIP_CNTRL_1           REG(0x00, 0x21)     /* write */
-+# define VIP_CNTRL_1_MIRR_C       (1 << 7)
-+# define VIP_CNTRL_1_SWAP_C(x)    (((x) & 7) << 4)
-+# define VIP_CNTRL_1_MIRR_D       (1 << 3)
-+# define VIP_CNTRL_1_SWAP_D(x)    (((x) & 7) << 0)
-+#define REG_VIP_CNTRL_2           REG(0x00, 0x22)     /* write */
-+# define VIP_CNTRL_2_MIRR_E       (1 << 7)
-+# define VIP_CNTRL_2_SWAP_E(x)    (((x) & 7) << 4)
-+# define VIP_CNTRL_2_MIRR_F       (1 << 3)
-+# define VIP_CNTRL_2_SWAP_F(x)    (((x) & 7) << 0)
-+#define REG_VIP_CNTRL_3           REG(0x00, 0x23)     /* write */
-+# define VIP_CNTRL_3_X_TGL        (1 << 0)
-+# define VIP_CNTRL_3_H_TGL        (1 << 1)
-+# define VIP_CNTRL_3_V_TGL        (1 << 2)
-+# define VIP_CNTRL_3_EMB          (1 << 3)
-+# define VIP_CNTRL_3_SYNC_DE      (1 << 4)
-+# define VIP_CNTRL_3_SYNC_HS      (1 << 5)
-+# define VIP_CNTRL_3_DE_INT       (1 << 6)
-+# define VIP_CNTRL_3_EDGE         (1 << 7)
-+#define REG_VIP_CNTRL_4           REG(0x00, 0x24)     /* write */
-+# define VIP_CNTRL_4_BLC(x)       (((x) & 3) << 0)
-+# define VIP_CNTRL_4_BLANKIT(x)   (((x) & 3) << 2)
-+# define VIP_CNTRL_4_CCIR656      (1 << 4)
-+# define VIP_CNTRL_4_656_ALT      (1 << 5)
-+# define VIP_CNTRL_4_TST_656      (1 << 6)
-+# define VIP_CNTRL_4_TST_PAT      (1 << 7)
-+#define REG_VIP_CNTRL_5           REG(0x00, 0x25)     /* write */
-+# define VIP_CNTRL_5_CKCASE       (1 << 0)
-+# define VIP_CNTRL_5_SP_CNT(x)    (((x) & 3) << 1)
-+#define REG_MAT_CONTRL            REG(0x00, 0x80)     /* write */
-+# define MAT_CONTRL_MAT_SC(x)     (((x) & 3) << 0)
-+# define MAT_CONTRL_MAT_BP        (1 << 2)
-+#define REG_VIDFORMAT             REG(0x00, 0xa0)     /* write */
-+#define REG_REFPIX_MSB            REG(0x00, 0xa1)     /* write */
-+#define REG_REFPIX_LSB            REG(0x00, 0xa2)     /* write */
-+#define REG_REFLINE_MSB           REG(0x00, 0xa3)     /* write */
-+#define REG_REFLINE_LSB           REG(0x00, 0xa4)     /* write */
-+#define REG_NPIX_MSB              REG(0x00, 0xa5)     /* write */
-+#define REG_NPIX_LSB              REG(0x00, 0xa6)     /* write */
-+#define REG_NLINE_MSB             REG(0x00, 0xa7)     /* write */
-+#define REG_NLINE_LSB             REG(0x00, 0xa8)     /* write */
-+#define REG_VS_LINE_STRT_1_MSB    REG(0x00, 0xa9)     /* write */
-+#define REG_VS_LINE_STRT_1_LSB    REG(0x00, 0xaa)     /* write */
-+#define REG_VS_PIX_STRT_1_MSB     REG(0x00, 0xab)     /* write */
-+#define REG_VS_PIX_STRT_1_LSB     REG(0x00, 0xac)     /* write */
-+#define REG_VS_LINE_END_1_MSB     REG(0x00, 0xad)     /* write */
-+#define REG_VS_LINE_END_1_LSB     REG(0x00, 0xae)     /* write */
-+#define REG_VS_PIX_END_1_MSB      REG(0x00, 0xaf)     /* write */
-+#define REG_VS_PIX_END_1_LSB      REG(0x00, 0xb0)     /* write */
-+#define REG_VS_PIX_STRT_2_MSB     REG(0x00, 0xb3)     /* write */
-+#define REG_VS_PIX_STRT_2_LSB     REG(0x00, 0xb4)     /* write */
-+#define REG_VS_PIX_END_2_MSB      REG(0x00, 0xb7)     /* write */
-+#define REG_VS_PIX_END_2_LSB      REG(0x00, 0xb8)     /* write */
-+#define REG_HS_PIX_START_MSB      REG(0x00, 0xb9)     /* write */
-+#define REG_HS_PIX_START_LSB      REG(0x00, 0xba)     /* write */
-+#define REG_HS_PIX_STOP_MSB       REG(0x00, 0xbb)     /* write */
-+#define REG_HS_PIX_STOP_LSB       REG(0x00, 0xbc)     /* write */
-+#define REG_VWIN_START_1_MSB      REG(0x00, 0xbd)     /* write */
-+#define REG_VWIN_START_1_LSB      REG(0x00, 0xbe)     /* write */
-+#define REG_VWIN_END_1_MSB        REG(0x00, 0xbf)     /* write */
-+#define REG_VWIN_END_1_LSB        REG(0x00, 0xc0)     /* write */
-+#define REG_DE_START_MSB          REG(0x00, 0xc5)     /* write */
-+#define REG_DE_START_LSB          REG(0x00, 0xc6)     /* write */
-+#define REG_DE_STOP_MSB           REG(0x00, 0xc7)     /* write */
-+#define REG_DE_STOP_LSB           REG(0x00, 0xc8)     /* write */
-+#define REG_TBG_CNTRL_0           REG(0x00, 0xca)     /* write */
-+# define TBG_CNTRL_0_FRAME_DIS    (1 << 5)
-+# define TBG_CNTRL_0_SYNC_MTHD    (1 << 6)
-+# define TBG_CNTRL_0_SYNC_ONCE    (1 << 7)
-+#define REG_TBG_CNTRL_1           REG(0x00, 0xcb)     /* write */
-+# define TBG_CNTRL_1_VH_TGL_0     (1 << 0)
-+# define TBG_CNTRL_1_VH_TGL_1     (1 << 1)
-+# define TBG_CNTRL_1_VH_TGL_2     (1 << 2)
-+# define TBG_CNTRL_1_VHX_EXT_DE   (1 << 3)
-+# define TBG_CNTRL_1_VHX_EXT_HS   (1 << 4)
-+# define TBG_CNTRL_1_VHX_EXT_VS   (1 << 5)
-+# define TBG_CNTRL_1_DWIN_DIS     (1 << 6)
-+#define REG_ENABLE_SPACE          REG(0x00, 0xd6)     /* write */
-+#define REG_HVF_CNTRL_0           REG(0x00, 0xe4)     /* write */
-+# define HVF_CNTRL_0_SM           (1 << 7)
-+# define HVF_CNTRL_0_RWB          (1 << 6)
-+# define HVF_CNTRL_0_PREFIL(x)    (((x) & 3) << 2)
-+# define HVF_CNTRL_0_INTPOL(x)    (((x) & 3) << 0)
-+#define REG_HVF_CNTRL_1           REG(0x00, 0xe5)     /* write */
-+# define HVF_CNTRL_1_FOR          (1 << 0)
-+# define HVF_CNTRL_1_YUVBLK       (1 << 1)
-+# define HVF_CNTRL_1_VQR(x)       (((x) & 3) << 2)
-+# define HVF_CNTRL_1_PAD(x)       (((x) & 3) << 4)
-+# define HVF_CNTRL_1_SEMI_PLANAR  (1 << 6)
-+#define REG_RPT_CNTRL             REG(0x00, 0xf0)     /* write */
-+
-+
-+/* Page 02h: PLL settings */
-+#define REG_PLL_SERIAL_1          REG(0x02, 0x00)     /* read/write */
-+# define PLL_SERIAL_1_SRL_FDN     (1 << 0)
-+# define PLL_SERIAL_1_SRL_IZ(x)   (((x) & 3) << 1)
-+# define PLL_SERIAL_1_SRL_MAN_IZ  (1 << 6)
-+#define REG_PLL_SERIAL_2          REG(0x02, 0x01)     /* read/write */
-+# define PLL_SERIAL_2_SRL_NOSC(x) (((x) & 3) << 0)
-+# define PLL_SERIAL_2_SRL_PR(x)   (((x) & 0xf) << 4)
-+#define REG_PLL_SERIAL_3          REG(0x02, 0x02)     /* read/write */
-+# define PLL_SERIAL_3_SRL_CCIR    (1 << 0)
-+# define PLL_SERIAL_3_SRL_DE      (1 << 2)
-+# define PLL_SERIAL_3_SRL_PXIN_SEL (1 << 4)
-+#define REG_SERIALIZER            REG(0x02, 0x03)     /* read/write */
-+#define REG_BUFFER_OUT            REG(0x02, 0x04)     /* read/write */
-+#define REG_PLL_SCG1              REG(0x02, 0x05)     /* read/write */
-+#define REG_PLL_SCG2              REG(0x02, 0x06)     /* read/write */
-+#define REG_PLL_SCGN1             REG(0x02, 0x07)     /* read/write */
-+#define REG_PLL_SCGN2             REG(0x02, 0x08)     /* read/write */
-+#define REG_PLL_SCGR1             REG(0x02, 0x09)     /* read/write */
-+#define REG_PLL_SCGR2             REG(0x02, 0x0a)     /* read/write */
-+#define REG_AUDIO_DIV             REG(0x02, 0x0e)     /* read/write */
-+#define REG_SEL_CLK               REG(0x02, 0x11)     /* read/write */
-+# define SEL_CLK_SEL_CLK1         (1 << 0)
-+# define SEL_CLK_SEL_VRF_CLK(x)   (((x) & 3) << 1)
-+# define SEL_CLK_ENA_SC_CLK       (1 << 3)
-+#define REG_ANA_GENERAL           REG(0x02, 0x12)     /* read/write */
-+
-+
-+/* Page 09h: EDID Control */
-+#define REG_EDID_DATA_0           REG(0x09, 0x00)     /* read */
-+/* next 127 successive registers are the EDID block */
-+#define REG_EDID_CTRL             REG(0x09, 0xfa)     /* read/write */
-+#define REG_DDC_ADDR              REG(0x09, 0xfb)     /* read/write */
-+#define REG_DDC_OFFS              REG(0x09, 0xfc)     /* read/write */
-+#define REG_DDC_SEGM_ADDR         REG(0x09, 0xfd)     /* read/write */
-+#define REG_DDC_SEGM              REG(0x09, 0xfe)     /* read/write */
-+
-+
-+/* Page 10h: information frames and packets */
-+
-+
-+/* Page 11h: audio settings and content info packets */
-+#define REG_AIP_CNTRL_0           REG(0x11, 0x00)     /* read/write */
-+# define AIP_CNTRL_0_RST_FIFO     (1 << 0)
-+# define AIP_CNTRL_0_SWAP         (1 << 1)
-+# define AIP_CNTRL_0_LAYOUT       (1 << 2)
-+# define AIP_CNTRL_0_ACR_MAN      (1 << 5)
-+# define AIP_CNTRL_0_RST_CTS      (1 << 6)
-+#define REG_ENC_CNTRL             REG(0x11, 0x0d)     /* read/write */
-+# define ENC_CNTRL_RST_ENC        (1 << 0)
-+# define ENC_CNTRL_RST_SEL        (1 << 1)
-+# define ENC_CNTRL_CTL_CODE(x)    (((x) & 3) << 2)
-+
-+
-+/* Page 12h: HDCP and OTP */
-+#define REG_TX3                   REG(0x12, 0x9a)     /* read/write */
-+#define REG_TX33                  REG(0x12, 0xb8)     /* read/write */
-+# define TX33_HDMI                (1 << 1)
-+
-+
-+/* Page 13h: Gamut related metadata packets */
-+
-+
-+
-+/* CEC registers: (not paged)
-+ */
-+#define REG_CEC_FRO_IM_CLK_CTRL   0xfb                /* read/write */
-+# define CEC_FRO_IM_CLK_CTRL_GHOST_DIS (1 << 7)
-+# define CEC_FRO_IM_CLK_CTRL_ENA_OTP   (1 << 6)
-+# define CEC_FRO_IM_CLK_CTRL_IMCLK_SEL (1 << 1)
-+# define CEC_FRO_IM_CLK_CTRL_FRO_DIV   (1 << 0)
-+#define REG_CEC_RXSHPDLEV         0xfe                /* read */
-+# define CEC_RXSHPDLEV_RXSENS     (1 << 0)
-+# define CEC_RXSHPDLEV_HPD        (1 << 1)
-+
-+#define REG_CEC_ENAMODS           0xff                /* read/write */
-+# define CEC_ENAMODS_DIS_FRO      (1 << 6)
-+# define CEC_ENAMODS_DIS_CCLK     (1 << 5)
-+# define CEC_ENAMODS_EN_RXSENS    (1 << 2)
-+# define CEC_ENAMODS_EN_HDMI      (1 << 1)
-+# define CEC_ENAMODS_EN_CEC       (1 << 0)
-+
-+
-+/* Device versions: */
-+#define TDA9989N2                 0x0101
-+#define TDA19989                  0x0201
-+#define TDA19989N2                0x0202
-+#define TDA19988                  0x0301
-+
-+static void
-+cec_write(struct drm_encoder *encoder, uint16_t addr, uint8_t val)
-+{
-+	struct i2c_client *client = to_tda998x_priv(encoder)->cec;
-+	uint8_t buf[] = {addr, val};
-+	int ret;
-+
-+	ret = i2c_master_send(client, buf, ARRAY_SIZE(buf));
-+	if (ret < 0)
-+		dev_err(&client->dev, "Error %d writing to cec:0x%x\n", ret, addr);
-+}
-+
-+static uint8_t
-+cec_read(struct drm_encoder *encoder, uint8_t addr)
-+{
-+	struct i2c_client *client = to_tda998x_priv(encoder)->cec;
-+	uint8_t val;
-+	int ret;
-+
-+	ret = i2c_master_send(client, &addr, sizeof(addr));
-+	if (ret < 0)
-+		goto fail;
-+
-+	ret = i2c_master_recv(client, &val, sizeof(val));
-+	if (ret < 0)
-+		goto fail;
-+
-+	return val;
-+
-+fail:
-+	dev_err(&client->dev, "Error %d reading from cec:0x%x\n", ret, addr);
-+	return 0;
-+}
-+
-+static void
-+set_page(struct drm_encoder *encoder, uint16_t reg)
-+{
-+	struct tda998x_priv *priv = to_tda998x_priv(encoder);
-+
-+	if (REG2PAGE(reg) != priv->current_page) {
-+		struct i2c_client *client = drm_i2c_encoder_get_client(encoder);
-+		uint8_t buf[] = {
-+				REG_CURPAGE, REG2PAGE(reg)
-+		};
-+		int ret = i2c_master_send(client, buf, sizeof(buf));
-+		if (ret < 0)
-+			dev_err(&client->dev, "Error %d writing to REG_CURPAGE\n", ret);
-+
-+		priv->current_page = REG2PAGE(reg);
-+	}
-+}
-+
-+static int
-+reg_read_range(struct drm_encoder *encoder, uint16_t reg, char *buf, int cnt)
-+{
-+	struct i2c_client *client = drm_i2c_encoder_get_client(encoder);
-+	uint8_t addr = REG2ADDR(reg);
-+	int ret;
-+
-+	set_page(encoder, reg);
-+
-+	ret = i2c_master_send(client, &addr, sizeof(addr));
-+	if (ret < 0)
-+		goto fail;
-+
-+	ret = i2c_master_recv(client, buf, cnt);
-+	if (ret < 0)
-+		goto fail;
-+
-+	return ret;
-+
-+fail:
-+	dev_err(&client->dev, "Error %d reading from 0x%x\n", ret, reg);
-+	return ret;
-+}
-+
-+static uint8_t
-+reg_read(struct drm_encoder *encoder, uint16_t reg)
-+{
-+	uint8_t val = 0;
-+	reg_read_range(encoder, reg, &val, sizeof(val));
-+	return val;
-+}
-+
-+static void
-+reg_write(struct drm_encoder *encoder, uint16_t reg, uint8_t val)
-+{
-+	struct i2c_client *client = drm_i2c_encoder_get_client(encoder);
-+	uint8_t buf[] = {REG2ADDR(reg), val};
-+	int ret;
-+
-+	set_page(encoder, reg);
-+
-+	ret = i2c_master_send(client, buf, ARRAY_SIZE(buf));
-+	if (ret < 0)
-+		dev_err(&client->dev, "Error %d writing to 0x%x\n", ret, reg);
-+}
-+
-+static void
-+reg_write16(struct drm_encoder *encoder, uint16_t reg, uint16_t val)
-+{
-+	struct i2c_client *client = drm_i2c_encoder_get_client(encoder);
-+	uint8_t buf[] = {REG2ADDR(reg), val >> 8, val};
-+	int ret;
-+
-+	set_page(encoder, reg);
-+
-+	ret = i2c_master_send(client, buf, ARRAY_SIZE(buf));
-+	if (ret < 0)
-+		dev_err(&client->dev, "Error %d writing to 0x%x\n", ret, reg);
-+}
-+
-+static void
-+reg_set(struct drm_encoder *encoder, uint16_t reg, uint8_t val)
-+{
-+	reg_write(encoder, reg, reg_read(encoder, reg) | val);
-+}
-+
-+static void
-+reg_clear(struct drm_encoder *encoder, uint16_t reg, uint8_t val)
-+{
-+	reg_write(encoder, reg, reg_read(encoder, reg) & ~val);
-+}
-+
-+static void
-+tda998x_reset(struct drm_encoder *encoder)
-+{
-+	/* reset audio and i2c master: */
-+	reg_set(encoder, REG_SOFTRESET, SOFTRESET_AUDIO | SOFTRESET_I2C_MASTER);
-+	msleep(50);
-+	reg_clear(encoder, REG_SOFTRESET, SOFTRESET_AUDIO | SOFTRESET_I2C_MASTER);
-+	msleep(50);
-+
-+	/* reset transmitter: */
-+	reg_set(encoder, REG_MAIN_CNTRL0, MAIN_CNTRL0_SR);
-+	reg_clear(encoder, REG_MAIN_CNTRL0, MAIN_CNTRL0_SR);
-+
-+	/* PLL registers common configuration */
-+	reg_write(encoder, REG_PLL_SERIAL_1, 0x00);
-+	reg_write(encoder, REG_PLL_SERIAL_2, PLL_SERIAL_2_SRL_NOSC(1));
-+	reg_write(encoder, REG_PLL_SERIAL_3, 0x00);
-+	reg_write(encoder, REG_SERIALIZER,   0x00);
-+	reg_write(encoder, REG_BUFFER_OUT,   0x00);
-+	reg_write(encoder, REG_PLL_SCG1,     0x00);
-+	reg_write(encoder, REG_AUDIO_DIV,    0x03);
-+	reg_write(encoder, REG_SEL_CLK,      SEL_CLK_SEL_CLK1 | SEL_CLK_ENA_SC_CLK);
-+	reg_write(encoder, REG_PLL_SCGN1,    0xfa);
-+	reg_write(encoder, REG_PLL_SCGN2,    0x00);
-+	reg_write(encoder, REG_PLL_SCGR1,    0x5b);
-+	reg_write(encoder, REG_PLL_SCGR2,    0x00);
-+	reg_write(encoder, REG_PLL_SCG2,     0x10);
-+}
-+
-+/* DRM encoder functions */
-+
-+static void
-+tda998x_encoder_set_config(struct drm_encoder *encoder, void *params)
-+{
-+}
-+
-+static void
-+tda998x_encoder_dpms(struct drm_encoder *encoder, int mode)
-+{
-+	struct tda998x_priv *priv = to_tda998x_priv(encoder);
-+
-+	/* we only care about on or off: */
-+	if (mode != DRM_MODE_DPMS_ON)
-+		mode = DRM_MODE_DPMS_OFF;
-+
-+	if (mode == priv->dpms)
-+		return;
-+
-+	switch (mode) {
-+	case DRM_MODE_DPMS_ON:
-+		/* enable audio and video ports */
-+		reg_write(encoder, REG_ENA_AP, 0xff);
-+		reg_write(encoder, REG_ENA_VP_0, 0xff);
-+		reg_write(encoder, REG_ENA_VP_1, 0xff);
-+		reg_write(encoder, REG_ENA_VP_2, 0xff);
-+		/* set muxing after enabling ports: */
-+		reg_write(encoder, REG_VIP_CNTRL_0,
-+				VIP_CNTRL_0_SWAP_A(2) | VIP_CNTRL_0_SWAP_B(3));
-+		reg_write(encoder, REG_VIP_CNTRL_1,
-+				VIP_CNTRL_1_SWAP_C(0) | VIP_CNTRL_1_SWAP_D(1));
-+		reg_write(encoder, REG_VIP_CNTRL_2,
-+				VIP_CNTRL_2_SWAP_E(4) | VIP_CNTRL_2_SWAP_F(5));
-+		break;
-+	case DRM_MODE_DPMS_OFF:
-+		/* disable audio and video ports */
-+		reg_write(encoder, REG_ENA_AP, 0x00);
-+		reg_write(encoder, REG_ENA_VP_0, 0x00);
-+		reg_write(encoder, REG_ENA_VP_1, 0x00);
-+		reg_write(encoder, REG_ENA_VP_2, 0x00);
-+		break;
-+	}
-+
-+	priv->dpms = mode;
-+}
-+
-+static void
-+tda998x_encoder_save(struct drm_encoder *encoder)
-+{
-+	DBG("");
-+}
-+
-+static void
-+tda998x_encoder_restore(struct drm_encoder *encoder)
-+{
-+	DBG("");
-+}
-+
-+static bool
-+tda998x_encoder_mode_fixup(struct drm_encoder *encoder,
-+			  const struct drm_display_mode *mode,
-+			  struct drm_display_mode *adjusted_mode)
-+{
-+	return true;
-+}
-+
-+static int
-+tda998x_encoder_mode_valid(struct drm_encoder *encoder,
-+			  struct drm_display_mode *mode)
-+{
-+	return MODE_OK;
-+}
-+
-+static void
-+tda998x_encoder_mode_set(struct drm_encoder *encoder,
-+			struct drm_display_mode *mode,
-+			struct drm_display_mode *adjusted_mode)
-+{
-+	struct tda998x_priv *priv = to_tda998x_priv(encoder);
-+	uint16_t hs_start, hs_end, line_start, line_end;
-+	uint16_t vwin_start, vwin_end, de_start, de_end;
-+	uint16_t ref_pix, ref_line, pix_start2;
-+	uint8_t reg, div, rep;
-+
-+	hs_start   = mode->hsync_start - mode->hdisplay;
-+	hs_end     = mode->hsync_end - mode->hdisplay;
-+	line_start = 1;
-+	line_end   = 1 + mode->vsync_end - mode->vsync_start;
-+	vwin_start = mode->vtotal - mode->vsync_start;
-+	vwin_end   = vwin_start + mode->vdisplay;
-+	de_start   = mode->htotal - mode->hdisplay;
-+	de_end     = mode->htotal;
-+
-+	pix_start2 = 0;
-+	if (mode->flags & DRM_MODE_FLAG_INTERLACE)
-+		pix_start2 = (mode->htotal / 2) + hs_start;
-+
-+	/* TODO how is this value calculated?  It is 2 for all common
-+	 * formats in the tables in out of tree nxp driver (assuming
-+	 * I've properly deciphered their byzantine table system)
-+	 */
-+	ref_line = 2;
-+
-+	/* this might changes for other color formats from the CRTC: */
-+	ref_pix = 3 + hs_start;
-+
-+	div = 148500 / mode->clock;
-+
-+	DBG("clock=%d, div=%u", mode->clock, div);
-+	DBG("hs_start=%u, hs_end=%u, line_start=%u, line_end=%u",
-+			hs_start, hs_end, line_start, line_end);
-+	DBG("vwin_start=%u, vwin_end=%u, de_start=%u, de_end=%u",
-+			vwin_start, vwin_end, de_start, de_end);
-+	DBG("ref_line=%u, ref_pix=%u, pix_start2=%u",
-+			ref_line, ref_pix, pix_start2);
-+
-+	/* mute the audio FIFO: */
-+	reg_set(encoder, REG_AIP_CNTRL_0, AIP_CNTRL_0_RST_FIFO);
-+
-+	/* set HDMI HDCP mode off: */
-+	reg_set(encoder, REG_TBG_CNTRL_1, TBG_CNTRL_1_DWIN_DIS);
-+	reg_clear(encoder, REG_TX33, TX33_HDMI);
-+
-+	reg_write(encoder, REG_ENC_CNTRL, ENC_CNTRL_CTL_CODE(0));
-+	/* no pre-filter or interpolator: */
-+	reg_write(encoder, REG_HVF_CNTRL_0, HVF_CNTRL_0_PREFIL(0) |
-+			HVF_CNTRL_0_INTPOL(0));
-+	reg_write(encoder, REG_VIP_CNTRL_5, VIP_CNTRL_5_SP_CNT(0));
-+	reg_write(encoder, REG_VIP_CNTRL_4, VIP_CNTRL_4_BLANKIT(0) |
-+			VIP_CNTRL_4_BLC(0));
-+	reg_clear(encoder, REG_PLL_SERIAL_3, PLL_SERIAL_3_SRL_CCIR);
-+
-+	reg_clear(encoder, REG_PLL_SERIAL_1, PLL_SERIAL_1_SRL_MAN_IZ);
-+	reg_clear(encoder, REG_PLL_SERIAL_3, PLL_SERIAL_3_SRL_DE);
-+	reg_write(encoder, REG_SERIALIZER, 0);
-+	reg_write(encoder, REG_HVF_CNTRL_1, HVF_CNTRL_1_VQR(0));
-+
-+	/* TODO enable pixel repeat for pixel rates less than 25Msamp/s */
-+	rep = 0;
-+	reg_write(encoder, REG_RPT_CNTRL, 0);
-+	reg_write(encoder, REG_SEL_CLK, SEL_CLK_SEL_VRF_CLK(0) |
-+			SEL_CLK_SEL_CLK1 | SEL_CLK_ENA_SC_CLK);
-+
-+	reg_write(encoder, REG_PLL_SERIAL_2, PLL_SERIAL_2_SRL_NOSC(div) |
-+			PLL_SERIAL_2_SRL_PR(rep));
-+
-+	reg_write16(encoder, REG_VS_PIX_STRT_2_MSB, pix_start2);
-+	reg_write16(encoder, REG_VS_PIX_END_2_MSB, pix_start2);
-+
-+	/* set color matrix bypass flag: */
-+	reg_set(encoder, REG_MAT_CONTRL, MAT_CONTRL_MAT_BP);
-+
-+	/* set BIAS tmds value: */
-+	reg_write(encoder, REG_ANA_GENERAL, 0x09);
-+
-+	reg_clear(encoder, REG_TBG_CNTRL_0, TBG_CNTRL_0_SYNC_MTHD);
-+
-+	reg_write(encoder, REG_VIP_CNTRL_3, 0);
-+	reg_set(encoder, REG_VIP_CNTRL_3, VIP_CNTRL_3_SYNC_HS);
-+	if (mode->flags & DRM_MODE_FLAG_NVSYNC)
-+		reg_set(encoder, REG_VIP_CNTRL_3, VIP_CNTRL_3_V_TGL);
-+
-+	if (mode->flags & DRM_MODE_FLAG_NHSYNC)
-+		reg_set(encoder, REG_VIP_CNTRL_3, VIP_CNTRL_3_H_TGL);
-+
-+	reg_write(encoder, REG_VIDFORMAT, 0x00);
-+	reg_write16(encoder, REG_NPIX_MSB, mode->hdisplay - 1);
-+	reg_write16(encoder, REG_NLINE_MSB, mode->vdisplay - 1);
-+	reg_write16(encoder, REG_VS_LINE_STRT_1_MSB, line_start);
-+	reg_write16(encoder, REG_VS_LINE_END_1_MSB, line_end);
-+	reg_write16(encoder, REG_VS_PIX_STRT_1_MSB, hs_start);
-+	reg_write16(encoder, REG_VS_PIX_END_1_MSB, hs_start);
-+	reg_write16(encoder, REG_HS_PIX_START_MSB, hs_start);
-+	reg_write16(encoder, REG_HS_PIX_STOP_MSB, hs_end);
-+	reg_write16(encoder, REG_VWIN_START_1_MSB, vwin_start);
-+	reg_write16(encoder, REG_VWIN_END_1_MSB, vwin_end);
-+	reg_write16(encoder, REG_DE_START_MSB, de_start);
-+	reg_write16(encoder, REG_DE_STOP_MSB, de_end);
-+
-+	if (priv->rev == TDA19988) {
-+		/* let incoming pixels fill the active space (if any) */
-+		reg_write(encoder, REG_ENABLE_SPACE, 0x01);
-+	}
-+
-+	reg_write16(encoder, REG_REFPIX_MSB, ref_pix);
-+	reg_write16(encoder, REG_REFLINE_MSB, ref_line);
-+
-+	reg = TBG_CNTRL_1_VHX_EXT_DE |
-+			TBG_CNTRL_1_VHX_EXT_HS |
-+			TBG_CNTRL_1_VHX_EXT_VS |
-+			TBG_CNTRL_1_DWIN_DIS | /* HDCP off */
-+			TBG_CNTRL_1_VH_TGL_2;
-+	if (mode->flags & (DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC))
-+		reg |= TBG_CNTRL_1_VH_TGL_0;
-+	reg_set(encoder, REG_TBG_CNTRL_1, reg);
-+
-+	/* must be last register set: */
-+	reg_clear(encoder, REG_TBG_CNTRL_0, TBG_CNTRL_0_SYNC_ONCE);
-+}
-+
-+static enum drm_connector_status
-+tda998x_encoder_detect(struct drm_encoder *encoder,
-+		      struct drm_connector *connector)
-+{
-+	uint8_t val = cec_read(encoder, REG_CEC_RXSHPDLEV);
-+	return (val & CEC_RXSHPDLEV_HPD) ? connector_status_connected :
-+			connector_status_disconnected;
-+}
-+
-+static int
-+read_edid_block(struct drm_encoder *encoder, uint8_t *buf, int blk)
-+{
-+	uint8_t offset, segptr;
-+	int ret, i;
-+
-+	/* enable EDID read irq: */
-+	reg_set(encoder, REG_INT_FLAGS_2, INT_FLAGS_2_EDID_BLK_RD);
-+
-+	offset = (blk & 1) ? 128 : 0;
-+	segptr = blk / 2;
-+
-+	reg_write(encoder, REG_DDC_ADDR, 0xa0);
-+	reg_write(encoder, REG_DDC_OFFS, offset);
-+	reg_write(encoder, REG_DDC_SEGM_ADDR, 0x60);
-+	reg_write(encoder, REG_DDC_SEGM, segptr);
-+
-+	/* enable reading EDID: */
-+	reg_write(encoder, REG_EDID_CTRL, 0x1);
-+
-+	/* flag must be cleared by sw: */
-+	reg_write(encoder, REG_EDID_CTRL, 0x0);
-+
-+	/* wait for block read to complete: */
-+	for (i = 100; i > 0; i--) {
-+		uint8_t val = reg_read(encoder, REG_INT_FLAGS_2);
-+		if (val & INT_FLAGS_2_EDID_BLK_RD)
-+			break;
-+		msleep(1);
-+	}
-+
-+	if (i == 0)
-+		return -ETIMEDOUT;
-+
-+	ret = reg_read_range(encoder, REG_EDID_DATA_0, buf, EDID_LENGTH);
-+	if (ret != EDID_LENGTH) {
-+		dev_err(encoder->dev->dev, "failed to read edid block %d: %d",
-+				blk, ret);
-+		return ret;
-+	}
-+
-+	reg_clear(encoder, REG_INT_FLAGS_2, INT_FLAGS_2_EDID_BLK_RD);
-+
-+	return 0;
-+}
-+
-+static uint8_t *
-+do_get_edid(struct drm_encoder *encoder)
-+{
-+	int j = 0, valid_extensions = 0;
-+	uint8_t *block, *new;
-+	bool print_bad_edid = drm_debug & DRM_UT_KMS;
-+
-+	if ((block = kmalloc(EDID_LENGTH, GFP_KERNEL)) == NULL)
-+		return NULL;
-+
-+	/* base block fetch */
-+	if (read_edid_block(encoder, block, 0))
-+		goto fail;
-+
-+	if (!drm_edid_block_valid(block, 0, print_bad_edid))
-+		goto fail;
-+
-+	/* if there's no extensions, we're done */
-+	if (block[0x7e] == 0)
-+		return block;
-+
-+	new = krealloc(block, (block[0x7e] + 1) * EDID_LENGTH, GFP_KERNEL);
-+	if (!new)
-+		goto fail;
-+	block = new;
-+
-+	for (j = 1; j <= block[0x7e]; j++) {
-+		uint8_t *ext_block = block + (valid_extensions + 1) * EDID_LENGTH;
-+		if (read_edid_block(encoder, ext_block, j))
-+			goto fail;
-+
-+		if (!drm_edid_block_valid(ext_block, j, print_bad_edid))
-+			goto fail;
-+
-+		valid_extensions++;
-+	}
-+
-+	if (valid_extensions != block[0x7e]) {
-+		block[EDID_LENGTH-1] += block[0x7e] - valid_extensions;
-+		block[0x7e] = valid_extensions;
-+		new = krealloc(block, (valid_extensions + 1) * EDID_LENGTH, GFP_KERNEL);
-+		if (!new)
-+			goto fail;
-+		block = new;
-+	}
-+
-+	return block;
-+
-+fail:
-+	dev_warn(encoder->dev->dev, "failed to read EDID\n");
-+	kfree(block);
-+	return NULL;
-+}
-+
-+static int
-+tda998x_encoder_get_modes(struct drm_encoder *encoder,
-+			 struct drm_connector *connector)
-+{
-+	struct edid *edid = (struct edid *)do_get_edid(encoder);
-+	int n = 0;
-+
-+	if (edid) {
-+		drm_mode_connector_update_edid_property(connector, edid);
-+		n = drm_add_edid_modes(connector, edid);
-+		kfree(edid);
-+	}
-+
-+	return n;
-+}
-+
-+static int
-+tda998x_encoder_create_resources(struct drm_encoder *encoder,
-+				struct drm_connector *connector)
-+{
-+	DBG("");
-+	return 0;
-+}
-+
-+static int
-+tda998x_encoder_set_property(struct drm_encoder *encoder,
-+			    struct drm_connector *connector,
-+			    struct drm_property *property,
-+			    uint64_t val)
-+{
-+	DBG("");
-+	return 0;
-+}
-+
-+static void
-+tda998x_encoder_destroy(struct drm_encoder *encoder)
-+{
-+	struct tda998x_priv *priv = to_tda998x_priv(encoder);
-+	drm_i2c_encoder_destroy(encoder);
-+	kfree(priv);
-+}
-+
-+static struct drm_encoder_slave_funcs tda998x_encoder_funcs = {
-+	.set_config = tda998x_encoder_set_config,
-+	.destroy = tda998x_encoder_destroy,
-+	.dpms = tda998x_encoder_dpms,
-+	.save = tda998x_encoder_save,
-+	.restore = tda998x_encoder_restore,
-+	.mode_fixup = tda998x_encoder_mode_fixup,
-+	.mode_valid = tda998x_encoder_mode_valid,
-+	.mode_set = tda998x_encoder_mode_set,
-+	.detect = tda998x_encoder_detect,
-+	.get_modes = tda998x_encoder_get_modes,
-+	.create_resources = tda998x_encoder_create_resources,
-+	.set_property = tda998x_encoder_set_property,
-+};
-+
-+/* I2C driver functions */
-+
-+static int
-+tda998x_probe(struct i2c_client *client, const struct i2c_device_id *id)
-+{
-+	return 0;
-+}
-+
-+static int
-+tda998x_remove(struct i2c_client *client)
-+{
-+	return 0;
-+}
-+
-+static int
-+tda998x_encoder_init(struct i2c_client *client,
-+		    struct drm_device *dev,
-+		    struct drm_encoder_slave *encoder_slave)
-+{
-+	struct drm_encoder *encoder = &encoder_slave->base;
-+	struct tda998x_priv *priv;
-+
-+	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
-+	if (!priv)
-+		return -ENOMEM;
-+
-+	priv->current_page = 0;
-+	priv->cec = i2c_new_dummy(client->adapter, 0x34);
-+	priv->dpms = DRM_MODE_DPMS_OFF;
-+
-+	encoder_slave->slave_priv = priv;
-+	encoder_slave->slave_funcs = &tda998x_encoder_funcs;
-+
-+	/* wake up the device: */
-+	cec_write(encoder, REG_CEC_ENAMODS,
-+			CEC_ENAMODS_EN_RXSENS | CEC_ENAMODS_EN_HDMI);
-+
-+	tda998x_reset(encoder);
-+
-+	/* read version: */
-+	priv->rev = reg_read(encoder, REG_VERSION_LSB) |
-+			reg_read(encoder, REG_VERSION_MSB) << 8;
-+
-+	/* mask off feature bits: */
-+	priv->rev &= ~0x30; /* not-hdcp and not-scalar bit */
-+
-+	switch (priv->rev) {
-+	case TDA9989N2:  dev_info(dev->dev, "found TDA9989 n2");  break;
-+	case TDA19989:   dev_info(dev->dev, "found TDA19989");    break;
-+	case TDA19989N2: dev_info(dev->dev, "found TDA19989 n2"); break;
-+	case TDA19988:   dev_info(dev->dev, "found TDA19988");    break;
-+	default:
-+		DBG("found unsupported device: %04x", priv->rev);
-+		goto fail;
-+	}
-+
-+	/* after reset, enable DDC: */
-+	reg_write(encoder, REG_DDC_DISABLE, 0x00);
-+
-+	/* set clock on DDC channel: */
-+	reg_write(encoder, REG_TX3, 39);
-+
-+	/* if necessary, disable multi-master: */
-+	if (priv->rev == TDA19989)
-+		reg_set(encoder, REG_I2C_MASTER, I2C_MASTER_DIS_MM);
-+
-+	cec_write(encoder, REG_CEC_FRO_IM_CLK_CTRL,
-+			CEC_FRO_IM_CLK_CTRL_GHOST_DIS | CEC_FRO_IM_CLK_CTRL_IMCLK_SEL);
-+
-+	return 0;
-+
-+fail:
-+	/* if encoder_init fails, the encoder slave is never registered,
-+	 * so cleanup here:
-+	 */
-+	if (priv->cec)
-+		i2c_unregister_device(priv->cec);
-+	kfree(priv);
-+	encoder_slave->slave_priv = NULL;
-+	encoder_slave->slave_funcs = NULL;
-+	return -ENXIO;
-+}
-+
-+static struct i2c_device_id tda998x_ids[] = {
-+	{ "tda998x", 0 },
-+	{ }
-+};
-+MODULE_DEVICE_TABLE(i2c, tda998x_ids);
-+
-+static struct drm_i2c_encoder_driver tda998x_driver = {
-+	.i2c_driver = {
-+		.probe = tda998x_probe,
-+		.remove = tda998x_remove,
-+		.driver = {
-+			.name = "tda998x",
-+		},
-+		.id_table = tda998x_ids,
-+	},
-+	.encoder_init = tda998x_encoder_init,
-+};
-+
-+/* Module initialization */
-+
-+static int __init
-+tda998x_init(void)
-+{
-+	DBG("");
-+	return drm_i2c_encoder_register(THIS_MODULE, &tda998x_driver);
-+}
-+
-+static void __exit
-+tda998x_exit(void)
-+{
-+	DBG("");
-+	drm_i2c_encoder_unregister(&tda998x_driver);
-+}
-+
-+MODULE_AUTHOR("Rob Clark <robdclark@gmail.com");
-+MODULE_DESCRIPTION("NXP Semiconductors TDA998X HDMI Encoder");
-+MODULE_LICENSE("GPL");
-+
-+module_init(tda998x_init);
-+module_exit(tda998x_exit);
--- 
-1.8.1
-
diff --git a/patches/drm/0009-drm-tilcdc-add-encoder-slave.patch b/patches/drm/0009-drm-tilcdc-add-encoder-slave.patch
deleted file mode 100644
index 97e32bb3246b242b3c2d2b8b38f2a1cd32448cd4..0000000000000000000000000000000000000000
--- a/patches/drm/0009-drm-tilcdc-add-encoder-slave.patch
+++ /dev/null
@@ -1,479 +0,0 @@
-From 1a55417721309e80fe5dceb819fc5e3f7ea370bc Mon Sep 17 00:00:00 2001
-From: Rob Clark <robdclark@gmail.com>
-Date: Tue, 22 Jan 2013 16:02:21 -0600
-Subject: [PATCH 09/11] drm/tilcdc: add encoder slave
-
-Add output panel driver for i2c encoder slaves.
-
-Signed-off-by: Rob Clark <robdclark@gmail.com>
----
- drivers/gpu/drm/tilcdc/Makefile       |   1 +
- drivers/gpu/drm/tilcdc/tilcdc_drv.c   |   5 +-
- drivers/gpu/drm/tilcdc/tilcdc_slave.c | 376 ++++++++++++++++++++++++++++++++++
- drivers/gpu/drm/tilcdc/tilcdc_slave.h |  26 +++
- 4 files changed, 407 insertions(+), 1 deletion(-)
- create mode 100644 drivers/gpu/drm/tilcdc/tilcdc_slave.c
- create mode 100644 drivers/gpu/drm/tilcdc/tilcdc_slave.h
-
-diff --git a/drivers/gpu/drm/tilcdc/Makefile b/drivers/gpu/drm/tilcdc/Makefile
-index 1359cc2..aa9097e 100644
---- a/drivers/gpu/drm/tilcdc/Makefile
-+++ b/drivers/gpu/drm/tilcdc/Makefile
-@@ -3,6 +3,7 @@ ccflags-y := -Iinclude/drm -Werror
- tilcdc-y := \
- 	tilcdc_crtc.o \
- 	tilcdc_tfp410.o \
-+	tilcdc_slave.o \
- 	tilcdc_drv.o
- 
- obj-$(CONFIG_DRM_TILCDC)	+= tilcdc.o
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
-index f6defbf..25f3add 100644
---- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
-@@ -20,6 +20,7 @@
- #include "tilcdc_drv.h"
- #include "tilcdc_regs.h"
- #include "tilcdc_tfp410.h"
-+#include "tilcdc_slave.h"
- 
- #include "drm_fb_helper.h"
- 
-@@ -587,6 +588,7 @@ static int __init tilcdc_drm_init(void)
- {
- 	DBG("init");
- 	tilcdc_tfp410_init();
-+	tilcdc_slave_init();
- 	return platform_driver_register(&tilcdc_platform_driver);
- }
- 
-@@ -594,10 +596,11 @@ static void __exit tilcdc_drm_fini(void)
- {
- 	DBG("fini");
- 	tilcdc_tfp410_fini();
-+	tilcdc_slave_fini();
- 	platform_driver_unregister(&tilcdc_platform_driver);
- }
- 
--module_init(tilcdc_drm_init);
-+late_initcall(tilcdc_drm_init);
- module_exit(tilcdc_drm_fini);
- 
- MODULE_AUTHOR("Rob Clark <robdclark@gmail.com");
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_slave.c b/drivers/gpu/drm/tilcdc/tilcdc_slave.c
-new file mode 100644
-index 0000000..7d05c3d
---- /dev/null
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_slave.c
-@@ -0,0 +1,376 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments
-+ * Author: Rob Clark <robdclark@gmail.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published by
-+ * the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-+ * more details.
-+ *
-+ * You should have received a copy of the GNU General Public License along with
-+ * this program.  If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+#include <linux/i2c.h>
-+#include <linux/of_i2c.h>
-+#include <linux/pinctrl/pinmux.h>
-+#include <linux/pinctrl/consumer.h>
-+#include <drm/drm_encoder_slave.h>
-+
-+#include "tilcdc_drv.h"
-+
-+struct slave_module {
-+	struct tilcdc_module base;
-+	struct i2c_adapter *i2c;
-+};
-+#define to_slave_module(x) container_of(x, struct slave_module, base)
-+
-+static const struct tilcdc_panel_info slave_info = {
-+		.bpp                    = 16,
-+		.ac_bias                = 255,
-+		.ac_bias_intrpt         = 0,
-+		.dma_burst_sz           = 16,
-+		.fdd                    = 0x80,
-+		.tft_alt_mode           = 0,
-+		.sync_edge              = 0,
-+		.sync_ctrl              = 1,
-+		.raster_order           = 0,
-+};
-+
-+
-+/*
-+ * Encoder:
-+ */
-+
-+struct slave_encoder {
-+	struct drm_encoder_slave base;
-+	struct slave_module *mod;
-+};
-+#define to_slave_encoder(x) container_of(to_encoder_slave(x), struct slave_encoder, base)
-+
-+static inline struct drm_encoder_slave_funcs *
-+get_slave_funcs(struct drm_encoder *enc)
-+{
-+	return to_encoder_slave(enc)->slave_funcs;
-+}
-+
-+static void slave_encoder_destroy(struct drm_encoder *encoder)
-+{
-+	struct slave_encoder *slave_encoder = to_slave_encoder(encoder);
-+	if (get_slave_funcs(encoder))
-+		get_slave_funcs(encoder)->destroy(encoder);
-+	drm_encoder_cleanup(encoder);
-+	kfree(slave_encoder);
-+}
-+
-+static void slave_encoder_prepare(struct drm_encoder *encoder)
-+{
-+	drm_i2c_encoder_prepare(encoder);
-+	tilcdc_crtc_set_panel_info(encoder->crtc, &slave_info);
-+}
-+
-+static const struct drm_encoder_funcs slave_encoder_funcs = {
-+		.destroy        = slave_encoder_destroy,
-+};
-+
-+static const struct drm_encoder_helper_funcs slave_encoder_helper_funcs = {
-+		.dpms           = drm_i2c_encoder_dpms,
-+		.mode_fixup     = drm_i2c_encoder_mode_fixup,
-+		.prepare        = slave_encoder_prepare,
-+		.commit         = drm_i2c_encoder_commit,
-+		.mode_set       = drm_i2c_encoder_mode_set,
-+		.save           = drm_i2c_encoder_save,
-+		.restore        = drm_i2c_encoder_restore,
-+};
-+
-+static const struct i2c_board_info info = {
-+		I2C_BOARD_INFO("tda998x", 0x70)
-+};
-+
-+static struct drm_encoder *slave_encoder_create(struct drm_device *dev,
-+		struct slave_module *mod)
-+{
-+	struct slave_encoder *slave_encoder;
-+	struct drm_encoder *encoder;
-+	int ret;
-+
-+	slave_encoder = kzalloc(sizeof(*slave_encoder), GFP_KERNEL);
-+	if (!slave_encoder) {
-+		dev_err(dev->dev, "allocation failed\n");
-+		return NULL;
-+	}
-+
-+	slave_encoder->mod = mod;
-+
-+	encoder = &slave_encoder->base.base;
-+	encoder->possible_crtcs = 1;
-+
-+	ret = drm_encoder_init(dev, encoder, &slave_encoder_funcs,
-+			DRM_MODE_ENCODER_TMDS);
-+	if (ret)
-+		goto fail;
-+
-+	drm_encoder_helper_add(encoder, &slave_encoder_helper_funcs);
-+
-+	ret = drm_i2c_encoder_init(dev, to_encoder_slave(encoder), mod->i2c, &info);
-+	if (ret)
-+		goto fail;
-+
-+	return encoder;
-+
-+fail:
-+	slave_encoder_destroy(encoder);
-+	return NULL;
-+}
-+
-+/*
-+ * Connector:
-+ */
-+
-+struct slave_connector {
-+	struct drm_connector base;
-+
-+	struct drm_encoder *encoder;  /* our connected encoder */
-+	struct slave_module *mod;
-+};
-+#define to_slave_connector(x) container_of(x, struct slave_connector, base)
-+
-+static void slave_connector_destroy(struct drm_connector *connector)
-+{
-+	struct slave_connector *slave_connector = to_slave_connector(connector);
-+	drm_connector_cleanup(connector);
-+	kfree(slave_connector);
-+}
-+
-+static enum drm_connector_status slave_connector_detect(
-+		struct drm_connector *connector,
-+		bool force)
-+{
-+	struct drm_encoder *encoder = to_slave_connector(connector)->encoder;
-+	return get_slave_funcs(encoder)->detect(encoder, connector);
-+}
-+
-+static int slave_connector_get_modes(struct drm_connector *connector)
-+{
-+	struct drm_encoder *encoder = to_slave_connector(connector)->encoder;
-+	return get_slave_funcs(encoder)->get_modes(encoder, connector);
-+}
-+
-+static int slave_connector_mode_valid(struct drm_connector *connector,
-+		  struct drm_display_mode *mode)
-+{
-+	struct drm_encoder *encoder = to_slave_connector(connector)->encoder;
-+	struct tilcdc_drm_private *priv = connector->dev->dev_private;
-+	int ret;
-+
-+	ret = tilcdc_crtc_mode_valid(priv->crtc, mode);
-+	if (ret != MODE_OK)
-+		return ret;
-+
-+	return get_slave_funcs(encoder)->mode_valid(encoder, mode);
-+}
-+
-+static struct drm_encoder *slave_connector_best_encoder(
-+		struct drm_connector *connector)
-+{
-+	struct slave_connector *slave_connector = to_slave_connector(connector);
-+	return slave_connector->encoder;
-+}
-+
-+static int slave_connector_set_property(struct drm_connector *connector,
-+		struct drm_property *property, uint64_t value)
-+{
-+	struct drm_encoder *encoder = to_slave_connector(connector)->encoder;
-+	return get_slave_funcs(encoder)->set_property(encoder,
-+			connector, property, value);
-+}
-+
-+static const struct drm_connector_funcs slave_connector_funcs = {
-+	.destroy            = slave_connector_destroy,
-+	.dpms               = drm_helper_connector_dpms,
-+	.detect             = slave_connector_detect,
-+	.fill_modes         = drm_helper_probe_single_connector_modes,
-+	.set_property       = slave_connector_set_property,
-+};
-+
-+static const struct drm_connector_helper_funcs slave_connector_helper_funcs = {
-+	.get_modes          = slave_connector_get_modes,
-+	.mode_valid         = slave_connector_mode_valid,
-+	.best_encoder       = slave_connector_best_encoder,
-+};
-+
-+static struct drm_connector *slave_connector_create(struct drm_device *dev,
-+		struct slave_module *mod, struct drm_encoder *encoder)
-+{
-+	struct slave_connector *slave_connector;
-+	struct drm_connector *connector;
-+	int ret;
-+
-+	slave_connector = kzalloc(sizeof(*slave_connector), GFP_KERNEL);
-+	if (!slave_connector) {
-+		dev_err(dev->dev, "allocation failed\n");
-+		return NULL;
-+	}
-+
-+	slave_connector->encoder = encoder;
-+	slave_connector->mod = mod;
-+
-+	connector = &slave_connector->base;
-+
-+	drm_connector_init(dev, connector, &slave_connector_funcs,
-+			DRM_MODE_CONNECTOR_HDMIA);
-+	drm_connector_helper_add(connector, &slave_connector_helper_funcs);
-+
-+	connector->polled = DRM_CONNECTOR_POLL_CONNECT |
-+			DRM_CONNECTOR_POLL_DISCONNECT;
-+
-+	connector->interlace_allowed = 0;
-+	connector->doublescan_allowed = 0;
-+
-+	get_slave_funcs(encoder)->create_resources(encoder, connector);
-+
-+	ret = drm_mode_connector_attach_encoder(connector, encoder);
-+	if (ret)
-+		goto fail;
-+
-+	drm_sysfs_connector_add(connector);
-+
-+	return connector;
-+
-+fail:
-+	slave_connector_destroy(connector);
-+	return NULL;
-+}
-+
-+/*
-+ * Module:
-+ */
-+
-+static int slave_modeset_init(struct tilcdc_module *mod, struct drm_device *dev)
-+{
-+	struct slave_module *slave_mod = to_slave_module(mod);
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+	struct drm_encoder *encoder;
-+	struct drm_connector *connector;
-+
-+	encoder = slave_encoder_create(dev, slave_mod);
-+	if (!encoder)
-+		return -ENOMEM;
-+
-+	connector = slave_connector_create(dev, slave_mod, encoder);
-+	if (!connector)
-+		return -ENOMEM;
-+
-+	priv->encoders[priv->num_encoders++] = encoder;
-+	priv->connectors[priv->num_connectors++] = connector;
-+
-+	return 0;
-+}
-+
-+static void slave_destroy(struct tilcdc_module *mod)
-+{
-+	struct slave_module *slave_mod = to_slave_module(mod);
-+
-+	tilcdc_module_cleanup(mod);
-+	kfree(slave_mod);
-+}
-+
-+static const struct tilcdc_module_ops slave_module_ops = {
-+		.modeset_init = slave_modeset_init,
-+		.destroy = slave_destroy,
-+};
-+
-+/*
-+ * Device:
-+ */
-+
-+static struct of_device_id slave_of_match[];
-+
-+static int slave_probe(struct platform_device *pdev)
-+{
-+	struct device_node *node = pdev->dev.of_node;
-+	struct device_node *i2c_node;
-+	struct slave_module *slave_mod;
-+	struct tilcdc_module *mod;
-+	struct pinctrl *pinctrl;
-+	uint32_t i2c_phandle;
-+	int ret = -EINVAL;
-+
-+	/* bail out early if no DT data: */
-+	if (!node) {
-+		dev_err(&pdev->dev, "device-tree data is missing\n");
-+		return -ENXIO;
-+	}
-+
-+	slave_mod = kzalloc(sizeof(*slave_mod), GFP_KERNEL);
-+	if (!slave_mod)
-+		return -ENOMEM;
-+
-+	mod = &slave_mod->base;
-+
-+	tilcdc_module_init(mod, "slave", &slave_module_ops);
-+
-+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-+	if (IS_ERR(pinctrl))
-+		dev_warn(&pdev->dev, "pins are not configured\n");
-+
-+	if (of_property_read_u32(node, "i2c", &i2c_phandle)) {
-+		dev_err(&pdev->dev, "could not get i2c bus phandle\n");
-+		goto fail;
-+	}
-+
-+	i2c_node = of_find_node_by_phandle(i2c_phandle);
-+	if (!i2c_node) {
-+		dev_err(&pdev->dev, "could not get i2c bus node\n");
-+		goto fail;
-+	}
-+
-+	slave_mod->i2c = of_find_i2c_adapter_by_node(i2c_node);
-+	if (!slave_mod->i2c) {
-+		dev_err(&pdev->dev, "could not get i2c\n");
-+		goto fail;
-+	}
-+
-+	of_node_put(i2c_node);
-+
-+	return 0;
-+
-+fail:
-+	slave_destroy(mod);
-+	return ret;
-+}
-+
-+static int slave_remove(struct platform_device *pdev)
-+{
-+	return 0;
-+}
-+
-+static struct of_device_id slave_of_match[] = {
-+		{ .compatible = "tilcdc,slave", },
-+		{ },
-+};
-+MODULE_DEVICE_TABLE(of, slave_of_match);
-+
-+struct platform_driver slave_driver = {
-+	.probe = slave_probe,
-+	.remove = slave_remove,
-+	.driver = {
-+		.owner = THIS_MODULE,
-+		.name = "slave",
-+		.of_match_table = slave_of_match,
-+	},
-+};
-+
-+int __init tilcdc_slave_init(void)
-+{
-+	return platform_driver_register(&slave_driver);
-+}
-+
-+void __exit tilcdc_slave_fini(void)
-+{
-+	platform_driver_unregister(&slave_driver);
-+}
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_slave.h b/drivers/gpu/drm/tilcdc/tilcdc_slave.h
-new file mode 100644
-index 0000000..2f85048
---- /dev/null
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_slave.h
-@@ -0,0 +1,26 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments
-+ * Author: Rob Clark <robdclark@gmail.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published by
-+ * the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-+ * more details.
-+ *
-+ * You should have received a copy of the GNU General Public License along with
-+ * this program.  If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+#ifndef __TILCDC_SLAVE_H__
-+#define __TILCDC_SLAVE_H__
-+
-+/* sub-module for i2c slave encoder output */
-+
-+int tilcdc_slave_init(void);
-+void tilcdc_slave_fini(void);
-+
-+#endif /* __TILCDC_SLAVE_H__ */
--- 
-1.8.1
-
diff --git a/patches/drm/0010-drm-tilcdc-add-support-for-LCD-panels-v5.patch b/patches/drm/0010-drm-tilcdc-add-support-for-LCD-panels-v5.patch
deleted file mode 100644
index 04d0532de60ad9099abb09c48a5084f41227f3cc..0000000000000000000000000000000000000000
--- a/patches/drm/0010-drm-tilcdc-add-support-for-LCD-panels-v5.patch
+++ /dev/null
@@ -1,561 +0,0 @@
-From 5051babb343c41eb0c7df8a01faa27b91cbc85f3 Mon Sep 17 00:00:00 2001
-From: Rob Clark <robdclark@gmail.com>
-Date: Tue, 18 Dec 2012 17:34:16 -0600
-Subject: [PATCH 10/11] drm/tilcdc: add support for LCD panels (v5)
-
-Add an output panel driver for LCD panels.  Tested with LCD3 cape on
-beaglebone.
-
-v1: original
-v2: s/of_find_node_by_name()/of_get_child_by_name()/ from Pantelis
-    Antoniou
-v3: add backlight support
-v4: rebase to latest of video timing helpers
-v5: remove some unneeded fields from panel-info struct
-
-Signed-off-by: Rob Clark <robdclark@gmail.com>
----
- drivers/gpu/drm/tilcdc/Kconfig        |   5 +-
- drivers/gpu/drm/tilcdc/Makefile       |   1 +
- drivers/gpu/drm/tilcdc/tilcdc_drv.c   |   3 +
- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 436 ++++++++++++++++++++++++++++++++++
- drivers/gpu/drm/tilcdc/tilcdc_panel.h |  26 ++
- 5 files changed, 470 insertions(+), 1 deletion(-)
- create mode 100644 drivers/gpu/drm/tilcdc/tilcdc_panel.c
- create mode 100644 drivers/gpu/drm/tilcdc/tilcdc_panel.h
-
-diff --git a/drivers/gpu/drm/tilcdc/Kconfig b/drivers/gpu/drm/tilcdc/Kconfig
-index ee9b592..d2928c7 100644
---- a/drivers/gpu/drm/tilcdc/Kconfig
-+++ b/drivers/gpu/drm/tilcdc/Kconfig
-@@ -1,9 +1,12 @@
- config DRM_TILCDC
- 	tristate "DRM Support for TI LCDC Display Controller"
--	depends on DRM && OF
-+	depends on DRM && OF && BACKLIGHT_LCD_SUPPORT
- 	select DRM_KMS_HELPER
- 	select DRM_KMS_CMA_HELPER
- 	select DRM_GEM_CMA_HELPER
-+	select OF_VIDEOMODE
-+	select OF_DISPLAY_TIMING
-+	select BACKLIGHT_CLASS_DEVICE
- 	help
- 	  Choose this option if you have an TI SoC with LCDC display
- 	  controller, for example AM33xx in beagle-bone, DA8xx, or
-diff --git a/drivers/gpu/drm/tilcdc/Makefile b/drivers/gpu/drm/tilcdc/Makefile
-index aa9097e..deda656 100644
---- a/drivers/gpu/drm/tilcdc/Makefile
-+++ b/drivers/gpu/drm/tilcdc/Makefile
-@@ -4,6 +4,7 @@ tilcdc-y := \
- 	tilcdc_crtc.o \
- 	tilcdc_tfp410.o \
- 	tilcdc_slave.o \
-+	tilcdc_panel.o \
- 	tilcdc_drv.o
- 
- obj-$(CONFIG_DRM_TILCDC)	+= tilcdc.o
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
-index 25f3add..c5b592d 100644
---- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
-@@ -21,6 +21,7 @@
- #include "tilcdc_regs.h"
- #include "tilcdc_tfp410.h"
- #include "tilcdc_slave.h"
-+#include "tilcdc_panel.h"
- 
- #include "drm_fb_helper.h"
- 
-@@ -589,6 +590,7 @@ static int __init tilcdc_drm_init(void)
- 	DBG("init");
- 	tilcdc_tfp410_init();
- 	tilcdc_slave_init();
-+	tilcdc_panel_init();
- 	return platform_driver_register(&tilcdc_platform_driver);
- }
- 
-@@ -597,6 +599,7 @@ static void __exit tilcdc_drm_fini(void)
- 	DBG("fini");
- 	tilcdc_tfp410_fini();
- 	tilcdc_slave_fini();
-+	tilcdc_panel_fini();
- 	platform_driver_unregister(&tilcdc_platform_driver);
- }
- 
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
-new file mode 100644
-index 0000000..d1463f5
---- /dev/null
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
-@@ -0,0 +1,436 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments
-+ * Author: Rob Clark <robdclark@gmail.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published by
-+ * the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-+ * more details.
-+ *
-+ * You should have received a copy of the GNU General Public License along with
-+ * this program.  If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+#include <linux/pinctrl/pinmux.h>
-+#include <linux/pinctrl/consumer.h>
-+#include <linux/backlight.h>
-+#include <video/display_timing.h>
-+#include <video/of_display_timing.h>
-+#include <video/videomode.h>
-+
-+#include "tilcdc_drv.h"
-+
-+struct panel_module {
-+	struct tilcdc_module base;
-+	struct tilcdc_panel_info *info;
-+	struct display_timings *timings;
-+	struct backlight_device *backlight;
-+};
-+#define to_panel_module(x) container_of(x, struct panel_module, base)
-+
-+
-+/*
-+ * Encoder:
-+ */
-+
-+struct panel_encoder {
-+	struct drm_encoder base;
-+	struct panel_module *mod;
-+};
-+#define to_panel_encoder(x) container_of(x, struct panel_encoder, base)
-+
-+
-+static void panel_encoder_destroy(struct drm_encoder *encoder)
-+{
-+	struct panel_encoder *panel_encoder = to_panel_encoder(encoder);
-+	drm_encoder_cleanup(encoder);
-+	kfree(panel_encoder);
-+}
-+
-+static void panel_encoder_dpms(struct drm_encoder *encoder, int mode)
-+{
-+	struct panel_encoder *panel_encoder = to_panel_encoder(encoder);
-+	struct backlight_device *backlight = panel_encoder->mod->backlight;
-+
-+	if (!backlight)
-+		return;
-+
-+	backlight->props.power = mode == DRM_MODE_DPMS_ON
-+				     ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN;
-+	backlight_update_status(backlight);
-+}
-+
-+static bool panel_encoder_mode_fixup(struct drm_encoder *encoder,
-+		const struct drm_display_mode *mode,
-+		struct drm_display_mode *adjusted_mode)
-+{
-+	/* nothing needed */
-+	return true;
-+}
-+
-+static void panel_encoder_prepare(struct drm_encoder *encoder)
-+{
-+	struct panel_encoder *panel_encoder = to_panel_encoder(encoder);
-+	panel_encoder_dpms(encoder, DRM_MODE_DPMS_OFF);
-+	tilcdc_crtc_set_panel_info(encoder->crtc, panel_encoder->mod->info);
-+}
-+
-+static void panel_encoder_commit(struct drm_encoder *encoder)
-+{
-+	panel_encoder_dpms(encoder, DRM_MODE_DPMS_ON);
-+}
-+
-+static void panel_encoder_mode_set(struct drm_encoder *encoder,
-+		struct drm_display_mode *mode,
-+		struct drm_display_mode *adjusted_mode)
-+{
-+	/* nothing needed */
-+}
-+
-+static const struct drm_encoder_funcs panel_encoder_funcs = {
-+		.destroy        = panel_encoder_destroy,
-+};
-+
-+static const struct drm_encoder_helper_funcs panel_encoder_helper_funcs = {
-+		.dpms           = panel_encoder_dpms,
-+		.mode_fixup     = panel_encoder_mode_fixup,
-+		.prepare        = panel_encoder_prepare,
-+		.commit         = panel_encoder_commit,
-+		.mode_set       = panel_encoder_mode_set,
-+};
-+
-+static struct drm_encoder *panel_encoder_create(struct drm_device *dev,
-+		struct panel_module *mod)
-+{
-+	struct panel_encoder *panel_encoder;
-+	struct drm_encoder *encoder;
-+	int ret;
-+
-+	panel_encoder = kzalloc(sizeof(*panel_encoder), GFP_KERNEL);
-+	if (!panel_encoder) {
-+		dev_err(dev->dev, "allocation failed\n");
-+		return NULL;
-+	}
-+
-+	panel_encoder->mod = mod;
-+
-+	encoder = &panel_encoder->base;
-+	encoder->possible_crtcs = 1;
-+
-+	ret = drm_encoder_init(dev, encoder, &panel_encoder_funcs,
-+			DRM_MODE_ENCODER_LVDS);
-+	if (ret < 0)
-+		goto fail;
-+
-+	drm_encoder_helper_add(encoder, &panel_encoder_helper_funcs);
-+
-+	return encoder;
-+
-+fail:
-+	panel_encoder_destroy(encoder);
-+	return NULL;
-+}
-+
-+/*
-+ * Connector:
-+ */
-+
-+struct panel_connector {
-+	struct drm_connector base;
-+
-+	struct drm_encoder *encoder;  /* our connected encoder */
-+	struct panel_module *mod;
-+};
-+#define to_panel_connector(x) container_of(x, struct panel_connector, base)
-+
-+
-+static void panel_connector_destroy(struct drm_connector *connector)
-+{
-+	struct panel_connector *panel_connector = to_panel_connector(connector);
-+	drm_connector_cleanup(connector);
-+	kfree(panel_connector);
-+}
-+
-+static enum drm_connector_status panel_connector_detect(
-+		struct drm_connector *connector,
-+		bool force)
-+{
-+	return connector_status_connected;
-+}
-+
-+static int panel_connector_get_modes(struct drm_connector *connector)
-+{
-+	struct drm_device *dev = connector->dev;
-+	struct panel_connector *panel_connector = to_panel_connector(connector);
-+	struct display_timings *timings = panel_connector->mod->timings;
-+	int i;
-+
-+	for (i = 0; i < timings->num_timings; i++) {
-+		struct drm_display_mode *mode = drm_mode_create(dev);
-+		struct videomode vm;
-+
-+		if (videomode_from_timing(timings, &vm, i))
-+			break;
-+
-+		drm_display_mode_from_videomode(&vm, mode);
-+
-+		mode->type = DRM_MODE_TYPE_DRIVER;
-+
-+		if (timings->native_mode == i)
-+			mode->type |= DRM_MODE_TYPE_PREFERRED;
-+
-+		drm_mode_set_name(mode);
-+		drm_mode_probed_add(connector, mode);
-+	}
-+
-+	return i;
-+}
-+
-+static int panel_connector_mode_valid(struct drm_connector *connector,
-+		  struct drm_display_mode *mode)
-+{
-+	struct tilcdc_drm_private *priv = connector->dev->dev_private;
-+	/* our only constraints are what the crtc can generate: */
-+	return tilcdc_crtc_mode_valid(priv->crtc, mode);
-+}
-+
-+static struct drm_encoder *panel_connector_best_encoder(
-+		struct drm_connector *connector)
-+{
-+	struct panel_connector *panel_connector = to_panel_connector(connector);
-+	return panel_connector->encoder;
-+}
-+
-+static const struct drm_connector_funcs panel_connector_funcs = {
-+	.destroy            = panel_connector_destroy,
-+	.dpms               = drm_helper_connector_dpms,
-+	.detect             = panel_connector_detect,
-+	.fill_modes         = drm_helper_probe_single_connector_modes,
-+};
-+
-+static const struct drm_connector_helper_funcs panel_connector_helper_funcs = {
-+	.get_modes          = panel_connector_get_modes,
-+	.mode_valid         = panel_connector_mode_valid,
-+	.best_encoder       = panel_connector_best_encoder,
-+};
-+
-+static struct drm_connector *panel_connector_create(struct drm_device *dev,
-+		struct panel_module *mod, struct drm_encoder *encoder)
-+{
-+	struct panel_connector *panel_connector;
-+	struct drm_connector *connector;
-+	int ret;
-+
-+	panel_connector = kzalloc(sizeof(*panel_connector), GFP_KERNEL);
-+	if (!panel_connector) {
-+		dev_err(dev->dev, "allocation failed\n");
-+		return NULL;
-+	}
-+
-+	panel_connector->encoder = encoder;
-+	panel_connector->mod = mod;
-+
-+	connector = &panel_connector->base;
-+
-+	drm_connector_init(dev, connector, &panel_connector_funcs,
-+			DRM_MODE_CONNECTOR_LVDS);
-+	drm_connector_helper_add(connector, &panel_connector_helper_funcs);
-+
-+	connector->interlace_allowed = 0;
-+	connector->doublescan_allowed = 0;
-+
-+	ret = drm_mode_connector_attach_encoder(connector, encoder);
-+	if (ret)
-+		goto fail;
-+
-+	drm_sysfs_connector_add(connector);
-+
-+	return connector;
-+
-+fail:
-+	panel_connector_destroy(connector);
-+	return NULL;
-+}
-+
-+/*
-+ * Module:
-+ */
-+
-+static int panel_modeset_init(struct tilcdc_module *mod, struct drm_device *dev)
-+{
-+	struct panel_module *panel_mod = to_panel_module(mod);
-+	struct tilcdc_drm_private *priv = dev->dev_private;
-+	struct drm_encoder *encoder;
-+	struct drm_connector *connector;
-+
-+	encoder = panel_encoder_create(dev, panel_mod);
-+	if (!encoder)
-+		return -ENOMEM;
-+
-+	connector = panel_connector_create(dev, panel_mod, encoder);
-+	if (!connector)
-+		return -ENOMEM;
-+
-+	priv->encoders[priv->num_encoders++] = encoder;
-+	priv->connectors[priv->num_connectors++] = connector;
-+
-+	return 0;
-+}
-+
-+static void panel_destroy(struct tilcdc_module *mod)
-+{
-+	struct panel_module *panel_mod = to_panel_module(mod);
-+
-+	if (panel_mod->timings) {
-+		display_timings_release(panel_mod->timings);
-+		kfree(panel_mod->timings);
-+	}
-+
-+	tilcdc_module_cleanup(mod);
-+	kfree(panel_mod->info);
-+	kfree(panel_mod);
-+}
-+
-+static const struct tilcdc_module_ops panel_module_ops = {
-+		.modeset_init = panel_modeset_init,
-+		.destroy = panel_destroy,
-+};
-+
-+/*
-+ * Device:
-+ */
-+
-+/* maybe move this somewhere common if it is needed by other outputs? */
-+static struct tilcdc_panel_info * of_get_panel_info(struct device_node *np)
-+{
-+	struct device_node *info_np;
-+	struct tilcdc_panel_info *info;
-+	int ret = 0;
-+
-+	if (!np) {
-+		pr_err("%s: no devicenode given\n", __func__);
-+		return NULL;
-+	}
-+
-+	info_np = of_get_child_by_name(np, "panel-info");
-+	if (!info_np) {
-+		pr_err("%s: could not find panel-info node\n", __func__);
-+		return NULL;
-+	}
-+
-+	info = kzalloc(sizeof(*info), GFP_KERNEL);
-+	if (!info) {
-+		pr_err("%s: allocation failed\n", __func__);
-+		return NULL;
-+	}
-+
-+	ret |= of_property_read_u32(info_np, "ac-bias", &info->ac_bias);
-+	ret |= of_property_read_u32(info_np, "ac-bias-intrpt", &info->ac_bias_intrpt);
-+	ret |= of_property_read_u32(info_np, "dma-burst-sz", &info->dma_burst_sz);
-+	ret |= of_property_read_u32(info_np, "bpp", &info->bpp);
-+	ret |= of_property_read_u32(info_np, "fdd", &info->fdd);
-+	ret |= of_property_read_u32(info_np, "sync-edge", &info->sync_edge);
-+	ret |= of_property_read_u32(info_np, "sync-ctrl", &info->sync_ctrl);
-+	ret |= of_property_read_u32(info_np, "raster-order", &info->raster_order);
-+	ret |= of_property_read_u32(info_np, "fifo-th", &info->fifo_th);
-+
-+	/* optional: */
-+	info->tft_alt_mode      = of_property_read_bool(info_np, "tft-alt-mode");
-+	info->invert_pxl_clk    = of_property_read_bool(info_np, "invert-pxl-clk");
-+
-+	if (ret) {
-+		pr_err("%s: error reading panel-info properties\n", __func__);
-+		kfree(info);
-+		return NULL;
-+	}
-+
-+	return info;
-+}
-+
-+static struct of_device_id panel_of_match[];
-+
-+static int panel_probe(struct platform_device *pdev)
-+{
-+	struct device_node *node = pdev->dev.of_node;
-+	struct panel_module *panel_mod;
-+	struct tilcdc_module *mod;
-+	struct pinctrl *pinctrl;
-+	int ret = -EINVAL;
-+
-+
-+	/* bail out early if no DT data: */
-+	if (!node) {
-+		dev_err(&pdev->dev, "device-tree data is missing\n");
-+		return -ENXIO;
-+	}
-+
-+	panel_mod = kzalloc(sizeof(*panel_mod), GFP_KERNEL);
-+	if (!panel_mod)
-+		return -ENOMEM;
-+
-+	mod = &panel_mod->base;
-+
-+	tilcdc_module_init(mod, "panel", &panel_module_ops);
-+
-+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-+	if (IS_ERR(pinctrl))
-+		dev_warn(&pdev->dev, "pins are not configured\n");
-+
-+
-+	panel_mod->timings = of_get_display_timings(node);
-+	if (!panel_mod->timings) {
-+		dev_err(&pdev->dev, "could not get panel timings\n");
-+		goto fail;
-+	}
-+
-+	panel_mod->info = of_get_panel_info(node);
-+	if (!panel_mod->info) {
-+		dev_err(&pdev->dev, "could not get panel info\n");
-+		goto fail;
-+	}
-+
-+	panel_mod->backlight = of_find_backlight_by_node(node);
-+	if (panel_mod->backlight)
-+		dev_info(&pdev->dev, "found backlight\n");
-+
-+	return 0;
-+
-+fail:
-+	panel_destroy(mod);
-+	return ret;
-+}
-+
-+static int panel_remove(struct platform_device *pdev)
-+{
-+	return 0;
-+}
-+
-+static struct of_device_id panel_of_match[] = {
-+		{ .compatible = "tilcdc,panel", },
-+		{ },
-+};
-+MODULE_DEVICE_TABLE(of, panel_of_match);
-+
-+struct platform_driver panel_driver = {
-+	.probe = panel_probe,
-+	.remove = panel_remove,
-+	.driver = {
-+		.owner = THIS_MODULE,
-+		.name = "panel",
-+		.of_match_table = panel_of_match,
-+	},
-+};
-+
-+int __init tilcdc_panel_init(void)
-+{
-+	return platform_driver_register(&panel_driver);
-+}
-+
-+void __exit tilcdc_panel_fini(void)
-+{
-+	platform_driver_unregister(&panel_driver);
-+}
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.h b/drivers/gpu/drm/tilcdc/tilcdc_panel.h
-new file mode 100644
-index 0000000..7db40aa
---- /dev/null
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.h
-@@ -0,0 +1,26 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments
-+ * Author: Rob Clark <robdclark@gmail.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published by
-+ * the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-+ * more details.
-+ *
-+ * You should have received a copy of the GNU General Public License along with
-+ * this program.  If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+#ifndef __TILCDC_PANEL_H__
-+#define __TILCDC_PANEL_H__
-+
-+/* sub-module for generic lcd panel output */
-+
-+int tilcdc_panel_init(void);
-+void tilcdc_panel_fini(void);
-+
-+#endif /* __TILCDC_PANEL_H__ */
--- 
-1.8.1
-
diff --git a/patches/drm/0011-drm-lcdc-Power-control-GPIO-support.patch b/patches/drm/0011-drm-lcdc-Power-control-GPIO-support.patch
deleted file mode 100644
index 3f9ffa3a50a3cb53ec914b9163c3ee434393bf71..0000000000000000000000000000000000000000
--- a/patches/drm/0011-drm-lcdc-Power-control-GPIO-support.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 6d3fdf92974117440e4766270c46d410358044bf Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 9 Jan 2013 16:31:29 +0200
-Subject: [PATCH 11/11] drm: lcdc: Power control GPIO support
-
-A large number of LCDC designs use a GPIO pin for power control.
-Implement it trivialy.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 25 ++++++++++++++++++++++++-
- 1 file changed, 24 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
-index c5b592d..91e8ed2 100644
---- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
-@@ -25,6 +25,8 @@
- 
- #include "drm_fb_helper.h"
- 
-+#include <linux/of_gpio.h>
-+
- static LIST_HEAD(module_list);
- 
- void tilcdc_module_init(struct tilcdc_module *mod, const char *name,
-@@ -158,7 +160,9 @@ static int tilcdc_load(struct drm_device *dev, unsigned long flags)
- 	struct device_node *node = pdev->dev.of_node;
- 	struct tilcdc_drm_private *priv;
- 	struct resource *res;
--	int ret;
-+	enum of_gpio_flags ofgpioflags;
-+	unsigned long gpioflags;
-+	int gpio, ret;
- 
- 	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
- 	if (!priv) {
-@@ -198,6 +202,25 @@ static int tilcdc_load(struct drm_device *dev, unsigned long flags)
- 		goto fail;
- 	}
- 
-+	/* some devices have a power gpio control */
-+	gpio = of_get_named_gpio_flags(pdev->dev.of_node, "ti,power-gpio",
-+                       0, &ofgpioflags);
-+	if (IS_ERR_VALUE(gpio)) {
-+		dev_info(&pdev->dev, "No power control GPIO\n");
-+	} else {
-+		gpioflags = GPIOF_DIR_OUT;
-+		if (ofgpioflags & OF_GPIO_ACTIVE_LOW)
-+			gpioflags |= GPIOF_INIT_LOW;
-+		else
-+			gpioflags |= GPIOF_INIT_HIGH;
-+		ret = devm_gpio_request_one(&pdev->dev, gpio,
-+		gpioflags, "lcdc_drv:PDN");
-+		if (ret != 0) {
-+			dev_err(&pdev->dev, "Failed to request power gpio\n");
-+			goto fail;
-+		}
-+	}
-+
- #ifdef CONFIG_CPU_FREQ
- 	priv->lcd_fck_rate = clk_get_rate(priv->clk);
- 	priv->freq_transition.notifier_call = cpufreq_transition;
--- 
-1.8.1
-
diff --git a/patches/i2c/0001-pinctrl-pinctrl-single-must-be-initialized-early.patch b/patches/i2c/0001-pinctrl-pinctrl-single-must-be-initialized-early.patch
deleted file mode 100644
index 42060ef98975c7250f71f22f8d2c1e1621363902..0000000000000000000000000000000000000000
--- a/patches/i2c/0001-pinctrl-pinctrl-single-must-be-initialized-early.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From ef0cabaca7d1cdab05ae0cc90622baaac8db69ed Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Sat, 15 Sep 2012 12:00:41 +0300
-Subject: [PATCH 1/4] pinctrl: pinctrl-single must be initialized early.
-
-When using pinctrl-single to handle i2c initialization, it has
-to be done early. Whether this is the best way to do so, is an
-exercise left to the reader.
----
- drivers/pinctrl/pinctrl-single.c |   12 +++++++++++-
- 1 files changed, 11 insertions(+), 1 deletions(-)
-
-diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
-index f6a360b8..ba016f6 100644
---- a/drivers/pinctrl/pinctrl-single.c
-+++ b/drivers/pinctrl/pinctrl-single.c
-@@ -1089,7 +1089,17 @@ static struct platform_driver pcs_driver = {
- 	},
- };
- 
--module_platform_driver(pcs_driver);
-+static int __init pcs_init(void)
-+{
-+	return platform_driver_register(&pcs_driver);
-+}
-+postcore_initcall(pcs_init);
-+
-+static void __exit pcs_exit(void)
-+{
-+	platform_driver_unregister(&pcs_driver);
-+}
-+module_exit(pcs_exit);
- 
- MODULE_AUTHOR("Tony Lindgren <tony@atomide.com>");
- MODULE_DESCRIPTION("One-register-per-pin type device tree based pinctrl driver");
--- 
-1.7.7.6
-
diff --git a/patches/i2c/0002-Bone-DTS-working-i2c2-i2c3-in-the-tree.patch b/patches/i2c/0002-Bone-DTS-working-i2c2-i2c3-in-the-tree.patch
deleted file mode 100644
index 6c89cf8636e96ef6631dfd67301412d1b8a9c0c8..0000000000000000000000000000000000000000
--- a/patches/i2c/0002-Bone-DTS-working-i2c2-i2c3-in-the-tree.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 7837c5932dd414c57757fbb4b59ba20f3ab80b9c Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Sat, 15 Sep 2012 12:05:04 +0300
-Subject: [PATCH 2/4] Bone DTS working i2c2 (i2c3 in the tree)
-
----
- arch/arm/boot/dts/am335x-bone.dts |   60 ++++++++++++++++++++++++++++++-------
- 1 file changed, 50 insertions(+), 10 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
-index 97b10b7..b053027 100644
---- a/arch/arm/boot/dts/am335x-bone.dts
-+++ b/arch/arm/boot/dts/am335x-bone.dts
-@@ -66,6 +66,12 @@
- 				0x60 0x17	/* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */
- 			>;
- 		};
-+		i2c3_pins: pinmux_i2c3_pins {
-+			pinctrl-single,pins = <
-+				0x178 0x73 	/* uart1_ctsn.i2c2_sda, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */
-+				0x17c 0x73	/* uart1_rtsn.i2c2_scl, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */
-+			>;
-+		};
- 	};
- 
- 	ocp {
-@@ -110,16 +116,6 @@
- 			};
- 		};
- 
--		i2c1: i2c@44e0b000 {
--			status = "okay";
--			clock-frequency = <400000>;
--
--			tps: tps@24 {
--				reg = <0x24>;
--			};
--
--		};
--
- 		gpevt {
- 			compatible = "gpevt";
- 			dmas = <&edma 12>;
-@@ -159,6 +155,50 @@
- 	};
- };
- 
-+&i2c1 {
-+	status = "okay";
-+	clock-frequency = <400000>;
-+
-+	tps: tps@24 {
-+		reg = <0x24>;
-+	};
-+
-+	baseboard_eeprom: baseboard_eeprom@50 {
-+		compatible = "at,24c256";
-+		reg = <0x50>;
-+	};
-+
-+};
-+
-+&i2c3 {
-+	status = "okay";
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c3_pins>;
-+
-+	clock-frequency = <100000>;
-+
-+	/* OK, I know these are cape but for now it will do */
-+	cape_eeprom_0: cape_eeprom_0@54 {
-+		compatible = "at,24c256";
-+		reg = <0x54>;
-+	};
-+
-+	cape_eeprom_1: cape_eeprom_1@55 {
-+		compatible = "at,24c256";
-+		reg = <0x55>;
-+	};
-+
-+	cape_eeprom_2: cape_eeprom_2@56 {
-+		compatible = "at,24c256";
-+		reg = <0x56>;
-+	};
-+
-+	cape_eeprom_3: cape_eeprom_3@57 {
-+		compatible = "at,24c256";
-+		reg = <0x57>;
-+	};
-+};
-+
- /include/ "tps65217.dtsi"
- 
- &tps {
--- 
-1.7.10.4
-
diff --git a/patches/i2c/0003-am33xx-Convert-I2C-from-omap-to-am33xx-names.patch b/patches/i2c/0003-am33xx-Convert-I2C-from-omap-to-am33xx-names.patch
deleted file mode 100644
index cff96b87c6ded417b412ce5eb1a5c0486990ff1e..0000000000000000000000000000000000000000
--- a/patches/i2c/0003-am33xx-Convert-I2C-from-omap-to-am33xx-names.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-From e3c951668c4812571a590e27509900dead1f0f6e Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Sat, 15 Sep 2012 14:49:11 +0300
-Subject: [PATCH 3/4] am33xx: Convert I2C from omap to am33xx names
-
-On OMAP the TRM names I2C instances as i2c1, i2c2, etc.
-On the am33xx's it is i2c0, i2c1, etc.
-
-Use am33xx naming everywhere, beside the hwmod name.
----
- arch/arm/boot/dts/am335x-bone.dts |    8 ++++----
- arch/arm/boot/dts/am335x-evm.dts  |    2 +-
- arch/arm/boot/dts/am33xx.dtsi     |   12 ++++++------
- 3 files changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
-index 82c598aa..aaa04cb 100644
---- a/arch/arm/boot/dts/am335x-bone.dts
-+++ b/arch/arm/boot/dts/am335x-bone.dts
-@@ -64,7 +64,7 @@
- 				0x60 0x17	/* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */
- 			>;
- 		};
--		i2c3_pins: pinmux_i2c3_pins {
-+		i2c2_pins: pinmux_i2c2_pins {
- 			pinctrl-single,pins = <
- 				0x178 0x73 	/* uart1_ctsn.i2c2_sda, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */
- 				0x17c 0x73	/* uart1_rtsn.i2c2_scl, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */
-@@ -151,7 +151,7 @@
- 	};
- };
- 
--&i2c1 {
-+&i2c0 {
- 	status = "okay";
- 	clock-frequency = <400000>;
- 
-@@ -166,10 +166,10 @@
- 
- };
- 
--&i2c3 {
-+&i2c2 {
- 	status = "okay";
- 	pinctrl-names = "default";
--	pinctrl-0 = <&i2c3_pins>;
-+	pinctrl-0 = <&i2c2_pins>;
- 
- 	clock-frequency = <100000>;
- 
-diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
-index 70ac496..2083dfa 100644
---- a/arch/arm/boot/dts/am335x-evm.dts
-+++ b/arch/arm/boot/dts/am335x-evm.dts
-@@ -51,7 +51,7 @@
- 			status = "okay";
- 		};
- 
--		i2c1: i2c@44e0b000 {
-+		i2c0: i2c@44e0b000 {
- 			status = "okay";
- 			clock-frequency = <400000>;
- 
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index ee7a8ca..0f53366 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -220,31 +220,31 @@
- 			status = "disabled";
- 		};
- 
--		i2c1: i2c@44e0b000 {
-+		i2c0: i2c@44e0b000 {
- 			compatible = "ti,omap4-i2c";
- 			#address-cells = <1>;
- 			#size-cells = <0>;
--			ti,hwmods = "i2c1";
-+			ti,hwmods = "i2c1";	/* TODO: Fix hwmod */
- 			reg = <0x44e0b000 0x1000>;
- 			interrupts = <70>;
- 			status = "disabled";
- 		};
- 
--		i2c2: i2c@4802a000 {
-+		i2c1: i2c@4802a000 {
- 			compatible = "ti,omap4-i2c";
- 			#address-cells = <1>;
- 			#size-cells = <0>;
--			ti,hwmods = "i2c2";
-+			ti,hwmods = "i2c2";	/* TODO: Fix hwmod */
- 			reg = <0x4802a000 0x1000>;
- 			interrupts = <71>;
- 			status = "disabled";
- 		};
- 
--		i2c3: i2c@4819c000 {
-+		i2c2: i2c@4819c000 {
- 			compatible = "ti,omap4-i2c";
- 			#address-cells = <1>;
- 			#size-cells = <0>;
--			ti,hwmods = "i2c3";
-+			ti,hwmods = "i2c3";	/* TODO: Fix hwmod */
- 			reg = <0x4819c000 0x1000>;
- 			interrupts = <30>;
- 			status = "disabled";
--- 
-1.7.10.4
-
diff --git a/patches/i2c/0004-am335x-evm-hack-around-i2c-node-names.patch b/patches/i2c/0004-am335x-evm-hack-around-i2c-node-names.patch
deleted file mode 100644
index 0fa869a8415895f65d37af6033327447f0184f12..0000000000000000000000000000000000000000
--- a/patches/i2c/0004-am335x-evm-hack-around-i2c-node-names.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 9c19110ab5ad244799efd787d40c5185fed1c192 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Thu, 13 Dec 2012 14:13:31 +0100
-Subject: [PATCH 4/4] am335x-evm*: hack around i2c node names
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- arch/arm/boot/dts/am335x-evm.dts   |    2 +-
- arch/arm/boot/dts/am335x-evmsk.dts |    2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
-index 2083dfa..de036a5 100644
---- a/arch/arm/boot/dts/am335x-evm.dts
-+++ b/arch/arm/boot/dts/am335x-evm.dts
-@@ -60,7 +60,7 @@
- 			};
- 		};
- 
--		i2c2: i2c@4802a000 {
-+		i2c20: i2c@4802a000 {
- 			status = "okay";
- 			clock-frequency = <100000>;
- 
-diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
-index f5a6162..b946be8 100644
---- a/arch/arm/boot/dts/am335x-evmsk.dts
-+++ b/arch/arm/boot/dts/am335x-evmsk.dts
-@@ -58,7 +58,7 @@
- 			status = "okay";
- 		};
- 
--		i2c1: i2c@44e0b000 {
-+		i2c10: i2c@44e0b000 {
- 			status = "okay";
- 			clock-frequency = <400000>;
- 
--- 
-1.7.7.6
-
diff --git a/patches/iio/0001-iio-common-Add-STMicroelectronics-common-library.patch b/patches/iio/0001-iio-common-Add-STMicroelectronics-common-library.patch
deleted file mode 100644
index 145679ae4d42a1ba2fc8abb24105a68567c8d9f8..0000000000000000000000000000000000000000
--- a/patches/iio/0001-iio-common-Add-STMicroelectronics-common-library.patch
+++ /dev/null
@@ -1,1316 +0,0 @@
-From 9047be3fa05c5d4e19ea5fe98bb51c0e87558516 Mon Sep 17 00:00:00 2001
-From: Denis Ciocca <denis.ciocca@gmail.com>
-Date: Fri, 25 Jan 2013 23:44:00 +0000
-Subject: [PATCH 1/6] iio:common: Add STMicroelectronics common library
-
-This patch add a generic library for STMicroelectronics 3-axis sensors.
-
-Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
-Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
-Signed-off-by: Jonathan Cameron <jic23@kernel.org>
----
- drivers/iio/common/Kconfig                         |   1 +
- drivers/iio/common/Makefile                        |   1 +
- drivers/iio/common/st_sensors/Kconfig              |  14 +
- drivers/iio/common/st_sensors/Makefile             |  10 +
- drivers/iio/common/st_sensors/st_sensors_buffer.c  | 116 ++++++
- drivers/iio/common/st_sensors/st_sensors_core.c    | 460 +++++++++++++++++++++
- drivers/iio/common/st_sensors/st_sensors_i2c.c     |  81 ++++
- drivers/iio/common/st_sensors/st_sensors_spi.c     | 128 ++++++
- drivers/iio/common/st_sensors/st_sensors_trigger.c |  77 ++++
- include/linux/iio/common/st_sensors.h              | 274 ++++++++++++
- include/linux/iio/common/st_sensors_i2c.h          |  20 +
- include/linux/iio/common/st_sensors_spi.h          |  20 +
- 12 files changed, 1202 insertions(+)
- create mode 100644 drivers/iio/common/st_sensors/Kconfig
- create mode 100644 drivers/iio/common/st_sensors/Makefile
- create mode 100644 drivers/iio/common/st_sensors/st_sensors_buffer.c
- create mode 100644 drivers/iio/common/st_sensors/st_sensors_core.c
- create mode 100644 drivers/iio/common/st_sensors/st_sensors_i2c.c
- create mode 100644 drivers/iio/common/st_sensors/st_sensors_spi.c
- create mode 100644 drivers/iio/common/st_sensors/st_sensors_trigger.c
- create mode 100644 include/linux/iio/common/st_sensors.h
- create mode 100644 include/linux/iio/common/st_sensors_i2c.h
- create mode 100644 include/linux/iio/common/st_sensors_spi.h
-
-diff --git a/drivers/iio/common/Kconfig b/drivers/iio/common/Kconfig
-index ed45ee5..0b6e97d 100644
---- a/drivers/iio/common/Kconfig
-+++ b/drivers/iio/common/Kconfig
-@@ -3,3 +3,4 @@
- #
- 
- source "drivers/iio/common/hid-sensors/Kconfig"
-+source "drivers/iio/common/st_sensors/Kconfig"
-diff --git a/drivers/iio/common/Makefile b/drivers/iio/common/Makefile
-index 8158400..c2352be 100644
---- a/drivers/iio/common/Makefile
-+++ b/drivers/iio/common/Makefile
-@@ -7,3 +7,4 @@
- #
- 
- obj-y += hid-sensors/
-+obj-y += st_sensors/
-diff --git a/drivers/iio/common/st_sensors/Kconfig b/drivers/iio/common/st_sensors/Kconfig
-new file mode 100644
-index 0000000..84b2dca
---- /dev/null
-+++ b/drivers/iio/common/st_sensors/Kconfig
-@@ -0,0 +1,14 @@
-+#
-+# Hid Sensor common modules
-+#
-+
-+config IIO_ST_SENSORS_I2C
-+	tristate
-+
-+config IIO_ST_SENSORS_SPI
-+	tristate
-+
-+config IIO_ST_SENSORS_CORE
-+	tristate
-+	select IIO_ST_SENSORS_I2C if I2C
-+	select IIO_ST_SENSORS_SPI if SPI_MASTER
-diff --git a/drivers/iio/common/st_sensors/Makefile b/drivers/iio/common/st_sensors/Makefile
-new file mode 100644
-index 0000000..9f3e24f
---- /dev/null
-+++ b/drivers/iio/common/st_sensors/Makefile
-@@ -0,0 +1,10 @@
-+#
-+# Makefile for the STMicroelectronics sensor common modules.
-+#
-+
-+obj-$(CONFIG_IIO_ST_SENSORS_I2C) += st_sensors_i2c.o
-+obj-$(CONFIG_IIO_ST_SENSORS_SPI) += st_sensors_spi.o
-+obj-$(CONFIG_IIO_ST_SENSORS_CORE) += st_sensors.o
-+st_sensors-y := st_sensors_core.o
-+st_sensors-$(CONFIG_IIO_BUFFER) += st_sensors_buffer.o
-+st_sensors-$(CONFIG_IIO_TRIGGER) += st_sensors_trigger.o
-diff --git a/drivers/iio/common/st_sensors/st_sensors_buffer.c b/drivers/iio/common/st_sensors/st_sensors_buffer.c
-new file mode 100644
-index 0000000..09b236d
---- /dev/null
-+++ b/drivers/iio/common/st_sensors/st_sensors_buffer.c
-@@ -0,0 +1,116 @@
-+/*
-+ * STMicroelectronics sensors buffer library driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/slab.h>
-+#include <linux/iio/iio.h>
-+#include <linux/iio/trigger.h>
-+#include <linux/interrupt.h>
-+#include <linux/iio/buffer.h>
-+#include <linux/iio/trigger_consumer.h>
-+#include <linux/iio/triggered_buffer.h>
-+#include <linux/irqreturn.h>
-+
-+#include <linux/iio/common/st_sensors.h>
-+
-+
-+int st_sensors_get_buffer_element(struct iio_dev *indio_dev, u8 *buf)
-+{
-+	int i, n = 0, len;
-+	u8 addr[ST_SENSORS_NUMBER_DATA_CHANNELS];
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	for (i = 0; i < ST_SENSORS_NUMBER_DATA_CHANNELS; i++) {
-+		if (test_bit(i, indio_dev->active_scan_mask)) {
-+			addr[n] = indio_dev->channels[i].address;
-+			n++;
-+		}
-+	}
-+	switch (n) {
-+	case 1:
-+		len = sdata->tf->read_multiple_byte(&sdata->tb, sdata->dev,
-+			addr[0], ST_SENSORS_BYTE_FOR_CHANNEL, buf,
-+			sdata->multiread_bit);
-+		break;
-+	case 2:
-+		if ((addr[1] - addr[0]) == ST_SENSORS_BYTE_FOR_CHANNEL) {
-+			len = sdata->tf->read_multiple_byte(&sdata->tb,
-+					sdata->dev, addr[0],
-+					ST_SENSORS_BYTE_FOR_CHANNEL*n,
-+					buf, sdata->multiread_bit);
-+		} else {
-+			u8 rx_array[ST_SENSORS_BYTE_FOR_CHANNEL*
-+				    ST_SENSORS_NUMBER_DATA_CHANNELS];
-+			len = sdata->tf->read_multiple_byte(&sdata->tb,
-+				sdata->dev, addr[0],
-+				ST_SENSORS_BYTE_FOR_CHANNEL*
-+				ST_SENSORS_NUMBER_DATA_CHANNELS,
-+				rx_array, sdata->multiread_bit);
-+			if (len < 0)
-+				goto read_data_channels_error;
-+
-+			for (i = 0; i < n * ST_SENSORS_NUMBER_DATA_CHANNELS;
-+									i++) {
-+				if (i < n)
-+					buf[i] = rx_array[i];
-+				else
-+					buf[i] = rx_array[n + i];
-+			}
-+			len = ST_SENSORS_BYTE_FOR_CHANNEL*n;
-+		}
-+		break;
-+	case 3:
-+		len = sdata->tf->read_multiple_byte(&sdata->tb, sdata->dev,
-+			addr[0], ST_SENSORS_BYTE_FOR_CHANNEL*
-+			ST_SENSORS_NUMBER_DATA_CHANNELS,
-+			buf, sdata->multiread_bit);
-+		break;
-+	default:
-+		len = -EINVAL;
-+		goto read_data_channels_error;
-+	}
-+	if (len != ST_SENSORS_BYTE_FOR_CHANNEL*n) {
-+		len = -EIO;
-+		goto read_data_channels_error;
-+	}
-+
-+read_data_channels_error:
-+	return len;
-+}
-+EXPORT_SYMBOL(st_sensors_get_buffer_element);
-+
-+irqreturn_t st_sensors_trigger_handler(int irq, void *p)
-+{
-+	int len;
-+	struct iio_poll_func *pf = p;
-+	struct iio_dev *indio_dev = pf->indio_dev;
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	len = st_sensors_get_buffer_element(indio_dev, sdata->buffer_data);
-+	if (len < 0)
-+		goto st_sensors_get_buffer_element_error;
-+
-+	if (indio_dev->scan_timestamp)
-+		*(s64 *)((u8 *)sdata->buffer_data +
-+				ALIGN(len, sizeof(s64))) = pf->timestamp;
-+
-+	iio_push_to_buffers(indio_dev, sdata->buffer_data);
-+
-+st_sensors_get_buffer_element_error:
-+	iio_trigger_notify_done(indio_dev->trig);
-+
-+	return IRQ_HANDLED;
-+}
-+EXPORT_SYMBOL(st_sensors_trigger_handler);
-+
-+MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
-+MODULE_DESCRIPTION("STMicroelectronics ST-sensors buffer");
-+MODULE_LICENSE("GPL v2");
-diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c
-new file mode 100644
-index 0000000..fba6d68
---- /dev/null
-+++ b/drivers/iio/common/st_sensors/st_sensors_core.c
-@@ -0,0 +1,460 @@
-+/*
-+ * STMicroelectronics sensors core library driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/slab.h>
-+#include <linux/delay.h>
-+#include <linux/iio/iio.h>
-+#include <asm/unaligned.h>
-+
-+#include <linux/iio/common/st_sensors.h>
-+
-+
-+#define ST_SENSORS_WAI_ADDRESS		0x0f
-+
-+static int st_sensors_write_data_with_mask(struct iio_dev *indio_dev,
-+						u8 reg_addr, u8 mask, u8 data)
-+{
-+	int err;
-+	u8 new_data;
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	err = sdata->tf->read_byte(&sdata->tb, sdata->dev, reg_addr, &new_data);
-+	if (err < 0)
-+		goto st_sensors_write_data_with_mask_error;
-+
-+	new_data = ((new_data & (~mask)) | ((data << __ffs(mask)) & mask));
-+	err = sdata->tf->write_byte(&sdata->tb, sdata->dev, reg_addr, new_data);
-+
-+st_sensors_write_data_with_mask_error:
-+	return err;
-+}
-+
-+int st_sensors_get_sampling_frequency_avl(struct iio_dev *indio_dev, char *buf)
-+{
-+	int i, len = 0;
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	mutex_lock(&indio_dev->mlock);
-+	for (i = 0; i < ST_SENSORS_ODR_LIST_MAX; i++) {
-+		if (sdata->sensor->odr.odr_avl[i].hz == 0)
-+			break;
-+
-+		len += scnprintf(buf + len, PAGE_SIZE - len, "%d ",
-+					sdata->sensor->odr.odr_avl[i].hz);
-+	}
-+	mutex_unlock(&indio_dev->mlock);
-+	buf[len - 1] = '\n';
-+
-+	return len;
-+}
-+EXPORT_SYMBOL(st_sensors_get_sampling_frequency_avl);
-+
-+int st_sensors_get_scale_avl(struct iio_dev *indio_dev, char *buf)
-+{
-+	int i, len = 0;
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	mutex_lock(&indio_dev->mlock);
-+	for (i = 0; i < ST_SENSORS_FULLSCALE_AVL_MAX; i++) {
-+		if (sdata->sensor->fs.fs_avl[i].num == 0)
-+			break;
-+
-+		len += scnprintf(buf + len, PAGE_SIZE - len, "0.%06u ",
-+					sdata->sensor->fs.fs_avl[i].gain);
-+	}
-+	mutex_unlock(&indio_dev->mlock);
-+	buf[len - 1] = '\n';
-+
-+	return len;
-+}
-+EXPORT_SYMBOL(st_sensors_get_scale_avl);
-+
-+static int st_sensors_match_odr(struct st_sensors *sensor,
-+			unsigned int odr, struct st_sensor_odr_avl *odr_out)
-+{
-+	int i, ret = -EINVAL;
-+
-+	for (i = 0; i < ST_SENSORS_ODR_LIST_MAX; i++) {
-+		if (sensor->odr.odr_avl[i].hz == 0)
-+			goto st_sensors_match_odr_error;
-+
-+		if (sensor->odr.odr_avl[i].hz == odr) {
-+			odr_out->hz = sensor->odr.odr_avl[i].hz;
-+			odr_out->value = sensor->odr.odr_avl[i].value;
-+			ret = 0;
-+			break;
-+		}
-+	}
-+
-+st_sensors_match_odr_error:
-+	return ret;
-+}
-+
-+int st_sensors_set_odr(struct iio_dev *indio_dev, unsigned int odr)
-+{
-+	int err;
-+	struct st_sensor_odr_avl odr_out;
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	err = st_sensors_match_odr(sdata->sensor, odr, &odr_out);
-+	if (err < 0)
-+		goto st_sensors_match_odr_error;
-+
-+	if ((sdata->sensor->odr.addr == sdata->sensor->pw.addr) &&
-+			(sdata->sensor->odr.mask == sdata->sensor->pw.mask)) {
-+		if (sdata->enabled == true) {
-+			err = st_sensors_write_data_with_mask(indio_dev,
-+				sdata->sensor->odr.addr,
-+				sdata->sensor->odr.mask,
-+				odr_out.value);
-+		} else {
-+			err = 0;
-+		}
-+	} else {
-+		err = st_sensors_write_data_with_mask(indio_dev,
-+			sdata->sensor->odr.addr, sdata->sensor->odr.mask,
-+			odr_out.value);
-+	}
-+	if (err >= 0)
-+		sdata->odr = odr_out.hz;
-+
-+st_sensors_match_odr_error:
-+	return err;
-+}
-+EXPORT_SYMBOL(st_sensors_set_odr);
-+
-+static int st_sensors_match_fs(struct st_sensors *sensor,
-+					unsigned int fs, int *index_fs_avl)
-+{
-+	int i, ret = -EINVAL;
-+
-+	for (i = 0; i < ST_SENSORS_FULLSCALE_AVL_MAX; i++) {
-+		if (sensor->fs.fs_avl[i].num == 0)
-+			goto st_sensors_match_odr_error;
-+
-+		if (sensor->fs.fs_avl[i].num == fs) {
-+			*index_fs_avl = i;
-+			ret = 0;
-+			break;
-+		}
-+	}
-+
-+st_sensors_match_odr_error:
-+	return ret;
-+}
-+
-+static int st_sensors_set_fullscale(struct iio_dev *indio_dev, unsigned int fs)
-+{
-+	int err, i;
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	err = st_sensors_match_fs(sdata->sensor, fs, &i);
-+	if (err < 0)
-+		goto st_accel_set_fullscale_error;
-+
-+	err = st_sensors_write_data_with_mask(indio_dev,
-+				sdata->sensor->fs.addr,
-+				sdata->sensor->fs.mask,
-+				sdata->sensor->fs.fs_avl[i].value);
-+	if (err < 0)
-+		goto st_accel_set_fullscale_error;
-+
-+	sdata->current_fullscale = (struct st_sensor_fullscale_avl *)
-+						&sdata->sensor->fs.fs_avl[i];
-+	return err;
-+
-+st_accel_set_fullscale_error:
-+	dev_err(&indio_dev->dev, "failed to set new fullscale.\n");
-+	return err;
-+}
-+
-+int st_sensors_set_enable(struct iio_dev *indio_dev, bool enable)
-+{
-+	bool found;
-+	u8 tmp_value;
-+	int err = -EINVAL;
-+	struct st_sensor_odr_avl odr_out;
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	if (enable) {
-+		found = false;
-+		tmp_value = sdata->sensor->pw.value_on;
-+		if ((sdata->sensor->odr.addr == sdata->sensor->pw.addr) &&
-+			(sdata->sensor->odr.mask == sdata->sensor->pw.mask)) {
-+			err = st_sensors_match_odr(sdata->sensor,
-+							sdata->odr, &odr_out);
-+			if (err < 0)
-+				goto set_enable_error;
-+			tmp_value = odr_out.value;
-+			found = true;
-+		}
-+		err = st_sensors_write_data_with_mask(indio_dev,
-+				sdata->sensor->pw.addr,
-+				sdata->sensor->pw.mask, tmp_value);
-+		if (err < 0)
-+			goto set_enable_error;
-+
-+		sdata->enabled = true;
-+
-+		if (found)
-+			sdata->odr = odr_out.hz;
-+	} else {
-+		err = st_sensors_write_data_with_mask(indio_dev,
-+				sdata->sensor->pw.addr,
-+				sdata->sensor->pw.mask,
-+				sdata->sensor->pw.value_off);
-+		if (err < 0)
-+			goto set_enable_error;
-+
-+		sdata->enabled = false;
-+	}
-+
-+set_enable_error:
-+	return err;
-+}
-+EXPORT_SYMBOL(st_sensors_set_enable);
-+
-+int st_sensors_set_axis_enable(struct iio_dev *indio_dev, u8 axis_enable)
-+{
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	return st_sensors_write_data_with_mask(indio_dev,
-+				sdata->sensor->enable_axis.addr,
-+				sdata->sensor->enable_axis.mask, axis_enable);
-+}
-+EXPORT_SYMBOL(st_sensors_set_axis_enable);
-+
-+int st_sensors_init_sensor(struct iio_dev *indio_dev)
-+{
-+	int err;
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	mutex_init(&sdata->tb.buf_lock);
-+
-+	err = st_sensors_set_enable(indio_dev, false);
-+	if (err < 0)
-+		goto init_error;
-+
-+	err = st_sensors_set_fullscale(indio_dev,
-+						sdata->current_fullscale->num);
-+	if (err < 0)
-+		goto init_error;
-+
-+	err = st_sensors_set_odr(indio_dev, sdata->odr);
-+	if (err < 0)
-+		goto init_error;
-+
-+	/* set BDU */
-+	err = st_sensors_write_data_with_mask(indio_dev,
-+			sdata->sensor->bdu.addr, sdata->sensor->bdu.mask, true);
-+	if (err < 0)
-+		goto init_error;
-+
-+	err = st_sensors_set_axis_enable(indio_dev, ST_SENSORS_ENABLE_ALL_AXIS);
-+
-+init_error:
-+	return err;
-+}
-+EXPORT_SYMBOL(st_sensors_init_sensor);
-+
-+int st_sensors_set_dataready_irq(struct iio_dev *indio_dev, bool enable)
-+{
-+	int err;
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	/* Enable/Disable the interrupt generator 1. */
-+	if (sdata->sensor->drdy_irq.ig1.en_addr > 0) {
-+		err = st_sensors_write_data_with_mask(indio_dev,
-+			sdata->sensor->drdy_irq.ig1.en_addr,
-+			sdata->sensor->drdy_irq.ig1.en_mask, (int)enable);
-+		if (err < 0)
-+			goto st_accel_set_dataready_irq_error;
-+	}
-+
-+	/* Enable/Disable the interrupt generator for data ready. */
-+	err = st_sensors_write_data_with_mask(indio_dev,
-+			sdata->sensor->drdy_irq.addr,
-+			sdata->sensor->drdy_irq.mask, (int)enable);
-+
-+st_accel_set_dataready_irq_error:
-+	return err;
-+}
-+EXPORT_SYMBOL(st_sensors_set_dataready_irq);
-+
-+int st_sensors_set_fullscale_by_gain(struct iio_dev *indio_dev, int scale)
-+{
-+	int err = -EINVAL, i;
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	for (i = 0; i < ST_SENSORS_FULLSCALE_AVL_MAX; i++) {
-+		if ((sdata->sensor->fs.fs_avl[i].gain == scale) &&
-+				(sdata->sensor->fs.fs_avl[i].gain != 0)) {
-+			err = 0;
-+			break;
-+		}
-+	}
-+	if (err < 0)
-+		goto st_sensors_match_scale_error;
-+
-+	err = st_sensors_set_fullscale(indio_dev,
-+					sdata->sensor->fs.fs_avl[i].num);
-+
-+st_sensors_match_scale_error:
-+	return err;
-+}
-+EXPORT_SYMBOL(st_sensors_set_fullscale_by_gain);
-+
-+static int st_sensors_read_axis_data(struct iio_dev *indio_dev,
-+							u8 ch_addr, int *data)
-+{
-+	int err;
-+	u8 outdata[ST_SENSORS_BYTE_FOR_CHANNEL];
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	err = sdata->tf->read_multiple_byte(&sdata->tb, sdata->dev,
-+				ch_addr, ST_SENSORS_BYTE_FOR_CHANNEL,
-+				outdata, sdata->multiread_bit);
-+	if (err < 0)
-+		goto read_error;
-+
-+	*data = (s16)get_unaligned_le16(outdata);
-+
-+read_error:
-+	return err;
-+}
-+
-+int st_sensors_read_info_raw(struct iio_dev *indio_dev,
-+				struct iio_chan_spec const *ch, int *val)
-+{
-+	int err;
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	mutex_lock(&indio_dev->mlock);
-+	if (indio_dev->currentmode == INDIO_BUFFER_TRIGGERED) {
-+		err = -EBUSY;
-+		goto read_error;
-+	} else {
-+		err = st_sensors_set_enable(indio_dev, true);
-+		if (err < 0)
-+			goto read_error;
-+
-+		msleep((sdata->sensor->bootime * 1000) / sdata->odr);
-+		err = st_sensors_read_axis_data(indio_dev, ch->address, val);
-+		if (err < 0)
-+			goto read_error;
-+
-+		*val = *val >> ch->scan_type.shift;
-+	}
-+	mutex_unlock(&indio_dev->mlock);
-+
-+	return err;
-+
-+read_error:
-+	mutex_unlock(&indio_dev->mlock);
-+	return err;
-+}
-+EXPORT_SYMBOL(st_sensors_read_info_raw);
-+
-+int st_sensors_check_device_support(struct iio_dev *indio_dev,
-+			int num_sensors_list, const struct st_sensors *sensors)
-+{
-+	u8 wai;
-+	int i, n, err;
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	err = sdata->tf->read_byte(&sdata->tb, sdata->dev,
-+					ST_SENSORS_DEFAULT_WAI_ADDRESS, &wai);
-+	if (err < 0) {
-+		dev_err(&indio_dev->dev, "failed to read Who-Am-I register.\n");
-+		goto read_wai_error;
-+	}
-+
-+	for (i = 0; i < num_sensors_list; i++) {
-+		if (sensors[i].wai == wai)
-+			break;
-+	}
-+	if (i == num_sensors_list)
-+		goto device_not_supported;
-+
-+	for (n = 0; n < ARRAY_SIZE(sensors[i].sensors_supported); n++) {
-+		if (strcmp(indio_dev->name,
-+				&sensors[i].sensors_supported[n][0]) == 0)
-+			break;
-+	}
-+	if (n == ARRAY_SIZE(sensors[i].sensors_supported)) {
-+		dev_err(&indio_dev->dev, "device name and WhoAmI mismatch.\n");
-+		goto sensor_name_mismatch;
-+	}
-+
-+	sdata->sensor = (struct st_sensors *)&sensors[i];
-+
-+	return i;
-+
-+device_not_supported:
-+	dev_err(&indio_dev->dev, "device not supported: WhoAmI (0x%x).\n", wai);
-+sensor_name_mismatch:
-+	err = -ENODEV;
-+read_wai_error:
-+	return err;
-+}
-+EXPORT_SYMBOL(st_sensors_check_device_support);
-+
-+ssize_t st_sensors_sysfs_get_sampling_frequency(struct device *dev,
-+				struct device_attribute *attr, char *buf)
-+{
-+	struct st_sensor_data *adata = iio_priv(dev_get_drvdata(dev));
-+
-+	return sprintf(buf, "%d\n", adata->odr);
-+}
-+EXPORT_SYMBOL(st_sensors_sysfs_get_sampling_frequency);
-+
-+ssize_t st_sensors_sysfs_set_sampling_frequency(struct device *dev,
-+		struct device_attribute *attr, const char *buf, size_t size)
-+{
-+	int err;
-+	unsigned int odr;
-+	struct iio_dev *indio_dev = dev_get_drvdata(dev);
-+
-+	err = kstrtoint(buf, 10, &odr);
-+	if (err < 0)
-+		goto conversion_error;
-+
-+	mutex_lock(&indio_dev->mlock);
-+	err = st_sensors_set_odr(indio_dev, odr);
-+	mutex_unlock(&indio_dev->mlock);
-+
-+conversion_error:
-+	return err < 0 ? err : size;
-+}
-+EXPORT_SYMBOL(st_sensors_sysfs_set_sampling_frequency);
-+
-+ssize_t st_sensors_sysfs_sampling_frequency_avail(struct device *dev,
-+				struct device_attribute *attr, char *buf)
-+{
-+	struct iio_dev *indio_dev = dev_get_drvdata(dev);
-+
-+	return st_sensors_get_sampling_frequency_avl(indio_dev, buf);
-+}
-+EXPORT_SYMBOL(st_sensors_sysfs_sampling_frequency_avail);
-+
-+ssize_t st_sensors_sysfs_scale_avail(struct device *dev,
-+				struct device_attribute *attr, char *buf)
-+{
-+	struct iio_dev *indio_dev = dev_get_drvdata(dev);
-+
-+	return st_sensors_get_scale_avl(indio_dev, buf);
-+}
-+EXPORT_SYMBOL(st_sensors_sysfs_scale_avail);
-+
-+MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
-+MODULE_DESCRIPTION("STMicroelectronics ST-sensors core");
-+MODULE_LICENSE("GPL v2");
-diff --git a/drivers/iio/common/st_sensors/st_sensors_i2c.c b/drivers/iio/common/st_sensors/st_sensors_i2c.c
-new file mode 100644
-index 0000000..38af944
---- /dev/null
-+++ b/drivers/iio/common/st_sensors/st_sensors_i2c.c
-@@ -0,0 +1,81 @@
-+/*
-+ * STMicroelectronics sensors i2c library driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/slab.h>
-+#include <linux/iio/iio.h>
-+
-+#include <linux/iio/common/st_sensors_i2c.h>
-+
-+
-+#define ST_SENSORS_I2C_MULTIREAD	0x80
-+
-+static unsigned int st_sensors_i2c_get_irq(struct iio_dev *indio_dev)
-+{
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	return to_i2c_client(sdata->dev)->irq;
-+}
-+
-+static int st_sensors_i2c_read_byte(struct st_sensor_transfer_buffer *tb,
-+				struct device *dev, u8 reg_addr, u8 *res_byte)
-+{
-+	int err;
-+
-+	err = i2c_smbus_read_byte_data(to_i2c_client(dev), reg_addr);
-+	if (err < 0)
-+		goto st_accel_i2c_read_byte_error;
-+
-+	*res_byte = err & 0xff;
-+
-+st_accel_i2c_read_byte_error:
-+	return err < 0 ? err : 0;
-+}
-+
-+static int st_sensors_i2c_read_multiple_byte(
-+		struct st_sensor_transfer_buffer *tb, struct device *dev,
-+			u8 reg_addr, int len, u8 *data, bool multiread_bit)
-+{
-+	if (multiread_bit)
-+		reg_addr |= ST_SENSORS_I2C_MULTIREAD;
-+
-+	return i2c_smbus_read_i2c_block_data(to_i2c_client(dev),
-+							reg_addr, len, data);
-+}
-+
-+static int st_sensors_i2c_write_byte(struct st_sensor_transfer_buffer *tb,
-+				struct device *dev, u8 reg_addr, u8 data)
-+{
-+	return i2c_smbus_write_byte_data(to_i2c_client(dev), reg_addr, data);
-+}
-+
-+static const struct st_sensor_transfer_function st_sensors_tf_i2c = {
-+	.read_byte = st_sensors_i2c_read_byte,
-+	.write_byte = st_sensors_i2c_write_byte,
-+	.read_multiple_byte = st_sensors_i2c_read_multiple_byte,
-+};
-+
-+void st_sensors_i2c_configure(struct iio_dev *indio_dev,
-+		struct i2c_client *client, struct st_sensor_data *sdata)
-+{
-+	i2c_set_clientdata(client, indio_dev);
-+
-+	indio_dev->dev.parent = &client->dev;
-+	indio_dev->name = client->name;
-+
-+	sdata->tf = &st_sensors_tf_i2c;
-+	sdata->get_irq_data_ready = st_sensors_i2c_get_irq;
-+}
-+EXPORT_SYMBOL(st_sensors_i2c_configure);
-+
-+MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
-+MODULE_DESCRIPTION("STMicroelectronics ST-sensors i2c driver");
-+MODULE_LICENSE("GPL v2");
-diff --git a/drivers/iio/common/st_sensors/st_sensors_spi.c b/drivers/iio/common/st_sensors/st_sensors_spi.c
-new file mode 100644
-index 0000000..f0aa2f1
---- /dev/null
-+++ b/drivers/iio/common/st_sensors/st_sensors_spi.c
-@@ -0,0 +1,128 @@
-+/*
-+ * STMicroelectronics sensors spi library driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/slab.h>
-+#include <linux/iio/iio.h>
-+
-+#include <linux/iio/common/st_sensors_spi.h>
-+
-+
-+#define ST_SENSORS_SPI_MULTIREAD	0xc0
-+#define ST_SENSORS_SPI_READ		0x80
-+
-+static unsigned int st_sensors_spi_get_irq(struct iio_dev *indio_dev)
-+{
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	return to_spi_device(sdata->dev)->irq;
-+}
-+
-+static int st_sensors_spi_read(struct st_sensor_transfer_buffer *tb,
-+	struct device *dev, u8 reg_addr, int len, u8 *data, bool multiread_bit)
-+{
-+	struct spi_message msg;
-+	int err;
-+
-+	struct spi_transfer xfers[] = {
-+		{
-+			.tx_buf = tb->tx_buf,
-+			.bits_per_word = 8,
-+			.len = 1,
-+		},
-+		{
-+			.rx_buf = tb->rx_buf,
-+			.bits_per_word = 8,
-+			.len = len,
-+		}
-+	};
-+
-+	mutex_lock(&tb->buf_lock);
-+	if ((multiread_bit) && (len > 1))
-+		tb->tx_buf[0] = reg_addr | ST_SENSORS_SPI_MULTIREAD;
-+	else
-+		tb->tx_buf[0] = reg_addr | ST_SENSORS_SPI_READ;
-+
-+	spi_message_init(&msg);
-+	spi_message_add_tail(&xfers[0], &msg);
-+	spi_message_add_tail(&xfers[1], &msg);
-+	err = spi_sync(to_spi_device(dev), &msg);
-+	if (err)
-+		goto acc_spi_read_error;
-+
-+	memcpy(data, tb->rx_buf, len*sizeof(u8));
-+	mutex_unlock(&tb->buf_lock);
-+	return len;
-+
-+acc_spi_read_error:
-+	mutex_unlock(&tb->buf_lock);
-+	return err;
-+}
-+
-+static int st_sensors_spi_read_byte(struct st_sensor_transfer_buffer *tb,
-+				struct device *dev, u8 reg_addr, u8 *res_byte)
-+{
-+	return st_sensors_spi_read(tb, dev, reg_addr, 1, res_byte, false);
-+}
-+
-+static int st_sensors_spi_read_multiple_byte(
-+	struct st_sensor_transfer_buffer *tb, struct device *dev,
-+			u8 reg_addr, int len, u8 *data, bool multiread_bit)
-+{
-+	return st_sensors_spi_read(tb, dev, reg_addr, len, data, multiread_bit);
-+}
-+
-+static int st_sensors_spi_write_byte(struct st_sensor_transfer_buffer *tb,
-+				struct device *dev, u8 reg_addr, u8 data)
-+{
-+	struct spi_message msg;
-+	int err;
-+
-+	struct spi_transfer xfers = {
-+		.tx_buf = tb->tx_buf,
-+		.bits_per_word = 8,
-+		.len = 2,
-+	};
-+
-+	mutex_lock(&tb->buf_lock);
-+	tb->tx_buf[0] = reg_addr;
-+	tb->tx_buf[1] = data;
-+
-+	spi_message_init(&msg);
-+	spi_message_add_tail(&xfers, &msg);
-+	err = spi_sync(to_spi_device(dev), &msg);
-+	mutex_unlock(&tb->buf_lock);
-+
-+	return err;
-+}
-+
-+static const struct st_sensor_transfer_function st_sensors_tf_spi = {
-+	.read_byte = st_sensors_spi_read_byte,
-+	.write_byte = st_sensors_spi_write_byte,
-+	.read_multiple_byte = st_sensors_spi_read_multiple_byte,
-+};
-+
-+void st_sensors_spi_configure(struct iio_dev *indio_dev,
-+			struct spi_device *spi, struct st_sensor_data *sdata)
-+{
-+	spi_set_drvdata(spi, indio_dev);
-+
-+	indio_dev->dev.parent = &spi->dev;
-+	indio_dev->name = spi->modalias;
-+
-+	sdata->tf = &st_sensors_tf_spi;
-+	sdata->get_irq_data_ready = st_sensors_spi_get_irq;
-+}
-+EXPORT_SYMBOL(st_sensors_spi_configure);
-+
-+MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
-+MODULE_DESCRIPTION("STMicroelectronics ST-sensors spi driver");
-+MODULE_LICENSE("GPL v2");
-diff --git a/drivers/iio/common/st_sensors/st_sensors_trigger.c b/drivers/iio/common/st_sensors/st_sensors_trigger.c
-new file mode 100644
-index 0000000..139ed03
---- /dev/null
-+++ b/drivers/iio/common/st_sensors/st_sensors_trigger.c
-@@ -0,0 +1,77 @@
-+/*
-+ * STMicroelectronics sensors trigger library driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/slab.h>
-+#include <linux/iio/iio.h>
-+#include <linux/iio/trigger.h>
-+#include <linux/interrupt.h>
-+
-+#include <linux/iio/common/st_sensors.h>
-+
-+
-+int st_sensors_allocate_trigger(struct iio_dev *indio_dev,
-+				const struct iio_trigger_ops *trigger_ops)
-+{
-+	int err;
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	sdata->trig = iio_trigger_alloc("%s-trigger", indio_dev->name);
-+	if (sdata->trig == NULL) {
-+		err = -ENOMEM;
-+		dev_err(&indio_dev->dev, "failed to allocate iio trigger.\n");
-+		goto iio_trigger_alloc_error;
-+	}
-+
-+	err = request_threaded_irq(sdata->get_irq_data_ready(indio_dev),
-+			iio_trigger_generic_data_rdy_poll,
-+			NULL,
-+			IRQF_TRIGGER_RISING,
-+			sdata->trig->name,
-+			sdata->trig);
-+	if (err)
-+		goto request_irq_error;
-+
-+	sdata->trig->private_data = indio_dev;
-+	sdata->trig->ops = trigger_ops;
-+	sdata->trig->dev.parent = sdata->dev;
-+
-+	err = iio_trigger_register(sdata->trig);
-+	if (err < 0) {
-+		dev_err(&indio_dev->dev, "failed to register iio trigger.\n");
-+		goto iio_trigger_register_error;
-+	}
-+	indio_dev->trig = sdata->trig;
-+
-+	return 0;
-+
-+iio_trigger_register_error:
-+	free_irq(sdata->get_irq_data_ready(indio_dev), sdata->trig);
-+request_irq_error:
-+	iio_trigger_free(sdata->trig);
-+iio_trigger_alloc_error:
-+	return err;
-+}
-+EXPORT_SYMBOL(st_sensors_allocate_trigger);
-+
-+void st_sensors_deallocate_trigger(struct iio_dev *indio_dev)
-+{
-+	struct st_sensor_data *sdata = iio_priv(indio_dev);
-+
-+	iio_trigger_unregister(sdata->trig);
-+	free_irq(sdata->get_irq_data_ready(indio_dev), sdata->trig);
-+	iio_trigger_free(sdata->trig);
-+}
-+EXPORT_SYMBOL(st_sensors_deallocate_trigger);
-+
-+MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
-+MODULE_DESCRIPTION("STMicroelectronics ST-sensors trigger");
-+MODULE_LICENSE("GPL v2");
-diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h
-new file mode 100644
-index 0000000..3cc8571
---- /dev/null
-+++ b/include/linux/iio/common/st_sensors.h
-@@ -0,0 +1,274 @@
-+/*
-+ * STMicroelectronics sensors library driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#ifndef ST_SENSORS_H
-+#define ST_SENSORS_H
-+
-+#include <linux/i2c.h>
-+#include <linux/spi/spi.h>
-+#include <linux/irqreturn.h>
-+#include <linux/iio/trigger.h>
-+
-+#define ST_SENSORS_TX_MAX_LENGTH		2
-+#define ST_SENSORS_RX_MAX_LENGTH		6
-+
-+#define ST_SENSORS_ODR_LIST_MAX			10
-+#define ST_SENSORS_FULLSCALE_AVL_MAX		10
-+
-+#define ST_SENSORS_NUMBER_ALL_CHANNELS		4
-+#define ST_SENSORS_NUMBER_DATA_CHANNELS		3
-+#define ST_SENSORS_ENABLE_ALL_AXIS		0x07
-+#define ST_SENSORS_BYTE_FOR_CHANNEL		2
-+#define ST_SENSORS_SCAN_X			0
-+#define ST_SENSORS_SCAN_Y			1
-+#define ST_SENSORS_SCAN_Z			2
-+#define ST_SENSORS_DEFAULT_12_REALBITS		12
-+#define ST_SENSORS_DEFAULT_16_REALBITS		16
-+#define ST_SENSORS_DEFAULT_POWER_ON_VALUE	0x01
-+#define ST_SENSORS_DEFAULT_POWER_OFF_VALUE	0x00
-+#define ST_SENSORS_DEFAULT_WAI_ADDRESS		0x0f
-+#define ST_SENSORS_DEFAULT_AXIS_ADDR		0x20
-+#define ST_SENSORS_DEFAULT_AXIS_MASK		0x07
-+#define ST_SENSORS_DEFAULT_AXIS_N_BIT		3
-+
-+#define ST_SENSORS_MAX_NAME			17
-+#define ST_SENSORS_MAX_4WAI			7
-+
-+#define ST_SENSORS_LSM_CHANNELS(device_type, index, mod, endian, bits, addr) \
-+{ \
-+	.type = device_type, \
-+	.modified = 1, \
-+	.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \
-+			IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \
-+	.scan_index = index, \
-+	.channel2 = mod, \
-+	.address = addr, \
-+	.scan_type = { \
-+		.sign = 's', \
-+		.realbits = bits, \
-+		.shift = 16 - bits, \
-+		.storagebits = 16, \
-+		.endianness = endian, \
-+	}, \
-+}
-+
-+#define ST_SENSOR_DEV_ATTR_SAMP_FREQ() \
-+		IIO_DEV_ATTR_SAMP_FREQ(S_IWUSR | S_IRUGO, \
-+			st_sensors_sysfs_get_sampling_frequency, \
-+			st_sensors_sysfs_set_sampling_frequency)
-+
-+#define ST_SENSORS_DEV_ATTR_SAMP_FREQ_AVAIL() \
-+		IIO_DEV_ATTR_SAMP_FREQ_AVAIL( \
-+			st_sensors_sysfs_sampling_frequency_avail)
-+
-+#define ST_SENSORS_DEV_ATTR_SCALE_AVAIL(name) \
-+		IIO_DEVICE_ATTR(name, S_IRUGO, \
-+			st_sensors_sysfs_scale_avail, NULL , 0);
-+
-+struct st_sensor_odr_avl {
-+	unsigned int hz;
-+	u8 value;
-+};
-+
-+struct st_sensor_odr {
-+	u8 addr;
-+	u8 mask;
-+	struct st_sensor_odr_avl odr_avl[ST_SENSORS_ODR_LIST_MAX];
-+};
-+
-+struct st_sensor_power {
-+	u8 addr;
-+	u8 mask;
-+	u8 value_off;
-+	u8 value_on;
-+};
-+
-+struct st_sensor_axis {
-+	u8 addr;
-+	u8 mask;
-+};
-+
-+struct st_sensor_fullscale_avl {
-+	unsigned int num;
-+	u8 value;
-+	unsigned int gain;
-+	unsigned int gain2;
-+};
-+
-+struct st_sensor_fullscale {
-+	u8 addr;
-+	u8 mask;
-+	struct st_sensor_fullscale_avl fs_avl[ST_SENSORS_FULLSCALE_AVL_MAX];
-+};
-+
-+/**
-+ * struct st_sensor_bdu - ST sensor device block data update
-+ * @addr: address of the register.
-+ * @mask: mask to write the block data update flag.
-+ */
-+struct st_sensor_bdu {
-+	u8 addr;
-+	u8 mask;
-+};
-+
-+/**
-+ * struct st_sensor_data_ready_irq - ST sensor device data-ready interrupt
-+ * @addr: address of the register.
-+ * @mask: mask to write the on/off value.
-+ * struct ig1 - represents the Interrupt Generator 1 of sensors.
-+ * @en_addr: address of the enable ig1 register.
-+ * @en_mask: mask to write the on/off value for enable.
-+ */
-+struct st_sensor_data_ready_irq {
-+	u8 addr;
-+	u8 mask;
-+	struct {
-+		u8 en_addr;
-+		u8 en_mask;
-+	} ig1;
-+};
-+
-+/**
-+ * struct st_sensor_transfer_buffer - ST sensor device I/O buffer
-+ * @buf_lock: Mutex to protect rx and tx buffers.
-+ * @tx_buf: Buffer used by SPI transfer function to send data to the sensors.
-+ *	This buffer is used to avoid DMA not-aligned issue.
-+ * @rx_buf: Buffer used by SPI transfer to receive data from sensors.
-+ *	This buffer is used to avoid DMA not-aligned issue.
-+ */
-+struct st_sensor_transfer_buffer {
-+	struct mutex buf_lock;
-+	u8 rx_buf[ST_SENSORS_RX_MAX_LENGTH];
-+	u8 tx_buf[ST_SENSORS_TX_MAX_LENGTH] ____cacheline_aligned;
-+};
-+
-+/**
-+ * struct st_sensor_transfer_function - ST sensor device I/O function
-+ * @read_byte: Function used to read one byte.
-+ * @write_byte: Function used to write one byte.
-+ * @read_multiple_byte: Function used to read multiple byte.
-+ */
-+struct st_sensor_transfer_function {
-+	int (*read_byte) (struct st_sensor_transfer_buffer *tb,
-+				struct device *dev, u8 reg_addr, u8 *res_byte);
-+	int (*write_byte) (struct st_sensor_transfer_buffer *tb,
-+				struct device *dev, u8 reg_addr, u8 data);
-+	int (*read_multiple_byte) (struct st_sensor_transfer_buffer *tb,
-+		struct device *dev, u8 reg_addr, int len, u8 *data,
-+							bool multiread_bit);
-+};
-+
-+/**
-+ * struct st_sensors - ST sensors list
-+ * @wai: Contents of WhoAmI register.
-+ * @sensors_supported: List of supported sensors by struct itself.
-+ * @ch: IIO channels for the sensor.
-+ * @odr: Output data rate register and ODR list available.
-+ * @pw: Power register of the sensor.
-+ * @enable_axis: Enable one or more axis of the sensor.
-+ * @fs: Full scale register and full scale list available.
-+ * @bdu: Block data update register.
-+ * @drdy_irq: Data ready register of the sensor.
-+ * @multi_read_bit: Use or not particular bit for [I2C/SPI] multi-read.
-+ * @bootime: samples to discard when sensor passing from power-down to power-up.
-+ */
-+struct st_sensors {
-+	u8 wai;
-+	char sensors_supported[ST_SENSORS_MAX_4WAI][ST_SENSORS_MAX_NAME];
-+	struct iio_chan_spec *ch;
-+	struct st_sensor_odr odr;
-+	struct st_sensor_power pw;
-+	struct st_sensor_axis enable_axis;
-+	struct st_sensor_fullscale fs;
-+	struct st_sensor_bdu bdu;
-+	struct st_sensor_data_ready_irq drdy_irq;
-+	bool multi_read_bit;
-+	unsigned int bootime;
-+};
-+
-+/**
-+ * struct st_sensor_data - ST sensor device status
-+ * @dev: Pointer to instance of struct device (I2C or SPI).
-+ * @trig: The trigger in use by the core driver.
-+ * @sensor: Pointer to the current sensor struct in use.
-+ * @current_fullscale: Maximum range of measure by the sensor.
-+ * @enabled: Status of the sensor (false->off, true->on).
-+ * @multiread_bit: Use or not particular bit for [I2C/SPI] multiread.
-+ * @buffer_data: Data used by buffer part.
-+ * @odr: Output data rate of the sensor [Hz].
-+ * @get_irq_data_ready: Function to get the IRQ used for data ready signal.
-+ * @tf: Transfer function structure used by I/O operations.
-+ * @tb: Transfer buffers and mutex used by I/O operations.
-+ */
-+struct st_sensor_data {
-+	struct device *dev;
-+	struct iio_trigger *trig;
-+	struct st_sensors *sensor;
-+	struct st_sensor_fullscale_avl *current_fullscale;
-+
-+	bool enabled;
-+	bool multiread_bit;
-+
-+	char *buffer_data;
-+
-+	unsigned int odr;
-+
-+	unsigned int (*get_irq_data_ready) (struct iio_dev *indio_dev);
-+
-+	const struct st_sensor_transfer_function *tf;
-+	struct st_sensor_transfer_buffer tb;
-+};
-+
-+#ifdef CONFIG_IIO_BUFFER
-+int st_sensors_allocate_trigger(struct iio_dev *indio_dev,
-+				const struct iio_trigger_ops *trigger_ops);
-+
-+void st_sensors_deallocate_trigger(struct iio_dev *indio_dev);
-+
-+irqreturn_t st_sensors_trigger_handler(int irq, void *p);
-+
-+int st_sensors_get_buffer_element(struct iio_dev *indio_dev, u8 *buf);
-+#endif
-+
-+int st_sensors_init_sensor(struct iio_dev *indio_dev);
-+
-+int st_sensors_set_enable(struct iio_dev *indio_dev, bool enable);
-+
-+int st_sensors_set_axis_enable(struct iio_dev *indio_dev, u8 axis_enable);
-+
-+int st_sensors_get_sampling_frequency_avl(struct iio_dev *indio_dev, char *buf);
-+
-+int st_sensors_get_scale_avl(struct iio_dev *indio_dev, char *buf);
-+
-+int st_sensors_set_odr(struct iio_dev *indio_dev, unsigned int odr);
-+
-+int st_sensors_set_dataready_irq(struct iio_dev *indio_dev, bool enable);
-+
-+int st_sensors_set_fullscale_by_gain(struct iio_dev *indio_dev, int scale);
-+
-+int st_sensors_read_info_raw(struct iio_dev *indio_dev,
-+				struct iio_chan_spec const *ch, int *val);
-+
-+int st_sensors_check_device_support(struct iio_dev *indio_dev,
-+			int num_sensors_list, const struct st_sensors *sensors);
-+
-+ssize_t st_sensors_sysfs_get_sampling_frequency(struct device *dev,
-+				struct device_attribute *attr, char *buf);
-+
-+ssize_t st_sensors_sysfs_set_sampling_frequency(struct device *dev,
-+		struct device_attribute *attr, const char *buf, size_t size);
-+
-+ssize_t st_sensors_sysfs_sampling_frequency_avail(struct device *dev,
-+				struct device_attribute *attr, char *buf);
-+
-+ssize_t st_sensors_sysfs_scale_avail(struct device *dev,
-+				struct device_attribute *attr, char *buf);
-+
-+#endif /* ST_SENSORS_H */
-diff --git a/include/linux/iio/common/st_sensors_i2c.h b/include/linux/iio/common/st_sensors_i2c.h
-new file mode 100644
-index 0000000..67d8453
---- /dev/null
-+++ b/include/linux/iio/common/st_sensors_i2c.h
-@@ -0,0 +1,20 @@
-+/*
-+ * STMicroelectronics sensors i2c library driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#ifndef ST_SENSORS_I2C_H
-+#define ST_SENSORS_I2C_H
-+
-+#include <linux/i2c.h>
-+#include <linux/iio/common/st_sensors.h>
-+
-+void st_sensors_i2c_configure(struct iio_dev *indio_dev,
-+		struct i2c_client *client, struct st_sensor_data *sdata);
-+
-+#endif /* ST_SENSORS_I2C_H */
-diff --git a/include/linux/iio/common/st_sensors_spi.h b/include/linux/iio/common/st_sensors_spi.h
-new file mode 100644
-index 0000000..d964a35
---- /dev/null
-+++ b/include/linux/iio/common/st_sensors_spi.h
-@@ -0,0 +1,20 @@
-+/*
-+ * STMicroelectronics sensors spi library driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#ifndef ST_SENSORS_SPI_H
-+#define ST_SENSORS_SPI_H
-+
-+#include <linux/spi/spi.h>
-+#include <linux/iio/common/st_sensors.h>
-+
-+void st_sensors_spi_configure(struct iio_dev *indio_dev,
-+			struct spi_device *spi, struct st_sensor_data *sdata);
-+
-+#endif /* ST_SENSORS_SPI_H */
--- 
-1.8.1
-
diff --git a/patches/iio/0002-iio-accel-Add-STMicroelectronics-accelerometers-driv.patch b/patches/iio/0002-iio-accel-Add-STMicroelectronics-accelerometers-driv.patch
deleted file mode 100644
index 2baa6de7d8b07197f3776981218f5acf055796ad..0000000000000000000000000000000000000000
--- a/patches/iio/0002-iio-accel-Add-STMicroelectronics-accelerometers-driv.patch
+++ /dev/null
@@ -1,954 +0,0 @@
-From d1579f48c5c95eb57ed6ca5151687605896b9c32 Mon Sep 17 00:00:00 2001
-From: Denis Ciocca <denis.ciocca@gmail.com>
-Date: Fri, 25 Jan 2013 23:44:00 +0000
-Subject: [PATCH 2/6] iio:accel: Add STMicroelectronics accelerometers driver
-
-This patch adds a generic accelerometer driver for STMicroelectronics
-accelerometers, currently it supports:
-LSM303DLH, LSM303DLHC, LIS3DH, LSM330D, LSM330DL, LSM330DLC,
-LIS331DLH, LSM303DL, LSM303DLM, LSM330.
-
-Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
-Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
-Signed-off-by: Jonathan Cameron <jic23@kernel.org>
----
- drivers/iio/accel/Kconfig           |  38 +++
- drivers/iio/accel/Makefile          |   9 +
- drivers/iio/accel/st_accel.h        |  47 ++++
- drivers/iio/accel/st_accel_buffer.c | 114 +++++++++
- drivers/iio/accel/st_accel_core.c   | 495 ++++++++++++++++++++++++++++++++++++
- drivers/iio/accel/st_accel_i2c.c    |  87 +++++++
- drivers/iio/accel/st_accel_spi.c    |  86 +++++++
- 7 files changed, 876 insertions(+)
- create mode 100644 drivers/iio/accel/st_accel.h
- create mode 100644 drivers/iio/accel/st_accel_buffer.c
- create mode 100644 drivers/iio/accel/st_accel_core.c
- create mode 100644 drivers/iio/accel/st_accel_i2c.c
- create mode 100644 drivers/iio/accel/st_accel_spi.c
-
-diff --git a/drivers/iio/accel/Kconfig b/drivers/iio/accel/Kconfig
-index 05e996f..bb59496 100644
---- a/drivers/iio/accel/Kconfig
-+++ b/drivers/iio/accel/Kconfig
-@@ -14,4 +14,42 @@ config HID_SENSOR_ACCEL_3D
- 	  Say yes here to build support for the HID SENSOR
- 	  accelerometers 3D.
- 
-+config KXSD9
-+	tristate "Kionix KXSD9 Accelerometer Driver"
-+	depends on SPI
-+	help
-+	  Say yes here to build support for the Kionix KXSD9 accelerometer.
-+	  Currently this only supports the device via an SPI interface.
-+
-+config IIO_ST_ACCEL_3AXIS
-+	tristate "STMicroelectronics accelerometers 3-Axis Driver"
-+	depends on (I2C || SPI_MASTER) && SYSFS
-+	select IIO_ST_SENSORS_CORE
-+	select IIO_ST_ACCEL_I2C_3AXIS if (I2C)
-+	select IIO_ST_ACCEL_SPI_3AXIS if (SPI_MASTER)
-+	select IIO_TRIGGERED_BUFFER if (IIO_BUFFER)
-+	select IIO_ST_ACCEL_BUFFER if (IIO_TRIGGERED_BUFFER)
-+	help
-+	  Say yes here to build support for STMicroelectronics accelerometers:
-+	  LSM303DLH, LSM303DLHC, LIS3DH, LSM330D, LSM330DL, LSM330DLC,
-+	  LIS331DLH, LSM303DL, LSM303DLM, LSM330.
-+
-+	  This driver can also be built as a module. If so, will be created
-+	  these modules:
-+	  - st_accel (core functions for the driver [it is mandatory]);
-+	  - st_accel_i2c (necessary for the I2C devices [optional*]);
-+	  - st_accel_spi (necessary for the SPI devices [optional*]);
-+
-+	  (*) one of these is necessary to do something.
-+
-+config IIO_ST_ACCEL_I2C_3AXIS
-+	tristate
-+	depends on IIO_ST_ACCEL_3AXIS
-+	depends on IIO_ST_SENSORS_I2C
-+
-+config IIO_ST_ACCEL_SPI_3AXIS
-+	tristate
-+	depends on IIO_ST_ACCEL_3AXIS
-+	depends on IIO_ST_SENSORS_SPI
-+
- endmenu
-diff --git a/drivers/iio/accel/Makefile b/drivers/iio/accel/Makefile
-index 5bc6855..87d8fa2 100644
---- a/drivers/iio/accel/Makefile
-+++ b/drivers/iio/accel/Makefile
-@@ -3,3 +3,12 @@
- #
- 
- obj-$(CONFIG_HID_SENSOR_ACCEL_3D) += hid-sensor-accel-3d.o
-+
-+obj-$(CONFIG_IIO_ST_ACCEL_3AXIS) += st_accel.o
-+st_accel-y := st_accel_core.o
-+st_accel-$(CONFIG_IIO_BUFFER) += st_accel_buffer.o
-+
-+obj-$(CONFIG_IIO_ST_ACCEL_I2C_3AXIS) += st_accel_i2c.o
-+obj-$(CONFIG_IIO_ST_ACCEL_SPI_3AXIS) += st_accel_spi.o
-+
-+obj-$(CONFIG_KXSD9)	+= kxsd9.o
-diff --git a/drivers/iio/accel/st_accel.h b/drivers/iio/accel/st_accel.h
-new file mode 100644
-index 0000000..37949b9
---- /dev/null
-+++ b/drivers/iio/accel/st_accel.h
-@@ -0,0 +1,47 @@
-+/*
-+ * STMicroelectronics accelerometers driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ * v. 1.0.0
-+ * Licensed under the GPL-2.
-+ */
-+
-+#ifndef ST_ACCEL_H
-+#define ST_ACCEL_H
-+
-+#include <linux/types.h>
-+#include <linux/iio/common/st_sensors.h>
-+
-+#define LSM303DLHC_ACCEL_DEV_NAME	"lsm303dlhc_accel"
-+#define LIS3DH_ACCEL_DEV_NAME		"lis3dh"
-+#define LSM330D_ACCEL_DEV_NAME		"lsm330d_accel"
-+#define LSM330DL_ACCEL_DEV_NAME		"lsm330dl_accel"
-+#define LSM330DLC_ACCEL_DEV_NAME	"lsm330dlc_accel"
-+#define LIS331DLH_ACCEL_DEV_NAME	"lis331dlh"
-+#define LSM303DL_ACCEL_DEV_NAME		"lsm303dl_accel"
-+#define LSM303DLH_ACCEL_DEV_NAME	"lsm303dlh_accel"
-+#define LSM303DLM_ACCEL_DEV_NAME	"lsm303dlm_accel"
-+#define LSM330_ACCEL_DEV_NAME		"lsm330_accel"
-+
-+int st_accel_common_probe(struct iio_dev *indio_dev);
-+void st_accel_common_remove(struct iio_dev *indio_dev);
-+
-+#ifdef CONFIG_IIO_BUFFER
-+int st_accel_allocate_ring(struct iio_dev *indio_dev);
-+void st_accel_deallocate_ring(struct iio_dev *indio_dev);
-+int st_accel_trig_set_state(struct iio_trigger *trig, bool state);
-+#define ST_ACCEL_TRIGGER_SET_STATE (&st_accel_trig_set_state)
-+#else /* CONFIG_IIO_BUFFER */
-+static inline int st_accel_allocate_ring(struct iio_dev *indio_dev)
-+{
-+	return 0;
-+}
-+static inline void st_accel_deallocate_ring(struct iio_dev *indio_dev)
-+{
-+}
-+#define ST_ACCEL_TRIGGER_SET_STATE NULL
-+#endif /* CONFIG_IIO_BUFFER */
-+
-+#endif /* ST_ACCEL_H */
-diff --git a/drivers/iio/accel/st_accel_buffer.c b/drivers/iio/accel/st_accel_buffer.c
-new file mode 100644
-index 0000000..6bd82c7
---- /dev/null
-+++ b/drivers/iio/accel/st_accel_buffer.c
-@@ -0,0 +1,114 @@
-+/*
-+ * STMicroelectronics accelerometers driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/kernel.h>
-+#include <linux/slab.h>
-+#include <linux/stat.h>
-+#include <linux/interrupt.h>
-+#include <linux/i2c.h>
-+#include <linux/delay.h>
-+#include <linux/iio/iio.h>
-+#include <linux/iio/buffer.h>
-+#include <linux/iio/trigger_consumer.h>
-+#include <linux/iio/triggered_buffer.h>
-+
-+#include <linux/iio/common/st_sensors.h>
-+#include "st_accel.h"
-+
-+int st_accel_trig_set_state(struct iio_trigger *trig, bool state)
-+{
-+	struct iio_dev *indio_dev = trig->private_data;
-+
-+	return st_sensors_set_dataready_irq(indio_dev, state);
-+}
-+
-+static int st_accel_buffer_preenable(struct iio_dev *indio_dev)
-+{
-+	int err;
-+
-+	err = st_sensors_set_enable(indio_dev, true);
-+	if (err < 0)
-+		goto st_accel_set_enable_error;
-+
-+	err = iio_sw_buffer_preenable(indio_dev);
-+
-+st_accel_set_enable_error:
-+	return err;
-+}
-+
-+static int st_accel_buffer_postenable(struct iio_dev *indio_dev)
-+{
-+	int err;
-+	struct st_sensor_data *adata = iio_priv(indio_dev);
-+
-+	adata->buffer_data = kmalloc(indio_dev->scan_bytes, GFP_KERNEL);
-+	if (adata->buffer_data == NULL) {
-+		err = -ENOMEM;
-+		goto allocate_memory_error;
-+	}
-+
-+	err = st_sensors_set_axis_enable(indio_dev,
-+					(u8)indio_dev->active_scan_mask[0]);
-+	if (err < 0)
-+		goto st_accel_buffer_postenable_error;
-+
-+	err = iio_triggered_buffer_postenable(indio_dev);
-+	if (err < 0)
-+		goto st_accel_buffer_postenable_error;
-+
-+	return err;
-+
-+st_accel_buffer_postenable_error:
-+	kfree(adata->buffer_data);
-+allocate_memory_error:
-+	return err;
-+}
-+
-+static int st_accel_buffer_predisable(struct iio_dev *indio_dev)
-+{
-+	int err;
-+	struct st_sensor_data *adata = iio_priv(indio_dev);
-+
-+	err = iio_triggered_buffer_predisable(indio_dev);
-+	if (err < 0)
-+		goto st_accel_buffer_predisable_error;
-+
-+	err = st_sensors_set_axis_enable(indio_dev, ST_SENSORS_ENABLE_ALL_AXIS);
-+	if (err < 0)
-+		goto st_accel_buffer_predisable_error;
-+
-+	err = st_sensors_set_enable(indio_dev, false);
-+
-+st_accel_buffer_predisable_error:
-+	kfree(adata->buffer_data);
-+	return err;
-+}
-+
-+static const struct iio_buffer_setup_ops st_accel_buffer_setup_ops = {
-+	.preenable = &st_accel_buffer_preenable,
-+	.postenable = &st_accel_buffer_postenable,
-+	.predisable = &st_accel_buffer_predisable,
-+};
-+
-+int st_accel_allocate_ring(struct iio_dev *indio_dev)
-+{
-+	return iio_triggered_buffer_setup(indio_dev, &iio_pollfunc_store_time,
-+		&st_sensors_trigger_handler, &st_accel_buffer_setup_ops);
-+}
-+
-+void st_accel_deallocate_ring(struct iio_dev *indio_dev)
-+{
-+	iio_triggered_buffer_cleanup(indio_dev);
-+}
-+
-+MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
-+MODULE_DESCRIPTION("STMicroelectronics accelerometers buffer");
-+MODULE_LICENSE("GPL v2");
-diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
-new file mode 100644
-index 0000000..a235de2
---- /dev/null
-+++ b/drivers/iio/accel/st_accel_core.c
-@@ -0,0 +1,495 @@
-+/*
-+ * STMicroelectronics accelerometers driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/slab.h>
-+#include <linux/errno.h>
-+#include <linux/types.h>
-+#include <linux/mutex.h>
-+#include <linux/interrupt.h>
-+#include <linux/i2c.h>
-+#include <linux/gpio.h>
-+#include <linux/irq.h>
-+#include <linux/iio/iio.h>
-+#include <linux/iio/sysfs.h>
-+#include <linux/iio/trigger_consumer.h>
-+#include <linux/iio/buffer.h>
-+
-+#include <linux/iio/common/st_sensors.h>
-+#include "st_accel.h"
-+
-+/* DEFAULT VALUE FOR SENSORS */
-+#define ST_ACCEL_DEFAULT_OUT_X_L_ADDR		0x28
-+#define ST_ACCEL_DEFAULT_OUT_Y_L_ADDR		0x2a
-+#define ST_ACCEL_DEFAULT_OUT_Z_L_ADDR		0x2c
-+
-+/* FULLSCALE */
-+#define ST_ACCEL_FS_AVL_2G			2
-+#define ST_ACCEL_FS_AVL_4G			4
-+#define ST_ACCEL_FS_AVL_6G			6
-+#define ST_ACCEL_FS_AVL_8G			8
-+#define ST_ACCEL_FS_AVL_16G			16
-+
-+/* CUSTOM VALUES FOR SENSOR 1 */
-+#define ST_ACCEL_1_WAI_EXP			0x33
-+#define ST_ACCEL_1_ODR_ADDR			0x20
-+#define ST_ACCEL_1_ODR_MASK			0xf0
-+#define ST_ACCEL_1_ODR_AVL_1HZ_VAL		0x01
-+#define ST_ACCEL_1_ODR_AVL_10HZ_VAL		0x02
-+#define ST_ACCEL_1_ODR_AVL_25HZ_VAL		0x03
-+#define ST_ACCEL_1_ODR_AVL_50HZ_VAL		0x04
-+#define ST_ACCEL_1_ODR_AVL_100HZ_VAL		0x05
-+#define ST_ACCEL_1_ODR_AVL_200HZ_VAL		0x06
-+#define ST_ACCEL_1_ODR_AVL_400HZ_VAL		0x07
-+#define ST_ACCEL_1_ODR_AVL_1600HZ_VAL		0x08
-+#define ST_ACCEL_1_FS_ADDR			0x23
-+#define ST_ACCEL_1_FS_MASK			0x30
-+#define ST_ACCEL_1_FS_AVL_2_VAL			0x00
-+#define ST_ACCEL_1_FS_AVL_4_VAL			0x01
-+#define ST_ACCEL_1_FS_AVL_8_VAL			0x02
-+#define ST_ACCEL_1_FS_AVL_16_VAL		0x03
-+#define ST_ACCEL_1_FS_AVL_2_GAIN		IIO_G_TO_M_S_2(1000)
-+#define ST_ACCEL_1_FS_AVL_4_GAIN		IIO_G_TO_M_S_2(2000)
-+#define ST_ACCEL_1_FS_AVL_8_GAIN		IIO_G_TO_M_S_2(4000)
-+#define ST_ACCEL_1_FS_AVL_16_GAIN		IIO_G_TO_M_S_2(12000)
-+#define ST_ACCEL_1_BDU_ADDR			0x23
-+#define ST_ACCEL_1_BDU_MASK			0x80
-+#define ST_ACCEL_1_DRDY_IRQ_ADDR		0x22
-+#define ST_ACCEL_1_DRDY_IRQ_MASK		0x10
-+#define ST_ACCEL_1_MULTIREAD_BIT		true
-+
-+/* CUSTOM VALUES FOR SENSOR 2 */
-+#define ST_ACCEL_2_WAI_EXP			0x32
-+#define ST_ACCEL_2_ODR_ADDR			0x20
-+#define ST_ACCEL_2_ODR_MASK			0x18
-+#define ST_ACCEL_2_ODR_AVL_50HZ_VAL		0x00
-+#define ST_ACCEL_2_ODR_AVL_100HZ_VAL		0x01
-+#define ST_ACCEL_2_ODR_AVL_400HZ_VAL		0x02
-+#define ST_ACCEL_2_ODR_AVL_1000HZ_VAL		0x03
-+#define ST_ACCEL_2_PW_ADDR			0x20
-+#define ST_ACCEL_2_PW_MASK			0xe0
-+#define ST_ACCEL_2_FS_ADDR			0x23
-+#define ST_ACCEL_2_FS_MASK			0x30
-+#define ST_ACCEL_2_FS_AVL_2_VAL			0X00
-+#define ST_ACCEL_2_FS_AVL_4_VAL			0X01
-+#define ST_ACCEL_2_FS_AVL_8_VAL			0x03
-+#define ST_ACCEL_2_FS_AVL_2_GAIN		IIO_G_TO_M_S_2(1000)
-+#define ST_ACCEL_2_FS_AVL_4_GAIN		IIO_G_TO_M_S_2(2000)
-+#define ST_ACCEL_2_FS_AVL_8_GAIN		IIO_G_TO_M_S_2(3900)
-+#define ST_ACCEL_2_BDU_ADDR			0x23
-+#define ST_ACCEL_2_BDU_MASK			0x80
-+#define ST_ACCEL_2_DRDY_IRQ_ADDR		0x22
-+#define ST_ACCEL_2_DRDY_IRQ_MASK		0x02
-+#define ST_ACCEL_2_MULTIREAD_BIT		true
-+
-+/* CUSTOM VALUES FOR SENSOR 3 */
-+#define ST_ACCEL_3_WAI_EXP			0x40
-+#define ST_ACCEL_3_ODR_ADDR			0x20
-+#define ST_ACCEL_3_ODR_MASK			0xf0
-+#define ST_ACCEL_3_ODR_AVL_3HZ_VAL		0x01
-+#define ST_ACCEL_3_ODR_AVL_6HZ_VAL		0x02
-+#define ST_ACCEL_3_ODR_AVL_12HZ_VAL		0x03
-+#define ST_ACCEL_3_ODR_AVL_25HZ_VAL		0x04
-+#define ST_ACCEL_3_ODR_AVL_50HZ_VAL		0x05
-+#define ST_ACCEL_3_ODR_AVL_100HZ_VAL		0x06
-+#define ST_ACCEL_3_ODR_AVL_200HZ_VAL		0x07
-+#define ST_ACCEL_3_ODR_AVL_400HZ_VAL		0x08
-+#define ST_ACCEL_3_ODR_AVL_800HZ_VAL		0x09
-+#define ST_ACCEL_3_ODR_AVL_1600HZ_VAL		0x0a
-+#define ST_ACCEL_3_FS_ADDR			0x24
-+#define ST_ACCEL_3_FS_MASK			0x38
-+#define ST_ACCEL_3_FS_AVL_2_VAL			0X00
-+#define ST_ACCEL_3_FS_AVL_4_VAL			0X01
-+#define ST_ACCEL_3_FS_AVL_6_VAL			0x02
-+#define ST_ACCEL_3_FS_AVL_8_VAL			0x03
-+#define ST_ACCEL_3_FS_AVL_16_VAL		0x04
-+#define ST_ACCEL_3_FS_AVL_2_GAIN		IIO_G_TO_M_S_2(61)
-+#define ST_ACCEL_3_FS_AVL_4_GAIN		IIO_G_TO_M_S_2(122)
-+#define ST_ACCEL_3_FS_AVL_6_GAIN		IIO_G_TO_M_S_2(183)
-+#define ST_ACCEL_3_FS_AVL_8_GAIN		IIO_G_TO_M_S_2(244)
-+#define ST_ACCEL_3_FS_AVL_16_GAIN		IIO_G_TO_M_S_2(732)
-+#define ST_ACCEL_3_BDU_ADDR			0x20
-+#define ST_ACCEL_3_BDU_MASK			0x08
-+#define ST_ACCEL_3_DRDY_IRQ_ADDR		0x23
-+#define ST_ACCEL_3_DRDY_IRQ_MASK		0x80
-+#define ST_ACCEL_3_IG1_EN_ADDR			0x23
-+#define ST_ACCEL_3_IG1_EN_MASK			0x08
-+#define ST_ACCEL_3_MULTIREAD_BIT		false
-+
-+static const struct iio_chan_spec st_accel_12bit_channels[] = {
-+	ST_SENSORS_LSM_CHANNELS(IIO_ACCEL, ST_SENSORS_SCAN_X, IIO_MOD_X, IIO_LE,
-+		ST_SENSORS_DEFAULT_12_REALBITS, ST_ACCEL_DEFAULT_OUT_X_L_ADDR),
-+	ST_SENSORS_LSM_CHANNELS(IIO_ACCEL, ST_SENSORS_SCAN_Y, IIO_MOD_Y, IIO_LE,
-+		ST_SENSORS_DEFAULT_12_REALBITS, ST_ACCEL_DEFAULT_OUT_Y_L_ADDR),
-+	ST_SENSORS_LSM_CHANNELS(IIO_ACCEL, ST_SENSORS_SCAN_Z, IIO_MOD_Z, IIO_LE,
-+		ST_SENSORS_DEFAULT_12_REALBITS, ST_ACCEL_DEFAULT_OUT_Z_L_ADDR),
-+	IIO_CHAN_SOFT_TIMESTAMP(3)
-+};
-+
-+static const struct iio_chan_spec st_accel_16bit_channels[] = {
-+	ST_SENSORS_LSM_CHANNELS(IIO_ACCEL, ST_SENSORS_SCAN_X, IIO_MOD_X, IIO_LE,
-+		ST_SENSORS_DEFAULT_16_REALBITS, ST_ACCEL_DEFAULT_OUT_X_L_ADDR),
-+	ST_SENSORS_LSM_CHANNELS(IIO_ACCEL, ST_SENSORS_SCAN_Y, IIO_MOD_Y, IIO_LE,
-+		ST_SENSORS_DEFAULT_16_REALBITS, ST_ACCEL_DEFAULT_OUT_Y_L_ADDR),
-+	ST_SENSORS_LSM_CHANNELS(IIO_ACCEL, ST_SENSORS_SCAN_Z, IIO_MOD_Z, IIO_LE,
-+		ST_SENSORS_DEFAULT_16_REALBITS, ST_ACCEL_DEFAULT_OUT_Z_L_ADDR),
-+	IIO_CHAN_SOFT_TIMESTAMP(3)
-+};
-+
-+static const struct st_sensors st_accel_sensors[] = {
-+	{
-+		.wai = ST_ACCEL_1_WAI_EXP,
-+		.sensors_supported = {
-+			[0] = LIS3DH_ACCEL_DEV_NAME,
-+			[1] = LSM303DLHC_ACCEL_DEV_NAME,
-+			[2] = LSM330D_ACCEL_DEV_NAME,
-+			[3] = LSM330DL_ACCEL_DEV_NAME,
-+			[4] = LSM330DLC_ACCEL_DEV_NAME,
-+		},
-+		.ch = (struct iio_chan_spec *)st_accel_12bit_channels,
-+		.odr = {
-+			.addr = ST_ACCEL_1_ODR_ADDR,
-+			.mask = ST_ACCEL_1_ODR_MASK,
-+			.odr_avl = {
-+				{ 1, ST_ACCEL_1_ODR_AVL_1HZ_VAL, },
-+				{ 10, ST_ACCEL_1_ODR_AVL_10HZ_VAL, },
-+				{ 25, ST_ACCEL_1_ODR_AVL_25HZ_VAL, },
-+				{ 50, ST_ACCEL_1_ODR_AVL_50HZ_VAL, },
-+				{ 100, ST_ACCEL_1_ODR_AVL_100HZ_VAL, },
-+				{ 200, ST_ACCEL_1_ODR_AVL_200HZ_VAL, },
-+				{ 400, ST_ACCEL_1_ODR_AVL_400HZ_VAL, },
-+				{ 1600, ST_ACCEL_1_ODR_AVL_1600HZ_VAL, },
-+			},
-+		},
-+		.pw = {
-+			.addr = ST_ACCEL_1_ODR_ADDR,
-+			.mask = ST_ACCEL_1_ODR_MASK,
-+			.value_off = ST_SENSORS_DEFAULT_POWER_OFF_VALUE,
-+		},
-+		.enable_axis = {
-+			.addr = ST_SENSORS_DEFAULT_AXIS_ADDR,
-+			.mask = ST_SENSORS_DEFAULT_AXIS_MASK,
-+		},
-+		.fs = {
-+			.addr = ST_ACCEL_1_FS_ADDR,
-+			.mask = ST_ACCEL_1_FS_MASK,
-+			.fs_avl = {
-+				[0] = {
-+					.num = ST_ACCEL_FS_AVL_2G,
-+					.value = ST_ACCEL_1_FS_AVL_2_VAL,
-+					.gain = ST_ACCEL_1_FS_AVL_2_GAIN,
-+				},
-+				[1] = {
-+					.num = ST_ACCEL_FS_AVL_4G,
-+					.value = ST_ACCEL_1_FS_AVL_4_VAL,
-+					.gain = ST_ACCEL_1_FS_AVL_4_GAIN,
-+				},
-+				[2] = {
-+					.num = ST_ACCEL_FS_AVL_8G,
-+					.value = ST_ACCEL_1_FS_AVL_8_VAL,
-+					.gain = ST_ACCEL_1_FS_AVL_8_GAIN,
-+				},
-+				[3] = {
-+					.num = ST_ACCEL_FS_AVL_16G,
-+					.value = ST_ACCEL_1_FS_AVL_16_VAL,
-+					.gain = ST_ACCEL_1_FS_AVL_16_GAIN,
-+				},
-+			},
-+		},
-+		.bdu = {
-+			.addr = ST_ACCEL_1_BDU_ADDR,
-+			.mask = ST_ACCEL_1_BDU_MASK,
-+		},
-+		.drdy_irq = {
-+			.addr = ST_ACCEL_1_DRDY_IRQ_ADDR,
-+			.mask = ST_ACCEL_1_DRDY_IRQ_MASK,
-+		},
-+		.multi_read_bit = ST_ACCEL_1_MULTIREAD_BIT,
-+		.bootime = 2,
-+	},
-+	{
-+		.wai = ST_ACCEL_2_WAI_EXP,
-+		.sensors_supported = {
-+			[0] = LIS331DLH_ACCEL_DEV_NAME,
-+			[1] = LSM303DL_ACCEL_DEV_NAME,
-+			[2] = LSM303DLH_ACCEL_DEV_NAME,
-+			[3] = LSM303DLM_ACCEL_DEV_NAME,
-+		},
-+		.ch = (struct iio_chan_spec *)st_accel_12bit_channels,
-+		.odr = {
-+			.addr = ST_ACCEL_2_ODR_ADDR,
-+			.mask = ST_ACCEL_2_ODR_MASK,
-+			.odr_avl = {
-+				{ 50, ST_ACCEL_2_ODR_AVL_50HZ_VAL, },
-+				{ 100, ST_ACCEL_2_ODR_AVL_100HZ_VAL, },
-+				{ 400, ST_ACCEL_2_ODR_AVL_400HZ_VAL, },
-+				{ 1000, ST_ACCEL_2_ODR_AVL_1000HZ_VAL, },
-+			},
-+		},
-+		.pw = {
-+			.addr = ST_ACCEL_2_PW_ADDR,
-+			.mask = ST_ACCEL_2_PW_MASK,
-+			.value_on = ST_SENSORS_DEFAULT_POWER_ON_VALUE,
-+			.value_off = ST_SENSORS_DEFAULT_POWER_OFF_VALUE,
-+		},
-+		.enable_axis = {
-+			.addr = ST_SENSORS_DEFAULT_AXIS_ADDR,
-+			.mask = ST_SENSORS_DEFAULT_AXIS_MASK,
-+		},
-+		.fs = {
-+			.addr = ST_ACCEL_2_FS_ADDR,
-+			.mask = ST_ACCEL_2_FS_MASK,
-+			.fs_avl = {
-+				[0] = {
-+					.num = ST_ACCEL_FS_AVL_2G,
-+					.value = ST_ACCEL_2_FS_AVL_2_VAL,
-+					.gain = ST_ACCEL_2_FS_AVL_2_GAIN,
-+				},
-+				[1] = {
-+					.num = ST_ACCEL_FS_AVL_4G,
-+					.value = ST_ACCEL_2_FS_AVL_4_VAL,
-+					.gain = ST_ACCEL_2_FS_AVL_4_GAIN,
-+				},
-+				[2] = {
-+					.num = ST_ACCEL_FS_AVL_8G,
-+					.value = ST_ACCEL_2_FS_AVL_8_VAL,
-+					.gain = ST_ACCEL_2_FS_AVL_8_GAIN,
-+				},
-+			},
-+		},
-+		.bdu = {
-+			.addr = ST_ACCEL_2_BDU_ADDR,
-+			.mask = ST_ACCEL_2_BDU_MASK,
-+		},
-+		.drdy_irq = {
-+			.addr = ST_ACCEL_2_DRDY_IRQ_ADDR,
-+			.mask = ST_ACCEL_2_DRDY_IRQ_MASK,
-+		},
-+		.multi_read_bit = ST_ACCEL_2_MULTIREAD_BIT,
-+		.bootime = 2,
-+	},
-+	{
-+		.wai = ST_ACCEL_3_WAI_EXP,
-+		.sensors_supported = {
-+			[0] = LSM330_ACCEL_DEV_NAME,
-+		},
-+		.ch = (struct iio_chan_spec *)st_accel_16bit_channels,
-+		.odr = {
-+			.addr = ST_ACCEL_3_ODR_ADDR,
-+			.mask = ST_ACCEL_3_ODR_MASK,
-+			.odr_avl = {
-+				{ 3, ST_ACCEL_3_ODR_AVL_3HZ_VAL },
-+				{ 6, ST_ACCEL_3_ODR_AVL_6HZ_VAL, },
-+				{ 12, ST_ACCEL_3_ODR_AVL_12HZ_VAL, },
-+				{ 25, ST_ACCEL_3_ODR_AVL_25HZ_VAL, },
-+				{ 50, ST_ACCEL_3_ODR_AVL_50HZ_VAL, },
-+				{ 100, ST_ACCEL_3_ODR_AVL_100HZ_VAL, },
-+				{ 200, ST_ACCEL_3_ODR_AVL_200HZ_VAL, },
-+				{ 400, ST_ACCEL_3_ODR_AVL_400HZ_VAL, },
-+				{ 800, ST_ACCEL_3_ODR_AVL_800HZ_VAL, },
-+				{ 1600, ST_ACCEL_3_ODR_AVL_1600HZ_VAL, },
-+			},
-+		},
-+		.pw = {
-+			.addr = ST_ACCEL_3_ODR_ADDR,
-+			.mask = ST_ACCEL_3_ODR_MASK,
-+			.value_off = ST_SENSORS_DEFAULT_POWER_OFF_VALUE,
-+		},
-+		.enable_axis = {
-+			.addr = ST_SENSORS_DEFAULT_AXIS_ADDR,
-+			.mask = ST_SENSORS_DEFAULT_AXIS_MASK,
-+		},
-+		.fs = {
-+			.addr = ST_ACCEL_3_FS_ADDR,
-+			.mask = ST_ACCEL_3_FS_MASK,
-+			.fs_avl = {
-+				[0] = {
-+					.num = ST_ACCEL_FS_AVL_2G,
-+					.value = ST_ACCEL_3_FS_AVL_2_VAL,
-+					.gain = ST_ACCEL_3_FS_AVL_2_GAIN,
-+				},
-+				[1] = {
-+					.num = ST_ACCEL_FS_AVL_4G,
-+					.value = ST_ACCEL_3_FS_AVL_4_VAL,
-+					.gain = ST_ACCEL_3_FS_AVL_4_GAIN,
-+				},
-+				[2] = {
-+					.num = ST_ACCEL_FS_AVL_6G,
-+					.value = ST_ACCEL_3_FS_AVL_6_VAL,
-+					.gain = ST_ACCEL_3_FS_AVL_6_GAIN,
-+				},
-+				[3] = {
-+					.num = ST_ACCEL_FS_AVL_8G,
-+					.value = ST_ACCEL_3_FS_AVL_8_VAL,
-+					.gain = ST_ACCEL_3_FS_AVL_8_GAIN,
-+				},
-+				[4] = {
-+					.num = ST_ACCEL_FS_AVL_16G,
-+					.value = ST_ACCEL_3_FS_AVL_16_VAL,
-+					.gain = ST_ACCEL_3_FS_AVL_16_GAIN,
-+				},
-+			},
-+		},
-+		.bdu = {
-+			.addr = ST_ACCEL_3_BDU_ADDR,
-+			.mask = ST_ACCEL_3_BDU_MASK,
-+		},
-+		.drdy_irq = {
-+			.addr = ST_ACCEL_3_DRDY_IRQ_ADDR,
-+			.mask = ST_ACCEL_3_DRDY_IRQ_MASK,
-+			.ig1 = {
-+				.en_addr = ST_ACCEL_3_IG1_EN_ADDR,
-+				.en_mask = ST_ACCEL_3_IG1_EN_MASK,
-+			},
-+		},
-+		.multi_read_bit = ST_ACCEL_3_MULTIREAD_BIT,
-+		.bootime = 2,
-+	},
-+};
-+
-+static int st_accel_read_raw(struct iio_dev *indio_dev,
-+			struct iio_chan_spec const *ch, int *val,
-+							int *val2, long mask)
-+{
-+	int err;
-+	struct st_sensor_data *adata = iio_priv(indio_dev);
-+
-+	switch (mask) {
-+	case IIO_CHAN_INFO_RAW:
-+		err = st_sensors_read_info_raw(indio_dev, ch, val);
-+		if (err < 0)
-+			goto read_error;
-+
-+		return IIO_VAL_INT;
-+	case IIO_CHAN_INFO_SCALE:
-+		*val = 0;
-+		*val2 = adata->current_fullscale->gain;
-+		return IIO_VAL_INT_PLUS_MICRO;
-+	default:
-+		return -EINVAL;
-+	}
-+
-+read_error:
-+	return err;
-+}
-+
-+static int st_accel_write_raw(struct iio_dev *indio_dev,
-+		struct iio_chan_spec const *chan, int val, int val2, long mask)
-+{
-+	int err;
-+
-+	switch (mask) {
-+	case IIO_CHAN_INFO_SCALE:
-+		err = st_sensors_set_fullscale_by_gain(indio_dev, val2);
-+		break;
-+	default:
-+		return -EINVAL;
-+	}
-+
-+	return err;
-+}
-+
-+static ST_SENSOR_DEV_ATTR_SAMP_FREQ();
-+static ST_SENSORS_DEV_ATTR_SAMP_FREQ_AVAIL();
-+static ST_SENSORS_DEV_ATTR_SCALE_AVAIL(in_accel_scale_available);
-+
-+static struct attribute *st_accel_attributes[] = {
-+	&iio_dev_attr_sampling_frequency_available.dev_attr.attr,
-+	&iio_dev_attr_in_accel_scale_available.dev_attr.attr,
-+	&iio_dev_attr_sampling_frequency.dev_attr.attr,
-+	NULL,
-+};
-+
-+static const struct attribute_group st_accel_attribute_group = {
-+	.attrs = st_accel_attributes,
-+};
-+
-+static const struct iio_info accel_info = {
-+	.driver_module = THIS_MODULE,
-+	.attrs = &st_accel_attribute_group,
-+	.read_raw = &st_accel_read_raw,
-+	.write_raw = &st_accel_write_raw,
-+};
-+
-+static const struct iio_trigger_ops st_accel_trigger_ops = {
-+	.owner = THIS_MODULE,
-+	.set_trigger_state = ST_ACCEL_TRIGGER_SET_STATE,
-+};
-+
-+int st_accel_common_probe(struct iio_dev *indio_dev)
-+{
-+	int err;
-+	struct st_sensor_data *adata = iio_priv(indio_dev);
-+
-+	indio_dev->modes = INDIO_DIRECT_MODE;
-+	indio_dev->info = &accel_info;
-+
-+	err = st_sensors_check_device_support(indio_dev,
-+				ARRAY_SIZE(st_accel_sensors), st_accel_sensors);
-+	if (err < 0)
-+		goto st_accel_common_probe_error;
-+
-+	adata->multiread_bit = adata->sensor->multi_read_bit;
-+	indio_dev->channels = adata->sensor->ch;
-+	indio_dev->num_channels = ST_SENSORS_NUMBER_ALL_CHANNELS;
-+
-+	adata->current_fullscale = (struct st_sensor_fullscale_avl *)
-+						&adata->sensor->fs.fs_avl[0];
-+	adata->odr = adata->sensor->odr.odr_avl[0].hz;
-+
-+	err = st_sensors_init_sensor(indio_dev);
-+	if (err < 0)
-+		goto st_accel_common_probe_error;
-+
-+	if (adata->get_irq_data_ready(indio_dev) > 0) {
-+		err = st_accel_allocate_ring(indio_dev);
-+		if (err < 0)
-+			goto st_accel_common_probe_error;
-+
-+		err = st_sensors_allocate_trigger(indio_dev,
-+							&st_accel_trigger_ops);
-+		if (err < 0)
-+			goto st_accel_probe_trigger_error;
-+	}
-+
-+	err = iio_device_register(indio_dev);
-+	if (err)
-+		goto st_accel_device_register_error;
-+
-+	return err;
-+
-+st_accel_device_register_error:
-+	if (adata->get_irq_data_ready(indio_dev) > 0)
-+		st_sensors_deallocate_trigger(indio_dev);
-+st_accel_probe_trigger_error:
-+	if (adata->get_irq_data_ready(indio_dev) > 0)
-+		st_accel_deallocate_ring(indio_dev);
-+st_accel_common_probe_error:
-+	return err;
-+}
-+EXPORT_SYMBOL(st_accel_common_probe);
-+
-+void st_accel_common_remove(struct iio_dev *indio_dev)
-+{
-+	struct st_sensor_data *adata = iio_priv(indio_dev);
-+
-+	iio_device_unregister(indio_dev);
-+	if (adata->get_irq_data_ready(indio_dev) > 0) {
-+		st_sensors_deallocate_trigger(indio_dev);
-+		st_accel_deallocate_ring(indio_dev);
-+	}
-+	iio_device_free(indio_dev);
-+}
-+EXPORT_SYMBOL(st_accel_common_remove);
-+
-+MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
-+MODULE_DESCRIPTION("STMicroelectronics accelerometers driver");
-+MODULE_LICENSE("GPL v2");
-diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c
-new file mode 100644
-index 0000000..90b8ddf
---- /dev/null
-+++ b/drivers/iio/accel/st_accel_i2c.c
-@@ -0,0 +1,87 @@
-+/*
-+ * STMicroelectronics accelerometers driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/slab.h>
-+#include <linux/i2c.h>
-+#include <linux/iio/iio.h>
-+#include <linux/iio/trigger.h>
-+
-+#include <linux/iio/common/st_sensors.h>
-+#include <linux/iio/common/st_sensors_i2c.h>
-+#include "st_accel.h"
-+
-+static int st_accel_i2c_probe(struct i2c_client *client,
-+						const struct i2c_device_id *id)
-+{
-+	struct iio_dev *indio_dev;
-+	struct st_sensor_data *adata;
-+	int err;
-+
-+	indio_dev = iio_device_alloc(sizeof(*adata));
-+	if (indio_dev == NULL) {
-+		err = -ENOMEM;
-+		goto iio_device_alloc_error;
-+	}
-+
-+	adata = iio_priv(indio_dev);
-+	adata->dev = &client->dev;
-+
-+	st_sensors_i2c_configure(indio_dev, client, adata);
-+
-+	err = st_accel_common_probe(indio_dev);
-+	if (err < 0)
-+		goto st_accel_common_probe_error;
-+
-+	return 0;
-+
-+st_accel_common_probe_error:
-+	iio_device_free(indio_dev);
-+iio_device_alloc_error:
-+	return err;
-+}
-+
-+static int st_accel_i2c_remove(struct i2c_client *client)
-+{
-+	st_accel_common_remove(i2c_get_clientdata(client));
-+
-+	return 0;
-+}
-+
-+static const struct i2c_device_id st_accel_id_table[] = {
-+	{ LSM303DLH_ACCEL_DEV_NAME },
-+	{ LSM303DLHC_ACCEL_DEV_NAME },
-+	{ LIS3DH_ACCEL_DEV_NAME },
-+	{ LSM330D_ACCEL_DEV_NAME },
-+	{ LSM330DL_ACCEL_DEV_NAME },
-+	{ LSM330DLC_ACCEL_DEV_NAME },
-+	{ LIS331DLH_ACCEL_DEV_NAME },
-+	{ LSM303DL_ACCEL_DEV_NAME },
-+	{ LSM303DLM_ACCEL_DEV_NAME },
-+	{ LSM330_ACCEL_DEV_NAME },
-+	{},
-+};
-+MODULE_DEVICE_TABLE(i2c, st_accel_id_table);
-+
-+static struct i2c_driver st_accel_driver = {
-+	.driver = {
-+		.owner = THIS_MODULE,
-+		.name = "st-accel-i2c",
-+	},
-+	.probe = st_accel_i2c_probe,
-+	.remove = st_accel_i2c_remove,
-+	.id_table = st_accel_id_table,
-+};
-+module_i2c_driver(st_accel_driver);
-+
-+MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
-+MODULE_DESCRIPTION("STMicroelectronics accelerometers i2c driver");
-+MODULE_LICENSE("GPL v2");
-diff --git a/drivers/iio/accel/st_accel_spi.c b/drivers/iio/accel/st_accel_spi.c
-new file mode 100644
-index 0000000..dbd45c0
---- /dev/null
-+++ b/drivers/iio/accel/st_accel_spi.c
-@@ -0,0 +1,86 @@
-+/*
-+ * STMicroelectronics accelerometers driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/slab.h>
-+#include <linux/spi/spi.h>
-+#include <linux/iio/iio.h>
-+#include <linux/iio/trigger.h>
-+
-+#include <linux/iio/common/st_sensors.h>
-+#include <linux/iio/common/st_sensors_spi.h>
-+#include "st_accel.h"
-+
-+static int st_accel_spi_probe(struct spi_device *spi)
-+{
-+	struct iio_dev *indio_dev;
-+	struct st_sensor_data *adata;
-+	int err;
-+
-+	indio_dev = iio_device_alloc(sizeof(*adata));
-+	if (indio_dev == NULL) {
-+		err = -ENOMEM;
-+		goto iio_device_alloc_error;
-+	}
-+
-+	adata = iio_priv(indio_dev);
-+	adata->dev = &spi->dev;
-+
-+	st_sensors_spi_configure(indio_dev, spi, adata);
-+
-+	err = st_accel_common_probe(indio_dev);
-+	if (err < 0)
-+		goto st_accel_common_probe_error;
-+
-+	return 0;
-+
-+st_accel_common_probe_error:
-+	iio_device_free(indio_dev);
-+iio_device_alloc_error:
-+	return err;
-+}
-+
-+static int st_accel_spi_remove(struct spi_device *spi)
-+{
-+	st_accel_common_remove(spi_get_drvdata(spi));
-+
-+	return 0;
-+}
-+
-+static const struct spi_device_id st_accel_id_table[] = {
-+	{ LSM303DLH_ACCEL_DEV_NAME },
-+	{ LSM303DLHC_ACCEL_DEV_NAME },
-+	{ LIS3DH_ACCEL_DEV_NAME },
-+	{ LSM330D_ACCEL_DEV_NAME },
-+	{ LSM330DL_ACCEL_DEV_NAME },
-+	{ LSM330DLC_ACCEL_DEV_NAME },
-+	{ LIS331DLH_ACCEL_DEV_NAME },
-+	{ LSM303DL_ACCEL_DEV_NAME },
-+	{ LSM303DLM_ACCEL_DEV_NAME },
-+	{ LSM330_ACCEL_DEV_NAME },
-+	{},
-+};
-+MODULE_DEVICE_TABLE(spi, st_accel_id_table);
-+
-+static struct spi_driver st_accel_driver = {
-+	.driver = {
-+		.owner = THIS_MODULE,
-+		.name = "st-accel-spi",
-+	},
-+	.probe = st_accel_spi_probe,
-+	.remove = st_accel_spi_remove,
-+	.id_table = st_accel_id_table,
-+};
-+module_spi_driver(st_accel_driver);
-+
-+MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
-+MODULE_DESCRIPTION("STMicroelectronics accelerometers spi driver");
-+MODULE_LICENSE("GPL v2");
--- 
-1.8.1
-
diff --git a/patches/iio/0003-iio-gyro-Add-STMicroelectronics-gyroscopes-driver.patch b/patches/iio/0003-iio-gyro-Add-STMicroelectronics-gyroscopes-driver.patch
deleted file mode 100644
index f54aacd7ee9b5e8603a99678ab6a4b82e2a3537a..0000000000000000000000000000000000000000
--- a/patches/iio/0003-iio-gyro-Add-STMicroelectronics-gyroscopes-driver.patch
+++ /dev/null
@@ -1,805 +0,0 @@
-From 4e99f1a8683406aaf01ea2e4a3b2e3cad4d4728a Mon Sep 17 00:00:00 2001
-From: Denis Ciocca <denis.ciocca@gmail.com>
-Date: Fri, 25 Jan 2013 23:44:00 +0000
-Subject: [PATCH 3/6] iio:gyro: Add STMicroelectronics gyroscopes driver
-
-This patch adds a generic gyroscope driver for STMicroelectronics
-gyroscopes, currently it supports:
-L3G4200D, LSM330DL, L3GD20, L3GD20H, LSM330DLC, L3G4IS, LSM330.
-
-Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
-Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
-Signed-off-by: Jonathan Cameron <jic23@kernel.org>
----
- drivers/iio/gyro/Kconfig          |  30 ++++
- drivers/iio/gyro/Makefile         |   7 +
- drivers/iio/gyro/st_gyro.h        |  45 +++++
- drivers/iio/gyro/st_gyro_buffer.c | 114 ++++++++++++
- drivers/iio/gyro/st_gyro_core.c   | 363 ++++++++++++++++++++++++++++++++++++++
- drivers/iio/gyro/st_gyro_i2c.c    |  85 +++++++++
- drivers/iio/gyro/st_gyro_spi.c    |  84 +++++++++
- 7 files changed, 728 insertions(+)
- create mode 100644 drivers/iio/gyro/st_gyro.h
- create mode 100644 drivers/iio/gyro/st_gyro_buffer.c
- create mode 100644 drivers/iio/gyro/st_gyro_core.c
- create mode 100644 drivers/iio/gyro/st_gyro_i2c.c
- create mode 100644 drivers/iio/gyro/st_gyro_spi.c
-
-diff --git a/drivers/iio/gyro/Kconfig b/drivers/iio/gyro/Kconfig
-index 96b68f6..e852a202 100644
---- a/drivers/iio/gyro/Kconfig
-+++ b/drivers/iio/gyro/Kconfig
-@@ -23,4 +23,34 @@ config HID_SENSOR_GYRO_3D
- 	  Say yes here to build support for the HID SENSOR
- 	  Gyroscope 3D.
- 
-+config IIO_ST_GYRO_3AXIS
-+	tristate "STMicroelectronics gyroscopes 3-Axis Driver"
-+	depends on (I2C || SPI_MASTER) && SYSFS
-+	select IIO_ST_SENSORS_CORE
-+	select IIO_ST_GYRO_I2C_3AXIS if (I2C)
-+	select IIO_ST_GYRO_SPI_3AXIS if (SPI_MASTER)
-+	select IIO_TRIGGERED_BUFFER if (IIO_BUFFER)
-+	select IIO_ST_GYRO_BUFFER if (IIO_TRIGGERED_BUFFER)
-+	help
-+	  Say yes here to build support for STMicroelectronics gyroscopes:
-+	  L3G4200D, LSM330DL, L3GD20, L3GD20H, LSM330DLC, L3G4IS, LSM330.
-+
-+	  This driver can also be built as a module. If so, will be created
-+	  these modules:
-+	  - st_gyro (core functions for the driver [it is mandatory]);
-+	  - st_gyro_i2c (necessary for the I2C devices [optional*]);
-+	  - st_gyro_spi (necessary for the SPI devices [optional*]);
-+
-+	  (*) one of these is necessary to do something.
-+
-+config IIO_ST_GYRO_I2C_3AXIS
-+	tristate
-+	depends on IIO_ST_GYRO_3AXIS
-+	depends on IIO_ST_SENSORS_I2C
-+
-+config IIO_ST_GYRO_SPI_3AXIS
-+	tristate
-+	depends on IIO_ST_GYRO_3AXIS
-+	depends on IIO_ST_SENSORS_SPI
-+
- endmenu
-diff --git a/drivers/iio/gyro/Makefile b/drivers/iio/gyro/Makefile
-index 702a058..b932f17 100644
---- a/drivers/iio/gyro/Makefile
-+++ b/drivers/iio/gyro/Makefile
-@@ -4,3 +4,10 @@
- 
- obj-$(CONFIG_ADIS16136) += adis16136.o
- obj-$(CONFIG_HID_SENSOR_GYRO_3D) += hid-sensor-gyro-3d.o
-+
-+obj-$(CONFIG_IIO_ST_GYRO_3AXIS) += st_gyro.o
-+st_gyro-y := st_gyro_core.o
-+st_gyro-$(CONFIG_IIO_BUFFER) += st_gyro_buffer.o
-+
-+obj-$(CONFIG_IIO_ST_GYRO_I2C_3AXIS) += st_gyro_i2c.o
-+obj-$(CONFIG_IIO_ST_GYRO_SPI_3AXIS) += st_gyro_spi.o
-diff --git a/drivers/iio/gyro/st_gyro.h b/drivers/iio/gyro/st_gyro.h
-new file mode 100644
-index 0000000..3ad9907
---- /dev/null
-+++ b/drivers/iio/gyro/st_gyro.h
-@@ -0,0 +1,45 @@
-+/*
-+ * STMicroelectronics gyroscopes driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ * v. 1.0.0
-+ * Licensed under the GPL-2.
-+ */
-+
-+#ifndef ST_GYRO_H
-+#define ST_GYRO_H
-+
-+#include <linux/types.h>
-+#include <linux/iio/common/st_sensors.h>
-+
-+#define L3G4200D_GYRO_DEV_NAME		"l3g4200d"
-+#define LSM330D_GYRO_DEV_NAME		"lsm330d_gyro"
-+#define LSM330DL_GYRO_DEV_NAME		"lsm330dl_gyro"
-+#define LSM330DLC_GYRO_DEV_NAME		"lsm330dlc_gyro"
-+#define L3GD20_GYRO_DEV_NAME		"l3gd20"
-+#define L3GD20H_GYRO_DEV_NAME		"l3gd20h"
-+#define L3G4IS_GYRO_DEV_NAME		"l3g4is_ui"
-+#define LSM330_GYRO_DEV_NAME		"lsm330_gyro"
-+
-+int st_gyro_common_probe(struct iio_dev *indio_dev);
-+void st_gyro_common_remove(struct iio_dev *indio_dev);
-+
-+#ifdef CONFIG_IIO_BUFFER
-+int st_gyro_allocate_ring(struct iio_dev *indio_dev);
-+void st_gyro_deallocate_ring(struct iio_dev *indio_dev);
-+int st_gyro_trig_set_state(struct iio_trigger *trig, bool state);
-+#define ST_GYRO_TRIGGER_SET_STATE (&st_gyro_trig_set_state)
-+#else /* CONFIG_IIO_BUFFER */
-+static inline int st_gyro_allocate_ring(struct iio_dev *indio_dev)
-+{
-+	return 0;
-+}
-+static inline void st_gyro_deallocate_ring(struct iio_dev *indio_dev)
-+{
-+}
-+#define ST_GYRO_TRIGGER_SET_STATE NULL
-+#endif /* CONFIG_IIO_BUFFER */
-+
-+#endif /* ST_GYRO_H */
-diff --git a/drivers/iio/gyro/st_gyro_buffer.c b/drivers/iio/gyro/st_gyro_buffer.c
-new file mode 100644
-index 0000000..da4d122
---- /dev/null
-+++ b/drivers/iio/gyro/st_gyro_buffer.c
-@@ -0,0 +1,114 @@
-+/*
-+ * STMicroelectronics gyroscopes driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/kernel.h>
-+#include <linux/slab.h>
-+#include <linux/stat.h>
-+#include <linux/interrupt.h>
-+#include <linux/i2c.h>
-+#include <linux/delay.h>
-+#include <linux/iio/iio.h>
-+#include <linux/iio/buffer.h>
-+#include <linux/iio/trigger_consumer.h>
-+#include <linux/iio/triggered_buffer.h>
-+
-+#include <linux/iio/common/st_sensors.h>
-+#include "st_gyro.h"
-+
-+int st_gyro_trig_set_state(struct iio_trigger *trig, bool state)
-+{
-+	struct iio_dev *indio_dev = trig->private_data;
-+
-+	return st_sensors_set_dataready_irq(indio_dev, state);
-+}
-+
-+static int st_gyro_buffer_preenable(struct iio_dev *indio_dev)
-+{
-+	int err;
-+
-+	err = st_sensors_set_enable(indio_dev, true);
-+	if (err < 0)
-+		goto st_gyro_set_enable_error;
-+
-+	err = iio_sw_buffer_preenable(indio_dev);
-+
-+st_gyro_set_enable_error:
-+	return err;
-+}
-+
-+static int st_gyro_buffer_postenable(struct iio_dev *indio_dev)
-+{
-+	int err;
-+	struct st_sensor_data *gdata = iio_priv(indio_dev);
-+
-+	gdata->buffer_data = kmalloc(indio_dev->scan_bytes, GFP_KERNEL);
-+	if (gdata->buffer_data == NULL) {
-+		err = -ENOMEM;
-+		goto allocate_memory_error;
-+	}
-+
-+	err = st_sensors_set_axis_enable(indio_dev,
-+					(u8)indio_dev->active_scan_mask[0]);
-+	if (err < 0)
-+		goto st_gyro_buffer_postenable_error;
-+
-+	err = iio_triggered_buffer_postenable(indio_dev);
-+	if (err < 0)
-+		goto st_gyro_buffer_postenable_error;
-+
-+	return err;
-+
-+st_gyro_buffer_postenable_error:
-+	kfree(gdata->buffer_data);
-+allocate_memory_error:
-+	return err;
-+}
-+
-+static int st_gyro_buffer_predisable(struct iio_dev *indio_dev)
-+{
-+	int err;
-+	struct st_sensor_data *gdata = iio_priv(indio_dev);
-+
-+	err = iio_triggered_buffer_predisable(indio_dev);
-+	if (err < 0)
-+		goto st_gyro_buffer_predisable_error;
-+
-+	err = st_sensors_set_axis_enable(indio_dev, ST_SENSORS_ENABLE_ALL_AXIS);
-+	if (err < 0)
-+		goto st_gyro_buffer_predisable_error;
-+
-+	err = st_sensors_set_enable(indio_dev, false);
-+
-+st_gyro_buffer_predisable_error:
-+	kfree(gdata->buffer_data);
-+	return err;
-+}
-+
-+static const struct iio_buffer_setup_ops st_gyro_buffer_setup_ops = {
-+	.preenable = &st_gyro_buffer_preenable,
-+	.postenable = &st_gyro_buffer_postenable,
-+	.predisable = &st_gyro_buffer_predisable,
-+};
-+
-+int st_gyro_allocate_ring(struct iio_dev *indio_dev)
-+{
-+	return iio_triggered_buffer_setup(indio_dev, &iio_pollfunc_store_time,
-+		&st_sensors_trigger_handler, &st_gyro_buffer_setup_ops);
-+}
-+
-+void st_gyro_deallocate_ring(struct iio_dev *indio_dev)
-+{
-+	iio_triggered_buffer_cleanup(indio_dev);
-+}
-+
-+MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
-+MODULE_DESCRIPTION("STMicroelectronics gyroscopes buffer");
-+MODULE_LICENSE("GPL v2");
-diff --git a/drivers/iio/gyro/st_gyro_core.c b/drivers/iio/gyro/st_gyro_core.c
-new file mode 100644
-index 0000000..0a09998
---- /dev/null
-+++ b/drivers/iio/gyro/st_gyro_core.c
-@@ -0,0 +1,363 @@
-+/*
-+ * STMicroelectronics gyroscopes driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/slab.h>
-+#include <linux/errno.h>
-+#include <linux/types.h>
-+#include <linux/mutex.h>
-+#include <linux/interrupt.h>
-+#include <linux/i2c.h>
-+#include <linux/gpio.h>
-+#include <linux/irq.h>
-+#include <linux/delay.h>
-+#include <linux/iio/iio.h>
-+#include <linux/iio/sysfs.h>
-+#include <linux/iio/trigger_consumer.h>
-+#include <linux/iio/buffer.h>
-+
-+#include <linux/iio/common/st_sensors.h>
-+#include "st_gyro.h"
-+
-+/* DEFAULT VALUE FOR SENSORS */
-+#define ST_GYRO_DEFAULT_OUT_X_L_ADDR		0x28
-+#define ST_GYRO_DEFAULT_OUT_Y_L_ADDR		0x2a
-+#define ST_GYRO_DEFAULT_OUT_Z_L_ADDR		0x2c
-+
-+/* FULLSCALE */
-+#define ST_GYRO_FS_AVL_250DPS			250
-+#define ST_GYRO_FS_AVL_500DPS			500
-+#define ST_GYRO_FS_AVL_2000DPS			2000
-+
-+/* CUSTOM VALUES FOR SENSOR 1 */
-+#define ST_GYRO_1_WAI_EXP			0xd3
-+#define ST_GYRO_1_ODR_ADDR			0x20
-+#define ST_GYRO_1_ODR_MASK			0xc0
-+#define ST_GYRO_1_ODR_AVL_100HZ_VAL		0x00
-+#define ST_GYRO_1_ODR_AVL_200HZ_VAL		0x01
-+#define ST_GYRO_1_ODR_AVL_400HZ_VAL		0x02
-+#define ST_GYRO_1_ODR_AVL_800HZ_VAL		0x03
-+#define ST_GYRO_1_PW_ADDR			0x20
-+#define ST_GYRO_1_PW_MASK			0x08
-+#define ST_GYRO_1_FS_ADDR			0x23
-+#define ST_GYRO_1_FS_MASK			0x30
-+#define ST_GYRO_1_FS_AVL_250_VAL		0x00
-+#define ST_GYRO_1_FS_AVL_500_VAL		0x01
-+#define ST_GYRO_1_FS_AVL_2000_VAL		0x02
-+#define ST_GYRO_1_FS_AVL_250_GAIN		IIO_DEGREE_TO_RAD(8750)
-+#define ST_GYRO_1_FS_AVL_500_GAIN		IIO_DEGREE_TO_RAD(17500)
-+#define ST_GYRO_1_FS_AVL_2000_GAIN		IIO_DEGREE_TO_RAD(70000)
-+#define ST_GYRO_1_BDU_ADDR			0x23
-+#define ST_GYRO_1_BDU_MASK			0x80
-+#define ST_GYRO_1_DRDY_IRQ_ADDR			0x22
-+#define ST_GYRO_1_DRDY_IRQ_MASK			0x08
-+#define ST_GYRO_1_MULTIREAD_BIT			true
-+
-+/* CUSTOM VALUES FOR SENSOR 2 */
-+#define ST_GYRO_2_WAI_EXP			0xd4
-+#define ST_GYRO_2_ODR_ADDR			0x20
-+#define ST_GYRO_2_ODR_MASK			0xc0
-+#define ST_GYRO_2_ODR_AVL_95HZ_VAL		0x00
-+#define ST_GYRO_2_ODR_AVL_190HZ_VAL		0x01
-+#define ST_GYRO_2_ODR_AVL_380HZ_VAL		0x02
-+#define ST_GYRO_2_ODR_AVL_760HZ_VAL		0x03
-+#define ST_GYRO_2_PW_ADDR			0x20
-+#define ST_GYRO_2_PW_MASK			0x08
-+#define ST_GYRO_2_FS_ADDR			0x23
-+#define ST_GYRO_2_FS_MASK			0x30
-+#define ST_GYRO_2_FS_AVL_250_VAL		0x00
-+#define ST_GYRO_2_FS_AVL_500_VAL		0x01
-+#define ST_GYRO_2_FS_AVL_2000_VAL		0x02
-+#define ST_GYRO_2_FS_AVL_250_GAIN		IIO_DEGREE_TO_RAD(8750)
-+#define ST_GYRO_2_FS_AVL_500_GAIN		IIO_DEGREE_TO_RAD(17500)
-+#define ST_GYRO_2_FS_AVL_2000_GAIN		IIO_DEGREE_TO_RAD(70000)
-+#define ST_GYRO_2_BDU_ADDR			0x23
-+#define ST_GYRO_2_BDU_MASK			0x80
-+#define ST_GYRO_2_DRDY_IRQ_ADDR			0x22
-+#define ST_GYRO_2_DRDY_IRQ_MASK			0x08
-+#define ST_GYRO_2_MULTIREAD_BIT			true
-+
-+static const struct iio_chan_spec st_gyro_16bit_channels[] = {
-+	ST_SENSORS_LSM_CHANNELS(IIO_ANGL_VEL, ST_SENSORS_SCAN_X,
-+		IIO_MOD_X, IIO_LE, ST_SENSORS_DEFAULT_16_REALBITS,
-+						ST_GYRO_DEFAULT_OUT_X_L_ADDR),
-+	ST_SENSORS_LSM_CHANNELS(IIO_ANGL_VEL, ST_SENSORS_SCAN_Y,
-+		IIO_MOD_Y, IIO_LE, ST_SENSORS_DEFAULT_16_REALBITS,
-+						ST_GYRO_DEFAULT_OUT_Y_L_ADDR),
-+	ST_SENSORS_LSM_CHANNELS(IIO_ANGL_VEL, ST_SENSORS_SCAN_Z,
-+		IIO_MOD_Z, IIO_LE, ST_SENSORS_DEFAULT_16_REALBITS,
-+						ST_GYRO_DEFAULT_OUT_Z_L_ADDR),
-+	IIO_CHAN_SOFT_TIMESTAMP(3)
-+};
-+
-+static const struct st_sensors st_gyro_sensors[] = {
-+	{
-+		.wai = ST_GYRO_1_WAI_EXP,
-+		.sensors_supported = {
-+			[0] = L3G4200D_GYRO_DEV_NAME,
-+			[1] = LSM330DL_GYRO_DEV_NAME,
-+		},
-+		.ch = (struct iio_chan_spec *)st_gyro_16bit_channels,
-+		.odr = {
-+			.addr = ST_GYRO_1_ODR_ADDR,
-+			.mask = ST_GYRO_1_ODR_MASK,
-+			.odr_avl = {
-+				{ 100, ST_GYRO_1_ODR_AVL_100HZ_VAL, },
-+				{ 200, ST_GYRO_1_ODR_AVL_200HZ_VAL, },
-+				{ 400, ST_GYRO_1_ODR_AVL_400HZ_VAL, },
-+				{ 800, ST_GYRO_1_ODR_AVL_800HZ_VAL, },
-+			},
-+		},
-+		.pw = {
-+			.addr = ST_GYRO_1_PW_ADDR,
-+			.mask = ST_GYRO_1_PW_MASK,
-+			.value_on = ST_SENSORS_DEFAULT_POWER_ON_VALUE,
-+			.value_off = ST_SENSORS_DEFAULT_POWER_OFF_VALUE,
-+		},
-+		.enable_axis = {
-+			.addr = ST_SENSORS_DEFAULT_AXIS_ADDR,
-+			.mask = ST_SENSORS_DEFAULT_AXIS_MASK,
-+		},
-+		.fs = {
-+			.addr = ST_GYRO_1_FS_ADDR,
-+			.mask = ST_GYRO_1_FS_MASK,
-+			.fs_avl = {
-+				[0] = {
-+					.num = ST_GYRO_FS_AVL_250DPS,
-+					.value = ST_GYRO_1_FS_AVL_250_VAL,
-+					.gain = ST_GYRO_1_FS_AVL_250_GAIN,
-+				},
-+				[1] = {
-+					.num = ST_GYRO_FS_AVL_500DPS,
-+					.value = ST_GYRO_1_FS_AVL_500_VAL,
-+					.gain = ST_GYRO_1_FS_AVL_500_GAIN,
-+				},
-+				[2] = {
-+					.num = ST_GYRO_FS_AVL_2000DPS,
-+					.value = ST_GYRO_1_FS_AVL_2000_VAL,
-+					.gain = ST_GYRO_1_FS_AVL_2000_GAIN,
-+				},
-+			},
-+		},
-+		.bdu = {
-+			.addr = ST_GYRO_1_BDU_ADDR,
-+			.mask = ST_GYRO_1_BDU_MASK,
-+		},
-+		.drdy_irq = {
-+			.addr = ST_GYRO_1_DRDY_IRQ_ADDR,
-+			.mask = ST_GYRO_1_DRDY_IRQ_MASK,
-+		},
-+		.multi_read_bit = ST_GYRO_1_MULTIREAD_BIT,
-+		.bootime = 2,
-+	},
-+	{
-+		.wai = ST_GYRO_2_WAI_EXP,
-+		.sensors_supported = {
-+			[0] = L3GD20_GYRO_DEV_NAME,
-+			[1] = L3GD20H_GYRO_DEV_NAME,
-+			[2] = LSM330D_GYRO_DEV_NAME,
-+			[3] = LSM330DLC_GYRO_DEV_NAME,
-+			[4] = L3G4IS_GYRO_DEV_NAME,
-+			[5] = LSM330_GYRO_DEV_NAME,
-+		},
-+		.ch = (struct iio_chan_spec *)st_gyro_16bit_channels,
-+		.odr = {
-+			.addr = ST_GYRO_2_ODR_ADDR,
-+			.mask = ST_GYRO_2_ODR_MASK,
-+			.odr_avl = {
-+				{ 95, ST_GYRO_2_ODR_AVL_95HZ_VAL, },
-+				{ 190, ST_GYRO_2_ODR_AVL_190HZ_VAL, },
-+				{ 380, ST_GYRO_2_ODR_AVL_380HZ_VAL, },
-+				{ 760, ST_GYRO_2_ODR_AVL_760HZ_VAL, },
-+			},
-+		},
-+		.pw = {
-+			.addr = ST_GYRO_2_PW_ADDR,
-+			.mask = ST_GYRO_2_PW_MASK,
-+			.value_on = ST_SENSORS_DEFAULT_POWER_ON_VALUE,
-+			.value_off = ST_SENSORS_DEFAULT_POWER_OFF_VALUE,
-+		},
-+		.enable_axis = {
-+			.addr = ST_SENSORS_DEFAULT_AXIS_ADDR,
-+			.mask = ST_SENSORS_DEFAULT_AXIS_MASK,
-+		},
-+		.fs = {
-+			.addr = ST_GYRO_2_FS_ADDR,
-+			.mask = ST_GYRO_2_FS_MASK,
-+			.fs_avl = {
-+				[0] = {
-+					.num = ST_GYRO_FS_AVL_250DPS,
-+					.value = ST_GYRO_2_FS_AVL_250_VAL,
-+					.gain = ST_GYRO_2_FS_AVL_250_GAIN,
-+				},
-+				[1] = {
-+					.num = ST_GYRO_FS_AVL_500DPS,
-+					.value = ST_GYRO_2_FS_AVL_500_VAL,
-+					.gain = ST_GYRO_2_FS_AVL_500_GAIN,
-+				},
-+				[2] = {
-+					.num = ST_GYRO_FS_AVL_2000DPS,
-+					.value = ST_GYRO_2_FS_AVL_2000_VAL,
-+					.gain = ST_GYRO_2_FS_AVL_2000_GAIN,
-+				},
-+			},
-+		},
-+		.bdu = {
-+			.addr = ST_GYRO_2_BDU_ADDR,
-+			.mask = ST_GYRO_2_BDU_MASK,
-+		},
-+		.drdy_irq = {
-+			.addr = ST_GYRO_2_DRDY_IRQ_ADDR,
-+			.mask = ST_GYRO_2_DRDY_IRQ_MASK,
-+		},
-+		.multi_read_bit = ST_GYRO_2_MULTIREAD_BIT,
-+		.bootime = 2,
-+	},
-+};
-+
-+static int st_gyro_read_raw(struct iio_dev *indio_dev,
-+			struct iio_chan_spec const *ch, int *val,
-+							int *val2, long mask)
-+{
-+	int err;
-+	struct st_sensor_data *gdata = iio_priv(indio_dev);
-+
-+	switch (mask) {
-+	case IIO_CHAN_INFO_RAW:
-+		err = st_sensors_read_info_raw(indio_dev, ch, val);
-+		if (err < 0)
-+			goto read_error;
-+
-+		return IIO_VAL_INT;
-+	case IIO_CHAN_INFO_SCALE:
-+		*val = 0;
-+		*val2 = gdata->current_fullscale->gain;
-+		return IIO_VAL_INT_PLUS_MICRO;
-+	default:
-+		return -EINVAL;
-+	}
-+
-+read_error:
-+	return err;
-+}
-+
-+static int st_gyro_write_raw(struct iio_dev *indio_dev,
-+		struct iio_chan_spec const *chan, int val, int val2, long mask)
-+{
-+	int err;
-+
-+	switch (mask) {
-+	case IIO_CHAN_INFO_SCALE:
-+		err = st_sensors_set_fullscale_by_gain(indio_dev, val2);
-+		break;
-+	default:
-+		err = -EINVAL;
-+	}
-+
-+	return err;
-+}
-+
-+static ST_SENSOR_DEV_ATTR_SAMP_FREQ();
-+static ST_SENSORS_DEV_ATTR_SAMP_FREQ_AVAIL();
-+static ST_SENSORS_DEV_ATTR_SCALE_AVAIL(in_anglvel_scale_available);
-+
-+static struct attribute *st_gyro_attributes[] = {
-+	&iio_dev_attr_sampling_frequency_available.dev_attr.attr,
-+	&iio_dev_attr_in_anglvel_scale_available.dev_attr.attr,
-+	&iio_dev_attr_sampling_frequency.dev_attr.attr,
-+	NULL,
-+};
-+
-+static const struct attribute_group st_gyro_attribute_group = {
-+	.attrs = st_gyro_attributes,
-+};
-+
-+static const struct iio_info gyro_info = {
-+	.driver_module = THIS_MODULE,
-+	.attrs = &st_gyro_attribute_group,
-+	.read_raw = &st_gyro_read_raw,
-+	.write_raw = &st_gyro_write_raw,
-+};
-+
-+static const struct iio_trigger_ops st_gyro_trigger_ops = {
-+	.owner = THIS_MODULE,
-+	.set_trigger_state = ST_GYRO_TRIGGER_SET_STATE,
-+};
-+
-+int st_gyro_common_probe(struct iio_dev *indio_dev)
-+{
-+	int err;
-+	struct st_sensor_data *gdata = iio_priv(indio_dev);
-+
-+	indio_dev->modes = INDIO_DIRECT_MODE;
-+	indio_dev->info = &gyro_info;
-+
-+	err = st_sensors_check_device_support(indio_dev,
-+				ARRAY_SIZE(st_gyro_sensors), st_gyro_sensors);
-+	if (err < 0)
-+		goto st_gyro_common_probe_error;
-+
-+	gdata->multiread_bit = gdata->sensor->multi_read_bit;
-+	indio_dev->channels = gdata->sensor->ch;
-+	indio_dev->num_channels = ST_SENSORS_NUMBER_ALL_CHANNELS;
-+
-+	gdata->current_fullscale = (struct st_sensor_fullscale_avl *)
-+						&gdata->sensor->fs.fs_avl[0];
-+	gdata->odr = gdata->sensor->odr.odr_avl[0].hz;
-+
-+	err = st_sensors_init_sensor(indio_dev);
-+	if (err < 0)
-+		goto st_gyro_common_probe_error;
-+
-+	if (gdata->get_irq_data_ready(indio_dev) > 0) {
-+		err = st_gyro_allocate_ring(indio_dev);
-+		if (err < 0)
-+			goto st_gyro_common_probe_error;
-+
-+		err = st_sensors_allocate_trigger(indio_dev,
-+							&st_gyro_trigger_ops);
-+		if (err < 0)
-+			goto st_gyro_probe_trigger_error;
-+	}
-+
-+	err = iio_device_register(indio_dev);
-+	if (err)
-+		goto st_gyro_device_register_error;
-+
-+	return err;
-+
-+st_gyro_device_register_error:
-+	if (gdata->get_irq_data_ready(indio_dev) > 0)
-+		st_sensors_deallocate_trigger(indio_dev);
-+st_gyro_probe_trigger_error:
-+	if (gdata->get_irq_data_ready(indio_dev) > 0)
-+		st_gyro_deallocate_ring(indio_dev);
-+st_gyro_common_probe_error:
-+	return err;
-+}
-+EXPORT_SYMBOL(st_gyro_common_probe);
-+
-+void st_gyro_common_remove(struct iio_dev *indio_dev)
-+{
-+	struct st_sensor_data *gdata = iio_priv(indio_dev);
-+
-+	iio_device_unregister(indio_dev);
-+	if (gdata->get_irq_data_ready(indio_dev) > 0) {
-+		st_sensors_deallocate_trigger(indio_dev);
-+		st_gyro_deallocate_ring(indio_dev);
-+	}
-+	iio_device_free(indio_dev);
-+}
-+EXPORT_SYMBOL(st_gyro_common_remove);
-+
-+MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
-+MODULE_DESCRIPTION("STMicroelectronics gyroscopes driver");
-+MODULE_LICENSE("GPL v2");
-diff --git a/drivers/iio/gyro/st_gyro_i2c.c b/drivers/iio/gyro/st_gyro_i2c.c
-new file mode 100644
-index 0000000..a44b5b4
---- /dev/null
-+++ b/drivers/iio/gyro/st_gyro_i2c.c
-@@ -0,0 +1,85 @@
-+/*
-+ * STMicroelectronics gyroscopes driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/slab.h>
-+#include <linux/i2c.h>
-+#include <linux/iio/iio.h>
-+#include <linux/iio/trigger.h>
-+
-+#include <linux/iio/common/st_sensors.h>
-+#include <linux/iio/common/st_sensors_i2c.h>
-+#include "st_gyro.h"
-+
-+static int st_gyro_i2c_probe(struct i2c_client *client,
-+						const struct i2c_device_id *id)
-+{
-+	struct iio_dev *indio_dev;
-+	struct st_sensor_data *gdata;
-+	int err;
-+
-+	indio_dev = iio_device_alloc(sizeof(*gdata));
-+	if (indio_dev == NULL) {
-+		err = -ENOMEM;
-+		goto iio_device_alloc_error;
-+	}
-+
-+	gdata = iio_priv(indio_dev);
-+	gdata->dev = &client->dev;
-+
-+	st_sensors_i2c_configure(indio_dev, client, gdata);
-+
-+	err = st_gyro_common_probe(indio_dev);
-+	if (err < 0)
-+		goto st_gyro_common_probe_error;
-+
-+	return 0;
-+
-+st_gyro_common_probe_error:
-+	iio_device_free(indio_dev);
-+iio_device_alloc_error:
-+	return err;
-+}
-+
-+static int st_gyro_i2c_remove(struct i2c_client *client)
-+{
-+	st_gyro_common_remove(i2c_get_clientdata(client));
-+
-+	return 0;
-+}
-+
-+static const struct i2c_device_id st_gyro_id_table[] = {
-+	{ L3G4200D_GYRO_DEV_NAME },
-+	{ LSM330D_GYRO_DEV_NAME },
-+	{ LSM330DL_GYRO_DEV_NAME },
-+	{ LSM330DLC_GYRO_DEV_NAME },
-+	{ L3GD20_GYRO_DEV_NAME },
-+	{ L3GD20H_GYRO_DEV_NAME },
-+	{ L3G4IS_GYRO_DEV_NAME },
-+	{ LSM330_GYRO_DEV_NAME },
-+	{},
-+};
-+MODULE_DEVICE_TABLE(i2c, st_gyro_id_table);
-+
-+static struct i2c_driver st_gyro_driver = {
-+	.driver = {
-+		.owner = THIS_MODULE,
-+		.name = "st-gyro-i2c",
-+	},
-+	.probe = st_gyro_i2c_probe,
-+	.remove = st_gyro_i2c_remove,
-+	.id_table = st_gyro_id_table,
-+};
-+module_i2c_driver(st_gyro_driver);
-+
-+MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
-+MODULE_DESCRIPTION("STMicroelectronics gyroscopes i2c driver");
-+MODULE_LICENSE("GPL v2");
-diff --git a/drivers/iio/gyro/st_gyro_spi.c b/drivers/iio/gyro/st_gyro_spi.c
-new file mode 100644
-index 0000000..8b4dcc5
---- /dev/null
-+++ b/drivers/iio/gyro/st_gyro_spi.c
-@@ -0,0 +1,84 @@
-+/*
-+ * STMicroelectronics gyroscopes driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/slab.h>
-+#include <linux/spi/spi.h>
-+#include <linux/iio/iio.h>
-+#include <linux/iio/trigger.h>
-+
-+#include <linux/iio/common/st_sensors.h>
-+#include <linux/iio/common/st_sensors_spi.h>
-+#include "st_gyro.h"
-+
-+static int st_gyro_spi_probe(struct spi_device *spi)
-+{
-+	struct iio_dev *indio_dev;
-+	struct st_sensor_data *gdata;
-+	int err;
-+
-+	indio_dev = iio_device_alloc(sizeof(*gdata));
-+	if (indio_dev == NULL) {
-+		err = -ENOMEM;
-+		goto iio_device_alloc_error;
-+	}
-+
-+	gdata = iio_priv(indio_dev);
-+	gdata->dev = &spi->dev;
-+
-+	st_sensors_spi_configure(indio_dev, spi, gdata);
-+
-+	err = st_gyro_common_probe(indio_dev);
-+	if (err < 0)
-+		goto st_gyro_common_probe_error;
-+
-+	return 0;
-+
-+st_gyro_common_probe_error:
-+	iio_device_free(indio_dev);
-+iio_device_alloc_error:
-+	return err;
-+}
-+
-+static int st_gyro_spi_remove(struct spi_device *spi)
-+{
-+	st_gyro_common_remove(spi_get_drvdata(spi));
-+
-+	return 0;
-+}
-+
-+static const struct spi_device_id st_gyro_id_table[] = {
-+	{ L3G4200D_GYRO_DEV_NAME },
-+	{ LSM330D_GYRO_DEV_NAME },
-+	{ LSM330DL_GYRO_DEV_NAME },
-+	{ LSM330DLC_GYRO_DEV_NAME },
-+	{ L3GD20_GYRO_DEV_NAME },
-+	{ L3GD20H_GYRO_DEV_NAME },
-+	{ L3G4IS_GYRO_DEV_NAME },
-+	{ LSM330_GYRO_DEV_NAME },
-+	{},
-+};
-+MODULE_DEVICE_TABLE(spi, st_gyro_id_table);
-+
-+static struct spi_driver st_gyro_driver = {
-+	.driver = {
-+		.owner = THIS_MODULE,
-+		.name = "st-gyro-spi",
-+	},
-+	.probe = st_gyro_spi_probe,
-+	.remove = st_gyro_spi_remove,
-+	.id_table = st_gyro_id_table,
-+};
-+module_spi_driver(st_gyro_driver);
-+
-+MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
-+MODULE_DESCRIPTION("STMicroelectronics gyroscopes spi driver");
-+MODULE_LICENSE("GPL v2");
--- 
-1.8.1
-
diff --git a/patches/iio/0004-iio-magnetometer-Add-STMicroelectronics-magnetometer.patch b/patches/iio/0004-iio-magnetometer-Add-STMicroelectronics-magnetometer.patch
deleted file mode 100644
index 5ed6b0f4bf10593bfcd0b6ddcf23090306f0b764..0000000000000000000000000000000000000000
--- a/patches/iio/0004-iio-magnetometer-Add-STMicroelectronics-magnetometer.patch
+++ /dev/null
@@ -1,812 +0,0 @@
-From fc3ae52991e14590783354addc373947601f56d7 Mon Sep 17 00:00:00 2001
-From: Denis Ciocca <denis.ciocca@gmail.com>
-Date: Fri, 25 Jan 2013 23:44:00 +0000
-Subject: [PATCH 4/6] iio:magnetometer: Add STMicroelectronics magnetometers
- driver
-
-This patch adds a generic magnetometer driver for STMicroelectronics
-magnetometers, currently it supports:
-LSM303DLHC, LSM303DLM, LIS3MDL.
-
-Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
-Signed-off-by: Jonathan Cameron <jic23@kernel.org>
----
- drivers/iio/magnetometer/Kconfig          |  30 +++
- drivers/iio/magnetometer/Makefile         |   7 +
- drivers/iio/magnetometer/st_magn.h        |  45 ++++
- drivers/iio/magnetometer/st_magn_buffer.c |  98 ++++++++
- drivers/iio/magnetometer/st_magn_core.c   | 394 ++++++++++++++++++++++++++++++
- drivers/iio/magnetometer/st_magn_i2c.c    |  81 ++++++
- drivers/iio/magnetometer/st_magn_spi.c    |  80 ++++++
- 7 files changed, 735 insertions(+)
- create mode 100644 drivers/iio/magnetometer/st_magn.h
- create mode 100644 drivers/iio/magnetometer/st_magn_buffer.c
- create mode 100644 drivers/iio/magnetometer/st_magn_core.c
- create mode 100644 drivers/iio/magnetometer/st_magn_i2c.c
- create mode 100644 drivers/iio/magnetometer/st_magn_spi.c
-
-diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig
-index ff11d68..cd29be5 100644
---- a/drivers/iio/magnetometer/Kconfig
-+++ b/drivers/iio/magnetometer/Kconfig
-@@ -14,4 +14,34 @@ config HID_SENSOR_MAGNETOMETER_3D
- 	  Say yes here to build support for the HID SENSOR
- 	  Magnetometer 3D.
- 
-+config IIO_ST_MAGN_3AXIS
-+	tristate "STMicroelectronics magnetometers 3-Axis Driver"
-+	depends on (I2C || SPI_MASTER) && SYSFS
-+	select IIO_ST_SENSORS_CORE
-+	select IIO_ST_MAGN_I2C_3AXIS if (I2C)
-+	select IIO_ST_MAGN_SPI_3AXIS if (SPI_MASTER)
-+	select IIO_TRIGGERED_BUFFER if (IIO_BUFFER)
-+	select IIO_ST_MAGN_BUFFER if (IIO_TRIGGERED_BUFFER)
-+	help
-+	  Say yes here to build support for STMicroelectronics magnetometers:
-+	  LSM303DLHC, LSM303DLM, LIS3MDL.
-+
-+	  This driver can also be built as a module. If so, will be created
-+	  these modules:
-+	  - st_magn (core functions for the driver [it is mandatory]);
-+	  - st_magn_i2c (necessary for the I2C devices [optional*]);
-+	  - st_magn_spi (necessary for the SPI devices [optional*]);
-+
-+	  (*) one of these is necessary to do something.
-+
-+config IIO_ST_MAGN_I2C_3AXIS
-+	tristate
-+	depends on IIO_ST_MAGN_3AXIS
-+	depends on IIO_ST_SENSORS_I2C
-+
-+config IIO_ST_MAGN_SPI_3AXIS
-+	tristate
-+	depends on IIO_ST_MAGN_3AXIS
-+	depends on IIO_ST_SENSORS_SPI
-+
- endmenu
-diff --git a/drivers/iio/magnetometer/Makefile b/drivers/iio/magnetometer/Makefile
-index 60dc4f2..e786728 100644
---- a/drivers/iio/magnetometer/Makefile
-+++ b/drivers/iio/magnetometer/Makefile
-@@ -3,3 +3,10 @@
- #
- 
- obj-$(CONFIG_HID_SENSOR_MAGNETOMETER_3D) += hid-sensor-magn-3d.o
-+
-+obj-$(CONFIG_IIO_ST_MAGN_3AXIS) += st_magn.o
-+st_magn-y := st_magn_core.o
-+st_magn-$(CONFIG_IIO_BUFFER) += st_magn_buffer.o
-+
-+obj-$(CONFIG_IIO_ST_MAGN_I2C_3AXIS) += st_magn_i2c.o
-+obj-$(CONFIG_IIO_ST_MAGN_SPI_3AXIS) += st_magn_spi.o
-diff --git a/drivers/iio/magnetometer/st_magn.h b/drivers/iio/magnetometer/st_magn.h
-new file mode 100644
-index 0000000..7e81d00
---- /dev/null
-+++ b/drivers/iio/magnetometer/st_magn.h
-@@ -0,0 +1,45 @@
-+/*
-+ * STMicroelectronics magnetometers driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ * v. 1.0.0
-+ * Licensed under the GPL-2.
-+ */
-+
-+#ifndef ST_MAGN_H
-+#define ST_MAGN_H
-+
-+#include <linux/types.h>
-+#include <linux/iio/common/st_sensors.h>
-+
-+#define LSM303DLHC_MAGN_DEV_NAME	"lsm303dlhc_magn"
-+#define LSM303DLM_MAGN_DEV_NAME		"lsm303dlm_magn"
-+#define LIS3MDL_MAGN_DEV_NAME		"lis3mdl"
-+
-+int st_magn_common_probe(struct iio_dev *indio_dev);
-+void st_magn_common_remove(struct iio_dev *indio_dev);
-+
-+#ifdef CONFIG_IIO_BUFFER
-+int st_magn_allocate_ring(struct iio_dev *indio_dev);
-+void st_magn_deallocate_ring(struct iio_dev *indio_dev);
-+#else /* CONFIG_IIO_BUFFER */
-+static inline int st_magn_probe_trigger(struct iio_dev *indio_dev, int irq)
-+{
-+	return 0;
-+}
-+static inline void st_magn_remove_trigger(struct iio_dev *indio_dev, int irq)
-+{
-+	return;
-+}
-+static inline int st_magn_allocate_ring(struct iio_dev *indio_dev)
-+{
-+	return 0;
-+}
-+static inline void st_magn_deallocate_ring(struct iio_dev *indio_dev)
-+{
-+}
-+#endif /* CONFIG_IIO_BUFFER */
-+
-+#endif /* ST_MAGN_H */
-diff --git a/drivers/iio/magnetometer/st_magn_buffer.c b/drivers/iio/magnetometer/st_magn_buffer.c
-new file mode 100644
-index 0000000..708857b
---- /dev/null
-+++ b/drivers/iio/magnetometer/st_magn_buffer.c
-@@ -0,0 +1,98 @@
-+/*
-+ * STMicroelectronics magnetometers driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/kernel.h>
-+#include <linux/slab.h>
-+#include <linux/stat.h>
-+#include <linux/interrupt.h>
-+#include <linux/i2c.h>
-+#include <linux/delay.h>
-+#include <linux/iio/iio.h>
-+#include <linux/iio/buffer.h>
-+#include <linux/iio/trigger_consumer.h>
-+#include <linux/iio/triggered_buffer.h>
-+
-+#include <linux/iio/common/st_sensors.h>
-+#include "st_magn.h"
-+
-+static int st_magn_buffer_preenable(struct iio_dev *indio_dev)
-+{
-+	int err;
-+
-+	err = st_sensors_set_enable(indio_dev, true);
-+	if (err < 0)
-+		goto st_magn_set_enable_error;
-+
-+	err = iio_sw_buffer_preenable(indio_dev);
-+
-+st_magn_set_enable_error:
-+	return err;
-+}
-+
-+static int st_magn_buffer_postenable(struct iio_dev *indio_dev)
-+{
-+	int err;
-+	struct st_sensor_data *mdata = iio_priv(indio_dev);
-+
-+	mdata->buffer_data = kmalloc(indio_dev->scan_bytes, GFP_KERNEL);
-+	if (mdata->buffer_data == NULL) {
-+		err = -ENOMEM;
-+		goto allocate_memory_error;
-+	}
-+
-+	err = iio_triggered_buffer_postenable(indio_dev);
-+	if (err < 0)
-+		goto st_magn_buffer_postenable_error;
-+
-+	return err;
-+
-+st_magn_buffer_postenable_error:
-+	kfree(mdata->buffer_data);
-+allocate_memory_error:
-+	return err;
-+}
-+
-+static int st_magn_buffer_predisable(struct iio_dev *indio_dev)
-+{
-+	int err;
-+	struct st_sensor_data *mdata = iio_priv(indio_dev);
-+
-+	err = iio_triggered_buffer_predisable(indio_dev);
-+	if (err < 0)
-+		goto st_magn_buffer_predisable_error;
-+
-+	err = st_sensors_set_enable(indio_dev, false);
-+
-+st_magn_buffer_predisable_error:
-+	kfree(mdata->buffer_data);
-+	return err;
-+}
-+
-+static const struct iio_buffer_setup_ops st_magn_buffer_setup_ops = {
-+	.preenable = &st_magn_buffer_preenable,
-+	.postenable = &st_magn_buffer_postenable,
-+	.predisable = &st_magn_buffer_predisable,
-+};
-+
-+int st_magn_allocate_ring(struct iio_dev *indio_dev)
-+{
-+	return iio_triggered_buffer_setup(indio_dev, &iio_pollfunc_store_time,
-+		&st_sensors_trigger_handler, &st_magn_buffer_setup_ops);
-+}
-+
-+void st_magn_deallocate_ring(struct iio_dev *indio_dev)
-+{
-+	iio_triggered_buffer_cleanup(indio_dev);
-+}
-+
-+MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
-+MODULE_DESCRIPTION("STMicroelectronics magnetometers buffer");
-+MODULE_LICENSE("GPL v2");
-diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c
-new file mode 100644
-index 0000000..1dfcb41
---- /dev/null
-+++ b/drivers/iio/magnetometer/st_magn_core.c
-@@ -0,0 +1,394 @@
-+/*
-+ * STMicroelectronics magnetometers driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/slab.h>
-+#include <linux/errno.h>
-+#include <linux/types.h>
-+#include <linux/mutex.h>
-+#include <linux/interrupt.h>
-+#include <linux/i2c.h>
-+#include <linux/gpio.h>
-+#include <linux/irq.h>
-+#include <linux/delay.h>
-+#include <linux/iio/iio.h>
-+#include <linux/iio/sysfs.h>
-+#include <linux/iio/trigger_consumer.h>
-+#include <linux/iio/buffer.h>
-+
-+#include <linux/iio/common/st_sensors.h>
-+#include "st_magn.h"
-+
-+/* DEFAULT VALUE FOR SENSORS */
-+#define ST_MAGN_DEFAULT_OUT_X_L_ADDR		0X04
-+#define ST_MAGN_DEFAULT_OUT_Y_L_ADDR		0X08
-+#define ST_MAGN_DEFAULT_OUT_Z_L_ADDR		0X06
-+
-+/* FULLSCALE */
-+#define ST_MAGN_FS_AVL_1300MG			1300
-+#define ST_MAGN_FS_AVL_1900MG			1900
-+#define ST_MAGN_FS_AVL_2500MG			2500
-+#define ST_MAGN_FS_AVL_4000MG			4000
-+#define ST_MAGN_FS_AVL_4700MG			4700
-+#define ST_MAGN_FS_AVL_5600MG			5600
-+#define ST_MAGN_FS_AVL_8000MG			8000
-+#define ST_MAGN_FS_AVL_8100MG			8100
-+#define ST_MAGN_FS_AVL_10000MG			10000
-+
-+/* CUSTOM VALUES FOR SENSOR 1 */
-+#define ST_MAGN_1_WAI_EXP			0x3c
-+#define ST_MAGN_1_ODR_ADDR			0x00
-+#define ST_MAGN_1_ODR_MASK			0x1c
-+#define ST_MAGN_1_ODR_AVL_1HZ_VAL		0x00
-+#define ST_MAGN_1_ODR_AVL_2HZ_VAL		0x01
-+#define ST_MAGN_1_ODR_AVL_3HZ_VAL		0x02
-+#define ST_MAGN_1_ODR_AVL_8HZ_VAL		0x03
-+#define ST_MAGN_1_ODR_AVL_15HZ_VAL		0x04
-+#define ST_MAGN_1_ODR_AVL_30HZ_VAL		0x05
-+#define ST_MAGN_1_ODR_AVL_75HZ_VAL		0x06
-+#define ST_MAGN_1_ODR_AVL_220HZ_VAL		0x07
-+#define ST_MAGN_1_PW_ADDR			0x02
-+#define ST_MAGN_1_PW_MASK			0x03
-+#define ST_MAGN_1_PW_ON				0x00
-+#define ST_MAGN_1_PW_OFF			0x03
-+#define ST_MAGN_1_FS_ADDR			0x01
-+#define ST_MAGN_1_FS_MASK			0xe0
-+#define ST_MAGN_1_FS_AVL_1300_VAL		0x01
-+#define ST_MAGN_1_FS_AVL_1900_VAL		0x02
-+#define ST_MAGN_1_FS_AVL_2500_VAL		0x03
-+#define ST_MAGN_1_FS_AVL_4000_VAL		0x04
-+#define ST_MAGN_1_FS_AVL_4700_VAL		0x05
-+#define ST_MAGN_1_FS_AVL_5600_VAL		0x06
-+#define ST_MAGN_1_FS_AVL_8100_VAL		0x07
-+#define ST_MAGN_1_FS_AVL_1300_GAIN_XY		1100
-+#define ST_MAGN_1_FS_AVL_1900_GAIN_XY		855
-+#define ST_MAGN_1_FS_AVL_2500_GAIN_XY		670
-+#define ST_MAGN_1_FS_AVL_4000_GAIN_XY		450
-+#define ST_MAGN_1_FS_AVL_4700_GAIN_XY		400
-+#define ST_MAGN_1_FS_AVL_5600_GAIN_XY		330
-+#define ST_MAGN_1_FS_AVL_8100_GAIN_XY		230
-+#define ST_MAGN_1_FS_AVL_1300_GAIN_Z		980
-+#define ST_MAGN_1_FS_AVL_1900_GAIN_Z		760
-+#define ST_MAGN_1_FS_AVL_2500_GAIN_Z		600
-+#define ST_MAGN_1_FS_AVL_4000_GAIN_Z		400
-+#define ST_MAGN_1_FS_AVL_4700_GAIN_Z		355
-+#define ST_MAGN_1_FS_AVL_5600_GAIN_Z		295
-+#define ST_MAGN_1_FS_AVL_8100_GAIN_Z		205
-+#define ST_MAGN_1_MULTIREAD_BIT			false
-+
-+/* CUSTOM VALUES FOR SENSOR 2 */
-+#define ST_MAGN_2_WAI_EXP			0x3d
-+#define ST_MAGN_2_ODR_ADDR			0x20
-+#define ST_MAGN_2_ODR_MASK			0x1c
-+#define ST_MAGN_2_ODR_AVL_1HZ_VAL		0x00
-+#define ST_MAGN_2_ODR_AVL_2HZ_VAL		0x01
-+#define ST_MAGN_2_ODR_AVL_3HZ_VAL		0x02
-+#define ST_MAGN_2_ODR_AVL_5HZ_VAL		0x03
-+#define ST_MAGN_2_ODR_AVL_10HZ_VAL		0x04
-+#define ST_MAGN_2_ODR_AVL_20HZ_VAL		0x05
-+#define ST_MAGN_2_ODR_AVL_40HZ_VAL		0x06
-+#define ST_MAGN_2_ODR_AVL_80HZ_VAL		0x07
-+#define ST_MAGN_2_PW_ADDR			0x22
-+#define ST_MAGN_2_PW_MASK			0x03
-+#define ST_MAGN_2_PW_ON				0x00
-+#define ST_MAGN_2_PW_OFF			0x03
-+#define ST_MAGN_2_FS_ADDR			0x21
-+#define ST_MAGN_2_FS_MASK			0x60
-+#define ST_MAGN_2_FS_AVL_4000_VAL		0x00
-+#define ST_MAGN_2_FS_AVL_8000_VAL		0x01
-+#define ST_MAGN_2_FS_AVL_10000_VAL		0x02
-+#define ST_MAGN_2_FS_AVL_4000_GAIN		430
-+#define ST_MAGN_2_FS_AVL_8000_GAIN		230
-+#define ST_MAGN_2_FS_AVL_10000_GAIN		230
-+#define ST_MAGN_2_MULTIREAD_BIT			false
-+#define ST_MAGN_2_OUT_X_L_ADDR			0x28
-+#define ST_MAGN_2_OUT_Y_L_ADDR			0x2a
-+#define ST_MAGN_2_OUT_Z_L_ADDR			0x2c
-+
-+static const struct iio_chan_spec st_magn_16bit_channels[] = {
-+	ST_SENSORS_LSM_CHANNELS(IIO_MAGN, ST_SENSORS_SCAN_X, IIO_MOD_X, IIO_LE,
-+		ST_SENSORS_DEFAULT_16_REALBITS, ST_MAGN_DEFAULT_OUT_X_L_ADDR),
-+	ST_SENSORS_LSM_CHANNELS(IIO_MAGN, ST_SENSORS_SCAN_Y, IIO_MOD_Y, IIO_LE,
-+		ST_SENSORS_DEFAULT_16_REALBITS, ST_MAGN_DEFAULT_OUT_Y_L_ADDR),
-+	ST_SENSORS_LSM_CHANNELS(IIO_MAGN, ST_SENSORS_SCAN_Z, IIO_MOD_Z, IIO_LE,
-+		ST_SENSORS_DEFAULT_16_REALBITS, ST_MAGN_DEFAULT_OUT_Z_L_ADDR),
-+	IIO_CHAN_SOFT_TIMESTAMP(3)
-+};
-+
-+static const struct iio_chan_spec st_magn_2_16bit_channels[] = {
-+	ST_SENSORS_LSM_CHANNELS(IIO_MAGN, ST_SENSORS_SCAN_X, IIO_MOD_X, IIO_LE,
-+		ST_SENSORS_DEFAULT_16_REALBITS, ST_MAGN_2_OUT_X_L_ADDR),
-+	ST_SENSORS_LSM_CHANNELS(IIO_MAGN, ST_SENSORS_SCAN_Y, IIO_MOD_Y, IIO_LE,
-+		ST_SENSORS_DEFAULT_16_REALBITS, ST_MAGN_2_OUT_Y_L_ADDR),
-+	ST_SENSORS_LSM_CHANNELS(IIO_MAGN, ST_SENSORS_SCAN_Z, IIO_MOD_Z, IIO_LE,
-+		ST_SENSORS_DEFAULT_16_REALBITS, ST_MAGN_2_OUT_Z_L_ADDR),
-+	IIO_CHAN_SOFT_TIMESTAMP(3)
-+};
-+
-+static const struct st_sensors st_magn_sensors[] = {
-+	{
-+		.wai = ST_MAGN_1_WAI_EXP,
-+		.ch = (struct iio_chan_spec *)st_magn_16bit_channels,
-+		.odr = {
-+			.addr = ST_MAGN_1_ODR_ADDR,
-+			.mask = ST_MAGN_1_ODR_MASK,
-+			.odr_avl = {
-+				{ 1, ST_MAGN_1_ODR_AVL_1HZ_VAL, },
-+				{ 2, ST_MAGN_1_ODR_AVL_2HZ_VAL, },
-+				{ 3, ST_MAGN_1_ODR_AVL_3HZ_VAL, },
-+				{ 8, ST_MAGN_1_ODR_AVL_8HZ_VAL, },
-+				{ 15, ST_MAGN_1_ODR_AVL_15HZ_VAL, },
-+				{ 30, ST_MAGN_1_ODR_AVL_30HZ_VAL, },
-+				{ 75, ST_MAGN_1_ODR_AVL_75HZ_VAL, },
-+				{ 220, ST_MAGN_1_ODR_AVL_220HZ_VAL, },
-+			},
-+		},
-+		.pw = {
-+			.addr = ST_MAGN_1_PW_ADDR,
-+			.mask = ST_MAGN_1_PW_MASK,
-+			.value_on = ST_MAGN_1_PW_ON,
-+			.value_off = ST_MAGN_1_PW_OFF,
-+		},
-+		.fs = {
-+			.addr = ST_MAGN_1_FS_ADDR,
-+			.mask = ST_MAGN_1_FS_MASK,
-+			.fs_avl = {
-+				[0] = {
-+					.num = ST_MAGN_FS_AVL_1300MG,
-+					.value = ST_MAGN_1_FS_AVL_1300_VAL,
-+					.gain = ST_MAGN_1_FS_AVL_1300_GAIN_XY,
-+					.gain2 = ST_MAGN_1_FS_AVL_1300_GAIN_Z,
-+				},
-+				[1] = {
-+					.num = ST_MAGN_FS_AVL_1900MG,
-+					.value = ST_MAGN_1_FS_AVL_1900_VAL,
-+					.gain = ST_MAGN_1_FS_AVL_1900_GAIN_XY,
-+					.gain2 = ST_MAGN_1_FS_AVL_1900_GAIN_Z,
-+				},
-+				[2] = {
-+					.num = ST_MAGN_FS_AVL_2500MG,
-+					.value = ST_MAGN_1_FS_AVL_2500_VAL,
-+					.gain = ST_MAGN_1_FS_AVL_2500_GAIN_XY,
-+					.gain2 = ST_MAGN_1_FS_AVL_2500_GAIN_Z,
-+				},
-+				[3] = {
-+					.num = ST_MAGN_FS_AVL_4000MG,
-+					.value = ST_MAGN_1_FS_AVL_4000_VAL,
-+					.gain = ST_MAGN_1_FS_AVL_4000_GAIN_XY,
-+					.gain2 = ST_MAGN_1_FS_AVL_4000_GAIN_Z,
-+				},
-+				[4] = {
-+					.num = ST_MAGN_FS_AVL_4700MG,
-+					.value = ST_MAGN_1_FS_AVL_4700_VAL,
-+					.gain = ST_MAGN_1_FS_AVL_4700_GAIN_XY,
-+					.gain2 = ST_MAGN_1_FS_AVL_4700_GAIN_Z,
-+				},
-+				[5] = {
-+					.num = ST_MAGN_FS_AVL_5600MG,
-+					.value = ST_MAGN_1_FS_AVL_5600_VAL,
-+					.gain = ST_MAGN_1_FS_AVL_5600_GAIN_XY,
-+					.gain2 = ST_MAGN_1_FS_AVL_5600_GAIN_Z,
-+				},
-+				[6] = {
-+					.num = ST_MAGN_FS_AVL_8100MG,
-+					.value = ST_MAGN_1_FS_AVL_8100_VAL,
-+					.gain = ST_MAGN_1_FS_AVL_8100_GAIN_XY,
-+					.gain2 = ST_MAGN_1_FS_AVL_8100_GAIN_Z,
-+				},
-+			},
-+		},
-+		.multi_read_bit = ST_MAGN_1_MULTIREAD_BIT,
-+		.bootime = 2,
-+	},
-+	{
-+		.wai = ST_MAGN_2_WAI_EXP,
-+		.ch = (struct iio_chan_spec *)st_magn_2_16bit_channels,
-+		.odr = {
-+			.addr = ST_MAGN_2_ODR_ADDR,
-+			.mask = ST_MAGN_2_ODR_MASK,
-+			.odr_avl = {
-+				{ 1, ST_MAGN_2_ODR_AVL_1HZ_VAL, },
-+				{ 2, ST_MAGN_2_ODR_AVL_2HZ_VAL, },
-+				{ 3, ST_MAGN_2_ODR_AVL_3HZ_VAL, },
-+				{ 5, ST_MAGN_2_ODR_AVL_5HZ_VAL, },
-+				{ 10, ST_MAGN_2_ODR_AVL_10HZ_VAL, },
-+				{ 20, ST_MAGN_2_ODR_AVL_20HZ_VAL, },
-+				{ 40, ST_MAGN_2_ODR_AVL_40HZ_VAL, },
-+				{ 80, ST_MAGN_2_ODR_AVL_80HZ_VAL, },
-+			},
-+		},
-+		.pw = {
-+			.addr = ST_MAGN_2_PW_ADDR,
-+			.mask = ST_MAGN_2_PW_MASK,
-+			.value_on = ST_MAGN_2_PW_ON,
-+			.value_off = ST_MAGN_2_PW_OFF,
-+		},
-+		.fs = {
-+			.addr = ST_MAGN_2_FS_ADDR,
-+			.mask = ST_MAGN_2_FS_MASK,
-+			.fs_avl = {
-+				[0] = {
-+					.num = ST_MAGN_FS_AVL_4000MG,
-+					.value = ST_MAGN_2_FS_AVL_4000_VAL,
-+					.gain = ST_MAGN_2_FS_AVL_4000_GAIN,
-+				},
-+				[1] = {
-+					.num = ST_MAGN_FS_AVL_8000MG,
-+					.value = ST_MAGN_2_FS_AVL_8000_VAL,
-+					.gain = ST_MAGN_2_FS_AVL_8000_GAIN,
-+				},
-+				[2] = {
-+					.num = ST_MAGN_FS_AVL_10000MG,
-+					.value = ST_MAGN_2_FS_AVL_10000_VAL,
-+					.gain = ST_MAGN_2_FS_AVL_10000_GAIN,
-+				},
-+			},
-+		},
-+		.multi_read_bit = ST_MAGN_2_MULTIREAD_BIT,
-+		.bootime = 2,
-+	},
-+};
-+
-+static int st_magn_read_raw(struct iio_dev *indio_dev,
-+			struct iio_chan_spec const *ch, int *val,
-+							int *val2, long mask)
-+{
-+	int err;
-+	struct st_sensor_data *mdata = iio_priv(indio_dev);
-+
-+	switch (mask) {
-+	case IIO_CHAN_INFO_RAW:
-+		err = st_sensors_read_info_raw(indio_dev, ch, val);
-+		if (err < 0)
-+			goto read_error;
-+
-+		return IIO_VAL_INT;
-+	case IIO_CHAN_INFO_SCALE:
-+		*val = 0;
-+		if ((ch->scan_index == ST_SENSORS_SCAN_Z) &&
-+					(mdata->current_fullscale->gain2 != 0))
-+			*val2 = mdata->current_fullscale->gain2;
-+		else
-+			*val2 = mdata->current_fullscale->gain;
-+		return IIO_VAL_INT_PLUS_MICRO;
-+	default:
-+		return -EINVAL;
-+	}
-+
-+read_error:
-+	return err;
-+}
-+
-+static int st_magn_write_raw(struct iio_dev *indio_dev,
-+		struct iio_chan_spec const *chan, int val, int val2, long mask)
-+{
-+	int err;
-+
-+	switch (mask) {
-+	case IIO_CHAN_INFO_SCALE:
-+		err = st_sensors_set_fullscale_by_gain(indio_dev, val2);
-+		break;
-+	default:
-+		err = -EINVAL;
-+	}
-+
-+	return err;
-+}
-+
-+static ST_SENSOR_DEV_ATTR_SAMP_FREQ();
-+static ST_SENSORS_DEV_ATTR_SAMP_FREQ_AVAIL();
-+static ST_SENSORS_DEV_ATTR_SCALE_AVAIL(in_magn_scale_available);
-+
-+static struct attribute *st_magn_attributes[] = {
-+	&iio_dev_attr_sampling_frequency_available.dev_attr.attr,
-+	&iio_dev_attr_in_magn_scale_available.dev_attr.attr,
-+	&iio_dev_attr_sampling_frequency.dev_attr.attr,
-+	NULL,
-+};
-+
-+static const struct attribute_group st_magn_attribute_group = {
-+	.attrs = st_magn_attributes,
-+};
-+
-+static const struct iio_info magn_info = {
-+	.driver_module = THIS_MODULE,
-+	.attrs = &st_magn_attribute_group,
-+	.read_raw = &st_magn_read_raw,
-+	.write_raw = &st_magn_write_raw,
-+};
-+
-+int st_magn_common_probe(struct iio_dev *indio_dev)
-+{
-+	int err;
-+	struct st_sensor_data *mdata = iio_priv(indio_dev);
-+
-+	indio_dev->modes = INDIO_DIRECT_MODE;
-+	indio_dev->info = &magn_info;
-+
-+	err = st_sensors_check_device_support(indio_dev,
-+				ARRAY_SIZE(st_magn_sensors), st_magn_sensors);
-+	if (err < 0)
-+		goto st_magn_common_probe_error;
-+
-+	mdata->multiread_bit = mdata->sensor->multi_read_bit;
-+	indio_dev->channels = mdata->sensor->ch;
-+	indio_dev->num_channels = ST_SENSORS_NUMBER_ALL_CHANNELS;
-+
-+	mdata->current_fullscale = (struct st_sensor_fullscale_avl *)
-+						&mdata->sensor->fs.fs_avl[0];
-+	mdata->odr = mdata->sensor->odr.odr_avl[0].hz;
-+
-+	err = st_sensors_init_sensor(indio_dev);
-+	if (err < 0)
-+		goto st_magn_common_probe_error;
-+
-+	if (mdata->get_irq_data_ready(indio_dev) > 0) {
-+		err = st_magn_allocate_ring(indio_dev);
-+		if (err < 0)
-+			goto st_magn_common_probe_error;
-+		err = st_sensors_allocate_trigger(indio_dev, NULL);
-+		if (err < 0)
-+			goto st_magn_probe_trigger_error;
-+	}
-+
-+	err = iio_device_register(indio_dev);
-+	if (err)
-+		goto st_magn_device_register_error;
-+
-+	return err;
-+
-+st_magn_device_register_error:
-+	if (mdata->get_irq_data_ready(indio_dev) > 0)
-+		st_sensors_deallocate_trigger(indio_dev);
-+st_magn_probe_trigger_error:
-+	if (mdata->get_irq_data_ready(indio_dev) > 0)
-+		st_magn_deallocate_ring(indio_dev);
-+st_magn_common_probe_error:
-+	return err;
-+}
-+EXPORT_SYMBOL(st_magn_common_probe);
-+
-+void st_magn_common_remove(struct iio_dev *indio_dev)
-+{
-+	struct st_sensor_data *mdata = iio_priv(indio_dev);
-+
-+	iio_device_unregister(indio_dev);
-+	if (mdata->get_irq_data_ready(indio_dev) > 0) {
-+		st_sensors_deallocate_trigger(indio_dev);
-+		st_magn_deallocate_ring(indio_dev);
-+	}
-+	iio_device_free(indio_dev);
-+}
-+EXPORT_SYMBOL(st_magn_common_remove);
-+
-+MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
-+MODULE_DESCRIPTION("STMicroelectronics magnetometers driver");
-+MODULE_LICENSE("GPL v2");
-diff --git a/drivers/iio/magnetometer/st_magn_i2c.c b/drivers/iio/magnetometer/st_magn_i2c.c
-new file mode 100644
-index 0000000..710b256a5
---- /dev/null
-+++ b/drivers/iio/magnetometer/st_magn_i2c.c
-@@ -0,0 +1,81 @@
-+/*
-+ * STMicroelectronics magnetometers driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/slab.h>
-+#include <linux/i2c.h>
-+#include <linux/iio/iio.h>
-+#include <linux/iio/trigger.h>
-+
-+#include <linux/iio/common/st_sensors.h>
-+#include <linux/iio/common/st_sensors_i2c.h>
-+#include "st_magn.h"
-+
-+static int st_magn_i2c_probe(struct i2c_client *client,
-+						const struct i2c_device_id *id)
-+{
-+	struct iio_dev *indio_dev;
-+	struct st_sensor_data *mdata;
-+	int err;
-+
-+	indio_dev = iio_device_alloc(sizeof(*mdata));
-+	if (indio_dev == NULL) {
-+		err = -ENOMEM;
-+		goto iio_device_alloc_error;
-+	}
-+
-+	mdata = iio_priv(indio_dev);
-+	mdata->dev = &client->dev;
-+
-+	st_sensors_i2c_configure(indio_dev, client, mdata);
-+
-+	err = st_magn_common_probe(indio_dev);
-+	if (err < 0)
-+		goto st_magn_common_probe_error;
-+
-+	return 0;
-+
-+st_magn_common_probe_error:
-+	iio_device_free(indio_dev);
-+iio_device_alloc_error:
-+	return err;
-+}
-+
-+static int st_magn_i2c_remove(struct i2c_client *client)
-+{
-+	struct iio_dev *indio_dev = i2c_get_clientdata(client);
-+	st_magn_common_remove(indio_dev);
-+
-+	return 0;
-+}
-+
-+static const struct i2c_device_id st_magn_id_table[] = {
-+	{ LSM303DLHC_MAGN_DEV_NAME },
-+	{ LSM303DLM_MAGN_DEV_NAME },
-+	{ LIS3MDL_MAGN_DEV_NAME },
-+	{},
-+};
-+MODULE_DEVICE_TABLE(i2c, st_magn_id_table);
-+
-+static struct i2c_driver st_magn_driver = {
-+	.driver = {
-+		.owner = THIS_MODULE,
-+		.name = "st-magn-i2c",
-+	},
-+	.probe = st_magn_i2c_probe,
-+	.remove = st_magn_i2c_remove,
-+	.id_table = st_magn_id_table,
-+};
-+module_i2c_driver(st_magn_driver);
-+
-+MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
-+MODULE_DESCRIPTION("STMicroelectronics magnetometers i2c driver");
-+MODULE_LICENSE("GPL v2");
-diff --git a/drivers/iio/magnetometer/st_magn_spi.c b/drivers/iio/magnetometer/st_magn_spi.c
-new file mode 100644
-index 0000000..94547e7
---- /dev/null
-+++ b/drivers/iio/magnetometer/st_magn_spi.c
-@@ -0,0 +1,80 @@
-+/*
-+ * STMicroelectronics magnetometers driver
-+ *
-+ * Copyright 2012-2013 STMicroelectronics Inc.
-+ *
-+ * Denis Ciocca <denis.ciocca@st.com>
-+ *
-+ * Licensed under the GPL-2.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/slab.h>
-+#include <linux/spi/spi.h>
-+#include <linux/iio/iio.h>
-+#include <linux/iio/trigger.h>
-+
-+#include <linux/iio/common/st_sensors.h>
-+#include <linux/iio/common/st_sensors_spi.h>
-+#include "st_magn.h"
-+
-+static int st_magn_spi_probe(struct spi_device *spi)
-+{
-+	struct iio_dev *indio_dev;
-+	struct st_sensor_data *mdata;
-+	int err;
-+
-+	indio_dev = iio_device_alloc(sizeof(*mdata));
-+	if (indio_dev == NULL) {
-+		err = -ENOMEM;
-+		goto iio_device_alloc_error;
-+	}
-+
-+	mdata = iio_priv(indio_dev);
-+	mdata->dev = &spi->dev;
-+
-+	st_sensors_spi_configure(indio_dev, spi, mdata);
-+
-+	err = st_magn_common_probe(indio_dev);
-+	if (err < 0)
-+		goto st_magn_common_probe_error;
-+
-+	return 0;
-+
-+st_magn_common_probe_error:
-+	iio_device_free(indio_dev);
-+iio_device_alloc_error:
-+	return err;
-+}
-+
-+static int st_magn_spi_remove(struct spi_device *spi)
-+{
-+	struct iio_dev *indio_dev = spi_get_drvdata(spi);
-+	st_magn_common_remove(indio_dev);
-+
-+	return 0;
-+}
-+
-+static const struct spi_device_id st_magn_id_table[] = {
-+	{ LSM303DLHC_MAGN_DEV_NAME },
-+	{ LSM303DLM_MAGN_DEV_NAME },
-+	{ LIS3MDL_MAGN_DEV_NAME },
-+	{},
-+};
-+MODULE_DEVICE_TABLE(spi, st_magn_id_table);
-+
-+static struct spi_driver st_magn_driver = {
-+	.driver = {
-+		.owner = THIS_MODULE,
-+		.name = "st-magn-spi",
-+	},
-+	.probe = st_magn_spi_probe,
-+	.remove = st_magn_spi_remove,
-+	.id_table = st_magn_id_table,
-+};
-+module_spi_driver(st_magn_driver);
-+
-+MODULE_AUTHOR("Denis Ciocca <denis.ciocca@st.com>");
-+MODULE_DESCRIPTION("STMicroelectronics magnetometers spi driver");
-+MODULE_LICENSE("GPL v2");
--- 
-1.8.1
-
diff --git a/patches/iio/0005-iio-magn-Add-sensors_supported-in-st_magn_sensors.patch b/patches/iio/0005-iio-magn-Add-sensors_supported-in-st_magn_sensors.patch
deleted file mode 100644
index 125c1181acce0d86945ec2a60f9d4c42d52cefbf..0000000000000000000000000000000000000000
--- a/patches/iio/0005-iio-magn-Add-sensors_supported-in-st_magn_sensors.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 2b53b4653414ffc2d480e35bc59af112a36ca2c1 Mon Sep 17 00:00:00 2001
-From: Denis Ciocca <denis.ciocca@st.com>
-Date: Tue, 29 Jan 2013 12:27:30 +0100
-Subject: [PATCH 5/6] iio:magn: Add sensors_supported in st_magn_sensors
-
-This patch add sensors_supported struct to st_magn_sensors. Without this the probe can't match the WhoAmI and sensor name.
----
- drivers/iio/magnetometer/st_magn_core.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c
-index 1dfcb41..a69fbe1 100644
---- a/drivers/iio/magnetometer/st_magn_core.c
-+++ b/drivers/iio/magnetometer/st_magn_core.c
-@@ -136,6 +136,10 @@ static const struct iio_chan_spec st_magn_2_16bit_channels[] = {
- static const struct st_sensors st_magn_sensors[] = {
- 	{
- 		.wai = ST_MAGN_1_WAI_EXP,
-+		.sensors_supported = {
-+			[0] = LSM303DLHC_MAGN_DEV_NAME,
-+			[1] = LSM303DLM_MAGN_DEV_NAME,
-+		},
- 		.ch = (struct iio_chan_spec *)st_magn_16bit_channels,
- 		.odr = {
- 			.addr = ST_MAGN_1_ODR_ADDR,
-@@ -210,6 +214,9 @@ static const struct st_sensors st_magn_sensors[] = {
- 	},
- 	{
- 		.wai = ST_MAGN_2_WAI_EXP,
-+		.sensors_supported = {
-+			[0] = LIS3MDL_MAGN_DEV_NAME,
-+		},
- 		.ch = (struct iio_chan_spec *)st_magn_2_16bit_channels,
- 		.odr = {
- 			.addr = ST_MAGN_2_ODR_ADDR,
--- 
-1.8.1
-
diff --git a/patches/iio/0006-pwm-pca9685-skeleton-i2c-client-driver-for-PCA9685-1.patch b/patches/iio/0006-pwm-pca9685-skeleton-i2c-client-driver-for-PCA9685-1.patch
deleted file mode 100644
index 304566fa1a33ec869ec470c2ab87aa0b2b19f5d1..0000000000000000000000000000000000000000
--- a/patches/iio/0006-pwm-pca9685-skeleton-i2c-client-driver-for-PCA9685-1.patch
+++ /dev/null
@@ -1,227 +0,0 @@
-From cf90c16580d661db17678224f281e42557781720 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Mon, 21 Jan 2013 12:47:26 +0100
-Subject: [PATCH 6/6] pwm-pca9685: skeleton i2c client driver for PCA9685 16
- channel PWM driver
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- drivers/pwm/Kconfig       |   10 +++
- drivers/pwm/Makefile      |    1 +
- drivers/pwm/pwm-pca9685.c |  171 +++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 182 insertions(+)
- create mode 100644 drivers/pwm/pwm-pca9685.c
-
-diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
-index 74f5084..299be03 100644
---- a/drivers/pwm/Kconfig
-+++ b/drivers/pwm/Kconfig
-@@ -85,6 +85,16 @@ config PWM_MXS
- 	  To compile this driver as a module, choose M here: the module
- 	  will be called pwm-mxs.
- 
-+config PWM_PCA9685
-+	tristate "NXP PCA9685 PWM support"
-+	depends on I2C
-+	help
-+	  Generic PWM framework driver for PCA9685. The PCA9685 has 16
-+	  PWM controller.
-+
-+	  To compile this driver as a module, choose M here: the module
-+	  will be called pca-9685.
-+
- config PWM_PUV3
- 	tristate "PKUnity NetBook-0916 PWM support"
- 	depends on ARCH_PUV3
-diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile
-index 8ddb432..92ec413 100644
---- a/drivers/pwm/Makefile
-+++ b/drivers/pwm/Makefile
-@@ -5,6 +5,7 @@ obj-$(CONFIG_PWM_IMX)		+= pwm-imx.o
- obj-$(CONFIG_PWM_JZ4740)	+= pwm-jz4740.o
- obj-$(CONFIG_PWM_LPC32XX)	+= pwm-lpc32xx.o
- obj-$(CONFIG_PWM_MXS)		+= pwm-mxs.o
-+obj-$(CONFIG_PWM_PCA9685)	+= pwm-pca9685.o
- obj-$(CONFIG_PWM_PUV3)		+= pwm-puv3.o
- obj-$(CONFIG_PWM_PXA)		+= pwm-pxa.o
- obj-$(CONFIG_PWM_SAMSUNG)	+= pwm-samsung.o
-diff --git a/drivers/pwm/pwm-pca9685.c b/drivers/pwm/pwm-pca9685.c
-new file mode 100644
-index 0000000..4dd1d85
---- /dev/null
-+++ b/drivers/pwm/pwm-pca9685.c
-@@ -0,0 +1,171 @@
-+/* drivers/pwm/pwm-pca9685.c
-+ *
-+ * Copyright (C) 2013 Koen Kooi
-+ *
-+ * This software is licensed under the terms of the GNU General Public
-+ * License version 2, as published by the Free Software Foundation, and
-+ * may be copied, distributed, and modified under those terms.
-+ *
-+ * This program is distributed in the hope that is will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABLILITY of FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU Genernal Public License for more details.
-+ *
-+ */
-+
-+
-+#include <linux/err.h>
-+#include <linux/slab.h>
-+#include <linux/pwm.h>
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/init.h>
-+#include <linux/i2c.h>
-+#include <linux/interrupt.h>
-+
-+
-+#define PCA9685_REG_PSC			0xFE
-+#define PCA9685_REG_LED_ON(led)		0x6 + (led >> 2)
-+#define PCA9685_REG_LED_OFF(led)	0x7 + (led >> 2)
-+
-+#define NUM_PWM_CHANNEL			16	/* PCA9685 channels */
-+
-+struct pca9685_pwm_chip {
-+	struct pwm_chip chip;
-+	unsigned long period_cycles[NUM_PWM_CHANNEL];
-+	enum pwm_polarity polarity[NUM_PWM_CHANNEL];
-+};
-+
-+struct pca9685_device {
-+	struct i2c_client *client;
-+	/* TODO */
-+};
-+
-+static int pca9685_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
-+		int duty_ns, int period_ns)
-+{
-+	pr_info("PWM config");
-+	return 0;
-+}
-+
-+static int pca9685_pwm_set_polarity(struct pwm_chip *chip, struct pwm_device *pwm,
-+		enum pwm_polarity polarity)
-+{
-+	pr_info("PWM set polarity");
-+	return 0;
-+}
-+
-+static int pca9685_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
-+{
-+	pr_info("PWM enable");
-+	return 0;
-+}
-+
-+static void pca9685_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
-+{
-+	pr_info("PWM disable");
-+}
-+
-+static void pca9685_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
-+{
-+	pr_info("PWM free");
-+	if (test_bit(PWMF_ENABLED, &pwm->flags)) {
-+		dev_warn(chip->dev, "Removing PWM device without disabling\n");
-+	}
-+}
-+
-+static const struct pwm_ops pca9685_pwm_ops = {
-+	.free		= pca9685_pwm_free,
-+	.config		= pca9685_pwm_config,
-+	.set_polarity	= pca9685_pwm_set_polarity,
-+	.enable		= pca9685_pwm_enable,
-+	.disable	= pca9685_pwm_disable,
-+	.owner		= THIS_MODULE,
-+};
-+
-+/* TODO */
-+
-+static int pca9685_probe(struct i2c_client *client,
-+		const struct i2c_device_id *id)
-+{
-+	struct pca9685_device *dev;
-+	struct pca9685_pwm_chip *pc;
-+	int ret;
-+
-+	if (!i2c_check_functionality(client->adapter,
-+		I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA |
-+		I2C_FUNC_SMBUS_I2C_BLOCK)) {
-+		printk(KERN_ERR "%s: needed i2c functionality is not supported\n", __func__);
-+		return -ENODEV;
-+	}
-+
-+	dev = kzalloc(sizeof(struct pca9685_device), GFP_KERNEL);
-+	if (dev == NULL) {
-+		printk(KERN_ERR "%s: no memory\n", __func__);
-+		return -ENOMEM;
-+	}
-+
-+	dev->client = client;
-+	i2c_set_clientdata(client, dev);
-+
-+	pc = kzalloc(sizeof(struct pca9685_pwm_chip), GFP_KERNEL);
-+	if (pc == NULL) {
-+		printk(KERN_ERR "%s: no memory\n", __func__);
-+		return -ENOMEM;
-+	}
-+
-+	pc->chip.dev = &client->dev;
-+	pc->chip.ops = &pca9685_pwm_ops;
-+	pc->chip.base = -1;
-+        pc->chip.npwm = 16;
-+
-+	ret = pwmchip_add(&pc->chip);
-+	if (ret < 0) {
-+	pr_err("pwm-pca9685: pwmchip_add() failed: %d\n", ret);
-+		return ret;
-+        }
-+
-+	return 0;
-+}
-+
-+static int pca9685_remove(struct i2c_client *client)
-+{
-+	struct pca9685_client *dev = i2c_get_clientdata(client);
-+
-+	/* TODO: do something */
-+
-+	kfree(dev);
-+	return 0;
-+}
-+
-+static const struct i2c_device_id pca9685_id[] = {
-+	{ "pwm-pca9685", 0 },
-+	{ }
-+};
-+
-+static struct i2c_driver pca9685_driver = {
-+	.probe    = pca9685_probe,
-+	.remove   = pca9685_remove,
-+	.id_table = pca9685_id,
-+	.driver   = {
-+		.name = "pca9685",
-+	},
-+};
-+
-+static int __init pca9685_init_driver(void)
-+{
-+	return i2c_add_driver(&pca9685_driver);
-+}
-+
-+static void __exit pca9685_exit_driver(void)
-+{
-+	i2c_del_driver(&pca9685_driver);
-+}
-+
-+module_init(pca9685_init_driver);
-+module_exit(pca9685_exit_driver);
-+
-+MODULE_AUTHOR("Koen Kooi <koen@dominion.thruhere.net>");
-+MODULE_DESCRIPTION("PCA9685 I2C 16 channel PWM driver");
-+MODULE_LICENSE("GPL");
--- 
-1.7.10.4
-
diff --git a/patches/imx/0001-ARM-imx-Enable-UART1-for-Sabrelite.patch b/patches/imx/0001-ARM-imx-Enable-UART1-for-Sabrelite.patch
new file mode 100644
index 0000000000000000000000000000000000000000..5f07cad7c8bb65d2cbcfd030eeb434d3a1ef1966
--- /dev/null
+++ b/patches/imx/0001-ARM-imx-Enable-UART1-for-Sabrelite.patch
@@ -0,0 +1,50 @@
+From 78b3d62be1a3093001f6042c9d3cd190d69923be Mon Sep 17 00:00:00 2001
+From: Brian Viele <viele@zee.aero>
+Date: Fri, 16 Nov 2012 21:40:46 -0800
+Subject: [PATCH 1/3] ARM: imx: Enable UART1 for Sabrelite
+
+This updates the device tree for the sabrelite to enable UART1 pads in the USDHC3 configuration
+
+Signed-off-by: Brian Viele <viele@zee.aero>
+---
+ arch/arm/boot/dts/imx6q-sabrelite.dts |    5 +++++
+ arch/arm/boot/dts/imx6q.dtsi          |    7 +++++++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts
+index d152328..daa2946 100644
+--- a/arch/arm/boot/dts/imx6q-sabrelite.dts
++++ b/arch/arm/boot/dts/imx6q-sabrelite.dts
+@@ -24,6 +24,11 @@
+ 	soc {
+ 		aips-bus@02000000 { /* AIPS1 */
+ 			spba-bus@02000000 {
++				uart1: serial@02020000 {
++					pinctrl-names = "default";
++					pinctrl-0 = <&pinctrl_uart1_2>;
++					status = "okay";
++				};
+ 				ecspi@02008000 { /* eCSPI1 */
+ 					fsl,spi-num-chipselects = <1>;
+ 					cs-gpios = <&gpio3 19 0>;
+diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi
+index d6265ca..7abd714 100644
+--- a/arch/arm/boot/dts/imx6q.dtsi
++++ b/arch/arm/boot/dts/imx6q.dtsi
+@@ -679,6 +679,13 @@
+ 							1148 0x1b0b1	/* MX6Q_PAD_CSI0_DAT11__UART1_RXD */
+ 						>;
+ 					};
++
++					pinctrl_uart1_2: uart1grp-2 {
++						fsl,pins = <
++							1250 0x1b0b1	/* MX6Q_PAD_SD3_DAT7__UART1_TXD   */
++							1242 0x1b0b1	/* MX6Q_PAD_SD3_DAT6__UART1_RXD   */
++						>;
++					};
+ 				};
+ 
+ 				uart2 {
+-- 
+1.7.10.4
+
diff --git a/patches/imx/0002-Add-IMX6Q-AHCI-support.patch b/patches/imx/0002-Add-IMX6Q-AHCI-support.patch
new file mode 100644
index 0000000000000000000000000000000000000000..55b1b1def2d2e6d5f014578a733941de9df3ba31
--- /dev/null
+++ b/patches/imx/0002-Add-IMX6Q-AHCI-support.patch
@@ -0,0 +1,123 @@
+From 9aa9fd657948a3418ca28b40e050e24d28d7637b Mon Sep 17 00:00:00 2001
+From: Allen Ibara <allen@zee.aero>
+Date: Tue, 4 Dec 2012 20:44:26 -0800
+Subject: [PATCH 2/3] Add IMX6Q AHCI support
+
+Adds device tree node and ahci_platform bits to make AHCI work on sabrelite IMX6Q board.
+
+Signed-off-by: Allen Ibara <allen@zee.aero>
+---
+ arch/arm/boot/dts/imx6q-sabrelite.dts |    5 +++++
+ arch/arm/boot/dts/imx6q.dtsi          |    8 ++++++++
+ drivers/ata/ahci_platform.c           |   28 +++++++++++++++++++++-------
+ 3 files changed, 34 insertions(+), 7 deletions(-)
+
+diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts
+index daa2946..3e0b188 100644
+--- a/arch/arm/boot/dts/imx6q-sabrelite.dts
++++ b/arch/arm/boot/dts/imx6q-sabrelite.dts
+@@ -136,6 +136,11 @@
+ 				};
+ 			};
+ 		};
++
++		ahci@0x02200000 { /* AHCI SATA */
++			status = "okay";
++		};
++
+ 	};
+ 
+ 	regulators {
+diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi
+index 7abd714..d7d2dca 100644
+--- a/arch/arm/boot/dts/imx6q.dtsi
++++ b/arch/arm/boot/dts/imx6q.dtsi
+@@ -1063,5 +1063,13 @@
+ 			clocks = <&clks 133>, <&clks 134>, <&clks 137>;
+ 			clock-names = "bus", "di0", "di1";
+ 		};
++
++		ahci@0x02200000 { /* AHCI SATA */
++			compatible = "fsl,imx6q-ahci";
++			reg = <0x02200000 0x4000>;
++			interrupts = <0 39 0x04>;
++			clocks = <&clks 154>;
++			status = "disabled";
++		};
+ 	};
+ };
+diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
+index 7a8a284..7d22da2 100644
+--- a/drivers/ata/ahci_platform.c
++++ b/drivers/ata/ahci_platform.c
+@@ -23,6 +23,9 @@
+ #include <linux/platform_device.h>
+ #include <linux/libata.h>
+ #include <linux/ahci_platform.h>
++#include <linux/of.h>
++#include <linux/of_device.h>
++#include <linux/of_gpio.h>
+ #include "ahci.h"
+ 
+ static void ahci_host_stop(struct ata_host *host);
+@@ -30,6 +33,7 @@ static void ahci_host_stop(struct ata_host *host);
+ enum ahci_type {
+ 	AHCI,		/* standard platform ahci */
+ 	IMX53_AHCI,	/* ahci on i.mx53 */
++	IMX6Q_AHCI,	/* ahci on i.mx6q */
+ 	STRICT_AHCI,	/* delayed DMA engine start */
+ };
+ 
+@@ -41,6 +45,10 @@ static struct platform_device_id ahci_devtype[] = {
+ 		.name = "imx53-ahci",
+ 		.driver_data = IMX53_AHCI,
+ 	}, {
++	}, {
++		.name = "imx6q-ahci",
++		.driver_data = IMX53_AHCI,
++	}, {
+ 		.name = "strict-ahci",
+ 		.driver_data = STRICT_AHCI,
+ 	}, {
+@@ -86,12 +94,24 @@ static struct scsi_host_template ahci_platform_sht = {
+ 	AHCI_SHT("ahci_platform"),
+ };
+ 
++static const struct of_device_id ahci_of_match[] = {
++	{ .compatible = "calxeda,hb-ahci",  .data = &ahci_devtype[AHCI],},
++	{ .compatible = "fsl,imx6q-ahci",   .data = &ahci_devtype[IMX6Q_AHCI],},
++	{ .compatible = "snps,spear-ahci", },
++	{},
++};
++MODULE_DEVICE_TABLE(of, ahci_of_match);
++
+ static int ahci_probe(struct platform_device *pdev)
+ {
+ 	struct device *dev = &pdev->dev;
+ 	struct ahci_platform_data *pdata = dev_get_platdata(dev);
++	const struct of_device_id *of_id =
++			of_match_device(ahci_of_match, &pdev->dev);
++	const struct platform_device_id	*id_entry = of_id->data;
+ 	const struct platform_device_id *id = platform_get_device_id(pdev);
+-	struct ata_port_info pi = ahci_port_info[id ? id->driver_data : 0];
++	struct ata_port_info pi = ahci_port_info[id ? id->driver_data : \
++		id_entry->driver_data];
+ 	const struct ata_port_info *ppi[] = { &pi, NULL };
+ 	struct ahci_host_priv *hpriv;
+ 	struct ata_host *host;
+@@ -325,12 +345,6 @@ disable_unprepare_clk:
+ 
+ static SIMPLE_DEV_PM_OPS(ahci_pm_ops, ahci_suspend, ahci_resume);
+ 
+-static const struct of_device_id ahci_of_match[] = {
+-	{ .compatible = "snps,spear-ahci", },
+-	{},
+-};
+-MODULE_DEVICE_TABLE(of, ahci_of_match);
+-
+ static struct platform_driver ahci_driver = {
+ 	.probe = ahci_probe,
+ 	.remove = ata_platform_remove_one,
+-- 
+1.7.10.4
+
diff --git a/patches/imx/0003-imx-Add-IMX53-AHCI-support.patch b/patches/imx/0003-imx-Add-IMX53-AHCI-support.patch
new file mode 100644
index 0000000000000000000000000000000000000000..ad677cb8d2961095b02a9589492b2f117fa40b14
--- /dev/null
+++ b/patches/imx/0003-imx-Add-IMX53-AHCI-support.patch
@@ -0,0 +1,62 @@
+From 3500484de72c05fa19592e6151826c59cafa373f Mon Sep 17 00:00:00 2001
+From: Robert Nelson <robertcnelson@gmail.com>
+Date: Tue, 22 Jan 2013 22:21:03 -0600
+Subject: [PATCH 3/3] imx: Add IMX53 AHCI support
+
+Adds device tree node and ahci_platform bits to make AHCI work on mx53 qsb board.
+
+Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
+---
+ arch/arm/boot/dts/imx53-qsb.dts |    4 ++++
+ arch/arm/boot/dts/imx53.dtsi    |    8 ++++++++
+ drivers/ata/ahci_platform.c     |    1 +
+ 3 files changed, 13 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx53-qsb.dts b/arch/arm/boot/dts/imx53-qsb.dts
+index b007553..2bda76a 100644
+--- a/arch/arm/boot/dts/imx53-qsb.dts
++++ b/arch/arm/boot/dts/imx53-qsb.dts
+@@ -213,6 +213,10 @@
+ 				status = "okay";
+ 			};
+ 		};
++
++		ahci@0x10000000 { /* AHCI SATA */
++			status = "okay";
++		};
+ 	};
+ 
+ 	gpio-keys {
+diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
+index edc3f1e..6646dc2 100644
+--- a/arch/arm/boot/dts/imx53.dtsi
++++ b/arch/arm/boot/dts/imx53.dtsi
+@@ -664,5 +664,13 @@
+ 				status = "disabled";
+ 			};
+ 		};
++
++		ahci@0x10000000 { /* AHCI SATA */
++			compatible = "fsl,imx53-ahci";
++			reg = <0x10000000 0x4000>;
++			interrupts = <28>;
++			clocks = <&clks 124>;
++			status = "disabled";
++		};
+ 	};
+ };
+diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
+index 7d22da2..ba162f8 100644
+--- a/drivers/ata/ahci_platform.c
++++ b/drivers/ata/ahci_platform.c
+@@ -96,6 +96,7 @@ static struct scsi_host_template ahci_platform_sht = {
+ 
+ static const struct of_device_id ahci_of_match[] = {
+ 	{ .compatible = "calxeda,hb-ahci",  .data = &ahci_devtype[AHCI],},
++	{ .compatible = "fsl,imx53-ahci",   .data = &ahci_devtype[IMX53_AHCI],},
+ 	{ .compatible = "fsl,imx6q-ahci",   .data = &ahci_devtype[IMX6Q_AHCI],},
+ 	{ .compatible = "snps,spear-ahci", },
+ 	{},
+-- 
+1.7.10.4
+
diff --git a/patches/imx/0004-cpufreq-add-imx6q-cpufreq-driver.patch b/patches/imx/0004-cpufreq-add-imx6q-cpufreq-driver.patch
new file mode 100644
index 0000000000000000000000000000000000000000..7ebc38f059e62a37392ab988899817513d42beab
--- /dev/null
+++ b/patches/imx/0004-cpufreq-add-imx6q-cpufreq-driver.patch
@@ -0,0 +1,398 @@
+From 03cb027b90d9b10dfd6ff45ea5f552bdc82897ca Mon Sep 17 00:00:00 2001
+From: Shawn Guo <shawn.guo@linaro.org>
+Date: Mon, 4 Feb 2013 13:46:29 +0800
+Subject: [PATCH 4/4] cpufreq: add imx6q-cpufreq driver
+
+Add an imx6q-cpufreq driver for Freescale i.MX6Q SoC to handle the
+hardware specific frequency and voltage scaling requirements.
+
+The driver supports module build and is instantiated by the platform
+device/driver mechanism, so that it will not be instantiated on other
+platforms, as IMX is built with multiplatform support.
+
+Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
+Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
+---
+ drivers/cpufreq/Kconfig.arm     |    9 ++
+ drivers/cpufreq/Makefile        |    1 +
+ drivers/cpufreq/imx6q-cpufreq.c |  336 +++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 346 insertions(+)
+ create mode 100644 drivers/cpufreq/imx6q-cpufreq.c
+
+diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
+index a0b3661..9e628ba 100644
+--- a/drivers/cpufreq/Kconfig.arm
++++ b/drivers/cpufreq/Kconfig.arm
+@@ -77,6 +77,15 @@ config ARM_EXYNOS5250_CPUFREQ
+ 	  This adds the CPUFreq driver for Samsung EXYNOS5250
+ 	  SoC.
+ 
++config ARM_IMX6Q_CPUFREQ
++	tristate "Freescale i.MX6Q cpufreq support"
++	depends on SOC_IMX6Q
++	depends on REGULATOR_ANATOP
++	help
++	  This adds cpufreq driver support for Freescale i.MX6Q SOC.
++
++	  If in doubt, say N.
++
+ config ARM_SPEAR_CPUFREQ
+ 	bool "SPEAr CPUFreq support"
+ 	depends on PLAT_SPEAR
+diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
+index fadc4d4..f71fef9 100644
+--- a/drivers/cpufreq/Makefile
++++ b/drivers/cpufreq/Makefile
+@@ -52,6 +52,7 @@ obj-$(CONFIG_ARM_EXYNOS4X12_CPUFREQ)	+= exynos4x12-cpufreq.o
+ obj-$(CONFIG_ARM_EXYNOS5250_CPUFREQ)	+= exynos5250-cpufreq.o
+ obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ)     += omap-cpufreq.o
+ obj-$(CONFIG_ARM_SPEAR_CPUFREQ)		+= spear-cpufreq.o
++obj-$(CONFIG_ARM_IMX6Q_CPUFREQ)		+= imx6q-cpufreq.o
+ 
+ ##################################################################################
+ # PowerPC platform drivers
+diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
+new file mode 100644
+index 0000000..d6b6ef3
+--- /dev/null
++++ b/drivers/cpufreq/imx6q-cpufreq.c
+@@ -0,0 +1,336 @@
++/*
++ * Copyright (C) 2013 Freescale Semiconductor, Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++#include <linux/clk.h>
++#include <linux/cpufreq.h>
++#include <linux/delay.h>
++#include <linux/err.h>
++#include <linux/module.h>
++#include <linux/of.h>
++#include <linux/opp.h>
++#include <linux/platform_device.h>
++#include <linux/regulator/consumer.h>
++
++#define PU_SOC_VOLTAGE_NORMAL	1250000
++#define PU_SOC_VOLTAGE_HIGH	1275000
++#define FREQ_1P2_GHZ		1200000000
++
++static struct regulator *arm_reg;
++static struct regulator *pu_reg;
++static struct regulator *soc_reg;
++
++static struct clk *arm_clk;
++static struct clk *pll1_sys_clk;
++static struct clk *pll1_sw_clk;
++static struct clk *step_clk;
++static struct clk *pll2_pfd2_396m_clk;
++
++static struct device *cpu_dev;
++static struct cpufreq_frequency_table *freq_table;
++static unsigned int transition_latency;
++
++static int imx6q_verify_speed(struct cpufreq_policy *policy)
++{
++	return cpufreq_frequency_table_verify(policy, freq_table);
++}
++
++static unsigned int imx6q_get_speed(unsigned int cpu)
++{
++	return clk_get_rate(arm_clk) / 1000;
++}
++
++static int imx6q_set_target(struct cpufreq_policy *policy,
++			    unsigned int target_freq, unsigned int relation)
++{
++	struct cpufreq_freqs freqs;
++	struct opp *opp;
++	unsigned long freq_hz, volt, volt_old;
++	unsigned int index, cpu;
++	int ret;
++
++	ret = cpufreq_frequency_table_target(policy, freq_table, target_freq,
++					     relation, &index);
++	if (ret) {
++		dev_err(cpu_dev, "failed to match target frequency %d: %d\n",
++			target_freq, ret);
++		return ret;
++	}
++
++	freqs.new = freq_table[index].frequency;
++	freq_hz = freqs.new * 1000;
++	freqs.old = clk_get_rate(arm_clk) / 1000;
++
++	if (freqs.old == freqs.new)
++		return 0;
++
++	for_each_online_cpu(cpu) {
++		freqs.cpu = cpu;
++		cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
++	}
++
++	rcu_read_lock();
++	opp = opp_find_freq_ceil(cpu_dev, &freq_hz);
++	if (IS_ERR(opp)) {
++		rcu_read_unlock();
++		dev_err(cpu_dev, "failed to find OPP for %ld\n", freq_hz);
++		return PTR_ERR(opp);
++	}
++
++	volt = opp_get_voltage(opp);
++	rcu_read_unlock();
++	volt_old = regulator_get_voltage(arm_reg);
++
++	dev_dbg(cpu_dev, "%u MHz, %ld mV --> %u MHz, %ld mV\n",
++		freqs.old / 1000, volt_old / 1000,
++		freqs.new / 1000, volt / 1000);
++
++	/* scaling up?  scale voltage before frequency */
++	if (freqs.new > freqs.old) {
++		ret = regulator_set_voltage_tol(arm_reg, volt, 0);
++		if (ret) {
++			dev_err(cpu_dev,
++				"failed to scale vddarm up: %d\n", ret);
++			return ret;
++		}
++
++		/*
++		 * Need to increase vddpu and vddsoc for safety
++		 * if we are about to run at 1.2 GHz.
++		 */
++		if (freqs.new == FREQ_1P2_GHZ / 1000) {
++			regulator_set_voltage_tol(pu_reg,
++					PU_SOC_VOLTAGE_HIGH, 0);
++			regulator_set_voltage_tol(soc_reg,
++					PU_SOC_VOLTAGE_HIGH, 0);
++		}
++	}
++
++	/*
++	 * The setpoints are selected per PLL/PDF frequencies, so we need to
++	 * reprogram PLL for frequency scaling.  The procedure of reprogramming
++	 * PLL1 is as below.
++	 *
++	 *  - Enable pll2_pfd2_396m_clk and reparent pll1_sw_clk to it
++	 *  - Reprogram pll1_sys_clk and reparent pll1_sw_clk back to it
++	 *  - Disable pll2_pfd2_396m_clk
++	 */
++	clk_prepare_enable(pll2_pfd2_396m_clk);
++	clk_set_parent(step_clk, pll2_pfd2_396m_clk);
++	clk_set_parent(pll1_sw_clk, step_clk);
++	if (freq_hz > clk_get_rate(pll2_pfd2_396m_clk)) {
++		clk_set_rate(pll1_sys_clk, freqs.new * 1000);
++		/*
++		 * If we are leaving 396 MHz set-point, we need to enable
++		 * pll1_sys_clk and disable pll2_pfd2_396m_clk to keep
++		 * their use count correct.
++		 */
++		if (freqs.old * 1000 <= clk_get_rate(pll2_pfd2_396m_clk)) {
++			clk_prepare_enable(pll1_sys_clk);
++			clk_disable_unprepare(pll2_pfd2_396m_clk);
++		}
++		clk_set_parent(pll1_sw_clk, pll1_sys_clk);
++		clk_disable_unprepare(pll2_pfd2_396m_clk);
++	} else {
++		/*
++		 * Disable pll1_sys_clk if pll2_pfd2_396m_clk is sufficient
++		 * to provide the frequency.
++		 */
++		clk_disable_unprepare(pll1_sys_clk);
++	}
++
++	/* Ensure the arm clock divider is what we expect */
++	ret = clk_set_rate(arm_clk, freqs.new * 1000);
++	if (ret) {
++		dev_err(cpu_dev, "failed to set clock rate: %d\n", ret);
++		regulator_set_voltage_tol(arm_reg, volt_old, 0);
++		return ret;
++	}
++
++	/* scaling down?  scale voltage after frequency */
++	if (freqs.new < freqs.old) {
++		ret = regulator_set_voltage_tol(arm_reg, volt, 0);
++		if (ret)
++			dev_warn(cpu_dev,
++				 "failed to scale vddarm down: %d\n", ret);
++
++		if (freqs.old == FREQ_1P2_GHZ / 1000) {
++			regulator_set_voltage_tol(pu_reg,
++					PU_SOC_VOLTAGE_NORMAL, 0);
++			regulator_set_voltage_tol(soc_reg,
++					PU_SOC_VOLTAGE_NORMAL, 0);
++		}
++	}
++
++	for_each_online_cpu(cpu) {
++		freqs.cpu = cpu;
++		cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
++	}
++
++	return 0;
++}
++
++static int imx6q_cpufreq_init(struct cpufreq_policy *policy)
++{
++	int ret;
++
++	ret = cpufreq_frequency_table_cpuinfo(policy, freq_table);
++	if (ret) {
++		dev_err(cpu_dev, "invalid frequency table: %d\n", ret);
++		return ret;
++	}
++
++	policy->cpuinfo.transition_latency = transition_latency;
++	policy->cur = clk_get_rate(arm_clk) / 1000;
++	cpumask_setall(policy->cpus);
++	cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
++
++	return 0;
++}
++
++static int imx6q_cpufreq_exit(struct cpufreq_policy *policy)
++{
++	cpufreq_frequency_table_put_attr(policy->cpu);
++	return 0;
++}
++
++static struct freq_attr *imx6q_cpufreq_attr[] = {
++	&cpufreq_freq_attr_scaling_available_freqs,
++	NULL,
++};
++
++static struct cpufreq_driver imx6q_cpufreq_driver = {
++	.verify = imx6q_verify_speed,
++	.target = imx6q_set_target,
++	.get = imx6q_get_speed,
++	.init = imx6q_cpufreq_init,
++	.exit = imx6q_cpufreq_exit,
++	.name = "imx6q-cpufreq",
++	.attr = imx6q_cpufreq_attr,
++};
++
++static int imx6q_cpufreq_probe(struct platform_device *pdev)
++{
++	struct device_node *np;
++	struct opp *opp;
++	unsigned long min_volt, max_volt;
++	int num, ret;
++
++	cpu_dev = &pdev->dev;
++
++	np = of_find_node_by_path("/cpus/cpu@0");
++	if (!np) {
++		dev_err(cpu_dev, "failed to find cpu0 node\n");
++		return -ENOENT;
++	}
++
++	cpu_dev->of_node = np;
++
++	arm_clk = devm_clk_get(cpu_dev, "arm");
++	pll1_sys_clk = devm_clk_get(cpu_dev, "pll1_sys");
++	pll1_sw_clk = devm_clk_get(cpu_dev, "pll1_sw");
++	step_clk = devm_clk_get(cpu_dev, "step");
++	pll2_pfd2_396m_clk = devm_clk_get(cpu_dev, "pll2_pfd2_396m");
++	if (IS_ERR(arm_clk) || IS_ERR(pll1_sys_clk) || IS_ERR(pll1_sw_clk) ||
++	    IS_ERR(step_clk) || IS_ERR(pll2_pfd2_396m_clk)) {
++		dev_err(cpu_dev, "failed to get clocks\n");
++		ret = -ENOENT;
++		goto put_node;
++	}
++
++	arm_reg = devm_regulator_get(cpu_dev, "arm");
++	pu_reg = devm_regulator_get(cpu_dev, "pu");
++	soc_reg = devm_regulator_get(cpu_dev, "soc");
++	if (!arm_reg || !pu_reg || !soc_reg) {
++		dev_err(cpu_dev, "failed to get regulators\n");
++		ret = -ENOENT;
++		goto put_node;
++	}
++
++	/* We expect an OPP table supplied by platform */
++	num = opp_get_opp_count(cpu_dev);
++	if (num < 0) {
++		ret = num;
++		dev_err(cpu_dev, "no OPP table is found: %d\n", ret);
++		goto put_node;
++	}
++
++	ret = opp_init_cpufreq_table(cpu_dev, &freq_table);
++	if (ret) {
++		dev_err(cpu_dev, "failed to init cpufreq table: %d\n", ret);
++		goto put_node;
++	}
++
++	if (of_property_read_u32(np, "clock-latency", &transition_latency))
++		transition_latency = CPUFREQ_ETERNAL;
++
++	/*
++	 * OPP is maintained in order of increasing frequency, and
++	 * freq_table initialised from OPP is therefore sorted in the
++	 * same order.
++	 */
++	rcu_read_lock();
++	opp = opp_find_freq_exact(cpu_dev,
++				  freq_table[0].frequency * 1000, true);
++	min_volt = opp_get_voltage(opp);
++	opp = opp_find_freq_exact(cpu_dev,
++				  freq_table[--num].frequency * 1000, true);
++	max_volt = opp_get_voltage(opp);
++	rcu_read_unlock();
++	ret = regulator_set_voltage_time(arm_reg, min_volt, max_volt);
++	if (ret > 0)
++		transition_latency += ret * 1000;
++
++	/* Count vddpu and vddsoc latency in for 1.2 GHz support */
++	if (freq_table[num].frequency == FREQ_1P2_GHZ / 1000) {
++		ret = regulator_set_voltage_time(pu_reg, PU_SOC_VOLTAGE_NORMAL,
++						 PU_SOC_VOLTAGE_HIGH);
++		if (ret > 0)
++			transition_latency += ret * 1000;
++		ret = regulator_set_voltage_time(soc_reg, PU_SOC_VOLTAGE_NORMAL,
++						 PU_SOC_VOLTAGE_HIGH);
++		if (ret > 0)
++			transition_latency += ret * 1000;
++	}
++
++	ret = cpufreq_register_driver(&imx6q_cpufreq_driver);
++	if (ret) {
++		dev_err(cpu_dev, "failed register driver: %d\n", ret);
++		goto free_freq_table;
++	}
++
++	of_node_put(np);
++	return 0;
++
++free_freq_table:
++	opp_free_cpufreq_table(cpu_dev, &freq_table);
++put_node:
++	of_node_put(np);
++	return ret;
++}
++
++static int imx6q_cpufreq_remove(struct platform_device *pdev)
++{
++	cpufreq_unregister_driver(&imx6q_cpufreq_driver);
++	opp_free_cpufreq_table(cpu_dev, &freq_table);
++
++	return 0;
++}
++
++static struct platform_driver imx6q_cpufreq_platdrv = {
++	.driver = {
++		.name	= "imx6q-cpufreq",
++		.owner	= THIS_MODULE,
++	},
++	.probe		= imx6q_cpufreq_probe,
++	.remove		= imx6q_cpufreq_remove,
++};
++module_platform_driver(imx6q_cpufreq_platdrv);
++
++MODULE_AUTHOR("Shawn Guo <shawn.guo@linaro.org>");
++MODULE_DESCRIPTION("Freescale i.MX6Q cpufreq driver");
++MODULE_LICENSE("GPL");
+-- 
+1.7.10.4
+
diff --git a/patches/imx/0005-SAUCE-imx6-enable-sata-clk-if-SATA_AHCI_PLATFORM.patch b/patches/imx/0005-SAUCE-imx6-enable-sata-clk-if-SATA_AHCI_PLATFORM.patch
new file mode 100644
index 0000000000000000000000000000000000000000..9d5599748cf6e8a10af1d730ccd07427246ba595
--- /dev/null
+++ b/patches/imx/0005-SAUCE-imx6-enable-sata-clk-if-SATA_AHCI_PLATFORM.patch
@@ -0,0 +1,33 @@
+From 0091972a616c0bdc655d3325a3bdbac5c10634b7 Mon Sep 17 00:00:00 2001
+From: Paolo Pisati <paolo.pisati@canonical.com>
+Date: Thu, 31 Jan 2013 18:33:46 +0100
+Subject: [PATCH 5/5] SAUCE: imx6: enable sata clk if SATA_AHCI_PLATFORM
+
+Clock modifications in 24d340ac "ARM i.MX6: Fix ethernet PLL clocks" broke the
+SATA clk, fix it.
+
+More info: http://www.spinics.net/lists/arm-kernel/msg221503.html
+
+Original-code-from: Shawn Guo <shawn.guo@linaro.org>
+Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
+---
+ arch/arm/mach-imx/clk-imx6q.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
+index c0c4e72..8f756af 100644
+--- a/arch/arm/mach-imx/clk-imx6q.c
++++ b/arch/arm/mach-imx/clk-imx6q.c
+@@ -436,6 +436,9 @@ int __init mx6q_clocks_init(void)
+ 	for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
+ 		clk_prepare_enable(clk[clks_init_on[i]]);
+ 
++	if (IS_ENABLED(CONFIG_SATA_AHCI_PLATFORM))
++		clk_prepare_enable(clk[sata_ref_100m]);
++
+ 	/* Set initial power mode */
+ 	imx6q_set_lpm(WAIT_CLOCKED);
+ 
+-- 
+1.7.10.4
+
diff --git a/patches/mmc/0001-am33xx.dtsi-enable-MMC-HSPE-bit-for-all-3-controller.patch b/patches/mmc/0001-am33xx.dtsi-enable-MMC-HSPE-bit-for-all-3-controller.patch
deleted file mode 100644
index 7f78449052966982442ea133f7c879b0b4028814..0000000000000000000000000000000000000000
--- a/patches/mmc/0001-am33xx.dtsi-enable-MMC-HSPE-bit-for-all-3-controller.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From f1254d3fd4db914f9e0fb16f560b2fea5f0a361b Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Thu, 18 Oct 2012 10:11:48 +0200
-Subject: [PATCH 1/3] am33xx.dtsi: enable MMC HSPE bit for all 3 controllers
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- arch/arm/boot/dts/am33xx.dtsi | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index c0d9c5b..0087b13 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -244,6 +244,7 @@
- 			ti,hwmods = "mmc1";
- 			ti,dual-volt;
- 			ti,needs-special-reset;
-+			ti,needs-special-hs-handling;
- 			dmas = <&edma 24
- 				&edma 25>;
- 			dma-names = "tx", "rx";
-@@ -254,6 +255,7 @@
- 			compatible = "ti,omap3-hsmmc";
- 			ti,hwmods = "mmc2";
- 			ti,needs-special-reset;
-+			ti,needs-special-hs-handling;
- 			dmas = <&edma 2
- 				&edma 3>;
- 			dma-names = "tx", "rx";
-@@ -264,6 +266,7 @@
- 			compatible = "ti,omap3-hsmmc";
- 			ti,hwmods = "mmc3";
- 			ti,needs-special-reset;
-+			ti,needs-special-hs-handling;
- 			status = "disabled";
- 		};
- 
--- 
-1.8.1
-
diff --git a/patches/mmc/0002-omap-hsmmc-Correct-usage-of-of_find_node_by_name.patch b/patches/mmc/0002-omap-hsmmc-Correct-usage-of-of_find_node_by_name.patch
deleted file mode 100644
index c83af2dffdad5e804a648af34cc8ada12ea0e447..0000000000000000000000000000000000000000
--- a/patches/mmc/0002-omap-hsmmc-Correct-usage-of-of_find_node_by_name.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From b1f2bb88c9f1fe3f1ef746346a889a28ecb949dc Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 26 Oct 2012 15:48:00 +0300
-Subject: [PATCH 2/3] omap-hsmmc: Correct usage of of_find_node_by_name
-
-of_find_node_by_name expect to have the parent node reference taken.
----
- drivers/mmc/host/omap_hsmmc.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
-index f74bd69..e30c1ee 100644
---- a/drivers/mmc/host/omap_hsmmc.c
-+++ b/drivers/mmc/host/omap_hsmmc.c
-@@ -1878,6 +1878,16 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
- 	 * as we want. */
- 	mmc->max_segs = 1024;
- 
-+	/* Eventually we should get our max_segs limitation for EDMA by
-+	 * querying the dmaengine API */
-+	if (pdev->dev.of_node) {
-+		struct device_node *parent = of_node_get(pdev->dev.of_node->parent);
-+		struct device_node *node;
-+		node = of_find_node_by_name(parent, "edma");
-+		if (node)
-+			mmc->max_segs = 16;
-+	}
-+
- 	mmc->max_blk_size = 512;       /* Block Length at max can be 1024 */
- 	mmc->max_blk_count = 0xFFFF;    /* No. of Blocks is 16 bits */
- 	mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;
--- 
-1.8.1
-
diff --git a/patches/mmc/0003-mmc-core-expose-RPMB-partition-only-for-CMD23-capabl.patch b/patches/mmc/0003-mmc-core-expose-RPMB-partition-only-for-CMD23-capabl.patch
deleted file mode 100644
index a058a17898ca8cd4af7b261726c11e176d2eb3e2..0000000000000000000000000000000000000000
--- a/patches/mmc/0003-mmc-core-expose-RPMB-partition-only-for-CMD23-capabl.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From b9b0311811cd11221d257fb0ac2edaa0ce1e6a5c Mon Sep 17 00:00:00 2001
-From: Balaji T K <balajitk@ti.com>
-Date: Fri, 25 Jan 2013 17:00:30 +0530
-Subject: [PATCH 3/3] mmc: core: expose RPMB partition only for CMD23 capable
- hosts
-
-SET_BLOCK_COUNT CMD23 is needed for all access to RPMB partition.  If
-block count is not set by CMD23, all subsequent read/write commands fail
-as per eMMC specification. So, If the host does not support CMD23, do not
-expose RPMB partition.
-
-Accessing RPMB partition can cause hang / huge delay for hosts which do
-not support CMD23.
-
-Signed-off-by: Balaji T K <balajitk@ti.com>
-Reported-and-Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
-Signed-off-by: Chris Ball <cjb@laptop.org>
----
- drivers/mmc/core/mmc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
-index e6e3911..089e8ea 100644
---- a/drivers/mmc/core/mmc.c
-+++ b/drivers/mmc/core/mmc.c
-@@ -496,7 +496,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
- 		 * RPMB regions are defined in multiples of 128K.
- 		 */
- 		card->ext_csd.raw_rpmb_size_mult = ext_csd[EXT_CSD_RPMB_MULT];
--		if (ext_csd[EXT_CSD_RPMB_MULT]) {
-+		if (ext_csd[EXT_CSD_RPMB_MULT] && mmc_host_cmd23(card->host)) {
- 			mmc_part_add(card, ext_csd[EXT_CSD_RPMB_MULT] << 17,
- 				EXT_CSD_PART_CONFIG_ACC_RPMB,
- 				"rpmb", 0, false,
--- 
-1.8.1
-
diff --git a/patches/net/0001-am33xx-cpsw-default-to-ethernet-hwaddr-from-efuse-if.patch b/patches/net/0001-am33xx-cpsw-default-to-ethernet-hwaddr-from-efuse-if.patch
deleted file mode 100644
index bde1b885b8b4847a6915195133df85652d473173..0000000000000000000000000000000000000000
--- a/patches/net/0001-am33xx-cpsw-default-to-ethernet-hwaddr-from-efuse-if.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-From 49329e500962b173d6b9c63297b234f4e9382d26 Mon Sep 17 00:00:00 2001
-From: Peter Korsgaard <jacmet@sunsite.dk>
-Date: Wed, 16 Jan 2013 21:01:13 +0000
-Subject: [PATCH 1/2] am33xx: cpsw: default to ethernet hwaddr from efuse if
- not defined in dt
-
-When booting with CONFIG_ARM_APPENDED_DTB (either because of using an old
-U-Boot, not wanting the hassle of 2 files or when using Falcon fast boot
-mode in U-Boot), nothing updates the ethernet hwaddr specified for the
-CPSW slaves, causing the driver to use a random hwaddr, which is some times
-troublesome.
-
-The am33xx has unique ethernet hwaddrs programmed in the efuse, so it makes
-more sense to default to these rather than random ones. Add a fixup step
-which adds mac-address dt properties using the efuse addresses if the DTB
-didn't contain valid ones.
-
-Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
----
- arch/arm/mach-omap2/Makefile      |  3 ++
- arch/arm/mach-omap2/am33xx-cpsw.c | 94 +++++++++++++++++++++++++++++++++++++++
- arch/arm/mach-omap2/control.h     |  4 ++
- 3 files changed, 101 insertions(+)
- create mode 100644 arch/arm/mach-omap2/am33xx-cpsw.c
-
-diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
-index 947cafe..6cde196 100644
---- a/arch/arm/mach-omap2/Makefile
-+++ b/arch/arm/mach-omap2/Makefile
-@@ -295,4 +295,7 @@ endif
- emac-$(CONFIG_TI_DAVINCI_EMAC)		:= am35xx-emac.o
- obj-y					+= $(emac-m) $(emac-y)
- 
-+cpsw-$(CONFIG_TI_CPSW)			:= am33xx-cpsw.o
-+obj-y					+= $(cpsw-m) $(cpsw-y)
-+
- obj-y					+= common-board-devices.o twl-common.o dss-common.o
-diff --git a/arch/arm/mach-omap2/am33xx-cpsw.c b/arch/arm/mach-omap2/am33xx-cpsw.c
-new file mode 100644
-index 0000000..5a674d9
---- /dev/null
-+++ b/arch/arm/mach-omap2/am33xx-cpsw.c
-@@ -0,0 +1,94 @@
-+/*
-+ * am335x specific cpsw dt fixups
-+ *
-+ * 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/kernel.h>
-+#include <linux/init.h>
-+#include <linux/etherdevice.h>
-+#include <linux/of.h>
-+#include <linux/of_net.h>
-+
-+#include "soc.h"
-+#include "control.h"
-+
-+/**
-+ * am33xx_dt_cpsw_set_mac_from_efuse - Add mac-address property using
-+ * ethernet hwaddr from efuse
-+ * @np:		Pointer to the cpsw slave to set mac address of
-+ * @idx:	Mac address index to use from efuse
-+ */
-+static void am33xx_dt_cpsw_set_mac_from_efuse(struct device_node *np, int idx)
-+{
-+	struct property *prop;
-+	u32 lo, hi;
-+	u8 *mac;
-+
-+	switch (idx) {
-+	case 0:
-+		lo = omap_ctrl_readl(AM33XX_CONTROL_MAC_ID0_LOW);
-+		hi = omap_ctrl_readl(AM33XX_CONTROL_MAC_ID0_HIGH);
-+		break;
-+
-+	case 1:
-+		lo = omap_ctrl_readl(AM33XX_CONTROL_MAC_ID1_LOW);
-+		hi = omap_ctrl_readl(AM33XX_CONTROL_MAC_ID1_HIGH);
-+		break;
-+
-+	default:
-+		pr_err("cpsw.%d: too many slaves found\n", idx);
-+		return;
-+	}
-+
-+	prop = kzalloc(sizeof(*prop) + ETH_ALEN, GFP_KERNEL);
-+	if (!prop)
-+		return;
-+
-+	prop->value = prop + 1;
-+	prop->length = ETH_ALEN;
-+	prop->name = kstrdup("mac-address", GFP_KERNEL);
-+	if (!prop->name) {
-+		kfree(prop);
-+		return;
-+	}
-+
-+	mac = prop->value;
-+
-+	mac[0] = hi;
-+	mac[1] = hi >> 8;
-+	mac[2] = hi >> 16;
-+	mac[3] = hi >> 24;
-+	mac[4] = lo;
-+	mac[5] = lo >> 8;
-+
-+	of_update_property(np, prop);
-+
-+	pr_info("cpsw.%d: No hwaddr in dt. Using %pM from efuse\n", idx, mac);
-+}
-+
-+static int __init am33xx_dt_cpsw_mac_fixup(void)
-+{
-+	struct device_node *np, *slave;
-+	int idx = 0;
-+
-+	if (!soc_is_am33xx())
-+		return -ENODEV;
-+
-+	for_each_compatible_node(np, NULL, "ti,cpsw")
-+		for_each_node_by_name(slave, "slave") {
-+			if (!of_get_mac_address(slave))
-+				am33xx_dt_cpsw_set_mac_from_efuse(slave, idx);
-+			idx++;
-+		}
-+
-+	return 0;
-+}
-+arch_initcall(am33xx_dt_cpsw_mac_fixup);
-diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
-index e6c3281..266d512 100644
---- a/arch/arm/mach-omap2/control.h
-+++ b/arch/arm/mach-omap2/control.h
-@@ -352,6 +352,10 @@
- /* AM33XX CONTROL_STATUS register */
- #define AM33XX_CONTROL_STATUS		0x040
- #define AM33XX_CONTROL_SEC_CLK_CTRL	0x1bc
-+#define AM33XX_CONTROL_MAC_ID0_LOW	0x630
-+#define AM33XX_CONTROL_MAC_ID0_HIGH	0x634
-+#define AM33XX_CONTROL_MAC_ID1_LOW	0x638
-+#define AM33XX_CONTROL_MAC_ID1_HIGH	0x63c
- 
- /* AM33XX CONTROL_STATUS bitfields (partial) */
- #define AM33XX_CONTROL_STATUS_SYSBOOT1_SHIFT		22
--- 
-1.8.1
-
diff --git a/patches/net/0002-Attempted-SMC911x-BQL-patch.patch b/patches/net/0002-Attempted-SMC911x-BQL-patch.patch
deleted file mode 100644
index 800a8ca77be1ad03d0fae2d65802a219bfddf811..0000000000000000000000000000000000000000
--- a/patches/net/0002-Attempted-SMC911x-BQL-patch.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 11987f7eef9c6b68bba58665fe66591be0b1c2c8 Mon Sep 17 00:00:00 2001
-From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
-Date: Thu, 29 Nov 2012 11:17:05 +0100
-Subject: [PATCH 2/2] Attempted SMC911x BQL patch
-
-First attempt at BQL on smsc911x.
-
-Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
----
- drivers/net/ethernet/smsc/smsc911x.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
-index e112877..8907fde 100644
---- a/drivers/net/ethernet/smsc/smsc911x.c
-+++ b/drivers/net/ethernet/smsc/smsc911x.c
-@@ -1107,6 +1107,7 @@ static void smsc911x_tx_update_txcounters(struct net_device *dev)
- {
- 	struct smsc911x_data *pdata = netdev_priv(dev);
- 	unsigned int tx_stat;
-+	unsigned int bytes_compl = 0, pkts_compl = 0;
- 
- 	while ((tx_stat = smsc911x_tx_get_txstatus(pdata)) != 0) {
- 		if (unlikely(tx_stat & 0x80000000)) {
-@@ -1124,6 +1125,8 @@ static void smsc911x_tx_update_txcounters(struct net_device *dev)
- 			} else {
- 				dev->stats.tx_packets++;
- 				dev->stats.tx_bytes += (tx_stat >> 16);
-+				pkts_compl++;
-+				bytes_compl += (tx_stat >> 16);
- 			}
- 			if (unlikely(tx_stat & TX_STS_EXCESS_COL_)) {
- 				dev->stats.collisions += 16;
-@@ -1140,6 +1143,7 @@ static void smsc911x_tx_update_txcounters(struct net_device *dev)
- 			}
- 		}
- 	}
-+	netdev_completed_queue(dev, pkts_compl, bytes_compl);
- }
- 
- /* Increments the Rx error counters */
-@@ -1602,6 +1606,7 @@ static int smsc911x_stop(struct net_device *dev)
- 	/* At this point all Rx and Tx activity is stopped */
- 	dev->stats.rx_dropped += smsc911x_reg_read(pdata, RX_DROP);
- 	smsc911x_tx_update_txcounters(dev);
-+	netdev_reset_queue(dev);
- 
- 	/* Bring the PHY down */
- 	if (pdata->phy_dev)
-@@ -1645,6 +1650,7 @@ static int smsc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
- 	wrsz >>= 2;
- 
- 	pdata->ops->tx_writefifo(pdata, (unsigned int *)bufp, wrsz);
-+	netdev_sent_queue(dev, skb->len);
- 	freespace -= (skb->len + 32);
- 	skb_tx_timestamp(skb);
- 	dev_kfree_skb(skb);
--- 
-1.8.1
-
diff --git a/patches/net/0003-cpsw-Fix-interrupt-storm-among-other-things.patch b/patches/net/0003-cpsw-Fix-interrupt-storm-among-other-things.patch
deleted file mode 100644
index a69c9932b062fbd8bb009f8f135f134af3ab6513..0000000000000000000000000000000000000000
--- a/patches/net/0003-cpsw-Fix-interrupt-storm-among-other-things.patch
+++ /dev/null
@@ -1,423 +0,0 @@
-From 7b94d91b85cdab3eab89e3179c16d0541673d9f0 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Thu, 17 Jan 2013 20:18:32 +0200
-Subject: [PATCH 3/3] cpsw: Fix interrupt storm among other things
-
-Fix interrupt storm on bone A4 cause by non-by-the-book interrupt handling.
-While at it, added a non-NAPI mode (which is easier to debug), plus
-some general fixes.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- Documentation/devicetree/bindings/net/cpsw.txt |    1 +
- drivers/net/ethernet/ti/cpsw.c                 |  222 ++++++++++++++++++++----
- drivers/net/ethernet/ti/davinci_cpdma.c        |    4 +-
- drivers/net/ethernet/ti/davinci_cpdma.h        |    2 +-
- include/linux/platform_data/cpsw.h             |    1 +
- 5 files changed, 194 insertions(+), 36 deletions(-)
-
-diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt
-index 6ddd028..d46b293 100644
---- a/Documentation/devicetree/bindings/net/cpsw.txt
-+++ b/Documentation/devicetree/bindings/net/cpsw.txt
-@@ -20,6 +20,7 @@ Required properties:
- - cpts_clock_shift	: Denominator to convert input clock ticks into nanoseconds
- - phy_id		: Specifies slave phy id
- - mac-address		: Specifies slave MAC address
-+- disable-napi		: Disables driver NAPI
- 
- Optional properties:
- - ti,hwmods		: Must be "cpgmac0"
-diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
-index 40aff68..b6ca4af 100644
---- a/drivers/net/ethernet/ti/cpsw.c
-+++ b/drivers/net/ethernet/ti/cpsw.c
-@@ -148,10 +148,37 @@ struct cpsw_wr_regs {
- 	u32	soft_reset;
- 	u32	control;
- 	u32	int_control;
--	u32	rx_thresh_en;
--	u32	rx_en;
--	u32	tx_en;
--	u32	misc_en;
-+	u32	c0_rx_thresh_en;
-+	u32	c0_rx_en;
-+	u32	c0_tx_en;
-+	u32	c0_misc_en;
-+	u32	c1_rx_thresh_en;
-+	u32	c1_rx_en;
-+	u32	c1_tx_en;
-+	u32	c1_misc_en;
-+	u32	c2_rx_thresh_en;
-+	u32	c2_rx_en;
-+	u32	c2_tx_en;
-+	u32	c2_misc_en;
-+	u32	c0_rx_thresh_stat;
-+	u32	c0_rx_stat;
-+	u32	c0_tx_stat;
-+	u32	c0_misc_stat;
-+	u32	c1_rx_thresh_stat;
-+	u32	c1_rx_stat;
-+	u32	c1_tx_stat;
-+	u32	c1_misc_stat;
-+	u32	c2_rx_thresh_stat;
-+	u32	c2_rx_stat;
-+	u32	c2_tx_stat;
-+	u32	c2_misc_stat;
-+	u32	c0_rx_imax;
-+	u32	c0_tx_imax;
-+	u32	c1_rx_imax;
-+	u32	c1_tx_imax;
-+	u32	c2_rx_imax;
-+	u32	c2_tx_imax;
-+	u32	rgmii_ctl;
- };
- 
- struct cpsw_ss_regs {
-@@ -352,8 +379,8 @@ static void cpsw_ndo_set_rx_mode(struct net_device *ndev)
- 
- static void cpsw_intr_enable(struct cpsw_priv *priv)
- {
--	__raw_writel(0xFF, &priv->wr_regs->tx_en);
--	__raw_writel(0xFF, &priv->wr_regs->rx_en);
-+	__raw_writel(0xFF, &priv->wr_regs->c0_tx_en);
-+	__raw_writel(0xFF, &priv->wr_regs->c0_rx_en);
- 
- 	cpdma_ctlr_int_ctrl(priv->dma, true);
- 	return;
-@@ -361,8 +388,8 @@ static void cpsw_intr_enable(struct cpsw_priv *priv)
- 
- static void cpsw_intr_disable(struct cpsw_priv *priv)
- {
--	__raw_writel(0, &priv->wr_regs->tx_en);
--	__raw_writel(0, &priv->wr_regs->rx_en);
-+	__raw_writel(0, &priv->wr_regs->c0_tx_en);
-+	__raw_writel(0, &priv->wr_regs->c0_rx_en);
- 
- 	cpdma_ctlr_int_ctrl(priv->dma, false);
- 	return;
-@@ -399,7 +426,10 @@ void cpsw_rx_handler(void *token, int len, int status)
- 		skb_put(skb, len);
- 		cpts_rx_timestamp(&priv->cpts, skb);
- 		skb->protocol = eth_type_trans(skb, ndev);
--		netif_receive_skb(skb);
-+		if (priv->data.disable_napi)
-+			netif_rx(skb);
-+		else
-+			netif_receive_skb(skb);
- 		priv->stats.rx_bytes += len;
- 		priv->stats.rx_packets++;
- 		skb = NULL;
-@@ -431,6 +461,7 @@ static irqreturn_t cpsw_interrupt(int irq, void *dev_id)
- 		cpsw_disable_irq(priv);
- 		napi_schedule(&priv->napi);
- 	}
-+
- 	return IRQ_HANDLED;
- }
- 
-@@ -445,23 +476,104 @@ static inline int cpsw_get_slave_port(struct cpsw_priv *priv, u32 slave_num)
- static int cpsw_poll(struct napi_struct *napi, int budget)
- {
- 	struct cpsw_priv	*priv = napi_to_priv(napi);
--	int			num_tx, num_rx;
-+	int			num_tx, num_rx, num_total_tx, num_total_rx;
-+	int			budget_left;
-+
-+	budget_left = budget;
- 
--	num_tx = cpdma_chan_process(priv->txch, 128);
--	num_rx = cpdma_chan_process(priv->rxch, budget);
-+	/* read status and throw away */
-+	(void)__raw_readl(&priv->wr_regs->c0_tx_stat);
-+
-+	/* handle all transmits */
-+	num_total_tx = 0;
-+	while (budget_left > 0 &&
-+		(num_tx = cpdma_chan_process(priv->txch, 128)) > 0) {
-+		budget_left -= num_tx;
-+		num_total_tx += num_tx;
-+	}
- 
--	if (num_rx || num_tx)
--		cpsw_dbg(priv, intr, "poll %d rx, %d tx pkts\n",
--			 num_rx, num_tx);
-+	if (num_total_tx > 0 && budget_left > 0)
-+		cpdma_ctlr_eoi(priv->dma, 0x02);
-+
-+	/* read status and throw away */
-+	(void)__raw_readl(&priv->wr_regs->c0_rx_stat);
-+
-+	/* handle all receives */
-+	num_total_rx = 0;
-+	while (budget_left > 0 &&
-+		(num_rx = cpdma_chan_process(priv->rxch, budget_left)) > 0) {
-+		budget_left -= num_rx;
-+		num_total_rx += num_rx;
-+	}
- 
--	if (num_rx < budget) {
-+	if (num_total_rx > 0 && budget_left > 0)
-+		cpdma_ctlr_eoi(priv->dma, 0x01);
-+
-+	if ((num_total_rx + num_total_tx) < budget) {
- 		napi_complete(napi);
- 		cpsw_intr_enable(priv);
--		cpdma_ctlr_eoi(priv->dma);
- 		cpsw_enable_irq(priv);
- 	}
- 
--	return num_rx;
-+	return num_total_rx + num_total_rx;
-+}
-+
-+static irqreturn_t cpsw_rx_thresh_pend_irq(int irq, void *dev_id)
-+{
-+	struct cpsw_priv *priv = dev_id;
-+
-+	(void)priv;
-+
-+	/* not handling this interrupt yet */
-+	return IRQ_HANDLED;
-+}
-+
-+static irqreturn_t cpsw_rx_pend_irq(int irq, void *dev_id)
-+{
-+	struct cpsw_priv *priv = dev_id;
-+	int num_rx, total_rx;
-+	u32 rx_stat;
-+
-+	rx_stat = __raw_readl(&priv->wr_regs->c0_rx_stat) & 0xff;
-+	if (rx_stat == 0)
-+		return IRQ_NONE;
-+
-+	total_rx = 0;
-+	while ((num_rx = cpdma_chan_process(priv->rxch,
-+					priv->data.rx_descs)) > 0)
-+		total_rx += num_rx;
-+
-+	cpdma_ctlr_eoi(priv->dma, 0x01);
-+
-+	return IRQ_HANDLED;
-+}
-+
-+static irqreturn_t cpsw_tx_pend_irq(int irq, void *dev_id)
-+{
-+	struct cpsw_priv *priv = dev_id;
-+	int num_tx, total_tx;
-+	u32 tx_stat;
-+
-+	tx_stat = __raw_readl(&priv->wr_regs->c0_tx_stat) & 0xff;
-+	if (tx_stat == 0)
-+		return IRQ_NONE;
-+
-+	total_tx = 0;
-+	while ((num_tx = cpdma_chan_process(priv->txch, 128)) > 0)
-+		total_tx += num_tx;
-+
-+	cpdma_ctlr_eoi(priv->dma, 0x02);
-+
-+	return IRQ_HANDLED;
-+}
-+
-+static irqreturn_t cpsw_misc_pend_irq(int irq, void *dev_id)
-+{
-+	struct cpsw_priv *priv = dev_id;
-+
-+	(void)priv;
-+	/* not handling this interrupt yet */
-+	return IRQ_HANDLED;
- }
- 
- static inline void soft_reset(const char *module, void __iomem *reg)
-@@ -678,8 +790,10 @@ static int cpsw_ndo_open(struct net_device *ndev)
- 
- 	cpdma_ctlr_start(priv->dma);
- 	cpsw_intr_enable(priv);
--	napi_enable(&priv->napi);
--	cpdma_ctlr_eoi(priv->dma);
-+	if (!priv->data.disable_napi)
-+		napi_enable(&priv->napi);
-+	cpdma_ctlr_eoi(priv->dma, 0x01);
-+	cpdma_ctlr_eoi(priv->dma, 0x02);
- 
- 	return 0;
- }
-@@ -698,8 +812,10 @@ static int cpsw_ndo_stop(struct net_device *ndev)
- 	struct cpsw_priv *priv = netdev_priv(ndev);
- 
- 	cpsw_info(priv, ifdown, "shutting down cpsw device\n");
-+	cpsw_disable_irq(priv);
- 	netif_stop_queue(priv->ndev);
--	napi_disable(&priv->napi);
-+	if (!priv->data.disable_napi)
-+		napi_disable(&priv->napi);
- 	netif_carrier_off(priv->ndev);
- 	cpsw_intr_disable(priv);
- 	cpdma_ctlr_int_ctrl(priv->dma, false);
-@@ -901,7 +1017,8 @@ static void cpsw_ndo_tx_timeout(struct net_device *ndev)
- 	cpdma_chan_start(priv->txch);
- 	cpdma_ctlr_int_ctrl(priv->dma, true);
- 	cpsw_intr_enable(priv);
--	cpdma_ctlr_eoi(priv->dma);
-+	cpdma_ctlr_eoi(priv->dma, 0x01);
-+	cpdma_ctlr_eoi(priv->dma, 0x02);
- }
- 
- static struct net_device_stats *cpsw_ndo_get_stats(struct net_device *ndev)
-@@ -917,14 +1034,21 @@ static void cpsw_ndo_poll_controller(struct net_device *ndev)
- 
- 	cpsw_intr_disable(priv);
- 	cpdma_ctlr_int_ctrl(priv->dma, false);
--	cpsw_interrupt(ndev->irq, priv);
-+	if (!priv->data.disable_napi)
-+		cpsw_interrupt(ndev->irq, priv);
-+	else {
-+		/* bah! */
-+		cpsw_rx_pend_irq(ndev->irq, priv);
-+		cpsw_tx_pend_irq(ndev->irq, priv);
-+	}
- 	cpdma_ctlr_int_ctrl(priv->dma, true);
- 	cpsw_intr_enable(priv);
--	cpdma_ctlr_eoi(priv->dma);
-+	cpdma_ctlr_eoi(priv->dma, 0x01);
-+	cpdma_ctlr_eoi(priv->dma, 0x02);
- }
- #endif
- 
--static const struct net_device_ops cpsw_netdev_ops = {
-+static struct net_device_ops cpsw_netdev_ops = {
- 	.ndo_open		= cpsw_ndo_open,
- 	.ndo_stop		= cpsw_ndo_stop,
- 	.ndo_start_xmit		= cpsw_ndo_start_xmit,
-@@ -1079,6 +1203,9 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
- 	}
- 	data->bd_ram_size = prop;
- 
-+	if (of_property_read_bool(node, "disable-napi"))
-+		data->disable_napi = 1;
-+
- 	if (of_property_read_u32(node, "rx_descs", &prop)) {
- 		pr_err("Missing rx_descs property in the DT.\n");
- 		ret = -EINVAL;
-@@ -1136,6 +1263,22 @@ error_ret:
- 	return ret;
- }
- 
-+static irq_handler_t cpsw_get_irq_handler(struct cpsw_priv *priv, int irq_idx)
-+{
-+	static const irq_handler_t non_napi_irq_tab[4] = {
-+		cpsw_rx_thresh_pend_irq, cpsw_rx_pend_irq,
-+		cpsw_tx_pend_irq, cpsw_misc_pend_irq
-+	};
-+
-+	if ((unsigned int)irq_idx >= 4)
-+		return NULL;
-+
-+	if (!priv->data.disable_napi)
-+		return cpsw_interrupt;
-+
-+	return non_napi_irq_tab[irq_idx];
-+}
-+
- static int cpsw_probe(struct platform_device *pdev)
- {
- 	struct cpsw_platform_data	*data = pdev->dev.platform_data;
-@@ -1146,7 +1289,8 @@ static int cpsw_probe(struct platform_device *pdev)
- 	void __iomem			*ss_regs, *wr_regs;
- 	struct resource			*res;
- 	u32 slave_offset, sliver_offset, slave_size;
--	int ret = 0, i, k = 0;
-+	irq_handler_t			irqh;
-+	int ret = 0, i, j, k = 0;
- 
- 	ndev = alloc_etherdev(sizeof(struct cpsw_priv));
- 	if (!ndev) {
-@@ -1333,24 +1477,36 @@ static int cpsw_probe(struct platform_device *pdev)
- 		goto clean_ale_ret;
- 	}
- 
--	while ((res = platform_get_resource(priv->pdev, IORESOURCE_IRQ, k))) {
--		for (i = res->start; i <= res->end; i++) {
--			if (request_irq(i, cpsw_interrupt, IRQF_DISABLED,
-+	dev_info(&pdev->dev, "NAPI %s\n", priv->data.disable_napi ?
-+			"disabled" : "enabled");
-+
-+	/* get interrupts */
-+	j = k = 0;
-+	while ((res = platform_get_resource(pdev, IORESOURCE_IRQ, j++))) {
-+		for (i = res->start; k < 4 && i <= res->end; i++) {
-+			irqh = cpsw_get_irq_handler(priv, k);
-+			if (irqh == NULL) {
-+				dev_err(&pdev->dev, "Unable to get handler "
-+						"for #%d (%d)\n", k, i);
-+				goto clean_ale_ret;
-+			}
-+			if (request_irq(i, irqh, IRQF_DISABLED,
- 					dev_name(&pdev->dev), priv)) {
- 				dev_err(priv->dev, "error attaching irq\n");
- 				goto clean_ale_ret;
- 			}
--			priv->irqs_table[k] = i;
--			priv->num_irqs = k;
-+			priv->irqs_table[k++] = i;
- 		}
--		k++;
- 	}
-+	priv->num_irqs = k;
- 
- 	ndev->flags |= IFF_ALLMULTI;	/* see cpsw_ndo_change_rx_flags() */
- 
- 	ndev->netdev_ops = &cpsw_netdev_ops;
- 	SET_ETHTOOL_OPS(ndev, &cpsw_ethtool_ops);
--	netif_napi_add(ndev, &priv->napi, cpsw_poll, CPSW_POLL_WEIGHT);
-+
-+	if (!priv->data.disable_napi)
-+		netif_napi_add(ndev, &priv->napi, cpsw_poll, CPSW_POLL_WEIGHT);
- 
- 	/* register the network device */
- 	SET_NETDEV_DEV(ndev, &pdev->dev);
-diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c
-index 4995673..6effab2 100644
---- a/drivers/net/ethernet/ti/davinci_cpdma.c
-+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
-@@ -474,9 +474,9 @@ int cpdma_ctlr_int_ctrl(struct cpdma_ctlr *ctlr, bool enable)
- 	return 0;
- }
- 
--void cpdma_ctlr_eoi(struct cpdma_ctlr *ctlr)
-+void cpdma_ctlr_eoi(struct cpdma_ctlr *ctlr, u32 value)
- {
--	dma_reg_write(ctlr, CPDMA_MACEOIVECTOR, 0);
-+	dma_reg_write(ctlr, CPDMA_MACEOIVECTOR, value);
- }
- 
- struct cpdma_chan *cpdma_chan_create(struct cpdma_ctlr *ctlr, int chan_num,
-diff --git a/drivers/net/ethernet/ti/davinci_cpdma.h b/drivers/net/ethernet/ti/davinci_cpdma.h
-index afa19a0..b7c097d 100644
---- a/drivers/net/ethernet/ti/davinci_cpdma.h
-+++ b/drivers/net/ethernet/ti/davinci_cpdma.h
-@@ -86,7 +86,7 @@ int cpdma_chan_submit(struct cpdma_chan *chan, void *token, void *data,
- int cpdma_chan_process(struct cpdma_chan *chan, int quota);
- 
- int cpdma_ctlr_int_ctrl(struct cpdma_ctlr *ctlr, bool enable);
--void cpdma_ctlr_eoi(struct cpdma_ctlr *ctlr);
-+void cpdma_ctlr_eoi(struct cpdma_ctlr *ctlr, u32 value);
- int cpdma_chan_int_ctrl(struct cpdma_chan *chan, bool enable);
- 
- enum cpdma_control {
-diff --git a/include/linux/platform_data/cpsw.h b/include/linux/platform_data/cpsw.h
-index 24368a2..be5b27e 100644
---- a/include/linux/platform_data/cpsw.h
-+++ b/include/linux/platform_data/cpsw.h
-@@ -35,6 +35,7 @@ struct cpsw_platform_data {
- 	u32	bd_ram_size;  /*buffer descriptor ram size */
- 	u32	rx_descs;	/* Number of Rx Descriptios */
- 	u32	mac_control;	/* Mac control register */
-+	int	disable_napi;	/* disable NAPI */
- };
- 
- #endif /* __CPSW_H__ */
--- 
-1.7.7.6
-
diff --git a/patches/not-capebus/0001-add-dvi-pinmuxes-to-am33xx.dtsi.patch b/patches/not-capebus/0001-add-dvi-pinmuxes-to-am33xx.dtsi.patch
deleted file mode 100644
index b93e16cbf19fff5fb37f1de7dae564f34c9b93c6..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0001-add-dvi-pinmuxes-to-am33xx.dtsi.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 746593f7286f185a69a78edd989edf9c1fa19699 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Fri, 21 Dec 2012 09:08:49 +0100
-Subject: [PATCH 01/90] add dvi pinmuxes to am33xx.dtsi
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- arch/arm/boot/dts/am33xx.dtsi | 54 +++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 54 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index 6dcd42a..1b91637 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -67,6 +67,60 @@
- 		#size-cells = <0>;
- 		pinctrl-single,register-width = <32>;
- 		pinctrl-single,function-mask = <0x7f>;
-+
-+		bone_dvi_cape_dvi_00A0_pins: pinmux_bone_dvi_cape_dvi_00A0_pins {
-+			pinctrl-single,pins = <
-+				0x1c 0x07	/* gpmc_ad7.gpio1_7, OUTPUT | MODE7 - DVIPDn */
-+
-+				0xa0 0x08	/* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xa4 0x08	/* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xa8 0x08	/* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xac 0x08	/* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xb0 0x08	/* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xb4 0x08	/* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xb8 0x08	/* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xbc 0x08	/* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xc0 0x08	/* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xc4 0x08	/* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xc8 0x08	/* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xcc 0x08	/* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xd0 0x08	/* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xd4 0x08	/* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xd8 0x08	/* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xdc 0x08	/* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xe0 0x00	/* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+				0xe4 0x00	/* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+				0xe8 0x00	/* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+				0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+			>;
-+		};
-+
-+		bone_dvi_cape_dvi_00A1_pins: pinmux_bone_dvi_cape_dvi_00A1_pins {
-+			pinctrl-single,pins = <
-+				0x84 0x07	/* gpmc_csn2.gpio1_31, OUTPUT | MODE7 - DVIPDn */
-+
-+				0xa0 0x08	/* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xa4 0x08	/* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xa8 0x08	/* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xac 0x08	/* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xb0 0x08	/* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xb4 0x08	/* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xb8 0x08	/* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xbc 0x08	/* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xc0 0x08	/* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xc4 0x08	/* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xc8 0x08	/* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xcc 0x08	/* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xd0 0x08	/* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xd4 0x08	/* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xd8 0x08	/* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xdc 0x08	/* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+				0xe0 0x00	/* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+				0xe4 0x00	/* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+				0xe8 0x00	/* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+				0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+			>;
-+		};
- 	};
- 
- 	/*
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0002-add-defconfig-file-to-use-as-.config.patch b/patches/not-capebus/0002-add-defconfig-file-to-use-as-.config.patch
deleted file mode 100644
index cc120bbb9d1a672c978378f2d0d7abc9a0ead23d..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0002-add-defconfig-file-to-use-as-.config.patch
+++ /dev/null
@@ -1,4017 +0,0 @@
-From c27585fac7b1b1bf066b5e71e74c805a6c0306ff Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Fri, 28 Dec 2012 14:41:10 +0100
-Subject: [PATCH 02/90] add 'defconfig' file to use as .config
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- defconfig | 3997 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 3997 insertions(+)
- create mode 100644 defconfig
-
-diff --git a/defconfig b/defconfig
-new file mode 100644
-index 0000000..5eb94b7
---- /dev/null
-+++ b/defconfig
-@@ -0,0 +1,3997 @@
-+#
-+# Automatically generated file; DO NOT EDIT.
-+# Linux/arm 3.8.0-rc1 Kernel Configuration
-+#
-+CONFIG_ARM=y
-+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
-+CONFIG_GENERIC_GPIO=y
-+CONFIG_HAVE_PROC_CPU=y
-+CONFIG_STACKTRACE_SUPPORT=y
-+CONFIG_LOCKDEP_SUPPORT=y
-+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-+CONFIG_RWSEM_GENERIC_SPINLOCK=y
-+CONFIG_ARCH_HAS_CPUFREQ=y
-+CONFIG_GENERIC_HWEIGHT=y
-+CONFIG_GENERIC_CALIBRATE_DELAY=y
-+CONFIG_NEED_DMA_MAP_STATE=y
-+CONFIG_VECTORS_BASE=0xffff0000
-+CONFIG_ARM_PATCH_PHYS_VIRT=y
-+CONFIG_GENERIC_BUG=y
-+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-+CONFIG_HAVE_IRQ_WORK=y
-+CONFIG_IRQ_WORK=y
-+CONFIG_BUILDTIME_EXTABLE_SORT=y
-+
-+#
-+# General setup
-+#
-+CONFIG_EXPERIMENTAL=y
-+CONFIG_INIT_ENV_ARG_LIMIT=32
-+CONFIG_CROSS_COMPILE=""
-+CONFIG_LOCALVERSION=""
-+CONFIG_LOCALVERSION_AUTO=y
-+CONFIG_HAVE_KERNEL_GZIP=y
-+CONFIG_HAVE_KERNEL_LZMA=y
-+CONFIG_HAVE_KERNEL_XZ=y
-+CONFIG_HAVE_KERNEL_LZO=y
-+# CONFIG_KERNEL_GZIP is not set
-+# CONFIG_KERNEL_LZMA is not set
-+# CONFIG_KERNEL_XZ is not set
-+CONFIG_KERNEL_LZO=y
-+CONFIG_DEFAULT_HOSTNAME="(none)"
-+CONFIG_SWAP=y
-+CONFIG_SYSVIPC=y
-+CONFIG_SYSVIPC_SYSCTL=y
-+CONFIG_POSIX_MQUEUE=y
-+CONFIG_POSIX_MQUEUE_SYSCTL=y
-+# CONFIG_FHANDLE is not set
-+# CONFIG_AUDIT is not set
-+CONFIG_HAVE_GENERIC_HARDIRQS=y
-+
-+#
-+# IRQ subsystem
-+#
-+CONFIG_GENERIC_HARDIRQS=y
-+CONFIG_GENERIC_IRQ_PROBE=y
-+CONFIG_GENERIC_IRQ_SHOW=y
-+CONFIG_HARDIRQS_SW_RESEND=y
-+CONFIG_GENERIC_IRQ_CHIP=y
-+CONFIG_IRQ_DOMAIN=y
-+# CONFIG_IRQ_DOMAIN_DEBUG is not set
-+CONFIG_SPARSE_IRQ=y
-+CONFIG_KTIME_SCALAR=y
-+CONFIG_GENERIC_CLOCKEVENTS=y
-+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
-+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
-+
-+#
-+# Timers subsystem
-+#
-+CONFIG_TICK_ONESHOT=y
-+CONFIG_NO_HZ=y
-+CONFIG_HIGH_RES_TIMERS=y
-+
-+#
-+# CPU/Task time and stats accounting
-+#
-+CONFIG_TICK_CPU_ACCOUNTING=y
-+CONFIG_BSD_PROCESS_ACCT=y
-+CONFIG_BSD_PROCESS_ACCT_V3=y
-+CONFIG_TASKSTATS=y
-+CONFIG_TASK_DELAY_ACCT=y
-+CONFIG_TASK_XACCT=y
-+CONFIG_TASK_IO_ACCOUNTING=y
-+
-+#
-+# RCU Subsystem
-+#
-+CONFIG_TREE_RCU=y
-+# CONFIG_PREEMPT_RCU is not set
-+CONFIG_RCU_FANOUT=32
-+CONFIG_RCU_FANOUT_LEAF=16
-+# CONFIG_RCU_FANOUT_EXACT is not set
-+# CONFIG_RCU_FAST_NO_HZ is not set
-+# CONFIG_TREE_RCU_TRACE is not set
-+# CONFIG_RCU_NOCB_CPU is not set
-+CONFIG_IKCONFIG=y
-+CONFIG_IKCONFIG_PROC=y
-+CONFIG_LOG_BUF_SHIFT=17
-+CONFIG_CGROUPS=y
-+# CONFIG_CGROUP_DEBUG is not set
-+# CONFIG_CGROUP_FREEZER is not set
-+# CONFIG_CGROUP_DEVICE is not set
-+# CONFIG_CPUSETS is not set
-+# CONFIG_CGROUP_CPUACCT is not set
-+# CONFIG_RESOURCE_COUNTERS is not set
-+# CONFIG_CGROUP_PERF is not set
-+CONFIG_CGROUP_SCHED=y
-+CONFIG_FAIR_GROUP_SCHED=y
-+# CONFIG_CFS_BANDWIDTH is not set
-+# CONFIG_RT_GROUP_SCHED is not set
-+# CONFIG_BLK_CGROUP is not set
-+# CONFIG_CHECKPOINT_RESTORE is not set
-+CONFIG_NAMESPACES=y
-+CONFIG_UTS_NS=y
-+CONFIG_IPC_NS=y
-+CONFIG_PID_NS=y
-+CONFIG_NET_NS=y
-+CONFIG_SCHED_AUTOGROUP=y
-+# CONFIG_SYSFS_DEPRECATED is not set
-+# CONFIG_RELAY is not set
-+CONFIG_BLK_DEV_INITRD=y
-+CONFIG_INITRAMFS_SOURCE=""
-+CONFIG_RD_GZIP=y
-+# CONFIG_RD_BZIP2 is not set
-+# CONFIG_RD_LZMA is not set
-+# CONFIG_RD_XZ is not set
-+# CONFIG_RD_LZO is not set
-+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-+CONFIG_SYSCTL=y
-+CONFIG_ANON_INODES=y
-+CONFIG_EXPERT=y
-+CONFIG_HAVE_UID16=y
-+CONFIG_UID16=y
-+# CONFIG_SYSCTL_SYSCALL is not set
-+CONFIG_KALLSYMS=y
-+CONFIG_KALLSYMS_ALL=y
-+CONFIG_HOTPLUG=y
-+CONFIG_PRINTK=y
-+CONFIG_BUG=y
-+CONFIG_BASE_FULL=y
-+CONFIG_FUTEX=y
-+CONFIG_EPOLL=y
-+CONFIG_SIGNALFD=y
-+CONFIG_TIMERFD=y
-+CONFIG_EVENTFD=y
-+CONFIG_SHMEM=y
-+CONFIG_AIO=y
-+# CONFIG_EMBEDDED is not set
-+CONFIG_HAVE_PERF_EVENTS=y
-+CONFIG_PERF_USE_VMALLOC=y
-+
-+#
-+# Kernel Performance Events And Counters
-+#
-+CONFIG_PERF_EVENTS=y
-+# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
-+CONFIG_VM_EVENT_COUNTERS=y
-+CONFIG_COMPAT_BRK=y
-+CONFIG_SLAB=y
-+# CONFIG_SLUB is not set
-+# CONFIG_SLOB is not set
-+CONFIG_PROFILING=y
-+CONFIG_TRACEPOINTS=y
-+CONFIG_OPROFILE=m
-+CONFIG_HAVE_OPROFILE=y
-+CONFIG_KPROBES=y
-+# CONFIG_JUMP_LABEL is not set
-+CONFIG_KRETPROBES=y
-+CONFIG_HAVE_KPROBES=y
-+CONFIG_HAVE_KRETPROBES=y
-+CONFIG_HAVE_ARCH_TRACEHOOK=y
-+CONFIG_HAVE_DMA_ATTRS=y
-+CONFIG_HAVE_DMA_CONTIGUOUS=y
-+CONFIG_USE_GENERIC_SMP_HELPERS=y
-+CONFIG_GENERIC_SMP_IDLE_THREAD=y
-+CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
-+CONFIG_HAVE_CLK=y
-+CONFIG_HAVE_DMA_API_DEBUG=y
-+CONFIG_HAVE_HW_BREAKPOINT=y
-+CONFIG_HAVE_ARCH_JUMP_LABEL=y
-+CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
-+CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
-+CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
-+CONFIG_MODULES_USE_ELF_REL=y
-+CONFIG_CLONE_BACKWARDS=y
-+
-+#
-+# GCOV-based kernel profiling
-+#
-+# CONFIG_GCOV_KERNEL is not set
-+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
-+CONFIG_SLABINFO=y
-+CONFIG_RT_MUTEXES=y
-+CONFIG_BASE_SMALL=0
-+CONFIG_MODULES=y
-+CONFIG_MODULE_FORCE_LOAD=y
-+CONFIG_MODULE_UNLOAD=y
-+CONFIG_MODULE_FORCE_UNLOAD=y
-+CONFIG_MODVERSIONS=y
-+CONFIG_MODULE_SRCVERSION_ALL=y
-+# CONFIG_MODULE_SIG is not set
-+CONFIG_STOP_MACHINE=y
-+CONFIG_BLOCK=y
-+CONFIG_LBDAF=y
-+CONFIG_BLK_DEV_BSG=y
-+CONFIG_BLK_DEV_BSGLIB=y
-+CONFIG_BLK_DEV_INTEGRITY=y
-+
-+#
-+# Partition Types
-+#
-+CONFIG_PARTITION_ADVANCED=y
-+# CONFIG_ACORN_PARTITION is not set
-+# CONFIG_OSF_PARTITION is not set
-+# CONFIG_AMIGA_PARTITION is not set
-+# CONFIG_ATARI_PARTITION is not set
-+CONFIG_MAC_PARTITION=y
-+CONFIG_MSDOS_PARTITION=y
-+# CONFIG_BSD_DISKLABEL is not set
-+# CONFIG_MINIX_SUBPARTITION is not set
-+# CONFIG_SOLARIS_X86_PARTITION is not set
-+# CONFIG_UNIXWARE_DISKLABEL is not set
-+# CONFIG_LDM_PARTITION is not set
-+# CONFIG_SGI_PARTITION is not set
-+# CONFIG_ULTRIX_PARTITION is not set
-+# CONFIG_SUN_PARTITION is not set
-+# CONFIG_KARMA_PARTITION is not set
-+CONFIG_EFI_PARTITION=y
-+# CONFIG_SYSV68_PARTITION is not set
-+
-+#
-+# IO Schedulers
-+#
-+CONFIG_IOSCHED_NOOP=y
-+CONFIG_IOSCHED_DEADLINE=y
-+CONFIG_IOSCHED_CFQ=y
-+# CONFIG_DEFAULT_DEADLINE is not set
-+CONFIG_DEFAULT_CFQ=y
-+# CONFIG_DEFAULT_NOOP is not set
-+CONFIG_DEFAULT_IOSCHED="cfq"
-+CONFIG_PADATA=y
-+CONFIG_ASN1=m
-+CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
-+CONFIG_INLINE_READ_UNLOCK=y
-+CONFIG_INLINE_READ_UNLOCK_IRQ=y
-+CONFIG_INLINE_WRITE_UNLOCK=y
-+CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
-+CONFIG_MUTEX_SPIN_ON_OWNER=y
-+CONFIG_FREEZER=y
-+
-+#
-+# System Type
-+#
-+CONFIG_MMU=y
-+# CONFIG_ARCH_MULTIPLATFORM is not set
-+# CONFIG_ARCH_INTEGRATOR is not set
-+# CONFIG_ARCH_REALVIEW is not set
-+# CONFIG_ARCH_VERSATILE is not set
-+# CONFIG_ARCH_AT91 is not set
-+# CONFIG_ARCH_BCM2835 is not set
-+# CONFIG_ARCH_CNS3XXX is not set
-+# CONFIG_ARCH_CLPS711X is not set
-+# CONFIG_ARCH_GEMINI is not set
-+# CONFIG_ARCH_SIRF is not set
-+# CONFIG_ARCH_EBSA110 is not set
-+# CONFIG_ARCH_EP93XX is not set
-+# CONFIG_ARCH_FOOTBRIDGE is not set
-+# CONFIG_ARCH_MXS is not set
-+# CONFIG_ARCH_NETX is not set
-+# CONFIG_ARCH_H720X is not set
-+# CONFIG_ARCH_IOP13XX is not set
-+# CONFIG_ARCH_IOP32X is not set
-+# CONFIG_ARCH_IOP33X is not set
-+# CONFIG_ARCH_IXP4XX is not set
-+# CONFIG_ARCH_DOVE is not set
-+# CONFIG_ARCH_KIRKWOOD is not set
-+# CONFIG_ARCH_MV78XX0 is not set
-+# CONFIG_ARCH_ORION5X is not set
-+# CONFIG_ARCH_MMP is not set
-+# CONFIG_ARCH_KS8695 is not set
-+# CONFIG_ARCH_W90X900 is not set
-+# CONFIG_ARCH_LPC32XX is not set
-+# CONFIG_ARCH_TEGRA is not set
-+# CONFIG_ARCH_PXA is not set
-+# CONFIG_ARCH_MSM is not set
-+# CONFIG_ARCH_SHMOBILE is not set
-+# CONFIG_ARCH_RPC is not set
-+# CONFIG_ARCH_SA1100 is not set
-+# CONFIG_ARCH_S3C24XX is not set
-+# CONFIG_ARCH_S3C64XX is not set
-+# CONFIG_ARCH_S5P64X0 is not set
-+# CONFIG_ARCH_S5PC100 is not set
-+# CONFIG_ARCH_S5PV210 is not set
-+# CONFIG_ARCH_EXYNOS is not set
-+# CONFIG_ARCH_SHARK is not set
-+# CONFIG_ARCH_U300 is not set
-+# CONFIG_ARCH_U8500 is not set
-+# CONFIG_ARCH_NOMADIK is not set
-+# CONFIG_PLAT_SPEAR is not set
-+# CONFIG_ARCH_DAVINCI is not set
-+CONFIG_ARCH_OMAP=y
-+# CONFIG_ARCH_VT8500_SINGLE is not set
-+# CONFIG_GPIO_PCA953X is not set
-+# CONFIG_KEYBOARD_GPIO_POLLED is not set
-+
-+#
-+# TI OMAP Common Features
-+#
-+# CONFIG_ARCH_OMAP1 is not set
-+CONFIG_ARCH_OMAP2PLUS=y
-+
-+#
-+# OMAP Feature Selections
-+#
-+CONFIG_OMAP_RESET_CLOCKS=y
-+CONFIG_OMAP_MUX=y
-+CONFIG_OMAP_MUX_DEBUG=y
-+CONFIG_OMAP_MUX_WARNINGS=y
-+# CONFIG_OMAP_MBOX_FWK is not set
-+CONFIG_OMAP_32K_TIMER=y
-+# CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE is not set
-+CONFIG_OMAP_32K_TIMER_HZ=512
-+CONFIG_OMAP_DM_TIMER=y
-+CONFIG_OMAP_PM_NOOP=y
-+CONFIG_MACH_OMAP_GENERIC=y
-+
-+#
-+# TI OMAP2/3/4 Specific Features
-+#
-+CONFIG_ARCH_OMAP2PLUS_TYPICAL=y
-+CONFIG_SOC_HAS_OMAP2_SDRC=y
-+# CONFIG_ARCH_OMAP2 is not set
-+CONFIG_ARCH_OMAP3=y
-+CONFIG_ARCH_OMAP4=y
-+# CONFIG_SOC_OMAP5 is not set
-+CONFIG_SOC_OMAP3430=y
-+# CONFIG_SOC_TI81XX is not set
-+CONFIG_SOC_AM33XX=y
-+CONFIG_OMAP_PACKAGE_CBB=y
-+CONFIG_OMAP_PACKAGE_CBL=y
-+CONFIG_OMAP_PACKAGE_CBS=y
-+
-+#
-+# OMAP Board Type
-+#
-+CONFIG_MACH_OMAP3_BEAGLE=y
-+# CONFIG_MACH_DEVKIT8000 is not set
-+# CONFIG_MACH_OMAP_LDP is not set
-+# CONFIG_MACH_OMAP3530_LV_SOM is not set
-+# CONFIG_MACH_OMAP3_TORPEDO is not set
-+# CONFIG_MACH_OVERO is not set
-+# CONFIG_MACH_OMAP3EVM is not set
-+# CONFIG_MACH_OMAP3517EVM is not set
-+# CONFIG_MACH_CRANEBOARD is not set
-+# CONFIG_MACH_OMAP3_PANDORA is not set
-+# CONFIG_MACH_TOUCHBOOK is not set
-+# CONFIG_MACH_OMAP_3430SDP is not set
-+# CONFIG_MACH_NOKIA_RM680 is not set
-+# CONFIG_MACH_NOKIA_RX51 is not set
-+# CONFIG_MACH_OMAP_ZOOM2 is not set
-+# CONFIG_MACH_OMAP_ZOOM3 is not set
-+# CONFIG_MACH_CM_T35 is not set
-+# CONFIG_MACH_CM_T3517 is not set
-+CONFIG_MACH_IGEP0020=y
-+# CONFIG_MACH_IGEP0030 is not set
-+# CONFIG_MACH_SBC3530 is not set
-+# CONFIG_MACH_OMAP_3630SDP is not set
-+# CONFIG_MACH_OMAP_4430SDP is not set
-+CONFIG_MACH_OMAP4_PANDA=y
-+# CONFIG_OMAP3_EMU is not set
-+# CONFIG_OMAP3_SDRC_AC_TIMING is not set
-+# CONFIG_OMAP4_ERRATA_I688 is not set
-+# CONFIG_ARCH_VT8500 is not set
-+
-+#
-+# Processor Type
-+#
-+CONFIG_CPU_V7=y
-+CONFIG_CPU_32v6K=y
-+CONFIG_CPU_32v7=y
-+CONFIG_CPU_ABRT_EV7=y
-+CONFIG_CPU_PABRT_V7=y
-+CONFIG_CPU_CACHE_V7=y
-+CONFIG_CPU_CACHE_VIPT=y
-+CONFIG_CPU_COPY_V6=y
-+CONFIG_CPU_TLB_V7=y
-+CONFIG_CPU_HAS_ASID=y
-+CONFIG_CPU_CP15=y
-+CONFIG_CPU_CP15_MMU=y
-+
-+#
-+# Processor Features
-+#
-+# CONFIG_ARM_LPAE is not set
-+# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
-+CONFIG_ARM_THUMB=y
-+CONFIG_ARM_THUMBEE=y
-+# CONFIG_ARM_VIRT_EXT is not set
-+CONFIG_SWP_EMULATE=y
-+# CONFIG_CPU_ICACHE_DISABLE is not set
-+# CONFIG_CPU_DCACHE_DISABLE is not set
-+# CONFIG_CPU_BPREDICT_DISABLE is not set
-+CONFIG_OUTER_CACHE=y
-+CONFIG_OUTER_CACHE_SYNC=y
-+CONFIG_CACHE_L2X0=y
-+CONFIG_CACHE_PL310=y
-+CONFIG_ARM_L1_CACHE_SHIFT_6=y
-+CONFIG_ARM_L1_CACHE_SHIFT=6
-+CONFIG_ARM_DMA_MEM_BUFFERABLE=y
-+CONFIG_ARM_NR_BANKS=8
-+CONFIG_MULTI_IRQ_HANDLER=y
-+# CONFIG_ARM_ERRATA_430973 is not set
-+# CONFIG_ARM_ERRATA_458693 is not set
-+# CONFIG_ARM_ERRATA_460075 is not set
-+# CONFIG_ARM_ERRATA_742230 is not set
-+# CONFIG_ARM_ERRATA_742231 is not set
-+CONFIG_PL310_ERRATA_588369=y
-+CONFIG_ARM_ERRATA_720789=y
-+CONFIG_PL310_ERRATA_727915=y
-+# CONFIG_ARM_ERRATA_743622 is not set
-+# CONFIG_ARM_ERRATA_751472 is not set
-+# CONFIG_PL310_ERRATA_753970 is not set
-+# CONFIG_ARM_ERRATA_754322 is not set
-+# CONFIG_ARM_ERRATA_754327 is not set
-+# CONFIG_ARM_ERRATA_764369 is not set
-+# CONFIG_PL310_ERRATA_769419 is not set
-+# CONFIG_ARM_ERRATA_775420 is not set
-+CONFIG_ARM_GIC=y
-+CONFIG_TI_PRIV_EDMA=y
-+
-+#
-+# Bus support
-+#
-+# CONFIG_PCI_SYSCALL is not set
-+# CONFIG_PCCARD is not set
-+
-+#
-+# Kernel Features
-+#
-+CONFIG_HAVE_SMP=y
-+CONFIG_SMP=y
-+CONFIG_SMP_ON_UP=y
-+CONFIG_ARM_CPU_TOPOLOGY=y
-+# CONFIG_SCHED_MC is not set
-+# CONFIG_SCHED_SMT is not set
-+CONFIG_HAVE_ARM_SCU=y
-+# CONFIG_ARM_ARCH_TIMER is not set
-+CONFIG_HAVE_ARM_TWD=y
-+CONFIG_VMSPLIT_3G=y
-+# CONFIG_VMSPLIT_2G is not set
-+# CONFIG_VMSPLIT_1G is not set
-+CONFIG_PAGE_OFFSET=0xC0000000
-+CONFIG_NR_CPUS=4
-+CONFIG_HOTPLUG_CPU=y
-+CONFIG_LOCAL_TIMERS=y
-+CONFIG_ARCH_NR_GPIO=0
-+# CONFIG_PREEMPT_NONE is not set
-+CONFIG_PREEMPT_VOLUNTARY=y
-+# CONFIG_PREEMPT is not set
-+CONFIG_HZ=512
-+# CONFIG_THUMB2_KERNEL is not set
-+CONFIG_AEABI=y
-+# CONFIG_OABI_COMPAT is not set
-+CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y
-+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
-+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
-+CONFIG_HAVE_ARCH_PFN_VALID=y
-+CONFIG_HIGHMEM=y
-+# CONFIG_HIGHPTE is not set
-+CONFIG_HW_PERF_EVENTS=y
-+CONFIG_SELECT_MEMORY_MODEL=y
-+CONFIG_FLATMEM_MANUAL=y
-+CONFIG_FLATMEM=y
-+CONFIG_FLAT_NODE_MEM_MAP=y
-+CONFIG_HAVE_MEMBLOCK=y
-+CONFIG_PAGEFLAGS_EXTENDED=y
-+CONFIG_SPLIT_PTLOCK_CPUS=4
-+# CONFIG_COMPACTION is not set
-+# CONFIG_PHYS_ADDR_T_64BIT is not set
-+CONFIG_ZONE_DMA_FLAG=0
-+CONFIG_BOUNCE=y
-+CONFIG_VIRT_TO_BUS=y
-+# CONFIG_KSM is not set
-+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
-+CONFIG_CROSS_MEMORY_ATTACH=y
-+# CONFIG_CLEANCACHE is not set
-+# CONFIG_FRONTSWAP is not set
-+CONFIG_FORCE_MAX_ZONEORDER=12
-+CONFIG_ALIGNMENT_TRAP=y
-+# CONFIG_UACCESS_WITH_MEMCPY is not set
-+# CONFIG_SECCOMP is not set
-+# CONFIG_CC_STACKPROTECTOR is not set
-+# CONFIG_XEN is not set
-+
-+#
-+# Boot options
-+#
-+CONFIG_USE_OF=y
-+CONFIG_ATAGS=y
-+# CONFIG_DEPRECATED_PARAM_STRUCT is not set
-+CONFIG_ZBOOT_ROM_TEXT=0x0
-+CONFIG_ZBOOT_ROM_BSS=0x0
-+CONFIG_ARM_APPENDED_DTB=y
-+CONFIG_ARM_ATAG_DTB_COMPAT=y
-+CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
-+# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set
-+CONFIG_CMDLINE=""
-+# CONFIG_XIP_KERNEL is not set
-+# CONFIG_KEXEC is not set
-+# CONFIG_CRASH_DUMP is not set
-+# CONFIG_AUTO_ZRELADDR is not set
-+
-+#
-+# CPU Power Management
-+#
-+
-+#
-+# CPU Frequency scaling
-+#
-+CONFIG_CPU_FREQ=y
-+CONFIG_CPU_FREQ_TABLE=y
-+CONFIG_CPU_FREQ_STAT=y
-+CONFIG_CPU_FREQ_STAT_DETAILS=y
-+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
-+# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
-+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
-+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
-+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
-+CONFIG_CPU_FREQ_GOV_USERSPACE=y
-+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
-+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
-+CONFIG_GENERIC_CPUFREQ_CPU0=y
-+
-+#
-+# ARM CPU frequency scaling drivers
-+#
-+# CONFIG_ARM_OMAP2PLUS_CPUFREQ is not set
-+# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set
-+# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set
-+# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set
-+CONFIG_CPU_IDLE=y
-+CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
-+CONFIG_CPU_IDLE_GOV_LADDER=y
-+CONFIG_CPU_IDLE_GOV_MENU=y
-+CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED=y
-+
-+#
-+# Floating point emulation
-+#
-+
-+#
-+# At least one emulation must be selected
-+#
-+CONFIG_VFP=y
-+CONFIG_VFPv3=y
-+CONFIG_NEON=y
-+
-+#
-+# Userspace binary formats
-+#
-+CONFIG_BINFMT_ELF=y
-+CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
-+CONFIG_HAVE_AOUT=y
-+# CONFIG_BINFMT_AOUT is not set
-+CONFIG_BINFMT_MISC=y
-+# CONFIG_COREDUMP is not set
-+
-+#
-+# Power management options
-+#
-+CONFIG_SUSPEND=y
-+CONFIG_SUSPEND_FREEZER=y
-+CONFIG_PM_SLEEP=y
-+CONFIG_PM_SLEEP_SMP=y
-+# CONFIG_PM_AUTOSLEEP is not set
-+# CONFIG_PM_WAKELOCKS is not set
-+CONFIG_PM_RUNTIME=y
-+CONFIG_PM=y
-+CONFIG_PM_DEBUG=y
-+# CONFIG_PM_ADVANCED_DEBUG is not set
-+# CONFIG_PM_TEST_SUSPEND is not set
-+CONFIG_PM_SLEEP_DEBUG=y
-+# CONFIG_APM_EMULATION is not set
-+CONFIG_ARCH_HAS_OPP=y
-+CONFIG_PM_OPP=y
-+CONFIG_PM_CLK=y
-+CONFIG_CPU_PM=y
-+CONFIG_ARCH_SUSPEND_POSSIBLE=y
-+CONFIG_ARM_CPU_SUSPEND=y
-+CONFIG_NET=y
-+
-+#
-+# Networking options
-+#
-+CONFIG_PACKET=y
-+CONFIG_PACKET_DIAG=m
-+CONFIG_UNIX=y
-+CONFIG_UNIX_DIAG=m
-+CONFIG_XFRM=y
-+CONFIG_XFRM_ALGO=y
-+CONFIG_XFRM_USER=y
-+# CONFIG_XFRM_SUB_POLICY is not set
-+CONFIG_XFRM_MIGRATE=y
-+# CONFIG_XFRM_STATISTICS is not set
-+CONFIG_XFRM_IPCOMP=m
-+CONFIG_NET_KEY=y
-+CONFIG_NET_KEY_MIGRATE=y
-+CONFIG_INET=y
-+CONFIG_IP_MULTICAST=y
-+CONFIG_IP_ADVANCED_ROUTER=y
-+# CONFIG_IP_FIB_TRIE_STATS is not set
-+# CONFIG_IP_MULTIPLE_TABLES is not set
-+# CONFIG_IP_ROUTE_MULTIPATH is not set
-+# CONFIG_IP_ROUTE_VERBOSE is not set
-+CONFIG_IP_PNP=y
-+CONFIG_IP_PNP_DHCP=y
-+CONFIG_IP_PNP_BOOTP=y
-+CONFIG_IP_PNP_RARP=y
-+CONFIG_NET_IPIP=m
-+CONFIG_NET_IPGRE_DEMUX=m
-+CONFIG_NET_IPGRE=m
-+# CONFIG_NET_IPGRE_BROADCAST is not set
-+CONFIG_IP_MROUTE=y
-+CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
-+CONFIG_IP_PIMSM_V1=y
-+CONFIG_IP_PIMSM_V2=y
-+CONFIG_ARPD=y
-+CONFIG_SYN_COOKIES=y
-+# CONFIG_NET_IPVTI is not set
-+CONFIG_INET_AH=m
-+CONFIG_INET_ESP=m
-+CONFIG_INET_IPCOMP=m
-+CONFIG_INET_XFRM_TUNNEL=m
-+CONFIG_INET_TUNNEL=m
-+CONFIG_INET_XFRM_MODE_TRANSPORT=m
-+CONFIG_INET_XFRM_MODE_TUNNEL=m
-+CONFIG_INET_XFRM_MODE_BEET=m
-+CONFIG_INET_LRO=m
-+CONFIG_INET_DIAG=y
-+CONFIG_INET_TCP_DIAG=y
-+CONFIG_INET_UDP_DIAG=m
-+CONFIG_TCP_CONG_ADVANCED=y
-+CONFIG_TCP_CONG_BIC=m
-+CONFIG_TCP_CONG_CUBIC=y
-+CONFIG_TCP_CONG_WESTWOOD=m
-+CONFIG_TCP_CONG_HTCP=m
-+CONFIG_TCP_CONG_HSTCP=m
-+CONFIG_TCP_CONG_HYBLA=m
-+CONFIG_TCP_CONG_VEGAS=m
-+CONFIG_TCP_CONG_SCALABLE=m
-+CONFIG_TCP_CONG_LP=m
-+CONFIG_TCP_CONG_VENO=m
-+CONFIG_TCP_CONG_YEAH=m
-+CONFIG_TCP_CONG_ILLINOIS=m
-+CONFIG_DEFAULT_CUBIC=y
-+# CONFIG_DEFAULT_RENO is not set
-+CONFIG_DEFAULT_TCP_CONG="cubic"
-+# CONFIG_TCP_MD5SIG is not set
-+CONFIG_IPV6=m
-+CONFIG_IPV6_PRIVACY=y
-+CONFIG_IPV6_ROUTER_PREF=y
-+CONFIG_IPV6_ROUTE_INFO=y
-+CONFIG_IPV6_OPTIMISTIC_DAD=y
-+CONFIG_INET6_AH=m
-+CONFIG_INET6_ESP=m
-+CONFIG_INET6_IPCOMP=m
-+CONFIG_IPV6_MIP6=m
-+CONFIG_INET6_XFRM_TUNNEL=m
-+CONFIG_INET6_TUNNEL=m
-+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-+CONFIG_INET6_XFRM_MODE_TUNNEL=m
-+CONFIG_INET6_XFRM_MODE_BEET=m
-+CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
-+CONFIG_IPV6_SIT=m
-+# CONFIG_IPV6_SIT_6RD is not set
-+CONFIG_IPV6_NDISC_NODETYPE=y
-+CONFIG_IPV6_TUNNEL=m
-+CONFIG_IPV6_GRE=m
-+CONFIG_IPV6_MULTIPLE_TABLES=y
-+CONFIG_IPV6_SUBTREES=y
-+CONFIG_IPV6_MROUTE=y
-+CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
-+CONFIG_IPV6_PIMSM_V2=y
-+CONFIG_NETLABEL=y
-+# CONFIG_NETWORK_SECMARK is not set
-+# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
-+CONFIG_NETFILTER=y
-+# CONFIG_NETFILTER_DEBUG is not set
-+CONFIG_NETFILTER_ADVANCED=y
-+CONFIG_BRIDGE_NETFILTER=y
-+
-+#
-+# Core Netfilter Configuration
-+#
-+# CONFIG_NETFILTER_NETLINK_ACCT is not set
-+# CONFIG_NETFILTER_NETLINK_QUEUE is not set
-+# CONFIG_NETFILTER_NETLINK_LOG is not set
-+# CONFIG_NF_CONNTRACK is not set
-+# CONFIG_NETFILTER_TPROXY is not set
-+CONFIG_NETFILTER_XTABLES=m
-+
-+#
-+# Xtables combined modules
-+#
-+# CONFIG_NETFILTER_XT_MARK is not set
-+
-+#
-+# Xtables targets
-+#
-+# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set
-+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
-+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
-+CONFIG_NETFILTER_XT_TARGET_HL=m
-+# CONFIG_NETFILTER_XT_TARGET_HMARK is not set
-+# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set
-+# CONFIG_NETFILTER_XT_TARGET_LED is not set
-+# CONFIG_NETFILTER_XT_TARGET_LOG is not set
-+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
-+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
-+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
-+# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
-+# CONFIG_NETFILTER_XT_TARGET_TEE is not set
-+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
-+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
-+# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set
-+
-+#
-+# Xtables matches
-+#
-+# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set
-+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
-+# CONFIG_NETFILTER_XT_MATCH_CPU is not set
-+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
-+# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set
-+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
-+CONFIG_NETFILTER_XT_MATCH_ECN=m
-+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
-+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
-+CONFIG_NETFILTER_XT_MATCH_HL=m
-+# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set
-+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
-+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
-+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
-+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
-+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
-+# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set
-+# CONFIG_NETFILTER_XT_MATCH_OWNER is not set
-+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
-+# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
-+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
-+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
-+# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
-+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
-+# CONFIG_NETFILTER_XT_MATCH_RECENT is not set
-+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
-+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
-+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
-+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
-+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
-+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
-+CONFIG_IP_VS=m
-+# CONFIG_IP_VS_IPV6 is not set
-+# CONFIG_IP_VS_DEBUG is not set
-+CONFIG_IP_VS_TAB_BITS=12
-+
-+#
-+# IPVS transport protocol load balancing support
-+#
-+# CONFIG_IP_VS_PROTO_TCP is not set
-+# CONFIG_IP_VS_PROTO_UDP is not set
-+# CONFIG_IP_VS_PROTO_AH_ESP is not set
-+# CONFIG_IP_VS_PROTO_ESP is not set
-+# CONFIG_IP_VS_PROTO_AH is not set
-+# CONFIG_IP_VS_PROTO_SCTP is not set
-+
-+#
-+# IPVS scheduler
-+#
-+# CONFIG_IP_VS_RR is not set
-+# CONFIG_IP_VS_WRR is not set
-+# CONFIG_IP_VS_LC is not set
-+# CONFIG_IP_VS_WLC is not set
-+# CONFIG_IP_VS_LBLC is not set
-+# CONFIG_IP_VS_LBLCR is not set
-+# CONFIG_IP_VS_DH is not set
-+# CONFIG_IP_VS_SH is not set
-+# CONFIG_IP_VS_SED is not set
-+# CONFIG_IP_VS_NQ is not set
-+
-+#
-+# IPVS SH scheduler
-+#
-+CONFIG_IP_VS_SH_TAB_BITS=8
-+
-+#
-+# IPVS application helper
-+#
-+
-+#
-+# IP: Netfilter Configuration
-+#
-+# CONFIG_NF_DEFRAG_IPV4 is not set
-+CONFIG_IP_NF_QUEUE=m
-+CONFIG_IP_NF_IPTABLES=m
-+CONFIG_IP_NF_MATCH_AH=m
-+CONFIG_IP_NF_MATCH_ECN=m
-+CONFIG_IP_NF_MATCH_RPFILTER=m
-+CONFIG_IP_NF_MATCH_TTL=m
-+CONFIG_IP_NF_FILTER=m
-+CONFIG_IP_NF_TARGET_REJECT=m
-+CONFIG_IP_NF_TARGET_ULOG=m
-+CONFIG_IP_NF_MANGLE=m
-+CONFIG_IP_NF_TARGET_ECN=m
-+CONFIG_IP_NF_TARGET_TTL=m
-+CONFIG_IP_NF_RAW=m
-+CONFIG_IP_NF_SECURITY=m
-+CONFIG_IP_NF_ARPTABLES=m
-+CONFIG_IP_NF_ARPFILTER=m
-+CONFIG_IP_NF_ARP_MANGLE=m
-+
-+#
-+# IPv6: Netfilter Configuration
-+#
-+# CONFIG_NF_DEFRAG_IPV6 is not set
-+CONFIG_IP6_NF_IPTABLES=m
-+CONFIG_IP6_NF_MATCH_AH=m
-+CONFIG_IP6_NF_MATCH_EUI64=m
-+CONFIG_IP6_NF_MATCH_FRAG=m
-+CONFIG_IP6_NF_MATCH_OPTS=m
-+CONFIG_IP6_NF_MATCH_HL=m
-+CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-+CONFIG_IP6_NF_MATCH_MH=m
-+CONFIG_IP6_NF_MATCH_RPFILTER=m
-+CONFIG_IP6_NF_MATCH_RT=m
-+CONFIG_IP6_NF_TARGET_HL=m
-+CONFIG_IP6_NF_FILTER=m
-+CONFIG_IP6_NF_TARGET_REJECT=m
-+CONFIG_IP6_NF_MANGLE=m
-+CONFIG_IP6_NF_RAW=m
-+CONFIG_IP6_NF_SECURITY=m
-+# CONFIG_BRIDGE_NF_EBTABLES is not set
-+# CONFIG_IP_DCCP is not set
-+# CONFIG_IP_SCTP is not set
-+# CONFIG_RDS is not set
-+# CONFIG_TIPC is not set
-+# CONFIG_ATM is not set
-+CONFIG_L2TP=m
-+CONFIG_L2TP_DEBUGFS=m
-+# CONFIG_L2TP_V3 is not set
-+CONFIG_STP=m
-+CONFIG_GARP=m
-+CONFIG_BRIDGE=m
-+CONFIG_BRIDGE_IGMP_SNOOPING=y
-+CONFIG_HAVE_NET_DSA=y
-+CONFIG_VLAN_8021Q=m
-+CONFIG_VLAN_8021Q_GVRP=y
-+# CONFIG_DECNET is not set
-+CONFIG_LLC=m
-+# CONFIG_LLC2 is not set
-+# CONFIG_IPX is not set
-+# CONFIG_ATALK is not set
-+# CONFIG_X25 is not set
-+# CONFIG_LAPB is not set
-+# CONFIG_WAN_ROUTER is not set
-+CONFIG_PHONET=m
-+# CONFIG_IEEE802154 is not set
-+CONFIG_NET_SCHED=y
-+
-+#
-+# Queueing/Scheduling
-+#
-+# CONFIG_NET_SCH_CBQ is not set
-+# CONFIG_NET_SCH_HTB is not set
-+# CONFIG_NET_SCH_HFSC is not set
-+# CONFIG_NET_SCH_PRIO is not set
-+# CONFIG_NET_SCH_MULTIQ is not set
-+# CONFIG_NET_SCH_RED is not set
-+# CONFIG_NET_SCH_SFB is not set
-+# CONFIG_NET_SCH_SFQ is not set
-+# CONFIG_NET_SCH_TEQL is not set
-+# CONFIG_NET_SCH_TBF is not set
-+# CONFIG_NET_SCH_GRED is not set
-+# CONFIG_NET_SCH_DSMARK is not set
-+# CONFIG_NET_SCH_NETEM is not set
-+# CONFIG_NET_SCH_DRR is not set
-+# CONFIG_NET_SCH_MQPRIO is not set
-+# CONFIG_NET_SCH_CHOKE is not set
-+# CONFIG_NET_SCH_QFQ is not set
-+CONFIG_NET_SCH_CODEL=y
-+CONFIG_NET_SCH_FQ_CODEL=y
-+# CONFIG_NET_SCH_PLUG is not set
-+
-+#
-+# Classification
-+#
-+CONFIG_NET_CLS=y
-+# CONFIG_NET_CLS_BASIC is not set
-+# CONFIG_NET_CLS_TCINDEX is not set
-+# CONFIG_NET_CLS_ROUTE4 is not set
-+# CONFIG_NET_CLS_FW is not set
-+# CONFIG_NET_CLS_U32 is not set
-+# CONFIG_NET_CLS_RSVP is not set
-+# CONFIG_NET_CLS_RSVP6 is not set
-+# CONFIG_NET_CLS_FLOW is not set
-+CONFIG_NET_CLS_CGROUP=m
-+# CONFIG_NET_EMATCH is not set
-+# CONFIG_NET_CLS_ACT is not set
-+CONFIG_NET_SCH_FIFO=y
-+# CONFIG_DCB is not set
-+CONFIG_DNS_RESOLVER=y
-+CONFIG_BATMAN_ADV=m
-+CONFIG_BATMAN_ADV_BLA=y
-+CONFIG_BATMAN_ADV_DAT=y
-+# CONFIG_BATMAN_ADV_DEBUG is not set
-+CONFIG_OPENVSWITCH=m
-+CONFIG_RPS=y
-+CONFIG_RFS_ACCEL=y
-+CONFIG_XPS=y
-+CONFIG_NETPRIO_CGROUP=m
-+CONFIG_BQL=y
-+CONFIG_BPF_JIT=y
-+
-+#
-+# Network testing
-+#
-+# CONFIG_NET_PKTGEN is not set
-+# CONFIG_NET_TCPPROBE is not set
-+# CONFIG_NET_DROP_MONITOR is not set
-+# CONFIG_HAMRADIO is not set
-+CONFIG_CAN=m
-+CONFIG_CAN_RAW=m
-+CONFIG_CAN_BCM=m
-+CONFIG_CAN_GW=m
-+
-+#
-+# CAN Device Drivers
-+#
-+# CONFIG_CAN_VCAN is not set
-+# CONFIG_CAN_SLCAN is not set
-+CONFIG_CAN_DEV=m
-+CONFIG_CAN_CALC_BITTIMING=y
-+CONFIG_CAN_TI_HECC=m
-+CONFIG_CAN_MCP251X=m
-+CONFIG_CAN_GRCAN=m
-+# CONFIG_CAN_SJA1000 is not set
-+CONFIG_CAN_C_CAN=m
-+CONFIG_CAN_C_CAN_PLATFORM=m
-+# CONFIG_CAN_CC770 is not set
-+
-+#
-+# CAN USB interfaces
-+#
-+CONFIG_CAN_EMS_USB=m
-+CONFIG_CAN_ESD_USB2=m
-+CONFIG_CAN_KVASER_USB=m
-+CONFIG_CAN_PEAK_USB=m
-+# CONFIG_CAN_SOFTING is not set
-+# CONFIG_CAN_DEBUG_DEVICES is not set
-+CONFIG_IRDA=m
-+
-+#
-+# IrDA protocols
-+#
-+CONFIG_IRLAN=m
-+# CONFIG_IRNET is not set
-+CONFIG_IRCOMM=m
-+CONFIG_IRDA_ULTRA=y
-+
-+#
-+# IrDA options
-+#
-+CONFIG_IRDA_CACHE_LAST_LSAP=y
-+CONFIG_IRDA_FAST_RR=y
-+# CONFIG_IRDA_DEBUG is not set
-+
-+#
-+# Infrared-port device drivers
-+#
-+
-+#
-+# SIR device drivers
-+#
-+CONFIG_IRTTY_SIR=m
-+
-+#
-+# Dongle support
-+#
-+CONFIG_DONGLE=y
-+CONFIG_ESI_DONGLE=m
-+CONFIG_ACTISYS_DONGLE=m
-+CONFIG_TEKRAM_DONGLE=m
-+CONFIG_TOIM3232_DONGLE=m
-+CONFIG_LITELINK_DONGLE=m
-+CONFIG_MA600_DONGLE=m
-+CONFIG_GIRBIL_DONGLE=m
-+CONFIG_MCP2120_DONGLE=m
-+CONFIG_OLD_BELKIN_DONGLE=m
-+CONFIG_ACT200L_DONGLE=m
-+CONFIG_KINGSUN_DONGLE=m
-+CONFIG_KSDAZZLE_DONGLE=m
-+CONFIG_KS959_DONGLE=m
-+
-+#
-+# FIR device drivers
-+#
-+CONFIG_USB_IRDA=m
-+# CONFIG_SIGMATEL_FIR is not set
-+CONFIG_MCS_FIR=m
-+CONFIG_BT=m
-+CONFIG_BT_RFCOMM=m
-+CONFIG_BT_RFCOMM_TTY=y
-+CONFIG_BT_BNEP=m
-+CONFIG_BT_BNEP_MC_FILTER=y
-+CONFIG_BT_BNEP_PROTO_FILTER=y
-+CONFIG_BT_HIDP=m
-+
-+#
-+# Bluetooth device drivers
-+#
-+CONFIG_BT_HCIBTUSB=m
-+CONFIG_BT_HCIBTSDIO=m
-+CONFIG_BT_HCIUART=m
-+CONFIG_BT_HCIUART_H4=y
-+CONFIG_BT_HCIUART_BCSP=y
-+CONFIG_BT_HCIUART_ATH3K=y
-+CONFIG_BT_HCIUART_LL=y
-+CONFIG_BT_HCIUART_3WIRE=y
-+CONFIG_BT_HCIBCM203X=m
-+CONFIG_BT_HCIBPA10X=m
-+CONFIG_BT_HCIBFUSB=m
-+# CONFIG_BT_HCIVHCI is not set
-+# CONFIG_BT_MRVL is not set
-+CONFIG_BT_ATH3K=m
-+# CONFIG_BT_WILINK is not set
-+CONFIG_AF_RXRPC=m
-+# CONFIG_AF_RXRPC_DEBUG is not set
-+# CONFIG_RXKAD is not set
-+CONFIG_FIB_RULES=y
-+CONFIG_WIRELESS=y
-+CONFIG_WIRELESS_EXT=y
-+CONFIG_WEXT_CORE=y
-+CONFIG_WEXT_PROC=y
-+CONFIG_WEXT_SPY=y
-+CONFIG_CFG80211=m
-+# CONFIG_NL80211_TESTMODE is not set
-+# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
-+# CONFIG_CFG80211_REG_DEBUG is not set
-+# CONFIG_CFG80211_CERTIFICATION_ONUS is not set
-+CONFIG_CFG80211_DEFAULT_PS=y
-+CONFIG_CFG80211_DEBUGFS=y
-+# CONFIG_CFG80211_INTERNAL_REGDB is not set
-+CONFIG_CFG80211_WEXT=y
-+CONFIG_LIB80211=m
-+# CONFIG_LIB80211_DEBUG is not set
-+CONFIG_MAC80211=m
-+CONFIG_MAC80211_HAS_RC=y
-+CONFIG_MAC80211_RC_PID=y
-+CONFIG_MAC80211_RC_MINSTREL=y
-+CONFIG_MAC80211_RC_MINSTREL_HT=y
-+CONFIG_MAC80211_RC_DEFAULT_PID=y
-+# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set
-+CONFIG_MAC80211_RC_DEFAULT="pid"
-+CONFIG_MAC80211_MESH=y
-+CONFIG_MAC80211_LEDS=y
-+CONFIG_MAC80211_DEBUGFS=y
-+# CONFIG_MAC80211_MESSAGE_TRACING is not set
-+# CONFIG_MAC80211_DEBUG_MENU is not set
-+CONFIG_WIMAX=m
-+CONFIG_WIMAX_DEBUG_LEVEL=8
-+CONFIG_RFKILL=m
-+CONFIG_RFKILL_LEDS=y
-+CONFIG_RFKILL_INPUT=y
-+CONFIG_RFKILL_REGULATOR=m
-+CONFIG_RFKILL_GPIO=m
-+CONFIG_NET_9P=m
-+CONFIG_NET_9P_VIRTIO=m
-+# CONFIG_NET_9P_DEBUG is not set
-+# CONFIG_CAIF is not set
-+CONFIG_CEPH_LIB=m
-+# CONFIG_CEPH_LIB_PRETTYDEBUG is not set
-+# CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set
-+CONFIG_NFC=m
-+CONFIG_NFC_NCI=m
-+CONFIG_NFC_HCI=m
-+CONFIG_NFC_SHDLC=y
-+# CONFIG_NFC_LLCP is not set
-+
-+#
-+# Near Field Communication (NFC) devices
-+#
-+CONFIG_PN544_HCI_NFC=m
-+CONFIG_NFC_PN533=m
-+# CONFIG_NFC_WILINK is not set
-+CONFIG_HAVE_BPF_JIT=y
-+
-+#
-+# Device Drivers
-+#
-+
-+#
-+# Generic Driver Options
-+#
-+CONFIG_UEVENT_HELPER_PATH=""
-+CONFIG_DEVTMPFS=y
-+CONFIG_DEVTMPFS_MOUNT=y
-+CONFIG_STANDALONE=y
-+CONFIG_PREVENT_FIRMWARE_BUILD=y
-+CONFIG_FW_LOADER=y
-+CONFIG_FIRMWARE_IN_KERNEL=y
-+CONFIG_EXTRA_FIRMWARE=""
-+# CONFIG_DEBUG_DRIVER is not set
-+# CONFIG_DEBUG_DEVRES is not set
-+# CONFIG_SYS_HYPERVISOR is not set
-+# CONFIG_GENERIC_CPU_DEVICES is not set
-+CONFIG_REGMAP=y
-+CONFIG_REGMAP_I2C=y
-+CONFIG_REGMAP_SPI=m
-+CONFIG_REGMAP_MMIO=y
-+CONFIG_DMA_SHARED_BUFFER=y
-+# CONFIG_CMA is not set
-+
-+#
-+# Bus devices
-+#
-+CONFIG_OMAP_OCP2SCP=y
-+CONFIG_OMAP_INTERCONNECT=y
-+CONFIG_CONNECTOR=y
-+CONFIG_PROC_EVENTS=y
-+CONFIG_MTD=y
-+# CONFIG_MTD_TESTS is not set
-+# CONFIG_MTD_REDBOOT_PARTS is not set
-+CONFIG_MTD_CMDLINE_PARTS=y
-+# CONFIG_MTD_AFS_PARTS is not set
-+CONFIG_MTD_OF_PARTS=y
-+# CONFIG_MTD_AR7_PARTS is not set
-+
-+#
-+# User Modules And Translation Layers
-+#
-+CONFIG_MTD_CHAR=y
-+CONFIG_MTD_BLKDEVS=y
-+CONFIG_MTD_BLOCK=y
-+# CONFIG_FTL is not set
-+# CONFIG_NFTL is not set
-+# CONFIG_INFTL is not set
-+# CONFIG_RFD_FTL is not set
-+# CONFIG_SSFDC is not set
-+# CONFIG_SM_FTL is not set
-+# CONFIG_MTD_OOPS is not set
-+# CONFIG_MTD_SWAP is not set
-+
-+#
-+# RAM/ROM/Flash chip drivers
-+#
-+CONFIG_MTD_CFI=y
-+# CONFIG_MTD_JEDECPROBE is not set
-+CONFIG_MTD_GEN_PROBE=y
-+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-+CONFIG_MTD_MAP_BANK_WIDTH_1=y
-+CONFIG_MTD_MAP_BANK_WIDTH_2=y
-+CONFIG_MTD_MAP_BANK_WIDTH_4=y
-+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-+CONFIG_MTD_CFI_I1=y
-+CONFIG_MTD_CFI_I2=y
-+# CONFIG_MTD_CFI_I4 is not set
-+# CONFIG_MTD_CFI_I8 is not set
-+CONFIG_MTD_CFI_INTELEXT=y
-+# CONFIG_MTD_CFI_AMDSTD is not set
-+# CONFIG_MTD_CFI_STAA is not set
-+CONFIG_MTD_CFI_UTIL=y
-+# CONFIG_MTD_RAM is not set
-+# CONFIG_MTD_ROM is not set
-+# CONFIG_MTD_ABSENT is not set
-+
-+#
-+# Mapping drivers for chip access
-+#
-+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-+# CONFIG_MTD_PHYSMAP is not set
-+# CONFIG_MTD_PHYSMAP_OF is not set
-+# CONFIG_MTD_PLATRAM is not set
-+
-+#
-+# Self-contained MTD device drivers
-+#
-+# CONFIG_MTD_DATAFLASH is not set
-+# CONFIG_MTD_M25P80 is not set
-+# CONFIG_MTD_SST25L is not set
-+# CONFIG_MTD_SLRAM is not set
-+# CONFIG_MTD_PHRAM is not set
-+# CONFIG_MTD_MTDRAM is not set
-+# CONFIG_MTD_BLOCK2MTD is not set
-+
-+#
-+# Disk-On-Chip Device Drivers
-+#
-+# CONFIG_MTD_DOC2000 is not set
-+# CONFIG_MTD_DOC2001 is not set
-+# CONFIG_MTD_DOC2001PLUS is not set
-+# CONFIG_MTD_DOCG3 is not set
-+CONFIG_MTD_NAND_ECC=y
-+# CONFIG_MTD_NAND_ECC_SMC is not set
-+CONFIG_MTD_NAND=y
-+# CONFIG_MTD_NAND_ECC_BCH is not set
-+# CONFIG_MTD_SM_COMMON is not set
-+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
-+# CONFIG_MTD_NAND_DENALI is not set
-+# CONFIG_MTD_NAND_GPIO is not set
-+CONFIG_MTD_NAND_OMAP2=y
-+# CONFIG_MTD_NAND_OMAP_BCH is not set
-+CONFIG_MTD_NAND_IDS=y
-+# CONFIG_MTD_NAND_DISKONCHIP is not set
-+# CONFIG_MTD_NAND_DOCG4 is not set
-+# CONFIG_MTD_NAND_NANDSIM is not set
-+# CONFIG_MTD_NAND_PLATFORM is not set
-+# CONFIG_MTD_ALAUDA is not set
-+CONFIG_MTD_ONENAND=y
-+CONFIG_MTD_ONENAND_VERIFY_WRITE=y
-+# CONFIG_MTD_ONENAND_GENERIC is not set
-+CONFIG_MTD_ONENAND_OMAP2=y
-+# CONFIG_MTD_ONENAND_OTP is not set
-+# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
-+# CONFIG_MTD_ONENAND_SIM is not set
-+
-+#
-+# LPDDR flash memory drivers
-+#
-+# CONFIG_MTD_LPDDR is not set
-+CONFIG_MTD_UBI=y
-+CONFIG_MTD_UBI_WL_THRESHOLD=4096
-+CONFIG_MTD_UBI_BEB_LIMIT=20
-+CONFIG_MTD_UBI_FASTMAP=y
-+# CONFIG_MTD_UBI_GLUEBI is not set
-+CONFIG_DTC=y
-+CONFIG_OF=y
-+
-+#
-+# Device Tree and Open Firmware support
-+#
-+CONFIG_PROC_DEVICETREE=y
-+# CONFIG_OF_SELFTEST is not set
-+CONFIG_OF_FLATTREE=y
-+CONFIG_OF_EARLY_FLATTREE=y
-+CONFIG_OF_ADDRESS=y
-+CONFIG_OF_IRQ=y
-+CONFIG_OF_DEVICE=y
-+CONFIG_OF_I2C=y
-+CONFIG_OF_NET=y
-+CONFIG_OF_MDIO=y
-+CONFIG_OF_MTD=y
-+# CONFIG_PARPORT is not set
-+CONFIG_BLK_DEV=y
-+# CONFIG_BLK_DEV_COW_COMMON is not set
-+CONFIG_BLK_DEV_LOOP=y
-+CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
-+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
-+# CONFIG_BLK_DEV_DRBD is not set
-+# CONFIG_BLK_DEV_NBD is not set
-+CONFIG_BLK_DEV_RAM=y
-+CONFIG_BLK_DEV_RAM_COUNT=16
-+CONFIG_BLK_DEV_RAM_SIZE=16384
-+# CONFIG_BLK_DEV_XIP is not set
-+# CONFIG_CDROM_PKTCDVD is not set
-+# CONFIG_ATA_OVER_ETH is not set
-+# CONFIG_MG_DISK is not set
-+CONFIG_VIRTIO_BLK=m
-+# CONFIG_BLK_DEV_RBD is not set
-+
-+#
-+# Misc devices
-+#
-+# CONFIG_SENSORS_LIS3LV02D is not set
-+# CONFIG_AD525X_DPOT is not set
-+# CONFIG_ATMEL_PWM is not set
-+# CONFIG_ICS932S401 is not set
-+# CONFIG_ENCLOSURE_SERVICES is not set
-+# CONFIG_APDS9802ALS is not set
-+# CONFIG_ISL29003 is not set
-+# CONFIG_ISL29020 is not set
-+CONFIG_SENSORS_TSL2550=m
-+# CONFIG_SENSORS_BH1780 is not set
-+# CONFIG_SENSORS_BH1770 is not set
-+# CONFIG_SENSORS_APDS990X is not set
-+# CONFIG_HMC6352 is not set
-+# CONFIG_DS1682 is not set
-+# CONFIG_TI_DAC7512 is not set
-+CONFIG_BMP085=y
-+CONFIG_BMP085_I2C=m
-+# CONFIG_BMP085_SPI is not set
-+# CONFIG_USB_SWITCH_FSA9480 is not set
-+# CONFIG_GPEVT is not set
-+# CONFIG_C2PORT is not set
-+
-+#
-+# EEPROM support
-+#
-+CONFIG_EEPROM_AT24=y
-+# CONFIG_EEPROM_AT25 is not set
-+# CONFIG_EEPROM_LEGACY is not set
-+# CONFIG_EEPROM_MAX6875 is not set
-+CONFIG_EEPROM_93CX6=y
-+# CONFIG_EEPROM_93XX46 is not set
-+
-+#
-+# Texas Instruments shared transport line discipline
-+#
-+CONFIG_TI_ST=m
-+# CONFIG_SENSORS_LIS3_SPI is not set
-+# CONFIG_SENSORS_LIS3_I2C is not set
-+
-+#
-+# Altera FPGA firmware download module
-+#
-+# CONFIG_ALTERA_STAPL is not set
-+
-+#
-+# SCSI device support
-+#
-+CONFIG_SCSI_MOD=y
-+# CONFIG_RAID_ATTRS is not set
-+CONFIG_SCSI=y
-+CONFIG_SCSI_DMA=y
-+# CONFIG_SCSI_TGT is not set
-+# CONFIG_SCSI_NETLINK is not set
-+CONFIG_SCSI_PROC_FS=y
-+
-+#
-+# SCSI support type (disk, tape, CD-ROM)
-+#
-+CONFIG_BLK_DEV_SD=y
-+# CONFIG_CHR_DEV_ST is not set
-+# CONFIG_CHR_DEV_OSST is not set
-+# CONFIG_BLK_DEV_SR is not set
-+# CONFIG_CHR_DEV_SG is not set
-+# CONFIG_CHR_DEV_SCH is not set
-+CONFIG_SCSI_MULTI_LUN=y
-+# CONFIG_SCSI_CONSTANTS is not set
-+# CONFIG_SCSI_LOGGING is not set
-+CONFIG_SCSI_SCAN_ASYNC=y
-+
-+#
-+# SCSI Transports
-+#
-+# CONFIG_SCSI_SPI_ATTRS is not set
-+# CONFIG_SCSI_FC_ATTRS is not set
-+# CONFIG_SCSI_ISCSI_ATTRS is not set
-+# CONFIG_SCSI_SAS_ATTRS is not set
-+# CONFIG_SCSI_SAS_LIBSAS is not set
-+# CONFIG_SCSI_SRP_ATTRS is not set
-+CONFIG_SCSI_LOWLEVEL=y
-+# CONFIG_ISCSI_TCP is not set
-+# CONFIG_ISCSI_BOOT_SYSFS is not set
-+# CONFIG_LIBFC is not set
-+# CONFIG_LIBFCOE is not set
-+# CONFIG_SCSI_DEBUG is not set
-+CONFIG_SCSI_VIRTIO=m
-+# CONFIG_SCSI_DH is not set
-+# CONFIG_SCSI_OSD_INITIATOR is not set
-+# CONFIG_ATA is not set
-+CONFIG_MD=y
-+# CONFIG_BLK_DEV_MD is not set
-+# CONFIG_BLK_DEV_DM is not set
-+# CONFIG_TARGET_CORE is not set
-+CONFIG_NETDEVICES=y
-+CONFIG_NET_CORE=y
-+# CONFIG_BONDING is not set
-+# CONFIG_DUMMY is not set
-+# CONFIG_EQUALIZER is not set
-+CONFIG_MII=y
-+# CONFIG_NET_TEAM is not set
-+# CONFIG_MACVLAN is not set
-+CONFIG_VXLAN=m
-+# CONFIG_NETCONSOLE is not set
-+# CONFIG_NETPOLL is not set
-+# CONFIG_NET_POLL_CONTROLLER is not set
-+CONFIG_TUN=m
-+# CONFIG_VETH is not set
-+CONFIG_VIRTIO_NET=m
-+
-+#
-+# CAIF transport drivers
-+#
-+
-+#
-+# Distributed Switch Architecture drivers
-+#
-+# CONFIG_NET_DSA_MV88E6XXX is not set
-+# CONFIG_NET_DSA_MV88E6060 is not set
-+# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set
-+# CONFIG_NET_DSA_MV88E6131 is not set
-+# CONFIG_NET_DSA_MV88E6123_61_65 is not set
-+CONFIG_ETHERNET=y
-+CONFIG_NET_CADENCE=y
-+# CONFIG_ARM_AT91_ETHER is not set
-+# CONFIG_MACB is not set
-+CONFIG_NET_VENDOR_BROADCOM=y
-+# CONFIG_B44 is not set
-+# CONFIG_NET_CALXEDA_XGMAC is not set
-+CONFIG_NET_VENDOR_CIRRUS=y
-+# CONFIG_CS89x0 is not set
-+# CONFIG_DM9000 is not set
-+# CONFIG_DNET is not set
-+CONFIG_NET_VENDOR_FARADAY=y
-+# CONFIG_FTMAC100 is not set
-+# CONFIG_FTGMAC100 is not set
-+CONFIG_NET_VENDOR_INTEL=y
-+CONFIG_NET_VENDOR_I825XX=y
-+CONFIG_NET_VENDOR_MARVELL=y
-+CONFIG_MVMDIO=m
-+CONFIG_NET_VENDOR_MICREL=y
-+CONFIG_KS8842=m
-+CONFIG_KS8851=y
-+CONFIG_KS8851_MLL=y
-+CONFIG_NET_VENDOR_MICROCHIP=y
-+# CONFIG_ENC28J60 is not set
-+CONFIG_NET_VENDOR_NATSEMI=y
-+CONFIG_NET_VENDOR_8390=y
-+# CONFIG_AX88796 is not set
-+# CONFIG_ETHOC is not set
-+CONFIG_NET_VENDOR_SEEQ=y
-+# CONFIG_SEEQ8005 is not set
-+CONFIG_NET_VENDOR_SMSC=y
-+CONFIG_SMC91X=y
-+# CONFIG_SMC911X is not set
-+CONFIG_SMSC911X=y
-+# CONFIG_SMSC911X_ARCH_HOOKS is not set
-+CONFIG_NET_VENDOR_STMICRO=y
-+# CONFIG_STMMAC_ETH is not set
-+CONFIG_NET_VENDOR_TI=y
-+CONFIG_TI_DAVINCI_EMAC=y
-+CONFIG_TI_DAVINCI_MDIO=y
-+CONFIG_TI_DAVINCI_CPDMA=y
-+CONFIG_TI_CPSW=y
-+# CONFIG_TI_CPTS is not set
-+CONFIG_NET_VENDOR_WIZNET=y
-+# CONFIG_WIZNET_W5100 is not set
-+# CONFIG_WIZNET_W5300 is not set
-+CONFIG_PHYLIB=y
-+
-+#
-+# MII PHY device drivers
-+#
-+CONFIG_AT803X_PHY=y
-+# CONFIG_AMD_PHY is not set
-+# CONFIG_MARVELL_PHY is not set
-+# CONFIG_DAVICOM_PHY is not set
-+# CONFIG_QSEMI_PHY is not set
-+# CONFIG_LXT_PHY is not set
-+# CONFIG_CICADA_PHY is not set
-+# CONFIG_VITESSE_PHY is not set
-+CONFIG_SMSC_PHY=y
-+# CONFIG_BROADCOM_PHY is not set
-+# CONFIG_BCM87XX_PHY is not set
-+# CONFIG_ICPLUS_PHY is not set
-+# CONFIG_REALTEK_PHY is not set
-+# CONFIG_NATIONAL_PHY is not set
-+# CONFIG_STE10XP is not set
-+# CONFIG_LSI_ET1011C_PHY is not set
-+# CONFIG_MICREL_PHY is not set
-+# CONFIG_FIXED_PHY is not set
-+# CONFIG_MDIO_BITBANG is not set
-+CONFIG_MDIO_BUS_MUX=m
-+# CONFIG_MDIO_BUS_MUX_GPIO is not set
-+CONFIG_MDIO_BUS_MUX_MMIOREG=m
-+# CONFIG_MICREL_KS8995MA is not set
-+CONFIG_PPP=m
-+CONFIG_PPP_BSDCOMP=m
-+CONFIG_PPP_DEFLATE=m
-+CONFIG_PPP_FILTER=y
-+CONFIG_PPP_MPPE=m
-+CONFIG_PPP_MULTILINK=y
-+CONFIG_PPPOE=m
-+CONFIG_PPTP=m
-+CONFIG_PPPOL2TP=m
-+CONFIG_PPP_ASYNC=m
-+# CONFIG_PPP_SYNC_TTY is not set
-+# CONFIG_SLIP is not set
-+CONFIG_SLHC=m
-+
-+#
-+# USB Network Adapters
-+#
-+# CONFIG_USB_CATC is not set
-+# CONFIG_USB_KAWETH is not set
-+# CONFIG_USB_PEGASUS is not set
-+# CONFIG_USB_RTL8150 is not set
-+CONFIG_USB_USBNET=y
-+CONFIG_USB_NET_AX8817X=y
-+CONFIG_USB_NET_CDCETHER=y
-+# CONFIG_USB_NET_CDC_EEM is not set
-+CONFIG_USB_NET_CDC_NCM=y
-+CONFIG_USB_NET_CDC_MBIM=y
-+# CONFIG_USB_NET_DM9601 is not set
-+# CONFIG_USB_NET_SMSC75XX is not set
-+CONFIG_USB_NET_SMSC95XX=y
-+# CONFIG_USB_NET_GL620A is not set
-+CONFIG_USB_NET_NET1080=y
-+# CONFIG_USB_NET_PLUSB is not set
-+# CONFIG_USB_NET_MCS7830 is not set
-+# CONFIG_USB_NET_RNDIS_HOST is not set
-+CONFIG_USB_NET_CDC_SUBSET=y
-+CONFIG_USB_ALI_M5632=y
-+CONFIG_USB_AN2720=y
-+CONFIG_USB_BELKIN=y
-+CONFIG_USB_ARMLINUX=y
-+CONFIG_USB_EPSON2888=y
-+CONFIG_USB_KC2190=y
-+CONFIG_USB_NET_ZAURUS=y
-+# CONFIG_USB_NET_CX82310_ETH is not set
-+# CONFIG_USB_NET_KALMIA is not set
-+# CONFIG_USB_NET_QMI_WWAN is not set
-+# CONFIG_USB_HSO is not set
-+# CONFIG_USB_NET_INT51X1 is not set
-+# CONFIG_USB_CDC_PHONET is not set
-+# CONFIG_USB_IPHETH is not set
-+# CONFIG_USB_SIERRA_NET is not set
-+# CONFIG_USB_VL600 is not set
-+CONFIG_WLAN=y
-+# CONFIG_LIBERTAS_THINFIRM is not set
-+# CONFIG_AT76C50X_USB is not set
-+# CONFIG_USB_ZD1201 is not set
-+# CONFIG_USB_NET_RNDIS_WLAN is not set
-+# CONFIG_RTL8187 is not set
-+# CONFIG_MAC80211_HWSIM is not set
-+CONFIG_ATH_CARDS=m
-+# CONFIG_ATH_DEBUG is not set
-+# CONFIG_ATH9K is not set
-+# CONFIG_ATH9K_HTC is not set
-+# CONFIG_CARL9170 is not set
-+# CONFIG_ATH6KL is not set
-+# CONFIG_AR5523 is not set
-+# CONFIG_B43 is not set
-+# CONFIG_B43LEGACY is not set
-+# CONFIG_BRCMFMAC is not set
-+# CONFIG_HOSTAP is not set
-+CONFIG_LIBERTAS=m
-+CONFIG_LIBERTAS_USB=m
-+CONFIG_LIBERTAS_SDIO=m
-+# CONFIG_LIBERTAS_SPI is not set
-+CONFIG_LIBERTAS_DEBUG=y
-+# CONFIG_LIBERTAS_MESH is not set
-+# CONFIG_P54_COMMON is not set
-+# CONFIG_RT2X00 is not set
-+# CONFIG_RTL8192CU is not set
-+CONFIG_WL_TI=y
-+CONFIG_WL1251=m
-+CONFIG_WL1251_SPI=m
-+CONFIG_WL1251_SDIO=m
-+CONFIG_WL12XX=m
-+CONFIG_WL18XX=m
-+CONFIG_WLCORE=m
-+CONFIG_WLCORE_SPI=m
-+CONFIG_WLCORE_SDIO=m
-+CONFIG_WL12XX_PLATFORM_DATA=y
-+# CONFIG_ZD1211RW is not set
-+# CONFIG_MWIFIEX is not set
-+
-+#
-+# WiMAX Wireless Broadband devices
-+#
-+# CONFIG_WIMAX_I2400M_USB is not set
-+# CONFIG_WAN is not set
-+# CONFIG_ISDN is not set
-+
-+#
-+# Input device support
-+#
-+CONFIG_INPUT=y
-+# CONFIG_INPUT_FF_MEMLESS is not set
-+# CONFIG_INPUT_POLLDEV is not set
-+# CONFIG_INPUT_SPARSEKMAP is not set
-+CONFIG_INPUT_MATRIXKMAP=y
-+
-+#
-+# Userland interfaces
-+#
-+CONFIG_INPUT_MOUSEDEV=y
-+CONFIG_INPUT_MOUSEDEV_PSAUX=y
-+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-+CONFIG_INPUT_JOYDEV=y
-+CONFIG_INPUT_EVDEV=y
-+# CONFIG_INPUT_EVBUG is not set
-+
-+#
-+# Input Device Drivers
-+#
-+CONFIG_INPUT_KEYBOARD=y
-+# CONFIG_KEYBOARD_ADP5588 is not set
-+# CONFIG_KEYBOARD_ADP5589 is not set
-+CONFIG_KEYBOARD_ATKBD=y
-+# CONFIG_KEYBOARD_QT1070 is not set
-+# CONFIG_KEYBOARD_QT2160 is not set
-+# CONFIG_KEYBOARD_LKKBD is not set
-+CONFIG_KEYBOARD_GPIO=y
-+# CONFIG_KEYBOARD_TCA6416 is not set
-+# CONFIG_KEYBOARD_TCA8418 is not set
-+# CONFIG_KEYBOARD_MATRIX is not set
-+# CONFIG_KEYBOARD_LM8323 is not set
-+# CONFIG_KEYBOARD_LM8333 is not set
-+# CONFIG_KEYBOARD_MAX7359 is not set
-+# CONFIG_KEYBOARD_MCS is not set
-+# CONFIG_KEYBOARD_MPR121 is not set
-+# CONFIG_KEYBOARD_NEWTON is not set
-+# CONFIG_KEYBOARD_OPENCORES is not set
-+# CONFIG_KEYBOARD_SAMSUNG is not set
-+# CONFIG_KEYBOARD_STOWAWAY is not set
-+# CONFIG_KEYBOARD_SUNKBD is not set
-+# CONFIG_KEYBOARD_OMAP4 is not set
-+CONFIG_KEYBOARD_TWL4030=y
-+# CONFIG_KEYBOARD_XTKBD is not set
-+CONFIG_INPUT_MOUSE=y
-+CONFIG_MOUSE_PS2=y
-+CONFIG_MOUSE_PS2_ALPS=y
-+CONFIG_MOUSE_PS2_LOGIPS2PP=y
-+CONFIG_MOUSE_PS2_SYNAPTICS=y
-+CONFIG_MOUSE_PS2_TRACKPOINT=y
-+# CONFIG_MOUSE_PS2_ELANTECH is not set
-+# CONFIG_MOUSE_PS2_SENTELIC is not set
-+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
-+# CONFIG_MOUSE_SERIAL is not set
-+# CONFIG_MOUSE_APPLETOUCH is not set
-+# CONFIG_MOUSE_BCM5974 is not set
-+# CONFIG_MOUSE_VSXXXAA is not set
-+# CONFIG_MOUSE_GPIO is not set
-+# CONFIG_MOUSE_SYNAPTICS_I2C is not set
-+# CONFIG_MOUSE_SYNAPTICS_USB is not set
-+# CONFIG_INPUT_JOYSTICK is not set
-+# CONFIG_INPUT_TABLET is not set
-+CONFIG_INPUT_TOUCHSCREEN=y
-+CONFIG_TOUCHSCREEN_ADS7846=y
-+# CONFIG_TOUCHSCREEN_AD7877 is not set
-+# CONFIG_TOUCHSCREEN_AD7879 is not set
-+# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set
-+# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set
-+# CONFIG_TOUCHSCREEN_BU21013 is not set
-+# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set
-+# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set
-+# CONFIG_TOUCHSCREEN_DYNAPRO is not set
-+# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set
-+# CONFIG_TOUCHSCREEN_EETI is not set
-+# CONFIG_TOUCHSCREEN_EGALAX is not set
-+# CONFIG_TOUCHSCREEN_FUJITSU is not set
-+# CONFIG_TOUCHSCREEN_ILI210X is not set
-+# CONFIG_TOUCHSCREEN_GUNZE is not set
-+# CONFIG_TOUCHSCREEN_ELO is not set
-+# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
-+# CONFIG_TOUCHSCREEN_WACOM_I2C is not set
-+# CONFIG_TOUCHSCREEN_MAX11801 is not set
-+# CONFIG_TOUCHSCREEN_MCS5000 is not set
-+CONFIG_TOUCHSCREEN_MMS114=m
-+# CONFIG_TOUCHSCREEN_MTOUCH is not set
-+# CONFIG_TOUCHSCREEN_INEXIO is not set
-+# CONFIG_TOUCHSCREEN_MK712 is not set
-+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
-+CONFIG_TOUCHSCREEN_EDT_FT5X06=m
-+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
-+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
-+CONFIG_TOUCHSCREEN_TI_AM335X_TSC=y
-+# CONFIG_TOUCHSCREEN_PIXCIR is not set
-+CONFIG_TOUCHSCREEN_WM97XX=m
-+CONFIG_TOUCHSCREEN_WM9705=y
-+CONFIG_TOUCHSCREEN_WM9712=y
-+CONFIG_TOUCHSCREEN_WM9713=y
-+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
-+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
-+# CONFIG_TOUCHSCREEN_TSC_SERIO is not set
-+# CONFIG_TOUCHSCREEN_TSC2005 is not set
-+CONFIG_TOUCHSCREEN_TSC2007=m
-+# CONFIG_TOUCHSCREEN_W90X900 is not set
-+# CONFIG_TOUCHSCREEN_ST1232 is not set
-+# CONFIG_TOUCHSCREEN_TPS6507X is not set
-+CONFIG_INPUT_MISC=y
-+# CONFIG_INPUT_AD714X is not set
-+# CONFIG_INPUT_BMA150 is not set
-+# CONFIG_INPUT_MMA8450 is not set
-+# CONFIG_INPUT_MPU3050 is not set
-+# CONFIG_INPUT_GP2A is not set
-+# CONFIG_INPUT_GPIO_TILT_POLLED is not set
-+# CONFIG_INPUT_ATI_REMOTE2 is not set
-+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
-+# CONFIG_INPUT_KXTJ9 is not set
-+# CONFIG_INPUT_POWERMATE is not set
-+# CONFIG_INPUT_YEALINK is not set
-+# CONFIG_INPUT_CM109 is not set
-+CONFIG_INPUT_TWL4030_PWRBUTTON=y
-+# CONFIG_INPUT_TWL4030_VIBRA is not set
-+# CONFIG_INPUT_UINPUT is not set
-+# CONFIG_INPUT_PCF8574 is not set
-+CONFIG_INPUT_PWM_BEEPER=m
-+# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
-+# CONFIG_INPUT_ADXL34X is not set
-+# CONFIG_INPUT_CMA3000 is not set
-+
-+#
-+# Hardware I/O ports
-+#
-+CONFIG_SERIO=y
-+CONFIG_SERIO_SERPORT=y
-+CONFIG_SERIO_LIBPS2=y
-+# CONFIG_SERIO_RAW is not set
-+# CONFIG_SERIO_ALTERA_PS2 is not set
-+# CONFIG_SERIO_PS2MULT is not set
-+# CONFIG_SERIO_ARC_PS2 is not set
-+# CONFIG_GAMEPORT is not set
-+
-+#
-+# Character devices
-+#
-+CONFIG_VT=y
-+CONFIG_CONSOLE_TRANSLATIONS=y
-+CONFIG_VT_CONSOLE=y
-+CONFIG_VT_CONSOLE_SLEEP=y
-+CONFIG_HW_CONSOLE=y
-+CONFIG_VT_HW_CONSOLE_BINDING=y
-+CONFIG_UNIX98_PTYS=y
-+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
-+# CONFIG_LEGACY_PTYS is not set
-+# CONFIG_SERIAL_NONSTANDARD is not set
-+# CONFIG_N_GSM is not set
-+# CONFIG_TRACE_SINK is not set
-+CONFIG_DEVKMEM=y
-+
-+#
-+# Serial drivers
-+#
-+CONFIG_SERIAL_8250=y
-+CONFIG_SERIAL_8250_CONSOLE=y
-+CONFIG_SERIAL_8250_NR_UARTS=32
-+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-+CONFIG_SERIAL_8250_EXTENDED=y
-+CONFIG_SERIAL_8250_MANY_PORTS=y
-+CONFIG_SERIAL_8250_SHARE_IRQ=y
-+CONFIG_SERIAL_8250_DETECT_IRQ=y
-+CONFIG_SERIAL_8250_RSA=y
-+# CONFIG_SERIAL_8250_DW is not set
-+# CONFIG_SERIAL_8250_EM is not set
-+
-+#
-+# Non-8250 serial port support
-+#
-+# CONFIG_SERIAL_MAX3100 is not set
-+# CONFIG_SERIAL_MAX310X is not set
-+CONFIG_SERIAL_CORE=y
-+CONFIG_SERIAL_CORE_CONSOLE=y
-+# CONFIG_SERIAL_OF_PLATFORM is not set
-+CONFIG_SERIAL_OMAP=y
-+CONFIG_SERIAL_OMAP_CONSOLE=y
-+# CONFIG_SERIAL_SCCNXP is not set
-+# CONFIG_SERIAL_TIMBERDALE is not set
-+# CONFIG_SERIAL_ALTERA_JTAGUART is not set
-+# CONFIG_SERIAL_ALTERA_UART is not set
-+# CONFIG_SERIAL_IFX6X60 is not set
-+# CONFIG_SERIAL_XILINX_PS_UART is not set
-+# CONFIG_SERIAL_ARC is not set
-+# CONFIG_TTY_PRINTK is not set
-+CONFIG_HVC_DRIVER=y
-+# CONFIG_HVC_DCC is not set
-+CONFIG_VIRTIO_CONSOLE=m
-+# CONFIG_IPMI_HANDLER is not set
-+CONFIG_HW_RANDOM=y
-+# CONFIG_HW_RANDOM_TIMERIOMEM is not set
-+# CONFIG_HW_RANDOM_ATMEL is not set
-+CONFIG_HW_RANDOM_VIRTIO=m
-+# CONFIG_HW_RANDOM_EXYNOS is not set
-+# CONFIG_R3964 is not set
-+# CONFIG_RAW_DRIVER is not set
-+# CONFIG_TCG_TPM is not set
-+CONFIG_I2C=y
-+CONFIG_I2C_BOARDINFO=y
-+CONFIG_I2C_COMPAT=y
-+CONFIG_I2C_CHARDEV=y
-+# CONFIG_I2C_MUX is not set
-+CONFIG_I2C_HELPER_AUTO=y
-+CONFIG_I2C_ALGOBIT=y
-+
-+#
-+# I2C Hardware Bus support
-+#
-+
-+#
-+# I2C system bus drivers (mostly embedded / system-on-chip)
-+#
-+# CONFIG_I2C_CBUS_GPIO is not set
-+# CONFIG_I2C_DESIGNWARE_PLATFORM is not set
-+# CONFIG_I2C_GPIO is not set
-+# CONFIG_I2C_OCORES is not set
-+CONFIG_I2C_OMAP=y
-+# CONFIG_I2C_PCA_PLATFORM is not set
-+# CONFIG_I2C_PXA_PCI is not set
-+# CONFIG_I2C_SIMTEC is not set
-+# CONFIG_I2C_XILINX is not set
-+
-+#
-+# External I2C/SMBus adapter drivers
-+#
-+# CONFIG_I2C_DIOLAN_U2C is not set
-+# CONFIG_I2C_PARPORT_LIGHT is not set
-+# CONFIG_I2C_TAOS_EVM is not set
-+# CONFIG_I2C_TINY_USB is not set
-+
-+#
-+# Other I2C/SMBus bus drivers
-+#
-+# CONFIG_I2C_STUB is not set
-+# CONFIG_I2C_DEBUG_CORE is not set
-+# CONFIG_I2C_DEBUG_ALGO is not set
-+# CONFIG_I2C_DEBUG_BUS is not set
-+CONFIG_SPI=y
-+# CONFIG_SPI_DEBUG is not set
-+CONFIG_SPI_MASTER=y
-+
-+#
-+# SPI Master Controller Drivers
-+#
-+# CONFIG_SPI_ALTERA is not set
-+# CONFIG_SPI_BITBANG is not set
-+# CONFIG_SPI_GPIO is not set
-+# CONFIG_SPI_OC_TINY is not set
-+CONFIG_SPI_OMAP24XX=y
-+# CONFIG_SPI_PXA2XX_PCI is not set
-+CONFIG_SPI_SC18IS602=m
-+CONFIG_SPI_XCOMM=m
-+# CONFIG_SPI_XILINX is not set
-+# CONFIG_SPI_DESIGNWARE is not set
-+
-+#
-+# SPI Protocol Masters
-+#
-+CONFIG_SPI_SPIDEV=y
-+# CONFIG_SPI_TLE62X0 is not set
-+# CONFIG_HSI is not set
-+
-+#
-+# PPS support
-+#
-+CONFIG_PPS=y
-+# CONFIG_PPS_DEBUG is not set
-+
-+#
-+# PPS clients support
-+#
-+# CONFIG_PPS_CLIENT_KTIMER is not set
-+# CONFIG_PPS_CLIENT_LDISC is not set
-+# CONFIG_PPS_CLIENT_GPIO is not set
-+
-+#
-+# PPS generators support
-+#
-+
-+#
-+# PTP clock support
-+#
-+CONFIG_PTP_1588_CLOCK=y
-+
-+#
-+# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.
-+#
-+# CONFIG_PTP_1588_CLOCK_PCH is not set
-+CONFIG_PINCTRL=y
-+
-+#
-+# Pin controllers
-+#
-+CONFIG_PINMUX=y
-+CONFIG_PINCONF=y
-+# CONFIG_DEBUG_PINCTRL is not set
-+CONFIG_PINCTRL_SINGLE=y
-+# CONFIG_PINCTRL_EXYNOS4 is not set
-+# CONFIG_PINCTRL_EXYNOS5440 is not set
-+CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
-+CONFIG_ARCH_REQUIRE_GPIOLIB=y
-+CONFIG_GPIOLIB=y
-+CONFIG_OF_GPIO=y
-+CONFIG_DEBUG_GPIO=y
-+CONFIG_GPIO_SYSFS=y
-+
-+#
-+# Memory mapped GPIO drivers:
-+#
-+# CONFIG_GPIO_GENERIC_PLATFORM is not set
-+# CONFIG_GPIO_EM is not set
-+# CONFIG_GPIO_TS5500 is not set
-+
-+#
-+# I2C GPIO expanders:
-+#
-+# CONFIG_GPIO_MAX7300 is not set
-+# CONFIG_GPIO_MAX732X is not set
-+# CONFIG_GPIO_PCF857X is not set
-+# CONFIG_GPIO_SX150X is not set
-+CONFIG_GPIO_TWL4030=y
-+# CONFIG_GPIO_ADP5588 is not set
-+# CONFIG_GPIO_ADNP is not set
-+
-+#
-+# PCI GPIO expanders:
-+#
-+
-+#
-+# SPI GPIO expanders:
-+#
-+# CONFIG_GPIO_MAX7301 is not set
-+# CONFIG_GPIO_MCP23S08 is not set
-+# CONFIG_GPIO_MC33880 is not set
-+# CONFIG_GPIO_74X164 is not set
-+
-+#
-+# AC97 GPIO expanders:
-+#
-+
-+#
-+# MODULbus GPIO expanders:
-+#
-+
-+#
-+# USB GPIO expanders:
-+#
-+CONFIG_W1=y
-+CONFIG_W1_CON=y
-+
-+#
-+# 1-wire Bus Masters
-+#
-+CONFIG_W1_MASTER_DS2490=m
-+CONFIG_W1_MASTER_DS2482=m
-+CONFIG_W1_MASTER_DS1WM=m
-+CONFIG_W1_MASTER_GPIO=y
-+CONFIG_HDQ_MASTER_OMAP=m
-+
-+#
-+# 1-wire Slaves
-+#
-+CONFIG_W1_SLAVE_THERM=y
-+CONFIG_W1_SLAVE_SMEM=y
-+CONFIG_W1_SLAVE_DS2408=m
-+CONFIG_W1_SLAVE_DS2423=m
-+CONFIG_W1_SLAVE_DS2431=m
-+CONFIG_W1_SLAVE_DS2433=m
-+CONFIG_W1_SLAVE_DS2433_CRC=y
-+CONFIG_W1_SLAVE_DS2760=m
-+CONFIG_W1_SLAVE_DS2780=m
-+CONFIG_W1_SLAVE_DS2781=m
-+CONFIG_W1_SLAVE_DS28E04=m
-+CONFIG_W1_SLAVE_BQ27000=m
-+CONFIG_POWER_SUPPLY=y
-+# CONFIG_POWER_SUPPLY_DEBUG is not set
-+# CONFIG_PDA_POWER is not set
-+CONFIG_GENERIC_ADC_BATTERY=m
-+# CONFIG_TEST_POWER is not set
-+# CONFIG_BATTERY_DS2760 is not set
-+# CONFIG_BATTERY_DS2780 is not set
-+# CONFIG_BATTERY_DS2781 is not set
-+# CONFIG_BATTERY_DS2782 is not set
-+# CONFIG_BATTERY_SBS is not set
-+# CONFIG_BATTERY_BQ27x00 is not set
-+# CONFIG_BATTERY_MAX17040 is not set
-+# CONFIG_BATTERY_MAX17042 is not set
-+# CONFIG_CHARGER_ISP1704 is not set
-+# CONFIG_CHARGER_MAX8903 is not set
-+# CONFIG_CHARGER_TWL4030 is not set
-+# CONFIG_CHARGER_LP8727 is not set
-+CONFIG_CHARGER_GPIO=m
-+# CONFIG_CHARGER_MANAGER is not set
-+CONFIG_CHARGER_BQ2415X=m
-+# CONFIG_CHARGER_SMB347 is not set
-+# CONFIG_POWER_RESET is not set
-+# CONFIG_POWER_AVS is not set
-+CONFIG_HWMON=y
-+# CONFIG_HWMON_VID is not set
-+# CONFIG_HWMON_DEBUG_CHIP is not set
-+
-+#
-+# Native drivers
-+#
-+# CONFIG_SENSORS_AD7314 is not set
-+# CONFIG_SENSORS_AD7414 is not set
-+# CONFIG_SENSORS_AD7418 is not set
-+# CONFIG_SENSORS_ADCXX is not set
-+# CONFIG_SENSORS_ADM1021 is not set
-+# CONFIG_SENSORS_ADM1025 is not set
-+# CONFIG_SENSORS_ADM1026 is not set
-+# CONFIG_SENSORS_ADM1029 is not set
-+# CONFIG_SENSORS_ADM1031 is not set
-+# CONFIG_SENSORS_ADM9240 is not set
-+CONFIG_SENSORS_ADT7410=m
-+# CONFIG_SENSORS_ADT7411 is not set
-+# CONFIG_SENSORS_ADT7462 is not set
-+# CONFIG_SENSORS_ADT7470 is not set
-+# CONFIG_SENSORS_ADT7475 is not set
-+# CONFIG_SENSORS_ASC7621 is not set
-+# CONFIG_SENSORS_ATXP1 is not set
-+# CONFIG_SENSORS_DS620 is not set
-+# CONFIG_SENSORS_DS1621 is not set
-+# CONFIG_SENSORS_F71805F is not set
-+# CONFIG_SENSORS_F71882FG is not set
-+# CONFIG_SENSORS_F75375S is not set
-+# CONFIG_SENSORS_G760A is not set
-+# CONFIG_SENSORS_GL518SM is not set
-+# CONFIG_SENSORS_GL520SM is not set
-+CONFIG_SENSORS_GPIO_FAN=m
-+CONFIG_SENSORS_HIH6130=m
-+# CONFIG_SENSORS_IT87 is not set
-+# CONFIG_SENSORS_JC42 is not set
-+# CONFIG_SENSORS_LINEAGE is not set
-+# CONFIG_SENSORS_LM63 is not set
-+# CONFIG_SENSORS_LM70 is not set
-+# CONFIG_SENSORS_LM73 is not set
-+# CONFIG_SENSORS_LM75 is not set
-+# CONFIG_SENSORS_LM77 is not set
-+# CONFIG_SENSORS_LM78 is not set
-+# CONFIG_SENSORS_LM80 is not set
-+# CONFIG_SENSORS_LM83 is not set
-+# CONFIG_SENSORS_LM85 is not set
-+# CONFIG_SENSORS_LM87 is not set
-+# CONFIG_SENSORS_LM90 is not set
-+# CONFIG_SENSORS_LM92 is not set
-+# CONFIG_SENSORS_LM93 is not set
-+# CONFIG_SENSORS_LTC4151 is not set
-+# CONFIG_SENSORS_LTC4215 is not set
-+# CONFIG_SENSORS_LTC4245 is not set
-+# CONFIG_SENSORS_LTC4261 is not set
-+# CONFIG_SENSORS_LM95241 is not set
-+# CONFIG_SENSORS_LM95245 is not set
-+# CONFIG_SENSORS_MAX1111 is not set
-+# CONFIG_SENSORS_MAX16065 is not set
-+# CONFIG_SENSORS_MAX1619 is not set
-+# CONFIG_SENSORS_MAX1668 is not set
-+CONFIG_SENSORS_MAX197=m
-+# CONFIG_SENSORS_MAX6639 is not set
-+# CONFIG_SENSORS_MAX6642 is not set
-+# CONFIG_SENSORS_MAX6650 is not set
-+# CONFIG_SENSORS_MCP3021 is not set
-+# CONFIG_SENSORS_NTC_THERMISTOR is not set
-+# CONFIG_SENSORS_PC87360 is not set
-+# CONFIG_SENSORS_PC87427 is not set
-+# CONFIG_SENSORS_PCF8591 is not set
-+# CONFIG_PMBUS is not set
-+# CONFIG_SENSORS_SHT15 is not set
-+CONFIG_SENSORS_SHT21=m
-+# CONFIG_SENSORS_SMM665 is not set
-+# CONFIG_SENSORS_DME1737 is not set
-+# CONFIG_SENSORS_EMC1403 is not set
-+# CONFIG_SENSORS_EMC2103 is not set
-+# CONFIG_SENSORS_EMC6W201 is not set
-+# CONFIG_SENSORS_SMSC47M1 is not set
-+# CONFIG_SENSORS_SMSC47M192 is not set
-+# CONFIG_SENSORS_SMSC47B397 is not set
-+# CONFIG_SENSORS_SCH56XX_COMMON is not set
-+# CONFIG_SENSORS_SCH5627 is not set
-+# CONFIG_SENSORS_SCH5636 is not set
-+# CONFIG_SENSORS_ADS1015 is not set
-+# CONFIG_SENSORS_ADS7828 is not set
-+# CONFIG_SENSORS_ADS7871 is not set
-+# CONFIG_SENSORS_AMC6821 is not set
-+# CONFIG_SENSORS_INA2XX is not set
-+# CONFIG_SENSORS_THMC50 is not set
-+CONFIG_SENSORS_TMP102=m
-+# CONFIG_SENSORS_TMP401 is not set
-+# CONFIG_SENSORS_TMP421 is not set
-+# CONFIG_SENSORS_VT1211 is not set
-+# CONFIG_SENSORS_W83781D is not set
-+# CONFIG_SENSORS_W83791D is not set
-+# CONFIG_SENSORS_W83792D is not set
-+# CONFIG_SENSORS_W83793 is not set
-+# CONFIG_SENSORS_W83795 is not set
-+# CONFIG_SENSORS_W83L785TS is not set
-+# CONFIG_SENSORS_W83L786NG is not set
-+# CONFIG_SENSORS_W83627HF is not set
-+# CONFIG_SENSORS_W83627EHF is not set
-+CONFIG_THERMAL=y
-+CONFIG_THERMAL_HWMON=y
-+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
-+# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
-+# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set
-+CONFIG_FAIR_SHARE=y
-+CONFIG_STEP_WISE=y
-+CONFIG_USER_SPACE=y
-+CONFIG_CPU_THERMAL=y
-+CONFIG_WATCHDOG=y
-+CONFIG_WATCHDOG_CORE=y
-+# CONFIG_WATCHDOG_NOWAYOUT is not set
-+
-+#
-+# Watchdog Device Drivers
-+#
-+# CONFIG_SOFT_WATCHDOG is not set
-+# CONFIG_DW_WATCHDOG is not set
-+# CONFIG_MPCORE_WATCHDOG is not set
-+CONFIG_OMAP_WATCHDOG=y
-+CONFIG_TWL4030_WATCHDOG=y
-+# CONFIG_MAX63XX_WATCHDOG is not set
-+
-+#
-+# USB-based Watchdog Cards
-+#
-+# CONFIG_USBPCWATCHDOG is not set
-+CONFIG_SSB_POSSIBLE=y
-+
-+#
-+# Sonics Silicon Backplane
-+#
-+# CONFIG_SSB is not set
-+CONFIG_BCMA_POSSIBLE=y
-+
-+#
-+# Broadcom specific AMBA
-+#
-+# CONFIG_BCMA is not set
-+
-+#
-+# Multifunction device drivers
-+#
-+CONFIG_MFD_CORE=y
-+# CONFIG_MFD_88PM860X is not set
-+# CONFIG_MFD_88PM800 is not set
-+# CONFIG_MFD_88PM805 is not set
-+# CONFIG_MFD_SM501 is not set
-+# CONFIG_MFD_ASIC3 is not set
-+CONFIG_MFD_TI_AM335X_TSCADC=y
-+# CONFIG_HTC_EGPIO is not set
-+# CONFIG_HTC_PASIC3 is not set
-+# CONFIG_HTC_I2CPLD is not set
-+# CONFIG_UCB1400_CORE is not set
-+# CONFIG_MFD_LM3533 is not set
-+# CONFIG_TPS6105X is not set
-+# CONFIG_TPS65010 is not set
-+# CONFIG_TPS6507X is not set
-+CONFIG_MFD_TPS65217=y
-+# CONFIG_MFD_TPS6586X is not set
-+# CONFIG_MFD_TPS65910 is not set
-+# CONFIG_MFD_TPS65912_I2C is not set
-+# CONFIG_MFD_TPS65912_SPI is not set
-+# CONFIG_MFD_TPS80031 is not set
-+CONFIG_TWL4030_CORE=y
-+# CONFIG_TWL4030_MADC is not set
-+CONFIG_TWL4030_POWER=y
-+# CONFIG_MFD_TWL4030_AUDIO is not set
-+# CONFIG_TWL6040_CORE is not set
-+# CONFIG_MFD_STMPE is not set
-+# CONFIG_MFD_TC3589X is not set
-+# CONFIG_MFD_TMIO is not set
-+# CONFIG_MFD_T7L66XB is not set
-+# CONFIG_MFD_SMSC is not set
-+# CONFIG_MFD_TC6387XB is not set
-+# CONFIG_MFD_TC6393XB is not set
-+# CONFIG_PMIC_DA903X is not set
-+# CONFIG_MFD_DA9052_SPI is not set
-+# CONFIG_MFD_DA9052_I2C is not set
-+# CONFIG_MFD_DA9055 is not set
-+# CONFIG_PMIC_ADP5520 is not set
-+# CONFIG_MFD_LP8788 is not set
-+# CONFIG_MFD_MAX77686 is not set
-+# CONFIG_MFD_MAX77693 is not set
-+# CONFIG_MFD_MAX8907 is not set
-+# CONFIG_MFD_MAX8925 is not set
-+# CONFIG_MFD_MAX8997 is not set
-+# CONFIG_MFD_MAX8998 is not set
-+# CONFIG_MFD_SEC_CORE is not set
-+# CONFIG_MFD_ARIZONA_I2C is not set
-+# CONFIG_MFD_ARIZONA_SPI is not set
-+# CONFIG_MFD_WM8400 is not set
-+# CONFIG_MFD_WM831X_I2C is not set
-+# CONFIG_MFD_WM831X_SPI is not set
-+# CONFIG_MFD_WM8350_I2C is not set
-+# CONFIG_MFD_WM8994 is not set
-+# CONFIG_MFD_PCF50633 is not set
-+# CONFIG_MFD_MC13XXX_SPI is not set
-+# CONFIG_MFD_MC13XXX_I2C is not set
-+# CONFIG_ABX500_CORE is not set
-+# CONFIG_EZX_PCAP is not set
-+CONFIG_MFD_WL1273_CORE=m
-+# CONFIG_MFD_TPS65090 is not set
-+# CONFIG_MFD_AAT2870_CORE is not set
-+# CONFIG_MFD_RC5T583 is not set
-+# CONFIG_MFD_SYSCON is not set
-+# CONFIG_MFD_PALMAS is not set
-+# CONFIG_MFD_VIPERBOARD is not set
-+# CONFIG_MFD_RETU is not set
-+# CONFIG_MFD_AS3711 is not set
-+CONFIG_REGULATOR=y
-+# CONFIG_REGULATOR_DEBUG is not set
-+# CONFIG_REGULATOR_DUMMY is not set
-+CONFIG_REGULATOR_FIXED_VOLTAGE=y
-+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
-+# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
-+# CONFIG_REGULATOR_GPIO is not set
-+# CONFIG_REGULATOR_AD5398 is not set
-+# CONFIG_REGULATOR_FAN53555 is not set
-+# CONFIG_REGULATOR_ISL6271A is not set
-+# CONFIG_REGULATOR_MAX1586 is not set
-+# CONFIG_REGULATOR_MAX8649 is not set
-+# CONFIG_REGULATOR_MAX8660 is not set
-+# CONFIG_REGULATOR_MAX8952 is not set
-+# CONFIG_REGULATOR_MAX8973 is not set
-+# CONFIG_REGULATOR_LP3971 is not set
-+# CONFIG_REGULATOR_LP3972 is not set
-+# CONFIG_REGULATOR_LP872X is not set
-+# CONFIG_REGULATOR_TPS51632 is not set
-+# CONFIG_REGULATOR_TPS62360 is not set
-+CONFIG_REGULATOR_TPS65023=y
-+CONFIG_REGULATOR_TPS6507X=y
-+CONFIG_REGULATOR_TPS65217=y
-+# CONFIG_REGULATOR_TPS6524X is not set
-+CONFIG_REGULATOR_TWL4030=y
-+CONFIG_MEDIA_SUPPORT=m
-+
-+#
-+# Multimedia core support
-+#
-+CONFIG_MEDIA_CAMERA_SUPPORT=y
-+CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
-+CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
-+CONFIG_MEDIA_RADIO_SUPPORT=y
-+CONFIG_MEDIA_RC_SUPPORT=y
-+CONFIG_MEDIA_CONTROLLER=y
-+CONFIG_VIDEO_DEV=m
-+CONFIG_VIDEO_V4L2_SUBDEV_API=y
-+CONFIG_VIDEO_V4L2=m
-+# CONFIG_VIDEO_ADV_DEBUG is not set
-+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
-+CONFIG_VIDEO_TUNER=m
-+CONFIG_V4L2_MEM2MEM_DEV=m
-+CONFIG_VIDEOBUF_GEN=m
-+CONFIG_VIDEOBUF_VMALLOC=m
-+CONFIG_VIDEOBUF_DMA_CONTIG=m
-+CONFIG_VIDEOBUF_DVB=m
-+CONFIG_VIDEOBUF2_CORE=m
-+CONFIG_VIDEOBUF2_MEMOPS=m
-+CONFIG_VIDEOBUF2_DMA_CONTIG=m
-+CONFIG_VIDEOBUF2_VMALLOC=m
-+CONFIG_DVB_CORE=m
-+CONFIG_DVB_NET=y
-+CONFIG_DVB_MAX_ADAPTERS=8
-+CONFIG_DVB_DYNAMIC_MINORS=y
-+
-+#
-+# Media drivers
-+#
-+CONFIG_RC_CORE=m
-+CONFIG_RC_MAP=m
-+CONFIG_RC_DECODERS=y
-+CONFIG_LIRC=m
-+CONFIG_IR_LIRC_CODEC=m
-+CONFIG_IR_NEC_DECODER=m
-+CONFIG_IR_RC5_DECODER=m
-+CONFIG_IR_RC6_DECODER=m
-+CONFIG_IR_JVC_DECODER=m
-+CONFIG_IR_SONY_DECODER=m
-+CONFIG_IR_RC5_SZ_DECODER=m
-+CONFIG_IR_SANYO_DECODER=m
-+CONFIG_IR_MCE_KBD_DECODER=m
-+CONFIG_RC_DEVICES=y
-+CONFIG_RC_ATI_REMOTE=m
-+CONFIG_IR_IMON=m
-+CONFIG_IR_MCEUSB=m
-+CONFIG_IR_REDRAT3=m
-+CONFIG_IR_STREAMZAP=m
-+CONFIG_IR_IGUANA=m
-+CONFIG_IR_TTUSBIR=m
-+# CONFIG_IR_RX51 is not set
-+CONFIG_RC_LOOPBACK=m
-+CONFIG_IR_GPIO_CIR=m
-+CONFIG_MEDIA_USB_SUPPORT=y
-+
-+#
-+# Webcam devices
-+#
-+CONFIG_USB_VIDEO_CLASS=m
-+CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
-+CONFIG_USB_GSPCA=m
-+CONFIG_USB_M5602=m
-+CONFIG_USB_STV06XX=m
-+CONFIG_USB_GL860=m
-+CONFIG_USB_GSPCA_BENQ=m
-+CONFIG_USB_GSPCA_CONEX=m
-+CONFIG_USB_GSPCA_CPIA1=m
-+CONFIG_USB_GSPCA_ETOMS=m
-+CONFIG_USB_GSPCA_FINEPIX=m
-+CONFIG_USB_GSPCA_JEILINJ=m
-+CONFIG_USB_GSPCA_JL2005BCD=m
-+CONFIG_USB_GSPCA_KINECT=m
-+CONFIG_USB_GSPCA_KONICA=m
-+CONFIG_USB_GSPCA_MARS=m
-+CONFIG_USB_GSPCA_MR97310A=m
-+CONFIG_USB_GSPCA_NW80X=m
-+CONFIG_USB_GSPCA_OV519=m
-+CONFIG_USB_GSPCA_OV534=m
-+CONFIG_USB_GSPCA_OV534_9=m
-+CONFIG_USB_GSPCA_PAC207=m
-+CONFIG_USB_GSPCA_PAC7302=m
-+CONFIG_USB_GSPCA_PAC7311=m
-+CONFIG_USB_GSPCA_SE401=m
-+CONFIG_USB_GSPCA_SN9C2028=m
-+CONFIG_USB_GSPCA_SN9C20X=m
-+CONFIG_USB_GSPCA_SONIXB=m
-+CONFIG_USB_GSPCA_SONIXJ=m
-+CONFIG_USB_GSPCA_SPCA500=m
-+CONFIG_USB_GSPCA_SPCA501=m
-+CONFIG_USB_GSPCA_SPCA505=m
-+CONFIG_USB_GSPCA_SPCA506=m
-+CONFIG_USB_GSPCA_SPCA508=m
-+CONFIG_USB_GSPCA_SPCA561=m
-+CONFIG_USB_GSPCA_SPCA1528=m
-+CONFIG_USB_GSPCA_SQ905=m
-+CONFIG_USB_GSPCA_SQ905C=m
-+CONFIG_USB_GSPCA_SQ930X=m
-+CONFIG_USB_GSPCA_STK014=m
-+CONFIG_USB_GSPCA_STV0680=m
-+CONFIG_USB_GSPCA_SUNPLUS=m
-+CONFIG_USB_GSPCA_T613=m
-+CONFIG_USB_GSPCA_TOPRO=m
-+CONFIG_USB_GSPCA_TV8532=m
-+CONFIG_USB_GSPCA_VC032X=m
-+CONFIG_USB_GSPCA_VICAM=m
-+CONFIG_USB_GSPCA_XIRLINK_CIT=m
-+CONFIG_USB_GSPCA_ZC3XX=m
-+CONFIG_USB_PWC=m
-+# CONFIG_USB_PWC_DEBUG is not set
-+CONFIG_USB_PWC_INPUT_EVDEV=y
-+CONFIG_VIDEO_CPIA2=m
-+CONFIG_USB_ZR364XX=m
-+CONFIG_USB_STKWEBCAM=m
-+CONFIG_USB_S2255=m
-+CONFIG_USB_SN9C102=m
-+
-+#
-+# Analog TV USB devices
-+#
-+CONFIG_VIDEO_AU0828=m
-+CONFIG_VIDEO_PVRUSB2=m
-+CONFIG_VIDEO_PVRUSB2_SYSFS=y
-+CONFIG_VIDEO_PVRUSB2_DVB=y
-+# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-+CONFIG_VIDEO_HDPVR=m
-+CONFIG_VIDEO_TLG2300=m
-+CONFIG_VIDEO_USBVISION=m
-+CONFIG_VIDEO_STK1160=m
-+CONFIG_VIDEO_STK1160_AC97=y
-+
-+#
-+# Analog/digital TV USB devices
-+#
-+CONFIG_VIDEO_CX231XX=m
-+CONFIG_VIDEO_CX231XX_RC=y
-+CONFIG_VIDEO_CX231XX_ALSA=m
-+CONFIG_VIDEO_CX231XX_DVB=m
-+CONFIG_VIDEO_TM6000=m
-+CONFIG_VIDEO_TM6000_ALSA=m
-+CONFIG_VIDEO_TM6000_DVB=m
-+
-+#
-+# Digital TV USB devices
-+#
-+CONFIG_DVB_USB=m
-+# CONFIG_DVB_USB_DEBUG is not set
-+CONFIG_DVB_USB_A800=m
-+CONFIG_DVB_USB_DIBUSB_MB=m
-+CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y
-+CONFIG_DVB_USB_DIBUSB_MC=m
-+CONFIG_DVB_USB_DIB0700=m
-+CONFIG_DVB_USB_UMT_010=m
-+CONFIG_DVB_USB_CXUSB=m
-+CONFIG_DVB_USB_M920X=m
-+CONFIG_DVB_USB_DIGITV=m
-+CONFIG_DVB_USB_VP7045=m
-+CONFIG_DVB_USB_VP702X=m
-+CONFIG_DVB_USB_GP8PSK=m
-+CONFIG_DVB_USB_NOVA_T_USB2=m
-+CONFIG_DVB_USB_TTUSB2=m
-+CONFIG_DVB_USB_DTT200U=m
-+CONFIG_DVB_USB_OPERA1=m
-+CONFIG_DVB_USB_AF9005=m
-+CONFIG_DVB_USB_AF9005_REMOTE=m
-+CONFIG_DVB_USB_PCTV452E=m
-+CONFIG_DVB_USB_DW2102=m
-+CONFIG_DVB_USB_CINERGY_T2=m
-+CONFIG_DVB_USB_DTV5100=m
-+CONFIG_DVB_USB_FRIIO=m
-+CONFIG_DVB_USB_AZ6027=m
-+CONFIG_DVB_USB_TECHNISAT_USB2=m
-+CONFIG_DVB_USB_V2=m
-+CONFIG_DVB_USB_CYPRESS_FIRMWARE=m
-+CONFIG_DVB_USB_AF9015=m
-+CONFIG_DVB_USB_AF9035=m
-+CONFIG_DVB_USB_ANYSEE=m
-+CONFIG_DVB_USB_AU6610=m
-+CONFIG_DVB_USB_AZ6007=m
-+CONFIG_DVB_USB_CE6230=m
-+CONFIG_DVB_USB_EC168=m
-+CONFIG_DVB_USB_GL861=m
-+CONFIG_DVB_USB_IT913X=m
-+CONFIG_DVB_USB_LME2510=m
-+CONFIG_DVB_USB_MXL111SF=m
-+CONFIG_DVB_USB_RTL28XXU=m
-+# CONFIG_SMS_USB_DRV is not set
-+CONFIG_DVB_B2C2_FLEXCOP_USB=m
-+# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set
-+
-+#
-+# Webcam, TV (analog/digital) USB devices
-+#
-+CONFIG_VIDEO_EM28XX=m
-+CONFIG_VIDEO_EM28XX_ALSA=m
-+CONFIG_VIDEO_EM28XX_DVB=m
-+CONFIG_VIDEO_EM28XX_RC=m
-+CONFIG_TTPCI_EEPROM=m
-+CONFIG_V4L_PLATFORM_DRIVERS=y
-+CONFIG_VIDEO_VPSS_SYSTEM=m
-+CONFIG_VIDEO_VPFE_CAPTURE=m
-+CONFIG_VIDEO_DM6446_CCDC=m
-+CONFIG_VIDEO_OMAP2_VOUT_VRFB=y
-+CONFIG_VIDEO_OMAP2_VOUT=m
-+# CONFIG_VIDEO_TIMBERDALE is not set
-+CONFIG_SOC_CAMERA=m
-+CONFIG_SOC_CAMERA_PLATFORM=m
-+# CONFIG_VIDEO_SH_MOBILE_CSI2 is not set
-+# CONFIG_VIDEO_SH_MOBILE_CEU is not set
-+CONFIG_V4L_MEM2MEM_DRIVERS=y
-+CONFIG_VIDEO_MEM2MEM_DEINTERLACE=m
-+CONFIG_V4L_TEST_DRIVERS=y
-+CONFIG_VIDEO_VIVI=m
-+CONFIG_VIDEO_MEM2MEM_TESTDEV=m
-+
-+#
-+# Supported MMC/SDIO adapters
-+#
-+# CONFIG_SMS_SDIO_DRV is not set
-+CONFIG_RADIO_ADAPTERS=y
-+CONFIG_RADIO_SI470X=y
-+CONFIG_USB_SI470X=m
-+CONFIG_I2C_SI470X=m
-+CONFIG_USB_MR800=m
-+CONFIG_USB_DSBR=m
-+# CONFIG_RADIO_SHARK is not set
-+CONFIG_RADIO_SHARK2=m
-+CONFIG_I2C_SI4713=m
-+CONFIG_RADIO_SI4713=m
-+CONFIG_USB_KEENE=m
-+CONFIG_RADIO_TEA5764=m
-+CONFIG_RADIO_SAA7706H=m
-+CONFIG_RADIO_TEF6862=m
-+CONFIG_RADIO_WL1273=m
-+
-+#
-+# Texas Instruments WL128x FM driver (ST based)
-+#
-+CONFIG_RADIO_WL128X=m
-+CONFIG_DVB_B2C2_FLEXCOP=m
-+CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
-+
-+#
-+# Media ancillary drivers (tuners, sensors, i2c, frontends)
-+#
-+CONFIG_VIDEO_TVEEPROM=m
-+CONFIG_VIDEO_IR_I2C=m
-+
-+#
-+# Audio decoders, processors and mixers
-+#
-+CONFIG_VIDEO_MSP3400=m
-+CONFIG_VIDEO_CS53L32A=m
-+CONFIG_VIDEO_WM8775=m
-+
-+#
-+# RDS decoders
-+#
-+
-+#
-+# Video decoders
-+#
-+CONFIG_VIDEO_SAA711X=m
-+CONFIG_VIDEO_TVP5150=m
-+
-+#
-+# Video and audio decoders
-+#
-+CONFIG_VIDEO_CX25840=m
-+
-+#
-+# MPEG video encoders
-+#
-+CONFIG_VIDEO_CX2341X=m
-+
-+#
-+# Video encoders
-+#
-+
-+#
-+# Camera sensor devices
-+#
-+CONFIG_VIDEO_MT9V011=m
-+
-+#
-+# Flash devices
-+#
-+
-+#
-+# Video improvement chips
-+#
-+
-+#
-+# Miscelaneous helper chips
-+#
-+
-+#
-+# Sensors used on soc_camera driver
-+#
-+
-+#
-+# soc_camera sensor drivers
-+#
-+# CONFIG_SOC_CAMERA_IMX074 is not set
-+CONFIG_SOC_CAMERA_MT9M001=m
-+CONFIG_SOC_CAMERA_MT9M111=m
-+CONFIG_SOC_CAMERA_MT9T031=m
-+CONFIG_SOC_CAMERA_MT9T112=m
-+CONFIG_SOC_CAMERA_MT9V022=m
-+# CONFIG_SOC_CAMERA_OV2640 is not set
-+# CONFIG_SOC_CAMERA_OV5642 is not set
-+# CONFIG_SOC_CAMERA_OV6650 is not set
-+# CONFIG_SOC_CAMERA_OV772X is not set
-+# CONFIG_SOC_CAMERA_OV9640 is not set
-+# CONFIG_SOC_CAMERA_OV9740 is not set
-+# CONFIG_SOC_CAMERA_RJ54N1 is not set
-+# CONFIG_SOC_CAMERA_TW9910 is not set
-+CONFIG_MEDIA_ATTACH=y
-+CONFIG_MEDIA_TUNER=m
-+CONFIG_MEDIA_TUNER_SIMPLE=m
-+CONFIG_MEDIA_TUNER_TDA8290=m
-+CONFIG_MEDIA_TUNER_TDA827X=m
-+CONFIG_MEDIA_TUNER_TDA18271=m
-+CONFIG_MEDIA_TUNER_TDA9887=m
-+CONFIG_MEDIA_TUNER_TEA5761=m
-+CONFIG_MEDIA_TUNER_TEA5767=m
-+CONFIG_MEDIA_TUNER_MT20XX=m
-+CONFIG_MEDIA_TUNER_MT2060=m
-+CONFIG_MEDIA_TUNER_MT2063=m
-+CONFIG_MEDIA_TUNER_MT2266=m
-+CONFIG_MEDIA_TUNER_QT1010=m
-+CONFIG_MEDIA_TUNER_XC2028=m
-+CONFIG_MEDIA_TUNER_XC5000=m
-+CONFIG_MEDIA_TUNER_XC4000=m
-+CONFIG_MEDIA_TUNER_MXL5005S=m
-+CONFIG_MEDIA_TUNER_MXL5007T=m
-+CONFIG_MEDIA_TUNER_MC44S803=m
-+CONFIG_MEDIA_TUNER_MAX2165=m
-+CONFIG_MEDIA_TUNER_TDA18218=m
-+CONFIG_MEDIA_TUNER_FC0011=m
-+CONFIG_MEDIA_TUNER_FC0012=m
-+CONFIG_MEDIA_TUNER_FC0013=m
-+CONFIG_MEDIA_TUNER_TDA18212=m
-+CONFIG_MEDIA_TUNER_E4000=m
-+CONFIG_MEDIA_TUNER_FC2580=m
-+CONFIG_MEDIA_TUNER_TUA9001=m
-+
-+#
-+# Multistandard (satellite) frontends
-+#
-+CONFIG_DVB_STB0899=m
-+CONFIG_DVB_STB6100=m
-+CONFIG_DVB_STV090x=m
-+CONFIG_DVB_STV6110x=m
-+
-+#
-+# Multistandard (cable + terrestrial) frontends
-+#
-+CONFIG_DVB_DRXK=m
-+CONFIG_DVB_TDA18271C2DD=m
-+
-+#
-+# DVB-S (satellite) frontends
-+#
-+CONFIG_DVB_CX24123=m
-+CONFIG_DVB_MT312=m
-+CONFIG_DVB_ZL10039=m
-+CONFIG_DVB_S5H1420=m
-+CONFIG_DVB_STV0288=m
-+CONFIG_DVB_STB6000=m
-+CONFIG_DVB_STV0299=m
-+CONFIG_DVB_STV6110=m
-+CONFIG_DVB_STV0900=m
-+CONFIG_DVB_TDA10086=m
-+CONFIG_DVB_TUNER_ITD1000=m
-+CONFIG_DVB_TUNER_CX24113=m
-+CONFIG_DVB_TDA826X=m
-+CONFIG_DVB_CX24116=m
-+CONFIG_DVB_SI21XX=m
-+CONFIG_DVB_DS3000=m
-+CONFIG_DVB_TDA10071=m
-+
-+#
-+# DVB-T (terrestrial) frontends
-+#
-+CONFIG_DVB_CX22702=m
-+CONFIG_DVB_DRXD=m
-+CONFIG_DVB_TDA1004X=m
-+CONFIG_DVB_NXT6000=m
-+CONFIG_DVB_MT352=m
-+CONFIG_DVB_ZL10353=m
-+CONFIG_DVB_DIB3000MB=m
-+CONFIG_DVB_DIB3000MC=m
-+CONFIG_DVB_DIB7000M=m
-+CONFIG_DVB_DIB7000P=m
-+CONFIG_DVB_TDA10048=m
-+CONFIG_DVB_AF9013=m
-+CONFIG_DVB_EC100=m
-+CONFIG_DVB_CXD2820R=m
-+CONFIG_DVB_RTL2830=m
-+CONFIG_DVB_RTL2832=m
-+
-+#
-+# DVB-C (cable) frontends
-+#
-+CONFIG_DVB_TDA10023=m
-+CONFIG_DVB_STV0297=m
-+
-+#
-+# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
-+#
-+CONFIG_DVB_NXT200X=m
-+CONFIG_DVB_BCM3510=m
-+CONFIG_DVB_LGDT330X=m
-+CONFIG_DVB_LGDT3305=m
-+CONFIG_DVB_LG2160=m
-+CONFIG_DVB_S5H1409=m
-+CONFIG_DVB_AU8522=m
-+CONFIG_DVB_AU8522_DTV=m
-+CONFIG_DVB_AU8522_V4L=m
-+CONFIG_DVB_S5H1411=m
-+
-+#
-+# ISDB-T (terrestrial) frontends
-+#
-+CONFIG_DVB_S921=m
-+CONFIG_DVB_DIB8000=m
-+CONFIG_DVB_MB86A20S=m
-+
-+#
-+# Digital terrestrial only tuners/PLL
-+#
-+CONFIG_DVB_PLL=m
-+CONFIG_DVB_TUNER_DIB0070=m
-+CONFIG_DVB_TUNER_DIB0090=m
-+
-+#
-+# SEC control devices for DVB-S
-+#
-+CONFIG_DVB_LNBP21=m
-+CONFIG_DVB_LNBP22=m
-+CONFIG_DVB_ISL6421=m
-+CONFIG_DVB_ISL6423=m
-+CONFIG_DVB_A8293=m
-+CONFIG_DVB_LGS8GXX=m
-+CONFIG_DVB_ATBM8830=m
-+CONFIG_DVB_IX2505V=m
-+CONFIG_DVB_IT913X_FE=m
-+CONFIG_DVB_M88RS2000=m
-+CONFIG_DVB_AF9033=m
-+
-+#
-+# Tools to develop new frontends
-+#
-+# CONFIG_DVB_DUMMY_FE is not set
-+
-+#
-+# Graphics support
-+#
-+CONFIG_DRM=y
-+CONFIG_DRM_USB=m
-+CONFIG_DRM_KMS_HELPER=y
-+CONFIG_DRM_LOAD_EDID_FIRMWARE=y
-+CONFIG_DRM_GEM_CMA_HELPER=y
-+CONFIG_DRM_KMS_CMA_HELPER=y
-+
-+#
-+# I2C encoder or helper chips
-+#
-+CONFIG_DRM_I2C_CH7006=m
-+CONFIG_DRM_I2C_SIL164=m
-+CONFIG_DRM_UDL=m
-+CONFIG_DRM_LCDC=y
-+# CONFIG_VGASTATE is not set
-+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
-+CONFIG_FB=y
-+CONFIG_FIRMWARE_EDID=y
-+# CONFIG_FB_DDC is not set
-+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
-+CONFIG_FB_CFB_FILLRECT=m
-+CONFIG_FB_CFB_COPYAREA=m
-+CONFIG_FB_CFB_IMAGEBLIT=m
-+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
-+CONFIG_FB_SYS_FILLRECT=y
-+CONFIG_FB_SYS_COPYAREA=y
-+CONFIG_FB_SYS_IMAGEBLIT=y
-+CONFIG_FB_FOREIGN_ENDIAN=y
-+CONFIG_FB_BOTH_ENDIAN=y
-+# CONFIG_FB_BIG_ENDIAN is not set
-+# CONFIG_FB_LITTLE_ENDIAN is not set
-+CONFIG_FB_SYS_FOPS=y
-+# CONFIG_FB_WMT_GE_ROPS is not set
-+CONFIG_FB_DEFERRED_IO=y
-+# CONFIG_FB_SVGALIB is not set
-+# CONFIG_FB_MACMODES is not set
-+# CONFIG_FB_BACKLIGHT is not set
-+CONFIG_FB_MODE_HELPERS=y
-+CONFIG_FB_TILEBLITTING=y
-+
-+#
-+# Frame buffer hardware drivers
-+#
-+# CONFIG_FB_UVESA is not set
-+# CONFIG_FB_S1D13XXX is not set
-+# CONFIG_FB_TMIO is not set
-+# CONFIG_FB_SMSCUFX is not set
-+# CONFIG_FB_UDL is not set
-+# CONFIG_FB_DA8XX is not set
-+# CONFIG_FB_VIRTUAL is not set
-+# CONFIG_FB_METRONOME is not set
-+# CONFIG_FB_BROADSHEET is not set
-+# CONFIG_FB_AUO_K190X is not set
-+CONFIG_FB_ST7735=y
-+CONFIG_OMAP2_VRFB=y
-+CONFIG_OMAP2_DSS=m
-+# CONFIG_OMAP2_DSS_DEBUG is not set
-+CONFIG_OMAP2_DSS_DEBUGFS=y
-+# CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set
-+CONFIG_OMAP2_DSS_DPI=y
-+CONFIG_OMAP2_DSS_RFBI=y
-+CONFIG_OMAP2_DSS_VENC=y
-+CONFIG_OMAP4_DSS_HDMI=y
-+CONFIG_OMAP2_DSS_SDI=y
-+CONFIG_OMAP2_DSS_DSI=y
-+CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
-+CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y
-+CONFIG_FB_OMAP2=m
-+CONFIG_FB_OMAP2_DEBUG_SUPPORT=y
-+CONFIG_FB_OMAP2_NUM_FBS=3
-+
-+#
-+# OMAP2/3 Display Device Drivers
-+#
-+CONFIG_PANEL_GENERIC_DPI=m
-+# CONFIG_PANEL_TFP410 is not set
-+# CONFIG_PANEL_LGPHILIPS_LB035Q02 is not set
-+CONFIG_PANEL_SHARP_LS037V7DW01=m
-+CONFIG_PANEL_NEC_NL8048HL11_01B=m
-+# CONFIG_PANEL_PICODLP is not set
-+CONFIG_PANEL_TAAL=m
-+CONFIG_PANEL_TPO_TD043MTEA1=m
-+CONFIG_PANEL_ACX565AKM=m
-+# CONFIG_PANEL_N8X0 is not set
-+# CONFIG_EXYNOS_VIDEO is not set
-+CONFIG_BACKLIGHT_LCD_SUPPORT=y
-+CONFIG_LCD_CLASS_DEVICE=y
-+# CONFIG_LCD_L4F00242T03 is not set
-+# CONFIG_LCD_LMS283GF05 is not set
-+# CONFIG_LCD_LTV350QV is not set
-+CONFIG_LCD_ILI9320=y
-+# CONFIG_LCD_TDO24M is not set
-+# CONFIG_LCD_VGG2432A4 is not set
-+CONFIG_LCD_PLATFORM=y
-+# CONFIG_LCD_S6E63M0 is not set
-+# CONFIG_LCD_LD9040 is not set
-+# CONFIG_LCD_AMS369FG06 is not set
-+CONFIG_BACKLIGHT_CLASS_DEVICE=y
-+CONFIG_BACKLIGHT_GENERIC=m
-+CONFIG_BACKLIGHT_PWM=y
-+# CONFIG_BACKLIGHT_ADP8860 is not set
-+# CONFIG_BACKLIGHT_ADP8870 is not set
-+CONFIG_BACKLIGHT_LM3630=m
-+CONFIG_BACKLIGHT_LM3639=m
-+# CONFIG_BACKLIGHT_LP855X is not set
-+# CONFIG_BACKLIGHT_PANDORA is not set
-+CONFIG_BACKLIGHT_TPS65217=y
-+# CONFIG_BACKLIGHT_TLC59108 is not set
-+
-+#
-+# Console display driver support
-+#
-+CONFIG_DUMMY_CONSOLE=y
-+CONFIG_FRAMEBUFFER_CONSOLE=y
-+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
-+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-+CONFIG_FONTS=y
-+CONFIG_FONT_8x8=y
-+CONFIG_FONT_8x16=y
-+# CONFIG_FONT_6x11 is not set
-+# CONFIG_FONT_7x14 is not set
-+# CONFIG_FONT_PEARL_8x8 is not set
-+# CONFIG_FONT_ACORN_8x8 is not set
-+CONFIG_FONT_MINI_4x6=y
-+# CONFIG_FONT_SUN8x16 is not set
-+# CONFIG_FONT_SUN12x22 is not set
-+# CONFIG_FONT_10x18 is not set
-+CONFIG_LOGO=y
-+CONFIG_LOGO_LINUX_MONO=y
-+CONFIG_LOGO_LINUX_VGA16=y
-+CONFIG_LOGO_LINUX_CLUT224=y
-+CONFIG_FB_SSD1307=m
-+CONFIG_SOUND=m
-+CONFIG_SOUND_OSS_CORE=y
-+CONFIG_SOUND_OSS_CORE_PRECLAIM=y
-+CONFIG_SND=m
-+CONFIG_SND_TIMER=m
-+CONFIG_SND_PCM=m
-+CONFIG_SND_HWDEP=m
-+CONFIG_SND_RAWMIDI=m
-+CONFIG_SND_COMPRESS_OFFLOAD=m
-+CONFIG_SND_JACK=y
-+# CONFIG_SND_SEQUENCER is not set
-+CONFIG_SND_OSSEMUL=y
-+CONFIG_SND_MIXER_OSS=m
-+CONFIG_SND_PCM_OSS=m
-+CONFIG_SND_PCM_OSS_PLUGINS=y
-+# CONFIG_SND_HRTIMER is not set
-+# CONFIG_SND_DYNAMIC_MINORS is not set
-+CONFIG_SND_SUPPORT_OLD_API=y
-+CONFIG_SND_VERBOSE_PROCFS=y
-+CONFIG_SND_VERBOSE_PRINTK=y
-+CONFIG_SND_DEBUG=y
-+# CONFIG_SND_DEBUG_VERBOSE is not set
-+# CONFIG_SND_PCM_XRUN_DEBUG is not set
-+CONFIG_SND_VMASTER=y
-+# CONFIG_SND_RAWMIDI_SEQ is not set
-+# CONFIG_SND_OPL3_LIB_SEQ is not set
-+# CONFIG_SND_OPL4_LIB_SEQ is not set
-+# CONFIG_SND_SBAWE_SEQ is not set
-+# CONFIG_SND_EMU10K1_SEQ is not set
-+CONFIG_SND_AC97_CODEC=m
-+CONFIG_SND_DRIVERS=y
-+# CONFIG_SND_DUMMY is not set
-+# CONFIG_SND_ALOOP is not set
-+# CONFIG_SND_MTPAV is not set
-+# CONFIG_SND_SERIAL_U16550 is not set
-+# CONFIG_SND_MPU401 is not set
-+CONFIG_SND_AC97_POWER_SAVE=y
-+CONFIG_SND_AC97_POWER_SAVE_DEFAULT=0
-+CONFIG_SND_ARM=y
-+CONFIG_SND_SPI=y
-+CONFIG_SND_USB=y
-+CONFIG_SND_USB_AUDIO=m
-+# CONFIG_SND_USB_UA101 is not set
-+# CONFIG_SND_USB_CAIAQ is not set
-+# CONFIG_SND_USB_6FIRE is not set
-+CONFIG_SND_SOC=m
-+# CONFIG_SND_DESIGNWARE_I2S is not set
-+CONFIG_SND_SOC_I2C_AND_SPI=m
-+# CONFIG_SND_SOC_ALL_CODECS is not set
-+# CONFIG_SND_SIMPLE_CARD is not set
-+# CONFIG_SOUND_PRIME is not set
-+CONFIG_AC97_BUS=m
-+
-+#
-+# HID support
-+#
-+CONFIG_HID=y
-+# CONFIG_HID_BATTERY_STRENGTH is not set
-+# CONFIG_HIDRAW is not set
-+CONFIG_UHID=m
-+CONFIG_HID_GENERIC=y
-+
-+#
-+# Special HID drivers
-+#
-+# CONFIG_HID_A4TECH is not set
-+# CONFIG_HID_ACRUX is not set
-+# CONFIG_HID_APPLE is not set
-+# CONFIG_HID_AUREAL is not set
-+# CONFIG_HID_BELKIN is not set
-+# CONFIG_HID_CHERRY is not set
-+# CONFIG_HID_CHICONY is not set
-+# CONFIG_HID_PRODIKEYS is not set
-+# CONFIG_HID_CYPRESS is not set
-+# CONFIG_HID_DRAGONRISE is not set
-+# CONFIG_HID_EMS_FF is not set
-+# CONFIG_HID_ELECOM is not set
-+# CONFIG_HID_EZKEY is not set
-+# CONFIG_HID_HOLTEK is not set
-+# CONFIG_HID_KEYTOUCH is not set
-+# CONFIG_HID_KYE is not set
-+# CONFIG_HID_UCLOGIC is not set
-+# CONFIG_HID_WALTOP is not set
-+# CONFIG_HID_GYRATION is not set
-+# CONFIG_HID_ICADE is not set
-+# CONFIG_HID_TWINHAN is not set
-+# CONFIG_HID_KENSINGTON is not set
-+# CONFIG_HID_LCPOWER is not set
-+CONFIG_HID_LENOVO_TPKBD=m
-+# CONFIG_HID_LOGITECH is not set
-+# CONFIG_HID_MAGICMOUSE is not set
-+# CONFIG_HID_MICROSOFT is not set
-+# CONFIG_HID_MONTEREY is not set
-+# CONFIG_HID_MULTITOUCH is not set
-+# CONFIG_HID_NTRIG is not set
-+# CONFIG_HID_ORTEK is not set
-+# CONFIG_HID_PANTHERLORD is not set
-+# CONFIG_HID_PETALYNX is not set
-+# CONFIG_HID_PICOLCD is not set
-+# CONFIG_HID_PRIMAX is not set
-+CONFIG_HID_PS3REMOTE=m
-+# CONFIG_HID_ROCCAT is not set
-+# CONFIG_HID_SAITEK is not set
-+# CONFIG_HID_SAMSUNG is not set
-+# CONFIG_HID_SONY is not set
-+# CONFIG_HID_SPEEDLINK is not set
-+# CONFIG_HID_SUNPLUS is not set
-+# CONFIG_HID_GREENASIA is not set
-+# CONFIG_HID_SMARTJOYPLUS is not set
-+# CONFIG_HID_TIVO is not set
-+# CONFIG_HID_TOPSEED is not set
-+# CONFIG_HID_THRUSTMASTER is not set
-+# CONFIG_HID_WACOM is not set
-+# CONFIG_HID_WIIMOTE is not set
-+# CONFIG_HID_ZEROPLUS is not set
-+# CONFIG_HID_ZYDACRON is not set
-+CONFIG_HID_SENSOR_HUB=m
-+
-+#
-+# USB HID support
-+#
-+CONFIG_USB_HID=y
-+# CONFIG_HID_PID is not set
-+# CONFIG_USB_HIDDEV is not set
-+
-+#
-+# I2C HID support
-+#
-+CONFIG_I2C_HID=y
-+CONFIG_USB_ARCH_HAS_OHCI=y
-+CONFIG_USB_ARCH_HAS_EHCI=y
-+# CONFIG_USB_ARCH_HAS_XHCI is not set
-+CONFIG_USB_SUPPORT=y
-+CONFIG_USB_COMMON=y
-+CONFIG_USB_ARCH_HAS_HCD=y
-+CONFIG_USB=y
-+CONFIG_USB_DEBUG=y
-+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
-+
-+#
-+# Miscellaneous USB options
-+#
-+# CONFIG_USB_DYNAMIC_MINORS is not set
-+CONFIG_USB_SUSPEND=y
-+# CONFIG_USB_OTG is not set
-+# CONFIG_USB_OTG_WHITELIST is not set
-+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
-+# CONFIG_USB_DWC3 is not set
-+CONFIG_USB_MON=y
-+# CONFIG_USB_WUSB_CBAF is not set
-+
-+#
-+# USB Host Controller Drivers
-+#
-+# CONFIG_USB_C67X00_HCD is not set
-+# CONFIG_USB_EHCI_HCD is not set
-+# CONFIG_USB_OXU210HP_HCD is not set
-+# CONFIG_USB_ISP116X_HCD is not set
-+# CONFIG_USB_ISP1760_HCD is not set
-+# CONFIG_USB_ISP1362_HCD is not set
-+# CONFIG_USB_OHCI_HCD is not set
-+# CONFIG_USB_U132_HCD is not set
-+# CONFIG_USB_SL811_HCD is not set
-+# CONFIG_USB_R8A66597_HCD is not set
-+CONFIG_USB_MUSB_HDRC=y
-+# CONFIG_USB_MUSB_TUSB6010 is not set
-+# CONFIG_USB_MUSB_OMAP2PLUS is not set
-+# CONFIG_USB_MUSB_AM35X is not set
-+CONFIG_USB_MUSB_DSPS=y
-+CONFIG_MUSB_PIO_ONLY=y
-+# CONFIG_USB_CHIPIDEA is not set
-+# CONFIG_USB_RENESAS_USBHS is not set
-+
-+#
-+# USB Device Class drivers
-+#
-+CONFIG_USB_ACM=m
-+CONFIG_USB_PRINTER=m
-+CONFIG_USB_WDM=y
-+CONFIG_USB_TMC=m
-+
-+#
-+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
-+#
-+
-+#
-+# also be needed; see USB_STORAGE Help for more info
-+#
-+CONFIG_USB_STORAGE=y
-+# CONFIG_USB_STORAGE_DEBUG is not set
-+# CONFIG_USB_STORAGE_REALTEK is not set
-+# CONFIG_USB_STORAGE_DATAFAB is not set
-+# CONFIG_USB_STORAGE_FREECOM is not set
-+# CONFIG_USB_STORAGE_ISD200 is not set
-+# CONFIG_USB_STORAGE_USBAT is not set
-+# CONFIG_USB_STORAGE_SDDR09 is not set
-+# CONFIG_USB_STORAGE_SDDR55 is not set
-+# CONFIG_USB_STORAGE_JUMPSHOT is not set
-+# CONFIG_USB_STORAGE_ALAUDA is not set
-+# CONFIG_USB_STORAGE_ONETOUCH is not set
-+# CONFIG_USB_STORAGE_KARMA is not set
-+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
-+# CONFIG_USB_STORAGE_ENE_UB6250 is not set
-+
-+#
-+# USB Imaging devices
-+#
-+CONFIG_USB_MDC800=m
-+CONFIG_USB_MICROTEK=m
-+
-+#
-+# USB port drivers
-+#
-+CONFIG_USB_SERIAL=m
-+CONFIG_USB_SERIAL_GENERIC=y
-+CONFIG_USB_SERIAL_AIRCABLE=m
-+CONFIG_USB_SERIAL_ARK3116=m
-+CONFIG_USB_SERIAL_BELKIN=m
-+CONFIG_USB_SERIAL_CH341=m
-+CONFIG_USB_SERIAL_WHITEHEAT=m
-+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-+CONFIG_USB_SERIAL_CP210X=m
-+CONFIG_USB_SERIAL_CYPRESS_M8=m
-+CONFIG_USB_SERIAL_EMPEG=m
-+CONFIG_USB_SERIAL_FTDI_SIO=m
-+CONFIG_USB_SERIAL_FUNSOFT=m
-+CONFIG_USB_SERIAL_VISOR=m
-+CONFIG_USB_SERIAL_IPAQ=m
-+CONFIG_USB_SERIAL_IR=m
-+CONFIG_USB_SERIAL_EDGEPORT=m
-+CONFIG_USB_SERIAL_EDGEPORT_TI=m
-+CONFIG_USB_SERIAL_F81232=m
-+CONFIG_USB_SERIAL_GARMIN=m
-+CONFIG_USB_SERIAL_IPW=m
-+CONFIG_USB_SERIAL_IUU=m
-+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-+CONFIG_USB_SERIAL_KEYSPAN=m
-+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-+CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-+CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-+CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-+CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-+CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-+CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-+CONFIG_USB_SERIAL_KLSI=m
-+CONFIG_USB_SERIAL_KOBIL_SCT=m
-+CONFIG_USB_SERIAL_MCT_U232=m
-+CONFIG_USB_SERIAL_METRO=m
-+CONFIG_USB_SERIAL_MOS7720=m
-+CONFIG_USB_SERIAL_MOS7840=m
-+CONFIG_USB_SERIAL_MOTOROLA=m
-+CONFIG_USB_SERIAL_NAVMAN=m
-+CONFIG_USB_SERIAL_PL2303=m
-+CONFIG_USB_SERIAL_OTI6858=m
-+CONFIG_USB_SERIAL_QCAUX=m
-+CONFIG_USB_SERIAL_QUALCOMM=m
-+CONFIG_USB_SERIAL_SPCP8X5=m
-+CONFIG_USB_SERIAL_HP4X=m
-+CONFIG_USB_SERIAL_SAFE=m
-+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
-+CONFIG_USB_SERIAL_SIEMENS_MPI=m
-+CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-+CONFIG_USB_SERIAL_SYMBOL=m
-+CONFIG_USB_SERIAL_TI=m
-+CONFIG_USB_SERIAL_CYBERJACK=m
-+CONFIG_USB_SERIAL_XIRCOM=m
-+CONFIG_USB_SERIAL_WWAN=m
-+CONFIG_USB_SERIAL_OPTION=m
-+CONFIG_USB_SERIAL_OMNINET=m
-+CONFIG_USB_SERIAL_OPTICON=m
-+CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m
-+CONFIG_USB_SERIAL_ZIO=m
-+CONFIG_USB_SERIAL_ZTE=m
-+CONFIG_USB_SERIAL_SSU100=m
-+CONFIG_USB_SERIAL_QT2=m
-+CONFIG_USB_SERIAL_DEBUG=m
-+
-+#
-+# USB Miscellaneous drivers
-+#
-+CONFIG_USB_EMI62=m
-+CONFIG_USB_EMI26=m
-+CONFIG_USB_ADUTUX=m
-+CONFIG_USB_SEVSEG=m
-+CONFIG_USB_RIO500=m
-+CONFIG_USB_LEGOTOWER=m
-+CONFIG_USB_LCD=m
-+CONFIG_USB_LED=m
-+CONFIG_USB_CYPRESS_CY7C63=m
-+CONFIG_USB_CYTHERM=m
-+CONFIG_USB_IDMOUSE=m
-+CONFIG_USB_FTDI_ELAN=m
-+CONFIG_USB_APPLEDISPLAY=m
-+CONFIG_USB_SISUSBVGA=m
-+CONFIG_USB_SISUSBVGA_CON=y
-+CONFIG_USB_LD=m
-+CONFIG_USB_TRANCEVIBRATOR=m
-+CONFIG_USB_IOWARRIOR=m
-+CONFIG_USB_TEST=m
-+CONFIG_USB_ISIGHTFW=m
-+CONFIG_USB_YUREX=m
-+CONFIG_USB_EZUSB_FX2=m
-+
-+#
-+# USB Physical Layer drivers
-+#
-+CONFIG_OMAP_USB2=y
-+CONFIG_USB_ISP1301=m
-+# CONFIG_USB_RCAR_PHY is not set
-+CONFIG_USB_GADGET=y
-+CONFIG_USB_GADGET_DEBUG=y
-+CONFIG_USB_GADGET_DEBUG_FILES=y
-+CONFIG_USB_GADGET_DEBUG_FS=y
-+CONFIG_USB_GADGET_VBUS_DRAW=2
-+CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
-+
-+#
-+# USB Peripheral Controller
-+#
-+# CONFIG_USB_FUSB300 is not set
-+# CONFIG_USB_R8A66597 is not set
-+# CONFIG_USB_MV_UDC is not set
-+CONFIG_USB_GADGET_MUSB_HDRC=y
-+# CONFIG_USB_M66592 is not set
-+# CONFIG_USB_NET2272 is not set
-+# CONFIG_USB_DUMMY_HCD is not set
-+CONFIG_USB_LIBCOMPOSITE=m
-+# CONFIG_USB_ZERO is not set
-+# CONFIG_USB_AUDIO is not set
-+CONFIG_USB_ETH=m
-+CONFIG_USB_ETH_RNDIS=y
-+# CONFIG_USB_ETH_EEM is not set
-+# CONFIG_USB_G_NCM is not set
-+CONFIG_USB_GADGETFS=m
-+# CONFIG_USB_FUNCTIONFS is not set
-+CONFIG_USB_MASS_STORAGE=m
-+CONFIG_USB_G_SERIAL=m
-+# CONFIG_USB_MIDI_GADGET is not set
-+# CONFIG_USB_G_PRINTER is not set
-+CONFIG_USB_CDC_COMPOSITE=m
-+# CONFIG_USB_G_NOKIA is not set
-+# CONFIG_USB_G_ACM_MS is not set
-+# CONFIG_USB_G_MULTI is not set
-+CONFIG_USB_G_HID=m
-+# CONFIG_USB_G_DBGP is not set
-+# CONFIG_USB_G_WEBCAM is not set
-+
-+#
-+# OTG and related infrastructure
-+#
-+CONFIG_USB_OTG_UTILS=y
-+CONFIG_USB_GPIO_VBUS=m
-+# CONFIG_USB_ULPI is not set
-+CONFIG_TWL6030_USB=y
-+CONFIG_NOP_USB_XCEIV=y
-+CONFIG_MMC=y
-+# CONFIG_MMC_DEBUG is not set
-+CONFIG_MMC_UNSAFE_RESUME=y
-+# CONFIG_MMC_CLKGATE is not set
-+
-+#
-+# MMC/SD/SDIO Card Drivers
-+#
-+CONFIG_MMC_BLOCK=y
-+CONFIG_MMC_BLOCK_MINORS=8
-+CONFIG_MMC_BLOCK_BOUNCE=y
-+CONFIG_SDIO_UART=y
-+# CONFIG_MMC_TEST is not set
-+
-+#
-+# MMC/SD/SDIO Host Controller Drivers
-+#
-+# CONFIG_MMC_SDHCI is not set
-+# CONFIG_MMC_SDHCI_PXAV3 is not set
-+# CONFIG_MMC_SDHCI_PXAV2 is not set
-+CONFIG_MMC_OMAP=y
-+CONFIG_MMC_OMAP_HS=y
-+# CONFIG_MMC_DW is not set
-+# CONFIG_MMC_VUB300 is not set
-+# CONFIG_MMC_USHC is not set
-+# CONFIG_MEMSTICK is not set
-+CONFIG_NEW_LEDS=y
-+CONFIG_LEDS_CLASS=y
-+
-+#
-+# LED drivers
-+#
-+# CONFIG_LEDS_LM3530 is not set
-+CONFIG_LEDS_LM3642=m
-+# CONFIG_LEDS_PCA9532 is not set
-+CONFIG_LEDS_GPIO=y
-+# CONFIG_LEDS_LP3944 is not set
-+# CONFIG_LEDS_LP5521 is not set
-+# CONFIG_LEDS_LP5523 is not set
-+# CONFIG_LEDS_PCA955X is not set
-+# CONFIG_LEDS_PCA9633 is not set
-+# CONFIG_LEDS_DAC124S085 is not set
-+# CONFIG_LEDS_REGULATOR is not set
-+# CONFIG_LEDS_BD2802 is not set
-+# CONFIG_LEDS_LT3593 is not set
-+# CONFIG_LEDS_RENESAS_TPU is not set
-+# CONFIG_LEDS_TCA6507 is not set
-+CONFIG_LEDS_LM355x=m
-+# CONFIG_LEDS_OT200 is not set
-+CONFIG_LEDS_BLINKM=m
-+CONFIG_LEDS_TRIGGERS=y
-+
-+#
-+# LED Triggers
-+#
-+CONFIG_LEDS_TRIGGER_TIMER=y
-+CONFIG_LEDS_TRIGGER_ONESHOT=y
-+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
-+CONFIG_LEDS_TRIGGER_BACKLIGHT=y
-+CONFIG_LEDS_TRIGGER_CPU=y
-+CONFIG_LEDS_TRIGGER_GPIO=y
-+CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
-+
-+#
-+# iptables trigger is under Netfilter config (LED target)
-+#
-+CONFIG_LEDS_TRIGGER_TRANSIENT=y
-+# CONFIG_ACCESSIBILITY is not set
-+# CONFIG_EDAC is not set
-+CONFIG_RTC_LIB=y
-+CONFIG_RTC_CLASS=y
-+CONFIG_RTC_HCTOSYS=y
-+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
-+# CONFIG_RTC_DEBUG is not set
-+
-+#
-+# RTC interfaces
-+#
-+CONFIG_RTC_INTF_SYSFS=y
-+CONFIG_RTC_INTF_PROC=y
-+CONFIG_RTC_INTF_DEV=y
-+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-+# CONFIG_RTC_DRV_TEST is not set
-+
-+#
-+# I2C RTC drivers
-+#
-+# CONFIG_RTC_DRV_DS1307 is not set
-+# CONFIG_RTC_DRV_DS1374 is not set
-+# CONFIG_RTC_DRV_DS1672 is not set
-+# CONFIG_RTC_DRV_DS3232 is not set
-+# CONFIG_RTC_DRV_MAX6900 is not set
-+# CONFIG_RTC_DRV_RS5C372 is not set
-+# CONFIG_RTC_DRV_ISL1208 is not set
-+# CONFIG_RTC_DRV_ISL12022 is not set
-+# CONFIG_RTC_DRV_X1205 is not set
-+CONFIG_RTC_DRV_PCF8523=m
-+# CONFIG_RTC_DRV_PCF8563 is not set
-+# CONFIG_RTC_DRV_PCF8583 is not set
-+# CONFIG_RTC_DRV_M41T80 is not set
-+# CONFIG_RTC_DRV_BQ32K is not set
-+CONFIG_RTC_DRV_TWL4030=y
-+# CONFIG_RTC_DRV_S35390A is not set
-+# CONFIG_RTC_DRV_FM3130 is not set
-+# CONFIG_RTC_DRV_RX8581 is not set
-+# CONFIG_RTC_DRV_RX8025 is not set
-+# CONFIG_RTC_DRV_EM3027 is not set
-+# CONFIG_RTC_DRV_RV3029C2 is not set
-+
-+#
-+# SPI RTC drivers
-+#
-+# CONFIG_RTC_DRV_M41T93 is not set
-+# CONFIG_RTC_DRV_M41T94 is not set
-+# CONFIG_RTC_DRV_DS1305 is not set
-+# CONFIG_RTC_DRV_DS1390 is not set
-+# CONFIG_RTC_DRV_MAX6902 is not set
-+# CONFIG_RTC_DRV_R9701 is not set
-+# CONFIG_RTC_DRV_RS5C348 is not set
-+# CONFIG_RTC_DRV_DS3234 is not set
-+# CONFIG_RTC_DRV_PCF2123 is not set
-+
-+#
-+# Platform RTC drivers
-+#
-+# CONFIG_RTC_DRV_CMOS is not set
-+# CONFIG_RTC_DRV_DS1286 is not set
-+# CONFIG_RTC_DRV_DS1511 is not set
-+# CONFIG_RTC_DRV_DS1553 is not set
-+# CONFIG_RTC_DRV_DS1742 is not set
-+# CONFIG_RTC_DRV_STK17TA8 is not set
-+# CONFIG_RTC_DRV_M48T86 is not set
-+# CONFIG_RTC_DRV_M48T35 is not set
-+# CONFIG_RTC_DRV_M48T59 is not set
-+# CONFIG_RTC_DRV_MSM6242 is not set
-+# CONFIG_RTC_DRV_BQ4802 is not set
-+# CONFIG_RTC_DRV_RP5C01 is not set
-+# CONFIG_RTC_DRV_V3020 is not set
-+CONFIG_RTC_DRV_DS2404=m
-+
-+#
-+# on-CPU RTC drivers
-+#
-+CONFIG_RTC_DRV_OMAP=y
-+CONFIG_RTC_DRV_SNVS=m
-+CONFIG_DMADEVICES=y
-+# CONFIG_DMADEVICES_DEBUG is not set
-+
-+#
-+# DMA Devices
-+#
-+# CONFIG_DW_DMAC is not set
-+# CONFIG_TIMB_DMA is not set
-+CONFIG_TI_EDMA=y
-+# CONFIG_DMA_OMAP is not set
-+CONFIG_DMA_ENGINE=y
-+CONFIG_DMA_VIRTUAL_CHANNELS=y
-+
-+#
-+# DMA Clients
-+#
-+# CONFIG_NET_DMA is not set
-+CONFIG_ASYNC_TX_DMA=y
-+CONFIG_DMATEST=m
-+# CONFIG_AUXDISPLAY is not set
-+CONFIG_UIO=y
-+CONFIG_UIO_PDRV=y
-+CONFIG_UIO_PDRV_GENIRQ=y
-+CONFIG_UIO_DMEM_GENIRQ=m
-+CONFIG_VIRTIO=m
-+
-+#
-+# Virtio drivers
-+#
-+# CONFIG_VIRTIO_BALLOON is not set
-+# CONFIG_VIRTIO_MMIO is not set
-+
-+#
-+# Microsoft Hyper-V guest support
-+#
-+# CONFIG_STAGING is not set
-+CONFIG_CLKDEV_LOOKUP=y
-+CONFIG_HAVE_CLK_PREPARE=y
-+CONFIG_COMMON_CLK=y
-+
-+#
-+# Common Clock Framework
-+#
-+CONFIG_COMMON_CLK_DEBUG=y
-+CONFIG_HWSPINLOCK=m
-+
-+#
-+# Hardware Spinlock drivers
-+#
-+CONFIG_HWSPINLOCK_OMAP=m
-+CONFIG_CLKSRC_MMIO=y
-+CONFIG_IOMMU_SUPPORT=y
-+CONFIG_OF_IOMMU=y
-+# CONFIG_OMAP_IOMMU is not set
-+
-+#
-+# Remoteproc drivers (EXPERIMENTAL)
-+#
-+CONFIG_REMOTEPROC=m
-+CONFIG_STE_MODEM_RPROC=m
-+
-+#
-+# Rpmsg drivers (EXPERIMENTAL)
-+#
-+# CONFIG_VIRT_DRIVERS is not set
-+# CONFIG_PM_DEVFREQ is not set
-+# CONFIG_EXTCON is not set
-+# CONFIG_MEMORY is not set
-+CONFIG_IIO=y
-+CONFIG_IIO_BUFFER=y
-+CONFIG_IIO_BUFFER_CB=y
-+CONFIG_IIO_KFIFO_BUF=y
-+CONFIG_IIO_TRIGGERED_BUFFER=y
-+CONFIG_IIO_TRIGGER=y
-+CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
-+
-+#
-+# Accelerometers
-+#
-+CONFIG_HID_SENSOR_ACCEL_3D=m
-+
-+#
-+# Analog to digital converters
-+#
-+CONFIG_AD_SIGMA_DELTA=m
-+CONFIG_AD7266=m
-+CONFIG_AD7298=m
-+CONFIG_AD7791=m
-+CONFIG_AD7793=m
-+CONFIG_AD7476=m
-+CONFIG_AD7887=m
-+CONFIG_MAX1363=m
-+CONFIG_TI_ADC081C=m
-+CONFIG_TI_AM335X_ADC=y
-+
-+#
-+# Amplifiers
-+#
-+# CONFIG_AD8366 is not set
-+
-+#
-+# Hid Sensor IIO Common
-+#
-+CONFIG_HID_SENSOR_IIO_COMMON=m
-+# CONFIG_HID_SENSOR_ENUM_BASE_QUIRKS is not set
-+
-+#
-+# Digital to analog converters
-+#
-+CONFIG_AD5064=m
-+CONFIG_AD5360=m
-+CONFIG_AD5380=m
-+CONFIG_AD5421=m
-+CONFIG_AD5624R_SPI=m
-+CONFIG_AD5446=m
-+CONFIG_AD5449=m
-+CONFIG_AD5504=m
-+CONFIG_AD5755=m
-+CONFIG_AD5764=m
-+CONFIG_AD5791=m
-+CONFIG_AD5686=m
-+CONFIG_MAX517=m
-+CONFIG_MCP4725=m
-+
-+#
-+# Frequency Synthesizers DDS/PLL
-+#
-+
-+#
-+# Clock Generator/Distribution
-+#
-+CONFIG_AD9523=m
-+
-+#
-+# Phase-Locked Loop (PLL) frequency synthesizers
-+#
-+CONFIG_ADF4350=m
-+
-+#
-+# Digital gyroscope sensors
-+#
-+CONFIG_ADIS16136=m
-+CONFIG_HID_SENSOR_GYRO_3D=m
-+
-+#
-+# Inertial measurement units
-+#
-+CONFIG_ADIS16480=m
-+CONFIG_IIO_ADIS_LIB=m
-+CONFIG_IIO_ADIS_LIB_BUFFER=y
-+
-+#
-+# Light sensors
-+#
-+CONFIG_ADJD_S311=m
-+CONFIG_VCNL4000=m
-+CONFIG_HID_SENSOR_ALS=m
-+
-+#
-+# Magnetometer sensors
-+#
-+CONFIG_HID_SENSOR_MAGNETOMETER_3D=m
-+CONFIG_PWM=y
-+CONFIG_PWM_TIECAP=y
-+CONFIG_PWM_TIEHRPWM=y
-+CONFIG_PWM_TIPWMSS=y
-+CONFIG_PWM_TWL=y
-+CONFIG_PWM_TWL_LED=y
-+CONFIG_EHRPWM_TEST=m
-+# CONFIG_IPACK_BUS is not set
-+
-+#
-+# File systems
-+#
-+CONFIG_DCACHE_WORD_ACCESS=y
-+CONFIG_EXT2_FS=y
-+# CONFIG_EXT2_FS_XATTR is not set
-+# CONFIG_EXT2_FS_XIP is not set
-+CONFIG_EXT3_FS=y
-+CONFIG_EXT3_DEFAULTS_TO_ORDERED=y
-+# CONFIG_EXT3_FS_XATTR is not set
-+CONFIG_EXT4_FS=y
-+# CONFIG_EXT4_FS_POSIX_ACL is not set
-+# CONFIG_EXT4_FS_SECURITY is not set
-+# CONFIG_EXT4_DEBUG is not set
-+CONFIG_JBD=y
-+# CONFIG_JBD_DEBUG is not set
-+CONFIG_JBD2=y
-+# CONFIG_JBD2_DEBUG is not set
-+CONFIG_FS_MBCACHE=y
-+CONFIG_REISERFS_FS=m
-+# CONFIG_REISERFS_CHECK is not set
-+# CONFIG_REISERFS_PROC_INFO is not set
-+# CONFIG_REISERFS_FS_XATTR is not set
-+CONFIG_JFS_FS=m
-+# CONFIG_JFS_POSIX_ACL is not set
-+# CONFIG_JFS_SECURITY is not set
-+# CONFIG_JFS_DEBUG is not set
-+# CONFIG_JFS_STATISTICS is not set
-+CONFIG_XFS_FS=m
-+CONFIG_XFS_QUOTA=y
-+CONFIG_XFS_POSIX_ACL=y
-+CONFIG_XFS_RT=y
-+# CONFIG_XFS_DEBUG is not set
-+CONFIG_GFS2_FS=m
-+CONFIG_BTRFS_FS=m
-+# CONFIG_BTRFS_FS_POSIX_ACL is not set
-+# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set
-+CONFIG_NILFS2_FS=m
-+CONFIG_FS_POSIX_ACL=y
-+CONFIG_EXPORTFS=m
-+CONFIG_FILE_LOCKING=y
-+CONFIG_FSNOTIFY=y
-+CONFIG_DNOTIFY=y
-+CONFIG_INOTIFY_USER=y
-+# CONFIG_FANOTIFY is not set
-+CONFIG_QUOTA=y
-+# CONFIG_QUOTA_NETLINK_INTERFACE is not set
-+CONFIG_PRINT_QUOTA_WARNING=y
-+# CONFIG_QUOTA_DEBUG is not set
-+CONFIG_QUOTA_TREE=y
-+# CONFIG_QFMT_V1 is not set
-+CONFIG_QFMT_V2=y
-+CONFIG_QUOTACTL=y
-+CONFIG_AUTOFS4_FS=m
-+CONFIG_FUSE_FS=m
-+CONFIG_CUSE=m
-+
-+#
-+# Caches
-+#
-+CONFIG_FSCACHE=y
-+CONFIG_FSCACHE_STATS=y
-+CONFIG_FSCACHE_HISTOGRAM=y
-+# CONFIG_FSCACHE_DEBUG is not set
-+# CONFIG_FSCACHE_OBJECT_LIST is not set
-+CONFIG_CACHEFILES=m
-+# CONFIG_CACHEFILES_DEBUG is not set
-+CONFIG_CACHEFILES_HISTOGRAM=y
-+
-+#
-+# CD-ROM/DVD Filesystems
-+#
-+# CONFIG_ISO9660_FS is not set
-+# CONFIG_UDF_FS is not set
-+
-+#
-+# DOS/FAT/NT Filesystems
-+#
-+CONFIG_FAT_FS=y
-+CONFIG_MSDOS_FS=y
-+CONFIG_VFAT_FS=y
-+CONFIG_FAT_DEFAULT_CODEPAGE=437
-+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-+# CONFIG_NTFS_FS is not set
-+
-+#
-+# Pseudo filesystems
-+#
-+CONFIG_PROC_FS=y
-+CONFIG_PROC_SYSCTL=y
-+CONFIG_PROC_PAGE_MONITOR=y
-+CONFIG_SYSFS=y
-+CONFIG_TMPFS=y
-+# CONFIG_TMPFS_POSIX_ACL is not set
-+# CONFIG_TMPFS_XATTR is not set
-+# CONFIG_HUGETLB_PAGE is not set
-+# CONFIG_CONFIGFS_FS is not set
-+CONFIG_MISC_FILESYSTEMS=y
-+# CONFIG_ADFS_FS is not set
-+# CONFIG_AFFS_FS is not set
-+# CONFIG_ECRYPT_FS is not set
-+# CONFIG_HFS_FS is not set
-+# CONFIG_HFSPLUS_FS is not set
-+# CONFIG_BEFS_FS is not set
-+# CONFIG_BFS_FS is not set
-+# CONFIG_EFS_FS is not set
-+CONFIG_JFFS2_FS=y
-+CONFIG_JFFS2_FS_DEBUG=0
-+CONFIG_JFFS2_FS_WRITEBUFFER=y
-+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
-+CONFIG_JFFS2_SUMMARY=y
-+CONFIG_JFFS2_FS_XATTR=y
-+CONFIG_JFFS2_FS_POSIX_ACL=y
-+CONFIG_JFFS2_FS_SECURITY=y
-+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
-+CONFIG_JFFS2_ZLIB=y
-+CONFIG_JFFS2_LZO=y
-+CONFIG_JFFS2_RTIME=y
-+CONFIG_JFFS2_RUBIN=y
-+# CONFIG_JFFS2_CMODE_NONE is not set
-+CONFIG_JFFS2_CMODE_PRIORITY=y
-+# CONFIG_JFFS2_CMODE_SIZE is not set
-+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
-+CONFIG_UBIFS_FS=y
-+# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
-+CONFIG_UBIFS_FS_LZO=y
-+CONFIG_UBIFS_FS_ZLIB=y
-+# CONFIG_LOGFS is not set
-+CONFIG_CRAMFS=y
-+# CONFIG_SQUASHFS is not set
-+# CONFIG_VXFS_FS is not set
-+# CONFIG_MINIX_FS is not set
-+# CONFIG_OMFS_FS is not set
-+# CONFIG_HPFS_FS is not set
-+# CONFIG_QNX4FS_FS is not set
-+# CONFIG_QNX6FS_FS is not set
-+# CONFIG_ROMFS_FS is not set
-+# CONFIG_PSTORE is not set
-+# CONFIG_SYSV_FS is not set
-+# CONFIG_UFS_FS is not set
-+CONFIG_F2FS_FS=y
-+CONFIG_F2FS_STAT_FS=y
-+CONFIG_F2FS_FS_XATTR=y
-+CONFIG_F2FS_FS_POSIX_ACL=y
-+CONFIG_NETWORK_FILESYSTEMS=y
-+CONFIG_NFS_FS=y
-+CONFIG_NFS_V2=y
-+CONFIG_NFS_V3=y
-+CONFIG_NFS_V3_ACL=y
-+CONFIG_NFS_V4=y
-+CONFIG_NFS_SWAP=y
-+CONFIG_NFS_V4_1=y
-+CONFIG_PNFS_FILE_LAYOUT=m
-+CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
-+CONFIG_ROOT_NFS=y
-+CONFIG_NFS_FSCACHE=y
-+# CONFIG_NFS_USE_LEGACY_DNS is not set
-+CONFIG_NFS_USE_KERNEL_DNS=y
-+# CONFIG_NFSD is not set
-+CONFIG_LOCKD=y
-+CONFIG_LOCKD_V4=y
-+CONFIG_NFS_ACL_SUPPORT=y
-+CONFIG_NFS_COMMON=y
-+CONFIG_SUNRPC=y
-+CONFIG_SUNRPC_GSS=y
-+CONFIG_SUNRPC_BACKCHANNEL=y
-+CONFIG_SUNRPC_SWAP=y
-+# CONFIG_SUNRPC_DEBUG is not set
-+# CONFIG_CEPH_FS is not set
-+# CONFIG_CIFS is not set
-+# CONFIG_NCP_FS is not set
-+# CONFIG_CODA_FS is not set
-+# CONFIG_AFS_FS is not set
-+# CONFIG_9P_FS is not set
-+CONFIG_NLS=y
-+CONFIG_NLS_DEFAULT="iso8859-1"
-+CONFIG_NLS_CODEPAGE_437=y
-+# CONFIG_NLS_CODEPAGE_737 is not set
-+# CONFIG_NLS_CODEPAGE_775 is not set
-+# CONFIG_NLS_CODEPAGE_850 is not set
-+# CONFIG_NLS_CODEPAGE_852 is not set
-+# CONFIG_NLS_CODEPAGE_855 is not set
-+# CONFIG_NLS_CODEPAGE_857 is not set
-+# CONFIG_NLS_CODEPAGE_860 is not set
-+# CONFIG_NLS_CODEPAGE_861 is not set
-+# CONFIG_NLS_CODEPAGE_862 is not set
-+# CONFIG_NLS_CODEPAGE_863 is not set
-+# CONFIG_NLS_CODEPAGE_864 is not set
-+# CONFIG_NLS_CODEPAGE_865 is not set
-+# CONFIG_NLS_CODEPAGE_866 is not set
-+# CONFIG_NLS_CODEPAGE_869 is not set
-+# CONFIG_NLS_CODEPAGE_936 is not set
-+# CONFIG_NLS_CODEPAGE_950 is not set
-+# CONFIG_NLS_CODEPAGE_932 is not set
-+# CONFIG_NLS_CODEPAGE_949 is not set
-+# CONFIG_NLS_CODEPAGE_874 is not set
-+# CONFIG_NLS_ISO8859_8 is not set
-+# CONFIG_NLS_CODEPAGE_1250 is not set
-+# CONFIG_NLS_CODEPAGE_1251 is not set
-+# CONFIG_NLS_ASCII is not set
-+CONFIG_NLS_ISO8859_1=y
-+# CONFIG_NLS_ISO8859_2 is not set
-+# CONFIG_NLS_ISO8859_3 is not set
-+# CONFIG_NLS_ISO8859_4 is not set
-+# CONFIG_NLS_ISO8859_5 is not set
-+# CONFIG_NLS_ISO8859_6 is not set
-+# CONFIG_NLS_ISO8859_7 is not set
-+# CONFIG_NLS_ISO8859_9 is not set
-+# CONFIG_NLS_ISO8859_13 is not set
-+# CONFIG_NLS_ISO8859_14 is not set
-+# CONFIG_NLS_ISO8859_15 is not set
-+# CONFIG_NLS_KOI8_R is not set
-+# CONFIG_NLS_KOI8_U is not set
-+# CONFIG_NLS_MAC_ROMAN is not set
-+# CONFIG_NLS_MAC_CELTIC is not set
-+# CONFIG_NLS_MAC_CENTEURO is not set
-+# CONFIG_NLS_MAC_CROATIAN is not set
-+# CONFIG_NLS_MAC_CYRILLIC is not set
-+# CONFIG_NLS_MAC_GAELIC is not set
-+# CONFIG_NLS_MAC_GREEK is not set
-+# CONFIG_NLS_MAC_ICELAND is not set
-+# CONFIG_NLS_MAC_INUIT is not set
-+# CONFIG_NLS_MAC_ROMANIAN is not set
-+# CONFIG_NLS_MAC_TURKISH is not set
-+# CONFIG_NLS_UTF8 is not set
-+
-+#
-+# Kernel hacking
-+#
-+CONFIG_PRINTK_TIME=y
-+CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
-+CONFIG_ENABLE_WARN_DEPRECATED=y
-+CONFIG_ENABLE_MUST_CHECK=y
-+CONFIG_FRAME_WARN=1024
-+CONFIG_MAGIC_SYSRQ=y
-+# CONFIG_STRIP_ASM_SYMS is not set
-+# CONFIG_READABLE_ASM is not set
-+# CONFIG_UNUSED_SYMBOLS is not set
-+CONFIG_DEBUG_FS=y
-+# CONFIG_HEADERS_CHECK is not set
-+# CONFIG_DEBUG_SECTION_MISMATCH is not set
-+CONFIG_DEBUG_KERNEL=y
-+# CONFIG_DEBUG_SHIRQ is not set
-+# CONFIG_LOCKUP_DETECTOR is not set
-+# CONFIG_PANIC_ON_OOPS is not set
-+CONFIG_PANIC_ON_OOPS_VALUE=0
-+# CONFIG_DETECT_HUNG_TASK is not set
-+CONFIG_SCHED_DEBUG=y
-+CONFIG_SCHEDSTATS=y
-+CONFIG_TIMER_STATS=y
-+# CONFIG_DEBUG_OBJECTS is not set
-+# CONFIG_DEBUG_SLAB is not set
-+CONFIG_HAVE_DEBUG_KMEMLEAK=y
-+# CONFIG_DEBUG_KMEMLEAK is not set
-+# CONFIG_DEBUG_RT_MUTEXES is not set
-+# CONFIG_RT_MUTEX_TESTER is not set
-+# CONFIG_DEBUG_SPINLOCK is not set
-+# CONFIG_DEBUG_MUTEXES is not set
-+# CONFIG_DEBUG_LOCK_ALLOC is not set
-+# CONFIG_PROVE_LOCKING is not set
-+# CONFIG_SPARSE_RCU_POINTER is not set
-+# CONFIG_LOCK_STAT is not set
-+# CONFIG_DEBUG_ATOMIC_SLEEP is not set
-+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-+CONFIG_STACKTRACE=y
-+# CONFIG_DEBUG_STACK_USAGE is not set
-+# CONFIG_DEBUG_KOBJECT is not set
-+# CONFIG_DEBUG_HIGHMEM is not set
-+CONFIG_DEBUG_BUGVERBOSE=y
-+CONFIG_DEBUG_INFO=y
-+CONFIG_DEBUG_INFO_REDUCED=y
-+# CONFIG_DEBUG_VM is not set
-+# CONFIG_DEBUG_WRITECOUNT is not set
-+# CONFIG_DEBUG_MEMORY_INIT is not set
-+# CONFIG_DEBUG_LIST is not set
-+# CONFIG_TEST_LIST_SORT is not set
-+# CONFIG_DEBUG_SG is not set
-+# CONFIG_DEBUG_NOTIFIERS is not set
-+# CONFIG_DEBUG_CREDENTIALS is not set
-+# CONFIG_BOOT_PRINTK_DELAY is not set
-+# CONFIG_RCU_TORTURE_TEST is not set
-+CONFIG_RCU_CPU_STALL_TIMEOUT=60
-+# CONFIG_RCU_CPU_STALL_INFO is not set
-+# CONFIG_RCU_TRACE is not set
-+# CONFIG_KPROBES_SANITY_TEST is not set
-+# CONFIG_BACKTRACE_SELF_TEST is not set
-+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
-+# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
-+# CONFIG_DEBUG_PER_CPU_MAPS is not set
-+# CONFIG_LKDTM is not set
-+CONFIG_NOTIFIER_ERROR_INJECTION=m
-+# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set
-+CONFIG_PM_NOTIFIER_ERROR_INJECT=m
-+# CONFIG_FAULT_INJECTION is not set
-+# CONFIG_DEBUG_PAGEALLOC is not set
-+CONFIG_NOP_TRACER=y
-+CONFIG_HAVE_FUNCTION_TRACER=y
-+CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
-+CONFIG_HAVE_DYNAMIC_FTRACE=y
-+CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
-+CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
-+CONFIG_HAVE_C_RECORDMCOUNT=y
-+CONFIG_TRACE_CLOCK=y
-+CONFIG_RING_BUFFER=y
-+CONFIG_EVENT_TRACING=y
-+CONFIG_EVENT_POWER_TRACING_DEPRECATED=y
-+CONFIG_CONTEXT_SWITCH_TRACER=y
-+CONFIG_RING_BUFFER_ALLOW_SWAP=y
-+CONFIG_TRACING=y
-+CONFIG_TRACING_SUPPORT=y
-+CONFIG_FTRACE=y
-+# CONFIG_FUNCTION_TRACER is not set
-+# CONFIG_IRQSOFF_TRACER is not set
-+# CONFIG_SCHED_TRACER is not set
-+# CONFIG_ENABLE_DEFAULT_TRACERS is not set
-+# CONFIG_FTRACE_SYSCALLS is not set
-+CONFIG_BRANCH_PROFILE_NONE=y
-+# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
-+# CONFIG_PROFILE_ALL_BRANCHES is not set
-+# CONFIG_STACK_TRACER is not set
-+# CONFIG_BLK_DEV_IO_TRACE is not set
-+CONFIG_KPROBE_EVENT=y
-+CONFIG_PROBE_EVENTS=y
-+# CONFIG_RING_BUFFER_BENCHMARK is not set
-+# CONFIG_RBTREE_TEST is not set
-+# CONFIG_INTERVAL_TREE_TEST is not set
-+# CONFIG_DYNAMIC_DEBUG is not set
-+# CONFIG_DMA_API_DEBUG is not set
-+# CONFIG_ATOMIC64_SELFTEST is not set
-+# CONFIG_SAMPLES is not set
-+CONFIG_HAVE_ARCH_KGDB=y
-+# CONFIG_KGDB is not set
-+# CONFIG_TEST_KSTRTOX is not set
-+# CONFIG_STRICT_DEVMEM is not set
-+CONFIG_ARM_UNWIND=y
-+# CONFIG_DEBUG_USER is not set
-+# CONFIG_DEBUG_LL is not set
-+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
-+# CONFIG_ARM_KPROBES_TEST is not set
-+# CONFIG_PID_IN_CONTEXTIDR is not set
-+
-+#
-+# Security options
-+#
-+CONFIG_KEYS=y
-+# CONFIG_ENCRYPTED_KEYS is not set
-+# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
-+# CONFIG_SECURITY_DMESG_RESTRICT is not set
-+CONFIG_SECURITY=y
-+CONFIG_SECURITYFS=y
-+CONFIG_SECURITY_NETWORK=y
-+CONFIG_SECURITY_NETWORK_XFRM=y
-+# CONFIG_SECURITY_PATH is not set
-+CONFIG_SECURITY_SMACK=y
-+# CONFIG_SECURITY_TOMOYO is not set
-+# CONFIG_SECURITY_APPARMOR is not set
-+# CONFIG_SECURITY_YAMA is not set
-+# CONFIG_IMA is not set
-+# CONFIG_EVM is not set
-+# CONFIG_DEFAULT_SECURITY_SMACK is not set
-+CONFIG_DEFAULT_SECURITY_DAC=y
-+CONFIG_DEFAULT_SECURITY=""
-+CONFIG_CRYPTO=y
-+
-+#
-+# Crypto core or helper
-+#
-+CONFIG_CRYPTO_ALGAPI=y
-+CONFIG_CRYPTO_ALGAPI2=y
-+CONFIG_CRYPTO_AEAD=y
-+CONFIG_CRYPTO_AEAD2=y
-+CONFIG_CRYPTO_BLKCIPHER=m
-+CONFIG_CRYPTO_BLKCIPHER2=y
-+CONFIG_CRYPTO_HASH=y
-+CONFIG_CRYPTO_HASH2=y
-+CONFIG_CRYPTO_RNG2=y
-+CONFIG_CRYPTO_PCOMP2=y
-+CONFIG_CRYPTO_MANAGER=y
-+CONFIG_CRYPTO_MANAGER2=y
-+# CONFIG_CRYPTO_USER is not set
-+CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
-+# CONFIG_CRYPTO_GF128MUL is not set
-+# CONFIG_CRYPTO_NULL is not set
-+CONFIG_CRYPTO_PCRYPT=y
-+CONFIG_CRYPTO_WORKQUEUE=y
-+# CONFIG_CRYPTO_CRYPTD is not set
-+CONFIG_CRYPTO_AUTHENC=m
-+# CONFIG_CRYPTO_TEST is not set
-+
-+#
-+# Authenticated Encryption with Associated Data
-+#
-+# CONFIG_CRYPTO_CCM is not set
-+# CONFIG_CRYPTO_GCM is not set
-+# CONFIG_CRYPTO_SEQIV is not set
-+
-+#
-+# Block modes
-+#
-+CONFIG_CRYPTO_CBC=m
-+# CONFIG_CRYPTO_CTR is not set
-+# CONFIG_CRYPTO_CTS is not set
-+CONFIG_CRYPTO_ECB=m
-+# CONFIG_CRYPTO_LRW is not set
-+# CONFIG_CRYPTO_PCBC is not set
-+# CONFIG_CRYPTO_XTS is not set
-+
-+#
-+# Hash modes
-+#
-+CONFIG_CRYPTO_HMAC=m
-+# CONFIG_CRYPTO_XCBC is not set
-+# CONFIG_CRYPTO_VMAC is not set
-+
-+#
-+# Digest
-+#
-+CONFIG_CRYPTO_CRC32C=y
-+# CONFIG_CRYPTO_GHASH is not set
-+# CONFIG_CRYPTO_MD4 is not set
-+CONFIG_CRYPTO_MD5=m
-+CONFIG_CRYPTO_MICHAEL_MIC=y
-+# CONFIG_CRYPTO_RMD128 is not set
-+# CONFIG_CRYPTO_RMD160 is not set
-+# CONFIG_CRYPTO_RMD256 is not set
-+# CONFIG_CRYPTO_RMD320 is not set
-+CONFIG_CRYPTO_SHA1=m
-+# CONFIG_CRYPTO_SHA1_ARM is not set
-+CONFIG_CRYPTO_SHA256=m
-+# CONFIG_CRYPTO_SHA512 is not set
-+# CONFIG_CRYPTO_TGR192 is not set
-+# CONFIG_CRYPTO_WP512 is not set
-+
-+#
-+# Ciphers
-+#
-+CONFIG_CRYPTO_AES=y
-+CONFIG_CRYPTO_AES_ARM=y
-+# CONFIG_CRYPTO_ANUBIS is not set
-+CONFIG_CRYPTO_ARC4=m
-+# CONFIG_CRYPTO_BLOWFISH is not set
-+# CONFIG_CRYPTO_CAMELLIA is not set
-+# CONFIG_CRYPTO_CAST5 is not set
-+# CONFIG_CRYPTO_CAST6 is not set
-+CONFIG_CRYPTO_DES=m
-+# CONFIG_CRYPTO_FCRYPT is not set
-+# CONFIG_CRYPTO_KHAZAD is not set
-+# CONFIG_CRYPTO_SALSA20 is not set
-+# CONFIG_CRYPTO_SEED is not set
-+# CONFIG_CRYPTO_SERPENT is not set
-+# CONFIG_CRYPTO_TEA is not set
-+# CONFIG_CRYPTO_TWOFISH is not set
-+
-+#
-+# Compression
-+#
-+CONFIG_CRYPTO_DEFLATE=y
-+# CONFIG_CRYPTO_ZLIB is not set
-+CONFIG_CRYPTO_LZO=y
-+
-+#
-+# Random Number Generation
-+#
-+# CONFIG_CRYPTO_ANSI_CPRNG is not set
-+# CONFIG_CRYPTO_USER_API_HASH is not set
-+# CONFIG_CRYPTO_USER_API_SKCIPHER is not set
-+CONFIG_CRYPTO_HW=y
-+# CONFIG_CRYPTO_DEV_OMAP_SHAM is not set
-+# CONFIG_CRYPTO_DEV_OMAP_AES is not set
-+CONFIG_ASYMMETRIC_KEY_TYPE=m
-+CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m
-+CONFIG_PUBLIC_KEY_ALGO_RSA=m
-+CONFIG_X509_CERTIFICATE_PARSER=m
-+CONFIG_BINARY_PRINTF=y
-+
-+#
-+# Library routines
-+#
-+CONFIG_BITREVERSE=y
-+CONFIG_GENERIC_STRNCPY_FROM_USER=y
-+CONFIG_GENERIC_STRNLEN_USER=y
-+CONFIG_GENERIC_PCI_IOMAP=y
-+CONFIG_GENERIC_IO=y
-+CONFIG_PERCPU_RWSEM=y
-+CONFIG_CRC_CCITT=y
-+CONFIG_CRC16=y
-+CONFIG_CRC_T10DIF=y
-+CONFIG_CRC_ITU_T=y
-+CONFIG_CRC32=y
-+# CONFIG_CRC32_SELFTEST is not set
-+CONFIG_CRC32_SLICEBY8=y
-+# CONFIG_CRC32_SLICEBY4 is not set
-+# CONFIG_CRC32_SARWATE is not set
-+# CONFIG_CRC32_BIT is not set
-+CONFIG_CRC7=y
-+CONFIG_LIBCRC32C=y
-+# CONFIG_CRC8 is not set
-+CONFIG_ZLIB_INFLATE=y
-+CONFIG_ZLIB_DEFLATE=y
-+CONFIG_LZO_COMPRESS=y
-+CONFIG_LZO_DECOMPRESS=y
-+# CONFIG_XZ_DEC is not set
-+# CONFIG_XZ_DEC_BCJ is not set
-+CONFIG_DECOMPRESS_GZIP=y
-+CONFIG_HAS_IOMEM=y
-+CONFIG_HAS_IOPORT=y
-+CONFIG_HAS_DMA=y
-+CONFIG_CPU_RMAP=y
-+CONFIG_DQL=y
-+CONFIG_NLATTR=y
-+CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
-+CONFIG_AVERAGE=y
-+CONFIG_CLZ_TAB=y
-+# CONFIG_CORDIC is not set
-+# CONFIG_DDR is not set
-+CONFIG_MPILIB=m
-+CONFIG_OID_REGISTRY=m
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0003-am33xx-musb-Add-OF-definitions.patch b/patches/not-capebus/0003-am33xx-musb-Add-OF-definitions.patch
deleted file mode 100644
index f5396580a5a7dc09b94f246f9c2f4712e483f592..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0003-am33xx-musb-Add-OF-definitions.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From d85d7ba9ec00800a244f7622326a305536930ae4 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 30 Oct 2012 20:45:35 +0200
-Subject: [PATCH 03/90] am33xx-musb: Add OF definitions
-
-For some reason these got dropped; reintroduce.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/boot/dts/am33xx.dtsi | 60 +++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 60 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index 1b91637..5c6e272 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -324,6 +324,66 @@
- 			status = "disabled";
- 		};
- 
-+		usb0_phy: phy0 {
-+			compatible = "nop-xceiv-usb";
-+		};
-+
-+		usb1_phy: phy1 {
-+			compatible = "nop-xceiv-usb";
-+		};
-+
-+		usb_otg_hs: usb_otg_hs {
-+			compatible = "ti,musb-am33xx";
-+			ti,hwmods = "usb_otg_hs";
-+			multipoint = <1>;
-+			num-eps = <16>;
-+			ram-bits = <12>;
-+			port0-mode = <3>;
-+			port1-mode = <1>;
-+			power = <250>;
-+			usb0-phy = <&usb0_phy>;
-+			usb1-phy = <&usb1_phy>;
-+		};
-+
-+		rtc {
-+			compatible = "ti,da830-rtc";
-+			ti,hwmods = "rtc";
-+		};
-+
-+		spi0: spi@48030000 {
-+			compatible = "ti,omap4-mcspi";
-+			ti,hwmods = "spi0";
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			reg = <0x48030000 0x400>;
-+			interrupt-parent = <&intc>;
-+			interrupt = <65>;
-+			dmas = <&edma 16
-+				&edma 17
-+				&edma 18
-+				&edma 19>;
-+			dma-names = "tx0", "rx0", "tx1", "rx1";
-+			ti,spi-num-cs = <2>;
-+			status = "disabled";
-+		};
-+
-+		spi1: spi@481a0000 {
-+			compatible = "ti,omap4-mcspi";
-+			ti,hwmods = "spi1";
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			reg = <0x481a0000 0x400>;
-+			interrupt-parent = <&intc>;
-+			interrupt = <125>;
-+			dmas = <&edma 42
-+				&edma 43
-+				&edma 44
-+				&edma 45>;
-+			dma-names = "tx0", "rx0", "tx1", "rx1";
-+			ti,spi-num-cs = <2>;
-+			status = "disabled";
-+		};
-+
- 		wdt2: wdt@44e35000 {
- 			compatible = "ti,omap3-wdt";
- 			ti,hwmods = "wd_timer2";
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0004-Mark-the-device-as-PRIVATE.patch b/patches/not-capebus/0004-Mark-the-device-as-PRIVATE.patch
deleted file mode 100644
index 6ba15a9dd8ee0a72589574cc3c44a6866c3e51e1..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0004-Mark-the-device-as-PRIVATE.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 92263f70796a27e9850fe02b708d41da1dbe2620 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 30 Nov 2012 12:12:55 +0200
-Subject: [PATCH 04/90] Mark the device as PRIVATE
-
-Turns out if you enable CONFIG_NET_DMA the ip stack will try
-to grab all the available non-private DMA channels sometime late in the
-boot sequence.
-
-That's bad enough, what is worse is that it brindly iterates over
-any possible channel; if the driver returns ENODEV on any of the
-channels dmaengine will remove the device from the list of available
-dma devices.
-
-Very crazy bug.
----
- drivers/dma/edma.c | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
-index e57cce3..2e27ec5 100644
---- a/drivers/dma/edma.c
-+++ b/drivers/dma/edma.c
-@@ -395,8 +395,11 @@ static int edma_alloc_chan_resources(struct dma_chan *chan)
- 	a_ch_num = edma_alloc_channel(echan->ch_num, edma_callback,
- 					chan, EVENTQ_DEFAULT);
- 
-+	/* NOTE: DO NOT RETURN ENODEV */
-+	/* It causes dmaengine to remove the device from it's list */
-+
- 	if (a_ch_num < 0) {
--		ret = -ENODEV;
-+		ret = -EINVAL;
- 		goto err_no_chan;
- 	}
- 
-@@ -404,7 +407,7 @@ static int edma_alloc_chan_resources(struct dma_chan *chan)
- 		dev_err(dev, "failed to allocate requested channel %u:%u\n",
- 			EDMA_CTLR(echan->ch_num),
- 			EDMA_CHAN_SLOT(echan->ch_num));
--		ret = -ENODEV;
-+		ret = -EINVAL;
- 		goto err_wrong_chan;
- 	}
- 
-@@ -591,6 +594,7 @@ static int edma_probe(struct platform_device *pdev)
- 
- 	dma_cap_zero(ecc->dma_slave.cap_mask);
- 	dma_cap_set(DMA_SLAVE, ecc->dma_slave.cap_mask);
-+	dma_cap_set(DMA_PRIVATE, ecc->dma_slave.cap_mask);
- 
- 	edma_dma_init(ecc, &ecc->dma_slave, &pdev->dev);
- 
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0005-omap_hsmmc-Bug-fixes-pinctl-gpio-reset.patch b/patches/not-capebus/0005-omap_hsmmc-Bug-fixes-pinctl-gpio-reset.patch
deleted file mode 100644
index 31bca7a151e5213c5101d84cde422d6230015809..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0005-omap_hsmmc-Bug-fixes-pinctl-gpio-reset.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-From 0090a2eacce199da3d32265325e070e300329058 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 30 Nov 2012 12:18:16 +0200
-Subject: [PATCH 05/90] omap_hsmmc: Bug fixes, pinctl & gpio-reset
-
-Cleanup omapmmc & add gpio-reset.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
-
-Conflicts:
-	drivers/mmc/host/omap_hsmmc.c
----
- drivers/mmc/host/omap_hsmmc.c          | 42 +++++++++++++++++++++++++++++++++-
- include/linux/platform_data/mmc-omap.h |  3 +++
- 2 files changed, 44 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
-index e30c1ee..1f29d67 100644
---- a/drivers/mmc/host/omap_hsmmc.c
-+++ b/drivers/mmc/host/omap_hsmmc.c
-@@ -40,6 +40,10 @@
- #include <linux/pinctrl/consumer.h>
- #include <linux/pm_runtime.h>
- #include <linux/platform_data/mmc-omap.h>
-+#include <linux/pinctrl/consumer.h>
-+#include <linux/err.h>
-+#include <mach/hardware.h>
-+#include <plat/cpu.h>
- 
- /* OMAP HSMMC Host Controller Registers */
- #define OMAP_HSMMC_SYSSTATUS	0x0014
-@@ -390,6 +394,7 @@ static inline int omap_hsmmc_have_reg(void)
- static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata)
- {
- 	int ret;
-+	unsigned long flags;
- 
- 	if (gpio_is_valid(pdata->slots[0].switch_pin)) {
- 		if (pdata->slots[0].cover)
-@@ -419,6 +424,24 @@ static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata)
- 	} else
- 		pdata->slots[0].gpio_wp = -EINVAL;
- 
-+	if (gpio_is_valid(pdata->slots[0].gpio_reset)) {
-+		flags = pdata->slots[0].gpio_reset_active_low ?
-+				GPIOF_OUT_INIT_LOW : GPIOF_OUT_INIT_HIGH;
-+		ret = gpio_request_one(pdata->slots[0].gpio_reset, flags,
-+				"mmc_reset");
-+		if (ret)
-+			goto err_free_wp;
-+
-+		/* hold reset */
-+		udelay(pdata->slots[0].gpio_reset_hold_us);
-+
-+		gpio_set_value(pdata->slots[0].gpio_reset,
-+				!pdata->slots[0].gpio_reset_active_low);
-+
-+	} else
-+		pdata->slots[0].gpio_reset = -EINVAL;
-+
-+
- 	return 0;
- 
- err_free_wp:
-@@ -432,6 +455,8 @@ err_free_sp:
- 
- static void omap_hsmmc_gpio_free(struct omap_mmc_platform_data *pdata)
- {
-+	if (gpio_is_valid(pdata->slots[0].gpio_reset))
-+		gpio_free(pdata->slots[0].gpio_reset);
- 	if (gpio_is_valid(pdata->slots[0].gpio_wp))
- 		gpio_free(pdata->slots[0].gpio_wp);
- 	if (gpio_is_valid(pdata->slots[0].switch_pin))
-@@ -786,7 +811,7 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd,
- 	 * ac, bc, adtc, bcr. Only commands ending an open ended transfer need
- 	 * a val of 0x3, rest 0x0.
- 	 */
--	if (cmd == host->mrq->stop)
-+	if (host->mrq && cmd == host->mrq->stop)
- 		cmdtype = 0x3;
- 
- 	cmdreg = (cmd->opcode << 24) | (resptype << 16) | (cmdtype << 22);
-@@ -828,6 +853,8 @@ static void omap_hsmmc_request_done(struct omap_hsmmc_host *host, struct mmc_req
- 	int dma_ch;
- 	unsigned long flags;
- 
-+	BUG_ON(mrq == NULL);
-+
- 	spin_lock_irqsave(&host->irq_lock, flags);
- 	host->req_in_progress = 0;
- 	dma_ch = host->dma_ch;
-@@ -1717,6 +1744,7 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
- 	struct omap_mmc_platform_data *pdata;
- 	struct device_node *np = dev->of_node;
- 	u32 bus_width, max_freq;
-+	enum of_gpio_flags reset_flags;
- 
- 	pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
- 	if (!pdata)
-@@ -1729,6 +1757,14 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
- 	pdata->nr_slots = 1;
- 	pdata->slots[0].switch_pin = of_get_named_gpio(np, "cd-gpios", 0);
- 	pdata->slots[0].gpio_wp = of_get_named_gpio(np, "wp-gpios", 0);
-+	reset_flags = 0;
-+	pdata->slots[0].gpio_reset = of_get_named_gpio_flags(np,
-+			"reset-gpios", 0, &reset_flags);
-+	pdata->slots[0].gpio_reset_active_low =
-+		(reset_flags & OF_GPIO_ACTIVE_LOW) != 0;
-+	pdata->slots[0].gpio_reset_hold_us = 100;	/* default */
-+	of_property_read_u32(np, "reset-gpio-hold-us",
-+			&pdata->slots[0].gpio_reset_hold_us);
- 
- 	if (of_find_property(np, "ti,non-removable", NULL)) {
- 		pdata->slots[0].nonremovable = true;
-@@ -1791,6 +1827,10 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
- 		return -ENXIO;
- 	}
- 
-+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-+	if (IS_ERR(pinctrl))
-+		dev_warn(&pdev->dev, "unable to select pin group\n");
-+
- 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- 	irq = platform_get_irq(pdev, 0);
- 	if (res == NULL || irq < 0)
-diff --git a/include/linux/platform_data/mmc-omap.h b/include/linux/platform_data/mmc-omap.h
-index 2bf1b30..d548994 100644
---- a/include/linux/platform_data/mmc-omap.h
-+++ b/include/linux/platform_data/mmc-omap.h
-@@ -115,6 +115,9 @@ struct omap_mmc_platform_data {
- 
- 		int switch_pin;			/* gpio (card detect) */
- 		int gpio_wp;			/* gpio (write protect) */
-+		int gpio_reset;			/* gpio (reset) */
-+		int gpio_reset_active_low;	/* 1 if reset is active low */
-+		u32 gpio_reset_hold_us;		/* time to hold in us */
- 
- 		int (*set_bus_mode)(struct device *dev, int slot, int bus_mode);
- 		int (*set_power)(struct device *dev, int slot,
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0006-tps65217-bl-Locate-backlight-node-correctly.patch b/patches/not-capebus/0006-tps65217-bl-Locate-backlight-node-correctly.patch
deleted file mode 100644
index 694a3456e97904c6a8917e157bde6bf9ca665d4d..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0006-tps65217-bl-Locate-backlight-node-correctly.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 7e2e08411bea2c23f8563f94a7cf378fcfb30e08 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 28 Dec 2012 16:54:51 +0200
-Subject: [PATCH 06/90] tps65217-bl: Locate backlight node correctly.
-
-When using overlays find_node doesn't work like it used to, because
-the new nodes are inserted at the head of allnodes.
-
-Use the correct function to locate the child node.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/video/backlight/tps65217_bl.c | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/video/backlight/tps65217_bl.c b/drivers/video/backlight/tps65217_bl.c
-index 69c1dfe..31a9203 100644
---- a/drivers/video/backlight/tps65217_bl.c
-+++ b/drivers/video/backlight/tps65217_bl.c
-@@ -247,12 +247,14 @@ tps65217_bl_parse_dt(struct platform_device *pdev, struct tps65217 **tpsp,
- 
- 	rnode = of_node_get(tps->dev->of_node);
- 
--	node = of_find_node_by_name(rnode, "backlight");
-+	node = of_get_child_by_name(rnode, "backlight");
- 	of_node_put(rnode);
- 	rnode = NULL;
- 
--	if (!node)
-+	if (!node) {
-+		dev_err(&pdev->dev, "failed to find backlight node\n");
- 		return ERR_PTR(-ENODEV);
-+	}
- 
- 	pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
- 	if (!pdata) {
-@@ -339,8 +341,10 @@ static int tps65217_bl_probe(struct platform_device *pdev)
- 
- 	if (pdev->dev.of_node) {
- 		pdata = tps65217_bl_parse_dt(pdev, &tps, &brightness);
--		if (IS_ERR(pdata))
-+		if (IS_ERR(pdata)) {
-+			dev_err(&pdev->dev, "DT parse failed.\n");
- 			return PTR_ERR(pdata);
-+		}
- 	} else {
- 		if (!pdev->dev.platform_data) {
- 			dev_err(&pdev->dev, "no platform data provided\n");
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0007-arm-Export-cache-flush-management-symbols-when-MULTI.patch b/patches/not-capebus/0007-arm-Export-cache-flush-management-symbols-when-MULTI.patch
deleted file mode 100644
index 4e577aeadc35489b7974cb3ef8d9a8b1b6c13221..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0007-arm-Export-cache-flush-management-symbols-when-MULTI.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 0fe203b724f91eaf81932b03d5f3f29dc8bdd12d Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Sun, 16 Dec 2012 19:46:34 +0200
-Subject: [PATCH 07/90] arm: Export cache flush management symbols when
- !MULTI_CACHE
-
-When compiling a kernel without CONFIG_MULTI_CACHE enabled the
-dma access functions end up not being exported. Fix it.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/kernel/setup.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
-index 3f6cbb2..4540dad 100644
---- a/arch/arm/kernel/setup.c
-+++ b/arch/arm/kernel/setup.c
-@@ -931,3 +931,12 @@ const struct seq_operations cpuinfo_op = {
- 	.stop	= c_stop,
- 	.show	= c_show
- };
-+
-+/* export the cache management functions */
-+#ifndef MULTI_CACHE
-+
-+EXPORT_SYMBOL(__glue(_CACHE,_dma_map_area));
-+EXPORT_SYMBOL(__glue(_CACHE,_dma_unmap_area));
-+EXPORT_SYMBOL(__glue(_CACHE,_dma_flush_range));
-+
-+#endif
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0008-am335x-bone-dtsi-Clean-up.patch b/patches/not-capebus/0008-am335x-bone-dtsi-Clean-up.patch
deleted file mode 100644
index 414338c3ccfb2dffdbc7506f941475daa1b31ac4..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0008-am335x-bone-dtsi-Clean-up.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From 2fcb3452a58f1b87e144a1a2135126e9a2cf9204 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 14 Dec 2012 14:34:08 +0200
-Subject: [PATCH 08/90] am335x-bone-dtsi: Clean up
-
-Clean up the common dtsi.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
-
-Conflicts:
-	arch/arm/boot/dts/am335x-bone-common.dtsi
-	arch/arm/boot/dts/am335x-bone.dts
----
- arch/arm/boot/dts/am335x-bone-common.dtsi |   80 +----------------------------
- 1 file changed, 1 insertion(+), 79 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
-index e1a126a..b084324 100644
---- a/arch/arm/boot/dts/am335x-bone-common.dtsi
-+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
-@@ -73,7 +73,7 @@
- 		};
- 	};
- 
--	ocp {
-+	ocp: ocp {
- 		uart1: serial@44e09000 {
- 			status = "okay";
- 		};
-@@ -128,35 +128,6 @@
- 		};
- 	};
- 
--	leds {
--		compatible = "gpio-leds";
--
--		led@2 {
--			label = "beaglebone:green:heartbeat";
--			gpios = <&gpio2 21 0>;
--			linux,default-trigger = "heartbeat";
--			default-state = "off";
--		};
--
--		led@3 {
--			label = "beaglebone:green:mmc0";
--			gpios = <&gpio2 22 0>;
--			linux,default-trigger = "mmc0";
--			default-state = "off";
--		};
--
--		led@4 {
--			label = "beaglebone:green:usr2";
--			gpios = <&gpio2 23 0>;
--			default-state = "off";
--		};
--
--		led@5 {
--			label = "beaglebone:green:usr3";
--			gpios = <&gpio2 24 0>;
--			default-state = "off";
--		};
--	};
- };
- 
- &i2c0 {
-@@ -166,41 +137,6 @@
- 	tps: tps@24 {
- 		reg = <0x24>;
- 	};
--
--	baseboard_eeprom: baseboard_eeprom@50 {
--		compatible = "at,24c256";
--		reg = <0x50>;
--	};
--
--};
--
--&i2c2 {
--	status = "okay";
--	pinctrl-names = "default";
--	pinctrl-0 = <&i2c2_pins>;
--
--	clock-frequency = <100000>;
--
--	/* OK, I know these are cape but for now it will do */
--	cape_eeprom_0: cape_eeprom_0@54 {
--		compatible = "at,24c256";
--		reg = <0x54>;
--	};
--
--	cape_eeprom_1: cape_eeprom_1@55 {
--		compatible = "at,24c256";
--		reg = <0x55>;
--	};
--
--	cape_eeprom_2: cape_eeprom_2@56 {
--		compatible = "at,24c256";
--		reg = <0x56>;
--	};
--
--	cape_eeprom_3: cape_eeprom_3@57 {
--		compatible = "at,24c256";
--		reg = <0x57>;
--	};
- };
- 
- /include/ "tps65217.dtsi"
-@@ -264,20 +200,6 @@
- 	vmmc-supply = <&ldo3_reg>;
- };
- 
--&spi1 {
--	status = "okay";
--
--	lcd@0 {
--		compatible = "adafruit,tft-lcd-1.8-green", "sitronix,st7735";
--		spi-max-frequency = <8000000>;
--		reg = <0>;
--		spi-cpol;
--		spi-cpha;
--		st7735-rst = <&gpio4 19 0>;
--		st7735-dc = <&gpio4 21 0>;
--	};
--};
--
- &edma {
- 	ti,edma-xbar-event-map = <32 12>;
- };
--- 
-1.7.10.4
-
diff --git a/patches/not-capebus/0009-am335x-bone-dtsi-Introduce-new-I2C-entries.patch b/patches/not-capebus/0009-am335x-bone-dtsi-Introduce-new-I2C-entries.patch
deleted file mode 100644
index 49f6c45fec89c02981ca97a64c5fcc1cd8d70153..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0009-am335x-bone-dtsi-Introduce-new-I2C-entries.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 363f14c77cde5b84d119b9bbb523be261279c9d2 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 14 Dec 2012 14:36:38 +0200
-Subject: [PATCH 09/90] am335x-bone-dtsi: Introduce new I2C entries
-
-Introduce I2C entries that are required for capes.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/boot/dts/am335x-bone-common.dtsi | 33 +++++++++++++++++++++++++++++++
- 1 file changed, 33 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
-index b084324..312ded8 100644
---- a/arch/arm/boot/dts/am335x-bone-common.dtsi
-+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
-@@ -137,6 +137,39 @@
- 	tps: tps@24 {
- 		reg = <0x24>;
- 	};
-+
-+	baseboard_eeprom: baseboard_eeprom@50 {
-+		compatible = "at,24c256";
-+		reg = <0x50>;
-+	};
-+};
-+
-+&i2c2 {
-+	status = "okay";
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c2_pins>;
-+
-+	clock-frequency = <100000>;
-+
-+	cape_eeprom0: cape_eeprom0@54 {
-+		compatible = "at,24c256";
-+		reg = <0x54>;
-+	};
-+
-+	cape_eeprom1: cape_eeprom1@55 {
-+		compatible = "at,24c256";
-+		reg = <0x55>;
-+	};
-+
-+	cape_eeprom2: cape_eeprom2@56 {
-+		compatible = "at,24c256";
-+		reg = <0x56>;
-+	};
-+
-+	cape_eeprom3: cape_eeprom3@57 {
-+		compatible = "at,24c256";
-+		reg = <0x57>;
-+	};
- };
- 
- /include/ "tps65217.dtsi"
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0010-am335x-dt-Add-I2C0-pinctrl-entries.patch b/patches/not-capebus/0010-am335x-dt-Add-I2C0-pinctrl-entries.patch
deleted file mode 100644
index 4ee9aa50603057b86015ab6905db3fb29d197e9c..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0010-am335x-dt-Add-I2C0-pinctrl-entries.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From f47ae73eea67943a1a7455c76922ea41dfd744d0 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 28 Dec 2012 11:26:59 +0200
-Subject: [PATCH 10/90] am335x-dt: Add I2C0 pinctrl entries.
-
-Make sure I2C0 gets it's own pinctrl entries and doesn't rely on the
-bootloader.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/boot/dts/am335x-bone-common.dtsi | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
-index 312ded8..e43417b 100644
---- a/arch/arm/boot/dts/am335x-bone-common.dtsi
-+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
-@@ -65,6 +65,12 @@
- 				0x60 0x17	/* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */
- 			>;
- 		};
-+		i2c0_pins: pinmux_i2c0_pins {
-+			pinctrl-single,pins = <
-+				0x188 0x70 	/* i2c0_sda, SLEWCTRL_SLOW | INPUT_PULLUP | MODE0 */
-+				0x18c 0x70	/* i2c0_scl, SLEWCTRL_SLOW | INPUT_PULLUP | MODE0 */
-+			>;
-+		};
- 		i2c2_pins: pinmux_i2c2_pins {
- 			pinctrl-single,pins = <
- 				0x178 0x73 	/* uart1_ctsn.i2c2_sda, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */
-@@ -133,6 +139,8 @@
- &i2c0 {
- 	status = "okay";
- 	clock-frequency = <400000>;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c0_pins>;
- 
- 	tps: tps@24 {
- 		reg = <0x24>;
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0011-Cleanup-am33xx.dtsi.patch b/patches/not-capebus/0011-Cleanup-am33xx.dtsi.patch
deleted file mode 100644
index 94eaf4c938f607c1cbdee024a05bbe655ea5449a..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0011-Cleanup-am33xx.dtsi.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 0a2471a4ee498b7ef47fb7d45538340a81fd047e Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 28 Dec 2012 20:15:52 +0200
-Subject: [PATCH 11/90] Cleanup am33xx.dtsi
-
----
- arch/arm/boot/dts/am33xx.dtsi | 54 -------------------------------------------
- 1 file changed, 54 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index 5c6e272..5218fbe 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -67,60 +67,6 @@
- 		#size-cells = <0>;
- 		pinctrl-single,register-width = <32>;
- 		pinctrl-single,function-mask = <0x7f>;
--
--		bone_dvi_cape_dvi_00A0_pins: pinmux_bone_dvi_cape_dvi_00A0_pins {
--			pinctrl-single,pins = <
--				0x1c 0x07	/* gpmc_ad7.gpio1_7, OUTPUT | MODE7 - DVIPDn */
--
--				0xa0 0x08	/* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xa4 0x08	/* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xa8 0x08	/* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xac 0x08	/* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xb0 0x08	/* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xb4 0x08	/* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xb8 0x08	/* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xbc 0x08	/* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xc0 0x08	/* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xc4 0x08	/* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xc8 0x08	/* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xcc 0x08	/* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xd0 0x08	/* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xd4 0x08	/* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xd8 0x08	/* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xdc 0x08	/* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xe0 0x00	/* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
--				0xe4 0x00	/* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
--				0xe8 0x00	/* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
--				0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
--			>;
--		};
--
--		bone_dvi_cape_dvi_00A1_pins: pinmux_bone_dvi_cape_dvi_00A1_pins {
--			pinctrl-single,pins = <
--				0x84 0x07	/* gpmc_csn2.gpio1_31, OUTPUT | MODE7 - DVIPDn */
--
--				0xa0 0x08	/* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xa4 0x08	/* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xa8 0x08	/* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xac 0x08	/* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xb0 0x08	/* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xb4 0x08	/* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xb8 0x08	/* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xbc 0x08	/* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xc0 0x08	/* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xc4 0x08	/* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xc8 0x08	/* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xcc 0x08	/* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xd0 0x08	/* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xd4 0x08	/* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xd8 0x08	/* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xdc 0x08	/* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
--				0xe0 0x00	/* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
--				0xe4 0x00	/* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
--				0xe8 0x00	/* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
--				0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
--			>;
--		};
- 	};
- 
- 	/*
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0012-Fix-platform-device-resource-linking.patch b/patches/not-capebus/0012-Fix-platform-device-resource-linking.patch
deleted file mode 100644
index 07e177c7f9b637cbf457cc82d3a25ba9059e3b34..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0012-Fix-platform-device-resource-linking.patch
+++ /dev/null
@@ -1,218 +0,0 @@
-From ba5c6ad7d3d882f1702eac751d0276702f624bc7 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 28 Dec 2012 11:34:15 +0200
-Subject: [PATCH 12/90] Fix platform device resource linking
-
-Platform device removal uncovered a number of problems with
-the way resources are handled in the core platform code.
-
-Resources now form child/parent linkages and this requires
-proper linking of the resources. On top of that the OF core
-directly creates it's own platform devices. Simplify things
-by providing helper functions that manage the linking properly.
-
-Two functions are provided:
-
-platform_device_link_resources(), which links all the
-linkable resources (if not already linked).
-
-and platform_device_unlink_resources(), which unlinks all the
-resources.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/base/platform.c         | 124 +++++++++++++++++++++++++++-------------
- include/linux/platform_device.h |   4 ++
- 2 files changed, 87 insertions(+), 41 deletions(-)
-
-diff --git a/drivers/base/platform.c b/drivers/base/platform.c
-index c0b8df3..dab9552 100644
---- a/drivers/base/platform.c
-+++ b/drivers/base/platform.c
-@@ -270,6 +270,80 @@ int platform_device_add_data(struct platform_device *pdev, const void *data,
- }
- EXPORT_SYMBOL_GPL(platform_device_add_data);
- 
-+static struct resource *platform_device_parent_resource(
-+		struct platform_device *pdev, struct resource *r)
-+{
-+	unsigned long type;
-+
-+	if (r->parent)
-+		return r->parent;
-+
-+	type = resource_type(r);
-+	switch (type) {
-+		case IORESOURCE_MEM:
-+			return &iomem_resource;
-+		case IORESOURCE_IO:
-+			return &ioport_resource;
-+		/* TODO: What about the other resources? */
-+		default:
-+			break;
-+	}
-+	pr_debug("%s: no parent for resource %p type 0x%lx\n",
-+			dev_name(&pdev->dev), r, resource_type(r));
-+	return NULL;
-+}
-+
-+int platform_device_unlink_resources(struct platform_device *pdev)
-+{
-+	struct resource *r;
-+	int i;
-+
-+	for (i = pdev->num_resources - 1; i >= 0; i--) {
-+		r = &pdev->resource[i];
-+		if (r->parent == NULL)
-+			continue;
-+		release_resource(r);
-+	}
-+	return 0;
-+}
-+EXPORT_SYMBOL_GPL(platform_device_unlink_resources);
-+
-+int platform_device_link_resources(struct platform_device *pdev)
-+{
-+	int i;
-+	struct resource *p, *r;
-+
-+	for (i = 0; i < pdev->num_resources; i++) {
-+		r = &pdev->resource[i];
-+
-+		if (r->name == NULL)
-+			r->name = dev_name(&pdev->dev);
-+
-+		/* already linked */
-+		if (r->parent != NULL)
-+			continue;
-+
-+		p = platform_device_parent_resource(pdev, r);
-+		if (p && insert_resource(p, r)) {
-+			pr_err("%s: failed to claim resource %d\n",
-+			       dev_name(&pdev->dev), i);
-+			goto fail;
-+		}
-+	}
-+
-+	return 0;
-+
-+fail:
-+	while (--i >= 0) {
-+		r = &pdev->resource[i];
-+		if (r->parent == NULL)
-+			continue;
-+		release_resource(r);
-+	}
-+	return -EBUSY;
-+}
-+EXPORT_SYMBOL_GPL(platform_device_link_resources);
-+
- /**
-  * platform_device_add - add a platform device to device hierarchy
-  * @pdev: platform device we're adding
-@@ -279,7 +353,7 @@ EXPORT_SYMBOL_GPL(platform_device_add_data);
-  */
- int platform_device_add(struct platform_device *pdev)
- {
--	int i, ret;
-+	int ret;
- 
- 	if (!pdev)
- 		return -EINVAL;
-@@ -311,28 +385,10 @@ int platform_device_add(struct platform_device *pdev)
- 		break;
- 	}
- 
--	for (i = 0; i < pdev->num_resources; i++) {
--		struct resource *p, *r = &pdev->resource[i];
--
--		if (r->name == NULL)
--			r->name = dev_name(&pdev->dev);
--
--		p = r->parent;
--		if (!p) {
--			if (resource_type(r) == IORESOURCE_MEM)
--				p = &iomem_resource;
--			else if (resource_type(r) == IORESOURCE_IO)
--				p = &ioport_resource;
--		}
--
--		if (p && insert_resource(p, r)) {
--			printk(KERN_ERR
--			       "%s: failed to claim resource %d\n",
--			       dev_name(&pdev->dev), i);
--			ret = -EBUSY;
--			goto failed;
--		}
--	}
-+	/* make sure the resources are linked properly */
-+	ret = platform_device_link_resources(pdev);
-+	if (ret != 0)
-+		goto failed_res;
- 
- 	pr_debug("Registering platform device '%s'. Parent at %s\n",
- 		 dev_name(&pdev->dev), dev_name(pdev->dev.parent));
-@@ -341,20 +397,14 @@ int platform_device_add(struct platform_device *pdev)
- 	if (ret == 0)
- 		return ret;
- 
-- failed:
-+	platform_device_unlink_resources(pdev);
-+
-+ failed_res:
- 	if (pdev->id_auto) {
- 		ida_simple_remove(&platform_devid_ida, pdev->id);
- 		pdev->id = PLATFORM_DEVID_AUTO;
- 	}
- 
--	while (--i >= 0) {
--		struct resource *r = &pdev->resource[i];
--		unsigned long type = resource_type(r);
--
--		if (type == IORESOURCE_MEM || type == IORESOURCE_IO)
--			release_resource(r);
--	}
--
-  err_out:
- 	return ret;
- }
-@@ -370,8 +420,6 @@ EXPORT_SYMBOL_GPL(platform_device_add);
-  */
- void platform_device_del(struct platform_device *pdev)
- {
--	int i;
--
- 	if (pdev) {
- 		device_del(&pdev->dev);
- 
-@@ -380,13 +428,7 @@ void platform_device_del(struct platform_device *pdev)
- 			pdev->id = PLATFORM_DEVID_AUTO;
- 		}
- 
--		for (i = 0; i < pdev->num_resources; i++) {
--			struct resource *r = &pdev->resource[i];
--			unsigned long type = resource_type(r);
--
--			if (type == IORESOURCE_MEM || type == IORESOURCE_IO)
--				release_resource(r);
--		}
-+		platform_device_unlink_resources(pdev);
- 	}
- }
- EXPORT_SYMBOL_GPL(platform_device_del);
-diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
-index a9ded9a..e48c2d5 100644
---- a/include/linux/platform_device.h
-+++ b/include/linux/platform_device.h
-@@ -293,4 +293,8 @@ extern int platform_pm_restore(struct device *dev);
- #define USE_PLATFORM_PM_SLEEP_OPS
- #endif
- 
-+/* helper functions for resource list managment */
-+int platform_device_unlink_resources(struct platform_device *pdev);
-+int platform_device_link_resources(struct platform_device *pdev);
-+
- #endif /* _PLATFORM_DEVICE_H_ */
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0013-Link-platform-device-resources-properly.patch b/patches/not-capebus/0013-Link-platform-device-resources-properly.patch
deleted file mode 100644
index 9752f741b65a989aa47a680760c583ee72ae44ae..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0013-Link-platform-device-resources-properly.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 1ad4b17482d21bcdb6172df0151ec262716ec3db Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 28 Dec 2012 11:39:29 +0200
-Subject: [PATCH 13/90] Link platform device resources properly.
-
-The resources of the platform devices created by the OF core were
-not properly linked. Make sure that they are, so that we don't get
-any crashes when trying to remove the device.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/of/device.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/drivers/of/device.c b/drivers/of/device.c
-index 4c74e4f..d75fcaf 100644
---- a/drivers/of/device.c
-+++ b/drivers/of/device.c
-@@ -62,6 +62,9 @@ int of_device_add(struct platform_device *ofdev)
- 	if (!ofdev->dev.parent)
- 		set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->dev.of_node));
- 
-+	/* make sure we add the resources to the appropriate lists */
-+	platform_device_link_resources(ofdev);
-+
- 	return device_add(&ofdev->dev);
- }
- 
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0014-Properly-handle-resources-for-omap_devices.patch b/patches/not-capebus/0014-Properly-handle-resources-for-omap_devices.patch
deleted file mode 100644
index 8a2fe71ef636b05d26c17409b26b7d01abed8997..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0014-Properly-handle-resources-for-omap_devices.patch
+++ /dev/null
@@ -1,294 +0,0 @@
-From 89df79234f2be914d8f3c996efbb2ee765682f52 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 28 Dec 2012 11:41:11 +0200
-Subject: [PATCH 14/90] Properly handle resources for omap_devices
-
-omap_device relies on the platform notifier callbacks managing resources
-behind the scenes. The resources were not properly linked causing crashes
-when removing the device.
-
-Rework the resource modification code so that linking is performed properly,
-and make sure that no resources that have no parent (which can happen for DMA
-& IRQ resources) are ever left for cleanup by the core resource layer.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/mach-omap2/omap_device.c | 232 ++++++++++++++++++++++++--------------
- 1 file changed, 148 insertions(+), 84 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
-index e065daa..9f8dba1 100644
---- a/arch/arm/mach-omap2/omap_device.c
-+++ b/arch/arm/mach-omap2/omap_device.c
-@@ -494,30 +494,156 @@ static int omap_device_fill_resources(struct omap_device *od,
- }
- 
- /**
-- * _od_fill_dma_resources - fill in array of struct resource with dma resources
-+ * omap_device_fixup_resources - Fix platform device resources
-  * @od: struct omap_device *
-- * @res: pointer to an array of struct resource to be filled in
-- *
-- * Populate one or more empty struct resource pointed to by @res with
-- * the dma resource data for this omap_device @od.  Used by
-- * omap_device_alloc() after calling omap_device_count_resources().
-- *
-- * Ideally this function would not be needed at all.  If we have
-- * mechanism to get dma resources from DT.
-  *
-- * Returns 0.
-+ * Fixup the platform device resources so that the resources
-+ * from the hwmods are included for.
-  */
--static int _od_fill_dma_resources(struct omap_device *od,
--				      struct resource *res)
-+static int omap_device_fixup_resources(struct omap_device *od)
- {
--	int i, r;
-+	struct platform_device *pdev = od->pdev;
-+	int i, j, ret, res_count;
-+	struct resource *res, *r, *rnew, *rn;
-+	unsigned long type;
- 
--	for (i = 0; i < od->hwmods_cnt; i++) {
--		r = omap_hwmod_fill_dma_resources(od->hwmods[i], res);
--		res += r;
-+	/*
-+	 * DT Boot:
-+	 *   OF framework will construct the resource structure (currently
-+	 *   does for MEM & IRQ resource) and we should respect/use these
-+	 *   resources, killing hwmod dependency.
-+	 *   If pdev->num_resources > 0, we assume that MEM & IRQ resources
-+	 *   have been allocated by OF layer already (through DTB).
-+	 *
-+	 * Non-DT Boot:
-+	 *   Here, pdev->num_resources = 0, and we should get all the
-+	 *   resources from hwmod.
-+	 *
-+	 * TODO: Once DMA resource is available from OF layer, we should
-+	 *   kill filling any resources from hwmod.
-+	 */
-+
-+	/* count number of resources hwmod provides */
-+	res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
-+					IORESOURCE_DMA | IORESOURCE_MEM);
-+
-+	/* if no resources from hwmod, we're done already */
-+	if (res_count == 0)
-+		return 0;
-+
-+	/* Allocate resources memory to account for all hwmod resources */
-+	res = kzalloc(sizeof(struct resource) * res_count, GFP_KERNEL);
-+	if (!res) {
-+		ret = -ENOMEM;
-+		goto fail_no_res;
- 	}
- 
-+	/* fill all the resources */
-+	ret = omap_device_fill_resources(od, res);
-+	if (ret != 0)
-+		goto fail_no_fill;
-+
-+	/*
-+	 * If pdev->num_resources > 0, then assume that,
-+	 * MEM and IRQ resources will only come from DT and only
-+	 * fill DMA resource from hwmod layer.
-+	 */
-+	if (pdev->num_resources > 0) {
-+
-+		dev_dbg(&pdev->dev, "%s(): resources allocated %d hwmod #%d\n",
-+			__func__, pdev->num_resources, res_count);
-+
-+		/* find number of resources needing to be inserted */
-+		for (i = 0, j = 0, r = res; i < res_count; i++, r++) {
-+			type = resource_type(r);
-+			if (type == IORESOURCE_DMA)
-+				j++;
-+		}
-+
-+		/* no need to insert anything, just return */
-+		if (j == 0) {
-+			kfree(res);
-+			return 0;
-+		}
-+
-+		/* we need to insert j additional resources */
-+		rnew = kzalloc(sizeof(*rnew) *
-+				(pdev->num_resources + j), GFP_KERNEL);
-+		if (rnew == NULL)
-+			goto fail_no_rnew;
-+
-+		/*
-+		 * Unlink any resources from any lists.
-+		 * This is important since the copying destroys any
-+		 * linkage
-+		 */
-+		for (i = 0, r = pdev->resource;
-+				i < pdev->num_resources; i++, r++) {
-+
-+			if (!r->parent)
-+				continue;
-+
-+			dev_dbg(&pdev->dev,
-+					"Releasing resource %p\n", r);
-+			release_resource(r);
-+			r->parent = NULL;
-+			r->sibling = NULL;
-+			r->child = NULL;
-+		}
-+
-+		memcpy(rnew, pdev->resource,
-+				sizeof(*rnew) * pdev->num_resources);
-+
-+		/* now append the resources from the hwmods */
-+		rn = rnew + pdev->num_resources;
-+		for (i = 0, r = res; i < res_count; i++, r++) {
-+
-+			type = resource_type(r);
-+			if (type != IORESOURCE_DMA)
-+				continue;
-+
-+			/* append the hwmod resource */
-+			memcpy(rn, r, sizeof(*r));
-+
-+			/* make sure these are zeroed out */
-+			rn->parent = NULL;
-+			rn->child = NULL;
-+			rn->sibling = NULL;
-+
-+			rn++;
-+		}
-+		kfree(res);	/* we don't need res anymore */
-+
-+		/* this is our new resource table */
-+		res = rnew;
-+		res_count = j;
-+
-+	} else {
-+		dev_dbg(&pdev->dev, "%s(): using resources from hwmod %d\n",
-+			__func__, res_count);
-+	}
-+
-+	ret = platform_device_add_resources(pdev, res, res_count);
-+	kfree(res);
-+
-+	/* failed to add the resources? */
-+	if (ret != 0)
-+		return ret;
-+
-+	/* finally link all the resources again */
-+	ret = platform_device_link_resources(pdev);
-+	if (ret != 0)
-+		return ret;
-+
- 	return 0;
-+
-+fail_no_rnew:
-+	/* nothing */
-+fail_no_fill:
-+	kfree(res);
-+
-+fail_no_res:
-+	return ret;
- }
- 
- /**
-@@ -541,9 +667,8 @@ struct omap_device *omap_device_alloc(struct platform_device *pdev,
- {
- 	int ret = -ENOMEM;
- 	struct omap_device *od;
--	struct resource *res = NULL;
--	int i, res_count;
- 	struct omap_hwmod **hwmods;
-+	int i;
- 
- 	od = kzalloc(sizeof(struct omap_device), GFP_KERNEL);
- 	if (!od) {
-@@ -553,79 +678,18 @@ struct omap_device *omap_device_alloc(struct platform_device *pdev,
- 	od->hwmods_cnt = oh_cnt;
- 
- 	hwmods = kmemdup(ohs, sizeof(struct omap_hwmod *) * oh_cnt, GFP_KERNEL);
--	if (!hwmods)
-+	if (!hwmods) {
-+		ret = -ENOMEM;
- 		goto oda_exit2;
-+	}
- 
- 	od->hwmods = hwmods;
- 	od->pdev = pdev;
- 
--	/*
--	 * Non-DT Boot:
--	 *   Here, pdev->num_resources = 0, and we should get all the
--	 *   resources from hwmod.
--	 *
--	 * DT Boot:
--	 *   OF framework will construct the resource structure (currently
--	 *   does for MEM & IRQ resource) and we should respect/use these
--	 *   resources, killing hwmod dependency.
--	 *   If pdev->num_resources > 0, we assume that MEM & IRQ resources
--	 *   have been allocated by OF layer already (through DTB).
--	 *   As preparation for the future we examine the OF provided resources
--	 *   to see if we have DMA resources provided already. In this case
--	 *   there is no need to update the resources for the device, we use the
--	 *   OF provided ones.
--	 *
--	 * TODO: Once DMA resource is available from OF layer, we should
--	 *   kill filling any resources from hwmod.
--	 */
--	if (!pdev->num_resources) {
--		/* Count all resources for the device */
--		res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
--							    IORESOURCE_DMA |
--							    IORESOURCE_MEM);
--	} else {
--		/* Take a look if we already have DMA resource via DT */
--		for (i = 0; i < pdev->num_resources; i++) {
--			struct resource *r = &pdev->resource[i];
--
--			/* We have it, no need to touch the resources */
--			if (r->flags == IORESOURCE_DMA)
--				goto have_everything;
--		}
--		/* Count only DMA resources for the device */
--		res_count = omap_device_count_resources(od, IORESOURCE_DMA);
--		/* The device has no DMA resource, no need for update */
--		if (!res_count)
--			goto have_everything;
--
--		res_count += pdev->num_resources;
--	}
--
--	/* Allocate resources memory to account for new resources */
--	res = kzalloc(sizeof(struct resource) * res_count, GFP_KERNEL);
--	if (!res)
--		goto oda_exit3;
--
--	if (!pdev->num_resources) {
--		dev_dbg(&pdev->dev, "%s: using %d resources from hwmod\n",
--			__func__, res_count);
--		omap_device_fill_resources(od, res);
--	} else {
--		dev_dbg(&pdev->dev,
--			"%s: appending %d DMA resources from hwmod\n",
--			__func__, res_count - pdev->num_resources);
--		memcpy(res, pdev->resource,
--		       sizeof(struct resource) * pdev->num_resources);
--		_od_fill_dma_resources(od, &res[pdev->num_resources]);
--	}
--
--	ret = platform_device_add_resources(pdev, res, res_count);
--	kfree(res);
--
--	if (ret)
-+	ret = omap_device_fixup_resources(od);
-+	if (ret != 0)
- 		goto oda_exit3;
- 
--have_everything:
- 	if (!pm_lats) {
- 		pm_lats = omap_default_latency;
- 		pm_lats_cnt = ARRAY_SIZE(omap_default_latency);
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0015-omap-Avoid-crashes-in-the-case-of-hwmod-misconfigura.patch b/patches/not-capebus/0015-omap-Avoid-crashes-in-the-case-of-hwmod-misconfigura.patch
deleted file mode 100644
index 91542df49a5cd524a51d7f2b9ec3d60caf6ac45a..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0015-omap-Avoid-crashes-in-the-case-of-hwmod-misconfigura.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From af2de7b1a6d2be2fdde7d11917a7d350e3437cff Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 8 Jan 2013 15:19:52 +0200
-Subject: [PATCH 15/90] omap: Avoid crashes in the case of hwmod
- misconfiguration
-
-omap hwmod is really sensitive to hwmod misconfiguration.
-Getting a minor clock wrong always ended up in a crash.
-Attempt to be more resilient by not assigning variables with
-error codes and then attempting to use them.
-
-Without this patch, missing a clock ends up with something like this:
-omap_hwmod: ehrpwm0: cannot clk_get opt_clk ehrpwm0_tbclk!
-Unable to handle kernel NULL pointer dereference at virtual address 0000002a!
-pgd = c0004000!
-[0000002a] *pgd=00000000!
-Internal error: Oops: 5 [#1] SMP ARM!
-Modules linked in:!
-CPU: 0    Not tainted  (3.8.0-rc2-12157-g76c7825-dirty #291)!
-PC is at __clk_prepare+0x10/0x70!
-LR is at clk_prepare+0x1c/0x34!
-pc : [<c03e37f0>]    lr : [<c03e386c>]    psr: a0000113!
-sp : cf04fef8  ip : 22222222  fp : 00000000!
-r10: ffffffea  r9 : 00000000  r8 : 00000000!
-r7 : fffffffe  r6 : 00000001  r5 : fffffffe  r4 : fffffffe!
-r3 : cf041ac0  r2 : cf04ff00  r1 : 22222222  r0 : fffffffe!
-Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel!
-Control: 10c5387d  Table: 80004019  DAC: 00000015!
-Process swapper/0 (pid: 1, stack limit = 0xcf04e240)!
-Stack: (0xcf04fef8 to 0xcf050000)!
-fee0:                                                       cf041ac0 c07749f4!
-ff00: fffffffe c03e386c c07499cc c073c070 c073d2fc c06d4e4c c073c070 c071cc18!
-ff20: c06d4c4c 00000000 00000000 c0708284 c06c91bc c0025e28 c073a030 00000001!
-ff40: c06f5f60 c06f5f40 c06d5324 c06d533c cf04e000 c0008870 c06d5324 c060abe8!
-ff60: c07082e8 00000002 00000001 c06f5f60 c06f5f40 c077d700 00000099 c04a43d4!
-ff80: 00000001 00000001 c06c91bc 00000000 00000000 c04a42dc 00000000 00000000!
-ffa0: 00000000 00000000 00000000 c000d678 00000000 00000000 00000000 00000000!
-ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000!
-ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 9e7befee f7bbaaab!
-[<c03e37f0>] (__clk_prepare+0x10/0x70) from [<c03e386c>] (clk_prepare+0x1c/0x34)!
-[<c03e386c>] (clk_prepare+0x1c/0x34) from [<c06d4e4c>] (_init+0x200/0x288)!
-[<c06d4e4c>] (_init+0x200/0x288) from [<c0025e28>] (omap_hwmod_for_each+0x28/0x58)!
-[<c0025e28>] (omap_hwmod_for_each+0x28/0x58) from [<c06d533c>] (omap_hwmod_setup_all+0x18/0x34)!
-[<c06d533c>] (omap_hwmod_setup_all+0x18/0x34) from [<c0008870>] (do_one_initcall+0x90/0x160)!
-[<c0008870>] (do_one_initcall+0x90/0x160) from [<c04a43d4>] (kernel_init+0xf8/0x290)!
-[<c04a43d4>] (kernel_init+0xf8/0x290) from [<c000d678>] (ret_from_fork+0x14/0x3c)!
-Code: e92d4038 e2504000 01a05004 0a000015 (e594302c) !
----[ end trace 1b75b31a2719ed1c ]---!
-Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b!
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/mach-omap2/omap_hwmod.c | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
-index 4653efb..2b58e21 100644
---- a/arch/arm/mach-omap2/omap_hwmod.c
-+++ b/arch/arm/mach-omap2/omap_hwmod.c
-@@ -783,7 +783,9 @@ static int _init_interface_clks(struct omap_hwmod *oh)
- 		if (IS_ERR(c)) {
- 			pr_warning("omap_hwmod: %s: cannot clk_get interface_clk %s\n",
- 				   oh->name, os->clk);
--			ret = -EINVAL;
-+			if (ret == 0)
-+				ret = -EINVAL;
-+			continue;
- 		}
- 		os->_clk = c;
- 		/*
-@@ -819,7 +821,9 @@ static int _init_opt_clks(struct omap_hwmod *oh)
- 		if (IS_ERR(c)) {
- 			pr_warning("omap_hwmod: %s: cannot clk_get opt_clk %s\n",
- 				   oh->name, oc->clk);
--			ret = -EINVAL;
-+			if (ret == 0)
-+				ret = -EINVAL;
-+			continue;
- 		}
- 		oc->_clk = c;
- 		/*
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0016-i2c-EEPROM-In-kernel-memory-accessor-interface.patch b/patches/not-capebus/0016-i2c-EEPROM-In-kernel-memory-accessor-interface.patch
deleted file mode 100644
index 8b1d66a0d92d8765c1ee344a0499a3463d0d2caa..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0016-i2c-EEPROM-In-kernel-memory-accessor-interface.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From 1472401d2fa04b02974087466bc870a08a0623d9 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Thu, 13 Dec 2012 11:23:21 +0200
-Subject: [PATCH 16/90] i2c-EEPROM: In kernel memory accessor interface
-
-In kernel users need to access the EEPROM using the i2c_client
-interface. Extend at24 to use it via the command interface.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/misc/eeprom/at24.c | 23 ++++++++++++++++++
- include/linux/i2c/eeprom.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 82 insertions(+)
- create mode 100644 include/linux/i2c/eeprom.h
-
-diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
-index 2baeec5..40b1a95 100644
---- a/drivers/misc/eeprom/at24.c
-+++ b/drivers/misc/eeprom/at24.c
-@@ -23,6 +23,7 @@
- #include <linux/of.h>
- #include <linux/i2c.h>
- #include <linux/i2c/at24.h>
-+#include <linux/i2c/eeprom.h>
- 
- /*
-  * I2C EEPROMs from most vendors are inexpensive and mostly interchangeable.
-@@ -672,6 +673,27 @@ static int at24_remove(struct i2c_client *client)
- 	return 0;
- }
- 
-+static int at24_command(struct i2c_client *client, unsigned int cmd, void *arg)
-+{
-+	struct at24_data *at24;
-+	const struct memory_accessor **maccp;
-+
-+	/* only supporting a single command */
-+	if (cmd != I2C_EEPROM_GET_MEMORY_ACCESSOR)
-+		return -ENOTSUPP;
-+
-+	/* rudimentary check */
-+	if (arg == NULL)
-+		return -EINVAL;
-+
-+	at24 = i2c_get_clientdata(client);
-+
-+	maccp = arg;
-+	*maccp = &at24->macc;
-+
-+	return 0;
-+}
-+
- /*-------------------------------------------------------------------------*/
- 
- static struct i2c_driver at24_driver = {
-@@ -682,6 +704,7 @@ static struct i2c_driver at24_driver = {
- 	.probe = at24_probe,
- 	.remove = at24_remove,
- 	.id_table = at24_ids,
-+	.command = at24_command,
- };
- 
- static int __init at24_init(void)
-diff --git a/include/linux/i2c/eeprom.h b/include/linux/i2c/eeprom.h
-new file mode 100644
-index 0000000..1393980
---- /dev/null
-+++ b/include/linux/i2c/eeprom.h
-@@ -0,0 +1,59 @@
-+/*
-+ * i2c/eeprom.h
-+ *
-+ * In-kernel interface for accessing eeprom memory.
-+ *
-+ * Copyright (C) 2012 Texas Instruments Inc.
-+ *                    Pantelis Antoniou <panto@antoniou-consulting.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ */
-+#ifndef I2C_EEPROM_H
-+#define I2C_EEPROM_H
-+
-+#include <linux/types.h>
-+#include <linux/memory.h>
-+#include <linux/err.h>
-+#include <linux/i2c.h>
-+
-+/*
-+ * The method called in the client is
-+ *
-+ * int command(struct i2c_client *client, unsigned int cmd, void *arg);
-+ *
-+ * A single command is supported, which returns a pointer to the memory
-+ * accessor already available, but which was only accessible via platform
-+ * callbacks. We can't use platform callbacks anymore for device tree
-+ * platforms, hence this interface.
-+ *
-+ */
-+
-+/* interface commands */
-+#define I2C_EEPROM_GET_MEMORY_ACCESSOR	1
-+
-+static inline struct memory_accessor *
-+i2c_eeprom_get_memory_accessor(struct i2c_client *client)
-+{
-+	int ret;
-+	struct memory_accessor *macc;
-+
-+	/* verify that the i2c client's driver has a command method */
-+	if (!client || !client->driver || !client->driver->command)
-+		return ERR_PTR(-ENOTSUPP);
-+
-+	macc = NULL;
-+	ret = client->driver->command(client, I2C_EEPROM_GET_MEMORY_ACCESSOR,
-+			&macc);
-+	if (ret != 0)
-+		return ERR_PTR(ret);
-+
-+	if (macc == NULL)
-+		return ERR_PTR(-ENOTSUPP);
-+
-+	return macc;
-+}
-+
-+#endif
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0017-Fix-util_is_printable_string.patch b/patches/not-capebus/0017-Fix-util_is_printable_string.patch
deleted file mode 100644
index 3db3e43d392c316144b90bbd52880fdf1944f087..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0017-Fix-util_is_printable_string.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From c87857595b5e8c0c955e592c5581e6731f823bc7 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Thu, 6 Dec 2012 13:22:49 +0200
-Subject: [PATCH 17/90] Fix util_is_printable_string
-
-The method used did not account for multi-part strings.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- scripts/dtc/util.c | 20 +++++++++++++-------
- 1 file changed, 13 insertions(+), 7 deletions(-)
-
-diff --git a/scripts/dtc/util.c b/scripts/dtc/util.c
-index 2422c34..45f186b 100644
---- a/scripts/dtc/util.c
-+++ b/scripts/dtc/util.c
-@@ -72,7 +72,7 @@ char *join_path(const char *path, const char *name)
- int util_is_printable_string(const void *data, int len)
- {
- 	const char *s = data;
--	const char *ss;
-+	const char *ss, *se;
- 
- 	/* zero length is not */
- 	if (len == 0)
-@@ -82,13 +82,19 @@ int util_is_printable_string(const void *data, int len)
- 	if (s[len - 1] != '\0')
- 		return 0;
- 
--	ss = s;
--	while (*s && isprint(*s))
--		s++;
-+	se = s + len;
- 
--	/* not zero, or not done yet */
--	if (*s != '\0' || (s + 1 - ss) < len)
--		return 0;
-+	while (s < se) {
-+		ss = s;
-+		while (s < se && *s && isprint(*s))
-+			s++;
-+
-+		/* not zero, or not done yet */
-+		if (*s != '\0' || s == ss)
-+			return 0;
-+
-+		s++;
-+	}
- 
- 	return 1;
- }
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0018-fdtdump-properly-handle-multi-string-properties.patch b/patches/not-capebus/0018-fdtdump-properly-handle-multi-string-properties.patch
deleted file mode 100644
index 593209094cc49b9e7d2a9d1317d487e44391c9cd..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0018-fdtdump-properly-handle-multi-string-properties.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From d82f40a67a4595fe524845e22c2628f8737c8d50 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Thu, 6 Dec 2012 13:44:10 +0200
-Subject: [PATCH 18/90] fdtdump: properly handle multi-string properties
-
-Device tree can store multiple strings in a single property.
-We didn't handle that case properly.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- scripts/dtc/fdtdump.c | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/scripts/dtc/fdtdump.c b/scripts/dtc/fdtdump.c
-index 207a46d..d4fa6d7 100644
---- a/scripts/dtc/fdtdump.c
-+++ b/scripts/dtc/fdtdump.c
-@@ -21,13 +21,23 @@ static void print_data(const char *data, int len)
- {
- 	int i;
- 	const char *p = data;
-+	const char *s;
- 
- 	/* no data, don't print */
- 	if (len == 0)
- 		return;
- 
- 	if (util_is_printable_string(data, len)) {
--		printf(" = \"%s\"", (const char *)data);
-+		printf(" = ");
-+
-+		s = data;
-+		do {
-+			printf("\"%s\"", s);
-+			s += strlen(s) + 1;
-+			if (s < data + len)
-+				printf(", ");
-+		} while (s < data + len);
-+
- 	} else if ((len % 4) == 0) {
- 		printf(" = <");
- 		for (i = 0; i < len; i += 4)
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0019-dtc-Dynamic-symbols-fixup-support.patch b/patches/not-capebus/0019-dtc-Dynamic-symbols-fixup-support.patch
deleted file mode 100644
index 4876f37e8e48c7a7af4f09fe6a00ed7ddd94ba3c..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0019-dtc-Dynamic-symbols-fixup-support.patch
+++ /dev/null
@@ -1,2905 +0,0 @@
-From 9e2284976ae3edeeb2f2f9b65faf844bffa3278c Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Thu, 6 Dec 2012 13:48:11 +0200
-Subject: [PATCH 19/98] dtc: Dynamic symbols & fixup support
-
-Enable the generation of symbol & fixup information for
-usage with dynamic DT loading.
-
-Passing the -@ option generates a __symbols__ node at the
-root node of the resulting blob for any node labels used.
-
-When using the /plugin/ tag all unresolved label references
-be tracked in the __fixups__ node, while all local phandle
-references will the tracked in the __local_fixups__ node.
-
-This is sufficient to implement a dynamic DT object loader.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- Documentation/devicetree/00-INDEX               |    1 +
- Documentation/devicetree/dt-object-internal.txt |  295 ++++++++++
- scripts/dtc/checks.c                            |  120 +++-
- scripts/dtc/dtc-lexer.l                         |    5 +
- scripts/dtc/dtc-lexer.lex.c_shipped             |  435 ++++++++-------
- scripts/dtc/dtc-parser.tab.c_shipped            |  679 ++++++++++++-----------
- scripts/dtc/dtc-parser.tab.h_shipped            |   48 +-
- scripts/dtc/dtc-parser.y                        |   23 +-
- scripts/dtc/dtc.c                               |    9 +-
- scripts/dtc/dtc.h                               |   38 ++
- scripts/dtc/flattree.c                          |  139 +++++
- 11 files changed, 1224 insertions(+), 568 deletions(-)
- create mode 100644 Documentation/devicetree/dt-object-internal.txt
-
-diff --git a/Documentation/devicetree/00-INDEX b/Documentation/devicetree/00-INDEX
-index b78f691..fb932e2 100644
---- a/Documentation/devicetree/00-INDEX
-+++ b/Documentation/devicetree/00-INDEX
-@@ -8,3 +8,4 @@ https://lists.ozlabs.org/listinfo/devicetree-discuss
- 	- this file
- booting-without-of.txt
- 	- Booting Linux without Open Firmware, describes history and format of device trees.
-+dt-object-internals.txt
-diff --git a/Documentation/devicetree/dt-object-internal.txt b/Documentation/devicetree/dt-object-internal.txt
-new file mode 100644
-index 0000000..eb5d4c0
---- /dev/null
-+++ b/Documentation/devicetree/dt-object-internal.txt
-@@ -0,0 +1,295 @@
-+Device Tree Dynamic Object format internals
-+-------------------------------------------
-+
-+The Device Tree for most platforms is a static representation of
-+the hardware capabilities. This is insufficient for many platforms
-+that need to dynamically insert device tree fragments to the
-+running kernel's live tree.
-+
-+This document explains the the device tree object format and the
-+modifications made to the device tree compiler, which make it possible.
-+
-+1. Simplified Problem Definition
-+--------------------------------
-+
-+Assume we have a platform which boots using following simplified device tree.
-+
-+---- foo.dts -----------------------------------------------------------------
-+	/* FOO platform */
-+	/ {
-+		compatible = "corp,foo";
-+
-+		/* shared resources */
-+		res: res {
-+		};
-+
-+		/* On chip peripherals */
-+		ocp: ocp {
-+			/* peripherals that are always instantiated */
-+			peripheral1 { ... };
-+		}
-+	};
-+---- foo.dts -----------------------------------------------------------------
-+
-+We have a number of peripherals that after probing (using some undefined method)
-+should result in different device tree configuration.
-+
-+We cannot boot with this static tree because due to the configuration of the
-+foo platform there exist multiple conficting peripherals DT fragments.
-+
-+So for the bar peripheral we would have this:
-+
-+---- foo+bar.dts -------------------------------------------------------------
-+	/* FOO platform + bar peripheral */
-+	/ {
-+		compatible = "corp,foo";
-+
-+		/* shared resources */
-+		res: res {
-+		};
-+
-+		/* On chip peripherals */
-+		ocp: ocp {
-+			/* peripherals that are always instantiated */
-+			peripheral1 { ... };
-+
-+			/* bar peripheral */
-+			bar {
-+				compatible = "corp,bar";
-+				... /* various properties and child nodes */
-+			}
-+		}
-+	};
-+---- foo+bar.dts -------------------------------------------------------------
-+
-+While for the baz peripheral we would have this:
-+
-+---- foo+baz.dts -------------------------------------------------------------
-+	/* FOO platform + baz peripheral */
-+	/ {
-+		compatible = "corp,foo";
-+
-+		/* shared resources */
-+		res: res {
-+			/* baz resources */
-+			baz_res: res_baz { ... };
-+		};
-+
-+		/* On chip peripherals */
-+		ocp: ocp {
-+			/* peripherals that are always instantiated */
-+			peripheral1 { ... };
-+
-+			/* baz peripheral */
-+			baz {
-+				compatible = "corp,baz";
-+				/* reference to another point in the tree */
-+				ref-to-res = <&baz_res>;
-+				... /* various properties and child nodes */
-+			}
-+		}
-+	};
-+---- foo+baz.dts -------------------------------------------------------------
-+
-+We note that the baz case is more complicated, since the baz peripheral needs to
-+reference another node in the DT tree.
-+
-+2. Device Tree Object Format Requirements
-+-----------------------------------------
-+
-+Since the device tree is used for booting a number of very different hardware
-+platforms it is imperative that we tread very carefully.
-+
-+2.a) No changes to the Device Tree binary format. We cannot modify the tree
-+format at all and all the information we require should be encoded using device
-+tree itself. We can add nodes that can be safely ignored by both bootloaders and
-+the kernel.
-+
-+2.b) Changes to the DTS source format should be absolutely minimal, and should
-+only be needed for the DT fragment definitions, and not the base boot DT.
-+
-+2.c) An explicit option should be used to instruct DTC to generate the required
-+information needed for object resolution. Platforms that don't use the
-+dynamic object format can safely ignore it.
-+
-+2.d) Finally, DT syntax changes should be kept to a minimum. It should be
-+possible to express everything using the existing DT syntax.
-+
-+3. Implementation
-+-----------------
-+
-+The basic unit of addressing in Device Tree is the phandle. Turns out it's
-+relatively simple to extend the way phandles are generated and referenced
-+so that it's possible to dynamically convert symbolic references (labels)
-+to phandle values.
-+
-+We can roughly divide the operation into two steps.
-+
-+3.a) Compilation of the base board DTS file using the '-@' option
-+generates a valid DT blob with an added __symbols__ node at the root node,
-+containing a list of all nodes that are marked with a label.
-+
-+Using the foo.dts file above the following node will be generated;
-+
-+$ dtc -@ -O dtb -o foo.dtb -b 0 foo.dts
-+$ fdtdump foo.dtb
-+...
-+/ {
-+	...
-+	res {
-+		...
-+		linux,phandle = <0x00000001>;
-+		phandle = <0x00000001>;
-+		...
-+	};
-+	ocp {
-+		...
-+		linux,phandle = <0x00000002>;
-+		phandle = <0x00000002>;
-+		...
-+	};
-+	__symbols__ {
-+		res="/res";
-+		ocp="/ocp";
-+	};
-+};
-+
-+Notice that all the nodes that had a label have been recorded, and that
-+phandles have been generated for them.
-+
-+This blob can be used to boot the board normally, the __symbols__ node will
-+be safely ignored both by the bootloader and the kernel (the only loss will
-+be a few bytes of memory and disk space).
-+
-+3.b) The Device Tree fragments must be compiled with the same option but they
-+must also have a tag (/plugin/) that allows undefined references to labels
-+that are not present at compilation time to be recorded so that the runtime
-+loader can fix them.
-+
-+So the bar peripheral's DTS format would be of the form:
-+
-+/plugin/;	/* allow undefined label references and record them */
-+/ {
-+	....	/* various properties for loader use; i.e. part id etc. */
-+	fragment@0 {
-+		target = <&ocp>;
-+		__overlay__ {
-+			/* bar peripheral */
-+			bar {
-+				compatible = "corp,bar";
-+				... /* various properties and child nodes */
-+			}
-+		};
-+	};
-+};
-+
-+Note that there's a target property that specifies the location where the
-+contents of the overlay node will be placed, and it references the label
-+in the foo.dts file.
-+
-+$ dtc -@ -O dtb -o bar.dtbo -b 0 bar.dts
-+$ fdtdump bar.dtbo
-+...
-+/ {
-+	... /* properties */
-+	fragment@0 {
-+		target = <0xdeadbeef>;
-+		__overlay__ {
-+			bar {
-+				compatible = "corp,bar";
-+				... /* various properties and child nodes */
-+			}
-+		};
-+	};
-+	__fixups__ {
-+	    ocp = "/fragment@0:target:0";
-+	};
-+};
-+
-+No __symbols__ has been generated (no label in bar.dts).
-+Note that the target's ocp label is undefined, so the phandle handle
-+value is filled with the illegal value '0xdeadbeef', while a __fixups__
-+node has been generated, which marks the location in the tree where
-+the label lookup should store the runtime phandle value of the ocp node.
-+
-+The format of the __fixups__ node entry is
-+
-+	<label> = "<local-full-path>:<property-name>:<offset>";
-+
-+<label> 		Is the label we're referring
-+<local-full-path>	Is the full path of the node the reference is
-+<property-name>		Is the name of the property containing the
-+			reference
-+<offset>		The offset (in bytes) of where the property's
-+			phandle value is located.
-+
-+Doing the same with the baz peripheral's DTS format is a little bit more
-+involved, since baz contains references to local labels which require
-+local fixups.
-+
-+/plugin/;	/* allow undefined label references and record them */
-+/ {
-+	....	/* various properties for loader use; i.e. part id etc. */
-+	fragment@0 {
-+		target = <&res>;
-+		__overlay__ {
-+			/* baz resources */
-+			baz_res: res_baz { ... };
-+		};
-+	};
-+	fragment@1 {
-+		target = <&ocp>;
-+		__overlay__ {
-+			/* baz peripheral */
-+			baz {
-+				compatible = "corp,baz";
-+				/* reference to another point in the tree */
-+				ref-to-res = <&baz_res>;
-+				... /* various properties and child nodes */
-+			}
-+		};
-+	};
-+};
-+
-+Note that &bar_res reference.
-+
-+$ dtc -@ -O dtb -o baz.dtbo -b 0 baz.dts
-+$ fdtdump baz.dtbo
-+...
-+/ {
-+	... /* properties */
-+	fragment@0 {
-+		target = <0xdeadbeef>;
-+		__overlay__ {
-+			res_baz {
-+				....
-+				linux,phandle = <0x00000001>;
-+				phandle = <0x00000001>;
-+			};
-+		};
-+	};
-+	fragment@1 {
-+		target = <0xdeadbeef>;
-+		__overlay__ {
-+			baz {
-+				compatible = "corp,baz";
-+				... /* various properties and child nodes */
-+				res=<0x00000001>;
-+			}
-+		};
-+	};
-+	__fixups__ {
-+		res = "/fragment@0:target:0";
-+		ocp = "/fragment@1:target:0";
-+	};
-+	__local_fixups__ {
-+		fixup = </fragment@1/__overlay__/baz:res:0>;
-+	};
-+};
-+
-+This is similar to the bar case, but the reference of a local label by the
-+baz node generates a __local_fixups__ entry that records the place that the
-+local reference is being made. Since phandles are allocated starting at 1
-+the run time loader must apply an offset to each phandle in every dynamic
-+DT object loaded. The __local_fixups__ node records the place of every
-+local reference so that the loader can apply the offset.
-diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c
-index ee96a25..970c0a3 100644
---- a/scripts/dtc/checks.c
-+++ b/scripts/dtc/checks.c
-@@ -457,22 +457,93 @@ static void fixup_phandle_references(struct check *c, struct node *dt,
- 				     struct node *node, struct property *prop)
- {
- 	struct marker *m = prop->val.markers;
-+	struct fixup *f, **fp;
-+	struct fixup_entry *fe, **fep;
- 	struct node *refnode;
- 	cell_t phandle;
-+	int has_phandle_refs;
-+
-+	has_phandle_refs = 0;
-+	for_each_marker_of_type(m, REF_PHANDLE) {
-+		has_phandle_refs = 1;
-+		break;
-+	}
-+
-+	if (!has_phandle_refs)
-+		return;
- 
- 	for_each_marker_of_type(m, REF_PHANDLE) {
- 		assert(m->offset + sizeof(cell_t) <= prop->val.len);
- 
- 		refnode = get_node_by_ref(dt, m->ref);
--		if (! refnode) {
-+		if (!refnode && !symbol_fixup_support) {
- 			FAIL(c, "Reference to non-existent node or label \"%s\"\n",
--			     m->ref);
-+				m->ref);
- 			continue;
- 		}
- 
--		phandle = get_node_phandle(dt, refnode);
--		*((cell_t *)(prop->val.val + m->offset)) = cpu_to_fdt32(phandle);
-+		if (!refnode) {
-+			/* allocate fixup entry */
-+			fe = xmalloc(sizeof(*fe));
-+
-+			fe->node = node;
-+			fe->prop = prop;
-+			fe->offset = m->offset;
-+			fe->next = NULL;
-+
-+			/* search for an already existing fixup */
-+			for_each_fixup(dt, f)
-+				if (strcmp(f->ref, m->ref) == 0)
-+					break;
-+
-+			/* no fixup found, add new */
-+			if (f == NULL) {
-+				f = xmalloc(sizeof(*f));
-+				f->ref = m->ref;
-+				f->entries = NULL;
-+				f->next = NULL;
-+
-+				/* add it to the tree */
-+				fp = &dt->fixups;
-+				while (*fp)
-+					fp = &(*fp)->next;
-+				*fp = f;
-+			}
-+
-+			/* and now append fixup entry */
-+			fep = &f->entries;
-+			while (*fep)
-+				fep = &(*fep)->next;
-+			*fep = fe;
-+
-+			/* mark the entry as unresolved */
-+			phandle = 0xdeadbeef;
-+		} else {
-+			phandle = get_node_phandle(dt, refnode);
-+
-+			/* if it's a plugin, we need to record it */
-+			if (symbol_fixup_support && dt->is_plugin) {
-+
-+				/* allocate a new local fixup entry */
-+				fe = xmalloc(sizeof(*fe));
-+
-+				fe->node = node;
-+				fe->prop = prop;
-+				fe->offset = m->offset;
-+				fe->next = NULL;
-+
-+				/* append it to the local fixups */
-+				fep = &dt->local_fixups;
-+				while (*fep)
-+					fep = &(*fep)->next;
-+				*fep = fe;
-+			}
-+		}
-+
-+		*((cell_t *)(prop->val.val + m->offset)) =
-+			cpu_to_fdt32(phandle);
- 	}
-+
- }
- ERROR(phandle_references, NULL, NULL, fixup_phandle_references, NULL,
-       &duplicate_node_names, &explicit_phandles);
-@@ -651,6 +722,45 @@ static void check_obsolete_chosen_interrupt_controller(struct check *c,
- }
- TREE_WARNING(obsolete_chosen_interrupt_controller, NULL);
- 
-+static void check_auto_label_phandles(struct check *c, struct node *dt,
-+				       struct node *node)
-+{
-+	struct label *l;
-+	struct symbol *s, **sp;
-+	int has_label;
-+
-+	if (!symbol_fixup_support)
-+		return;
-+
-+	has_label = 0;
-+	for_each_label(node->labels, l) {
-+		has_label = 1;
-+		break;
-+	}
-+
-+	if (!has_label)
-+		return;
-+
-+	/* force allocation of a phandle for this node */
-+	(void)get_node_phandle(dt, node);
-+
-+	/* add the symbol */
-+	for_each_label(node->labels, l) {
-+
-+		s = xmalloc(sizeof(*s));
-+		s->label = l;
-+		s->node = node;
-+		s->next = NULL;
-+
-+		/* add it to the symbols list */
-+		sp = &dt->symbols;
-+		while (*sp)
-+			sp = &((*sp)->next);
-+		*sp = s;
-+	}
-+}
-+NODE_WARNING(auto_label_phandles, NULL);
-+
- static struct check *check_table[] = {
- 	&duplicate_node_names, &duplicate_property_names,
- 	&node_name_chars, &node_name_format, &property_name_chars,
-@@ -669,6 +779,8 @@ static struct check *check_table[] = {
- 	&avoid_default_addr_size,
- 	&obsolete_chosen_interrupt_controller,
- 
-+	&auto_label_phandles,
-+
- 	&always_fail,
- };
- 
-diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l
-index 254d5af..2cef406 100644
---- a/scripts/dtc/dtc-lexer.l
-+++ b/scripts/dtc/dtc-lexer.l
-@@ -112,6 +112,11 @@ static int pop_input_file(void);
- 			return DT_V1;
- 		}
- 
-+<*>"/plugin/"	{
-+			DPRINT("Keyword: /plugin/\n");
-+			return DT_PLUGIN;
-+		}
-+
- <*>"/memreserve/"	{
- 			DPRINT("Keyword: /memreserve/\n");
- 			BEGIN_DEFAULT();
-diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped
-index a6c5fcd..90bfb9e 100644
---- a/scripts/dtc/dtc-lexer.lex.c_shipped
-+++ b/scripts/dtc/dtc-lexer.lex.c_shipped
-@@ -372,8 +372,8 @@ static void yy_fatal_error (yyconst char msg[]  );
- 	*yy_cp = '\0'; \
- 	(yy_c_buf_p) = yy_cp;
- 
--#define YY_NUM_RULES 30
--#define YY_END_OF_BUFFER 31
-+#define YY_NUM_RULES 31
-+#define YY_END_OF_BUFFER 32
- /* This struct is not used in this scanner,
-    but its presence is necessary. */
- struct yy_trans_info
-@@ -381,25 +381,26 @@ struct yy_trans_info
- 	flex_int32_t yy_verify;
- 	flex_int32_t yy_nxt;
- 	};
--static yyconst flex_int16_t yy_accept[161] =
-+static yyconst flex_int16_t yy_accept[168] =
-     {   0,
-         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
--       31,   29,   18,   18,   29,   29,   29,   29,   29,   29,
--       29,   29,   29,   29,   29,   29,   29,   29,   15,   16,
--       16,   29,   16,   10,   10,   18,   26,    0,    3,    0,
--       27,   12,    0,    0,   11,    0,    0,    0,    0,    0,
--        0,    0,   21,   23,   25,   24,   22,    0,    9,   28,
--        0,    0,    0,   14,   14,   16,   16,   16,   10,   10,
--       10,    0,   12,    0,   11,    0,    0,    0,   20,    0,
--        0,    0,    0,    0,    0,    0,    0,   16,   10,   10,
--       10,    0,   19,    0,    0,    0,    0,    0,    0,    0,
--
--        0,    0,   16,   13,    0,    0,    0,    0,    0,    0,
--        0,    0,    0,   16,    6,    0,    0,    0,    0,    0,
--        0,    2,    0,    0,    0,    0,    0,    0,    0,    0,
--        4,   17,    0,    0,    2,    0,    0,    0,    0,    0,
--        0,    0,    0,    0,    0,    0,    0,    1,    0,    0,
--        0,    0,    5,    8,    0,    0,    0,    0,    7,    0
-+       32,   30,   19,   19,   30,   30,   30,   30,   30,   30,
-+       30,   30,   30,   30,   30,   30,   30,   30,   16,   17,
-+       17,   30,   17,   11,   11,   19,   27,    0,    3,    0,
-+       28,   13,    0,    0,   12,    0,    0,    0,    0,    0,
-+        0,    0,    0,   22,   24,   26,   25,   23,    0,   10,
-+       29,    0,    0,    0,   15,   15,   17,   17,   17,   11,
-+       11,   11,    0,   13,    0,   12,    0,    0,    0,   21,
-+        0,    0,    0,    0,    0,    0,    0,    0,    0,   17,
-+       11,   11,   11,    0,   20,    0,    0,    0,    0,    0,
-+
-+        0,    0,    0,    0,    0,   17,   14,    0,    0,    0,
-+        0,    0,    0,    0,    0,    0,    0,   17,    7,    0,
-+        0,    0,    0,    0,    0,    0,    2,    0,    0,    0,
-+        0,    0,    0,    0,    0,    0,    4,   18,    0,    0,
-+        5,    2,    0,    0,    0,    0,    0,    0,    0,    0,
-+        0,    0,    0,    0,    1,    0,    0,    0,    0,    6,
-+        9,    0,    0,    0,    0,    8,    0
-     } ;
- 
- static yyconst flex_int32_t yy_ec[256] =
-@@ -415,9 +416,9 @@ static yyconst flex_int32_t yy_ec[256] =
-        21,   21,   21,   21,   23,   21,   21,   24,   21,   21,
-         1,   25,   26,    1,   21,    1,   20,   27,   28,   29,
- 
--       30,   20,   21,   21,   31,   21,   21,   32,   33,   34,
--       35,   36,   21,   37,   38,   39,   40,   41,   21,   24,
--       42,   21,   43,   44,   45,    1,    1,    1,    1,    1,
-+       30,   20,   31,   21,   32,   21,   21,   33,   34,   35,
-+       36,   37,   21,   38,   39,   40,   41,   42,   21,   24,
-+       43,   21,   44,   45,   46,    1,    1,    1,    1,    1,
-         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-@@ -434,163 +435,167 @@ static yyconst flex_int32_t yy_ec[256] =
-         1,    1,    1,    1,    1
-     } ;
- 
--static yyconst flex_int32_t yy_meta[46] =
-+static yyconst flex_int32_t yy_meta[47] =
-     {   0,
-         1,    1,    1,    1,    1,    2,    3,    1,    2,    2,
-         2,    4,    5,    5,    5,    6,    1,    1,    1,    7,
-         8,    8,    8,    8,    1,    1,    7,    7,    7,    7,
-         8,    8,    8,    8,    8,    8,    8,    8,    8,    8,
--        8,    8,    3,    1,    1
-+        8,    8,    8,    3,    1,    1
-     } ;
- 
--static yyconst flex_int16_t yy_base[175] =
-+static yyconst flex_int16_t yy_base[182] =
-     {   0,
--        0,  388,  381,   40,   41,  386,   71,  385,   34,   44,
--      390,  395,   60,   62,  371,  112,  111,  111,  111,  104,
--      370,  106,  371,  342,  124,  119,    0,  144,  395,    0,
--      123,    0,  159,  153,  165,  167,  395,  130,  395,  382,
--      395,    0,  372,  122,  395,  157,  374,  379,  350,   21,
--      346,  349,  395,  395,  395,  395,  395,  362,  395,  395,
--      181,  346,  342,  395,  359,    0,  191,  343,  190,  351,
--      350,    0,    0,    0,  173,  362,  177,  367,  357,  329,
--      335,  328,  337,  331,  206,  329,  334,  327,  395,  338,
--      170,  314,  346,  345,  318,  325,  343,  158,  316,  212,
--
--      322,  319,  320,  395,  340,  336,  308,  305,  314,  304,
--      295,  138,  208,  220,  395,  292,  305,  265,  264,  254,
--      201,  222,  285,  275,  273,  270,  236,  235,  225,  115,
--      395,  395,  252,  216,  216,  217,  214,  230,  209,  220,
--      213,  239,  211,  217,  216,  209,  229,  395,  240,  225,
--      206,  169,  395,  395,  116,  106,   99,   54,  395,  395,
--      254,  260,  268,  272,  276,  282,  289,  293,  301,  309,
--      313,  319,  327,  335
-+        0,  392,  385,   41,   42,  390,   72,  389,   35,   45,
-+      394,  399,   61,   63,  375,  114,  113,  113,  149,  105,
-+      374,  106,  375,  345,  126,  357,    0,  174,  399,    0,
-+      121,    0,  131,  127,  130,  133,  399,  121,  399,  385,
-+      399,    0,  375,  140,  399,  146,  377,  382,  352,  126,
-+      348,  352,  348,  399,  399,  399,  399,  399,  364,  399,
-+      399,  160,  347,  343,  399,  361,    0,  189,  344,  193,
-+      353,  352,    0,    0,    0,  147,  364,  158,  369,  359,
-+      330,  336,  329,  339,  332,  324,  207,  329,  335,  327,
-+      399,  339,  146,  314,  347,  346,  318,  326,  344,   34,
-+
-+      316,  322,  177,  322,  318,  320,  399,  340,  336,  307,
-+      304,  313,  303,  313,  310,  172,  182,  189,  399,  311,
-+      326,  304,  309,  298,  301,  188,  209,  314,  303,  299,
-+      279,  255,  254,  268,  215,  188,  399,  399,  266,  239,
-+      399,  218,  238,  220,  232,  215,  227,  209,  236,  219,
-+      213,  212,  203,  221,  399,  233,  215,  207,  184,  399,
-+      399,  158,  120,  104,   40,  399,  399,  246,  252,  260,
-+      264,  268,  274,  281,  285,  293,  301,  305,  311,  319,
-+      327
-     } ;
- 
--static yyconst flex_int16_t yy_def[175] =
-+static yyconst flex_int16_t yy_def[182] =
-     {   0,
--      160,    1,    1,    1,    1,    5,  160,    7,    1,    1,
--      160,  160,  160,  160,  160,  161,  162,  163,  160,  160,
--      160,  160,  164,  160,  160,  160,  165,  164,  160,  166,
--      167,  166,  166,  160,  160,  160,  160,  161,  160,  161,
--      160,  168,  160,  163,  160,  163,  169,  170,  160,  160,
--      160,  160,  160,  160,  160,  160,  160,  164,  160,  160,
--      160,  160,  160,  160,  164,  166,  167,  166,  160,  160,
--      160,  171,  168,  172,  163,  169,  169,  170,  160,  160,
--      160,  160,  160,  160,  160,  160,  160,  166,  160,  160,
--      171,  172,  160,  160,  160,  160,  160,  160,  160,  160,
--
--      160,  160,  166,  160,  160,  160,  160,  160,  160,  160,
--      160,  173,  160,  166,  160,  160,  160,  160,  160,  160,
--      173,  160,  173,  160,  160,  160,  160,  160,  160,  160,
--      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
--      160,  160,  174,  160,  160,  160,  174,  160,  174,  160,
--      160,  160,  160,  160,  160,  160,  160,  160,  160,    0,
--      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
--      160,  160,  160,  160
-+      167,    1,    1,    1,    1,    5,  167,    7,    1,    1,
-+      167,  167,  167,  167,  167,  168,  169,  170,  167,  167,
-+      167,  167,  171,  167,  167,   19,  172,  171,  167,  173,
-+      174,  173,  173,  167,  167,  167,  167,  168,  167,  168,
-+      167,  175,  167,  170,  167,  170,  176,  177,  167,  167,
-+      167,  167,  167,  167,  167,  167,  167,  167,  171,  167,
-+      167,  167,  167,  167,  167,  171,  173,  174,  173,  167,
-+      167,  167,  178,  175,  179,  170,  176,  176,  177,  167,
-+      167,  167,  167,  167,  167,  167,  167,  167,  167,  173,
-+      167,  167,  178,  179,  167,  167,  167,  167,  167,  167,
-+
-+      167,  167,  167,  167,  167,  173,  167,  167,  167,  167,
-+      167,  167,  167,  167,  167,  180,  167,  173,  167,  167,
-+      167,  167,  167,  167,  167,  180,  167,  180,  167,  167,
-+      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
-+      167,  167,  167,  167,  167,  167,  167,  167,  167,  181,
-+      167,  167,  167,  181,  167,  181,  167,  167,  167,  167,
-+      167,  167,  167,  167,  167,  167,    0,  167,  167,  167,
-+      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
-+      167
-     } ;
- 
--static yyconst flex_int16_t yy_nxt[441] =
-+static yyconst flex_int16_t yy_nxt[446] =
-     {   0,
-        12,   13,   14,   15,   16,   12,   17,   18,   12,   12,
-        12,   19,   12,   12,   12,   12,   20,   21,   22,   23,
-        23,   23,   23,   23,   12,   12,   23,   23,   23,   23,
-        23,   23,   23,   23,   23,   23,   23,   23,   23,   23,
--       23,   23,   12,   24,   12,   25,   34,   35,   35,   25,
--       81,   26,   26,   27,   27,   27,   34,   35,   35,   82,
--       28,   36,   36,   36,   36,  159,   29,   28,   28,   28,
--       28,   12,   13,   14,   15,   16,   30,   17,   18,   30,
--       30,   30,   26,   30,   30,   30,   12,   20,   21,   22,
--       31,   31,   31,   31,   31,   32,   12,   31,   31,   31,
-+       23,   23,   23,   12,   24,   12,   25,   34,   35,   35,
-+       25,  166,   26,   26,   27,   27,   27,   34,   35,   35,
-+      112,   28,   36,   36,   36,   36,  113,   29,   28,   28,
-+       28,   28,   12,   13,   14,   15,   16,   30,   17,   18,
-+       30,   30,   30,   26,   30,   30,   30,   12,   20,   21,
-+       22,   31,   31,   31,   31,   31,   32,   12,   31,   31,
- 
-        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
--       31,   31,   31,   12,   24,   12,   39,   41,   45,   47,
--       53,   54,   48,   56,   57,   61,   61,   47,   66,   45,
--       48,   66,   66,   66,   39,   46,   40,   49,   59,   50,
--      158,   51,  122,   52,  157,   49,   46,   50,  136,   63,
--      137,   52,  156,   43,   40,   62,   65,   65,   65,   59,
--       61,   61,  123,   65,   75,   69,   69,   69,   36,   36,
--       65,   65,   65,   65,   70,   71,   72,   69,   69,   69,
--       45,   46,   61,   61,  109,   77,   70,   71,   93,  110,
--       68,   70,   71,   85,   85,   85,   66,   46,  155,   66,
--
--       66,   66,   69,   69,   69,  122,   59,  100,  100,   61,
--       61,   70,   71,  100,  100,  148,  112,  154,   85,   85,
--       85,   61,   61,  129,  129,  123,  129,  129,  135,  135,
--      135,  142,  142,  148,  143,  149,  153,  135,  135,  135,
--      142,  142,  160,  143,  152,  151,  150,  146,  145,  144,
--      141,  140,  139,  149,   38,   38,   38,   38,   38,   38,
--       38,   38,   42,  138,  134,  133,   42,   42,   44,   44,
--       44,   44,   44,   44,   44,   44,   58,   58,   58,   58,
--       64,  132,   64,   66,  131,  130,   66,  160,   66,   66,
--       67,  128,  127,   67,   67,   67,   67,   73,  126,   73,
--
--       73,   76,   76,   76,   76,   76,   76,   76,   76,   78,
--       78,   78,   78,   78,   78,   78,   78,   91,  125,   91,
--       92,  124,   92,   92,  120,   92,   92,  121,  121,  121,
--      121,  121,  121,  121,  121,  147,  147,  147,  147,  147,
--      147,  147,  147,  119,  118,  117,  116,  115,   47,  114,
--      110,  113,  111,  108,  107,  106,   48,  105,  104,   89,
--      103,  102,  101,   99,   98,   97,   96,   95,   94,   79,
--       77,   90,   89,   88,   59,   87,   86,   59,   84,   83,
--       80,   79,   77,   74,  160,   60,   59,   55,   37,  160,
--       33,   25,   26,   25,   11,  160,  160,  160,  160,  160,
--
--      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
--      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
--      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
--      160,  160,  160,  160,  160,  160,  160,  160,  160,  160
-+       31,   31,   31,   31,   31,   12,   24,   12,   39,   41,
-+       45,   54,   55,   57,   58,   39,   67,   62,   62,   67,
-+       67,   67,   62,   62,   36,   36,   60,   46,   40,   70,
-+       70,   70,   70,   70,   70,   40,  165,   45,   71,   72,
-+       73,   71,   72,   76,   45,   82,   43,   47,   63,  164,
-+       48,   62,   62,   69,   46,   83,   78,   71,   72,   95,
-+       46,   46,   87,   87,   87,   49,  127,   50,  103,  103,
-+       51,  116,   52,   62,   62,   53,   66,   66,   66,   60,
-+       62,   62,  127,   66,   67,  163,  128,   67,   67,   67,
-+
-+       66,   66,   66,   66,   60,   70,   70,   70,  103,  103,
-+      135,  135,  128,  162,   71,   72,  135,  135,  161,   87,
-+       87,   87,  143,  155,  144,  155,  160,  142,  142,  142,
-+      142,  142,  142,  149,  149,  167,  150,  149,  149,  159,
-+      150,  158,  157,  156,  153,  156,   38,   38,   38,   38,
-+       38,   38,   38,   38,   42,  152,  151,  148,   42,   42,
-+       44,   44,   44,   44,   44,   44,   44,   44,   59,   59,
-+       59,   59,   65,  147,   65,   67,  146,  145,   67,  141,
-+       67,   67,   68,  140,  139,   68,   68,   68,   68,   74,
-+      138,   74,   74,   77,   77,   77,   77,   77,   77,   77,
-+
-+       77,   79,   79,   79,   79,   79,   79,   79,   79,   93,
-+      137,   93,   94,  136,   94,   94,  167,   94,   94,  126,
-+      126,  126,  126,  126,  126,  126,  126,  154,  154,  154,
-+      154,  154,  154,  154,  154,  134,  133,  132,  131,  130,
-+      129,  125,  124,  123,  122,  121,  120,  119,   47,  118,
-+      113,  117,  115,  114,  111,  110,  109,   48,  108,  107,
-+       91,  106,  105,  104,  102,  101,  100,   99,   98,   97,
-+       96,   80,   78,   92,   91,   90,   60,   89,   88,   60,
-+       86,   85,   84,   81,   80,   78,   75,  167,   64,   61,
-+       60,   56,   37,  167,   33,   25,   26,   25,   11,  167,
-+
-+      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
-+      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
-+      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
-+      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
-+      167,  167,  167,  167,  167
-     } ;
- 
--static yyconst flex_int16_t yy_chk[441] =
-+static yyconst flex_int16_t yy_chk[446] =
-     {   0,
-         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
--        1,    1,    1,    1,    1,    4,    9,    9,    9,   10,
--       50,    4,    5,    5,    5,    5,   10,   10,   10,   50,
--        5,   13,   13,   14,   14,  158,    5,    5,    5,    5,
--        5,    7,    7,    7,    7,    7,    7,    7,    7,    7,
-+        1,    1,    1,    1,    1,    1,    4,    9,    9,    9,
-+       10,  165,    4,    5,    5,    5,    5,   10,   10,   10,
-+      100,    5,   13,   13,   14,   14,  100,    5,    5,    5,
-+        5,    5,    7,    7,    7,    7,    7,    7,    7,    7,
-         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
-         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
- 
-         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
--        7,    7,    7,    7,    7,    7,   16,   17,   18,   19,
--       20,   20,   19,   22,   22,   25,   25,   26,   31,   44,
--       26,   31,   31,   31,   38,   18,   16,   19,   31,   19,
--      157,   19,  112,   19,  156,   26,   44,   26,  130,   26,
--      130,   26,  155,   17,   38,   25,   28,   28,   28,   28,
--       33,   33,  112,   28,   46,   34,   34,   34,   36,   36,
--       28,   28,   28,   28,   34,   34,   34,   35,   35,   35,
--       75,   46,   61,   61,   98,   77,   35,   35,   77,   98,
--       33,   91,   91,   61,   61,   61,   67,   75,  152,   67,
--
--       67,   67,   69,   69,   69,  121,   67,   85,   85,  113,
--      113,   69,   69,  100,  100,  143,  100,  151,   85,   85,
--       85,  114,  114,  122,  122,  121,  129,  129,  135,  135,
--      135,  138,  138,  147,  138,  143,  150,  129,  129,  129,
--      142,  142,  149,  142,  146,  145,  144,  141,  140,  139,
--      137,  136,  134,  147,  161,  161,  161,  161,  161,  161,
--      161,  161,  162,  133,  128,  127,  162,  162,  163,  163,
--      163,  163,  163,  163,  163,  163,  164,  164,  164,  164,
--      165,  126,  165,  166,  125,  124,  166,  123,  166,  166,
--      167,  120,  119,  167,  167,  167,  167,  168,  118,  168,
--
--      168,  169,  169,  169,  169,  169,  169,  169,  169,  170,
--      170,  170,  170,  170,  170,  170,  170,  171,  117,  171,
--      172,  116,  172,  172,  111,  172,  172,  173,  173,  173,
--      173,  173,  173,  173,  173,  174,  174,  174,  174,  174,
--      174,  174,  174,  110,  109,  108,  107,  106,  105,  103,
--      102,  101,   99,   97,   96,   95,   94,   93,   92,   90,
--       88,   87,   86,   84,   83,   82,   81,   80,   79,   78,
--       76,   71,   70,   68,   65,   63,   62,   58,   52,   51,
--       49,   48,   47,   43,   40,   24,   23,   21,   15,   11,
--        8,    6,    3,    2,  160,  160,  160,  160,  160,  160,
--
--      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
--      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
--      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
--      160,  160,  160,  160,  160,  160,  160,  160,  160,  160
-+        7,    7,    7,    7,    7,    7,    7,    7,   16,   17,
-+       18,   20,   20,   22,   22,   38,   31,   25,   25,   31,
-+       31,   31,   33,   33,   36,   36,   31,   18,   16,   34,
-+       34,   34,   35,   35,   35,   38,  164,   44,   34,   34,
-+       34,   35,   35,   46,   76,   50,   17,   19,   25,  163,
-+       19,   62,   62,   33,   44,   50,   78,   93,   93,   78,
-+       46,   76,   62,   62,   62,   19,  116,   19,  103,  103,
-+       19,  103,   19,  117,  117,   19,   28,   28,   28,   28,
-+      118,  118,  126,   28,   68,  162,  116,   68,   68,   68,
-+
-+       28,   28,   28,   28,   68,   70,   70,   70,   87,   87,
-+      127,  127,  126,  159,   70,   70,  135,  135,  158,   87,
-+       87,   87,  136,  150,  136,  154,  157,  135,  135,  135,
-+      142,  142,  142,  145,  145,  156,  145,  149,  149,  153,
-+      149,  152,  151,  150,  148,  154,  168,  168,  168,  168,
-+      168,  168,  168,  168,  169,  147,  146,  144,  169,  169,
-+      170,  170,  170,  170,  170,  170,  170,  170,  171,  171,
-+      171,  171,  172,  143,  172,  173,  140,  139,  173,  134,
-+      173,  173,  174,  133,  132,  174,  174,  174,  174,  175,
-+      131,  175,  175,  176,  176,  176,  176,  176,  176,  176,
-+
-+      176,  177,  177,  177,  177,  177,  177,  177,  177,  178,
-+      130,  178,  179,  129,  179,  179,  128,  179,  179,  180,
-+      180,  180,  180,  180,  180,  180,  180,  181,  181,  181,
-+      181,  181,  181,  181,  181,  125,  124,  123,  122,  121,
-+      120,  115,  114,  113,  112,  111,  110,  109,  108,  106,
-+      105,  104,  102,  101,   99,   98,   97,   96,   95,   94,
-+       92,   90,   89,   88,   86,   85,   84,   83,   82,   81,
-+       80,   79,   77,   72,   71,   69,   66,   64,   63,   59,
-+       53,   52,   51,   49,   48,   47,   43,   40,   26,   24,
-+       23,   21,   15,   11,    8,    6,    3,    2,  167,  167,
-+
-+      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
-+      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
-+      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
-+      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
-+      167,  167,  167,  167,  167
-     } ;
- 
- static yy_state_type yy_last_accepting_state;
-@@ -660,7 +665,7 @@ static int dts_version = 1;
- 
- static void push_input_file(const char *filename);
- static int pop_input_file(void);
--#line 664 "dtc-lexer.lex.c"
-+#line 669 "dtc-lexer.lex.c"
- 
- #define INITIAL 0
- #define INCLUDE 1
-@@ -854,7 +859,7 @@ YY_DECL
-     
- #line 67 "dtc-lexer.l"
- 
--#line 858 "dtc-lexer.lex.c"
-+#line 863 "dtc-lexer.lex.c"
- 
- 	if ( !(yy_init) )
- 		{
-@@ -908,13 +913,13 @@ yy_match:
- 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- 				{
- 				yy_current_state = (int) yy_def[yy_current_state];
--				if ( yy_current_state >= 161 )
-+				if ( yy_current_state >= 168 )
- 					yy_c = yy_meta[(unsigned int) yy_c];
- 				}
- 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- 			++yy_cp;
- 			}
--		while ( yy_current_state != 160 );
-+		while ( yy_current_state != 167 );
- 		yy_cp = (yy_last_accepting_cpos);
- 		yy_current_state = (yy_last_accepting_state);
- 
-@@ -1006,23 +1011,31 @@ case 5:
- YY_RULE_SETUP
- #line 115 "dtc-lexer.l"
- {
-+			DPRINT("Keyword: /plugin/\n");
-+			return DT_PLUGIN;
-+		}
-+	YY_BREAK
-+case 6:
-+YY_RULE_SETUP
-+#line 120 "dtc-lexer.l"
-+{
- 			DPRINT("Keyword: /memreserve/\n");
- 			BEGIN_DEFAULT();
- 			return DT_MEMRESERVE;
- 		}
- 	YY_BREAK
--case 6:
-+case 7:
- YY_RULE_SETUP
--#line 121 "dtc-lexer.l"
-+#line 126 "dtc-lexer.l"
- {
- 			DPRINT("Keyword: /bits/\n");
- 			BEGIN_DEFAULT();
- 			return DT_BITS;
- 		}
- 	YY_BREAK
--case 7:
-+case 8:
- YY_RULE_SETUP
--#line 127 "dtc-lexer.l"
-+#line 132 "dtc-lexer.l"
- {
- 			DPRINT("Keyword: /delete-property/\n");
- 			DPRINT("<PROPNODENAME>\n");
-@@ -1030,9 +1043,9 @@ YY_RULE_SETUP
- 			return DT_DEL_PROP;
- 		}
- 	YY_BREAK
--case 8:
-+case 9:
- YY_RULE_SETUP
--#line 134 "dtc-lexer.l"
-+#line 139 "dtc-lexer.l"
- {
- 			DPRINT("Keyword: /delete-node/\n");
- 			DPRINT("<PROPNODENAME>\n");
-@@ -1040,9 +1053,9 @@ YY_RULE_SETUP
- 			return DT_DEL_NODE;
- 		}
- 	YY_BREAK
--case 9:
-+case 10:
- YY_RULE_SETUP
--#line 141 "dtc-lexer.l"
-+#line 146 "dtc-lexer.l"
- {
- 			DPRINT("Label: %s\n", yytext);
- 			yylval.labelref = xstrdup(yytext);
-@@ -1050,19 +1063,19 @@ YY_RULE_SETUP
- 			return DT_LABEL;
- 		}
- 	YY_BREAK
--case 10:
-+case 11:
- YY_RULE_SETUP
--#line 148 "dtc-lexer.l"
-+#line 153 "dtc-lexer.l"
- {
- 			yylval.literal = xstrdup(yytext);
- 			DPRINT("Literal: '%s'\n", yylval.literal);
- 			return DT_LITERAL;
- 		}
- 	YY_BREAK
--case 11:
--/* rule 11 can match eol */
-+case 12:
-+/* rule 12 can match eol */
- YY_RULE_SETUP
--#line 154 "dtc-lexer.l"
-+#line 159 "dtc-lexer.l"
- {
- 			yytext[yyleng-1] = '\0';
- 			yylval.literal = xstrdup(yytext+1);
-@@ -1070,18 +1083,18 @@ YY_RULE_SETUP
- 			return DT_CHAR_LITERAL;
- 		}
- 	YY_BREAK
--case 12:
-+case 13:
- YY_RULE_SETUP
--#line 161 "dtc-lexer.l"
-+#line 166 "dtc-lexer.l"
- {	/* label reference */
- 			DPRINT("Ref: %s\n", yytext+1);
- 			yylval.labelref = xstrdup(yytext+1);
- 			return DT_REF;
- 		}
- 	YY_BREAK
--case 13:
-+case 14:
- YY_RULE_SETUP
--#line 167 "dtc-lexer.l"
-+#line 172 "dtc-lexer.l"
- {	/* new-style path reference */
- 			yytext[yyleng-1] = '\0';
- 			DPRINT("Ref: %s\n", yytext+2);
-@@ -1089,27 +1102,27 @@ YY_RULE_SETUP
- 			return DT_REF;
- 		}
- 	YY_BREAK
--case 14:
-+case 15:
- YY_RULE_SETUP
--#line 174 "dtc-lexer.l"
-+#line 179 "dtc-lexer.l"
- {
- 			yylval.byte = strtol(yytext, NULL, 16);
- 			DPRINT("Byte: %02x\n", (int)yylval.byte);
- 			return DT_BYTE;
- 		}
- 	YY_BREAK
--case 15:
-+case 16:
- YY_RULE_SETUP
--#line 180 "dtc-lexer.l"
-+#line 185 "dtc-lexer.l"
- {
- 			DPRINT("/BYTESTRING\n");
- 			BEGIN_DEFAULT();
- 			return ']';
- 		}
- 	YY_BREAK
--case 16:
-+case 17:
- YY_RULE_SETUP
--#line 186 "dtc-lexer.l"
-+#line 191 "dtc-lexer.l"
- {
- 			DPRINT("PropNodeName: %s\n", yytext);
- 			yylval.propnodename = xstrdup((yytext[0] == '\\') ?
-@@ -1118,75 +1131,75 @@ YY_RULE_SETUP
- 			return DT_PROPNODENAME;
- 		}
- 	YY_BREAK
--case 17:
-+case 18:
- YY_RULE_SETUP
--#line 194 "dtc-lexer.l"
-+#line 199 "dtc-lexer.l"
- {
- 			DPRINT("Binary Include\n");
- 			return DT_INCBIN;
- 		}
- 	YY_BREAK
--case 18:
--/* rule 18 can match eol */
--YY_RULE_SETUP
--#line 199 "dtc-lexer.l"
--/* eat whitespace */
--	YY_BREAK
- case 19:
- /* rule 19 can match eol */
- YY_RULE_SETUP
--#line 200 "dtc-lexer.l"
--/* eat C-style comments */
-+#line 204 "dtc-lexer.l"
-+/* eat whitespace */
- 	YY_BREAK
- case 20:
- /* rule 20 can match eol */
- YY_RULE_SETUP
--#line 201 "dtc-lexer.l"
--/* eat C++-style comments */
-+#line 205 "dtc-lexer.l"
-+/* eat C-style comments */
- 	YY_BREAK
- case 21:
-+/* rule 21 can match eol */
- YY_RULE_SETUP
--#line 203 "dtc-lexer.l"
--{ return DT_LSHIFT; };
-+#line 206 "dtc-lexer.l"
-+/* eat C++-style comments */
- 	YY_BREAK
- case 22:
- YY_RULE_SETUP
--#line 204 "dtc-lexer.l"
--{ return DT_RSHIFT; };
-+#line 208 "dtc-lexer.l"
-+{ return DT_LSHIFT; };
- 	YY_BREAK
- case 23:
- YY_RULE_SETUP
--#line 205 "dtc-lexer.l"
--{ return DT_LE; };
-+#line 209 "dtc-lexer.l"
-+{ return DT_RSHIFT; };
- 	YY_BREAK
- case 24:
- YY_RULE_SETUP
--#line 206 "dtc-lexer.l"
--{ return DT_GE; };
-+#line 210 "dtc-lexer.l"
-+{ return DT_LE; };
- 	YY_BREAK
- case 25:
- YY_RULE_SETUP
--#line 207 "dtc-lexer.l"
--{ return DT_EQ; };
-+#line 211 "dtc-lexer.l"
-+{ return DT_GE; };
- 	YY_BREAK
- case 26:
- YY_RULE_SETUP
--#line 208 "dtc-lexer.l"
--{ return DT_NE; };
-+#line 212 "dtc-lexer.l"
-+{ return DT_EQ; };
- 	YY_BREAK
- case 27:
- YY_RULE_SETUP
--#line 209 "dtc-lexer.l"
--{ return DT_AND; };
-+#line 213 "dtc-lexer.l"
-+{ return DT_NE; };
- 	YY_BREAK
- case 28:
- YY_RULE_SETUP
--#line 210 "dtc-lexer.l"
--{ return DT_OR; };
-+#line 214 "dtc-lexer.l"
-+{ return DT_AND; };
- 	YY_BREAK
- case 29:
- YY_RULE_SETUP
--#line 212 "dtc-lexer.l"
-+#line 215 "dtc-lexer.l"
-+{ return DT_OR; };
-+	YY_BREAK
-+case 30:
-+YY_RULE_SETUP
-+#line 217 "dtc-lexer.l"
- {
- 			DPRINT("Char: %c (\\x%02x)\n", yytext[0],
- 				(unsigned)yytext[0]);
-@@ -1202,12 +1215,12 @@ YY_RULE_SETUP
- 			return yytext[0];
- 		}
- 	YY_BREAK
--case 30:
-+case 31:
- YY_RULE_SETUP
--#line 227 "dtc-lexer.l"
-+#line 232 "dtc-lexer.l"
- ECHO;
- 	YY_BREAK
--#line 1211 "dtc-lexer.lex.c"
-+#line 1224 "dtc-lexer.lex.c"
- 
- 	case YY_END_OF_BUFFER:
- 		{
-@@ -1499,7 +1512,7 @@ static int yy_get_next_buffer (void)
- 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- 			{
- 			yy_current_state = (int) yy_def[yy_current_state];
--			if ( yy_current_state >= 161 )
-+			if ( yy_current_state >= 168 )
- 				yy_c = yy_meta[(unsigned int) yy_c];
- 			}
- 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-@@ -1527,11 +1540,11 @@ static int yy_get_next_buffer (void)
- 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- 		{
- 		yy_current_state = (int) yy_def[yy_current_state];
--		if ( yy_current_state >= 161 )
-+		if ( yy_current_state >= 168 )
- 			yy_c = yy_meta[(unsigned int) yy_c];
- 		}
- 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
--	yy_is_jam = (yy_current_state == 160);
-+	yy_is_jam = (yy_current_state == 167);
- 
- 	return yy_is_jam ? 0 : yy_current_state;
- }
-@@ -2166,7 +2179,7 @@ void yyfree (void * ptr )
- 
- #define YYTABLES_NAME "yytables"
- 
--#line 227 "dtc-lexer.l"
-+#line 232 "dtc-lexer.l"
- 
- 
- 
-diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped
-index 4af5590..2977268 100644
---- a/scripts/dtc/dtc-parser.tab.c_shipped
-+++ b/scripts/dtc/dtc-parser.tab.c_shipped
-@@ -71,6 +71,7 @@
- #line 21 "dtc-parser.y"
- 
- #include <stdio.h>
-+#include <inttypes.h>
- 
- #include "dtc.h"
- #include "srcpos.h"
-@@ -89,7 +90,7 @@ static unsigned char eval_char_literal(const char *s);
- 
- 
- /* Line 189 of yacc.c  */
--#line 93 "dtc-parser.tab.c"
-+#line 94 "dtc-parser.tab.c"
- 
- /* Enabling traces.  */
- #ifndef YYDEBUG
-@@ -117,27 +118,28 @@ static unsigned char eval_char_literal(const char *s);
-       know about them.  */
-    enum yytokentype {
-      DT_V1 = 258,
--     DT_MEMRESERVE = 259,
--     DT_LSHIFT = 260,
--     DT_RSHIFT = 261,
--     DT_LE = 262,
--     DT_GE = 263,
--     DT_EQ = 264,
--     DT_NE = 265,
--     DT_AND = 266,
--     DT_OR = 267,
--     DT_BITS = 268,
--     DT_DEL_PROP = 269,
--     DT_DEL_NODE = 270,
--     DT_PROPNODENAME = 271,
--     DT_LITERAL = 272,
--     DT_CHAR_LITERAL = 273,
--     DT_BASE = 274,
--     DT_BYTE = 275,
--     DT_STRING = 276,
--     DT_LABEL = 277,
--     DT_REF = 278,
--     DT_INCBIN = 279
-+     DT_PLUGIN = 259,
-+     DT_MEMRESERVE = 260,
-+     DT_LSHIFT = 261,
-+     DT_RSHIFT = 262,
-+     DT_LE = 263,
-+     DT_GE = 264,
-+     DT_EQ = 265,
-+     DT_NE = 266,
-+     DT_AND = 267,
-+     DT_OR = 268,
-+     DT_BITS = 269,
-+     DT_DEL_PROP = 270,
-+     DT_DEL_NODE = 271,
-+     DT_PROPNODENAME = 272,
-+     DT_LITERAL = 273,
-+     DT_CHAR_LITERAL = 274,
-+     DT_BASE = 275,
-+     DT_BYTE = 276,
-+     DT_STRING = 277,
-+     DT_LABEL = 278,
-+     DT_REF = 279,
-+     DT_INCBIN = 280
-    };
- #endif
- 
-@@ -148,7 +150,7 @@ typedef union YYSTYPE
- {
- 
- /* Line 214 of yacc.c  */
--#line 40 "dtc-parser.y"
-+#line 41 "dtc-parser.y"
- 
- 	char *propnodename;
- 	char *literal;
-@@ -168,11 +170,12 @@ typedef union YYSTYPE
- 	struct node *nodelist;
- 	struct reserve_info *re;
- 	uint64_t integer;
-+	int is_plugin;
- 
- 
- 
- /* Line 214 of yacc.c  */
--#line 176 "dtc-parser.tab.c"
-+#line 179 "dtc-parser.tab.c"
- } YYSTYPE;
- # define YYSTYPE_IS_TRIVIAL 1
- # define yystype YYSTYPE /* obsolescent; will be withdrawn */
-@@ -184,7 +187,7 @@ typedef union YYSTYPE
- 
- 
- /* Line 264 of yacc.c  */
--#line 188 "dtc-parser.tab.c"
-+#line 191 "dtc-parser.tab.c"
- 
- #ifdef short
- # undef short
-@@ -399,20 +402,20 @@ union yyalloc
- /* YYFINAL -- State number of the termination state.  */
- #define YYFINAL  4
- /* YYLAST -- Last index in YYTABLE.  */
--#define YYLAST   133
-+#define YYLAST   134
- 
- /* YYNTOKENS -- Number of terminals.  */
--#define YYNTOKENS  48
-+#define YYNTOKENS  49
- /* YYNNTS -- Number of nonterminals.  */
--#define YYNNTS  28
-+#define YYNNTS  29
- /* YYNRULES -- Number of rules.  */
--#define YYNRULES  79
-+#define YYNRULES  81
- /* YYNRULES -- Number of states.  */
--#define YYNSTATES  141
-+#define YYNSTATES  144
- 
- /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
- #define YYUNDEFTOK  2
--#define YYMAXUTOK   279
-+#define YYMAXUTOK   280
- 
- #define YYTRANSLATE(YYX)						\
-   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-@@ -423,16 +426,16 @@ static const yytype_uint8 yytranslate[] =
-        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
--       2,     2,     2,    47,     2,     2,     2,    45,    41,     2,
--      33,    35,    44,    42,    34,    43,     2,    26,     2,     2,
--       2,     2,     2,     2,     2,     2,     2,     2,    38,    25,
--      36,    29,    30,    37,     2,     2,     2,     2,     2,     2,
-+       2,     2,     2,    48,     2,     2,     2,    46,    42,     2,
-+      34,    36,    45,    43,    35,    44,     2,    27,     2,     2,
-+       2,     2,     2,     2,     2,     2,     2,     2,    39,    26,
-+      37,    30,    31,    38,     2,     2,     2,     2,     2,     2,
-        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
--       2,    31,     2,    32,    40,     2,     2,     2,     2,     2,
-+       2,    32,     2,    33,    41,     2,     2,     2,     2,     2,
-        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
--       2,     2,     2,    27,    39,    28,    46,     2,     2,     2,
-+       2,     2,     2,    28,    40,    29,    47,     2,     2,     2,
-        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-@@ -447,7 +450,8 @@ static const yytype_uint8 yytranslate[] =
-        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
-        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
--      15,    16,    17,    18,    19,    20,    21,    22,    23,    24
-+      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-+      25
- };
- 
- #if YYDEBUG
-@@ -455,59 +459,61 @@ static const yytype_uint8 yytranslate[] =
-    YYRHS.  */
- static const yytype_uint16 yyprhs[] =
- {
--       0,     0,     3,     8,     9,    12,    17,    20,    23,    27,
--      31,    36,    42,    43,    46,    51,    54,    58,    61,    64,
--      68,    73,    76,    86,    92,    95,    96,    99,   102,   106,
--     108,   111,   114,   117,   119,   121,   125,   127,   129,   135,
--     137,   141,   143,   147,   149,   153,   155,   159,   161,   165,
--     167,   171,   175,   177,   181,   185,   189,   193,   197,   201,
--     203,   207,   211,   213,   217,   221,   225,   227,   229,   232,
--     235,   238,   239,   242,   245,   246,   249,   252,   255,   259
-+       0,     0,     3,     9,    10,    13,    14,    17,    22,    25,
-+      28,    32,    36,    41,    47,    48,    51,    56,    59,    63,
-+      66,    69,    73,    78,    81,    91,    97,   100,   101,   104,
-+     107,   111,   113,   116,   119,   122,   124,   126,   130,   132,
-+     134,   140,   142,   146,   148,   152,   154,   158,   160,   164,
-+     166,   170,   172,   176,   180,   182,   186,   190,   194,   198,
-+     202,   206,   208,   212,   216,   218,   222,   226,   230,   232,
-+     234,   237,   240,   243,   244,   247,   250,   251,   254,   257,
-+     260,   264
- };
- 
- /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
- static const yytype_int8 yyrhs[] =
- {
--      49,     0,    -1,     3,    25,    50,    52,    -1,    -1,    51,
--      50,    -1,     4,    59,    59,    25,    -1,    22,    51,    -1,
--      26,    53,    -1,    52,    26,    53,    -1,    52,    23,    53,
--      -1,    52,    15,    23,    25,    -1,    27,    54,    74,    28,
--      25,    -1,    -1,    54,    55,    -1,    16,    29,    56,    25,
--      -1,    16,    25,    -1,    14,    16,    25,    -1,    22,    55,
--      -1,    57,    21,    -1,    57,    58,    30,    -1,    57,    31,
--      73,    32,    -1,    57,    23,    -1,    57,    24,    33,    21,
--      34,    59,    34,    59,    35,    -1,    57,    24,    33,    21,
--      35,    -1,    56,    22,    -1,    -1,    56,    34,    -1,    57,
--      22,    -1,    13,    17,    36,    -1,    36,    -1,    58,    59,
--      -1,    58,    23,    -1,    58,    22,    -1,    17,    -1,    18,
--      -1,    33,    60,    35,    -1,    61,    -1,    62,    -1,    62,
--      37,    60,    38,    61,    -1,    63,    -1,    62,    12,    63,
--      -1,    64,    -1,    63,    11,    64,    -1,    65,    -1,    64,
--      39,    65,    -1,    66,    -1,    65,    40,    66,    -1,    67,
--      -1,    66,    41,    67,    -1,    68,    -1,    67,     9,    68,
--      -1,    67,    10,    68,    -1,    69,    -1,    68,    36,    69,
--      -1,    68,    30,    69,    -1,    68,     7,    69,    -1,    68,
--       8,    69,    -1,    69,     5,    70,    -1,    69,     6,    70,
--      -1,    70,    -1,    70,    42,    71,    -1,    70,    43,    71,
--      -1,    71,    -1,    71,    44,    72,    -1,    71,    26,    72,
--      -1,    71,    45,    72,    -1,    72,    -1,    59,    -1,    43,
--      72,    -1,    46,    72,    -1,    47,    72,    -1,    -1,    73,
--      20,    -1,    73,    22,    -1,    -1,    75,    74,    -1,    75,
--      55,    -1,    16,    53,    -1,    15,    16,    25,    -1,    22,
--      75,    -1
-+      50,     0,    -1,     3,    26,    51,    52,    54,    -1,    -1,
-+       4,    26,    -1,    -1,    53,    52,    -1,     5,    61,    61,
-+      26,    -1,    23,    53,    -1,    27,    55,    -1,    54,    27,
-+      55,    -1,    54,    24,    55,    -1,    54,    16,    24,    26,
-+      -1,    28,    56,    76,    29,    26,    -1,    -1,    56,    57,
-+      -1,    17,    30,    58,    26,    -1,    17,    26,    -1,    15,
-+      17,    26,    -1,    23,    57,    -1,    59,    22,    -1,    59,
-+      60,    31,    -1,    59,    32,    75,    33,    -1,    59,    24,
-+      -1,    59,    25,    34,    22,    35,    61,    35,    61,    36,
-+      -1,    59,    25,    34,    22,    36,    -1,    58,    23,    -1,
-+      -1,    58,    35,    -1,    59,    23,    -1,    14,    18,    37,
-+      -1,    37,    -1,    60,    61,    -1,    60,    24,    -1,    60,
-+      23,    -1,    18,    -1,    19,    -1,    34,    62,    36,    -1,
-+      63,    -1,    64,    -1,    64,    38,    62,    39,    63,    -1,
-+      65,    -1,    64,    13,    65,    -1,    66,    -1,    65,    12,
-+      66,    -1,    67,    -1,    66,    40,    67,    -1,    68,    -1,
-+      67,    41,    68,    -1,    69,    -1,    68,    42,    69,    -1,
-+      70,    -1,    69,    10,    70,    -1,    69,    11,    70,    -1,
-+      71,    -1,    70,    37,    71,    -1,    70,    31,    71,    -1,
-+      70,     8,    71,    -1,    70,     9,    71,    -1,    71,     6,
-+      72,    -1,    71,     7,    72,    -1,    72,    -1,    72,    43,
-+      73,    -1,    72,    44,    73,    -1,    73,    -1,    73,    45,
-+      74,    -1,    73,    27,    74,    -1,    73,    46,    74,    -1,
-+      74,    -1,    61,    -1,    44,    74,    -1,    47,    74,    -1,
-+      48,    74,    -1,    -1,    75,    21,    -1,    75,    23,    -1,
-+      -1,    77,    76,    -1,    77,    57,    -1,    17,    55,    -1,
-+      16,    17,    26,    -1,    23,    77,    -1
- };
- 
- /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
- static const yytype_uint16 yyrline[] =
- {
--       0,   109,   109,   118,   121,   128,   132,   140,   144,   148,
--     158,   172,   180,   183,   190,   194,   198,   202,   210,   214,
--     218,   222,   226,   243,   253,   261,   264,   268,   275,   290,
--     295,   315,   329,   336,   340,   344,   351,   355,   356,   360,
--     361,   365,   366,   370,   371,   375,   376,   380,   381,   385,
--     386,   387,   391,   392,   393,   394,   395,   399,   400,   401,
--     405,   406,   407,   411,   412,   413,   414,   418,   419,   420,
--     421,   426,   429,   433,   441,   444,   448,   456,   460,   464
-+       0,   113,   113,   124,   127,   135,   138,   145,   149,   157,
-+     161,   165,   175,   189,   197,   200,   207,   211,   215,   219,
-+     227,   231,   235,   239,   243,   260,   270,   278,   281,   285,
-+     292,   307,   312,   332,   346,   353,   357,   361,   368,   372,
-+     373,   377,   378,   382,   383,   387,   388,   392,   393,   397,
-+     398,   402,   403,   404,   408,   409,   410,   411,   412,   416,
-+     417,   418,   422,   423,   424,   428,   429,   430,   431,   435,
-+     436,   437,   438,   443,   446,   450,   458,   461,   465,   473,
-+     477,   481
- };
- #endif
- 
-@@ -516,19 +522,20 @@ static const yytype_uint16 yyrline[] =
-    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
- static const char *const yytname[] =
- {
--  "$end", "error", "$undefined", "DT_V1", "DT_MEMRESERVE", "DT_LSHIFT",
--  "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND", "DT_OR",
--  "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME", "DT_LITERAL",
--  "DT_CHAR_LITERAL", "DT_BASE", "DT_BYTE", "DT_STRING", "DT_LABEL",
--  "DT_REF", "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['",
--  "']'", "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'",
--  "'+'", "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile",
--  "memreserves", "memreserve", "devicetree", "nodedef", "proplist",
--  "propdef", "propdata", "propdataprefix", "arrayprefix", "integer_prim",
--  "integer_expr", "integer_trinary", "integer_or", "integer_and",
--  "integer_bitor", "integer_bitxor", "integer_bitand", "integer_eq",
--  "integer_rela", "integer_shift", "integer_add", "integer_mul",
--  "integer_unary", "bytestring", "subnodes", "subnode", 0
-+  "$end", "error", "$undefined", "DT_V1", "DT_PLUGIN", "DT_MEMRESERVE",
-+  "DT_LSHIFT", "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND",
-+  "DT_OR", "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME",
-+  "DT_LITERAL", "DT_CHAR_LITERAL", "DT_BASE", "DT_BYTE", "DT_STRING",
-+  "DT_LABEL", "DT_REF", "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='",
-+  "'>'", "'['", "']'", "'('", "','", "')'", "'<'", "'?'", "':'", "'|'",
-+  "'^'", "'&'", "'+'", "'-'", "'*'", "'%'", "'~'", "'!'", "$accept",
-+  "sourcefile", "plugindecl", "memreserves", "memreserve", "devicetree",
-+  "nodedef", "proplist", "propdef", "propdata", "propdataprefix",
-+  "arrayprefix", "integer_prim", "integer_expr", "integer_trinary",
-+  "integer_or", "integer_and", "integer_bitor", "integer_bitxor",
-+  "integer_bitand", "integer_eq", "integer_rela", "integer_shift",
-+  "integer_add", "integer_mul", "integer_unary", "bytestring", "subnodes",
-+  "subnode", 0
- };
- #endif
- 
-@@ -539,36 +546,38 @@ static const yytype_uint16 yytoknum[] =
- {
-        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
-      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
--     275,   276,   277,   278,   279,    59,    47,   123,   125,    61,
--      62,    91,    93,    40,    44,    41,    60,    63,    58,   124,
--      94,    38,    43,    45,    42,    37,   126,    33
-+     275,   276,   277,   278,   279,   280,    59,    47,   123,   125,
-+      61,    62,    91,    93,    40,    44,    41,    60,    63,    58,
-+     124,    94,    38,    43,    45,    42,    37,   126,    33
- };
- # endif
- 
- /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
- static const yytype_uint8 yyr1[] =
- {
--       0,    48,    49,    50,    50,    51,    51,    52,    52,    52,
--      52,    53,    54,    54,    55,    55,    55,    55,    56,    56,
--      56,    56,    56,    56,    56,    57,    57,    57,    58,    58,
--      58,    58,    58,    59,    59,    59,    60,    61,    61,    62,
--      62,    63,    63,    64,    64,    65,    65,    66,    66,    67,
--      67,    67,    68,    68,    68,    68,    68,    69,    69,    69,
--      70,    70,    70,    71,    71,    71,    71,    72,    72,    72,
--      72,    73,    73,    73,    74,    74,    74,    75,    75,    75
-+       0,    49,    50,    51,    51,    52,    52,    53,    53,    54,
-+      54,    54,    54,    55,    56,    56,    57,    57,    57,    57,
-+      58,    58,    58,    58,    58,    58,    58,    59,    59,    59,
-+      60,    60,    60,    60,    60,    61,    61,    61,    62,    63,
-+      63,    64,    64,    65,    65,    66,    66,    67,    67,    68,
-+      68,    69,    69,    69,    70,    70,    70,    70,    70,    71,
-+      71,    71,    72,    72,    72,    73,    73,    73,    73,    74,
-+      74,    74,    74,    75,    75,    75,    76,    76,    76,    77,
-+      77,    77
- };
- 
- /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
- static const yytype_uint8 yyr2[] =
- {
--       0,     2,     4,     0,     2,     4,     2,     2,     3,     3,
--       4,     5,     0,     2,     4,     2,     3,     2,     2,     3,
--       4,     2,     9,     5,     2,     0,     2,     2,     3,     1,
--       2,     2,     2,     1,     1,     3,     1,     1,     5,     1,
--       3,     1,     3,     1,     3,     1,     3,     1,     3,     1,
--       3,     3,     1,     3,     3,     3,     3,     3,     3,     1,
--       3,     3,     1,     3,     3,     3,     1,     1,     2,     2,
--       2,     0,     2,     2,     0,     2,     2,     2,     3,     2
-+       0,     2,     5,     0,     2,     0,     2,     4,     2,     2,
-+       3,     3,     4,     5,     0,     2,     4,     2,     3,     2,
-+       2,     3,     4,     2,     9,     5,     2,     0,     2,     2,
-+       3,     1,     2,     2,     2,     1,     1,     3,     1,     1,
-+       5,     1,     3,     1,     3,     1,     3,     1,     3,     1,
-+       3,     1,     3,     3,     1,     3,     3,     3,     3,     3,
-+       3,     1,     3,     3,     1,     3,     3,     3,     1,     1,
-+       2,     2,     2,     0,     2,     2,     0,     2,     2,     2,
-+       3,     2
- };
- 
- /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-@@ -576,59 +585,59 @@ static const yytype_uint8 yyr2[] =
-    means the default is an error.  */
- static const yytype_uint8 yydefact[] =
- {
--       0,     0,     0,     3,     1,     0,     0,     0,     3,    33,
--      34,     0,     0,     6,     0,     2,     4,     0,     0,     0,
--      67,     0,    36,    37,    39,    41,    43,    45,    47,    49,
--      52,    59,    62,    66,     0,    12,     7,     0,     0,     0,
--      68,    69,    70,    35,     0,     0,     0,     0,     0,     0,
-+       0,     0,     0,     3,     1,     0,     5,     4,     0,     0,
-+       0,     5,    35,    36,     0,     0,     8,     0,     2,     6,
-+       0,     0,     0,    69,     0,    38,    39,    41,    43,    45,
-+      47,    49,    51,    54,    61,    64,    68,     0,    14,     9,
-+       0,     0,     0,    70,    71,    72,    37,     0,     0,     0,
-        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
--       0,     0,     0,     5,    74,     0,     9,     8,    40,     0,
--      42,    44,    46,    48,    50,    51,    55,    56,    54,    53,
--      57,    58,    60,    61,    64,    63,    65,     0,     0,     0,
--       0,    13,     0,    74,    10,     0,     0,     0,    15,    25,
--      77,    17,    79,     0,    76,    75,    38,    16,    78,     0,
--       0,    11,    24,    14,    26,     0,    18,    27,    21,     0,
--      71,    29,     0,     0,     0,     0,    32,    31,    19,    30,
--      28,     0,    72,    73,    20,     0,    23,     0,     0,     0,
--      22
-+       0,     0,     0,     0,     0,     0,     7,    76,     0,    11,
-+      10,    42,     0,    44,    46,    48,    50,    52,    53,    57,
-+      58,    56,    55,    59,    60,    62,    63,    66,    65,    67,
-+       0,     0,     0,     0,    15,     0,    76,    12,     0,     0,
-+       0,    17,    27,    79,    19,    81,     0,    78,    77,    40,
-+      18,    80,     0,     0,    13,    26,    16,    28,     0,    20,
-+      29,    23,     0,    73,    31,     0,     0,     0,     0,    34,
-+      33,    21,    32,    30,     0,    74,    75,    22,     0,    25,
-+       0,     0,     0,    24
- };
- 
- /* YYDEFGOTO[NTERM-NUM].  */
--static const yytype_int8 yydefgoto[] =
-+static const yytype_int16 yydefgoto[] =
- {
--      -1,     2,     7,     8,    15,    36,    64,    91,   109,   110,
--     122,    20,    21,    22,    23,    24,    25,    26,    27,    28,
--      29,    30,    31,    32,    33,   125,    92,    93
-+      -1,     2,     6,    10,    11,    18,    39,    67,    94,   112,
-+     113,   125,    23,    24,    25,    26,    27,    28,    29,    30,
-+      31,    32,    33,    34,    35,    36,   128,    95,    96
- };
- 
- /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-    STATE-NUM.  */
--#define YYPACT_NINF -78
-+#define YYPACT_NINF -81
- static const yytype_int8 yypact[] =
- {
--      22,    11,    51,    10,   -78,    23,    10,     2,    10,   -78,
--     -78,    -9,    23,   -78,    30,    38,   -78,    -9,    -9,    -9,
--     -78,    35,   -78,    -6,    52,    29,    48,    49,    33,     3,
--      71,    36,     0,   -78,    64,   -78,   -78,    68,    30,    30,
--     -78,   -78,   -78,   -78,    -9,    -9,    -9,    -9,    -9,    -9,
--      -9,    -9,    -9,    -9,    -9,    -9,    -9,    -9,    -9,    -9,
--      -9,    -9,    -9,   -78,    44,    67,   -78,   -78,    52,    55,
--      29,    48,    49,    33,     3,     3,    71,    71,    71,    71,
--      36,    36,     0,     0,   -78,   -78,   -78,    78,    79,    42,
--      44,   -78,    69,    44,   -78,    -9,    73,    74,   -78,   -78,
--     -78,   -78,   -78,    75,   -78,   -78,   -78,   -78,   -78,    -7,
--      -1,   -78,   -78,   -78,   -78,    84,   -78,   -78,   -78,    63,
--     -78,   -78,    32,    66,    82,    -3,   -78,   -78,   -78,   -78,
--     -78,    46,   -78,   -78,   -78,    23,   -78,    70,    23,    72,
--     -78
-+      33,    44,    63,    47,   -81,    46,     9,   -81,    22,     9,
-+      55,     9,   -81,   -81,   -10,    22,   -81,    -3,    37,   -81,
-+     -10,   -10,   -10,   -81,    49,   -81,    -7,    76,    50,    48,
-+      52,     8,     2,    36,   -15,    -1,   -81,    65,   -81,   -81,
-+      68,    -3,    -3,   -81,   -81,   -81,   -81,   -10,   -10,   -10,
-+     -10,   -10,   -10,   -10,   -10,   -10,   -10,   -10,   -10,   -10,
-+     -10,   -10,   -10,   -10,   -10,   -10,   -81,    51,    67,   -81,
-+     -81,    76,    56,    50,    48,    52,     8,     2,     2,    36,
-+      36,    36,    36,   -15,   -15,    -1,    -1,   -81,   -81,   -81,
-+      79,    80,    45,    51,   -81,    69,    51,   -81,   -10,    73,
-+      74,   -81,   -81,   -81,   -81,   -81,    75,   -81,   -81,   -81,
-+     -81,   -81,    34,    -2,   -81,   -81,   -81,   -81,    84,   -81,
-+     -81,   -81,    70,   -81,   -81,    31,    66,    83,    -6,   -81,
-+     -81,   -81,   -81,   -81,    23,   -81,   -81,   -81,    22,   -81,
-+      71,    22,    72,   -81
- };
- 
- /* YYPGOTO[NTERM-NUM].  */
- static const yytype_int8 yypgoto[] =
- {
--     -78,   -78,    97,   100,   -78,   -37,   -78,   -77,   -78,   -78,
--     -78,    -5,    65,    13,   -78,    76,    77,    62,    80,    83,
--      34,    20,    26,    28,   -14,   -78,    18,    24
-+     -81,   -81,   -81,    96,   100,   -81,   -40,   -81,   -80,   -81,
-+     -81,   -81,    -8,    62,    13,   -81,    77,    64,    78,    61,
-+      82,    27,    21,    24,    25,   -17,   -81,    18,    26
- };
- 
- /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
-@@ -638,59 +647,59 @@ static const yytype_int8 yypgoto[] =
- #define YYTABLE_NINF -1
- static const yytype_uint8 yytable[] =
- {
--      12,    66,    67,    40,    41,    42,    44,    34,     9,    10,
--      52,    53,   115,   101,     5,   112,   104,   132,   113,   133,
--     116,   117,   118,   119,    11,     1,    60,   114,    14,   134,
--     120,    45,     6,    54,    17,   121,     3,    18,    19,    55,
--       9,    10,    50,    51,    61,    62,    84,    85,    86,     9,
--      10,     4,   100,    37,   126,   127,    11,    35,    87,    88,
--      89,    38,   128,    46,    39,    11,    90,    98,    47,    35,
--      43,    99,    76,    77,    78,    79,    56,    57,    58,    59,
--     135,   136,    80,    81,    74,    75,    82,    83,    48,    63,
--      49,    65,    94,    95,    96,    97,   124,   103,   107,   108,
--     111,   123,   130,   131,   138,    16,    13,   140,   106,    71,
--      69,   105,     0,     0,   102,     0,     0,   129,     0,     0,
--      68,     0,     0,    70,     0,     0,     0,     0,    72,     0,
--     137,     0,    73,   139
-+      15,    69,    70,    43,    44,    45,    47,    37,    12,    13,
-+      55,    56,   118,   104,     8,   135,   107,   136,    53,    54,
-+     119,   120,   121,   122,    14,    38,    63,   137,    61,    62,
-+     123,    48,     9,    57,    20,   124,     1,    21,    22,    58,
-+      12,    13,    59,    60,    64,    65,    87,    88,    89,    12,
-+      13,     5,   103,    40,   129,   130,    14,   115,   138,   139,
-+     116,    41,   131,     4,    42,    14,    90,    91,    92,   117,
-+       3,   101,     7,    38,    93,   102,    79,    80,    81,    82,
-+      77,    78,    17,    83,    84,    46,    85,    86,    49,    51,
-+      50,    66,    68,    97,    52,    98,    99,   100,   106,   110,
-+     111,   114,   126,   133,   127,   134,   141,    19,   143,    16,
-+      72,   109,    75,    73,   108,     0,     0,   132,     0,   105,
-+       0,     0,     0,     0,    71,     0,     0,     0,    74,     0,
-+     140,     0,     0,   142,    76
- };
- 
- static const yytype_int16 yycheck[] =
- {
--       5,    38,    39,    17,    18,    19,    12,    12,    17,    18,
--       7,     8,    13,    90,     4,    22,    93,    20,    25,    22,
--      21,    22,    23,    24,    33,     3,    26,    34,    26,    32,
--      31,    37,    22,    30,    43,    36,    25,    46,    47,    36,
--      17,    18,     9,    10,    44,    45,    60,    61,    62,    17,
--      18,     0,    89,    15,    22,    23,    33,    27,    14,    15,
--      16,    23,    30,    11,    26,    33,    22,    25,    39,    27,
--      35,    29,    52,    53,    54,    55,     5,     6,    42,    43,
--      34,    35,    56,    57,    50,    51,    58,    59,    40,    25,
--      41,    23,    25,    38,    16,    16,    33,    28,    25,    25,
--      25,    17,    36,    21,    34,     8,     6,    35,    95,    47,
--      45,    93,    -1,    -1,    90,    -1,    -1,   122,    -1,    -1,
--      44,    -1,    -1,    46,    -1,    -1,    -1,    -1,    48,    -1,
--     135,    -1,    49,   138
-+       8,    41,    42,    20,    21,    22,    13,    15,    18,    19,
-+       8,     9,    14,    93,     5,    21,    96,    23,    10,    11,
-+      22,    23,    24,    25,    34,    28,    27,    33,    43,    44,
-+      32,    38,    23,    31,    44,    37,     3,    47,    48,    37,
-+      18,    19,     6,     7,    45,    46,    63,    64,    65,    18,
-+      19,     4,    92,    16,    23,    24,    34,    23,    35,    36,
-+      26,    24,    31,     0,    27,    34,    15,    16,    17,    35,
-+      26,    26,    26,    28,    23,    30,    55,    56,    57,    58,
-+      53,    54,    27,    59,    60,    36,    61,    62,    12,    41,
-+      40,    26,    24,    26,    42,    39,    17,    17,    29,    26,
-+      26,    26,    18,    37,    34,    22,    35,    11,    36,     9,
-+      48,    98,    51,    49,    96,    -1,    -1,   125,    -1,    93,
-+      -1,    -1,    -1,    -1,    47,    -1,    -1,    -1,    50,    -1,
-+     138,    -1,    -1,   141,    52
- };
- 
- /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
-    symbol of state STATE-NUM.  */
- static const yytype_uint8 yystos[] =
- {
--       0,     3,    49,    25,     0,     4,    22,    50,    51,    17,
--      18,    33,    59,    51,    26,    52,    50,    43,    46,    47,
--      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
--      69,    70,    71,    72,    59,    27,    53,    15,    23,    26,
--      72,    72,    72,    35,    12,    37,    11,    39,    40,    41,
--       9,    10,     7,     8,    30,    36,     5,     6,    42,    43,
--      26,    44,    45,    25,    54,    23,    53,    53,    63,    60,
--      64,    65,    66,    67,    68,    68,    69,    69,    69,    69,
--      70,    70,    71,    71,    72,    72,    72,    14,    15,    16,
--      22,    55,    74,    75,    25,    38,    16,    16,    25,    29,
--      53,    55,    75,    28,    55,    74,    61,    25,    25,    56,
--      57,    25,    22,    25,    34,    13,    21,    22,    23,    24,
--      31,    36,    58,    17,    33,    73,    22,    23,    30,    59,
--      36,    21,    20,    22,    32,    34,    35,    59,    34,    59,
--      35
-+       0,     3,    50,    26,     0,     4,    51,    26,     5,    23,
-+      52,    53,    18,    19,    34,    61,    53,    27,    54,    52,
-+      44,    47,    48,    61,    62,    63,    64,    65,    66,    67,
-+      68,    69,    70,    71,    72,    73,    74,    61,    28,    55,
-+      16,    24,    27,    74,    74,    74,    36,    13,    38,    12,
-+      40,    41,    42,    10,    11,     8,     9,    31,    37,     6,
-+       7,    43,    44,    27,    45,    46,    26,    56,    24,    55,
-+      55,    65,    62,    66,    67,    68,    69,    70,    70,    71,
-+      71,    71,    71,    72,    72,    73,    73,    74,    74,    74,
-+      15,    16,    17,    23,    57,    76,    77,    26,    39,    17,
-+      17,    26,    30,    55,    57,    77,    29,    57,    76,    63,
-+      26,    26,    58,    59,    26,    23,    26,    35,    14,    22,
-+      23,    24,    25,    32,    37,    60,    18,    34,    75,    23,
-+      24,    31,    61,    37,    22,    21,    23,    33,    35,    36,
-+      61,    35,    61,    36
- };
- 
- #define yyerrok		(yyerrstatus = 0)
-@@ -1504,72 +1513,92 @@ yyreduce:
-         case 2:
- 
- /* Line 1455 of yacc.c  */
--#line 110 "dtc-parser.y"
-+#line 114 "dtc-parser.y"
-     {
--			the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node),
--							guess_boot_cpuid((yyvsp[(4) - (4)].node)));
-+			(yyvsp[(5) - (5)].node)->is_plugin = (yyvsp[(3) - (5)].is_plugin);
-+			(yyvsp[(5) - (5)].node)->is_root = 1;
-+			the_boot_info = build_boot_info((yyvsp[(4) - (5)].re), (yyvsp[(5) - (5)].node),
-+							guess_boot_cpuid((yyvsp[(5) - (5)].node)));
- 		;}
-     break;
- 
-   case 3:
- 
- /* Line 1455 of yacc.c  */
--#line 118 "dtc-parser.y"
-+#line 124 "dtc-parser.y"
-     {
--			(yyval.re) = NULL;
-+			(yyval.is_plugin) = 0;
- 		;}
-     break;
- 
-   case 4:
- 
- /* Line 1455 of yacc.c  */
--#line 122 "dtc-parser.y"
-+#line 128 "dtc-parser.y"
-     {
--			(yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
-+			(yyval.is_plugin) = 1;
- 		;}
-     break;
- 
-   case 5:
- 
- /* Line 1455 of yacc.c  */
--#line 129 "dtc-parser.y"
-+#line 135 "dtc-parser.y"
-     {
--			(yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer));
-+			(yyval.re) = NULL;
- 		;}
-     break;
- 
-   case 6:
- 
- /* Line 1455 of yacc.c  */
--#line 133 "dtc-parser.y"
-+#line 139 "dtc-parser.y"
-+    {
-+			(yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
-+		;}
-+    break;
-+
-+  case 7:
-+
-+/* Line 1455 of yacc.c  */
-+#line 146 "dtc-parser.y"
-+    {
-+			(yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer));
-+		;}
-+    break;
-+
-+  case 8:
-+
-+/* Line 1455 of yacc.c  */
-+#line 150 "dtc-parser.y"
-     {
- 			add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref));
- 			(yyval.re) = (yyvsp[(2) - (2)].re);
- 		;}
-     break;
- 
--  case 7:
-+  case 9:
- 
- /* Line 1455 of yacc.c  */
--#line 141 "dtc-parser.y"
-+#line 158 "dtc-parser.y"
-     {
- 			(yyval.node) = name_node((yyvsp[(2) - (2)].node), "");
- 		;}
-     break;
- 
--  case 8:
-+  case 10:
- 
- /* Line 1455 of yacc.c  */
--#line 145 "dtc-parser.y"
-+#line 162 "dtc-parser.y"
-     {
- 			(yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
- 		;}
-     break;
- 
--  case 9:
-+  case 11:
- 
- /* Line 1455 of yacc.c  */
--#line 149 "dtc-parser.y"
-+#line 166 "dtc-parser.y"
-     {
- 			struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref));
- 
-@@ -1581,10 +1610,10 @@ yyreduce:
- 		;}
-     break;
- 
--  case 10:
-+  case 12:
- 
- /* Line 1455 of yacc.c  */
--#line 159 "dtc-parser.y"
-+#line 176 "dtc-parser.y"
-     {
- 			struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref));
- 
-@@ -1597,110 +1626,110 @@ yyreduce:
- 		;}
-     break;
- 
--  case 11:
-+  case 13:
- 
- /* Line 1455 of yacc.c  */
--#line 173 "dtc-parser.y"
-+#line 190 "dtc-parser.y"
-     {
- 			(yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));
- 		;}
-     break;
- 
--  case 12:
-+  case 14:
- 
- /* Line 1455 of yacc.c  */
--#line 180 "dtc-parser.y"
-+#line 197 "dtc-parser.y"
-     {
- 			(yyval.proplist) = NULL;
- 		;}
-     break;
- 
--  case 13:
-+  case 15:
- 
- /* Line 1455 of yacc.c  */
--#line 184 "dtc-parser.y"
-+#line 201 "dtc-parser.y"
-     {
- 			(yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));
- 		;}
-     break;
- 
--  case 14:
-+  case 16:
- 
- /* Line 1455 of yacc.c  */
--#line 191 "dtc-parser.y"
-+#line 208 "dtc-parser.y"
-     {
- 			(yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data));
- 		;}
-     break;
- 
--  case 15:
-+  case 17:
- 
- /* Line 1455 of yacc.c  */
--#line 195 "dtc-parser.y"
-+#line 212 "dtc-parser.y"
-     {
- 			(yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data);
- 		;}
-     break;
- 
--  case 16:
-+  case 18:
- 
- /* Line 1455 of yacc.c  */
--#line 199 "dtc-parser.y"
-+#line 216 "dtc-parser.y"
-     {
- 			(yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename));
- 		;}
-     break;
- 
--  case 17:
-+  case 19:
- 
- /* Line 1455 of yacc.c  */
--#line 203 "dtc-parser.y"
-+#line 220 "dtc-parser.y"
-     {
- 			add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref));
- 			(yyval.prop) = (yyvsp[(2) - (2)].prop);
- 		;}
-     break;
- 
--  case 18:
-+  case 20:
- 
- /* Line 1455 of yacc.c  */
--#line 211 "dtc-parser.y"
-+#line 228 "dtc-parser.y"
-     {
- 			(yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));
- 		;}
-     break;
- 
--  case 19:
-+  case 21:
- 
- /* Line 1455 of yacc.c  */
--#line 215 "dtc-parser.y"
-+#line 232 "dtc-parser.y"
-     {
- 			(yyval.data) = data_merge((yyvsp[(1) - (3)].data), (yyvsp[(2) - (3)].array).data);
- 		;}
-     break;
- 
--  case 20:
-+  case 22:
- 
- /* Line 1455 of yacc.c  */
--#line 219 "dtc-parser.y"
-+#line 236 "dtc-parser.y"
-     {
- 			(yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
- 		;}
-     break;
- 
--  case 21:
-+  case 23:
- 
- /* Line 1455 of yacc.c  */
--#line 223 "dtc-parser.y"
-+#line 240 "dtc-parser.y"
-     {
- 			(yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));
- 		;}
-     break;
- 
--  case 22:
-+  case 24:
- 
- /* Line 1455 of yacc.c  */
--#line 227 "dtc-parser.y"
-+#line 244 "dtc-parser.y"
-     {
- 			FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL);
- 			struct data d;
-@@ -1719,10 +1748,10 @@ yyreduce:
- 		;}
-     break;
- 
--  case 23:
-+  case 25:
- 
- /* Line 1455 of yacc.c  */
--#line 244 "dtc-parser.y"
-+#line 261 "dtc-parser.y"
-     {
- 			FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL);
- 			struct data d = empty_data;
-@@ -1734,46 +1763,46 @@ yyreduce:
- 		;}
-     break;
- 
--  case 24:
-+  case 26:
- 
- /* Line 1455 of yacc.c  */
--#line 254 "dtc-parser.y"
-+#line 271 "dtc-parser.y"
-     {
- 			(yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
- 		;}
-     break;
- 
--  case 25:
-+  case 27:
- 
- /* Line 1455 of yacc.c  */
--#line 261 "dtc-parser.y"
-+#line 278 "dtc-parser.y"
-     {
- 			(yyval.data) = empty_data;
- 		;}
-     break;
- 
--  case 26:
-+  case 28:
- 
- /* Line 1455 of yacc.c  */
--#line 265 "dtc-parser.y"
-+#line 282 "dtc-parser.y"
-     {
- 			(yyval.data) = (yyvsp[(1) - (2)].data);
- 		;}
-     break;
- 
--  case 27:
-+  case 29:
- 
- /* Line 1455 of yacc.c  */
--#line 269 "dtc-parser.y"
-+#line 286 "dtc-parser.y"
-     {
- 			(yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
- 		;}
-     break;
- 
--  case 28:
-+  case 30:
- 
- /* Line 1455 of yacc.c  */
--#line 276 "dtc-parser.y"
-+#line 293 "dtc-parser.y"
-     {
- 			(yyval.array).data = empty_data;
- 			(yyval.array).bits = eval_literal((yyvsp[(2) - (3)].literal), 0, 7);
-@@ -1790,20 +1819,20 @@ yyreduce:
- 		;}
-     break;
- 
--  case 29:
-+  case 31:
- 
- /* Line 1455 of yacc.c  */
--#line 291 "dtc-parser.y"
-+#line 308 "dtc-parser.y"
-     {
- 			(yyval.array).data = empty_data;
- 			(yyval.array).bits = 32;
- 		;}
-     break;
- 
--  case 30:
-+  case 32:
- 
- /* Line 1455 of yacc.c  */
--#line 296 "dtc-parser.y"
-+#line 313 "dtc-parser.y"
-     {
- 			if ((yyvsp[(1) - (2)].array).bits < 64) {
- 				uint64_t mask = (1ULL << (yyvsp[(1) - (2)].array).bits) - 1;
-@@ -1825,10 +1854,10 @@ yyreduce:
- 		;}
-     break;
- 
--  case 31:
-+  case 33:
- 
- /* Line 1455 of yacc.c  */
--#line 316 "dtc-parser.y"
-+#line 333 "dtc-parser.y"
-     {
- 			uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits);
- 
-@@ -1844,273 +1873,273 @@ yyreduce:
- 		;}
-     break;
- 
--  case 32:
-+  case 34:
- 
- /* Line 1455 of yacc.c  */
--#line 330 "dtc-parser.y"
-+#line 347 "dtc-parser.y"
-     {
- 			(yyval.array).data = data_add_marker((yyvsp[(1) - (2)].array).data, LABEL, (yyvsp[(2) - (2)].labelref));
- 		;}
-     break;
- 
--  case 33:
-+  case 35:
- 
- /* Line 1455 of yacc.c  */
--#line 337 "dtc-parser.y"
-+#line 354 "dtc-parser.y"
-     {
- 			(yyval.integer) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64);
- 		;}
-     break;
- 
--  case 34:
-+  case 36:
- 
- /* Line 1455 of yacc.c  */
--#line 341 "dtc-parser.y"
-+#line 358 "dtc-parser.y"
-     {
- 			(yyval.integer) = eval_char_literal((yyvsp[(1) - (1)].literal));
- 		;}
-     break;
- 
--  case 35:
-+  case 37:
- 
- /* Line 1455 of yacc.c  */
--#line 345 "dtc-parser.y"
-+#line 362 "dtc-parser.y"
-     {
- 			(yyval.integer) = (yyvsp[(2) - (3)].integer);
- 		;}
-     break;
- 
--  case 38:
-+  case 40:
- 
- /* Line 1455 of yacc.c  */
--#line 356 "dtc-parser.y"
-+#line 373 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); ;}
-     break;
- 
--  case 40:
-+  case 42:
- 
- /* Line 1455 of yacc.c  */
--#line 361 "dtc-parser.y"
-+#line 378 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 42:
-+  case 44:
- 
- /* Line 1455 of yacc.c  */
--#line 366 "dtc-parser.y"
-+#line 383 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 44:
-+  case 46:
- 
- /* Line 1455 of yacc.c  */
--#line 371 "dtc-parser.y"
-+#line 388 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 46:
-+  case 48:
- 
- /* Line 1455 of yacc.c  */
--#line 376 "dtc-parser.y"
-+#line 393 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 48:
-+  case 50:
- 
- /* Line 1455 of yacc.c  */
--#line 381 "dtc-parser.y"
-+#line 398 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 50:
-+  case 52:
- 
- /* Line 1455 of yacc.c  */
--#line 386 "dtc-parser.y"
-+#line 403 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 51:
-+  case 53:
- 
- /* Line 1455 of yacc.c  */
--#line 387 "dtc-parser.y"
-+#line 404 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 53:
-+  case 55:
- 
- /* Line 1455 of yacc.c  */
--#line 392 "dtc-parser.y"
-+#line 409 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 54:
-+  case 56:
- 
- /* Line 1455 of yacc.c  */
--#line 393 "dtc-parser.y"
-+#line 410 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 55:
-+  case 57:
- 
- /* Line 1455 of yacc.c  */
--#line 394 "dtc-parser.y"
-+#line 411 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 56:
-+  case 58:
- 
- /* Line 1455 of yacc.c  */
--#line 395 "dtc-parser.y"
-+#line 412 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 57:
-+  case 59:
- 
- /* Line 1455 of yacc.c  */
--#line 399 "dtc-parser.y"
-+#line 416 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 58:
-+  case 60:
- 
- /* Line 1455 of yacc.c  */
--#line 400 "dtc-parser.y"
-+#line 417 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 60:
-+  case 62:
- 
- /* Line 1455 of yacc.c  */
--#line 405 "dtc-parser.y"
-+#line 422 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 61:
-+  case 63:
- 
- /* Line 1455 of yacc.c  */
--#line 406 "dtc-parser.y"
-+#line 423 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 63:
-+  case 65:
- 
- /* Line 1455 of yacc.c  */
--#line 411 "dtc-parser.y"
-+#line 428 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 64:
-+  case 66:
- 
- /* Line 1455 of yacc.c  */
--#line 412 "dtc-parser.y"
-+#line 429 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 65:
-+  case 67:
- 
- /* Line 1455 of yacc.c  */
--#line 413 "dtc-parser.y"
-+#line 430 "dtc-parser.y"
-     { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); ;}
-     break;
- 
--  case 68:
-+  case 70:
- 
- /* Line 1455 of yacc.c  */
--#line 419 "dtc-parser.y"
-+#line 436 "dtc-parser.y"
-     { (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;}
-     break;
- 
--  case 69:
-+  case 71:
- 
- /* Line 1455 of yacc.c  */
--#line 420 "dtc-parser.y"
-+#line 437 "dtc-parser.y"
-     { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); ;}
-     break;
- 
--  case 70:
-+  case 72:
- 
- /* Line 1455 of yacc.c  */
--#line 421 "dtc-parser.y"
-+#line 438 "dtc-parser.y"
-     { (yyval.integer) = !(yyvsp[(2) - (2)].integer); ;}
-     break;
- 
--  case 71:
-+  case 73:
- 
- /* Line 1455 of yacc.c  */
--#line 426 "dtc-parser.y"
-+#line 443 "dtc-parser.y"
-     {
- 			(yyval.data) = empty_data;
- 		;}
-     break;
- 
--  case 72:
-+  case 74:
- 
- /* Line 1455 of yacc.c  */
--#line 430 "dtc-parser.y"
-+#line 447 "dtc-parser.y"
-     {
- 			(yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));
- 		;}
-     break;
- 
--  case 73:
-+  case 75:
- 
- /* Line 1455 of yacc.c  */
--#line 434 "dtc-parser.y"
-+#line 451 "dtc-parser.y"
-     {
- 			(yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
- 		;}
-     break;
- 
--  case 74:
-+  case 76:
- 
- /* Line 1455 of yacc.c  */
--#line 441 "dtc-parser.y"
-+#line 458 "dtc-parser.y"
-     {
- 			(yyval.nodelist) = NULL;
- 		;}
-     break;
- 
--  case 75:
-+  case 77:
- 
- /* Line 1455 of yacc.c  */
--#line 445 "dtc-parser.y"
-+#line 462 "dtc-parser.y"
-     {
- 			(yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));
- 		;}
-     break;
- 
--  case 76:
-+  case 78:
- 
- /* Line 1455 of yacc.c  */
--#line 449 "dtc-parser.y"
-+#line 466 "dtc-parser.y"
-     {
- 			print_error("syntax error: properties must precede subnodes");
- 			YYERROR;
- 		;}
-     break;
- 
--  case 77:
-+  case 79:
- 
- /* Line 1455 of yacc.c  */
--#line 457 "dtc-parser.y"
-+#line 474 "dtc-parser.y"
-     {
- 			(yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename));
- 		;}
-     break;
- 
--  case 78:
-+  case 80:
- 
- /* Line 1455 of yacc.c  */
--#line 461 "dtc-parser.y"
-+#line 478 "dtc-parser.y"
-     {
- 			(yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename));
- 		;}
-     break;
- 
--  case 79:
-+  case 81:
- 
- /* Line 1455 of yacc.c  */
--#line 465 "dtc-parser.y"
-+#line 482 "dtc-parser.y"
-     {
- 			add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref));
- 			(yyval.node) = (yyvsp[(2) - (2)].node);
-@@ -2120,7 +2149,7 @@ yyreduce:
- 
- 
- /* Line 1455 of yacc.c  */
--#line 2124 "dtc-parser.tab.c"
-+#line 2153 "dtc-parser.tab.c"
-       default: break;
-     }
-   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-@@ -2332,7 +2361,7 @@ yyreturn:
- 
- 
- /* Line 1675 of yacc.c  */
--#line 471 "dtc-parser.y"
-+#line 488 "dtc-parser.y"
- 
- 
- void print_error(char const *fmt, ...)
-diff --git a/scripts/dtc/dtc-parser.tab.h_shipped b/scripts/dtc/dtc-parser.tab.h_shipped
-index 9d2dce4..e4dfadf 100644
---- a/scripts/dtc/dtc-parser.tab.h_shipped
-+++ b/scripts/dtc/dtc-parser.tab.h_shipped
-@@ -40,27 +40,28 @@
-       know about them.  */
-    enum yytokentype {
-      DT_V1 = 258,
--     DT_MEMRESERVE = 259,
--     DT_LSHIFT = 260,
--     DT_RSHIFT = 261,
--     DT_LE = 262,
--     DT_GE = 263,
--     DT_EQ = 264,
--     DT_NE = 265,
--     DT_AND = 266,
--     DT_OR = 267,
--     DT_BITS = 268,
--     DT_DEL_PROP = 269,
--     DT_DEL_NODE = 270,
--     DT_PROPNODENAME = 271,
--     DT_LITERAL = 272,
--     DT_CHAR_LITERAL = 273,
--     DT_BASE = 274,
--     DT_BYTE = 275,
--     DT_STRING = 276,
--     DT_LABEL = 277,
--     DT_REF = 278,
--     DT_INCBIN = 279
-+     DT_PLUGIN = 259,
-+     DT_MEMRESERVE = 260,
-+     DT_LSHIFT = 261,
-+     DT_RSHIFT = 262,
-+     DT_LE = 263,
-+     DT_GE = 264,
-+     DT_EQ = 265,
-+     DT_NE = 266,
-+     DT_AND = 267,
-+     DT_OR = 268,
-+     DT_BITS = 269,
-+     DT_DEL_PROP = 270,
-+     DT_DEL_NODE = 271,
-+     DT_PROPNODENAME = 272,
-+     DT_LITERAL = 273,
-+     DT_CHAR_LITERAL = 274,
-+     DT_BASE = 275,
-+     DT_BYTE = 276,
-+     DT_STRING = 277,
-+     DT_LABEL = 278,
-+     DT_REF = 279,
-+     DT_INCBIN = 280
-    };
- #endif
- 
-@@ -71,7 +72,7 @@ typedef union YYSTYPE
- {
- 
- /* Line 1676 of yacc.c  */
--#line 40 "dtc-parser.y"
-+#line 41 "dtc-parser.y"
- 
- 	char *propnodename;
- 	char *literal;
-@@ -91,11 +92,12 @@ typedef union YYSTYPE
- 	struct node *nodelist;
- 	struct reserve_info *re;
- 	uint64_t integer;
-+	int is_plugin;
- 
- 
- 
- /* Line 1676 of yacc.c  */
--#line 99 "dtc-parser.tab.h"
-+#line 101 "dtc-parser.tab.h"
- } YYSTYPE;
- # define YYSTYPE_IS_TRIVIAL 1
- # define yystype YYSTYPE /* obsolescent; will be withdrawn */
-diff --git a/scripts/dtc/dtc-parser.y b/scripts/dtc/dtc-parser.y
-index f412460..e444acf 100644
---- a/scripts/dtc/dtc-parser.y
-+++ b/scripts/dtc/dtc-parser.y
-@@ -20,6 +20,7 @@
- 
- %{
- #include <stdio.h>
-+#include <inttypes.h>
- 
- #include "dtc.h"
- #include "srcpos.h"
-@@ -56,9 +57,11 @@ static unsigned char eval_char_literal(const char *s);
- 	struct node *nodelist;
- 	struct reserve_info *re;
- 	uint64_t integer;
-+	int is_plugin;
- }
- 
- %token DT_V1
-+%token DT_PLUGIN
- %token DT_MEMRESERVE
- %token DT_LSHIFT DT_RSHIFT DT_LE DT_GE DT_EQ DT_NE DT_AND DT_OR
- %token DT_BITS
-@@ -76,6 +79,7 @@ static unsigned char eval_char_literal(const char *s);
- 
- %type <data> propdata
- %type <data> propdataprefix
-+%type <is_plugin> plugindecl
- %type <re> memreserve
- %type <re> memreserves
- %type <array> arrayprefix
-@@ -106,10 +110,23 @@ static unsigned char eval_char_literal(const char *s);
- %%
- 
- sourcefile:
--	  DT_V1 ';' memreserves devicetree
-+	  DT_V1 ';' plugindecl memreserves devicetree
- 		{
--			the_boot_info = build_boot_info($3, $4,
--							guess_boot_cpuid($4));
-+			$5->is_plugin = $3;
-+			$5->is_root = 1;
-+			the_boot_info = build_boot_info($4, $5,
-+							guess_boot_cpuid($5));
-+		}
-+	;
-+
-+plugindecl:
-+	/* empty */
-+		{
-+			$$ = 0;
-+		}
-+	| DT_PLUGIN ';'
-+		{
-+			$$ = 1;
- 		}
- 	;
- 
-diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c
-index a375683..30d9607 100644
---- a/scripts/dtc/dtc.c
-+++ b/scripts/dtc/dtc.c
-@@ -31,6 +31,7 @@ int reservenum;		/* Number of memory reservation slots */
- int minsize;		/* Minimum blob size */
- int padsize;		/* Additional padding to blob */
- int phandle_format = PHANDLE_BOTH;	/* Use linux,phandle or phandle properties */
-+int symbol_fixup_support = 0;
- 
- static void fill_fullpaths(struct node *tree, const char *prefix)
- {
-@@ -96,6 +97,8 @@ static void  __attribute__ ((noreturn)) usage(void)
- 	fprintf(stderr, "\t-W [no-]<checkname>\n");
- 	fprintf(stderr, "\t-E [no-]<checkname>\n");
- 	fprintf(stderr, "\t\t\tenable or disable warnings and errors\n");
-+	fprintf(stderr, "\t-@\n");
-+	fprintf(stderr, "\t\tSymbols and Fixups support\n");
- 	exit(3);
- }
- 
-@@ -118,7 +121,7 @@ int main(int argc, char *argv[])
- 	minsize    = 0;
- 	padsize    = 0;
- 
--	while ((opt = getopt(argc, argv, "hI:O:o:V:d:R:S:p:fqb:i:vH:sW:E:"))
-+	while ((opt = getopt(argc, argv, "hI:O:o:V:d:R:S:p:fqb:i:vH:sW:E:@"))
- 			!= EOF) {
- 		switch (opt) {
- 		case 'I':
-@@ -183,7 +186,9 @@ int main(int argc, char *argv[])
- 		case 'E':
- 			parse_checks_option(false, true, optarg);
- 			break;
--
-+		case '@':
-+			symbol_fixup_support = 1;
-+			break;
- 		case 'h':
- 		default:
- 			usage();
-diff --git a/scripts/dtc/dtc.h b/scripts/dtc/dtc.h
-index 3e42a07..0c8ecf6 100644
---- a/scripts/dtc/dtc.h
-+++ b/scripts/dtc/dtc.h
-@@ -54,6 +54,7 @@ extern int reservenum;		/* Number of memory reservation slots */
- extern int minsize;		/* Minimum blob size */
- extern int padsize;		/* Additional padding to blob */
- extern int phandle_format;	/* Use linux,phandle or phandle properties */
-+extern int symbol_fixup_support;/* enable symbols & fixup support */
- 
- #define PHANDLE_LEGACY	0x1
- #define PHANDLE_EPAPR	0x2
-@@ -133,6 +134,25 @@ struct label {
- 	struct label *next;
- };
- 
-+struct fixup_entry {
-+	int offset;
-+	struct node *node;
-+	struct property *prop;
-+	struct fixup_entry *next;
-+};
-+
-+struct fixup {
-+	char *ref;
-+	struct fixup_entry *entries;
-+	struct fixup *next;
-+};
-+
-+struct symbol {
-+	struct label *label;
-+	struct node *node;
-+	struct symbol *next;
-+};
-+
- struct property {
- 	int deleted;
- 	char *name;
-@@ -159,6 +179,12 @@ struct node {
- 	int addr_cells, size_cells;
- 
- 	struct label *labels;
-+
-+	int is_root;
-+	int is_plugin;
-+	struct fixup *fixups;
-+	struct symbol *symbols;
-+	struct fixup_entry *local_fixups;
- };
- 
- #define for_each_label_withdel(l0, l) \
-@@ -182,6 +208,18 @@ struct node {
- 	for_each_child_withdel(n, c) \
- 		if (!(c)->deleted)
- 
-+#define for_each_fixup(n, f) \
-+	for ((f) = (n)->fixups; (f); (f) = (f)->next)
-+
-+#define for_each_fixup_entry(f, fe) \
-+	for ((fe) = (f)->entries; (fe); (fe) = (fe)->next)
-+
-+#define for_each_symbol(n, s) \
-+	for ((s) = (n)->symbols; (s); (s) = (s)->next)
-+
-+#define for_each_local_fixup_entry(n, fe) \
-+	for ((fe) = (n)->local_fixups; (fe); (fe) = (fe)->next)
-+
- void add_label(struct label **labels, char *label);
- void delete_labels(struct label **labels);
- 
-diff --git a/scripts/dtc/flattree.c b/scripts/dtc/flattree.c
-index 665dad7..5b2e75e 100644
---- a/scripts/dtc/flattree.c
-+++ b/scripts/dtc/flattree.c
-@@ -262,6 +262,12 @@ static void flatten_tree(struct node *tree, struct emitter *emit,
- 	struct property *prop;
- 	struct node *child;
- 	int seen_name_prop = 0;
-+	struct symbol *sym;
-+	struct fixup *f;
-+	struct fixup_entry *fe;
-+	char *name, *s;
-+	const char *fullpath;
-+	int namesz, nameoff, vallen;
- 
- 	if (tree->deleted)
- 		return;
-@@ -310,6 +316,139 @@ static void flatten_tree(struct node *tree, struct emitter *emit,
- 		flatten_tree(child, emit, etarget, strbuf, vi);
- 	}
- 
-+	if (!symbol_fixup_support)
-+		goto no_symbols;
-+
-+	/* add the symbol nodes (if any) */
-+	if (tree->symbols) {
-+
-+		emit->beginnode(etarget, NULL);
-+		emit->string(etarget, "__symbols__", 0);
-+		emit->align(etarget, sizeof(cell_t));
-+
-+		for_each_symbol(tree, sym) {
-+
-+			vallen = strlen(sym->node->fullpath);
-+
-+			nameoff = stringtable_insert(strbuf, sym->label->label);
-+
-+			emit->property(etarget, NULL);
-+			emit->cell(etarget, vallen + 1);
-+			emit->cell(etarget, nameoff);
-+
-+			if ((vi->flags & FTF_VARALIGN) && vallen >= 8)
-+				emit->align(etarget, 8);
-+
-+			emit->string(etarget, sym->node->fullpath,
-+					strlen(sym->node->fullpath));
-+			emit->align(etarget, sizeof(cell_t));
-+		}
-+
-+		emit->endnode(etarget, NULL);
-+	}
-+
-+	/* add the fixup nodes */
-+	if (tree->fixups) {
-+
-+		/* emit the external fixups */
-+		emit->beginnode(etarget, NULL);
-+		emit->string(etarget, "__fixups__", 0);
-+		emit->align(etarget, sizeof(cell_t));
-+
-+		for_each_fixup(tree, f) {
-+
-+			namesz = 0;
-+			for_each_fixup_entry(f, fe) {
-+				fullpath = fe->node->fullpath;
-+				if (fullpath[0] == '\0')
-+					fullpath = "/";
-+				namesz += strlen(fullpath) + 1;
-+				namesz += strlen(fe->prop->name) + 1;
-+				namesz += 32;	/* space for :<number> + '\0' */
-+			}
-+
-+			name = xmalloc(namesz);
-+
-+			s = name;
-+			for_each_fixup_entry(f, fe) {
-+				fullpath = fe->node->fullpath;
-+				if (fullpath[0] == '\0')
-+					fullpath = "/";
-+				snprintf(s, name + namesz - s, "%s:%s:%d",
-+						fullpath,
-+						fe->prop->name, fe->offset);
-+				s += strlen(s) + 1;
-+			}
-+
-+			nameoff = stringtable_insert(strbuf, f->ref);
-+			vallen = s - name - 1;
-+
-+			emit->property(etarget, NULL);
-+			emit->cell(etarget, vallen + 1);
-+			emit->cell(etarget, nameoff);
-+
-+			if ((vi->flags & FTF_VARALIGN) && vallen >= 8)
-+				emit->align(etarget, 8);
-+
-+			emit->string(etarget, name, vallen);
-+			emit->align(etarget, sizeof(cell_t));
-+
-+			free(name);
-+		}
-+
-+		emit->endnode(etarget, tree->labels);
-+	}
-+
-+	/* add the local fixup property */
-+	if (tree->local_fixups) {
-+
-+		/* emit the external fixups */
-+		emit->beginnode(etarget, NULL);
-+		emit->string(etarget, "__local_fixups__", 0);
-+		emit->align(etarget, sizeof(cell_t));
-+
-+		namesz = 0;
-+		for_each_local_fixup_entry(tree, fe) {
-+			fullpath = fe->node->fullpath;
-+			if (fullpath[0] == '\0')
-+				fullpath = "/";
-+			namesz += strlen(fullpath) + 1;
-+			namesz += strlen(fe->prop->name) + 1;
-+			namesz += 32;	/* space for :<number> + '\0' */
-+		}
-+
-+		name = xmalloc(namesz);
-+
-+		s = name;
-+		for_each_local_fixup_entry(tree, fe) {
-+			fullpath = fe->node->fullpath;
-+			if (fullpath[0] == '\0')
-+				fullpath = "/";
-+			snprintf(s, name + namesz - s, "%s:%s:%d",
-+					fullpath, fe->prop->name,
-+					fe->offset);
-+			s += strlen(s) + 1;
-+		}
-+
-+		nameoff = stringtable_insert(strbuf, "fixup");
-+		vallen = s - name - 1;
-+
-+		emit->property(etarget, NULL);
-+		emit->cell(etarget, vallen + 1);
-+		emit->cell(etarget, nameoff);
-+
-+		if ((vi->flags & FTF_VARALIGN) && vallen >= 8)
-+			emit->align(etarget, 8);
-+
-+		emit->string(etarget, name, vallen);
-+		emit->align(etarget, sizeof(cell_t));
-+
-+		free(name);
-+
-+		emit->endnode(etarget, tree->labels);
-+	}
-+
-+no_symbols:
- 	emit->endnode(etarget, tree->labels);
- }
- 
--- 
-1.7.10.4
-
diff --git a/patches/not-capebus/0020-dtc-Add-DTCO-rule-for-DTB-objects.patch b/patches/not-capebus/0020-dtc-Add-DTCO-rule-for-DTB-objects.patch
deleted file mode 100644
index 1a808c8bfabae027dc07c58d3d484ba6c9973a60..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0020-dtc-Add-DTCO-rule-for-DTB-objects.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From a8cf57e52b9d7e2f764dc740b68aebe9bad77fbe Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 14 Dec 2012 12:57:13 +0200
-Subject: [PATCH 20/90] dtc: Add DTCO rule for DTB objects
-
-Add a rule for compiling DTS files as objects.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- scripts/Makefile.lib | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
-index bdf42fd..72ac3eb 100644
---- a/scripts/Makefile.lib
-+++ b/scripts/Makefile.lib
-@@ -269,6 +269,10 @@ cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile
- $(obj)/%.dtb: $(src)/%.dts FORCE
- 	$(call if_changed_dep,dtc)
- 
-+# plugin compile
-+quiet_cmd_dtco = DTCO    $@
-+cmd_dtco = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -@ -d $(depfile) $<
-+
- # Bzip2
- # ---------------------------------------------------------------------------
- 
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0021-OF-Compile-Device-Tree-sources-with-resolve-option.patch b/patches/not-capebus/0021-OF-Compile-Device-Tree-sources-with-resolve-option.patch
deleted file mode 100644
index 8b6d2b2d62a2457a83b243938edb407c4d06a589..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0021-OF-Compile-Device-Tree-sources-with-resolve-option.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From c281dc399020a6d73195e19e181382b76b300464 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 14 Dec 2012 13:05:34 +0200
-Subject: [PATCH 21/90] OF: Compile Device Tree sources with resolve option
-
-If the resolve config option has been enabled compile
-the device tree sources with the appropriate flag to generate
-the required for resolution __symbols__ node.
-
-Note that both arch/arm/Makefile & arch/arm/boot/Makefile need
-the DTC_FLAGS definition, because when issuing make dtbs the
-boot Makefile doesn't seem to pick it.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/Makefile      | 6 +++++-
- arch/arm/boot/Makefile | 4 ++++
- 2 files changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/Makefile b/arch/arm/Makefile
-index da4434d..e9729a4 100644
---- a/arch/arm/Makefile
-+++ b/arch/arm/Makefile
-@@ -275,6 +275,10 @@ ifeq ($(CONFIG_USE_OF),y)
- KBUILD_DTBS := dtbs
- endif
- 
-+ifeq ($(CONFIG_OF_RESOLVE),y)
-+DTC_FLAGS += -@
-+endif
-+
- all:	$(KBUILD_IMAGE) $(KBUILD_DTBS)
- 
- boot := arch/arm/boot
-@@ -298,7 +302,7 @@ uImage-dtb.%: scripts
- 	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
- 
- dtbs: scripts
--	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) dtbs
-+	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) DTC_FLAGS=$(DTC_FLAGS) dtbs
- 
- # We use MRPROPER_FILES and CLEAN_FILES now
- archclean:
-diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile
-index e37ebb5..bedc651 100644
---- a/arch/arm/boot/Makefile
-+++ b/arch/arm/boot/Makefile
-@@ -60,6 +60,10 @@ $(obj)/zImage-dtb.%:	$(obj)/dts/%.dtb $(obj)/zImage
- 
- endif
- 
-+ifeq ($(CONFIG_OF_RESOLVE),y)
-+DTC_FLAGS += -@
-+endif
-+
- ifneq ($(LOADADDR),)
-   UIMAGE_LOADADDR=$(LOADADDR)
- else
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0022-firmware-update-.gitignore-with-dtbo-objects.patch b/patches/not-capebus/0022-firmware-update-.gitignore-with-dtbo-objects.patch
deleted file mode 100644
index 28d2cbf646c5a6ac800b33827e5c56529e0c6030..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0022-firmware-update-.gitignore-with-dtbo-objects.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From b31c99bae123f4a08e54d25d4456942c1eb34c6c Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 28 Dec 2012 20:23:17 +0200
-Subject: [PATCH 22/90] firmware: update .gitignore with dtbo objects
-
-Ignore generated dtbo files.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/.gitignore | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/firmware/.gitignore b/firmware/.gitignore
-index d9c6901..21e3640 100644
---- a/firmware/.gitignore
-+++ b/firmware/.gitignore
-@@ -4,3 +4,4 @@
- *.csp
- *.dsp
- ihex2fw
-+*.dtbo
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0023-OF-Introduce-device-tree-node-flag-helpers.patch b/patches/not-capebus/0023-OF-Introduce-device-tree-node-flag-helpers.patch
deleted file mode 100644
index 9f24d4ffd218b5d43a9432b95b12b58da39accec..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0023-OF-Introduce-device-tree-node-flag-helpers.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 627e0a3aa9fe521b7fd40054ceeb4e77fbdd4ac3 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 14 Dec 2012 13:10:51 +0200
-Subject: [PATCH 23/90] OF: Introduce device tree node flag helpers.
-
-Helper functions for working with device node flags.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- include/linux/of.h | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
-diff --git a/include/linux/of.h b/include/linux/of.h
-index 5ebcc5c..2ff35b5 100644
---- a/include/linux/of.h
-+++ b/include/linux/of.h
-@@ -114,6 +114,26 @@ static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
- 	set_bit(flag, &n->_flags);
- }
- 
-+static inline void of_node_clear_flag(struct device_node *n, unsigned long flag)
-+{
-+	clear_bit(flag, &n->_flags);
-+}
-+
-+static inline int of_property_check_flag(struct property *p, unsigned long flag)
-+{
-+	return test_bit(flag, &p->_flags);
-+}
-+
-+static inline void of_property_set_flag(struct property *p, unsigned long flag)
-+{
-+	set_bit(flag, &p->_flags);
-+}
-+
-+static inline void of_property_clear_flag(struct property *p, unsigned long flag)
-+{
-+	clear_bit(flag, &p->_flags);
-+}
-+
- extern struct device_node *of_find_all_nodes(struct device_node *prev);
- 
- /*
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0024-OF-export-of_property_notify.patch b/patches/not-capebus/0024-OF-export-of_property_notify.patch
deleted file mode 100644
index eea40888eb95aecf819703ac5ac6946998789932..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0024-OF-export-of_property_notify.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From f994519a6b8cb816dc1d910a63765e504a6b1a61 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Thu, 3 Jan 2013 11:46:39 +0200
-Subject: [PATCH 24/90] OF: export of_property_notify
-
-of_property_notify can be utilized by other users too, export it.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/of/base.c  |  8 +-------
- include/linux/of.h | 11 +++++++++++
- 2 files changed, 12 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/of/base.c b/drivers/of/base.c
-index 2390ddb..d598216 100644
---- a/drivers/of/base.c
-+++ b/drivers/of/base.c
-@@ -1115,7 +1115,7 @@ int of_parse_phandle_with_args(const struct device_node *np, const char *list_na
- EXPORT_SYMBOL(of_parse_phandle_with_args);
- 
- #if defined(CONFIG_OF_DYNAMIC)
--static int of_property_notify(int action, struct device_node *np,
-+int of_property_notify(int action, struct device_node *np,
- 			      struct property *prop)
- {
- 	struct of_prop_reconfig pr;
-@@ -1124,12 +1124,6 @@ static int of_property_notify(int action, struct device_node *np,
- 	pr.prop = prop;
- 	return of_reconfig_notify(action, &pr);
- }
--#else
--static int of_property_notify(int action, struct device_node *np,
--			      struct property *prop)
--{
--	return 0;
--}
- #endif
- 
- /**
-diff --git a/include/linux/of.h b/include/linux/of.h
-index 2ff35b5..aea3694 100644
---- a/include/linux/of.h
-+++ b/include/linux/of.h
-@@ -298,6 +298,17 @@ extern int of_parse_phandle_with_args(const struct device_node *np,
- 	const char *list_name, const char *cells_name, int index,
- 	struct of_phandle_args *out_args);
- 
-+#if defined(CONFIG_OF_DYNAMIC)
-+extern int of_property_notify(int action, struct device_node *np,
-+			      struct property *prop);
-+#else
-+static inline int of_property_notify(int action, struct device_node *np,
-+			      struct property *prop)
-+{
-+	return 0;
-+}
-+#endif
-+
- extern void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align));
- extern int of_alias_get_id(struct device_node *np, const char *stem);
- 
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0025-OF-Export-all-DT-proc-update-functions.patch b/patches/not-capebus/0025-OF-Export-all-DT-proc-update-functions.patch
deleted file mode 100644
index 6ae2ac76b266d7cc86aec6c106cf5a52c7c1f48a..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0025-OF-Export-all-DT-proc-update-functions.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-From ebabf0a546af038a95cf4a77695815fc29a24e23 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Thu, 3 Jan 2013 12:02:14 +0200
-Subject: [PATCH 25/90] OF: Export all DT proc update functions
-
-There are other users for the proc DT functions.
-Export them.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/of/base.c  | 108 ++++++++++++++++++++++++++++-------------------------
- include/linux/of.h |  29 ++++++++++++++
- 2 files changed, 87 insertions(+), 50 deletions(-)
-
-diff --git a/drivers/of/base.c b/drivers/of/base.c
-index d598216..526db99 100644
---- a/drivers/of/base.c
-+++ b/drivers/of/base.c
-@@ -1126,6 +1126,61 @@ int of_property_notify(int action, struct device_node *np,
- }
- #endif
- 
-+#ifdef CONFIG_PROC_DEVICETREE
-+
-+void of_add_proc_dt_entry(struct device_node *dn)
-+{
-+	struct proc_dir_entry *ent;
-+
-+	ent = proc_mkdir(strrchr(dn->full_name, '/') + 1, dn->parent->pde);
-+	if (ent)
-+		proc_device_tree_add_node(dn, ent);
-+}
-+
-+void of_remove_proc_dt_entry(struct device_node *dn)
-+{
-+	struct device_node *parent;
-+	struct property *prop;
-+
-+	if (!dn)
-+		return;
-+
-+	parent = dn->parent;
-+	prop = dn->properties;
-+	while (prop) {
-+		if (dn->pde)
-+			remove_proc_entry(prop->name, dn->pde);
-+		prop = prop->next;
-+	}
-+
-+	if (dn->pde)
-+		remove_proc_entry(dn->pde->name,
-+				parent ? parent->pde : NULL);
-+}
-+
-+void of_add_proc_dt_prop_entry(struct device_node *np,
-+		struct property *prop)
-+{
-+	if (np && prop && np->pde)
-+		proc_device_tree_add_prop(np->pde, prop);
-+}
-+
-+void of_remove_proc_dt_prop_entry(struct device_node *np,
-+		struct property *prop)
-+{
-+	if (np && prop && np->pde)
-+		proc_device_tree_remove_prop(np->pde, prop);
-+}
-+
-+void of_update_proc_dt_prop_entry(struct device_node *np,
-+		struct property *newprop, struct property *oldprop)
-+{
-+	if (np && newprop && oldprop && np->pde)
-+		proc_device_tree_update_prop(np->pde, newprop, oldprop);
-+}
-+
-+#endif /* CONFIG_PROC_DEVICETREE */
-+
- /**
-  * of_add_property - Add a property to a node
-  */
-@@ -1153,11 +1208,8 @@ int of_add_property(struct device_node *np, struct property *prop)
- 	*next = prop;
- 	write_unlock_irqrestore(&devtree_lock, flags);
- 
--#ifdef CONFIG_PROC_DEVICETREE
- 	/* try to add to proc as well if it was initialized */
--	if (np->pde)
--		proc_device_tree_add_prop(np->pde, prop);
--#endif /* CONFIG_PROC_DEVICETREE */
-+	of_add_proc_dt_prop_entry(np, prop);
- 
- 	return 0;
- }
-@@ -1199,11 +1251,7 @@ int of_remove_property(struct device_node *np, struct property *prop)
- 	if (!found)
- 		return -ENODEV;
- 
--#ifdef CONFIG_PROC_DEVICETREE
--	/* try to remove the proc node as well */
--	if (np->pde)
--		proc_device_tree_remove_prop(np->pde, prop);
--#endif /* CONFIG_PROC_DEVICETREE */
-+	of_remove_proc_dt_prop_entry(np, prop);
- 
- 	return 0;
- }
-@@ -1253,11 +1301,8 @@ int of_update_property(struct device_node *np, struct property *newprop)
- 	if (!found)
- 		return -ENODEV;
- 
--#ifdef CONFIG_PROC_DEVICETREE
- 	/* try to add to proc as well if it was initialized */
--	if (np->pde)
--		proc_device_tree_update_prop(np->pde, newprop, oldprop);
--#endif /* CONFIG_PROC_DEVICETREE */
-+	of_update_proc_dt_prop_entry(np, newprop, oldprop);
- 
- 	return 0;
- }
-@@ -1293,22 +1338,6 @@ int of_reconfig_notify(unsigned long action, void *p)
- 	return notifier_to_errno(rc);
- }
- 
--#ifdef CONFIG_PROC_DEVICETREE
--static void of_add_proc_dt_entry(struct device_node *dn)
--{
--	struct proc_dir_entry *ent;
--
--	ent = proc_mkdir(strrchr(dn->full_name, '/') + 1, dn->parent->pde);
--	if (ent)
--		proc_device_tree_add_node(dn, ent);
--}
--#else
--static void of_add_proc_dt_entry(struct device_node *dn)
--{
--	return;
--}
--#endif
--
- /**
-  * of_attach_node - Plug a device node into the tree and global list.
-  */
-@@ -1332,27 +1361,6 @@ int of_attach_node(struct device_node *np)
- 	return 0;
- }
- 
--#ifdef CONFIG_PROC_DEVICETREE
--static void of_remove_proc_dt_entry(struct device_node *dn)
--{
--	struct device_node *parent = dn->parent;
--	struct property *prop = dn->properties;
--
--	while (prop) {
--		remove_proc_entry(prop->name, dn->pde);
--		prop = prop->next;
--	}
--
--	if (dn->pde)
--		remove_proc_entry(dn->pde->name, parent->pde);
--}
--#else
--static void of_remove_proc_dt_entry(struct device_node *dn)
--{
--	return;
--}
--#endif
--
- /**
-  * of_detach_node - "Unplug" a node from the device tree.
-  *
-diff --git a/include/linux/of.h b/include/linux/of.h
-index aea3694..305b087 100644
---- a/include/linux/of.h
-+++ b/include/linux/of.h
-@@ -309,6 +309,35 @@ static inline int of_property_notify(int action, struct device_node *np,
- }
- #endif
- 
-+#ifdef CONFIG_PROC_DEVICETREE
-+
-+extern void of_add_proc_dt_entry(struct device_node *dn);
-+extern void of_remove_proc_dt_entry(struct device_node *dn);
-+
-+extern void of_add_proc_dt_prop_entry(struct device_node *np,
-+		struct property *prop);
-+
-+extern void of_remove_proc_dt_prop_entry(struct device_node *np,
-+		struct property *prop);
-+
-+extern void of_update_proc_dt_prop_entry(struct device_node *np,
-+		struct property *newprop, struct property *oldprop);
-+#else
-+
-+static inline void of_add_proc_dt_entry(struct device_node *dn) { }
-+static inline void of_remove_proc_dt_entry(struct device_node *dn) { }
-+
-+static inline void of_add_proc_dt_prop_entry(struct device_node *np,
-+		struct property *prop) { }
-+
-+static inline void of_remove_proc_dt_prop_entry(struct device_node *np,
-+		struct property *prop) { }
-+
-+static inline void of_update_proc_dt_prop_entry(struct device_node *np,
-+		struct property *newprop, struct property *oldprop) { }
-+
-+#endif
-+
- extern void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align));
- extern int of_alias_get_id(struct device_node *np, const char *stem);
- 
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0026-OF-Introduce-utility-helper-functions.patch b/patches/not-capebus/0026-OF-Introduce-utility-helper-functions.patch
deleted file mode 100644
index e9ee3c08cfb3ef14538295474cd66c41d612902e..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0026-OF-Introduce-utility-helper-functions.patch
+++ /dev/null
@@ -1,363 +0,0 @@
-From eb24fd6d32c0fbf7b81fbba14b2c4e93ef21ca59 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Thu, 3 Jan 2013 12:11:31 +0200
-Subject: [PATCH 26/98] OF: Introduce utility helper functions
-
-Introduce helper functions for working with the live DT tree.
-
-__of_free_property() frees a dynamically created property
-__of_free_tree() recursively frees a device node tree
-__of_copy_property() copies a property dynamically
-__of_create_empty_node() creates an empty node
-__of_find_node_by_full_name() finds the node with the full name
-and
-of_multi_prop_cmp() performs a multi property compare but without
-having to take locks.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/of/Makefile |    2 +-
- drivers/of/util.c   |  252 +++++++++++++++++++++++++++++++++++++++++++++++++++
- include/linux/of.h  |   59 ++++++++++++
- 3 files changed, 312 insertions(+), 1 deletion(-)
- create mode 100644 drivers/of/util.c
-
-diff --git a/drivers/of/Makefile b/drivers/of/Makefile
-index eafa107..3e561a2 100644
---- a/drivers/of/Makefile
-+++ b/drivers/of/Makefile
-@@ -1,4 +1,4 @@
--obj-y = base.o dma.o
-+obj-y = base.o dma.o util.o
- obj-$(CONFIG_OF_FLATTREE) += fdt.o
- obj-$(CONFIG_OF_PROMTREE) += pdt.o
- obj-$(CONFIG_OF_ADDRESS)  += address.o
-diff --git a/drivers/of/util.c b/drivers/of/util.c
-new file mode 100644
-index 0000000..4701825
---- /dev/null
-+++ b/drivers/of/util.c
-@@ -0,0 +1,252 @@
-+/*
-+ * Utility functions for working with device tree(s)
-+ *
-+ * Copyright (C) 2012 Pantelis Antoniou <panto@antoniou-consulting.com>
-+ * Copyright (C) 2012 Texas Instruments Inc.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * version 2 as published by the Free Software Foundation.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/of.h>
-+#include <linux/of_device.h>
-+#include <linux/string.h>
-+#include <linux/ctype.h>
-+#include <linux/errno.h>
-+#include <linux/string.h>
-+#include <linux/slab.h>
-+#include <linux/err.h>
-+
-+/**
-+ * __of_free_property - release the memory of an allocated property
-+ * @prop:	Property to release
-+ *
-+ * Release the memory of an allocated property only after checking
-+ * that the property has been marked as OF_DYNAMIC.
-+ * Only call on known allocated properties.
-+ */
-+void __of_free_property(struct property *prop)
-+{
-+	if (prop == NULL)
-+		return;
-+
-+	if (of_property_check_flag(prop, OF_DYNAMIC)) {
-+		kfree(prop->value);
-+		kfree(prop->name);
-+		kfree(prop);
-+	} else {
-+		pr_warn("%s: property %p cannot be freed; memory is gone\n",
-+				__func__, prop);
-+	}
-+}
-+
-+/**
-+ * __of_free_tree - release the memory of a device tree node and
-+ *		    of all it's children + properties.
-+ * @node:	Device Tree node to release
-+ *
-+ * Release the memory of a device tree node and of all it's children.
-+ * Also release the properties and the dead properties.
-+ * Only call on detached node trees, and you better be sure that
-+ * no pointer exist for any properties. Only safe to do if you
-+ * absolutely control the life cycle of the node.
-+ * Also note that the node is not removed from the all_nodes list,
-+ * neither from the parent's child list; this should be handled before
-+ * calling this function.
-+ */
-+void __of_free_tree(struct device_node *node)
-+{
-+	struct property *prop;
-+	struct device_node *noden;
-+
-+	/* sanity check */
-+	if (!node)
-+		return;
-+
-+	/* free recursively any children */
-+	while ((noden = node->child) != NULL) {
-+		node->child = noden->sibling;
-+		__of_free_tree(noden);
-+	}
-+
-+	/* free every property already allocated */
-+	while ((prop = node->properties) != NULL) {
-+		node->properties = prop->next;
-+		__of_free_property(prop);
-+	}
-+
-+	/* free dead properties already allocated */
-+	while ((prop = node->deadprops) != NULL) {
-+		node->deadprops = prop->next;
-+		__of_free_property(prop);
-+	}
-+
-+	if (of_node_check_flag(node, OF_DYNAMIC)) {
-+		kfree(node->type);
-+		kfree(node->name);
-+		kfree(node);
-+	} else {
-+		pr_warn("%s: node %p cannot be freed; memory is gone\n",
-+				__func__, node);
-+	}
-+}
-+
-+/**
-+ * __of_copy_property - Copy a property dynamically.
-+ * @prop:	Property to copy
-+ * @flags:	Allocation flags (typically pass GFP_KERNEL)
-+ *
-+ * Copy a property by dynamically allocating the memory of both the
-+ * property stucture and the property name & contents. The property's
-+ * flags have the OF_DYNAMIC bit set so that we can differentiate between
-+ * dynamically allocated properties and not.
-+ * Returns the newly allocated property or NULL on out of memory error.
-+ */
-+struct property *__of_copy_property(const struct property *prop, gfp_t flags)
-+{
-+	struct property *propn;
-+
-+	propn = kzalloc(sizeof(*prop), flags);
-+	if (propn == NULL)
-+		return NULL;
-+
-+	propn->name = kstrdup(prop->name, flags);
-+	if (propn->name == NULL)
-+		goto err_fail_name;
-+
-+	if (prop->length > 0) {
-+		propn->value = kmalloc(prop->length, flags);
-+		if (propn->value == NULL)
-+			goto err_fail_value;
-+		memcpy(propn->value, prop->value, prop->length);
-+		propn->length = prop->length;
-+	}
-+
-+	/* mark the property as dynamic */
-+	of_property_set_flag(propn, OF_DYNAMIC);
-+
-+	return propn;
-+
-+err_fail_value:
-+	kfree(propn->name);
-+err_fail_name:
-+	kfree(propn);
-+	return NULL;
-+}
-+
-+/**
-+ * __of_create_empty_node - Create an empty device node dynamically.
-+ * @name:	Name of the new device node
-+ * @type:	Type of the new device node
-+ * @full_name:	Full name of the new device node
-+ * @phandle:	Phandle of the new device node
-+ * @flags:	Allocation flags (typically pass GFP_KERNEL)
-+ *
-+ * Create an empty device tree node, suitable for further modification.
-+ * The node data are dynamically allocated and all the node flags
-+ * have the OF_DYNAMIC & OF_DETACHED bits set.
-+ * Returns the newly allocated node or NULL on out of memory error.
-+ */
-+struct device_node *__of_create_empty_node(
-+		const char *name, const char *type, const char *full_name,
-+		phandle phandle, gfp_t flags)
-+{
-+	struct device_node *node;
-+
-+	node = kzalloc(sizeof(*node), flags);
-+	if (node == NULL)
-+		return NULL;
-+
-+	node->name = kstrdup(name, flags);
-+	if (node->name == NULL)
-+		goto err_return;
-+
-+	node->type = kstrdup(type, flags);
-+	if (node->type == NULL)
-+		goto err_return;
-+
-+	node->full_name = kstrdup(full_name, flags);
-+	if (node->type == NULL)
-+		goto err_return;
-+
-+	node->phandle = phandle;
-+	kref_init(&node->kref);
-+	of_node_set_flag(node, OF_DYNAMIC);
-+	of_node_set_flag(node, OF_DETACHED);
-+
-+	return node;
-+
-+err_return:
-+	__of_free_tree(node);
-+	return NULL;
-+}
-+
-+/**
-+ * __of_find_node_by_full_name - Find a node with the full name recursively
-+ * @node:	Root of the tree to perform the search
-+ * @full_name:	Full name of the node to find.
-+ *
-+ * Find a node with the give full name by recursively following any of
-+ * the child node links.
-+ * Returns the matching node, or NULL if not found.
-+ * Note that the devtree lock is not taken, so this function is only
-+ * safe to call on either detached trees, or when devtree lock is already
-+ * taken.
-+ */
-+struct device_node *__of_find_node_by_full_name(struct device_node *node,
-+		const char *full_name)
-+{
-+	struct device_node *child, *found;
-+
-+	if (node == NULL)
-+		return NULL;
-+
-+	/* check */
-+	if (of_node_cmp(node->full_name, full_name) == 0)
-+		return node;
-+
-+	__for_each_child_of_node(node, child) {
-+		found = __of_find_node_by_full_name(child, full_name);
-+		if (found != NULL)
-+			return found;
-+	}
-+
-+	return NULL;
-+}
-+
-+/**
-+ * of_multi_prop_cmp - Check if a property matches a value
-+ * @prop:	Property to check
-+ * @value:	Value to check against
-+ *
-+ * Check whether a property matches a value, using the standard
-+ * of_compat_cmp() test on each string. It is similar to the test
-+ * of_device_is_compatible() makes, but it can be performed without
-+ * taking the devtree_lock, which is required in some cases.
-+ * Returns 0 on a match, -1 on no match.
-+ */
-+int of_multi_prop_cmp(const struct property *prop, const char *value)
-+{
-+	const char *cp;
-+	int cplen, vlen, l;
-+
-+	if (prop == NULL || value == NULL)
-+		return -1;
-+
-+	cp = prop->value;
-+	cplen = prop->length;
-+	vlen = strlen(value);
-+
-+	while (cplen > 0) {
-+		if (of_compat_cmp(cp, value, vlen) == 0)
-+			return 0;
-+		l = strlen(cp) + 1;
-+		cp += l;
-+		cplen -= l;
-+	}
-+
-+	return -1;
-+}
-diff --git a/include/linux/of.h b/include/linux/of.h
-index 305b087..c38e41a 100644
---- a/include/linux/of.h
-+++ b/include/linux/of.h
-@@ -591,4 +591,63 @@ static inline int of_property_read_u32(const struct device_node *np,
- 	return of_property_read_u32_array(np, propname, out_value, 1);
- }
- 
-+/**
-+ * General utilities for working with live trees.
-+ *
-+ * All functions with two leading underscores operate
-+ * without taking node references, so you either have to
-+ * own the devtree lock or work on detached trees only.
-+ */
-+
-+#ifdef CONFIG_OF
-+
-+/* iterator for internal use; not references, neither affects devtree lock */
-+#define __for_each_child_of_node(dn, chld) \
-+	for (chld = (dn)->child; chld != NULL; chld = chld->sibling)
-+
-+void __of_free_property(struct property *prop);
-+void __of_free_tree(struct device_node *node);
-+struct property *__of_copy_property(const struct property *prop, gfp_t flags);
-+struct device_node *__of_create_empty_node( const char *name,
-+		const char *type, const char *full_name,
-+		phandle phandle, gfp_t flags);
-+struct device_node *__of_find_node_by_full_name(struct device_node *node,
-+		const char *full_name);
-+int of_multi_prop_cmp(const struct property *prop, const char *value);
-+
-+#else /* !CONFIG_OF */
-+
-+#define __for_each_child_of_node(dn, chld) \
-+	while (0)
-+
-+static inline void __of_free_property(struct property *prop) { }
-+
-+static inline void __of_free_tree(struct device_node *node) { }
-+
-+static inline struct property *__of_copy_property(const struct property *prop,
-+		gfp_t flags)
-+{
-+	return NULL;
-+}
-+
-+static inline struct device_node *__of_create_empty_node( const char *name,
-+		const char *type, const char *full_name,
-+		phandle phandle, gfp_t flags)
-+{
-+	return NULL;
-+}
-+
-+static inline struct device_node *__of_find_node_by_full_name(struct device_node *node,
-+		const char *full_name)
-+{
-+	return NULL;
-+}
-+
-+static inline int of_multi_prop_cmp(const struct property *prop, const char *value)
-+{
-+	return -1;
-+}
-+
-+#endif	/* !CONFIG_OF */
-+
- #endif /* _LINUX_OF_H */
--- 
-1.7.10.4
-
diff --git a/patches/not-capebus/0027-OF-Introduce-Device-Tree-resolve-support.patch b/patches/not-capebus/0027-OF-Introduce-Device-Tree-resolve-support.patch
deleted file mode 100644
index 03b25660b7ca3109972ef51c47bbd3105fe7d7fd..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0027-OF-Introduce-Device-Tree-resolve-support.patch
+++ /dev/null
@@ -1,508 +0,0 @@
-From e5f594ca0f48ad8f25e91b67964fceae65baf05b Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Thu, 3 Jan 2013 12:18:25 +0200
-Subject: [PATCH 27/90] OF: Introduce Device Tree resolve support.
-
-Introduce support for dynamic device tree resolution.
-Using it, it is possible to prepare a device tree that's
-been loaded on runtime to be modified and inserted at the kernel
-live tree.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- .../devicetree/dynamic-resolution-notes.txt        |  25 ++
- drivers/of/Kconfig                                 |   9 +
- drivers/of/Makefile                                |   1 +
- drivers/of/resolver.c                              | 394 +++++++++++++++++++++
- include/linux/of.h                                 |  17 +
- 5 files changed, 446 insertions(+)
- create mode 100644 Documentation/devicetree/dynamic-resolution-notes.txt
- create mode 100644 drivers/of/resolver.c
-
-diff --git a/Documentation/devicetree/dynamic-resolution-notes.txt b/Documentation/devicetree/dynamic-resolution-notes.txt
-new file mode 100644
-index 0000000..0b396c4
---- /dev/null
-+++ b/Documentation/devicetree/dynamic-resolution-notes.txt
-@@ -0,0 +1,25 @@
-+Device Tree Dynamic Resolver Notes
-+----------------------------------
-+
-+This document describes the implementation of the in-kernel
-+Device Tree resolver, residing in drivers/of/resolver.c and is a
-+companion document to Documentation/devicetree/dt-object-internal.txt[1]
-+
-+How the resolver works
-+----------------------
-+
-+The resolver is given as an input an arbitrary tree compiled with the
-+proper dtc option and having a /plugin/ tag. This generates the
-+appropriate __fixups__ & __local_fixups__ nodes as described in [1].
-+
-+In sequence the resolver works by the following steps:
-+
-+1. Get the maximum device tree phandle value from the live tree + 1.
-+2. Adjust all the local phandles of the tree to resolve by that amount.
-+3. Using the __local__fixups__ node information adjust all local references
-+   by the same amount.
-+4. For each property in the __fixups__ node locate the node it references
-+   in the live tree. This is the label used to tag the node.
-+5. Retrieve the phandle of the target of the fixup.
-+5. For each fixup in the property locate the node:property:offset location
-+   and replace it with the phandle value.
-diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
-index d37bfcf..f9a6193 100644
---- a/drivers/of/Kconfig
-+++ b/drivers/of/Kconfig
-@@ -83,4 +83,13 @@ config OF_MTD
- 	depends on MTD
- 	def_bool y
- 
-+config OF_RESOLVE
-+	bool "OF Dynamic resolution support"
-+	depends on OF
-+	select OF_DYNAMIC
-+	select OF_DEVICE
-+	help
-+	  Enable OF dynamic resolution support. This allows you to
-+	  load Device Tree object fragments are run time.
-+
- endmenu # OF
-diff --git a/drivers/of/Makefile b/drivers/of/Makefile
-index 3e561a2..19a8593 100644
---- a/drivers/of/Makefile
-+++ b/drivers/of/Makefile
-@@ -11,3 +11,4 @@ obj-$(CONFIG_OF_MDIO)	+= of_mdio.o
- obj-$(CONFIG_OF_PCI)	+= of_pci.o
- obj-$(CONFIG_OF_PCI_IRQ)  += of_pci_irq.o
- obj-$(CONFIG_OF_MTD)	+= of_mtd.o
-+obj-$(CONFIG_OF_RESOLVE)  += resolver.o
-diff --git a/drivers/of/resolver.c b/drivers/of/resolver.c
-new file mode 100644
-index 0000000..016d7da
---- /dev/null
-+++ b/drivers/of/resolver.c
-@@ -0,0 +1,394 @@
-+/*
-+ * Functions for dealing with DT resolution
-+ *
-+ * Copyright (C) 2012 Pantelis Antoniou <panto@antoniou-consulting.com>
-+ * Copyright (C) 2012 Texas Instruments Inc.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * version 2 as published by the Free Software Foundation.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/of.h>
-+#include <linux/of_device.h>
-+#include <linux/of_fdt.h>
-+#include <linux/string.h>
-+#include <linux/ctype.h>
-+#include <linux/errno.h>
-+#include <linux/string.h>
-+#include <linux/slab.h>
-+
-+/**
-+ * Find a subtree's maximum phandle value.
-+ */
-+static phandle __of_get_tree_max_phandle(struct device_node *node,
-+		phandle max_phandle)
-+{
-+	struct device_node *child;
-+
-+	if (node->phandle != 0 && node->phandle != OF_PHANDLE_ILLEGAL &&
-+			node->phandle > max_phandle)
-+		max_phandle = node->phandle;
-+
-+	__for_each_child_of_node(node, child)
-+		max_phandle = __of_get_tree_max_phandle(child, max_phandle);
-+
-+	return max_phandle;
-+}
-+
-+/**
-+ * Find live tree's maximum phandle value.
-+ */
-+static phandle of_get_tree_max_phandle(void)
-+{
-+	struct device_node *node;
-+	phandle phandle;
-+
-+	/* get root node */
-+	node = of_find_node_by_path("/");
-+	if (node == NULL)
-+		return OF_PHANDLE_ILLEGAL;
-+
-+	/* now search recursively */
-+	read_lock(&devtree_lock);
-+	phandle = __of_get_tree_max_phandle(node, 0);
-+	read_unlock(&devtree_lock);
-+
-+	of_node_put(node);
-+
-+	return phandle;
-+}
-+
-+/**
-+ * Adjust a subtree's phandle values by a given delta.
-+ * Makes sure not to just adjust the device node's phandle value,
-+ * but modify the phandle properties values as well.
-+ */
-+static void __of_adjust_tree_phandles(struct device_node *node,
-+		int phandle_delta)
-+{
-+	struct device_node *child;
-+	struct property *prop;
-+	phandle phandle;
-+
-+	/* first adjust the node's phandle direct value */
-+	if (node->phandle != 0 && node->phandle != OF_PHANDLE_ILLEGAL)
-+		node->phandle += phandle_delta;
-+
-+	/* now adjust phandle & linux,phandle values */
-+	for_each_property_of_node(node, prop) {
-+
-+		/* only look for these two */
-+		if (of_prop_cmp(prop->name, "phandle") != 0 &&
-+		    of_prop_cmp(prop->name, "linux,phandle") != 0)
-+			continue;
-+
-+		/* must be big enough */
-+		if (prop->length < 4)
-+			continue;
-+
-+		/* read phandle value */
-+		phandle = be32_to_cpu(*(uint32_t *)prop->value);
-+		if (phandle == OF_PHANDLE_ILLEGAL)	/* unresolved */
-+			continue;
-+
-+		/* adjust */
-+		*(uint32_t *)prop->value = cpu_to_be32(node->phandle);
-+	}
-+
-+	/* now do the children recursively */
-+	__for_each_child_of_node(node, child)
-+		__of_adjust_tree_phandles(child, phandle_delta);
-+}
-+
-+/**
-+ * Adjust the local phandle references by the given phandle delta.
-+ * Assumes the existances of a __local_fixups__ node at the root
-+ * of the tree. Does not take any devtree locks so make sure you
-+ * call this on a tree which is at the detached state.
-+ */
-+static int __of_adjust_tree_phandle_references(struct device_node *node,
-+		int phandle_delta)
-+{
-+	phandle phandle;
-+	struct device_node *refnode, *child;
-+	struct property *rprop, *sprop;
-+	char *propval, *propcur, *propend, *nodestr, *propstr, *s;
-+	int offset, propcurlen;
-+	int err;
-+
-+	/* locate the symbols & fixups nodes on resolve */
-+	__for_each_child_of_node(node, child)
-+		if (of_node_cmp(child->name, "__local_fixups__") == 0)
-+			break;
-+
-+	/* no local fixups */
-+	if (child == NULL)
-+		return 0;
-+
-+	/* find the local fixups property */
-+	for_each_property_of_node(child, rprop) {
-+
-+		/* skip properties added automatically */
-+		if (of_prop_cmp(rprop->name, "name") == 0)
-+			continue;
-+
-+		/* make a copy */
-+		propval = kmalloc(rprop->length, GFP_KERNEL);
-+		if (propval == NULL) {
-+			pr_err("%s: Could not copy value of '%s'\n",
-+					__func__, rprop->name);
-+			return -ENOMEM;
-+		}
-+		memcpy(propval, rprop->value, rprop->length);
-+
-+		propend = propval + rprop->length;
-+		for (propcur = propval; propcur < propend;
-+				propcur += propcurlen + 1) {
-+
-+			propcurlen = strlen(propcur);
-+
-+			nodestr = propcur;
-+			s = strchr(propcur, ':');
-+			if (s == NULL) {
-+				pr_err("%s: Illegal symbol entry '%s' (1)\n",
-+					__func__, propcur);
-+				err = -EINVAL;
-+				goto err_fail;
-+			}
-+			*s++ = '\0';
-+
-+			propstr = s;
-+			s = strchr(s, ':');
-+			if (s == NULL) {
-+				pr_err("%s: Illegal symbol entry '%s' (2)\n",
-+					__func__, (char *)rprop->value);
-+				err = -EINVAL;
-+				goto err_fail;
-+			}
-+
-+			*s++ = '\0';
-+			offset = simple_strtoul(s, NULL, 10);
-+
-+			/* look into the resolve node for the full path */
-+			refnode = __of_find_node_by_full_name(node, nodestr);
-+			if (refnode == NULL) {
-+				pr_warn("%s: Could not find refnode '%s'\n",
-+					__func__, (char *)rprop->value);
-+				continue;
-+			}
-+
-+			/* now find the property */
-+			for_each_property_of_node(refnode, sprop) {
-+				if (of_prop_cmp(sprop->name, propstr) == 0)
-+					break;
-+			}
-+
-+			if (sprop == NULL) {
-+				pr_err("%s: Could not find property '%s'\n",
-+					__func__, (char *)rprop->value);
-+				err = -ENOENT;
-+				goto err_fail;
-+			}
-+
-+			phandle = be32_to_cpu(*(uint32_t *)
-+					(sprop->value + offset));
-+			*(uint32_t *)(sprop->value + offset) =
-+				cpu_to_be32(phandle + phandle_delta);
-+		}
-+
-+		kfree(propval);
-+	}
-+
-+	return 0;
-+
-+err_fail:
-+	kfree(propval);
-+	return err;
-+}
-+
-+/**
-+ * of_resolve	- Resolve the given node against the live tree.
-+ *
-+ * @resolve:	Node to resolve
-+ *
-+ * Perform dynamic Device Tree resolution against the live tree
-+ * to the given node to resolve. This depends on the live tree
-+ * having a __symbols__ node, and the resolve node the __fixups__ &
-+ * __local_fixups__ nodes (if needed).
-+ * The result of the operation is a resolve node that it's contents
-+ * are fit to be inserted or operate upon the live tree.
-+ * Returns 0 on success or a negative error value on error.
-+ */
-+int of_resolve(struct device_node *resolve)
-+{
-+	struct device_node *child, *refnode;
-+	struct device_node *root_sym, *resolve_sym, *resolve_fix;
-+	struct property *rprop, *sprop;
-+	const char *refpath;
-+	char *propval, *propcur, *propend, *nodestr, *propstr, *s;
-+	int offset, propcurlen;
-+	phandle phandle, phandle_delta;
-+	int err;
-+
-+	/* the resolve node must exist, and be detached */
-+	if (resolve == NULL ||
-+			!of_node_check_flag(resolve, OF_DETACHED)) {
-+		return -EINVAL;
-+	}
-+
-+	/* first we need to adjust the phandles */
-+	phandle_delta = of_get_tree_max_phandle() + 1;
-+	__of_adjust_tree_phandles(resolve, phandle_delta);
-+	err = __of_adjust_tree_phandle_references(resolve, phandle_delta);
-+	if (err != 0)
-+		return err;
-+
-+	root_sym = NULL;
-+	resolve_sym = NULL;
-+	resolve_fix = NULL;
-+
-+	/* this may fail (if no fixups are required) */
-+	root_sym = of_find_node_by_path("/__symbols__");
-+
-+	/* locate the symbols & fixups nodes on resolve */
-+	__for_each_child_of_node(resolve, child) {
-+
-+		if (resolve_sym == NULL &&
-+				of_node_cmp(child->name, "__symbols__") == 0)
-+			resolve_sym = child;
-+
-+		if (resolve_fix == NULL &&
-+				of_node_cmp(child->name, "__fixups__") == 0)
-+			resolve_fix = child;
-+
-+		/* both found, don't bother anymore */
-+		if (resolve_sym != NULL && resolve_fix != NULL)
-+			break;
-+	}
-+
-+	/* we do allow for the case where no fixups are needed */
-+	if (resolve_fix == NULL)
-+		goto merge_sym;
-+
-+	/* we need to fixup, but no root symbols... */
-+	if (root_sym == NULL)
-+		return -EINVAL;
-+
-+	for_each_property_of_node(resolve_fix, rprop) {
-+
-+		/* skip properties added automatically */
-+		if (of_prop_cmp(rprop->name, "name") == 0)
-+			continue;
-+
-+		err = of_property_read_string(root_sym,
-+				rprop->name, &refpath);
-+		if (err != 0) {
-+			pr_err("%s: Could not find symbol '%s'\n",
-+					__func__, rprop->name);
-+			goto err_fail;
-+		}
-+
-+		refnode = of_find_node_by_path(refpath);
-+		if (refnode == NULL) {
-+			pr_err("%s: Could not find node by path '%s'\n",
-+					__func__, refpath);
-+			err = -ENOENT;
-+			goto err_fail;
-+		}
-+
-+		phandle = refnode->phandle;
-+		of_node_put(refnode);
-+
-+		pr_debug("%s: %s phandle is 0x%08x\n",
-+				__func__, rprop->name, phandle);
-+
-+		/* make a copy */
-+		propval = kmalloc(rprop->length, GFP_KERNEL);
-+		if (propval == NULL) {
-+			pr_err("%s: Could not copy value of '%s'\n",
-+					__func__, rprop->name);
-+			err = -ENOMEM;
-+			goto err_fail;
-+		}
-+
-+		memcpy(propval, rprop->value, rprop->length);
-+
-+		propend = propval + rprop->length;
-+		for (propcur = propval; propcur < propend;
-+				propcur += propcurlen + 1) {
-+			propcurlen = strlen(propcur);
-+
-+			nodestr = propcur;
-+			s = strchr(propcur, ':');
-+			if (s == NULL) {
-+				pr_err("%s: Illegal symbol "
-+					"entry '%s' (1)\n",
-+					__func__, (char *)rprop->value);
-+				kfree(propval);
-+				err = -EINVAL;
-+				goto err_fail;
-+			}
-+			*s++ = '\0';
-+
-+			propstr = s;
-+			s = strchr(s, ':');
-+			if (s == NULL) {
-+				pr_err("%s: Illegal symbol "
-+					"entry '%s' (2)\n",
-+					__func__, (char *)rprop->value);
-+				kfree(propval);
-+				err = -EINVAL;
-+				goto err_fail;
-+			}
-+
-+			*s++ = '\0';
-+			offset = simple_strtoul(s, NULL, 10);
-+
-+			/* look into the resolve node for the full path */
-+			refnode = __of_find_node_by_full_name(resolve,
-+					nodestr);
-+			if (refnode == NULL) {
-+				pr_err("%s: Could not find refnode '%s'\n",
-+					__func__, (char *)rprop->value);
-+				kfree(propval);
-+				err = -ENOENT;
-+				goto err_fail;
-+			}
-+
-+			/* now find the property */
-+			for_each_property_of_node(refnode, sprop) {
-+				if (of_prop_cmp(sprop->name, propstr) == 0)
-+					break;
-+			}
-+
-+			if (sprop == NULL) {
-+				pr_err("%s: Could not find property '%s'\n",
-+					__func__, (char *)rprop->value);
-+				kfree(propval);
-+				err = -ENOENT;
-+				goto err_fail;
-+			}
-+
-+			*(uint32_t *)(sprop->value + offset) =
-+				cpu_to_be32(phandle);
-+		}
-+
-+		kfree(propval);
-+	}
-+
-+merge_sym:
-+
-+	of_node_put(root_sym);
-+
-+	return 0;
-+
-+err_fail:
-+
-+	if (root_sym != NULL)
-+		of_node_put(root_sym);
-+
-+	return err;
-+}
-diff --git a/include/linux/of.h b/include/linux/of.h
-index c38e41a..ab52243 100644
---- a/include/linux/of.h
-+++ b/include/linux/of.h
-@@ -650,4 +650,21 @@ static inline int of_multi_prop_cmp(const struct property *prop, const char *val
- 
- #endif	/* !CONFIG_OF */
- 
-+
-+/* illegal phandle value (set when unresolved) */
-+#define OF_PHANDLE_ILLEGAL	0xdeadbeef
-+
-+#ifdef CONFIG_OF_RESOLVE
-+
-+int of_resolve(struct device_node *resolve);
-+
-+#else
-+
-+static inline int of_resolve(struct device_node *resolve)
-+{
-+	return -ENOTSUPP;
-+}
-+
-+#endif
-+
- #endif /* _LINUX_OF_H */
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0028-OF-Introduce-DT-overlay-support.patch b/patches/not-capebus/0028-OF-Introduce-DT-overlay-support.patch
deleted file mode 100644
index 2f5498e88bc38f292991f2e66cabeeef04c04173..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0028-OF-Introduce-DT-overlay-support.patch
+++ /dev/null
@@ -1,1189 +0,0 @@
-From ae9fddf9b1380bb0ddb219917e0591c633899d50 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Thu, 3 Jan 2013 12:23:07 +0200
-Subject: [PATCH 28/98] OF: Introduce DT overlay support.
-
-Introduce DT overlay support.
-Using this functionality it is possible to dynamically overlay a part of
-the kernel's tree with another tree that's been dynamically loaded.
-It is also possible to remove node and properties.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- Documentation/devicetree/overlay-notes.txt |  179 ++++++
- drivers/of/Kconfig                         |   10 +
- drivers/of/Makefile                        |    1 +
- drivers/of/overlay.c                       |  830 ++++++++++++++++++++++++++++
- include/linux/of.h                         |  107 ++++
- 5 files changed, 1127 insertions(+)
- create mode 100644 Documentation/devicetree/overlay-notes.txt
- create mode 100644 drivers/of/overlay.c
-
-diff --git a/Documentation/devicetree/overlay-notes.txt b/Documentation/devicetree/overlay-notes.txt
-new file mode 100644
-index 0000000..6b43a28
---- /dev/null
-+++ b/Documentation/devicetree/overlay-notes.txt
-@@ -0,0 +1,179 @@
-+Device Tree Overlay Notes
-+-------------------------
-+
-+This document describes the implementation of the in-kernel
-+device tree overlay functionality residing in drivers/of/overlay.c and is a
-+companion document to Documentation/devicetree/dt-object-internal.txt[1] &
-+Documentation/devicetree/dynamic-resolution-notes.txt[2]
-+
-+How overlays work
-+-----------------
-+
-+A Device Tree's overlay purpose is to modify the kernel's live tree, and
-+have the modification affecting the state of the the kernel in a way that
-+is reflecting the changes.
-+Since the kernel mainly deals with devices, any new device node that result
-+in an active device should have it created while if the device node is either
-+disabled or removed all together, the affected device should be deregistered.
-+
-+Lets take an example where we have a foo board with the following base tree
-+which is taken from [1].
-+
-+---- foo.dts -----------------------------------------------------------------
-+	/* FOO platform */
-+	/ {
-+		compatible = "corp,foo";
-+
-+		/* shared resources */
-+		res: res {
-+		};
-+
-+		/* On chip peripherals */
-+		ocp: ocp {
-+			/* peripherals that are always instantiated */
-+			peripheral1 { ... };
-+		}
-+	};
-+---- foo.dts -----------------------------------------------------------------
-+
-+The overlay bar.dts, when loaded (and resolved as described in [2]) should
-+
-+---- bar.dts -----------------------------------------------------------------
-+/plugin/;	/* allow undefined label references and record them */
-+/ {
-+	....	/* various properties for loader use; i.e. part id etc. */
-+	fragment@0 {
-+		target = <&ocp>;
-+		__overlay__ {
-+			/* bar peripheral */
-+			bar {
-+				compatible = "corp,bar";
-+				... /* various properties and child nodes */
-+			}
-+		};
-+	};
-+};
-+---- bar.dts -----------------------------------------------------------------
-+
-+result in foo+bar.dts
-+
-+---- foo+bar.dts -------------------------------------------------------------
-+	/* FOO platform + bar peripheral */
-+	/ {
-+		compatible = "corp,foo";
-+
-+		/* shared resources */
-+		res: res {
-+		};
-+
-+		/* On chip peripherals */
-+		ocp: ocp {
-+			/* peripherals that are always instantiated */
-+			peripheral1 { ... };
-+
-+			/* bar peripheral */
-+			bar {
-+				compatible = "corp,bar";
-+				... /* various properties and child nodes */
-+			}
-+		}
-+	};
-+---- foo+bar.dts -------------------------------------------------------------
-+
-+As a result of the the overlay, a new device node (bar) has been created
-+so a bar platform device will be registered and if a matching device driver
-+is loaded the device will be created as expected.
-+
-+Overlay in-kernel API
-+---------------------
-+
-+The steps typically required to get an overlay to work are as follows:
-+
-+1. Use of_build_overlay_info() to create an array of initialized and
-+ready to use of_overlay_info structures.
-+2. Call of_overlay() to apply the overlays declared in the array.
-+3. If the overlay needs to be removed, call of_overlay_revert().
-+4. Finally release the memory taken by the overlay info array by
-+of_free_overlay_info().
-+
-+/**
-+ * of_build_overlay_info	- Build an overlay info array
-+ * @tree:	Device node containing all the overlays
-+ * @cntp:	Pointer to where the overlay info count will be help
-+ * @ovinfop:	Pointer to the pointer of an overlay info structure.
-+ *
-+ * Helper function that given a tree containing overlay information,
-+ * allocates and builds an overlay info array containing it, ready
-+ * for use using of_overlay.
-+ *
-+ * Returns 0 on success with the @cntp @ovinfop pointers valid,
-+ * while on error a negative error value is returned.
-+ */
-+int of_build_overlay_info(struct device_node *tree,
-+		int *cntp, struct of_overlay_info **ovinfop);
-+
-+/**
-+ * of_free_overlay_info	- Free an overlay info array
-+ * @count:	Number of of_overlay_info's
-+ * @ovinfo_tab:	Array of overlay_info's to free
-+ *
-+ * Releases the memory of a previously allocate ovinfo array
-+ * by of_build_overlay_info.
-+ * Returns 0, or an error if the arguments are bogus.
-+ */
-+int of_free_overlay_info(int count, struct of_overlay_info *ovinfo_tab);
-+
-+/**
-+ * of_overlay	- Apply @count overlays pointed at by @ovinfo_tab
-+ * @count:	Number of of_overlay_info's
-+ * @ovinfo_tab:	Array of overlay_info's to apply
-+ *
-+ * Applies the overlays given, while handling all error conditions
-+ * appropriately. Either the operation succeeds, or if it fails the
-+ * live tree is reverted to the state before the attempt.
-+ * Returns 0, or an error if the overlay attempt failed.
-+ */
-+int of_overlay(int count, struct of_overlay_info *ovinfo_tab);
-+
-+/**
-+ * of_overlay_revert	- Revert a previously applied overlay
-+ * @count:	Number of of_overlay_info's
-+ * @ovinfo_tab:	Array of overlay_info's to apply
-+ *
-+ * Revert a previous overlay. The state of the live tree
-+ * is reverted to the one before the overlay.
-+ * Returns 0, or an error if the overlay table is not given.
-+ */
-+int of_overlay_revert(int count, struct of_overlay_info *ovinfo_tab);
-+
-+Overlay DTS Format
-+------------------
-+
-+The DTS of an overlay should have the following format:
-+
-+{
-+	/* ignored properties by the overlay */
-+
-+	fragment@0 {	/* first child node */
-+		target=<phandle>;	/* target of the overlay */
-+		__overlay__ {
-+			property-a;	/* add property-a to the target */
-+			-property-b;	/* remove property-b from target */
-+			node-a {	/* add to an existing, or create a node-a */
-+				...
-+			};
-+			-node-b {	/* remove an existing node-b */
-+				...
-+			};
-+		};
-+	}
-+	fragment@1 {	/* second child node */
-+		...
-+	};
-+	/* more fragments follow */
-+}
-+
-+It should be noted that the DT overlay format described is the one expected
-+by the of_build_overlay_info() function, which is a helper function. There
-+is nothing stopping someone coming up with his own DTS format and that will
-+end up filling in the fields of the of_overlay_info array.
-diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
-index f9a6193..964a1c2 100644
---- a/drivers/of/Kconfig
-+++ b/drivers/of/Kconfig
-@@ -92,4 +92,14 @@ config OF_RESOLVE
- 	  Enable OF dynamic resolution support. This allows you to
- 	  load Device Tree object fragments are run time.
- 
-+config OF_OVERLAY
-+	bool "OF overlay support"
-+	depends on OF
-+	select OF_DYNAMIC
-+	select OF_DEVICE
-+	select OF_RESOLVE
-+	help
-+	  OpenFirmware overlay support. Allows you to modify on runtime the
-+	  live tree using overlays.
-+
- endmenu # OF
-diff --git a/drivers/of/Makefile b/drivers/of/Makefile
-index 19a8593..307ceb6 100644
---- a/drivers/of/Makefile
-+++ b/drivers/of/Makefile
-@@ -12,3 +12,4 @@ obj-$(CONFIG_OF_PCI)	+= of_pci.o
- obj-$(CONFIG_OF_PCI_IRQ)  += of_pci_irq.o
- obj-$(CONFIG_OF_MTD)	+= of_mtd.o
- obj-$(CONFIG_OF_RESOLVE)  += resolver.o
-+obj-$(CONFIG_OF_OVERLAY) += overlay.o
-diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
-new file mode 100644
-index 0000000..b5b8841
---- /dev/null
-+++ b/drivers/of/overlay.c
-@@ -0,0 +1,830 @@
-+/*
-+ * Functions for working with device tree overlays
-+ *
-+ * Copyright (C) 2012 Pantelis Antoniou <panto@antoniou-consulting.com>
-+ * Copyright (C) 2012 Texas Instruments Inc.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * version 2 as published by the Free Software Foundation.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/of.h>
-+#include <linux/of_device.h>
-+#include <linux/string.h>
-+#include <linux/ctype.h>
-+#include <linux/errno.h>
-+#include <linux/string.h>
-+#include <linux/slab.h>
-+#include <linux/err.h>
-+
-+/**
-+ * Apply a single overlay node recursively.
-+ *
-+ * Property or node names that start with '-' signal that
-+ * the property/node is to be removed.
-+ *
-+ * All the property notifiers are appropriately called.
-+ * Note that the in case of an error the target node is left
-+ * in a inconsistent state. Error recovery should be performed
-+ * by recording the modification using the of notifiers.
-+ */
-+static int of_overlay_apply_one(struct device_node *target,
-+		const struct device_node *overlay)
-+{
-+	const char *pname, *cname;
-+	struct device_node *child, *tchild;
-+	struct property *prop, *propn, *tprop;
-+	int remove;
-+	char *full_name;
-+	const char *suffix;
-+	int ret;
-+
-+	/* sanity checks */
-+	if (target == NULL || overlay == NULL)
-+		return -EINVAL;
-+
-+	for_each_property_of_node(overlay, prop) {
-+
-+		/* don't touch, 'name' */
-+		if (of_prop_cmp(prop->name, "name") == 0)
-+			continue;
-+
-+		/* default is add */
-+		remove = 0;
-+		pname = prop->name;
-+		if (*pname == '-') {	/* skip, - notes removal */
-+			pname++;
-+			remove = 1;
-+			propn = NULL;
-+		} else {
-+			propn = __of_copy_property(prop,
-+					GFP_KERNEL);
-+			if (propn == NULL)
-+				return -ENOMEM;
-+		}
-+
-+		tprop = of_find_property(target, pname, NULL);
-+
-+		/* found? */
-+		if (tprop != NULL) {
-+			if (propn != NULL)
-+				ret = of_update_property(target, propn);
-+			else
-+				ret = of_remove_property(target, tprop);
-+		} else {
-+			if (propn != NULL)
-+				ret = of_add_property(target, propn);
-+			else
-+				ret = 0;
-+		}
-+		if (ret != 0)
-+			return ret;
-+	}
-+
-+	__for_each_child_of_node(overlay, child) {
-+
-+		/* default is add */
-+		remove = 0;
-+		cname = child->name;
-+		if (*cname == '-') {	/* skip, - notes removal */
-+			cname++;
-+			remove = 1;
-+		}
-+
-+		/* special case for nodes with a suffix */
-+		suffix = strrchr(child->full_name, '@');
-+		if (suffix != NULL) {
-+			cname = kbasename(child->full_name);
-+			WARN_ON(cname == NULL);	/* sanity check */
-+			if (cname == NULL)
-+				continue;
-+			if (*cname == '-')
-+				cname++;
-+		}
-+
-+		tchild = of_get_child_by_name(target, cname);
-+		if (tchild != NULL) {
-+
-+			if (!remove) {
-+
-+				/* apply overlay recursively */
-+				ret = of_overlay_apply_one(tchild, child);
-+				of_node_put(tchild);
-+
-+				if (ret != 0)
-+					return ret;
-+
-+			} else {
-+
-+				ret = of_detach_node(tchild);
-+				of_node_put(tchild);
-+			}
-+
-+		} else {
-+
-+			if (!remove) {
-+				full_name = kasprintf(GFP_KERNEL, "%s/%s",
-+						target->full_name, cname);
-+				if (full_name == NULL)
-+					return -ENOMEM;
-+
-+				/* create empty tree as a target */
-+				tchild = __of_create_empty_node(cname,
-+						child->type, full_name,
-+						child->phandle, GFP_KERNEL);
-+
-+				/* free either way */
-+				kfree(full_name);
-+
-+				if (tchild == NULL)
-+					return -ENOMEM;
-+
-+				/* point to parent */
-+				tchild->parent = target;
-+
-+				ret = of_attach_node(tchild);
-+				if (ret != 0)
-+					return ret;
-+
-+				/* apply the overlay */
-+				ret = of_overlay_apply_one(tchild, child);
-+				if (ret != 0) {
-+					__of_free_tree(tchild);
-+					return ret;
-+				}
-+			}
-+		}
-+	}
-+
-+	return 0;
-+}
-+
-+/**
-+ * Lookup an overlay device entry
-+ */
-+struct of_overlay_device_entry *of_overlay_device_entry_lookup(
-+		struct of_overlay_info *ovinfo, struct device_node *node)
-+{
-+	struct of_overlay_device_entry *re;
-+
-+	/* no need for locks, we're under the ovinfo->lock */
-+	list_for_each_entry(re, &ovinfo->de_list, node) {
-+		if (re->np == node)
-+			return re;
-+	}
-+	return NULL;
-+}
-+
-+/**
-+ * Add an overlay log entry
-+ */
-+static int of_overlay_log_entry_entry_add(struct of_overlay_info *ovinfo,
-+		unsigned long action, struct device_node *dn,
-+		struct property *prop)
-+{
-+	struct of_overlay_log_entry *le;
-+
-+	/* check */
-+	if (ovinfo == NULL || dn == NULL)
-+		return -EINVAL;
-+
-+	le = kzalloc(sizeof(*le), GFP_KERNEL);
-+	if (le == NULL) {
-+		pr_err("%s: Failed to allocate\n", __func__);
-+		return -ENOMEM;
-+	}
-+
-+	/* get a reference to the node */
-+	le->action = action;
-+	le->np = of_node_get(dn);
-+	le->prop = prop;
-+
-+	if (action == OF_RECONFIG_UPDATE_PROPERTY && prop)
-+		le->old_prop = of_find_property(dn, prop->name, NULL);
-+
-+	list_add_tail(&le->node, &ovinfo->le_list);
-+
-+	return 0;
-+}
-+
-+/**
-+ * Add an overlay device entry
-+ */
-+static void of_overlay_device_entry_entry_add(struct of_overlay_info *ovinfo,
-+		struct device_node *node, struct platform_device *pdev,
-+		int state)
-+{
-+	struct of_overlay_device_entry *re;
-+	int fresh;
-+
-+	/* check */
-+	if (ovinfo == NULL)
-+		return;
-+
-+	fresh = 0;
-+	re = of_overlay_device_entry_lookup(ovinfo, node);
-+	if (re == NULL) {
-+		re = kzalloc(sizeof(*re), GFP_KERNEL);
-+		if (re == NULL) {
-+			pr_err("%s: Failed to allocate\n", __func__);
-+			return;
-+		}
-+		fresh = 1;
-+	}
-+
-+	if (re->np == NULL)
-+		re->np = of_node_get(node);
-+	if (re->pdev == NULL)
-+		re->pdev = of_dev_get(pdev);
-+	re->state = state;
-+
-+	if (fresh)
-+		list_add_tail(&re->node, &ovinfo->de_list);
-+}
-+
-+/**
-+ * Overlay OF notifier
-+ *
-+ * Called every time there's a property/node modification
-+ * Every modification causes a log entry addition, while
-+ * any modification that causes a node's state to change
-+ * from/to disabled to/from enabled causes a device entry
-+ * addition.
-+ */
-+static int of_overlay_notify(struct notifier_block *nb,
-+				unsigned long action, void *arg)
-+{
-+#ifdef DEBUG
-+	char *propstr = NULL, *spropstr = NULL;
-+#endif
-+	struct of_overlay_info *ovinfo;
-+	struct device_node *node;
-+	struct property *prop, *sprop, *cprop;
-+	struct of_prop_reconfig *pr;
-+	struct platform_device *pdev;
-+	int state;
-+	int err = 0;
-+
-+	ovinfo = container_of(nb, struct of_overlay_info, notifier);
-+
-+	/* prep vars */
-+	switch (action) {
-+	case OF_RECONFIG_ATTACH_NODE:
-+	case OF_RECONFIG_DETACH_NODE:
-+		node = arg;
-+		if (node == NULL)
-+			return notifier_from_errno(-EINVAL);
-+		prop = NULL;
-+#ifdef DEBUG
-+		propstr = NULL;
-+#endif
-+		break;
-+	case OF_RECONFIG_ADD_PROPERTY:
-+	case OF_RECONFIG_REMOVE_PROPERTY:
-+	case OF_RECONFIG_UPDATE_PROPERTY:
-+		pr = arg;
-+		if (pr == NULL)
-+			return notifier_from_errno(-EINVAL);
-+		node = pr->dn;
-+		if (node == NULL)
-+			return notifier_from_errno(-EINVAL);
-+		prop = pr->prop;
-+		if (prop == NULL)
-+			return notifier_from_errno(-EINVAL);
-+#ifdef DEBUG
-+		propstr = __of_dump_prop(prop);
-+#endif
-+		break;
-+	default:
-+		return notifier_from_errno(0);
-+	}
-+
-+	/* add to the log */
-+	err = of_overlay_log_entry_entry_add(ovinfo, action, node, prop);
-+	if (err != 0)
-+		return notifier_from_errno(err);
-+
-+#ifdef DEBUG
-+	switch (action) {
-+	case OF_RECONFIG_ATTACH_NODE:
-+		pr_debug("ATTACH_NODE: %s\n", node->full_name);
-+		break;
-+	case OF_RECONFIG_DETACH_NODE:
-+		pr_debug("DETACH_NODE: %s\n", node->full_name);
-+		break;
-+	case OF_RECONFIG_ADD_PROPERTY:
-+		pr_debug("ADD_PROP:    %s %s%s\n", node->full_name,
-+				prop->name, propstr);
-+		break;
-+	case OF_RECONFIG_REMOVE_PROPERTY:
-+		pr_debug("REMOVE_PROP: %s %s%s\n", node->full_name,
-+				prop->name, propstr);
-+		break;
-+	case OF_RECONFIG_UPDATE_PROPERTY:
-+		sprop = of_find_property(node, prop->name, NULL);
-+		if (sprop)
-+			spropstr = __of_dump_prop(sprop);
-+		pr_debug("UPDATE_PROP: %s '%s%s' -> '%s%s'\n", node->full_name,
-+				prop->name, spropstr,
-+				prop->name, propstr);
-+		break;
-+
-+	}
-+
-+	/* NULL is fine */
-+	kfree(propstr);
-+	kfree(spropstr);
-+#endif
-+
-+	/* come up with the device entry (if any) */
-+	pdev = NULL;
-+	state = 0;
-+
-+	/* determine the state the node will end up */
-+	switch (action) {
-+	case OF_RECONFIG_ATTACH_NODE:
-+		/* we demand that a compatible node is present */
-+		state = of_find_property(node, "compatible", NULL) &&
-+			of_device_is_available(node);
-+		break;
-+	case OF_RECONFIG_DETACH_NODE:
-+		state = 0;
-+		pdev = of_find_device_by_node(node);
-+		break;
-+	case OF_RECONFIG_ADD_PROPERTY:
-+	case OF_RECONFIG_REMOVE_PROPERTY:
-+	case OF_RECONFIG_UPDATE_PROPERTY:
-+		/* either one cause a change in state */
-+		if (strcmp(prop->name, "status") != 0 &&
-+				strcmp(prop->name, "compatible") != 0)
-+			return notifier_from_errno(0);
-+
-+		if (strcmp(prop->name, "status") == 0) {
-+			/* status */
-+			cprop = of_find_property(node, "compatible", NULL);
-+			sprop = action != OF_RECONFIG_REMOVE_PROPERTY ?
-+				prop : NULL;
-+		} else {
-+			/* compatible */
-+			sprop = of_find_property(node, "status", NULL);
-+			cprop = action != OF_RECONFIG_REMOVE_PROPERTY ?
-+				prop : NULL;
-+		}
-+
-+		state = cprop && cprop->length > 0 &&
-+			    (!sprop || (sprop->length > 0 &&
-+				(strcmp(sprop->value, "okay") == 0 ||
-+				 strcmp(sprop->value, "ok") == 0)));
-+		break;
-+
-+	default:
-+		return notifier_from_errno(0);
-+	}
-+
-+	if (state == 0)
-+		pdev = of_find_device_by_node(node);
-+
-+	of_overlay_device_entry_entry_add(ovinfo, node, pdev, state);
-+
-+	return notifier_from_errno(err);
-+}
-+
-+/**
-+ * Prepare for the overlay, for now it just registers the
-+ * notifier.
-+ */
-+static int of_overlay_prep_one(struct of_overlay_info *ovinfo)
-+{
-+	int err;
-+
-+	err = of_reconfig_notifier_register(&ovinfo->notifier);
-+	if (err != 0) {
-+		pr_err("%s: failed to register notifier for '%s'\n",
-+			__func__, ovinfo->target->full_name);
-+		return err;
-+	}
-+	return 0;
-+}
-+
-+/**
-+ * Revert one overlay
-+ * Either due to an error, or due to normal overlay removal.
-+ * Using the log entries, we revert any change to the live tree.
-+ * In the same manner, using the device entries we enable/disable
-+ * the platform devices appropriately.
-+ */
-+static void of_overlay_revert_one(struct of_overlay_info *ovinfo)
-+{
-+	struct of_overlay_device_entry *re, *ren;
-+	struct of_overlay_log_entry *le, *len;
-+	struct property *prop, **propp;
-+	struct platform_device *pdev, *parent_pdev;
-+	int ret;
-+	unsigned long flags;
-+
-+	if (!ovinfo || !ovinfo->target || !ovinfo->overlay)
-+		return;
-+
-+	pr_debug("%s: Reverting overlay on '%s'\n", __func__,
-+			ovinfo->target->full_name);
-+
-+	/* overlay applied correctly, now create/destroy pdevs */
-+	list_for_each_entry_safe_reverse(re, ren, &ovinfo->de_list, node) {
-+
-+		if (!re->state) {
-+
-+			parent_pdev = of_find_device_by_node(re->np->parent);
-+
-+			pr_debug("%s: creating new platform device "
-+					"new_node='%s' %p\n",
-+					__func__, re->np->full_name, re->np);
-+
-+			pdev = of_platform_device_create(re->np, NULL,
-+					parent_pdev ? &parent_pdev->dev : NULL);
-+			of_dev_put(parent_pdev);
-+
-+			if (pdev == NULL) {
-+				pr_warn("%s: Failed to create platform device "
-+						"for '%s'\n",
-+						__func__, re->np->full_name);
-+			}
-+
-+		} else {
-+
-+			if (re->pdev) {
-+				pr_debug("%s: removing pdev %s\n", __func__,
-+						dev_name(&re->pdev->dev));
-+				platform_device_unregister(re->pdev);
-+			}
-+		}
-+
-+		of_node_put(re->np);
-+
-+		list_del(&re->node);
-+
-+		kfree(re);
-+	}
-+
-+	list_for_each_entry_safe_reverse(le, len, &ovinfo->le_list, node) {
-+
-+		ret = 0;
-+		switch (le->action) {
-+		case OF_RECONFIG_ATTACH_NODE:
-+			pr_debug("Reverting ATTACH_NODE %s\n",
-+					le->np->full_name);
-+			ret = of_detach_node(le->np);
-+			break;
-+
-+		case OF_RECONFIG_DETACH_NODE:
-+			pr_debug("Reverting DETACH_NODE %s\n",
-+					le->np->full_name);
-+			ret = of_attach_node(le->np);
-+			break;
-+
-+		case OF_RECONFIG_ADD_PROPERTY:
-+			pr_debug("Reverting ADD_PROPERTY %s %s\n",
-+					le->np->full_name, le->prop->name);
-+			ret = of_remove_property(le->np, le->prop);
-+			break;
-+
-+		case OF_RECONFIG_REMOVE_PROPERTY:
-+		case OF_RECONFIG_UPDATE_PROPERTY:
-+
-+			pr_debug("Reverting %s_PROPERTY %s %s\n",
-+				le->action == OF_RECONFIG_REMOVE_PROPERTY ?
-+					"REMOVE" : "UPDATE",
-+					le->np->full_name, le->prop->name);
-+
-+			/* property is possibly on deadprops (avoid alloc) */
-+			write_lock_irqsave(&devtree_lock, flags);
-+			prop = le->action == OF_RECONFIG_REMOVE_PROPERTY ?
-+				le->prop : le->old_prop;
-+			propp = &le->np->deadprops;
-+			while (*propp != NULL) {
-+				if (*propp == prop)
-+					break;
-+				propp = &(*propp)->next;
-+			}
-+			if (*propp != NULL) {
-+				/* remove it from deadprops */
-+				(*propp)->next = prop->next;
-+				write_unlock_irqrestore(&devtree_lock, flags);
-+			} else {
-+				write_unlock_irqrestore(&devtree_lock, flags);
-+				/* not found, just make a copy */
-+				prop = __of_copy_property(prop, GFP_KERNEL);
-+				if (prop == NULL) {
-+					pr_err("%s: Failed to copy property\n",
-+							__func__);
-+					break;
-+				}
-+			}
-+
-+			if (le->action == OF_RECONFIG_REMOVE_PROPERTY)
-+				ret = of_add_property(le->np, prop);
-+			else
-+				ret = of_update_property(le->np, prop);
-+			break;
-+
-+		default:
-+			/* nothing */
-+			break;
-+		}
-+
-+		if (ret != 0)
-+			pr_err("%s: revert on node %s Failed!\n",
-+					__func__, le->np->full_name);
-+
-+		of_node_put(le->np);
-+
-+		list_del(&le->node);
-+
-+		kfree(le);
-+	}
-+}
-+
-+/**
-+ * Perform the post overlay work.
-+ *
-+ * We unregister the notifier, and in the case on an error we
-+ * revert the overlay.
-+ * If the overlay applied correctly, we iterare over the device entries
-+ * and create/destroy the platform devices appropriately.
-+ */
-+static int of_overlay_post_one(struct of_overlay_info *ovinfo, int err)
-+{
-+	struct of_overlay_device_entry *re, *ren;
-+	struct platform_device *pdev, *parent_pdev;
-+
-+	of_reconfig_notifier_unregister(&ovinfo->notifier);
-+
-+	if (err != 0) {
-+		/* revert this (possible partially applied) overlay */
-+		of_overlay_revert_one(ovinfo);
-+		return 0;
-+	}
-+
-+	/* overlay applied correctly, now create/destroy pdevs */
-+	list_for_each_entry_safe(re, ren, &ovinfo->de_list, node) {
-+
-+		if (re->state) {
-+
-+			parent_pdev = of_find_device_by_node(re->np->parent);
-+
-+			pr_debug("%s: creating new platform device "
-+					"new_node='%s' %p\n",
-+					__func__, re->np->full_name, re->np);
-+
-+			pdev = of_platform_device_create(re->np, NULL,
-+					parent_pdev ? &parent_pdev->dev : NULL);
-+			of_dev_put(parent_pdev);
-+
-+			if (pdev == NULL) {
-+				pr_warn("%s: Failed to create platform device "
-+						"for '%s'\n",
-+						__func__, re->np->full_name);
-+			}
-+
-+			/* keep it around */
-+			re->pdev = pdev;
-+
-+		} else {
-+
-+			if (re->pdev) {
-+				platform_device_unregister(re->pdev);
-+			}
-+		}
-+	}
-+
-+	return 0;
-+}
-+
-+/**
-+ * of_overlay	- Apply @count overlays pointed at by @ovinfo_tab
-+ * @count:	Number of of_overlay_info's
-+ * @ovinfo_tab:	Array of overlay_info's to apply
-+ *
-+ * Applies the overlays given, while handling all error conditions
-+ * appropriately. Either the operation succeeds, or if it fails the
-+ * live tree is reverted to the state before the attempt.
-+ * Returns 0, or an error if the overlay attempt failed.
-+ */
-+int of_overlay(int count, struct of_overlay_info *ovinfo_tab)
-+{
-+	struct of_overlay_info *ovinfo;
-+	int i, err;
-+
-+	if (!ovinfo_tab)
-+		return -EINVAL;
-+
-+	/* first we apply the overlays atomically */
-+	for (i = 0; i < count; i++) {
-+
-+		ovinfo = &ovinfo_tab[i];
-+
-+		mutex_lock(&ovinfo->lock);
-+
-+		err = of_overlay_prep_one(ovinfo);
-+		if (err == 0)
-+			err = of_overlay_apply_one(ovinfo->target,
-+					ovinfo->overlay);
-+		of_overlay_post_one(ovinfo, err);
-+
-+		mutex_unlock(&ovinfo->lock);
-+
-+		if (err != 0) {
-+			pr_err("%s: overlay failed '%s'\n",
-+				__func__, ovinfo->target->full_name);
-+			goto err_fail;
-+		}
-+	}
-+
-+	return 0;
-+
-+err_fail:
-+	while (--i >= 0) {
-+		ovinfo = &ovinfo_tab[i];
-+
-+		mutex_lock(&ovinfo->lock);
-+		of_overlay_revert_one(ovinfo);
-+		mutex_unlock(&ovinfo->lock);
-+	}
-+
-+	return err;
-+}
-+
-+/**
-+ * of_overlay_revert	- Revert a previously applied overlay
-+ * @count:	Number of of_overlay_info's
-+ * @ovinfo_tab:	Array of overlay_info's to apply
-+ *
-+ * Revert a previous overlay. The state of the live tree
-+ * is reverted to the one before the overlay.
-+ * Returns 0, or an error if the overlay table is not given.
-+ */
-+int of_overlay_revert(int count, struct of_overlay_info *ovinfo_tab)
-+{
-+	struct of_overlay_info *ovinfo;
-+	int i;
-+
-+	if (!ovinfo_tab)
-+		return -EINVAL;
-+
-+	/* revert the overlays in reverse */
-+	for (i = count - 1; i >= 0; i--) {
-+
-+		ovinfo = &ovinfo_tab[i];
-+
-+		mutex_lock(&ovinfo->lock);
-+		of_overlay_revert_one(ovinfo);
-+		mutex_unlock(&ovinfo->lock);
-+
-+	}
-+
-+	return 0;
-+}
-+
-+/**
-+ * of_init_overlay_info	- Initialize a single of_overlay_info structure
-+ * @ovinfo:	Pointer to the overlay info structure to initialize
-+ *
-+ * Initialize a single overlay info structure.
-+ */
-+void of_init_overlay_info(struct of_overlay_info *ovinfo)
-+{
-+	memset(ovinfo, 0, sizeof(ovinfo));
-+	mutex_init(&ovinfo->lock);
-+	INIT_LIST_HEAD(&ovinfo->de_list);
-+	INIT_LIST_HEAD(&ovinfo->le_list);
-+
-+	ovinfo->notifier.notifier_call = of_overlay_notify;
-+}
-+
-+/**
-+ * of_fill_overlay_info	- Fill an overlay info structure
-+ * @info_node:	Device node containing the overlay
-+ * @ovinfo:	Pointer to the overlay info structure to fill
-+ *
-+ * Fills an overlay info structure with the overlay information
-+ * from a device node. This device node must have a target property
-+ * which contains a phandle of the overlay target node, and an
-+ * __overlay__ child node which has the overlay contents.
-+ * Both ovinfo->target & ovinfo->overlay have their references taken.
-+ *
-+ * Returns 0 on success, or a negative error value.
-+ */
-+int of_fill_overlay_info(struct device_node *info_node,
-+		struct of_overlay_info *ovinfo)
-+{
-+	u32 val;
-+	int ret;
-+
-+	if (!info_node || !ovinfo)
-+		return -EINVAL;
-+
-+	ret = of_property_read_u32(info_node, "target", &val);
-+	if (ret != 0)
-+		goto err_fail;
-+
-+	ovinfo->target = of_find_node_by_phandle(val);
-+	if (ovinfo->target == NULL)
-+		goto err_fail;
-+
-+	ovinfo->overlay = of_get_child_by_name(info_node, "__overlay__");
-+	if (ovinfo->overlay == NULL)
-+		goto err_fail;
-+
-+	return 0;
-+
-+err_fail:
-+	of_node_put(ovinfo->target);
-+	of_node_put(ovinfo->overlay);
-+
-+	memset(ovinfo, 0, sizeof(*ovinfo));
-+	return -EINVAL;
-+}
-+
-+/**
-+ * of_build_overlay_info	- Build an overlay info array
-+ * @tree:	Device node containing all the overlays
-+ * @cntp:	Pointer to where the overlay info count will be help
-+ * @ovinfop:	Pointer to the pointer of an overlay info structure.
-+ *
-+ * Helper function that given a tree containing overlay information,
-+ * allocates and builds an overlay info array containing it, ready
-+ * for use using of_overlay.
-+ *
-+ * Returns 0 on success with the @cntp @ovinfop pointers valid,
-+ * while on error a negative error value is returned.
-+ */
-+int of_build_overlay_info(struct device_node *tree,
-+		int *cntp, struct of_overlay_info **ovinfop)
-+{
-+	struct device_node *node;
-+	struct of_overlay_info *ovinfo;
-+	int cnt, err;
-+
-+	if (tree == NULL || cntp == NULL || ovinfop == NULL)
-+		return -EINVAL;
-+
-+	/* worst case; every child is a node */
-+	cnt = 0;
-+	for_each_child_of_node(tree, node)
-+		cnt++;
-+
-+	ovinfo = kzalloc(cnt * sizeof(*ovinfo), GFP_KERNEL);
-+	if (ovinfo == NULL)
-+		return -ENOMEM;
-+
-+	cnt = 0;
-+	for_each_child_of_node(tree, node) {
-+
-+		of_init_overlay_info(&ovinfo[cnt]);
-+		err = of_fill_overlay_info(node, &ovinfo[cnt]);
-+		if (err == 0)
-+			cnt++;
-+	}
-+
-+	/* if nothing filled, return error */
-+	if (cnt == 0) {
-+		kfree(ovinfo);
-+		return -ENODEV;
-+	}
-+
-+	*cntp = cnt;
-+	*ovinfop = ovinfo;
-+
-+	return 0;
-+}
-+
-+/**
-+ * of_free_overlay_info	- Free an overlay info array
-+ * @count:	Number of of_overlay_info's
-+ * @ovinfo_tab:	Array of overlay_info's to free
-+ *
-+ * Releases the memory of a previously allocate ovinfo array
-+ * by of_build_overlay_info.
-+ * Returns 0, or an error if the arguments are bogus.
-+ */
-+int of_free_overlay_info(int count, struct of_overlay_info *ovinfo_tab)
-+{
-+	struct of_overlay_info *ovinfo;
-+	int i;
-+
-+	if (!ovinfo_tab || count < 0)
-+		return -EINVAL;
-+
-+	/* do it in reverse */
-+	for (i = count - 1; i >= 0; i--) {
-+		ovinfo = &ovinfo_tab[i];
-+
-+		of_node_put(ovinfo->target);
-+		of_node_put(ovinfo->overlay);
-+	}
-+	kfree(ovinfo_tab);
-+
-+	return 0;
-+}
-diff --git a/include/linux/of.h b/include/linux/of.h
-index ab52243..8a908f0 100644
---- a/include/linux/of.h
-+++ b/include/linux/of.h
-@@ -667,4 +667,111 @@ static inline int of_resolve(struct device_node *resolve)
- 
- #endif
- 
-+/**
-+ * Overlay support
-+ */
-+
-+/**
-+ * struct of_overlay_log_entry	- Holds a DT log entry
-+ * @node:	list_head for the log list
-+ * @action:	notifier action
-+ * @np:		pointer to the device node affected
-+ * @prop:	pointer to the property affected
-+ * @old_prop:	hold a pointer to the original property
-+ *
-+ * Every modification of the device tree during application of the
-+ * overlay is held in a list of of_overlay_log_entry structures.
-+ * That way we can recover from a partial application, or we can
-+ * revert the overlay properly.
-+ */
-+struct of_overlay_log_entry {
-+	struct list_head node;
-+	unsigned long action;
-+	struct device_node *np;
-+	struct property *prop;
-+	struct property *old_prop;
-+};
-+
-+/**
-+ * struct of_overlay_device_entry	- Holds an overlay device entry
-+ * @node:	list_head for the device list
-+ * @np:		device node pointer to the device node affected
-+ * @pdev:	pointer to the platform device affected
-+ * @state:	new device state
-+ *
-+ * When the overlay results in a device node's state to change this
-+ * fact is recorded in a list of device entries. After the overlay
-+ * is applied we can create/destroy the platform devices according
-+ * to the new state of the live tree.
-+ */
-+struct of_overlay_device_entry {
-+	struct list_head node;
-+	struct device_node *np;
-+	struct platform_device *pdev;
-+	int state;
-+};
-+
-+/**
-+ * struct of_overlay_info	- Holds a single overlay info
-+ * @target:	target of the overlay operation
-+ * @overlay:	pointer to the overlay contents node
-+ * @lock:	Lock to hold when accessing the lists
-+ * @le_list:	List of the overlay logs
-+ * @de_list:	List of the overlay records
-+ * @notifier:	of reconfiguration notifier
-+ *
-+ * Holds a single overlay state, including all the overlay logs &
-+ * records.
-+ */
-+struct of_overlay_info {
-+	struct device_node *target;
-+	struct device_node *overlay;
-+	struct mutex lock;
-+	struct list_head le_list;
-+	struct list_head de_list;
-+	struct notifier_block notifier;
-+};
-+
-+#ifdef CONFIG_OF_OVERLAY
-+
-+int of_overlay(int count, struct of_overlay_info *ovinfo_tab);
-+int of_overlay_revert(int count, struct of_overlay_info *ovinfo_tab);
-+
-+int of_fill_overlay_info(struct device_node *info_node,
-+		struct of_overlay_info *ovinfo);
-+int of_build_overlay_info(struct device_node *tree,
-+		int *cntp, struct of_overlay_info **ovinfop);
-+int of_free_overlay_info(int cnt, struct of_overlay_info *ovinfo);
-+
-+#else
-+
-+static inline int of_overlay(int count, struct of_overlay_info *ovinfo_tab)
-+{
-+	return -ENOTSUPP;
-+}
-+
-+static inline int of_overlay_revert(int count, struct of_overlay_info *ovinfo_tab)
-+{
-+	return -ENOTSUPP;
-+}
-+
-+static inline int of_fill_overlay_info(struct device_node *info_node,
-+		struct of_overlay_info *ovinfo)
-+{
-+	return -ENOTSUPP;
-+}
-+
-+static inline int of_build_overlay_info(struct device_node *tree,
-+		int *cntp, struct of_overlay_info **ovinfop)
-+{
-+	return -ENOTSUPP;
-+}
-+
-+int of_free_overlay_info(int cnt, struct of_overlay_info *ovinfo)
-+{
-+	return -ENOTSUPP;
-+}
-+
-+#endif
-+
- #endif /* _LINUX_OF_H */
--- 
-1.7.10.4
-
diff --git a/patches/not-capebus/0029-capemgr-Capemgr-makefiles-and-Kconfig-fragments.patch b/patches/not-capebus/0029-capemgr-Capemgr-makefiles-and-Kconfig-fragments.patch
deleted file mode 100644
index cc48120c10b1e57d930a24ee5a52ddee4d618006..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0029-capemgr-Capemgr-makefiles-and-Kconfig-fragments.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From 229e22482a3cd525057f793f5dee6ba2bd68531a Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 28 Dec 2012 20:56:48 +0200
-Subject: [PATCH 29/90] capemgr: Capemgr makefiles and Kconfig fragments.
-
-Introduce a cape loader using DT overlays and dynamic
-DT objects.
-
-Makefile and Kconfig fragments.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/mach-omap2/Kconfig           |  2 ++
- drivers/misc/Kconfig                  |  2 ++
- drivers/misc/Makefile                 |  1 +
- drivers/misc/cape/Kconfig             |  5 +++++
- drivers/misc/cape/Makefile            |  5 +++++
- drivers/misc/cape/beaglebone/Kconfig  | 18 ++++++++++++++++++
- drivers/misc/cape/beaglebone/Makefile |  6 ++++++
- 7 files changed, 39 insertions(+)
- create mode 100644 drivers/misc/cape/Kconfig
- create mode 100644 drivers/misc/cape/Makefile
- create mode 100644 drivers/misc/cape/beaglebone/Kconfig
- create mode 100644 drivers/misc/cape/beaglebone/Makefile
-
-diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
-index 9cbbd2b..d8486c8 100644
---- a/arch/arm/mach-omap2/Kconfig
-+++ b/arch/arm/mach-omap2/Kconfig
-@@ -18,6 +18,8 @@ config ARCH_OMAP2PLUS_TYPICAL
- 	select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4
- 	select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4
- 	select VFP
-+	select OF_OVERLAY
-+	select OF_RESOLVE
- 	help
- 	  Compile a kernel suitable for booting most boards
- 
-diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
-index cd43cbd..a0f75af 100644
---- a/drivers/misc/Kconfig
-+++ b/drivers/misc/Kconfig
-@@ -513,4 +513,6 @@ source "drivers/misc/lis3lv02d/Kconfig"
- source "drivers/misc/carma/Kconfig"
- source "drivers/misc/altera-stapl/Kconfig"
- source "drivers/misc/mei/Kconfig"
-+source "drivers/misc/cape/Kconfig"
-+
- endmenu
-diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
-index 661d093..f063b90 100644
---- a/drivers/misc/Makefile
-+++ b/drivers/misc/Makefile
-@@ -50,3 +50,4 @@ obj-$(CONFIG_USB_SWITCH_FSA9480) += fsa9480.o
- obj-$(CONFIG_ALTERA_STAPL)	+=altera-stapl/
- obj-$(CONFIG_INTEL_MEI)		+= mei/
- obj-$(CONFIG_GPEVT)		+= gpevt.o
-+obj-y				+= cape/
-diff --git a/drivers/misc/cape/Kconfig b/drivers/misc/cape/Kconfig
-new file mode 100644
-index 0000000..a2ef85e
---- /dev/null
-+++ b/drivers/misc/cape/Kconfig
-@@ -0,0 +1,5 @@
-+#
-+# Capes
-+#
-+
-+source "drivers/misc/cape/beaglebone/Kconfig"
-diff --git a/drivers/misc/cape/Makefile b/drivers/misc/cape/Makefile
-new file mode 100644
-index 0000000..7c4eb96
---- /dev/null
-+++ b/drivers/misc/cape/Makefile
-@@ -0,0 +1,5 @@
-+#
-+# Makefile for cape like devices
-+#
-+
-+obj-y				+= beaglebone/
-diff --git a/drivers/misc/cape/beaglebone/Kconfig b/drivers/misc/cape/beaglebone/Kconfig
-new file mode 100644
-index 0000000..ebeedce
---- /dev/null
-+++ b/drivers/misc/cape/beaglebone/Kconfig
-@@ -0,0 +1,18 @@
-+#
-+# Beaglebone capes
-+#
-+
-+config CAPE_BEAGLEBONE
-+	tristate "Beaglebone cape support"
-+	depends on ARCH_OMAP2PLUS && OF && I2C
-+	default n
-+	select OF_PLUGIN
-+	help
-+	  Say Y here to include support for beaglebone capes
-+
-+config CAPE_BEAGLEBONE_GEIGER
-+	tristate "Beaglebone Geiger Cape"
-+	depends on CAPE_BEAGLEBONE
-+	default n
-+	help
-+	  Say Y here to include support for the Geiger Cape
-diff --git a/drivers/misc/cape/beaglebone/Makefile b/drivers/misc/cape/beaglebone/Makefile
-new file mode 100644
-index 0000000..b79ace4
---- /dev/null
-+++ b/drivers/misc/cape/beaglebone/Makefile
-@@ -0,0 +1,6 @@
-+#
-+# Makefile for beaglebone capes
-+#
-+
-+obj-$(CONFIG_CAPE_BEAGLEBONE)		+= capemgr.o
-+obj-$(CONFIG_CAPE_BEAGLEBONE_GEIGER)	+= cape-bone-geiger.o
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0030-capemgr-Beaglebone-capemanager.patch b/patches/not-capebus/0030-capemgr-Beaglebone-capemanager.patch
deleted file mode 100644
index 34c4df572f85094111d48f306d77b80ca5529682..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0030-capemgr-Beaglebone-capemanager.patch
+++ /dev/null
@@ -1,1859 +0,0 @@
-From d4d8d69fc75709e5986d375f30f062f6b458deec Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 28 Dec 2012 21:00:31 +0200
-Subject: [PATCH 30/90] capemgr: Beaglebone capemanager
-
-A cape loader based on DT overlays and DT objects.
-
-Beaglebone cape manager implementation.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/misc/cape/beaglebone/capemgr.c | 1835 ++++++++++++++++++++++++++++++++
- 1 file changed, 1835 insertions(+)
- create mode 100644 drivers/misc/cape/beaglebone/capemgr.c
-
-diff --git a/drivers/misc/cape/beaglebone/capemgr.c b/drivers/misc/cape/beaglebone/capemgr.c
-new file mode 100644
-index 0000000..651f48d
---- /dev/null
-+++ b/drivers/misc/cape/beaglebone/capemgr.c
-@@ -0,0 +1,1835 @@
-+/*
-+ * TI Beaglebone cape controller
-+ *
-+ * Copyright (C) 2012 Pantelis Antoniou <panto@antoniou-consulting.com>
-+ * Copyright (C) 2012 Texas Instruments Inc.
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/delay.h>
-+#include <linux/i2c.h>
-+#include <linux/err.h>
-+#include <linux/interrupt.h>
-+#include <linux/completion.h>
-+#include <linux/platform_device.h>
-+#include <linux/clk.h>
-+#include <linux/io.h>
-+#include <linux/of.h>
-+#include <linux/of_i2c.h>
-+#include <linux/of_device.h>
-+#include <linux/of_fdt.h>
-+#include <linux/slab.h>
-+#include <linux/pm_runtime.h>
-+#include <linux/pinctrl/consumer.h>
-+#include <linux/firmware.h>
-+#include <linux/err.h>
-+#include <linux/ctype.h>
-+#include <linux/string.h>
-+#include <linux/memory.h>
-+#include <linux/i2c.h>
-+#include <linux/i2c/eeprom.h>
-+#include <linux/kthread.h>
-+
-+/* extra command line overrides */
-+static char *extra_override = NULL;
-+module_param(extra_override, charp, 0444);
-+
-+struct bone_capemgr_info;
-+
-+struct slot_ee_attribute {
-+	struct device_attribute devattr;
-+	unsigned int field;
-+	struct bone_cape_slot *slot;	/* this is filled when instantiated */
-+};
-+#define to_slot_ee_attribute(x) \
-+	container_of((x), struct slot_ee_attribute, devattr)
-+
-+struct bbrd_ee_attribute {
-+	struct device_attribute devattr;
-+	unsigned int field;
-+};
-+#define to_bbrd_ee_attribute(x) \
-+	container_of((x), struct bbrd_ee_attribute, devattr)
-+
-+struct bone_cape_slot {
-+	struct list_head	node;
-+	struct bone_capemgr_info *info;
-+	int			slotno;
-+	u32			eeprom_handle;
-+	int			eeprom_addr;
-+	struct i2c_client	*client;
-+	struct memory_accessor	*macc;
-+	unsigned int		probed : 1;
-+	unsigned int		probe_failed : 1;
-+	unsigned int		override : 1;
-+	char			text_id[256];
-+	char			signature[256];
-+	/* quick access */
-+	char			board_name[32+1];
-+	char 			version[4+1];
-+	char 			manufacturer[16+1];
-+	char 			part_number[16+1];
-+
-+	/* attribute group */
-+	char			*ee_attr_name;
-+	int			ee_attrs_count;
-+	struct slot_ee_attribute *ee_attrs;
-+	struct attribute	**ee_attrs_tab;
-+	struct attribute_group	attrgroup;
-+
-+	unsigned int		loading : 1;
-+	unsigned int		loaded : 1;
-+	char			*dtbo;
-+	const struct firmware	*fw;
-+	struct device_node	*overlay;
-+	int			ovinfo_cnt;
-+	struct of_overlay_info	*ovinfo;
-+
-+	/* loader thread */
-+	struct task_struct	*loader_thread;
-+};
-+
-+struct bone_capemap {
-+	struct list_head node;
-+	char *part_number;
-+	struct device_node *map_node;
-+};
-+
-+struct bone_baseboard {
-+
-+	/* from the matched boardmap node */
-+	char			*compatible_name;
-+
-+	/* filled in by reading the eeprom */
-+	char			signature[256];
-+	char			text_id[64+1];
-+
-+	/* quick access */
-+	char			board_name[8+1];
-+	char 			revision[4+1];
-+	char 			serial_number[12+1];
-+
-+	/* access to the eeprom */
-+	u32			eeprom_handle;
-+	int			eeprom_addr;
-+	struct i2c_client	*client;
-+	struct memory_accessor	*macc;
-+	unsigned int		probed : 1;
-+	unsigned int		probe_failed : 1;
-+	unsigned int		override : 1;
-+};
-+
-+struct bone_capemgr_info {
-+	struct platform_device	*pdev;
-+
-+	atomic_t next_slot_nr;
-+	struct list_head	slot_list;
-+	struct mutex		slots_list_mutex;
-+
-+	int capemaps_nr;
-+	struct list_head	capemap_list;
-+	struct mutex		capemap_mutex;
-+
-+	/* baseboard EEPROM data */
-+	struct bone_baseboard	baseboard;
-+};
-+
-+static int bone_slot_fill_override(struct bone_cape_slot *slot,
-+		struct device_node *node,
-+		const char *part_number, const char *version);
-+static struct bone_cape_slot *bone_capemgr_add_slot(
-+		struct bone_capemgr_info *info, struct device_node *node,
-+		const char *part_number, const char *version);
-+static int bone_capemgr_load(struct bone_cape_slot *slot);
-+static int bone_capemgr_unload(struct bone_cape_slot *slot);
-+
-+/* baseboard EEPROM field definition */
-+#define BBRD_EE_FIELD_HEADER		0
-+#define BBRD_EE_FIELD_BOARD_NAME	1
-+#define BBRD_EE_FIELD_REVISION		2
-+#define BBRD_EE_FIELD_SERIAL_NUMBER	3
-+#define BBRD_EE_FIELD_CONFIG_OPTION	4
-+#define BBRD_EE_FILED_RSVD1		5
-+#define BBRD_EE_FILED_RSVD2		6
-+#define BBRD_EE_FILED_RSVD3		7
-+
-+/* cape EEPROM field definitions */
-+#define CAPE_EE_FIELD_HEADER		0
-+#define CAPE_EE_FIELD_EEPROM_REV	1
-+#define CAPE_EE_FIELD_BOARD_NAME	2
-+#define CAPE_EE_FIELD_VERSION		3
-+#define CAPE_EE_FIELD_MANUFACTURER	4
-+#define CAPE_EE_FIELD_PART_NUMBER	5
-+#define CAPE_EE_FIELD_NUMBER_OF_PINS	6
-+#define CAPE_EE_FIELD_SERIAL_NUMBER	7
-+#define CAPE_EE_FIELD_PIN_USAGE		8
-+#define CAPE_EE_FIELD_VDD_3V3EXP	9
-+#define CAPE_EE_FIELD_VDD_5V		10
-+#define CAPE_EE_FIELD_SYS_5V		11
-+#define CAPE_EE_FIELD_DC_SUPPLIED	12
-+#define CAPE_EE_FIELD_FIELDS_NR		13
-+
-+#define EE_FIELD_MAKE_HEADER(p)	\
-+	({ \
-+		const u8 *_p = (p); \
-+		(((u32)_p[0] << 24) | ((u32)_p[1] << 16) | \
-+		( (u32)_p[2] <<  8) |  (u32)_p[3]      ); \
-+	})
-+
-+#define EE_FIELD_HEADER_VALID	0xaa5533ee
-+
-+struct ee_field {
-+	const char 	*name;
-+	int 		start;
-+	int		size;
-+	unsigned int	ascii : 1;
-+	unsigned int	strip_trailing_dots : 1;
-+	const char	*override;
-+};
-+
-+/* baseboard EEPROM definitions */
-+static const struct ee_field bbrd_sig_fields[] = {
-+	[BBRD_EE_FIELD_HEADER] = {
-+		.name		= "header",
-+		.start		= 0,
-+		.size		= 4,
-+		.ascii		= 0,
-+		.override	= "\xaa\x55\x33\xee",	/* AA 55 33 EE */
-+	},
-+	[BBRD_EE_FIELD_BOARD_NAME] = {
-+		.name		= "board-name",
-+		.start		= 4,
-+		.size		= 8,
-+		.ascii		= 1,
-+		.strip_trailing_dots = 1,
-+		.override	= "Board Name",
-+	},
-+	[BBRD_EE_FIELD_REVISION] = {
-+		.name		= "revision",
-+		.start		= 12,
-+		.size		= 4,
-+		.ascii		= 1,
-+		.override	= "00A0",
-+	},
-+	[BBRD_EE_FIELD_SERIAL_NUMBER] = {
-+		.name		= "serial-number",
-+		.start		= 16,
-+		.size		= 12,
-+		.ascii		= 1,
-+		.override	= "0000000000",
-+	},
-+	[BBRD_EE_FIELD_CONFIG_OPTION] = {
-+		.name		= "config-option",
-+		.start		= 28,
-+		.size		= 32,
-+	},
-+};
-+
-+/* cape EEPROM definitions */
-+static const struct ee_field cape_sig_fields[] = {
-+	[CAPE_EE_FIELD_HEADER] = {
-+		.name		= "header",
-+		.start		= 0,
-+		.size		= 4,
-+		.ascii		= 0,
-+		.override	= "\xaa\x55\x33\xee",	/* AA 55 33 EE */
-+	},
-+	[CAPE_EE_FIELD_EEPROM_REV] = {
-+		.name		= "eeprom-format-revision",
-+		.start		= 4,
-+		.size		= 2,
-+		.ascii		= 1,
-+		.override	= "A0",
-+	},
-+	[CAPE_EE_FIELD_BOARD_NAME] = {
-+		.name		= "board-name",
-+		.start		= 6,
-+		.size		= 32,
-+		.ascii		= 1,
-+		.strip_trailing_dots = 1,
-+		.override	= "Override Board Name",
-+	},
-+	[CAPE_EE_FIELD_VERSION] = {
-+		.name		= "version",
-+		.start		= 38,
-+		.size		= 4,
-+		.ascii		= 1,
-+		.override	= "00A0",
-+	},
-+	[CAPE_EE_FIELD_MANUFACTURER] = {
-+		.name		= "manufacturer",
-+		.start		= 42,
-+		.size		= 16,
-+		.ascii		= 1,
-+		.strip_trailing_dots = 1,
-+		.override	= "Override Manuf",
-+	},
-+	[CAPE_EE_FIELD_PART_NUMBER] = {
-+		.name		= "part-number",
-+		.start		= 58,
-+		.size		= 16,
-+		.ascii		= 1,
-+		.strip_trailing_dots = 1,
-+		.override	= "Override Part#",
-+	},
-+	[CAPE_EE_FIELD_NUMBER_OF_PINS] = {
-+		.name		= "number-of-pins",
-+		.start		= 74,
-+		.size		= 2,
-+		.ascii		= 0,
-+		.override	= NULL,
-+	},
-+	[CAPE_EE_FIELD_SERIAL_NUMBER] = {
-+		.name		= "serial-number",
-+		.start		= 76,
-+		.size		= 12,
-+		.ascii		= 1,
-+		.override	= "0000000000",
-+	},
-+	[CAPE_EE_FIELD_PIN_USAGE] = {
-+		.name		= "pin-usage",
-+		.start		= 88,
-+		.size		= 140,
-+		.ascii		= 0,
-+		.override	= NULL,
-+	},
-+	[CAPE_EE_FIELD_VDD_3V3EXP] = {
-+		.name		= "vdd-3v3exp",
-+		.start		= 228,
-+		.size		= 2,
-+		.ascii		= 0,
-+		.override	= NULL,
-+	},
-+	[CAPE_EE_FIELD_VDD_5V] = {
-+		.name		= "vdd-5v",
-+		.start		= 230,
-+		.size		= 2,
-+		.ascii		= 0,
-+		.override	= NULL,
-+	},
-+	[CAPE_EE_FIELD_SYS_5V] = {
-+		.name		= "sys-5v",
-+		.start		= 232,
-+		.size		= 2,
-+		.ascii		= 0,
-+		.override	= NULL,
-+	},
-+	[CAPE_EE_FIELD_DC_SUPPLIED] = {
-+		.name		= "dc-supplied",
-+		.start		= 234,
-+		.size		= 2,
-+		.ascii		= 0,
-+		.override	= NULL,
-+	},
-+};
-+
-+static char *ee_field_get(const struct ee_field *sig_field,
-+		const void *data, int field, char *buf, int bufsz)
-+{
-+	int len;
-+
-+	/* enough space? */
-+	if (bufsz < sig_field->size + sig_field->ascii)
-+		return NULL;
-+
-+	memcpy(buf, (char *)data + sig_field->start, sig_field->size);
-+
-+	/* terminate ascii field */
-+	if (sig_field->ascii)
-+		buf[sig_field->size] = '\0';;
-+
-+	if (sig_field->strip_trailing_dots) {
-+		len = strlen(buf);
-+		while (len > 1 && buf[len - 1] == '.')
-+			buf[--len] = '\0';
-+	}
-+
-+	return buf;
-+}
-+
-+char *bbrd_ee_field_get(const void *data,
-+		int field, char *buf, int bufsz)
-+{
-+	if ((unsigned int)field >= ARRAY_SIZE(bbrd_sig_fields))
-+		return NULL;
-+
-+	return ee_field_get(&bbrd_sig_fields[field], data, field, buf, bufsz);
-+}
-+
-+char *cape_ee_field_get(const void *data,
-+		int field, char *buf, int bufsz)
-+{
-+	if ((unsigned int)field >= ARRAY_SIZE(cape_sig_fields))
-+		return NULL;
-+
-+	return ee_field_get(&cape_sig_fields[field], data, field, buf, bufsz);
-+}
-+
-+#ifdef CONFIG_OF
-+static const struct of_device_id bone_capemgr_of_match[] = {
-+	{
-+		.compatible = "ti,bone-capemgr",
-+	},
-+	{ },
-+};
-+MODULE_DEVICE_TABLE(of, bone_capemgr_of_match);
-+
-+#endif
-+
-+static int bone_baseboard_scan(struct bone_baseboard *bbrd)
-+{
-+	struct bone_capemgr_info *info = container_of(bbrd,
-+			struct bone_capemgr_info, baseboard);
-+	struct memory_accessor *macc = bbrd->macc;
-+	const u8 *p;
-+	int i, r;
-+
-+	/* need to read EEPROM? */
-+	if (bbrd->probed)
-+		goto bbrd_fail_check;
-+
-+	bbrd->probed = 1;
-+
-+	if (!bbrd->override) {
-+
-+		if (macc == NULL || macc->read == NULL) {
-+			dev_err(&info->pdev->dev,
-+				"bone: No memory accessor for baseboard\n");
-+			return -ENODEV;
-+		}
-+
-+		for (i = 0; i < 10; i++) {
-+
-+			/* perform read */
-+			r = macc->read(macc, bbrd->signature,
-+					0, sizeof(bbrd->signature));
-+
-+			if (r == sizeof(bbrd->signature))
-+				break;
-+
-+			dev_info(&info->pdev->dev,
-+				"bone: scan failed (%d time)\n", i + 1);
-+
-+			msleep(500);
-+		}
-+
-+		if (i >= 10) {
-+			bbrd->probe_failed = 1;
-+			return r >= 0 ? -EINVAL : r;
-+		}
-+
-+	} else
-+		dev_info(&info->pdev->dev,
-+			"bone: Using override eeprom data for baseboard\n");
-+
-+	p = bbrd->signature;
-+	if (EE_FIELD_MAKE_HEADER(p) != EE_FIELD_HEADER_VALID) {
-+		dev_err(&info->pdev->dev, "bone: Invalid signature "
-+			"'%08x' at baseboard\n",
-+			EE_FIELD_MAKE_HEADER(p));
-+		bbrd->probe_failed = 1;
-+		return -ENODEV;
-+	}
-+
-+	bbrd_ee_field_get(bbrd->signature,
-+			BBRD_EE_FIELD_BOARD_NAME,
-+			bbrd->board_name, sizeof(bbrd->board_name));
-+	bbrd_ee_field_get(bbrd->signature,
-+			BBRD_EE_FIELD_REVISION,
-+			bbrd->revision, sizeof(bbrd->revision));
-+	bbrd_ee_field_get(bbrd->signature,
-+			BBRD_EE_FIELD_SERIAL_NUMBER,
-+			bbrd->serial_number, sizeof(bbrd->serial_number));
-+
-+	/* board_name,version,manufacturer,part_number */
-+	snprintf(bbrd->text_id, sizeof(bbrd->text_id) - 1,
-+			"%s,%s,%s", bbrd->board_name, bbrd->revision,
-+			bbrd->serial_number);
-+
-+	/* terminate always */
-+	bbrd->text_id[sizeof(bbrd->text_id) - 1] = '\0';
-+
-+bbrd_fail_check:
-+	/* bbrd has failed and we don't support hotpluging */
-+	if (bbrd->probe_failed)
-+		return -ENODEV;
-+
-+	return 0;
-+}
-+
-+static int bone_slot_scan(struct bone_cape_slot *slot)
-+{
-+	struct bone_capemgr_info *info = slot->info;
-+	struct memory_accessor *macc = slot->macc;
-+	const u8 *p;
-+	int r;
-+
-+	/* need to read EEPROM? */
-+	if (slot->probed)
-+		goto slot_fail_check;
-+
-+	slot->probed = 1;
-+
-+	if (!slot->override) {
-+
-+		if (macc == NULL || macc->read == NULL) {
-+			dev_err(&info->pdev->dev,
-+				"bone: No memory accessor for slot %d\n",
-+				slot->slotno);
-+			return -ENODEV;
-+		}
-+
-+		/* perform read */
-+		r = macc->read(macc, slot->signature,
-+				0, sizeof(slot->signature));
-+
-+		if (r != sizeof(slot->signature)) {
-+			slot->probe_failed = 1;
-+			return r >= 0 ? -EINVAL : r;
-+		}
-+	} else
-+		dev_info(&info->pdev->dev,
-+			"bone: Using override eeprom data at slot %d\n",
-+			slot->slotno);
-+
-+	p = slot->signature;
-+	if (EE_FIELD_MAKE_HEADER(p) != EE_FIELD_HEADER_VALID) {
-+		dev_err(&info->pdev->dev, "bone: Invalid signature "
-+			"'%08x' at slot %d\n",
-+			EE_FIELD_MAKE_HEADER(p),
-+			slot->slotno);
-+		slot->probe_failed = 1;
-+		return -ENODEV;
-+	}
-+
-+	cape_ee_field_get(slot->signature,
-+			CAPE_EE_FIELD_BOARD_NAME,
-+			slot->board_name, sizeof(slot->board_name));
-+	cape_ee_field_get(slot->signature,
-+			CAPE_EE_FIELD_VERSION,
-+			slot->version, sizeof(slot->version));
-+	cape_ee_field_get(slot->signature,
-+			CAPE_EE_FIELD_MANUFACTURER,
-+			slot->manufacturer, sizeof(slot->manufacturer));
-+	cape_ee_field_get(slot->signature,
-+			CAPE_EE_FIELD_PART_NUMBER,
-+			slot->part_number, sizeof(slot->part_number));
-+
-+	/* board_name,version,manufacturer,part_number */
-+	snprintf(slot->text_id, sizeof(slot->text_id) - 1,
-+			"%s,%s,%s,%s", slot->board_name, slot->version,
-+			slot->manufacturer, slot->part_number);
-+
-+	/* terminate always */
-+	slot->text_id[sizeof(slot->text_id) - 1] = '\0';
-+
-+slot_fail_check:
-+	/* slot has failed and we don't support hotpluging */
-+	if (slot->probe_failed)
-+		return -ENODEV;
-+
-+	return 0;
-+}
-+
-+/* check an override slot node if it's compatible */
-+static int bone_is_compatible_override(struct device_node *node,
-+		const char *compatible_name)
-+{
-+	struct property *prop;
-+	char *buf, *s, *e, *sn;
-+	const char *part_number;
-+	const char *version;
-+	char *tmp_part_number, *tmp_version;
-+	int found;
-+
-+	/* check if the slot is compatible with the board */
-+	prop = of_find_property(node, "compatible", NULL);
-+
-+	/* no prop, it's something that's compatible with everything */
-+	if (prop == NULL)
-+		return 1;
-+
-+	/* check if it's directly compatible with the baseboard */
-+	if (of_multi_prop_cmp(prop, compatible_name) == 0)
-+		return 1;
-+
-+	/* final try, check if it's specified in the kernel command line */
-+	if (extra_override == NULL)
-+		return 0;
-+
-+	/* the compatible name should have kernel-command-line in it */
-+	if (of_multi_prop_cmp(prop, "kernel-command-line") != 0)
-+		return 0;
-+
-+	/* we must have at least the part-name */
-+	if (of_property_read_string(node, "part-number",
-+				&part_number) != 0)
-+		return 0;
-+
-+	/* read the version (if it exists) */
-+	if (of_property_read_string(node, "version", &version) != 0)
-+		version = NULL;
-+
-+	/* copy the argument to work on it */
-+	buf = kstrdup(extra_override, GFP_KERNEL);
-+
-+	/* no memory, too bad... */
-+	if (buf == NULL)
-+		return 0;
-+
-+	found = 0;
-+	s = buf;
-+	e = s + strlen(s);
-+	while (s < e) {
-+		/* find comma separator */
-+		sn = strchr(s, ',');
-+		if (sn != NULL)
-+			*sn++ = '\0';
-+		else
-+			sn = e;
-+		tmp_part_number = s;
-+		tmp_version = strchr(tmp_part_number, ':');
-+		if (tmp_version != NULL)
-+			*tmp_version++ = '\0';
-+		s = sn;
-+
-+		/* the part names must match */
-+		if (strcmp(tmp_part_number, part_number) != 0)
-+			continue;
-+
-+		pr_info("override: part-number='%s' version='%s' "
-+				"tmp_version='%s'\n",
-+				part_number,
-+				version ? version : "N/A",
-+				tmp_version ? tmp_version : "N/A");
-+
-+		/* if there's no version, match any */
-+		if (version == NULL || tmp_version == NULL ||
-+			strcmp(version, tmp_version) == 0) {
-+			found = 1;
-+			break;
-+		}
-+	}
-+
-+	kfree(buf);
-+
-+	return found;
-+}
-+
-+static int bone_is_compatible_runtime_override(struct device_node *node,
-+		const char *req_part_number, const char *req_version)
-+{
-+	struct property *prop;
-+	const char *part_number;
-+	const char *version;
-+
-+	/* only check overrides */
-+	if (!of_property_read_bool(node, "ti,cape-override"))
-+		return 0;
-+
-+	/* check if the slot is compatible with the board */
-+	prop = of_find_property(node, "compatible", NULL);
-+
-+	/* no prop, it's something that's compatible with everything */
-+	if (prop == NULL)
-+		return 1;
-+
-+	/* the compatible name should have runtime in it */
-+	if (of_multi_prop_cmp(prop, "runtime") != 0)
-+		return 0;
-+
-+	/* we must have at least the part-name */
-+	if (of_property_read_string(node, "part-number",
-+				&part_number) != 0)
-+		return 0;
-+
-+	/* read the version (if it exists) */
-+	if (of_property_read_string(node, "version", &version) != 0)
-+		version = NULL;
-+
-+	/* the part names must match */
-+	if (strcmp(req_part_number, part_number) != 0)
-+		return 0;
-+
-+	/* if any version is null, any version matches */
-+	if (version == NULL || req_version == NULL)
-+		return 1;
-+
-+	/* finally versions must match */
-+	return strcmp(req_version, version) == 0;
-+}
-+
-+
-+static ssize_t slot_ee_attr_show(struct device *dev,
-+				struct device_attribute *attr, char *buf)
-+{
-+	struct slot_ee_attribute *ee_attr = to_slot_ee_attribute(attr);
-+	struct bone_cape_slot *slot = ee_attr->slot;
-+	const struct ee_field *sig_field;
-+	int i, len;
-+	char *p, *s;
-+	u16 val;
-+
-+	/* add newline for ascii fields */
-+	sig_field = &cape_sig_fields[ee_attr->field];
-+
-+	len = sig_field->size + sig_field->ascii;
-+	p = kmalloc(len, GFP_KERNEL);
-+	if (p == NULL)
-+		return -ENOMEM;
-+
-+	s = cape_ee_field_get(slot->signature, ee_attr->field, p, len);
-+	if (s == NULL)
-+		return -EINVAL;
-+
-+	/* add newline for ascii fields and return */
-+	if (sig_field->ascii) {
-+		len = sprintf(buf, "%s\n", s);
-+		goto out;
-+	}
-+
-+	/* case by case handling */
-+	switch (ee_attr->field) {
-+		case CAPE_EE_FIELD_HEADER:
-+			len = sprintf(buf, "%02x %02x %02x %02x\n",
-+					s[0], s[1], s[2], s[3]);
-+			break;
-+
-+			/* 2 bytes */
-+		case CAPE_EE_FIELD_NUMBER_OF_PINS:
-+		case CAPE_EE_FIELD_VDD_3V3EXP:
-+		case CAPE_EE_FIELD_VDD_5V:
-+		case CAPE_EE_FIELD_SYS_5V:
-+		case CAPE_EE_FIELD_DC_SUPPLIED:
-+			/* the bone is LE */
-+			val = s[0] & (s[1] << 8);
-+			len = sprintf(buf, "%u\n", (unsigned int)val & 0xffff);
-+			break;
-+
-+		case CAPE_EE_FIELD_PIN_USAGE:
-+
-+			len = 0;
-+			for (i = 0; i < sig_field->size / 2; i++) {
-+				/* the bone is LE */
-+				val = s[0] & (s[1] << 8);
-+				sprintf(buf, "%04x\n", val);
-+				buf += 5;
-+				len += 5;
-+				s += 2;
-+			}
-+
-+			break;
-+
-+		default:
-+			*buf = '\0';
-+			len = 0;
-+			break;
-+	}
-+
-+out:
-+	kfree(p);
-+
-+	return len;
-+}
-+
-+#define SLOT_EE_ATTR(_name, _field) \
-+	{ \
-+		.devattr = __ATTR(_name, 0440, slot_ee_attr_show, NULL), \
-+		.field = CAPE_EE_FIELD_##_field , \
-+		.slot = NULL, \
-+	}
-+
-+static const struct slot_ee_attribute slot_ee_attrs[] = {
-+	SLOT_EE_ATTR(header, HEADER),
-+	SLOT_EE_ATTR(eeprom-format-revision, EEPROM_REV),
-+	SLOT_EE_ATTR(board-name, BOARD_NAME),
-+	SLOT_EE_ATTR(version, VERSION),
-+	SLOT_EE_ATTR(manufacturer, MANUFACTURER),
-+	SLOT_EE_ATTR(part-number, PART_NUMBER),
-+	SLOT_EE_ATTR(number-of-pins, NUMBER_OF_PINS),
-+	SLOT_EE_ATTR(serial-number, SERIAL_NUMBER),
-+	SLOT_EE_ATTR(pin-usage, PIN_USAGE),
-+	SLOT_EE_ATTR(vdd-3v3exp, VDD_3V3EXP),
-+	SLOT_EE_ATTR(vdd-5v, VDD_5V),
-+	SLOT_EE_ATTR(sys-5v, SYS_5V),
-+	SLOT_EE_ATTR(dc-supplied, DC_SUPPLIED),
-+};
-+
-+static int bone_cape_slot_sysfs_register(struct bone_cape_slot *slot)
-+{
-+	struct bone_capemgr_info *info = slot->info;
-+	struct device *dev = &info->pdev->dev;
-+	struct slot_ee_attribute *ee_attr;
-+	struct attribute_group *attrgroup;
-+	int i, err, sz;
-+
-+	slot->ee_attr_name = kasprintf(GFP_KERNEL, "slot-%d", slot->slotno);
-+	if (slot->ee_attr_name == NULL) {
-+		dev_err(dev, "slot #%d: Failed to allocate ee_attr_name\n",
-+				slot->slotno);
-+		err = -ENOMEM;
-+		goto err_fail_no_ee_attr_name;
-+	}
-+
-+	slot->ee_attrs_count = ARRAY_SIZE(slot_ee_attrs);
-+
-+	sz = slot->ee_attrs_count * sizeof(*slot->ee_attrs);
-+	slot->ee_attrs = kmalloc(sz, GFP_KERNEL);
-+	if (slot->ee_attrs == NULL) {
-+		dev_err(dev, "slot #%d: Failed to allocate ee_attrs\n",
-+				slot->slotno);
-+		err = -ENOMEM;
-+		goto err_fail_no_ee_attrs;
-+	}
-+
-+	attrgroup = &slot->attrgroup;
-+	memset(attrgroup, 0, sizeof(*attrgroup));
-+	attrgroup->name = slot->ee_attr_name;
-+
-+	sz = sizeof(*slot->ee_attrs_tab) * (slot->ee_attrs_count + 1);
-+	attrgroup->attrs = kmalloc(sz, GFP_KERNEL);
-+	if (attrgroup->attrs == NULL) {
-+		dev_err(dev, "slot #%d: Failed to allocate ee_attrs_tab\n",
-+				slot->slotno);
-+		err = -ENOMEM;
-+		goto err_fail_no_ee_attrs_tab;
-+	}
-+	/* copy everything over */
-+	memcpy(slot->ee_attrs, slot_ee_attrs, sizeof(slot_ee_attrs));
-+
-+	/* bind this attr to the slot */
-+	for (i = 0; i < slot->ee_attrs_count; i++) {
-+		ee_attr = &slot->ee_attrs[i];
-+		ee_attr->slot = slot;
-+		attrgroup->attrs[i] = &ee_attr->devattr.attr;
-+	}
-+	attrgroup->attrs[i] = NULL;
-+
-+	err = sysfs_create_group(&dev->kobj, attrgroup);
-+	if (err != 0) {
-+		dev_err(dev, "slot #%d: Failed to allocate ee_attrs_tab\n",
-+				slot->slotno);
-+		err = -ENOMEM;
-+		goto err_fail_no_ee_attrs_group;
-+	}
-+
-+	return 0;
-+
-+err_fail_no_ee_attrs_group:
-+	kfree(slot->ee_attrs_tab);
-+err_fail_no_ee_attrs_tab:
-+	kfree(slot->ee_attrs);
-+err_fail_no_ee_attrs:
-+	kfree(slot->ee_attr_name);
-+err_fail_no_ee_attr_name:
-+	return err;
-+}
-+
-+static void bone_cape_slot_sysfs_unregister(struct bone_cape_slot *slot)
-+{
-+	struct bone_capemgr_info *info = slot->info;
-+	struct device *dev = &info->pdev->dev;
-+
-+	sysfs_remove_group(&dev->kobj, &slot->attrgroup);
-+	kfree(slot->ee_attrs_tab);
-+	kfree(slot->ee_attrs);
-+	kfree(slot->ee_attr_name);
-+}
-+
-+static ssize_t bbrd_ee_attr_show(struct device *dev,
-+				struct device_attribute *attr, char *buf)
-+{
-+	struct bbrd_ee_attribute *ee_attr = to_bbrd_ee_attribute(attr);
-+	struct platform_device *pdev = to_platform_device(dev);
-+	struct bone_capemgr_info *info = platform_get_drvdata(pdev);
-+	struct bone_baseboard *bbrd = &info->baseboard;
-+	const struct ee_field *sig_field;
-+	u16 val;
-+	int i, len;
-+	char *p, *s;
-+
-+	/* add newline for ascii fields */
-+	sig_field = &bbrd_sig_fields[ee_attr->field];
-+
-+	len = sig_field->size + sig_field->ascii;
-+	p = kmalloc(len, GFP_KERNEL);
-+	if (p == NULL)
-+		return -ENOMEM;
-+
-+	s = bbrd_ee_field_get(bbrd->signature, ee_attr->field, p, len);
-+	if (s == NULL)
-+		return -EINVAL;
-+
-+	/* add newline for ascii fields and return */
-+	if (sig_field->ascii) {
-+		len = sprintf(buf, "%s\n", s);
-+		goto out;
-+	}
-+
-+	/* case by case handling */
-+	switch (ee_attr->field) {
-+		case BBRD_EE_FIELD_HEADER:
-+			len = sprintf(buf, "%02x %02x %02x %02x\n",
-+					s[0], s[1], s[2], s[3]);
-+			break;
-+
-+		case BBRD_EE_FIELD_CONFIG_OPTION:
-+			len = 0;
-+			for (i = 0; i < sig_field->size / 2; i++) {
-+				/* the bone is LE */
-+				val = s[0] & (s[1] << 8);
-+				sprintf(buf, "%04x\n", val);
-+				buf += 5;
-+				len += 5;
-+				s += 2;
-+			}
-+			break;
-+
-+		default:
-+			*buf = '\0';
-+			len = 0;
-+			break;
-+	}
-+
-+out:
-+	kfree(p);
-+
-+	return len;
-+}
-+
-+#define BBRD_EE_ATTR(_name, _field) \
-+	{ \
-+		.devattr = __ATTR(_name, 0440, bbrd_ee_attr_show, NULL), \
-+		.field = BBRD_EE_FIELD_##_field , \
-+	}
-+
-+static struct bbrd_ee_attribute bbrd_ee_attrs[] = {
-+	BBRD_EE_ATTR(header, HEADER),
-+	BBRD_EE_ATTR(board-name, BOARD_NAME),
-+	BBRD_EE_ATTR(revision, REVISION),
-+	BBRD_EE_ATTR(serial-number, SERIAL_NUMBER),
-+	BBRD_EE_ATTR(config-option, CONFIG_OPTION),
-+};
-+
-+static struct attribute *bbrd_attrs_flat[] = {
-+	&bbrd_ee_attrs[BBRD_EE_FIELD_HEADER	 	].devattr.attr,
-+	&bbrd_ee_attrs[BBRD_EE_FIELD_BOARD_NAME	 	].devattr.attr,
-+	&bbrd_ee_attrs[BBRD_EE_FIELD_REVISION		].devattr.attr,
-+	&bbrd_ee_attrs[BBRD_EE_FIELD_SERIAL_NUMBER	].devattr.attr,
-+	&bbrd_ee_attrs[BBRD_EE_FIELD_CONFIG_OPTION	].devattr.attr,
-+	NULL,
-+};
-+
-+static const struct attribute_group bbrd_attr_group = {
-+	.name	= "baseboard",
-+	.attrs	= bbrd_attrs_flat,
-+};
-+
-+static ssize_t slots_show(struct device *dev, struct device_attribute *attr,
-+		char *buf)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	struct bone_capemgr_info *info = platform_get_drvdata(pdev);
-+	struct bone_cape_slot *slot;
-+	ssize_t len, sz;
-+
-+	mutex_lock(&info->slots_list_mutex);
-+	sz = 0;
-+	list_for_each_entry(slot, &info->slot_list, node) {
-+
-+		len = sprintf(buf, "%2d: %02x:%c%c%c%c%c %s\n",
-+				slot->slotno,
-+				(int)slot->client ?
-+					slot->client->addr & 0x7f : 0xff,
-+				slot->probed       ? 'P' : '-',
-+				slot->probe_failed ? 'F' : '-',
-+				slot->override     ? 'O' : '-',
-+				slot->loading	   ? 'l' : '-',
-+				slot->loaded	   ? 'L' : '-',
-+				slot->text_id);
-+
-+		buf += len;
-+		sz += len;
-+	}
-+	mutex_unlock(&info->slots_list_mutex);
-+
-+	return sz;
-+}
-+
-+static ssize_t slots_store(struct device *dev, struct device_attribute *attr,
-+		 const char *buf, size_t count)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	struct bone_capemgr_info *info = platform_get_drvdata(pdev);
-+	struct bone_cape_slot *slot;
-+	struct device_node *pnode, *node, *slots_node;
-+	char *s, *part_number, *version;
-+	int ret;
-+	int slotno;
-+
-+	/* check for remove slot */
-+	if (strlen(buf) > 0 && buf[0] == '-') {
-+		slotno = simple_strtoul(buf + 1, NULL, 10);
-+
-+		/* now load each (take lock to be sure */
-+		mutex_lock(&info->slots_list_mutex);
-+		list_for_each_entry(slot, &info->slot_list, node) {
-+			if (slotno == slot->slotno)
-+				break;
-+		}
-+		mutex_unlock(&info->slots_list_mutex);
-+
-+		if (slot == NULL)
-+			return -ENODEV;
-+
-+		bone_capemgr_unload(slot);
-+
-+		return strlen(buf);
-+	}
-+
-+	part_number = kstrdup(buf, GFP_KERNEL);
-+	if (part_number == NULL)
-+		return -ENOMEM;
-+
-+	/* remove trailing spaces dots and newlines */
-+	s = part_number + strlen(part_number);
-+	while (s > part_number &&
-+			(isspace(s[-1]) || s[-1] == '\n' || s[-1] == '.'))
-+		*--s = '\0';
-+
-+	version = strchr(part_number, ':');
-+	if (version != NULL)
-+		*version++ = '\0';
-+
-+	dev_info(&pdev->dev, "part_number '%s', version '%s'\n",
-+			part_number, version ? version : "N/A");
-+
-+	pnode = pdev->dev.of_node;
-+	node = NULL;
-+	slot = NULL;
-+	ret = 0;
-+
-+	/* iterate over any slots */
-+	slots_node = of_get_child_by_name(pnode, "slots");
-+	if (slots_node != NULL) {
-+		for_each_child_of_node(slots_node, node) {
-+
-+			/* check if the override is compatible */
-+			if (!bone_is_compatible_runtime_override(node,
-+						part_number, version))
-+				continue;
-+
-+			slot = bone_capemgr_add_slot(info, node,
-+					part_number, version);
-+			if (IS_ERR(slot)) {
-+				dev_err(&pdev->dev, "Failed to add slot #%d\n",
-+					atomic_read(&info->next_slot_nr) - 1);
-+				ret = PTR_ERR(slot);
-+				slot = NULL;
-+				goto err_fail;
-+			}
-+			break;
-+		}
-+		of_node_put(node);
-+		of_node_put(slots_node);
-+	}
-+	slots_node = NULL;
-+
-+	/* no specific slot found, try immediate */
-+	if (!slot)
-+		slot = bone_capemgr_add_slot(info, NULL,
-+				part_number, version);
-+
-+	if (IS_ERR_OR_NULL(slot)) {
-+		dev_err(&pdev->dev, "Failed to add slot #%d\n",
-+			atomic_read(&info->next_slot_nr) - 1);
-+		ret = slot ? PTR_ERR(slot) : -ENODEV;
-+		slot = NULL;
-+		goto err_fail;
-+	}
-+
-+	kfree(part_number);
-+
-+	ret = bone_capemgr_load(slot);
-+
-+	return ret == 0 ? strlen(buf) : ret;
-+err_fail:
-+	of_node_put(node);
-+	of_node_put(slots_node);
-+	kfree(part_number);
-+	return ret;
-+}
-+
-+static DEVICE_ATTR(slots, 0644, slots_show, slots_store);
-+
-+static int bone_capemgr_info_sysfs_register(struct bone_capemgr_info *info)
-+{
-+	struct device *dev = &info->pdev->dev;
-+	int ret;
-+
-+	ret = device_create_file(dev, &dev_attr_slots);
-+	if (ret != 0)
-+		goto err_fail_no_slots;
-+
-+	ret = sysfs_create_group(&dev->kobj, &bbrd_attr_group);
-+	if (ret != 0)
-+		goto err_fail_no_bbrd_grp;
-+
-+	return 0;
-+err_fail_no_bbrd_grp:
-+	device_remove_file(dev, &dev_attr_slots);
-+err_fail_no_slots:
-+	return ret;
-+}
-+
-+static void bone_capemgr_info_sysfs_unregister(struct bone_capemgr_info *info)
-+{
-+	struct device *dev = &info->pdev->dev;
-+
-+	sysfs_remove_group(&dev->kobj, &bbrd_attr_group);
-+	device_remove_file(dev, &dev_attr_slots);
-+}
-+
-+static int bone_capemgr_load(struct bone_cape_slot *slot)
-+{
-+	struct bone_capemgr_info *info = slot->info;
-+	struct device *dev = &info->pdev->dev;
-+	struct device_node *node;
-+	struct property *prop;
-+	const char *dtbo;
-+	int found, err;
-+	struct bone_capemap *capemap;
-+
-+	if (slot->probe_failed)
-+		return -ENODEV;
-+
-+	if (slot->loaded)
-+		return -EAGAIN;
-+
-+	mutex_lock(&info->capemap_mutex);
-+	found = 0;
-+	list_for_each_entry(capemap, &info->capemap_list, node) {
-+		if (strcmp(capemap->part_number, slot->part_number) == 0) {
-+			found = 1;
-+			break;
-+		}
-+	}
-+
-+	/* found? */
-+	if (found) {
-+		if (capemap->map_node == NULL) {
-+			mutex_unlock(&info->capemap_mutex);
-+			/* need to match programatically; not supported yet */
-+			dev_err(dev, "slot #%d: Failed to find capemap "
-+					"for '%s'\n",
-+					slot->slotno, slot->part_number);
-+			return -ENODEV;
-+		}
-+
-+		/* locate first match */
-+		dtbo = NULL;
-+		for_each_child_of_node(capemap->map_node, node) {
-+
-+			/* dtbo must exist */
-+			if (of_property_read_string(node, "dtbo", &dtbo) != 0)
-+				continue;
-+
-+			/* get version property (if any) */
-+			prop = of_find_property(node, "version", NULL);
-+
-+			/* if no version node exists, we match */
-+			if (prop == NULL)
-+				break;
-+
-+			if (of_multi_prop_cmp(prop, slot->version) == 0)
-+				break;
-+		}
-+
-+		if (node == NULL) {
-+			/* can't find dtbo version node? try the default */
-+			if (of_property_read_string(capemap->map_node,
-+						"dtbo", &dtbo) != 0) {
-+				mutex_unlock(&info->capemap_mutex);
-+				dev_err(dev, "slot #%d: Failed to find dtbo "
-+						"for '%s'\n",
-+						slot->slotno,
-+						slot->part_number);
-+				return -ENODEV;
-+			}
-+		}
-+
-+		slot->dtbo = kstrdup(dtbo, GFP_KERNEL);
-+		of_node_put(node);	/* handles NULL */
-+	} else {
-+		dev_info(dev, "slot #%d: Requesting part number/version based "
-+				"'%s-%s.dtbo\n",
-+				slot->slotno,
-+				slot->part_number, slot->version);
-+
-+		/* no specific capemap node; request the part number + .dtbo*/
-+		slot->dtbo = kasprintf(GFP_KERNEL, "%s-%s.dtbo",
-+				slot->part_number, slot->version);
-+	}
-+
-+	if (slot->dtbo == NULL) {
-+		mutex_unlock(&info->capemap_mutex);
-+		dev_err(dev, "slot #%d: Failed to get dtbo '%s'\n",
-+				slot->slotno, dtbo);
-+		return -ENOMEM;
-+	}
-+
-+	dev_info(dev, "slot #%d: Requesting firmware '%s' for board-name '%s'"
-+			", version '%s'\n",
-+			slot->slotno,
-+			slot->dtbo, slot->board_name, slot->version);
-+
-+	err = request_firmware(&slot->fw, slot->dtbo, dev);
-+	if (err != 0) {
-+		dev_err(dev, "failed to load firmware '%s'\n", slot->dtbo);
-+		mutex_unlock(&info->capemap_mutex);
-+		goto err_fail_no_fw;
-+	}
-+
-+	dev_info(dev, "slot #%d: dtbo '%s' loaded; converting to live tree\n",
-+			slot->slotno, slot->dtbo);
-+
-+	mutex_unlock(&info->capemap_mutex);
-+
-+	of_fdt_unflatten_tree((void *)slot->fw->data, &slot->overlay);
-+	if (slot->overlay == NULL) {
-+		dev_err(dev, "slot #%d: Failed to unflatten\n",
-+				slot->slotno);
-+		err = -EINVAL;
-+		goto err_fail;
-+	}
-+
-+	/* mark it as detached */
-+	of_node_set_flag(slot->overlay, OF_DETACHED);
-+
-+	/* perform resolution */
-+	err = of_resolve(slot->overlay);
-+	if (err != 0) {
-+		dev_err(dev, "slot #%d: Failed to resolve tree\n",
-+				slot->slotno);
-+		goto err_fail;
-+	}
-+
-+	/* now build an overlay info array */
-+	err = of_build_overlay_info(slot->overlay,
-+			&slot->ovinfo_cnt, &slot->ovinfo);
-+	if (err != 0) {
-+		dev_err(dev, "slot #%d: Failed to build overlay info\n",
-+				slot->slotno);
-+		goto err_fail;
-+	}
-+
-+	dev_info(dev, "slot #%d: #%d overlays\n",
-+			slot->slotno, slot->ovinfo_cnt);
-+
-+	err = of_overlay(slot->ovinfo_cnt, slot->ovinfo);
-+	if (err != 0) {
-+		if (err != 0) {
-+			dev_err(dev, "slot #%d: Failed to overlay\n",
-+					slot->slotno);
-+			goto err_fail_overlay;
-+		}
-+	}
-+
-+	dev_info(dev, "slot #%d: Applied #%d overlays.\n",
-+			slot->slotno, slot->ovinfo_cnt);
-+
-+	slot->loading = 0;
-+	slot->loaded = 1;
-+
-+	return 0;
-+
-+err_fail_overlay:
-+
-+	of_free_overlay_info(slot->ovinfo_cnt, slot->ovinfo);
-+	slot->ovinfo_cnt = 0;
-+	slot->ovinfo = NULL;
-+
-+err_fail:
-+
-+	/* we can't free the overlay, because the unflatten method is a mess */
-+	/* __of_free_tree(slot->overlay); */
-+	slot->overlay = NULL;
-+
-+	release_firmware(slot->fw);
-+	slot->fw = NULL;
-+
-+err_fail_no_fw:
-+	return err;
-+}
-+
-+static int bone_capemgr_unload(struct bone_cape_slot *slot)
-+{
-+	if (!slot->loaded || slot->ovinfo == NULL)
-+		return -EINVAL;
-+
-+	of_overlay_revert(slot->ovinfo_cnt, slot->ovinfo);
-+
-+	slot->ovinfo_cnt = 0;
-+	kfree(slot->ovinfo);
-+
-+	slot->loaded = 0;
-+
-+	return 0;
-+
-+}
-+
-+static int bone_slot_fill_override(struct bone_cape_slot *slot,
-+		struct device_node *node,
-+		const char *part_number, const char *version)
-+{
-+	const struct ee_field *sig_field;
-+	struct property *prop;
-+	int i, len, has_part_number;
-+	char *p;
-+
-+	slot->probe_failed = 0;
-+	slot->probed = 0;
-+
-+	/* zero out signature */
-+	memset(slot->signature, 0,
-+			sizeof(slot->signature));
-+
-+	/* first, fill in all with override defaults */
-+	for (i = 0; i < ARRAY_SIZE(cape_sig_fields); i++) {
-+
-+		sig_field = &cape_sig_fields[i];
-+
-+		/* point to the entry */
-+		p = slot->signature + sig_field->start;
-+
-+		if (sig_field->override)
-+			memcpy(p, sig_field->override,
-+					sig_field->size);
-+		else
-+			memset(p, 0, sig_field->size);
-+	}
-+
-+	/* and now, fill any override data from the node */
-+	has_part_number = 0;
-+	if (node != NULL) {
-+		for (i = 0; i < ARRAY_SIZE(cape_sig_fields); i++) {
-+
-+			sig_field = &cape_sig_fields[i];
-+
-+			/* find property with the same name (if any) */
-+			prop = of_find_property(node, sig_field->name, NULL);
-+			if (prop == NULL)
-+				continue;
-+
-+			/* point to the entry */
-+			p = slot->signature + sig_field->start;
-+
-+			/* copy and zero out any remainder */
-+			len = prop->length;
-+			if (prop->length > sig_field->size)
-+				len = sig_field->size;
-+			memcpy(p, prop->value, len);
-+			if (len < sig_field->size)
-+				memset(p + len, 0, sig_field->size - len);
-+
-+			/* remember if we got a part number which is required */
-+			if (i == CAPE_EE_FIELD_PART_NUMBER && len > 0)
-+				has_part_number = 1;
-+		}
-+	}
-+
-+	/* if a part_number is supplied use it */
-+	if (part_number && (len = strlen(part_number)) > 0) {
-+		sig_field = &cape_sig_fields[CAPE_EE_FIELD_PART_NUMBER];
-+
-+		/* point to the entry */
-+		p = slot->signature + sig_field->start;
-+
-+		/* copy and zero out any remainder */
-+		if (len > sig_field->size)
-+			len = sig_field->size;
-+		memcpy(p, part_number, len);
-+		if (len < sig_field->size)
-+			memset(p + len, 0, sig_field->size - len);
-+
-+		has_part_number = 1;
-+	}
-+
-+	/* if a version is supplied use it */
-+	if (version && (len = strlen(version)) > 0) {
-+		sig_field = &cape_sig_fields[CAPE_EE_FIELD_VERSION];
-+
-+		/* point to the entry */
-+		p = slot->signature + sig_field->start;
-+
-+		/* copy and zero out any remainder */
-+		if (len > sig_field->size)
-+			len = sig_field->size;
-+		memcpy(p, version, len);
-+		if (len < sig_field->size)
-+			memset(p + len, 0, sig_field->size - len);
-+	}
-+
-+	/* we must have a part number */
-+	if (!has_part_number)
-+		return -EINVAL;
-+
-+	slot->override = 1;
-+
-+	return 0;
-+}
-+
-+static struct bone_cape_slot *
-+bone_capemgr_add_slot(struct bone_capemgr_info *info, struct device_node *node,
-+		const char *part_number, const char *version)
-+{
-+	struct device_node *eeprom_node;
-+	struct bone_cape_slot *slot;
-+	struct device *dev = &info->pdev->dev;
-+	int slotno;
-+	int ret;
-+
-+	eeprom_node = NULL;
-+
-+	slotno = atomic_inc_return(&info->next_slot_nr) - 1;
-+
-+	slot = devm_kzalloc(dev, sizeof(*slot), GFP_KERNEL);
-+	if (slot == NULL) {
-+		ret = -ENOMEM;
-+		goto err_no_mem;
-+	}
-+	slot->info = info;
-+	slot->slotno = slotno;
-+
-+	if (node && !of_property_read_bool(node, "ti,cape-override")) {
-+		ret = of_property_read_u32(node, "eeprom",
-+				&slot->eeprom_handle);
-+		if (ret != 0) {
-+			dev_err(dev, "slot #%d: failed to locate eeprom\n",
-+					slotno);
-+			goto err_no_eeprom;
-+		}
-+		eeprom_node = of_find_node_by_phandle(slot->eeprom_handle);
-+		if (eeprom_node == NULL) {
-+			dev_err(dev, "slot #%d: failed to find eeprom node\n",
-+					slotno);
-+			ret = -ENODEV;
-+			goto err_no_eeprom_node;
-+		}
-+		slot->client = of_find_i2c_device_by_node(eeprom_node);
-+		if (slot->client == NULL) {
-+			dev_err(dev, "slot #%d: failed to find i2c client\n",
-+					slotno);
-+			ret = -ENODEV;
-+			goto err_no_eeprom_client;
-+		}
-+		/* release ref to the node & get ref of the i2c client */
-+		of_node_put(eeprom_node);
-+		eeprom_node = NULL;
-+		i2c_use_client(slot->client);
-+
-+		/* grab the memory accessor of the eeprom */
-+		slot->macc = i2c_eeprom_get_memory_accessor(slot->client);
-+		if (IS_ERR_OR_NULL(slot->macc)) {
-+			dev_err(dev, "slot #%d: failed to get "
-+					"memory accessor\n", slotno);
-+			ret = slot->macc == NULL ? -ENODEV :
-+				PTR_ERR(slot->macc);
-+			slot->macc = NULL;
-+			goto err_no_eeprom_macc;
-+		}
-+
-+	} else {
-+		if (node)
-+			dev_info(dev, "slot #%d: specific override\n", slotno);
-+		else
-+			dev_info(dev, "slot #%d: generic override\n", slotno);
-+
-+		/* fill in everything with defaults first */
-+		ret = bone_slot_fill_override(slot, node, part_number, version);
-+		if (ret != 0) {
-+			dev_err(dev, "slot #%d: override failed\n",
-+					slotno);
-+			goto err_no_eeprom;
-+		}
-+	}
-+
-+	ret = bone_slot_scan(slot);
-+	if (ret != 0) {
-+
-+		if (!slot->probe_failed) {
-+			dev_err(dev, "slot #%d: scan failed\n",
-+					slotno);
-+			goto err_bad_scan;
-+		}
-+
-+		dev_err(dev, "slot #%d: No cape found\n",
-+				slotno);
-+		/* but all is fine */
-+	} else {
-+		dev_info(dev, "slot #%d: '%s'\n",
-+				slotno, slot->text_id);
-+
-+		ret = bone_cape_slot_sysfs_register(slot);
-+		if (ret != 0) {
-+			dev_err(dev, "slot #%d: sysfs register failed\n",
-+					slotno);
-+			goto err_no_sysfs;
-+		}
-+
-+	}
-+
-+	/* add to the slot list */
-+	mutex_lock(&info->slots_list_mutex);
-+	list_add_tail(&slot->node, &info->slot_list);
-+	mutex_unlock(&info->slots_list_mutex);
-+
-+	return slot;
-+
-+err_no_sysfs:
-+err_bad_scan:
-+err_no_eeprom_macc:
-+	i2c_release_client(slot->client);
-+err_no_eeprom_client:
-+	of_node_put(eeprom_node);	/* handles NULL */
-+err_no_eeprom_node:
-+	/* nothing */
-+err_no_eeprom:
-+	devm_kfree(dev, slot);
-+
-+err_no_mem:
-+	return ERR_PTR(ret);
-+}
-+
-+static int bone_capemgr_loader(void *data)
-+{
-+	struct bone_cape_slot *slot = data;
-+
-+	return bone_capemgr_load(slot);
-+}
-+
-+static int __devinit
-+bone_capemgr_probe(struct platform_device *pdev)
-+{
-+	struct bone_capemgr_info *info;
-+	struct bone_baseboard *bbrd;
-+	struct bone_cape_slot *slot;
-+	struct device_node *pnode = pdev->dev.of_node;
-+	struct device_node *baseboardmaps_node;
-+	struct device_node *slots_node, *capemaps_node, *node;
-+	struct device_node *eeprom_node;
-+	const char *part_number;
-+	const char *board_name;
-+	const char *compatible_name;
-+	struct bone_capemap *capemap;
-+	int ret, len;
-+
-+	/* we don't use platform_data at all; we require OF */
-+	if (pnode == NULL)
-+		return -ENOTSUPP;
-+
-+	info = devm_kzalloc(&pdev->dev,
-+			sizeof(struct bone_capemgr_info), GFP_KERNEL);
-+	if (!info) {
-+		dev_err(&pdev->dev, "Failed to allocate device structure\n");
-+		return -ENOMEM;
-+	}
-+
-+	info->pdev = pdev;
-+	platform_set_drvdata(pdev, info);
-+
-+	atomic_set(&info->next_slot_nr, 0);
-+	INIT_LIST_HEAD(&info->slot_list);
-+	mutex_init(&info->slots_list_mutex);
-+
-+	INIT_LIST_HEAD(&info->capemap_list);
-+	mutex_init(&info->capemap_mutex);
-+
-+	baseboardmaps_node = NULL;
-+	capemaps_node = NULL;
-+
-+	/* find the baseboard */
-+	bbrd = &info->baseboard;
-+
-+	baseboardmaps_node = of_get_child_by_name(pnode, "baseboardmaps");
-+	if (baseboardmaps_node == NULL) {
-+		dev_err(&pdev->dev, "Failed to get baseboardmaps node");
-+		ret = -ENODEV;
-+		goto err_exit;
-+	}
-+
-+	/* get eeprom of the baseboard */
-+	ret = of_property_read_u32(pnode, "eeprom",
-+			&bbrd->eeprom_handle);
-+	if (ret != 0) {
-+		dev_err(&pdev->dev, "Failed to locate baseboard eeprom\n");
-+		goto err_exit;
-+	}
-+	eeprom_node = of_find_node_by_phandle(bbrd->eeprom_handle);
-+	if (eeprom_node == NULL) {
-+		dev_err(&pdev->dev, "Failed to find baseboard eeprom node\n");
-+		ret = -ENODEV;
-+		goto err_exit;
-+	}
-+	bbrd->client = of_find_i2c_device_by_node(eeprom_node);
-+	of_node_put(eeprom_node);
-+	eeprom_node = NULL;
-+	if (bbrd->client == NULL) {
-+		dev_err(&pdev->dev, "Failed to find baseboard i2c client\n");
-+		ret = -ENODEV;
-+		goto err_exit;
-+	}
-+
-+	/* release ref to the node & get ref of the i2c client */
-+	i2c_use_client(bbrd->client);
-+
-+	/* grab the memory accessor of the eeprom */
-+	bbrd->macc = i2c_eeprom_get_memory_accessor(bbrd->client);
-+	if (IS_ERR_OR_NULL(bbrd->macc)) {
-+		dev_err(&pdev->dev, "Failed to get "
-+				"baseboard memory accessor\n");
-+		ret = bbrd->macc == NULL ? -ENODEV :
-+			PTR_ERR(bbrd->macc);
-+		bbrd->macc = NULL;
-+		goto err_exit;
-+	}
-+
-+	ret = bone_baseboard_scan(bbrd);
-+	if (ret != 0) {
-+		dev_err(&pdev->dev, "Failed to scan baseboard eeprom\n");
-+		goto err_exit;
-+	}
-+
-+	dev_info(&pdev->dev, "Baseboard: '%s'\n", bbrd->text_id);
-+
-+	board_name = NULL;
-+	compatible_name = NULL;
-+	for_each_child_of_node(baseboardmaps_node, node) {
-+		/* there must be board-name */
-+		if (of_property_read_string(node, "board-name",
-+					&board_name) != 0 ||
-+		    of_property_read_string(node, "compatible-name",
-+					&compatible_name) != 0)
-+			continue;
-+
-+		if (strcmp(bbrd->board_name, board_name) == 0)
-+			break;
-+	}
-+	of_node_put(baseboardmaps_node);
-+	baseboardmaps_node = NULL;
-+
-+	if (node == NULL) {
-+		dev_err(&pdev->dev, "Failed to find compatible map for %s\n",
-+				bbrd->board_name);
-+		ret = -ENODEV;
-+		goto err_exit;
-+	}
-+	bbrd->compatible_name = kstrdup(compatible_name, GFP_KERNEL);
-+	if (bbrd->compatible_name == NULL) {
-+		dev_err(&pdev->dev, "Failed to allocate compatible name\n");
-+		ret = -ENOMEM;
-+		goto err_exit;
-+	}
-+	of_node_put(node);
-+
-+	dev_info(&pdev->dev, "compatible-baseboard=%s\n",
-+			bbrd->compatible_name);
-+
-+	/* iterate over any capemaps */
-+	capemaps_node = of_get_child_by_name(pnode, "capemaps");
-+	if (capemaps_node != NULL) {
-+
-+		for_each_child_of_node(capemaps_node, node) {
-+
-+			/* there must be part-number */
-+			if (of_property_read_string(node, "part-number",
-+						&part_number) != 0)
-+				continue;
-+
-+			len = sizeof(*capemap) + strlen(part_number) + 1;
-+			capemap = devm_kzalloc(&pdev->dev, len, GFP_KERNEL);
-+			if (capemap == NULL) {
-+				dev_err(&pdev->dev, "Failed to allocate "
-+						"capemap\n");
-+				ret = -ENOMEM;
-+				goto err_exit;
-+			}
-+			capemap->part_number = (char *)(capemap + 1);
-+			capemap->map_node = of_node_get(node);
-+			strcpy(capemap->part_number, part_number);
-+
-+			/* add to the slot list */
-+			mutex_lock(&info->capemap_mutex);
-+			list_add_tail(&capemap->node, &info->capemap_list);
-+			info->capemaps_nr++;
-+			mutex_unlock(&info->capemap_mutex);
-+		}
-+		of_node_put(capemaps_node);
-+		capemaps_node = NULL;
-+	}
-+
-+	/* iterate over any slots */
-+	slots_node = of_get_child_by_name(pnode, "slots");
-+	if (slots_node != NULL) {
-+		for_each_child_of_node(slots_node, node) {
-+
-+			/* check if the override is compatible */
-+			if (!bone_is_compatible_override(node,
-+						bbrd->compatible_name))
-+				continue;
-+
-+			slot = bone_capemgr_add_slot(info, node,
-+					NULL, NULL);
-+			if (IS_ERR(slot)) {
-+				dev_err(&pdev->dev, "Failed to add slot #%d\n",
-+					atomic_read(&info->next_slot_nr));
-+				ret = PTR_ERR(slot);
-+				goto err_exit;
-+			}
-+		}
-+		of_node_put(slots_node);
-+	}
-+	slots_node = NULL;
-+
-+	pm_runtime_enable(&pdev->dev);
-+	ret = pm_runtime_get_sync(&pdev->dev);
-+	if (IS_ERR_VALUE(ret)) {
-+		dev_err(&pdev->dev, "Failed to pm_runtime_get_sync()\n");
-+		goto err_exit;
-+	}
-+
-+	pm_runtime_put(&pdev->dev);
-+
-+	bone_capemgr_info_sysfs_register(info);
-+
-+	/* now load each (take lock to be sure */
-+	mutex_lock(&info->slots_list_mutex);
-+	list_for_each_entry(slot, &info->slot_list, node) {
-+		if (!slot->probe_failed && !slot->loaded) {
-+			slot->loading = 1;
-+			slot->loader_thread = kthread_run(bone_capemgr_loader,
-+					slot, "capemgr-loader-%d",
-+					slot->slotno);
-+			if (IS_ERR(slot->loader_thread)) {
-+				dev_warn(&pdev->dev, "slot #%d: Failed to "
-+						"start loader\n", slot->slotno);
-+				slot->loader_thread = NULL;
-+			}
-+		}
-+	}
-+
-+	mutex_unlock(&info->slots_list_mutex);
-+
-+
-+	dev_info(&pdev->dev, "initialized OK.\n");
-+
-+	return 0;
-+
-+err_exit:
-+	of_node_put(baseboardmaps_node);
-+	of_node_put(capemaps_node);
-+	platform_set_drvdata(pdev, NULL);
-+	devm_kfree(&pdev->dev, info);
-+
-+	return ret;
-+}
-+
-+static int __devexit bone_capemgr_remove(struct platform_device *pdev)
-+{
-+	struct bone_capemgr_info *info = platform_get_drvdata(pdev);
-+	struct bone_cape_slot *slot, *slotn;
-+	int ret;
-+
-+	mutex_lock(&info->slots_list_mutex);
-+	list_for_each_entry_safe(slot, slotn, &info->slot_list, node) {
-+
-+		/* unload just in case */
-+		bone_capemgr_unload(slot);
-+
-+		/* if probed OK, remove the sysfs nodes */
-+		if (slot->probed && !slot->probe_failed)
-+			bone_cape_slot_sysfs_unregister(slot);
-+
-+		/* remove it from the list */
-+		list_del(&slot->node);
-+
-+	}
-+	mutex_unlock(&info->slots_list_mutex);
-+
-+	bone_capemgr_info_sysfs_unregister(info);
-+
-+	platform_set_drvdata(pdev, NULL);
-+
-+	ret = pm_runtime_get_sync(&pdev->dev);
-+	if (IS_ERR_VALUE(ret))
-+		return ret;
-+
-+	pm_runtime_put(&pdev->dev);
-+	pm_runtime_disable(&pdev->dev);
-+
-+	devm_kfree(&pdev->dev, info);
-+
-+	return 0;
-+}
-+
-+#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_RUNTIME
-+static int bone_capemgr_runtime_suspend(struct device *dev)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	struct bone_capemgr_info *_dev = platform_get_drvdata(pdev);
-+
-+	(void)_dev;
-+	return 0;
-+}
-+
-+static int bone_capemgr_runtime_resume(struct device *dev)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	struct bone_capemgr_info *_dev = platform_get_drvdata(pdev);
-+
-+	(void)_dev;
-+	return 0;
-+}
-+#endif /* CONFIG_PM_RUNTIME */
-+
-+static struct dev_pm_ops bone_capemgr_pm_ops = {
-+	SET_RUNTIME_PM_OPS(bone_capemgr_runtime_suspend,
-+			   bone_capemgr_runtime_resume, NULL)
-+};
-+#define BONE_CAPEMGR_PM_OPS (&bone_capemgr_pm_ops)
-+#else
-+#define BONE_CAPEMGR_PM_OPS NULL
-+#endif /* CONFIG_PM */
-+
-+static struct platform_driver bone_capemgr_driver = {
-+	.probe		= bone_capemgr_probe,
-+	.remove		= __devexit_p(bone_capemgr_remove),
-+	.driver		= {
-+		.name	= "bone-capemgr",
-+		.owner	= THIS_MODULE,
-+		.pm	= BONE_CAPEMGR_PM_OPS,
-+		.of_match_table = of_match_ptr(bone_capemgr_of_match),
-+	},
-+};
-+
-+module_platform_driver(bone_capemgr_driver);
-+
-+MODULE_AUTHOR("Pantelis Antoniou");
-+MODULE_DESCRIPTION("Beaglebone cape manager");
-+MODULE_LICENSE("GPL");
-+MODULE_ALIAS("platform:bone_capemgr");
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0031-capemgr-Add-beaglebone-s-cape-driver-bindings.patch b/patches/not-capebus/0031-capemgr-Add-beaglebone-s-cape-driver-bindings.patch
deleted file mode 100644
index a9b396510fa12ec04fdb1f6fe33a707ceca3b88b..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0031-capemgr-Add-beaglebone-s-cape-driver-bindings.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From 9943518b76832ddb7b1d2a3f20da43c0b9f04f40 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Mon, 7 Jan 2013 19:43:11 +0200
-Subject: [PATCH 31/98] capemgr: Add beaglebone's cape driver bindings
-
-Document the beaglebone's cape driver bindings.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- .../devicetree/bindings/misc/capes-beaglebone.txt  |  109 ++++++++++++++++++++
- 1 file changed, 109 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/misc/capes-beaglebone.txt
-
-diff --git a/Documentation/devicetree/bindings/misc/capes-beaglebone.txt b/Documentation/devicetree/bindings/misc/capes-beaglebone.txt
-new file mode 100644
-index 0000000..192880d
---- /dev/null
-+++ b/Documentation/devicetree/bindings/misc/capes-beaglebone.txt
-@@ -0,0 +1,109 @@
-+* TI Beaglebone DT Overlay Cape Driver
-+
-+Required properties:
-+
-+- compatible: "ti,bone-capemgr"
-+
-+- eeprom: Contains the phandle beaglebone's baseboard i2c eeprom.
-+
-+- baseboardmaps - node containing a list of supported
-+	beaglebone revisions; each node in should have the
-+	following properties:
-+	- board-name: The board name stored in the baseboard
-+		eeprom.
-+	- compatible-name: The name which will be used for
-+		matching compatible capes.
-+
-+- slots: node containing a list of slot nodes (which in the beaglebone
-+	case correspond to I2C addresses for dynamically probed capes,
-+	or an override slot definition for hardcoded capes.
-+	- eeprom: Contains the phandle beaglebone's cape i2c eeprom.
-+
-+	It is possible to define override slots that will be activated
-+	when the baseboard matches, and/or if supplied on the kernel command
-+	line and/or when dynamically requested on runtime.
-+	In that case the slot is marked with
-+	- ti,cape-override: Marks a slot override.
-+	- compatible: any of the "runtime", "kernel", or any compatible-name
-+	  on a matching baseboardmap node.
-+	- Any of the eeprom-format-revision, board-name, version, manufacturer,
-+	  part-number, number-of-pins, serial-number, pin-usage, vdd-3v3exp,
-+	  vdd-5v, sys-5v, dc-supplied properties which fill in the simulated
-+	  cape's EEPROM fields. The part-number field is required, the rest
-+	  are optional taking into default values.
-+
-+- capemaps: node contains list of cape mappings, which allow converting
-+	from a part-number & version tuple to the filename of the dtbo file.
-+	- part-number: part number contained in the EEPROM
-+	- version node containing a
-+		- version: specific version to map to
-+		- dtbo: name of the dtbo file
-+
-+Example:
-+bone_capemgr {
-+	compatible = "ti,bone-capemgr";
-+	status = "okay";
-+
-+	eeprom = <&baseboard_eeprom>;
-+
-+	baseboardmaps {
-+		baseboard_beaglebone: board@0 {
-+			board-name = "A335BONE";
-+			compatible-name = "ti,beaglebone";
-+		};
-+	};
-+
-+	slots {
-+		slot@0 {
-+			eeprom = <&cape_eeprom0>;
-+		};
-+
-+		slot@1 {
-+			eeprom = <&cape_eeprom1>;
-+		};
-+
-+		slot@2 {
-+			eeprom = <&cape_eeprom2>;
-+		};
-+
-+		slot@3 {
-+			eeprom = <&cape_eeprom3>;
-+		};
-+	};
-+
-+	/* mapping between board names and dtb objects */
-+	capemaps {
-+		/* Weather cape */
-+		cape@0 {
-+			part-number = "BB-BONE-WTHR-01";
-+			version@00A0 {
-+				version = "00A0";
-+				dtbo = "cape-bone-weather-00A0.dtbo";
-+			};
-+		};
-+	};
-+};
-+
-+Example of the override syntax when used on a bone compatible foo board.
-+
-+{
-+	...
-+
-+	baseboardmaps {
-+		...
-+		baseboard_beaglebone: board@0 {
-+			board-name = "A335FOO";
-+			compatible-name = "ti,foo";
-+		};
-+
-+		slot@6 {
-+			ti,cape-override;
-+			compatible = "ti,foo";
-+			board-name = "FOO-hardcoded";
-+			version = "00A0";
-+			manufacturer = "Texas Instruments";
-+			part-number = "BB-BONE-FOO-01";
-+		};
-+	};
-+
-+};
--- 
-1.7.10.4
-
diff --git a/patches/not-capebus/0032-capemgr-am33xx-family-DT-bindings.patch b/patches/not-capebus/0032-capemgr-am33xx-family-DT-bindings.patch
deleted file mode 100644
index b199c7302ebadc7bb587670439efd3daf273b2bd..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0032-capemgr-am33xx-family-DT-bindings.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-From cb4ddad04897551a8a59cd378ed0f27a2ace5459 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 28 Dec 2012 21:02:12 +0200
-Subject: [PATCH 32/90] capemgr: am33xx family DT bindings
-
-A cape loader based on DT overlays and DT objects.
-
-These are the DT bindings.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/boot/dts/am335x-bone-common.dtsi | 101 ++++++++++++++++++++++++++++++
- 1 file changed, 101 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
-index e43417b..1ddc72d 100644
---- a/arch/arm/boot/dts/am335x-bone-common.dtsi
-+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
-@@ -134,6 +134,107 @@
- 		};
- 	};
- 
-+	bone_capemgr {
-+		compatible = "ti,bone-capemgr";
-+		status = "okay";
-+
-+		eeprom = <&baseboard_eeprom>;
-+
-+		baseboardmaps {
-+			baseboard_beaglebone: board@0 {
-+				board-name = "A335BONE";
-+				compatible-name = "ti,beaglebone";
-+			};
-+
-+			baseboard_beaglebone_black: board@1 {
-+				board-name = "A335BNLT";
-+				compatible-name = "ti,beaglebone-black";
-+			};
-+		};
-+
-+		slots {
-+			slot@0 {
-+				eeprom = <&cape_eeprom0>;
-+			};
-+
-+			slot@1 {
-+				eeprom = <&cape_eeprom1>;
-+			};
-+
-+			slot@2 {
-+				eeprom = <&cape_eeprom2>;
-+			};
-+
-+			slot@3 {
-+				eeprom = <&cape_eeprom3>;
-+			};
-+
-+			/* Beaglebone black has it soldered on */
-+			// slot@4 {
-+			// 	ti,cape-override;
-+			// 	compatible = "ti,beaglebone-black";
-+			// 	board-name = "Bone-LT-eMMC-2G";
-+			// 	version = "00A0";
-+			// 	manufacturer = "Texas Instruments";
-+			// 	part-number = "BB-BONE-EMMC-2G";
-+			// };
-+
-+			/* geiger cape version A0 without an EEPROM */
-+			slot@5 {
-+				ti,cape-override;
-+				compatible = "kernel-command-line", "runtime";
-+				board-name = "Bone-Geiger";
-+				version = "00A0";
-+				manufacturer = "Geiger Inc.";
-+				part-number = "BB-BONE-GEIGER";
-+			};
-+		};
-+
-+		/* mapping between board names and dtb objects */
-+		capemaps {
-+			/* DVI cape */
-+			cape@0 {
-+				/* board-name = "BeagleBone DVI-D CAPE"; */
-+				part-number = "BB-BONE-DVID-01";
-+				version@00A0 {
-+					version = "00A0";
-+					dtbo = "cape-bone-dvi-00A0.dtbo";
-+				};
-+				version@00A1 {
-+					version = "00A1", "01";
-+					dtbo = "cape-bone-dvi-00A1.dtbo";
-+				};
-+			};
-+
-+			/* beaglebone black emmc on board */
-+			cape@1 {
-+				/* board-name = "BeagleBone 2G eMMC1 CAPE"; */
-+				part-number = "BB-BONE-EMMC-2G";
-+				version@00A0 {
-+					version = "00A0";
-+					dtbo = "cape-bone-2g-emmc1.dtbo";
-+				};
-+			};
-+
-+			/* geiger cape */
-+			cape@2 {
-+				part-number = "BB-BONE-GEIGER";
-+				version@00A0 {
-+					version = "00A0";
-+					dtbo = "cape-bone-geiger-00A0.dtbo";
-+				};
-+			};
-+
-+			/* LCD3 cape */
-+			cape@3 {
-+				part-number = "BB-BONE-LCD3-01";
-+				version@00A0 {
-+					version = "00A0";
-+					dtbo = "cape-bone-lcd3-00A0.dtbo";
-+				};
-+			};
-+		};
-+	};
- };
- 
- &i2c0 {
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0033-bone-geiger-Geiger-bone-driver.patch b/patches/not-capebus/0033-bone-geiger-Geiger-bone-driver.patch
deleted file mode 100644
index ed41ed5aec6dfc5c638c73080e973b154c241b92..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0033-bone-geiger-Geiger-bone-driver.patch
+++ /dev/null
@@ -1,511 +0,0 @@
-From 5ebf99a9ec78fe0eba51c1bd76740a0e012dbed4 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 28 Dec 2012 21:03:59 +0200
-Subject: [PATCH 33/90] bone-geiger: Geiger bone driver.
-
-A driver for the beaglebone geiger cape.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/misc/cape/beaglebone/cape-bone-geiger.c | 489 ++++++++++++++++++++++++
- 1 file changed, 489 insertions(+)
- create mode 100644 drivers/misc/cape/beaglebone/cape-bone-geiger.c
-
-diff --git a/drivers/misc/cape/beaglebone/cape-bone-geiger.c b/drivers/misc/cape/beaglebone/cape-bone-geiger.c
-new file mode 100644
-index 0000000..1e50594
---- /dev/null
-+++ b/drivers/misc/cape/beaglebone/cape-bone-geiger.c
-@@ -0,0 +1,489 @@
-+/*
-+ * Driver for beaglebone Geiger cape
-+ *
-+ * Copyright (C) 2012 Pantelis Antoniou <panto@antoniou-consulting.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/kernel.h>
-+#include <linux/string.h>
-+#include <linux/timer.h>
-+#include <linux/errno.h>
-+#include <linux/init.h>
-+#include <linux/delay.h>
-+#include <linux/bitops.h>
-+#include <linux/err.h>
-+#include <linux/of.h>
-+#include <linux/of_device.h>
-+#include <linux/of_gpio.h>
-+#include <linux/pinctrl/pinctrl.h>
-+#include <linux/pinctrl/pinmux.h>
-+#include <linux/pinctrl/consumer.h>
-+#include <linux/atomic.h>
-+#include <linux/clk.h>
-+#include <linux/interrupt.h>
-+#include <linux/clkdev.h>
-+#include <linux/pwm.h>
-+#include <linux/math64.h>
-+#include <linux/atomic.h>
-+#include <linux/leds.h>
-+#include <linux/input/ti_am335x_tsc.h>
-+#include <linux/platform_data/ti_am335x_adc.h>
-+#include <linux/mfd/ti_am335x_tscadc.h>
-+#include <linux/iio/iio.h>
-+#include <linux/iio/machine.h>
-+#include <linux/iio/consumer.h>
-+
-+/* fwd decl. */
-+struct bone_geiger_info {
-+	struct platform_device *pdev;
-+	struct pwm_device *pwm_dev;
-+	int pwm_frequency;
-+	int pwm_duty_cycle;
-+	int run;
-+	atomic64_t counter;
-+	int event_gpio;
-+	int event_irq;
-+	struct led_trigger *event_led;		/* event detect */
-+	struct led_trigger *run_led;		/* running      */
-+	unsigned long event_blink_delay;
-+	struct sysfs_dirent *counter_sd;	/* notifier */
-+	const char *vsense_name;
-+	unsigned int vsense_scale;
-+	struct iio_channel *vsense_channel;
-+};
-+
-+static const struct of_device_id bonegeiger_of_match[] = {
-+	{
-+		.compatible = "bone-cape-geiger",
-+	},
-+	{ },
-+};
-+MODULE_DEVICE_TABLE(of, bonegeiger_of_match);
-+
-+static int bonegeiger_start(struct platform_device *pdev)
-+{
-+	struct bone_geiger_info *info = platform_get_drvdata(pdev);
-+	int duty, period;
-+
-+	if (info->run != 0)
-+		return 0;
-+
-+	/* checks */
-+	if (info->pwm_frequency < 1000 || info->pwm_frequency > 50000) {
-+		dev_err(&pdev->dev, "Cowardly refusing to use a "
-+				"frequency of %d\n",
-+				info->pwm_frequency);
-+		return -EINVAL;
-+	}
-+	if (info->pwm_duty_cycle > 80) {
-+		dev_err(&pdev->dev, "Cowardly refusing to use a "
-+				"duty cycle of %d\n",
-+				info->pwm_duty_cycle);
-+		return -EINVAL;
-+	}
-+
-+	period = div_u64(1000000000LLU, info->pwm_frequency);
-+	duty = (period * info->pwm_duty_cycle) / 100;
-+
-+	dev_info(&pdev->dev, "starting geiger tube with "
-+			"duty=%duns period=%dus\n",
-+			duty, period);
-+
-+	pwm_config(info->pwm_dev, duty, period);
-+	pwm_enable(info->pwm_dev);
-+
-+	info->run = 1;
-+	led_trigger_event(info->run_led, LED_FULL);
-+
-+	return 0;
-+}
-+
-+static int bonegeiger_stop(struct platform_device *pdev)
-+{
-+	struct bone_geiger_info *info = platform_get_drvdata(pdev);
-+
-+	if (info->run == 0)
-+		return 0;
-+
-+	dev_info(&pdev->dev, "disabling geiger tube\n");
-+	pwm_config(info->pwm_dev, 0, 50000);	/* 0% duty cycle, 20KHz */
-+	pwm_disable(info->pwm_dev);
-+
-+	info->run = 0;
-+	led_trigger_event(info->run_led, LED_OFF);
-+
-+	return 0;
-+}
-+
-+static ssize_t bonegeiger_show_run(struct device *dev,
-+				struct device_attribute *attr, char *buf)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	struct bone_geiger_info *info = platform_get_drvdata(pdev);
-+
-+	return sprintf(buf, "%d\n", info->run);
-+}
-+
-+static ssize_t bonegeiger_store_run(struct device *dev,
-+				struct device_attribute *attr,
-+				const char *buf, size_t count)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	int run, err;
-+
-+	if (sscanf(buf, "%i", &run) != 1)
-+		return -EINVAL;
-+
-+	if (run)
-+		err = bonegeiger_start(pdev);
-+	else
-+		err = bonegeiger_stop(pdev);
-+
-+	return err ? err : count;
-+}
-+
-+static ssize_t bonegeiger_show_counter(struct device *dev,
-+				struct device_attribute *attr, char *buf)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	struct bone_geiger_info *info = platform_get_drvdata(pdev);
-+
-+	return sprintf(buf, "%llu\n", atomic64_read(&info->counter));
-+}
-+
-+static ssize_t bonegeiger_store_counter(struct device *dev,
-+				struct device_attribute *attr,
-+				const char *buf, size_t count)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	struct bone_geiger_info *info = platform_get_drvdata(pdev);
-+
-+	atomic64_set(&info->counter, 0);	/* just reset */
-+	return count;
-+}
-+
-+static ssize_t bonegeiger_show_vsense(struct device *dev,
-+				struct device_attribute *attr, char *buf)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	struct bone_geiger_info *info = platform_get_drvdata(pdev);
-+	int ret, val;
-+	u32 mvolts;
-+
-+	ret = iio_read_channel_raw(info->vsense_channel, &val);
-+	if (ret < 0)
-+		return ret;
-+
-+	/* V = (1800 / 4096) * val * scale) = (1.8 * val * scale / 4096) */
-+	mvolts = div_u64(1800 * info->vsense_scale * (u64)val, 4096 * 100);
-+
-+	return sprintf(buf, "%d\n", mvolts);
-+}
-+
-+static DEVICE_ATTR(run, S_IRUGO | S_IWUSR,
-+		bonegeiger_show_run, bonegeiger_store_run);
-+static DEVICE_ATTR(counter, S_IRUGO | S_IWUSR,
-+		bonegeiger_show_counter, bonegeiger_store_counter);
-+static DEVICE_ATTR(vsense, S_IRUGO,
-+		bonegeiger_show_vsense, NULL);
-+
-+static int bonegeiger_sysfs_register(struct platform_device *pdev)
-+{
-+	int err;
-+
-+	err = device_create_file(&pdev->dev, &dev_attr_run);
-+	if (err != 0)
-+		goto err_no_run;
-+
-+	err = device_create_file(&pdev->dev, &dev_attr_counter);
-+	if (err != 0)
-+		goto err_no_counter;
-+
-+	err = device_create_file(&pdev->dev, &dev_attr_vsense);
-+	if (err != 0)
-+		goto err_no_vsense;
-+
-+	return 0;
-+
-+err_no_vsense:
-+	device_remove_file(&pdev->dev, &dev_attr_counter);
-+err_no_counter:
-+	device_remove_file(&pdev->dev, &dev_attr_run);
-+err_no_run:
-+	return err;
-+}
-+
-+static void bonegeiger_sysfs_unregister(struct platform_device *pdev)
-+{
-+	device_remove_file(&pdev->dev, &dev_attr_vsense);
-+	device_remove_file(&pdev->dev, &dev_attr_counter);
-+	device_remove_file(&pdev->dev, &dev_attr_run);
-+}
-+
-+static irqreturn_t bonegeiger_irq_handler(int irq, void *dev_id)
-+{
-+	struct platform_device *pdev = dev_id;
-+	struct bone_geiger_info *info = platform_get_drvdata(pdev);
-+
-+	atomic64_inc(&info->counter);
-+
-+	led_trigger_blink_oneshot(info->event_led,
-+		  &info->event_blink_delay, &info->event_blink_delay, 0);
-+
-+	sysfs_notify_dirent(info->counter_sd);
-+
-+	return IRQ_HANDLED;
-+}
-+
-+static int bonegeiger_probe(struct platform_device *pdev)
-+{
-+	struct bone_geiger_info *info;
-+	struct pinctrl *pinctrl;
-+	struct device_node *pnode = pdev->dev.of_node;
-+	phandle phandle;
-+	u32 val;
-+	int err;
-+
-+	/* we only support OF */
-+	if (pnode == NULL) {
-+		dev_err(&pdev->dev, "No platform of_node!\n");
-+		return -ENODEV;
-+	}
-+
-+	info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
-+	if (info == NULL) {
-+		dev_err(&pdev->dev, "Failed to allocate info\n");
-+		err = -ENOMEM;
-+		goto err_no_mem;
-+	}
-+	platform_set_drvdata(pdev, info);
-+	info->pdev = pdev;
-+
-+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-+	if (IS_ERR(pinctrl))
-+		dev_warn(&pdev->dev,
-+			"pins are not configured from the driver\n");
-+
-+	err = of_property_read_u32(pnode, "pwms", &val);
-+	if (err != 0) {
-+		dev_err(&pdev->dev, "unable to read pwm handle\n");
-+		goto err_no_pwm;
-+	}
-+	phandle = val;
-+
-+	info->pwm_dev = of_pwm_request(pnode, NULL);
-+	if (IS_ERR(info->pwm_dev)) {
-+		dev_err(&pdev->dev, "unable to request PWM\n");
-+		err = PTR_ERR(info->pwm_dev);
-+		goto err_no_pwm;
-+	}
-+
-+	if (of_property_read_u32(pnode, "pwm-frequency", &val) != 0) {
-+		val = 20000;
-+		dev_warn(&pdev->dev, "Could not read pwm-frequency property; "
-+				"using default %u\n",
-+				val);
-+	}
-+	info->pwm_frequency = val;
-+
-+	if (of_property_read_u32(pnode, "pwm-duty-cycle", &val) != 0) {
-+		val = 60;
-+		dev_warn(&pdev->dev, "Could not read pwm-duty-cycle property; "
-+				"using default %u\n",
-+				val);
-+	}
-+	info->pwm_duty_cycle = val;
-+
-+	info->event_gpio = of_get_gpio_flags(pnode, 0, NULL);
-+	if (IS_ERR_VALUE(info->event_gpio)) {
-+		dev_err(&pdev->dev, "unable to get event GPIO\n");
-+		err = info->event_gpio;
-+		goto err_no_gpio;
-+	}
-+
-+	err = gpio_request_one(info->event_gpio,
-+			GPIOF_DIR_IN | GPIOF_EXPORT,
-+			"bone-geiger-cape-event");
-+	if (err != 0) {
-+		dev_err(&pdev->dev, "failed to request event GPIO\n");
-+		goto err_no_gpio;
-+	}
-+
-+	atomic64_set(&info->counter, 0);
-+
-+	info->event_irq = gpio_to_irq(info->event_gpio);
-+	if (IS_ERR_VALUE(info->event_irq)) {
-+		dev_err(&pdev->dev, "unable to get event GPIO IRQ\n");
-+		err = info->event_irq;
-+		goto err_no_irq;
-+	}
-+
-+	err = request_irq(info->event_irq, bonegeiger_irq_handler,
-+			IRQF_TRIGGER_RISING | IRQF_SHARED,
-+			"bone-geiger-irq", pdev);
-+	if (err != 0) {
-+		dev_err(&pdev->dev, "unable to request irq\n");
-+		goto err_no_irq;
-+	}
-+
-+	err = bonegeiger_sysfs_register(pdev);
-+	if (err != 0) {
-+		dev_err(&pdev->dev, "unable to register sysfs\n");
-+		goto err_no_sysfs;
-+	}
-+
-+	info->counter_sd = sysfs_get_dirent(pdev->dev.kobj.sd, NULL, "counter");
-+	if (info->counter_sd == NULL) {
-+		dev_err(&pdev->dev, "unable to get dirent of counter\n");
-+		err = -ENODEV;
-+		goto err_no_counter_dirent;
-+	}
-+
-+	led_trigger_register_simple("geiger-event", &info->event_led);
-+	led_trigger_register_simple("geiger-run", &info->run_led);
-+
-+	led_trigger_event(info->run_led, LED_OFF);
-+
-+	/* default */
-+	if (of_property_read_u32(pnode, "event-blink-delay", &val) != 0) {
-+		val = 30;
-+		dev_warn(&pdev->dev, "Could not read event-blink-delay "
-+				"property; using default %u\n",
-+					val);
-+	}
-+	info->event_blink_delay = val;
-+
-+	/* default */
-+	if (of_property_read_string(pnode, "vsense-name", &info->vsense_name) != 0) {
-+		info->vsense_name = "AIN5";
-+		dev_warn(&pdev->dev, "Could not read vsense-name property; "
-+				"using default '%s'\n",
-+					info->vsense_name);
-+	}
-+
-+	if (of_property_read_u32(pnode, "vsense-scale", &info->vsense_scale) != 0) {
-+		info->vsense_scale = 37325;	/* 373.25 */
-+		dev_warn(&pdev->dev, "Could not read vsense-scale property; "
-+				"using default %u\n",
-+					info->vsense_scale);
-+	}
-+
-+	info->vsense_channel = iio_channel_get(NULL, info->vsense_name);
-+	if (IS_ERR(info->vsense_channel)) {
-+		dev_err(&pdev->dev, "Could not get AIN5 analog input\n");
-+		err = PTR_ERR(info->vsense_channel);
-+		goto err_no_vsense;
-+	}
-+
-+	dev_info(&pdev->dev, "ready\n");
-+
-+	err = bonegeiger_start(pdev);
-+	if (err != 0) {
-+		dev_err(&pdev->dev, "Could not start geiger device\n");
-+		goto err_no_start;
-+	}
-+
-+	return 0;
-+
-+err_no_start:
-+	iio_channel_release(info->vsense_channel);
-+err_no_vsense:
-+	led_trigger_unregister_simple(info->run_led);
-+	led_trigger_unregister_simple(info->event_led);
-+	sysfs_put(info->counter_sd);
-+err_no_counter_dirent:
-+	bonegeiger_sysfs_unregister(pdev);
-+err_no_sysfs:
-+	free_irq(info->event_irq, pdev);
-+err_no_irq:
-+	gpio_free(info->event_gpio);
-+err_no_gpio:
-+	pwm_put(info->pwm_dev);
-+err_no_pwm:
-+	devm_kfree(&pdev->dev, info);
-+err_no_mem:
-+	return err;
-+}
-+
-+static int bonegeiger_remove(struct platform_device *pdev)
-+{
-+	struct bone_geiger_info *info = platform_get_drvdata(pdev);
-+
-+	dev_info(&pdev->dev, "Removing geiger cape driver...\n");
-+
-+	bonegeiger_stop(pdev);
-+
-+	iio_channel_release(info->vsense_channel);
-+	led_trigger_unregister_simple(info->run_led);
-+	led_trigger_unregister_simple(info->event_led);
-+	sysfs_put(info->counter_sd);
-+	bonegeiger_sysfs_unregister(pdev);
-+	free_irq(info->event_irq, pdev);
-+	gpio_free(info->event_gpio);
-+	pwm_put(info->pwm_dev);
-+
-+	return 0;
-+}
-+
-+#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_RUNTIME
-+static int bonegeiger_runtime_suspend(struct device *dev)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	struct bonegeiger_info *_dev = platform_get_drvdata(pdev);
-+
-+	(void)_dev;
-+	return 0;
-+}
-+
-+static int bonegeiger_runtime_resume(struct device *dev)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	struct bonegeiger_info *_dev = platform_get_drvdata(pdev);
-+
-+	(void)_dev;
-+	return 0;
-+}
-+#endif /* CONFIG_PM_RUNTIME */
-+
-+static struct dev_pm_ops bonegeiger_pm_ops = {
-+	SET_RUNTIME_PM_OPS(bonegeiger_runtime_suspend,
-+			   bonegeiger_runtime_resume, NULL)
-+};
-+#define BONEGEIGER_PM_OPS (&bonegeiger_pm_ops)
-+#else
-+#define BONEGEIGER_PM_OPS NULL
-+#endif /* CONFIG_PM */
-+
-+struct platform_driver bonegeiger_driver = {
-+	.probe		= bonegeiger_probe,
-+	.remove		= bonegeiger_remove,
-+	.driver = {
-+		.name		= "bone-cape-geiger",
-+		.owner		= THIS_MODULE,
-+		.pm		= BONEGEIGER_PM_OPS,
-+		.of_match_table	= bonegeiger_of_match,
-+	},
-+};
-+
-+module_platform_driver(bonegeiger_driver);
-+
-+MODULE_AUTHOR("Pantelis Antoniou");
-+MODULE_DESCRIPTION("Beaglebone geiger cape");
-+MODULE_LICENSE("GPL");
-+MODULE_ALIAS("platform:bone-cape-geiger");
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0034-capemgr-firmware-makefiles-for-DT-objects.patch b/patches/not-capebus/0034-capemgr-firmware-makefiles-for-DT-objects.patch
deleted file mode 100644
index 647e9f4e65b0a59b86b125209a65b3ef6887623a..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0034-capemgr-firmware-makefiles-for-DT-objects.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 86073f191476f9b81949f220f0ffc563c2da9364 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 28 Dec 2012 21:05:28 +0200
-Subject: [PATCH 34/90] capemgr: firmware makefiles for DT objects
-
-Makefile changes to support the DT cape definitions.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/Makefile | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/firmware/Makefile b/firmware/Makefile
-index cbb09ce..f47024c 100644
---- a/firmware/Makefile
-+++ b/firmware/Makefile
-@@ -136,6 +136,16 @@ fw-shipped-$(CONFIG_USB_VICAM) += vicam/firmware.fw
- fw-shipped-$(CONFIG_VIDEO_CPIA2) += cpia2/stv0672_vp4.bin
- fw-shipped-$(CONFIG_YAM) += yam/1200.bin yam/9600.bin
- 
-+# all the generic capes
-+fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \
-+	capes/cape-bone-2g-emmc1.dtbo \
-+	capes/cape-bone-dvi-00A0.dtbo capes/cape-bone-dvi-00A1.dtbo \
-+	capes/cape-bone-lcd3-00A0.dtbo
-+
-+# the geiger cape
-+fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += \
-+	capes/cape-bone-geiger-00A0.dtbo
-+
- fw-shipped-all := $(fw-shipped-y) $(fw-shipped-m) $(fw-shipped-)
- 
- # Directories which we _might_ need to create, so we have a rule for them.
-@@ -147,6 +157,9 @@ quiet_cmd_mkdir = MKDIR   $(patsubst $(objtree)/%,%,$@)
- quiet_cmd_ihex  = IHEX    $@
-       cmd_ihex  = $(OBJCOPY) -Iihex -Obinary $< $@
- 
-+quiet_cmd_dtco	= DTCO $@
-+      cmd_dtco	= $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -@ $<
-+
- quiet_cmd_ihex2fw  = IHEX2FW $@
-       cmd_ihex2fw  = $(objtree)/$(obj)/ihex2fw $< $@
- 
-@@ -233,6 +246,10 @@ $(obj)/%.fw: $(obj)/%.HEX $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %)
- $(obj)/%.fw: $(obj)/%.H16 $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %)
- 	$(call cmd,h16tofw)
- 
-+# DTBO is device tree blob object
-+$(obj)/%.dtbo: $(obj)/%.dts | $(objtree)/$(obj)/$$(dir %)
-+	$(call cmd,dtco)
-+
- $(firmware-dirs):
- 	$(call cmd,mkdir)
- 
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0035-capemgr-emmc2-cape-definition.patch b/patches/not-capebus/0035-capemgr-emmc2-cape-definition.patch
deleted file mode 100644
index 910e84487d3d7befc65ba7ee2831de6b12e7d58f..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0035-capemgr-emmc2-cape-definition.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From db7e26863b4c2be3f58a0088dddf1734fb8d82cd Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 28 Dec 2012 21:07:18 +0200
-Subject: [PATCH 35/90] capemgr: emmc2 cape definition.
-
-Definition for a virtual eMMC cape.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/capes/cape-bone-2g-emmc1.dts | 53 +++++++++++++++++++++++++++++++++++
- 1 file changed, 53 insertions(+)
- create mode 100644 firmware/capes/cape-bone-2g-emmc1.dts
-
-diff --git a/firmware/capes/cape-bone-2g-emmc1.dts b/firmware/capes/cape-bone-2g-emmc1.dts
-new file mode 100644
-index 0000000..c81a986
---- /dev/null
-+++ b/firmware/capes/cape-bone-2g-emmc1.dts
-@@ -0,0 +1,53 @@
-+/*
-+* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
-+*
-+* This program is free software; you can redistribute it and/or modify
-+* it under the terms of the GNU General Public License version 2 as
-+* published by the Free Software Foundation.
-+*/
-+/dts-v1/;
-+/plugin/;
-+
-+/ {
-+	compatible = "ti,beaglebone-black";
-+	ti,on-baseboard;
-+
-+	/* identification */
-+	part-number = "*";	/* any part number */
-+	version = "*";		/* any version */
-+
-+	fragment@0 {
-+		target = <&am33xx_pinmux>;
-+		__overlay__ {
-+			emmc2_pins: pinmux_emmc2_pins {
-+				pinctrl-single,pins = <
-+					0x80 0x32	/* gpmc_csn1.mmc1_clk, INPUT_PULLUP | MODE2 */
-+					0x84 0x32	/* gpmc_csn1.mmc1_cmd, INPUT_PULLUP | MODE2 */
-+					0x00 0x31	/* gpmc_ad0.mmc1_dat0, INPUT_PULLUP | MODE1 */
-+					0x04 0x31	/* gpmc_ad1.mmc1_dat1, INPUT_PULLUP | MODE1 */
-+					0x08 0x31	/* gpmc_ad2.mmc1_dat2, INPUT_PULLUP | MODE1 */
-+					0x0c 0x31	/* gpmc_ad3.mmc1_dat3, INPUT_PULLUP | MODE1 */
-+					0x10 0x31	/* gpmc_ad4.mmc1_dat4, INPUT_PULLUP | MODE1 */
-+					0x14 0x31	/* gpmc_ad5.mmc1_dat5, INPUT_PULLUP | MODE1 */
-+					0x18 0x31	/* gpmc_ad6.mmc1_dat6, INPUT_PULLUP | MODE1 */
-+					0x1c 0x31	/* gpmc_ad7.mmc1_dat7, INPUT_PULLUP | MODE1 */
-+
-+					/* the reset */
-+					0x50 0x17	/* gpmc_a4.gpio1_20, OUTPUT | MODE7 | PULLUP */
-+				>;
-+			};
-+		};
-+	};
-+	fragment@1 {
-+		target = <&mmc2>;
-+		__overlay__ {
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&emmc2_pins>;	/* wrong numbering */
-+			vmmc-supply = <&ldo3_reg>;
-+			bus-width = <4>;
-+			ti,non-removable;
-+			status = "okay";
-+			reset-gpios = <&gpio2 20 1>;	/* active low */
-+		};
-+	};
-+};
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0036-capemgr-DVI-capes-definitions.patch b/patches/not-capebus/0036-capemgr-DVI-capes-definitions.patch
deleted file mode 100644
index c07db08bc2b4aa749814128b59667b72c8911815..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0036-capemgr-DVI-capes-definitions.patch
+++ /dev/null
@@ -1,220 +0,0 @@
-From 269ebaa5583667eba38c1c6d19230565aaae771a Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 28 Dec 2012 21:08:16 +0200
-Subject: [PATCH 36/90] capemgr: DVI capes definitions
-
-Definitions for the beaglebone DVI capes.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/capes/cape-bone-dvi-00A0.dts | 95 +++++++++++++++++++++++++++++++++++
- firmware/capes/cape-bone-dvi-00A1.dts | 95 +++++++++++++++++++++++++++++++++++
- 2 files changed, 190 insertions(+)
- create mode 100644 firmware/capes/cape-bone-dvi-00A0.dts
- create mode 100644 firmware/capes/cape-bone-dvi-00A1.dts
-
-diff --git a/firmware/capes/cape-bone-dvi-00A0.dts b/firmware/capes/cape-bone-dvi-00A0.dts
-new file mode 100644
-index 0000000..b9db80b
---- /dev/null
-+++ b/firmware/capes/cape-bone-dvi-00A0.dts
-@@ -0,0 +1,95 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ */
-+/dts-v1/;
-+/plugin/;
-+
-+/ {
-+	compatible = "ti,beaglebone", "ti,beaglebone-black";
-+
-+	/* identification */
-+	part-number = "BB-BONE-DVID-01";
-+	version = "00A0";
-+
-+	fragment@0 {
-+		target = <&am33xx_pinmux>;
-+		__overlay__ {
-+
-+			bone_dvi_cape_led_pins: pinmux_bone_dvi_cape_led_pins {
-+				pinctrl-single,pins = <
-+					0x48 0x07	/* gpmc_a2.gpio1_18, OUTPUT | MODE7 */
-+					0x4c 0x07	/* gpmc_a3.gpio1_19, OUTPUT | MODE7 */
-+				>;
-+			};
-+
-+			bone_dvi_cape_dvi_00A0_pins: pinmux_bone_dvi_cape_dvi_00A0_pins {
-+				pinctrl-single,pins = <
-+					0x1c 0x07	/* gpmc_ad7.gpio1_7, OUTPUT | MODE7 - DVIPDn */
-+
-+					0xa0 0x08	/* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xa4 0x08	/* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xa8 0x08	/* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xac 0x08	/* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb0 0x08	/* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb4 0x08	/* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb8 0x08	/* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xbc 0x08	/* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc0 0x08	/* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc4 0x08	/* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc8 0x08	/* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xcc 0x08	/* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd0 0x08	/* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd4 0x08	/* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd8 0x08	/* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xdc 0x08	/* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xe0 0x00	/* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xe4 0x00	/* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xe8 0x00	/* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+				>;
-+			};
-+		};
-+	};
-+
-+	fragment@1 {
-+		target = <&ocp>;
-+		__overlay__ {
-+
-+			gpio-leds-cape-dvi {
-+				compatible = "gpio-leds";
-+				pinctrl-names = "default";
-+				pinctrl-0 = <&bone_dvi_cape_led_pins>;
-+
-+				dvi-led0 {
-+					label = "dvi:green:usr0";
-+					gpios = <&gpio2 18 0>;
-+					linux,default-trigger = "heartbeat";
-+					default-state = "off";
-+				};
-+
-+				dvi-led1 {
-+					label = "dvi:green:usr1";
-+					gpios = <&gpio2 19 0>;
-+					linux,default-trigger = "mmc0";
-+					default-state = "off";
-+				};
-+			};
-+
-+			dvi-cape {
-+				compatible = "da8xx-dt";
-+				pinctrl-names = "default";
-+				ti,hwmods = "lcdc";
-+
-+				disp-pll = <560000000>;
-+				panel-type = "1024x768@60";
-+
-+				pinctrl-0 = <&bone_dvi_cape_dvi_00A0_pins>;
-+				powerdn-gpio = <&gpio2 7 0>;
-+			};
-+		};
-+	};
-+};
-diff --git a/firmware/capes/cape-bone-dvi-00A1.dts b/firmware/capes/cape-bone-dvi-00A1.dts
-new file mode 100644
-index 0000000..567d12b
---- /dev/null
-+++ b/firmware/capes/cape-bone-dvi-00A1.dts
-@@ -0,0 +1,95 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ */
-+/dts-v1/;
-+/plugin/;
-+
-+/ {
-+	compatible = "ti,beaglebone", "ti,beaglebone-black";
-+
-+	/* identification */
-+	part-number = "BB-BONE-DVID-01";
-+	version = "00A1", "01";
-+
-+	fragment@0 {
-+		target = <&am33xx_pinmux>;
-+		__overlay__ {
-+
-+			bone_dvi_cape_led_pins: pinmux_bone_dvi_cape_led_pins {
-+				pinctrl-single,pins = <
-+					0x48 0x07	/* gpmc_a2.gpio1_18, OUTPUT | MODE7 */
-+					0x4c 0x07	/* gpmc_a3.gpio1_19, OUTPUT | MODE7 */
-+				>;
-+			};
-+
-+			bone_dvi_cape_dvi_00A1_pins: pinmux_bone_dvi_cape_dvi_00A1_pins {
-+				pinctrl-single,pins = <
-+					0x84 0x07	/* gpmc_csn2.gpio1_31, OUTPUT | MODE7 - DVIPDn */
-+
-+					0xa0 0x08	/* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xa4 0x08	/* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xa8 0x08	/* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xac 0x08	/* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb0 0x08	/* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb4 0x08	/* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb8 0x08	/* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xbc 0x08	/* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc0 0x08	/* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc4 0x08	/* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc8 0x08	/* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xcc 0x08	/* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd0 0x08	/* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd4 0x08	/* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd8 0x08	/* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xdc 0x08	/* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xe0 0x00	/* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xe4 0x00	/* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xe8 0x00	/* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+				>;
-+			};
-+		};
-+	};
-+
-+	fragment@1 {
-+		target = <&ocp>;
-+		__overlay__ {
-+
-+			gpio-leds-cape-dvi {
-+				compatible = "gpio-leds";
-+				pinctrl-names = "default";
-+				pinctrl-0 = <&bone_dvi_cape_led_pins>;
-+
-+				dvi-led0 {
-+					label = "dvi:green:usr0";
-+					gpios = <&gpio2 18 0>;
-+					linux,default-trigger = "heartbeat";
-+					default-state = "off";
-+				};
-+
-+				dvi-led1 {
-+					label = "dvi:green:usr1";
-+					gpios = <&gpio2 19 0>;
-+					linux,default-trigger = "mmc0";
-+					default-state = "off";
-+				};
-+			};
-+
-+			dvi-cape {
-+				compatible = "da8xx-dt";
-+				pinctrl-names = "default";
-+				ti,hwmods = "lcdc";
-+
-+				disp-pll = <560000000>;
-+				panel-type = "1024x768@60";
-+
-+				pinctrl-0 = <&bone_dvi_cape_dvi_00A1_pins>;
-+				powerdn-gpio = <&gpio2 31 0>;
-+			};
-+		};
-+	};
-+};
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0037-capemgr-Geiger-cape-definition.patch b/patches/not-capebus/0037-capemgr-Geiger-cape-definition.patch
deleted file mode 100644
index 81374ae198ea19f2965c75f28ae7735e349ffa85..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0037-capemgr-Geiger-cape-definition.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From d8faa78458ecbadf833dbe33e36cd8657f228864 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 28 Dec 2012 21:09:01 +0200
-Subject: [PATCH 37/90] capemgr: Geiger cape definition
-
-Geiger Cape definition
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/capes/cape-bone-geiger-00A0.dts | 98 ++++++++++++++++++++++++++++++++
- 1 file changed, 98 insertions(+)
- create mode 100644 firmware/capes/cape-bone-geiger-00A0.dts
-
-diff --git a/firmware/capes/cape-bone-geiger-00A0.dts b/firmware/capes/cape-bone-geiger-00A0.dts
-new file mode 100644
-index 0000000..aded3f5
---- /dev/null
-+++ b/firmware/capes/cape-bone-geiger-00A0.dts
-@@ -0,0 +1,98 @@
-+/*
-+ * Copyright (C) 2012 Pantelis Antoniou <panto@antoniou-consulting.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ */
-+/dts-v1/;
-+/plugin/;
-+
-+/ {
-+	compatible = "ti,beaglebone", "ti,beaglebone-black";
-+
-+	/* identification */
-+	part-number = "BB-BONE-GEIGER";
-+	version = "00A0";
-+
-+	fragment@0 {
-+		target = <&am33xx_pinmux>;
-+		__overlay__ {
-+
-+			bone_geiger_cape_led_pins: pinmux_bone_geiger_cape_led_pins {
-+				pinctrl-single,pins = <
-+					0xe4 0x07	/* lcd_hsync.gpio2_23, OUTPUT | MODE7 */
-+					0xec 0x07	/* lcd_ac_bias_en.gpio2_25, OUTPUT | MODE7 */
-+				>;
-+			};
-+
-+			bone_geiger_cape_pins: pinmux_bone_geiger_cape_pins {
-+				pinctrl-single,pins = <
-+					0x48 0x06       /* gpmc_a2.ehrpwm1a, OMAP_MUX_MODE6 | AM33XX_PIN_OUTPUT */
-+					/* 0x19c 0x34 */	/* mcasp0_ahclkr.eCAP2_in_PWM2_out, OMAP_MUX_MODE4 | INPUT_PULLUP */
-+					0x19c 0x37 	/* mcasp0_ahclkr.gpio3_17, OMAP_MUX_MODE4 | INPUT_PULLUP */
-+				>;
-+			};
-+		};
-+	};
-+
-+	fragment@1 {
-+		target = <&ehrpwm1>;
-+		__overlay__ {
-+			status = "okay";
-+		};
-+	};
-+
-+	fragment@2 {
-+		target = <&ocp>;
-+		__overlay__ {
-+
-+			gpio-leds-cape-geiger {
-+				compatible = "gpio-leds";
-+				pinctrl-names = "default";
-+				pinctrl-0 = <&bone_geiger_cape_led_pins>;
-+
-+				geiger-led0 {
-+					label = "geiger:green:usr0";
-+					gpios = <&gpio3 23 0>;
-+					linux,default-trigger = "geiger-run";
-+					default-state = "off";
-+				};
-+
-+				geiger-led1 {
-+					label = "geiger:red:usr1";
-+					gpios = <&gpio3 25 0>;
-+					linux,default-trigger = "geiger-event";
-+					default-state = "off";
-+				};
-+
-+			};
-+
-+			tscadc-cape-geiger {
-+				compatible = "ti-tscadc-dt";
-+				adc-channels = <8>;
-+			};
-+
-+			bone-cape-geiger {
-+				compatible = "bone-cape-geiger";
-+				status = "okay";
-+
-+				pinctrl-names = "default";
-+				pinctrl-0 = <&bone_geiger_cape_pins>;
-+
-+				pwms = <&ehrpwm1 0 500000 0>;
-+				pwm-names = "bone-geiger-cape";
-+
-+				pwm-frequency  = <20000>;	/* 20KHz */
-+				pwm-duty-cycle = <60>;		/* 60% */
-+
-+				event-blink-delay = <30>;	/* 30ms */
-+
-+				gpios = <&gpio4 17 0>;		/* pulse */
-+
-+				vsense-name = "AIN5";		/* analog vsense */
-+				vsense-scale = <37325>;		/* scaling */
-+			};
-+		};
-+	};
-+};
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0038-capemgr-LCD3-cape-definition.patch b/patches/not-capebus/0038-capemgr-LCD3-cape-definition.patch
deleted file mode 100644
index 4bc452750f4fe60f92601f46bba269e20f26f4e5..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0038-capemgr-LCD3-cape-definition.patch
+++ /dev/null
@@ -1,200 +0,0 @@
-From 491b4baa1c53aeb3f4513ff9b6dd29d8c0b23db3 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 28 Dec 2012 21:09:48 +0200
-Subject: [PATCH 38/90] capemgr: LCD3 cape definition
-
-Definition for the beaglebone LCD3 cape.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/capes/cape-bone-lcd3-00A0.dts | 178 +++++++++++++++++++++++++++++++++
- 1 file changed, 178 insertions(+)
- create mode 100644 firmware/capes/cape-bone-lcd3-00A0.dts
-
-diff --git a/firmware/capes/cape-bone-lcd3-00A0.dts b/firmware/capes/cape-bone-lcd3-00A0.dts
-new file mode 100644
-index 0000000..0a3079e
---- /dev/null
-+++ b/firmware/capes/cape-bone-lcd3-00A0.dts
-@@ -0,0 +1,178 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ */
-+/dts-v1/;
-+/plugin/;
-+
-+/ {
-+	compatible = "ti,beaglebone", "ti,beaglebone-black";
-+
-+	/* identification */
-+	part-number = "BB-BONE-LCD3-01";
-+	version = "00A0";
-+
-+	fragment@0 {
-+		target = <&am33xx_pinmux>;
-+		__overlay__ {
-+
-+			bone_lcd3_cape_led_00A0_pins: pinmux_bone_lcd3_cape_led_00A0_pins {
-+				pinctrl-single,pins = <
-+					0x48 0x07	/* gpmc_a2.gpio1_18, OUTPUT | MODE7 */
-+					0x4c 0x07	/* gpmc_a3.gpio1_19, OUTPUT | MODE7 */
-+				>;
-+			};
-+
-+			bone_lcd3_cape_lcd_pins: pinmux_bone_lcd3_cape_lcd_pins {
-+				pinctrl-single,pins = <
-+					0xa0 0x08	/* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xa4 0x08	/* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xa8 0x08	/* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xac 0x08	/* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb0 0x08	/* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb4 0x08	/* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb8 0x08	/* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xbc 0x08	/* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc0 0x08	/* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc4 0x08	/* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc8 0x08	/* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xcc 0x08	/* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd0 0x08	/* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd4 0x08	/* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd8 0x08	/* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xdc 0x08	/* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xe0 0x00	/* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xe4 0x00	/* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xe8 0x00	/* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+				>;
-+			};
-+
-+			bone_lcd3_cape_keys_00A0_pins: pinmux_bone_lcd3_cape_keys_00A0_pins {
-+				pinctrl-single,pins = <
-+					0x040 0x2f	/* gpmc_a0.gpio1_16, INPUT | PULLDIS | MODE7 */
-+					0x044 0x2f	/* gpmc_a1.gpio1_17, INPUT | PULLDIS | MODE7 */
-+					0x1a4 0x2f	/* mcasp0_fsr.gpio3_19, INPUT | PULLDIS | MODE7 */
-+					0x078 0x2f	/* gpmc_ben1.gpio1_28, INPUT | PULLDIS | MODE7 */
-+					0x164 0x2f	/* ecap0_in_pwm0_out.gpio0_7, INPUT | PULLDIS | MODE7 */
-+				>;
-+			};
-+
-+		};
-+	};
-+
-+	fragment@1 {
-+		target = <&tps>;
-+		__overlay__ {
-+			backlight {
-+				compatible = "tps65217-backlight";
-+				isel = <1>;
-+				fdim = <200>;
-+				brightness = <100>;
-+				tps = <&tps>;
-+			};
-+		};
-+	};
-+
-+	fragment@2 {
-+		target = <&ocp>;
-+		__overlay__ {
-+
-+			tscadc {
-+				compatible = "ti-tscadc-dt";
-+
-+				tsc-wires = <4>;
-+				tsc-x-plate-resistance = <200>;
-+				tsc-steps = <6>;
-+
-+				adc-channels = <4>;
-+			};
-+
-+			gpio-leds-cape-lcd3 {
-+				compatible = "gpio-leds";
-+				pinctrl-names = "default";
-+
-+				pinctrl-0 = <&bone_lcd3_cape_led_00A0_pins>;
-+
-+				lcd3-led0 {
-+					label = "lcd3:green:usr0";
-+					gpios = <&gpio2 18 0>;
-+					linux,default-trigger = "heartbeat";
-+					default-state = "off";
-+				};
-+
-+				lcd3-led1 {
-+					label = "lcd3:green:usr1";
-+					gpios = <&gpio2 19 0>;
-+					linux,default-trigger = "cpu0";
-+					default-state = "off";
-+				};
-+			};
-+
-+			gpio_keys {
-+				compatible = "gpio-keys";
-+				pinctrl-names = "default";
-+				pinctrl-0 = <&bone_lcd3_cape_keys_00A0_pins>;
-+
-+				#address-cells = <1>;
-+				#size-cells = <0>;
-+
-+				button@1 {
-+					debounce_interval = <50>;
-+					linux,code = <105>;
-+					label = "left";
-+					gpios = <&gpio2 16 0x0>;
-+					gpio-key,wakeup;
-+					autorepeat;
-+				};
-+				button@2 {
-+					debounce_interval = <50>;
-+					linux,code = <106>;
-+					label = "right";
-+					gpios = <&gpio2 17 0x0>;
-+					gpio-key,wakeup;
-+					autorepeat;
-+				};
-+				button@3 {
-+					debounce_interval = <50>;
-+					linux,code = <103>;
-+					label = "up";
-+					gpios = <&gpio4 19 0x0>;
-+					gpio-key,wakeup;
-+					autorepeat;
-+				};
-+				button@4 {
-+					debounce_interval = <50>;
-+					linux,code = <108>;
-+					label = "down";
-+					gpios = <&gpio2 28 0x0>;
-+					gpio-key,wakeup;
-+					autorepeat;
-+				};
-+				button@5 {
-+					debounce_interval = <50>;
-+					linux,code = <28>;
-+					label = "enter";
-+					gpios = <&gpio1 7 0x0>;
-+					gpio-key,wakeup;
-+				};
-+			};
-+
-+			lcd3-cape {
-+				compatible = "da8xx-dt";
-+
-+				pinctrl-names = "default";
-+				pinctrl-0 = <&bone_lcd3_cape_lcd_pins>;
-+
-+				ti,hwmods = "lcdc";
-+
-+				disp-pll = <16000000>;
-+				panel-type = "CDTech_S035Q01";
-+
-+			};
-+		};
-+	};
-+};
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0039-capemgr-Add-weather-cape-definition.patch b/patches/not-capebus/0039-capemgr-Add-weather-cape-definition.patch
deleted file mode 100644
index c11a1aba946cb5e45b297a06cdaec790672d152e..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0039-capemgr-Add-weather-cape-definition.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From 07bc904c3a62756820e96a10120a4f7a4f42e06b Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Mon, 7 Jan 2013 18:42:24 +0200
-Subject: [PATCH 39/90] capemgr: Add weather cape definition
-
-Circuit-co's weather cape definition.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/boot/dts/am335x-bone-common.dtsi |  9 ++++
- firmware/Makefile                         |  3 ++
- firmware/capes/cape-bone-weather-00A0.dts | 68 +++++++++++++++++++++++++++++++
- 3 files changed, 80 insertions(+)
- create mode 100644 firmware/capes/cape-bone-weather-00A0.dts
-
-diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
-index 1ddc72d..b184224 100644
---- a/arch/arm/boot/dts/am335x-bone-common.dtsi
-+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
-@@ -233,6 +233,15 @@
- 					dtbo = "cape-bone-lcd3-00A0.dtbo";
- 				};
- 			};
-+
-+			/* Weather cape */
-+			cape@4 {
-+				part-number = "BB-BONE-WTHR-01";
-+				version@00A0 {
-+					version = "00A0";
-+					dtbo = "cape-bone-weather-00A0.dtbo";
-+				};
-+			};
- 		};
- 	};
- };
-diff --git a/firmware/Makefile b/firmware/Makefile
-index f47024c..25ea3fb 100644
---- a/firmware/Makefile
-+++ b/firmware/Makefile
-@@ -146,6 +146,9 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \
- fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += \
- 	capes/cape-bone-geiger-00A0.dtbo
- 
-+# the weather cape
-+fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += capes/cape-bone-weather-00A0.dtbo
-+
- fw-shipped-all := $(fw-shipped-y) $(fw-shipped-m) $(fw-shipped-)
- 
- # Directories which we _might_ need to create, so we have a rule for them.
-diff --git a/firmware/capes/cape-bone-weather-00A0.dts b/firmware/capes/cape-bone-weather-00A0.dts
-new file mode 100644
-index 0000000..76284d6
---- /dev/null
-+++ b/firmware/capes/cape-bone-weather-00A0.dts
-@@ -0,0 +1,68 @@
-+/*
-+* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
-+*
-+* This program is free software; you can redistribute it and/or modify
-+* it under the terms of the GNU General Public License version 2 as
-+* published by the Free Software Foundation.
-+*/
-+/dts-v1/;
-+/plugin/;
-+
-+/ {
-+       compatible = "ti,beaglebone";
-+       part-number = "BB-BONE-WTHR-01";
-+       version = "00A0";
-+
-+       fragment@0 {
-+               target = <&am33xx_pinmux>;
-+               __overlay__ {
-+			weather_cape_w1_pins: pinmux_weather_cape_w1_pins {
-+				pinctrl-single,pins = <
-+					0x0c 0x37       /* gpmc_ad3.gpio1_3, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE7 - w1-gpio */
-+				>;
-+			};
-+               };
-+       };
-+
-+       fragment@1 {
-+               target = <&i2c2>;
-+
-+               __overlay__ {
-+		       /* needed to avoid gripping by DTC */
-+		       #address-cells = <1>;
-+		       #size-cells = <0>;
-+
-+		       /* Ambient light sensor */
-+		       tsl2550@39 {
-+			       compatible = "tsl,tsl2550";
-+			       reg = <0x39>;
-+		       };
-+
-+		       /* Humidity Sensor */
-+		       sht21@40 {
-+			       compatible = "sensiron,sht21";
-+			       reg = <0x40>;
-+		       };
-+
-+		       /* Barometric pressure sensor */
-+		       bmp085@77 {
-+			       compatible = "bosch,bmp085";
-+			       reg = <0x77>;
-+		       };
-+               };
-+       };
-+
-+       fragment@2 {
-+               target = <&ocp>;
-+               __overlay__ {
-+		       onewire@0 {
-+			       compatible      = "w1-gpio";
-+			       pinctrl-names   = "default";
-+			       pinctrl-0       = <&weather_cape_w1_pins>;
-+			       status          = "okay";
-+
-+			       gpios = <&gpio2 3 0>;
-+		       };
-+               };
-+       };
-+};
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0040-ehrpwm-add-missing-dts-nodes.patch b/patches/not-capebus/0040-ehrpwm-add-missing-dts-nodes.patch
deleted file mode 100644
index 08c2def82af6c2d8a5e181ba2398f995b83705a1..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0040-ehrpwm-add-missing-dts-nodes.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From a7094ae6149e73795698d6988ed31fe4b2272b4a Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 4 Jan 2013 10:51:47 +0200
-Subject: [PATCH 40/90] ehrpwm: add missing dts nodes
-
----
- arch/arm/boot/dts/am33xx.dtsi | 30 ++++++++++++++++++++++++++++++
- 1 file changed, 30 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index 5218fbe..662ff27 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -407,6 +407,36 @@
- 			ti,timer-pwm;
- 		};
- 
-+               ehrpwm0: ehrpwm@48300200 {
-+                       compatible      = "ti,am33xx-ehrpwm";
-+                       reg = <0x48300200 0x100 0x48300000 0x10>;
-+                       interrupt-parent = <&intc>;
-+                       interrupt = <86 58>;
-+                       ti,hwmods = "ehrpwm0";
-+                       #pwm-cells = <3>;
-+                       status = "disabled";
-+               };
-+
-+               ehrpwm1: ehrpwm@48302200 {
-+                       compatible      = "ti,am33xx-ehrpwm";
-+                       reg = <0x48302200 0x100 0x48302000 0x10>;
-+                       interrupt-parent = <&intc>;
-+                       interrupt = <87 59>;
-+                       ti,hwmods = "ehrpwm1";
-+                       #pwm-cells = <3>;
-+                       status = "disabled";
-+               };
-+
-+               ehrpwm2: ehrpwm@48304200 {
-+                       compatible      = "ti,am33xx-ehrpwm";
-+                       reg = <0x48304200 0x100 0x48304000 0x10>;
-+                       interrupt-parent = <&intc>;
-+                       interrupt = <39 60>;
-+                       ti,hwmods = "ehrpwm2";
-+                       #pwm-cells = <3>;
-+                       status = "disabled";
-+               };
-+
- 		rtc@44e3e000 {
- 			compatible = "ti,da830-rtc";
- 			reg = <0x44e3e000 0x1000>;
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0041-am33xx-DT-Update-am33xx.dsi-with-the-new-PWM-DT-bind.patch b/patches/not-capebus/0041-am33xx-DT-Update-am33xx.dsi-with-the-new-PWM-DT-bind.patch
deleted file mode 100644
index 03d6deb4eab2d08d6b7c1d5c78a8bfcc2e15a867..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0041-am33xx-DT-Update-am33xx.dsi-with-the-new-PWM-DT-bind.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-From a1a4d57890ac31ff3b92a6c5adb0e4b23272c33e Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 4 Jan 2013 11:51:06 +0200
-Subject: [PATCH 41/90] am33xx DT: Update am33xx.dsi with the new PWM DT
- bindings
-
-Use the new bindings for the PWM subsystem.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/boot/dts/am33xx.dtsi | 118 +++++++++++++++++++++++++++++++-----------
- 1 file changed, 89 insertions(+), 29 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index 662ff27..c9eee93 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -407,35 +407,95 @@
- 			ti,timer-pwm;
- 		};
- 
--               ehrpwm0: ehrpwm@48300200 {
--                       compatible      = "ti,am33xx-ehrpwm";
--                       reg = <0x48300200 0x100 0x48300000 0x10>;
--                       interrupt-parent = <&intc>;
--                       interrupt = <86 58>;
--                       ti,hwmods = "ehrpwm0";
--                       #pwm-cells = <3>;
--                       status = "disabled";
--               };
--
--               ehrpwm1: ehrpwm@48302200 {
--                       compatible      = "ti,am33xx-ehrpwm";
--                       reg = <0x48302200 0x100 0x48302000 0x10>;
--                       interrupt-parent = <&intc>;
--                       interrupt = <87 59>;
--                       ti,hwmods = "ehrpwm1";
--                       #pwm-cells = <3>;
--                       status = "disabled";
--               };
--
--               ehrpwm2: ehrpwm@48304200 {
--                       compatible      = "ti,am33xx-ehrpwm";
--                       reg = <0x48304200 0x100 0x48304000 0x10>;
--                       interrupt-parent = <&intc>;
--                       interrupt = <39 60>;
--                       ti,hwmods = "ehrpwm2";
--                       #pwm-cells = <3>;
--                       status = "disabled";
--               };
-+		epwmss0: epwmss@48300000 {
-+			compatible = "ti,am33xx-pwmss";
-+			reg = <0x48300000 0x10
-+				0x48300100 0x80
-+				0x48300180 0x80
-+				0x48300200 0x80>;
-+			ti,hwmods = "epwmss0";
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+			status = "disabled";
-+			ranges;
-+
-+			ecap0: ecap@48300100 {
-+				compatible = "ti,am33xx-ecap";
-+				#pwm-cells = <3>;
-+				reg = <0x48300100 0x80>;
-+				ti,hwmods = "ecap0";
-+				status = "disabled";
-+			};
-+
-+			ehrpwm0: ehrpwm@48300200 {
-+				compatible = "ti,am33xx-ehrpwm";
-+				#pwm-cells = <3>;
-+				reg = <0x48300200 0x80>;
-+				ti,hwmods = "ehrpwm0";
-+				status = "disabled";
-+				tbclkgating;
-+			};
-+		};
-+
-+		epwmss1: epwmss@48302000 {
-+			compatible = "ti,am33xx-pwmss";
-+			reg = <0x48302000 0x10
-+				0x48302100 0x80
-+				0x48302180 0x80
-+				0x48302200 0x80>;
-+			ti,hwmods = "epwmss1";
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+			status = "disabled";
-+			ranges;
-+
-+			ecap1: ecap@48302100 {
-+				compatible = "ti,am33xx-ecap";
-+				#pwm-cells = <3>;
-+				reg = <0x48302100 0x80>;
-+				ti,hwmods = "ecap1";
-+				status = "disabled";
-+			};
-+
-+			ehrpwm1: ehrpwm@48302200 {
-+				compatible = "ti,am33xx-ehrpwm";
-+				#pwm-cells = <3>;
-+				reg = <0x48302200 0x80>;
-+				ti,hwmods = "ehrpwm1";
-+				status = "disabled";
-+				tbclkgating;
-+			};
-+		};
-+
-+		epwmss2: epwmss@48304000 {
-+			compatible = "ti,am33xx-pwmss";
-+			reg = <0x48304000 0x10
-+				0x48304100 0x80
-+				0x48304180 0x80
-+				0x48304200 0x80>;
-+			ti,hwmods = "epwmss2";
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+			status = "disabled";
-+			ranges;
-+
-+			ecap2: ecap@48304100 {
-+				compatible = "ti,am33xx-ecap";
-+				#pwm-cells = <3>;
-+				reg = <0x48304100 0x80>;
-+				ti,hwmods = "ecap2";
-+				status = "disabled";
-+			};
-+
-+			ehrpwm2: ehrpwm@48304200 {
-+				compatible = "ti,am33xx-ehrpwm";
-+				#pwm-cells = <3>;
-+				reg = <0x48304200 0x80>;
-+				ti,hwmods = "ehrpwm2";
-+				status = "disabled";
-+				tbclkgating;
-+			};
-+		};
- 
- 		rtc@44e3e000 {
- 			compatible = "ti,da830-rtc";
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0042-geiger-cape-Update-to-using-the-new-PWM-interface.patch b/patches/not-capebus/0042-geiger-cape-Update-to-using-the-new-PWM-interface.patch
deleted file mode 100644
index 84cf4eb340420025ee1108b2b91ff1c30110e9b4..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0042-geiger-cape-Update-to-using-the-new-PWM-interface.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 5a0ee95e6bd58bc442044907ee6f8e7b75e64b67 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 8 Jan 2013 21:05:27 +0200
-Subject: [PATCH 42/90] geiger-cape: Update to using the new PWM interface.
-
-The DT PWM interface has changed; update.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/capes/cape-bone-geiger-00A0.dts | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/firmware/capes/cape-bone-geiger-00A0.dts b/firmware/capes/cape-bone-geiger-00A0.dts
-index aded3f5..18bf1f2 100644
---- a/firmware/capes/cape-bone-geiger-00A0.dts
-+++ b/firmware/capes/cape-bone-geiger-00A0.dts
-@@ -36,6 +36,13 @@
- 		};
- 	};
- 
-+	fragment@2 {
-+		target = <&epwmss1>;
-+		__overlay__ {
-+			status = "okay";
-+		};
-+	};
-+
- 	fragment@1 {
- 		target = <&ehrpwm1>;
- 		__overlay__ {
-@@ -43,7 +50,7 @@
- 		};
- 	};
- 
--	fragment@2 {
-+	fragment@3 {
- 		target = <&ocp>;
- 		__overlay__ {
- 
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0043-lcd3-cape-Change-into-using-the-lcdc-DRM-driver-inst.patch b/patches/not-capebus/0043-lcd3-cape-Change-into-using-the-lcdc-DRM-driver-inst.patch
deleted file mode 100644
index 316fa71f74295d4f56ac9926893448d7e9b97cb1..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0043-lcd3-cape-Change-into-using-the-lcdc-DRM-driver-inst.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From dd03f4f51198b5441789d38dc0ec9ecfcfd2d4a4 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 8 Jan 2013 20:53:56 +0200
-Subject: [PATCH 43/90] lcd3-cape: Change into using the lcdc DRM driver
- instead of da8xx-fb
-
-Use the new DRM driver instead of the da8xx-fb driver.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/capes/cape-bone-lcd3-00A0.dts | 65 ++++++++++++++++++++++++++++++----
- 1 file changed, 58 insertions(+), 7 deletions(-)
-
-diff --git a/firmware/capes/cape-bone-lcd3-00A0.dts b/firmware/capes/cape-bone-lcd3-00A0.dts
-index 0a3079e..83a6d88 100644
---- a/firmware/capes/cape-bone-lcd3-00A0.dts
-+++ b/firmware/capes/cape-bone-lcd3-00A0.dts
-@@ -79,8 +79,13 @@
- 
- 	fragment@2 {
- 		target = <&ocp>;
-+
- 		__overlay__ {
- 
-+			/* avoid stupid warning */
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+
- 			tscadc {
- 				compatible = "ti-tscadc-dt";
- 
-@@ -161,18 +166,64 @@
- 				};
- 			};
- 
--			lcd3-cape {
--				compatible = "da8xx-dt";
--
-+//			lcd3-cape {
-+//				compatible = "da8xx-dt";
-+//
-+//				pinctrl-names = "default";
-+//				pinctrl-0 = <&bone_lcd3_cape_lcd_pins>;
-+//
-+//				ti,hwmods = "lcdc";
-+//
-+//				disp-pll = <16000000>;
-+//				panel-type = "CDTech_S035Q01";
-+//
-+//			};
-+
-+			/* Settings for CDTech_S035Q01 / LCD3 cape: */
-+			panel {
-+				compatible = "lcdc,panel";
- 				pinctrl-names = "default";
- 				pinctrl-0 = <&bone_lcd3_cape_lcd_pins>;
-+				panel-info {
-+					ac-bias           = <255>;
-+					ac-bias-intrpt    = <0>;
-+					dma-burst-sz      = <16>;
-+					bpp               = <16>;
-+					fdd               = <0x80>;
-+					tft-alt-mode      = <0>;
-+					stn-565-mode      = <0>;
-+					mono-8bit-mode    = <0>;
-+					invert-line-clock = <1>;
-+					invert-frm-clock  = <1>;
-+					sync-edge         = <0>;
-+					sync-ctrl         = <1>;
-+					raster-order      = <0>;
-+					fifo-th           = <0>;
-+				};
-+				display-timings {
-+					native-mode = <&timing0>;
-+					timing0: 320x240 {
-+						hactive         = <320>;
-+						vactive         = <240>;
-+						hback-porch     = <21>;
-+						hfront-porch    = <58>;
-+						hsync-len       = <47>;
-+						vback-porch     = <11>;
-+						vfront-porch    = <23>;
-+						vsync-len       = <2>;
-+						clock-frequency = <8000000>;
-+					};
-+				};
-+			};
- 
-+			fb {
-+				compatible = "ti,am33xx-lcdc";
-+				reg = <0x4830e000 0x1000>;
-+				interrupt-parent = <&intc>;
-+				interrupts = <36>;
- 				ti,hwmods = "lcdc";
--
--				disp-pll = <16000000>;
--				panel-type = "CDTech_S035Q01";
--
- 			};
-+
- 		};
- 	};
- };
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0044-am33xx-Add-default-config.patch b/patches/not-capebus/0044-am33xx-Add-default-config.patch
deleted file mode 100644
index ceacf1d693d259913a28dace320a560b6c841ad4..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0044-am33xx-Add-default-config.patch
+++ /dev/null
@@ -1,625 +0,0 @@
-From 0ee57c0aee713883beac1bbdef6978bbab5d2e03 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 8 Jan 2013 21:15:34 +0200
-Subject: [PATCH 44/90] am33xx: Add default config.
-
----
- defconfig | 209 +++++++++++++++++++++++++++-----------------------------------
- 1 file changed, 90 insertions(+), 119 deletions(-)
-
-diff --git a/defconfig b/defconfig
-index 5eb94b7..0817f18 100644
---- a/defconfig
-+++ b/defconfig
-@@ -1,6 +1,6 @@
- #
- # Automatically generated file; DO NOT EDIT.
--# Linux/arm 3.8.0-rc1 Kernel Configuration
-+# Linux/arm 3.8.0-rc2 Kernel Configuration
- #
- CONFIG_ARM=y
- CONFIG_SYS_SUPPORTS_APM_EMULATION=y
-@@ -240,12 +240,7 @@ CONFIG_DEFAULT_CFQ=y
- CONFIG_DEFAULT_IOSCHED="cfq"
- CONFIG_PADATA=y
- CONFIG_ASN1=m
--CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
--CONFIG_INLINE_READ_UNLOCK=y
--CONFIG_INLINE_READ_UNLOCK_IRQ=y
--CONFIG_INLINE_WRITE_UNLOCK=y
--CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
--CONFIG_MUTEX_SPIN_ON_OWNER=y
-+CONFIG_UNINLINE_SPIN_UNLOCK=y
- CONFIG_FREEZER=y
- 
- #
-@@ -343,6 +338,9 @@ CONFIG_OMAP_PACKAGE_CBS=y
- #
- # OMAP Board Type
- #
-+CONFIG_MACH_AM335XEVM=y
-+CONFIG_MACH_AM335XIAEVM=y
-+CONFIG_MACH_TAM335X=y
- CONFIG_MACH_OMAP3_BEAGLE=y
- # CONFIG_MACH_DEVKIT8000 is not set
- # CONFIG_MACH_OMAP_LDP is not set
-@@ -474,7 +472,7 @@ CONFIG_FLATMEM=y
- CONFIG_FLAT_NODE_MEM_MAP=y
- CONFIG_HAVE_MEMBLOCK=y
- CONFIG_PAGEFLAGS_EXTENDED=y
--CONFIG_SPLIT_PTLOCK_CPUS=4
-+CONFIG_SPLIT_PTLOCK_CPUS=999999
- # CONFIG_COMPACTION is not set
- # CONFIG_PHYS_ADDR_T_64BIT is not set
- CONFIG_ZONE_DMA_FLAG=0
-@@ -519,6 +517,7 @@ CONFIG_CMDLINE=""
- #
- CONFIG_CPU_FREQ=y
- CONFIG_CPU_FREQ_TABLE=y
-+CONFIG_CPU_FREQ_GOV_COMMON=y
- CONFIG_CPU_FREQ_STAT=y
- CONFIG_CPU_FREQ_STAT_DETAILS=y
- CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
-@@ -541,7 +540,7 @@ CONFIG_GENERIC_CPUFREQ_CPU0=y
- # CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set
- # CONFIG_ARM_EXYNOS5250_CPUFREQ is not set
- CONFIG_CPU_IDLE=y
--CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
-+# CONFIG_CPU_IDLE_MULTIPLE_DRIVERS is not set
- CONFIG_CPU_IDLE_GOV_LADDER=y
- CONFIG_CPU_IDLE_GOV_MENU=y
- CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED=y
-@@ -683,7 +682,7 @@ CONFIG_IPV6_SUBTREES=y
- CONFIG_IPV6_MROUTE=y
- CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
- CONFIG_IPV6_PIMSM_V2=y
--CONFIG_NETLABEL=y
-+# CONFIG_NETLABEL is not set
- # CONFIG_NETWORK_SECMARK is not set
- # CONFIG_NETWORK_PHY_TIMESTAMPING is not set
- CONFIG_NETFILTER=y
-@@ -912,7 +911,7 @@ CONFIG_NET_SCH_FIFO=y
- CONFIG_DNS_RESOLVER=y
- CONFIG_BATMAN_ADV=m
- CONFIG_BATMAN_ADV_BLA=y
--CONFIG_BATMAN_ADV_DAT=y
-+# CONFIG_BATMAN_ADV_DAT is not set
- # CONFIG_BATMAN_ADV_DEBUG is not set
- CONFIG_OPENVSWITCH=m
- CONFIG_RPS=y
-@@ -943,7 +942,7 @@ CONFIG_CAN_DEV=m
- CONFIG_CAN_CALC_BITTIMING=y
- CONFIG_CAN_TI_HECC=m
- CONFIG_CAN_MCP251X=m
--CONFIG_CAN_GRCAN=m
-+# CONFIG_CAN_GRCAN is not set
- # CONFIG_CAN_SJA1000 is not set
- CONFIG_CAN_C_CAN=m
- CONFIG_CAN_C_CAN_PLATFORM=m
-@@ -954,7 +953,7 @@ CONFIG_CAN_C_CAN_PLATFORM=m
- #
- CONFIG_CAN_EMS_USB=m
- CONFIG_CAN_ESD_USB2=m
--CONFIG_CAN_KVASER_USB=m
-+# CONFIG_CAN_KVASER_USB is not set
- CONFIG_CAN_PEAK_USB=m
- # CONFIG_CAN_SOFTING is not set
- # CONFIG_CAN_DEBUG_DEVICES is not set
-@@ -1245,6 +1244,7 @@ CONFIG_PROC_DEVICETREE=y
- # CONFIG_OF_SELFTEST is not set
- CONFIG_OF_FLATTREE=y
- CONFIG_OF_EARLY_FLATTREE=y
-+CONFIG_OF_DYNAMIC=y
- CONFIG_OF_ADDRESS=y
- CONFIG_OF_IRQ=y
- CONFIG_OF_DEVICE=y
-@@ -1252,6 +1252,9 @@ CONFIG_OF_I2C=y
- CONFIG_OF_NET=y
- CONFIG_OF_MDIO=y
- CONFIG_OF_MTD=y
-+CONFIG_OF_DISPLAY_TIMINGS=y
-+CONFIG_OF_RESOLVE=y
-+CONFIG_OF_OVERLAY=y
- # CONFIG_PARPORT is not set
- CONFIG_BLK_DEV=y
- # CONFIG_BLK_DEV_COW_COMMON is not set
-@@ -1316,6 +1319,8 @@ CONFIG_TI_ST=m
- # Altera FPGA firmware download module
- #
- # CONFIG_ALTERA_STAPL is not set
-+CONFIG_CAPE_BEAGLEBONE=y
-+CONFIG_CAPE_BEAGLEBONE_GEIGER=y
- 
- #
- # SCSI device support
-@@ -1410,9 +1415,9 @@ CONFIG_NET_VENDOR_FARADAY=y
- CONFIG_NET_VENDOR_INTEL=y
- CONFIG_NET_VENDOR_I825XX=y
- CONFIG_NET_VENDOR_MARVELL=y
--CONFIG_MVMDIO=m
-+# CONFIG_MVMDIO is not set
- CONFIG_NET_VENDOR_MICREL=y
--CONFIG_KS8842=m
-+# CONFIG_KS8842 is not set
- CONFIG_KS8851=y
- CONFIG_KS8851_MLL=y
- CONFIG_NET_VENDOR_MICROCHIP=y
-@@ -1493,7 +1498,7 @@ CONFIG_USB_NET_AX8817X=y
- CONFIG_USB_NET_CDCETHER=y
- # CONFIG_USB_NET_CDC_EEM is not set
- CONFIG_USB_NET_CDC_NCM=y
--CONFIG_USB_NET_CDC_MBIM=y
-+# CONFIG_USB_NET_CDC_MBIM is not set
- # CONFIG_USB_NET_DM9601 is not set
- # CONFIG_USB_NET_SMSC75XX is not set
- CONFIG_USB_NET_SMSC95XX=y
-@@ -1526,13 +1531,7 @@ CONFIG_WLAN=y
- # CONFIG_USB_NET_RNDIS_WLAN is not set
- # CONFIG_RTL8187 is not set
- # CONFIG_MAC80211_HWSIM is not set
--CONFIG_ATH_CARDS=m
--# CONFIG_ATH_DEBUG is not set
--# CONFIG_ATH9K is not set
--# CONFIG_ATH9K_HTC is not set
--# CONFIG_CARL9170 is not set
--# CONFIG_ATH6KL is not set
--# CONFIG_AR5523 is not set
-+# CONFIG_ATH_CARDS is not set
- # CONFIG_B43 is not set
- # CONFIG_B43LEGACY is not set
- # CONFIG_BRCMFMAC is not set
-@@ -1546,16 +1545,7 @@ CONFIG_LIBERTAS_DEBUG=y
- # CONFIG_P54_COMMON is not set
- # CONFIG_RT2X00 is not set
- # CONFIG_RTL8192CU is not set
--CONFIG_WL_TI=y
--CONFIG_WL1251=m
--CONFIG_WL1251_SPI=m
--CONFIG_WL1251_SDIO=m
--CONFIG_WL12XX=m
--CONFIG_WL18XX=m
--CONFIG_WLCORE=m
--CONFIG_WLCORE_SPI=m
--CONFIG_WLCORE_SDIO=m
--CONFIG_WL12XX_PLATFORM_DATA=y
-+# CONFIG_WL_TI is not set
- # CONFIG_ZD1211RW is not set
- # CONFIG_MWIFIEX is not set
- 
-@@ -1670,7 +1660,7 @@ CONFIG_TOUCHSCREEN_WM9713=y
- # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
- # CONFIG_TOUCHSCREEN_TSC_SERIO is not set
- # CONFIG_TOUCHSCREEN_TSC2005 is not set
--CONFIG_TOUCHSCREEN_TSC2007=m
-+# CONFIG_TOUCHSCREEN_TSC2007 is not set
- # CONFIG_TOUCHSCREEN_W90X900 is not set
- # CONFIG_TOUCHSCREEN_ST1232 is not set
- # CONFIG_TOUCHSCREEN_TPS6507X is not set
-@@ -1691,7 +1681,7 @@ CONFIG_INPUT_TWL4030_PWRBUTTON=y
- # CONFIG_INPUT_TWL4030_VIBRA is not set
- # CONFIG_INPUT_UINPUT is not set
- # CONFIG_INPUT_PCF8574 is not set
--CONFIG_INPUT_PWM_BEEPER=m
-+# CONFIG_INPUT_PWM_BEEPER is not set
- # CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
- # CONFIG_INPUT_ADXL34X is not set
- # CONFIG_INPUT_CMA3000 is not set
-@@ -1838,15 +1828,7 @@ CONFIG_SPI_SPIDEV=y
- #
- # PPS support
- #
--CONFIG_PPS=y
--# CONFIG_PPS_DEBUG is not set
--
--#
--# PPS clients support
--#
--# CONFIG_PPS_CLIENT_KTIMER is not set
--# CONFIG_PPS_CLIENT_LDISC is not set
--# CONFIG_PPS_CLIENT_GPIO is not set
-+# CONFIG_PPS is not set
- 
- #
- # PPS generators support
-@@ -1855,7 +1837,7 @@ CONFIG_PPS=y
- #
- # PTP clock support
- #
--CONFIG_PTP_1588_CLOCK=y
-+# CONFIG_PTP_1588_CLOCK is not set
- 
- #
- # Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.
-@@ -1966,7 +1948,7 @@ CONFIG_GENERIC_ADC_BATTERY=m
- # CONFIG_CHARGER_LP8727 is not set
- CONFIG_CHARGER_GPIO=m
- # CONFIG_CHARGER_MANAGER is not set
--CONFIG_CHARGER_BQ2415X=m
-+# CONFIG_CHARGER_BQ2415X is not set
- # CONFIG_CHARGER_SMB347 is not set
- # CONFIG_POWER_RESET is not set
- # CONFIG_POWER_AVS is not set
-@@ -2077,9 +2059,9 @@ CONFIG_THERMAL_HWMON=y
- CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
- # CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
- # CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set
--CONFIG_FAIR_SHARE=y
-+# CONFIG_FAIR_SHARE is not set
- CONFIG_STEP_WISE=y
--CONFIG_USER_SPACE=y
-+# CONFIG_USER_SPACE is not set
- CONFIG_CPU_THERMAL=y
- CONFIG_WATCHDOG=y
- CONFIG_WATCHDOG_CORE=y
-@@ -2231,7 +2213,6 @@ CONFIG_VIDEOBUF_DMA_CONTIG=m
- CONFIG_VIDEOBUF_DVB=m
- CONFIG_VIDEOBUF2_CORE=m
- CONFIG_VIDEOBUF2_MEMOPS=m
--CONFIG_VIDEOBUF2_DMA_CONTIG=m
- CONFIG_VIDEOBUF2_VMALLOC=m
- CONFIG_DVB_CORE=m
- CONFIG_DVB_NET=y
-@@ -2421,7 +2402,7 @@ CONFIG_SOC_CAMERA_PLATFORM=m
- # CONFIG_VIDEO_SH_MOBILE_CSI2 is not set
- # CONFIG_VIDEO_SH_MOBILE_CEU is not set
- CONFIG_V4L_MEM2MEM_DRIVERS=y
--CONFIG_VIDEO_MEM2MEM_DEINTERLACE=m
-+# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set
- CONFIG_V4L_TEST_DRIVERS=y
- CONFIG_VIDEO_VIVI=m
- CONFIG_VIDEO_MEM2MEM_TESTDEV=m
-@@ -2671,29 +2652,34 @@ CONFIG_DVB_AF9033=m
- # Graphics support
- #
- CONFIG_DRM=y
--CONFIG_DRM_USB=m
- CONFIG_DRM_KMS_HELPER=y
--CONFIG_DRM_LOAD_EDID_FIRMWARE=y
-+# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
- CONFIG_DRM_GEM_CMA_HELPER=y
- CONFIG_DRM_KMS_CMA_HELPER=y
- 
- #
- # I2C encoder or helper chips
- #
--CONFIG_DRM_I2C_CH7006=m
--CONFIG_DRM_I2C_SIL164=m
--CONFIG_DRM_UDL=m
-+# CONFIG_DRM_I2C_CH7006 is not set
-+# CONFIG_DRM_I2C_SIL164 is not set
-+# CONFIG_DRM_UDL is not set
- CONFIG_DRM_LCDC=y
-+
-+#
-+# I2C encoder or helper chips
-+#
-+CONFIG_DRM_I2C_NXP_TDA998X=y
- # CONFIG_VGASTATE is not set
- # CONFIG_VIDEO_OUTPUT_CONTROL is not set
-+CONFIG_DISPLAY_TIMING=y
- CONFIG_FB=y
- CONFIG_FIRMWARE_EDID=y
- # CONFIG_FB_DDC is not set
- # CONFIG_FB_BOOT_VESA_SUPPORT is not set
--CONFIG_FB_CFB_FILLRECT=m
--CONFIG_FB_CFB_COPYAREA=m
--CONFIG_FB_CFB_IMAGEBLIT=m
--# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
-+CONFIG_FB_CFB_FILLRECT=y
-+CONFIG_FB_CFB_COPYAREA=y
-+CONFIG_FB_CFB_IMAGEBLIT=y
-+CONFIG_FB_CFB_REV_PIXELS_IN_BYTE=y
- CONFIG_FB_SYS_FILLRECT=y
- CONFIG_FB_SYS_COPYAREA=y
- CONFIG_FB_SYS_IMAGEBLIT=y
-@@ -2718,7 +2704,7 @@ CONFIG_FB_TILEBLITTING=y
- # CONFIG_FB_TMIO is not set
- # CONFIG_FB_SMSCUFX is not set
- # CONFIG_FB_UDL is not set
--# CONFIG_FB_DA8XX is not set
-+CONFIG_FB_DA8XX=y
- # CONFIG_FB_VIRTUAL is not set
- # CONFIG_FB_METRONOME is not set
- # CONFIG_FB_BROADSHEET is not set
-@@ -2727,8 +2713,7 @@ CONFIG_FB_ST7735=y
- CONFIG_OMAP2_VRFB=y
- CONFIG_OMAP2_DSS=m
- # CONFIG_OMAP2_DSS_DEBUG is not set
--CONFIG_OMAP2_DSS_DEBUGFS=y
--# CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set
-+# CONFIG_OMAP2_DSS_DEBUGFS is not set
- CONFIG_OMAP2_DSS_DPI=y
- CONFIG_OMAP2_DSS_RFBI=y
- CONFIG_OMAP2_DSS_VENC=y
-@@ -2801,7 +2786,7 @@ CONFIG_LOGO=y
- CONFIG_LOGO_LINUX_MONO=y
- CONFIG_LOGO_LINUX_VGA16=y
- CONFIG_LOGO_LINUX_CLUT224=y
--CONFIG_FB_SSD1307=m
-+# CONFIG_FB_SSD1307 is not set
- CONFIG_SOUND=m
- CONFIG_SOUND_OSS_CORE=y
- CONFIG_SOUND_OSS_CORE_PRECLAIM=y
-@@ -2930,7 +2915,7 @@ CONFIG_USB_HID=y
- #
- # I2C HID support
- #
--CONFIG_I2C_HID=y
-+# CONFIG_I2C_HID is not set
- CONFIG_USB_ARCH_HAS_OHCI=y
- CONFIG_USB_ARCH_HAS_EHCI=y
- # CONFIG_USB_ARCH_HAS_XHCI is not set
-@@ -2966,12 +2951,7 @@ CONFIG_USB_MON=y
- # CONFIG_USB_U132_HCD is not set
- # CONFIG_USB_SL811_HCD is not set
- # CONFIG_USB_R8A66597_HCD is not set
--CONFIG_USB_MUSB_HDRC=y
--# CONFIG_USB_MUSB_TUSB6010 is not set
--# CONFIG_USB_MUSB_OMAP2PLUS is not set
--# CONFIG_USB_MUSB_AM35X is not set
--CONFIG_USB_MUSB_DSPS=y
--CONFIG_MUSB_PIO_ONLY=y
-+# CONFIG_USB_MUSB_HDRC is not set
- # CONFIG_USB_CHIPIDEA is not set
- # CONFIG_USB_RENESAS_USBHS is not set
- 
-@@ -2980,7 +2960,7 @@ CONFIG_MUSB_PIO_ONLY=y
- #
- CONFIG_USB_ACM=m
- CONFIG_USB_PRINTER=m
--CONFIG_USB_WDM=y
-+CONFIG_USB_WDM=m
- CONFIG_USB_TMC=m
- 
- #
-@@ -3100,8 +3080,6 @@ CONFIG_USB_CYTHERM=m
- CONFIG_USB_IDMOUSE=m
- CONFIG_USB_FTDI_ELAN=m
- CONFIG_USB_APPLEDISPLAY=m
--CONFIG_USB_SISUSBVGA=m
--CONFIG_USB_SISUSBVGA_CON=y
- CONFIG_USB_LD=m
- CONFIG_USB_TRANCEVIBRATOR=m
- CONFIG_USB_IOWARRIOR=m
-@@ -3129,7 +3107,6 @@ CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
- # CONFIG_USB_FUSB300 is not set
- # CONFIG_USB_R8A66597 is not set
- # CONFIG_USB_MV_UDC is not set
--CONFIG_USB_GADGET_MUSB_HDRC=y
- # CONFIG_USB_M66592 is not set
- # CONFIG_USB_NET2272 is not set
- # CONFIG_USB_DUMMY_HCD is not set
-@@ -3160,7 +3137,6 @@ CONFIG_USB_G_HID=m
- CONFIG_USB_OTG_UTILS=y
- CONFIG_USB_GPIO_VBUS=m
- # CONFIG_USB_ULPI is not set
--CONFIG_TWL6030_USB=y
- CONFIG_NOP_USB_XCEIV=y
- CONFIG_MMC=y
- # CONFIG_MMC_DEBUG is not set
-@@ -3258,7 +3234,7 @@ CONFIG_RTC_INTF_DEV=y
- # CONFIG_RTC_DRV_ISL1208 is not set
- # CONFIG_RTC_DRV_ISL12022 is not set
- # CONFIG_RTC_DRV_X1205 is not set
--CONFIG_RTC_DRV_PCF8523=m
-+# CONFIG_RTC_DRV_PCF8523 is not set
- # CONFIG_RTC_DRV_PCF8563 is not set
- # CONFIG_RTC_DRV_PCF8583 is not set
- # CONFIG_RTC_DRV_M41T80 is not set
-@@ -3305,7 +3281,7 @@ CONFIG_RTC_DRV_DS2404=m
- #
- # on-CPU RTC drivers
- #
--CONFIG_RTC_DRV_OMAP=y
-+# CONFIG_RTC_DRV_OMAP is not set
- CONFIG_RTC_DRV_SNVS=m
- CONFIG_DMADEVICES=y
- # CONFIG_DMADEVICES_DEBUG is not set
-@@ -3324,13 +3300,13 @@ CONFIG_DMA_VIRTUAL_CHANNELS=y
- # DMA Clients
- #
- # CONFIG_NET_DMA is not set
--CONFIG_ASYNC_TX_DMA=y
--CONFIG_DMATEST=m
-+# CONFIG_ASYNC_TX_DMA is not set
-+# CONFIG_DMATEST is not set
- # CONFIG_AUXDISPLAY is not set
- CONFIG_UIO=y
- CONFIG_UIO_PDRV=y
- CONFIG_UIO_PDRV_GENIRQ=y
--CONFIG_UIO_DMEM_GENIRQ=m
-+# CONFIG_UIO_DMEM_GENIRQ is not set
- CONFIG_VIRTIO=m
- 
- #
-@@ -3350,7 +3326,7 @@ CONFIG_COMMON_CLK=y
- #
- # Common Clock Framework
- #
--CONFIG_COMMON_CLK_DEBUG=y
-+# CONFIG_COMMON_CLK_DEBUG is not set
- CONFIG_HWSPINLOCK=m
- 
- #
-@@ -3377,9 +3353,9 @@ CONFIG_STE_MODEM_RPROC=m
- # CONFIG_MEMORY is not set
- CONFIG_IIO=y
- CONFIG_IIO_BUFFER=y
--CONFIG_IIO_BUFFER_CB=y
--CONFIG_IIO_KFIFO_BUF=y
--CONFIG_IIO_TRIGGERED_BUFFER=y
-+# CONFIG_IIO_BUFFER_CB is not set
-+CONFIG_IIO_KFIFO_BUF=m
-+CONFIG_IIO_TRIGGERED_BUFFER=m
- CONFIG_IIO_TRIGGER=y
- CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
- 
-@@ -3393,13 +3369,13 @@ CONFIG_HID_SENSOR_ACCEL_3D=m
- #
- CONFIG_AD_SIGMA_DELTA=m
- CONFIG_AD7266=m
--CONFIG_AD7298=m
-+# CONFIG_AD7298 is not set
- CONFIG_AD7791=m
--CONFIG_AD7793=m
-+# CONFIG_AD7793 is not set
- CONFIG_AD7476=m
--CONFIG_AD7887=m
--CONFIG_MAX1363=m
--CONFIG_TI_ADC081C=m
-+# CONFIG_AD7887 is not set
-+# CONFIG_MAX1363 is not set
-+# CONFIG_TI_ADC081C is not set
- CONFIG_TI_AM335X_ADC=y
- 
- #
-@@ -3422,7 +3398,7 @@ CONFIG_AD5380=m
- CONFIG_AD5421=m
- CONFIG_AD5624R_SPI=m
- CONFIG_AD5446=m
--CONFIG_AD5449=m
-+# CONFIG_AD5449 is not set
- CONFIG_AD5504=m
- CONFIG_AD5755=m
- CONFIG_AD5764=m
-@@ -3448,15 +3424,13 @@ CONFIG_ADF4350=m
- #
- # Digital gyroscope sensors
- #
--CONFIG_ADIS16136=m
-+# CONFIG_ADIS16136 is not set
- CONFIG_HID_SENSOR_GYRO_3D=m
- 
- #
- # Inertial measurement units
- #
--CONFIG_ADIS16480=m
--CONFIG_IIO_ADIS_LIB=m
--CONFIG_IIO_ADIS_LIB_BUFFER=y
-+# CONFIG_ADIS16480 is not set
- 
- #
- # Light sensors
-@@ -3473,9 +3447,9 @@ CONFIG_PWM=y
- CONFIG_PWM_TIECAP=y
- CONFIG_PWM_TIEHRPWM=y
- CONFIG_PWM_TIPWMSS=y
--CONFIG_PWM_TWL=y
--CONFIG_PWM_TWL_LED=y
--CONFIG_EHRPWM_TEST=m
-+# CONFIG_PWM_TWL is not set
-+# CONFIG_PWM_TWL_LED is not set
-+# CONFIG_EHRPWM_TEST is not set
- # CONFIG_IPACK_BUS is not set
- 
- #
-@@ -3538,14 +3512,7 @@ CONFIG_CUSE=m
- #
- # Caches
- #
--CONFIG_FSCACHE=y
--CONFIG_FSCACHE_STATS=y
--CONFIG_FSCACHE_HISTOGRAM=y
--# CONFIG_FSCACHE_DEBUG is not set
--# CONFIG_FSCACHE_OBJECT_LIST is not set
--CONFIG_CACHEFILES=m
--# CONFIG_CACHEFILES_DEBUG is not set
--CONFIG_CACHEFILES_HISTOGRAM=y
-+# CONFIG_FSCACHE is not set
- 
- #
- # CD-ROM/DVD Filesystems
-@@ -3629,11 +3596,8 @@ CONFIG_NFS_V3=y
- CONFIG_NFS_V3_ACL=y
- CONFIG_NFS_V4=y
- CONFIG_NFS_SWAP=y
--CONFIG_NFS_V4_1=y
--CONFIG_PNFS_FILE_LAYOUT=m
--CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
-+# CONFIG_NFS_V4_1 is not set
- CONFIG_ROOT_NFS=y
--CONFIG_NFS_FSCACHE=y
- # CONFIG_NFS_USE_LEGACY_DNS is not set
- CONFIG_NFS_USE_KERNEL_DNS=y
- # CONFIG_NFSD is not set
-@@ -3643,7 +3607,6 @@ CONFIG_NFS_ACL_SUPPORT=y
- CONFIG_NFS_COMMON=y
- CONFIG_SUNRPC=y
- CONFIG_SUNRPC_GSS=y
--CONFIG_SUNRPC_BACKCHANNEL=y
- CONFIG_SUNRPC_SWAP=y
- # CONFIG_SUNRPC_DEBUG is not set
- # CONFIG_CEPH_FS is not set
-@@ -3721,10 +3684,15 @@ CONFIG_DEBUG_FS=y
- # CONFIG_DEBUG_SECTION_MISMATCH is not set
- CONFIG_DEBUG_KERNEL=y
- # CONFIG_DEBUG_SHIRQ is not set
--# CONFIG_LOCKUP_DETECTOR is not set
-+CONFIG_LOCKUP_DETECTOR=y
-+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
-+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1
- # CONFIG_PANIC_ON_OOPS is not set
- CONFIG_PANIC_ON_OOPS_VALUE=0
--# CONFIG_DETECT_HUNG_TASK is not set
-+CONFIG_DETECT_HUNG_TASK=y
-+CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=60
-+CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
-+CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1
- CONFIG_SCHED_DEBUG=y
- CONFIG_SCHEDSTATS=y
- CONFIG_TIMER_STATS=y
-@@ -3734,8 +3702,8 @@ CONFIG_HAVE_DEBUG_KMEMLEAK=y
- # CONFIG_DEBUG_KMEMLEAK is not set
- # CONFIG_DEBUG_RT_MUTEXES is not set
- # CONFIG_RT_MUTEX_TESTER is not set
--# CONFIG_DEBUG_SPINLOCK is not set
--# CONFIG_DEBUG_MUTEXES is not set
-+CONFIG_DEBUG_SPINLOCK=y
-+CONFIG_DEBUG_MUTEXES=y
- # CONFIG_DEBUG_LOCK_ALLOC is not set
- # CONFIG_PROVE_LOCKING is not set
- # CONFIG_SPARSE_RCU_POINTER is not set
-@@ -3771,6 +3739,7 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=60
- CONFIG_NOTIFIER_ERROR_INJECTION=m
- # CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set
- CONFIG_PM_NOTIFIER_ERROR_INJECT=m
-+# CONFIG_OF_RECONFIG_NOTIFIER_ERROR_INJECT is not set
- # CONFIG_FAULT_INJECTION is not set
- # CONFIG_DEBUG_PAGEALLOC is not set
- CONFIG_NOP_TRACER=y
-@@ -3814,8 +3783,12 @@ CONFIG_HAVE_ARCH_KGDB=y
- # CONFIG_STRICT_DEVMEM is not set
- CONFIG_ARM_UNWIND=y
- # CONFIG_DEBUG_USER is not set
--# CONFIG_DEBUG_LL is not set
-+CONFIG_DEBUG_LL=y
-+CONFIG_DEBUG_LL_UART_NONE=y
-+# CONFIG_DEBUG_ICEDCC is not set
-+# CONFIG_DEBUG_SEMIHOSTING is not set
- CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
-+CONFIG_EARLY_PRINTK=y
- # CONFIG_ARM_KPROBES_TEST is not set
- # CONFIG_PID_IN_CONTEXTIDR is not set
- 
-@@ -3828,16 +3801,14 @@ CONFIG_KEYS=y
- # CONFIG_SECURITY_DMESG_RESTRICT is not set
- CONFIG_SECURITY=y
- CONFIG_SECURITYFS=y
--CONFIG_SECURITY_NETWORK=y
--CONFIG_SECURITY_NETWORK_XFRM=y
-+# CONFIG_SECURITY_NETWORK is not set
- # CONFIG_SECURITY_PATH is not set
--CONFIG_SECURITY_SMACK=y
-+# CONFIG_SECURITY_SMACK is not set
- # CONFIG_SECURITY_TOMOYO is not set
- # CONFIG_SECURITY_APPARMOR is not set
- # CONFIG_SECURITY_YAMA is not set
- # CONFIG_IMA is not set
- # CONFIG_EVM is not set
--# CONFIG_DEFAULT_SECURITY_SMACK is not set
- CONFIG_DEFAULT_SECURITY_DAC=y
- CONFIG_DEFAULT_SECURITY=""
- CONFIG_CRYPTO=y
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0045-lcd3-cape-Convert-to-using-the-proper-touchscreen-dr.patch b/patches/not-capebus/0045-lcd3-cape-Convert-to-using-the-proper-touchscreen-dr.patch
deleted file mode 100644
index ece415aa7e4a9b02f4bf80361a0971a5dd29f1fc..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0045-lcd3-cape-Convert-to-using-the-proper-touchscreen-dr.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 0119db9f96f2f119dd868b4071a9ac34d3ccd7cf Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 9 Jan 2013 14:42:11 +0200
-Subject: [PATCH 45/90] lcd3-cape: Convert to using the proper touchscreen
- driver.
-
-Now that the touchscreen driver has DT bindings switch to using it.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/capes/cape-bone-lcd3-00A0.dts | 33 +++++++++++++++------------------
- 1 file changed, 15 insertions(+), 18 deletions(-)
-
-diff --git a/firmware/capes/cape-bone-lcd3-00A0.dts b/firmware/capes/cape-bone-lcd3-00A0.dts
-index 83a6d88..2d806c8 100644
---- a/firmware/capes/cape-bone-lcd3-00A0.dts
-+++ b/firmware/capes/cape-bone-lcd3-00A0.dts
-@@ -87,13 +87,23 @@
- 			#size-cells = <1>;
- 
- 			tscadc {
--				compatible = "ti-tscadc-dt";
-+				compatible = "ti,ti-tscadc";
-+				reg = <0x44e0d000 0x1000>;
- 
--				tsc-wires = <4>;
--				tsc-x-plate-resistance = <200>;
--				tsc-steps = <6>;
-+				interrupt-parent = <&intc>;
-+				interrupts = <16>;
-+				ti,hwmods = "adc_tsc";
-+
-+				tsc {
-+					wires = <4>;
-+					x-plate-resistance = <200>;
-+					steps-to-configure = <5>;
-+					wire-config = <0x00 0x11 0x22 0x33>;
-+				};
- 
--				adc-channels = <4>;
-+				adc {
-+					adc-channels = <4>;
-+				};
- 			};
- 
- 			gpio-leds-cape-lcd3 {
-@@ -166,19 +176,6 @@
- 				};
- 			};
- 
--//			lcd3-cape {
--//				compatible = "da8xx-dt";
--//
--//				pinctrl-names = "default";
--//				pinctrl-0 = <&bone_lcd3_cape_lcd_pins>;
--//
--//				ti,hwmods = "lcdc";
--//
--//				disp-pll = <16000000>;
--//				panel-type = "CDTech_S035Q01";
--//
--//			};
--
- 			/* Settings for CDTech_S035Q01 / LCD3 cape: */
- 			panel {
- 				compatible = "lcdc,panel";
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0046-geiger-cape-Convert-to-using-the-new-ADC-driver.patch b/patches/not-capebus/0046-geiger-cape-Convert-to-using-the-new-ADC-driver.patch
deleted file mode 100644
index 0e9dd8135597acb9b8198f18d08601d69c236acb..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0046-geiger-cape-Convert-to-using-the-new-ADC-driver.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From e7c9cff4293ccadb0b60d6b9b82364a00ab81219 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 9 Jan 2013 14:53:59 +0200
-Subject: [PATCH 46/90] geiger-cape: Convert to using the new ADC driver
-
-Now that the proper driver has DT binding convert to using it.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/capes/cape-bone-geiger-00A0.dts | 18 +++++++++++++++---
- 1 file changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/firmware/capes/cape-bone-geiger-00A0.dts b/firmware/capes/cape-bone-geiger-00A0.dts
-index 18bf1f2..287d75c 100644
---- a/firmware/capes/cape-bone-geiger-00A0.dts
-+++ b/firmware/capes/cape-bone-geiger-00A0.dts
-@@ -54,6 +54,10 @@
- 		target = <&ocp>;
- 		__overlay__ {
- 
-+			/* avoid stupid warning */
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+
- 			gpio-leds-cape-geiger {
- 				compatible = "gpio-leds";
- 				pinctrl-names = "default";
-@@ -75,9 +79,17 @@
- 
- 			};
- 
--			tscadc-cape-geiger {
--				compatible = "ti-tscadc-dt";
--				adc-channels = <8>;
-+			tscadc {
-+				compatible = "ti,ti-tscadc";
-+				reg = <0x44e0d000 0x1000>;
-+
-+				interrupt-parent = <&intc>;
-+				interrupts = <16>;
-+				ti,hwmods = "adc_tsc";
-+
-+				adc {
-+					adc-channels = <8>;
-+				};
- 			};
- 
- 			bone-cape-geiger {
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0047-cape-dvi-Convert-DVI-capes-to-the-new-LCDC-DRM-drive.patch b/patches/not-capebus/0047-cape-dvi-Convert-DVI-capes-to-the-new-LCDC-DRM-drive.patch
deleted file mode 100644
index b687eb32b957188ea9fcdda9000f9042c92a6c41..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0047-cape-dvi-Convert-DVI-capes-to-the-new-LCDC-DRM-drive.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-From 2a8bbf73b00be0565b1b24c622483b4d84726387 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 9 Jan 2013 16:34:14 +0200
-Subject: [PATCH 47/90] cape-dvi: Convert DVI capes to the new LCDC DRM driver
-
-The new DRM driver works fine, switch into using that and ditch
-da8xx-fb.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/capes/cape-bone-dvi-00A0.dts | 55 ++++++++++++++++++++++++++++++-----
- firmware/capes/cape-bone-dvi-00A1.dts | 53 ++++++++++++++++++++++++++++-----
- 2 files changed, 93 insertions(+), 15 deletions(-)
-
-diff --git a/firmware/capes/cape-bone-dvi-00A0.dts b/firmware/capes/cape-bone-dvi-00A0.dts
-index b9db80b..5445847 100644
---- a/firmware/capes/cape-bone-dvi-00A0.dts
-+++ b/firmware/capes/cape-bone-dvi-00A0.dts
-@@ -59,6 +59,10 @@
- 		target = <&ocp>;
- 		__overlay__ {
- 
-+			/* avoid stupid warning */
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+
- 			gpio-leds-cape-dvi {
- 				compatible = "gpio-leds";
- 				pinctrl-names = "default";
-@@ -79,17 +83,52 @@
- 				};
- 			};
- 
--			dvi-cape {
--				compatible = "da8xx-dt";
-+			/* Settings for DVI 1024x768@60 */
-+			panel {
-+				compatible = "lcdc,panel";
- 				pinctrl-names = "default";
--				ti,hwmods = "lcdc";
--
--				disp-pll = <560000000>;
--				panel-type = "1024x768@60";
--
- 				pinctrl-0 = <&bone_dvi_cape_dvi_00A0_pins>;
--				powerdn-gpio = <&gpio2 7 0>;
-+				panel-info {
-+					ac-bias           = <255>;
-+					ac-bias-intrpt    = <0>;
-+					dma-burst-sz      = <16>;
-+					bpp               = <16>;
-+					fdd               = <0x80>;
-+					tft-alt-mode      = <0>;
-+					stn-565-mode      = <0>;
-+					mono-8bit-mode    = <0>;
-+					invert-line-clock = <1>;
-+					invert-frm-clock  = <1>;
-+					sync-edge         = <0>;
-+					sync-ctrl         = <1>;
-+					raster-order      = <0>;
-+					fifo-th           = <0>;
-+				};
-+				display-timings {
-+					native-mode = <&timing0>;
-+					timing0: 1024x768 {
-+						hactive         = <1024>;
-+						vactive         = <768>;
-+						hback-porch     = <80>;
-+						hfront-porch    = <48>;
-+						vback-porch     = <15>;
-+						vfront-porch    = <3>;
-+						hsync-len       = <32>;
-+						vsync-len       = <4>;
-+						clock-frequency = <56000000>;
-+					};
-+				};
- 			};
-+
-+			fb {
-+				compatible = "ti,am33xx-lcdc";
-+				reg = <0x4830e000 0x1000>;
-+				interrupt-parent = <&intc>;
-+				interrupts = <36>;
-+				ti,hwmods = "lcdc";
-+				ti,power-gpio = <&gpio2 7 0x0>;
-+			};
-+
- 		};
- 	};
- };
-diff --git a/firmware/capes/cape-bone-dvi-00A1.dts b/firmware/capes/cape-bone-dvi-00A1.dts
-index 567d12b..dc31146 100644
---- a/firmware/capes/cape-bone-dvi-00A1.dts
-+++ b/firmware/capes/cape-bone-dvi-00A1.dts
-@@ -59,6 +59,10 @@
- 		target = <&ocp>;
- 		__overlay__ {
- 
-+			/* avoid stupid warning */
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+
- 			gpio-leds-cape-dvi {
- 				compatible = "gpio-leds";
- 				pinctrl-names = "default";
-@@ -79,16 +83,51 @@
- 				};
- 			};
- 
--			dvi-cape {
--				compatible = "da8xx-dt";
-+			/* Settings for DVI 1024x768@60 */
-+			panel {
-+				compatible = "lcdc,panel";
- 				pinctrl-names = "default";
--				ti,hwmods = "lcdc";
-+				pinctrl-0 = <&bone_dvi_cape_dvi_00A1_pins>;
-+				panel-info {
-+					ac-bias           = <255>;
-+					ac-bias-intrpt    = <0>;
-+					dma-burst-sz      = <16>;
-+					bpp               = <16>;
-+					fdd               = <0x80>;
-+					tft-alt-mode      = <0>;
-+					stn-565-mode      = <0>;
-+					mono-8bit-mode    = <0>;
-+					invert-line-clock = <1>;
-+					invert-frm-clock  = <1>;
-+					sync-edge         = <0>;
-+					sync-ctrl         = <1>;
-+					raster-order      = <0>;
-+					fifo-th           = <0>;
-+				};
-+				display-timings {
-+					native-mode = <&timing0>;
-+					timing0: 1024x768 {
-+						hactive         = <1024>;
-+						vactive         = <768>;
-+						hback-porch     = <80>;
-+						hfront-porch    = <48>;
-+						vback-porch     = <15>;
-+						vfront-porch    = <3>;
-+						hsync-len       = <32>;
-+						vsync-len       = <4>;
-+						clock-frequency = <56000000>;
-+					};
-+				};
-+			};
- 
--				disp-pll = <560000000>;
--				panel-type = "1024x768@60";
-+			fb {
-+				compatible = "ti,am33xx-lcdc";
-+				reg = <0x4830e000 0x1000>;
-+				interrupt-parent = <&intc>;
-+				interrupts = <36>;
-+				ti,hwmods = "lcdc";
-+				ti,power-gpio = <&gpio2 31 0x0>;
- 
--				pinctrl-0 = <&bone_dvi_cape_dvi_00A1_pins>;
--				powerdn-gpio = <&gpio2 31 0>;
- 			};
- 		};
- 	};
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0048-boneblack-Add-default-HDMI-cape.patch b/patches/not-capebus/0048-boneblack-Add-default-HDMI-cape.patch
deleted file mode 100644
index 0b95a2f33f6b05383500f940dada6a80d99bd919..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0048-boneblack-Add-default-HDMI-cape.patch
+++ /dev/null
@@ -1,165 +0,0 @@
-From d82c7ac03e023989b3195b623c46293f49a20a68 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 9 Jan 2013 20:00:04 +0200
-Subject: [PATCH 48/98] boneblack: Add default HDMI cape
-
-WIP, doesn't work for me...
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/boot/dts/am335x-bone-common.dtsi   |   20 ++++++
- firmware/Makefile                           |    3 +
- firmware/capes/cape-boneblack-hdmi-00A0.dts |   89 +++++++++++++++++++++++++++
- 3 files changed, 112 insertions(+)
- create mode 100644 firmware/capes/cape-boneblack-hdmi-00A0.dts
-
-diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
-index b184224..7cb7a9b 100644
---- a/arch/arm/boot/dts/am335x-bone-common.dtsi
-+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
-@@ -188,6 +188,16 @@
- 				manufacturer = "Geiger Inc.";
- 				part-number = "BB-BONE-GEIGER";
- 			};
-+
-+			/* Beaglebone black has it soldered on */
-+			slot@6 {
-+				ti,cape-override;
-+				compatible = "ti,beaglebone-black";
-+				board-name = "Bone-Black-HDMI";
-+				version = "00A0";
-+				manufacturer = "Texas Instruments";
-+				part-number = "BB-BONELT-HDMI";
-+			};
- 		};
- 
- 		/* mapping between board names and dtb objects */
-@@ -242,6 +252,16 @@
- 					dtbo = "cape-bone-weather-00A0.dtbo";
- 				};
- 			};
-+
-+			/* beaglebone black hdmi on board */
-+			cape@5 {
-+				part-number = "BB-BONELT-HDMI";
-+				version@00A0 {
-+					version = "00A0";
-+					dtbo = "cape-boneblack-hdmi-00A0.dtbo";
-+				};
-+			};
-+
- 		};
- 	};
- };
-diff --git a/firmware/Makefile b/firmware/Makefile
-index 25ea3fb..600640a 100644
---- a/firmware/Makefile
-+++ b/firmware/Makefile
-@@ -149,6 +149,9 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += \
- # the weather cape
- fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += capes/cape-bone-weather-00A0.dtbo
- 
-+# the HDMI virtual cape on the beaglebone-black
-+fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += capes/cape-boneblack-hdmi-00A0.dtbo
-+
- fw-shipped-all := $(fw-shipped-y) $(fw-shipped-m) $(fw-shipped-)
- 
- # Directories which we _might_ need to create, so we have a rule for them.
-diff --git a/firmware/capes/cape-boneblack-hdmi-00A0.dts b/firmware/capes/cape-boneblack-hdmi-00A0.dts
-new file mode 100644
-index 0000000..7c62092
---- /dev/null
-+++ b/firmware/capes/cape-boneblack-hdmi-00A0.dts
-@@ -0,0 +1,89 @@
-+/*
-+* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
-+*
-+* This program is free software; you can redistribute it and/or modify
-+* it under the terms of the GNU General Public License version 2 as
-+* published by the Free Software Foundation.
-+*/
-+/dts-v1/;
-+/plugin/;
-+
-+/ {
-+	compatible = "ti,beaglebone";
-+	part-number = "BB-BONELT-HDMI";
-+	version = "00A0";
-+
-+	fragment@0 {
-+		target = <&am33xx_pinmux>;
-+		__overlay__ {
-+			nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins {
-+				pinctrl-single,pins = <
-+					0x1b0 0x03      /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */
-+					0xa0 0x08       /* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xa4 0x08       /* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xa8 0x08       /* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xac 0x08       /* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb0 0x08       /* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb4 0x08       /* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb8 0x08       /* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xbc 0x08       /* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc0 0x08       /* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc4 0x08       /* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc8 0x08       /* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xcc 0x08       /* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd0 0x08       /* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd4 0x08       /* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd8 0x08       /* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xdc 0x08       /* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xe0 0x00       /* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xe4 0x00       /* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xe8 0x00       /* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xec 0x00       /* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+				>;
-+			};
-+		};
-+	};
-+
-+	fragment@1 {
-+		target = <&i2c0>;
-+
-+		__overlay__ {
-+			/* needed to avoid gripping by DTC */
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+
-+			/* NXP TDA998x */
-+			tsl2550@34 {
-+				compatible = "tda998x";
-+				reg = <0x34>;
-+			};
-+               };
-+	};
-+
-+	fragment@2 {
-+		target = <&ocp>;
-+		__overlay__ {
-+
-+			/* avoid stupid warning */
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+
-+			hdmi {
-+				compatible = "lcdc,slave";
-+				i2c = <&i2c0>;
-+				pinctrl-names = "default";
-+				pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
-+			};
-+
-+			fb {
-+				compatible = "ti,am33xx-lcdc";
-+				reg = <0x4830e000 0x1000>;
-+				interrupt-parent = <&intc>;
-+				interrupts = <36>;
-+				ti,hwmods = "lcdc";
-+			};
-+
-+		};
-+	};
-+
-+};
--- 
-1.7.10.4
-
diff --git a/patches/not-capebus/0049-cape-bone-dvi-Use-720p-mode-as-default.patch b/patches/not-capebus/0049-cape-bone-dvi-Use-720p-mode-as-default.patch
deleted file mode 100644
index 33936d2a8b42a055fe85262be750ea1479022645..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0049-cape-bone-dvi-Use-720p-mode-as-default.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From c706f2c028f116791074f78726d5f4d6b5c3a185 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 9 Jan 2013 23:28:11 +0200
-Subject: [PATCH 49/90] cape-bone-dvi: Use 720p mode as default
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/capes/cape-bone-dvi-00A0.dts | 15 ++++++++++++++-
- firmware/capes/cape-bone-dvi-00A1.dts | 14 +++++++++++++-
- 2 files changed, 27 insertions(+), 2 deletions(-)
-
-diff --git a/firmware/capes/cape-bone-dvi-00A0.dts b/firmware/capes/cape-bone-dvi-00A0.dts
-index 5445847..988e801 100644
---- a/firmware/capes/cape-bone-dvi-00A0.dts
-+++ b/firmware/capes/cape-bone-dvi-00A0.dts
-@@ -105,7 +105,7 @@
- 					fifo-th           = <0>;
- 				};
- 				display-timings {
--					native-mode = <&timing0>;
-+					native-mode = <&timing1>;
- 					timing0: 1024x768 {
- 						hactive         = <1024>;
- 						vactive         = <768>;
-@@ -117,6 +117,19 @@
- 						vsync-len       = <4>;
- 						clock-frequency = <56000000>;
- 					};
-+					/* 1280 x 720 @ 60 Hz  Reduced blanking VESA CVT 0.92M9-R */
-+					timing1: 1280x720-60 {
-+						hactive         = <1280>;
-+						hfront-porch    = <48>;
-+						hsync-len       = <32>;
-+						hback-porch     = <80>;
-+						vactive         = <720>;
-+						vfront-porch    = <3>;
-+						vsync-len       = <5>;
-+						vback-porch     = <13>;
-+						clock-frequency = <64000000>;
-+					};
-+
- 				};
- 			};
- 
-diff --git a/firmware/capes/cape-bone-dvi-00A1.dts b/firmware/capes/cape-bone-dvi-00A1.dts
-index dc31146..bd275e0 100644
---- a/firmware/capes/cape-bone-dvi-00A1.dts
-+++ b/firmware/capes/cape-bone-dvi-00A1.dts
-@@ -105,7 +105,7 @@
- 					fifo-th           = <0>;
- 				};
- 				display-timings {
--					native-mode = <&timing0>;
-+					native-mode = <&timing1>;
- 					timing0: 1024x768 {
- 						hactive         = <1024>;
- 						vactive         = <768>;
-@@ -117,6 +117,18 @@
- 						vsync-len       = <4>;
- 						clock-frequency = <56000000>;
- 					};
-+					/* 1280 x 720 @ 60 Hz  Reduced blanking VESA CVT 0.92M9-R */
-+					timing1: 1280x720-60 {
-+						hactive         = <1280>;
-+						hfront-porch    = <48>;
-+						hsync-len       = <32>;
-+						hback-porch     = <80>;
-+						vactive         = <720>;
-+						vfront-porch    = <3>;
-+						vsync-len       = <5>;
-+						vback-porch     = <13>;
-+						clock-frequency = <64000000>;
-+					};
- 				};
- 			};
- 
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0050-am33xx.dtsi-Make-the-MUSB-not-crash-on-load.patch b/patches/not-capebus/0050-am33xx.dtsi-Make-the-MUSB-not-crash-on-load.patch
deleted file mode 100644
index cf347d139e4ecb33f1327db8f733bde99f550e73..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0050-am33xx.dtsi-Make-the-MUSB-not-crash-on-load.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-From 5408d238cb8a7f8806aa9319837288051a2ca842 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Thu, 10 Jan 2013 16:22:59 +0200
-Subject: [PATCH 50/90] am33xx.dtsi: Make the MUSB not crash on load
-
-Two entries for the same musb instance end up with a crash.
-Remove the duplicate, but it still doesn't work.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/boot/dts/am33xx.dtsi | 67 ++++---------------------------------------
- 1 file changed, 6 insertions(+), 61 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index c9eee93..9142e54 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -270,66 +270,6 @@
- 			status = "disabled";
- 		};
- 
--		usb0_phy: phy0 {
--			compatible = "nop-xceiv-usb";
--		};
--
--		usb1_phy: phy1 {
--			compatible = "nop-xceiv-usb";
--		};
--
--		usb_otg_hs: usb_otg_hs {
--			compatible = "ti,musb-am33xx";
--			ti,hwmods = "usb_otg_hs";
--			multipoint = <1>;
--			num-eps = <16>;
--			ram-bits = <12>;
--			port0-mode = <3>;
--			port1-mode = <1>;
--			power = <250>;
--			usb0-phy = <&usb0_phy>;
--			usb1-phy = <&usb1_phy>;
--		};
--
--		rtc {
--			compatible = "ti,da830-rtc";
--			ti,hwmods = "rtc";
--		};
--
--		spi0: spi@48030000 {
--			compatible = "ti,omap4-mcspi";
--			ti,hwmods = "spi0";
--			#address-cells = <1>;
--			#size-cells = <0>;
--			reg = <0x48030000 0x400>;
--			interrupt-parent = <&intc>;
--			interrupt = <65>;
--			dmas = <&edma 16
--				&edma 17
--				&edma 18
--				&edma 19>;
--			dma-names = "tx0", "rx0", "tx1", "rx1";
--			ti,spi-num-cs = <2>;
--			status = "disabled";
--		};
--
--		spi1: spi@481a0000 {
--			compatible = "ti,omap4-mcspi";
--			ti,hwmods = "spi1";
--			#address-cells = <1>;
--			#size-cells = <0>;
--			reg = <0x481a0000 0x400>;
--			interrupt-parent = <&intc>;
--			interrupt = <125>;
--			dmas = <&edma 42
--				&edma 43
--				&edma 44
--				&edma 45>;
--			dma-names = "tx0", "rx0", "tx1", "rx1";
--			ti,spi-num-cs = <2>;
--			status = "disabled";
--		};
--
- 		wdt2: wdt@44e35000 {
- 			compatible = "ti,omap3-wdt";
- 			ti,hwmods = "wd_timer2";
-@@ -535,6 +475,11 @@
- 				&edma 45>;
- 			dma-names = "tx0", "rx0", "tx1", "rx1";
- 			status = "disabled";
-+
-+		};
-+
-+		nop-phy {
-+			compatible = "nop-xceiv-usb";
- 		};
- 
- 		usb@47400000 {
-@@ -549,7 +494,7 @@
- 			num-eps = <16>;
- 			ram-bits = <12>;
- 			port0-mode = <3>;
--			port1-mode = <3>;
-+			port1-mode = <1>;
- 			power = <250>;
- 			ti,hwmods = "usb_otg_hs";
- 		};
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0051-regulator-DUMMY_REGULATOR-should-work-for-OF-too.patch b/patches/not-capebus/0051-regulator-DUMMY_REGULATOR-should-work-for-OF-too.patch
deleted file mode 100644
index eb4088917d7888d9a0b55abe69865157a2e426e2..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0051-regulator-DUMMY_REGULATOR-should-work-for-OF-too.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 66555e4a1d64f928f479489cb9e2a146036aaab3 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 15 Jan 2013 11:17:59 +0200
-Subject: [PATCH 51/90] regulator: DUMMY_REGULATOR should work for OF too
-
-Dummy regulator should work when using Device Tree.
-So don't set has_full_constraints when it is set.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/regulator/core.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
-index 53abc98..9198104 100644
---- a/drivers/regulator/core.c
-+++ b/drivers/regulator/core.c
-@@ -3786,6 +3786,7 @@ static int __init regulator_init_complete(void)
- 	struct regulation_constraints *c;
- 	int enabled, ret;
- 
-+#ifndef CONFIG_REGULATOR_DUMMY
- 	/*
- 	 * Since DT doesn't provide an idiomatic mechanism for
- 	 * enabling full constraints and since it's much more natural
-@@ -3794,6 +3795,7 @@ static int __init regulator_init_complete(void)
- 	 */
- 	if (of_have_populated_dt())
- 		has_full_constraints = true;
-+#endif
- 
- 	mutex_lock(&regulator_list_mutex);
- 
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0052-OF-Overlay-Remove-excessive-debugging-crud.patch b/patches/not-capebus/0052-OF-Overlay-Remove-excessive-debugging-crud.patch
deleted file mode 100644
index 972868d890a883092136d77aa28ecfe44a39b9a1..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0052-OF-Overlay-Remove-excessive-debugging-crud.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From b4eaecc521696c2d26924b72fccfdacc6e791ee6 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 15 Jan 2013 12:05:11 +0200
-Subject: [PATCH 52/90] OF: Overlay: Remove excessive debugging crud
-
-There's no need for such excessive debugging crud anymore. Remove it.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/of/overlay.c | 41 -----------------------------------------
- 1 file changed, 41 deletions(-)
-
-diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
-index f65c3a3..fc7bf5a 100644
---- a/drivers/of/overlay.c
-+++ b/drivers/of/overlay.c
-@@ -257,9 +257,6 @@ static void of_overlay_device_entry_entry_add(struct of_overlay_info *ovinfo,
- static int of_overlay_notify(struct notifier_block *nb,
- 				unsigned long action, void *arg)
- {
--#ifdef DEBUG
--	char *propstr = NULL, *spropstr = NULL;
--#endif
- 	struct of_overlay_info *ovinfo;
- 	struct device_node *node;
- 	struct property *prop, *sprop, *cprop;
-@@ -278,9 +275,6 @@ static int of_overlay_notify(struct notifier_block *nb,
- 		if (node == NULL)
- 			return notifier_from_errno(-EINVAL);
- 		prop = NULL;
--#ifdef DEBUG
--		propstr = NULL;
--#endif
- 		break;
- 	case OF_RECONFIG_ADD_PROPERTY:
- 	case OF_RECONFIG_REMOVE_PROPERTY:
-@@ -294,9 +288,6 @@ static int of_overlay_notify(struct notifier_block *nb,
- 		prop = pr->prop;
- 		if (prop == NULL)
- 			return notifier_from_errno(-EINVAL);
--#ifdef DEBUG
--		propstr = __of_dump_prop(prop);
--#endif
- 		break;
- 	default:
- 		return notifier_from_errno(0);
-@@ -307,38 +298,6 @@ static int of_overlay_notify(struct notifier_block *nb,
- 	if (err != 0)
- 		return notifier_from_errno(err);
- 
--#ifdef DEBUG
--	switch (action) {
--	case OF_RECONFIG_ATTACH_NODE:
--		pr_debug("ATTACH_NODE: %s\n", node->full_name);
--		break;
--	case OF_RECONFIG_DETACH_NODE:
--		pr_debug("DETACH_NODE: %s\n", node->full_name);
--		break;
--	case OF_RECONFIG_ADD_PROPERTY:
--		pr_debug("ADD_PROP:    %s %s%s\n", node->full_name,
--				prop->name, propstr);
--		break;
--	case OF_RECONFIG_REMOVE_PROPERTY:
--		pr_debug("REMOVE_PROP: %s %s%s\n", node->full_name,
--				prop->name, propstr);
--		break;
--	case OF_RECONFIG_UPDATE_PROPERTY:
--		sprop = of_find_property(node, prop->name, NULL);
--		if (sprop)
--			spropstr = __of_dump_prop(sprop);
--		pr_debug("UPDATE_PROP: %s '%s%s' -> '%s%s'\n", node->full_name,
--				prop->name, spropstr,
--				prop->name, propstr);
--		break;
--
--	}
--
--	/* NULL is fine */
--	kfree(propstr);
--	kfree(spropstr);
--#endif
--
- 	/* come up with the device entry (if any) */
- 	pdev = NULL;
- 	state = 0;
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0053-of-i2c-Export-single-device-registration-method.patch b/patches/not-capebus/0053-of-i2c-Export-single-device-registration-method.patch
deleted file mode 100644
index 30797edd5dfba5ac1f7bd9e381b16433c8393166..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0053-of-i2c-Export-single-device-registration-method.patch
+++ /dev/null
@@ -1,171 +0,0 @@
-From 24d905ca8a9556e26bc952b95b2d22524a480482 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 15 Jan 2013 11:26:27 +0200
-Subject: [PATCH 53/90] of-i2c: Export single device registration method
-
-Dynamically inserting i2c client device nodes requires the use
-of a single device registration method. Rework and export it.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/of/of_i2c.c    | 104 +++++++++++++++++++++++++++----------------------
- include/linux/of_i2c.h |  11 ++++++
- 2 files changed, 68 insertions(+), 47 deletions(-)
-
-diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
-index b667264..116a5e0 100644
---- a/drivers/of/of_i2c.c
-+++ b/drivers/of/of_i2c.c
-@@ -17,10 +17,64 @@
- #include <linux/of_i2c.h>
- #include <linux/of_irq.h>
- #include <linux/module.h>
-+#include <linux/err.h>
-+
-+struct i2c_client *
-+of_i2c_register_device(struct i2c_adapter *adap,
-+		struct device_node *node)
-+{
-+	struct i2c_client *result;
-+	struct i2c_board_info info = {};
-+	struct dev_archdata dev_ad = {};
-+	const __be32 *addr;
-+	int len;
-+
-+	dev_dbg(&adap->dev, "of_i2c: register %s\n", node->full_name);
-+
-+	if (of_modalias_node(node, info.type, sizeof(info.type)) < 0) {
-+		dev_err(&adap->dev, "of_i2c: modalias failure on %s\n",
-+			node->full_name);
-+		return ERR_PTR(-EINVAL);
-+	}
-+
-+	addr = of_get_property(node, "reg", &len);
-+	if (!addr || (len < sizeof(int))) {
-+		dev_err(&adap->dev, "of_i2c: invalid reg on %s\n",
-+			node->full_name);
-+		return ERR_PTR(-EINVAL);
-+	}
-+
-+	info.addr = be32_to_cpup(addr);
-+	if (info.addr > (1 << 10) - 1) {
-+		dev_err(&adap->dev, "of_i2c: invalid addr=%x on %s\n",
-+			info.addr, node->full_name);
-+		return ERR_PTR(-EINVAL);
-+	}
-+
-+	info.irq = irq_of_parse_and_map(node, 0);
-+	info.of_node = of_node_get(node);
-+	info.archdata = &dev_ad;
-+
-+	if (of_get_property(node, "wakeup-source", NULL))
-+		info.flags |= I2C_CLIENT_WAKE;
-+
-+	request_module("%s%s", I2C_MODULE_PREFIX, info.type);
-+
-+	result = i2c_new_device(adap, &info);
-+	if (result == NULL) {
-+		dev_err(&adap->dev, "of_i2c: Failure registering %s\n",
-+			node->full_name);
-+		of_node_put(node);
-+		irq_dispose_mapping(info.irq);
-+		return ERR_PTR(-ENODEV);
-+	}
-+
-+	return result;
-+}
-+EXPORT_SYMBOL(of_i2c_register_device);
- 
- void of_i2c_register_devices(struct i2c_adapter *adap)
- {
--	void *result;
- 	struct device_node *node;
- 
- 	/* Only register child devices if the adapter has a node pointer set */
-@@ -29,52 +83,8 @@ void of_i2c_register_devices(struct i2c_adapter *adap)
- 
- 	dev_dbg(&adap->dev, "of_i2c: walking child nodes\n");
- 
--	for_each_available_child_of_node(adap->dev.of_node, node) {
--		struct i2c_board_info info = {};
--		struct dev_archdata dev_ad = {};
--		const __be32 *addr;
--		int len;
--
--		dev_dbg(&adap->dev, "of_i2c: register %s\n", node->full_name);
--
--		if (of_modalias_node(node, info.type, sizeof(info.type)) < 0) {
--			dev_err(&adap->dev, "of_i2c: modalias failure on %s\n",
--				node->full_name);
--			continue;
--		}
--
--		addr = of_get_property(node, "reg", &len);
--		if (!addr || (len < sizeof(int))) {
--			dev_err(&adap->dev, "of_i2c: invalid reg on %s\n",
--				node->full_name);
--			continue;
--		}
--
--		info.addr = be32_to_cpup(addr);
--		if (info.addr > (1 << 10) - 1) {
--			dev_err(&adap->dev, "of_i2c: invalid addr=%x on %s\n",
--				info.addr, node->full_name);
--			continue;
--		}
--
--		info.irq = irq_of_parse_and_map(node, 0);
--		info.of_node = of_node_get(node);
--		info.archdata = &dev_ad;
--
--		if (of_get_property(node, "wakeup-source", NULL))
--			info.flags |= I2C_CLIENT_WAKE;
--
--		request_module("%s%s", I2C_MODULE_PREFIX, info.type);
--
--		result = i2c_new_device(adap, &info);
--		if (result == NULL) {
--			dev_err(&adap->dev, "of_i2c: Failure registering %s\n",
--			        node->full_name);
--			of_node_put(node);
--			irq_dispose_mapping(info.irq);
--			continue;
--		}
--	}
-+	for_each_available_child_of_node(adap->dev.of_node, node)
-+		of_i2c_register_device(adap, node);
- }
- EXPORT_SYMBOL(of_i2c_register_devices);
- 
-diff --git a/include/linux/of_i2c.h b/include/linux/of_i2c.h
-index cfb545c..53fca8f 100644
---- a/include/linux/of_i2c.h
-+++ b/include/linux/of_i2c.h
-@@ -15,6 +15,9 @@
- #if defined(CONFIG_OF_I2C) || defined(CONFIG_OF_I2C_MODULE)
- #include <linux/i2c.h>
- 
-+struct i2c_client *
-+of_i2c_register_device(struct i2c_adapter *adap, struct device_node *node);
-+
- extern void of_i2c_register_devices(struct i2c_adapter *adap);
- 
- /* must call put_device() when done with returned i2c_client device */
-@@ -25,6 +28,14 @@ extern struct i2c_adapter *of_find_i2c_adapter_by_node(
- 						struct device_node *node);
- 
- #else
-+
-+static inline struct i2c_client *
-+of_i2c_register_device(struct i2c_adapter *adap,
-+		struct device_node *node)
-+{
-+	return ERR_PTR(-ENODEV);
-+}
-+
- static inline void of_i2c_register_devices(struct i2c_adapter *adap)
- {
- 	return;
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0054-OF-Overlay-I2C-client-devices-special-handling.patch b/patches/not-capebus/0054-OF-Overlay-I2C-client-devices-special-handling.patch
deleted file mode 100644
index e34bef1b72359582151f53cbdf69f5fe310cfb81..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0054-OF-Overlay-I2C-client-devices-special-handling.patch
+++ /dev/null
@@ -1,197 +0,0 @@
-From 4f5045ec9efd74171acb7bb46a62fe3d1f8f74ea Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 15 Jan 2013 12:07:50 +0200
-Subject: [PATCH 54/90] OF: Overlay: I2C client devices special handling.
-
-The I2C client devices are 'special', as in they're not platform
-devices. They need to be registered with an I2C specific method.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/of/overlay.c | 132 +++++++++++++++++++++++++++------------------------
- 1 file changed, 71 insertions(+), 61 deletions(-)
-
-diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
-index fc7bf5a..0577067 100644
---- a/drivers/of/overlay.c
-+++ b/drivers/of/overlay.c
-@@ -13,6 +13,7 @@
- #include <linux/module.h>
- #include <linux/of.h>
- #include <linux/of_device.h>
-+#include <linux/of_i2c.h>
- #include <linux/string.h>
- #include <linux/ctype.h>
- #include <linux/errno.h>
-@@ -368,6 +369,72 @@ static int of_overlay_prep_one(struct of_overlay_info *ovinfo)
- 	return 0;
- }
- 
-+static int of_overlay_device_entry_change(struct of_overlay_info *ovinfo,
-+		struct of_overlay_device_entry *re, int revert)
-+{
-+	struct i2c_adapter *adap = NULL;
-+	struct i2c_client *client;
-+	struct platform_device *pdev, *parent_pdev = NULL;
-+	int state;
-+
-+	state = !!re->state  ^ !!revert;
-+
-+	if (re->np && re->np->parent) {
-+		pr_debug("%s: parent is %s\n",
-+				__func__, re->np->parent->full_name);
-+		adap = of_find_i2c_adapter_by_node(re->np->parent);
-+		if (adap == NULL)
-+			parent_pdev = of_find_device_by_node(re->np->parent);
-+	}
-+
-+	if (state) {
-+
-+		/* try to see if it's an I2C client node */
-+		if (adap == NULL) {
-+
-+			pr_debug("%s: creating new platform device "
-+					"new_node='%s' %p\n",
-+					__func__, re->np->full_name, re->np);
-+
-+			pdev = of_platform_device_create(re->np, NULL,
-+					parent_pdev ? &parent_pdev->dev : NULL);
-+			if (pdev == NULL) {
-+				pr_warn("%s: Failed to create platform device "
-+						"for '%s'\n",
-+						__func__, re->np->full_name);
-+			}
-+		} else {
-+			pr_debug("%s: creating new i2c_client device "
-+					"new_node='%s' %p\n",
-+					__func__, re->np->full_name, re->np);
-+
-+			client = of_i2c_register_device(adap, re->np);
-+
-+			if (client == NULL) {
-+				pr_warn("%s: Failed to create i2c client device "
-+						"for '%s'\n",
-+						__func__, re->np->full_name);
-+			}
-+		}
-+
-+	} else {
-+
-+		if (re->pdev) {
-+			pr_debug("%s: removing pdev %s\n", __func__,
-+					dev_name(&re->pdev->dev));
-+			platform_device_unregister(re->pdev);
-+		}
-+	}
-+
-+	if (adap)
-+		put_device(&adap->dev);
-+
-+	if (parent_pdev)
-+		of_dev_put(parent_pdev);
-+
-+	return 0;
-+}
-+
- /**
-  * Revert one overlay
-  * Either due to an error, or due to normal overlay removal.
-@@ -380,7 +447,6 @@ static void of_overlay_revert_one(struct of_overlay_info *ovinfo)
- 	struct of_overlay_device_entry *re, *ren;
- 	struct of_overlay_log_entry *le, *len;
- 	struct property *prop, **propp;
--	struct platform_device *pdev, *parent_pdev;
- 	int ret;
- 	unsigned long flags;
- 
-@@ -393,37 +459,10 @@ static void of_overlay_revert_one(struct of_overlay_info *ovinfo)
- 	/* overlay applied correctly, now create/destroy pdevs */
- 	list_for_each_entry_safe_reverse(re, ren, &ovinfo->de_list, node) {
- 
--		if (!re->state) {
--
--			parent_pdev = of_find_device_by_node(re->np->parent);
--
--			pr_debug("%s: creating new platform device "
--					"new_node='%s' %p\n",
--					__func__, re->np->full_name, re->np);
--
--			pdev = of_platform_device_create(re->np, NULL,
--					parent_pdev ? &parent_pdev->dev : NULL);
--			of_dev_put(parent_pdev);
--
--			if (pdev == NULL) {
--				pr_warn("%s: Failed to create platform device "
--						"for '%s'\n",
--						__func__, re->np->full_name);
--			}
--
--		} else {
--
--			if (re->pdev) {
--				pr_debug("%s: removing pdev %s\n", __func__,
--						dev_name(&re->pdev->dev));
--				platform_device_unregister(re->pdev);
--			}
--		}
-+		of_overlay_device_entry_change(ovinfo, re, 1);
- 
- 		of_node_put(re->np);
--
- 		list_del(&re->node);
--
- 		kfree(re);
- 	}
- 
-@@ -515,8 +554,7 @@ static void of_overlay_revert_one(struct of_overlay_info *ovinfo)
-  */
- static int of_overlay_post_one(struct of_overlay_info *ovinfo, int err)
- {
--	struct of_overlay_device_entry *re, *ren;
--	struct platform_device *pdev, *parent_pdev;
-+	struct of_overlay_device_entry *re;
- 
- 	of_reconfig_notifier_unregister(&ovinfo->notifier);
- 
-@@ -527,36 +565,8 @@ static int of_overlay_post_one(struct of_overlay_info *ovinfo, int err)
- 	}
- 
- 	/* overlay applied correctly, now create/destroy pdevs */
--	list_for_each_entry_safe(re, ren, &ovinfo->de_list, node) {
--
--		if (re->state) {
--
--			parent_pdev = of_find_device_by_node(re->np->parent);
--
--			pr_debug("%s: creating new platform device "
--					"new_node='%s' %p\n",
--					__func__, re->np->full_name, re->np);
--
--			pdev = of_platform_device_create(re->np, NULL,
--					parent_pdev ? &parent_pdev->dev : NULL);
--			of_dev_put(parent_pdev);
--
--			if (pdev == NULL) {
--				pr_warn("%s: Failed to create platform device "
--						"for '%s'\n",
--						__func__, re->np->full_name);
--			}
--
--			/* keep it around */
--			re->pdev = pdev;
--
--		} else {
--
--			if (re->pdev) {
--				platform_device_unregister(re->pdev);
--			}
--		}
--	}
-+	list_for_each_entry(re, &ovinfo->de_list, node)
-+		of_overlay_device_entry_change(ovinfo, re, 0);
- 
- 	return 0;
- }
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0055-omap-Fix-bug-on-partial-resource-addition.patch b/patches/not-capebus/0055-omap-Fix-bug-on-partial-resource-addition.patch
deleted file mode 100644
index f0363c0649dd95ed9843724ef067a3235682eaca..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0055-omap-Fix-bug-on-partial-resource-addition.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 6e585588a0b8af449d75c4a89a6541c37c8b0cc5 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 15 Jan 2013 13:22:00 +0200
-Subject: [PATCH 55/90] omap: Fix bug on partial resource addition.
-
-Correctly add all of the resources. Bug was uncovered by missing dma
-resources.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/mach-omap2/omap_device.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
-index 9f8dba1..0d7b065 100644
---- a/arch/arm/mach-omap2/omap_device.c
-+++ b/arch/arm/mach-omap2/omap_device.c
-@@ -616,7 +616,7 @@ static int omap_device_fixup_resources(struct omap_device *od)
- 
- 		/* this is our new resource table */
- 		res = rnew;
--		res_count = j;
-+		res_count = j + pdev->num_resources;
- 
- 	} else {
- 		dev_dbg(&pdev->dev, "%s(): using resources from hwmod %d\n",
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0056-ASoC-davinci-mcasp-Add-pinctrl-support.patch b/patches/not-capebus/0056-ASoC-davinci-mcasp-Add-pinctrl-support.patch
deleted file mode 100644
index 09ad68277b1b2116d6e4a2c672747fd5523a56b5..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0056-ASoC-davinci-mcasp-Add-pinctrl-support.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From bc6381a6a50dd9480914a3e480f134d441229403 Mon Sep 17 00:00:00 2001
-From: "Hebbar, Gururaja" <gururaja.hebbar@ti.com>
-Date: Mon, 29 Oct 2012 19:18:47 +0530
-Subject: [PATCH 56/90] ASoC: davinci-mcasp: Add pinctrl support
-
-Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
----
- sound/soc/davinci/davinci-mcasp.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
-index 55e2bf6..83d96eb 100644
---- a/sound/soc/davinci/davinci-mcasp.c
-+++ b/sound/soc/davinci/davinci-mcasp.c
-@@ -25,6 +25,7 @@
- #include <linux/of.h>
- #include <linux/of_platform.h>
- #include <linux/of_device.h>
-+#include <linux/pinctrl/consumer.h>
- 
- #include <sound/core.h>
- #include <sound/pcm.h>
-@@ -1080,6 +1081,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
- 	struct resource *mem, *ioarea, *res;
- 	struct snd_platform_data *pdata;
- 	struct davinci_audio_dev *dev;
-+	struct pinctrl *pinctrl;
- 	int ret;
- 
- 	if (!pdev->dev.platform_data && !pdev->dev.of_node) {
-@@ -1111,6 +1113,11 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
- 		return -EBUSY;
- 	}
- 
-+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-+	if (IS_ERR(pinctrl))
-+		dev_warn(&pdev->dev,
-+				"pins are not configured from the driver\n");
-+
- 	pm_runtime_enable(&pdev->dev);
- 
- 	ret = pm_runtime_get_sync(&pdev->dev);
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0057-ASoC-Davinci-machine-Add-device-tree-binding.patch b/patches/not-capebus/0057-ASoC-Davinci-machine-Add-device-tree-binding.patch
deleted file mode 100644
index c58018261998cbad3df8c201229ec043fcbe19c5..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0057-ASoC-Davinci-machine-Add-device-tree-binding.patch
+++ /dev/null
@@ -1,317 +0,0 @@
-From e1b5e6bfbada899685cc68fe00bb4ff55e2bb739 Mon Sep 17 00:00:00 2001
-From: "Hebbar, Gururaja" <gururaja.hebbar@ti.com>
-Date: Tue, 31 Jul 2012 21:25:38 +0530
-Subject: [PATCH 57/90] ASoC: Davinci: machine: Add device tree binding
-
-Device tree support for Davinci Machine driver
-
-When the board boots with device tree, the driver will receive card,
-codec, dai interface details (like the card name, DAPM routing map,
-phandle for the audio components described in the dts file, codec mclk
-speed).
-The card will be set up based on this information.
-Since the routing is provided via DT we can mark the card fully routed
-so core can take care of disconnecting the unused pins.
-
-Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
----
- .../bindings/sound/davinci-evm-audio.txt           |  53 ++++++
- sound/soc/davinci/davinci-evm.c                    | 179 ++++++++++++++++++---
- 2 files changed, 212 insertions(+), 20 deletions(-)
- create mode 100644 Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
-
-diff --git a/Documentation/devicetree/bindings/sound/davinci-evm-audio.txt b/Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
-new file mode 100644
-index 0000000..25f7180
---- /dev/null
-+++ b/Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
-@@ -0,0 +1,53 @@
-+* Texas Instruments SoC audio setups with TLV320AIC3X Codec
-+
-+Required properties:
-+- compatible :
-+	"ti,dm365-voice-codec-audio"	: for DM365 platforms with Voice Codec
-+	"ti,da830-evm-audio"		: for DM365/DA8xx/OMAPL1x/AM33xx
-+
-+- ti,model : The user-visible name of this sound complex.
-+- ti,audio-codec : The phandle of the TLV320AIC3x audio codec
-+- ti,mcasp-controller : The phandle of the McASP controller
-+- ti,codec-clock-rate : The Codec Clock rate (in Hz) applied to the Codec
-+- ti,audio-routing : A list of the connections between audio components.
-+  Each entry is a pair of strings, the first being the connection's sink,
-+  the second being the connection's source. Valid names for sources and
-+  sinks are the codec's pins, and the jacks on the board:
-+
-+  Codec pins:
-+
-+  * MIC3L
-+  * MIC3R
-+  * LINE1L
-+  * LINE2L
-+  * LINE1R
-+  * LINE2R
-+
-+  Board connectors:
-+
-+  * Headphone Jack
-+  * Line Out
-+  * Mic Jack
-+
-+
-+Example:
-+
-+sound {
-+	compatible = "ti,da830-evm-audio";
-+	ti,model = "DA830 EVM";
-+	ti,audio-codec = <&tlv320aic3x>;
-+	ti,mcasp-controller = <&mcasp1>;
-+	ti,codec-clock-rate = <12000000>;
-+	ti,audio-routing =
-+		"Headphone Jack",       "HPLOUT",
-+		"Headphone Jack",       "HPROUT",
-+		"Line Out",             "LLOUT",
-+		"Line Out",             "RLOUT",
-+		"MIC3L",                "Mic Bias 2V",
-+		"MIC3R",                "Mic Bias 2V",
-+		"Mic Bias 2V",          "Mic Jack",
-+		"LINE1L",               "Line In",
-+		"LINE2L",               "Line In",
-+		"LINE1R",               "Line In",
-+		"LINE2R",               "Line In";
-+};
-diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
-index 591f547..a39dbee 100644
---- a/sound/soc/davinci/davinci-evm.c
-+++ b/sound/soc/davinci/davinci-evm.c
-@@ -16,6 +16,7 @@
- #include <linux/platform_device.h>
- #include <linux/platform_data/edma.h>
- #include <linux/i2c.h>
-+#include <linux/of_platform.h>
- #include <sound/core.h>
- #include <sound/pcm.h>
- #include <sound/soc.h>
-@@ -35,27 +36,38 @@ static int evm_hw_params(struct snd_pcm_substream *substream,
- 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
- 	struct snd_soc_dai *codec_dai = rtd->codec_dai;
- 	struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-+	struct snd_soc_codec *codec = rtd->codec;
-+	struct snd_soc_card *soc_card = codec->card;
-+	struct device_node *np = soc_card->dev->of_node;
- 	int ret = 0;
- 	unsigned sysclk;
- 
--	/* ASP1 on DM355 EVM is clocked by an external oscillator */
--	if (machine_is_davinci_dm355_evm() || machine_is_davinci_dm6467_evm() ||
--	    machine_is_davinci_dm365_evm())
--		sysclk = 27000000;
--
--	/* ASP0 in DM6446 EVM is clocked by U55, as configured by
--	 * board-dm644x-evm.c using GPIOs from U18.  There are six
--	 * options; here we "know" we use a 48 KHz sample rate.
--	 */
--	else if (machine_is_davinci_evm())
--		sysclk = 12288000;
--
--	else if (machine_is_davinci_da830_evm() ||
--				machine_is_davinci_da850_evm())
--		sysclk = 24576000;
--
--	else
--		return -EINVAL;
-+	if (np) {
-+		ret = of_property_read_u32(np, "ti,codec-clock-rate", &sysclk);
-+		if (ret < 0)
-+			return ret;
-+	} else {
-+		/* ASP1 on DM355 EVM is clocked by an external oscillator */
-+		if (machine_is_davinci_dm355_evm() ||
-+			machine_is_davinci_dm6467_evm() ||
-+			machine_is_davinci_dm365_evm())
-+			sysclk = 27000000;
-+
-+		/*
-+		 * ASP0 in DM6446 EVM is clocked by U55, as configured by
-+		 * board-dm644x-evm.c using GPIOs from U18.  There are six
-+		 * options; here we "know" we use a 48 KHz sample rate.
-+		 */
-+		else if (machine_is_davinci_evm())
-+			sysclk = 12288000;
-+
-+		else if (machine_is_davinci_da830_evm() ||
-+					machine_is_davinci_da850_evm())
-+			sysclk = 24576000;
-+
-+		else
-+			return -EINVAL;
-+	}
- 
- 	/* set codec DAI configuration */
- 	ret = snd_soc_dai_set_fmt(codec_dai, AUDIO_FORMAT);
-@@ -133,13 +145,22 @@ static int evm_aic3x_init(struct snd_soc_pcm_runtime *rtd)
- {
- 	struct snd_soc_codec *codec = rtd->codec;
- 	struct snd_soc_dapm_context *dapm = &codec->dapm;
-+	struct device_node *np = codec->card->dev->of_node;
-+	int ret;
- 
- 	/* Add davinci-evm specific widgets */
- 	snd_soc_dapm_new_controls(dapm, aic3x_dapm_widgets,
- 				  ARRAY_SIZE(aic3x_dapm_widgets));
- 
--	/* Set up davinci-evm specific audio path audio_map */
--	snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
-+	if (np) {
-+		ret = snd_soc_of_parse_audio_routing(codec->card,
-+							"ti,audio-routing");
-+		if (ret)
-+			return ret;
-+	} else {
-+		/* Set up davinci-evm specific audio path audio_map */
-+		snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
-+	}
- 
- 	/* not connected */
- 	snd_soc_dapm_disable_pin(dapm, "MONO_LOUT");
-@@ -288,6 +309,108 @@ static struct snd_soc_card da850_snd_soc_card = {
- 	.num_links = 1,
- };
- 
-+#if defined(CONFIG_OF)
-+
-+enum {
-+	MACHINE_VERSION_1 = 0,	/* DM365 with Voice Codec */
-+	MACHINE_VERSION_2,	/* DM365/DA8xx/OMAPL1x/AM33xx */
-+};
-+
-+static const struct of_device_id davinci_evm_dt_ids[] = {
-+	{
-+		.compatible = "ti,dm365-voice-codec-audio",
-+		.data = (void *)MACHINE_VERSION_1,
-+	},
-+	{
-+		.compatible = "ti,da830-evm-audio",
-+		.data = (void *)MACHINE_VERSION_2,
-+	},
-+	{ /* sentinel */ }
-+};
-+MODULE_DEVICE_TABLE(of, davinci_mcasp_dt_ids);
-+
-+/*
-+ * This struct is just used as place holder. It will be filled with
-+ * data from dt node
-+ */
-+static struct snd_soc_dai_link evm_dai = {
-+	.name		= "TLV320AIC3X",
-+	.stream_name	= "AIC3X",
-+	.codec_dai_name	= "tlv320aic3x-hifi",
-+};
-+
-+/* davinci evm audio machine driver */
-+static struct snd_soc_card evm_soc_card = {
-+	.owner = THIS_MODULE,
-+	.dai_link = &evm_dai,
-+	.num_links = 1,
-+};
-+
-+static int davinci_evm_probe(struct platform_device *pdev)
-+{
-+	struct device_node *np = pdev->dev.of_node;
-+	const struct of_device_id *match =
-+		of_match_device(of_match_ptr(davinci_evm_dt_ids), &pdev->dev);
-+	u32 machine_ver;
-+	int ret = 0;
-+
-+	machine_ver = (u32)match->data;
-+	switch (machine_ver) {
-+	case MACHINE_VERSION_1:
-+		evm_dai.name		= "Voice Codec - CQ93VC";
-+		evm_dai.stream_name	= "CQ93";
-+		evm_dai.codec_dai_name	= "cq93vc-hifi";
-+		break;
-+
-+	case MACHINE_VERSION_2:
-+		evm_dai.ops = &evm_ops;
-+		evm_dai.init = evm_aic3x_init;
-+		break;
-+	}
-+
-+	evm_dai.codec_of_node = of_parse_phandle(np, "ti,audio-codec", 0);
-+	if (!evm_dai.codec_of_node)
-+		return -EINVAL;
-+
-+	evm_dai.cpu_of_node = of_parse_phandle(np,
-+						"ti,mcasp-controller", 0);
-+	if (!evm_dai.cpu_of_node)
-+		return -EINVAL;
-+
-+	evm_dai.platform_of_node = evm_dai.cpu_of_node;
-+
-+	evm_soc_card.dev = &pdev->dev;
-+	ret = snd_soc_of_parse_card_name(&evm_soc_card, "ti,model");
-+	if (ret)
-+		return ret;
-+
-+	ret = snd_soc_register_card(&evm_soc_card);
-+	if (ret)
-+		dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
-+
-+	return ret;
-+}
-+
-+static int __devexit davinci_evm_remove(struct platform_device *pdev)
-+{
-+	struct snd_soc_card *card = platform_get_drvdata(pdev);
-+
-+	snd_soc_unregister_card(card);
-+
-+	return 0;
-+}
-+
-+static struct platform_driver davinci_evm_driver = {
-+	.probe		= davinci_evm_probe,
-+	.remove		= __devexit_p(davinci_evm_remove),
-+	.driver		= {
-+		.name	= "davinci_evm",
-+		.owner	= THIS_MODULE,
-+		.of_match_table = of_match_ptr(davinci_evm_dt_ids),
-+	},
-+};
-+#endif
-+
- static struct platform_device *evm_snd_device;
- 
- static int __init evm_init(void)
-@@ -296,6 +419,15 @@ static int __init evm_init(void)
- 	int index;
- 	int ret;
- 
-+#if defined(CONFIG_OF)
-+	/*
-+	 * If dtb is there, the devices will be created dynamically.
-+	 * Only register platfrom driver structure.
-+	 */
-+	if (of_have_populated_dt())
-+		return platform_driver_register(&davinci_evm_driver);
-+#endif
-+
- 	if (machine_is_davinci_evm()) {
- 		evm_snd_dev_data = &dm6446_snd_soc_card_evm;
- 		index = 0;
-@@ -331,6 +463,13 @@ static int __init evm_init(void)
- 
- static void __exit evm_exit(void)
- {
-+#if defined(CONFIG_OF)
-+	if (of_have_populated_dt()) {
-+		platform_driver_unregister(&davinci_evm_driver);
-+		return;
-+	}
-+#endif
-+
- 	platform_device_unregister(evm_snd_device);
- }
- 
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0058-am33xx-Add-mcasp0-and-mcasp1-device-tree-entries.patch b/patches/not-capebus/0058-am33xx-Add-mcasp0-and-mcasp1-device-tree-entries.patch
deleted file mode 100644
index e4c5c6217efd4311258723a38722296dd5a41979..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0058-am33xx-Add-mcasp0-and-mcasp1-device-tree-entries.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From f5c9748dccd8da74298d03d326f0028fa7baa6f5 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Thu, 10 Jan 2013 20:37:45 +0200
-Subject: [PATCH 58/90] am33xx: Add mcasp0 and mcasp1 device tree entries
-
-Add missing mcasp entries in teh am33xx.dtsi include file.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/boot/dts/am33xx.dtsi | 21 +++++++++++++++++++++
- 1 file changed, 21 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index 9142e54..cc1c013 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -670,5 +670,26 @@
- 				&edma 5>;
- 			dma-names = "tx", "rx";
- 		};
-+
-+		mcasp0: mcasp@48038000 {
-+			compatible = "ti,omap2-mcasp-audio";
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			ti,hwmods = "mcasp0";
-+			reg = <0x48038000 0x2000>;
-+			interrupts = <80 81>;
-+			status = "disabled";
-+		};
-+
-+		mcasp1: mcasp@4803C000 {
-+			compatible = "ti,omap2-mcasp-audio";
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			ti,hwmods = "mcasp1";
-+			reg = <0x4803C000 0x2000>;
-+			interrupts = <82 83>;
-+			status = "disabled";
-+		};
-+
- 	};
- };
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0059-ASoC-dts-OMAP2-AM33xx-HACK-Add-missing-dma-info.patch b/patches/not-capebus/0059-ASoC-dts-OMAP2-AM33xx-HACK-Add-missing-dma-info.patch
deleted file mode 100644
index 0f1214cf61d240db712696befc1c1317026ba31a..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0059-ASoC-dts-OMAP2-AM33xx-HACK-Add-missing-dma-info.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From e47b783a208099998654fe13f0f882d690d97602 Mon Sep 17 00:00:00 2001
-From: "Hebbar, Gururaja" <gururaja.hebbar@ti.com>
-Date: Fri, 10 Aug 2012 20:38:09 +0530
-Subject: [PATCH 59/90] ASoC/dts: OMAP2+: AM33xx: [HACK] Add missing dma info
-
-This patch adds dma related  dt entries and functions that later will be
-replaced by actual DMA porting
-
-Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
-
-Conflicts:
-	arch/arm/boot/dts/am33xx.dtsi
----
- arch/arm/boot/dts/am33xx.dtsi     |  6 ++++++
- sound/soc/davinci/davinci-mcasp.c | 26 ++++++++++++++++++++++++--
- 2 files changed, 30 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index cc1c013..3560959 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -679,6 +679,9 @@
- 			reg = <0x48038000 0x2000>;
- 			interrupts = <80 81>;
- 			status = "disabled";
-+			asp-chan-q = <2>;	/* EVENTQ_2 */
-+			tx-dma-offset = <0x46000000>;
-+			rx-dma-offset = <0x46000000>;
- 		};
- 
- 		mcasp1: mcasp@4803C000 {
-@@ -689,6 +692,9 @@
- 			reg = <0x4803C000 0x2000>;
- 			interrupts = <82 83>;
- 			status = "disabled";
-+			asp-chan-q = <2>;	/* EVENTQ_2 */
-+			tx-dma-offset = <0x46400000>;
-+			rx-dma-offset = <0x46400000>;
- 		};
- 
- 	};
-diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
-index 83d96eb..621ce30 100644
---- a/sound/soc/davinci/davinci-mcasp.c
-+++ b/sound/soc/davinci/davinci-mcasp.c
-@@ -1048,6 +1048,22 @@ static struct snd_platform_data *davinci_mcasp_set_pdata_from_of(
- 		pdata->serial_dir = of_serial_dir;
- 	}
- 
-+	ret = of_property_read_u32(np, "asp-chan-q", &pdata->asp_chan_q);
-+	if (ret < 0)
-+		goto nodata;
-+
-+	ret = of_property_read_u32(np, "ram-chan-q", &val);
-+	if (ret >= 0)
-+		pdata->ram_chan_q = val;
-+
-+	ret = of_property_read_u32(np, "tx-dma-offset",	&pdata->tx_dma_offset);
-+	if (ret < 0)
-+		goto nodata;
-+
-+	ret = of_property_read_u32(np, "rx-dma-offset",	&pdata->rx_dma_offset);
-+	if (ret < 0)
-+		goto nodata;
-+
- 	ret = of_property_read_u32(np, "tx-num-evt", &val);
- 	if (ret >= 0)
- 		pdata->txnumevt = val;
-@@ -1147,7 +1163,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
- 	dma_data->ram_chan_q = pdata->ram_chan_q;
- 	dma_data->sram_pool = pdata->sram_pool;
- 	dma_data->sram_size = pdata->sram_size_playback;
--	dma_data->dma_addr = (dma_addr_t) (pdata->tx_dma_offset +
-+	if (dev->version == MCASP_VERSION_3)
-+		dma_data->dma_addr = (dma_addr_t) (pdata->tx_dma_offset);
-+	else
-+		dma_data->dma_addr = (dma_addr_t) (pdata->tx_dma_offset +
- 							mem->start);
- 
- 	/* first TX, then RX */
-@@ -1165,7 +1184,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
- 	dma_data->ram_chan_q = pdata->ram_chan_q;
- 	dma_data->sram_pool = pdata->sram_pool;
- 	dma_data->sram_size = pdata->sram_size_capture;
--	dma_data->dma_addr = (dma_addr_t)(pdata->rx_dma_offset +
-+	if (dev->version == MCASP_VERSION_3)
-+		dma_data->dma_addr = (dma_addr_t) (pdata->rx_dma_offset);
-+	else
-+		dma_data->dma_addr = (dma_addr_t)(pdata->rx_dma_offset +
- 							mem->start);
- 
- 	res = platform_get_resource(pdev, IORESOURCE_DMA, 1);
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0060-ASoC-Davinci-McASP-remove-unused-header-include.patch b/patches/not-capebus/0060-ASoC-Davinci-McASP-remove-unused-header-include.patch
deleted file mode 100644
index 644e9f961094ceb2e51a857e086d09258d898ed3..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0060-ASoC-Davinci-McASP-remove-unused-header-include.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 86bca9df300e5715ecd631c1372902a49a7b8a90 Mon Sep 17 00:00:00 2001
-From: "Hebbar, Gururaja" <gururaja.hebbar@ti.com>
-Date: Mon, 26 Sep 2011 18:16:19 +0530
-Subject: [PATCH 60/90] ASoC: Davinci: McASP: remove unused header include
-
-Defines or parameters from <mach/mux.h> isn't used anywhere. Hence
-remove the header include.
-
-Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
-
-Conflicts:
-	sound/soc/davinci/davinci-evm.c
----
- sound/soc/davinci/davinci-evm.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
-index a39dbee..d0fad7e 100644
---- a/sound/soc/davinci/davinci-evm.c
-+++ b/sound/soc/davinci/davinci-evm.c
-@@ -24,6 +24,9 @@
- #include <asm/dma.h>
- #include <asm/mach-types.h>
- 
-+#include <mach/asp.h>
-+#include <mach/edma.h>
-+
- #include "davinci-pcm.h"
- #include "davinci-i2s.h"
- #include "davinci-mcasp.h"
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0061-ASoC-AM33XX-Add-support-for-AM33xx-SoC-Audio.patch b/patches/not-capebus/0061-ASoC-AM33XX-Add-support-for-AM33xx-SoC-Audio.patch
deleted file mode 100644
index a4274047f7d559938b284658ae7209dbaca97ce5..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0061-ASoC-AM33XX-Add-support-for-AM33xx-SoC-Audio.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 4c0f414c6f618413bc1a6d14f0b45150554fda51 Mon Sep 17 00:00:00 2001
-From: "Hebbar, Gururaja" <gururaja.hebbar@ti.com>
-Date: Wed, 1 Aug 2012 12:04:22 +0530
-Subject: [PATCH 61/90] ASoC: AM33XX: Add support for AM33xx SoC Audio
-
-AM33xx uses same McASP IP as the Davinci Platform. This patch updates
-Kconfig and makefile to enable build or McASP, PCM & Codec drivers
-
-Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
----
- sound/soc/davinci/Kconfig  | 8 ++++++++
- sound/soc/davinci/Makefile | 3 +++
- 2 files changed, 11 insertions(+)
-
-diff --git a/sound/soc/davinci/Kconfig b/sound/soc/davinci/Kconfig
-index 9e11a14..cfeb3a0 100644
---- a/sound/soc/davinci/Kconfig
-+++ b/sound/soc/davinci/Kconfig
-@@ -6,6 +6,14 @@ config SND_DAVINCI_SOC
- 	  the DAVINCI AC97 or I2S interface. You will also need
- 	  to select the audio interfaces to support below.
- 
-+config SND_AM33XX_SOC
-+	tristate "SoC Audio for the AM33XX chip"
-+	depends on SOC_AM33XX
-+	select SND_SOC_TLV320AIC3X
-+	help
-+	  Say Y or M if you want to add support for SoC audio on AM33xx
-+	  boards using McASP and TLV320AIC3X codec.
-+
- config SND_DAVINCI_SOC_I2S
- 	tristate
- 
-diff --git a/sound/soc/davinci/Makefile b/sound/soc/davinci/Makefile
-index a93679d..3e07a53 100644
---- a/sound/soc/davinci/Makefile
-+++ b/sound/soc/davinci/Makefile
-@@ -5,8 +5,10 @@ snd-soc-davinci-mcasp-objs:= davinci-mcasp.o
- snd-soc-davinci-vcif-objs:= davinci-vcif.o
- 
- obj-$(CONFIG_SND_DAVINCI_SOC) += snd-soc-davinci.o
-+obj-$(CONFIG_SND_AM33XX_SOC) += snd-soc-davinci.o
- obj-$(CONFIG_SND_DAVINCI_SOC_I2S) += snd-soc-davinci-i2s.o
- obj-$(CONFIG_SND_DAVINCI_SOC_MCASP) += snd-soc-davinci-mcasp.o
-+obj-$(CONFIG_SND_AM33XX_SOC) += snd-soc-davinci-mcasp.o
- obj-$(CONFIG_SND_DAVINCI_SOC_VCIF) += snd-soc-davinci-vcif.o
- 
- # DAVINCI Machine Support
-@@ -14,6 +16,7 @@ snd-soc-evm-objs := davinci-evm.o
- snd-soc-sffsdr-objs := davinci-sffsdr.o
- 
- obj-$(CONFIG_SND_DAVINCI_SOC_EVM) += snd-soc-evm.o
-+obj-$(CONFIG_SND_AM33XX_SOC) += snd-soc-evm.o
- obj-$(CONFIG_SND_DM6467_SOC_EVM) += snd-soc-evm.o
- obj-$(CONFIG_SND_DA830_SOC_EVM) += snd-soc-evm.o
- obj-$(CONFIG_SND_DA850_SOC_EVM) += snd-soc-evm.o
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0062-am33xx-mcasp-Add-dma-channel-definitions.patch b/patches/not-capebus/0062-am33xx-mcasp-Add-dma-channel-definitions.patch
deleted file mode 100644
index 0b9f05ce1bef82e037571a642a5cb1c53dc9d130..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0062-am33xx-mcasp-Add-dma-channel-definitions.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From beea50274f7285753ac2af9416a5909a267d1d4a Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 15 Jan 2013 13:26:05 +0200
-Subject: [PATCH 62/90] am33xx: mcasp: Add dma channel definitions
-
-Add DMA channel definitions even though they are not used yet.
-The channels still come from hwmod but it's nice to have them
-in the DT too.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/boot/dts/am33xx.dtsi | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index 3560959..9745507 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -682,6 +682,9 @@
- 			asp-chan-q = <2>;	/* EVENTQ_2 */
- 			tx-dma-offset = <0x46000000>;
- 			rx-dma-offset = <0x46000000>;
-+			dmas = <&edma 8
-+				&edma 9>;
-+			dma-names = "tx", "rx";
- 		};
- 
- 		mcasp1: mcasp@4803C000 {
-@@ -695,6 +698,9 @@
- 			asp-chan-q = <2>;	/* EVENTQ_2 */
- 			tx-dma-offset = <0x46400000>;
- 			rx-dma-offset = <0x46400000>;
-+			dmas = <&edma 10
-+				&edma 11>;
-+			dma-names = "tx", "rx";
- 		};
- 
- 	};
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0063-ARM-OMAP2-AM33xx-removed-invalid-McASP-HWMOD-data.patch b/patches/not-capebus/0063-ARM-OMAP2-AM33xx-removed-invalid-McASP-HWMOD-data.patch
deleted file mode 100644
index 1e2c857b517baf23eb308a212eb8381c11f1aa96..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0063-ARM-OMAP2-AM33xx-removed-invalid-McASP-HWMOD-data.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From e6b734798a1bfba9d8a06f6e19652f4f1f11ee0f Mon Sep 17 00:00:00 2001
-From: "Hebbar, Gururaja" <gururaja.hebbar@ti.com>
-Date: Tue, 31 Jul 2012 19:10:20 +0530
-Subject: [PATCH 63/90] ARM: OMAP2+: AM33xx: removed invalid McASP HWMOD data
-
-McASP Data Address space is used for edma operation. Driver uses this
-address to setup edma dst/src. No Mapping is done on this address and
-hence it is not required to create a new hwmod entry
-
-Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
----
- arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 38 ------------------------------
- 1 file changed, 38 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
-index a180336..6e80edb 100644
---- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
-@@ -2951,24 +2951,6 @@ static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp0 = {
- 	.user		= OCP_USER_MPU,
- };
- 
--/* l3 s -> mcasp0 data */
--static struct omap_hwmod_addr_space am33xx_mcasp0_data_addr_space[] = {
--	{
--		.pa_start	= 0x46000000,
--		.pa_end		= 0x46000000 + SZ_4M - 1,
--		.flags		= ADDR_TYPE_RT
--	},
--	{ }
--};
--
--static struct omap_hwmod_ocp_if am33xx_l3_s__mcasp0_data = {
--	.master		= &am33xx_l3_s_hwmod,
--	.slave		= &am33xx_mcasp0_hwmod,
--	.clk		= "l3s_gclk",
--	.addr		= am33xx_mcasp0_data_addr_space,
--	.user		= OCP_USER_SDMA,
--};
--
- /* l4 ls -> mcasp1 */
- static struct omap_hwmod_addr_space am33xx_mcasp1_addr_space[] = {
- 	{
-@@ -2987,24 +2969,6 @@ static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp1 = {
- 	.user		= OCP_USER_MPU,
- };
- 
--/* l3 s -> mcasp1 data */
--static struct omap_hwmod_addr_space am33xx_mcasp1_data_addr_space[] = {
--	{
--		.pa_start	= 0x46400000,
--		.pa_end		= 0x46400000 + SZ_4M - 1,
--		.flags		= ADDR_TYPE_RT
--	},
--	{ }
--};
--
--static struct omap_hwmod_ocp_if am33xx_l3_s__mcasp1_data = {
--	.master		= &am33xx_l3_s_hwmod,
--	.slave		= &am33xx_mcasp1_hwmod,
--	.clk		= "l3s_gclk",
--	.addr		= am33xx_mcasp1_data_addr_space,
--	.user		= OCP_USER_SDMA,
--};
--
- /* l4 ls -> mmc0 */
- static struct omap_hwmod_addr_space am33xx_mmc0_addr_space[] = {
- 	{
-@@ -3525,9 +3489,7 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
- 	&am33xx_l4_per__i2c3,
- 	&am33xx_l4_per__mailbox,
- 	&am33xx_l4_ls__mcasp0,
--	&am33xx_l3_s__mcasp0_data,
- 	&am33xx_l4_ls__mcasp1,
--	&am33xx_l3_s__mcasp1_data,
- 	&am33xx_l4_ls__mmc0,
- 	&am33xx_l4_ls__mmc1,
- 	&am33xx_l3_s__mmc2,
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0064-davinci-evm-Header-include-move-fix.patch b/patches/not-capebus/0064-davinci-evm-Header-include-move-fix.patch
deleted file mode 100644
index fa1080b76c6676130a3be1b0e4d49ccd9cb07ce6..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0064-davinci-evm-Header-include-move-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From eb243156e1cd757e08766db56f8acebf00da6de4 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 15 Jan 2013 12:11:26 +0200
-Subject: [PATCH 64/90] davinci-evm: Header include move fix.
-
-Headers have been moved. Fix by including the correct header.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- sound/soc/davinci/davinci-evm.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
-index d0fad7e..7420434 100644
---- a/sound/soc/davinci/davinci-evm.c
-+++ b/sound/soc/davinci/davinci-evm.c
-@@ -24,8 +24,7 @@
- #include <asm/dma.h>
- #include <asm/mach-types.h>
- 
--#include <mach/asp.h>
--#include <mach/edma.h>
-+#include <linux/edma.h>
- 
- #include "davinci-pcm.h"
- #include "davinci-i2s.h"
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0065-bone-dvi-cape-Add-DT-definition-for-00A2-revision.patch b/patches/not-capebus/0065-bone-dvi-cape-Add-DT-definition-for-00A2-revision.patch
deleted file mode 100644
index c9067a2e1b47b1336b08539b527eecc5db36a587..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0065-bone-dvi-cape-Add-DT-definition-for-00A2-revision.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 54fbd050711b14139db9234eab09a26002ba0450 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 15 Jan 2013 12:25:42 +0200
-Subject: [PATCH 65/90] bone-dvi-cape: Add DT definition for 00A2 revision
-
-Add cape definition for the 00A2 revision of the DVI cape.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/Makefile | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/firmware/Makefile b/firmware/Makefile
-index 600640a..256f8d4 100644
---- a/firmware/Makefile
-+++ b/firmware/Makefile
-@@ -140,6 +140,7 @@ fw-shipped-$(CONFIG_YAM) += yam/1200.bin yam/9600.bin
- fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \
- 	capes/cape-bone-2g-emmc1.dtbo \
- 	capes/cape-bone-dvi-00A0.dtbo capes/cape-bone-dvi-00A1.dtbo \
-+		capes/cape-bone-dvi-00A2.dtbo \
- 	capes/cape-bone-lcd3-00A0.dtbo
- 
- # the geiger cape
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0066-bone-dvi-cape-Update-A1-cape-definition-with-sound.patch b/patches/not-capebus/0066-bone-dvi-cape-Update-A1-cape-definition-with-sound.patch
deleted file mode 100644
index e7616a3e023d85985edd542e08108742995b968a..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0066-bone-dvi-cape-Update-A1-cape-definition-with-sound.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From aa7d1df2694e0b9990d6d99125b6a864f9a9b54e Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 15 Jan 2013 12:27:05 +0200
-Subject: [PATCH 66/90] bone-dvi-cape: Update A1 cape definition with sound
-
-Add sound definitions for the reworked A1 cape definition.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/capes/cape-bone-dvi-00A1.dts | 74 +++++++++++++++++++++++++++++++++--
- 1 file changed, 70 insertions(+), 4 deletions(-)
-
-diff --git a/firmware/capes/cape-bone-dvi-00A1.dts b/firmware/capes/cape-bone-dvi-00A1.dts
-index bd275e0..12b8526 100644
---- a/firmware/capes/cape-bone-dvi-00A1.dts
-+++ b/firmware/capes/cape-bone-dvi-00A1.dts
-@@ -9,11 +9,11 @@
- /plugin/;
- 
- / {
--	compatible = "ti,beaglebone", "ti,beaglebone-black";
-+	compatible = "ti,beaglebone";
- 
- 	/* identification */
- 	part-number = "BB-BONE-DVID-01";
--	version = "00A1", "01";
-+	version = "00A1", "A1";
- 
- 	fragment@0 {
- 		target = <&am33xx_pinmux>;
-@@ -28,7 +28,7 @@
- 
- 			bone_dvi_cape_dvi_00A1_pins: pinmux_bone_dvi_cape_dvi_00A1_pins {
- 				pinctrl-single,pins = <
--					0x84 0x07	/* gpmc_csn2.gpio1_31, OUTPUT | MODE7 - DVIPDn */
-+					0x1c 0x07	/* gpmc_ad7.gpio1_7, OUTPUT | MODE7 - DVIPDn */
- 
- 					0xa0 0x08	/* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
- 					0xa4 0x08	/* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-@@ -52,6 +52,16 @@
- 					0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
- 				>;
- 			};
-+
-+			bone_dvi_cape_audio_pins: pinmux_bone_dvi_cape_audio_pins {
-+				pinctrl-single,pins = <
-+					0x190 0x20	/* mcasp0_aclkx.mcasp0_aclkx, INPUT | MODE0 */
-+					0x194 0x20	/* mcasp0_fsx.mcasp0_fsx, INPUT | MODE0 */
-+					0x19c 0x22	/* mcasp0_ahclkr.mcasp0_axr2, INPUT | MODE2 */
-+					0x1ac 0x22	/* mcasp0_ahclkx.mcasp0_axr3, INPUT | MODE2 */
-+
-+				>;
-+			};
- 		};
- 	};
- 
-@@ -129,6 +139,7 @@
- 						vback-porch     = <13>;
- 						clock-frequency = <64000000>;
- 					};
-+
- 				};
- 			};
- 
-@@ -138,9 +149,64 @@
- 				interrupt-parent = <&intc>;
- 				interrupts = <36>;
- 				ti,hwmods = "lcdc";
--				ti,power-gpio = <&gpio2 31 0x0>;
-+				ti,power-gpio = <&gpio2 7 0x0>;
-+			};
-+
-+		};
-+	};
-+
-+	fragment@2 {
-+		target = <&i2c2>;
-+		__overlay__ {
-+			#address-cells = <1>;
-+			#size-cells = <0>;
- 
-+			tlv320aic3x: tlv320aic3x@1b {
-+				compatible = "ti,tlv320aic3x";
-+				reg = <0x1b>;
-+				status = "okay";
- 			};
- 		};
- 	};
-+
-+	fragment@3 {
-+		target = <&mcasp0>;
-+		__overlay__ {
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&bone_dvi_cape_audio_pins>;
-+
-+			status = "okay";
-+
-+			op-mode = <0>;          /* MCASP_IIS_MODE */
-+			tdm-slots = <2>;
-+			num-serializer = <16>;
-+			serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
-+				0 0 2 1
-+				0 0 0 0
-+				0 0 0 0
-+				0 0 0 0
-+			>;
-+			tx-num-evt = <1>;
-+			rx-num-evt = <1>;
-+		};
-+	};
-+
-+	fragment@4 {
-+		target = <&ocp>;
-+		__overlay__ {
-+			sound {
-+				compatible = "ti,da830-evm-audio";
-+				ti,model = "DA830 EVM";
-+				ti,audio-codec = <&tlv320aic3x>;
-+				ti,mcasp-controller = <&mcasp0>;
-+				ti,codec-clock-rate = <12000000>;
-+				ti,audio-routing =
-+					"Headphone Jack",       "HPLOUT",
-+					"Headphone Jack",       "HPROUT",
-+					"LINE1L",               "Line In",
-+					"LINE1R",               "Line In";
-+			};
-+		};
-+
-+	};
- };
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0067-sndsoc-mcasp-Get-DMA-channels-via-byname.patch b/patches/not-capebus/0067-sndsoc-mcasp-Get-DMA-channels-via-byname.patch
deleted file mode 100644
index 433a08ff7ff6e6cab0f38e69adeafd8dc7d5b50f..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0067-sndsoc-mcasp-Get-DMA-channels-via-byname.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 692b8825ee3759b59e512018e8b46c238f800f8f Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Mon, 14 Jan 2013 19:57:10 +0200
-Subject: [PATCH 67/90] sndsoc: mcasp: Get DMA channels via byname
-
-Use get resource by name for DMA channels. Note that even for the
-case where we're booting with DT, they still come out of hwmod data.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- sound/soc/davinci/davinci-mcasp.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
-index 621ce30..ea292f6 100644
---- a/sound/soc/davinci/davinci-mcasp.c
-+++ b/sound/soc/davinci/davinci-mcasp.c
-@@ -1170,9 +1170,9 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
- 							mem->start);
- 
- 	/* first TX, then RX */
--	res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
-+	res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx");
- 	if (!res) {
--		dev_err(&pdev->dev, "no DMA resource\n");
-+		dev_err(&pdev->dev, "Failed to get tx dma resource\n");
- 		ret = -ENODEV;
- 		goto err_release_clk;
- 	}
-@@ -1190,9 +1190,9 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
- 		dma_data->dma_addr = (dma_addr_t)(pdata->rx_dma_offset +
- 							mem->start);
- 
--	res = platform_get_resource(pdev, IORESOURCE_DMA, 1);
-+	res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
- 	if (!res) {
--		dev_err(&pdev->dev, "no DMA resource\n");
-+		dev_err(&pdev->dev, "Failed to get rx dma resource\n");
- 		ret = -ENODEV;
- 		goto err_release_clk;
- 	}
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0068-sound-soc-Davinci-Remove-__devinit-__devexit.patch b/patches/not-capebus/0068-sound-soc-Davinci-Remove-__devinit-__devexit.patch
deleted file mode 100644
index 70f4d1697c7e92a3fd7a74091dc8f29bf532ae0a..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0068-sound-soc-Davinci-Remove-__devinit-__devexit.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 6515d7e2be8bba9894443311c76836df797e77fb Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 15 Jan 2013 14:13:53 +0200
-Subject: [PATCH 68/90] sound-soc: Davinci: Remove __devinit/__devexit
-
-__devinit/__devexit and the like has been purged. Remove them.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- sound/soc/davinci/davinci-evm.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
-index 7420434..349db80 100644
---- a/sound/soc/davinci/davinci-evm.c
-+++ b/sound/soc/davinci/davinci-evm.c
-@@ -393,7 +393,7 @@ static int davinci_evm_probe(struct platform_device *pdev)
- 	return ret;
- }
- 
--static int __devexit davinci_evm_remove(struct platform_device *pdev)
-+static int davinci_evm_remove(struct platform_device *pdev)
- {
- 	struct snd_soc_card *card = platform_get_drvdata(pdev);
- 
-@@ -404,7 +404,7 @@ static int __devexit davinci_evm_remove(struct platform_device *pdev)
- 
- static struct platform_driver davinci_evm_driver = {
- 	.probe		= davinci_evm_probe,
--	.remove		= __devexit_p(davinci_evm_remove),
-+	.remove		= davinci_evm_remove,
- 	.driver		= {
- 		.name	= "davinci_evm",
- 		.owner	= THIS_MODULE,
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0069-st7735fb-Remove-__devinit-__devexit.patch b/patches/not-capebus/0069-st7735fb-Remove-__devinit-__devexit.patch
deleted file mode 100644
index 3babbfffef7b40392109d63612dd859975091599..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0069-st7735fb-Remove-__devinit-__devexit.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 3c6e0c2109de887d1658351aaa80ad0b4a699b1a Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 15 Jan 2013 14:14:33 +0200
-Subject: [PATCH 69/98] st7735fb: Remove __devinit/__devexit
-
-__devinit/__devexit and the like has been purged. Remove them.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/video/st7735fb.c |   10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/video/st7735fb.c b/drivers/video/st7735fb.c
-index 319653b..6075f2e 100644
---- a/drivers/video/st7735fb.c
-+++ b/drivers/video/st7735fb.c
-@@ -128,7 +128,7 @@ static struct st7735_function st7735_cfg_script[] = {
- 	{ ST7735_END, ST7735_END},
- };
- 
--static struct fb_fix_screeninfo st7735fb_fix __devinitdata = {
-+static struct fb_fix_screeninfo st7735fb_fix = {
- 	.id =		"ST7735",
- 	.type =		FB_TYPE_PACKED_PIXELS,
- 	.visual =	FB_VISUAL_DIRECTCOLOR,
-@@ -139,7 +139,7 @@ static struct fb_fix_screeninfo st7735fb_fix __devinitdata = {
- 	.accel =	FB_ACCEL_NONE,
- };
- 
--static struct fb_var_screeninfo st7735fb_var __devinitdata = {
-+static struct fb_var_screeninfo st7735fb_var = {
- 	.xres =			WIDTH,
- 	.yres =			HEIGHT,
- 	.xres_virtual =		WIDTH,
-@@ -426,7 +426,7 @@ static const struct of_device_id st7735fb_dt_ids[] = {
- };
- MODULE_DEVICE_TABLE(of, st7735fb_dt_ids);
- 
--static int __devinit st7735fb_probe (struct spi_device *spi)
-+static int st7735fb_probe (struct spi_device *spi)
- {
- 	int vmem_size = WIDTH*HEIGHT*BPP/8;
- 	u8 *vmem;
-@@ -581,7 +581,7 @@ fballoc_fail:
- 	return retval;
- }
- 
--static int __devexit st7735fb_remove(struct spi_device *spi)
-+static int st7735fb_remove(struct spi_device *spi)
- {
- 	struct fb_info *info = spi_get_drvdata(spi);
- 
-@@ -608,7 +608,7 @@ static struct spi_driver st7735fb_driver = {
- 		.of_match_table = st7735fb_dt_ids,
- 	},
- 	.probe  = st7735fb_probe,
--	.remove = __devexit_p(st7735fb_remove),
-+	.remove = st7735fb_remove,
- };
- 
- static int __init st7735fb_init(void)
--- 
-1.7.10.4
-
diff --git a/patches/not-capebus/0070-capemgr-Remove-__devinit-__devexit.patch b/patches/not-capebus/0070-capemgr-Remove-__devinit-__devexit.patch
deleted file mode 100644
index e05f1f4774c1f2bc0750d5ba3c47f7eac3cecf9f..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0070-capemgr-Remove-__devinit-__devexit.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 6fb954e57b5d4bb6bf53b39e403a7e4922834216 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 15 Jan 2013 14:15:00 +0200
-Subject: [PATCH 70/90] capemgr: Remove __devinit/__devexit
-
-__devinit/__devexit and the like has been purged. Remove them.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/misc/cape/beaglebone/capemgr.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/misc/cape/beaglebone/capemgr.c b/drivers/misc/cape/beaglebone/capemgr.c
-index 651f48d..d828af7 100644
---- a/drivers/misc/cape/beaglebone/capemgr.c
-+++ b/drivers/misc/cape/beaglebone/capemgr.c
-@@ -1522,7 +1522,7 @@ static int bone_capemgr_loader(void *data)
- 	return bone_capemgr_load(slot);
- }
- 
--static int __devinit
-+static int
- bone_capemgr_probe(struct platform_device *pdev)
- {
- 	struct bone_capemgr_info *info;
-@@ -1748,7 +1748,7 @@ err_exit:
- 	return ret;
- }
- 
--static int __devexit bone_capemgr_remove(struct platform_device *pdev)
-+static int bone_capemgr_remove(struct platform_device *pdev)
- {
- 	struct bone_capemgr_info *info = platform_get_drvdata(pdev);
- 	struct bone_cape_slot *slot, *slotn;
-@@ -1818,7 +1818,7 @@ static struct dev_pm_ops bone_capemgr_pm_ops = {
- 
- static struct platform_driver bone_capemgr_driver = {
- 	.probe		= bone_capemgr_probe,
--	.remove		= __devexit_p(bone_capemgr_remove),
-+	.remove		= bone_capemgr_remove,
- 	.driver		= {
- 		.name	= "bone-capemgr",
- 		.owner	= THIS_MODULE,
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0071-capes-fw-target-firmware-directory-change.patch b/patches/not-capebus/0071-capes-fw-target-firmware-directory-change.patch
deleted file mode 100644
index 7b79c2655e4bbc65936ca6a8e08faa054debe129..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0071-capes-fw-target-firmware-directory-change.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 7a5cd425c7545901707dbff6aac6514bb688dcb1 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 15 Jan 2013 19:08:47 +0200
-Subject: [PATCH 71/90] capes-fw: target firmware directory change
-
-Change the target firmware directory to firmware, instead of firmware/capes.
-Two benefits; auto-firmware inclusion in the kernel image if enabled, and
-correct directory install when issuing firmware install.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/Makefile | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/firmware/Makefile b/firmware/Makefile
-index 256f8d4..83b7787 100644
---- a/firmware/Makefile
-+++ b/firmware/Makefile
-@@ -138,20 +138,20 @@ fw-shipped-$(CONFIG_YAM) += yam/1200.bin yam/9600.bin
- 
- # all the generic capes
- fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \
--	capes/cape-bone-2g-emmc1.dtbo \
--	capes/cape-bone-dvi-00A0.dtbo capes/cape-bone-dvi-00A1.dtbo \
--		capes/cape-bone-dvi-00A2.dtbo \
--	capes/cape-bone-lcd3-00A0.dtbo
-+	cape-bone-2g-emmc1.dtbo \
-+	cape-bone-dvi-00A0.dtbo cape-bone-dvi-00A1.dtbo \
-+		cape-bone-dvi-00A2.dtbo \
-+	cape-bone-lcd3-00A0.dtbo
- 
- # the geiger cape
- fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += \
--	capes/cape-bone-geiger-00A0.dtbo
-+	cape-bone-geiger-00A0.dtbo
- 
- # the weather cape
--fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += capes/cape-bone-weather-00A0.dtbo
-+fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += cape-bone-weather-00A0.dtbo
- 
- # the HDMI virtual cape on the beaglebone-black
--fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += capes/cape-boneblack-hdmi-00A0.dtbo
-+fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += cape-boneblack-hdmi-00A0.dtbo
- 
- fw-shipped-all := $(fw-shipped-y) $(fw-shipped-m) $(fw-shipped-)
- 
-@@ -254,7 +254,7 @@ $(obj)/%.fw: $(obj)/%.H16 $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %)
- 	$(call cmd,h16tofw)
- 
- # DTBO is device tree blob object
--$(obj)/%.dtbo: $(obj)/%.dts | $(objtree)/$(obj)/$$(dir %)
-+$(obj)/%.dtbo: $(obj)/capes/%.dts | $(objtree)/$(obj)/$$(dir %)
- 	$(call cmd,dtco)
- 
- $(firmware-dirs):
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0072-am33xx-edma-Always-update-unused-channel-list.patch b/patches/not-capebus/0072-am33xx-edma-Always-update-unused-channel-list.patch
deleted file mode 100644
index 608e9c0f5344b7b7d9749aec99337fc183e41d98..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0072-am33xx-edma-Always-update-unused-channel-list.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From be2597bd3482e28445a2ce58b216722202682b61 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 15 Jan 2013 20:03:18 +0200
-Subject: [PATCH 72/90] am33xx: edma: Always update unused channel list
-
-When using dynamically created devices the single initialization
-of the the unused channels list is wrong, so do it every time.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/common/edma.c | 27 ++++++++++++---------------
- 1 file changed, 12 insertions(+), 15 deletions(-)
-
-diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
-index beeb1d2..7654324 100644
---- a/arch/arm/common/edma.c
-+++ b/arch/arm/common/edma.c
-@@ -576,8 +576,6 @@ static int prepare_unused_channel_list(struct device *dev, void *data)
- 
- /*-----------------------------------------------------------------------*/
- 
--static bool unused_chan_list_done;
--
- /* Resource alloc/free:  dma channels, parameter RAM slots */
- 
- /**
-@@ -618,19 +616,18 @@ int edma_alloc_channel(int channel,
- 	unsigned i, done = 0, ctlr = 0;
- 	int ret = 0;
- 
--	if (!unused_chan_list_done) {
--		/*
--		 * Scan all the platform devices to find out the EDMA channels
--		 * used and clear them in the unused list, making the rest
--		 * available for ARM usage.
--		 */
--		ret = bus_for_each_dev(&platform_bus_type, NULL, NULL,
--				prepare_unused_channel_list);
--		if (ret < 0)
--			return ret;
--
--		unused_chan_list_done = true;
--	}
-+	/*
-+	 * Scan all the platform devices to find out the EDMA channels
-+	 * used and clear them in the unused list, making the rest
-+	 * available for ARM usage.
-+	 *
-+	 * Note: We do this every time now, since when devices are
-+	 * dynamically created the old unused list must be updated.
-+	 */
-+	ret = bus_for_each_dev(&platform_bus_type, NULL, NULL,
-+			prepare_unused_channel_list);
-+	if (ret < 0)
-+		return ret;
- 
- 	if (channel >= 0) {
- 		ctlr = EDMA_CTLR(channel);
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0073-defconfig-Update-bone-default-config.patch b/patches/not-capebus/0073-defconfig-Update-bone-default-config.patch
deleted file mode 100644
index 20ad6b3908545619358d9e5388ded73980b1879e..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0073-defconfig-Update-bone-default-config.patch
+++ /dev/null
@@ -1,173 +0,0 @@
-From 4f803bf1f63eade25e9d2bca159908cee4d1d6d3 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 15 Jan 2013 20:06:37 +0200
-Subject: [PATCH 73/90] defconfig: Update bone default config
-
----
- defconfig | 72 +++++++++++++++++++++++++++++++++------------------------------
- 1 file changed, 38 insertions(+), 34 deletions(-)
-
-diff --git a/defconfig b/defconfig
-index 0817f18..8902d3f 100644
---- a/defconfig
-+++ b/defconfig
-@@ -1,6 +1,6 @@
- #
- # Automatically generated file; DO NOT EDIT.
--# Linux/arm 3.8.0-rc2 Kernel Configuration
-+# Linux/arm 3.8.0-rc3 Kernel Configuration
- #
- CONFIG_ARM=y
- CONFIG_SYS_SUPPORTS_APM_EMULATION=y
-@@ -1115,7 +1115,7 @@ CONFIG_EXTRA_FIRMWARE=""
- # CONFIG_GENERIC_CPU_DEVICES is not set
- CONFIG_REGMAP=y
- CONFIG_REGMAP_I2C=y
--CONFIG_REGMAP_SPI=m
-+CONFIG_REGMAP_SPI=y
- CONFIG_REGMAP_MMIO=y
- CONFIG_DMA_SHARED_BUFFER=y
- # CONFIG_CMA is not set
-@@ -2166,7 +2166,7 @@ CONFIG_MFD_WL1273_CORE=m
- # CONFIG_MFD_AS3711 is not set
- CONFIG_REGULATOR=y
- # CONFIG_REGULATOR_DEBUG is not set
--# CONFIG_REGULATOR_DUMMY is not set
-+CONFIG_REGULATOR_DUMMY=y
- CONFIG_REGULATOR_FIXED_VOLTAGE=y
- # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
- # CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
-@@ -2787,20 +2787,18 @@ CONFIG_LOGO_LINUX_MONO=y
- CONFIG_LOGO_LINUX_VGA16=y
- CONFIG_LOGO_LINUX_CLUT224=y
- # CONFIG_FB_SSD1307 is not set
--CONFIG_SOUND=m
-+CONFIG_SOUND=y
- CONFIG_SOUND_OSS_CORE=y
- CONFIG_SOUND_OSS_CORE_PRECLAIM=y
--CONFIG_SND=m
--CONFIG_SND_TIMER=m
--CONFIG_SND_PCM=m
--CONFIG_SND_HWDEP=m
--CONFIG_SND_RAWMIDI=m
--CONFIG_SND_COMPRESS_OFFLOAD=m
-+CONFIG_SND=y
-+CONFIG_SND_TIMER=y
-+CONFIG_SND_PCM=y
-+CONFIG_SND_COMPRESS_OFFLOAD=y
- CONFIG_SND_JACK=y
- # CONFIG_SND_SEQUENCER is not set
- CONFIG_SND_OSSEMUL=y
--CONFIG_SND_MIXER_OSS=m
--CONFIG_SND_PCM_OSS=m
-+CONFIG_SND_MIXER_OSS=y
-+CONFIG_SND_PCM_OSS=y
- CONFIG_SND_PCM_OSS_PLUGINS=y
- # CONFIG_SND_HRTIMER is not set
- # CONFIG_SND_DYNAMIC_MINORS is not set
-@@ -2823,19 +2821,16 @@ CONFIG_SND_DRIVERS=y
- # CONFIG_SND_MTPAV is not set
- # CONFIG_SND_SERIAL_U16550 is not set
- # CONFIG_SND_MPU401 is not set
--CONFIG_SND_AC97_POWER_SAVE=y
--CONFIG_SND_AC97_POWER_SAVE_DEFAULT=0
-+# CONFIG_SND_AC97_POWER_SAVE is not set
- CONFIG_SND_ARM=y
- CONFIG_SND_SPI=y
--CONFIG_SND_USB=y
--CONFIG_SND_USB_AUDIO=m
--# CONFIG_SND_USB_UA101 is not set
--# CONFIG_SND_USB_CAIAQ is not set
--# CONFIG_SND_USB_6FIRE is not set
--CONFIG_SND_SOC=m
-+# CONFIG_SND_USB is not set
-+CONFIG_SND_SOC=y
-+CONFIG_SND_AM33XX_SOC=y
- # CONFIG_SND_DESIGNWARE_I2S is not set
--CONFIG_SND_SOC_I2C_AND_SPI=m
-+CONFIG_SND_SOC_I2C_AND_SPI=y
- # CONFIG_SND_SOC_ALL_CODECS is not set
-+CONFIG_SND_SOC_TLV320AIC3X=y
- # CONFIG_SND_SIMPLE_CARD is not set
- # CONFIG_SOUND_PRIME is not set
- CONFIG_AC97_BUS=m
-@@ -2951,7 +2946,12 @@ CONFIG_USB_MON=y
- # CONFIG_USB_U132_HCD is not set
- # CONFIG_USB_SL811_HCD is not set
- # CONFIG_USB_R8A66597_HCD is not set
--# CONFIG_USB_MUSB_HDRC is not set
-+CONFIG_USB_MUSB_HDRC=y
-+# CONFIG_USB_MUSB_TUSB6010 is not set
-+# CONFIG_USB_MUSB_OMAP2PLUS is not set
-+# CONFIG_USB_MUSB_AM35X is not set
-+CONFIG_USB_MUSB_DSPS=y
-+CONFIG_MUSB_PIO_ONLY=y
- # CONFIG_USB_CHIPIDEA is not set
- # CONFIG_USB_RENESAS_USBHS is not set
- 
-@@ -3019,18 +3019,18 @@ CONFIG_USB_SERIAL_IPW=m
- CONFIG_USB_SERIAL_IUU=m
- CONFIG_USB_SERIAL_KEYSPAN_PDA=m
- CONFIG_USB_SERIAL_KEYSPAN=m
--CONFIG_USB_SERIAL_KEYSPAN_MPR=y
--CONFIG_USB_SERIAL_KEYSPAN_USA28=y
--CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
--CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
--CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
--CONFIG_USB_SERIAL_KEYSPAN_USA19=y
--CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
--CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
--CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
--CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
--CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
--CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
-+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
-+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
-+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
- CONFIG_USB_SERIAL_KLSI=m
- CONFIG_USB_SERIAL_KOBIL_SCT=m
- CONFIG_USB_SERIAL_MCT_U232=m
-@@ -3080,6 +3080,7 @@ CONFIG_USB_CYTHERM=m
- CONFIG_USB_IDMOUSE=m
- CONFIG_USB_FTDI_ELAN=m
- CONFIG_USB_APPLEDISPLAY=m
-+# CONFIG_USB_SISUSBVGA is not set
- CONFIG_USB_LD=m
- CONFIG_USB_TRANCEVIBRATOR=m
- CONFIG_USB_IOWARRIOR=m
-@@ -3107,6 +3108,7 @@ CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
- # CONFIG_USB_FUSB300 is not set
- # CONFIG_USB_R8A66597 is not set
- # CONFIG_USB_MV_UDC is not set
-+CONFIG_USB_GADGET_MUSB_HDRC=y
- # CONFIG_USB_M66592 is not set
- # CONFIG_USB_NET2272 is not set
- # CONFIG_USB_DUMMY_HCD is not set
-@@ -3137,6 +3139,7 @@ CONFIG_USB_G_HID=m
- CONFIG_USB_OTG_UTILS=y
- CONFIG_USB_GPIO_VBUS=m
- # CONFIG_USB_ULPI is not set
-+CONFIG_TWL6030_USB=y
- CONFIG_NOP_USB_XCEIV=y
- CONFIG_MMC=y
- # CONFIG_MMC_DEBUG is not set
-@@ -3387,6 +3390,7 @@ CONFIG_TI_AM335X_ADC=y
- # Hid Sensor IIO Common
- #
- CONFIG_HID_SENSOR_IIO_COMMON=m
-+CONFIG_HID_SENSOR_IIO_TRIGGER=m
- # CONFIG_HID_SENSOR_ENUM_BASE_QUIRKS is not set
- 
- #
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0074-capes-add-dvi-a2-and-lcd3-a2-dts-files.patch b/patches/not-capebus/0074-capes-add-dvi-a2-and-lcd3-a2-dts-files.patch
deleted file mode 100644
index f37168e7db542f06b757163a9a68a6739bad6154..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0074-capes-add-dvi-a2-and-lcd3-a2-dts-files.patch
+++ /dev/null
@@ -1,564 +0,0 @@
-From 1e1185e9cdd79618fed4e8a906c16f17031d6fa6 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Tue, 15 Jan 2013 14:54:04 +0100
-Subject: [PATCH 74/98] capes: add dvi-a2 and lcd3-a2 dts files
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- arch/arm/boot/dts/am335x-bone-common.dtsi |   25 +---
- firmware/Makefile                         |    7 +-
- firmware/capes/cape-bone-dvi-00A0.dts     |    2 +-
- firmware/capes/cape-bone-dvi-00A1.dts     |    2 +-
- firmware/capes/cape-bone-dvi-00A2.dts     |  212 +++++++++++++++++++++++++++
- firmware/capes/cape-bone-lcd3-00A2.dts    |  226 +++++++++++++++++++++++++++++
- 6 files changed, 450 insertions(+), 24 deletions(-)
- create mode 100644 firmware/capes/cape-bone-dvi-00A2.dts
- create mode 100644 firmware/capes/cape-bone-lcd3-00A2.dts
-
-diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
-index 7cb7a9b..bf863bd 100644
---- a/arch/arm/boot/dts/am335x-bone-common.dtsi
-+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
-@@ -25,16 +25,7 @@
- 
- 	am33xx_pinmux: pinmux@44e10800 {
- 		pinctrl-names = "default";
--		pinctrl-0 = <&user_leds_s0 &spi1_pins_s0 &lcd_pins_s0 &gpevt_pins_s0>;
--
--		user_leds_s0: user_leds_s0 {
--			pinctrl-single,pins = <
--				0x54 0x7	/* gpmc_a5.gpio1_21, OUTPUT | MODE7 */
--				0x58 0x17	/* gpmc_a6.gpio1_22, OUTPUT_PULLUP | MODE7 */
--				0x5c 0x7	/* gpmc_a7.gpio1_23, OUTPUT | MODE7 */
--				0x60 0x17	/* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */
--			>;
--		};
-+		pinctrl-0 = <&userleds_pins>;
- 
- 		spi1_pins_s0: spi1_pins_s0 {
- 			pinctrl-single,pins = <
-@@ -44,15 +35,7 @@
- 				0x19c 0x13	/* mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */
- 			>;
- 		};
--
--		lcd_pins_s0: lcd_pins_s0 {
--			pinctrl-single,pins = <
--				0x1a4 0x17	/* mcasp0_fsr.gpio3_19, OUTPUT_PULLUP | MODE7 */
--				0x1ac 0x17	/* mcasp0_ahclkx.gpio3_21, OUTPUT_PULLUP | MODE7 */
--			>;
--		};
--
--		gpevt_pins_s0: gpevt_pins_s0 {
-+		gpevt_pins: pinmux_gpevt_pins {
- 			pinctrl-single,pins = <
- 				0x090 0x37	/* gpmc_advn_ale.gpio2_2, INPUT_PULLUP | MODE7 */
- 			>;
-@@ -242,6 +225,10 @@
- 					version = "00A0";
- 					dtbo = "cape-bone-lcd3-00A0.dtbo";
- 				};
-+				version@00A2 {
-+					version = "00A2";
-+					dtbo = "cape-bone-lcd3-00A2.dtbo";
-+				};
- 			};
- 
- 			/* Weather cape */
-diff --git a/firmware/Makefile b/firmware/Makefile
-index 83b7787..2f14ea4 100644
---- a/firmware/Makefile
-+++ b/firmware/Makefile
-@@ -139,9 +139,10 @@ fw-shipped-$(CONFIG_YAM) += yam/1200.bin yam/9600.bin
- # all the generic capes
- fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \
- 	cape-bone-2g-emmc1.dtbo \
--	cape-bone-dvi-00A0.dtbo cape-bone-dvi-00A1.dtbo \
--		cape-bone-dvi-00A2.dtbo \
--	cape-bone-lcd3-00A0.dtbo
-+	cape-bone-dvi-00A0.dtbo capes/cape-bone-dvi-00A1.dtbo \
-+	cape-bone-dvi-00A2.dtbo \
-+	cape-bone-lcd3-00A0.dtbo \
-+	cape-bone-lcd3-00A2.dtbo
- 
- # the geiger cape
- fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += \
-diff --git a/firmware/capes/cape-bone-dvi-00A0.dts b/firmware/capes/cape-bone-dvi-00A0.dts
-index 988e801..a21d84e 100644
---- a/firmware/capes/cape-bone-dvi-00A0.dts
-+++ b/firmware/capes/cape-bone-dvi-00A0.dts
-@@ -139,7 +139,7 @@
- 				interrupt-parent = <&intc>;
- 				interrupts = <36>;
- 				ti,hwmods = "lcdc";
--				ti,power-gpio = <&gpio2 7 0x0>;
-+				ti,power-gpio = <&gpio1 7 0x0>;
- 			};
- 
- 		};
-diff --git a/firmware/capes/cape-bone-dvi-00A1.dts b/firmware/capes/cape-bone-dvi-00A1.dts
-index 12b8526..bb49ae6 100644
---- a/firmware/capes/cape-bone-dvi-00A1.dts
-+++ b/firmware/capes/cape-bone-dvi-00A1.dts
-@@ -149,7 +149,7 @@
- 				interrupt-parent = <&intc>;
- 				interrupts = <36>;
- 				ti,hwmods = "lcdc";
--				ti,power-gpio = <&gpio2 7 0x0>;
-+				ti,power-gpio = <&gpio1 7 0x0>;
- 			};
- 
- 		};
-diff --git a/firmware/capes/cape-bone-dvi-00A2.dts b/firmware/capes/cape-bone-dvi-00A2.dts
-new file mode 100644
-index 0000000..84f84c4
---- /dev/null
-+++ b/firmware/capes/cape-bone-dvi-00A2.dts
-@@ -0,0 +1,212 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ */
-+/dts-v1/;
-+/plugin/;
-+
-+/ {
-+	compatible = "ti,beaglebone";
-+
-+	/* identification */
-+	part-number = "BB-BONE-DVID-01";
-+	version = "00A2", "A2";
-+
-+	fragment@0 {
-+		target = <&am33xx_pinmux>;
-+		__overlay__ {
-+
-+			bone_dvi_cape_led_pins: pinmux_bone_dvi_cape_led_pins {
-+				pinctrl-single,pins = <
-+					0x48 0x07	/* gpmc_a2.gpio1_18, OUTPUT | MODE7 */
-+					0x4c 0x07	/* gpmc_a3.gpio1_19, OUTPUT | MODE7 */
-+				>;
-+			};
-+
-+			bone_dvi_cape_dvi_00A2_pins: pinmux_bone_dvi_cape_dvi_00A2_pins {
-+				pinctrl-single,pins = <
-+					0x1c 0x07	/* gpmc_ad7.gpio1_7, OUTPUT | MODE7 - DVIPDn */
-+
-+					0xa0 0x08	/* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xa4 0x08	/* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xa8 0x08	/* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xac 0x08	/* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb0 0x08	/* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb4 0x08	/* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb8 0x08	/* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xbc 0x08	/* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc0 0x08	/* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc4 0x08	/* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc8 0x08	/* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xcc 0x08	/* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd0 0x08	/* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd4 0x08	/* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd8 0x08	/* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xdc 0x08	/* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xe0 0x00	/* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xe4 0x00	/* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xe8 0x00	/* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+				>;
-+			};
-+
-+			bone_dvi_cape_audio_pins: pinmux_bone_dvi_cape_audio_pins {
-+				pinctrl-single,pins = <
-+					0x190 0x20	/* mcasp0_aclkx.mcasp0_aclkx, INPUT | MODE0 */
-+					0x194 0x20	/* mcasp0_fsx.mcasp0_fsx, INPUT | MODE0 */
-+					0x19c 0x22	/* mcasp0_ahclkr.mcasp0_axr2, INPUT | MODE2 */
-+					0x1ac 0x22	/* mcasp0_ahclkx.mcasp0_axr3, INPUT | MODE2 */
-+
-+				>;
-+			};
-+		};
-+	};
-+
-+	fragment@1 {
-+		target = <&ocp>;
-+		__overlay__ {
-+
-+			/* avoid stupid warning */
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+
-+			gpio-leds-cape-dvi {
-+				compatible = "gpio-leds";
-+				pinctrl-names = "default";
-+				pinctrl-0 = <&bone_dvi_cape_led_pins>;
-+
-+				dvi-led0 {
-+					label = "dvi:green:usr0";
-+					gpios = <&gpio2 18 0>;
-+					linux,default-trigger = "heartbeat";
-+					default-state = "off";
-+				};
-+
-+				dvi-led1 {
-+					label = "dvi:green:usr1";
-+					gpios = <&gpio2 19 0>;
-+					linux,default-trigger = "mmc0";
-+					default-state = "off";
-+				};
-+			};
-+
-+			/* Settings for DVI 1024x768@60 */
-+			panel {
-+				compatible = "lcdc,panel";
-+				pinctrl-names = "default";
-+				pinctrl-0 = <&bone_dvi_cape_dvi_00A2_pins>;
-+				panel-info {
-+					ac-bias           = <255>;
-+					ac-bias-intrpt    = <0>;
-+					dma-burst-sz      = <16>;
-+					bpp               = <16>;
-+					fdd               = <0x80>;
-+					tft-alt-mode      = <0>;
-+					stn-565-mode      = <0>;
-+					mono-8bit-mode    = <0>;
-+					invert-line-clock = <1>;
-+					invert-frm-clock  = <1>;
-+					sync-edge         = <0>;
-+					sync-ctrl         = <1>;
-+					raster-order      = <0>;
-+					fifo-th           = <0>;
-+				};
-+				display-timings {
-+					native-mode = <&timing1>;
-+					timing0: 1024x768 {
-+						hactive         = <1024>;
-+						vactive         = <768>;
-+						hback-porch     = <80>;
-+						hfront-porch    = <48>;
-+						vback-porch     = <15>;
-+						vfront-porch    = <3>;
-+						hsync-len       = <32>;
-+						vsync-len       = <4>;
-+						clock-frequency = <56000000>;
-+					};
-+					/* 1280 x 720 @ 60 Hz  Reduced blanking VESA CVT 0.92M9-R */
-+					timing1: 1280x720-60 {
-+						hactive         = <1280>;
-+						hfront-porch    = <48>;
-+						hsync-len       = <32>;
-+						hback-porch     = <80>;
-+						vactive         = <720>;
-+						vfront-porch    = <3>;
-+						vsync-len       = <5>;
-+						vback-porch     = <13>;
-+						clock-frequency = <64000000>;
-+					};
-+
-+				};
-+			};
-+
-+			fb {
-+				compatible = "ti,am33xx-lcdc";
-+				reg = <0x4830e000 0x1000>;
-+				interrupt-parent = <&intc>;
-+				interrupts = <36>;
-+				ti,hwmods = "lcdc";
-+				ti,power-gpio = <&gpio1 31 0x0>;
-+			};
-+
-+		};
-+	};
-+
-+	fragment@2 {
-+		target = <&i2c2>;
-+		__overlay__ {
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+
-+			tlv320aic3x: tlv320aic3x@1b {
-+				compatible = "ti,tlv320aic3x";
-+				reg = <0x1b>;
-+				status = "okay";
-+			};
-+		};
-+	};
-+
-+	fragment@3 {
-+		target = <&mcasp0>;
-+		__overlay__ {
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&bone_dvi_cape_audio_pins>;
-+
-+			status = "okay";
-+
-+			op-mode = <0>;          /* MCASP_IIS_MODE */
-+			tdm-slots = <2>;
-+			num-serializer = <16>;
-+			serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
-+				0 0 2 1
-+				0 0 0 0
-+				0 0 0 0
-+				0 0 0 0
-+			>;
-+			tx-num-evt = <1>;
-+			rx-num-evt = <1>;
-+		};
-+	};
-+
-+	fragment@4 {
-+		target = <&ocp>;
-+		__overlay__ {
-+			sound {
-+				compatible = "ti,da830-evm-audio";
-+				ti,model = "DA830 EVM";
-+				ti,audio-codec = <&tlv320aic3x>;
-+				ti,mcasp-controller = <&mcasp0>;
-+				ti,codec-clock-rate = <12000000>;
-+				ti,audio-routing =
-+					"Headphone Jack",       "HPLOUT",
-+					"Headphone Jack",       "HPROUT",
-+					"LINE1L",               "Line In",
-+					"LINE1R",               "Line In";
-+			};
-+		};
-+
-+	};
-+};
-diff --git a/firmware/capes/cape-bone-lcd3-00A2.dts b/firmware/capes/cape-bone-lcd3-00A2.dts
-new file mode 100644
-index 0000000..635be23
---- /dev/null
-+++ b/firmware/capes/cape-bone-lcd3-00A2.dts
-@@ -0,0 +1,226 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ */
-+/dts-v1/;
-+/plugin/;
-+
-+/ {
-+	compatible = "ti,beaglebone", "ti,beaglebone-black";
-+
-+	/* identification */
-+	part-number = "BB-BONE-LCD3-01";
-+	version = "00A2";
-+
-+	fragment@0 {
-+		target = <&am33xx_pinmux>;
-+		__overlay__ {
-+
-+			bone_lcd3_cape_led_00A2_pins: pinmux_bone_lcd3_cape_led_00A2_pins {
-+				pinctrl-single,pins = <
-+					0x1a4 0x07	/* mcasp0_fsr.gpio3_19, OUTPUT | MODE7 */
-+				>;
-+			};
-+
-+			pwm_bl_pins: pinmux_pwm_bl_pins {
-+				pinctrl-single,pins = <
-+					0x48 0x06       /* gpmc_a2.ehrpwm1a, OMAP_MUX_MODE6 | AM33XX_PIN_OUTPUT */
-+				>;
-+			};
-+
-+			bone_lcd3_cape_lcd_pins: pinmux_bone_lcd3_cape_lcd_pins {
-+				pinctrl-single,pins = <
-+					0xa0 0x08	/* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xa4 0x08	/* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xa8 0x08	/* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xac 0x08	/* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb0 0x08	/* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb4 0x08	/* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb8 0x08	/* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xbc 0x08	/* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc0 0x08	/* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc4 0x08	/* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc8 0x08	/* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xcc 0x08	/* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd0 0x08	/* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd4 0x08	/* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd8 0x08	/* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xdc 0x08	/* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xe0 0x00	/* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xe4 0x00	/* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xe8 0x00	/* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+				>;
-+			};
-+
-+			bone_lcd3_cape_keys_00A2_pins: pinmux_bone_lcd3_cape_keys_00A2_pins {
-+				pinctrl-single,pins = <
-+					0x040 0x2f	/* gpmc_a0.gpio1_16, INPUT | PULLDIS | MODE7 */
-+					0x044 0x2f	/* gpmc_a1.gpio1_17, INPUT | PULLDIS | MODE7 */
-+					0x04c 0x2f 	/* gpmc_a3.gpio1_19, INPUT | PULLDIS | MODE7 */
-+					0x154 0x2f	/* P9_21 spi0_d0.gpio0_3 INPUT | PULLDIS | MODE7 */
-+				>;
-+			};
-+
-+		};
-+	};
-+
-+	fragment@1 {
-+		target = <&ocp>;
-+
-+		__overlay__ {
-+
-+			/* avoid stupid warning */
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+
-+			ehrpwm1 {
-+				status = "okay";
-+			};
-+
-+			backlight {
-+				compatible      = "pwm-backlight";
-+				pinctrl-names   = "default";
-+				pinctrl-0       = <&pwm_bl_pins>;
-+
-+				pwms = <&ehrpwm1 0 500000 0>;
-+				pwm-names = "LCD3";
-+				brightness-levels = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100>;
-+				default-brightness-level = <50>; /* index to the array above */
-+			};
-+
-+			tscadc {
-+				compatible = "ti,ti-tscadc";
-+				reg = <0x44e0d000 0x1000>;
-+
-+				interrupt-parent = <&intc>;
-+				interrupts = <16>;
-+				ti,hwmods = "adc_tsc";
-+
-+				tsc {
-+					wires = <4>;
-+					x-plate-resistance = <200>;
-+					steps-to-configure = <5>;
-+					wire-config = <0x00 0x11 0x22 0x33>;
-+				};
-+
-+				adc {
-+					adc-channels = <4>;
-+				};
-+			};
-+
-+			gpio-leds-cape-lcd3 {
-+				compatible = "gpio-leds";
-+				pinctrl-names = "default";
-+
-+				pinctrl-0 = <&bone_lcd3_cape_led_00A2_pins>;
-+
-+				lcd3-led0 {
-+					label = "lcd3:green:usr0";
-+					gpios = <&gpio4 19 0>;
-+					linux,default-trigger = "heartbeat";
-+					default-state = "off";
-+				};
-+
-+			};
-+
-+			gpio_keys {
-+				compatible = "gpio-keys";
-+				pinctrl-names = "default";
-+				pinctrl-0 = <&bone_lcd3_cape_keys_00A2_pins>;
-+
-+				#address-cells = <1>;
-+				#size-cells = <0>;
-+
-+				button@1 {
-+					debounce_interval = <50>;
-+					linux,code = <105>;
-+					label = "left";
-+					gpios = <&gpio2 16 0x0>;
-+					gpio-key,wakeup;
-+					autorepeat;
-+				};
-+				button@2 {
-+					debounce_interval = <50>;
-+					linux,code = <106>;
-+					label = "right";
-+					gpios = <&gpio2 17 0x0>;
-+					gpio-key,wakeup;
-+					autorepeat;
-+				};
-+				button@3 {
-+					debounce_interval = <50>;
-+					linux,code = <103>;
-+					label = "up";
-+					gpios = <&gpio2 19 0x0>;
-+					gpio-key,wakeup;
-+					autorepeat;
-+				};
-+				button@4 {
-+					debounce_interval = <50>;
-+					linux,code = <108>;
-+					label = "down";
-+					gpios = <&gpio4 16 0x0>;
-+					gpio-key,wakeup;
-+					autorepeat;
-+				};
-+				button@5 {
-+					debounce_interval = <50>;
-+					linux,code = <28>;
-+					label = "enter";
-+					gpios = <&gpio1 3 0x0>;
-+					gpio-key,wakeup;
-+				};
-+			};
-+
-+			/* Settings for CDTech_S035Q01 / LCD3 cape: */
-+			panel {
-+				compatible = "lcdc,panel";
-+				pinctrl-names = "default";
-+				pinctrl-0 = <&bone_lcd3_cape_lcd_pins>;
-+				panel-info {
-+					ac-bias           = <255>;
-+					ac-bias-intrpt    = <0>;
-+					dma-burst-sz      = <16>;
-+					bpp               = <16>;
-+					fdd               = <0x80>;
-+					tft-alt-mode      = <0>;
-+					stn-565-mode      = <0>;
-+					mono-8bit-mode    = <0>;
-+					invert-line-clock = <1>;
-+					invert-frm-clock  = <1>;
-+					sync-edge         = <0>;
-+					sync-ctrl         = <1>;
-+					raster-order      = <0>;
-+					fifo-th           = <0>;
-+				};
-+				display-timings {
-+					native-mode = <&timing0>;
-+					timing0: 320x240 {
-+						hactive         = <320>;
-+						vactive         = <240>;
-+						hback-porch     = <21>;
-+						hfront-porch    = <58>;
-+						hsync-len       = <47>;
-+						vback-porch     = <11>;
-+						vfront-porch    = <23>;
-+						vsync-len       = <2>;
-+						clock-frequency = <8000000>;
-+					};
-+				};
-+			};
-+
-+			fb {
-+				compatible = "ti,am33xx-lcdc";
-+				reg = <0x4830e000 0x1000>;
-+				interrupt-parent = <&intc>;
-+				interrupts = <36>;
-+				ti,hwmods = "lcdc";
-+			};
-+
-+		};
-+	};
-+};
--- 
-1.7.10.4
-
diff --git a/patches/not-capebus/0075-capemgr-catch-up-with-lcdc-tilcdc-rename.patch b/patches/not-capebus/0075-capemgr-catch-up-with-lcdc-tilcdc-rename.patch
deleted file mode 100644
index ae5d9df6ad3ba5d3ad87ec4f32994b4f3a9b1f5d..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0075-capemgr-catch-up-with-lcdc-tilcdc-rename.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-From efcf7ab19fb21565c654ea8e3085551b3a4ab688 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Wed, 16 Jan 2013 15:00:17 +0100
-Subject: [PATCH 75/90] capemgr: catch up with lcdc->tilcdc rename
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- firmware/capes/cape-bone-dvi-00A0.dts       | 4 ++--
- firmware/capes/cape-bone-dvi-00A1.dts       | 4 ++--
- firmware/capes/cape-bone-dvi-00A2.dts       | 4 ++--
- firmware/capes/cape-bone-lcd3-00A0.dts      | 4 ++--
- firmware/capes/cape-bone-lcd3-00A2.dts      | 4 ++--
- firmware/capes/cape-boneblack-hdmi-00A0.dts | 4 ++--
- 6 files changed, 12 insertions(+), 12 deletions(-)
-
-diff --git a/firmware/capes/cape-bone-dvi-00A0.dts b/firmware/capes/cape-bone-dvi-00A0.dts
-index a21d84e..bc3d926 100644
---- a/firmware/capes/cape-bone-dvi-00A0.dts
-+++ b/firmware/capes/cape-bone-dvi-00A0.dts
-@@ -85,7 +85,7 @@
- 
- 			/* Settings for DVI 1024x768@60 */
- 			panel {
--				compatible = "lcdc,panel";
-+				compatible = "tilcdc,panel";
- 				pinctrl-names = "default";
- 				pinctrl-0 = <&bone_dvi_cape_dvi_00A0_pins>;
- 				panel-info {
-@@ -134,7 +134,7 @@
- 			};
- 
- 			fb {
--				compatible = "ti,am33xx-lcdc";
-+				compatible = "ti,am33xx-tilcdc";
- 				reg = <0x4830e000 0x1000>;
- 				interrupt-parent = <&intc>;
- 				interrupts = <36>;
-diff --git a/firmware/capes/cape-bone-dvi-00A1.dts b/firmware/capes/cape-bone-dvi-00A1.dts
-index bb49ae6..d36415f 100644
---- a/firmware/capes/cape-bone-dvi-00A1.dts
-+++ b/firmware/capes/cape-bone-dvi-00A1.dts
-@@ -95,7 +95,7 @@
- 
- 			/* Settings for DVI 1024x768@60 */
- 			panel {
--				compatible = "lcdc,panel";
-+				compatible = "tilcdc,panel";
- 				pinctrl-names = "default";
- 				pinctrl-0 = <&bone_dvi_cape_dvi_00A1_pins>;
- 				panel-info {
-@@ -144,7 +144,7 @@
- 			};
- 
- 			fb {
--				compatible = "ti,am33xx-lcdc";
-+				compatible = "ti,am33xx-tilcdc";
- 				reg = <0x4830e000 0x1000>;
- 				interrupt-parent = <&intc>;
- 				interrupts = <36>;
-diff --git a/firmware/capes/cape-bone-dvi-00A2.dts b/firmware/capes/cape-bone-dvi-00A2.dts
-index 84f84c4..54fba3f 100644
---- a/firmware/capes/cape-bone-dvi-00A2.dts
-+++ b/firmware/capes/cape-bone-dvi-00A2.dts
-@@ -95,7 +95,7 @@
- 
- 			/* Settings for DVI 1024x768@60 */
- 			panel {
--				compatible = "lcdc,panel";
-+				compatible = "tilcdc,panel";
- 				pinctrl-names = "default";
- 				pinctrl-0 = <&bone_dvi_cape_dvi_00A2_pins>;
- 				panel-info {
-@@ -144,7 +144,7 @@
- 			};
- 
- 			fb {
--				compatible = "ti,am33xx-lcdc";
-+				compatible = "ti,am33xx-tilcdc";
- 				reg = <0x4830e000 0x1000>;
- 				interrupt-parent = <&intc>;
- 				interrupts = <36>;
-diff --git a/firmware/capes/cape-bone-lcd3-00A0.dts b/firmware/capes/cape-bone-lcd3-00A0.dts
-index 2d806c8..fed53a1 100644
---- a/firmware/capes/cape-bone-lcd3-00A0.dts
-+++ b/firmware/capes/cape-bone-lcd3-00A0.dts
-@@ -178,7 +178,7 @@
- 
- 			/* Settings for CDTech_S035Q01 / LCD3 cape: */
- 			panel {
--				compatible = "lcdc,panel";
-+				compatible = "tilcdc,panel";
- 				pinctrl-names = "default";
- 				pinctrl-0 = <&bone_lcd3_cape_lcd_pins>;
- 				panel-info {
-@@ -214,7 +214,7 @@
- 			};
- 
- 			fb {
--				compatible = "ti,am33xx-lcdc";
-+				compatible = "ti,am33xx-tilcdc";
- 				reg = <0x4830e000 0x1000>;
- 				interrupt-parent = <&intc>;
- 				interrupts = <36>;
-diff --git a/firmware/capes/cape-bone-lcd3-00A2.dts b/firmware/capes/cape-bone-lcd3-00A2.dts
-index 2ea1cf4..18dbe045 100644
---- a/firmware/capes/cape-bone-lcd3-00A2.dts
-+++ b/firmware/capes/cape-bone-lcd3-00A2.dts
-@@ -178,7 +178,7 @@
- 
- 			/* Settings for CDTech_S035Q01 / LCD3 cape: */
- 			panel {
--				compatible = "lcdc,panel";
-+				compatible = "tilcdc,panel";
- 				pinctrl-names = "default";
- 				pinctrl-0 = <&bone_lcd3_cape_lcd_pins>;
- 				panel-info {
-@@ -214,7 +214,7 @@
- 			};
- 
- 			fb {
--				compatible = "ti,am33xx-lcdc";
-+				compatible = "ti,am33xx-tilcdc";
- 				reg = <0x4830e000 0x1000>;
- 				interrupt-parent = <&intc>;
- 				interrupts = <36>;
-diff --git a/firmware/capes/cape-boneblack-hdmi-00A0.dts b/firmware/capes/cape-boneblack-hdmi-00A0.dts
-index 4fe58d5..911cbb5 100644
---- a/firmware/capes/cape-boneblack-hdmi-00A0.dts
-+++ b/firmware/capes/cape-boneblack-hdmi-00A0.dts
-@@ -69,14 +69,14 @@
- 			#size-cells = <1>;
- 
- 			hdmi {
--				compatible = "lcdc,slave";
-+				compatible = "tilcdc,slave";
- 				i2c = <&i2c0>;
- 				pinctrl-names = "default";
- 				pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
- 			};
- 
- 			fb {
--				compatible = "ti,am33xx-lcdc";
-+				compatible = "ti,am33xx-tilcdc";
- 				reg = <0x4830e000 0x1000>;
- 				interrupt-parent = <&intc>;
- 				interrupts = <36>;
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0076-firmware-fix-dvi-a1-target.patch b/patches/not-capebus/0076-firmware-fix-dvi-a1-target.patch
deleted file mode 100644
index 2cbb3f3c5d4ff6ad2469ed469703567f4c917b77..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0076-firmware-fix-dvi-a1-target.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 0d120ce3d93897933755f0517e392e5a294b0812 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Thu, 17 Jan 2013 10:26:39 +0100
-Subject: [PATCH 76/90] firmware: fix dvi a1 target
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- firmware/Makefile | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/firmware/Makefile b/firmware/Makefile
-index 2f14ea4..0bcacba 100644
---- a/firmware/Makefile
-+++ b/firmware/Makefile
-@@ -139,7 +139,8 @@ fw-shipped-$(CONFIG_YAM) += yam/1200.bin yam/9600.bin
- # all the generic capes
- fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \
- 	cape-bone-2g-emmc1.dtbo \
--	cape-bone-dvi-00A0.dtbo capes/cape-bone-dvi-00A1.dtbo \
-+	cape-bone-dvi-00A0.dtbo \
-+	cape-bone-dvi-00A1.dtbo \
- 	cape-bone-dvi-00A2.dtbo \
- 	cape-bone-lcd3-00A0.dtbo \
- 	cape-bone-lcd3-00A2.dtbo
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0077-capes-remove-tda-from-hdmi-cape-lcdc-handles-it-by-t.patch b/patches/not-capebus/0077-capes-remove-tda-from-hdmi-cape-lcdc-handles-it-by-t.patch
deleted file mode 100644
index 6f3b302a27ea2ade51eac6c52245040b6c8213c2..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0077-capes-remove-tda-from-hdmi-cape-lcdc-handles-it-by-t.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 91870ee3b9415ce1e30a0aac285ebc9b707aa5e5 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Thu, 17 Jan 2013 23:23:17 +0100
-Subject: [PATCH 77/90] capes: remove tda from hdmi cape, lcdc handles it by
- the looks of it
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- firmware/capes/cape-boneblack-hdmi-00A0.dts | 16 ----------------
- 1 file changed, 16 deletions(-)
-
-diff --git a/firmware/capes/cape-boneblack-hdmi-00A0.dts b/firmware/capes/cape-boneblack-hdmi-00A0.dts
-index 911cbb5..b080907 100644
---- a/firmware/capes/cape-boneblack-hdmi-00A0.dts
-+++ b/firmware/capes/cape-boneblack-hdmi-00A0.dts
-@@ -44,22 +44,6 @@
- 		};
- 	};
- 
--	fragment@1 {
--		target = <&i2c0>;
--
--		__overlay__ {
--			/* needed to avoid gripping by DTC */
--			#address-cells = <1>;
--			#size-cells = <0>;
--
--			/* NXP TDA998x */
--			tsl2550@34 {
--				compatible = "tda998x";
--				reg = <0x34>;
--			};
--               };
--	};
--
- 	fragment@2 {
- 		target = <&ocp>;
- 		__overlay__ {
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0078-tilcdc-magic-debug-statement-makes-power-gpio-work-o.patch b/patches/not-capebus/0078-tilcdc-magic-debug-statement-makes-power-gpio-work-o.patch
deleted file mode 100644
index e60405ca6047a6f97e89c74a89efc8a5de844dae..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0078-tilcdc-magic-debug-statement-makes-power-gpio-work-o.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 937853c6ed507e9072cdd9c052f7de8fed8f5773 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Fri, 18 Jan 2013 11:49:48 +0100
-Subject: [PATCH 78/90] tilcdc: magic debug statement makes power gpio work on
- LCD7
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
-index 91e8ed2..3ffa2e5 100644
---- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
-@@ -209,10 +209,13 @@ static int tilcdc_load(struct drm_device *dev, unsigned long flags)
- 		dev_info(&pdev->dev, "No power control GPIO\n");
- 	} else {
- 		gpioflags = GPIOF_DIR_OUT;
--		if (ofgpioflags & OF_GPIO_ACTIVE_LOW)
-+		if (ofgpioflags & OF_GPIO_ACTIVE_LOW) {
- 			gpioflags |= GPIOF_INIT_LOW;
--		else
-+			dev_info(&pdev->dev, "Power GPIO active low, initial state set to low\n");
-+		} else {
- 			gpioflags |= GPIOF_INIT_HIGH;
-+			dev_info(&pdev->dev, "Power GPIO active high, initial state set to high\n");
-+		}
- 		ret = devm_gpio_request_one(&pdev->dev, gpio,
- 		gpioflags, "lcdc_drv:PDN");
- 		if (ret != 0) {
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0079-capemgr-add-dts-overlay-for-LCD7-00A2-cape.patch b/patches/not-capebus/0079-capemgr-add-dts-overlay-for-LCD7-00A2-cape.patch
deleted file mode 100644
index 469ef2738fa4b823ee698fcda33e9302e317efa5..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0079-capemgr-add-dts-overlay-for-LCD7-00A2-cape.patch
+++ /dev/null
@@ -1,260 +0,0 @@
-From 325a2c94410f1c59d5e0046433599f9c6f4b51b9 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Fri, 18 Jan 2013 11:51:10 +0100
-Subject: [PATCH 79/98] capemgr: add dts overlay for LCD7 00A2 cape
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- firmware/Makefile                       |    3 +-
- firmware/capes/BB-BONE-LCD7-01-00A2.dts |  225 +++++++++++++++++++++++++++++++
- 2 files changed, 227 insertions(+), 1 deletion(-)
- create mode 100644 firmware/capes/BB-BONE-LCD7-01-00A2.dts
-
-diff --git a/firmware/Makefile b/firmware/Makefile
-index 0bcacba..f8c4a9e 100644
---- a/firmware/Makefile
-+++ b/firmware/Makefile
-@@ -143,7 +143,8 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \
- 	cape-bone-dvi-00A1.dtbo \
- 	cape-bone-dvi-00A2.dtbo \
- 	cape-bone-lcd3-00A0.dtbo \
--	cape-bone-lcd3-00A2.dtbo
-+	cape-bone-lcd3-00A2.dtbo \
-+	BB-BONE-LCD7-01-00A2.dtbo \
- 
- # the geiger cape
- fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += \
-diff --git a/firmware/capes/BB-BONE-LCD7-01-00A2.dts b/firmware/capes/BB-BONE-LCD7-01-00A2.dts
-new file mode 100644
-index 0000000..872e592
---- /dev/null
-+++ b/firmware/capes/BB-BONE-LCD7-01-00A2.dts
-@@ -0,0 +1,225 @@
-+/*
-+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ */
-+/dts-v1/;
-+/plugin/;
-+
-+/ {
-+	compatible = "ti,beaglebone", "ti,beaglebone-black";
-+
-+	/* identification */
-+	part-number = "BB-BONE-LCD7-01";
-+	version = "00A2";
-+
-+	fragment@0 {
-+		target = <&am33xx_pinmux>;
-+		__overlay__ {
-+
-+			bone_lcd7_cape_led_00A2_pins: pinmux_bone_lcd7_cape_led_00A2_pins {
-+				pinctrl-single,pins = <
-+					0x078 0x2f	/* gpmc_ben1.gpio1_28, INPUT | PULLDIS | MODE7 */
-+				>;
-+			};
-+
-+			pwm_bl_pins: pinmux_pwm_bl_pins {
-+				pinctrl-single,pins = <
-+					0x48 0x06       /* gpmc_a2.ehrpwm1a, OMAP_MUX_MODE6 | AM33XX_PIN_OUTPUT */
-+				>;
-+			};
-+
-+			bone_lcd7_cape_lcd_pins: pinmux_bone_lcd7_cape_lcd_pins {
-+				pinctrl-single,pins = <
-+					//0x84 0x07	/* gpmc_csn2.gpio1_31, OUTPUT | MODE7 - AVDD_EN */
-+					0xa0 0x08	/* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xa4 0x08	/* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xa8 0x08	/* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xac 0x08	/* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb0 0x08	/* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb4 0x08	/* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xb8 0x08	/* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xbc 0x08	/* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc0 0x08	/* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc4 0x08	/* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xc8 0x08	/* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xcc 0x08	/* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd0 0x08	/* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd4 0x08	/* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xd8 0x08	/* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xdc 0x08	/* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-+					0xe0 0x00	/* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xe4 0x00	/* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xe8 0x00	/* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+					0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-+				>;
-+			};
-+
-+			bone_lcd7_cape_keys_00A2_pins: pinmux_bone_lcd7_cape_keys_00A2_pins {
-+				pinctrl-single,pins = <
-+					0x040 0x2f	/* KEY_LEFT gpmc_a0.gpio1_16, INPUT | PULLDIS | MODE7 */
-+					0x044 0x2f	/* KEY_RIGHT gpmc_a1.gpio1_17, INPUT | PULLDIS | MODE7 */
-+					0x04c 0x2f 	/* KEY_UP gpmc_a3.gpio1_19, INPUT | PULLDIS | MODE7 */
-+					0x1a4 0x2f	/* KEY_ENTER mcasp0_fsr.gpio3_19, INPUT | PULLDIS | MODE7 */
-+					// gpio3_16 KEY_DOWN
-+				>;
-+			};
-+
-+		};
-+	};
-+
-+	fragment@1 {
-+		target = <&ocp>;
-+
-+		__overlay__ {
-+
-+			/* avoid stupid warning */
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+
-+			backlight {
-+				compatible      = "pwm-backlight";
-+				pinctrl-names   = "default";
-+				pinctrl-0       = <&pwm_bl_pins>;
-+
-+				pwms = <&ehrpwm1 0 500000 0>;
-+				pwm-names = "LCD7";
-+				brightness-levels = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100>;
-+				default-brightness-level = <50>; /* index to the array above */
-+			};
-+
-+			tscadc {
-+				compatible = "ti,ti-tscadc";
-+				reg = <0x44e0d000 0x1000>;
-+
-+				interrupt-parent = <&intc>;
-+				interrupts = <16>;
-+				ti,hwmods = "adc_tsc";
-+
-+				tsc {
-+					wires = <4>;
-+					x-plate-resistance = <200>;
-+					steps-to-configure = <5>;
-+					wire-config = <0x00 0x11 0x22 0x33>;
-+				};
-+
-+				adc {
-+					adc-channels = <4>;
-+				};
-+			};
-+
-+			gpio-leds-cape-lcd7 {
-+				compatible = "gpio-leds";
-+				pinctrl-names = "default";
-+
-+				pinctrl-0 = <&bone_lcd7_cape_led_00A2_pins>;
-+
-+				lcd7-led0 {
-+					label = "lcd7:green:usr0";
-+					gpios = <&gpio2 28 0>;
-+					linux,default-trigger = "heartbeat";
-+					default-state = "off";
-+				};
-+
-+			};
-+
-+			gpio_keys {
-+				compatible = "gpio-keys";
-+				pinctrl-names = "default";
-+				pinctrl-0 = <&bone_lcd7_cape_keys_00A2_pins>;
-+
-+				#address-cells = <1>;
-+				#size-cells = <0>;
-+
-+				button@1 {
-+					debounce_interval = <50>;
-+					linux,code = <105>;
-+					label = "left";
-+					gpios = <&gpio2 16 0x0>;
-+					gpio-key,wakeup;
-+					autorepeat;
-+				};
-+				button@2 {
-+					debounce_interval = <50>;
-+					linux,code = <106>;
-+					label = "right";
-+					gpios = <&gpio2 17 0x0>;
-+					gpio-key,wakeup;
-+					autorepeat;
-+				};
-+				button@3 {
-+					debounce_interval = <50>;
-+					linux,code = <103>;
-+					label = "up";
-+					gpios = <&gpio2 19 0x0>;
-+					gpio-key,wakeup;
-+					autorepeat;
-+				};
-+				button@4 {
-+					debounce_interval = <50>;
-+					linux,code = <108>;
-+					label = "down";
-+					gpios = <&gpio4 16 0x0>;
-+					gpio-key,wakeup;
-+					autorepeat;
-+				};
-+				button@5 {
-+					debounce_interval = <50>;
-+					linux,code = <28>;
-+					label = "enter";
-+					gpios = <&gpio4 19 0x0>;
-+					gpio-key,wakeup;
-+				};
-+			};
-+
-+			/* Settings for ThreeFive S9700RTWV35TR / LCD7 cape: */
-+			panel {
-+				compatible = "tilcdc,panel";
-+				pinctrl-names = "default";
-+				pinctrl-0 = <&bone_lcd7_cape_lcd_pins>;
-+				panel-info {
-+					ac-bias           = <255>;
-+					ac-bias-intrpt    = <0>;
-+					dma-burst-sz      = <16>;
-+					bpp               = <16>;
-+					fdd               = <0x80>;
-+					tft-alt-mode      = <0>;
-+					stn-565-mode      = <0>;
-+					mono-8bit-mode    = <0>;
-+					invert-line-clock = <1>;
-+					invert-frm-clock  = <1>;
-+					sync-edge         = <0>;
-+					sync-ctrl         = <1>;
-+					raster-order      = <0>;
-+					fifo-th           = <0>;
-+				};
-+				display-timings {
-+					native-mode = <&timing0>;
-+					timing0: 800x480 {
-+						hactive         = <800>;
-+						vactive         = <480>;
-+						hback-porch     = <39>;
-+						hfront-porch    = <39>;
-+						hsync-len       = <47>;
-+						vback-porch     = <29>;
-+						vfront-porch    = <13>;
-+						vsync-len       = <2>;
-+						clock-frequency = <30000000>;
-+					};
-+				};
-+			};
-+
-+			fb {
-+				compatible = "ti,am33xx-tilcdc";
-+				reg = <0x4830e000 0x1000>;
-+				interrupt-parent = <&intc>;
-+				interrupts = <36>;
-+				ti,hwmods = "lcdc";
-+				ti,power-gpio = <&gpio2 31 0x0>;
-+			};
-+
-+		};
-+	};
-+};
--- 
-1.7.10.4
-
diff --git a/patches/not-capebus/0080-HACK-am33xx.dtsi-enable-all-PWMs.patch b/patches/not-capebus/0080-HACK-am33xx.dtsi-enable-all-PWMs.patch
deleted file mode 100644
index c6913403be5fd2b33f296a99b114470a6b99d844..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0080-HACK-am33xx.dtsi-enable-all-PWMs.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From 190ec4b50bb1b6ef18d6e3a8bee222b4ba9ddab3 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Fri, 18 Jan 2013 11:15:22 +0100
-Subject: [PATCH 80/90] HACK: am33xx.dtsi: enable all PWMs
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- arch/arm/boot/dts/am33xx.dtsi | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index 9745507..912cfcd 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -356,7 +356,7 @@
- 			ti,hwmods = "epwmss0";
- 			#address-cells = <1>;
- 			#size-cells = <1>;
--			status = "disabled";
-+			status = "okay";
- 			ranges;
- 
- 			ecap0: ecap@48300100 {
-@@ -364,7 +364,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48300100 0x80>;
- 				ti,hwmods = "ecap0";
--				status = "disabled";
-+				status = "okay";
- 			};
- 
- 			ehrpwm0: ehrpwm@48300200 {
-@@ -372,7 +372,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48300200 0x80>;
- 				ti,hwmods = "ehrpwm0";
--				status = "disabled";
-+				status = "okay";
- 				tbclkgating;
- 			};
- 		};
-@@ -386,7 +386,7 @@
- 			ti,hwmods = "epwmss1";
- 			#address-cells = <1>;
- 			#size-cells = <1>;
--			status = "disabled";
-+			status = "okay";
- 			ranges;
- 
- 			ecap1: ecap@48302100 {
-@@ -394,7 +394,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48302100 0x80>;
- 				ti,hwmods = "ecap1";
--				status = "disabled";
-+				status = "okay";
- 			};
- 
- 			ehrpwm1: ehrpwm@48302200 {
-@@ -402,7 +402,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48302200 0x80>;
- 				ti,hwmods = "ehrpwm1";
--				status = "disabled";
-+				status = "okay";
- 				tbclkgating;
- 			};
- 		};
-@@ -416,7 +416,7 @@
- 			ti,hwmods = "epwmss2";
- 			#address-cells = <1>;
- 			#size-cells = <1>;
--			status = "disabled";
-+			status = "okay";
- 			ranges;
- 
- 			ecap2: ecap@48304100 {
-@@ -424,7 +424,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48304100 0x80>;
- 				ti,hwmods = "ecap2";
--				status = "disabled";
-+				status = "okay";
- 			};
- 
- 			ehrpwm2: ehrpwm@48304200 {
-@@ -432,7 +432,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48304200 0x80>;
- 				ti,hwmods = "ehrpwm2";
--				status = "disabled";
-+				status = "okay";
- 				tbclkgating;
- 			};
- 		};
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0081-beaglebone-Add-nixie-cape-prototype-driver.patch b/patches/not-capebus/0081-beaglebone-Add-nixie-cape-prototype-driver.patch
deleted file mode 100644
index df413fe6c8b850beb84597711ad9f3dc0bf5a978..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0081-beaglebone-Add-nixie-cape-prototype-driver.patch
+++ /dev/null
@@ -1,450 +0,0 @@
-From 7cf3401d54fea65a85ced015b72c12d8d44dc5ba Mon Sep 17 00:00:00 2001
-From: Matt Ranostay <mranostay@gmail.com>
-Date: Tue, 22 Jan 2013 10:09:47 -0800
-Subject: [PATCH 81/98] beaglebone: Add nixie cape prototype driver
-
-Add support for nixie cape breadboard prototype.
-
-Signed-off-by: Matt Ranostay <mranostay@gmail.com>
----
- drivers/misc/cape/beaglebone/Kconfig           |    8 +
- drivers/misc/cape/beaglebone/Makefile          |    1 +
- drivers/misc/cape/beaglebone/cape-bone-nixie.c |  401 ++++++++++++++++++++++++
- 3 files changed, 410 insertions(+)
- create mode 100644 drivers/misc/cape/beaglebone/cape-bone-nixie.c
-
-diff --git a/drivers/misc/cape/beaglebone/Kconfig b/drivers/misc/cape/beaglebone/Kconfig
-index ebeedce..072ccae8 100644
---- a/drivers/misc/cape/beaglebone/Kconfig
-+++ b/drivers/misc/cape/beaglebone/Kconfig
-@@ -16,3 +16,11 @@ config CAPE_BEAGLEBONE_GEIGER
- 	default n
- 	help
- 	  Say Y here to include support for the Geiger Cape
-+
-+
-+config CAPE_BEAGLEBONE_NIXIE
-+	tristate "Beaglebone Nixie Cape"
-+	depends on CAPE_BEAGLEBONE
-+	default n
-+	help
-+	  Say Y here to include support for the Nixie Cape
-diff --git a/drivers/misc/cape/beaglebone/Makefile b/drivers/misc/cape/beaglebone/Makefile
-index b79ace4..808fe14 100644
---- a/drivers/misc/cape/beaglebone/Makefile
-+++ b/drivers/misc/cape/beaglebone/Makefile
-@@ -4,3 +4,4 @@
- 
- obj-$(CONFIG_CAPE_BEAGLEBONE)		+= capemgr.o
- obj-$(CONFIG_CAPE_BEAGLEBONE_GEIGER)	+= cape-bone-geiger.o
-+obj-$(CONFIG_CAPE_BEAGLEBONE_NIXIE)	+= cape-bone-nixie.o
-diff --git a/drivers/misc/cape/beaglebone/cape-bone-nixie.c b/drivers/misc/cape/beaglebone/cape-bone-nixie.c
-new file mode 100644
-index 0000000..7adfdc9
---- /dev/null
-+++ b/drivers/misc/cape/beaglebone/cape-bone-nixie.c
-@@ -0,0 +1,401 @@
-+/*
-+ * Driver for beaglebone Nixie cape
-+ *
-+ *  Copyright (C) 2013 Matt Ranostay <mranostay@gmail.com>
-+ *
-+ * Based on original work by
-+ *  Copyright (C) 2012 Pantelis Antoniou <panto@antoniou-consulting.com>
-+ *  Copyright (C) 2012 Texas Instruments Inc.
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/kernel.h>
-+#include <linux/string.h>
-+#include <linux/timer.h>
-+#include <linux/errno.h>
-+#include <linux/init.h>
-+#include <linux/delay.h>
-+#include <linux/bitops.h>
-+#include <linux/err.h>
-+#include <linux/of.h>
-+#include <linux/of_device.h>
-+#include <linux/pinctrl/pinctrl.h>
-+#include <linux/pinctrl/pinmux.h>
-+#include <linux/pinctrl/consumer.h>
-+#include <asm/barrier.h>
-+#include <linux/pwm.h>
-+#include <linux/leds.h>
-+
-+enum {
-+	BLANK_PWM_CHAN	= 0,
-+	BOOST_PWM_CHAN	= 1,
-+};
-+
-+struct bone_nixie_info {
-+	struct platform_device *pdev;
-+	struct pwm_device *pwm_dev;
-+	struct led_trigger *run_led;		/* running */
-+
-+	int pwm_frequency;
-+	int pwm_duty_cycle;
-+	int pwm_period;
-+	int brightness;
-+	int run;
-+};
-+
-+static const struct of_device_id bonenixie_of_match[] = {
-+	{
-+		.compatible = "bone-cape-nixie",
-+	},
-+	{ },
-+};
-+MODULE_DEVICE_TABLE(of, bonenixie_of_match);
-+
-+/*
-+ * XXX: PWM subsystem doesn't allow easily selecting multiple channels on
-+ *	the same chip... so we hack it.. this shouldn't be here long term
-+ */
-+
-+static void nixie_pwm_config(struct bone_nixie_info *info,
-+			     int duty, int chan)
-+{
-+	struct pwm_device *pwm = info->pwm_dev;
-+
-+	duty = (info->pwm_period * duty) / 100;
-+
-+	pwm->hwpwm = chan;
-+	pwm_config(pwm, duty, info->pwm_period);
-+
-+	pwm->chip->ops->enable(pwm->chip, pwm);
-+}
-+
-+static void nixie_pwm_disable(struct pwm_device *pwm, int chan)
-+{
-+	pwm->hwpwm = chan;
-+	pwm->chip->ops->disable(pwm->chip, pwm);
-+}
-+
-+static int bonenixie_start(struct platform_device *pdev)
-+{
-+	struct bone_nixie_info *info = platform_get_drvdata(pdev);
-+	int duty;
-+
-+	if (info->run != 0)
-+		return 0;
-+
-+	/* checks */
-+	if (info->pwm_frequency < 1000 || info->pwm_frequency > 50000) {
-+		dev_err(&pdev->dev, "Cowardly refusing to use a "
-+				"frequency of %d\n",
-+				info->pwm_frequency);
-+		return -EINVAL;
-+	}
-+	if (info->pwm_duty_cycle > 80) {
-+		dev_err(&pdev->dev, "Cowardly refusing to use a "
-+				"duty cycle of %d\n",
-+				info->pwm_duty_cycle);
-+		return -EINVAL;
-+	}
-+
-+	info->pwm_period = div_u64(1000000000LLU, info->pwm_frequency);
-+	duty = (info->pwm_period * info->pwm_duty_cycle) / 100;
-+
-+	dev_info(&pdev->dev, "starting nixie tube with "
-+			" boost converter duty=%duns period=%dus"
-+			" default brightness percent=%d\n",
-+			duty, info->pwm_period, info->brightness);
-+
-+	nixie_pwm_config(info, 100 - info->brightness, BLANK_PWM_CHAN);
-+	nixie_pwm_config(info, info->pwm_duty_cycle, BOOST_PWM_CHAN);
-+
-+	info->run = 1;
-+	led_trigger_event(info->run_led, LED_FULL);
-+
-+	return 0;
-+}
-+
-+static int bonenixie_stop(struct platform_device *pdev)
-+{
-+	struct bone_nixie_info *info = platform_get_drvdata(pdev);
-+
-+	if (info->run == 0)
-+		return 0;
-+
-+	dev_info(&pdev->dev, "disabling nixie tube\n");
-+
-+	nixie_pwm_config(info, 0, BLANK_PWM_CHAN);	/* 0% duty cycle */
-+	nixie_pwm_disable(info->pwm_dev, BLANK_PWM_CHAN);
-+
-+	nixie_pwm_config(info, 0, BOOST_PWM_CHAN);	/* 0% duty cycle */
-+	nixie_pwm_disable(info->pwm_dev, BOOST_PWM_CHAN);
-+
-+	info->run = 0;
-+	led_trigger_event(info->run_led, LED_OFF);
-+
-+	return 0;
-+}
-+
-+static ssize_t bonenixie_show_brightness(struct device *dev,
-+				struct device_attribute *attr, char *buf)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	struct bone_nixie_info *info = platform_get_drvdata(pdev);
-+
-+	return sprintf(buf, "%d\n", info->brightness);
-+}
-+
-+
-+static ssize_t bonenixie_store_brightness(struct device *dev,
-+				struct device_attribute *attr,
-+				const char *buf, size_t count)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	struct bone_nixie_info *info = platform_get_drvdata(pdev);
-+	int brightness;
-+
-+	if (sscanf(buf, "%d", &brightness) != 1)
-+		return -EINVAL;
-+
-+	if (brightness < 0 || brightness > 100)
-+		return -EINVAL;
-+
-+	info->brightness = brightness;
-+	nixie_pwm_config(info, 100 - brightness, BLANK_PWM_CHAN);
-+
-+	return count;
-+}
-+
-+
-+static ssize_t bonenixie_show_run(struct device *dev,
-+				struct device_attribute *attr, char *buf)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	struct bone_nixie_info *info = platform_get_drvdata(pdev);
-+
-+	return sprintf(buf, "%d\n", info->run);
-+}
-+
-+
-+static ssize_t bonenixie_store_run(struct device *dev,
-+				struct device_attribute *attr,
-+				const char *buf, size_t count)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	int run, err;
-+
-+	if (sscanf(buf, "%i", &run) != 1)
-+		return -EINVAL;
-+
-+	if (run)
-+		err = bonenixie_start(pdev);
-+	else
-+		err = bonenixie_stop(pdev);
-+
-+	return err ? err : count;
-+}
-+
-+static DEVICE_ATTR(brightness, S_IRUGO | S_IWUSR,
-+		bonenixie_show_brightness, bonenixie_store_brightness);
-+
-+static DEVICE_ATTR(run, S_IRUGO | S_IWUSR,
-+		bonenixie_show_run, bonenixie_store_run);
-+
-+static int bonenixie_sysfs_register(struct platform_device *pdev)
-+{
-+	int err;
-+
-+	err = device_create_file(&pdev->dev, &dev_attr_run);
-+	if (err != 0)
-+		goto err_no_run;
-+
-+	err = device_create_file(&pdev->dev, &dev_attr_brightness);
-+	if (err != 0)
-+		goto err_no_brightness;
-+
-+	return 0;
-+
-+err_no_brightness:
-+	device_remove_file(&pdev->dev, &dev_attr_run);
-+err_no_run:
-+	return err;
-+}
-+
-+static void bonenixie_sysfs_unregister(struct platform_device *pdev)
-+{
-+	device_remove_file(&pdev->dev, &dev_attr_brightness);
-+	device_remove_file(&pdev->dev, &dev_attr_run);
-+}
-+
-+static int bonenixie_probe(struct platform_device *pdev)
-+{
-+	struct bone_nixie_info *info;
-+	struct pinctrl *pinctrl;
-+	struct device_node *pnode = pdev->dev.of_node;
-+	phandle phandle;
-+	u32 val;
-+	int err;
-+
-+	/* we only support OF */
-+	if (pnode == NULL) {
-+		dev_err(&pdev->dev, "No platform of_node!\n");
-+		return -ENODEV;
-+	}
-+
-+	info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
-+	if (info == NULL) {
-+		dev_err(&pdev->dev, "Failed to allocate info\n");
-+		err = -ENOMEM;
-+		goto err_no_mem;
-+	}
-+	platform_set_drvdata(pdev, info);
-+	info->pdev = pdev;
-+
-+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-+	if (IS_ERR(pinctrl))
-+		dev_warn(&pdev->dev,
-+			"pins are not configured from the driver\n");
-+
-+	err = of_property_read_u32(pnode, "pwms", &val);
-+	if (err != 0) {
-+		dev_err(&pdev->dev, "unable to read pwm handle\n");
-+		goto err_no_pwm;
-+	}
-+	phandle = val;
-+
-+	info->pwm_dev = of_pwm_request(pnode, NULL);
-+	if (IS_ERR(info->pwm_dev)) {
-+		dev_err(&pdev->dev, "unable to request PWM\n");
-+		err = PTR_ERR(info->pwm_dev);
-+		goto err_no_pwm;
-+	}
-+
-+	if (of_property_read_u32(pnode, "pwm-frequency", &val) != 0) {
-+		val = 9250;
-+		dev_warn(&pdev->dev, "Could not read pwm-frequency property; "
-+				"using default %u\n",
-+				val);
-+	}
-+	info->pwm_frequency = val;
-+
-+	if (of_property_read_u32(pnode, "pwm-duty-cycle", &val) != 0) {
-+		val = 35;
-+		dev_warn(&pdev->dev, "Could not read pwm-duty-cycle property; "
-+				"using default %u\n",
-+				val);
-+	}
-+	info->pwm_duty_cycle = val;
-+
-+	if (of_property_read_u32(pnode, "default-brightness", &val) != 0) {
-+		val = 80;
-+		dev_warn(&pdev->dev, "Could not read default-brightness property; "
-+				"using default %u\n",
-+				val);
-+	}
-+	info->brightness = val;
-+
-+	err = bonenixie_sysfs_register(pdev);
-+	if (err != 0) {
-+		dev_err(&pdev->dev, "unable to register sysfs\n");
-+		goto err_no_sysfs;
-+	}
-+
-+	led_trigger_register_simple("nixie-run", &info->run_led);
-+	led_trigger_event(info->run_led, LED_OFF);
-+
-+	dev_info(&pdev->dev, "ready\n");
-+
-+	err = bonenixie_start(pdev);
-+	if (err != 0) {
-+		dev_err(&pdev->dev, "Could not start nixie device\n");
-+		goto err_no_start;
-+	}
-+
-+	return 0;
-+
-+err_no_start:
-+	led_trigger_unregister_simple(info->run_led);
-+	bonenixie_sysfs_unregister(pdev);
-+err_no_sysfs:
-+	/* fall-through */
-+err_no_pwm:
-+	devm_kfree(&pdev->dev, info);
-+err_no_mem:
-+	return err;
-+}
-+
-+static int bonenixie_remove(struct platform_device *pdev)
-+{
-+	struct bone_nixie_info *info = platform_get_drvdata(pdev);
-+
-+	dev_info(&pdev->dev, "Remove nixie cape driver...\n");
-+
-+	bonenixie_stop(pdev);
-+
-+	led_trigger_unregister_simple(info->run_led);
-+	bonenixie_sysfs_unregister(pdev);
-+
-+	return 0;
-+}
-+
-+#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_RUNTIME
-+static int bonenixie_runtime_suspend(struct device *dev)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	struct bone_nixie_info *_dev = platform_get_drvdata(pdev);
-+
-+	(void)_dev;
-+	return 0;
-+}
-+
-+static int bonenixie_runtime_resume(struct device *dev)
-+{
-+	struct platform_device *pdev = to_platform_device(dev);
-+	struct bone_nixie_info *_dev = platform_get_drvdata(pdev);
-+
-+	(void)_dev;
-+	return 0;
-+}
-+#endif /* CONFIG_PM_RUNTIME */
-+
-+static struct dev_pm_ops bonenixie_pm_ops = {
-+	SET_RUNTIME_PM_OPS(bonenixie_runtime_suspend,
-+			   bonenixie_runtime_resume, NULL)
-+};
-+#define BONENIXIE_PM_OPS (&bonenixie_pm_ops)
-+#else
-+#define BONENIXIE_PM_OPS NULL
-+#endif /* CONFIG_PM */
-+
-+
-+struct platform_driver bonenixie_driver = {
-+	.probe		= bonenixie_probe,
-+	.remove		= bonenixie_remove,
-+	.driver = {
-+		.name		= "bone-cape-nixie",
-+		.owner		= THIS_MODULE,
-+		.pm		= BONENIXIE_PM_OPS,
-+		.of_match_table = bonenixie_of_match,
-+	},
-+};
-+
-+module_platform_driver(bonenixie_driver);
-+
-+MODULE_AUTHOR("Matt Ranostay");
-+MODULE_DESCRIPTION("Beaglebone nixie cape");
-+MODULE_LICENSE("GPL");
-+MODULE_ALIAS("platform:bone-nixie-cape");
--- 
-1.7.10.4
-
diff --git a/patches/not-capebus/0082-beaglebone-Add-nixie-cape-device-tree-entry.patch b/patches/not-capebus/0082-beaglebone-Add-nixie-cape-device-tree-entry.patch
deleted file mode 100644
index 819f71e7f614ab8af5263c15860993ec3c405d3f..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0082-beaglebone-Add-nixie-cape-device-tree-entry.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-From 50cd47bca0204b38160dff44a1ee5e7f63e4deed Mon Sep 17 00:00:00 2001
-From: Matt Ranostay <mranostay@gmail.com>
-Date: Tue, 22 Jan 2013 10:09:48 -0800
-Subject: [PATCH 82/98] beaglebone: Add nixie cape device tree entry
-
-Added nixie dt overlays, PWM, and leds definitions to am355x-bone-common
-
-Signed-off-by: Matt Ranostay <mranostay@gmail.com>
----
- arch/arm/boot/dts/am335x-bone-common.dtsi |   19 +++++
- firmware/Makefile                         |    4 ++
- firmware/capes/cape-bone-nixie-00A0.dts   |  107 +++++++++++++++++++++++++++++
- 3 files changed, 130 insertions(+)
- create mode 100644 firmware/capes/cape-bone-nixie-00A0.dts
-
-diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
-index bf863bd..c45daa2 100644
---- a/arch/arm/boot/dts/am335x-bone-common.dtsi
-+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
-@@ -181,6 +181,17 @@
- 				manufacturer = "Texas Instruments";
- 				part-number = "BB-BONELT-HDMI";
- 			};
-+
-+			/* Nixie cape version A0 without an EEPROM */
-+			slot@7 {
-+				ti,cape-override;
-+				compatible = "kernel-command-line", "runtime";
-+				board-name = "Bone-Nixie";
-+				version = "00A0";
-+				manufacturer = "Ranostay Industries";
-+				part-number = "BB-BONE-NIXIE";
-+			};
-+
- 		};
- 
- 		/* mapping between board names and dtb objects */
-@@ -249,6 +260,14 @@
- 				};
- 			};
- 
-+			/* nixie cape */
-+			cape@6 {
-+				part-number = "BB-BONE-NIXIE";
-+				version@00A0 {
-+					version = "00A0";
-+					dtbo = "cape-bone-nixie-00A0.dtbo";
-+				};
-+			};
- 		};
- 	};
- };
-diff --git a/firmware/Makefile b/firmware/Makefile
-index f8c4a9e..efe2b90 100644
---- a/firmware/Makefile
-+++ b/firmware/Makefile
-@@ -150,6 +150,10 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \
- fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += \
- 	cape-bone-geiger-00A0.dtbo
- 
-+# the nixie cape
-+fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_NIXIE) += \
-+	cape-bone-nixie-00A0.dtbo
-+
- # the weather cape
- fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += cape-bone-weather-00A0.dtbo
- 
-diff --git a/firmware/capes/cape-bone-nixie-00A0.dts b/firmware/capes/cape-bone-nixie-00A0.dts
-new file mode 100644
-index 0000000..a662520
---- /dev/null
-+++ b/firmware/capes/cape-bone-nixie-00A0.dts
-@@ -0,0 +1,107 @@
-+/*
-+* Copyright (C) 2013 Matt Ranostay <mranostay@gmail.com>
-+*
-+* This program is free software; you can redistribute it and/or modify
-+* it under the terms of the GNU General Public License version 2 as
-+* published by the Free Software Foundation.
-+*/
-+/dts-v1/;
-+/plugin/;
-+
-+/ {
-+	compatible = "ti,beaglebone", "ti,beaglebone-black";
-+
-+	/* identification */
-+	part-number = "BB-BONE-NIXIE";
-+	version = "00A0";
-+
-+	fragment@0 {
-+		target = <&am33xx_pinmux>;
-+		__overlay__ {
-+
-+			bone_nixie_cape_led_pins: pinmux_bone_nixie_cape_led_pins {
-+				pinctrl-single,pins = <
-+					0x1ac 0x07	/* mcasp0_ahclkx.gpio3_21, MODE7 */
-+				>;
-+			};
-+
-+			bone_nixie_cape_pins: pinmux_bone_nixie_cape_pins {
-+				pinctrl-single,pins = <
-+					0x0a0 0x03      /* lcd_data0.gpio2_6 | MODE3 */
-+					0x0a4 0x03      /* lcd_data1.gpio2_7 | MODE3 */
-+				>;
-+		        };
-+
-+			pruss_pins: pinmux_pruss_pins {
-+				pinctrl-single,pins = <
-+					0x190 0x05	/* mcasp0_aclkx.pr1_pru0_pru_r30_0, MODE5 | DATA */
-+					0x194 0x05	/* mcasp0_fsx.pr1_pru0_pru_r30_1, MODE5 | LATCH */
-+					0x1a4 0x05	/* mcasp0_fsr.pr1_pru1_pru_r30_5, MODE5 | CLK */
-+				>;
-+			};
-+		};
-+	};
-+
-+	fragment@2 {
-+		target = <&epwmss2>;
-+		__overlay__ {
-+			status = "okay";
-+		};
-+	};
-+
-+	fragment@1 {
-+		target = <&ehrpwm2>;
-+		__overlay__ {
-+			status = "okay";
-+		};
-+	};
-+
-+	fragment@3 {
-+		target = <&ocp>;
-+		__overlay__ {
-+
-+			/* avoid stupid warning */
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+
-+			gpio-leds-cape-nixie {
-+				compatible = "gpio-leds";
-+				pinctrl-names = "default";
-+				pinctrl-0 = <&bone_nixie_cape_led_pins>;
-+
-+				nixie-led0 {
-+					label = "nixie:green:usr0";
-+					gpios = <&gpio4 21 0>;
-+					linux,default-trigger = "nixie-run";
-+					default-state = "off";
-+				};
-+			};
-+
-+			bone-cape-nixie {
-+				compatible = "bone-cape-nixie";
-+				status = "okay";
-+
-+				pinctrl-names = "default";
-+				pinctrl-0 = <&bone_nixie_cape_pins>;
-+
-+				pwms = <&ehrpwm2 0 500000 0>;
-+				pwm-names = "bone-nixie-cape";
-+
-+				pwm-frequency  = <9250>;	/* 9.250KHz */
-+				pwm-duty-cycle = <35>;		/* 35% */
-+
-+				default-brightness = <35>;	/* 35% */
-+			};
-+		};
-+	};
-+
-+	fragment@4 {
-+		target = <&pruss>;
-+		__overlay__ {
-+			status = "okay";
-+
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&pruss_pins>;
-+		};
-+	};
-+};
--- 
-1.7.10.4
-
diff --git a/patches/not-capebus/0083-am335x-bone-common.dtsi-Cleanup-test-remnants.patch b/patches/not-capebus/0083-am335x-bone-common.dtsi-Cleanup-test-remnants.patch
deleted file mode 100644
index 0653669df40400b205b83e4082ef607a7bb6833c..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0083-am335x-bone-common.dtsi-Cleanup-test-remnants.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 4c6518543b5e5f98fba1ea261eeeb3d64086f715 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 18 Jan 2013 14:10:49 +0200
-Subject: [PATCH 83/90] am335x-bone-common.dtsi: Cleanup test remnants
-
-Cleanup various test remnants.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/boot/dts/am335x-bone-common.dtsi | 16 ----------------
- 1 file changed, 16 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
-index c45daa2..4787d8c 100644
---- a/arch/arm/boot/dts/am335x-bone-common.dtsi
-+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
-@@ -35,11 +35,6 @@
- 				0x19c 0x13	/* mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */
- 			>;
- 		};
--		gpevt_pins: pinmux_gpevt_pins {
--			pinctrl-single,pins = <
--				0x090 0x37	/* gpmc_advn_ale.gpio2_2, INPUT_PULLUP | MODE7 */
--			>;
--		};
- 		userled_pins: pinmux_userled_pins {
- 			pinctrl-single,pins = <
- 				0x54 0x7	/* gpmc_a5.gpio1_21, OUTPUT | MODE7 */
-@@ -67,10 +62,6 @@
- 			status = "okay";
- 		};
- 
--		uart5: serial@481a8000 {
--			status = "okay";
--		};
--
- 		gpio-leds {
- 			compatible = "gpio-leds";
- 			pinctrl-names = "default";
-@@ -105,13 +96,6 @@
- 			};
- 		};
- 
--		gpevt {
--			compatible = "gpevt";
--			dmas = <&edma 12>;
--			dma-names = "gpioevt";
--			gpio-evt = <&gpio3 2 0>;
--		};
--
- 		rtc@44e3e000 {
- 			ti,system-power-controller;
- 		};
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0084-omap_hsmmc-Add-ti-vcc-aux-disable-is-sleep-DT-proper.patch b/patches/not-capebus/0084-omap_hsmmc-Add-ti-vcc-aux-disable-is-sleep-DT-proper.patch
deleted file mode 100644
index 4927180d096886f536405f69219f7ad57fdcc8e7..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0084-omap_hsmmc-Add-ti-vcc-aux-disable-is-sleep-DT-proper.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From db6f48a035c343133ee8979965876342463359de Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 18 Jan 2013 15:44:44 +0200
-Subject: [PATCH 84/90] omap_hsmmc: Add ti,vcc-aux-disable-is-sleep DT property
-
-This exposes the vcc_aux_disable_is_sleep property to DT users.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/mmc/host/omap_hsmmc.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
-index 1f29d67..7a35c8e 100644
---- a/drivers/mmc/host/omap_hsmmc.c
-+++ b/drivers/mmc/host/omap_hsmmc.c
-@@ -1785,6 +1785,9 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
- 	if (of_find_property(np, "ti,needs-special-hs-handling", NULL))
- 		pdata->slots[0].features |= HSMMC_HAS_HSPE_SUPPORT;
- 
-+	if (of_find_property(np, "ti,vcc-aux-disable-is-sleep", NULL))
-+		pdata->slots[0].vcc_aux_disable_is_sleep = 1;
-+
- 	return pdata;
- }
- #else
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0085-bone-common-ti-vcc-aux-disable-is-sleep-enable.patch b/patches/not-capebus/0085-bone-common-ti-vcc-aux-disable-is-sleep-enable.patch
deleted file mode 100644
index 08bb4c9521dad8109348226653a2c924f17b423b..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0085-bone-common-ti-vcc-aux-disable-is-sleep-enable.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From f39f1ad2a98af0d6081c2be9ec4672964ac32300 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 18 Jan 2013 15:46:52 +0200
-Subject: [PATCH 85/90] bone-common: ti,vcc-aux-disable-is-sleep enable
-
-Enable vcc-aux-disable-is-sleep on both MMC interfaces.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- arch/arm/boot/dts/am335x-bone-common.dtsi | 1 +
- firmware/capes/cape-bone-2g-emmc1.dts     | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
-index 4787d8c..96bce02 100644
---- a/arch/arm/boot/dts/am335x-bone-common.dtsi
-+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
-@@ -359,6 +359,7 @@
- &mmc1 {
- 	status = "okay";
- 	vmmc-supply = <&ldo3_reg>;
-+	ti,vcc-aux-disable-is-sleep;
- };
- 
- &edma {
-diff --git a/firmware/capes/cape-bone-2g-emmc1.dts b/firmware/capes/cape-bone-2g-emmc1.dts
-index c81a986..e2a4a46 100644
---- a/firmware/capes/cape-bone-2g-emmc1.dts
-+++ b/firmware/capes/cape-bone-2g-emmc1.dts
-@@ -48,6 +48,7 @@
- 			ti,non-removable;
- 			status = "okay";
- 			reset-gpios = <&gpio2 20 1>;	/* active low */
-+			ti,vcc-aux-disable-is-sleep;
- 		};
- 	};
- };
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0086-am33xx-disable-NAPI.patch b/patches/not-capebus/0086-am33xx-disable-NAPI.patch
deleted file mode 100644
index 5450a3048dacce510a1921f49fbd942e597784f2..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0086-am33xx-disable-NAPI.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From a6f4c69e57019c01977e60e75c23301bab12925d Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Thu, 24 Jan 2013 15:35:12 +0100
-Subject: [PATCH 86/90] am33xx: disable NAPI
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- arch/arm/boot/dts/am33xx.dtsi | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index 912cfcd..4b20654 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -525,6 +525,7 @@
- 			 */
- 			interrupts = <40 41 42 43>;
- 			ranges;
-+			disable-napi;
- 
- 			davinci_mdio: mdio@4a101000 {
- 				compatible = "ti,davinci_mdio";
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0087-capemgr-Fixed-AIN-name-display-in-error-message.patch b/patches/not-capebus/0087-capemgr-Fixed-AIN-name-display-in-error-message.patch
deleted file mode 100644
index aea6fbc5999a697ee2c713e70369d119caed7dad..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0087-capemgr-Fixed-AIN-name-display-in-error-message.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 6f7522256b5f88c88c76472386815a72c1c9ccb3 Mon Sep 17 00:00:00 2001
-From: Matt Ranostay <mranostay@gmail.com>
-Date: Sat, 26 Jan 2013 22:31:12 -0800
-Subject: [PATCH 87/90] capemgr: Fixed AIN name display in error message
-
-AIN5 was harded in error message instead of using info->vsense_name
-
-Signed-off-by: Matt Ranostay <mranostay@gmail.com>
----
- drivers/misc/cape/beaglebone/cape-bone-geiger.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/misc/cape/beaglebone/cape-bone-geiger.c b/drivers/misc/cape/beaglebone/cape-bone-geiger.c
-index 1e50594..6be383e 100644
---- a/drivers/misc/cape/beaglebone/cape-bone-geiger.c
-+++ b/drivers/misc/cape/beaglebone/cape-bone-geiger.c
-@@ -385,7 +385,8 @@ static int bonegeiger_probe(struct platform_device *pdev)
- 
- 	info->vsense_channel = iio_channel_get(NULL, info->vsense_name);
- 	if (IS_ERR(info->vsense_channel)) {
--		dev_err(&pdev->dev, "Could not get AIN5 analog input\n");
-+		dev_err(&pdev->dev, "Could not get %s analog input\n",
-+					info->vsense_name);
- 		err = PTR_ERR(info->vsense_channel);
- 		goto err_no_vsense;
- 	}
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0088-am33xx.dtsi-remove-duplicate-nodes.patch b/patches/not-capebus/0088-am33xx.dtsi-remove-duplicate-nodes.patch
deleted file mode 100644
index 4bf51b2c28276ac9a1ff12a202cc76894f00e1a1..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0088-am33xx.dtsi-remove-duplicate-nodes.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From 0aadb591e96421f13af6ce3dcfaffce283f3e614 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Mon, 28 Jan 2013 14:38:49 +0100
-Subject: [PATCH 88/90] am33xx.dtsi: remove duplicate nodes
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- arch/arm/boot/dts/am33xx.dtsi | 90 -------------------------------------------
- 1 file changed, 90 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index 4b20654..b4b62af 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -347,96 +347,6 @@
- 			ti,timer-pwm;
- 		};
- 
--		epwmss0: epwmss@48300000 {
--			compatible = "ti,am33xx-pwmss";
--			reg = <0x48300000 0x10
--				0x48300100 0x80
--				0x48300180 0x80
--				0x48300200 0x80>;
--			ti,hwmods = "epwmss0";
--			#address-cells = <1>;
--			#size-cells = <1>;
--			status = "okay";
--			ranges;
--
--			ecap0: ecap@48300100 {
--				compatible = "ti,am33xx-ecap";
--				#pwm-cells = <3>;
--				reg = <0x48300100 0x80>;
--				ti,hwmods = "ecap0";
--				status = "okay";
--			};
--
--			ehrpwm0: ehrpwm@48300200 {
--				compatible = "ti,am33xx-ehrpwm";
--				#pwm-cells = <3>;
--				reg = <0x48300200 0x80>;
--				ti,hwmods = "ehrpwm0";
--				status = "okay";
--				tbclkgating;
--			};
--		};
--
--		epwmss1: epwmss@48302000 {
--			compatible = "ti,am33xx-pwmss";
--			reg = <0x48302000 0x10
--				0x48302100 0x80
--				0x48302180 0x80
--				0x48302200 0x80>;
--			ti,hwmods = "epwmss1";
--			#address-cells = <1>;
--			#size-cells = <1>;
--			status = "okay";
--			ranges;
--
--			ecap1: ecap@48302100 {
--				compatible = "ti,am33xx-ecap";
--				#pwm-cells = <3>;
--				reg = <0x48302100 0x80>;
--				ti,hwmods = "ecap1";
--				status = "okay";
--			};
--
--			ehrpwm1: ehrpwm@48302200 {
--				compatible = "ti,am33xx-ehrpwm";
--				#pwm-cells = <3>;
--				reg = <0x48302200 0x80>;
--				ti,hwmods = "ehrpwm1";
--				status = "okay";
--				tbclkgating;
--			};
--		};
--
--		epwmss2: epwmss@48304000 {
--			compatible = "ti,am33xx-pwmss";
--			reg = <0x48304000 0x10
--				0x48304100 0x80
--				0x48304180 0x80
--				0x48304200 0x80>;
--			ti,hwmods = "epwmss2";
--			#address-cells = <1>;
--			#size-cells = <1>;
--			status = "okay";
--			ranges;
--
--			ecap2: ecap@48304100 {
--				compatible = "ti,am33xx-ecap";
--				#pwm-cells = <3>;
--				reg = <0x48304100 0x80>;
--				ti,hwmods = "ecap2";
--				status = "okay";
--			};
--
--			ehrpwm2: ehrpwm@48304200 {
--				compatible = "ti,am33xx-ehrpwm";
--				#pwm-cells = <3>;
--				reg = <0x48304200 0x80>;
--				ti,hwmods = "ehrpwm2";
--				status = "okay";
--				tbclkgating;
--			};
--		};
--
- 		rtc@44e3e000 {
- 			compatible = "ti,da830-rtc";
- 			reg = <0x44e3e000 0x1000>;
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0089-cape-dtbos-update-to-latest-OF-videomode-bindings.patch b/patches/not-capebus/0089-cape-dtbos-update-to-latest-OF-videomode-bindings.patch
deleted file mode 100644
index 62ad55d330b6b0cde5922a2043ec12dae0021c5b..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0089-cape-dtbos-update-to-latest-OF-videomode-bindings.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 06704628b40a5362aa053f0e7849abc7f8b18f70 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Mon, 28 Jan 2013 16:11:27 +0100
-Subject: [PATCH 89/90] cape dtbos: update to latest OF videomode bindings
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- firmware/capes/BB-BONE-LCD7-01-00A2.dts | 4 ++--
- firmware/capes/cape-bone-lcd3-00A0.dts  | 4 ++--
- firmware/capes/cape-bone-lcd3-00A2.dts  | 4 ++--
- 3 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/firmware/capes/BB-BONE-LCD7-01-00A2.dts b/firmware/capes/BB-BONE-LCD7-01-00A2.dts
-index 7f9683f..09ba0d9 100644
---- a/firmware/capes/BB-BONE-LCD7-01-00A2.dts
-+++ b/firmware/capes/BB-BONE-LCD7-01-00A2.dts
-@@ -188,8 +188,6 @@
- 					tft-alt-mode      = <0>;
- 					stn-565-mode      = <0>;
- 					mono-8bit-mode    = <0>;
--					invert-line-clock = <1>;
--					invert-frm-clock  = <1>;
- 					sync-edge         = <0>;
- 					sync-ctrl         = <1>;
- 					raster-order      = <0>;
-@@ -207,6 +205,8 @@
- 						vfront-porch    = <13>;
- 						vsync-len       = <2>;
- 						clock-frequency = <30000000>;
-+						hsync-active    = <0>;
-+						vsync-active    = <0>;
- 					};
- 				};
- 			};
-diff --git a/firmware/capes/cape-bone-lcd3-00A0.dts b/firmware/capes/cape-bone-lcd3-00A0.dts
-index fed53a1..4076cf5 100644
---- a/firmware/capes/cape-bone-lcd3-00A0.dts
-+++ b/firmware/capes/cape-bone-lcd3-00A0.dts
-@@ -190,8 +190,6 @@
- 					tft-alt-mode      = <0>;
- 					stn-565-mode      = <0>;
- 					mono-8bit-mode    = <0>;
--					invert-line-clock = <1>;
--					invert-frm-clock  = <1>;
- 					sync-edge         = <0>;
- 					sync-ctrl         = <1>;
- 					raster-order      = <0>;
-@@ -209,6 +207,8 @@
- 						vfront-porch    = <23>;
- 						vsync-len       = <2>;
- 						clock-frequency = <8000000>;
-+						hsync-active    = <0>;
-+						vsync-active    = <0>;
- 					};
- 				};
- 			};
-diff --git a/firmware/capes/cape-bone-lcd3-00A2.dts b/firmware/capes/cape-bone-lcd3-00A2.dts
-index 18dbe045..d8366b4 100644
---- a/firmware/capes/cape-bone-lcd3-00A2.dts
-+++ b/firmware/capes/cape-bone-lcd3-00A2.dts
-@@ -190,8 +190,6 @@
- 					tft-alt-mode      = <0>;
- 					stn-565-mode      = <0>;
- 					mono-8bit-mode    = <0>;
--					invert-line-clock = <1>;
--					invert-frm-clock  = <1>;
- 					sync-edge         = <0>;
- 					sync-ctrl         = <1>;
- 					raster-order      = <0>;
-@@ -209,6 +207,8 @@
- 						vfront-porch    = <23>;
- 						vsync-len       = <2>;
- 						clock-frequency = <8000000>;
-+						hsync-active    = <0>;
-+						vsync-active    = <0>;
- 					};
- 				};
- 			};
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0090-beaglebone-uncomment-eMMC-override.patch b/patches/not-capebus/0090-beaglebone-uncomment-eMMC-override.patch
deleted file mode 100644
index 7a9534af4420ceec7e370f5b7dec540b1b8697d7..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0090-beaglebone-uncomment-eMMC-override.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 9957e4040b1e9b2fdf97c5c85877f0568ca6ec8f Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Tue, 29 Jan 2013 15:06:00 +0100
-Subject: [PATCH 90/98] beaglebone: uncomment eMMC override
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- arch/arm/boot/dts/am335x-bone-common.dtsi |   16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
-index 96bce02..fc46011 100644
---- a/arch/arm/boot/dts/am335x-bone-common.dtsi
-+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
-@@ -137,14 +137,14 @@
- 			};
- 
- 			/* Beaglebone black has it soldered on */
--			// slot@4 {
--			// 	ti,cape-override;
--			// 	compatible = "ti,beaglebone-black";
--			// 	board-name = "Bone-LT-eMMC-2G";
--			// 	version = "00A0";
--			// 	manufacturer = "Texas Instruments";
--			// 	part-number = "BB-BONE-EMMC-2G";
--			// };
-+			 slot@4 {
-+				ti,cape-override;
-+				compatible = "ti,beaglebone-black";
-+				board-name = "Bone-LT-eMMC-2G";
-+				version = "00A0";
-+				manufacturer = "Texas Instruments";
-+				part-number = "BB-BONE-EMMC-2G";
-+			 };
- 
- 			/* geiger cape version A0 without an EEPROM */
- 			slot@5 {
--- 
-1.7.10.4
-
diff --git a/patches/not-capebus/0091-bone-capes-Update-with-new-tscadc-bindings.patch b/patches/not-capebus/0091-bone-capes-Update-with-new-tscadc-bindings.patch
deleted file mode 100644
index cbb0abdd7a38fa6d0a9e3f60e9255922bea9a7d2..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0091-bone-capes-Update-with-new-tscadc-bindings.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From 58c1ec90b1197740d4b224e32ab9d8ac806f00e7 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 30 Jan 2013 15:38:19 +0200
-Subject: [PATCH 91/93] bone-capes: Update with new tscadc bindings
-
-Update the capes with the new driver bindings.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/capes/BB-BONE-LCD7-01-00A2.dts  | 11 ++++++-----
- firmware/capes/cape-bone-geiger-00A0.dts |  3 ++-
- firmware/capes/cape-bone-lcd3-00A0.dts   | 11 ++++++-----
- firmware/capes/cape-bone-lcd3-00A2.dts   | 11 ++++++-----
- 4 files changed, 20 insertions(+), 16 deletions(-)
-
-diff --git a/firmware/capes/BB-BONE-LCD7-01-00A2.dts b/firmware/capes/BB-BONE-LCD7-01-00A2.dts
-index 09ba0d9..4740fc0 100644
---- a/firmware/capes/BB-BONE-LCD7-01-00A2.dts
-+++ b/firmware/capes/BB-BONE-LCD7-01-00A2.dts
-@@ -97,16 +97,17 @@
- 				interrupt-parent = <&intc>;
- 				interrupts = <16>;
- 				ti,hwmods = "adc_tsc";
-+				status = "okay";
- 
- 				tsc {
--					wires = <4>;
--					x-plate-resistance = <200>;
--					steps-to-configure = <5>;
--					wire-config = <0x00 0x11 0x22 0x33>;
-+					ti,wires = <4>;
-+					ti,x-plate-resistance = <200>;
-+					ti,steps-to-configure = <5>;
-+					ti,wire-config = <0x00 0x11 0x22 0x33>;
- 				};
- 
- 				adc {
--					adc-channels = <4>;
-+					ti,adc-channels = <4>;
- 				};
- 			};
- 
-diff --git a/firmware/capes/cape-bone-geiger-00A0.dts b/firmware/capes/cape-bone-geiger-00A0.dts
-index 287d75c..a37d83f 100644
---- a/firmware/capes/cape-bone-geiger-00A0.dts
-+++ b/firmware/capes/cape-bone-geiger-00A0.dts
-@@ -86,9 +86,10 @@
- 				interrupt-parent = <&intc>;
- 				interrupts = <16>;
- 				ti,hwmods = "adc_tsc";
-+				status = "okay";
- 
- 				adc {
--					adc-channels = <8>;
-+					ti,adc-channels = <8>;
- 				};
- 			};
- 
-diff --git a/firmware/capes/cape-bone-lcd3-00A0.dts b/firmware/capes/cape-bone-lcd3-00A0.dts
-index 4076cf5..c62e4a9 100644
---- a/firmware/capes/cape-bone-lcd3-00A0.dts
-+++ b/firmware/capes/cape-bone-lcd3-00A0.dts
-@@ -93,16 +93,17 @@
- 				interrupt-parent = <&intc>;
- 				interrupts = <16>;
- 				ti,hwmods = "adc_tsc";
-+				status = "okay";
- 
- 				tsc {
--					wires = <4>;
--					x-plate-resistance = <200>;
--					steps-to-configure = <5>;
--					wire-config = <0x00 0x11 0x22 0x33>;
-+					ti,wires = <4>;
-+					ti,x-plate-resistance = <200>;
-+					ti,steps-to-configure = <5>;
-+					ti,wire-config = <0x00 0x11 0x22 0x33>;
- 				};
- 
- 				adc {
--					adc-channels = <4>;
-+					ti,adc-channels = <4>;
- 				};
- 			};
- 
-diff --git a/firmware/capes/cape-bone-lcd3-00A2.dts b/firmware/capes/cape-bone-lcd3-00A2.dts
-index d8366b4..12739a3 100644
---- a/firmware/capes/cape-bone-lcd3-00A2.dts
-+++ b/firmware/capes/cape-bone-lcd3-00A2.dts
-@@ -99,16 +99,17 @@
- 				interrupt-parent = <&intc>;
- 				interrupts = <16>;
- 				ti,hwmods = "adc_tsc";
-+				status = "okay";
- 
- 				tsc {
--					wires = <4>;
--					x-plate-resistance = <200>;
--					steps-to-configure = <5>;
--					wire-config = <0x00 0x11 0x22 0x33>;
-+					ti,wires = <4>;
-+					ti,x-plate-resistance = <200>;
-+					ti,steps-to-configure = <5>;
-+					ti,wire-config = <0x00 0x11 0x22 0x33>;
- 				};
- 
- 				adc {
--					adc-channels = <4>;
-+					ti,adc-channels = <4>;
- 				};
- 			};
- 
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0092-am33xx.dtsi-Update-and-disable-status-of-nodes.patch b/patches/not-capebus/0092-am33xx.dtsi-Update-and-disable-status-of-nodes.patch
deleted file mode 100644
index 8550e3e48ac4bc552e4450ea3fab6fff09902e9b..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0092-am33xx.dtsi-Update-and-disable-status-of-nodes.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From 76ee49c241319748906b265590afdd0f8f14faad Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 30 Jan 2013 15:40:50 +0200
-Subject: [PATCH 92/93] am33xx.dtsi: Update and disable status of nodes
-
----
- arch/arm/boot/dts/am33xx.dtsi | 19 ++++++++++---------
- 1 file changed, 10 insertions(+), 9 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index b4b62af..797f421 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -463,6 +463,7 @@
- 			interrupt-parent = <&intc>;
- 			interrupts = <16>;
- 			ti,hwmods = "adc_tsc";
-+			status = "disabled";
- 		};
- 
- 		lcdc: lcdc@4830e000 {
-@@ -479,7 +480,7 @@
- 			ti,hwmods = "epwmss0";
- 			#address-cells = <1>;
- 			#size-cells = <1>;
--			//status = "disabled";
-+			status = "disabled";
- 			ranges = <0x48300100 0x48300100 0x80   /* ECAP */
- 				  0x48300180 0x48300180 0x80   /* EQEP */
- 				  0x48300200 0x48300200 0x80>; /* EHRPWM */
-@@ -489,7 +490,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48300100 0x80>;
- 				ti,hwmods = "ecap0";
--				//status = "disabled";
-+				status = "disabled";
- 			};
- 
- 			ehrpwm0: ehrpwm@48300200 {
-@@ -497,7 +498,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48300200 0x80>;
- 				ti,hwmods = "ehrpwm0";
--				//status = "disabled";
-+				status = "disabled";
- 			};
- 		};
- 
-@@ -507,7 +508,7 @@
- 			ti,hwmods = "epwmss1";
- 			#address-cells = <1>;
- 			#size-cells = <1>;
--			//status = "disabled";
-+			status = "disabled";
- 			ranges = <0x48302100 0x48302100 0x80   /* ECAP */
- 				  0x48302180 0x48302180 0x80   /* EQEP */
- 				  0x48302200 0x48302200 0x80>; /* EHRPWM */
-@@ -517,7 +518,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48302100 0x80>;
- 				ti,hwmods = "ecap1";
--				//status = "disabled";
-+				status = "disabled";
- 			};
- 
- 			ehrpwm1: ehrpwm@48302200 {
-@@ -525,7 +526,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48302200 0x80>;
- 				ti,hwmods = "ehrpwm1";
--				//status = "disabled";
-+				status = "disabled";
- 			};
- 		};
- 
-@@ -535,7 +536,7 @@
- 			ti,hwmods = "epwmss2";
- 			#address-cells = <1>;
- 			#size-cells = <1>;
--			//status = "disabled";
-+			status = "disabled";
- 			ranges = <0x48304100 0x48304100 0x80   /* ECAP */
- 				  0x48304180 0x48304180 0x80   /* EQEP */
- 				  0x48304200 0x48304200 0x80>; /* EHRPWM */
-@@ -545,7 +546,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48304100 0x80>;
- 				ti,hwmods = "ecap2";
--				//status = "disabled";
-+				status = "disabled";
- 			};
- 
- 			ehrpwm2: ehrpwm@48304200 {
-@@ -553,7 +554,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48304200 0x80>;
- 				ti,hwmods = "ehrpwm2";
--				//status = "disabled";
-+				status = "disabled";
- 			};
- 		};
- 
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0093-bone-capes-Adapt-to-new-pwms-setup.patch b/patches/not-capebus/0093-bone-capes-Adapt-to-new-pwms-setup.patch
deleted file mode 100644
index 979e66fc8cc7981006d7d68dde9556bb70579182..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0093-bone-capes-Adapt-to-new-pwms-setup.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From e0875dd1da7e33be1e806ba768865ad1ff45d719 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 30 Jan 2013 16:28:59 +0200
-Subject: [PATCH 93/98] bone-capes: Adapt to new pwms setup
-
----
- firmware/capes/BB-BONE-LCD7-01-00A2.dts  |    1 +
- firmware/capes/cape-bone-geiger-00A0.dts |    4 ++--
- firmware/capes/cape-bone-lcd3-00A2.dts   |   19 +++++++++++++++----
- 3 files changed, 18 insertions(+), 6 deletions(-)
-
-diff --git a/firmware/capes/BB-BONE-LCD7-01-00A2.dts b/firmware/capes/BB-BONE-LCD7-01-00A2.dts
-index 070c02f..e896aea 100644
---- a/firmware/capes/BB-BONE-LCD7-01-00A2.dts
-+++ b/firmware/capes/BB-BONE-LCD7-01-00A2.dts
-@@ -83,6 +83,7 @@
- 				compatible      = "pwm-backlight";
- 				pinctrl-names   = "default";
- 				pinctrl-0       = <&pwm_bl_pins>;
-+				status = "okay";
- 
- 				pwms = <&ehrpwm1 0 500000 0>;
- 				pwm-names = "LCD7";
-diff --git a/firmware/capes/cape-bone-geiger-00A0.dts b/firmware/capes/cape-bone-geiger-00A0.dts
-index a37d83f..0ecb67e 100644
---- a/firmware/capes/cape-bone-geiger-00A0.dts
-+++ b/firmware/capes/cape-bone-geiger-00A0.dts
-@@ -36,14 +36,14 @@
- 		};
- 	};
- 
--	fragment@2 {
-+	fragment@1 {
- 		target = <&epwmss1>;
- 		__overlay__ {
- 			status = "okay";
- 		};
- 	};
- 
--	fragment@1 {
-+	fragment@2 {
- 		target = <&ehrpwm1>;
- 		__overlay__ {
- 			status = "okay";
-diff --git a/firmware/capes/cape-bone-lcd3-00A2.dts b/firmware/capes/cape-bone-lcd3-00A2.dts
-index 1d13169..b8e4d75 100644
---- a/firmware/capes/cape-bone-lcd3-00A2.dts
-+++ b/firmware/capes/cape-bone-lcd3-00A2.dts
-@@ -69,6 +69,20 @@
- 	};
- 
- 	fragment@1 {
-+		target = <&epwmss1>;
-+		__overlay__ {
-+			status = "okay";
-+		};
-+	};
-+
-+	fragment@2 {
-+		target = <&ehrpwm1>;
-+		__overlay__ {
-+			status = "okay";
-+		};
-+	};
-+
-+	fragment@3 {
- 		target = <&ocp>;
- 
- 		__overlay__ {
-@@ -77,10 +91,6 @@
- 			#address-cells = <1>;
- 			#size-cells = <1>;
- 
--			ehrpwm1 {
--				status = "okay";
--			};
--
- 			backlight {
- 				compatible      = "pwm-backlight";
- 				pinctrl-names   = "default";
-@@ -90,6 +100,7 @@
- 				pwm-names = "LCD3";
- 				brightness-levels = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100>;
- 				default-brightness-level = <50>; /* index to the array above */
-+				status = "okay";
- 			};
- 
- 			tscadc {
--- 
-1.7.10.4
-
diff --git a/patches/not-capebus/0094-tilcdc-introduce-panel-tfp410-power-down-gpio-contro.patch b/patches/not-capebus/0094-tilcdc-introduce-panel-tfp410-power-down-gpio-contro.patch
deleted file mode 100644
index e1397d46288d2e04e45455412ae2131242bc07e8..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0094-tilcdc-introduce-panel-tfp410-power-down-gpio-contro.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From 9ce6b132ab9f7fe73e2d3d0b93bec4b7ae905ca5 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 30 Jan 2013 18:15:57 +0200
-Subject: [PATCH 94/98] tilcdc: introduce panel & tfp410 power down gpio
- control
-
-Introduce power down GPIO support for panels and tfp410.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/gpu/drm/tilcdc/tilcdc_panel.c  | 26 +++++++++++++++++++++++++-
- drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 23 +++++++++++++++++------
- 2 files changed, 42 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
-index d1463f5..f4b794d 100644
---- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
-@@ -21,6 +21,7 @@
- #include <video/display_timing.h>
- #include <video/of_display_timing.h>
- #include <video/videomode.h>
-+#include <linux/of_gpio.h>
- 
- #include "tilcdc_drv.h"
- 
-@@ -29,6 +30,7 @@ struct panel_module {
- 	struct tilcdc_panel_info *info;
- 	struct display_timings *timings;
- 	struct backlight_device *backlight;
-+	int gpio;
- };
- #define to_panel_module(x) container_of(x, struct panel_module, base)
- 
-@@ -359,9 +361,10 @@ static int panel_probe(struct platform_device *pdev)
- 	struct panel_module *panel_mod;
- 	struct tilcdc_module *mod;
- 	struct pinctrl *pinctrl;
-+	enum of_gpio_flags ofgpioflags;
-+	unsigned long gpioflags;
- 	int ret = -EINVAL;
- 
--
- 	/* bail out early if no DT data: */
- 	if (!node) {
- 		dev_err(&pdev->dev, "device-tree data is missing\n");
-@@ -397,6 +400,27 @@ static int panel_probe(struct platform_device *pdev)
- 	if (panel_mod->backlight)
- 		dev_info(&pdev->dev, "found backlight\n");
- 
-+	panel_mod->gpio = of_get_named_gpio_flags(pdev->dev.of_node, "ti,power-gpio",
-+                       0, &ofgpioflags);
-+	if (IS_ERR_VALUE(panel_mod->gpio)) {
-+		dev_warn(&pdev->dev, "panel: No power control GPIO\n");
-+	} else {
-+		gpioflags = GPIOF_DIR_OUT;
-+		if (ofgpioflags & OF_GPIO_ACTIVE_LOW) {
-+			gpioflags |= GPIOF_INIT_LOW;
-+			dev_info(&pdev->dev, "Power GPIO active low, initial state set to low\n");
-+		} else {
-+			gpioflags |= GPIOF_INIT_HIGH;
-+			dev_info(&pdev->dev, "Power GPIO active high, initial state set to high\n");
-+		}
-+		ret = devm_gpio_request_one(&pdev->dev, panel_mod->gpio,
-+				gpioflags, "panel:PDN");
-+		if (ret != 0) {
-+			dev_err(&pdev->dev, "Failed to request power gpio\n");
-+			goto fail;
-+		}
-+	}
-+
- 	return 0;
- 
- fail:
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
-index 10444ee..c9cd8f1 100644
---- a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
-@@ -329,6 +329,8 @@ static int tfp410_probe(struct platform_device *pdev)
- 	struct tilcdc_module *mod;
- 	struct pinctrl *pinctrl;
- 	uint32_t i2c_phandle;
-+	enum of_gpio_flags ofgpioflags;
-+	unsigned long gpioflags;
- 	int ret = -EINVAL;
- 
- 	/* bail out early if no DT data: */
-@@ -368,14 +370,23 @@ static int tfp410_probe(struct platform_device *pdev)
- 
- 	of_node_put(i2c_node);
- 
--	tfp410_mod->gpio = of_get_named_gpio_flags(node, "powerdn-gpio",
--			0, NULL);
-+	tfp410_mod->gpio = of_get_named_gpio_flags(pdev->dev.of_node, "ti,power-gpio",
-+                       0, &ofgpioflags);
- 	if (IS_ERR_VALUE(tfp410_mod->gpio)) {
--		dev_warn(&pdev->dev, "No power down GPIO\n");
-+		dev_warn(&pdev->dev, "tftp410: No power control GPIO\n");
- 	} else {
--		ret = gpio_request(tfp410_mod->gpio, "DVI_PDn");
--		if (ret) {
--			dev_err(&pdev->dev, "could not get DVI_PDn gpio\n");
-+		gpioflags = GPIOF_DIR_OUT;
-+		if (ofgpioflags & OF_GPIO_ACTIVE_LOW) {
-+			gpioflags |= GPIOF_INIT_LOW;
-+			dev_info(&pdev->dev, "Power GPIO active low, initial state set to low\n");
-+		} else {
-+			gpioflags |= GPIOF_INIT_HIGH;
-+			dev_info(&pdev->dev, "Power GPIO active high, initial state set to high\n");
-+		}
-+		ret = devm_gpio_request_one(&pdev->dev, tfp410_mod->gpio,
-+				gpioflags, "tfp410:PDN");
-+		if (ret != 0) {
-+			dev_err(&pdev->dev, "Failed to request power gpio\n");
- 			goto fail;
- 		}
- 	}
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0095-bone-dvi-Update-to-new-style-tilcdc-bindings.patch b/patches/not-capebus/0095-bone-dvi-Update-to-new-style-tilcdc-bindings.patch
deleted file mode 100644
index 8adbbb9f65cf63d1e372f98c1f4a441a3d2d923a..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0095-bone-dvi-Update-to-new-style-tilcdc-bindings.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-From f9bed1a59cf538accd6bde7b01840e77279c00ed Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 30 Jan 2013 18:17:16 +0200
-Subject: [PATCH 95/98] bone-dvi: Update to new style tilcdc bindings
-
-Binding differences and place the GPIOs to the panels.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/capes/cape-bone-dvi-00A0.dts | 8 +++++---
- firmware/capes/cape-bone-dvi-00A1.dts | 8 +++++---
- firmware/capes/cape-bone-dvi-00A2.dts | 8 +++++---
- 3 files changed, 15 insertions(+), 9 deletions(-)
-
-diff --git a/firmware/capes/cape-bone-dvi-00A0.dts b/firmware/capes/cape-bone-dvi-00A0.dts
-index bc3d926..293b655 100644
---- a/firmware/capes/cape-bone-dvi-00A0.dts
-+++ b/firmware/capes/cape-bone-dvi-00A0.dts
-@@ -88,6 +88,7 @@
- 				compatible = "tilcdc,panel";
- 				pinctrl-names = "default";
- 				pinctrl-0 = <&bone_dvi_cape_dvi_00A0_pins>;
-+				ti,power-gpio = <&gpio1 7 0x0>;
- 				panel-info {
- 					ac-bias           = <255>;
- 					ac-bias-intrpt    = <0>;
-@@ -97,8 +98,6 @@
- 					tft-alt-mode      = <0>;
- 					stn-565-mode      = <0>;
- 					mono-8bit-mode    = <0>;
--					invert-line-clock = <1>;
--					invert-frm-clock  = <1>;
- 					sync-edge         = <0>;
- 					sync-ctrl         = <1>;
- 					raster-order      = <0>;
-@@ -116,6 +115,8 @@
- 						hsync-len       = <32>;
- 						vsync-len       = <4>;
- 						clock-frequency = <56000000>;
-+						hsync-active	= <0>;
-+						vsync-active	= <0>;
- 					};
- 					/* 1280 x 720 @ 60 Hz  Reduced blanking VESA CVT 0.92M9-R */
- 					timing1: 1280x720-60 {
-@@ -128,6 +129,8 @@
- 						vsync-len       = <5>;
- 						vback-porch     = <13>;
- 						clock-frequency = <64000000>;
-+						hsync-active	= <0>;
-+						vsync-active	= <0>;
- 					};
- 
- 				};
-@@ -139,7 +142,6 @@
- 				interrupt-parent = <&intc>;
- 				interrupts = <36>;
- 				ti,hwmods = "lcdc";
--				ti,power-gpio = <&gpio1 7 0x0>;
- 			};
- 
- 		};
-diff --git a/firmware/capes/cape-bone-dvi-00A1.dts b/firmware/capes/cape-bone-dvi-00A1.dts
-index d36415f..e706b93 100644
---- a/firmware/capes/cape-bone-dvi-00A1.dts
-+++ b/firmware/capes/cape-bone-dvi-00A1.dts
-@@ -98,6 +98,7 @@
- 				compatible = "tilcdc,panel";
- 				pinctrl-names = "default";
- 				pinctrl-0 = <&bone_dvi_cape_dvi_00A1_pins>;
-+				ti,power-gpio = <&gpio1 7 0x0>;
- 				panel-info {
- 					ac-bias           = <255>;
- 					ac-bias-intrpt    = <0>;
-@@ -107,8 +108,6 @@
- 					tft-alt-mode      = <0>;
- 					stn-565-mode      = <0>;
- 					mono-8bit-mode    = <0>;
--					invert-line-clock = <1>;
--					invert-frm-clock  = <1>;
- 					sync-edge         = <0>;
- 					sync-ctrl         = <1>;
- 					raster-order      = <0>;
-@@ -126,6 +125,8 @@
- 						hsync-len       = <32>;
- 						vsync-len       = <4>;
- 						clock-frequency = <56000000>;
-+						hsync-active	= <0>;
-+						vsync-active	= <0>;
- 					};
- 					/* 1280 x 720 @ 60 Hz  Reduced blanking VESA CVT 0.92M9-R */
- 					timing1: 1280x720-60 {
-@@ -138,6 +139,8 @@
- 						vsync-len       = <5>;
- 						vback-porch     = <13>;
- 						clock-frequency = <64000000>;
-+						hsync-active	= <0>;
-+						vsync-active	= <0>;
- 					};
- 
- 				};
-@@ -149,7 +152,6 @@
- 				interrupt-parent = <&intc>;
- 				interrupts = <36>;
- 				ti,hwmods = "lcdc";
--				ti,power-gpio = <&gpio1 7 0x0>;
- 			};
- 
- 		};
-diff --git a/firmware/capes/cape-bone-dvi-00A2.dts b/firmware/capes/cape-bone-dvi-00A2.dts
-index 54fba3f..1dbaef8 100644
---- a/firmware/capes/cape-bone-dvi-00A2.dts
-+++ b/firmware/capes/cape-bone-dvi-00A2.dts
-@@ -98,6 +98,7 @@
- 				compatible = "tilcdc,panel";
- 				pinctrl-names = "default";
- 				pinctrl-0 = <&bone_dvi_cape_dvi_00A2_pins>;
-+				ti,power-gpio = <&gpio1 31 0x0>;
- 				panel-info {
- 					ac-bias           = <255>;
- 					ac-bias-intrpt    = <0>;
-@@ -107,8 +108,6 @@
- 					tft-alt-mode      = <0>;
- 					stn-565-mode      = <0>;
- 					mono-8bit-mode    = <0>;
--					invert-line-clock = <1>;
--					invert-frm-clock  = <1>;
- 					sync-edge         = <0>;
- 					sync-ctrl         = <1>;
- 					raster-order      = <0>;
-@@ -126,6 +125,8 @@
- 						hsync-len       = <32>;
- 						vsync-len       = <4>;
- 						clock-frequency = <56000000>;
-+						hsync-active	= <0>;
-+						vsync-active	= <0>;
- 					};
- 					/* 1280 x 720 @ 60 Hz  Reduced blanking VESA CVT 0.92M9-R */
- 					timing1: 1280x720-60 {
-@@ -138,6 +139,8 @@
- 						vsync-len       = <5>;
- 						vback-porch     = <13>;
- 						clock-frequency = <64000000>;
-+						hsync-active	= <0>;
-+						vsync-active	= <0>;
- 					};
- 
- 				};
-@@ -149,7 +152,6 @@
- 				interrupt-parent = <&intc>;
- 				interrupts = <36>;
- 				ti,hwmods = "lcdc";
--				ti,power-gpio = <&gpio1 31 0x0>;
- 			};
- 
- 		};
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0096-tilcdc-tfp410-Rework-power-down-GPIO-logic.patch b/patches/not-capebus/0096-tilcdc-tfp410-Rework-power-down-GPIO-logic.patch
deleted file mode 100644
index 39d3056ea509b6550d01f78758b033b597f63800..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0096-tilcdc-tfp410-Rework-power-down-GPIO-logic.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From bd7656fe61ac51cabeb87b76383a4913d4939ee7 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 30 Jan 2013 20:05:05 +0200
-Subject: [PATCH 96/98] tilcdc-tfp410: Rework power down GPIO logic
-
-Rework power down GPIO logic to be configurable.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 25 +++++++++++++++----------
- 1 file changed, 15 insertions(+), 10 deletions(-)
-
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
-index c9cd8f1..7065dfa 100644
---- a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
-@@ -27,6 +27,7 @@
- struct tfp410_module {
- 	struct tilcdc_module base;
- 	struct i2c_adapter *i2c;
-+	enum of_gpio_flags ofgpioflags;
- 	int gpio;
- };
- #define to_tfp410_module(x) container_of(x, struct tfp410_module, base)
-@@ -66,17 +67,22 @@ static void tfp410_encoder_destroy(struct drm_encoder *encoder)
- static void tfp410_encoder_dpms(struct drm_encoder *encoder, int mode)
- {
- 	struct tfp410_encoder *tfp410_encoder = to_tfp410_encoder(encoder);
-+	int state;
- 
- 	if (tfp410_encoder->dpms == mode)
- 		return;
- 
--	if (mode == DRM_MODE_DPMS_ON) {
--		DBG("Power on");
--		gpio_direction_output(tfp410_encoder->mod->gpio, 1);
--	} else {
--		DBG("Power off");
--		gpio_direction_output(tfp410_encoder->mod->gpio, 0);
--	}
-+	if (IS_ERR_VALUE(tfp410_encoder->mod->gpio))
-+		return;
-+
-+	state = mode == DRM_MODE_DPMS_ON;
-+	if (tfp410_encoder->mod->ofgpioflags & OF_GPIO_ACTIVE_LOW)
-+		state = !state;
-+
-+	pr_debug("%s: dpms %d, gpio-state %d\n", __func__,
-+			mode == DRM_MODE_DPMS_ON, state);
-+
-+	gpio_direction_output(tfp410_encoder->mod->gpio, state);
- 
- 	tfp410_encoder->dpms = mode;
- }
-@@ -329,7 +335,6 @@ static int tfp410_probe(struct platform_device *pdev)
- 	struct tilcdc_module *mod;
- 	struct pinctrl *pinctrl;
- 	uint32_t i2c_phandle;
--	enum of_gpio_flags ofgpioflags;
- 	unsigned long gpioflags;
- 	int ret = -EINVAL;
- 
-@@ -371,12 +376,12 @@ static int tfp410_probe(struct platform_device *pdev)
- 	of_node_put(i2c_node);
- 
- 	tfp410_mod->gpio = of_get_named_gpio_flags(pdev->dev.of_node, "ti,power-gpio",
--                       0, &ofgpioflags);
-+                       0, &tfp410_mod->ofgpioflags);
- 	if (IS_ERR_VALUE(tfp410_mod->gpio)) {
- 		dev_warn(&pdev->dev, "tftp410: No power control GPIO\n");
- 	} else {
- 		gpioflags = GPIOF_DIR_OUT;
--		if (ofgpioflags & OF_GPIO_ACTIVE_LOW) {
-+		if (tfp410_mod->ofgpioflags & OF_GPIO_ACTIVE_LOW) {
- 			gpioflags |= GPIOF_INIT_LOW;
- 			dev_info(&pdev->dev, "Power GPIO active low, initial state set to low\n");
- 		} else {
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0097-tilcdc-Add-reduced-blanking-mode-checks.patch b/patches/not-capebus/0097-tilcdc-Add-reduced-blanking-mode-checks.patch
deleted file mode 100644
index 848dbf7d475af1bef91dc3c1677a4417732701c8..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0097-tilcdc-Add-reduced-blanking-mode-checks.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From c7b9e63f87be960d1e248a3527884f4940d5e47b Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 30 Jan 2013 20:09:11 +0200
-Subject: [PATCH 97/98] tilcdc: Add reduced blanking mode checks
-
-The driver doesn't support (yet?) non-reduced blanking mode.
-So by default disable any non-reduced blanking modes, and add a switch
-to enable them in the future.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 11 +++++++++++
- drivers/gpu/drm/tilcdc/tilcdc_drv.c  |  5 ++++-
- drivers/gpu/drm/tilcdc/tilcdc_drv.h  |  1 +
- 3 files changed, 16 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
-index 5dd3c7d..628d9aa 100644
---- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
-@@ -422,6 +422,7 @@ int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode)
- {
- 	struct tilcdc_drm_private *priv = crtc->dev->dev_private;
- 	unsigned int bandwidth;
-+	int rb;
- 
- 	if (mode->hdisplay > tilcdc_crtc_max_width(crtc))
- 		return MODE_VIRTUAL_X;
-@@ -438,6 +439,16 @@ int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode)
- 	if (bandwidth > priv->max_bandwidth)
- 		return MODE_BAD;
- 
-+	if (priv->allow_non_rblank == 0) {
-+		/* we only support reduced blanking modes */
-+		rb = (mode->htotal - mode->hdisplay == 160) &&
-+		       (mode->hsync_end - mode->hdisplay == 80) &&
-+		       (mode->hsync_end - mode->hsync_start == 32) &&
-+		       (mode->vsync_start - mode->vdisplay == 3);
-+		if (!rb)
-+			return MODE_BAD;
-+	}
-+
- 	return MODE_OK;
- }
- 
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
-index 3ffa2e5..0fe14ea 100644
---- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
-@@ -235,9 +235,12 @@ static int tilcdc_load(struct drm_device *dev, unsigned long flags)
- 	}
- #endif
- 
--	if (of_property_read_u32(node, "max-bandwidth", &priv->max_bandwidth))
-+	if (of_property_read_u32(node, "ti,max-bandwidth", &priv->max_bandwidth))
- 		priv->max_bandwidth = 1280 * 1024 * 60;
- 
-+	priv->allow_non_rblank = of_property_read_bool(node,
-+			"ti,allow-non-reduced-blanking-modes");
-+
- 	pm_runtime_enable(dev->dev);
- 
- 	/* Determine LCD IP Version */
-diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
-index 8242b5a..c858f73 100644
---- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h
-+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
-@@ -43,6 +43,7 @@ struct tilcdc_drm_private {
- 
- 	/* don't attempt resolutions w/ higher W * H * Hz: */
- 	uint32_t max_bandwidth;
-+	int allow_non_rblank;	/* ATM we don't support non reduced blank modes */
- 
- 	/* register contents saved across suspend/resume: */
- 	u32 saved_register[12];
--- 
-1.8.1
-
diff --git a/patches/not-capebus/0098-cape-dvi-Switch-all-DVI-capes-to-using-the-TFTP410-p.patch b/patches/not-capebus/0098-cape-dvi-Switch-all-DVI-capes-to-using-the-TFTP410-p.patch
deleted file mode 100644
index 9fbf44aaf609db5a8ca4fa4f0ca362ea67d4b6e1..0000000000000000000000000000000000000000
--- a/patches/not-capebus/0098-cape-dvi-Switch-all-DVI-capes-to-using-the-TFTP410-p.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-From e9e2558368eae54ae6c1a9441c98c58e31c96d80 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Wed, 30 Jan 2013 20:11:05 +0200
-Subject: [PATCH 98/98] cape-dvi: Switch all DVI capes to using the TFTP410
- panel
-
-Now that TFP410 works reasonably well switch to using it.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
----
- firmware/capes/cape-bone-dvi-00A0.dts | 50 +++--------------------------------
- firmware/capes/cape-bone-dvi-00A1.dts | 50 +++--------------------------------
- firmware/capes/cape-bone-dvi-00A2.dts | 50 +++--------------------------------
- 3 files changed, 9 insertions(+), 141 deletions(-)
-
-diff --git a/firmware/capes/cape-bone-dvi-00A0.dts b/firmware/capes/cape-bone-dvi-00A0.dts
-index 293b655..92fc6be 100644
---- a/firmware/capes/cape-bone-dvi-00A0.dts
-+++ b/firmware/capes/cape-bone-dvi-00A0.dts
-@@ -83,57 +83,13 @@
- 				};
- 			};
- 
--			/* Settings for DVI 1024x768@60 */
-+			/* use the DVI panel now */
- 			panel {
--				compatible = "tilcdc,panel";
-+				compatible = "tilcdc,tfp410";
- 				pinctrl-names = "default";
- 				pinctrl-0 = <&bone_dvi_cape_dvi_00A0_pins>;
- 				ti,power-gpio = <&gpio1 7 0x0>;
--				panel-info {
--					ac-bias           = <255>;
--					ac-bias-intrpt    = <0>;
--					dma-burst-sz      = <16>;
--					bpp               = <16>;
--					fdd               = <0x80>;
--					tft-alt-mode      = <0>;
--					stn-565-mode      = <0>;
--					mono-8bit-mode    = <0>;
--					sync-edge         = <0>;
--					sync-ctrl         = <1>;
--					raster-order      = <0>;
--					fifo-th           = <0>;
--				};
--				display-timings {
--					native-mode = <&timing1>;
--					timing0: 1024x768 {
--						hactive         = <1024>;
--						vactive         = <768>;
--						hback-porch     = <80>;
--						hfront-porch    = <48>;
--						vback-porch     = <15>;
--						vfront-porch    = <3>;
--						hsync-len       = <32>;
--						vsync-len       = <4>;
--						clock-frequency = <56000000>;
--						hsync-active	= <0>;
--						vsync-active	= <0>;
--					};
--					/* 1280 x 720 @ 60 Hz  Reduced blanking VESA CVT 0.92M9-R */
--					timing1: 1280x720-60 {
--						hactive         = <1280>;
--						hfront-porch    = <48>;
--						hsync-len       = <32>;
--						hback-porch     = <80>;
--						vactive         = <720>;
--						vfront-porch    = <3>;
--						vsync-len       = <5>;
--						vback-porch     = <13>;
--						clock-frequency = <64000000>;
--						hsync-active	= <0>;
--						vsync-active	= <0>;
--					};
--
--				};
-+				i2c = <&i2c2>;
- 			};
- 
- 			fb {
-diff --git a/firmware/capes/cape-bone-dvi-00A1.dts b/firmware/capes/cape-bone-dvi-00A1.dts
-index e706b93..ed9099c 100644
---- a/firmware/capes/cape-bone-dvi-00A1.dts
-+++ b/firmware/capes/cape-bone-dvi-00A1.dts
-@@ -93,57 +93,13 @@
- 				};
- 			};
- 
--			/* Settings for DVI 1024x768@60 */
-+			/* use the DVI panel now */
- 			panel {
--				compatible = "tilcdc,panel";
-+				compatible = "tilcdc,tfp410";
- 				pinctrl-names = "default";
- 				pinctrl-0 = <&bone_dvi_cape_dvi_00A1_pins>;
- 				ti,power-gpio = <&gpio1 7 0x0>;
--				panel-info {
--					ac-bias           = <255>;
--					ac-bias-intrpt    = <0>;
--					dma-burst-sz      = <16>;
--					bpp               = <16>;
--					fdd               = <0x80>;
--					tft-alt-mode      = <0>;
--					stn-565-mode      = <0>;
--					mono-8bit-mode    = <0>;
--					sync-edge         = <0>;
--					sync-ctrl         = <1>;
--					raster-order      = <0>;
--					fifo-th           = <0>;
--				};
--				display-timings {
--					native-mode = <&timing1>;
--					timing0: 1024x768 {
--						hactive         = <1024>;
--						vactive         = <768>;
--						hback-porch     = <80>;
--						hfront-porch    = <48>;
--						vback-porch     = <15>;
--						vfront-porch    = <3>;
--						hsync-len       = <32>;
--						vsync-len       = <4>;
--						clock-frequency = <56000000>;
--						hsync-active	= <0>;
--						vsync-active	= <0>;
--					};
--					/* 1280 x 720 @ 60 Hz  Reduced blanking VESA CVT 0.92M9-R */
--					timing1: 1280x720-60 {
--						hactive         = <1280>;
--						hfront-porch    = <48>;
--						hsync-len       = <32>;
--						hback-porch     = <80>;
--						vactive         = <720>;
--						vfront-porch    = <3>;
--						vsync-len       = <5>;
--						vback-porch     = <13>;
--						clock-frequency = <64000000>;
--						hsync-active	= <0>;
--						vsync-active	= <0>;
--					};
--
--				};
-+				i2c = <&i2c2>;
- 			};
- 
- 			fb {
-diff --git a/firmware/capes/cape-bone-dvi-00A2.dts b/firmware/capes/cape-bone-dvi-00A2.dts
-index 1dbaef8..fb2dcf0 100644
---- a/firmware/capes/cape-bone-dvi-00A2.dts
-+++ b/firmware/capes/cape-bone-dvi-00A2.dts
-@@ -93,57 +93,13 @@
- 				};
- 			};
- 
--			/* Settings for DVI 1024x768@60 */
-+			/* use the DVI panel now */
- 			panel {
--				compatible = "tilcdc,panel";
-+				compatible = "tilcdc,tfp410";
- 				pinctrl-names = "default";
- 				pinctrl-0 = <&bone_dvi_cape_dvi_00A2_pins>;
- 				ti,power-gpio = <&gpio1 31 0x0>;
--				panel-info {
--					ac-bias           = <255>;
--					ac-bias-intrpt    = <0>;
--					dma-burst-sz      = <16>;
--					bpp               = <16>;
--					fdd               = <0x80>;
--					tft-alt-mode      = <0>;
--					stn-565-mode      = <0>;
--					mono-8bit-mode    = <0>;
--					sync-edge         = <0>;
--					sync-ctrl         = <1>;
--					raster-order      = <0>;
--					fifo-th           = <0>;
--				};
--				display-timings {
--					native-mode = <&timing1>;
--					timing0: 1024x768 {
--						hactive         = <1024>;
--						vactive         = <768>;
--						hback-porch     = <80>;
--						hfront-porch    = <48>;
--						vback-porch     = <15>;
--						vfront-porch    = <3>;
--						hsync-len       = <32>;
--						vsync-len       = <4>;
--						clock-frequency = <56000000>;
--						hsync-active	= <0>;
--						vsync-active	= <0>;
--					};
--					/* 1280 x 720 @ 60 Hz  Reduced blanking VESA CVT 0.92M9-R */
--					timing1: 1280x720-60 {
--						hactive         = <1280>;
--						hfront-porch    = <48>;
--						hsync-len       = <32>;
--						hback-porch     = <80>;
--						vactive         = <720>;
--						vfront-porch    = <3>;
--						vsync-len       = <5>;
--						vback-porch     = <13>;
--						clock-frequency = <64000000>;
--						hsync-active	= <0>;
--						vsync-active	= <0>;
--					};
--
--				};
-+				i2c = <&i2c2>;
- 			};
- 
- 			fb {
--- 
-1.8.1
-
diff --git a/patches/pinctrl/0001-i2c-pinctrl-ify-i2c-omap.c.patch b/patches/pinctrl/0001-i2c-pinctrl-ify-i2c-omap.c.patch
deleted file mode 100644
index c693a518b07b550e227d26c57c810c041e0f2ebb..0000000000000000000000000000000000000000
--- a/patches/pinctrl/0001-i2c-pinctrl-ify-i2c-omap.c.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From b5577375fd561fed476af07616489d4898cf6aa3 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 14 Sep 2012 17:51:11 +0300
-Subject: [PATCH 1/4] i2c: pinctrl-ify i2c-omap.c
-
-Conflicts:
-	drivers/i2c/busses/i2c-omap.c
----
- drivers/i2c/busses/i2c-omap.c |    9 +++++++++
- 1 files changed, 9 insertions(+), 0 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
-index 20d41bf..2f37824 100644
---- a/drivers/i2c/busses/i2c-omap.c
-+++ b/drivers/i2c/busses/i2c-omap.c
-@@ -44,6 +44,7 @@
- #include <linux/i2c-omap.h>
- #include <linux/pm_runtime.h>
- #include <linux/pinctrl/consumer.h>
-+#include <linux/err.h>
- 
- /* I2C controller revisions */
- #define OMAP_I2C_OMAP1_REV_2		0x20
-@@ -1083,6 +1084,7 @@ omap_i2c_probe(struct platform_device *pdev)
- 	int r;
- 	u32 rev;
- 	u16 minor, major, scheme;
-+	struct pinctrl *pinctrl;
- 
- 	/* NOTE: driver uses the static register mapping */
- 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-@@ -1252,6 +1254,13 @@ omap_i2c_probe(struct platform_device *pdev)
- 
- 	of_i2c_register_devices(adap);
- 
-+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-+	if (IS_ERR(pinctrl))
-+		dev_warn(dev->dev, "unable to select pin group\n");
-+
-+	/* dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", adap->nr,
-+		 dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed); */
-+
- 	pm_runtime_mark_last_busy(dev->dev);
- 	pm_runtime_put_autosuspend(dev->dev);
- 
--- 
-1.7.7.6
-
diff --git a/patches/pinctrl/0002-arm-dts-AM33XX-Configure-pinmuxs-for-user-leds-contr.patch b/patches/pinctrl/0002-arm-dts-AM33XX-Configure-pinmuxs-for-user-leds-contr.patch
deleted file mode 100644
index 7dcb2a290bc5ae95fb3e9f3e8465d5d278e4776e..0000000000000000000000000000000000000000
--- a/patches/pinctrl/0002-arm-dts-AM33XX-Configure-pinmuxs-for-user-leds-contr.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 08c1439309a10ddcfce4b0ab6a330b99c0eba284 Mon Sep 17 00:00:00 2001
-From: "AnilKumar, Chimata" <anilkumar@ti.com>
-Date: Fri, 31 Aug 2012 09:29:18 +0000
-Subject: [PATCH 2/4] arm/dts: AM33XX: Configure pinmuxs for user leds control
- on Bone
-
-Adds GPIO pinctrl nodes to am3358_pinmux master node to control
-user leds (USR0, USR1, USR2 and USR3) present on BeagleBone.
-
-Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
----
- arch/arm/boot/dts/am335x-bone.dts |   38 +++++++++++++++++++++++++++++++++++++
- 1 files changed, 38 insertions(+), 0 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
-index 1169213..ecc9b2e 100644
---- a/arch/arm/boot/dts/am335x-bone.dts
-+++ b/arch/arm/boot/dts/am335x-bone.dts
-@@ -56,6 +56,14 @@
- 				0x090 0x37	/* gpmc_advn_ale.gpio2_2, INPUT_PULLUP | MODE7 */
- 			>;
- 		};
-+		userled_pins: pinmux_userled_pins {
-+			pinctrl-single,pins = <
-+				0x54 0x7	/* gpmc_a5.gpio1_21, OUTPUT | MODE7 */
-+				0x58 0x17	/* gpmc_a6.gpio1_22, OUTPUT_PULLUP | MODE7 */
-+				0x5c 0x7	/* gpmc_a7.gpio1_23, OUTPUT | MODE7 */
-+				0x60 0x17	/* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */
-+			>;
-+		};
- 	};
- 
- 	ocp {
-@@ -63,6 +71,36 @@
- 			status = "okay";
- 		};
- 
-+		gpio-leds {
-+			compatible = "gpio-leds";
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&userled_pins>;
-+
-+			led0 {
-+				label = "beaglebone:green:usr0";
-+				gpios = <&gpio2 21 0>;
-+				default-state = "off";
-+			};
-+
-+			led1 {
-+				label = "beaglebone:green:usr1";
-+				gpios = <&gpio2 22 0>;
-+				default-state = "off";
-+			};
-+
-+			led2 {
-+				label = "beaglebone:green:usr2";
-+				gpios = <&gpio2 23 0>;
-+				default-state = "off";
-+			};
-+
-+			led3 {
-+				label = "beaglebone:green:usr3";
-+				gpios = <&gpio2 24 0>;
-+				default-state = "off";
-+			};
-+		};
-+
- 		i2c1: i2c@44e0b000 {
- 			status = "okay";
- 			clock-frequency = <400000>;
--- 
-1.7.7.6
-
diff --git a/patches/pinctrl/0003-beaglebone-DT-set-default-triggers-for-LEDS.patch b/patches/pinctrl/0003-beaglebone-DT-set-default-triggers-for-LEDS.patch
deleted file mode 100644
index 1dba5c9b7f10179a88c27e4b072be9d77a6e7a18..0000000000000000000000000000000000000000
--- a/patches/pinctrl/0003-beaglebone-DT-set-default-triggers-for-LEDS.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From c6fa6b86967f8545bf3219572d841dbe9b7a4a34 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Wed, 5 Sep 2012 09:49:21 +0200
-Subject: [PATCH 3/4] beaglebone DT: set default triggers for LEDS
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- arch/arm/boot/dts/am335x-bone.dts |    2 ++
- 1 files changed, 2 insertions(+), 0 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
-index ecc9b2e..52b2367 100644
---- a/arch/arm/boot/dts/am335x-bone.dts
-+++ b/arch/arm/boot/dts/am335x-bone.dts
-@@ -79,12 +79,14 @@
- 			led0 {
- 				label = "beaglebone:green:usr0";
- 				gpios = <&gpio2 21 0>;
-+				linux,default-trigger = "heartbeat";
- 				default-state = "off";
- 			};
- 
- 			led1 {
- 				label = "beaglebone:green:usr1";
- 				gpios = <&gpio2 22 0>;
-+				linux,default-trigger = "mmc0";
- 				default-state = "off";
- 			};
- 
--- 
-1.7.7.6
-
diff --git a/patches/pinctrl/0004-beaglebone-add-a-cpu-led-trigger.patch b/patches/pinctrl/0004-beaglebone-add-a-cpu-led-trigger.patch
deleted file mode 100644
index d65abe7539afcc431337c4d734e00167161ffb2c..0000000000000000000000000000000000000000
--- a/patches/pinctrl/0004-beaglebone-add-a-cpu-led-trigger.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 6fae722d468d6899d2e4f10248fcab6cc080a8b5 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Mon, 15 Oct 2012 16:53:28 +0200
-Subject: [PATCH 4/4] beaglebone: add a cpu led trigger
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- arch/arm/boot/dts/am335x-bone.dts |    1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
-index 52b2367..ee3f6ca 100644
---- a/arch/arm/boot/dts/am335x-bone.dts
-+++ b/arch/arm/boot/dts/am335x-bone.dts
-@@ -93,6 +93,7 @@
- 			led2 {
- 				label = "beaglebone:green:usr2";
- 				gpios = <&gpio2 23 0>;
-+				linux,default-trigger = "cpu0";
- 				default-state = "off";
- 			};
- 
--- 
-1.7.7.6
-
diff --git a/patches/pru/0001-uio-uio_pruss-port-to-AM33xx.patch b/patches/pru/0001-uio-uio_pruss-port-to-AM33xx.patch
deleted file mode 100644
index d4eba63b3ea709d33c6d4340754b95b9076c832f..0000000000000000000000000000000000000000
--- a/patches/pru/0001-uio-uio_pruss-port-to-AM33xx.patch
+++ /dev/null
@@ -1,193 +0,0 @@
-From 33f30013622e25f7b1aacbfede843331d5182619 Mon Sep 17 00:00:00 2001
-From: Matt Ranostay <mranostay@gmail.com>
-Date: Thu, 17 Jan 2013 16:02:47 -0800
-Subject: [PATCH 1/3] uio: uio_pruss: port to AM33xx
-
-Add ifdefery hacks to only use SRAM on Davinci. This
-needs to be cleaned up with a sane generic SRAM allocator
-(like the DT based driver available that can't be used on
-Davinci which is just starting DT conversion) before it
-can go upstream.
-
-Adds DT, pinctrl, and runtime PM support for use on
-AM33xx.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
-Signed-off-by: Matt Ranostay <mranostay@gmail.com>
----
- drivers/uio/Kconfig     |  4 ++--
- drivers/uio/uio_pruss.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++-
- 2 files changed, 61 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig
-index f56d185..a991a08 100644
---- a/drivers/uio/Kconfig
-+++ b/drivers/uio/Kconfig
-@@ -112,10 +112,10 @@ config UIO_NETX
- 
- config UIO_PRUSS
- 	tristate "Texas Instruments PRUSS driver"
--	depends on ARCH_DAVINCI_DA850
-+	depends on ARCH_DAVINCI_DA850 || SOC_AM33XX
- 	select GENERIC_ALLOCATOR
- 	help
--	  PRUSS driver for OMAPL138/DA850/AM18XX devices
-+	  PRUSS driver for OMAPL138/DA850/AM18XX and AM33XX devices
- 	  PRUSS driver requires user space components, examples and user space
- 	  driver is available from below SVN repo - you may use anonymous login
- 
-diff --git a/drivers/uio/uio_pruss.c b/drivers/uio/uio_pruss.c
-index 6e2ab00..2bb1d7a 100644
---- a/drivers/uio/uio_pruss.c
-+++ b/drivers/uio/uio_pruss.c
-@@ -26,6 +26,11 @@
- #include <linux/dma-mapping.h>
- #include <linux/slab.h>
- #include <linux/genalloc.h>
-+#include <linux/of_address.h>
-+#include <linux/of_device.h>
-+#include <linux/pinctrl/consumer.h>
-+#include <linux/err.h>
-+#include <linux/pm_runtime.h>
- 
- #define DRV_NAME "pruss_uio"
- #define DRV_VERSION "1.0"
-@@ -106,10 +111,12 @@ static void pruss_cleanup(struct platform_device *dev,
- 		dma_free_coherent(&dev->dev, extram_pool_sz, gdev->ddr_vaddr,
- 			gdev->ddr_paddr);
- 	}
-+#ifdef CONFIG_ARCH_DAVINCI_DA850
- 	if (gdev->sram_vaddr)
- 		gen_pool_free(gdev->sram_pool,
- 			      gdev->sram_vaddr,
- 			      sram_pool_sz);
-+#endif
- 	kfree(gdev->info);
- 	clk_put(gdev->pruss_clk);
- 	kfree(gdev);
-@@ -120,8 +127,10 @@ static int pruss_probe(struct platform_device *dev)
- 	struct uio_info *p;
- 	struct uio_pruss_dev *gdev;
- 	struct resource *regs_prussio;
-+	struct resource res;
- 	int ret = -ENODEV, cnt = 0, len;
- 	struct uio_pruss_pdata *pdata = dev->dev.platform_data;
-+	struct pinctrl *pinctrl;
- 
- 	gdev = kzalloc(sizeof(struct uio_pruss_dev), GFP_KERNEL);
- 	if (!gdev)
-@@ -132,6 +141,7 @@ static int pruss_probe(struct platform_device *dev)
- 		kfree(gdev);
- 		return -ENOMEM;
- 	}
-+#ifdef CONFIG_ARCH_DAVINCI_DA850
- 	/* Power on PRU in case its not done as part of boot-loader */
- 	gdev->pruss_clk = clk_get(&dev->dev, "pruss");
- 	if (IS_ERR(gdev->pruss_clk)) {
-@@ -143,6 +153,28 @@ static int pruss_probe(struct platform_device *dev)
- 	} else {
- 		clk_enable(gdev->pruss_clk);
- 	}
-+#endif
-+
-+	if (dev->dev.of_node) {
-+		pm_runtime_enable(&dev->dev);
-+		ret = pm_runtime_get_sync(&dev->dev);
-+		if (IS_ERR_VALUE(ret)) {
-+			dev_err(&dev->dev, "pm_runtime_get_sync() failed\n");
-+			return ret;
-+		}
-+
-+		ret = of_address_to_resource(dev->dev.of_node, 0, &res);
-+		if (IS_ERR_VALUE(ret)) {
-+			dev_err(&dev->dev, "failed to parse DT reg\n");
-+			return ret;
-+		}
-+		regs_prussio = &res;
-+	}
-+
-+	pinctrl = devm_pinctrl_get_select_default(&dev->dev);
-+	if (IS_ERR(pinctrl))
-+		dev_warn(&dev->dev,
-+			"pins are not configured from the driver\n");
- 
- 	regs_prussio = platform_get_resource(dev, IORESOURCE_MEM, 0);
- 	if (!regs_prussio) {
-@@ -157,12 +189,14 @@ static int pruss_probe(struct platform_device *dev)
- 
- 	if (pdata->sram_pool) {
- 		gdev->sram_pool = pdata->sram_pool;
-+#ifdef CONFIG_ARCH_DAVINCI_DA850
- 		gdev->sram_vaddr =
- 			gen_pool_alloc(gdev->sram_pool, sram_pool_sz);
- 		if (!gdev->sram_vaddr) {
- 			dev_err(&dev->dev, "Could not allocate SRAM pool\n");
- 			goto out_free;
- 		}
-+#endif
- 		gdev->sram_paddr =
- 			gen_pool_virt_to_phys(gdev->sram_pool,
- 					      gdev->sram_vaddr);
-@@ -182,7 +216,17 @@ static int pruss_probe(struct platform_device *dev)
- 		goto out_free;
- 	}
- 
--	gdev->pintc_base = pdata->pintc_base;
-+	if (dev->dev.of_node) {
-+		ret = of_property_read_u32(dev->dev.of_node,
-+					   "ti,pintc-offset",
-+					   &gdev->pintc_base);
-+		if (ret < 0) {
-+			dev_err(&dev->dev,
-+				"Can't parse ti,pintc-offset property\n");
-+			goto out_free;
-+		}
-+	} else
-+		gdev->pintc_base = pdata->pintc_base;
- 	gdev->hostirq_start = platform_get_irq(dev, 0);
- 
- 	for (cnt = 0, p = gdev->info; cnt < MAX_PRUSS_EVT; cnt++, p++) {
-@@ -190,6 +234,7 @@ static int pruss_probe(struct platform_device *dev)
- 		p->mem[0].size = resource_size(regs_prussio);
- 		p->mem[0].memtype = UIO_MEM_PHYS;
- 
-+#ifdef CONFIG_ARCH_DAVINCI_DA850
- 		p->mem[1].addr = gdev->sram_paddr;
- 		p->mem[1].size = sram_pool_sz;
- 		p->mem[1].memtype = UIO_MEM_PHYS;
-@@ -197,6 +242,11 @@ static int pruss_probe(struct platform_device *dev)
- 		p->mem[2].addr = gdev->ddr_paddr;
- 		p->mem[2].size = extram_pool_sz;
- 		p->mem[2].memtype = UIO_MEM_PHYS;
-+#else
-+		p->mem[1].addr = gdev->ddr_paddr;
-+		p->mem[1].size = extram_pool_sz;
-+		p->mem[1].memtype = UIO_MEM_PHYS;
-+#endif
- 
- 		p->name = kasprintf(GFP_KERNEL, "pruss_evt%d", cnt);
- 		p->version = DRV_VERSION;
-@@ -228,12 +278,20 @@ static int pruss_remove(struct platform_device *dev)
- 	return 0;
- }
- 
-+static const struct of_device_id pruss_dt_ids[] = {
-+	{ .compatible = "ti,pruss-v1", .data = NULL, },
-+	{ .compatible = "ti,pruss-v2", .data = NULL, },
-+	{},
-+};
-+MODULE_DEVICE_TABLE(of, pruss_dt_ids);
-+
- static struct platform_driver pruss_driver = {
- 	.probe = pruss_probe,
- 	.remove = pruss_remove,
- 	.driver = {
- 		   .name = DRV_NAME,
- 		   .owner = THIS_MODULE,
-+		   .of_match_table = pruss_dt_ids,
- 		   },
- };
- 
--- 
-1.8.1
-
diff --git a/patches/pru/0002-ARM-omap-add-DT-support-for-deasserting-hardware-res.patch b/patches/pru/0002-ARM-omap-add-DT-support-for-deasserting-hardware-res.patch
deleted file mode 100644
index 4df2782618a0e5f73d93cc942b55cf81c3c6b0d0..0000000000000000000000000000000000000000
--- a/patches/pru/0002-ARM-omap-add-DT-support-for-deasserting-hardware-res.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From aac76fcbfe2009c1ce10c3c7e71495375f7f67ec Mon Sep 17 00:00:00 2001
-From: Matt Ranostay <mranostay@gmail.com>
-Date: Thu, 17 Jan 2013 16:02:48 -0800
-Subject: [PATCH 2/3] ARM: omap: add DT support for deasserting hardware reset
- lines
-
- This optional binding extension allows specification of a hwmod
- and associate hardware reset line which should be deasserted for
- the device to be functional.
-
- The implementation works for reference as to the problem that
- exists for utilizing uio_pruss on AM33xx but is suboptimal. The
- problem is that this deassertion occurs before clocks are enabled
- and we are warned that the hard reset failed. Ideally the list of
- rst lines requested to be deasserted would be cached and used within
- the hwmod enable sequencing (instead of it just returning if any
- hardware reset line is asserted).
-
- Signed-off-by: Matt Porter <mporter@ti.com>
- Signed-off-by: Matt Ranostay <mranostay@gmail.com>
----
- .../devicetree/bindings/arm/omap/omap.txt          |  2 ++
- arch/arm/mach-omap2/omap_device.c                  | 25 ++++++++++++++++++++--
- drivers/uio/uio_pruss.c                            |  2 +-
- 3 files changed, 26 insertions(+), 3 deletions(-)
-
-diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
-index d0051a7..3133a4b 100644
---- a/Documentation/devicetree/bindings/arm/omap/omap.txt
-+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
-@@ -21,6 +21,8 @@ Required properties:
- Optional properties:
- - ti,no_idle_on_suspend: When present, it prevents the PM to idle the module
-   during suspend.
-+- ti,deassert-hard-reset: list of hwmod and hardware reset line name pairs
-+  (ascii strings) to be deasserted upon device instantiation.
- 
- 
- Example:
-diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
-index 2036d22..36b5758 100644
---- a/arch/arm/mach-omap2/omap_device.c
-+++ b/arch/arm/mach-omap2/omap_device.c
-@@ -329,8 +329,8 @@ static int omap_device_build_from_dt(struct platform_device *pdev)
- 	struct omap_device *od;
- 	struct omap_hwmod *oh;
- 	struct device_node *node = pdev->dev.of_node;
--	const char *oh_name;
--	int oh_cnt, i, ret = 0;
-+	const char *oh_name, *rst_name;
-+	int oh_cnt, dstr_cnt, i, ret = 0;
- 
- 	oh_cnt = of_property_count_strings(node, "ti,hwmods");
- 	if (!oh_cnt || IS_ERR_VALUE(oh_cnt)) {
-@@ -375,6 +375,27 @@ static int omap_device_build_from_dt(struct platform_device *pdev)
- 	if (of_get_property(node, "ti,no_idle_on_suspend", NULL))
- 		omap_device_disable_idle_on_suspend(pdev);
- 
-+	dstr_cnt =
-+		of_property_count_strings(node, "ti,deassert-hard-reset");
-+	if (dstr_cnt > 0) {
-+		for (i = 0; i < dstr_cnt; i += 2) {
-+			of_property_read_string_index(
-+				node, "ti,deassert-hard-reset", i,
-+				&oh_name);
-+			of_property_read_string_index(
-+				node, "ti,deassert-hard-reset", i+1,
-+				&rst_name);
-+			oh = omap_hwmod_lookup(oh_name);
-+			if (!oh) {
-+				dev_warn(&pdev->dev,
-+				"Cannot parse deassert property for '%s'\n",
-+				oh_name);
-+				break;
-+			}
-+			omap_hwmod_deassert_hardreset(oh, rst_name);
-+		}
-+	}
-+
- 	pdev->dev.pm_domain = &omap_device_pm_domain;
- 
- odbfd_exit1:
-diff --git a/drivers/uio/uio_pruss.c b/drivers/uio/uio_pruss.c
-index 2bb1d7a..563a337 100644
---- a/drivers/uio/uio_pruss.c
-+++ b/drivers/uio/uio_pruss.c
-@@ -187,7 +187,7 @@ static int pruss_probe(struct platform_device *dev)
- 		goto out_free;
- 	}
- 
--	if (pdata->sram_pool) {
-+	if (pdata && pdata->sram_pool) {
- 		gdev->sram_pool = pdata->sram_pool;
- #ifdef CONFIG_ARCH_DAVINCI_DA850
- 		gdev->sram_vaddr =
--- 
-1.8.1
-
diff --git a/patches/pru/0003-ARM-dts-AM33xx-PRUSS-support.patch b/patches/pru/0003-ARM-dts-AM33xx-PRUSS-support.patch
deleted file mode 100644
index 449f62a30d18c23d2c437bb9e28a9503af3c4030..0000000000000000000000000000000000000000
--- a/patches/pru/0003-ARM-dts-AM33xx-PRUSS-support.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From bf0ffc458dc4cc2b9ec0279ef4515f0fe58d340b Mon Sep 17 00:00:00 2001
-From: Matt Ranostay <mranostay@gmail.com>
-Date: Thu, 17 Jan 2013 16:02:49 -0800
-Subject: [PATCH 3/3] ARM: dts: AM33xx PRUSS support
-
-Adds a pruss node and an example of use on Beaglebone.
-
-Signed-off-by: Matt Porter <mporter@ti.com>
-Signed-off-by: Matt Ranostay <mranostay@gmail.com>
----
- arch/arm/boot/dts/am33xx.dtsi |   11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index 797f421..29ab2fd 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -347,6 +347,17 @@
- 			ti,timer-pwm;
- 		};
- 
-+		pruss: pruss@4a300000 {
-+			compatible = "ti,pruss-v2";
-+			ti,hwmods = "pruss";
-+			ti,deassert-hard-reset = "pruss", "pruss";
-+			reg = <0x4a300000 0x080000>;
-+			ti,pintc-offset = <0x20000>;
-+			interrupt-parent = <&intc>;
-+			status = "disabled";
-+			interrupts = <20 21 22 23 24 25 26 27>;
-+		};
-+
- 		rtc@44e3e000 {
- 			compatible = "ti,da830-rtc";
- 			reg = <0x44e3e000 0x1000>;
--- 
-1.7.10.4
-
diff --git a/patches/pwm/0001-pwm_backlight-Add-device-tree-support-for-Low-Thresh.patch b/patches/pwm/0001-pwm_backlight-Add-device-tree-support-for-Low-Thresh.patch
deleted file mode 100644
index 374923082087b1375c2f87f87c188de90bf2a739..0000000000000000000000000000000000000000
--- a/patches/pwm/0001-pwm_backlight-Add-device-tree-support-for-Low-Thresh.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From ab16458d8f7ce133868e9f9cb5c1ceee77d9ce8a Mon Sep 17 00:00:00 2001
-From: "Philip, Avinash" <avinashphilip@ti.com>
-Date: Mon, 16 Jul 2012 14:59:41 +0530
-Subject: [PATCH 1/8] pwm_backlight: Add device tree support for Low Threshold
- Brightness
-
-Low Threshold Brightness should be configured to have a linear relation
-in brightness scale. This patch adds device tree support for low
-threshold brightness as optional one for pwm_backlight.
-
-Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
----
- .../bindings/video/backlight/pwm-backlight.txt      | 21 +++++++++++++++++++++
- drivers/video/backlight/pwm_bl.c                    |  5 +++++
- 2 files changed, 26 insertions(+)
-
-diff --git a/Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt b/Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt
-index 1e4fc72..689c7d2 100644
---- a/Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt
-+++ b/Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt
-@@ -14,6 +14,8 @@ Required properties:
- Optional properties:
-   - pwm-names: a list of names for the PWM devices specified in the
-                "pwms" property (see PWM binding[0])
-+  - low_threshold_brightness: brightness threshold low level. (get linear
-+		 scales in brightness in low end of brightness levels)
- 
- [0]: Documentation/devicetree/bindings/pwm/pwm.txt
- 
-@@ -26,3 +28,22 @@ Example:
- 		brightness-levels = <0 4 8 16 32 64 128 255>;
- 		default-brightness-level = <6>;
- 	};
-+
-+Example for brightness_threshold_level:
-+
-+	backlight {
-+		compatible	= "pwm-backlight";
-+		pwms = <&pwm 0 50000>;
-+
-+		brightness-levels = <0 4 8 16 32 64 128 255>;
-+		default-brightness-level = <6>;
-+		low_threshold_brightness = <50>;
-+	};
-+};
-+Note:
-+Low threshold support is required to have linear brightness scale from
-+0 to max. For some panels, backlight absent on low end of brightness
-+scale. So support for Low Threshold been required. So that the scale of
-+brightness changed from Low Threshold to Max in scales defined in
-+brightness-levels. In this example 20% maximum brightness scale should
-+be required to turn on panel backlight.
-diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
-index 069983c..0c91023 100644
---- a/drivers/video/backlight/pwm_bl.c
-+++ b/drivers/video/backlight/pwm_bl.c
-@@ -143,6 +143,11 @@ static int pwm_backlight_parse_dt(struct device *dev,
- 
- 		data->dft_brightness = value;
- 		data->max_brightness--;
-+
-+		ret = of_property_read_u32(node, "low_threshold_brightness",
-+					   &value);
-+		if (!ret)
-+			data->lth_brightness = value;
- 	}
- 
- 	/*
--- 
-1.8.1
-
diff --git a/patches/pwm/0002-Control-module-EHRPWM-clk-enabling.patch b/patches/pwm/0002-Control-module-EHRPWM-clk-enabling.patch
deleted file mode 100644
index 1958e44f960873988980e4728c73c4be3f05c007..0000000000000000000000000000000000000000
--- a/patches/pwm/0002-Control-module-EHRPWM-clk-enabling.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From bfc64b86b2ca013dc538d75ecef7582f048ef724 Mon Sep 17 00:00:00 2001
-From: "Philip, Avinash" <avinashphilip@ti.com>
-Date: Tue, 22 May 2012 11:34:58 +0530
-Subject: [PATCH 2/8] Control module : EHRPWM clk enabling
-
-Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
----
- arch/arm/mach-omap2/devices.c | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
-
-diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
-index 626f3ea..8ca1520 100644
---- a/arch/arm/mach-omap2/devices.c
-+++ b/arch/arm/mach-omap2/devices.c
-@@ -446,6 +446,20 @@ static void omap_init_mcspi(void)
- static inline void omap_init_mcspi(void) {}
- #endif
- 
-+#include "cm33xx.h"
-+
-+int __init am33xx_register_ehrpwm(void)
-+{
-+	void __iomem *iobase;
-+	unsigned short regword;
-+
-+	iobase = AM33XX_CM_REGADDR(0, 0x10664);
-+	regword = readw(iobase);
-+	regword |= 0x7;
-+	writew(regword, iobase);
-+	return 0;
-+}
-+
- /**
-  * omap_init_rng - bind the RNG hwmod to the RNG omap_device
-  *
-@@ -732,6 +746,7 @@ static int __init omap2_init_devices(void)
- 	omap_init_vout();
- 	omap_init_ocp2scp();
- 
-+	am33xx_register_ehrpwm();
- 	return 0;
- }
- arch_initcall(omap2_init_devices);
--- 
-1.8.1
-
diff --git a/patches/pwm/0003-pwm-pwm_test-Driver-support-for-PWM-module-testing.patch b/patches/pwm/0003-pwm-pwm_test-Driver-support-for-PWM-module-testing.patch
deleted file mode 100644
index 8fece3736c317e2bda58846179c813c3dcbb9a4c..0000000000000000000000000000000000000000
--- a/patches/pwm/0003-pwm-pwm_test-Driver-support-for-PWM-module-testing.patch
+++ /dev/null
@@ -1,373 +0,0 @@
-From c0f0188a24a98c15990a20349d268eb05fc9f834 Mon Sep 17 00:00:00 2001
-From: "Philip, Avinash" <avinashphilip@ti.com>
-Date: Tue, 17 Jul 2012 21:35:11 +0530
-Subject: [PATCH 3/8] pwm: pwm_test: Driver support for PWM module testing
-
-Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
----
- drivers/pwm/Kconfig    |  11 ++
- drivers/pwm/Makefile   |   1 +
- drivers/pwm/pwm_test.c | 322 +++++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 334 insertions(+)
- create mode 100644 drivers/pwm/pwm_test.c
-
-diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
-index e513cd9..74f5084 100644
---- a/drivers/pwm/Kconfig
-+++ b/drivers/pwm/Kconfig
-@@ -191,4 +191,15 @@ config PWM_VT8500
- 	  To compile this driver as a module, choose M here: the module
- 	  will be called pwm-vt8500.
- 
-+config  EHRPWM_TEST
-+	tristate "EHRPWM TEST support"
-+	depends on PWM_TIEHRPWM
-+
-+	help
-+	  Test driver support for the EHRPWM PWM driver found on AM33XX
-+	  TI SOC
-+
-+	  To compile this driver as a module, choose M here: the module
-+	  will be called pwm_ehrpwm.
-+
- endif
-diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile
-index 62a2963..8ddb432 100644
---- a/drivers/pwm/Makefile
-+++ b/drivers/pwm/Makefile
-@@ -16,3 +16,4 @@ obj-$(CONFIG_PWM_TIPWMSS)	+= pwm-tipwmss.o
- obj-$(CONFIG_PWM_TWL)		+= pwm-twl.o
- obj-$(CONFIG_PWM_TWL_LED)	+= pwm-twl-led.o
- obj-$(CONFIG_PWM_VT8500)	+= pwm-vt8500.o
-+obj-$(CONFIG_EHRPWM_TEST)	+= pwm_test.o
-diff --git a/drivers/pwm/pwm_test.c b/drivers/pwm/pwm_test.c
-new file mode 100644
-index 0000000..d9948db
---- /dev/null
-+++ b/drivers/pwm/pwm_test.c
-@@ -0,0 +1,322 @@
-+/*
-+ * PWM Test driver
-+ *
-+ * Copyright (C) 2012 Texas Instruments.
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/platform_device.h>
-+#include <linux/pwm.h>
-+#include <linux/slab.h>
-+#include <linux/io.h>
-+#include <linux/err.h>
-+#include <linux/clk.h>
-+#include <linux/pm_runtime.h>
-+
-+struct pwm_test {
-+	struct pwm_device *pwm;
-+	int ret;
-+	struct class *pwm_test_class;
-+	unsigned long period, duty, run, polarity, config, requested;
-+	unsigned long period_s, duty_s, run_s, polarity_s, config_s, requested_s;
-+	struct device *dev;
-+};
-+
-+static ssize_t pwm_test_show_duty(struct device *dev,
-+		struct device_attribute *attr, char *buf)
-+{
-+	struct pwm_test *pwm_test = dev_get_drvdata(dev);
-+	return sprintf(buf, "%lu\n", pwm_test->duty);
-+}
-+
-+static ssize_t pwm_test_store_duty(struct device *dev,
-+		struct device_attribute *attr, const char *buf, size_t count)
-+{
-+	int rc;
-+	struct pwm_test *pwm_test = dev_get_drvdata(dev);
-+
-+	rc = kstrtoul(buf, 0, &pwm_test->duty_s);
-+	if (rc)
-+		return rc;
-+	return count;
-+}
-+
-+static ssize_t pwm_test_show_period(struct device *dev,
-+		struct device_attribute *attr, char *buf)
-+{
-+	struct pwm_test *pwm_test = dev_get_drvdata(dev);
-+
-+	return sprintf(buf, "%lu\n", pwm_test->period);
-+}
-+
-+static ssize_t pwm_test_store_period(struct device *dev,
-+		struct device_attribute *attr, const char *buf, size_t count)
-+{
-+	int rc;
-+	struct pwm_test *pwm_test = dev_get_drvdata(dev);
-+
-+	rc = kstrtoul(buf, 0, &pwm_test->period_s);
-+	if (rc)
-+		return rc;
-+
-+	return count;
-+}
-+
-+static ssize_t pwm_test_show_config(struct device *dev,
-+		struct device_attribute *attr, char *buf)
-+{
-+	struct pwm_test *pwm_test = dev_get_drvdata(dev);
-+	if (pwm_test->config)
-+		return sprintf(buf, "config Done\n");
-+	else
-+		return sprintf(buf, "config Failed\n");
-+}
-+static ssize_t pwm_test_store_config(struct device *dev,
-+		struct device_attribute *attr, const char *buf, size_t count)
-+{
-+	struct pwm_test *pwm_test = dev_get_drvdata(dev);
-+	int ret;
-+
-+	if (pwm_test->duty_s == 0) {
-+		ret = pwm_config(pwm_test->pwm, 0, pwm_test->period_s);
-+		if (ret) {
-+			pwm_test->config = 0;
-+			pr_err("operation failed %d\n", ret);
-+			pwm_test->duty_s = pwm_test->duty;
-+			pwm_test->period_s = pwm_test->period;
-+			return ret;
-+		}
-+		pwm_test->duty = pwm_test->duty_s;
-+		pwm_test->period = pwm_test->period_s;
-+		pwm_test->config = 1;
-+	} else {
-+		ret = pwm_config(pwm_test->pwm, pwm_test->duty_s,
-+				pwm_test->period_s);
-+		if (ret) {
-+			pwm_test->config = 0;
-+			pr_err("operation failed %d\n", ret);
-+			pwm_test->duty_s = pwm_test->duty;
-+			pwm_test->period_s = pwm_test->period;
-+			return ret;
-+		}
-+		pwm_test->duty = pwm_test->duty_s;
-+		pwm_test->period = pwm_test->period_s;
-+		pwm_test->config = 1;
-+	}
-+	return count;
-+}
-+
-+static ssize_t pwm_test_show_run(struct device *dev,
-+		struct device_attribute *attr, char *buf)
-+{
-+	struct pwm_test *pwm_test = dev_get_drvdata(dev);
-+	return sprintf(buf, "%s\n", pwm_test->run ? "Enabled" : "Disabled");
-+}
-+
-+static ssize_t pwm_test_store_run(struct device *dev,
-+		struct device_attribute *attr, const char *buf, size_t count)
-+{
-+	int rc;
-+	struct pwm_test *pwm_test = dev_get_drvdata(dev);
-+
-+	rc = kstrtoul(buf, 0, &pwm_test->run_s);
-+	if (rc)
-+		return rc;
-+
-+	if (pwm_test->run_s)
-+		rc = pwm_enable(pwm_test->pwm);
-+	else
-+		pwm_disable(pwm_test->pwm);
-+
-+	if (rc) {
-+		pr_err("operation failed %d\n", rc);
-+		pwm_test->run_s = pwm_test->run;
-+		return rc;
-+	}
-+
-+	pwm_test->run = pwm_test->run_s;
-+	return count;
-+}
-+
-+static ssize_t pwm_test_show_polarity(struct device *dev,
-+		struct device_attribute *attr, char *buf)
-+{
-+	struct pwm_test *pwm_test = dev_get_drvdata(dev);
-+	return sprintf(buf, "%s\n",
-+			pwm_test->polarity ? "Polarity Inversed" :
-+			"Polarity Normal");
-+}
-+
-+static ssize_t pwm_test_store_polarity(struct device *dev,
-+		struct device_attribute *attr, const char *buf, size_t count)
-+{
-+	int rc;
-+	struct pwm_test *pwm_test = dev_get_drvdata(dev);
-+
-+	rc = kstrtoul(buf, 0, &pwm_test->polarity_s);
-+	if (rc)
-+		return rc;
-+
-+	rc = pwm_set_polarity(pwm_test->pwm, pwm_test->polarity_s);
-+	if (rc) {
-+		pr_err("operation failed %d\n", rc);
-+		return rc;
-+	}
-+
-+	pwm_test->polarity = pwm_test->polarity_s;
-+	return count;
-+}
-+
-+static ssize_t pwm_test_show_request(struct device *dev,
-+		struct device_attribute *attr, char *buf)
-+{
-+	struct pwm_test *pwm_test = dev_get_drvdata(dev);
-+	return sprintf(buf, "%s\n", pwm_test->requested ? "Requested" : "Freed");
-+}
-+
-+static ssize_t pwm_test_store_request(struct device *dev,
-+		struct device_attribute *attr, const char *buf, size_t count)
-+{
-+	int rc;
-+	struct pwm_test *pwm_test = dev_get_drvdata(dev);
-+
-+	rc = kstrtoul(buf, 0, &pwm_test->requested_s);
-+	if (rc)
-+		return rc;
-+
-+	if (pwm_test->requested_s) {
-+		pwm_test->pwm = pwm_get(dev, NULL);
-+
-+		if (IS_ERR(pwm_test->pwm)) {
-+			dev_err(dev, "%s() %d %ld\n", __func__, __LINE__,
-+				PTR_ERR(pwm_test->pwm));
-+			rc = -EINVAL;
-+		}
-+	} else {
-+		pwm_free(pwm_test->pwm);
-+		pwm_test->polarity = 0;
-+		pwm_test->run = 0;
-+		pwm_test->duty = 0;
-+		pwm_test->period = 0;
-+		pwm_test->config = 0;
-+		pwm_test->polarity_s = 0;
-+		pwm_test->run_s = 0;
-+		pwm_test->duty_s = 0;
-+		pwm_test->period_s = 0;
-+		pwm_test->config_s = 0;
-+		rc = 0;
-+	}
-+
-+	if (rc) {
-+		pr_err("operation failed %d\n", rc);
-+		pwm_test->requested_s = pwm_test->requested;
-+		return rc;
-+	}
-+
-+	pwm_test->requested = pwm_test->requested_s;
-+	return count;
-+}
-+
-+static DEVICE_ATTR(duty, 0644, pwm_test_show_duty, pwm_test_store_duty);
-+static DEVICE_ATTR(period, 0644, pwm_test_show_period, pwm_test_store_period);
-+static DEVICE_ATTR(polarity, 0644, pwm_test_show_polarity,
-+		pwm_test_store_polarity);
-+static DEVICE_ATTR(config, 0644 , pwm_test_show_config, pwm_test_store_config);
-+static DEVICE_ATTR(run, 0644 , pwm_test_show_run, pwm_test_store_run);
-+static DEVICE_ATTR(request, 0644 , pwm_test_show_request, pwm_test_store_request);
-+
-+static const struct attribute *pwm_attrs[] = {
-+	&dev_attr_duty.attr,
-+	&dev_attr_period.attr,
-+	&dev_attr_config.attr,
-+	&dev_attr_run.attr,
-+	&dev_attr_request.attr,
-+	&dev_attr_polarity.attr,
-+	NULL,
-+};
-+
-+static const struct attribute_group pwm_device_attr_group = {
-+	.attrs = (struct attribute **) pwm_attrs,
-+};
-+
-+static int __init pwm_test_class_init(struct device *dev)
-+{
-+	if (sysfs_create_group(&dev->kobj, &pwm_device_attr_group))
-+		return 1;
-+	return 0;
-+}
-+
-+static int pwm_test_probe(struct platform_device *pdev)
-+{
-+	struct pwm_test *pwm_test;
-+
-+	pwm_test = devm_kzalloc(&pdev->dev, sizeof(*pwm_test), GFP_KERNEL);
-+
-+	if (!pwm_test) {
-+		dev_err(&pdev->dev, "memory error\n");
-+		return -ENOMEM;
-+	}
-+
-+	if (pwm_test_class_init(&pdev->dev)) {
-+		dev_err(&pdev->dev, "sysfs creation failed\n");
-+		return -EINVAL;
-+	}
-+	dev_set_drvdata(&pdev->dev, pwm_test);
-+	platform_set_drvdata(pdev, pwm_test);
-+	return 0;
-+}
-+
-+static int pwm_test_remove(struct platform_device *pdev)
-+{
-+	struct pwm_test *pwm_test = platform_get_drvdata(pdev);
-+
-+	if (!pwm_test->ret) {
-+		pwm_config(pwm_test->pwm, 0, 0x1000);
-+		pwm_disable(pwm_test->pwm);
-+		pr_emerg("PWM Device Disabled %s\n", dev_name(&pdev->dev));
-+	}
-+	if (pwm_test->requested)
-+		pwm_free(pwm_test->pwm);
-+
-+	pr_emerg("PWM Device Freed %s\n", dev_name(&pdev->dev));
-+	pwm_test->run = 0;
-+	sysfs_remove_group(&pdev->dev.kobj, &pwm_device_attr_group);
-+	return 0;
-+}
-+
-+static struct of_device_id pwm_test_of_match[] = {
-+	{ .compatible = "pwm_test" },
-+	{ }
-+};
-+
-+MODULE_DEVICE_TABLE(of, pwm_test_of_match);
-+
-+static struct platform_driver pwm_test_driver = {
-+	.driver		= {
-+		.name		= "pwm_test",
-+		.owner		= THIS_MODULE,
-+		.of_match_table	= of_match_ptr(pwm_test_of_match),
-+	},
-+	.probe		= pwm_test_probe,
-+	.remove		= pwm_test_remove,
-+};
-+
-+module_platform_driver(pwm_test_driver);
-+
-+MODULE_DESCRIPTION("pwm_test Driver");
-+MODULE_LICENSE("GPL");
-+MODULE_ALIAS("platform:pwm_test");
--- 
-1.8.1
-
diff --git a/patches/pwm/0004-ARM-OMAP2-PWM-limit-am33xx_register_ehrpwm-to-soc_is.patch b/patches/pwm/0004-ARM-OMAP2-PWM-limit-am33xx_register_ehrpwm-to-soc_is.patch
deleted file mode 100644
index de743c84fa14905d40033937bcc296f65ade1e23..0000000000000000000000000000000000000000
--- a/patches/pwm/0004-ARM-OMAP2-PWM-limit-am33xx_register_ehrpwm-to-soc_is.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From d478d8a81e90e264b6fe99d89664170971f28bb3 Mon Sep 17 00:00:00 2001
-From: Robert Nelson <robertcnelson@gmail.com>
-Date: Tue, 27 Nov 2012 10:53:23 -0600
-Subject: [PATCH 4/8] ARM: OMAP2: PWM: limit am33xx_register_ehrpwm to
- soc_is_am33xx, fixes boot on Beagle/Panda
-
-Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
----
- arch/arm/mach-omap2/devices.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
-index 8ca1520..f5c71ac 100644
---- a/arch/arm/mach-omap2/devices.c
-+++ b/arch/arm/mach-omap2/devices.c
-@@ -745,8 +745,9 @@ static int __init omap2_init_devices(void)
- 	omap_init_aes();
- 	omap_init_vout();
- 	omap_init_ocp2scp();
--
--	am33xx_register_ehrpwm();
-+	if (soc_is_am33xx()) {
-+		am33xx_register_ehrpwm();
-+	}
- 	return 0;
- }
- arch_initcall(omap2_init_devices);
--- 
-1.8.1
-
diff --git a/patches/pwm/0005-pwm-export-of_pwm_request.patch b/patches/pwm/0005-pwm-export-of_pwm_request.patch
deleted file mode 100644
index 25aba76bde03f059999dcb3a852c4c39d61e7a29..0000000000000000000000000000000000000000
--- a/patches/pwm/0005-pwm-export-of_pwm_request.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 3a73622d554d6e84fe7c2ff42d242330272af322 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Fri, 19 Oct 2012 10:38:00 +0300
-Subject: [PATCH 5/8] pwm: export of_pwm_request
-
-No need to hide of_pwm_request, it's useful to other in-kernel users.
-
-Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
-
-Conflicts:
-	include/linux/pwm.h
----
- drivers/pwm/core.c  | 6 +++++-
- include/linux/pwm.h | 7 +++++++
- 2 files changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
-index 903138b..0478442 100644
---- a/drivers/pwm/core.c
-+++ b/drivers/pwm/core.c
-@@ -486,7 +486,7 @@ static struct pwm_chip *of_node_to_pwmchip(struct device_node *np)
-  * becomes mandatory for devices that look up the PWM device via the con_id
-  * parameter.
-  */
--static struct pwm_device *of_pwm_request(struct device_node *np,
-+struct pwm_device *of_pwm_request(struct device_node *np,
- 					 const char *con_id)
- {
- 	struct pwm_device *pwm = NULL;
-@@ -495,6 +495,9 @@ static struct pwm_device *of_pwm_request(struct device_node *np,
- 	int index = 0;
- 	int err;
- 
-+	if (!np)
-+		return ERR_PTR(-ENODEV);
-+
- 	if (con_id) {
- 		index = of_property_match_string(np, "pwm-names", con_id);
- 		if (index < 0)
-@@ -545,6 +548,7 @@ put:
- 
- 	return pwm;
- }
-+EXPORT_SYMBOL(of_pwm_request);
- 
- /**
-  * pwm_add_table() - register PWM device consumers
-diff --git a/include/linux/pwm.h b/include/linux/pwm.h
-index 6d661f3..b21c020 100644
---- a/include/linux/pwm.h
-+++ b/include/linux/pwm.h
-@@ -174,6 +174,7 @@ struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip,
- struct pwm_device *of_pwm_xlate_with_flags(struct pwm_chip *pc,
- 		const struct of_phandle_args *args);
- 
-+struct pwm_device *of_pwm_request(struct device_node *np, const char *consumer);
- struct pwm_device *pwm_get(struct device *dev, const char *consumer);
- void pwm_put(struct pwm_device *pwm);
- 
-@@ -207,6 +208,12 @@ static inline struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip,
- 	return ERR_PTR(-ENODEV);
- }
- 
-+static inline struct pwm_device *of_pwm_request(struct device_node *np,
-+					 const char *consumer)
-+{
-+	return ERR_PTR(-ENODEV);
-+}
-+
- static inline struct pwm_device *pwm_get(struct device *dev,
- 					 const char *consumer)
- {
--- 
-1.8.1
-
diff --git a/patches/pwm/0006-pwm-pwm-tiehrpwm-Update-the-clock-handling-of-pwm-ti.patch b/patches/pwm/0006-pwm-pwm-tiehrpwm-Update-the-clock-handling-of-pwm-ti.patch
deleted file mode 100644
index 35219cb527d1824685e87e159974a6ba44e6222e..0000000000000000000000000000000000000000
--- a/patches/pwm/0006-pwm-pwm-tiehrpwm-Update-the-clock-handling-of-pwm-ti.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From cc9dc8cb6d26dec076f04d367de3fd0ffd8cda31 Mon Sep 17 00:00:00 2001
-From: "Philip, Avinash" <avinashphilip@ti.com>
-Date: Wed, 2 Jan 2013 13:24:50 +0000
-Subject: [PATCH 6/8] pwm: pwm-tiehrpwm: Update the clock handling of
- pwm-tiehrpwm driver
-
-The clock framework has changed and it's now better to invoke
-clock_prepare_enable() and clk_disable_unprepare() rather than the
-legacy clk_enable() and clk_disable() calls. This patch converts the
-pwm-tiehrpwm driver to the new framework.
-
-Signed-off-by: Philip Avinash <avinashphilip@ti.com>
-Cc: Thierry Reding <thierry.reding@avionic-design.de>
----
- drivers/pwm/pwm-tiehrpwm.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
-index 72a6dd4..af6f162 100644
---- a/drivers/pwm/pwm-tiehrpwm.c
-+++ b/drivers/pwm/pwm-tiehrpwm.c
-@@ -341,7 +341,7 @@ static int ehrpwm_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
- 	configure_polarity(pc, pwm->hwpwm);
- 
- 	/* Enable TBCLK before enabling PWM device */
--	clk_enable(pc->tbclk);
-+	clk_prepare_enable(pc->tbclk);
- 
- 	/* Enable time counter for free_run */
- 	ehrpwm_modify(pc->mmio_base, TBCTL, TBCTL_RUN_MASK, TBCTL_FREE_RUN);
-@@ -372,7 +372,7 @@ static void ehrpwm_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
- 	ehrpwm_modify(pc->mmio_base, AQCSFRC, aqcsfrc_mask, aqcsfrc_val);
- 
- 	/* Disabling TBCLK on PWM disable */
--	clk_disable(pc->tbclk);
-+	clk_disable_unprepare(pc->tbclk);
- 
- 	/* Stop Time base counter */
- 	ehrpwm_modify(pc->mmio_base, TBCTL, TBCTL_RUN_MASK, TBCTL_STOP_NEXT);
--- 
-1.8.1
-
diff --git a/patches/pwm/0007-ARM-AM33XX-clk-Add-clock-node-for-EHRPWM-TBCLK.patch b/patches/pwm/0007-ARM-AM33XX-clk-Add-clock-node-for-EHRPWM-TBCLK.patch
deleted file mode 100644
index 34afb5aa350a7afd8a9de51e033f86d57e26dff1..0000000000000000000000000000000000000000
--- a/patches/pwm/0007-ARM-AM33XX-clk-Add-clock-node-for-EHRPWM-TBCLK.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 886fb6ee014fda4c422958cd47cb63706d9c44ac Mon Sep 17 00:00:00 2001
-From: "Philip, Avinash" <avinashphilip@ti.com>
-Date: Wed, 2 Jan 2013 13:24:51 +0000
-Subject: [PATCH 7/8] ARM: AM33XX: clk: Add clock node for EHRPWM TBCLK
-
-EHRPWM module requires explicit clock gating of TBCLK from control
-module. Hence add TBCLK clock node in clock tree for EHRPWM modules.
-
-Signed-off-by: Philip Avinash <avinashphilip@ti.com>
----
- arch/arm/mach-omap2/cclock33xx_data.c | 30 ++++++++++++++++++++++++++++++
- arch/arm/mach-omap2/control.h         |  8 ++++++++
- 2 files changed, 38 insertions(+)
-
-diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
-index 8dd9ecd..2e2d579 100644
---- a/arch/arm/mach-omap2/cclock33xx_data.c
-+++ b/arch/arm/mach-omap2/cclock33xx_data.c
-@@ -834,6 +834,33 @@ static struct clk_hw_omap wdt1_fck_hw = {
- 
- DEFINE_STRUCT_CLK(wdt1_fck, wdt_ck_parents, gpio_fck_ops);
- 
-+static const char *pwmss_clk_parents[] = {
-+	"dpll_per_m2_ck",
-+};
-+
-+static const struct clk_ops ehrpwm_tbclk_ops = {
-+	.enable		= &omap2_dflt_clk_enable,
-+	.disable	= &omap2_dflt_clk_disable,
-+};
-+
-+DEFINE_CLK_OMAP_MUX_GATE(ehrpwm0_tbclk, "l4ls_clkdm",
-+			 0, NULL, 0,
-+			 AM33XX_CTRL_REGADDR(AM33XX_PWMSS_TBCLK_CLKCTRL),
-+			 AM33XX_PWMSS0_TBCLKEN_SHIFT,
-+			 NULL, pwmss_clk_parents, ehrpwm_tbclk_ops);
-+
-+DEFINE_CLK_OMAP_MUX_GATE(ehrpwm1_tbclk, "l4ls_clkdm",
-+			 0, NULL, 0,
-+			 AM33XX_CTRL_REGADDR(AM33XX_PWMSS_TBCLK_CLKCTRL),
-+			 AM33XX_PWMSS1_TBCLKEN_SHIFT,
-+			 NULL, pwmss_clk_parents, ehrpwm_tbclk_ops);
-+
-+DEFINE_CLK_OMAP_MUX_GATE(ehrpwm2_tbclk, "l4ls_clkdm",
-+			 0, NULL, 0,
-+			 AM33XX_CTRL_REGADDR(AM33XX_PWMSS_TBCLK_CLKCTRL),
-+			 AM33XX_PWMSS2_TBCLKEN_SHIFT,
-+			 NULL, pwmss_clk_parents, ehrpwm_tbclk_ops);
-+
- /*
-  * clkdev
-  */
-@@ -912,6 +939,9 @@ static struct omap_clk am33xx_clks[] = {
- 	CLK(NULL,	"clkout2_div_ck",	&clkout2_div_ck,	CK_AM33XX),
- 	CLK(NULL,	"timer_32k_ck",		&clkdiv32k_ick,	CK_AM33XX),
- 	CLK(NULL,	"timer_sys_ck",		&sys_clkin_ck,	CK_AM33XX),
-+	CLK("48300200.ehrpwm",	"tbclk",	&ehrpwm0_tbclk,	CK_AM33XX),
-+	CLK("48302200.ehrpwm",	"tbclk",	&ehrpwm1_tbclk,	CK_AM33XX),
-+	CLK("48304200.ehrpwm",	"tbclk",	&ehrpwm2_tbclk,	CK_AM33XX),
- };
- 
- 
-diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
-index e6c3281..35d17a6 100644
---- a/arch/arm/mach-omap2/control.h
-+++ b/arch/arm/mach-omap2/control.h
-@@ -358,6 +358,14 @@
- #define AM33XX_CONTROL_STATUS_SYSBOOT1_WIDTH		0x2
- #define AM33XX_CONTROL_STATUS_SYSBOOT1_MASK		(0x3 << 22)
- 
-+/* AM33XX PWMSS Control register */
-+#define AM33XX_PWMSS_TBCLK_CLKCTRL			0x664
-+
-+/* AM33XX  PWMSS Control bitfields */
-+#define AM33XX_PWMSS0_TBCLKEN_SHIFT			0
-+#define AM33XX_PWMSS1_TBCLKEN_SHIFT			1
-+#define AM33XX_PWMSS2_TBCLKEN_SHIFT			2
-+
- /* CONTROL OMAP STATUS register to identify OMAP3 features */
- #define OMAP3_CONTROL_OMAP_STATUS	0x044c
- 
--- 
-1.8.1
-
diff --git a/patches/pwm/0008-HACK-am33xx.dtsi-turn-on-all-PWMs.patch b/patches/pwm/0008-HACK-am33xx.dtsi-turn-on-all-PWMs.patch
deleted file mode 100644
index b80548c10fa657b37ba431b8d888904b8b23815d..0000000000000000000000000000000000000000
--- a/patches/pwm/0008-HACK-am33xx.dtsi-turn-on-all-PWMs.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From 021bae8081ab561aaa31da4e50e456558061241f Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Mon, 28 Jan 2013 18:15:29 +0100
-Subject: [PATCH 8/8] HACK: am33xx.dtsi: turn on all PWMs
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- arch/arm/boot/dts/am33xx.dtsi | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index e832be8..c0d9c5b 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -470,7 +470,7 @@
- 			ti,hwmods = "epwmss0";
- 			#address-cells = <1>;
- 			#size-cells = <1>;
--			status = "disabled";
-+			//status = "disabled";
- 			ranges = <0x48300100 0x48300100 0x80   /* ECAP */
- 				  0x48300180 0x48300180 0x80   /* EQEP */
- 				  0x48300200 0x48300200 0x80>; /* EHRPWM */
-@@ -480,7 +480,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48300100 0x80>;
- 				ti,hwmods = "ecap0";
--				status = "disabled";
-+				//status = "disabled";
- 			};
- 
- 			ehrpwm0: ehrpwm@48300200 {
-@@ -488,7 +488,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48300200 0x80>;
- 				ti,hwmods = "ehrpwm0";
--				status = "disabled";
-+				//status = "disabled";
- 			};
- 		};
- 
-@@ -498,7 +498,7 @@
- 			ti,hwmods = "epwmss1";
- 			#address-cells = <1>;
- 			#size-cells = <1>;
--			status = "disabled";
-+			//status = "disabled";
- 			ranges = <0x48302100 0x48302100 0x80   /* ECAP */
- 				  0x48302180 0x48302180 0x80   /* EQEP */
- 				  0x48302200 0x48302200 0x80>; /* EHRPWM */
-@@ -508,7 +508,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48302100 0x80>;
- 				ti,hwmods = "ecap1";
--				status = "disabled";
-+				//status = "disabled";
- 			};
- 
- 			ehrpwm1: ehrpwm@48302200 {
-@@ -516,7 +516,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48302200 0x80>;
- 				ti,hwmods = "ehrpwm1";
--				status = "disabled";
-+				//status = "disabled";
- 			};
- 		};
- 
-@@ -526,7 +526,7 @@
- 			ti,hwmods = "epwmss2";
- 			#address-cells = <1>;
- 			#size-cells = <1>;
--			status = "disabled";
-+			//status = "disabled";
- 			ranges = <0x48304100 0x48304100 0x80   /* ECAP */
- 				  0x48304180 0x48304180 0x80   /* EQEP */
- 				  0x48304200 0x48304200 0x80>; /* EHRPWM */
-@@ -536,7 +536,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48304100 0x80>;
- 				ti,hwmods = "ecap2";
--				status = "disabled";
-+				//status = "disabled";
- 			};
- 
- 			ehrpwm2: ehrpwm@48304200 {
-@@ -544,7 +544,7 @@
- 				#pwm-cells = <3>;
- 				reg = <0x48304200 0x80>;
- 				ti,hwmods = "ehrpwm2";
--				status = "disabled";
-+				//status = "disabled";
- 			};
- 		};
- 	};
--- 
-1.8.1
-
diff --git a/patches/reboot/0001-ARM-AM33xx-Add-SoC-specific-restart-hook.patch b/patches/reboot/0001-ARM-AM33xx-Add-SoC-specific-restart-hook.patch
deleted file mode 100644
index 9e2af6278b5b28f88dd5eb9663ea3f077f19fe26..0000000000000000000000000000000000000000
--- a/patches/reboot/0001-ARM-AM33xx-Add-SoC-specific-restart-hook.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From 1de0ec318a9fa02943e9336c50a4638dd7960b2a Mon Sep 17 00:00:00 2001
-From: "Jean-Sebastien A. Beaudry" <jsabeaudry@handyem.com>
-Date: Wed, 23 Jan 2013 21:02:40 +0000
-Subject: [PATCH] ARM: AM33xx: Add SoC specific restart hook
-
-Add restart hook so that DTS based AM33xx builds can restart
-the platform.
-
-Tested-by: Nishanth Menon <nm@ti.com>
-Signed-off-by: Jean-Sebastien A. Beaudry <jsabeaudry@handyem.com>
----
- arch/arm/mach-omap2/Makefile         |    1 +
- arch/arm/mach-omap2/am33xx-restart.c |   34 ++++++++++++++++++++++++++++++++++
- arch/arm/mach-omap2/board-generic.c  |    1 +
- arch/arm/mach-omap2/common.h         |    8 ++++++++
- 4 files changed, 44 insertions(+)
- create mode 100644 arch/arm/mach-omap2/am33xx-restart.c
-
-diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
-index 6cde196..afecbbc 100644
---- a/arch/arm/mach-omap2/Makefile
-+++ b/arch/arm/mach-omap2/Makefile
-@@ -53,6 +53,7 @@ AFLAGS_sram34xx.o			:=-Wa,-march=armv7-a
- # Restart code (OMAP4/5 currently in omap4-common.c)
- obj-$(CONFIG_SOC_OMAP2420)		+= omap2-restart.o
- obj-$(CONFIG_SOC_OMAP2430)		+= omap2-restart.o
-+obj-$(CONFIG_SOC_AM33XX)		+= am33xx-restart.o
- obj-$(CONFIG_ARCH_OMAP3)		+= omap3-restart.o
- 
- # Pin multiplexing
-diff --git a/arch/arm/mach-omap2/am33xx-restart.c b/arch/arm/mach-omap2/am33xx-restart.c
-new file mode 100644
-index 0000000..88e4fa8
---- /dev/null
-+++ b/arch/arm/mach-omap2/am33xx-restart.c
-@@ -0,0 +1,34 @@
-+/*
-+ * am33xx-restart.c - Code common to all AM33xx machines.
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ */
-+#include <linux/kernel.h>
-+
-+#include "common.h"
-+#include "prm-regbits-33xx.h"
-+#include "prm33xx.h"
-+
-+/**
-+ * am3xx_restart - trigger a software restart of the SoC
-+ * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c
-+ * @cmd: passed from the userspace program rebooting the system (if provided)
-+ *
-+ * Resets the SoC.  For @cmd, see the 'reboot' syscall in
-+ * kernel/sys.c.  No return value.
-+ */
-+void am33xx_restart(char mode, const char *cmd)
-+{
-+	/* TODO: Handle mode and cmd if necessary */
-+
-+	am33xx_prm_rmw_reg_bits(AM33XX_GLOBAL_WARM_SW_RST_MASK,
-+				AM33XX_GLOBAL_WARM_SW_RST_MASK,
-+				AM33XX_PRM_DEVICE_MOD,
-+				AM33XX_PRM_RSTCTRL_OFFSET);
-+
-+	/* OCP barrier */
-+	(void)am33xx_prm_read_reg(AM33XX_PRM_DEVICE_MOD,
-+				  AM33XX_PRM_RSTCTRL_OFFSET);
-+}
-diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
-index 53cb380b..fac00f0 100644
---- a/arch/arm/mach-omap2/board-generic.c
-+++ b/arch/arm/mach-omap2/board-generic.c
-@@ -141,6 +141,7 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)")
- 	.init_machine	= omap_generic_init,
- 	.timer		= &omap3_am33xx_timer,
- 	.dt_compat	= am33xx_boards_compat,
-+	.restart	= am33xx_restart,
- MACHINE_END
- #endif
- 
-diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
-index 948bcaa..0c3a991 100644
---- a/arch/arm/mach-omap2/common.h
-+++ b/arch/arm/mach-omap2/common.h
-@@ -119,6 +119,14 @@ static inline void omap2xxx_restart(char mode, const char *cmd)
- }
- #endif
- 
-+#ifdef CONFIG_SOC_AM33XX
-+void am33xx_restart(char mode, const char *cmd);
-+#else
-+static inline void am33xx_restart(char mode, const char *cmd)
-+{
-+}
-+#endif
-+
- #ifdef CONFIG_ARCH_OMAP3
- void omap3xxx_restart(char mode, const char *cmd);
- #else
--- 
-1.7.10.4
-
diff --git a/patches/ref_omap2plus_defconfig b/patches/ref_omap2plus_defconfig
index 7e83cb1f9956e9423003cf61d889748f92bc3161..606e0289d2a000383cf626a7c65213ad31213525 100644
--- a/patches/ref_omap2plus_defconfig
+++ b/patches/ref_omap2plus_defconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Linux/arm 3.8.0-rc6 Kernel Configuration
+# Linux/arm 3.8.0 Kernel Configuration
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -330,9 +330,6 @@ CONFIG_OMAP_PACKAGE_CBS=y
 #
 # OMAP Board Type
 #
-CONFIG_MACH_AM335XEVM=y
-CONFIG_MACH_AM335XIAEVM=y
-CONFIG_MACH_TAM335X=y
 CONFIG_MACH_OMAP2_TUSB6010=y
 CONFIG_MACH_OMAP_H4=y
 CONFIG_MACH_OMAP_APOLLON=y
@@ -432,7 +429,6 @@ CONFIG_PL310_ERRATA_727915=y
 # CONFIG_PL310_ERRATA_769419 is not set
 # CONFIG_ARM_ERRATA_775420 is not set
 CONFIG_ARM_GIC=y
-CONFIG_TI_PRIV_EDMA=y
 
 #
 # Bus support
@@ -764,7 +760,6 @@ CONFIG_EXTRA_FIRMWARE=""
 CONFIG_REGMAP=y
 CONFIG_REGMAP_I2C=y
 CONFIG_REGMAP_SPI=m
-CONFIG_REGMAP_IRQ=y
 # CONFIG_DMA_SHARED_BUFFER is not set
 # CONFIG_CMA is not set
 
@@ -835,8 +830,7 @@ CONFIG_MTD_CFI_UTIL=y
 # Self-contained MTD device drivers
 #
 # CONFIG_MTD_DATAFLASH is not set
-CONFIG_MTD_M25P80=y
-CONFIG_M25PXX_USE_FAST_READ=y
+# CONFIG_MTD_M25P80 is not set
 # CONFIG_MTD_SST25L is not set
 # CONFIG_MTD_SLRAM is not set
 # CONFIG_MTD_PHRAM is not set
@@ -893,7 +887,6 @@ CONFIG_PROC_DEVICETREE=y
 # CONFIG_OF_SELFTEST is not set
 CONFIG_OF_FLATTREE=y
 CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_DYNAMIC=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_IRQ=y
 CONFIG_OF_DEVICE=y
@@ -901,8 +894,6 @@ CONFIG_OF_I2C=y
 CONFIG_OF_NET=y
 CONFIG_OF_MDIO=y
 CONFIG_OF_MTD=y
-CONFIG_OF_RESOLVE=y
-CONFIG_OF_OVERLAY=y
 # CONFIG_PARPORT is not set
 CONFIG_BLK_DEV=y
 # CONFIG_BLK_DEV_COW_COMMON is not set
@@ -941,7 +932,6 @@ CONFIG_BLK_DEV_RAM_SIZE=16384
 # CONFIG_BMP085_I2C is not set
 # CONFIG_BMP085_SPI is not set
 # CONFIG_USB_SWITCH_FSA9480 is not set
-CONFIG_GPEVT=y
 # CONFIG_C2PORT is not set
 
 #
@@ -965,7 +955,6 @@ CONFIG_EEPROM_93CX6=y
 # Altera FPGA firmware download module
 #
 # CONFIG_ALTERA_STAPL is not set
-# CONFIG_CAPE_BEAGLEBONE is not set
 
 #
 # SCSI device support
@@ -1468,9 +1457,9 @@ CONFIG_PINCTRL=y
 #
 CONFIG_PINMUX=y
 CONFIG_PINCONF=y
-CONFIG_DEBUG_PINCTRL=y
+# CONFIG_DEBUG_PINCTRL is not set
 CONFIG_PINCTRL_SINGLE=y
-# CONFIG_PINCTRL_EXYNOS4 is not set
+# CONFIG_PINCTRL_EXYNOS is not set
 # CONFIG_PINCTRL_EXYNOS5440 is not set
 CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
 CONFIG_ARCH_REQUIRE_GPIOLIB=y
@@ -1516,7 +1505,6 @@ CONFIG_GPIO_TWL4030=y
 #
 # MODULbus GPIO expanders:
 #
-# CONFIG_GPIO_TPS65910 is not set
 
 #
 # USB GPIO expanders:
@@ -1720,7 +1708,7 @@ CONFIG_MFD_CORE=y
 # CONFIG_TPS6507X is not set
 CONFIG_MFD_TPS65217=y
 # CONFIG_MFD_TPS6586X is not set
-CONFIG_MFD_TPS65910=y
+# CONFIG_MFD_TPS65910 is not set
 # CONFIG_MFD_TPS65912_I2C is not set
 # CONFIG_MFD_TPS65912_SPI is not set
 # CONFIG_MFD_TPS80031 is not set
@@ -1795,7 +1783,6 @@ CONFIG_REGULATOR_TPS65023=y
 CONFIG_REGULATOR_TPS6507X=y
 CONFIG_REGULATOR_TPS65217=y
 # CONFIG_REGULATOR_TPS6524X is not set
-CONFIG_REGULATOR_TPS65910=y
 CONFIG_REGULATOR_TWL4030=y
 # CONFIG_MEDIA_SUPPORT is not set
 
@@ -1805,8 +1792,6 @@ CONFIG_REGULATOR_TWL4030=y
 # CONFIG_DRM is not set
 # CONFIG_VGASTATE is not set
 # CONFIG_VIDEO_OUTPUT_CONTROL is not set
-# CONFIG_OF_DISPLAY_TIMING is not set
-# CONFIG_OF_VIDEOMODE is not set
 CONFIG_FB=y
 CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB_DDC is not set
@@ -1815,13 +1800,12 @@ CONFIG_FB_CFB_FILLRECT=m
 CONFIG_FB_CFB_COPYAREA=m
 CONFIG_FB_CFB_IMAGEBLIT=m
 # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
-CONFIG_FB_SYS_FILLRECT=y
-CONFIG_FB_SYS_COPYAREA=y
-CONFIG_FB_SYS_IMAGEBLIT=y
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
 # CONFIG_FB_FOREIGN_ENDIAN is not set
-CONFIG_FB_SYS_FOPS=y
+# CONFIG_FB_SYS_FOPS is not set
 # CONFIG_FB_WMT_GE_ROPS is not set
-CONFIG_FB_DEFERRED_IO=y
 # CONFIG_FB_SVGALIB is not set
 # CONFIG_FB_MACMODES is not set
 # CONFIG_FB_BACKLIGHT is not set
@@ -1836,12 +1820,10 @@ CONFIG_FB_TILEBLITTING=y
 # CONFIG_FB_TMIO is not set
 # CONFIG_FB_SMSCUFX is not set
 # CONFIG_FB_UDL is not set
-# CONFIG_FB_DA8XX is not set
 # CONFIG_FB_VIRTUAL is not set
 # CONFIG_FB_METRONOME is not set
 # CONFIG_FB_BROADSHEET is not set
 # CONFIG_FB_AUO_K190X is not set
-CONFIG_FB_ST7735=y
 CONFIG_OMAP2_VRFB=y
 CONFIG_OMAP2_DSS=m
 # CONFIG_OMAP2_DSS_DEBUG is not set
@@ -1961,7 +1943,6 @@ CONFIG_SND_USB_AUDIO=m
 # CONFIG_SND_USB_6FIRE is not set
 CONFIG_SND_SOC=m
 CONFIG_SND_SOC_DMAENGINE_PCM=y
-# CONFIG_SND_AM33XX_SOC is not set
 # CONFIG_SND_DESIGNWARE_I2S is not set
 CONFIG_SND_OMAP_SOC=m
 CONFIG_SND_OMAP_SOC_MCBSP=m
@@ -2261,7 +2242,6 @@ CONFIG_RTC_INTF_DEV=y
 # CONFIG_RTC_DRV_BQ32K is not set
 CONFIG_RTC_DRV_TWL92330=y
 CONFIG_RTC_DRV_TWL4030=y
-# CONFIG_RTC_DRV_TPS65910 is not set
 # CONFIG_RTC_DRV_S35390A is not set
 # CONFIG_RTC_DRV_FM3130 is not set
 # CONFIG_RTC_DRV_RX8581 is not set
@@ -2313,7 +2293,6 @@ CONFIG_DMADEVICES=y
 #
 # CONFIG_DW_DMAC is not set
 # CONFIG_TIMB_DMA is not set
-CONFIG_TI_EDMA=y
 CONFIG_DMA_OMAP=y
 CONFIG_DMA_ENGINE=y
 CONFIG_DMA_VIRTUAL_CHANNELS=y
diff --git a/patches/rtc/0001-ARM-OMAP2-am33xx-hwmod-Fix-register-offset-NULL-chec.patch b/patches/rtc/0001-ARM-OMAP2-am33xx-hwmod-Fix-register-offset-NULL-chec.patch
deleted file mode 100644
index 64df3b1f273003ef90f59976dd345a1f69e6211b..0000000000000000000000000000000000000000
--- a/patches/rtc/0001-ARM-OMAP2-am33xx-hwmod-Fix-register-offset-NULL-chec.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From de153cb96e97e3e096c27ac37ade3c5f0608ddf4 Mon Sep 17 00:00:00 2001
-From: "Hebbar, Gururaja" <gururaja.hebbar@ti.com>
-Date: Wed, 30 Jan 2013 14:39:20 +0000
-Subject: [PATCH 1/4] ARM: OMAP2: am33xx-hwmod: Fix "register offset NULL
- check" bug
-
-am33xx_cm_wait_module_ready() checks if register offset is NULL.
-
-int am33xx_cm_wait_module_ready(u16 inst, s16 cdoffs, u16 clkctrl_offs)
-{
-	int i = 0;
-
-	if (!clkctrl_offs)
-		return 0;
-
-In case of AM33xx, CLKCTRL register offset for different clock domains
-are not uniformly placed. An example of this would be the RTC clock
-domain with CLKCTRL offset at 0x00.
-In such cases the module ready check is skipped which leads to a data
-abort during boot-up when RTC registers is accessed.
-
-Remove this check here to avoid checking module readiness for modules
-with clkctrl register offset at 0x00.
-
-Signed-off-by: Hebbar Gururaja <gururaja.hebbar@ti.com>
----
- arch/arm/mach-omap2/cm33xx.c | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/cm33xx.c b/arch/arm/mach-omap2/cm33xx.c
-index 058ce3c..325a515 100644
---- a/arch/arm/mach-omap2/cm33xx.c
-+++ b/arch/arm/mach-omap2/cm33xx.c
-@@ -241,9 +241,6 @@ int am33xx_cm_wait_module_ready(u16 inst, s16 cdoffs, u16 clkctrl_offs)
- {
- 	int i = 0;
- 
--	if (!clkctrl_offs)
--		return 0;
--
- 	omap_test_timeout(_is_module_ready(inst, cdoffs, clkctrl_offs),
- 			  MAX_MODULE_READY_TIME, i);
- 
--- 
-1.8.1
-
diff --git a/patches/rtc/0002-rtc-OMAP-Add-system-pm_power_off-to-rtc-driver.patch b/patches/rtc/0002-rtc-OMAP-Add-system-pm_power_off-to-rtc-driver.patch
deleted file mode 100644
index 433854600fcf25c7f7bb5a5296fa2420dd10cb1a..0000000000000000000000000000000000000000
--- a/patches/rtc/0002-rtc-OMAP-Add-system-pm_power_off-to-rtc-driver.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From 1c84a80e582dd65dd1841a96df268d1dbe735d26 Mon Sep 17 00:00:00 2001
-From: Colin Foe-Parker <colin.foeparker@logicpd.com>
-Date: Mon, 15 Oct 2012 20:12:19 +0530
-Subject: [PATCH 2/4] rtc: OMAP: Add system pm_power_off to rtc driver
-
-Add system power off control to rtc driver which is the in-charge
-of controlling the BeagleBone system power. The power_off routine
-can be hooked up to "pm_power_off" system call.
-
-System power off sequence:-
-* Set PMIC STATUS_OFF when PMIC_POWER_EN is pulled low
-* Enable PMIC_POWER_EN in rtc module
-* Set rtc ALARM2 time
-* Enable ALARM2 interrupt
-
-Signed-off-by: Colin Foe-Parker <colin.foeparker@logicpd.com>
-[anilkumar@ti.com: move poweroff additions to rtc driver]
-Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
----
- Documentation/devicetree/bindings/rtc/rtc-omap.txt |  5 ++
- drivers/rtc/rtc-omap.c                             | 74 +++++++++++++++++++++-
- 2 files changed, 78 insertions(+), 1 deletion(-)
-
-diff --git a/Documentation/devicetree/bindings/rtc/rtc-omap.txt b/Documentation/devicetree/bindings/rtc/rtc-omap.txt
-index b47aa41..8d9f4f9 100644
---- a/Documentation/devicetree/bindings/rtc/rtc-omap.txt
-+++ b/Documentation/devicetree/bindings/rtc/rtc-omap.txt
-@@ -6,6 +6,10 @@ Required properties:
- - interrupts: rtc timer, alarm interrupts in order
- - interrupt-parent: phandle for the interrupt controller
- 
-+Optional properties:
-+- ti,system-power-controller: Telling whether or not rtc is controlling
-+  the system power.
-+
- Example:
- 
- rtc@1c23000 {
-@@ -14,4 +18,5 @@ rtc@1c23000 {
- 	interrupts = <19
- 		      19>;
- 	interrupt-parent = <&intc>;
-+	ti,system-power-controller;
- };
-diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
-index 6009714..e6d4878 100644
---- a/drivers/rtc/rtc-omap.c
-+++ b/drivers/rtc/rtc-omap.c
-@@ -72,6 +72,14 @@
- #define OMAP_RTC_KICK0_REG		0x6c
- #define OMAP_RTC_KICK1_REG		0x70
- 
-+#define OMAP_RTC_ALARM2_SECONDS_REG	0x80
-+#define OMAP_RTC_ALARM2_MINUTES_REG	0x84
-+#define OMAP_RTC_ALARM2_HOURS_REG	0x88
-+#define OMAP_RTC_ALARM2_DAYS_REG	0x8c
-+#define OMAP_RTC_ALARM2_MONTHS_REG	0x90
-+#define OMAP_RTC_ALARM2_YEARS_REG	0x94
-+#define OMAP_RTC_PMIC_REG		0x98
-+
- /* OMAP_RTC_CTRL_REG bit fields: */
- #define OMAP_RTC_CTRL_SPLIT		(1<<7)
- #define OMAP_RTC_CTRL_DISABLE		(1<<6)
-@@ -93,15 +101,21 @@
- #define OMAP_RTC_STATUS_BUSY            (1<<0)
- 
- /* OMAP_RTC_INTERRUPTS_REG bit fields: */
-+#define OMAP_RTC_INTERRUPTS_IT_ALARM2   (1<<4)
- #define OMAP_RTC_INTERRUPTS_IT_ALARM    (1<<3)
- #define OMAP_RTC_INTERRUPTS_IT_TIMER    (1<<2)
- 
-+/* OMAP_RTC_PMIC_REG bit fields: */
-+#define OMAP_RTC_PMIC_POWER_EN_EN       (1<<16)
-+
- /* OMAP_RTC_KICKER values */
- #define	KICK0_VALUE			0x83e70b13
- #define	KICK1_VALUE			0x95a4f1e0
- 
- #define	OMAP_RTC_HAS_KICKER		0x1
- 
-+#define SHUTDOWN_TIME_SEC		2
-+
- static void __iomem	*rtc_base;
- 
- #define rtc_read(addr)		readb(rtc_base + (addr))
-@@ -290,6 +304,56 @@ static int omap_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm)
- 	return 0;
- }
- 
-+/*
-+ * rtc_power_off: Set the pmic power off sequence. The RTC generates
-+ * pmic_pwr_enable control, which can be used to control an external
-+ * PMIC.
-+ */
-+static void rtc_power_off(void)
-+{
-+	u32 val;
-+	struct rtc_time tm;
-+	unsigned long time;
-+
-+	/* Set PMIC power enable */
-+	val = readl(rtc_base + OMAP_RTC_PMIC_REG);
-+	writel(val | OMAP_RTC_PMIC_POWER_EN_EN, rtc_base + OMAP_RTC_PMIC_REG);
-+
-+	/* Read rtc time */
-+	omap_rtc_read_time(NULL, &tm);
-+
-+	/* Convert Gregorian date to seconds since 01-01-1970 00:00:00 */
-+	rtc_tm_to_time(&tm, &time);
-+
-+	/* Add shutdown time to the current value */
-+	time += SHUTDOWN_TIME_SEC;
-+
-+	/* Convert seconds since 01-01-1970 00:00:00 to Gregorian date */
-+	rtc_time_to_tm(time, &tm);
-+
-+	if (tm2bcd(&tm) < 0)
-+		return;
-+
-+	pr_info("System will go to power_off state in approx. %d secs\n",
-+			SHUTDOWN_TIME_SEC);
-+
-+	/*
-+	 * pmic_pwr_enable is controlled by means of ALARM2 event. So here
-+	 * programming alarm2 expiry time and enabling alarm2 interrupt
-+	 */
-+	rtc_write(tm.tm_sec, OMAP_RTC_ALARM2_SECONDS_REG);
-+	rtc_write(tm.tm_min, OMAP_RTC_ALARM2_MINUTES_REG);
-+	rtc_write(tm.tm_hour, OMAP_RTC_ALARM2_HOURS_REG);
-+	rtc_write(tm.tm_mday, OMAP_RTC_ALARM2_DAYS_REG);
-+	rtc_write(tm.tm_mon, OMAP_RTC_ALARM2_MONTHS_REG);
-+	rtc_write(tm.tm_year, OMAP_RTC_ALARM2_YEARS_REG);
-+
-+	/* Enable alarm2 interrupt */
-+	val = readl(rtc_base + OMAP_RTC_INTERRUPTS_REG);
-+	writel(val | OMAP_RTC_INTERRUPTS_IT_ALARM2,
-+				rtc_base + OMAP_RTC_INTERRUPTS_REG);
-+}
-+
- static struct rtc_class_ops omap_rtc_ops = {
- 	.read_time	= omap_rtc_read_time,
- 	.set_time	= omap_rtc_set_time,
-@@ -327,12 +391,16 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
- 	struct resource		*res, *mem;
- 	struct rtc_device	*rtc;
- 	u8			reg, new_ctrl;
-+	bool			pm_off = false;
- 	const struct platform_device_id *id_entry;
- 	const struct of_device_id *of_id;
- 
- 	of_id = of_match_device(omap_rtc_of_match, &pdev->dev);
--	if (of_id)
-+	if (of_id) {
- 		pdev->id_entry = of_id->data;
-+		pm_off = of_property_read_bool(pdev->dev.of_node,
-+					"ti,system-power-controller");
-+	}
- 
- 	omap_rtc_timer = platform_get_irq(pdev, 0);
- 	if (omap_rtc_timer <= 0) {
-@@ -385,6 +453,10 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
- 	platform_set_drvdata(pdev, rtc);
- 	dev_set_drvdata(&rtc->dev, mem);
- 
-+	/* RTC power off */
-+	if (pm_off && !pm_power_off)
-+		pm_power_off = rtc_power_off;
-+
- 	/* clear pending irqs, and set 1/second periodic,
- 	 * which we'll use instead of update irqs
- 	 */
--- 
-1.8.1
-
diff --git a/patches/rtc/0003-ARM-dts-AM33XX-Set-pmic-shutdown-controller-for-Beag.patch b/patches/rtc/0003-ARM-dts-AM33XX-Set-pmic-shutdown-controller-for-Beag.patch
deleted file mode 100644
index 352fdb7cb9a6aa04205888140c82ff540cfeb78c..0000000000000000000000000000000000000000
--- a/patches/rtc/0003-ARM-dts-AM33XX-Set-pmic-shutdown-controller-for-Beag.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 30c90a0a27d6d30c2b4f620e448ff5d96af04382 Mon Sep 17 00:00:00 2001
-From: AnilKumar Ch <anilkumar@ti.com>
-Date: Wed, 31 Oct 2012 12:23:27 +0530
-Subject: [PATCH 3/4] ARM: dts: AM33XX: Set pmic-shutdown-controller for
- BeagleBone
-
-Set ti,pmic-shutdown-controller for BeagleBone in am335x-bone.dts
-file, this flag is used by the driver to set tps65217 PMIC status
-to OFF when PWR_EN toggle.
-
-Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
----
- arch/arm/boot/dts/am335x-bone.dts | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
-index b338f5b..feeebdd 100644
---- a/arch/arm/boot/dts/am335x-bone.dts
-+++ b/arch/arm/boot/dts/am335x-bone.dts
-@@ -121,6 +121,8 @@
- /include/ "tps65217.dtsi"
- 
- &tps {
-+	ti,pmic-shutdown-controller;
-+
- 	regulators {
- 		dcdc1_reg: regulator@0 {
- 			regulator-always-on;
--- 
-1.8.1
-
diff --git a/patches/rtc/0004-ARM-dts-AM33XX-Enable-system-power-off-control-in-am.patch b/patches/rtc/0004-ARM-dts-AM33XX-Enable-system-power-off-control-in-am.patch
deleted file mode 100644
index 1ec1ee71a4e761d8a3846a7393e5859a3a1e758a..0000000000000000000000000000000000000000
--- a/patches/rtc/0004-ARM-dts-AM33XX-Enable-system-power-off-control-in-am.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 1c89473dc7fff94a316b15df4a120fe83fc5e0e0 Mon Sep 17 00:00:00 2001
-From: AnilKumar Ch <anilkumar@ti.com>
-Date: Wed, 31 Oct 2012 13:23:14 +0530
-Subject: [PATCH 4/4] ARM: dts: AM33XX: Enable system power off control in
- am335x-bone
-
-Enable system power off control for BeagleBone in am335x-bone.dts file
-under rtc node. RTC is the incharge of controlling the system power.
-This flag is used by the driver to hook up the pm_power_off system call.
-
-Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
----
- arch/arm/boot/dts/am335x-bone.dts | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
-index feeebdd..a92d7d1 100644
---- a/arch/arm/boot/dts/am335x-bone.dts
-+++ b/arch/arm/boot/dts/am335x-bone.dts
-@@ -85,6 +85,10 @@
- 			dma-names = "gpioevt";
- 			gpio-evt = <&gpio3 2 0>;
- 		};
-+
-+		rtc@44e3e000 {
-+			ti,system-power-controller;
-+		};
- 	};
- 
- 	leds {
--- 
-1.8.1
-
diff --git a/patches/usb/0001-drivers-usb-phy-add-a-new-driver-for-usb-part-of-con.patch b/patches/usb/0001-drivers-usb-phy-add-a-new-driver-for-usb-part-of-con.patch
deleted file mode 100644
index 99e45005cffc16611ae823d120a4a7e5e662c725..0000000000000000000000000000000000000000
--- a/patches/usb/0001-drivers-usb-phy-add-a-new-driver-for-usb-part-of-con.patch
+++ /dev/null
@@ -1,381 +0,0 @@
-From bc47d1a2966d2a0d5bfeebccb56424d66248ee34 Mon Sep 17 00:00:00 2001
-From: Kishon Vijay Abraham I <kishon@ti.com>
-Date: Tue, 15 Jan 2013 08:42:52 +0000
-Subject: [PATCH 1/9] drivers: usb: phy: add a new driver for usb part of
- control module
-
-Added a new driver for the usb part of control module. This has an API
-to power on the USB2 phy and an API to write to the mailbox depending on
-whether MUSB has to act in host mode or in device mode.
-
-Writing to control module registers for doing the above task which was
-previously done in omap glue and in omap-usb2 phy will be removed.
-
-Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
----
- Documentation/devicetree/bindings/usb/omap-usb.txt |  21 ++-
- drivers/usb/phy/Kconfig                            |   9 +
- drivers/usb/phy/Makefile                           |   1 +
- drivers/usb/phy/omap-control-usb.c                 | 204 +++++++++++++++++++++
- include/linux/usb/omap_control_usb.h               |  73 ++++++++
- 5 files changed, 307 insertions(+), 1 deletion(-)
- create mode 100644 drivers/usb/phy/omap-control-usb.c
- create mode 100644 include/linux/usb/omap_control_usb.h
-
-diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt
-index 29a043e..d58dae3 100644
---- a/Documentation/devicetree/bindings/usb/omap-usb.txt
-+++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
-@@ -1,4 +1,4 @@
--OMAP GLUE
-+OMAP GLUE AND OTHER OMAP SPECIFIC COMPONENTS
- 
- OMAP MUSB GLUE
-  - compatible : Should be "ti,omap4-musb" or "ti,omap3-musb"
-@@ -31,3 +31,22 @@ Board specific device node entry
- 	mode = <3>;
- 	power = <50>;
- };
-+
-+OMAP CONTROL USB
-+
-+Required properties:
-+ - compatible: Should be "ti,omap-control-usb"
-+ - reg : Address and length of the register set for the device. It contains
-+   the address of "control_dev_conf" and "otghs_control".
-+ - reg-names: The names of the register addresses corresponding to the registers
-+   filled in "reg".
-+ - ti,has_mailbox: This is used to specify if the platform uses mailbox in
-+   control module.
-+
-+omap_control_usb@4a002300 {
-+	compatible = "ti,omap-control-usb";
-+	reg = <0x4a002300 0x4>,
-+	      <0x4a00233c 0x4>;
-+	reg-names = "control_dev_conf", "otghs_control";
-+	ti,has_mailbox;
-+};
-diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
-index 5de6e7f..a7277ee 100644
---- a/drivers/usb/phy/Kconfig
-+++ b/drivers/usb/phy/Kconfig
-@@ -14,6 +14,15 @@ config OMAP_USB2
- 	  The USB OTG controller communicates with the comparator using this
- 	  driver.
- 
-+config OMAP_CONTROL_USB
-+	tristate "OMAP CONTROL USB Driver"
-+	depends on ARCH_OMAP2PLUS
-+	help
-+	  Enable this to add support for the USB part present in the control
-+	  module. This driver has API to power on the PHY and to write to the
-+	  mailbox. The mailbox is present only in omap4 and the register to
-+	  power on the PHY is present in omap4 and omap5.
-+
- config USB_ISP1301
- 	tristate "NXP ISP1301 USB transceiver support"
- 	depends on USB || USB_GADGET
-diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile
-index 1a579a8..0dea4d2 100644
---- a/drivers/usb/phy/Makefile
-+++ b/drivers/usb/phy/Makefile
-@@ -5,6 +5,7 @@
- ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
- 
- obj-$(CONFIG_OMAP_USB2)			+= omap-usb2.o
-+obj-$(CONFIG_OMAP_CONTROL_USB)		+= omap-control-usb.o
- obj-$(CONFIG_USB_ISP1301)		+= isp1301.o
- obj-$(CONFIG_MV_U3D_PHY)		+= mv_u3d_phy.o
- obj-$(CONFIG_USB_EHCI_TEGRA)	+= tegra_usb_phy.o
-diff --git a/drivers/usb/phy/omap-control-usb.c b/drivers/usb/phy/omap-control-usb.c
-new file mode 100644
-index 0000000..bed41a9
---- /dev/null
-+++ b/drivers/usb/phy/omap-control-usb.c
-@@ -0,0 +1,204 @@
-+/*
-+ * omap-control-usb.c - The USB part of control module.
-+ *
-+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * Author: Kishon Vijay Abraham I <kishon@ti.com>
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/platform_device.h>
-+#include <linux/slab.h>
-+#include <linux/of.h>
-+#include <linux/err.h>
-+#include <linux/io.h>
-+#include <linux/usb/omap_control_usb.h>
-+
-+static struct omap_control_usb *control_usb;
-+
-+/**
-+ * get_omap_control_dev - returns the device pointer for this control device
-+ *
-+ * This API should be called to get the device pointer for this control
-+ * module device. This device pointer should be passed to all other API's
-+ * in this driver.
-+ *
-+ * To be used by PHY driver and glue driver
-+ */
-+struct device *get_omap_control_dev(void)
-+{
-+	if (!control_usb)
-+		return ERR_PTR(-ENODEV);
-+
-+	return control_usb->dev;
-+}
-+EXPORT_SYMBOL_GPL(get_omap_control_dev);
-+
-+/**
-+ * omap_control_usb_phy_power - power on/off the phy using control module reg
-+ * @dev: the control module device
-+ * @on: 0 or 1, based on powering on or off the PHY
-+ */
-+void omap_control_usb_phy_power(struct device *dev, int on)
-+{
-+	u32 val;
-+	struct omap_control_usb	*control_usb = dev_get_drvdata(dev);
-+
-+	if (on) {
-+		val = readl(control_usb->dev_conf);
-+		if (val & PHY_PD)
-+			writel(~PHY_PD, control_usb->dev_conf);
-+	} else {
-+		writel(PHY_PD, control_usb->dev_conf);
-+	}
-+}
-+EXPORT_SYMBOL_GPL(omap_control_usb_phy_power);
-+
-+/**
-+ * omap_control_usb_host_mode - set AVALID, VBUSVALID and ID pin in grounded
-+ * @dev: struct device *
-+ *
-+ * This is an API to write to the mailbox register to notify the usb core that
-+ * a usb device has been connected.
-+ */
-+void omap_control_usb_host_mode(struct device *dev)
-+{
-+	u32 val;
-+	struct omap_control_usb	*control_usb = dev_get_drvdata(dev);
-+
-+	val = AVALID | VBUSVALID;
-+
-+	writel(val, control_usb->otghs_control);
-+}
-+EXPORT_SYMBOL_GPL(omap_control_usb_host_mode);
-+
-+/**
-+ * omap_control_usb_device_mode - set AVALID, VBUSVALID and ID pin in high
-+ * impedance
-+ * @dev: struct device *
-+ *
-+ * This is an API to write to the mailbox register to notify the usb core that
-+ * it has been connected to a usb host.
-+ */
-+void omap_control_usb_device_mode(struct device *dev)
-+{
-+	u32 val;
-+	struct omap_control_usb	*control_usb = dev_get_drvdata(dev);
-+
-+	val = IDDIG | AVALID | VBUSVALID;
-+
-+	writel(val, control_usb->otghs_control);
-+}
-+EXPORT_SYMBOL_GPL(omap_control_usb_device_mode);
-+
-+/**
-+ * omap_control_usb_set_sessionend - Enable SESSIONEND and IDIG to high
-+ * impedance
-+ * @dev: struct device *
-+ *
-+ * This is an API to write to the mailbox register to notify the usb core
-+ * it's now in disconnected state.
-+ */
-+void omap_control_usb_set_sessionend(struct device *dev)
-+{
-+	u32 val;
-+	struct omap_control_usb	*control_usb = dev_get_drvdata(dev);
-+
-+	val = SESSEND | IDDIG;
-+
-+	writel(val, control_usb->otghs_control);
-+}
-+EXPORT_SYMBOL_GPL(omap_control_usb_set_sessionend);
-+
-+static int omap_control_usb_probe(struct platform_device *pdev)
-+{
-+	struct resource	*res;
-+	struct device_node *np = pdev->dev.of_node;
-+	struct omap_control_usb_platform_data *pdata = pdev->dev.platform_data;
-+
-+	control_usb = devm_kzalloc(&pdev->dev, sizeof(*control_usb),
-+	    GFP_KERNEL);
-+	if (!control_usb) {
-+		dev_err(&pdev->dev, "unable to alloc memory for control usb\n");
-+		return -ENOMEM;
-+	}
-+
-+	if (np) {
-+		control_usb->has_mailbox = of_property_read_bool(np,
-+		    "ti,has_mailbox");
-+	} else if (pdata) {
-+		control_usb->has_mailbox = pdata->has_mailbox;
-+	} else {
-+		dev_err(&pdev->dev, "no pdata present\n");
-+		return -EINVAL;
-+	}
-+
-+	control_usb->dev	= &pdev->dev;
-+
-+	res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-+	    "control_dev_conf");
-+	control_usb->dev_conf = devm_request_and_ioremap(&pdev->dev, res);
-+	if (control_usb->dev_conf == NULL) {
-+		dev_err(&pdev->dev, "Failed to obtain io memory\n");
-+		return -ENXIO;
-+	}
-+
-+	if (control_usb->has_mailbox) {
-+		res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-+		    "otghs_control");
-+		control_usb->otghs_control = devm_request_and_ioremap(
-+		    &pdev->dev, res);
-+		if (control_usb->otghs_control == NULL) {
-+			dev_err(&pdev->dev, "Failed to obtain io memory\n");
-+			return -ENXIO;
-+		}
-+	}
-+
-+	dev_set_drvdata(control_usb->dev, control_usb);
-+
-+	return 0;
-+}
-+
-+#ifdef CONFIG_OF
-+static const struct of_device_id omap_control_usb_id_table[] = {
-+	{ .compatible = "ti,omap-control-usb" },
-+	{}
-+};
-+MODULE_DEVICE_TABLE(of, omap_control_usb_id_table);
-+#endif
-+
-+static struct platform_driver omap_control_usb_driver = {
-+	.probe		= omap_control_usb_probe,
-+	.driver		= {
-+		.name	= "omap-control-usb",
-+		.owner	= THIS_MODULE,
-+		.of_match_table = of_match_ptr(omap_control_usb_id_table),
-+	},
-+};
-+
-+static int __init omap_control_usb_init(void)
-+{
-+	return platform_driver_register(&omap_control_usb_driver);
-+}
-+subsys_initcall(omap_control_usb_init);
-+
-+static void __exit omap_control_usb_exit(void)
-+{
-+	platform_driver_unregister(&omap_control_usb_driver);
-+}
-+module_exit(omap_control_usb_exit);
-+
-+MODULE_ALIAS("platform: omap_control_usb");
-+MODULE_AUTHOR("Texas Instruments Inc.");
-+MODULE_DESCRIPTION("OMAP CONTROL USB DRIVER");
-+MODULE_LICENSE("GPL v2");
-diff --git a/include/linux/usb/omap_control_usb.h b/include/linux/usb/omap_control_usb.h
-new file mode 100644
-index 0000000..fbc7407
---- /dev/null
-+++ b/include/linux/usb/omap_control_usb.h
-@@ -0,0 +1,73 @@
-+/*
-+ * omap_control_usb.h - Header file for the USB part of control module.
-+ *
-+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * Author: Kishon Vijay Abraham I <kishon@ti.com>
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ */
-+
-+#ifndef __OMAP_CONTROL_USB_H__
-+#define __OMAP_CONTROL_USB_H__
-+
-+struct omap_control_usb {
-+	struct device *dev;
-+
-+	u32 __iomem *dev_conf;
-+	u32 __iomem *otghs_control;
-+
-+	u8 has_mailbox:1;
-+};
-+
-+struct omap_control_usb_platform_data {
-+	u8 has_mailbox:1;
-+};
-+
-+#define	PHY_PD		BIT(0)
-+
-+#define	AVALID		BIT(0)
-+#define	BVALID		BIT(1)
-+#define	VBUSVALID	BIT(2)
-+#define	SESSEND		BIT(3)
-+#define	IDDIG		BIT(4)
-+
-+#if (defined(CONFIG_OMAP_CONTROL_USB) || \
-+				defined(CONFIG_OMAP_CONTROL_USB_MODULE))
-+extern struct device *get_omap_control_dev(void);
-+extern void omap_control_usb_phy_power(struct device *dev, int on);
-+extern void omap_control_usb_host_mode(struct device *dev);
-+extern void omap_control_usb_device_mode(struct device *dev);
-+extern void omap_control_usb_set_sessionend(struct device *dev);
-+#else
-+static inline struct device *get_omap_control_dev()
-+{
-+	return ERR_PTR(-ENODEV);
-+}
-+
-+static inline void omap_control_usb_phy_power(struct device *dev, int on)
-+{
-+}
-+
-+static inline void omap_control_usb_host_mode(struct device *dev)
-+{
-+}
-+
-+static inline void omap_control_usb_device_mode(struct device *dev)
-+{
-+}
-+
-+static inline void omap_control_usb_set_sessionend(struct device *dev)
-+{
-+}
-+#endif
-+
-+#endif	/* __OMAP_CONTROL_USB_H__ */
--- 
-1.8.1
-
diff --git a/patches/usb/0002-drivers-usb-start-using-the-control-module-driver.patch b/patches/usb/0002-drivers-usb-start-using-the-control-module-driver.patch
deleted file mode 100644
index 0208f787afeebcf8b343755e67f7ccac072f2668..0000000000000000000000000000000000000000
--- a/patches/usb/0002-drivers-usb-start-using-the-control-module-driver.patch
+++ /dev/null
@@ -1,408 +0,0 @@
-From 6773d11f624925a0e9c0b0389ab6d82deb410cd2 Mon Sep 17 00:00:00 2001
-From: Kishon Vijay Abraham I <kishon@ti.com>
-Date: Tue, 15 Jan 2013 08:42:55 +0000
-Subject: [PATCH 2/9] drivers: usb: start using the control module driver
-
-Start using the control module driver for powering on the PHY and for
-writing to the mailbox instead of writing to the control module
-registers on their own.
-
-Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
----
- Documentation/devicetree/bindings/usb/omap-usb.txt |  4 ++
- Documentation/devicetree/bindings/usb/usb-phy.txt  |  7 +--
- arch/arm/mach-omap2/omap_hwmod_44xx_data.c         | 13 -----
- drivers/usb/musb/Kconfig                           |  1 +
- drivers/usb/musb/omap2430.c                        | 64 +++++++++-------------
- drivers/usb/musb/omap2430.h                        |  9 ---
- drivers/usb/phy/Kconfig                            |  1 +
- drivers/usb/phy/omap-usb2.c                        | 38 +++----------
- include/linux/usb/omap_usb.h                       |  4 +-
- 9 files changed, 42 insertions(+), 99 deletions(-)
-
-diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt
-index d58dae3..3f0152b 100644
---- a/Documentation/devicetree/bindings/usb/omap-usb.txt
-+++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
-@@ -3,6 +3,9 @@ OMAP GLUE AND OTHER OMAP SPECIFIC COMPONENTS
- OMAP MUSB GLUE
-  - compatible : Should be "ti,omap4-musb" or "ti,omap3-musb"
-  - ti,hwmods : must be "usb_otg_hs"
-+ - ti,has_mailbox : to specify that omap uses an external mailbox
-+   (in control module) to communicate with the musb core during device connect
-+   and disconnect.
-  - multipoint : Should be "1" indicating the musb controller supports
-    multipoint. This is a MUSB configuration-specific setting.
-  - num_eps : Specifies the number of endpoints. This is also a
-@@ -20,6 +23,7 @@ SOC specific device node entry
- usb_otg_hs: usb_otg_hs@4a0ab000 {
- 	compatible = "ti,omap4-musb";
- 	ti,hwmods = "usb_otg_hs";
-+	ti,has_mailbox;
- 	multipoint = <1>;
- 	num_eps = <16>;
- 	ram_bits = <12>;
-diff --git a/Documentation/devicetree/bindings/usb/usb-phy.txt b/Documentation/devicetree/bindings/usb/usb-phy.txt
-index 80d4148..ee14cb7 100644
---- a/Documentation/devicetree/bindings/usb/usb-phy.txt
-+++ b/Documentation/devicetree/bindings/usb/usb-phy.txt
-@@ -4,14 +4,11 @@ OMAP USB2 PHY
- 
- Required properties:
-  - compatible: Should be "ti,omap-usb2"
-- - reg : Address and length of the register set for the device. Also
--add the address of control module dev conf register until a driver for
--control module is added
-+ - reg : Address and length of the register set for the device.
- 
- This is usually a subnode of ocp2scp to which it is connected.
- 
- usb2phy@4a0ad080 {
- 	compatible = "ti,omap-usb2";
--	reg = <0x4a0ad080 0x58>,
--	      <0x4a002300 0x4>;
-+	reg = <0x4a0ad080 0x58>;
- };
-diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
-index 129d508..103f4ba 100644
---- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
-+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
-@@ -2698,13 +2698,6 @@ static struct resource omap44xx_usb_phy_and_pll_addrs[] = {
- 		.end		= 0x4a0ae000,
- 		.flags		= IORESOURCE_MEM,
- 	},
--	{
--		/* XXX: Remove this once control module driver is in place */
--		.name		= "ctrl_dev",
--		.start		= 0x4a002300,
--		.end		= 0x4a002303,
--		.flags		= IORESOURCE_MEM,
--	},
- 	{ }
- };
- 
-@@ -6152,12 +6145,6 @@ static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
- 		.pa_end		= 0x4a0ab7ff,
- 		.flags		= ADDR_TYPE_RT
- 	},
--	{
--		/* XXX: Remove this once control module driver is in place */
--		.pa_start	= 0x4a00233c,
--		.pa_end		= 0x4a00233f,
--		.flags		= ADDR_TYPE_RT
--	},
- 	{ }
- };
- 
-diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
-index 23a0b7f..de6e5ce 100644
---- a/drivers/usb/musb/Kconfig
-+++ b/drivers/usb/musb/Kconfig
-@@ -11,6 +11,7 @@ config USB_MUSB_HDRC
- 	select NOP_USB_XCEIV if (SOC_TI81XX || SOC_AM33XX)
- 	select TWL4030_USB if MACH_OMAP_3430SDP
- 	select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA
-+	select OMAP_CONTROL_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA
- 	select USB_OTG_UTILS
- 	help
- 	  Say Y here if your system has a dual role high speed USB
-diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
-index da00af4..3e7ceef 100644
---- a/drivers/usb/musb/omap2430.c
-+++ b/drivers/usb/musb/omap2430.c
-@@ -37,6 +37,7 @@
- #include <linux/err.h>
- #include <linux/delay.h>
- #include <linux/usb/musb-omap.h>
-+#include <linux/usb/omap_control_usb.h>
- 
- #include "musb_core.h"
- #include "omap2430.h"
-@@ -46,7 +47,7 @@ struct omap2430_glue {
- 	struct platform_device	*musb;
- 	enum omap_musb_vbus_id_status status;
- 	struct work_struct	omap_musb_mailbox_work;
--	u32 __iomem		*control_otghs;
-+	struct device		*control_otghs;
- };
- #define glue_to_musb(g)		platform_get_drvdata(g->musb)
- 
-@@ -54,26 +55,6 @@ struct omap2430_glue		*_glue;
- 
- static struct timer_list musb_idle_timer;
- 
--/**
-- * omap4_usb_phy_mailbox - write to usb otg mailbox
-- * @glue: struct omap2430_glue *
-- * @val: the value to be written to the mailbox
-- *
-- * On detection of a device (ID pin is grounded), this API should be called
-- * to set AVALID, VBUSVALID and ID pin is grounded.
-- *
-- * When OMAP is connected to a host (OMAP in device mode), this API
-- * is called to set AVALID, VBUSVALID and ID pin in high impedance.
-- *
-- * XXX: This function will be removed once we have a seperate driver for
-- * control module
-- */
--static void omap4_usb_phy_mailbox(struct omap2430_glue *glue, u32 val)
--{
--	if (glue->control_otghs)
--		writel(val, glue->control_otghs);
--}
--
- static void musb_do_idle(unsigned long _musb)
- {
- 	struct musb	*musb = (void *)_musb;
-@@ -269,7 +250,6 @@ EXPORT_SYMBOL_GPL(omap_musb_mailbox);
- 
- static void omap_musb_set_mailbox(struct omap2430_glue *glue)
- {
--	u32 val;
- 	struct musb *musb = glue_to_musb(glue);
- 	struct device *dev = musb->controller;
- 	struct musb_hdrc_platform_data *pdata = dev->platform_data;
-@@ -285,8 +265,8 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue)
- 		musb->xceiv->last_event = USB_EVENT_ID;
- 		if (musb->gadget_driver) {
- 			pm_runtime_get_sync(dev);
--			val = AVALID | VBUSVALID;
--			omap4_usb_phy_mailbox(glue, val);
-+			if (!IS_ERR(glue->control_otghs))
-+				omap_control_usb_host_mode(glue->control_otghs);
- 			omap2430_musb_set_vbus(musb, 1);
- 		}
- 		break;
-@@ -299,8 +279,8 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue)
- 		musb->xceiv->last_event = USB_EVENT_VBUS;
- 		if (musb->gadget_driver)
- 			pm_runtime_get_sync(dev);
--		val = IDDIG | AVALID | VBUSVALID;
--		omap4_usb_phy_mailbox(glue, val);
-+		if (!IS_ERR(glue->control_otghs))
-+			omap_control_usb_device_mode(glue->control_otghs);
- 		break;
- 
- 	case OMAP_MUSB_ID_FLOAT:
-@@ -317,8 +297,8 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue)
- 			if (musb->xceiv->otg->set_vbus)
- 				otg_set_vbus(musb->xceiv->otg, 0);
- 		}
--		val = SESSEND | IDDIG;
--		omap4_usb_phy_mailbox(glue, val);
-+		if (!IS_ERR(glue->control_otghs))
-+			omap_control_usb_set_sessionend(glue->control_otghs);
- 		break;
- 	default:
- 		dev_dbg(dev, "ID float\n");
-@@ -415,7 +395,6 @@ err1:
- static void omap2430_musb_enable(struct musb *musb)
- {
- 	u8		devctl;
--	u32		val;
- 	unsigned long timeout = jiffies + msecs_to_jiffies(1000);
- 	struct device *dev = musb->controller;
- 	struct omap2430_glue *glue = dev_get_drvdata(dev->parent);
-@@ -425,8 +404,8 @@ static void omap2430_musb_enable(struct musb *musb)
- 	switch (glue->status) {
- 
- 	case OMAP_MUSB_ID_GROUND:
--		val = AVALID | VBUSVALID;
--		omap4_usb_phy_mailbox(glue, val);
-+		if (!IS_ERR(glue->control_otghs))
-+			omap_control_usb_host_mode(glue->control_otghs);
- 		if (data->interface_type != MUSB_INTERFACE_UTMI)
- 			break;
- 		devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
-@@ -445,8 +424,8 @@ static void omap2430_musb_enable(struct musb *musb)
- 		break;
- 
- 	case OMAP_MUSB_VBUS_VALID:
--		val = IDDIG | AVALID | VBUSVALID;
--		omap4_usb_phy_mailbox(glue, val);
-+		if (!IS_ERR(glue->control_otghs))
-+			omap_control_usb_device_mode(glue->control_otghs);
- 		break;
- 
- 	default:
-@@ -456,13 +435,12 @@ static void omap2430_musb_enable(struct musb *musb)
- 
- static void omap2430_musb_disable(struct musb *musb)
- {
--	u32 val;
- 	struct device *dev = musb->controller;
- 	struct omap2430_glue *glue = dev_get_drvdata(dev->parent);
- 
- 	if (glue->status != OMAP_MUSB_UNKNOWN) {
--		val = SESSEND | IDDIG;
--		omap4_usb_phy_mailbox(glue, val);
-+		if (!IS_ERR(glue->control_otghs))
-+			omap_control_usb_set_sessionend(glue->control_otghs);
- 	}
- }
- 
-@@ -523,9 +501,6 @@ static int omap2430_probe(struct platform_device *pdev)
- 
- 	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- 
--	glue->control_otghs = devm_request_and_ioremap(&pdev->dev, res);
--	if (glue->control_otghs == NULL)
--		dev_dbg(&pdev->dev, "Failed to obtain control memory\n");
- 
- 	if (np) {
- 		pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
-@@ -558,11 +533,22 @@ static int omap2430_probe(struct platform_device *pdev)
- 		of_property_read_u32(np, "ram_bits", (u32 *)&config->ram_bits);
- 		of_property_read_u32(np, "power", (u32 *)&pdata->power);
- 		config->multipoint = of_property_read_bool(np, "multipoint");
-+		pdata->has_mailbox = of_property_read_bool(np,
-+		    "ti,has_mailbox");
- 
- 		pdata->board_data	= data;
- 		pdata->config		= config;
- 	}
- 
-+	if (pdata->has_mailbox) {
-+		glue->control_otghs = get_omap_control_dev();
-+		if (IS_ERR(glue->control_otghs)) {
-+			dev_vdbg(&pdev->dev, "Failed to get control device\n");
-+			return -ENODEV;
-+		}
-+	} else {
-+		glue->control_otghs = ERR_PTR(-ENODEV);
-+	}
- 	pdata->platform_ops		= &omap2430_ops;
- 
- 	platform_set_drvdata(pdev, glue);
-diff --git a/drivers/usb/musb/omap2430.h b/drivers/usb/musb/omap2430.h
-index 8ef6566..1b5e83a 100644
---- a/drivers/usb/musb/omap2430.h
-+++ b/drivers/usb/musb/omap2430.h
-@@ -49,13 +49,4 @@
- #define OTG_FORCESTDBY		0x414
- #	define	ENABLEFORCE		(1 << 0)
- 
--/*
-- * Control Module bit definitions
-- * XXX: Will be removed once we have a driver for control module.
-- */
--#define	AVALID				BIT(0)
--#define	BVALID				BIT(1)
--#define	VBUSVALID			BIT(2)
--#define	SESSEND				BIT(3)
--#define	IDDIG				BIT(4)
- #endif	/* __MUSB_OMAP243X_H__ */
-diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
-index a7277ee..16bdaca 100644
---- a/drivers/usb/phy/Kconfig
-+++ b/drivers/usb/phy/Kconfig
-@@ -8,6 +8,7 @@ config OMAP_USB2
- 	tristate "OMAP USB2 PHY Driver"
- 	depends on ARCH_OMAP2PLUS
- 	select USB_OTG_UTILS
-+	select OMAP_CONTROL_USB
- 	help
- 	  Enable this to support the transceiver that is part of SOC. This
- 	  driver takes care of all the PHY functionality apart from comparator.
-diff --git a/drivers/usb/phy/omap-usb2.c b/drivers/usb/phy/omap-usb2.c
-index 26ae8f4..2152ce4 100644
---- a/drivers/usb/phy/omap-usb2.c
-+++ b/drivers/usb/phy/omap-usb2.c
-@@ -27,6 +27,7 @@
- #include <linux/err.h>
- #include <linux/pm_runtime.h>
- #include <linux/delay.h>
-+#include <linux/usb/omap_control_usb.h>
- 
- /**
-  * omap_usb2_set_comparator - links the comparator present in the sytem with
-@@ -52,29 +53,6 @@ int omap_usb2_set_comparator(struct phy_companion *comparator)
- }
- EXPORT_SYMBOL_GPL(omap_usb2_set_comparator);
- 
--/**
-- * omap_usb_phy_power - power on/off the phy using control module reg
-- * @phy: struct omap_usb *
-- * @on: 0 or 1, based on powering on or off the PHY
-- *
-- * XXX: Remove this function once control module driver gets merged
-- */
--static void omap_usb_phy_power(struct omap_usb *phy, int on)
--{
--	u32 val;
--
--	if (on) {
--		val = readl(phy->control_dev);
--		if (val & PHY_PD) {
--			writel(~PHY_PD, phy->control_dev);
--			/* XXX: add proper documentation for this delay */
--			mdelay(200);
--		}
--	} else {
--		writel(PHY_PD, phy->control_dev);
--	}
--}
--
- static int omap_usb_set_vbus(struct usb_otg *otg, bool enabled)
- {
- 	struct omap_usb *phy = phy_to_omapusb(otg->phy);
-@@ -124,7 +102,7 @@ static int omap_usb2_suspend(struct usb_phy *x, int suspend)
- 	struct omap_usb *phy = phy_to_omapusb(x);
- 
- 	if (suspend && !phy->is_suspended) {
--		omap_usb_phy_power(phy, 0);
-+		omap_control_usb_phy_power(phy->control_dev, 0);
- 		pm_runtime_put_sync(phy->dev);
- 		phy->is_suspended = 1;
- 	} else if (!suspend && phy->is_suspended) {
-@@ -134,7 +112,7 @@ static int omap_usb2_suspend(struct usb_phy *x, int suspend)
- 									ret);
- 			return ret;
- 		}
--		omap_usb_phy_power(phy, 1);
-+		omap_control_usb_phy_power(phy->control_dev, 1);
- 		phy->is_suspended = 0;
- 	}
- 
-@@ -168,14 +146,14 @@ static int omap_usb2_probe(struct platform_device *pdev)
- 
- 	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- 
--	phy->control_dev = devm_request_and_ioremap(&pdev->dev, res);
--	if (phy->control_dev == NULL) {
--		dev_err(&pdev->dev, "Failed to obtain io memory\n");
--		return -ENXIO;
-+	phy->control_dev = get_omap_control_dev();
-+	if (IS_ERR(phy->control_dev)) {
-+		dev_dbg(&pdev->dev, "Failed to get control device\n");
-+		return -ENODEV;
- 	}
- 
- 	phy->is_suspended	= 1;
--	omap_usb_phy_power(phy, 0);
-+	omap_control_usb_phy_power(phy->control_dev, 0);
- 
- 	otg->set_host		= omap_usb_set_host;
- 	otg->set_peripheral	= omap_usb_set_peripheral;
-diff --git a/include/linux/usb/omap_usb.h b/include/linux/usb/omap_usb.h
-index 0ea17f8..3db9b53 100644
---- a/include/linux/usb/omap_usb.h
-+++ b/include/linux/usb/omap_usb.h
-@@ -25,13 +25,11 @@ struct omap_usb {
- 	struct usb_phy		phy;
- 	struct phy_companion	*comparator;
- 	struct device		*dev;
--	u32 __iomem		*control_dev;
-+	struct device		*control_dev;
- 	struct clk		*wkupclk;
- 	u8			is_suspended:1;
- };
- 
--#define	PHY_PD	0x1
--
- #define	phy_to_omapusb(x)	container_of((x), struct omap_usb, phy)
- 
- #if defined(CONFIG_OMAP_USB2) || defined(CONFIG_OMAP_USB2_MODULE)
--- 
-1.8.1
-
diff --git a/patches/usb/0003-usb-otg-Add-an-API-to-bind-the-USB-controller-and-PH.patch b/patches/usb/0003-usb-otg-Add-an-API-to-bind-the-USB-controller-and-PH.patch
deleted file mode 100644
index 0382f4c742bd172dd13082483ddbd52ffa3df6fc..0000000000000000000000000000000000000000
--- a/patches/usb/0003-usb-otg-Add-an-API-to-bind-the-USB-controller-and-PH.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From 8d4a14437c797f2a6f117d147647cdceb1da282f Mon Sep 17 00:00:00 2001
-From: Kishon Vijay Abraham I <kishon@ti.com>
-Date: Tue, 22 Jan 2013 09:58:09 +0000
-Subject: [PATCH 3/9] usb: otg: Add an API to bind the USB controller and PHY
-
-In order to support platforms which has multiple PHY's (of same type) and
-which has multiple USB controllers, a new design is adopted wherin the binding
-information (between the PHY and the USB controller) should be passed to the
-PHY library from platform specific file (board file).
-So added a new API to pass the binding information.
-
-Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
----
- drivers/usb/otg/otg.c   | 37 +++++++++++++++++++++++++++++++++++++
- include/linux/usb/phy.h | 22 ++++++++++++++++++++++
- 2 files changed, 59 insertions(+)
-
-diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c
-index a30c041..492ba2f 100644
---- a/drivers/usb/otg/otg.c
-+++ b/drivers/usb/otg/otg.c
-@@ -18,6 +18,7 @@
- #include <linux/usb/otg.h>
- 
- static LIST_HEAD(phy_list);
-+static LIST_HEAD(phy_bind_list);
- static DEFINE_SPINLOCK(phy_lock);
- 
- static struct usb_phy *__usb_find_phy(struct list_head *list,
-@@ -201,6 +202,42 @@ void usb_remove_phy(struct usb_phy *x)
- }
- EXPORT_SYMBOL(usb_remove_phy);
- 
-+/**
-+ * usb_bind_phy - bind the phy and the controller that uses the phy
-+ * @dev_name: the device name of the device that will bind to the phy
-+ * @index: index to specify the port number
-+ * @phy_dev_name: the device name of the phy
-+ *
-+ * Fills the phy_bind structure with the dev_name and phy_dev_name. This will
-+ * be used when the phy driver registers the phy and when the controller
-+ * requests this phy.
-+ *
-+ * To be used by platform specific initialization code.
-+ */
-+struct usb_phy_bind __init *usb_bind_phy(const char *dev_name, u8 index,
-+				const char *phy_dev_name)
-+{
-+	struct usb_phy_bind *phy_bind;
-+	unsigned long flags;
-+
-+	phy_bind = kzalloc(sizeof(*phy_bind), GFP_KERNEL);
-+	if (!phy_bind) {
-+		pr_err("phy_bind(): No memory for phy_bind");
-+		return ERR_PTR(-ENOMEM);
-+	}
-+
-+	phy_bind->dev_name = dev_name;
-+	phy_bind->phy_dev_name = phy_dev_name;
-+	phy_bind->index = index;
-+
-+	spin_lock_irqsave(&phy_lock, flags);
-+	list_add_tail(&phy_bind->list, &phy_bind_list);
-+	spin_unlock_irqrestore(&phy_lock, flags);
-+
-+	return phy_bind;
-+}
-+EXPORT_SYMBOL_GPL(usb_bind_phy);
-+
- const char *otg_state_string(enum usb_otg_state state)
- {
- 	switch (state) {
-diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
-index a29ae1e..fbeab1a 100644
---- a/include/linux/usb/phy.h
-+++ b/include/linux/usb/phy.h
-@@ -106,6 +106,21 @@ struct usb_phy {
- 			enum usb_device_speed speed);
- };
- 
-+/**
-+ * struct usb_phy_bind - represent the binding for the phy
-+ * @dev_name: the device name of the device that will bind to the phy
-+ * @phy_dev_name: the device name of the phy
-+ * @index: used if a single controller uses multiple phys
-+ * @phy: reference to the phy
-+ * @list: to maintain a linked list of the binding information
-+ */
-+struct usb_phy_bind {
-+	const char	*dev_name;
-+	const char	*phy_dev_name;
-+	u8		index;
-+	struct usb_phy	*phy;
-+	struct list_head list;
-+};
- 
- /* for board-specific init logic */
- extern int usb_add_phy(struct usb_phy *, enum usb_phy_type type);
-@@ -151,6 +166,8 @@ extern struct usb_phy *devm_usb_get_phy(struct device *dev,
- 	enum usb_phy_type type);
- extern void usb_put_phy(struct usb_phy *);
- extern void devm_usb_put_phy(struct device *dev, struct usb_phy *x);
-+extern struct usb_phy_bind *usb_bind_phy(const char *dev_name, u8 index,
-+				const char *phy_dev_name);
- #else
- static inline struct usb_phy *usb_get_phy(enum usb_phy_type type)
- {
-@@ -171,6 +188,11 @@ static inline void devm_usb_put_phy(struct device *dev, struct usb_phy *x)
- {
- }
- 
-+static inline struct usb_phy_bind *usb_bind_phy(const char *dev_name, u8 index,
-+				const char *phy_dev_name)
-+{
-+	return NULL;
-+}
- #endif
- 
- static inline int
--- 
-1.8.1
-
diff --git a/patches/usb/0004-usb-otg-utils-add-facilities-in-phy-lib-to-support-m.patch b/patches/usb/0004-usb-otg-utils-add-facilities-in-phy-lib-to-support-m.patch
deleted file mode 100644
index e0b1d1e8be84d7f3305edcfaac06aa3c5d55ee89..0000000000000000000000000000000000000000
--- a/patches/usb/0004-usb-otg-utils-add-facilities-in-phy-lib-to-support-m.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-From 643771589b2c3d999d3fcf3afc360d6c425edf21 Mon Sep 17 00:00:00 2001
-From: Kishon Vijay Abraham I <kishon@ti.com>
-Date: Tue, 22 Jan 2013 09:58:10 +0000
-Subject: [PATCH 4/9] usb: otg: utils: add facilities in phy lib to support
- multiple PHYs of same type
-
-In order to add support for multipe PHY's of the same type, new API's
-for adding PHY and getting PHY has been added. Now the binding
-information for the PHY and controller should be done in platform file
-using usb_bind_phy API. And for getting a PHY, the device pointer of the
-USB controller and an index should be passed. Based on the binding
-information that is added in the platform file, usb_get_phy_dev will return the
-appropriate PHY.
-Already existing API's to add and get phy by type is not removed. These
-API's are deprecated and will be removed once all the platforms start to
-use the new API.
-
-Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
----
- drivers/usb/otg/otg.c   | 114 +++++++++++++++++++++++++++++++++++++++++++++++-
- include/linux/usb/phy.h |  13 ++++++
- 2 files changed, 126 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c
-index 492ba2f..1f30b22 100644
---- a/drivers/usb/otg/otg.c
-+++ b/drivers/usb/otg/otg.c
-@@ -36,6 +36,20 @@ static struct usb_phy *__usb_find_phy(struct list_head *list,
- 	return ERR_PTR(-ENODEV);
- }
- 
-+static struct usb_phy *__usb_find_phy_dev(struct device *dev,
-+	struct list_head *list, u8 index)
-+{
-+	struct usb_phy_bind *phy_bind = NULL;
-+
-+	list_for_each_entry(phy_bind, list, list) {
-+		if (!(strcmp(phy_bind->dev_name, dev_name(dev))) &&
-+				phy_bind->index == index)
-+			return phy_bind->phy;
-+	}
-+
-+	return ERR_PTR(-ENODEV);
-+}
-+
- static void devm_usb_phy_release(struct device *dev, void *res)
- {
- 	struct usb_phy *phy = *(struct usb_phy **)res;
-@@ -112,6 +126,69 @@ err0:
- EXPORT_SYMBOL(usb_get_phy);
- 
- /**
-+ * usb_get_phy_dev - find the USB PHY
-+ * @dev - device that requests this phy
-+ * @index - the index of the phy
-+ *
-+ * Returns the phy driver, after getting a refcount to it; or
-+ * -ENODEV if there is no such phy.  The caller is responsible for
-+ * calling usb_put_phy() to release that count.
-+ *
-+ * For use by USB host and peripheral drivers.
-+ */
-+struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index)
-+{
-+	struct usb_phy	*phy = NULL;
-+	unsigned long	flags;
-+
-+	spin_lock_irqsave(&phy_lock, flags);
-+
-+	phy = __usb_find_phy_dev(dev, &phy_bind_list, index);
-+	if (IS_ERR(phy)) {
-+		pr_err("unable to find transceiver\n");
-+		goto err0;
-+	}
-+
-+	get_device(phy->dev);
-+
-+err0:
-+	spin_unlock_irqrestore(&phy_lock, flags);
-+
-+	return phy;
-+}
-+EXPORT_SYMBOL(usb_get_phy_dev);
-+
-+/**
-+ * devm_usb_get_phy_dev - find the USB PHY using device ptr and index
-+ * @dev - device that requests this phy
-+ * @index - the index of the phy
-+ *
-+ * Gets the phy using usb_get_phy_dev(), and associates a device with it using
-+ * devres. On driver detach, release function is invoked on the devres data,
-+ * then, devres data is freed.
-+ *
-+ * For use by USB host and peripheral drivers.
-+ */
-+struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index)
-+{
-+	struct usb_phy **ptr, *phy;
-+
-+	ptr = devres_alloc(devm_usb_phy_release, sizeof(*ptr), GFP_KERNEL);
-+	if (!ptr)
-+		return NULL;
-+
-+	phy = usb_get_phy_dev(dev, index);
-+	if (!IS_ERR(phy)) {
-+		*ptr = phy;
-+		devres_add(dev, ptr);
-+	} else
-+		devres_free(ptr);
-+
-+	return phy;
-+}
-+EXPORT_SYMBOL(devm_usb_get_phy_dev);
-+
-+/**
-  * devm_usb_put_phy - release the USB PHY
-  * @dev - device that wants to release this phy
-  * @phy - the phy returned by devm_usb_get_phy()
-@@ -186,6 +263,36 @@ out:
- EXPORT_SYMBOL(usb_add_phy);
- 
- /**
-+ * usb_add_phy_dev - declare the USB PHY
-+ * @x: the USB phy to be used; or NULL
-+ *
-+ * This call is exclusively for use by phy drivers, which
-+ * coordinate the activities of drivers for host and peripheral
-+ * controllers, and in some cases for VBUS current regulation.
-+ */
-+int usb_add_phy_dev(struct usb_phy *x)
-+{
-+	struct usb_phy_bind *phy_bind;
-+	unsigned long flags;
-+
-+	if (!x->dev) {
-+		dev_err(x->dev, "no device provided for PHY\n");
-+		return -EINVAL;
-+	}
-+
-+	spin_lock_irqsave(&phy_lock, flags);
-+	list_for_each_entry(phy_bind, &phy_bind_list, list)
-+		if (!(strcmp(phy_bind->phy_dev_name, dev_name(x->dev))))
-+			phy_bind->phy = x;
-+
-+	list_add_tail(&x->head, &phy_list);
-+
-+	spin_unlock_irqrestore(&phy_lock, flags);
-+	return 0;
-+}
-+EXPORT_SYMBOL(usb_add_phy_dev);
-+
-+/**
-  * usb_remove_phy - remove the OTG PHY
-  * @x: the USB OTG PHY to be removed;
-  *
-@@ -194,10 +301,15 @@ EXPORT_SYMBOL(usb_add_phy);
- void usb_remove_phy(struct usb_phy *x)
- {
- 	unsigned long	flags;
-+	struct usb_phy_bind *phy_bind;
- 
- 	spin_lock_irqsave(&phy_lock, flags);
--	if (x)
-+	if (x) {
-+		list_for_each_entry(phy_bind, &phy_bind_list, list)
-+			if (phy_bind->phy == x)
-+				phy_bind->phy = NULL;
- 		list_del(&x->head);
-+	}
- 	spin_unlock_irqrestore(&phy_lock, flags);
- }
- EXPORT_SYMBOL(usb_remove_phy);
-diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
-index fbeab1a..3a9ae3e 100644
---- a/include/linux/usb/phy.h
-+++ b/include/linux/usb/phy.h
-@@ -124,6 +124,7 @@ struct usb_phy_bind {
- 
- /* for board-specific init logic */
- extern int usb_add_phy(struct usb_phy *, enum usb_phy_type type);
-+extern int usb_add_phy_dev(struct usb_phy *);
- extern void usb_remove_phy(struct usb_phy *);
- 
- /* helpers for direct access thru low-level io interface */
-@@ -164,6 +165,8 @@ usb_phy_shutdown(struct usb_phy *x)
- extern struct usb_phy *usb_get_phy(enum usb_phy_type type);
- extern struct usb_phy *devm_usb_get_phy(struct device *dev,
- 	enum usb_phy_type type);
-+extern struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index);
-+extern struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index);
- extern void usb_put_phy(struct usb_phy *);
- extern void devm_usb_put_phy(struct device *dev, struct usb_phy *x);
- extern struct usb_phy_bind *usb_bind_phy(const char *dev_name, u8 index,
-@@ -180,6 +183,16 @@ static inline struct usb_phy *devm_usb_get_phy(struct device *dev,
- 	return NULL;
- }
- 
-+static inline struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index)
-+{
-+	return NULL;
-+}
-+
-+static inline struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index)
-+{
-+	return NULL;
-+}
-+
- static inline void usb_put_phy(struct usb_phy *x)
- {
- }
--- 
-1.8.1
-
diff --git a/patches/usb/0005-ARM-OMAP-USB-Add-phy-binding-information.patch b/patches/usb/0005-ARM-OMAP-USB-Add-phy-binding-information.patch
deleted file mode 100644
index 73356bb8832001c0610f36a826f58572cdc9cd50..0000000000000000000000000000000000000000
--- a/patches/usb/0005-ARM-OMAP-USB-Add-phy-binding-information.patch
+++ /dev/null
@@ -1,375 +0,0 @@
-From fcbcebe52e55a5435efdc801a83177506c4ce702 Mon Sep 17 00:00:00 2001
-From: Kishon Vijay Abraham I <kishon@ti.com>
-Date: Tue, 22 Jan 2013 09:58:11 +0000
-Subject: [PATCH 5/9] ARM: OMAP: USB: Add phy binding information
-
-This is w.r.t the changes in PHY library to support adding and getting
-multiple PHYs of the same type. In the new design, the
-binding information between the PHY and the USB controller should be
-specified in the platform specific initialization code. So it's been
-done here for OMAP platforms.
-
-Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
----
- arch/arm/mach-omap2/board-2430sdp.c          |    2 ++
- arch/arm/mach-omap2/board-3430sdp.c          |    2 ++
- arch/arm/mach-omap2/board-4430sdp.c          |    2 ++
- arch/arm/mach-omap2/board-cm-t35.c           |    2 ++
- arch/arm/mach-omap2/board-devkit8000.c       |    2 ++
- arch/arm/mach-omap2/board-igep0020.c         |    2 ++
- arch/arm/mach-omap2/board-ldp.c              |    2 ++
- arch/arm/mach-omap2/board-omap3beagle.c      |    2 ++
- arch/arm/mach-omap2/board-omap3evm.c         |    2 ++
- arch/arm/mach-omap2/board-omap3logic.c       |    2 ++
- arch/arm/mach-omap2/board-omap3pandora.c     |    2 ++
- arch/arm/mach-omap2/board-omap3stalker.c     |    2 ++
- arch/arm/mach-omap2/board-omap3touchbook.c   |    2 ++
- arch/arm/mach-omap2/board-omap4panda.c       |    2 ++
- arch/arm/mach-omap2/board-overo.c            |    2 ++
- arch/arm/mach-omap2/board-rm680.c            |    2 ++
- arch/arm/mach-omap2/board-zoom-peripherals.c |    2 ++
- 17 files changed, 34 insertions(+)
-
-diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
-index 4815ea6..1337f2c 100644
---- a/arch/arm/mach-omap2/board-2430sdp.c
-+++ b/arch/arm/mach-omap2/board-2430sdp.c
-@@ -27,6 +27,7 @@
- #include <linux/clk.h>
- #include <linux/io.h>
- #include <linux/gpio.h>
-+#include <linux/usb/phy.h>
- 
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-@@ -263,6 +264,7 @@ static void __init omap_2430sdp_init(void)
- 	omap_hsmmc_init(mmc);
- 
- 	omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
-+	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
- 	usb_musb_init(NULL);
- 
- 	board_smc91x_init();
-diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
-index bb73afc..8a2e242 100644
---- a/arch/arm/mach-omap2/board-3430sdp.c
-+++ b/arch/arm/mach-omap2/board-3430sdp.c
-@@ -25,6 +25,7 @@
- #include <linux/gpio.h>
- #include <linux/mmc/host.h>
- #include <linux/platform_data/spi-omap2-mcspi.h>
-+#include <linux/usb/phy.h>
- 
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-@@ -579,6 +580,7 @@ static void __init omap_3430sdp_init(void)
- 	omap_ads7846_init(1, gpio_pendown, 310, NULL);
- 	omap_serial_init();
- 	omap_sdrc_init(hyb18m512160af6_sdrc_params, NULL);
-+	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
- 	usb_musb_init(NULL);
- 	board_smc91x_init();
- 	board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);
-diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
-index 1cc6696..8e8efcc 100644
---- a/arch/arm/mach-omap2/board-4430sdp.c
-+++ b/arch/arm/mach-omap2/board-4430sdp.c
-@@ -28,6 +28,7 @@
- #include <linux/leds_pwm.h>
- #include <linux/platform_data/omap4-keypad.h>
- #include <linux/usb/musb.h>
-+#include <linux/usb/phy.h>
- 
- #include <asm/hardware/gic.h>
- #include <asm/mach-types.h>
-@@ -696,6 +697,7 @@ static void __init omap_4430sdp_init(void)
- 	omap4_sdp4430_wifi_init();
- 	omap4_twl6030_hsmmc_init(mmc);
- 
-+	usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto");
- 	usb_musb_init(&musb_board_data);
- 
- 	status = omap_ethernet_init();
-diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
-index b3102c2..f1172f2 100644
---- a/arch/arm/mach-omap2/board-cm-t35.c
-+++ b/arch/arm/mach-omap2/board-cm-t35.c
-@@ -30,6 +30,7 @@
- #include <linux/regulator/fixed.h>
- #include <linux/regulator/machine.h>
- #include <linux/mmc/host.h>
-+#include <linux/usb/phy.h>
- 
- #include <linux/spi/spi.h>
- #include <linux/spi/tdo24m.h>
-@@ -724,6 +725,7 @@ static void __init cm_t3x_common_init(void)
- 	cm_t35_init_display();
- 	omap_twl4030_audio_init("cm-t3x");
- 
-+	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
- 	usb_musb_init(NULL);
- 	cm_t35_init_usbh();
- 	cm_t35_init_camera();
-diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
-index 12865af..77cade52 100644
---- a/arch/arm/mach-omap2/board-devkit8000.c
-+++ b/arch/arm/mach-omap2/board-devkit8000.c
-@@ -29,6 +29,7 @@
- #include <linux/mtd/partitions.h>
- #include <linux/mtd/nand.h>
- #include <linux/mmc/host.h>
-+#include <linux/usb/phy.h>
- 
- #include <linux/regulator/machine.h>
- #include <linux/i2c/twl.h>
-@@ -622,6 +623,7 @@ static void __init devkit8000_init(void)
- 
- 	omap_ads7846_init(2, OMAP3_DEVKIT_TS_GPIO, 0, NULL);
- 
-+	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
- 	usb_musb_init(NULL);
- 	usbhs_init(&usbhs_bdata);
- 	board_nand_init(devkit8000_nand_partitions,
-diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
-index 0f24cb8..15e5881 100644
---- a/arch/arm/mach-omap2/board-igep0020.c
-+++ b/arch/arm/mach-omap2/board-igep0020.c
-@@ -18,6 +18,7 @@
- #include <linux/gpio.h>
- #include <linux/interrupt.h>
- #include <linux/input.h>
-+#include <linux/usb/phy.h>
- 
- #include <linux/regulator/machine.h>
- #include <linux/regulator/fixed.h>
-@@ -625,6 +626,7 @@ static void __init igep_init(void)
- 	omap_serial_init();
- 	omap_sdrc_init(m65kxxxxam_sdrc_params,
- 				  m65kxxxxam_sdrc_params);
-+	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
- 	usb_musb_init(NULL);
- 
- 	igep_flash_init();
-diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
-index 0869f4f..3b5510a 100644
---- a/arch/arm/mach-omap2/board-ldp.c
-+++ b/arch/arm/mach-omap2/board-ldp.c
-@@ -28,6 +28,7 @@
- #include <linux/io.h>
- #include <linux/smsc911x.h>
- #include <linux/mmc/host.h>
-+#include <linux/usb/phy.h>
- #include <linux/platform_data/spi-omap2-mcspi.h>
- 
- #include <asm/mach-types.h>
-@@ -418,6 +419,7 @@ static void __init omap_ldp_init(void)
- 	omap_ads7846_init(1, 54, 310, NULL);
- 	omap_serial_init();
- 	omap_sdrc_init(NULL, NULL);
-+	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
- 	usb_musb_init(NULL);
- 	board_nand_init(ldp_nand_partitions, ARRAY_SIZE(ldp_nand_partitions),
- 			ZOOM_NAND_CS, 0, nand_default_timings);
-diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
-index 8000e71..cd55192 100644
---- a/arch/arm/mach-omap2/board-omap3beagle.c
-+++ b/arch/arm/mach-omap2/board-omap3beagle.c
-@@ -31,6 +31,7 @@
- #include <linux/mtd/partitions.h>
- #include <linux/mtd/nand.h>
- #include <linux/mmc/host.h>
-+#include <linux/usb/phy.h>
- 
- #include <linux/regulator/machine.h>
- #include <linux/regulator/fixed.h>
-@@ -1287,6 +1288,7 @@ static void __init omap3_beagle_init(void)
- 	#endif
- 	}
- 
-+	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
- 	usb_musb_init(NULL);
- 	usbhs_init(&usbhs_bdata);
- 	board_nand_init(omap3beagle_nand_partitions,
-diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
-index 3985f35..a198b61 100644
---- a/arch/arm/mach-omap2/board-omap3evm.c
-+++ b/arch/arm/mach-omap2/board-omap3evm.c
-@@ -41,6 +41,7 @@
- #include <linux/regulator/machine.h>
- #include <linux/mmc/host.h>
- #include <linux/export.h>
-+#include <linux/usb/phy.h>
- 
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-@@ -734,6 +735,7 @@ static void __init omap3_evm_init(void)
- 		omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
- 		usbhs_bdata.reset_gpio_port[1] = 135;
- 	}
-+	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
- 	usb_musb_init(&musb_board_data);
- 	usbhs_init(&usbhs_bdata);
- 	board_nand_init(omap3evm_nand_partitions,
-diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
-index 2a065ba..9409eb8 100644
---- a/arch/arm/mach-omap2/board-omap3logic.c
-+++ b/arch/arm/mach-omap2/board-omap3logic.c
-@@ -29,6 +29,7 @@
- 
- #include <linux/i2c/twl.h>
- #include <linux/mmc/host.h>
-+#include <linux/usb/phy.h>
- 
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-@@ -215,6 +216,7 @@ static void __init omap3logic_init(void)
- 	board_mmc_init();
- 	board_smsc911x_init();
- 
-+	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
- 	usb_musb_init(NULL);
- 
- 	/* Ensure SDRC pins are mux'd for self-refresh */
-diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
-index a53a668..1ac3e81 100644
---- a/arch/arm/mach-omap2/board-omap3pandora.c
-+++ b/arch/arm/mach-omap2/board-omap3pandora.c
-@@ -35,6 +35,7 @@
- #include <linux/mmc/host.h>
- #include <linux/mmc/card.h>
- #include <linux/regulator/fixed.h>
-+#include <linux/usb/phy.h>
- #include <linux/platform_data/spi-omap2-mcspi.h>
- 
- #include <asm/mach-types.h>
-@@ -601,6 +602,7 @@ static void __init omap3pandora_init(void)
- 			ARRAY_SIZE(omap3pandora_spi_board_info));
- 	omap_ads7846_init(1, OMAP3_PANDORA_TS_GPIO, 0, NULL);
- 	usbhs_init(&usbhs_bdata);
-+	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
- 	usb_musb_init(NULL);
- 	gpmc_nand_init(&pandora_nand_data, NULL);
- 
-diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
-index 53a6cbc..63cb204 100644
---- a/arch/arm/mach-omap2/board-omap3stalker.c
-+++ b/arch/arm/mach-omap2/board-omap3stalker.c
-@@ -33,6 +33,7 @@
- #include <linux/interrupt.h>
- #include <linux/smsc911x.h>
- #include <linux/i2c/at24.h>
-+#include <linux/usb/phy.h>
- 
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-@@ -404,6 +405,7 @@ static void __init omap3_stalker_init(void)
- 
- 	omap_serial_init();
- 	omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL);
-+	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
- 	usb_musb_init(NULL);
- 	usbhs_init(&usbhs_bdata);
- 	omap_ads7846_init(1, OMAP3_STALKER_TS_GPIO, 310, NULL);
-diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
-index 263cb9c..6b22ce3 100644
---- a/arch/arm/mach-omap2/board-omap3touchbook.c
-+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
-@@ -28,6 +28,7 @@
- #include <linux/mtd/partitions.h>
- #include <linux/mtd/nand.h>
- #include <linux/mmc/host.h>
-+#include <linux/usb/phy.h>
- 
- #include <linux/platform_data/spi-omap2-mcspi.h>
- #include <linux/spi/spi.h>
-@@ -365,6 +366,7 @@ static void __init omap3_touchbook_init(void)
- 
- 	/* Touchscreen and accelerometer */
- 	omap_ads7846_init(4, OMAP3_TS_GPIO, 310, &ads7846_pdata);
-+	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
- 	usb_musb_init(NULL);
- 	usbhs_init(&usbhs_bdata);
- 	board_nand_init(omap3touchbook_nand_partitions,
-diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
-index 5c8e9ce..64fb190 100644
---- a/arch/arm/mach-omap2/board-omap4panda.c
-+++ b/arch/arm/mach-omap2/board-omap4panda.c
-@@ -30,6 +30,7 @@
- #include <linux/regulator/fixed.h>
- #include <linux/ti_wilink_st.h>
- #include <linux/usb/musb.h>
-+#include <linux/usb/phy.h>
- #include <linux/wl12xx.h>
- #include <linux/platform_data/omap-abe-twl6040.h>
- 
-@@ -441,6 +442,7 @@ static void __init omap4_panda_init(void)
- 	omap_sdrc_init(NULL, NULL);
- 	omap4_twl6030_hsmmc_init(mmc);
- 	omap4_ehci_init();
-+	usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto");
- 	usb_musb_init(&musb_board_data);
- 	omap4_panda_display_init();
- }
-diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
-index c8fde3e..7e43ff3 100644
---- a/arch/arm/mach-omap2/board-overo.c
-+++ b/arch/arm/mach-omap2/board-overo.c
-@@ -36,6 +36,7 @@
- #include <linux/mtd/nand.h>
- #include <linux/mtd/partitions.h>
- #include <linux/mmc/host.h>
-+#include <linux/usb/phy.h>
- 
- #include <linux/platform_data/mtd-nand-omap2.h>
- #include <linux/platform_data/spi-omap2-mcspi.h>
-@@ -499,6 +500,7 @@ static void __init overo_init(void)
- 				  mt46h32m32lf6_sdrc_params);
- 	board_nand_init(overo_nand_partitions,
- 			ARRAY_SIZE(overo_nand_partitions), NAND_CS, 0, NULL);
-+	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
- 	usb_musb_init(NULL);
- 	usbhs_init(&usbhs_bdata);
- 	overo_spi_init();
-diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
-index 0c777b7..f8a272c 100644
---- a/arch/arm/mach-omap2/board-rm680.c
-+++ b/arch/arm/mach-omap2/board-rm680.c
-@@ -18,6 +18,7 @@
- #include <linux/regulator/machine.h>
- #include <linux/regulator/consumer.h>
- #include <linux/platform_data/mtd-onenand-omap2.h>
-+#include <linux/usb/phy.h>
- 
- #include <asm/mach/arch.h>
- #include <asm/mach-types.h>
-@@ -134,6 +135,7 @@ static void __init rm680_init(void)
- 	sdrc_params = nokia_get_sdram_timings();
- 	omap_sdrc_init(sdrc_params, sdrc_params);
- 
-+	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
- 	usb_musb_init(NULL);
- 	rm680_peripherals_init();
- }
-diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
-index 26e07ad..dc5498b 100644
---- a/arch/arm/mach-omap2/board-zoom-peripherals.c
-+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
-@@ -20,6 +20,7 @@
- #include <linux/wl12xx.h>
- #include <linux/mmc/host.h>
- #include <linux/platform_data/gpio-omap.h>
-+#include <linux/usb/phy.h>
- 
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-@@ -298,6 +299,7 @@ void __init zoom_peripherals_init(void)
- 	omap_hsmmc_init(mmc);
- 	omap_i2c_init();
- 	platform_device_register(&omap_vwlan_device);
-+	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
- 	usb_musb_init(NULL);
- 	enable_board_wakeup_source();
- 	omap_serial_init();
--- 
-1.7.10.4
-
diff --git a/patches/usb/0006-drivers-usb-musb-omap-make-use-of-the-new-PHY-lib-AP.patch b/patches/usb/0006-drivers-usb-musb-omap-make-use-of-the-new-PHY-lib-AP.patch
deleted file mode 100644
index 0629b1bb944c54bfbeb6607f45125daa0a2c4b36..0000000000000000000000000000000000000000
--- a/patches/usb/0006-drivers-usb-musb-omap-make-use-of-the-new-PHY-lib-AP.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 0678f0bf943bf8a499a13b230bf3662df9a0d991 Mon Sep 17 00:00:00 2001
-From: Kishon Vijay Abraham I <kishon@ti.com>
-Date: Tue, 22 Jan 2013 09:58:12 +0000
-Subject: [PATCH 6/9] drivers: usb: musb: omap: make use of the new PHY lib
- APIs
-
-New PHY lib APIs like usb_add_phy_dev() and devm_usb_get_phy_dev() are
-used in MUSB (OMAP), in order to make use of the binding information
-provided in the board file (of OMAP platforms).
-All the platforms should be modified similar to this to add and get the
-PHY.
-
-Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
----
- drivers/usb/musb/omap2430.c   | 2 +-
- drivers/usb/otg/twl4030-usb.c | 3 ++-
- drivers/usb/phy/omap-usb2.c   | 3 ++-
- 3 files changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
-index 3e7ceef..6044b6f 100644
---- a/drivers/usb/musb/omap2430.c
-+++ b/drivers/usb/musb/omap2430.c
-@@ -346,7 +346,7 @@ static int omap2430_musb_init(struct musb *musb)
- 	 * up through ULPI.  TWL4030-family PMICs include one,
- 	 * which needs a driver, drivers aren't always needed.
- 	 */
--	musb->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
-+	musb->xceiv = devm_usb_get_phy_dev(dev, 0);
- 	if (IS_ERR_OR_NULL(musb->xceiv)) {
- 		pr_err("HS USB OTG: no transceiver configured\n");
- 		return -ENODEV;
-diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
-index 0a70193..a994715 100644
---- a/drivers/usb/otg/twl4030-usb.c
-+++ b/drivers/usb/otg/twl4030-usb.c
-@@ -610,6 +610,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
- 	twl->phy.dev		= twl->dev;
- 	twl->phy.label		= "twl4030";
- 	twl->phy.otg		= otg;
-+	twl->phy.type		= USB_PHY_TYPE_USB2;
- 	twl->phy.set_suspend	= twl4030_set_suspend;
- 
- 	otg->phy		= &twl->phy;
-@@ -624,7 +625,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
- 		dev_err(&pdev->dev, "ldo init failed\n");
- 		return err;
- 	}
--	usb_add_phy(&twl->phy, USB_PHY_TYPE_USB2);
-+	usb_add_phy_dev(&twl->phy);
- 
- 	platform_set_drvdata(pdev, twl);
- 	if (device_create_file(&pdev->dev, &dev_attr_vbus))
-diff --git a/drivers/usb/phy/omap-usb2.c b/drivers/usb/phy/omap-usb2.c
-index 2152ce4..46c79c6 100644
---- a/drivers/usb/phy/omap-usb2.c
-+++ b/drivers/usb/phy/omap-usb2.c
-@@ -143,6 +143,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
- 	phy->phy.label		= "omap-usb2";
- 	phy->phy.set_suspend	= omap_usb2_suspend;
- 	phy->phy.otg		= otg;
-+	phy->phy.type		= USB_PHY_TYPE_USB2;
- 
- 	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- 
-@@ -168,7 +169,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
- 	}
- 	clk_prepare(phy->wkupclk);
- 
--	usb_add_phy(&phy->phy, USB_PHY_TYPE_USB2);
-+	usb_add_phy_dev(&phy->phy);
- 
- 	platform_set_drvdata(pdev, phy);
- 
--- 
-1.8.1
-
diff --git a/patches/usb/0007-usb-otg-add-device-tree-support-to-otg-library.patch b/patches/usb/0007-usb-otg-add-device-tree-support-to-otg-library.patch
deleted file mode 100644
index 78115663fde1c2f3aeb4bc55a666ad6166f11e7b..0000000000000000000000000000000000000000
--- a/patches/usb/0007-usb-otg-add-device-tree-support-to-otg-library.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-From 37bc32e0da38ba291fc252a4832116e0e9c38b9b Mon Sep 17 00:00:00 2001
-From: Kishon Vijay Abraham I <kishon@ti.com>
-Date: Tue, 22 Jan 2013 09:58:13 +0000
-Subject: [PATCH 7/9] usb: otg: add device tree support to otg library
-
-Added an API devm_usb_get_phy_by_phandle(), to get usb phy by passing a
-device node phandle value. This function will return a pointer to
-the phy on success, -EPROBE_DEFER if there is a device_node for the phandle,
-but the phy has not been added, or a ERR_PTR() otherwise.
-
-Cc: Marc Kleine-Budde <mkl@pengutronix.de>
-Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
----
- drivers/usb/otg/otg.c   | 77 +++++++++++++++++++++++++++++++++++++++++++++++++
- include/linux/usb/phy.h |  8 +++++
- 2 files changed, 85 insertions(+)
-
-diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c
-index 1f30b22..67daf8c 100644
---- a/drivers/usb/otg/otg.c
-+++ b/drivers/usb/otg/otg.c
-@@ -13,7 +13,9 @@
- #include <linux/export.h>
- #include <linux/err.h>
- #include <linux/device.h>
-+#include <linux/module.h>
- #include <linux/slab.h>
-+#include <linux/of.h>
- 
- #include <linux/usb/otg.h>
- 
-@@ -50,6 +52,20 @@ static struct usb_phy *__usb_find_phy_dev(struct device *dev,
- 	return ERR_PTR(-ENODEV);
- }
- 
-+static struct usb_phy *__of_usb_find_phy(struct device_node *node)
-+{
-+	struct usb_phy  *phy;
-+
-+	list_for_each_entry(phy, &phy_list, head) {
-+		if (node != phy->dev->of_node)
-+			continue;
-+
-+		return phy;
-+	}
-+
-+	return ERR_PTR(-ENODEV);
-+}
-+
- static void devm_usb_phy_release(struct device *dev, void *res)
- {
- 	struct usb_phy *phy = *(struct usb_phy **)res;
-@@ -125,6 +141,67 @@ err0:
- }
- EXPORT_SYMBOL(usb_get_phy);
- 
-+ /**
-+ * devm_usb_get_phy_by_phandle - find the USB PHY by phandle
-+ * @dev - device that requests this phy
-+ * @phandle - name of the property holding the phy phandle value
-+ * @index - the index of the phy
-+ *
-+ * Returns the phy driver associated with the given phandle value,
-+ * after getting a refcount to it, -ENODEV if there is no such phy or
-+ * -EPROBE_DEFER if there is a phandle to the phy, but the device is
-+ * not yet loaded. While at that, it also associates the device with
-+ * the phy using devres. On driver detach, release function is invoked
-+ * on the devres data, then, devres data is freed.
-+ *
-+ * For use by USB host and peripheral drivers.
-+ */
-+struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev,
-+	const char *phandle, u8 index)
-+{
-+	struct usb_phy	*phy = NULL, **ptr;
-+	unsigned long	flags;
-+	struct device_node *node;
-+
-+	if (!dev->of_node) {
-+		dev_dbg(dev, "device does not have a device node entry\n");
-+		return ERR_PTR(-EINVAL);
-+	}
-+
-+	node = of_parse_phandle(dev->of_node, phandle, index);
-+	if (!node) {
-+		dev_dbg(dev, "failed to get %s phandle in %s node\n", phandle,
-+			dev->of_node->full_name);
-+		return ERR_PTR(-ENODEV);
-+	}
-+
-+	ptr = devres_alloc(devm_usb_phy_release, sizeof(*ptr), GFP_KERNEL);
-+	if (!ptr) {
-+		dev_dbg(dev, "failed to allocate memory for devres\n");
-+		return ERR_PTR(-ENOMEM);
-+	}
-+
-+	spin_lock_irqsave(&phy_lock, flags);
-+
-+	phy = __of_usb_find_phy(node);
-+	if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) {
-+		phy = ERR_PTR(-EPROBE_DEFER);
-+		devres_free(ptr);
-+		goto err0;
-+	}
-+
-+	*ptr = phy;
-+	devres_add(dev, ptr);
-+
-+	get_device(phy->dev);
-+
-+err0:
-+	spin_unlock_irqrestore(&phy_lock, flags);
-+
-+	return phy;
-+}
-+EXPORT_SYMBOL(devm_usb_get_phy_by_phandle);
-+
- /**
-  * usb_get_phy_dev - find the USB PHY
-  * @dev - device that requests this phy
-diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
-index 3a9ae3e..c7f5a98 100644
---- a/include/linux/usb/phy.h
-+++ b/include/linux/usb/phy.h
-@@ -167,6 +167,8 @@ extern struct usb_phy *devm_usb_get_phy(struct device *dev,
- 	enum usb_phy_type type);
- extern struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index);
- extern struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index);
-+extern struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev,
-+	const char *phandle, u8 index);
- extern void usb_put_phy(struct usb_phy *);
- extern void devm_usb_put_phy(struct device *dev, struct usb_phy *x);
- extern struct usb_phy_bind *usb_bind_phy(const char *dev_name, u8 index,
-@@ -193,6 +195,12 @@ static inline struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index)
- 	return NULL;
- }
- 
-+static inline struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev,
-+	const char *phandle, u8 index)
-+{
-+	return NULL;
-+}
-+
- static inline void usb_put_phy(struct usb_phy *x)
- {
- }
--- 
-1.8.1
-
diff --git a/patches/usb/0008-USB-MUSB-OMAP-get-PHY-by-phandle-for-dt-boot.patch b/patches/usb/0008-USB-MUSB-OMAP-get-PHY-by-phandle-for-dt-boot.patch
deleted file mode 100644
index 6668b0771e4c30b36f78d57dafff5cbadfb1e987..0000000000000000000000000000000000000000
--- a/patches/usb/0008-USB-MUSB-OMAP-get-PHY-by-phandle-for-dt-boot.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 2b626a76f47162b61dcc7ac2ffb1f1032e14fd58 Mon Sep 17 00:00:00 2001
-From: Kishon Vijay Abraham I <kishon@ti.com>
-Date: Tue, 22 Jan 2013 09:58:14 +0000
-Subject: [PATCH 8/9] USB: MUSB: OMAP: get PHY by phandle for dt boot
-
-The OMAP glue has been modified to get PHY by phandle for dt boot.
-
-Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
----
- drivers/usb/musb/omap2430.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
-index 6044b6f..3024393 100644
---- a/drivers/usb/musb/omap2430.c
-+++ b/drivers/usb/musb/omap2430.c
-@@ -346,7 +346,12 @@ static int omap2430_musb_init(struct musb *musb)
- 	 * up through ULPI.  TWL4030-family PMICs include one,
- 	 * which needs a driver, drivers aren't always needed.
- 	 */
--	musb->xceiv = devm_usb_get_phy_dev(dev, 0);
-+	if (dev->parent->of_node)
-+		musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent,
-+		    "usb_phy", 0);
-+	else
-+		musb->xceiv = devm_usb_get_phy_dev(dev, 0);
-+
- 	if (IS_ERR_OR_NULL(musb->xceiv)) {
- 		pr_err("HS USB OTG: no transceiver configured\n");
- 		return -ENODEV;
--- 
-1.8.1
-
diff --git a/patches/usb/0009-MUSB-Hack-around-to-make-host-port-to-work.patch b/patches/usb/0009-MUSB-Hack-around-to-make-host-port-to-work.patch
deleted file mode 100644
index 9f22bb23c1a6f89c9cfe26fe70d262400e172458..0000000000000000000000000000000000000000
--- a/patches/usb/0009-MUSB-Hack-around-to-make-host-port-to-work.patch
+++ /dev/null
@@ -1,238 +0,0 @@
-From 69bb04620b1127e1b293914d60f8d69fef380056 Mon Sep 17 00:00:00 2001
-From: Pantelis Antoniou <panto@antoniou-consulting.com>
-Date: Tue, 22 Jan 2013 22:25:06 +0200
-Subject: [PATCH 9/9] MUSB: Hack around to make host port to work.
-
-It sort of works, but it doesn't handle hotplug.
-After removing the device, issue lsusb to cause it to scan the bus again.
-
-Crappy, I know, but at least works.
----
- arch/arm/boot/dts/am335x-bone-common.dtsi |  6 ++++
- arch/arm/boot/dts/am33xx.dtsi             |  9 ++++--
- drivers/usb/musb/musb_core.c              | 45 ++++++++++++++++++++++++----
- drivers/usb/musb/musb_dsps.c              | 49 +++++++++++++++++++++++++++++--
- drivers/usb/musb/musb_host.c              |  7 +++--
- 5 files changed, 105 insertions(+), 11 deletions(-)
-
-diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
-index 96bce02..213addb 100644
---- a/arch/arm/boot/dts/am335x-bone-common.dtsi
-+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
-@@ -373,3 +373,9 @@
- &aes {
- 	status = "okay";
- };
-+
-+&usb_otg_hs {
-+	interface_type = <1>;
-+	power = <500>;
-+	status = "okay";
-+};
-diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
-index 872d501..18485bb 100644
---- a/arch/arm/boot/dts/am33xx.dtsi
-+++ b/arch/arm/boot/dts/am33xx.dtsi
-@@ -490,11 +490,15 @@
- 
- 		};
- 
--		nop-phy {
-+		nop-phy@0 {
- 			compatible = "nop-xceiv-usb";
- 		};
- 
--		usb@47400000 {
-+		nop-phy@1 {
-+			compatible = "nop-xceiv-usb";
-+		};
-+
-+		usb_otg_hs: usb@47400000 {
- 			compatible = "ti,musb-am33xx";
- 			reg = <0x47400000 0x1000	/* usbss */
- 			       0x47401000 0x800		/* musb instance 0 */
-@@ -509,6 +513,7 @@
- 			port1-mode = <1>;
- 			power = <250>;
- 			ti,hwmods = "usb_otg_hs";
-+			status = "disabled";
- 		};
- 
- 		mac: ethernet@4a100000 {
-diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
-index fd34867..cd738d1 100644
---- a/drivers/usb/musb/musb_core.c
-+++ b/drivers/usb/musb/musb_core.c
-@@ -1955,11 +1955,43 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
- 		musb_write_ulpi_buscontrol(musb->mregs, busctl);
- 	}
- 
--	MUSB_DEV_MODE(musb);
--	musb->xceiv->otg->default_a = 0;
--	musb->xceiv->state = OTG_STATE_B_IDLE;
-+	dev_info(dev, "*** mode=%d\n", plat->mode);
-+	dev_info(dev, "*** power=%d\n", plat->power);
- 
--	status = musb_gadget_setup(musb);
-+	/* For the host-only role, we can activate right away.
-+	 * (We expect the ID pin to be forcibly grounded!!)
-+	 * Otherwise, wait till the gadget driver hooks up.
-+	 */
-+	if (plat->mode == MUSB_HOST) {	/* host mode */
-+
-+		del_timer(&musb->otg_timer);
-+
-+		MUSB_HST_MODE(musb);
-+		musb->xceiv->otg->default_a = 1;
-+		musb->xceiv->state = OTG_STATE_A_WAIT_VRISE;
-+
-+		status = usb_add_hcd(hcd, 0, 0);
-+
-+		hcd->self.uses_pio_for_control = 1;
-+		dev_dbg(musb->controller, "%s mode, status %d, devctl %02x %c\n",
-+			"HOST", status,
-+			musb_readb(musb->mregs, MUSB_DEVCTL),
-+			(musb_readb(musb->mregs, MUSB_DEVCTL)
-+				& MUSB_DEVCTL_BDEVICE
-+				? 'B' : 'A'));
-+
-+	} else {
-+		MUSB_DEV_MODE(musb);
-+		musb->xceiv->otg->default_a = 0;
-+		musb->xceiv->state = OTG_STATE_B_IDLE;
-+
-+		status = musb_gadget_setup(musb);
-+
-+		dev_dbg(musb->controller, "%s mode, status %d, dev%02x\n",
-+			plat->mode == MUSB_OTG ? "OTG" : "PERIPHERAL",
-+			status,
-+			musb_readb(musb->mregs, MUSB_DEVCTL));
-+	}
- 
- 	if (status < 0)
- 		goto fail3;
-@@ -1982,7 +2014,10 @@ fail5:
- 	musb_exit_debugfs(musb);
- 
- fail4:
--	musb_gadget_cleanup(musb);
-+	if (plat->mode == MUSB_HOST)
-+		usb_remove_hcd(hcd);
-+	else
-+		musb_gadget_cleanup(musb);
- 
- fail3:
- 	pm_runtime_put_sync(musb->controller);
-diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
-index f7d764d..29e28f6 100644
---- a/drivers/usb/musb/musb_dsps.c
-+++ b/drivers/usb/musb/musb_dsps.c
-@@ -415,19 +415,30 @@ static int dsps_musb_init(struct musb *musb)
- 	/* mentor core register starts at offset of 0x400 from musb base */
- 	musb->mregs += wrp->musb_core_offset;
- 
-+#if 1
- 	/* NOP driver needs change if supporting dual instance */
- 	usb_nop_xceiv_register();
- 	musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
--	if (IS_ERR_OR_NULL(musb->xceiv))
-+#else
-+	/* Get the NOP PHY */
-+	sprintf(name, "usb%d-phy", pdev->id);
-+	musb->xceiv = devm_usb_get_phy_by_phandle(&parent_pdev->dev, name);
-+#endif
-+	if (IS_ERR_OR_NULL(musb->xceiv)) {
-+		dev_err(dev, "%s:%d %s: FAIL\n", __FILE__, __LINE__, __func__);
- 		return -ENODEV;
-+	}
- 
- 	/* Returns zero if e.g. not clocked */
- 	rev = dsps_readl(reg_base, wrp->revision);
- 	if (!rev) {
-+		dev_err(dev, "%s:%d %s: FAIL\n", __FILE__, __LINE__, __func__);
- 		status = -ENODEV;
- 		goto err0;
- 	}
- 
-+	dev_info(dev, "pdev->id = %d\n", pdev->id);
-+
- 	setup_timer(&glue->timer[pdev->id], otg_timer, (unsigned long) musb);
- 
- 	/* Reset the musb */
-@@ -446,6 +457,8 @@ static int dsps_musb_init(struct musb *musb)
- 	/* clear level interrupt */
- 	dsps_writel(reg_base, wrp->eoi, 0);
- 
-+	dev_info(dev, "%s:%d %s: OK\n", __FILE__, __LINE__, __func__);
-+
- 	return 0;
- err0:
- 	usb_put_phy(musb->xceiv);
-@@ -761,9 +774,41 @@ static const struct platform_device_id musb_dsps_id_table[] = {
- MODULE_DEVICE_TABLE(platform, musb_dsps_id_table);
- 
- #ifdef CONFIG_OF
-+
-+static const struct dsps_musb_wrapper am33xx_driver_data = {
-+	.revision		= 0x00,
-+	.control		= 0x14,
-+	.status			= 0x18,
-+	.eoi			= 0x24,
-+	.epintr_set		= 0x38,
-+	.epintr_clear		= 0x40,
-+	.epintr_status		= 0x30,
-+	.coreintr_set		= 0x3c,
-+	.coreintr_clear		= 0x44,
-+	.coreintr_status	= 0x34,
-+	.phy_utmi		= 0xe0,
-+	.mode			= 0xe8,
-+	.reset			= 0,
-+	.otg_disable		= 21,
-+	.iddig			= 8,
-+	.usb_shift		= 0,
-+	.usb_mask		= 0x1ff,
-+	.usb_bitmap		= (0x1ff << 0),
-+	.drvvbus		= 8,
-+	.txep_shift		= 0,
-+	.txep_mask		= 0xffff,
-+	.txep_bitmap		= (0xffff << 0),
-+	.rxep_shift		= 16,
-+	.rxep_mask		= 0xfffe,
-+	.rxep_bitmap		= (0xfffe << 16),
-+	.musb_core_offset	= 0x400,
-+	.poll_seconds		= 2,
-+	.instances		= 2,
-+};
-+
- static const struct of_device_id musb_dsps_of_match[] = {
- 	{ .compatible = "ti,musb-am33xx",
--		.data = (void *) &ti81xx_driver_data, },
-+		.data = (void *) &am33xx_driver_data, },
- 	{  },
- };
- MODULE_DEVICE_TABLE(of, musb_dsps_of_match);
-diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
-index e9f0fd9..86442a2 100644
---- a/drivers/usb/musb/musb_host.c
-+++ b/drivers/usb/musb/musb_host.c
-@@ -2431,12 +2431,15 @@ static int musb_bus_suspend(struct usb_hcd *hcd)
- 		break;
- 	}
- 
-+#if 0
- 	if (musb->is_active) {
- 		WARNING("trying to suspend as %s while active\n",
- 				otg_state_string(musb->xceiv->state));
- 		return -EBUSY;
--	} else
--		return 0;
-+	}
-+#endif
-+
-+	return 0;
- }
- 
- static int musb_bus_resume(struct usb_hcd *hcd)
--- 
-1.8.1
-
diff --git a/tools/install_image.sh b/tools/install_image.sh
index c84b8f402efd5838e8448f5a2dba526bb9de0303..1ff2936519f0e08bcb15385696a0a65149cd85bb 100755
--- a/tools/install_image.sh
+++ b/tools/install_image.sh
@@ -110,7 +110,7 @@ mmc_write_boot () {
 }
 
 mmc_partition_discover () {
-	if [ -f "${DIR}/deploy/disk/uEnv.txt" ] ; then
+	if [ -f "${DIR}/deploy/disk/uEnv.txt" ] || [ -f "${DIR}/deploy/disk/BOOT.BIN" ] ; then
 		location="${DIR}/deploy/disk"
 		mmc_write_boot
 	fi
diff --git a/version.sh b/version.sh
index cbbfc3ea570b0107b4cec66b6b189a3afc815fcf..f9ff7c95b3634cf940f782ae3a781a6db35f5faf 100644
--- a/version.sh
+++ b/version.sh
@@ -23,14 +23,14 @@ config="omap2plus_defconfig"
 
 #Kernel/Build
 KERNEL_REL=3.8
-KERNEL_TAG=${KERNEL_REL}-rc6
-BUILD=d2
+KERNEL_TAG=${KERNEL_REL}
+BUILD=d0
 
 #v3.X-rcX + upto SHA
 #KERNEL_SHA="66e2d3e8c2294543a6f0453d974940171829e7dd"
 
 #git branch
-#BRANCH="v3.8.x"
+#BRANCH="v3.9.x"
 
 BUILDREV=1.0
 DISTRO=cross